@matchain/matchid-sdk-react 0.1.52 → 0.1.53-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/{chunk-OL4R4SZU.mjs → chunk-2DVC6WCN.mjs} +105 -92
- package/dist/chunk-2DVC6WCN.mjs.map +1 -0
- package/dist/{chunk-KJQKG6RI.mjs → chunk-6QTW3KXN.mjs} +2 -2
- package/dist/components/index.js +61 -57
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/hooks/api/index.js +29 -26
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +3 -3
- package/dist/hooks/index.js +21 -17
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.css +18 -5
- package/dist/index.js +97 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/example/dist/assets/TransportWebHID-BEu7tC0r.js +1 -0
- package/example/dist/assets/bignumber-iG7K-qxw.js +10 -0
- package/example/dist/assets/ccip-a6wQ1Vcb.js +1 -0
- package/example/dist/assets/draggabilly-CRYR_S0q.js +14 -0
- package/example/dist/assets/index--dp9m9Ep.js +1 -0
- package/example/dist/assets/index-BDTHolFv.js +569 -0
- package/example/dist/assets/index-BZl59qLb.js +179 -0
- package/example/dist/assets/index-BmMbYNHO.js +303 -0
- package/example/dist/assets/index-C7cxVRDF.js +1677 -0
- package/example/dist/assets/index-CJk171Yb.js +1 -0
- package/example/dist/assets/index-CQiBesAa.js +3 -0
- package/example/dist/assets/index-D62loNA9.js +3 -0
- package/example/dist/assets/index-DqyX3FG6.js +1 -0
- package/example/dist/assets/index-Gy3FXGhr.css +1 -0
- package/example/dist/assets/inherits_browser-BlmhoU4v.js +1 -0
- package/example/dist/assets/solanaEmbed.esm-Djn-u4Vn.js +38 -0
- package/example/dist/index.html +14 -0
- package/example/package.json +2 -1
- package/example/src/App.tsx +18 -5
- package/example/src/store/useLocalStore.ts +9 -0
- package/package.json +1 -1
- package/dist/chunk-OL4R4SZU.mjs.map +0 -1
- /package/dist/{chunk-KJQKG6RI.mjs.map → chunk-6QTW3KXN.mjs.map} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- example/index.html -->
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>MatchID example</title>
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-C7cxVRDF.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Gy3FXGhr.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
package/example/package.json
CHANGED
package/example/src/App.tsx
CHANGED
|
@@ -69,10 +69,20 @@ function Nav() {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
function RouterApp() {
|
|
72
|
-
const {appid, setAppid, locale, setLocale, endpoints, setEndpoints, setWalletType,walletType} = useLocalStore()
|
|
72
|
+
const {appid, setAppid, locale, setLocale, endpoints, setEndpoints, setWalletType,walletType,backgroundColor,setBackgroundColor,color,setColor} = useLocalStore()
|
|
73
73
|
|
|
74
74
|
return <Router>
|
|
75
75
|
<div className={`mb-2 p-2 flex gap-2 flex-col`}>
|
|
76
|
+
<div>
|
|
77
|
+
<label>BackgroundColor:</label>
|
|
78
|
+
<input value={backgroundColor} placeholder={"BackgroundColor"} className={"border-solid border"} onChange={(ele) => {
|
|
79
|
+
setBackgroundColor(ele.target.value)
|
|
80
|
+
}}/></div>
|
|
81
|
+
<div>
|
|
82
|
+
<label>Color:</label>
|
|
83
|
+
<input value={color} placeholder={"Color"} className={"border-solid border"} onChange={(ele) => {
|
|
84
|
+
setColor(ele.target.value)
|
|
85
|
+
}}/></div>
|
|
76
86
|
<div>
|
|
77
87
|
<label>Appid:</label>
|
|
78
88
|
<input value={appid} placeholder={"Appid"} className={"border-solid border"} onChange={(ele) => {
|
|
@@ -105,7 +115,7 @@ function RouterApp() {
|
|
|
105
115
|
<select onChange={(ele) => {
|
|
106
116
|
setWalletType(ele.target.value as any)
|
|
107
117
|
}} value={walletType}>
|
|
108
|
-
{['Base','UserPasscode'].map((item) => <option key={item} value={item}>{item}</option>)}
|
|
118
|
+
{['Base', 'UserPasscode'].map((item) => <option key={item} value={item}>{item}</option>)}
|
|
109
119
|
</select>
|
|
110
120
|
</div>
|
|
111
121
|
</div>
|
|
@@ -125,9 +135,12 @@ function RouterApp() {
|
|
|
125
135
|
}
|
|
126
136
|
|
|
127
137
|
function App() {
|
|
128
|
-
const {appid, locale, endpoints,walletType} = useLocalStore()
|
|
138
|
+
const {appid, locale, endpoints,walletType,backgroundColor,color} = useLocalStore()
|
|
129
139
|
|
|
130
|
-
return <
|
|
140
|
+
return <div style={{
|
|
141
|
+
backgroundColor: backgroundColor,
|
|
142
|
+
color: color
|
|
143
|
+
}}><MatchProvider
|
|
131
144
|
appid={appid}
|
|
132
145
|
endpoints={endpoints}
|
|
133
146
|
locale={locale}
|
|
@@ -144,7 +157,7 @@ function App() {
|
|
|
144
157
|
}}
|
|
145
158
|
>
|
|
146
159
|
<RouterApp/>
|
|
147
|
-
</MatchProvider>;
|
|
160
|
+
</MatchProvider></div>;
|
|
148
161
|
}
|
|
149
162
|
|
|
150
163
|
export default App;
|
|
@@ -11,11 +11,15 @@ interface StoreState {
|
|
|
11
11
|
locale: LocaleType;
|
|
12
12
|
walletType:"Base" | "UserPasscode";
|
|
13
13
|
setWalletType: (walletType: "Base" | "UserPasscode") => void;
|
|
14
|
+
color:string,
|
|
15
|
+
backgroundColor:string,
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
setAppid: (appid: string) => void;
|
|
17
19
|
setEndpoints: (endpoints: StoreState['endpoints']) => void
|
|
18
20
|
setLocale: (locale: LocaleType) => void
|
|
21
|
+
setColor: (color: string) => void
|
|
22
|
+
setBackgroundColor: (backgroundColor: string) => void
|
|
19
23
|
|
|
20
24
|
initChainId: number;
|
|
21
25
|
setInitChainId: (initChainId: number) => void
|
|
@@ -23,6 +27,7 @@ interface StoreState {
|
|
|
23
27
|
erc20Address: string;
|
|
24
28
|
setErc20Address: (erc20Address: string) => void;
|
|
25
29
|
|
|
30
|
+
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
const persistedState = persist<StoreState>(
|
|
@@ -38,6 +43,10 @@ const persistedState = persist<StoreState>(
|
|
|
38
43
|
setLocale: (locale: LocaleType) => set({locale}),
|
|
39
44
|
walletType: "UserPasscode",
|
|
40
45
|
setWalletType: (walletType: "Base" | "UserPasscode") => set({walletType}),
|
|
46
|
+
color: '#000000',
|
|
47
|
+
setColor: (color: string) => set({color}),
|
|
48
|
+
backgroundColor: '#ffffff',
|
|
49
|
+
setBackgroundColor: (backgroundColor: string) => set({backgroundColor}),
|
|
41
50
|
|
|
42
51
|
initChainId:1,
|
|
43
52
|
setInitChainId: (initChainId: number) => set({initChainId}),
|