@matchain/matchid-sdk-react 0.1.19 → 0.1.21
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/index.css +35 -0
- package/dist/index.d.mts +19 -6
- package/dist/index.d.ts +19 -6
- package/dist/index.js +1678 -842
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1464 -586
- package/dist/index.mjs.map +1 -1
- package/example/src/components/Login/index.tsx +1 -1
- package/example/src/config/index.ts +2 -1
- package/example/src/pages/User.tsx +1 -1
- package/package.json +8 -2
package/dist/index.css
CHANGED
|
@@ -597,4 +597,39 @@ body {
|
|
|
597
597
|
height: 1px;
|
|
598
598
|
width: 100%;
|
|
599
599
|
background: var(--matchid-line);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.matchid-wallet-container {
|
|
603
|
+
background: #ffffff;
|
|
604
|
+
display: flex;
|
|
605
|
+
flex-direction: column;
|
|
606
|
+
gap: 24px;
|
|
607
|
+
align-items: center;
|
|
608
|
+
justify-content: center;
|
|
609
|
+
|
|
610
|
+
.matchid-wallet-box {
|
|
611
|
+
display: flex;
|
|
612
|
+
flex-direction: column;
|
|
613
|
+
gap: 24px;
|
|
614
|
+
align-items: center;
|
|
615
|
+
justify-content: center;
|
|
616
|
+
padding: 24px;
|
|
617
|
+
|
|
618
|
+
.matchid-wallet-content {
|
|
619
|
+
img{
|
|
620
|
+
width: 128px;
|
|
621
|
+
height: 128px;
|
|
622
|
+
}
|
|
623
|
+
display: flex;
|
|
624
|
+
flex-direction: column;
|
|
625
|
+
align-items: center;
|
|
626
|
+
justify-content: center;
|
|
627
|
+
color: #6E6E6E;
|
|
628
|
+
text-align: center;
|
|
629
|
+
font-size: 20px;
|
|
630
|
+
font-weight: 500;
|
|
631
|
+
line-height: 20px;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
600
635
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -6,8 +6,8 @@ import { SignableMessage, Hex, TransactionSerializable, Account } from 'viem';
|
|
|
6
6
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
7
7
|
import { UseQueryOptions } from '@tanstack/react-query/src/types';
|
|
8
8
|
|
|
9
|
-
type ISocialLoginMethod = 'google' | 'twitter' | 'discord' | 'github' |'telegram' | 'linkedin'
|
|
10
|
-
type LoginMethodType = '
|
|
9
|
+
type ISocialLoginMethod = 'google' | 'twitter' | 'discord' | 'github' |'telegram' | 'linkedin' | 'facebook'
|
|
10
|
+
type LoginMethodType = 'evm' | 'sol' | 'email' | ISocialLoginMethod
|
|
11
11
|
type IEnvConfigType = {
|
|
12
12
|
endpoints: {
|
|
13
13
|
back: string;
|
|
@@ -46,6 +46,7 @@ type ModalProps = PropsWithChildren & {
|
|
|
46
46
|
isOpen: boolean,
|
|
47
47
|
width?: number
|
|
48
48
|
className?: string
|
|
49
|
+
zIndex?: number
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
type ModalWithHeaderProps = ModalProps & {
|
|
@@ -183,7 +184,7 @@ declare function Input({ onChange, type, after, className, ...props }: InputProp
|
|
|
183
184
|
|
|
184
185
|
declare function Button({ size, disabled, loading, children, onClick, highlight, block, type, rounded, className, style }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
185
186
|
|
|
186
|
-
declare function Modal({ children, isOpen, width, className }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
187
|
+
declare function Modal({ children, isOpen, width, zIndex, className }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
187
188
|
declare function ModalWithHeader({ children, onBack, onClose, title, showBorder, showClose, ...props }: ModalWithHeaderProps): react_jsx_runtime.JSX.Element;
|
|
188
189
|
|
|
189
190
|
declare function Popover({ children, content, position, type, className, gap }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
@@ -213,7 +214,18 @@ declare function PasswordModal({ title, isOpen, onSuccess, ...props }: ModalWith
|
|
|
213
214
|
onSuccess?: () => void;
|
|
214
215
|
}): react_jsx_runtime.JSX.Element;
|
|
215
216
|
|
|
217
|
+
declare function EVMModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
218
|
+
type?: 'login' | 'bind' | '';
|
|
219
|
+
onSuccess?: () => void;
|
|
220
|
+
}): react_jsx_runtime.JSX.Element;
|
|
221
|
+
|
|
222
|
+
declare function SOLModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
223
|
+
type?: 'login' | 'bind' | '';
|
|
224
|
+
onSuccess?: () => void;
|
|
225
|
+
}): react_jsx_runtime.JSX.Element;
|
|
226
|
+
|
|
216
227
|
declare const index$3_Button: typeof Button;
|
|
228
|
+
declare const index$3_EVMModal: typeof EVMModal;
|
|
217
229
|
declare const index$3_EmailModal: typeof EmailModal;
|
|
218
230
|
declare const index$3_Field: typeof Field;
|
|
219
231
|
declare const index$3_Input: typeof Input;
|
|
@@ -225,9 +237,10 @@ declare const index$3_Modal: typeof Modal;
|
|
|
225
237
|
declare const index$3_ModalWithHeader: typeof ModalWithHeader;
|
|
226
238
|
declare const index$3_PasswordModal: typeof PasswordModal;
|
|
227
239
|
declare const index$3_Popover: typeof Popover;
|
|
240
|
+
declare const index$3_SOLModal: typeof SOLModal;
|
|
228
241
|
declare const index$3_UsernameModal: typeof UsernameModal;
|
|
229
242
|
declare namespace index$3 {
|
|
230
|
-
export { index$3_Button as Button, index$3_EmailModal as EmailModal, index$3_Field as Field, index$3_Input as Input, index$3_LoginBox as LoginBox, index$3_LoginButton as LoginButton, index$3_LoginModal as LoginModal, index$3_LoginPanel as LoginPanel, index$3_Modal as Modal, index$3_ModalWithHeader as ModalWithHeader, index$3_PasswordModal as PasswordModal, index$3_Popover as Popover, index$3_UsernameModal as UsernameModal };
|
|
243
|
+
export { index$3_Button as Button, index$3_EVMModal as EVMModal, index$3_EmailModal as EmailModal, index$3_Field as Field, index$3_Input as Input, index$3_LoginBox as LoginBox, index$3_LoginButton as LoginButton, index$3_LoginModal as LoginModal, index$3_LoginPanel as LoginPanel, index$3_Modal as Modal, index$3_ModalWithHeader as ModalWithHeader, index$3_PasswordModal as PasswordModal, index$3_Popover as Popover, index$3_SOLModal as SOLModal, index$3_UsernameModal as UsernameModal };
|
|
231
244
|
}
|
|
232
245
|
|
|
233
246
|
declare function useUserInfo(): {
|
|
@@ -235,7 +248,7 @@ declare function useUserInfo(): {
|
|
|
235
248
|
loginByTelegram: () => Promise<Window | null>;
|
|
236
249
|
loginByTwitter: () => Promise<Window | null>;
|
|
237
250
|
loginByGoogle: () => Promise<Window | null>;
|
|
238
|
-
loginByWallet: () => Promise<
|
|
251
|
+
loginByWallet: () => Promise<void>;
|
|
239
252
|
loginByEmail: ({ email, code }: {
|
|
240
253
|
email: string;
|
|
241
254
|
code: string;
|
|
@@ -253,7 +266,7 @@ declare function useUserInfo(): {
|
|
|
253
266
|
bindTelegram: () => Promise<void>;
|
|
254
267
|
username: string;
|
|
255
268
|
auth: () => Promise<any>;
|
|
256
|
-
login: (method: LoginMethodType) => Promise<Window | null>;
|
|
269
|
+
login: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
257
270
|
bind: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
258
271
|
};
|
|
259
272
|
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import { SignableMessage, Hex, TransactionSerializable, Account } from 'viem';
|
|
|
6
6
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
7
7
|
import { UseQueryOptions } from '@tanstack/react-query/src/types';
|
|
8
8
|
|
|
9
|
-
type ISocialLoginMethod = 'google' | 'twitter' | 'discord' | 'github' |'telegram' | 'linkedin'
|
|
10
|
-
type LoginMethodType = '
|
|
9
|
+
type ISocialLoginMethod = 'google' | 'twitter' | 'discord' | 'github' |'telegram' | 'linkedin' | 'facebook'
|
|
10
|
+
type LoginMethodType = 'evm' | 'sol' | 'email' | ISocialLoginMethod
|
|
11
11
|
type IEnvConfigType = {
|
|
12
12
|
endpoints: {
|
|
13
13
|
back: string;
|
|
@@ -46,6 +46,7 @@ type ModalProps = PropsWithChildren & {
|
|
|
46
46
|
isOpen: boolean,
|
|
47
47
|
width?: number
|
|
48
48
|
className?: string
|
|
49
|
+
zIndex?: number
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
type ModalWithHeaderProps = ModalProps & {
|
|
@@ -183,7 +184,7 @@ declare function Input({ onChange, type, after, className, ...props }: InputProp
|
|
|
183
184
|
|
|
184
185
|
declare function Button({ size, disabled, loading, children, onClick, highlight, block, type, rounded, className, style }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
185
186
|
|
|
186
|
-
declare function Modal({ children, isOpen, width, className }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
187
|
+
declare function Modal({ children, isOpen, width, zIndex, className }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
187
188
|
declare function ModalWithHeader({ children, onBack, onClose, title, showBorder, showClose, ...props }: ModalWithHeaderProps): react_jsx_runtime.JSX.Element;
|
|
188
189
|
|
|
189
190
|
declare function Popover({ children, content, position, type, className, gap }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
@@ -213,7 +214,18 @@ declare function PasswordModal({ title, isOpen, onSuccess, ...props }: ModalWith
|
|
|
213
214
|
onSuccess?: () => void;
|
|
214
215
|
}): react_jsx_runtime.JSX.Element;
|
|
215
216
|
|
|
217
|
+
declare function EVMModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
218
|
+
type?: 'login' | 'bind' | '';
|
|
219
|
+
onSuccess?: () => void;
|
|
220
|
+
}): react_jsx_runtime.JSX.Element;
|
|
221
|
+
|
|
222
|
+
declare function SOLModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
223
|
+
type?: 'login' | 'bind' | '';
|
|
224
|
+
onSuccess?: () => void;
|
|
225
|
+
}): react_jsx_runtime.JSX.Element;
|
|
226
|
+
|
|
216
227
|
declare const index$3_Button: typeof Button;
|
|
228
|
+
declare const index$3_EVMModal: typeof EVMModal;
|
|
217
229
|
declare const index$3_EmailModal: typeof EmailModal;
|
|
218
230
|
declare const index$3_Field: typeof Field;
|
|
219
231
|
declare const index$3_Input: typeof Input;
|
|
@@ -225,9 +237,10 @@ declare const index$3_Modal: typeof Modal;
|
|
|
225
237
|
declare const index$3_ModalWithHeader: typeof ModalWithHeader;
|
|
226
238
|
declare const index$3_PasswordModal: typeof PasswordModal;
|
|
227
239
|
declare const index$3_Popover: typeof Popover;
|
|
240
|
+
declare const index$3_SOLModal: typeof SOLModal;
|
|
228
241
|
declare const index$3_UsernameModal: typeof UsernameModal;
|
|
229
242
|
declare namespace index$3 {
|
|
230
|
-
export { index$3_Button as Button, index$3_EmailModal as EmailModal, index$3_Field as Field, index$3_Input as Input, index$3_LoginBox as LoginBox, index$3_LoginButton as LoginButton, index$3_LoginModal as LoginModal, index$3_LoginPanel as LoginPanel, index$3_Modal as Modal, index$3_ModalWithHeader as ModalWithHeader, index$3_PasswordModal as PasswordModal, index$3_Popover as Popover, index$3_UsernameModal as UsernameModal };
|
|
243
|
+
export { index$3_Button as Button, index$3_EVMModal as EVMModal, index$3_EmailModal as EmailModal, index$3_Field as Field, index$3_Input as Input, index$3_LoginBox as LoginBox, index$3_LoginButton as LoginButton, index$3_LoginModal as LoginModal, index$3_LoginPanel as LoginPanel, index$3_Modal as Modal, index$3_ModalWithHeader as ModalWithHeader, index$3_PasswordModal as PasswordModal, index$3_Popover as Popover, index$3_SOLModal as SOLModal, index$3_UsernameModal as UsernameModal };
|
|
231
244
|
}
|
|
232
245
|
|
|
233
246
|
declare function useUserInfo(): {
|
|
@@ -235,7 +248,7 @@ declare function useUserInfo(): {
|
|
|
235
248
|
loginByTelegram: () => Promise<Window | null>;
|
|
236
249
|
loginByTwitter: () => Promise<Window | null>;
|
|
237
250
|
loginByGoogle: () => Promise<Window | null>;
|
|
238
|
-
loginByWallet: () => Promise<
|
|
251
|
+
loginByWallet: () => Promise<void>;
|
|
239
252
|
loginByEmail: ({ email, code }: {
|
|
240
253
|
email: string;
|
|
241
254
|
code: string;
|
|
@@ -253,7 +266,7 @@ declare function useUserInfo(): {
|
|
|
253
266
|
bindTelegram: () => Promise<void>;
|
|
254
267
|
username: string;
|
|
255
268
|
auth: () => Promise<any>;
|
|
256
|
-
login: (method: LoginMethodType) => Promise<Window | null>;
|
|
269
|
+
login: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
257
270
|
bind: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
258
271
|
};
|
|
259
272
|
|