@aptos-labs/wallet-adapter-react 4.1.5 → 5.0.0
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/WalletProvider.d.ts +6 -1
- package/dist/WalletProvider.d.ts.map +1 -1
- package/dist/components/AptosPrivacyPolicy.d.ts +0 -1
- package/dist/components/AptosPrivacyPolicy.d.ts.map +1 -1
- package/dist/components/WalletItem.d.ts +0 -1
- package/dist/components/WalletItem.d.ts.map +1 -1
- package/dist/index.js +325 -278
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +316 -265
- package/dist/index.mjs.map +1 -1
- package/dist/useWallet.d.ts +4 -1
- package/dist/useWallet.d.ts.map +1 -1
- package/package.json +12 -8
- package/src/WalletProvider.tsx +66 -0
- package/src/useWallet.tsx +6 -0
- package/dist/chunk-3I6M53FQ.mjs +0 -1111
- package/dist/chunk-YWCJOTGX.mjs +0 -58
- package/dist/dist-DBDEL5XP.mjs +0 -36251
- package/dist/main-MZZKSUYR.mjs +0 -35
package/dist/index.js
CHANGED
|
@@ -1,8 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
6
35
|
var __export = (target, all) => {
|
|
7
36
|
for (var name in all)
|
|
8
37
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -17,10 +46,30 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
46
|
};
|
|
18
47
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
48
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
49
|
+
var __async = (__this, __arguments, generator) => {
|
|
50
|
+
return new Promise((resolve, reject) => {
|
|
51
|
+
var fulfilled = (value) => {
|
|
52
|
+
try {
|
|
53
|
+
step(generator.next(value));
|
|
54
|
+
} catch (e) {
|
|
55
|
+
reject(e);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
var rejected = (value) => {
|
|
59
|
+
try {
|
|
60
|
+
step(generator.throw(value));
|
|
61
|
+
} catch (e) {
|
|
62
|
+
reject(e);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
66
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
67
|
+
});
|
|
68
|
+
};
|
|
20
69
|
|
|
21
70
|
// src/index.tsx
|
|
22
|
-
var
|
|
23
|
-
__export(
|
|
71
|
+
var index_exports = {};
|
|
72
|
+
__export(index_exports, {
|
|
24
73
|
APTOS_PRIVACY_POLICY_URL: () => APTOS_PRIVACY_POLICY_URL,
|
|
25
74
|
AboutAptosConnect: () => AboutAptosConnect,
|
|
26
75
|
AptosPrivacyPolicy: () => AptosPrivacyPolicy,
|
|
@@ -30,8 +79,8 @@ __export(src_exports, {
|
|
|
30
79
|
WalletItem: () => WalletItem,
|
|
31
80
|
useWallet: () => useWallet
|
|
32
81
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
__reExport(
|
|
82
|
+
module.exports = __toCommonJS(index_exports);
|
|
83
|
+
__reExport(index_exports, require("@aptos-labs/wallet-adapter-core"), module.exports);
|
|
35
84
|
|
|
36
85
|
// src/WalletProvider.tsx
|
|
37
86
|
var import_wallet_adapter_core = require("@aptos-labs/wallet-adapter-core");
|
|
@@ -54,6 +103,8 @@ function useWallet() {
|
|
|
54
103
|
}
|
|
55
104
|
|
|
56
105
|
// src/WalletProvider.tsx
|
|
106
|
+
var import_derived_wallet_solana = require("@aptos-labs/derived-wallet-solana");
|
|
107
|
+
var import_derived_wallet_ethereum = require("@aptos-labs/derived-wallet-ethereum");
|
|
57
108
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
58
109
|
var initialState = {
|
|
59
110
|
connected: false,
|
|
@@ -110,170 +161,152 @@ var AptosWalletAdapterProvider = ({
|
|
|
110
161
|
return;
|
|
111
162
|
}
|
|
112
163
|
if (!connected) {
|
|
113
|
-
(
|
|
164
|
+
(() => __async(void 0, null, function* () {
|
|
114
165
|
try {
|
|
115
166
|
let shouldConnect = true;
|
|
116
167
|
if (typeof autoConnect === "function") {
|
|
117
|
-
shouldConnect =
|
|
168
|
+
shouldConnect = yield autoConnect(walletCore, selectedWallet);
|
|
118
169
|
} else {
|
|
119
170
|
shouldConnect = autoConnect;
|
|
120
171
|
}
|
|
121
|
-
if (shouldConnect)
|
|
122
|
-
await connect(walletName);
|
|
172
|
+
if (shouldConnect) yield connect(walletName);
|
|
123
173
|
} catch (error) {
|
|
124
|
-
if (onError)
|
|
125
|
-
onError(error);
|
|
174
|
+
if (onError) onError(error);
|
|
126
175
|
return Promise.reject(error);
|
|
127
176
|
} finally {
|
|
128
177
|
setIsLoading(false);
|
|
129
178
|
}
|
|
130
|
-
})();
|
|
179
|
+
}))();
|
|
131
180
|
} else {
|
|
132
181
|
setIsLoading(false);
|
|
133
182
|
}
|
|
134
183
|
}, [autoConnect, wallets]);
|
|
135
|
-
const connect =
|
|
184
|
+
const connect = (walletName) => __async(void 0, null, function* () {
|
|
136
185
|
try {
|
|
137
186
|
setIsLoading(true);
|
|
138
|
-
|
|
187
|
+
yield walletCore == null ? void 0 : walletCore.connect(walletName);
|
|
139
188
|
} catch (error) {
|
|
140
|
-
if (onError)
|
|
141
|
-
onError(error);
|
|
189
|
+
if (onError) onError(error);
|
|
142
190
|
return Promise.reject(error);
|
|
143
191
|
} finally {
|
|
144
192
|
setIsLoading(false);
|
|
145
193
|
}
|
|
146
|
-
};
|
|
147
|
-
const signIn =
|
|
194
|
+
});
|
|
195
|
+
const signIn = (args) => __async(void 0, null, function* () {
|
|
148
196
|
try {
|
|
149
197
|
setIsLoading(true);
|
|
150
|
-
return
|
|
198
|
+
return yield walletCore == null ? void 0 : walletCore.signIn(args);
|
|
151
199
|
} catch (error) {
|
|
152
|
-
if (onError)
|
|
153
|
-
onError(error);
|
|
200
|
+
if (onError) onError(error);
|
|
154
201
|
return Promise.reject(error);
|
|
155
202
|
} finally {
|
|
156
203
|
setIsLoading(false);
|
|
157
204
|
}
|
|
158
|
-
};
|
|
159
|
-
const disconnect =
|
|
205
|
+
});
|
|
206
|
+
const disconnect = () => __async(void 0, null, function* () {
|
|
160
207
|
try {
|
|
161
|
-
|
|
208
|
+
yield walletCore == null ? void 0 : walletCore.disconnect();
|
|
162
209
|
} catch (error) {
|
|
163
|
-
if (onError)
|
|
164
|
-
onError(error);
|
|
210
|
+
if (onError) onError(error);
|
|
165
211
|
return Promise.reject(error);
|
|
166
212
|
}
|
|
167
|
-
};
|
|
168
|
-
const signAndSubmitTransaction =
|
|
213
|
+
});
|
|
214
|
+
const signAndSubmitTransaction = (transaction) => __async(void 0, null, function* () {
|
|
169
215
|
try {
|
|
170
216
|
if (!walletCore) {
|
|
171
217
|
throw new Error("WalletCore is not initialized");
|
|
172
218
|
}
|
|
173
|
-
return
|
|
219
|
+
return yield walletCore.signAndSubmitTransaction(transaction);
|
|
174
220
|
} catch (error) {
|
|
175
|
-
if (onError)
|
|
176
|
-
onError(error);
|
|
221
|
+
if (onError) onError(error);
|
|
177
222
|
return Promise.reject(error);
|
|
178
223
|
}
|
|
179
|
-
};
|
|
180
|
-
const signTransaction =
|
|
224
|
+
});
|
|
225
|
+
const signTransaction = (args) => __async(void 0, null, function* () {
|
|
181
226
|
const { transactionOrPayload, asFeePayer, options } = args;
|
|
182
227
|
if (!walletCore) {
|
|
183
228
|
throw new Error("WalletCore is not initialized");
|
|
184
229
|
}
|
|
185
230
|
try {
|
|
186
|
-
return
|
|
231
|
+
return yield walletCore.signTransaction({
|
|
187
232
|
transactionOrPayload,
|
|
188
233
|
asFeePayer
|
|
189
234
|
});
|
|
190
235
|
} catch (error) {
|
|
191
|
-
if (onError)
|
|
192
|
-
onError(error);
|
|
236
|
+
if (onError) onError(error);
|
|
193
237
|
return Promise.reject(error);
|
|
194
238
|
}
|
|
195
|
-
};
|
|
196
|
-
const submitTransaction =
|
|
239
|
+
});
|
|
240
|
+
const submitTransaction = (transaction) => __async(void 0, null, function* () {
|
|
197
241
|
if (!walletCore) {
|
|
198
242
|
throw new Error("WalletCore is not initialized");
|
|
199
243
|
}
|
|
200
244
|
try {
|
|
201
|
-
return
|
|
245
|
+
return yield walletCore == null ? void 0 : walletCore.submitTransaction(transaction);
|
|
202
246
|
} catch (error) {
|
|
203
|
-
if (onError)
|
|
204
|
-
onError(error);
|
|
247
|
+
if (onError) onError(error);
|
|
205
248
|
return Promise.reject(error);
|
|
206
249
|
}
|
|
207
|
-
};
|
|
208
|
-
const signMessage =
|
|
250
|
+
});
|
|
251
|
+
const signMessage = (message) => __async(void 0, null, function* () {
|
|
209
252
|
if (!walletCore) {
|
|
210
253
|
throw new Error("WalletCore is not initialized");
|
|
211
254
|
}
|
|
212
255
|
try {
|
|
213
|
-
return
|
|
256
|
+
return yield walletCore == null ? void 0 : walletCore.signMessage(message);
|
|
214
257
|
} catch (error) {
|
|
215
|
-
if (onError)
|
|
216
|
-
onError(error);
|
|
258
|
+
if (onError) onError(error);
|
|
217
259
|
return Promise.reject(error);
|
|
218
260
|
}
|
|
219
|
-
};
|
|
220
|
-
const signMessageAndVerify =
|
|
261
|
+
});
|
|
262
|
+
const signMessageAndVerify = (message) => __async(void 0, null, function* () {
|
|
221
263
|
if (!walletCore) {
|
|
222
264
|
throw new Error("WalletCore is not initialized");
|
|
223
265
|
}
|
|
224
266
|
try {
|
|
225
|
-
return
|
|
267
|
+
return yield walletCore == null ? void 0 : walletCore.signMessageAndVerify(message);
|
|
226
268
|
} catch (error) {
|
|
227
|
-
if (onError)
|
|
228
|
-
onError(error);
|
|
269
|
+
if (onError) onError(error);
|
|
229
270
|
return Promise.reject(error);
|
|
230
271
|
}
|
|
231
|
-
};
|
|
232
|
-
const changeNetwork =
|
|
272
|
+
});
|
|
273
|
+
const changeNetwork = (network2) => __async(void 0, null, function* () {
|
|
233
274
|
if (!walletCore) {
|
|
234
275
|
throw new Error("WalletCore is not initialized");
|
|
235
276
|
}
|
|
236
277
|
try {
|
|
237
|
-
return
|
|
278
|
+
return yield walletCore == null ? void 0 : walletCore.changeNetwork(network2);
|
|
238
279
|
} catch (error) {
|
|
239
|
-
if (onError)
|
|
240
|
-
onError(error);
|
|
280
|
+
if (onError) onError(error);
|
|
241
281
|
return Promise.reject(error);
|
|
242
282
|
}
|
|
243
|
-
};
|
|
283
|
+
});
|
|
244
284
|
const handleConnect = () => {
|
|
245
285
|
setState((state) => {
|
|
246
|
-
return {
|
|
247
|
-
...state,
|
|
286
|
+
return __spreadProps(__spreadValues({}, state), {
|
|
248
287
|
connected: true,
|
|
249
288
|
account: (walletCore == null ? void 0 : walletCore.account) || null,
|
|
250
289
|
network: (walletCore == null ? void 0 : walletCore.network) || null,
|
|
251
290
|
wallet: (walletCore == null ? void 0 : walletCore.wallet) || null
|
|
252
|
-
};
|
|
291
|
+
});
|
|
253
292
|
});
|
|
254
293
|
};
|
|
255
294
|
const handleAccountChange = (0, import_react2.useCallback)(() => {
|
|
256
|
-
if (!connected)
|
|
257
|
-
|
|
258
|
-
if (!(walletCore == null ? void 0 : walletCore.wallet))
|
|
259
|
-
return;
|
|
295
|
+
if (!connected) return;
|
|
296
|
+
if (!(walletCore == null ? void 0 : walletCore.wallet)) return;
|
|
260
297
|
setState((state) => {
|
|
261
|
-
return {
|
|
262
|
-
...state,
|
|
298
|
+
return __spreadProps(__spreadValues({}, state), {
|
|
263
299
|
account: (walletCore == null ? void 0 : walletCore.account) || null
|
|
264
|
-
};
|
|
300
|
+
});
|
|
265
301
|
});
|
|
266
302
|
}, [connected]);
|
|
267
303
|
const handleNetworkChange = (0, import_react2.useCallback)(() => {
|
|
268
|
-
if (!connected)
|
|
269
|
-
|
|
270
|
-
if (!(walletCore == null ? void 0 : walletCore.wallet))
|
|
271
|
-
return;
|
|
304
|
+
if (!connected) return;
|
|
305
|
+
if (!(walletCore == null ? void 0 : walletCore.wallet)) return;
|
|
272
306
|
setState((state) => {
|
|
273
|
-
return {
|
|
274
|
-
...state,
|
|
307
|
+
return __spreadProps(__spreadValues({}, state), {
|
|
275
308
|
network: (walletCore == null ? void 0 : walletCore.network) || null
|
|
276
|
-
};
|
|
309
|
+
});
|
|
277
310
|
});
|
|
278
311
|
}, [connected]);
|
|
279
312
|
(0, import_react2.useEffect)(() => {
|
|
@@ -283,16 +316,14 @@ var AptosWalletAdapterProvider = ({
|
|
|
283
316
|
}
|
|
284
317
|
}, [connected]);
|
|
285
318
|
const handleDisconnect = () => {
|
|
286
|
-
if (!connected)
|
|
287
|
-
return;
|
|
319
|
+
if (!connected) return;
|
|
288
320
|
setState((state) => {
|
|
289
|
-
return {
|
|
290
|
-
...state,
|
|
321
|
+
return __spreadProps(__spreadValues({}, state), {
|
|
291
322
|
connected: false,
|
|
292
323
|
account: (walletCore == null ? void 0 : walletCore.account) || null,
|
|
293
324
|
network: (walletCore == null ? void 0 : walletCore.network) || null,
|
|
294
325
|
wallet: null
|
|
295
|
-
};
|
|
326
|
+
});
|
|
296
327
|
});
|
|
297
328
|
};
|
|
298
329
|
const handleStandardWalletsAdded = (standardWallet) => {
|
|
@@ -345,27 +376,60 @@ var AptosWalletAdapterProvider = ({
|
|
|
345
376
|
);
|
|
346
377
|
};
|
|
347
378
|
}, [wallets, account]);
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}
|
|
379
|
+
function getOriginWalletDetails(wallet2) {
|
|
380
|
+
return __async(this, null, function* () {
|
|
381
|
+
var _a;
|
|
382
|
+
if (isSolanaDerivedWallet(wallet2)) {
|
|
383
|
+
const publicKey = wallet2.solanaWallet.publicKey;
|
|
384
|
+
return {
|
|
385
|
+
publicKey: publicKey != null ? publicKey : void 0,
|
|
386
|
+
address: (_a = publicKey == null ? void 0 : publicKey.toBase58()) != null ? _a : ""
|
|
387
|
+
};
|
|
388
|
+
} else if (isEIP1193DerivedWallet(wallet2)) {
|
|
389
|
+
const [activeAccount] = yield wallet2.eip1193Ethers.listAccounts();
|
|
390
|
+
return {
|
|
391
|
+
publicKey: void 0,
|
|
392
|
+
// No public key for EVM wallets
|
|
393
|
+
address: activeAccount.address
|
|
394
|
+
};
|
|
395
|
+
} else {
|
|
396
|
+
return void 0;
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
function isSolanaDerivedWallet(wallet2) {
|
|
401
|
+
return wallet2 instanceof import_derived_wallet_solana.SolanaDerivedWallet;
|
|
402
|
+
}
|
|
403
|
+
function isEIP1193DerivedWallet(wallet2) {
|
|
404
|
+
return wallet2 instanceof import_derived_wallet_ethereum.EIP1193DerivedWallet;
|
|
405
|
+
}
|
|
406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
407
|
+
WalletContext.Provider,
|
|
408
|
+
{
|
|
409
|
+
value: {
|
|
410
|
+
connect,
|
|
411
|
+
signIn,
|
|
412
|
+
disconnect,
|
|
413
|
+
signAndSubmitTransaction,
|
|
414
|
+
signTransaction,
|
|
415
|
+
signMessage,
|
|
416
|
+
signMessageAndVerify,
|
|
417
|
+
changeNetwork,
|
|
418
|
+
submitTransaction,
|
|
419
|
+
getOriginWalletDetails,
|
|
420
|
+
isSolanaDerivedWallet,
|
|
421
|
+
isEIP1193DerivedWallet,
|
|
422
|
+
account,
|
|
423
|
+
network,
|
|
424
|
+
connected,
|
|
425
|
+
wallet,
|
|
426
|
+
wallets,
|
|
427
|
+
notDetectedWallets,
|
|
428
|
+
isLoading
|
|
429
|
+
},
|
|
430
|
+
children
|
|
431
|
+
}
|
|
432
|
+
);
|
|
369
433
|
};
|
|
370
434
|
|
|
371
435
|
// src/components/AboutAptosConnect.tsx
|
|
@@ -373,140 +437,122 @@ var import_react7 = require("react");
|
|
|
373
437
|
|
|
374
438
|
// src/graphics/LinkGraphic.tsx
|
|
375
439
|
var import_react3 = require("react");
|
|
376
|
-
var
|
|
440
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
377
441
|
var LinkGraphic = (0, import_react3.forwardRef)(
|
|
378
442
|
(props, ref) => {
|
|
379
|
-
return /* @__PURE__ */ (0,
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
strokeMiterlimit: "10",
|
|
389
|
-
|
|
390
|
-
/* @__PURE__ */ (0,
|
|
391
|
-
|
|
392
|
-
}),
|
|
393
|
-
/* @__PURE__ */ (0,
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
397
|
-
d: "M41.211 78.85c11.332 6.248 25.583 2.14 31.84-9.177l17.518-31.691c6.256-11.317 2.142-25.55-9.19-31.798-6.085-3.357-13.018-3.724-19.104-1.59A23.31 23.31 0 0 0 49.541 15.36L36.863 38.298l7.989 5.036 12.506-22.627c3.786-6.848 12.419-9.34 19.276-5.554 6.856 3.78 9.353 12.402 5.561 19.25l-16.634 30.1c-3.785 6.848-12.418 9.341-19.275 5.555l-5.075 8.791ZM29.5 130.447c12.361-1.37 19.2-6.994 22.966-13.804l12.678-22.936-8.305-5.239"
|
|
398
|
-
}),
|
|
399
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
400
|
-
d: "m55.72 61.947-.442.764 5.511-9.55c-6.901-3.806-18.65-3.124-27.105.814M44.85 43.523l7.635-2.486m-4.221 23.264 7.217-1.723m-9.316 7.517 7.59-2.405m-.562-12.156 7.508-2.221m10.136-51.32L62.761 4.43M49.642 90.778l7.514-2.26m.474 7.448 7.514-2.26m-50.306-60.13c7.135 0 12.918-5.776 12.918-12.9 0-7.126-5.783-12.902-12.918-12.902-7.134 0-12.917 5.776-12.917 12.901s5.783 12.901 12.918 12.901Z"
|
|
401
|
-
}),
|
|
402
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
403
|
-
d: "M15.724 7.774h3.197c7.135 0 12.918 5.776 12.918 12.901 0 7.126-5.783 12.901-12.918 12.901h-3.425m65.112 66.935h3.198c7.135 0 12.918 5.775 12.918 12.901 0 7.125-5.783 12.9-12.918 12.9h-3.425"
|
|
404
|
-
}),
|
|
405
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
406
|
-
d: "M79.717 126.312c7.135 0 12.918-5.775 12.918-12.9s-5.783-12.901-12.918-12.901c-7.134 0-12.917 5.776-12.917 12.901s5.783 12.9 12.917 12.9ZM53.281 55.414c-11.33-6.248-25.582-2.14-31.839 9.177L3.924 96.281c-6.257 11.318-2.142 25.55 9.189 31.799 11.331 6.248 25.582 2.139 31.839-9.177l12.677-22.937-7.988-5.036-12.507 22.627c-3.785 6.848-12.418 9.341-19.275 5.554-6.857-3.781-9.353-12.402-5.561-19.25l16.633-30.1c3.786-6.848 12.419-9.341 19.276-5.555l5.074-8.792Z"
|
|
407
|
-
})
|
|
408
|
-
]
|
|
443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
444
|
+
"svg",
|
|
445
|
+
__spreadProps(__spreadValues({
|
|
446
|
+
ref,
|
|
447
|
+
width: "102",
|
|
448
|
+
height: "132",
|
|
449
|
+
viewBox: "0 0 102 132",
|
|
450
|
+
fill: "none"
|
|
451
|
+
}, props), {
|
|
452
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { stroke: "currentColor", strokeMiterlimit: "10", children: [
|
|
453
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M59.633 80.66c11.742-2.814 17.48-7.018 20.925-13.254l17.518-31.69c6.257-11.317 2.142-25.55-9.189-31.798C82.737.53 75.723.188 69.593 2.398M60.7 69.565a14.09 14.09 0 0 1-6.907-1.767l-.228-.108" }),
|
|
454
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m52.365 41.075 12.507-22.627a14.146 14.146 0 0 1 4.727-5.062M32.407 118.619a14.139 14.139 0 0 1-7.034-1.768c-6.857-3.78-9.353-12.402-5.561-19.25l16.634-30.1a14.097 14.097 0 0 1 4.518-4.923" }),
|
|
455
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M41.211 78.85c11.332 6.248 25.583 2.14 31.84-9.177l17.518-31.691c6.256-11.317 2.142-25.55-9.19-31.798-6.085-3.357-13.018-3.724-19.104-1.59A23.31 23.31 0 0 0 49.541 15.36L36.863 38.298l7.989 5.036 12.506-22.627c3.786-6.848 12.419-9.34 19.276-5.554 6.856 3.78 9.353 12.402 5.561 19.25l-16.634 30.1c-3.785 6.848-12.418 9.341-19.275 5.555l-5.075 8.791ZM29.5 130.447c12.361-1.37 19.2-6.994 22.966-13.804l12.678-22.936-8.305-5.239" }),
|
|
456
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m55.72 61.947-.442.764 5.511-9.55c-6.901-3.806-18.65-3.124-27.105.814M44.85 43.523l7.635-2.486m-4.221 23.264 7.217-1.723m-9.316 7.517 7.59-2.405m-.562-12.156 7.508-2.221m10.136-51.32L62.761 4.43M49.642 90.778l7.514-2.26m.474 7.448 7.514-2.26m-50.306-60.13c7.135 0 12.918-5.776 12.918-12.9 0-7.126-5.783-12.902-12.918-12.902-7.134 0-12.917 5.776-12.917 12.901s5.783 12.901 12.918 12.901Z" }),
|
|
457
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M15.724 7.774h3.197c7.135 0 12.918 5.776 12.918 12.901 0 7.126-5.783 12.901-12.918 12.901h-3.425m65.112 66.935h3.198c7.135 0 12.918 5.775 12.918 12.901 0 7.125-5.783 12.9-12.918 12.9h-3.425" }),
|
|
458
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M79.717 126.312c7.135 0 12.918-5.775 12.918-12.9s-5.783-12.901-12.918-12.901c-7.134 0-12.917 5.776-12.917 12.901s5.783 12.9 12.917 12.9ZM53.281 55.414c-11.33-6.248-25.582-2.14-31.839 9.177L3.924 96.281c-6.257 11.318-2.142 25.55 9.189 31.799 11.331 6.248 25.582 2.139 31.839-9.177l12.677-22.937-7.988-5.036-12.507 22.627c-3.785 6.848-12.418 9.341-19.275 5.554-6.857-3.781-9.353-12.402-5.561-19.25l16.633-30.1c3.786-6.848 12.419-9.341 19.276-5.555l5.074-8.792Z" })
|
|
459
|
+
] })
|
|
409
460
|
})
|
|
410
|
-
|
|
461
|
+
);
|
|
411
462
|
}
|
|
412
463
|
);
|
|
413
464
|
LinkGraphic.displayName = "LinkGraphic";
|
|
414
465
|
|
|
415
466
|
// src/graphics/WalletGraphic.tsx
|
|
416
467
|
var import_react4 = require("react");
|
|
417
|
-
var
|
|
468
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
418
469
|
var WalletGraphic = (0, import_react4.forwardRef)(
|
|
419
470
|
(props, ref) => {
|
|
420
|
-
return /* @__PURE__ */ (0,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
472
|
+
"svg",
|
|
473
|
+
__spreadProps(__spreadValues({
|
|
474
|
+
ref,
|
|
475
|
+
width: "128",
|
|
476
|
+
height: "102",
|
|
477
|
+
viewBox: "0 0 128 102",
|
|
478
|
+
fill: "none"
|
|
479
|
+
}, props), {
|
|
480
|
+
children: [
|
|
481
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
482
|
+
"path",
|
|
483
|
+
{
|
|
484
|
+
fill: "currentColor",
|
|
485
|
+
d: "m.96 25.93-.36-.35.36.85v-.5Zm7.79-7.81v-.5h-.21l-.15.15.36.35ZM1.3 26.28l7.79-7.8-.7-.71-7.8 7.8.7.71Zm7.44-7.66H10v-1H8.75v1Zm29.22 6.8h-37v1h37.01v-1Z"
|
|
486
|
+
}
|
|
487
|
+
),
|
|
488
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
489
|
+
"path",
|
|
490
|
+
{
|
|
491
|
+
stroke: "currentColor",
|
|
492
|
+
strokeMiterlimit: "10",
|
|
493
|
+
d: "M82.25 26.08c0 12.25-9.92 22.2-22.14 22.2a22.17 22.17 0 0 1-22.14-22.2H1.1v74.82h118.02V26.08H82.25Zm44.33 67.02h.33V18.27h-5.7"
|
|
494
|
+
}
|
|
495
|
+
),
|
|
496
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
497
|
+
"path",
|
|
498
|
+
{
|
|
499
|
+
stroke: "currentColor",
|
|
500
|
+
strokeMiterlimit: "10",
|
|
501
|
+
d: "M74.52 42.92a22.4 22.4 0 0 1-11.43 3.3 22.5 22.5 0 0 1-22.46-22.53H9.52M119.22 101l7.78-7.82m-7.88-67.1 7.79-7.81m-44.78 7.72 2.73-2.3m-46.89 2.39 2.39-2.4"
|
|
502
|
+
}
|
|
503
|
+
),
|
|
504
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
505
|
+
"path",
|
|
506
|
+
{
|
|
507
|
+
stroke: "currentColor",
|
|
508
|
+
strokeMiterlimit: "10",
|
|
509
|
+
d: "M9.86 23.69V5.72h107.97v18.04H84.65"
|
|
510
|
+
}
|
|
511
|
+
),
|
|
512
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
513
|
+
"path",
|
|
514
|
+
{
|
|
515
|
+
stroke: "currentColor",
|
|
516
|
+
strokeMiterlimit: "10",
|
|
517
|
+
d: "M117.83 20.46h3.39V1H13.25v4.72M9.36 23.69h31.78"
|
|
518
|
+
}
|
|
519
|
+
)
|
|
520
|
+
]
|
|
521
|
+
})
|
|
522
|
+
);
|
|
454
523
|
}
|
|
455
524
|
);
|
|
456
525
|
WalletGraphic.displayName = "WalletGraphic";
|
|
457
526
|
|
|
458
527
|
// src/graphics/Web3Graphic.tsx
|
|
459
528
|
var import_react5 = require("react");
|
|
460
|
-
var
|
|
529
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
461
530
|
var Web3Graphic = (0, import_react5.forwardRef)(
|
|
462
531
|
(props, ref) => {
|
|
463
|
-
return /* @__PURE__ */ (0,
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
strokeLinejoin: "round",
|
|
473
|
-
|
|
474
|
-
/* @__PURE__ */ (0,
|
|
475
|
-
|
|
476
|
-
}),
|
|
477
|
-
/* @__PURE__ */ (0,
|
|
478
|
-
|
|
479
|
-
}),
|
|
480
|
-
/* @__PURE__ */ (0,
|
|
481
|
-
|
|
482
|
-
}),
|
|
483
|
-
/* @__PURE__ */ (0,
|
|
484
|
-
|
|
485
|
-
}),
|
|
486
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
487
|
-
d: "M1.22 50.6a77387.2 77387.2 0 0 0 35.22 20.18l-.1 9.14L1 59.68l.23-9.07h-.01ZM141 59.68l-.23-9.07-35.33-19.8.11 9L133 55"
|
|
488
|
-
}),
|
|
489
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
490
|
-
d: "m105.44 30.8.11 9-.1-9Z"
|
|
491
|
-
}),
|
|
492
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
493
|
-
d: "M71 59.51v-9.07l34.44-19.64.11 9L78.5 55"
|
|
494
|
-
}),
|
|
495
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
496
|
-
d: "M71 59.51v-9.07l34.56 20.34.1 9.14L87 69"
|
|
497
|
-
}),
|
|
498
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
499
|
-
d: "M140.78 50.6a78487.3 78487.3 0 0 1-35.23 20.18l.11 9.14L141 59.68l-.23-9.07ZM50.83 80.15l.06-6.33 20.1-23.38H71v9.26L55 79"
|
|
500
|
-
}),
|
|
501
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
502
|
-
d: "M71.3 97.6 50.89 73.81l-.06 9.33L71.3 107v-9.4Zm20.03-14.5-.07-9.33L71 50.44v9.26l16 18.8"
|
|
503
|
-
}),
|
|
504
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
505
|
-
d: "m71.3 97.6 19.96-23.83.06 9.33L71.3 107v-9.4Z"
|
|
506
|
-
})
|
|
507
|
-
]
|
|
532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
533
|
+
"svg",
|
|
534
|
+
__spreadProps(__spreadValues({
|
|
535
|
+
ref,
|
|
536
|
+
width: "142",
|
|
537
|
+
height: "108",
|
|
538
|
+
viewBox: "0 0 142 108",
|
|
539
|
+
fill: "none"
|
|
540
|
+
}, props), {
|
|
541
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("g", { stroke: "currentColor", strokeLinejoin: "round", children: [
|
|
542
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m91.26 35.8.06-10.46L71.3 1v10.53L87 30.5m-36.11 5.24-.06-10.45L71.3 1v10.53L55 30.5" }),
|
|
543
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M71 59.55V49.17L50.83 25.3l.06 10.45L57 42.5m14 17.05V49.18l20.33-23.84-.07 10.45L86 42M1 59.68l.22-9.07 35.33-19.8-.1 9L9 55" }),
|
|
544
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M36.55 30.8s-.08 5.92-.1 9l.1-9ZM71 59.51v-9.07L36.55 30.8l-.1 9L63.5 55" }),
|
|
545
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M71 59.51v-9.07L36.44 70.78l-.1 9.14L55.5 68.5" }),
|
|
546
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M1.22 50.6a77387.2 77387.2 0 0 0 35.22 20.18l-.1 9.14L1 59.68l.23-9.07h-.01ZM141 59.68l-.23-9.07-35.33-19.8.11 9L133 55" }),
|
|
547
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m105.44 30.8.11 9-.1-9Z" }),
|
|
548
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M71 59.51v-9.07l34.44-19.64.11 9L78.5 55" }),
|
|
549
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M71 59.51v-9.07l34.56 20.34.1 9.14L87 69" }),
|
|
550
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M140.78 50.6a78487.3 78487.3 0 0 1-35.23 20.18l.11 9.14L141 59.68l-.23-9.07ZM50.83 80.15l.06-6.33 20.1-23.38H71v9.26L55 79" }),
|
|
551
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M71.3 97.6 50.89 73.81l-.06 9.33L71.3 107v-9.4Zm20.03-14.5-.07-9.33L71 50.44v9.26l16 18.8" }),
|
|
552
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m71.3 97.6 19.96-23.83.06 9.33L71.3 107v-9.4Z" })
|
|
553
|
+
] })
|
|
508
554
|
})
|
|
509
|
-
|
|
555
|
+
);
|
|
510
556
|
}
|
|
511
557
|
);
|
|
512
558
|
Web3Graphic.displayName = "Web3Graphic";
|
|
@@ -514,25 +560,38 @@ Web3Graphic.displayName = "Web3Graphic";
|
|
|
514
560
|
// src/components/utils.tsx
|
|
515
561
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
516
562
|
var import_react6 = require("react");
|
|
517
|
-
var
|
|
563
|
+
var import_jsx_runtime5 = (
|
|
564
|
+
/**
|
|
565
|
+
* Due to the complexity of the types at play, TypeScript reports the
|
|
566
|
+
* following error for our JSX below:
|
|
567
|
+
*
|
|
568
|
+
* `Expression produces a union type that is too complex to represent.`
|
|
569
|
+
*
|
|
570
|
+
* We can safely ignore this error and retain accurate return types for
|
|
571
|
+
* consumers of this function. The only drawback is that type-checking is
|
|
572
|
+
* ignored for the JSX block below.
|
|
573
|
+
*/
|
|
574
|
+
// @ts-expect-error
|
|
575
|
+
require("react/jsx-runtime")
|
|
576
|
+
);
|
|
518
577
|
function createHeadlessComponent(displayName, elementType, props) {
|
|
519
578
|
const component = (0, import_react6.forwardRef)(({ className, asChild, children }, ref) => {
|
|
520
579
|
const Component = asChild ? import_react_slot.Slot : elementType;
|
|
521
|
-
const
|
|
522
|
-
const resolvedChildren =
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
});
|
|
580
|
+
const _a = typeof props === "function" ? props(displayName) : props != null ? props : {}, { children: defaultChildren } = _a, resolvedProps = __objRest(_a, ["children"]);
|
|
581
|
+
const resolvedChildren = (
|
|
582
|
+
/**
|
|
583
|
+
* Use props' default children if no children are set in the component element's children and when asChild is true.
|
|
584
|
+
*/
|
|
585
|
+
asChild && (0, import_react6.isValidElement)(children) && !children.props.children ? (0, import_react6.cloneElement)(children, {}, defaultChildren) : children != null ? children : defaultChildren
|
|
586
|
+
);
|
|
587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Component, __spreadProps(__spreadValues({ ref, className }, resolvedProps), { children: resolvedChildren }));
|
|
529
588
|
});
|
|
530
589
|
component.displayName = displayName;
|
|
531
590
|
return component;
|
|
532
591
|
}
|
|
533
592
|
|
|
534
593
|
// src/components/AboutAptosConnect.tsx
|
|
535
|
-
var
|
|
594
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
536
595
|
var EXPLORE_ECOSYSTEM_URL = "https://aptosfoundation.org/ecosystem/projects/all";
|
|
537
596
|
var AboutAptosConnectContext = (0, import_react7.createContext)(null);
|
|
538
597
|
function useAboutAptosConnectContext(displayName) {
|
|
@@ -569,19 +628,20 @@ var educationScreens = [
|
|
|
569
628
|
children: "Explore more of web3."
|
|
570
629
|
}),
|
|
571
630
|
Description: createHeadlessComponent("EducationScreen.Description", "p", {
|
|
572
|
-
children: /* @__PURE__ */ (0,
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
631
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
632
|
+
"Aptos Connect lets you take one account across any application built on Aptos.",
|
|
633
|
+
" ",
|
|
634
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
635
|
+
"a",
|
|
636
|
+
{
|
|
577
637
|
href: EXPLORE_ECOSYSTEM_URL,
|
|
578
638
|
target: "_blank",
|
|
579
639
|
rel: "noopener noreferrer",
|
|
580
640
|
children: "Explore the ecosystem"
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
})
|
|
641
|
+
}
|
|
642
|
+
),
|
|
643
|
+
"."
|
|
644
|
+
] })
|
|
585
645
|
})
|
|
586
646
|
}
|
|
587
647
|
];
|
|
@@ -606,8 +666,7 @@ var educationScreenIndicators = Array(educationScreens.length).fill(null).map(
|
|
|
606
666
|
var Root = ({ renderEducationScreen, children }) => {
|
|
607
667
|
const [screenIndex, setScreenIndex] = (0, import_react7.useState)(0);
|
|
608
668
|
const currentEducationScreen = (0, import_react7.useMemo)(
|
|
609
|
-
() => educationScreens.map((screen, i) => ({
|
|
610
|
-
...screen,
|
|
669
|
+
() => educationScreens.map((screen, i) => __spreadProps(__spreadValues({}, screen), {
|
|
611
670
|
screenIndex: i,
|
|
612
671
|
totalScreens: educationScreens.length,
|
|
613
672
|
screenIndicators: educationScreenIndicators,
|
|
@@ -625,10 +684,7 @@ var Root = ({ renderEducationScreen, children }) => {
|
|
|
625
684
|
}))[screenIndex - 1],
|
|
626
685
|
[screenIndex]
|
|
627
686
|
);
|
|
628
|
-
return /* @__PURE__ */ (0,
|
|
629
|
-
value: { screenIndex, setScreenIndex },
|
|
630
|
-
children: screenIndex === 0 ? children : renderEducationScreen(currentEducationScreen)
|
|
631
|
-
});
|
|
687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AboutAptosConnectContext.Provider, { value: { screenIndex, setScreenIndex }, children: screenIndex === 0 ? children : renderEducationScreen(currentEducationScreen) });
|
|
632
688
|
};
|
|
633
689
|
Root.displayName = "AboutAptosConnect";
|
|
634
690
|
var Trigger = createHeadlessComponent(
|
|
@@ -652,27 +708,33 @@ var import_react9 = require("react");
|
|
|
652
708
|
|
|
653
709
|
// src/graphics/SmallAptosLogo.tsx
|
|
654
710
|
var import_react8 = require("react");
|
|
655
|
-
var
|
|
711
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
656
712
|
var SmallAptosLogo = (0, import_react8.forwardRef)((props, ref) => {
|
|
657
|
-
return /* @__PURE__ */ (0,
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
714
|
+
"svg",
|
|
715
|
+
__spreadProps(__spreadValues({
|
|
716
|
+
ref,
|
|
717
|
+
width: "12",
|
|
718
|
+
height: "12",
|
|
719
|
+
viewBox: "0 0 12 12",
|
|
720
|
+
fill: "none"
|
|
721
|
+
}, props), {
|
|
722
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
723
|
+
"path",
|
|
724
|
+
{
|
|
725
|
+
fillRule: "evenodd",
|
|
726
|
+
clipRule: "evenodd",
|
|
727
|
+
d: "M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM7.17547 3.67976C7.13401 3.72309 7.07649 3.74757 7.01648 3.74757H3.00775C3.69185 2.83824 4.77995 2.25 6.00569 2.25C7.23142 2.25 8.31953 2.83824 9.00362 3.74757H8.28524C8.20824 3.74757 8.13498 3.71468 8.08401 3.65701L7.81608 3.35416C7.77618 3.30896 7.71882 3.28308 7.6585 3.28308H7.6454C7.58805 3.28308 7.53318 3.30646 7.49343 3.34792L7.17547 3.67976ZM8.05656 4.75897H7.39569C7.31869 4.75897 7.24543 4.72593 7.19447 4.66842L6.92638 4.36557C6.88647 4.32036 6.82896 4.29465 6.7688 4.29465C6.70863 4.29465 6.65112 4.32052 6.61121 4.36557L6.38131 4.6254C6.30603 4.71034 6.19801 4.75913 6.08454 4.75913H2.46703C2.36401 5.05278 2.29683 5.36296 2.27002 5.68467H5.68505C5.74506 5.68467 5.80258 5.66019 5.84404 5.61686L6.16201 5.28502C6.20175 5.24356 6.25662 5.22018 6.31398 5.22018H6.32707C6.38739 5.22018 6.44475 5.24606 6.48465 5.29126L6.75258 5.59411C6.80355 5.65178 6.87681 5.68467 6.95381 5.68467H9.74133C9.71452 5.3628 9.64734 5.05263 9.54431 4.75913H8.05641L8.05656 4.75897ZM4.33651 7.63095C4.39652 7.63095 4.45404 7.60648 4.4955 7.56315L4.81347 7.23131C4.85321 7.18985 4.90808 7.16647 4.96544 7.16647H4.97853C5.03885 7.16647 5.09621 7.19234 5.13611 7.23739L5.40404 7.54024C5.45501 7.59791 5.52827 7.6308 5.60527 7.6308H9.38285C9.52438 7.33839 9.62803 7.02463 9.68975 6.69591H6.06383C5.98683 6.69591 5.91357 6.66287 5.8626 6.60535L5.59467 6.3025C5.55477 6.2573 5.49725 6.23158 5.43709 6.23158C5.37692 6.23158 5.31941 6.25746 5.27951 6.3025L5.0496 6.56233C4.97432 6.64728 4.86631 6.69606 4.75268 6.69606H2.32147C2.3832 7.02479 2.487 7.33855 2.62837 7.63095H4.33651ZM5.57359 8.55745H4.59116C4.51417 8.55745 4.44091 8.52441 4.38994 8.46689L4.12201 8.16404C4.0821 8.11884 4.02459 8.09312 3.96442 8.09312C3.90426 8.09312 3.84675 8.119 3.80684 8.16404L3.57694 8.42387C3.50166 8.50882 3.39364 8.55761 3.28001 8.55761H3.26474C3.94915 9.29096 4.92378 9.74998 6.00596 9.74998C7.08815 9.74998 8.06262 9.29096 8.74719 8.55761H5.57359V8.55745Z",
|
|
728
|
+
fill: "currentColor"
|
|
729
|
+
}
|
|
730
|
+
)
|
|
669
731
|
})
|
|
670
|
-
|
|
732
|
+
);
|
|
671
733
|
});
|
|
672
734
|
SmallAptosLogo.displayName = "SmallAptosLogo";
|
|
673
735
|
|
|
674
736
|
// src/components/AptosPrivacyPolicy.tsx
|
|
675
|
-
var
|
|
737
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
676
738
|
var APTOS_PRIVACY_POLICY_URL = "https://aptoslabs.com/privacy";
|
|
677
739
|
var Root2 = createHeadlessComponent("AptosPrivacyPolicy.Root", "div");
|
|
678
740
|
var Disclaimer = createHeadlessComponent(
|
|
@@ -687,19 +749,11 @@ var Link = createHeadlessComponent("AptosPrivacyPolicy.Disclaimer", "a", {
|
|
|
687
749
|
children: "Privacy Policy"
|
|
688
750
|
});
|
|
689
751
|
var PoweredBy = (0, import_react9.forwardRef)(({ className }, ref) => {
|
|
690
|
-
return /* @__PURE__ */ (0,
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
children:
|
|
694
|
-
|
|
695
|
-
children: "Powered by"
|
|
696
|
-
}),
|
|
697
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SmallAptosLogo, {}),
|
|
698
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
699
|
-
children: "Aptos Labs"
|
|
700
|
-
})
|
|
701
|
-
]
|
|
702
|
-
});
|
|
752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { ref, className, children: [
|
|
753
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "Powered by" }),
|
|
754
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SmallAptosLogo, {}),
|
|
755
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "Aptos Labs" })
|
|
756
|
+
] });
|
|
703
757
|
});
|
|
704
758
|
PoweredBy.displayName = "AptosPrivacyPolicy.PoweredBy";
|
|
705
759
|
var AptosPrivacyPolicy = Object.assign(Root2, {
|
|
@@ -712,7 +766,7 @@ var AptosPrivacyPolicy = Object.assign(Root2, {
|
|
|
712
766
|
var import_wallet_adapter_core2 = require("@aptos-labs/wallet-adapter-core");
|
|
713
767
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
714
768
|
var import_react10 = require("react");
|
|
715
|
-
var
|
|
769
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
716
770
|
function useWalletItemContext(displayName) {
|
|
717
771
|
const context = (0, import_react10.useContext)(WalletItemContext);
|
|
718
772
|
if (!context) {
|
|
@@ -730,17 +784,9 @@ var Root3 = (0, import_react10.forwardRef)(
|
|
|
730
784
|
}, [connect, wallet.name, onConnect]);
|
|
731
785
|
const isWalletReady = wallet.readyState === import_wallet_adapter_core2.WalletReadyState.Installed;
|
|
732
786
|
const mobileSupport = "deeplinkProvider" in wallet && wallet.deeplinkProvider;
|
|
733
|
-
if (!isWalletReady && (0, import_wallet_adapter_core2.isRedirectable)() && !mobileSupport)
|
|
734
|
-
return null;
|
|
787
|
+
if (!isWalletReady && (0, import_wallet_adapter_core2.isRedirectable)() && !mobileSupport) return null;
|
|
735
788
|
const Component = asChild ? import_react_slot2.Slot : "div";
|
|
736
|
-
return /* @__PURE__ */ (0,
|
|
737
|
-
value: { wallet, connectWallet },
|
|
738
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {
|
|
739
|
-
ref,
|
|
740
|
-
className,
|
|
741
|
-
children
|
|
742
|
-
})
|
|
743
|
-
});
|
|
789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(WalletItemContext.Provider, { value: { wallet, connectWallet }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Component, { ref, className, children }) });
|
|
744
790
|
}
|
|
745
791
|
);
|
|
746
792
|
Root3.displayName = "WalletItem";
|
|
@@ -804,6 +850,7 @@ var WalletItem = Object.assign(Root3, {
|
|
|
804
850
|
EXPLORE_ECOSYSTEM_URL,
|
|
805
851
|
WalletContext,
|
|
806
852
|
WalletItem,
|
|
807
|
-
useWallet
|
|
853
|
+
useWallet,
|
|
854
|
+
...require("@aptos-labs/wallet-adapter-core")
|
|
808
855
|
});
|
|
809
856
|
//# sourceMappingURL=index.js.map
|