@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.
Files changed (37) hide show
  1. package/dist/components/launchpad/collection-picker.cjs +147 -0
  2. package/dist/components/launchpad/collection-picker.cjs.map +1 -0
  3. package/dist/components/launchpad/collection-picker.d.cts +13 -0
  4. package/dist/components/launchpad/collection-picker.d.ts +13 -0
  5. package/dist/components/launchpad/collection-picker.js +113 -0
  6. package/dist/components/launchpad/collection-picker.js.map +1 -0
  7. package/dist/components/launchpad/single-edition-mint.cjs +427 -0
  8. package/dist/components/launchpad/single-edition-mint.cjs.map +1 -0
  9. package/dist/components/launchpad/single-edition-mint.d.cts +8 -0
  10. package/dist/components/launchpad/single-edition-mint.d.ts +8 -0
  11. package/dist/components/launchpad/single-edition-mint.js +393 -0
  12. package/dist/components/launchpad/single-edition-mint.js.map +1 -0
  13. package/dist/components/launchpad/tier-mint-form.cjs +425 -0
  14. package/dist/components/launchpad/tier-mint-form.cjs.map +1 -0
  15. package/dist/components/launchpad/tier-mint-form.d.cts +13 -0
  16. package/dist/components/launchpad/tier-mint-form.d.ts +13 -0
  17. package/dist/components/launchpad/tier-mint-form.js +391 -0
  18. package/dist/components/launchpad/tier-mint-form.js.map +1 -0
  19. package/dist/components/launchpad/tier-mint-presets.cjs +96 -0
  20. package/dist/components/launchpad/tier-mint-presets.cjs.map +1 -0
  21. package/dist/components/launchpad/tier-mint-presets.d.cts +58 -0
  22. package/dist/components/launchpad/tier-mint-presets.d.ts +58 -0
  23. package/dist/components/launchpad/tier-mint-presets.js +71 -0
  24. package/dist/components/launchpad/tier-mint-presets.js.map +1 -0
  25. package/dist/index.cjs +14 -0
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +4 -0
  28. package/dist/index.d.ts +4 -0
  29. package/dist/index.js +9 -0
  30. package/dist/index.js.map +1 -1
  31. package/dist/utils/run-intent-calls.cjs +9 -2
  32. package/dist/utils/run-intent-calls.cjs.map +1 -1
  33. package/dist/utils/run-intent-calls.d.cts +10 -1
  34. package/dist/utils/run-intent-calls.d.ts +10 -1
  35. package/dist/utils/run-intent-calls.js +7 -1
  36. package/dist/utils/run-intent-calls.js.map +1 -1
  37. package/package.json +1 -1
@@ -0,0 +1,425 @@
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 tier_mint_form_exports = {};
31
+ __export(tier_mint_form_exports, {
32
+ TierMintForm: () => TierMintForm
33
+ });
34
+ module.exports = __toCommonJS(tier_mint_form_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_image = __toESM(require("../image.js"), 1);
43
+ var import_link = __toESM(require("../link.js"), 1);
44
+ var import_button = require("../button.js");
45
+ var import_input = require("../input.js");
46
+ var import_textarea = require("../textarea.js");
47
+ var import_skeleton = require("../skeleton.js");
48
+ var import_select = require("../select.js");
49
+ var import_collapsible = require("../collapsible.js");
50
+ var import_form = require("../form.js");
51
+ var import_create_form_primitives = require("../create-form-primitives.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_ip = require("../../data/ip.js");
60
+ var import_cn = require("../../utils/cn.js");
61
+ var import_run_intent_calls = require("../../utils/run-intent-calls.js");
62
+ var import_ipfs_upload = require("../../utils/ipfs-upload.js");
63
+ var import_use_collections = require("../../utils/use-collections.js");
64
+ var import_use_profiles = require("../../utils/use-profiles.js");
65
+ var import_use_transaction = require("../../utils/use-transaction.js");
66
+ var import_use_launchpad_image_upload = require("../../utils/use-launchpad-image-upload.js");
67
+ function dateToUnixTimestamp(dateStr) {
68
+ if (!dateStr) return void 0;
69
+ const d = new Date(dateStr);
70
+ if (isNaN(d.getTime())) return void 0;
71
+ return Math.floor(d.getTime() / 1e3);
72
+ }
73
+ function makeSchema(preset) {
74
+ return z.object({
75
+ name: z.string().min(1, preset.copy.nameRequired).max(import_sdk.FIELD_LIMITS.name),
76
+ description: z.string().max(import_sdk.FIELD_LIMITS.description).optional(),
77
+ external_url: z.string().max(500).refine((v) => !v || v.startsWith("http://") || v.startsWith("https://"), { message: "Must start with http:// or https://" }).optional(),
78
+ maxSupply: z.string().min(1, "Supply required").regex(/^\d+$/, "Must be a positive integer").refine((v) => parseInt(v, 10) >= 1, "Minimum supply is 1"),
79
+ royalty: z.coerce.number().min(0).max(50).default(2.5),
80
+ licenseType: z.string().min(1),
81
+ commercialUse: z.enum(["Yes", "No"]),
82
+ derivatives: z.enum(["Allowed", "Not Allowed", "Share-Alike"]),
83
+ attribution: z.enum(["Required", "Not Required"]),
84
+ geographicScope: z.string(),
85
+ aiPolicy: z.enum(["Allowed", "Not Allowed", "Training Only"]),
86
+ startDate: z.string().optional(),
87
+ endDate: z.string().optional(),
88
+ imageUri: z.string().min(1, preset.copy.imageRequired)
89
+ });
90
+ }
91
+ function TierMintForm({ contract: rawContract, preset, aside }) {
92
+ const app = (0, import_medialane_app.useMedialaneApp)();
93
+ const address = app.walletAddress;
94
+ const contract = (0, import_sdk.normalizeAddress)("STARKNET", rawContract);
95
+ const { collection, isLoading } = (0, import_use_collections.useCollection)(contract);
96
+ const { profile, isLoading: profileLoading } = (0, import_use_profiles.useCollectionProfile)(preset.suggestExternalLink ? contract : void 0);
97
+ const tx = (0, import_use_transaction.useTransaction)();
98
+ const upload = (0, import_use_launchpad_image_upload.useLaunchpadImageUpload)({ successMessage: "Image uploaded" });
99
+ const { imagePreview, imageUri, imageUploading, uploadError, fileInputRef, handleImageSelect, clearImage } = upload;
100
+ const [licensingOpen, setLicensingOpen] = (0, import_react.useState)(false);
101
+ const [advancedOpen, setAdvancedOpen] = (0, import_react.useState)(false);
102
+ const Icon = preset.icon;
103
+ const form = (0, import_react_hook_form.useForm)({
104
+ resolver: (0, import_zod.zodResolver)(makeSchema(preset)),
105
+ defaultValues: {
106
+ name: "",
107
+ imageUri: "",
108
+ description: "",
109
+ external_url: "",
110
+ maxSupply: "100",
111
+ royalty: 2.5,
112
+ licenseType: "CC BY-SA",
113
+ commercialUse: "Yes",
114
+ derivatives: "Share-Alike",
115
+ attribution: "Required",
116
+ geographicScope: "Worldwide",
117
+ aiPolicy: "Not Allowed"
118
+ }
119
+ });
120
+ (0, import_react.useEffect)(() => {
121
+ form.setValue("imageUri", imageUri ?? "", { shouldValidate: !!imageUri });
122
+ }, [imageUri, form]);
123
+ (0, import_react.useEffect)(() => {
124
+ if (!preset.suggestExternalLink || profileLoading) return;
125
+ const suggested = profile?.slug ? `https://medialane.io/collection/${profile.slug}` : `https://medialane.io${(0, import_sdk.collectionHref)("STARKNET", contract)}`;
126
+ if (!form.getValues("external_url")) form.setValue("external_url", suggested);
127
+ }, [contract, profileLoading, profile?.slug, form, preset.suggestExternalLink]);
128
+ const isOwner = !!address && !!collection?.owner && (0, import_sdk.normalizeAddress)("STARKNET", address) === (0, import_sdk.normalizeAddress)("STARKNET", collection.owner);
129
+ const handleAgain = () => {
130
+ tx.reset();
131
+ form.reset({ ...form.getValues(), name: "", description: "", maxSupply: "100" });
132
+ clearImage();
133
+ };
134
+ const onSubmit = (values) => {
135
+ if (!address) return;
136
+ void tx.run(async (signer) => {
137
+ await app.ensureSignedIn?.();
138
+ const api = app.getClient().api;
139
+ const pinned = await (0, import_ipfs_upload.pinAssetMetadata)(api, {
140
+ name: values.name,
141
+ description: values.description ?? "",
142
+ imageUri,
143
+ externalUrl: values.external_url,
144
+ ipType: "NFT",
145
+ licenseType: values.licenseType,
146
+ commercialUse: values.commercialUse,
147
+ derivatives: values.derivatives,
148
+ attribution: values.attribution,
149
+ geographicScope: values.geographicScope,
150
+ aiPolicy: values.aiPolicy,
151
+ royalty: String(values.royalty),
152
+ creator: address,
153
+ templateTraits: [
154
+ { traitType: "Type", value: preset.traitType },
155
+ { traitType: "Token Standard", value: "ERC-1155" },
156
+ { traitType: "Max Supply", value: values.maxSupply },
157
+ { traitType: "Collection Contract", value: contract }
158
+ ]
159
+ });
160
+ const tierId = await preset.predictNextId(api, contract);
161
+ const tierRes = await api.intents.create("create-tier", {
162
+ owner: address,
163
+ collection: contract,
164
+ service: preset.service,
165
+ maxSupply: values.maxSupply,
166
+ startTime: dateToUnixTimestamp(values.startDate),
167
+ endTime: dateToUnixTimestamp(values.endDate),
168
+ royaltyBps: Math.round(values.royalty * 100),
169
+ metadataUri: pinned.uri
170
+ });
171
+ const mintRes = await api.intents.create("mint", {
172
+ owner: address,
173
+ recipient: address,
174
+ collectionContract: contract,
175
+ tokenId: String(tierId),
176
+ amount: values.maxSupply
177
+ });
178
+ await (0, import_run_intent_calls.runIntentsCalls)(signer, [tierRes, mintRes]);
179
+ });
180
+ };
181
+ const gateProps = { icon: Icon, iconClassName: preset.iconClass, title: preset.signedOut.title, description: preset.signedOut.description };
182
+ const inputId = `mint-${preset.service}-file-input`;
183
+ const busy = tx.phase !== "idle" || imageUploading;
184
+ if (isLoading) {
185
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_wallet_required.WalletRequired, { ...gateProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-5xl mx-auto px-4 pt-10 pb-16 space-y-4", children: [
186
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-6 w-24" }),
187
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-32 w-full rounded-2xl" }),
188
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-64 w-full rounded-2xl" })
189
+ ] }) });
190
+ }
191
+ if (!collection) {
192
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_wallet_required.WalletRequired, { ...gateProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-xl mx-auto px-4 pt-24 pb-8 text-center space-y-4", children: [
193
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertCircle, { className: "h-10 w-10 text-muted-foreground/20 mx-auto" }),
194
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-muted-foreground", children: "Collection not found." }),
195
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { asChild: true, variant: "outline", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: preset.back.href, children: preset.back.label }) })
196
+ ] }) });
197
+ }
198
+ if (!isOwner) {
199
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_wallet_required.WalletRequired, { ...gateProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-xl mx-auto px-4 pt-24 pb-8 text-center space-y-4", children: [
200
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-10 w-10 text-muted-foreground/20 mx-auto" }),
201
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-muted-foreground", children: preset.notOwner.message }),
202
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { asChild: true, variant: "outline", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: preset.notOwner.back.href, children: preset.notOwner.back.label }) })
203
+ ] }) });
204
+ }
205
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_wallet_required.WalletRequired, { ...gateProps, children: [
206
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_transaction_dialog.TransactionDialog, { tx, title: preset.dialog.title, workingLabel: preset.dialog.workingLabel, firstStepLabel: preset.dialog.firstStepLabel, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
207
+ import_creation_success.CreationSuccess,
208
+ {
209
+ name: form.getValues("name"),
210
+ image: imagePreview,
211
+ caption: preset.success.caption,
212
+ primary: { href: (0, import_sdk.collectionHref)("STARKNET", contract), label: "View collection" },
213
+ onAgain: handleAgain,
214
+ againLabel: preset.success.againLabel,
215
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_reward_earned.RewardEarned, { actionType: "launch_launchpad" })
216
+ }
217
+ ) }),
218
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
219
+ import_claim_route_shell.ClaimRouteShell,
220
+ {
221
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-4 w-4 text-white" }),
222
+ title: preset.shell.title,
223
+ subtitle: preset.shell.subtitle(collection.name ?? null),
224
+ aside: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
225
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
226
+ import_medialane_collection_card.MedialaneCollectionCard,
227
+ {
228
+ image: imagePreview,
229
+ name: form.watch("name"),
230
+ collection: collection.symbol || preset.cardFallbackSymbol,
231
+ creator: address ? `${address.slice(0, 6)}\u2026${address.slice(-4)}` : void 0,
232
+ creatorHref: address ? (0, import_sdk.profileHref)({ address }) : void 0
233
+ }
234
+ ),
235
+ aside
236
+ ] }),
237
+ 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-5", children: [
238
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
239
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-sm font-medium", children: [
240
+ preset.copy.imageHeading,
241
+ " ",
242
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-destructive", children: "*" })
243
+ ] }),
244
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-4", children: [
245
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
246
+ "div",
247
+ {
248
+ role: "button",
249
+ tabIndex: 0,
250
+ onClick: () => !imageUploading && fileInputRef.current?.click(),
251
+ onKeyDown: (e) => {
252
+ if (e.key === "Enter") fileInputRef.current?.click();
253
+ },
254
+ className: (0, import_cn.cn)("relative h-20 w-20 rounded-2xl border-2 border-dashed border-border bg-muted flex items-center justify-center overflow-hidden shrink-0 cursor-pointer transition-colors", preset.hoverBorderClass),
255
+ children: [
256
+ imagePreview ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: imagePreview, alt: preset.copy.imageAlt, fill: true, unoptimized: true, className: "object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ImagePlus, { className: "h-6 w-6 text-muted-foreground" }),
257
+ imageUploading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0 bg-background/70 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-4 w-4 animate-spin" }) })
258
+ ]
259
+ }
260
+ ),
261
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
262
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { id: inputId, ref: fileInputRef, type: "file", accept: (0, import_sdk.acceptFor)("image"), className: "hidden", onChange: (e) => {
263
+ const f = e.target.files?.[0];
264
+ if (f) void handleImageSelect(f);
265
+ } }),
266
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { type: "button", variant: "outline", size: "sm", disabled: imageUploading, onClick: () => fileInputRef.current?.click(), children: imageUploading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
267
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-3.5 w-3.5 mr-1.5 animate-spin" }),
268
+ "Uploading\u2026"
269
+ ] }) : imagePreview ? "Change" : "Upload image" }),
270
+ imagePreview && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", onClick: clearImage, className: "flex items-center gap-1 text-xs text-muted-foreground hover:text-destructive transition-colors", children: [
271
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-3 w-3" }),
272
+ " Remove"
273
+ ] }),
274
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: imageUri ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: preset.uploadedClass, children: "\u2713 Uploaded" }) : "JPG, PNG, SVG or WebP" })
275
+ ] })
276
+ ] })
277
+ ] }),
278
+ (uploadError || form.formState.errors.imageUri) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: uploadError ?? form.formState.errors.imageUri?.message }),
279
+ /* @__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: [
280
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormLabel, { children: [
281
+ preset.copy.nameLabel,
282
+ " ",
283
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-destructive", children: "*" })
284
+ ] }),
285
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { placeholder: preset.copy.namePlaceholder, ...field }) }),
286
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
287
+ ] }) }),
288
+ /* @__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: [
289
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormLabel, { children: [
290
+ "Description ",
291
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
292
+ ] }),
293
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_textarea.Textarea, { placeholder: preset.copy.descriptionPlaceholder, rows: 3, ...field }) }),
294
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
295
+ ] }) }),
296
+ /* @__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: [
297
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormLabel, { children: [
298
+ "External link ",
299
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
300
+ ] }),
301
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { placeholder: "https://yourwebsite.com", ...field }) }),
302
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
303
+ ] }) }),
304
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_collapsible.Collapsible, { open: licensingOpen, onOpenChange: setLicensingOpen, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sm:overflow-hidden sm:rounded-xl sm:border sm:border-border", children: [
305
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_collapsible.CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "w-full flex items-center justify-between px-0 py-3 sm:px-5 sm:py-4 hover:bg-muted/30 transition-colors", children: [
306
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
307
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShieldCheck, { className: "h-4 w-4 text-primary" }),
308
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm font-semibold", children: "Licensing Terms" }),
309
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs text-muted-foreground font-normal", children: "Optional \xB7 Berne Convention" })
310
+ ] }),
311
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDown, { className: (0, import_cn.cn)("h-4 w-4 text-muted-foreground transition-transform", licensingOpen && "rotate-180") })
312
+ ] }) }),
313
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_collapsible.CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "px-0 pb-4 sm:px-5 sm:pb-5 space-y-4 border-t border-border/60 pt-4", children: [
314
+ /* @__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: [
315
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "License" }),
316
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.Select, { value: field.value, onValueChange: (value) => {
317
+ form.setValue("licenseType", value);
318
+ const def = import_ip.LICENSE_TYPES.find((l) => l.value === value);
319
+ if (def) {
320
+ form.setValue("commercialUse", def.commercialUse);
321
+ form.setValue("derivatives", def.derivatives);
322
+ form.setValue("attribution", def.attribution);
323
+ }
324
+ }, children: [
325
+ /* @__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, {}) }) }),
326
+ /* @__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)) })
327
+ ] }),
328
+ (() => {
329
+ const def = import_ip.LICENSE_TYPES.find((l) => l.value === field.value);
330
+ return def ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground mt-1", children: def.description }) : null;
331
+ })(),
332
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
333
+ ] }) }),
334
+ /* @__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: [
335
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Commercial Use" }),
336
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: field.value, options: ["Yes", "No"], onChange: field.onChange })
337
+ ] }) }),
338
+ /* @__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: [
339
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Derivatives" }),
340
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: field.value, options: import_ip.DERIVATIVES_OPTIONS, onChange: field.onChange })
341
+ ] }) }),
342
+ /* @__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: [
343
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Attribution" }),
344
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: field.value, options: ["Required", "Not Required"], onChange: field.onChange })
345
+ ] }) }),
346
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_collapsible.Collapsible, { open: advancedOpen, onOpenChange: setAdvancedOpen, children: [
347
+ /* @__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: [
348
+ /* @__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") }),
349
+ "Advanced options"
350
+ ] }) }),
351
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_collapsible.CollapsibleContent, { className: "space-y-4 pt-3", children: [
352
+ /* @__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: [
353
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Territory" }),
354
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.Select, { onValueChange: field.onChange, value: field.value, children: [
355
+ /* @__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, {}) }) }),
356
+ /* @__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)) })
357
+ ] })
358
+ ] }) }),
359
+ /* @__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: [
360
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "AI & Data Mining" }),
361
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: field.value, options: import_ip.AI_POLICIES, onChange: field.onChange })
362
+ ] }) })
363
+ ] })
364
+ ] })
365
+ ] }) })
366
+ ] }) }),
367
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-4", children: [
368
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "maxSupply", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
369
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormLabel, { children: [
370
+ "Supply ",
371
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-destructive", children: "*" })
372
+ ] }),
373
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { type: "number", min: "1", placeholder: "100", ...field }) }),
374
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormDescription, { children: "Minted to your account." }),
375
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
376
+ ] }) }),
377
+ /* @__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: [
378
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Royalty % (0\u201350)" }),
379
+ /* @__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: "2.5", ...field, onChange: (e) => field.onChange(parseFloat(e.target.value) || 0) }) }),
380
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormDescription, { children: "On secondary sales." }),
381
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
382
+ ] }) })
383
+ ] }),
384
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-4", children: [
385
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "startDate", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
386
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormLabel, { children: [
387
+ "Valid from ",
388
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
389
+ ] }),
390
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { type: "datetime-local", ...field }) }),
391
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormDescription, { children: "You can mint and sell before it opens." }),
392
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
393
+ ] }) }),
394
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "endDate", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
395
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormLabel, { children: [
396
+ "Valid until ",
397
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
398
+ ] }),
399
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { type: "datetime-local", ...field }) }),
400
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormDescription, { children: preset.copy.validUntilHint }),
401
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
402
+ ] }) })
403
+ ] }),
404
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
405
+ "button",
406
+ {
407
+ type: "submit",
408
+ disabled: busy,
409
+ 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] ${preset.buttonClass} ${busy ? "opacity-40 pointer-events-none" : ""}`,
410
+ children: [
411
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-4 w-4 mr-2" }),
412
+ preset.copy.submit
413
+ ]
414
+ }
415
+ )
416
+ ] }) })
417
+ }
418
+ )
419
+ ] });
420
+ }
421
+ // Annotate the CommonJS export names for ESM import in node:
422
+ 0 && (module.exports = {
423
+ TierMintForm
424
+ });
425
+ //# sourceMappingURL=tier-mint-form.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/launchpad/tier-mint-form.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState, type ReactNode } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport * as z from \"zod\";\nimport { AlertCircle, ChevronDown, ImagePlus, Loader2, ShieldCheck, X } from \"lucide-react\";\nimport { FIELD_LIMITS, acceptFor, collectionHref, normalizeAddress, profileHref } from \"@medialane/sdk\";\nimport Image from \"../image.js\";\nimport Link from \"../link.js\";\nimport { Button } from \"../button.js\";\nimport { Input } from \"../input.js\";\nimport { Textarea } from \"../textarea.js\";\nimport { Skeleton } from \"../skeleton.js\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"../select.js\";\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"../collapsible.js\";\nimport { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from \"../form.js\";\nimport { ToggleGroup } from \"../create-form-primitives.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 { AI_POLICIES, DERIVATIVES_OPTIONS, GEOGRAPHIC_SCOPES, LICENSE_TYPES } from \"../../data/ip.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { runIntentsCalls } from \"../../utils/run-intent-calls.js\";\nimport { pinAssetMetadata } from \"../../utils/ipfs-upload.js\";\nimport { useCollection } from \"../../utils/use-collections.js\";\nimport { useCollectionProfile } from \"../../utils/use-profiles.js\";\nimport { useTransaction } from \"../../utils/use-transaction.js\";\nimport { useLaunchpadImageUpload } from \"../../utils/use-launchpad-image-upload.js\";\nimport type { TierMintPreset } from \"./tier-mint-presets.js\";\n\nfunction dateToUnixTimestamp(dateStr: string | undefined): number | undefined {\n if (!dateStr) return undefined;\n const d = new Date(dateStr);\n if (isNaN(d.getTime())) return undefined;\n return Math.floor(d.getTime() / 1000);\n}\n\nfunction makeSchema(preset: TierMintPreset) {\n return z.object({\n name: z.string().min(1, preset.copy.nameRequired).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 maxSupply: z\n .string()\n .min(1, \"Supply required\")\n .regex(/^\\d+$/, \"Must be a positive integer\")\n .refine((v) => parseInt(v, 10) >= 1, \"Minimum supply is 1\"),\n royalty: z.coerce.number().min(0).max(50).default(2.5),\n licenseType: z.string().min(1),\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 startDate: z.string().optional(),\n endDate: z.string().optional(),\n imageUri: z.string().min(1, preset.copy.imageRequired),\n });\n}\ntype FormValues = z.infer<ReturnType<typeof makeSchema>>;\n\nexport interface TierMintFormProps {\n contract: string;\n preset: TierMintPreset;\n aside?: ReactNode;\n}\n\nexport function TierMintForm({ contract: rawContract, preset, aside }: TierMintFormProps) {\n const app = useMedialaneApp();\n const address = app.walletAddress;\n const contract = normalizeAddress(\"STARKNET\", rawContract);\n const { collection, isLoading } = useCollection(contract);\n const { profile, isLoading: profileLoading } = useCollectionProfile(preset.suggestExternalLink ? contract : undefined);\n const tx = useTransaction();\n const upload = useLaunchpadImageUpload({ successMessage: \"Image uploaded\" });\n const { imagePreview, imageUri, imageUploading, uploadError, fileInputRef, handleImageSelect, clearImage } = upload;\n const [licensingOpen, setLicensingOpen] = useState(false);\n const [advancedOpen, setAdvancedOpen] = useState(false);\n const Icon = preset.icon;\n\n const form = useForm<FormValues>({\n resolver: zodResolver(makeSchema(preset)),\n defaultValues: {\n name: \"\", imageUri: \"\", description: \"\", external_url: \"\",\n maxSupply: \"100\", royalty: 2.5, licenseType: \"CC BY-SA\", commercialUse: \"Yes\",\n derivatives: \"Share-Alike\", attribution: \"Required\", geographicScope: \"Worldwide\", aiPolicy: \"Not Allowed\",\n },\n });\n\n useEffect(() => {\n form.setValue(\"imageUri\", imageUri ?? \"\", { shouldValidate: !!imageUri });\n }, [imageUri, form]);\n\n useEffect(() => {\n if (!preset.suggestExternalLink || profileLoading) return;\n const suggested = profile?.slug ? `https://medialane.io/collection/${profile.slug}` : `https://medialane.io${collectionHref(\"STARKNET\", contract)}`;\n if (!form.getValues(\"external_url\")) form.setValue(\"external_url\", suggested);\n }, [contract, profileLoading, profile?.slug, form, preset.suggestExternalLink]);\n\n const isOwner = !!address && !!collection?.owner && normalizeAddress(\"STARKNET\", address) === normalizeAddress(\"STARKNET\", collection.owner);\n\n const handleAgain = () => {\n tx.reset();\n form.reset({ ...form.getValues(), name: \"\", description: \"\", maxSupply: \"100\" });\n clearImage();\n };\n\n const onSubmit = (values: FormValues) => {\n if (!address) 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 imageUri: imageUri!,\n externalUrl: values.external_url,\n ipType: \"NFT\",\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 creator: address,\n templateTraits: [\n { traitType: \"Type\", value: preset.traitType },\n { traitType: \"Token Standard\", value: \"ERC-1155\" },\n { traitType: \"Max Supply\", value: values.maxSupply },\n { traitType: \"Collection Contract\", value: contract },\n ],\n });\n const tierId = await preset.predictNextId(api, contract);\n const tierRes = await api.intents.create(\"create-tier\", {\n owner: address,\n collection: contract,\n service: preset.service,\n maxSupply: values.maxSupply,\n startTime: dateToUnixTimestamp(values.startDate),\n endTime: dateToUnixTimestamp(values.endDate),\n royaltyBps: Math.round(values.royalty * 100),\n metadataUri: pinned.uri,\n });\n const mintRes = await api.intents.create(\"mint\", {\n owner: address,\n recipient: address,\n collectionContract: contract,\n tokenId: String(tierId),\n amount: values.maxSupply,\n });\n await runIntentsCalls(signer, [tierRes, mintRes]);\n });\n };\n\n const gateProps = { icon: Icon, iconClassName: preset.iconClass, title: preset.signedOut.title, description: preset.signedOut.description };\n const inputId = `mint-${preset.service}-file-input`;\n const busy = tx.phase !== \"idle\" || imageUploading;\n\n if (isLoading) {\n return (\n <WalletRequired {...gateProps}>\n <div className=\"max-w-5xl mx-auto px-4 pt-10 pb-16 space-y-4\">\n <Skeleton className=\"h-6 w-24\" />\n <Skeleton className=\"h-32 w-full rounded-2xl\" />\n <Skeleton className=\"h-64 w-full rounded-2xl\" />\n </div>\n </WalletRequired>\n );\n }\n\n if (!collection) {\n return (\n <WalletRequired {...gateProps}>\n <div className=\"max-w-xl mx-auto px-4 pt-24 pb-8 text-center space-y-4\">\n <AlertCircle className=\"h-10 w-10 text-muted-foreground/20 mx-auto\" />\n <p className=\"text-muted-foreground\">Collection not found.</p>\n <Button asChild variant=\"outline\" size=\"sm\"><Link href={preset.back.href}>{preset.back.label}</Link></Button>\n </div>\n </WalletRequired>\n );\n }\n\n if (!isOwner) {\n return (\n <WalletRequired {...gateProps}>\n <div className=\"max-w-xl mx-auto px-4 pt-24 pb-8 text-center space-y-4\">\n <Icon className=\"h-10 w-10 text-muted-foreground/20 mx-auto\" />\n <p className=\"text-muted-foreground\">{preset.notOwner.message}</p>\n <Button asChild variant=\"outline\" size=\"sm\"><Link href={preset.notOwner.back.href}>{preset.notOwner.back.label}</Link></Button>\n </div>\n </WalletRequired>\n );\n }\n\n return (\n <WalletRequired {...gateProps}>\n <TransactionDialog tx={tx} title={preset.dialog.title} workingLabel={preset.dialog.workingLabel} firstStepLabel={preset.dialog.firstStepLabel}>\n <CreationSuccess\n name={form.getValues(\"name\")}\n image={imagePreview}\n caption={preset.success.caption}\n primary={{ href: collectionHref(\"STARKNET\", contract), label: \"View collection\" }}\n onAgain={handleAgain}\n againLabel={preset.success.againLabel}\n >\n <RewardEarned actionType=\"launch_launchpad\" />\n </CreationSuccess>\n </TransactionDialog>\n\n <ClaimRouteShell\n icon={<Icon className=\"h-4 w-4 text-white\" />}\n title={preset.shell.title}\n subtitle={preset.shell.subtitle(collection.name ?? null)}\n aside={\n <>\n <MedialaneCollectionCard\n image={imagePreview}\n name={form.watch(\"name\")}\n collection={collection.symbol || preset.cardFallbackSymbol}\n creator={address ? `${address.slice(0, 6)}…${address.slice(-4)}` : undefined}\n creatorHref={address ? profileHref({ address }) : undefined}\n />\n {aside}\n </>\n }\n >\n <Form {...form}>\n <form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-5\">\n <div className=\"space-y-2\">\n <p className=\"text-sm font-medium\">{preset.copy.imageHeading} <span className=\"text-destructive\">*</span></p>\n <div className=\"flex items-center gap-4\">\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => !imageUploading && fileInputRef.current?.click()}\n onKeyDown={(e) => { if (e.key === \"Enter\") fileInputRef.current?.click(); }}\n className={cn(\"relative h-20 w-20 rounded-2xl border-2 border-dashed border-border bg-muted flex items-center justify-center overflow-hidden shrink-0 cursor-pointer transition-colors\", preset.hoverBorderClass)}\n >\n {imagePreview ? <Image src={imagePreview} alt={preset.copy.imageAlt} fill unoptimized className=\"object-cover\" /> : <ImagePlus className=\"h-6 w-6 text-muted-foreground\" />}\n {imageUploading && <div className=\"absolute inset-0 bg-background/70 flex items-center justify-center\"><Loader2 className=\"h-4 w-4 animate-spin\" /></div>}\n </div>\n <div className=\"space-y-1.5\">\n <input id={inputId} ref={fileInputRef} type=\"file\" accept={acceptFor(\"image\")} className=\"hidden\" onChange={(e) => { const f = e.target.files?.[0]; if (f) void handleImageSelect(f); }} />\n <Button type=\"button\" variant=\"outline\" size=\"sm\" disabled={imageUploading} onClick={() => fileInputRef.current?.click()}>\n {imageUploading ? <><Loader2 className=\"h-3.5 w-3.5 mr-1.5 animate-spin\" />Uploading…</> : imagePreview ? \"Change\" : \"Upload image\"}\n </Button>\n {imagePreview && (\n <button type=\"button\" onClick={clearImage} className=\"flex items-center gap-1 text-xs text-muted-foreground hover:text-destructive transition-colors\">\n <X className=\"h-3 w-3\" /> Remove\n </button>\n )}\n <p className=\"text-xs text-muted-foreground\">{imageUri ? <span className={preset.uploadedClass}>✓ Uploaded</span> : \"JPG, PNG, SVG or WebP\"}</p>\n </div>\n </div>\n </div>\n\n {(uploadError || form.formState.errors.imageUri) && (\n <p role=\"alert\" className=\"text-sm text-destructive\">{uploadError ?? form.formState.errors.imageUri?.message}</p>\n )}\n\n <FormField control={form.control} name=\"name\" render={({ field }) => (\n <FormItem>\n <FormLabel>{preset.copy.nameLabel} <span className=\"text-destructive\">*</span></FormLabel>\n <FormControl><Input placeholder={preset.copy.namePlaceholder} {...field} /></FormControl>\n <FormMessage />\n </FormItem>\n )} />\n\n <FormField control={form.control} name=\"description\" render={({ field }) => (\n <FormItem>\n <FormLabel>Description <span className=\"text-muted-foreground font-normal\">(optional)</span></FormLabel>\n <FormControl><Textarea placeholder={preset.copy.descriptionPlaceholder} rows={3} {...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 <Collapsible open={licensingOpen} onOpenChange={setLicensingOpen}>\n <div className=\"sm:overflow-hidden sm:rounded-xl sm:border sm:border-border\">\n <CollapsibleTrigger asChild>\n <button type=\"button\" className=\"w-full flex items-center justify-between px-0 py-3 sm:px-5 sm:py-4 hover:bg-muted/30 transition-colors\">\n <div className=\"flex items-center gap-2\">\n <ShieldCheck className=\"h-4 w-4 text-primary\" />\n <span className=\"text-sm font-semibold\">Licensing Terms</span>\n <span className=\"text-xs text-muted-foreground font-normal\">Optional · Berne Convention</span>\n </div>\n <ChevronDown className={cn(\"h-4 w-4 text-muted-foreground transition-transform\", licensingOpen && \"rotate-180\")} />\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <div className=\"px-0 pb-4 sm:px-5 sm:pb-5 space-y-4 border-t border-border/60 pt-4\">\n <FormField control={form.control} name=\"licenseType\" render={({ field }) => (\n <FormItem>\n <FormLabel>License</FormLabel>\n <Select value={field.value} onValueChange={(value) => {\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 <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 &amp; Data Mining</FormLabel><ToggleGroup value={field.value} options={AI_POLICIES} onChange={field.onChange} /></FormItem>\n )} />\n </CollapsibleContent>\n </Collapsible>\n </div>\n </CollapsibleContent>\n </div>\n </Collapsible>\n\n <div className=\"grid grid-cols-2 gap-4\">\n <FormField control={form.control} name=\"maxSupply\" render={({ field }) => (\n <FormItem>\n <FormLabel>Supply <span className=\"text-destructive\">*</span></FormLabel>\n <FormControl><Input type=\"number\" min=\"1\" placeholder=\"100\" {...field} /></FormControl>\n <FormDescription>Minted to your account.</FormDescription>\n <FormMessage />\n </FormItem>\n )} />\n <FormField control={form.control} name=\"royalty\" render={({ field }) => (\n <FormItem>\n <FormLabel>Royalty % (0–50)</FormLabel>\n <FormControl><Input type=\"number\" min={0} max={50} step={0.5} placeholder=\"2.5\" {...field} onChange={(e) => field.onChange(parseFloat(e.target.value) || 0)} /></FormControl>\n <FormDescription>On secondary sales.</FormDescription>\n <FormMessage />\n </FormItem>\n )} />\n </div>\n\n <div className=\"grid grid-cols-2 gap-4\">\n <FormField control={form.control} name=\"startDate\" render={({ field }) => (\n <FormItem>\n <FormLabel>Valid from <span className=\"text-muted-foreground font-normal\">(optional)</span></FormLabel>\n <FormControl><Input type=\"datetime-local\" {...field} /></FormControl>\n <FormDescription>You can mint and sell before it opens.</FormDescription>\n <FormMessage />\n </FormItem>\n )} />\n <FormField control={form.control} name=\"endDate\" render={({ field }) => (\n <FormItem>\n <FormLabel>Valid until <span className=\"text-muted-foreground font-normal\">(optional)</span></FormLabel>\n <FormControl><Input type=\"datetime-local\" {...field} /></FormControl>\n <FormDescription>{preset.copy.validUntilHint}</FormDescription>\n <FormMessage />\n </FormItem>\n )} />\n </div>\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] ${preset.buttonClass} ${busy ? \"opacity-40 pointer-events-none\" : \"\"}`}\n >\n <Icon className=\"h-4 w-4 mr-2\" />\n {preset.copy.submit}\n </button>\n </form>\n </Form>\n </ClaimRouteShell>\n </WalletRequired>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2KQ;AAzKR,mBAAoD;AACpD,6BAAwB;AACxB,iBAA4B;AAC5B,QAAmB;AACnB,0BAA6E;AAC7E,iBAAuF;AACvF,mBAAkB;AAClB,kBAAiB;AACjB,oBAAuB;AACvB,mBAAsB;AACtB,sBAAyB;AACzB,sBAAyB;AACzB,oBAA8E;AAC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C5F,4CAAC,2BAAY,sDAAC,sBAAM,MAAK,kBAAkB,GAAG,OAAO,GAAE;AAAA,cACvD,4CAAC,+BAAiB,iBAAO,KAAK,gBAAe;AAAA,cAC7C,4CAAC,2BAAY;AAAA,eACf,GACC;AAAA,aACL;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,UAAU;AAAA,cACV,WAAW,4JAA4J,OAAO,WAAW,IAAI,OAAO,mCAAmC,EAAE;AAAA,cAEzO;AAAA,4DAAC,QAAK,WAAU,gBAAe;AAAA,gBAC9B,OAAO,KAAK;AAAA;AAAA;AAAA,UACf;AAAA,WACF,GACF;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":["Link","Image"]}
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { TierMintPreset } from './tier-mint-presets.cjs';
4
+ import '@medialane/sdk';
5
+
6
+ interface TierMintFormProps {
7
+ contract: string;
8
+ preset: TierMintPreset;
9
+ aside?: ReactNode;
10
+ }
11
+ declare function TierMintForm({ contract: rawContract, preset, aside }: TierMintFormProps): react_jsx_runtime.JSX.Element;
12
+
13
+ export { TierMintForm, type TierMintFormProps };
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { TierMintPreset } from './tier-mint-presets.js';
4
+ import '@medialane/sdk';
5
+
6
+ interface TierMintFormProps {
7
+ contract: string;
8
+ preset: TierMintPreset;
9
+ aside?: ReactNode;
10
+ }
11
+ declare function TierMintForm({ contract: rawContract, preset, aside }: TierMintFormProps): react_jsx_runtime.JSX.Element;
12
+
13
+ export { TierMintForm, type TierMintFormProps };