@vtex/faststore 0.0.7 → 0.0.8

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 (411) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/actions.json +152 -1
  3. package/dist/catalog.json +1264 -142
  4. package/dist/cli/index.d.ts +512 -63
  5. package/dist/cli/index.js +2098 -686
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/cli/server-runtime.js +44 -24
  8. package/dist/cli/server-runtime.js.map +1 -1
  9. package/dist/client.d.ts +5 -1
  10. package/dist/client.js +5 -1
  11. package/dist/components.d.ts +34 -7
  12. package/dist/components.js +38 -11
  13. package/dist/content-types.json +523 -0
  14. package/dist/core/dist/define-component.d.ts +6 -1
  15. package/dist/docs/account-access-gate.md +4 -4
  16. package/dist/docs/account-address-book.md +519 -0
  17. package/dist/docs/account-entry-point.md +1 -1
  18. package/dist/docs/account-menu.md +5 -5
  19. package/dist/docs/alert-dialog.md +2 -2
  20. package/dist/docs/billing-address.md +17 -9
  21. package/dist/docs/card-entry.md +37 -6
  22. package/dist/docs/cardholder-document.md +16 -14
  23. package/dist/docs/cart-item.md +1 -1
  24. package/dist/docs/cart.md +8 -8
  25. package/dist/docs/client-profile-fieldset.md +7 -5
  26. package/dist/docs/copy-text.md +84 -0
  27. package/dist/docs/document-field.md +8 -8
  28. package/dist/docs/footer-link-group.md +2 -2
  29. package/dist/docs/header-root.md +1 -1
  30. package/dist/docs/incentives.md +2 -2
  31. package/dist/docs/logo.md +5 -5
  32. package/dist/docs/my-account-profile.md +4 -4
  33. package/dist/docs/navigation-link-list.md +2 -2
  34. package/dist/docs/navigation-link.md +3 -3
  35. package/dist/docs/order-cancel.md +52 -0
  36. package/dist/docs/order-delivery-address.md +63 -0
  37. package/dist/docs/order-delivery-group.md +83 -0
  38. package/dist/docs/order-details-back.md +41 -0
  39. package/dist/docs/order-details-header.md +48 -0
  40. package/dist/docs/order-list-row.md +46 -0
  41. package/dist/docs/order-list-search.md +101 -0
  42. package/dist/docs/order-list-views.md +97 -0
  43. package/dist/docs/order-list.md +94 -0
  44. package/dist/docs/order-payment.md +94 -0
  45. package/dist/docs/order-placed-date.md +49 -0
  46. package/dist/docs/order-placed-payment-summary.md +13 -15
  47. package/dist/docs/order-placed.md +225 -0
  48. package/dist/docs/order-progress.md +88 -0
  49. package/dist/docs/order-status-badge.md +91 -0
  50. package/dist/docs/order-summary.md +53 -0
  51. package/dist/docs/payment-method-badges.md +14 -3
  52. package/dist/docs/place-order.md +13 -9
  53. package/dist/docs/saved-cards.md +2 -2
  54. package/dist/docs/select.md +19 -6
  55. package/dist/docs/session.md +1 -1
  56. package/dist/docs/shipping-address.md +1 -1
  57. package/dist/docs/sign-in-redirect.md +6 -6
  58. package/dist/docs/toast.md +7 -3
  59. package/dist/index.d.ts +6 -2
  60. package/dist/index.js +2 -1
  61. package/dist/internal/client.d.ts +6 -1
  62. package/dist/internal/client.js +7 -2
  63. package/dist/internal/server.d.ts +6 -2
  64. package/dist/internal/server.js +6 -2
  65. package/dist/matter/account-access-gate/account-access-gate.d.ts +2 -1
  66. package/dist/matter/account-access-gate/account-access-gate.js +19 -16
  67. package/dist/matter/account-access-gate/account-access-gate.js.map +1 -1
  68. package/dist/matter/account-address-book/account-address-book-delete.d.ts +60 -0
  69. package/dist/matter/account-address-book/account-address-book-delete.js +184 -0
  70. package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -0
  71. package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +19 -0
  72. package/dist/matter/account-address-book/account-address-book-deliverability.js +50 -0
  73. package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -0
  74. package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +42 -0
  75. package/dist/matter/account-address-book/account-address-book-form-parts.js +146 -0
  76. package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -0
  77. package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +25 -0
  78. package/dist/matter/account-address-book/account-address-book-profile-notice.js +72 -0
  79. package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -0
  80. package/dist/matter/account-address-book/account-address-book.d.ts +120 -0
  81. package/dist/matter/account-address-book/account-address-book.js +469 -0
  82. package/dist/matter/account-address-book/account-address-book.js.map +1 -0
  83. package/dist/matter/account-address-book/account-address-country-switch.js +59 -0
  84. package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -0
  85. package/dist/matter/account-address-book/account-address-country.d.ts +36 -0
  86. package/dist/matter/account-address-book/account-address-country.js +151 -0
  87. package/dist/matter/account-address-book/account-address-country.js.map +1 -0
  88. package/dist/matter/account-address-book/account-address-first-line.js +11 -0
  89. package/dist/matter/account-address-book/account-address-first-line.js.map +1 -0
  90. package/dist/matter/account-address-book/account-address-form-context.d.ts +55 -0
  91. package/dist/matter/account-address-book/account-address-form-context.js +14 -0
  92. package/dist/matter/account-address-book/account-address-form-context.js.map +1 -0
  93. package/dist/matter/account-address-book/account-address-form.d.ts +85 -0
  94. package/dist/matter/account-address-book/account-address-form.js +946 -0
  95. package/dist/matter/account-address-book/account-address-form.js.map +1 -0
  96. package/dist/matter/account-address-book/account-address-postal-autofill.js +189 -0
  97. package/dist/matter/account-address-book/account-address-postal-autofill.js.map +1 -0
  98. package/dist/matter/account-address-book/account-address-record.d.ts +26 -0
  99. package/dist/matter/account-address-book/account-address-record.js +138 -0
  100. package/dist/matter/account-address-book/account-address-record.js.map +1 -0
  101. package/dist/matter/account-entry-point/account-entry-point.js +11 -11
  102. package/dist/matter/account-entry-point/account-entry-point.js.map +1 -1
  103. package/dist/matter/account-menu/account-menu.d.ts +7 -3
  104. package/dist/matter/account-menu/account-menu.js +69 -28
  105. package/dist/matter/account-menu/account-menu.js.map +1 -1
  106. package/dist/matter/billing-address/billing-address.d.ts +30 -17
  107. package/dist/matter/billing-address/billing-address.js +128 -33
  108. package/dist/matter/billing-address/billing-address.js.map +1 -1
  109. package/dist/matter/breadcrumb/breadcrumb.js +2 -2
  110. package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
  111. package/dist/matter/card-entry/card-capture.js +4 -3
  112. package/dist/matter/card-entry/card-capture.js.map +1 -1
  113. package/dist/matter/card-entry/card-entry.d.ts +5 -3
  114. package/dist/matter/card-entry/card-entry.js +77 -27
  115. package/dist/matter/card-entry/card-entry.js.map +1 -1
  116. package/dist/matter/cardholder-document/cardholder-document.d.ts +10 -9
  117. package/dist/matter/cardholder-document/cardholder-document.js +36 -16
  118. package/dist/matter/cardholder-document/cardholder-document.js.map +1 -1
  119. package/dist/matter/cart/cart.d.ts +7 -2
  120. package/dist/matter/cart/cart.js +29 -26
  121. package/dist/matter/cart/cart.js.map +1 -1
  122. package/dist/matter/cart-item/cart-item.js +2 -2
  123. package/dist/matter/cart-item/cart-item.js.map +1 -1
  124. package/dist/matter/client-preferences/client-preferences-fieldset.js +1 -1
  125. package/dist/matter/client-profile-form/client-profile-fieldset.js +8 -5
  126. package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
  127. package/dist/matter/identity-edit/identity-edit.js +3 -3
  128. package/dist/matter/identity-edit/identity-edit.js.map +1 -1
  129. package/dist/matter/identity-summary/identity-summary.js +2 -2
  130. package/dist/matter/identity-summary/identity-summary.js.map +1 -1
  131. package/dist/matter/my-account-profile/my-account-profile.d.ts +3 -3
  132. package/dist/matter/my-account-profile/my-account-profile.js +4 -4
  133. package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
  134. package/dist/matter/order-cancel/order-cancel.d.ts +110 -0
  135. package/dist/matter/order-cancel/order-cancel.js +344 -0
  136. package/dist/matter/order-cancel/order-cancel.js.map +1 -0
  137. package/dist/matter/order-delivery-address/order-delivery-address.d.ts +73 -0
  138. package/dist/matter/order-delivery-address/order-delivery-address.js +172 -0
  139. package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -0
  140. package/dist/matter/order-delivery-group/order-delivery-group.d.ts +128 -0
  141. package/dist/matter/order-delivery-group/order-delivery-group.js +408 -0
  142. package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -0
  143. package/dist/matter/order-details-header/order-details-header.d.ts +104 -0
  144. package/dist/matter/order-details-header/order-details-header.js +190 -0
  145. package/dist/matter/order-details-header/order-details-header.js.map +1 -0
  146. package/dist/matter/order-list/customer-orders-filter.d.ts +12 -0
  147. package/dist/matter/order-list/customer-orders-filter.js +30 -0
  148. package/dist/matter/order-list/customer-orders-filter.js.map +1 -0
  149. package/dist/matter/order-list/order-list.d.ts +121 -0
  150. package/dist/matter/order-list/order-list.js +395 -0
  151. package/dist/matter/order-list/order-list.js.map +1 -0
  152. package/dist/matter/order-list-row/order-list-row.d.ts +44 -0
  153. package/dist/matter/order-list-row/order-list-row.js +127 -0
  154. package/dist/matter/order-list-row/order-list-row.js.map +1 -0
  155. package/dist/matter/order-list-search/order-list-search.d.ts +72 -0
  156. package/dist/matter/order-list-search/order-list-search.js +296 -0
  157. package/dist/matter/order-list-search/order-list-search.js.map +1 -0
  158. package/dist/matter/order-list-views/order-list-views.d.ts +65 -0
  159. package/dist/matter/order-list-views/order-list-views.js +154 -0
  160. package/dist/matter/order-list-views/order-list-views.js.map +1 -0
  161. package/dist/matter/order-payment/order-payment.d.ts +83 -0
  162. package/dist/matter/order-payment/order-payment.js +258 -0
  163. package/dist/matter/order-payment/order-payment.js.map +1 -0
  164. package/dist/matter/order-placed/order-placed-deliveries.d.ts +145 -0
  165. package/dist/matter/order-placed/order-placed-deliveries.js +380 -0
  166. package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -0
  167. package/dist/matter/order-placed/order-placed.d.ts +122 -0
  168. package/dist/matter/order-placed/order-placed.js +452 -0
  169. package/dist/matter/order-placed/order-placed.js.map +1 -0
  170. package/dist/matter/order-placed-date/order-placed-date.d.ts +45 -0
  171. package/dist/matter/order-placed-date/order-placed-date.js +92 -0
  172. package/dist/matter/order-placed-date/order-placed-date.js.map +1 -0
  173. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +5 -8
  174. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +29 -81
  175. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
  176. package/dist/matter/order-progress/order-progress.d.ts +85 -0
  177. package/dist/matter/order-progress/order-progress.js +203 -0
  178. package/dist/matter/order-progress/order-progress.js.map +1 -0
  179. package/dist/matter/order-summary/order-summary.d.ts +81 -0
  180. package/dist/matter/order-summary/order-summary.js +192 -0
  181. package/dist/matter/order-summary/order-summary.js.map +1 -0
  182. package/dist/matter/payment/cardholder-document-rule.d.ts +35 -0
  183. package/dist/matter/payment/cardholder-document-rule.js +35 -0
  184. package/dist/matter/payment/cardholder-document-rule.js.map +1 -0
  185. package/dist/matter/payment/payment-card-capture.js +38 -23
  186. package/dist/matter/payment/payment-card-capture.js.map +1 -1
  187. package/dist/matter/payment/payment-controller.js +11 -0
  188. package/dist/matter/payment/payment-controller.js.map +1 -1
  189. package/dist/matter/payment/payment-method-badges.js +4 -2
  190. package/dist/matter/payment/payment-method-badges.js.map +1 -1
  191. package/dist/matter/payment/payment.js +11 -0
  192. package/dist/matter/payment/payment.js.map +1 -1
  193. package/dist/matter/payment/use-payment-method-selection.d.ts +39 -0
  194. package/dist/matter/payment/use-payment-method-selection.js +30 -2
  195. package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
  196. package/dist/matter/payment/use-payment-submit-gate.d.ts +16 -2
  197. package/dist/matter/payment/use-payment-submit-gate.js +42 -14
  198. package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
  199. package/dist/matter/place-order/place-order.d.ts +12 -7
  200. package/dist/matter/place-order/place-order.js +126 -103
  201. package/dist/matter/place-order/place-order.js.map +1 -1
  202. package/dist/matter/pricing/pricing.js +5 -5
  203. package/dist/matter/pricing/pricing.js.map +1 -1
  204. package/dist/matter/region/region.js +1 -1
  205. package/dist/matter/saved-cards/saved-cards.js +26 -15
  206. package/dist/matter/saved-cards/saved-cards.js.map +1 -1
  207. package/dist/matter/session/session.js +2 -2
  208. package/dist/matter/session/session.js.map +1 -1
  209. package/dist/matter/shipping-address/country-descriptors.d.ts +1 -0
  210. package/dist/matter/shipping-address/country-descriptors.js +23 -1
  211. package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
  212. package/dist/matter/shipping-address/shipping-address.js +62 -14
  213. package/dist/matter/shipping-address/shipping-address.js.map +1 -1
  214. package/dist/matter/shipping-simulator/shipping-simulator.d.ts +1 -1
  215. package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
  216. package/dist/matter/sign-in-redirect/sign-in-redirect.js +48 -10
  217. package/dist/matter/sign-in-redirect/sign-in-redirect.js.map +1 -1
  218. package/dist/matter/variant-selector/variant-selector.js +2 -2
  219. package/dist/matter/variant-selector/variant-selector.js.map +1 -1
  220. package/dist/particles/address-summary/address-summary.js +2 -2
  221. package/dist/particles/address-summary/address-summary.js.map +1 -1
  222. package/dist/particles/alert-dialog/alert-dialog.d.ts +5 -1
  223. package/dist/particles/alert-dialog/alert-dialog.js +5 -2
  224. package/dist/particles/alert-dialog/alert-dialog.js.map +1 -1
  225. package/dist/particles/copy-text/copy-text.d.ts +28 -0
  226. package/dist/particles/copy-text/copy-text.js +140 -0
  227. package/dist/particles/copy-text/copy-text.js.map +1 -0
  228. package/dist/particles/document-field/document-field.d.ts +34 -5
  229. package/dist/particles/document-field/document-field.js +115 -19
  230. package/dist/particles/document-field/document-field.js.map +1 -1
  231. package/dist/particles/field/field.js +1 -1
  232. package/dist/particles/field/field.js.map +1 -1
  233. package/dist/particles/footer-link-group/footer-link-group.d.ts +6 -2
  234. package/dist/particles/footer-link-group/footer-link-group.js +18 -7
  235. package/dist/particles/footer-link-group/footer-link-group.js.map +1 -1
  236. package/dist/particles/incentives/incentives.d.ts +6 -2
  237. package/dist/particles/incentives/incentives.js +7 -2
  238. package/dist/particles/incentives/incentives.js.map +1 -1
  239. package/dist/particles/logo/logo.d.ts +3 -2
  240. package/dist/particles/logo/logo.js +20 -8
  241. package/dist/particles/logo/logo.js.map +1 -1
  242. package/dist/particles/navigation-link/navigation-link.d.ts +2 -3
  243. package/dist/particles/navigation-link/navigation-link.js +4 -4
  244. package/dist/particles/navigation-link/navigation-link.js.map +1 -1
  245. package/dist/particles/navigation-link-list/navigation-link-list.d.ts +6 -2
  246. package/dist/particles/navigation-link-list/navigation-link-list.js +18 -7
  247. package/dist/particles/navigation-link-list/navigation-link-list.js.map +1 -1
  248. package/dist/particles/order-details-back/order-details-back.d.ts +28 -0
  249. package/dist/particles/order-details-back/order-details-back.js +52 -0
  250. package/dist/particles/order-details-back/order-details-back.js.map +1 -0
  251. package/dist/particles/order-status-badge/order-status-badge.d.ts +19 -0
  252. package/dist/particles/order-status-badge/order-status-badge.js +50 -0
  253. package/dist/particles/order-status-badge/order-status-badge.js.map +1 -0
  254. package/dist/particles/phone-field/phone-field.js +2 -2
  255. package/dist/particles/phone-field/phone-field.js.map +1 -1
  256. package/dist/particles/select/select.js +6 -6
  257. package/dist/particles/select/select.js.map +1 -1
  258. package/dist/particles/toast/toast.d.ts +1 -1
  259. package/dist/particles/toast/toast.js +32 -6
  260. package/dist/particles/toast/toast.js.map +1 -1
  261. package/dist/schema.graphql +1014 -28
  262. package/dist/sdk/actions/address-action-provider.d.ts +16 -0
  263. package/dist/sdk/actions/address-action-provider.js +20 -0
  264. package/dist/sdk/actions/address-action-provider.js.map +1 -0
  265. package/dist/sdk/actions/analytics-action-provider.js +1 -1
  266. package/dist/sdk/actions/index.d.ts +3 -1
  267. package/dist/sdk/actions/index.js +3 -1
  268. package/dist/sdk/actions/order-action-provider.d.ts +12 -0
  269. package/dist/sdk/actions/order-action-provider.js +16 -0
  270. package/dist/sdk/actions/order-action-provider.js.map +1 -0
  271. package/dist/sdk/actions/types.d.ts +6 -2
  272. package/dist/sdk/address/address-fields.js +38 -0
  273. package/dist/sdk/address/address-fields.js.map +1 -0
  274. package/dist/sdk/address/checkout-readiness.js +17 -0
  275. package/dist/sdk/address/checkout-readiness.js.map +1 -0
  276. package/dist/sdk/address/constants.js +60 -0
  277. package/dist/sdk/address/constants.js.map +1 -0
  278. package/dist/sdk/address/country-display.js +19 -0
  279. package/dist/sdk/address/country-display.js.map +1 -0
  280. package/dist/sdk/address/country-rules.js +30 -0
  281. package/dist/sdk/address/country-rules.js.map +1 -0
  282. package/dist/sdk/address/format-address.js +18 -0
  283. package/dist/sdk/address/format-address.js.map +1 -0
  284. package/dist/sdk/address/iso-countries.js +262 -0
  285. package/dist/sdk/address/iso-countries.js.map +1 -0
  286. package/dist/sdk/address/layouts.js +56 -0
  287. package/dist/sdk/address/layouts.js.map +1 -0
  288. package/dist/sdk/address/messages.js +97 -0
  289. package/dist/sdk/address/messages.js.map +1 -0
  290. package/dist/sdk/address/operations.d.ts +54 -0
  291. package/dist/sdk/address/operations.js +83 -0
  292. package/dist/sdk/address/operations.js.map +1 -0
  293. package/dist/sdk/address/postal-code-lookup-operations.js +23 -0
  294. package/dist/sdk/address/postal-code-lookup-operations.js.map +1 -0
  295. package/dist/sdk/address/postal-code.js +11 -0
  296. package/dist/sdk/address/postal-code.js.map +1 -0
  297. package/dist/sdk/address/schema.js +14 -0
  298. package/dist/sdk/address/schema.js.map +1 -0
  299. package/dist/sdk/address/server-fields.js +25 -0
  300. package/dist/sdk/address/server-fields.js.map +1 -0
  301. package/dist/sdk/address/switch-country.js +57 -0
  302. package/dist/sdk/address/switch-country.js.map +1 -0
  303. package/dist/sdk/address/types.d.ts +26 -0
  304. package/dist/sdk/address/use-address-actions.d.ts +29 -0
  305. package/dist/sdk/address/use-address-actions.js +247 -0
  306. package/dist/sdk/address/use-address-actions.js.map +1 -0
  307. package/dist/sdk/address/use-address-by-postal-code.js +57 -0
  308. package/dist/sdk/address/use-address-by-postal-code.js.map +1 -0
  309. package/dist/sdk/address/validate-address.js +62 -0
  310. package/dist/sdk/address/validate-address.js.map +1 -0
  311. package/dist/sdk/cache/storefront-cache.js +29 -4
  312. package/dist/sdk/cache/storefront-cache.js.map +1 -1
  313. package/dist/sdk/client/fetch-page-data.d.ts +11 -0
  314. package/dist/sdk/client/fetch-page-data.js +12 -1
  315. package/dist/sdk/client/fetch-page-data.js.map +1 -1
  316. package/dist/sdk/content/create-content-runtime.js +1 -8
  317. package/dist/sdk/content/create-content-runtime.js.map +1 -1
  318. package/dist/sdk/data/failed-fields.js +23 -0
  319. package/dist/sdk/data/failed-fields.js.map +1 -0
  320. package/dist/sdk/data/index.js +2 -2
  321. package/dist/sdk/data/page-reactive-data-root.d.ts +45 -7
  322. package/dist/sdk/data/page-reactive-data-root.js +88 -12
  323. package/dist/sdk/data/page-reactive-data-root.js.map +1 -1
  324. package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
  325. package/dist/sdk/generated/fragment-types.js +2 -0
  326. package/dist/sdk/generated/fragment-types.js.map +1 -1
  327. package/dist/sdk/generated/gql.js +3 -1
  328. package/dist/sdk/generated/gql.js.map +1 -1
  329. package/dist/sdk/generated/graphql.d.ts +8 -0
  330. package/dist/sdk/generated/graphql.js +212 -1
  331. package/dist/sdk/generated/graphql.js.map +1 -1
  332. package/dist/sdk/i18n/messages/en-US.js +138 -1
  333. package/dist/sdk/i18n/messages/en-US.json +138 -1
  334. package/dist/sdk/i18n/messages/en-US.json.d.ts +137 -0
  335. package/dist/sdk/i18n/messages/es-ES.js +138 -1
  336. package/dist/sdk/i18n/messages/es-ES.json +138 -1
  337. package/dist/sdk/i18n/messages/pt-BR.js +138 -1
  338. package/dist/sdk/i18n/messages/pt-BR.json +138 -1
  339. package/dist/sdk/navigation/current-page.js +30 -0
  340. package/dist/sdk/navigation/current-page.js.map +1 -0
  341. package/dist/sdk/navigation/not-found-log.d.ts +28 -0
  342. package/dist/sdk/navigation/not-found-log.js +133 -0
  343. package/dist/sdk/navigation/not-found-log.js.map +1 -0
  344. package/dist/sdk/navigation/path.js +25 -0
  345. package/dist/sdk/navigation/path.js.map +1 -0
  346. package/dist/sdk/navigation/redirect.d.ts +11 -0
  347. package/dist/sdk/navigation/redirect.js +22 -0
  348. package/dist/sdk/navigation/redirect.js.map +1 -0
  349. package/dist/sdk/navigation/report.js +70 -0
  350. package/dist/sdk/navigation/report.js.map +1 -0
  351. package/dist/sdk/navigation/resolve-storefront-href.d.ts +12 -0
  352. package/dist/sdk/navigation/resolve-storefront-href.js +214 -0
  353. package/dist/sdk/navigation/resolve-storefront-href.js.map +1 -0
  354. package/dist/sdk/navigation/route-identity-provider.d.ts +11 -0
  355. package/dist/sdk/navigation/route-identity-provider.js +20 -0
  356. package/dist/sdk/navigation/route-identity-provider.js.map +1 -0
  357. package/dist/sdk/navigation/route-map-provider.d.ts +19 -0
  358. package/dist/sdk/navigation/route-map-provider.js +29 -0
  359. package/dist/sdk/navigation/route-map-provider.js.map +1 -0
  360. package/dist/sdk/navigation/storefront-link.d.ts +16 -0
  361. package/dist/sdk/navigation/storefront-link.js +66 -0
  362. package/dist/sdk/navigation/storefront-link.js.map +1 -0
  363. package/dist/sdk/navigation/types.d.ts +45 -0
  364. package/dist/sdk/navigation/use-storefront-navigation.d.ts +26 -0
  365. package/dist/sdk/navigation/use-storefront-navigation.js +73 -0
  366. package/dist/sdk/navigation/use-storefront-navigation.js.map +1 -0
  367. package/dist/sdk/navigation/use-storefront-route.d.ts +26 -0
  368. package/dist/sdk/navigation/use-storefront-route.js +87 -0
  369. package/dist/sdk/navigation/use-storefront-route.js.map +1 -0
  370. package/dist/sdk/navigation/use-storefront-search-params.d.ts +11 -0
  371. package/dist/sdk/navigation/use-storefront-search-params.js +16 -0
  372. package/dist/sdk/navigation/use-storefront-search-params.js.map +1 -0
  373. package/dist/sdk/orders/completion-badge.d.ts +8 -0
  374. package/dist/sdk/orders/completion-badge.js +47 -0
  375. package/dist/sdk/orders/completion-badge.js.map +1 -0
  376. package/dist/sdk/orders/order-operations.d.ts +19 -0
  377. package/dist/sdk/orders/order-operations.js +21 -0
  378. package/dist/sdk/orders/order-operations.js.map +1 -0
  379. package/dist/sdk/orders/use-order-actions.d.ts +23 -0
  380. package/dist/sdk/orders/use-order-actions.js +62 -0
  381. package/dist/sdk/orders/use-order-actions.js.map +1 -0
  382. package/dist/sdk/payment/gateway-origin.js +26 -13
  383. package/dist/sdk/payment/gateway-origin.js.map +1 -1
  384. package/dist/sdk/payment/gateway.d.ts +14 -2
  385. package/dist/sdk/payment/gateway.js +32 -14
  386. package/dist/sdk/payment/gateway.js.map +1 -1
  387. package/dist/sdk/payment/operations.js +11 -0
  388. package/dist/sdk/payment/operations.js.map +1 -1
  389. package/dist/sdk/payment/submission-registry.d.ts +2 -1
  390. package/dist/sdk/payment/submission-registry.js +12 -8
  391. package/dist/sdk/payment/submission-registry.js.map +1 -1
  392. package/dist/sdk/payment/use-payment-actions.d.ts +5 -3
  393. package/dist/sdk/payment/use-payment-actions.js +5 -2
  394. package/dist/sdk/payment/use-payment-actions.js.map +1 -1
  395. package/dist/sdk/payment/use-place-order.d.ts +6 -3
  396. package/dist/sdk/payment/use-place-order.js +333 -143
  397. package/dist/sdk/payment/use-place-order.js.map +1 -1
  398. package/dist/sdk/seo/page-alternates.d.ts +55 -0
  399. package/dist/sdk/seo/page-alternates.js +132 -0
  400. package/dist/sdk/seo/page-alternates.js.map +1 -0
  401. package/dist/utils/own-value.js +19 -0
  402. package/dist/utils/own-value.js.map +1 -0
  403. package/dist/utils/safe-href.d.ts +4 -4
  404. package/dist/utils/safe-href.js +31 -22
  405. package/dist/utils/safe-href.js.map +1 -1
  406. package/package.json +5 -1
  407. package/skills/storefront-asset/SKILL.md +111 -0
  408. package/skills/storefront-asset/references/api-side.md +153 -0
  409. package/skills/storefront-asset/references/findings.md +40 -0
  410. package/skills/storefront-asset/references/ui-side.md +94 -0
  411. package/src/styles/tailwind.css +27 -0
@@ -11,12 +11,13 @@ function useCardCapture() {
11
11
  return ctx;
12
12
  }
13
13
  /** Registers on mount and on any argument change, so the provider always holds the latest closure. */
14
- function useRegisterCardCapture(capture, preflight) {
14
+ function useRegisterCardCapture(capture, preflight, explainMissingMethod) {
15
15
  const { registerCapture } = useCardCapture();
16
- useEffect(() => registerCapture(capture, preflight), [
16
+ useEffect(() => registerCapture(capture, preflight, explainMissingMethod), [
17
17
  registerCapture,
18
18
  capture,
19
- preflight
19
+ preflight,
20
+ explainMissingMethod
20
21
  ]);
21
22
  }
22
23
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"card-capture.js","names":[],"sources":["../../../src/matter/card-entry/card-capture.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext, useEffect } from 'react';\nimport type { PaymentSubmissionPath } from '../../sdk/payment/submission-registry.js';\n\n/**\n * The `card-capture` context (specs/sfs-3457-card-entry-card-capture-context.md): everything\n * `CardEntry` needs from whichever surface composes it. The fields own the card values; the provider\n * owns the accepted networks, when a capture runs, and where the card goes. This is the PCI context:\n * `CardEntry` is its only consumer.\n */\n\nexport type CardCaptureValidator = Readonly<{\n numberMask: string | null;\n numberRegex: string | null;\n cvvMask: string | null;\n cvvRegex: string | null;\n cvvRequired: boolean;\n expirationRequired: boolean;\n holderNameRequired: boolean;\n}>;\n\n/** One accepted network and its validation rules. `PaymentSectionMethod` is assignable to it. */\nexport type CardCaptureNetwork = Readonly<{\n id: string;\n name: string;\n validator: CardCaptureValidator;\n}>;\n\n/** The card as the fields hold it. Exists only as the argument of one `send` call. */\nexport type CapturedCard = Readonly<{\n number: string;\n securityCode: string;\n expirationDate: string;\n holderName: string;\n}>;\n\nexport type CardCaptureError = Readonly<{ code: string; message: string }>;\n\nexport type CardCaptureTarget = (card: CapturedCard) => Promise<readonly CardCaptureError[]>;\n\n/** Registered by `CardEntry`; the provider calls it with the target for this one submission. */\nexport type CardCapture = (send: CardCaptureTarget) => Promise<readonly CardCaptureError[]>;\n\n/** Synchronous, I/O-free verdict on the draft, with the same contract as `PaymentPreflightCheck`. */\nexport type CardCapturePreflight = () => readonly CardCaptureError[];\n\n/** The checkout facts `CardEntry` reacts to. Absent outside the checkout. */\nexport type CardCaptureSelection = Readonly<{\n selectMethod: (input: { methodId: string; bin: string }) => void;\n selectNewCard: () => void;\n setDraftBin: (bin: string | null) => void;\n path: PaymentSubmissionPath | null;\n bin: string | null;\n collapsed: boolean;\n cardModeActive: boolean;\n selectedMethodId: string | null;\n selectionOutOfScope: boolean;\n selectionNonCard: boolean;\n}>;\n\nexport type CardCaptureContextValue = Readonly<{\n networks: readonly CardCaptureNetwork[];\n busy: boolean;\n /** When `CardEntry` clears its fields after the target settles. A pre-flight refusal never clears. */\n clearOn: 'success' | 'any-outcome';\n /** Registers the capture and its pre-flight check. Returns the unregister function. */\n registerCapture: (capture: CardCapture, preflight: CardCapturePreflight) => () => void;\n /** Called with the resolved network's id, or `null`, whenever that resolution changes. */\n onNetworkChange?: (networkId: string | null) => void;\n selection?: CardCaptureSelection;\n}>;\n\nconst CARD_CAPTURE_CONTEXT_UNSET = Symbol('CardCaptureContextUnset');\n\nconst CardCaptureContextInternal = createContext<CardCaptureContextValue | typeof CARD_CAPTURE_CONTEXT_UNSET>(\n CARD_CAPTURE_CONTEXT_UNSET,\n);\n\nexport const CardCaptureContext = CardCaptureContextInternal as React.Context<CardCaptureContextValue>;\n\n/** Throws outside a provider, mirroring `usePayment()`: a misplaced `CardEntry` is a composition bug. */\nexport function useCardCapture(): CardCaptureContextValue {\n const ctx = useContext(CardCaptureContextInternal);\n if (ctx === CARD_CAPTURE_CONTEXT_UNSET) {\n throw new Error(\n 'useCardCapture() must be used inside a card-capture provider (PaymentSectionRoot, PaymentSectionController).',\n );\n }\n return ctx;\n}\n\n/** Registers on mount and on any argument change, so the provider always holds the latest closure. */\nexport function useRegisterCardCapture(capture: CardCapture, preflight: CardCapturePreflight): void {\n const { registerCapture } = useCardCapture();\n\n useEffect(() => registerCapture(capture, preflight), [registerCapture, capture, preflight]);\n}\n"],"mappings":";;;AAyEA,MAAM,6BAA6B,OAAO,yBAAyB;AAEnE,MAAM,6BAA6B,cACjC,0BACF;AAEA,MAAa,qBAAqB;;AAGlC,SAAgB,iBAA0C;CACxD,MAAM,MAAM,WAAW,0BAA0B;CACjD,IAAI,QAAQ,4BACV,MAAM,IAAI,MACR,8GACF;CAEF,OAAO;AACT;;AAGA,SAAgB,uBAAuB,SAAsB,WAAuC;CAClG,MAAM,EAAE,oBAAoB,eAAe;CAE3C,gBAAgB,gBAAgB,SAAS,SAAS,GAAG;EAAC;EAAiB;EAAS;CAAS,CAAC;AAC5F"}
1
+ {"version":3,"file":"card-capture.js","names":[],"sources":["../../../src/matter/card-entry/card-capture.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext, useEffect } from 'react';\nimport type { PaymentSubmissionPath } from '../../sdk/payment/submission-registry.js';\n\n/**\n * The `card-capture` context (specs/sfs-3457-card-entry-card-capture-context.md): everything\n * `CardEntry` needs from whichever surface composes it. The fields own the card values; the provider\n * owns the accepted networks, when a capture runs, and where the card goes. This is the PCI context:\n * `CardEntry` is its only consumer.\n */\n\nexport type CardCaptureValidator = Readonly<{\n numberMask: string | null;\n numberRegex: string | null;\n cvvMask: string | null;\n cvvRegex: string | null;\n cvvRequired: boolean;\n expirationRequired: boolean;\n holderNameRequired: boolean;\n}>;\n\n/** One accepted network and its validation rules. `PaymentSectionMethod` is assignable to it. */\nexport type CardCaptureNetwork = Readonly<{\n id: string;\n name: string;\n validator: CardCaptureValidator;\n}>;\n\n/** The card as the fields hold it. Exists only as the argument of one `send` call. */\nexport type CapturedCard = Readonly<{\n number: string;\n securityCode: string;\n expirationDate: string;\n holderName: string;\n}>;\n\nexport type CardCaptureError = Readonly<{ code: string; message: string }>;\n\n/**\n * What a capture and its target resolve (T112). `reachedGateway` is `false` only when no request was\n * issued — `CardEntry`'s own refusals set it, and a target passes through whatever its transport reports.\n * Kept local rather than imported from the SDK: `CardEntry` is surface-agnostic, and the account will\n * tokenize through the same context.\n */\nexport type CardCaptureResult = Readonly<{ reachedGateway: boolean; userErrors: readonly CardCaptureError[] }>;\n\nexport type CardCaptureTarget = (card: CapturedCard) => Promise<CardCaptureResult>;\n\n/** Registered by `CardEntry`; the provider calls it with the target for this one submission. */\nexport type CardCapture = (send: CardCaptureTarget) => Promise<CardCaptureResult>;\n\n/** Synchronous, I/O-free verdict on the draft, with the same contract as `PaymentPreflightCheck`. */\nexport type CardCapturePreflight = () => readonly CardCaptureError[];\n\n/**\n * Synchronous, side-effect-free explanation of why no payment method is selected (T47), with the same\n * contract as `PaymentMissingMethodExplainer`: returns the refusal that names the card as the reason, or\n * `null`. Fixed copy and a fixed code only; it never echoes anything the shopper typed.\n */\nexport type CardCaptureMissingMethodExplainer = () => CardCaptureError | null;\n\n/** The checkout facts `CardEntry` reacts to. Absent outside the checkout. */\nexport type CardCaptureSelection = Readonly<{\n selectMethod: (input: { methodId: string; bin: string }) => void;\n selectNewCard: () => void;\n setDraftBin: (bin: string | null) => void;\n path: PaymentSubmissionPath | null;\n bin: string | null;\n collapsed: boolean;\n cardModeActive: boolean;\n selectedMethodId: string | null;\n selectionOutOfScope: boolean;\n selectionNonCard: boolean;\n}>;\n\nexport type CardCaptureContextValue = Readonly<{\n networks: readonly CardCaptureNetwork[];\n busy: boolean;\n /** When `CardEntry` clears its fields after the target settles. A pre-flight refusal never clears. */\n clearOn: 'success' | 'any-outcome';\n /** Registers the capture, its pre-flight check and, optionally, its missing-method explainer. Returns the unregister function. */\n registerCapture: (\n capture: CardCapture,\n preflight: CardCapturePreflight,\n explainMissingMethod?: CardCaptureMissingMethodExplainer,\n ) => () => void;\n /** Called with the resolved network's id, or `null`, whenever that resolution changes. */\n onNetworkChange?: (networkId: string | null) => void;\n selection?: CardCaptureSelection;\n}>;\n\nconst CARD_CAPTURE_CONTEXT_UNSET = Symbol('CardCaptureContextUnset');\n\nconst CardCaptureContextInternal = createContext<CardCaptureContextValue | typeof CARD_CAPTURE_CONTEXT_UNSET>(\n CARD_CAPTURE_CONTEXT_UNSET,\n);\n\nexport const CardCaptureContext = CardCaptureContextInternal as React.Context<CardCaptureContextValue>;\n\n/** Throws outside a provider, mirroring `usePayment()`: a misplaced `CardEntry` is a composition bug. */\nexport function useCardCapture(): CardCaptureContextValue {\n const ctx = useContext(CardCaptureContextInternal);\n if (ctx === CARD_CAPTURE_CONTEXT_UNSET) {\n throw new Error(\n 'useCardCapture() must be used inside a card-capture provider (PaymentSectionRoot, PaymentSectionController).',\n );\n }\n return ctx;\n}\n\n/** Registers on mount and on any argument change, so the provider always holds the latest closure. */\nexport function useRegisterCardCapture(\n capture: CardCapture,\n preflight: CardCapturePreflight,\n explainMissingMethod?: CardCaptureMissingMethodExplainer,\n): void {\n const { registerCapture } = useCardCapture();\n\n useEffect(\n () => registerCapture(capture, preflight, explainMissingMethod),\n [registerCapture, capture, preflight, explainMissingMethod],\n );\n}\n"],"mappings":";;;AA4FA,MAAM,6BAA6B,OAAO,yBAAyB;AAEnE,MAAM,6BAA6B,cACjC,0BACF;AAEA,MAAa,qBAAqB;;AAGlC,SAAgB,iBAA0C;CACxD,MAAM,MAAM,WAAW,0BAA0B;CACjD,IAAI,QAAQ,4BACV,MAAM,IAAI,MACR,8GACF;CAEF,OAAO;AACT;;AAGA,SAAgB,uBACd,SACA,WACA,sBACM;CACN,MAAM,EAAE,oBAAoB,eAAe;CAE3C,gBACQ,gBAAgB,SAAS,WAAW,oBAAoB,GAC9D;EAAC;EAAiB;EAAS;EAAW;CAAoB,CAC5D;AACF"}
@@ -44,9 +44,11 @@ export type CardEntryProps = {
44
44
  cvvDescription?: string;
45
45
  /** Shown on the number field when it is left blank. */
46
46
  numberRequiredMessage?: string;
47
- /** Shown on the number field for a Luhn-invalid PAN, or a Luhn-valid one that matches no
48
- * configured method (FR-3 — the same string covers both sites). */
47
+ /** Shown on the number field for a Luhn-invalid PAN, or a Luhn-valid one that a configured
48
+ * network claims only as a prefix (the wrong length, or two networks at once). */
49
49
  numberInvalidMessage?: string;
50
+ /** Shown on the number field for a Luhn-valid PAN that no configured network claims at all. */
51
+ networkNotAcceptedMessage?: string;
50
52
  /** Shown on the holder-name field when it is left blank and the detected method requires it. */
51
53
  holderNameRequiredMessage?: string;
52
54
  /** Shown on the expiration field when it is left blank and the detected method requires it. */
@@ -115,6 +117,6 @@ export declare const CARD_ENTRY_INVALID_DATA_CODE = "INVALID_CARD_DATA";
115
117
  */
116
118
  export declare const CARD_ENTRY_COLLAPSED_CODE = "CARD_ENTRY_COLLAPSED";
117
119
  export declare const CardEntryDefinition: ComponentDefinition<CardEntryProps>;
118
- export declare function CardEntry({ legend, numberLabel, numberPlaceholder, holderNameLabel, holderNamePlaceholder, expirationLabel, expirationPlaceholder, cvvLabel, cvvPlaceholder, cvvDescription, numberRequiredMessage, numberInvalidMessage, holderNameRequiredMessage, expirationRequiredMessage, expirationInvalidMessage, expirationExpiredMessage, cvvRequiredMessage, cvvInvalidMessage, disabled, className }: CardEntryProps): import("react/jsx-runtime").JSX.Element;
120
+ export declare function CardEntry({ legend, numberLabel, numberPlaceholder, holderNameLabel, holderNamePlaceholder, expirationLabel, expirationPlaceholder, cvvLabel, cvvPlaceholder, cvvDescription, numberRequiredMessage, numberInvalidMessage, networkNotAcceptedMessage, holderNameRequiredMessage, expirationRequiredMessage, expirationInvalidMessage, expirationExpiredMessage, cvvRequiredMessage, cvvInvalidMessage, disabled, className }: Readonly<CardEntryProps>): import("react/jsx-runtime").JSX.Element;
119
121
  //#endregion
120
122
  //# sourceMappingURL=card-entry.d.ts.map
@@ -8,6 +8,7 @@ import { useCardCapture, useRegisterCardCapture } from "./card-capture.js";
8
8
  import { applyMask } from "../../particles/shared/input-mask.js";
9
9
  import "../../particles/document-field/document-field.js";
10
10
  import { SECURITY_CODE_MASK_STYLE, isSecurityCodeComplete } from "../../sdk/payment/security-code-mask.js";
11
+ import { ownValue } from "../../utils/own-value.js";
11
12
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
12
13
  import { jsx, jsxs } from "react/jsx-runtime";
13
14
  //#region src/matter/card-entry/card-entry.tsx
@@ -211,11 +212,11 @@ const NETWORK_ICON_BY_KEY = {
211
212
  americanexpress: "amex",
212
213
  diners: "diners",
213
214
  dinersclub: "diners",
214
- elo: "elo-card"
215
+ elo: "elo-card",
216
+ discover: "discover"
215
217
  };
216
218
  function networkIconName(name) {
217
- const key = name.toLowerCase().replace(/[^a-z]/g, "");
218
- return NETWORK_ICON_BY_KEY[key] ?? null;
219
+ return ownValue(NETWORK_ICON_BY_KEY, name.toLowerCase().replaceAll(/[^a-z]/g, "")) ?? null;
219
220
  }
220
221
  /**
221
222
  * Standard Luhn checksum. Rejects non-digit strings and anything shorter than 12 digits — no real
@@ -301,24 +302,45 @@ function isValidCvv(value, validator) {
301
302
  function isCardShapedMethod(method) {
302
303
  return Boolean(method.validator.numberRegex);
303
304
  }
304
- function validateDraft(draft, validator, methods, messages) {
305
- const errors = {};
305
+ /**
306
+ * Whether a typed number is a well-formed card that no configured network accepts (T47, Decision 1): it is
307
+ * Luhn-valid, detection could have run (at least one method carries a `numberRegex`, the N2 rule), no
308
+ * network's exact pattern matches the digits, and no network claims them even as a BIN-level prefix. A prefix
309
+ * a network claims at the wrong length, or one two networks claim, is a malformed number rather than an
310
+ * unaccepted one and stays `false`. Pure: reads nothing but its arguments, and returns a boolean.
311
+ */
312
+ function matchesNoConfiguredNetwork(methods, digits) {
313
+ return isValidLuhn(digits) && methods.some(isCardShapedMethod) && exactMatch(methods, digits) === null && relaxedCandidates(methods, digits).length === 0;
314
+ }
315
+ function validateNumber(draft, validator, methods, messages) {
306
316
  const digits = toDigits(draft.number);
307
317
  const networkDetectionPossible = methods.some(isCardShapedMethod);
308
- if (!digits) errors.number = messages.numberRequired;
309
- else if (!isValidLuhn(digits)) errors.number = messages.numberInvalid;
310
- else if (networkDetectionPossible && !(validator.numberRegex && safeTest(validator.numberRegex, digits))) errors.number = messages.numberInvalid;
311
- if (validator.holderNameRequired && !draft.holderName.trim()) errors.holderName = messages.holderNameRequired;
312
- if (validator.expirationRequired) {
313
- if (!draft.expiration.trim()) errors.expiration = messages.expirationRequired;
314
- else if (!isExpirationFormatValid(draft.expiration)) errors.expiration = messages.expirationInvalid;
315
- else if (!isExpirationInFuture(draft.expiration)) errors.expiration = messages.expirationExpired;
316
- }
317
- if (validator.cvvRequired) {
318
- if (!draft.cvv.trim()) errors.cvv = messages.cvvRequired;
319
- else if (!isValidCvv(draft.cvv, validator)) errors.cvv = messages.cvvInvalid;
320
- }
321
- return errors;
318
+ if (!digits) return { number: messages.numberRequired };
319
+ if (!isValidLuhn(digits)) return { number: messages.numberInvalid };
320
+ if (networkDetectionPossible && !(validator.numberRegex && safeTest(validator.numberRegex, digits))) return { number: matchesNoConfiguredNetwork(methods, digits) ? messages.networkNotAccepted : messages.numberInvalid };
321
+ return {};
322
+ }
323
+ function validateExpiration(draft, validator, messages) {
324
+ if (!validator.expirationRequired) return {};
325
+ if (!draft.expiration.trim()) return { expiration: messages.expirationRequired };
326
+ if (!isExpirationFormatValid(draft.expiration)) return { expiration: messages.expirationInvalid };
327
+ if (!isExpirationInFuture(draft.expiration)) return { expiration: messages.expirationExpired };
328
+ return {};
329
+ }
330
+ function validateCvv(draft, validator, messages) {
331
+ if (!validator.cvvRequired) return {};
332
+ if (!draft.cvv.trim()) return { cvv: messages.cvvRequired };
333
+ if (!isValidCvv(draft.cvv, validator)) return { cvv: messages.cvvInvalid };
334
+ return {};
335
+ }
336
+ function validateDraft(draft, validator, methods, messages) {
337
+ const holderNameError = validator.holderNameRequired && !draft.holderName.trim() ? { holderName: messages.holderNameRequired } : {};
338
+ return {
339
+ ...validateNumber(draft, validator, methods, messages),
340
+ ...holderNameError,
341
+ ...validateExpiration(draft, validator, messages),
342
+ ...validateCvv(draft, validator, messages)
343
+ };
322
344
  }
323
345
  const CARD_ENTRY_INVALID_DATA_CODE = "INVALID_CARD_DATA";
324
346
  const INVALID_CARD_DATA_ERROR = {
@@ -338,6 +360,18 @@ const CARD_ENTRY_COLLAPSED_ERROR = {
338
360
  code: CARD_ENTRY_COLLAPSED_CODE,
339
361
  message: "This card is not available for the currently selected payment method."
340
362
  };
363
+ /**
364
+ * The refusal for a well-formed card number no configured network accepts (T47, Decision 2). Minted here,
365
+ * not in `use-place-order.ts`, because `CARD_FIELD_PATTERN` forbids the word "card" anywhere in that file:
366
+ * the hook only passes along whatever refusal a registered explainer names. Fixed copy and a fixed code —
367
+ * nothing derived from the typed number (digits, BIN, last four, length, a guessed network) may ever be
368
+ * added to the message or to a log line.
369
+ */
370
+ const CARD_ENTRY_UNSUPPORTED_NETWORK_CODE = "UNSUPPORTED_CARD_NETWORK";
371
+ const UNSUPPORTED_NETWORK_ERROR = {
372
+ code: CARD_ENTRY_UNSUPPORTED_NETWORK_CODE,
373
+ message: "This card is not from a network the store accepts. Use another card or choose another payment method."
374
+ };
341
375
  const CardEntryDefinition = defineComponent({
342
376
  name: "CardEntry",
343
377
  importPath: "@vtex/faststore/components",
@@ -406,6 +440,11 @@ const CardEntryDefinition = defineComponent({
406
440
  default: "Enter a valid card number",
407
441
  label: "Number invalid message"
408
442
  },
443
+ networkNotAcceptedMessage: {
444
+ type: "string",
445
+ default: "This card is not from a network the store accepts",
446
+ label: "Network not accepted message"
447
+ },
409
448
  holderNameRequiredMessage: {
410
449
  type: "string",
411
450
  default: "Cardholder name is required",
@@ -444,7 +483,7 @@ const CardEntryDefinition = defineComponent({
444
483
  },
445
484
  guideline: "New-card entry: masked number with live network detection, holder name, expiration, and CVV, each shown and required per the detected network's validator config from the 'card-capture' context. Must be placed inside a card-capture provider: PaymentSectionRoot or PaymentSectionController at checkout. Owns the card values itself — it builds the card and hands it only to the submission target its provider supplies; no other component ever needs the card number or CVV. Card number and CVV are never schema props, fragment fields, or action payloads — do not add one. See card-entry.md."
446
485
  });
447
- function CardEntry({ legend = "Card details", numberLabel = "Card number", numberPlaceholder, holderNameLabel = "Cardholder name", holderNamePlaceholder, expirationLabel = "Expiration date", expirationPlaceholder = "MM/YY", cvvLabel = "Security code", cvvPlaceholder, cvvDescription = "The 3-4 digit number on your card", numberRequiredMessage = "Card number is required", numberInvalidMessage = "Enter a valid card number", holderNameRequiredMessage = "Cardholder name is required", expirationRequiredMessage = "Expiration date is required", expirationInvalidMessage = "Enter a valid expiration date", expirationExpiredMessage = "This card has expired", cvvRequiredMessage = "Security code is required", cvvInvalidMessage = "Enter a valid security code", disabled = false, className }) {
486
+ function CardEntry({ legend = "Card details", numberLabel = "Card number", numberPlaceholder, holderNameLabel = "Cardholder name", holderNamePlaceholder, expirationLabel = "Expiration date", expirationPlaceholder = "MM/YY", cvvLabel = "Security code", cvvPlaceholder, cvvDescription = "The 3-4 digit number on your card", numberRequiredMessage = "Card number is required", numberInvalidMessage = "Enter a valid card number", networkNotAcceptedMessage = "This card is not from a network the store accepts", holderNameRequiredMessage = "Cardholder name is required", expirationRequiredMessage = "Expiration date is required", expirationInvalidMessage = "Enter a valid expiration date", expirationExpiredMessage = "This card has expired", cvvRequiredMessage = "Security code is required", cvvInvalidMessage = "Enter a valid security code", disabled = false, className }) {
448
487
  const { networks: methods, busy: placing, clearOn, onNetworkChange, selection } = useCardCapture();
449
488
  const draftPath = selection?.path ?? null;
450
489
  const draftBin = selection?.bin ?? null;
@@ -457,6 +496,7 @@ function CardEntry({ legend = "Card details", numberLabel = "Card number", numbe
457
496
  const validationMessages = useMemo(() => ({
458
497
  numberRequired: numberRequiredMessage,
459
498
  numberInvalid: numberInvalidMessage,
499
+ networkNotAccepted: networkNotAcceptedMessage,
460
500
  holderNameRequired: holderNameRequiredMessage,
461
501
  expirationRequired: expirationRequiredMessage,
462
502
  expirationInvalid: expirationInvalidMessage,
@@ -466,6 +506,7 @@ function CardEntry({ legend = "Card details", numberLabel = "Card number", numbe
466
506
  }), [
467
507
  numberRequiredMessage,
468
508
  numberInvalidMessage,
509
+ networkNotAcceptedMessage,
469
510
  holderNameRequiredMessage,
470
511
  expirationRequiredMessage,
471
512
  expirationInvalidMessage,
@@ -641,7 +682,7 @@ function CardEntry({ legend = "Card details", numberLabel = "Card number", numbe
641
682
  setFieldErrors(errors);
642
683
  const firstInvalid = VALIDATION_ORDER.find((key) => errors[key]);
643
684
  if (firstInvalid) focusField(firstInvalid);
644
- return [INVALID_CARD_DATA_ERROR];
685
+ return [matchesNoConfiguredNetwork(methods, digits) ? UNSUPPORTED_NETWORK_ERROR : INVALID_CARD_DATA_ERROR];
645
686
  }, [
646
687
  collapsed,
647
688
  number,
@@ -650,6 +691,7 @@ function CardEntry({ legend = "Card details", numberLabel = "Card number", numbe
650
691
  cvv,
651
692
  validator,
652
693
  methods,
694
+ digits,
653
695
  focusField,
654
696
  validationMessages,
655
697
  selectionOutOfScope,
@@ -658,7 +700,10 @@ function CardEntry({ legend = "Card details", numberLabel = "Card number", numbe
658
700
  ]);
659
701
  const capture = useCallback(async (send) => {
660
702
  const refusals = checkDraft();
661
- if (refusals.length > 0) return refusals;
703
+ if (refusals.length > 0) return {
704
+ reachedGateway: false,
705
+ userErrors: refusals
706
+ };
662
707
  const card = {
663
708
  number,
664
709
  securityCode: cvv,
@@ -667,9 +712,9 @@ function CardEntry({ legend = "Card details", numberLabel = "Card number", numbe
667
712
  };
668
713
  let succeeded = false;
669
714
  try {
670
- const userErrors = await send(card);
671
- succeeded = userErrors.length === 0;
672
- return userErrors;
715
+ const result = await send(card);
716
+ succeeded = result.userErrors.length === 0;
717
+ return result;
673
718
  } finally {
674
719
  if (succeeded || clearOn === "any-outcome") {
675
720
  setNumber("");
@@ -686,7 +731,12 @@ function CardEntry({ legend = "Card details", numberLabel = "Card number", numbe
686
731
  cvv,
687
732
  clearOn
688
733
  ]);
689
- useRegisterCardCapture(capture, checkDraft);
734
+ const explainMissingMethod = useCallback(() => !collapsed && matchesNoConfiguredNetwork(methods, digits) ? UNSUPPORTED_NETWORK_ERROR : null, [
735
+ collapsed,
736
+ methods,
737
+ digits
738
+ ]);
739
+ useRegisterCardCapture(capture, checkDraft, explainMissingMethod);
690
740
  return /* @__PURE__ */ jsx("div", {
691
741
  hidden: collapsed,
692
742
  "data-fs-card-entry-collapse-boundary": "",
@@ -828,6 +878,6 @@ function CardEntry({ legend = "Card details", numberLabel = "Card number", numbe
828
878
  });
829
879
  }
830
880
  //#endregion
831
- export { CARD_ENTRY_COLLAPSED_CODE, CARD_ENTRY_INVALID_DATA_CODE, CardEntry, CardEntryDefinition, NETWORK_ICON_BY_KEY, detectNetworkMethod, isExpirationFormatValid, isExpirationInFuture, isValidLuhn, resolveCompleteBin, resolveNetworkMethod, shouldRedispatchOnReturnToNewCard };
881
+ export { CARD_ENTRY_COLLAPSED_CODE, CARD_ENTRY_INVALID_DATA_CODE, CARD_ENTRY_UNSUPPORTED_NETWORK_CODE, CardEntry, CardEntryDefinition, NETWORK_ICON_BY_KEY, detectNetworkMethod, isExpirationFormatValid, isExpirationInFuture, isValidLuhn, matchesNoConfiguredNetwork, resolveCompleteBin, resolveNetworkMethod, shouldRedispatchOnReturnToNewCard };
832
882
 
833
883
  //# sourceMappingURL=card-entry.js.map