@1001-digital/components 1.1.3 → 1.1.5

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",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -33,6 +33,8 @@
33
33
  "dependencies": {
34
34
  "@iconify/vue": "^5.0.0",
35
35
  "@internationalized/date": "^3.8.0",
36
+ "@types/luxon": "^3.7.0",
37
+ "@types/qrcode": "^1.5.6",
36
38
  "@visualizevalue/opepicons": "^0.1.0",
37
39
  "@vueuse/core": "^14.2.0",
38
40
  "luxon": "^3.7.0",
@@ -40,8 +42,6 @@
40
42
  "reka-ui": "^2.8.0"
41
43
  },
42
44
  "devDependencies": {
43
- "@types/luxon": "^3.7.0",
44
- "@types/qrcode": "^1.5.6",
45
45
  "@wagmi/core": "^3.4.0",
46
46
  "@wagmi/vue": "^0.5.0",
47
47
  "viem": "^2.45.0",
@@ -62,33 +62,39 @@ function useEnsBase(
62
62
  const data: Ref<EnsProfile | null | undefined> = ref(
63
63
  ensCache.get(cacheKey.value) ?? undefined,
64
64
  )
65
+ const pending = ref(false)
65
66
 
66
67
  watchEffect(async () => {
67
68
  const id = toValue(identifier)
68
69
  if (!id) {
69
70
  data.value = null
71
+ pending.value = false
70
72
  return
71
73
  }
72
74
 
73
75
  const cached = ensCache.get(cacheKey.value)
74
76
  if (cached) {
75
77
  data.value = cached
78
+ pending.value = false
76
79
  return
77
80
  }
78
81
 
79
82
  const strategies: EnsMode[] =
80
83
  mode.value === 'indexer' ? ['indexer', 'chain'] : ['chain', 'indexer']
81
84
 
85
+ pending.value = true
82
86
  try {
83
87
  data.value = await ensCache.fetch(cacheKey.value, () =>
84
88
  resolve(id, strategies, indexerUrls.value, config, chainKeys),
85
89
  )
86
90
  } catch {
87
91
  data.value = null
92
+ } finally {
93
+ pending.value = false
88
94
  }
89
95
  })
90
96
 
91
- return { data }
97
+ return { data, pending }
92
98
  }
93
99
 
94
100
  export const useEns = (