@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.
- package/dist/.build-inputs.sha256 +1 -1
- package/dist/esm/SeamsWeb/publicApi/near.js +22 -11
- package/dist/esm/SeamsWeb/walletIframe/client/nearCommands.js +9 -10
- package/dist/esm/SeamsWeb/walletIframe/client/router.js +95 -38
- package/dist/esm/SeamsWeb/walletIframe/client/sessionCommands.js +16 -0
- package/dist/esm/SeamsWeb/walletIframe/host/surface-measurement-reporter.js +1 -0
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.js +1 -1
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.js +28 -0
- package/dist/esm/SeamsWeb/walletIframe/host/walletMutationGuard.js +1 -0
- package/dist/esm/SeamsWeb/walletIframe/shared/exactSessionState.js +27 -4
- package/dist/esm/SeamsWeb/walletIframe/shared/messages.js +7 -1
- package/dist/esm/core/authMethods/plugins.js +8 -2
- package/dist/esm/core/rpcClients/near/NearClient.js +7 -0
- package/dist/esm/core/signingEngine/flows/signNear/signTransactions.js +3 -0
- package/dist/esm/core/signingEngine/nearTransactionSubmission.js +89 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/confirm-surface-resize.js +2 -2
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ReviewDisclosure.js +7 -1
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountConfirmationSurface.js +123 -14
- package/dist/esm/core/ui/messages.js +17 -0
- package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonView.js +35 -22
- package/dist/esm/react/components/AccountMenuButton/AccountSettingsDialog.js +157 -0
- package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodsModal.js +13 -1
- package/dist/esm/react/components/AccountMenuButton/ExternalWalletSettings.js +46 -0
- package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.js +14 -2
- package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.js +1 -1
- package/dist/esm/react/components/AccountMenuButton/Web3AuthProfileButton.css +154 -5
- package/dist/esm/react/components/AccountMenuButton/icons/HoverArrowIcon.css +27 -3
- package/dist/esm/react/components/AccountMenuButton/icons/HoverArrowIcon.js +2 -2
- package/dist/esm/react/components/AccountMenuButton/index.js +7 -3
- package/dist/esm/react/components/ExternalNearWalletIcon.js +32 -0
- package/dist/esm/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.css +182 -0
- package/dist/esm/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.js +315 -0
- package/dist/esm/react/components/HostedSeamsAuthMenu/shell.js +13 -4
- package/dist/esm/react/components/externalWalletBrandImages.js +7 -0
- package/dist/esm/react/context/reactLoginStateBuilders.js +20 -0
- package/dist/esm/react/externalNear.js +2 -6
- package/dist/esm/react/index.js +2 -1
- package/dist/esm/react/styles/styles.css +364 -8
- package/dist/esm/react/styles.css +1 -0
- package/dist/esm/react/transactionReview/boundCalls.js +31 -26
- package/dist/esm/sdk/{ConfirmationDrawer-BmzikAr4.js → ConfirmationDrawer-MJoE0AAo.js} +1 -1
- package/dist/{public/sdk/NonceCoordinator-CcD2FqXh.js → esm/sdk/NonceCoordinator-3YhmDTS5.js} +1 -1
- package/dist/{public/sdk/SeamsWordmark-DqiC9-sd.js → esm/sdk/SeamsWordmark-DwvPx2UA.js} +1 -1
- package/dist/esm/sdk/{accountLifecycle-gm9X8nGm.js → accountLifecycle-6DHYWf0v.js} +1 -1
- package/dist/esm/sdk/{adapters-e7twFGov.js → adapters-C-g_hkkZ.js} +1 -1
- package/dist/esm/sdk/appearance-token-vars-01eH9pgA.js +1 -0
- package/dist/{public/sdk/clientSessionPersistenceState-YvVHKRoe.js → esm/sdk/clientSessionPersistenceState-BCkJAYSz.js} +1 -1
- package/dist/esm/sdk/{collectAuthenticationCredentialForChallengeB64u-DEtxiKND.js → collectAuthenticationCredentialForChallengeB64u-I4wq8OGq.js} +1 -1
- package/dist/esm/sdk/{commitQueue-CHJ7MHSI.js → commitQueue-CYruPlkm.js} +1 -1
- package/dist/esm/sdk/configBuilder-DpChXfDO.js +1 -0
- package/dist/esm/sdk/{configuration-DBEc3bsj.js → configuration-BAad7ngq.js} +1 -1
- package/dist/esm/sdk/confirm-ui-em0vkd2m.js +2 -0
- package/dist/esm/sdk/{device-linking-BsUTtSF7.js → device-linking-DiCNt3iA.js} +1 -1
- package/dist/esm/sdk/{deviceLinkApproval-DAZTjrud.js → deviceLinkApproval-x3WkiYrd.js} +1 -1
- package/dist/esm/sdk/{display-BYzolrBs.js → display-D0EPmU4w.js} +1 -1
- package/dist/{public/sdk/ecdsaCapabilityManifest-CXVq8Qzb.js → esm/sdk/ecdsaCapabilityManifest-DAJEVjlP.js} +1 -1
- package/dist/esm/sdk/{ecdsaDerivationClientWasm-CVahDxLy.js → ecdsaDerivationClientWasm-AYOJgTJm.js} +1 -1
- package/dist/{public/sdk/ecdsaDerivationExport-CkmSe0ao.js → esm/sdk/ecdsaDerivationExport-DJKOzDbS.js} +1 -1
- package/dist/esm/sdk/{ecdsaWalletRecords-zRvHKRTe.js → ecdsaWalletRecords-WLyq414E.js} +1 -1
- package/dist/esm/sdk/{emailOtpEcdsaDerivationIdentity-0DIuRNRi.js → emailOtpEcdsaDerivationIdentity-HFQXc1Yw.js} +1 -1
- package/dist/esm/sdk/{enrichDisplayModelWithAbi-CLn37drs.js → enrichDisplayModelWithAbi-O6Mw4i2E.js} +1 -1
- package/dist/esm/sdk/errors-BJBDbwHk.js +1 -0
- package/dist/esm/sdk/{evmCryptoWasm-B_p82tx9.js → evmCryptoWasm-BUPb4hBH.js} +1 -1
- package/dist/esm/sdk/{export-viewer-host-3fosWJXJ.js → export-viewer-host-BSTfHhau.js} +1 -1
- package/dist/esm/sdk/{exportKeypairOperation-pKQW5J7m.js → exportKeypairOperation-CjST_NUK.js} +1 -1
- package/dist/esm/sdk/host-C51z-AxP.js +1 -0
- package/dist/{public/sdk/icons-DDRXJ2W1.js → esm/sdk/icons-BlMXolHv.js} +1 -1
- package/dist/esm/sdk/{indexedDB-CWFDCCbP.js → indexedDB-C4SDsyOG.js} +1 -1
- package/dist/esm/sdk/{intentDigest-B6EshTea.js → intentDigest-HvRsBQ1z.js} +1 -1
- package/dist/esm/sdk/{lanes-C2sAP08w.js → lanes-BU-fGqY4.js} +1 -1
- package/dist/esm/sdk/{localOnly-Jw9v9GU9.js → localOnly-Xs89Xajm.js} +1 -1
- package/dist/{public/sdk/mountExportPrivateKeySurface-B_052qyI.js → esm/sdk/mountExportPrivateKeySurface-CsUEKeum.js} +1 -1
- package/dist/esm/sdk/{mountRecoveryCodeBackupSurface-PutmFjf9.js → mountRecoveryCodeBackupSurface-kFLo5zLk.js} +1 -1
- package/dist/esm/sdk/{nearEd25519YaoMaterialActivation-C2QNLImD.js → nearEd25519YaoMaterialActivation-BfXmy3Jr.js} +1 -1
- package/dist/{public/sdk/nearEd25519YaoSigningPreparation-K6n4Sq8_.js → esm/sdk/nearEd25519YaoSigningPreparation-DHNk0F8e.js} +1 -1
- package/dist/esm/sdk/nearRpcResults-CeHdqaS4.js +1 -0
- package/dist/esm/sdk/{nonceLaneKeys-CZjeiii7.js → nonceLaneKeys-BF_UpvIy.js} +1 -1
- package/dist/esm/sdk/{normalization-DA6o5MsH.js → normalization-Df9fZWJC.js} +1 -1
- package/dist/{public/sdk/pendingWalletRecoveryCodeBackup-B-n7vmBS.js → esm/sdk/pendingWalletRecoveryCodeBackup-B-R_U34I.js} +1 -1
- package/dist/esm/sdk/{presignaturePool-DjTaB0nx.js → presignaturePool-BbvqRWYw.js} +1 -1
- package/dist/esm/sdk/{recovery-entrypoint-9e3SXU3t.js → recovery-entrypoint-DJbMDC_m.js} +1 -1
- package/dist/esm/sdk/{registration-C988Nwzn.js → registration-Byl4l4yZ.js} +1 -1
- package/dist/esm/sdk/{registration-D4AijOa8.js → registration-C2fb9kRQ.js} +1 -1
- package/dist/esm/sdk/{registrationAccounts-DI_vcT7G.js → registrationAccounts-4r74gX1l.js} +1 -1
- package/dist/esm/sdk/registrationIntent-Do1tD1V7.js +1 -0
- package/dist/esm/sdk/{registrationSignerPlan-_8gsSjC0.js → registrationSignerPlan-DK2b3N_p.js} +1 -1
- package/dist/{public/sdk/requireStepUpAuth-DC9LSyRI.js → esm/sdk/requireStepUpAuth-COqCGb1i.js} +1 -1
- package/dist/esm/sdk/resealedEnvelopeResult-CLW00Vbw.js +1 -0
- package/dist/esm/sdk/{routerAbNormalSigning-Da-uxxle.js → routerAbNormalSigning-D-UZmCBS.js} +1 -1
- package/dist/esm/sdk/runtime-auth-ufbVur2p.js +1 -0
- package/dist/esm/sdk/{runtime-device-link-DtjR-htE.js → runtime-device-link-CagI2Q62.js} +1 -1
- package/dist/{public/sdk/runtime-ecdsa-tempo-BkUnzoX9.js → esm/sdk/runtime-ecdsa-tempo-Rctxr0yM.js} +1 -1
- package/dist/{public/sdk/runtime-email-otp-CaxfpqKI.js → esm/sdk/runtime-email-otp-BQtcG-LF.js} +1 -1
- package/dist/esm/sdk/{runtime-export-Du5ugbzi.js → runtime-export-wTeEaqlk.js} +1 -1
- package/dist/esm/sdk/runtime-near-59yU_3ud.js +1 -0
- package/dist/esm/sdk/runtime-preferences-B9qLHX8W.js +1 -0
- package/dist/esm/sdk/runtime-recovery-DNyzdMBj.js +1 -0
- package/dist/esm/sdk/{runtime-recovery-codes-DKjOU32G.js → runtime-recovery-codes-si1fGktB.js} +1 -1
- package/dist/esm/sdk/runtimeContext-ByeM6Z4Z.js +6 -0
- package/dist/{public/sdk/secp256k1--vF2pJgR.js → esm/sdk/secp256k1-CE7-q9Sn.js} +1 -1
- package/dist/esm/sdk/sessionObservationRevision-ihBwjS3y.js +1 -0
- package/dist/esm/sdk/{signEvmFamily-DeCQOBYN.js → signEvmFamily-BY5jlZEG.js} +1 -1
- package/dist/{public/sdk/signEvmFamilyWithUiConfirmForTempo-BIp-MeBV.js → esm/sdk/signEvmFamilyWithUiConfirmForTempo-CrMIAXUe.js} +1 -1
- package/dist/esm/sdk/{signEvmWithUiConfirm-BdLW7kqJ.js → signEvmWithUiConfirm-CGrLtMV6.js} +1 -1
- package/dist/esm/sdk/signNear-DMpJFkwF.js +1 -0
- package/dist/esm/sdk/{signatureUses-0z64Xpdj.js → signatureUses-kSrUHSSH.js} +1 -1
- package/dist/{public/sdk/signingFlow-C7fwkxPx.js → esm/sdk/signingFlow-BcetvUeS.js} +1 -1
- package/dist/{public/sdk/signingQueue-DvHGcaLc.js → esm/sdk/signingQueue-dMFOFOP5.js} +1 -1
- package/dist/esm/sdk/surface-measurement-reporter-DXsvq401.js +1 -0
- package/dist/esm/sdk/{thresholdEcdsa-CPVZNLEg.js → thresholdEcdsa-CqR1fFA-.js} +1 -1
- package/dist/esm/sdk/{trace-BQv7E-bO.js → trace--mRP2OQc.js} +1 -1
- package/dist/esm/sdk/{transaction-activity-olcDRay5.js → transaction-activity-DCzHGg3b.js} +1 -1
- package/dist/esm/sdk/{transactionReviewAdmission-DPxuDgkU.js → transactionReviewAdmission-Cf_qUZJt.js} +1 -1
- package/dist/esm/sdk/{transactionState-C8aYSDRA.js → transactionState-29T9xfvL.js} +1 -1
- package/dist/esm/sdk/tx-confirm-ui.js +181 -18
- package/dist/esm/sdk/{types-DOToeB6g.js → types-f7dyj5N6.js} +1 -1
- package/dist/esm/sdk/{unlockedEd25519ExportRootCapability-CFmunau5.js → unlockedEd25519ExportRootCapability-yzxQjIFd.js} +1 -1
- package/dist/esm/sdk/voiceid-host.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/{public/sdk/wallet-recovery-jyfGoejZ.js → esm/sdk/wallet-recovery-BZB2Vu3X.js} +1 -1
- package/dist/esm/sdk/wallet-ui.css +1 -1
- package/dist/esm/sdk/{walletAuthMethodRecord-Bi78B6Ab.js → walletAuthMethodRecord-DLBB5fez.js} +1 -1
- package/dist/{public/sdk/walletAuthority-DGdC9Glh.js → esm/sdk/walletAuthority-BTGAuOi8.js} +1 -1
- package/dist/esm/sdk/{walletCapabilityBindings-BRdFdh3l.js → walletCapabilityBindings-D5YYB7nN.js} +1 -1
- package/dist/esm/sdk/{walletCustodyEcdsaContinuity-DdLNQs1M.js → walletCustodyEcdsaContinuity-C31YQ9av.js} +1 -1
- package/dist/{public/sdk/walletOwnershipGeneration-z9NXOk-b.js → esm/sdk/walletOwnershipGeneration-CgjCtPrV.js} +1 -1
- package/dist/{public/sdk/walletRecoveryAdminProof-hytB9fXI.js → esm/sdk/walletRecoveryAdminProof-B4Ic07jY.js} +1 -1
- package/dist/{public/sdk/walletRecoveryCommit-sr8-RYvn.js → esm/sdk/walletRecoveryCommit-Cc2LAkCS.js} +1 -1
- package/dist/{public/sdk/walletSessionAuthorizationStore-BEJyERPZ.js → esm/sdk/walletSessionAuthorizationStore-B9Vwkshr.js} +1 -1
- package/dist/esm/sdk/warmSessionHydration-B-A5Tdx7.js +1 -0
- package/dist/esm/sdk/{webauthnP256-DVlYEUsG.js → webauthnP256-BsQQPurm.js} +1 -1
- package/dist/esm/shared-ts/src/auth/externalAuth.js +53 -0
- package/dist/esm/shared-ts/src/near/nearClient.js +1 -1
- package/dist/esm/shared-ts/src/utils/errors.js +50 -2
- package/dist/esm/shared-ts/src/utils/index.js +1 -1
- package/dist/esm/voiceid-host.js +1 -1
- package/dist/public/headers.manifest.json +1 -1
- package/dist/public/sdk/{ConfirmationDrawer-BmzikAr4.js → ConfirmationDrawer-MJoE0AAo.js} +1 -1
- package/dist/{esm/sdk/NonceCoordinator-CcD2FqXh.js → public/sdk/NonceCoordinator-3YhmDTS5.js} +1 -1
- package/dist/{esm/sdk/SeamsWordmark-DqiC9-sd.js → public/sdk/SeamsWordmark-DwvPx2UA.js} +1 -1
- package/dist/public/sdk/{accountLifecycle-gm9X8nGm.js → accountLifecycle-6DHYWf0v.js} +1 -1
- package/dist/public/sdk/{adapters-e7twFGov.js → adapters-C-g_hkkZ.js} +1 -1
- package/dist/public/sdk/appearance-token-vars-01eH9pgA.js +1 -0
- package/dist/{esm/sdk/clientSessionPersistenceState-YvVHKRoe.js → public/sdk/clientSessionPersistenceState-BCkJAYSz.js} +1 -1
- package/dist/public/sdk/{collectAuthenticationCredentialForChallengeB64u-DEtxiKND.js → collectAuthenticationCredentialForChallengeB64u-I4wq8OGq.js} +1 -1
- package/dist/public/sdk/{commitQueue-CHJ7MHSI.js → commitQueue-CYruPlkm.js} +1 -1
- package/dist/public/sdk/configBuilder-DpChXfDO.js +1 -0
- package/dist/public/sdk/{configuration-DBEc3bsj.js → configuration-BAad7ngq.js} +1 -1
- package/dist/public/sdk/confirm-ui-em0vkd2m.js +2 -0
- package/dist/public/sdk/{device-linking-BsUTtSF7.js → device-linking-DiCNt3iA.js} +1 -1
- package/dist/public/sdk/{deviceLinkApproval-DAZTjrud.js → deviceLinkApproval-x3WkiYrd.js} +1 -1
- package/dist/public/sdk/{display-BYzolrBs.js → display-D0EPmU4w.js} +1 -1
- package/dist/{esm/sdk/ecdsaCapabilityManifest-CXVq8Qzb.js → public/sdk/ecdsaCapabilityManifest-DAJEVjlP.js} +1 -1
- package/dist/public/sdk/{ecdsaDerivationClientWasm-CVahDxLy.js → ecdsaDerivationClientWasm-AYOJgTJm.js} +1 -1
- package/dist/{esm/sdk/ecdsaDerivationExport-CkmSe0ao.js → public/sdk/ecdsaDerivationExport-DJKOzDbS.js} +1 -1
- package/dist/public/sdk/{ecdsaWalletRecords-zRvHKRTe.js → ecdsaWalletRecords-WLyq414E.js} +1 -1
- package/dist/public/sdk/{emailOtpEcdsaDerivationIdentity-0DIuRNRi.js → emailOtpEcdsaDerivationIdentity-HFQXc1Yw.js} +1 -1
- package/dist/public/sdk/{enrichDisplayModelWithAbi-CLn37drs.js → enrichDisplayModelWithAbi-O6Mw4i2E.js} +1 -1
- package/dist/public/sdk/errors-BJBDbwHk.js +1 -0
- package/dist/public/sdk/{evmCryptoWasm-B_p82tx9.js → evmCryptoWasm-BUPb4hBH.js} +1 -1
- package/dist/public/sdk/{export-viewer-host-3fosWJXJ.js → export-viewer-host-BSTfHhau.js} +1 -1
- package/dist/public/sdk/{exportKeypairOperation-pKQW5J7m.js → exportKeypairOperation-CjST_NUK.js} +1 -1
- package/dist/public/sdk/host-C51z-AxP.js +1 -0
- package/dist/{esm/sdk/icons-DDRXJ2W1.js → public/sdk/icons-BlMXolHv.js} +1 -1
- package/dist/public/sdk/{indexedDB-CWFDCCbP.js → indexedDB-C4SDsyOG.js} +1 -1
- package/dist/public/sdk/{intentDigest-B6EshTea.js → intentDigest-HvRsBQ1z.js} +1 -1
- package/dist/public/sdk/{lanes-C2sAP08w.js → lanes-BU-fGqY4.js} +1 -1
- package/dist/public/sdk/{localOnly-Jw9v9GU9.js → localOnly-Xs89Xajm.js} +1 -1
- package/dist/{esm/sdk/mountExportPrivateKeySurface-B_052qyI.js → public/sdk/mountExportPrivateKeySurface-CsUEKeum.js} +1 -1
- package/dist/public/sdk/{mountRecoveryCodeBackupSurface-PutmFjf9.js → mountRecoveryCodeBackupSurface-kFLo5zLk.js} +1 -1
- package/dist/public/sdk/{nearEd25519YaoMaterialActivation-C2QNLImD.js → nearEd25519YaoMaterialActivation-BfXmy3Jr.js} +1 -1
- package/dist/{esm/sdk/nearEd25519YaoSigningPreparation-K6n4Sq8_.js → public/sdk/nearEd25519YaoSigningPreparation-DHNk0F8e.js} +1 -1
- package/dist/public/sdk/nearRpcResults-CeHdqaS4.js +1 -0
- package/dist/public/sdk/{nonceLaneKeys-CZjeiii7.js → nonceLaneKeys-BF_UpvIy.js} +1 -1
- package/dist/public/sdk/{normalization-DA6o5MsH.js → normalization-Df9fZWJC.js} +1 -1
- package/dist/{esm/sdk/pendingWalletRecoveryCodeBackup-B-n7vmBS.js → public/sdk/pendingWalletRecoveryCodeBackup-B-R_U34I.js} +1 -1
- package/dist/public/sdk/{presignaturePool-DjTaB0nx.js → presignaturePool-BbvqRWYw.js} +1 -1
- package/dist/public/sdk/{recovery-entrypoint-9e3SXU3t.js → recovery-entrypoint-DJbMDC_m.js} +1 -1
- package/dist/public/sdk/{registration-C988Nwzn.js → registration-Byl4l4yZ.js} +1 -1
- package/dist/public/sdk/{registration-D4AijOa8.js → registration-C2fb9kRQ.js} +1 -1
- package/dist/public/sdk/{registrationAccounts-DI_vcT7G.js → registrationAccounts-4r74gX1l.js} +1 -1
- package/dist/public/sdk/registrationIntent-Do1tD1V7.js +1 -0
- package/dist/public/sdk/{registrationSignerPlan-_8gsSjC0.js → registrationSignerPlan-DK2b3N_p.js} +1 -1
- package/dist/{esm/sdk/requireStepUpAuth-DC9LSyRI.js → public/sdk/requireStepUpAuth-COqCGb1i.js} +1 -1
- package/dist/public/sdk/resealedEnvelopeResult-CLW00Vbw.js +1 -0
- package/dist/public/sdk/{routerAbNormalSigning-Da-uxxle.js → routerAbNormalSigning-D-UZmCBS.js} +1 -1
- package/dist/public/sdk/runtime-auth-ufbVur2p.js +1 -0
- package/dist/public/sdk/{runtime-device-link-DtjR-htE.js → runtime-device-link-CagI2Q62.js} +1 -1
- package/dist/{esm/sdk/runtime-ecdsa-tempo-BkUnzoX9.js → public/sdk/runtime-ecdsa-tempo-Rctxr0yM.js} +1 -1
- package/dist/{esm/sdk/runtime-email-otp-CaxfpqKI.js → public/sdk/runtime-email-otp-BQtcG-LF.js} +1 -1
- package/dist/public/sdk/{runtime-export-Du5ugbzi.js → runtime-export-wTeEaqlk.js} +1 -1
- package/dist/public/sdk/runtime-near-59yU_3ud.js +1 -0
- package/dist/public/sdk/runtime-preferences-B9qLHX8W.js +1 -0
- package/dist/public/sdk/runtime-recovery-DNyzdMBj.js +1 -0
- package/dist/public/sdk/{runtime-recovery-codes-DKjOU32G.js → runtime-recovery-codes-si1fGktB.js} +1 -1
- package/dist/public/sdk/runtimeContext-ByeM6Z4Z.js +6 -0
- package/dist/{esm/sdk/secp256k1--vF2pJgR.js → public/sdk/secp256k1-CE7-q9Sn.js} +1 -1
- package/dist/public/sdk/sessionObservationRevision-ihBwjS3y.js +1 -0
- package/dist/public/sdk/{signEvmFamily-DeCQOBYN.js → signEvmFamily-BY5jlZEG.js} +1 -1
- package/dist/{esm/sdk/signEvmFamilyWithUiConfirmForTempo-BIp-MeBV.js → public/sdk/signEvmFamilyWithUiConfirmForTempo-CrMIAXUe.js} +1 -1
- package/dist/public/sdk/{signEvmWithUiConfirm-BdLW7kqJ.js → signEvmWithUiConfirm-CGrLtMV6.js} +1 -1
- package/dist/public/sdk/signNear-DMpJFkwF.js +1 -0
- package/dist/public/sdk/{signatureUses-0z64Xpdj.js → signatureUses-kSrUHSSH.js} +1 -1
- package/dist/{esm/sdk/signingFlow-C7fwkxPx.js → public/sdk/signingFlow-BcetvUeS.js} +1 -1
- package/dist/{esm/sdk/signingQueue-DvHGcaLc.js → public/sdk/signingQueue-dMFOFOP5.js} +1 -1
- package/dist/public/sdk/surface-measurement-reporter-DXsvq401.js +1 -0
- package/dist/public/sdk/{thresholdEcdsa-CPVZNLEg.js → thresholdEcdsa-CqR1fFA-.js} +1 -1
- package/dist/public/sdk/{trace-BQv7E-bO.js → trace--mRP2OQc.js} +1 -1
- package/dist/public/sdk/{transaction-activity-olcDRay5.js → transaction-activity-DCzHGg3b.js} +1 -1
- package/dist/public/sdk/{transactionReviewAdmission-DPxuDgkU.js → transactionReviewAdmission-Cf_qUZJt.js} +1 -1
- package/dist/public/sdk/{transactionState-C8aYSDRA.js → transactionState-29T9xfvL.js} +1 -1
- package/dist/public/sdk/tx-confirm-ui.js +181 -18
- package/dist/public/sdk/{types-DOToeB6g.js → types-f7dyj5N6.js} +1 -1
- package/dist/public/sdk/{unlockedEd25519ExportRootCapability-CFmunau5.js → unlockedEd25519ExportRootCapability-yzxQjIFd.js} +1 -1
- package/dist/public/sdk/voiceid-host.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/{esm/sdk/wallet-recovery-jyfGoejZ.js → public/sdk/wallet-recovery-BZB2Vu3X.js} +1 -1
- package/dist/public/sdk/wallet-ui.css +1 -1
- package/dist/public/sdk/{walletAuthMethodRecord-Bi78B6Ab.js → walletAuthMethodRecord-DLBB5fez.js} +1 -1
- package/dist/{esm/sdk/walletAuthority-DGdC9Glh.js → public/sdk/walletAuthority-BTGAuOi8.js} +1 -1
- package/dist/public/sdk/{walletCapabilityBindings-BRdFdh3l.js → walletCapabilityBindings-D5YYB7nN.js} +1 -1
- package/dist/public/sdk/{walletCustodyEcdsaContinuity-DdLNQs1M.js → walletCustodyEcdsaContinuity-C31YQ9av.js} +1 -1
- package/dist/{esm/sdk/walletOwnershipGeneration-z9NXOk-b.js → public/sdk/walletOwnershipGeneration-CgjCtPrV.js} +1 -1
- package/dist/{esm/sdk/walletRecoveryAdminProof-hytB9fXI.js → public/sdk/walletRecoveryAdminProof-B4Ic07jY.js} +1 -1
- package/dist/{esm/sdk/walletRecoveryCommit-sr8-RYvn.js → public/sdk/walletRecoveryCommit-Cc2LAkCS.js} +1 -1
- package/dist/{esm/sdk/walletSessionAuthorizationStore-BEJyERPZ.js → public/sdk/walletSessionAuthorizationStore-B9Vwkshr.js} +1 -1
- package/dist/public/sdk/warmSessionHydration-B-A5Tdx7.js +1 -0
- package/dist/public/sdk/{webauthnP256-DVlYEUsG.js → webauthnP256-BsQQPurm.js} +1 -1
- package/dist/public/wallet-assets.manifest.json +275 -251
- package/dist/public/wallet-service/index.html +4 -4
- package/dist/types/shared-ts/src/auth/externalAuth.d.ts +84 -0
- package/dist/types/wallet/src/SeamsWeb/operations/devices/walletHostOwnerAuthority.d.ts +2 -1
- package/dist/types/wallet/src/SeamsWeb/publicApi/auth.d.ts +1 -1
- package/dist/types/wallet/src/SeamsWeb/publicApi/types.d.ts +11 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/client/router.d.ts +4 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/WalletHostRuntime.d.ts +4 -2
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/createSessionCommands.d.ts +5 -2
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/externalAuth.d.ts +29 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/requestRouter.d.ts +1 -1
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/sessionObserver.d.ts +1 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.d.ts +1 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/messages.d.ts +5 -3
- package/dist/types/wallet/src/core/authMethods/hostPlugin.d.ts +1 -0
- package/dist/types/wallet/src/core/authMethods/plugins.d.ts +2 -0
- package/dist/types/wallet/src/core/rpcClients/near/NearClient.d.ts +13 -0
- package/dist/types/wallet/src/core/signingEngine/nearTransactionSubmission.d.ts +24 -0
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/transactionReviewAdmission.d.ts +2 -0
- package/dist/types/wallet/src/core/types/linkDevice.d.ts +4 -5
- package/dist/types/wallet/src/core/types/seams.d.ts +29 -9
- package/dist/types/wallet/src/core/ui/messages.d.ts +1 -1
- package/dist/types/wallet/src/index.d.ts +1 -0
- package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuButtonView.d.ts +2 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/AccountSettingsDialog.d.ts +10 -0
- package/dist/types/wallet/src/react/components/AccountMenuButton/AuthenticationMethodsModal.d.ts +1 -2
- package/dist/types/wallet/src/react/components/AccountMenuButton/ExternalWalletSettings.d.ts +10 -0
- package/dist/types/wallet/src/react/components/AccountMenuButton/LinkedDevicesModal.d.ts +1 -2
- package/dist/types/wallet/src/react/components/AccountMenuButton/WalletSettingsLayout.d.ts +1 -0
- package/dist/types/wallet/src/react/components/AccountMenuButton/hooks/useProfileState.d.ts +2 -2
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/HoverArrowIcon.d.ts +2 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/types.d.ts +4 -3
- package/dist/types/wallet/src/react/components/ExternalNearWalletIcon.d.ts +5 -0
- package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.d.ts +31 -0
- package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/types.d.ts +4 -0
- package/dist/types/wallet/src/react/components/externalWalletBrandImages.d.ts +3 -0
- package/dist/types/wallet/src/react/components/theme/design-tokens.d.ts +2 -0
- package/dist/types/wallet/src/react/context/reactLoginStateBuilders.d.ts +1 -1
- package/dist/types/wallet/src/react/index.d.ts +2 -0
- package/dist/types/wallet/src/react/types.d.ts +13 -3
- package/dist/types/wallet/src/voiceid-host.d.ts +2 -2
- package/package.json +1 -1
- package/dist/esm/react/components/AccountMenuButton/AccountMenuModal.js +0 -66
- package/dist/esm/sdk/appearance-token-vars-EYbmnHsJ.js +0 -1
- package/dist/esm/sdk/configBuilder-CSwJrmcR.js +0 -1
- package/dist/esm/sdk/confirm-ui-BpqwuMSl.js +0 -2
- package/dist/esm/sdk/errors-DLUmUo9m.js +0 -1
- package/dist/esm/sdk/host-aTcpYE27.js +0 -1
- package/dist/esm/sdk/registrationIntent-BVPp0k0k.js +0 -1
- package/dist/esm/sdk/resealedEnvelopeResult-BKATJaqW.js +0 -1
- package/dist/esm/sdk/runtime-auth-C_Y8gL_n.js +0 -1
- package/dist/esm/sdk/runtime-near-fas7U0MC.js +0 -1
- package/dist/esm/sdk/runtime-preferences-7-f34-by.js +0 -1
- package/dist/esm/sdk/runtime-recovery-DmY0ZJpf.js +0 -1
- package/dist/esm/sdk/runtimeContext-DF8MdfXl.js +0 -6
- package/dist/esm/sdk/sessionObservationRevision-DKTqqbGf.js +0 -1
- package/dist/esm/sdk/signNear-DMzOU4dX.js +0 -1
- package/dist/esm/sdk/surface-measurement-reporter-DvzNDnHy.js +0 -1
- package/dist/esm/sdk/warmSessionHydration-EstsrMF8.js +0 -1
- package/dist/public/sdk/appearance-token-vars-EYbmnHsJ.js +0 -1
- package/dist/public/sdk/configBuilder-CSwJrmcR.js +0 -1
- package/dist/public/sdk/confirm-ui-BpqwuMSl.js +0 -2
- package/dist/public/sdk/errors-DLUmUo9m.js +0 -1
- package/dist/public/sdk/host-aTcpYE27.js +0 -1
- package/dist/public/sdk/registrationIntent-BVPp0k0k.js +0 -1
- package/dist/public/sdk/resealedEnvelopeResult-BKATJaqW.js +0 -1
- package/dist/public/sdk/runtime-auth-C_Y8gL_n.js +0 -1
- package/dist/public/sdk/runtime-near-fas7U0MC.js +0 -1
- package/dist/public/sdk/runtime-preferences-7-f34-by.js +0 -1
- package/dist/public/sdk/runtime-recovery-DmY0ZJpf.js +0 -1
- package/dist/public/sdk/runtimeContext-DF8MdfXl.js +0 -6
- package/dist/public/sdk/sessionObservationRevision-DKTqqbGf.js +0 -1
- package/dist/public/sdk/signNear-DMzOU4dX.js +0 -1
- package/dist/public/sdk/surface-measurement-reporter-DvzNDnHy.js +0 -1
- package/dist/public/sdk/warmSessionHydration-EstsrMF8.js +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuModal.d.ts +0 -9
- /package/dist/esm/sdk/{accountIds-Dj_0GoY-.js → accountIds-CW2BP-d9.js} +0 -0
- /package/dist/esm/sdk/{actions-BIdcxldy.js → actions-DrtSTGus.js} +0 -0
- /package/dist/esm/sdk/{appearance-CAIe7Qed.js → appearance-DL7c6bML.js} +0 -0
- /package/dist/esm/sdk/{authenticatorOptions-2_XK8aXv.js → authenticatorOptions-WCDKYRux.js} +0 -0
- /package/dist/esm/sdk/{authorizationAdmission-BYwaSZYV.js → authorizationAdmission-28jo_IVJ.js} +0 -0
- /package/dist/esm/sdk/{browser-B1qU6ouJ.js → browser-CKS7Tq2r.js} +0 -0
- /package/dist/esm/sdk/{bytes-CA0mv-bG.js → bytes-DXo6uALR.js} +0 -0
- /package/dist/esm/sdk/{canonicalSignerErrorCode-BHDPNkvJ.js → canonicalSignerErrorCode-CX5PBpkt.js} +0 -0
- /package/dist/esm/sdk/{challengeDelivery-DWix1oso.js → challengeDelivery-Dj9HrjW9.js} +0 -0
- /package/dist/esm/sdk/{confirmTypes-DmEPoxys.js → confirmTypes-BvVtQs-M.js} +0 -0
- /package/dist/esm/sdk/{csp-stylesheet-CHtV6HyK.js → csp-stylesheet-DUSqfXvZ.js} +0 -0
- /package/dist/esm/sdk/{digestEncoding-n8Kr2kow.js → digestEncoding-CqNXPZY9.js} +0 -0
- /package/dist/esm/sdk/{ecdsaChainTarget-Lh24LLyA.js → ecdsaChainTarget-Bm5X4k-V.js} +0 -0
- /package/dist/esm/sdk/{executeWorkerOperation-XmBNaxrV.js → executeWorkerOperation-C9FOCCR7.js} +0 -0
- /package/dist/esm/sdk/{helpers-dZehRP4i.js → helpers-Dubwo5uK.js} +0 -0
- /package/dist/esm/sdk/{jsonRpc-YKL5n8VL.js → jsonRpc-BVDv1wfm.js} +0 -0
- /package/dist/esm/sdk/{keccak-BArcwgbj.js → keccak-mS0Mejjx.js} +0 -0
- /package/dist/esm/sdk/{keyMaterialEnvelope-BsdlckmN.js → keyMaterialEnvelope-Dm2ZEilb.js} +0 -0
- /package/dist/esm/sdk/{normalization-dgJxtZKK.js → normalization-B3i1-rPQ.js} +0 -0
- /package/dist/esm/sdk/{operationFingerprint-DgpQfpM-.js → operationFingerprint-Bas59T7L.js} +0 -0
- /package/dist/esm/sdk/{presignatures-CjcyX_-F.js → presignatures-BCeq56DG.js} +0 -0
- /package/dist/esm/sdk/{prfCache-Ck1mh5YB.js → prfCache-DEHaUPSW.js} +0 -0
- /package/dist/esm/sdk/{profileAccountProjection-dvLchPBo.js → profileAccountProjection-C5sNt-s2.js} +0 -0
- /package/dist/esm/sdk/{promptText-BIv8lx7_.js → promptText-bcKcsSka.js} +0 -0
- /package/dist/esm/sdk/{recoveryAuthorization-CMVdZ5OR.js → recoveryAuthorization-CQsjb8Tm.js} +0 -0
- /package/dist/esm/sdk/{registrationAuthMethodInput-Be4Td0Ef.js → registrationAuthMethodInput-BR1WVbK3.js} +0 -0
- /package/dist/esm/sdk/{sdkSentEvents-QPs69K3s.js → sdkSentEvents-DjOlKtdW.js} +0 -0
- /package/dist/esm/sdk/{shared-hkHoIS9i.js → shared-CkHhXgFB.js} +0 -0
- /package/dist/esm/sdk/{signer-worker-CmCKlJ__.js → signer-worker-BNodGJKY.js} +0 -0
- /package/dist/esm/sdk/{signerDomain-BLnlQPAV.js → signerDomain-BAsLT3XN.js} +0 -0
- /package/dist/esm/sdk/{signerSlot-DgLzb3Ee.js → signerSlot-D2RZnb27.js} +0 -0
- /package/dist/esm/sdk/{types-COS7UL3R.js → types-C4OErbBf.js} +0 -0
- /package/dist/esm/sdk/{walletCustodyOperation-CAnT3Ww-.js → walletCustodyOperation-DimzAbCB.js} +0 -0
- /package/dist/esm/sdk/{walletSessionAuthorizationProjection-CMl69JGe.js → walletSessionAuthorizationProjection-BzUH6gHV.js} +0 -0
- /package/dist/esm/sdk/{walletSessionAuthorizationStatus-C_q9eiOH.js → walletSessionAuthorizationStatus-DG7DPcgR.js} +0 -0
- /package/dist/esm/sdk/{walletSessionFailure-ZfdbUAG-.js → walletSessionFailure-CxsVtroW.js} +0 -0
- /package/dist/esm/sdk/{webauthnPromptCoordinator-DMETRUcN.js → webauthnPromptCoordinator-npsSRD51.js} +0 -0
- /package/dist/public/sdk/{accountIds-Dj_0GoY-.js → accountIds-CW2BP-d9.js} +0 -0
- /package/dist/public/sdk/{actions-BIdcxldy.js → actions-DrtSTGus.js} +0 -0
- /package/dist/public/sdk/{appearance-CAIe7Qed.js → appearance-DL7c6bML.js} +0 -0
- /package/dist/public/sdk/{authenticatorOptions-2_XK8aXv.js → authenticatorOptions-WCDKYRux.js} +0 -0
- /package/dist/public/sdk/{authorizationAdmission-BYwaSZYV.js → authorizationAdmission-28jo_IVJ.js} +0 -0
- /package/dist/public/sdk/{browser-B1qU6ouJ.js → browser-CKS7Tq2r.js} +0 -0
- /package/dist/public/sdk/{bytes-CA0mv-bG.js → bytes-DXo6uALR.js} +0 -0
- /package/dist/public/sdk/{canonicalSignerErrorCode-BHDPNkvJ.js → canonicalSignerErrorCode-CX5PBpkt.js} +0 -0
- /package/dist/public/sdk/{challengeDelivery-DWix1oso.js → challengeDelivery-Dj9HrjW9.js} +0 -0
- /package/dist/public/sdk/{confirmTypes-DmEPoxys.js → confirmTypes-BvVtQs-M.js} +0 -0
- /package/dist/public/sdk/{csp-stylesheet-CHtV6HyK.js → csp-stylesheet-DUSqfXvZ.js} +0 -0
- /package/dist/public/sdk/{digestEncoding-n8Kr2kow.js → digestEncoding-CqNXPZY9.js} +0 -0
- /package/dist/public/sdk/{ecdsaChainTarget-Lh24LLyA.js → ecdsaChainTarget-Bm5X4k-V.js} +0 -0
- /package/dist/public/sdk/{executeWorkerOperation-XmBNaxrV.js → executeWorkerOperation-C9FOCCR7.js} +0 -0
- /package/dist/public/sdk/{helpers-dZehRP4i.js → helpers-Dubwo5uK.js} +0 -0
- /package/dist/public/sdk/{jsonRpc-YKL5n8VL.js → jsonRpc-BVDv1wfm.js} +0 -0
- /package/dist/public/sdk/{keccak-BArcwgbj.js → keccak-mS0Mejjx.js} +0 -0
- /package/dist/public/sdk/{keyMaterialEnvelope-BsdlckmN.js → keyMaterialEnvelope-Dm2ZEilb.js} +0 -0
- /package/dist/public/sdk/{normalization-dgJxtZKK.js → normalization-B3i1-rPQ.js} +0 -0
- /package/dist/public/sdk/{operationFingerprint-DgpQfpM-.js → operationFingerprint-Bas59T7L.js} +0 -0
- /package/dist/public/sdk/{presignatures-CjcyX_-F.js → presignatures-BCeq56DG.js} +0 -0
- /package/dist/public/sdk/{prfCache-Ck1mh5YB.js → prfCache-DEHaUPSW.js} +0 -0
- /package/dist/public/sdk/{profileAccountProjection-dvLchPBo.js → profileAccountProjection-C5sNt-s2.js} +0 -0
- /package/dist/public/sdk/{promptText-BIv8lx7_.js → promptText-bcKcsSka.js} +0 -0
- /package/dist/public/sdk/{recoveryAuthorization-CMVdZ5OR.js → recoveryAuthorization-CQsjb8Tm.js} +0 -0
- /package/dist/public/sdk/{registrationAuthMethodInput-Be4Td0Ef.js → registrationAuthMethodInput-BR1WVbK3.js} +0 -0
- /package/dist/public/sdk/{sdkSentEvents-QPs69K3s.js → sdkSentEvents-DjOlKtdW.js} +0 -0
- /package/dist/public/sdk/{shared-hkHoIS9i.js → shared-CkHhXgFB.js} +0 -0
- /package/dist/public/sdk/{signer-worker-CmCKlJ__.js → signer-worker-BNodGJKY.js} +0 -0
- /package/dist/public/sdk/{signerDomain-BLnlQPAV.js → signerDomain-BAsLT3XN.js} +0 -0
- /package/dist/public/sdk/{signerSlot-DgLzb3Ee.js → signerSlot-D2RZnb27.js} +0 -0
- /package/dist/public/sdk/{types-COS7UL3R.js → types-C4OErbBf.js} +0 -0
- /package/dist/public/sdk/{walletCustodyOperation-CAnT3Ww-.js → walletCustodyOperation-DimzAbCB.js} +0 -0
- /package/dist/public/sdk/{walletSessionAuthorizationProjection-CMl69JGe.js → walletSessionAuthorizationProjection-BzUH6gHV.js} +0 -0
- /package/dist/public/sdk/{walletSessionAuthorizationStatus-C_q9eiOH.js → walletSessionAuthorizationStatus-DG7DPcgR.js} +0 -0
- /package/dist/public/sdk/{walletSessionFailure-ZfdbUAG-.js → walletSessionFailure-CxsVtroW.js} +0 -0
- /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 (
|
|
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.
|
|
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
|
|
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 =
|
|
154
|
-
const leaving =
|
|
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 (
|
|
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 (
|
|
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
|
-
|
|
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
|
|
196
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
|
31
|
+
if (presentation !== "dropdown") event.stopPropagation();
|
|
32
32
|
onClose();
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
if (presentation
|
|
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
|
|
38
|
-
if (
|
|
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 ${
|
|
62
|
-
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":
|
|
67
|
-
onFocusCapture:
|
|
68
|
-
children:
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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" });
|