@keyringnetwork/keyring-connect-sdk 4.1.0-alpha.1 → 4.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3279 -0
- package/dist/index.d.cts +263 -0
- package/dist/index.d.ts +263 -3
- package/dist/index.js +3251 -21
- package/package.json +12 -8
- package/readme.md +20 -75
- package/dist/core/VerificationSession.d.ts +0 -62
- package/dist/core/VerificationSession.js +0 -404
- package/dist/core/errors.d.ts +0 -49
- package/dist/core/errors.js +0 -81
- package/dist/core/htppClient.d.ts +0 -17
- package/dist/core/htppClient.js +0 -160
- package/dist/core/keyringConnectExtension.d.ts +0 -45
- package/dist/core/keyringConnectExtension.js +0 -241
- package/dist/core/websocketClient.d.ts +0 -23
- package/dist/core/websocketClient.js +0 -220
- package/dist/types/api.d.ts +0 -24
- package/dist/types/api.js +0 -2
- package/dist/types/core.d.ts +0 -78
- package/dist/types/core.js +0 -2
- package/dist/types/extension.d.ts +0 -59
- package/dist/types/extension.js +0 -9
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.js +0 -20
- package/dist/types/websocket.d.ts +0 -68
- package/dist/types/websocket.js +0 -3
- package/dist/ui/UIManager.d.ts +0 -52
- package/dist/ui/UIManager.js +0 -257
- package/dist/ui/components/keyring-button.d.ts +0 -12
- package/dist/ui/components/keyring-button.js +0 -140
- package/dist/ui/components/keyring-text.d.ts +0 -12
- package/dist/ui/components/keyring-text.js +0 -169
- package/dist/ui/composites/keyring-complete-modal.d.ts +0 -19
- package/dist/ui/composites/keyring-complete-modal.js +0 -200
- package/dist/ui/composites/keyring-mobile-modal.d.ts +0 -25
- package/dist/ui/composites/keyring-mobile-modal.js +0 -308
- package/dist/ui/composites/keyring-qr-modal.d.ts +0 -32
- package/dist/ui/composites/keyring-qr-modal.js +0 -464
- package/dist/ui/composites/keyring-selection-modal.d.ts +0 -25
- package/dist/ui/composites/keyring-selection-modal.js +0 -342
- package/dist/ui/composites/keyring-terminated-modal.d.ts +0 -14
- package/dist/ui/composites/keyring-terminated-modal.js +0 -121
- package/dist/ui/icons/apple-icon.d.ts +0 -4
- package/dist/ui/icons/apple-icon.js +0 -47
- package/dist/ui/icons/check-circle.d.ts +0 -4
- package/dist/ui/icons/check-circle.js +0 -35
- package/dist/ui/icons/checkmark.d.ts +0 -4
- package/dist/ui/icons/checkmark.js +0 -37
- package/dist/ui/icons/close-circle.d.ts +0 -4
- package/dist/ui/icons/close-circle.js +0 -35
- package/dist/ui/icons/error-circle.d.ts +0 -4
- package/dist/ui/icons/error-circle.js +0 -48
- package/dist/ui/icons/extension-grid.d.ts +0 -4
- package/dist/ui/icons/extension-grid.js +0 -79
- package/dist/ui/icons/google-icon.d.ts +0 -4
- package/dist/ui/icons/google-icon.js +0 -55
- package/dist/ui/icons/gradient-donut.d.ts +0 -8
- package/dist/ui/icons/gradient-donut.js +0 -85
- package/dist/ui/icons/keyring.d.ts +0 -4
- package/dist/ui/icons/keyring.js +0 -71
- package/dist/ui/icons/mobile-grid.d.ts +0 -4
- package/dist/ui/icons/mobile-grid.js +0 -68
- package/dist/ui/icons/success.d.ts +0 -4
- package/dist/ui/icons/success.js +0 -54
- package/dist/utils/environment.d.ts +0 -34
- package/dist/utils/environment.js +0 -67
- package/dist/utils/logger.d.ts +0 -7
- package/dist/utils/logger.js +0 -40
- package/dist/utils/platformUtils.d.ts +0 -24
- package/dist/utils/platformUtils.js +0 -64
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,3279 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
31
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
32
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
33
|
+
if (decorator = decorators[i])
|
|
34
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
35
|
+
if (kind && result) __defProp(target, key, result);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/index.ts
|
|
40
|
+
var src_exports = {};
|
|
41
|
+
__export(src_exports, {
|
|
42
|
+
EVENT_ACTIONS: () => import_keyring_core_sdk3.EVENT_ACTIONS,
|
|
43
|
+
VerificationSession: () => VerificationSession
|
|
44
|
+
});
|
|
45
|
+
module.exports = __toCommonJS(src_exports);
|
|
46
|
+
__reExport(src_exports, require("@keyringnetwork/contracts-abi"), module.exports);
|
|
47
|
+
|
|
48
|
+
// src/core/VerificationSession.ts
|
|
49
|
+
var import_keyring_core_sdk2 = require("@keyringnetwork/keyring-core-sdk");
|
|
50
|
+
|
|
51
|
+
// src/ui/UIManager.ts
|
|
52
|
+
var import_qr_code_styling = __toESM(require("qr-code-styling"), 1);
|
|
53
|
+
|
|
54
|
+
// src/utils/logger.ts
|
|
55
|
+
var import_pino = __toESM(require("pino"), 1);
|
|
56
|
+
|
|
57
|
+
// package.json
|
|
58
|
+
var package_default = {
|
|
59
|
+
name: "@keyringnetwork/keyring-connect-sdk",
|
|
60
|
+
version: "4.1.0-alpha.3",
|
|
61
|
+
description: "An SDK for interacting with Keyring Connect browser extension",
|
|
62
|
+
type: "module",
|
|
63
|
+
main: "dist/index.cjs",
|
|
64
|
+
module: "dist/index.js",
|
|
65
|
+
types: "dist/index.d.ts",
|
|
66
|
+
scripts: {
|
|
67
|
+
build: "pnpm clean && tsup",
|
|
68
|
+
dev: "pnpm clean && tsup --watch",
|
|
69
|
+
prepublish: "pnpm build",
|
|
70
|
+
test: "jest",
|
|
71
|
+
"test:watch": "jest --watch",
|
|
72
|
+
"test:coverage": "jest --coverage",
|
|
73
|
+
"test:ci": "jest --ci --coverage --watchAll=false",
|
|
74
|
+
clean: "rm -rf dist"
|
|
75
|
+
},
|
|
76
|
+
files: [
|
|
77
|
+
"dist"
|
|
78
|
+
],
|
|
79
|
+
keywords: [
|
|
80
|
+
"keyring",
|
|
81
|
+
"keyring connect",
|
|
82
|
+
"sdk"
|
|
83
|
+
],
|
|
84
|
+
author: "Keyring Network",
|
|
85
|
+
license: "ISC",
|
|
86
|
+
devDependencies: {
|
|
87
|
+
"@types/chrome": "^0.0.268",
|
|
88
|
+
"@types/jest": "^29.5.0",
|
|
89
|
+
"@types/qrcode": "^1.5.5",
|
|
90
|
+
autoprefixer: "^10.4.21",
|
|
91
|
+
jest: "^29.7.0",
|
|
92
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
93
|
+
postcss: "^8.5.6",
|
|
94
|
+
tailwindcss: "^3.4.17",
|
|
95
|
+
"ts-jest": "^29.1.0",
|
|
96
|
+
"ts-node": "^10.9.2",
|
|
97
|
+
tsup: "^8.5.1",
|
|
98
|
+
typescript: "^5.6.3"
|
|
99
|
+
},
|
|
100
|
+
dependencies: {
|
|
101
|
+
"@keyringnetwork/contracts-abi": "2.6.1",
|
|
102
|
+
"@keyringnetwork/keyring-core-sdk": "1.0.0-alpha.1",
|
|
103
|
+
"@keyringnetwork/keyring-dtos": "1.0.0",
|
|
104
|
+
axios: "^1.12.2",
|
|
105
|
+
lit: "^3.3.1",
|
|
106
|
+
pino: "^9.13.1",
|
|
107
|
+
"qr-code-styling": "^1.9.2",
|
|
108
|
+
"socket.io-client": "^4.8.1"
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// src/utils/logger.ts
|
|
113
|
+
var KeyringLogger = class {
|
|
114
|
+
static {
|
|
115
|
+
this.prefix = "[Keyring SDK]";
|
|
116
|
+
}
|
|
117
|
+
static {
|
|
118
|
+
this.packageVersion = package_default.version;
|
|
119
|
+
}
|
|
120
|
+
static init(scope) {
|
|
121
|
+
const logger2 = this.createPinoLogger(scope);
|
|
122
|
+
return logger2;
|
|
123
|
+
}
|
|
124
|
+
static createPinoLogger(scope) {
|
|
125
|
+
const metadata = {
|
|
126
|
+
scope,
|
|
127
|
+
packageVersion: this.packageVersion
|
|
128
|
+
};
|
|
129
|
+
const logger2 = (0, import_pino.default)({
|
|
130
|
+
name: this.prefix,
|
|
131
|
+
level: "debug",
|
|
132
|
+
browser: {
|
|
133
|
+
asObject: true,
|
|
134
|
+
formatters: {
|
|
135
|
+
level: (label) => ({
|
|
136
|
+
level: label.toUpperCase()
|
|
137
|
+
}),
|
|
138
|
+
log(object) {
|
|
139
|
+
return { ...object, metadata };
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
timestamp: () => `${new Date(Date.now()).toISOString()}`
|
|
144
|
+
});
|
|
145
|
+
return logger2;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
// src/ui/components/keyring-button.ts
|
|
150
|
+
var import_lit = require("lit");
|
|
151
|
+
var import_decorators = require("lit/decorators.js");
|
|
152
|
+
var KeyringButton = class extends import_lit.LitElement {
|
|
153
|
+
constructor() {
|
|
154
|
+
super(...arguments);
|
|
155
|
+
this.variant = "primary";
|
|
156
|
+
this.size = "md";
|
|
157
|
+
this.disabled = false;
|
|
158
|
+
this.loading = false;
|
|
159
|
+
}
|
|
160
|
+
render() {
|
|
161
|
+
return import_lit.html`
|
|
162
|
+
<button
|
|
163
|
+
class="button ${this.variant} ${this.size}"
|
|
164
|
+
?disabled=${this.disabled || this.loading}
|
|
165
|
+
@click=${this.handleClick}
|
|
166
|
+
>
|
|
167
|
+
${this.loading ? import_lit.html`<div class="loading-spinner"></div>` : ""}
|
|
168
|
+
<slot></slot>
|
|
169
|
+
</button>
|
|
170
|
+
`;
|
|
171
|
+
}
|
|
172
|
+
handleClick(e) {
|
|
173
|
+
if (this.disabled || this.loading) {
|
|
174
|
+
e.preventDefault();
|
|
175
|
+
e.stopPropagation();
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
this.dispatchEvent(
|
|
179
|
+
new CustomEvent("click", {
|
|
180
|
+
bubbles: true,
|
|
181
|
+
composed: true
|
|
182
|
+
})
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
KeyringButton.styles = import_lit.css`
|
|
187
|
+
:host {
|
|
188
|
+
display: inline-block;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.button {
|
|
192
|
+
display: inline-flex;
|
|
193
|
+
align-items: center;
|
|
194
|
+
justify-content: center;
|
|
195
|
+
gap: 8px;
|
|
196
|
+
border: none;
|
|
197
|
+
border-radius: 8px;
|
|
198
|
+
font-weight: 500;
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
transition: all 0.2s ease;
|
|
201
|
+
font-family: inherit;
|
|
202
|
+
width: 100%;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.button:disabled {
|
|
206
|
+
cursor: not-allowed;
|
|
207
|
+
opacity: 0.6;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Sizes */
|
|
211
|
+
|
|
212
|
+
.xs {
|
|
213
|
+
padding: 6px 10px;
|
|
214
|
+
font-size: 12px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.sm {
|
|
218
|
+
padding: 8px 12px;
|
|
219
|
+
font-size: 14px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.md {
|
|
223
|
+
padding: 10px 16px;
|
|
224
|
+
font-size: 14px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.lg {
|
|
228
|
+
padding: 12px 20px;
|
|
229
|
+
font-size: 16px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* Variants */
|
|
233
|
+
.primary {
|
|
234
|
+
background: #0f2830;
|
|
235
|
+
color: #fff;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.primary:hover:not(:disabled) {
|
|
239
|
+
background: #1a3d48;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.ghost {
|
|
243
|
+
background: transparent;
|
|
244
|
+
color: #6b7280;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.ghost:hover:not(:disabled) {
|
|
248
|
+
color: #374151;
|
|
249
|
+
background: #f9fafb;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.loading-spinner {
|
|
253
|
+
width: 16px;
|
|
254
|
+
height: 16px;
|
|
255
|
+
border: 2px solid transparent;
|
|
256
|
+
border-top: 2px solid currentColor;
|
|
257
|
+
border-radius: 50%;
|
|
258
|
+
animation: spin 1s linear infinite;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
@keyframes spin {
|
|
262
|
+
to {
|
|
263
|
+
transform: rotate(360deg);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
`;
|
|
267
|
+
__decorateClass([
|
|
268
|
+
(0, import_decorators.property)()
|
|
269
|
+
], KeyringButton.prototype, "variant", 2);
|
|
270
|
+
__decorateClass([
|
|
271
|
+
(0, import_decorators.property)()
|
|
272
|
+
], KeyringButton.prototype, "size", 2);
|
|
273
|
+
__decorateClass([
|
|
274
|
+
(0, import_decorators.property)({ type: Boolean })
|
|
275
|
+
], KeyringButton.prototype, "disabled", 2);
|
|
276
|
+
__decorateClass([
|
|
277
|
+
(0, import_decorators.property)({ type: Boolean })
|
|
278
|
+
], KeyringButton.prototype, "loading", 2);
|
|
279
|
+
KeyringButton = __decorateClass([
|
|
280
|
+
(0, import_decorators.customElement)("keyring-button")
|
|
281
|
+
], KeyringButton);
|
|
282
|
+
|
|
283
|
+
// src/ui/components/keyring-text.ts
|
|
284
|
+
var import_lit2 = require("lit");
|
|
285
|
+
var import_decorators2 = require("lit/decorators.js");
|
|
286
|
+
var KeyringText = class extends import_lit2.LitElement {
|
|
287
|
+
constructor() {
|
|
288
|
+
super(...arguments);
|
|
289
|
+
this.variant = "text-base";
|
|
290
|
+
this.color = "primary";
|
|
291
|
+
this.align = "left";
|
|
292
|
+
this.weight = "normal";
|
|
293
|
+
}
|
|
294
|
+
render() {
|
|
295
|
+
return import_lit2.html`
|
|
296
|
+
<p class="text ${this.variant} ${this.weight} ${this.color} ${this.align}">
|
|
297
|
+
<slot></slot>
|
|
298
|
+
</p>
|
|
299
|
+
`;
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
KeyringText.styles = import_lit2.css`
|
|
303
|
+
:host {
|
|
304
|
+
display: block;
|
|
305
|
+
/* CSS Variables */
|
|
306
|
+
--text-xs: 0.75rem; /* 12px */
|
|
307
|
+
--text-xs--line-height: 1.333; /* calc(1 / 0.75) */
|
|
308
|
+
|
|
309
|
+
--text-sm: 0.875rem; /* 14px */
|
|
310
|
+
--text-sm--line-height: 1.429; /* calc(1.25 / 0.875) */
|
|
311
|
+
|
|
312
|
+
--text-base: 1rem; /* 16px */
|
|
313
|
+
--text-base--line-height: 1.5; /* calc(1.5 / 1) */
|
|
314
|
+
|
|
315
|
+
--text-lg: 1.125rem; /* 18px */
|
|
316
|
+
--text-lg--line-height: 1.556; /* calc(1.75 / 1.125) */
|
|
317
|
+
|
|
318
|
+
--text-xl: 1.25rem; /* 20px */
|
|
319
|
+
--text-xl--line-height: 1.4; /* calc(1.75 / 1.25) */
|
|
320
|
+
|
|
321
|
+
--text-2xl: 1.5rem; /* 24px */
|
|
322
|
+
--text-2xl--line-height: 1.333; /* calc(2 / 1.5) */
|
|
323
|
+
|
|
324
|
+
--text-3xl: 1.875rem; /* 30px */
|
|
325
|
+
--text-3xl--line-height: 1.2; /* calc(2.25 / 1.875) */
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.text {
|
|
329
|
+
margin: 0;
|
|
330
|
+
font-family: Inter, "Segoe UI", Roboto, sans-serif;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* Size Variants */
|
|
334
|
+
.text-xs {
|
|
335
|
+
font-size: var(--text-xs);
|
|
336
|
+
line-height: var(--text-xs--line-height);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.text-sm {
|
|
340
|
+
font-size: var(--text-sm);
|
|
341
|
+
line-height: var(--text-sm--line-height);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.text-base {
|
|
345
|
+
font-size: var(--text-base);
|
|
346
|
+
line-height: var(--text-base--line-height);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.text-lg {
|
|
350
|
+
font-size: var(--text-lg);
|
|
351
|
+
line-height: var(--text-lg--line-height);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.text-xl {
|
|
355
|
+
font-size: var(--text-xl);
|
|
356
|
+
line-height: var(--text-xl--line-height);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.text-2xl {
|
|
360
|
+
font-size: var(--text-2xl);
|
|
361
|
+
line-height: var(--text-2xl--line-height);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.text-3xl {
|
|
365
|
+
font-size: var(--text-3xl);
|
|
366
|
+
line-height: var(--text-3xl--line-height);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/* Font Weight Variants */
|
|
370
|
+
.light {
|
|
371
|
+
font-weight: 300;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.normal {
|
|
375
|
+
font-weight: 400;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.medium {
|
|
379
|
+
font-weight: 500;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.semibold {
|
|
383
|
+
font-weight: 600;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.bold {
|
|
387
|
+
font-weight: 700;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/* Colors */
|
|
391
|
+
.primary {
|
|
392
|
+
color: #0f2830;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.secondary {
|
|
396
|
+
color: #75849a;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.success {
|
|
400
|
+
color: #24af75;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.warning {
|
|
404
|
+
color: #f59e0b;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.error {
|
|
408
|
+
color: #eb4577;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.white {
|
|
412
|
+
color: #ffffff;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/* Alignment */
|
|
416
|
+
.left {
|
|
417
|
+
text-align: left;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.center {
|
|
421
|
+
text-align: center;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.right {
|
|
425
|
+
text-align: right;
|
|
426
|
+
}
|
|
427
|
+
`;
|
|
428
|
+
__decorateClass([
|
|
429
|
+
(0, import_decorators2.property)()
|
|
430
|
+
], KeyringText.prototype, "variant", 2);
|
|
431
|
+
__decorateClass([
|
|
432
|
+
(0, import_decorators2.property)()
|
|
433
|
+
], KeyringText.prototype, "color", 2);
|
|
434
|
+
__decorateClass([
|
|
435
|
+
(0, import_decorators2.property)()
|
|
436
|
+
], KeyringText.prototype, "align", 2);
|
|
437
|
+
__decorateClass([
|
|
438
|
+
(0, import_decorators2.property)()
|
|
439
|
+
], KeyringText.prototype, "weight", 2);
|
|
440
|
+
KeyringText = __decorateClass([
|
|
441
|
+
(0, import_decorators2.customElement)("keyring-text")
|
|
442
|
+
], KeyringText);
|
|
443
|
+
|
|
444
|
+
// src/ui/composites/keyring-complete-modal.ts
|
|
445
|
+
var import_lit6 = require("lit");
|
|
446
|
+
var import_decorators6 = require("lit/decorators.js");
|
|
447
|
+
|
|
448
|
+
// src/ui/icons/check-circle.ts
|
|
449
|
+
var import_lit3 = require("lit");
|
|
450
|
+
var import_decorators3 = require("lit/decorators.js");
|
|
451
|
+
var CheckCircleIcon = class extends import_lit3.LitElement {
|
|
452
|
+
render() {
|
|
453
|
+
return import_lit3.html`
|
|
454
|
+
<svg
|
|
455
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
456
|
+
width="14"
|
|
457
|
+
height="13"
|
|
458
|
+
viewBox="0 0 14 13"
|
|
459
|
+
fill="none"
|
|
460
|
+
>
|
|
461
|
+
<path
|
|
462
|
+
fill-rule="evenodd"
|
|
463
|
+
clip-rule="evenodd"
|
|
464
|
+
d="M9.66135 5.31469L6.58268 8.39335C6.48468 8.49135 6.35735 8.54002 6.22935 8.54002C6.10068 8.54002 5.97335 8.49135 5.87535 8.39335L4.33602 6.85402C4.14068 6.65869 4.14068 6.34202 4.33602 6.14669C4.53135 5.95135 4.84735 5.95135 5.04268 6.14669L6.22935 7.33269L8.95402 4.60735C9.14935 4.41202 9.46602 4.41202 9.66135 4.60735C9.85668 4.80269 9.85668 5.11935 9.66135 5.31469ZM6.99935 0.166687C3.50735 0.166687 0.666016 3.00802 0.666016 6.50002C0.666016 9.99269 3.50735 12.8334 6.99935 12.8334C10.4913 12.8334 13.3327 9.99269 13.3327 6.50002C13.3327 3.00802 10.4913 0.166687 6.99935 0.166687Z"
|
|
465
|
+
fill="white"
|
|
466
|
+
/>
|
|
467
|
+
</svg>
|
|
468
|
+
`;
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
CheckCircleIcon = __decorateClass([
|
|
472
|
+
(0, import_decorators3.customElement)("check-circle-icon")
|
|
473
|
+
], CheckCircleIcon);
|
|
474
|
+
|
|
475
|
+
// src/ui/icons/keyring.ts
|
|
476
|
+
var import_lit4 = require("lit");
|
|
477
|
+
var import_decorators4 = require("lit/decorators.js");
|
|
478
|
+
var KeyringIcon = class extends import_lit4.LitElement {
|
|
479
|
+
render() {
|
|
480
|
+
return import_lit4.html`
|
|
481
|
+
<svg
|
|
482
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
483
|
+
width="86"
|
|
484
|
+
height="13"
|
|
485
|
+
viewBox="0 0 86 13"
|
|
486
|
+
fill="none"
|
|
487
|
+
>
|
|
488
|
+
<path
|
|
489
|
+
d="M9.71875 12.1707H7.88965L7.86523 12.1404L3.58105 6.69122L2.11426 8.0545V12.1707H0.418945V0.493958H2.11426V5.82501L7.72168 0.516418L7.74512 0.493958H9.7666V0.930481L9.74121 0.953918L4.78711 5.56427L9.70117 11.7195L9.71875 11.742V12.1707Z"
|
|
490
|
+
fill="#75849A"
|
|
491
|
+
stroke="#0F2830"
|
|
492
|
+
stroke-width="0.161828"
|
|
493
|
+
/>
|
|
494
|
+
<path
|
|
495
|
+
d="M21.751 0.493958V2.03107H15.999V5.32404H21.1914V6.86115H15.999V10.6336H21.8311V12.1707H14.3037V0.493958H21.751Z"
|
|
496
|
+
fill="#75849A"
|
|
497
|
+
stroke="#0F2830"
|
|
498
|
+
stroke-width="0.161828"
|
|
499
|
+
/>
|
|
500
|
+
<path
|
|
501
|
+
d="M28.085 0.493958L28.1074 0.538879L31.0625 6.45685C31.0752 6.48224 31.0829 6.48646 31.084 6.48712C31.0855 6.488 31.0921 6.492 31.1182 6.492C31.1446 6.492 31.151 6.48791 31.1523 6.48712C31.1535 6.48642 31.1612 6.48214 31.1738 6.45685L34.1289 0.538879L34.1514 0.493958H35.8643V0.914856L35.8545 0.932434L30.0479 12.1277L30.0254 12.1707H28.3535V11.7508L28.3623 11.7332L30.1797 8.25861L26.3809 0.932434L26.3721 0.914856V0.493958H28.085Z"
|
|
502
|
+
fill="#75849A"
|
|
503
|
+
stroke="#0F2830"
|
|
504
|
+
stroke-width="0.161828"
|
|
505
|
+
/>
|
|
506
|
+
<path
|
|
507
|
+
d="M41.7021 5.8299H44.4512C45.1696 5.82986 45.713 5.68735 46.0762 5.38556C46.4364 5.08603 46.6338 4.61664 46.6338 3.9295C46.6337 3.24254 46.4363 2.77391 46.0762 2.47443C45.713 2.17255 45.1697 2.03012 44.4512 2.03009H41.7021V5.8299ZM47.7705 12.158H46.1035L46.083 12.1092L44.0361 7.36603H41.7021V12.158H40.0303V0.493958H44.6084C45.6828 0.494002 46.6081 0.776874 47.2656 1.35236C47.9248 1.92937 48.3056 2.79227 48.3057 3.9295C48.3057 4.87532 48.0435 5.63192 47.5752 6.1922C47.1265 6.72903 46.4931 7.07711 45.7363 7.24493L47.7637 11.7244L47.7705 11.7401V12.158Z"
|
|
508
|
+
fill="#75849A"
|
|
509
|
+
stroke="#0F2830"
|
|
510
|
+
stroke-width="0.161828"
|
|
511
|
+
/>
|
|
512
|
+
<path
|
|
513
|
+
d="M55.2822 0.493958V12.1707H53.5869V0.493958H55.2822Z"
|
|
514
|
+
fill="#75849A"
|
|
515
|
+
stroke="#0F2830"
|
|
516
|
+
stroke-width="0.161828"
|
|
517
|
+
/>
|
|
518
|
+
<path
|
|
519
|
+
d="M64.2471 0.493958L64.2666 0.546692L67.9395 10.4451L67.9648 10.4813C67.9725 10.4854 67.9878 10.49 68.0244 10.4901C68.0365 10.4901 68.0433 10.4882 68.0459 10.4871C68.0476 10.4864 68.0477 10.4853 68.0479 10.4852C68.0494 10.4829 68.0556 10.4725 68.0557 10.4432V0.493958H69.751V12.1707H66.8184L66.7988 12.118L63.125 2.22052L63.0996 2.18341C63.092 2.1793 63.0768 2.1756 63.04 2.1756C63.0283 2.1756 63.0222 2.17749 63.0195 2.17853C63.0175 2.17934 63.0167 2.17937 63.0166 2.1795C63.0154 2.18108 63.0088 2.19162 63.0088 2.22247V12.1707H61.3135V0.493958H64.2471Z"
|
|
520
|
+
fill="#75849A"
|
|
521
|
+
stroke="#0F2830"
|
|
522
|
+
stroke-width="0.161828"
|
|
523
|
+
/>
|
|
524
|
+
<path
|
|
525
|
+
d="M80.0273 0.421265C78.3285 0.421265 77.0897 0.988138 76.2705 1.84607C75.4525 2.70292 75.0593 3.84387 75.0361 4.98083L75.0342 5.06287H76.668L76.6719 4.98669C76.7167 4.20891 76.976 3.44894 77.5098 2.88416C78.0423 2.3208 78.8563 1.94275 80.0273 1.94275C81.2218 1.94281 82.1981 2.38853 82.877 3.17615C83.5569 3.9651 83.9443 5.10476 83.9443 6.50232C83.9443 7.89988 83.5569 9.03954 82.877 9.82849C82.1981 10.6161 81.2218 11.0618 80.0273 11.0619C78.8645 11.0619 78.0667 10.7319 77.5557 10.2142C77.0617 9.71388 76.827 9.02768 76.7979 8.26306H80.792V6.72498H75.1426V7.68591C75.1426 9.19297 75.5725 10.4199 76.4102 11.2699C77.2481 12.12 78.4833 12.5833 80.0723 12.5834C81.75 12.5834 83.1305 11.9754 84.0898 10.9066C85.0484 9.83879 85.5811 8.3178 85.5811 6.50232C85.5811 4.68689 85.0483 3.16591 84.084 2.09802C83.1188 1.02929 81.7275 0.421328 80.0273 0.421265Z"
|
|
526
|
+
fill="#75849A"
|
|
527
|
+
stroke="#0F2830"
|
|
528
|
+
stroke-width="0.161828"
|
|
529
|
+
/>
|
|
530
|
+
</svg>
|
|
531
|
+
`;
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
KeyringIcon = __decorateClass([
|
|
535
|
+
(0, import_decorators4.customElement)("keyring-icon")
|
|
536
|
+
], KeyringIcon);
|
|
537
|
+
|
|
538
|
+
// src/ui/icons/success.ts
|
|
539
|
+
var import_lit5 = require("lit");
|
|
540
|
+
var import_decorators5 = require("lit/decorators.js");
|
|
541
|
+
var SuccessIcon = class extends import_lit5.LitElement {
|
|
542
|
+
render() {
|
|
543
|
+
return import_lit5.html`
|
|
544
|
+
<svg
|
|
545
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
546
|
+
width="52"
|
|
547
|
+
height="52"
|
|
548
|
+
viewBox="0 0 52 52"
|
|
549
|
+
fill="none"
|
|
550
|
+
>
|
|
551
|
+
<path
|
|
552
|
+
fill-rule="evenodd"
|
|
553
|
+
clip-rule="evenodd"
|
|
554
|
+
d="M36.6483 21.2587L24.3337 33.5734C23.9417 33.9654 23.4323 34.16 22.9203 34.16C22.4057 34.16 21.8963 33.9654 21.5043 33.5734L15.347 27.416C14.5657 26.6347 14.5657 25.368 15.347 24.5867C16.1283 23.8054 17.3923 23.8054 18.1737 24.5867L22.9203 29.3307L33.819 18.4294C34.6003 17.648 35.867 17.648 36.6483 18.4294C37.4297 19.2107 37.4297 20.4774 36.6483 21.2587ZM26.0003 0.666687C12.0323 0.666687 0.666992 12.032 0.666992 26C0.666992 39.9707 12.0323 51.3334 26.0003 51.3334C39.9683 51.3334 51.3337 39.9707 51.3337 26C51.3337 12.032 39.9683 0.666687 26.0003 0.666687Z"
|
|
555
|
+
fill="black"
|
|
556
|
+
/>
|
|
557
|
+
<path
|
|
558
|
+
fill-rule="evenodd"
|
|
559
|
+
clip-rule="evenodd"
|
|
560
|
+
d="M36.6483 21.2587L24.3337 33.5734C23.9417 33.9654 23.4323 34.16 22.9203 34.16C22.4057 34.16 21.8963 33.9654 21.5043 33.5734L15.347 27.416C14.5657 26.6347 14.5657 25.368 15.347 24.5867C16.1283 23.8054 17.3923 23.8054 18.1737 24.5867L22.9203 29.3307L33.819 18.4294C34.6003 17.648 35.867 17.648 36.6483 18.4294C37.4297 19.2107 37.4297 20.4774 36.6483 21.2587ZM26.0003 0.666687C12.0323 0.666687 0.666992 12.032 0.666992 26C0.666992 39.9707 12.0323 51.3334 26.0003 51.3334C39.9683 51.3334 51.3337 39.9707 51.3337 26C51.3337 12.032 39.9683 0.666687 26.0003 0.666687Z"
|
|
561
|
+
fill="url(#paint0_linear_9144_120495)"
|
|
562
|
+
/>
|
|
563
|
+
<defs>
|
|
564
|
+
<linearGradient
|
|
565
|
+
id="paint0_linear_9144_120495"
|
|
566
|
+
x1="0.666992"
|
|
567
|
+
y1="26"
|
|
568
|
+
x2="51.3337"
|
|
569
|
+
y2="26"
|
|
570
|
+
gradientUnits="userSpaceOnUse"
|
|
571
|
+
>
|
|
572
|
+
<stop stop-color="#3B6FF7" />
|
|
573
|
+
<stop offset="1" stop-color="#0397FC" />
|
|
574
|
+
</linearGradient>
|
|
575
|
+
</defs>
|
|
576
|
+
</svg>
|
|
577
|
+
`;
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
SuccessIcon = __decorateClass([
|
|
581
|
+
(0, import_decorators5.customElement)("success-icon")
|
|
582
|
+
], SuccessIcon);
|
|
583
|
+
|
|
584
|
+
// src/ui/composites/keyring-complete-modal.ts
|
|
585
|
+
var KeyringCompleteModal = class extends import_lit6.LitElement {
|
|
586
|
+
constructor() {
|
|
587
|
+
super(...arguments);
|
|
588
|
+
this.title = "Verification Completed";
|
|
589
|
+
this.subtitle = "Your verification has been completed successfully.";
|
|
590
|
+
this.entityType = "Individual";
|
|
591
|
+
this.dataSource = "Binance";
|
|
592
|
+
this.dataSourceIcon = "";
|
|
593
|
+
}
|
|
594
|
+
connectedCallback() {
|
|
595
|
+
super.connectedCallback();
|
|
596
|
+
this.trapFocus();
|
|
597
|
+
}
|
|
598
|
+
render() {
|
|
599
|
+
return import_lit6.html`
|
|
600
|
+
<div class="modal" @click=${this.stopPropagation}>
|
|
601
|
+
<div class="content">
|
|
602
|
+
<success-icon></success-icon>
|
|
603
|
+
|
|
604
|
+
<div class="text-wrapper">
|
|
605
|
+
<keyring-text variant="text-3xl" weight="medium">${this.title}</keyring-text>
|
|
606
|
+
<keyring-text variant="text-sm">${this.subtitle}</keyring-text>
|
|
607
|
+
</div>
|
|
608
|
+
|
|
609
|
+
<div class="info-box">
|
|
610
|
+
<div class="info-row">
|
|
611
|
+
<keyring-text>Entity Type</keyring-text>
|
|
612
|
+
<keyring-text weight="semibold">${this.entityType}</keyring-text>
|
|
613
|
+
</div>
|
|
614
|
+
|
|
615
|
+
<div class="divider"></div>
|
|
616
|
+
|
|
617
|
+
<div class="info-row">
|
|
618
|
+
<keyring-text>Data Source</keyring-text>
|
|
619
|
+
<div class="data-source-value">
|
|
620
|
+
${this.dataSourceIcon ? import_lit6.html`<div class="data-source-icon">
|
|
621
|
+
<img src="${this.dataSourceIcon}" alt="${this.dataSource} icon" />
|
|
622
|
+
</div>` : ""}
|
|
623
|
+
<keyring-text weight="semibold">${this.dataSource}</keyring-text>
|
|
624
|
+
</div>
|
|
625
|
+
</div>
|
|
626
|
+
</div>
|
|
627
|
+
|
|
628
|
+
<keyring-button class="done-button" @click=${this.handleDone}>Done</keyring-button>
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
`;
|
|
632
|
+
}
|
|
633
|
+
// Event handlers
|
|
634
|
+
handleDone() {
|
|
635
|
+
this.dispatchEvent(new CustomEvent("close", { bubbles: true, composed: true }));
|
|
636
|
+
}
|
|
637
|
+
stopPropagation(e) {
|
|
638
|
+
e.stopPropagation();
|
|
639
|
+
}
|
|
640
|
+
trapFocus() {
|
|
641
|
+
const focusableElements = this.shadowRoot?.querySelectorAll(
|
|
642
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
643
|
+
);
|
|
644
|
+
if (focusableElements && focusableElements.length > 0) {
|
|
645
|
+
focusableElements[0].focus();
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
KeyringCompleteModal.styles = import_lit6.css`
|
|
650
|
+
:host {
|
|
651
|
+
position: fixed;
|
|
652
|
+
top: 0;
|
|
653
|
+
left: 0;
|
|
654
|
+
right: 0;
|
|
655
|
+
bottom: 0;
|
|
656
|
+
background-color: rgba(15, 40, 48, 0.45);
|
|
657
|
+
display: flex;
|
|
658
|
+
align-items: center;
|
|
659
|
+
justify-content: center;
|
|
660
|
+
z-index: 10000;
|
|
661
|
+
font-family: Inter, "Segoe UI", Roboto, sans-serif;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.modal {
|
|
665
|
+
background: white;
|
|
666
|
+
border-radius: 20px;
|
|
667
|
+
display: flex;
|
|
668
|
+
gap: 24px;
|
|
669
|
+
padding: 40px 24px 40px 24px;
|
|
670
|
+
flex-direction: column;
|
|
671
|
+
align-items: center;
|
|
672
|
+
max-width: 524px;
|
|
673
|
+
width: 100%;
|
|
674
|
+
max-height: 90vh;
|
|
675
|
+
overflow-y: auto;
|
|
676
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.content {
|
|
680
|
+
width: 100%;
|
|
681
|
+
display: flex;
|
|
682
|
+
flex-direction: column;
|
|
683
|
+
align-items: center;
|
|
684
|
+
justify-content: center;
|
|
685
|
+
gap: 24px;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.text-wrapper {
|
|
689
|
+
display: flex;
|
|
690
|
+
flex-direction: column;
|
|
691
|
+
align-items: center;
|
|
692
|
+
justify-content: center;
|
|
693
|
+
gap: 12px;
|
|
694
|
+
width: 100%;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
.info-box {
|
|
698
|
+
width: 100%;
|
|
699
|
+
border: 1px solid #e3e7ee;
|
|
700
|
+
border-radius: 16px;
|
|
701
|
+
background: linear-gradient(0deg, #f3f5fa 0%, #f3f5fa 100%);
|
|
702
|
+
padding: 12px 16px;
|
|
703
|
+
display: flex;
|
|
704
|
+
flex-direction: column;
|
|
705
|
+
gap: 16px;
|
|
706
|
+
box-sizing: border-box;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.info-row {
|
|
710
|
+
display: flex;
|
|
711
|
+
align-items: center;
|
|
712
|
+
justify-content: space-between;
|
|
713
|
+
width: 100%;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.data-source-value {
|
|
717
|
+
display: flex;
|
|
718
|
+
align-items: center;
|
|
719
|
+
gap: 4px;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.divider {
|
|
723
|
+
width: 100%;
|
|
724
|
+
height: 1px;
|
|
725
|
+
background-color: rgba(15, 40, 48, 0.12);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.data-source-icon {
|
|
729
|
+
width: 18px;
|
|
730
|
+
height: 18px;
|
|
731
|
+
display: flex;
|
|
732
|
+
align-items: center;
|
|
733
|
+
justify-content: center;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.data-source-icon img {
|
|
737
|
+
width: 100%;
|
|
738
|
+
height: 100%;
|
|
739
|
+
object-fit: contain;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.done-button {
|
|
743
|
+
width: 100%;
|
|
744
|
+
max-width: 200px;
|
|
745
|
+
margin: 0 auto;
|
|
746
|
+
}
|
|
747
|
+
`;
|
|
748
|
+
__decorateClass([
|
|
749
|
+
(0, import_decorators6.property)()
|
|
750
|
+
], KeyringCompleteModal.prototype, "title", 2);
|
|
751
|
+
__decorateClass([
|
|
752
|
+
(0, import_decorators6.property)()
|
|
753
|
+
], KeyringCompleteModal.prototype, "subtitle", 2);
|
|
754
|
+
__decorateClass([
|
|
755
|
+
(0, import_decorators6.property)({ attribute: "entity-type" })
|
|
756
|
+
], KeyringCompleteModal.prototype, "entityType", 2);
|
|
757
|
+
__decorateClass([
|
|
758
|
+
(0, import_decorators6.property)({ attribute: "data-source" })
|
|
759
|
+
], KeyringCompleteModal.prototype, "dataSource", 2);
|
|
760
|
+
__decorateClass([
|
|
761
|
+
(0, import_decorators6.property)({ attribute: "data-source-icon" })
|
|
762
|
+
], KeyringCompleteModal.prototype, "dataSourceIcon", 2);
|
|
763
|
+
KeyringCompleteModal = __decorateClass([
|
|
764
|
+
(0, import_decorators6.customElement)("keyring-complete-modal")
|
|
765
|
+
], KeyringCompleteModal);
|
|
766
|
+
|
|
767
|
+
// src/ui/composites/keyring-mobile-modal.ts
|
|
768
|
+
var import_lit9 = require("lit");
|
|
769
|
+
var import_decorators9 = require("lit/decorators.js");
|
|
770
|
+
|
|
771
|
+
// src/ui/icons/checkmark.ts
|
|
772
|
+
var import_lit7 = require("lit");
|
|
773
|
+
var import_decorators7 = require("lit/decorators.js");
|
|
774
|
+
var CheckmarkIcon = class extends import_lit7.LitElement {
|
|
775
|
+
render() {
|
|
776
|
+
return import_lit7.html`
|
|
777
|
+
<svg
|
|
778
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
779
|
+
width="25"
|
|
780
|
+
height="25"
|
|
781
|
+
viewBox="0 0 25 25"
|
|
782
|
+
fill="none"
|
|
783
|
+
style="display: inline-block; vertical-align: text-top;"
|
|
784
|
+
>
|
|
785
|
+
<path
|
|
786
|
+
d="M18.0371 8.6933L10.4236 16.3068L6.96289 12.8461"
|
|
787
|
+
stroke="#21CDAE"
|
|
788
|
+
stroke-width="2"
|
|
789
|
+
stroke-linecap="round"
|
|
790
|
+
stroke-linejoin="round"
|
|
791
|
+
/>
|
|
792
|
+
</svg>
|
|
793
|
+
`;
|
|
794
|
+
}
|
|
795
|
+
};
|
|
796
|
+
CheckmarkIcon = __decorateClass([
|
|
797
|
+
(0, import_decorators7.customElement)("checkmark-icon")
|
|
798
|
+
], CheckmarkIcon);
|
|
799
|
+
|
|
800
|
+
// src/ui/icons/gradient-donut.ts
|
|
801
|
+
var import_lit8 = require("lit");
|
|
802
|
+
var import_decorators8 = require("lit/decorators.js");
|
|
803
|
+
var GradientDonutIcon = class extends import_lit8.LitElement {
|
|
804
|
+
constructor() {
|
|
805
|
+
super(...arguments);
|
|
806
|
+
this.startColour = "#0397FC";
|
|
807
|
+
this.endColour = "#F2F2F2";
|
|
808
|
+
this.spinning = false;
|
|
809
|
+
}
|
|
810
|
+
render() {
|
|
811
|
+
return import_lit8.html`
|
|
812
|
+
<svg
|
|
813
|
+
class="${this.spinning ? "spin" : ""}"
|
|
814
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
815
|
+
width="20"
|
|
816
|
+
height="21"
|
|
817
|
+
viewBox="0 0 20 21"
|
|
818
|
+
fill="none"
|
|
819
|
+
style="display: inline-block; vertical-align: text-top;"
|
|
820
|
+
>
|
|
821
|
+
<path
|
|
822
|
+
d="M17.5 10.5001C17.5 11.485 17.306 12.4602 16.9291 13.3702C16.5522 14.2801 15.9997 15.1069 15.3033 15.8034C14.6069 16.4998 13.7801 17.0522 12.8701 17.4292C11.9602 17.8061 10.9849 18.0001 10 18.0001C9.01508 18.0001 8.03982 17.8061 7.12987 17.4292C6.21993 17.0522 5.39314 16.4998 4.6967 15.8034C4.00026 15.1069 3.44781 14.2801 3.0709 13.3702C2.69399 12.4602 2.5 11.485 2.5 10.5001C2.5 9.51515 2.69399 8.53988 3.0709 7.62993C3.44781 6.71999 4.00026 5.8932 4.6967 5.19676C5.39314 4.50032 6.21993 3.94787 7.12987 3.57096C8.03982 3.19405 9.01509 3.00006 10 3.00006C10.9849 3.00006 11.9602 3.19405 12.8701 3.57096C13.7801 3.94788 14.6069 4.50032 15.3033 5.19676C15.9997 5.8932 16.5522 6.71999 16.9291 7.62994C17.306 8.53988 17.5 9.51515 17.5 10.5001L17.5 10.5001Z"
|
|
823
|
+
stroke="#F2F2F2"
|
|
824
|
+
stroke-width="5"
|
|
825
|
+
/>
|
|
826
|
+
<path
|
|
827
|
+
d="M18 10.5001C18 11.5506 17.7931 12.5909 17.391 13.5615C16.989 14.5321 16.3997 15.414 15.6569 16.1569C14.914 16.8998 14.0321 17.4891 13.0615 17.8911C12.0909 18.2931 11.0506 18.5001 10 18.5001C8.94942 18.5001 7.90914 18.2931 6.93853 17.8911C5.96793 17.4891 5.08601 16.8998 4.34315 16.1569C3.60028 15.414 3.011 14.5321 2.60896 13.5615C2.20693 12.5909 2 11.5506 2 10.5001C2 9.44948 2.20693 8.4092 2.60896 7.43859C3.011 6.46799 3.60028 5.58607 4.34315 4.84321C5.08601 4.10034 5.96793 3.51106 6.93853 3.10902C7.90914 2.70699 8.94943 2.50006 10 2.50006C11.0506 2.50006 12.0909 2.70699 13.0615 3.10903C14.0321 3.51106 14.914 4.10034 15.6569 4.84321C16.3997 5.58608 16.989 6.46799 17.391 7.43859C17.7931 8.4092 18 9.44949 18 10.5001L18 10.5001Z"
|
|
828
|
+
stroke="url(#paint0_linear_gradient_donut)"
|
|
829
|
+
stroke-width="4"
|
|
830
|
+
stroke-linecap="round"
|
|
831
|
+
/>
|
|
832
|
+
<defs>
|
|
833
|
+
<linearGradient
|
|
834
|
+
id="paint0_linear_gradient_donut"
|
|
835
|
+
x1="10"
|
|
836
|
+
y1="0.500061"
|
|
837
|
+
x2="10"
|
|
838
|
+
y2="20.5001"
|
|
839
|
+
gradientUnits="userSpaceOnUse"
|
|
840
|
+
>
|
|
841
|
+
<stop stop-color="${this.startColour}" />
|
|
842
|
+
<stop offset="1" stop-color="${this.endColour}" />
|
|
843
|
+
</linearGradient>
|
|
844
|
+
</defs>
|
|
845
|
+
</svg>
|
|
846
|
+
`;
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
GradientDonutIcon.styles = import_lit8.css`
|
|
850
|
+
@keyframes spin {
|
|
851
|
+
from {
|
|
852
|
+
transform: rotate(0deg);
|
|
853
|
+
}
|
|
854
|
+
to {
|
|
855
|
+
transform: rotate(360deg);
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.spin {
|
|
860
|
+
animation: spin 1s linear infinite;
|
|
861
|
+
display: inline-block;
|
|
862
|
+
}
|
|
863
|
+
`;
|
|
864
|
+
__decorateClass([
|
|
865
|
+
(0, import_decorators8.property)({ type: String })
|
|
866
|
+
], GradientDonutIcon.prototype, "startColour", 2);
|
|
867
|
+
__decorateClass([
|
|
868
|
+
(0, import_decorators8.property)({ type: String })
|
|
869
|
+
], GradientDonutIcon.prototype, "endColour", 2);
|
|
870
|
+
__decorateClass([
|
|
871
|
+
(0, import_decorators8.property)({ type: Boolean })
|
|
872
|
+
], GradientDonutIcon.prototype, "spinning", 2);
|
|
873
|
+
GradientDonutIcon = __decorateClass([
|
|
874
|
+
(0, import_decorators8.customElement)("gradient-donut-icon")
|
|
875
|
+
], GradientDonutIcon);
|
|
876
|
+
|
|
877
|
+
// src/ui/composites/keyring-mobile-modal.ts
|
|
878
|
+
var KeyringMobileModal = class extends import_lit9.LitElement {
|
|
879
|
+
constructor() {
|
|
880
|
+
super(...arguments);
|
|
881
|
+
this.qrData = "";
|
|
882
|
+
this.expiresAt = 0;
|
|
883
|
+
this.status = "pending";
|
|
884
|
+
this.statusMessage = "Waiting for mobile app...";
|
|
885
|
+
this.timeLeft = "";
|
|
886
|
+
}
|
|
887
|
+
connectedCallback() {
|
|
888
|
+
super.connectedCallback();
|
|
889
|
+
this.startCountdown();
|
|
890
|
+
this.trapFocus();
|
|
891
|
+
}
|
|
892
|
+
disconnectedCallback() {
|
|
893
|
+
super.disconnectedCallback();
|
|
894
|
+
if (this.countdownInterval) {
|
|
895
|
+
clearInterval(this.countdownInterval);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
render() {
|
|
899
|
+
return import_lit9.html`
|
|
900
|
+
<div class="modal" @click=${this.stopPropagation}>
|
|
901
|
+
<div class="header">
|
|
902
|
+
<keyring-text variant="text-2xl" weight="medium" align="center"
|
|
903
|
+
>Continue with mobile app</keyring-text
|
|
904
|
+
>
|
|
905
|
+
<button class="close-btn" @click=${this.handleCancel} aria-label="Close">
|
|
906
|
+
<svg
|
|
907
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
908
|
+
width="24"
|
|
909
|
+
height="24"
|
|
910
|
+
viewBox="0 0 24 24"
|
|
911
|
+
fill="none"
|
|
912
|
+
>
|
|
913
|
+
<path
|
|
914
|
+
d="M16.0391 6.54694C16.4296 6.15641 17.0626 6.15641 17.4531 6.54694C17.8436 6.93747 17.8436 7.5705 17.4531 7.961L13.4141 12.0001L17.4531 16.0391C17.8436 16.4297 17.8436 17.0627 17.4531 17.4532C17.0626 17.8437 16.4296 17.8436 16.0391 17.4532L12 13.4141L7.96094 17.4532C7.57044 17.8437 6.93741 17.8436 6.54688 17.4532C6.15635 17.0627 6.15635 16.4296 6.54688 16.0391L10.5859 12.0001L6.54688 7.961C6.15635 7.57047 6.15635 6.93746 6.54688 6.54694C6.9374 6.15641 7.57041 6.15641 7.96094 6.54694L12 10.586L16.0391 6.54694Z"
|
|
915
|
+
fill="#75849A"
|
|
916
|
+
/>
|
|
917
|
+
</svg>
|
|
918
|
+
</button>
|
|
919
|
+
</div>
|
|
920
|
+
|
|
921
|
+
<div class="content">
|
|
922
|
+
<a href="${this.qrData}" target="_blank" class="launch-link">
|
|
923
|
+
<keyring-button class="done-button">Launch Keyring App</keyring-button>
|
|
924
|
+
</a>
|
|
925
|
+
</div>
|
|
926
|
+
|
|
927
|
+
<div class="footer">
|
|
928
|
+
<div class="footer-content">
|
|
929
|
+
<div class="footer-branding">
|
|
930
|
+
<keyring-text variant="text-sm" color="secondary"
|
|
931
|
+
>Verification provided by</keyring-text
|
|
932
|
+
>
|
|
933
|
+
<keyring-icon></keyring-icon>
|
|
934
|
+
</div>
|
|
935
|
+
<div class="footer-links">
|
|
936
|
+
<a href="https://www.keyring.network/terms" target="_blank" class="link">
|
|
937
|
+
<keyring-text variant="text-sm" color="secondary"
|
|
938
|
+
>Keyring Terms and Conditions</keyring-text
|
|
939
|
+
>
|
|
940
|
+
</a>
|
|
941
|
+
<a href="https://docs.keyring.network/docs" target="_blank" class="link">
|
|
942
|
+
<keyring-text variant="text-sm" color="secondary">Keyring Docs</keyring-text>
|
|
943
|
+
</a>
|
|
944
|
+
</div>
|
|
945
|
+
</div>
|
|
946
|
+
|
|
947
|
+
<div class="status-container ${this.status === "connected" ? "connected" : ""}">
|
|
948
|
+
<div class="status-item">
|
|
949
|
+
${this.getStatusIcon()}
|
|
950
|
+
<keyring-text variant="text-sm">${this.statusMessage}</keyring-text>
|
|
951
|
+
</div>
|
|
952
|
+
${this.timeLeft !== "00:00" ? import_lit9.html`
|
|
953
|
+
<keyring-text variant="text-xs" color="secondary">
|
|
954
|
+
Expires: <span>${this.timeLeft}</span>
|
|
955
|
+
</keyring-text>
|
|
956
|
+
` : import_lit9.html``}
|
|
957
|
+
</div>
|
|
958
|
+
</div>
|
|
959
|
+
</div>
|
|
960
|
+
`;
|
|
961
|
+
}
|
|
962
|
+
updateStatus(message, status) {
|
|
963
|
+
this.statusMessage = message;
|
|
964
|
+
this.status = status;
|
|
965
|
+
}
|
|
966
|
+
// Event handlers
|
|
967
|
+
handleCancel() {
|
|
968
|
+
this.dispatchEvent(new CustomEvent("cancel", { bubbles: true, composed: true }));
|
|
969
|
+
}
|
|
970
|
+
stopPropagation(e) {
|
|
971
|
+
e.stopPropagation();
|
|
972
|
+
}
|
|
973
|
+
trapFocus() {
|
|
974
|
+
const focusableElements = this.shadowRoot?.querySelectorAll(
|
|
975
|
+
'button:not([style*="display: none"]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
976
|
+
);
|
|
977
|
+
if (focusableElements && focusableElements.length > 0) {
|
|
978
|
+
focusableElements[0].focus();
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
startCountdown() {
|
|
982
|
+
if (this.countdownInterval) {
|
|
983
|
+
clearInterval(this.countdownInterval);
|
|
984
|
+
}
|
|
985
|
+
const updateCountdown = () => {
|
|
986
|
+
const now = Date.now();
|
|
987
|
+
const timeLeft = this.expiresAt - now;
|
|
988
|
+
if (timeLeft <= 0) {
|
|
989
|
+
this.timeLeft = "00:00";
|
|
990
|
+
this.updateStatus("Session expired", "expired");
|
|
991
|
+
if (this.countdownInterval) clearInterval(this.countdownInterval);
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
const minutes = Math.floor(timeLeft / 6e4);
|
|
995
|
+
const seconds = Math.floor(timeLeft % 6e4 / 1e3);
|
|
996
|
+
this.timeLeft = `${minutes}:${seconds.toString().padStart(2, "0")}`;
|
|
997
|
+
};
|
|
998
|
+
updateCountdown();
|
|
999
|
+
this.countdownInterval = window.setInterval(updateCountdown, 1e3);
|
|
1000
|
+
}
|
|
1001
|
+
getStatusIcon() {
|
|
1002
|
+
switch (this.status) {
|
|
1003
|
+
case "pending":
|
|
1004
|
+
case "processing":
|
|
1005
|
+
return import_lit9.html`<gradient-donut-icon spinning></gradient-donut-icon>`;
|
|
1006
|
+
case "connected":
|
|
1007
|
+
return import_lit9.html`<checkmark-icon></checkmark-icon>`;
|
|
1008
|
+
default:
|
|
1009
|
+
return import_lit9.html`<gradient-donut-icon startColour="#75849A"></gradient-donut-icon>`;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
};
|
|
1013
|
+
KeyringMobileModal.styles = import_lit9.css`
|
|
1014
|
+
:host {
|
|
1015
|
+
position: fixed;
|
|
1016
|
+
top: 0;
|
|
1017
|
+
left: 0;
|
|
1018
|
+
right: 0;
|
|
1019
|
+
bottom: 0;
|
|
1020
|
+
background-color: rgba(15, 40, 48, 0.45);
|
|
1021
|
+
display: flex;
|
|
1022
|
+
align-items: center;
|
|
1023
|
+
justify-content: center;
|
|
1024
|
+
z-index: 10000;
|
|
1025
|
+
font-family: Inter, "Segoe UI", Roboto, sans-serif;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
.modal {
|
|
1029
|
+
background: white;
|
|
1030
|
+
border-radius: 20px;
|
|
1031
|
+
display: flex;
|
|
1032
|
+
gap: 24px;
|
|
1033
|
+
padding: 40px 16px 24px;
|
|
1034
|
+
flex-direction: column;
|
|
1035
|
+
align-items: center;
|
|
1036
|
+
max-width: 350px;
|
|
1037
|
+
width: 100%;
|
|
1038
|
+
max-height: 90vh;
|
|
1039
|
+
overflow-y: auto;
|
|
1040
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
1041
|
+
position: relative;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
.header {
|
|
1045
|
+
display: flex;
|
|
1046
|
+
justify-content: center;
|
|
1047
|
+
align-items: center;
|
|
1048
|
+
width: 100%;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.close-btn {
|
|
1052
|
+
background-color: transparent;
|
|
1053
|
+
border: none;
|
|
1054
|
+
cursor: pointer;
|
|
1055
|
+
padding: 4px;
|
|
1056
|
+
border-radius: 8px;
|
|
1057
|
+
transition: all 300ms ease-in-out;
|
|
1058
|
+
position: absolute;
|
|
1059
|
+
top: 8px;
|
|
1060
|
+
right: 8px;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.close-btn:hover {
|
|
1064
|
+
background-color: #75849a1a;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
.content {
|
|
1068
|
+
width: 100%;
|
|
1069
|
+
display: flex;
|
|
1070
|
+
justify-content: center;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.done-button {
|
|
1074
|
+
width: 100%;
|
|
1075
|
+
max-width: 180px;
|
|
1076
|
+
margin: 0 auto;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.launch-link {
|
|
1080
|
+
text-decoration: none;
|
|
1081
|
+
color: inherit;
|
|
1082
|
+
cursor: pointer;
|
|
1083
|
+
width: 100%;
|
|
1084
|
+
text-align: center;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.status-container {
|
|
1088
|
+
margin: 24px -16px -24px;
|
|
1089
|
+
padding: 8px;
|
|
1090
|
+
border-top: 1px solid #e3e7ee;
|
|
1091
|
+
background-color: #f3f5fa;
|
|
1092
|
+
display: flex;
|
|
1093
|
+
flex-direction: column;
|
|
1094
|
+
justify-content: center;
|
|
1095
|
+
align-items: center;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
.status-container.connected {
|
|
1099
|
+
background-color: #f2fcf7;
|
|
1100
|
+
border-color: #e3e7ee;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.status-item {
|
|
1104
|
+
display: flex;
|
|
1105
|
+
align-items: center;
|
|
1106
|
+
justify-content: center;
|
|
1107
|
+
gap: 12px;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.footer {
|
|
1111
|
+
width: 100%;
|
|
1112
|
+
border-top: 1px solid rgba(15, 40, 48, 0.12);
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
.footer-content {
|
|
1116
|
+
display: flex;
|
|
1117
|
+
flex-direction: column;
|
|
1118
|
+
gap: 12px;
|
|
1119
|
+
margin-top: 24px;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
.footer-branding {
|
|
1123
|
+
display: flex;
|
|
1124
|
+
gap: 12px;
|
|
1125
|
+
align-items: center;
|
|
1126
|
+
justify-content: center;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
.footer-links {
|
|
1130
|
+
width: 100%;
|
|
1131
|
+
display: flex;
|
|
1132
|
+
gap: 24px;
|
|
1133
|
+
align-items: center;
|
|
1134
|
+
justify-content: center;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
.footer-links a {
|
|
1138
|
+
text-decoration: none;
|
|
1139
|
+
color: inherit;
|
|
1140
|
+
cursor: pointer;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
.footer-links a:hover {
|
|
1144
|
+
text-decoration: underline;
|
|
1145
|
+
color: #75849a;
|
|
1146
|
+
}
|
|
1147
|
+
`;
|
|
1148
|
+
__decorateClass([
|
|
1149
|
+
(0, import_decorators9.property)({ attribute: "qr-data" })
|
|
1150
|
+
], KeyringMobileModal.prototype, "qrData", 2);
|
|
1151
|
+
__decorateClass([
|
|
1152
|
+
(0, import_decorators9.property)({ attribute: "expires-at", type: Number })
|
|
1153
|
+
], KeyringMobileModal.prototype, "expiresAt", 2);
|
|
1154
|
+
__decorateClass([
|
|
1155
|
+
(0, import_decorators9.state)()
|
|
1156
|
+
], KeyringMobileModal.prototype, "status", 2);
|
|
1157
|
+
__decorateClass([
|
|
1158
|
+
(0, import_decorators9.state)()
|
|
1159
|
+
], KeyringMobileModal.prototype, "statusMessage", 2);
|
|
1160
|
+
__decorateClass([
|
|
1161
|
+
(0, import_decorators9.state)()
|
|
1162
|
+
], KeyringMobileModal.prototype, "timeLeft", 2);
|
|
1163
|
+
KeyringMobileModal = __decorateClass([
|
|
1164
|
+
(0, import_decorators9.customElement)("keyring-mobile-modal")
|
|
1165
|
+
], KeyringMobileModal);
|
|
1166
|
+
|
|
1167
|
+
// src/ui/composites/keyring-qr-modal.ts
|
|
1168
|
+
var import_lit12 = require("lit");
|
|
1169
|
+
var import_decorators12 = require("lit/decorators.js");
|
|
1170
|
+
|
|
1171
|
+
// src/ui/icons/apple-icon.ts
|
|
1172
|
+
var import_lit10 = require("lit");
|
|
1173
|
+
var import_decorators10 = require("lit/decorators.js");
|
|
1174
|
+
var AppleIcon = class extends import_lit10.LitElement {
|
|
1175
|
+
render() {
|
|
1176
|
+
return import_lit10.html`
|
|
1177
|
+
<svg
|
|
1178
|
+
width="120"
|
|
1179
|
+
height="41"
|
|
1180
|
+
viewBox="0 0 120 41"
|
|
1181
|
+
fill="none"
|
|
1182
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1183
|
+
>
|
|
1184
|
+
<rect x="0.5" y="1" width="119" height="39" rx="5.5" fill="black" />
|
|
1185
|
+
<rect x="0.5" y="1" width="119" height="39" rx="5.5" stroke="#A6A6A6" />
|
|
1186
|
+
<path
|
|
1187
|
+
d="M24.7045 21.2631C24.7166 20.3432 24.9669 19.4412 25.4321 18.6411C25.8972 17.841 26.5621 17.1688 27.3648 16.687C26.8548 15.9759 26.1821 15.3908 25.4 14.978C24.6178 14.5652 23.7479 14.3361 22.8592 14.309C20.9635 14.1147 19.1258 15.4164 18.1598 15.4164C17.1751 15.4164 15.6878 14.3282 14.0862 14.3604C13.0502 14.3931 12.0406 14.6872 11.1557 15.2141C10.2708 15.741 9.54075 16.4826 9.03674 17.3669C6.85352 21.0573 8.48201 26.4809 10.5734 29.464C11.6197 30.9247 12.8426 32.5563 14.4428 32.4985C16.0086 32.4351 16.5934 31.5237 18.4835 31.5237C20.3561 31.5237 20.9048 32.4985 22.5374 32.4617C24.2176 32.4351 25.2762 30.9945 26.2859 29.5199C27.0377 28.4791 27.6162 27.3288 28 26.1116C27.0238 25.7085 26.1908 25.0338 25.6048 24.1716C25.0187 23.3094 24.7056 22.2979 24.7045 21.2631Z"
|
|
1188
|
+
fill="white"
|
|
1189
|
+
/>
|
|
1190
|
+
<path
|
|
1191
|
+
d="M21.6201 12.3471C22.5362 11.2734 22.9875 9.89335 22.8782 8.5C21.4786 8.64352 20.1857 9.2966 19.2572 10.3291C18.8033 10.8335 18.4556 11.4203 18.234 12.056C18.0125 12.6917 17.9215 13.3638 17.9661 14.0338C18.6662 14.0408 19.3588 13.8927 19.9917 13.6005C20.6246 13.3084 21.1814 12.8798 21.6201 12.3471Z"
|
|
1192
|
+
fill="white"
|
|
1193
|
+
/>
|
|
1194
|
+
<path
|
|
1195
|
+
d="M36.791 9.00146H38.8608C40.6494 9.00146 41.5195 10.0649 41.5195 11.9941C41.5195 13.9233 40.6406 15 38.8608 15H36.791V9.00146ZM37.7886 9.84082V14.1606H38.751C39.9375 14.1606 40.4956 13.4443 40.4956 12.0073C40.4956 10.5615 39.9331 9.84082 38.751 9.84082H37.7886ZM44.6748 10.2759C45.8877 10.2759 46.7358 11.0625 46.7358 12.3677V12.9697C46.7358 14.3188 45.8877 15.0791 44.6748 15.0791C43.4443 15.0791 42.605 14.3276 42.605 12.9741V12.3721C42.605 11.1021 43.4575 10.2759 44.6748 10.2759ZM44.6792 11.0625C43.9849 11.0625 43.5894 11.6426 43.5894 12.4204V12.939C43.5894 13.7168 43.9585 14.2925 44.6792 14.2925C45.3911 14.2925 45.7559 13.7212 45.7559 12.939V12.4204C45.7559 11.6426 45.3735 11.0625 44.6792 11.0625ZM53.8989 10.355L52.6772 15H51.6841L50.7129 11.5723H50.6865L49.7329 15H48.7354L47.4609 10.355H48.5112L49.2583 13.897H49.3022L50.2383 10.355H51.1567L52.1191 13.897H52.1631L52.9233 10.355H53.8989ZM54.8657 15V10.355H55.8237V11.1899H55.8721C55.9907 10.8252 56.3291 10.2847 57.2695 10.2847C58.2056 10.2847 58.834 10.8032 58.834 11.8623V15H57.8584V12.1479C57.8584 11.4404 57.4893 11.1152 56.9399 11.1152C56.2192 11.1152 55.8413 11.6689 55.8413 12.4204V15H54.8657ZM60.3105 15V8.68506H61.2861V15H60.3105ZM64.6348 10.2759C65.8477 10.2759 66.6958 11.0625 66.6958 12.3677V12.9697C66.6958 14.3188 65.8477 15.0791 64.6348 15.0791C63.4043 15.0791 62.5649 14.3276 62.5649 12.9741V12.3721C62.5649 11.1021 63.4175 10.2759 64.6348 10.2759ZM64.6392 11.0625C63.9448 11.0625 63.5493 11.6426 63.5493 12.4204V12.939C63.5493 13.7168 63.9185 14.2925 64.6392 14.2925C65.3511 14.2925 65.7158 13.7212 65.7158 12.939V12.4204C65.7158 11.6426 65.3335 11.0625 64.6392 11.0625ZM69.2227 15.0703C68.3218 15.0703 67.7021 14.5166 67.7021 13.6509C67.7021 12.8291 68.2734 12.2754 69.3457 12.2754H70.519V11.8403C70.519 11.3086 70.1807 11.0581 69.6445 11.0581C69.1172 11.0581 68.8799 11.2778 68.8052 11.5854H67.8779C67.9351 10.8076 68.5195 10.2847 69.6753 10.2847C70.6685 10.2847 71.4902 10.6978 71.4902 11.8535V15H70.563V14.3979H70.519C70.3125 14.7539 69.9082 15.0703 69.2227 15.0703ZM69.5259 14.3145C70.0796 14.3145 70.519 13.9365 70.519 13.4312V12.9302H69.4995C68.9326 12.9302 68.6821 13.2158 68.6821 13.6025C68.6821 14.0859 69.0864 14.3145 69.5259 14.3145ZM74.4961 10.2935C75.1509 10.2935 75.6519 10.5835 75.832 11.0537H75.8804V8.68506H76.856V15H75.9067V14.2573H75.8584C75.7178 14.7275 75.1597 15.0615 74.4829 15.0615C73.415 15.0615 72.7207 14.3013 72.7207 13.0752V12.2798C72.7207 11.0537 73.4282 10.2935 74.4961 10.2935ZM74.7686 11.0933C74.1182 11.0933 73.7139 11.5767 73.7139 12.4204V12.9302C73.7139 13.7783 74.1226 14.2617 74.7905 14.2617C75.4497 14.2617 75.8804 13.7827 75.8804 12.9917V12.2886C75.8804 11.5723 75.4102 11.0933 74.7686 11.0933ZM82.2129 10.2759C83.4258 10.2759 84.2739 11.0625 84.2739 12.3677V12.9697C84.2739 14.3188 83.4258 15.0791 82.2129 15.0791C80.9824 15.0791 80.1431 14.3276 80.1431 12.9741V12.3721C80.1431 11.1021 80.9956 10.2759 82.2129 10.2759ZM82.2173 11.0625C81.5229 11.0625 81.1274 11.6426 81.1274 12.4204V12.939C81.1274 13.7168 81.4966 14.2925 82.2173 14.2925C82.9292 14.2925 83.2939 13.7212 83.2939 12.939V12.4204C83.2939 11.6426 82.9116 11.0625 82.2173 11.0625ZM85.5308 15V10.355H86.4888V11.1899H86.5371C86.6558 10.8252 86.9941 10.2847 87.9346 10.2847C88.8706 10.2847 89.499 10.8032 89.499 11.8623V15H88.5234V12.1479C88.5234 11.4404 88.1543 11.1152 87.605 11.1152C86.8843 11.1152 86.5063 11.6689 86.5063 12.4204V15H85.5308ZM93.2739 10.3857V9.22559H94.2275V10.3857H95.269V11.1504H94.2275V13.6157C94.2275 14.1211 94.4165 14.2617 94.9395 14.2617C95.0713 14.2617 95.2471 14.2529 95.3218 14.2441V14.9912C95.2427 15.0044 94.9175 15.0308 94.6978 15.0308C93.5684 15.0308 93.2607 14.6265 93.2607 13.6948V11.1504H92.5532V10.3857H93.2739ZM96.4995 15V8.68506H97.4707V11.1899H97.519C97.6201 10.8604 97.998 10.2847 98.9297 10.2847C99.835 10.2847 100.481 10.8076 100.481 11.8667V15H99.5098V12.1523C99.5098 11.4448 99.1187 11.1152 98.5649 11.1152C97.8662 11.1152 97.4707 11.6646 97.4707 12.4204V15H96.4995ZM103.755 15.0791C102.489 15.0791 101.703 14.3013 101.703 12.9917V12.3633C101.703 11.0449 102.564 10.2759 103.698 10.2759C104.862 10.2759 105.684 11.0845 105.684 12.3633V12.9082H102.669V13.1367C102.669 13.8047 103.065 14.2969 103.75 14.2969C104.26 14.2969 104.612 14.0552 104.678 13.7651H105.631C105.574 14.3013 105.007 15.0791 103.755 15.0791ZM102.669 12.271H104.73V12.2095C104.73 11.5107 104.322 11.0449 103.702 11.0449C103.083 11.0449 102.669 11.5107 102.669 12.2095V12.271Z"
|
|
1196
|
+
fill="white"
|
|
1197
|
+
/>
|
|
1198
|
+
<path
|
|
1199
|
+
d="M38.2061 31H36.1758L40.3066 19.0029H42.5391L46.6611 31H44.5518L43.4883 27.6777H39.2783L38.2061 31ZM41.4316 21.0771H41.3525L39.7266 26.1484H43.04L41.4316 21.0771ZM52.2644 31.1318C51.0603 31.1318 50.1462 30.5605 49.654 29.708H49.5837V34.085H47.6325V21.71H49.531V23.0723H49.6013C50.1111 22.1846 51.0603 21.5869 52.3083 21.5869C54.3913 21.5869 55.8767 23.1602 55.8767 25.9375V26.7637C55.8767 29.5234 54.4089 31.1318 52.2644 31.1318ZM51.8161 29.5234C53.0554 29.5234 53.8991 28.5303 53.8991 26.6582V26.0078C53.8991 24.2061 53.1081 23.1777 51.781 23.1777C50.4187 23.1777 49.5661 24.2852 49.5661 25.999V26.6582C49.5661 28.416 50.4275 29.5234 51.8161 29.5234ZM62.183 31.1318C60.9789 31.1318 60.0649 30.5605 59.5727 29.708H59.5024V34.085H57.5512V21.71H59.4496V23.0723H59.52C60.0297 22.1846 60.9789 21.5869 62.227 21.5869C64.31 21.5869 65.7954 23.1602 65.7954 25.9375V26.7637C65.7954 29.5234 64.3276 31.1318 62.183 31.1318ZM61.7348 29.5234C62.9741 29.5234 63.8178 28.5303 63.8178 26.6582V26.0078C63.8178 24.2061 63.0268 23.1777 61.6996 23.1777C60.3373 23.1777 59.4848 24.2852 59.4848 25.999V26.6582C59.4848 28.416 60.3461 29.5234 61.7348 29.5234ZM69.8387 27.6689H71.7899C71.8778 28.7061 72.7919 29.5938 74.4882 29.5938C76.0438 29.5938 76.9667 28.8643 76.9667 27.7305C76.9667 26.8164 76.3514 26.3242 75.0682 26.0166L73.0995 25.5244C71.5526 25.1641 70.1639 24.2412 70.1639 22.29C70.1639 19.9961 72.1679 18.7393 74.497 18.7393C76.8261 18.7393 78.7684 19.9961 78.8124 22.2373H76.8964C76.8085 21.2178 76.0262 20.374 74.4706 20.374C73.0995 20.374 72.1679 21.0244 72.1679 22.1406C72.1679 22.9229 72.7128 23.4854 73.829 23.7402L75.7889 24.2236C77.5907 24.6631 78.9618 25.5156 78.9618 27.5547C78.9618 29.9102 77.0546 31.2373 74.3387 31.2373C70.9989 31.2373 69.8827 29.2861 69.8387 27.6689ZM81.3395 21.71V19.4512H83.2555V21.71H85.066V23.2744H83.2555V28.2314C83.2555 29.2422 83.6334 29.5234 84.6793 29.5234C84.8463 29.5234 85.0045 29.5234 85.1188 29.5059V31C84.9605 31.0264 84.5914 31.0615 84.1959 31.0615C81.9371 31.0615 81.3131 30.2529 81.3131 28.3896V23.2744H80.0299V21.71H81.3395ZM90.3353 21.5518C93.0071 21.5518 94.4573 23.4326 94.4573 25.9639V26.7109C94.4573 29.3301 93.0159 31.1582 90.3353 31.1582C87.6546 31.1582 86.1956 29.3301 86.1956 26.7109V25.9639C86.1956 23.4414 87.6634 21.5518 90.3353 21.5518ZM90.3353 23.1162C88.8851 23.1162 88.1644 24.3027 88.1644 25.9902V26.7021C88.1644 28.3633 88.8763 29.585 90.3353 29.585C91.7943 29.585 92.4974 28.3721 92.4974 26.7021V25.9902C92.4974 24.2939 91.7855 23.1162 90.3353 23.1162ZM96.1055 31V21.71H98.0567V22.9316H98.127C98.3643 22.3516 99.0586 21.5781 100.351 21.5781C100.606 21.5781 100.825 21.5957 101.01 21.6309V23.3535C100.843 23.3096 100.5 23.2832 100.175 23.2832C98.6104 23.2832 98.083 24.25 98.083 25.498V31H96.1055ZM105.743 31.1582C103.256 31.1582 101.674 29.5146 101.674 26.7637V25.8232C101.674 23.2305 103.22 21.5518 105.664 21.5518C108.142 21.5518 109.636 23.292 109.636 25.9111V26.7988H103.598V27.0186C103.598 28.583 104.442 29.6201 105.769 29.6201C106.762 29.6201 107.439 29.1279 107.677 28.3281H109.531C109.25 29.8311 108.037 31.1582 105.743 31.1582ZM103.598 25.4365H107.729V25.4189C107.729 24.1006 106.912 23.0635 105.673 23.0635C104.416 23.0635 103.598 24.1006 103.598 25.4189V25.4365Z"
|
|
1200
|
+
fill="white"
|
|
1201
|
+
/>
|
|
1202
|
+
</svg>
|
|
1203
|
+
`;
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
AppleIcon = __decorateClass([
|
|
1207
|
+
(0, import_decorators10.customElement)("apple-icon")
|
|
1208
|
+
], AppleIcon);
|
|
1209
|
+
|
|
1210
|
+
// src/ui/icons/google-icon.ts
|
|
1211
|
+
var import_lit11 = require("lit");
|
|
1212
|
+
var import_decorators11 = require("lit/decorators.js");
|
|
1213
|
+
var GoogleIcon = class extends import_lit11.LitElement {
|
|
1214
|
+
render() {
|
|
1215
|
+
return import_lit11.html`
|
|
1216
|
+
<svg
|
|
1217
|
+
width="120"
|
|
1218
|
+
height="41"
|
|
1219
|
+
viewBox="0 0 120 41"
|
|
1220
|
+
fill="none"
|
|
1221
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1222
|
+
>
|
|
1223
|
+
<rect x="0.5" y="1" width="119" height="39" rx="5.5" fill="black" />
|
|
1224
|
+
<rect x="0.5" y="1" width="119" height="39" rx="5.5" stroke="#A6A6A6" />
|
|
1225
|
+
<path
|
|
1226
|
+
d="M17.8051 19.9617L8.08984 30.5059C8.09076 30.5078 8.09076 30.5106 8.09167 30.5125C8.39005 31.6574 9.41203 32.5 10.6256 32.5C11.1111 32.5 11.5664 32.3656 11.957 32.1305L11.988 32.1118L22.9232 25.6593L17.8051 19.9617Z"
|
|
1227
|
+
fill="#EA4335"
|
|
1228
|
+
/>
|
|
1229
|
+
<path
|
|
1230
|
+
d="M27.6332 18.1662L27.624 18.1597L22.9029 15.3612L17.584 20.2013L22.922 25.6582L27.6177 22.8878C28.4407 22.4324 29.0001 21.545 29.0001 20.5223C29.0001 19.5052 28.4489 18.6225 27.6332 18.1662Z"
|
|
1231
|
+
fill="#FBBC04"
|
|
1232
|
+
/>
|
|
1233
|
+
<path
|
|
1234
|
+
d="M8.08942 10.4933C8.03102 10.7135 8 10.9449 8 11.1838V29.8163C8 30.0552 8.03102 30.2866 8.09034 30.5059L18.1386 20.2313L8.08942 10.4933Z"
|
|
1235
|
+
fill="#4285F4"
|
|
1236
|
+
/>
|
|
1237
|
+
<path
|
|
1238
|
+
d="M17.8771 20.4999L22.9049 15.3594L11.9825 8.88354C11.5856 8.63999 11.122 8.50003 10.6265 8.50003C9.41295 8.50003 8.38914 9.3445 8.09076 10.4904C8.09076 10.4913 8.08984 10.4922 8.08984 10.4932L17.8771 20.4999Z"
|
|
1239
|
+
fill="#34A853"
|
|
1240
|
+
/>
|
|
1241
|
+
<path
|
|
1242
|
+
d="M43.61 12.21C43.61 13.21 43.3133 14.0067 42.72 14.6C42.0533 15.3067 41.1767 15.66 40.09 15.66C39.05 15.66 38.17 15.3 37.45 14.58C36.73 13.86 36.37 12.9733 36.37 11.92C36.37 10.8667 36.73 9.98 37.45 9.26C38.17 8.54 39.05 8.18 40.09 8.18C40.6167 8.18 41.1133 8.27333 41.58 8.46C42.0467 8.64667 42.43 8.91 42.73 9.25L42.07 9.91C41.85 9.64333 41.5633 9.43667 41.21 9.29C40.8633 9.13667 40.49 9.06 40.09 9.06C39.31 9.06 38.65 9.33 38.11 9.87C37.5767 10.4167 37.31 11.1 37.31 11.92C37.31 12.74 37.5767 13.4233 38.11 13.97C38.65 14.51 39.31 14.78 40.09 14.78C40.8033 14.78 41.3967 14.58 41.87 14.18C42.3433 13.78 42.6167 13.23 42.69 12.53H40.09V11.67H43.56C43.5933 11.8567 43.61 12.0367 43.61 12.21ZM48.9078 8.34V9.22H45.6478V11.49H48.5878V12.35H45.6478V14.62H48.9078V15.5H44.7278V8.34H48.9078ZM52.5877 9.22V15.5H51.6677V9.22H49.6677V8.34H54.5877V9.22H52.5877ZM58.6654 15.5H57.7454V8.34H58.6654V15.5ZM62.5487 9.22V15.5H61.6287V9.22H59.6287V8.34H64.5487V9.22H62.5487ZM74.521 11.92C74.521 12.98 74.1677 13.8667 73.461 14.58C72.7477 15.3 71.8743 15.66 70.841 15.66C69.801 15.66 68.9277 15.3 68.221 14.58C67.5143 13.8667 67.161 12.98 67.161 11.92C67.161 10.86 67.5143 9.97333 68.221 9.26C68.9277 8.54 69.801 8.18 70.841 8.18C71.881 8.18 72.7543 8.54333 73.461 9.27C74.1677 9.98333 74.521 10.8667 74.521 11.92ZM68.101 11.92C68.101 12.7467 68.361 13.43 68.881 13.97C69.4077 14.51 70.061 14.78 70.841 14.78C71.621 14.78 72.271 14.51 72.791 13.97C73.3177 13.4367 73.581 12.7533 73.581 11.92C73.581 11.0867 73.3177 10.4033 72.791 9.87C72.271 9.33 71.621 9.06 70.841 9.06C70.061 9.06 69.4077 9.33 68.881 9.87C68.361 10.41 68.101 11.0933 68.101 11.92ZM76.5267 15.5H75.6067V8.34H76.7267L80.2067 13.91H80.2467L80.2067 12.53V8.34H81.1267V15.5H80.1667L76.5267 9.66H76.4867L76.5267 11.04V15.5Z"
|
|
1243
|
+
fill="white"
|
|
1244
|
+
/>
|
|
1245
|
+
<path
|
|
1246
|
+
d="M93.5181 31.9097H95.1469V20.8981H93.5181V31.9097ZM108.189 24.8646L106.322 29.6388H106.266L104.328 24.8646H102.573L105.479 31.5371L103.823 35.249H105.521L110 24.8646H108.189ZM98.9519 30.6588C98.4176 30.6588 97.6739 30.3902 97.6739 29.7234C97.6739 28.8742 98.6001 28.5483 99.4005 28.5483C100.116 28.5483 100.454 28.7042 100.889 28.9165C100.762 29.9365 99.892 30.6588 98.9519 30.6588ZM99.1483 24.6241C97.969 24.6241 96.7469 25.1482 96.2424 26.3101L97.6879 26.9188C97.9969 26.3101 98.5721 26.111 99.1762 26.111C100.019 26.111 100.875 26.621 100.889 27.5283V27.6411C100.594 27.471 99.9627 27.2165 99.1902 27.2165C97.632 27.2165 96.0451 28.0806 96.0451 29.6952C96.0451 31.1689 97.323 32.1184 98.7546 32.1184C99.8501 32.1184 100.454 31.6225 100.833 31.0411H100.889V31.8912H102.461V27.6692C102.461 25.7146 101.015 24.6241 99.1483 24.6241ZM89.0821 26.2053H86.7655V22.4308H89.0821C90.2998 22.4308 90.9911 23.4482 90.9911 24.3176C90.9911 25.1711 90.2998 26.2053 89.0821 26.2053ZM89.0402 20.8981H85.1375V31.9097H86.7655V27.7379H89.0402C90.8453 27.7379 92.6199 26.4184 92.6199 24.3176C92.6199 22.2168 90.8453 20.8981 89.0402 20.8981ZM67.7583 30.6606C66.6332 30.6606 65.6913 29.7102 65.6913 28.4047C65.6913 27.0852 66.6332 26.1198 67.7583 26.1198C68.8695 26.1198 69.7406 27.0852 69.7406 28.4047C69.7406 29.7102 68.8695 30.6606 67.7583 30.6606ZM69.6289 25.4812H69.5722C69.2064 25.0417 68.5038 24.6444 67.6178 24.6444C65.7611 24.6444 64.0599 26.2898 64.0599 28.4047C64.0599 30.5047 65.7611 32.1369 67.6178 32.1369C68.5038 32.1369 69.2064 31.7396 69.5722 31.2851H69.6289V31.8251C69.6289 33.2582 68.8695 34.0246 67.6457 34.0246C66.6471 34.0246 66.0282 33.3005 65.7751 32.6901L64.3549 33.2864C64.7626 34.28 65.8458 35.5 67.6457 35.5C69.5582 35.5 71.1757 34.3646 71.1757 31.5978V24.8708H69.6289V25.4812ZM72.3008 31.9097H73.9323V20.8973H72.3008V31.9097ZM76.3362 28.277C76.2943 26.8298 77.4474 26.0916 78.2766 26.0916C78.9243 26.0916 79.4725 26.4176 79.6549 26.8862L76.3362 28.277ZM81.3989 27.028C81.0899 26.1912 80.1472 24.6444 78.2208 24.6444C76.3083 24.6444 74.7196 26.1621 74.7196 28.3907C74.7196 30.4906 76.2943 32.1369 78.4032 32.1369C80.1053 32.1369 81.0899 31.0869 81.4976 30.4765L80.2319 29.6247C79.8103 30.2493 79.2333 30.6606 78.4032 30.6606C77.5739 30.6606 76.983 30.2774 76.6033 29.5261L81.5674 27.4534L81.3989 27.028ZM41.8501 25.7939V27.383H45.6184C45.5058 28.277 45.2107 28.9297 44.7612 29.3834C44.2121 29.9374 43.3541 30.5479 41.8501 30.5479C39.5291 30.5479 37.7152 28.6602 37.7152 26.3189C37.7152 23.9767 39.5291 22.0899 41.8501 22.0899C43.1018 22.0899 44.0157 22.5867 44.6905 23.2254L45.8017 22.104C44.8589 21.1959 43.6081 20.5 41.8501 20.5C38.6719 20.5 36 23.1117 36 26.3189C36 29.5261 38.6719 32.1369 41.8501 32.1369C43.5653 32.1369 44.8589 31.5688 45.8715 30.5047C46.9129 29.4547 47.2358 27.9793 47.2358 26.7866C47.2358 26.4176 47.2079 26.0775 47.1512 25.7939H41.8501ZM51.5208 30.6606C50.3957 30.6606 49.425 29.7243 49.425 28.3907C49.425 27.0421 50.3957 26.1198 51.5208 26.1198C52.6451 26.1198 53.6158 27.0421 53.6158 28.3907C53.6158 29.7243 52.6451 30.6606 51.5208 30.6606ZM51.5208 24.6444C49.4669 24.6444 47.7936 26.2194 47.7936 28.3907C47.7936 30.5479 49.4669 32.1369 51.5208 32.1369C53.5739 32.1369 55.2472 30.5479 55.2472 28.3907C55.2472 26.2194 53.5739 24.6444 51.5208 24.6444ZM59.65 30.6606C58.5249 30.6606 57.5542 29.7243 57.5542 28.3907C57.5542 27.0421 58.5249 26.1198 59.65 26.1198C60.7752 26.1198 61.745 27.0421 61.745 28.3907C61.745 29.7243 60.7752 30.6606 59.65 30.6606ZM59.65 24.6444C57.597 24.6444 55.9237 26.2194 55.9237 28.3907C55.9237 30.5479 57.597 32.1369 59.65 32.1369C61.7031 32.1369 63.3764 30.5479 63.3764 28.3907C63.3764 26.2194 61.7031 24.6444 59.65 24.6444Z"
|
|
1247
|
+
fill="white"
|
|
1248
|
+
/>
|
|
1249
|
+
</svg>
|
|
1250
|
+
`;
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1253
|
+
GoogleIcon = __decorateClass([
|
|
1254
|
+
(0, import_decorators11.customElement)("google-icon")
|
|
1255
|
+
], GoogleIcon);
|
|
1256
|
+
|
|
1257
|
+
// src/ui/composites/keyring-qr-modal.ts
|
|
1258
|
+
var KeyringQRModal = class extends import_lit12.LitElement {
|
|
1259
|
+
constructor() {
|
|
1260
|
+
super(...arguments);
|
|
1261
|
+
this.sessionId = "";
|
|
1262
|
+
this.expiresAt = 0;
|
|
1263
|
+
this.qrData = "";
|
|
1264
|
+
this.qrCodeError = false;
|
|
1265
|
+
this.status = "pending";
|
|
1266
|
+
this.statusMessage = "Waiting for mobile app...";
|
|
1267
|
+
this.timeLeft = "";
|
|
1268
|
+
this.linkCopied = false;
|
|
1269
|
+
}
|
|
1270
|
+
connectedCallback() {
|
|
1271
|
+
super.connectedCallback();
|
|
1272
|
+
this.startCountdown();
|
|
1273
|
+
this.trapFocus();
|
|
1274
|
+
}
|
|
1275
|
+
disconnectedCallback() {
|
|
1276
|
+
super.disconnectedCallback();
|
|
1277
|
+
if (this.countdownInterval) {
|
|
1278
|
+
clearInterval(this.countdownInterval);
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
render() {
|
|
1282
|
+
return import_lit12.html`
|
|
1283
|
+
<div class="modal" @click=${this.stopPropagation}>
|
|
1284
|
+
<div class="header">
|
|
1285
|
+
<div class="header-title">
|
|
1286
|
+
<button class="close-btn" @click=${this.handleBack} aria-label="Back">
|
|
1287
|
+
<svg
|
|
1288
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1289
|
+
width="24"
|
|
1290
|
+
height="24"
|
|
1291
|
+
viewBox="0 0 24 24"
|
|
1292
|
+
fill="none"
|
|
1293
|
+
>
|
|
1294
|
+
<path
|
|
1295
|
+
d="M5.29297 11.2938C4.90234 11.6844 4.90234 12.3188 5.29297 12.7094L10.293 17.7094C10.6836 18.1 11.318 18.1 11.7086 17.7094C12.0992 17.3188 12.0992 16.6844 11.7086 16.2938L8.41172 13H17.9992C18.5523 13 18.9992 12.5531 18.9992 12C18.9992 11.4469 18.5523 11 17.9992 11H8.41484L11.7055 7.70627C12.0961 7.31565 12.0961 6.68127 11.7055 6.29065C11.3148 5.90002 10.6805 5.90002 10.2898 6.29065L5.28984 11.2906L5.29297 11.2938Z"
|
|
1296
|
+
fill="#0F2830"
|
|
1297
|
+
/>
|
|
1298
|
+
</svg>
|
|
1299
|
+
</button>
|
|
1300
|
+
<keyring-text variant="text-2xl" weight="medium">Scan QR Code</keyring-text>
|
|
1301
|
+
</div>
|
|
1302
|
+
<button
|
|
1303
|
+
class="close-btn"
|
|
1304
|
+
@click=${this.status === "completed" ? this.handleClose : this.handleCancel}
|
|
1305
|
+
aria-label="Close"
|
|
1306
|
+
>
|
|
1307
|
+
<svg
|
|
1308
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1309
|
+
width="24"
|
|
1310
|
+
height="24"
|
|
1311
|
+
viewBox="0 0 24 24"
|
|
1312
|
+
fill="none"
|
|
1313
|
+
>
|
|
1314
|
+
<path
|
|
1315
|
+
d="M16.0391 6.54694C16.4296 6.15641 17.0626 6.15641 17.4531 6.54694C17.8436 6.93747 17.8436 7.5705 17.4531 7.961L13.4141 12.0001L17.4531 16.0391C17.8436 16.4297 17.8436 17.0627 17.4531 17.4532C17.0626 17.8437 16.4296 17.8436 16.0391 17.4532L12 13.4141L7.96094 17.4532C7.57044 17.8437 6.93741 17.8436 6.54688 17.4532C6.15635 17.0627 6.15635 16.4296 6.54688 16.0391L10.5859 12.0001L6.54688 7.961C6.15635 7.57047 6.15635 6.93746 6.54688 6.54694C6.9374 6.15641 7.57041 6.15641 7.96094 6.54694L12 10.586L16.0391 6.54694Z"
|
|
1316
|
+
fill="#75849A"
|
|
1317
|
+
/>
|
|
1318
|
+
</svg>
|
|
1319
|
+
</button>
|
|
1320
|
+
</div>
|
|
1321
|
+
|
|
1322
|
+
<div class="content">
|
|
1323
|
+
<div class="qr-container">
|
|
1324
|
+
${this.qrCodeError ? import_lit12.html`
|
|
1325
|
+
<keyring-text class="qr-title">Unable to generate QR code</keyring-text>
|
|
1326
|
+
<keyring-text variant="text-sm" color="secondary" class="qr-subtitle">
|
|
1327
|
+
On your mobile device, open the link below to continue verification
|
|
1328
|
+
</keyring-text>
|
|
1329
|
+
<div class="qr-link-container">
|
|
1330
|
+
<keyring-text variant="text-sm" color="primary" class="qr-link"
|
|
1331
|
+
>${this.qrData}</keyring-text
|
|
1332
|
+
>
|
|
1333
|
+
<keyring-button
|
|
1334
|
+
variant="ghost"
|
|
1335
|
+
size="sm"
|
|
1336
|
+
@click=${() => this.onCopy(this.qrData, "linkCopied")}
|
|
1337
|
+
>${this.linkCopied ? "Copied" : "Copy"}</keyring-button
|
|
1338
|
+
>
|
|
1339
|
+
</div>
|
|
1340
|
+
` : import_lit12.html`
|
|
1341
|
+
<keyring-text class="qr-title">Scan with Keyring Connect App</keyring-text>
|
|
1342
|
+
<keyring-text variant="text-sm" color="secondary" class="qr-subtitle">
|
|
1343
|
+
Open the app and scan this code to continue verification
|
|
1344
|
+
</keyring-text>
|
|
1345
|
+
<slot name="qr-code"></slot>
|
|
1346
|
+
`}
|
|
1347
|
+
</div>
|
|
1348
|
+
|
|
1349
|
+
<div class="app-download">
|
|
1350
|
+
<keyring-text>Don't have the app?</keyring-text>
|
|
1351
|
+
<div class="app-download-btn-wrapper">
|
|
1352
|
+
<a href="https://apps.apple.com/app/keyring-connect/id6635768260" target="_blank">
|
|
1353
|
+
<apple-icon></apple-icon>
|
|
1354
|
+
</a>
|
|
1355
|
+
<a
|
|
1356
|
+
href="https://play.google.com/store/apps/details?id=com.keyring.connect"
|
|
1357
|
+
target="_blank"
|
|
1358
|
+
>
|
|
1359
|
+
<google-icon></google-icon>
|
|
1360
|
+
</a>
|
|
1361
|
+
</div>
|
|
1362
|
+
</div>
|
|
1363
|
+
</div>
|
|
1364
|
+
|
|
1365
|
+
<div class="footer">
|
|
1366
|
+
<div class="footer-content">
|
|
1367
|
+
<div class="footer-branding">
|
|
1368
|
+
<keyring-text variant="text-sm" color="secondary"
|
|
1369
|
+
>Verification provided by</keyring-text
|
|
1370
|
+
>
|
|
1371
|
+
<keyring-icon></keyring-icon>
|
|
1372
|
+
</div>
|
|
1373
|
+
<div class="footer-links">
|
|
1374
|
+
<a href="https://www.keyring.network/terms" target="_blank" class="link">
|
|
1375
|
+
<keyring-text variant="text-sm" color="secondary"
|
|
1376
|
+
>Keyring Terms and Conditions</keyring-text
|
|
1377
|
+
>
|
|
1378
|
+
</a>
|
|
1379
|
+
<a href="https://docs.keyring.network/docs" target="_blank" class="link">
|
|
1380
|
+
<keyring-text variant="text-sm" color="secondary">Keyring Docs</keyring-text>
|
|
1381
|
+
</a>
|
|
1382
|
+
</div>
|
|
1383
|
+
</div>
|
|
1384
|
+
|
|
1385
|
+
<div class="status-container ${this.status}">
|
|
1386
|
+
<div class="status-item">
|
|
1387
|
+
${this.getStatusIcon()}
|
|
1388
|
+
<keyring-text variant="text-sm">${this.statusMessage}</keyring-text>
|
|
1389
|
+
</div>
|
|
1390
|
+
|
|
1391
|
+
${this.timeLeft !== "00:00" ? import_lit12.html`
|
|
1392
|
+
<keyring-text variant="text-xs" color="secondary">
|
|
1393
|
+
Expires: <span>${this.timeLeft}</span>
|
|
1394
|
+
</keyring-text>
|
|
1395
|
+
` : import_lit12.html``}
|
|
1396
|
+
</div>
|
|
1397
|
+
</div>
|
|
1398
|
+
</div>
|
|
1399
|
+
`;
|
|
1400
|
+
}
|
|
1401
|
+
// Public API methods
|
|
1402
|
+
updateStatus(message, status) {
|
|
1403
|
+
this.statusMessage = message;
|
|
1404
|
+
this.status = status;
|
|
1405
|
+
}
|
|
1406
|
+
// Event handlers
|
|
1407
|
+
handleClose() {
|
|
1408
|
+
this.dispatchEvent(new CustomEvent("close", { bubbles: true, composed: true }));
|
|
1409
|
+
}
|
|
1410
|
+
handleCancel() {
|
|
1411
|
+
this.dispatchEvent(new CustomEvent("cancel", { bubbles: true, composed: true }));
|
|
1412
|
+
}
|
|
1413
|
+
handleBack() {
|
|
1414
|
+
this.dispatchEvent(new CustomEvent("back", { bubbles: true, composed: true }));
|
|
1415
|
+
}
|
|
1416
|
+
stopPropagation(e) {
|
|
1417
|
+
e.stopPropagation();
|
|
1418
|
+
}
|
|
1419
|
+
// Utility methods
|
|
1420
|
+
startCountdown() {
|
|
1421
|
+
if (this.countdownInterval) {
|
|
1422
|
+
clearInterval(this.countdownInterval);
|
|
1423
|
+
}
|
|
1424
|
+
const updateCountdown = () => {
|
|
1425
|
+
const now = Date.now();
|
|
1426
|
+
const timeLeft = this.expiresAt - now;
|
|
1427
|
+
if (timeLeft <= 0) {
|
|
1428
|
+
this.timeLeft = "00:00";
|
|
1429
|
+
this.updateStatus("Session expired", "expired");
|
|
1430
|
+
if (this.countdownInterval) clearInterval(this.countdownInterval);
|
|
1431
|
+
return;
|
|
1432
|
+
}
|
|
1433
|
+
const minutes = Math.floor(timeLeft / 6e4);
|
|
1434
|
+
const seconds = Math.floor(timeLeft % 6e4 / 1e3);
|
|
1435
|
+
this.timeLeft = `${minutes}:${seconds.toString().padStart(2, "0")}`;
|
|
1436
|
+
};
|
|
1437
|
+
updateCountdown();
|
|
1438
|
+
this.countdownInterval = window.setInterval(updateCountdown, 1e3);
|
|
1439
|
+
}
|
|
1440
|
+
trapFocus() {
|
|
1441
|
+
const focusableElements = this.shadowRoot?.querySelectorAll(
|
|
1442
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
1443
|
+
);
|
|
1444
|
+
if (focusableElements && focusableElements.length > 0) {
|
|
1445
|
+
focusableElements[0].focus();
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
getStatusIcon() {
|
|
1449
|
+
switch (this.status) {
|
|
1450
|
+
case "pending":
|
|
1451
|
+
case "processing":
|
|
1452
|
+
return import_lit12.html`<gradient-donut-icon spinning></gradient-donut-icon>`;
|
|
1453
|
+
case "connected":
|
|
1454
|
+
return import_lit12.html`<checkmark-icon></checkmark-icon>`;
|
|
1455
|
+
case "failed":
|
|
1456
|
+
return import_lit12.html`<gradient-donut-icon startColour="#EB4577"></gradient-donut-icon>`;
|
|
1457
|
+
default:
|
|
1458
|
+
return import_lit12.html`<gradient-donut-icon startColour="#75849A"></gradient-donut-icon>`;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
async onCopy(text, stateKey) {
|
|
1462
|
+
navigator.clipboard.writeText(text);
|
|
1463
|
+
this[stateKey] = true;
|
|
1464
|
+
setTimeout(() => {
|
|
1465
|
+
this[stateKey] = false;
|
|
1466
|
+
}, 2e3);
|
|
1467
|
+
}
|
|
1468
|
+
};
|
|
1469
|
+
KeyringQRModal.styles = import_lit12.css`
|
|
1470
|
+
:host {
|
|
1471
|
+
position: fixed;
|
|
1472
|
+
top: 0;
|
|
1473
|
+
left: 0;
|
|
1474
|
+
right: 0;
|
|
1475
|
+
bottom: 0;
|
|
1476
|
+
background-color: rgba(15, 40, 48, 0.45);
|
|
1477
|
+
display: flex;
|
|
1478
|
+
align-items: center;
|
|
1479
|
+
justify-content: center;
|
|
1480
|
+
z-index: 10000;
|
|
1481
|
+
font-family: Inter, "Segoe UI", Roboto, sans-serif;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
.modal {
|
|
1485
|
+
background: white;
|
|
1486
|
+
border-radius: 20px;
|
|
1487
|
+
display: flex;
|
|
1488
|
+
gap: 24px;
|
|
1489
|
+
padding: 24px 24px 32px 24px;
|
|
1490
|
+
flex-direction: column;
|
|
1491
|
+
align-items: center;
|
|
1492
|
+
max-width: 524px;
|
|
1493
|
+
width: 100%;
|
|
1494
|
+
max-height: 90vh;
|
|
1495
|
+
overflow-y: auto;
|
|
1496
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
.header {
|
|
1500
|
+
display: flex;
|
|
1501
|
+
justify-content: space-between;
|
|
1502
|
+
align-items: flex-start;
|
|
1503
|
+
width: 100%;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
.header-title {
|
|
1507
|
+
display: flex;
|
|
1508
|
+
align-items: center;
|
|
1509
|
+
justify-content: space-between;
|
|
1510
|
+
gap: 12px;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
.close-btn {
|
|
1514
|
+
background-color: transparent;
|
|
1515
|
+
border: none;
|
|
1516
|
+
cursor: pointer;
|
|
1517
|
+
padding: 4px;
|
|
1518
|
+
border-radius: 8px;
|
|
1519
|
+
transition: all 300ms ease-in-out;
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
.close-btn:hover {
|
|
1523
|
+
background-color: #75849a1a;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
.content {
|
|
1527
|
+
width: 100%;
|
|
1528
|
+
display: flex;
|
|
1529
|
+
flex-direction: column;
|
|
1530
|
+
align-items: center;
|
|
1531
|
+
justify-content: center;
|
|
1532
|
+
gap: 24px;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
.content > * {
|
|
1536
|
+
width: 100%;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
.qr-container {
|
|
1540
|
+
display: flex;
|
|
1541
|
+
flex-direction: column;
|
|
1542
|
+
align-items: center;
|
|
1543
|
+
justify-content: center;
|
|
1544
|
+
padding-top: 24px;
|
|
1545
|
+
padding-bottom: 16px;
|
|
1546
|
+
border-radius: 12px;
|
|
1547
|
+
border: 1px solid #e3e7ee;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
.qr-container .qr-title {
|
|
1551
|
+
margin-bottom: 12px;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
.qr-container .qr-subtitle {
|
|
1555
|
+
margin-bottom: 16px;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
.app-download {
|
|
1559
|
+
display: flex;
|
|
1560
|
+
flex-direction: column;
|
|
1561
|
+
align-items: center;
|
|
1562
|
+
justify-content: center;
|
|
1563
|
+
gap: 24px;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
.app-download-btn-wrapper {
|
|
1567
|
+
display: flex;
|
|
1568
|
+
gap: 12px;
|
|
1569
|
+
width: 100%;
|
|
1570
|
+
align-items: center;
|
|
1571
|
+
justify-content: center;
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
.app-download-btn-wrapper a {
|
|
1575
|
+
text-decoration: none;
|
|
1576
|
+
transition: all 300ms ease-in-out;
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
.app-download-btn-wrapper a:hover {
|
|
1580
|
+
opacity: 0.8;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
.status-container {
|
|
1584
|
+
margin: 24px -24px -32px;
|
|
1585
|
+
padding: 16px;
|
|
1586
|
+
border-top: 1px solid #e3e7ee;
|
|
1587
|
+
background-color: #f3f5fa;
|
|
1588
|
+
display: flex;
|
|
1589
|
+
flex-direction: column;
|
|
1590
|
+
justify-content: center;
|
|
1591
|
+
align-items: center;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
.status-container.connected {
|
|
1595
|
+
background-color: #f2fcf7;
|
|
1596
|
+
border-color: #e3e7ee;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
.status-container.failed {
|
|
1600
|
+
background-color: #ffefef;
|
|
1601
|
+
border-color: #e3e7ee;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
.status-item {
|
|
1605
|
+
display: flex;
|
|
1606
|
+
align-items: center;
|
|
1607
|
+
justify-content: center;
|
|
1608
|
+
gap: 12px;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
.footer {
|
|
1612
|
+
width: 100%;
|
|
1613
|
+
border-top: 1px solid rgba(15, 40, 48, 0.12);
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
.footer-content {
|
|
1617
|
+
display: flex;
|
|
1618
|
+
flex-direction: column;
|
|
1619
|
+
gap: 12px;
|
|
1620
|
+
margin-top: 24px;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
.footer-branding {
|
|
1624
|
+
display: flex;
|
|
1625
|
+
gap: 12px;
|
|
1626
|
+
align-items: center;
|
|
1627
|
+
justify-content: center;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
.footer-links {
|
|
1631
|
+
width: 100%;
|
|
1632
|
+
display: flex;
|
|
1633
|
+
gap: 24px;
|
|
1634
|
+
align-items: center;
|
|
1635
|
+
justify-content: center;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
a {
|
|
1639
|
+
text-decoration: none;
|
|
1640
|
+
color: inherit;
|
|
1641
|
+
cursor: pointer;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
a:hover {
|
|
1645
|
+
text-decoration: underline;
|
|
1646
|
+
color: #75849a;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
.qr-link-container {
|
|
1650
|
+
display: flex;
|
|
1651
|
+
align-items: center;
|
|
1652
|
+
gap: 8px;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
.qr-link {
|
|
1656
|
+
padding: 4px 8px;
|
|
1657
|
+
border: 1px solid rgba(15, 40, 48, 0.12);
|
|
1658
|
+
border-radius: 8px;
|
|
1659
|
+
}
|
|
1660
|
+
`;
|
|
1661
|
+
__decorateClass([
|
|
1662
|
+
(0, import_decorators12.property)({ attribute: "session-id" })
|
|
1663
|
+
], KeyringQRModal.prototype, "sessionId", 2);
|
|
1664
|
+
__decorateClass([
|
|
1665
|
+
(0, import_decorators12.property)({ attribute: "expires-at", type: Number })
|
|
1666
|
+
], KeyringQRModal.prototype, "expiresAt", 2);
|
|
1667
|
+
__decorateClass([
|
|
1668
|
+
(0, import_decorators12.property)({ attribute: "qr-data" })
|
|
1669
|
+
], KeyringQRModal.prototype, "qrData", 2);
|
|
1670
|
+
__decorateClass([
|
|
1671
|
+
(0, import_decorators12.property)({ attribute: "qr-code-error" })
|
|
1672
|
+
], KeyringQRModal.prototype, "qrCodeError", 2);
|
|
1673
|
+
__decorateClass([
|
|
1674
|
+
(0, import_decorators12.state)()
|
|
1675
|
+
], KeyringQRModal.prototype, "status", 2);
|
|
1676
|
+
__decorateClass([
|
|
1677
|
+
(0, import_decorators12.state)()
|
|
1678
|
+
], KeyringQRModal.prototype, "statusMessage", 2);
|
|
1679
|
+
__decorateClass([
|
|
1680
|
+
(0, import_decorators12.state)()
|
|
1681
|
+
], KeyringQRModal.prototype, "timeLeft", 2);
|
|
1682
|
+
__decorateClass([
|
|
1683
|
+
(0, import_decorators12.state)()
|
|
1684
|
+
], KeyringQRModal.prototype, "linkCopied", 2);
|
|
1685
|
+
KeyringQRModal = __decorateClass([
|
|
1686
|
+
(0, import_decorators12.customElement)("keyring-qr-modal")
|
|
1687
|
+
], KeyringQRModal);
|
|
1688
|
+
|
|
1689
|
+
// src/ui/composites/keyring-selection-modal.ts
|
|
1690
|
+
var import_lit16 = require("lit");
|
|
1691
|
+
var import_decorators16 = require("lit/decorators.js");
|
|
1692
|
+
|
|
1693
|
+
// src/ui/icons/close-circle.ts
|
|
1694
|
+
var import_lit13 = require("lit");
|
|
1695
|
+
var import_decorators13 = require("lit/decorators.js");
|
|
1696
|
+
var CloseCircleIcon = class extends import_lit13.LitElement {
|
|
1697
|
+
render() {
|
|
1698
|
+
return import_lit13.html`
|
|
1699
|
+
<svg
|
|
1700
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1701
|
+
width="14"
|
|
1702
|
+
height="13"
|
|
1703
|
+
viewBox="0 0 14 13"
|
|
1704
|
+
fill="none"
|
|
1705
|
+
>
|
|
1706
|
+
<path
|
|
1707
|
+
fill-rule="evenodd"
|
|
1708
|
+
clip-rule="evenodd"
|
|
1709
|
+
d="M6.99935 0.166687C3.50735 0.166687 0.666016 3.00802 0.666016 6.50002C0.666016 9.99269 3.50735 12.8334 6.99935 12.8334C10.4913 12.8334 13.3327 9.99269 13.3327 6.50002C13.3327 3.00802 10.4913 0.166687 6.99935 0.166687ZM9.52602 9.02669C9.72135 9.22202 9.72135 9.53869 9.52602 9.73402C9.42802 9.83202 9.30068 9.88069 9.17268 9.88069C9.04468 9.88069 8.91735 9.83202 8.81935 9.73402L6.99935 7.91402L5.17935 9.73402C5.08135 9.83202 4.95402 9.88069 4.82602 9.88069C4.69802 9.88069 4.57068 9.83202 4.47268 9.73402C4.27735 9.53869 4.27735 9.22202 4.47268 9.02669L6.29268 7.20669L4.47268 5.38669C4.27735 5.19135 4.27735 4.87469 4.47268 4.67935C4.66802 4.48402 4.98468 4.48402 5.18002 4.67935L6.99935 6.49935L8.81935 4.67935C9.01468 4.48402 9.33135 4.48402 9.52668 4.67935C9.72202 4.87469 9.72202 5.19135 9.52668 5.38669L7.70668 7.20669L9.52602 9.02669Z"
|
|
1710
|
+
fill="white"
|
|
1711
|
+
/>
|
|
1712
|
+
</svg>
|
|
1713
|
+
`;
|
|
1714
|
+
}
|
|
1715
|
+
};
|
|
1716
|
+
CloseCircleIcon = __decorateClass([
|
|
1717
|
+
(0, import_decorators13.customElement)("close-circle-icon")
|
|
1718
|
+
], CloseCircleIcon);
|
|
1719
|
+
|
|
1720
|
+
// src/ui/icons/extension-grid.ts
|
|
1721
|
+
var import_lit14 = require("lit");
|
|
1722
|
+
var import_decorators14 = require("lit/decorators.js");
|
|
1723
|
+
var ExtensionGridIcon = class extends import_lit14.LitElement {
|
|
1724
|
+
render() {
|
|
1725
|
+
return import_lit14.html`
|
|
1726
|
+
<svg
|
|
1727
|
+
width="48"
|
|
1728
|
+
height="49"
|
|
1729
|
+
viewBox="0 0 48 49"
|
|
1730
|
+
fill="none"
|
|
1731
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1732
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
1733
|
+
>
|
|
1734
|
+
<path
|
|
1735
|
+
d="M22.0834 10.332H14.5466C9.2945 10.332 6 14.0507 6 19.3146V33.5162C6 38.78 9.27698 42.4986 14.5466 42.4986H29.618C34.8896 42.4986 38.1666 38.78 38.1666 33.5162V26.4154"
|
|
1736
|
+
stroke="black"
|
|
1737
|
+
stroke-opacity="0.88"
|
|
1738
|
+
stroke-width="2"
|
|
1739
|
+
stroke-linecap="round"
|
|
1740
|
+
stroke-linejoin="round"
|
|
1741
|
+
/>
|
|
1742
|
+
<path
|
|
1743
|
+
d="M38.1666 26.4144L6 26.414"
|
|
1744
|
+
stroke="black"
|
|
1745
|
+
stroke-opacity="0.88"
|
|
1746
|
+
stroke-width="2"
|
|
1747
|
+
stroke-linecap="round"
|
|
1748
|
+
stroke-linejoin="round"
|
|
1749
|
+
/>
|
|
1750
|
+
<path
|
|
1751
|
+
d="M22.082 10.332L22.0821 42.4986"
|
|
1752
|
+
stroke="black"
|
|
1753
|
+
stroke-opacity="0.88"
|
|
1754
|
+
stroke-width="2"
|
|
1755
|
+
stroke-linecap="round"
|
|
1756
|
+
stroke-linejoin="round"
|
|
1757
|
+
/>
|
|
1758
|
+
<path
|
|
1759
|
+
d="M26 9C26 5.68629 28.6863 3 32 3H40C43.3137 3 46 5.68629 46 9V17C46 20.3137 43.3137 23 40 23H28C26.8954 23 26 22.1046 26 21V9Z"
|
|
1760
|
+
fill="white"
|
|
1761
|
+
/>
|
|
1762
|
+
<path
|
|
1763
|
+
d="M26 9C26 5.68629 28.6863 3 32 3H40C43.3137 3 46 5.68629 46 9V17C46 20.3137 43.3137 23 40 23H28C26.8954 23 26 22.1046 26 21V9Z"
|
|
1764
|
+
fill="url(#pattern0_9297_28910)"
|
|
1765
|
+
/>
|
|
1766
|
+
<defs>
|
|
1767
|
+
<pattern
|
|
1768
|
+
id="pattern0_9297_28910"
|
|
1769
|
+
patternContentUnits="objectBoundingBox"
|
|
1770
|
+
width="1"
|
|
1771
|
+
height="1"
|
|
1772
|
+
>
|
|
1773
|
+
<use xlink:href="#image0_9297_28910" transform="scale(0.00675676)" />
|
|
1774
|
+
</pattern>
|
|
1775
|
+
<image
|
|
1776
|
+
id="image0_9297_28910"
|
|
1777
|
+
width="148"
|
|
1778
|
+
height="148"
|
|
1779
|
+
preserveAspectRatio="none"
|
|
1780
|
+
xlink:href="data:image/png;base64,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"
|
|
1781
|
+
/>
|
|
1782
|
+
</defs>
|
|
1783
|
+
</svg>
|
|
1784
|
+
`;
|
|
1785
|
+
}
|
|
1786
|
+
};
|
|
1787
|
+
ExtensionGridIcon = __decorateClass([
|
|
1788
|
+
(0, import_decorators14.customElement)("extension-grid-icon")
|
|
1789
|
+
], ExtensionGridIcon);
|
|
1790
|
+
|
|
1791
|
+
// src/ui/icons/mobile-grid.ts
|
|
1792
|
+
var import_lit15 = require("lit");
|
|
1793
|
+
var import_decorators15 = require("lit/decorators.js");
|
|
1794
|
+
var MobileGridIcon = class extends import_lit15.LitElement {
|
|
1795
|
+
render() {
|
|
1796
|
+
return import_lit15.html`
|
|
1797
|
+
<svg
|
|
1798
|
+
width="48"
|
|
1799
|
+
height="49"
|
|
1800
|
+
viewBox="0 0 48 49"
|
|
1801
|
+
fill="none"
|
|
1802
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1803
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
1804
|
+
>
|
|
1805
|
+
<rect x="20.9785" y="5.5" width="20" height="19" rx="4" fill="white" />
|
|
1806
|
+
<rect x="20.9785" y="5.5" width="20" height="19" rx="4" fill="url(#pattern0_9297_28924)" />
|
|
1807
|
+
<path
|
|
1808
|
+
d="M18.2583 7.74219H16.6393C12.6423 7.74219 9.40234 10.9822 9.40234 14.9802L9.40414 36.5082C9.40414 40.5022 12.6441 43.7422 16.6393 43.7422H27.6708C31.6678 43.7422 34.906 40.5022 34.906 36.5062L34.904 27.5782"
|
|
1809
|
+
stroke="black"
|
|
1810
|
+
stroke-opacity="0.88"
|
|
1811
|
+
stroke-width="2"
|
|
1812
|
+
stroke-linecap="round"
|
|
1813
|
+
stroke-linejoin="round"
|
|
1814
|
+
/>
|
|
1815
|
+
<path
|
|
1816
|
+
d="M22.1514 36.2746V36.1486M21.6328 36.2486C21.6328 35.9606 21.8666 35.7266 22.1546 35.7266C22.4426 35.7266 22.676 35.9606 22.676 36.2486C22.676 36.5366 22.4426 36.7706 22.1546 36.7706C21.8666 36.7706 21.6328 36.5366 21.6328 36.2486Z"
|
|
1817
|
+
stroke="black"
|
|
1818
|
+
stroke-opacity="0.88"
|
|
1819
|
+
stroke-width="2"
|
|
1820
|
+
stroke-linecap="round"
|
|
1821
|
+
stroke-linejoin="round"
|
|
1822
|
+
/>
|
|
1823
|
+
<defs>
|
|
1824
|
+
<pattern
|
|
1825
|
+
id="pattern0_9297_28924"
|
|
1826
|
+
patternContentUnits="objectBoundingBox"
|
|
1827
|
+
width="1"
|
|
1828
|
+
height="1"
|
|
1829
|
+
>
|
|
1830
|
+
<use
|
|
1831
|
+
xlink:href="#image0_9297_28924"
|
|
1832
|
+
transform="matrix(0.00675676 0 0 0.00711238 0 -0.0263158)"
|
|
1833
|
+
/>
|
|
1834
|
+
</pattern>
|
|
1835
|
+
<image
|
|
1836
|
+
id="image0_9297_28924"
|
|
1837
|
+
width="148"
|
|
1838
|
+
height="148"
|
|
1839
|
+
preserveAspectRatio="none"
|
|
1840
|
+
xlink:href="data:image/png;base64,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"
|
|
1841
|
+
/>
|
|
1842
|
+
</defs>
|
|
1843
|
+
</svg>
|
|
1844
|
+
`;
|
|
1845
|
+
}
|
|
1846
|
+
};
|
|
1847
|
+
MobileGridIcon = __decorateClass([
|
|
1848
|
+
(0, import_decorators15.customElement)("mobile-grid-icon")
|
|
1849
|
+
], MobileGridIcon);
|
|
1850
|
+
|
|
1851
|
+
// src/ui/composites/keyring-selection-modal.ts
|
|
1852
|
+
var KeyringSelectionModal = class extends import_lit16.LitElement {
|
|
1853
|
+
constructor() {
|
|
1854
|
+
super(...arguments);
|
|
1855
|
+
this.title = "Choose how to continue";
|
|
1856
|
+
this.subtitle = "Select your preferred method to complete verification";
|
|
1857
|
+
this.isExtensionInstalled = false;
|
|
1858
|
+
this.extensionBtnText = "Continue with Extension";
|
|
1859
|
+
this.mobileBtnText = "Continue with Mobile App";
|
|
1860
|
+
this.mobileSelected = false;
|
|
1861
|
+
}
|
|
1862
|
+
connectedCallback() {
|
|
1863
|
+
super.connectedCallback();
|
|
1864
|
+
this.trapFocus();
|
|
1865
|
+
}
|
|
1866
|
+
render() {
|
|
1867
|
+
return import_lit16.html`
|
|
1868
|
+
<div class="modal" @click=${this.stopPropagation}>
|
|
1869
|
+
<div class="header">
|
|
1870
|
+
<div class="header-title">
|
|
1871
|
+
<keyring-text variant="text-2xl" weight="medium">${this.title}</keyring-text>
|
|
1872
|
+
<keyring-text variant="text-sm" color="secondary">${this.subtitle}</keyring-text>
|
|
1873
|
+
</div>
|
|
1874
|
+
<button class="close-btn" @click=${this.handleCancel} aria-label="Close">
|
|
1875
|
+
<svg
|
|
1876
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1877
|
+
width="24"
|
|
1878
|
+
height="24"
|
|
1879
|
+
viewBox="0 0 24 24"
|
|
1880
|
+
fill="none"
|
|
1881
|
+
>
|
|
1882
|
+
<path
|
|
1883
|
+
d="M16.0391 6.54694C16.4296 6.15641 17.0626 6.15641 17.4531 6.54694C17.8436 6.93747 17.8436 7.5705 17.4531 7.961L13.4141 12.0001L17.4531 16.0391C17.8436 16.4297 17.8436 17.0627 17.4531 17.4532C17.0626 17.8437 16.4296 17.8436 16.0391 17.4532L12 13.4141L7.96094 17.4532C7.57044 17.8437 6.93741 17.8436 6.54688 17.4532C6.15635 17.0627 6.15635 16.4296 6.54688 16.0391L10.5859 12.0001L6.54688 7.961C6.15635 7.57047 6.15635 6.93746 6.54688 6.54694C6.9374 6.15641 7.57041 6.15641 7.96094 6.54694L12 10.586L16.0391 6.54694Z"
|
|
1884
|
+
fill="#75849A"
|
|
1885
|
+
/>
|
|
1886
|
+
</svg>
|
|
1887
|
+
</button>
|
|
1888
|
+
</div>
|
|
1889
|
+
|
|
1890
|
+
<div class="content">
|
|
1891
|
+
<div class="selection-buttons">
|
|
1892
|
+
<button class="selection-btn extension-btn" @click=${this.handleExtensionSelect}>
|
|
1893
|
+
<extension-grid-icon></extension-grid-icon>
|
|
1894
|
+
<div class="btn-content">
|
|
1895
|
+
<div class="title">
|
|
1896
|
+
<keyring-text variant="text-base" weight="medium"
|
|
1897
|
+
>${this.extensionBtnText}</keyring-text
|
|
1898
|
+
>
|
|
1899
|
+
<div
|
|
1900
|
+
class=${`extension-status ${this.isExtensionInstalled ? "installed" : "not-installed"}`}
|
|
1901
|
+
>
|
|
1902
|
+
${this.isExtensionInstalled ? import_lit16.html`<check-circle-icon
|
|
1903
|
+
style="display: flex; align-items: center;"
|
|
1904
|
+
></check-circle-icon>` : import_lit16.html`<close-circle-icon
|
|
1905
|
+
style="display: flex; align-items: center;"
|
|
1906
|
+
></close-circle-icon>`}
|
|
1907
|
+
<keyring-text variant="xs" color="white">
|
|
1908
|
+
${this.isExtensionInstalled ? "Installed" : "Not Installed"}
|
|
1909
|
+
</keyring-text>
|
|
1910
|
+
</div>
|
|
1911
|
+
</div>
|
|
1912
|
+
<keyring-text variant="text-sm" color="secondary"
|
|
1913
|
+
>Use your browser extension</keyring-text
|
|
1914
|
+
>
|
|
1915
|
+
</div>
|
|
1916
|
+
</button>
|
|
1917
|
+
|
|
1918
|
+
<button class="selection-btn mobile-btn" @click=${this.handleMobileSelect}>
|
|
1919
|
+
<mobile-grid-icon></mobile-grid-icon>
|
|
1920
|
+
<div class="btn-content">
|
|
1921
|
+
<div class="title">
|
|
1922
|
+
<keyring-text variant="text-base" weight="medium"
|
|
1923
|
+
>${this.mobileBtnText}</keyring-text
|
|
1924
|
+
>
|
|
1925
|
+
${this.mobileSelected ? import_lit16.html`<gradient-donut-icon spinning></gradient-donut-icon>` : ""}
|
|
1926
|
+
</div>
|
|
1927
|
+
<keyring-text variant="text-sm" color="secondary"
|
|
1928
|
+
>Scan QR code with your phone</keyring-text
|
|
1929
|
+
>
|
|
1930
|
+
</div>
|
|
1931
|
+
</button>
|
|
1932
|
+
</div>
|
|
1933
|
+
</div>
|
|
1934
|
+
|
|
1935
|
+
<div class="footer">
|
|
1936
|
+
<div class="footer-content">
|
|
1937
|
+
<div class="footer-branding">
|
|
1938
|
+
<keyring-text variant="text-sm" color="secondary"
|
|
1939
|
+
>Verification provided by</keyring-text
|
|
1940
|
+
>
|
|
1941
|
+
<keyring-icon></keyring-icon>
|
|
1942
|
+
</div>
|
|
1943
|
+
<div class="footer-links">
|
|
1944
|
+
<a href="https://www.keyring.network/terms" target="_blank" class="link">
|
|
1945
|
+
<keyring-text variant="text-sm" color="secondary"
|
|
1946
|
+
>Keyring Terms and Conditions</keyring-text
|
|
1947
|
+
>
|
|
1948
|
+
</a>
|
|
1949
|
+
<a href="https://docs.keyring.network/docs" target="_blank" class="link">
|
|
1950
|
+
<keyring-text variant="text-sm" color="secondary">Keyring Docs</keyring-text>
|
|
1951
|
+
</a>
|
|
1952
|
+
</div>
|
|
1953
|
+
</div>
|
|
1954
|
+
</div>
|
|
1955
|
+
</div>
|
|
1956
|
+
`;
|
|
1957
|
+
}
|
|
1958
|
+
// Event handlers
|
|
1959
|
+
handleCancel() {
|
|
1960
|
+
this.dispatchEvent(new CustomEvent("cancel", { bubbles: true, composed: true }));
|
|
1961
|
+
}
|
|
1962
|
+
handleExtensionSelect() {
|
|
1963
|
+
this.dispatchEvent(new CustomEvent("extension-selected", { bubbles: true, composed: true }));
|
|
1964
|
+
}
|
|
1965
|
+
handleMobileSelect() {
|
|
1966
|
+
if (this.mobileSelected) {
|
|
1967
|
+
return;
|
|
1968
|
+
}
|
|
1969
|
+
this.mobileSelected = true;
|
|
1970
|
+
this.dispatchEvent(new CustomEvent("mobile-selected", { bubbles: true, composed: true }));
|
|
1971
|
+
}
|
|
1972
|
+
stopPropagation(e) {
|
|
1973
|
+
e.stopPropagation();
|
|
1974
|
+
}
|
|
1975
|
+
trapFocus() {
|
|
1976
|
+
const focusableElements = this.shadowRoot?.querySelectorAll(
|
|
1977
|
+
'button:not([style*="display: none"]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
1978
|
+
);
|
|
1979
|
+
if (focusableElements && focusableElements.length > 0) {
|
|
1980
|
+
focusableElements[0].focus();
|
|
1981
|
+
}
|
|
1982
|
+
}
|
|
1983
|
+
};
|
|
1984
|
+
KeyringSelectionModal.styles = import_lit16.css`
|
|
1985
|
+
:host {
|
|
1986
|
+
position: fixed;
|
|
1987
|
+
top: 0;
|
|
1988
|
+
left: 0;
|
|
1989
|
+
right: 0;
|
|
1990
|
+
bottom: 0;
|
|
1991
|
+
background-color: rgba(15, 40, 48, 0.45);
|
|
1992
|
+
display: flex;
|
|
1993
|
+
align-items: center;
|
|
1994
|
+
justify-content: center;
|
|
1995
|
+
z-index: 10000;
|
|
1996
|
+
font-family: Inter, "Segoe UI", Roboto, sans-serif;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
.modal {
|
|
2000
|
+
background: white;
|
|
2001
|
+
border-radius: 20px;
|
|
2002
|
+
display: flex;
|
|
2003
|
+
gap: 24px;
|
|
2004
|
+
padding: 24px 24px 32px 24px;
|
|
2005
|
+
flex-direction: column;
|
|
2006
|
+
align-items: center;
|
|
2007
|
+
max-width: 524px;
|
|
2008
|
+
width: 100%;
|
|
2009
|
+
max-height: 90vh;
|
|
2010
|
+
overflow-y: auto;
|
|
2011
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
.header {
|
|
2015
|
+
display: flex;
|
|
2016
|
+
justify-content: space-between;
|
|
2017
|
+
align-items: flex-start;
|
|
2018
|
+
width: 100%;
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
.header-title {
|
|
2022
|
+
width: 100%;
|
|
2023
|
+
display: flex;
|
|
2024
|
+
flex-direction: column;
|
|
2025
|
+
gap: 16px;
|
|
2026
|
+
align-items: start;
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
.close-btn {
|
|
2030
|
+
background-color: transparent;
|
|
2031
|
+
border: none;
|
|
2032
|
+
cursor: pointer;
|
|
2033
|
+
padding: 4px;
|
|
2034
|
+
border-radius: 8px;
|
|
2035
|
+
transition: all 300ms ease-in-out;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
.close-btn:hover {
|
|
2039
|
+
background-color: #75849a1a;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
.content {
|
|
2043
|
+
width: 100%;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
.selection-buttons {
|
|
2047
|
+
display: flex;
|
|
2048
|
+
flex-direction: column;
|
|
2049
|
+
gap: 8px;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
.selection-btn {
|
|
2053
|
+
display: flex;
|
|
2054
|
+
gap: 12px;
|
|
2055
|
+
align-items: center;
|
|
2056
|
+
padding: 20px 16px;
|
|
2057
|
+
border: 1px solid #e3e7ee;
|
|
2058
|
+
border-radius: 12px;
|
|
2059
|
+
background-color: transparent;
|
|
2060
|
+
cursor: pointer;
|
|
2061
|
+
transition: all 300ms ease-in-out;
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
.btn-content {
|
|
2065
|
+
flex: 1;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
.btn-content .title {
|
|
2069
|
+
display: flex;
|
|
2070
|
+
gap: 8px;
|
|
2071
|
+
align-items: center;
|
|
2072
|
+
flex: 1;
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
.extension-status {
|
|
2076
|
+
display: flex;
|
|
2077
|
+
align-items: center;
|
|
2078
|
+
gap: 4px;
|
|
2079
|
+
padding: 2px 8px 2px 4px;
|
|
2080
|
+
border-radius: 100px;
|
|
2081
|
+
min-height: 20px;
|
|
2082
|
+
color: #fff;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
.extension-status.installed {
|
|
2086
|
+
background-color: #24af75;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
.extension-status.not-installed {
|
|
2090
|
+
background-color: #eb4577;
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
.extension-btn {
|
|
2094
|
+
border-color: #a5eec7;
|
|
2095
|
+
background-color: #f2fcf7;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
.extension-btn:hover {
|
|
2099
|
+
background-color: #e6f9ec;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
.mobile-btn {
|
|
2103
|
+
border-color: #e3e7ee;
|
|
2104
|
+
background-color: #f3f5fa;
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
.mobile-btn:hover {
|
|
2108
|
+
background-color: #e8edf5;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
.footer {
|
|
2112
|
+
width: 100%;
|
|
2113
|
+
border-top: 1px solid rgba(15, 40, 48, 0.12);
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
.footer-content {
|
|
2117
|
+
display: flex;
|
|
2118
|
+
flex-direction: column;
|
|
2119
|
+
gap: 12px;
|
|
2120
|
+
margin-top: 24px;
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
.footer-branding {
|
|
2124
|
+
display: flex;
|
|
2125
|
+
gap: 12px;
|
|
2126
|
+
align-items: center;
|
|
2127
|
+
justify-content: center;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
.footer-links {
|
|
2131
|
+
width: 100%;
|
|
2132
|
+
display: flex;
|
|
2133
|
+
gap: 24px;
|
|
2134
|
+
align-items: center;
|
|
2135
|
+
justify-content: center;
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
.footer-links a {
|
|
2139
|
+
text-decoration: none;
|
|
2140
|
+
color: inherit;
|
|
2141
|
+
cursor: pointer;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
.footer-links a:hover {
|
|
2145
|
+
text-decoration: underline;
|
|
2146
|
+
color: #75849a;
|
|
2147
|
+
}
|
|
2148
|
+
`;
|
|
2149
|
+
__decorateClass([
|
|
2150
|
+
(0, import_decorators16.property)()
|
|
2151
|
+
], KeyringSelectionModal.prototype, "title", 2);
|
|
2152
|
+
__decorateClass([
|
|
2153
|
+
(0, import_decorators16.property)()
|
|
2154
|
+
], KeyringSelectionModal.prototype, "subtitle", 2);
|
|
2155
|
+
__decorateClass([
|
|
2156
|
+
(0, import_decorators16.property)()
|
|
2157
|
+
], KeyringSelectionModal.prototype, "isExtensionInstalled", 2);
|
|
2158
|
+
__decorateClass([
|
|
2159
|
+
(0, import_decorators16.property)({ attribute: "extension-btn-text" })
|
|
2160
|
+
], KeyringSelectionModal.prototype, "extensionBtnText", 2);
|
|
2161
|
+
__decorateClass([
|
|
2162
|
+
(0, import_decorators16.property)({ attribute: "mobile-btn-text" })
|
|
2163
|
+
], KeyringSelectionModal.prototype, "mobileBtnText", 2);
|
|
2164
|
+
__decorateClass([
|
|
2165
|
+
(0, import_decorators16.state)()
|
|
2166
|
+
], KeyringSelectionModal.prototype, "mobileSelected", 2);
|
|
2167
|
+
KeyringSelectionModal = __decorateClass([
|
|
2168
|
+
(0, import_decorators16.customElement)("keyring-selection-modal")
|
|
2169
|
+
], KeyringSelectionModal);
|
|
2170
|
+
|
|
2171
|
+
// src/ui/composites/keyring-terminated-modal.ts
|
|
2172
|
+
var import_lit18 = require("lit");
|
|
2173
|
+
var import_decorators18 = require("lit/decorators.js");
|
|
2174
|
+
|
|
2175
|
+
// src/ui/icons/error-circle.ts
|
|
2176
|
+
var import_lit17 = require("lit");
|
|
2177
|
+
var import_decorators17 = require("lit/decorators.js");
|
|
2178
|
+
var ErrorCircleIcon = class extends import_lit17.LitElement {
|
|
2179
|
+
render() {
|
|
2180
|
+
return import_lit17.html`
|
|
2181
|
+
<svg
|
|
2182
|
+
width="88"
|
|
2183
|
+
height="89"
|
|
2184
|
+
viewBox="0 0 88 89"
|
|
2185
|
+
fill="none"
|
|
2186
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2187
|
+
>
|
|
2188
|
+
<path
|
|
2189
|
+
d="M43.1211 11.6273C61.2761 11.6273 75.9921 26.3433 75.9922 44.4984C75.9922 62.6534 61.2761 77.3695 43.1211 77.3695C24.9661 77.3695 10.25 62.6534 10.25 44.4984C10.2501 26.3433 24.9661 11.6273 43.1211 11.6273Z"
|
|
2190
|
+
stroke="#0F2830"
|
|
2191
|
+
stroke-width="1.5"
|
|
2192
|
+
stroke-linecap="round"
|
|
2193
|
+
stroke-linejoin="round"
|
|
2194
|
+
/>
|
|
2195
|
+
<path
|
|
2196
|
+
fill-rule="evenodd"
|
|
2197
|
+
clip-rule="evenodd"
|
|
2198
|
+
d="M44.0005 56.6725C42.8439 56.6725 41.9053 57.6091 41.9053 58.7677V58.9102C41.9053 60.0689 42.8439 60.9342 44.0005 60.9342C45.1571 60.9342 46.0958 59.9264 46.0958 58.7677C46.0958 57.6091 45.1571 56.6725 44.0005 56.6725Z"
|
|
2199
|
+
fill="#0F2830"
|
|
2200
|
+
/>
|
|
2201
|
+
<path
|
|
2202
|
+
fill-rule="evenodd"
|
|
2203
|
+
clip-rule="evenodd"
|
|
2204
|
+
d="M44.0005 27.4803C42.8439 27.4803 41.9053 28.4168 41.9053 29.5755V48.8497C41.9053 50.0084 42.8439 50.945 44.0005 50.945C45.1571 50.945 46.0958 50.0084 46.0958 48.8497V29.5755C46.0958 28.4168 45.1571 27.4803 44.0005 27.4803Z"
|
|
2205
|
+
fill="#0F2830"
|
|
2206
|
+
/>
|
|
2207
|
+
</svg>
|
|
2208
|
+
`;
|
|
2209
|
+
}
|
|
2210
|
+
};
|
|
2211
|
+
ErrorCircleIcon = __decorateClass([
|
|
2212
|
+
(0, import_decorators17.customElement)("error-circle-icon")
|
|
2213
|
+
], ErrorCircleIcon);
|
|
2214
|
+
|
|
2215
|
+
// src/ui/composites/keyring-terminated-modal.ts
|
|
2216
|
+
var KeyringTerminatedModal = class extends import_lit18.LitElement {
|
|
2217
|
+
constructor() {
|
|
2218
|
+
super(...arguments);
|
|
2219
|
+
this.title = "Session Terminated";
|
|
2220
|
+
this.subtitle = "Your verification session has expired or is terminated. Please start a new session to continue.";
|
|
2221
|
+
}
|
|
2222
|
+
connectedCallback() {
|
|
2223
|
+
super.connectedCallback();
|
|
2224
|
+
this.trapFocus();
|
|
2225
|
+
}
|
|
2226
|
+
render() {
|
|
2227
|
+
return import_lit18.html`
|
|
2228
|
+
<div class="modal" @click=${this.stopPropagation}>
|
|
2229
|
+
<div class="content">
|
|
2230
|
+
<error-circle-icon></error-circle-icon>
|
|
2231
|
+
|
|
2232
|
+
<div class="text-wrapper">
|
|
2233
|
+
<keyring-text variant="text-3xl" weight="medium">${this.title}</keyring-text>
|
|
2234
|
+
<keyring-text variant="text-sm" align="center">${this.subtitle}</keyring-text>
|
|
2235
|
+
</div>
|
|
2236
|
+
|
|
2237
|
+
<keyring-button class="close-button" @click=${this.handleClose}>Close Session</keyring-button>
|
|
2238
|
+
</div>
|
|
2239
|
+
</div>
|
|
2240
|
+
`;
|
|
2241
|
+
}
|
|
2242
|
+
// Event handlers
|
|
2243
|
+
handleClose() {
|
|
2244
|
+
this.dispatchEvent(new CustomEvent("close", { bubbles: true, composed: true }));
|
|
2245
|
+
}
|
|
2246
|
+
stopPropagation(e) {
|
|
2247
|
+
e.stopPropagation();
|
|
2248
|
+
}
|
|
2249
|
+
trapFocus() {
|
|
2250
|
+
const focusableElements = this.shadowRoot?.querySelectorAll(
|
|
2251
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
2252
|
+
);
|
|
2253
|
+
if (focusableElements && focusableElements.length > 0) {
|
|
2254
|
+
focusableElements[0].focus();
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
};
|
|
2258
|
+
KeyringTerminatedModal.styles = import_lit18.css`
|
|
2259
|
+
:host {
|
|
2260
|
+
position: fixed;
|
|
2261
|
+
top: 0;
|
|
2262
|
+
left: 0;
|
|
2263
|
+
right: 0;
|
|
2264
|
+
bottom: 0;
|
|
2265
|
+
background-color: rgba(15, 40, 48, 0.45);
|
|
2266
|
+
display: flex;
|
|
2267
|
+
align-items: center;
|
|
2268
|
+
justify-content: center;
|
|
2269
|
+
z-index: 10000;
|
|
2270
|
+
font-family: Inter, "Segoe UI", Roboto, sans-serif;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
.modal {
|
|
2274
|
+
background: white;
|
|
2275
|
+
border-radius: 20px;
|
|
2276
|
+
display: flex;
|
|
2277
|
+
gap: 24px;
|
|
2278
|
+
padding: 40px 24px 40px 24px;
|
|
2279
|
+
flex-direction: column;
|
|
2280
|
+
align-items: center;
|
|
2281
|
+
max-width: 524px;
|
|
2282
|
+
width: 100%;
|
|
2283
|
+
max-height: 90vh;
|
|
2284
|
+
overflow-y: auto;
|
|
2285
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
.content {
|
|
2289
|
+
width: 100%;
|
|
2290
|
+
display: flex;
|
|
2291
|
+
flex-direction: column;
|
|
2292
|
+
align-items: center;
|
|
2293
|
+
justify-content: center;
|
|
2294
|
+
gap: 24px;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
.text-wrapper {
|
|
2298
|
+
display: flex;
|
|
2299
|
+
flex-direction: column;
|
|
2300
|
+
align-items: center;
|
|
2301
|
+
justify-content: center;
|
|
2302
|
+
gap: 12px;
|
|
2303
|
+
width: 100%;
|
|
2304
|
+
max-width: 400px;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
.close-button {
|
|
2308
|
+
width: 100%;
|
|
2309
|
+
max-width: 200px;
|
|
2310
|
+
margin: 0 auto;
|
|
2311
|
+
}
|
|
2312
|
+
`;
|
|
2313
|
+
__decorateClass([
|
|
2314
|
+
(0, import_decorators18.property)()
|
|
2315
|
+
], KeyringTerminatedModal.prototype, "title", 2);
|
|
2316
|
+
__decorateClass([
|
|
2317
|
+
(0, import_decorators18.property)()
|
|
2318
|
+
], KeyringTerminatedModal.prototype, "subtitle", 2);
|
|
2319
|
+
KeyringTerminatedModal = __decorateClass([
|
|
2320
|
+
(0, import_decorators18.customElement)("keyring-terminated-modal")
|
|
2321
|
+
], KeyringTerminatedModal);
|
|
2322
|
+
|
|
2323
|
+
// src/ui/UIManager.ts
|
|
2324
|
+
var import_keyring_core_sdk = require("@keyringnetwork/keyring-core-sdk");
|
|
2325
|
+
var logger = KeyringLogger.init("UIManager");
|
|
2326
|
+
var UIManager = class {
|
|
2327
|
+
constructor() {
|
|
2328
|
+
this.currentModal = null;
|
|
2329
|
+
this.onCancel = () => {
|
|
2330
|
+
};
|
|
2331
|
+
this.onExtensionSelected = () => {
|
|
2332
|
+
};
|
|
2333
|
+
this.onMobileSelected = () => {
|
|
2334
|
+
};
|
|
2335
|
+
this.isExtensionInstalled = false;
|
|
2336
|
+
this.STATUS_MODALS = ["KEYRING-QR-MODAL", "KEYRING-MOBILE-MODAL"];
|
|
2337
|
+
}
|
|
2338
|
+
/**
|
|
2339
|
+
* Show platform selection modal for desktop users
|
|
2340
|
+
*/
|
|
2341
|
+
async showSelectionModal() {
|
|
2342
|
+
this.hideModal();
|
|
2343
|
+
this.isExtensionInstalled = await import_keyring_core_sdk.ExtensionClient.isInstalled();
|
|
2344
|
+
const modal = document.createElement("keyring-selection-modal");
|
|
2345
|
+
modal.isExtensionInstalled = this.isExtensionInstalled;
|
|
2346
|
+
modal.addEventListener("cancel", () => {
|
|
2347
|
+
this.hideModal();
|
|
2348
|
+
this.onCancel();
|
|
2349
|
+
});
|
|
2350
|
+
modal.addEventListener("extension-selected", () => {
|
|
2351
|
+
this.hideModal();
|
|
2352
|
+
this.onExtensionSelected();
|
|
2353
|
+
});
|
|
2354
|
+
modal.addEventListener("mobile-selected", () => {
|
|
2355
|
+
this.onMobileSelected();
|
|
2356
|
+
});
|
|
2357
|
+
modal.addEventListener("click", (e) => {
|
|
2358
|
+
if (e.target === modal) {
|
|
2359
|
+
this.hideModal();
|
|
2360
|
+
this.onCancel();
|
|
2361
|
+
}
|
|
2362
|
+
});
|
|
2363
|
+
document.body.appendChild(modal);
|
|
2364
|
+
this.currentModal = modal;
|
|
2365
|
+
}
|
|
2366
|
+
/**
|
|
2367
|
+
* Show QR code modal with app launch button for mobile
|
|
2368
|
+
*/
|
|
2369
|
+
async showMobileModal(qrCodeData, expiresAt) {
|
|
2370
|
+
this.hideModal();
|
|
2371
|
+
const modal = document.createElement("keyring-mobile-modal");
|
|
2372
|
+
const expiresAtTimestamp = typeof expiresAt === "string" ? new Date(expiresAt).getTime() : expiresAt;
|
|
2373
|
+
modal.qrData = qrCodeData;
|
|
2374
|
+
modal.expiresAt = expiresAtTimestamp;
|
|
2375
|
+
modal.addEventListener("cancel", () => {
|
|
2376
|
+
this.hideModal();
|
|
2377
|
+
this.onCancel();
|
|
2378
|
+
});
|
|
2379
|
+
modal.addEventListener("click", (e) => {
|
|
2380
|
+
if (e.target === modal) {
|
|
2381
|
+
return;
|
|
2382
|
+
}
|
|
2383
|
+
});
|
|
2384
|
+
document.body.appendChild(modal);
|
|
2385
|
+
this.currentModal = modal;
|
|
2386
|
+
}
|
|
2387
|
+
/**
|
|
2388
|
+
* Show QR code modal with session information
|
|
2389
|
+
*/
|
|
2390
|
+
async showQRModal(qrCodeData, sessionId, expiresAt) {
|
|
2391
|
+
this.hideModal();
|
|
2392
|
+
const modal = document.createElement("keyring-qr-modal");
|
|
2393
|
+
const expiresAtTimestamp = typeof expiresAt === "string" ? new Date(expiresAt).getTime() : expiresAt;
|
|
2394
|
+
modal.sessionId = sessionId;
|
|
2395
|
+
modal.expiresAt = expiresAtTimestamp;
|
|
2396
|
+
modal.qrData = qrCodeData;
|
|
2397
|
+
const qrCanvas = await this.generateQRCode(qrCodeData);
|
|
2398
|
+
if (qrCanvas) {
|
|
2399
|
+
qrCanvas.slot = "qr-code";
|
|
2400
|
+
modal.appendChild(qrCanvas);
|
|
2401
|
+
} else {
|
|
2402
|
+
modal.qrCodeError = true;
|
|
2403
|
+
}
|
|
2404
|
+
modal.addEventListener("cancel", () => {
|
|
2405
|
+
this.hideModal();
|
|
2406
|
+
this.onCancel();
|
|
2407
|
+
});
|
|
2408
|
+
modal.addEventListener("back", () => {
|
|
2409
|
+
this.onCancel();
|
|
2410
|
+
this.showSelectionModal();
|
|
2411
|
+
});
|
|
2412
|
+
modal.addEventListener("click", (e) => {
|
|
2413
|
+
if (e.target === modal) {
|
|
2414
|
+
return;
|
|
2415
|
+
}
|
|
2416
|
+
});
|
|
2417
|
+
modal.addEventListener("close", () => {
|
|
2418
|
+
this.hideModal();
|
|
2419
|
+
});
|
|
2420
|
+
document.body.appendChild(modal);
|
|
2421
|
+
this.currentModal = modal;
|
|
2422
|
+
}
|
|
2423
|
+
/**
|
|
2424
|
+
* Show completion modal with verification results
|
|
2425
|
+
*/
|
|
2426
|
+
async showCompleteModal(entityType, dataSourceObject) {
|
|
2427
|
+
this.hideModal();
|
|
2428
|
+
const modal = document.createElement("keyring-complete-modal");
|
|
2429
|
+
modal.entityType = entityType;
|
|
2430
|
+
modal.dataSource = dataSourceObject.datasource.name;
|
|
2431
|
+
modal.dataSourceIcon = dataSourceObject.datasource.image;
|
|
2432
|
+
modal.addEventListener("close", () => {
|
|
2433
|
+
this.hideModal();
|
|
2434
|
+
});
|
|
2435
|
+
modal.addEventListener("click", (e) => {
|
|
2436
|
+
if (e.target === modal) {
|
|
2437
|
+
this.hideModal();
|
|
2438
|
+
}
|
|
2439
|
+
});
|
|
2440
|
+
document.body.appendChild(modal);
|
|
2441
|
+
this.currentModal = modal;
|
|
2442
|
+
}
|
|
2443
|
+
/**
|
|
2444
|
+
* Show terminated modal with session termination reason
|
|
2445
|
+
*/
|
|
2446
|
+
async showTerminatedModal() {
|
|
2447
|
+
this.hideModal();
|
|
2448
|
+
const modal = document.createElement("keyring-terminated-modal");
|
|
2449
|
+
modal.addEventListener("close", () => {
|
|
2450
|
+
this.hideModal();
|
|
2451
|
+
});
|
|
2452
|
+
modal.addEventListener("click", (e) => {
|
|
2453
|
+
if (e.target === modal) {
|
|
2454
|
+
this.hideModal();
|
|
2455
|
+
}
|
|
2456
|
+
});
|
|
2457
|
+
document.body.appendChild(modal);
|
|
2458
|
+
this.currentModal = modal;
|
|
2459
|
+
}
|
|
2460
|
+
/**
|
|
2461
|
+
* Update the status display in the modal
|
|
2462
|
+
*/
|
|
2463
|
+
updateStatus(message, status) {
|
|
2464
|
+
if (this.currentModal && this.STATUS_MODALS.includes(this.currentModal.tagName)) {
|
|
2465
|
+
this.currentModal.updateStatus(message, status);
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
/**
|
|
2469
|
+
* Hide and clean up the current modal
|
|
2470
|
+
*/
|
|
2471
|
+
hideModal() {
|
|
2472
|
+
if (this.currentModal && this.currentModal.parentNode) {
|
|
2473
|
+
this.currentModal.parentNode.removeChild(this.currentModal);
|
|
2474
|
+
}
|
|
2475
|
+
this.currentModal = null;
|
|
2476
|
+
}
|
|
2477
|
+
/**
|
|
2478
|
+
* Set callback handlers
|
|
2479
|
+
*/
|
|
2480
|
+
setCallbacks(onCancel, onExtensionSelected, onMobileSelected) {
|
|
2481
|
+
this.onCancel = onCancel;
|
|
2482
|
+
if (onExtensionSelected) {
|
|
2483
|
+
this.onExtensionSelected = onExtensionSelected;
|
|
2484
|
+
}
|
|
2485
|
+
if (onMobileSelected) {
|
|
2486
|
+
this.onMobileSelected = onMobileSelected;
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
/**
|
|
2490
|
+
* Generate QR code using the qr-code-styling library
|
|
2491
|
+
*/
|
|
2492
|
+
async generateQRCode(data) {
|
|
2493
|
+
const canvasContainer = document.createElement("div");
|
|
2494
|
+
try {
|
|
2495
|
+
const qrCode = new import_qr_code_styling.default({
|
|
2496
|
+
width: 200,
|
|
2497
|
+
height: 200,
|
|
2498
|
+
data,
|
|
2499
|
+
image: "https://uploads-ssl.webflow.com/65df8e71bab45b70f5433fba/664359927ac82d0c110ff6be_Keyring%20Icon%20Square.svg",
|
|
2500
|
+
dotsOptions: {
|
|
2501
|
+
color: "#0F2830",
|
|
2502
|
+
type: "dots"
|
|
2503
|
+
},
|
|
2504
|
+
cornersDotOptions: {
|
|
2505
|
+
type: "extra-rounded"
|
|
2506
|
+
},
|
|
2507
|
+
cornersSquareOptions: {
|
|
2508
|
+
type: "extra-rounded"
|
|
2509
|
+
},
|
|
2510
|
+
imageOptions: {
|
|
2511
|
+
crossOrigin: "anonymous"
|
|
2512
|
+
}
|
|
2513
|
+
});
|
|
2514
|
+
qrCode.append(canvasContainer);
|
|
2515
|
+
return canvasContainer;
|
|
2516
|
+
} catch (error) {
|
|
2517
|
+
logger.error({ error }, "Failed to generate QR code");
|
|
2518
|
+
return null;
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
};
|
|
2522
|
+
|
|
2523
|
+
// src/utils/environment.ts
|
|
2524
|
+
var Environment = class {
|
|
2525
|
+
/**
|
|
2526
|
+
* Detect current environment
|
|
2527
|
+
*/
|
|
2528
|
+
static getEnvironment() {
|
|
2529
|
+
if (typeof process !== "undefined" && process.env?.NODE_ENV) {
|
|
2530
|
+
return process.env.NODE_ENV;
|
|
2531
|
+
}
|
|
2532
|
+
if (typeof window !== "undefined") {
|
|
2533
|
+
const hostname = window.location?.hostname;
|
|
2534
|
+
if (hostname === "localhost" || hostname === "127.0.0.1") {
|
|
2535
|
+
return "development";
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
return "production";
|
|
2539
|
+
}
|
|
2540
|
+
/**
|
|
2541
|
+
* Get environment-specific configuration
|
|
2542
|
+
*/
|
|
2543
|
+
static getConfig() {
|
|
2544
|
+
const env = this.getEnvironment();
|
|
2545
|
+
switch (env) {
|
|
2546
|
+
case "production":
|
|
2547
|
+
return {
|
|
2548
|
+
apiUrl: "http://localhost:8000",
|
|
2549
|
+
timeout: 6e4,
|
|
2550
|
+
retryAttempts: 5,
|
|
2551
|
+
extensionTimeout: 1e4
|
|
2552
|
+
};
|
|
2553
|
+
case "development":
|
|
2554
|
+
default:
|
|
2555
|
+
return {
|
|
2556
|
+
apiUrl: "http://localhost:8000",
|
|
2557
|
+
timeout: 3e4,
|
|
2558
|
+
retryAttempts: 3,
|
|
2559
|
+
extensionTimeout: 5e3
|
|
2560
|
+
};
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
/**
|
|
2564
|
+
* Check if running in development mode
|
|
2565
|
+
*/
|
|
2566
|
+
static isDevelopment() {
|
|
2567
|
+
return this.getEnvironment() === "development";
|
|
2568
|
+
}
|
|
2569
|
+
/**
|
|
2570
|
+
* Check if running in test mode
|
|
2571
|
+
*/
|
|
2572
|
+
static isTest() {
|
|
2573
|
+
return this.getEnvironment() === "test";
|
|
2574
|
+
}
|
|
2575
|
+
/**
|
|
2576
|
+
* Check if running in production mode
|
|
2577
|
+
*/
|
|
2578
|
+
static isProduction() {
|
|
2579
|
+
return this.getEnvironment() === "production";
|
|
2580
|
+
}
|
|
2581
|
+
};
|
|
2582
|
+
|
|
2583
|
+
// src/utils/platformUtils.ts
|
|
2584
|
+
var PlatformUtils = class {
|
|
2585
|
+
/**
|
|
2586
|
+
* Detect the current platform and capabilities
|
|
2587
|
+
*/
|
|
2588
|
+
static detectPlatform() {
|
|
2589
|
+
const userAgent = typeof navigator !== "undefined" ? navigator.userAgent : "";
|
|
2590
|
+
const isAndroid = /Android/i.test(userAgent);
|
|
2591
|
+
const isIOS = /iPad|iPhone|iPod/.test(userAgent);
|
|
2592
|
+
const isMobile = isAndroid || isIOS || /Mobile|Opera Mini|Fennec|webOS|BlackBerry|PlayBook|BB10|IEMobile/i.test(userAgent);
|
|
2593
|
+
const isDesktop = !isMobile;
|
|
2594
|
+
return {
|
|
2595
|
+
isDesktop,
|
|
2596
|
+
isMobile,
|
|
2597
|
+
isAndroid,
|
|
2598
|
+
isIOS
|
|
2599
|
+
};
|
|
2600
|
+
}
|
|
2601
|
+
/**
|
|
2602
|
+
* Check if Chrome runtime is available for extension communication
|
|
2603
|
+
*/
|
|
2604
|
+
static isChromeRuntimeAvailable() {
|
|
2605
|
+
try {
|
|
2606
|
+
return typeof chrome?.runtime?.sendMessage === "function";
|
|
2607
|
+
} catch (error) {
|
|
2608
|
+
return false;
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
/**
|
|
2612
|
+
* Check if running in browser environment
|
|
2613
|
+
*/
|
|
2614
|
+
static isBrowser() {
|
|
2615
|
+
return typeof window !== "undefined";
|
|
2616
|
+
}
|
|
2617
|
+
/**
|
|
2618
|
+
* Wait for online status
|
|
2619
|
+
*/
|
|
2620
|
+
static waitForOnline(timeout = 3e4) {
|
|
2621
|
+
return new Promise((resolve) => {
|
|
2622
|
+
if (typeof navigator === "undefined" || navigator.onLine) {
|
|
2623
|
+
resolve(true);
|
|
2624
|
+
return;
|
|
2625
|
+
}
|
|
2626
|
+
let timeoutId;
|
|
2627
|
+
const onOnline = () => {
|
|
2628
|
+
clearTimeout(timeoutId);
|
|
2629
|
+
window.removeEventListener("online", onOnline);
|
|
2630
|
+
resolve(true);
|
|
2631
|
+
};
|
|
2632
|
+
window.addEventListener("online", onOnline);
|
|
2633
|
+
timeoutId = setTimeout(() => {
|
|
2634
|
+
window.removeEventListener("online", onOnline);
|
|
2635
|
+
resolve(false);
|
|
2636
|
+
}, timeout);
|
|
2637
|
+
});
|
|
2638
|
+
}
|
|
2639
|
+
};
|
|
2640
|
+
|
|
2641
|
+
// src/core/errors.ts
|
|
2642
|
+
var KeyringError = class _KeyringError extends Error {
|
|
2643
|
+
constructor(code, message, cause, context) {
|
|
2644
|
+
super(message);
|
|
2645
|
+
this.code = code;
|
|
2646
|
+
this.cause = cause;
|
|
2647
|
+
this.context = context;
|
|
2648
|
+
this.name = "KeyringError";
|
|
2649
|
+
this.timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
2650
|
+
if (Error.captureStackTrace) {
|
|
2651
|
+
Error.captureStackTrace(this, _KeyringError);
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
/**
|
|
2655
|
+
* Create error from unknown source
|
|
2656
|
+
*/
|
|
2657
|
+
static fromUnknown(error, context) {
|
|
2658
|
+
if (error instanceof _KeyringError) {
|
|
2659
|
+
return error;
|
|
2660
|
+
}
|
|
2661
|
+
if (error instanceof Error) {
|
|
2662
|
+
return new _KeyringError(
|
|
2663
|
+
"UNKNOWN_ERROR" /* UNKNOWN_ERROR */,
|
|
2664
|
+
error.message,
|
|
2665
|
+
error,
|
|
2666
|
+
context
|
|
2667
|
+
);
|
|
2668
|
+
}
|
|
2669
|
+
return new _KeyringError(
|
|
2670
|
+
"UNKNOWN_ERROR" /* UNKNOWN_ERROR */,
|
|
2671
|
+
String(error),
|
|
2672
|
+
error,
|
|
2673
|
+
context
|
|
2674
|
+
);
|
|
2675
|
+
}
|
|
2676
|
+
/**
|
|
2677
|
+
* Convert to JSON for logging/debugging
|
|
2678
|
+
*/
|
|
2679
|
+
toJSON() {
|
|
2680
|
+
return {
|
|
2681
|
+
name: this.name,
|
|
2682
|
+
code: this.code,
|
|
2683
|
+
message: this.message,
|
|
2684
|
+
timestamp: this.timestamp,
|
|
2685
|
+
context: this.context,
|
|
2686
|
+
cause: this.cause instanceof Error ? {
|
|
2687
|
+
name: this.cause.name,
|
|
2688
|
+
message: this.cause.message,
|
|
2689
|
+
stack: this.cause.stack
|
|
2690
|
+
} : this.cause
|
|
2691
|
+
};
|
|
2692
|
+
}
|
|
2693
|
+
};
|
|
2694
|
+
|
|
2695
|
+
// src/core/VerificationSession.ts
|
|
2696
|
+
var VerificationSession = class _VerificationSession {
|
|
2697
|
+
constructor(sessionConfig) {
|
|
2698
|
+
this.sessionConfig = sessionConfig;
|
|
2699
|
+
this.eventListeners = /* @__PURE__ */ new Map();
|
|
2700
|
+
this.isWebsocketActive = false;
|
|
2701
|
+
this.flowType = null;
|
|
2702
|
+
this.resultSettled = false;
|
|
2703
|
+
this.logger = KeyringLogger.init("VerificationSession").child({
|
|
2704
|
+
policyId: sessionConfig.policy_id,
|
|
2705
|
+
name: sessionConfig.name
|
|
2706
|
+
});
|
|
2707
|
+
this.logger.debug("Creating verification session");
|
|
2708
|
+
}
|
|
2709
|
+
static {
|
|
2710
|
+
this.activeSession = null;
|
|
2711
|
+
}
|
|
2712
|
+
static {
|
|
2713
|
+
this.staticLogger = KeyringLogger.init("VerificationSession");
|
|
2714
|
+
}
|
|
2715
|
+
/**
|
|
2716
|
+
* Launch verification flow with automatic platform detection and fallback
|
|
2717
|
+
*/
|
|
2718
|
+
static async launch(sessionConfig) {
|
|
2719
|
+
this.staticLogger.info({ sessionConfig }, "Launching verification flow");
|
|
2720
|
+
try {
|
|
2721
|
+
if (this.activeSession) {
|
|
2722
|
+
this.staticLogger.debug("Cleaning up existing session");
|
|
2723
|
+
await this.activeSession.close();
|
|
2724
|
+
this.activeSession = null;
|
|
2725
|
+
}
|
|
2726
|
+
if (!await PlatformUtils.waitForOnline(5e3)) {
|
|
2727
|
+
throw new KeyringError("NETWORK_ERROR" /* NETWORK_ERROR */, "No internet connection available");
|
|
2728
|
+
}
|
|
2729
|
+
this.activeSession = new _VerificationSession(sessionConfig);
|
|
2730
|
+
return this.activeSession;
|
|
2731
|
+
} catch (error) {
|
|
2732
|
+
this.staticLogger.error(error, "Launch failed");
|
|
2733
|
+
const keyringError = KeyringError.fromUnknown(error);
|
|
2734
|
+
throw keyringError;
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
/**
|
|
2738
|
+
* Start the verification session
|
|
2739
|
+
*/
|
|
2740
|
+
async start() {
|
|
2741
|
+
this.logger.debug("Starting verification session");
|
|
2742
|
+
this.resultPromise = new Promise((resolve, reject) => {
|
|
2743
|
+
this.resolveResult = resolve;
|
|
2744
|
+
this.rejectResult = reject;
|
|
2745
|
+
});
|
|
2746
|
+
const resultPromise = this.resultPromise;
|
|
2747
|
+
try {
|
|
2748
|
+
const dataTransport = this.resolveDataTransport();
|
|
2749
|
+
this.validateTransportRequirements(dataTransport);
|
|
2750
|
+
if (dataTransport === "chromeApi") {
|
|
2751
|
+
await this.startChromeApiFlow();
|
|
2752
|
+
} else {
|
|
2753
|
+
await this.setupUI();
|
|
2754
|
+
}
|
|
2755
|
+
return resultPromise;
|
|
2756
|
+
} catch (error) {
|
|
2757
|
+
this.clearPendingResultHandlers();
|
|
2758
|
+
await this.cleanup();
|
|
2759
|
+
throw KeyringError.fromUnknown(error, { sessionId: this.sessionId });
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2762
|
+
get sessionId() {
|
|
2763
|
+
return this.sessionResponse?.session_id;
|
|
2764
|
+
}
|
|
2765
|
+
get sessionToken() {
|
|
2766
|
+
return this.sessionResponse?.session_token;
|
|
2767
|
+
}
|
|
2768
|
+
/**
|
|
2769
|
+
* Add event listener for verification events
|
|
2770
|
+
*/
|
|
2771
|
+
addEventListener(eventType, listener) {
|
|
2772
|
+
if (!this.eventListeners.has(eventType)) {
|
|
2773
|
+
this.eventListeners.set(eventType, []);
|
|
2774
|
+
}
|
|
2775
|
+
this.eventListeners.get(eventType).push(listener);
|
|
2776
|
+
}
|
|
2777
|
+
/**
|
|
2778
|
+
* Remove event listener
|
|
2779
|
+
*/
|
|
2780
|
+
removeEventListener(eventType, listener) {
|
|
2781
|
+
const listeners = this.eventListeners.get(eventType);
|
|
2782
|
+
if (listeners) {
|
|
2783
|
+
const index = listeners.indexOf(listener);
|
|
2784
|
+
if (index > -1) {
|
|
2785
|
+
listeners.splice(index, 1);
|
|
2786
|
+
}
|
|
2787
|
+
}
|
|
2788
|
+
}
|
|
2789
|
+
/**
|
|
2790
|
+
* Clean up all resources
|
|
2791
|
+
*/
|
|
2792
|
+
async close() {
|
|
2793
|
+
this.rejectPendingResult(
|
|
2794
|
+
new KeyringError("USER_CANCELLED" /* USER_CANCELLED */, "Session was cleaned up")
|
|
2795
|
+
);
|
|
2796
|
+
await this.cleanup();
|
|
2797
|
+
}
|
|
2798
|
+
complete(result) {
|
|
2799
|
+
this.logger.debug("Session completed successfully");
|
|
2800
|
+
this.resolvePendingResult(result);
|
|
2801
|
+
void this.cleanup();
|
|
2802
|
+
}
|
|
2803
|
+
fail(error) {
|
|
2804
|
+
this.logger.error(error, "Session failed");
|
|
2805
|
+
this.rejectPendingResult(error);
|
|
2806
|
+
void this.cleanup();
|
|
2807
|
+
}
|
|
2808
|
+
resolvePendingResult(result) {
|
|
2809
|
+
if (this.resultSettled) {
|
|
2810
|
+
return;
|
|
2811
|
+
}
|
|
2812
|
+
this.resultSettled = true;
|
|
2813
|
+
this.resolveResult?.(result);
|
|
2814
|
+
this.clearPendingResultHandlers();
|
|
2815
|
+
}
|
|
2816
|
+
rejectPendingResult(error) {
|
|
2817
|
+
if (this.resultSettled) {
|
|
2818
|
+
return;
|
|
2819
|
+
}
|
|
2820
|
+
this.resultSettled = true;
|
|
2821
|
+
this.rejectResult?.(error);
|
|
2822
|
+
this.clearPendingResultHandlers();
|
|
2823
|
+
}
|
|
2824
|
+
clearPendingResultHandlers() {
|
|
2825
|
+
this.resolveResult = void 0;
|
|
2826
|
+
this.rejectResult = void 0;
|
|
2827
|
+
this.resultPromise = void 0;
|
|
2828
|
+
}
|
|
2829
|
+
async cleanup() {
|
|
2830
|
+
if (this.closePromise) {
|
|
2831
|
+
return this.closePromise;
|
|
2832
|
+
}
|
|
2833
|
+
this.closePromise = (async () => {
|
|
2834
|
+
this.logger.debug("Cleaning up verification session");
|
|
2835
|
+
if (_VerificationSession.activeSession === this) {
|
|
2836
|
+
_VerificationSession.activeSession = null;
|
|
2837
|
+
}
|
|
2838
|
+
if (this.stopPolling) {
|
|
2839
|
+
this.stopPolling();
|
|
2840
|
+
this.stopPolling = void 0;
|
|
2841
|
+
}
|
|
2842
|
+
if (this.wsClient) {
|
|
2843
|
+
this.isWebsocketActive = false;
|
|
2844
|
+
this.wsClient.disconnect();
|
|
2845
|
+
this.wsClient = void 0;
|
|
2846
|
+
}
|
|
2847
|
+
if (this.httpClient && this.sessionId && this.sessionToken) {
|
|
2848
|
+
this.logger.debug({ sessionId: this.sessionId }, "Deleting session from backend");
|
|
2849
|
+
try {
|
|
2850
|
+
await this.closeBackendSession(this.sessionId, this.sessionToken);
|
|
2851
|
+
} catch (error) {
|
|
2852
|
+
this.logger.warn({ error, sessionId: this.sessionId }, "Failed to delete backend session");
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
this.eventListeners.clear();
|
|
2856
|
+
})();
|
|
2857
|
+
try {
|
|
2858
|
+
await this.closePromise;
|
|
2859
|
+
} finally {
|
|
2860
|
+
this.closePromise = void 0;
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
resolveDataTransport() {
|
|
2864
|
+
if (this.sessionConfig.dataTransport) {
|
|
2865
|
+
return this.sessionConfig.dataTransport;
|
|
2866
|
+
}
|
|
2867
|
+
return this.sessionConfig.clientToken ? "sessionApi" : "chromeApi";
|
|
2868
|
+
}
|
|
2869
|
+
validateTransportRequirements(dataTransport) {
|
|
2870
|
+
const platform = PlatformUtils.detectPlatform();
|
|
2871
|
+
if (dataTransport === "sessionApi" && !this.sessionConfig.clientToken) {
|
|
2872
|
+
throw new KeyringError(
|
|
2873
|
+
"MISSING_REQUIRED_FIELD" /* MISSING_REQUIRED_FIELD */,
|
|
2874
|
+
"clientToken is required when using sessionApi"
|
|
2875
|
+
);
|
|
2876
|
+
}
|
|
2877
|
+
if (dataTransport === "chromeApi" && !platform.isDesktop) {
|
|
2878
|
+
throw new KeyringError(
|
|
2879
|
+
"INVALID_CONFIG" /* INVALID_CONFIG */,
|
|
2880
|
+
"chromeApi is only supported on desktop. Use sessionApi with clientToken on mobile."
|
|
2881
|
+
);
|
|
2882
|
+
}
|
|
2883
|
+
}
|
|
2884
|
+
async startChromeApiFlow() {
|
|
2885
|
+
this.logger.debug("Starting chromeApi verification flow");
|
|
2886
|
+
this.flowType = "extension";
|
|
2887
|
+
const credentialData = await import_keyring_core_sdk2.ExtensionClient.launchCredentialGenerationWithChromeApi({
|
|
2888
|
+
...this.sessionConfig,
|
|
2889
|
+
dataTransport: "chromeApi"
|
|
2890
|
+
});
|
|
2891
|
+
this.complete(credentialData ?? null);
|
|
2892
|
+
}
|
|
2893
|
+
/**
|
|
2894
|
+
* Initialize mobile-specific resources (HTTP client, session, WebSocket)
|
|
2895
|
+
*/
|
|
2896
|
+
async initializeSession() {
|
|
2897
|
+
this.httpClient = new import_keyring_core_sdk2.HttpClient({
|
|
2898
|
+
baseUrl: Environment.getConfig().apiUrl,
|
|
2899
|
+
timeout: Environment.getConfig().timeout,
|
|
2900
|
+
headers: {
|
|
2901
|
+
Authorization: `Bearer ${this.sessionConfig.clientToken}`
|
|
2902
|
+
}
|
|
2903
|
+
});
|
|
2904
|
+
this.sessionResponse = await this.createSession(this.sessionConfig);
|
|
2905
|
+
this.logger = this.logger.child({
|
|
2906
|
+
sessionId: this.sessionResponse.session_id
|
|
2907
|
+
});
|
|
2908
|
+
this.logger.debug(
|
|
2909
|
+
{
|
|
2910
|
+
sessionId: this.sessionResponse.session_id,
|
|
2911
|
+
status: this.sessionResponse.status
|
|
2912
|
+
},
|
|
2913
|
+
"Client session created"
|
|
2914
|
+
);
|
|
2915
|
+
return this.sessionResponse;
|
|
2916
|
+
}
|
|
2917
|
+
async setupWebSocket() {
|
|
2918
|
+
if (!this.sessionResponse?.session_id) {
|
|
2919
|
+
throw new KeyringError(
|
|
2920
|
+
"SESSION_NOT_FOUND" /* SESSION_NOT_FOUND */,
|
|
2921
|
+
"Session not initialized for mobile flow"
|
|
2922
|
+
);
|
|
2923
|
+
}
|
|
2924
|
+
const wsCallbacks = {
|
|
2925
|
+
onConnectionChange: (connected) => {
|
|
2926
|
+
this.emit("connectionStatusChanged", connected);
|
|
2927
|
+
if (connected) {
|
|
2928
|
+
if (this.flowType === "mobile") {
|
|
2929
|
+
this.uiManager?.updateStatus("Connected to Keyring app", "connected");
|
|
2930
|
+
}
|
|
2931
|
+
if (this.stopPolling) {
|
|
2932
|
+
this.logger.debug("WebSocket reconnected, stopping polling");
|
|
2933
|
+
this.stopPolling();
|
|
2934
|
+
this.stopPolling = void 0;
|
|
2935
|
+
}
|
|
2936
|
+
} else {
|
|
2937
|
+
if (this.isWebsocketActive) {
|
|
2938
|
+
this.startPollingFallback();
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
},
|
|
2942
|
+
onStatusChange: (status, data) => {
|
|
2943
|
+
switch (status) {
|
|
2944
|
+
case "extension_connected":
|
|
2945
|
+
this.emit("extensionConnected", data);
|
|
2946
|
+
break;
|
|
2947
|
+
case "mobile_connected":
|
|
2948
|
+
this.emit("mobileConnected", data);
|
|
2949
|
+
if (this.flowType === "mobile") {
|
|
2950
|
+
this.uiManager?.updateStatus("Connected to mobile app", "connected");
|
|
2951
|
+
}
|
|
2952
|
+
break;
|
|
2953
|
+
case "processing_started":
|
|
2954
|
+
this.logger.debug(data, "Processing started");
|
|
2955
|
+
if (this.flowType === "mobile") {
|
|
2956
|
+
this.uiManager?.updateStatus("Processing verification...", "processing");
|
|
2957
|
+
}
|
|
2958
|
+
this.emit("processingStarted", data);
|
|
2959
|
+
break;
|
|
2960
|
+
case "processing_completed":
|
|
2961
|
+
this.logger.debug(data, "Processing completed");
|
|
2962
|
+
if (!data?.result?.credential_data) {
|
|
2963
|
+
if (this.flowType === "mobile") {
|
|
2964
|
+
this.uiManager?.updateStatus("Verification failed", "failed");
|
|
2965
|
+
}
|
|
2966
|
+
this.fail(new KeyringError("PROCESSING_FAILED" /* PROCESSING_FAILED */, "Processing failed"));
|
|
2967
|
+
return;
|
|
2968
|
+
}
|
|
2969
|
+
if (this.flowType === "mobile") {
|
|
2970
|
+
this.uiManager?.showCompleteModal(
|
|
2971
|
+
data.result.entity_type,
|
|
2972
|
+
data.result.datasourceObject
|
|
2973
|
+
);
|
|
2974
|
+
}
|
|
2975
|
+
this.emit("processingCompleted", data);
|
|
2976
|
+
this.complete(data.result.credential_data);
|
|
2977
|
+
break;
|
|
2978
|
+
case "session_expired":
|
|
2979
|
+
if (this.flowType === "mobile") {
|
|
2980
|
+
this.uiManager?.updateStatus("Session expired", "expired");
|
|
2981
|
+
}
|
|
2982
|
+
this.emit("sessionExpired", data);
|
|
2983
|
+
if (this.flowType === "mobile") {
|
|
2984
|
+
this.uiManager?.showTerminatedModal();
|
|
2985
|
+
}
|
|
2986
|
+
this.fail(
|
|
2987
|
+
new KeyringError(
|
|
2988
|
+
"SESSION_EXPIRED" /* SESSION_EXPIRED */,
|
|
2989
|
+
"Verification session has expired"
|
|
2990
|
+
)
|
|
2991
|
+
);
|
|
2992
|
+
break;
|
|
2993
|
+
default:
|
|
2994
|
+
break;
|
|
2995
|
+
}
|
|
2996
|
+
},
|
|
2997
|
+
onError: (data) => {
|
|
2998
|
+
this.logger.error(data, "WebSocket error");
|
|
2999
|
+
const sdkError = {
|
|
3000
|
+
code: data.code,
|
|
3001
|
+
message: data.message,
|
|
3002
|
+
details: data.details
|
|
3003
|
+
};
|
|
3004
|
+
this.emit("error", sdkError);
|
|
3005
|
+
if (this.flowType === "mobile") {
|
|
3006
|
+
this.uiManager?.updateStatus("Verification failed", "failed");
|
|
3007
|
+
}
|
|
3008
|
+
this.fail(KeyringError.fromUnknown(data.message, { sessionId: this.sessionId }));
|
|
3009
|
+
}
|
|
3010
|
+
};
|
|
3011
|
+
this.wsClient = new import_keyring_core_sdk2.WebSocketClient(
|
|
3012
|
+
this.sessionResponse.session_id,
|
|
3013
|
+
this.sessionResponse.session_token,
|
|
3014
|
+
Environment.getConfig().apiUrl,
|
|
3015
|
+
wsCallbacks
|
|
3016
|
+
);
|
|
3017
|
+
this.isWebsocketActive = true;
|
|
3018
|
+
await this.wsClient.connect();
|
|
3019
|
+
}
|
|
3020
|
+
async setupUI() {
|
|
3021
|
+
this.uiManager = new UIManager();
|
|
3022
|
+
this.uiManager.setCallbacks(
|
|
3023
|
+
// onCancel
|
|
3024
|
+
() => {
|
|
3025
|
+
this.fail(new KeyringError("USER_CANCELLED" /* USER_CANCELLED */, "User cancelled verification"));
|
|
3026
|
+
},
|
|
3027
|
+
// onExtensionSelected
|
|
3028
|
+
async () => {
|
|
3029
|
+
try {
|
|
3030
|
+
this.logger.debug("Extension selected");
|
|
3031
|
+
this.flowType = "extension";
|
|
3032
|
+
const sessionResponse = await this.initializeSession();
|
|
3033
|
+
await this.setupWebSocket();
|
|
3034
|
+
const updatedSessionConfig = {
|
|
3035
|
+
...this.sessionConfig,
|
|
3036
|
+
websocket: {
|
|
3037
|
+
session_id: sessionResponse.session_id,
|
|
3038
|
+
session_token: sessionResponse.session_token
|
|
3039
|
+
},
|
|
3040
|
+
dataTransport: "sessionApi"
|
|
3041
|
+
};
|
|
3042
|
+
await import_keyring_core_sdk2.ExtensionClient.launchCredentialGenerationWithSessionApi(updatedSessionConfig);
|
|
3043
|
+
} catch (error) {
|
|
3044
|
+
this.fail(
|
|
3045
|
+
new KeyringError(
|
|
3046
|
+
"PROCESSING_FAILED" /* PROCESSING_FAILED */,
|
|
3047
|
+
error.message ?? "Extension launch failed"
|
|
3048
|
+
)
|
|
3049
|
+
);
|
|
3050
|
+
}
|
|
3051
|
+
},
|
|
3052
|
+
// onMobileSelected
|
|
3053
|
+
async () => {
|
|
3054
|
+
try {
|
|
3055
|
+
this.logger.debug("Mobile selected");
|
|
3056
|
+
this.flowType = "mobile";
|
|
3057
|
+
await this.initializeSession();
|
|
3058
|
+
await this.setupWebSocket();
|
|
3059
|
+
this.showQR();
|
|
3060
|
+
} catch (error) {
|
|
3061
|
+
this.logger.error({ error }, "Failed to initialize mobile flow");
|
|
3062
|
+
this.fail(
|
|
3063
|
+
new KeyringError(
|
|
3064
|
+
"SESSION_CREATION_FAILED" /* SESSION_CREATION_FAILED */,
|
|
3065
|
+
error.message ?? "Failed to initialize mobile flow"
|
|
3066
|
+
)
|
|
3067
|
+
);
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
);
|
|
3071
|
+
const platform = PlatformUtils.detectPlatform();
|
|
3072
|
+
if (platform.isDesktop) {
|
|
3073
|
+
this.uiManager.showSelectionModal();
|
|
3074
|
+
} else {
|
|
3075
|
+
await this.initializeSession();
|
|
3076
|
+
await this.setupWebSocket();
|
|
3077
|
+
this.showMobileModal();
|
|
3078
|
+
}
|
|
3079
|
+
}
|
|
3080
|
+
showQR() {
|
|
3081
|
+
if (!this.uiManager || !this.sessionResponse) return;
|
|
3082
|
+
this.uiManager.showQRModal(
|
|
3083
|
+
this.sessionResponse.qr_code_data,
|
|
3084
|
+
this.sessionResponse.session_id,
|
|
3085
|
+
this.sessionResponse.expires_at
|
|
3086
|
+
);
|
|
3087
|
+
}
|
|
3088
|
+
showMobileModal() {
|
|
3089
|
+
if (!this.uiManager || !this.sessionResponse) return;
|
|
3090
|
+
this.uiManager.showMobileModal(
|
|
3091
|
+
this.sessionResponse.qr_code_data,
|
|
3092
|
+
this.sessionResponse.expires_at
|
|
3093
|
+
);
|
|
3094
|
+
}
|
|
3095
|
+
/**
|
|
3096
|
+
* Start HTTP polling as fallback when WebSocket is disconnected
|
|
3097
|
+
*/
|
|
3098
|
+
startPollingFallback() {
|
|
3099
|
+
if (!this.httpClient || !this.sessionResponse?.session_id) {
|
|
3100
|
+
this.logger.warn("Cannot start polling: httpClient or sessionId not available");
|
|
3101
|
+
return;
|
|
3102
|
+
}
|
|
3103
|
+
if (this.stopPolling) {
|
|
3104
|
+
return;
|
|
3105
|
+
}
|
|
3106
|
+
this.logger.info("Starting HTTP polling fallback");
|
|
3107
|
+
this.uiManager?.updateStatus("Connection lost, checking status...", "processing");
|
|
3108
|
+
let isPolling = true;
|
|
3109
|
+
let timeoutId = null;
|
|
3110
|
+
const poll = async () => {
|
|
3111
|
+
if (!isPolling || !this.sessionResponse || !this.httpClient) {
|
|
3112
|
+
return;
|
|
3113
|
+
}
|
|
3114
|
+
try {
|
|
3115
|
+
const session = await this.getSession(
|
|
3116
|
+
this.sessionResponse.session_id,
|
|
3117
|
+
this.sessionResponse.session_token
|
|
3118
|
+
);
|
|
3119
|
+
if (!session) {
|
|
3120
|
+
isPolling = false;
|
|
3121
|
+
this.fail(
|
|
3122
|
+
new KeyringError("SESSION_NOT_FOUND" /* SESSION_NOT_FOUND */, "Session not found or expired")
|
|
3123
|
+
);
|
|
3124
|
+
return;
|
|
3125
|
+
}
|
|
3126
|
+
this.handlePollingUpdate(session);
|
|
3127
|
+
} catch (error) {
|
|
3128
|
+
this.logger.error({ error }, "Polling error");
|
|
3129
|
+
}
|
|
3130
|
+
if (isPolling) {
|
|
3131
|
+
timeoutId = setTimeout(poll, 2e3);
|
|
3132
|
+
}
|
|
3133
|
+
};
|
|
3134
|
+
poll();
|
|
3135
|
+
this.stopPolling = () => {
|
|
3136
|
+
isPolling = false;
|
|
3137
|
+
if (timeoutId) {
|
|
3138
|
+
clearTimeout(timeoutId);
|
|
3139
|
+
}
|
|
3140
|
+
};
|
|
3141
|
+
}
|
|
3142
|
+
async createSession(sessionConfig) {
|
|
3143
|
+
if (!this.httpClient) {
|
|
3144
|
+
throw new KeyringError("NETWORK_ERROR" /* NETWORK_ERROR */, "HTTP client not initialized");
|
|
3145
|
+
}
|
|
3146
|
+
return this.httpClient.post("/api/v1/connect/sessions/create", {
|
|
3147
|
+
config: sessionConfig,
|
|
3148
|
+
origin_url: PlatformUtils.isBrowser() ? window.location.href : "server"
|
|
3149
|
+
});
|
|
3150
|
+
}
|
|
3151
|
+
async closeBackendSession(sessionId, sessionToken) {
|
|
3152
|
+
if (!this.httpClient) {
|
|
3153
|
+
return;
|
|
3154
|
+
}
|
|
3155
|
+
await this.httpClient.delete(`/api/v1/connect/sessions/${sessionId}`, {
|
|
3156
|
+
headers: {
|
|
3157
|
+
"X-SESSION-TOKEN": sessionToken
|
|
3158
|
+
}
|
|
3159
|
+
});
|
|
3160
|
+
}
|
|
3161
|
+
async getSession(sessionId, sessionToken) {
|
|
3162
|
+
if (!this.httpClient) {
|
|
3163
|
+
return null;
|
|
3164
|
+
}
|
|
3165
|
+
try {
|
|
3166
|
+
const session = await this.httpClient.get(
|
|
3167
|
+
`/api/v1/connect/sessions/${sessionId}`,
|
|
3168
|
+
{
|
|
3169
|
+
headers: {
|
|
3170
|
+
"x-session-token": sessionToken
|
|
3171
|
+
}
|
|
3172
|
+
}
|
|
3173
|
+
);
|
|
3174
|
+
return session || null;
|
|
3175
|
+
} catch (error) {
|
|
3176
|
+
if (error instanceof import_keyring_core_sdk2.KeyringError && (error.code === "NOT_FOUND" || error.code === "AUTHENTICATION_FAILED")) {
|
|
3177
|
+
return null;
|
|
3178
|
+
}
|
|
3179
|
+
throw error;
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3182
|
+
/**
|
|
3183
|
+
* Handle session updates from HTTP polling
|
|
3184
|
+
*/
|
|
3185
|
+
handlePollingUpdate(session) {
|
|
3186
|
+
if (!this.isWebsocketActive) {
|
|
3187
|
+
return;
|
|
3188
|
+
}
|
|
3189
|
+
this.logger.debug(
|
|
3190
|
+
{ status: session.status, hasResult: !!session.result },
|
|
3191
|
+
"Received polling update"
|
|
3192
|
+
);
|
|
3193
|
+
switch (session.status) {
|
|
3194
|
+
case "processing_completed":
|
|
3195
|
+
this.logger.debug("Session completed via polling");
|
|
3196
|
+
const result = session.result;
|
|
3197
|
+
const hasRequiredData = result?.credential_data && result?.entity_type && result?.datasourceObject;
|
|
3198
|
+
if (hasRequiredData) {
|
|
3199
|
+
if (this.flowType === "mobile") {
|
|
3200
|
+
this.uiManager?.showCompleteModal(result.entity_type, result.datasourceObject);
|
|
3201
|
+
}
|
|
3202
|
+
this.emit("processingCompleted", {
|
|
3203
|
+
result: {
|
|
3204
|
+
credential_data: result.credential_data,
|
|
3205
|
+
entity_type: result.entity_type,
|
|
3206
|
+
datasourceObject: result.datasourceObject
|
|
3207
|
+
},
|
|
3208
|
+
status: "success"
|
|
3209
|
+
});
|
|
3210
|
+
this.complete(result.credential_data);
|
|
3211
|
+
} else {
|
|
3212
|
+
if (this.flowType === "mobile") {
|
|
3213
|
+
this.uiManager?.updateStatus("Verification failed", "failed");
|
|
3214
|
+
}
|
|
3215
|
+
this.fail(
|
|
3216
|
+
new KeyringError("PROCESSING_FAILED" /* PROCESSING_FAILED */, "No credential data in result")
|
|
3217
|
+
);
|
|
3218
|
+
}
|
|
3219
|
+
break;
|
|
3220
|
+
case "processing_failed":
|
|
3221
|
+
this.logger.debug("Session failed via polling");
|
|
3222
|
+
if (this.flowType === "mobile") {
|
|
3223
|
+
this.uiManager?.updateStatus("Verification failed", "failed");
|
|
3224
|
+
}
|
|
3225
|
+
this.fail(
|
|
3226
|
+
new KeyringError(
|
|
3227
|
+
"PROCESSING_FAILED" /* PROCESSING_FAILED */,
|
|
3228
|
+
session.error || "Verification failed"
|
|
3229
|
+
)
|
|
3230
|
+
);
|
|
3231
|
+
break;
|
|
3232
|
+
case "session_expired":
|
|
3233
|
+
this.logger.debug("Session expired via polling");
|
|
3234
|
+
if (this.flowType === "mobile") {
|
|
3235
|
+
this.uiManager?.showTerminatedModal();
|
|
3236
|
+
}
|
|
3237
|
+
this.fail(
|
|
3238
|
+
new KeyringError("SESSION_EXPIRED" /* SESSION_EXPIRED */, "Verification session has expired")
|
|
3239
|
+
);
|
|
3240
|
+
break;
|
|
3241
|
+
case "processing_started":
|
|
3242
|
+
if (this.flowType === "mobile") {
|
|
3243
|
+
this.uiManager?.updateStatus("Processing verification...", "processing");
|
|
3244
|
+
}
|
|
3245
|
+
break;
|
|
3246
|
+
case "mobile_connected":
|
|
3247
|
+
if (this.flowType === "mobile") {
|
|
3248
|
+
this.uiManager?.updateStatus("Mobile app connected...", "connected");
|
|
3249
|
+
}
|
|
3250
|
+
break;
|
|
3251
|
+
case "session_created":
|
|
3252
|
+
if (this.flowType === "mobile") {
|
|
3253
|
+
this.uiManager?.updateStatus("Waiting for mobile app...", "connected");
|
|
3254
|
+
}
|
|
3255
|
+
break;
|
|
3256
|
+
}
|
|
3257
|
+
}
|
|
3258
|
+
emit(eventType, data) {
|
|
3259
|
+
const listeners = this.eventListeners.get(eventType);
|
|
3260
|
+
if (listeners) {
|
|
3261
|
+
listeners.forEach((listener) => {
|
|
3262
|
+
try {
|
|
3263
|
+
listener(data);
|
|
3264
|
+
} catch (error) {
|
|
3265
|
+
this.logger.error(error, `Error in event listener for ${eventType}`);
|
|
3266
|
+
}
|
|
3267
|
+
});
|
|
3268
|
+
}
|
|
3269
|
+
}
|
|
3270
|
+
};
|
|
3271
|
+
|
|
3272
|
+
// src/types/extension.ts
|
|
3273
|
+
var import_keyring_core_sdk3 = require("@keyringnetwork/keyring-core-sdk");
|
|
3274
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3275
|
+
0 && (module.exports = {
|
|
3276
|
+
EVENT_ACTIONS,
|
|
3277
|
+
VerificationSession,
|
|
3278
|
+
...require("@keyringnetwork/contracts-abi")
|
|
3279
|
+
});
|