@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,88 @@
1
+ # IdentityEdit
2
+
3
+ The identity section's summary/form toggle. `IdentityEditController` shows who the shopper is until they
4
+ ask to change it, and returns to the summary when they press cancel. `IdentitySummaryView` holds the
5
+ summary side of the swap and `IdentityEditForm` the form side; `IdentityEditButton` opens the form and
6
+ `IdentityEditCancelButton` returns to the summary.
7
+
8
+ The sibling of the delivery section's `ShippingAddressEditController`, and deliberately its own component
9
+ rather than a shared mechanism: the two differ in exactly the parts that are domain knowledge. This one
10
+ starts on the summary and needs an explicit cancel; that one derives its starting state from whether an
11
+ address exists and closes itself with no cancel at all.
12
+
13
+ The mode is owned here, not authored in a page (ADR-0006). `ClientProfileForm` announces nothing and never
14
+ learns whether anything collapses around it, which is what lets the same form sit in a section, in a wizard
15
+ step, or on a page of its own.
16
+
17
+ ## Why no mode name reaches the schema
18
+
19
+ Which state a part gates is which component it is, so no part takes a mode prop. A page cannot misspell a
20
+ mode, because there is nothing to spell: `page.json` names a component, and an unknown component name is a
21
+ resolution error rather than a silently dead branch that blanks the section.
22
+
23
+ ## Parts
24
+
25
+ | Part | Role |
26
+ |---|---|
27
+ | `IdentityEditController` | Owns the mode. Moves only on this section's own buttons. Renders no DOM. |
28
+ | `IdentitySummaryView` | Renders children while the section shows the summary. |
29
+ | `IdentityEditForm` | Renders children while the section shows the form. |
30
+ | `IdentityEditButton` | Opens the form. Carries `data-fs-identity-edit-button`. |
31
+ | `IdentityEditCancelButton` | Returns to the summary without saving. Carries `data-fs-identity-edit-cancel-button`. |
32
+
33
+ ## Props
34
+
35
+ ### IdentitySummaryView / IdentityEditForm
36
+
37
+ | Prop | Type | Default | Notes |
38
+ |---|---|---|---|
39
+ | `children` | ReactNode | — | Rendered only while the section is in this component's state. Nothing else: the state is the component. |
40
+
41
+ ### IdentityEditButton / IdentityEditCancelButton
42
+
43
+ | Prop | Type | Default | Notes |
44
+ |---|---|---|---|
45
+ | `label` | string | `'editar'` / `'cancelar'` | Text shown when no children are composed. |
46
+ | `children` | ReactNode | — | Custom content, e.g. an `Icon` plus text; falls back to `label`. |
47
+ | `className` | string | — | |
48
+
49
+ ## Behavior
50
+
51
+ - Starts on the summary. Unlike the delivery section, nothing about the profile data decides this: the
52
+ summary is always the right first thing to show a shopper who has one.
53
+ - The mode moves only on this section's own buttons, `EditButton` and `CancelButton`. Saving the form does
54
+ not close the section, which is what keeps `ClientProfileForm`'s confirmation on screen long enough to
55
+ read.
56
+ - **Self-contained.** It observes nothing outside itself and reports nothing: no other section opens or
57
+ closes as a result of anything happening here. Whether finishing a form should collapse the section that
58
+ holds it is a sequencing question, deliberately left to the flow-of-steps RFC (#611) rather than
59
+ answered here.
60
+
61
+ ## Composition
62
+
63
+ ```
64
+ IdentityEditController
65
+ ├─ heading
66
+ │ ├─ IdentitySummaryView → the "identified" badge
67
+ │ ├─ IdentityEditForm → the "editing" badge
68
+ │ └─ IdentitySummaryView → IdentityEditButton
69
+ └─ IdentitySummaryRoot
70
+ ├─ IdentitySummaryView → IdentitySummarySelectedSummary
71
+ └─ IdentityEditForm → ClientProfileFormRoot + IdentityEditCancelButton
72
+ ```
73
+
74
+ ## Accessibility
75
+
76
+ Switching modes moves no focus and announces nothing, and because each button sits inside the branch that
77
+ unmounts, focus falls to the document body on every switch. There is no `aria-expanded`/`aria-controls`
78
+ pair. No issue tracks this yet.
79
+
80
+ ## Known gaps
81
+
82
+ Found by review and deliberately left for the dedicated revision of these components.
83
+
84
+ - **The mode survives a sign-out.** The controller is never remounted when the session goes anonymous, so a
85
+ shopper who opens the form and then signs out leaves it in `edit`. Any part composed above
86
+ `IdentitySummaryRoot` — a heading badge, for instance — keeps its editing appearance over the anonymous
87
+ panel, and once the shopper identifies again the section opens straight onto the form, contradicting
88
+ "starts on the summary" above.
@@ -0,0 +1,106 @@
1
+ # IdentitySummary
2
+
3
+ Compound for the read-only identity section of an identified or logged-in shopper. The `Root`
4
+ self-gates: it renders nothing in the anonymous state (via `useSession()`). The summary/form swap is
5
+ owned by `IdentityEditController`, composed around these parts — this matter owns only the identity
6
+ data and the sign-out action.
7
+
8
+ ## Anatomy
9
+
10
+ ```
11
+ IdentityEditController // owns the summary/form swap; starts on the summary
12
+ ├─ heading
13
+ │ ├─ IdentitySummaryView → the "identified" badge
14
+ │ ├─ IdentityEditForm → the "editing" badge
15
+ │ └─ IdentitySummaryView → IdentityEditButton // → the form (compose an Icon + text as children)
16
+ └─ IdentitySummary.Root // data root: profile + sign-out, self-gates on session
17
+ ├─ IdentitySummaryView
18
+ │ ├─ IdentitySummary.SelectedSummary // badge + name/email/phone/document (read-only)
19
+ │ ├─ IdentitySummary.SignOutButton // dispatches session.logout
20
+ │ └─ IdentitySummary.Error // inline sign-out error
21
+ └─ IdentityEditForm
22
+ ├─ ClientProfileForm // the edit surface (composed directly)
23
+ └─ IdentityEditCancelButton // Cancel → back to the summary
24
+ ```
25
+
26
+ The controller sits **outside** `IdentitySummary.Root`, not inside it. The Root self-gates to `null` in the
27
+ anonymous state, so anything that must survive that state — the section heading, its badge, the sign-in path
28
+ — has to be composed above the Root rather than within it. `identity-edit.md` and
29
+ `examples/store-americanas/pages/checkout/page.json` use this same nesting.
30
+
31
+ ## What it shows
32
+
33
+ - **SelectedSummary** — a session-state badge (`identified` → guest label; `loggedIn` → signed-in
34
+ label), plus full name, email, phone, and document. Each line is omitted when the value is absent.
35
+ The stored phone is E.164; the phone leaf's `country` (US/BR) selects the display mask, so the summary
36
+ matches the edit form's masking, and a number belonging to another country renders as stored rather
37
+ than being reformatted as a local one. Compose custom `children` to replace the default presentation —
38
+ the leaves then carry their own props. `SelectedSummary`'s own `country` and badge-label props apply to
39
+ the default composition only, and are not offered in the schema for that reason.
40
+ - **SignOutButton** — async/pessimistic: `data-fs-identity-summary-pending` is present while the
41
+ mutation is in flight, the button is disabled to prevent double-dispatch, and any returned
42
+ `userErrors` surface via `Error`. Renders composed `children` (e.g. an `Icon` + text) or `label`.
43
+ - **Summary/form swap** — `IdentityEditController` with its guards and triggers. The edit and cancel
44
+ buttons are `IdentityEditButton` and `IdentityEditCancelButton`; a leading icon composes as their children.
45
+ The controller moves only on those buttons — saving does not collapse the section — so neither this
46
+ compound nor `ClientProfileForm` learns anything about a section around it (ADR-0006).
47
+
48
+ ## The summary is composed, not fixed
49
+
50
+ `IdentitySummarySelectedSummary` is a **shortcut**: it renders the default order (badge, name, e-mail,
51
+ phone, document) so a page wanting exactly that composes one element. It is not the only way, and it
52
+ offers no props to the schema — configure the leaf, not the wrapper. Its `country` and badge-label props
53
+ reach the default composition only, so composing children silently replaces whatever they would have set.
54
+
55
+ Each line is its own component reading the same `IdentitySummaryRoot` context, so the order, the presence
56
+ and anything interleaved between them are the page's decision (ADR-0011):
57
+
58
+ | Leaf | Renders | Nothing when |
59
+ |---|---|---|
60
+ | `IdentitySummaryBadge` | the session-state badge | never |
61
+ | `IdentitySummaryName` | first + last name | the profile carries neither |
62
+ | `IdentitySummaryEmail` | the e-mail | absent |
63
+ | `IdentitySummaryPhone` | the phone, masked when the stored value belongs to `country` | absent |
64
+ | `IdentitySummaryDocument` | the tax document | absent |
65
+
66
+ ```
67
+ IdentitySummaryRoot
68
+ ├─ IdentitySummaryName // e-mail after the name, before it, or omitted:
69
+ ├─ IdentitySummaryEmail // that is composition, and no prop expresses it
70
+ └─ IdentitySummaryPhone country="BR"
71
+ ```
72
+
73
+ ## Data attributes
74
+
75
+ | Attribute | Element | When |
76
+ |---|---|---|
77
+ | `data-fs-identity-summary` | Root `<div>` | always (when not anonymous) |
78
+ | `data-fs-identity-summary-pending` | Root `<div>` and sign-out `<button>` | while logout is in flight |
79
+ | `data-fs-identity-summary-summary` | SelectedSummary `<div>` | always |
80
+ | `data-fs-identity-summary-badge` | `<Badge>` | wherever `IdentitySummaryBadge` is composed |
81
+ | `data-fs-identity-summary-state` | `<Badge>` | `identified` or `loggedIn` |
82
+ | `data-fs-identity-summary-name` | `<p>` | when name is present |
83
+ | `data-fs-identity-summary-email` | `<p>` | when email is present |
84
+ | `data-fs-identity-summary-phone` | `<p>` | when phone is present (masked only for its own country) |
85
+ | `data-fs-identity-summary-document` | `<p>` | when document is present |
86
+ | `data-fs-identity-summary-sign-out` | `<button>` | on the summary |
87
+ | `data-fs-identity-summary-error` | `<div role="alert">` | when logout returns user errors |
88
+ | `data-fs-identity-edit-button`, `data-fs-identity-edit-cancel-button` | edit / cancel `<button>` | provided by `IdentityEditButton` and `IdentityEditCancelButton` |
89
+
90
+ ## Requirements
91
+
92
+ - `Root` must be a descendant of `SessionRoot` (declares `requiresContext: 'session'`), and provides
93
+ `identity-summary`. `SelectedSummary`, `Badge`, `Name`, `Email`, `Phone`, `Document`, `SignOutButton`
94
+ and `Error` all require it — the compiler enforces the ancestor. The `IdentityEditController` and its
95
+ guards/triggers require only each other.
96
+ - Fragment ownership: `Root` reads only `clientProfile` (email, firstName, lastName, phone, document).
97
+ The edit surface is a separately-composed `ClientProfileForm`, which owns its own fragment and the
98
+ `identity.clientProfileUpdate` / `clientPreferencesUpdate` actions.
99
+ - Actions: `Root` declares only `session.logout`.
100
+
101
+ ## Do not
102
+
103
+ - Do not place two `ClientProfileForm`s for the same fields; the edit guard hosts the single one.
104
+ - Do not use this compound for an anonymous shopper; the Root renders nothing and has no anonymous fallback.
105
+ - Do not expect the section to close after a save — nothing here does that. Where a finished section
106
+ leads is left to the flow-of-steps RFC (#611).
@@ -0,0 +1,151 @@
1
+ # Incentives
2
+
3
+ **Category:** content
4
+ **Purpose:** The store's value propositions — free shipping, easy returns, secure checkout — rendered as a strip of items that each pair an icon with a title and up to two short lines of copy. An item may also carry a destination, which makes its whole block a link and lets the same component render a footer shortcut row. The content arrives through the compiler-injected `$content` prop, backed by the `incentives` content model declared next to the component; the `items` prop is the authored fallback for stores with no CMS binding. One element renders the whole strip.
5
+
6
+ ---
7
+
8
+ ## Visual cues (how to identify in an image)
9
+
10
+ The image is the source of truth for layout. An Incentives strip is present when you see:
11
+
12
+ - A **row of repeated blocks** — usually three to five, though nothing caps the count — each one an icon above or beside a **bold short title**, over zero, one, or two lighter lines of copy. A row of title-only blocks matches; the lines are supplementary.
13
+ - The copy is a **short label per block**, either a benefit (*Frete grátis*, *Compra segura*) or a destination (*Como comprar*, *Manuais*). Both are this component: an item's `href` is optional, so the same strip renders a reassurance band and a shortcut row.
14
+ - The icons are **line-art pictograms** (a truck, a shield, a gift box), not brand marks. A row of Visa/Mastercard logos is `PaymentMethods`; circular monochrome social glyphs are the social particle.
15
+ - **An unfamiliar pictogram does not rule this out.** Only five names are predefined — `truck`, `calendar`, `gift`, `store`, `shield-check` — and every other glyph arrives as an uploaded `iconUrl`. Uploads are a first-class channel the PRD requires, not a fallback, so a strip where four of five icons are custom is still `Incentives`.
16
+ - Usually a full-width band, often with a rule above or below it, near the top of the footer or directly under the header.
17
+ - On a narrow screen the blocks **wrap or scroll** rather than shrinking their copy.
18
+
19
+ ---
20
+
21
+ ## When to use
22
+
23
+ - The benefit or reassurance band in a footer, or the equivalent strip under a header.
24
+ - One instance per strip. Every block in the row is one item of this component's content, not its own element.
25
+
26
+ ## When NOT to use
27
+
28
+ - A row of **payment brand flags** (Visa, Pix, Boleto) → use `PaymentMethods`; those items are bare brand marks with no copy beneath them.
29
+ - A row of **social network icons** → use the social particle; different content model and different glyph set.
30
+ - **Institutional link columns** (*Sobre nós*, *Trabalhe conosco*) → use `FooterLinkGroup`. Both components can link, so the split is the shape: text links under a heading, collapsing to an accordion on mobile, is `FooterLinkGroup`; a glyph above each label with no heading is this. `FooterLinkGroup` renders no per-item icon, so an icon-and-label row belongs here even when every label is a destination.
31
+ - A **single promotional message or banner** → use `Promotion`; one message, not a repeated set.
32
+ - A **product's shipping estimate or a cart's free-shipping progress bar** → those read commerce data for one shopper. This strip is store-level configuration.
33
+
34
+ ---
35
+
36
+ ## Composition
37
+
38
+ `Incentives` is a leaf in the schema — it has no sub-components and takes no children. The items come from content, not from child elements.
39
+
40
+ ```
41
+ FooterRoot
42
+ ├─ Incentives ← the benefit strip
43
+ ├─ FooterLinkGroup ← "Ajuda" (siblings; order is visual order)
44
+ ├─ FooterLinkGroup ← "Institucional"
45
+ ├─ PaymentMethods
46
+ └─ FooterCopyright
47
+ ```
48
+
49
+ **Content, then prop, whole list.** The list resolves from the CMS entry first and the `items` prop second. It is replaced whole rather than merged — an entry supplying an empty list wins over an authored list, because a merchant who cleared the items cleared them, and index alignment would be meaningless once they reorder. When no item survives the filter below, the component renders `null` (self-hide) and the footer omits the strip. Non-compiler hosts (Storybook, tests) pass a typed `$content` fixture directly.
50
+
51
+ **`items` is optional in the model, so a half-filled entry still renders.** Only `title` is required per item, which keeps the blast radius of one under-filled item as small as possible: a nested required property is validated at read time and a violation omits the *whole strip*, not the one item. An item may legally carry a title alone.
52
+
53
+ **What the component drops is per item, never the whole strip.** An item is skipped when its title is blank — an icon with no label is not an incentive. A blank or absent description line costs only that line, because the title is the item's identity and a line is supplementary.
54
+
55
+ **A refused destination costs the anchor and nothing else.** No read-time gate enforces the model's `pattern`, so an authored `javascript:` value reaches the component intact; the same render-time allowlist `FooterLinkGroup` and the social particle use — `http:`, `https:`, `mailto:`, `tel:`, and single-slash paths — is what stands between it and an `href`. Where those two drop the entry, this one renders the item unlinked with its glyph and copy intact, because an unlinked item is this component's ordinary shape and losing a benefit over a bad destination would be the larger failure. The refusal logs the item's index and the reason, never the authored value.
56
+
57
+ **Every predefined name must be registered.** An `icon` resolves to a sprite symbol the store's build has to include; the store's `global.json` writes the names out under `icons.include` — it is JSON, so it cannot import `INCENTIVE_ICON_NAMES`, and a test that derives the expected set from the exported constant is what keeps the two in step. A name the store never registered renders an empty `<svg>` — no build error and no runtime error, just a missing pictogram. All five names resolve in the default collection; a store on a different collection maps them with `icons.aliases`.
58
+
59
+ ---
60
+
61
+ ## Components
62
+
63
+ ### Incentives
64
+
65
+ | Prop | Type | Required | Notes |
66
+ |-------|------|----------|-------|
67
+ | `items` | array | no | Authored fallback list of `{ title, firstLineText?, secondLineText?, href?, icon?, iconUrl?, alt? }`. Ignored when a CMS entry supplies `items` |
68
+
69
+ Content model (`incentives`) fields, edited in the CMS:
70
+
71
+ | Field | Type | Required | Notes |
72
+ |-------|------|----------|-------|
73
+ | `items` | array | no | Ordered benefit blocks. Adding, removing, and reordering here changes the strip with no deployment. Optional so an entry without it falls back to the authored list. Declares `minItems: 1` and no ceiling — Admin-form guidance only, unenforced on the read path, so an empty list still reaches the component and self-hides there |
74
+ | `items[].title` | string | yes | The benefit's short bold label. The only required field per item; a blank one drops that item |
75
+ | `items[].firstLineText` | string | no | The first line of supporting copy. Optional, so a title-only item is legal; a blank one renders no line |
76
+ | `items[].secondLineText` | string | no | The second line. Absent or blank renders no element, so an item shows zero, one, or two lines |
77
+ | `items[].href` | string | no | The block's destination. Optional, because a benefit strip links nowhere and a shortcut row links everywhere. Wraps the whole block — glyph included — in a same-tab link. Absent or blank renders the item unlinked; a value the render-time allowlist refuses also renders it unlinked, keeping the glyph and copy |
78
+ | `items[].icon` | enum | no | One of `truck`, `calendar`, `gift`, `store`, `shield-check`. Renders the collection glyph, decorative |
79
+ | `items[].iconUrl` | string | no | An uploaded image, for a benefit the predefined set has no glyph for. Wins over `icon` when both are set |
80
+ | `items[].alt` | string | no | Alt text for an uploaded image. Defaults to empty, keeping the image decorative — the visible title beside it is already the item's accessible content, so repeating it would announce the same words twice |
81
+
82
+ ---
83
+
84
+ ## Canonical schema example
85
+
86
+ ```json
87
+ {
88
+ "footer-incentives": {
89
+ "type": "Incentives",
90
+ "style": ["flex", "flex-wrap", "gap-[32px]", "list-none", "p-0", "m-0"]
91
+ }
92
+ }
93
+ ```
94
+
95
+ The element id is the content key, so name it for the section rather than its styling. Renaming it orphans the merchant's entry: the items stay in the Content Platform while the component reads a key nobody writes.
96
+
97
+ ---
98
+
99
+ ## Common mistakes
100
+
101
+ - **`IncentivesStrip`, `Benefits`, `BenefitsBar`, `ValueProps`, `USPBar`.** The correct name is `Incentives`.
102
+ - **One element per benefit.** One element renders the whole strip; each block is an item in its content.
103
+ - **Giving it children.** It is a leaf; the blocks are content, which is what makes adding one a CMS save instead of a deployment.
104
+ - **Expecting a `variant` or `colored` prop.** Legacy carried `horizontal`/`vertical` and `colored` as props; both are the swatch's job now. Nothing about this component's appearance travels through a prop.
105
+ - **Expecting a fixed three-slot grid.** Legacy hardcoded three. The count is content here, so style the strip to lay out at whatever count the merchant configures — the model declares no ceiling, and no read-time gate would enforce one if it did.
106
+ - **Passing it over because the strip's pictograms are not in the enum.** The five predefined names are carried over from legacy verbatim, not a vocabulary chosen to cover every strip, so most real strips need at least one upload. Reaching for `Container` + `Icon` + `Text` instead trades one CMS-editable element for three schema elements per block.
107
+ - **Setting `iconUrl` and `icon` and expecting the glyph.** The upload wins; drop `iconUrl` to get the collection glyph back.
108
+ - **Copying the title into `alt`.** The title is already visible beside the image; a screen reader would announce it twice. Leave `alt` empty unless the image says something the title does not.
109
+ - **Shipping without the layout swatch.** The strip ships unstyled, so without one the items stack vertically with list markers and the glyphs sit at 24×24.
110
+
111
+ ---
112
+
113
+ ## Styling
114
+
115
+ `Incentives` renders one root you style directly, plus per-part hooks. The glyph hook covers both the `<svg>` and the `<img>` path, which is what makes a mixed strip line up.
116
+
117
+ Size and box classes reach both paths, but **colour does not**. A predefined glyph is an inline `<svg>` that inherits `currentColor`, while an upload is an `<img>` rendering an external document that cannot see the page's colour at all. So in a strip mixing the two, a `text-*` class on the glyph hook tints only the sprite icons and the uploads stay whatever colour their file declares — bake the colour into the uploaded SVG rather than trying to style it from here.
118
+
119
+ | Component | What you style | Plausible classes |
120
+ |---|---|---|
121
+ | `Incentives` | The strip itself, wrapping on narrow screens | `flex flex-wrap gap-[32px] list-none p-0 m-0` |
122
+ | `data-fs-incentive` | The block one benefit occupies | `flex flex-col items-center text-center gap-[4px] flex-1` |
123
+ | `data-fs-incentive-link` | The anchor wrapping a linked block; absent on unlinked items, so style the layout on `data-fs-incentive` and only the link affordances here | `flex flex-col items-center gap-[4px] no-underline hover:text-brand` |
124
+ | `data-fs-incentive-icon` | Both glyph paths, sized to match | `w-[32px] h-[32px] object-contain` |
125
+ | `data-fs-incentive-title` | The bold benefit label | `text-[14px] font-bold text-[#1a1a1a]` |
126
+ | `data-fs-incentive-description` | Each supporting line | `text-[12px] text-[#616161]` |
127
+
128
+ The root carries an explicit `role="list"`. Keep it: WebKit drops the implicit list role from a `<ul>` whose computed `list-style` is `none`, and `list-none` is exactly what the strip needs, so the attribute is what holds the semantics the list was chosen for.
129
+
130
+ Styled example:
131
+
132
+ ```json
133
+ {
134
+ "footer-incentives": {
135
+ "type": "Incentives",
136
+ "style": ["flex", "flex-wrap", "gap-[32px]", "list-none", "p-0", "m-0"]
137
+ }
138
+ }
139
+ ```
140
+
141
+ ---
142
+
143
+ ## Related
144
+
145
+ - [[footer-root]] — the `<footer>` landmark the strip usually sits inside.
146
+ - [[payment-methods]] — the brand flag strip below it; same `$content` mechanics, bare marks instead of icon-and-copy blocks.
147
+ - [[footer-link-group]] — the headed link columns beside it; same `$content` mechanics, text links instead of glyphs.
148
+ - [[footer-copyright]] — the legal line below it; same `$content` mechanics, plain text.
149
+ - [[promotion]] — a single CMS-driven message, where this renders a repeated set.
150
+ - `Icon` — the particle each predefined benefit renders. It carries no `.md` of its own; read its schema from `catalog.json`.
151
+ - `Image` — the particle an uploaded icon renders. It carries no `.md` of its own; read its schema from `catalog.json`.
@@ -0,0 +1,135 @@
1
+ # Logo
2
+
3
+ **Category:** content
4
+ **Purpose:** Brand logo image that links to the configured home destination.
5
+
6
+ ---
7
+
8
+ ## Visual cues (how to identify in an image)
9
+
10
+ - A brand mark or wordmark image, usually the store's name or symbol.
11
+ - Rendered as a single clickable image; clicking it navigates home.
12
+ - Typically small and sized to fit a header row.
13
+
14
+ The image is the source of truth for layout.
15
+
16
+ ## When to use
17
+
18
+ - To display the store's brand logo as a link back to the configured home.
19
+
20
+ ## When NOT to use
21
+
22
+ - For a generic, non-branded, or non-linking image → use [[image]].
23
+ - For a text-only site title with no asset → use [[text]] inside a [[navigation-link]].
24
+
25
+ ---
26
+
27
+ ## Composition
28
+
29
+ `Logo` is a leaf element in the PageSchema — it owns its internal composition (a navigation link wrapping an image) and takes no children.
30
+
31
+ ```text
32
+ Logo
33
+ ```
34
+
35
+ ## Components
36
+
37
+ ### Logo
38
+
39
+ | Prop | Type | Default | Notes |
40
+ |------|------|---------|-------|
41
+ | `src` | string | — | Brand logo asset URL. Optional, so an element can be authored from the CMS alone. |
42
+ | `alt` | string | — | Accessible alt text for the logo image. Optional for the same reason. |
43
+ | `href` | string | `/` | Navigation destination (configured home). |
44
+ | `loading` | `'lazy' \| 'eager'` | `'eager'` | Set `lazy` below the fold; the default suits the header. |
45
+
46
+ Content model (`logo`) fields, edited in the CMS:
47
+
48
+ | Field | Type | Required | Notes |
49
+ |-------|------|----------|-------|
50
+ | `src` | string | no | Picked via the media gallery widget. Cleared or absent keeps the authored `src` |
51
+ | `alt` | string | yes | Accessible alt text |
52
+ | `href` | string | no | Cleared or absent keeps the authored `href` |
53
+
54
+ **Props and content both work.** The props stay the authoring surface, and a CMS entry overrides them field by field, so a merchant can swap the brand mark for a campaign without a deploy. A store with no CMS binding receives no `$content` and renders from the props alone. The `logo` model puts no `format` on `src`, because a store's logo is usually a root-relative path served from `public/` (`/logo.svg`), which JSON Schema's `uri` format rejects. `href` carries `uri-reference` and the same destination pattern the link-bearing footer models declare, which admits a root-relative path.
55
+
56
+ **Nothing renders without a resolved `src` and `alt`.** Both props are optional and only `alt` is required in the model, so an element can author nothing and take everything from the CMS. Presence is enforced once, at render, on the resolved values: an unconfigured logo renders no element at all rather than a broken image. An optional field that arrives blank reads as unauthored and falls through to the prop; a blank `alt` renders nothing, since an unnamed link is worse than no link.
57
+
58
+ **A destination that is not a plain web address is dropped.** The resolved `href` is checked at render, and only `http:`, `https:`, `mailto:`, `tel:`, and single-slash site-relative paths are kept. Anything else — a `javascript:` URL, a protocol-relative `//host`, a scheme-less relative path — renders the image with no link around it and logs the reason. No read-time validator enforces a URL pattern, so this is the only gate on a destination the CMS supplied.
59
+
60
+ ---
61
+
62
+ ## Canonical schema example
63
+
64
+ ```json
65
+ {
66
+ "header-logo": {
67
+ "type": "Logo",
68
+ "props": {
69
+ "src": "https://store.example/logo.svg",
70
+ "alt": "Acme Store",
71
+ "href": "/"
72
+ },
73
+ "style": ["$logo"]
74
+ }
75
+ }
76
+ ```
77
+
78
+ Bound to a CMS entry, the element authors no content props at all — the entry supplies `src`, `alt`, and `href`, and an unconfigured store renders nothing rather than a placeholder. Below the fold, author `loading`:
79
+
80
+ ```json
81
+ {
82
+ "footer-logo": {
83
+ "type": "Logo",
84
+ "props": {
85
+ "loading": "lazy"
86
+ },
87
+ "style": ["$logo"]
88
+ }
89
+ }
90
+ ```
91
+
92
+ ## Common mistakes
93
+
94
+ - **Wrapping `Logo` in a `NavigationLink`.** `Logo` already composes its own navigation link; nesting it in another link is invalid.
95
+ - **Authoring `$content` in the schema.** `$content` is compiler-injected from the page's or layout's content entry; naming it in `props` fails the build.
96
+ - **Authoring a placeholder `src` as a fallback.** An unconfigured store then renders the developer's logo instead of no logo, and the self-hide can never trip. Author nothing and let the CMS supply it.
97
+ - **Omitting `alt` in a store with no CMS.** The prop is optional so a CMS-only element can exist, but nothing renders without a resolved `alt` — a silent blank, not a type error.
98
+ - **Leaving `loading` at its default below the fold.** A footer logo authored without `loading="lazy"` is fetched during the initial page load on every page.
99
+ - **Using `Image` for the brand mark.** Prefer `Logo` so the link and the alt-text gate come for free.
100
+
101
+ ---
102
+
103
+ ## Styling
104
+
105
+ | Component | What you style | Plausible classes |
106
+ |---|---|---|
107
+ | `Logo` | Sizes the brand mark; the `data-fs-logo` root drives dimensions and `data-fs-logo-image` reaches the image itself | `w-[140px] md:w-[220px]` |
108
+
109
+ ```json
110
+ {
111
+ "header-logo": {
112
+ "type": "Logo",
113
+ "props": { "src": "https://store.example/logo.svg", "alt": "Acme Store", "href": "/" },
114
+ "style": ["w-[140px]", "md:w-[220px]"]
115
+ }
116
+ }
117
+ ```
118
+
119
+ The image carries no size of its own, so the width above only constrains the mark once the store tells it
120
+ to fill the wrapper. Author that once per store as the `Logo` base swatch in `global.json → styles`:
121
+
122
+ ```json
123
+ {
124
+ "Logo": {
125
+ "base": ["[&_[data-fs-logo-image]]:w-full", "[&_[data-fs-logo-image]]:h-auto"]
126
+ }
127
+ }
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Related
133
+
134
+ - [[image]] — the inert asset renderer `Logo` composes; use directly for non-branded images.
135
+ - [[navigation-link]] — the client-side link `Logo` composes; use directly for text or custom link content.
@@ -0,0 +1,67 @@
1
+ # Meter
2
+
3
+ **Category:** content
4
+ **Purpose:** Determinate meter primitive — renders a scalar value along a known range (ARIA `role="meter"`). Reusable and business-agnostic: use it for any progress-toward-a-goal indicator (free-shipping progress, loyalty tiers, storage/quota, upload). Wraps Base UI's `Meter`, which owns the ARIA (`aria-valuenow/min/max`, `aria-valuetext`) and sizes the indicator to the value.
5
+
6
+ ---
7
+
8
+ ## Visual cues (how to identify in an image)
9
+
10
+ A Meter is present when you see a **horizontal bar partially filled** to represent a fixed value within a range (as opposed to an indeterminate spinner):
11
+
12
+ - A track with a colored fill that stops at some point along its length.
13
+ - Often paired with a label and/or a value read-out (e.g. "27%", "R$ 270 / R$ 999").
14
+
15
+ Use `Meter` for determinate values. For indeterminate loading, use `Spinner`.
16
+
17
+ ---
18
+
19
+ ## When to use
20
+
21
+ - A determinate value along a known min/max (progress toward a goal, a percentage, a quota).
22
+ - Any bar that should expose `role="meter"` and an accessible value to screen readers.
23
+
24
+ ## When NOT to use
25
+
26
+ - Indeterminate loading — use `Spinner`.
27
+ - A slider the user can drag — use a form range input, not a meter.
28
+
29
+ ---
30
+
31
+ ## Composition
32
+
33
+ `MeterRoot` owns `value`/`min`/`max` and the ARIA. Wrap a `MeterTrack` containing a `MeterIndicator`; optionally add a `MeterLabel` and `MeterValue`.
34
+
35
+ ```
36
+ MeterRoot (value, min=0, max=100)
37
+ ├── MeterLabel (optional accessible label)
38
+ ├── MeterValue (optional value read-out)
39
+ └── MeterTrack
40
+ └── MeterIndicator (Base UI sizes it to the value)
41
+ ```
42
+
43
+ ### Key parts
44
+
45
+ | Component | Props | Notes |
46
+ |---|---|---|
47
+ | `MeterRoot` | `value`, `min?`, `max?`, `locale?`, `getAriaValueText?` | `role="meter"`; owns the ARIA. `getAriaValueText` overrides the spoken value text |
48
+ | `MeterTrack` | — | The full-range groove |
49
+ | `MeterIndicator` | — | The filled portion; Base UI sets its size inline |
50
+ | `MeterLabel` | — | Accessible label text |
51
+ | `MeterValue` | `children?: (formatted, value) => ReactNode` | Value read-out; render-function child |
52
+
53
+ Style via `data-fs-meter-root`, `data-fs-meter-track`, `data-fs-meter-indicator`, `data-fs-meter-label`, `data-fs-meter-value`.
54
+
55
+ ---
56
+
57
+ ## Schema
58
+
59
+ ```json
60
+ {
61
+ "type": "MeterRoot",
62
+ "props": { "value": 27, "min": 0, "max": 100 },
63
+ "children": [
64
+ { "type": "MeterTrack", "children": [{ "type": "MeterIndicator" }] }
65
+ ]
66
+ }
67
+ ```