@medialane/ui 0.291.0 → 0.292.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/account/input-otp.d.cts +2 -2
- package/dist/components/account/input-otp.d.ts +2 -2
- package/dist/components/action-button.cjs +3 -30
- package/dist/components/action-button.cjs.map +1 -1
- package/dist/components/action-button.d.cts +1 -2
- package/dist/components/action-button.d.ts +1 -2
- package/dist/components/action-button.js +1 -28
- package/dist/components/action-button.js.map +1 -1
- package/dist/components/badge.d.cts +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.d.cts +2 -2
- package/dist/components/button.d.ts +2 -2
- package/dist/components/drop/create/launch-dialog.cjs +10 -7
- package/dist/components/drop/create/launch-dialog.cjs.map +1 -1
- package/dist/components/drop/create/launch-dialog.js +10 -7
- package/dist/components/drop/create/launch-dialog.js.map +1 -1
- package/dist/components/drop/page/drop-manage.cjs +6 -3
- package/dist/components/drop/page/drop-manage.cjs.map +1 -1
- package/dist/components/drop/page/drop-manage.js +6 -3
- package/dist/components/drop/page/drop-manage.js.map +1 -1
- package/dist/components/drop/page/drop-mint-dialog.cjs +9 -6
- package/dist/components/drop/page/drop-mint-dialog.cjs.map +1 -1
- package/dist/components/drop/page/drop-mint-dialog.js +9 -6
- package/dist/components/drop/page/drop-mint-dialog.js.map +1 -1
- package/dist/components/fast-mint/fast-mint.cjs +6 -13
- package/dist/components/fast-mint/fast-mint.cjs.map +1 -1
- package/dist/components/fast-mint/fast-mint.d.cts +2 -2
- package/dist/components/fast-mint/fast-mint.d.ts +2 -2
- package/dist/components/fast-mint/fast-mint.js +7 -15
- package/dist/components/fast-mint/fast-mint.js.map +1 -1
- package/dist/components/gated-content.cjs +2 -1
- package/dist/components/gated-content.cjs.map +1 -1
- package/dist/components/gated-content.js +2 -1
- package/dist/components/gated-content.js.map +1 -1
- package/dist/components/media-wallet/action-button.cjs +0 -18
- package/dist/components/media-wallet/action-button.cjs.map +1 -1
- package/dist/components/media-wallet/action-button.d.cts +1 -3
- package/dist/components/media-wallet/action-button.d.ts +1 -3
- package/dist/components/media-wallet/action-button.js +0 -16
- package/dist/components/media-wallet/action-button.js.map +1 -1
- package/dist/components/media-wallet/activate-card.cjs +2 -2
- package/dist/components/media-wallet/activate-card.cjs.map +1 -1
- package/dist/components/media-wallet/activate-card.js +1 -1
- package/dist/components/media-wallet/activate-card.js.map +1 -1
- package/dist/components/media-wallet/media-wallet-activity.cjs +4 -6
- package/dist/components/media-wallet/media-wallet-activity.cjs.map +1 -1
- package/dist/components/media-wallet/media-wallet-activity.js +4 -6
- package/dist/components/media-wallet/media-wallet-activity.js.map +1 -1
- package/dist/components/media-wallet/media-wallet-home.cjs +2 -1
- package/dist/components/media-wallet/media-wallet-home.cjs.map +1 -1
- package/dist/components/media-wallet/media-wallet-home.js +2 -1
- package/dist/components/media-wallet/media-wallet-home.js.map +1 -1
- package/dist/components/media-wallet/quick-action.cjs +3 -3
- package/dist/components/media-wallet/quick-action.cjs.map +1 -1
- package/dist/components/media-wallet/quick-action.d.cts +1 -1
- package/dist/components/media-wallet/quick-action.d.ts +1 -1
- package/dist/components/media-wallet/quick-action.js +1 -1
- package/dist/components/media-wallet/quick-action.js.map +1 -1
- package/dist/components/media-wallet/success-dialog.cjs +2 -2
- package/dist/components/media-wallet/success-dialog.cjs.map +1 -1
- package/dist/components/media-wallet/success-dialog.js +1 -1
- package/dist/components/media-wallet/success-dialog.js.map +1 -1
- package/dist/components/media-wallet/wallet-activity-icon.cjs +5 -4
- package/dist/components/media-wallet/wallet-activity-icon.cjs.map +1 -1
- package/dist/components/media-wallet/wallet-activity-icon.js +5 -4
- package/dist/components/media-wallet/wallet-activity-icon.js.map +1 -1
- package/dist/components/medialane-collection-card.cjs +6 -6
- package/dist/components/medialane-collection-card.cjs.map +1 -1
- package/dist/components/medialane-collection-card.js +6 -6
- package/dist/components/medialane-collection-card.js.map +1 -1
- package/dist/components/sheet.d.cts +1 -1
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/wallet/self-fund-consent-dialog.cjs +6 -4
- package/dist/components/wallet/self-fund-consent-dialog.cjs.map +1 -1
- package/dist/components/wallet/self-fund-consent-dialog.js +6 -4
- package/dist/components/wallet/self-fund-consent-dialog.js.map +1 -1
- package/dist/data/brand.cjs +54 -2
- package/dist/data/brand.cjs.map +1 -1
- package/dist/data/brand.d.cts +16 -1
- package/dist/data/brand.d.ts +16 -1
- package/dist/data/brand.js +47 -1
- package/dist/data/brand.js.map +1 -1
- package/dist/index.cjs +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/medialane.css +14 -23
- package/package.json +1 -1
- package/dist/components/action-dialog.cjs +0 -70
- package/dist/components/action-dialog.cjs.map +0 -1
- package/dist/components/action-dialog.d.cts +0 -12
- package/dist/components/action-dialog.d.ts +0 -12
- package/dist/components/action-dialog.js +0 -46
- package/dist/components/action-dialog.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/fast-mint/fast-mint.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState } from \"react\";\nimport Image from \"next/image\";\nimport { useForm } from \"react-hook-form\";\nimport { buildAssetMetadata, type ApiCollection } from \"@medialane/sdk\";\nimport { describeError } from \"../../utils/describe-error.js\";\nimport { UPLOAD_LIMITS, acceptFor, uploadError } from \"../../utils/upload-limits.js\";\nimport { executeIntent, deployedCollectionFromReceipt, mintedTokenIdFromReceipt } from \"@medialane/sdk/starknet\";\nimport { mintableCollections, collectionKey } from \"./mintable-collections.js\";\nimport {\n ImagePlus, Music, Video, FileText, Loader2,\n Layers, ImagePlus as SingleIcon, ChevronDown, Boxes, Plus, Check,\n ShieldCheck, X,\n} from \"lucide-react\";\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 { Popover, PopoverContent, PopoverTrigger } from \"../popover.js\";\nimport { MedialaneCollectionCard } from \"../medialane-collection-card.js\";\nimport { ActionDialog } from \"../action-dialog.js\";\nimport { IPTypeFields, type MetadataField } from \"../ip-type-fields.js\";\nimport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES, DERIVATIVES_OPTIONS,\n type IPType,\n} from \"../../data/ip.js\";\nimport { IP_TEMPLATES } from \"../../data/ip-templates.js\";\nimport { suggestLaunchpadSymbol } from \"../../utils/launchpad-defaults.js\";\nimport { uploadFileToIpfs, uploadJsonToIpfs, uploadFailureToast } from \"../../utils/ipfs-upload.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { Dropzone } from \"./dropzone.js\";\nimport { SuccessView } from \"./success-view.js\";\nimport type { FastMintProps, FastMintSigner, MediaKind, MintedAsset } from \"./types.js\";\nimport { profileHref } from \"@medialane/sdk\";\nimport { useImageUrl } from \"../../utils/use-image-url.js\";\n\nconst MEDIA_ROUTE_MIME_TYPES = new Set(UPLOAD_LIMITS.media.mimeTypes);\nconst DOCUMENT_MIME_TYPES = new Set(UPLOAD_LIMITS.document.mimeTypes.filter((type) => type !== \"application/octet-stream\"));\n\nfunction detectMediaKind(mime: string): MediaKind | null {\n if (mime.startsWith(\"image/\")) return MEDIA_ROUTE_MIME_TYPES.has(mime) ? \"image\" : null;\n if (mime.startsWith(\"video/\")) return MEDIA_ROUTE_MIME_TYPES.has(mime) ? \"video\" : null;\n if (mime.startsWith(\"audio/\")) return MEDIA_ROUTE_MIME_TYPES.has(mime) ? \"audio\" : null;\n if (DOCUMENT_MIME_TYPES.has(mime)) return \"document\";\n return null;\n}\n\nconst IP_TYPE_BY_KIND: Record<MediaKind, IPType> = {\n image: \"NFT\",\n audio: \"Audio\",\n video: \"Video\",\n document: \"Documents\",\n};\n\nconst MEDIA_KIND_ICON: Record<MediaKind, typeof ImagePlus> = {\n image: ImagePlus,\n audio: Music,\n video: Video,\n document: FileText,\n};\n\nfunction ToggleGroup({\n value, options, onChange,\n}: { value: string; options: readonly string[]; onChange: (v: string) => void }) {\n return (\n <div className=\"flex rounded-lg border border-border overflow-hidden w-full\">\n {options.map((opt, i) => (\n <button\n key={opt}\n type=\"button\"\n onClick={() => onChange(opt)}\n className={cn(\n \"flex-1 px-3 py-2 text-sm transition-colors\",\n i > 0 && \"border-l border-border\",\n value === opt ? \"bg-primary text-primary-foreground font-medium\" : \"bg-background hover:bg-muted text-muted-foreground\"\n )}\n >\n {opt}\n </button>\n ))}\n </div>\n );\n}\n\nfunction collectionDisplayLabel(col: ApiCollection) {\n return col.name || col.symbol || `Collection #${col.collectionId}`;\n}\n\nfunction CollectionThumb({ image }: { image: string | null | undefined }) {\n const resolveImage = useImageUrl();\n const imageUrl = resolveImage(image);\n return (\n <div className=\"relative h-10 w-10 rounded-lg overflow-hidden bg-muted shrink-0\">\n {imageUrl ? (\n <Image src={imageUrl} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <Boxes className=\"h-4 w-4 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n );\n}\n\nfunction CollectionPicker({\n collections, value, onChange, valueOf,\n}: {\n collections: ApiCollection[];\n value: string;\n onChange: (id: string) => void;\n valueOf: (c: ApiCollection) => string | null | undefined;\n}) {\n const [open, setOpen] = useState(false);\n const selected = value\n ? collections.find((c) => valueOf(c) === value) ?? null\n : null;\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-expanded={open}\n className=\"flex w-full items-center gap-3 rounded-xl border border-border p-3 text-left transition-colors hover:bg-muted/40\"\n >\n <CollectionThumb image={selected?.image} />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-semibold truncate\">\n {selected ? collectionDisplayLabel(selected) : collections.length ? \"Choose a collection\" : \"No collections yet\"}\n </p>\n <p className=\"text-xs text-muted-foreground\">\n {selected ? `${selected.totalSupply ?? 0} work${selected.totalSupply === 1 ? \"\" : \"s\"}` : \"Where this work will live\"}\n </p>\n </div>\n <ChevronDown className=\"h-3.5 w-3.5 text-muted-foreground shrink-0\" />\n </button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[var(--radix-popover-trigger-width)] p-0\" align=\"start\">\n <div className=\"max-h-64 overflow-y-auto p-1\">\n {collections.length === 0 ? (\n <p className=\"px-3 py-4 text-center text-sm text-muted-foreground\">No collections yet — create one instead.</p>\n ) : (\n collections.map((col) => {\n const id = valueOf(col);\n const isSelected = !!id && value === id;\n return (\n <button\n key={id ?? col.contractAddress ?? col.name}\n type=\"button\"\n disabled={!id}\n onClick={() => { if (!id) return; onChange(id); setOpen(false); }}\n className=\"flex w-full items-center gap-2.5 rounded-lg px-2 py-2 text-left transition-colors hover:bg-muted/60\"\n >\n <CollectionThumb image={col.image} />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium truncate\">{collectionDisplayLabel(col)}</p>\n <p className=\"text-xs text-muted-foreground\">{col.totalSupply ?? 0} work{col.totalSupply === 1 ? \"\" : \"s\"}</p>\n </div>\n {isSelected && <Check className=\"h-4 w-4 text-brand-blue shrink-0\" />}\n </button>\n );\n })\n )}\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n\ninterface FormValues {\n name: string;\n description: string;\n external_url: string;\n licenseType: string;\n commercialUse: \"Yes\" | \"No\";\n derivatives: \"Allowed\" | \"Not Allowed\" | \"Share-Alike\";\n attribution: \"Required\" | \"Not Required\";\n geographicScope: string;\n aiPolicy: \"Allowed\" | \"Not Allowed\" | \"Training Only\";\n royalty: number;\n}\n\nexport function FastMint(props: FastMintProps) {\n const {\n presentation = \"inline\", open = true, onClose, mediaKindLock, onMinted,\n collections, refetchCollections,\n hasWallet, walletAddress, onRequireWallet, connectLabel, getUploadToken, getSigner,\n client, successFooter,\n } = props;\n\n const [status, setStatus] = useState<\"idle\" | \"minting\" | \"success\" | \"error\">(\"idle\");\n const [errorMsg, setErrorMsg] = useState<string | null>(null);\n\n const [mediaFile, setMediaFile] = useState<File | null>(null);\n const [mediaPreview, setMediaPreview] = useState<string | null>(null);\n const [mediaUri, setMediaUri] = useState<string | null>(null);\n const [mediaKind, setMediaKind] = useState<MediaKind>(\"image\");\n const [mediaUploading, setMediaUploading] = useState(false);\n const previewUrlRef = useRef<string | null>(null);\n const mediaInputRef = useRef<HTMLInputElement>(null);\n\n const [featurePreview, setFeaturePreview] = useState<string | null>(null);\n const [featureUri, setFeatureUri] = useState<string | null>(null);\n const [featureUploading, setFeatureUploading] = useState(false);\n const featurePreviewRef = useRef<string | null>(null);\n const featureInputRef = useRef<HTMLInputElement>(null);\n\n const [assetType, setAssetType] = useState<\"single\" | \"editions\">(\"single\");\n const [editionCount, setEditionCount] = useState(\"10\");\n\n const [collectionMode, setCollectionMode] = useState<\"existing\" | \"new\">(\"existing\");\n const [existingCollectionId, setExistingCollectionId] = useState(\"\");\n const [existingCollectionContract, setExistingCollectionContract] = useState(\"\");\n const [newCollectionName, setNewCollectionName] = useState(\"\");\n const [newCollectionSymbol, setNewCollectionSymbol] = useState(\"\");\n const [newCollectionDescription, setNewCollectionDescription] = useState(\"\");\n const [autoSymbol, setAutoSymbol] = useState(\"\");\n const [autoCollectionName, setAutoCollectionName] = useState(\"\");\n const [autoCollectionDescription, setAutoCollectionDescription] = useState(\"\");\n\n const [ipType, setIpType] = useState<IPType>(\"NFT\");\n const [advancedOpen, setAdvancedOpen] = useState(false);\n const [ipTypeOpen, setIpTypeOpen] = useState(false);\n const templateFieldsRef = useRef<MetadataField[]>([]);\n\n const [mintedAsset, setMintedAsset] = useState<MintedAsset | null>(null);\n\n useEffect(() => () => {\n if (previewUrlRef.current) URL.revokeObjectURL(previewUrlRef.current);\n if (featurePreviewRef.current) URL.revokeObjectURL(featurePreviewRef.current);\n }, []);\n\n const form = useForm<FormValues>({\n defaultValues: {\n name: \"\", description: \"\", external_url: \"\",\n licenseType: \"CC BY-SA\", commercialUse: \"Yes\", derivatives: \"Share-Alike\",\n attribution: \"Required\", geographicScope: \"Worldwide\", aiPolicy: \"Allowed\", royalty: 0,\n },\n });\n const name = form.watch(\"name\");\n\n useEffect(() => {\n if (walletAddress && !form.getValues(\"external_url\")) {\n form.setValue(\"external_url\", `https://medialane.io/account/${walletAddress}`);\n }\n }, [walletAddress, form]);\n\n useEffect(() => {\n const s = suggestLaunchpadSymbol(name);\n if (!s) return;\n if (!newCollectionSymbol || newCollectionSymbol === autoSymbol) {\n setNewCollectionSymbol(s);\n setAutoSymbol(s);\n }\n if (!newCollectionName || newCollectionName === autoCollectionName) {\n setNewCollectionName(name);\n setAutoCollectionName(name);\n }\n }, [name, autoSymbol, autoCollectionName, newCollectionSymbol, newCollectionName]);\n\n const description = form.watch(\"description\");\n useEffect(() => {\n if (!newCollectionDescription || newCollectionDescription === autoCollectionDescription) {\n setNewCollectionDescription(description);\n setAutoCollectionDescription(description);\n }\n }, [description, autoCollectionDescription, newCollectionDescription]);\n\n const erc721Collections = mintableCollections(\"single\", collections);\n const erc1155Collections = mintableCollections(\"editions\", collections);\n\n const handleMediaSelect = async (file: File) => {\n const kind = detectMediaKind(file.type);\n if (!kind) {\n setErrorMsg(\"Publish an image, audio, video (JPG/PNG/GIF/SVG/WebP, MP3/WAV/OGG/FLAC, MP4/WebM), or document (PDF, DOC, DOCX, ODT, RTF, TXT, MD).\");\n return;\n }\n if (mediaKindLock && kind !== mediaKindLock) {\n setErrorMsg(`Please upload a${mediaKindLock === \"image\" ? \"n\" : \"\"} ${mediaKindLock}.`);\n return;\n }\n const viaMediaRoute = MEDIA_ROUTE_MIME_TYPES.has(file.type);\n const fileError = uploadError(file, viaMediaRoute ? \"media\" : \"document\");\n if (fileError) {\n setErrorMsg(fileError);\n return;\n }\n setMediaFile(file);\n setMediaKind(kind);\n setIpType(IP_TYPE_BY_KIND[kind]);\n if (previewUrlRef.current) URL.revokeObjectURL(previewUrlRef.current);\n const objectUrl = URL.createObjectURL(file);\n previewUrlRef.current = objectUrl;\n setMediaPreview(objectUrl);\n setMediaUri(null);\n setMediaUploading(true);\n try {\n const token = await getUploadToken();\n if (!token) throw new Error(\"Sign in first\");\n const { uri } = await uploadFileToIpfs(client.api, file, viaMediaRoute ? \"media\" : \"document\");\n setMediaUri(uri);\n } catch (err) {\n const t = uploadFailureToast(err);\n setErrorMsg(t.description ?? t.title);\n } finally {\n setMediaUploading(false);\n }\n };\n\n const clearMedia = () => {\n setMediaFile(null);\n setMediaPreview(null);\n setMediaUri(null);\n if (mediaInputRef.current) mediaInputRef.current.value = \"\";\n };\n\n const handleFeatureSelect = async (file: File) => {\n if (featurePreviewRef.current) URL.revokeObjectURL(featurePreviewRef.current);\n const objectUrl = URL.createObjectURL(file);\n featurePreviewRef.current = objectUrl;\n setFeaturePreview(objectUrl);\n setFeatureUri(null);\n setFeatureUploading(true);\n try {\n const token = await getUploadToken();\n if (!token) throw new Error(\"Sign in first\");\n const { uri } = await uploadFileToIpfs(client.api, file, \"image\");\n setFeatureUri(uri);\n } catch (err) {\n const t = uploadFailureToast(err);\n setErrorMsg(t.description ?? t.title);\n } finally {\n setFeatureUploading(false);\n }\n };\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 ready = !!mediaUri && !mediaUploading && name.trim().length > 0 &&\n (mediaKind === \"image\" || !!featureUri) &&\n (collectionMode === \"existing\"\n ? assetType === \"single\" ? !!existingCollectionId : !!existingCollectionContract\n : newCollectionName.trim().length > 0 && newCollectionSymbol.trim().length > 0);\n\n async function pollForNewCollection(name: string, symbol: string): Promise<ApiCollection | null> {\n for (let attempt = 0; attempt < 8; attempt++) {\n const list = await refetchCollections();\n const match = list.find((c) => c.name === name && c.symbol === symbol);\n if (match?.collectionId) return match;\n await new Promise((r) => setTimeout(r, 1500));\n }\n return null;\n }\n\n const onSubmit = async (values: FormValues) => {\n if (!hasWallet) { onRequireWallet(); return; }\n if (!walletAddress || !mediaUri) return;\n if (values.external_url && !values.external_url.startsWith(\"http://\") && !values.external_url.startsWith(\"https://\")) {\n setErrorMsg(\"External link must start with http:// or https://\");\n return;\n }\n\n setStatus(\"minting\");\n setErrorMsg(null);\n\n try {\n const signer: FastMintSigner = await getSigner();\n\n const image = mediaKind === \"image\" ? mediaUri : featureUri!;\n const animationUrl = mediaKind === \"image\" ? undefined : mediaUri;\n\n const built = buildAssetMetadata({\n name: values.name,\n description: values.description || \"\",\n externalUrl: values.external_url || \"\",\n imageUri: image,\n creator: walletAddress,\n 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 templateTraits: templateFieldsRef.current\n .filter(({ traitType, value }) => traitType.trim() && value.trim())\n .map(({ traitType, value }) => ({ traitType, value })),\n });\n const metadata: Record<string, unknown> = { ...built };\n if (animationUrl) metadata.animation_url = animationUrl;\n\n const uploadToken = await getUploadToken();\n if (!uploadToken) throw new Error(\"Sign in first\");\n const tokenUri = await uploadJsonToIpfs(client.api, metadata);\n\n let result: Awaited<ReturnType<typeof executeIntent>>;\n let finalContractAddress: string | null;\n let finalTokenId: string | null = null;\n\n if (assetType === \"single\") {\n let collectionId = existingCollectionId;\n let contractAddress = erc721Collections.find((c) => c.collectionId === existingCollectionId)?.contractAddress ?? null;\n\n if (collectionMode === \"new\") {\n const intentRes = await client.api.intents.create(\"create-collection\", {\n owner: walletAddress,\n name: newCollectionName,\n symbol: newCollectionSymbol,\n description: newCollectionDescription || undefined,\n image,\n });\n await executeIntent(signer, client, intentRes);\n\n const found = await pollForNewCollection(newCollectionName, newCollectionSymbol);\n if (!found) throw new Error(\"Collection created, but it's still indexing — try minting again in a moment from My Collections.\");\n collectionId = found.collectionId!;\n contractAddress = found.contractAddress ?? null;\n }\n\n const intentRes = await client.api.intents.create(\"mint\", {\n owner: walletAddress,\n collectionId,\n recipient: walletAddress,\n tokenUri,\n royaltyBps: Math.round(values.royalty * 100),\n });\n result = await executeIntent(signer, client, intentRes);\n finalContractAddress = contractAddress;\n\n if (finalContractAddress) {\n finalTokenId = mintedTokenIdFromReceipt(result.receipt, finalContractAddress);\n }\n } else {\n let collectionContract = existingCollectionContract;\n\n if (collectionMode === \"new\") {\n const intentRes = await client.api.intents.create(\"create-collection\", {\n owner: walletAddress,\n name: newCollectionName,\n symbol: newCollectionSymbol,\n description: newCollectionDescription || undefined,\n image,\n baseUri: \"\",\n service: \"mip-erc1155\",\n });\n const deployResult = await executeIntent(signer, client, intentRes);\n\n const deployed = deployedCollectionFromReceipt(deployResult.receipt, \"mip-erc1155\");\n if (!deployed) throw new Error(\"Collection deployed, but its address couldn't be read — check My Collections to mint into it.\");\n collectionContract = deployed;\n }\n\n const intentRes = await client.api.intents.create(\"mint\", {\n owner: walletAddress,\n recipient: walletAddress,\n collectionContract,\n tokenUri,\n value: editionCount,\n royaltyBps: Math.round(values.royalty * 100),\n });\n result = await executeIntent(signer, client, intentRes);\n finalContractAddress = collectionContract;\n finalTokenId = mintedTokenIdFromReceipt(result.receipt, collectionContract);\n }\n\n if (finalContractAddress && finalTokenId) {\n const asset: MintedAsset = { contract: finalContractAddress, tokenId: finalTokenId, image };\n setMintedAsset(asset);\n onMinted?.(asset);\n }\n setStatus(\"success\");\n } catch (err) {\n setErrorMsg(describeError(err).message);\n setStatus(\"error\");\n }\n };\n\n const resetAll = () => {\n setStatus(\"idle\");\n setErrorMsg(null);\n setMintedAsset(null);\n form.reset();\n clearMedia();\n setFeaturePreview(null);\n setFeatureUri(null);\n setAssetType(\"single\");\n setEditionCount(\"10\");\n setCollectionMode(\"existing\");\n setExistingCollectionId(\"\");\n setExistingCollectionContract(\"\");\n setNewCollectionName(\"\");\n setNewCollectionSymbol(\"\");\n setNewCollectionDescription(\"\");\n setAutoSymbol(\"\");\n setAutoCollectionName(\"\");\n setAutoCollectionDescription(\"\");\n templateFieldsRef.current = [];\n };\n\n const busy = status === \"minting\";\n const KindIcon = MEDIA_KIND_ICON[mediaKind];\n const selectedExistingCollection = assetType === \"single\"\n ? erc721Collections.find((c) => c.collectionId === existingCollectionId)\n : erc1155Collections.find((c) => c.contractAddress === existingCollectionContract);\n const collectionLabel = mediaUri\n ? (collectionMode === \"new\"\n ? (newCollectionName || \"New collection\")\n : (selectedExistingCollection?.name || \"IP Asset\"))\n : undefined;\n\n const wrap = (node: React.ReactNode) => {\n if (presentation !== \"dialog\") return node;\n return (\n <ActionDialog open={open} onClose={onClose ?? (() => {})} width={640}>\n <div className=\"relative p-6 sm:p-8\">\n <button\n type=\"button\"\n onClick={onClose}\n aria-label=\"Close\"\n className=\"absolute top-4 right-4 h-8 w-8 rounded-full hover:bg-muted flex items-center justify-center text-muted-foreground\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n {node}\n </div>\n </ActionDialog>\n );\n };\n\n if (status === \"success\") {\n return wrap(\n <SuccessView\n footer={successFooter}\n presentation={presentation}\n previewImage={mediaKind === \"image\" ? mediaPreview : featurePreview}\n name={name}\n collectionLabel={collectionLabel}\n mintedAsset={mintedAsset}\n onPublishAnother={resetAll}\n />\n );\n }\n\n if (!mediaFile) {\n return wrap(\n <Dropzone\n mediaKindLock={mediaKindLock}\n presentation={presentation}\n hasWallet={hasWallet}\n onRequireWallet={onRequireWallet}\n connectLabel={connectLabel}\n onFileSelected={handleMediaSelect}\n />\n );\n }\n\n return wrap(\n <section className=\"space-y-6\">\n <div className=\"flex items-center gap-4 rounded-xl border border-border p-3\">\n <div className=\"relative h-14 w-14 rounded-lg bg-muted overflow-hidden shrink-0\">\n {mediaKind === \"image\" && mediaPreview ? (\n <Image src={mediaPreview} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <KindIcon className=\"h-6 w-6 text-muted-foreground\" />\n </div>\n )}\n {mediaUploading && (\n <div className=\"absolute inset-0 flex items-center justify-center bg-background/70\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n </div>\n )}\n </div>\n <div className=\"min-w-0 flex-1 space-y-1\">\n <p className=\"text-sm font-semibold truncate\">{mediaFile.name}</p>\n <div className=\"flex items-center gap-2 flex-wrap\">\n <p className=\"text-xs text-muted-foreground\">\n {mediaUploading ? \"Uploading…\" : mediaUri ? \"Uploaded\" : \"Upload failed\"}\n </p>\n {mediaUri && (() => {\n const template = IP_TEMPLATES[ipType];\n const TemplateIcon = template.icon;\n return (\n <span\n className={cn(\n \"inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-2xs font-medium\",\n template.color.bg, template.color.text, template.color.border\n )}\n >\n <TemplateIcon className=\"h-3 w-3\" />\n {template.label}\n </span>\n );\n })()}\n </div>\n </div>\n <button\n type=\"button\"\n onClick={() => mediaInputRef.current?.click()}\n className=\"text-xs font-semibold text-brand-blue hover:underline shrink-0\"\n >\n Change\n </button>\n <input ref={mediaInputRef} type=\"file\" className=\"hidden\" onChange={(e) => { const f = e.target.files?.[0]; if (f) handleMediaSelect(f); }} />\n </div>\n\n {mediaUri && (\n <div className=\"grid grid-cols-1 lg:grid-cols-[1fr_320px] gap-8 items-start\">\n <div className=\"space-y-5\">\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">Title *</label>\n <Input\n value={name}\n onChange={(e) => form.setValue(\"name\", e.target.value)}\n placeholder=\"My Creative Work\"\n />\n </div>\n\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">Description</label>\n <Textarea\n value={form.watch(\"description\")}\n onChange={(e) => form.setValue(\"description\", e.target.value)}\n placeholder=\"Describe your work, its story, and any context for buyers…\"\n rows={3}\n />\n </div>\n\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">External link <span className=\"text-muted-foreground font-normal\">(optional)</span></label>\n <Input\n value={form.watch(\"external_url\")}\n onChange={(e) => form.setValue(\"external_url\", e.target.value)}\n placeholder=\"https://yourwebsite.com\"\n />\n </div>\n\n {mediaKind !== \"image\" && (\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">Upload a cover image for your asset *</label>\n <div className=\"flex items-center gap-4\">\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => !featureUploading && featureInputRef.current?.click()}\n onKeyDown={(e) => { if ((e.key === \"Enter\" || e.key === \" \") && !featureUploading) { e.preventDefault(); featureInputRef.current?.click(); } }}\n className=\"relative h-20 w-20 rounded-xl border-2 border-dashed border-border bg-muted flex items-center justify-center overflow-hidden shrink-0 cursor-pointer hover:border-primary/50 transition-colors\"\n >\n {featurePreview ? (\n <Image src={featurePreview} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : (\n <ImagePlus className=\"h-6 w-6 text-muted-foreground\" />\n )}\n {featureUploading && (\n <div className=\"absolute inset-0 flex items-center justify-center bg-background/70\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n </div>\n )}\n <input ref={featureInputRef} type=\"file\" accept={acceptFor(\"image\")} className=\"hidden\" onChange={(e) => { const f = e.target.files?.[0]; if (f) handleFeatureSelect(f); }} />\n </div>\n <p className=\"text-xs text-muted-foreground\">Cover art shown wherever the work is previewed. JPG, PNG, GIF, SVG or WebP.</p>\n </div>\n </div>\n )}\n\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">Asset Type</label>\n <div className=\"grid grid-cols-2 gap-3\">\n <button\n type=\"button\"\n onClick={() => setAssetType(\"single\")}\n className={cn(\"flex items-start gap-3 rounded-xl border p-4 text-left transition-colors\",\n assetType === \"single\" ? \"border-brand-blue bg-brand-blue/5\" : \"border-border hover:bg-muted/40\")}\n >\n <SingleIcon className={cn(\"h-5 w-5 shrink-0 mt-0.5\", assetType === \"single\" ? \"text-brand-blue\" : \"text-muted-foreground\")} />\n <span>\n <span className=\"block text-sm font-semibold\">Single Edition NFT</span>\n <span className=\"block text-xs mt-0.5 text-muted-foreground\">Minted once</span>\n </span>\n </button>\n <button\n type=\"button\"\n onClick={() => setAssetType(\"editions\")}\n className={cn(\"flex items-start gap-3 rounded-xl border p-4 text-left transition-colors\",\n assetType === \"editions\" ? \"border-brand-blue bg-brand-blue/5\" : \"border-border hover:bg-muted/40\")}\n >\n <Layers className={cn(\"h-5 w-5 shrink-0 mt-0.5\", assetType === \"editions\" ? \"text-brand-blue\" : \"text-muted-foreground\")} />\n <span>\n <span className=\"block text-sm font-semibold\">Limited Editions NFT</span>\n <span className=\"block text-xs mt-0.5 text-muted-foreground\">Several numbered copies</span>\n </span>\n </button>\n </div>\n </div>\n\n {assetType === \"editions\" && (\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">Number of copies</label>\n <Input\n type=\"number\"\n min={1}\n value={editionCount}\n onChange={(e) => setEditionCount(e.target.value)}\n className=\"max-w-[140px]\"\n />\n </div>\n )}\n\n <div className=\"space-y-2\">\n <div className=\"flex items-center justify-between\">\n <label className=\"text-sm font-medium flex items-center gap-1.5\">\n <Boxes className=\"h-4 w-4\" />\n Collection *\n </label>\n <div className=\"flex rounded-lg border border-border overflow-hidden\">\n <button\n type=\"button\"\n onClick={() => setCollectionMode(\"existing\")}\n className={cn(\"px-3 h-7 text-xs font-medium transition-colors\",\n collectionMode === \"existing\" ? \"bg-primary text-primary-foreground\" : \"bg-background hover:bg-muted text-muted-foreground\")}\n >\n Existing\n </button>\n <button\n type=\"button\"\n onClick={() => setCollectionMode(\"new\")}\n className={cn(\"px-3 h-7 text-xs font-medium border-l border-border transition-colors flex items-center gap-1\",\n collectionMode === \"new\" ? \"bg-primary text-primary-foreground\" : \"bg-background hover:bg-muted text-muted-foreground\")}\n >\n <Plus className=\"h-3 w-3\" />New\n </button>\n </div>\n </div>\n\n {collectionMode === \"existing\" ? (\n <CollectionPicker\n collections={assetType === \"single\" ? erc721Collections : erc1155Collections}\n value={assetType === \"single\" ? existingCollectionId : existingCollectionContract}\n onChange={assetType === \"single\" ? setExistingCollectionId : setExistingCollectionContract}\n valueOf={collectionKey(assetType === \"single\" ? \"single\" : \"editions\")}\n />\n ) : (\n <div className=\"flex gap-3 rounded-xl border border-border p-3\">\n <div className=\"relative h-16 w-16 rounded-lg overflow-hidden bg-muted shrink-0\">\n {(mediaKind === \"image\" ? mediaPreview : featurePreview) ? (\n <Image\n src={(mediaKind === \"image\" ? mediaPreview : featurePreview)!}\n alt=\"\"\n fill\n className=\"object-cover\"\n unoptimized\n />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <Boxes className=\"h-5 w-5 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n <div className=\"min-w-0 flex-1 space-y-2\">\n <div className=\"grid grid-cols-[1fr_100px] gap-2\">\n <Input\n value={newCollectionName}\n onChange={(e) => setNewCollectionName(e.target.value)}\n placeholder=\"Collection name\"\n className=\"h-9 text-sm\"\n />\n <Input\n value={newCollectionSymbol}\n onChange={(e) => setNewCollectionSymbol(e.target.value.toUpperCase())}\n placeholder=\"SYMBOL\"\n className=\"h-9 text-sm\"\n />\n </div>\n <Textarea\n value={newCollectionDescription}\n onChange={(e) => setNewCollectionDescription(e.target.value)}\n placeholder=\"Describe this collection…\"\n rows={2}\n className=\"text-sm resize-none\"\n />\n <p className=\"text-2xs text-muted-foreground\">Prefilled from your asset — edit anything above.</p>\n </div>\n </div>\n )}\n </div>\n\n <Collapsible open={advancedOpen} onOpenChange={setAdvancedOpen}>\n <div className=\"rounded-xl border border-border overflow-hidden\">\n <CollapsibleTrigger asChild>\n <button type=\"button\" className=\"w-full flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors\">\n <span 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 </span>\n <ChevronDown className={cn(\"h-4 w-4 text-muted-foreground transition-transform\", advancedOpen && \"rotate-180\")} />\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <div className=\"px-4 pb-4 space-y-4 border-t border-border/60 pt-4\">\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">License</label>\n <Select value={form.watch(\"licenseType\")} onValueChange={handleLicenseChange}>\n <SelectTrigger><SelectValue /></SelectTrigger>\n <SelectContent>\n {LICENSE_TYPES.map((l) => <SelectItem key={l.value} value={l.value}>{l.label}</SelectItem>)}\n </SelectContent>\n </Select>\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">Commercial use</label>\n <ToggleGroup value={form.watch(\"commercialUse\")} options={[\"Yes\", \"No\"]} onChange={(v) => form.setValue(\"commercialUse\", v as \"Yes\" | \"No\")} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">Derivatives</label>\n <ToggleGroup value={form.watch(\"derivatives\")} options={DERIVATIVES_OPTIONS} onChange={(v) => form.setValue(\"derivatives\", v as FormValues[\"derivatives\"])} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">Territory</label>\n <Select value={form.watch(\"geographicScope\")} onValueChange={(v) => form.setValue(\"geographicScope\", v)}>\n <SelectTrigger><SelectValue /></SelectTrigger>\n <SelectContent>\n {GEOGRAPHIC_SCOPES.map((s) => <SelectItem key={s} value={s}>{s}</SelectItem>)}\n </SelectContent>\n </Select>\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">AI & data mining</label>\n <ToggleGroup value={form.watch(\"aiPolicy\")} options={AI_POLICIES} onChange={(v) => form.setValue(\"aiPolicy\", v as FormValues[\"aiPolicy\"])} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">Royalty % (0–50)</label>\n <Input\n type=\"number\" min={0} max={50} step={0.5}\n value={form.watch(\"royalty\")}\n onChange={(e) => form.setValue(\"royalty\", parseFloat(e.target.value) || 0)}\n className=\"max-w-[120px]\"\n />\n </div>\n </div>\n </CollapsibleContent>\n </div>\n </Collapsible>\n\n <Collapsible open={ipTypeOpen} onOpenChange={setIpTypeOpen}>\n <div className=\"rounded-xl border border-border overflow-hidden\">\n <CollapsibleTrigger asChild>\n <button type=\"button\" className=\"w-full flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors\">\n <span className=\"flex items-center gap-2\">\n <Layers className=\"h-4 w-4 text-primary\" />\n <span className=\"text-sm font-semibold\">IP Type & Metadata</span>\n <span className=\"text-xs text-muted-foreground font-normal\">Optional</span>\n </span>\n <ChevronDown className={cn(\"h-4 w-4 text-muted-foreground transition-transform\", ipTypeOpen && \"rotate-180\")} />\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <div className=\"px-4 pb-4 space-y-4 border-t border-border/60 pt-4\">\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">IP Type</label>\n <Select value={ipType} onValueChange={(v) => setIpType(v as IPType)}>\n <SelectTrigger><SelectValue /></SelectTrigger>\n <SelectContent>\n {IP_TYPES.map((t) => <SelectItem key={t} value={t}>{t}</SelectItem>)}\n </SelectContent>\n </Select>\n </div>\n <IPTypeFields\n ipType={ipType}\n onChange={(fields) => { templateFieldsRef.current = fields; }}\n uploadDocument={async (file) => {\n const token = await getUploadToken();\n if (!token) throw new Error(\"Sign in first\");\n const { uri } = await uploadFileToIpfs(client.api, file, \"document\");\n return uri;\n }}\n existingDocument={mediaKind === \"document\" && mediaUri && mediaFile ? { uri: mediaUri, name: mediaFile.name } : null}\n />\n </div>\n </CollapsibleContent>\n </div>\n </Collapsible>\n\n {status === \"error\" && errorMsg && <p className=\"text-xs text-destructive\">{errorMsg}</p>}\n\n <button\n type=\"button\"\n disabled={!ready || busy || !hasWallet}\n onClick={form.handleSubmit(onSubmit)}\n className={cn(\n \"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\",\n (!ready || busy || !hasWallet) && \"opacity-40 pointer-events-none\"\n )}\n >\n {busy ? <><Loader2 className=\"h-4 w-4 animate-spin\" />Minting…</> : assetType === \"single\" ? \"Mint NFT\" : \"Mint Editions\"}\n </button>\n <p className=\"text-xs text-center text-muted-foreground\">\n Zero platform fees to mint.\n </p>\n </div>\n\n <div className=\"order-first lg:order-last lg:sticky lg:top-20 max-w-[260px] mx-auto w-full lg:max-w-none lg:mx-0\">\n <MedialaneCollectionCard\n image={mediaKind === \"image\" ? mediaPreview : featurePreview}\n name={name}\n collection={collectionLabel}\n creator={walletAddress ? `${walletAddress.slice(0, 6)}…${walletAddress.slice(-4)}` : undefined}\n creatorHref={walletAddress ? profileHref({ address: walletAddress }) : undefined}\n />\n </div>\n </div>\n )}\n </section>\n );\n}\n"],"mappings":";AAoEQ,SAo0Bc,UAp0Bd,KA2DE,YA3DF;AAlER,SAAS,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,WAAW;AAClB,SAAS,eAAe;AACxB,SAAS,0BAA8C;AACvD,SAAS,qBAAqB;AAC9B,SAAS,eAAe,WAAW,mBAAmB;AACtD,SAAS,eAAe,+BAA+B,gCAAgC;AACvF,SAAS,qBAAqB,qBAAqB;AACnD;AAAA,EACE;AAAA,EAAW;AAAA,EAAO;AAAA,EAAO;AAAA,EAAU;AAAA,EACnC;AAAA,EAAQ,aAAa;AAAA,EAAY;AAAA,EAAa;AAAA,EAAO;AAAA,EAAM;AAAA,EAC3D;AAAA,EAAa;AAAA,OACR;AACP,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,QAAQ,eAAe,YAAY,eAAe,mBAAmB;AAC9E,SAAS,aAAa,oBAAoB,0BAA0B;AACpE,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAS,+BAA+B;AACxC,SAAS,oBAAoB;AAC7B,SAAS,oBAAwC;AACjD;AAAA,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AAc,UAAU,eAAe;AAAA,YAC9C;AAAA,YACA,YAAY;AAAA,YACZ,SAAS,gBAAgB,GAAG,cAAc,MAAM,GAAG,CAAC,CAAC,SAAI,cAAc,MAAM,EAAE,CAAC,KAAK;AAAA,YACrF,aAAa,gBAAgB,YAAY,EAAE,SAAS,cAAc,CAAC,IAAI;AAAA;AAAA,QACzE,GACF;AAAA,SACF;AAAA,OAEJ;AAAA,EACF;AACF;","names":["name","intentRes"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/fast-mint/fast-mint.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState } from \"react\";\nimport Image from \"next/image\";\nimport { useForm } from \"react-hook-form\";\nimport { buildAssetMetadata, type ApiCollection } from \"@medialane/sdk\";\nimport { describeError } from \"../../utils/describe-error.js\";\nimport { UPLOAD_LIMITS, acceptFor, uploadError } from \"../../utils/upload-limits.js\";\nimport { executeIntent, deployedCollectionFromReceipt, mintedTokenIdFromReceipt } from \"@medialane/sdk/starknet\";\nimport { mintableCollections, collectionKey } from \"./mintable-collections.js\";\nimport {\n ImagePlus, Music, Video, FileText, Loader2,\n Layers, ImagePlus as SingleIcon, ChevronDown, Boxes, Plus, Check,\n ShieldCheck,\n} from \"lucide-react\";\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 { Popover, PopoverContent, PopoverTrigger } from \"../popover.js\";\nimport { MedialaneCollectionCard } from \"../medialane-collection-card.js\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"../dialog.js\";\nimport { IPTypeFields, type MetadataField } from \"../ip-type-fields.js\";\nimport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES, DERIVATIVES_OPTIONS,\n type IPType,\n} from \"../../data/ip.js\";\nimport { IP_TEMPLATES } from \"../../data/ip-templates.js\";\nimport { suggestLaunchpadSymbol } from \"../../utils/launchpad-defaults.js\";\nimport { uploadFileToIpfs, uploadJsonToIpfs, uploadFailureToast } from \"../../utils/ipfs-upload.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { Dropzone } from \"./dropzone.js\";\nimport { SuccessView } from \"./success-view.js\";\nimport type { FastMintProps, FastMintSigner, MediaKind, MintedAsset } from \"./types.js\";\nimport { profileHref } from \"@medialane/sdk\";\nimport { useImageUrl } from \"../../utils/use-image-url.js\";\n\nconst MEDIA_ROUTE_MIME_TYPES = new Set(UPLOAD_LIMITS.media.mimeTypes);\nconst DOCUMENT_MIME_TYPES = new Set(UPLOAD_LIMITS.document.mimeTypes.filter((type) => type !== \"application/octet-stream\"));\n\nfunction detectMediaKind(mime: string): MediaKind | null {\n if (mime.startsWith(\"image/\")) return MEDIA_ROUTE_MIME_TYPES.has(mime) ? \"image\" : null;\n if (mime.startsWith(\"video/\")) return MEDIA_ROUTE_MIME_TYPES.has(mime) ? \"video\" : null;\n if (mime.startsWith(\"audio/\")) return MEDIA_ROUTE_MIME_TYPES.has(mime) ? \"audio\" : null;\n if (DOCUMENT_MIME_TYPES.has(mime)) return \"document\";\n return null;\n}\n\nconst IP_TYPE_BY_KIND: Record<MediaKind, IPType> = {\n image: \"NFT\",\n audio: \"Audio\",\n video: \"Video\",\n document: \"Documents\",\n};\n\nconst MEDIA_KIND_ICON: Record<MediaKind, typeof ImagePlus> = {\n image: ImagePlus,\n audio: Music,\n video: Video,\n document: FileText,\n};\n\nfunction ToggleGroup({\n value, options, onChange,\n}: { value: string; options: readonly string[]; onChange: (v: string) => void }) {\n return (\n <div className=\"flex rounded-lg border border-border overflow-hidden w-full\">\n {options.map((opt, i) => (\n <button\n key={opt}\n type=\"button\"\n onClick={() => onChange(opt)}\n className={cn(\n \"flex-1 px-3 py-2 text-sm transition-colors\",\n i > 0 && \"border-l border-border\",\n value === opt ? \"bg-primary text-primary-foreground font-medium\" : \"bg-background hover:bg-muted text-muted-foreground\"\n )}\n >\n {opt}\n </button>\n ))}\n </div>\n );\n}\n\nfunction collectionDisplayLabel(col: ApiCollection) {\n return col.name || col.symbol || `Collection #${col.collectionId}`;\n}\n\nfunction CollectionThumb({ image }: { image: string | null | undefined }) {\n const resolveImage = useImageUrl();\n const imageUrl = resolveImage(image);\n return (\n <div className=\"relative h-10 w-10 rounded-lg overflow-hidden bg-muted shrink-0\">\n {imageUrl ? (\n <Image src={imageUrl} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <Boxes className=\"h-4 w-4 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n );\n}\n\nfunction CollectionPicker({\n collections, value, onChange, valueOf,\n}: {\n collections: ApiCollection[];\n value: string;\n onChange: (id: string) => void;\n valueOf: (c: ApiCollection) => string | null | undefined;\n}) {\n const [open, setOpen] = useState(false);\n const selected = value\n ? collections.find((c) => valueOf(c) === value) ?? null\n : null;\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-expanded={open}\n className=\"flex w-full items-center gap-3 rounded-xl border border-border p-3 text-left transition-colors hover:bg-muted/40\"\n >\n <CollectionThumb image={selected?.image} />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-semibold truncate\">\n {selected ? collectionDisplayLabel(selected) : collections.length ? \"Choose a collection\" : \"No collections yet\"}\n </p>\n <p className=\"text-xs text-muted-foreground\">\n {selected ? `${selected.totalSupply ?? 0} work${selected.totalSupply === 1 ? \"\" : \"s\"}` : \"Where this work will live\"}\n </p>\n </div>\n <ChevronDown className=\"h-3.5 w-3.5 text-muted-foreground shrink-0\" />\n </button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[var(--radix-popover-trigger-width)] p-0\" align=\"start\">\n <div className=\"max-h-64 overflow-y-auto p-1\">\n {collections.length === 0 ? (\n <p className=\"px-3 py-4 text-center text-sm text-muted-foreground\">No collections yet — create one instead.</p>\n ) : (\n collections.map((col) => {\n const id = valueOf(col);\n const isSelected = !!id && value === id;\n return (\n <button\n key={id ?? col.contractAddress ?? col.name}\n type=\"button\"\n disabled={!id}\n onClick={() => { if (!id) return; onChange(id); setOpen(false); }}\n className=\"flex w-full items-center gap-2.5 rounded-lg px-2 py-2 text-left transition-colors hover:bg-muted/60\"\n >\n <CollectionThumb image={col.image} />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium truncate\">{collectionDisplayLabel(col)}</p>\n <p className=\"text-xs text-muted-foreground\">{col.totalSupply ?? 0} work{col.totalSupply === 1 ? \"\" : \"s\"}</p>\n </div>\n {isSelected && <Check className=\"h-4 w-4 text-brand-blue shrink-0\" />}\n </button>\n );\n })\n )}\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n\ninterface FormValues {\n name: string;\n description: string;\n external_url: string;\n licenseType: string;\n commercialUse: \"Yes\" | \"No\";\n derivatives: \"Allowed\" | \"Not Allowed\" | \"Share-Alike\";\n attribution: \"Required\" | \"Not Required\";\n geographicScope: string;\n aiPolicy: \"Allowed\" | \"Not Allowed\" | \"Training Only\";\n royalty: number;\n}\n\nexport function FastMint(props: FastMintProps) {\n const {\n presentation = \"inline\", open = true, onClose, mediaKindLock, onMinted,\n collections, refetchCollections,\n hasWallet, walletAddress, onRequireWallet, connectLabel, getUploadToken, getSigner,\n client, successFooter,\n } = props;\n\n const [status, setStatus] = useState<\"idle\" | \"minting\" | \"success\" | \"error\">(\"idle\");\n const [errorMsg, setErrorMsg] = useState<string | null>(null);\n\n const [mediaFile, setMediaFile] = useState<File | null>(null);\n const [mediaPreview, setMediaPreview] = useState<string | null>(null);\n const [mediaUri, setMediaUri] = useState<string | null>(null);\n const [mediaKind, setMediaKind] = useState<MediaKind>(\"image\");\n const [mediaUploading, setMediaUploading] = useState(false);\n const previewUrlRef = useRef<string | null>(null);\n const mediaInputRef = useRef<HTMLInputElement>(null);\n\n const [featurePreview, setFeaturePreview] = useState<string | null>(null);\n const [featureUri, setFeatureUri] = useState<string | null>(null);\n const [featureUploading, setFeatureUploading] = useState(false);\n const featurePreviewRef = useRef<string | null>(null);\n const featureInputRef = useRef<HTMLInputElement>(null);\n\n const [assetType, setAssetType] = useState<\"single\" | \"editions\">(\"single\");\n const [editionCount, setEditionCount] = useState(\"10\");\n\n const [collectionMode, setCollectionMode] = useState<\"existing\" | \"new\">(\"existing\");\n const [existingCollectionId, setExistingCollectionId] = useState(\"\");\n const [existingCollectionContract, setExistingCollectionContract] = useState(\"\");\n const [newCollectionName, setNewCollectionName] = useState(\"\");\n const [newCollectionSymbol, setNewCollectionSymbol] = useState(\"\");\n const [newCollectionDescription, setNewCollectionDescription] = useState(\"\");\n const [autoSymbol, setAutoSymbol] = useState(\"\");\n const [autoCollectionName, setAutoCollectionName] = useState(\"\");\n const [autoCollectionDescription, setAutoCollectionDescription] = useState(\"\");\n\n const [ipType, setIpType] = useState<IPType>(\"NFT\");\n const [advancedOpen, setAdvancedOpen] = useState(false);\n const [ipTypeOpen, setIpTypeOpen] = useState(false);\n const templateFieldsRef = useRef<MetadataField[]>([]);\n\n const [mintedAsset, setMintedAsset] = useState<MintedAsset | null>(null);\n\n useEffect(() => () => {\n if (previewUrlRef.current) URL.revokeObjectURL(previewUrlRef.current);\n if (featurePreviewRef.current) URL.revokeObjectURL(featurePreviewRef.current);\n }, []);\n\n const form = useForm<FormValues>({\n defaultValues: {\n name: \"\", description: \"\", external_url: \"\",\n licenseType: \"CC BY-SA\", commercialUse: \"Yes\", derivatives: \"Share-Alike\",\n attribution: \"Required\", geographicScope: \"Worldwide\", aiPolicy: \"Allowed\", royalty: 0,\n },\n });\n const name = form.watch(\"name\");\n\n useEffect(() => {\n if (walletAddress && !form.getValues(\"external_url\")) {\n form.setValue(\"external_url\", `https://medialane.io/account/${walletAddress}`);\n }\n }, [walletAddress, form]);\n\n useEffect(() => {\n const s = suggestLaunchpadSymbol(name);\n if (!s) return;\n if (!newCollectionSymbol || newCollectionSymbol === autoSymbol) {\n setNewCollectionSymbol(s);\n setAutoSymbol(s);\n }\n if (!newCollectionName || newCollectionName === autoCollectionName) {\n setNewCollectionName(name);\n setAutoCollectionName(name);\n }\n }, [name, autoSymbol, autoCollectionName, newCollectionSymbol, newCollectionName]);\n\n const description = form.watch(\"description\");\n useEffect(() => {\n if (!newCollectionDescription || newCollectionDescription === autoCollectionDescription) {\n setNewCollectionDescription(description);\n setAutoCollectionDescription(description);\n }\n }, [description, autoCollectionDescription, newCollectionDescription]);\n\n const erc721Collections = mintableCollections(\"single\", collections);\n const erc1155Collections = mintableCollections(\"editions\", collections);\n\n const handleMediaSelect = async (file: File) => {\n const kind = detectMediaKind(file.type);\n if (!kind) {\n setErrorMsg(\"Publish an image, audio, video (JPG/PNG/GIF/SVG/WebP, MP3/WAV/OGG/FLAC, MP4/WebM), or document (PDF, DOC, DOCX, ODT, RTF, TXT, MD).\");\n return;\n }\n if (mediaKindLock && kind !== mediaKindLock) {\n setErrorMsg(`Please upload a${mediaKindLock === \"image\" ? \"n\" : \"\"} ${mediaKindLock}.`);\n return;\n }\n const viaMediaRoute = MEDIA_ROUTE_MIME_TYPES.has(file.type);\n const fileError = uploadError(file, viaMediaRoute ? \"media\" : \"document\");\n if (fileError) {\n setErrorMsg(fileError);\n return;\n }\n setMediaFile(file);\n setMediaKind(kind);\n setIpType(IP_TYPE_BY_KIND[kind]);\n if (previewUrlRef.current) URL.revokeObjectURL(previewUrlRef.current);\n const objectUrl = URL.createObjectURL(file);\n previewUrlRef.current = objectUrl;\n setMediaPreview(objectUrl);\n setMediaUri(null);\n setMediaUploading(true);\n try {\n const token = await getUploadToken();\n if (!token) throw new Error(\"Sign in first\");\n const { uri } = await uploadFileToIpfs(client.api, file, viaMediaRoute ? \"media\" : \"document\");\n setMediaUri(uri);\n } catch (err) {\n const t = uploadFailureToast(err);\n setErrorMsg(t.description ?? t.title);\n } finally {\n setMediaUploading(false);\n }\n };\n\n const clearMedia = () => {\n setMediaFile(null);\n setMediaPreview(null);\n setMediaUri(null);\n if (mediaInputRef.current) mediaInputRef.current.value = \"\";\n };\n\n const handleFeatureSelect = async (file: File) => {\n if (featurePreviewRef.current) URL.revokeObjectURL(featurePreviewRef.current);\n const objectUrl = URL.createObjectURL(file);\n featurePreviewRef.current = objectUrl;\n setFeaturePreview(objectUrl);\n setFeatureUri(null);\n setFeatureUploading(true);\n try {\n const token = await getUploadToken();\n if (!token) throw new Error(\"Sign in first\");\n const { uri } = await uploadFileToIpfs(client.api, file, \"image\");\n setFeatureUri(uri);\n } catch (err) {\n const t = uploadFailureToast(err);\n setErrorMsg(t.description ?? t.title);\n } finally {\n setFeatureUploading(false);\n }\n };\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 ready = !!mediaUri && !mediaUploading && name.trim().length > 0 &&\n (mediaKind === \"image\" || !!featureUri) &&\n (collectionMode === \"existing\"\n ? assetType === \"single\" ? !!existingCollectionId : !!existingCollectionContract\n : newCollectionName.trim().length > 0 && newCollectionSymbol.trim().length > 0);\n\n async function pollForNewCollection(name: string, symbol: string): Promise<ApiCollection | null> {\n for (let attempt = 0; attempt < 8; attempt++) {\n const list = await refetchCollections();\n const match = list.find((c) => c.name === name && c.symbol === symbol);\n if (match?.collectionId) return match;\n await new Promise((r) => setTimeout(r, 1500));\n }\n return null;\n }\n\n const onSubmit = async (values: FormValues) => {\n if (!hasWallet) { onRequireWallet(); return; }\n if (!walletAddress || !mediaUri) return;\n if (values.external_url && !values.external_url.startsWith(\"http://\") && !values.external_url.startsWith(\"https://\")) {\n setErrorMsg(\"External link must start with http:// or https://\");\n return;\n }\n\n setStatus(\"minting\");\n setErrorMsg(null);\n\n try {\n const signer: FastMintSigner = await getSigner();\n\n const image = mediaKind === \"image\" ? mediaUri : featureUri!;\n const animationUrl = mediaKind === \"image\" ? undefined : mediaUri;\n\n const built = buildAssetMetadata({\n name: values.name,\n description: values.description || \"\",\n externalUrl: values.external_url || \"\",\n imageUri: image,\n creator: walletAddress,\n 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 templateTraits: templateFieldsRef.current\n .filter(({ traitType, value }) => traitType.trim() && value.trim())\n .map(({ traitType, value }) => ({ traitType, value })),\n });\n const metadata: Record<string, unknown> = { ...built };\n if (animationUrl) metadata.animation_url = animationUrl;\n\n const uploadToken = await getUploadToken();\n if (!uploadToken) throw new Error(\"Sign in first\");\n const tokenUri = await uploadJsonToIpfs(client.api, metadata);\n\n let result: Awaited<ReturnType<typeof executeIntent>>;\n let finalContractAddress: string | null;\n let finalTokenId: string | null = null;\n\n if (assetType === \"single\") {\n let collectionId = existingCollectionId;\n let contractAddress = erc721Collections.find((c) => c.collectionId === existingCollectionId)?.contractAddress ?? null;\n\n if (collectionMode === \"new\") {\n const intentRes = await client.api.intents.create(\"create-collection\", {\n owner: walletAddress,\n name: newCollectionName,\n symbol: newCollectionSymbol,\n description: newCollectionDescription || undefined,\n image,\n });\n await executeIntent(signer, client, intentRes);\n\n const found = await pollForNewCollection(newCollectionName, newCollectionSymbol);\n if (!found) throw new Error(\"Collection created, but it's still indexing — try minting again in a moment from My Collections.\");\n collectionId = found.collectionId!;\n contractAddress = found.contractAddress ?? null;\n }\n\n const intentRes = await client.api.intents.create(\"mint\", {\n owner: walletAddress,\n collectionId,\n recipient: walletAddress,\n tokenUri,\n royaltyBps: Math.round(values.royalty * 100),\n });\n result = await executeIntent(signer, client, intentRes);\n finalContractAddress = contractAddress;\n\n if (finalContractAddress) {\n finalTokenId = mintedTokenIdFromReceipt(result.receipt, finalContractAddress);\n }\n } else {\n let collectionContract = existingCollectionContract;\n\n if (collectionMode === \"new\") {\n const intentRes = await client.api.intents.create(\"create-collection\", {\n owner: walletAddress,\n name: newCollectionName,\n symbol: newCollectionSymbol,\n description: newCollectionDescription || undefined,\n image,\n baseUri: \"\",\n service: \"mip-erc1155\",\n });\n const deployResult = await executeIntent(signer, client, intentRes);\n\n const deployed = deployedCollectionFromReceipt(deployResult.receipt, \"mip-erc1155\");\n if (!deployed) throw new Error(\"Collection deployed, but its address couldn't be read — check My Collections to mint into it.\");\n collectionContract = deployed;\n }\n\n const intentRes = await client.api.intents.create(\"mint\", {\n owner: walletAddress,\n recipient: walletAddress,\n collectionContract,\n tokenUri,\n value: editionCount,\n royaltyBps: Math.round(values.royalty * 100),\n });\n result = await executeIntent(signer, client, intentRes);\n finalContractAddress = collectionContract;\n finalTokenId = mintedTokenIdFromReceipt(result.receipt, collectionContract);\n }\n\n if (finalContractAddress && finalTokenId) {\n const asset: MintedAsset = { contract: finalContractAddress, tokenId: finalTokenId, image };\n setMintedAsset(asset);\n onMinted?.(asset);\n }\n setStatus(\"success\");\n } catch (err) {\n setErrorMsg(describeError(err).message);\n setStatus(\"error\");\n }\n };\n\n const resetAll = () => {\n setStatus(\"idle\");\n setErrorMsg(null);\n setMintedAsset(null);\n form.reset();\n clearMedia();\n setFeaturePreview(null);\n setFeatureUri(null);\n setAssetType(\"single\");\n setEditionCount(\"10\");\n setCollectionMode(\"existing\");\n setExistingCollectionId(\"\");\n setExistingCollectionContract(\"\");\n setNewCollectionName(\"\");\n setNewCollectionSymbol(\"\");\n setNewCollectionDescription(\"\");\n setAutoSymbol(\"\");\n setAutoCollectionName(\"\");\n setAutoCollectionDescription(\"\");\n templateFieldsRef.current = [];\n };\n\n const busy = status === \"minting\";\n const KindIcon = MEDIA_KIND_ICON[mediaKind];\n const selectedExistingCollection = assetType === \"single\"\n ? erc721Collections.find((c) => c.collectionId === existingCollectionId)\n : erc1155Collections.find((c) => c.contractAddress === existingCollectionContract);\n const collectionLabel = mediaUri\n ? (collectionMode === \"new\"\n ? (newCollectionName || \"New collection\")\n : (selectedExistingCollection?.name || \"IP Asset\"))\n : undefined;\n\n const wrap = (node: React.ReactNode) => {\n if (presentation !== \"dialog\") return node;\n return (\n <Dialog open={open} onOpenChange={(next) => { if (!next) onClose?.(); }}>\n <DialogContent className=\"gap-0 p-6 sm:max-w-2xl sm:p-8\">\n <DialogTitle className=\"sr-only\">Create</DialogTitle>\n <DialogDescription className=\"sr-only\">Add media, describe it and publish it as an asset.</DialogDescription>\n {node}\n </DialogContent>\n </Dialog>\n );\n };\n\n if (status === \"success\") {\n return wrap(\n <SuccessView\n footer={successFooter}\n presentation={presentation}\n previewImage={mediaKind === \"image\" ? mediaPreview : featurePreview}\n name={name}\n collectionLabel={collectionLabel}\n mintedAsset={mintedAsset}\n onPublishAnother={resetAll}\n />\n );\n }\n\n if (!mediaFile) {\n return wrap(\n <Dropzone\n mediaKindLock={mediaKindLock}\n presentation={presentation}\n hasWallet={hasWallet}\n onRequireWallet={onRequireWallet}\n connectLabel={connectLabel}\n onFileSelected={handleMediaSelect}\n />\n );\n }\n\n return wrap(\n <section className=\"space-y-6\">\n <div className=\"flex items-center gap-4 rounded-xl border border-border p-3\">\n <div className=\"relative h-14 w-14 rounded-lg bg-muted overflow-hidden shrink-0\">\n {mediaKind === \"image\" && mediaPreview ? (\n <Image src={mediaPreview} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <KindIcon className=\"h-6 w-6 text-muted-foreground\" />\n </div>\n )}\n {mediaUploading && (\n <div className=\"absolute inset-0 flex items-center justify-center bg-background/70\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n </div>\n )}\n </div>\n <div className=\"min-w-0 flex-1 space-y-1\">\n <p className=\"text-sm font-semibold truncate\">{mediaFile.name}</p>\n <div className=\"flex items-center gap-2 flex-wrap\">\n <p className=\"text-xs text-muted-foreground\">\n {mediaUploading ? \"Uploading…\" : mediaUri ? \"Uploaded\" : \"Upload failed\"}\n </p>\n {mediaUri && (() => {\n const template = IP_TEMPLATES[ipType];\n const TemplateIcon = template.icon;\n return (\n <span\n className={cn(\n \"inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-2xs font-medium\",\n template.color.bg, template.color.text, template.color.border\n )}\n >\n <TemplateIcon className=\"h-3 w-3\" />\n {template.label}\n </span>\n );\n })()}\n </div>\n </div>\n <button\n type=\"button\"\n onClick={() => mediaInputRef.current?.click()}\n className=\"text-xs font-semibold text-brand-blue hover:underline shrink-0\"\n >\n Change\n </button>\n <input ref={mediaInputRef} type=\"file\" className=\"hidden\" onChange={(e) => { const f = e.target.files?.[0]; if (f) handleMediaSelect(f); }} />\n </div>\n\n {mediaUri && (\n <div className=\"grid grid-cols-1 lg:grid-cols-[1fr_320px] gap-8 items-start\">\n <div className=\"space-y-5\">\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">Title *</label>\n <Input\n value={name}\n onChange={(e) => form.setValue(\"name\", e.target.value)}\n placeholder=\"My Creative Work\"\n />\n </div>\n\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">Description</label>\n <Textarea\n value={form.watch(\"description\")}\n onChange={(e) => form.setValue(\"description\", e.target.value)}\n placeholder=\"Describe your work, its story, and any context for buyers…\"\n rows={3}\n />\n </div>\n\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">External link <span className=\"text-muted-foreground font-normal\">(optional)</span></label>\n <Input\n value={form.watch(\"external_url\")}\n onChange={(e) => form.setValue(\"external_url\", e.target.value)}\n placeholder=\"https://yourwebsite.com\"\n />\n </div>\n\n {mediaKind !== \"image\" && (\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">Upload a cover image for your asset *</label>\n <div className=\"flex items-center gap-4\">\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => !featureUploading && featureInputRef.current?.click()}\n onKeyDown={(e) => { if ((e.key === \"Enter\" || e.key === \" \") && !featureUploading) { e.preventDefault(); featureInputRef.current?.click(); } }}\n className=\"relative h-20 w-20 rounded-xl border-2 border-dashed border-border bg-muted flex items-center justify-center overflow-hidden shrink-0 cursor-pointer hover:border-primary/50 transition-colors\"\n >\n {featurePreview ? (\n <Image src={featurePreview} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : (\n <ImagePlus className=\"h-6 w-6 text-muted-foreground\" />\n )}\n {featureUploading && (\n <div className=\"absolute inset-0 flex items-center justify-center bg-background/70\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n </div>\n )}\n <input ref={featureInputRef} type=\"file\" accept={acceptFor(\"image\")} className=\"hidden\" onChange={(e) => { const f = e.target.files?.[0]; if (f) handleFeatureSelect(f); }} />\n </div>\n <p className=\"text-xs text-muted-foreground\">Cover art shown wherever the work is previewed. JPG, PNG, GIF, SVG or WebP.</p>\n </div>\n </div>\n )}\n\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">Asset Type</label>\n <div className=\"grid grid-cols-2 gap-3\">\n <button\n type=\"button\"\n onClick={() => setAssetType(\"single\")}\n className={cn(\"flex items-start gap-3 rounded-xl border p-4 text-left transition-colors\",\n assetType === \"single\" ? \"border-brand-blue bg-brand-blue/5\" : \"border-border hover:bg-muted/40\")}\n >\n <SingleIcon className={cn(\"h-5 w-5 shrink-0 mt-0.5\", assetType === \"single\" ? \"text-brand-blue\" : \"text-muted-foreground\")} />\n <span>\n <span className=\"block text-sm font-semibold\">Single Edition NFT</span>\n <span className=\"block text-xs mt-0.5 text-muted-foreground\">Minted once</span>\n </span>\n </button>\n <button\n type=\"button\"\n onClick={() => setAssetType(\"editions\")}\n className={cn(\"flex items-start gap-3 rounded-xl border p-4 text-left transition-colors\",\n assetType === \"editions\" ? \"border-brand-blue bg-brand-blue/5\" : \"border-border hover:bg-muted/40\")}\n >\n <Layers className={cn(\"h-5 w-5 shrink-0 mt-0.5\", assetType === \"editions\" ? \"text-brand-blue\" : \"text-muted-foreground\")} />\n <span>\n <span className=\"block text-sm font-semibold\">Limited Editions NFT</span>\n <span className=\"block text-xs mt-0.5 text-muted-foreground\">Several numbered copies</span>\n </span>\n </button>\n </div>\n </div>\n\n {assetType === \"editions\" && (\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium\">Number of copies</label>\n <Input\n type=\"number\"\n min={1}\n value={editionCount}\n onChange={(e) => setEditionCount(e.target.value)}\n className=\"max-w-[140px]\"\n />\n </div>\n )}\n\n <div className=\"space-y-2\">\n <div className=\"flex items-center justify-between\">\n <label className=\"text-sm font-medium flex items-center gap-1.5\">\n <Boxes className=\"h-4 w-4\" />\n Collection *\n </label>\n <div className=\"flex rounded-lg border border-border overflow-hidden\">\n <button\n type=\"button\"\n onClick={() => setCollectionMode(\"existing\")}\n className={cn(\"px-3 h-7 text-xs font-medium transition-colors\",\n collectionMode === \"existing\" ? \"bg-primary text-primary-foreground\" : \"bg-background hover:bg-muted text-muted-foreground\")}\n >\n Existing\n </button>\n <button\n type=\"button\"\n onClick={() => setCollectionMode(\"new\")}\n className={cn(\"px-3 h-7 text-xs font-medium border-l border-border transition-colors flex items-center gap-1\",\n collectionMode === \"new\" ? \"bg-primary text-primary-foreground\" : \"bg-background hover:bg-muted text-muted-foreground\")}\n >\n <Plus className=\"h-3 w-3\" />New\n </button>\n </div>\n </div>\n\n {collectionMode === \"existing\" ? (\n <CollectionPicker\n collections={assetType === \"single\" ? erc721Collections : erc1155Collections}\n value={assetType === \"single\" ? existingCollectionId : existingCollectionContract}\n onChange={assetType === \"single\" ? setExistingCollectionId : setExistingCollectionContract}\n valueOf={collectionKey(assetType === \"single\" ? \"single\" : \"editions\")}\n />\n ) : (\n <div className=\"flex gap-3 rounded-xl border border-border p-3\">\n <div className=\"relative h-16 w-16 rounded-lg overflow-hidden bg-muted shrink-0\">\n {(mediaKind === \"image\" ? mediaPreview : featurePreview) ? (\n <Image\n src={(mediaKind === \"image\" ? mediaPreview : featurePreview)!}\n alt=\"\"\n fill\n className=\"object-cover\"\n unoptimized\n />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <Boxes className=\"h-5 w-5 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n <div className=\"min-w-0 flex-1 space-y-2\">\n <div className=\"grid grid-cols-[1fr_100px] gap-2\">\n <Input\n value={newCollectionName}\n onChange={(e) => setNewCollectionName(e.target.value)}\n placeholder=\"Collection name\"\n className=\"h-9 text-sm\"\n />\n <Input\n value={newCollectionSymbol}\n onChange={(e) => setNewCollectionSymbol(e.target.value.toUpperCase())}\n placeholder=\"SYMBOL\"\n className=\"h-9 text-sm\"\n />\n </div>\n <Textarea\n value={newCollectionDescription}\n onChange={(e) => setNewCollectionDescription(e.target.value)}\n placeholder=\"Describe this collection…\"\n rows={2}\n className=\"text-sm resize-none\"\n />\n <p className=\"text-2xs text-muted-foreground\">Prefilled from your asset — edit anything above.</p>\n </div>\n </div>\n )}\n </div>\n\n <Collapsible open={advancedOpen} onOpenChange={setAdvancedOpen}>\n <div className=\"rounded-xl border border-border overflow-hidden\">\n <CollapsibleTrigger asChild>\n <button type=\"button\" className=\"w-full flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors\">\n <span 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 </span>\n <ChevronDown className={cn(\"h-4 w-4 text-muted-foreground transition-transform\", advancedOpen && \"rotate-180\")} />\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <div className=\"px-4 pb-4 space-y-4 border-t border-border/60 pt-4\">\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">License</label>\n <Select value={form.watch(\"licenseType\")} onValueChange={handleLicenseChange}>\n <SelectTrigger><SelectValue /></SelectTrigger>\n <SelectContent>\n {LICENSE_TYPES.map((l) => <SelectItem key={l.value} value={l.value}>{l.label}</SelectItem>)}\n </SelectContent>\n </Select>\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">Commercial use</label>\n <ToggleGroup value={form.watch(\"commercialUse\")} options={[\"Yes\", \"No\"]} onChange={(v) => form.setValue(\"commercialUse\", v as \"Yes\" | \"No\")} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">Derivatives</label>\n <ToggleGroup value={form.watch(\"derivatives\")} options={DERIVATIVES_OPTIONS} onChange={(v) => form.setValue(\"derivatives\", v as FormValues[\"derivatives\"])} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">Territory</label>\n <Select value={form.watch(\"geographicScope\")} onValueChange={(v) => form.setValue(\"geographicScope\", v)}>\n <SelectTrigger><SelectValue /></SelectTrigger>\n <SelectContent>\n {GEOGRAPHIC_SCOPES.map((s) => <SelectItem key={s} value={s}>{s}</SelectItem>)}\n </SelectContent>\n </Select>\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">AI & data mining</label>\n <ToggleGroup value={form.watch(\"aiPolicy\")} options={AI_POLICIES} onChange={(v) => form.setValue(\"aiPolicy\", v as FormValues[\"aiPolicy\"])} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">Royalty % (0–50)</label>\n <Input\n type=\"number\" min={0} max={50} step={0.5}\n value={form.watch(\"royalty\")}\n onChange={(e) => form.setValue(\"royalty\", parseFloat(e.target.value) || 0)}\n className=\"max-w-[120px]\"\n />\n </div>\n </div>\n </CollapsibleContent>\n </div>\n </Collapsible>\n\n <Collapsible open={ipTypeOpen} onOpenChange={setIpTypeOpen}>\n <div className=\"rounded-xl border border-border overflow-hidden\">\n <CollapsibleTrigger asChild>\n <button type=\"button\" className=\"w-full flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors\">\n <span className=\"flex items-center gap-2\">\n <Layers className=\"h-4 w-4 text-primary\" />\n <span className=\"text-sm font-semibold\">IP Type & Metadata</span>\n <span className=\"text-xs text-muted-foreground font-normal\">Optional</span>\n </span>\n <ChevronDown className={cn(\"h-4 w-4 text-muted-foreground transition-transform\", ipTypeOpen && \"rotate-180\")} />\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <div className=\"px-4 pb-4 space-y-4 border-t border-border/60 pt-4\">\n <div className=\"space-y-1.5\">\n <label className=\"text-xs font-medium text-muted-foreground\">IP Type</label>\n <Select value={ipType} onValueChange={(v) => setIpType(v as IPType)}>\n <SelectTrigger><SelectValue /></SelectTrigger>\n <SelectContent>\n {IP_TYPES.map((t) => <SelectItem key={t} value={t}>{t}</SelectItem>)}\n </SelectContent>\n </Select>\n </div>\n <IPTypeFields\n ipType={ipType}\n onChange={(fields) => { templateFieldsRef.current = fields; }}\n uploadDocument={async (file) => {\n const token = await getUploadToken();\n if (!token) throw new Error(\"Sign in first\");\n const { uri } = await uploadFileToIpfs(client.api, file, \"document\");\n return uri;\n }}\n existingDocument={mediaKind === \"document\" && mediaUri && mediaFile ? { uri: mediaUri, name: mediaFile.name } : null}\n />\n </div>\n </CollapsibleContent>\n </div>\n </Collapsible>\n\n {status === \"error\" && errorMsg && <p className=\"text-xs text-destructive\">{errorMsg}</p>}\n\n <button\n type=\"button\"\n disabled={!ready || busy || !hasWallet}\n onClick={form.handleSubmit(onSubmit)}\n className={cn(\n \"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\",\n (!ready || busy || !hasWallet) && \"opacity-40 pointer-events-none\"\n )}\n >\n {busy ? <><Loader2 className=\"h-4 w-4 animate-spin\" />Minting…</> : assetType === \"single\" ? \"Mint NFT\" : \"Mint Editions\"}\n </button>\n <p className=\"text-xs text-center text-muted-foreground\">\n Zero platform fees to mint.\n </p>\n </div>\n\n <div className=\"order-first lg:order-last lg:sticky lg:top-20 max-w-[260px] mx-auto w-full lg:max-w-none lg:mx-0\">\n <MedialaneCollectionCard\n image={mediaKind === \"image\" ? mediaPreview : featurePreview}\n name={name}\n collection={collectionLabel}\n creator={walletAddress ? `${walletAddress.slice(0, 6)}…${walletAddress.slice(-4)}` : undefined}\n creatorHref={walletAddress ? profileHref({ address: walletAddress }) : undefined}\n />\n </div>\n </div>\n )}\n </section>\n );\n}\n"],"mappings":";AAoEQ,SA8zBc,UA9zBd,KA2DE,YA3DF;AAlER,SAAS,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,WAAW;AAClB,SAAS,eAAe;AACxB,SAAS,0BAA8C;AACvD,SAAS,qBAAqB;AAC9B,SAAS,eAAe,WAAW,mBAAmB;AACtD,SAAS,eAAe,+BAA+B,gCAAgC;AACvF,SAAS,qBAAqB,qBAAqB;AACnD;AAAA,EACE;AAAA,EAAW;AAAA,EAAO;AAAA,EAAO;AAAA,EAAU;AAAA,EACnC;AAAA,EAAQ,aAAa;AAAA,EAAY;AAAA,EAAa;AAAA,EAAO;AAAA,EAAM;AAAA,EAC3D;AAAA,OACK;AACP,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,QAAQ,eAAe,YAAY,eAAe,mBAAmB;AAC9E,SAAS,aAAa,oBAAoB,0BAA0B;AACpE,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAS,+BAA+B;AACxC,SAAS,QAAQ,eAAe,mBAAmB,mBAAmB;AACtE,SAAS,oBAAwC;AACjD;AAAA,EACE;AAAA,EAAU;AAAA,EAAe;AAAA,EAAmB;AAAA,EAAa;AAAA,OAEpD;AACP,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AACvC,SAAS,kBAAkB,kBAAkB,0BAA0B;AACvE,SAAS,UAAU;AACnB,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAE5B,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAE5B,MAAM,yBAAyB,IAAI,IAAI,cAAc,MAAM,SAAS;AACpE,MAAM,sBAAsB,IAAI,IAAI,cAAc,SAAS,UAAU,OAAO,CAAC,SAAS,SAAS,0BAA0B,CAAC;AAE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,OAAM,IAAI,MAAM,eAAe;AAC3C,0BAAM,EAAE,IAAI,IAAI,MAAM,iBAAiB,OAAO,KAAK,MAAM,UAAU;AACnE,2BAAO;AAAA,kBACT;AAAA,kBACA,kBAAkB,cAAc,cAAc,YAAY,YAAY,EAAE,KAAK,UAAU,MAAM,UAAU,KAAK,IAAI;AAAA;AAAA,cAClH;AAAA,eACF,GACF;AAAA,aACF,GACF;AAAA,UAEC,WAAW,WAAW,YAAY,oBAAC,OAAE,WAAU,4BAA4B,oBAAS;AAAA,UAErF;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,UAAU,CAAC,SAAS,QAAQ,CAAC;AAAA,cAC7B,SAAS,KAAK,aAAa,QAAQ;AAAA,cACnC,WAAW;AAAA,gBACT;AAAA,iBACC,CAAC,SAAS,QAAQ,CAAC,cAAc;AAAA,cACpC;AAAA,cAEC,iBAAO,iCAAE;AAAA,oCAAC,WAAQ,WAAU,wBAAuB;AAAA,gBAAE;AAAA,iBAAQ,IAAM,cAAc,WAAW,aAAa;AAAA;AAAA,UAC5G;AAAA,UACA,oBAAC,OAAE,WAAU,6CAA4C,yCAEzD;AAAA,WACF;AAAA,QAEA,oBAAC,SAAI,WAAU,oGACb;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,cAAc,UAAU,eAAe;AAAA,YAC9C;AAAA,YACA,YAAY;AAAA,YACZ,SAAS,gBAAgB,GAAG,cAAc,MAAM,GAAG,CAAC,CAAC,SAAI,cAAc,MAAM,EAAE,CAAC,KAAK;AAAA,YACrF,aAAa,gBAAgB,YAAY,EAAE,SAAS,cAAc,CAAC,IAAI;AAAA;AAAA,QACzE,GACF;AAAA,SACF;AAAA,OAEJ;AAAA,EACF;AACF;","names":["name","intentRes"]}
|
|
@@ -25,6 +25,7 @@ __export(gated_content_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(gated_content_exports);
|
|
26
26
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
27
|
var import_lucide_react = require("lucide-react");
|
|
28
|
+
var import_brand = require("../data/brand.js");
|
|
28
29
|
var import_gated_content_types = require("../data/gated-content-types.js");
|
|
29
30
|
var import_medialane_app = require("./medialane-app.js");
|
|
30
31
|
const typeOf = (content) => content.type ? import_gated_content_types.GATED_CONTENT_TYPES[content.type] ?? import_gated_content_types.GATED_CONTENT_TYPE_FALLBACK : import_gated_content_types.GATED_CONTENT_TYPE_FALLBACK;
|
|
@@ -65,7 +66,7 @@ function GatedContentHero({
|
|
|
65
66
|
"p",
|
|
66
67
|
{
|
|
67
68
|
className: "text-2xs font-bold leading-none mb-1",
|
|
68
|
-
style: { background:
|
|
69
|
+
style: { background: `linear-gradient(90deg, ${import_brand.BRAND_COLOR.blue}, ${import_brand.BRAND_COLOR.purple}, ${import_brand.BRAND_COLOR.rose})`, WebkitBackgroundClip: "text", WebkitTextFillColor: "transparent" },
|
|
69
70
|
children: "Holder exclusive"
|
|
70
71
|
}
|
|
71
72
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/gated-content.tsx"],"sourcesContent":["\"use client\";\n\nimport { Loader2, Lock, ShoppingBag, Sparkles, Unlock } from \"lucide-react\";\nimport type { ApiCollectionProfile } from \"@medialane/sdk\";\nimport { GATED_CONTENT_TYPES, GATED_CONTENT_TYPE_FALLBACK } from \"../data/gated-content-types.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\n\nexport interface GatedContent {\n title: string | null;\n url: string;\n type: string | null;\n}\n\nexport type GatedContentState =\n | { status: \"signed_out\" }\n | { status: \"loading\" }\n | { status: \"not_holder\" }\n | { status: \"unlocked\"; content: GatedContent }\n | { status: \"error\" };\n\nconst typeOf = (content: GatedContent) => (content.type ? GATED_CONTENT_TYPES[content.type] ?? GATED_CONTENT_TYPE_FALLBACK : GATED_CONTENT_TYPE_FALLBACK);\n\nexport function GatedContentHero({\n profile,\n state,\n onViewExclusive,\n}: {\n profile: ApiCollectionProfile | null;\n state: GatedContentState;\n onViewExclusive: () => void;\n}) {\n if (!profile?.hasGatedContent) return null;\n const title = profile.gatedContentTitle ?? \"Exclusive content for holders\";\n\n if (state.status === \"unlocked\") {\n const { icon: Icon } = typeOf(state.content);\n return (\n <button\n onClick={onViewExclusive}\n className=\"w-full flex items-center gap-4 rounded-2xl border border-emerald-500/40 bg-emerald-500/10 hover:bg-emerald-500/15 px-5 py-4 transition-colors text-left\"\n >\n <div className=\"h-11 w-11 rounded-xl bg-emerald-500/20 border border-emerald-500/30 flex items-center justify-center shrink-0 text-emerald-500\">\n <Icon className=\"h-5 w-5\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-2xs font-bold text-emerald-500 leading-none\">✓ You're a holder — unlocked</p>\n <p className=\"text-sm font-bold text-foreground leading-snug mt-1 truncate\">{state.content.title ?? title}</p>\n </div>\n <Unlock className=\"h-4 w-4 text-emerald-500 shrink-0\" />\n </button>\n );\n }\n\n return (\n <div className=\"card-exclusive-wrapper btn-border-animated\">\n <button\n onClick={onViewExclusive}\n className=\"w-full flex items-center gap-4 rounded-[calc(var(--radius)*1.25)] bg-card hover:bg-muted/60 px-5 py-4 transition-colors text-left group\"\n >\n <div className=\"h-11 w-11 rounded-xl bg-muted flex items-center justify-center shrink-0\">\n <Lock className=\"h-5 w-5 text-muted-foreground\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p\n className=\"text-2xs font-bold leading-none mb-1\"\n style={{ background:
|
|
1
|
+
{"version":3,"sources":["../../src/components/gated-content.tsx"],"sourcesContent":["\"use client\";\n\nimport { Loader2, Lock, ShoppingBag, Sparkles, Unlock } from \"lucide-react\";\nimport type { ApiCollectionProfile } from \"@medialane/sdk\";\nimport { BRAND_COLOR } from \"../data/brand.js\";\nimport { GATED_CONTENT_TYPES, GATED_CONTENT_TYPE_FALLBACK } from \"../data/gated-content-types.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\n\nexport interface GatedContent {\n title: string | null;\n url: string;\n type: string | null;\n}\n\nexport type GatedContentState =\n | { status: \"signed_out\" }\n | { status: \"loading\" }\n | { status: \"not_holder\" }\n | { status: \"unlocked\"; content: GatedContent }\n | { status: \"error\" };\n\nconst typeOf = (content: GatedContent) => (content.type ? GATED_CONTENT_TYPES[content.type] ?? GATED_CONTENT_TYPE_FALLBACK : GATED_CONTENT_TYPE_FALLBACK);\n\nexport function GatedContentHero({\n profile,\n state,\n onViewExclusive,\n}: {\n profile: ApiCollectionProfile | null;\n state: GatedContentState;\n onViewExclusive: () => void;\n}) {\n if (!profile?.hasGatedContent) return null;\n const title = profile.gatedContentTitle ?? \"Exclusive content for holders\";\n\n if (state.status === \"unlocked\") {\n const { icon: Icon } = typeOf(state.content);\n return (\n <button\n onClick={onViewExclusive}\n className=\"w-full flex items-center gap-4 rounded-2xl border border-emerald-500/40 bg-emerald-500/10 hover:bg-emerald-500/15 px-5 py-4 transition-colors text-left\"\n >\n <div className=\"h-11 w-11 rounded-xl bg-emerald-500/20 border border-emerald-500/30 flex items-center justify-center shrink-0 text-emerald-500\">\n <Icon className=\"h-5 w-5\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-2xs font-bold text-emerald-500 leading-none\">✓ You're a holder — unlocked</p>\n <p className=\"text-sm font-bold text-foreground leading-snug mt-1 truncate\">{state.content.title ?? title}</p>\n </div>\n <Unlock className=\"h-4 w-4 text-emerald-500 shrink-0\" />\n </button>\n );\n }\n\n return (\n <div className=\"card-exclusive-wrapper btn-border-animated\">\n <button\n onClick={onViewExclusive}\n className=\"w-full flex items-center gap-4 rounded-[calc(var(--radius)*1.25)] bg-card hover:bg-muted/60 px-5 py-4 transition-colors text-left group\"\n >\n <div className=\"h-11 w-11 rounded-xl bg-muted flex items-center justify-center shrink-0\">\n <Lock className=\"h-5 w-5 text-muted-foreground\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p\n className=\"text-2xs font-bold leading-none mb-1\"\n style={{ background: `linear-gradient(90deg, ${BRAND_COLOR.blue}, ${BRAND_COLOR.purple}, ${BRAND_COLOR.rose})`, WebkitBackgroundClip: \"text\", WebkitTextFillColor: \"transparent\" }}\n >\n Holder exclusive\n </p>\n <p className=\"text-sm font-bold text-foreground leading-snug truncate\">{title}</p>\n <p className=\"text-xs text-muted-foreground mt-0.5\">Own a token from this collection to unlock</p>\n </div>\n <Sparkles className=\"h-4 w-4 text-muted-foreground/50 group-hover:text-primary transition-colors shrink-0\" />\n </button>\n </div>\n );\n}\n\nfunction LockedNotice({ title, body, children }: { title: string; body: string; children?: React.ReactNode }) {\n return (\n <div className=\"py-16 flex flex-col items-center gap-5 text-center max-w-sm mx-auto\">\n <div className=\"h-16 w-16 rounded-2xl bg-muted flex items-center justify-center\">\n <Lock className=\"h-8 w-8 text-muted-foreground/50\" />\n </div>\n <div>\n <p className=\"text-base font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{body}</p>\n </div>\n {children}\n </div>\n );\n}\n\nconst PRIMARY = \"inline-flex items-center gap-2 bg-foreground text-background hover:opacity-90 font-semibold px-5 py-2.5 rounded-xl transition-all text-sm\";\n\nexport function GatedContentPanel({ state, onBrowseListings }: { state: GatedContentState; onBrowseListings: () => void }) {\n const { connectLabel = \"Sign in\", onRequireWallet } = useMedialaneApp();\n\n if (state.status === \"signed_out\") {\n return (\n <LockedNotice title={`${connectLabel} to unlock`} body=\"This collection has exclusive content for holders. Sign in so we can check your holdings.\">\n <button type=\"button\" onClick={onRequireWallet} className={PRIMARY}>{connectLabel}</button>\n </LockedNotice>\n );\n }\n if (state.status === \"loading\") {\n return (\n <div className=\"py-16 flex flex-col items-center gap-3\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground/40\" />\n <p className=\"text-xs text-muted-foreground\">Checking your holdings…</p>\n </div>\n );\n }\n if (state.status === \"not_holder\") {\n return (\n <LockedNotice title=\"Holders only\" body=\"Hold at least one token from this collection to open the exclusive content.\">\n <button type=\"button\" onClick={onBrowseListings} className={PRIMARY}>\n <ShoppingBag className=\"h-4 w-4\" />\n Browse listings\n </button>\n </LockedNotice>\n );\n }\n if (state.status === \"error\") {\n return <LockedNotice title=\"Couldn't check your holdings\" body=\"Refresh the page to try again.\" />;\n }\n\n const { icon: Icon, cta } = typeOf(state.content);\n return (\n <div className=\"py-8 flex flex-col items-center gap-6 text-center max-w-md mx-auto\">\n <div className=\"relative\">\n <div className=\"h-20 w-20 rounded-2xl bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center text-emerald-500\">\n <Unlock className=\"h-10 w-10\" />\n </div>\n <div className=\"absolute -bottom-1 -right-1 h-6 w-6 rounded-full bg-emerald-500 flex items-center justify-center\">\n <Sparkles className=\"h-3 w-3 text-white\" />\n </div>\n </div>\n <div className=\"space-y-1.5\">\n <p className=\"text-2xs font-bold text-emerald-500\">✓ Verified holder</p>\n <h3 className=\"text-xl font-bold\">{state.content.title ?? \"Exclusive content\"}</h3>\n <p className=\"text-sm text-muted-foreground\">Your access is verified. Enjoy your exclusive content.</p>\n </div>\n <a\n href={state.content.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-2.5 bg-emerald-500 hover:bg-emerald-600 active:scale-[0.98] text-white font-semibold px-6 py-3 rounded-xl transition-all text-sm shadow-lg shadow-emerald-500/20\"\n >\n <Icon className=\"h-5 w-5\" />\n {cta}\n </a>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2CU;AAzCV,0BAA6D;AAE7D,mBAA4B;AAC5B,iCAAiE;AACjE,2BAAgC;AAehC,MAAM,SAAS,CAAC,YAA2B,QAAQ,OAAO,+CAAoB,QAAQ,IAAI,KAAK,yDAA8B;AAEtH,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,MAAI,CAAC,SAAS,gBAAiB,QAAO;AACtC,QAAM,QAAQ,QAAQ,qBAAqB;AAE3C,MAAI,MAAM,WAAW,YAAY;AAC/B,UAA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qB,gBAAM,QAAQ,SAAS,qBAAoB;AAAA,MAC9E,4CAAC,OAAE,WAAU,iCAAgC,oEAAsD;AAAA,OACrG;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,MAAM,QAAQ;AAAA,QACpB,QAAO;AAAA,QACP,KAAI;AAAA,QACJ,WAAU;AAAA,QAEV;AAAA,sDAAC,QAAK,WAAU,WAAU;AAAA,UACzB;AAAA;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Loader2, Lock, ShoppingBag, Sparkles, Unlock } from "lucide-react";
|
|
4
|
+
import { BRAND_COLOR } from "../data/brand.js";
|
|
4
5
|
import { GATED_CONTENT_TYPES, GATED_CONTENT_TYPE_FALLBACK } from "../data/gated-content-types.js";
|
|
5
6
|
import { useMedialaneApp } from "./medialane-app.js";
|
|
6
7
|
const typeOf = (content) => content.type ? GATED_CONTENT_TYPES[content.type] ?? GATED_CONTENT_TYPE_FALLBACK : GATED_CONTENT_TYPE_FALLBACK;
|
|
@@ -41,7 +42,7 @@ function GatedContentHero({
|
|
|
41
42
|
"p",
|
|
42
43
|
{
|
|
43
44
|
className: "text-2xs font-bold leading-none mb-1",
|
|
44
|
-
style: { background:
|
|
45
|
+
style: { background: `linear-gradient(90deg, ${BRAND_COLOR.blue}, ${BRAND_COLOR.purple}, ${BRAND_COLOR.rose})`, WebkitBackgroundClip: "text", WebkitTextFillColor: "transparent" },
|
|
45
46
|
children: "Holder exclusive"
|
|
46
47
|
}
|
|
47
48
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/gated-content.tsx"],"sourcesContent":["\"use client\";\n\nimport { Loader2, Lock, ShoppingBag, Sparkles, Unlock } from \"lucide-react\";\nimport type { ApiCollectionProfile } from \"@medialane/sdk\";\nimport { GATED_CONTENT_TYPES, GATED_CONTENT_TYPE_FALLBACK } from \"../data/gated-content-types.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\n\nexport interface GatedContent {\n title: string | null;\n url: string;\n type: string | null;\n}\n\nexport type GatedContentState =\n | { status: \"signed_out\" }\n | { status: \"loading\" }\n | { status: \"not_holder\" }\n | { status: \"unlocked\"; content: GatedContent }\n | { status: \"error\" };\n\nconst typeOf = (content: GatedContent) => (content.type ? GATED_CONTENT_TYPES[content.type] ?? GATED_CONTENT_TYPE_FALLBACK : GATED_CONTENT_TYPE_FALLBACK);\n\nexport function GatedContentHero({\n profile,\n state,\n onViewExclusive,\n}: {\n profile: ApiCollectionProfile | null;\n state: GatedContentState;\n onViewExclusive: () => void;\n}) {\n if (!profile?.hasGatedContent) return null;\n const title = profile.gatedContentTitle ?? \"Exclusive content for holders\";\n\n if (state.status === \"unlocked\") {\n const { icon: Icon } = typeOf(state.content);\n return (\n <button\n onClick={onViewExclusive}\n className=\"w-full flex items-center gap-4 rounded-2xl border border-emerald-500/40 bg-emerald-500/10 hover:bg-emerald-500/15 px-5 py-4 transition-colors text-left\"\n >\n <div className=\"h-11 w-11 rounded-xl bg-emerald-500/20 border border-emerald-500/30 flex items-center justify-center shrink-0 text-emerald-500\">\n <Icon className=\"h-5 w-5\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-2xs font-bold text-emerald-500 leading-none\">✓ You're a holder — unlocked</p>\n <p className=\"text-sm font-bold text-foreground leading-snug mt-1 truncate\">{state.content.title ?? title}</p>\n </div>\n <Unlock className=\"h-4 w-4 text-emerald-500 shrink-0\" />\n </button>\n );\n }\n\n return (\n <div className=\"card-exclusive-wrapper btn-border-animated\">\n <button\n onClick={onViewExclusive}\n className=\"w-full flex items-center gap-4 rounded-[calc(var(--radius)*1.25)] bg-card hover:bg-muted/60 px-5 py-4 transition-colors text-left group\"\n >\n <div className=\"h-11 w-11 rounded-xl bg-muted flex items-center justify-center shrink-0\">\n <Lock className=\"h-5 w-5 text-muted-foreground\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p\n className=\"text-2xs font-bold leading-none mb-1\"\n style={{ background:
|
|
1
|
+
{"version":3,"sources":["../../src/components/gated-content.tsx"],"sourcesContent":["\"use client\";\n\nimport { Loader2, Lock, ShoppingBag, Sparkles, Unlock } from \"lucide-react\";\nimport type { ApiCollectionProfile } from \"@medialane/sdk\";\nimport { BRAND_COLOR } from \"../data/brand.js\";\nimport { GATED_CONTENT_TYPES, GATED_CONTENT_TYPE_FALLBACK } from \"../data/gated-content-types.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\n\nexport interface GatedContent {\n title: string | null;\n url: string;\n type: string | null;\n}\n\nexport type GatedContentState =\n | { status: \"signed_out\" }\n | { status: \"loading\" }\n | { status: \"not_holder\" }\n | { status: \"unlocked\"; content: GatedContent }\n | { status: \"error\" };\n\nconst typeOf = (content: GatedContent) => (content.type ? GATED_CONTENT_TYPES[content.type] ?? GATED_CONTENT_TYPE_FALLBACK : GATED_CONTENT_TYPE_FALLBACK);\n\nexport function GatedContentHero({\n profile,\n state,\n onViewExclusive,\n}: {\n profile: ApiCollectionProfile | null;\n state: GatedContentState;\n onViewExclusive: () => void;\n}) {\n if (!profile?.hasGatedContent) return null;\n const title = profile.gatedContentTitle ?? \"Exclusive content for holders\";\n\n if (state.status === \"unlocked\") {\n const { icon: Icon } = typeOf(state.content);\n return (\n <button\n onClick={onViewExclusive}\n className=\"w-full flex items-center gap-4 rounded-2xl border border-emerald-500/40 bg-emerald-500/10 hover:bg-emerald-500/15 px-5 py-4 transition-colors text-left\"\n >\n <div className=\"h-11 w-11 rounded-xl bg-emerald-500/20 border border-emerald-500/30 flex items-center justify-center shrink-0 text-emerald-500\">\n <Icon className=\"h-5 w-5\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-2xs font-bold text-emerald-500 leading-none\">✓ You're a holder — unlocked</p>\n <p className=\"text-sm font-bold text-foreground leading-snug mt-1 truncate\">{state.content.title ?? title}</p>\n </div>\n <Unlock className=\"h-4 w-4 text-emerald-500 shrink-0\" />\n </button>\n );\n }\n\n return (\n <div className=\"card-exclusive-wrapper btn-border-animated\">\n <button\n onClick={onViewExclusive}\n className=\"w-full flex items-center gap-4 rounded-[calc(var(--radius)*1.25)] bg-card hover:bg-muted/60 px-5 py-4 transition-colors text-left group\"\n >\n <div className=\"h-11 w-11 rounded-xl bg-muted flex items-center justify-center shrink-0\">\n <Lock className=\"h-5 w-5 text-muted-foreground\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p\n className=\"text-2xs font-bold leading-none mb-1\"\n style={{ background: `linear-gradient(90deg, ${BRAND_COLOR.blue}, ${BRAND_COLOR.purple}, ${BRAND_COLOR.rose})`, WebkitBackgroundClip: \"text\", WebkitTextFillColor: \"transparent\" }}\n >\n Holder exclusive\n </p>\n <p className=\"text-sm font-bold text-foreground leading-snug truncate\">{title}</p>\n <p className=\"text-xs text-muted-foreground mt-0.5\">Own a token from this collection to unlock</p>\n </div>\n <Sparkles className=\"h-4 w-4 text-muted-foreground/50 group-hover:text-primary transition-colors shrink-0\" />\n </button>\n </div>\n );\n}\n\nfunction LockedNotice({ title, body, children }: { title: string; body: string; children?: React.ReactNode }) {\n return (\n <div className=\"py-16 flex flex-col items-center gap-5 text-center max-w-sm mx-auto\">\n <div className=\"h-16 w-16 rounded-2xl bg-muted flex items-center justify-center\">\n <Lock className=\"h-8 w-8 text-muted-foreground/50\" />\n </div>\n <div>\n <p className=\"text-base font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{body}</p>\n </div>\n {children}\n </div>\n );\n}\n\nconst PRIMARY = \"inline-flex items-center gap-2 bg-foreground text-background hover:opacity-90 font-semibold px-5 py-2.5 rounded-xl transition-all text-sm\";\n\nexport function GatedContentPanel({ state, onBrowseListings }: { state: GatedContentState; onBrowseListings: () => void }) {\n const { connectLabel = \"Sign in\", onRequireWallet } = useMedialaneApp();\n\n if (state.status === \"signed_out\") {\n return (\n <LockedNotice title={`${connectLabel} to unlock`} body=\"This collection has exclusive content for holders. Sign in so we can check your holdings.\">\n <button type=\"button\" onClick={onRequireWallet} className={PRIMARY}>{connectLabel}</button>\n </LockedNotice>\n );\n }\n if (state.status === \"loading\") {\n return (\n <div className=\"py-16 flex flex-col items-center gap-3\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground/40\" />\n <p className=\"text-xs text-muted-foreground\">Checking your holdings…</p>\n </div>\n );\n }\n if (state.status === \"not_holder\") {\n return (\n <LockedNotice title=\"Holders only\" body=\"Hold at least one token from this collection to open the exclusive content.\">\n <button type=\"button\" onClick={onBrowseListings} className={PRIMARY}>\n <ShoppingBag className=\"h-4 w-4\" />\n Browse listings\n </button>\n </LockedNotice>\n );\n }\n if (state.status === \"error\") {\n return <LockedNotice title=\"Couldn't check your holdings\" body=\"Refresh the page to try again.\" />;\n }\n\n const { icon: Icon, cta } = typeOf(state.content);\n return (\n <div className=\"py-8 flex flex-col items-center gap-6 text-center max-w-md mx-auto\">\n <div className=\"relative\">\n <div className=\"h-20 w-20 rounded-2xl bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center text-emerald-500\">\n <Unlock className=\"h-10 w-10\" />\n </div>\n <div className=\"absolute -bottom-1 -right-1 h-6 w-6 rounded-full bg-emerald-500 flex items-center justify-center\">\n <Sparkles className=\"h-3 w-3 text-white\" />\n </div>\n </div>\n <div className=\"space-y-1.5\">\n <p className=\"text-2xs font-bold text-emerald-500\">✓ Verified holder</p>\n <h3 className=\"text-xl font-bold\">{state.content.title ?? \"Exclusive content\"}</h3>\n <p className=\"text-sm text-muted-foreground\">Your access is verified. Enjoy your exclusive content.</p>\n </div>\n <a\n href={state.content.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-2.5 bg-emerald-500 hover:bg-emerald-600 active:scale-[0.98] text-white font-semibold px-6 py-3 rounded-xl transition-all text-sm shadow-lg shadow-emerald-500/20\"\n >\n <Icon className=\"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C,gBAAa,OAAM,gCAA+B,MAAK,kCAAiC;AAAA,EAClG;AAEA,QAAM,EAAE,MAAM,MAAM,IAAI,IAAI,OAAO,MAAM,OAAO;AAChD,SACE,qBAAC,SAAI,WAAU,sEACb;AAAA,yBAAC,SAAI,WAAU,YACb;AAAA,0BAAC,SAAI,WAAU,0HACb,8BAAC,UAAO,WAAU,aAAY,GAChC;AAAA,MACA,oBAAC,SAAI,WAAU,oGACb,8BAAC,YAAS,WAAU,sBAAqB,GAC3C;AAAA,OACF;AAAA,IACA,qBAAC,SAAI,WAAU,eACb;AAAA,0BAAC,OAAE,WAAU,uCAAsC,oCAAiB;AAAA,MACpE,oBAAC,QAAG,WAAU,qBAAqB,gBAAM,QAAQ,SAAS,qBAAoB;AAAA,MAC9E,oBAAC,OAAE,WAAU,iCAAgC,oEAAsD;AAAA,OACrG;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,MAAM,QAAQ;AAAA,QACpB,QAAO;AAAA,QACP,KAAI;AAAA,QACJ,WAAU;AAAA,QAEV;AAAA,8BAAC,QAAK,WAAU,WAAU;AAAA,UACzB;AAAA;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -19,26 +19,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
20
|
var action_button_exports = {};
|
|
21
21
|
__export(action_button_exports, {
|
|
22
|
-
ACTION_FOREGROUNDS: () => ACTION_FOREGROUNDS,
|
|
23
|
-
ACTION_GRADIENTS: () => ACTION_GRADIENTS,
|
|
24
22
|
TrustNote: () => TrustNote
|
|
25
23
|
});
|
|
26
24
|
module.exports = __toCommonJS(action_button_exports);
|
|
27
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
-
const ACTION_GRADIENTS = {
|
|
29
|
-
buy: ["#3b7bff", "#8a5cf6", "#3b7bff"],
|
|
30
|
-
submit: ["#d6359a", "#5b4ce6", "#d6359a"],
|
|
31
|
-
offer: ["#f6608f", "#fb8b46", "#f6608f"],
|
|
32
|
-
remix: ["#8a5cf6", "#f6608f", "#8a5cf6"],
|
|
33
|
-
license: ["#3b7bff", "#5b4ce6", "#3b7bff"]
|
|
34
|
-
};
|
|
35
|
-
const ACTION_FOREGROUNDS = {
|
|
36
|
-
buy: "#3b7bff",
|
|
37
|
-
submit: "#5b4ce6",
|
|
38
|
-
offer: "#fb7a32",
|
|
39
|
-
remix: "#8a3ff0",
|
|
40
|
-
license: "#3b7bff"
|
|
41
|
-
};
|
|
42
26
|
function TrustNote({ children, center }) {
|
|
43
27
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `flex items-center gap-1.5 text-2xs leading-relaxed text-muted-foreground ${center ? "justify-center" : ""}`, children: [
|
|
44
28
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 2l7 4v6c0 5-3.5 8-7 10-3.5-2-7-5-7-10V6z" }) }),
|
|
@@ -47,8 +31,6 @@ function TrustNote({ children, center }) {
|
|
|
47
31
|
}
|
|
48
32
|
// Annotate the CommonJS export names for ESM import in node:
|
|
49
33
|
0 && (module.exports = {
|
|
50
|
-
ACTION_FOREGROUNDS,
|
|
51
|
-
ACTION_GRADIENTS,
|
|
52
34
|
TrustNote
|
|
53
35
|
});
|
|
54
36
|
//# sourceMappingURL=action-button.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/media-wallet/action-button.tsx"],"sourcesContent":["\"use client\";\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../../src/components/media-wallet/action-button.tsx"],"sourcesContent":["\"use client\";\n\nexport function TrustNote({ children, center }: { children: React.ReactNode; center?: boolean }) {\n return (\n <div className={`flex items-center gap-1.5 text-2xs leading-relaxed text-muted-foreground ${center ? \"justify-center\" : \"\"}`}>\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" className=\"flex-shrink-0\">\n <path d=\"M12 2l7 4v6c0 5-3.5 8-7 10-3.5-2-7-5-7-10V6z\" />\n </svg>\n <span>{children}</span>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAII;AAFG,SAAS,UAAU,EAAE,UAAU,OAAO,GAAoD;AAC/F,SACE,6CAAC,SAAI,WAAW,4EAA4E,SAAS,mBAAmB,EAAE,IACxH;AAAA,gDAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,QAAO,gBAAe,aAAY,KAAI,WAAU,iBAC1G,sDAAC,UAAK,GAAE,gDAA+C,GACzD;AAAA,IACA,4CAAC,UAAM,UAAS;AAAA,KAClB;AAEJ;","names":[]}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
declare const ACTION_GRADIENTS: Record<string, [string, string, string]>;
|
|
4
|
-
declare const ACTION_FOREGROUNDS: Record<string, string>;
|
|
5
3
|
declare function TrustNote({ children, center }: {
|
|
6
4
|
children: React.ReactNode;
|
|
7
5
|
center?: boolean;
|
|
8
6
|
}): react_jsx_runtime.JSX.Element;
|
|
9
7
|
|
|
10
|
-
export {
|
|
8
|
+
export { TrustNote };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
declare const ACTION_GRADIENTS: Record<string, [string, string, string]>;
|
|
4
|
-
declare const ACTION_FOREGROUNDS: Record<string, string>;
|
|
5
3
|
declare function TrustNote({ children, center }: {
|
|
6
4
|
children: React.ReactNode;
|
|
7
5
|
center?: boolean;
|
|
8
6
|
}): react_jsx_runtime.JSX.Element;
|
|
9
7
|
|
|
10
|
-
export {
|
|
8
|
+
export { TrustNote };
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
const ACTION_GRADIENTS = {
|
|
4
|
-
buy: ["#3b7bff", "#8a5cf6", "#3b7bff"],
|
|
5
|
-
submit: ["#d6359a", "#5b4ce6", "#d6359a"],
|
|
6
|
-
offer: ["#f6608f", "#fb8b46", "#f6608f"],
|
|
7
|
-
remix: ["#8a5cf6", "#f6608f", "#8a5cf6"],
|
|
8
|
-
license: ["#3b7bff", "#5b4ce6", "#3b7bff"]
|
|
9
|
-
};
|
|
10
|
-
const ACTION_FOREGROUNDS = {
|
|
11
|
-
buy: "#3b7bff",
|
|
12
|
-
submit: "#5b4ce6",
|
|
13
|
-
offer: "#fb7a32",
|
|
14
|
-
remix: "#8a3ff0",
|
|
15
|
-
license: "#3b7bff"
|
|
16
|
-
};
|
|
17
3
|
function TrustNote({ children, center }) {
|
|
18
4
|
return /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-1.5 text-2xs leading-relaxed text-muted-foreground ${center ? "justify-center" : ""}`, children: [
|
|
19
5
|
/* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "flex-shrink-0", children: /* @__PURE__ */ jsx("path", { d: "M12 2l7 4v6c0 5-3.5 8-7 10-3.5-2-7-5-7-10V6z" }) }),
|
|
@@ -21,8 +7,6 @@ function TrustNote({ children, center }) {
|
|
|
21
7
|
] });
|
|
22
8
|
}
|
|
23
9
|
export {
|
|
24
|
-
ACTION_FOREGROUNDS,
|
|
25
|
-
ACTION_GRADIENTS,
|
|
26
10
|
TrustNote
|
|
27
11
|
};
|
|
28
12
|
//# sourceMappingURL=action-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/media-wallet/action-button.tsx"],"sourcesContent":["\"use client\";\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../../src/components/media-wallet/action-button.tsx"],"sourcesContent":["\"use client\";\n\nexport function TrustNote({ children, center }: { children: React.ReactNode; center?: boolean }) {\n return (\n <div className={`flex items-center gap-1.5 text-2xs leading-relaxed text-muted-foreground ${center ? \"justify-center\" : \"\"}`}>\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" className=\"flex-shrink-0\">\n <path d=\"M12 2l7 4v6c0 5-3.5 8-7 10-3.5-2-7-5-7-10V6z\" />\n </svg>\n <span>{children}</span>\n </div>\n );\n}\n"],"mappings":";AAII,SAEI,KAFJ;AAFG,SAAS,UAAU,EAAE,UAAU,OAAO,GAAoD;AAC/F,SACE,qBAAC,SAAI,WAAW,4EAA4E,SAAS,mBAAmB,EAAE,IACxH;AAAA,wBAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,QAAO,gBAAe,aAAY,KAAI,WAAU,iBAC1G,8BAAC,UAAK,GAAE,gDAA+C,GACzD;AAAA,IACA,oBAAC,UAAM,UAAS;AAAA,KAClB;AAEJ;","names":[]}
|