@visualizevalue/mint-app-base 0.1.9 → 0.1.11

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.
@@ -2,11 +2,11 @@
2
2
  <header v-if="artist" class="profile-header">
3
3
  <slot name="before" />
4
4
 
5
- <img :src="artist.avatar || `/icons/opepen.svg`" :alt="name" />
6
- <h1 @click="() => copy(address)">
5
+ <img :src="artist.avatar || avatar" :alt="name" />
6
+ <h1 @click="() => ! hideAddress && copy(address)">
7
7
  <span>{{ name }}</span>
8
8
  <small v-if="copied">copied...</small>
9
- <small v-else-if="artist.ens">{{ shortAddress(address) }}</small>
9
+ <small v-else-if="! hideAddress">{{ shortAddress(address) }}</small>
10
10
  </h1>
11
11
  <p v-if="artist?.description">{{ artist.description }}</p>
12
12
 
@@ -22,14 +22,20 @@
22
22
  <script setup>
23
23
  import { useClipboard } from '@vueuse/core'
24
24
 
25
+ const config = useRuntimeConfig()
26
+
25
27
  const props = defineProps({
26
28
  address: String,
29
+ avatar: String,
30
+ name: String,
31
+ hideAddress: Boolean,
27
32
  })
28
33
 
29
34
  const store = useOnchainStore()
30
35
 
36
+ const avatar = computed(() => props.avatar || config.public.defaultAvatar)
31
37
  const artist = computed(() => store.artist(props.address))
32
- const name = computed(() => artist.value?.ens || shortAddress(props.address))
38
+ const name = computed(() => props.name || artist.value?.ens || shortAddress(props.address))
33
39
  const artistAddress = computed(() => props.address)
34
40
  const { copy, copied } = useClipboard({ source: artistAddress })
35
41
 
@@ -52,8 +58,6 @@ header {
52
58
  }
53
59
 
54
60
  h1 {
55
- cursor: pointer;
56
-
57
61
  > * {
58
62
  display: block;
59
63
  }
@@ -64,6 +68,7 @@ header {
64
68
  font-family: var(--ui-font-family);
65
69
  letter-spacing: var(--ui-letter-spacing);
66
70
  text-transform: var(--ui-text-transform);
71
+ cursor: pointer;
67
72
  }
68
73
  }
69
74
  }
@@ -1,5 +1,5 @@
1
1
  import { VueQueryPlugin } from '@tanstack/vue-query'
2
- import { http, cookieStorage, createConfig, createStorage, WagmiPlugin, fallback, type Config } from '@wagmi/vue'
2
+ import { http, cookieStorage, createConfig, createStorage, WagmiPlugin, fallback, type Config, type CreateConnectorFn } from '@wagmi/vue'
3
3
  import { mainnet, sepolia, holesky, localhost } from '@wagmi/vue/chains'
4
4
  import { coinbaseWallet, injected, metaMask, walletConnect } from '@wagmi/vue/connectors'
5
5
  import type { CustomTransport, Transport } from 'viem'
@@ -7,6 +7,25 @@ import type { CustomTransport, Transport } from 'viem'
7
7
  export default defineNuxtPlugin(nuxtApp => {
8
8
  const title = nuxtApp.$config.public.title || 'Mint'
9
9
 
10
+ const connectors: CreateConnectorFn[] = [
11
+ injected(),
12
+ coinbaseWallet({
13
+ appName: title,
14
+ appLogoUrl: '',
15
+ }),
16
+ metaMask({
17
+ dappMetadata: {
18
+ name: title,
19
+ iconUrl: '',
20
+ url: '',
21
+ }
22
+ }),
23
+ ]
24
+
25
+ if (nuxtApp.$config.public.walletConnectProjectId) connectors.push(walletConnect({
26
+ projectId: nuxtApp.$config.public.walletConnectProjectId,
27
+ }))
28
+
10
29
  const transportDefinitions: CustomTransport|Transport[] = []
11
30
 
12
31
  if (nuxtApp.$config.public.rpc1) transportDefinitions.push(http(nuxtApp.$config.public.rpc1 as string))
@@ -21,23 +40,7 @@ export default defineNuxtPlugin(nuxtApp => {
21
40
  batch: {
22
41
  multicall: true,
23
42
  },
24
- connectors: [
25
- injected(),
26
- walletConnect({
27
- projectId: nuxtApp.$config.public.walletConnectProjectId,
28
- }),
29
- coinbaseWallet({
30
- appName: title,
31
- appLogoUrl: '',
32
- }),
33
- metaMask({
34
- dappMetadata: {
35
- name: title,
36
- iconUrl: '',
37
- url: '',
38
- }
39
- }),
40
- ],
43
+ connectors,
41
44
  storage: createStorage({
42
45
  storage: cookieStorage,
43
46
  }),
package/nuxt.config.ts CHANGED
@@ -10,17 +10,18 @@ export default defineNuxtConfig({
10
10
 
11
11
  runtimeConfig: {
12
12
  public: {
13
- title: 'Mint',
14
- description: 'To mint is a human right.',
15
- blockExplorer: 'https://etherscan.io',
16
- creatorAddress: '',
17
- factoryAddress: '',
13
+ blockExplorer: 'https://sepolia.etherscan.io',
18
14
  chainId: 1337,
19
- walletConnectProjectId: '',
15
+ creatorAddress: '',
16
+ defaultAvatar: '/icons/opepen.svg',
17
+ description: 'To mint is a human right.',
18
+ factoryAddress: '0x0Eb7fB145e697B7e82711BeEFff195F2d7b66cdd',
20
19
  platformUrl: 'https://networked.art',
21
- rpc1: '',
22
- rpc2: '',
23
- rpc3: '',
20
+ rpc1: 'https://ethereum-sepolia.rpc.subquery.network/public',
21
+ rpc2: 'https://ethereum-sepolia-rpc.publicnode.com',
22
+ rpc3: 'https://1rpc.io/sepolia',
23
+ title: 'Mint',
24
+ walletConnectProjectId: '',
24
25
  }
25
26
  },
26
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visualizevalue/mint-app-base",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "dependencies": {