@lukso/up-connector 0.4.0-dev.a8c9315
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +280 -0
- package/dist/account-modal.cjs +9 -0
- package/dist/account-modal.cjs.map +1 -0
- package/dist/account-modal.d.cts +16 -0
- package/dist/account-modal.d.ts +16 -0
- package/dist/account-modal.js +9 -0
- package/dist/account-modal.js.map +1 -0
- package/dist/auto-setup.cjs +17 -0
- package/dist/auto-setup.cjs.map +1 -0
- package/dist/auto-setup.d.cts +123 -0
- package/dist/auto-setup.d.ts +123 -0
- package/dist/auto-setup.js +17 -0
- package/dist/auto-setup.js.map +1 -0
- package/dist/avatar-CmUCtW_w.d.cts +205 -0
- package/dist/avatar-CmUCtW_w.d.ts +205 -0
- package/dist/avatar.cjs +12 -0
- package/dist/avatar.cjs.map +1 -0
- package/dist/avatar.d.cts +1 -0
- package/dist/avatar.d.ts +1 -0
- package/dist/avatar.js +12 -0
- package/dist/avatar.js.map +1 -0
- package/dist/backup-modal.cjs +9 -0
- package/dist/backup-modal.cjs.map +1 -0
- package/dist/backup-modal.d.cts +41 -0
- package/dist/backup-modal.d.ts +41 -0
- package/dist/backup-modal.js +9 -0
- package/dist/backup-modal.js.map +1 -0
- package/dist/chunk-3SGSPHOZ.js +595 -0
- package/dist/chunk-3SGSPHOZ.js.map +1 -0
- package/dist/chunk-6AYZOIFY.js +181 -0
- package/dist/chunk-6AYZOIFY.js.map +1 -0
- package/dist/chunk-6N35TCFT.js +852 -0
- package/dist/chunk-6N35TCFT.js.map +1 -0
- package/dist/chunk-7ETKG6KR.cjs +387 -0
- package/dist/chunk-7ETKG6KR.cjs.map +1 -0
- package/dist/chunk-EUXUH3YW.js +15 -0
- package/dist/chunk-EUXUH3YW.js.map +1 -0
- package/dist/chunk-GFVUWAG4.cjs +158 -0
- package/dist/chunk-GFVUWAG4.cjs.map +1 -0
- package/dist/chunk-IAKQFHFD.cjs +595 -0
- package/dist/chunk-IAKQFHFD.cjs.map +1 -0
- package/dist/chunk-MH7MP7XK.cjs +181 -0
- package/dist/chunk-MH7MP7XK.cjs.map +1 -0
- package/dist/chunk-NWCNJSG3.js +387 -0
- package/dist/chunk-NWCNJSG3.js.map +1 -0
- package/dist/chunk-NXU2DQAV.js +1128 -0
- package/dist/chunk-NXU2DQAV.js.map +1 -0
- package/dist/chunk-ORJK2YGG.cjs +852 -0
- package/dist/chunk-ORJK2YGG.cjs.map +1 -0
- package/dist/chunk-RFA6SEIS.cjs +1128 -0
- package/dist/chunk-RFA6SEIS.cjs.map +1 -0
- package/dist/chunk-XGIT7YUY.js +31 -0
- package/dist/chunk-XGIT7YUY.js.map +1 -0
- package/dist/chunk-XOKG3KIL.cjs +31 -0
- package/dist/chunk-XOKG3KIL.cjs.map +1 -0
- package/dist/chunk-YIWSPI4I.js +158 -0
- package/dist/chunk-YIWSPI4I.js.map +1 -0
- package/dist/chunk-ZBDE64SD.cjs +15 -0
- package/dist/chunk-ZBDE64SD.cjs.map +1 -0
- package/dist/connect-modal/index.cjs +20 -0
- package/dist/connect-modal/index.cjs.map +1 -0
- package/dist/connect-modal/index.d.cts +9 -0
- package/dist/connect-modal/index.d.ts +9 -0
- package/dist/connect-modal/index.js +20 -0
- package/dist/connect-modal/index.js.map +1 -0
- package/dist/index-D2orHGFi.d.cts +8 -0
- package/dist/index-D2orHGFi.d.ts +8 -0
- package/dist/index.cjs +793 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +189 -0
- package/dist/index.d.ts +189 -0
- package/dist/index.js +793 -0
- package/dist/index.js.map +1 -0
- package/dist/restore-modal.cjs +9 -0
- package/dist/restore-modal.cjs.map +1 -0
- package/dist/restore-modal.d.cts +68 -0
- package/dist/restore-modal.d.ts +68 -0
- package/dist/restore-modal.js +9 -0
- package/dist/restore-modal.js.map +1 -0
- package/dist/wagmi-CVuDs_0h.d.cts +386 -0
- package/dist/wagmi-CVuDs_0h.d.ts +386 -0
- package/package.json +158 -0
- package/src/account-modal.ts +142 -0
- package/src/auto-setup.ts +362 -0
- package/src/avatar.ts +1135 -0
- package/src/backup-modal.ts +439 -0
- package/src/connect-modal/components/connection-view.ts +398 -0
- package/src/connect-modal/components/eoa-connection-view.ts +408 -0
- package/src/connect-modal/components/qr-code-view.ts +71 -0
- package/src/connect-modal/connect-modal.base.ts +18 -0
- package/src/connect-modal/connect-modal.config.ts +27 -0
- package/src/connect-modal/connect-modal.templates.ts +21 -0
- package/src/connect-modal/connect-modal.ts +270 -0
- package/src/connect-modal/connect-modal.types.ts +104 -0
- package/src/connect-modal/images/up-cube-glass.png +0 -0
- package/src/connect-modal/index.ts +23 -0
- package/src/connect-modal/services/wagmi.ts +266 -0
- package/src/connect-modal/styles/styles.css +1 -0
- package/src/connect-modal/utils/walletConnectDeepLinkUrl.ts +43 -0
- package/src/connector.ts +544 -0
- package/src/index.ts +62 -0
- package/src/popup-instance.ts +537 -0
- package/src/restore-modal.ts +702 -0
- package/src/styles/index.ts +28 -0
- package/src/styles/styles.css +1 -0
- package/src/types/css-raw.d.ts +4 -0
- package/src/types/images.d.ts +4 -0
- package/src/types.ts +168 -0
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connection View - Lit Component
|
|
3
|
+
*
|
|
4
|
+
* Main connection view displaying primary Lukso connectors and option to show EOA connectors.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { withDeviceService, withIntlService } from '@lukso/core/mixins'
|
|
8
|
+
import { html, type TemplateResult } from 'lit'
|
|
9
|
+
import { property } from 'lit/decorators.js'
|
|
10
|
+
|
|
11
|
+
import { ConnectModalBase } from '../connect-modal.base'
|
|
12
|
+
import {
|
|
13
|
+
renderCloseButton,
|
|
14
|
+
renderLogo,
|
|
15
|
+
renderTitle,
|
|
16
|
+
} from '../connect-modal.templates'
|
|
17
|
+
import type { WalletConnector } from '../connect-modal.types'
|
|
18
|
+
import '@lukso/web-components/dist/components/lukso-button'
|
|
19
|
+
import '@lukso/web-components/dist/components/lukso-icon'
|
|
20
|
+
import { type BrowserInfo, browserInfo } from '@lukso/core/utils'
|
|
21
|
+
import { cn } from '@lukso/web-components/tools'
|
|
22
|
+
import debug from 'debug'
|
|
23
|
+
import { walletConnectDeepLinkUrl } from '../utils/walletConnectDeepLinkUrl'
|
|
24
|
+
|
|
25
|
+
const logInfo = debug('connect-modal:info')
|
|
26
|
+
|
|
27
|
+
export class ConnectionView extends withIntlService(
|
|
28
|
+
withDeviceService(ConnectModalBase)
|
|
29
|
+
) {
|
|
30
|
+
@property({ type: Boolean }) isConnecting = false
|
|
31
|
+
@property({ type: String }) connectingRdns: string | undefined = undefined
|
|
32
|
+
@property({ type: Array }) connectors: WalletConnector[] = []
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Get WalletConnect connector
|
|
36
|
+
*/
|
|
37
|
+
private get walletConnectConnector(): WalletConnector | undefined {
|
|
38
|
+
return this.connectors.find((connector) => connector.type === 'mobile')
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Universal Profile browser extension connector
|
|
43
|
+
*/
|
|
44
|
+
private get upExtensionConnector(): WalletConnector | undefined {
|
|
45
|
+
return this.connectors.find((connector) => connector.type === 'extension')
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Passkey / Embedded wallet connector
|
|
50
|
+
*/
|
|
51
|
+
private get embeddedWalletConnector(): WalletConnector | undefined {
|
|
52
|
+
return this.connectors.find((connector) => connector.type === 'embedded')
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get browser extension store info
|
|
57
|
+
*/
|
|
58
|
+
private get extensionStore(): BrowserInfo {
|
|
59
|
+
const info = browserInfo(this.device)
|
|
60
|
+
return info
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Check if browser supports extension installation
|
|
65
|
+
*/
|
|
66
|
+
private get browserSupportExtension(): boolean {
|
|
67
|
+
return this.extensionStore.storeLink !== ''
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Handle connect via embedded wallet
|
|
72
|
+
*/
|
|
73
|
+
private handleConnectEmbedded = async (): Promise<void> => {
|
|
74
|
+
const connector = this.embeddedWalletConnector
|
|
75
|
+
|
|
76
|
+
try {
|
|
77
|
+
logInfo('Connecting via connector:', connector)
|
|
78
|
+
await connector?.connect()
|
|
79
|
+
|
|
80
|
+
// Dispatch connect event
|
|
81
|
+
this.dispatchEvent(
|
|
82
|
+
new CustomEvent('on-connect', {
|
|
83
|
+
detail: { connector },
|
|
84
|
+
bubbles: true,
|
|
85
|
+
composed: true,
|
|
86
|
+
})
|
|
87
|
+
)
|
|
88
|
+
} catch (error) {
|
|
89
|
+
// Dispatch error event
|
|
90
|
+
this.dispatchEvent(
|
|
91
|
+
new CustomEvent('on-error', {
|
|
92
|
+
detail: { error },
|
|
93
|
+
bubbles: true,
|
|
94
|
+
composed: true,
|
|
95
|
+
})
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Handle connect via UP Extension
|
|
102
|
+
*/
|
|
103
|
+
private handleConnectExtension = async (): Promise<void> => {
|
|
104
|
+
const connector = this.upExtensionConnector
|
|
105
|
+
|
|
106
|
+
// TBA: Check if not supported browser
|
|
107
|
+
|
|
108
|
+
// TBA: Extension is not installed then link to store
|
|
109
|
+
|
|
110
|
+
// TBA: Switch extension to current chain
|
|
111
|
+
if (connector) {
|
|
112
|
+
try {
|
|
113
|
+
logInfo('Connecting via connector:', connector)
|
|
114
|
+
this.isConnecting = true
|
|
115
|
+
this.connectingRdns = connector.rdns
|
|
116
|
+
|
|
117
|
+
await connector.connect()
|
|
118
|
+
|
|
119
|
+
// Dispatch connect event
|
|
120
|
+
this.dispatchEvent(
|
|
121
|
+
new CustomEvent('on-connect', {
|
|
122
|
+
detail: { connector },
|
|
123
|
+
bubbles: true,
|
|
124
|
+
composed: true,
|
|
125
|
+
})
|
|
126
|
+
)
|
|
127
|
+
} catch (error) {
|
|
128
|
+
// Dispatch error event
|
|
129
|
+
this.dispatchEvent(
|
|
130
|
+
new CustomEvent('on-error', {
|
|
131
|
+
detail: { error },
|
|
132
|
+
bubbles: true,
|
|
133
|
+
composed: true,
|
|
134
|
+
})
|
|
135
|
+
)
|
|
136
|
+
} finally {
|
|
137
|
+
this.isConnecting = false
|
|
138
|
+
this.connectingRdns = undefined
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Handle connect via UP Mobile (WalletConnect)
|
|
145
|
+
*/
|
|
146
|
+
private handleConnectMobile = async (): Promise<void> => {
|
|
147
|
+
const connector = this.walletConnectConnector
|
|
148
|
+
|
|
149
|
+
if (connector) {
|
|
150
|
+
try {
|
|
151
|
+
logInfo('Connecting via connector:', connector)
|
|
152
|
+
this.isConnecting = true
|
|
153
|
+
this.connectingRdns = connector.rdns
|
|
154
|
+
|
|
155
|
+
// Start the connection - this initiates the WalletConnect flow
|
|
156
|
+
// The promise will resolve when wallet approves or reject when user rejects
|
|
157
|
+
const connectPromise = connector.connect()
|
|
158
|
+
|
|
159
|
+
// Get the provider to listen for the display_uri event
|
|
160
|
+
const provider = await connector.getProvider?.()
|
|
161
|
+
|
|
162
|
+
// Listen for the display_uri event which is emitted after connect
|
|
163
|
+
if (provider) {
|
|
164
|
+
const handleDisplayUri = (displayUri: string) => {
|
|
165
|
+
logInfo('WalletConnect original URI:', displayUri)
|
|
166
|
+
|
|
167
|
+
const deepLink = walletConnectDeepLinkUrl(displayUri)
|
|
168
|
+
|
|
169
|
+
logInfo('Mobile App Deep Link:', deepLink)
|
|
170
|
+
|
|
171
|
+
if (this.device.isMobile) {
|
|
172
|
+
window.open(deepLink, '_blank')
|
|
173
|
+
} else {
|
|
174
|
+
this.handleShowQrCode(deepLink)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Clean up listener
|
|
178
|
+
provider.off('display_uri', handleDisplayUri)
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
provider.on('display_uri', handleDisplayUri)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Wait for the connection to complete
|
|
185
|
+
// This will throw if the user rejects the connection
|
|
186
|
+
await connectPromise
|
|
187
|
+
|
|
188
|
+
// Dispatch connect event only if connection succeeded
|
|
189
|
+
this.dispatchEvent(
|
|
190
|
+
new CustomEvent('on-connect', {
|
|
191
|
+
detail: { connector },
|
|
192
|
+
bubbles: true,
|
|
193
|
+
composed: true,
|
|
194
|
+
})
|
|
195
|
+
)
|
|
196
|
+
} catch (error) {
|
|
197
|
+
// Dispatch error event
|
|
198
|
+
this.dispatchEvent(
|
|
199
|
+
new CustomEvent('on-error', {
|
|
200
|
+
detail: { error },
|
|
201
|
+
bubbles: true,
|
|
202
|
+
composed: true,
|
|
203
|
+
})
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
// Reset to connection view if on QR code view
|
|
207
|
+
this.dispatchEvent(
|
|
208
|
+
new CustomEvent('on-back', { bubbles: true, composed: true })
|
|
209
|
+
)
|
|
210
|
+
} finally {
|
|
211
|
+
this.isConnecting = false
|
|
212
|
+
this.connectingRdns = undefined
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Close modal
|
|
219
|
+
*/
|
|
220
|
+
private handleClose(): void {
|
|
221
|
+
this.dispatchEvent(
|
|
222
|
+
new CustomEvent('on-close', { bubbles: true, composed: true })
|
|
223
|
+
)
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Handle showing EOA connections
|
|
228
|
+
*/
|
|
229
|
+
private handleShowEoaConnections(): void {
|
|
230
|
+
this.dispatchEvent(
|
|
231
|
+
new CustomEvent('on-show-eoa-connections-view', {
|
|
232
|
+
bubbles: true,
|
|
233
|
+
composed: true,
|
|
234
|
+
})
|
|
235
|
+
)
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Handle showing QR code
|
|
240
|
+
*/
|
|
241
|
+
private handleShowQrCode(data: string): void {
|
|
242
|
+
this.dispatchEvent(
|
|
243
|
+
new CustomEvent('on-show-qr-code', {
|
|
244
|
+
detail: { data },
|
|
245
|
+
bubbles: true,
|
|
246
|
+
composed: true,
|
|
247
|
+
})
|
|
248
|
+
)
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Render connector button
|
|
253
|
+
*
|
|
254
|
+
* @param iconName
|
|
255
|
+
* @param label
|
|
256
|
+
* @param onClick
|
|
257
|
+
* @param isLoading
|
|
258
|
+
* @param isDisabled
|
|
259
|
+
*/
|
|
260
|
+
private renderConnectorButton(
|
|
261
|
+
iconName: string,
|
|
262
|
+
label: string,
|
|
263
|
+
onClick: () => void,
|
|
264
|
+
isLoading?: boolean,
|
|
265
|
+
isDisabled?: boolean
|
|
266
|
+
): TemplateResult<1> {
|
|
267
|
+
return html`
|
|
268
|
+
<lukso-button
|
|
269
|
+
variant="secondary"
|
|
270
|
+
size=${this.device?.isMobile ? 'medium' : 'large'}
|
|
271
|
+
is-full-width
|
|
272
|
+
?disabled=${isDisabled}
|
|
273
|
+
?is-loading=${isLoading}
|
|
274
|
+
loading-text=${label}
|
|
275
|
+
@click=${onClick}
|
|
276
|
+
>
|
|
277
|
+
<lukso-icon
|
|
278
|
+
name=${iconName}
|
|
279
|
+
size=${this.device?.isMobile ? 'small' : 'medium'}
|
|
280
|
+
class="mr-2"
|
|
281
|
+
secondary-color="neutral-100"
|
|
282
|
+
></lukso-icon>
|
|
283
|
+
${label}
|
|
284
|
+
</lukso-button>
|
|
285
|
+
`
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
private renderConnectors(): TemplateResult<1>[] {
|
|
289
|
+
const templates: TemplateResult<1>[] = []
|
|
290
|
+
|
|
291
|
+
// Passkey / Embedded wallet
|
|
292
|
+
if (this.embeddedWalletConnector) {
|
|
293
|
+
templates.push(
|
|
294
|
+
this.renderConnectorButton(
|
|
295
|
+
'key-outline',
|
|
296
|
+
this.formatMessage('connect_modal_connectors_passkey_wallet'),
|
|
297
|
+
this.handleConnectEmbedded,
|
|
298
|
+
false,
|
|
299
|
+
this.isConnecting
|
|
300
|
+
)
|
|
301
|
+
)
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// UP Extension
|
|
305
|
+
|
|
306
|
+
templates.push(
|
|
307
|
+
this.renderConnectorButton(
|
|
308
|
+
this.extensionStore.icon,
|
|
309
|
+
this.formatMessage('connect_modal_connectors_up_browser_extension'),
|
|
310
|
+
this.handleConnectExtension,
|
|
311
|
+
this.isConnecting &&
|
|
312
|
+
this.connectingRdns === this.upExtensionConnector?.rdns,
|
|
313
|
+
this.isConnecting ||
|
|
314
|
+
this.device.isMobile ||
|
|
315
|
+
!this.browserSupportExtension
|
|
316
|
+
)
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
// UP mobile (WalletConnect)
|
|
320
|
+
if (this.walletConnectConnector) {
|
|
321
|
+
templates.push(
|
|
322
|
+
this.renderConnectorButton(
|
|
323
|
+
'phone-portrait-outline',
|
|
324
|
+
this.formatMessage('connect_modal_connectors_up_mobile'),
|
|
325
|
+
this.handleConnectMobile,
|
|
326
|
+
this.isConnecting &&
|
|
327
|
+
this.connectingRdns === this.walletConnectConnector.rdns,
|
|
328
|
+
this.isConnecting
|
|
329
|
+
)
|
|
330
|
+
)
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
return templates
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Render divider with text
|
|
338
|
+
*/
|
|
339
|
+
private renderDivider(): TemplateResult<1> {
|
|
340
|
+
return html`
|
|
341
|
+
<div class="relative w-full my-2">
|
|
342
|
+
<div class="paragraph-inter-12-regular relative z-[1] bg-neutral-98 dark:bg-neutral-15 px-4 text-neutral-40 inline-block">
|
|
343
|
+
${this.formatMessage('connect_modal_or')}
|
|
344
|
+
</div>
|
|
345
|
+
<div class="absolute top-[13px] left-0 right-0 h-px bg-neutral-80 dark:bg-neutral-70" />
|
|
346
|
+
</div>
|
|
347
|
+
<div class="paragraph-inter-16-regular py-4">
|
|
348
|
+
${this.formatMessage('connect_modal_or_info')}
|
|
349
|
+
</div>
|
|
350
|
+
`
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
render(): TemplateResult<1> {
|
|
354
|
+
return html`
|
|
355
|
+
<div class="flex justify-end">
|
|
356
|
+
<button
|
|
357
|
+
@click=${this.handleClose}
|
|
358
|
+
>
|
|
359
|
+
${renderCloseButton()}
|
|
360
|
+
</button>
|
|
361
|
+
</div>
|
|
362
|
+
<div class="flex flex-col items-center text-center">
|
|
363
|
+
${renderLogo()}
|
|
364
|
+
${renderTitle(this.formatMessage('connect_modal_title'))}
|
|
365
|
+
<p class="mb-6 paragraph-inter-16-regular">
|
|
366
|
+
${this.formatMessage('connect_modal_description')}
|
|
367
|
+
</p>
|
|
368
|
+
<div class="${cn('flex w-full gap-2 mb-4', this.device?.isMobile ? 'flex-col-reverse' : 'flex-col')}">
|
|
369
|
+
${this.renderConnectors()}
|
|
370
|
+
</div>
|
|
371
|
+
${this.renderDivider()}
|
|
372
|
+
<lukso-button
|
|
373
|
+
variant="secondary"
|
|
374
|
+
size=${this.device?.isMobile ? 'medium' : 'large'}
|
|
375
|
+
is-full-width
|
|
376
|
+
?disabled=${this.isConnecting}
|
|
377
|
+
@click=${this.handleShowEoaConnections}
|
|
378
|
+
>
|
|
379
|
+
<lukso-icon
|
|
380
|
+
name="wallet-outline"
|
|
381
|
+
size=${this.device?.isMobile ? 'small' : 'medium'}
|
|
382
|
+
class="mr-2"
|
|
383
|
+
></lukso-icon>
|
|
384
|
+
${this.formatMessage('connect_modal_other_connectors')}
|
|
385
|
+
</lukso-button>
|
|
386
|
+
</div>
|
|
387
|
+
`
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// Register custom element
|
|
392
|
+
customElements.define('connection-view', ConnectionView as any)
|
|
393
|
+
|
|
394
|
+
declare global {
|
|
395
|
+
interface HTMLElementTagNameMap {
|
|
396
|
+
'connection-view': ConnectionView
|
|
397
|
+
}
|
|
398
|
+
}
|