@1001-digital/components 1.1.1 → 1.1.2
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/package.json
CHANGED
|
@@ -67,7 +67,7 @@ watch(
|
|
|
67
67
|
const incoming = val.trim().split(/\s+/)
|
|
68
68
|
if (incoming.length === 12) {
|
|
69
69
|
for (let i = 0; i < 12; i++) {
|
|
70
|
-
words.value[i] = incoming[i]
|
|
70
|
+
words.value[i] = incoming[i]!
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
},
|
|
@@ -119,7 +119,7 @@ function onPaste(event: ClipboardEvent, index: number) {
|
|
|
119
119
|
if (pasted.length > 1) {
|
|
120
120
|
event.preventDefault()
|
|
121
121
|
for (let i = 0; i < pasted.length && index + i < 12; i++) {
|
|
122
|
-
words.value[index + i] = pasted[i]
|
|
122
|
+
words.value[index + i] = pasted[i]!.toLowerCase()
|
|
123
123
|
}
|
|
124
124
|
const nextIndex = Math.min(index + pasted.length, 11)
|
|
125
125
|
focusInput(nextIndex)
|
|
@@ -129,12 +129,12 @@ function onPaste(event: ClipboardEvent, index: number) {
|
|
|
129
129
|
function onInput(index: number) {
|
|
130
130
|
// Auto-advance if the word contains a space (mobile autocomplete)
|
|
131
131
|
const val = words.value[index]
|
|
132
|
-
if (val
|
|
132
|
+
if (val?.includes(' ')) {
|
|
133
133
|
const parts = val.trim().split(/\s+/)
|
|
134
|
-
words.value[index] = parts[0]
|
|
134
|
+
words.value[index] = parts[0]!
|
|
135
135
|
if (parts.length > 1 && index < 11) {
|
|
136
136
|
for (let i = 1; i < parts.length && index + i < 12; i++) {
|
|
137
|
-
words.value[index + i] = parts[i]
|
|
137
|
+
words.value[index + i] = parts[i]!
|
|
138
138
|
}
|
|
139
139
|
focusInput(Math.min(index + parts.length, 11))
|
|
140
140
|
}
|
|
@@ -1,52 +1,54 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<slot :current-chain="currentChain">
|
|
7
|
-
{{ currentChain?.name || 'Unknown Network' }}
|
|
8
|
-
</slot>
|
|
9
|
-
</Button>
|
|
10
|
-
|
|
11
|
-
<Dialog
|
|
12
|
-
title="Switch Network"
|
|
13
|
-
v-model:open="dialogOpen"
|
|
14
|
-
@closed="onClosed"
|
|
15
|
-
compat
|
|
16
|
-
>
|
|
17
|
-
<Alert
|
|
18
|
-
v-if="errorMessage"
|
|
19
|
-
type="error"
|
|
2
|
+
<template v-if="chains.length > 1">
|
|
3
|
+
<Button
|
|
4
|
+
@click="dialogOpen = true"
|
|
5
|
+
:class="className"
|
|
20
6
|
>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<div
|
|
32
|
-
v-if="!switching"
|
|
33
|
-
class="chain-list"
|
|
7
|
+
<slot :current-chain="currentChain">
|
|
8
|
+
{{ currentChain?.name || 'Unknown Network' }}
|
|
9
|
+
</slot>
|
|
10
|
+
</Button>
|
|
11
|
+
|
|
12
|
+
<Dialog
|
|
13
|
+
title="Switch Network"
|
|
14
|
+
v-model:open="dialogOpen"
|
|
15
|
+
@closed="onClosed"
|
|
16
|
+
compat
|
|
34
17
|
>
|
|
35
|
-
<
|
|
36
|
-
v-
|
|
37
|
-
|
|
38
|
-
:disabled="chain.id === currentChainId || undefined"
|
|
39
|
-
:class="['chain-item', { active: chain.id === currentChainId }]"
|
|
40
|
-
@click="() => switchTo(chain)"
|
|
18
|
+
<Alert
|
|
19
|
+
v-if="errorMessage"
|
|
20
|
+
type="error"
|
|
41
21
|
>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
22
|
+
{{ errorMessage }}
|
|
23
|
+
</Alert>
|
|
24
|
+
|
|
25
|
+
<Loading
|
|
26
|
+
v-if="switching"
|
|
27
|
+
spinner
|
|
28
|
+
stacked
|
|
29
|
+
:txt="`Switching to ${switchingTo}...`"
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
<div
|
|
33
|
+
v-if="!switching"
|
|
34
|
+
class="chain-list"
|
|
35
|
+
>
|
|
36
|
+
<Button
|
|
37
|
+
v-for="chain in chains"
|
|
38
|
+
:key="chain.id"
|
|
39
|
+
:disabled="chain.id === currentChainId || undefined"
|
|
40
|
+
:class="['chain-item', { active: chain.id === currentChainId }]"
|
|
41
|
+
@click="() => switchTo(chain)"
|
|
42
|
+
>
|
|
43
|
+
<span>{{ chain.name }}</span>
|
|
44
|
+
<Icon
|
|
45
|
+
v-if="chain.id === currentChainId"
|
|
46
|
+
type="check"
|
|
47
|
+
/>
|
|
48
|
+
</Button>
|
|
49
|
+
</div>
|
|
50
|
+
</Dialog>
|
|
51
|
+
</template>
|
|
50
52
|
</template>
|
|
51
53
|
|
|
52
54
|
<script setup lang="ts">
|
|
@@ -44,6 +44,7 @@ export function inAppWallet(parameters: InAppWalletParameters = {}) {
|
|
|
44
44
|
type Provider =
|
|
45
45
|
ReturnType<typeof custom> extends (...args: infer A) => infer R ? R : never
|
|
46
46
|
|
|
47
|
+
// @ts-expect-error wagmi 0.4.x withCapabilities conditional return type
|
|
47
48
|
return createConnector<Provider>((config) => {
|
|
48
49
|
let account: PrivateKeyAccount | null = null
|
|
49
50
|
let currentChainId: number = config.chains[0].id
|