@seams/wallet 0.17.0 → 0.18.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 +4 -5
- package/dist/.build-inputs.sha256 +1 -1
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuFooter.js +5 -4
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.js +89 -241
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.js +4 -2
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/presentation.js +116 -0
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/recovery-code-input.js +60 -0
- package/dist/esm/SeamsWeb/walletIframe/shared/facadeBoundary.js +2 -0
- package/dist/esm/core/config/configBuilder.js +2 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmContent.js +7 -4
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmHeader.js +10 -6
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationBody.js +9 -6
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationContent.js +9 -6
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationDrawer.js +7 -4
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationModal.js +4 -1
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/EmailOtpContent.js +4 -1
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/EmailOtpInput.js +5 -4
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationContent.js +10 -7
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationDetails.js +9 -5
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/RecoveryCodeBackupSurface.js +28 -22
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ReviewDisclosure.js +2 -1
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionLabel.js +51 -26
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.js +42 -27
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionReview.js +25 -18
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionTree.js +8 -5
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/WalletLocale.js +24 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountConfirmationSurface.js +6 -4
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountRecoveryCodeBackupSurface.js +4 -2
- package/dist/esm/core/ui/locale.js +10 -0
- package/dist/esm/core/ui/messages.js +694 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonMock.js +7 -3
- package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonView.js +6 -3
- package/dist/esm/react/components/AccountMenuButton/AccountMenuDeviceDetails.js +4 -3
- package/dist/esm/react/components/AccountMenuButton/AccountMenuDialog.js +5 -2
- package/dist/esm/react/components/AccountMenuButton/AccountMenuMockScreens.js +31 -27
- package/dist/esm/react/components/AccountMenuButton/AccountMenuScreen.js +6 -3
- package/dist/esm/react/components/AccountMenuButton/AccountsSection.js +6 -3
- package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodRow.js +5 -4
- package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodsModal.js +33 -27
- package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodsView.js +5 -2
- package/dist/esm/react/components/AccountMenuButton/ExportKeysScreen.js +5 -3
- package/dist/esm/react/components/AccountMenuButton/ExportKeysSection.js +4 -3
- package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.js +50 -41
- package/dist/esm/react/components/AccountMenuButton/LockMenuItem.js +2 -1
- package/dist/esm/react/components/AccountMenuButton/MenuItem.js +3 -2
- package/dist/esm/react/components/AccountMenuButton/ProfileDropdown.js +8 -4
- package/dist/esm/react/components/AccountMenuButton/RecoveryCodeAcknowledgement.js +3 -2
- package/dist/esm/react/components/AccountMenuButton/RecoveryCodeActions.js +4 -3
- package/dist/esm/react/components/AccountMenuButton/SegmentedControl.js +2 -1
- package/dist/esm/react/components/AccountMenuButton/TransactionSettingsSection.js +11 -10
- package/dist/esm/react/components/AccountMenuButton/UserAccountButton.js +8 -4
- package/dist/esm/react/components/AccountMenuButton/WalletRegionSection.js +22 -15
- package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.js +20 -16
- package/dist/esm/react/components/AccountMenuButton/index.js +18 -15
- package/dist/esm/react/components/HostedSeamsAuthMenu/SeamsAuthMenuMock.js +30 -26
- package/dist/esm/react/components/QRCodeScanner.js +28 -23
- package/dist/esm/react/components/ShowQRCode.js +39 -31
- package/dist/esm/react/components/theme/ThemeProvider.js +3 -0
- package/dist/esm/react/context/WalletLocale.js +15 -0
- package/dist/esm/react/context/index.js +8 -3
- package/dist/esm/sdk/ConfirmationDrawer-mu3iThxX.js +1 -0
- package/dist/{public/sdk/NonceCoordinator-DuDKN-B8.js → esm/sdk/NonceCoordinator-Dq-FZpBz.js} +1 -1
- package/dist/{public/sdk/accountLifecycle-D61FIpFS.js → esm/sdk/accountLifecycle-fLNUdjct.js} +1 -1
- package/dist/{public/sdk/activeWalletSession-Ba6X4CUN.js → esm/sdk/activeWalletSession-BpbnpU9s.js} +1 -1
- package/dist/esm/sdk/adapters-u7LVXthY.js +2 -0
- package/dist/esm/sdk/appearance-token-vars-CzBVbO39.js +2 -0
- package/dist/esm/sdk/{canonicalPrimitives-BOzRXzfv.js → canonicalPrimitives-BMP5yILS.js} +1 -1
- package/dist/esm/sdk/{challengeDelivery-FD9GHK1T.js → challengeDelivery-CG2J5Qxs.js} +1 -1
- package/dist/{public/sdk/clientSessionPersistenceState-BHRUSWMt.js → esm/sdk/clientSessionPersistenceState-BgO4P6CZ.js} +1 -1
- package/dist/esm/sdk/{commitQueue-DOIaR0Hr.js → commitQueue-BW7BpYyA.js} +1 -1
- package/dist/esm/sdk/configBuilder-BMNShuOu.js +1 -0
- package/dist/esm/sdk/{configHelpers-BXdl5Mxs.js → configHelpers-D50F_Txb.js} +1 -1
- package/dist/esm/sdk/{digestEncoding-CbEFYvlJ.js → digestEncoding-aC4dSf_x.js} +1 -1
- package/dist/esm/sdk/{display-CY_aJEn6.js → display-WtILOPQR.js} +1 -1
- package/dist/{public/sdk/ecdsaCapabilityManifest-DzA996y9.js → esm/sdk/ecdsaCapabilityManifest-DRc423SV.js} +1 -1
- package/dist/{public/sdk/ecdsaDerivationClientWasm-DQlajPpE.js → esm/sdk/ecdsaDerivationClientWasm-DmwKWUEb.js} +1 -1
- package/dist/{public/sdk/ecdsaDerivationExport-DyugdheE.js → esm/sdk/ecdsaDerivationExport-DX89rq_u.js} +1 -1
- package/dist/esm/sdk/{ecdsaWalletRecords-C_v74n5X.js → ecdsaWalletRecords-CxxUt3fS.js} +1 -1
- package/dist/{public/sdk/emailOtpEcdsaDerivationIdentity-BDVjvnmO.js → esm/sdk/emailOtpEcdsaDerivationIdentity-CupWCKNg.js} +1 -1
- package/dist/esm/sdk/{export-viewer-host-DsRaS0UH.js → export-viewer-host-ivf9LlBo.js} +1 -1
- package/dist/{public/sdk/exportKeypairOperation-SJPysnE1.js → esm/sdk/exportKeypairOperation-Gw7L5Htj.js} +1 -1
- package/dist/esm/sdk/{helpers-D3CUEdHI.js → helpers-DS0bksx9.js} +1 -1
- package/dist/esm/sdk/{host-GPb_mSAQ.js → host-B-2QXolt.js} +1 -1
- package/dist/esm/sdk/{intentDigest-CGLrsMgj.js → intentDigest-Rh5Mg8X7.js} +1 -1
- package/dist/esm/sdk/{lanes-DJKIHJBm.js → lanes-BzU7cv2T.js} +1 -1
- package/dist/esm/sdk/localOnly-BKpUHtHa.js +1 -0
- package/dist/esm/sdk/mountExportPrivateKeySurface-C8pUK6PQ.js +1 -0
- package/dist/esm/sdk/mountRecoveryCodeBackupSurface-DUudF89t.js +2 -0
- package/dist/{public/sdk/nearEd25519YaoMaterialActivation-J6EHFScV.js → esm/sdk/nearEd25519YaoMaterialActivation-DgWDGRI_.js} +1 -1
- package/dist/{public/sdk/nearEd25519YaoSigningPreparation-CqBNMG87.js → esm/sdk/nearEd25519YaoSigningPreparation-yKDLQXBS.js} +1 -1
- package/dist/esm/sdk/{nonceLaneKeys-D18nlLjh.js → nonceLaneKeys-BzMBVxMU.js} +1 -1
- package/dist/esm/sdk/{operationFingerprint-Boa9DQ51.js → operationFingerprint-C4VX-0NI.js} +1 -1
- package/dist/{public/sdk/passkey-custody-CBSal3E9.js → esm/sdk/passkey-custody-Ba-NQ_4C.js} +1 -1
- package/dist/esm/sdk/{pendingWalletRecoveryCodeBackup-CvsrXbzn.js → pendingWalletRecoveryCodeBackup-7tBjuSe7.js} +1 -1
- package/dist/{public/sdk/presignaturePool-CQNt13kE.js → esm/sdk/presignaturePool-BHoxnbOA.js} +1 -1
- package/dist/esm/sdk/{prfCache-DJ93rtDv.js → prfCache-BAFh1skJ.js} +1 -1
- package/dist/esm/sdk/{primitives-cC0a9GRC.js → primitives-CTmDwMNc.js} +1 -1
- package/dist/esm/sdk/{recovery-entrypoint-nj7Zo3CR.js → recovery-entrypoint-DWghFZrZ.js} +1 -1
- package/dist/esm/sdk/{registration-49OGU_GZ.js → registration-CWpOVwhj.js} +1 -1
- package/dist/esm/sdk/{registration-C7tywPXF.js → registration-D2OEgY7O.js} +1 -1
- package/dist/esm/sdk/{registrationAccounts-9GFI0Ger.js → registrationAccounts-CD1u1ZqZ.js} +1 -1
- package/dist/esm/sdk/{registrationIds-Br-zI4_5.js → registrationIds-B1OpqRAt.js} +1 -1
- package/dist/{public/sdk/registrationIntent-PqmcTEE3.js → esm/sdk/registrationIntent-D4YDjf2U.js} +1 -1
- package/dist/esm/sdk/{requireStepUpAuth-C4PGTly-.js → requireStepUpAuth-CnSCFSOZ.js} +1 -1
- package/dist/{public/sdk/routerAbNormalSigning-xxATTIh5.js → esm/sdk/routerAbNormalSigning-BV1t27aB.js} +1 -1
- package/dist/esm/sdk/runtime-auth-jtyQAuxZ.js +1 -0
- package/dist/esm/sdk/runtime-device-link-vhRhB-wS.js +1 -0
- package/dist/esm/sdk/runtime-ecdsa-tempo-BXWgFVBa.js +1 -0
- package/dist/esm/sdk/runtime-email-otp-BlAaSKtk.js +1 -0
- package/dist/esm/sdk/runtime-export-B4FuHhcH.js +1 -0
- package/dist/esm/sdk/runtime-near-BnWOpEpA.js +1 -0
- package/dist/esm/sdk/runtime-preferences-COm-LTiu.js +1 -0
- package/dist/esm/sdk/runtime-recovery-BJTo5Idi.js +1 -0
- package/dist/esm/sdk/{runtime-recovery-codes-LR4mg7-k.js → runtime-recovery-codes-CEOjdUHV.js} +1 -1
- package/dist/esm/sdk/{secp256k1-BldUPNQI.js → secp256k1-wOOHtPcK.js} +1 -1
- package/dist/esm/sdk/{secureRandomId-LwBFx84B.js → secureRandomId-8LSc91aN.js} +1 -1
- package/dist/esm/sdk/sessionObservationRevision-C7v-wN8_.js +1 -0
- package/dist/esm/sdk/shared-BKPGtAps.js +6 -0
- package/dist/esm/sdk/{signEvmFamily-C_RvEnDB.js → signEvmFamily-DT34Vtpa.js} +1 -1
- package/dist/esm/sdk/{signEvmFamilyWithUiConfirmForTempo-CUKdq5dE.js → signEvmFamilyWithUiConfirmForTempo-NYCFU6Li.js} +1 -1
- package/dist/esm/sdk/{signEvmWithUiConfirm-CxXzcvj2.js → signEvmWithUiConfirm-D6nmJr_L.js} +1 -1
- package/dist/{public/sdk/signNear-Dno7NsP_.js → esm/sdk/signNear-B000QxBd.js} +1 -1
- package/dist/{public/sdk/signingFlow-DtugI_2z.js → esm/sdk/signingFlow-gl85GOW4.js} +1 -1
- package/dist/esm/sdk/{signingQueue-C1Pb07gm.js → signingQueue-gW7wmOuL.js} +1 -1
- package/dist/esm/sdk/{singletons-DxIyVhNb.js → singletons-CAsc9LvA.js} +1 -1
- package/dist/{public/sdk/thresholdEcdsa-murTq-xz.js → esm/sdk/thresholdEcdsa-Ci7yz395.js} +1 -1
- package/dist/{public/sdk/transactionState-XbZm9Zon.js → esm/sdk/transactionState-lB2qpkOm.js} +1 -1
- package/dist/esm/sdk/tx-confirm-ui.js +1795 -432
- 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/esm/sdk/{wallet-recovery-CVUalZ3p.js → wallet-recovery-DFaS3geI.js} +1 -1
- package/dist/{public/sdk/walletAuthMethodRecord-Bv68Vq-g.js → esm/sdk/walletAuthMethodRecord-CWdqdY_s.js} +1 -1
- package/dist/{public/sdk/walletAuthority-v5wvv3IB.js → esm/sdk/walletAuthority-BY3kyKQ-.js} +1 -1
- package/dist/{public/sdk/walletCustodyEcdsaContinuity-rRHExT_R.js → esm/sdk/walletCustodyEcdsaContinuity-mGh1Ysko.js} +1 -1
- package/dist/esm/sdk/{walletDbName-DRzPv5Ir.js → walletDbName-BxWApBQF.js} +1 -1
- package/dist/{public/sdk/walletOwnershipGeneration-pMmmJ6XA.js → esm/sdk/walletOwnershipGeneration-DSGfjuV2.js} +1 -1
- package/dist/esm/sdk/{walletRecoveryCommit-DvC6WlGz.js → walletRecoveryCommit-DQA_wveK.js} +1 -1
- package/dist/esm/sdk/{walletRecoveryRotate-Dd3prJpr.js → walletRecoveryRotate-zvQThn37.js} +1 -1
- package/dist/esm/sdk/walletRegistrationSetupPrewarm-DdVpKccU.js +1 -0
- package/dist/{public/sdk/walletSessionAuthorizationStatus-DVV3xkAx.js → esm/sdk/walletSessionAuthorizationStatus-ONPRiEbK.js} +1 -1
- package/dist/{public/sdk/walletSessionAuthorizationStore-D-MhJ0PC.js → esm/sdk/walletSessionAuthorizationStore-DnUMtkev.js} +1 -1
- package/dist/esm/sdk/warmSessionHydration-D8Vdro9n.js +1 -0
- package/dist/{public/sdk/webauthnP256-XgYu-Y6E.js → esm/sdk/webauthnP256-_ajaNl90.js} +1 -1
- package/dist/esm/sdk/{webauthnPromptCoordinator-D5sP8Q7e.js → webauthnPromptCoordinator-9bVeHcTZ.js} +1 -1
- package/dist/public/headers.manifest.json +1 -1
- package/dist/public/sdk/ConfirmationDrawer-mu3iThxX.js +1 -0
- package/dist/{esm/sdk/NonceCoordinator-DuDKN-B8.js → public/sdk/NonceCoordinator-Dq-FZpBz.js} +1 -1
- package/dist/{esm/sdk/accountLifecycle-D61FIpFS.js → public/sdk/accountLifecycle-fLNUdjct.js} +1 -1
- package/dist/{esm/sdk/activeWalletSession-Ba6X4CUN.js → public/sdk/activeWalletSession-BpbnpU9s.js} +1 -1
- package/dist/public/sdk/adapters-u7LVXthY.js +2 -0
- package/dist/public/sdk/appearance-token-vars-CzBVbO39.js +2 -0
- package/dist/public/sdk/{canonicalPrimitives-BOzRXzfv.js → canonicalPrimitives-BMP5yILS.js} +1 -1
- package/dist/public/sdk/{challengeDelivery-FD9GHK1T.js → challengeDelivery-CG2J5Qxs.js} +1 -1
- package/dist/{esm/sdk/clientSessionPersistenceState-BHRUSWMt.js → public/sdk/clientSessionPersistenceState-BgO4P6CZ.js} +1 -1
- package/dist/public/sdk/{commitQueue-DOIaR0Hr.js → commitQueue-BW7BpYyA.js} +1 -1
- package/dist/public/sdk/configBuilder-BMNShuOu.js +1 -0
- package/dist/public/sdk/{configHelpers-BXdl5Mxs.js → configHelpers-D50F_Txb.js} +1 -1
- package/dist/public/sdk/{digestEncoding-CbEFYvlJ.js → digestEncoding-aC4dSf_x.js} +1 -1
- package/dist/public/sdk/{display-CY_aJEn6.js → display-WtILOPQR.js} +1 -1
- package/dist/{esm/sdk/ecdsaCapabilityManifest-DzA996y9.js → public/sdk/ecdsaCapabilityManifest-DRc423SV.js} +1 -1
- package/dist/{esm/sdk/ecdsaDerivationClientWasm-DQlajPpE.js → public/sdk/ecdsaDerivationClientWasm-DmwKWUEb.js} +1 -1
- package/dist/{esm/sdk/ecdsaDerivationExport-DyugdheE.js → public/sdk/ecdsaDerivationExport-DX89rq_u.js} +1 -1
- package/dist/public/sdk/{ecdsaWalletRecords-C_v74n5X.js → ecdsaWalletRecords-CxxUt3fS.js} +1 -1
- package/dist/{esm/sdk/emailOtpEcdsaDerivationIdentity-BDVjvnmO.js → public/sdk/emailOtpEcdsaDerivationIdentity-CupWCKNg.js} +1 -1
- package/dist/public/sdk/{export-viewer-host-DsRaS0UH.js → export-viewer-host-ivf9LlBo.js} +1 -1
- package/dist/{esm/sdk/exportKeypairOperation-SJPysnE1.js → public/sdk/exportKeypairOperation-Gw7L5Htj.js} +1 -1
- package/dist/public/sdk/{helpers-D3CUEdHI.js → helpers-DS0bksx9.js} +1 -1
- package/dist/public/sdk/{host-GPb_mSAQ.js → host-B-2QXolt.js} +1 -1
- package/dist/public/sdk/{intentDigest-CGLrsMgj.js → intentDigest-Rh5Mg8X7.js} +1 -1
- package/dist/public/sdk/{lanes-DJKIHJBm.js → lanes-BzU7cv2T.js} +1 -1
- package/dist/public/sdk/localOnly-BKpUHtHa.js +1 -0
- package/dist/public/sdk/mountExportPrivateKeySurface-C8pUK6PQ.js +1 -0
- package/dist/public/sdk/mountRecoveryCodeBackupSurface-DUudF89t.js +2 -0
- package/dist/{esm/sdk/nearEd25519YaoMaterialActivation-J6EHFScV.js → public/sdk/nearEd25519YaoMaterialActivation-DgWDGRI_.js} +1 -1
- package/dist/{esm/sdk/nearEd25519YaoSigningPreparation-CqBNMG87.js → public/sdk/nearEd25519YaoSigningPreparation-yKDLQXBS.js} +1 -1
- package/dist/public/sdk/{nonceLaneKeys-D18nlLjh.js → nonceLaneKeys-BzMBVxMU.js} +1 -1
- package/dist/public/sdk/{operationFingerprint-Boa9DQ51.js → operationFingerprint-C4VX-0NI.js} +1 -1
- package/dist/{esm/sdk/passkey-custody-CBSal3E9.js → public/sdk/passkey-custody-Ba-NQ_4C.js} +1 -1
- package/dist/public/sdk/{pendingWalletRecoveryCodeBackup-CvsrXbzn.js → pendingWalletRecoveryCodeBackup-7tBjuSe7.js} +1 -1
- package/dist/{esm/sdk/presignaturePool-CQNt13kE.js → public/sdk/presignaturePool-BHoxnbOA.js} +1 -1
- package/dist/public/sdk/{prfCache-DJ93rtDv.js → prfCache-BAFh1skJ.js} +1 -1
- package/dist/public/sdk/{primitives-cC0a9GRC.js → primitives-CTmDwMNc.js} +1 -1
- package/dist/public/sdk/{recovery-entrypoint-nj7Zo3CR.js → recovery-entrypoint-DWghFZrZ.js} +1 -1
- package/dist/public/sdk/{registration-49OGU_GZ.js → registration-CWpOVwhj.js} +1 -1
- package/dist/public/sdk/{registration-C7tywPXF.js → registration-D2OEgY7O.js} +1 -1
- package/dist/public/sdk/{registrationAccounts-9GFI0Ger.js → registrationAccounts-CD1u1ZqZ.js} +1 -1
- package/dist/public/sdk/{registrationIds-Br-zI4_5.js → registrationIds-B1OpqRAt.js} +1 -1
- package/dist/{esm/sdk/registrationIntent-PqmcTEE3.js → public/sdk/registrationIntent-D4YDjf2U.js} +1 -1
- package/dist/public/sdk/{requireStepUpAuth-C4PGTly-.js → requireStepUpAuth-CnSCFSOZ.js} +1 -1
- package/dist/{esm/sdk/routerAbNormalSigning-xxATTIh5.js → public/sdk/routerAbNormalSigning-BV1t27aB.js} +1 -1
- package/dist/public/sdk/runtime-auth-jtyQAuxZ.js +1 -0
- package/dist/public/sdk/runtime-device-link-vhRhB-wS.js +1 -0
- package/dist/public/sdk/runtime-ecdsa-tempo-BXWgFVBa.js +1 -0
- package/dist/public/sdk/runtime-email-otp-BlAaSKtk.js +1 -0
- package/dist/public/sdk/runtime-export-B4FuHhcH.js +1 -0
- package/dist/public/sdk/runtime-near-BnWOpEpA.js +1 -0
- package/dist/public/sdk/runtime-preferences-COm-LTiu.js +1 -0
- package/dist/public/sdk/runtime-recovery-BJTo5Idi.js +1 -0
- package/dist/public/sdk/{runtime-recovery-codes-LR4mg7-k.js → runtime-recovery-codes-CEOjdUHV.js} +1 -1
- package/dist/public/sdk/{secp256k1-BldUPNQI.js → secp256k1-wOOHtPcK.js} +1 -1
- package/dist/public/sdk/{secureRandomId-LwBFx84B.js → secureRandomId-8LSc91aN.js} +1 -1
- package/dist/public/sdk/sessionObservationRevision-C7v-wN8_.js +1 -0
- package/dist/public/sdk/shared-BKPGtAps.js +6 -0
- package/dist/public/sdk/{signEvmFamily-C_RvEnDB.js → signEvmFamily-DT34Vtpa.js} +1 -1
- package/dist/public/sdk/{signEvmFamilyWithUiConfirmForTempo-CUKdq5dE.js → signEvmFamilyWithUiConfirmForTempo-NYCFU6Li.js} +1 -1
- package/dist/public/sdk/{signEvmWithUiConfirm-CxXzcvj2.js → signEvmWithUiConfirm-D6nmJr_L.js} +1 -1
- package/dist/{esm/sdk/signNear-Dno7NsP_.js → public/sdk/signNear-B000QxBd.js} +1 -1
- package/dist/{esm/sdk/signingFlow-DtugI_2z.js → public/sdk/signingFlow-gl85GOW4.js} +1 -1
- package/dist/public/sdk/{signingQueue-C1Pb07gm.js → signingQueue-gW7wmOuL.js} +1 -1
- package/dist/public/sdk/{singletons-DxIyVhNb.js → singletons-CAsc9LvA.js} +1 -1
- package/dist/{esm/sdk/thresholdEcdsa-murTq-xz.js → public/sdk/thresholdEcdsa-Ci7yz395.js} +1 -1
- package/dist/{esm/sdk/transactionState-XbZm9Zon.js → public/sdk/transactionState-lB2qpkOm.js} +1 -1
- package/dist/public/sdk/tx-confirm-ui.js +1795 -432
- 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/public/sdk/{wallet-recovery-CVUalZ3p.js → wallet-recovery-DFaS3geI.js} +1 -1
- package/dist/{esm/sdk/walletAuthMethodRecord-Bv68Vq-g.js → public/sdk/walletAuthMethodRecord-CWdqdY_s.js} +1 -1
- package/dist/{esm/sdk/walletAuthority-v5wvv3IB.js → public/sdk/walletAuthority-BY3kyKQ-.js} +1 -1
- package/dist/{esm/sdk/walletCustodyEcdsaContinuity-rRHExT_R.js → public/sdk/walletCustodyEcdsaContinuity-mGh1Ysko.js} +1 -1
- package/dist/public/sdk/{walletDbName-DRzPv5Ir.js → walletDbName-BxWApBQF.js} +1 -1
- package/dist/{esm/sdk/walletOwnershipGeneration-pMmmJ6XA.js → public/sdk/walletOwnershipGeneration-DSGfjuV2.js} +1 -1
- package/dist/public/sdk/{walletRecoveryCommit-DvC6WlGz.js → walletRecoveryCommit-DQA_wveK.js} +1 -1
- package/dist/public/sdk/{walletRecoveryRotate-Dd3prJpr.js → walletRecoveryRotate-zvQThn37.js} +1 -1
- package/dist/public/sdk/walletRegistrationSetupPrewarm-DdVpKccU.js +1 -0
- package/dist/{esm/sdk/walletSessionAuthorizationStatus-DVV3xkAx.js → public/sdk/walletSessionAuthorizationStatus-ONPRiEbK.js} +1 -1
- package/dist/{esm/sdk/walletSessionAuthorizationStore-D-MhJ0PC.js → public/sdk/walletSessionAuthorizationStore-DnUMtkev.js} +1 -1
- package/dist/public/sdk/warmSessionHydration-D8Vdro9n.js +1 -0
- package/dist/{esm/sdk/webauthnP256-XgYu-Y6E.js → public/sdk/webauthnP256-_ajaNl90.js} +1 -1
- package/dist/public/sdk/{webauthnPromptCoordinator-D5sP8Q7e.js → webauthnPromptCoordinator-9bVeHcTZ.js} +1 -1
- package/dist/public/wallet-assets.manifest.json +192 -192
- package/dist/public/wallet-service/index.html +4 -4
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuFooter.d.ts +0 -1
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.d.ts +4 -6
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/presentation.d.ts +35 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/recovery-code-input.d.ts +17 -0
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmContent.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmHeader.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationBody.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationContent.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationDrawer.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationModal.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/EmailOtpInput.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ExportPrivateKeySurface.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationContent.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationDetails.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/RecoveryCodeBackupSurface.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ReviewDisclosure.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionLabel.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionReview.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionTree.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/WalletLocale.d.ts +18 -0
- package/dist/types/wallet/src/core/types/seams.d.ts +3 -0
- package/dist/types/wallet/src/core/ui/locale.d.ts +5 -0
- package/dist/types/wallet/src/core/ui/messages.d.ts +8 -0
- package/dist/types/wallet/src/index.d.ts +3 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuButtonMock.d.ts +1 -0
- package/dist/types/wallet/src/react/components/AccountMenuButton/WalletRegionSection.d.ts +3 -0
- package/dist/types/wallet/src/react/components/AccountMenuButton/WalletSettingsLayout.d.ts +4 -1
- package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/SeamsAuthMenuMock.d.ts +2 -1
- package/dist/types/wallet/src/react/context/WalletLocale.d.ts +16 -0
- package/package.json +1 -1
- package/dist/esm/sdk/ConfirmationDrawer-CXVNmfTy.js +0 -1
- package/dist/esm/sdk/adapters-CTlDBRJy.js +0 -2
- package/dist/esm/sdk/configBuilder-BMawmNpz.js +0 -1
- package/dist/esm/sdk/jsxRuntime.module-DKsgiFjd.js +0 -2
- package/dist/esm/sdk/localOnly-CPmpw381.js +0 -1
- package/dist/esm/sdk/mountExportPrivateKeySurface-C8_tpDHF.js +0 -1
- package/dist/esm/sdk/mountRecoveryCodeBackupSurface-BtNFtmSj.js +0 -2
- package/dist/esm/sdk/runtime-auth-CpjGW90U.js +0 -1
- package/dist/esm/sdk/runtime-device-link-CKgfGi7D.js +0 -1
- package/dist/esm/sdk/runtime-ecdsa-tempo-5VV9xSEh.js +0 -1
- package/dist/esm/sdk/runtime-email-otp-D1hYZNn6.js +0 -1
- package/dist/esm/sdk/runtime-export-B92wQD25.js +0 -1
- package/dist/esm/sdk/runtime-near-CUuKg38M.js +0 -1
- package/dist/esm/sdk/runtime-preferences-EdL3G_MO.js +0 -1
- package/dist/esm/sdk/runtime-recovery-uyw8sywI.js +0 -1
- package/dist/esm/sdk/sessionObservationRevision-DmmNV25w.js +0 -1
- package/dist/esm/sdk/shared-ha31XIdc.js +0 -6
- package/dist/esm/sdk/walletRegistrationSetupPrewarm-DcbhVNMQ.js +0 -1
- package/dist/esm/sdk/warmSessionHydration-CsQpQVuy.js +0 -1
- package/dist/public/sdk/ConfirmationDrawer-CXVNmfTy.js +0 -1
- package/dist/public/sdk/adapters-CTlDBRJy.js +0 -2
- package/dist/public/sdk/configBuilder-BMawmNpz.js +0 -1
- package/dist/public/sdk/jsxRuntime.module-DKsgiFjd.js +0 -2
- package/dist/public/sdk/localOnly-CPmpw381.js +0 -1
- package/dist/public/sdk/mountExportPrivateKeySurface-C8_tpDHF.js +0 -1
- package/dist/public/sdk/mountRecoveryCodeBackupSurface-BtNFtmSj.js +0 -2
- package/dist/public/sdk/runtime-auth-CpjGW90U.js +0 -1
- package/dist/public/sdk/runtime-device-link-CKgfGi7D.js +0 -1
- package/dist/public/sdk/runtime-ecdsa-tempo-5VV9xSEh.js +0 -1
- package/dist/public/sdk/runtime-email-otp-D1hYZNn6.js +0 -1
- package/dist/public/sdk/runtime-export-B92wQD25.js +0 -1
- package/dist/public/sdk/runtime-near-CUuKg38M.js +0 -1
- package/dist/public/sdk/runtime-preferences-EdL3G_MO.js +0 -1
- package/dist/public/sdk/runtime-recovery-uyw8sywI.js +0 -1
- package/dist/public/sdk/sessionObservationRevision-DmmNV25w.js +0 -1
- package/dist/public/sdk/shared-ha31XIdc.js +0 -6
- package/dist/public/sdk/walletRegistrationSetupPrewarm-DcbhVNMQ.js +0 -1
- package/dist/public/sdk/warmSessionHydration-CsQpQVuy.js +0 -1
- /package/dist/esm/sdk/{base64-DW79QA0h.js → base64-BmKR3UqU.js} +0 -0
- /package/dist/esm/sdk/{signingSessionSeal-DX41aXUL.js → signingSessionSeal-DqbjG8c8.js} +0 -0
- /package/dist/esm/sdk/{theme-BKaFqCAj.js → theme-os0Salmo.js} +0 -0
- /package/dist/public/sdk/{base64-DW79QA0h.js → base64-BmKR3UqU.js} +0 -0
- /package/dist/public/sdk/{signingSessionSeal-DX41aXUL.js → signingSessionSeal-DqbjG8c8.js} +0 -0
- /package/dist/public/sdk/{theme-BKaFqCAj.js → theme-os0Salmo.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { appearanceTokenCssRule } from "../../../../../core/signingEngine/uiConfirm/ui/appearance-token-vars.js";
|
|
2
2
|
import { createCspStylesheetManager, getDefaultCspNonce } from "../../../../../core/browser/walletIframe/csp-stylesheet.js";
|
|
3
|
+
import { withWalletLocale } from "../../../../../core/signingEngine/uiConfirm/ui/preact/WalletLocale.js";
|
|
3
4
|
import { AuthMenuSurface } from "./AuthMenuSurface.js";
|
|
4
5
|
import { render } from "preact";
|
|
5
6
|
import { jsx } from "preact/jsx-runtime";
|
|
@@ -45,14 +46,15 @@ var MountedAuthMenuSurface = class {
|
|
|
45
46
|
}
|
|
46
47
|
update(viewModel) {
|
|
47
48
|
if (this.state.kind === "disposed") return;
|
|
49
|
+
this.element.lang = viewModel.appearance.locale ?? "en";
|
|
48
50
|
this.element.dataset.theme = viewModel.appearance.theme.mode;
|
|
49
51
|
this.styles.setDynamicRule(this.element.id + "-appearance", appearanceTokenCssRule(this.element.id, viewModel.appearance));
|
|
50
|
-
render(/* @__PURE__ */ jsx(AuthMenuSurface, {
|
|
52
|
+
render(withWalletLocale(viewModel.appearance.locale ?? "en", /* @__PURE__ */ jsx(AuthMenuSurface, {
|
|
51
53
|
element: this.element,
|
|
52
54
|
viewModel,
|
|
53
55
|
onIntent: this.state.onIntent,
|
|
54
56
|
styles: this.styles
|
|
55
|
-
}), this.element);
|
|
57
|
+
})), this.element);
|
|
56
58
|
}
|
|
57
59
|
dispose() {
|
|
58
60
|
if (this.state.kind === "disposed") return;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { demoEmailOtpCodeFromDelivery } from "../../../../../core/signingEngine/session/emailOtp/challengeDelivery.js";
|
|
2
|
+
import { WalletText } from "../../../../../core/signingEngine/uiConfirm/ui/preact/WalletLocale.js";
|
|
3
|
+
import { resolveAuthMenuLoginAccount } from "../../auth-menu/domain.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
5
|
+
//#region src/SeamsWeb/walletIframe/host/ui/auth-menu/presentation.tsx
|
|
6
|
+
function renderDemoEmailCode(delivery) {
|
|
7
|
+
const code = demoEmailOtpCodeFromDelivery(delivery);
|
|
8
|
+
if (code === null) return null;
|
|
9
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
10
|
+
class: "seams-otp-description",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ jsx(WalletText, { message: "Demo email code:" }),
|
|
13
|
+
" ",
|
|
14
|
+
/* @__PURE__ */ jsx("code", { children: code })
|
|
15
|
+
]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
const AUTH_MENU_TITLE_ID = "seams-auth-menu-title";
|
|
19
|
+
const AUTH_MENU_ACCOUNT_LIST_ID = "seams-auth-menu-account-list";
|
|
20
|
+
function otpCodeDigits(code, length = 6) {
|
|
21
|
+
return code.padEnd(length, " ").slice(0, length).split("");
|
|
22
|
+
}
|
|
23
|
+
function recoveryCaretAtPoint(root, clientX, clientY, codeLength) {
|
|
24
|
+
let nearest = null;
|
|
25
|
+
for (const slot of root.querySelectorAll("[data-recovery-slot]")) {
|
|
26
|
+
const index = Number(slot.dataset.recoverySlot);
|
|
27
|
+
const box = slot.getBoundingClientRect();
|
|
28
|
+
const dx = clientX < box.left ? box.left - clientX : Math.max(0, clientX - box.right);
|
|
29
|
+
const dy = clientY < box.top ? box.top - clientY : Math.max(0, clientY - box.bottom);
|
|
30
|
+
const distance = dx * dx + dy * dy;
|
|
31
|
+
if (nearest === null || distance < nearest.distance) nearest = {
|
|
32
|
+
index,
|
|
33
|
+
distance,
|
|
34
|
+
after: clientX > box.left + box.width / 2
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
if (nearest === null) return null;
|
|
38
|
+
return Math.min(nearest.after ? nearest.index + 1 : nearest.index, codeLength);
|
|
39
|
+
}
|
|
40
|
+
function renderOtpCodeDigit(digit) {
|
|
41
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("span", {
|
|
42
|
+
class: `seams-otp-slot ${digit.trim() ? "is-filled" : ""}`,
|
|
43
|
+
children: digit
|
|
44
|
+
}) });
|
|
45
|
+
}
|
|
46
|
+
function authViewKey(viewModel) {
|
|
47
|
+
const stage = viewModel.kind === "recovery" ? `:${viewModel.stage}` : "";
|
|
48
|
+
return `${viewModel.kind}:${viewModel.mode}:${viewModel.status.kind}${stage}`;
|
|
49
|
+
}
|
|
50
|
+
function recoveryAnnouncement(viewModel) {
|
|
51
|
+
if (viewModel.status.kind === "busy") return viewModel.status.headline;
|
|
52
|
+
if (viewModel.status.kind === "recoverable") return viewModel.status.message;
|
|
53
|
+
if (viewModel.stage === "passkey_ready") return "Recovery code accepted.";
|
|
54
|
+
if (viewModel.stage === "sign_in_ready") return "Wallet recovered. Unlock it to continue.";
|
|
55
|
+
return "";
|
|
56
|
+
}
|
|
57
|
+
function recoveryBackLabel(viewModel) {
|
|
58
|
+
if (viewModel.kind !== "recovery") return "Back";
|
|
59
|
+
return viewModel.stage === "choose_method" ? "Back to recovery code" : "Back to unlock wallet";
|
|
60
|
+
}
|
|
61
|
+
function recoveryNavigationLocked(viewModel) {
|
|
62
|
+
return viewModel.kind === "recovery" && viewModel.stage === "finalizing";
|
|
63
|
+
}
|
|
64
|
+
function modeSwitchCopy(mode) {
|
|
65
|
+
return mode === "register" ? {
|
|
66
|
+
prompt: "Already have a wallet?",
|
|
67
|
+
action: "Unlock wallet",
|
|
68
|
+
nextMode: "login"
|
|
69
|
+
} : {
|
|
70
|
+
prompt: "Don't have a wallet?",
|
|
71
|
+
action: "Create a wallet",
|
|
72
|
+
nextMode: "register"
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function modeLabel(mode) {
|
|
76
|
+
return mode === "register" ? "Create a wallet" : "Unlock wallet";
|
|
77
|
+
}
|
|
78
|
+
function passkeyButtonLabel(mode) {
|
|
79
|
+
return mode === "register" ? "Create wallet with passkey" : "Unlock with passkey";
|
|
80
|
+
}
|
|
81
|
+
/** The failure the footer strip reports. Only the menu itself reports there. */
|
|
82
|
+
function menuNotice(viewModel) {
|
|
83
|
+
if (viewModel.kind === "google_otp_login" || viewModel.kind === "google_registration") return viewModel.error || null;
|
|
84
|
+
return viewModel.kind === "passkey" && viewModel.status.kind === "recoverable" && viewModel.status.reason === "error" ? viewModel.status.message : null;
|
|
85
|
+
}
|
|
86
|
+
function selectedLoginAccount(viewModel) {
|
|
87
|
+
return resolveAuthMenuLoginAccount(viewModel.accountOptions, viewModel.selectedAccount).selectedAccount;
|
|
88
|
+
}
|
|
89
|
+
function selectedAccountPrimaryText(account) {
|
|
90
|
+
return account.walletId;
|
|
91
|
+
}
|
|
92
|
+
function accountSecondaryText(account) {
|
|
93
|
+
return account.authMethod === "email_otp" ? account.emailAddress : null;
|
|
94
|
+
}
|
|
95
|
+
function savedAccountsTriggerLabel(account) {
|
|
96
|
+
if (!account) return "Saved wallets";
|
|
97
|
+
const emailAddress = accountSecondaryText(account);
|
|
98
|
+
return emailAddress ? `Saved wallets. Selected wallet ID ${account.walletId}, email ${emailAddress}` : `Saved wallets. Selected ${account.walletId}`;
|
|
99
|
+
}
|
|
100
|
+
function accountGroups(options) {
|
|
101
|
+
const passkeyAccounts = options.filter((option) => option.authMethod === "passkey");
|
|
102
|
+
const emailOtpAccounts = options.filter((option) => option.authMethod === "email_otp");
|
|
103
|
+
return [{
|
|
104
|
+
authMethod: "passkey",
|
|
105
|
+
label: "Passkey",
|
|
106
|
+
accounts: passkeyAccounts
|
|
107
|
+
}, {
|
|
108
|
+
authMethod: "email_otp",
|
|
109
|
+
label: "Email OTP",
|
|
110
|
+
accounts: emailOtpAccounts
|
|
111
|
+
}].filter((group) => group.accounts.length > 0);
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
export { AUTH_MENU_ACCOUNT_LIST_ID, AUTH_MENU_TITLE_ID, accountGroups, accountSecondaryText, authViewKey, menuNotice, modeLabel, modeSwitchCopy, otpCodeDigits, passkeyButtonLabel, recoveryAnnouncement, recoveryBackLabel, recoveryCaretAtPoint, recoveryNavigationLocked, renderDemoEmailCode, renderOtpCodeDigit, savedAccountsTriggerLabel, selectedAccountPrimaryText, selectedLoginAccount };
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=presentation.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EMAIL_OTP_RECOVERY_KEY_ALPHABET } from "../../../../../shared-ts/src/utils/emailOtpRecoveryKey.js";
|
|
2
|
+
import "../../../../../shared-ts/src/wallet-recovery/recoveryCodes.js";
|
|
3
|
+
import { jsx } from "preact/jsx-runtime";
|
|
4
|
+
//#region src/SeamsWeb/walletIframe/host/ui/auth-menu/recovery-code-input.tsx
|
|
5
|
+
const RECOVERY_CODE_CHARACTERS = new Set(EMAIL_OTP_RECOVERY_KEY_ALPHABET);
|
|
6
|
+
function recoveryInputCharacters(code) {
|
|
7
|
+
let characters = "";
|
|
8
|
+
for (const character of code.toUpperCase()) {
|
|
9
|
+
const read = character === "O" ? "0" : character === "I" || character === "L" ? "1" : character;
|
|
10
|
+
if (RECOVERY_CODE_CHARACTERS.has(read)) characters += read;
|
|
11
|
+
}
|
|
12
|
+
return characters;
|
|
13
|
+
}
|
|
14
|
+
const RECOVERY_CODE_SEPARATOR = /[\s\-\u2010-\u2015\u2212]/;
|
|
15
|
+
/** Characters the input dropped because no recovery code contains them, such as U. */
|
|
16
|
+
function rejectedRecoveryCharacters(input) {
|
|
17
|
+
const rejected = /* @__PURE__ */ new Set();
|
|
18
|
+
for (const character of input.toUpperCase()) {
|
|
19
|
+
if (RECOVERY_CODE_SEPARATOR.test(character)) continue;
|
|
20
|
+
if (recoveryInputCharacters(character)) continue;
|
|
21
|
+
rejected.add(character);
|
|
22
|
+
}
|
|
23
|
+
return Array.from(rejected).slice(0, 3);
|
|
24
|
+
}
|
|
25
|
+
function renderRecoveryCodeGroups(code, selection, arrival) {
|
|
26
|
+
const caret = selection && selection.start === selection.end ? selection.start : null;
|
|
27
|
+
const lastIndex = 31;
|
|
28
|
+
const focusIndex = selection === null ? null : Math.min(selection.start, lastIndex);
|
|
29
|
+
const groups = [];
|
|
30
|
+
for (let start = 0; start < 32; start += 4) {
|
|
31
|
+
const end = start + 4;
|
|
32
|
+
const slots = [];
|
|
33
|
+
for (let index = start; index < end; index += 1) {
|
|
34
|
+
const character = code[index] ?? "";
|
|
35
|
+
const classes = ["seams-otp-slot"];
|
|
36
|
+
if (character) classes.push("is-filled");
|
|
37
|
+
if (index === caret) classes.push("is-caret");
|
|
38
|
+
if (caret === 32 && index === lastIndex) classes.push("is-caret-after");
|
|
39
|
+
if (selection && index >= selection.start && index < selection.end) classes.push("is-selected");
|
|
40
|
+
if (arrival && index >= arrival.start && index < arrival.end) classes.push("is-new");
|
|
41
|
+
slots.push(/* @__PURE__ */ jsx("span", {
|
|
42
|
+
class: classes.join(" "),
|
|
43
|
+
"data-recovery-slot": index,
|
|
44
|
+
children: character
|
|
45
|
+
}, index));
|
|
46
|
+
}
|
|
47
|
+
const groupClasses = ["seams-recovery-code-group"];
|
|
48
|
+
if (focusIndex !== null && focusIndex >= start && focusIndex < end) groupClasses.push("is-active");
|
|
49
|
+
if (code.length >= end) groupClasses.push("is-complete");
|
|
50
|
+
groups.push(/* @__PURE__ */ jsx("div", {
|
|
51
|
+
class: groupClasses.join(" "),
|
|
52
|
+
children: slots
|
|
53
|
+
}, start));
|
|
54
|
+
}
|
|
55
|
+
return groups;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { recoveryInputCharacters, rejectedRecoveryCharacters, renderRecoveryCodeGroups };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=recovery-code-input.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { parseMpcMaterialActivationRef } from "../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
+
import { normalizeWalletLocale } from "../../../core/ui/locale.js";
|
|
2
3
|
import { resolveAppearanceTheme, resolveThemePalette } from "../../../core/config/configHelpers.js";
|
|
3
4
|
import { nearAccountRefFromAccountId, thresholdEcdsaChainTargetFromRequest, thresholdEcdsaChainTargetsEqual, walletSessionRefFromSession } from "../../../core/signingEngine/interfaces/ecdsaChainTarget.js";
|
|
4
5
|
import { parseExactEcdsaSigningLaneIdentity, parseExactEd25519ExportMaterialIdentity } from "../../../core/signingEngine/session/identity/exactSigningLaneIdentity.js";
|
|
@@ -72,6 +73,7 @@ function normalizeExportKeypairWithUIInput(input, theme) {
|
|
|
72
73
|
function resolveRuntimeAppearance(current, input) {
|
|
73
74
|
const rawInput = input;
|
|
74
75
|
return {
|
|
76
|
+
locale: normalizeWalletLocale(rawInput.locale ?? current.locale),
|
|
75
77
|
theme: resolveAppearanceTheme({
|
|
76
78
|
value: rawInput.theme,
|
|
77
79
|
fallback: current.theme,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { normalizeTrimmedString } from "../../shared-ts/src/utils/normalize.js";
|
|
2
|
+
import { normalizeWalletLocale } from "../ui/locale.js";
|
|
2
3
|
import { copyEcdsaSignerProvisioningDefaults, resolveAppearanceTheme, resolveBoolean, resolveChains, resolveIntegerInRange, resolveThemePalette } from "./configHelpers.js";
|
|
3
4
|
import { normalizeWalletHostVariant } from "../browser/walletIframe/hostVariant.js";
|
|
4
5
|
import { SIGNING_SESSION_SEAL_ALG, SIGNING_SESSION_SEAL_GROUP_ID } from "../../shared-ts/src/utils/signingSessionSeal.js";
|
|
@@ -208,6 +209,7 @@ function buildConfigsFromDefaults(args) {
|
|
|
208
209
|
}
|
|
209
210
|
},
|
|
210
211
|
ui: { appearance: {
|
|
212
|
+
locale: normalizeWalletLocale(rawAppearance?.locale ?? defaults.ui.appearance.locale),
|
|
211
213
|
theme: appearanceTheme,
|
|
212
214
|
palette: appearancePalette
|
|
213
215
|
} }
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext, WalletText } from "./WalletLocale.js";
|
|
1
3
|
import { CONFIRM_SURFACE_HEIGHT_DRIVEN_VAR, createSurfaceHeightReflow } from "../confirm-surface-resize.js";
|
|
2
4
|
import { TransactionTree } from "./TransactionTree.js";
|
|
3
5
|
import { Component, createRef } from "preact";
|
|
@@ -9,6 +11,7 @@ function stopDragStart(event) {
|
|
|
9
11
|
event.stopPropagation();
|
|
10
12
|
}
|
|
11
13
|
var ConfirmContent = class extends Component {
|
|
14
|
+
static contextType = WalletLocaleContext;
|
|
12
15
|
state = { armed: false };
|
|
13
16
|
id = `seams-confirm-content-${++nextContentId}`;
|
|
14
17
|
root = createRef();
|
|
@@ -87,7 +90,7 @@ var ConfirmContent = class extends Component {
|
|
|
87
90
|
this.props.errorMessage && /* @__PURE__ */ jsx("div", {
|
|
88
91
|
class: "error",
|
|
89
92
|
role: "alert",
|
|
90
|
-
children: this.props.errorMessage
|
|
93
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.errorMessage })
|
|
91
94
|
}),
|
|
92
95
|
this.props.tree && /* @__PURE__ */ jsx("div", {
|
|
93
96
|
class: "tooltip-width",
|
|
@@ -107,7 +110,7 @@ var ConfirmContent = class extends Component {
|
|
|
107
110
|
type: "button",
|
|
108
111
|
class: "cancel",
|
|
109
112
|
onClick: this.cancel,
|
|
110
|
-
children: this.props.cancelText
|
|
113
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.cancelText })
|
|
111
114
|
}), /* @__PURE__ */ jsx("button", {
|
|
112
115
|
type: this.props.decision.kind === "form" ? "submit" : "button",
|
|
113
116
|
form: this.props.decision.kind === "form" ? this.props.decision.formId : void 0,
|
|
@@ -117,8 +120,8 @@ var ConfirmContent = class extends Component {
|
|
|
117
120
|
children: preparing ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
118
121
|
class: "loading-indicator",
|
|
119
122
|
role: "progressbar",
|
|
120
|
-
"aria-label": "Loading"
|
|
121
|
-
}), /* @__PURE__ */ jsx("span", { children: "Loading..." })] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [this.props.confirmIcon, this.props.confirmText] })
|
|
123
|
+
"aria-label": walletText(this.context, "Loading")
|
|
124
|
+
}), /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(WalletText, { message: "Loading..." }) })] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [this.props.confirmIcon, /* @__PURE__ */ jsx(WalletText, { copy: this.props.confirmText })] })
|
|
122
125
|
})]
|
|
123
126
|
})
|
|
124
127
|
]
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { walletText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletText, useWalletLocale } from "./WalletLocale.js";
|
|
1
3
|
import { PadlockIcon } from "./PadlockIcon.js";
|
|
2
4
|
import { PasskeyHaloLoading } from "./PasskeyHaloLoading.js";
|
|
3
5
|
import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
4
6
|
//#region src/core/signingEngine/uiConfirm/ui/preact/ConfirmHeader.tsx
|
|
7
|
+
/** @jsxImportSource preact */
|
|
5
8
|
function ConfirmHeader(props) {
|
|
9
|
+
const locale = useWalletLocale();
|
|
6
10
|
return /* @__PURE__ */ jsxs("div", {
|
|
7
11
|
class: "hero seams-confirm-header",
|
|
8
12
|
children: [/* @__PURE__ */ jsx(PasskeyHaloLoading, {
|
|
@@ -14,11 +18,11 @@ function ConfirmHeader(props) {
|
|
|
14
18
|
children: [
|
|
15
19
|
/* @__PURE__ */ jsx("h2", {
|
|
16
20
|
class: "hero-heading",
|
|
17
|
-
children: props.heading
|
|
21
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: props.heading })
|
|
18
22
|
}),
|
|
19
23
|
props.errorMessage && /* @__PURE__ */ jsx("div", {
|
|
20
24
|
class: "error-banner",
|
|
21
|
-
children: props.errorMessage
|
|
25
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: props.errorMessage })
|
|
22
26
|
}),
|
|
23
27
|
/* @__PURE__ */ jsx("div", {
|
|
24
28
|
class: "rpid-wrapper",
|
|
@@ -30,8 +34,8 @@ function ConfirmHeader(props) {
|
|
|
30
34
|
role: "status",
|
|
31
35
|
children: props.website.kind === "ready" ? /* @__PURE__ */ jsx("span", {
|
|
32
36
|
class: "domain-text",
|
|
33
|
-
children: props.website.text
|
|
34
|
-
}) : /* @__PURE__ */ jsx(LoadingStatus, { label: "Loading website" })
|
|
37
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: props.website.text })
|
|
38
|
+
}) : /* @__PURE__ */ jsx(LoadingStatus, { label: walletText(locale, "Loading website") })
|
|
35
39
|
})]
|
|
36
40
|
}), /* @__PURE__ */ jsxs("span", {
|
|
37
41
|
class: "security-details",
|
|
@@ -52,7 +56,7 @@ function ConfirmHeader(props) {
|
|
|
52
56
|
]
|
|
53
57
|
}), /* @__PURE__ */ jsx("span", {
|
|
54
58
|
role: "status",
|
|
55
|
-
children: props.chainDetails.kind === "ready" ? props.chainDetails.text : /* @__PURE__ */ jsx(LoadingStatus, { label: "Loading chain details" })
|
|
59
|
+
children: props.chainDetails.kind === "ready" ? /* @__PURE__ */ jsx(WalletText, { copy: props.chainDetails.text }) : /* @__PURE__ */ jsx(LoadingStatus, { label: walletText(locale, "Loading chain details") })
|
|
56
60
|
})]
|
|
57
61
|
})]
|
|
58
62
|
})
|
|
@@ -81,7 +85,7 @@ function LoadingStatus(props) {
|
|
|
81
85
|
]
|
|
82
86
|
}), /* @__PURE__ */ jsx("span", {
|
|
83
87
|
class: "sr-only",
|
|
84
|
-
children: props.label
|
|
88
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: props.label })
|
|
85
89
|
})] });
|
|
86
90
|
}
|
|
87
91
|
//#endregion
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletDisplayText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext, WalletText } from "./WalletLocale.js";
|
|
1
3
|
import { Component } from "preact";
|
|
2
4
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
3
5
|
//#region src/core/signingEngine/uiConfirm/ui/preact/ConfirmationBody.tsx
|
|
@@ -6,6 +8,7 @@ function assertNever(value) {
|
|
|
6
8
|
throw new Error(`Unexpected confirmation body: ${String(value)}`);
|
|
7
9
|
}
|
|
8
10
|
var ConfirmationBody = class extends Component {
|
|
11
|
+
static contextType = WalletLocaleContext;
|
|
9
12
|
copy = () => {
|
|
10
13
|
if (this.props.model.kind === "funding") this.props.onCopyAccount(this.props.model.accountId);
|
|
11
14
|
};
|
|
@@ -15,25 +18,25 @@ var ConfirmationBody = class extends Component {
|
|
|
15
18
|
case "empty": return null;
|
|
16
19
|
case "text": return /* @__PURE__ */ jsx("div", {
|
|
17
20
|
class: "confirmation-body",
|
|
18
|
-
children: model.text
|
|
21
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: model.text })
|
|
19
22
|
});
|
|
20
23
|
case "status": return /* @__PURE__ */ jsx("div", {
|
|
21
24
|
class: "confirmation-body confirmation-body--status",
|
|
22
|
-
children: model.text
|
|
25
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: model.text })
|
|
23
26
|
});
|
|
24
27
|
case "funding": return /* @__PURE__ */ jsxs("div", {
|
|
25
28
|
class: "confirmation-body confirmation-body--funding",
|
|
26
29
|
children: [
|
|
27
|
-
"NEAR account",
|
|
30
|
+
/* @__PURE__ */ jsx(WalletText, { message: "NEAR account" }),
|
|
28
31
|
/* @__PURE__ */ jsx("button", {
|
|
29
32
|
type: "button",
|
|
30
33
|
class: "confirmation-body__copy-target",
|
|
31
|
-
title: `Copy ${model.accountId}
|
|
32
|
-
"aria-label": `Copy NEAR account ${model.accountId}
|
|
34
|
+
title: walletDisplayText(this.context, `Copy ${model.accountId}`),
|
|
35
|
+
"aria-label": walletDisplayText(this.context, `Copy NEAR account ${model.accountId}`),
|
|
33
36
|
onClick: this.copy,
|
|
34
37
|
children: model.shortAccountId
|
|
35
38
|
}),
|
|
36
|
-
"needs funding"
|
|
39
|
+
/* @__PURE__ */ jsx(WalletText, { message: "needs funding" })
|
|
37
40
|
]
|
|
38
41
|
});
|
|
39
42
|
default: return assertNever(model);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletDisplayText, walletText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext, WalletText } from "./WalletLocale.js";
|
|
1
3
|
import { PadlockIcon } from "./PadlockIcon.js";
|
|
2
4
|
import { CONFIRM_SURFACE_HEIGHT_DRIVEN_VAR, createSurfaceHeightReflow } from "../confirm-surface-resize.js";
|
|
3
5
|
import { copySurfaceText } from "./clipboard.js";
|
|
@@ -13,6 +15,7 @@ import { jsx, jsxs } from "preact/jsx-runtime";
|
|
|
13
15
|
/** @jsxImportSource preact */
|
|
14
16
|
let nextConfirmationId = 0;
|
|
15
17
|
var ConfirmationContent = class extends Component {
|
|
18
|
+
static contextType = WalletLocaleContext;
|
|
16
19
|
root = createRef();
|
|
17
20
|
otpFormId = `seams-confirmation-email-${++nextConfirmationId}`;
|
|
18
21
|
reflowId = `seams-confirmation-content-surface-${nextConfirmationId}`;
|
|
@@ -75,29 +78,29 @@ var ConfirmationContent = class extends Component {
|
|
|
75
78
|
children: [
|
|
76
79
|
model.transaction.onBack && /* @__PURE__ */ jsx("button", {
|
|
77
80
|
type: "button",
|
|
78
|
-
"aria-label": "Back to review",
|
|
79
|
-
title: "Back to review",
|
|
81
|
+
"aria-label": walletText(this.context, "Back to review"),
|
|
82
|
+
title: walletText(this.context, "Back to review"),
|
|
80
83
|
disabled: decision.kind === "preparing",
|
|
81
84
|
onClick: model.transaction.onBack,
|
|
82
85
|
children: /* @__PURE__ */ jsx(ReviewIcon, { kind: "back" })
|
|
83
86
|
}),
|
|
84
87
|
/* @__PURE__ */ jsx(PadlockIcon, {}),
|
|
85
|
-
model.header.website.kind === "ready" ? model.header.website.text : /* @__PURE__ */ jsx(LoadingStatus, { label: "Loading website" })
|
|
88
|
+
model.header.website.kind === "ready" ? model.header.website.text : /* @__PURE__ */ jsx(LoadingStatus, { label: walletText(this.context, "Loading website") })
|
|
86
89
|
]
|
|
87
90
|
}), /* @__PURE__ */ jsx("button", {
|
|
88
91
|
type: "button",
|
|
89
|
-
"aria-label": model.transaction.cancelText,
|
|
92
|
+
"aria-label": walletDisplayText(this.context, model.transaction.cancelText),
|
|
90
93
|
onClick: model.transaction.onCancel,
|
|
91
94
|
children: /* @__PURE__ */ jsx(ReviewIcon, { kind: "close" })
|
|
92
95
|
})]
|
|
93
96
|
}),
|
|
94
97
|
model.review.model && /* @__PURE__ */ jsx("div", {
|
|
95
98
|
class: "seams-review-eyebrow",
|
|
96
|
-
children: model.review.model.operations.length === 1 ? model.review.model.operations[0].label.replace(/\s+using\s+[\d,.]+\s+gas$/i, "") : "Transaction"
|
|
99
|
+
children: model.review.model.operations.length === 1 ? /* @__PURE__ */ jsx(WalletText, { copy: model.review.model.operations[0].label.replace(/\s+using\s+[\d,.]+\s+gas$/i, "") }) : /* @__PURE__ */ jsx(WalletText, { message: "Transaction" })
|
|
97
100
|
}),
|
|
98
101
|
/* @__PURE__ */ jsx("h2", {
|
|
99
102
|
class: "seams-review-title",
|
|
100
|
-
children: model.header.heading
|
|
103
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: model.header.heading })
|
|
101
104
|
}),
|
|
102
105
|
/* @__PURE__ */ jsx(TransactionReview, { data: model.review }),
|
|
103
106
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletDisplayText, walletText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext, WalletText } from "./WalletLocale.js";
|
|
1
3
|
import { drawerDragTranslate, shouldDismissDrawerDrag } from "../drawer-gesture.js";
|
|
2
4
|
import { Component, createRef } from "preact";
|
|
3
5
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
@@ -8,6 +10,7 @@ function ConfirmationDrawer(props) {
|
|
|
8
10
|
return /* @__PURE__ */ jsx(DrawerShell, { ...props }, props.context);
|
|
9
11
|
}
|
|
10
12
|
var DrawerShell = class extends Component {
|
|
13
|
+
static contextType = WalletLocaleContext;
|
|
11
14
|
state = { settled: false };
|
|
12
15
|
id = `seams-confirmation-drawer-${++nextDrawerId}`;
|
|
13
16
|
dialog = createRef();
|
|
@@ -245,7 +248,7 @@ var DrawerShell = class extends Component {
|
|
|
245
248
|
/* @__PURE__ */ jsx("button", {
|
|
246
249
|
type: "button",
|
|
247
250
|
class: "seams-drawer-handle",
|
|
248
|
-
"aria-label": "Dismiss confirmation",
|
|
251
|
+
"aria-label": walletText(this.context, "Dismiss confirmation"),
|
|
249
252
|
disabled: !this.canDrag(),
|
|
250
253
|
onClick: this.cancel,
|
|
251
254
|
children: /* @__PURE__ */ jsx("span", {})
|
|
@@ -253,7 +256,7 @@ var DrawerShell = class extends Component {
|
|
|
253
256
|
/* @__PURE__ */ jsx("button", {
|
|
254
257
|
type: "button",
|
|
255
258
|
class: "seams-drawer-close",
|
|
256
|
-
"aria-label": "Close",
|
|
259
|
+
"aria-label": walletText(this.context, "Close"),
|
|
257
260
|
disabled: !this.canDrag(),
|
|
258
261
|
onClick: this.cancel,
|
|
259
262
|
children: "×"
|
|
@@ -264,7 +267,7 @@ var DrawerShell = class extends Component {
|
|
|
264
267
|
ref: this.body,
|
|
265
268
|
children: [this.props.errorMessage && /* @__PURE__ */ jsx("div", {
|
|
266
269
|
class: "error",
|
|
267
|
-
children: this.props.errorMessage
|
|
270
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.errorMessage })
|
|
268
271
|
}), /* @__PURE__ */ jsx("div", {
|
|
269
272
|
class: "seams-drawer-content",
|
|
270
273
|
ref: this.content,
|
|
@@ -276,7 +279,7 @@ var DrawerShell = class extends Component {
|
|
|
276
279
|
return /* @__PURE__ */ jsx("dialog", {
|
|
277
280
|
class: "seams-drawer-dialog",
|
|
278
281
|
ref: this.dialog,
|
|
279
|
-
"aria-label": this.props.label,
|
|
282
|
+
"aria-label": walletDisplayText(this.context, this.props.label),
|
|
280
283
|
onCancel: this.cancel,
|
|
281
284
|
onClick: this.backdropClick,
|
|
282
285
|
onClickCapture: this.suppressDragClick,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletDisplayText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext } from "./WalletLocale.js";
|
|
1
3
|
import { Component, createRef } from "preact";
|
|
2
4
|
import { jsx } from "preact/jsx-runtime";
|
|
3
5
|
//#region src/core/signingEngine/uiConfirm/ui/preact/ConfirmationModal.tsx
|
|
@@ -7,6 +9,7 @@ function ConfirmationModal(props) {
|
|
|
7
9
|
return /* @__PURE__ */ jsx(ModalShell, { ...props }, props.context);
|
|
8
10
|
}
|
|
9
11
|
var ModalShell = class extends Component {
|
|
12
|
+
static contextType = WalletLocaleContext;
|
|
10
13
|
dialog = createRef();
|
|
11
14
|
hosted = createRef();
|
|
12
15
|
containerId = `seams-confirmation-modal-${++nextModalId}`;
|
|
@@ -35,7 +38,7 @@ var ModalShell = class extends Component {
|
|
|
35
38
|
if (this.props.context === "standalone") return /* @__PURE__ */ jsx("dialog", {
|
|
36
39
|
ref: this.dialog,
|
|
37
40
|
class: "seams-confirmation-modal",
|
|
38
|
-
"aria-label": this.props.label,
|
|
41
|
+
"aria-label": walletDisplayText(this.context, this.props.label),
|
|
39
42
|
onCancel: this.cancel,
|
|
40
43
|
onClick: this.backdropClick,
|
|
41
44
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletDisplayText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext } from "./WalletLocale.js";
|
|
1
3
|
import { formatEmailOtpSentText } from "../../../stepUpConfirmation/otpPrompt/promptText.js";
|
|
2
4
|
import { EmailOtpInput } from "./EmailOtpInput.js";
|
|
3
5
|
import { EmailOtpSession } from "./email-otp-session.js";
|
|
@@ -9,6 +11,7 @@ function EmailOtpContent(props) {
|
|
|
9
11
|
return /* @__PURE__ */ jsx(EmailOtpSessionView, { ...props }, props.prompt.challengeId);
|
|
10
12
|
}
|
|
11
13
|
var EmailOtpSessionView = class extends Component {
|
|
14
|
+
static contextType = WalletLocaleContext;
|
|
12
15
|
session;
|
|
13
16
|
form = createRef();
|
|
14
17
|
lifetime;
|
|
@@ -118,7 +121,7 @@ var EmailOtpSessionView = class extends Component {
|
|
|
118
121
|
challengeId: this.lifetime.kind === "active" ? this.lifetime.challengeId : "",
|
|
119
122
|
code: this.state.code,
|
|
120
123
|
helperText: this.props.prompt.helperText?.trim() || formatEmailOtpSentText(this.lifetime.kind === "active" ? this.lifetime.emailHint : ""),
|
|
121
|
-
errorMessage: this.state.error || void 0,
|
|
124
|
+
errorMessage: walletDisplayText(this.context, this.state.error || void 0),
|
|
122
125
|
state: this.inputState(),
|
|
123
126
|
resend: this.resendAction()
|
|
124
127
|
})
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WalletText } from "./WalletLocale.js";
|
|
1
2
|
import { Component } from "preact";
|
|
2
3
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
3
4
|
//#region src/core/signingEngine/uiConfirm/ui/preact/EmailOtpInput.tsx
|
|
@@ -28,7 +29,7 @@ var EmailOtpInput = class extends Component {
|
|
|
28
29
|
/* @__PURE__ */ jsx("label", {
|
|
29
30
|
class: "email-otp-confirm__label",
|
|
30
31
|
for: this.id,
|
|
31
|
-
children: "Email code"
|
|
32
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Email code" })
|
|
32
33
|
}),
|
|
33
34
|
/* @__PURE__ */ jsxs("div", {
|
|
34
35
|
class: "email-otp-confirm__code-field",
|
|
@@ -65,19 +66,19 @@ var EmailOtpInput = class extends Component {
|
|
|
65
66
|
/* @__PURE__ */ jsx("div", {
|
|
66
67
|
id: helperId,
|
|
67
68
|
class: "email-otp-confirm__helper",
|
|
68
|
-
children: this.props.helperText
|
|
69
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.helperText })
|
|
69
70
|
}),
|
|
70
71
|
this.props.errorMessage && /* @__PURE__ */ jsx("div", {
|
|
71
72
|
id: errorId,
|
|
72
73
|
class: "email-otp-confirm__error",
|
|
73
|
-
children: this.props.errorMessage
|
|
74
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.errorMessage })
|
|
74
75
|
}),
|
|
75
76
|
this.props.resend && /* @__PURE__ */ jsx("button", {
|
|
76
77
|
type: "button",
|
|
77
78
|
class: "email-otp-confirm__resend",
|
|
78
79
|
disabled: this.props.resend.kind === "unavailable",
|
|
79
80
|
onClick: this.resend,
|
|
80
|
-
children: this.props.resend.label
|
|
81
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.resend.label })
|
|
81
82
|
})
|
|
82
83
|
]
|
|
83
84
|
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext, WalletText } from "./WalletLocale.js";
|
|
1
3
|
import { PasskeyHaloLoading } from "./PasskeyHaloLoading.js";
|
|
2
4
|
import { PasskeyRegistrationDetails } from "./PasskeyRegistrationDetails.js";
|
|
3
5
|
import { Component } from "preact";
|
|
@@ -5,6 +7,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
|
|
|
5
7
|
//#region src/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationContent.tsx
|
|
6
8
|
/** @jsxImportSource preact */
|
|
7
9
|
var PasskeyRegistrationContent = class extends Component {
|
|
10
|
+
static contextType = WalletLocaleContext;
|
|
8
11
|
confirm = () => {
|
|
9
12
|
if (this.props.decision.kind === "ready") this.props.decision.onConfirm();
|
|
10
13
|
};
|
|
@@ -28,16 +31,16 @@ var PasskeyRegistrationContent = class extends Component {
|
|
|
28
31
|
class: "hero-container passkey-registration-confirm__hero-copy",
|
|
29
32
|
children: [/* @__PURE__ */ jsx("h2", {
|
|
30
33
|
class: "hero-heading",
|
|
31
|
-
children: this.props.heading
|
|
34
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.heading })
|
|
32
35
|
}), /* @__PURE__ */ jsx("p", {
|
|
33
36
|
class: "passkey-registration-confirm__body",
|
|
34
|
-
children: this.props.body
|
|
37
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.body })
|
|
35
38
|
})]
|
|
36
39
|
})]
|
|
37
40
|
}),
|
|
38
41
|
this.props.errorMessage && /* @__PURE__ */ jsx("div", {
|
|
39
42
|
class: "error-banner",
|
|
40
|
-
children: this.props.errorMessage
|
|
43
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.errorMessage })
|
|
41
44
|
}),
|
|
42
45
|
/* @__PURE__ */ jsx(PasskeyRegistrationDetails, { display: this.props.display }),
|
|
43
46
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -46,7 +49,7 @@ var PasskeyRegistrationContent = class extends Component {
|
|
|
46
49
|
type: "button",
|
|
47
50
|
class: "btn btn-cancel",
|
|
48
51
|
onClick: this.cancel,
|
|
49
|
-
children: this.props.cancelText
|
|
52
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.cancelText })
|
|
50
53
|
}), /* @__PURE__ */ jsx("button", {
|
|
51
54
|
type: "button",
|
|
52
55
|
class: "btn btn-confirm",
|
|
@@ -55,11 +58,11 @@ var PasskeyRegistrationContent = class extends Component {
|
|
|
55
58
|
children: creating ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
56
59
|
class: "loading-indicator passkey-registration-confirm__spinner",
|
|
57
60
|
role: "progressbar",
|
|
58
|
-
"aria-label": "Creating passkey"
|
|
61
|
+
"aria-label": walletText(this.context, "Creating passkey")
|
|
59
62
|
}), /* @__PURE__ */ jsx("span", {
|
|
60
63
|
class: "passkey-registration-confirm__busy-label",
|
|
61
|
-
children: "Creating passkey..."
|
|
62
|
-
})] }) : "Create passkey"
|
|
64
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Creating passkey..." })
|
|
65
|
+
})] }) : /* @__PURE__ */ jsx(WalletText, { message: "Create passkey" })
|
|
63
66
|
})]
|
|
64
67
|
})
|
|
65
68
|
]
|