@visualizevalue/mint-app-base 0.1.112 → 0.1.113

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.
@@ -25,19 +25,11 @@
25
25
  endBlock,
26
26
  countDownStr,
27
27
  blocksRemaining,
28
- transactionFlowConfig
28
+ transactionFlowConfig,
29
29
  }"
30
30
  >
31
31
  <section class="details">
32
- <header class="title">
33
- <h1>{{ token.name }} <small>#{{ token.tokenId }}</small></h1>
34
- <p v-if="token.description">
35
- <ExpandableText :text="token.description" :length="95" :expand-text="$t('read_more')" :collapse-text="$t('collapse')" />
36
- </p>
37
- <p v-if="collection" class="artist">
38
- {{ $t('token.by') }} <NuxtLink :to="{ name: 'id', params: { id: collection.owner } }">{{ store.displayName(collection.owner) }}</NuxtLink>
39
- </p>
40
- </header>
32
+ <TokenDetailHeader :collection="collection" :token="token" />
41
33
 
42
34
  <div v-if="mintOpen">
43
35
  <MintTokenBar
@@ -58,7 +50,7 @@
58
50
  <TokenMintOpen :blocks="blocksRemaining?.toString()" :time="countDownStr" />
59
51
  </p>
60
52
  <p v-else-if="currentBlock">
61
- {{ $t('token.closed_at_block', { block: endBlock })}}
53
+ {{ $t('token.closed_at_block', { block: endBlock }) }}
62
54
  </p>
63
55
  <p v-if="ownedBalance">
64
56
  {{ $t('token.you_own', { ownedBalance }) }}
@@ -81,125 +73,113 @@ const store = useOnchainStore()
81
73
  const collection = computed(() => store.collection(token.collection))
82
74
 
83
75
  const mintCount = ref('1')
84
- const ownedBalance = computed(() => collection.value && store.tokenBalance(collection.value.address, token.tokenId))
76
+ const ownedBalance = computed(
77
+ () => collection.value && store.tokenBalance(collection.value.address, token.tokenId),
78
+ )
85
79
  </script>
86
80
 
87
81
  <style scoped>
88
- .token-detail {
89
- position: relative;
90
- container-type: inline-size;
91
-
92
- display: grid;
93
- grid-auto-rows: min-content;
94
- padding: 0 !important;
95
- border-top: var(--border);
96
-
97
- @media (--md) {
98
- height: calc(100dvh - var(--navbar-height));
99
- grid-template-columns: 50% 1fr;
100
- grid-auto-rows: auto;
101
- }
102
-
103
- @media (--lg) {
104
- grid-template-columns: 60% 1fr;
105
- }
82
+ .token-detail {
83
+ position: relative;
84
+ container-type: inline-size;
85
+
86
+ display: grid;
87
+ grid-auto-rows: min-content;
88
+ padding: 0 !important;
89
+ border-top: var(--border);
90
+
91
+ @media (--md) {
92
+ height: calc(100dvh - var(--navbar-height));
93
+ grid-template-columns: 50% 1fr;
94
+ grid-auto-rows: auto;
106
95
  }
107
96
 
108
- .artifact {
109
- --padding-x: 0;
110
- --padding-top: 0;
111
- --padding-bottom: 0;
112
- --artifact-width: 100cqw;
113
- --artifact-height: 100%;
114
-
115
- @media (--md) {
116
- --artifact-width: 50cqw;
117
- --padding-top: var(--spacer-lg);
118
- --padding-x: var(--spacer-lg);
119
- --padding-bottom: calc(var(--spacer-lg) + var(--spacer));
120
- }
97
+ @media (--lg) {
98
+ grid-template-columns: 60% 1fr;
99
+ }
100
+ }
101
+
102
+ .artifact {
103
+ --padding-x: 0;
104
+ --padding-top: 0;
105
+ --padding-bottom: 0;
106
+ --artifact-width: 100cqw;
107
+ --artifact-height: 100%;
108
+
109
+ @media (--md) {
110
+ --artifact-width: 50cqw;
111
+ --padding-top: var(--spacer-lg);
112
+ --padding-x: var(--spacer-lg);
113
+ --padding-bottom: calc(var(--spacer-lg) + var(--spacer));
114
+ }
121
115
 
122
- @media (--lg) {
123
- --artifact-width: 60cqw;
124
- --padding-top: var(--spacer-xl);
125
- --padding-x: var(--spacer-xl);
126
- --padding-bottom: calc(var(--spacer-xl) + var(--spacer));
127
- }
116
+ @media (--lg) {
117
+ --artifact-width: 60cqw;
118
+ --padding-top: var(--spacer-xl);
119
+ --padding-x: var(--spacer-xl);
120
+ --padding-bottom: calc(var(--spacer-xl) + var(--spacer));
121
+ }
128
122
 
129
- width: var(--artifact-width);
130
- height: var(--artifact-height);
131
- padding: var(--padding-top) var(--padding-x) var(--padding-bottom);
132
- position: relative;
133
- container-type: inline-size;
123
+ width: var(--artifact-width);
124
+ height: var(--artifact-height);
125
+ padding: var(--padding-top) var(--padding-x) var(--padding-bottom);
126
+ position: relative;
127
+ container-type: inline-size;
128
+ display: flex;
129
+ justify-content: center;
130
+ align-items: center;
131
+ border-bottom: var(--border);
132
+
133
+ @media (--md) {
134
+ border-bottom: none;
135
+ border-right: var(--border);
134
136
  display: flex;
135
137
  justify-content: center;
136
138
  align-items: center;
137
- border-bottom: var(--border);
139
+ container-type: size;
140
+ }
138
141
 
139
- @media (--md) {
140
- border-bottom: none;
141
- border-right: var(--border);
142
- display: flex;
143
- justify-content: center;
144
- align-items: center;
145
- container-type: size;
146
- }
142
+ > menu {
143
+ position: absolute;
144
+ bottom: var(--spacer);
145
+ right: var(--spacer);
146
+ width: fit-content;
147
+ padding: 0;
148
+ }
149
+ }
147
150
 
148
- > menu {
149
- position: absolute;
150
- bottom: var(--spacer);
151
- right: var(--spacer);
152
- width: fit-content;
153
- padding: 0;
154
- }
151
+ .details {
152
+ @media (--md) {
153
+ overflow-y: auto;
154
+ -webkit-overflow-scrolling: auto;
155
155
  }
156
156
 
157
- .details {
157
+ > * {
158
+ border-bottom: var(--border);
159
+ padding: var(--spacer);
158
160
 
159
161
  @media (--md) {
160
- overflow-y: auto;
161
- -webkit-overflow-scrolling: auto;
162
+ padding: var(--spacer) var(--spacer-lg);
162
163
  }
164
+ }
163
165
 
164
- > * {
165
- border-bottom: var(--border);
166
- padding: var(--spacer);
167
-
168
- @media (--md) {
169
- padding: var(--spacer) var(--spacer-lg);
170
- }
171
- }
166
+ header {
167
+ z-index: 100;
172
168
 
173
- header {
174
- z-index: 100;
175
- display: grid;
176
- gap: var(--spacer-sm);
177
- background: var(--card-background);
178
- backdrop-filter: var(--blur);
179
-
180
- h1 {
181
- font-size: var(--font-lg);
182
-
183
- small {
184
- color: var(--muted);
185
- }
186
- }
187
-
188
- @media (--md) {
189
- padding: var(--spacer-lg);
190
- position: sticky;
191
- top: 0;
192
- }
169
+ @media (--md) {
170
+ position: sticky;
171
+ top: 0;
193
172
  }
194
173
  }
174
+ }
195
175
 
196
- .mint-status {
197
- display: flex;
198
- gap: var(--spacer);
199
- flex-wrap: wrap;
176
+ .mint-status {
177
+ display: flex;
178
+ gap: var(--spacer);
179
+ flex-wrap: wrap;
200
180
 
201
- @media (--md) {
202
- justify-content: space-between;
203
- }
181
+ @media (--md) {
182
+ justify-content: space-between;
204
183
  }
184
+ }
205
185
  </style>
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <header class="title">
3
+ <slot name="before" />
4
+
5
+ <h1>
6
+ {{ token.name }}
7
+ <small>#{{ token.tokenId }}</small>
8
+ </h1>
9
+ <p v-if="token.description">
10
+ <ExpandableText
11
+ :text="token.description"
12
+ :length="95"
13
+ :expand-text="$t('read_more')"
14
+ :collapse-text="$t('collapse')"
15
+ />
16
+ </p>
17
+ <p v-if="collection" class="artist">
18
+ {{ $t('token.by') }}
19
+ <NuxtLink :to="{ name: 'id', params: { id: collection.owner } }">
20
+ {{ store.displayName(collection.owner) }}
21
+ </NuxtLink>
22
+ </p>
23
+
24
+ <slot name="after" />
25
+ </header>
26
+ </template>
27
+
28
+ <script setup lang="ts">
29
+ const { collection, token } = defineProps<{
30
+ collection: Collection
31
+ token: Token
32
+ }>()
33
+
34
+ const store = useOnchainStore()
35
+ </script>
36
+
37
+ <style scoped>
38
+ header {
39
+ display: grid;
40
+ gap: var(--spacer-sm);
41
+ background: var(--card-background);
42
+ backdrop-filter: var(--blur);
43
+
44
+ h1 {
45
+ font-size: var(--font-lg);
46
+
47
+ small {
48
+ color: var(--muted);
49
+ }
50
+ }
51
+
52
+ @media (--md) {
53
+ padding: var(--spacer-lg);
54
+ }
55
+ }
56
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visualizevalue/mint-app-base",
3
- "version": "0.1.112",
3
+ "version": "0.1.113",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "dependencies": {