@matchain/matchid-sdk-react 0.1.56-alpha.13 → 0.1.56-alpha.15
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/api.js +1 -0
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +2 -2
- package/dist/{chunk-RPATABCS.mjs → chunk-A47WTLYD.mjs} +13 -5
- package/dist/chunk-A47WTLYD.mjs.map +1 -0
- package/dist/{chunk-7K4E64WH.mjs → chunk-FZHJNSAP.mjs} +2 -2
- package/dist/components.js +11 -3
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +1 -0
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/{index-CPnKc6o4.d.ts → index-BINNnZNA.d.ts} +1 -0
- package/dist/{index-Bjb30oE3.d.mts → index-BIVGhRja.d.mts} +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +1 -1
- package/example/src/App.tsx +1 -1
- package/package.json +1 -1
- package/dist/chunk-RPATABCS.mjs.map +0 -1
- /package/dist/{chunk-7K4E64WH.mjs.map → chunk-FZHJNSAP.mjs.map} +0 -0
package/dist/hooks.mjs
CHANGED
|
@@ -92,6 +92,7 @@ declare function useUserInfo(): {
|
|
|
92
92
|
bind: (method: LoginMethodType | "wallet", extra?: {
|
|
93
93
|
[key: string]: any;
|
|
94
94
|
}) => Promise<string | void | Window | null>;
|
|
95
|
+
getBindEmailCode: (email: string) => Promise<string>;
|
|
95
96
|
bindByEmail: ({ email, code }: {
|
|
96
97
|
email: string;
|
|
97
98
|
code: string;
|
|
@@ -92,6 +92,7 @@ declare function useUserInfo(): {
|
|
|
92
92
|
bind: (method: LoginMethodType | "wallet", extra?: {
|
|
93
93
|
[key: string]: any;
|
|
94
94
|
}) => Promise<string | void | Window | null>;
|
|
95
|
+
getBindEmailCode: (email: string) => Promise<string>;
|
|
95
96
|
bindByEmail: ({ email, code }: {
|
|
96
97
|
email: string;
|
|
97
98
|
code: string;
|
package/dist/index.css
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import * as wagmi_chains from 'wagmi/chains';
|
|
|
5
5
|
import * as viem from 'viem';
|
|
6
6
|
import React__default, { ReactNode } from 'react';
|
|
7
7
|
import { I as IMatchEvents, L as LocaleType, a as IEnvConfigType, W as WalletConfigType } from './types-C8FLH1yn.mjs';
|
|
8
|
-
export { i as Hooks, M as ModalProvider, T as ToastProvider } from './index-
|
|
8
|
+
export { i as Hooks, M as ModalProvider, T as ToastProvider } from './index-BIVGhRja.mjs';
|
|
9
9
|
export { i as Components } from './index-CqHlL6ue.mjs';
|
|
10
10
|
export { i as UI } from './index-BLjGmf9p.mjs';
|
|
11
11
|
export { i as Api } from './index-De8efmdb.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as wagmi_chains from 'wagmi/chains';
|
|
|
5
5
|
import * as viem from 'viem';
|
|
6
6
|
import React__default, { ReactNode } from 'react';
|
|
7
7
|
import { I as IMatchEvents, L as LocaleType, a as IEnvConfigType, W as WalletConfigType } from './types-C8FLH1yn.js';
|
|
8
|
-
export { i as Hooks, M as ModalProvider, T as ToastProvider } from './index-
|
|
8
|
+
export { i as Hooks, M as ModalProvider, T as ToastProvider } from './index-BINNnZNA.js';
|
|
9
9
|
export { i as Components } from './index-DZpXCByF.js';
|
|
10
10
|
export { i as UI } from './index-DQYg6bEA.js';
|
|
11
11
|
export { i as Api } from './index-CpJtux-G.js';
|
package/dist/index.js
CHANGED
|
@@ -2515,6 +2515,7 @@ function useUserInfo() {
|
|
|
2515
2515
|
auth,
|
|
2516
2516
|
login: loginMethod,
|
|
2517
2517
|
bind,
|
|
2518
|
+
getBindEmailCode: getLoginEmailCode,
|
|
2518
2519
|
bindByEmail,
|
|
2519
2520
|
getAuthInfo,
|
|
2520
2521
|
invite
|
|
@@ -2999,6 +3000,13 @@ function EmailModal({
|
|
|
2999
3000
|
setEmailVal("");
|
|
3000
3001
|
}
|
|
3001
3002
|
}, [isOpen]);
|
|
3003
|
+
const verifySuccess = () => {
|
|
3004
|
+
if (onLogin) {
|
|
3005
|
+
onLogin();
|
|
3006
|
+
} else {
|
|
3007
|
+
onClose && onClose();
|
|
3008
|
+
}
|
|
3009
|
+
};
|
|
3002
3010
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3003
3011
|
ModalWithHeader,
|
|
3004
3012
|
{
|
|
@@ -3012,7 +3020,7 @@ function EmailModal({
|
|
|
3012
3020
|
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
3013
3021
|
setEmailVal(email);
|
|
3014
3022
|
setStep("verify");
|
|
3015
|
-
} }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(StepVerify, { email: emailVal, type, onSuccess:
|
|
3023
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(StepVerify, { email: emailVal, type, onSuccess: verifySuccess })
|
|
3016
3024
|
}
|
|
3017
3025
|
);
|
|
3018
3026
|
}
|
|
@@ -3162,7 +3170,7 @@ function LoginBox({
|
|
|
3162
3170
|
walletMethods: walletMethodList
|
|
3163
3171
|
};
|
|
3164
3172
|
}, [config.platform, recommendMethods, methods, walletMethods]);
|
|
3165
|
-
const { open: emailOpen } = useEmailModalStore();
|
|
3173
|
+
const { isOpen: emailIsOpen, open: emailOpen } = useEmailModalStore();
|
|
3166
3174
|
const { login } = useUserInfo();
|
|
3167
3175
|
const [showWallet, setShowWallet] = (0, import_react10.useState)(false);
|
|
3168
3176
|
const intl = (0, import_react_intl4.useIntl)();
|
|
@@ -3228,7 +3236,7 @@ function LoginBox({
|
|
|
3228
3236
|
}
|
|
3229
3237
|
};
|
|
3230
3238
|
const { walletMap } = useWalletConfig();
|
|
3231
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: (!inModal || !
|
|
3239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: (!inModal || !emailIsOpen) && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-box", children: [
|
|
3232
3240
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
3233
3241
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3234
3242
|
RecommendItem,
|
|
@@ -7890,7 +7898,7 @@ function BusinessProvider({ children }) {
|
|
|
7890
7898
|
{
|
|
7891
7899
|
isOpen: EmailModalStore.isOpen && (EmailModalStore.type == "login" && !overview && !token || EmailModalStore.type == "bind" && !!token && !!overview),
|
|
7892
7900
|
onClose: EmailModalStore.close,
|
|
7893
|
-
onLogin:
|
|
7901
|
+
onLogin: EmailModalStore.close,
|
|
7894
7902
|
type: EmailModalStore.type,
|
|
7895
7903
|
zIndex: 199
|
|
7896
7904
|
}
|