@vtex/faststore 0.0.5 → 0.0.7

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 (326) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/dist/actions.json +181 -0
  3. package/dist/catalog.json +1673 -484
  4. package/dist/cli/UnreachableCaseError-Crd168Vu.js +10 -0
  5. package/dist/cli/UnreachableCaseError-Crd168Vu.js.map +1 -0
  6. package/dist/cli/cacheControl-CEojH_TM.js +158 -0
  7. package/dist/cli/cacheControl-CEojH_TM.js.map +1 -0
  8. package/dist/cli/cachePolicy-m2vASMRW.js +26 -0
  9. package/dist/cli/cachePolicy-m2vASMRW.js.map +1 -0
  10. package/dist/cli/computeCoreSchemaHash-DPJZj-qJ.js +10 -0
  11. package/dist/cli/computeCoreSchemaHash-DPJZj-qJ.js.map +1 -0
  12. package/dist/cli/default-BCQHcwbL.js +253 -0
  13. package/dist/cli/default-BCQHcwbL.js.map +1 -0
  14. package/dist/cli/disableSuggestions-yO9UqiWn.js +21 -0
  15. package/dist/cli/disableSuggestions-yO9UqiWn.js.map +1 -0
  16. package/dist/cli/dist-C1JhdHfo.js +2001 -0
  17. package/dist/cli/dist-C1JhdHfo.js.map +1 -0
  18. package/dist/cli/graphql-DG9thCDG.js +14589 -0
  19. package/dist/cli/graphql-DG9thCDG.js.map +1 -0
  20. package/dist/cli/index.d.ts +350 -0
  21. package/dist/cli/index.js +35047 -0
  22. package/dist/cli/index.js.map +1 -0
  23. package/dist/cli/index.min-BsIHDfFK.js +613 -0
  24. package/dist/cli/index.min-BsIHDfFK.js.map +1 -0
  25. package/dist/cli/inlineTrace-uLgOJ3TH.js +52 -0
  26. package/dist/cli/inlineTrace-uLgOJ3TH.js.map +1 -0
  27. package/dist/cli/internalPlugin-DnuwN4_4.js +11 -0
  28. package/dist/cli/internalPlugin-DnuwN4_4.js.map +1 -0
  29. package/dist/cli/packageVersion-DQAnIEil.js +6 -0
  30. package/dist/cli/packageVersion-DQAnIEil.js.map +1 -0
  31. package/dist/cli/rolldown-runtime-BMI-E3GI.js +44 -0
  32. package/dist/cli/schemaIsSubgraph-DoGh3OYj.js +17 -0
  33. package/dist/cli/schemaIsSubgraph-DoGh3OYj.js.map +1 -0
  34. package/dist/cli/schemaReporting-K-me-3-v.js +199 -0
  35. package/dist/cli/schemaReporting-K-me-3-v.js.map +1 -0
  36. package/dist/cli/server-runtime.js +49859 -0
  37. package/dist/cli/server-runtime.js.map +1 -0
  38. package/dist/cli/traceTreeBuilder-BIcV2U7b.js +9118 -0
  39. package/dist/cli/traceTreeBuilder-BIcV2U7b.js.map +1 -0
  40. package/dist/cli/usageReporting-Bpl8vSZX.js +10201 -0
  41. package/dist/cli/usageReporting-Bpl8vSZX.js.map +1 -0
  42. package/dist/cli/v4-CBhFvC49.js +42 -0
  43. package/dist/cli/v4-CBhFvC49.js.map +1 -0
  44. package/dist/client.d.ts +2 -1
  45. package/dist/client.js +2 -1
  46. package/dist/components.d.ts +32 -9
  47. package/dist/components.js +35 -14
  48. package/dist/content-types.json +93 -0
  49. package/dist/core/dist/define-component.d.ts +37 -0
  50. package/dist/core/dist/index.d.ts +2 -2
  51. package/dist/docs/access-code-sign-in.md +1 -1
  52. package/dist/docs/account-entry-point.md +1 -1
  53. package/dist/docs/account-menu-identity.md +160 -0
  54. package/dist/docs/account-menu.md +106 -23
  55. package/dist/docs/address-summary.md +24 -3
  56. package/dist/docs/alert-dialog.md +204 -0
  57. package/dist/docs/avatar.md +103 -0
  58. package/dist/docs/billing-address.md +284 -0
  59. package/dist/docs/card-entry.md +250 -0
  60. package/dist/docs/cardholder-document.md +142 -0
  61. package/dist/docs/client-preferences-fieldset.md +148 -0
  62. package/dist/docs/client-preferences.md +2 -1
  63. package/dist/docs/client-profile-fieldset.md +184 -0
  64. package/dist/docs/client-profile.md +1 -1
  65. package/dist/docs/document-field.md +58 -4
  66. package/dist/docs/field.md +317 -0
  67. package/dist/docs/form.md +307 -0
  68. package/dist/docs/identity-edit.md +6 -6
  69. package/dist/docs/identity-summary.md +5 -5
  70. package/dist/docs/installments.md +248 -0
  71. package/dist/docs/my-account-profile.md +2 -1
  72. package/dist/docs/order-placed-payment-summary.md +138 -0
  73. package/dist/docs/payment-method-badges.md +232 -0
  74. package/dist/docs/payment-methods.md +1 -0
  75. package/dist/docs/payment.md +218 -0
  76. package/dist/docs/phone-field.md +58 -4
  77. package/dist/docs/place-order.md +157 -0
  78. package/dist/docs/product-shelf.md +20 -13
  79. package/dist/docs/save-card.md +186 -0
  80. package/dist/docs/saved-cards.md +218 -0
  81. package/dist/docs/select.md +465 -0
  82. package/dist/docs/shipping-address.md +110 -258
  83. package/dist/index.d.ts +5 -2
  84. package/dist/internal/client.d.ts +3 -1
  85. package/dist/internal/client.js +4 -2
  86. package/dist/internal/content.d.ts +2 -2
  87. package/dist/internal/server.d.ts +4 -1
  88. package/dist/internal/server.js +4 -1
  89. package/dist/matter/access-code-sign-in/access-code-sign-in.js +9 -8
  90. package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -1
  91. package/dist/matter/account-access-gate/account-access-gate.js.map +1 -1
  92. package/dist/matter/account-entry-point/account-entry-point.js +1 -1
  93. package/dist/matter/account-entry-point/account-entry-point.js.map +1 -1
  94. package/dist/matter/account-menu/account-menu.d.ts +70 -0
  95. package/dist/matter/account-menu/account-menu.js +201 -9
  96. package/dist/matter/account-menu/account-menu.js.map +1 -1
  97. package/dist/matter/account-menu/sign-out-failure.js +50 -0
  98. package/dist/matter/account-menu/sign-out-failure.js.map +1 -0
  99. package/dist/matter/account-menu-identity/account-menu-identity.d.ts +21 -0
  100. package/dist/matter/account-menu-identity/account-menu-identity.js +88 -0
  101. package/dist/matter/account-menu-identity/account-menu-identity.js.map +1 -0
  102. package/dist/matter/billing-address/billing-address.d.ts +165 -0
  103. package/dist/matter/billing-address/billing-address.js +408 -0
  104. package/dist/matter/billing-address/billing-address.js.map +1 -0
  105. package/dist/matter/card-entry/card-capture.d.ts +25 -0
  106. package/dist/matter/card-entry/card-capture.js +25 -0
  107. package/dist/matter/card-entry/card-capture.js.map +1 -0
  108. package/dist/matter/card-entry/card-entry.d.ts +120 -0
  109. package/dist/matter/card-entry/card-entry.js +833 -0
  110. package/dist/matter/card-entry/card-entry.js.map +1 -0
  111. package/dist/matter/cardholder-document/cardholder-document.d.ts +45 -0
  112. package/dist/matter/cardholder-document/cardholder-document.js +70 -0
  113. package/dist/matter/cardholder-document/cardholder-document.js.map +1 -0
  114. package/dist/matter/cart/cart.js +1 -1
  115. package/dist/matter/client-preferences/client-preferences-fieldset.d.ts +77 -0
  116. package/dist/matter/client-preferences/client-preferences-fieldset.js +299 -0
  117. package/dist/matter/client-preferences/client-preferences-fieldset.js.map +1 -0
  118. package/dist/matter/client-preferences/client-preferences.d.ts +3 -5
  119. package/dist/matter/client-preferences/client-preferences.js +6 -6
  120. package/dist/matter/client-preferences/client-preferences.js.map +1 -1
  121. package/dist/matter/client-profile/client-profile.d.ts +4 -6
  122. package/dist/matter/client-profile/client-profile.js +9 -6
  123. package/dist/matter/client-profile/client-profile.js.map +1 -1
  124. package/dist/matter/client-profile-form/client-profile-fieldset.d.ts +119 -0
  125. package/dist/matter/client-profile-form/client-profile-fieldset.js +488 -0
  126. package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -0
  127. package/dist/matter/identity-edit/identity-edit.js +2 -2
  128. package/dist/matter/identity-edit/identity-edit.js.map +1 -1
  129. package/dist/matter/identity-summary/identity-summary.js +3 -2
  130. package/dist/matter/identity-summary/identity-summary.js.map +1 -1
  131. package/dist/matter/installments/installments-select.d.ts +42 -0
  132. package/dist/matter/installments/installments-select.js +167 -0
  133. package/dist/matter/installments/installments-select.js.map +1 -0
  134. package/dist/matter/installments/installments.d.ts +58 -0
  135. package/dist/matter/installments/installments.js +176 -0
  136. package/dist/matter/installments/installments.js.map +1 -0
  137. package/dist/matter/installments/use-installments-selection.d.ts +29 -0
  138. package/dist/matter/installments/use-installments-selection.js +95 -0
  139. package/dist/matter/installments/use-installments-selection.js.map +1 -0
  140. package/dist/matter/my-account-profile/my-account-profile.d.ts +3 -0
  141. package/dist/matter/my-account-profile/my-account-profile.js +6 -5
  142. package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
  143. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +63 -0
  144. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +305 -0
  145. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -0
  146. package/dist/matter/payment/payment-card-capture.d.ts +19 -0
  147. package/dist/matter/payment/payment-card-capture.js +129 -0
  148. package/dist/matter/payment/payment-card-capture.js.map +1 -0
  149. package/dist/matter/payment/payment-controller.d.ts +24 -0
  150. package/dist/matter/payment/payment-controller.js +108 -0
  151. package/dist/matter/payment/payment-controller.js.map +1 -0
  152. package/dist/matter/payment/payment-method-badges.d.ts +57 -0
  153. package/dist/matter/payment/payment-method-badges.js +192 -0
  154. package/dist/matter/payment/payment-method-badges.js.map +1 -0
  155. package/dist/matter/payment/payment.d.ts +89 -0
  156. package/dist/matter/payment/payment.js +264 -0
  157. package/dist/matter/payment/payment.js.map +1 -0
  158. package/dist/matter/payment/use-payment-method-selection.d.ts +302 -0
  159. package/dist/matter/payment/use-payment-method-selection.js +458 -0
  160. package/dist/matter/payment/use-payment-method-selection.js.map +1 -0
  161. package/dist/matter/payment/use-payment-submit-gate.d.ts +111 -0
  162. package/dist/matter/payment/use-payment-submit-gate.js +144 -0
  163. package/dist/matter/payment/use-payment-submit-gate.js.map +1 -0
  164. package/dist/matter/place-order/place-order.d.ts +74 -0
  165. package/dist/matter/place-order/place-order.js +379 -0
  166. package/dist/matter/place-order/place-order.js.map +1 -0
  167. package/dist/matter/product-list/product-list.d.ts +1 -0
  168. package/dist/matter/product-list/product-list.js.map +1 -1
  169. package/dist/matter/product-shelf/product-shelf.d.ts +62 -31
  170. package/dist/matter/product-shelf/product-shelf.js +159 -57
  171. package/dist/matter/product-shelf/product-shelf.js.map +1 -1
  172. package/dist/matter/region/region.js +1 -1
  173. package/dist/matter/region/region.js.map +1 -1
  174. package/dist/matter/save-card/save-card.d.ts +49 -0
  175. package/dist/matter/save-card/save-card.js +188 -0
  176. package/dist/matter/save-card/save-card.js.map +1 -0
  177. package/dist/matter/saved-cards/saved-cards.d.ts +79 -0
  178. package/dist/matter/saved-cards/saved-cards.js +388 -0
  179. package/dist/matter/saved-cards/saved-cards.js.map +1 -0
  180. package/dist/matter/shipping-address/country-descriptors.js +20 -10
  181. package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
  182. package/dist/matter/shipping-address/shipping-address.d.ts +113 -174
  183. package/dist/matter/shipping-address/shipping-address.js +480 -791
  184. package/dist/matter/shipping-address/shipping-address.js.map +1 -1
  185. package/dist/matter/variant-selector/variant-selector.js +1 -1
  186. package/dist/particles/address-summary/address-summary.d.ts +24 -0
  187. package/dist/particles/address-summary/address-summary.js +83 -2
  188. package/dist/particles/address-summary/address-summary.js.map +1 -1
  189. package/dist/particles/alert-dialog/alert-dialog.d.ts +68 -0
  190. package/dist/particles/alert-dialog/alert-dialog.js +187 -0
  191. package/dist/particles/alert-dialog/alert-dialog.js.map +1 -0
  192. package/dist/particles/avatar/avatar.d.ts +17 -0
  193. package/dist/particles/avatar/avatar.js +65 -0
  194. package/dist/particles/avatar/avatar.js.map +1 -0
  195. package/dist/particles/checkbox/checkbox.d.ts +7 -3
  196. package/dist/particles/checkbox/checkbox.js +4 -1
  197. package/dist/particles/checkbox/checkbox.js.map +1 -1
  198. package/dist/particles/document-field/document-field.d.ts +48 -5
  199. package/dist/particles/document-field/document-field.js +189 -32
  200. package/dist/particles/document-field/document-field.js.map +1 -1
  201. package/dist/particles/field/bound-field-registry.js +52 -0
  202. package/dist/particles/field/bound-field-registry.js.map +1 -0
  203. package/dist/particles/field/field.d.ts +116 -0
  204. package/dist/particles/field/field.js +497 -6
  205. package/dist/particles/field/field.js.map +1 -1
  206. package/dist/particles/fieldset/fieldset.js +2 -2
  207. package/dist/particles/fieldset/fieldset.js.map +1 -1
  208. package/dist/particles/form/form.d.ts +104 -0
  209. package/dist/particles/form/form.js +485 -0
  210. package/dist/particles/form/form.js.map +1 -0
  211. package/dist/particles/phone-field/phone-field.d.ts +38 -10
  212. package/dist/particles/phone-field/phone-field.js +183 -39
  213. package/dist/particles/phone-field/phone-field.js.map +1 -1
  214. package/dist/particles/postal-code-field/postal-code-field.js +2 -2
  215. package/dist/particles/postal-code-field/postal-code-field.js.map +1 -1
  216. package/dist/particles/select/field-select.d.ts +43 -0
  217. package/dist/particles/select/field-select.js +150 -0
  218. package/dist/particles/select/field-select.js.map +1 -0
  219. package/dist/particles/select/select.d.ts +2 -0
  220. package/dist/particles/select/select.js.map +1 -1
  221. package/dist/particles/shared/compose-refs.js +21 -0
  222. package/dist/particles/shared/compose-refs.js.map +1 -0
  223. package/dist/schema.graphql +766 -28
  224. package/dist/sdk/actions/analytics-action-provider.d.ts +15 -0
  225. package/dist/sdk/actions/analytics-action-provider.js +19 -0
  226. package/dist/sdk/actions/analytics-action-provider.js.map +1 -0
  227. package/dist/sdk/actions/index.d.ts +3 -1
  228. package/dist/sdk/actions/index.js +3 -1
  229. package/dist/sdk/actions/payment-action-provider.d.ts +22 -0
  230. package/dist/sdk/actions/payment-action-provider.js +26 -0
  231. package/dist/sdk/actions/payment-action-provider.js.map +1 -0
  232. package/dist/sdk/actions/types.d.ts +6 -2
  233. package/dist/sdk/analytics/analytics-destination.d.ts +43 -0
  234. package/dist/sdk/analytics/analytics-destination.js +90 -0
  235. package/dist/sdk/analytics/analytics-destination.js.map +1 -0
  236. package/dist/sdk/analytics/use-analytics-actions.d.ts +57 -0
  237. package/dist/sdk/analytics/use-analytics-actions.js +109 -0
  238. package/dist/sdk/analytics/use-analytics-actions.js.map +1 -0
  239. package/dist/sdk/cart/use-cart-actions.js +10 -9
  240. package/dist/sdk/cart/use-cart-actions.js.map +1 -1
  241. package/dist/sdk/cart/use-cart-validate-on-open.js +2 -1
  242. package/dist/sdk/cart/use-cart-validate-on-open.js.map +1 -1
  243. package/dist/sdk/content/create-content-runtime.d.ts +22 -1
  244. package/dist/sdk/content/create-content-runtime.js +89 -1
  245. package/dist/sdk/content/create-content-runtime.js.map +1 -1
  246. package/dist/sdk/data/empty-content-value.js +16 -0
  247. package/dist/sdk/data/empty-content-value.js.map +1 -0
  248. package/dist/sdk/data/entity-resolution-context.js +31 -0
  249. package/dist/sdk/data/entity-resolution-context.js.map +1 -0
  250. package/dist/sdk/data/entity-subscriber.js +18 -8
  251. package/dist/sdk/data/entity-subscriber.js.map +1 -1
  252. package/dist/sdk/data/hot-data-provider.js +2 -1
  253. package/dist/sdk/data/hot-data-provider.js.map +1 -1
  254. package/dist/sdk/data/index.js +2 -1
  255. package/dist/sdk/data/page-reactive-data-root.d.ts +36 -0
  256. package/dist/sdk/data/page-reactive-data-root.js +4 -2
  257. package/dist/sdk/data/page-reactive-data-root.js.map +1 -1
  258. package/dist/sdk/data/reactive-data-provider.js +7 -3
  259. package/dist/sdk/data/reactive-data-provider.js.map +1 -1
  260. package/dist/sdk/data/reactive-list-item-data-provider.js +12 -4
  261. package/dist/sdk/data/reactive-list-item-data-provider.js.map +1 -1
  262. package/dist/sdk/data/use-reactive-data-settled.js +39 -0
  263. package/dist/sdk/data/use-reactive-data-settled.js.map +1 -0
  264. package/dist/sdk/data/use-reactive-entity.js +5 -1
  265. package/dist/sdk/data/use-reactive-entity.js.map +1 -1
  266. package/dist/sdk/data/variables-from-content.d.ts +43 -0
  267. package/dist/sdk/data/variables-from-content.js +57 -0
  268. package/dist/sdk/data/variables-from-content.js.map +1 -0
  269. package/dist/sdk/generated/fragment-types.js +2 -0
  270. package/dist/sdk/generated/fragment-types.js.map +1 -1
  271. package/dist/sdk/generated/gql.js +2 -1
  272. package/dist/sdk/generated/gql.js.map +1 -1
  273. package/dist/sdk/generated/graphql.js +85 -1
  274. package/dist/sdk/generated/graphql.js.map +1 -1
  275. package/dist/sdk/i18n/messages/en-US.js +3 -0
  276. package/dist/sdk/i18n/messages/en-US.json +3 -0
  277. package/dist/sdk/i18n/messages/en-US.json.d.ts +3 -0
  278. package/dist/sdk/i18n/messages/es-ES.js +3 -0
  279. package/dist/sdk/i18n/messages/es-ES.json +3 -0
  280. package/dist/sdk/i18n/messages/pt-BR.js +3 -0
  281. package/dist/sdk/i18n/messages/pt-BR.json +3 -0
  282. package/dist/sdk/identity/use-identity-actions.js +8 -6
  283. package/dist/sdk/identity/use-identity-actions.js.map +1 -1
  284. package/dist/sdk/payment/gateway-origin.js +35 -0
  285. package/dist/sdk/payment/gateway-origin.js.map +1 -0
  286. package/dist/sdk/payment/gateway.d.ts +85 -0
  287. package/dist/sdk/payment/gateway.js +183 -0
  288. package/dist/sdk/payment/gateway.js.map +1 -0
  289. package/dist/sdk/payment/operations.d.ts +52 -0
  290. package/dist/sdk/payment/operations.js +223 -0
  291. package/dist/sdk/payment/operations.js.map +1 -0
  292. package/dist/sdk/payment/security-code-mask.js +71 -0
  293. package/dist/sdk/payment/security-code-mask.js.map +1 -0
  294. package/dist/sdk/payment/submission-registry.d.ts +33 -0
  295. package/dist/sdk/payment/submission-registry.js +58 -0
  296. package/dist/sdk/payment/submission-registry.js.map +1 -0
  297. package/dist/sdk/payment/use-payment-actions.d.ts +78 -0
  298. package/dist/sdk/payment/use-payment-actions.js +276 -0
  299. package/dist/sdk/payment/use-payment-actions.js.map +1 -0
  300. package/dist/sdk/payment/use-place-order.d.ts +65 -0
  301. package/dist/sdk/payment/use-place-order.js +640 -0
  302. package/dist/sdk/payment/use-place-order.js.map +1 -0
  303. package/dist/sdk/region/use-region-actions.js +2 -1
  304. package/dist/sdk/region/use-region-actions.js.map +1 -1
  305. package/dist/sdk/session/read-server-session.d.ts +21 -0
  306. package/dist/sdk/session/read-server-session.js +61 -0
  307. package/dist/sdk/session/read-server-session.js.map +1 -0
  308. package/dist/sdk/session/use-session-actions.js +5 -4
  309. package/dist/sdk/session/use-session-actions.js.map +1 -1
  310. package/dist/sdk/session/use-session-revalidation.js +2 -1
  311. package/dist/sdk/session/use-session-revalidation.js.map +1 -1
  312. package/dist/sdk/shipping/use-shipping-actions.js +4 -3
  313. package/dist/sdk/shipping/use-shipping-actions.js.map +1 -1
  314. package/dist/utils/loggable-error-name.js +49 -0
  315. package/dist/utils/loggable-error-name.js.map +1 -0
  316. package/dist/utils/resolve-authored-copy.js +18 -0
  317. package/dist/utils/resolve-authored-copy.js.map +1 -0
  318. package/dist/utils/safe-href.d.ts +11 -0
  319. package/dist/utils/substitute-template.js +33 -0
  320. package/dist/utils/substitute-template.js.map +1 -0
  321. package/package.json +14 -2
  322. package/src/styles/tailwind.css +34 -0
  323. package/dist/docs/client-profile-form.md +0 -192
  324. package/dist/matter/client-profile-form/client-profile-form.d.ts +0 -126
  325. package/dist/matter/client-profile-form/client-profile-form.js +0 -662
  326. package/dist/matter/client-profile-form/client-profile-form.js.map +0 -1
@@ -0,0 +1,11 @@
1
+ //#region src/utils/safe-href.d.ts
2
+ /**
3
+ * Builds the sign-in destination, carrying the current path so the shopper can be returned where they
4
+ * started. The sender's half only: nothing stops a hand-crafted link, so the sign-in route is to narrow
5
+ * the parameter again on arrival. A path the narrowing refuses drops the parameter instead of
6
+ * travelling encoded, and so does a router reporting no path — `usePathname()`'s type is why this takes
7
+ * a nullable one.
8
+ */
9
+ export declare function resolveSignInHref(pathname: string | null): string;
10
+ //#endregion
11
+ //# sourceMappingURL=safe-href.d.ts.map
@@ -0,0 +1,33 @@
1
+ //#region src/utils/substitute-template.ts
2
+ const TOKEN_PATTERN = /\{(\w+)\}/g;
3
+ /**
4
+ * Shared copy-template substitution (T97, T31 — specs/make-the-payment-components-authored-copy.md
5
+ * Decision 7). Replaces every seven-plus `String.prototype.replace('{token}', value)` call sites
6
+ * across `payment-summary.tsx`, `order-placed-payment-summary.tsx`, and `installments.tsx`, each of
7
+ * which substituted only the *first* occurrence of a token and, at two sites, passed the value as a
8
+ * replacement *string* — letting a server-sourced value containing `$&`/`` $` ``/`$'`/`$$` rewrite the
9
+ * surrounding template text.
10
+ *
11
+ * One `/\{(\w+)\}/g` pass with a replacer *function*: every occurrence of every token is substituted
12
+ * in a single scan, every value is inserted literally (a function's return value is never
13
+ * re-interpreted as a replacement pattern), and a token with no matching entry in `tokens` is left
14
+ * verbatim — so a template can be reworded freely without this helper silently dropping an
15
+ * unrecognized placeholder. Because it is one pass, a substituted value can never itself be re-scanned
16
+ * by a later token's own substitution.
17
+ *
18
+ * `Object.hasOwn`, not `tokenName in tokens` or a bare index lookup (fix pass, finding 6): every plain
19
+ * object inherits from `Object.prototype`, so `tokens['toString']` resolves to
20
+ * `Object.prototype.toString` — a function, therefore never `null`/`undefined` — rather than falling
21
+ * through to `match` on a `??` lookup. `{toString}`, `{constructor}`, and `{__proto__}` would each
22
+ * silently render an inherited value instead of being left verbatim as documented above.
23
+ */
24
+ function substituteTemplate(template, tokens) {
25
+ return template.replace(TOKEN_PATTERN, (match, tokenName) => {
26
+ if (!Object.hasOwn(tokens, tokenName)) return match;
27
+ return tokens[tokenName] ?? match;
28
+ });
29
+ }
30
+ //#endregion
31
+ export { substituteTemplate };
32
+
33
+ //# sourceMappingURL=substitute-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"substitute-template.js","names":[],"sources":["../../src/utils/substitute-template.ts"],"sourcesContent":["const TOKEN_PATTERN = /\\{(\\w+)\\}/g;\n\n/**\n * Shared copy-template substitution (T97, T31 — specs/make-the-payment-components-authored-copy.md\n * Decision 7). Replaces every seven-plus `String.prototype.replace('{token}', value)` call sites\n * across `payment-summary.tsx`, `order-placed-payment-summary.tsx`, and `installments.tsx`, each of\n * which substituted only the *first* occurrence of a token and, at two sites, passed the value as a\n * replacement *string* — letting a server-sourced value containing `$&`/`` $` ``/`$'`/`$$` rewrite the\n * surrounding template text.\n *\n * One `/\\{(\\w+)\\}/g` pass with a replacer *function*: every occurrence of every token is substituted\n * in a single scan, every value is inserted literally (a function's return value is never\n * re-interpreted as a replacement pattern), and a token with no matching entry in `tokens` is left\n * verbatim — so a template can be reworded freely without this helper silently dropping an\n * unrecognized placeholder. Because it is one pass, a substituted value can never itself be re-scanned\n * by a later token's own substitution.\n *\n * `Object.hasOwn`, not `tokenName in tokens` or a bare index lookup (fix pass, finding 6): every plain\n * object inherits from `Object.prototype`, so `tokens['toString']` resolves to\n * `Object.prototype.toString` — a function, therefore never `null`/`undefined` — rather than falling\n * through to `match` on a `??` lookup. `{toString}`, `{constructor}`, and `{__proto__}` would each\n * silently render an inherited value instead of being left verbatim as documented above.\n */\nexport function substituteTemplate(template: string, tokens: Readonly<Record<string, string>>): string {\n return template.replace(TOKEN_PATTERN, (match, tokenName: string) => {\n if (!Object.hasOwn(tokens, tokenName)) return match;\n // `noUncheckedIndexedAccess` still types this lookup as `string | undefined`; the `Object.hasOwn`\n // check above is what actually guarantees a string is here, so this `??` can never fall through\n // for a real token — it only satisfies the index-signature type, never re-opens finding 6's bug.\n return tokens[tokenName] ?? match;\n });\n}\n"],"mappings":";AAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;AAuBtB,SAAgB,mBAAmB,UAAkB,QAAkD;CACrG,OAAO,SAAS,QAAQ,gBAAgB,OAAO,cAAsB;EACnE,IAAI,CAAC,OAAO,OAAO,QAAQ,SAAS,GAAG,OAAO;EAI9C,OAAO,OAAO,cAAc;CAC9B,CAAC;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "FastStore AI Native component library built on Base UI with AI-editable styles",
5
5
  "license": "MIT",
6
6
  "homepage": "https://developers.vtex.com/docs/guides/faststore",
@@ -25,6 +25,11 @@
25
25
  "import": "./dist/graphql.js",
26
26
  "default": "./dist/graphql.js"
27
27
  },
28
+ "./cli": {
29
+ "types": "./dist/cli/index.d.ts",
30
+ "import": "./dist/cli/index.js",
31
+ "default": "./dist/cli/index.js"
32
+ },
28
33
  "./internal/client": {
29
34
  "types": "./dist/internal/client.d.ts",
30
35
  "import": "./dist/internal/client.js"
@@ -52,6 +57,7 @@
52
57
  "@base-ui/react": "^1.3.0",
53
58
  "@graphql-typed-document-node/core": "^3.2.0",
54
59
  "graphql": "^16.13.1",
60
+ "react-hook-form": "^7.85.0",
55
61
  "react-intl": "^10.1.22",
56
62
  "rxjs": "^7.8.2",
57
63
  "tailwindcss": "^4.2.2",
@@ -62,6 +68,12 @@
62
68
  "@apollo/client-integration-nextjs": "^0.14.5",
63
69
  "next": ">=16",
64
70
  "react": "^19.0.0",
65
- "react-dom": "^19.0.0"
71
+ "react-dom": "^19.0.0",
72
+ "typescript": "^5.9.3"
73
+ },
74
+ "peerDependenciesMeta": {
75
+ "typescript": {
76
+ "optional": true
77
+ }
66
78
  }
67
79
  }
@@ -30,3 +30,37 @@
30
30
  --max-width-md: var(--container-md);
31
31
  --max-width-lg: var(--container-lg);
32
32
  }
33
+
34
+ @layer base {
35
+ /* Default visible focus indicator for the payment surface (T38, REQ-11's WCAG scenario).
36
+ `@layer base` so any merchant utility class outranks it under Tailwind 4's layer order.
37
+ `currentColor` because the merchant's palette is unknown here — see Decision 6 on contrast.
38
+ Scoped by an explicit hook list, not by an ancestor: `PaymentSectionController` renders no DOM
39
+ element, so no ancestor selector reaches a controller-composed page. */
40
+ [data-fs-payment-method-list] :focus-visible,
41
+ [data-fs-installments] :focus-visible,
42
+ [data-fs-saved-cards] :focus-visible,
43
+ [data-fs-billing-address] :focus-visible,
44
+ [data-fs-card-entry] :focus-visible,
45
+ [data-fs-cardholder-document] :focus-visible,
46
+ [data-fs-save-card] :focus-visible,
47
+ [data-fs-place-order] :focus-visible,
48
+ [data-fs-installments-option]:focus-visible {
49
+ outline: 2px solid currentColor;
50
+ outline-offset: 2px;
51
+ }
52
+
53
+ /* `<fieldset>` carries `min-inline-size: min-content`, which Tailwind's preflight does not reset,
54
+ so it refuses to shrink inside a flex row. Live already via CardEntry's fieldset; mitigated here
55
+ for the three groups T38 adds. Scoped by the same explicit hook-list approach as the focus rule
56
+ above, not by `[data-fs-fieldset-root]`: the Fieldset particle emits that attribute
57
+ unconditionally, so it also reaches `ClientProfileForm`'s optional grouping fieldset — a
58
+ non-payment component whose rendering must not change (measured: 95px vs. 113px in a 200px flex
59
+ row with a competing sibling). */
60
+ [data-fs-payment-method-list-fieldset],
61
+ [data-fs-installments-fieldset],
62
+ [data-fs-saved-cards-fieldset],
63
+ [data-fs-card-entry-fieldset] {
64
+ min-inline-size: 0;
65
+ }
66
+ }
@@ -1,192 +0,0 @@
1
- # ClientProfileForm
2
-
3
- **Category:** identity
4
- **Purpose:** The batched customer-information form for the checkout identity step — the `InformationFormUSA` replacement. Pre-fills first/last name, phone, document, and both consent opt-ins from the shopper's saved profile and preferences; displays the email read-only. A single Save / Continue action validates the draft and dispatches at most one `clientProfileUpdate` and one `clientPreferencesUpdate`, each carrying only the fields the shopper edited, with pending/confirmation/error feedback.
5
-
6
- ---
7
-
8
- ## Visual cues (how to identify in an image)
9
-
10
- - A single form block on a checkout identity step titled "Your information" (or similar), grouping: a read-only email display, first name, last name, a country-masked phone field, an optional tax-document field (e.g. CPF for Brazil), and two checkboxes ("email me with news and offers", "save my information for next time").
11
- - One visible primary button at the bottom labelled "Save and continue" (or similar) — not a hidden submit.
12
- - Pre-filled values for a returning/identified shopper; blank, still-editable fields for a guest or an incomplete profile.
13
- - An inline error banner on failure, or a confirmation line on success, appearing near the button.
14
-
15
- Use `ClientProfileForm` (not a hand-assembled combination of `Field`/`PhoneField`/`DocumentField`) whenever the image shows this whole batched-save customer-information block.
16
-
17
- ---
18
-
19
- ## When to use
20
-
21
- - The customer-information section of the checkout identity step, for both returning/identified shoppers (pre-fill + edit) and guests (fill from empty).
22
- - Anywhere name, phone, document, and consent opt-ins must be collected together and persisted in one explicit action.
23
-
24
- ## When NOT to use
25
-
26
- - Editing the email — that is `EmailIdentificationControl`'s job; this form only displays it.
27
- - A single standalone phone or opt-in field with its own save-on-blur behavior — use `ClientProfilePhoneControl` / `NewsletterOptInControl` / `SavePersonalDataOptInControl` instead. **Never place a standalone per-field identity Control and this form for the same field on the same view** — both would write the field, racing each other.
28
- - Address fields — those belong to Delivery, not this form.
29
-
30
- ---
31
-
32
- ## Composition
33
-
34
- `ClientProfileForm` is a **compound**: `Root` owns the data + mechanics; the field/fieldset/feedback
35
- parts are composed freely (any order, any subset). The schema author decides which fields render — a
36
- merchant whose platform config drops a field (or whose account can't persist one, e.g. an unsupported
37
- `savePersonalData`) simply does not compose that part.
38
-
39
- ```
40
- SessionRoot (required ancestor; session tri-state + canEditData)
41
- └── ClientProfileForm.Root (data-fs-client-profile-form; own fragment/data root; owns draft + Save)
42
- ├── ClientProfileForm.Fieldset section="profile" [legend]
43
- │ ├── .EmailField (read-only)
44
- │ ├── .FirstNameField / .LastNameField
45
- │ ├── .PhoneField (uses country from Root)
46
- │ └── .DocumentField (self-gates on documentType)
47
- ├── ClientProfileForm.Fieldset section="preferences" [legend]
48
- │ ├── .NewsletterCheckbox
49
- │ └── .SavePersonalDataCheckbox (omit to drop the field entirely — no CSS hack)
50
- ├── .Error / .Confirmation
51
- └── .SubmitButton
52
- ```
53
-
54
- `Root` is self-contained: it declares the colocated fragment over `clientProfile` + `clientPreferences`
55
- and must not be nested inside `ClientProfileRoot` / `ClientPreferencesRoot` (those self-persist per
56
- field on blur, double-writing against this form's batched Save). Every part `requiresContext:
57
- 'client-profile-form'`; a custom/derived field declares its own additional `requiresContext`.
58
-
59
- ---
60
-
61
- ## Behavior
62
-
63
- - **Sections**: compose `ClientProfileForm.Fieldset` blocks with a `section` name → `data-fs-client-profile-form-section="<name>"`, and an optional `legend`. Not hard-coded — the author groups fields however the design needs.
64
- - **Pre-fill**: every field seeds from `$data` on mount; missing profile fields render empty and stay editable.
65
- - **Draft & dirty tracking**: edits are tracked locally per field; only touched fields are dispatched. Background `$data` refreshes re-seed untouched fields only — an in-progress edit is never clobbered.
66
- - **Save**: validates **field format only** — phone mask and document check-digit, each blocking Save when the field is non-empty and malformed. It does not enforce requiredness: the parts are composed freely by the schema, so a required check here could fire for a field the page never mounted. Which fields a shopper must fill is a business rule, waiting on the composable entity forms RFC (#572) to decide where it belongs. The format checks carry the same composition hazard in a narrower form, and it is still open: they key off the Root's `country` and `documentType` rather than off which leaves were composed, so a store that sets `documentType` without composing `DocumentField` can block Save with no field to render the error in and nowhere to move focus. Closing it properly means the leaves registering themselves with the Root, which is that same RFC's territory. The phone case is wider than the document one and needs no merchant configuration at all — see Known gaps below. On Save it dispatches at most one `clientProfileUpdate` (dirty profile fields) and one `clientPreferencesUpdate` (dirty consent flags) in parallel; a Save with nothing dirty dispatches nothing and shows the confirmation, so the press still answers.
67
- - **Document erase**: clearing a previously-saved document and pressing Save sends `document: ''` — an explicit erase, not an omission.
68
- - **Feedback**: `data-fs-client-profile-form-pending` while a write is in flight (fieldset disabled, Save not re-triggerable); an inline `role="alert"` region on `userErrors`; an `<output>` confirmation on success, cleared on the next edit.
69
- - **Read-only**: `session.canEditData === false` renders `data-fs-client-profile-form-readonly`, disables every field, and omits the Save button entirely.
70
- - **The form announces nothing**: a completed Save shows the confirmation and stops there. It publishes no signal, so nothing elsewhere collapses, advances or reacts. Whether finishing this form should move a section or a wizard is a sequencing question, and the mechanism for it is being designed in the flow-of-steps RFC (#611) rather than assumed here.
71
- - **The form never learns who listens.** It reports nothing at all, so `IdentityEditController` cannot react to it: that section moves only on its own buttons. Compose the swap around this form: an `IdentityEditController` holding an `IdentitySummaryView` with the summary, an `IdentityEditForm` with `ClientProfileForm.Root`, an `IdentityEditButton` in the heading, and an `IdentityEditCancelButton` as cancel next to the form. The same form therefore works unchanged inside a collapsing section or on a page of its own.
72
-
73
- ---
74
-
75
- ## Props
76
-
77
- **`ClientProfileForm.Root`** — `country` (`'US' | 'BR'`, default `'US'`; provided to the phone leaf via
78
- context), `documentType` (string, e.g. `'CPF'`; the document leaf renders only when supported).
79
- Declares `actions: { identity: ['clientProfileUpdate', 'clientPreferencesUpdate'] }`,
80
- `requiresContext: 'session'`, `providesContext: 'client-profile-form'`.
81
-
82
- **`ClientProfileForm.Fieldset`** — `legend` (optional visible title), `section` (name → `data-fs-*-section`).
83
-
84
- **Field parts** (`.EmailField`, `.FirstNameField`, `.LastNameField`, `.PhoneField`, `.DocumentField`,
85
- `.NewsletterCheckbox`, `.SavePersonalDataCheckbox`) — each takes an optional `label` (sensible default).
86
- **`.Confirmation`** — `message` (default `'Your information has been saved.'`). **`.SubmitButton`** —
87
- `label` (default `'Save and continue'`) or composed `children`.
88
-
89
- ---
90
-
91
- ## Canonical schema example
92
-
93
- ```json
94
- {
95
- "session": {
96
- "type": "SessionRoot",
97
- "children": ["email-identification", "profile-form"]
98
- },
99
- "email-identification": {
100
- "type": "EmailIdentificationControl",
101
- "children": []
102
- },
103
- "profile-form": {
104
- "type": "ClientProfileFormRoot",
105
- "props": { "country": "BR", "documentType": "CPF" },
106
- "children": ["profile-fieldset", "preferences-fieldset", "form-error", "form-confirmation", "form-submit"]
107
- },
108
- "profile-fieldset": {
109
- "type": "ClientProfileFormFieldset",
110
- "props": { "section": "profile", "legend": "Your information" },
111
- "children": ["email", "first-name", "last-name", "phone", "document"]
112
- },
113
- "email": { "type": "ClientProfileFormEmailField", "children": [] },
114
- "first-name": { "type": "ClientProfileFormFirstNameField", "children": [] },
115
- "last-name": { "type": "ClientProfileFormLastNameField", "children": [] },
116
- "phone": { "type": "ClientProfileFormPhoneField", "children": [] },
117
- "document": { "type": "ClientProfileFormDocumentField", "children": [] },
118
- "preferences-fieldset": {
119
- "type": "ClientProfileFormFieldset",
120
- "props": { "section": "preferences" },
121
- "children": ["newsletter"]
122
- },
123
- "newsletter": { "type": "ClientProfileFormNewsletterCheckbox", "children": [] },
124
- "form-error": { "type": "ClientProfileFormError", "children": [] },
125
- "form-confirmation": { "type": "ClientProfileFormConfirmation", "children": [] },
126
- "form-submit": { "type": "ClientProfileFormSubmitButton", "children": [] }
127
- }
128
- ```
129
-
130
- Both fieldsets are children of the Root, not siblings of it: every part declares
131
- `requiresContext: 'client-profile-form'`, so a fieldset placed outside is rejected by the
132
- context-constraint walk at build time.
133
-
134
- (Omitting `ClientProfileFormSavePersonalDataCheckbox` above drops that field entirely — the intended
135
- way to exclude a field the account can't persist, with no CSS hack and no shared-component change.)
136
-
137
- ---
138
-
139
- ## Common mistakes
140
-
141
- - **Rendering `ClientProfileForm` outside `SessionRoot`.** `useSession()` throws; every identity page must host a `SessionRoot`.
142
- - **Nesting it inside `ClientProfileRoot` / `ClientPreferencesRoot`, or placing a standalone Control for the same field alongside it.** The form is its own data root and its own write surface — double-nesting or double-placing creates a double-write race.
143
- - **Expecting the email to be editable.** It is always read-only here; email changes go through `EmailIdentificationControl`.
144
- - **Expecting per-keystroke or per-blur saves.** All fields are form-bound; only pressing Save dispatches a write.
145
- - **Expecting the form to enforce required fields.** It validates format only. A blank field saves, because the form cannot know which of its freely-composed parts the page actually mounted.
146
- - **Rendering a field part outside `ClientProfileForm.Root`.** Every part `requiresContext: 'client-profile-form'` and throws otherwise.
147
-
148
- ---
149
-
150
- ## Styling
151
-
152
- | Component | What you style | Plausible classes |
153
- |---|---|---|
154
- | `ClientProfileForm` | The `data-fs-client-profile-form` root; carries `-pending`/`-readonly`/`-saved` presence attributes | `flex flex-col gap-10` |
155
- | Section | `data-fs-client-profile-form-section="profile\|preferences"` — the two entity-anchored fieldsets | `flex flex-col gap-4` |
156
- | Field wrapper | `data-fs-client-profile-form-field="email\|first-name\|last-name\|phone\|document\|newsletter\|save-personal-data"` | `flex flex-col gap-4` |
157
- | Error / confirmation | `[data-fs-client-profile-form-error]` / `[data-fs-client-profile-form-confirmation]` | `text-sm text-red-600` / `text-sm text-green-600` |
158
-
159
- Field-level visuals (borders, focus rings, error color) are owned by the composed particles' own swatches (`field`, `phone-field`, `document-field`, `checkbox`, `button`) and are not redefined here.
160
-
161
- ---
162
-
163
- ## Known gaps
164
-
165
- Found by review and deliberately left for the dedicated revision of these components, rather than patched
166
- here. The first is the widest.
167
-
168
- - **Format validation runs against fields the page may never have composed, and the phone case needs no
169
- merchant configuration at all.** `country` defaults to `'US'`, so the phone check always runs. A store
170
- composing `Root` + name fields + `SubmitButton`, serving a shopper whose stored phone is a legacy
171
- malformed value, gets a Save that sets `errors.phone`, finds no phone input to focus, renders no message
172
- because `PhoneField` is not mounted, and returns — dead on every press, button still enabled. The
173
- `documentType` variant of the same hole at least requires the merchant to have set a Root prop. Closing
174
- both properly means the leaves registering themselves with the Root; see the composable entity forms RFC
175
- (#572).
176
- - **Two other early returns leave Save silent.** A missing `$actions.identity`, or a dirty field with no
177
- matching write function, returns without touching `pending`, `serverError` or `saved` — the same dead
178
- press the pristine branch above was changed to avoid.
179
- - **`VALIDATION_ORDER` is a hard-coded `['phone', 'document']`,** but the leaves are now composed in any
180
- order. With both fields malformed, focus jumps to the phone input even when the document error is the one
181
- the shopper can see first. The order should come from DOM position now that the fixed template is gone.
182
- - **The re-seed of untouched fields mutates a ref during render** and queues its `setDraft` in the same
183
- pass. A discarded render keeps the ref but loses the update, so pristine fields can hold stale values
184
- after `$data` arrives.
185
-
186
- ## Related
187
-
188
- - [[email-identification]] — the sibling identification control this form's email display defers to.
189
- - [[client-profile]] — the standalone, per-field-blur phone binding; do not compose alongside this form for the same field.
190
- - [[client-preferences]] — the standalone, per-field-blur consent Controls; do not compose alongside this form for the same field.
191
- - [[session]] — provides the identification tri-state and the required `SessionRoot` ancestor.
192
- - [[phone-field]], [[document-field]], [[field]], [[fieldset]], [[checkbox]] — the particles this matter composes directly.
@@ -1,126 +0,0 @@
1
- import { ComponentDefinition } from "../../core/dist/define-component.js";
2
- import "../../core/dist/index.js";
3
- import { ComponentActions } from "../../sdk/actions/types.js";
4
- import { PhoneCountry } from "../../particles/phone-field/phone-field.js";
5
- import { ReactNode } from "react";
6
- //#region src/matter/client-profile-form/client-profile-form.d.ts
7
- /** The `$data` slice forwarded by the reactive runtime — both identity sibling entities. */
8
- export type ClientProfileFormData = {
9
- clientProfile?: {
10
- email?: string | null;
11
- firstName?: string | null;
12
- lastName?: string | null;
13
- phone?: string | null;
14
- document?: string | null;
15
- } | null;
16
- clientPreferences?: {
17
- optinNewsLetter?: boolean | null;
18
- savePersonalData?: boolean | null;
19
- } | null;
20
- } | null;
21
- export type ClientProfileFormRootProps = {
22
- /** Phone mask/validation country, provided to the phone leaf via context. */
23
- country?: PhoneCountry;
24
- /** Locale document type; the document leaf renders only when supported. Provided via context. */
25
- documentType?: string;
26
- className?: string;
27
- children?: ReactNode;
28
- /** `ClientProfileFormData` slice forwarded by the reactive runtime. */
29
- $data?: ClientProfileFormData;
30
- /** Compiler-injected action surface; carries `identity.clientProfileUpdate` / `clientPreferencesUpdate`. */
31
- $actions?: ComponentActions;
32
- };
33
- export type ClientProfileFormFieldsetProps = {
34
- /** Visible legend; omitted (no title) when unset. */
35
- legend?: string;
36
- /** Value emitted on `data-fs-client-profile-form-section` for scoped styling (e.g. `profile`). */
37
- section?: string;
38
- className?: string;
39
- children?: ReactNode;
40
- };
41
- type LabelledFieldProps = {
42
- label?: string;
43
- className?: string;
44
- };
45
- export type ClientProfileFormEmailFieldProps = LabelledFieldProps;
46
- export type ClientProfileFormFirstNameFieldProps = LabelledFieldProps;
47
- export type ClientProfileFormLastNameFieldProps = LabelledFieldProps;
48
- export type ClientProfileFormPhoneFieldProps = LabelledFieldProps;
49
- export type ClientProfileFormDocumentFieldProps = LabelledFieldProps;
50
- export type ClientProfileFormNewsletterCheckboxProps = LabelledFieldProps;
51
- export type ClientProfileFormSavePersonalDataCheckboxProps = LabelledFieldProps;
52
- export type ClientProfileFormErrorProps = {
53
- className?: string;
54
- };
55
- export type ClientProfileFormConfirmationProps = {
56
- message?: string;
57
- className?: string;
58
- };
59
- export type ClientProfileFormSubmitButtonProps = {
60
- label?: string;
61
- className?: string;
62
- children?: ReactNode;
63
- };
64
- export declare const ClientProfileFormRootDefinition: ComponentDefinition<ClientProfileFormRootProps>;
65
- export declare const ClientProfileFormFieldsetDefinition: ComponentDefinition<ClientProfileFormFieldsetProps>;
66
- export declare const ClientProfileFormEmailFieldDefinition: ComponentDefinition<LabelledFieldProps>;
67
- export declare const ClientProfileFormFirstNameFieldDefinition: ComponentDefinition<LabelledFieldProps>;
68
- export declare const ClientProfileFormLastNameFieldDefinition: ComponentDefinition<LabelledFieldProps>;
69
- export declare const ClientProfileFormPhoneFieldDefinition: ComponentDefinition<LabelledFieldProps>;
70
- export declare const ClientProfileFormDocumentFieldDefinition: ComponentDefinition<LabelledFieldProps>;
71
- export declare const ClientProfileFormNewsletterCheckboxDefinition: ComponentDefinition<LabelledFieldProps>;
72
- export declare const ClientProfileFormSavePersonalDataCheckboxDefinition: ComponentDefinition<LabelledFieldProps>;
73
- export declare const ClientProfileFormErrorDefinition: ComponentDefinition<ClientProfileFormErrorProps>;
74
- export declare const ClientProfileFormConfirmationDefinition: ComponentDefinition<ClientProfileFormConfirmationProps>;
75
- export declare const ClientProfileFormSubmitButtonDefinition: ComponentDefinition<ClientProfileFormSubmitButtonProps>;
76
- /**
77
- * Data root + form shell. Seeds a local draft from `$data`, tracks dirty fields (background `$data`
78
- * refreshes only re-seed untouched fields), runs format-only validation, and on Save dispatches the
79
- * batched `clientProfileUpdate` / `clientPreferencesUpdate` (touched fields only), showing the
80
- * confirmation on success. Provides everything the field leaves need via context; renders a `<form>`
81
- * around its children.
82
- *
83
- * It publishes nothing. A finished press is not announced, so no section collapses as a result and
84
- * nothing outside this form can react to it. Whether a checkout sequences on a completed form is left to
85
- * the flow-of-steps RFC (#611).
86
- */
87
- export declare function ClientProfileFormRoot({ country, documentType, className, children, $data: $dataProp, $actions: $actionsProp }: Readonly<ClientProfileFormRootProps>): import("react/jsx-runtime").JSX.Element;
88
- export declare function ClientProfileFormFieldset({ legend, section, className, children }: ClientProfileFormFieldsetProps): import("react/jsx-runtime").JSX.Element;
89
- export declare function ClientProfileFormEmailField({ label, className }: ClientProfileFormEmailFieldProps): import("react/jsx-runtime").JSX.Element;
90
- export declare function ClientProfileFormFirstNameField({ label, className }: ClientProfileFormFirstNameFieldProps): import("react/jsx-runtime").JSX.Element;
91
- export declare function ClientProfileFormLastNameField({ label, className }: ClientProfileFormLastNameFieldProps): import("react/jsx-runtime").JSX.Element;
92
- export declare function ClientProfileFormPhoneField({ label, className }: ClientProfileFormPhoneFieldProps): import("react/jsx-runtime").JSX.Element;
93
- export declare function ClientProfileFormDocumentField({ label, className }: ClientProfileFormDocumentFieldProps): import("react/jsx-runtime").JSX.Element | null;
94
- export declare function ClientProfileFormNewsletterCheckbox({ label, className }: ClientProfileFormNewsletterCheckboxProps): import("react/jsx-runtime").JSX.Element;
95
- export declare function ClientProfileFormSavePersonalDataCheckbox({ label, className }: ClientProfileFormSavePersonalDataCheckboxProps): import("react/jsx-runtime").JSX.Element;
96
- export declare function ClientProfileFormError({ className }: ClientProfileFormErrorProps): import("react/jsx-runtime").JSX.Element | null;
97
- export declare function ClientProfileFormConfirmation({ message, className }: ClientProfileFormConfirmationProps): import("react/jsx-runtime").JSX.Element | null;
98
- export declare function ClientProfileFormSubmitButton({ label, className, children }: ClientProfileFormSubmitButtonProps): import("react/jsx-runtime").JSX.Element | null;
99
- export declare const ClientProfileForm: {
100
- Root: typeof ClientProfileFormRoot;
101
- RootDefinition: ComponentDefinition<ClientProfileFormRootProps>;
102
- Fieldset: typeof ClientProfileFormFieldset;
103
- FieldsetDefinition: ComponentDefinition<ClientProfileFormFieldsetProps>;
104
- EmailField: typeof ClientProfileFormEmailField;
105
- EmailFieldDefinition: ComponentDefinition<LabelledFieldProps>;
106
- FirstNameField: typeof ClientProfileFormFirstNameField;
107
- FirstNameFieldDefinition: ComponentDefinition<LabelledFieldProps>;
108
- LastNameField: typeof ClientProfileFormLastNameField;
109
- LastNameFieldDefinition: ComponentDefinition<LabelledFieldProps>;
110
- PhoneField: typeof ClientProfileFormPhoneField;
111
- PhoneFieldDefinition: ComponentDefinition<LabelledFieldProps>;
112
- DocumentField: typeof ClientProfileFormDocumentField;
113
- DocumentFieldDefinition: ComponentDefinition<LabelledFieldProps>;
114
- NewsletterCheckbox: typeof ClientProfileFormNewsletterCheckbox;
115
- NewsletterCheckboxDefinition: ComponentDefinition<LabelledFieldProps>;
116
- SavePersonalDataCheckbox: typeof ClientProfileFormSavePersonalDataCheckbox;
117
- SavePersonalDataCheckboxDefinition: ComponentDefinition<LabelledFieldProps>;
118
- Error: typeof ClientProfileFormError;
119
- ErrorDefinition: ComponentDefinition<ClientProfileFormErrorProps>;
120
- Confirmation: typeof ClientProfileFormConfirmation;
121
- ConfirmationDefinition: ComponentDefinition<ClientProfileFormConfirmationProps>;
122
- SubmitButton: typeof ClientProfileFormSubmitButton;
123
- SubmitButtonDefinition: ComponentDefinition<ClientProfileFormSubmitButtonProps>;
124
- };
125
- //#endregion
126
- //# sourceMappingURL=client-profile-form.d.ts.map