@daimo/sdk 1.7.0 → 1.8.1
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 +18 -0
- package/dist/client/createDaimoClient.d.ts +16 -4
- package/dist/client/createDaimoClient.d.ts.map +1 -1
- package/dist/client/createDaimoClient.js +31 -3
- package/dist/client/createDaimoClient.js.map +1 -1
- package/dist/common/account.d.ts +419 -13
- package/dist/common/account.d.ts.map +1 -1
- package/dist/common/account.js +278 -0
- package/dist/common/account.js.map +1 -1
- package/dist/common/api.d.ts +7 -5
- package/dist/common/api.d.ts.map +1 -1
- package/dist/common/api.js +13 -12
- package/dist/common/api.js.map +1 -1
- package/dist/common/api.test.d.ts +2 -0
- package/dist/common/api.test.d.ts.map +1 -0
- package/dist/common/api.test.js +21 -0
- package/dist/common/api.test.js.map +1 -0
- package/dist/common/constants.d.ts +5 -0
- package/dist/common/constants.d.ts.map +1 -0
- package/dist/common/constants.js +5 -0
- package/dist/common/constants.js.map +1 -0
- package/dist/common/frameMessages.d.ts +26 -0
- package/dist/common/frameMessages.d.ts.map +1 -0
- package/dist/common/frameMessages.js +54 -0
- package/dist/common/frameMessages.js.map +1 -0
- package/dist/common/frameMessages.test.d.ts +2 -0
- package/dist/common/frameMessages.test.d.ts.map +1 -0
- package/dist/common/frameMessages.test.js +42 -0
- package/dist/common/frameMessages.test.js.map +1 -0
- package/dist/common/frameReadiness.d.ts +22 -0
- package/dist/common/frameReadiness.d.ts.map +1 -0
- package/dist/common/frameReadiness.js +33 -0
- package/dist/common/frameReadiness.js.map +1 -0
- package/dist/common/frameReadiness.test.d.ts +2 -0
- package/dist/common/frameReadiness.test.d.ts.map +1 -0
- package/dist/common/frameReadiness.test.js +76 -0
- package/dist/common/frameReadiness.test.js.map +1 -0
- package/dist/native/DaimoFrameRN.d.ts +72 -0
- package/dist/native/DaimoFrameRN.d.ts.map +1 -0
- package/dist/native/DaimoFrameRN.js +244 -0
- package/dist/native/DaimoFrameRN.js.map +1 -0
- package/dist/native/index.d.ts +5 -0
- package/dist/native/index.d.ts.map +1 -0
- package/dist/native/index.js +10 -0
- package/dist/native/index.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/web/api/index.d.ts +24 -0
- package/dist/web/api/index.d.ts.map +1 -1
- package/dist/web/api/index.js +6 -1
- package/dist/web/api/index.js.map +1 -1
- package/dist/web/api/navTree.d.ts +5 -2
- package/dist/web/api/navTree.d.ts.map +1 -1
- package/dist/web/components/BankLogo.d.ts +8 -0
- package/dist/web/components/BankLogo.d.ts.map +1 -0
- package/dist/web/components/BankLogo.js +9 -0
- package/dist/web/components/BankLogo.js.map +1 -0
- package/dist/web/components/ChooseOptionPage.d.ts +2 -1
- package/dist/web/components/ChooseOptionPage.d.ts.map +1 -1
- package/dist/web/components/ChooseOptionPage.js +7 -4
- package/dist/web/components/ChooseOptionPage.js.map +1 -1
- package/dist/web/components/ChooseOptionPage.test.d.ts +2 -0
- package/dist/web/components/ChooseOptionPage.test.d.ts.map +1 -0
- package/dist/web/components/ChooseOptionPage.test.js +29 -0
- package/dist/web/components/ChooseOptionPage.test.js.map +1 -0
- package/dist/web/components/Countdown.d.ts +4 -1
- package/dist/web/components/Countdown.d.ts.map +1 -1
- package/dist/web/components/Countdown.js +24 -10
- package/dist/web/components/Countdown.js.map +1 -1
- package/dist/web/components/Countdown.test.d.ts +2 -0
- package/dist/web/components/Countdown.test.d.ts.map +1 -0
- package/dist/web/components/Countdown.test.js +16 -0
- package/dist/web/components/Countdown.test.js.map +1 -0
- package/dist/web/components/DaimoFrame.d.ts +3 -2
- package/dist/web/components/DaimoFrame.d.ts.map +1 -1
- package/dist/web/components/DaimoFrame.js +36 -18
- package/dist/web/components/DaimoFrame.js.map +1 -1
- package/dist/web/components/DaimoModal.d.ts +16 -1
- package/dist/web/components/DaimoModal.d.ts.map +1 -1
- package/dist/web/components/DaimoModal.js +147 -64
- package/dist/web/components/DaimoModal.js.map +1 -1
- package/dist/web/components/DaimoRampPreview.d.ts +12 -0
- package/dist/web/components/DaimoRampPreview.d.ts.map +1 -0
- package/dist/web/components/DaimoRampPreview.js +21 -0
- package/dist/web/components/DaimoRampPreview.js.map +1 -0
- package/dist/web/components/ExchangePage.d.ts.map +1 -1
- package/dist/web/components/ExchangePage.js +6 -1
- package/dist/web/components/ExchangePage.js.map +1 -1
- package/dist/web/components/ExternalPaymentPage.d.ts.map +1 -1
- package/dist/web/components/ExternalPaymentPage.js +3 -2
- package/dist/web/components/ExternalPaymentPage.js.map +1 -1
- package/dist/web/components/ModalChrome.d.ts +9 -12
- package/dist/web/components/ModalChrome.d.ts.map +1 -1
- package/dist/web/components/ModalChrome.js +40 -41
- package/dist/web/components/ModalChrome.js.map +1 -1
- package/dist/web/components/account/AccountApplePayPage.d.ts +4 -3
- package/dist/web/components/account/AccountApplePayPage.d.ts.map +1 -1
- package/dist/web/components/account/AccountApplePayPage.js +85 -50
- package/dist/web/components/account/AccountApplePayPage.js.map +1 -1
- package/dist/web/components/account/AccountApprovalPage.d.ts +34 -0
- package/dist/web/components/account/AccountApprovalPage.d.ts.map +1 -0
- package/dist/web/components/account/AccountApprovalPage.js +145 -0
- package/dist/web/components/account/AccountApprovalPage.js.map +1 -0
- package/dist/web/components/account/AccountBankDetailsPage.d.ts +4 -3
- package/dist/web/components/account/AccountBankDetailsPage.d.ts.map +1 -1
- package/dist/web/components/account/AccountBankDetailsPage.js +12 -10
- package/dist/web/components/account/AccountBankDetailsPage.js.map +1 -1
- package/dist/web/components/account/AccountBankPickerPage.d.ts +6 -9
- package/dist/web/components/account/AccountBankPickerPage.d.ts.map +1 -1
- package/dist/web/components/account/AccountBankPickerPage.js +52 -23
- package/dist/web/components/account/AccountBankPickerPage.js.map +1 -1
- package/dist/web/components/account/AccountDeeplinkPage.d.ts +3 -1
- package/dist/web/components/account/AccountDeeplinkPage.d.ts.map +1 -1
- package/dist/web/components/account/AccountDeeplinkPage.js +17 -9
- package/dist/web/components/account/AccountDeeplinkPage.js.map +1 -1
- package/dist/web/components/account/AccountEmailPage.d.ts +2 -1
- package/dist/web/components/account/AccountEmailPage.d.ts.map +1 -1
- package/dist/web/components/account/AccountEmailPage.js +2 -2
- package/dist/web/components/account/AccountEmailPage.js.map +1 -1
- package/dist/web/components/account/AccountEnrollmentPage.d.ts +1 -4
- package/dist/web/components/account/AccountEnrollmentPage.d.ts.map +1 -1
- package/dist/web/components/account/AccountEnrollmentPage.js +270 -236
- package/dist/web/components/account/AccountEnrollmentPage.js.map +1 -1
- package/dist/web/components/account/AccountEnrollmentUpdatePage.d.ts.map +1 -1
- package/dist/web/components/account/AccountEnrollmentUpdatePage.js +2 -1
- package/dist/web/components/account/AccountEnrollmentUpdatePage.js.map +1 -1
- package/dist/web/components/account/AccountFlowProvider.d.ts +8 -1
- package/dist/web/components/account/AccountFlowProvider.d.ts.map +1 -1
- package/dist/web/components/account/AccountFlowProvider.js +38 -3
- package/dist/web/components/account/AccountFlowProvider.js.map +1 -1
- package/dist/web/components/account/AccountInteracConfirmPage.d.ts +4 -3
- package/dist/web/components/account/AccountInteracConfirmPage.d.ts.map +1 -1
- package/dist/web/components/account/AccountInteracConfirmPage.js +15 -23
- package/dist/web/components/account/AccountInteracConfirmPage.js.map +1 -1
- package/dist/web/components/account/AccountOtpCodeEntry.d.ts +2 -1
- package/dist/web/components/account/AccountOtpCodeEntry.d.ts.map +1 -1
- package/dist/web/components/account/AccountOtpCodeEntry.js +25 -6
- package/dist/web/components/account/AccountOtpCodeEntry.js.map +1 -1
- package/dist/web/components/account/AccountOtpPage.d.ts +1 -1
- package/dist/web/components/account/AccountOtpPage.d.ts.map +1 -1
- package/dist/web/components/account/AccountOtpPage.js +4 -2
- package/dist/web/components/account/AccountOtpPage.js.map +1 -1
- package/dist/web/components/account/AccountPaymentPage.d.ts +3 -2
- package/dist/web/components/account/AccountPaymentPage.d.ts.map +1 -1
- package/dist/web/components/account/AccountPaymentPage.js +10 -5
- package/dist/web/components/account/AccountPaymentPage.js.map +1 -1
- package/dist/web/components/account/AccountPaymentResumePage.d.ts +8 -0
- package/dist/web/components/account/AccountPaymentResumePage.d.ts.map +1 -0
- package/dist/web/components/account/AccountPaymentResumePage.js +42 -0
- package/dist/web/components/account/AccountPaymentResumePage.js.map +1 -0
- package/dist/web/components/account/AccountPhoneOtpPage.d.ts +1 -3
- package/dist/web/components/account/AccountPhoneOtpPage.d.ts.map +1 -1
- package/dist/web/components/account/AccountPhoneOtpPage.js +3 -40
- package/dist/web/components/account/AccountPhoneOtpPage.js.map +1 -1
- package/dist/web/components/account/AccountPhonePage.d.ts +1 -2
- package/dist/web/components/account/AccountPhonePage.d.ts.map +1 -1
- package/dist/web/components/account/AccountPhonePage.js +1 -2
- package/dist/web/components/account/AccountPhonePage.js.map +1 -1
- package/dist/web/components/account/AccountRequestToPayPage.d.ts +28 -0
- package/dist/web/components/account/AccountRequestToPayPage.d.ts.map +1 -0
- package/dist/web/components/account/AccountRequestToPayPage.js +79 -0
- package/dist/web/components/account/AccountRequestToPayPage.js.map +1 -0
- package/dist/web/components/account/AccountStatusPage.d.ts +4 -1
- package/dist/web/components/account/AccountStatusPage.d.ts.map +1 -1
- package/dist/web/components/account/AccountStatusPage.js +2 -2
- package/dist/web/components/account/AccountStatusPage.js.map +1 -1
- package/dist/web/components/account/PaginatedEnrollmentForm.d.ts +4 -1
- package/dist/web/components/account/PaginatedEnrollmentForm.d.ts.map +1 -1
- package/dist/web/components/account/PaginatedEnrollmentForm.js +74 -8
- package/dist/web/components/account/PaginatedEnrollmentForm.js.map +1 -1
- package/dist/web/components/account/PaginatedEnrollmentForm.test.d.ts +2 -0
- package/dist/web/components/account/PaginatedEnrollmentForm.test.d.ts.map +1 -0
- package/dist/web/components/account/PaginatedEnrollmentForm.test.js +67 -0
- package/dist/web/components/account/PaginatedEnrollmentForm.test.js.map +1 -0
- package/dist/web/components/account/accountNav.d.ts +19 -9
- package/dist/web/components/account/accountNav.d.ts.map +1 -1
- package/dist/web/components/account/accountNav.js +76 -32
- package/dist/web/components/account/accountNav.js.map +1 -1
- package/dist/web/components/account/accountNav.test.js +180 -15
- package/dist/web/components/account/accountNav.test.js.map +1 -1
- package/dist/web/components/account/accountPaymentCompatibility.d.ts +40 -0
- package/dist/web/components/account/accountPaymentCompatibility.d.ts.map +1 -0
- package/dist/web/components/account/accountPaymentCompatibility.js +319 -0
- package/dist/web/components/account/accountPaymentCompatibility.js.map +1 -0
- package/dist/web/components/account/accountSessionRecreate.d.ts +15 -0
- package/dist/web/components/account/accountSessionRecreate.d.ts.map +1 -0
- package/dist/web/components/account/accountSessionRecreate.js +24 -0
- package/dist/web/components/account/accountSessionRecreate.js.map +1 -0
- package/dist/web/components/account/accountSessionRecreate.test.d.ts +2 -0
- package/dist/web/components/account/accountSessionRecreate.test.d.ts.map +1 -0
- package/dist/web/components/account/accountSessionRecreate.test.js +75 -0
- package/dist/web/components/account/accountSessionRecreate.test.js.map +1 -0
- package/dist/web/components/account/approvalInteractions.test.d.ts +2 -0
- package/dist/web/components/account/approvalInteractions.test.d.ts.map +1 -0
- package/dist/web/components/account/approvalInteractions.test.js +209 -0
- package/dist/web/components/account/approvalInteractions.test.js.map +1 -0
- package/dist/web/components/account/enrollmentProtocol.d.ts +76 -0
- package/dist/web/components/account/enrollmentProtocol.d.ts.map +1 -0
- package/dist/web/components/account/enrollmentProtocol.js +323 -0
- package/dist/web/components/account/enrollmentProtocol.js.map +1 -0
- package/dist/web/components/account/enrollmentProtocol.test.d.ts +2 -0
- package/dist/web/components/account/enrollmentProtocol.test.d.ts.map +1 -0
- package/dist/web/components/account/enrollmentProtocol.test.js +544 -0
- package/dist/web/components/account/enrollmentProtocol.test.js.map +1 -0
- package/dist/web/components/account/fiatPopup.d.ts +7 -2
- package/dist/web/components/account/fiatPopup.d.ts.map +1 -1
- package/dist/web/components/account/fiatPopup.js +16 -6
- package/dist/web/components/account/fiatPopup.js.map +1 -1
- package/dist/web/components/account/fiatPopup.test.js +8 -6
- package/dist/web/components/account/fiatPopup.test.js.map +1 -1
- package/dist/web/components/account/formSchemas.d.ts +6 -6
- package/dist/web/components/account/requestToPay.test.d.ts +2 -0
- package/dist/web/components/account/requestToPay.test.d.ts.map +1 -0
- package/dist/web/components/account/requestToPay.test.js +117 -0
- package/dist/web/components/account/requestToPay.test.js.map +1 -0
- package/dist/web/components/account/walletPayDetails.d.ts +8 -0
- package/dist/web/components/account/walletPayDetails.d.ts.map +1 -0
- package/dist/web/components/account/walletPayDetails.js +46 -0
- package/dist/web/components/account/walletPayDetails.js.map +1 -0
- package/dist/web/components/account/walletPayDetails.test.d.ts +2 -0
- package/dist/web/components/account/walletPayDetails.test.d.ts.map +1 -0
- package/dist/web/components/account/walletPayDetails.test.js +87 -0
- package/dist/web/components/account/walletPayDetails.test.js.map +1 -0
- package/dist/web/components/account/walletPayName.d.ts +8 -0
- package/dist/web/components/account/walletPayName.d.ts.map +1 -0
- package/dist/web/components/account/walletPayName.js +12 -0
- package/dist/web/components/account/walletPayName.js.map +1 -0
- package/dist/web/components/account/walletPayName.test.d.ts +2 -0
- package/dist/web/components/account/walletPayName.test.d.ts.map +1 -0
- package/dist/web/components/account/walletPayName.test.js +15 -0
- package/dist/web/components/account/walletPayName.test.js.map +1 -0
- package/dist/web/components/frameMessages.d.ts +2 -28
- package/dist/web/components/frameMessages.d.ts.map +1 -1
- package/dist/web/components/frameMessages.js +4 -61
- package/dist/web/components/frameMessages.js.map +1 -1
- package/dist/web/components/shared.d.ts.map +1 -1
- package/dist/web/components/shared.js +7 -2
- package/dist/web/components/shared.js.map +1 -1
- package/dist/web/hooks/accountAuthNav.d.ts.map +1 -1
- package/dist/web/hooks/accountAuthNav.js +1 -6
- package/dist/web/hooks/accountAuthNav.js.map +1 -1
- package/dist/web/hooks/accountAuthNav.test.js +9 -15
- package/dist/web/hooks/accountAuthNav.test.js.map +1 -1
- package/dist/web/hooks/formatUserError.d.ts.map +1 -1
- package/dist/web/hooks/formatUserError.js +10 -0
- package/dist/web/hooks/formatUserError.js.map +1 -1
- package/dist/web/hooks/formatUserError.test.d.ts +2 -0
- package/dist/web/hooks/formatUserError.test.d.ts.map +1 -0
- package/dist/web/hooks/formatUserError.test.js +36 -0
- package/dist/web/hooks/formatUserError.test.js.map +1 -0
- package/dist/web/hooks/locales/en.d.ts +8 -2
- package/dist/web/hooks/locales/en.d.ts.map +1 -1
- package/dist/web/hooks/locales/en.js +13 -7
- package/dist/web/hooks/locales/en.js.map +1 -1
- package/dist/web/hooks/locales/es.d.ts.map +1 -1
- package/dist/web/hooks/locales/es.js +13 -7
- package/dist/web/hooks/locales/es.js.map +1 -1
- package/dist/web/hooks/locales/ja.d.ts.map +1 -1
- package/dist/web/hooks/locales/ja.js +13 -7
- package/dist/web/hooks/locales/ja.js.map +1 -1
- package/dist/web/hooks/locales/ko.d.ts.map +1 -1
- package/dist/web/hooks/locales/ko.js +13 -7
- package/dist/web/hooks/locales/ko.js.map +1 -1
- package/dist/web/hooks/locales/pt.d.ts.map +1 -1
- package/dist/web/hooks/locales/pt.js +13 -7
- package/dist/web/hooks/locales/pt.js.map +1 -1
- package/dist/web/hooks/locales/zh.d.ts.map +1 -1
- package/dist/web/hooks/locales/zh.js +13 -7
- package/dist/web/hooks/locales/zh.js.map +1 -1
- package/dist/web/hooks/types.d.ts +16 -8
- package/dist/web/hooks/types.d.ts.map +1 -1
- package/dist/web/hooks/types.js.map +1 -1
- package/dist/web/hooks/useAccountFlow.d.ts +3 -9
- package/dist/web/hooks/useAccountFlow.d.ts.map +1 -1
- package/dist/web/hooks/useAccountFlow.js +0 -12
- package/dist/web/hooks/useAccountFlow.js.map +1 -1
- package/dist/web/hooks/useDepositPoller.js +1 -1
- package/dist/web/hooks/useDepositPoller.js.map +1 -1
- package/dist/web/hooks/useDraftDeposit.d.ts +3 -2
- package/dist/web/hooks/useDraftDeposit.d.ts.map +1 -1
- package/dist/web/hooks/useDraftDeposit.js +12 -5
- package/dist/web/hooks/useDraftDeposit.js.map +1 -1
- package/dist/web/hooks/useRequestToPayDeposit.d.ts +26 -0
- package/dist/web/hooks/useRequestToPayDeposit.d.ts.map +1 -0
- package/dist/web/hooks/useRequestToPayDeposit.js +81 -0
- package/dist/web/hooks/useRequestToPayDeposit.js.map +1 -0
- package/dist/web/hooks/useSessionNav.d.ts +11 -2
- package/dist/web/hooks/useSessionNav.d.ts.map +1 -1
- package/dist/web/hooks/useSessionNav.js +199 -36
- package/dist/web/hooks/useSessionNav.js.map +1 -1
- package/dist/web/index.d.ts +2 -0
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +1 -0
- package/dist/web/index.js.map +1 -1
- package/dist/web/styles.css +1 -1
- package/dist/web/theme.css +1 -1
- package/dist/web/theme.d.ts.map +1 -1
- package/dist/web/theme.js +3 -1
- package/dist/web/theme.js.map +1 -1
- package/package.json +18 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const BANK_LOGO_PATH = "/payment-logos/bank.svg";
|
|
3
|
+
export function isBankLogo(icon) {
|
|
4
|
+
return icon === BANK_LOGO_PATH;
|
|
5
|
+
}
|
|
6
|
+
export function BankLogo({ alt, className, style, }) {
|
|
7
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", "aria-hidden": alt ? undefined : true, "aria-label": alt || undefined, role: alt ? "img" : undefined, className: `${className} daimo-overflow-hidden`, style: style, children: [_jsx("rect", { width: "24", height: "24", fill: "var(--daimo-text)" }), _jsx("g", { transform: "translate(3.36 3.36) scale(0.72)", children: _jsx("path", { d: "M10 18v-7M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949zM14 18v-7M18 18v-7M3 22h18M6 18v-7", stroke: "var(--daimo-surface)", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round" }) })] }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=BankLogo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BankLogo.js","sourceRoot":"","sources":["../../../src/web/components/BankLogo.tsx"],"names":[],"mappings":";AAEA,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAEjD,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,KAAK,cAAc,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,EACvB,GAAG,EACH,SAAS,EACT,KAAK,GAKN;IACC,OAAO,CACL,eACE,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,iBACE,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,gBACvB,GAAG,IAAI,SAAS,EAC5B,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAC7B,SAAS,EAAE,GAAG,SAAS,wBAAwB,EAC/C,KAAK,EAAE,KAAK,aAEZ,eAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,mBAAmB,GAAG,EACxD,YAAG,SAAS,EAAC,kCAAkC,YAC7C,eACE,CAAC,EAAC,iJAAiJ,EACnJ,MAAM,EAAC,sBAAsB,EAC7B,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACA,IACA,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -4,11 +4,12 @@ type ChooseOptionPageProps = {
|
|
|
4
4
|
node: NavNodeChooseOption;
|
|
5
5
|
injectedWallets?: InjectedWallet[];
|
|
6
6
|
connectedAddress?: string | null;
|
|
7
|
+
actionVerb?: string;
|
|
7
8
|
onNavigate: (nodeId: string) => void;
|
|
8
9
|
onBack: (() => void) | null;
|
|
9
10
|
baseUrl: string;
|
|
10
11
|
};
|
|
11
|
-
export declare function ChooseOptionPage({ node, injectedWallets, connectedAddress, onNavigate, onBack, baseUrl, }: ChooseOptionPageProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function ChooseOptionPage({ node, injectedWallets, connectedAddress, actionVerb, onNavigate, onBack, baseUrl, }: ChooseOptionPageProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
/** Get icons array for an option: explicit icons[], single icon, or empty */
|
|
13
14
|
export declare function getOptionIcons(option: NavNode): string[];
|
|
14
15
|
/** Render icons for a list row option */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChooseOptionPage.d.ts","sourceRoot":"","sources":["../../../src/web/components/ChooseOptionPage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"ChooseOptionPage.d.ts","sourceRoot":"","sources":["../../../src/web/components/ChooseOptionPage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAerE,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,MAAM,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,eAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,MAAM,EACN,OAAO,GACR,EAAE,qBAAqB,2CAuFvB;AAqED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAQxD;AAED,yCAAyC;AACzC,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,kDAyCA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { t } from "../hooks/locale.js";
|
|
3
3
|
import { ApplePayLogo, isApplePayLogo } from "./ApplePayLogo.js";
|
|
4
|
+
import { BankLogo, isBankLogo } from "./BankLogo.js";
|
|
4
5
|
import { getKycRequirement } from "./account/kycRequirement.js";
|
|
5
6
|
import { DaimoLogoIcon } from "./icons.js";
|
|
6
7
|
import { ListRow, PageHeader, ScrollContent, resolveIconUrl, useScrollBorder, } from "./shared.js";
|
|
7
|
-
export function ChooseOptionPage({ node, injectedWallets = [], connectedAddress, onNavigate, onBack, baseUrl, }) {
|
|
8
|
+
export function ChooseOptionPage({ node, injectedWallets = [], connectedAddress, actionVerb, onNavigate, onBack, baseUrl, }) {
|
|
8
9
|
const { scrolled, onScroll } = useScrollBorder();
|
|
9
10
|
const allOptions = node.options
|
|
10
11
|
// Replace generic ConnectedWallet icon/label with actual wallet info
|
|
@@ -17,10 +18,9 @@ export function ChooseOptionPage({ node, injectedWallets = [], connectedAddress,
|
|
|
17
18
|
if (walletIcon)
|
|
18
19
|
updated = { ...updated, icon: walletIcon };
|
|
19
20
|
}
|
|
20
|
-
if (connectedAddress) {
|
|
21
|
-
const verb = node.title.split(" ")[0] || "Pay";
|
|
21
|
+
if (connectedAddress && actionVerb) {
|
|
22
22
|
const short = `${connectedAddress.slice(0, 6)}...${connectedAddress.slice(-4)}`;
|
|
23
|
-
updated = { ...updated, label: `${
|
|
23
|
+
updated = { ...updated, label: `${actionVerb} with ${short}` };
|
|
24
24
|
}
|
|
25
25
|
return updated;
|
|
26
26
|
});
|
|
@@ -75,6 +75,9 @@ function OptionIcon({ icon, baseUrl, alt, className, style, }) {
|
|
|
75
75
|
if (isApplePayLogo(icon)) {
|
|
76
76
|
return (_jsx(ApplePayLogo, { baseUrl: baseUrl, alt: alt, className: className, style: style }));
|
|
77
77
|
}
|
|
78
|
+
if (isBankLogo(icon)) {
|
|
79
|
+
return _jsx(BankLogo, { alt: alt, className: className, style: style });
|
|
80
|
+
}
|
|
78
81
|
return (_jsx("img", { src: resolveIconUrl(icon, baseUrl), alt: alt, className: className, style: style }));
|
|
79
82
|
}
|
|
80
83
|
//# sourceMappingURL=ChooseOptionPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChooseOptionPage.js","sourceRoot":"","sources":["../../../src/web/components/ChooseOptionPage.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EACL,OAAO,EACP,UAAU,EACV,aAAa,EACb,cAAc,EACd,eAAe,GAChB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ChooseOptionPage.js","sourceRoot":"","sources":["../../../src/web/components/ChooseOptionPage.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,E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O,CAAC,EAClC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChooseOptionPage.test.d.ts","sourceRoot":"","sources":["../../../src/web/components/ChooseOptionPage.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
import { renderToStaticMarkup } from "react-dom/server";
|
|
3
|
+
import { expect, test } from "vitest";
|
|
4
|
+
import { ChooseOptionPage } from "./ChooseOptionPage.js";
|
|
5
|
+
test("connected wallet uses the session action verb inside a group", () => {
|
|
6
|
+
const node = {
|
|
7
|
+
type: "ChooseOption",
|
|
8
|
+
id: "OtherMethods",
|
|
9
|
+
title: "Other",
|
|
10
|
+
options: [
|
|
11
|
+
{
|
|
12
|
+
type: "ConnectedWallet",
|
|
13
|
+
id: "ConnectedWallet",
|
|
14
|
+
title: "Connected Wallet",
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
};
|
|
18
|
+
const html = renderToStaticMarkup(createElement(ChooseOptionPage, {
|
|
19
|
+
node,
|
|
20
|
+
connectedAddress: "0xE2670000000000000000000000000000000070E9",
|
|
21
|
+
actionVerb: "Deposit",
|
|
22
|
+
onNavigate: () => { },
|
|
23
|
+
onBack: () => { },
|
|
24
|
+
baseUrl: "",
|
|
25
|
+
}));
|
|
26
|
+
expect(html).toContain("Deposit with 0xE267...70E9");
|
|
27
|
+
expect(html).not.toContain("Other with 0xE267...70E9");
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=ChooseOptionPage.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChooseOptionPage.test.js","sourceRoot":"","sources":["../../../src/web/components/ChooseOptionPage.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAItC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,IAAI,CAAC,8DAA8D,EAAE,GAAG,EAAE;IACxE,MAAM,IAAI,GAAwB;QAChC,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,iBAAiB;gBACvB,EAAE,EAAE,iBAAiB;gBACrB,KAAK,EAAE,kBAAkB;aAC1B;SACF;KACF,CAAC;IAEF,MAAM,IAAI,GAAG,oBAAoB,CAC/B,aAAa,CAAC,gBAAgB,EAAE;QAC9B,IAAI;QACJ,gBAAgB,EAAE,4CAA4C;QAC9D,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;QACpB,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;QAChB,OAAO,EAAE,EAAE;KACZ,CAAC,CACH,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;IACrD,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAAC;AACzD,CAAC,CAAC,CAAC"}
|
|
@@ -3,9 +3,12 @@ export declare function useCountdown(expiresAt: number, defaultS: number): {
|
|
|
3
3
|
remainingS: number;
|
|
4
4
|
isExpired: boolean;
|
|
5
5
|
};
|
|
6
|
+
/** Derive remaining time from the absolute wall clock; never extend expiry. */
|
|
7
|
+
export declare function getRemainingSeconds(expiresAt: number, nowMs?: number): number;
|
|
6
8
|
export declare function Countdown({ remainingS, isExpired, totalS, }: {
|
|
7
9
|
remainingS: number;
|
|
8
10
|
isExpired: boolean;
|
|
9
|
-
|
|
11
|
+
/** Omit when the server did not provide the request's total lifetime. */
|
|
12
|
+
totalS?: number;
|
|
10
13
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
14
|
//# sourceMappingURL=Countdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Countdown.d.ts","sourceRoot":"","sources":["../../../src/web/components/Countdown.tsx"],"names":[],"mappings":"AAGA,iEAAiE;AACjE,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;
|
|
1
|
+
{"version":3,"file":"Countdown.d.ts","sourceRoot":"","sources":["../../../src/web/components/Countdown.tsx"],"names":[],"mappings":"AAGA,iEAAiE;AACjE,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;EAmB/D;AAED,+EAA+E;AAC/E,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,KAAK,SAAa,GACjB,MAAM,CAER;AAcD,wBAAgB,SAAS,CAAC,EACxB,UAAU,EACV,SAAS,EACT,MAAM,GACP,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,2CA0BA"}
|
|
@@ -4,25 +4,39 @@ import { t } from "../hooks/locale.js";
|
|
|
4
4
|
/** Countdown hook — ticks every second once expiresAt is set. */
|
|
5
5
|
export function useCountdown(expiresAt, defaultS) {
|
|
6
6
|
const hasExpiry = expiresAt > 0;
|
|
7
|
-
const [remainingS, setRemainingS] = useState(() => hasExpiry
|
|
8
|
-
? Math.max(0, Math.floor(expiresAt - Date.now() / 1000))
|
|
9
|
-
: defaultS);
|
|
7
|
+
const [remainingS, setRemainingS] = useState(() => hasExpiry ? getRemainingSeconds(expiresAt) : defaultS);
|
|
10
8
|
useEffect(() => {
|
|
11
9
|
if (!hasExpiry)
|
|
12
10
|
return;
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const update = () => setRemainingS(getRemainingSeconds(expiresAt));
|
|
12
|
+
update();
|
|
13
|
+
const interval = setInterval(update, 1000);
|
|
14
|
+
document.addEventListener("visibilitychange", update);
|
|
15
|
+
return () => {
|
|
16
|
+
clearInterval(interval);
|
|
17
|
+
document.removeEventListener("visibilitychange", update);
|
|
18
|
+
};
|
|
17
19
|
}, [expiresAt, hasExpiry]);
|
|
18
20
|
return { remainingS, isExpired: hasExpiry && remainingS === 0 };
|
|
19
21
|
}
|
|
20
|
-
|
|
22
|
+
/** Derive remaining time from the absolute wall clock; never extend expiry. */
|
|
23
|
+
export function getRemainingSeconds(expiresAt, nowMs = Date.now()) {
|
|
24
|
+
return Math.max(0, Math.floor(expiresAt - nowMs / 1000));
|
|
25
|
+
}
|
|
26
|
+
/** Above this remaining time, show whole minutes instead of mm:ss. */
|
|
27
|
+
const SHOW_SECONDS_BELOW_S = 5 * 60;
|
|
28
|
+
function formatRemaining(remainingS) {
|
|
29
|
+
if (remainingS > SHOW_SECONDS_BELOW_S) {
|
|
30
|
+
return t.minutes(Math.floor(remainingS / 60));
|
|
31
|
+
}
|
|
21
32
|
const m = `${Math.floor(remainingS / 60)}`.padStart(2, "0");
|
|
22
33
|
const s = `${remainingS % 60}`.padStart(2, "0");
|
|
23
|
-
return
|
|
34
|
+
return `${m}:${s}`;
|
|
35
|
+
}
|
|
36
|
+
export function Countdown({ remainingS, isExpired, totalS, }) {
|
|
37
|
+
return (_jsxs("div", { className: "daimo-flex daimo-flex-col daimo-items-center daimo-gap-1", role: "status", "aria-live": "polite", "aria-atomic": "true", children: [_jsx("span", { className: "daimo-text-sm daimo-text-[var(--daimo-text)]", children: isExpired ? t.expired : t.expiresIn }), _jsxs("div", { className: "daimo-flex daimo-items-center daimo-gap-2", children: [totalS != null && (_jsx(CircleTimer, { remainingS: remainingS, totalS: totalS })), _jsx("span", { className: "daimo-font-semibold daimo-tabular-nums", style: {
|
|
24
38
|
color: isExpired ? "var(--daimo-error)" : "var(--daimo-text)",
|
|
25
|
-
}, children: isExpired ? t.expired :
|
|
39
|
+
}, children: isExpired ? t.expired : formatRemaining(remainingS) })] })] }));
|
|
26
40
|
}
|
|
27
41
|
function CircleTimer({ remainingS, totalS, }) {
|
|
28
42
|
const size = 18;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Countdown.js","sourceRoot":"","sources":["../../../src/web/components/Countdown.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC,iEAAiE;AACjE,MAAM,UAAU,YAAY,CAAC,SAAiB,EAAE,QAAgB;IAC9D,MAAM,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAChD,SAAS
|
|
1
|
+
{"version":3,"file":"Countdown.js","sourceRoot":"","sources":["../../../src/web/components/Countdown.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC,iEAAiE;AACjE,MAAM,UAAU,YAAY,CAAC,SAAiB,EAAE,QAAgB;IAC9D,MAAM,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAChD,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CACtD,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,SAAS;YAAE,OAAO;QACvB,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,aAAa,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,C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AAE,IAAI,GAAG,CAAC,EACZ,EAAE,EAAE,IAAI,GAAG,CAAC,EACZ,CAAC,EAAE,MAAM,EACT,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,0BAA0B,EACjC,WAAW,EAAE,WAAW,GACxB,EACF,iBACE,EAAE,EAAE,IAAI,GAAG,CAAC,EACZ,EAAE,EAAE,IAAI,GAAG,CAAC,EACZ,CAAC,EAAE,MAAM,EACT,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,oBAAoB,EACtE,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,aAAa,EAC9B,gBAAgB,EAAE,MAAM,EACxB,aAAa,EAAC,OAAO,GACrB,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Countdown.test.d.ts","sourceRoot":"","sources":["../../../src/web/components/Countdown.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { describe, expect, test, vi } from "vitest";
|
|
2
|
+
import { getRemainingSeconds } from "./Countdown.js";
|
|
3
|
+
describe("absolute countdown", () => {
|
|
4
|
+
test("uses wall-clock time after background and resume", () => {
|
|
5
|
+
vi.setSystemTime(new Date("2026-07-15T12:00:00Z"));
|
|
6
|
+
const expiresAt = Date.now() / 1000 + 120;
|
|
7
|
+
expect(getRemainingSeconds(expiresAt)).toBe(120);
|
|
8
|
+
vi.setSystemTime(new Date("2026-07-15T12:01:30Z"));
|
|
9
|
+
expect(getRemainingSeconds(expiresAt)).toBe(30);
|
|
10
|
+
vi.useRealTimers();
|
|
11
|
+
});
|
|
12
|
+
test("renders a past expiry immediately", () => {
|
|
13
|
+
expect(getRemainingSeconds(100, 101_000)).toBe(0);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=Countdown.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Countdown.test.js","sourceRoot":"","sources":["../../../src/web/components/Countdown.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAI,CAAC,kDAAkD,EAAE,GAAG,EAAE;QAC5D,EAAE,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC;QACnD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,GAAG,CAAC;QAC1C,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEjD,EAAE,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC;QACnD,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChD,EAAE,CAAC,aAAa,EAAE,CAAC;IACrB,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC7C,MAAM,CAAC,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -32,8 +32,9 @@ export type DaimoFrameProps = DaimoModalEventHandlers & {
|
|
|
32
32
|
* `DaimoFrame` loads `/webview` in content-only (`embed`) mode and sizes the
|
|
33
33
|
* iframe to the height the content reports over `postMessage`. No wallet
|
|
34
34
|
* libraries or app providers required. The surface stays hidden until the
|
|
35
|
-
* flow
|
|
36
|
-
* {@link LOAD_TIMEOUT_MS}, a dismissable error card
|
|
35
|
+
* flow reports both `ready` (theme resolved) and a positive content height;
|
|
36
|
+
* if nothing loads within {@link LOAD_TIMEOUT_MS}, a dismissable error card
|
|
37
|
+
* is shown instead.
|
|
37
38
|
*
|
|
38
39
|
* With `layout="modal"` (default) the iframe renders inside a fixed, dimmed
|
|
39
40
|
* scrim portaled to `document.body`. With `layout="embed"` it renders inline
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DaimoFrame.d.ts","sourceRoot":"","sources":["../../../src/web/components/DaimoFrame.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DaimoFrame.d.ts","sourceRoot":"","sources":["../../../src/web/components/DaimoFrame.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAgGjE;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,uBAAuB,GAAG;IACtD,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,YAAY,EACZ,MAAgB,EAChB,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,kBAAkB,EAClB,OAAwB,GACzB,EAAE,eAAe,kDAgJjB"}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useMemo, useRef, useState, } from "react";
|
|
4
4
|
import { createPortal } from "react-dom";
|
|
5
|
+
import { DAIMO_BASE_URL } from "../../common/constants.js";
|
|
6
|
+
import { applyFrameHeight, applyFrameReady, createFrameReadiness, markFrameError, } from "../../common/frameReadiness.js";
|
|
5
7
|
import { DAIMO_FRAME_PARENT_ORIGIN_PARAM, parseDaimoFrameMessage, } from "./frameMessages.js";
|
|
6
8
|
import { CloseIcon } from "./icons.js";
|
|
7
9
|
import { ContactSupportButton, ErrorMessage } from "./shared.js";
|
|
8
|
-
const DEFAULT_BASE_URL = "https://daimo.com";
|
|
9
10
|
const INITIAL_HEIGHT = 420;
|
|
10
11
|
/** Show the error fallback if the iframe hasn't rendered content within this. */
|
|
11
12
|
const LOAD_TIMEOUT_MS = 15000;
|
|
@@ -92,8 +93,9 @@ const closeButtonStyle = {
|
|
|
92
93
|
* `DaimoFrame` loads `/webview` in content-only (`embed`) mode and sizes the
|
|
93
94
|
* iframe to the height the content reports over `postMessage`. No wallet
|
|
94
95
|
* libraries or app providers required. The surface stays hidden until the
|
|
95
|
-
* flow
|
|
96
|
-
* {@link LOAD_TIMEOUT_MS}, a dismissable error card
|
|
96
|
+
* flow reports both `ready` (theme resolved) and a positive content height;
|
|
97
|
+
* if nothing loads within {@link LOAD_TIMEOUT_MS}, a dismissable error card
|
|
98
|
+
* is shown instead.
|
|
97
99
|
*
|
|
98
100
|
* With `layout="modal"` (default) the iframe renders inside a fixed, dimmed
|
|
99
101
|
* scrim portaled to `document.body`. With `layout="embed"` it renders inline
|
|
@@ -118,15 +120,14 @@ const closeButtonStyle = {
|
|
|
118
120
|
* />
|
|
119
121
|
* ```
|
|
120
122
|
*/
|
|
121
|
-
export function DaimoFrame({ sessionId, clientSecret, layout = "modal", onClose, onOpen, onPaymentStarted, onPaymentCompleted, baseUrl =
|
|
123
|
+
export function DaimoFrame({ sessionId, clientSecret, layout = "modal", onClose, onOpen, onPaymentStarted, onPaymentCompleted, baseUrl = DAIMO_BASE_URL, }) {
|
|
122
124
|
const [parentOrigin, setParentOrigin] = useState(null);
|
|
123
125
|
const src = useMemo(() => parentOrigin
|
|
124
126
|
? getFrameSrc(baseUrl, sessionId, clientSecret, parentOrigin)
|
|
125
127
|
: null, [baseUrl, clientSecret, parentOrigin, sessionId]);
|
|
126
128
|
const iframeRef = useRef(null);
|
|
127
|
-
const [height, setHeight] = useState(INITIAL_HEIGHT);
|
|
128
129
|
const [mounted, setMounted] = useState(false);
|
|
129
|
-
const [
|
|
130
|
+
const [readiness, setReadiness] = useState(() => createFrameReadiness(INITIAL_HEIGHT));
|
|
130
131
|
// Height animates only after the surface's first appearance, so revealing it
|
|
131
132
|
// doesn't animate from INITIAL_HEIGHT down to the first measured (skeleton)
|
|
132
133
|
// height. Only later growth (skeleton -> content) animates.
|
|
@@ -136,6 +137,11 @@ export function DaimoFrame({ sessionId, clientSecret, layout = "modal", onClose,
|
|
|
136
137
|
setMounted(true);
|
|
137
138
|
setParentOrigin(window.location.origin);
|
|
138
139
|
}, []);
|
|
140
|
+
// New session / frame URL: hide again until the next ready + height pair.
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
setReadiness(createFrameReadiness(INITIAL_HEIGHT));
|
|
143
|
+
setAnimateHeight(false);
|
|
144
|
+
}, [src]);
|
|
139
145
|
useEffect(() => {
|
|
140
146
|
if (!src)
|
|
141
147
|
return;
|
|
@@ -150,39 +156,51 @@ export function DaimoFrame({ sessionId, clientSecret, layout = "modal", onClose,
|
|
|
150
156
|
const message = parseDaimoFrameMessage(event.data);
|
|
151
157
|
if (!message)
|
|
152
158
|
return;
|
|
153
|
-
if (message.type === "
|
|
159
|
+
if (message.type === "ready") {
|
|
160
|
+
setReadiness((s) => applyFrameReady(s));
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (message.type === "modalOpened") {
|
|
154
164
|
onOpen?.();
|
|
155
|
-
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (message.type === "modalClosed") {
|
|
156
168
|
onClose?.();
|
|
157
|
-
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (message.type === "paymentStarted") {
|
|
158
172
|
onPaymentStarted?.();
|
|
159
|
-
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (message.type === "paymentCompleted") {
|
|
160
176
|
onPaymentCompleted?.();
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
161
179
|
if (message.type === "contentHeightChanged") {
|
|
162
|
-
|
|
163
|
-
setStatus("loaded");
|
|
180
|
+
setReadiness((s) => applyFrameHeight(s, message.payload.height));
|
|
164
181
|
}
|
|
165
182
|
};
|
|
166
183
|
window.addEventListener("message", handleMessage);
|
|
167
184
|
return () => window.removeEventListener("message", handleMessage);
|
|
168
185
|
}, [onClose, onOpen, onPaymentCompleted, onPaymentStarted, src]);
|
|
169
|
-
// Fall back to the error card if the flow never
|
|
186
|
+
// Fall back to the error card if the flow never becomes revealable.
|
|
170
187
|
useEffect(() => {
|
|
171
|
-
if (status !== "loading")
|
|
188
|
+
if (readiness.status !== "loading")
|
|
172
189
|
return;
|
|
173
|
-
const id = setTimeout(() =>
|
|
190
|
+
const id = setTimeout(() => setReadiness((s) => markFrameError(s)), LOAD_TIMEOUT_MS);
|
|
174
191
|
return () => clearTimeout(id);
|
|
175
|
-
}, [status]);
|
|
192
|
+
}, [readiness.status, src]);
|
|
176
193
|
// Enable the height transition one frame after the surface first appears, so
|
|
177
194
|
// its reveal snaps to the first height instead of animating down to it.
|
|
178
195
|
useEffect(() => {
|
|
179
|
-
if (status !== "loaded" || animateHeight)
|
|
196
|
+
if (readiness.status !== "loaded" || animateHeight)
|
|
180
197
|
return;
|
|
181
198
|
const id = requestAnimationFrame(() => setAnimateHeight(true));
|
|
182
199
|
return () => cancelAnimationFrame(id);
|
|
183
|
-
}, [status, animateHeight]);
|
|
200
|
+
}, [readiness.status, animateHeight]);
|
|
184
201
|
if (!mounted || !src)
|
|
185
202
|
return null;
|
|
203
|
+
const { height, status } = readiness;
|
|
186
204
|
const surfaceTransition = animateHeight
|
|
187
205
|
? "height 0.2s ease-in-out, opacity 0.2s ease-in-out"
|
|
188
206
|
: "opacity 0.2s ease-in-out";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DaimoFrame.js","sourceRoot":"","sources":["../../../src/web/components/DaimoFrame.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAEL,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"DaimoFrame.js","sourceRoot":"","sources":["../../../src/web/components/DaimoFrame.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAEL,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,cAAc,GACf,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEjE,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,iFAAiF;AACjF,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B,8EAA8E;AAC9E,0EAA0E;AAC1E,iFAAiF;AACjF,MAAM,SAAS,GAAG,OAAgB,CAAC;AACnC,MAAM,YAAY,GAAG,UAAmB,CAAC;AACzC,MAAM,YAAY,GAAG,UAAmB,CAAC;AAEzC,8EAA8E;AAC9E,wEAAwE;AACxE,2EAA2E;AAC3E,MAAM,UAAU,GAAkB;IAChC,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,GAA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AQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACpC,UAAU,EAAE,iBAAiB;aAC9B,YAEA,MAAM,GACH,CACP,GACG,EACN,QAAQ,CAAC,IAAI,CACd,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAClB,OAAe,EACf,SAAiB,EACjB,YAAoB,EACpB,YAAoB;IAEpB,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;QACjC,OAAO,EAAE,SAAS;QAClB,EAAE,EAAE,YAAY;QAChB,MAAM,EAAE,OAAO;QACf,CAAC,+BAA+B,CAAC,EAAE,YAAY;KAChD,CAAC,CAAC;IACH,OAAO,GAAG,IAAI,YAAY,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;AAChD,CAAC;AAED,2EAA2E;AAC3E,SAAS,eAAe,CAAC,EACvB,SAAS,EACT,OAAO,GAIR;IACC,OAAO,CACL,eAAK,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,cAAc,aAC7D,iBACE,IAAI,EAAC,QAAQ,gBACF,OAAO,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,EAC1B,KAAK,EAAE,gBAAgB,YAEvB,KAAC,SAAS,KAAG,GACN,EACT,KAAC,YAAY,IAAC,OAAO,EAAC,yBAAyB,GAAG,EAClD,KAAC,oBAAoB,IACnB,OAAO,EAAC,qBAAqB,EAC7B,IAAI,EAAE,EAAE,SAAS,EAAE,GACnB,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
|
+
import type { DaimoCountryCode } from "../api/index.js";
|
|
2
3
|
import { type DaimoModalEventHandlers } from "../hooks/types.js";
|
|
3
4
|
import type { DaimoThemeMode } from "../../common/theme.js";
|
|
4
5
|
import { type DaimoPlatform } from "../platform.js";
|
|
5
|
-
export type
|
|
6
|
+
export type DaimoModalLocalizationProps = {
|
|
7
|
+
/** Override country used to localize auto payment-method sessions. */
|
|
8
|
+
countryCode?: DaimoCountryCode;
|
|
9
|
+
/** Called after the modal country picker successfully switches country. */
|
|
10
|
+
onCountryCodeChange?: (countryCode: DaimoCountryCode) => void;
|
|
11
|
+
};
|
|
12
|
+
type DaimoModalBaseProps = {
|
|
6
13
|
/** Unique session ID. Sessions are created server-side. */
|
|
7
14
|
sessionId: string;
|
|
8
15
|
/** Unique client secret, returned at session creation. */
|
|
@@ -15,6 +22,12 @@ export type DaimoModalProps = DaimoModalEventHandlers & {
|
|
|
15
22
|
connectToAddress?: Address;
|
|
16
23
|
/** Render inline instead of as a floating modal. */
|
|
17
24
|
embedded?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Show the close button even when `embedded`. Set only by the native webview
|
|
27
|
+
* surface (DaimoFrameRN), which has no chrome of its own and needs the flow's
|
|
28
|
+
* own close button. Web embedders own their chrome, so this stays off there.
|
|
29
|
+
*/
|
|
30
|
+
embeddedClose?: boolean;
|
|
18
31
|
/** Override the session's light/dark/system theme mode. */
|
|
19
32
|
themeMode?: DaimoThemeMode;
|
|
20
33
|
/** Caller's platform. Prefer "desktop" or "mobile"; legacy values still work. Auto-detected. */
|
|
@@ -31,5 +44,7 @@ export type DaimoModalProps = DaimoModalEventHandlers & {
|
|
|
31
44
|
/** Node to auto-navigate to on load (popup deep-link). */
|
|
32
45
|
startNodeId?: string;
|
|
33
46
|
};
|
|
47
|
+
export type DaimoModalProps = DaimoModalEventHandlers & DaimoModalLocalizationProps & DaimoModalBaseProps;
|
|
34
48
|
export declare function DaimoModal(props: DaimoModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
49
|
+
export {};
|
|
35
50
|
//# sourceMappingURL=DaimoModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DaimoModal.d.ts","sourceRoot":"","sources":["../../../src/web/components/DaimoModal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"DaimoModal.d.ts","sourceRoot":"","sources":["../../../src/web/components/DaimoModal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC,OAAO,KAAK,EAEV,gBAAgB,EAIjB,MAAM,iBAAiB,CAAC;AAmBzB,OAAO,EAIL,KAAK,uBAAuB,EAE7B,MAAM,mBAAmB,CAAC;AAa3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAA6B,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAqD/E,MAAM,MAAM,2BAA2B,GAAG;IACxC,sEAAsE;IACtE,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,2EAA2E;IAC3E,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC/D,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,YAAY,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oEAAoE;IACpE,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,gGAAgG;IAChG,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;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