@daimo/sdk 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/components/ChooseOptionPage.d.ts.map +1 -1
- package/dist/web/components/ChooseOptionPage.js +2 -2
- package/dist/web/components/ChooseOptionPage.js.map +1 -1
- package/dist/web/components/DaimoModal.d.ts.map +1 -1
- package/dist/web/components/DaimoModal.js +2 -2
- package/dist/web/components/DaimoModal.js.map +1 -1
- package/dist/web/components/WalletAmountPage.d.ts.map +1 -1
- package/dist/web/components/WalletAmountPage.js +9 -4
- package/dist/web/components/WalletAmountPage.js.map +1 -1
- package/dist/web/components/modalContext.d.ts +4 -0
- package/dist/web/components/modalContext.d.ts.map +1 -0
- package/dist/web/components/modalContext.js +5 -0
- package/dist/web/components/modalContext.js.map +1 -0
- package/dist/web/hooks/types.d.ts +2 -0
- package/dist/web/hooks/types.d.ts.map +1 -1
- package/dist/web/hooks/types.js +13 -0
- package/dist/web/hooks/types.js.map +1 -1
- package/dist/web/index.d.ts +1 -1
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +1 -1
- package/dist/web/index.js.map +1 -1
- package/dist/web/styles.css +1 -1
- package/package.json +1 -1
- package/dist/common/legacy/assert.d.ts +0 -6
- package/dist/common/legacy/assert.d.ts.map +0 -1
- package/dist/common/legacy/assert.js +0 -25
- package/dist/common/legacy/assert.js.map +0 -1
- package/dist/common/legacy/client.d.ts +0 -67
- package/dist/common/legacy/client.d.ts.map +0 -1
- package/dist/common/legacy/client.js +0 -55
- package/dist/common/legacy/client.js.map +0 -1
- package/dist/common/legacy/debug.d.ts +0 -5
- package/dist/common/legacy/debug.d.ts.map +0 -1
- package/dist/common/legacy/debug.js +0 -21
- package/dist/common/legacy/debug.js.map +0 -1
- package/dist/common/legacy/format.d.ts +0 -16
- package/dist/common/legacy/format.d.ts.map +0 -1
- package/dist/common/legacy/format.js +0 -34
- package/dist/common/legacy/format.js.map +0 -1
- package/dist/common/legacy/index.d.ts +0 -11
- package/dist/common/legacy/index.d.ts.map +0 -1
- package/dist/common/legacy/index.js +0 -11
- package/dist/common/legacy/index.js.map +0 -1
- package/dist/common/legacy/primitiveTypes.d.ts +0 -11
- package/dist/common/legacy/primitiveTypes.d.ts.map +0 -1
- package/dist/common/legacy/primitiveTypes.js +0 -14
- package/dist/common/legacy/primitiveTypes.js.map +0 -1
- package/dist/common/legacy/session.d.ts +0 -246
- package/dist/common/legacy/session.d.ts.map +0 -1
- package/dist/common/legacy/session.js +0 -124
- package/dist/common/legacy/session.js.map +0 -1
- package/dist/common/legacy/try.d.ts +0 -4
- package/dist/common/legacy/try.d.ts.map +0 -1
- package/dist/common/legacy/try.js +0 -26
- package/dist/common/legacy/try.js.map +0 -1
- package/dist/hooks/DaimoClientContext.d.ts +0 -7
- package/dist/hooks/DaimoClientContext.d.ts.map +0 -1
- package/dist/hooks/DaimoClientContext.js +0 -15
- package/dist/hooks/DaimoClientContext.js.map +0 -1
- package/dist/hooks/formatUserError.d.ts +0 -3
- package/dist/hooks/formatUserError.d.ts.map +0 -1
- package/dist/hooks/formatUserError.js +0 -30
- package/dist/hooks/formatUserError.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -12
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -9
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/locale.d.ts +0 -7
- package/dist/hooks/locale.d.ts.map +0 -1
- package/dist/hooks/locale.js +0 -15
- package/dist/hooks/locale.js.map +0 -1
- package/dist/hooks/locales/en.d.ts +0 -60
- package/dist/hooks/locales/en.d.ts.map +0 -1
- package/dist/hooks/locales/en.js +0 -76
- package/dist/hooks/locales/en.js.map +0 -1
- package/dist/hooks/locales/es.d.ts +0 -4
- package/dist/hooks/locales/es.d.ts.map +0 -1
- package/dist/hooks/locales/es.js +0 -60
- package/dist/hooks/locales/es.js.map +0 -1
- package/dist/hooks/navEvent.d.ts +0 -60
- package/dist/hooks/navEvent.d.ts.map +0 -1
- package/dist/hooks/navEvent.js +0 -16
- package/dist/hooks/navEvent.js.map +0 -1
- package/dist/hooks/types.d.ts +0 -71
- package/dist/hooks/types.d.ts.map +0 -1
- package/dist/hooks/types.js +0 -14
- package/dist/hooks/types.js.map +0 -1
- package/dist/hooks/usePaymentCallbacks.d.ts +0 -15
- package/dist/hooks/usePaymentCallbacks.d.ts.map +0 -1
- package/dist/hooks/usePaymentCallbacks.js +0 -27
- package/dist/hooks/usePaymentCallbacks.js.map +0 -1
- package/dist/hooks/useSessionNav.d.ts +0 -31
- package/dist/hooks/useSessionNav.d.ts.map +0 -1
- package/dist/hooks/useSessionNav.js +0 -439
- package/dist/hooks/useSessionNav.js.map +0 -1
- package/dist/hooks/useSessionPolling.d.ts +0 -10
- package/dist/hooks/useSessionPolling.d.ts.map +0 -1
- package/dist/hooks/useSessionPolling.js +0 -61
- package/dist/hooks/useSessionPolling.js.map +0 -1
- package/dist/web/ChooseOptionPage.d.ts +0 -9
- package/dist/web/ChooseOptionPage.d.ts.map +0 -1
- package/dist/web/ChooseOptionPage.js +0 -51
- package/dist/web/ChooseOptionPage.js.map +0 -1
- package/dist/web/ConfirmationPage.d.ts +0 -32
- package/dist/web/ConfirmationPage.d.ts.map +0 -1
- package/dist/web/ConfirmationPage.js +0 -72
- package/dist/web/ConfirmationPage.js.map +0 -1
- package/dist/web/ConfirmationSpinner.d.ts +0 -7
- package/dist/web/ConfirmationSpinner.d.ts.map +0 -1
- package/dist/web/ConfirmationSpinner.js +0 -20
- package/dist/web/ConfirmationSpinner.js.map +0 -1
- package/dist/web/DaimoModal.d.ts +0 -15
- package/dist/web/DaimoModal.d.ts.map +0 -1
- package/dist/web/DaimoModal.js +0 -283
- package/dist/web/DaimoModal.js.map +0 -1
- package/dist/web/DeeplinkPage.d.ts +0 -8
- package/dist/web/DeeplinkPage.d.ts.map +0 -1
- package/dist/web/DeeplinkPage.js +0 -13
- package/dist/web/DeeplinkPage.js.map +0 -1
- package/dist/web/ErrorPage.d.ts +0 -28
- package/dist/web/ErrorPage.d.ts.map +0 -1
- package/dist/web/ErrorPage.js +0 -47
- package/dist/web/ErrorPage.js.map +0 -1
- package/dist/web/ExchangePage.d.ts +0 -11
- package/dist/web/ExchangePage.d.ts.map +0 -1
- package/dist/web/ExchangePage.js +0 -13
- package/dist/web/ExchangePage.js.map +0 -1
- package/dist/web/ExpiredPage.d.ts +0 -9
- package/dist/web/ExpiredPage.d.ts.map +0 -1
- package/dist/web/ExpiredPage.js +0 -12
- package/dist/web/ExpiredPage.js.map +0 -1
- package/dist/web/ModalSkeleton.d.ts +0 -7
- package/dist/web/ModalSkeleton.d.ts.map +0 -1
- package/dist/web/ModalSkeleton.js +0 -13
- package/dist/web/ModalSkeleton.js.map +0 -1
- package/dist/web/ProgressDots.d.ts +0 -16
- package/dist/web/ProgressDots.d.ts.map +0 -1
- package/dist/web/ProgressDots.js +0 -55
- package/dist/web/ProgressDots.js.map +0 -1
- package/dist/web/QRCode.d.ts +0 -7
- package/dist/web/QRCode.d.ts.map +0 -1
- package/dist/web/QRCode.js +0 -69
- package/dist/web/QRCode.js.map +0 -1
- package/dist/web/SelectAmountPage.d.ts +0 -21
- package/dist/web/SelectAmountPage.d.ts.map +0 -1
- package/dist/web/SelectAmountPage.js +0 -27
- package/dist/web/SelectAmountPage.js.map +0 -1
- package/dist/web/SelectTokenPage.d.ts +0 -14
- package/dist/web/SelectTokenPage.d.ts.map +0 -1
- package/dist/web/SelectTokenPage.js +0 -71
- package/dist/web/SelectTokenPage.js.map +0 -1
- package/dist/web/WaitingDepositAddressPage.d.ts +0 -14
- package/dist/web/WaitingDepositAddressPage.d.ts.map +0 -1
- package/dist/web/WaitingDepositAddressPage.js +0 -126
- package/dist/web/WaitingDepositAddressPage.js.map +0 -1
- package/dist/web/WalletAmountPage.d.ts +0 -10
- package/dist/web/WalletAmountPage.d.ts.map +0 -1
- package/dist/web/WalletAmountPage.js +0 -158
- package/dist/web/WalletAmountPage.js.map +0 -1
- package/dist/web/buttons.d.ts +0 -15
- package/dist/web/buttons.d.ts.map +0 -1
- package/dist/web/buttons.js +0 -24
- package/dist/web/buttons.js.map +0 -1
- package/dist/web/containers.d.ts +0 -19
- package/dist/web/containers.d.ts.map +0 -1
- package/dist/web/containers.js +0 -77
- package/dist/web/containers.js.map +0 -1
- package/dist/web/icons.d.ts +0 -22
- package/dist/web/icons.d.ts.map +0 -1
- package/dist/web/icons.js +0 -33
- package/dist/web/icons.js.map +0 -1
- package/dist/web/shared.d.ts +0 -93
- package/dist/web/shared.d.ts.map +0 -1
- package/dist/web/shared.js +0 -202
- package/dist/web/shared.js.map +0 -1
- package/dist/web/useCopyToClipboard.d.ts +0 -6
- package/dist/web/useCopyToClipboard.d.ts.map +0 -1
- package/dist/web/useCopyToClipboard.js +0 -20
- package/dist/web/useCopyToClipboard.js.map +0 -1
- package/dist/web/useWalletFlow.d.ts +0 -23
- package/dist/web/useWalletFlow.d.ts.map +0 -1
- package/dist/web/useWalletFlow.js +0 -334
- package/dist/web/useWalletFlow.js.map +0 -1
- package/dist/web/walletProvider.d.ts +0 -34
- package/dist/web/walletProvider.d.ts.map +0 -1
- package/dist/web/walletProvider.js +0 -14
- package/dist/web/walletProvider.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"try.js","sourceRoot":"","sources":["../../../src/common/legacy/try.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,CAAC,KAAK,UAAU,WAAW,CAAI,EAAoB;IACvD,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,SAAS,CAAI,EAAW;IACtC,IAAI,CAAC;QACH,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAI,EAAoB;IACtD,IAAI,CAAC;QACH,OAAO,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,OAAO,WAAW,CAAC,GAAG,CAAC;IACzB,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type DaimoClient } from "../common/legacy/client.js";
|
|
2
|
-
export declare function DaimoSDKProvider({ apiUrl, children, }: {
|
|
3
|
-
apiUrl?: string;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare function useDaimoClient(): DaimoClient;
|
|
7
|
-
//# sourceMappingURL=DaimoClientContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DaimoClientContext.d.ts","sourceRoot":"","sources":["../../src/hooks/DaimoClientContext.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIjF,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,QAAQ,GACT,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAUA;AAED,wBAAgB,cAAc,IAAI,WAAW,CAI5C"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext, useMemo } from "react";
|
|
3
|
-
import { createDaimoClient } from "../common/legacy/client.js";
|
|
4
|
-
const DaimoClientContext = createContext(null);
|
|
5
|
-
export function DaimoSDKProvider({ apiUrl, children, }) {
|
|
6
|
-
const client = useMemo(() => createDaimoClient(apiUrl ?? "https://pay-api.daimo.xyz"), [apiUrl]);
|
|
7
|
-
return (_jsx(DaimoClientContext.Provider, { value: client, children: children }));
|
|
8
|
-
}
|
|
9
|
-
export function useDaimoClient() {
|
|
10
|
-
const client = useContext(DaimoClientContext);
|
|
11
|
-
if (!client)
|
|
12
|
-
throw new Error("wrap your app in <DaimoSDKProvider>");
|
|
13
|
-
return client;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=DaimoClientContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DaimoClientContext.js","sourceRoot":"","sources":["../../src/hooks/DaimoClientContext.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAoB,MAAM,4BAA4B,CAAC;AAEjF,MAAM,kBAAkB,GAAG,aAAa,CAAqB,IAAI,CAAC,CAAC;AAEnE,MAAM,UAAU,gBAAgB,CAAC,EAC/B,MAAM,EACN,QAAQ,GAIT;IACC,MAAM,MAAM,GAAG,OAAO,CACpB,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,IAAI,2BAA2B,CAAC,EAC9D,CAAC,MAAM,CAAC,CACT,CAAC;IACF,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,YACvC,QAAQ,GACmB,CAC/B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,MAAM,MAAM,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAC9C,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACpE,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatUserError.d.ts","sourceRoot":"","sources":["../../src/hooks/formatUserError.ts"],"names":[],"mappings":"AASA,qDAAqD;AACrD,wBAAgB,eAAe,CAC7B,GAAG,EAAE,OAAO,EACZ,QAAQ,SAAuB,GAC9B,MAAM,CAmBR"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { t } from "./locale.js";
|
|
2
|
-
/** Known error patterns mapped to user-friendly messages */
|
|
3
|
-
function getErrorMappings() {
|
|
4
|
-
return [
|
|
5
|
-
["Failed to fetch", t.networkErrorOffline],
|
|
6
|
-
];
|
|
7
|
-
}
|
|
8
|
-
/** Convert error to user-friendly display message */
|
|
9
|
-
export function formatUserError(err, fallback = t.somethingWentWrong) {
|
|
10
|
-
let raw;
|
|
11
|
-
if (err instanceof Error) {
|
|
12
|
-
raw = err.message;
|
|
13
|
-
}
|
|
14
|
-
else if (err && typeof err === "object" && "message" in err) {
|
|
15
|
-
raw = String(err.message);
|
|
16
|
-
}
|
|
17
|
-
else if (typeof err === "string") {
|
|
18
|
-
raw = err;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
raw = "";
|
|
22
|
-
}
|
|
23
|
-
for (const [pattern, message] of getErrorMappings()) {
|
|
24
|
-
if (typeof pattern === "string" ? raw === pattern : pattern.test(raw)) {
|
|
25
|
-
return message;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return raw || fallback;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=formatUserError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatUserError.js","sourceRoot":"","sources":["../../src/hooks/formatUserError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAEhC,4DAA4D;AAC5D,SAAS,gBAAgB;IACvB,OAAO;QACL,CAAC,iBAAiB,EAAE,CAAC,CAAC,mBAAmB,CAAC;KAC3C,CAAC;AACJ,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,eAAe,CAC7B,GAAY,EACZ,QAAQ,GAAG,CAAC,CAAC,kBAAkB;IAE/B,IAAI,GAAW,CAAC;IAChB,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;QACzB,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC;IACpB,CAAC;SAAM,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,SAAS,IAAI,GAAG,EAAE,CAAC;QAC9D,GAAG,GAAG,MAAM,CAAE,GAA4B,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACnC,GAAG,GAAG,GAAG,CAAC;IACZ,CAAC;SAAM,CAAC;QACN,GAAG,GAAG,EAAE,CAAC;IACX,CAAC;IAED,KAAK,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,gBAAgB,EAAE,EAAE,CAAC;QACpD,IAAI,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACtE,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,GAAG,IAAI,QAAQ,CAAC;AACzB,CAAC"}
|
package/dist/hooks/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { DaimoSDKProvider, useDaimoClient } from "./DaimoClientContext.js";
|
|
2
|
-
export { formatUserError } from "./formatUserError.js";
|
|
3
|
-
export { setLocale, t } from "./locale.js";
|
|
4
|
-
export type { DaimoModalLocale } from "./locale.js";
|
|
5
|
-
export { createNavLogger } from "./navEvent.js";
|
|
6
|
-
export type { NavEvent, NavEventAction, NavEventContext, NavNodeType } from "./navEvent.js";
|
|
7
|
-
export { usePaymentCallbacks } from "./usePaymentCallbacks.js";
|
|
8
|
-
export { useSessionNav } from "./useSessionNav.js";
|
|
9
|
-
export { useSessionPolling } from "./useSessionPolling.js";
|
|
10
|
-
export type { DaimoModalEventHandlers, ModalSession, NavEntry, } from "./types.js";
|
|
11
|
-
export { findNode } from "./types.js";
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EACV,uBAAuB,EACvB,YAAY,EACZ,QAAQ,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/hooks/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { DaimoSDKProvider, useDaimoClient } from "./DaimoClientContext.js";
|
|
2
|
-
export { formatUserError } from "./formatUserError.js";
|
|
3
|
-
export { setLocale, t } from "./locale.js";
|
|
4
|
-
export { createNavLogger } from "./navEvent.js";
|
|
5
|
-
export { usePaymentCallbacks } from "./usePaymentCallbacks.js";
|
|
6
|
-
export { useSessionNav } from "./useSessionNav.js";
|
|
7
|
-
export { useSessionPolling } from "./useSessionPolling.js";
|
|
8
|
-
export { findNode } from "./types.js";
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
package/dist/hooks/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAM3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/hooks/locale.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { en } from "./locales/en.js";
|
|
2
|
-
export type DaimoModalLocale = typeof en;
|
|
3
|
-
/** Current active translations. Defaults to English. */
|
|
4
|
-
export declare let t: DaimoModalLocale;
|
|
5
|
-
/** Set the active locale. Accepts full codes (es-ES) or short codes (es). */
|
|
6
|
-
export declare function setLocale(languageCode: string): void;
|
|
7
|
-
//# sourceMappingURL=locale.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../src/hooks/locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAGrC,MAAM,MAAM,gBAAgB,GAAG,OAAO,EAAE,CAAC;AAIzC,wDAAwD;AACxD,eAAO,IAAI,CAAC,EAAE,gBAAqB,CAAC;AAEpC,6EAA6E;AAC7E,wBAAgB,SAAS,CAAC,YAAY,EAAE,MAAM,QAO7C"}
|
package/dist/hooks/locale.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { en } from "./locales/en.js";
|
|
2
|
-
import { es } from "./locales/es.js";
|
|
3
|
-
const translations = { en, es };
|
|
4
|
-
/** Current active translations. Defaults to English. */
|
|
5
|
-
export let t = en;
|
|
6
|
-
/** Set the active locale. Accepts full codes (es-ES) or short codes (es). */
|
|
7
|
-
export function setLocale(languageCode) {
|
|
8
|
-
if (translations[languageCode]) {
|
|
9
|
-
t = translations[languageCode];
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
const short = languageCode.split("-")[0].toLowerCase();
|
|
13
|
-
t = translations[short] ?? en;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=locale.js.map
|
package/dist/hooks/locale.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locale.js","sourceRoot":"","sources":["../../src/hooks/locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAIrC,MAAM,YAAY,GAAqC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAElE,wDAAwD;AACxD,MAAM,CAAC,IAAI,CAAC,GAAqB,EAAE,CAAC;AAEpC,6EAA6E;AAC7E,MAAM,UAAU,SAAS,CAAC,YAAoB;IAC5C,IAAI,YAAY,CAAC,YAAY,CAAC,EAAE,CAAC;QAC/B,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;QAC/B,OAAO;IACT,CAAC;IACD,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACvD,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/** English (default) strings for DaimoModal UI. */
|
|
2
|
-
export declare const en: {
|
|
3
|
-
confirmYourPayment: string;
|
|
4
|
-
waitingForYourPayment: string;
|
|
5
|
-
paymentReceived: string;
|
|
6
|
-
processingYourPayment: string;
|
|
7
|
-
paymentCompleted: string;
|
|
8
|
-
refundingYourPayment: string;
|
|
9
|
-
returnToApp: string;
|
|
10
|
-
onChain: string;
|
|
11
|
-
expired: string;
|
|
12
|
-
paymentSessionExpired: string;
|
|
13
|
-
continueIn: string;
|
|
14
|
-
toCompleteYourPayment: string;
|
|
15
|
-
openIn: string;
|
|
16
|
-
continueTo: string;
|
|
17
|
-
toCompleteYourDeposit: string;
|
|
18
|
-
open: string;
|
|
19
|
-
selectAmount: string;
|
|
20
|
-
loading: string;
|
|
21
|
-
continue: string;
|
|
22
|
-
selectToken: string;
|
|
23
|
-
noTokensFound: string;
|
|
24
|
-
minimum: string;
|
|
25
|
-
maximum: string;
|
|
26
|
-
deposit: string;
|
|
27
|
-
depositOn: string;
|
|
28
|
-
generateNewAddress: string;
|
|
29
|
-
showQR: string;
|
|
30
|
-
hideQR: string;
|
|
31
|
-
oneTimeAddress: string;
|
|
32
|
-
amount: string;
|
|
33
|
-
expiresIn: string;
|
|
34
|
-
enterAmount: string;
|
|
35
|
-
max: string;
|
|
36
|
-
balance: string;
|
|
37
|
-
error: string;
|
|
38
|
-
reload: string;
|
|
39
|
-
unknownError: string;
|
|
40
|
-
contactSupport: string;
|
|
41
|
-
tellUsHowWeCanHelp: string;
|
|
42
|
-
showReceipt: string;
|
|
43
|
-
poweredByDaimo: string;
|
|
44
|
-
close: string;
|
|
45
|
-
flowError: string;
|
|
46
|
-
back: string;
|
|
47
|
-
tryAgain: string;
|
|
48
|
-
tronUnavailable: string;
|
|
49
|
-
networkErrorOffline: string;
|
|
50
|
-
somethingWentWrong: string;
|
|
51
|
-
missingSessionParam: string;
|
|
52
|
-
failedToLoadSession: string;
|
|
53
|
-
connectWallet: string;
|
|
54
|
-
walletUnavailable: string;
|
|
55
|
-
walletDisconnected: string;
|
|
56
|
-
switchToChain: (chain: string) => string;
|
|
57
|
-
transactionFailed: string;
|
|
58
|
-
closeAndReturn: string;
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=en.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/hooks/locales/en.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAqFU,MAAM;;;CAG9B,CAAC"}
|
package/dist/hooks/locales/en.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/** English (default) strings for DaimoModal UI. */
|
|
2
|
-
export const en = {
|
|
3
|
-
// ConfirmationPage
|
|
4
|
-
confirmYourPayment: "Confirm your payment",
|
|
5
|
-
waitingForYourPayment: "Waiting for your payment",
|
|
6
|
-
paymentReceived: "Payment Received",
|
|
7
|
-
processingYourPayment: "Processing your payment...",
|
|
8
|
-
paymentCompleted: "Payment Completed",
|
|
9
|
-
refundingYourPayment: "Refunding your payment",
|
|
10
|
-
returnToApp: "Return to app",
|
|
11
|
-
onChain: "on",
|
|
12
|
-
// ExpiredPage
|
|
13
|
-
expired: "Expired",
|
|
14
|
-
paymentSessionExpired: "This payment session has expired",
|
|
15
|
-
// DeeplinkPage
|
|
16
|
-
continueIn: "Continue in",
|
|
17
|
-
toCompleteYourPayment: "to complete your payment",
|
|
18
|
-
openIn: "Open in",
|
|
19
|
-
// ExchangePage
|
|
20
|
-
continueTo: "Continue to",
|
|
21
|
-
toCompleteYourDeposit: "to complete your deposit",
|
|
22
|
-
open: "Open",
|
|
23
|
-
// SelectAmountPage
|
|
24
|
-
selectAmount: "Select Amount",
|
|
25
|
-
loading: "Loading...",
|
|
26
|
-
continue: "Continue",
|
|
27
|
-
// SelectTokenPage
|
|
28
|
-
selectToken: "Select Token",
|
|
29
|
-
noTokensFound: "No tokens found",
|
|
30
|
-
minimum: "Minimum",
|
|
31
|
-
maximum: "Maximum",
|
|
32
|
-
// WaitingDepositAddressPage
|
|
33
|
-
deposit: "Deposit",
|
|
34
|
-
depositOn: "Deposit on",
|
|
35
|
-
generateNewAddress: "Generate New Address",
|
|
36
|
-
showQR: "Show QR",
|
|
37
|
-
hideQR: "Hide QR",
|
|
38
|
-
oneTimeAddress: "One-Time Address",
|
|
39
|
-
amount: "Amount",
|
|
40
|
-
expiresIn: "Expires in:",
|
|
41
|
-
// WalletAmountPage
|
|
42
|
-
enterAmount: "Enter Amount",
|
|
43
|
-
max: "Max",
|
|
44
|
-
balance: "Balance:",
|
|
45
|
-
// ErrorPage
|
|
46
|
-
error: "Error",
|
|
47
|
-
reload: "Reload",
|
|
48
|
-
unknownError: "unknown error",
|
|
49
|
-
// shared
|
|
50
|
-
contactSupport: "Contact support",
|
|
51
|
-
tellUsHowWeCanHelp: "Tell us how we can help",
|
|
52
|
-
showReceipt: "Show receipt",
|
|
53
|
-
poweredByDaimo: "Powered by Daimo",
|
|
54
|
-
// containers
|
|
55
|
-
close: "Close",
|
|
56
|
-
// flows
|
|
57
|
-
flowError: "Error:",
|
|
58
|
-
back: "Back",
|
|
59
|
-
tryAgain: "Try again",
|
|
60
|
-
// hooks/useSessionNav
|
|
61
|
-
tronUnavailable: "Tron unavailable. Try again later.",
|
|
62
|
-
// formatUserError
|
|
63
|
-
networkErrorOffline: "Network error. Offline?",
|
|
64
|
-
somethingWentWrong: "Something went wrong",
|
|
65
|
-
// embed page
|
|
66
|
-
missingSessionParam: "missing session parameter",
|
|
67
|
-
failedToLoadSession: "failed to load session",
|
|
68
|
-
// session page
|
|
69
|
-
connectWallet: "Connect Wallet",
|
|
70
|
-
walletUnavailable: "Wallet unavailable",
|
|
71
|
-
walletDisconnected: "Wallet disconnected",
|
|
72
|
-
switchToChain: (chain) => `Please switch to ${chain}`,
|
|
73
|
-
transactionFailed: "Transaction failed",
|
|
74
|
-
closeAndReturn: "Close this page and return to app",
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=en.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../../src/hooks/locales/en.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,mBAAmB;IACnB,kBAAkB,EAAE,sBAAsB;IAC1C,qBAAqB,EAAE,0BAA0B;IACjD,eAAe,EAAE,kBAAkB;IACnC,qBAAqB,EAAE,4BAA4B;IACnD,gBAAgB,EAAE,mBAAmB;IACrC,oBAAoB,EAAE,wBAAwB;IAC9C,WAAW,EAAE,eAAe;IAC5B,OAAO,EAAE,IAAI;IAEb,cAAc;IACd,OAAO,EAAE,SAAS;IAClB,qBAAqB,EAAE,kCAAkC;IAEzD,eAAe;IACf,UAAU,EAAE,aAAa;IACzB,qBAAqB,EAAE,0BAA0B;IACjD,MAAM,EAAE,SAAS;IAEjB,eAAe;IACf,UAAU,EAAE,aAAa;IACzB,qBAAqB,EAAE,0BAA0B;IACjD,IAAI,EAAE,MAAM;IAEZ,mBAAmB;IACnB,YAAY,EAAE,eAAe;IAC7B,OAAO,EAAE,YAAY;IACrB,QAAQ,EAAE,UAAU;IAEpB,kBAAkB;IAClB,WAAW,EAAE,cAAc;IAC3B,aAAa,EAAE,iBAAiB;IAChC,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAElB,4BAA4B;IAC5B,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,YAAY;IACvB,kBAAkB,EAAE,sBAAsB;IAC1C,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,cAAc,EAAE,kBAAkB;IAClC,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,aAAa;IAExB,mBAAmB;IACnB,WAAW,EAAE,cAAc;IAC3B,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,UAAU;IAEnB,YAAY;IACZ,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,eAAe;IAE7B,SAAS;IACT,cAAc,EAAE,iBAAiB;IACjC,kBAAkB,EAAE,yBAAyB;IAC7C,WAAW,EAAE,cAAc;IAC3B,cAAc,EAAE,kBAAkB;IAElC,aAAa;IACb,KAAK,EAAE,OAAO;IAEd,QAAQ;IACR,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,WAAW;IAErB,sBAAsB;IACtB,eAAe,EAAE,oCAAoC;IAErD,kBAAkB;IAClB,mBAAmB,EAAE,yBAAyB;IAC9C,kBAAkB,EAAE,sBAAsB;IAE1C,aAAa;IACb,mBAAmB,EAAE,2BAA2B;IAChD,mBAAmB,EAAE,wBAAwB;IAE7C,eAAe;IACf,aAAa,EAAE,gBAAgB;IAC/B,iBAAiB,EAAE,oBAAoB;IACvC,kBAAkB,EAAE,qBAAqB;IACzC,aAAa,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,oBAAoB,KAAK,EAAE;IAC7D,iBAAiB,EAAE,oBAAoB;IACvC,cAAc,EAAE,mCAAmC;CACpD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../src/hooks/locales/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAElC,8CAA8C;AAC9C,eAAO,MAAM,EAAE,EAAE,OAAO,EAyDvB,CAAC"}
|
package/dist/hooks/locales/es.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/** Spanish translations for DaimoModal UI. */
|
|
2
|
-
export const es = {
|
|
3
|
-
confirmYourPayment: "Confirma tu pago",
|
|
4
|
-
waitingForYourPayment: "Esperando tu pago",
|
|
5
|
-
paymentReceived: "Pago recibido",
|
|
6
|
-
processingYourPayment: "Procesando tu pago...",
|
|
7
|
-
paymentCompleted: "Pago completado",
|
|
8
|
-
refundingYourPayment: "Reembolsando tu pago",
|
|
9
|
-
returnToApp: "Volver a la app",
|
|
10
|
-
onChain: "en",
|
|
11
|
-
expired: "Expirado",
|
|
12
|
-
paymentSessionExpired: "Esta sesión de pago ha expirado",
|
|
13
|
-
continueIn: "Continuar en",
|
|
14
|
-
toCompleteYourPayment: "para completar tu pago",
|
|
15
|
-
openIn: "Abrir en",
|
|
16
|
-
continueTo: "Continuar a",
|
|
17
|
-
toCompleteYourDeposit: "para completar tu depósito",
|
|
18
|
-
open: "Abrir",
|
|
19
|
-
selectAmount: "Seleccionar monto",
|
|
20
|
-
loading: "Cargando...",
|
|
21
|
-
continue: "Continuar",
|
|
22
|
-
selectToken: "Seleccionar token",
|
|
23
|
-
noTokensFound: "No se encontraron tokens",
|
|
24
|
-
minimum: "Mínimo",
|
|
25
|
-
maximum: "Máximo",
|
|
26
|
-
deposit: "Depositar",
|
|
27
|
-
depositOn: "Depositar en",
|
|
28
|
-
generateNewAddress: "Generar nueva dirección",
|
|
29
|
-
showQR: "Mostrar QR",
|
|
30
|
-
hideQR: "Ocultar QR",
|
|
31
|
-
oneTimeAddress: "Dirección de uso único",
|
|
32
|
-
amount: "Monto",
|
|
33
|
-
expiresIn: "Expira en:",
|
|
34
|
-
enterAmount: "Ingresar monto",
|
|
35
|
-
max: "Máx",
|
|
36
|
-
balance: "Saldo:",
|
|
37
|
-
error: "Error",
|
|
38
|
-
reload: "Recargar",
|
|
39
|
-
unknownError: "error desconocido",
|
|
40
|
-
contactSupport: "Contactar soporte",
|
|
41
|
-
tellUsHowWeCanHelp: "Cuéntanos cómo podemos ayudarte",
|
|
42
|
-
showReceipt: "Ver recibo",
|
|
43
|
-
poweredByDaimo: "Powered by Daimo",
|
|
44
|
-
close: "Cerrar",
|
|
45
|
-
flowError: "Error:",
|
|
46
|
-
back: "Volver",
|
|
47
|
-
tryAgain: "Reintentar",
|
|
48
|
-
tronUnavailable: "Tron no disponible. Intenta más tarde.",
|
|
49
|
-
networkErrorOffline: "Error de red. ¿Sin conexión?",
|
|
50
|
-
somethingWentWrong: "Algo salió mal",
|
|
51
|
-
missingSessionParam: "falta el parámetro de sesión",
|
|
52
|
-
failedToLoadSession: "no se pudo cargar la sesión",
|
|
53
|
-
connectWallet: "Conectar billetera",
|
|
54
|
-
walletUnavailable: "Billetera no disponible",
|
|
55
|
-
walletDisconnected: "Billetera desconectada",
|
|
56
|
-
switchToChain: (chain) => `Cambia a ${chain}`,
|
|
57
|
-
transactionFailed: "Transacción fallida",
|
|
58
|
-
closeAndReturn: "Cierra esta página y vuelve a la app",
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"es.js","sourceRoot":"","sources":["../../../src/hooks/locales/es.ts"],"names":[],"mappings":"AAEA,8CAA8C;AAC9C,MAAM,CAAC,MAAM,EAAE,GAAc;IAC3B,kBAAkB,EAAE,kBAAkB;IACtC,qBAAqB,EAAE,mBAAmB;IAC1C,eAAe,EAAE,eAAe;IAChC,qBAAqB,EAAE,uBAAuB;IAC9C,gBAAgB,EAAE,iBAAiB;IACnC,oBAAoB,EAAE,sBAAsB;IAC5C,WAAW,EAAE,iBAAiB;IAC9B,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,UAAU;IACnB,qBAAqB,EAAE,iCAAiC;IACxD,UAAU,EAAE,cAAc;IAC1B,qBAAqB,EAAE,wBAAwB;IAC/C,MAAM,EAAE,UAAU;IAClB,UAAU,EAAE,aAAa;IACzB,qBAAqB,EAAE,4BAA4B;IACnD,IAAI,EAAE,OAAO;IACb,YAAY,EAAE,mBAAmB;IACjC,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,mBAAmB;IAChC,aAAa,EAAE,0BAA0B;IACzC,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,WAAW;IACpB,SAAS,EAAE,cAAc;IACzB,kBAAkB,EAAE,yBAAyB;IAC7C,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,cAAc,EAAE,wBAAwB;IACxC,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,YAAY;IACvB,WAAW,EAAE,gBAAgB;IAC7B,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,UAAU;IAClB,YAAY,EAAE,mBAAmB;IACjC,cAAc,EAAE,mBAAmB;IACnC,kBAAkB,EAAE,iCAAiC;IACrD,WAAW,EAAE,YAAY;IACzB,cAAc,EAAE,kBAAkB;IAClC,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,wCAAwC;IACzD,mBAAmB,EAAE,8BAA8B;IACnD,kBAAkB,EAAE,gBAAgB;IACpC,mBAAmB,EAAE,8BAA8B;IACnD,mBAAmB,EAAE,6BAA6B;IAClD,aAAa,EAAE,oBAAoB;IACnC,iBAAiB,EAAE,yBAAyB;IAC5C,kBAAkB,EAAE,wBAAwB;IAC5C,aAAa,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,YAAY,KAAK,EAAE;IACrD,iBAAiB,EAAE,qBAAqB;IACxC,cAAc,EAAE,sCAAsC;CACvD,CAAC"}
|
package/dist/hooks/navEvent.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { NavNode } from "../common/legacy/session.js";
|
|
2
|
-
import type { DaimoClient } from "../common/legacy/client.js";
|
|
3
|
-
/** Node types from NavNode union */
|
|
4
|
-
export type NavNodeType = NavNode["type"];
|
|
5
|
-
/** Context for every nav event */
|
|
6
|
-
export type NavEventContext = {
|
|
7
|
-
nodeId: string | null;
|
|
8
|
-
nodeType: NavNodeType | null;
|
|
9
|
-
};
|
|
10
|
-
/** All nav event actions with their data */
|
|
11
|
-
export type NavEventAction = {
|
|
12
|
-
action: "nav_open";
|
|
13
|
-
} | {
|
|
14
|
-
action: "nav_close";
|
|
15
|
-
} | {
|
|
16
|
-
action: "nav_select";
|
|
17
|
-
targetNodeId: string;
|
|
18
|
-
targetNodeType: NavNodeType;
|
|
19
|
-
} | {
|
|
20
|
-
action: "nav_back";
|
|
21
|
-
} | {
|
|
22
|
-
action: "nav_deeplink";
|
|
23
|
-
url: string;
|
|
24
|
-
} | {
|
|
25
|
-
action: "flow_amount_continue";
|
|
26
|
-
amountUsd: number;
|
|
27
|
-
} | {
|
|
28
|
-
action: "flow_refresh";
|
|
29
|
-
} | {
|
|
30
|
-
action: "flow_exchange_url";
|
|
31
|
-
exchangeId: string;
|
|
32
|
-
success: boolean;
|
|
33
|
-
url?: string;
|
|
34
|
-
error?: string;
|
|
35
|
-
} | {
|
|
36
|
-
action: "flow_tron_address";
|
|
37
|
-
success: boolean;
|
|
38
|
-
address?: string;
|
|
39
|
-
error?: string;
|
|
40
|
-
} | {
|
|
41
|
-
action: "qr_toggle";
|
|
42
|
-
visible: boolean;
|
|
43
|
-
} | {
|
|
44
|
-
action: "copy_address";
|
|
45
|
-
address: string;
|
|
46
|
-
} | {
|
|
47
|
-
action: "session_expired";
|
|
48
|
-
} | {
|
|
49
|
-
action: "session_completed";
|
|
50
|
-
} | {
|
|
51
|
-
action: "session_bounced";
|
|
52
|
-
} | {
|
|
53
|
-
action: "error_shown";
|
|
54
|
-
error: string;
|
|
55
|
-
};
|
|
56
|
-
/** Full nav event payload */
|
|
57
|
-
export type NavEvent = NavEventContext & NavEventAction;
|
|
58
|
-
/** Create a fire-and-forget nav event logger bound to a DaimoClient. */
|
|
59
|
-
export declare function createNavLogger(client: DaimoClient): (sessionId: string, event: NavEvent) => void;
|
|
60
|
-
//# sourceMappingURL=navEvent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/navEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,oCAAoC;AACpC,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE1C,kCAAkC;AAClC,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,4CAA4C;AAC5C,MAAM,MAAM,cAAc,GACtB;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GACtB;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,GACvB;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,WAAW,CAAA;CAAE,GAC3E;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GACtB;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACvC;IAAE,MAAM,EAAE,sBAAsB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,MAAM,EAAE,cAAc,CAAA;CAAE,GAC1B;IACE,MAAM,EAAE,mBAAmB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACD;IACE,MAAM,EAAE,mBAAmB,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACD;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACzC;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,GAC7B;IAAE,MAAM,EAAE,mBAAmB,CAAA;CAAE,GAC/B;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,GAC7B;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7C,6BAA6B;AAC7B,MAAM,MAAM,QAAQ,GAAG,eAAe,GAAG,cAAc,CAAC;AAExD,wEAAwE;AACxE,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,IACrB,WAAW,MAAM,EAAE,OAAO,QAAQ,KAAG,IAAI,CAYtE"}
|
package/dist/hooks/navEvent.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** Create a fire-and-forget nav event logger bound to a DaimoClient. */
|
|
2
|
-
export function createNavLogger(client) {
|
|
3
|
-
return function logNavEvent(sessionId, event) {
|
|
4
|
-
const { action, nodeId, nodeType, ...rest } = event;
|
|
5
|
-
client
|
|
6
|
-
.logNavEvent({
|
|
7
|
-
sessionId,
|
|
8
|
-
action,
|
|
9
|
-
data: { nodeId, nodeType, ...rest },
|
|
10
|
-
})
|
|
11
|
-
.catch((e) => {
|
|
12
|
-
console.error("[navEvent] failed to log:", action, e);
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=navEvent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navEvent.js","sourceRoot":"","sources":["../../src/hooks/navEvent.ts"],"names":[],"mappings":"AA4CA,wEAAwE;AACxE,MAAM,UAAU,eAAe,CAAC,MAAmB;IACjD,OAAO,SAAS,WAAW,CAAC,SAAiB,EAAE,KAAe;QAC5D,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;QACpD,MAAM;aACH,WAAW,CAAC;YACX,SAAS;YACT,MAAM;YACN,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE;SACpC,CAAC;aACD,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;YACX,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/hooks/types.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { ModalSession, NavNode, WalletPaymentOption } from "../common/legacy/session.js";
|
|
2
|
-
export type { ModalSession };
|
|
3
|
-
/**
|
|
4
|
-
* A single entry in the navigation stack. Back = pop.
|
|
5
|
-
* autoNav marks entries pushed by auto-navigation (single-option chains).
|
|
6
|
-
*/
|
|
7
|
-
export type NavEntry = {
|
|
8
|
-
type: "choose-option";
|
|
9
|
-
nodeId: string;
|
|
10
|
-
autoNav: boolean;
|
|
11
|
-
} | {
|
|
12
|
-
type: "deeplink";
|
|
13
|
-
nodeId: string;
|
|
14
|
-
autoNav?: boolean;
|
|
15
|
-
} | {
|
|
16
|
-
type: "select-amount";
|
|
17
|
-
nodeId: string;
|
|
18
|
-
flowType: "deposit" | "tron" | "exchange";
|
|
19
|
-
autoNav?: boolean;
|
|
20
|
-
} | {
|
|
21
|
-
type: "waiting-deposit";
|
|
22
|
-
nodeId: string;
|
|
23
|
-
amountUsd: number;
|
|
24
|
-
autoNav?: boolean;
|
|
25
|
-
} | {
|
|
26
|
-
type: "waiting-tron";
|
|
27
|
-
nodeId: string;
|
|
28
|
-
amountUsd: number;
|
|
29
|
-
address?: string;
|
|
30
|
-
expiresAt?: number;
|
|
31
|
-
error?: string;
|
|
32
|
-
autoNav?: boolean;
|
|
33
|
-
} | {
|
|
34
|
-
type: "exchange-page";
|
|
35
|
-
nodeId: string;
|
|
36
|
-
amountUsd: number;
|
|
37
|
-
exchangeUrl?: string;
|
|
38
|
-
waitingMessage?: string;
|
|
39
|
-
error?: string;
|
|
40
|
-
autoNav?: boolean;
|
|
41
|
-
} | {
|
|
42
|
-
type: "wallet-connect";
|
|
43
|
-
nodeId: string;
|
|
44
|
-
autoNav?: boolean;
|
|
45
|
-
} | {
|
|
46
|
-
type: "wallet-select-token";
|
|
47
|
-
nodeId: string;
|
|
48
|
-
autoNav?: boolean;
|
|
49
|
-
} | {
|
|
50
|
-
type: "wallet-select-amount";
|
|
51
|
-
nodeId: string;
|
|
52
|
-
token: WalletPaymentOption;
|
|
53
|
-
autoNav?: boolean;
|
|
54
|
-
} | {
|
|
55
|
-
type: "wallet-sending";
|
|
56
|
-
nodeId: string;
|
|
57
|
-
token: WalletPaymentOption;
|
|
58
|
-
amountUsd: number;
|
|
59
|
-
txHash?: string;
|
|
60
|
-
error?: string;
|
|
61
|
-
autoNav?: boolean;
|
|
62
|
-
};
|
|
63
|
-
export type DaimoModalEventHandlers = {
|
|
64
|
-
onPaymentStarted?: () => void;
|
|
65
|
-
onPaymentCompleted?: () => void;
|
|
66
|
-
onOpen?: () => void;
|
|
67
|
-
onClose?: () => void;
|
|
68
|
-
};
|
|
69
|
-
/** Helper to find a node by ID in the nav tree */
|
|
70
|
-
export declare function findNode(nodeId: string, nodes: NavNode[]): NavNode | null;
|
|
71
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/hooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EACP,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAErC,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GACvD;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GACD;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GACD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAC7D;IAAE,IAAI,EAAE,qBAAqB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAClE;IACE,IAAI,EAAE,sBAAsB,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,mBAAmB,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GACD;IACE,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,mBAAmB,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEN,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,kDAAkD;AAClD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,GAAG,IAAI,CAQzE"}
|
package/dist/hooks/types.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/** Helper to find a node by ID in the nav tree */
|
|
2
|
-
export function findNode(nodeId, nodes) {
|
|
3
|
-
for (const node of nodes) {
|
|
4
|
-
if (node.id === nodeId)
|
|
5
|
-
return node;
|
|
6
|
-
if (node.type !== "ChooseOption")
|
|
7
|
-
continue;
|
|
8
|
-
const found = findNode(nodeId, node.options);
|
|
9
|
-
if (found)
|
|
10
|
-
return found;
|
|
11
|
-
}
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=types.js.map
|
package/dist/hooks/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/hooks/types.ts"],"names":[],"mappings":"AAsEA,kDAAkD;AAClD,MAAM,UAAU,QAAQ,CAAC,MAAc,EAAE,KAAgB;IACvD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,EAAE,KAAK,MAAM;YAAE,OAAO,IAAI,CAAC;QACpC,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc;YAAE,SAAS;QAC3C,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC;IAC1B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ModalSession } from "./types.js";
|
|
2
|
-
type PaymentCallbacks = {
|
|
3
|
-
onOpen?: () => void;
|
|
4
|
-
onPaymentStarted?: () => void;
|
|
5
|
-
onPaymentCompleted?: () => void;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Manages payment lifecycle callbacks:
|
|
9
|
-
* - onOpen: when modal opens
|
|
10
|
-
* - onPaymentStarted: when first fulfillment is detected
|
|
11
|
-
* - onPaymentCompleted: when session completes
|
|
12
|
-
*/
|
|
13
|
-
export declare function usePaymentCallbacks(session: ModalSession, isOpen: boolean, callbacks: PaymentCallbacks): void;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=usePaymentCallbacks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePaymentCallbacks.d.ts","sourceRoot":"","sources":["../../src/hooks/usePaymentCallbacks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,KAAK,gBAAgB,GAAG;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,gBAAgB,QAmB5B"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Manages payment lifecycle callbacks:
|
|
4
|
-
* - onOpen: when modal opens
|
|
5
|
-
* - onPaymentStarted: when first fulfillment is detected
|
|
6
|
-
* - onPaymentCompleted: when session completes
|
|
7
|
-
*/
|
|
8
|
-
export function usePaymentCallbacks(session, isOpen, callbacks) {
|
|
9
|
-
const isStarted = session.status === "processing" ||
|
|
10
|
-
session.status === "completed" ||
|
|
11
|
-
session.status === "bounced";
|
|
12
|
-
const isCompleted = session.status === "completed";
|
|
13
|
-
const { onOpen, onPaymentStarted, onPaymentCompleted } = callbacks;
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
if (isOpen)
|
|
16
|
-
onOpen?.();
|
|
17
|
-
}, [session.sessionId, isOpen, onOpen]);
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
if (isStarted)
|
|
20
|
-
onPaymentStarted?.();
|
|
21
|
-
}, [session.sessionId, isStarted, onPaymentStarted]);
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
if (isCompleted)
|
|
24
|
-
onPaymentCompleted?.();
|
|
25
|
-
}, [session.sessionId, isCompleted, onPaymentCompleted]);
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=usePaymentCallbacks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePaymentCallbacks.js","sourceRoot":"","sources":["../../src/hooks/usePaymentCallbacks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUlC;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAqB,EACrB,MAAe,EACf,SAA2B;IAE3B,MAAM,SAAS,GACb,OAAO,CAAC,MAAM,KAAK,YAAY;QAC/B,OAAO,CAAC,MAAM,KAAK,WAAW;QAC9B,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC;IAC/B,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,KAAK,WAAW,CAAC;IAEnD,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,SAAS,CAAC;IAEnE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM;YAAE,MAAM,EAAE,EAAE,CAAC;IACzB,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACxC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS;YAAE,gBAAgB,EAAE,EAAE,CAAC;IACtC,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC;IACrD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,WAAW;YAAE,kBAAkB,EAAE,EAAE,CAAC;IAC1C,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { WalletPaymentOption } from "../common/legacy/session.js";
|
|
2
|
-
import { type NavNodeType } from "./navEvent.js";
|
|
3
|
-
import { type NavEntry, type ModalSession } from "./types.js";
|
|
4
|
-
type NodeContext = {
|
|
5
|
-
nodeId: string | null;
|
|
6
|
-
nodeType: NavNodeType | null;
|
|
7
|
-
};
|
|
8
|
-
type SessionNavResult = {
|
|
9
|
-
stack: NavEntry[];
|
|
10
|
-
topEntry: NavEntry | null;
|
|
11
|
-
getNodeCtx: () => NodeContext;
|
|
12
|
-
canGoBack: boolean;
|
|
13
|
-
handleNavigate: (nodeId: string, options?: {
|
|
14
|
-
autoNav?: boolean;
|
|
15
|
-
}) => void;
|
|
16
|
-
handleBack: () => void;
|
|
17
|
-
handleAmountContinue: (amountUsd: number) => void;
|
|
18
|
-
handleRetry: () => void;
|
|
19
|
-
handleRefresh: () => Promise<void>;
|
|
20
|
-
handleWalletConnected: () => void;
|
|
21
|
-
handleWalletSelectToken: (token: WalletPaymentOption) => void;
|
|
22
|
-
handleWalletSending: (token: WalletPaymentOption, amountUsd: number) => void;
|
|
23
|
-
handleWalletTxResult: (txHash?: string, error?: string) => void;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Manages session navigation via a single NavEntry stack.
|
|
27
|
-
* Back = pop (collapsing auto-nav entries). Flow screens are stack entries.
|
|
28
|
-
*/
|
|
29
|
-
export declare function useSessionNav(session: ModalSession, setSession: React.Dispatch<React.SetStateAction<ModalSession>>, platform?: "ios" | "android" | "other"): SessionNavResult;
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=useSessionNav.d.ts.map
|