@seams/wallet 0.15.4 → 0.17.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/README.md +47 -19
- package/THIRD_PARTY_NOTICES.md +102 -1
- package/dist/.build-inputs.sha256 +1 -1
- package/dist/esm/SeamsWeb/SeamsWeb.js +20 -1
- package/dist/esm/SeamsWeb/operations/registration/registrationSignerSet.js +73 -0
- package/dist/esm/SeamsWeb/operations/session/thresholdEcdsaProvisioning.js +22 -0
- package/dist/esm/SeamsWeb/publicApi/capabilitySelection.js +2 -1
- package/dist/esm/SeamsWeb/publicApi/createPublicApi.js +26 -1
- package/dist/esm/SeamsWeb/walletIframe/client/overlay/overlay-controller.js +71 -69
- package/dist/esm/SeamsWeb/walletIframe/client/preferenceState.js +6 -8
- package/dist/esm/SeamsWeb/walletIframe/client/preferences.js +7 -5
- package/dist/esm/SeamsWeb/walletIframe/client/progress/on-events-progress-bus.js +2 -1
- package/dist/esm/SeamsWeb/walletIframe/client/router.js +116 -108
- package/dist/esm/SeamsWeb/walletIframe/client/surface/transactionSurfaceQueue.js +11 -7
- package/dist/esm/SeamsWeb/walletIframe/client/transactionReviewReservation.js +3 -2
- package/dist/esm/SeamsWeb/walletIframe/client/transport/IframeTransport.js +53 -49
- package/dist/esm/SeamsWeb/walletIframe/client/transport/iframe-transport-handshake.js +6 -2
- package/dist/esm/SeamsWeb/walletIframe/coordinator.js +18 -13
- package/dist/esm/SeamsWeb/walletIframe/host/auth-menu/domain.js +13 -1
- package/dist/esm/SeamsWeb/walletIframe/host/surface-measurement-reporter.js +14 -13
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuFooter.js +1 -4
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.js +306 -301
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.js +9 -6
- package/dist/esm/SeamsWeb/walletIframe/shared/exactSessionState.js +1 -0
- package/dist/esm/core/config/configBuilder.js +1 -1
- package/dist/esm/core/config/defaultConfigs.js +1 -0
- package/dist/esm/core/indexedDB/accountSignerLifecycle.js +2 -0
- package/dist/esm/core/indexedDB/seamsWalletDB/ecdsaCapabilityManifestStore.js +1 -0
- package/dist/esm/core/indexedDB/seamsWalletDB/manager.js +6 -5
- package/dist/esm/core/indexedDB/seamsWalletDB/repositories.js +2 -0
- package/dist/esm/core/indexedDB/seamsWalletDB/walletSessionAuthorizationStore.js +2 -2
- package/dist/esm/core/indexedDB/unifiedIndexedDBManager.js +6 -3
- package/dist/esm/core/rpcClients/near/NearRpcError.js +7 -0
- package/dist/esm/core/rpcClients/relayer/routerAbNormalSigning.js +3 -0
- package/dist/esm/core/rpcClients/relayer/walletRegistration.js +6 -2
- package/dist/esm/core/rpcClients/relayer/walletSessionAuthorizationStatus.js +5 -4
- package/dist/esm/core/signingEngine/chains/evm/evmAdapter.js +2 -1
- package/dist/esm/core/signingEngine/chains/tempo/tempoAdapter.js +2 -1
- package/dist/esm/core/signingEngine/flows/registration/accountLifecycle.js +1 -1
- package/dist/esm/core/signingEngine/flows/signEvmFamily/signers/secp256k1.js +5 -1
- package/dist/esm/core/signingEngine/flows/signEvmFamily/signers/webauthnP256.js +1 -1
- package/dist/esm/core/signingEngine/flows/signEvmFamily/signingFlow.js +3 -2
- package/dist/esm/core/signingEngine/routerAb/ecdsaDerivation/presignatureRefillProgress.js +5 -7
- package/dist/esm/core/signingEngine/session/lifecycle/walletSessionFailure.js +2 -0
- package/dist/esm/core/signingEngine/session/material/ecdsaCapabilityManifest.js +68 -10
- package/dist/esm/core/signingEngine/session/material/walletSigningStateFailure.js +2 -2
- package/dist/esm/core/signingEngine/session/operationState/authorizationAdmission.js +2 -0
- package/dist/esm/core/signingEngine/stepUpConfirmation/methodSelection.js +2 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmContent.js +29 -28
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationBody.js +3 -6
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationContent.js +20 -23
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationDrawer.js +134 -137
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationModal.js +17 -20
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/EmailOtpContent.js +41 -39
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/EmailOtpInput.js +14 -17
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/HaloBorder.js +21 -24
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationContent.js +6 -9
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/RecoveryCodeBackupSurface.js +100 -103
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ReviewDisclosure.js +70 -73
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.js +23 -26
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionReview.js +19 -22
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionTree.js +114 -117
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/email-otp-session.js +81 -80
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountConfirmationSurface.js +41 -37
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountRecoveryCodeBackupSurface.js +13 -9
- package/dist/esm/core/signingEngine/uiConfirm/ui/transaction-display/tree.js +4 -21
- package/dist/esm/core/types/actionBuilders.js +16 -2
- package/dist/esm/core/types/amounts.js +83 -0
- package/dist/esm/core/types/linkDevice.js +1 -1
- package/dist/esm/externalEvm/controller.js +49 -48
- package/dist/esm/index.js +2 -1
- package/dist/esm/react/boundWallet.js +56 -0
- package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.css +13 -2
- package/dist/esm/react/components/AccountMenuButton/WalletRegionSection.js +90 -93
- package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.js +55 -58
- package/dist/esm/react/components/HostedSeamsAuthMenu/shell.js +17 -6
- package/dist/esm/react/components/ShowQRCode.css +13 -2
- package/dist/esm/react/context/index.js +30 -3
- package/dist/esm/react/context/useSeamsWithSdkFlow.js +1 -1
- package/dist/esm/react/externalEvm.js +22 -25
- package/dist/esm/react/index.js +4 -4
- package/dist/esm/react/styles/styles.css +13 -2
- package/dist/esm/react/transactionReview/TransactionReviewHost.js +3 -6
- package/dist/esm/react/transactionReview/boundCalls.js +1 -1
- package/dist/esm/react/transactionReview/controller.js +121 -119
- package/dist/esm/sdk/ConfirmationDrawer-CXVNmfTy.js +1 -0
- package/dist/esm/sdk/NonceCoordinator-DuDKN-B8.js +1 -0
- package/dist/{public/sdk/accountLifecycle-CBOkr0vU.js → esm/sdk/accountLifecycle-D61FIpFS.js} +1 -1
- package/dist/esm/sdk/{activeWalletSession-WdZkhtBB.js → activeWalletSession-Ba6X4CUN.js} +1 -1
- package/dist/esm/sdk/adapters-CTlDBRJy.js +2 -0
- package/dist/esm/sdk/authorizationAdmission-Dd23mTx7.js +1 -0
- package/dist/esm/sdk/{canonicalPrimitives-Dsbsxgxc.js → canonicalPrimitives-BOzRXzfv.js} +1 -1
- package/dist/esm/sdk/{capabilityKinds-N8xo_IEh.js → capabilityKinds-D0Yrp9uf.js} +1 -1
- package/dist/esm/sdk/{chains-C_X_fNuS.js → chains-CPmd4s9f.js} +1 -1
- package/dist/esm/sdk/challengeDelivery-FD9GHK1T.js +1 -0
- package/dist/esm/sdk/{clientSessionPersistenceState-CBylL1Ul.js → clientSessionPersistenceState-BHRUSWMt.js} +1 -1
- package/dist/esm/sdk/{commitQueue-DYEgzoLA.js → commitQueue-DOIaR0Hr.js} +1 -1
- package/dist/esm/sdk/{configHelpers-B-hs0mTO.js → configHelpers-BXdl5Mxs.js} +1 -1
- package/dist/esm/sdk/{digestEncoding-BX3VW9eF.js → digestEncoding-CbEFYvlJ.js} +1 -1
- package/dist/esm/sdk/{display-DsfJkAra.js → display-CY_aJEn6.js} +1 -1
- package/dist/esm/sdk/domainIds-C3fUa33Q.js +1 -0
- package/dist/esm/sdk/ecdsaCapabilityManifest-DzA996y9.js +1 -0
- package/dist/esm/sdk/{ecdsaChainTarget-Bfatk3oP.js → ecdsaChainTarget-DkOrgv4y.js} +1 -1
- package/dist/esm/sdk/ecdsaDerivationClientWasm-DQlajPpE.js +1 -0
- package/dist/{public/sdk/ecdsaDerivationExport-DOGzq0qC.js → esm/sdk/ecdsaDerivationExport-DyugdheE.js} +1 -1
- package/dist/esm/sdk/{ecdsaWalletRecords-CHfrYvKr.js → ecdsaWalletRecords-C_v74n5X.js} +1 -1
- package/dist/{public/sdk/emailOtpEcdsaDerivationIdentity-Bik0N8v9.js → esm/sdk/emailOtpEcdsaDerivationIdentity-BDVjvnmO.js} +1 -1
- package/dist/esm/sdk/{errors-DIWY1KR9.js → errors-ADOZT8oV.js} +1 -1
- package/dist/esm/sdk/export-viewer-host-DsRaS0UH.js +1 -0
- package/dist/{public/sdk/exportKeypairOperation-DzbjKbnk.js → esm/sdk/exportKeypairOperation-SJPysnE1.js} +1 -1
- package/dist/esm/sdk/{helpers-B9fpZNAP.js → helpers-D3CUEdHI.js} +1 -1
- package/dist/esm/sdk/{host-z-JJRWQe.js → host-GPb_mSAQ.js} +1 -1
- package/dist/esm/sdk/{intentDigest-P_-CM7lS.js → intentDigest-CGLrsMgj.js} +1 -1
- package/dist/esm/sdk/{lanes-5kcTFbPx.js → lanes-DJKIHJBm.js} +1 -1
- package/dist/esm/sdk/{localOnly-C5mSXb_D.js → localOnly-CPmpw381.js} +1 -1
- package/dist/esm/sdk/mountExportPrivateKeySurface-C8_tpDHF.js +1 -0
- package/dist/esm/sdk/mountRecoveryCodeBackupSurface-BtNFtmSj.js +2 -0
- package/dist/esm/sdk/nearEd25519YaoMaterialActivation-J6EHFScV.js +1 -0
- package/dist/{public/sdk/nearEd25519YaoSigningPreparation-RIfkYN0d.js → esm/sdk/nearEd25519YaoSigningPreparation-CqBNMG87.js} +1 -1
- package/dist/esm/sdk/{nonceLaneKeys-BCYfl1wv.js → nonceLaneKeys-D18nlLjh.js} +1 -1
- package/dist/esm/sdk/{normalization-n503J-BI.js → normalization-Ct9-AY13.js} +1 -1
- package/dist/esm/sdk/{operationFingerprint-BHNYryLY.js → operationFingerprint-Boa9DQ51.js} +1 -1
- package/dist/esm/sdk/{passkey-custody-DpTM-eNJ.js → passkey-custody-CBSal3E9.js} +1 -1
- package/dist/esm/sdk/{pendingWalletRecoveryCodeBackup-C60sZMj5.js → pendingWalletRecoveryCodeBackup-CvsrXbzn.js} +1 -1
- package/dist/esm/sdk/presignaturePool-CQNt13kE.js +1 -0
- package/dist/esm/sdk/{primitives-CqrjmIAH.js → primitives-cC0a9GRC.js} +1 -1
- package/dist/{public/sdk/recovery-entrypoint-BULjaFBM.js → esm/sdk/recovery-entrypoint-nj7Zo3CR.js} +1 -1
- package/dist/esm/sdk/{registration-CyF7nOXs.js → registration-49OGU_GZ.js} +1 -1
- package/dist/esm/sdk/registration-C7tywPXF.js +1 -0
- package/dist/esm/sdk/{registrationAccounts-BQMUusdD.js → registrationAccounts-9GFI0Ger.js} +1 -1
- package/dist/esm/sdk/{registrationAuthMethodInput-RbSR7R1G.js → registrationAuthMethodInput-B23_HRil.js} +1 -1
- package/dist/esm/sdk/{registrationIds-BaK3jUS6.js → registrationIds-Br-zI4_5.js} +1 -1
- package/dist/esm/sdk/{registrationIntent-090Zj7Iu.js → registrationIntent-PqmcTEE3.js} +1 -1
- package/dist/esm/sdk/{registrationSignerPlan-CPzHavPM.js → registrationSignerPlan-BHkqlian.js} +1 -1
- package/dist/{public/sdk/requireStepUpAuth-BCY5ZStI.js → esm/sdk/requireStepUpAuth-C4PGTly-.js} +1 -1
- package/dist/esm/sdk/routerAbNormalSigning-xxATTIh5.js +1 -0
- package/dist/esm/sdk/runtime-auth-CpjGW90U.js +1 -0
- package/dist/esm/sdk/{runtime-device-link-Dq8g_UNb.js → runtime-device-link-CKgfGi7D.js} +1 -1
- package/dist/esm/sdk/{runtime-ecdsa-tempo-AGjT7Xpa.js → runtime-ecdsa-tempo-5VV9xSEh.js} +1 -1
- package/dist/esm/sdk/{runtime-email-otp-BpBOuSsT.js → runtime-email-otp-D1hYZNn6.js} +1 -1
- package/dist/esm/sdk/{runtime-export-CBsacCPY.js → runtime-export-B92wQD25.js} +1 -1
- package/dist/esm/sdk/{runtime-near-J3hKjC7G.js → runtime-near-CUuKg38M.js} +1 -1
- package/dist/esm/sdk/runtime-preferences-EdL3G_MO.js +1 -0
- package/dist/esm/sdk/{runtime-recovery-codes-GOytzExh.js → runtime-recovery-codes-LR4mg7-k.js} +1 -1
- package/dist/esm/sdk/runtime-recovery-uyw8sywI.js +1 -0
- package/dist/esm/sdk/{sdkSentEvents-D4KtK7_I.js → sdkSentEvents-DujYAPEM.js} +1 -1
- package/dist/esm/sdk/secp256k1-BldUPNQI.js +1 -0
- package/dist/{public/sdk/sessionObservationRevision-CnEOLDbl.js → esm/sdk/sessionObservationRevision-DmmNV25w.js} +1 -1
- package/dist/esm/sdk/shared-ha31XIdc.js +6 -0
- package/dist/{public/sdk/signEvmFamily-Cpm3e6Zs.js → esm/sdk/signEvmFamily-C_RvEnDB.js} +1 -1
- package/dist/esm/sdk/signEvmFamilyWithUiConfirmForTempo-CUKdq5dE.js +1 -0
- package/dist/esm/sdk/{signEvmWithUiConfirm-BRmdLgmm.js → signEvmWithUiConfirm-CxXzcvj2.js} +1 -1
- package/dist/esm/sdk/signNear-Dno7NsP_.js +1 -0
- package/dist/esm/sdk/signatureUses-B_nN17i7.js +1 -0
- package/dist/esm/sdk/{signerDomain-Dp7BhfmZ.js → signerDomain-BFqRQ0Jl.js} +1 -1
- package/dist/{public/sdk/signingFlow-VAnM8L5C.js → esm/sdk/signingFlow-DtugI_2z.js} +2 -2
- package/dist/esm/sdk/{signingQueue-D_Ebmzcn.js → signingQueue-C1Pb07gm.js} +1 -1
- package/dist/{public/sdk/singletons-BXhnsqeY.js → esm/sdk/singletons-DxIyVhNb.js} +1 -1
- package/dist/esm/sdk/surface-measurement-reporter-BJhfiPw6.js +1 -0
- package/dist/{public/sdk/thresholdEcdsa-CneSKcRt.js → esm/sdk/thresholdEcdsa-murTq-xz.js} +1 -1
- package/dist/esm/sdk/{trace-BBux0jtr.js → trace-CsRMlSh1.js} +1 -1
- package/dist/{public/sdk/transaction-activity-Cccvec2J.js → esm/sdk/transaction-activity-C0nCSW6c.js} +1 -1
- package/dist/esm/sdk/transactionReviewAdmission-CNNho8IG.js +1 -0
- package/dist/{public/sdk/transactionState-Day-1x7Y.js → esm/sdk/transactionState-XbZm9Zon.js} +1 -1
- package/dist/esm/sdk/tx-confirm-ui.js +709 -744
- package/dist/esm/sdk/{types-hKLqDUhR.js → types-CQTWmtqu.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-Bfhfk52N.js → esm/sdk/wallet-recovery-CVUalZ3p.js} +1 -1
- package/dist/esm/sdk/wallet-ui.css +1 -1
- package/dist/{public/sdk/walletAuthMethodRecord-LniOQQmj.js → esm/sdk/walletAuthMethodRecord-Bv68Vq-g.js} +1 -1
- package/dist/esm/sdk/{walletAuthority-CAiGuWW2.js → walletAuthority-v5wvv3IB.js} +1 -1
- package/dist/esm/sdk/walletCustodyEcdsaContinuity-rRHExT_R.js +1 -0
- package/dist/esm/sdk/{walletDbName-DtRewci9.js → walletDbName-DRzPv5Ir.js} +1 -1
- package/dist/esm/sdk/{walletOwnershipGeneration-B6HyR2rE.js → walletOwnershipGeneration-pMmmJ6XA.js} +1 -1
- package/dist/esm/sdk/{walletRecoveryCommit-C6HF84_U.js → walletRecoveryCommit-DvC6WlGz.js} +1 -1
- package/dist/esm/sdk/{walletRecoveryRotate-BN3H8byw.js → walletRecoveryRotate-Dd3prJpr.js} +1 -1
- package/dist/esm/sdk/walletRegistrationSetupPrewarm-DcbhVNMQ.js +1 -0
- package/dist/esm/sdk/walletSessionAuthorizationStatus-DVV3xkAx.js +1 -0
- package/dist/esm/sdk/walletSessionAuthorizationStore-D-MhJ0PC.js +1 -0
- package/dist/esm/sdk/walletSessionFailure-C6TAQTZn.js +1 -0
- package/dist/esm/sdk/webauthnP256-XgYu-Y6E.js +1 -0
- package/dist/esm/sdk/webauthnPromptCoordinator-D5sP8Q7e.js +1 -0
- package/dist/esm/shared-ts/src/authorization/delegatedAuthority.js +1 -1
- package/dist/esm/shared-ts/src/authorization/operationFingerprint.js +6 -0
- package/dist/esm/shared-ts/src/near/nearClient.js +6 -0
- package/dist/esm/shared-ts/src/threshold/participants.js +2 -1
- package/dist/esm/shared-ts/src/threshold/secp256k1.js +6 -0
- package/dist/esm/shared-ts/src/utils/domainIds.js +7 -0
- package/dist/esm/shared-ts/src/utils/index.js +1 -1
- package/dist/esm/shared-ts/src/utils/registrationSignerPlan.js +14 -1
- package/dist/esm/shared-ts/src/utils/routerAbEd25519Yao.js +5 -4
- package/dist/esm/utils/qrScanner.js +10 -8
- package/dist/public/headers.manifest.json +1 -1
- package/dist/public/sdk/ConfirmationDrawer-CXVNmfTy.js +1 -0
- package/dist/public/sdk/NonceCoordinator-DuDKN-B8.js +1 -0
- package/dist/{esm/sdk/accountLifecycle-CBOkr0vU.js → public/sdk/accountLifecycle-D61FIpFS.js} +1 -1
- package/dist/public/sdk/{activeWalletSession-WdZkhtBB.js → activeWalletSession-Ba6X4CUN.js} +1 -1
- package/dist/public/sdk/adapters-CTlDBRJy.js +2 -0
- package/dist/public/sdk/authorizationAdmission-Dd23mTx7.js +1 -0
- package/dist/public/sdk/{canonicalPrimitives-Dsbsxgxc.js → canonicalPrimitives-BOzRXzfv.js} +1 -1
- package/dist/public/sdk/{capabilityKinds-N8xo_IEh.js → capabilityKinds-D0Yrp9uf.js} +1 -1
- package/dist/public/sdk/{chains-C_X_fNuS.js → chains-CPmd4s9f.js} +1 -1
- package/dist/public/sdk/challengeDelivery-FD9GHK1T.js +1 -0
- package/dist/public/sdk/{clientSessionPersistenceState-CBylL1Ul.js → clientSessionPersistenceState-BHRUSWMt.js} +1 -1
- package/dist/public/sdk/{commitQueue-DYEgzoLA.js → commitQueue-DOIaR0Hr.js} +1 -1
- package/dist/public/sdk/{configHelpers-B-hs0mTO.js → configHelpers-BXdl5Mxs.js} +1 -1
- package/dist/public/sdk/{digestEncoding-BX3VW9eF.js → digestEncoding-CbEFYvlJ.js} +1 -1
- package/dist/public/sdk/{display-DsfJkAra.js → display-CY_aJEn6.js} +1 -1
- package/dist/public/sdk/domainIds-C3fUa33Q.js +1 -0
- package/dist/public/sdk/ecdsaCapabilityManifest-DzA996y9.js +1 -0
- package/dist/public/sdk/{ecdsaChainTarget-Bfatk3oP.js → ecdsaChainTarget-DkOrgv4y.js} +1 -1
- package/dist/public/sdk/ecdsaDerivationClientWasm-DQlajPpE.js +1 -0
- package/dist/{esm/sdk/ecdsaDerivationExport-DOGzq0qC.js → public/sdk/ecdsaDerivationExport-DyugdheE.js} +1 -1
- package/dist/public/sdk/{ecdsaWalletRecords-CHfrYvKr.js → ecdsaWalletRecords-C_v74n5X.js} +1 -1
- package/dist/{esm/sdk/emailOtpEcdsaDerivationIdentity-Bik0N8v9.js → public/sdk/emailOtpEcdsaDerivationIdentity-BDVjvnmO.js} +1 -1
- package/dist/public/sdk/{errors-DIWY1KR9.js → errors-ADOZT8oV.js} +1 -1
- package/dist/public/sdk/export-viewer-host-DsRaS0UH.js +1 -0
- package/dist/{esm/sdk/exportKeypairOperation-DzbjKbnk.js → public/sdk/exportKeypairOperation-SJPysnE1.js} +1 -1
- package/dist/public/sdk/{helpers-B9fpZNAP.js → helpers-D3CUEdHI.js} +1 -1
- package/dist/public/sdk/{host-z-JJRWQe.js → host-GPb_mSAQ.js} +1 -1
- package/dist/public/sdk/{intentDigest-P_-CM7lS.js → intentDigest-CGLrsMgj.js} +1 -1
- package/dist/public/sdk/{lanes-5kcTFbPx.js → lanes-DJKIHJBm.js} +1 -1
- package/dist/public/sdk/{localOnly-C5mSXb_D.js → localOnly-CPmpw381.js} +1 -1
- package/dist/public/sdk/mountExportPrivateKeySurface-C8_tpDHF.js +1 -0
- package/dist/public/sdk/mountRecoveryCodeBackupSurface-BtNFtmSj.js +2 -0
- package/dist/public/sdk/nearEd25519YaoMaterialActivation-J6EHFScV.js +1 -0
- package/dist/{esm/sdk/nearEd25519YaoSigningPreparation-RIfkYN0d.js → public/sdk/nearEd25519YaoSigningPreparation-CqBNMG87.js} +1 -1
- package/dist/public/sdk/{nonceLaneKeys-BCYfl1wv.js → nonceLaneKeys-D18nlLjh.js} +1 -1
- package/dist/public/sdk/{normalization-n503J-BI.js → normalization-Ct9-AY13.js} +1 -1
- package/dist/public/sdk/{operationFingerprint-BHNYryLY.js → operationFingerprint-Boa9DQ51.js} +1 -1
- package/dist/public/sdk/{passkey-custody-DpTM-eNJ.js → passkey-custody-CBSal3E9.js} +1 -1
- package/dist/public/sdk/{pendingWalletRecoveryCodeBackup-C60sZMj5.js → pendingWalletRecoveryCodeBackup-CvsrXbzn.js} +1 -1
- package/dist/public/sdk/presignaturePool-CQNt13kE.js +1 -0
- package/dist/public/sdk/{primitives-CqrjmIAH.js → primitives-cC0a9GRC.js} +1 -1
- package/dist/{esm/sdk/recovery-entrypoint-BULjaFBM.js → public/sdk/recovery-entrypoint-nj7Zo3CR.js} +1 -1
- package/dist/public/sdk/{registration-CyF7nOXs.js → registration-49OGU_GZ.js} +1 -1
- package/dist/public/sdk/registration-C7tywPXF.js +1 -0
- package/dist/public/sdk/{registrationAccounts-BQMUusdD.js → registrationAccounts-9GFI0Ger.js} +1 -1
- package/dist/public/sdk/{registrationAuthMethodInput-RbSR7R1G.js → registrationAuthMethodInput-B23_HRil.js} +1 -1
- package/dist/public/sdk/{registrationIds-BaK3jUS6.js → registrationIds-Br-zI4_5.js} +1 -1
- package/dist/public/sdk/{registrationIntent-090Zj7Iu.js → registrationIntent-PqmcTEE3.js} +1 -1
- package/dist/public/sdk/{registrationSignerPlan-CPzHavPM.js → registrationSignerPlan-BHkqlian.js} +1 -1
- package/dist/{esm/sdk/requireStepUpAuth-BCY5ZStI.js → public/sdk/requireStepUpAuth-C4PGTly-.js} +1 -1
- package/dist/public/sdk/routerAbNormalSigning-xxATTIh5.js +1 -0
- package/dist/public/sdk/runtime-auth-CpjGW90U.js +1 -0
- package/dist/public/sdk/{runtime-device-link-Dq8g_UNb.js → runtime-device-link-CKgfGi7D.js} +1 -1
- package/dist/public/sdk/{runtime-ecdsa-tempo-AGjT7Xpa.js → runtime-ecdsa-tempo-5VV9xSEh.js} +1 -1
- package/dist/public/sdk/{runtime-email-otp-BpBOuSsT.js → runtime-email-otp-D1hYZNn6.js} +1 -1
- package/dist/public/sdk/{runtime-export-CBsacCPY.js → runtime-export-B92wQD25.js} +1 -1
- package/dist/public/sdk/{runtime-near-J3hKjC7G.js → runtime-near-CUuKg38M.js} +1 -1
- package/dist/public/sdk/runtime-preferences-EdL3G_MO.js +1 -0
- package/dist/public/sdk/{runtime-recovery-codes-GOytzExh.js → runtime-recovery-codes-LR4mg7-k.js} +1 -1
- package/dist/public/sdk/runtime-recovery-uyw8sywI.js +1 -0
- package/dist/public/sdk/{sdkSentEvents-D4KtK7_I.js → sdkSentEvents-DujYAPEM.js} +1 -1
- package/dist/public/sdk/secp256k1-BldUPNQI.js +1 -0
- package/dist/{esm/sdk/sessionObservationRevision-CnEOLDbl.js → public/sdk/sessionObservationRevision-DmmNV25w.js} +1 -1
- package/dist/public/sdk/shared-ha31XIdc.js +6 -0
- package/dist/{esm/sdk/signEvmFamily-Cpm3e6Zs.js → public/sdk/signEvmFamily-C_RvEnDB.js} +1 -1
- package/dist/public/sdk/signEvmFamilyWithUiConfirmForTempo-CUKdq5dE.js +1 -0
- package/dist/public/sdk/{signEvmWithUiConfirm-BRmdLgmm.js → signEvmWithUiConfirm-CxXzcvj2.js} +1 -1
- package/dist/public/sdk/signNear-Dno7NsP_.js +1 -0
- package/dist/public/sdk/signatureUses-B_nN17i7.js +1 -0
- package/dist/public/sdk/{signerDomain-Dp7BhfmZ.js → signerDomain-BFqRQ0Jl.js} +1 -1
- package/dist/{esm/sdk/signingFlow-VAnM8L5C.js → public/sdk/signingFlow-DtugI_2z.js} +2 -2
- package/dist/public/sdk/{signingQueue-D_Ebmzcn.js → signingQueue-C1Pb07gm.js} +1 -1
- package/dist/{esm/sdk/singletons-BXhnsqeY.js → public/sdk/singletons-DxIyVhNb.js} +1 -1
- package/dist/public/sdk/surface-measurement-reporter-BJhfiPw6.js +1 -0
- package/dist/{esm/sdk/thresholdEcdsa-CneSKcRt.js → public/sdk/thresholdEcdsa-murTq-xz.js} +1 -1
- package/dist/public/sdk/{trace-BBux0jtr.js → trace-CsRMlSh1.js} +1 -1
- package/dist/{esm/sdk/transaction-activity-Cccvec2J.js → public/sdk/transaction-activity-C0nCSW6c.js} +1 -1
- package/dist/public/sdk/transactionReviewAdmission-CNNho8IG.js +1 -0
- package/dist/{esm/sdk/transactionState-Day-1x7Y.js → public/sdk/transactionState-XbZm9Zon.js} +1 -1
- package/dist/public/sdk/tx-confirm-ui.js +709 -744
- package/dist/public/sdk/{types-hKLqDUhR.js → types-CQTWmtqu.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-Bfhfk52N.js → public/sdk/wallet-recovery-CVUalZ3p.js} +1 -1
- package/dist/public/sdk/wallet-ui.css +1 -1
- package/dist/{esm/sdk/walletAuthMethodRecord-LniOQQmj.js → public/sdk/walletAuthMethodRecord-Bv68Vq-g.js} +1 -1
- package/dist/public/sdk/{walletAuthority-CAiGuWW2.js → walletAuthority-v5wvv3IB.js} +1 -1
- package/dist/public/sdk/walletCustodyEcdsaContinuity-rRHExT_R.js +1 -0
- package/dist/public/sdk/{walletDbName-DtRewci9.js → walletDbName-DRzPv5Ir.js} +1 -1
- package/dist/public/sdk/{walletOwnershipGeneration-B6HyR2rE.js → walletOwnershipGeneration-pMmmJ6XA.js} +1 -1
- package/dist/public/sdk/{walletRecoveryCommit-C6HF84_U.js → walletRecoveryCommit-DvC6WlGz.js} +1 -1
- package/dist/public/sdk/{walletRecoveryRotate-BN3H8byw.js → walletRecoveryRotate-Dd3prJpr.js} +1 -1
- package/dist/public/sdk/walletRegistrationSetupPrewarm-DcbhVNMQ.js +1 -0
- package/dist/public/sdk/walletSessionAuthorizationStatus-DVV3xkAx.js +1 -0
- package/dist/public/sdk/walletSessionAuthorizationStore-D-MhJ0PC.js +1 -0
- package/dist/public/sdk/walletSessionFailure-C6TAQTZn.js +1 -0
- package/dist/public/sdk/webauthnP256-XgYu-Y6E.js +1 -0
- package/dist/public/sdk/webauthnPromptCoordinator-D5sP8Q7e.js +1 -0
- package/dist/public/sdk/workers/device-linking-key.worker.js +12 -11
- package/dist/public/sdk/workers/ecdsa-derivation-client.worker.js +146 -48
- package/dist/public/sdk/workers/ecdsa-online-client.worker.js +7 -6
- package/dist/public/sdk/workers/ecdsa-presign-client.worker.js +7 -6
- package/dist/public/sdk/workers/email-otp.worker.js +24 -4
- package/dist/public/sdk/workers/passkey-mpc-export.worker.js +17 -1
- package/dist/public/sdk/workers/passkey-mpc-session.worker.js +2 -1
- package/dist/public/sdk/workers/wallet-custody-ceremony.worker.js +2 -0
- package/dist/public/wallet-assets.manifest.json +190 -190
- package/dist/public/wallet-service/index.html +4 -4
- package/dist/types/shared-ts/src/authorization/capabilityKinds.d.ts +14 -14
- package/dist/types/shared-ts/src/authorization/delegatedAuthority.d.ts +1 -1
- package/dist/types/shared-ts/src/device-linking/ed25519ExportRoot.d.ts +1 -1
- package/dist/types/shared-ts/src/device-linking/requestProof.d.ts +1 -1
- package/dist/types/shared-ts/src/device-linking/sourceContribution.d.ts +5 -5
- package/dist/types/shared-ts/src/passkey-custody/custodyEnvelope.d.ts +3 -3
- package/dist/types/shared-ts/src/passkey-custody/custodySecretBinding.d.ts +1 -1
- package/dist/types/shared-ts/src/tenant-root/tenantRootIdentity.d.ts +1 -1
- package/dist/types/shared-ts/src/tenant-root/tenantRootOperationRecord.d.ts +2 -2
- package/dist/types/shared-ts/src/utils/base64.d.ts +2 -2
- package/dist/types/shared-ts/src/utils/digestEncoding.d.ts +1 -1
- package/dist/types/shared-ts/src/utils/digests.d.ts +2 -2
- package/dist/types/shared-ts/src/utils/emailOtpDomain.d.ts +16 -16
- package/dist/types/shared-ts/src/utils/emailOtpRecoveryKey.d.ts +1 -1
- package/dist/types/shared-ts/src/utils/routerAbEcdsaDerivation.d.ts +10 -10
- package/dist/types/shared-ts/src/utils/routerAbEd25519Yao.d.ts +12 -11
- package/dist/types/shared-ts/src/utils/routerAbPublicKeyset.d.ts +3 -3
- package/dist/types/shared-ts/src/utils/routerAbTraceContext.d.ts +1 -1
- package/dist/types/shared-ts/src/utils/signerDomain.d.ts +15 -15
- package/dist/types/shared-ts/src/utils/signingSessionSeal.d.ts +11 -11
- package/dist/types/shared-ts/src/utils/walletSessionFailure.d.ts +8 -8
- package/dist/types/shared-ts/src/utils/webauthnDeviceInfo.d.ts +2 -2
- package/dist/types/shared-ts/src/utils/wireSchema.d.ts +1 -1
- package/dist/types/shared-ts/src/wallet-recovery/recoveryKeyId.d.ts +1 -1
- package/dist/types/wallet/build-paths.d.ts +73 -73
- package/dist/types/wallet/src/SeamsWeb/operations/authMethods/emailOtp/googleEmailOtpWalletAuthFlow.d.ts +3 -2
- package/dist/types/wallet/src/SeamsWeb/operations/devices/deviceLinkingResume.d.ts +2 -2
- package/dist/types/wallet/src/SeamsWeb/operations/devices/linkDeviceTargetActivation.d.ts +1 -1
- package/dist/types/wallet/src/SeamsWeb/operations/registration/pendingRegistrationRecovery.d.ts +3 -3
- package/dist/types/wallet/src/SeamsWeb/operations/registration/registrationEd25519Yao.d.ts +4 -3
- package/dist/types/wallet/src/SeamsWeb/operations/registration/registrationSignerSet.d.ts +5 -0
- package/dist/types/wallet/src/SeamsWeb/operations/registration/registrationTiming.d.ts +2 -2
- package/dist/types/wallet/src/SeamsWeb/publicApi/createPublicApi.d.ts +10 -1
- package/dist/types/wallet/src/SeamsWeb/publicApi/types.d.ts +4 -2
- package/dist/types/wallet/src/SeamsWeb/signingSurface/BrowserSigningSurface.d.ts +1 -0
- package/dist/types/wallet/src/SeamsWeb/signingSurface/ports.d.ts +1 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/client/router.d.ts +2 -1
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/auth-menu/domain.d.ts +15 -2
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/createEmailOtpCommands.d.ts +3 -2
- package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/messages.d.ts +3 -3
- package/dist/types/wallet/src/config.d.ts +8 -8
- package/dist/types/wallet/src/core/browser/walletIframe/events.d.ts +1 -1
- package/dist/types/wallet/src/core/indexedDB/linkedAuthoritySignerMaterial.d.ts +3 -3
- package/dist/types/wallet/src/core/indexedDB/pendingWalletRecoveryCommit.d.ts +1 -1
- package/dist/types/wallet/src/core/indexedDB/schemaNames.d.ts +181 -181
- package/dist/types/wallet/src/core/indexedDB/seamsWalletDB/ecdsaCapabilityManifestRecords.d.ts +8 -8
- package/dist/types/wallet/src/core/indexedDB/seamsWalletDB/ecdsaClientPresignatures.d.ts +4 -4
- package/dist/types/wallet/src/core/indexedDB/seamsWalletDB/walletSessionAuthorizationStore.d.ts +1 -1
- package/dist/types/wallet/src/core/indexedDB/walletCustodyEd25519MaterialRecord.d.ts +2 -2
- package/dist/types/wallet/src/core/indexedDB/walletDbName.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/chains/evm/evmAdapter.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/chains/evm/evmSigning.types.d.ts +1 -0
- package/dist/types/wallet/src/core/signingEngine/chains/tempo/tempoAdapter.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/flows/shared/signingStateMachine.d.ts +27 -27
- package/dist/types/wallet/src/core/signingEngine/flows/signEvmFamily/signers/secp256k1.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/flows/signEvmFamily/signers/webauthnP256.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/flows/signEvmFamily/signingFlowRuntime.d.ts +17 -17
- package/dist/types/wallet/src/core/signingEngine/nonce/nonceTypes.d.ts +40 -40
- package/dist/types/wallet/src/core/signingEngine/session/material/walletSigningStateFailure.d.ts +4 -4
- package/dist/types/wallet/src/core/signingEngine/session/operationState/types.d.ts +8 -8
- package/dist/types/wallet/src/core/signingEngine/session/passkey/ed25519YaoLocalMaterial.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/session/persistence/sealedSessionRecords.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/stepUpConfirmation/channel/confirmCommon.d.ts +3 -3
- package/dist/types/wallet/src/core/signingEngine/stepUpConfirmation/types.d.ts +4 -4
- package/dist/types/wallet/src/core/signingEngine/threshold/ed25519/yaoClient.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/threshold/sessionPolicy.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/handlers/flows/adapters/adapters.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmHeader.d.ts +2 -2
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/CopyStatusIcon.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/PadlockIcon.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/PasskeyHaloLoading.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationDetails.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/SeamsWordmark.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/webauthnAuth/credentials/helpers.d.ts +2 -2
- package/dist/types/wallet/src/core/signingEngine/workerManager/SignerWorkerManager.d.ts +1 -0
- package/dist/types/wallet/src/core/signingEngine/workerManager/deviceLinkingPorts.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/workerManager/ecdsaClientWorkerChannels.d.ts +3 -3
- package/dist/types/wallet/src/core/signingEngine/workerManager/ecdsaPresignPoolIdentity.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/workerManager/validation.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/workerManager/workerTransport.d.ts +1 -0
- package/dist/types/wallet/src/core/signingEngine/workerManager/workerTypes.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/workerManager/workers/device-linking-key/ecdsaTargetShareHpke.d.ts +3 -3
- package/dist/types/wallet/src/core/signingEngine/workerManager/workers/device-linking-key/ordinaryMaterialState.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/workerManager/workers/email-otp/crypto.d.ts +3 -3
- package/dist/types/wallet/src/core/signingEngine/workerManager/workers/email-otp/materialParsing.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/workerManager/workers/email-otp/payloadParsing.d.ts +2 -2
- package/dist/types/wallet/src/core/signingEngine/workerManager/workers/email-otp/unlock.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/workerManager/workers/workerErrorPayload.d.ts +2 -2
- package/dist/types/wallet/src/core/types/actionBuilders.d.ts +16 -2
- package/dist/types/wallet/src/core/types/amounts.d.ts +75 -0
- package/dist/types/wallet/src/core/types/amounts.typecheck.d.ts +2 -0
- package/dist/types/wallet/src/core/types/sdkSentEvents.d.ts +5 -5
- package/dist/types/wallet/src/core/types/secure-confirm-worker.d.ts +1 -1
- package/dist/types/wallet/src/core/types/signer-worker.d.ts +7 -7
- package/dist/types/wallet/src/externalEvm/types.d.ts +1 -0
- package/dist/types/wallet/src/index.d.ts +2 -0
- package/dist/types/wallet/src/react/{hooks/useWallet.d.ts → boundWallet.d.ts} +8 -48
- package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuButtonView.d.ts +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/AccountsSection.d.ts +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/AuthenticationMethodsModal.d.ts +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/ExportKeysSection.d.ts +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/LinkedDevicesModal.d.ts +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/ProfileDropdown.d.ts +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/WalletSettingsLayout.d.ts +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/GlobeIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/HoverArrowIcon.d.ts +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/KeyIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/LaptopIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/LinkIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/LockIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/LockKeyholeIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/MailIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/PlusIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/RecoveryCodesIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/ScanIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/SlidersIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/SmartphoneIcon.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/TouchIcon.d.ts +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/index.d.ts +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/types.d.ts +8 -8
- package/dist/types/wallet/src/react/components/ShowQRCode.d.ts +0 -1
- package/dist/types/wallet/src/react/components/VoiceAssistantCard.d.ts +0 -1
- package/dist/types/wallet/src/react/components/theme/design-tokens.d.ts +1 -0
- package/dist/types/wallet/src/react/context/index.d.ts +2 -1
- package/dist/types/wallet/src/react/context/useSeamsContextValue.d.ts +2 -2
- package/dist/types/wallet/src/react/index.d.ts +3 -2
- package/dist/types/wallet/src/react/styles.d.ts +2 -0
- package/dist/types/wallet/src/react/transactionReview/boundCalls.d.ts +57 -57
- package/dist/types/wallet/src/react/types.d.ts +14 -1
- package/dist/types/wallet/src/theme/base-styles.d.ts +4 -4
- package/dist/workers/device-linking-key.worker.js +12 -11
- package/dist/workers/ecdsa-derivation-client.worker.js +146 -48
- package/dist/workers/ecdsa-online-client.worker.js +7 -6
- package/dist/workers/ecdsa-presign-client.worker.js +7 -6
- package/dist/workers/email-otp.worker.js +24 -4
- package/dist/workers/passkey-mpc-export.worker.js +17 -1
- package/dist/workers/passkey-mpc-session.worker.js +2 -1
- package/dist/workers/wallet-custody-ceremony.worker.js +2 -0
- package/package.json +8 -6
- package/dist/esm/react/hooks/useWallet.js +0 -108
- package/dist/esm/sdk/ConfirmationDrawer-BFzQjd1P.js +0 -1
- package/dist/esm/sdk/NonceCoordinator-CDGnEgfI.js +0 -1
- package/dist/esm/sdk/adapters-DsAaBNNY.js +0 -2
- package/dist/esm/sdk/authorizationAdmission-CGinGhXH.js +0 -1
- package/dist/esm/sdk/challengeDelivery-CATQ4u6P.js +0 -1
- package/dist/esm/sdk/domainIds-BzkGsRqO.js +0 -1
- package/dist/esm/sdk/ecdsaCapabilityManifest-DX6TflEz.js +0 -1
- package/dist/esm/sdk/ecdsaDerivationClientWasm-CpjnN4aK.js +0 -1
- package/dist/esm/sdk/export-viewer-host-CV-lSsQF.js +0 -1
- package/dist/esm/sdk/mountExportPrivateKeySurface-CatAhYoG.js +0 -1
- package/dist/esm/sdk/mountRecoveryCodeBackupSurface-DlEb3uD7.js +0 -2
- package/dist/esm/sdk/nearEd25519YaoMaterialActivation-Bo3IOTS-.js +0 -1
- package/dist/esm/sdk/presignaturePool-V10fZpG3.js +0 -1
- package/dist/esm/sdk/registration-DEGZR8kA.js +0 -1
- package/dist/esm/sdk/routerAbNormalSigning-C4P2tDU-.js +0 -1
- package/dist/esm/sdk/runtime-auth-ZcxkQ-XF.js +0 -1
- package/dist/esm/sdk/runtime-preferences-CVt5sLvm.js +0 -1
- package/dist/esm/sdk/runtime-recovery-BzewdcoT.js +0 -1
- package/dist/esm/sdk/secp256k1-CKq7_HD-.js +0 -1
- package/dist/esm/sdk/shared-BywEqTsd.js +0 -6
- package/dist/esm/sdk/signEvmFamilyWithUiConfirmForTempo-DGWmm9n7.js +0 -1
- package/dist/esm/sdk/signNear-XGZBxc_g.js +0 -1
- package/dist/esm/sdk/signatureUses-BKAoDbQd.js +0 -1
- package/dist/esm/sdk/surface-measurement-reporter-DvVHPu_O.js +0 -1
- package/dist/esm/sdk/transactionReviewAdmission-CIvR4W5_.js +0 -1
- package/dist/esm/sdk/walletCustodyEcdsaContinuity-B4fTDL10.js +0 -1
- package/dist/esm/sdk/walletRegistrationSetupPrewarm-B9kpnrbK.js +0 -1
- package/dist/esm/sdk/walletSessionAuthorizationStatus-BL7j2TeM.js +0 -1
- package/dist/esm/sdk/walletSessionAuthorizationStore-DmYe-cDR.js +0 -1
- package/dist/esm/sdk/walletSessionFailure-YuhraC3P.js +0 -1
- package/dist/esm/sdk/webauthnP256-BwgxtG5N.js +0 -1
- package/dist/esm/sdk/webauthnPromptCoordinator-CwJeKiYq.js +0 -1
- package/dist/public/sdk/ConfirmationDrawer-BFzQjd1P.js +0 -1
- package/dist/public/sdk/NonceCoordinator-CDGnEgfI.js +0 -1
- package/dist/public/sdk/adapters-DsAaBNNY.js +0 -2
- package/dist/public/sdk/authorizationAdmission-CGinGhXH.js +0 -1
- package/dist/public/sdk/challengeDelivery-CATQ4u6P.js +0 -1
- package/dist/public/sdk/domainIds-BzkGsRqO.js +0 -1
- package/dist/public/sdk/ecdsaCapabilityManifest-DX6TflEz.js +0 -1
- package/dist/public/sdk/ecdsaDerivationClientWasm-CpjnN4aK.js +0 -1
- package/dist/public/sdk/export-viewer-host-CV-lSsQF.js +0 -1
- package/dist/public/sdk/mountExportPrivateKeySurface-CatAhYoG.js +0 -1
- package/dist/public/sdk/mountRecoveryCodeBackupSurface-DlEb3uD7.js +0 -2
- package/dist/public/sdk/nearEd25519YaoMaterialActivation-Bo3IOTS-.js +0 -1
- package/dist/public/sdk/presignaturePool-V10fZpG3.js +0 -1
- package/dist/public/sdk/registration-DEGZR8kA.js +0 -1
- package/dist/public/sdk/routerAbNormalSigning-C4P2tDU-.js +0 -1
- package/dist/public/sdk/runtime-auth-ZcxkQ-XF.js +0 -1
- package/dist/public/sdk/runtime-preferences-CVt5sLvm.js +0 -1
- package/dist/public/sdk/runtime-recovery-BzewdcoT.js +0 -1
- package/dist/public/sdk/secp256k1-CKq7_HD-.js +0 -1
- package/dist/public/sdk/shared-BywEqTsd.js +0 -6
- package/dist/public/sdk/signEvmFamilyWithUiConfirmForTempo-DGWmm9n7.js +0 -1
- package/dist/public/sdk/signNear-XGZBxc_g.js +0 -1
- package/dist/public/sdk/signatureUses-BKAoDbQd.js +0 -1
- package/dist/public/sdk/surface-measurement-reporter-DvVHPu_O.js +0 -1
- package/dist/public/sdk/transactionReviewAdmission-CIvR4W5_.js +0 -1
- package/dist/public/sdk/walletCustodyEcdsaContinuity-B4fTDL10.js +0 -1
- package/dist/public/sdk/walletRegistrationSetupPrewarm-B9kpnrbK.js +0 -1
- package/dist/public/sdk/walletSessionAuthorizationStatus-BL7j2TeM.js +0 -1
- package/dist/public/sdk/walletSessionAuthorizationStore-DmYe-cDR.js +0 -1
- package/dist/public/sdk/walletSessionFailure-YuhraC3P.js +0 -1
- package/dist/public/sdk/webauthnP256-BwgxtG5N.js +0 -1
- package/dist/public/sdk/webauthnPromptCoordinator-CwJeKiYq.js +0 -1
|
@@ -1460,30 +1460,8 @@ function buildActionNode(action, idx) {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
];
|
|
1462
1462
|
break;
|
|
1463
|
-
default:
|
|
1464
|
-
|
|
1465
|
-
try {
|
|
1466
|
-
raw = JSON.stringify(action, null, 2);
|
|
1467
|
-
} catch {
|
|
1468
|
-
raw = String(action);
|
|
1469
|
-
}
|
|
1470
|
-
actionNodes = [
|
|
1471
|
-
{
|
|
1472
|
-
id: `a${idx}-action`,
|
|
1473
|
-
label: `Action: ${action.type || "Unknown"}`,
|
|
1474
|
-
open: false,
|
|
1475
|
-
type: "file"
|
|
1476
|
-
},
|
|
1477
|
-
{
|
|
1478
|
-
id: `a${idx}-raw`,
|
|
1479
|
-
label: "Raw Data",
|
|
1480
|
-
type: "file",
|
|
1481
|
-
open: false,
|
|
1482
|
-
content: raw
|
|
1483
|
-
}
|
|
1484
|
-
];
|
|
1485
|
-
break;
|
|
1486
|
-
}
|
|
1463
|
+
default:
|
|
1464
|
+
return assertNeverAction(action);
|
|
1487
1465
|
}
|
|
1488
1466
|
return {
|
|
1489
1467
|
id: `action-${idx}`,
|
|
@@ -1496,6 +1474,9 @@ function buildActionNode(action, idx) {
|
|
|
1496
1474
|
children: actionNodes
|
|
1497
1475
|
};
|
|
1498
1476
|
}
|
|
1477
|
+
function assertNeverAction(action) {
|
|
1478
|
+
throw new Error(`Unsupported NEAR action: ${String(action)}`);
|
|
1479
|
+
}
|
|
1499
1480
|
function buildTransactionNode(tx, tIdx, totalTransactions) {
|
|
1500
1481
|
const actionFolders = tx.actions.map((action, idx) => buildActionNode(action, idx));
|
|
1501
1482
|
return {
|
|
@@ -2711,34 +2692,12 @@ function PadlockIcon(props) {
|
|
|
2711
2692
|
var nextHaloId = 0;
|
|
2712
2693
|
|
|
2713
2694
|
class HaloBorder extends C {
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
this.startedAt = null;
|
|
2721
|
-
this.angle = null;
|
|
2722
|
-
this.updateAnimation = () => {
|
|
2723
|
-
this.cancelFrame();
|
|
2724
|
-
this.angle = null;
|
|
2725
|
-
this.syncDynamicStyles();
|
|
2726
|
-
if (this.props.animated && this.motion?.matches) {
|
|
2727
|
-
this.frame = this.element.current.ownerDocument.defaultView.requestAnimationFrame(this.tick);
|
|
2728
|
-
}
|
|
2729
|
-
};
|
|
2730
|
-
this.tick = (timestamp) => {
|
|
2731
|
-
if (!this.element.current || !this.props.animated || !this.motion?.matches)
|
|
2732
|
-
return;
|
|
2733
|
-
this.startedAt ??= timestamp;
|
|
2734
|
-
const configuredDuration = this.props.durationMs;
|
|
2735
|
-
const duration = configuredDuration && Number.isFinite(configuredDuration) && configuredDuration > 0 ? configuredDuration : 1150;
|
|
2736
|
-
const angle = (timestamp - this.startedAt) % duration / duration * 360;
|
|
2737
|
-
this.angle = `${angle}deg`;
|
|
2738
|
-
this.syncDynamicStyles();
|
|
2739
|
-
this.frame = this.element.current.ownerDocument.defaultView.requestAnimationFrame(this.tick);
|
|
2740
|
-
};
|
|
2741
|
-
}
|
|
2695
|
+
id = `seams-halo-${++nextHaloId}`;
|
|
2696
|
+
element = M();
|
|
2697
|
+
motion = null;
|
|
2698
|
+
frame = null;
|
|
2699
|
+
startedAt = null;
|
|
2700
|
+
angle = null;
|
|
2742
2701
|
componentDidMount() {
|
|
2743
2702
|
this.motion = this.element.current.ownerDocument.defaultView.matchMedia("(prefers-reduced-motion: no-preference)");
|
|
2744
2703
|
this.motion.addEventListener("change", this.updateAnimation);
|
|
@@ -2767,6 +2726,25 @@ class HaloBorder extends C {
|
|
|
2767
2726
|
this.frame = null;
|
|
2768
2727
|
this.startedAt = null;
|
|
2769
2728
|
}
|
|
2729
|
+
updateAnimation = () => {
|
|
2730
|
+
this.cancelFrame();
|
|
2731
|
+
this.angle = null;
|
|
2732
|
+
this.syncDynamicStyles();
|
|
2733
|
+
if (this.props.animated && this.motion?.matches) {
|
|
2734
|
+
this.frame = this.element.current.ownerDocument.defaultView.requestAnimationFrame(this.tick);
|
|
2735
|
+
}
|
|
2736
|
+
};
|
|
2737
|
+
tick = (timestamp) => {
|
|
2738
|
+
if (!this.element.current || !this.props.animated || !this.motion?.matches)
|
|
2739
|
+
return;
|
|
2740
|
+
this.startedAt ??= timestamp;
|
|
2741
|
+
const configuredDuration = this.props.durationMs;
|
|
2742
|
+
const duration = configuredDuration && Number.isFinite(configuredDuration) && configuredDuration > 0 ? configuredDuration : 1150;
|
|
2743
|
+
const angle = (timestamp - this.startedAt) % duration / duration * 360;
|
|
2744
|
+
this.angle = `${angle}deg`;
|
|
2745
|
+
this.syncDynamicStyles();
|
|
2746
|
+
this.frame = this.element.current.ownerDocument.defaultView.requestAnimationFrame(this.tick);
|
|
2747
|
+
};
|
|
2770
2748
|
syncDynamicStyles() {
|
|
2771
2749
|
const declarations = {};
|
|
2772
2750
|
if (this.props.innerPadding)
|
|
@@ -3195,139 +3173,19 @@ function TransactionTree(props) {
|
|
|
3195
3173
|
}
|
|
3196
3174
|
|
|
3197
3175
|
class TransactionNode extends C {
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
this.motion = null;
|
|
3212
|
-
this.modeHeight = null;
|
|
3213
|
-
this.setHeight = (height) => {
|
|
3214
|
-
if (this.disposed)
|
|
3215
|
-
return;
|
|
3216
|
-
this.props.styles.setDynamicDeclarations(this.id, `#${this.id}`, {
|
|
3217
|
-
"--seams-tree__anim-target": `${height}px`
|
|
3218
|
-
});
|
|
3219
|
-
};
|
|
3220
|
-
this.releaseHeight = () => {
|
|
3221
|
-
this.props.styles.deleteDynamicRule(this.id);
|
|
3222
|
-
};
|
|
3223
|
-
this.clearCopied = () => {
|
|
3224
|
-
this.copiedTimer = null;
|
|
3225
|
-
if (!this.disposed)
|
|
3226
|
-
this.setState({ copied: false });
|
|
3227
|
-
};
|
|
3228
|
-
this.copy = async (event) => {
|
|
3229
|
-
event.preventDefault();
|
|
3230
|
-
event.stopPropagation();
|
|
3231
|
-
const value = this.props.node.copyValue;
|
|
3232
|
-
if (!value)
|
|
3233
|
-
return;
|
|
3234
|
-
const root = event.currentTarget.closest(".seams-tx-tree");
|
|
3235
|
-
if (!root)
|
|
3236
|
-
return;
|
|
3237
|
-
try {
|
|
3238
|
-
if (!await copySurfaceText(root, value))
|
|
3239
|
-
return;
|
|
3240
|
-
if (this.disposed)
|
|
3241
|
-
return;
|
|
3242
|
-
if (this.copiedTimer !== null)
|
|
3243
|
-
clearTimeout(this.copiedTimer);
|
|
3244
|
-
this.setState({ copied: true });
|
|
3245
|
-
this.copiedTimer = setTimeout(this.clearCopied, 2000);
|
|
3246
|
-
this.props.onCopy?.(value);
|
|
3247
|
-
} catch {}
|
|
3248
|
-
};
|
|
3249
|
-
this.toggleMode = (event) => {
|
|
3250
|
-
event.preventDefault();
|
|
3251
|
-
event.stopPropagation();
|
|
3252
|
-
if (!hasContentVariants(this.props.node))
|
|
3253
|
-
return;
|
|
3254
|
-
if (this.shell.current) {
|
|
3255
|
-
this.modeHeight = this.shell.current.getBoundingClientRect().height;
|
|
3256
|
-
this.setHeight(this.modeHeight);
|
|
3257
|
-
this.shell.current.classList.add(...drivenClasses);
|
|
3258
|
-
}
|
|
3259
|
-
this.setState({ mode: this.state.mode === "decoded" ? "raw" : "decoded" });
|
|
3260
|
-
};
|
|
3261
|
-
this.toggle = (event) => {
|
|
3262
|
-
const target = event.target;
|
|
3263
|
-
if (target.closest("a, button")) {
|
|
3264
|
-
event.stopPropagation();
|
|
3265
|
-
return;
|
|
3266
|
-
}
|
|
3267
|
-
event.preventDefault();
|
|
3268
|
-
event.stopPropagation();
|
|
3269
|
-
const details = this.details.current;
|
|
3270
|
-
if (!details || this.motion)
|
|
3271
|
-
return;
|
|
3272
|
-
const body = details.querySelector(":scope > .folder-children");
|
|
3273
|
-
const open = !details.open;
|
|
3274
|
-
const reduced = details.ownerDocument.defaultView.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
3275
|
-
if (!body || reduced) {
|
|
3276
|
-
details.open = open;
|
|
3277
|
-
this.props.onToggle?.(this.props.node.id, open);
|
|
3278
|
-
return;
|
|
3279
|
-
}
|
|
3280
|
-
this.motion = { body, open };
|
|
3281
|
-
const height = open ? 0 : body.getBoundingClientRect().height;
|
|
3282
|
-
this.setHeight(height);
|
|
3283
|
-
body.classList.add("anim-h", "anim-h-active", "anim-h-hold");
|
|
3284
|
-
details.open = true;
|
|
3285
|
-
body.offsetHeight;
|
|
3286
|
-
this.frame = details.ownerDocument.defaultView.requestAnimationFrame(this.startMotion);
|
|
3287
|
-
};
|
|
3288
|
-
this.startMotion = () => {
|
|
3289
|
-
this.frame = null;
|
|
3290
|
-
if (!this.motion || this.disposed)
|
|
3291
|
-
return;
|
|
3292
|
-
const { body, open } = this.motion;
|
|
3293
|
-
const fromCssPx = body.getBoundingClientRect().height;
|
|
3294
|
-
const toCssPx = open ? body.scrollHeight : 0;
|
|
3295
|
-
const claimed = announceClampedSurfaceResize({
|
|
3296
|
-
reason: this.props.node.id,
|
|
3297
|
-
element: body,
|
|
3298
|
-
drivenClasses,
|
|
3299
|
-
fromCssPx,
|
|
3300
|
-
toCssPx,
|
|
3301
|
-
setHeightCssPx: this.setHeight,
|
|
3302
|
-
onSettled: this.finishMotion
|
|
3303
|
-
});
|
|
3304
|
-
if (claimed)
|
|
3305
|
-
return;
|
|
3306
|
-
body.addEventListener("transitionend", this.onTransitionEnd);
|
|
3307
|
-
body.classList.remove("anim-h-hold");
|
|
3308
|
-
this.setHeight(toCssPx);
|
|
3309
|
-
this.motionTimer = setTimeout(this.finishMotion, open ? 200 : 250);
|
|
3310
|
-
};
|
|
3311
|
-
this.onTransitionEnd = (event) => {
|
|
3312
|
-
if (event.target === this.motion?.body && event.propertyName === "height")
|
|
3313
|
-
this.finishMotion();
|
|
3314
|
-
};
|
|
3315
|
-
this.finishMotion = () => {
|
|
3316
|
-
if (this.disposed || !this.motion)
|
|
3317
|
-
return;
|
|
3318
|
-
const { body, open } = this.motion;
|
|
3319
|
-
this.motion = null;
|
|
3320
|
-
if (this.motionTimer !== null)
|
|
3321
|
-
clearTimeout(this.motionTimer);
|
|
3322
|
-
this.motionTimer = null;
|
|
3323
|
-
body.removeEventListener("transitionend", this.onTransitionEnd);
|
|
3324
|
-
body.classList.remove(...motionClasses);
|
|
3325
|
-
if (this.details.current)
|
|
3326
|
-
this.details.current.open = open;
|
|
3327
|
-
this.releaseHeight();
|
|
3328
|
-
this.props.onToggle?.(this.props.node.id, open);
|
|
3329
|
-
};
|
|
3330
|
-
}
|
|
3176
|
+
state = {
|
|
3177
|
+
mode: this.props.node.contentVariants?.defaultMode === "raw" ? "raw" : "decoded",
|
|
3178
|
+
copied: false
|
|
3179
|
+
};
|
|
3180
|
+
id = `seams-tree-node-${++nextNodeId}`;
|
|
3181
|
+
details = M();
|
|
3182
|
+
shell = M();
|
|
3183
|
+
disposed = false;
|
|
3184
|
+
copiedTimer = null;
|
|
3185
|
+
frame = null;
|
|
3186
|
+
motionTimer = null;
|
|
3187
|
+
motion = null;
|
|
3188
|
+
modeHeight = null;
|
|
3331
3189
|
componentDidUpdate(previous) {
|
|
3332
3190
|
if (previous.styles !== this.props.styles)
|
|
3333
3191
|
previous.styles.deleteDynamicRule(this.id);
|
|
@@ -3365,6 +3223,123 @@ class TransactionNode extends C {
|
|
|
3365
3223
|
this.motion = null;
|
|
3366
3224
|
this.releaseHeight();
|
|
3367
3225
|
}
|
|
3226
|
+
setHeight = (height) => {
|
|
3227
|
+
if (this.disposed)
|
|
3228
|
+
return;
|
|
3229
|
+
this.props.styles.setDynamicDeclarations(this.id, `#${this.id}`, {
|
|
3230
|
+
"--seams-tree__anim-target": `${height}px`
|
|
3231
|
+
});
|
|
3232
|
+
};
|
|
3233
|
+
releaseHeight = () => {
|
|
3234
|
+
this.props.styles.deleteDynamicRule(this.id);
|
|
3235
|
+
};
|
|
3236
|
+
clearCopied = () => {
|
|
3237
|
+
this.copiedTimer = null;
|
|
3238
|
+
if (!this.disposed)
|
|
3239
|
+
this.setState({ copied: false });
|
|
3240
|
+
};
|
|
3241
|
+
copy = async (event) => {
|
|
3242
|
+
event.preventDefault();
|
|
3243
|
+
event.stopPropagation();
|
|
3244
|
+
const value = this.props.node.copyValue;
|
|
3245
|
+
if (!value)
|
|
3246
|
+
return;
|
|
3247
|
+
const root = event.currentTarget.closest(".seams-tx-tree");
|
|
3248
|
+
if (!root)
|
|
3249
|
+
return;
|
|
3250
|
+
try {
|
|
3251
|
+
if (!await copySurfaceText(root, value))
|
|
3252
|
+
return;
|
|
3253
|
+
if (this.disposed)
|
|
3254
|
+
return;
|
|
3255
|
+
if (this.copiedTimer !== null)
|
|
3256
|
+
clearTimeout(this.copiedTimer);
|
|
3257
|
+
this.setState({ copied: true });
|
|
3258
|
+
this.copiedTimer = setTimeout(this.clearCopied, 2000);
|
|
3259
|
+
this.props.onCopy?.(value);
|
|
3260
|
+
} catch {}
|
|
3261
|
+
};
|
|
3262
|
+
toggleMode = (event) => {
|
|
3263
|
+
event.preventDefault();
|
|
3264
|
+
event.stopPropagation();
|
|
3265
|
+
if (!hasContentVariants(this.props.node))
|
|
3266
|
+
return;
|
|
3267
|
+
if (this.shell.current) {
|
|
3268
|
+
this.modeHeight = this.shell.current.getBoundingClientRect().height;
|
|
3269
|
+
this.setHeight(this.modeHeight);
|
|
3270
|
+
this.shell.current.classList.add(...drivenClasses);
|
|
3271
|
+
}
|
|
3272
|
+
this.setState({ mode: this.state.mode === "decoded" ? "raw" : "decoded" });
|
|
3273
|
+
};
|
|
3274
|
+
toggle = (event) => {
|
|
3275
|
+
const target = event.target;
|
|
3276
|
+
if (target.closest("a, button")) {
|
|
3277
|
+
event.stopPropagation();
|
|
3278
|
+
return;
|
|
3279
|
+
}
|
|
3280
|
+
event.preventDefault();
|
|
3281
|
+
event.stopPropagation();
|
|
3282
|
+
const details = this.details.current;
|
|
3283
|
+
if (!details || this.motion)
|
|
3284
|
+
return;
|
|
3285
|
+
const body = details.querySelector(":scope > .folder-children");
|
|
3286
|
+
const open = !details.open;
|
|
3287
|
+
const reduced = details.ownerDocument.defaultView.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
3288
|
+
if (!body || reduced) {
|
|
3289
|
+
details.open = open;
|
|
3290
|
+
this.props.onToggle?.(this.props.node.id, open);
|
|
3291
|
+
return;
|
|
3292
|
+
}
|
|
3293
|
+
this.motion = { body, open };
|
|
3294
|
+
const height = open ? 0 : body.getBoundingClientRect().height;
|
|
3295
|
+
this.setHeight(height);
|
|
3296
|
+
body.classList.add("anim-h", "anim-h-active", "anim-h-hold");
|
|
3297
|
+
details.open = true;
|
|
3298
|
+
body.offsetHeight;
|
|
3299
|
+
this.frame = details.ownerDocument.defaultView.requestAnimationFrame(this.startMotion);
|
|
3300
|
+
};
|
|
3301
|
+
startMotion = () => {
|
|
3302
|
+
this.frame = null;
|
|
3303
|
+
if (!this.motion || this.disposed)
|
|
3304
|
+
return;
|
|
3305
|
+
const { body, open } = this.motion;
|
|
3306
|
+
const fromCssPx = body.getBoundingClientRect().height;
|
|
3307
|
+
const toCssPx = open ? body.scrollHeight : 0;
|
|
3308
|
+
const claimed = announceClampedSurfaceResize({
|
|
3309
|
+
reason: this.props.node.id,
|
|
3310
|
+
element: body,
|
|
3311
|
+
drivenClasses,
|
|
3312
|
+
fromCssPx,
|
|
3313
|
+
toCssPx,
|
|
3314
|
+
setHeightCssPx: this.setHeight,
|
|
3315
|
+
onSettled: this.finishMotion
|
|
3316
|
+
});
|
|
3317
|
+
if (claimed)
|
|
3318
|
+
return;
|
|
3319
|
+
body.addEventListener("transitionend", this.onTransitionEnd);
|
|
3320
|
+
body.classList.remove("anim-h-hold");
|
|
3321
|
+
this.setHeight(toCssPx);
|
|
3322
|
+
this.motionTimer = setTimeout(this.finishMotion, open ? 200 : 250);
|
|
3323
|
+
};
|
|
3324
|
+
onTransitionEnd = (event) => {
|
|
3325
|
+
if (event.target === this.motion?.body && event.propertyName === "height")
|
|
3326
|
+
this.finishMotion();
|
|
3327
|
+
};
|
|
3328
|
+
finishMotion = () => {
|
|
3329
|
+
if (this.disposed || !this.motion)
|
|
3330
|
+
return;
|
|
3331
|
+
const { body, open } = this.motion;
|
|
3332
|
+
this.motion = null;
|
|
3333
|
+
if (this.motionTimer !== null)
|
|
3334
|
+
clearTimeout(this.motionTimer);
|
|
3335
|
+
this.motionTimer = null;
|
|
3336
|
+
body.removeEventListener("transitionend", this.onTransitionEnd);
|
|
3337
|
+
body.classList.remove(...motionClasses);
|
|
3338
|
+
if (this.details.current)
|
|
3339
|
+
this.details.current.open = open;
|
|
3340
|
+
this.releaseHeight();
|
|
3341
|
+
this.props.onToggle?.(this.props.node.id, open);
|
|
3342
|
+
};
|
|
3368
3343
|
label(chevron) {
|
|
3369
3344
|
const node = this.props.node;
|
|
3370
3345
|
return /* @__PURE__ */ u2("span", {
|
|
@@ -3462,49 +3437,43 @@ function stopDragStart(event) {
|
|
|
3462
3437
|
}
|
|
3463
3438
|
|
|
3464
3439
|
class ConfirmContent extends C {
|
|
3440
|
+
state = { armed: false };
|
|
3441
|
+
id = `seams-confirm-content-${++nextContentId}`;
|
|
3442
|
+
root = M();
|
|
3443
|
+
reflow;
|
|
3444
|
+
frame = null;
|
|
3445
|
+
capturedBeforeUpdate = false;
|
|
3446
|
+
reflowEnabled = true;
|
|
3465
3447
|
constructor(props) {
|
|
3466
3448
|
super(props);
|
|
3467
|
-
this.state = { armed: false };
|
|
3468
|
-
this.id = `seams-confirm-content-${++nextContentId}`;
|
|
3469
|
-
this.root = M();
|
|
3470
|
-
this.frame = null;
|
|
3471
|
-
this.capturedBeforeUpdate = false;
|
|
3472
|
-
this.reflowEnabled = true;
|
|
3473
|
-
this.getReflowElement = () => {
|
|
3474
|
-
const root = this.root.current;
|
|
3475
|
-
return root?.closest(".modal-container-root, .seams-confirmation-drawer") ?? root;
|
|
3476
|
-
};
|
|
3477
|
-
this.setHeight = (height) => {
|
|
3478
|
-
const element = this.getReflowElement();
|
|
3479
|
-
const selector = element?.id ? `#${element.id}` : `#${this.id}`;
|
|
3480
|
-
this.props.styles.setDynamicDeclarations(this.id, selector, {
|
|
3481
|
-
[CONFIRM_SURFACE_HEIGHT_DRIVEN_VAR]: `${height}px`
|
|
3482
|
-
});
|
|
3483
|
-
};
|
|
3484
|
-
this.afterFirstPaint = () => {
|
|
3485
|
-
this.frame = this.root.current.ownerDocument.defaultView.requestAnimationFrame(this.arm);
|
|
3486
|
-
};
|
|
3487
|
-
this.arm = () => {
|
|
3488
|
-
this.frame = null;
|
|
3489
|
-
this.setState({ armed: true });
|
|
3490
|
-
};
|
|
3491
|
-
this.confirm = () => {
|
|
3492
|
-
if (this.state.armed && this.props.decision.kind === "ready")
|
|
3493
|
-
this.props.decision.onConfirm();
|
|
3494
|
-
};
|
|
3495
|
-
this.cancel = () => {
|
|
3496
|
-
this.props.onCancel();
|
|
3497
|
-
};
|
|
3498
3449
|
this.reflow = createSurfaceHeightReflow({
|
|
3499
3450
|
reason: "tx-body",
|
|
3500
3451
|
element: this.getReflowElement,
|
|
3501
3452
|
setHeightCssPx: this.setHeight
|
|
3502
3453
|
});
|
|
3503
3454
|
}
|
|
3455
|
+
getReflowElement = () => {
|
|
3456
|
+
const root = this.root.current;
|
|
3457
|
+
return root?.closest(".modal-container-root, .seams-confirmation-drawer") ?? root;
|
|
3458
|
+
};
|
|
3459
|
+
setHeight = (height) => {
|
|
3460
|
+
const element = this.getReflowElement();
|
|
3461
|
+
const selector = element?.id ? `#${element.id}` : `#${this.id}`;
|
|
3462
|
+
this.props.styles.setDynamicDeclarations(this.id, selector, {
|
|
3463
|
+
[CONFIRM_SURFACE_HEIGHT_DRIVEN_VAR]: `${height}px`
|
|
3464
|
+
});
|
|
3465
|
+
};
|
|
3504
3466
|
componentDidMount() {
|
|
3505
3467
|
this.reflowEnabled = this.getReflowElement() === this.root.current;
|
|
3506
3468
|
this.frame = this.root.current.ownerDocument.defaultView.requestAnimationFrame(this.afterFirstPaint);
|
|
3507
3469
|
}
|
|
3470
|
+
afterFirstPaint = () => {
|
|
3471
|
+
this.frame = this.root.current.ownerDocument.defaultView.requestAnimationFrame(this.arm);
|
|
3472
|
+
};
|
|
3473
|
+
arm = () => {
|
|
3474
|
+
this.frame = null;
|
|
3475
|
+
this.setState({ armed: true });
|
|
3476
|
+
};
|
|
3508
3477
|
componentWillReceiveProps() {
|
|
3509
3478
|
if (!this.reflowEnabled)
|
|
3510
3479
|
return;
|
|
@@ -3533,6 +3502,13 @@ class ConfirmContent extends C {
|
|
|
3533
3502
|
this.reflow.dispose();
|
|
3534
3503
|
this.props.styles.deleteDynamicRule(this.id);
|
|
3535
3504
|
}
|
|
3505
|
+
confirm = () => {
|
|
3506
|
+
if (this.state.armed && this.props.decision.kind === "ready")
|
|
3507
|
+
this.props.decision.onConfirm();
|
|
3508
|
+
};
|
|
3509
|
+
cancel = () => {
|
|
3510
|
+
this.props.onCancel();
|
|
3511
|
+
};
|
|
3536
3512
|
render() {
|
|
3537
3513
|
const preparing = this.props.decision.kind === "preparing";
|
|
3538
3514
|
return /* @__PURE__ */ u2("div", {
|
|
@@ -3609,13 +3585,10 @@ function assertNever3(value) {
|
|
|
3609
3585
|
}
|
|
3610
3586
|
|
|
3611
3587
|
class ConfirmationBody extends C {
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
this.props.onCopyAccount(this.props.model.accountId);
|
|
3617
|
-
};
|
|
3618
|
-
}
|
|
3588
|
+
copy = () => {
|
|
3589
|
+
if (this.props.model.kind === "funding")
|
|
3590
|
+
this.props.onCopyAccount(this.props.model.accountId);
|
|
3591
|
+
};
|
|
3619
3592
|
render() {
|
|
3620
3593
|
const model = this.props.model;
|
|
3621
3594
|
switch (model.kind) {
|
|
@@ -3693,16 +3666,13 @@ function PasskeyRegistrationDetails(props) {
|
|
|
3693
3666
|
|
|
3694
3667
|
// src/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationContent.tsx
|
|
3695
3668
|
class PasskeyRegistrationContent extends C {
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
this.props.onCancel();
|
|
3704
|
-
};
|
|
3705
|
-
}
|
|
3669
|
+
confirm = () => {
|
|
3670
|
+
if (this.props.decision.kind === "ready")
|
|
3671
|
+
this.props.decision.onConfirm();
|
|
3672
|
+
};
|
|
3673
|
+
cancel = () => {
|
|
3674
|
+
this.props.onCancel();
|
|
3675
|
+
};
|
|
3706
3676
|
render() {
|
|
3707
3677
|
const creating = this.props.decision.kind === "creating";
|
|
3708
3678
|
return /* @__PURE__ */ u2("div", {
|
|
@@ -3785,25 +3755,22 @@ function formatEmailOtpSentText(emailHint) {
|
|
|
3785
3755
|
var nextInputId = 0;
|
|
3786
3756
|
|
|
3787
3757
|
class EmailOtpInput extends C {
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
this.
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
}, index);
|
|
3805
|
-
};
|
|
3806
|
-
}
|
|
3758
|
+
id = `seams-email-code-${++nextInputId}`;
|
|
3759
|
+
input = (event) => {
|
|
3760
|
+
if (this.props.state.kind === "editing")
|
|
3761
|
+
this.props.state.onInput(event.currentTarget.value);
|
|
3762
|
+
};
|
|
3763
|
+
resend = () => {
|
|
3764
|
+
if (this.props.resend?.kind === "available")
|
|
3765
|
+
this.props.resend.onResend();
|
|
3766
|
+
};
|
|
3767
|
+
renderDigit = (index) => {
|
|
3768
|
+
const digit = this.props.code[index] || "";
|
|
3769
|
+
return /* @__PURE__ */ u2("span", {
|
|
3770
|
+
class: `email-otp-confirm__slot${digit ? " is-filled" : ""}`,
|
|
3771
|
+
children: digit
|
|
3772
|
+
}, index);
|
|
3773
|
+
};
|
|
3807
3774
|
render() {
|
|
3808
3775
|
const disabled = this.props.state.kind !== "editing";
|
|
3809
3776
|
const helperId = `${this.id}-helper`;
|
|
@@ -3868,75 +3835,26 @@ class EmailOtpInput extends C {
|
|
|
3868
3835
|
|
|
3869
3836
|
// src/core/signingEngine/uiConfirm/ui/preact/email-otp-session.ts
|
|
3870
3837
|
class EmailOtpSession {
|
|
3838
|
+
codeState = { kind: "editing", code: "" };
|
|
3839
|
+
resendState = { kind: "available", label: "Resend code" };
|
|
3840
|
+
error = "";
|
|
3841
|
+
countdown = null;
|
|
3842
|
+
options;
|
|
3871
3843
|
constructor(options) {
|
|
3872
|
-
this.codeState = { kind: "editing", code: "" };
|
|
3873
|
-
this.resendState = { kind: "available", label: "Resend code" };
|
|
3874
|
-
this.error = "";
|
|
3875
|
-
this.countdown = null;
|
|
3876
|
-
this.input = (rawValue) => {
|
|
3877
|
-
if (this.codeState.kind !== "editing")
|
|
3878
|
-
return;
|
|
3879
|
-
const code = rawValue.replace(/\D/g, "").slice(0, 6);
|
|
3880
|
-
this.error = "";
|
|
3881
|
-
this.codeState = { kind: "editing", code };
|
|
3882
|
-
if (code.length === 6) {
|
|
3883
|
-
this.confirm();
|
|
3884
|
-
} else {
|
|
3885
|
-
this.publish();
|
|
3886
|
-
}
|
|
3887
|
-
};
|
|
3888
|
-
this.submit = () => {
|
|
3889
|
-
if (this.codeState.kind !== "fading")
|
|
3890
|
-
return;
|
|
3891
|
-
const code = this.codeState.code;
|
|
3892
|
-
this.codeState = { kind: "submitting", code };
|
|
3893
|
-
this.publish();
|
|
3894
|
-
if (!this.isDisposed())
|
|
3895
|
-
this.options.onSubmit(code);
|
|
3896
|
-
};
|
|
3897
|
-
this.resend = async () => {
|
|
3898
|
-
if (this.codeState.kind !== "editing" || this.resendState.kind !== "available")
|
|
3899
|
-
return;
|
|
3900
|
-
const action = this.options.resend;
|
|
3901
|
-
if (!action)
|
|
3902
|
-
return;
|
|
3903
|
-
const until = Date.now() + action.cooldownMs;
|
|
3904
|
-
const pending = { kind: "sending", until };
|
|
3905
|
-
this.resendState = pending;
|
|
3906
|
-
this.error = "";
|
|
3907
|
-
this.publish();
|
|
3908
|
-
if (this.isDisposed())
|
|
3909
|
-
return;
|
|
3910
|
-
let result;
|
|
3911
|
-
try {
|
|
3912
|
-
result = await action.send();
|
|
3913
|
-
} catch {
|
|
3914
|
-
result = { kind: "failed", message: "Could not send code." };
|
|
3915
|
-
}
|
|
3916
|
-
if (this.isDisposed() || this.resendState !== pending)
|
|
3917
|
-
return;
|
|
3918
|
-
const label = result.kind === "sent" ? "Code sent" : "Resend code";
|
|
3919
|
-
if (result.kind === "failed")
|
|
3920
|
-
this.error = result.message;
|
|
3921
|
-
if (Date.now() >= until) {
|
|
3922
|
-
this.resendState = { kind: "available", label };
|
|
3923
|
-
} else {
|
|
3924
|
-
this.resendState = { kind: "cooldown", until, label };
|
|
3925
|
-
this.countdown = setInterval(this.tick, 250);
|
|
3926
|
-
}
|
|
3927
|
-
this.publish();
|
|
3928
|
-
};
|
|
3929
|
-
this.tick = () => {
|
|
3930
|
-
if (this.resendState.kind !== "cooldown")
|
|
3931
|
-
return;
|
|
3932
|
-
if (Date.now() >= this.resendState.until) {
|
|
3933
|
-
this.resendState = { kind: "available", label: this.resendState.label };
|
|
3934
|
-
this.clearCountdown();
|
|
3935
|
-
}
|
|
3936
|
-
this.publish();
|
|
3937
|
-
};
|
|
3938
3844
|
this.options = options;
|
|
3939
3845
|
}
|
|
3846
|
+
input = (rawValue) => {
|
|
3847
|
+
if (this.codeState.kind !== "editing")
|
|
3848
|
+
return;
|
|
3849
|
+
const code = rawValue.replace(/\D/g, "").slice(0, 6);
|
|
3850
|
+
this.error = "";
|
|
3851
|
+
this.codeState = { kind: "editing", code };
|
|
3852
|
+
if (code.length === 6) {
|
|
3853
|
+
this.confirm();
|
|
3854
|
+
} else {
|
|
3855
|
+
this.publish();
|
|
3856
|
+
}
|
|
3857
|
+
};
|
|
3940
3858
|
confirm() {
|
|
3941
3859
|
if (this.codeState.kind !== "editing")
|
|
3942
3860
|
return "ignored";
|
|
@@ -3951,6 +3869,15 @@ class EmailOtpSession {
|
|
|
3951
3869
|
this.publish();
|
|
3952
3870
|
return "accepted";
|
|
3953
3871
|
}
|
|
3872
|
+
submit = () => {
|
|
3873
|
+
if (this.codeState.kind !== "fading")
|
|
3874
|
+
return;
|
|
3875
|
+
const code = this.codeState.code;
|
|
3876
|
+
this.codeState = { kind: "submitting", code };
|
|
3877
|
+
this.publish();
|
|
3878
|
+
if (!this.isDisposed())
|
|
3879
|
+
this.options.onSubmit(code);
|
|
3880
|
+
};
|
|
3954
3881
|
retry(message) {
|
|
3955
3882
|
if (this.codeState.kind === "disposed")
|
|
3956
3883
|
return;
|
|
@@ -3977,6 +3904,47 @@ class EmailOtpSession {
|
|
|
3977
3904
|
return;
|
|
3978
3905
|
}
|
|
3979
3906
|
}
|
|
3907
|
+
resend = async () => {
|
|
3908
|
+
if (this.codeState.kind !== "editing" || this.resendState.kind !== "available")
|
|
3909
|
+
return;
|
|
3910
|
+
const action = this.options.resend;
|
|
3911
|
+
if (!action)
|
|
3912
|
+
return;
|
|
3913
|
+
const until = Date.now() + action.cooldownMs;
|
|
3914
|
+
const pending = { kind: "sending", until };
|
|
3915
|
+
this.resendState = pending;
|
|
3916
|
+
this.error = "";
|
|
3917
|
+
this.publish();
|
|
3918
|
+
if (this.isDisposed())
|
|
3919
|
+
return;
|
|
3920
|
+
let result;
|
|
3921
|
+
try {
|
|
3922
|
+
result = await action.send();
|
|
3923
|
+
} catch {
|
|
3924
|
+
result = { kind: "failed", message: "Could not send code." };
|
|
3925
|
+
}
|
|
3926
|
+
if (this.isDisposed() || this.resendState !== pending)
|
|
3927
|
+
return;
|
|
3928
|
+
const label = result.kind === "sent" ? "Code sent" : "Resend code";
|
|
3929
|
+
if (result.kind === "failed")
|
|
3930
|
+
this.error = result.message;
|
|
3931
|
+
if (Date.now() >= until) {
|
|
3932
|
+
this.resendState = { kind: "available", label };
|
|
3933
|
+
} else {
|
|
3934
|
+
this.resendState = { kind: "cooldown", until, label };
|
|
3935
|
+
this.countdown = setInterval(this.tick, 250);
|
|
3936
|
+
}
|
|
3937
|
+
this.publish();
|
|
3938
|
+
};
|
|
3939
|
+
tick = () => {
|
|
3940
|
+
if (this.resendState.kind !== "cooldown")
|
|
3941
|
+
return;
|
|
3942
|
+
if (Date.now() >= this.resendState.until) {
|
|
3943
|
+
this.resendState = { kind: "available", label: this.resendState.label };
|
|
3944
|
+
this.clearCountdown();
|
|
3945
|
+
}
|
|
3946
|
+
this.publish();
|
|
3947
|
+
};
|
|
3980
3948
|
isDisposed() {
|
|
3981
3949
|
return this.codeState.kind === "disposed";
|
|
3982
3950
|
}
|
|
@@ -4028,47 +3996,11 @@ function EmailOtpContent(props) {
|
|
|
4028
3996
|
}
|
|
4029
3997
|
|
|
4030
3998
|
class EmailOtpSessionView extends C {
|
|
3999
|
+
session;
|
|
4000
|
+
form = M();
|
|
4001
|
+
lifetime;
|
|
4031
4002
|
constructor(props) {
|
|
4032
4003
|
super(props);
|
|
4033
|
-
this.form = M();
|
|
4034
|
-
this.submit = (code) => {
|
|
4035
|
-
if (this.lifetime.kind === "active")
|
|
4036
|
-
this.props.onSubmit(code, this.lifetime.challengeId);
|
|
4037
|
-
};
|
|
4038
|
-
this.send = async () => {
|
|
4039
|
-
const callback = this.props.prompt.onResend;
|
|
4040
|
-
if (!callback)
|
|
4041
|
-
return { kind: "failed", message: "Could not send code." };
|
|
4042
|
-
try {
|
|
4043
|
-
const result = await callback();
|
|
4044
|
-
if (this.lifetime.kind === "disposed")
|
|
4045
|
-
return { kind: "sent" };
|
|
4046
|
-
const challengeId = String(result?.challengeId || "").trim();
|
|
4047
|
-
const emailHint = String(result?.emailHint || "").trim();
|
|
4048
|
-
if (challengeId) {
|
|
4049
|
-
this.lifetime = {
|
|
4050
|
-
kind: "active",
|
|
4051
|
-
challengeId,
|
|
4052
|
-
emailHint: emailHint || this.lifetime.emailHint
|
|
4053
|
-
};
|
|
4054
|
-
}
|
|
4055
|
-
return { kind: "sent" };
|
|
4056
|
-
} catch (error) {
|
|
4057
|
-
return { kind: "failed", message: formatResendError(error) };
|
|
4058
|
-
}
|
|
4059
|
-
};
|
|
4060
|
-
this.change = (snapshot) => {
|
|
4061
|
-
this.setState(snapshot);
|
|
4062
|
-
};
|
|
4063
|
-
this.confirm = (event) => {
|
|
4064
|
-
event.preventDefault();
|
|
4065
|
-
event.stopPropagation();
|
|
4066
|
-
if (this.session.confirm() === "invalid")
|
|
4067
|
-
this.setState({}, this.focusCode);
|
|
4068
|
-
};
|
|
4069
|
-
this.focusCode = () => {
|
|
4070
|
-
this.form.current?.querySelector("input")?.focus({ preventScroll: true });
|
|
4071
|
-
};
|
|
4072
4004
|
this.lifetime = {
|
|
4073
4005
|
kind: "active",
|
|
4074
4006
|
challengeId: props.prompt.challengeId,
|
|
@@ -4089,6 +4021,44 @@ class EmailOtpSessionView extends C {
|
|
|
4089
4021
|
} : null
|
|
4090
4022
|
});
|
|
4091
4023
|
}
|
|
4024
|
+
submit = (code) => {
|
|
4025
|
+
if (this.lifetime.kind === "active")
|
|
4026
|
+
this.props.onSubmit(code, this.lifetime.challengeId);
|
|
4027
|
+
};
|
|
4028
|
+
send = async () => {
|
|
4029
|
+
const callback = this.props.prompt.onResend;
|
|
4030
|
+
if (!callback)
|
|
4031
|
+
return { kind: "failed", message: "Could not send code." };
|
|
4032
|
+
try {
|
|
4033
|
+
const result = await callback();
|
|
4034
|
+
if (this.lifetime.kind === "disposed")
|
|
4035
|
+
return { kind: "sent" };
|
|
4036
|
+
const challengeId = String(result?.challengeId || "").trim();
|
|
4037
|
+
const emailHint = String(result?.emailHint || "").trim();
|
|
4038
|
+
if (challengeId) {
|
|
4039
|
+
this.lifetime = {
|
|
4040
|
+
kind: "active",
|
|
4041
|
+
challengeId,
|
|
4042
|
+
emailHint: emailHint || this.lifetime.emailHint
|
|
4043
|
+
};
|
|
4044
|
+
}
|
|
4045
|
+
return { kind: "sent" };
|
|
4046
|
+
} catch (error) {
|
|
4047
|
+
return { kind: "failed", message: formatResendError(error) };
|
|
4048
|
+
}
|
|
4049
|
+
};
|
|
4050
|
+
change = (snapshot) => {
|
|
4051
|
+
this.setState(snapshot);
|
|
4052
|
+
};
|
|
4053
|
+
confirm = (event) => {
|
|
4054
|
+
event.preventDefault();
|
|
4055
|
+
event.stopPropagation();
|
|
4056
|
+
if (this.session.confirm() === "invalid")
|
|
4057
|
+
this.setState({}, this.focusCode);
|
|
4058
|
+
};
|
|
4059
|
+
focusCode = () => {
|
|
4060
|
+
this.form.current?.querySelector("input")?.focus({ preventScroll: true });
|
|
4061
|
+
};
|
|
4092
4062
|
componentDidMount() {
|
|
4093
4063
|
this.session.setVerification(this.props.verification);
|
|
4094
4064
|
}
|
|
@@ -4202,75 +4172,13 @@ function CopyStatusIcon() {
|
|
|
4202
4172
|
var nextDisclosureId = 0;
|
|
4203
4173
|
|
|
4204
4174
|
class ReviewDisclosure extends C {
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
this.root = M();
|
|
4208
|
-
this.id = `seams-review-disclosure-${++nextDisclosureId}`;
|
|
4209
|
-
this.motion = null;
|
|
4210
|
-
this.setHeight = (height) => {
|
|
4211
|
-
const details = this.root.current;
|
|
4212
|
-
if (!details)
|
|
4213
|
-
return;
|
|
4214
|
-
confirmationDocumentStyles(details.ownerDocument).setDynamicDeclarations(this.id, `#${this.id}`, { "--seams-review-disclosure-height": `${height}px` });
|
|
4215
|
-
};
|
|
4216
|
-
this.finish = () => {
|
|
4217
|
-
if (this.root.current && this.motion) {
|
|
4218
|
-
this.root.current.open = this.motion.opening;
|
|
4219
|
-
this.root.current.removeAttribute("data-closing");
|
|
4220
|
-
}
|
|
4221
|
-
this.clearMotion();
|
|
4222
|
-
};
|
|
4223
|
-
this.toggle = (event) => {
|
|
4224
|
-
const details = this.root.current;
|
|
4225
|
-
if (!details)
|
|
4226
|
-
return;
|
|
4227
|
-
event.preventDefault();
|
|
4228
|
-
if (this.motion?.kind === "hosted")
|
|
4229
|
-
return;
|
|
4230
|
-
const opening = this.motion ? !this.motion.opening : !details.open;
|
|
4231
|
-
const body = details.lastElementChild;
|
|
4232
|
-
if (!(body instanceof HTMLElement))
|
|
4233
|
-
return;
|
|
4234
|
-
const height = details.open ? body.getBoundingClientRect().height : 0;
|
|
4235
|
-
this.clearMotion();
|
|
4236
|
-
details.toggleAttribute("data-closing", !opening);
|
|
4237
|
-
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches || !details.animate) {
|
|
4238
|
-
details.open = opening;
|
|
4239
|
-
details.removeAttribute("data-closing");
|
|
4240
|
-
return;
|
|
4241
|
-
}
|
|
4242
|
-
details.open = true;
|
|
4243
|
-
details.setAttribute("data-resizing", "");
|
|
4244
|
-
const target = opening ? body.scrollHeight : 0;
|
|
4245
|
-
this.motion = { kind: "hosted", opening };
|
|
4246
|
-
if (announceClampedSurfaceResize({
|
|
4247
|
-
element: body,
|
|
4248
|
-
reason: "review-details",
|
|
4249
|
-
fromCssPx: height,
|
|
4250
|
-
toCssPx: target,
|
|
4251
|
-
drivenClasses: ["seams-review-disclosure-driven"],
|
|
4252
|
-
setHeightCssPx: this.setHeight,
|
|
4253
|
-
onSettled: this.finish
|
|
4254
|
-
}))
|
|
4255
|
-
return;
|
|
4256
|
-
const size = body.animate([{ height: `${height}px`, overflow: "hidden" }, { height: `${target}px`, overflow: "hidden" }], {
|
|
4257
|
-
duration: opening ? 220 : 180,
|
|
4258
|
-
easing: "cubic-bezier(.2,0,0,1)",
|
|
4259
|
-
fill: "both"
|
|
4260
|
-
});
|
|
4261
|
-
const fade = body.animate(opening ? [{ opacity: 0 }, { opacity: 1 }] : [{ opacity: 1 }, { opacity: 0 }], {
|
|
4262
|
-
duration: opening ? 180 : 100,
|
|
4263
|
-
easing: "ease-out",
|
|
4264
|
-
fill: "both"
|
|
4265
|
-
});
|
|
4266
|
-
this.motion = { kind: "local", opening, size, fade };
|
|
4267
|
-
size.onfinish = this.finish;
|
|
4268
|
-
};
|
|
4269
|
-
}
|
|
4175
|
+
root = M();
|
|
4176
|
+
id = `seams-review-disclosure-${++nextDisclosureId}`;
|
|
4270
4177
|
componentDidMount() {
|
|
4271
4178
|
if (this.root.current)
|
|
4272
4179
|
this.root.current.open = this.props.initiallyOpen ?? false;
|
|
4273
4180
|
}
|
|
4181
|
+
motion = null;
|
|
4274
4182
|
componentWillUnmount() {
|
|
4275
4183
|
this.clearMotion();
|
|
4276
4184
|
if (this.root.current)
|
|
@@ -4287,6 +4195,65 @@ class ReviewDisclosure extends C {
|
|
|
4287
4195
|
this.motion = null;
|
|
4288
4196
|
this.root.current?.removeAttribute("data-resizing");
|
|
4289
4197
|
}
|
|
4198
|
+
setHeight = (height) => {
|
|
4199
|
+
const details = this.root.current;
|
|
4200
|
+
if (!details)
|
|
4201
|
+
return;
|
|
4202
|
+
confirmationDocumentStyles(details.ownerDocument).setDynamicDeclarations(this.id, `#${this.id}`, { "--seams-review-disclosure-height": `${height}px` });
|
|
4203
|
+
};
|
|
4204
|
+
finish = () => {
|
|
4205
|
+
if (this.root.current && this.motion) {
|
|
4206
|
+
this.root.current.open = this.motion.opening;
|
|
4207
|
+
this.root.current.removeAttribute("data-closing");
|
|
4208
|
+
}
|
|
4209
|
+
this.clearMotion();
|
|
4210
|
+
};
|
|
4211
|
+
toggle = (event) => {
|
|
4212
|
+
const details = this.root.current;
|
|
4213
|
+
if (!details)
|
|
4214
|
+
return;
|
|
4215
|
+
event.preventDefault();
|
|
4216
|
+
if (this.motion?.kind === "hosted")
|
|
4217
|
+
return;
|
|
4218
|
+
const opening = this.motion ? !this.motion.opening : !details.open;
|
|
4219
|
+
const body = details.lastElementChild;
|
|
4220
|
+
if (!(body instanceof HTMLElement))
|
|
4221
|
+
return;
|
|
4222
|
+
const height = details.open ? body.getBoundingClientRect().height : 0;
|
|
4223
|
+
this.clearMotion();
|
|
4224
|
+
details.toggleAttribute("data-closing", !opening);
|
|
4225
|
+
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches || !details.animate) {
|
|
4226
|
+
details.open = opening;
|
|
4227
|
+
details.removeAttribute("data-closing");
|
|
4228
|
+
return;
|
|
4229
|
+
}
|
|
4230
|
+
details.open = true;
|
|
4231
|
+
details.setAttribute("data-resizing", "");
|
|
4232
|
+
const target = opening ? body.scrollHeight : 0;
|
|
4233
|
+
this.motion = { kind: "hosted", opening };
|
|
4234
|
+
if (announceClampedSurfaceResize({
|
|
4235
|
+
element: body,
|
|
4236
|
+
reason: "review-details",
|
|
4237
|
+
fromCssPx: height,
|
|
4238
|
+
toCssPx: target,
|
|
4239
|
+
drivenClasses: ["seams-review-disclosure-driven"],
|
|
4240
|
+
setHeightCssPx: this.setHeight,
|
|
4241
|
+
onSettled: this.finish
|
|
4242
|
+
}))
|
|
4243
|
+
return;
|
|
4244
|
+
const size = body.animate([{ height: `${height}px`, overflow: "hidden" }, { height: `${target}px`, overflow: "hidden" }], {
|
|
4245
|
+
duration: opening ? 220 : 180,
|
|
4246
|
+
easing: "cubic-bezier(.2,0,0,1)",
|
|
4247
|
+
fill: "both"
|
|
4248
|
+
});
|
|
4249
|
+
const fade = body.animate(opening ? [{ opacity: 0 }, { opacity: 1 }] : [{ opacity: 1 }, { opacity: 0 }], {
|
|
4250
|
+
duration: opening ? 180 : 100,
|
|
4251
|
+
easing: "ease-out",
|
|
4252
|
+
fill: "both"
|
|
4253
|
+
});
|
|
4254
|
+
this.motion = { kind: "local", opening, size, fade };
|
|
4255
|
+
size.onfinish = this.finish;
|
|
4256
|
+
};
|
|
4290
4257
|
render() {
|
|
4291
4258
|
return /* @__PURE__ */ u2("details", {
|
|
4292
4259
|
ref: this.root,
|
|
@@ -4520,33 +4487,12 @@ function reviewAmount(model) {
|
|
|
4520
4487
|
}
|
|
4521
4488
|
|
|
4522
4489
|
class CopyReviewValue extends C {
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
this.
|
|
4528
|
-
|
|
4529
|
-
this.setState({ copied: false });
|
|
4530
|
-
};
|
|
4531
|
-
this.copy = async (event) => {
|
|
4532
|
-
const target = event.currentTarget;
|
|
4533
|
-
if (!(target instanceof HTMLElement))
|
|
4534
|
-
return;
|
|
4535
|
-
const signal = this.lifetime.signal;
|
|
4536
|
-
try {
|
|
4537
|
-
const copied = await copySurfaceText(target, this.props.value, signal);
|
|
4538
|
-
if (!copied || signal.aborted)
|
|
4539
|
-
return;
|
|
4540
|
-
this.setState({ copied: true });
|
|
4541
|
-
if (this.timer !== null)
|
|
4542
|
-
clearTimeout(this.timer);
|
|
4543
|
-
this.timer = setTimeout(this.resetCopied, 3000);
|
|
4544
|
-
} catch {
|
|
4545
|
-
if (!signal.aborted)
|
|
4546
|
-
this.setState({ copied: false });
|
|
4547
|
-
}
|
|
4548
|
-
};
|
|
4549
|
-
}
|
|
4490
|
+
state = { copied: false };
|
|
4491
|
+
lifetime = new AbortController;
|
|
4492
|
+
timer = null;
|
|
4493
|
+
resetCopied = () => {
|
|
4494
|
+
this.setState({ copied: false });
|
|
4495
|
+
};
|
|
4550
4496
|
componentWillUnmount() {
|
|
4551
4497
|
this.lifetime.abort();
|
|
4552
4498
|
if (this.timer !== null)
|
|
@@ -4561,6 +4507,24 @@ class CopyReviewValue extends C {
|
|
|
4561
4507
|
clearTimeout(this.timer);
|
|
4562
4508
|
this.resetCopied();
|
|
4563
4509
|
}
|
|
4510
|
+
copy = async (event) => {
|
|
4511
|
+
const target = event.currentTarget;
|
|
4512
|
+
if (!(target instanceof HTMLElement))
|
|
4513
|
+
return;
|
|
4514
|
+
const signal = this.lifetime.signal;
|
|
4515
|
+
try {
|
|
4516
|
+
const copied = await copySurfaceText(target, this.props.value, signal);
|
|
4517
|
+
if (!copied || signal.aborted)
|
|
4518
|
+
return;
|
|
4519
|
+
this.setState({ copied: true });
|
|
4520
|
+
if (this.timer !== null)
|
|
4521
|
+
clearTimeout(this.timer);
|
|
4522
|
+
this.timer = setTimeout(this.resetCopied, 3000);
|
|
4523
|
+
} catch {
|
|
4524
|
+
if (!signal.aborted)
|
|
4525
|
+
this.setState({ copied: false });
|
|
4526
|
+
}
|
|
4527
|
+
};
|
|
4564
4528
|
render() {
|
|
4565
4529
|
return /* @__PURE__ */ u2("button", {
|
|
4566
4530
|
type: "button",
|
|
@@ -4779,34 +4743,31 @@ function TransactionReview({
|
|
|
4779
4743
|
var nextConfirmationId = 0;
|
|
4780
4744
|
|
|
4781
4745
|
class ConfirmationContent extends C {
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
this.props.styles.setDynamicDeclarations(this.reflowId, `#${element.id}`, {
|
|
4796
|
-
[CONFIRM_SURFACE_HEIGHT_DRIVEN_VAR]: `${height}px`
|
|
4797
|
-
});
|
|
4798
|
-
};
|
|
4799
|
-
this.reflow = createSurfaceHeightReflow({
|
|
4800
|
-
reason: "confirm-body",
|
|
4801
|
-
element: this.getReflowElement,
|
|
4802
|
-
setHeightCssPx: this.setHeight
|
|
4746
|
+
root = M();
|
|
4747
|
+
otpFormId = `seams-confirmation-email-${++nextConfirmationId}`;
|
|
4748
|
+
reflowId = `seams-confirmation-content-surface-${nextConfirmationId}`;
|
|
4749
|
+
getReflowElement = () => {
|
|
4750
|
+
const root = this.root.current;
|
|
4751
|
+
return root?.closest(".modal-container-root, .seams-confirmation-drawer") ?? null;
|
|
4752
|
+
};
|
|
4753
|
+
setHeight = (height) => {
|
|
4754
|
+
const element = this.getReflowElement();
|
|
4755
|
+
if (!element?.id)
|
|
4756
|
+
return;
|
|
4757
|
+
this.props.styles.setDynamicDeclarations(this.reflowId, `#${element.id}`, {
|
|
4758
|
+
[CONFIRM_SURFACE_HEIGHT_DRIVEN_VAR]: `${height}px`
|
|
4803
4759
|
});
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
}
|
|
4760
|
+
};
|
|
4761
|
+
reflow = createSurfaceHeightReflow({
|
|
4762
|
+
reason: "confirm-body",
|
|
4763
|
+
element: this.getReflowElement,
|
|
4764
|
+
setHeightCssPx: this.setHeight
|
|
4765
|
+
});
|
|
4766
|
+
copyAccount = (accountId) => {
|
|
4767
|
+
const root = this.root.current;
|
|
4768
|
+
if (root)
|
|
4769
|
+
copySurfaceText(root, accountId).catch(ignoreCopyFailure);
|
|
4770
|
+
};
|
|
4810
4771
|
componentWillReceiveProps() {
|
|
4811
4772
|
this.reflow.capture();
|
|
4812
4773
|
}
|
|
@@ -4930,30 +4891,9 @@ function ConfirmationModal(props) {
|
|
|
4930
4891
|
}
|
|
4931
4892
|
|
|
4932
4893
|
class ModalShell extends C {
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
this.hosted = M();
|
|
4937
|
-
this.containerId = `seams-confirmation-modal-${++nextModalId}`;
|
|
4938
|
-
this.cancel = (event) => {
|
|
4939
|
-
event.preventDefault();
|
|
4940
|
-
event.stopPropagation();
|
|
4941
|
-
this.props.onCancel();
|
|
4942
|
-
};
|
|
4943
|
-
this.backdropClick = (event) => {
|
|
4944
|
-
const dialog = this.dialog.current;
|
|
4945
|
-
if (!dialog || event.target !== dialog)
|
|
4946
|
-
return;
|
|
4947
|
-
const bounds = dialog.getBoundingClientRect();
|
|
4948
|
-
if (event.clientX < bounds.left || event.clientX > bounds.right || event.clientY < bounds.top || event.clientY > bounds.bottom) {
|
|
4949
|
-
this.cancel(event);
|
|
4950
|
-
}
|
|
4951
|
-
};
|
|
4952
|
-
this.hostedKeyDown = (event) => {
|
|
4953
|
-
if (!event.defaultPrevented && event.key === "Escape")
|
|
4954
|
-
this.cancel(event);
|
|
4955
|
-
};
|
|
4956
|
-
}
|
|
4894
|
+
dialog = M();
|
|
4895
|
+
hosted = M();
|
|
4896
|
+
containerId = `seams-confirmation-modal-${++nextModalId}`;
|
|
4957
4897
|
componentDidMount() {
|
|
4958
4898
|
if (this.props.context === "standalone") {
|
|
4959
4899
|
this.dialog.current?.showModal();
|
|
@@ -4964,6 +4904,24 @@ class ModalShell extends C {
|
|
|
4964
4904
|
componentWillUnmount() {
|
|
4965
4905
|
this.dialog.current?.close();
|
|
4966
4906
|
}
|
|
4907
|
+
cancel = (event) => {
|
|
4908
|
+
event.preventDefault();
|
|
4909
|
+
event.stopPropagation();
|
|
4910
|
+
this.props.onCancel();
|
|
4911
|
+
};
|
|
4912
|
+
backdropClick = (event) => {
|
|
4913
|
+
const dialog = this.dialog.current;
|
|
4914
|
+
if (!dialog || event.target !== dialog)
|
|
4915
|
+
return;
|
|
4916
|
+
const bounds = dialog.getBoundingClientRect();
|
|
4917
|
+
if (event.clientX < bounds.left || event.clientX > bounds.right || event.clientY < bounds.top || event.clientY > bounds.bottom) {
|
|
4918
|
+
this.cancel(event);
|
|
4919
|
+
}
|
|
4920
|
+
};
|
|
4921
|
+
hostedKeyDown = (event) => {
|
|
4922
|
+
if (!event.defaultPrevented && event.key === "Escape")
|
|
4923
|
+
this.cancel(event);
|
|
4924
|
+
};
|
|
4967
4925
|
render() {
|
|
4968
4926
|
if (this.props.context === "standalone") {
|
|
4969
4927
|
return /* @__PURE__ */ u2("dialog", {
|
|
@@ -5017,157 +4975,19 @@ function ConfirmationDrawer(props) {
|
|
|
5017
4975
|
}
|
|
5018
4976
|
|
|
5019
4977
|
class DrawerShell extends C {
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
this.closeReported = false;
|
|
5034
|
-
this.suppressPointerClick = false;
|
|
5035
|
-
this.openAfterLayout = () => {
|
|
5036
|
-
this.frame = null;
|
|
5037
|
-
this.setState({ settled: true });
|
|
5038
|
-
};
|
|
5039
|
-
this.scheduleMeasure = () => {
|
|
5040
|
-
if (this.lifetime === "disposed" || this.frame !== null)
|
|
5041
|
-
return;
|
|
5042
|
-
this.frame = this.sheet.current.ownerDocument.defaultView.requestAnimationFrame(this.measureFrame);
|
|
5043
|
-
};
|
|
5044
|
-
this.measureFrame = () => {
|
|
5045
|
-
this.frame = null;
|
|
5046
|
-
this.measure();
|
|
5047
|
-
};
|
|
5048
|
-
this.measureContent = () => {
|
|
5049
|
-
if (this.lifetime === "active")
|
|
5050
|
-
this.measure();
|
|
5051
|
-
};
|
|
5052
|
-
this.reportClosed = () => {
|
|
5053
|
-
this.clearCloseTimer();
|
|
5054
|
-
if (this.lifetime === "disposed" || this.closeReported || this.props.state.kind !== "closing")
|
|
5055
|
-
return;
|
|
5056
|
-
this.closeReported = true;
|
|
5057
|
-
this.props.state.onClosed();
|
|
5058
|
-
};
|
|
5059
|
-
this.transitionEnd = (event) => {
|
|
5060
|
-
if (event.target === this.sheet.current && event.propertyName === "transform")
|
|
5061
|
-
this.reportClosed();
|
|
5062
|
-
};
|
|
5063
|
-
this.cancel = (event) => {
|
|
5064
|
-
event.preventDefault();
|
|
5065
|
-
event.stopPropagation();
|
|
5066
|
-
if (this.props.state.kind === "open")
|
|
5067
|
-
this.props.onCancel();
|
|
5068
|
-
};
|
|
5069
|
-
this.backdropClick = (event) => {
|
|
5070
|
-
if (this.props.dismissOnBackdrop !== false && event.target === this.dialog.current && this.canDrag())
|
|
5071
|
-
this.cancel(event);
|
|
5072
|
-
};
|
|
5073
|
-
this.keyDown = (event) => {
|
|
5074
|
-
if (!event.defaultPrevented && event.key === "Escape")
|
|
5075
|
-
this.cancel(event);
|
|
5076
|
-
};
|
|
5077
|
-
this.pointerDown = (event) => {
|
|
5078
|
-
this.clearClickSuppression();
|
|
5079
|
-
if (!this.canDrag() || this.gesture.kind !== "idle" || !event.isPrimary || event.button !== 0)
|
|
5080
|
-
return;
|
|
5081
|
-
const target = event.target;
|
|
5082
|
-
if (target instanceof Element && target.closest("a, input, textarea, select, summary, button:not(.seams-drawer-handle), [data-seams-drawer-no-drag]"))
|
|
5083
|
-
return;
|
|
5084
|
-
this.gesture = { kind: "pending", pointerId: event.pointerId, startY: event.clientY };
|
|
5085
|
-
const doc = this.sheet.current.ownerDocument;
|
|
5086
|
-
doc.addEventListener("pointermove", this.pointerMove, { passive: false });
|
|
5087
|
-
doc.addEventListener("pointerup", this.pointerUp);
|
|
5088
|
-
doc.addEventListener("pointercancel", this.pointerCancel);
|
|
5089
|
-
};
|
|
5090
|
-
this.pointerMove = (event) => {
|
|
5091
|
-
let gesture = this.gesture;
|
|
5092
|
-
if (gesture.kind === "idle" || gesture.pointerId !== event.pointerId)
|
|
5093
|
-
return;
|
|
5094
|
-
const sheet = this.sheet.current;
|
|
5095
|
-
if (gesture.kind === "pending") {
|
|
5096
|
-
if (Math.abs(event.clientY - gesture.startY) < 8 || this.body.current.scrollTop > 0)
|
|
5097
|
-
return;
|
|
5098
|
-
const win = sheet.ownerDocument.defaultView;
|
|
5099
|
-
const rest = new DOMMatrixReadOnly(win.getComputedStyle(sheet).transform).m42;
|
|
5100
|
-
gesture = {
|
|
5101
|
-
kind: "dragging",
|
|
5102
|
-
pointerId: gesture.pointerId,
|
|
5103
|
-
startY: gesture.startY,
|
|
5104
|
-
lastY: gesture.startY,
|
|
5105
|
-
startedAt: event.timeStamp,
|
|
5106
|
-
lastTime: event.timeStamp,
|
|
5107
|
-
velocity: 0,
|
|
5108
|
-
rest,
|
|
5109
|
-
translate: rest,
|
|
5110
|
-
height: sheet.offsetHeight
|
|
5111
|
-
};
|
|
5112
|
-
this.gesture = gesture;
|
|
5113
|
-
sheet.setPointerCapture(event.pointerId);
|
|
5114
|
-
sheet.classList.add("is-dragging");
|
|
5115
|
-
}
|
|
5116
|
-
const elapsed = event.timeStamp - gesture.lastTime;
|
|
5117
|
-
if (elapsed > 0)
|
|
5118
|
-
gesture.velocity = (event.clientY - gesture.lastY) / elapsed;
|
|
5119
|
-
gesture.lastY = event.clientY;
|
|
5120
|
-
gesture.lastTime = event.timeStamp;
|
|
5121
|
-
gesture.translate = drawerDragTranslate({
|
|
5122
|
-
startTranslatePx: gesture.rest,
|
|
5123
|
-
deltaPx: event.clientY - gesture.startY,
|
|
5124
|
-
restTranslatePx: gesture.rest,
|
|
5125
|
-
sheetHeightPx: gesture.height,
|
|
5126
|
-
viewportHeightPx: sheet.ownerDocument.defaultView.innerHeight,
|
|
5127
|
-
minimumOverpullPx: 160
|
|
5128
|
-
});
|
|
5129
|
-
this.props.styles.setDynamicDeclarations(`${this.id}-drag`, `#${this.id}`, {
|
|
5130
|
-
"--seams-drawer-drag": `${gesture.translate}px`
|
|
5131
|
-
});
|
|
5132
|
-
event.preventDefault();
|
|
5133
|
-
};
|
|
5134
|
-
this.pointerUp = (event) => {
|
|
5135
|
-
const gesture = this.gesture;
|
|
5136
|
-
if (gesture.kind === "idle" || gesture.pointerId !== event.pointerId)
|
|
5137
|
-
return;
|
|
5138
|
-
const dismiss = gesture.kind === "dragging" && shouldDismissDrawerDrag({
|
|
5139
|
-
velocityPxPerMs: gesture.velocity,
|
|
5140
|
-
totalDeltaPx: gesture.lastY - gesture.startY,
|
|
5141
|
-
durationMs: event.timeStamp - gesture.startedAt,
|
|
5142
|
-
translatePx: gesture.translate,
|
|
5143
|
-
sheetHeightPx: gesture.height
|
|
5144
|
-
});
|
|
5145
|
-
if (gesture.kind === "dragging") {
|
|
5146
|
-
this.suppressPointerClick = true;
|
|
5147
|
-
event.preventDefault();
|
|
5148
|
-
}
|
|
5149
|
-
this.resetGesture();
|
|
5150
|
-
if (dismiss && this.props.state.kind === "open")
|
|
5151
|
-
this.props.onCancel();
|
|
5152
|
-
};
|
|
5153
|
-
this.pointerCancel = (event) => {
|
|
5154
|
-
if (this.gesture.kind !== "idle" && this.gesture.pointerId === event.pointerId) {
|
|
5155
|
-
if (this.gesture.kind === "dragging")
|
|
5156
|
-
this.suppressPointerClick = true;
|
|
5157
|
-
this.resetGesture();
|
|
5158
|
-
}
|
|
5159
|
-
};
|
|
5160
|
-
this.clearClickSuppression = () => {
|
|
5161
|
-
this.suppressPointerClick = false;
|
|
5162
|
-
};
|
|
5163
|
-
this.suppressDragClick = (event) => {
|
|
5164
|
-
if (!this.suppressPointerClick || event.detail === 0)
|
|
5165
|
-
return;
|
|
5166
|
-
this.suppressPointerClick = false;
|
|
5167
|
-
event.preventDefault();
|
|
5168
|
-
event.stopPropagation();
|
|
5169
|
-
};
|
|
5170
|
-
}
|
|
4978
|
+
state = { settled: false };
|
|
4979
|
+
id = `seams-confirmation-drawer-${++nextDrawerId}`;
|
|
4980
|
+
dialog = M();
|
|
4981
|
+
sheet = M();
|
|
4982
|
+
body = M();
|
|
4983
|
+
content = M();
|
|
4984
|
+
observer = null;
|
|
4985
|
+
frame = null;
|
|
4986
|
+
closeTimer = null;
|
|
4987
|
+
gesture = { kind: "idle" };
|
|
4988
|
+
lifetime = "active";
|
|
4989
|
+
closeReported = false;
|
|
4990
|
+
suppressPointerClick = false;
|
|
5171
4991
|
componentDidMount() {
|
|
5172
4992
|
const sheet = this.sheet.current;
|
|
5173
4993
|
const win = sheet.ownerDocument.defaultView;
|
|
@@ -5184,6 +5004,10 @@ class DrawerShell extends C {
|
|
|
5184
5004
|
if (this.props.state.kind === "closing")
|
|
5185
5005
|
this.startClose();
|
|
5186
5006
|
}
|
|
5007
|
+
openAfterLayout = () => {
|
|
5008
|
+
this.frame = null;
|
|
5009
|
+
this.setState({ settled: true });
|
|
5010
|
+
};
|
|
5187
5011
|
componentDidUpdate(previous) {
|
|
5188
5012
|
if (previous.styles !== this.props.styles) {
|
|
5189
5013
|
previous.styles.deleteDynamicRule(this.id);
|
|
@@ -5216,6 +5040,19 @@ class DrawerShell extends C {
|
|
|
5216
5040
|
this.props.styles.deleteDynamicRule(this.id);
|
|
5217
5041
|
this.dialog.current?.close();
|
|
5218
5042
|
}
|
|
5043
|
+
scheduleMeasure = () => {
|
|
5044
|
+
if (this.lifetime === "disposed" || this.frame !== null)
|
|
5045
|
+
return;
|
|
5046
|
+
this.frame = this.sheet.current.ownerDocument.defaultView.requestAnimationFrame(this.measureFrame);
|
|
5047
|
+
};
|
|
5048
|
+
measureFrame = () => {
|
|
5049
|
+
this.frame = null;
|
|
5050
|
+
this.measure();
|
|
5051
|
+
};
|
|
5052
|
+
measureContent = () => {
|
|
5053
|
+
if (this.lifetime === "active")
|
|
5054
|
+
this.measure();
|
|
5055
|
+
};
|
|
5219
5056
|
measure() {
|
|
5220
5057
|
if (this.gesture.kind !== "idle")
|
|
5221
5058
|
return;
|
|
@@ -5240,9 +5077,127 @@ class DrawerShell extends C {
|
|
|
5240
5077
|
this.closeTimer = null;
|
|
5241
5078
|
}
|
|
5242
5079
|
}
|
|
5080
|
+
reportClosed = () => {
|
|
5081
|
+
this.clearCloseTimer();
|
|
5082
|
+
if (this.lifetime === "disposed" || this.closeReported || this.props.state.kind !== "closing")
|
|
5083
|
+
return;
|
|
5084
|
+
this.closeReported = true;
|
|
5085
|
+
this.props.state.onClosed();
|
|
5086
|
+
};
|
|
5087
|
+
transitionEnd = (event) => {
|
|
5088
|
+
if (event.target === this.sheet.current && event.propertyName === "transform")
|
|
5089
|
+
this.reportClosed();
|
|
5090
|
+
};
|
|
5091
|
+
cancel = (event) => {
|
|
5092
|
+
event.preventDefault();
|
|
5093
|
+
event.stopPropagation();
|
|
5094
|
+
if (this.props.state.kind === "open")
|
|
5095
|
+
this.props.onCancel();
|
|
5096
|
+
};
|
|
5097
|
+
backdropClick = (event) => {
|
|
5098
|
+
if (this.props.dismissOnBackdrop !== false && event.target === this.dialog.current && this.canDrag())
|
|
5099
|
+
this.cancel(event);
|
|
5100
|
+
};
|
|
5101
|
+
keyDown = (event) => {
|
|
5102
|
+
if (!event.defaultPrevented && event.key === "Escape")
|
|
5103
|
+
this.cancel(event);
|
|
5104
|
+
};
|
|
5243
5105
|
canDrag() {
|
|
5244
5106
|
return this.props.state.kind === "open" && this.props.state.interaction === "ready";
|
|
5245
5107
|
}
|
|
5108
|
+
pointerDown = (event) => {
|
|
5109
|
+
this.clearClickSuppression();
|
|
5110
|
+
if (!this.canDrag() || this.gesture.kind !== "idle" || !event.isPrimary || event.button !== 0)
|
|
5111
|
+
return;
|
|
5112
|
+
const target = event.target;
|
|
5113
|
+
if (target instanceof Element && target.closest("a, input, textarea, select, summary, button:not(.seams-drawer-handle), [data-seams-drawer-no-drag]"))
|
|
5114
|
+
return;
|
|
5115
|
+
this.gesture = { kind: "pending", pointerId: event.pointerId, startY: event.clientY };
|
|
5116
|
+
const doc = this.sheet.current.ownerDocument;
|
|
5117
|
+
doc.addEventListener("pointermove", this.pointerMove, { passive: false });
|
|
5118
|
+
doc.addEventListener("pointerup", this.pointerUp);
|
|
5119
|
+
doc.addEventListener("pointercancel", this.pointerCancel);
|
|
5120
|
+
};
|
|
5121
|
+
pointerMove = (event) => {
|
|
5122
|
+
let gesture = this.gesture;
|
|
5123
|
+
if (gesture.kind === "idle" || gesture.pointerId !== event.pointerId)
|
|
5124
|
+
return;
|
|
5125
|
+
const sheet = this.sheet.current;
|
|
5126
|
+
if (gesture.kind === "pending") {
|
|
5127
|
+
if (Math.abs(event.clientY - gesture.startY) < 8 || this.body.current.scrollTop > 0)
|
|
5128
|
+
return;
|
|
5129
|
+
const win = sheet.ownerDocument.defaultView;
|
|
5130
|
+
const rest = new DOMMatrixReadOnly(win.getComputedStyle(sheet).transform).m42;
|
|
5131
|
+
gesture = {
|
|
5132
|
+
kind: "dragging",
|
|
5133
|
+
pointerId: gesture.pointerId,
|
|
5134
|
+
startY: gesture.startY,
|
|
5135
|
+
lastY: gesture.startY,
|
|
5136
|
+
startedAt: event.timeStamp,
|
|
5137
|
+
lastTime: event.timeStamp,
|
|
5138
|
+
velocity: 0,
|
|
5139
|
+
rest,
|
|
5140
|
+
translate: rest,
|
|
5141
|
+
height: sheet.offsetHeight
|
|
5142
|
+
};
|
|
5143
|
+
this.gesture = gesture;
|
|
5144
|
+
sheet.setPointerCapture(event.pointerId);
|
|
5145
|
+
sheet.classList.add("is-dragging");
|
|
5146
|
+
}
|
|
5147
|
+
const elapsed = event.timeStamp - gesture.lastTime;
|
|
5148
|
+
if (elapsed > 0)
|
|
5149
|
+
gesture.velocity = (event.clientY - gesture.lastY) / elapsed;
|
|
5150
|
+
gesture.lastY = event.clientY;
|
|
5151
|
+
gesture.lastTime = event.timeStamp;
|
|
5152
|
+
gesture.translate = drawerDragTranslate({
|
|
5153
|
+
startTranslatePx: gesture.rest,
|
|
5154
|
+
deltaPx: event.clientY - gesture.startY,
|
|
5155
|
+
restTranslatePx: gesture.rest,
|
|
5156
|
+
sheetHeightPx: gesture.height,
|
|
5157
|
+
viewportHeightPx: sheet.ownerDocument.defaultView.innerHeight,
|
|
5158
|
+
minimumOverpullPx: 160
|
|
5159
|
+
});
|
|
5160
|
+
this.props.styles.setDynamicDeclarations(`${this.id}-drag`, `#${this.id}`, {
|
|
5161
|
+
"--seams-drawer-drag": `${gesture.translate}px`
|
|
5162
|
+
});
|
|
5163
|
+
event.preventDefault();
|
|
5164
|
+
};
|
|
5165
|
+
pointerUp = (event) => {
|
|
5166
|
+
const gesture = this.gesture;
|
|
5167
|
+
if (gesture.kind === "idle" || gesture.pointerId !== event.pointerId)
|
|
5168
|
+
return;
|
|
5169
|
+
const dismiss = gesture.kind === "dragging" && shouldDismissDrawerDrag({
|
|
5170
|
+
velocityPxPerMs: gesture.velocity,
|
|
5171
|
+
totalDeltaPx: gesture.lastY - gesture.startY,
|
|
5172
|
+
durationMs: event.timeStamp - gesture.startedAt,
|
|
5173
|
+
translatePx: gesture.translate,
|
|
5174
|
+
sheetHeightPx: gesture.height
|
|
5175
|
+
});
|
|
5176
|
+
if (gesture.kind === "dragging") {
|
|
5177
|
+
this.suppressPointerClick = true;
|
|
5178
|
+
event.preventDefault();
|
|
5179
|
+
}
|
|
5180
|
+
this.resetGesture();
|
|
5181
|
+
if (dismiss && this.props.state.kind === "open")
|
|
5182
|
+
this.props.onCancel();
|
|
5183
|
+
};
|
|
5184
|
+
pointerCancel = (event) => {
|
|
5185
|
+
if (this.gesture.kind !== "idle" && this.gesture.pointerId === event.pointerId) {
|
|
5186
|
+
if (this.gesture.kind === "dragging")
|
|
5187
|
+
this.suppressPointerClick = true;
|
|
5188
|
+
this.resetGesture();
|
|
5189
|
+
}
|
|
5190
|
+
};
|
|
5191
|
+
clearClickSuppression = () => {
|
|
5192
|
+
this.suppressPointerClick = false;
|
|
5193
|
+
};
|
|
5194
|
+
suppressDragClick = (event) => {
|
|
5195
|
+
if (!this.suppressPointerClick || event.detail === 0)
|
|
5196
|
+
return;
|
|
5197
|
+
this.suppressPointerClick = false;
|
|
5198
|
+
event.preventDefault();
|
|
5199
|
+
event.stopPropagation();
|
|
5200
|
+
};
|
|
5246
5201
|
resetGesture() {
|
|
5247
5202
|
const sheet = this.sheet.current;
|
|
5248
5203
|
const previous = this.gesture;
|
|
@@ -5409,36 +5364,20 @@ var EXPLORER_REVEAL_EASING = "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
|
5409
5364
|
var nextExplorerRowId = 0;
|
|
5410
5365
|
|
|
5411
5366
|
class TransactionReceipt extends C {
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
this.
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
this.props.receipt.onDismiss();
|
|
5427
|
-
};
|
|
5428
|
-
this.setExplorerRowHeight = (height) => {
|
|
5429
|
-
const row = this.explorerRow.current;
|
|
5430
|
-
if (!row)
|
|
5431
|
-
return;
|
|
5432
|
-
confirmationDocumentStyles(row.ownerDocument).setDynamicDeclarations(this.explorerRowId, `#${this.explorerRowId}`, { "--seams-receipt-explorer-height": `${height}px` });
|
|
5433
|
-
};
|
|
5434
|
-
this.releaseExplorerRow = () => {
|
|
5435
|
-
const row = this.explorerRow.current;
|
|
5436
|
-
if (!row)
|
|
5437
|
-
return;
|
|
5438
|
-
delete row.dataset.opening;
|
|
5439
|
-
confirmationDocumentStyles(row.ownerDocument).deleteDynamicRule(this.explorerRowId);
|
|
5440
|
-
};
|
|
5441
|
-
}
|
|
5367
|
+
explorerRow = M();
|
|
5368
|
+
explorerRowId = `seams-receipt-explorer-row-${++nextExplorerRowId}`;
|
|
5369
|
+
minimize = () => {
|
|
5370
|
+
this.props.receipt.onView("toast");
|
|
5371
|
+
};
|
|
5372
|
+
expand = () => {
|
|
5373
|
+
this.props.receipt.onView("expanded");
|
|
5374
|
+
};
|
|
5375
|
+
close = () => {
|
|
5376
|
+
if (receiptIsPending(this.props.receipt.state))
|
|
5377
|
+
this.minimize();
|
|
5378
|
+
else
|
|
5379
|
+
this.props.receipt.onDismiss();
|
|
5380
|
+
};
|
|
5442
5381
|
componentDidUpdate(previous) {
|
|
5443
5382
|
const { receipt } = this.props;
|
|
5444
5383
|
if (receipt.view === "expanded" && previous.receipt.view === "expanded" && receipt.state.kind === "confirmed" && previous.receipt.state.kind !== "confirmed") {
|
|
@@ -5448,6 +5387,19 @@ class TransactionReceipt extends C {
|
|
|
5448
5387
|
componentWillUnmount() {
|
|
5449
5388
|
this.releaseExplorerRow();
|
|
5450
5389
|
}
|
|
5390
|
+
setExplorerRowHeight = (height) => {
|
|
5391
|
+
const row = this.explorerRow.current;
|
|
5392
|
+
if (!row)
|
|
5393
|
+
return;
|
|
5394
|
+
confirmationDocumentStyles(row.ownerDocument).setDynamicDeclarations(this.explorerRowId, `#${this.explorerRowId}`, { "--seams-receipt-explorer-height": `${height}px` });
|
|
5395
|
+
};
|
|
5396
|
+
releaseExplorerRow = () => {
|
|
5397
|
+
const row = this.explorerRow.current;
|
|
5398
|
+
if (!row)
|
|
5399
|
+
return;
|
|
5400
|
+
delete row.dataset.opening;
|
|
5401
|
+
confirmationDocumentStyles(row.ownerDocument).deleteDynamicRule(this.explorerRowId);
|
|
5402
|
+
};
|
|
5451
5403
|
revealExplorerLink() {
|
|
5452
5404
|
const row = this.explorerRow.current;
|
|
5453
5405
|
const link = row?.firstElementChild;
|
|
@@ -5816,57 +5768,22 @@ function captureReceiptAnchors(surface) {
|
|
|
5816
5768
|
var nextSurfaceId = 0;
|
|
5817
5769
|
|
|
5818
5770
|
class MountedConfirmationSurface {
|
|
5819
|
-
|
|
5820
|
-
|
|
5771
|
+
element;
|
|
5772
|
+
styles;
|
|
5773
|
+
presentation;
|
|
5774
|
+
state;
|
|
5775
|
+
receipt = null;
|
|
5776
|
+
receiptMotion = [];
|
|
5777
|
+
receiptShell = null;
|
|
5778
|
+
clearReceiptMotion = () => {
|
|
5779
|
+
for (const animation of this.receiptMotion)
|
|
5780
|
+
animation.cancel();
|
|
5821
5781
|
this.receiptMotion = [];
|
|
5782
|
+
this.receiptShell?.remove();
|
|
5822
5783
|
this.receiptShell = null;
|
|
5823
|
-
this.
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
this.receiptMotion = [];
|
|
5827
|
-
this.receiptShell?.remove();
|
|
5828
|
-
this.receiptShell = null;
|
|
5829
|
-
this.element.removeAttribute("data-receipt-morphing");
|
|
5830
|
-
};
|
|
5831
|
-
this.dispose = () => {
|
|
5832
|
-
if (this.state.kind === "disposed")
|
|
5833
|
-
return;
|
|
5834
|
-
const onClosed = this.state.onClosed;
|
|
5835
|
-
this.remove();
|
|
5836
|
-
onClosed();
|
|
5837
|
-
};
|
|
5838
|
-
this.cancel = () => {
|
|
5839
|
-
if (this.state.kind !== "mounted")
|
|
5840
|
-
return;
|
|
5841
|
-
if (this.receipt) {
|
|
5842
|
-
if (receiptIsPending(this.receipt.state))
|
|
5843
|
-
this.receipt.onView("toast");
|
|
5844
|
-
else
|
|
5845
|
-
this.receipt.onDismiss();
|
|
5846
|
-
return;
|
|
5847
|
-
}
|
|
5848
|
-
const content = this.state.model.content;
|
|
5849
|
-
if (content.kind === "registration")
|
|
5850
|
-
content.registration.onCancel();
|
|
5851
|
-
else
|
|
5852
|
-
content.transaction.onCancel();
|
|
5853
|
-
};
|
|
5854
|
-
this.confirm = () => {
|
|
5855
|
-
if (this.state.kind !== "mounted")
|
|
5856
|
-
return;
|
|
5857
|
-
const content = this.state.model.content;
|
|
5858
|
-
const decision = content.kind === "registration" ? content.registration.decision : content.transaction.decision;
|
|
5859
|
-
if (decision.kind === "ready")
|
|
5860
|
-
decision.onConfirm();
|
|
5861
|
-
};
|
|
5862
|
-
this.submitOtp = (code, challengeId) => {
|
|
5863
|
-
if (this.state.kind !== "mounted")
|
|
5864
|
-
return;
|
|
5865
|
-
const content = this.state.model.content;
|
|
5866
|
-
if (content.kind === "transaction" && content.prompt.kind === "email") {
|
|
5867
|
-
content.prompt.email.onSubmit(code, challengeId);
|
|
5868
|
-
}
|
|
5869
|
-
};
|
|
5784
|
+
this.element.removeAttribute("data-receipt-morphing");
|
|
5785
|
+
};
|
|
5786
|
+
constructor(input) {
|
|
5870
5787
|
const document2 = input.parent.ownerDocument;
|
|
5871
5788
|
this.styles = confirmationDocumentStyles(document2);
|
|
5872
5789
|
this.presentation = {
|
|
@@ -5974,6 +5891,13 @@ class MountedConfirmationSurface {
|
|
|
5974
5891
|
morph.onfinish = this.clearReceiptMotion;
|
|
5975
5892
|
}
|
|
5976
5893
|
}
|
|
5894
|
+
dispose = () => {
|
|
5895
|
+
if (this.state.kind === "disposed")
|
|
5896
|
+
return;
|
|
5897
|
+
const onClosed = this.state.onClosed;
|
|
5898
|
+
this.remove();
|
|
5899
|
+
onClosed();
|
|
5900
|
+
};
|
|
5977
5901
|
remove() {
|
|
5978
5902
|
this.clearReceiptMotion();
|
|
5979
5903
|
this.state = { kind: "disposed" };
|
|
@@ -5982,6 +5906,38 @@ class MountedConfirmationSurface {
|
|
|
5982
5906
|
this.styles.deleteDynamicRule(this.element.id);
|
|
5983
5907
|
this.element.remove();
|
|
5984
5908
|
}
|
|
5909
|
+
cancel = () => {
|
|
5910
|
+
if (this.state.kind !== "mounted")
|
|
5911
|
+
return;
|
|
5912
|
+
if (this.receipt) {
|
|
5913
|
+
if (receiptIsPending(this.receipt.state))
|
|
5914
|
+
this.receipt.onView("toast");
|
|
5915
|
+
else
|
|
5916
|
+
this.receipt.onDismiss();
|
|
5917
|
+
return;
|
|
5918
|
+
}
|
|
5919
|
+
const content = this.state.model.content;
|
|
5920
|
+
if (content.kind === "registration")
|
|
5921
|
+
content.registration.onCancel();
|
|
5922
|
+
else
|
|
5923
|
+
content.transaction.onCancel();
|
|
5924
|
+
};
|
|
5925
|
+
confirm = () => {
|
|
5926
|
+
if (this.state.kind !== "mounted")
|
|
5927
|
+
return;
|
|
5928
|
+
const content = this.state.model.content;
|
|
5929
|
+
const decision = content.kind === "registration" ? content.registration.decision : content.transaction.decision;
|
|
5930
|
+
if (decision.kind === "ready")
|
|
5931
|
+
decision.onConfirm();
|
|
5932
|
+
};
|
|
5933
|
+
submitOtp = (code, challengeId) => {
|
|
5934
|
+
if (this.state.kind !== "mounted")
|
|
5935
|
+
return;
|
|
5936
|
+
const content = this.state.model.content;
|
|
5937
|
+
if (content.kind === "transaction" && content.prompt.kind === "email") {
|
|
5938
|
+
content.prompt.email.onSubmit(code, challengeId);
|
|
5939
|
+
}
|
|
5940
|
+
};
|
|
5985
5941
|
renderSurface() {
|
|
5986
5942
|
const state = this.state;
|
|
5987
5943
|
if (state.kind === "disposed")
|
|
@@ -6069,6 +6025,13 @@ function mountConfirmationSurface(input) {
|
|
|
6069
6025
|
|
|
6070
6026
|
// src/core/signingEngine/uiConfirm/ui/preact/confirmation-controller.ts
|
|
6071
6027
|
class MountedConfirmationController {
|
|
6028
|
+
element;
|
|
6029
|
+
surface;
|
|
6030
|
+
callbacks;
|
|
6031
|
+
appearance;
|
|
6032
|
+
presentation;
|
|
6033
|
+
tree;
|
|
6034
|
+
currentModel;
|
|
6072
6035
|
constructor(input) {
|
|
6073
6036
|
this.callbacks = input.callbacks;
|
|
6074
6037
|
this.appearance = input.appearance;
|
|
@@ -6205,21 +6168,17 @@ function allocateSurfaceMeasurementSequence() {
|
|
|
6205
6168
|
}
|
|
6206
6169
|
|
|
6207
6170
|
class SurfaceMeasurementReporter {
|
|
6171
|
+
options;
|
|
6172
|
+
observer;
|
|
6173
|
+
latestEntry = null;
|
|
6174
|
+
recentPostTimes = [];
|
|
6175
|
+
warnedAboutStreaming = false;
|
|
6176
|
+
surfaceHasSettled = false;
|
|
6177
|
+
animationFrame = null;
|
|
6178
|
+
lastSize = null;
|
|
6179
|
+
disconnected = false;
|
|
6208
6180
|
constructor(options) {
|
|
6209
6181
|
this.options = options;
|
|
6210
|
-
this.latestEntry = null;
|
|
6211
|
-
this.recentPostTimes = [];
|
|
6212
|
-
this.warnedAboutStreaming = false;
|
|
6213
|
-
this.surfaceHasSettled = false;
|
|
6214
|
-
this.animationFrame = null;
|
|
6215
|
-
this.lastSize = null;
|
|
6216
|
-
this.disconnected = false;
|
|
6217
|
-
this.onResize = (entries) => {
|
|
6218
|
-
if (this.disconnected)
|
|
6219
|
-
return;
|
|
6220
|
-
this.latestEntry = entries.at(-1) ?? null;
|
|
6221
|
-
this.scheduleReport();
|
|
6222
|
-
};
|
|
6223
6182
|
if (typeof ResizeObserver === "function") {
|
|
6224
6183
|
this.observer = new ResizeObserver(this.onResize);
|
|
6225
6184
|
this.observer.observe(options.element);
|
|
@@ -6243,6 +6202,12 @@ class SurfaceMeasurementReporter {
|
|
|
6243
6202
|
this.animationFrame = null;
|
|
6244
6203
|
this.latestEntry = null;
|
|
6245
6204
|
}
|
|
6205
|
+
onResize = (entries) => {
|
|
6206
|
+
if (this.disconnected)
|
|
6207
|
+
return;
|
|
6208
|
+
this.latestEntry = entries.at(-1) ?? null;
|
|
6209
|
+
this.scheduleReport();
|
|
6210
|
+
};
|
|
6246
6211
|
scheduleReport() {
|
|
6247
6212
|
if (this.disconnected)
|
|
6248
6213
|
return;
|
|
@@ -6288,7 +6253,7 @@ class SurfaceMeasurementReporter {
|
|
|
6288
6253
|
if (this.recentPostTimes.length < STREAMING_POSTS_THRESHOLD)
|
|
6289
6254
|
return;
|
|
6290
6255
|
this.warnedAboutStreaming = true;
|
|
6291
|
-
console.warn(`[SEAMS] ${this.options.kind} posted ${this.recentPostTimes.length} surface measurements in ` + `${STREAMING_WINDOW_MS}ms after it had settled. Content inside a measured surface must ` + "announce a height change once (announceSurfaceResize) instead of animating its own " + "height; the host box cannot follow a moving target.
|
|
6256
|
+
console.warn(`[SEAMS] ${this.options.kind} posted ${this.recentPostTimes.length} surface measurements in ` + `${STREAMING_WINDOW_MS}ms after it had settled. Content inside a measured surface must ` + "announce a height change once (announceSurfaceResize) instead of animating its own " + "height; the host box cannot follow a moving target.");
|
|
6292
6257
|
}
|
|
6293
6258
|
sameSize(size) {
|
|
6294
6259
|
return this.lastSize?.widthCssPx === size.widthCssPx && this.lastSize?.heightCssPx === size.heightCssPx;
|