@matchain/matchid-sdk-react 0.1.18 → 0.1.20
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 +13 -6
- package/dist/index.d.ts +13 -6
- package/dist/index.js +1627 -876
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1664 -871
- package/dist/index.mjs.map +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,13 @@ 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
|
+
|
|
216
222
|
declare const index$3_Button: typeof Button;
|
|
223
|
+
declare const index$3_EVMModal: typeof EVMModal;
|
|
217
224
|
declare const index$3_EmailModal: typeof EmailModal;
|
|
218
225
|
declare const index$3_Field: typeof Field;
|
|
219
226
|
declare const index$3_Input: typeof Input;
|
|
@@ -227,7 +234,7 @@ declare const index$3_PasswordModal: typeof PasswordModal;
|
|
|
227
234
|
declare const index$3_Popover: typeof Popover;
|
|
228
235
|
declare const index$3_UsernameModal: typeof UsernameModal;
|
|
229
236
|
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 };
|
|
237
|
+
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_UsernameModal as UsernameModal };
|
|
231
238
|
}
|
|
232
239
|
|
|
233
240
|
declare function useUserInfo(): {
|
|
@@ -235,7 +242,7 @@ declare function useUserInfo(): {
|
|
|
235
242
|
loginByTelegram: () => Promise<Window | null>;
|
|
236
243
|
loginByTwitter: () => Promise<Window | null>;
|
|
237
244
|
loginByGoogle: () => Promise<Window | null>;
|
|
238
|
-
loginByWallet: () => Promise<
|
|
245
|
+
loginByWallet: () => Promise<void>;
|
|
239
246
|
loginByEmail: ({ email, code }: {
|
|
240
247
|
email: string;
|
|
241
248
|
code: string;
|
|
@@ -253,7 +260,7 @@ declare function useUserInfo(): {
|
|
|
253
260
|
bindTelegram: () => Promise<void>;
|
|
254
261
|
username: string;
|
|
255
262
|
auth: () => Promise<any>;
|
|
256
|
-
login: (method: LoginMethodType) => Promise<Window | null>;
|
|
263
|
+
login: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
257
264
|
bind: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
258
265
|
};
|
|
259
266
|
|
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,13 @@ 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
|
+
|
|
216
222
|
declare const index$3_Button: typeof Button;
|
|
223
|
+
declare const index$3_EVMModal: typeof EVMModal;
|
|
217
224
|
declare const index$3_EmailModal: typeof EmailModal;
|
|
218
225
|
declare const index$3_Field: typeof Field;
|
|
219
226
|
declare const index$3_Input: typeof Input;
|
|
@@ -227,7 +234,7 @@ declare const index$3_PasswordModal: typeof PasswordModal;
|
|
|
227
234
|
declare const index$3_Popover: typeof Popover;
|
|
228
235
|
declare const index$3_UsernameModal: typeof UsernameModal;
|
|
229
236
|
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 };
|
|
237
|
+
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_UsernameModal as UsernameModal };
|
|
231
238
|
}
|
|
232
239
|
|
|
233
240
|
declare function useUserInfo(): {
|
|
@@ -235,7 +242,7 @@ declare function useUserInfo(): {
|
|
|
235
242
|
loginByTelegram: () => Promise<Window | null>;
|
|
236
243
|
loginByTwitter: () => Promise<Window | null>;
|
|
237
244
|
loginByGoogle: () => Promise<Window | null>;
|
|
238
|
-
loginByWallet: () => Promise<
|
|
245
|
+
loginByWallet: () => Promise<void>;
|
|
239
246
|
loginByEmail: ({ email, code }: {
|
|
240
247
|
email: string;
|
|
241
248
|
code: string;
|
|
@@ -253,7 +260,7 @@ declare function useUserInfo(): {
|
|
|
253
260
|
bindTelegram: () => Promise<void>;
|
|
254
261
|
username: string;
|
|
255
262
|
auth: () => Promise<any>;
|
|
256
|
-
login: (method: LoginMethodType) => Promise<Window | null>;
|
|
263
|
+
login: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
257
264
|
bind: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
258
265
|
};
|
|
259
266
|
|