@moveindustries/wallet-adapter-move-design 1.0.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/LICENSE +201 -0
- package/README.md +103 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +702 -0
- package/dist/index.mjs +674 -0
- package/package.json +70 -0
- package/src/Dialog.tsx +121 -0
- package/src/Drawer.tsx +86 -0
- package/src/WalletModal.tsx +377 -0
- package/src/icons.tsx +117 -0
- package/src/index.tsx +2 -0
- package/src/styles.css +1 -0
- package/src/useIsMobile.ts +21 -0
- package/src/utils.ts +6 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
|
|
59
|
+
// src/index.tsx
|
|
60
|
+
var index_exports = {};
|
|
61
|
+
__export(index_exports, {
|
|
62
|
+
WalletModal: () => WalletModal
|
|
63
|
+
});
|
|
64
|
+
module.exports = __toCommonJS(index_exports);
|
|
65
|
+
|
|
66
|
+
// src/WalletModal.tsx
|
|
67
|
+
var import_wallet_adapter_react = require("@moveindustries/wallet-adapter-react");
|
|
68
|
+
var import_react = require("react");
|
|
69
|
+
var import_aptos_wallet_adapter = require("@okwallet/aptos-wallet-adapter");
|
|
70
|
+
var import_aptos_wallet_adapter2 = require("@msafe/aptos-wallet-adapter");
|
|
71
|
+
|
|
72
|
+
// src/useIsMobile.ts
|
|
73
|
+
var React = __toESM(require("react"));
|
|
74
|
+
var MOBILE_BREAKPOINT = 768;
|
|
75
|
+
function useIsMobile() {
|
|
76
|
+
const [isMobile, setIsMobile] = React.useState(
|
|
77
|
+
void 0
|
|
78
|
+
);
|
|
79
|
+
React.useEffect(() => {
|
|
80
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
81
|
+
const onChange = () => {
|
|
82
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
83
|
+
};
|
|
84
|
+
mql.addEventListener("change", onChange);
|
|
85
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
86
|
+
return () => mql.removeEventListener("change", onChange);
|
|
87
|
+
}, []);
|
|
88
|
+
return !!isMobile;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// src/Drawer.tsx
|
|
92
|
+
var React2 = __toESM(require("react"));
|
|
93
|
+
var import_vaul = require("vaul");
|
|
94
|
+
|
|
95
|
+
// src/utils.ts
|
|
96
|
+
var import_clsx = require("clsx");
|
|
97
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
98
|
+
function cn(...inputs) {
|
|
99
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// src/Drawer.tsx
|
|
103
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
104
|
+
function Drawer(_a) {
|
|
105
|
+
var props = __objRest(_a, []);
|
|
106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_vaul.Drawer.Root, __spreadValues({ "data-slot": "drawer" }, props));
|
|
107
|
+
}
|
|
108
|
+
function DrawerPortal(_a) {
|
|
109
|
+
var props = __objRest(_a, []);
|
|
110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_vaul.Drawer.Portal, __spreadValues({ "data-slot": "drawer-portal" }, props));
|
|
111
|
+
}
|
|
112
|
+
function DrawerOverlay(_a) {
|
|
113
|
+
var _b = _a, {
|
|
114
|
+
className
|
|
115
|
+
} = _b, props = __objRest(_b, [
|
|
116
|
+
"className"
|
|
117
|
+
]);
|
|
118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
119
|
+
import_vaul.Drawer.Overlay,
|
|
120
|
+
__spreadValues({
|
|
121
|
+
"data-slot": "drawer-overlay",
|
|
122
|
+
className: cn(
|
|
123
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
124
|
+
className
|
|
125
|
+
)
|
|
126
|
+
}, props)
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
var DrawerContent = React2.forwardRef((_a, ref) => {
|
|
130
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerOverlay, {}),
|
|
133
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
134
|
+
import_vaul.Drawer.Content,
|
|
135
|
+
__spreadProps(__spreadValues({
|
|
136
|
+
ref,
|
|
137
|
+
"data-slot": "drawer-content",
|
|
138
|
+
className: cn(
|
|
139
|
+
"group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
|
|
140
|
+
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
141
|
+
className
|
|
142
|
+
)
|
|
143
|
+
}, props), {
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
146
|
+
children
|
|
147
|
+
]
|
|
148
|
+
})
|
|
149
|
+
)
|
|
150
|
+
] });
|
|
151
|
+
});
|
|
152
|
+
DrawerContent.displayName = "DrawerContent";
|
|
153
|
+
function DrawerTitle(_a) {
|
|
154
|
+
var _b = _a, {
|
|
155
|
+
className
|
|
156
|
+
} = _b, props = __objRest(_b, [
|
|
157
|
+
"className"
|
|
158
|
+
]);
|
|
159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
160
|
+
import_vaul.Drawer.Title,
|
|
161
|
+
__spreadValues({
|
|
162
|
+
"data-slot": "drawer-title",
|
|
163
|
+
className: cn("text-foreground font-semibold", className)
|
|
164
|
+
}, props)
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
function DrawerDescription(_a) {
|
|
168
|
+
var _b = _a, {
|
|
169
|
+
className
|
|
170
|
+
} = _b, props = __objRest(_b, [
|
|
171
|
+
"className"
|
|
172
|
+
]);
|
|
173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
174
|
+
import_vaul.Drawer.Description,
|
|
175
|
+
__spreadValues({
|
|
176
|
+
"data-slot": "drawer-description",
|
|
177
|
+
className: cn("text-muted-foreground text-sm", className)
|
|
178
|
+
}, props)
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// src/Dialog.tsx
|
|
183
|
+
var React3 = __toESM(require("react"));
|
|
184
|
+
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
185
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
186
|
+
function Dialog(_a) {
|
|
187
|
+
var props = __objRest(_a, []);
|
|
188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DialogPrimitive.Root, __spreadValues({ "data-slot": "dialog" }, props));
|
|
189
|
+
}
|
|
190
|
+
function DialogPortal(_a) {
|
|
191
|
+
var props = __objRest(_a, []);
|
|
192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DialogPrimitive.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
|
|
193
|
+
}
|
|
194
|
+
function DialogOverlay(_a) {
|
|
195
|
+
var _b = _a, {
|
|
196
|
+
className
|
|
197
|
+
} = _b, props = __objRest(_b, [
|
|
198
|
+
"className"
|
|
199
|
+
]);
|
|
200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
201
|
+
DialogPrimitive.Overlay,
|
|
202
|
+
__spreadValues({
|
|
203
|
+
"data-slot": "dialog-overlay",
|
|
204
|
+
className: cn(
|
|
205
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
206
|
+
className
|
|
207
|
+
)
|
|
208
|
+
}, props)
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
var DialogContent = React3.forwardRef((_a, ref) => {
|
|
212
|
+
var _b = _a, { className, children, showCloseButton = true } = _b, props = __objRest(_b, ["className", "children", "showCloseButton"]);
|
|
213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
214
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DialogOverlay, {}),
|
|
215
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
216
|
+
DialogPrimitive.Content,
|
|
217
|
+
__spreadProps(__spreadValues({
|
|
218
|
+
ref,
|
|
219
|
+
"data-slot": "dialog-content",
|
|
220
|
+
className: cn(
|
|
221
|
+
"text-card-foreground border-border bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
222
|
+
className
|
|
223
|
+
)
|
|
224
|
+
}, props), {
|
|
225
|
+
children: [
|
|
226
|
+
children,
|
|
227
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
228
|
+
DialogPrimitive.Close,
|
|
229
|
+
{
|
|
230
|
+
"data-slot": "dialog-close",
|
|
231
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:h-4 [&_svg]:w-4",
|
|
232
|
+
children: [
|
|
233
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(XIcon, {}),
|
|
234
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "sr-only", children: "Close" })
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
)
|
|
238
|
+
]
|
|
239
|
+
})
|
|
240
|
+
)
|
|
241
|
+
] });
|
|
242
|
+
});
|
|
243
|
+
DialogContent.displayName = "DialogContent";
|
|
244
|
+
function DialogTitle(_a) {
|
|
245
|
+
var _b = _a, {
|
|
246
|
+
className
|
|
247
|
+
} = _b, props = __objRest(_b, [
|
|
248
|
+
"className"
|
|
249
|
+
]);
|
|
250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
251
|
+
DialogPrimitive.Title,
|
|
252
|
+
__spreadValues({
|
|
253
|
+
"data-slot": "dialog-title",
|
|
254
|
+
className: cn("text-lg leading-none font-semibold", className)
|
|
255
|
+
}, props)
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
function DialogDescription(_a) {
|
|
259
|
+
var _b = _a, {
|
|
260
|
+
className
|
|
261
|
+
} = _b, props = __objRest(_b, [
|
|
262
|
+
"className"
|
|
263
|
+
]);
|
|
264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
265
|
+
DialogPrimitive.Description,
|
|
266
|
+
__spreadValues({
|
|
267
|
+
"data-slot": "dialog-description",
|
|
268
|
+
className: cn("text-muted-foreground text-sm", className)
|
|
269
|
+
}, props)
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
function XIcon(props) {
|
|
273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
274
|
+
"svg",
|
|
275
|
+
__spreadProps(__spreadValues({
|
|
276
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
277
|
+
width: "16",
|
|
278
|
+
height: "16",
|
|
279
|
+
viewBox: "0 0 24 24",
|
|
280
|
+
fill: "none",
|
|
281
|
+
stroke: "currentColor",
|
|
282
|
+
strokeWidth: "2",
|
|
283
|
+
strokeLinecap: "round",
|
|
284
|
+
strokeLinejoin: "round"
|
|
285
|
+
}, props), {
|
|
286
|
+
children: [
|
|
287
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M18 6 6 18" }),
|
|
288
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m6 6 12 12" })
|
|
289
|
+
]
|
|
290
|
+
})
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// src/icons.tsx
|
|
295
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
296
|
+
function CloseIcon(_a) {
|
|
297
|
+
var _b = _a, {
|
|
298
|
+
size = 16,
|
|
299
|
+
className
|
|
300
|
+
} = _b, props = __objRest(_b, [
|
|
301
|
+
"size",
|
|
302
|
+
"className"
|
|
303
|
+
]);
|
|
304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
305
|
+
"svg",
|
|
306
|
+
__spreadProps(__spreadValues({
|
|
307
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
308
|
+
width: size,
|
|
309
|
+
height: size,
|
|
310
|
+
viewBox: "0 0 24 24",
|
|
311
|
+
fill: "none",
|
|
312
|
+
stroke: "currentColor",
|
|
313
|
+
strokeWidth: "2.5",
|
|
314
|
+
strokeLinecap: "round",
|
|
315
|
+
strokeLinejoin: "round",
|
|
316
|
+
className
|
|
317
|
+
}, props), {
|
|
318
|
+
children: [
|
|
319
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M18 6 6 18" }),
|
|
320
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m6 6 12 12" })
|
|
321
|
+
]
|
|
322
|
+
})
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
function CaretDownIcon(_a) {
|
|
326
|
+
var _b = _a, {
|
|
327
|
+
size = 16,
|
|
328
|
+
className
|
|
329
|
+
} = _b, props = __objRest(_b, [
|
|
330
|
+
"size",
|
|
331
|
+
"className"
|
|
332
|
+
]);
|
|
333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
334
|
+
"svg",
|
|
335
|
+
__spreadProps(__spreadValues({
|
|
336
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
337
|
+
width: size,
|
|
338
|
+
height: size,
|
|
339
|
+
viewBox: "0 0 24 24",
|
|
340
|
+
fill: "none",
|
|
341
|
+
stroke: "currentColor",
|
|
342
|
+
strokeWidth: "2.5",
|
|
343
|
+
strokeLinecap: "round",
|
|
344
|
+
strokeLinejoin: "round",
|
|
345
|
+
className
|
|
346
|
+
}, props), {
|
|
347
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m6 9 6 6 6-6" })
|
|
348
|
+
})
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
function NightlyIcon(_a) {
|
|
352
|
+
var _b = _a, {
|
|
353
|
+
size = 30
|
|
354
|
+
} = _b, props = __objRest(_b, [
|
|
355
|
+
"size"
|
|
356
|
+
]);
|
|
357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
358
|
+
"svg",
|
|
359
|
+
__spreadProps(__spreadValues({
|
|
360
|
+
width: size,
|
|
361
|
+
height: size,
|
|
362
|
+
viewBox: "0 0 129 129",
|
|
363
|
+
fill: "none",
|
|
364
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
365
|
+
}, props), {
|
|
366
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
367
|
+
"path",
|
|
368
|
+
{
|
|
369
|
+
d: "M113.381 0.25C104.008 13.3225 92.2874 22.3847 78.4172 28.4556C73.6092 27.1484 68.6682 26.4394 63.8159 26.4837C58.9635 26.4394 54.0225 27.1262 49.2145 28.4556C35.3665 22.3847 23.6234 13.3225 14.251 0.25C11.415 7.36234 0.513796 31.9343 13.6085 66.2552C13.6085 66.2552 9.42084 84.1801 17.1093 99.5791C17.1093 99.5791 28.2541 94.5495 37.0726 101.617C46.312 109.129 43.3651 116.33 49.8792 122.534C55.4627 128.25 63.8159 128.25 63.8159 128.25C63.8159 128.25 72.169 128.25 77.7525 122.534C84.2666 116.33 81.3419 109.129 90.5592 101.617C99.3776 94.5273 110.522 99.5791 110.522 99.5791C118.211 84.1801 114.023 66.2552 114.023 66.2552C127.118 31.9343 116.217 7.36234 113.381 0.25ZM20.5657 61.4915C13.4534 46.8901 11.4814 26.8382 16.0014 10.9961C21.9395 26.0184 30.0045 32.7762 39.6206 39.8886C35.5216 48.3525 27.8775 56.3289 20.5657 61.4915ZM41.0386 87.2156C35.4551 84.734 34.2365 79.8373 34.2365 79.8373C41.8806 75.0293 53.1141 78.7073 53.4686 90.0959C47.5527 86.5287 45.6029 89.2318 41.0386 87.2156ZM63.8159 127.607C59.8055 127.607 56.5484 124.749 56.5484 121.204C56.5484 117.659 59.8055 114.801 63.8159 114.801C67.8263 114.801 71.0833 117.659 71.0833 121.204C71.0833 124.749 67.8263 127.607 63.8159 127.607ZM86.5931 87.2156C82.0288 89.2097 80.079 86.5065 74.1631 90.0959C74.5176 78.7073 85.7511 75.0293 93.3952 79.8373C93.3952 79.8595 92.1988 84.7561 86.5931 87.2156ZM107.066 61.4915C99.7542 56.3289 92.1101 48.3525 88.0333 39.8886C97.6494 32.7762 105.714 26.0184 111.652 10.9961C116.15 26.8604 114.178 46.9123 107.066 61.4915Z",
|
|
370
|
+
fill: "#6067F9"
|
|
371
|
+
}
|
|
372
|
+
)
|
|
373
|
+
})
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
function DownloadText() {
|
|
377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
378
|
+
"svg",
|
|
379
|
+
{
|
|
380
|
+
width: "98",
|
|
381
|
+
height: "16",
|
|
382
|
+
viewBox: "0 0 98 16",
|
|
383
|
+
fill: "none",
|
|
384
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
385
|
+
children: [
|
|
386
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
387
|
+
"path",
|
|
388
|
+
{
|
|
389
|
+
d: "M4.88 1.35001C6.34667 1.35001 7.63333 1.63668 8.74 2.21001C9.86 2.78334 10.72 3.60334 11.32 4.67001C11.9333 5.72334 12.24 6.95001 12.24 8.35001C12.24 9.75001 11.9333 10.9767 11.32 12.03C10.72 13.07 9.86 13.8767 8.74 14.45C7.63333 15.0233 6.34667 15.31 4.88 15.31H0V1.35001H4.88ZM4.78 12.93C6.24667 12.93 7.38 12.53 8.18 11.73C8.98 10.93 9.38 9.80334 9.38 8.35001C9.38 6.89668 8.98 5.76334 8.18 4.95001C7.38 4.12334 6.24667 3.71001 4.78 3.71001H2.8V12.93H4.78Z",
|
|
390
|
+
fill: "white"
|
|
391
|
+
}
|
|
392
|
+
),
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
394
|
+
"path",
|
|
395
|
+
{
|
|
396
|
+
d: "M18.8559 15.49C17.7893 15.49 16.8293 15.2567 15.9759 14.79C15.1226 14.31 14.4493 13.6367 13.9559 12.77C13.4759 11.9033 13.2359 10.9033 13.2359 9.77001C13.2359 8.63668 13.4826 7.63668 13.9759 6.77001C14.4826 5.90334 15.1693 5.23668 16.0359 4.77001C16.9026 4.29001 17.8693 4.05001 18.9359 4.05001C20.0026 4.05001 20.9693 4.29001 21.8359 4.77001C22.7026 5.23668 23.3826 5.90334 23.8759 6.77001C24.3826 7.63668 24.6359 8.63668 24.6359 9.77001C24.6359 10.9033 24.3759 11.9033 23.8559 12.77C23.3493 13.6367 22.6559 14.31 21.7759 14.79C20.9093 15.2567 19.9359 15.49 18.8559 15.49ZM18.8559 13.05C19.3626 13.05 19.8359 12.93 20.2759 12.69C20.7293 12.4367 21.0893 12.0633 21.3559 11.57C21.6226 11.0767 21.7559 10.4767 21.7559 9.77001C21.7559 8.71668 21.4759 7.91001 20.9159 7.35001C20.3693 6.77668 19.6959 6.49001 18.8959 6.49001C18.0959 6.49001 17.4226 6.77668 16.8759 7.35001C16.3426 7.91001 16.0759 8.71668 16.0759 9.77001C16.0759 10.8233 16.3359 11.6367 16.8559 12.21C17.3893 12.77 18.0559 13.05 18.8559 13.05Z",
|
|
397
|
+
fill: "white"
|
|
398
|
+
}
|
|
399
|
+
),
|
|
400
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
401
|
+
"path",
|
|
402
|
+
{
|
|
403
|
+
d: "M41.6498 4.23001L38.4098 15.31H35.3898L33.3698 7.57001L31.3498 15.31H28.3098L25.0498 4.23001H27.8898L29.8498 12.67L31.9698 4.23001H34.9298L37.0098 12.65L38.9698 4.23001H41.6498Z",
|
|
404
|
+
fill: "white"
|
|
405
|
+
}
|
|
406
|
+
),
|
|
407
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
408
|
+
"path",
|
|
409
|
+
{
|
|
410
|
+
d: "M48.9048 4.07001C50.2248 4.07001 51.2915 4.49001 52.1048 5.33001C52.9182 6.15668 53.3248 7.31668 53.3248 8.81001V15.31H50.5248V9.19001C50.5248 8.31001 50.3048 7.63668 49.8648 7.17001C49.4248 6.69001 48.8248 6.45001 48.0648 6.45001C47.2915 6.45001 46.6782 6.69001 46.2248 7.17001C45.7848 7.63668 45.5648 8.31001 45.5648 9.19001V15.31H42.7648V4.23001H45.5648V5.61001C45.9382 5.13001 46.4115 4.75668 46.9848 4.49001C47.5715 4.21001 48.2115 4.07001 48.9048 4.07001Z",
|
|
411
|
+
fill: "white"
|
|
412
|
+
}
|
|
413
|
+
),
|
|
414
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M58.3875 0.51001V15.31H55.5875V0.51001H58.3875Z", fill: "white" }),
|
|
415
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
416
|
+
"path",
|
|
417
|
+
{
|
|
418
|
+
d: "M65.6739 15.49C64.6072 15.49 63.6472 15.2567 62.7939 14.79C61.9406 14.31 61.2672 13.6367 60.7739 12.77C60.2939 11.9033 60.0539 10.9033 60.0539 9.77001C60.0539 8.63668 60.3006 7.63668 60.7939 6.77001C61.3006 5.90334 61.9872 5.23668 62.8539 4.77001C63.7206 4.29001 64.6872 4.05001 65.7539 4.05001C66.8206 4.05001 67.7872 4.29001 68.6539 4.77001C69.5206 5.23668 70.2006 5.90334 70.6939 6.77001C71.2006 7.63668 71.4539 8.63668 71.4539 9.77001C71.4539 10.9033 71.1939 11.9033 70.6739 12.77C70.1672 13.6367 69.4739 14.31 68.5939 14.79C67.7272 15.2567 66.7539 15.49 65.6739 15.49ZM65.6739 13.05C66.1806 13.05 66.6539 12.93 67.0939 12.69C67.5472 12.4367 67.9072 12.0633 68.1739 11.57C68.4406 11.0767 68.5739 10.4767 68.5739 9.77001C68.5739 8.71668 68.2939 7.91001 67.7339 7.35001C67.1872 6.77668 66.5139 6.49001 65.7139 6.49001C64.9139 6.49001 64.2406 6.77668 63.6939 7.35001C63.1606 7.91001 62.8939 8.71668 62.8939 9.77001C62.8939 10.8233 63.1539 11.6367 63.6739 12.21C64.2072 12.77 64.8739 13.05 65.6739 13.05Z",
|
|
419
|
+
fill: "white"
|
|
420
|
+
}
|
|
421
|
+
),
|
|
422
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
423
|
+
"path",
|
|
424
|
+
{
|
|
425
|
+
d: "M72.3878 9.73001C72.3878 8.61001 72.6078 7.61668 73.0478 6.75001C73.5011 5.88334 74.1078 5.21668 74.8678 4.75001C75.6411 4.28334 76.5011 4.05001 77.4478 4.05001C78.2745 4.05001 78.9945 4.21668 79.6078 4.55001C80.2345 4.88334 80.7345 5.30334 81.1078 5.81001V4.23001H83.9278V15.31H81.1078V13.69C80.7478 14.21 80.2478 14.6433 79.6078 14.99C78.9811 15.3233 78.2545 15.49 77.4278 15.49C76.4945 15.49 75.6411 15.25 74.8678 14.77C74.1078 14.29 73.5011 13.6167 73.0478 12.75C72.6078 11.87 72.3878 10.8633 72.3878 9.73001ZM81.1078 9.77001C81.1078 9.09001 80.9745 8.51001 80.7078 8.03001C80.4411 7.53668 80.0811 7.16334 79.6278 6.91001C79.1745 6.64334 78.6878 6.51001 78.1678 6.51001C77.6478 6.51001 77.1678 6.63668 76.7278 6.89001C76.2878 7.14334 75.9278 7.51668 75.6478 8.01001C75.3811 8.49001 75.2478 9.06334 75.2478 9.73001C75.2478 10.3967 75.3811 10.9833 75.6478 11.49C75.9278 11.9833 76.2878 12.3633 76.7278 12.63C77.1811 12.8967 77.6611 13.03 78.1678 13.03C78.6878 13.03 79.1745 12.9033 79.6278 12.65C80.0811 12.3833 80.4411 12.01 80.7078 11.53C80.9745 11.0367 81.1078 10.45 81.1078 9.77001Z",
|
|
426
|
+
fill: "white"
|
|
427
|
+
}
|
|
428
|
+
),
|
|
429
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
430
|
+
"path",
|
|
431
|
+
{
|
|
432
|
+
d: "M85.5425 9.73001C85.5425 8.61001 85.7625 7.61668 86.2025 6.75001C86.6558 5.88334 87.2692 5.21668 88.0425 4.75001C88.8158 4.28334 89.6758 4.05001 90.6225 4.05001C91.3425 4.05001 92.0292 4.21001 92.6825 4.53001C93.3358 4.83668 93.8558 5.25001 94.2425 5.77001V0.51001H97.0825V15.31H94.2425V13.67C93.8958 14.2167 93.4092 14.6567 92.7825 14.99C92.1558 15.3233 91.4292 15.49 90.6025 15.49C89.6692 15.49 88.8158 15.25 88.0425 14.77C87.2692 14.29 86.6558 13.6167 86.2025 12.75C85.7625 11.87 85.5425 10.8633 85.5425 9.73001ZM94.2625 9.77001C94.2625 9.09001 94.1292 8.51001 93.8625 8.03001C93.5958 7.53668 93.2358 7.16334 92.7825 6.91001C92.3292 6.64334 91.8425 6.51001 91.3225 6.51001C90.8025 6.51001 90.3225 6.63668 89.8825 6.89001C89.4425 7.14334 89.0825 7.51668 88.8025 8.01001C88.5358 8.49001 88.4025 9.06334 88.4025 9.73001C88.4025 10.3967 88.5358 10.9833 88.8025 11.49C89.0825 11.9833 89.4425 12.3633 89.8825 12.63C90.3358 12.8967 90.8158 13.03 91.3225 13.03C91.8425 13.03 92.3292 12.9033 92.7825 12.65C93.2358 12.3833 93.5958 12.01 93.8625 11.53C94.1292 11.0367 94.2625 10.45 94.2625 9.77001Z",
|
|
433
|
+
fill: "white"
|
|
434
|
+
}
|
|
435
|
+
)
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// src/WalletModal.tsx
|
|
442
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
443
|
+
var nightlyWallet = {
|
|
444
|
+
name: "Nightly Wallet",
|
|
445
|
+
url: "https://nightly.app/download",
|
|
446
|
+
icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI5IiBoZWlnaHQ9IjEyOSIgdmlld0JveD0iMCAwIDEyOSAxMjkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMTMuMzgxIDAuMjVDMTA0LjAwOCAxMy4zMjI1IDkyLjI4NzQgMjIuMzg0NyA3OC40MTcyIDI4LjQ1NTZDNzMuNjA5MiAyNy4xNDg0IDY4LjY2ODIgMjYuNDM5NCA2My44MTU5IDI2LjQ4MzdDNTguOTYzNSAyNi40Mzk0IDU0LjAyMjUgMjcuMTI2MiA0OS4yMTQ1IDI4LjQ1NTZDMzUuMzY2NSAyMi4zODQ3IDIzLjYyMzQgMTMuMzIyNSAxNC4yNTEgMC4yNUMxMS40MTUgNy4zNjIzNCAwLjUxMzc5NiAzMS45MzQzIDEzLjYwODUgNjYuMjU1MkMxMy42MDg1IDY2LjI1NTIgOS40MjA4NCA4NC4xODAxIDE3LjEwOTMgOTkuNTc5MUMxNy4xMDkzIDk5LjU3OTEgMjguMjU0MSA5NC41NDk1IDM3LjA3MjYgMTAxLjYxN0M0Ni4zMTIgMTA5LjEyOSA0My4zNjUxIDExNi4zMyA0OS44NzkyIDEyMi41MzRDNTUuNDYyNyAxMjguMjUgNjMuODE1OSAxMjguMjUgNjMuODE1OSAxMjguMjVDNjMuODE1OSAxMjguMjUgNzIuMTY5IDEyOC4yNSA3Ny43NTI1IDEyMi41MzRDODQuMjY2NiAxMTYuMzMgODEuMzQxOSAxMDkuMTI5IDkwLjU1OTIgMTAxLjYxN0M5OS4zNzc2IDk0LjUyNzMgMTEwLjUyMiA5OS41NzkxIDExMC41MjIgOTkuNTc5MUMxMTguMjExIDg0LjE4MDEgMTE0LjAyMyA2Ni4yNTUyIDExNC4wMjMgNjYuMjU1MkMxMjcuMTE4IDMxLjkzNDMgMTE2LjIxNyA3LjM2MjM0IDExMy4zODEgMC4yNVpNMjAuNTY1NyA2MS40OTE1QzEzLjQ1MzQgNDYuODkwMSAxMS40ODE0IDI2LjgzODIgMTYuMDAxNCAxMC45OTYxQzIxLjkzOTUgMjYuMDE4NCAzMC4wMDQ1IDMyLjc3NjIgMzkuNjIwNiAzOS44ODg2QzM1LjUyMTYgNDguMzUyNSAyNy44Nzc1IDU2LjMyODkgMjAuNTY1NyA2MS40OTE1Wk00MS4wMzg2IDg3LjIxNTZDMzUuNDU1MSA4NC43MzQgMzQuMjM2NSA3OS44MzczIDM0LjIzNjUgNzkuODM3M0M0MS44ODA2IDc1LjAyOTMgNTMuMTE0MSA3OC43MDczIDUzLjQ2ODYgOTAuMDk1OUM0Ny41NTI3IDg2LjUyODcgNDUuNjAyOSA4OS4yMzE4IDQxLjAzODYgODcuMjE1NlpNNjMuODE1OSAxMjcuNjA3QzU5LjgwNTUgMTI3LjYwNyA1Ni41NDg0IDEyNC43NDkgNTYuNTQ4NCAxMjEuMjA0QzU2LjU0ODQgMTE3LjY1OSA1OS44MDU1IDExNC44MDEgNjMuODE1OSAxMTQuODAxQzY3LjgyNjMgMTE0LjgwMSA3MS4wODMzIDExNy42NTkgNzEuMDgzMyAxMjEuMjA0QzcxLjA4MzMgMTI0Ljc0OSA2Ny44MjYzIDEyNy42MDcgNjMuODE1OSAxMjcuNjA3Wk04Ni41OTMxIDg3LjIxNTZDODIuMDI4OCA4OS4yMDk3IDgwLjA3OSA4Ni41MDY1IDc0LjE2MzEgOTAuMDk1OUM3NC41MTc2IDc4LjcwNzMgODUuNzUxMSA3NS4wMjkzIDkzLjM5NTIgNzkuODM3M0M5My4zOTUyIDc5Ljg1OTUgOTIuMTk4OCA4NC43NTYxIDg2LjU5MzEgODcuMjE1NlpNMTA3LjA2NiA2MS40OTE1Qzk5Ljc1NDIgNTYuMzI4OSA5Mi4xMTAxIDQ4LjM1MjUgODguMDMzMyAzOS44ODg2Qzk3LjY0OTQgMzIuNzc2MiAxMDUuNzE0IDI2LjAxODQgMTExLjY1MiAxMC45OTYxQzExNi4xNSAyNi44NjA0IDExNC4xNzggNDYuOTEyMyAxMDcuMDY2IDYxLjQ5MTVaIiBmaWxsPSIjNjA2N0Y5Ii8+Cjwvc3ZnPgo=",
|
|
447
|
+
readyState: import_wallet_adapter_react.WalletReadyState.NotDetected
|
|
448
|
+
};
|
|
449
|
+
var cleanWalletName = (name) => name.replace(/ Wallet$/i, "");
|
|
450
|
+
function cleanWalletList(wallets) {
|
|
451
|
+
const unsupportedWallets = [
|
|
452
|
+
"Dev T wallet",
|
|
453
|
+
"Pontem Wallet",
|
|
454
|
+
"Trust",
|
|
455
|
+
"Tokenpocket",
|
|
456
|
+
"Martian",
|
|
457
|
+
"Rise",
|
|
458
|
+
"Petra"
|
|
459
|
+
];
|
|
460
|
+
return wallets.filter(
|
|
461
|
+
(wallet, index, self) => self.findIndex((w) => w.name === wallet.name) === index
|
|
462
|
+
).filter((wallet) => {
|
|
463
|
+
if (!wallet) return false;
|
|
464
|
+
if (unsupportedWallets.includes(wallet.name)) return false;
|
|
465
|
+
return wallet;
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
function ConnectWalletContent(_a) {
|
|
469
|
+
var _b = _a, {
|
|
470
|
+
onClose,
|
|
471
|
+
showCloseButton = true
|
|
472
|
+
} = _b, walletSortingOptions = __objRest(_b, [
|
|
473
|
+
"onClose",
|
|
474
|
+
"showCloseButton"
|
|
475
|
+
]);
|
|
476
|
+
const { wallets } = (0, import_wallet_adapter_react.useWallet)();
|
|
477
|
+
const [isMoreWalletsOpen, setIsMoreWalletsOpen] = (0, import_react.useState)(false);
|
|
478
|
+
const isMobile = useIsMobile();
|
|
479
|
+
const { availableWallets, installableWallets } = (0, import_react.useMemo)(() => {
|
|
480
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
481
|
+
const grouped = (0, import_wallet_adapter_react.groupAndSortWallets)(wallets, walletSortingOptions);
|
|
482
|
+
const additionalInstallableWallets = [];
|
|
483
|
+
const hasNightly = [
|
|
484
|
+
...(_a2 = grouped == null ? void 0 : grouped.availableWallets) != null ? _a2 : [],
|
|
485
|
+
...(_b2 = grouped == null ? void 0 : grouped.installableWallets) != null ? _b2 : []
|
|
486
|
+
].some((w) => w.name.toLowerCase().includes("nightly"));
|
|
487
|
+
if (!hasNightly) {
|
|
488
|
+
additionalInstallableWallets.push(nightlyWallet);
|
|
489
|
+
}
|
|
490
|
+
const hasOKX = [
|
|
491
|
+
...(_c = grouped == null ? void 0 : grouped.availableWallets) != null ? _c : [],
|
|
492
|
+
...(_d = grouped == null ? void 0 : grouped.installableWallets) != null ? _d : []
|
|
493
|
+
].some((w) => w.name.toLowerCase().includes("okx"));
|
|
494
|
+
if (!hasOKX) {
|
|
495
|
+
additionalInstallableWallets.push(
|
|
496
|
+
new import_aptos_wallet_adapter.OKXWallet()
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
const hasMSafe = [
|
|
500
|
+
...(_e = grouped == null ? void 0 : grouped.availableWallets) != null ? _e : [],
|
|
501
|
+
...(_f = grouped == null ? void 0 : grouped.installableWallets) != null ? _f : []
|
|
502
|
+
].some((w) => w.name.toLowerCase().includes("msafe"));
|
|
503
|
+
if (!hasMSafe) {
|
|
504
|
+
additionalInstallableWallets.push(
|
|
505
|
+
new import_aptos_wallet_adapter2.MSafeWalletAdapter(
|
|
506
|
+
void 0,
|
|
507
|
+
"MOVEMENT"
|
|
508
|
+
)
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
return {
|
|
512
|
+
availableWallets: (_g = grouped == null ? void 0 : grouped.availableWallets) != null ? _g : [],
|
|
513
|
+
installableWallets: [
|
|
514
|
+
...(_h = grouped == null ? void 0 : grouped.installableWallets) != null ? _h : [],
|
|
515
|
+
...additionalInstallableWallets
|
|
516
|
+
]
|
|
517
|
+
};
|
|
518
|
+
}, [wallets, walletSortingOptions]);
|
|
519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
520
|
+
"div",
|
|
521
|
+
{
|
|
522
|
+
className: cn(
|
|
523
|
+
"flex w-full flex-col items-center justify-center gap-6 px-6 pt-12 pb-6 md:max-w-114",
|
|
524
|
+
"z-9999 mx-auto max-h-full overflow-y-auto md:max-h-[80vh]",
|
|
525
|
+
"bg-[linear-gradient(0deg,rgba(4,5,27,0.2),rgba(4,5,27,0.2)),linear-gradient(152.97deg,rgba(0,0,0,0.8)_0%,rgba(0,0,0,0)_100%),radial-gradient(100%_100%_at_120.34%_112.85%,rgba(129,255,186,0.4)_0%,rgba(0,27,133,0.4)_100%)]",
|
|
526
|
+
"backdrop-blur-[1.3125rem]"
|
|
527
|
+
),
|
|
528
|
+
children: [
|
|
529
|
+
showCloseButton && !isMobile && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
530
|
+
"button",
|
|
531
|
+
{
|
|
532
|
+
onClick: onClose,
|
|
533
|
+
className: cn(
|
|
534
|
+
"absolute top-6 right-6 z-9999 rounded-xs opacity-70",
|
|
535
|
+
"cursor-pointer border border-white/20 bg-white/10 p-2 text-white",
|
|
536
|
+
"transition-opacity hover:bg-white/20 hover:opacity-100",
|
|
537
|
+
"focus:outline-hidden"
|
|
538
|
+
),
|
|
539
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CloseIcon, { size: 16 })
|
|
540
|
+
}
|
|
541
|
+
),
|
|
542
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex w-full max-w-102 flex-col items-center gap-4 p-0", children: [
|
|
543
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-full max-w-76 text-center font-['TWK_Everett_Mono',monospace] text-[32px] leading-[120%] font-medium tracking-[-1.28px] text-white", children: "Connect Wallet" }),
|
|
544
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "w-full max-w-sm text-center font-['Neue_Haas_Unica_Pro',sans-serif] text-lg leading-[140%] font-normal text-white/48", children: [
|
|
545
|
+
"Securely connect your",
|
|
546
|
+
" ",
|
|
547
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
548
|
+
"a",
|
|
549
|
+
{
|
|
550
|
+
className: "cursor-pointer text-white/48 underline decoration-dotted hover:text-white",
|
|
551
|
+
href: "https://docs.movementnetwork.xyz/general/usingmovement/connect_to_movement",
|
|
552
|
+
target: "_blank",
|
|
553
|
+
rel: "noopener noreferrer",
|
|
554
|
+
children: "wallet"
|
|
555
|
+
}
|
|
556
|
+
),
|
|
557
|
+
" ",
|
|
558
|
+
"to transfer digital assets to and from the Movement network."
|
|
559
|
+
] })
|
|
560
|
+
] }),
|
|
561
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex max-h-168 w-full max-w-102 flex-row flex-wrap content-center items-start justify-center gap-4 overflow-y-auto p-4 py-4", children: [
|
|
562
|
+
availableWallets.length > 0 ? cleanWalletList(availableWallets).map((wallet) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-28 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconWalletCard, { wallet, onConnect: onClose }) }, wallet.name)) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
563
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "h-px w-92 bg-[rgba(255,255,255,0.48)]" }),
|
|
564
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "font-['TWK_Everett_Mono',monospace] text-lg leading-[21.60px] font-medium text-primary", children: "Don't have a wallet?" }),
|
|
565
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
566
|
+
"button",
|
|
567
|
+
{
|
|
568
|
+
className: cn(
|
|
569
|
+
"h-10 w-full rounded-full bg-accent px-4 py-1 [&_path]:fill-white",
|
|
570
|
+
"inline-flex cursor-pointer items-center justify-center gap-2 border-none",
|
|
571
|
+
"transition-all duration-200 ease-in-out",
|
|
572
|
+
"hover:bg-background hover:text-foreground [&:hover_path]:fill-foreground"
|
|
573
|
+
),
|
|
574
|
+
onClick: () => window.open(nightlyWallet.url, "_blank"),
|
|
575
|
+
children: [
|
|
576
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DownloadText, {}),
|
|
577
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(NightlyIcon, { size: 30, fill: "white" })
|
|
578
|
+
]
|
|
579
|
+
}
|
|
580
|
+
)
|
|
581
|
+
] }),
|
|
582
|
+
!!installableWallets.length && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
|
|
583
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
584
|
+
"button",
|
|
585
|
+
{
|
|
586
|
+
onClick: () => setIsMoreWalletsOpen(!isMoreWalletsOpen),
|
|
587
|
+
className: cn(
|
|
588
|
+
"inline-flex items-center justify-center gap-2 self-center text-white",
|
|
589
|
+
"rounded-md text-sm font-medium whitespace-nowrap transition-all duration-200",
|
|
590
|
+
"cursor-pointer border-none bg-transparent",
|
|
591
|
+
"focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden",
|
|
592
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
593
|
+
"h-9 px-3 hover:bg-white/20"
|
|
594
|
+
),
|
|
595
|
+
children: [
|
|
596
|
+
"Other wallets",
|
|
597
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
598
|
+
CaretDownIcon,
|
|
599
|
+
{
|
|
600
|
+
size: 16,
|
|
601
|
+
className: cn(
|
|
602
|
+
"transition-transform duration-200",
|
|
603
|
+
isMoreWalletsOpen ? "rotate-180" : "rotate-0"
|
|
604
|
+
)
|
|
605
|
+
}
|
|
606
|
+
)
|
|
607
|
+
]
|
|
608
|
+
}
|
|
609
|
+
),
|
|
610
|
+
isMoreWalletsOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "animate-in fade-in duration-200", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex w-full flex-wrap items-start justify-center gap-4 pt-2", children: cleanWalletList(installableWallets).map((wallet) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
611
|
+
"div",
|
|
612
|
+
{
|
|
613
|
+
onClick: () => window.open(wallet.url, "_blank"),
|
|
614
|
+
className: "w-28 shrink-0 cursor-pointer",
|
|
615
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconWalletCard, { wallet, onConnect: onClose })
|
|
616
|
+
},
|
|
617
|
+
wallet.name
|
|
618
|
+
)) }) })
|
|
619
|
+
] })
|
|
620
|
+
] })
|
|
621
|
+
]
|
|
622
|
+
}
|
|
623
|
+
);
|
|
624
|
+
}
|
|
625
|
+
function WalletModal(_a) {
|
|
626
|
+
var _b = _a, {
|
|
627
|
+
onClose
|
|
628
|
+
} = _b, walletSortingOptions = __objRest(_b, [
|
|
629
|
+
"onClose"
|
|
630
|
+
]);
|
|
631
|
+
const [mounted, setMounted] = (0, import_react.useState)(false);
|
|
632
|
+
const isMobile = useIsMobile();
|
|
633
|
+
(0, import_react.useEffect)(() => {
|
|
634
|
+
setMounted(true);
|
|
635
|
+
return () => setMounted(false);
|
|
636
|
+
}, []);
|
|
637
|
+
if (!mounted || typeof window === "undefined") {
|
|
638
|
+
return null;
|
|
639
|
+
}
|
|
640
|
+
const contentProps = __spreadValues({
|
|
641
|
+
onClose
|
|
642
|
+
}, walletSortingOptions);
|
|
643
|
+
return isMobile ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
644
|
+
Drawer,
|
|
645
|
+
{
|
|
646
|
+
open: true,
|
|
647
|
+
onOpenChange: (open) => !open && onClose(),
|
|
648
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(DrawerContent, { className: "z-9999", children: [
|
|
649
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DrawerTitle, { className: "sr-only", children: "Connect Wallet" }),
|
|
650
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DrawerDescription, { className: "sr-only", children: "Securely connect your wallet to transfer digital assets to and from the Movement network." }),
|
|
651
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ConnectWalletContent, __spreadProps(__spreadValues({}, contentProps), { showCloseButton: false }))
|
|
652
|
+
] })
|
|
653
|
+
}
|
|
654
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
655
|
+
Dialog,
|
|
656
|
+
{
|
|
657
|
+
open: true,
|
|
658
|
+
onOpenChange: (open) => !open && onClose(),
|
|
659
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
660
|
+
DialogContent,
|
|
661
|
+
{
|
|
662
|
+
showCloseButton: false,
|
|
663
|
+
className: "border-0 bg-transparent p-0",
|
|
664
|
+
children: [
|
|
665
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogTitle, { className: "sr-only", children: "Connect Wallet" }),
|
|
666
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DialogDescription, { className: "sr-only", children: "Securely connect your wallet to transfer digital assets to and from the Movement network." }),
|
|
667
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ConnectWalletContent, __spreadValues({}, contentProps))
|
|
668
|
+
]
|
|
669
|
+
}
|
|
670
|
+
)
|
|
671
|
+
}
|
|
672
|
+
);
|
|
673
|
+
}
|
|
674
|
+
var gridCard = (child) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "group/wallet relative h-28 w-28 cursor-pointer rounded-lg backdrop-blur-[1.3125rem] transition-shadow duration-200 ease-in-out hover:shadow-[0.25rem_0.25rem_0_hsl(var(--primary))]", children: [
|
|
675
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "absolute inset-0 rounded-lg bg-linear-to-br from-white/[0.096] to-transparent backdrop-blur-[1.3125rem] group-hover/wallet:from-white/40" }),
|
|
676
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "absolute top-1/2 left-1/2 flex h-20.5 w-20.5 -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center gap-2 p-0", children: child })
|
|
677
|
+
] });
|
|
678
|
+
function IconWalletCard({ wallet, onConnect }) {
|
|
679
|
+
const installRequired = (0, import_wallet_adapter_react.isInstallRequired)(wallet);
|
|
680
|
+
if (installRequired) {
|
|
681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_wallet_adapter_react.WalletItem, { wallet, onConnect, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "cursor-default border-none bg-transparent p-0", children: gridCard(
|
|
682
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
683
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "h-14 w-14", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_wallet_adapter_react.WalletItem.Icon, { className: "h-full w-full" }) }),
|
|
684
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex h-4.5 w-20.5 items-center justify-center text-center font-['TWK_Everett_Mono',monospace] text-lg leading-[100%] font-normal tracking-[-0.06em] text-white", children: cleanWalletName(wallet.name) }),
|
|
685
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "absolute top-[-1rem] left-1/2 z-9999 hidden h-5 w-28 -translate-x-1/2 items-center justify-center overflow-hidden rounded-t-lg bg-primary/80 group-hover/wallet:inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "font-['TWK_Everett_Mono',monospace] text-xs leading-[14px] font-bold tracking-[0.40px] text-secondary uppercase", children: "INSTALL" }) })
|
|
686
|
+
] })
|
|
687
|
+
) }) });
|
|
688
|
+
}
|
|
689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_wallet_adapter_react.WalletItem, { wallet, onConnect, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_wallet_adapter_react.WalletItem.ConnectButton, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("button", { className: "relative cursor-pointer border-none bg-transparent p-0", children: [
|
|
690
|
+
gridCard(
|
|
691
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
692
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "h-14 w-14", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_wallet_adapter_react.WalletItem.Icon, { className: "h-full w-full" }) }),
|
|
693
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex h-4.5 w-20.5 items-center justify-center text-center font-['TWK_Everett_Mono',monospace] text-lg leading-[100%] font-normal tracking-[-0.06em] text-white", children: cleanWalletName(wallet.name) })
|
|
694
|
+
] })
|
|
695
|
+
),
|
|
696
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "pointer-events-none absolute bottom-[-0.5rem] left-1/2 -translate-x-1/2 text-xs whitespace-nowrap text-white/60 opacity-0 transition-opacity duration-200 ease-in-out hover:opacity-100", children: "Click to connect" })
|
|
697
|
+
] }) }) });
|
|
698
|
+
}
|
|
699
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
700
|
+
0 && (module.exports = {
|
|
701
|
+
WalletModal
|
|
702
|
+
});
|