@visualizevalue/mint-app-base 0.1.81 → 0.1.83

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.
@@ -121,25 +121,46 @@ select.select:--highlight {
121
121
  }
122
122
  }
123
123
 
124
+ .radio.form-group {
125
+ display: flex;
126
+ gap: var(--spacer-sm);
127
+
128
+ input {
129
+ width: min-content;
130
+
131
+ &:not(:first-of-type) {
132
+ margin-left: var(--spacer-sm);
133
+ }
134
+ }
135
+
136
+ label,
137
+ input {
138
+ display: inline;
139
+ }
140
+ }
141
+
124
142
  form {
125
143
  display: grid;
126
144
  gap: var(--spacer);
145
+ }
127
146
 
128
- label {
129
- display: block;
130
- font-family: var(--ui-font-family);
131
- text-transform: var(--text-transform-ui);
132
- margin: var(--size-2) 0;
133
- color: var(--muted);
134
- transition: all var(--speed);
147
+ form label,
148
+ label.form-label,
149
+ label:has(.form-item) {
150
+ font-family: var(--ui-font-family);
151
+ font-size: var(--ui-font-size);
152
+ text-transform: var(--text-transform-ui);
153
+ margin: var(--size-2) 0;
154
+ transition: all var(--speed);
155
+ display: grid;
156
+ gap: var(--size-2);
135
157
 
136
- > span:first-child {
137
- display: block;
138
- margin: 0 0 var(--size-2) 0
139
- }
158
+ > span:first-child {
159
+ display: block;
160
+ }
140
161
 
141
- &:hover {
142
- color: var(--color);
143
- }
162
+ &:hover {
163
+ color: var(--color);
144
164
  }
145
165
  }
166
+
@@ -20,12 +20,19 @@
20
20
  <script setup lang="ts">
21
21
  import { useFileDialog } from '@vueuse/core'
22
22
 
23
+ const props = defineProps({
24
+ accept: {
25
+ type: String,
26
+ default: 'image/*'
27
+ }
28
+ })
29
+
23
30
  const emit = defineEmits<{
24
31
  change: [file: File|null|undefined]
25
32
  }>()
26
33
 
27
34
  const { files, open, reset, onChange } = useFileDialog({
28
- accept: 'image/*',
35
+ accept: props.accept,
29
36
  multiple: false,
30
37
  })
31
38
 
@@ -9,7 +9,7 @@
9
9
  </Actions>
10
10
 
11
11
  <div>
12
- <label>
12
+ <label class="form-label">
13
13
  <span>Image</span>
14
14
 
15
15
  <FormInput v-if="mode === 'ipfs'" v-model="imageIpfsCid" placeholder="CID (qmx...)" prefix="ipfs://" required />
@@ -26,13 +26,13 @@
26
26
  </div>
27
27
  </label>
28
28
 
29
- <label>
29
+ <label class="form-label">
30
30
  <span>Animation</span>
31
31
 
32
32
  <FormInput v-if="mode === 'ipfs'" v-model="animationIpfsCid" placeholder="CID (qmx...)" prefix="ipfs://" required />
33
33
  <FormInput v-else-if="mode === 'ar'" v-model="animationArTxId" placeholder="TX ID (frV...)" prefix="ar://" required />
34
34
  <div v-else-if="mode === 'file'">
35
- <FormSelectFile ref="animationSelect" @change="setAnimationArtifact" />
35
+ <FormSelectFile ref="animationSelect" @change="setAnimationArtifact" accept="video/*" />
36
36
  <p v-if="! animationIsSmall" class="muted">
37
37
  <small>
38
38
  {{ $t('mint.base.note.start') }}
package/locales/en.json CHANGED
@@ -1,111 +1,117 @@
1
1
  {
2
- "connect_button": "Connect",
3
- "mint_button": "Mint",
4
- "read_more": "Read More",
5
- "collapse": "Collapse",
6
- "tokens": "token | tokens",
7
- "blocks": "block | blocks",
8
- "choose_file": "Choose File",
9
- "popover": {
10
- "mint_pricing": "Mint Pricing",
11
- "pricing_info": "Artifacts are priced based on the Ethereum network fees at the time of collecting.",
12
- "network_fees": "Network fees (Gas fees) are an essential component of securing and running decentralized blockchains.",
13
- "artist_reward": "The cost to store and secure the object on the network is mirrored as compensation to the artist, creating a direct link between network value and creator reward.",
14
- "gas_price": "Gas price",
15
- "cost_to_mint": "Cost to mint",
16
- "ethereum_fee": "Ethereum fee (50%)",
17
- "artist_compensation": "Artist comp. (50%)",
18
- "mint_price": "Mint price",
19
- "mint_more_info": "Mints of more than one don't increase the Ethereum fee, resulting in higher artist compensation.",
20
- "amount": "Amount",
21
- "eth_fee": "Ethereum fee",
22
- "artist_comp": "Artist comp."
23
- },
24
- "profile": {
25
- "address_copied": "copied...",
26
- "edit_button": "Edit Profile",
27
- "add_collection_button": "Collection",
28
- "your_collections": "Your Collections"
29
- },
30
- "collections_overview": {
31
- "no_collections": "It looks like you haven't deployed any collections.",
32
- "create_first": "Create Your First",
33
- "no_collections_other": "It looks like this account hasn't deployed any collections.",
34
- "querying_blockchain": "Querying the blockchain..."
35
- },
36
- "collection": {
37
- "unnamed": "Unnamed Collection",
38
- "created_at_block": "Created at Block",
39
- "by": "By",
40
- "no_tokens": "No tokens yet.",
41
- "withdraw": "Withdraw"
42
- },
43
- "mint": {
44
- "base": {
45
- "note": {
46
- "start": "Note: This should be a small file, preferably an SVG like",
47
- "link_text": "this one (810 bytes)",
48
- "end": "If it is larger than what we can store within one transaction, the token creation will be split up into multiple transactions."
49
- },
50
- "title_placeholder": "Title",
51
- "description_placeholder": "Description"
2
+ "connect_button": "Connect",
3
+ "mint_button": "Mint",
4
+ "read_more": "Read More",
5
+ "collapse": "Collapse",
6
+ "tokens": "token | tokens",
7
+ "blocks": "block | blocks",
8
+ "choose_file": "Choose File",
9
+ "popover": {
10
+ "mint_pricing": "Mint Pricing",
11
+ "pricing_info": "Artifacts are priced based on the Ethereum network fees at the time of collecting.",
12
+ "network_fees": "Network fees (Gas fees) are an essential component of securing and running decentralized blockchains.",
13
+ "artist_reward": "The cost to store and secure the object on the network is mirrored as compensation to the artist, creating a direct link between network value and creator reward.",
14
+ "gas_price": "Gas price",
15
+ "cost_to_mint": "Cost to mint",
16
+ "ethereum_fee": "Ethereum fee (50%)",
17
+ "artist_compensation": "Artist comp. (50%)",
18
+ "mint_price": "Mint price",
19
+ "mint_more_info": "Mints of more than one don't increase the Ethereum fee, resulting in higher artist compensation.",
20
+ "amount": "Amount",
21
+ "eth_fee": "Ethereum fee",
22
+ "artist_comp": "Artist comp."
52
23
  },
53
- "p5": {
54
- "static": "Static",
55
- "p5_script": "P5 Script"
24
+ "profile": {
25
+ "address_copied": "copied...",
26
+ "edit_button": "Edit Profile",
27
+ "add_collection_button": "Collection",
28
+ "your_collections": "Your Collections"
56
29
  },
57
- "preview": {
58
- "title": "Preview",
59
- "no_description": "No description"
30
+ "collections_overview": {
31
+ "no_collections": "It looks like you haven't deployed any collections.",
32
+ "create_first": "Create Your First",
33
+ "no_collections_other": "It looks like this account hasn't deployed any collections.",
34
+ "querying_blockchain": "Querying the blockchain..."
60
35
  },
61
- "select": {
62
- "install_new": "Install New"
63
- }
64
- },
65
- "renderer": {
66
- "install_button": "Install",
67
- "add_custom": "Add Custom Renderer",
68
- "installed": "Installed Renderers",
69
- "available": "Available Renderers",
70
- "all_installed": "All known Renderers installed"
71
- },
72
- "token": {
73
- "by": "By",
74
- "closes_in": "Closes in {time}",
75
- "closed_ago": "Closed {time} ago",
76
- "you_own": "You own {ownedBalance} {tokens}",
77
- "mint_timeline": "Mint Timeline",
78
- "artist_mint": "Artist Mint",
79
- "load_more": "Load more",
80
- "blocks_ago": "just now | one block ago | {blocks} blocks ago",
81
- "loading_mint_history": "Loading Mint History...",
82
- "view": "View"
83
- },
84
- "transaction_flow": {
85
- "view_on_etherscan": "View on Etherscan",
86
- "cancel": "Cancel"
87
- },
88
- "create": {
89
- "title": "Create New",
90
- "alert_new": {
91
- "title": "Create New Collection",
92
- "text": "Note this just creates the collection smart contract. You'll be able to mint individual artifacts within the collection after collection deployment."
36
+ "collection": {
37
+ "unnamed": "Unnamed Collection",
38
+ "created_at_block": "Created at Block",
39
+ "by": "By",
40
+ "no_tokens": "No tokens yet.",
41
+ "withdraw": "Withdraw"
42
+ },
43
+ "mint": {
44
+ "base": {
45
+ "note": {
46
+ "start": "Note: This should be a small file, preferably an SVG like",
47
+ "link_text": "this one (810 bytes)",
48
+ "end": "If it is larger than what we can store within one transaction, the token creation will be split up into multiple transactions."
49
+ },
50
+ "title_placeholder": "Title",
51
+ "description_placeholder": "Description"
52
+ },
53
+ "p5": {
54
+ "static": "Static",
55
+ "p5_script": "P5 Script"
56
+ },
57
+ "preview": {
58
+ "title": "Preview",
59
+ "no_description": "No description"
60
+ },
61
+ "select": {
62
+ "install_new": "Install New"
63
+ }
64
+ },
65
+ "renderer": {
66
+ "install_button": "Install",
67
+ "add_custom": "Add Custom Renderer",
68
+ "installed": "Installed Renderers",
69
+ "available": "Available Renderers",
70
+ "all_installed": "All known Renderers installed"
93
71
  },
94
- "note": {
95
- "start": "Note: This should be a small file, preferably a simple SVG like",
96
- "link_text": "this one (153 bytes)",
97
- "end": "Try to make it less than 10kb."
72
+ "token": {
73
+ "by": "By",
74
+ "closes_in": "Closes in {time}",
75
+ "closed_ago": "Closed {time} ago",
76
+ "you_own": "You own {ownedBalance} {tokens}",
77
+ "mint_timeline": "Mint Timeline",
78
+ "artist_mint": "Artist Mint",
79
+ "load_more": "Load more",
80
+ "blocks_ago": "just now | one block ago | {blocks} blocks ago",
81
+ "loading_mint_history": "Loading Mint History...",
82
+ "view": "View"
98
83
  },
99
- "preview": {
100
- "collection": "Collection",
101
- "token": "Token",
102
- "no_description": "No description"
84
+ "transaction_flow": {
85
+ "view_on_etherscan": "View on Etherscan",
86
+ "cancel": "Cancel"
103
87
  },
104
- "form": {
105
- "title_placeholder": "Title",
106
- "symbol_placeholder": "Symbol",
107
- "description_placeholder": "Description",
108
- "deploy_button": "Deploy"
88
+ "create": {
89
+ "title": "Create New",
90
+ "alert_new": {
91
+ "title": "Create New Collection",
92
+ "text": "Note this just creates the collection smart contract. You'll be able to mint individual artifacts within the collection after collection deployment."
93
+ },
94
+ "note": {
95
+ "start": "Note: This should be a small file, preferably a simple SVG like",
96
+ "link_text": "this one (153 bytes)",
97
+ "end": "Try to make it less than 10kb."
98
+ },
99
+ "preview": {
100
+ "collection": "Collection",
101
+ "token": "Token",
102
+ "no_description": "No description"
103
+ },
104
+ "form": {
105
+ "title_placeholder": "Title",
106
+ "symbol_placeholder": "Symbol",
107
+ "description_placeholder": "Description",
108
+ "deploy_method": {
109
+ "create": "Create",
110
+ "clone": "Clone (10x cheaper deployment)",
111
+ "note_create": "Deploying a completely independent Mint collection means creating a new contract instance with its own unique code, which is more expensive upfront. This initial deployment cost is higher than that of a proxy clone, but it offers a small saving on each individual mint or interaction. This is because each call is directed straight to the contract without the intermediary steps required by a proxy, reducing gas usage for repetitive transactions.",
112
+ "note_clone": "When using a proxy contract clone, the deployment cost is lower since it reuses the logic of the Mint collection contract template. The proxy contract points to the original contract for its code, making deployment cheaper than a fresh contract creation. However, this setup may lead to slightly higher costs on individual interactions, like minting, as each call involves additional steps to interact with the proxy."
113
+ },
114
+ "deploy_button": "Deploy"
115
+ }
109
116
  }
110
- }
111
117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visualizevalue/mint-app-base",
3
- "version": "0.1.81",
3
+ "version": "0.1.83",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "dependencies": {
@@ -67,6 +67,20 @@
67
67
  <FormInput v-model="symbol" :placeholder="$t('create.form.symbol_placeholder')" required />
68
68
  </FormGroup>
69
69
  <FormInput v-model="description" :placeholder="$t('create.form.description_placeholder')" />
70
+
71
+ <hr>
72
+
73
+ <div class="creation-type">
74
+ <div class="radio form-group">
75
+ <input type="radio" id="creation-type-create" value="create" v-model="creationType" />
76
+ <label for="creation-type-create">{{ $t('create.form.deploy_method.create') }}</label>
77
+
78
+ <input type="radio" id="creation-type-clone" value="clone" v-model="creationType" />
79
+ <label for="creation-type-clone">{{ $t('create.form.deploy_method.clone') }}</label>
80
+ </div>
81
+ <p v-if="creationType === 'create'">{{ $t('create.form.deploy_method.note_create') }}</p>
82
+ <p v-else>{{ $t('create.form.deploy_method.note_clone') }}</p>
83
+ </div>
70
84
  </div>
71
85
 
72
86
  <Actions>
@@ -92,6 +106,7 @@ const image = ref('')
92
106
  const title = ref('')
93
107
  const symbol = ref('')
94
108
  const description = ref('')
109
+ const creationType = ref('create')
95
110
 
96
111
  const { $wagmi } = useNuxtApp()
97
112
  const id = useArtistId()
@@ -112,7 +127,7 @@ const deployRequest = computed(() => async () => {
112
127
  abi: FACTORY_ABI,
113
128
  chainId,
114
129
  address: config.public.factoryAddress,
115
- functionName: 'create',
130
+ functionName: creationType.value,
116
131
  args: [
117
132
  title.value,
118
133
  symbol.value,
@@ -185,4 +200,10 @@ form {
185
200
  }
186
201
  }
187
202
  }
203
+
204
+ .creation-type {
205
+ p {
206
+ font-size: var(--font-sm);
207
+ }
208
+ }
188
209
  </style>