@1001-digital/components.evm 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1001-digital/components.evm",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -18,7 +18,7 @@
18
18
  "@wagmi/vue": ">=0.5.0",
19
19
  "viem": ">=2.0.0",
20
20
  "vue": "^3.5.0",
21
- "@1001-digital/components": "^2.0.0"
21
+ "@1001-digital/components": "^2.0.1"
22
22
  },
23
23
  "dependencies": {
24
24
  "@1001-digital/dweb-fetch": "^0.1.6",
@@ -20,9 +20,11 @@
20
20
  v-if="step === 'requesting'"
21
21
  spinner
22
22
  stacked
23
- :txt="connector?.name
24
- ? `Requesting signature from ${connector.name}...`
25
- : text.lead[step] || ''"
23
+ :txt="
24
+ connector?.name
25
+ ? `Requesting signature from ${connector.name}...`
26
+ : text.lead[step] || ''
27
+ "
26
28
  />
27
29
 
28
30
  <p v-if="step !== 'requesting' && step !== 'error' && text.lead[step]">
@@ -78,9 +80,20 @@ import { ref, computed, watch, onBeforeUnmount } from 'vue'
78
80
  import { waitForTransactionReceipt, watchChainId } from '@wagmi/core'
79
81
  import { useConfig, useConnection, type Config } from '@wagmi/vue'
80
82
  import type { TransactionReceipt, Hash } from 'viem'
81
- import { Dialog, Loading, Alert, Button, useToast, delay } from '@1001-digital/components'
83
+ import {
84
+ Dialog,
85
+ Loading,
86
+ Alert,
87
+ Button,
88
+ useToast,
89
+ delay,
90
+ } from '@1001-digital/components'
82
91
  import { useEnsureChainIdCheck, useBlockExplorer } from '../composables/chainId'
83
- import type { TransactionFlowText, EvmTransactionFlowProps, EvmTransactionFlowEmits } from '../types'
92
+ import type {
93
+ TransactionFlowText,
94
+ EvmTransactionFlowProps,
95
+ EvmTransactionFlowEmits,
96
+ } from '../types'
84
97
 
85
98
  type Step =
86
99
  | 'idle'
@@ -113,16 +126,13 @@ const defaultText = {
113
126
  },
114
127
  } satisfies TransactionFlowText
115
128
 
116
- const props = withDefaults(
117
- defineProps<EvmTransactionFlowProps>(),
118
- {
119
- delayAfter: 2000,
120
- delayAutoclose: 2000,
121
- skipConfirmation: false,
122
- autoCloseSuccess: true,
123
- dismissable: true,
124
- },
125
- )
129
+ const props = withDefaults(defineProps<EvmTransactionFlowProps>(), {
130
+ delayAfter: 2000,
131
+ delayAutoclose: 2000,
132
+ skipConfirmation: false,
133
+ autoCloseSuccess: true,
134
+ dismissable: true,
135
+ })
126
136
 
127
137
  function isUserRejection(e: unknown): boolean {
128
138
  const re = /reject|denied|cancel/i
@@ -246,7 +256,9 @@ const initializeRequest = async (request = cachedRequest.value) => {
246
256
  const start = Date.now()
247
257
  progressTimer = setInterval(() => {
248
258
  const elapsed = (Date.now() - start) / 1000
249
- toast.update(toastId, { progress: Math.round(90 * (1 - Math.exp(-elapsed / 15))) })
259
+ toast.update(toastId, {
260
+ progress: Math.round(90 * (1 - Math.exp(-elapsed / 15))),
261
+ })
250
262
  }, 500)
251
263
 
252
264
  try {
@@ -309,22 +321,24 @@ defineExpose({
309
321
  })
310
322
  </script>
311
323
 
312
- <style>
313
- .transaction-flow > section {
314
- display: grid;
315
- gap: var(--spacer);
324
+ <style scoped>
325
+ .transaction-flow {
326
+ &:deep(> section) {
327
+ display: grid;
328
+ gap: var(--spacer);
316
329
 
317
- .text {
318
- width: 100%;
319
- height: min-content;
320
- }
330
+ .text {
331
+ width: 100%;
332
+ height: min-content;
333
+ }
321
334
 
322
- p {
323
- white-space: pre-wrap;
324
- width: 100%;
335
+ p {
336
+ white-space: pre-wrap;
337
+ width: 100%;
325
338
 
326
- a {
327
- text-decoration: underline;
339
+ a {
340
+ text-decoration: underline;
341
+ }
328
342
  }
329
343
  }
330
344
  }