@stridge/kit 0.1.0-alpha.6 → 0.1.0-alpha.60

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 (597) hide show
  1. package/README.md +22 -6
  2. package/dist/KitProvider.d.ts +61 -0
  3. package/dist/KitProvider.js +1 -1
  4. package/dist/_internal/activity/driver/index.d.ts +3 -0
  5. package/dist/_internal/activity/driver/index.js +1 -0
  6. package/dist/_internal/deposit/driver/index.d.ts +2 -2
  7. package/dist/_internal/drivers/stridge/index.d.ts +4 -2
  8. package/dist/_internal/drivers/stridge/index.js +1 -1
  9. package/dist/_internal/drivers/stridge-mock/index.d.ts +2 -1
  10. package/dist/_internal/drivers/stridge-mock/index.js +1 -1
  11. package/dist/_internal/withdraw/driver/index.d.ts +2 -2
  12. package/dist/activity/compound/index.d.ts +19 -0
  13. package/dist/activity/compound/index.js +1 -0
  14. package/dist/activity/dialog/index.d.ts +4 -0
  15. package/dist/activity/dialog/index.js +1 -0
  16. package/dist/activity/widgets/index.d.ts +5 -0
  17. package/dist/activity/widgets/index.js +1 -0
  18. package/dist/deposit/compound/index.d.ts +22 -15
  19. package/dist/deposit/compound/index.js +1 -1
  20. package/dist/deposit/dialog/index.d.ts +2 -1
  21. package/dist/deposit/widgets/index.d.ts +16 -0
  22. package/dist/deposit/widgets/index.js +1 -0
  23. package/dist/drivers/stridge/catalog.d.ts +54 -0
  24. package/dist/drivers/stridge/catalog.js +1 -0
  25. package/dist/drivers/stridge/createStridgeActivityDriver.d.ts +44 -0
  26. package/dist/drivers/stridge/createStridgeActivityDriver.js +1 -0
  27. package/dist/drivers/stridge/createStridgeDepositDriver.d.ts +10 -1
  28. package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
  29. package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +37 -14
  30. package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
  31. package/dist/drivers/stridge/internal/ensureWalletChain.js +1 -0
  32. package/dist/drivers/stridge/internal/pollOnce.js +1 -1
  33. package/dist/drivers/stridge/internal/resolveAddEthereumChain.js +1 -0
  34. package/dist/drivers/stridge/internal/retry.js +1 -0
  35. package/dist/drivers/stridge/internal/supportedChains.js +1 -0
  36. package/dist/drivers/stridge/types.d.ts +20 -14
  37. package/dist/drivers/stridge/types.js +1 -1
  38. package/dist/drivers/stridge/wagmiSigner.js +1 -1
  39. package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.d.ts +44 -0
  40. package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.js +1 -0
  41. package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +2 -2
  42. package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
  43. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +15 -3
  44. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
  45. package/dist/drivers/stridge-mock/fixtures.d.ts +14 -12
  46. package/dist/drivers/stridge-mock/fixtures.js +1 -1
  47. package/dist/events/bus/createBus.d.ts +26 -0
  48. package/dist/events/bus/createBus.js +1 -0
  49. package/dist/events/bus/flowIdRegistry.d.ts +17 -0
  50. package/dist/events/bus/flowIdRegistry.js +1 -0
  51. package/dist/events/bus/index.js +1 -0
  52. package/dist/events/bus/metadata.js +1 -0
  53. package/dist/events/context.js +1 -0
  54. package/dist/events/emit/index.js +1 -0
  55. package/dist/events/emit/mapFailure.js +1 -0
  56. package/dist/events/emit/useActivityEmissions.js +1 -0
  57. package/dist/events/emit/useDepositEmissions.js +1 -0
  58. package/dist/events/emit/useKitEmitter.js +1 -0
  59. package/dist/events/emit/useWithdrawEmissions.js +1 -0
  60. package/dist/events/hooks/index.d.ts +6 -0
  61. package/dist/events/hooks/index.js +1 -0
  62. package/dist/events/hooks/useCurrentFlowId.d.ts +6 -0
  63. package/dist/events/hooks/useCurrentFlowId.js +1 -0
  64. package/dist/events/hooks/useStableHandler.js +1 -0
  65. package/dist/events/hooks/useStridgeEvent.d.ts +9 -0
  66. package/dist/events/hooks/useStridgeEvent.js +1 -0
  67. package/dist/events/hooks/useStridgeEventBus.d.ts +34 -0
  68. package/dist/events/hooks/useStridgeEventBus.js +1 -0
  69. package/dist/events/hooks/useStridgeEvents.d.ts +7 -0
  70. package/dist/events/hooks/useStridgeEvents.js +1 -0
  71. package/dist/events/hooks/useStridgeFlowEvent.d.ts +8 -0
  72. package/dist/events/hooks/useStridgeFlowEvent.js +1 -0
  73. package/dist/events/hooks/useStridgeFlowEvents.d.ts +6 -0
  74. package/dist/events/hooks/useStridgeFlowEvents.js +1 -0
  75. package/dist/events/index.d.ts +17 -0
  76. package/dist/events/index.js +1 -0
  77. package/dist/events/publish.js +1 -0
  78. package/dist/events/redact.d.ts +34 -0
  79. package/dist/events/redact.js +1 -0
  80. package/dist/events/types/activity.d.ts +53 -0
  81. package/dist/events/types/deposit.d.ts +235 -0
  82. package/dist/events/types/envelope.d.ts +145 -0
  83. package/dist/events/types/index.d.ts +32 -0
  84. package/dist/events/types/kit.d.ts +23 -0
  85. package/dist/events/types/withdraw.d.ts +150 -0
  86. package/dist/flows/activity/compound/ActivityFlow.d.ts +46 -0
  87. package/dist/flows/activity/compound/ActivityFlow.js +1 -0
  88. package/dist/flows/activity/compound/components/Boundary.d.ts +29 -0
  89. package/dist/flows/activity/compound/components/Boundary.js +1 -0
  90. package/dist/flows/activity/compound/components/Steps.d.ts +24 -0
  91. package/dist/flows/activity/compound/components/Steps.js +1 -0
  92. package/dist/flows/activity/dialog/ActivityDialog.d.ts +55 -0
  93. package/dist/flows/activity/dialog/ActivityDialog.js +1 -0
  94. package/dist/flows/activity/dialog/ActivityFlowBoundary.d.ts +1 -0
  95. package/dist/flows/activity/dialog/ActivityFlowBoundary.js +1 -0
  96. package/dist/flows/activity/driver/context.d.ts +38 -0
  97. package/dist/flows/activity/driver/context.js +1 -0
  98. package/dist/flows/activity/driver/types.d.ts +58 -0
  99. package/dist/flows/activity/orchestrator/controller.d.ts +11 -0
  100. package/dist/flows/activity/orchestrator/controller.js +1 -0
  101. package/dist/flows/activity/orchestrator/index.d.ts +4 -0
  102. package/dist/flows/activity/orchestrator/index.js +1 -0
  103. package/dist/flows/activity/orchestrator/reducer.d.ts +1 -0
  104. package/dist/flows/activity/orchestrator/reducer.js +1 -0
  105. package/dist/flows/activity/orchestrator/types.d.ts +71 -0
  106. package/dist/flows/activity/orchestrator/useActivity.d.ts +94 -0
  107. package/dist/flows/activity/orchestrator/useActivity.js +1 -0
  108. package/dist/flows/activity/widgets/ActivityDetail.d.ts +41 -0
  109. package/dist/flows/activity/widgets/ActivityDetail.js +1 -0
  110. package/dist/flows/activity/widgets/ActivityList.d.ts +38 -0
  111. package/dist/flows/activity/widgets/ActivityList.js +1 -0
  112. package/dist/flows/activity/widgets/useStandaloneActivitySource.js +1 -0
  113. package/dist/flows/deposit/bindings/DepositBindings.d.ts +87 -0
  114. package/dist/flows/deposit/bindings/DepositBindings.js +1 -0
  115. package/dist/flows/deposit/bindings/index.d.ts +1 -0
  116. package/dist/flows/deposit/bindings/index.js +1 -0
  117. package/dist/flows/deposit/dialog/DepositBootstrapErrorState.js +1 -1
  118. package/dist/flows/deposit/dialog/DepositDialog.d.ts +26 -79
  119. package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
  120. package/dist/flows/deposit/dialog/WalletRequiredState.js +1 -0
  121. package/dist/flows/deposit/dialog/WalletRequiredState.styles.js +1 -0
  122. package/dist/flows/deposit/driver/payloads.d.ts +52 -5
  123. package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.d.ts +2 -0
  124. package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.js +1 -1
  125. package/dist/flows/deposit/driver/transformers/index.d.ts +1 -0
  126. package/dist/flows/deposit/driver/transformers/quoteToPayload.d.ts +2 -0
  127. package/dist/flows/deposit/driver/transformers/settlementToPayload.d.ts +25 -0
  128. package/dist/flows/deposit/driver/transformers/settlementToPayload.js +1 -1
  129. package/dist/flows/deposit/driver/transformers/startToAddressesPayload.d.ts +2 -0
  130. package/dist/flows/deposit/driver/transformers/startToAddressesPayload.js +1 -1
  131. package/dist/flows/deposit/driver/transformers/startToBrandPayload.d.ts +1 -0
  132. package/dist/flows/deposit/driver/transformers/startToTargetPayload.d.ts +2 -0
  133. package/dist/flows/deposit/driver/transformers/startToTargetPayload.js +1 -1
  134. package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.d.ts +1 -0
  135. package/dist/flows/deposit/driver/types.d.ts +37 -4
  136. package/dist/flows/deposit/orchestrator/controller.js +1 -1
  137. package/dist/flows/deposit/orchestrator/index.d.ts +5 -0
  138. package/dist/flows/deposit/orchestrator/reducer.d.ts +1 -0
  139. package/dist/flows/deposit/orchestrator/reducer.js +1 -1
  140. package/dist/flows/deposit/orchestrator/types.d.ts +228 -7
  141. package/dist/flows/deposit/orchestrator/useDeposit.d.ts +45 -1
  142. package/dist/flows/deposit/orchestrator/useDeposit.js +1 -1
  143. package/dist/flows/deposit/shared/cash.d.ts +20 -0
  144. package/dist/flows/deposit/shared/cash.js +1 -0
  145. package/dist/flows/deposit/widgets/activity/DepositActivityDetail.d.ts +40 -0
  146. package/dist/flows/deposit/widgets/activity/DepositActivityDetail.js +1 -0
  147. package/dist/flows/deposit/widgets/activity/DepositActivityList.d.ts +38 -0
  148. package/dist/flows/deposit/widgets/activity/DepositActivityList.js +1 -0
  149. package/dist/flows/deposit/widgets/activity/index.d.ts +2 -0
  150. package/dist/flows/deposit/widgets/activity/index.js +1 -0
  151. package/dist/flows/deposit/widgets/activity/useDepositActivitySource.js +1 -0
  152. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.d.ts +32 -5
  153. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
  154. package/dist/flows/deposit/widgets/amount-entry/footerIntent.js +1 -0
  155. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.d.ts +24 -4
  156. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -1
  157. package/dist/flows/deposit/widgets/cash-amount-entry/CashAmountEntry.d.ts +71 -0
  158. package/dist/flows/deposit/widgets/cash-amount-entry/CashAmountEntry.js +1 -0
  159. package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.d.ts +69 -0
  160. package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.js +1 -0
  161. package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.d.ts +16 -0
  162. package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.js +1 -0
  163. package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.js +1 -0
  164. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/HeroLabel.d.ts +13 -0
  165. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/HeroLabel.js +1 -0
  166. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/MethodChip.d.ts +18 -0
  167. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/MethodChip.js +1 -0
  168. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/ReceiveChip.d.ts +14 -0
  169. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/ReceiveChip.js +1 -0
  170. package/dist/flows/deposit/widgets/cash-amount-entry/compound/context.js +1 -0
  171. package/dist/flows/deposit/widgets/cash-amount-entry/compound/index.d.ts +3 -0
  172. package/dist/flows/deposit/widgets/cash-amount-entry/compound/index.js +1 -0
  173. package/dist/flows/deposit/widgets/cash-amount-entry/compound/types.d.ts +42 -0
  174. package/dist/flows/deposit/widgets/cash-amount-entry/index.d.ts +1 -0
  175. package/dist/flows/deposit/widgets/cash-amount-entry/index.js +1 -0
  176. package/dist/flows/deposit/widgets/cash-confirm/CashConfirm.d.ts +63 -0
  177. package/dist/flows/deposit/widgets/cash-confirm/CashConfirm.js +1 -0
  178. package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.d.ts +54 -0
  179. package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.js +1 -0
  180. package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.d.ts +33 -0
  181. package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.js +1 -0
  182. package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.styles.js +1 -0
  183. package/dist/flows/deposit/widgets/cash-confirm/compound/cashConfirmDimensions.js +1 -0
  184. package/dist/flows/deposit/widgets/cash-confirm/compound/components/ApplePayBody.d.ts +15 -0
  185. package/dist/flows/deposit/widgets/cash-confirm/compound/components/ApplePayBody.js +1 -0
  186. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Body.d.ts +22 -0
  187. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Body.js +1 -0
  188. package/dist/flows/deposit/widgets/cash-confirm/compound/components/BodyLabel.js +1 -0
  189. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardBody.d.ts +16 -0
  190. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardBody.js +1 -0
  191. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.icons.js +1 -0
  192. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.js +1 -0
  193. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.keys.js +1 -0
  194. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.state.js +1 -0
  195. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.js +1 -0
  196. package/dist/flows/deposit/widgets/cash-confirm/compound/components/GooglePayBody.d.ts +16 -0
  197. package/dist/flows/deposit/widgets/cash-confirm/compound/components/GooglePayBody.js +1 -0
  198. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Header.d.ts +21 -0
  199. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Header.js +1 -0
  200. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Summary.d.ts +17 -0
  201. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Summary.js +1 -0
  202. package/dist/flows/deposit/widgets/cash-confirm/compound/components/cardFormat.js +1 -0
  203. package/dist/flows/deposit/widgets/cash-confirm/compound/context.js +1 -0
  204. package/dist/flows/deposit/widgets/cash-confirm/compound/index.d.ts +3 -0
  205. package/dist/flows/deposit/widgets/cash-confirm/compound/index.js +1 -0
  206. package/dist/flows/deposit/widgets/cash-confirm/compound/types.d.ts +66 -0
  207. package/dist/flows/deposit/widgets/cash-confirm/index.d.ts +1 -0
  208. package/dist/flows/deposit/widgets/cash-confirm/index.js +1 -0
  209. package/dist/flows/deposit/widgets/cash-confirm/mocks.js +1 -0
  210. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.d.ts +37 -4
  211. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -1
  212. package/dist/flows/deposit/widgets/deposit/Deposit.d.ts +39 -4
  213. package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
  214. package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +58 -1
  215. package/dist/flows/deposit/widgets/deposit/compound/Deposit.js +1 -1
  216. package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.d.ts +6 -0
  217. package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.js +1 -1
  218. package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -1
  219. package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.d.ts +29 -0
  220. package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.js +1 -0
  221. package/dist/flows/deposit/widgets/deposit/compound/components/Guards.d.ts +28 -0
  222. package/dist/flows/deposit/widgets/deposit/compound/components/Guards.js +1 -0
  223. package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +11 -0
  224. package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -1
  225. package/dist/flows/deposit/widgets/deposit/compound/components/Method.d.ts +7 -0
  226. package/dist/flows/deposit/widgets/deposit/compound/components/Method.js +1 -1
  227. package/dist/flows/deposit/widgets/deposit/compound/components/MethodSection.d.ts +40 -0
  228. package/dist/flows/deposit/widgets/deposit/compound/components/MethodSection.js +1 -0
  229. package/dist/flows/deposit/widgets/deposit/compound/components/Methods.d.ts +16 -9
  230. package/dist/flows/deposit/widgets/deposit/compound/components/Methods.js +1 -1
  231. package/dist/flows/deposit/widgets/deposit/compound/components/Rail.d.ts +18 -0
  232. package/dist/flows/deposit/widgets/deposit/compound/components/Rail.js +1 -0
  233. package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.d.ts +43 -0
  234. package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.js +1 -0
  235. package/dist/flows/deposit/widgets/deposit/compound/components/Steps.d.ts +24 -0
  236. package/dist/flows/deposit/widgets/deposit/compound/components/Steps.js +1 -0
  237. package/dist/flows/deposit/widgets/deposit/compound/index.d.ts +2 -1
  238. package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +106 -4
  239. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.d.ts +41 -1
  240. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -1
  241. package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js +1 -1
  242. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.js +1 -1
  243. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.js +1 -1
  244. package/dist/flows/deposit/widgets/deposit-status-banner/compound/types.d.ts +5 -5
  245. package/dist/flows/deposit/widgets/error-state/ErrorState.d.ts +39 -4
  246. package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -1
  247. package/dist/flows/deposit/widgets/processing-state/ProcessingState.d.ts +30 -4
  248. package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -1
  249. package/dist/flows/deposit/widgets/success-state/SuccessState.d.ts +38 -4
  250. package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -1
  251. package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.d.ts +34 -3
  252. package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.js +1 -1
  253. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.d.ts +1 -1
  254. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -1
  255. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -1
  256. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +5 -2
  257. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -1
  258. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +6 -0
  259. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -1
  260. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.d.ts +4 -10
  261. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -1
  262. package/dist/flows/deposit/widgets/transfer-crypto/compound/types.d.ts +16 -2
  263. package/dist/flows/shared/transformers/computeQuoteAttrs.d.ts +1 -0
  264. package/dist/flows/shared/transformers/index.d.ts +1 -0
  265. package/dist/flows/shared/transformers/pickRelevantSettlement.d.ts +1 -0
  266. package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -1
  267. package/dist/flows/shared/transformers/testnets.js +1 -0
  268. package/dist/flows/withdraw/bindings/WithdrawBindings.d.ts +92 -0
  269. package/dist/flows/withdraw/bindings/WithdrawBindings.js +1 -0
  270. package/dist/flows/withdraw/bindings/index.d.ts +1 -0
  271. package/dist/flows/withdraw/bindings/index.js +1 -0
  272. package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +44 -71
  273. package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
  274. package/dist/flows/withdraw/driver/dto.d.ts +8 -7
  275. package/dist/flows/withdraw/driver/payloads.d.ts +16 -1
  276. package/dist/flows/withdraw/driver/transformers/settlementToWithdrawalPayload.js +1 -1
  277. package/dist/flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.js +1 -1
  278. package/dist/flows/withdraw/driver/types.d.ts +77 -14
  279. package/dist/flows/withdraw/orchestrator/controller.js +1 -1
  280. package/dist/flows/withdraw/orchestrator/index.d.ts +1 -1
  281. package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
  282. package/dist/flows/withdraw/orchestrator/types.d.ts +218 -35
  283. package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +36 -1
  284. package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -1
  285. package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.d.ts +39 -0
  286. package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.js +1 -0
  287. package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.d.ts +36 -0
  288. package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.js +1 -0
  289. package/dist/flows/withdraw/widgets/activity/index.d.ts +2 -0
  290. package/dist/flows/withdraw/widgets/activity/index.js +1 -0
  291. package/dist/flows/withdraw/widgets/activity/useWithdrawActivitySource.js +1 -0
  292. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.d.ts +60 -0
  293. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.js +1 -0
  294. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.d.ts +13 -0
  295. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.js +1 -0
  296. package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.d.ts +29 -0
  297. package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.js +1 -0
  298. package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.d.ts +25 -0
  299. package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.js +1 -0
  300. package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.d.ts +27 -0
  301. package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.js +1 -0
  302. package/dist/flows/withdraw/widgets/withdraw/compound/index.d.ts +3 -0
  303. package/dist/flows/withdraw/widgets/withdraw/compound/index.js +1 -0
  304. package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.d.ts +45 -2
  305. package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.js +1 -1
  306. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.d.ts +32 -12
  307. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -1
  308. package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -1
  309. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.d.ts +7 -6
  310. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +6 -1
  311. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -1
  312. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +7 -5
  313. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
  314. package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +15 -5
  315. package/dist/flows/withdraw/widgets/withdraw-form/validation.js +1 -1
  316. package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.d.ts +39 -3
  317. package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js +1 -1
  318. package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.d.ts +46 -2
  319. package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js +1 -1
  320. package/dist/format/index.d.ts +2 -1
  321. package/dist/format/index.js +1 -1
  322. package/dist/i18n/index.d.ts +5 -4
  323. package/dist/i18n/index.js +1 -1
  324. package/dist/i18n/locales/ar.js +1 -1
  325. package/dist/i18n/locales/es.js +1 -1
  326. package/dist/i18n/locales/source-keys.d.ts +12 -0
  327. package/dist/i18n/locales/source-keys.js +0 -0
  328. package/dist/icons/index.d.ts +12 -1
  329. package/dist/icons/index.js +1 -1
  330. package/dist/index.d.ts +36 -11
  331. package/dist/index.js +1 -1
  332. package/dist/package.js +1 -1
  333. package/dist/scope/KitPortalScope.js +1 -1
  334. package/dist/scope/KitScope.d.ts +27 -1
  335. package/dist/scope/KitScope.js +1 -1
  336. package/dist/scope/context.d.ts +24 -1
  337. package/dist/scope/index.d.ts +1 -1
  338. package/dist/shared/attribution/Attribution.js +1 -0
  339. package/dist/shared/attribution/Attribution.slots.js +1 -0
  340. package/dist/shared/attribution/Attribution.styles.js +1 -0
  341. package/dist/shared/attribution/index.js +1 -0
  342. package/dist/shared/chains/index.d.ts +48 -29
  343. package/dist/shared/chains/index.js +1 -1
  344. package/dist/shared/constants/brand-intercom.js +1 -0
  345. package/dist/shared/cuer/Cuer.js +1 -1
  346. package/dist/shared/dialog/DialogShell.d.ts +21 -6
  347. package/dist/shared/dialog/DialogShell.js +1 -1
  348. package/dist/shared/dialog/Frame.js +1 -1
  349. package/dist/shared/dialog/LoadingState.js +1 -0
  350. package/dist/shared/dialog/LoadingState.styles.js +1 -0
  351. package/dist/shared/dialog/StepTransition.js +1 -1
  352. package/dist/shared/dialog/useDirectionalChevronTransform.js +1 -1
  353. package/dist/shared/driver/types.d.ts +4 -3
  354. package/dist/shared/format/formatSmartRelative.d.ts +25 -0
  355. package/dist/shared/format/formatSmartRelative.js +1 -0
  356. package/dist/shared/format/formatUsd.js +1 -1
  357. package/dist/shared/i18n/KitI18nProvider.d.ts +11 -8
  358. package/dist/shared/i18n/KitI18nProvider.js +1 -1
  359. package/dist/shared/i18n/createKitI18n.d.ts +79 -16
  360. package/dist/shared/i18n/createKitI18n.js +1 -1
  361. package/dist/shared/i18n/useLingui.d.ts +11 -3
  362. package/dist/shared/icons/ActivityIcon.d.ts +12 -0
  363. package/dist/shared/icons/ActivityIcon.js +1 -0
  364. package/dist/shared/icons/AmexIcon.d.ts +14 -0
  365. package/dist/shared/icons/AmexIcon.js +1 -0
  366. package/dist/shared/icons/ApplePayIcon.d.ts +15 -0
  367. package/dist/shared/icons/ApplePayIcon.js +1 -0
  368. package/dist/shared/icons/BitcoinIcon.d.ts +17 -0
  369. package/dist/shared/icons/BitcoinIcon.js +1 -0
  370. package/dist/shared/icons/CardIcon.d.ts +16 -0
  371. package/dist/shared/icons/CardIcon.js +1 -0
  372. package/dist/shared/icons/CashIcon.d.ts +16 -0
  373. package/dist/shared/icons/CashIcon.js +1 -0
  374. package/dist/shared/icons/DiscoverIcon.d.ts +14 -0
  375. package/dist/shared/icons/DiscoverIcon.js +1 -0
  376. package/dist/shared/icons/GooglePayIcon.d.ts +15 -0
  377. package/dist/shared/icons/GooglePayIcon.js +1 -0
  378. package/dist/shared/icons/LogoIcon.d.ts +13 -0
  379. package/dist/shared/icons/LogoIcon.js +1 -0
  380. package/dist/shared/icons/MastercardIcon.d.ts +16 -0
  381. package/dist/shared/icons/MastercardIcon.js +1 -0
  382. package/dist/shared/icons/VisaIcon.d.ts +15 -0
  383. package/dist/shared/icons/VisaIcon.js +1 -0
  384. package/dist/shared/merchant-link/MerchantLink.d.ts +1 -0
  385. package/dist/shared/merchant-link/MerchantLink.js +1 -0
  386. package/dist/shared/merchant-link/MerchantLinkButton.d.ts +1 -0
  387. package/dist/shared/merchant-link/MerchantLinkButton.js +1 -0
  388. package/dist/shared/merchant-link/index.d.ts +1 -0
  389. package/dist/shared/merchant-link/index.js +1 -0
  390. package/dist/shared/merchant-link/resolveMerchantLink.js +1 -0
  391. package/dist/shared/orchestrator/activityOpenInput.d.ts +21 -0
  392. package/dist/shared/orchestrator/createActivityReducers.js +1 -0
  393. package/dist/shared/orchestrator/index.d.ts +2 -0
  394. package/dist/shared/orchestrator/index.js +1 -1
  395. package/dist/shared/orchestrator/resolveActivityEntry.d.ts +1 -0
  396. package/dist/shared/orchestrator/resolveActivityEntry.js +1 -0
  397. package/dist/shared/orchestrator/toFailure.js +1 -1
  398. package/dist/shared/orchestrator/types.d.ts +8 -0
  399. package/dist/shared/orchestrator/useSettlementWatcher.js +1 -1
  400. package/dist/shared/presentation/index.js +1 -0
  401. package/dist/shared/presentation/types.d.ts +30 -0
  402. package/dist/shared/presentation/types.js +1 -0
  403. package/dist/shared/presentation/useResolvedSurfaceKind.js +1 -0
  404. package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
  405. package/dist/shared/support/SupportConfigContext.d.ts +1 -0
  406. package/dist/shared/support/SupportConfigContext.js +1 -0
  407. package/dist/shared/support/SupportLink.d.ts +1 -0
  408. package/dist/shared/support/SupportLink.js +1 -0
  409. package/dist/shared/support/SupportSpinner.d.ts +1 -0
  410. package/dist/shared/support/SupportSpinner.js +1 -0
  411. package/dist/shared/support/index.d.ts +2 -0
  412. package/dist/shared/support/index.js +1 -0
  413. package/dist/shared/support/intercom-loader.d.ts +17 -0
  414. package/dist/shared/support/intercom-loader.js +1 -0
  415. package/dist/shared/support/types.d.ts +43 -0
  416. package/dist/shared/support/useIntercomMerchantContext.d.ts +27 -0
  417. package/dist/shared/support/useIntercomMerchantContext.js +1 -0
  418. package/dist/shared/support/useIntercomShutdownOnUnmount.js +1 -0
  419. package/dist/shared/support/useMerchantContext.d.ts +1 -0
  420. package/dist/shared/support/useMerchantContext.js +1 -0
  421. package/dist/shared/support/useSupportTrigger.js +1 -0
  422. package/dist/shared/terms/TermsConfigContext.d.ts +1 -0
  423. package/dist/shared/terms/TermsConfigContext.js +1 -0
  424. package/dist/shared/terms/TermsLink.d.ts +1 -0
  425. package/dist/shared/terms/TermsLink.js +1 -0
  426. package/dist/shared/terms/index.d.ts +1 -0
  427. package/dist/shared/terms/index.js +1 -0
  428. package/dist/shared/terms/types.d.ts +43 -0
  429. package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.d.ts +52 -0
  430. package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.js +1 -0
  431. package/dist/shared/ui/AdaptiveSurface/index.d.ts +2 -0
  432. package/dist/shared/ui/AdaptiveSurface/index.js +1 -0
  433. package/dist/shared/ui/Card/Card.d.ts +12 -9
  434. package/dist/shared/ui/Card/Card.js +1 -1
  435. package/dist/shared/ui/Card/Card.styles.js +1 -1
  436. package/dist/shared/ui/Details/Details.d.ts +9 -1
  437. package/dist/shared/ui/Details/Details.styles.js +1 -1
  438. package/dist/shared/ui/Dialog/Dialog.d.ts +10 -8
  439. package/dist/shared/ui/Dialog/Dialog.js +1 -1
  440. package/dist/shared/ui/Dialog/Dialog.styles.js +1 -1
  441. package/dist/shared/ui/Drawer/Drawer.d.ts +135 -0
  442. package/dist/shared/ui/Drawer/Drawer.js +1 -0
  443. package/dist/shared/ui/Drawer/Drawer.slots.d.ts +19 -0
  444. package/dist/shared/ui/Drawer/Drawer.slots.js +1 -0
  445. package/dist/shared/ui/Drawer/Drawer.styles.js +1 -0
  446. package/dist/shared/ui/Drawer/index.d.ts +2 -0
  447. package/dist/shared/ui/Drawer/index.js +1 -0
  448. package/dist/shared/ui/Select/Select.js +1 -1
  449. package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +21 -8
  450. package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -1
  451. package/dist/shared/ui/Steps/Steps.d.ts +52 -0
  452. package/dist/shared/ui/Steps/Steps.js +1 -0
  453. package/dist/shared/ui/Steps/Steps.slots.d.ts +7 -0
  454. package/dist/shared/ui/Steps/Steps.slots.js +1 -0
  455. package/dist/shared/ui/Steps/Steps.styles.js +1 -0
  456. package/dist/shared/ui/Steps/index.d.ts +2 -0
  457. package/dist/shared/ui/Steps/index.js +1 -0
  458. package/dist/shared/ui/Tabs/Tabs.d.ts +79 -0
  459. package/dist/shared/ui/Tabs/Tabs.js +1 -0
  460. package/dist/shared/ui/Tabs/Tabs.slots.d.ts +11 -0
  461. package/dist/shared/ui/Tabs/Tabs.slots.js +1 -0
  462. package/dist/shared/ui/Tabs/Tabs.styles.js +1 -0
  463. package/dist/shared/ui/Tabs/index.d.ts +2 -0
  464. package/dist/shared/ui/Tabs/index.js +1 -0
  465. package/dist/shared/ui/WalletRow/WalletRow.d.ts +1 -1
  466. package/dist/shared/ui/WalletRow/WalletRow.js +1 -1
  467. package/dist/shared/ui/surfaceContext.d.ts +9 -0
  468. package/dist/shared/ui/surfaceContext.js +1 -0
  469. package/dist/shared/utils/assertNever.js +1 -0
  470. package/dist/shared/utils/logos/types.d.ts +1 -1
  471. package/dist/shared/utils/useDeepMemo.js +1 -0
  472. package/dist/shared/wallet/ConnectWalletContext.d.ts +17 -0
  473. package/dist/shared/wallet/ConnectWalletContext.js +1 -0
  474. package/dist/shared/widgets/activity/ActivityTrigger.js +1 -0
  475. package/dist/shared/widgets/activity/ActivityTrigger.styles.js +1 -0
  476. package/dist/shared/widgets/activity/adapters/settlementToWidgetProps.js +1 -0
  477. package/dist/shared/widgets/activity/compound/Activity.d.ts +95 -0
  478. package/dist/shared/widgets/activity/compound/Activity.js +1 -0
  479. package/dist/shared/widgets/activity/compound/Activity.slots.d.ts +22 -0
  480. package/dist/shared/widgets/activity/compound/Activity.slots.js +1 -0
  481. package/dist/shared/widgets/activity/compound/Activity.styles.js +1 -0
  482. package/dist/shared/widgets/activity/compound/ActivityDetail.d.ts +82 -0
  483. package/dist/shared/widgets/activity/compound/ActivityDetail.js +1 -0
  484. package/dist/shared/widgets/activity/compound/Row.slots.d.ts +21 -0
  485. package/dist/shared/widgets/activity/compound/Row.slots.js +1 -0
  486. package/dist/shared/widgets/activity/compound/Row.styles.js +1 -0
  487. package/dist/shared/widgets/activity/compound/components/ActivityHeader.d.ts +39 -0
  488. package/dist/shared/widgets/activity/compound/components/ActivityHeader.js +1 -0
  489. package/dist/shared/widgets/activity/compound/components/Empty.d.ts +15 -0
  490. package/dist/shared/widgets/activity/compound/components/Empty.js +1 -0
  491. package/dist/shared/widgets/activity/compound/components/ErrorView.d.ts +26 -0
  492. package/dist/shared/widgets/activity/compound/components/ErrorView.js +1 -0
  493. package/dist/shared/widgets/activity/compound/components/List.d.ts +23 -0
  494. package/dist/shared/widgets/activity/compound/components/List.js +1 -0
  495. package/dist/shared/widgets/activity/compound/components/Row.d.ts +51 -0
  496. package/dist/shared/widgets/activity/compound/components/Row.js +1 -0
  497. package/dist/shared/widgets/activity/compound/components/StatusPip.js +1 -0
  498. package/dist/shared/widgets/activity/compound/context.d.ts +95 -0
  499. package/dist/shared/widgets/activity/compound/context.js +1 -0
  500. package/dist/shared/widgets/activity/compound/index.d.ts +8 -0
  501. package/dist/shared/widgets/activity/compound/index.js +1 -0
  502. package/dist/shared/widgets/activity/index.js +1 -0
  503. package/dist/shared/widgets/activity/payloads.d.ts +108 -0
  504. package/dist/shared/widgets/activity/transformers/activityResponseToPayload.js +1 -0
  505. package/dist/shared/widgets/activity/transformers/resolveDirection.js +1 -0
  506. package/dist/shared/widgets/amount-entry/compound/AmountEntry.d.ts +10 -2
  507. package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -1
  508. package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.d.ts +6 -0
  509. package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.js +1 -1
  510. package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -1
  511. package/dist/shared/widgets/amount-entry/compound/components/Details.d.ts +34 -0
  512. package/dist/shared/widgets/amount-entry/compound/components/Details.js +1 -0
  513. package/dist/shared/widgets/amount-entry/compound/components/Footer.d.ts +2 -1
  514. package/dist/shared/widgets/amount-entry/compound/components/Footer.js +1 -1
  515. package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +6 -1
  516. package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -1
  517. package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -1
  518. package/dist/shared/widgets/amount-entry/compound/components/Hero/SwapBackdrop.js +1 -1
  519. package/dist/shared/widgets/amount-entry/compound/components/Notice.d.ts +7 -0
  520. package/dist/shared/widgets/amount-entry/compound/components/Notice.js +1 -0
  521. package/dist/shared/widgets/amount-entry/compound/index.d.ts +1 -1
  522. package/dist/shared/widgets/amount-entry/compound/types.d.ts +63 -3
  523. package/dist/shared/widgets/asset-picker/compound/AssetPicker.d.ts +3 -0
  524. package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -1
  525. package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.d.ts +2 -0
  526. package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.js +1 -1
  527. package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -1
  528. package/dist/shared/widgets/asset-picker/compound/components/Asset.d.ts +7 -1
  529. package/dist/shared/widgets/asset-picker/compound/components/Asset.js +1 -1
  530. package/dist/shared/widgets/asset-picker/compound/components/Empty.d.ts +15 -0
  531. package/dist/shared/widgets/asset-picker/compound/components/Empty.js +1 -0
  532. package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +6 -1
  533. package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -1
  534. package/dist/shared/widgets/asset-picker/compound/types.d.ts +15 -1
  535. package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.styles.js +1 -1
  536. package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.js +1 -1
  537. package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.d.ts +4 -3
  538. package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -1
  539. package/dist/shared/widgets/confirm-transfer/compound/components/QuoteTimer.js +1 -1
  540. package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -1
  541. package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -1
  542. package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +1 -1
  543. package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -1
  544. package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -1
  545. package/dist/shared/widgets/processing-state/compound/ProcessingState.d.ts +1 -5
  546. package/dist/shared/widgets/processing-state/compound/ProcessingState.js +1 -1
  547. package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.d.ts +0 -1
  548. package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.js +1 -1
  549. package/dist/shared/widgets/processing-state/compound/ProcessingState.styles.js +1 -1
  550. package/dist/shared/widgets/processing-state/compound/components/Details.d.ts +6 -1
  551. package/dist/shared/widgets/processing-state/compound/components/Details.js +1 -1
  552. package/dist/shared/widgets/processing-state/compound/components/Header.d.ts +4 -3
  553. package/dist/shared/widgets/processing-state/compound/components/Header.js +1 -1
  554. package/dist/shared/widgets/processing-state/compound/components/Hero.d.ts +14 -7
  555. package/dist/shared/widgets/processing-state/compound/components/Hero.js +1 -1
  556. package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -1
  557. package/dist/shared/widgets/processing-state/compound/components/StatusPill.js +1 -1
  558. package/dist/shared/widgets/processing-state/compound/components/splitAmount.js +1 -0
  559. package/dist/shared/widgets/processing-state/compound/index.d.ts +1 -1
  560. package/dist/shared/widgets/processing-state/compound/types.d.ts +11 -29
  561. package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -1
  562. package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -1
  563. package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +1 -1
  564. package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -1
  565. package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -1
  566. package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -1
  567. package/dist/shared/widgets/success-state/compound/types.d.ts +5 -5
  568. package/dist/storage/context.d.ts +9 -1
  569. package/dist/storage/context.js +1 -1
  570. package/dist/storage/index.d.ts +1 -1
  571. package/dist/stridge/StridgeProvider.d.ts +187 -35
  572. package/dist/stridge/StridgeProvider.js +1 -1
  573. package/dist/stridge/depositOwner.js +1 -0
  574. package/dist/stridge/optionalWagmi.js +1 -0
  575. package/dist/stridge/stubs.js +1 -1
  576. package/dist/styles/index.css +607 -12
  577. package/dist/types.d.ts +7 -5
  578. package/dist/ui/index.d.ts +9 -1
  579. package/dist/ui/index.js +1 -1
  580. package/dist/version.d.ts +10 -0
  581. package/dist/version.js +1 -0
  582. package/dist/withdraw/compound/index.d.ts +11 -8
  583. package/dist/withdraw/compound/index.js +1 -1
  584. package/dist/withdraw/dialog/index.d.ts +4 -1
  585. package/dist/withdraw/widgets/index.d.ts +7 -0
  586. package/dist/withdraw/widgets/index.js +1 -0
  587. package/package.json +31 -7
  588. package/dist/_internal/deposit/widgets/index.d.ts +0 -11
  589. package/dist/_internal/deposit/widgets/index.js +0 -1
  590. package/dist/_internal/withdraw/widgets/index.d.ts +0 -5
  591. package/dist/_internal/withdraw/widgets/index.js +0 -1
  592. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts +0 -36
  593. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.js +0 -1
  594. package/dist/shared/widgets/processing-state/compound/components/Actions.d.ts +0 -17
  595. package/dist/shared/widgets/processing-state/compound/components/Actions.js +0 -1
  596. package/dist/stridge/StridgeContext.d.ts +0 -29
  597. package/dist/stridge/StridgeContext.js +0 -1
@@ -0,0 +1,16 @@
1
+ import { CashConfirmMethodBodyProps } from "../types.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/flows/deposit/widgets/cash-confirm/compound/components/CardBody.d.ts
5
+ /**
6
+ * Card-method confirm body. Loading renders a `CARD DETAILS` label + a 44-tall skeleton block +
7
+ * a "Loading secure card input..." hint + a disabled "Pay Now" CTA. Ready renders the same label
8
+ * + the editable {@link CardInputRow} (brand glyph + PAN + MM/YY + CVC + its own "Pay {amount}
9
+ * securely" CTA — the row owns the wrapping `<form>` so browser-native saved-card autofill
10
+ * engages).
11
+ */
12
+ declare function CashConfirmCardBody({
13
+ disabled
14
+ }?: CashConfirmMethodBodyProps): _$react_jsx_runtime0.JSX.Element;
15
+ //#endregion
16
+ export { CashConfirmCardBody };
@@ -0,0 +1 @@
1
+ "use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import{useLingui as t}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{Button as n}from"../../../../../../shared/ui/Button/Button.js";import{Skeleton as r}from"../../../../../../shared/ui/Skeleton/Skeleton.js";import"../../../../../../shared/ui/Skeleton/index.js";import{text as i}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{CASH_CONFIRM_SLOTS as a}from"../CashConfirm.slots.js";import{styles as o}from"../CashConfirm.styles.js";import{cashConfirmDimensions as s}from"../cashConfirmDimensions.js";import{useCashConfirmContext as c}from"../context.js";import{BodyLabel as l}from"./BodyLabel.js";import{CardInputRow as u}from"./CardInputRow.js";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import*as m from"@stylexjs/stylex";function h({disabled:h=!1}={}){let{_:g}=t(),{phase:_,amount:v}=c(`CashConfirm.CardBody`),y=_.kind===`loading`;return p(`div`,{"data-stridge-slot":a.methodBody,...m.props(o.methodBody),children:[f(l,{children:f(e,{id:`iROlQr`,message:`Card details`})}),y?p(d,{children:[f(r,{width:`100%`,height:s.ctaHeight,radius:s.cardRowRadius}),f(i.span,{size:`xs`,leading:`tight`,color:`subdued`,...m.props(o.bodyHint),children:f(e,{id:`YKfMl6`,message:`Loading secure card input...`})}),f(n,{size:`cta`,disabled:!0,"aria-label":g({id:`PknXwq`,message:`Pay Now`}),"data-stridge-slot":a.cta,...m.props(o.cta),children:f(i.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,color:`inherit`,children:f(e,{id:`PknXwq`,message:`Pay Now`})})})]}):f(u,{amount:v,disabled:h})]})}export{h as CashConfirmCardBody};
@@ -0,0 +1 @@
1
+ import{AmexIcon as e}from"../../../../../../shared/icons/AmexIcon.js";import{CardIcon as t}from"../../../../../../shared/icons/CardIcon.js";import{DiscoverIcon as n}from"../../../../../../shared/icons/DiscoverIcon.js";import{MastercardIcon as r}from"../../../../../../shared/icons/MastercardIcon.js";import{VisaIcon as i}from"../../../../../../shared/icons/VisaIcon.js";import"../../../../../../icons/index.js";function a(a){return a===`visa`?i:a===`mastercard`?r:a===`amex`?e:a===`discover`?n:t}export{a as pickBrandIcon};
@@ -0,0 +1 @@
1
+ "use client";import{useKitI18n as e}from"../../../../../../shared/i18n/useKitI18n.js";import{Trans as t}from"../../../../../../shared/i18n/Trans.js";import{useLingui as n}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{DEFAULT_TOKENIZE_CARD as ee,useDepositBindingsRef as r}from"../../../../bindings/DepositBindings.js";import"../../../../bindings/index.js";import{formatUsd as i}from"../../../../../../shared/format/formatUsd.js";import{Button as a}from"../../../../../../shared/ui/Button/Button.js";import{text as te}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{CASH_CONFIRM_SLOTS as o}from"../CashConfirm.slots.js";import{SUBMIT_SUCCESS_HOLD_MS as ne}from"../../mocks.js";import{pickBrandIcon as s}from"./CardInputRow.icons.js";import{expDigitCount as c,handleSegmentedKey as l}from"./CardInputRow.keys.js";import{cvcLengthForBrand as u,getCvcError as d,getExpError as f,getPanError as re,isValidCvc as ie,isValidExp as ae,isValidPan as p,panMaxChars as m}from"./cardFormat.js";import{cardInputRowReducer as h,initialCardInputRowState as g}from"./CardInputRow.state.js";import{styles as _}from"./CardInputRow.styles.js";import{useEffect as v,useId as oe,useMemo as se,useReducer as ce,useRef as y}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import*as S from"@stylexjs/stylex";function C({amount:C,disabled:w=!1}){let{_:T}=n(),E=i(C,e(),{showSmallValueClamp:!1}),[D,O]=ce(h,g),k=r(),A=y(null),j=y(null),M=y(null),N=y(null),P=y(null),F=oe(),I=y(!0),L=y(!1),R=y(null);v(()=>(I.current=!0,()=>{I.current=!1,R.current!==null&&(clearTimeout(R.current),R.current=null)}),[]);let z=s(D.brand),B=m(D.brand),V=u(D.brand),H=se(()=>new Date,[]),le=p(D.pan,D.brand),U=ae(D.exp,H),W=ie(D.cvc,D.brand),G=le&&U&&W,K=D.touchedPan?re(D.pan,D.brand):null,q=D.touchedExp?f(D.exp,H):null,J=D.touchedCvc?d(D.cvc,D.brand):null;function ue(){return D.submitError?D.submitError:K===`incomplete`?T({id:`SMl3YV`,message:`Card number is incomplete`}):K===`invalid`?T({id:`meq3YR`,message:`Card number is invalid`}):q===`incomplete`?T({id:`YruUmm`,message:`Expiry date is incomplete`}):q===`expired`?T({id:`yMg5R0`,message:`Card has expired`}):q===`invalid`?T({id:`DO0IYK`,message:`Expiry date is invalid`}):J===`incomplete`?T({id:`64M0UA`,message:`Security code is incomplete`}):null}let Y=ue(),X=y(!1);v(()=>{let e=p(D.pan,D.brand),t=!X.current&&e;X.current=e,t&&(typeof document>`u`||document.activeElement===A.current&&j.current?.focus())},[D.pan,D.brand]);let Z=y(0);v(()=>{let e=c(D.exp),t=Z.current<4&&e===4;Z.current=e,t&&(typeof document>`u`||document.activeElement===j.current&&M.current?.focus())},[D.exp]);let de=async e=>{if(e.preventDefault(),L.current||!G||D.submitting||D.submitted||D.submitError!==null)return;L.current=!0,O({type:`submit-start`});let t={pan:D.pan.replace(/\s/g,``),exp:D.exp,cvc:D.cvc,brand:D.brand},n=k.current.tokenizeCard??ee,r;try{r=await n(t)}catch(e){r={ok:!1,reason:e instanceof Error?e.message:`Tokenization failed`}}if(!I.current){L.current=!1;return}r.ok?(O({type:`submit-success`}),R.current=setTimeout(()=>{R.current=null,I.current&&(L.current=!1,O({type:`submit-reset`}))},ne)):(L.current=!1,O({type:`submit-error`,reason:r.reason}))},Q=D.submitting||D.submitted,fe=w||!G||D.submitting||D.submitted||D.submitError!==null;function pe(){return D.submitError?null:K?`pan`:q?`exp`:J?`cvc`:null}let $=pe(),me=$===`pan`?F:void 0,he=$===`exp`?F:void 0,ge=$===`cvc`?F:void 0;return x(`form`,{onSubmit:de,autoComplete:`off`,"data-stridge-slot":o.cardForm,...S.props(_.form),children:[x(`div`,{...S.props(_.row,!!Y&&_.rowError),children:[b(`span`,{tabIndex:-1,"aria-hidden":`true`,...S.props(_.brandSlot),children:b(z,{...S.props(_.brandIcon)})}),b(`input`,{ref:A,type:`text`,autoComplete:`off`,inputMode:`numeric`,maxLength:B,placeholder:`1234 5678 9012 3456`,"aria-label":T({id:`xHIEQ5`,message:`Card number`}),"aria-invalid":K?!0:void 0,"aria-describedby":me,value:D.pan,disabled:Q,onChange:e=>O({type:`pan-change`,raw:e.target.value}),onBlur:()=>O({type:`pan-blur`}),onKeyDown:e=>l(e,j,N),"data-stridge-slot":o.cardPan,...S.props(_.inputBase,_.panInput)}),b(`input`,{ref:j,type:`text`,autoComplete:`off`,inputMode:`numeric`,maxLength:5,placeholder:`MM/YY`,"aria-label":T({id:`bGtkfz`,message:`Card expiration`}),"aria-invalid":q?!0:void 0,"aria-describedby":he,value:D.exp,disabled:Q,onChange:e=>O({type:`exp-change`,raw:e.target.value}),onBlur:()=>O({type:`exp-blur`}),onKeyDown:e=>l(e,M,A),"data-stridge-slot":o.cardExp,...S.props(_.inputBase,_.expInput)}),b(`input`,{ref:M,type:`text`,autoComplete:`off`,inputMode:`numeric`,maxLength:V,placeholder:`CVC`,"aria-label":T({id:`wLmRnI`,message:`Security code`}),"aria-invalid":J?!0:void 0,"aria-describedby":ge,value:D.cvc,disabled:Q,onChange:e=>O({type:`cvc-change`,raw:e.target.value}),onBlur:()=>O({type:`cvc-blur`}),onKeyDown:e=>l(e,P,j),"data-stridge-slot":o.cardCvc,...S.props(_.inputBase,_.cvcInput)})]}),Y?b(`span`,{id:F,role:`status`,"aria-live":`polite`,...S.props(_.errorText),children:Y}):null,D.submitted?b(`span`,{role:`status`,...S.props(_.successText),children:b(t,{id:`XFvFyp`,message:`Card details submitted`})}):null,b(a,{type:`submit`,size:`cta`,disabled:fe,"aria-label":T({id:`I2Iug_`,message:`Pay {amountFormatted} securely`,values:{amountFormatted:E}}),"data-stridge-slot":o.cta,...S.props(_.cta),children:b(te.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,color:`inherit`,children:b(t,{id:`I2Iug_`,message:`Pay {amountFormatted} securely`,values:{amountFormatted:E}})})})]})}export{C as CardInputRow};
@@ -0,0 +1 @@
1
+ function e(e){return e.replace(/\D/g,``).length}function t(e,t,n){if(e.key===`Tab`){let r=e.shiftKey?n.current:t.current;if(!r)return;e.preventDefault(),r.focus();return}if(e.shiftKey)return;let r=e.currentTarget;if(r.selectionStart===r.selectionEnd){if(e.key===`ArrowRight`){if(r.selectionStart!==r.value.length)return;let n=t.current;if(!n)return;e.preventDefault(),n.focus(),n.setSelectionRange(0,0);return}if(e.key===`ArrowLeft`){if(r.selectionStart!==0)return;let t=n.current;if(!t)return;e.preventDefault(),t.focus();let i=t.value.length;t.setSelectionRange(i,i)}}}export{e as expDigitCount,t as handleSegmentedKey};
@@ -0,0 +1 @@
1
+ import{assertNever as e}from"../../../../../../shared/utils/assertNever.js";import{detectBrand as t,formatCvc as n,formatExp as r,formatPan as i}from"./cardFormat.js";const a={pan:``,exp:``,cvc:``,brand:`unknown`,touchedPan:!1,touchedExp:!1,touchedCvc:!1,submitting:!1,submitted:!1,submitError:null};function o(a,o){if(o.type===`pan-change`){let e=t(o.raw),r=e===a.brand?a.cvc:n(a.cvc,e);return{...a,pan:i(o.raw,e),brand:e,cvc:r,submitError:null}}return o.type===`exp-change`?{...a,exp:r(o.raw),submitError:null}:o.type===`cvc-change`?{...a,cvc:n(o.raw,a.brand),submitError:null}:o.type===`pan-blur`?{...a,touchedPan:!0}:o.type===`exp-blur`?{...a,touchedExp:!0}:o.type===`cvc-blur`?{...a,touchedCvc:!0}:o.type===`submit-start`?{...a,submitting:!0,submitError:null}:o.type===`submit-success`?{...a,submitting:!1,submitted:!0}:o.type===`submit-error`?{...a,submitting:!1,submitError:o.reason}:o.type===`submit-reset`?{...a,submitted:!1}:e(o)}export{o as cardInputRowReducer,a as initialCardInputRowState};
@@ -0,0 +1 @@
1
+ const e={form:{"CardInputRow__styles.form":`CardInputRow__styles.form`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x2blr79`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:15`},row:{"CardInputRow__styles.row":`CardInputRow__styles.row`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,"paddingBlock-k8WAf4":`x1yowcxs`,"paddingInline-kg3NbH":`x1fk34n2`,"backgroundColor-kWkggS":`x407w7c`,"borderColor-kVAM5u":`x1bue7yx`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,"borderRadius-kaIpWk":`x13pkpm2`,"transitionProperty-k1ekBW":`xshfolx`,"transitionDuration-kIyJzY":`x1vhb3u9`,"transitionTimingFunction-kAMwcw":`x9lcvmn`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:21`},rowError:{"CardInputRow__styles.rowError":`CardInputRow__styles.rowError`,"borderColor-kVAM5u":`x16691aj`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:37`},brandSlot:{"CardInputRow__styles.brandSlot":`CardInputRow__styles.brandSlot`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"width-kzqmXN":`x1td3qas`,"height-kZKoxP":`x1qx5ct2`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xi96bwj`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:40`},brandIcon:{"CardInputRow__styles.brandIcon":`CardInputRow__styles.brandIcon`,"width-kzqmXN":`xh8yej3`,"height-kZKoxP":`x5yr21d`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:49`},inputBase:{"CardInputRow__styles.inputBase":`CardInputRow__styles.inputBase`,"appearance-kysU6D":`xjyslct`,"backgroundColor-kWkggS":`xjbqb8w`,"borderWidth-kMzoRj":`xc342km`,"outlineStyle-k3XXqK":`x1t137rt`,"padding-kmVPX3":`x1717udv`,"margin-kogj98":`x1ghz6dp`,"color-kMwMTN":`xzn0pkc`,"caretColor-knGrYV":`xv247kb`,"fontFamily-kMv6JI":`xlaww2m`,"fontSize-kGuDYH":`x14qa7mu`,"fontWeight-k63SB2":`xi0sa8g`,"lineHeight-kLWn49":`x1u7k74`,"fontVariantNumeric-kcqcaj":`xss6m8b`,"::placeholder_color-k8Qsv1":`x16nik3i`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:53`},panInput:{"CardInputRow__styles.panInput":`CardInputRow__styles.panInput`,"flexGrow-kzQI83":`x1iyjqo2`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:71`},expInput:{"CardInputRow__styles.expInput":`CardInputRow__styles.expInput`,"width-kzqmXN":`xig3uv9`,"flexShrink-kmuXW":`x2lah0s`,"textAlign-k9WMMc":`x2b8uid`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:75`},cvcInput:{"CardInputRow__styles.cvcInput":`CardInputRow__styles.cvcInput`,"width-kzqmXN":`x1bu4hv2`,"flexShrink-kmuXW":`x2lah0s`,"textAlign-k9WMMc":`x2b8uid`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:80`},errorText:{"CardInputRow__styles.errorText":`CardInputRow__styles.errorText`,"display-k1xSpc":`x1lliihq`,"fontSize-kGuDYH":`x1oae1zf`,"color-kMwMTN":`xreodjm`,"margin-kogj98":`x1ghz6dp`,"paddingInlineStart-kZCmMZ":`x1qntkwk`,"lineHeight-kLWn49":`x1u7k74`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:85`},successText:{"CardInputRow__styles.successText":`CardInputRow__styles.successText`,"display-k1xSpc":`x1lliihq`,"fontSize-kGuDYH":`x1oae1zf`,"color-kMwMTN":`xwiqrka`,"margin-kogj98":`x1ghz6dp`,"paddingInlineStart-kZCmMZ":`x1qntkwk`,"lineHeight-kLWn49":`x1u7k74`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:93`},cta:{"CardInputRow__styles.cta":`CardInputRow__styles.cta`,"alignSelf-kSGwAc":`xkh2ocl`,"borderWidth-kMzoRj":`xc342km`,"cursor-kkrTdU":`x1ypdohk`,$$css:`@stridge/kit:src/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.ts:101`}};export{e as styles};
@@ -0,0 +1,16 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/flows/deposit/widgets/cash-confirm/compound/components/GooglePayBody.d.ts
4
+ /**
5
+ * Google-Pay confirm body. Loading paints a `TAP TO PAY` label above a 44-tall pill-radius
6
+ * skeleton in place of the button. Ready replaces the skeleton with a kit-tokened pill carrying
7
+ * the Google Pay icon + "Buy with Google Pay" lockup, followed by a "Confirm in your Google
8
+ * Wallet" helper below. Click is a no-op stub — no `PaymentRequest` SDK negotiation, no payment
9
+ * intent; a real merchant integration will replace this surface.
10
+ *
11
+ * Shares the `[BodyLabel] → [action] → [helper below]` rhythm with `CardConfirmBody` and
12
+ * `ApplePayConfirmBody` so the three per-method bodies read in lockstep.
13
+ */
14
+ declare function CashConfirmGooglePayBody(): _$react_jsx_runtime0.JSX.Element;
15
+ //#endregion
16
+ export { CashConfirmGooglePayBody };
@@ -0,0 +1 @@
1
+ "use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import{useLingui as t}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{GooglePayIcon as n}from"../../../../../../shared/icons/GooglePayIcon.js";import"../../../../../../icons/index.js";import{Skeleton as r}from"../../../../../../shared/ui/Skeleton/Skeleton.js";import"../../../../../../shared/ui/Skeleton/index.js";import{text as i}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{CASH_CONFIRM_SLOTS as a}from"../CashConfirm.slots.js";import{styles as o}from"../CashConfirm.styles.js";import{cashConfirmDimensions as s}from"../cashConfirmDimensions.js";import{useCashConfirmContext as c}from"../context.js";import{BodyLabel as l}from"./BodyLabel.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";function p(){let{_:p}=t(),{phase:m}=c(`CashConfirm.GooglePayBody`),h=m.kind===`loading`,g=()=>{};return d(`div`,{"data-stridge-slot":a.methodBody,...f.props(o.methodBody),children:[u(l,{children:u(e,{id:`6ja7nr`,message:`Tap to pay`})}),h?u(r,{width:`100%`,height:s.ctaHeight,radius:s.googlePayPillRadius}):d(`button`,{type:`button`,onClick:g,"aria-label":p({id:`Qdn2XH`,message:`Buy with Google Pay`}),"data-stridge-slot":a.googlePayButton,...f.props(o.googlePayButton),children:[u(n,{"aria-hidden":!0,...f.props(o.googlePayIcon)}),u(i.span,{size:`sm`,fontWeight:`semibold`,leading:`tight`,color:`inherit`,children:u(e,{id:`Qdn2XH`,message:`Buy with Google Pay`})})]}),u(i.p,{size:`sm`,leading:`tight`,color:`subdued`,...f.props(o.bodyHint),children:u(e,{id:`t-aixw`,message:`Confirm in your Google Wallet`})})]})}export{p as CashConfirmGooglePayBody};
@@ -0,0 +1,21 @@
1
+ import { CashConfirmHeaderProps } from "../types.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/flows/deposit/widgets/cash-confirm/compound/components/Header.d.ts
5
+ /**
6
+ * Header row for the per-method cash confirm screen. Renders a back affordance + "Pay with
7
+ * {method}" title in a left-aligned cluster, and the dialog close button as the trailing
8
+ * element. Mirrors `TransferCryptoHeader` / `WithdrawFormHeader` so all three back-bearing
9
+ * flow headers share the same chrome rhythm.
10
+ *
11
+ * Titles are inlined as `<Trans>` rather than computed in a helper because Lingui's macro
12
+ * extractor only recognises `t` as the destructured identifier from {@link useLingui} when the
13
+ * call sits in the component scope — pushing the cascade into a helper that takes `t` as a
14
+ * parameter loses the binding and the strings drop from the catalog.
15
+ */
16
+ declare function CashConfirmHeader({
17
+ title,
18
+ onBack
19
+ }?: CashConfirmHeaderProps): _$react_jsx_runtime0.JSX.Element;
20
+ //#endregion
21
+ export { CashConfirmHeader };
@@ -0,0 +1 @@
1
+ "use client";import{Trans as e}from"../../../../../../shared/i18n/Trans.js";import{useLingui as t}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{ChevronLeftIcon as n}from"../../../../../../shared/icons/ChevronLeftIcon.js";import"../../../../../../icons/index.js";import{IconButton as r}from"../../../../../../shared/ui/IconButton/IconButton.js";import{Dialog as i}from"../../../../../../shared/ui/Dialog/Dialog.js";import"../../../../../../shared/ui/Dialog/index.js";import{Card as a}from"../../../../../../shared/ui/Card/Card.js";import{text as o}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{CASH_CONFIRM_SLOTS as s}from"../CashConfirm.slots.js";import{styles as c}from"../CashConfirm.styles.js";import{useCashConfirmContext as l}from"../context.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";function p({title:p,onBack:m}={}){let h=l(`CashConfirm.Header`),{_:g}=t(),_=m===null?void 0:m??h.onBack,v=p??(h.cashMethod===`applePay`?u(e,{id:`WsByvK`,message:`Pay with Apple Pay`}):h.cashMethod===`googlePay`?u(e,{id:`1zDzn9`,message:`Pay with Google Pay`}):u(e,{id:`bAy57M`,message:`Pay with Card`}));return d(a.Header,{"data-stridge-slot":s.header,...f.props(c.header),children:[d(`div`,{...f.props(c.headerLeft),children:[typeof _==`function`?u(r,{"aria-label":g({id:`iH8pgl`,message:`Back`}),onClick:_,children:u(n,{"aria-hidden":!0,...f.props(c.backIcon)})}):null,u(o.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,...f.props(c.headerTitle),children:v})]}),u(i.CloseButton,{})]})}export{p as CashConfirmHeader};
@@ -0,0 +1,17 @@
1
+ import { CashConfirmSummaryProps } from "../types.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/flows/deposit/widgets/cash-confirm/compound/components/Summary.d.ts
5
+ /**
6
+ * Read-only summary card sitting above the per-method body. Renders two static rows (Top up on /
7
+ * Total) followed by a `Collapsible` whose trigger shows "View breakdown ⌄" and whose panel
8
+ * reveals four `computeMockCashBreakdown`-driven rows when expanded.
9
+ *
10
+ * Reuses `computeMockCashBreakdown` directly so the rows replay what the user saw on
11
+ * `cashAmountEntry`; no duplicate fixture is introduced.
12
+ */
13
+ declare function CashConfirmSummary({
14
+ brandName: brandNameOverride
15
+ }?: CashConfirmSummaryProps): _$react_jsx_runtime0.JSX.Element;
16
+ //#endregion
17
+ export { CashConfirmSummary };
@@ -0,0 +1 @@
1
+ "use client";import{useKitI18n as e}from"../../../../../../shared/i18n/useKitI18n.js";import{Trans as t}from"../../../../../../shared/i18n/Trans.js";import{useLingui as n}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{formatUsd as r}from"../../../../../../shared/format/formatUsd.js";import{ChevronRightIcon as i}from"../../../../../../shared/icons/ChevronRightIcon.js";import"../../../../../../icons/index.js";import{Card as a}from"../../../../../../shared/ui/Card/Card.js";import{Collapsible as o}from"../../../../../../shared/ui/Collapsible/Collapsible.js";import{text as s}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{MOCK_RECEIVE_TOKEN as c,computeMockCashBreakdown as l}from"../../../../shared/cash.js";import{CASH_CONFIRM_SLOTS as u}from"../CashConfirm.slots.js";import{styles as d}from"../CashConfirm.styles.js";import{useCashConfirmContext as f}from"../context.js";import{useDirectionalChevronTransform as p}from"../../../../../../shared/dialog/useDirectionalChevronTransform.js";import{useMemo as m,useState as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import*as v from"@stylexjs/stylex";function y({brandName:i}={}){let{_:p}=n(),y=e(),{amount:S,cashMethod:C,brandName:w}=f(`CashConfirm.Summary`),[T,E]=h(!1),D=i??w,O=m(()=>{let e=l(S,C);return{totalUsd:r(S,y,{showSmallValueClamp:!1}),subtotalUsd:r(e.amountUsd,y,{showSmallValueClamp:!1}),rate:r(e.rate,y,{showSmallValueClamp:!1}),processing:r(e.processingFeeUsd,y,{showSmallValueClamp:!1}),network:r(e.networkFeeUsd,y,{showSmallValueClamp:!1})}},[S,C,y]);return _(a,{variant:`default`,"data-stridge-slot":u.summary,...v.props(d.summary),children:[_(`div`,{"data-stridge-slot":u.summaryStaticRow,...v.props(d.summaryStaticRow),children:[g(s.span,{size:`sm`,leading:`tight`,"data-stridge-slot":u.summaryRowLabel,...v.props(d.summaryLabel),children:g(t,{id:`HalPBQ`,message:`Top up on`})}),g(s.span,{size:`sm`,leading:`tight`,"data-stridge-slot":u.summaryRowValue,...v.props(d.summaryValue),children:D??``})]}),_(`div`,{"data-stridge-slot":u.summaryStaticRow,...v.props(d.summaryStaticRow),children:[g(s.span,{size:`sm`,leading:`tight`,"data-stridge-slot":u.summaryRowLabel,...v.props(d.summaryLabel),children:g(t,{id:`72c5Qo`,message:`Total`})}),g(s.span,{size:`sm`,leading:`tight`,"data-stridge-slot":u.summaryRowValue,...v.props(d.summaryValue),children:O.totalUsd})]}),_(o,{open:T,onOpenChange:E,children:[g(o.Trigger,{render:(e,{open:n})=>_(`button`,{type:`button`,"data-stridge-slot":u.breakdownTrigger,...e,children:[g(s.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`inherit`,children:n?g(t,{id:`t1k2Bt`,message:`Hide breakdown`}):g(t,{id:`3qkDVZ`,message:`View breakdown`})}),g(b,{open:n})]}),"aria-label":p(T?{id:`t1k2Bt`,message:`Hide breakdown`}:{id:`3qkDVZ`,message:`View breakdown`}),...v.props(d.breakdownTrigger)}),g(o.Panel,{children:_(`div`,{"data-stridge-slot":u.summaryBreakdown,...v.props(d.breakdownPanel),children:[g(x,{label:g(t,{id:`hehnjM`,message:`Amount`}),value:O.subtotalUsd}),g(x,{label:g(t,{id:`vepIdX`,message:`Crypto price`}),value:g(t,{id:`eUbBqz`,message:`1 {0} = {1}`,values:{0:c.symbol,1:O.rate}})}),g(x,{label:g(t,{id:`QFwptY`,message:`Processing fee`}),value:`− ${O.processing}`}),g(x,{label:g(t,{id:`y62Dys`,message:`Network fee`}),value:`− ${O.network}`})]})})]})]})}function b({open:e}){let t=p(e);return g(i,{"aria-hidden":!0,"data-stridge-slot":u.breakdownChevron,style:{transform:t},...v.props(d.breakdownChevron)})}function x({label:e,value:t}){return _(`div`,{"data-stridge-slot":u.breakdownRow,...v.props(d.breakdownRow),children:[g(s.span,{size:`xs`,leading:`tight`,"data-stridge-slot":u.breakdownRowLabel,...v.props(d.breakdownLabel),children:e}),g(s.span,{size:`xs`,leading:`tight`,"data-stridge-slot":u.breakdownRowValue,...v.props(d.breakdownValue),children:t})]})}export{y as CashConfirmSummary};
@@ -0,0 +1 @@
1
+ function e(e){return e.replace(/\D/g,``)}function t(t){let n=e(t);if(n.length===0)return`unknown`;if(n[0]===`4`)return`visa`;if(n.length>=2){let e=n.slice(0,2);if(e===`34`||e===`37`)return`amex`;let t=Number.parseInt(e,10);if(t>=51&&t<=55)return`mastercard`;if(e===`65`)return`discover`}if(n.length>=4){let e=Number.parseInt(n.slice(0,4),10);if(e>=2221&&e<=2720)return`mastercard`;if(n.slice(0,4)===`6011`)return`discover`}if(n.length>=3){let e=Number.parseInt(n.slice(0,3),10);if(e>=644&&e<=649)return`discover`}return`unknown`}function n(e){return e===`amex`?[15]:e===`visa`?[13,16,19]:e===`discover`?[16,19]:[16]}function r(e){return e===`amex`?4:3}function i(t,r){let i=Math.max(...n(r)),a=e(t).slice(0,i);if(r===`amex`)return[a.slice(0,4),a.slice(4,10),a.slice(10,15)].filter(e=>e.length>0).join(` `);let o=[];for(let e=0;e<a.length;e+=4)o.push(a.slice(e,e+4));return o.join(` `)}function a(t){let n=e(t).slice(0,4);return n.length<=2?n:`${n.slice(0,2)}/${n.slice(2)}`}function o(t,n){return e(t).slice(0,r(n))}function s(e){if(e===`amex`)return 17;let t=Math.max(...n(e));return t+Math.floor((t-1)/4)}function c(t){let n=e(t);if(n.length===0)return!1;let r=0,i=!1;for(let e=n.length-1;e>=0;e--){let t=Number.parseInt(n[e]??`0`,10);i&&(t*=2,t>9&&(t-=9)),r+=t,i=!i}return r%10==0}function l(t,r){let i=e(t);return n(r).includes(i.length)?c(i):!1}function u(t,n=new Date){let r=e(t);if(r.length!==4)return!1;let i=Number.parseInt(r.slice(0,2),10),a=2e3+Number.parseInt(r.slice(2,4),10);if(i<1||i>12)return!1;let o=n.getFullYear(),s=n.getMonth()+1;return!(a<o||a===o&&i<s)}function d(t,n){return e(t).length===r(n)}function f(t,r){let i=e(t);return i.length===0?null:n(r).includes(i.length)?c(i)?null:`invalid`:`incomplete`}function p(t,n=new Date){let r=e(t);if(r.length===0)return null;if(r.length<4)return`incomplete`;let i=Number.parseInt(r.slice(0,2),10);if(i<1||i>12)return`invalid`;let a=2e3+Number.parseInt(r.slice(2,4),10),o=n.getFullYear(),s=n.getMonth()+1;return a<o||a===o&&i<s?`expired`:null}function m(t,n){let i=e(t);return i.length===0?null:i.length<r(n)?`incomplete`:null}export{r as cvcLengthForBrand,t as detectBrand,o as formatCvc,a as formatExp,i as formatPan,m as getCvcError,p as getExpError,f as getPanError,d as isValidCvc,u as isValidExp,l as isValidPan,s as panMaxChars};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,use as t}from"react";const n=e(null);function r(e){let r=t(n);if(!r)throw Error(`${e} must be rendered inside <CashConfirm>.`);return r}export{n as CashConfirmContext,r as useCashConfirmContext};
@@ -0,0 +1,3 @@
1
+ import { CashConfirmBodyProps, CashConfirmDialogProps, CashConfirmHeaderProps, CashConfirmMethodBodyProps, CashConfirmProps, CashConfirmSummaryProps } from "./types.js";
2
+ import { CashConfirm } from "./CashConfirm.js";
3
+ import { CASH_CONFIRM_SLOTS, CashConfirmSlot } from "./CashConfirm.slots.js";
@@ -0,0 +1 @@
1
+ import"./CashConfirm.slots.js";import"./CashConfirm.js";
@@ -0,0 +1,66 @@
1
+ import { CashConfirmPhase, CashMethodId } from "../../../orchestrator/types.js";
2
+ import { DialogShellControls } from "../../../../../shared/dialog/DialogShell.js";
3
+ import { ComponentProps, ReactNode } from "react";
4
+
5
+ //#region src/flows/deposit/widgets/cash-confirm/compound/types.d.ts
6
+ /**
7
+ * Public props accepted by the {@link CashConfirm} compound root. Mirrors {@link ConfirmTransfer}
8
+ * in shape — required FSM-derived data on the root + optional callbacks the orchestrated wrapper
9
+ * supplies. Standalone compositions feed these directly.
10
+ */
11
+ interface CashConfirmProps extends ComponentProps<"div"> {
12
+ /** Per-method confirm phase. Drives the loading/ready surface inside the per-method bodies. */
13
+ phase: CashConfirmPhase;
14
+ /** Cash method picked on the previous step. */
15
+ cashMethod: CashMethodId;
16
+ /** USD amount the user is paying. */
17
+ amount: number;
18
+ /** Brand name for the summary card's "Top up on" row. */
19
+ brandName?: string;
20
+ /** Back-affordance handler. When omitted, the header renders without the back button. */
21
+ onBack?: () => void;
22
+ /**
23
+ * Optional custom composition. When omitted, the canonical default composition renders —
24
+ * `<Header />` + `<Body>` (which auto-renders `<Summary />` + the cashMethod-branched per-method
25
+ * body). Pass children to interleave your own elements between compound parts or replace the
26
+ * composition entirely.
27
+ */
28
+ children?: ReactNode;
29
+ }
30
+ /** Props for {@link CashConfirm.Header}. */
31
+ interface CashConfirmHeaderProps {
32
+ /** Override the default `Pay with <method>` title resolved from context. */
33
+ title?: ReactNode;
34
+ /**
35
+ * Override the context's `onBack`. Pass `null` explicitly to suppress the back affordance
36
+ * even when the context provides one.
37
+ */
38
+ onBack?: (() => void) | null;
39
+ }
40
+ /** Props for {@link CashConfirm.Body}. */
41
+ interface CashConfirmBodyProps extends ComponentProps<"div"> {
42
+ /**
43
+ * Optional custom composition. When omitted, Body auto-renders `<Summary />` plus the
44
+ * cashMethod-branched per-method body. Pass children to override either or both.
45
+ */
46
+ children?: ReactNode;
47
+ }
48
+ /** Props for {@link CashConfirm.Summary}. */
49
+ interface CashConfirmSummaryProps {
50
+ /** Override the context's `brandName` for the "Top up on" row value. */
51
+ brandName?: string;
52
+ }
53
+ /** Shared props for the per-method body parts. They read `phase` and `amount` from context. */
54
+ interface CashConfirmMethodBodyProps {
55
+ /** When `true`, the body's CTA is rendered disabled. Standalone consumers use this; the
56
+ * orchestrated wrapper leaves it unset because the FSM owns the readiness signal. */
57
+ disabled?: boolean;
58
+ }
59
+ /**
60
+ * Props for `<CashConfirm.Dialog>` — the dialog form of the CashConfirm widget. Combines the
61
+ * widget root props with the shared dialog shell controls (`open` / `defaultOpen` /
62
+ * `onOpenChange` / `trigger`).
63
+ */
64
+ type CashConfirmDialogProps = CashConfirmProps & DialogShellControls;
65
+ //#endregion
66
+ export { CashConfirmBodyProps, CashConfirmDialogProps, CashConfirmHeaderProps, CashConfirmMethodBodyProps, CashConfirmProps, CashConfirmSummaryProps };
@@ -0,0 +1 @@
1
+ import { CashConfirm } from "./CashConfirm.js";
@@ -0,0 +1 @@
1
+ import"./CashConfirm.js";
@@ -0,0 +1 @@
1
+ const e=1500,t=1500;export{e as LOADING_TRANSITION_MS,t as SUBMIT_SUCCESS_HOLD_MS};
@@ -1,8 +1,25 @@
1
1
  import { DialogShellControls } from "../../../../shared/dialog/DialogShell.js";
2
- import { ComponentProps } from "react";
2
+ import { ConfirmTransferBodyProps } from "../../../../shared/widgets/confirm-transfer/compound/types.js";
3
+ import { ConfirmTransferAmounts } from "../../../../shared/widgets/confirm-transfer/compound/components/Amounts.js";
4
+ import { ConfirmTransferBreakdown } from "../../../../shared/widgets/confirm-transfer/compound/components/Breakdown.js";
5
+ import { ConfirmTransferDisclaimer } from "../../../../shared/widgets/confirm-transfer/compound/components/Disclaimer.js";
6
+ import { ConfirmTransferFooter } from "../../../../shared/widgets/confirm-transfer/compound/components/Footer.js";
7
+ import { ConfirmTransferHeader } from "../../../../shared/widgets/confirm-transfer/compound/components/Header.js";
8
+ import { ConfirmTransferHero } from "../../../../shared/widgets/confirm-transfer/compound/components/Hero.js";
9
+ import { ConfirmTransferMeta } from "../../../../shared/widgets/confirm-transfer/compound/components/Meta.js";
10
+ import { ComponentProps, ReactNode } from "react";
3
11
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
12
 
5
13
  //#region src/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.d.ts
14
+ interface ConfirmDepositOwnProps {
15
+ /**
16
+ * Optional custom composition. When omitted, the canonical default composition renders —
17
+ * `<Header />` + `<Body>` containing `<Hero />` `<Meta />` `<Amounts />` `<Breakdown />`
18
+ * `<Disclaimer />` + `<Footer />`. Pass children to interleave your own elements between
19
+ * compound parts, drop parts you don't want, or replace the composition entirely.
20
+ */
21
+ children?: ReactNode;
22
+ }
6
23
  /**
7
24
  * Orchestrated `ConfirmDeposit` widget. Reads the driver's `quote` entity for the transfer
8
25
  * payload + breakdown + hero amount, the driver's `brand` entity for the title brand, the FSM's
@@ -14,7 +31,10 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
14
31
  * USD figure (`amount × asset.priceUsd`) so the user doesn't see `$0` flash before the
15
32
  * round-trip completes.
16
33
  */
17
- declare function ConfirmDeposit(props: ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element | null;
34
+ declare function ConfirmDeposit({
35
+ children,
36
+ ...props
37
+ }: ComponentProps<"div"> & ConfirmDepositOwnProps): _$react_jsx_runtime0.JSX.Element | null;
18
38
  declare function ConfirmDepositDialog({
19
39
  open,
20
40
  defaultOpen,
@@ -23,9 +43,22 @@ declare function ConfirmDepositDialog({
23
43
  ...rootProps
24
44
  }: ConfirmDeposit.DialogProps): _$react_jsx_runtime0.JSX.Element;
25
45
  declare namespace ConfirmDeposit {
26
- type Props = ComponentProps<"div">;
27
- type DialogProps = ComponentProps<"div"> & DialogShellControls;
46
+ type Props = ComponentProps<"div"> & ConfirmDepositOwnProps;
47
+ type DialogProps = ComponentProps<"div"> & DialogShellControls & ConfirmDepositOwnProps;
28
48
  const Dialog: typeof ConfirmDepositDialog;
49
+ /**
50
+ * Compound sub-parts exposed off the orchestrated widget so consumers can compose without
51
+ * importing the headless compound separately. Identity-equal to the parts on
52
+ * {@link ConfirmTransfer} from `@stridge/kit/deposit/compound`.
53
+ */
54
+ const Header: typeof ConfirmTransferHeader;
55
+ const Body: (props: ConfirmTransferBodyProps) => _$react_jsx_runtime0.JSX.Element;
56
+ const Hero: typeof ConfirmTransferHero;
57
+ const Meta: typeof ConfirmTransferMeta;
58
+ const Amounts: typeof ConfirmTransferAmounts;
59
+ const Breakdown: typeof ConfirmTransferBreakdown;
60
+ const Disclaimer: typeof ConfirmTransferDisclaimer;
61
+ const Footer: typeof ConfirmTransferFooter;
29
62
  }
30
63
  //#endregion
31
64
  export { ConfirmDeposit };
@@ -1 +1 @@
1
- "use client";import{useDepositSnapshot as e}from"../../driver/context.js";import{useKitI18n as t}from"../../../../shared/i18n/useKitI18n.js";import{useLingui as n}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositActions as r,useDepositEffectiveState as i,useDepositState as a}from"../../orchestrator/controller.js";import{formatDurationCoarse as o}from"../../../../shared/format/formatDurationCoarse.js";import{formatUsd as s}from"../../../../shared/format/formatUsd.js";import{DialogShell as c}from"../../../../shared/dialog/DialogShell.js";import{ConfirmTransfer as l}from"../../../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.js";import"../../../../shared/widgets/confirm-transfer/compound/index.js";import{useQuoteCountdown as u}from"../../../../shared/quote/useQuoteCountdown.js";import"../../../../shared/quote/index.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";function p(o){let c=e(),p=i(),g=a(),{confirmDeposit:v,back:y}=r(),{_:b}=n(),x=t(),S=c.quote,C=p.name===`confirmDeposit`?p.ctx.phase:void 0,w=c.target,T=c.wallet,E=g.name===`confirmDeposit`&&g.ctx.phase.kind===`ready`,D=u({expiresAt:C?.kind===`ready`?C.quoteExpiresAt:void 0,enabled:E});if(!C)return null;let O=C.kind===`loading`||C.kind===`regenerating`,k=h(c,w,T,x),A=_(c,{routeLabel:b({id:`rT8e1f`,message:`Route`}),networkCostLabel:b({id:`bZnukT`,message:`Network cost`}),priceImpactLabel:b({id:`kH6wUX`,message:`Price impact`}),maxSlippageLabel:b({id:`SZRUQ4`,message:`Max slippage`})}),j=`$0.00`;if(S.status===`ready`||S.status===`stale`)j=S.payload.heroAmountUsd.formatted;else if(g.name===`confirmDeposit`){let e=g.ctx.asset,t=g.ctx.amount,n=e?.priceUsd;j=s(typeof n==`number`&&Number.isFinite(n)&&n>0?t*n:t,x)}let M=S.status===`ready`||S.status===`stale`?S.payload.quoteTotalSeconds:30,N=D,P=m(C),F=C.kind===`failed`?C.failure:void 0,I=C.kind===`regenerating`?C.notice:void 0,L=w.status===`ready`||w.status===`stale`?w.payload:void 0,R=c.brand.status===`ready`||c.brand.status===`stale`?c.brand.payload:void 0,z=L&&R?.name?b({id:`zbtijb`,message:`Deposit {0} to {1}`,values:{0:L.symbol,1:R.name}}):void 0;return f(l,{...o,transfer:k,breakdown:A,heroAmountUsd:j,loading:O,phase:P,...I?{notice:I}:{},...F?{error:{message:F.reason,...F.code?{code:F.code}:{}}}:{},...N===void 0?{}:{quoteSeconds:N},quoteTotalSeconds:M,...z?{headerTitle:z}:{},onBack:y,onConfirm:v,children:[d(l.Header,{}),f(l.Body,{children:[d(l.Hero,{}),d(l.Meta,{}),d(l.Amounts,{}),d(l.Breakdown,{}),d(l.Disclaimer,{})]}),d(l.Footer,{})]})}function m(e){switch(e.kind){case`loading`:return`loading`;case`ready`:return`ready`;case`regenerating`:return`regenerating`;case`submitting`:return`submitting`;case`failed`:return`error`}}function h(e,t,n,r){let i=e.quote,a=i.status===`ready`||i.status===`stale`?i.payload:void 0,s=t.status===`ready`||t.status===`stale`?t.payload:void 0,c=n.status===`ready`||n.status===`stale`?n.payload:void 0,l=e.brand.status===`ready`||e.brand.status===`stale`?e.brand.payload:void 0,u=a?.sendAsset,d=a?.receiveAsset??s,f=l?.name?`${l.name} Account`:`Account`,p=a?.etaSeconds===void 0?`—`:o(a.etaSeconds*1e3,r);return{sourceLabel:c?`Wallet (${c.address.formatted})`:`Wallet`,destinationLabel:f,eta:p,sendAmount:a?a.sendAmount.formatted:`0`,sendToken:u?g(u):{symbol:`—`},receiveAmount:a?a.receiveAmount.formatted:`0`,receiveToken:d?g(d):{symbol:s?.symbol??`—`}}}function g(e){return{symbol:e.symbol,...e.chainId===void 0?{}:{chainId:e.chainId},...e.address?{address:e.address}:{},...e.isNative===void 0?{}:{isNative:e.isNative},...e.assetLogoUrl?{logoUrl:e.assetLogoUrl}:{}}}function _(e,t){let n=e.quote,r=n.status===`ready`||n.status===`stale`?n.payload:void 0;if(!r?.breakdown)return{};let i=r.breakdown,a={};return i.selectedRoute&&(a.selectedRoute={label:t.routeLabel,value:i.selectedRoute.label}),i.networkCost&&(a.networkCost={label:t.networkCostLabel,valueUsd:i.networkCost.formatted}),i.priceImpact&&(a.priceImpact={label:t.priceImpactLabel,valuePercent:i.priceImpact.formatted}),i.maxSlippage&&(a.maxSlippage={label:t.maxSlippageLabel,valuePercent:i.maxSlippage.value.formatted,auto:i.maxSlippage.auto}),a}function v({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return d(c,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:d(p,{...i})})}(function(e){e.Dialog=v})(p||={});export{p as ConfirmDeposit};
1
+ "use client";import{useKitI18n as e}from"../../../../shared/i18n/useKitI18n.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositSnapshot as n}from"../../driver/context.js";import{useDepositActions as r,useDepositEffectiveState as i,useDepositState as a}from"../../orchestrator/controller.js";import{formatDurationCoarse as o}from"../../../../shared/format/formatDurationCoarse.js";import{formatUsd as s}from"../../../../shared/format/formatUsd.js";import{useKitEmitter as c}from"../../../../events/emit/useKitEmitter.js";import"../../../../events/emit/index.js";import{DialogShell as l}from"../../../../shared/dialog/DialogShell.js";import{ConfirmTransfer as u}from"../../../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.js";import"../../../../shared/widgets/confirm-transfer/compound/index.js";import{useQuoteCountdown as d}from"../../../../shared/quote/useQuoteCountdown.js";import"../../../../shared/quote/index.js";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";const h=m(f,{children:[p(u.Header,{}),m(u.Body,{children:[p(u.Hero,{}),p(u.Meta,{}),p(u.Amounts,{}),p(u.Breakdown,{}),p(u.Disclaimer,{})]}),p(u.Footer,{})]});function g({children:o,...l}){let f=n(),m=i(),g=a(),{confirmDeposit:y,back:x}=r(),{_:S}=t(),C=e(),w=c(),T=()=>{w({type:`deposit.confirm.clicked`,flow:`deposit`,tier:`ui`,payload:{}}),y()},E=f.quote,D=m.name===`confirmDeposit`?m.ctx.phase:void 0,O=f.target,k=f.wallet,A=g.name===`confirmDeposit`&&g.ctx.phase.kind===`ready`,j=d({expiresAt:D?.kind===`ready`?D.quoteExpiresAt:void 0,enabled:A});if(!D)return null;let M=D.kind===`loading`||D.kind===`regenerating`,N=v(f,O,k,C),P=b(f,{routeLabel:S({id:`rT8e1f`,message:`Route`}),networkCostLabel:S({id:`bZnukT`,message:`Network cost`}),priceImpactLabel:S({id:`kH6wUX`,message:`Price impact`}),maxSlippageLabel:S({id:`SZRUQ4`,message:`Max slippage`})}),F=`$0.00`;if(E.status===`ready`||E.status===`stale`)F=E.payload.heroAmountUsd.formatted;else if(g.name===`confirmDeposit`){let e=g.ctx.asset,t=g.ctx.amount,n=e?.priceUsd;F=s(typeof n==`number`&&Number.isFinite(n)&&n>0?t*n:t,C)}let I=E.status===`ready`||E.status===`stale`?E.payload.quoteTotalSeconds:30,L=j,R=_(D),z=D.kind===`failed`?D.failure:void 0,B=D.kind===`regenerating`?D.notice:void 0,V=O.status===`ready`||O.status===`stale`?O.payload:void 0,H=f.brand.status===`ready`||f.brand.status===`stale`?f.brand.payload:void 0,U=V&&H?.name?S({id:`zbtijb`,message:`Deposit {0} to {1}`,values:{0:V.symbol,1:H.name}}):void 0;return p(u,{...l,transfer:N,breakdown:P,heroAmountUsd:F,loading:M,phase:R,...B?{notice:B}:{},...z?{error:{message:z.reason,...z.code?{code:z.code}:{}}}:{},...L===void 0?{}:{quoteSeconds:L},quoteTotalSeconds:I,...U?{headerTitle:U}:{},onBack:x,onConfirm:T,children:o??h})}function _(e){switch(e.kind){case`loading`:return`loading`;case`ready`:return`ready`;case`regenerating`:return`regenerating`;case`submitting`:return`submitting`;case`failed`:return`error`}}function v(e,t,n,r){let i=e.quote,a=i.status===`ready`||i.status===`stale`?i.payload:void 0,s=t.status===`ready`||t.status===`stale`?t.payload:void 0,c=n.status===`ready`||n.status===`stale`?n.payload:void 0,l=e.brand.status===`ready`||e.brand.status===`stale`?e.brand.payload:void 0,u=a?.sendAsset,d=a?.receiveAsset??s,f=l?.name?`${l.name} Account`:`Account`,p=a?.etaSeconds===void 0?`—`:o(a.etaSeconds*1e3,r);return{sourceLabel:c?`Wallet (${c.address.formatted})`:`Wallet`,destinationLabel:f,eta:p,sendAmount:a?a.sendAmount.formatted:`0`,sendToken:u?y(u):{symbol:`—`},receiveAmount:a?a.receiveAmount.formatted:`0`,receiveToken:d?y(d):{symbol:s?.symbol??`—`}}}function y(e){return{symbol:e.symbol,...e.chainId===void 0?{}:{chainId:e.chainId},...e.address?{address:e.address}:{},...e.isNative===void 0?{}:{isNative:e.isNative},...e.assetLogoUrl?{logoUrl:e.assetLogoUrl}:{}}}function b(e,t){let n=e.quote,r=n.status===`ready`||n.status===`stale`?n.payload:void 0;if(!r?.breakdown)return{};let i=r.breakdown,a={};return i.selectedRoute&&(a.selectedRoute={label:t.routeLabel,value:i.selectedRoute.label}),i.networkCost&&(a.networkCost={label:t.networkCostLabel,valueUsd:i.networkCost.formatted}),i.priceImpact&&(a.priceImpact={label:t.priceImpactLabel,valuePercent:i.priceImpact.formatted}),i.maxSlippage&&(a.maxSlippage={label:t.maxSlippageLabel,valuePercent:i.maxSlippage.value.formatted,auto:i.maxSlippage.auto}),a}function x({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return p(l,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:p(g,{...i})})}(function(e){e.Dialog=x,e.Header=u.Header,e.Body=u.Body,e.Hero=u.Hero,e.Meta=u.Meta,e.Amounts=u.Amounts,e.Breakdown=u.Breakdown,e.Disclaimer=u.Disclaimer,e.Footer=u.Footer})(g||={});export{g as ConfirmDeposit};
@@ -1,5 +1,14 @@
1
1
  import { DialogShellControls } from "../../../../shared/dialog/DialogShell.js";
2
- import { ComponentProps } from "react";
2
+ import { DepositBodyProps } from "./compound/types.js";
3
+ import { DepositHeader } from "./compound/components/Header.js";
4
+ import { DepositMethod } from "./compound/components/Method.js";
5
+ import { DepositMethodSection } from "./compound/components/MethodSection.js";
6
+ import { DepositMethods } from "./compound/components/Methods.js";
7
+ import { DepositRail } from "./compound/components/Rail.js";
8
+ import { DepositRailPicker } from "./compound/components/RailPicker.js";
9
+ import { DepositSteps } from "./compound/components/Steps.js";
10
+ import { Deposit as Deposit$1 } from "./compound/Deposit.js";
11
+ import { ComponentProps, ReactNode } from "react";
3
12
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
13
 
5
14
  //#region src/flows/deposit/widgets/deposit/Deposit.d.ts
@@ -13,7 +22,19 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
13
22
  * bar while `wallet.balanceTotalUsd` resolves, and the Transfer Crypto tile's chain stack is
14
23
  * driven by whatever rows the driver has surfaced so far.
15
24
  */
16
- declare function Deposit(props: ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element | null;
25
+ interface DepositOwnProps {
26
+ /**
27
+ * Optional custom composition. When omitted, the canonical default composition renders —
28
+ * `<Header />` + `<Body>` containing `<Methods />`. Pass children to interleave your own
29
+ * elements between compound parts, drop parts you don't want, or replace the composition
30
+ * entirely.
31
+ */
32
+ children?: ReactNode;
33
+ }
34
+ declare function Deposit({
35
+ children,
36
+ ...props
37
+ }: ComponentProps<"div"> & DepositOwnProps): _$react_jsx_runtime0.JSX.Element | null;
17
38
  declare function DepositDialog({
18
39
  open,
19
40
  defaultOpen,
@@ -22,9 +43,23 @@ declare function DepositDialog({
22
43
  ...rootProps
23
44
  }: Deposit.DialogProps): _$react_jsx_runtime0.JSX.Element;
24
45
  declare namespace Deposit {
25
- type Props = ComponentProps<"div">;
26
- type DialogProps = ComponentProps<"div"> & DialogShellControls;
46
+ type Props = ComponentProps<"div"> & DepositOwnProps;
47
+ type DialogProps = ComponentProps<"div"> & DialogShellControls & DepositOwnProps;
27
48
  const Dialog: typeof DepositDialog;
49
+ /**
50
+ * Compound sub-parts aliased on the orchestrated widget so consumers can compose without
51
+ * importing the headless compound separately. Identity-equal to the parts on the compound
52
+ * exported from `@stridge/kit/deposit/compound`.
53
+ */
54
+ const Header: typeof DepositHeader;
55
+ const Body: (props: DepositBodyProps) => _$react_jsx_runtime0.JSX.Element;
56
+ const Methods: typeof DepositMethods;
57
+ const Method: typeof DepositMethod;
58
+ const MethodSection: typeof DepositMethodSection;
59
+ const Steps: typeof DepositSteps;
60
+ const Step: typeof Deposit$1.Step;
61
+ const RailPicker: typeof DepositRailPicker;
62
+ const Rail: typeof DepositRail;
28
63
  }
29
64
  //#endregion
30
65
  export { Deposit };
@@ -1 +1 @@
1
- "use client";import{useDepositSnapshot as e}from"../../driver/context.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositActions as n,useDepositEffectiveState as r}from"../../orchestrator/controller.js";import{QrCodeIcon as i}from"../../../../shared/icons/QrCodeIcon.js";import{WalletIcon as a}from"../../../../shared/icons/WalletIcon.js";import"../../../../icons/index.js";import{DialogShell as o}from"../../../../shared/dialog/DialogShell.js";import{Image as s}from"../../../../shared/ui/Image/Image.js";import{Skeleton as c}from"../../../../shared/ui/Skeleton/Skeleton.js";import"../../../../shared/ui/Skeleton/index.js";import{TokenLogo as l}from"../../../../shared/ui/TokenLogo/TokenLogo.js";import"../../../../shared/ui/TokenLogo/index.js";import"../../../../ui/index.js";import{Deposit as u}from"./compound/Deposit.js";import"./compound/index.js";import{useMemo as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";const m={width:18,height:18,"aria-hidden":!0};function h(o){let s=e(),l=r().name,{selectMethod:h}=n(),{_}=t(),v=s.wallet,y=v.status===`ready`||v.status===`stale`?v.payload:void 0,b=s.brand,x=b.status===`ready`||b.status===`stale`?b.payload:void 0,S=s.addresses,C=S.status===`ready`||S.status===`stale`?S.payload:[],w=s.balances.status===`error`,T=!!s.brand,E=x?.name?_({id:`ogD_nm`,message:`Deposit to {0}`,values:{0:x.name}}):void 0,D=d(()=>g(C),[C]),O=d(()=>{let e=[{id:`wallet`,title:_({id:`sb9Y58`,message:`Wallet`}),icon:f(a,{...m}),...y?{titleAdornment:y.address.formatted}:{},meta:y?.balanceTotalUsd?.formatted?y.balanceTotalUsd.formatted:w?void 0:f(c,{width:56,height:12}),recommended:!0,onSelect:()=>h(`wallet`)}];return T&&e.push({id:`transfer`,title:_({id:`3dqPLT`,message:`Transfer Crypto`}),icon:f(i,{...m}),meta:[_({id:`qtoOYG`,message:`No limit`}),_({id:`D79cZK`,message:`Instant`})],...D?{trailing:D}:{},onSelect:()=>h(`transfer`)}),e},[y,w,T,D,h,_]);return l===`deposit`?p(u,{...o,...E?{title:E}:{},methods:O,children:[f(u.Header,{}),f(u.Body,{children:f(u.Methods,{})})]}):null}function g(e){if(e.length!==0)return f(s.Group,{max:4,overflow:Math.max(0,e.length-4),size:`md`,children:e.map(e=>f(l,{isNative:!0,symbol:e.networkName,...e.eip155Id?{chainId:Number(e.eip155Id)}:{},...e.chainLogoUrl?{logoUrl:e.chainLogoUrl}:{},hideChainBadge:!0},e.eip155Id??e.networkName))})}function _({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return f(o,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:f(h,{...i})})}(function(e){e.Dialog=_})(h||={});export{h as Deposit};
1
+ "use client";import{useOptionalKitStorage as e}from"../../../../storage/context.js";import"../../../../storage/index.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositSnapshot as n}from"../../driver/context.js";import{useCashRailUnlocked as r,useDepositActions as i,useDepositEffectiveState as a,useDepositMethodsConfig as o,useEnabledRails as s}from"../../orchestrator/controller.js";import{ApplePayIcon as c}from"../../../../shared/icons/ApplePayIcon.js";import{BitcoinIcon as l}from"../../../../shared/icons/BitcoinIcon.js";import{CardIcon as ee}from"../../../../shared/icons/CardIcon.js";import{CashIcon as u}from"../../../../shared/icons/CashIcon.js";import{GooglePayIcon as d}from"../../../../shared/icons/GooglePayIcon.js";import{QrCodeIcon as te}from"../../../../shared/icons/QrCodeIcon.js";import{WalletIcon as ne}from"../../../../shared/icons/WalletIcon.js";import"../../../../icons/index.js";import{DialogShell as f}from"../../../../shared/dialog/DialogShell.js";import{Image as p}from"../../../../shared/ui/Image/Image.js";import{Skeleton as re}from"../../../../shared/ui/Skeleton/Skeleton.js";import"../../../../shared/ui/Skeleton/index.js";import{TokenLogo as m}from"../../../../shared/ui/TokenLogo/TokenLogo.js";import"../../../../shared/ui/TokenLogo/index.js";import"../../../../ui/index.js";import{Deposit as h}from"./compound/Deposit.js";import"./compound/index.js";import{useMemo as g}from"react";import{Fragment as ie,jsx as _,jsxs as v}from"react/jsx-runtime";const y={width:18,height:18,"aria-hidden":!0},ae={card:`card`,"apple-pay":`applePay`,"google-pay":`googlePay`},b=`deposit.last-rail`;function x({children:f,...p}){let m=n(),x=a().name,{selectMethod:S,selectCashMethod:C}=i(),w=o(),T=r(),E=e(),{_:D}=t(),O=m.wallet,k=O.status===`ready`||O.status===`stale`?O.payload:void 0,A=k!==void 0,j=m.brand,M=j.status===`ready`||j.status===`stale`?j.payload:void 0,N=m.addresses,P=N.status===`ready`||N.status===`stale`?N.payload:[],F=m.balances.status===`error`,I=!k?.balanceTotalUsd?.formatted&&!F,L=!!m.brand,R=M?.name?D({id:`ogD_nm`,message:`Deposit to {0}`,values:{0:M.name}}):void 0,z=g(()=>oe(P),[P]),B=w?.wallet,V=w?.transfer,H=w?.card,U=w?.applePay,W=w?.googlePay,G=w?.cashRail?.enabled===!0,K=m.cashMethods,q=K?.status,J=q===`ready`||q===`stale`?K?.payload:void 0,Y=T&&G&&J!==void 0,se=g(()=>{let e=!A||I,t=B?.disabled??!1,n=e||t,r=t?B?.disabledHint:void 0,i=(()=>{if(t)return r;if(!A)return D({id:`5AApJw`,message:`Connect a wallet to continue`});if(k?.balanceTotalUsd?.formatted)return k.balanceTotalUsd.formatted;if(!F)return _(re,{width:56,height:12})})(),a=[{id:`wallet`,title:D({id:`sb9Y58`,message:`Wallet`}),icon:_(ne,{...y}),...k&&!t?{titleAdornment:k.address.formatted}:{},...i===void 0?{}:{meta:i},recommended:!0,disabled:n,onSelect:n?void 0:()=>S(`wallet`)}];if(L){let e=V?.disabled??!1,t=e?V?.disabledHint:void 0,n=e?t:[D({id:`qtoOYG`,message:`No limit`}),D({id:`D79cZK`,message:`Instant`})];a.push({id:`transfer`,title:D({id:`3dqPLT`,message:`Transfer Crypto`}),icon:_(te,{...y}),...n===void 0?{}:{meta:n},...z?{trailing:z}:{},disabled:e,onSelect:e?void 0:()=>S(`transfer`)})}return a},[k,F,I,A,L,z,B,V,S,D]),X=g(()=>{let e=(e,n)=>{if(e!==void 0)return e;if(!n)return;let r=[];n.limit?.formatted&&r.push(D({id:`jtKSW-`,message:`{0} limit`,values:{0:n.limit.formatted}}));let i=t(n.processingTime);return i&&r.push(i),r.length>0?r:void 0},t=e=>{if(e)return e.value===0?D({id:`D79cZK`,message:`Instant`}):e.formatted||void 0},n=(t,n,r,i,a)=>{let o=i?.disabled??!1,s=e(o?i?.disabledHint:void 0,a);return{id:t,title:n,icon:r,...s===void 0?{}:{meta:s},metaEmphasis:`uniform`,disabled:o,onSelect:o?void 0:()=>C(ae[t])}};return{card:n(`card`,D({id:`kryGs-`,message:`Card`}),_(ee,{...y}),H,J?.card),applePay:n(`apple-pay`,D({id:`6ws9A3`,message:`Apple Pay`}),_(c,{...y}),U,J?.applePay),googlePay:n(`google-pay`,D({id:`ybKOj4`,message:`Google Pay`}),_(d,{...y}),W,J?.googlePay)}},[H,U,W,J,C,D]),Z=s(g(()=>{let e=[{value:`crypto`,label:D({id:`CS69m9`,message:`Use Crypto`}),icon:_(l,{width:12,height:12,"aria-hidden":!0})}];return Y&&e.push({value:`cash`,label:D({id:`LSs4cd`,message:`Use Cash`}),icon:_(u,{width:12,height:12,"aria-hidden":!0})}),e},[D,Y]));if(x!==`deposit`)return null;let Q={crypto:_(h.Methods,{}),cash:v(h.Methods,{children:[_(h.MethodSection,{label:D({id:`y1ypMV`,message:`Most popular`}),children:_(h.Method,{...X.card})}),v(h.MethodSection,{label:D({id:`xOUCt3`,message:`Other options`}),children:[_(h.Method,{...X.applePay}),_(h.Method,{...X.googlePay})]})]})},[$]=Z,ce=E?.get(b)??null,le=Z.find(e=>e.value===ce)?.value??$?.value,ue=v(ie,{children:[_(h.Header,{}),_(h.Body,{children:Z.length>=2?_(h.RailPicker,{defaultValue:le,rails:Z,onValueChange:e=>E?.set(b,e),children:Z.map(e=>_(h.Rail,{value:e.value,children:Q[e.value]},e.value))}):Q[$?.value??`crypto`]})]});return _(h,{...p,...R?{title:R}:{},methods:se,children:f??ue})}function oe(e){if(e.length!==0)return _(p.Group,{max:4,overflow:Math.max(0,e.length-4),size:`md`,children:e.map(e=>_(m,{isNative:!0,symbol:e.networkName,...e.eip155Id?{chainId:Number(e.eip155Id)}:{},...e.chainLogoUrl?{logoUrl:e.chainLogoUrl}:{},hideChainBadge:!0},e.eip155Id??e.networkName))})}function S({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return _(f,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:_(x,{...i})})}(function(e){e.Dialog=S,e.Header=h.Header,e.Body=h.Body,e.Methods=h.Methods,e.Method=h.Method,e.MethodSection=h.MethodSection,e.Steps=h.Steps,e.Step=h.Step,e.RailPicker=h.RailPicker,e.Rail=h.Rail})(x||={});export{x as Deposit};
@@ -1,10 +1,23 @@
1
- import { DepositBodyProps, DepositDialogProps, DepositHeaderProps, DepositMethodProps, DepositMethodsProps, DepositProps } from "./types.js";
1
+ import { DepositStateName } from "../../../orchestrator/types.js";
2
+ import { DepositBoundary, Props } from "./components/Boundary.js";
3
+ import { DepositGuards, Props as Props$1 } from "./components/Guards.js";
4
+ import { DepositBodyProps, DepositDialogProps, DepositHeaderProps, DepositMethodProps, DepositMethodSectionProps, DepositMethodsProps, DepositProps, DepositRailPickerProps, DepositRailProps } from "./types.js";
2
5
  import { DepositHeader } from "./components/Header.js";
3
6
  import { DepositMethod } from "./components/Method.js";
7
+ import { DepositMethodSection } from "./components/MethodSection.js";
4
8
  import { DepositMethods } from "./components/Methods.js";
9
+ import { DepositRail } from "./components/Rail.js";
10
+ import { DepositRailPicker } from "./components/RailPicker.js";
11
+ import { DepositSteps, DepositStepsProps } from "./components/Steps.js";
12
+ import { ReactNode } from "react";
5
13
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
14
 
7
15
  //#region src/flows/deposit/widgets/deposit/compound/Deposit.d.ts
16
+ interface DepositStepProps {
17
+ /** Matches against the deposit FSM's effective state name. */
18
+ name: DepositStateName;
19
+ children: ReactNode;
20
+ }
8
21
  /**
9
22
  * Root of the Deposit compound. Renders the modal-frame card surface
10
23
  * and provides shared state to every compound part rendered inside it.
@@ -18,6 +31,8 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
18
31
  * - {@link Deposit.Body}
19
32
  * - {@link Deposit.Methods}
20
33
  * - {@link Deposit.Method}
34
+ * - {@link Deposit.Steps}
35
+ * - {@link Deposit.Step}
21
36
  *
22
37
  * Dialog form: {@link Deposit.Dialog} pre-composes the widget into a
23
38
  * `Dialog.Root + Dialog.Trigger + Dialog.Content` shell — the
@@ -40,12 +55,54 @@ declare namespace Deposit {
40
55
  type BodyProps = DepositBodyProps;
41
56
  type MethodsProps = DepositMethodsProps;
42
57
  type MethodProps = DepositMethodProps;
58
+ type MethodSectionProps = DepositMethodSectionProps;
43
59
  type DialogProps = DepositDialogProps;
60
+ type StepsProps = DepositStepsProps;
61
+ type StepProps = DepositStepProps;
62
+ type GuardsProps = Props$1;
63
+ type BoundaryProps = Props;
64
+ type RailPickerProps = DepositRailPickerProps;
65
+ type RailProps = DepositRailProps;
44
66
  const Header: typeof DepositHeader;
45
67
  const Body: typeof DepositBody;
46
68
  const Methods: typeof DepositMethods;
47
69
  const Method: typeof DepositMethod;
70
+ /**
71
+ * Labelled cluster of methods within a single rail (Paper artboard
72
+ * `1IIA-0` partitions the cash picker into "Most popular" and
73
+ * "Other options"). Detected by `Deposit.Methods` via element identity;
74
+ * when present the parent skips its own label + tile-group and each
75
+ * section owns its label and roving-focus group.
76
+ */
77
+ const MethodSection: typeof DepositMethodSection;
48
78
  const Dialog: typeof DepositDialog;
79
+ const Steps: typeof DepositSteps;
80
+ /**
81
+ * Slot consumed by {@link Deposit.Steps}. `name` is the FSM state to match; the
82
+ * matched step's `children` are rendered, every other branch is dropped.
83
+ */
84
+ const Step: (props: DepositStepProps) => null;
85
+ /**
86
+ * Bootstrap-cascade guard. Wraps step content with three gates (wallet-required,
87
+ * bootstrap-fatal, bootstrap-loading); renders the matching gate panel or children.
88
+ */
89
+ const Guards: typeof DepositGuards;
90
+ /**
91
+ * Error-boundary part. Wires the kit's `GatewayKitBoundary` with deposit-flow recovery —
92
+ * `onReset` calls `useDeposit().close()` internally; `onError` is host-supplied.
93
+ */
94
+ const Boundary: typeof DepositBoundary;
95
+ /**
96
+ * Segmented payment-rail switcher above the methods list. One panel per rail
97
+ * via {@link Deposit.Rail}. Uncontrolled by default; controllable via
98
+ * `value` + `onValueChange`.
99
+ */
100
+ const RailPicker: typeof DepositRailPicker;
101
+ /**
102
+ * One panel inside {@link Deposit.RailPicker}. `value` matches a descriptor
103
+ * passed to the picker's `rails` prop.
104
+ */
105
+ const Rail: typeof DepositRail;
49
106
  }
50
107
  //#endregion
51
108
  export { Deposit };
@@ -1 +1 @@
1
- "use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{Card as t}from"../../../../../shared/ui/Card/Card.js";import{Tooltip as n}from"../../../../../shared/ui/Tooltip/Tooltip.js";import"../../../../../shared/ui/Tooltip/index.js";import"../../../../../ui/index.js";import{Frame as r}from"../../../../../shared/dialog/Frame.js";import{DepositContext as i}from"./context.js";import{DEPOSIT_SLOTS as a}from"./Deposit.slots.js";import{styles as o}from"./Deposit.styles.js";import{DepositHeader as s}from"./components/Header.js";import{DepositMethod as c}from"./components/Method.js";import{DepositMethods as l}from"./components/Methods.js";import{useMemo as u}from"react";import{jsx as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";const p=[];function m(e){let{title:t,methodsLabel:s,methods:c=p,children:l}=e,m=u(()=>({title:t,methodsLabel:s,methods:c}),[t,s,c]);return d(i.Provider,{value:m,children:d(n.Provider,{children:d(r,{"data-stridge-slot":a.root,...f.props(o.root),children:l})})})}function h(e){return d(t.Body,{"data-stridge-slot":a.body,...e})}function g({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return d(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:d(m,{...o,children:a})})}(function(e){e.Header=s,e.Body=h,e.Methods=l,e.Method=c,e.Dialog=g})(m||={});export{m as Deposit};
1
+ "use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{Card as t}from"../../../../../shared/ui/Card/Card.js";import{Step as n}from"../../../../../shared/ui/Steps/Steps.js";import"../../../../../shared/ui/Steps/index.js";import{Tooltip as r}from"../../../../../shared/ui/Tooltip/Tooltip.js";import"../../../../../shared/ui/Tooltip/index.js";import"../../../../../ui/index.js";import{Frame as i}from"../../../../../shared/dialog/Frame.js";import{DepositBoundary as a}from"./components/Boundary.js";import{DepositGuards as o}from"./components/Guards.js";import{DepositContext as s}from"./context.js";import{DEPOSIT_SLOTS as c}from"./Deposit.slots.js";import{styles as l}from"./Deposit.styles.js";import{DepositHeader as u}from"./components/Header.js";import{DepositMethod as d}from"./components/Method.js";import{DepositMethodSection as f}from"./components/MethodSection.js";import{DepositMethods as p}from"./components/Methods.js";import{DepositRail as m}from"./components/Rail.js";import{DepositRailPicker as h}from"./components/RailPicker.js";import{DepositSteps as g}from"./components/Steps.js";import{useMemo as _}from"react";import{jsx as v}from"react/jsx-runtime";import*as y from"@stylexjs/stylex";const b=[];function x(e){let{title:t,methodsLabel:n,methods:a=b,children:o}=e,u=_(()=>({title:t,methodsLabel:n,methods:a}),[t,n,a]);return v(s.Provider,{value:u,children:v(r.Provider,{children:v(i,{"data-stridge-slot":c.root,...y.props(l.root),children:o})})})}function S(e){return v(t.Body,{"data-stridge-slot":c.body,...e})}function C({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return v(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:v(x,{...o,children:a})})}(function(e){e.Header=u,e.Body=S,e.Methods=p,e.Method=d,e.MethodSection=f,e.Dialog=C,e.Steps=g,e.Step=n,e.Guards=o,e.Boundary=a,e.RailPicker=h,e.Rail=m})(x||={});export{x as Deposit};
@@ -5,6 +5,12 @@ declare const DEPOSIT_SLOTS: {
5
5
  readonly body: "deposit-body";
6
6
  readonly methods: "deposit-methods";
7
7
  readonly method: "deposit-method";
8
+ readonly methodSection: "deposit-method-section";
9
+ readonly methodSectionLabel: "deposit-method-section-label";
10
+ readonly railPicker: "deposit-rail-picker";
11
+ readonly railList: "deposit-rail-list";
12
+ readonly railTab: "deposit-rail-tab";
13
+ readonly rail: "deposit-rail";
8
14
  };
9
15
  type DepositSlot = (typeof DEPOSIT_SLOTS)[keyof typeof DEPOSIT_SLOTS];
10
16
  //#endregion
@@ -1 +1 @@
1
- const e={root:`deposit`,header:`deposit-header`,body:`deposit-body`,methods:`deposit-methods`,method:`deposit-method`};export{e as DEPOSIT_SLOTS};
1
+ const e={root:`deposit`,header:`deposit-header`,body:`deposit-body`,methods:`deposit-methods`,method:`deposit-method`,methodSection:`deposit-method-section`,methodSectionLabel:`deposit-method-section-label`,railPicker:`deposit-rail-picker`,railList:`deposit-rail-list`,railTab:`deposit-rail-tab`,rail:`deposit-rail`};export{e as DEPOSIT_SLOTS};
@@ -1 +1 @@
1
- const e={root:{"Deposit__styles.root":`Deposit__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:17`},header:{"Deposit__styles.header":`Deposit__styles.header`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:25`},closeIcon:{"Deposit__styles.closeIcon":`Deposit__styles.closeIcon`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:28`},section:{"Deposit__styles.section":`Deposit__styles.section`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x883omv`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:33`},sectionMethods:{"Deposit__styles.sectionMethods":`Deposit__styles.sectionMethods`,"paddingTop-kLKAdn":`x1cnzs8`,"paddingBottom-kGO01o":`x1t4gjm`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:40`},methodsList:{"Deposit__styles.methodsList":`Deposit__styles.methodsList`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x167g77z`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:45`},methodRow:{"Deposit__styles.methodRow":`Deposit__styles.methodRow`,"gap-kOIVth":`x1af02g3`,"paddingInlineStart-kZCmMZ":`xwn43p0`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:56`},methodIconSlot:{"Deposit__styles.methodIconSlot":`Deposit__styles.methodIconSlot`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"width-kzqmXN":`x14qfxbe`,"height-kZKoxP":`xc9qbxq`,"flexShrink-kmuXW":`x2lah0s`,"borderRadius-kaIpWk":`xi9trdq`,"backgroundColor-kWkggS":`xp5aqsh`,"borderWidth-kMzoRj":`xmkeg23`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x1bue7yx`,"color-kMwMTN":`xzn0pkc`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:60`},methodText:{"Deposit__styles.methodText":`Deposit__styles.methodText`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"gap-kOIVth":`x1ed6fcf`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:74`},methodTitleRow:{"Deposit__styles.methodTitleRow":`Deposit__styles.methodTitleRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x167g77z`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:83`},methodMeta:{"Deposit__styles.methodMeta":`Deposit__styles.methodMeta`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:89`},methodMetaItem:{"Deposit__styles.methodMetaItem":`Deposit__styles.methodMetaItem`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"whiteSpace-khDVqt":`xuxw1ft`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:95`},methodTrailing:{"Deposit__styles.methodTrailing":`Deposit__styles.methodTrailing`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:100`},methodChevron:{"Deposit__styles.methodChevron":`Deposit__styles.methodChevron`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:105`},methodRecommendedBar:{"Deposit__styles.methodRecommendedBar":`Deposit__styles.methodRecommendedBar`,"position-kVAEAm":`x10l6tqk`,"top-k87sOh":`xuivejd`,"bottom-krVfgx":`xmbx2d0`,"insetInlineStart-kLqNvP":`x1o0tod`,"width-kzqmXN":`xfo62xy`,"borderStartEndRadius-kfmiAY":`x1e4oeot`,"borderEndEndRadius-kT0f0o":`x1ui04y5`,"backgroundColor-kWkggS":`xdmxa9o`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:112`}};export{e as styles};
1
+ const e={root:{"Deposit__styles.root":`Deposit__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:17`},header:{"Deposit__styles.header":`Deposit__styles.header`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:25`},headerTrailing:{"Deposit__styles.headerTrailing":`Deposit__styles.headerTrailing`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:30`},closeIcon:{"Deposit__styles.closeIcon":`Deposit__styles.closeIcon`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:35`},section:{"Deposit__styles.section":`Deposit__styles.section`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x883omv`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:40`},sectionMethods:{"Deposit__styles.sectionMethods":`Deposit__styles.sectionMethods`,"paddingTop-kLKAdn":`x1cnzs8`,"paddingBottom-kGO01o":`x1t4gjm`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:47`},methodsList:{"Deposit__styles.methodsList":`Deposit__styles.methodsList`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x167g77z`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:52`},methodSection:{"Deposit__styles.methodSection":`Deposit__styles.methodSection`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x2blr79`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:65`},sectionMethodsGrouped:{"Deposit__styles.sectionMethodsGrouped":`Deposit__styles.sectionMethodsGrouped`,"gap-kOIVth":`xsfdumc`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:76`},railPicker:{"Deposit__styles.railPicker":`Deposit__styles.railPicker`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`xxhr3t`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:86`},railList:{"Deposit__styles.railList":`Deposit__styles.railList`,"display-k1xSpc":`x78zum5`,"marginInlineEnd-k71WvV":`xnqxrjt`,"marginInlineStart-keTefX":`xnzr9dm`,"marginTop-keoZOQ":`xw7yly9`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:91`},railListInner:{"Deposit__styles.railListInner":`Deposit__styles.railListInner`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:97`},railTabBadge:{"Deposit__styles.railTabBadge":`Deposit__styles.railTabBadge`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"width-kzqmXN":`x17z2i9w`,"height-kZKoxP":`x17rw0jw`,"flexShrink-kmuXW":`x2lah0s`,"borderRadius-kaIpWk":`x1npxkrn`,"borderWidth-kMzoRj":`xmkeg23`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x1bue7yx`,"backgroundColor-kWkggS":`xp5aqsh`,"transitionProperty-k1ekBW":`x1eaenvl`,"transitionDuration-kIyJzY":`x1vhb3u9`,"transitionTimingFunction-kAMwcw":`x1xv5090`,"[data-active]_backgroundColor-kUQuju":`x1anawn6`,"[data-active]_borderColor-kE2G9j":`x7kzco9`,"[data-active]_color-kZgtTg":`xuz9cdh`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:114`},methodRow:{"Deposit__styles.methodRow":`Deposit__styles.methodRow`,"gap-kOIVth":`x1af02g3`,"paddingInlineStart-kZCmMZ":`xwn43p0`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:141`},methodIconSlot:{"Deposit__styles.methodIconSlot":`Deposit__styles.methodIconSlot`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"width-kzqmXN":`x14qfxbe`,"height-kZKoxP":`xc9qbxq`,"flexShrink-kmuXW":`x2lah0s`,"borderRadius-kaIpWk":`xi9trdq`,"backgroundColor-kWkggS":`xp5aqsh`,"borderWidth-kMzoRj":`xmkeg23`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x1bue7yx`,"color-kMwMTN":`xzn0pkc`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:145`},methodText:{"Deposit__styles.methodText":`Deposit__styles.methodText`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"gap-kOIVth":`x1ed6fcf`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:159`},methodTitleRow:{"Deposit__styles.methodTitleRow":`Deposit__styles.methodTitleRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x167g77z`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:168`},methodMeta:{"Deposit__styles.methodMeta":`Deposit__styles.methodMeta`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:174`},methodMetaItem:{"Deposit__styles.methodMetaItem":`Deposit__styles.methodMetaItem`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"whiteSpace-khDVqt":`xuxw1ft`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:180`},methodTrailing:{"Deposit__styles.methodTrailing":`Deposit__styles.methodTrailing`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:185`},methodChevron:{"Deposit__styles.methodChevron":`Deposit__styles.methodChevron`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:190`},methodRecommendedBar:{"Deposit__styles.methodRecommendedBar":`Deposit__styles.methodRecommendedBar`,"position-kVAEAm":`x10l6tqk`,"top-k87sOh":`xuivejd`,"bottom-krVfgx":`xmbx2d0`,"insetInlineStart-kLqNvP":`x1o0tod`,"width-kzqmXN":`xfo62xy`,"borderStartEndRadius-kfmiAY":`x1e4oeot`,"borderEndEndRadius-kT0f0o":`x1ui04y5`,"backgroundColor-kWkggS":`xdmxa9o`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:197`}};export{e as styles};