@medialane/ui 0.234.0 → 0.236.0
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/dist/components/launchpad/collection-picker.cjs +147 -0
- package/dist/components/launchpad/collection-picker.cjs.map +1 -0
- package/dist/components/launchpad/collection-picker.d.cts +13 -0
- package/dist/components/launchpad/collection-picker.d.ts +13 -0
- package/dist/components/launchpad/collection-picker.js +113 -0
- package/dist/components/launchpad/collection-picker.js.map +1 -0
- package/dist/components/launchpad/single-edition-mint.cjs +427 -0
- package/dist/components/launchpad/single-edition-mint.cjs.map +1 -0
- package/dist/components/launchpad/single-edition-mint.d.cts +8 -0
- package/dist/components/launchpad/single-edition-mint.d.ts +8 -0
- package/dist/components/launchpad/single-edition-mint.js +393 -0
- package/dist/components/launchpad/single-edition-mint.js.map +1 -0
- package/dist/components/launchpad/tier-mint-form.cjs +425 -0
- package/dist/components/launchpad/tier-mint-form.cjs.map +1 -0
- package/dist/components/launchpad/tier-mint-form.d.cts +13 -0
- package/dist/components/launchpad/tier-mint-form.d.ts +13 -0
- package/dist/components/launchpad/tier-mint-form.js +391 -0
- package/dist/components/launchpad/tier-mint-form.js.map +1 -0
- package/dist/components/launchpad/tier-mint-presets.cjs +96 -0
- package/dist/components/launchpad/tier-mint-presets.cjs.map +1 -0
- package/dist/components/launchpad/tier-mint-presets.d.cts +58 -0
- package/dist/components/launchpad/tier-mint-presets.d.ts +58 -0
- package/dist/components/launchpad/tier-mint-presets.js +71 -0
- package/dist/components/launchpad/tier-mint-presets.js.map +1 -0
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/run-intent-calls.cjs +9 -2
- package/dist/utils/run-intent-calls.cjs.map +1 -1
- package/dist/utils/run-intent-calls.d.cts +10 -1
- package/dist/utils/run-intent-calls.d.ts +10 -1
- package/dist/utils/run-intent-calls.js +7 -1
- package/dist/utils/run-intent-calls.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var single_edition_mint_exports = {};
|
|
31
|
+
__export(single_edition_mint_exports, {
|
|
32
|
+
SingleEditionMint: () => SingleEditionMint
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(single_edition_mint_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
var import_react_hook_form = require("react-hook-form");
|
|
38
|
+
var import_zod = require("@hookform/resolvers/zod");
|
|
39
|
+
var z = __toESM(require("zod"), 1);
|
|
40
|
+
var import_lucide_react = require("lucide-react");
|
|
41
|
+
var import_sdk = require("@medialane/sdk");
|
|
42
|
+
var import_starknet = require("@medialane/sdk/starknet");
|
|
43
|
+
var import_image = __toESM(require("../image.js"), 1);
|
|
44
|
+
var import_input = require("../input.js");
|
|
45
|
+
var import_textarea = require("../textarea.js");
|
|
46
|
+
var import_select = require("../select.js");
|
|
47
|
+
var import_collapsible = require("../collapsible.js");
|
|
48
|
+
var import_collapsible_section = require("../collapsible-section.js");
|
|
49
|
+
var import_form = require("../form.js");
|
|
50
|
+
var import_create_form_primitives = require("../create-form-primitives.js");
|
|
51
|
+
var import_ip_type_fields = require("../ip-type-fields.js");
|
|
52
|
+
var import_claim_route_shell = require("../claim-route-shell.js");
|
|
53
|
+
var import_creation_success = require("../creation-success.js");
|
|
54
|
+
var import_medialane_collection_card = require("../medialane-collection-card.js");
|
|
55
|
+
var import_transaction_dialog = require("../transaction-dialog.js");
|
|
56
|
+
var import_wallet_required = require("../wallet-required.js");
|
|
57
|
+
var import_medialane_app = require("../medialane-app.js");
|
|
58
|
+
var import_reward_earned = require("../rewards/reward-earned.js");
|
|
59
|
+
var import_collection_picker = require("./collection-picker.js");
|
|
60
|
+
var import_ip = require("../../data/ip.js");
|
|
61
|
+
var import_cn = require("../../utils/cn.js");
|
|
62
|
+
var import_run_intent_calls = require("../../utils/run-intent-calls.js");
|
|
63
|
+
var import_ipfs_upload = require("../../utils/ipfs-upload.js");
|
|
64
|
+
var import_use_collections = require("../../utils/use-collections.js");
|
|
65
|
+
var import_use_transaction = require("../../utils/use-transaction.js");
|
|
66
|
+
var import_portfolio_cache = require("../../utils/portfolio-cache.js");
|
|
67
|
+
const schema = z.object({
|
|
68
|
+
collectionId: z.string().min(1, "Select a collection"),
|
|
69
|
+
name: z.string().min(1, "Name required").max(import_sdk.FIELD_LIMITS.name),
|
|
70
|
+
description: z.string().max(import_sdk.FIELD_LIMITS.description).optional(),
|
|
71
|
+
external_url: z.string().max(500).refine((v) => !v || v.startsWith("http://") || v.startsWith("https://"), { message: "Must start with http:// or https://" }).optional(),
|
|
72
|
+
ipType: z.enum(import_ip.IP_TYPES),
|
|
73
|
+
licenseType: z.string().min(1, "License required"),
|
|
74
|
+
commercialUse: z.enum(["Yes", "No"]),
|
|
75
|
+
derivatives: z.enum(["Allowed", "Not Allowed", "Share-Alike"]),
|
|
76
|
+
attribution: z.enum(["Required", "Not Required"]),
|
|
77
|
+
geographicScope: z.string(),
|
|
78
|
+
aiPolicy: z.enum(["Allowed", "Not Allowed", "Training Only"]),
|
|
79
|
+
royalty: z.coerce.number().min(0).max(50),
|
|
80
|
+
image: z.instanceof(File).optional()
|
|
81
|
+
});
|
|
82
|
+
const DEFAULTS = {
|
|
83
|
+
collectionId: "",
|
|
84
|
+
name: "",
|
|
85
|
+
description: "",
|
|
86
|
+
external_url: "",
|
|
87
|
+
ipType: "NFT",
|
|
88
|
+
licenseType: "CC BY-SA",
|
|
89
|
+
commercialUse: "Yes",
|
|
90
|
+
derivatives: "Share-Alike",
|
|
91
|
+
attribution: "Required",
|
|
92
|
+
geographicScope: "Worldwide",
|
|
93
|
+
aiPolicy: "Not Allowed",
|
|
94
|
+
royalty: 0
|
|
95
|
+
};
|
|
96
|
+
function SingleEditionMint({ aside }) {
|
|
97
|
+
const app = (0, import_medialane_app.useMedialaneApp)();
|
|
98
|
+
const walletAddress = app.walletAddress;
|
|
99
|
+
const tx = (0, import_use_transaction.useTransaction)();
|
|
100
|
+
const { collections: allCollections, isLoading: collectionsLoading } = (0, import_use_collections.useCollectionsByOwner)(walletAddress ?? null);
|
|
101
|
+
const collections = allCollections.filter((c) => (0, import_sdk.getService)(c.service)?.id === "mip-erc721" && c.collectionId != null);
|
|
102
|
+
const [imageFile, setImageFile] = (0, import_react.useState)(null);
|
|
103
|
+
const [imagePreview, setImagePreview] = (0, import_react.useState)(null);
|
|
104
|
+
const [advancedOpen, setAdvancedOpen] = (0, import_react.useState)(false);
|
|
105
|
+
const [licensingOpen, setLicensingOpen] = (0, import_react.useState)(false);
|
|
106
|
+
const [ipTypeOpen, setIpTypeOpen] = (0, import_react.useState)(false);
|
|
107
|
+
const [metadataResetKey, setMetadataResetKey] = (0, import_react.useState)(0);
|
|
108
|
+
const metadataFieldsRef = (0, import_react.useRef)([]);
|
|
109
|
+
const previewUrlRef = (0, import_react.useRef)(null);
|
|
110
|
+
const imageInputRef = (0, import_react.useRef)(null);
|
|
111
|
+
(0, import_react.useEffect)(() => {
|
|
112
|
+
return () => {
|
|
113
|
+
if (previewUrlRef.current) URL.revokeObjectURL(previewUrlRef.current);
|
|
114
|
+
};
|
|
115
|
+
}, []);
|
|
116
|
+
const form = (0, import_react_hook_form.useForm)({ resolver: (0, import_zod.zodResolver)(schema), defaultValues: DEFAULTS });
|
|
117
|
+
const selectedCollectionId = form.watch("collectionId");
|
|
118
|
+
const selectedCollection = collections.find((c) => c.collectionId === selectedCollectionId) ?? null;
|
|
119
|
+
(0, import_react.useEffect)(() => {
|
|
120
|
+
if (collections.length > 0 && !form.getValues("collectionId")) form.setValue("collectionId", collections[0].collectionId);
|
|
121
|
+
}, [collections, form]);
|
|
122
|
+
(0, import_react.useEffect)(() => {
|
|
123
|
+
if (selectedCollection?.contractAddress && !form.getValues("external_url")) {
|
|
124
|
+
form.setValue("external_url", `https://medialane.io${(0, import_sdk.collectionHref)("STARKNET", selectedCollection.contractAddress)}`);
|
|
125
|
+
}
|
|
126
|
+
}, [selectedCollection?.contractAddress, form]);
|
|
127
|
+
const handleLicenseChange = (value) => {
|
|
128
|
+
form.setValue("licenseType", value);
|
|
129
|
+
const def = import_ip.LICENSE_TYPES.find((l) => l.value === value);
|
|
130
|
+
if (def) {
|
|
131
|
+
form.setValue("commercialUse", def.commercialUse);
|
|
132
|
+
form.setValue("derivatives", def.derivatives);
|
|
133
|
+
form.setValue("attribution", def.attribution);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const uploadDocument = async (file) => {
|
|
137
|
+
await app.ensureSignedIn?.();
|
|
138
|
+
return (await (0, import_ipfs_upload.uploadFileToIpfs)(app.getClient().api, file, "document")).uri;
|
|
139
|
+
};
|
|
140
|
+
const handleAgain = () => {
|
|
141
|
+
tx.reset();
|
|
142
|
+
form.reset({ ...DEFAULTS, collectionId: collections[0]?.collectionId ?? "" });
|
|
143
|
+
metadataFieldsRef.current = [];
|
|
144
|
+
setMetadataResetKey((key) => key + 1);
|
|
145
|
+
setImageFile(null);
|
|
146
|
+
setImagePreview(null);
|
|
147
|
+
if (imageInputRef.current) imageInputRef.current.value = "";
|
|
148
|
+
};
|
|
149
|
+
const onSubmit = (values) => {
|
|
150
|
+
if (!walletAddress) return;
|
|
151
|
+
void tx.run(async (signer) => {
|
|
152
|
+
await app.ensureSignedIn?.();
|
|
153
|
+
const api = app.getClient().api;
|
|
154
|
+
const pinned = await (0, import_ipfs_upload.pinAssetMetadata)(api, {
|
|
155
|
+
name: values.name,
|
|
156
|
+
description: values.description ?? "",
|
|
157
|
+
externalUrl: values.external_url,
|
|
158
|
+
creator: walletAddress,
|
|
159
|
+
ipType: values.ipType,
|
|
160
|
+
licenseType: values.licenseType,
|
|
161
|
+
commercialUse: values.commercialUse,
|
|
162
|
+
derivatives: values.derivatives,
|
|
163
|
+
attribution: values.attribution,
|
|
164
|
+
geographicScope: values.geographicScope,
|
|
165
|
+
aiPolicy: values.aiPolicy,
|
|
166
|
+
royalty: String(values.royalty),
|
|
167
|
+
imageFile,
|
|
168
|
+
templateTraits: metadataFieldsRef.current.filter((f) => f.traitType.trim() && f.value.trim()).map((f) => ({ traitType: f.traitType.trim(), value: f.value.trim() }))
|
|
169
|
+
});
|
|
170
|
+
await (0, import_run_intent_calls.runIntentCalls)(
|
|
171
|
+
signer,
|
|
172
|
+
() => api.intents.create("mint", {
|
|
173
|
+
owner: walletAddress,
|
|
174
|
+
collectionId: values.collectionId,
|
|
175
|
+
recipient: walletAddress,
|
|
176
|
+
tokenUri: pinned.uri,
|
|
177
|
+
royaltyBps: Math.round(values.royalty * 100)
|
|
178
|
+
})
|
|
179
|
+
);
|
|
180
|
+
(0, import_portfolio_cache.invalidatePortfolioCache)(walletAddress);
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
const mintedTokenId = tx.receipt && selectedCollection ? (0, import_starknet.mintedTokenIdFromReceipt)(tx.receipt, selectedCollection.contractAddress) : null;
|
|
184
|
+
const mintedHref = mintedTokenId && selectedCollection ? (0, import_sdk.assetHref)("STARKNET", selectedCollection.contractAddress, mintedTokenId) : null;
|
|
185
|
+
const busy = tx.phase !== "idle" || collectionsLoading || collections.length === 0;
|
|
186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
187
|
+
import_wallet_required.WalletRequired,
|
|
188
|
+
{
|
|
189
|
+
icon: import_lucide_react.ImagePlus,
|
|
190
|
+
iconClassName: "text-brand-blue",
|
|
191
|
+
title: "Secure your account to create",
|
|
192
|
+
description: "Publish your creative work as a single-copy NFT in a collection you own.",
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_transaction_dialog.TransactionDialog, { tx, title: "Mint NFT", workingLabel: "Minting your work\u2026", firstStepLabel: "Upload to IPFS", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
195
|
+
import_creation_success.CreationSuccess,
|
|
196
|
+
{
|
|
197
|
+
name: form.getValues("name") || "Your asset",
|
|
198
|
+
image: imagePreview,
|
|
199
|
+
caption: "Your work is live",
|
|
200
|
+
primary: mintedHref ? { href: mintedHref, label: "View asset" } : { href: "/portfolio/assets", label: "View portfolio" },
|
|
201
|
+
secondary: mintedHref ? { href: "/portfolio/assets", label: "View portfolio" } : void 0,
|
|
202
|
+
onAgain: handleAgain,
|
|
203
|
+
againLabel: "Mint another",
|
|
204
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_reward_earned.RewardEarned, { actionType: "mint_asset" })
|
|
205
|
+
}
|
|
206
|
+
) }),
|
|
207
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
208
|
+
import_claim_route_shell.ClaimRouteShell,
|
|
209
|
+
{
|
|
210
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ImagePlus, { className: "h-4 w-4 text-white" }),
|
|
211
|
+
title: "Mint NFT",
|
|
212
|
+
subtitle: "Publish your creative work as a single-copy NFT in a collection you own \u2014 free to mint, and it's yours.",
|
|
213
|
+
aside: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
214
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
215
|
+
import_medialane_collection_card.MedialaneCollectionCard,
|
|
216
|
+
{
|
|
217
|
+
image: imagePreview,
|
|
218
|
+
name: form.watch("name"),
|
|
219
|
+
collection: selectedCollection?.name || "IP Asset",
|
|
220
|
+
creator: walletAddress ? `${walletAddress.slice(0, 6)}\u2026${walletAddress.slice(-4)}` : void 0,
|
|
221
|
+
creatorHref: walletAddress ? (0, import_sdk.profileHref)({ address: walletAddress }) : void 0
|
|
222
|
+
}
|
|
223
|
+
),
|
|
224
|
+
aside
|
|
225
|
+
] }),
|
|
226
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
|
|
227
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "collectionId", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
228
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormLabel, { className: "flex items-center gap-1.5", children: [
|
|
229
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Boxes, { className: "h-4 w-4" }),
|
|
230
|
+
"Collection *"
|
|
231
|
+
] }),
|
|
232
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
233
|
+
import_collection_picker.CollectionPicker,
|
|
234
|
+
{
|
|
235
|
+
collections,
|
|
236
|
+
loading: collectionsLoading,
|
|
237
|
+
value: field.value,
|
|
238
|
+
onChange: field.onChange,
|
|
239
|
+
newCollectionHref: "/launchpad/single-editions/collection"
|
|
240
|
+
}
|
|
241
|
+
),
|
|
242
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
243
|
+
] }) }),
|
|
244
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
|
|
245
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: "text-sm font-medium", children: "Cover image" }),
|
|
246
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
247
|
+
"div",
|
|
248
|
+
{
|
|
249
|
+
className: "border-2 border-dashed border-border rounded-xl p-8 text-center cursor-pointer hover:border-primary/50 transition-colors",
|
|
250
|
+
role: "button",
|
|
251
|
+
tabIndex: 0,
|
|
252
|
+
"aria-label": "Upload image",
|
|
253
|
+
onClick: () => imageInputRef.current?.click(),
|
|
254
|
+
onKeyDown: (e) => {
|
|
255
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
256
|
+
e.preventDefault();
|
|
257
|
+
imageInputRef.current?.click();
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
children: [
|
|
261
|
+
imagePreview ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative mx-auto h-48 w-48 overflow-hidden rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: imagePreview, alt: "Preview", fill: true, unoptimized: true, className: "object-cover" }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-2 text-muted-foreground", children: [
|
|
262
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Upload, { className: "h-8 w-8" }),
|
|
263
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm", children: "Click to upload (JPG, PNG, GIF, SVG, WebP)" })
|
|
264
|
+
] }),
|
|
265
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
266
|
+
"input",
|
|
267
|
+
{
|
|
268
|
+
ref: imageInputRef,
|
|
269
|
+
type: "file",
|
|
270
|
+
accept: (0, import_sdk.acceptFor)("image"),
|
|
271
|
+
className: "hidden",
|
|
272
|
+
onChange: (e) => {
|
|
273
|
+
const file = e.target.files?.[0];
|
|
274
|
+
if (!file) return;
|
|
275
|
+
const fileError = (0, import_sdk.uploadError)(file, "image");
|
|
276
|
+
if (fileError) {
|
|
277
|
+
form.setError("image", { message: fileError });
|
|
278
|
+
e.target.value = "";
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
form.clearErrors("image");
|
|
282
|
+
setImageFile(file);
|
|
283
|
+
form.setValue("image", file);
|
|
284
|
+
if (previewUrlRef.current) URL.revokeObjectURL(previewUrlRef.current);
|
|
285
|
+
const objectUrl = URL.createObjectURL(file);
|
|
286
|
+
previewUrlRef.current = objectUrl;
|
|
287
|
+
setImagePreview(objectUrl);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
)
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
),
|
|
294
|
+
form.formState.errors.image && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: form.formState.errors.image.message })
|
|
295
|
+
] }),
|
|
296
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "name", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Name *" }),
|
|
298
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { placeholder: "My Creative Work", ...field }) }),
|
|
299
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
300
|
+
] }) }),
|
|
301
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "description", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
302
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Description" }),
|
|
303
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_textarea.Textarea, { placeholder: "Describe your work, its story, and any context for buyers\u2026", rows: 4, ...field }) }),
|
|
304
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
305
|
+
] }) }),
|
|
306
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "external_url", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
307
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormLabel, { children: [
|
|
308
|
+
"External link ",
|
|
309
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
|
|
310
|
+
] }),
|
|
311
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { placeholder: "https://yourwebsite.com", ...field }) }),
|
|
312
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
313
|
+
] }) }),
|
|
314
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
315
|
+
import_collapsible_section.CollapsibleSection,
|
|
316
|
+
{
|
|
317
|
+
open: licensingOpen,
|
|
318
|
+
onOpenChange: setLicensingOpen,
|
|
319
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShieldCheck, { className: "h-4 w-4 text-primary" }),
|
|
320
|
+
label: "Licensing Terms",
|
|
321
|
+
hint: "Optional \xB7 Berne Convention",
|
|
322
|
+
children: [
|
|
323
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: "Set how others can use your work. These terms are saved permanently with it as proof of authorship." }),
|
|
324
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "licenseType", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
325
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "License" }),
|
|
326
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.Select, { value: field.value, onValueChange: handleLicenseChange, children: [
|
|
327
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectValue, {}) }) }),
|
|
328
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectContent, { children: import_ip.LICENSE_TYPES.map((l) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItem, { value: l.value, children: l.label }, l.value)) })
|
|
329
|
+
] }),
|
|
330
|
+
(() => {
|
|
331
|
+
const def = import_ip.LICENSE_TYPES.find((l) => l.value === field.value);
|
|
332
|
+
return def ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground mt-1", children: def.description }) : null;
|
|
333
|
+
})(),
|
|
334
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
335
|
+
] }) }),
|
|
336
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "commercialUse", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
337
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Commercial Use" }),
|
|
338
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: field.value, options: ["Yes", "No"], onChange: field.onChange })
|
|
339
|
+
] }) }),
|
|
340
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "derivatives", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
341
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Derivatives" }),
|
|
342
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: field.value, options: import_ip.DERIVATIVES_OPTIONS, onChange: field.onChange })
|
|
343
|
+
] }) }),
|
|
344
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "attribution", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
345
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Attribution" }),
|
|
346
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: field.value, options: ["Required", "Not Required"], onChange: field.onChange })
|
|
347
|
+
] }) }),
|
|
348
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_collapsible.Collapsible, { open: advancedOpen, onOpenChange: setAdvancedOpen, children: [
|
|
349
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_collapsible.CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors", children: [
|
|
350
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDown, { className: (0, import_cn.cn)("h-3.5 w-3.5 transition-transform", advancedOpen && "rotate-180") }),
|
|
351
|
+
"Advanced options"
|
|
352
|
+
] }) }),
|
|
353
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_collapsible.CollapsibleContent, { className: "space-y-4 pt-3", children: [
|
|
354
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "geographicScope", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
355
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Territory" }),
|
|
356
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.Select, { onValueChange: field.onChange, value: field.value, children: [
|
|
357
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectValue, {}) }) }),
|
|
358
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectContent, { children: import_ip.GEOGRAPHIC_SCOPES.map((s) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItem, { value: s, children: s }, s)) })
|
|
359
|
+
] })
|
|
360
|
+
] }) }),
|
|
361
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "aiPolicy", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
362
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "AI & Data Mining" }),
|
|
363
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: field.value, options: import_ip.AI_POLICIES, onChange: field.onChange })
|
|
364
|
+
] }) }),
|
|
365
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "royalty", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
366
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Royalty % (0\u201350)" }),
|
|
367
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { type: "number", min: 0, max: 50, step: 0.5, placeholder: "0", ...field, onChange: (e) => field.onChange(parseFloat(e.target.value) || 0) }) }),
|
|
368
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
369
|
+
] }) })
|
|
370
|
+
] })
|
|
371
|
+
] })
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
),
|
|
375
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
376
|
+
import_collapsible_section.CollapsibleSection,
|
|
377
|
+
{
|
|
378
|
+
open: ipTypeOpen,
|
|
379
|
+
onOpenChange: setIpTypeOpen,
|
|
380
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Layers, { className: "h-4 w-4 text-primary" }),
|
|
381
|
+
label: "IP Type & Metadata",
|
|
382
|
+
hint: "Optional",
|
|
383
|
+
children: [
|
|
384
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: "Choose a content type, fill suggested metadata, or add your own trait pairs." }),
|
|
385
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "ipType", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
386
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "IP Type" }),
|
|
387
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.Select, { onValueChange: field.onChange, value: field.value, children: [
|
|
388
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectValue, {}) }) }),
|
|
389
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectContent, { children: import_ip.IP_TYPES.map((t) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItem, { value: t, children: t }, t)) })
|
|
390
|
+
] })
|
|
391
|
+
] }) }),
|
|
392
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
393
|
+
import_ip_type_fields.IPTypeFields,
|
|
394
|
+
{
|
|
395
|
+
ipType: form.watch("ipType"),
|
|
396
|
+
onChange: (fields) => {
|
|
397
|
+
metadataFieldsRef.current = fields;
|
|
398
|
+
},
|
|
399
|
+
uploadDocument
|
|
400
|
+
},
|
|
401
|
+
metadataResetKey
|
|
402
|
+
)
|
|
403
|
+
]
|
|
404
|
+
}
|
|
405
|
+
),
|
|
406
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
407
|
+
"button",
|
|
408
|
+
{
|
|
409
|
+
type: "submit",
|
|
410
|
+
disabled: busy,
|
|
411
|
+
className: `w-full h-12 text-base font-semibold text-white rounded-xl flex items-center justify-center gap-2 transition-all hover:brightness-110 active:scale-[0.98] bg-brand-blue ${busy ? "opacity-40 pointer-events-none" : ""}`,
|
|
412
|
+
children: "Mint NFT"
|
|
413
|
+
}
|
|
414
|
+
),
|
|
415
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-center text-muted-foreground", children: "Free to mint \u2014 protocol fee is zero." })
|
|
416
|
+
] }) })
|
|
417
|
+
}
|
|
418
|
+
)
|
|
419
|
+
]
|
|
420
|
+
}
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
424
|
+
0 && (module.exports = {
|
|
425
|
+
SingleEditionMint
|
|
426
|
+
});
|
|
427
|
+
//# sourceMappingURL=single-edition-mint.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/launchpad/single-edition-mint.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport * as z from \"zod\";\nimport { Boxes, ChevronDown, ImagePlus, Layers, ShieldCheck, Upload } from \"lucide-react\";\nimport { FIELD_LIMITS, acceptFor, assetHref, collectionHref, getService, profileHref, uploadError } from \"@medialane/sdk\";\nimport { mintedTokenIdFromReceipt } from \"@medialane/sdk/starknet\";\nimport Image from \"../image.js\";\nimport { Input } from \"../input.js\";\nimport { Textarea } from \"../textarea.js\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"../select.js\";\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"../collapsible.js\";\nimport { CollapsibleSection } from \"../collapsible-section.js\";\nimport { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from \"../form.js\";\nimport { ToggleGroup } from \"../create-form-primitives.js\";\nimport { IPTypeFields } from \"../ip-type-fields.js\";\nimport { ClaimRouteShell } from \"../claim-route-shell.js\";\nimport { CreationSuccess } from \"../creation-success.js\";\nimport { MedialaneCollectionCard } from \"../medialane-collection-card.js\";\nimport { TransactionDialog } from \"../transaction-dialog.js\";\nimport { WalletRequired } from \"../wallet-required.js\";\nimport { useMedialaneApp } from \"../medialane-app.js\";\nimport { RewardEarned } from \"../rewards/reward-earned.js\";\nimport { CollectionPicker } from \"./collection-picker.js\";\nimport { AI_POLICIES, DERIVATIVES_OPTIONS, GEOGRAPHIC_SCOPES, IP_TYPES, LICENSE_TYPES, type IPType } from \"../../data/ip.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { runIntentCalls } from \"../../utils/run-intent-calls.js\";\nimport { pinAssetMetadata, uploadFileToIpfs } from \"../../utils/ipfs-upload.js\";\nimport { useCollectionsByOwner } from \"../../utils/use-collections.js\";\nimport { useTransaction } from \"../../utils/use-transaction.js\";\nimport { invalidatePortfolioCache } from \"../../utils/portfolio-cache.js\";\nimport type { MetadataField } from \"../ip-type-fields.js\";\n\nconst schema = z.object({\n collectionId: z.string().min(1, \"Select a collection\"),\n name: z.string().min(1, \"Name required\").max(FIELD_LIMITS.name),\n description: z.string().max(FIELD_LIMITS.description).optional(),\n external_url: z\n .string()\n .max(500)\n .refine((v) => !v || v.startsWith(\"http://\") || v.startsWith(\"https://\"), { message: \"Must start with http:// or https://\" })\n .optional(),\n ipType: z.enum(IP_TYPES),\n licenseType: z.string().min(1, \"License required\"),\n commercialUse: z.enum([\"Yes\", \"No\"]),\n derivatives: z.enum([\"Allowed\", \"Not Allowed\", \"Share-Alike\"]),\n attribution: z.enum([\"Required\", \"Not Required\"]),\n geographicScope: z.string(),\n aiPolicy: z.enum([\"Allowed\", \"Not Allowed\", \"Training Only\"]),\n royalty: z.coerce.number().min(0).max(50),\n image: z.instanceof(File).optional(),\n});\ntype FormValues = z.infer<typeof schema>;\n\nconst DEFAULTS: FormValues = {\n collectionId: \"\",\n name: \"\",\n description: \"\",\n external_url: \"\",\n ipType: \"NFT\",\n licenseType: \"CC BY-SA\",\n commercialUse: \"Yes\",\n derivatives: \"Share-Alike\",\n attribution: \"Required\",\n geographicScope: \"Worldwide\",\n aiPolicy: \"Not Allowed\",\n royalty: 0,\n};\n\nexport function SingleEditionMint({ aside }: { aside?: ReactNode }) {\n const app = useMedialaneApp();\n const walletAddress = app.walletAddress;\n const tx = useTransaction();\n const { collections: allCollections, isLoading: collectionsLoading } = useCollectionsByOwner(walletAddress ?? null);\n const collections = allCollections.filter((c) => getService(c.service)?.id === \"mip-erc721\" && c.collectionId != null);\n\n const [imageFile, setImageFile] = useState<File | null>(null);\n const [imagePreview, setImagePreview] = useState<string | null>(null);\n const [advancedOpen, setAdvancedOpen] = useState(false);\n const [licensingOpen, setLicensingOpen] = useState(false);\n const [ipTypeOpen, setIpTypeOpen] = useState(false);\n const [metadataResetKey, setMetadataResetKey] = useState(0);\n const metadataFieldsRef = useRef<MetadataField[]>([]);\n const previewUrlRef = useRef<string | null>(null);\n const imageInputRef = useRef<HTMLInputElement | null>(null);\n\n useEffect(() => {\n return () => {\n if (previewUrlRef.current) URL.revokeObjectURL(previewUrlRef.current);\n };\n }, []);\n\n const form = useForm<FormValues>({ resolver: zodResolver(schema), defaultValues: DEFAULTS });\n const selectedCollectionId = form.watch(\"collectionId\");\n const selectedCollection = collections.find((c) => c.collectionId === selectedCollectionId) ?? null;\n\n useEffect(() => {\n if (collections.length > 0 && !form.getValues(\"collectionId\")) form.setValue(\"collectionId\", collections[0]!.collectionId!);\n }, [collections, form]);\n\n useEffect(() => {\n if (selectedCollection?.contractAddress && !form.getValues(\"external_url\")) {\n form.setValue(\"external_url\", `https://medialane.io${collectionHref(\"STARKNET\", selectedCollection.contractAddress)}`);\n }\n }, [selectedCollection?.contractAddress, form]);\n\n const handleLicenseChange = (value: string) => {\n form.setValue(\"licenseType\", value);\n const def = LICENSE_TYPES.find((l) => l.value === value);\n if (def) {\n form.setValue(\"commercialUse\", def.commercialUse);\n form.setValue(\"derivatives\", def.derivatives);\n form.setValue(\"attribution\", def.attribution);\n }\n };\n\n const uploadDocument = async (file: File) => {\n await app.ensureSignedIn?.();\n return (await uploadFileToIpfs(app.getClient().api, file, \"document\")).uri;\n };\n\n const handleAgain = () => {\n tx.reset();\n form.reset({ ...DEFAULTS, collectionId: collections[0]?.collectionId ?? \"\" });\n metadataFieldsRef.current = [];\n setMetadataResetKey((key) => key + 1);\n setImageFile(null);\n setImagePreview(null);\n if (imageInputRef.current) imageInputRef.current.value = \"\";\n };\n\n const onSubmit = (values: FormValues) => {\n if (!walletAddress) return;\n void tx.run(async (signer) => {\n await app.ensureSignedIn?.();\n const api = app.getClient().api;\n const pinned = await pinAssetMetadata(api, {\n name: values.name,\n description: values.description ?? \"\",\n externalUrl: values.external_url,\n creator: walletAddress,\n ipType: values.ipType,\n licenseType: values.licenseType,\n commercialUse: values.commercialUse,\n derivatives: values.derivatives,\n attribution: values.attribution,\n geographicScope: values.geographicScope,\n aiPolicy: values.aiPolicy,\n royalty: String(values.royalty),\n imageFile,\n templateTraits: metadataFieldsRef.current.filter((f) => f.traitType.trim() && f.value.trim()).map((f) => ({ traitType: f.traitType.trim(), value: f.value.trim() })),\n });\n await runIntentCalls(signer, () =>\n api.intents.create(\"mint\", {\n owner: walletAddress,\n collectionId: values.collectionId,\n recipient: walletAddress,\n tokenUri: pinned.uri,\n royaltyBps: Math.round(values.royalty * 100),\n }),\n );\n invalidatePortfolioCache(walletAddress);\n });\n };\n\n const mintedTokenId = tx.receipt && selectedCollection ? mintedTokenIdFromReceipt(tx.receipt, selectedCollection.contractAddress) : null;\n const mintedHref = mintedTokenId && selectedCollection ? assetHref(\"STARKNET\", selectedCollection.contractAddress, mintedTokenId) : null;\n const busy = tx.phase !== \"idle\" || collectionsLoading || collections.length === 0;\n\n return (\n <WalletRequired\n icon={ImagePlus}\n iconClassName=\"text-brand-blue\"\n title=\"Secure your account to create\"\n description=\"Publish your creative work as a single-copy NFT in a collection you own.\"\n >\n <TransactionDialog tx={tx} title=\"Mint NFT\" workingLabel=\"Minting your work…\" firstStepLabel=\"Upload to IPFS\">\n <CreationSuccess\n name={form.getValues(\"name\") || \"Your asset\"}\n image={imagePreview}\n caption=\"Your work is live\"\n primary={mintedHref ? { href: mintedHref, label: \"View asset\" } : { href: \"/portfolio/assets\", label: \"View portfolio\" }}\n secondary={mintedHref ? { href: \"/portfolio/assets\", label: \"View portfolio\" } : undefined}\n onAgain={handleAgain}\n againLabel=\"Mint another\"\n >\n <RewardEarned actionType=\"mint_asset\" />\n </CreationSuccess>\n </TransactionDialog>\n\n <ClaimRouteShell\n icon={<ImagePlus className=\"h-4 w-4 text-white\" />}\n title=\"Mint NFT\"\n subtitle=\"Publish your creative work as a single-copy NFT in a collection you own — free to mint, and it's yours.\"\n aside={\n <>\n <MedialaneCollectionCard\n image={imagePreview}\n name={form.watch(\"name\")}\n collection={selectedCollection?.name || \"IP Asset\"}\n creator={walletAddress ? `${walletAddress.slice(0, 6)}…${walletAddress.slice(-4)}` : undefined}\n creatorHref={walletAddress ? profileHref({ address: walletAddress }) : undefined}\n />\n {aside}\n </>\n }\n >\n <Form {...form}>\n <form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-6\">\n <FormField control={form.control} name=\"collectionId\" render={({ field }) => (\n <FormItem>\n <FormLabel className=\"flex items-center gap-1.5\"><Boxes className=\"h-4 w-4\" />Collection *</FormLabel>\n <CollectionPicker\n collections={collections}\n loading={collectionsLoading}\n value={field.value}\n onChange={field.onChange}\n newCollectionHref=\"/launchpad/single-editions/collection\"\n />\n <FormMessage />\n </FormItem>\n )} />\n\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">Cover image</label>\n <div\n className=\"border-2 border-dashed border-border rounded-xl p-8 text-center cursor-pointer hover:border-primary/50 transition-colors\"\n role=\"button\"\n tabIndex={0}\n aria-label=\"Upload image\"\n onClick={() => imageInputRef.current?.click()}\n onKeyDown={(e) => { if (e.key === \"Enter\" || e.key === \" \") { e.preventDefault(); imageInputRef.current?.click(); } }}\n >\n {imagePreview ? (\n <div className=\"relative mx-auto h-48 w-48 overflow-hidden rounded-lg\">\n <Image src={imagePreview} alt=\"Preview\" fill unoptimized className=\"object-cover\" />\n </div>\n ) : (\n <div className=\"flex flex-col items-center gap-2 text-muted-foreground\">\n <Upload className=\"h-8 w-8\" />\n <p className=\"text-sm\">Click to upload (JPG, PNG, GIF, SVG, WebP)</p>\n </div>\n )}\n <input\n ref={imageInputRef}\n type=\"file\"\n accept={acceptFor(\"image\")}\n className=\"hidden\"\n onChange={(e) => {\n const file = e.target.files?.[0];\n if (!file) return;\n const fileError = uploadError(file, \"image\");\n if (fileError) {\n form.setError(\"image\", { message: fileError });\n e.target.value = \"\";\n return;\n }\n form.clearErrors(\"image\");\n setImageFile(file);\n form.setValue(\"image\", file);\n if (previewUrlRef.current) URL.revokeObjectURL(previewUrlRef.current);\n const objectUrl = URL.createObjectURL(file);\n previewUrlRef.current = objectUrl;\n setImagePreview(objectUrl);\n }}\n />\n </div>\n {form.formState.errors.image && <p role=\"alert\" className=\"text-sm text-destructive\">{form.formState.errors.image.message}</p>}\n </div>\n\n <FormField control={form.control} name=\"name\" render={({ field }) => (\n <FormItem>\n <FormLabel>Name *</FormLabel>\n <FormControl><Input placeholder=\"My Creative Work\" {...field} /></FormControl>\n <FormMessage />\n </FormItem>\n )} />\n\n <FormField control={form.control} name=\"description\" render={({ field }) => (\n <FormItem>\n <FormLabel>Description</FormLabel>\n <FormControl><Textarea placeholder=\"Describe your work, its story, and any context for buyers…\" rows={4} {...field} /></FormControl>\n <FormMessage />\n </FormItem>\n )} />\n\n <FormField control={form.control} name=\"external_url\" render={({ field }) => (\n <FormItem>\n <FormLabel>External link <span className=\"text-muted-foreground font-normal\">(optional)</span></FormLabel>\n <FormControl><Input placeholder=\"https://yourwebsite.com\" {...field} /></FormControl>\n <FormMessage />\n </FormItem>\n )} />\n\n <CollapsibleSection\n open={licensingOpen}\n onOpenChange={setLicensingOpen}\n icon={<ShieldCheck className=\"h-4 w-4 text-primary\" />}\n label=\"Licensing Terms\"\n hint=\"Optional · Berne Convention\"\n >\n <p className=\"text-xs text-muted-foreground\">Set how others can use your work. These terms are saved permanently with it as proof of authorship.</p>\n <FormField control={form.control} name=\"licenseType\" render={({ field }) => (\n <FormItem>\n <FormLabel>License</FormLabel>\n <Select value={field.value} onValueChange={handleLicenseChange}>\n <FormControl><SelectTrigger><SelectValue /></SelectTrigger></FormControl>\n <SelectContent>{LICENSE_TYPES.map((l) => <SelectItem key={l.value} value={l.value}>{l.label}</SelectItem>)}</SelectContent>\n </Select>\n {(() => { const def = LICENSE_TYPES.find((l) => l.value === field.value); return def ? <p className=\"text-xs text-muted-foreground mt-1\">{def.description}</p> : null; })()}\n <FormMessage />\n </FormItem>\n )} />\n <FormField control={form.control} name=\"commercialUse\" render={({ field }) => (\n <FormItem><FormLabel>Commercial Use</FormLabel><ToggleGroup value={field.value} options={[\"Yes\", \"No\"]} onChange={field.onChange} /></FormItem>\n )} />\n <FormField control={form.control} name=\"derivatives\" render={({ field }) => (\n <FormItem><FormLabel>Derivatives</FormLabel><ToggleGroup value={field.value} options={DERIVATIVES_OPTIONS} onChange={field.onChange} /></FormItem>\n )} />\n <FormField control={form.control} name=\"attribution\" render={({ field }) => (\n <FormItem><FormLabel>Attribution</FormLabel><ToggleGroup value={field.value} options={[\"Required\", \"Not Required\"]} onChange={field.onChange} /></FormItem>\n )} />\n <Collapsible open={advancedOpen} onOpenChange={setAdvancedOpen}>\n <CollapsibleTrigger asChild>\n <button type=\"button\" className=\"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors\">\n <ChevronDown className={cn(\"h-3.5 w-3.5 transition-transform\", advancedOpen && \"rotate-180\")} />\n Advanced options\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent className=\"space-y-4 pt-3\">\n <FormField control={form.control} name=\"geographicScope\" render={({ field }) => (\n <FormItem>\n <FormLabel>Territory</FormLabel>\n <Select onValueChange={field.onChange} value={field.value}>\n <FormControl><SelectTrigger><SelectValue /></SelectTrigger></FormControl>\n <SelectContent>{GEOGRAPHIC_SCOPES.map((s) => <SelectItem key={s} value={s}>{s}</SelectItem>)}</SelectContent>\n </Select>\n </FormItem>\n )} />\n <FormField control={form.control} name=\"aiPolicy\" render={({ field }) => (\n <FormItem><FormLabel>AI & Data Mining</FormLabel><ToggleGroup value={field.value} options={AI_POLICIES} onChange={field.onChange} /></FormItem>\n )} />\n <FormField control={form.control} name=\"royalty\" render={({ field }) => (\n <FormItem>\n <FormLabel>Royalty % (0–50)</FormLabel>\n <FormControl>\n <Input type=\"number\" min={0} max={50} step={0.5} placeholder=\"0\" {...field} onChange={(e) => field.onChange(parseFloat(e.target.value) || 0)} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )} />\n </CollapsibleContent>\n </Collapsible>\n </CollapsibleSection>\n\n <CollapsibleSection\n open={ipTypeOpen}\n onOpenChange={setIpTypeOpen}\n icon={<Layers className=\"h-4 w-4 text-primary\" />}\n label=\"IP Type & Metadata\"\n hint=\"Optional\"\n >\n <p className=\"text-xs text-muted-foreground\">Choose a content type, fill suggested metadata, or add your own trait pairs.</p>\n <FormField control={form.control} name=\"ipType\" render={({ field }) => (\n <FormItem>\n <FormLabel>IP Type</FormLabel>\n <Select onValueChange={field.onChange} value={field.value}>\n <FormControl><SelectTrigger><SelectValue /></SelectTrigger></FormControl>\n <SelectContent>{IP_TYPES.map((t) => <SelectItem key={t} value={t}>{t}</SelectItem>)}</SelectContent>\n </Select>\n </FormItem>\n )} />\n <IPTypeFields\n key={metadataResetKey}\n ipType={form.watch(\"ipType\") as IPType}\n onChange={(fields) => { metadataFieldsRef.current = fields; }}\n uploadDocument={uploadDocument}\n />\n </CollapsibleSection>\n\n <button\n type=\"submit\"\n disabled={busy}\n className={`w-full h-12 text-base font-semibold text-white rounded-xl flex items-center justify-center gap-2 transition-all hover:brightness-110 active:scale-[0.98] bg-brand-blue ${busy ? \"opacity-40 pointer-events-none\" : \"\"}`}\n >\n Mint NFT\n </button>\n <p className=\"text-xs text-center text-muted-foreground\">Free to mint — protocol fee is zero.</p>\n </form>\n </Form>\n </ClaimRouteShell>\n </WalletRequired>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4LU;AA1LV,mBAA4D;AAC5D,6BAAwB;AACxB,iBAA4B;AAC5B,QAAmB;AACnB,0BAA2E;AAC3E,iBAAyG;AACzG,sBAAyC;AACzC,mBAAkB;AAClB,mBAAsB;AACtB,sBAAyB;AACzB,oBAA8E;AAC9E,yBAAoE;AACpE,iCAAmC;AACnC,kBAA+E;AAC/E,oCAA4B;AAC5B,4BAA6B;AAC7B,+BAAgC;AAChC,8BAAgC;AAChC,uCAAwC;AACxC,gCAAkC;AAClC,6BAA+B;AAC/B,2BAAgC;AAChC,2BAA6B;AAC7B,+BAAiC;AACjC,gBAA0G;AAC1G,gBAAmB;AACnB,8BAA+B;AAC/B,yBAAmD;AACnD,6BAAsC;AACtC,6BAA+B;AAC/B,6BAAyC;AAGzC,MAAM,SAAS,EAAE,OAAO;AAAA,EACtB,cAAc,EAAE,OAAO,EAAE,IAAI,GAAG,qBAAqB;AAAA,EACrD,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,eAAe,EAAE,IAAI,wBAAa,IAAI;AAAA,EAC9D,aAAa,EAAE,OAAO,EAAE,IAAI,wBAAa,WAAW,EAAE,SAAS;AAAA,EAC/D,cAAc,EACX,OAAO,EACP,IAAI,GAAG,EACP,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,SAAS,KAAK,EAAE,WAAW,UAAU,GAAG,EAAE,SAAS,sCAAsC,CAAC,EAC3H,SAAS;AAAA,EACZ,QAAQ,EAAE,KAAK,kBAAQ;AAAA,EACvB,aAAa,EAAE,OAAO,EAAE,IAAI,GAAG,kBAAkB;AAAA,EACjD,eAAe,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC;AAAA,EACnC,aAAa,EA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