@matchain/matchid-sdk-react 0.1.46-alpha.0 → 0.1.46-alpha.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/dist/assets/icon/index.d.mts +1 -1
- package/dist/assets/icon/index.d.ts +1 -1
- package/dist/{chunk-CNQJUDKT.mjs → chunk-IPT2PAEX.mjs} +30 -1
- package/dist/chunk-IPT2PAEX.mjs.map +1 -0
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/{index-BXCdzLbc.d.mts → index-B6OKNMN_.d.mts} +1 -1
- package/dist/{index-C_XI1qNB.d.mts → index-Bb5HNcIM.d.mts} +1 -1
- package/dist/{index-DWOnfdeP.d.ts → index-BenUwnaC.d.ts} +2 -2
- package/dist/{index-DSLYDlMJ.d.ts → index-C76VhJX1.d.ts} +10 -4
- package/dist/{index-CsHEukeG.d.ts → index-C9lQIgOD.d.ts} +1 -1
- package/dist/{index-D9-2IgL1.d.ts → index-DHyRhe_l.d.ts} +1 -1
- package/dist/{index-nqmU7njp.d.mts → index-DM5y3_Gj.d.mts} +2 -2
- package/dist/{index-bpGeBrps.d.mts → index-DYy-xBrS.d.mts} +10 -4
- package/dist/{index-DhSoJs_L.d.ts → index-Dxfz0_U2.d.ts} +1 -1
- package/dist/{index-BMWq_SVq.d.ts → index-_oiFIWte.d.ts} +1 -1
- package/dist/{index-RT9tEHMs.d.mts → index-h1KGzuFo.d.mts} +1 -1
- package/dist/{index-a9wDsxOI.d.mts → index-oBhm0-55.d.mts} +1 -1
- package/dist/index.css +14 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-Cpmx3fld.d.mts → types-Q3WHZX4Z.d.mts} +1 -0
- package/dist/{types-Cpmx3fld.d.ts → types-Q3WHZX4Z.d.ts} +1 -0
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.js +29 -0
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +3 -1
- package/example/src/pages/UI/components/AlphaAvatar.tsx +11 -0
- package/example/src/pages/UI/index.tsx +2 -0
- package/package.json +1 -1
- package/dist/chunk-CNQJUDKT.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { CSSProperties } from 'react';
|
|
3
|
-
import { q as IconProps$1 } from '../../types-
|
|
3
|
+
import { q as IconProps$1 } from '../../types-Q3WHZX4Z.mjs';
|
|
4
4
|
|
|
5
5
|
declare function BackIcon({ color, size, className, style }: {
|
|
6
6
|
color?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { CSSProperties } from 'react';
|
|
3
|
-
import { q as IconProps$1 } from '../../types-
|
|
3
|
+
import { q as IconProps$1 } from '../../types-Q3WHZX4Z.js';
|
|
4
4
|
|
|
5
5
|
declare function BackIcon({ color, size, className, style }: {
|
|
6
6
|
color?: string;
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
// src/ui/index.ts
|
|
21
21
|
var ui_exports = {};
|
|
22
22
|
__export(ui_exports, {
|
|
23
|
+
AlphaAvatar: () => AlphaAvatar,
|
|
23
24
|
Button: () => Button,
|
|
24
25
|
Drawer: () => Drawer,
|
|
25
26
|
Field: () => Field,
|
|
@@ -52,8 +53,36 @@ function Switch({
|
|
|
52
53
|
return /* @__PURE__ */ jsx("div", { onClick, className: `matchid-switch matchid-switch-${size} ${checked ? "matchid-switch-checked" : ""} ${disabled ? "matchid-switch-disabled" : ""} ${loading ? "matchid-switch-loading" : ""}`, ...props, children: loading ? /* @__PURE__ */ jsx(LoadingIcon_default, { className: "matchid-switch-loading-icon", size: size == "default" ? 24 : 18, color: "var(--matchid-swicth-loading-color)" }) : /* @__PURE__ */ jsx("div", { className: "matchid-switch-ball" }) });
|
|
53
54
|
}
|
|
54
55
|
|
|
56
|
+
// src/ui/AlphaAvatar/index.tsx
|
|
57
|
+
import { useMemo } from "react";
|
|
58
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
59
|
+
function AlphaAvatar({
|
|
60
|
+
name,
|
|
61
|
+
size = "default",
|
|
62
|
+
className = "",
|
|
63
|
+
style
|
|
64
|
+
}) {
|
|
65
|
+
const avatar = useMemo(() => {
|
|
66
|
+
if (name) {
|
|
67
|
+
const char = name[0].toUpperCase();
|
|
68
|
+
if (char.match(/[a-zA-Z0-9]/)) {
|
|
69
|
+
return char;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return "";
|
|
73
|
+
}, [name]);
|
|
74
|
+
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
75
|
+
return /* @__PURE__ */ jsx2("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
76
|
+
width: numberSize,
|
|
77
|
+
height: numberSize,
|
|
78
|
+
fontSize: Math.ceil(numberSize / 2),
|
|
79
|
+
...style
|
|
80
|
+
}, children: avatar });
|
|
81
|
+
}
|
|
82
|
+
|
|
55
83
|
export {
|
|
56
84
|
Switch,
|
|
85
|
+
AlphaAvatar,
|
|
57
86
|
ui_exports
|
|
58
87
|
};
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
88
|
+
//# sourceMappingURL=chunk-IPT2PAEX.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ui/index.ts","../src/ui/Switch/index.tsx","../src/ui/AlphaAvatar/index.tsx"],"sourcesContent":["export { default as Button } from './Button';\nexport { default as Drawer } from './Drawer';\nexport { default as Field } from './Field';\nexport { default as HashPanel } from './HashPanel';\nexport { default as Input } from './Input';\nexport { default as Modal,ModalWithHeader } from './Modal';\nexport { default as ModalDrawer } from './ModalDrawer';\nexport { default as Overlay } from './Overlay';\nexport { default as Popover } from './Popover';\nexport { default as Switch } from './Switch';\nexport { default as AlphaAvatar } from './AlphaAvatar';","import {UIProps} from \"../../types\";\nimport {LoadingIcon} from \"../../assets/icon\";\n\nexport default function Switch({\n size=\"default\",\n checked=false,\n loading=false,\n onChange,\n className,\n disabled=false,\n ...props\n }:{\n size?:\"default\"|\"sm\",\n checked?:boolean,\n loading?:boolean,\n disabled?:boolean,\n onChange?:(checked:boolean)=>void,\n}&UIProps){\n const onClick = ()=>{\n if(!disabled && !loading){\n onChange && onChange(!checked)\n }\n }\n return <div onClick={onClick} className={`matchid-switch matchid-switch-${size} ${checked ? \"matchid-switch-checked\":\"\"} ${disabled ? \"matchid-switch-disabled\":\"\"} ${loading ? \"matchid-switch-loading\":\"\"}`} {...props}>\n\n {\n loading ?\n <LoadingIcon className=\"matchid-switch-loading-icon\" size={size==\"default\"?24:18} color=\"var(--matchid-swicth-loading-color)\"/> :\n <div className={\"matchid-switch-ball\"}></div>\n }\n </div>\n}","import { useMemo} from \"react\";\nimport {UIProps} from \"../../types\";\n\nexport default function AlphaAvatar({\n name,\n size = \"default\", className = '',style}: {\n name: string,\n size?: number|\"sm\"|\"default\"|\"lg\",\n}&UIProps) {\n\n const avatar = useMemo(()=>{\n if (name) {\n const char = name[0].toUpperCase()\n if (char.match(/[a-zA-Z0-9]/)) {\n return char\n }\n }\n return ''\n },[name])\n\n const numberSize = typeof size === 'number' ? size : size === 'sm' ? 24 : size === 'default' ? 40 : 64\n return <div className={`matchid-alpha-avatar ${className}`} style={{\n width: numberSize,\n height: numberSize,\n fontSize: Math.ceil(numberSize / 2),\n ...style\n }}>\n {avatar}\n </div>\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC2BgB;AAxBD,SAAR,OAAwB;AAAA,EAC3B,OAAK;AAAA,EACL,UAAQ;AAAA,EACR,UAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,WAAS;AAAA,EACT,GAAG;AACwB,GAMrB;AACN,QAAM,UAAU,MAAI;AAChB,QAAG,CAAC,YAAY,CAAC,SAAQ;AACrB,kBAAY,SAAS,CAAC,OAAO;AAAA,IACjC;AAAA,EACJ;AACA,SAAO,oBAAC,SAAI,SAAkB,WAAW,iCAAiC,IAAI,IAAI,UAAU,2BAAyB,EAAE,IAAI,WAAW,4BAA0B,EAAE,IAAI,UAAU,2BAAyB,EAAE,IAAK,GAAG,OAG3M,oBACI,oBAAC,uBAAY,WAAU,+BAA8B,MAAM,QAAM,YAAU,KAAG,IAAI,OAAM,uCAAqC,IAC7H,oBAAC,SAAI,WAAW,uBAAuB,GAEnD;AACJ;;;AC/BA,SAAS,eAAc;AAqBZ,gBAAAA,YAAA;AAlBI,SAAR,YAA6B;AAAA,EACI;AAAA,EACA,OAAO;AAAA,EAAW,YAAY;AAAA,EAAG;AAAK,GAGnE;AAEP,QAAM,SAAS,QAAQ,MAAI;AACvB,QAAI,MAAM;AACN,YAAM,OAAO,KAAK,CAAC,EAAE,YAAY;AACjC,UAAI,KAAK,MAAM,aAAa,GAAG;AAC3B,eAAO;AAAA,MACX;AAAA,IACJ;AACA,WAAO;AAAA,EACX,GAAE,CAAC,IAAI,CAAC;AAER,QAAM,aAAa,OAAO,SAAS,WAAW,OAAO,SAAS,OAAO,KAAK,SAAS,YAAY,KAAK;AACpG,SAAO,gBAAAA,KAAC,SAAI,WAAW,wBAAwB,SAAS,IAAI,OAAO;AAAA,IAC/D,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,UAAU,KAAK,KAAK,aAAa,CAAC;AAAA,IAClC,GAAG;AAAA,EACP,GACK,kBACL;AACJ;","names":["jsx"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { B as BTCModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, P as PasswordModal, S as SOLModal, d as TONModal, T as TRONModal, U as UsernameModal, W as WalletModal } from '../index-
|
|
2
|
-
export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-
|
|
1
|
+
export { B as BTCModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, P as PasswordModal, S as SOLModal, d as TONModal, T as TRONModal, U as UsernameModal, W as WalletModal } from '../index-DM5y3_Gj.mjs';
|
|
2
|
+
export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-B6OKNMN_.mjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-Q3WHZX4Z.mjs';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '../mpc-CTbBWHld.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { B as BTCModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, P as PasswordModal, S as SOLModal, d as TONModal, T as TRONModal, U as UsernameModal, W as WalletModal } from '../index-
|
|
2
|
-
export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-
|
|
1
|
+
export { B as BTCModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, P as PasswordModal, S as SOLModal, d as TONModal, T as TRONModal, U as UsernameModal, W as WalletModal } from '../index-BenUwnaC.js';
|
|
2
|
+
export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-C9lQIgOD.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-Q3WHZX4Z.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '../mpc-CTbBWHld.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { b as bind, p as poh, u as user } from '../../index-
|
|
1
|
+
export { b as bind, p as poh, u as user } from '../../index-Bb5HNcIM.mjs';
|
|
2
2
|
import '@tanstack/react-query';
|
|
3
3
|
import '@tanstack/react-query/src/types';
|
|
4
|
-
import '../../types-
|
|
4
|
+
import '../../types-Q3WHZX4Z.mjs';
|
|
5
5
|
import 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { b as bind, p as poh, u as user } from '../../index-
|
|
1
|
+
export { b as bind, p as poh, u as user } from '../../index-_oiFIWte.js';
|
|
2
2
|
import '@tanstack/react-query';
|
|
3
3
|
import '@tanstack/react-query/src/types';
|
|
4
|
-
import '../../types-
|
|
4
|
+
import '../../types-Q3WHZX4Z.js';
|
|
5
5
|
import 'react';
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { c as useCopyClipboard, d as useLayout, a as useMatchEvents, u as useUserInfo, b as useWallet } from '../index-
|
|
2
|
-
import '../types-
|
|
1
|
+
export { c as useCopyClipboard, d as useLayout, a as useMatchEvents, u as useUserInfo, b as useWallet } from '../index-h1KGzuFo.mjs';
|
|
2
|
+
import '../types-Q3WHZX4Z.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '../mpc-CTbBWHld.mjs';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { c as useCopyClipboard, d as useLayout, a as useMatchEvents, u as useUserInfo, b as useWallet } from '../index-
|
|
2
|
-
import '../types-
|
|
1
|
+
export { c as useCopyClipboard, d as useLayout, a as useMatchEvents, u as useUserInfo, b as useWallet } from '../index-Dxfz0_U2.js';
|
|
2
|
+
import '../types-Q3WHZX4Z.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '../mpc-CTbBWHld.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode, PropsWithChildren } from 'react';
|
|
3
|
-
import { r as InputProps, B as ButtonProps, t as ModalProps, M as ModalWithHeaderProps, w as PopoverProps } from './types-
|
|
3
|
+
import { r as InputProps, B as ButtonProps, t as ModalProps, M as ModalWithHeaderProps, w as PopoverProps } from './types-Q3WHZX4Z.mjs';
|
|
4
4
|
|
|
5
5
|
declare function Field({ label, children, error, required, className }: {
|
|
6
6
|
label: ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions } from '@tanstack/react-query/src/types';
|
|
3
|
-
import { v as PohZkpassParams, l as BindItemType, k as BindInfoType, u as PohItemType } from './types-
|
|
3
|
+
import { v as PohZkpassParams, l as BindItemType, k as BindInfoType, u as PohItemType } from './types-Q3WHZX4Z.mjs';
|
|
4
4
|
|
|
5
5
|
interface MyResponseType<T> {
|
|
6
6
|
code: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { E as EmailModalProps, b as LoginBoxProps, B as ButtonProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, c as WalletType, P as PopoverPositionType, d as PopoverTypeType, e as LoginPanelProps, f as LoginModalProps, M as ModalWithHeaderProps } from './types-
|
|
3
|
-
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-
|
|
2
|
+
import { E as EmailModalProps, b as LoginBoxProps, B as ButtonProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, c as WalletType, P as PopoverPositionType, d as PopoverTypeType, e as LoginPanelProps, f as LoginModalProps, M as ModalWithHeaderProps } from './types-Q3WHZX4Z.js';
|
|
3
|
+
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-C9lQIgOD.js';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { C as ChainType, R as RecoveryType } from './mpc-CTbBWHld.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-
|
|
1
|
+
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-C9lQIgOD.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { n as DrawerProps, y as WalletPanelProps, U as UIProps } from './types-
|
|
3
|
+
import { n as DrawerProps, y as WalletPanelProps, U as UIProps } from './types-Q3WHZX4Z.js';
|
|
4
4
|
import { Hash, Chain } from 'viem';
|
|
5
5
|
|
|
6
6
|
declare function Drawer({ children, showClose, onClose, isOpen }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
@@ -23,6 +23,12 @@ declare function Switch({ size, checked, loading, onChange, className, disabled,
|
|
|
23
23
|
onChange?: (checked: boolean) => void;
|
|
24
24
|
} & UIProps): react_jsx_runtime.JSX.Element;
|
|
25
25
|
|
|
26
|
+
declare function AlphaAvatar({ name, size, className, style }: {
|
|
27
|
+
name: string;
|
|
28
|
+
size?: number | "sm" | "default" | "lg";
|
|
29
|
+
} & UIProps): react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
declare const index_AlphaAvatar: typeof AlphaAvatar;
|
|
26
32
|
declare const index_Button: typeof Button;
|
|
27
33
|
declare const index_Drawer: typeof Drawer;
|
|
28
34
|
declare const index_Field: typeof Field;
|
|
@@ -34,7 +40,7 @@ declare const index_Overlay: typeof Overlay;
|
|
|
34
40
|
declare const index_Popover: typeof Popover;
|
|
35
41
|
declare const index_Switch: typeof Switch;
|
|
36
42
|
declare namespace index {
|
|
37
|
-
export { index_Button as Button, index_Drawer as Drawer, index_Field as Field, export_default as HashPanel, index_Input as Input, index_Modal as Modal, index_ModalDrawer as ModalDrawer, index_ModalWithHeader as ModalWithHeader, index_Overlay as Overlay, index_Popover as Popover, index_Switch as Switch };
|
|
43
|
+
export { index_AlphaAvatar as AlphaAvatar, index_Button as Button, index_Drawer as Drawer, index_Field as Field, export_default as HashPanel, index_Input as Input, index_Modal as Modal, index_ModalDrawer as ModalDrawer, index_ModalWithHeader as ModalWithHeader, index_Overlay as Overlay, index_Popover as Popover, index_Switch as Switch };
|
|
38
44
|
}
|
|
39
45
|
|
|
40
|
-
export { Drawer as D, ModalDrawer as M, Switch as S, export_default as e, index as i };
|
|
46
|
+
export { AlphaAvatar as A, Drawer as D, ModalDrawer as M, Switch as S, export_default as e, index as i };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode, PropsWithChildren } from 'react';
|
|
3
|
-
import { r as InputProps, B as ButtonProps, t as ModalProps, M as ModalWithHeaderProps, w as PopoverProps } from './types-
|
|
3
|
+
import { r as InputProps, B as ButtonProps, t as ModalProps, M as ModalWithHeaderProps, w as PopoverProps } from './types-Q3WHZX4Z.js';
|
|
4
4
|
|
|
5
5
|
declare function Field({ label, children, error, required, className }: {
|
|
6
6
|
label: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AuthParams, C as ChainType, E as EmbeddedWalletsParams, R as RecoveryType } from './mpc-CTbBWHld.js';
|
|
2
|
-
import { A as AnyObject, j as AppConfigType, k as BindInfoType, l as BindItemType, m as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, n as DrawerProps, E as EmailModalProps, a as IEnvConfigType, o as IEnvName, p as ILoginWalletReq, I as IMatchEvents, g as ISocialLoginMethod, q as IconProps, r as InputProps, L as LocaleType, b as LoginBoxProps, i as LoginMethodType, f as LoginModalProps, e as LoginPanelProps, s as MessageType, t as ModalProps, M as ModalWithHeaderProps, O as OtherLoginMethodType, h as OverviewInfo, u as PohItemType, v as PohZkpassParams, P as PopoverPositionType, w as PopoverProps, d as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, U as UIProps, x as UserPopoverProps, W as WalletConfigType, y as WalletPanelProps, z as WalletReceiveMessageType, c as WalletType } from './types-
|
|
2
|
+
import { A as AnyObject, j as AppConfigType, k as BindInfoType, l as BindItemType, m as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, n as DrawerProps, E as EmailModalProps, a as IEnvConfigType, o as IEnvName, p as ILoginWalletReq, I as IMatchEvents, g as ISocialLoginMethod, q as IconProps, r as InputProps, L as LocaleType, b as LoginBoxProps, i as LoginMethodType, f as LoginModalProps, e as LoginPanelProps, s as MessageType, t as ModalProps, M as ModalWithHeaderProps, O as OtherLoginMethodType, h as OverviewInfo, u as PohItemType, v as PohZkpassParams, P as PopoverPositionType, w as PopoverProps, d as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, U as UIProps, x as UserPopoverProps, W as WalletConfigType, y as WalletPanelProps, z as WalletReceiveMessageType, c as WalletType } from './types-Q3WHZX4Z.js';
|
|
3
3
|
|
|
4
4
|
declare const index_AnyObject: typeof AnyObject;
|
|
5
5
|
declare const index_AppConfigType: typeof AppConfigType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { E as EmailModalProps, b as LoginBoxProps, B as ButtonProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, c as WalletType, P as PopoverPositionType, d as PopoverTypeType, e as LoginPanelProps, f as LoginModalProps, M as ModalWithHeaderProps } from './types-
|
|
3
|
-
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-
|
|
2
|
+
import { E as EmailModalProps, b as LoginBoxProps, B as ButtonProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, c as WalletType, P as PopoverPositionType, d as PopoverTypeType, e as LoginPanelProps, f as LoginModalProps, M as ModalWithHeaderProps } from './types-Q3WHZX4Z.mjs';
|
|
3
|
+
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-B6OKNMN_.mjs';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { C as ChainType, R as RecoveryType } from './mpc-CTbBWHld.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-
|
|
1
|
+
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-B6OKNMN_.mjs';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { n as DrawerProps, y as WalletPanelProps, U as UIProps } from './types-
|
|
3
|
+
import { n as DrawerProps, y as WalletPanelProps, U as UIProps } from './types-Q3WHZX4Z.mjs';
|
|
4
4
|
import { Hash, Chain } from 'viem';
|
|
5
5
|
|
|
6
6
|
declare function Drawer({ children, showClose, onClose, isOpen }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
@@ -23,6 +23,12 @@ declare function Switch({ size, checked, loading, onChange, className, disabled,
|
|
|
23
23
|
onChange?: (checked: boolean) => void;
|
|
24
24
|
} & UIProps): react_jsx_runtime.JSX.Element;
|
|
25
25
|
|
|
26
|
+
declare function AlphaAvatar({ name, size, className, style }: {
|
|
27
|
+
name: string;
|
|
28
|
+
size?: number | "sm" | "default" | "lg";
|
|
29
|
+
} & UIProps): react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
declare const index_AlphaAvatar: typeof AlphaAvatar;
|
|
26
32
|
declare const index_Button: typeof Button;
|
|
27
33
|
declare const index_Drawer: typeof Drawer;
|
|
28
34
|
declare const index_Field: typeof Field;
|
|
@@ -34,7 +40,7 @@ declare const index_Overlay: typeof Overlay;
|
|
|
34
40
|
declare const index_Popover: typeof Popover;
|
|
35
41
|
declare const index_Switch: typeof Switch;
|
|
36
42
|
declare namespace index {
|
|
37
|
-
export { index_Button as Button, index_Drawer as Drawer, index_Field as Field, export_default as HashPanel, index_Input as Input, index_Modal as Modal, index_ModalDrawer as ModalDrawer, index_ModalWithHeader as ModalWithHeader, index_Overlay as Overlay, index_Popover as Popover, index_Switch as Switch };
|
|
43
|
+
export { index_AlphaAvatar as AlphaAvatar, index_Button as Button, index_Drawer as Drawer, index_Field as Field, export_default as HashPanel, index_Input as Input, index_Modal as Modal, index_ModalDrawer as ModalDrawer, index_ModalWithHeader as ModalWithHeader, index_Overlay as Overlay, index_Popover as Popover, index_Switch as Switch };
|
|
38
44
|
}
|
|
39
45
|
|
|
40
|
-
export { Drawer as D, ModalDrawer as M, Switch as S, export_default as e, index as i };
|
|
46
|
+
export { AlphaAvatar as A, Drawer as D, ModalDrawer as M, Switch as S, export_default as e, index as i };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ISocialLoginMethod, h as OverviewInfo, C as CEXType, i as LoginMethodType, I as IMatchEvents } from './types-
|
|
1
|
+
import { g as ISocialLoginMethod, h as OverviewInfo, C as CEXType, i as LoginMethodType, I as IMatchEvents } from './types-Q3WHZX4Z.js';
|
|
2
2
|
import * as viem from 'viem';
|
|
3
3
|
import { Account, WalletClientConfig, createWalletClient, SignableMessage, Hex, TransactionSerializable, DeployContractParameters, SendTransactionParameters, WriteContractParameters, Chain } from 'viem';
|
|
4
4
|
import { C as ChainType, R as RecoveryType } from './mpc-CTbBWHld.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions } from '@tanstack/react-query/src/types';
|
|
3
|
-
import { v as PohZkpassParams, l as BindItemType, k as BindInfoType, u as PohItemType } from './types-
|
|
3
|
+
import { v as PohZkpassParams, l as BindItemType, k as BindInfoType, u as PohItemType } from './types-Q3WHZX4Z.js';
|
|
4
4
|
|
|
5
5
|
interface MyResponseType<T> {
|
|
6
6
|
code: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ISocialLoginMethod, h as OverviewInfo, C as CEXType, i as LoginMethodType, I as IMatchEvents } from './types-
|
|
1
|
+
import { g as ISocialLoginMethod, h as OverviewInfo, C as CEXType, i as LoginMethodType, I as IMatchEvents } from './types-Q3WHZX4Z.mjs';
|
|
2
2
|
import * as viem from 'viem';
|
|
3
3
|
import { Account, WalletClientConfig, createWalletClient, SignableMessage, Hex, TransactionSerializable, DeployContractParameters, SendTransactionParameters, WriteContractParameters, Chain } from 'viem';
|
|
4
4
|
import { C as ChainType, R as RecoveryType } from './mpc-CTbBWHld.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AuthParams, C as ChainType, E as EmbeddedWalletsParams, R as RecoveryType } from './mpc-CTbBWHld.mjs';
|
|
2
|
-
import { A as AnyObject, j as AppConfigType, k as BindInfoType, l as BindItemType, m as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, n as DrawerProps, E as EmailModalProps, a as IEnvConfigType, o as IEnvName, p as ILoginWalletReq, I as IMatchEvents, g as ISocialLoginMethod, q as IconProps, r as InputProps, L as LocaleType, b as LoginBoxProps, i as LoginMethodType, f as LoginModalProps, e as LoginPanelProps, s as MessageType, t as ModalProps, M as ModalWithHeaderProps, O as OtherLoginMethodType, h as OverviewInfo, u as PohItemType, v as PohZkpassParams, P as PopoverPositionType, w as PopoverProps, d as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, U as UIProps, x as UserPopoverProps, W as WalletConfigType, y as WalletPanelProps, z as WalletReceiveMessageType, c as WalletType } from './types-
|
|
2
|
+
import { A as AnyObject, j as AppConfigType, k as BindInfoType, l as BindItemType, m as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, n as DrawerProps, E as EmailModalProps, a as IEnvConfigType, o as IEnvName, p as ILoginWalletReq, I as IMatchEvents, g as ISocialLoginMethod, q as IconProps, r as InputProps, L as LocaleType, b as LoginBoxProps, i as LoginMethodType, f as LoginModalProps, e as LoginPanelProps, s as MessageType, t as ModalProps, M as ModalWithHeaderProps, O as OtherLoginMethodType, h as OverviewInfo, u as PohItemType, v as PohZkpassParams, P as PopoverPositionType, w as PopoverProps, d as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, U as UIProps, x as UserPopoverProps, W as WalletConfigType, y as WalletPanelProps, z as WalletReceiveMessageType, c as WalletType } from './types-Q3WHZX4Z.mjs';
|
|
3
3
|
|
|
4
4
|
declare const index_AnyObject: typeof AnyObject;
|
|
5
5
|
declare const index_AppConfigType: typeof AppConfigType;
|
package/dist/index.css
CHANGED
|
@@ -120,7 +120,10 @@ body {
|
|
|
120
120
|
--matchid-switch-checked-bg: var(--matchid-highlight-orange);
|
|
121
121
|
--matchid-switch-disabled-bg: var(--matchid-gray-350-light);
|
|
122
122
|
--matchid-switch-disabled-checked-bg: var(--matchid-highlight-orange-light);
|
|
123
|
-
--matchid-swicth-loading-color:var(--matchid-white)
|
|
123
|
+
--matchid-swicth-loading-color:var(--matchid-white);
|
|
124
|
+
/**avatar**/
|
|
125
|
+
--matchid-avatar-bg: var(--matchid-gray-350);
|
|
126
|
+
--matchid-avatar-color: var(--matchid-gray-600);
|
|
124
127
|
|
|
125
128
|
}
|
|
126
129
|
|
|
@@ -1108,4 +1111,14 @@ body {
|
|
|
1108
1111
|
animation: spin 2s linear infinite;
|
|
1109
1112
|
}
|
|
1110
1113
|
}
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.matchid-alpha-avatar{
|
|
1117
|
+
display: flex;
|
|
1118
|
+
justify-content: center;
|
|
1119
|
+
align-items: center;
|
|
1120
|
+
border-radius: 50%;
|
|
1121
|
+
background: var(--matchid-avatar-bg);
|
|
1122
|
+
color: var(--matchid-avatar-color);
|
|
1123
|
+
font-weight: 500;
|
|
1111
1124
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-
|
|
3
|
-
export { i as Components } from './index-
|
|
4
|
-
export { i as UI } from './index-
|
|
5
|
-
export { i as Hooks } from './index-
|
|
6
|
-
export { i as Api } from './index-
|
|
2
|
+
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-Q3WHZX4Z.mjs';
|
|
3
|
+
export { i as Components } from './index-DM5y3_Gj.mjs';
|
|
4
|
+
export { i as UI } from './index-DYy-xBrS.mjs';
|
|
5
|
+
export { i as Hooks } from './index-h1KGzuFo.mjs';
|
|
6
|
+
export { i as Api } from './index-Bb5HNcIM.mjs';
|
|
7
7
|
export { i as Chains } from './index-DXRGMAbv.mjs';
|
|
8
|
-
export { i as Types } from './index-
|
|
8
|
+
export { i as Types } from './index-oBhm0-55.mjs';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
|
-
import './index-
|
|
10
|
+
import './index-B6OKNMN_.mjs';
|
|
11
11
|
import './mpc-CTbBWHld.mjs';
|
|
12
12
|
import 'viem';
|
|
13
13
|
import 'viem/types/misc';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-
|
|
3
|
-
export { i as Components } from './index-
|
|
4
|
-
export { i as UI } from './index-
|
|
5
|
-
export { i as Hooks } from './index-
|
|
6
|
-
export { i as Api } from './index-
|
|
2
|
+
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-Q3WHZX4Z.js';
|
|
3
|
+
export { i as Components } from './index-BenUwnaC.js';
|
|
4
|
+
export { i as UI } from './index-C76VhJX1.js';
|
|
5
|
+
export { i as Hooks } from './index-Dxfz0_U2.js';
|
|
6
|
+
export { i as Api } from './index-_oiFIWte.js';
|
|
7
7
|
export { i as Chains } from './index-DXRGMAbv.js';
|
|
8
|
-
export { i as Types } from './index-
|
|
8
|
+
export { i as Types } from './index-DHyRhe_l.js';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
|
-
import './index-
|
|
10
|
+
import './index-C9lQIgOD.js';
|
|
11
11
|
import './mpc-CTbBWHld.js';
|
|
12
12
|
import 'viem';
|
|
13
13
|
import 'viem/types/misc';
|
package/dist/index.js
CHANGED
|
@@ -5870,6 +5870,7 @@ var useMatch = () => {
|
|
|
5870
5870
|
// src/ui/index.ts
|
|
5871
5871
|
var ui_exports = {};
|
|
5872
5872
|
__export(ui_exports, {
|
|
5873
|
+
AlphaAvatar: () => AlphaAvatar,
|
|
5873
5874
|
Button: () => Button,
|
|
5874
5875
|
Drawer: () => Drawer,
|
|
5875
5876
|
Field: () => Field,
|
|
@@ -5902,6 +5903,33 @@ function Switch({
|
|
|
5902
5903
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { onClick, className: `matchid-switch matchid-switch-${size} ${checked ? "matchid-switch-checked" : ""} ${disabled ? "matchid-switch-disabled" : ""} ${loading ? "matchid-switch-loading" : ""}`, ...props, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(LoadingIcon_default, { className: "matchid-switch-loading-icon", size: size == "default" ? 24 : 18, color: "var(--matchid-swicth-loading-color)" }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-switch-ball" }) });
|
|
5903
5904
|
}
|
|
5904
5905
|
|
|
5906
|
+
// src/ui/AlphaAvatar/index.tsx
|
|
5907
|
+
var import_react32 = require("react");
|
|
5908
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5909
|
+
function AlphaAvatar({
|
|
5910
|
+
name,
|
|
5911
|
+
size = "default",
|
|
5912
|
+
className = "",
|
|
5913
|
+
style
|
|
5914
|
+
}) {
|
|
5915
|
+
const avatar = (0, import_react32.useMemo)(() => {
|
|
5916
|
+
if (name) {
|
|
5917
|
+
const char = name[0].toUpperCase();
|
|
5918
|
+
if (char.match(/[a-zA-Z0-9]/)) {
|
|
5919
|
+
return char;
|
|
5920
|
+
}
|
|
5921
|
+
}
|
|
5922
|
+
return "";
|
|
5923
|
+
}, [name]);
|
|
5924
|
+
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
5925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5926
|
+
width: numberSize,
|
|
5927
|
+
height: numberSize,
|
|
5928
|
+
fontSize: Math.ceil(numberSize / 2),
|
|
5929
|
+
...style
|
|
5930
|
+
}, children: avatar });
|
|
5931
|
+
}
|
|
5932
|
+
|
|
5905
5933
|
// src/hooks/api/index.ts
|
|
5906
5934
|
var api_exports = {};
|
|
5907
5935
|
__export(api_exports, {
|