@seams/wallet 0.26.0 → 0.28.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 (384) hide show
  1. package/dist/.build-inputs.sha256 +1 -1
  2. package/dist/esm/SeamsWeb/publicApi/near.js +22 -11
  3. package/dist/esm/SeamsWeb/walletIframe/client/nearCommands.js +9 -10
  4. package/dist/esm/SeamsWeb/walletIframe/client/router.js +95 -38
  5. package/dist/esm/SeamsWeb/walletIframe/client/sessionCommands.js +16 -0
  6. package/dist/esm/SeamsWeb/walletIframe/host/surface-measurement-reporter.js +1 -0
  7. package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.js +1 -1
  8. package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.js +28 -0
  9. package/dist/esm/SeamsWeb/walletIframe/host/walletMutationGuard.js +1 -0
  10. package/dist/esm/SeamsWeb/walletIframe/shared/exactSessionState.js +27 -4
  11. package/dist/esm/SeamsWeb/walletIframe/shared/messages.js +7 -1
  12. package/dist/esm/core/authMethods/plugins.js +8 -2
  13. package/dist/esm/core/rpcClients/near/NearClient.js +7 -0
  14. package/dist/esm/core/signingEngine/flows/signNear/signTransactions.js +3 -0
  15. package/dist/esm/core/signingEngine/nearTransactionSubmission.js +89 -0
  16. package/dist/esm/core/signingEngine/uiConfirm/ui/confirm-surface-resize.js +2 -2
  17. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ReviewDisclosure.js +7 -1
  18. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountConfirmationSurface.js +123 -14
  19. package/dist/esm/core/ui/messages.js +17 -0
  20. package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonView.js +35 -22
  21. package/dist/esm/react/components/AccountMenuButton/AccountSettingsDialog.js +157 -0
  22. package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodsModal.js +13 -1
  23. package/dist/esm/react/components/AccountMenuButton/ExternalWalletSettings.js +46 -0
  24. package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.js +14 -2
  25. package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.js +1 -1
  26. package/dist/esm/react/components/AccountMenuButton/Web3AuthProfileButton.css +154 -5
  27. package/dist/esm/react/components/AccountMenuButton/icons/HoverArrowIcon.css +27 -3
  28. package/dist/esm/react/components/AccountMenuButton/icons/HoverArrowIcon.js +2 -2
  29. package/dist/esm/react/components/AccountMenuButton/index.js +7 -3
  30. package/dist/esm/react/components/ExternalNearWalletIcon.js +32 -0
  31. package/dist/esm/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.css +182 -0
  32. package/dist/esm/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.js +315 -0
  33. package/dist/esm/react/components/HostedSeamsAuthMenu/shell.js +13 -4
  34. package/dist/esm/react/components/externalWalletBrandImages.js +7 -0
  35. package/dist/esm/react/context/reactLoginStateBuilders.js +20 -0
  36. package/dist/esm/react/externalNear.js +2 -6
  37. package/dist/esm/react/index.js +2 -1
  38. package/dist/esm/react/styles/styles.css +364 -8
  39. package/dist/esm/react/styles.css +1 -0
  40. package/dist/esm/react/transactionReview/boundCalls.js +31 -26
  41. package/dist/esm/sdk/{ConfirmationDrawer-BmzikAr4.js → ConfirmationDrawer-MJoE0AAo.js} +1 -1
  42. package/dist/{public/sdk/NonceCoordinator-CcD2FqXh.js → esm/sdk/NonceCoordinator-3YhmDTS5.js} +1 -1
  43. package/dist/{public/sdk/SeamsWordmark-DqiC9-sd.js → esm/sdk/SeamsWordmark-DwvPx2UA.js} +1 -1
  44. package/dist/esm/sdk/{accountLifecycle-gm9X8nGm.js → accountLifecycle-6DHYWf0v.js} +1 -1
  45. package/dist/esm/sdk/{adapters-e7twFGov.js → adapters-C-g_hkkZ.js} +1 -1
  46. package/dist/esm/sdk/appearance-token-vars-01eH9pgA.js +1 -0
  47. package/dist/{public/sdk/clientSessionPersistenceState-YvVHKRoe.js → esm/sdk/clientSessionPersistenceState-BCkJAYSz.js} +1 -1
  48. package/dist/esm/sdk/{collectAuthenticationCredentialForChallengeB64u-DEtxiKND.js → collectAuthenticationCredentialForChallengeB64u-I4wq8OGq.js} +1 -1
  49. package/dist/esm/sdk/{commitQueue-CHJ7MHSI.js → commitQueue-CYruPlkm.js} +1 -1
  50. package/dist/esm/sdk/configBuilder-DpChXfDO.js +1 -0
  51. package/dist/esm/sdk/{configuration-DBEc3bsj.js → configuration-BAad7ngq.js} +1 -1
  52. package/dist/esm/sdk/confirm-ui-em0vkd2m.js +2 -0
  53. package/dist/esm/sdk/{device-linking-BsUTtSF7.js → device-linking-DiCNt3iA.js} +1 -1
  54. package/dist/esm/sdk/{deviceLinkApproval-DAZTjrud.js → deviceLinkApproval-x3WkiYrd.js} +1 -1
  55. package/dist/esm/sdk/{display-BYzolrBs.js → display-D0EPmU4w.js} +1 -1
  56. package/dist/{public/sdk/ecdsaCapabilityManifest-CXVq8Qzb.js → esm/sdk/ecdsaCapabilityManifest-DAJEVjlP.js} +1 -1
  57. package/dist/esm/sdk/{ecdsaDerivationClientWasm-CVahDxLy.js → ecdsaDerivationClientWasm-AYOJgTJm.js} +1 -1
  58. package/dist/{public/sdk/ecdsaDerivationExport-CkmSe0ao.js → esm/sdk/ecdsaDerivationExport-DJKOzDbS.js} +1 -1
  59. package/dist/esm/sdk/{ecdsaWalletRecords-zRvHKRTe.js → ecdsaWalletRecords-WLyq414E.js} +1 -1
  60. package/dist/esm/sdk/{emailOtpEcdsaDerivationIdentity-0DIuRNRi.js → emailOtpEcdsaDerivationIdentity-HFQXc1Yw.js} +1 -1
  61. package/dist/esm/sdk/{enrichDisplayModelWithAbi-CLn37drs.js → enrichDisplayModelWithAbi-O6Mw4i2E.js} +1 -1
  62. package/dist/esm/sdk/errors-BJBDbwHk.js +1 -0
  63. package/dist/esm/sdk/{evmCryptoWasm-B_p82tx9.js → evmCryptoWasm-BUPb4hBH.js} +1 -1
  64. package/dist/esm/sdk/{export-viewer-host-3fosWJXJ.js → export-viewer-host-BSTfHhau.js} +1 -1
  65. package/dist/esm/sdk/{exportKeypairOperation-pKQW5J7m.js → exportKeypairOperation-CjST_NUK.js} +1 -1
  66. package/dist/esm/sdk/host-C51z-AxP.js +1 -0
  67. package/dist/{public/sdk/icons-DDRXJ2W1.js → esm/sdk/icons-BlMXolHv.js} +1 -1
  68. package/dist/esm/sdk/{indexedDB-CWFDCCbP.js → indexedDB-C4SDsyOG.js} +1 -1
  69. package/dist/esm/sdk/{intentDigest-B6EshTea.js → intentDigest-HvRsBQ1z.js} +1 -1
  70. package/dist/esm/sdk/{lanes-C2sAP08w.js → lanes-BU-fGqY4.js} +1 -1
  71. package/dist/esm/sdk/{localOnly-Jw9v9GU9.js → localOnly-Xs89Xajm.js} +1 -1
  72. package/dist/{public/sdk/mountExportPrivateKeySurface-B_052qyI.js → esm/sdk/mountExportPrivateKeySurface-CsUEKeum.js} +1 -1
  73. package/dist/esm/sdk/{mountRecoveryCodeBackupSurface-PutmFjf9.js → mountRecoveryCodeBackupSurface-kFLo5zLk.js} +1 -1
  74. package/dist/esm/sdk/{nearEd25519YaoMaterialActivation-C2QNLImD.js → nearEd25519YaoMaterialActivation-BfXmy3Jr.js} +1 -1
  75. package/dist/{public/sdk/nearEd25519YaoSigningPreparation-K6n4Sq8_.js → esm/sdk/nearEd25519YaoSigningPreparation-DHNk0F8e.js} +1 -1
  76. package/dist/esm/sdk/nearRpcResults-CeHdqaS4.js +1 -0
  77. package/dist/esm/sdk/{nonceLaneKeys-CZjeiii7.js → nonceLaneKeys-BF_UpvIy.js} +1 -1
  78. package/dist/esm/sdk/{normalization-DA6o5MsH.js → normalization-Df9fZWJC.js} +1 -1
  79. package/dist/{public/sdk/pendingWalletRecoveryCodeBackup-B-n7vmBS.js → esm/sdk/pendingWalletRecoveryCodeBackup-B-R_U34I.js} +1 -1
  80. package/dist/esm/sdk/{presignaturePool-DjTaB0nx.js → presignaturePool-BbvqRWYw.js} +1 -1
  81. package/dist/esm/sdk/{recovery-entrypoint-9e3SXU3t.js → recovery-entrypoint-DJbMDC_m.js} +1 -1
  82. package/dist/esm/sdk/{registration-C988Nwzn.js → registration-Byl4l4yZ.js} +1 -1
  83. package/dist/esm/sdk/{registration-D4AijOa8.js → registration-C2fb9kRQ.js} +1 -1
  84. package/dist/esm/sdk/{registrationAccounts-DI_vcT7G.js → registrationAccounts-4r74gX1l.js} +1 -1
  85. package/dist/esm/sdk/registrationIntent-Do1tD1V7.js +1 -0
  86. package/dist/esm/sdk/{registrationSignerPlan-_8gsSjC0.js → registrationSignerPlan-DK2b3N_p.js} +1 -1
  87. package/dist/{public/sdk/requireStepUpAuth-DC9LSyRI.js → esm/sdk/requireStepUpAuth-COqCGb1i.js} +1 -1
  88. package/dist/esm/sdk/resealedEnvelopeResult-CLW00Vbw.js +1 -0
  89. package/dist/esm/sdk/{routerAbNormalSigning-Da-uxxle.js → routerAbNormalSigning-D-UZmCBS.js} +1 -1
  90. package/dist/esm/sdk/runtime-auth-ufbVur2p.js +1 -0
  91. package/dist/esm/sdk/{runtime-device-link-DtjR-htE.js → runtime-device-link-CagI2Q62.js} +1 -1
  92. package/dist/{public/sdk/runtime-ecdsa-tempo-BkUnzoX9.js → esm/sdk/runtime-ecdsa-tempo-Rctxr0yM.js} +1 -1
  93. package/dist/{public/sdk/runtime-email-otp-CaxfpqKI.js → esm/sdk/runtime-email-otp-BQtcG-LF.js} +1 -1
  94. package/dist/esm/sdk/{runtime-export-Du5ugbzi.js → runtime-export-wTeEaqlk.js} +1 -1
  95. package/dist/esm/sdk/runtime-near-59yU_3ud.js +1 -0
  96. package/dist/esm/sdk/runtime-preferences-B9qLHX8W.js +1 -0
  97. package/dist/esm/sdk/runtime-recovery-DNyzdMBj.js +1 -0
  98. package/dist/esm/sdk/{runtime-recovery-codes-DKjOU32G.js → runtime-recovery-codes-si1fGktB.js} +1 -1
  99. package/dist/esm/sdk/runtimeContext-ByeM6Z4Z.js +6 -0
  100. package/dist/{public/sdk/secp256k1--vF2pJgR.js → esm/sdk/secp256k1-CE7-q9Sn.js} +1 -1
  101. package/dist/esm/sdk/sessionObservationRevision-ihBwjS3y.js +1 -0
  102. package/dist/esm/sdk/{signEvmFamily-DeCQOBYN.js → signEvmFamily-BY5jlZEG.js} +1 -1
  103. package/dist/{public/sdk/signEvmFamilyWithUiConfirmForTempo-BIp-MeBV.js → esm/sdk/signEvmFamilyWithUiConfirmForTempo-CrMIAXUe.js} +1 -1
  104. package/dist/esm/sdk/{signEvmWithUiConfirm-BdLW7kqJ.js → signEvmWithUiConfirm-CGrLtMV6.js} +1 -1
  105. package/dist/esm/sdk/signNear-DMpJFkwF.js +1 -0
  106. package/dist/esm/sdk/{signatureUses-0z64Xpdj.js → signatureUses-kSrUHSSH.js} +1 -1
  107. package/dist/{public/sdk/signingFlow-C7fwkxPx.js → esm/sdk/signingFlow-BcetvUeS.js} +1 -1
  108. package/dist/{public/sdk/signingQueue-DvHGcaLc.js → esm/sdk/signingQueue-dMFOFOP5.js} +1 -1
  109. package/dist/esm/sdk/surface-measurement-reporter-DXsvq401.js +1 -0
  110. package/dist/esm/sdk/{thresholdEcdsa-CPVZNLEg.js → thresholdEcdsa-CqR1fFA-.js} +1 -1
  111. package/dist/esm/sdk/{trace-BQv7E-bO.js → trace--mRP2OQc.js} +1 -1
  112. package/dist/esm/sdk/{transaction-activity-olcDRay5.js → transaction-activity-DCzHGg3b.js} +1 -1
  113. package/dist/esm/sdk/{transactionReviewAdmission-DPxuDgkU.js → transactionReviewAdmission-Cf_qUZJt.js} +1 -1
  114. package/dist/esm/sdk/{transactionState-C8aYSDRA.js → transactionState-29T9xfvL.js} +1 -1
  115. package/dist/esm/sdk/tx-confirm-ui.js +181 -18
  116. package/dist/esm/sdk/{types-DOToeB6g.js → types-f7dyj5N6.js} +1 -1
  117. package/dist/esm/sdk/{unlockedEd25519ExportRootCapability-CFmunau5.js → unlockedEd25519ExportRootCapability-yzxQjIFd.js} +1 -1
  118. package/dist/esm/sdk/voiceid-host.js +1 -1
  119. package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
  120. package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
  121. package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
  122. package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
  123. package/dist/{public/sdk/wallet-recovery-jyfGoejZ.js → esm/sdk/wallet-recovery-BZB2Vu3X.js} +1 -1
  124. package/dist/esm/sdk/wallet-ui.css +1 -1
  125. package/dist/esm/sdk/{walletAuthMethodRecord-Bi78B6Ab.js → walletAuthMethodRecord-DLBB5fez.js} +1 -1
  126. package/dist/{public/sdk/walletAuthority-DGdC9Glh.js → esm/sdk/walletAuthority-BTGAuOi8.js} +1 -1
  127. package/dist/esm/sdk/{walletCapabilityBindings-BRdFdh3l.js → walletCapabilityBindings-D5YYB7nN.js} +1 -1
  128. package/dist/esm/sdk/{walletCustodyEcdsaContinuity-DdLNQs1M.js → walletCustodyEcdsaContinuity-C31YQ9av.js} +1 -1
  129. package/dist/{public/sdk/walletOwnershipGeneration-z9NXOk-b.js → esm/sdk/walletOwnershipGeneration-CgjCtPrV.js} +1 -1
  130. package/dist/{public/sdk/walletRecoveryAdminProof-hytB9fXI.js → esm/sdk/walletRecoveryAdminProof-B4Ic07jY.js} +1 -1
  131. package/dist/{public/sdk/walletRecoveryCommit-sr8-RYvn.js → esm/sdk/walletRecoveryCommit-Cc2LAkCS.js} +1 -1
  132. package/dist/{public/sdk/walletSessionAuthorizationStore-BEJyERPZ.js → esm/sdk/walletSessionAuthorizationStore-B9Vwkshr.js} +1 -1
  133. package/dist/esm/sdk/warmSessionHydration-B-A5Tdx7.js +1 -0
  134. package/dist/esm/sdk/{webauthnP256-DVlYEUsG.js → webauthnP256-BsQQPurm.js} +1 -1
  135. package/dist/esm/shared-ts/src/auth/externalAuth.js +53 -0
  136. package/dist/esm/shared-ts/src/near/nearClient.js +1 -1
  137. package/dist/esm/shared-ts/src/utils/errors.js +50 -2
  138. package/dist/esm/shared-ts/src/utils/index.js +1 -1
  139. package/dist/esm/voiceid-host.js +1 -1
  140. package/dist/public/headers.manifest.json +1 -1
  141. package/dist/public/sdk/{ConfirmationDrawer-BmzikAr4.js → ConfirmationDrawer-MJoE0AAo.js} +1 -1
  142. package/dist/{esm/sdk/NonceCoordinator-CcD2FqXh.js → public/sdk/NonceCoordinator-3YhmDTS5.js} +1 -1
  143. package/dist/{esm/sdk/SeamsWordmark-DqiC9-sd.js → public/sdk/SeamsWordmark-DwvPx2UA.js} +1 -1
  144. package/dist/public/sdk/{accountLifecycle-gm9X8nGm.js → accountLifecycle-6DHYWf0v.js} +1 -1
  145. package/dist/public/sdk/{adapters-e7twFGov.js → adapters-C-g_hkkZ.js} +1 -1
  146. package/dist/public/sdk/appearance-token-vars-01eH9pgA.js +1 -0
  147. package/dist/{esm/sdk/clientSessionPersistenceState-YvVHKRoe.js → public/sdk/clientSessionPersistenceState-BCkJAYSz.js} +1 -1
  148. package/dist/public/sdk/{collectAuthenticationCredentialForChallengeB64u-DEtxiKND.js → collectAuthenticationCredentialForChallengeB64u-I4wq8OGq.js} +1 -1
  149. package/dist/public/sdk/{commitQueue-CHJ7MHSI.js → commitQueue-CYruPlkm.js} +1 -1
  150. package/dist/public/sdk/configBuilder-DpChXfDO.js +1 -0
  151. package/dist/public/sdk/{configuration-DBEc3bsj.js → configuration-BAad7ngq.js} +1 -1
  152. package/dist/public/sdk/confirm-ui-em0vkd2m.js +2 -0
  153. package/dist/public/sdk/{device-linking-BsUTtSF7.js → device-linking-DiCNt3iA.js} +1 -1
  154. package/dist/public/sdk/{deviceLinkApproval-DAZTjrud.js → deviceLinkApproval-x3WkiYrd.js} +1 -1
  155. package/dist/public/sdk/{display-BYzolrBs.js → display-D0EPmU4w.js} +1 -1
  156. package/dist/{esm/sdk/ecdsaCapabilityManifest-CXVq8Qzb.js → public/sdk/ecdsaCapabilityManifest-DAJEVjlP.js} +1 -1
  157. package/dist/public/sdk/{ecdsaDerivationClientWasm-CVahDxLy.js → ecdsaDerivationClientWasm-AYOJgTJm.js} +1 -1
  158. package/dist/{esm/sdk/ecdsaDerivationExport-CkmSe0ao.js → public/sdk/ecdsaDerivationExport-DJKOzDbS.js} +1 -1
  159. package/dist/public/sdk/{ecdsaWalletRecords-zRvHKRTe.js → ecdsaWalletRecords-WLyq414E.js} +1 -1
  160. package/dist/public/sdk/{emailOtpEcdsaDerivationIdentity-0DIuRNRi.js → emailOtpEcdsaDerivationIdentity-HFQXc1Yw.js} +1 -1
  161. package/dist/public/sdk/{enrichDisplayModelWithAbi-CLn37drs.js → enrichDisplayModelWithAbi-O6Mw4i2E.js} +1 -1
  162. package/dist/public/sdk/errors-BJBDbwHk.js +1 -0
  163. package/dist/public/sdk/{evmCryptoWasm-B_p82tx9.js → evmCryptoWasm-BUPb4hBH.js} +1 -1
  164. package/dist/public/sdk/{export-viewer-host-3fosWJXJ.js → export-viewer-host-BSTfHhau.js} +1 -1
  165. package/dist/public/sdk/{exportKeypairOperation-pKQW5J7m.js → exportKeypairOperation-CjST_NUK.js} +1 -1
  166. package/dist/public/sdk/host-C51z-AxP.js +1 -0
  167. package/dist/{esm/sdk/icons-DDRXJ2W1.js → public/sdk/icons-BlMXolHv.js} +1 -1
  168. package/dist/public/sdk/{indexedDB-CWFDCCbP.js → indexedDB-C4SDsyOG.js} +1 -1
  169. package/dist/public/sdk/{intentDigest-B6EshTea.js → intentDigest-HvRsBQ1z.js} +1 -1
  170. package/dist/public/sdk/{lanes-C2sAP08w.js → lanes-BU-fGqY4.js} +1 -1
  171. package/dist/public/sdk/{localOnly-Jw9v9GU9.js → localOnly-Xs89Xajm.js} +1 -1
  172. package/dist/{esm/sdk/mountExportPrivateKeySurface-B_052qyI.js → public/sdk/mountExportPrivateKeySurface-CsUEKeum.js} +1 -1
  173. package/dist/public/sdk/{mountRecoveryCodeBackupSurface-PutmFjf9.js → mountRecoveryCodeBackupSurface-kFLo5zLk.js} +1 -1
  174. package/dist/public/sdk/{nearEd25519YaoMaterialActivation-C2QNLImD.js → nearEd25519YaoMaterialActivation-BfXmy3Jr.js} +1 -1
  175. package/dist/{esm/sdk/nearEd25519YaoSigningPreparation-K6n4Sq8_.js → public/sdk/nearEd25519YaoSigningPreparation-DHNk0F8e.js} +1 -1
  176. package/dist/public/sdk/nearRpcResults-CeHdqaS4.js +1 -0
  177. package/dist/public/sdk/{nonceLaneKeys-CZjeiii7.js → nonceLaneKeys-BF_UpvIy.js} +1 -1
  178. package/dist/public/sdk/{normalization-DA6o5MsH.js → normalization-Df9fZWJC.js} +1 -1
  179. package/dist/{esm/sdk/pendingWalletRecoveryCodeBackup-B-n7vmBS.js → public/sdk/pendingWalletRecoveryCodeBackup-B-R_U34I.js} +1 -1
  180. package/dist/public/sdk/{presignaturePool-DjTaB0nx.js → presignaturePool-BbvqRWYw.js} +1 -1
  181. package/dist/public/sdk/{recovery-entrypoint-9e3SXU3t.js → recovery-entrypoint-DJbMDC_m.js} +1 -1
  182. package/dist/public/sdk/{registration-C988Nwzn.js → registration-Byl4l4yZ.js} +1 -1
  183. package/dist/public/sdk/{registration-D4AijOa8.js → registration-C2fb9kRQ.js} +1 -1
  184. package/dist/public/sdk/{registrationAccounts-DI_vcT7G.js → registrationAccounts-4r74gX1l.js} +1 -1
  185. package/dist/public/sdk/registrationIntent-Do1tD1V7.js +1 -0
  186. package/dist/public/sdk/{registrationSignerPlan-_8gsSjC0.js → registrationSignerPlan-DK2b3N_p.js} +1 -1
  187. package/dist/{esm/sdk/requireStepUpAuth-DC9LSyRI.js → public/sdk/requireStepUpAuth-COqCGb1i.js} +1 -1
  188. package/dist/public/sdk/resealedEnvelopeResult-CLW00Vbw.js +1 -0
  189. package/dist/public/sdk/{routerAbNormalSigning-Da-uxxle.js → routerAbNormalSigning-D-UZmCBS.js} +1 -1
  190. package/dist/public/sdk/runtime-auth-ufbVur2p.js +1 -0
  191. package/dist/public/sdk/{runtime-device-link-DtjR-htE.js → runtime-device-link-CagI2Q62.js} +1 -1
  192. package/dist/{esm/sdk/runtime-ecdsa-tempo-BkUnzoX9.js → public/sdk/runtime-ecdsa-tempo-Rctxr0yM.js} +1 -1
  193. package/dist/{esm/sdk/runtime-email-otp-CaxfpqKI.js → public/sdk/runtime-email-otp-BQtcG-LF.js} +1 -1
  194. package/dist/public/sdk/{runtime-export-Du5ugbzi.js → runtime-export-wTeEaqlk.js} +1 -1
  195. package/dist/public/sdk/runtime-near-59yU_3ud.js +1 -0
  196. package/dist/public/sdk/runtime-preferences-B9qLHX8W.js +1 -0
  197. package/dist/public/sdk/runtime-recovery-DNyzdMBj.js +1 -0
  198. package/dist/public/sdk/{runtime-recovery-codes-DKjOU32G.js → runtime-recovery-codes-si1fGktB.js} +1 -1
  199. package/dist/public/sdk/runtimeContext-ByeM6Z4Z.js +6 -0
  200. package/dist/{esm/sdk/secp256k1--vF2pJgR.js → public/sdk/secp256k1-CE7-q9Sn.js} +1 -1
  201. package/dist/public/sdk/sessionObservationRevision-ihBwjS3y.js +1 -0
  202. package/dist/public/sdk/{signEvmFamily-DeCQOBYN.js → signEvmFamily-BY5jlZEG.js} +1 -1
  203. package/dist/{esm/sdk/signEvmFamilyWithUiConfirmForTempo-BIp-MeBV.js → public/sdk/signEvmFamilyWithUiConfirmForTempo-CrMIAXUe.js} +1 -1
  204. package/dist/public/sdk/{signEvmWithUiConfirm-BdLW7kqJ.js → signEvmWithUiConfirm-CGrLtMV6.js} +1 -1
  205. package/dist/public/sdk/signNear-DMpJFkwF.js +1 -0
  206. package/dist/public/sdk/{signatureUses-0z64Xpdj.js → signatureUses-kSrUHSSH.js} +1 -1
  207. package/dist/{esm/sdk/signingFlow-C7fwkxPx.js → public/sdk/signingFlow-BcetvUeS.js} +1 -1
  208. package/dist/{esm/sdk/signingQueue-DvHGcaLc.js → public/sdk/signingQueue-dMFOFOP5.js} +1 -1
  209. package/dist/public/sdk/surface-measurement-reporter-DXsvq401.js +1 -0
  210. package/dist/public/sdk/{thresholdEcdsa-CPVZNLEg.js → thresholdEcdsa-CqR1fFA-.js} +1 -1
  211. package/dist/public/sdk/{trace-BQv7E-bO.js → trace--mRP2OQc.js} +1 -1
  212. package/dist/public/sdk/{transaction-activity-olcDRay5.js → transaction-activity-DCzHGg3b.js} +1 -1
  213. package/dist/public/sdk/{transactionReviewAdmission-DPxuDgkU.js → transactionReviewAdmission-Cf_qUZJt.js} +1 -1
  214. package/dist/public/sdk/{transactionState-C8aYSDRA.js → transactionState-29T9xfvL.js} +1 -1
  215. package/dist/public/sdk/tx-confirm-ui.js +181 -18
  216. package/dist/public/sdk/{types-DOToeB6g.js → types-f7dyj5N6.js} +1 -1
  217. package/dist/public/sdk/{unlockedEd25519ExportRootCapability-CFmunau5.js → unlockedEd25519ExportRootCapability-yzxQjIFd.js} +1 -1
  218. package/dist/public/sdk/voiceid-host.js +1 -1
  219. package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
  220. package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
  221. package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
  222. package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
  223. package/dist/{esm/sdk/wallet-recovery-jyfGoejZ.js → public/sdk/wallet-recovery-BZB2Vu3X.js} +1 -1
  224. package/dist/public/sdk/wallet-ui.css +1 -1
  225. package/dist/public/sdk/{walletAuthMethodRecord-Bi78B6Ab.js → walletAuthMethodRecord-DLBB5fez.js} +1 -1
  226. package/dist/{esm/sdk/walletAuthority-DGdC9Glh.js → public/sdk/walletAuthority-BTGAuOi8.js} +1 -1
  227. package/dist/public/sdk/{walletCapabilityBindings-BRdFdh3l.js → walletCapabilityBindings-D5YYB7nN.js} +1 -1
  228. package/dist/public/sdk/{walletCustodyEcdsaContinuity-DdLNQs1M.js → walletCustodyEcdsaContinuity-C31YQ9av.js} +1 -1
  229. package/dist/{esm/sdk/walletOwnershipGeneration-z9NXOk-b.js → public/sdk/walletOwnershipGeneration-CgjCtPrV.js} +1 -1
  230. package/dist/{esm/sdk/walletRecoveryAdminProof-hytB9fXI.js → public/sdk/walletRecoveryAdminProof-B4Ic07jY.js} +1 -1
  231. package/dist/{esm/sdk/walletRecoveryCommit-sr8-RYvn.js → public/sdk/walletRecoveryCommit-Cc2LAkCS.js} +1 -1
  232. package/dist/{esm/sdk/walletSessionAuthorizationStore-BEJyERPZ.js → public/sdk/walletSessionAuthorizationStore-B9Vwkshr.js} +1 -1
  233. package/dist/public/sdk/warmSessionHydration-B-A5Tdx7.js +1 -0
  234. package/dist/public/sdk/{webauthnP256-DVlYEUsG.js → webauthnP256-BsQQPurm.js} +1 -1
  235. package/dist/public/wallet-assets.manifest.json +275 -251
  236. package/dist/public/wallet-service/index.html +4 -4
  237. package/dist/types/shared-ts/src/auth/externalAuth.d.ts +84 -0
  238. package/dist/types/wallet/src/SeamsWeb/operations/devices/walletHostOwnerAuthority.d.ts +2 -1
  239. package/dist/types/wallet/src/SeamsWeb/publicApi/auth.d.ts +1 -1
  240. package/dist/types/wallet/src/SeamsWeb/publicApi/types.d.ts +11 -0
  241. package/dist/types/wallet/src/SeamsWeb/walletIframe/client/router.d.ts +4 -0
  242. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/WalletHostRuntime.d.ts +4 -2
  243. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/createSessionCommands.d.ts +5 -2
  244. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/externalAuth.d.ts +29 -0
  245. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/requestRouter.d.ts +1 -1
  246. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/sessionObserver.d.ts +1 -0
  247. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.d.ts +1 -0
  248. package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/messages.d.ts +5 -3
  249. package/dist/types/wallet/src/core/authMethods/hostPlugin.d.ts +1 -0
  250. package/dist/types/wallet/src/core/authMethods/plugins.d.ts +2 -0
  251. package/dist/types/wallet/src/core/rpcClients/near/NearClient.d.ts +13 -0
  252. package/dist/types/wallet/src/core/signingEngine/nearTransactionSubmission.d.ts +24 -0
  253. package/dist/types/wallet/src/core/signingEngine/uiConfirm/transactionReviewAdmission.d.ts +2 -0
  254. package/dist/types/wallet/src/core/types/linkDevice.d.ts +4 -5
  255. package/dist/types/wallet/src/core/types/seams.d.ts +29 -9
  256. package/dist/types/wallet/src/core/ui/messages.d.ts +1 -1
  257. package/dist/types/wallet/src/index.d.ts +1 -0
  258. package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuButtonView.d.ts +2 -1
  259. package/dist/types/wallet/src/react/components/AccountMenuButton/AccountSettingsDialog.d.ts +10 -0
  260. package/dist/types/wallet/src/react/components/AccountMenuButton/AuthenticationMethodsModal.d.ts +1 -2
  261. package/dist/types/wallet/src/react/components/AccountMenuButton/ExternalWalletSettings.d.ts +10 -0
  262. package/dist/types/wallet/src/react/components/AccountMenuButton/LinkedDevicesModal.d.ts +1 -2
  263. package/dist/types/wallet/src/react/components/AccountMenuButton/WalletSettingsLayout.d.ts +1 -0
  264. package/dist/types/wallet/src/react/components/AccountMenuButton/hooks/useProfileState.d.ts +2 -2
  265. package/dist/types/wallet/src/react/components/AccountMenuButton/icons/HoverArrowIcon.d.ts +2 -1
  266. package/dist/types/wallet/src/react/components/AccountMenuButton/types.d.ts +4 -3
  267. package/dist/types/wallet/src/react/components/ExternalNearWalletIcon.d.ts +5 -0
  268. package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.d.ts +31 -0
  269. package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/types.d.ts +4 -0
  270. package/dist/types/wallet/src/react/components/externalWalletBrandImages.d.ts +3 -0
  271. package/dist/types/wallet/src/react/components/theme/design-tokens.d.ts +2 -0
  272. package/dist/types/wallet/src/react/context/reactLoginStateBuilders.d.ts +1 -1
  273. package/dist/types/wallet/src/react/index.d.ts +2 -0
  274. package/dist/types/wallet/src/react/types.d.ts +13 -3
  275. package/dist/types/wallet/src/voiceid-host.d.ts +2 -2
  276. package/package.json +1 -1
  277. package/dist/esm/react/components/AccountMenuButton/AccountMenuModal.js +0 -66
  278. package/dist/esm/sdk/appearance-token-vars-EYbmnHsJ.js +0 -1
  279. package/dist/esm/sdk/configBuilder-CSwJrmcR.js +0 -1
  280. package/dist/esm/sdk/confirm-ui-BpqwuMSl.js +0 -2
  281. package/dist/esm/sdk/errors-DLUmUo9m.js +0 -1
  282. package/dist/esm/sdk/host-aTcpYE27.js +0 -1
  283. package/dist/esm/sdk/registrationIntent-BVPp0k0k.js +0 -1
  284. package/dist/esm/sdk/resealedEnvelopeResult-BKATJaqW.js +0 -1
  285. package/dist/esm/sdk/runtime-auth-C_Y8gL_n.js +0 -1
  286. package/dist/esm/sdk/runtime-near-fas7U0MC.js +0 -1
  287. package/dist/esm/sdk/runtime-preferences-7-f34-by.js +0 -1
  288. package/dist/esm/sdk/runtime-recovery-DmY0ZJpf.js +0 -1
  289. package/dist/esm/sdk/runtimeContext-DF8MdfXl.js +0 -6
  290. package/dist/esm/sdk/sessionObservationRevision-DKTqqbGf.js +0 -1
  291. package/dist/esm/sdk/signNear-DMzOU4dX.js +0 -1
  292. package/dist/esm/sdk/surface-measurement-reporter-DvzNDnHy.js +0 -1
  293. package/dist/esm/sdk/warmSessionHydration-EstsrMF8.js +0 -1
  294. package/dist/public/sdk/appearance-token-vars-EYbmnHsJ.js +0 -1
  295. package/dist/public/sdk/configBuilder-CSwJrmcR.js +0 -1
  296. package/dist/public/sdk/confirm-ui-BpqwuMSl.js +0 -2
  297. package/dist/public/sdk/errors-DLUmUo9m.js +0 -1
  298. package/dist/public/sdk/host-aTcpYE27.js +0 -1
  299. package/dist/public/sdk/registrationIntent-BVPp0k0k.js +0 -1
  300. package/dist/public/sdk/resealedEnvelopeResult-BKATJaqW.js +0 -1
  301. package/dist/public/sdk/runtime-auth-C_Y8gL_n.js +0 -1
  302. package/dist/public/sdk/runtime-near-fas7U0MC.js +0 -1
  303. package/dist/public/sdk/runtime-preferences-7-f34-by.js +0 -1
  304. package/dist/public/sdk/runtime-recovery-DmY0ZJpf.js +0 -1
  305. package/dist/public/sdk/runtimeContext-DF8MdfXl.js +0 -6
  306. package/dist/public/sdk/sessionObservationRevision-DKTqqbGf.js +0 -1
  307. package/dist/public/sdk/signNear-DMzOU4dX.js +0 -1
  308. package/dist/public/sdk/surface-measurement-reporter-DvzNDnHy.js +0 -1
  309. package/dist/public/sdk/warmSessionHydration-EstsrMF8.js +0 -1
  310. package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuModal.d.ts +0 -9
  311. /package/dist/esm/sdk/{accountIds-Dj_0GoY-.js → accountIds-CW2BP-d9.js} +0 -0
  312. /package/dist/esm/sdk/{actions-BIdcxldy.js → actions-DrtSTGus.js} +0 -0
  313. /package/dist/esm/sdk/{appearance-CAIe7Qed.js → appearance-DL7c6bML.js} +0 -0
  314. /package/dist/esm/sdk/{authenticatorOptions-2_XK8aXv.js → authenticatorOptions-WCDKYRux.js} +0 -0
  315. /package/dist/esm/sdk/{authorizationAdmission-BYwaSZYV.js → authorizationAdmission-28jo_IVJ.js} +0 -0
  316. /package/dist/esm/sdk/{browser-B1qU6ouJ.js → browser-CKS7Tq2r.js} +0 -0
  317. /package/dist/esm/sdk/{bytes-CA0mv-bG.js → bytes-DXo6uALR.js} +0 -0
  318. /package/dist/esm/sdk/{canonicalSignerErrorCode-BHDPNkvJ.js → canonicalSignerErrorCode-CX5PBpkt.js} +0 -0
  319. /package/dist/esm/sdk/{challengeDelivery-DWix1oso.js → challengeDelivery-Dj9HrjW9.js} +0 -0
  320. /package/dist/esm/sdk/{confirmTypes-DmEPoxys.js → confirmTypes-BvVtQs-M.js} +0 -0
  321. /package/dist/esm/sdk/{csp-stylesheet-CHtV6HyK.js → csp-stylesheet-DUSqfXvZ.js} +0 -0
  322. /package/dist/esm/sdk/{digestEncoding-n8Kr2kow.js → digestEncoding-CqNXPZY9.js} +0 -0
  323. /package/dist/esm/sdk/{ecdsaChainTarget-Lh24LLyA.js → ecdsaChainTarget-Bm5X4k-V.js} +0 -0
  324. /package/dist/esm/sdk/{executeWorkerOperation-XmBNaxrV.js → executeWorkerOperation-C9FOCCR7.js} +0 -0
  325. /package/dist/esm/sdk/{helpers-dZehRP4i.js → helpers-Dubwo5uK.js} +0 -0
  326. /package/dist/esm/sdk/{jsonRpc-YKL5n8VL.js → jsonRpc-BVDv1wfm.js} +0 -0
  327. /package/dist/esm/sdk/{keccak-BArcwgbj.js → keccak-mS0Mejjx.js} +0 -0
  328. /package/dist/esm/sdk/{keyMaterialEnvelope-BsdlckmN.js → keyMaterialEnvelope-Dm2ZEilb.js} +0 -0
  329. /package/dist/esm/sdk/{normalization-dgJxtZKK.js → normalization-B3i1-rPQ.js} +0 -0
  330. /package/dist/esm/sdk/{operationFingerprint-DgpQfpM-.js → operationFingerprint-Bas59T7L.js} +0 -0
  331. /package/dist/esm/sdk/{presignatures-CjcyX_-F.js → presignatures-BCeq56DG.js} +0 -0
  332. /package/dist/esm/sdk/{prfCache-Ck1mh5YB.js → prfCache-DEHaUPSW.js} +0 -0
  333. /package/dist/esm/sdk/{profileAccountProjection-dvLchPBo.js → profileAccountProjection-C5sNt-s2.js} +0 -0
  334. /package/dist/esm/sdk/{promptText-BIv8lx7_.js → promptText-bcKcsSka.js} +0 -0
  335. /package/dist/esm/sdk/{recoveryAuthorization-CMVdZ5OR.js → recoveryAuthorization-CQsjb8Tm.js} +0 -0
  336. /package/dist/esm/sdk/{registrationAuthMethodInput-Be4Td0Ef.js → registrationAuthMethodInput-BR1WVbK3.js} +0 -0
  337. /package/dist/esm/sdk/{sdkSentEvents-QPs69K3s.js → sdkSentEvents-DjOlKtdW.js} +0 -0
  338. /package/dist/esm/sdk/{shared-hkHoIS9i.js → shared-CkHhXgFB.js} +0 -0
  339. /package/dist/esm/sdk/{signer-worker-CmCKlJ__.js → signer-worker-BNodGJKY.js} +0 -0
  340. /package/dist/esm/sdk/{signerDomain-BLnlQPAV.js → signerDomain-BAsLT3XN.js} +0 -0
  341. /package/dist/esm/sdk/{signerSlot-DgLzb3Ee.js → signerSlot-D2RZnb27.js} +0 -0
  342. /package/dist/esm/sdk/{types-COS7UL3R.js → types-C4OErbBf.js} +0 -0
  343. /package/dist/esm/sdk/{walletCustodyOperation-CAnT3Ww-.js → walletCustodyOperation-DimzAbCB.js} +0 -0
  344. /package/dist/esm/sdk/{walletSessionAuthorizationProjection-CMl69JGe.js → walletSessionAuthorizationProjection-BzUH6gHV.js} +0 -0
  345. /package/dist/esm/sdk/{walletSessionAuthorizationStatus-C_q9eiOH.js → walletSessionAuthorizationStatus-DG7DPcgR.js} +0 -0
  346. /package/dist/esm/sdk/{walletSessionFailure-ZfdbUAG-.js → walletSessionFailure-CxsVtroW.js} +0 -0
  347. /package/dist/esm/sdk/{webauthnPromptCoordinator-DMETRUcN.js → webauthnPromptCoordinator-npsSRD51.js} +0 -0
  348. /package/dist/public/sdk/{accountIds-Dj_0GoY-.js → accountIds-CW2BP-d9.js} +0 -0
  349. /package/dist/public/sdk/{actions-BIdcxldy.js → actions-DrtSTGus.js} +0 -0
  350. /package/dist/public/sdk/{appearance-CAIe7Qed.js → appearance-DL7c6bML.js} +0 -0
  351. /package/dist/public/sdk/{authenticatorOptions-2_XK8aXv.js → authenticatorOptions-WCDKYRux.js} +0 -0
  352. /package/dist/public/sdk/{authorizationAdmission-BYwaSZYV.js → authorizationAdmission-28jo_IVJ.js} +0 -0
  353. /package/dist/public/sdk/{browser-B1qU6ouJ.js → browser-CKS7Tq2r.js} +0 -0
  354. /package/dist/public/sdk/{bytes-CA0mv-bG.js → bytes-DXo6uALR.js} +0 -0
  355. /package/dist/public/sdk/{canonicalSignerErrorCode-BHDPNkvJ.js → canonicalSignerErrorCode-CX5PBpkt.js} +0 -0
  356. /package/dist/public/sdk/{challengeDelivery-DWix1oso.js → challengeDelivery-Dj9HrjW9.js} +0 -0
  357. /package/dist/public/sdk/{confirmTypes-DmEPoxys.js → confirmTypes-BvVtQs-M.js} +0 -0
  358. /package/dist/public/sdk/{csp-stylesheet-CHtV6HyK.js → csp-stylesheet-DUSqfXvZ.js} +0 -0
  359. /package/dist/public/sdk/{digestEncoding-n8Kr2kow.js → digestEncoding-CqNXPZY9.js} +0 -0
  360. /package/dist/public/sdk/{ecdsaChainTarget-Lh24LLyA.js → ecdsaChainTarget-Bm5X4k-V.js} +0 -0
  361. /package/dist/public/sdk/{executeWorkerOperation-XmBNaxrV.js → executeWorkerOperation-C9FOCCR7.js} +0 -0
  362. /package/dist/public/sdk/{helpers-dZehRP4i.js → helpers-Dubwo5uK.js} +0 -0
  363. /package/dist/public/sdk/{jsonRpc-YKL5n8VL.js → jsonRpc-BVDv1wfm.js} +0 -0
  364. /package/dist/public/sdk/{keccak-BArcwgbj.js → keccak-mS0Mejjx.js} +0 -0
  365. /package/dist/public/sdk/{keyMaterialEnvelope-BsdlckmN.js → keyMaterialEnvelope-Dm2ZEilb.js} +0 -0
  366. /package/dist/public/sdk/{normalization-dgJxtZKK.js → normalization-B3i1-rPQ.js} +0 -0
  367. /package/dist/public/sdk/{operationFingerprint-DgpQfpM-.js → operationFingerprint-Bas59T7L.js} +0 -0
  368. /package/dist/public/sdk/{presignatures-CjcyX_-F.js → presignatures-BCeq56DG.js} +0 -0
  369. /package/dist/public/sdk/{prfCache-Ck1mh5YB.js → prfCache-DEHaUPSW.js} +0 -0
  370. /package/dist/public/sdk/{profileAccountProjection-dvLchPBo.js → profileAccountProjection-C5sNt-s2.js} +0 -0
  371. /package/dist/public/sdk/{promptText-BIv8lx7_.js → promptText-bcKcsSka.js} +0 -0
  372. /package/dist/public/sdk/{recoveryAuthorization-CMVdZ5OR.js → recoveryAuthorization-CQsjb8Tm.js} +0 -0
  373. /package/dist/public/sdk/{registrationAuthMethodInput-Be4Td0Ef.js → registrationAuthMethodInput-BR1WVbK3.js} +0 -0
  374. /package/dist/public/sdk/{sdkSentEvents-QPs69K3s.js → sdkSentEvents-DjOlKtdW.js} +0 -0
  375. /package/dist/public/sdk/{shared-hkHoIS9i.js → shared-CkHhXgFB.js} +0 -0
  376. /package/dist/public/sdk/{signer-worker-CmCKlJ__.js → signer-worker-BNodGJKY.js} +0 -0
  377. /package/dist/public/sdk/{signerDomain-BLnlQPAV.js → signerDomain-BAsLT3XN.js} +0 -0
  378. /package/dist/public/sdk/{signerSlot-DgLzb3Ee.js → signerSlot-D2RZnb27.js} +0 -0
  379. /package/dist/public/sdk/{types-COS7UL3R.js → types-C4OErbBf.js} +0 -0
  380. /package/dist/public/sdk/{walletCustodyOperation-CAnT3Ww-.js → walletCustodyOperation-DimzAbCB.js} +0 -0
  381. /package/dist/public/sdk/{walletSessionAuthorizationProjection-CMl69JGe.js → walletSessionAuthorizationProjection-BzUH6gHV.js} +0 -0
  382. /package/dist/public/sdk/{walletSessionAuthorizationStatus-C_q9eiOH.js → walletSessionAuthorizationStatus-DG7DPcgR.js} +0 -0
  383. /package/dist/public/sdk/{walletSessionFailure-ZfdbUAG-.js → walletSessionFailure-CxsVtroW.js} +0 -0
  384. /package/dist/public/sdk/{webauthnPromptCoordinator-DMETRUcN.js → webauthnPromptCoordinator-npsSRD51.js} +0 -0
@@ -299,7 +299,7 @@ function attachConfirmSurfaceResizeChoreographer(element, options = {}) {
299
299
  current.moved = true;
300
300
  } else current.framesSinceChange += 1;
301
301
  const progress = clamp((viewportPx - current.originHostPx) / current.deltaCssPx, 0, 1);
302
- if (progress >= 1) {
302
+ if (viewportPx === Math.round(current.originHostPx + current.deltaCssPx)) {
303
303
  current.framesAtTarget += 1;
304
304
  if (current.sawIntermediate || current.framesAtTarget >= LANDING_CONFIRM_FRAMES) {
305
305
  settle();
@@ -310,7 +310,7 @@ function attachConfirmSurfaceResizeChoreographer(element, options = {}) {
310
310
  }
311
311
  if (current.framesAtTarget > 0) surfaceMotionDiagnostics.blipFrames += 1;
312
312
  current.framesAtTarget = 0;
313
- if (progress > 0) current.sawIntermediate = true;
313
+ if (progress > 0 && progress < 1) current.sawIntermediate = true;
314
314
  current.driver.setProgress(progress);
315
315
  const settledFrames = current.moved ? SETTLED_FRAMES_AFTER_MOTION : SETTLED_FRAMES_WITHOUT_MOTION;
316
316
  if (current.framesSinceChange >= settledFrames) {
@@ -69,8 +69,14 @@ var ReviewDisclosure = class extends Component {
69
69
  return;
70
70
  }
71
71
  details.open = true;
72
+ const scrollArea = details.parentElement?.closest(".seams-review-technical > div");
73
+ if (scrollArea && scrollArea.scrollHeight > scrollArea.clientHeight) {
74
+ details.open = opening;
75
+ details.removeAttribute("data-closing");
76
+ return;
77
+ }
72
78
  details.setAttribute("data-resizing", "");
73
- const target = opening ? body.scrollHeight : 0;
79
+ const target = opening ? body.getBoundingClientRect().height : 0;
74
80
  this.motion = {
75
81
  kind: "hosted",
76
82
  opening
@@ -1,6 +1,7 @@
1
1
  import { appearanceTokenCssRule } from "../appearance-token-vars.js";
2
2
  import { withWalletLocale } from "./WalletLocale.js";
3
3
  import { PadlockIcon } from "./PadlockIcon.js";
4
+ import { CONFIRM_SURFACE_HEIGHT_DRIVEN_VAR, announceSurfaceResize } from "../confirm-surface-resize.js";
4
5
  import { confirmationDocumentStyles } from "./confirmation-styles.js";
5
6
  import { ConfirmationContent } from "./ConfirmationContent.js";
6
7
  import { ConfirmationModal } from "./ConfirmationModal.js";
@@ -40,11 +41,40 @@ function captureReceiptAnchors(surface) {
40
41
  selector,
41
42
  text: element.textContent,
42
43
  bounds: element.getBoundingClientRect(),
43
- fontSize: getComputedStyle(element).fontSize
44
+ fontSize: getComputedStyle(element).fontSize,
45
+ textGeometry: element.matches("[role=\"status\"]") ? receiptTextGeometry(element) : null
44
46
  });
45
47
  }
46
48
  return anchors;
47
49
  }
50
+ function receiptTextGeometry(element) {
51
+ const range = element.ownerDocument.createRange();
52
+ range.selectNodeContents(element);
53
+ return {
54
+ bounds: range.getBoundingClientRect(),
55
+ lineCount: range.getClientRects().length
56
+ };
57
+ }
58
+ function receiptAnchorTransform(anchor, element) {
59
+ const destination = element.getBoundingClientRect();
60
+ const fontScale = parseFloat(anchor.fontSize) / parseFloat(getComputedStyle(element).fontSize);
61
+ let scaleX = fontScale;
62
+ let scaleY = fontScale;
63
+ let left = anchor.bounds.left - destination.left;
64
+ let top = anchor.bounds.top - destination.top;
65
+ if (anchor.textGeometry) {
66
+ const text = receiptTextGeometry(element);
67
+ const source = anchor.textGeometry.bounds;
68
+ const target = text.bounds;
69
+ if (anchor.textGeometry.lineCount === text.lineCount && target.width > 0 && target.height > 0) {
70
+ scaleX = source.width / target.width;
71
+ scaleY = source.height / target.height;
72
+ left = source.left - destination.left - (target.left - destination.left) * scaleX;
73
+ top = source.top - destination.top - (target.top - destination.top) * scaleY;
74
+ }
75
+ }
76
+ return `translate(${left}px, ${top}px) scale(${scaleX}, ${scaleY})`;
77
+ }
48
78
  /**
49
79
  * The progress segments a capture draws while it checks, as they look now, from
50
80
  * left to right whatever their drawing order. A line that has not split yet hands
@@ -87,7 +117,12 @@ var MountedConfirmationSurface = class {
87
117
  receiptShell = null;
88
118
  receiptGhost = null;
89
119
  receiptSegments = [];
120
+ receiptResize = null;
90
121
  clearReceiptMotion = () => {
122
+ this.element.querySelector(".seams-receipt-footer--hosted")?.classList.remove("seams-receipt-footer--hosted");
123
+ this.receiptResize?.element.classList.remove("seams-surface-height-driven");
124
+ this.receiptResize = null;
125
+ this.styles.deleteDynamicRule(`${this.element.id}-receipt-resize`);
91
126
  for (const animation of this.receiptMotion) animation.cancel();
92
127
  this.receiptMotion = [];
93
128
  this.receiptShell?.remove();
@@ -147,20 +182,20 @@ var MountedConfirmationSurface = class {
147
182
  }
148
183
  showReceipt(model) {
149
184
  if (this.state.kind !== "mounted" || this.state.model.content.kind !== "transaction") return;
150
- const viewChanged = this.receipt?.view !== model.view;
185
+ const shouldMorph = this.receipt?.view !== model.view || this.receiptMotion.length > 0;
151
186
  const previousShell = this.receiptShell ?? this.element.querySelector(".modal-container-root");
152
187
  const previousBounds = previousShell?.getBoundingClientRect();
153
- const anchors = viewChanged ? captureReceiptAnchors(this.element) : [];
154
- const leaving = viewChanged ? this.liveCapture() : null;
188
+ const anchors = shouldMorph ? captureReceiptAnchors(this.element) : [];
189
+ const leaving = shouldMorph ? this.liveCapture() : null;
155
190
  const previousRadius = previousShell ? getComputedStyle(previousShell).borderRadius : "26px";
156
- if (viewChanged) this.clearReceiptMotion();
191
+ if (shouldMorph) this.clearReceiptMotion();
157
192
  this.receipt = model;
158
193
  this.element.dataset.receiptView = model.view;
159
194
  this.element.dataset.seamsConfirmSurface = "wallet-iframe";
160
195
  this.element.dataset.seamsConfirmVariant = "modal";
161
196
  this.renderSurface();
162
197
  const target = this.element.querySelector(".modal-container-root");
163
- if (viewChanged && previousBounds && target && !window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
198
+ if (shouldMorph && previousBounds && target && !window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
164
199
  const bounds = target.getBoundingClientRect();
165
200
  const shell = this.element.ownerDocument.createElement("div");
166
201
  shell.className = "seams-receipt-morph-shell";
@@ -168,7 +203,7 @@ var MountedConfirmationSurface = class {
168
203
  this.element.appendChild(shell);
169
204
  this.receiptShell = shell;
170
205
  this.element.setAttribute("data-receipt-morphing", "");
171
- this.receiptMotion = [shell.animate([{
206
+ const morph = shell.animate([{
172
207
  left: `${previousBounds.left}px`,
173
208
  top: `${previousBounds.top}px`,
174
209
  width: `${previousBounds.width}px`,
@@ -184,17 +219,17 @@ var MountedConfirmationSurface = class {
184
219
  duration: RECEIPT_MORPH_DURATION_MS,
185
220
  easing: RECEIPT_MORPH_EASING,
186
221
  fill: "both"
187
- })];
222
+ });
223
+ this.receiptMotion = [morph];
224
+ const geometryAnimations = [morph];
188
225
  const handedOver = leaving ? this.handOverCapture(leaving, target) : false;
189
226
  const shared = /* @__PURE__ */ new Set();
190
227
  for (const anchor of anchors) {
191
228
  const element = target.querySelector(anchor.selector);
192
229
  if (!element || element.textContent !== anchor.text) continue;
193
- const destination = element.getBoundingClientRect();
194
230
  shared.add(element);
195
- const scale = parseFloat(anchor.fontSize) / parseFloat(getComputedStyle(element).fontSize);
196
- this.receiptMotion.push(element.animate([{
197
- transform: `translate(${anchor.bounds.left - destination.left}px, ${anchor.bounds.top - destination.top}px) scale(${scale})`,
231
+ const animation = element.animate([{
232
+ transform: receiptAnchorTransform(anchor, element),
198
233
  transformOrigin: "top left"
199
234
  }, {
200
235
  transform: "translate(0, 0) scale(1)",
@@ -202,14 +237,17 @@ var MountedConfirmationSurface = class {
202
237
  }], {
203
238
  duration: RECEIPT_MORPH_DURATION_MS,
204
239
  easing: RECEIPT_MORPH_EASING
205
- }));
240
+ });
241
+ this.receiptMotion.push(animation);
242
+ geometryAnimations.push(animation);
206
243
  }
207
244
  const details = target.querySelectorAll(".seams-transaction-receipt > :not(.seams-receipt-heading), .seams-receipt-heading > .seams-receipt-symbol, .seams-receipt-heading h2, .seams-receipt-heading p, .seams-transaction-toast > :not(.seams-transaction-toast-text, .seams-toast-progress), .seams-transaction-toast-text > *");
208
245
  let order = 0;
209
246
  for (const detail of details) {
210
247
  if (shared.has(detail)) continue;
211
248
  const toolbar = leaving !== null && detail.matches(".seams-review-toolbar");
212
- this.receiptMotion.push(detail.animate(toolbar ? [{ opacity: 0 }, { opacity: 1 }] : [{
249
+ const stationary = toolbar || detail.matches(".seams-receipt-footer");
250
+ this.receiptMotion.push(detail.animate(stationary ? [{ opacity: 0 }, { opacity: 1 }] : [{
213
251
  opacity: 0,
214
252
  transform: "translateY(8px)"
215
253
  }, {
@@ -228,12 +266,83 @@ var MountedConfirmationSurface = class {
228
266
  }));
229
267
  if (!toolbar) order += 1;
230
268
  }
269
+ this.resizeReceipt({
270
+ element: target,
271
+ animations: geometryAnimations,
272
+ fromHeight: previousBounds.height,
273
+ toHeight: bounds.height
274
+ });
231
275
  const motion = this.receiptMotion;
232
276
  Promise.all(motion.map((animation) => animation.finished)).then(() => {
233
277
  if (this.receiptMotion === motion) this.clearReceiptMotion();
234
278
  }, ignoreCancelledMotion);
235
279
  }
236
280
  }
281
+ resizeReceipt(resize) {
282
+ if (Math.abs(resize.toHeight - resize.fromHeight) < 1) return;
283
+ this.receiptResize = resize;
284
+ for (const animation of resize.animations) {
285
+ animation.pause();
286
+ animation.effect?.updateTiming({ easing: "linear" });
287
+ }
288
+ resize.element.classList.add("seams-surface-height-driven");
289
+ this.setReceiptHeight(resize, resize.fromHeight);
290
+ if (announceSurfaceResize(resize.element, {
291
+ reason: "receipt-transition",
292
+ fromCssPx: resize.fromHeight,
293
+ toCssPx: resize.toHeight,
294
+ setHeightCssPx: this.setReceiptHeight.bind(this, resize),
295
+ finish: this.finishReceiptResize.bind(this, resize)
296
+ })) {
297
+ this.fitReceiptToViewport(resize);
298
+ return;
299
+ }
300
+ this.receiptResize = null;
301
+ resize.element.classList.remove("seams-surface-height-driven");
302
+ this.styles.deleteDynamicRule(`${this.element.id}-receipt-resize`);
303
+ for (const animation of resize.animations) {
304
+ animation.effect?.updateTiming({ easing: RECEIPT_MORPH_EASING });
305
+ animation.play();
306
+ }
307
+ }
308
+ fitReceiptToViewport(resize) {
309
+ const footer = resize.element.querySelector(".seams-receipt-footer");
310
+ for (const animation of resize.animations) {
311
+ const effect = animation.effect;
312
+ if (!(effect instanceof KeyframeEffect)) continue;
313
+ if (effect.target === this.receiptShell) {
314
+ this.receiptShell?.classList.add("seams-receipt-morph-shell--hosted");
315
+ const frames = effect.getKeyframes();
316
+ for (const frame of frames) {
317
+ delete frame.height;
318
+ delete frame.width;
319
+ }
320
+ effect.setKeyframes(frames);
321
+ } else if (footer && effect.target === footer) {
322
+ const frames = effect.getKeyframes();
323
+ for (const frame of frames) delete frame.transform;
324
+ effect.setKeyframes(frames);
325
+ }
326
+ }
327
+ footer?.classList.add("seams-receipt-footer--hosted");
328
+ }
329
+ setReceiptHeight(resize, height) {
330
+ if (this.receiptResize !== resize) return;
331
+ this.styles.setDynamicDeclarations(`${this.element.id}-receipt-resize`, `#${resize.element.id}`, {
332
+ [CONFIRM_SURFACE_HEIGHT_DRIVEN_VAR]: `${height}px`,
333
+ "--seams-receipt-target-height": `${resize.toHeight}px`
334
+ });
335
+ const progress = (height - resize.fromHeight) / (resize.toHeight - resize.fromHeight);
336
+ for (const animation of resize.animations) animation.currentTime = Math.max(0, Math.min(1, progress)) * RECEIPT_MORPH_DURATION_MS;
337
+ }
338
+ finishReceiptResize(resize) {
339
+ if (this.receiptResize !== resize) return;
340
+ this.receiptResize = null;
341
+ resize.element.classList.remove("seams-surface-height-driven");
342
+ resize.element.querySelector(".seams-receipt-footer--hosted")?.classList.remove("seams-receipt-footer--hosted");
343
+ this.styles.deleteDynamicRule(`${this.element.id}-receipt-resize`);
344
+ for (const animation of resize.animations) animation.finish();
345
+ }
237
346
  /** The auth method capture still on screen, measured before the receipt replaces it. */
238
347
  liveCapture() {
239
348
  if (this.state.kind !== "mounted" || this.state.model.content.kind !== "transaction") return null;
@@ -37,6 +37,17 @@ const walletMessages = [
37
37
  ["Enter a recovery code to recover your wallet.", "リカバリーコードを入力してウォレットを復元してください。"],
38
38
  ["Create new passkey", "新しいパスキーを作成"],
39
39
  ["Continue with Google", "Google で続ける"],
40
+ ["Connect wallet", "ウォレットを接続"],
41
+ ["Back to wallet selection", "ウォレットの選択に戻る"],
42
+ ["Choose how you’d like to get started.", "開始方法を選択してください。"],
43
+ ["Create a Seams Wallet", "Seams ウォレットを作成"],
44
+ ["Get started with a passkey", "パスキーで開始"],
45
+ ["Use your existing wallet", "既存のウォレットを使用"],
46
+ ["Connect Meteor Wallet", "Meteor Wallet を接続"],
47
+ ["Connect HOT Wallet", "HOT Wallet を接続"],
48
+ ["Connect Intear Wallet", "Intear Wallet を接続"],
49
+ ["Mainnet only", "メインネットのみ"],
50
+ ["Complete the request in your wallet.", "ウォレットでリクエストを完了してください。"],
40
51
  ["Verify email code", "メールのコードを確認"],
41
52
  ["Unlock with Google", "Google でロック解除"],
42
53
  ["Unlock with new passkey", "新しいパスキーでロック解除"],
@@ -232,6 +243,7 @@ const walletMessages = [
232
243
  ["Create a wallet", "ウォレットを作成"],
233
244
  ["Create wallet with passkey", "パスキーでウォレットを作成"],
234
245
  ["Unlock with passkey", "パスキーでロック解除"],
246
+ ["Unlock with email code", "メールのコードでロック解除"],
235
247
  ["Saved wallets", "保存済みウォレット"],
236
248
  ["Generate another name", "別の名前を生成"],
237
249
  ["Other options", "その他の方法"],
@@ -293,6 +305,11 @@ const walletMessages = [
293
305
  ["Dark mode", "ダークモード"],
294
306
  ["Unable to lock your wallet. Try again.", "ウォレットをロックできません。もう一度お試しください。"],
295
307
  ["Unlocked on this device", "このデバイスでロック解除済み"],
308
+ ["Connected with Google", "Google で接続中"],
309
+ ["Wallet access", "ウォレットへのアクセス"],
310
+ ["Connected to your wallet", "ウォレットに接続しています"],
311
+ ["Method {value0}", "認証方法 {value0}"],
312
+ ["Confirm with a wallet authentication method to make security changes.", "セキュリティ設定を変更するには、ウォレットの認証方法で本人確認してください。"],
296
313
  ["All settings", "すべての設定"],
297
314
  ["Locking…", "ロック中…"],
298
315
  ["Lock wallet", "ウォレットをロック"],
@@ -4,7 +4,7 @@ import { WalletText, useWalletLocale } from "../../context/WalletLocale.js";
4
4
  import TouchIcon from "./icons/TouchIcon.js";
5
5
  import { UserAccountButton } from "./UserAccountButton.js";
6
6
  import { ProfileDropdown } from "./ProfileDropdown.js";
7
- import { AccountMenuModal } from "./AccountMenuModal.js";
7
+ import { AccountSettingsDialog } from "./AccountSettingsDialog.js";
8
8
  import { LockKeyholeIcon } from "./icons/LockKeyholeIcon.js";
9
9
  import { useLayoutEffect, useRef, useState } from "react";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -13,9 +13,9 @@ import "./Web3AuthProfileButton.css";
13
13
  function measurePanel(element, setHeight) {
14
14
  setHeight(element.offsetHeight);
15
15
  }
16
- function observePanel(contentRef, isOpen, setHeight) {
16
+ function observePanel(contentRef, isOpen, presentation, setHeight) {
17
17
  const content = contentRef.current;
18
- if (!content || !isOpen) {
18
+ if (!content || !isOpen || presentation === "drawer") {
19
19
  setHeight(null);
20
20
  return;
21
21
  }
@@ -28,14 +28,14 @@ function observePanel(contentRef, isOpen, setHeight) {
28
28
  function closeWithEscape(presentation, onClose, event) {
29
29
  if (event.key !== "Escape" || event.defaultPrevented) return;
30
30
  event.preventDefault();
31
- if (presentation === "modal") event.stopPropagation();
31
+ if (presentation !== "dropdown") event.stopPropagation();
32
32
  onClose();
33
33
  }
34
- function revealModalScreen(presentation, event) {
35
- if (presentation !== "modal" || !(event.target instanceof HTMLElement)) return;
34
+ function revealDialogScreen(presentation, event) {
35
+ if (presentation === "dropdown" || !(event.target instanceof HTMLElement)) return;
36
36
  if (!event.target.matches(".seams-account-heading h2, .seams-account-identity")) return;
37
- const dialog = event.currentTarget.closest("dialog.seams-account-modal");
38
- if (dialog instanceof HTMLDialogElement) dialog.scrollTop = 0;
37
+ const scrollArea = presentation === "drawer" ? event.target.closest(".seams-account-main") : event.currentTarget.closest("dialog.seams-account-dialog");
38
+ if (scrollArea) scrollArea.scrollTop = 0;
39
39
  }
40
40
  function restoreTriggerFocus(buttonRef, previousOpen, isOpen) {
41
41
  if (previousOpen.current && !isOpen) buttonRef.current?.querySelector("[aria-expanded]")?.focus({ preventScroll: true });
@@ -55,20 +55,21 @@ function AccountMenuButtonView({ presentation, buttonRef, dropdownRef, trigger,
55
55
  const previousOpen = useRef(trigger.isOpen);
56
56
  useLayoutEffect(restoreTriggerFocus.bind(null, buttonRef, previousOpen, trigger.isOpen), [buttonRef, trigger.isOpen]);
57
57
  const [height, setHeight] = useState(null);
58
- useLayoutEffect(observePanel.bind(null, contentRef, trigger.isOpen, setHeight), [trigger.isOpen, presentation]);
58
+ useLayoutEffect(observePanel.bind(null, contentRef, trigger.isOpen, presentation, setHeight), [trigger.isOpen, presentation]);
59
+ const panelOpen = presentation !== "dropdown" || trigger.isOpen;
59
60
  const panel = /* @__PURE__ */ jsx("div", {
60
61
  ref: buttonRef,
61
- className: `seams-profile-button-morphable ${trigger.isOpen ? "open" : "closed"} ${className ?? ""}`,
62
- style: trigger.isOpen ? style : {
62
+ className: `seams-profile-button-morphable ${panelOpen ? "open" : "closed"} ${className ?? ""}`,
63
+ style: panelOpen ? style : {
63
64
  ...style,
64
65
  width: "fit-content"
65
66
  },
66
- "data-state": trigger.isOpen ? "open" : "closed",
67
- onFocusCapture: revealModalScreen.bind(null, presentation),
68
- children: trigger.isOpen ? /* @__PURE__ */ jsx("div", {
67
+ "data-state": panelOpen ? "open" : "closed",
68
+ onFocusCapture: revealDialogScreen.bind(null, presentation),
69
+ children: panelOpen ? /* @__PURE__ */ jsx("div", {
69
70
  className: "seams-account-resize",
70
71
  onKeyDown: closeWithEscape.bind(null, presentation, dropdown.onClose),
71
- style: { height: height ?? void 0 },
72
+ style: { height: presentation === "drawer" ? void 0 : height ?? void 0 },
72
73
  children: /* @__PURE__ */ jsxs("div", {
73
74
  ref: contentRef,
74
75
  className: "seams-account-panel-content",
@@ -92,7 +93,11 @@ function AccountMenuButtonView({ presentation, buttonRef, dropdownRef, trigger,
92
93
  strokeWidth: "1.5",
93
94
  children: /* @__PURE__ */ jsx("path", { d: "m6 6 12 12M18 6 6 18" })
94
95
  })
95
- })
96
+ }),
97
+ presentation === "drawer" ? /* @__PURE__ */ jsx("h2", {
98
+ className: "seams-account-drawer-title",
99
+ children: /* @__PURE__ */ jsx(WalletText, { message: "Wallet settings" })
100
+ }) : null
96
101
  ]
97
102
  }),
98
103
  /* @__PURE__ */ jsx("div", {
@@ -131,12 +136,20 @@ function AccountMenuButtonView({ presentation, buttonRef, dropdownRef, trigger,
131
136
  })
132
137
  }) : /* @__PURE__ */ jsx(UserAccountButton, { ...trigger })
133
138
  });
134
- if (presentation === "modal") return /* @__PURE__ */ jsx(AccountMenuModal, {
135
- isOpen: trigger.isOpen,
136
- onClose: dropdown.onClose,
137
- children: panel
138
- });
139
- return panel;
139
+ switch (presentation) {
140
+ case "dropdown": return panel;
141
+ case "modal":
142
+ case "drawer": return /* @__PURE__ */ jsx(AccountSettingsDialog, {
143
+ presentation,
144
+ isOpen: trigger.isOpen,
145
+ onClose: dropdown.onClose,
146
+ children: panel
147
+ });
148
+ default: return assertNever(presentation);
149
+ }
150
+ }
151
+ function assertNever(value) {
152
+ throw new Error(`Unsupported account menu presentation: ${String(value)}`);
140
153
  }
141
154
  //#endregion
142
155
  export { AccountMenuButtonView };
@@ -0,0 +1,157 @@
1
+ import { walletText } from "../../../core/ui/messages.js";
2
+ import { useWalletLocale } from "../../context/WalletLocale.js";
3
+ import { Theme, useTheme } from "../theme/ThemeProvider.js";
4
+ import { Component } from "react";
5
+ import { createPortal } from "react-dom";
6
+ import { jsx } from "react/jsx-runtime";
7
+ //#region src/react/components/AccountMenuButton/AccountSettingsDialog.tsx
8
+ const DRAWER_DURATION_MS = 240;
9
+ const DRAWER_EASING = "cubic-bezier(0.32, 0.72, 0, 1)";
10
+ function ignoreCancelledAnimation() {}
11
+ function assertNever(value) {
12
+ throw new Error(`Unsupported settings dialog state: ${String(value)}`);
13
+ }
14
+ function isBackdrop(event) {
15
+ if (event.target !== event.currentTarget) return false;
16
+ const bounds = event.currentTarget.getBoundingClientRect();
17
+ return event.clientX < bounds.left || event.clientX > bounds.right || event.clientY < bounds.top || event.clientY > bounds.bottom;
18
+ }
19
+ var SettingsDialog = class extends Component {
20
+ state = { dialog: { kind: "closed" } };
21
+ dialog = null;
22
+ motion = null;
23
+ startedOutside = false;
24
+ static getDerivedStateFromProps(props, state) {
25
+ if (props.isOpen) return { dialog: {
26
+ kind: "open",
27
+ content: props.children
28
+ } };
29
+ switch (state.dialog.kind) {
30
+ case "closed": return null;
31
+ case "open":
32
+ if (props.presentation === "modal") return { dialog: { kind: "closed" } };
33
+ return { dialog: {
34
+ kind: "closing",
35
+ content: state.dialog.content
36
+ } };
37
+ case "closing": return props.presentation === "modal" ? { dialog: { kind: "closed" } } : null;
38
+ default: return assertNever(state.dialog);
39
+ }
40
+ }
41
+ componentDidMount() {
42
+ this.syncDialog("closed", this.props.presentation);
43
+ }
44
+ componentDidUpdate(previousProps, previousState) {
45
+ this.syncDialog(previousState.dialog.kind, previousProps.presentation);
46
+ }
47
+ componentWillUnmount() {
48
+ this.clearMotion();
49
+ this.dialog?.close();
50
+ }
51
+ setDialog = (dialog) => {
52
+ if (dialog === this.dialog) return;
53
+ this.clearMotion();
54
+ this.dialog?.close();
55
+ this.dialog = dialog;
56
+ };
57
+ clearMotion() {
58
+ this.motion?.cancel();
59
+ this.motion = null;
60
+ }
61
+ syncDialog(previous, presentation) {
62
+ const dialog = this.dialog;
63
+ if (!dialog) return;
64
+ dialog.inert = this.state.dialog.kind === "closing";
65
+ if (!dialog.open) dialog.showModal();
66
+ if (this.props.presentation === "modal") {
67
+ this.clearMotion();
68
+ return;
69
+ }
70
+ if (previous === this.state.dialog.kind && presentation === this.props.presentation) return;
71
+ if (previous === "closing" && this.state.dialog.kind === "open") dialog.querySelector(".seams-account-close")?.focus({ preventScroll: true });
72
+ this.animateDrawer(previous === "closed" || presentation !== this.props.presentation);
73
+ }
74
+ animateDrawer(entering) {
75
+ const dialog = this.dialog;
76
+ if (!dialog) return;
77
+ const computed = getComputedStyle(dialog);
78
+ const offset = computed.getPropertyValue("--seams-account-drawer-offset").trim();
79
+ const from = entering ? offset : computed.transform;
80
+ this.clearMotion();
81
+ if (matchMedia("(prefers-reduced-motion: reduce)").matches) {
82
+ if (this.state.dialog.kind === "closing") this.setState({ dialog: { kind: "closed" } });
83
+ return;
84
+ }
85
+ const to = this.state.dialog.kind === "closing" ? offset : "none";
86
+ const animation = dialog.animate([{ transform: from }, { transform: to }], {
87
+ duration: DRAWER_DURATION_MS,
88
+ easing: DRAWER_EASING,
89
+ fill: "both"
90
+ });
91
+ this.motion = animation;
92
+ animation.finished.then(this.finishMotion.bind(this, animation), ignoreCancelledAnimation);
93
+ }
94
+ finishMotion(animation) {
95
+ if (this.motion !== animation) return;
96
+ if (this.state.dialog.kind === "closing") {
97
+ this.setState({ dialog: { kind: "closed" } });
98
+ return;
99
+ }
100
+ this.clearMotion();
101
+ }
102
+ requestClose = () => {
103
+ if (this.state.dialog.kind === "open") this.props.onClose();
104
+ };
105
+ rememberBackdrop = (event) => {
106
+ this.startedOutside = isBackdrop(event);
107
+ };
108
+ closeBackdrop = (event) => {
109
+ const shouldClose = this.startedOutside && isBackdrop(event);
110
+ this.startedOutside = false;
111
+ if (!shouldClose) return;
112
+ event.stopPropagation();
113
+ this.requestClose();
114
+ };
115
+ cancelDialog = (event) => {
116
+ event.preventDefault();
117
+ event.stopPropagation();
118
+ this.requestClose();
119
+ };
120
+ render() {
121
+ if (this.state.dialog.kind === "closed" || typeof document === "undefined") return null;
122
+ return createPortal(/* @__PURE__ */ jsx(Theme, {
123
+ tag: "div",
124
+ theme: this.props.theme,
125
+ tokens: { [this.props.theme]: this.props.tokens },
126
+ children: /* @__PURE__ */ jsx("dialog", {
127
+ ref: this.setDialog,
128
+ "data-seams-root": "",
129
+ "data-presentation": this.props.presentation,
130
+ "data-state": this.state.dialog.kind,
131
+ className: "seams-account-dialog",
132
+ "aria-label": this.props.label,
133
+ onCancel: this.cancelDialog,
134
+ onPointerDown: this.rememberBackdrop,
135
+ onClick: this.closeBackdrop,
136
+ children: this.state.dialog.content
137
+ })
138
+ }), document.body);
139
+ }
140
+ };
141
+ function AccountSettingsDialog(props) {
142
+ const locale = useWalletLocale();
143
+ const { theme, tokens } = useTheme();
144
+ return /* @__PURE__ */ jsx(SettingsDialog, {
145
+ presentation: props.presentation,
146
+ isOpen: props.isOpen,
147
+ onClose: props.onClose,
148
+ theme,
149
+ tokens,
150
+ label: walletText(locale, "Wallet settings"),
151
+ children: props.children
152
+ });
153
+ }
154
+ //#endregion
155
+ export { AccountSettingsDialog };
156
+
157
+ //# sourceMappingURL=AccountSettingsDialog.js.map
@@ -2,6 +2,7 @@ import { walletDisplayText, walletText } from "../../../core/ui/messages.js";
2
2
  import { WalletText, useWalletLocale } from "../../context/WalletLocale.js";
3
3
  import { useSeams } from "../../context/index.js";
4
4
  import { AccountMenuDialogFrame } from "./AccountMenuDialog.js";
5
+ import { ExternalWalletSettingsView } from "./ExternalWalletSettings.js";
5
6
  import { AuthenticationMethodRow } from "./AuthenticationMethodRow.js";
6
7
  import { VoiceIdMethodRow, VoiceIdSetupRow } from "./VoiceIdAvailabilityControl.js";
7
8
  import { AuthenticationMethodsView } from "./AuthenticationMethodsView.js";
@@ -115,7 +116,18 @@ function methodDescription(method) {
115
116
  case "voiceid": return "Voice unlock on this device";
116
117
  }
117
118
  }
118
- const AuthenticationMethodsModal = ({ walletId, isOpen, onClose, presentation }) => {
119
+ function AuthenticationMethodsModal(props) {
120
+ const { loginState } = useSeams();
121
+ if (!props.isOpen) return null;
122
+ if (loginState.isLoggedIn && loginState.access === "external") return /* @__PURE__ */ jsx(ExternalWalletSettingsView, {
123
+ settings: loginState.externalSettings,
124
+ view: "methods",
125
+ presentation: props.presentation,
126
+ onClose: props.onClose
127
+ });
128
+ return /* @__PURE__ */ jsx(OwnerAuthenticationMethodsModal, { ...props });
129
+ }
130
+ const OwnerAuthenticationMethodsModal = ({ walletId, isOpen, onClose, presentation }) => {
119
131
  const locale = useWalletLocale();
120
132
  const { seams, loginState, refreshSession } = useSeams();
121
133
  const [loadState, setLoadState] = React.useState({ kind: "idle" });
@@ -0,0 +1,46 @@
1
+ import { walletText } from "../../../core/ui/messages.js";
2
+ import { WalletText, useWalletLocale } from "../../context/WalletLocale.js";
3
+ import { AccountMenuDialogFrame } from "./AccountMenuDialog.js";
4
+ import { AccountMenuDeviceDetails } from "./AccountMenuDeviceDetails.js";
5
+ import { useRef } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ //#region src/react/components/AccountMenuButton/ExternalWalletSettings.tsx
8
+ function ExternalWalletSettingsView(props) {
9
+ const locale = useWalletLocale();
10
+ const ref = useRef(null);
11
+ const title = props.view === "methods" ? "Authentication methods" : "Linked devices";
12
+ const details = props.view === "methods" ? props.settings.methods.map(methodDetail.bind(null, locale)) : props.settings.devices.map(deviceDetail.bind(null, locale));
13
+ return /* @__PURE__ */ jsxs(AccountMenuDialogFrame, {
14
+ presentation: props.presentation,
15
+ onClose: props.onClose,
16
+ dialogRef: ref,
17
+ contentClassName: "",
18
+ titleId: `external-wallet-${props.view}`,
19
+ title,
20
+ children: [/* @__PURE__ */ jsx(AccountMenuDeviceDetails, {
21
+ title: "Wallet access",
22
+ description: "Connected to your wallet",
23
+ details
24
+ }), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(WalletText, { message: "Confirm with a wallet authentication method to make security changes." }) })]
25
+ });
26
+ }
27
+ function methodDetail(locale, method, index) {
28
+ return {
29
+ label: walletText(locale, "Method {value0}", { value0: index + 1 }),
30
+ value: {
31
+ passkey: "Passkey",
32
+ email_otp: "Email code",
33
+ voiceid: "VoiceID"
34
+ }[method.kind]
35
+ };
36
+ }
37
+ function deviceDetail(locale, _device, index) {
38
+ return {
39
+ label: walletText(locale, "Device {value0}", { value0: index + 1 }),
40
+ value: "Active"
41
+ };
42
+ }
43
+ //#endregion
44
+ export { ExternalWalletSettingsView };
45
+
46
+ //# sourceMappingURL=ExternalWalletSettings.js.map
@@ -1,8 +1,9 @@
1
1
  import { walletDisplayText, walletText } from "../../../core/ui/messages.js";
2
2
  import { WalletText, useWalletLocale } from "../../context/WalletLocale.js";
3
3
  import { useSeams } from "../../context/index.js";
4
- import { AccountMenuDeviceDetails } from "./AccountMenuDeviceDetails.js";
5
4
  import { AccountMenuDialogFrame } from "./AccountMenuDialog.js";
5
+ import { AccountMenuDeviceDetails } from "./AccountMenuDeviceDetails.js";
6
+ import { ExternalWalletSettingsView } from "./ExternalWalletSettings.js";
6
7
  import { MailIcon } from "./icons/MailIcon.js";
7
8
  import { AuthenticationMethodRow } from "./AuthenticationMethodRow.js";
8
9
  import { LaptopIcon } from "./icons/LaptopIcon.js";
@@ -214,7 +215,18 @@ function withLinkedDevicesLoadTimeout(promise) {
214
215
  });
215
216
  });
216
217
  }
217
- const LinkedDevicesModal = ({ walletId, isOpen, onClose, presentation }) => {
218
+ function LinkedDevicesModal(props) {
219
+ const { loginState } = useSeams();
220
+ if (!props.isOpen) return null;
221
+ if (loginState.isLoggedIn && loginState.access === "external") return /* @__PURE__ */ jsx(ExternalWalletSettingsView, {
222
+ settings: loginState.externalSettings,
223
+ view: "devices",
224
+ presentation: props.presentation,
225
+ onClose: props.onClose
226
+ });
227
+ return /* @__PURE__ */ jsx(OwnerLinkedDevicesModal, { ...props });
228
+ }
229
+ const OwnerLinkedDevicesModal = ({ walletId, isOpen, onClose, presentation }) => {
218
230
  const locale = useWalletLocale();
219
231
  const { seams, loginState } = useSeams();
220
232
  const [loadState, setLoadState] = React.useState({ kind: "idle" });