@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 @@
1
+ {"version":3,"file":"gallery.js","names":[],"sources":["../../../src/particles/gallery/gallery.tsx"],"sourcesContent":["'use client';\n\nimport { defineComponent } from '@vtex/fs-core';\nimport {\n type ComponentPropsWithRef,\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n DialogBackdrop,\n DialogClose,\n DialogPopup,\n DialogPortal,\n DialogRoot,\n DialogTitle,\n DialogViewport,\n} from '../dialog/dialog.js';\n\nexport type GalleryMediaType = 'image' | 'video';\n\nexport type GalleryMediaItem = {\n type: GalleryMediaType;\n url: string;\n altText: string;\n previewImageUrl?: string;\n};\n\nexport type GalleryContextValue = {\n media: GalleryMediaItem[];\n selectedIndex: number;\n setSelectedIndex: (index: number) => void;\n fullscreenOpen: boolean;\n openFullscreen: () => void;\n closeFullscreen: () => void;\n selectOnHover: boolean;\n thumbnailOpensFullscreen: boolean;\n zoomActive: boolean;\n setZoomActive: (active: boolean) => void;\n zoomPosition: { x: number; y: number };\n setZoomPosition: (pos: { x: number; y: number }) => void;\n magnification: number;\n lensSize: number;\n setZoomConfig: (config: { magnification: number; lensSize: number }) => void;\n zoomContainerSize: { width: number; height: number };\n setZoomContainerSize: (size: { width: number; height: number }) => void;\n thumbnailOffset: number;\n setThumbnailOffset: (offset: number) => void;\n thumbnailsWindowSize: number;\n setThumbnailsWindowSize: (size: number) => void;\n};\n\nexport type GalleryItemContextValue = {\n item: GalleryMediaItem;\n index: number;\n isOverflow: boolean;\n overflowCount: number;\n};\n\nexport type GalleryRootProps = ComponentPropsWithRef<'div'> & {\n media?: GalleryMediaItem[];\n defaultIndex?: number;\n selectOnHover?: boolean;\n thumbnailOpensFullscreen?: boolean;\n};\n\nexport type GalleryMainMediaProps = ComponentPropsWithRef<'div'> & {\n objectFit?: 'contain' | 'cover' | 'fill' | 'none';\n aspectRatio?: string;\n videoAutoPlay?: boolean;\n videoControls?: boolean;\n clickOpensFullscreen?: boolean;\n};\n\nexport type GalleryThumbnailsProps = ComponentPropsWithRef<'div'> & {\n maxVisible?: number;\n slider?: boolean;\n animated?: boolean;\n direction?: 'horizontal' | 'vertical';\n hideWhenSingle?: boolean;\n children?: ReactNode;\n};\n\nexport type GalleryThumbnailsPreviousProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n step?: number;\n};\n\nexport type GalleryThumbnailsNextProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n step?: number;\n};\n\nexport type GalleryThumbnailProps = ComponentPropsWithRef<'button'> & {\n objectFit?: 'contain' | 'cover' | 'fill' | 'none';\n aspectRatio?: string;\n};\n\nexport type GalleryOverflowCountProps = ComponentPropsWithRef<'button'> & {\n template?: string;\n ariaLabel?: string;\n};\n\nexport type GalleryMediaProps = ComponentPropsWithRef<'div'> & {\n objectFit?: 'contain' | 'cover' | 'fill' | 'none';\n aspectRatio?: string;\n videoAutoPlay?: boolean;\n videoControls?: boolean;\n clickOpensFullscreen?: boolean;\n};\n\nexport type GalleryZoomProps = ComponentPropsWithRef<'div'> & {\n magnification?: number;\n lensSize?: number;\n};\n\nexport type GalleryZoomLensProps = ComponentPropsWithRef<'div'>;\n\nexport type GalleryZoomResultProps = ComponentPropsWithRef<'div'>;\n\nexport type GalleryFullscreenProps = ComponentPropsWithRef<'div'> & {\n children?: ReactNode;\n};\n\nexport type GalleryFullscreenTitleProps = ComponentPropsWithRef<'h2'>;\n\nexport type GalleryFullscreenCloseProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n};\n\nexport type GalleryPreviousProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n wrap?: boolean;\n};\n\nexport type GalleryNextProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n wrap?: boolean;\n};\n\nexport type GalleryMediaCountProps = ComponentPropsWithRef<'span'> & {\n template?: string;\n};\n\nconst GalleryContext = createContext<GalleryContextValue | null>(null);\n\nexport const GalleryItemContext = createContext<GalleryItemContextValue | null>(null);\n\ntype FullscreenTitleRegistry = { register: () => void };\n\nconst FullscreenTitleRegistryContext = createContext<FullscreenTitleRegistry | null>(null);\n\nexport function useGallery(): GalleryContextValue {\n const ctx = useContext(GalleryContext);\n if (!ctx) throw new Error('Gallery components must be used inside GalleryRoot.');\n return ctx;\n}\n\nexport function useGalleryItem(): GalleryItemContextValue {\n const ctx = useContext(GalleryItemContext);\n if (!ctx) throw new Error('GalleryThumbnail and GalleryOverflowCount must be used inside GalleryThumbnails.');\n return ctx;\n}\n\nconst GALLERY_DOC = './gallery.md';\n\nexport const GalleryRootDefinition = defineComponent<GalleryRootProps>({\n name: 'GalleryRoot',\n importPath: '@vtex/faststore/components',\n component: GalleryRoot,\n editor: { label: 'Gallery Root', category: 'content' },\n schema: {\n defaultIndex: { type: 'number', default: 0, label: 'Default Index' },\n selectOnHover: { type: 'boolean', default: false, label: 'Select on Hover' },\n thumbnailOpensFullscreen: { type: 'boolean', default: false, label: 'Thumbnail Opens Fullscreen' },\n },\n guideline:\n 'Root of the gallery. Manages selected media index, fullscreen state, and zoom state. Compose as: GalleryRoot > (GalleryMainMedia (or GalleryZoom > (GalleryMainMedia + GalleryZoomLens + GalleryZoomResult)) + GalleryThumbnails > [GalleryThumbnail + GalleryOverflowCount] + GalleryFullscreen > [GalleryFullscreenClose + GalleryPrevious + GalleryMainMedia + GalleryNext + GalleryThumbnails]). Set selectOnHover=true for hover-to-preview; thumbnailOpensFullscreen=true to open fullscreen on thumbnail click.',\n});\n\nexport const GalleryMainMediaDefinition = defineComponent<GalleryMainMediaProps>({\n name: 'GalleryMainMedia',\n importPath: '@vtex/faststore/components',\n component: GalleryMainMedia,\n editor: { label: 'Gallery Main Media', category: 'content' },\n schema: {\n objectFit: { type: ['contain', 'cover', 'fill', 'none'] as const, default: 'contain', label: 'Object Fit' },\n aspectRatio: { type: 'string', default: '1 / 1', label: 'Aspect Ratio' },\n videoAutoPlay: { type: 'boolean', default: false, label: 'Video Auto Play' },\n videoControls: { type: 'boolean', default: true, label: 'Video Controls' },\n clickOpensFullscreen: { type: 'boolean', default: false, label: 'Click Opens Fullscreen' },\n },\n guideline:\n 'Renders the currently selected media item from GalleryRoot context: <img> for images, <video> for videos. Supports swipe gestures (50px threshold) to navigate. Set clickOpensFullscreen=true to open the fullscreen overlay on click. Must be inside GalleryRoot or GalleryZoom.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailsDefinition = defineComponent<GalleryThumbnailsProps>({\n name: 'GalleryThumbnails',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnails,\n editor: { label: 'Gallery Thumbnails', category: 'content' },\n schema: {\n maxVisible: { type: 'number', label: 'Max Visible' },\n slider: { type: 'boolean', default: false, label: 'Slider Mode' },\n animated: { type: 'boolean', default: false, label: 'Animated' },\n direction: { type: ['horizontal', 'vertical'] as const, default: 'horizontal', label: 'Direction' },\n hideWhenSingle: { type: 'boolean', default: true, label: 'Hide when single image' },\n },\n guideline:\n 'Iterates media items and renders its children once per item. Returns null when there are 0 or 1 media items unless hideWhenSingle={false}. Set maxVisible to cap visible thumbnails. Without slider: last slot gets isOverflow=true for GalleryOverflowCount. With slider=true: window driven by GalleryThumbnailsPrevious/Next. Add animated=true for smooth scroll — also set direction to match the flex axis of the container.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailsPreviousDefinition = defineComponent<GalleryThumbnailsPreviousProps>({\n name: 'GalleryThumbnailsPrevious',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnailsPrevious,\n editor: { label: 'Gallery Thumbnails Previous', category: 'content' },\n schema: {\n step: { type: 'number', default: 1, label: 'Step' },\n },\n guideline:\n 'Scrolls the thumbnail strip backward. Only active when GalleryThumbnails slider=true. Disabled at the first thumbnail. step=1 (default) moves one at a time; pass step equal to maxVisible to jump a full window. Place as sibling of GalleryThumbnails.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailsNextDefinition = defineComponent<GalleryThumbnailsNextProps>({\n name: 'GalleryThumbnailsNext',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnailsNext,\n editor: { label: 'Gallery Thumbnails Next', category: 'content' },\n schema: {\n step: { type: 'number', default: 1, label: 'Step' },\n },\n guideline:\n 'Scrolls the thumbnail strip forward. Only active when GalleryThumbnails slider=true. Disabled at the last visible thumbnail. step=1 (default) moves one at a time; pass step equal to maxVisible to jump a full window. Place as sibling of GalleryThumbnails.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailDefinition = defineComponent<GalleryThumbnailProps>({\n name: 'GalleryThumbnail',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnail,\n editor: { label: 'Gallery Thumbnail', category: 'content' },\n schema: {\n objectFit: { type: ['contain', 'cover', 'fill', 'none'] as const, default: 'contain', label: 'Object Fit' },\n aspectRatio: { type: 'string', default: '1 / 1', label: 'Aspect Ratio' },\n },\n guideline:\n 'Thumbnail button for a single media item. Reads from GalleryItemContext — must be inside GalleryThumbnails. Adds data-fs-gallery-thumbnail-selected=\"true\" when active. For videos, renders previewImageUrl as the thumbnail src.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryOverflowCountDefinition = defineComponent<GalleryOverflowCountProps>({\n name: 'GalleryOverflowCount',\n importPath: '@vtex/faststore/components',\n component: GalleryOverflowCount,\n editor: { label: 'Gallery Overflow Count', category: 'content' },\n schema: {\n template: { type: 'string', default: '+{count}', label: 'Template' },\n ariaLabel: { type: 'string', default: 'View all {total} images', label: 'Aria Label' },\n },\n guideline:\n 'Overflow indicator. Only renders when isOverflow=true in GalleryItemContext — place alongside GalleryThumbnail inside GalleryThumbnails. Clicking opens fullscreen. Use template=\"+{count}\" to customize the visible label. The rendered button carries an aria-label (default \"View all {total} images\") so screen readers announce the full action, not just the count.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryMediaDefinition = defineComponent<GalleryMediaProps>({\n name: 'GalleryMedia',\n importPath: '@vtex/faststore/components',\n component: GalleryMedia,\n editor: { label: 'Gallery Media', category: 'content' },\n schema: {\n objectFit: { type: ['contain', 'cover', 'fill', 'none'] as const, default: 'contain', label: 'Object Fit' },\n aspectRatio: { type: 'string', default: '1 / 1', label: 'Aspect Ratio' },\n videoAutoPlay: { type: 'boolean', default: false, label: 'Video Auto Play' },\n videoControls: { type: 'boolean', default: true, label: 'Video Controls' },\n clickOpensFullscreen: { type: 'boolean', default: false, label: 'Click Opens Fullscreen' },\n },\n guideline:\n 'Full-size media display for items inside GalleryThumbnails. Unlike GalleryThumbnail, renders as a div (not a button) — use for grid layouts and vertical fullscreen stacks. Set clickOpensFullscreen=true to select the item and open fullscreen on click. Must be inside GalleryThumbnails.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryZoomDefinition = defineComponent<GalleryZoomProps>({\n name: 'GalleryZoom',\n importPath: '@vtex/faststore/components',\n component: GalleryZoom,\n editor: { label: 'Gallery Zoom', category: 'content' },\n schema: {\n magnification: { type: 'number', default: 2, label: 'Magnification' },\n lensSize: { type: 'number', default: 150, label: 'Lens Size (px)' },\n },\n guideline:\n 'Zoom container. Wrap GalleryMainMedia inside it to activate zoom on pointer enter (images only, not videos). Place GalleryZoomLens as a sibling of GalleryMainMedia inside GalleryZoom for the cursor indicator. Place GalleryZoomResult anywhere in GalleryRoot — as a sibling of GalleryZoom (side-panel) or absolute inside GalleryZoom (on-image overlay). Set magnification to control zoom level (default 2).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryZoomLensDefinition = defineComponent<GalleryZoomLensProps>({\n name: 'GalleryZoomLens',\n importPath: '@vtex/faststore/components',\n component: GalleryZoomLens,\n editor: { label: 'Gallery Zoom Lens', category: 'content' },\n schema: {},\n guideline:\n 'Cursor focus indicator inside GalleryZoom. Only renders when zoom is active. Must be inside GalleryZoom. Style as absolute-positioned square — uses CSS custom properties --zoom-x, --zoom-y, --lens-size for positioning.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryZoomResultDefinition = defineComponent<GalleryZoomResultProps>({\n name: 'GalleryZoomResult',\n importPath: '@vtex/faststore/components',\n component: GalleryZoomResult,\n editor: { label: 'Gallery Zoom Result', category: 'content' },\n schema: {},\n guideline:\n 'Magnified view driven by cursor position from GalleryZoom context. Only renders when zoom is active on an image. Place as sibling of GalleryZoom for side-panel zoom, or absolute inside GalleryZoom for on-image zoom.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryFullscreenDefinition = defineComponent<GalleryFullscreenProps>({\n name: 'GalleryFullscreen',\n importPath: '@vtex/faststore/components',\n component: GalleryFullscreen,\n editor: { label: 'Gallery Fullscreen', category: 'content' },\n schema: {},\n guideline:\n 'Fullscreen overlay controlled by GalleryRoot state. Opens via GalleryOverflowCount, GalleryFullscreenTrigger, or thumbnailOpensFullscreen=true. Wraps a Dialog internally — place GalleryFullscreenClose, GalleryPrevious, GalleryMainMedia, GalleryNext, and optionally GalleryThumbnails as children. If no GalleryFullscreenTitle is composed, a default sr-only \"Gallery\" title is rendered automatically so the dialog always has an accessible name. Must be inside GalleryRoot.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryFullscreenTitleDefinition = defineComponent<GalleryFullscreenTitleProps>({\n name: 'GalleryFullscreenTitle',\n importPath: '@vtex/faststore/components',\n component: GalleryFullscreenTitle,\n editor: { label: 'Gallery Fullscreen Title', category: 'content' },\n schema: {},\n guideline:\n 'Accessible title for the fullscreen dialog. Required for screen readers. Use sr-only to hide it visually or omit the class to display it. Must be inside GalleryFullscreen.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryFullscreenCloseDefinition = defineComponent<GalleryFullscreenCloseProps>({\n name: 'GalleryFullscreenClose',\n importPath: '@vtex/faststore/components',\n component: GalleryFullscreenClose,\n editor: { label: 'Gallery Fullscreen Close', category: 'content' },\n schema: {},\n guideline:\n 'Closes the fullscreen overlay. Must be inside GalleryFullscreen. Place at the top-right corner. Accepts any children (Icon, text).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryPreviousDefinition = defineComponent<GalleryPreviousProps>({\n name: 'GalleryPrevious',\n importPath: '@vtex/faststore/components',\n component: GalleryPrevious,\n editor: { label: 'Gallery Previous', category: 'content' },\n schema: {\n wrap: { type: 'boolean', default: true, label: 'Wrap Around' },\n },\n guideline:\n 'Navigates to the previous media item; wraps to the last by default, or stops at the first with wrap={false}. Use inside GalleryFullscreen or inline for carousel controls. Accepts any children (Icon, text).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryNextDefinition = defineComponent<GalleryNextProps>({\n name: 'GalleryNext',\n importPath: '@vtex/faststore/components',\n component: GalleryNext,\n editor: { label: 'Gallery Next', category: 'content' },\n schema: {\n wrap: { type: 'boolean', default: true, label: 'Wrap Around' },\n },\n guideline:\n 'Navigates to the next media item; wraps to the first by default, or stops at the last with wrap={false}. Use inside GalleryFullscreen or inline for carousel controls. Accepts any children (Icon, text).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryMediaCountDefinition = defineComponent<GalleryMediaCountProps>({\n name: 'GalleryMediaCount',\n importPath: '@vtex/faststore/components',\n component: GalleryMediaCount,\n editor: { label: 'Gallery Media Count', category: 'content' },\n schema: {\n template: { type: 'string', default: '{current} / {total}', label: 'Template' },\n },\n guideline:\n 'Displays the current media position and total count (e.g. \"2 / 10\"). Use {current} and {total} placeholders in template. Place anywhere inside GalleryRoot — typically in GalleryFullscreen or above GalleryMainMedia.',\n docPath: GALLERY_DOC,\n});\n\nexport function GalleryRoot({\n media = [],\n defaultIndex = 0,\n selectOnHover = false,\n thumbnailOpensFullscreen = false,\n children,\n ...props\n}: GalleryRootProps) {\n const [selectedIndex, setSelectedIndex] = useState(defaultIndex);\n const [fullscreenOpen, setFullscreenOpen] = useState(false);\n const [zoomActive, setZoomActive] = useState(false);\n const [zoomPosition, setZoomPosition] = useState({ x: 0, y: 0 });\n const [zoomConfig, setZoomConfig] = useState({ magnification: 2, lensSize: 150 });\n const [zoomContainerSize, setZoomContainerSize] = useState({ width: 0, height: 0 });\n const [thumbnailOffset, setThumbnailOffset] = useState(0);\n const [thumbnailsWindowSize, setThumbnailsWindowSize] = useState(0);\n\n const openFullscreen = useCallback(() => setFullscreenOpen(true), []);\n const closeFullscreen = useCallback(() => setFullscreenOpen(false), []);\n\n const ctx = useMemo<GalleryContextValue>(\n () => ({\n media,\n selectedIndex,\n setSelectedIndex,\n fullscreenOpen,\n openFullscreen,\n closeFullscreen,\n selectOnHover,\n thumbnailOpensFullscreen,\n zoomActive,\n setZoomActive,\n zoomPosition,\n setZoomPosition,\n magnification: zoomConfig.magnification,\n lensSize: zoomConfig.lensSize,\n setZoomConfig,\n zoomContainerSize,\n setZoomContainerSize,\n thumbnailOffset,\n setThumbnailOffset,\n thumbnailsWindowSize,\n setThumbnailsWindowSize,\n }),\n [\n media,\n selectedIndex,\n fullscreenOpen,\n openFullscreen,\n closeFullscreen,\n selectOnHover,\n thumbnailOpensFullscreen,\n zoomActive,\n zoomPosition,\n zoomConfig,\n zoomContainerSize,\n thumbnailOffset,\n thumbnailsWindowSize,\n ],\n );\n\n return (\n <GalleryContext value={ctx}>\n <div {...props} data-fs-gallery=\"\">\n {children}\n </div>\n </GalleryContext>\n );\n}\n\nconst SWIPE_THRESHOLD = 50;\n\nexport function GalleryMainMedia({\n objectFit = 'contain',\n aspectRatio,\n videoAutoPlay = false,\n videoControls = true,\n clickOpensFullscreen = false,\n style,\n ...props\n}: GalleryMainMediaProps) {\n const { media, selectedIndex, setSelectedIndex, openFullscreen } = useGallery();\n const currentItem = media[selectedIndex] ?? media[0];\n const pointerStartX = useRef<number | null>(null);\n\n function handlePointerDown(e: React.PointerEvent) {\n pointerStartX.current = e.clientX;\n }\n\n function handlePointerUp(e: React.PointerEvent) {\n if (pointerStartX.current === null) return;\n const delta = e.clientX - pointerStartX.current;\n pointerStartX.current = null;\n\n if (Math.abs(delta) < SWIPE_THRESHOLD) {\n if (clickOpensFullscreen) openFullscreen();\n return;\n }\n if (media.length === 0) return;\n if (delta < 0) {\n setSelectedIndex(selectedIndex < media.length - 1 ? selectedIndex + 1 : 0);\n } else {\n setSelectedIndex(selectedIndex > 0 ? selectedIndex - 1 : media.length - 1);\n }\n }\n\n if (!currentItem) {\n return <div {...props} data-fs-gallery-main-media=\"\" />;\n }\n\n if (currentItem.type === 'video') {\n return (\n <div {...props} data-fs-gallery-main-media=\"\" data-fs-gallery-main-media-type=\"video\">\n <video\n src={currentItem.url}\n controls={videoControls}\n autoPlay={videoAutoPlay}\n poster={currentItem.previewImageUrl}\n style={{ objectFit, aspectRatio, ...style } as React.CSSProperties}\n >\n <track kind=\"captions\" />\n </video>\n </div>\n );\n }\n\n return (\n <div\n {...props}\n data-fs-gallery-main-media=\"\"\n data-fs-gallery-main-media-type=\"image\"\n onPointerDown={handlePointerDown}\n onPointerUp={handlePointerUp}\n style={{ touchAction: 'pan-y', ...style }}\n >\n <img\n src={currentItem.url}\n alt={currentItem.altText}\n style={{ display: 'block', width: '100%', objectFit, aspectRatio } as React.CSSProperties}\n draggable={false}\n />\n </div>\n );\n}\n\nexport function GalleryThumbnails({ hideWhenSingle = true, ...rest }: GalleryThumbnailsProps) {\n const { media } = useGallery();\n if (hideWhenSingle && media.length <= 1) return null;\n return <GalleryThumbnailsInner {...rest} />;\n}\n\nfunction GalleryThumbnailsInner({\n maxVisible,\n slider = false,\n animated = false,\n direction = 'horizontal',\n children,\n style,\n ...props\n}: Omit<GalleryThumbnailsProps, 'hideWhenSingle'>) {\n const { media, thumbnailOffset, setThumbnailsWindowSize } = useGallery();\n const trackRef = useRef<HTMLDivElement>(null);\n const [containerSize, setContainerSize] = useState<number | null>(null);\n\n useEffect(() => {\n if (slider && maxVisible != null) setThumbnailsWindowSize(maxVisible);\n }, [slider, maxVisible, setThumbnailsWindowSize]);\n\n // Measure the exact size needed to show maxVisible items so overflow:hidden clips correctly.\n // useLayoutEffect runs after DOM commit but before paint — no visual flash.\n useLayoutEffect(() => {\n if (!animated || !slider || maxVisible == null || !trackRef.current) return;\n const lastVisible = trackRef.current.children[maxVisible - 1] as HTMLElement | undefined;\n if (!lastVisible) return;\n const size =\n direction === 'horizontal'\n ? lastVisible.offsetLeft + lastVisible.offsetWidth\n : lastVisible.offsetTop + lastVisible.offsetHeight;\n setContainerSize(size);\n }, [animated, slider, maxVisible, direction]);\n\n useEffect(() => {\n if (!animated || !slider || !trackRef.current) return;\n const target = trackRef.current.children[thumbnailOffset] as HTMLElement | undefined;\n if (!target) return;\n trackRef.current.scrollTo({\n left: direction === 'horizontal' ? target.offsetLeft : 0,\n top: direction === 'vertical' ? target.offsetTop : 0,\n behavior: 'smooth',\n });\n }, [thumbnailOffset, animated, slider, direction]);\n\n const visibleItems = (() => {\n if (animated && slider) return media; // render all; scroll handles visibility\n if (maxVisible == null) return media;\n if (slider) return media.slice(thumbnailOffset, thumbnailOffset + maxVisible);\n // overflow mode: show first maxVisible items, last slot is overflow\n return media.slice(0, maxVisible);\n })();\n\n const containerStyle: React.CSSProperties =\n animated && slider\n ? {\n overflow: 'hidden',\n position: 'relative',\n ...(direction === 'horizontal' && containerSize != null ? { width: containerSize } : {}),\n ...(direction === 'vertical' && containerSize != null ? { height: containerSize } : {}),\n ...style,\n }\n : { ...style };\n\n return (\n <div {...props} ref={trackRef} style={containerStyle} data-fs-gallery-thumbnails=\"\">\n {visibleItems.map((item, slotIndex) => {\n const index = animated && slider ? slotIndex : slider ? thumbnailOffset + slotIndex : slotIndex;\n const isOverflow = !slider && maxVisible != null && media.length > maxVisible && slotIndex === maxVisible - 1;\n const overflowCount = isOverflow ? media.length - maxVisible + 1 : 0;\n\n return (\n <GalleryItemContext key={index} value={{ item, index, isOverflow, overflowCount }}>\n {children}\n </GalleryItemContext>\n );\n })}\n </div>\n );\n}\n\nexport function GalleryThumbnail({ objectFit = 'contain', aspectRatio, style, ...props }: GalleryThumbnailProps) {\n const { selectedIndex, setSelectedIndex, openFullscreen, selectOnHover, thumbnailOpensFullscreen } = useGallery();\n const { item, index, isOverflow } = useGalleryItem();\n\n const thumbSrc = item.type === 'video' ? (item.previewImageUrl ?? '') : item.url;\n\n function handleClick() {\n setSelectedIndex(index);\n if (thumbnailOpensFullscreen || isOverflow) openFullscreen();\n }\n\n function handlePointerEnter() {\n if (selectOnHover && !isOverflow) setSelectedIndex(index);\n }\n\n return (\n <button\n type=\"button\"\n onClick={handleClick}\n onPointerEnter={handlePointerEnter}\n data-fs-gallery-thumbnail=\"\"\n data-fs-gallery-thumbnail-selected={String(index === selectedIndex)}\n data-fs-gallery-thumbnail-type={item.type}\n {...props}\n >\n <img\n src={thumbSrc}\n alt={item.altText}\n style={\n { display: 'block', width: '100%', height: '100%', objectFit, aspectRatio, ...style } as React.CSSProperties\n }\n />\n </button>\n );\n}\n\nexport function GalleryOverflowCount({\n template = '+{count}',\n ariaLabel = 'View all {total} images',\n ...props\n}: GalleryOverflowCountProps) {\n const { media, openFullscreen } = useGallery();\n const { isOverflow, overflowCount } = useGalleryItem();\n\n if (!isOverflow) return null;\n\n const label = template.replace('{count}', String(overflowCount));\n const resolvedAriaLabel = ariaLabel.replace('{total}', String(media.length));\n\n return (\n <button\n type=\"button\"\n onClick={openFullscreen}\n aria-label={resolvedAriaLabel}\n data-fs-gallery-overflow-count=\"\"\n {...props}\n >\n {label}\n </button>\n );\n}\n\nexport function GalleryMedia({\n objectFit = 'contain',\n aspectRatio,\n videoAutoPlay = false,\n videoControls = true,\n clickOpensFullscreen = false,\n style,\n ...props\n}: GalleryMediaProps) {\n const { setSelectedIndex, openFullscreen } = useGallery();\n const { item, index } = useGalleryItem();\n\n function handleClick() {\n setSelectedIndex(index);\n openFullscreen();\n }\n\n function handleKeyDown(e: React.KeyboardEvent) {\n if (e.key === 'Enter' || e.key === ' ') handleClick();\n }\n\n const interactiveProps = clickOpensFullscreen\n ? { onClick: handleClick, onKeyDown: handleKeyDown, role: 'button' as const, tabIndex: 0 }\n : {};\n\n const wrapperStyle: React.CSSProperties = {\n ...style,\n ...(aspectRatio ? { aspectRatio, position: 'relative' } : {}),\n };\n const mediaStyle: React.CSSProperties = aspectRatio\n ? { position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit }\n : { display: 'block', width: '100%', height: '100%', objectFit };\n\n if (item.type === 'video') {\n return (\n <div\n {...props}\n {...interactiveProps}\n style={wrapperStyle}\n data-fs-gallery-media-item=\"\"\n data-fs-gallery-media-item-type=\"video\"\n >\n <video\n src={item.url}\n controls={videoControls}\n autoPlay={videoAutoPlay}\n poster={item.previewImageUrl}\n style={mediaStyle as React.CSSProperties}\n >\n <track kind=\"captions\" />\n </video>\n </div>\n );\n }\n\n return (\n <div\n {...props}\n {...interactiveProps}\n style={wrapperStyle}\n data-fs-gallery-media-item=\"\"\n data-fs-gallery-media-item-type=\"image\"\n >\n <img src={item.url} alt={item.altText} style={mediaStyle as React.CSSProperties} draggable={false} />\n </div>\n );\n}\n\nexport function GalleryZoom({ magnification = 2, lensSize = 150, children, ...props }: GalleryZoomProps) {\n const { media, selectedIndex, setZoomActive, setZoomPosition, setZoomConfig, setZoomContainerSize } = useGallery();\n const containerRef = useRef<HTMLDivElement>(null);\n const currentItem = media[selectedIndex];\n const isImage = currentItem?.type === 'image';\n\n function handlePointerMove(e: React.PointerEvent) {\n if (!containerRef.current || !isImage) return;\n const rect = containerRef.current.getBoundingClientRect();\n const x = (e.clientX - rect.left) / rect.width;\n const y = (e.clientY - rect.top) / rect.height;\n setZoomPosition({ x: Math.max(0, Math.min(1, x)), y: Math.max(0, Math.min(1, y)) });\n }\n\n function handlePointerEnter() {\n setZoomConfig({ magnification, lensSize });\n if (containerRef.current) {\n const rect = containerRef.current.getBoundingClientRect();\n setZoomContainerSize({ width: rect.width, height: rect.height });\n }\n if (isImage) setZoomActive(true);\n }\n\n function handlePointerLeave() {\n setZoomActive(false);\n }\n\n return (\n <div\n ref={containerRef}\n {...props}\n onPointerMove={handlePointerMove}\n onPointerEnter={handlePointerEnter}\n onPointerLeave={handlePointerLeave}\n data-fs-gallery-zoom=\"\"\n >\n {children}\n </div>\n );\n}\n\nexport function GalleryZoomLens({ style, ...props }: GalleryZoomLensProps) {\n const { zoomActive, zoomPosition, lensSize, zoomContainerSize } = useGallery();\n\n if (!zoomActive) return null;\n\n // Center the lens on the cursor, then clamp so the full square stays inside the container\n // (snaps at the edges instead of overflowing the image).\n const { width, height } = zoomContainerSize;\n const maxLeft = Math.max(0, width - lensSize);\n const maxTop = Math.max(0, height - lensSize);\n const left = width > 0 ? Math.min(Math.max(zoomPosition.x * width - lensSize / 2, 0), maxLeft) : 0;\n const top = height > 0 ? Math.min(Math.max(zoomPosition.y * height - lensSize / 2, 0), maxTop) : 0;\n\n const lensStyle: React.CSSProperties = {\n top,\n left,\n width: lensSize,\n height: lensSize,\n ...style,\n };\n\n return <div {...props} style={lensStyle} data-fs-gallery-zoom-lens=\"\" />;\n}\n\nexport function GalleryZoomResult({ style, ...props }: GalleryZoomResultProps) {\n const { media, selectedIndex, zoomActive, zoomPosition, magnification } = useGallery();\n const currentItem = media[selectedIndex];\n const isVisible = zoomActive && !!currentItem && currentItem.type === 'image';\n\n // Always renders to prevent layout shifts in flex/grid containers.\n // Returning null when inactive would change the container dimensions and\n // trigger pointerleave on GalleryZoom, causing a flicker loop.\n const resultStyle: React.CSSProperties = isVisible\n ? {\n backgroundImage: `url(${currentItem.url})`,\n backgroundSize: `${magnification * 100}%`,\n backgroundPosition: `${zoomPosition.x * 100}% ${zoomPosition.y * 100}%`,\n backgroundRepeat: 'no-repeat',\n ...style,\n }\n : { visibility: 'hidden', ...style };\n\n return <div {...props} style={resultStyle} data-fs-gallery-zoom-result=\"\" />;\n}\n\nexport function GalleryFullscreen({ children, ...props }: GalleryFullscreenProps) {\n const { fullscreenOpen, closeFullscreen } = useGallery();\n const [hasExplicitTitle, setHasExplicitTitle] = useState(false);\n const register = useCallback(() => setHasExplicitTitle(true), []);\n const registry = useMemo<FullscreenTitleRegistry>(() => ({ register }), [register]);\n\n return (\n <DialogRoot\n open={fullscreenOpen}\n onOpenChange={(open) => {\n if (!open) closeFullscreen();\n }}\n >\n <DialogPortal>\n <DialogBackdrop className=\"fixed inset-0 bg-black/80\" data-fs-gallery-fullscreen-backdrop=\"\" />\n <DialogViewport className=\"fixed inset-0 flex items-center justify-center\">\n <DialogPopup {...props} data-fs-gallery-fullscreen=\"\">\n <FullscreenTitleRegistryContext.Provider value={registry}>\n {!hasExplicitTitle && (\n <DialogTitle className=\"sr-only\" data-fs-gallery-fullscreen-title=\"\">\n Gallery\n </DialogTitle>\n )}\n {children}\n </FullscreenTitleRegistryContext.Provider>\n </DialogPopup>\n </DialogViewport>\n </DialogPortal>\n </DialogRoot>\n );\n}\n\nexport function GalleryFullscreenTitle({ children = 'Gallery', ...props }: GalleryFullscreenTitleProps) {\n const registry = useContext(FullscreenTitleRegistryContext);\n useLayoutEffect(() => {\n registry?.register();\n }, [registry]);\n return (\n <DialogTitle data-fs-gallery-fullscreen-title=\"\" {...props}>\n {children}\n </DialogTitle>\n );\n}\n\nexport function GalleryFullscreenClose({ children, ...props }: GalleryFullscreenCloseProps) {\n return (\n <DialogClose data-fs-gallery-fullscreen-close=\"\" {...props}>\n {children}\n </DialogClose>\n );\n}\n\nexport function GalleryPrevious({ children, wrap = true, ...props }: GalleryPreviousProps) {\n const { media, selectedIndex, setSelectedIndex } = useGallery();\n\n function handleClick() {\n if (media.length === 0) return;\n if (selectedIndex > 0) {\n setSelectedIndex(selectedIndex - 1);\n } else if (wrap) {\n setSelectedIndex(media.length - 1);\n }\n // wrap === false at index 0 → no-op\n }\n\n return (\n <button\n type=\"button\"\n disabled={media.length === 0 || (!wrap && selectedIndex === 0)}\n onClick={handleClick}\n data-fs-gallery-previous=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryNext({ children, wrap = true, ...props }: GalleryNextProps) {\n const { media, selectedIndex, setSelectedIndex } = useGallery();\n\n function handleClick() {\n if (media.length === 0) return;\n if (selectedIndex < media.length - 1) {\n setSelectedIndex(selectedIndex + 1);\n } else if (wrap) {\n setSelectedIndex(0);\n }\n // wrap === false at last index → no-op\n }\n\n return (\n <button\n type=\"button\"\n disabled={media.length === 0 || (!wrap && selectedIndex === media.length - 1)}\n onClick={handleClick}\n data-fs-gallery-next=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryThumbnailsPrevious({ step = 1, children, ...props }: GalleryThumbnailsPreviousProps) {\n const { thumbnailOffset, setThumbnailOffset } = useGallery();\n const isDisabled = thumbnailOffset === 0;\n return (\n <button\n type=\"button\"\n disabled={isDisabled}\n onClick={() => setThumbnailOffset(Math.max(0, thumbnailOffset - step))}\n data-fs-gallery-thumbnails-previous=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryThumbnailsNext({ step = 1, children, ...props }: GalleryThumbnailsNextProps) {\n const { media, thumbnailOffset, setThumbnailOffset, thumbnailsWindowSize } = useGallery();\n const isDisabled = thumbnailsWindowSize > 0 && thumbnailOffset + thumbnailsWindowSize >= media.length;\n const maxOffset = Math.max(0, media.length - thumbnailsWindowSize);\n\n return (\n <button\n type=\"button\"\n disabled={isDisabled}\n onClick={() => setThumbnailOffset(Math.min(maxOffset, thumbnailOffset + step))}\n data-fs-gallery-thumbnails-next=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryMediaCount({ template = '{current} / {total}', ...props }: GalleryMediaCountProps) {\n const { selectedIndex, media } = useGallery();\n const label = template.replace('{current}', String(selectedIndex + 1)).replace('{total}', String(media.length));\n\n return (\n <span data-fs-gallery-media-count=\"\" {...props}>\n {label}\n </span>\n );\n}\n\nexport const Gallery = {\n Root: GalleryRoot,\n MainMedia: GalleryMainMedia,\n Media: GalleryMedia,\n Thumbnails: GalleryThumbnails,\n ThumbnailsPrevious: GalleryThumbnailsPrevious,\n ThumbnailsNext: GalleryThumbnailsNext,\n Thumbnail: GalleryThumbnail,\n OverflowCount: GalleryOverflowCount,\n Zoom: GalleryZoom,\n ZoomLens: GalleryZoomLens,\n ZoomResult: GalleryZoomResult,\n Fullscreen: GalleryFullscreen,\n FullscreenTitle: GalleryFullscreenTitle,\n FullscreenClose: GalleryFullscreenClose,\n Previous: GalleryPrevious,\n Next: GalleryNext,\n MediaCount: GalleryMediaCount,\n};\n"],"mappings":";;;;;;;AAsJA,MAAM,iBAAiB,cAA0C,IAAI;AAErE,MAAa,qBAAqB,cAA8C,IAAI;AAIpF,MAAM,iCAAiC,cAA8C,IAAI;AAEzF,SAAgB,aAAkC;CAChD,MAAM,MAAM,WAAW,cAAc;CACrC,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,qDAAqD;CAC/E,OAAO;AACT;AAEA,SAAgB,iBAA0C;CACxD,MAAM,MAAM,WAAW,kBAAkB;CACzC,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,kFAAkF;CAC5G,OAAO;AACT;AAEA,MAAM,cAAc;AAEpB,MAAa,wBAAwB,gBAAkC;CACrE,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAgB,UAAU;CAAU;CACrD,QAAQ;EACN,cAAc;GAAE,MAAM;GAAU,SAAS;GAAG,OAAO;EAAgB;EACnE,eAAe;GAAE,MAAM;GAAW,SAAS;GAAO,OAAO;EAAkB;EAC3E,0BAA0B;GAAE,MAAM;GAAW,SAAS;GAAO,OAAO;EAA6B;CACnG;CACA,WACE;AACJ,CAAC;AAED,MAAa,6BAA6B,gBAAuC;CAC/E,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAsB,UAAU;CAAU;CAC3D,QAAQ;EACN,WAAW;GAAE,MAAM;IAAC;IAAW;IAAS;IAAQ;GAAM;GAAY,SAAS;GAAW,OAAO;EAAa;EAC1G,aAAa;GAAE,MAAM;GAAU,SAAS;GAAS,OAAO;EAAe;EACvE,eAAe;GAAE,MAAM;GAAW,SAAS;GAAO,OAAO;EAAkB;EAC3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EjE,OACE,oBAAC,UAAD;EACE,MAAK;EACL,UAAU;EACV,eAAe,mBAAmB,KAAK,IAAI,WAAW,kBAAkB,IAAI,CAAC;EAC7E,mCAAgC;EAChC,GAAI;EAEH;CACK,CAAA;AAEZ;AAEA,SAAgB,kBAAkB,EAAE,WAAW,uBAAuB,GAAG,SAAiC;CACxG,MAAM,EAAE,eAAe,UAAU,WAAW;CAC5C,MAAM,QAAQ,SAAS,QAAQ,aAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,QAAQ,WAAW,OAAO,MAAM,MAAM,CAAC;CAE9G,OACE,oBAAC,QAAD;EAAM,+BAA4B;EAAG,GAAI;EACtC,UAAA;CACG,CAAA;AAEV;AAEA,MAAa,UAAU;CACrB,MAAM;CACN,WAAW;CACX,OAAO;CACP,YAAY;CACZ,oBAAoB;CACpB,gBAAgB;CAChB,WAAW;CACX,eAAe;CACf,MAAM;CACN,UAAU;CACV,YAAY;CACZ,YAAY;CACZ,iBAAiB;CACjB,iBAAiB;CACjB,UAAU;CACV,MAAM;CACN,YAAY;AACd"}
@@ -0,0 +1,21 @@
1
+ import { ComponentDefinition } from "../../core/dist/define-component.js";
2
+ import "../../core/dist/index.js";
3
+ import { ComponentPropsWithRef } from "react";
4
+ //#region src/particles/header-root/header-root.d.ts
5
+ /** Props for {@link HeaderRoot}. Extends all native `<header>` attributes. */
6
+ export type HeaderRootProps = ComponentPropsWithRef<'header'>;
7
+ /**
8
+ * Header landmark that wraps the store's header chrome.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <HeaderRoot>
13
+ * <Logo src="/logo.svg" alt="Loja XYZ" />
14
+ * <NavigationLinkList links={[{ label: 'Ofertas', href: '/ofertas' }]} />
15
+ * </HeaderRoot>
16
+ * ```
17
+ */
18
+ export declare const HeaderRootDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>>;
19
+ export declare function HeaderRoot({ className, children, ...props }: HeaderRootProps): import("react/jsx-runtime").JSX.Element;
20
+ //#endregion
21
+ //# sourceMappingURL=header-root.d.ts.map
@@ -0,0 +1,38 @@
1
+ import { defineComponent } from "../../core/dist/define-component.js";
2
+ import "../../core/dist/index.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/particles/header-root/header-root.tsx
5
+ /**
6
+ * Header landmark that wraps the store's header chrome.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * <HeaderRoot>
11
+ * <Logo src="/logo.svg" alt="Loja XYZ" />
12
+ * <NavigationLinkList links={[{ label: 'Ofertas', href: '/ofertas' }]} />
13
+ * </HeaderRoot>
14
+ * ```
15
+ */
16
+ const HeaderRootDefinition = defineComponent({
17
+ name: "HeaderRoot",
18
+ importPath: "@vtex/faststore/components",
19
+ component: HeaderRoot,
20
+ editor: {
21
+ label: "Header",
22
+ category: "layout"
23
+ },
24
+ schema: {},
25
+ guideline: "Page-top header landmark wrapping the logo, navigation, region control and account entry point. Place it at the top level of a layout schema: nested inside a section or nav, the browser exposes no banner landmark."
26
+ });
27
+ function HeaderRoot({ className, children, ...props }) {
28
+ return /* @__PURE__ */ jsx("header", {
29
+ ...props,
30
+ className,
31
+ "data-fs-header": "",
32
+ children
33
+ });
34
+ }
35
+ //#endregion
36
+ export { HeaderRoot, HeaderRootDefinition };
37
+
38
+ //# sourceMappingURL=header-root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-root.js","names":[],"sources":["../../../src/particles/header-root/header-root.tsx"],"sourcesContent":["import { defineComponent } from '@vtex/fs-core';\nimport type { ComponentPropsWithRef } from 'react';\n\n/** Props for {@link HeaderRoot}. Extends all native `<header>` attributes. */\nexport type HeaderRootProps = ComponentPropsWithRef<'header'>;\n\n/**\n * Header landmark that wraps the store's header chrome.\n *\n * @example\n * ```tsx\n * <HeaderRoot>\n * <Logo src=\"/logo.svg\" alt=\"Loja XYZ\" />\n * <NavigationLinkList links={[{ label: 'Ofertas', href: '/ofertas' }]} />\n * </HeaderRoot>\n * ```\n */\nexport const HeaderRootDefinition = defineComponent<HeaderRootProps>({\n name: 'HeaderRoot',\n importPath: '@vtex/faststore/components',\n component: HeaderRoot,\n editor: { label: 'Header', category: 'layout' },\n schema: {},\n guideline:\n 'Page-top header landmark wrapping the logo, navigation, region control and account entry point. Place it at the top level of a layout schema: nested inside a section or nav, the browser exposes no banner landmark.',\n});\n\nexport function HeaderRoot({ className, children, ...props }: HeaderRootProps) {\n return (\n <header {...props} className={className} data-fs-header=\"\">\n {children}\n </header>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAa,uBAAuB,gBAAiC;CACnE,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAU,UAAU;CAAS;CAC9C,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,SAAgB,WAAW,EAAE,WAAW,UAAU,GAAG,SAA0B;CAC7E,OACE,oBAAC,UAAD;EAAQ,GAAI;EAAkB;EAAW,kBAAe;EACrD;CACK,CAAA;AAEZ"}
@@ -0,0 +1,22 @@
1
+ import { ComponentDefinition } from "../../core/dist/define-component.js";
2
+ import "../../core/dist/index.js";
3
+ import { ComponentPropsWithRef } from "react";
4
+ //#region src/particles/icon/icon.d.ts
5
+ /** Props for {@link Icon}. Extends all native `<svg>` attributes. */
6
+ export type IconProps = Omit<ComponentPropsWithRef<'svg'>, 'children' | 'name'> & {
7
+ /** Icon reference as written in schemas: a bare name (`'heart'`) or `'collection:name'`. */
8
+ name: string;
9
+ /** Stroke width for stroke-based icon sets. Defaults to `2`; a no-op on fill-based sets. */
10
+ strokeWidth?: number;
11
+ };
12
+ export declare const IconDefinition: ComponentDefinition<IconProps>;
13
+ /**
14
+ * Pure reference renderer: the host environment guarantees the symbol exists. Generated
15
+ * apps get that guarantee from the compiler's per-route sprites; Storybook injects a dev
16
+ * sprite via `createIconRuntime`. `currentColor` and per-instance strokeWidth inherit
17
+ * through <use>. Decorative by default (aria-hidden); pass aria-hidden={false} plus a
18
+ * label to expose one.
19
+ */
20
+ export declare function Icon({ name, strokeWidth, className, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
21
+ //#endregion
22
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1,48 @@
1
+ import { defineComponent } from "../../core/dist/define-component.js";
2
+ import "../../core/dist/index.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/particles/icon/icon.tsx
5
+ const IconDefinition = defineComponent({
6
+ name: "Icon",
7
+ importPath: "@vtex/faststore/components",
8
+ component: Icon,
9
+ editor: {
10
+ label: "Icon",
11
+ category: "content"
12
+ },
13
+ schema: {
14
+ name: {
15
+ type: "icon",
16
+ label: "Icon"
17
+ },
18
+ strokeWidth: {
19
+ type: "number",
20
+ default: 2,
21
+ label: "Stroke Width"
22
+ }
23
+ },
24
+ guideline: "Icon reference resolved at compile time. A bare name ('heart', 'shopping-cart') resolves through store aliases, then custom SVGs in assets/icons/ (filename as name), then the store's default collection (lucide unless the Global Schema declares another), then the base icon dialect. Base dialect names (the FastStore icon set, kebab-cased: 'x', 'caret-down', 'magnifying-glass', 'shopping-cart', 'visa', ...) are guaranteed to resolve in every store and are the only names component code may use internally. A qualified 'collection:name' ('ph:heart', 'custom:bag-rounded') targets a collection directly. Unresolvable names fail the build; there is no runtime fallback."
25
+ });
26
+ /**
27
+ * Pure reference renderer: the host environment guarantees the symbol exists. Generated
28
+ * apps get that guarantee from the compiler's per-route sprites; Storybook injects a dev
29
+ * sprite via `createIconRuntime`. `currentColor` and per-instance strokeWidth inherit
30
+ * through <use>. Decorative by default (aria-hidden); pass aria-hidden={false} plus a
31
+ * label to expose one.
32
+ */
33
+ function Icon({ name, strokeWidth = 2, className, ...props }) {
34
+ return /* @__PURE__ */ jsx("svg", {
35
+ width: "24",
36
+ height: "24",
37
+ "aria-hidden": "true",
38
+ ...props,
39
+ strokeWidth,
40
+ className,
41
+ "data-fs-icon": "",
42
+ children: /* @__PURE__ */ jsx("use", { href: `#fs-icon-${name.replace(":", "--")}` })
43
+ });
44
+ }
45
+ //#endregion
46
+ export { Icon, IconDefinition };
47
+
48
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","names":[],"sources":["../../../src/particles/icon/icon.tsx"],"sourcesContent":["import { defineComponent } from '@vtex/fs-core';\nimport type { ComponentPropsWithRef } from 'react';\n\n/** Props for {@link Icon}. Extends all native `<svg>` attributes. */\nexport type IconProps = Omit<ComponentPropsWithRef<'svg'>, 'children' | 'name'> & {\n /** Icon reference as written in schemas: a bare name (`'heart'`) or `'collection:name'`. */\n name: string;\n /** Stroke width for stroke-based icon sets. Defaults to `2`; a no-op on fill-based sets. */\n strokeWidth?: number;\n};\n\nexport const IconDefinition = defineComponent<IconProps>({\n name: 'Icon',\n importPath: '@vtex/faststore/components',\n component: Icon,\n editor: { label: 'Icon', category: 'content' },\n schema: {\n name: { type: 'icon', label: 'Icon' },\n strokeWidth: { type: 'number', default: 2, label: 'Stroke Width' },\n },\n guideline:\n \"Icon reference resolved at compile time. A bare name ('heart', 'shopping-cart') resolves through store aliases, then custom SVGs in assets/icons/ (filename as name), then the store's default collection (lucide unless the Global Schema declares another), then the base icon dialect. Base dialect names (the FastStore icon set, kebab-cased: 'x', 'caret-down', 'magnifying-glass', 'shopping-cart', 'visa', ...) are guaranteed to resolve in every store and are the only names component code may use internally. A qualified 'collection:name' ('ph:heart', 'custom:bag-rounded') targets a collection directly. Unresolvable names fail the build; there is no runtime fallback.\",\n});\n\n/**\n * Pure reference renderer: the host environment guarantees the symbol exists. Generated\n * apps get that guarantee from the compiler's per-route sprites; Storybook injects a dev\n * sprite via `createIconRuntime`. `currentColor` and per-instance strokeWidth inherit\n * through <use>. Decorative by default (aria-hidden); pass aria-hidden={false} plus a\n * label to expose one.\n */\nexport function Icon({ name, strokeWidth = 2, className, ...props }: IconProps) {\n return (\n <svg\n width=\"24\"\n height=\"24\"\n aria-hidden=\"true\"\n {...props}\n strokeWidth={strokeWidth}\n className={className}\n data-fs-icon=\"\"\n >\n <use href={`#fs-icon-${name.replace(':', '--')}`} />\n </svg>\n );\n}\n"],"mappings":";;;;AAWA,MAAa,iBAAiB,gBAA2B;CACvD,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAQ,UAAU;CAAU;CAC7C,QAAQ;EACN,MAAM;GAAE,MAAM;GAAQ,OAAO;EAAO;EACpC,aAAa;GAAE,MAAM;GAAU,SAAS;GAAG,OAAO;EAAe;CACnE;CACA,WACE;AACJ,CAAC;;;;;;;;AASD,SAAgB,KAAK,EAAE,MAAM,cAAc,GAAG,WAAW,GAAG,SAAoB;CAC9E,OACE,oBAAC,OAAD;EACE,OAAM;EACN,QAAO;EACP,eAAY;EACZ,GAAI;EACS;EACF;EACX,gBAAa;EAEb,UAAA,oBAAC,OAAD,EAAK,MAAM,YAAY,KAAK,QAAQ,KAAK,IAAI,IAAM,CAAA;CAChD,CAAA;AAET"}
@@ -0,0 +1,13 @@
1
+ import { ComponentDefinition } from "../../core/dist/define-component.js";
2
+ import "../../core/dist/index.js";
3
+ import { ComponentPropsWithRef } from "react";
4
+ //#region src/particles/image/image.d.ts
5
+ /** Props for {@link Image}. Extends all native `<img>` attributes. */
6
+ export type ImageProps = ComponentPropsWithRef<'img'> & {
7
+ /** Aspect ratio string (e.g. `'16/9'`, `'1/1'`). */
8
+ aspectRatio?: string;
9
+ };
10
+ export declare const ImageDefinition: ComponentDefinition<ImageProps>;
11
+ export declare function Image({ alt, loading, aspectRatio, className, style, ...props }: ImageProps): import("react/jsx-runtime").JSX.Element;
12
+ //#endregion
13
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1,59 @@
1
+ import { defineComponent } from "../../core/dist/define-component.js";
2
+ import "../../core/dist/index.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/particles/image/image.tsx
5
+ const ImageDefinition = defineComponent({
6
+ name: "Image",
7
+ importPath: "@vtex/faststore/components",
8
+ component: Image,
9
+ editor: {
10
+ label: "Image",
11
+ category: "content"
12
+ },
13
+ schema: {
14
+ src: {
15
+ type: "string",
16
+ label: "Source URL"
17
+ },
18
+ alt: {
19
+ type: "string",
20
+ label: "Alt Text"
21
+ },
22
+ width: {
23
+ type: "number",
24
+ label: "Width"
25
+ },
26
+ height: {
27
+ type: "number",
28
+ label: "Height"
29
+ },
30
+ loading: {
31
+ type: ["lazy", "eager"],
32
+ default: "lazy",
33
+ label: "Loading"
34
+ },
35
+ aspectRatio: {
36
+ type: "string",
37
+ label: "Aspect Ratio"
38
+ }
39
+ },
40
+ guideline: "Responsive image with lazy loading. Use aspectRatio for grid layouts. Renders a native <img> element with no framework dependency."
41
+ });
42
+ function Image({ alt = "", loading = "lazy", aspectRatio, className, style, ...props }) {
43
+ const mergedStyle = aspectRatio ? {
44
+ ...style,
45
+ aspectRatio
46
+ } : style;
47
+ return /* @__PURE__ */ jsx("img", {
48
+ ...props,
49
+ alt,
50
+ loading,
51
+ className,
52
+ style: mergedStyle,
53
+ "data-fs-image": ""
54
+ });
55
+ }
56
+ //#endregion
57
+ export { Image, ImageDefinition };
58
+
59
+ //# sourceMappingURL=image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.js","names":[],"sources":["../../../src/particles/image/image.tsx"],"sourcesContent":["import { defineComponent } from '@vtex/fs-core';\nimport type { ComponentPropsWithRef } from 'react';\n\n/** Props for {@link Image}. Extends all native `<img>` attributes. */\nexport type ImageProps = ComponentPropsWithRef<'img'> & {\n /** Aspect ratio string (e.g. `'16/9'`, `'1/1'`). */\n aspectRatio?: string;\n};\n\nexport const ImageDefinition = defineComponent<ImageProps>({\n name: 'Image',\n importPath: '@vtex/faststore/components',\n component: Image,\n editor: { label: 'Image', category: 'content' },\n schema: {\n src: { type: 'string', label: 'Source URL' },\n alt: { type: 'string', label: 'Alt Text' },\n width: { type: 'number', label: 'Width' },\n height: { type: 'number', label: 'Height' },\n loading: { type: ['lazy', 'eager'] as const, default: 'lazy', label: 'Loading' },\n aspectRatio: { type: 'string', label: 'Aspect Ratio' },\n },\n guideline:\n 'Responsive image with lazy loading. Use aspectRatio for grid layouts. Renders a native <img> element with no framework dependency.',\n});\n\nexport function Image({ alt = '', loading = 'lazy', aspectRatio, className, style, ...props }: ImageProps) {\n const mergedStyle = aspectRatio ? { ...style, aspectRatio } : style;\n\n // biome-ignore lint/performance/noImgElement: Native img keeps @vtex/faststore framework-agnostic (no Next.js runtime).\n return <img {...props} alt={alt} loading={loading} className={className} style={mergedStyle} data-fs-image=\"\" />;\n}\n"],"mappings":";;;;AASA,MAAa,kBAAkB,gBAA4B;CACzD,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAS,UAAU;CAAU;CAC9C,QAAQ;EACN,KAAK;GAAE,MAAM;GAAU,OAAO;EAAa;EAC3C,KAAK;GAAE,MAAM;GAAU,OAAO;EAAW;EACzC,OAAO;GAAE,MAAM;GAAU,OAAO;EAAQ;EACxC,QAAQ;GAAE,MAAM;GAAU,OAAO;EAAS;EAC1C,SAAS;GAAE,MAAM,CAAC,QAAQ,OAAO;GAAY,SAAS;GAAQ,OAAO;EAAU;EAC/E,aAAa;GAAE,MAAM;GAAU,OAAO;EAAe;CACvD;CACA,WACE;AACJ,CAAC;AAED,SAAgB,MAAM,EAAE,MAAM,IAAI,UAAU,QAAQ,aAAa,WAAW,OAAO,GAAG,SAAqB;CACzG,MAAM,cAAc,cAAc;EAAE,GAAG;EAAO;CAAY,IAAI;CAG9D,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAY;EAAc;EAAoB;EAAW,OAAO;EAAa,iBAAc;CAAI,CAAA;AACjH"}
@@ -0,0 +1,85 @@
1
+ import { ContentValue } from "../../core/dist/define-content-type.js";
2
+ import { ComponentDefinition } from "../../core/dist/define-component.js";
3
+ import "../../core/dist/index.js";
4
+ import { ComponentPropsWithRef } from "react";
5
+ //#region src/particles/incentives/incentives.d.ts
6
+ export declare const IncentivesContent: {
7
+ readonly id: "incentives";
8
+ readonly title: "Incentives";
9
+ readonly description: "Store benefit highlights rendered as a strip in the footer.";
10
+ readonly schema: {
11
+ readonly type: "object";
12
+ readonly additionalProperties: false;
13
+ readonly properties: {
14
+ readonly items: {
15
+ readonly type: "array";
16
+ readonly title: "Incentive items";
17
+ readonly minItems: 1;
18
+ readonly items: {
19
+ readonly type: "object";
20
+ readonly additionalProperties: false;
21
+ readonly required: readonly ["title"];
22
+ readonly properties: {
23
+ readonly title: {
24
+ readonly type: "string";
25
+ readonly minLength: 1;
26
+ readonly title: "Title";
27
+ };
28
+ readonly firstLineText: {
29
+ readonly type: "string";
30
+ readonly title: "First line";
31
+ };
32
+ readonly secondLineText: {
33
+ readonly type: "string";
34
+ readonly title: "Second line";
35
+ };
36
+ readonly href: {
37
+ readonly type: "string";
38
+ readonly minLength: 1;
39
+ readonly title: "Link";
40
+ readonly format: "uri-reference";
41
+ readonly pattern: "^(?:https?://.*|mailto:.+|tel:.+|/(?:[^/].*)?)$";
42
+ };
43
+ readonly icon: {
44
+ readonly type: "string";
45
+ readonly enum: readonly ["truck", "calendar", "gift", "store", "shield-check"];
46
+ readonly title: "Icon";
47
+ };
48
+ readonly iconUrl: {
49
+ readonly type: "string";
50
+ readonly format: "uri";
51
+ readonly title: "Custom icon";
52
+ readonly widget: {
53
+ readonly 'ui:widget': "media-gallery";
54
+ };
55
+ };
56
+ readonly alt: {
57
+ readonly type: "string";
58
+ readonly title: "Custom icon alt text";
59
+ };
60
+ };
61
+ };
62
+ };
63
+ };
64
+ };
65
+ };
66
+ /**
67
+ * The benefit glyphs the `icon` enum admits. Exported because a store's `global.json` has to list
68
+ * them under `icons.include` for a CMS-chosen name to resolve at runtime — one import there instead
69
+ * of five retyped strings, which is what keeps the layout task from silently missing one. Reading it
70
+ * off the model rather than declaring it alongside makes the two impossible to drift apart.
71
+ */
72
+ export declare const INCENTIVE_ICON_NAMES: readonly ["truck", "calendar", "gift", "store", "shield-check"];
73
+ type IncentivesContentValue = ContentValue<typeof IncentivesContent>;
74
+ /** One incentive item, identical in the prop and the content channels. */
75
+ export type IncentiveItem = NonNullable<IncentivesContentValue['items']>[number];
76
+ export type IncentivesProps = ComponentPropsWithRef<'ul'> & {
77
+ /** Authored fallback list, rendered when no CMS entry supplies one. */
78
+ items?: readonly IncentiveItem[];
79
+ /** Injected by the compiler, sliced from the layout's composite content entry. */
80
+ $content?: IncentivesContentValue;
81
+ };
82
+ export declare const IncentivesDefinition: ComponentDefinition<IncentivesProps>;
83
+ export declare function Incentives({ items, $content, className, ...props }: IncentivesProps): import("react/jsx-runtime").JSX.Element | null;
84
+ //#endregion
85
+ //# sourceMappingURL=incentives.d.ts.map
@@ -0,0 +1,200 @@
1
+ import { defineComponent } from "../../core/dist/define-component.js";
2
+ import { defineContentType } from "../../core/dist/define-content-type.js";
3
+ import "../../core/dist/index.js";
4
+ import { Icon } from "../icon/icon.js";
5
+ import { resolveSafeHref } from "../../utils/safe-href.js";
6
+ import { NavigationLink } from "../navigation-link/navigation-link.js";
7
+ import { Image } from "../image/image.js";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ //#region src/particles/incentives/incentives.tsx
10
+ const IncentivesContent = defineContentType({
11
+ id: "incentives",
12
+ title: "Incentives",
13
+ description: "Store benefit highlights rendered as a strip in the footer.",
14
+ schema: {
15
+ type: "object",
16
+ additionalProperties: false,
17
+ properties: { items: {
18
+ type: "array",
19
+ title: "Incentive items",
20
+ minItems: 1,
21
+ items: {
22
+ type: "object",
23
+ additionalProperties: false,
24
+ required: ["title"],
25
+ properties: {
26
+ title: {
27
+ type: "string",
28
+ minLength: 1,
29
+ title: "Title"
30
+ },
31
+ firstLineText: {
32
+ type: "string",
33
+ title: "First line"
34
+ },
35
+ secondLineText: {
36
+ type: "string",
37
+ title: "Second line"
38
+ },
39
+ href: {
40
+ type: "string",
41
+ minLength: 1,
42
+ title: "Link",
43
+ format: "uri-reference",
44
+ pattern: "^(?:https?://.*|mailto:.+|tel:.+|/(?:[^/].*)?)$"
45
+ },
46
+ icon: {
47
+ type: "string",
48
+ enum: [
49
+ "truck",
50
+ "calendar",
51
+ "gift",
52
+ "store",
53
+ "shield-check"
54
+ ],
55
+ title: "Icon"
56
+ },
57
+ iconUrl: {
58
+ type: "string",
59
+ format: "uri",
60
+ title: "Custom icon",
61
+ widget: { "ui:widget": "media-gallery" }
62
+ },
63
+ alt: {
64
+ type: "string",
65
+ title: "Custom icon alt text"
66
+ }
67
+ }
68
+ }
69
+ } }
70
+ }
71
+ });
72
+ /**
73
+ * The benefit glyphs the `icon` enum admits. Exported because a store's `global.json` has to list
74
+ * them under `icons.include` for a CMS-chosen name to resolve at runtime — one import there instead
75
+ * of five retyped strings, which is what keeps the layout task from silently missing one. Reading it
76
+ * off the model rather than declaring it alongside makes the two impossible to drift apart.
77
+ */
78
+ const INCENTIVE_ICON_NAMES = IncentivesContent.schema.properties.items.items.properties.icon.enum;
79
+ const IncentivesDefinition = defineComponent({
80
+ name: "Incentives",
81
+ importPath: "@vtex/faststore/components",
82
+ component: Incentives,
83
+ content: IncentivesContent,
84
+ editor: {
85
+ label: "Incentives",
86
+ category: "content"
87
+ },
88
+ schema: { items: {
89
+ type: "array",
90
+ label: "Incentive items"
91
+ } },
92
+ guideline: "The store's value propositions as a strip of icon-and-copy items, the whole list CMS-editable: each item carries a title, up to two description lines, either a predefined icon or an uploaded one, and an optional href that turns the whole block into a link. Every predefined icon name must be listed in the store's icons.include. Renders nothing when unconfigured. See incentives.md."
93
+ });
94
+ /**
95
+ * The item's destination, or null for both "none authored" and "the allowlist refused it". Unlike the
96
+ * link group and the social row, where a link is the whole point, a refusal here costs the anchor
97
+ * alone — an unlinked item is this component's ordinary shape, so the glyph and copy still render.
98
+ */
99
+ function resolveHref(raw, index) {
100
+ if (!raw?.trim()) return null;
101
+ const destination = resolveSafeHref(raw);
102
+ if (!destination.safe) {
103
+ console.warn("[Incentives] link destination rejected", {
104
+ index,
105
+ reason: destination.reason
106
+ });
107
+ return null;
108
+ }
109
+ return destination.href;
110
+ }
111
+ /**
112
+ * Drops every item with no title to show, and every description line that would render empty.
113
+ * Neither read-time gate enforces `minLength`, so both blanks reach the component. The asymmetry is
114
+ * deliberate: an icon with no label is not an incentive, while a missing line is supplementary.
115
+ */
116
+ function resolveIncentives(items) {
117
+ const resolved = [];
118
+ items.forEach((item, index) => {
119
+ if (!item.title.trim()) return;
120
+ const lines = [item.firstLineText, item.secondLineText].filter((line) => Boolean(line?.trim()));
121
+ const href = resolveHref(item.href, index);
122
+ if (item.iconUrl?.trim()) resolved.push({
123
+ title: item.title,
124
+ lines,
125
+ href,
126
+ src: item.iconUrl,
127
+ alt: item.alt
128
+ });
129
+ else if (item.icon) resolved.push({
130
+ title: item.title,
131
+ lines,
132
+ href,
133
+ icon: item.icon
134
+ });
135
+ else resolved.push({
136
+ title: item.title,
137
+ lines,
138
+ href
139
+ });
140
+ });
141
+ return resolved;
142
+ }
143
+ /**
144
+ * The item's glyph, or nothing. Presence decides the channel — an upload first, then a predefined
145
+ * sprite name — and an item carrying neither renders as copy alone rather than an empty slot.
146
+ */
147
+ function IncentiveGlyph({ item }) {
148
+ if (item.src !== void 0) return /* @__PURE__ */ jsx(Image, {
149
+ src: item.src,
150
+ alt: item.alt,
151
+ "data-fs-incentive-icon": ""
152
+ });
153
+ if (item.icon !== void 0) return /* @__PURE__ */ jsx(Icon, {
154
+ name: item.icon,
155
+ "data-fs-incentive-icon": ""
156
+ });
157
+ return null;
158
+ }
159
+ /**
160
+ * The glyph and copy an item renders in both forms. Kept whole rather than split across the linked
161
+ * and unlinked branches so the anchor wraps the entire block: on a shortcut row the pictogram is
162
+ * half the click target, and a link around the label alone leaves it dead.
163
+ */
164
+ function IncentiveBody({ item }) {
165
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
166
+ /* @__PURE__ */ jsx(IncentiveGlyph, { item }),
167
+ /* @__PURE__ */ jsx("p", {
168
+ "data-fs-text": "",
169
+ "data-fs-incentive-title": "",
170
+ children: item.title
171
+ }),
172
+ item.lines.map((line, lineIndex) => /* @__PURE__ */ jsx("p", {
173
+ "data-fs-text": "",
174
+ "data-fs-incentive-description": "",
175
+ children: line
176
+ }, lineIndex))
177
+ ] });
178
+ }
179
+ function Incentives({ items, $content, className, ...props }) {
180
+ const resolved = resolveIncentives($content?.items ?? items ?? []);
181
+ if (resolved.length === 0) return null;
182
+ return /* @__PURE__ */ jsx("ul", {
183
+ role: "list",
184
+ ...props,
185
+ className,
186
+ "data-fs-incentives": "",
187
+ children: resolved.map((item, index) => /* @__PURE__ */ jsx("li", {
188
+ "data-fs-incentive": "",
189
+ children: item.href === null ? /* @__PURE__ */ jsx(IncentiveBody, { item }) : /* @__PURE__ */ jsx(NavigationLink, {
190
+ href: item.href,
191
+ "data-fs-incentive-link": "",
192
+ children: /* @__PURE__ */ jsx(IncentiveBody, { item })
193
+ })
194
+ }, index))
195
+ });
196
+ }
197
+ //#endregion
198
+ export { INCENTIVE_ICON_NAMES, Incentives, IncentivesContent, IncentivesDefinition };
199
+
200
+ //# sourceMappingURL=incentives.js.map