@seams/wallet 0.17.0 → 0.19.0

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 (341) hide show
  1. package/README.md +4 -5
  2. package/dist/.build-inputs.sha256 +1 -1
  3. package/dist/esm/SeamsWeb/index.js +1 -1
  4. package/dist/esm/SeamsWeb/walletIframe/client/inboundMessages.js +1 -1
  5. package/dist/esm/SeamsWeb/walletIframe/client/router.js +10 -4
  6. package/dist/esm/SeamsWeb/walletIframe/coordinator.js +23 -1
  7. package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuFooter.js +5 -4
  8. package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.js +121 -246
  9. package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/icons.js +37 -1
  10. package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.js +4 -2
  11. package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/presentation.js +117 -0
  12. package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/recovery-code-input.js +60 -0
  13. package/dist/esm/SeamsWeb/walletIframe/shared/facadeBoundary.js +2 -0
  14. package/dist/esm/core/browser/walletIframe/events.js +6 -0
  15. package/dist/esm/core/config/configBuilder.js +2 -0
  16. package/dist/esm/core/signingEngine/uiConfirm/ui/appearance.js +27 -0
  17. package/dist/esm/core/signingEngine/uiConfirm/ui/export-private-key-reveal.js +155 -0
  18. package/dist/esm/core/signingEngine/uiConfirm/ui/export-viewer-host.js +209 -0
  19. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmContent.js +7 -4
  20. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmHeader.js +10 -6
  21. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationBody.js +9 -6
  22. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationContent.js +9 -6
  23. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationDrawer.js +7 -4
  24. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationModal.js +4 -1
  25. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/EmailOtpContent.js +4 -1
  26. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/EmailOtpInput.js +5 -4
  27. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ExportPrivateKeySurface.js +319 -0
  28. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationContent.js +10 -7
  29. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationDetails.js +9 -5
  30. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/RecoveryCodeBackupSurface.js +28 -22
  31. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ReviewDisclosure.js +2 -1
  32. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionLabel.js +51 -26
  33. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.js +42 -27
  34. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionReview.js +25 -18
  35. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionTree.js +8 -5
  36. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/WalletLocale.js +24 -0
  37. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountConfirmationSurface.js +6 -4
  38. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountExportPrivateKeySurface.js +92 -0
  39. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountRecoveryCodeBackupSurface.js +4 -2
  40. package/dist/esm/core/signingEngine/uiConfirm/ui/surface-measurement-binding.js +12 -0
  41. package/dist/esm/core/ui/locale.js +10 -0
  42. package/dist/esm/core/ui/messages.js +698 -0
  43. package/dist/esm/index.js +3 -2
  44. package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonMock.js +7 -3
  45. package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonView.js +7 -4
  46. package/dist/esm/react/components/AccountMenuButton/AccountMenuDeviceDetails.js +4 -3
  47. package/dist/esm/react/components/AccountMenuButton/AccountMenuDialog.js +5 -2
  48. package/dist/esm/react/components/AccountMenuButton/AccountMenuMockScreens.js +31 -27
  49. package/dist/esm/react/components/AccountMenuButton/AccountMenuScreen.js +6 -3
  50. package/dist/esm/react/components/AccountMenuButton/AccountsSection.js +6 -3
  51. package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodRow.js +5 -4
  52. package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodsModal.js +33 -27
  53. package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodsView.js +5 -2
  54. package/dist/esm/react/components/AccountMenuButton/ExportKeysScreen.js +5 -3
  55. package/dist/esm/react/components/AccountMenuButton/ExportKeysSection.css +20 -0
  56. package/dist/esm/react/components/AccountMenuButton/ExportKeysSection.js +4 -3
  57. package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.css +9 -3
  58. package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.js +50 -41
  59. package/dist/esm/react/components/AccountMenuButton/LockMenuItem.js +2 -1
  60. package/dist/esm/react/components/AccountMenuButton/MenuItem.js +3 -2
  61. package/dist/esm/react/components/AccountMenuButton/ProfileDropdown.js +8 -4
  62. package/dist/esm/react/components/AccountMenuButton/RecoveryCodeAcknowledgement.js +3 -2
  63. package/dist/esm/react/components/AccountMenuButton/RecoveryCodeActions.js +4 -3
  64. package/dist/esm/react/components/AccountMenuButton/SegmentedControl.js +2 -1
  65. package/dist/esm/react/components/AccountMenuButton/TransactionSettingsSection.js +11 -10
  66. package/dist/esm/react/components/AccountMenuButton/UserAccountButton.css +1 -0
  67. package/dist/esm/react/components/AccountMenuButton/UserAccountButton.js +8 -4
  68. package/dist/esm/react/components/AccountMenuButton/WalletRegionSection.js +22 -15
  69. package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.js +20 -16
  70. package/dist/esm/react/components/AccountMenuButton/Web3AuthProfileButton.css +15 -0
  71. package/dist/esm/react/components/AccountMenuButton/index.js +18 -15
  72. package/dist/esm/react/components/HostedSeamsAuthMenu/SeamsAuthMenuMock.js +30 -26
  73. package/dist/esm/react/components/QRCodeScanner.js +28 -23
  74. package/dist/esm/react/components/ShowQRCode.js +39 -31
  75. package/dist/esm/react/components/theme/ThemeProvider.js +3 -0
  76. package/dist/esm/react/context/WalletLocale.js +15 -0
  77. package/dist/esm/react/context/index.js +8 -3
  78. package/dist/esm/react/styles/styles.css +36 -0
  79. package/dist/esm/sdk/ConfirmationDrawer-DCw0m-Iv.js +1 -0
  80. package/dist/{public/sdk/NonceCoordinator-DuDKN-B8.js → esm/sdk/NonceCoordinator-Dq-FZpBz.js} +1 -1
  81. package/dist/{public/sdk/accountLifecycle-D61FIpFS.js → esm/sdk/accountLifecycle-fLNUdjct.js} +1 -1
  82. package/dist/{public/sdk/activeWalletSession-Ba6X4CUN.js → esm/sdk/activeWalletSession-BpbnpU9s.js} +1 -1
  83. package/dist/esm/sdk/adapters-BNmcyf9K.js +2 -0
  84. package/dist/esm/sdk/appearance-token-vars-DxBm_cKA.js +2 -0
  85. package/dist/esm/sdk/{canonicalPrimitives-BOzRXzfv.js → canonicalPrimitives-BMP5yILS.js} +1 -1
  86. package/dist/esm/sdk/{challengeDelivery-FD9GHK1T.js → challengeDelivery-CG2J5Qxs.js} +1 -1
  87. package/dist/{public/sdk/clientSessionPersistenceState-BHRUSWMt.js → esm/sdk/clientSessionPersistenceState-BgO4P6CZ.js} +1 -1
  88. package/dist/esm/sdk/{commitQueue-DOIaR0Hr.js → commitQueue-BW7BpYyA.js} +1 -1
  89. package/dist/esm/sdk/configBuilder-BMNShuOu.js +1 -0
  90. package/dist/esm/sdk/{configHelpers-BXdl5Mxs.js → configHelpers-D50F_Txb.js} +1 -1
  91. package/dist/esm/sdk/{digestEncoding-CbEFYvlJ.js → digestEncoding-aC4dSf_x.js} +1 -1
  92. package/dist/esm/sdk/{display-CY_aJEn6.js → display-WtILOPQR.js} +1 -1
  93. package/dist/{public/sdk/ecdsaCapabilityManifest-DzA996y9.js → esm/sdk/ecdsaCapabilityManifest-DRc423SV.js} +1 -1
  94. package/dist/{public/sdk/ecdsaDerivationClientWasm-DQlajPpE.js → esm/sdk/ecdsaDerivationClientWasm-DmwKWUEb.js} +1 -1
  95. package/dist/{public/sdk/ecdsaDerivationExport-DyugdheE.js → esm/sdk/ecdsaDerivationExport-DX89rq_u.js} +1 -1
  96. package/dist/esm/sdk/{ecdsaWalletRecords-C_v74n5X.js → ecdsaWalletRecords-CxxUt3fS.js} +1 -1
  97. package/dist/{public/sdk/emailOtpEcdsaDerivationIdentity-BDVjvnmO.js → esm/sdk/emailOtpEcdsaDerivationIdentity-CupWCKNg.js} +1 -1
  98. package/dist/esm/sdk/{export-viewer-host-DsRaS0UH.js → export-viewer-host-DsdzagKK.js} +1 -1
  99. package/dist/{public/sdk/exportKeypairOperation-SJPysnE1.js → esm/sdk/exportKeypairOperation-BwW_E4Lt.js} +1 -1
  100. package/dist/esm/sdk/{helpers-D3CUEdHI.js → helpers-DS0bksx9.js} +1 -1
  101. package/dist/esm/sdk/{host-GPb_mSAQ.js → host-DMR4KDy9.js} +1 -1
  102. package/dist/esm/sdk/{intentDigest-CGLrsMgj.js → intentDigest-Rh5Mg8X7.js} +1 -1
  103. package/dist/esm/sdk/{lanes-DJKIHJBm.js → lanes-BzU7cv2T.js} +1 -1
  104. package/dist/esm/sdk/localOnly-DO191vDh.js +1 -0
  105. package/dist/esm/sdk/mountExportPrivateKeySurface-DQzFzhNu.js +1 -0
  106. package/dist/esm/sdk/mountRecoveryCodeBackupSurface-B1D0ovqx.js +2 -0
  107. package/dist/{public/sdk/nearEd25519YaoMaterialActivation-J6EHFScV.js → esm/sdk/nearEd25519YaoMaterialActivation-DgWDGRI_.js} +1 -1
  108. package/dist/{public/sdk/nearEd25519YaoSigningPreparation-CqBNMG87.js → esm/sdk/nearEd25519YaoSigningPreparation-yKDLQXBS.js} +1 -1
  109. package/dist/esm/sdk/{nonceLaneKeys-D18nlLjh.js → nonceLaneKeys-BzMBVxMU.js} +1 -1
  110. package/dist/esm/sdk/{operationFingerprint-Boa9DQ51.js → operationFingerprint-C4VX-0NI.js} +1 -1
  111. package/dist/{public/sdk/passkey-custody-CBSal3E9.js → esm/sdk/passkey-custody-Ba-NQ_4C.js} +1 -1
  112. package/dist/esm/sdk/{pendingWalletRecoveryCodeBackup-CvsrXbzn.js → pendingWalletRecoveryCodeBackup-DOeIn_Qj.js} +1 -1
  113. package/dist/{public/sdk/presignaturePool-CQNt13kE.js → esm/sdk/presignaturePool-BHoxnbOA.js} +1 -1
  114. package/dist/esm/sdk/{prfCache-DJ93rtDv.js → prfCache-BAFh1skJ.js} +1 -1
  115. package/dist/esm/sdk/{primitives-cC0a9GRC.js → primitives-CTmDwMNc.js} +1 -1
  116. package/dist/esm/sdk/{recovery-entrypoint-nj7Zo3CR.js → recovery-entrypoint-DWghFZrZ.js} +1 -1
  117. package/dist/esm/sdk/{registration-49OGU_GZ.js → registration-DknFwoqn.js} +1 -1
  118. package/dist/esm/sdk/{registration-C7tywPXF.js → registration-sQndIWRF.js} +1 -1
  119. package/dist/esm/sdk/{registrationAccounts-9GFI0Ger.js → registrationAccounts-CD1u1ZqZ.js} +1 -1
  120. package/dist/esm/sdk/{registrationIds-Br-zI4_5.js → registrationIds-B1OpqRAt.js} +1 -1
  121. package/dist/{public/sdk/registrationIntent-PqmcTEE3.js → esm/sdk/registrationIntent-D4YDjf2U.js} +1 -1
  122. package/dist/esm/sdk/{requireStepUpAuth-C4PGTly-.js → requireStepUpAuth-CnSCFSOZ.js} +1 -1
  123. package/dist/{public/sdk/routerAbNormalSigning-xxATTIh5.js → esm/sdk/routerAbNormalSigning-BV1t27aB.js} +1 -1
  124. package/dist/esm/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
  125. package/dist/esm/sdk/runtime-auth-BxG-J-BB.js +1 -0
  126. package/dist/esm/sdk/runtime-device-link-Dn_5hPCq.js +1 -0
  127. package/dist/esm/sdk/runtime-ecdsa-tempo-lTFTb9Rh.js +1 -0
  128. package/dist/esm/sdk/runtime-email-otp-CPqTCH8Q.js +1 -0
  129. package/dist/esm/sdk/runtime-export-Brz53_oi.js +1 -0
  130. package/dist/esm/sdk/runtime-near-Da_xFUXx.js +1 -0
  131. package/dist/esm/sdk/runtime-preferences-riUZGaTs.js +1 -0
  132. package/dist/esm/sdk/runtime-recovery-CTj4nDAM.js +1 -0
  133. package/dist/esm/sdk/{runtime-recovery-codes-LR4mg7-k.js → runtime-recovery-codes-D8T9LQ7-.js} +1 -1
  134. package/dist/esm/sdk/{secp256k1-BldUPNQI.js → secp256k1-wOOHtPcK.js} +1 -1
  135. package/dist/esm/sdk/{secureRandomId-LwBFx84B.js → secureRandomId-8LSc91aN.js} +1 -1
  136. package/dist/esm/sdk/sessionObservationRevision-C7v-wN8_.js +1 -0
  137. package/dist/esm/sdk/shared-hx7KVyeq.js +6 -0
  138. package/dist/esm/sdk/{signEvmFamily-C_RvEnDB.js → signEvmFamily-DT34Vtpa.js} +1 -1
  139. package/dist/esm/sdk/{signEvmFamilyWithUiConfirmForTempo-CUKdq5dE.js → signEvmFamilyWithUiConfirmForTempo-NYCFU6Li.js} +1 -1
  140. package/dist/esm/sdk/{signEvmWithUiConfirm-CxXzcvj2.js → signEvmWithUiConfirm-D6nmJr_L.js} +1 -1
  141. package/dist/{public/sdk/signNear-Dno7NsP_.js → esm/sdk/signNear-B000QxBd.js} +1 -1
  142. package/dist/{public/sdk/signingFlow-DtugI_2z.js → esm/sdk/signingFlow-gl85GOW4.js} +1 -1
  143. package/dist/esm/sdk/{signingQueue-C1Pb07gm.js → signingQueue-gW7wmOuL.js} +1 -1
  144. package/dist/esm/sdk/{singletons-DxIyVhNb.js → singletons-CAsc9LvA.js} +1 -1
  145. package/dist/{public/sdk/thresholdEcdsa-murTq-xz.js → esm/sdk/thresholdEcdsa-Ci7yz395.js} +1 -1
  146. package/dist/{public/sdk/transactionState-XbZm9Zon.js → esm/sdk/transactionState-lB2qpkOm.js} +1 -1
  147. package/dist/esm/sdk/tx-confirm-ui.js +1799 -432
  148. package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
  149. package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
  150. package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
  151. package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
  152. package/dist/esm/sdk/{wallet-recovery-CVUalZ3p.js → wallet-recovery-DFaS3geI.js} +1 -1
  153. package/dist/esm/sdk/wallet-ui.css +1 -1
  154. package/dist/{public/sdk/walletAuthMethodRecord-Bv68Vq-g.js → esm/sdk/walletAuthMethodRecord-CWdqdY_s.js} +1 -1
  155. package/dist/{public/sdk/walletAuthority-v5wvv3IB.js → esm/sdk/walletAuthority-BY3kyKQ-.js} +1 -1
  156. package/dist/{public/sdk/walletCustodyEcdsaContinuity-rRHExT_R.js → esm/sdk/walletCustodyEcdsaContinuity-mGh1Ysko.js} +1 -1
  157. package/dist/esm/sdk/{walletDbName-DRzPv5Ir.js → walletDbName-BxWApBQF.js} +1 -1
  158. package/dist/{public/sdk/walletOwnershipGeneration-pMmmJ6XA.js → esm/sdk/walletOwnershipGeneration-DSGfjuV2.js} +1 -1
  159. package/dist/esm/sdk/{walletRecoveryCommit-DvC6WlGz.js → walletRecoveryCommit-DQA_wveK.js} +1 -1
  160. package/dist/esm/sdk/{walletRecoveryRotate-Dd3prJpr.js → walletRecoveryRotate-zvQThn37.js} +1 -1
  161. package/dist/esm/sdk/walletRegistrationSetupPrewarm-DdVpKccU.js +1 -0
  162. package/dist/{public/sdk/walletSessionAuthorizationStatus-DVV3xkAx.js → esm/sdk/walletSessionAuthorizationStatus-ONPRiEbK.js} +1 -1
  163. package/dist/{public/sdk/walletSessionAuthorizationStore-D-MhJ0PC.js → esm/sdk/walletSessionAuthorizationStore-DnUMtkev.js} +1 -1
  164. package/dist/esm/sdk/warmSessionHydration-D8Vdro9n.js +1 -0
  165. package/dist/{public/sdk/webauthnP256-XgYu-Y6E.js → esm/sdk/webauthnP256-_ajaNl90.js} +1 -1
  166. package/dist/esm/sdk/{webauthnPromptCoordinator-D5sP8Q7e.js → webauthnPromptCoordinator-9bVeHcTZ.js} +1 -1
  167. package/dist/esm/wasm/router_ab_ed25519_yao_client/pkg/router_ab_ed25519_yao_client_bg.wasm +0 -0
  168. package/dist/public/headers.manifest.json +1 -1
  169. package/dist/public/sdk/ConfirmationDrawer-DCw0m-Iv.js +1 -0
  170. package/dist/{esm/sdk/NonceCoordinator-DuDKN-B8.js → public/sdk/NonceCoordinator-Dq-FZpBz.js} +1 -1
  171. package/dist/{esm/sdk/accountLifecycle-D61FIpFS.js → public/sdk/accountLifecycle-fLNUdjct.js} +1 -1
  172. package/dist/{esm/sdk/activeWalletSession-Ba6X4CUN.js → public/sdk/activeWalletSession-BpbnpU9s.js} +1 -1
  173. package/dist/public/sdk/adapters-BNmcyf9K.js +2 -0
  174. package/dist/public/sdk/appearance-token-vars-DxBm_cKA.js +2 -0
  175. package/dist/public/sdk/{canonicalPrimitives-BOzRXzfv.js → canonicalPrimitives-BMP5yILS.js} +1 -1
  176. package/dist/public/sdk/{challengeDelivery-FD9GHK1T.js → challengeDelivery-CG2J5Qxs.js} +1 -1
  177. package/dist/{esm/sdk/clientSessionPersistenceState-BHRUSWMt.js → public/sdk/clientSessionPersistenceState-BgO4P6CZ.js} +1 -1
  178. package/dist/public/sdk/{commitQueue-DOIaR0Hr.js → commitQueue-BW7BpYyA.js} +1 -1
  179. package/dist/public/sdk/configBuilder-BMNShuOu.js +1 -0
  180. package/dist/public/sdk/{configHelpers-BXdl5Mxs.js → configHelpers-D50F_Txb.js} +1 -1
  181. package/dist/public/sdk/{digestEncoding-CbEFYvlJ.js → digestEncoding-aC4dSf_x.js} +1 -1
  182. package/dist/public/sdk/{display-CY_aJEn6.js → display-WtILOPQR.js} +1 -1
  183. package/dist/{esm/sdk/ecdsaCapabilityManifest-DzA996y9.js → public/sdk/ecdsaCapabilityManifest-DRc423SV.js} +1 -1
  184. package/dist/{esm/sdk/ecdsaDerivationClientWasm-DQlajPpE.js → public/sdk/ecdsaDerivationClientWasm-DmwKWUEb.js} +1 -1
  185. package/dist/{esm/sdk/ecdsaDerivationExport-DyugdheE.js → public/sdk/ecdsaDerivationExport-DX89rq_u.js} +1 -1
  186. package/dist/public/sdk/{ecdsaWalletRecords-C_v74n5X.js → ecdsaWalletRecords-CxxUt3fS.js} +1 -1
  187. package/dist/{esm/sdk/emailOtpEcdsaDerivationIdentity-BDVjvnmO.js → public/sdk/emailOtpEcdsaDerivationIdentity-CupWCKNg.js} +1 -1
  188. package/dist/public/sdk/{export-viewer-host-DsRaS0UH.js → export-viewer-host-DsdzagKK.js} +1 -1
  189. package/dist/{esm/sdk/exportKeypairOperation-SJPysnE1.js → public/sdk/exportKeypairOperation-BwW_E4Lt.js} +1 -1
  190. package/dist/public/sdk/{helpers-D3CUEdHI.js → helpers-DS0bksx9.js} +1 -1
  191. package/dist/public/sdk/{host-GPb_mSAQ.js → host-DMR4KDy9.js} +1 -1
  192. package/dist/public/sdk/{intentDigest-CGLrsMgj.js → intentDigest-Rh5Mg8X7.js} +1 -1
  193. package/dist/public/sdk/{lanes-DJKIHJBm.js → lanes-BzU7cv2T.js} +1 -1
  194. package/dist/public/sdk/localOnly-DO191vDh.js +1 -0
  195. package/dist/public/sdk/mountExportPrivateKeySurface-DQzFzhNu.js +1 -0
  196. package/dist/public/sdk/mountRecoveryCodeBackupSurface-B1D0ovqx.js +2 -0
  197. package/dist/{esm/sdk/nearEd25519YaoMaterialActivation-J6EHFScV.js → public/sdk/nearEd25519YaoMaterialActivation-DgWDGRI_.js} +1 -1
  198. package/dist/{esm/sdk/nearEd25519YaoSigningPreparation-CqBNMG87.js → public/sdk/nearEd25519YaoSigningPreparation-yKDLQXBS.js} +1 -1
  199. package/dist/public/sdk/{nonceLaneKeys-D18nlLjh.js → nonceLaneKeys-BzMBVxMU.js} +1 -1
  200. package/dist/public/sdk/{operationFingerprint-Boa9DQ51.js → operationFingerprint-C4VX-0NI.js} +1 -1
  201. package/dist/{esm/sdk/passkey-custody-CBSal3E9.js → public/sdk/passkey-custody-Ba-NQ_4C.js} +1 -1
  202. package/dist/public/sdk/{pendingWalletRecoveryCodeBackup-CvsrXbzn.js → pendingWalletRecoveryCodeBackup-DOeIn_Qj.js} +1 -1
  203. package/dist/{esm/sdk/presignaturePool-CQNt13kE.js → public/sdk/presignaturePool-BHoxnbOA.js} +1 -1
  204. package/dist/public/sdk/{prfCache-DJ93rtDv.js → prfCache-BAFh1skJ.js} +1 -1
  205. package/dist/public/sdk/{primitives-cC0a9GRC.js → primitives-CTmDwMNc.js} +1 -1
  206. package/dist/public/sdk/{recovery-entrypoint-nj7Zo3CR.js → recovery-entrypoint-DWghFZrZ.js} +1 -1
  207. package/dist/public/sdk/{registration-49OGU_GZ.js → registration-DknFwoqn.js} +1 -1
  208. package/dist/public/sdk/{registration-C7tywPXF.js → registration-sQndIWRF.js} +1 -1
  209. package/dist/public/sdk/{registrationAccounts-9GFI0Ger.js → registrationAccounts-CD1u1ZqZ.js} +1 -1
  210. package/dist/public/sdk/{registrationIds-Br-zI4_5.js → registrationIds-B1OpqRAt.js} +1 -1
  211. package/dist/{esm/sdk/registrationIntent-PqmcTEE3.js → public/sdk/registrationIntent-D4YDjf2U.js} +1 -1
  212. package/dist/public/sdk/{requireStepUpAuth-C4PGTly-.js → requireStepUpAuth-CnSCFSOZ.js} +1 -1
  213. package/dist/{esm/sdk/routerAbNormalSigning-xxATTIh5.js → public/sdk/routerAbNormalSigning-BV1t27aB.js} +1 -1
  214. package/dist/public/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
  215. package/dist/public/sdk/runtime-auth-BxG-J-BB.js +1 -0
  216. package/dist/public/sdk/runtime-device-link-Dn_5hPCq.js +1 -0
  217. package/dist/public/sdk/runtime-ecdsa-tempo-lTFTb9Rh.js +1 -0
  218. package/dist/public/sdk/runtime-email-otp-CPqTCH8Q.js +1 -0
  219. package/dist/public/sdk/runtime-export-Brz53_oi.js +1 -0
  220. package/dist/public/sdk/runtime-near-Da_xFUXx.js +1 -0
  221. package/dist/public/sdk/runtime-preferences-riUZGaTs.js +1 -0
  222. package/dist/public/sdk/runtime-recovery-CTj4nDAM.js +1 -0
  223. package/dist/public/sdk/{runtime-recovery-codes-LR4mg7-k.js → runtime-recovery-codes-D8T9LQ7-.js} +1 -1
  224. package/dist/public/sdk/{secp256k1-BldUPNQI.js → secp256k1-wOOHtPcK.js} +1 -1
  225. package/dist/public/sdk/{secureRandomId-LwBFx84B.js → secureRandomId-8LSc91aN.js} +1 -1
  226. package/dist/public/sdk/sessionObservationRevision-C7v-wN8_.js +1 -0
  227. package/dist/public/sdk/shared-hx7KVyeq.js +6 -0
  228. package/dist/public/sdk/{signEvmFamily-C_RvEnDB.js → signEvmFamily-DT34Vtpa.js} +1 -1
  229. package/dist/public/sdk/{signEvmFamilyWithUiConfirmForTempo-CUKdq5dE.js → signEvmFamilyWithUiConfirmForTempo-NYCFU6Li.js} +1 -1
  230. package/dist/public/sdk/{signEvmWithUiConfirm-CxXzcvj2.js → signEvmWithUiConfirm-D6nmJr_L.js} +1 -1
  231. package/dist/{esm/sdk/signNear-Dno7NsP_.js → public/sdk/signNear-B000QxBd.js} +1 -1
  232. package/dist/{esm/sdk/signingFlow-DtugI_2z.js → public/sdk/signingFlow-gl85GOW4.js} +1 -1
  233. package/dist/public/sdk/{signingQueue-C1Pb07gm.js → signingQueue-gW7wmOuL.js} +1 -1
  234. package/dist/public/sdk/{singletons-DxIyVhNb.js → singletons-CAsc9LvA.js} +1 -1
  235. package/dist/{esm/sdk/thresholdEcdsa-murTq-xz.js → public/sdk/thresholdEcdsa-Ci7yz395.js} +1 -1
  236. package/dist/{esm/sdk/transactionState-XbZm9Zon.js → public/sdk/transactionState-lB2qpkOm.js} +1 -1
  237. package/dist/public/sdk/tx-confirm-ui.js +1799 -432
  238. package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
  239. package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
  240. package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
  241. package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
  242. package/dist/public/sdk/{wallet-recovery-CVUalZ3p.js → wallet-recovery-DFaS3geI.js} +1 -1
  243. package/dist/public/sdk/wallet-ui.css +1 -1
  244. package/dist/{esm/sdk/walletAuthMethodRecord-Bv68Vq-g.js → public/sdk/walletAuthMethodRecord-CWdqdY_s.js} +1 -1
  245. package/dist/{esm/sdk/walletAuthority-v5wvv3IB.js → public/sdk/walletAuthority-BY3kyKQ-.js} +1 -1
  246. package/dist/{esm/sdk/walletCustodyEcdsaContinuity-rRHExT_R.js → public/sdk/walletCustodyEcdsaContinuity-mGh1Ysko.js} +1 -1
  247. package/dist/public/sdk/{walletDbName-DRzPv5Ir.js → walletDbName-BxWApBQF.js} +1 -1
  248. package/dist/{esm/sdk/walletOwnershipGeneration-pMmmJ6XA.js → public/sdk/walletOwnershipGeneration-DSGfjuV2.js} +1 -1
  249. package/dist/public/sdk/{walletRecoveryCommit-DvC6WlGz.js → walletRecoveryCommit-DQA_wveK.js} +1 -1
  250. package/dist/public/sdk/{walletRecoveryRotate-Dd3prJpr.js → walletRecoveryRotate-zvQThn37.js} +1 -1
  251. package/dist/public/sdk/walletRegistrationSetupPrewarm-DdVpKccU.js +1 -0
  252. package/dist/{esm/sdk/walletSessionAuthorizationStatus-DVV3xkAx.js → public/sdk/walletSessionAuthorizationStatus-ONPRiEbK.js} +1 -1
  253. package/dist/{esm/sdk/walletSessionAuthorizationStore-D-MhJ0PC.js → public/sdk/walletSessionAuthorizationStore-DnUMtkev.js} +1 -1
  254. package/dist/public/sdk/warmSessionHydration-D8Vdro9n.js +1 -0
  255. package/dist/{esm/sdk/webauthnP256-XgYu-Y6E.js → public/sdk/webauthnP256-_ajaNl90.js} +1 -1
  256. package/dist/public/sdk/{webauthnPromptCoordinator-D5sP8Q7e.js → webauthnPromptCoordinator-9bVeHcTZ.js} +1 -1
  257. package/dist/public/sdk/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
  258. package/dist/public/sdk/workers/wallet_custody_ceremony_bg.wasm +0 -0
  259. package/dist/public/wallet-assets.manifest.json +192 -192
  260. package/dist/public/wallet-service/index.html +4 -4
  261. package/dist/types/wallet/src/SeamsWeb/walletIframe/coordinator.d.ts +2 -1
  262. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/auth-menu/domain.d.ts +20 -3
  263. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/auth-menu/session.d.ts +3 -0
  264. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuFooter.d.ts +0 -1
  265. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.d.ts +5 -6
  266. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/icons.d.ts +2 -0
  267. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/presentation.d.ts +35 -0
  268. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/recovery-code-input.d.ts +17 -0
  269. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmContent.d.ts +3 -1
  270. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmHeader.d.ts +0 -1
  271. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationBody.d.ts +3 -1
  272. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationContent.d.ts +3 -1
  273. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationDrawer.d.ts +0 -1
  274. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationModal.d.ts +0 -1
  275. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/EmailOtpInput.d.ts +0 -1
  276. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ExportPrivateKeySurface.d.ts +1 -1
  277. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationContent.d.ts +3 -1
  278. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationDetails.d.ts +0 -1
  279. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/RecoveryCodeBackupSurface.d.ts +3 -1
  280. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ReviewDisclosure.d.ts +0 -1
  281. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionLabel.d.ts +0 -1
  282. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.d.ts +3 -1
  283. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionReview.d.ts +3 -1
  284. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionTree.d.ts +0 -1
  285. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/WalletLocale.d.ts +18 -0
  286. package/dist/types/wallet/src/core/types/seams.d.ts +3 -0
  287. package/dist/types/wallet/src/core/ui/locale.d.ts +5 -0
  288. package/dist/types/wallet/src/core/ui/messages.d.ts +8 -0
  289. package/dist/types/wallet/src/index.d.ts +3 -1
  290. package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuButtonMock.d.ts +1 -0
  291. package/dist/types/wallet/src/react/components/AccountMenuButton/WalletRegionSection.d.ts +3 -0
  292. package/dist/types/wallet/src/react/components/AccountMenuButton/WalletSettingsLayout.d.ts +4 -1
  293. package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/SeamsAuthMenuMock.d.ts +2 -1
  294. package/dist/types/wallet/src/react/context/WalletLocale.d.ts +16 -0
  295. package/dist/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
  296. package/dist/workers/wallet_custody_ceremony_bg.wasm +0 -0
  297. package/package.json +1 -1
  298. package/dist/esm/sdk/ConfirmationDrawer-CXVNmfTy.js +0 -1
  299. package/dist/esm/sdk/adapters-CTlDBRJy.js +0 -2
  300. package/dist/esm/sdk/configBuilder-BMawmNpz.js +0 -1
  301. package/dist/esm/sdk/jsxRuntime.module-DKsgiFjd.js +0 -2
  302. package/dist/esm/sdk/localOnly-CPmpw381.js +0 -1
  303. package/dist/esm/sdk/mountExportPrivateKeySurface-C8_tpDHF.js +0 -1
  304. package/dist/esm/sdk/mountRecoveryCodeBackupSurface-BtNFtmSj.js +0 -2
  305. package/dist/esm/sdk/runtime-auth-CpjGW90U.js +0 -1
  306. package/dist/esm/sdk/runtime-device-link-CKgfGi7D.js +0 -1
  307. package/dist/esm/sdk/runtime-ecdsa-tempo-5VV9xSEh.js +0 -1
  308. package/dist/esm/sdk/runtime-email-otp-D1hYZNn6.js +0 -1
  309. package/dist/esm/sdk/runtime-export-B92wQD25.js +0 -1
  310. package/dist/esm/sdk/runtime-near-CUuKg38M.js +0 -1
  311. package/dist/esm/sdk/runtime-preferences-EdL3G_MO.js +0 -1
  312. package/dist/esm/sdk/runtime-recovery-uyw8sywI.js +0 -1
  313. package/dist/esm/sdk/sessionObservationRevision-DmmNV25w.js +0 -1
  314. package/dist/esm/sdk/shared-ha31XIdc.js +0 -6
  315. package/dist/esm/sdk/walletRegistrationSetupPrewarm-DcbhVNMQ.js +0 -1
  316. package/dist/esm/sdk/warmSessionHydration-CsQpQVuy.js +0 -1
  317. package/dist/public/sdk/ConfirmationDrawer-CXVNmfTy.js +0 -1
  318. package/dist/public/sdk/adapters-CTlDBRJy.js +0 -2
  319. package/dist/public/sdk/configBuilder-BMawmNpz.js +0 -1
  320. package/dist/public/sdk/jsxRuntime.module-DKsgiFjd.js +0 -2
  321. package/dist/public/sdk/localOnly-CPmpw381.js +0 -1
  322. package/dist/public/sdk/mountExportPrivateKeySurface-C8_tpDHF.js +0 -1
  323. package/dist/public/sdk/mountRecoveryCodeBackupSurface-BtNFtmSj.js +0 -2
  324. package/dist/public/sdk/runtime-auth-CpjGW90U.js +0 -1
  325. package/dist/public/sdk/runtime-device-link-CKgfGi7D.js +0 -1
  326. package/dist/public/sdk/runtime-ecdsa-tempo-5VV9xSEh.js +0 -1
  327. package/dist/public/sdk/runtime-email-otp-D1hYZNn6.js +0 -1
  328. package/dist/public/sdk/runtime-export-B92wQD25.js +0 -1
  329. package/dist/public/sdk/runtime-near-CUuKg38M.js +0 -1
  330. package/dist/public/sdk/runtime-preferences-EdL3G_MO.js +0 -1
  331. package/dist/public/sdk/runtime-recovery-uyw8sywI.js +0 -1
  332. package/dist/public/sdk/sessionObservationRevision-DmmNV25w.js +0 -1
  333. package/dist/public/sdk/shared-ha31XIdc.js +0 -6
  334. package/dist/public/sdk/walletRegistrationSetupPrewarm-DcbhVNMQ.js +0 -1
  335. package/dist/public/sdk/warmSessionHydration-CsQpQVuy.js +0 -1
  336. /package/dist/esm/sdk/{base64-DW79QA0h.js → base64-BmKR3UqU.js} +0 -0
  337. /package/dist/esm/sdk/{signingSessionSeal-DX41aXUL.js → signingSessionSeal-DqbjG8c8.js} +0 -0
  338. /package/dist/esm/sdk/{theme-BKaFqCAj.js → theme-os0Salmo.js} +0 -0
  339. /package/dist/public/sdk/{base64-DW79QA0h.js → base64-BmKR3UqU.js} +0 -0
  340. /package/dist/public/sdk/{signingSessionSeal-DX41aXUL.js → signingSessionSeal-DqbjG8c8.js} +0 -0
  341. /package/dist/public/sdk/{theme-BKaFqCAj.js → theme-os0Salmo.js} +0 -0
@@ -1,5 +1,7 @@
1
1
  import { classifyLinkDeviceFlowEvent } from "../../core/types/sdkSentEvents.js";
2
2
  import { DeviceLinkingErrorCode } from "../../core/types/linkDevice.js";
3
+ import { walletText } from "../../core/ui/messages.js";
4
+ import { WalletText, useWalletLocale } from "../context/WalletLocale.js";
3
5
  import { useSeams } from "../context/index.js";
4
6
  import { Theme, useTheme } from "./theme/ThemeProvider.js";
5
7
  import { useDeviceLinking } from "../hooks/useDeviceLinking.js";
@@ -29,12 +31,13 @@ function restorableFocusElement() {
29
31
  return activeElement;
30
32
  }
31
33
  function ScannerFrame({ presentation, onClose, theme, tokens, children }) {
34
+ const locale = useWalletLocale();
32
35
  if (presentation === "embedded") return /* @__PURE__ */ jsxs(AccountMenuScreen, {
33
- title: "Link a device",
36
+ title: walletText(locale, "Link a device"),
34
37
  onBack: onClose,
35
38
  children: [/* @__PURE__ */ jsx("p", {
36
39
  className: "seams-account-description",
37
- children: "Open your wallet on the other device, then scan its pairing code."
40
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Open your wallet on the other device, then scan its pairing code." })
38
41
  }), children]
39
42
  });
40
43
  return /* @__PURE__ */ jsx(Theme, {
@@ -44,6 +47,7 @@ function ScannerFrame({ presentation, onClose, theme, tokens, children }) {
44
47
  });
45
48
  }
46
49
  const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = true, cameraId, className, style, showCamera = true, presentation = "modal" }) => {
50
+ const locale = useWalletLocale();
47
51
  const { theme, tokens } = useTheme();
48
52
  const { cancelLinking } = useSeams();
49
53
  const scopedTokens = React.useMemo(() => theme === "dark" ? { dark: tokens } : { light: tokens }, [theme, tokens]);
@@ -339,24 +343,24 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
339
343
  children: [
340
344
  /* @__PURE__ */ jsx("h2", {
341
345
  id: "qr-scanner-error-title",
342
- children: "Unable to scan a QR code"
346
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Unable to scan a QR code" })
343
347
  }),
344
348
  /* @__PURE__ */ jsx("p", {
345
349
  role: "alert",
346
- children: qrCamera.error
350
+ children: /* @__PURE__ */ jsx(WalletText, { copy: qrCamera.error })
347
351
  }),
348
352
  /* @__PURE__ */ jsx("button", {
349
353
  type: "button",
350
354
  onClick: qrCamera.startScanning,
351
355
  className: "qr-scanner-error-button",
352
- children: "Try Again"
356
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Try Again" })
353
357
  }),
354
358
  /* @__PURE__ */ jsx("button", {
355
359
  ref: closeButtonRef,
356
360
  type: "button",
357
361
  onClick: handleClose,
358
362
  className: "qr-scanner-error-button",
359
- children: "Close"
363
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Close" })
360
364
  })
361
365
  ]
362
366
  })
@@ -389,14 +393,14 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
389
393
  children: [
390
394
  /* @__PURE__ */ jsx("h2", {
391
395
  id: "qr-scanner-email-selection-title",
392
- children: "Choose an Email OTP method"
396
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Choose an Email OTP method" })
393
397
  }),
394
- /* @__PURE__ */ jsx("p", { children: "Select the masked address to authorize this linked device." }),
398
+ /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(WalletText, { message: "Select the masked address to authorize this linked device." }) }),
395
399
  emailOtpSelection.kind === "required" ? /* @__PURE__ */ jsxs("fieldset", {
396
400
  className: "qr-scanner-email-choice-list",
397
401
  children: [/* @__PURE__ */ jsx("legend", {
398
402
  className: "qr-scanner-email-choice-legend",
399
- children: "Available methods"
403
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Available methods" })
400
404
  }), emailOtpSelection.choices.map((choice) => {
401
405
  const choiceId = `qr-email-method-${String(choice.baseWalletAuthMethodId)}`;
402
406
  return /* @__PURE__ */ jsxs("label", {
@@ -415,7 +419,8 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
415
419
  }) : /* @__PURE__ */ jsxs("p", {
416
420
  role: "status",
417
421
  children: [
418
- "Authorizing ",
422
+ /* @__PURE__ */ jsx(WalletText, { message: "Authorizing" }),
423
+ " ",
419
424
  emailOtpSelection.choice.maskedEmailHint,
420
425
  "…"
421
426
  ]
@@ -425,13 +430,13 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
425
430
  className: "qr-scanner-email-continue",
426
431
  disabled: emailOtpSelection.selectedBaseWalletAuthMethodId === null,
427
432
  onClick: selectEmailOtpBaseFactor,
428
- children: "Continue"
433
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Continue" })
429
434
  })
430
435
  ]
431
436
  }), /* @__PURE__ */ jsx("button", {
432
437
  ref: closeButtonRef,
433
438
  type: "button",
434
- "aria-label": "Close scanner",
439
+ "aria-label": walletText(locale, "Close scanner"),
435
440
  onClick: handleClose,
436
441
  className: "qr-scanner-close",
437
442
  children: /* @__PURE__ */ jsx("span", {
@@ -467,7 +472,7 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
467
472
  children: [/* @__PURE__ */ jsx("h2", {
468
473
  id: "qr-scanner-title",
469
474
  className: "qr-scanner-visually-hidden",
470
- children: "Scan and link a device"
475
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Scan and link a device" })
471
476
  }), scannerState.kind === "expired" ? /* @__PURE__ */ jsxs("div", {
472
477
  className: "qr-scanner-progress",
473
478
  "aria-labelledby": "qr-scanner-progress-title",
@@ -476,12 +481,12 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
476
481
  id: "qr-scanner-progress-title",
477
482
  ref: progressTitleRef,
478
483
  tabIndex: -1,
479
- children: "Linking expired"
484
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Linking expired" })
480
485
  }),
481
486
  /* @__PURE__ */ jsx("p", {
482
487
  className: "qr-scanner-progress-message",
483
488
  role: "alert",
484
- children: "This linking request expired. Scan the QR code again to retry."
489
+ children: /* @__PURE__ */ jsx(WalletText, { message: "This linking request expired. Scan the QR code again to retry." })
485
490
  }),
486
491
  /* @__PURE__ */ jsxs("div", {
487
492
  className: "qr-scanner-progress-actions",
@@ -489,12 +494,12 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
489
494
  type: "button",
490
495
  className: "qr-scanner-progress-cancel",
491
496
  onClick: handleDismissExpiredLink,
492
- children: "Close"
497
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Close" })
493
498
  }), /* @__PURE__ */ jsx("button", {
494
499
  type: "button",
495
500
  className: "qr-scanner-progress-primary",
496
501
  onClick: handleRetryExpiredLink,
497
- children: "Try again"
502
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Try again" })
498
503
  })]
499
504
  })
500
505
  ]
@@ -506,7 +511,7 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
506
511
  id: "qr-scanner-progress-title",
507
512
  ref: progressTitleRef,
508
513
  tabIndex: -1,
509
- children: "Linking device"
514
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Linking device" })
510
515
  }),
511
516
  /* @__PURE__ */ jsxs("div", {
512
517
  className: "qr-scanner-progress-dots",
@@ -521,7 +526,7 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
521
526
  className: "qr-scanner-progress-message",
522
527
  role: "status",
523
528
  "aria-live": "polite",
524
- children: "Continue linking on your other device."
529
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Continue linking on your other device." })
525
530
  }),
526
531
  /* @__PURE__ */ jsx("div", {
527
532
  className: "qr-scanner-progress-actions",
@@ -529,7 +534,7 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
529
534
  type: "button",
530
535
  className: "qr-scanner-progress-cancel",
531
536
  onClick: handleCancelLinking,
532
- children: "Cancel linking"
537
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Cancel linking" })
533
538
  })
534
539
  })
535
540
  ]
@@ -551,9 +556,9 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
551
556
  })] }),
552
557
  /* @__PURE__ */ jsxs("div", {
553
558
  className: "qr-scanner-instructions",
554
- children: [/* @__PURE__ */ jsx("p", { children: "Position the QR code within the frame" }), qrCamera.isScanning && /* @__PURE__ */ jsx("p", {
559
+ children: [/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(WalletText, { message: "Position the QR code within the frame" }) }), qrCamera.isScanning && /* @__PURE__ */ jsx("p", {
555
560
  className: "qr-scanner-sub-instruction qr-scanner-sub-instruction--small",
556
- children: "Scanning..."
561
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Scanning..." })
557
562
  })]
558
563
  }),
559
564
  qrCamera.cameras.length > 1 && /* @__PURE__ */ jsx("div", {
@@ -574,7 +579,7 @@ const QRCodeScanner = ({ onQRCodeScanned, onError, onClose, onEvent, isOpen = tr
574
579
  }), scannerState.kind === "scanning" && /* @__PURE__ */ jsx("button", {
575
580
  ref: closeButtonRef,
576
581
  type: "button",
577
- "aria-label": "Close scanner",
582
+ "aria-label": walletText(locale, "Close scanner"),
578
583
  onClick: (event) => {
579
584
  event.stopPropagation();
580
585
  stopPropagationNative(event);
@@ -1,6 +1,8 @@
1
1
  import { toAccountId } from "../../core/types/accountIds.js";
2
2
  import { classifyLinkDeviceFlowEvent } from "../../core/types/sdkSentEvents.js";
3
3
  import { isLinkedDeviceTargetEmailAddressV1, normalizeLinkedDeviceTargetEmailAddressV1 } from "../../core/types/linkDevice.js";
4
+ import { walletText } from "../../core/ui/messages.js";
5
+ import { WalletText, useWalletLocale } from "../context/WalletLocale.js";
4
6
  import { useSeams } from "../context/index.js";
5
7
  import FingerprintIcon from "./FingerprintIcon.js";
6
8
  import { useCallback, useEffect, useRef, useState } from "react";
@@ -383,10 +385,10 @@ function FactorSelection({ targetFactor, targetEmail, onChange, onEmailAddressCh
383
385
  children: [/* @__PURE__ */ jsx("h2", {
384
386
  id: "seams-device-link-factor-title",
385
387
  className: "seams-otp-title",
386
- children: "Match your other device"
388
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Match your other device" })
387
389
  }), /* @__PURE__ */ jsx("p", {
388
390
  className: "seams-otp-description",
389
- children: "Choose the unlock method for Device 2. Email code sends a one-time code to the address you enter."
391
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Choose the unlock method for Device 2. Email code sends a one-time code to the address you enter." })
390
392
  })]
391
393
  }),
392
394
  /* @__PURE__ */ jsxs("fieldset", {
@@ -394,7 +396,7 @@ function FactorSelection({ targetFactor, targetEmail, onChange, onEmailAddressCh
394
396
  children: [
395
397
  /* @__PURE__ */ jsx("legend", {
396
398
  className: "seams-field-label",
397
- children: "Wallet unlock method"
399
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Wallet unlock method" })
398
400
  }),
399
401
  /* @__PURE__ */ jsxs("label", {
400
402
  className: "seams-device-link-factor-option",
@@ -406,7 +408,11 @@ function FactorSelection({ targetFactor, targetEmail, onChange, onEmailAddressCh
406
408
  }),
407
409
  /* @__PURE__ */ jsxs("span", {
408
410
  className: "seams-device-link-factor-label",
409
- children: ["Passkey ", /* @__PURE__ */ jsx("span", { children: "(recommended)" })]
411
+ children: [
412
+ /* @__PURE__ */ jsx(WalletText, { message: "Passkey" }),
413
+ " ",
414
+ /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(WalletText, { message: "(recommended)" }) })
415
+ ]
410
416
  }),
411
417
  /* @__PURE__ */ jsx("input", {
412
418
  type: "radio",
@@ -427,7 +433,7 @@ function FactorSelection({ targetFactor, targetEmail, onChange, onEmailAddressCh
427
433
  }),
428
434
  /* @__PURE__ */ jsx("span", {
429
435
  className: "seams-device-link-factor-label",
430
- children: "Email code"
436
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Email code" })
431
437
  }),
432
438
  /* @__PURE__ */ jsx("input", {
433
439
  type: "radio",
@@ -444,7 +450,7 @@ function FactorSelection({ targetFactor, targetEmail, onChange, onEmailAddressCh
444
450
  className: "seams-device-link-email-field",
445
451
  children: [/* @__PURE__ */ jsx("span", {
446
452
  className: "seams-field-label",
447
- children: "Email address"
453
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Email address" })
448
454
  }), /* @__PURE__ */ jsx("input", {
449
455
  type: "email",
450
456
  name: "seams-device-link-target-email",
@@ -456,14 +462,14 @@ function FactorSelection({ targetFactor, targetEmail, onChange, onEmailAddressCh
456
462
  }) : null,
457
463
  /* @__PURE__ */ jsx("p", {
458
464
  className: "seams-otp-helper",
459
- children: emailTargetSelected ? "The address is normalized before the QR code is created." : "Device 2 will create a new passkey for this wallet."
465
+ children: emailTargetSelected ? /* @__PURE__ */ jsx(WalletText, { message: "The address is normalized before the QR code is created." }) : /* @__PURE__ */ jsx(WalletText, { message: "Device 2 will create a new passkey for this wallet." })
460
466
  }),
461
467
  /* @__PURE__ */ jsx("button", {
462
468
  type: "button",
463
469
  className: "seams-link-device-btn",
464
470
  onClick: onStart,
465
471
  disabled: !canStart,
466
- children: "Continue"
472
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Continue" })
467
473
  })
468
474
  ]
469
475
  })
@@ -498,18 +504,18 @@ function QrDisplay({ state }) {
498
504
  className: "qr-header",
499
505
  children: /* @__PURE__ */ jsx("h2", {
500
506
  className: "qr-title",
501
- children: "Scan and Link Device"
507
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Scan and Link Device" })
502
508
  })
503
509
  }),
504
510
  /* @__PURE__ */ jsx("div", {
505
511
  className: "qr-instruction",
506
- children: ready ? "Scan to backup your other device." : "Preparing a one-time code for your other device."
512
+ children: ready ? /* @__PURE__ */ jsx(WalletText, { message: "Scan to backup your other device." }) : /* @__PURE__ */ jsx(WalletText, { message: "Preparing a one-time code for your other device." })
507
513
  }),
508
514
  /* @__PURE__ */ jsxs("div", {
509
515
  className: "qr-status",
510
516
  role: "status",
511
517
  "aria-live": "polite",
512
- children: [ready ? state.lastMessage || "Waiting for device to scan" : "Generating QR code", /* @__PURE__ */ jsx("span", { className: "animated-ellipsis" })]
518
+ children: [ready ? state.lastMessage || "Waiting for device to scan" : /* @__PURE__ */ jsx(WalletText, { message: "Generating QR code" }), /* @__PURE__ */ jsx("span", { className: "animated-ellipsis" })]
513
519
  })
514
520
  ]
515
521
  })
@@ -531,10 +537,10 @@ function PasskeyActivation({ isCreating, onCreate }) {
531
537
  children: [/* @__PURE__ */ jsx("h2", {
532
538
  id: "seams-device-link-passkey-title",
533
539
  className: "seams-otp-title",
534
- children: "Create a passkey"
540
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Create a passkey" })
535
541
  }), /* @__PURE__ */ jsx("p", {
536
542
  className: "seams-otp-description",
537
- children: "Confirm on this device to finish linking it to your wallet."
543
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Confirm on this device to finish linking it to your wallet." })
538
544
  })]
539
545
  }), /* @__PURE__ */ jsx("button", {
540
546
  type: "button",
@@ -542,13 +548,14 @@ function PasskeyActivation({ isCreating, onCreate }) {
542
548
  onClick: onCreate,
543
549
  disabled: isCreating,
544
550
  "aria-busy": isCreating,
545
- children: isCreating ? "Creating passkey…" : "Create passkey"
551
+ children: isCreating ? /* @__PURE__ */ jsx(WalletText, { message: "Creating passkey…" }) : /* @__PURE__ */ jsx(WalletText, { message: "Create passkey" })
546
552
  })]
547
553
  })
548
554
  })
549
555
  });
550
556
  }
551
557
  function EmailOtpActivation({ activation, onError }) {
558
+ const locale = useWalletLocale();
552
559
  const inputRef = useRef(null);
553
560
  const [isSubmitting, setIsSubmitting] = useState(false);
554
561
  const [isResending, setIsResending] = useState(false);
@@ -631,13 +638,14 @@ function EmailOtpActivation({ activation, onError }) {
631
638
  children: [/* @__PURE__ */ jsx("h2", {
632
639
  id: "seams-device-link-email-title",
633
640
  className: "seams-otp-title",
634
- children: "Confirm with an email code"
641
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Confirm with an email code" })
635
642
  }), state.kind !== "unavailable" && /* @__PURE__ */ jsxs("p", {
636
643
  className: "seams-otp-description",
637
644
  children: [
638
- "Use the code sent to ",
645
+ /* @__PURE__ */ jsx(WalletText, { message: "Use the code sent to" }),
646
+ " ",
639
647
  /* @__PURE__ */ jsx("strong", { children: state.maskedEmailHint }),
640
- ". The destination is managed by your wallet and cannot be changed here."
648
+ /* @__PURE__ */ jsx(WalletText, { message: ". The destination is managed by your wallet and cannot be changed here." })
641
649
  ]
642
650
  })]
643
651
  }),
@@ -645,19 +653,19 @@ function EmailOtpActivation({ activation, onError }) {
645
653
  className: "qr-status",
646
654
  role: "status",
647
655
  "aria-live": "polite",
648
- children: "Sending your email code…"
656
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Sending your email code…" })
649
657
  }),
650
658
  state.kind === "resending" && /* @__PURE__ */ jsx("div", {
651
659
  className: "qr-status",
652
660
  role: "status",
653
661
  "aria-live": "polite",
654
- children: "Sending a new email code…"
662
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Sending a new email code…" })
655
663
  }),
656
664
  state.kind === "completed" && /* @__PURE__ */ jsx("div", {
657
665
  className: "qr-status",
658
666
  role: "status",
659
667
  "aria-live": "polite",
660
- children: "Email code accepted. Finishing device activation…"
668
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Email code accepted. Finishing device activation…" })
661
669
  }),
662
670
  (state.kind === "code_input" || state.kind === "submitting" || state.kind === "incorrect") && /* @__PURE__ */ jsxs("form", {
663
671
  className: "seams-otp-code-field",
@@ -666,7 +674,7 @@ function EmailOtpActivation({ activation, onError }) {
666
674
  /* @__PURE__ */ jsx("label", {
667
675
  className: "seams-field-label",
668
676
  htmlFor: "seams-device-link-email-otp",
669
- children: "Email code"
677
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Email code" })
670
678
  }),
671
679
  /* @__PURE__ */ jsx("input", {
672
680
  ref: inputRef,
@@ -677,7 +685,7 @@ function EmailOtpActivation({ activation, onError }) {
677
685
  autoComplete: "one-time-code",
678
686
  pattern: "[0-9]{6}",
679
687
  maxLength: 6,
680
- "aria-label": "Email verification code",
688
+ "aria-label": walletText(locale, "Email verification code"),
681
689
  "aria-invalid": state.kind === "incorrect",
682
690
  "aria-describedby": state.kind === "incorrect" ? "seams-device-link-email-error" : void 0,
683
691
  value: otpCode,
@@ -693,33 +701,33 @@ function EmailOtpActivation({ activation, onError }) {
693
701
  id: "seams-device-link-email-error",
694
702
  className: "seams-otp-error",
695
703
  role: "alert",
696
- children: state.message
704
+ children: /* @__PURE__ */ jsx(WalletText, { copy: state.message })
697
705
  }),
698
706
  /* @__PURE__ */ jsx("button", {
699
707
  type: "submit",
700
708
  className: "seams-link-device-btn",
701
709
  disabled: state.kind === "submitting" || isSubmitting,
702
710
  "aria-busy": state.kind === "submitting" || isSubmitting,
703
- children: state.kind === "submitting" || isSubmitting ? "Checking code…" : "Confirm code"
711
+ children: state.kind === "submitting" || isSubmitting ? /* @__PURE__ */ jsx(WalletText, { message: "Checking code…" }) : /* @__PURE__ */ jsx(WalletText, { message: "Confirm code" })
704
712
  })
705
713
  ]
706
714
  }),
707
715
  state.kind === "expired" && /* @__PURE__ */ jsx("p", {
708
716
  className: "seams-otp-error",
709
717
  role: "alert",
710
- children: state.message
718
+ children: /* @__PURE__ */ jsx(WalletText, { copy: state.message })
711
719
  }),
712
720
  state.kind === "unavailable" && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("p", {
713
721
  className: "seams-otp-error",
714
722
  role: "alert",
715
- children: state.message
723
+ children: /* @__PURE__ */ jsx(WalletText, { copy: state.message })
716
724
  }), /* @__PURE__ */ jsx("button", {
717
725
  type: "button",
718
726
  className: "seams-link-device-btn",
719
727
  onClick: handleRetry,
720
728
  disabled: isSending,
721
729
  "aria-busy": isSending,
722
- children: isSending ? "Trying again…" : "Send code again"
730
+ children: isSending ? /* @__PURE__ */ jsx(WalletText, { message: "Trying again…" }) : /* @__PURE__ */ jsx(WalletText, { message: "Send code again" })
723
731
  })] }),
724
732
  (state.kind === "code_input" || state.kind === "incorrect" || state.kind === "expired") && /* @__PURE__ */ jsx("button", {
725
733
  type: "button",
@@ -727,7 +735,7 @@ function EmailOtpActivation({ activation, onError }) {
727
735
  onClick: handleResend,
728
736
  disabled: isResending,
729
737
  "aria-busy": isResending,
730
- children: isResending ? "Sending…" : "Resend code"
738
+ children: isResending ? /* @__PURE__ */ jsx(WalletText, { message: "Sending…" }) : /* @__PURE__ */ jsx(WalletText, { message: "Resend code" })
731
739
  })
732
740
  ]
733
741
  })
@@ -745,18 +753,18 @@ function FailureView({ message, onChooseAnother }) {
745
753
  }),
746
754
  /* @__PURE__ */ jsx("h2", {
747
755
  className: "qr-title",
748
- children: "Couldn't link device"
756
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Couldn't link device" })
749
757
  }),
750
758
  /* @__PURE__ */ jsx("p", {
751
759
  className: "seams-link-device-failure-detail",
752
760
  role: "alert",
753
- children: message || "Device linking failed"
761
+ children: /* @__PURE__ */ jsx(WalletText, { copy: message || "Device linking failed" })
754
762
  }),
755
763
  /* @__PURE__ */ jsx("button", {
756
764
  type: "button",
757
765
  className: "seams-link-device-btn",
758
766
  onClick: onChooseAnother,
759
- children: "Choose another factor"
767
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Choose another factor" })
760
768
  })
761
769
  ]
762
770
  });
@@ -1,3 +1,4 @@
1
+ import { useWalletLocale } from "../../context/WalletLocale.js";
1
2
  import { DARK_TOKENS, LIGHT_TOKENS } from "./design-tokens.js";
2
3
  import { createCSSVariables, mergeTokens } from "./utils.js";
3
4
  import React from "react";
@@ -34,9 +35,11 @@ function useTheme() {
34
35
  }
35
36
  const ThemeScope = ({ tag = "main", className, style, dataAttr = "data-seams-theme", children }) => {
36
37
  const { theme, vars } = useThemeContext();
38
+ const locale = useWalletLocale();
37
39
  const Comp = tag;
38
40
  const attrs = { [dataAttr]: theme };
39
41
  return /* @__PURE__ */ jsx(Comp, {
42
+ lang: locale,
40
43
  className,
41
44
  style: {
42
45
  ...vars,
@@ -0,0 +1,15 @@
1
+ import { walletDisplayText, walletText } from "../../core/ui/messages.js";
2
+ import React, { useContext } from "react";
3
+ //#region src/react/context/WalletLocale.tsx
4
+ const WalletLocaleContext = React.createContext("en");
5
+ function useWalletLocale() {
6
+ return useContext(WalletLocaleContext);
7
+ }
8
+ function WalletText(props) {
9
+ const locale = useWalletLocale();
10
+ return props.message === void 0 ? walletDisplayText(locale, props.copy) : walletText(locale, props.message, props.values);
11
+ }
12
+ //#endregion
13
+ export { WalletLocaleContext, WalletText, useWalletLocale };
14
+
15
+ //# sourceMappingURL=WalletLocale.js.map
@@ -1,4 +1,6 @@
1
+ import { normalizeWalletLocale } from "../../core/ui/locale.js";
1
2
  import { buildNoCurrentWalletAuthMethod } from "../../shared-ts/src/utils/walletCapabilityBindings.js";
3
+ import { WalletLocaleContext } from "./WalletLocale.js";
2
4
  import { useNearClient } from "../hooks/useNearClient.js";
3
5
  import { useAccountInput } from "../hooks/useAccountInput.js";
4
6
  import { useLoginStateRefresher } from "./useLoginStateRefresher.js";
@@ -106,9 +108,12 @@ const SeamsContextProvider = ({ children, config, theme }) => {
106
108
  refreshAccountData,
107
109
  hostSetTheme: theme?.setTheme
108
110
  });
109
- return /* @__PURE__ */ jsx(SeamsContext.Provider, {
110
- value,
111
- children
111
+ return /* @__PURE__ */ jsx(WalletLocaleContext.Provider, {
112
+ value: normalizeWalletLocale(config.appearance?.locale),
113
+ children: /* @__PURE__ */ jsx(SeamsContext.Provider, {
114
+ value,
115
+ children
116
+ })
112
117
  });
113
118
  };
114
119
  /** Authentication, lifecycle state, and the current wallet's bound signers. */
@@ -104,6 +104,26 @@
104
104
  height: 100%;
105
105
  }
106
106
 
107
+ /* A phone-width menu left the description beside the label only a few
108
+ characters, so it moves to a line of its own under the label. */
109
+ @media (max-width: 480px) {
110
+ .seams-account-screen .seams-export-keys-row {
111
+ flex-wrap: wrap;
112
+ row-gap: 2px;
113
+ }
114
+
115
+ .seams-account-screen .seams-export-keys-row-spinner {
116
+ margin-left: auto;
117
+ }
118
+
119
+ .seams-account-screen .seams-export-keys-row-description {
120
+ flex-basis: 100%;
121
+ order: 1;
122
+ white-space: normal;
123
+ text-align: left;
124
+ }
125
+ }
126
+
107
127
  /* MenuItem Component Styles */
108
128
 
109
129
  .seams-dropdown-menu-item {
@@ -626,6 +646,7 @@
626
646
  padding: 4px 12px 4px 4px;
627
647
  border-radius: 6px;
628
648
  width: fit-content;
649
+ cursor: pointer;
629
650
  }
630
651
 
631
652
  .seams-user-account-button-trigger .hide-username {
@@ -805,6 +826,14 @@
805
826
  .seams-profile-button-morphable.open {
806
827
  width: 420px;
807
828
  overflow: hidden;
829
+ /* The panel replaces the Settings button; a short fade keeps that from
830
+ reading as a cut. */
831
+ animation: seams-account-panel-in 100ms ease-out both;
832
+ }
833
+ @keyframes seams-account-panel-in {
834
+ from {
835
+ opacity: 0;
836
+ }
808
837
  }
809
838
  .seams-account-resize {
810
839
  overflow: hidden;
@@ -1143,6 +1172,9 @@
1143
1172
  overflow: hidden;
1144
1173
  }
1145
1174
  .seams-account-screen .qr-scanner-video {
1175
+ /* The base video is a fixed 400px; the menu's box is narrower, which cut the
1176
+ camera off on the right and moved it from under the scan frame. */
1177
+ width: 100%;
1146
1178
  height: 208px;
1147
1179
  object-fit: cover;
1148
1180
  }
@@ -1199,6 +1231,10 @@
1199
1231
  .seams-account-method-list-item {
1200
1232
  list-style: none;
1201
1233
  }
1234
+ /* Separators go between rows only; the footer rule closes the screen. */
1235
+ .seams-account-method-list-item:last-child > .seams-account-method-button {
1236
+ border-bottom: 0;
1237
+ }
1202
1238
  .seams-account-screen ul {
1203
1239
  padding-left: 0;
1204
1240
  }
@@ -0,0 +1 @@
1
+ import{a as e,d as t,f as n,l as r,o as i,p as a,u as o}from"./appearance-token-vars-DxBm_cKA.js";async function s(e,t,n){if(!e.isConnected||n?.aborted)return!1;let r=e.ownerDocument,i=r.defaultView?.navigator.clipboard;if(i?.writeText)try{return await i.writeText(t),!0}catch{}if(!e.isConnected||n?.aborted)return!1;let a=r.createElement(`textarea`);a.value=t,a.readOnly=!0,a.className=`seams-offscreen`,e.appendChild(a),a.select();try{return r.execCommand(`copy`)}finally{a.remove()}}function c(){return r(`span`,{class:`copy-icon`,"aria-hidden":`true`,children:[r(`span`,{class:`copy-icon-check`,children:r(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,children:r(`path`,{d:`M20 6 9 17l-5-5`})})}),r(`span`,{class:`copy-icon-copy`,children:r(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,children:[r(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),r(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})})]})}let l=0;function u(e){return r(d,{...e},e.context)}var d=class extends n{static contextType=e;dialog=a();hosted=a();containerId=`seams-confirmation-modal-${++l}`;componentDidMount(){this.props.context===`standalone`?this.dialog.current?.showModal():this.hosted.current?.focus({preventScroll:!0})}componentWillUnmount(){this.dialog.current?.close()}cancel=e=>{e.preventDefault(),e.stopPropagation(),this.props.onCancel()};backdropClick=e=>{let t=this.dialog.current;if(!t||e.target!==t)return;let n=t.getBoundingClientRect();(e.clientX<n.left||e.clientX>n.right||e.clientY<n.top||e.clientY>n.bottom)&&this.cancel(e)};hostedKeyDown=e=>{!e.defaultPrevented&&e.key===`Escape`&&this.cancel(e)};render(){return this.props.context===`standalone`?r(`dialog`,{ref:this.dialog,class:`seams-confirmation-modal`,"aria-label":o(this.context,this.props.label),onCancel:this.cancel,onClick:this.backdropClick,children:r(`div`,{id:this.containerId,class:`modal-container-root`,tabIndex:-1,children:this.props.children})}):r(`div`,{ref:this.hosted,class:`seams-confirmation-modal seams-confirmation-modal--hosted`,tabIndex:-1,onKeyDown:this.hostedKeyDown,children:r(`div`,{id:this.containerId,class:`modal-container-root`,children:this.props.children})})}};function f(e){let t=e.startTranslatePx+e.deltaPx;if(t>=e.restTranslatePx)return t;let n=Math.max(e.sheetHeightPx*.5,e.viewportHeightPx*.5,e.minimumOverpullPx),r=e.restTranslatePx-t;return e.restTranslatePx-n*(1-1/(r/n+1))}function p(e){let t=e.totalDeltaPx/Math.max(1,e.durationMs);return Math.min(e.velocityPxPerMs,t)<=-.6||Math.max(e.velocityPxPerMs,t)>=.7||e.translatePx>=e.sheetHeightPx-50}let m=0;function h(e){return r(g,{...e},e.context)}var g=class extends n{static contextType=e;state={settled:!1};id=`seams-confirmation-drawer-${++m}`;dialog=a();sheet=a();body=a();content=a();observer=null;frame=null;closeTimer=null;gesture={kind:`idle`};lifetime=`active`;closeReported=!1;suppressPointerClick=!1;componentDidMount(){let e=this.sheet.current,t=e.ownerDocument.defaultView;this.dialog.current?.showModal(),this.dialog.current||e.focus({preventScroll:!0}),this.observer=new ResizeObserver(this.measureContent),this.observer.observe(this.content.current),this.observer.observe(e),t.addEventListener(`resize`,this.scheduleMeasure),t.visualViewport?.addEventListener(`resize`,this.scheduleMeasure),this.measure(),this.frame=t.requestAnimationFrame(this.openAfterLayout),this.props.state.kind===`closing`&&this.startClose()}openAfterLayout=()=>{this.frame=null,this.setState({settled:!0})};componentDidUpdate(e){e.styles!==this.props.styles&&(e.styles.deleteDynamicRule(this.id),e.styles.deleteDynamicRule(`${this.id}-drag`),this.resetGesture(),this.measure()),e.state.kind!==this.props.state.kind&&(this.props.state.kind===`closing`?this.startClose():(this.clearCloseTimer(),this.closeReported=!1)),this.props.state.kind===`open`&&this.props.state.interaction===`busy`&&this.resetGesture()}componentWillUnmount(){this.lifetime=`disposed`,this.resetGesture();let e=this.sheet.current.ownerDocument.defaultView;this.frame!==null&&e.cancelAnimationFrame(this.frame),this.clearCloseTimer(),this.observer?.disconnect(),e.removeEventListener(`resize`,this.scheduleMeasure),e.visualViewport?.removeEventListener(`resize`,this.scheduleMeasure),this.props.styles.deleteDynamicRule(this.id),this.dialog.current?.close()}scheduleMeasure=()=>{this.lifetime===`disposed`||this.frame!==null||(this.frame=this.sheet.current.ownerDocument.defaultView.requestAnimationFrame(this.measureFrame))};measureFrame=()=>{this.frame=null,this.measure()};measureContent=()=>{this.lifetime===`active`&&this.measure()};measure(){if(this.gesture.kind!==`idle`)return;let e=this.sheet.current,t=this.content.current,n=Math.round(t.getBoundingClientRect().bottom-e.getBoundingClientRect().top),r=this.props.context===`standalone`?Math.max(0,e.offsetHeight-n):0;this.props.styles.setDynamicDeclarations(this.id,`#${this.id}`,{"--seams-drawer-rest":`${r}px`})}startClose(){this.resetGesture(),this.clearCloseTimer();let e=this.sheet.current.ownerDocument.defaultView,t=e.matchMedia(`(prefers-reduced-motion: reduce)`).matches?0:150;this.closeTimer=e.setTimeout(this.reportClosed,t)}clearCloseTimer(){this.closeTimer!==null&&(this.sheet.current.ownerDocument.defaultView.clearTimeout(this.closeTimer),this.closeTimer=null)}reportClosed=()=>{this.clearCloseTimer(),!(this.lifetime===`disposed`||this.closeReported||this.props.state.kind!==`closing`)&&(this.closeReported=!0,this.props.state.onClosed())};transitionEnd=e=>{e.target===this.sheet.current&&e.propertyName===`transform`&&this.reportClosed()};cancel=e=>{e.preventDefault(),e.stopPropagation(),this.props.state.kind===`open`&&this.props.onCancel()};backdropClick=e=>{this.props.dismissOnBackdrop!==!1&&e.target===this.dialog.current&&this.canDrag()&&this.cancel(e)};keyDown=e=>{!e.defaultPrevented&&e.key===`Escape`&&this.cancel(e)};canDrag(){return this.props.state.kind===`open`&&this.props.state.interaction===`ready`}pointerDown=e=>{if(this.clearClickSuppression(),!this.canDrag()||this.gesture.kind!==`idle`||!e.isPrimary||e.button!==0)return;let t=e.target;if(t instanceof Element&&t.closest(`a, input, textarea, select, summary, button:not(.seams-drawer-handle), [data-seams-drawer-no-drag]`))return;this.gesture={kind:`pending`,pointerId:e.pointerId,startY:e.clientY};let n=this.sheet.current.ownerDocument;n.addEventListener(`pointermove`,this.pointerMove,{passive:!1}),n.addEventListener(`pointerup`,this.pointerUp),n.addEventListener(`pointercancel`,this.pointerCancel)};pointerMove=e=>{let t=this.gesture;if(t.kind===`idle`||t.pointerId!==e.pointerId)return;let n=this.sheet.current;if(t.kind===`pending`){if(Math.abs(e.clientY-t.startY)<8||this.body.current.scrollTop>0)return;let r=n.ownerDocument.defaultView,i=new DOMMatrixReadOnly(r.getComputedStyle(n).transform).m42;t={kind:`dragging`,pointerId:t.pointerId,startY:t.startY,lastY:t.startY,startedAt:e.timeStamp,lastTime:e.timeStamp,velocity:0,rest:i,translate:i,height:n.offsetHeight},this.gesture=t,n.setPointerCapture(e.pointerId),n.classList.add(`is-dragging`)}let r=e.timeStamp-t.lastTime;r>0&&(t.velocity=(e.clientY-t.lastY)/r),t.lastY=e.clientY,t.lastTime=e.timeStamp,t.translate=f({startTranslatePx:t.rest,deltaPx:e.clientY-t.startY,restTranslatePx:t.rest,sheetHeightPx:t.height,viewportHeightPx:n.ownerDocument.defaultView.innerHeight,minimumOverpullPx:160}),this.props.styles.setDynamicDeclarations(`${this.id}-drag`,`#${this.id}`,{"--seams-drawer-drag":`${t.translate}px`}),e.preventDefault()};pointerUp=e=>{let t=this.gesture;if(t.kind===`idle`||t.pointerId!==e.pointerId)return;let n=t.kind===`dragging`&&p({velocityPxPerMs:t.velocity,totalDeltaPx:t.lastY-t.startY,durationMs:e.timeStamp-t.startedAt,translatePx:t.translate,sheetHeightPx:t.height});t.kind===`dragging`&&(this.suppressPointerClick=!0,e.preventDefault()),this.resetGesture(),n&&this.props.state.kind===`open`&&this.props.onCancel()};pointerCancel=e=>{this.gesture.kind!==`idle`&&this.gesture.pointerId===e.pointerId&&(this.gesture.kind===`dragging`&&(this.suppressPointerClick=!0),this.resetGesture())};clearClickSuppression=()=>{this.suppressPointerClick=!1};suppressDragClick=e=>{!this.suppressPointerClick||e.detail===0||(this.suppressPointerClick=!1,e.preventDefault(),e.stopPropagation())};resetGesture(){let e=this.sheet.current,t=this.gesture;this.gesture={kind:`idle`},t.kind!==`idle`&&e.hasPointerCapture(t.pointerId)&&e.releasePointerCapture(t.pointerId),e.classList.remove(`is-dragging`);let n=e.ownerDocument;n.removeEventListener(`pointermove`,this.pointerMove),n.removeEventListener(`pointerup`,this.pointerUp),n.removeEventListener(`pointercancel`,this.pointerCancel),this.props.styles.deleteDynamicRule(`${this.id}-drag`),this.lifetime===`active`&&this.scheduleMeasure()}render(){let e=this.state.settled&&this.props.state.kind===`open`,n=[`seams-confirmation-drawer`];e&&n.push(`is-open`),this.gesture.kind===`dragging`&&n.push(`is-dragging`);let a=r(`section`,{ref:this.sheet,id:this.id,class:n.join(` `),"data-context":this.props.context,tabIndex:-1,onPointerDownCapture:this.pointerDown,onClickCapture:this.suppressDragClick,onLostPointerCapture:this.pointerCancel,onTransitionEnd:this.transitionEnd,onKeyDown:this.keyDown,children:[r(`div`,{class:`seams-drawer-controls`,children:[this.props.origin&&r(`div`,{class:`seams-drawer-origin`,children:this.props.origin}),r(`button`,{type:`button`,class:`seams-drawer-handle`,"aria-label":t(this.context,`Dismiss confirmation`),disabled:!this.canDrag(),onClick:this.cancel,children:r(`span`,{})}),r(`button`,{type:`button`,class:`seams-drawer-close`,"aria-label":t(this.context,`Close`),disabled:!this.canDrag(),onClick:this.cancel,children:`×`})]}),r(`div`,{class:`seams-drawer-body`,ref:this.body,children:[this.props.errorMessage&&r(`div`,{class:`error`,children:r(i,{copy:this.props.errorMessage})}),r(`div`,{class:`seams-drawer-content`,ref:this.content,children:this.props.children})]})]});return this.props.context===`wallet-iframe`?a:r(`dialog`,{class:`seams-drawer-dialog`,ref:this.dialog,"aria-label":o(this.context,this.props.label),onCancel:this.cancel,onClick:this.backdropClick,onClickCapture:this.suppressDragClick,onPointerDownCapture:this.clearClickSuppression,children:a})}};export{s as i,u as n,c as r,h as t};