@visualizevalue/mint-app-base 0.1.10 → 0.1.12

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.
@@ -1,13 +1,31 @@
1
1
  .card {
2
2
  display: grid;
3
3
  gap: var(--spacer);
4
- border: var(--border);
4
+ background: var(--card-background);
5
5
  height: 100%;
6
6
  padding: var(--spacer);
7
7
 
8
+ &:not(.borderless) {
9
+ border: var(--card-border);
10
+ border-radius: var(--card-border-radius);
11
+
12
+ &:has(> .card-link) {
13
+ &:has(> .card-link:hover),
14
+ &:has(> .card-link:focus) {
15
+ border-color: var(--card-border-color-highlight);
16
+ }
17
+ }
18
+ }
19
+
8
20
  &.borderless {
9
21
  padding: 0;
10
- border: 0;
22
+ }
23
+
24
+ &:has(> .card-link) {
25
+ &:has(> .card-link:hover),
26
+ &:has(> .card-link:focus) {
27
+ background: var(--card-background-highlight);
28
+ }
11
29
  }
12
30
 
13
31
  > * {
@@ -15,6 +33,6 @@
15
33
 
16
34
  place-self: center;
17
35
  &:first-child { place-self: flex-start; }
18
- &:last-child { place-self: flex-end; }
36
+ &:last-child { place-self: flex-end; }
19
37
  }
20
38
  }
@@ -0,0 +1,10 @@
1
+ :root {
2
+
3
+ --app-header-font-family: var(--ui-font-family);
4
+ --app-header-font-size: var(--ui-font-size);
5
+ --app-header-font-weight: var(--ui-font-weight);
6
+ --app-header-text-transform: var(--ui-text-transform);
7
+ --app-header-letter-spacing: var(--ui-letter-spacing);
8
+
9
+ }
10
+
@@ -0,0 +1,20 @@
1
+ :root {
2
+
3
+ --breadcrumb-color: var(--muted);
4
+ --breadcrumb-active-color: var(--color);
5
+ --breadcrumb-separator-color: var(--muted);
6
+
7
+ --breadcrumb-font-family: var(--app-header-font-family);
8
+ --breadcrumb-font-size: var(--app-header-font-size);
9
+ --breadcrumb-font-font-weight: var(--app-header-font-weight);
10
+ --breadcrumb-text-transform: var(--app-header-text-transform);
11
+ --breadcrumb-letter-spacing: var(--app-header-letter-spacing);
12
+
13
+ --breadcrumb-background: transparent;
14
+ --breadcrumb-background-highlight: transparent;
15
+ --breadcrumb-border: 0;
16
+ --breadcrumb-border-color-highlight: transparent;
17
+ --breadcrumb-border-radius: var(--border-radius);
18
+
19
+ }
20
+
@@ -0,0 +1,10 @@
1
+ :root {
2
+
3
+ --button-border: var(--border);
4
+ --button-border-radius: var(--border-radius);
5
+ --button-background: var(--background);
6
+ --button-background-highlight: var(--background);
7
+ --button-border-color-highlight: var(--primary);
8
+
9
+ }
10
+
@@ -0,0 +1,10 @@
1
+ :root {
2
+
3
+ --card-border: var(--border);
4
+ --card-border-radius: var(--border-radius);
5
+ --card-background: var(--background);
6
+ --card-background-highlight: var(--background);
7
+ --card-border-color-highlight: var(--primary);
8
+
9
+ }
10
+
@@ -0,0 +1,6 @@
1
+ :root {
2
+
3
+ --backdrop-background-color: transparent;
4
+
5
+ }
6
+
@@ -1,18 +1,5 @@
1
- :root {
2
-
3
- --card-border: var(--border);
4
- --card-border-radius: var(--border-radius);
5
- --card-background: var(--background);
6
- --card-background-highlight: var(--background);
7
- --card-border-color-highlight: var(--primary);
8
-
9
- --button-border: var(--border);
10
- --button-border-radius: var(--border-radius);
11
- --button-background: var(--background);
12
- --button-background-highlight: var(--background);
13
- --button-border-color-highlight: var(--primary);
14
-
15
- --backdrop-background-color: transparent;
16
-
17
- }
1
+ @import "./components/breadcrumbs.css";
2
+ @import "./components/buttons.css";
3
+ @import "./components/cards.css";
4
+ @import "./components/dialogs.css";
18
5
 
@@ -5,16 +5,21 @@
5
5
  </template>
6
6
 
7
7
  <script setup>
8
- import { useEnsName } from '@wagmi/vue'
8
+ import { useAccount, useEnsName } from '@wagmi/vue'
9
9
 
10
10
  const props = defineProps(['address'])
11
11
 
12
12
  const address = computed(() => props.address?.value || props.address)
13
13
 
14
+ const { address: currentAddress } = useAccount()
15
+ const isCurrent = computed(() => currentAddress.value?.toLowerCase() === address.value.toLowerCase())
16
+
14
17
  const { data: ens } = useEnsName({
15
18
  address,
16
19
  chainId: 1,
17
20
  })
18
21
 
19
- const display = computed(() => ens.value || shortAddress(address.value))
22
+ const display = computed(() => ens.value || (
23
+ isCurrent.value ? `You` : shortAddress(address.value)
24
+ ))
20
25
  </script>
@@ -16,9 +16,5 @@ menu {
16
16
  &:empty {
17
17
  display: none;
18
18
  }
19
-
20
- &.centered {
21
- justify-content: center;
22
- }
23
19
  }
24
20
  </style>
@@ -6,15 +6,15 @@
6
6
  <MintGasPricePopover />
7
7
 
8
8
  <Connect v-if="! isConnected" />
9
- <NuxtLink v-else
9
+ <Button v-else
10
10
  :to="{
11
11
  name: 'profile-address',
12
12
  params: { address: address?.toLowerCase() }
13
13
  }"
14
- class="account"
14
+ class="account link"
15
15
  >
16
16
  <Account :address="address" />
17
- </NuxtLink>
17
+ </Button>
18
18
  </ClientOnly>
19
19
  </header>
20
20
  </template>
@@ -41,16 +41,6 @@ const breadcrumbs = computed(() => {
41
41
  })
42
42
  </script>
43
43
 
44
- <style>
45
- :root {
46
- --app-header-font-family: var(--ui-font-family);
47
- --app-header-font-size: var(--ui-font-size);
48
- --app-header-font-weight: var(--ui-font-weight);
49
- --app-header-text-transform: var(--ui-text-transform);
50
- --app-header-letter-spacing: var(--ui-letter-spacing);
51
- }
52
- </style>
53
-
54
44
  <style scoped>
55
45
  header {
56
46
  height: var(--navbar-height);
@@ -66,12 +56,7 @@ header {
66
56
  text-transform: var(--app-header-text-transform);
67
57
  letter-spacing: var(--app-header-letter-spacing);
68
58
 
69
- @media (--md) {
70
- gap: var(--spacer-lg);
71
- }
72
-
73
59
  :deep(> .breadcrumb) {
74
- overflow: hidden;
75
60
  text-overflow: ellipsis;
76
61
  justify-content: flex-start;
77
62
  white-space: nowrap;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="breadcrumb">
2
+ <div class="breadcrumbs">
3
3
  <span v-for="item in items">
4
4
  <NuxtLink v-if="item.to" :to="item.to">{{ item.text }}</NuxtLink>
5
5
  <template v-else>{{ item.text }}</template>
@@ -13,22 +13,8 @@ defineProps({
13
13
  })
14
14
  </script>
15
15
 
16
- <style>
17
- :root {
18
- --breadcrumb-nav-color: var(--muted);
19
- --breadcrumb-nav-active-color: var(--color);
20
- --breadcrumb-separator-color: var(--muted);
21
-
22
- --breadcrumb-font-family: var(--app-header-font-family);
23
- --breadcrumb-font-size: var(--app-header-font-size);
24
- --breadcrumb-font-font-weight: var(--app-header-font-weight);
25
- --breadcrumb-text-transform: var(--app-header-text-transform);
26
- --breadcrumb-letter-spacing: var(--app-header-letter-spacing);
27
- }
28
- </style>
29
-
30
16
  <style scoped>
31
- .breadcrumb {
17
+ .breadcrumbs {
32
18
  display: flex;
33
19
  align-items: center;
34
20
  justify-content: center;
@@ -41,6 +27,7 @@ defineProps({
41
27
 
42
28
  > span {
43
29
  white-space: nowrap;
30
+ align-self: baseline;
44
31
 
45
32
  &:has(+ span > a) {
46
33
  display: none;
@@ -52,17 +39,23 @@ defineProps({
52
39
  }
53
40
 
54
41
  > span > a {
55
- color: var(--breadcrumb-nav-color);
42
+ background: var(--breadcrumb-background);
43
+ color: var(--breadcrumb-color);
44
+ border: var(--breadcrumb-border);
45
+ border-radius: var(--breadcrumb-border-radius);
56
46
  transition: all var(--speed);
57
47
 
58
48
  &.router-link-active-exact,
59
49
  &:--highlight {
60
- color: var(--breadcrumb-nav-active-color);
50
+ color: var(--breadcrumb-active-color);
51
+ background: var(--breadcrumb-background-highlight);
52
+ border-color: var(--breadcrumb-border-color-highlight);
61
53
  }
62
54
  }
63
55
 
64
56
  > span:not(:last-child):after {
65
57
  content: '/';
58
+ align-self: baseline;
66
59
  color: var(--breadcrumb-separator-color);
67
60
  margin-left: var(--spacer-sm);
68
61
  }
@@ -56,17 +56,13 @@ defineProps({
56
56
  }
57
57
 
58
58
  &.link {
59
- display: inline-flex;
60
- align-self: baseline;
61
- align-items: baseline;
62
- height: inherit;
63
- margin: 0 !important;
64
- padding: 0 calc(var(--ui-padding-x)/2) !important;
65
59
  border: 0;
60
+ background: transparent;
66
61
  line-height: inherit;
67
62
  color: var(--muted);
68
63
 
69
64
  &:--highlight {
65
+ background: var(--button-background-highlight);
70
66
  color: var(--color);
71
67
  }
72
68
 
@@ -75,5 +71,14 @@ defineProps({
75
71
  height: inherit;
76
72
  }
77
73
  }
74
+
75
+ &.inline {
76
+ display: inline-flex;
77
+ align-self: baseline;
78
+ align-items: baseline;
79
+ height: inherit;
80
+ margin: 0 !important;
81
+ padding: 0 calc(var(--ui-padding-x)/2) !important;
82
+ }
78
83
  }
79
84
  </style>
@@ -88,6 +88,8 @@ header.collection-intro {
88
88
  }
89
89
 
90
90
  h1 {
91
+ font-size: var(--font-lg);
92
+
91
93
  small {
92
94
  color: var(--);
93
95
  font-size: var(--font-base);
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <section v-if="collections.length" class="collections borderless">
2
+ <section v-if="collections.length" class="collections-overview">
3
3
  <slot name="before" :collections="collections" />
4
4
 
5
5
  <CollectionOverviewCard
@@ -8,7 +8,7 @@
8
8
  :collection="collection"
9
9
  />
10
10
  </section>
11
- <section v-else-if="! loading" class="centered borderless">
11
+ <section v-else-if="! loading" class="collections-overview-empty">
12
12
  <template v-if="isMe">
13
13
  <p>It looks like you haven't deployed any collections.</p>
14
14
  <div>
@@ -50,9 +50,14 @@ if (store.forArtist(id.value).length !== collections.length) {
50
50
  </script>
51
51
 
52
52
  <style scoped>
53
- .collections {
53
+ .collections-overview {
54
54
  display: grid;
55
55
  gap: var(--spacer-lg);
56
- padding: var(--spacer-lg) var(--spacer) !important;
56
+ padding: var(--spacer-lg) var(--spacer);
57
+ }
58
+
59
+ .collections-overview-empty {
60
+ display: grid;
61
+ gap: var(--spacer);
57
62
  }
58
63
  </style>
@@ -6,7 +6,7 @@
6
6
  :expanded="expanded"
7
7
  :toggle="toggle"
8
8
  >
9
- <Button v-if="wasShortened" @click="toggle" class="link">
9
+ <Button v-if="wasShortened" @click="toggle" class="link inline">
10
10
  <Icon :type="expanded ? 'chevron-up' : 'chevron-right'" />
11
11
  <span>{{ expanded ? collapseText : expandText }}</span>
12
12
  </Button>
@@ -16,18 +16,18 @@ const ICONS = {
16
16
  'chevron-right': '➡️',
17
17
  'chevron-up': '⬆️',
18
18
  'close': '✖️',
19
- 'discord': '',
19
+ 'discord': '🤖',
20
20
  'edit': '📝',
21
21
  'email': '📧',
22
22
  'folder': '📁',
23
- 'github': '',
23
+ 'github': '💻',
24
24
  'home': '🏠',
25
25
  'image': '🏞️',
26
26
  'link': '🔗',
27
27
  'loader': '⏳',
28
28
  'times': '✖️',
29
29
  'trash': '🗑️',
30
- 'twitter': '',
30
+ 'twitter': '🐦',
31
31
  'user': '👤',
32
32
  'website': '🌐',
33
33
  'withdraw': '💵',
@@ -35,5 +35,3 @@ watch(() => props.open, async () => {
35
35
  })
36
36
  </script>
37
37
 
38
- <style>
39
- </style>
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <button
2
+ <Button
3
3
  :popovertarget="id"
4
- class="gas"
4
+ class="gas link"
5
5
  ref="trigger"
6
6
  @mouseenter="() => popover.showPopover()"
7
- ><slot name="trigger" /></button>
7
+ ><slot name="trigger" /></Button>
8
8
 
9
9
  <Teleport to="body">
10
10
  <div
@@ -89,7 +89,6 @@ const popoverArrowPosition = computed(() => {
89
89
  }
90
90
  }
91
91
 
92
-
93
92
  @starting-style {
94
93
  [popover]:popover-open {
95
94
  opacity: 0;
@@ -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
  }
@@ -53,6 +53,13 @@ const formattedPrice = computed(() => customFormatEther(props.mint.price))
53
53
  }
54
54
  }
55
55
 
56
+ a,
57
+ button {
58
+ &:--highlight {
59
+ color: var(--color);
60
+ }
61
+ }
62
+
56
63
  @container (min-width: 24rem) {
57
64
  grid-template-columns: 6rem 3rem 1fr 1fr 2rem;
58
65
  gap: var(--spacer);
@@ -22,7 +22,7 @@
22
22
  <span>View on Etherscan</span>
23
23
  </Button>
24
24
 
25
- <Actions v-if="step === 'chain'" class="centered">
25
+ <Actions v-if="step === 'chain'">
26
26
  <Button @click="cancel" class="secondary">Cancel</Button>
27
27
  </Actions>
28
28
  <Actions v-if="step === 'confirm' || step === 'error'">
@@ -5,8 +5,8 @@
5
5
  <TokenOverviewCard v-for="token of tokens" :key="token.tokenId" :token="token" />
6
6
 
7
7
  <Loading v-if="loading" />
8
- <div v-if="! tokens.length && !loading" class="centered">
9
- <p class="muted">No tokens yet</p>
8
+ <div v-if="! tokens.length && !loading" >
9
+ <p>No tokens yet</p>
10
10
  </div>
11
11
  </PageFrame>
12
12
  </template>
@@ -62,7 +62,7 @@
62
62
  <FormInput v-model="description" placeholder="Description" />
63
63
  </div>
64
64
 
65
- <Actions class="borderless">
65
+ <Actions>
66
66
  <Button type="submit">
67
67
  Deploy
68
68
  </Button>
@@ -10,13 +10,20 @@
10
10
  </template>
11
11
  </ProfileHeader>
12
12
 
13
- <section v-if="artistScope" class="centered muted">
13
+ <section v-if="artistScope">
14
14
  <p>Collected art from <Account :address="artistScope" /> will be indexed on profiles soon...</p>
15
- <p v-if="isMyArtistScope">Manage Your collections <NuxtLink :to="{ name: 'id', params: { id: address } }">here</NuxtLink>.</p>
16
- <p v-else>You can mint your own art on <NuxtLink :to="config.public.platformUrl" target="_blank">{{ getMainDomain(config.public.platformUrl) }}</NuxtLink>.</p>
15
+ <p v-if="isMyArtistScope">
16
+ Manage Your collections <NuxtLink :to="{ name: 'id', params: { id: address } }">here</NuxtLink>.
17
+ </p>
18
+ <p v-else>
19
+ You can mint your own art on
20
+ <NuxtLink :to="config.public.platformUrl" target="_blank">
21
+ {{ getMainDomain(config.public.platformUrl) }}
22
+ </NuxtLink>.
23
+ </p>
17
24
  </section>
18
- <section v-else class="centered">
19
- <p class="muted">Collected art and curation options for your profile will come soon...</p>
25
+ <section v-else>
26
+ <p>Collected art and curation options for your profile will come soon...</p>
20
27
  </section>
21
28
  </PageFrame>
22
29
  </template>
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
13
  blockExplorer: 'https://sepolia.etherscan.io',
14
+ chainId: 1337,
16
15
  creatorAddress: '',
16
+ defaultAvatar: '/icons/opepen.svg',
17
+ description: 'To mint is a human right.',
17
18
  factoryAddress: '0x0Eb7fB145e697B7e82711BeEFff195F2d7b66cdd',
18
- chainId: 1337,
19
- walletConnectProjectId: '',
20
19
  platformUrl: 'https://networked.art',
21
20
  rpc1: 'https://ethereum-sepolia.rpc.subquery.network/public',
22
21
  rpc2: 'https://ethereum-sepolia-rpc.publicnode.com',
23
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.10",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "dependencies": {