@medialane/ui 0.366.0 → 0.367.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/approve-mint-dialog.d.cts +0 -1
- package/dist/components/approve-mint-dialog.d.ts +0 -1
- package/dist/components/button.d.cts +2 -2
- package/dist/components/button.d.ts +2 -2
- package/dist/components/fast-mint/asset-form-parts.cjs +25 -51
- package/dist/components/fast-mint/asset-form-parts.cjs.map +1 -1
- package/dist/components/fast-mint/asset-form-parts.d.cts +11 -14
- package/dist/components/fast-mint/asset-form-parts.d.ts +11 -14
- package/dist/components/fast-mint/asset-form-parts.js +27 -52
- package/dist/components/fast-mint/asset-form-parts.js.map +1 -1
- package/dist/components/fast-mint/collection-section.cjs +11 -21
- package/dist/components/fast-mint/collection-section.cjs.map +1 -1
- package/dist/components/fast-mint/collection-section.d.cts +5 -7
- package/dist/components/fast-mint/collection-section.d.ts +5 -7
- package/dist/components/fast-mint/collection-section.js +11 -21
- package/dist/components/fast-mint/collection-section.js.map +1 -1
- package/dist/components/fast-mint/create-then-add.cjs +55 -0
- package/dist/components/fast-mint/create-then-add.cjs.map +1 -0
- package/dist/components/fast-mint/create-then-add.d.cts +24 -0
- package/dist/components/fast-mint/create-then-add.d.ts +24 -0
- package/dist/components/fast-mint/create-then-add.js +30 -0
- package/dist/components/fast-mint/create-then-add.js.map +1 -0
- package/dist/components/fast-mint/dropzone.d.cts +0 -1
- package/dist/components/fast-mint/dropzone.d.ts +0 -1
- package/dist/components/fast-mint/fast-mint.cjs +95 -167
- package/dist/components/fast-mint/fast-mint.cjs.map +1 -1
- package/dist/components/fast-mint/fast-mint.js +97 -169
- package/dist/components/fast-mint/fast-mint.js.map +1 -1
- package/dist/components/fast-mint/formats/nft.cjs +233 -0
- package/dist/components/fast-mint/formats/nft.cjs.map +1 -0
- package/dist/components/fast-mint/formats/nft.d.cts +19 -0
- package/dist/components/fast-mint/formats/nft.d.ts +19 -0
- package/dist/components/fast-mint/formats/nft.js +214 -0
- package/dist/components/fast-mint/formats/nft.js.map +1 -0
- package/dist/components/fast-mint/formats/pop.cjs +160 -0
- package/dist/components/fast-mint/formats/pop.cjs.map +1 -0
- package/dist/components/fast-mint/formats/pop.d.cts +18 -0
- package/dist/components/fast-mint/formats/pop.d.ts +18 -0
- package/dist/components/fast-mint/formats/pop.js +136 -0
- package/dist/components/fast-mint/formats/pop.js.map +1 -0
- package/dist/components/fast-mint/formats/registry.cjs +42 -0
- package/dist/components/fast-mint/formats/registry.cjs.map +1 -0
- package/dist/components/fast-mint/formats/registry.d.cts +20 -0
- package/dist/components/fast-mint/formats/registry.d.ts +20 -0
- package/dist/components/fast-mint/formats/registry.js +16 -0
- package/dist/components/fast-mint/formats/registry.js.map +1 -0
- package/dist/components/fast-mint/formats/tiers.cjs +206 -0
- package/dist/components/fast-mint/formats/tiers.cjs.map +1 -0
- package/dist/components/fast-mint/formats/tiers.d.cts +19 -0
- package/dist/components/fast-mint/formats/tiers.d.ts +19 -0
- package/dist/components/fast-mint/formats/tiers.js +181 -0
- package/dist/components/fast-mint/formats/tiers.js.map +1 -0
- package/dist/components/fast-mint/formats/types.cjs +31 -0
- package/dist/components/fast-mint/formats/types.cjs.map +1 -0
- package/dist/components/fast-mint/formats/types.d.cts +71 -0
- package/dist/components/fast-mint/formats/types.d.ts +71 -0
- package/dist/components/fast-mint/formats/types.js +7 -0
- package/dist/components/fast-mint/formats/types.js.map +1 -0
- package/dist/components/fast-mint/media-kind.d.cts +0 -1
- package/dist/components/fast-mint/media-kind.d.ts +0 -1
- package/dist/components/fast-mint/success-view.cjs +18 -59
- package/dist/components/fast-mint/success-view.cjs.map +1 -1
- package/dist/components/fast-mint/success-view.d.cts +13 -8
- package/dist/components/fast-mint/success-view.d.ts +13 -8
- package/dist/components/fast-mint/success-view.js +19 -60
- package/dist/components/fast-mint/success-view.js.map +1 -1
- package/dist/components/fast-mint/types.cjs.map +1 -1
- package/dist/components/fast-mint/types.d.cts +0 -3
- package/dist/components/fast-mint/types.d.ts +0 -3
- package/dist/components/launchpad/collection-create-form.cjs +6 -14
- package/dist/components/launchpad/collection-create-form.cjs.map +1 -1
- package/dist/components/launchpad/collection-create-form.js +6 -14
- package/dist/components/launchpad/collection-create-form.js.map +1 -1
- package/dist/components/launchpad/edition-mint-schema.d.cts +4 -4
- package/dist/components/launchpad/edition-mint-schema.d.ts +4 -4
- package/dist/components/launchpad/pop-create-fields.cjs +5 -3
- package/dist/components/launchpad/pop-create-fields.cjs.map +1 -1
- package/dist/components/launchpad/pop-create-fields.d.cts +8 -2
- package/dist/components/launchpad/pop-create-fields.d.ts +8 -2
- package/dist/components/launchpad/pop-create-fields.js +4 -3
- package/dist/components/launchpad/pop-create-fields.js.map +1 -1
- package/dist/components/launchpad/pop-create.cjs +9 -22
- package/dist/components/launchpad/pop-create.cjs.map +1 -1
- package/dist/components/launchpad/pop-create.js +9 -22
- package/dist/components/launchpad/pop-create.js.map +1 -1
- package/dist/components/launchpad/tier-mint-form.cjs +8 -25
- package/dist/components/launchpad/tier-mint-form.cjs.map +1 -1
- package/dist/components/launchpad/tier-mint-form.js +6 -23
- package/dist/components/launchpad/tier-mint-form.js.map +1 -1
- package/dist/components/transfer-dialog.d.cts +0 -1
- package/dist/components/transfer-dialog.d.ts +0 -1
- package/dist/data/launchpad-services.cjs +12 -12
- package/dist/data/launchpad-services.cjs.map +1 -1
- package/dist/data/launchpad-services.js +12 -12
- package/dist/data/launchpad-services.js.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/utils/drop/actions.d.cts +0 -1
- package/dist/utils/drop/actions.d.ts +0 -1
- package/dist/utils/drop/types.d.cts +0 -1
- package/dist/utils/drop/types.d.ts +0 -1
- package/dist/utils/launchpad-actions.cjs +90 -0
- package/dist/utils/launchpad-actions.cjs.map +1 -0
- package/dist/utils/launchpad-actions.d.cts +39 -0
- package/dist/utils/launchpad-actions.d.ts +39 -0
- package/dist/utils/launchpad-actions.js +60 -0
- package/dist/utils/launchpad-actions.js.map +1 -0
- package/dist/utils/media-wallet/use-erc20-balance.d.cts +1 -1
- package/dist/utils/media-wallet/use-erc20-balance.d.ts +1 -1
- package/dist/utils/use-transaction.d.cts +0 -1
- package/dist/utils/use-transaction.d.ts +0 -1
- package/package.json +1 -1
- package/dist/components/fast-mint/mint-asset.cjs +0 -124
- package/dist/components/fast-mint/mint-asset.cjs.map +0 -1
- package/dist/components/fast-mint/mint-asset.d.cts +0 -41
- package/dist/components/fast-mint/mint-asset.d.ts +0 -41
- package/dist/components/fast-mint/mint-asset.js +0 -100
- package/dist/components/fast-mint/mint-asset.js.map +0 -1
- package/dist/utils/launchpad-handoff.cjs +0 -62
- package/dist/utils/launchpad-handoff.cjs.map +0 -1
- package/dist/utils/launchpad-handoff.d.cts +0 -11
- package/dist/utils/launchpad-handoff.d.ts +0 -11
- package/dist/utils/launchpad-handoff.js +0 -35
- package/dist/utils/launchpad-handoff.js.map +0 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ComponentType, MutableRefObject } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
4
|
+
import { ApiCollection } from '@medialane/sdk';
|
|
5
|
+
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
6
|
+
import { IPType } from '../../../data/ip.js';
|
|
7
|
+
import { MetadataField } from '../../ip-type-fields.js';
|
|
8
|
+
import { FormValues } from '../form.js';
|
|
9
|
+
import { MintedAsset, MediaKind, FastMintSigner } from '../types.js';
|
|
10
|
+
import { useNewCollectionDraft } from '../use-new-collection-draft.js';
|
|
11
|
+
import { StepInfo } from '../create-then-add.js';
|
|
12
|
+
import 'react/jsx-runtime';
|
|
13
|
+
import 'starknet';
|
|
14
|
+
|
|
15
|
+
type MintFormat = "single" | "editions" | "pop" | "tickets" | "club";
|
|
16
|
+
interface FormatShared {
|
|
17
|
+
form: UseFormReturn<FormValues>;
|
|
18
|
+
draft: ReturnType<typeof useNewCollectionDraft>;
|
|
19
|
+
collections: ApiCollection[];
|
|
20
|
+
walletAddress: string;
|
|
21
|
+
mediaKind: MediaKind;
|
|
22
|
+
mediaUri: string;
|
|
23
|
+
mediaName: string;
|
|
24
|
+
image: string;
|
|
25
|
+
previewImage: string | null;
|
|
26
|
+
ipType: IPType;
|
|
27
|
+
onIpTypeChange: (type: IPType) => void;
|
|
28
|
+
templateFieldsRef: MutableRefObject<MetadataField[]>;
|
|
29
|
+
uploadDocument: (file: File) => Promise<string>;
|
|
30
|
+
}
|
|
31
|
+
interface FormatRuntime {
|
|
32
|
+
client: MedialaneClient;
|
|
33
|
+
signer: FastMintSigner;
|
|
34
|
+
getUploadToken: () => Promise<string | null>;
|
|
35
|
+
resume: unknown;
|
|
36
|
+
onStep: (step: StepInfo) => void;
|
|
37
|
+
}
|
|
38
|
+
interface FormatLink {
|
|
39
|
+
href: string;
|
|
40
|
+
label: string;
|
|
41
|
+
icon: LucideIcon;
|
|
42
|
+
}
|
|
43
|
+
interface FormatResult {
|
|
44
|
+
headline: string;
|
|
45
|
+
detail: string;
|
|
46
|
+
name: string;
|
|
47
|
+
collectionLabel?: string;
|
|
48
|
+
links: FormatLink[];
|
|
49
|
+
reward: string;
|
|
50
|
+
asset?: MintedAsset;
|
|
51
|
+
}
|
|
52
|
+
interface FormatFieldsProps<S> {
|
|
53
|
+
shared: FormatShared;
|
|
54
|
+
state: S;
|
|
55
|
+
update: (patch: Partial<S>) => void;
|
|
56
|
+
}
|
|
57
|
+
interface FormatDefinition<S = unknown> {
|
|
58
|
+
key: MintFormat;
|
|
59
|
+
title: string;
|
|
60
|
+
hint: string;
|
|
61
|
+
icon: LucideIcon;
|
|
62
|
+
submitLabel: (state: S) => string;
|
|
63
|
+
initial: () => S;
|
|
64
|
+
Fields: ComponentType<FormatFieldsProps<S>>;
|
|
65
|
+
isReady: (shared: FormatShared, state: S) => boolean;
|
|
66
|
+
previewLabel: (shared: FormatShared, state: S) => string | undefined;
|
|
67
|
+
submit: (shared: FormatShared, state: S, runtime: FormatRuntime) => Promise<FormatResult>;
|
|
68
|
+
}
|
|
69
|
+
declare function defineFormat<S>(format: FormatDefinition<S>): FormatDefinition;
|
|
70
|
+
|
|
71
|
+
export { type FormatDefinition, type FormatFieldsProps, type FormatLink, type FormatResult, type FormatRuntime, type FormatShared, type MintFormat, defineFormat };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/fast-mint/formats/types.ts"],"sourcesContent":["import type { ComponentType, MutableRefObject } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport type { UseFormReturn } from \"react-hook-form\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { IPType } from \"../../../data/ip.js\";\nimport type { MetadataField } from \"../../ip-type-fields.js\";\nimport type { FormValues } from \"../form.js\";\nimport type { FastMintSigner, MediaKind, MintedAsset } from \"../types.js\";\nimport type { useNewCollectionDraft } from \"../use-new-collection-draft.js\";\nimport type { StepInfo } from \"../create-then-add.js\";\n\nexport type MintFormat = \"single\" | \"editions\" | \"pop\" | \"tickets\" | \"club\";\n\nexport interface FormatShared {\n form: UseFormReturn<FormValues>;\n draft: ReturnType<typeof useNewCollectionDraft>;\n collections: ApiCollection[];\n walletAddress: string;\n mediaKind: MediaKind;\n mediaUri: string;\n mediaName: string;\n image: string;\n previewImage: string | null;\n ipType: IPType;\n onIpTypeChange: (type: IPType) => void;\n templateFieldsRef: MutableRefObject<MetadataField[]>;\n uploadDocument: (file: File) => Promise<string>;\n}\n\nexport interface FormatRuntime {\n client: MedialaneClient;\n signer: FastMintSigner;\n getUploadToken: () => Promise<string | null>;\n resume: unknown;\n onStep: (step: StepInfo) => void;\n}\n\nexport interface FormatLink {\n href: string;\n label: string;\n icon: LucideIcon;\n}\n\nexport interface FormatResult {\n headline: string;\n detail: string;\n name: string;\n collectionLabel?: string;\n links: FormatLink[];\n reward: string;\n asset?: MintedAsset;\n}\n\nexport interface FormatFieldsProps<S> {\n shared: FormatShared;\n state: S;\n update: (patch: Partial<S>) => void;\n}\n\nexport interface FormatDefinition<S = unknown> {\n key: MintFormat;\n title: string;\n hint: string;\n icon: LucideIcon;\n submitLabel: (state: S) => string;\n initial: () => S;\n Fields: ComponentType<FormatFieldsProps<S>>;\n isReady: (shared: FormatShared, state: S) => boolean;\n previewLabel: (shared: FormatShared, state: S) => string | undefined;\n submit: (shared: FormatShared, state: S, runtime: FormatRuntime) => Promise<FormatResult>;\n}\n\nexport function defineFormat<S>(format: FormatDefinition<S>): FormatDefinition {\n return format as unknown as FormatDefinition;\n}\n"],"mappings":"AAyEO,SAAS,aAAgB,QAA+C;AAC7E,SAAO;AACT;","names":[]}
|
|
@@ -38,72 +38,31 @@ var import_lucide_react = require("lucide-react");
|
|
|
38
38
|
var import_cn = require("../../utils/cn.js");
|
|
39
39
|
var import_button = require("../button.js");
|
|
40
40
|
var import_medialane_collection_card = require("../medialane-collection-card.js");
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
previewImage,
|
|
44
|
-
name,
|
|
45
|
-
collectionLabel,
|
|
46
|
-
mintedAsset,
|
|
47
|
-
footer,
|
|
48
|
-
onPublishAnother
|
|
49
|
-
}) {
|
|
41
|
+
var import_reward_earned = require("../rewards/reward-earned.js");
|
|
42
|
+
function SuccessView({ presentation = "inline", previewImage, result, onPublishAnother }) {
|
|
50
43
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { className: (0, import_cn.cn)(presentation === "dialog" ? "" : "rounded-2xl border border-border p-6 sm:p-8"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-[220px_1fr] gap-6 items-start", children: [
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_medialane_collection_card.MedialaneCollectionCard, { image: previewImage, name, collection: collectionLabel }),
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_medialane_collection_card.MedialaneCollectionCard, { image: previewImage, name: result.name, collection: result.collectionLabel }),
|
|
52
45
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-5", children: [
|
|
53
46
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
|
|
54
47
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 text-green-500", children: [
|
|
55
48
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle2, { className: "h-5 w-5" }),
|
|
56
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold", children:
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold", children: result.headline })
|
|
57
50
|
] }),
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children:
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: result.detail })
|
|
59
52
|
] }),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
import_link.default,
|
|
74
|
-
{
|
|
75
|
-
href: `/asset/STARKNET/${mintedAsset.contract}/${mintedAsset.tokenId}?action=list`,
|
|
76
|
-
className: "flex items-center gap-2 rounded-xl border border-border px-4 py-3 text-sm font-semibold hover:bg-muted/40 transition-colors",
|
|
77
|
-
children: [
|
|
78
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4 text-muted-foreground" }),
|
|
79
|
-
"Sell on marketplace"
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
84
|
-
import_link.default,
|
|
85
|
-
{
|
|
86
|
-
href: `/asset/STARKNET/${mintedAsset.contract}/${mintedAsset.tokenId}?action=transfer`,
|
|
87
|
-
className: "flex items-center gap-2 rounded-xl border border-border px-4 py-3 text-sm font-semibold hover:bg-muted/40 transition-colors",
|
|
88
|
-
children: [
|
|
89
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-4 w-4 text-muted-foreground" }),
|
|
90
|
-
"Transfer"
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
),
|
|
94
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
95
|
-
import_link.default,
|
|
96
|
-
{
|
|
97
|
-
href: `/create/remix/${mintedAsset.contract}/${mintedAsset.tokenId}`,
|
|
98
|
-
className: "flex items-center gap-2 rounded-xl border border-border px-4 py-3 text-sm font-semibold hover:bg-muted/40 transition-colors",
|
|
99
|
-
children: [
|
|
100
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4 text-muted-foreground" }),
|
|
101
|
-
"Create a remix"
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
] }),
|
|
106
|
-
footer,
|
|
53
|
+
result.links.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-2 gap-2.5", children: result.links.map(({ href, label, icon: Icon }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
54
|
+
import_link.default,
|
|
55
|
+
{
|
|
56
|
+
href,
|
|
57
|
+
className: "flex items-center gap-2 rounded-xl border border-border px-4 py-3 text-sm font-semibold hover:bg-muted/40 transition-colors",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-4 w-4 text-muted-foreground" }),
|
|
60
|
+
label
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
href
|
|
64
|
+
)) }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_reward_earned.RewardEarned, { actionType: result.reward }),
|
|
107
66
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "outline", onClick: onPublishAnother, className: "w-full sm:w-auto", children: "Publish another" })
|
|
108
67
|
] })
|
|
109
68
|
] }) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/fast-mint/success-view.tsx"],"sourcesContent":["\"use client\";\n\nimport
|
|
1
|
+
{"version":3,"sources":["../../../src/components/fast-mint/success-view.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"../link.js\";\nimport { CheckCircle2 } from \"lucide-react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { Button } from \"../button.js\";\nimport { MedialaneCollectionCard } from \"../medialane-collection-card.js\";\nimport { RewardEarned } from \"../rewards/reward-earned.js\";\nimport type { FormatResult } from \"./formats/types.js\";\n\nexport interface SuccessViewProps {\n presentation?: \"inline\" | \"dialog\";\n previewImage: string | null;\n result: FormatResult;\n onPublishAnother: () => void;\n}\n\nexport function SuccessView({ presentation = \"inline\", previewImage, result, onPublishAnother }: SuccessViewProps) {\n return (\n <section className={cn(presentation === \"dialog\" ? \"\" : \"rounded-2xl border border-border p-6 sm:p-8\")}>\n <div className=\"grid grid-cols-1 sm:grid-cols-[220px_1fr] gap-6 items-start\">\n <MedialaneCollectionCard image={previewImage} name={result.name} collection={result.collectionLabel} />\n <div className=\"space-y-5\">\n <div className=\"space-y-1.5\">\n <div className=\"flex items-center gap-2 text-green-500\">\n <CheckCircle2 className=\"h-5 w-5\" />\n <p className=\"text-sm font-semibold\">{result.headline}</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">{result.detail}</p>\n </div>\n\n {result.links.length > 0 && (\n <div className=\"grid grid-cols-2 gap-2.5\">\n {result.links.map(({ href, label, icon: Icon }) => (\n <Link\n key={href}\n href={href}\n className=\"flex items-center gap-2 rounded-xl border border-border px-4 py-3 text-sm font-semibold hover:bg-muted/40 transition-colors\"\n >\n <Icon className=\"h-4 w-4 text-muted-foreground\" />\n {label}\n </Link>\n ))}\n </div>\n )}\n\n <RewardEarned actionType={result.reward} />\n\n <Button variant=\"outline\" onClick={onPublishAnother} className=\"w-full sm:w-auto\">\n Publish another\n </Button>\n </div>\n </div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBQ;AAnBR,kBAAiB;AACjB,0BAA6B;AAC7B,gBAAmB;AACnB,oBAAuB;AACvB,uCAAwC;AACxC,2BAA6B;AAUtB,SAAS,YAAY,EAAE,eAAe,UAAU,cAAc,QAAQ,iBAAiB,GAAqB;AACjH,SACE,4CAAC,aAAQ,eAAW,cAAG,iBAAiB,WAAW,KAAK,6CAA6C,GACnG,uDAAC,SAAI,WAAU,+DACb;AAAA,gDAAC,4DAAwB,OAAO,cAAc,MAAM,OAAO,MAAM,YAAY,OAAO,iBAAiB;AAAA,IACrG,6CAAC,SAAI,WAAU,aACb;AAAA,mDAAC,SAAI,WAAU,eACb;AAAA,qDAAC,SAAI,WAAU,0CACb;AAAA,sDAAC,oCAAa,WAAU,WAAU;AAAA,UAClC,4CAAC,OAAE,WAAU,yBAAyB,iBAAO,UAAS;AAAA,WACxD;AAAA,QACA,4CAAC,OAAE,WAAU,iCAAiC,iBAAO,QAAO;AAAA,SAC9D;AAAA,MAEC,OAAO,MAAM,SAAS,KACrB,4CAAC,SAAI,WAAU,4BACZ,iBAAO,MAAM,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,KAAK,MAC3C;AAAA,QAAC,YAAAA;AAAA,QAAA;AAAA,UAEC;AAAA,UACA,WAAU;AAAA,UAEV;AAAA,wDAAC,QAAK,WAAU,iCAAgC;AAAA,YAC/C;AAAA;AAAA;AAAA,QALI;AAAA,MAMP,CACD,GACH;AAAA,MAGF,4CAAC,qCAAa,YAAY,OAAO,QAAQ;AAAA,MAEzC,4CAAC,wBAAO,SAAQ,WAAU,SAAS,kBAAkB,WAAU,oBAAmB,6BAElF;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":["Link"]}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import '
|
|
2
|
+
import { FormatResult } from './formats/types.cjs';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'lucide-react';
|
|
5
|
+
import 'react-hook-form';
|
|
5
6
|
import '@medialane/sdk';
|
|
6
7
|
import '@medialane/sdk/starknet';
|
|
8
|
+
import '../../data/ip.cjs';
|
|
9
|
+
import '../ip-type-fields.cjs';
|
|
10
|
+
import './form.cjs';
|
|
11
|
+
import './types.cjs';
|
|
12
|
+
import 'starknet';
|
|
13
|
+
import './use-new-collection-draft.cjs';
|
|
14
|
+
import './create-then-add.cjs';
|
|
7
15
|
|
|
8
16
|
interface SuccessViewProps {
|
|
9
17
|
presentation?: "inline" | "dialog";
|
|
10
18
|
previewImage: string | null;
|
|
11
|
-
|
|
12
|
-
collectionLabel?: string;
|
|
13
|
-
mintedAsset: MintedAsset | null;
|
|
19
|
+
result: FormatResult;
|
|
14
20
|
onPublishAnother: () => void;
|
|
15
|
-
footer?: ReactNode;
|
|
16
21
|
}
|
|
17
|
-
declare function SuccessView({ presentation, previewImage,
|
|
22
|
+
declare function SuccessView({ presentation, previewImage, result, onPublishAnother }: SuccessViewProps): react_jsx_runtime.JSX.Element;
|
|
18
23
|
|
|
19
24
|
export { SuccessView, type SuccessViewProps };
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import '
|
|
2
|
+
import { FormatResult } from './formats/types.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'lucide-react';
|
|
5
|
+
import 'react-hook-form';
|
|
5
6
|
import '@medialane/sdk';
|
|
6
7
|
import '@medialane/sdk/starknet';
|
|
8
|
+
import '../../data/ip.js';
|
|
9
|
+
import '../ip-type-fields.js';
|
|
10
|
+
import './form.js';
|
|
11
|
+
import './types.js';
|
|
12
|
+
import 'starknet';
|
|
13
|
+
import './use-new-collection-draft.js';
|
|
14
|
+
import './create-then-add.js';
|
|
7
15
|
|
|
8
16
|
interface SuccessViewProps {
|
|
9
17
|
presentation?: "inline" | "dialog";
|
|
10
18
|
previewImage: string | null;
|
|
11
|
-
|
|
12
|
-
collectionLabel?: string;
|
|
13
|
-
mintedAsset: MintedAsset | null;
|
|
19
|
+
result: FormatResult;
|
|
14
20
|
onPublishAnother: () => void;
|
|
15
|
-
footer?: ReactNode;
|
|
16
21
|
}
|
|
17
|
-
declare function SuccessView({ presentation, previewImage,
|
|
22
|
+
declare function SuccessView({ presentation, previewImage, result, onPublishAnother }: SuccessViewProps): react_jsx_runtime.JSX.Element;
|
|
18
23
|
|
|
19
24
|
export { SuccessView, type SuccessViewProps };
|
|
@@ -1,76 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import Link from "../link.js";
|
|
4
|
-
import { CheckCircle2
|
|
4
|
+
import { CheckCircle2 } from "lucide-react";
|
|
5
5
|
import { cn } from "../../utils/cn.js";
|
|
6
6
|
import { Button } from "../button.js";
|
|
7
7
|
import { MedialaneCollectionCard } from "../medialane-collection-card.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
previewImage,
|
|
11
|
-
name,
|
|
12
|
-
collectionLabel,
|
|
13
|
-
mintedAsset,
|
|
14
|
-
footer,
|
|
15
|
-
onPublishAnother
|
|
16
|
-
}) {
|
|
8
|
+
import { RewardEarned } from "../rewards/reward-earned.js";
|
|
9
|
+
function SuccessView({ presentation = "inline", previewImage, result, onPublishAnother }) {
|
|
17
10
|
return /* @__PURE__ */ jsx("section", { className: cn(presentation === "dialog" ? "" : "rounded-2xl border border-border p-6 sm:p-8"), children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-[220px_1fr] gap-6 items-start", children: [
|
|
18
|
-
/* @__PURE__ */ jsx(MedialaneCollectionCard, { image: previewImage, name, collection: collectionLabel }),
|
|
11
|
+
/* @__PURE__ */ jsx(MedialaneCollectionCard, { image: previewImage, name: result.name, collection: result.collectionLabel }),
|
|
19
12
|
/* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
|
|
20
13
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
21
14
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-green-500", children: [
|
|
22
15
|
/* @__PURE__ */ jsx(CheckCircle2, { className: "h-5 w-5" }),
|
|
23
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children:
|
|
16
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: result.headline })
|
|
24
17
|
] }),
|
|
25
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children:
|
|
18
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: result.detail })
|
|
26
19
|
] }),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Link,
|
|
41
|
-
{
|
|
42
|
-
href: `/asset/STARKNET/${mintedAsset.contract}/${mintedAsset.tokenId}?action=list`,
|
|
43
|
-
className: "flex items-center gap-2 rounded-xl border border-border px-4 py-3 text-sm font-semibold hover:bg-muted/40 transition-colors",
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ jsx(Tag, { className: "h-4 w-4 text-muted-foreground" }),
|
|
46
|
-
"Sell on marketplace"
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
/* @__PURE__ */ jsxs(
|
|
51
|
-
Link,
|
|
52
|
-
{
|
|
53
|
-
href: `/asset/STARKNET/${mintedAsset.contract}/${mintedAsset.tokenId}?action=transfer`,
|
|
54
|
-
className: "flex items-center gap-2 rounded-xl border border-border px-4 py-3 text-sm font-semibold hover:bg-muted/40 transition-colors",
|
|
55
|
-
children: [
|
|
56
|
-
/* @__PURE__ */ jsx(ArrowRightLeft, { className: "h-4 w-4 text-muted-foreground" }),
|
|
57
|
-
"Transfer"
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
),
|
|
61
|
-
/* @__PURE__ */ jsxs(
|
|
62
|
-
Link,
|
|
63
|
-
{
|
|
64
|
-
href: `/create/remix/${mintedAsset.contract}/${mintedAsset.tokenId}`,
|
|
65
|
-
className: "flex items-center gap-2 rounded-xl border border-border px-4 py-3 text-sm font-semibold hover:bg-muted/40 transition-colors",
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ jsx(GitBranch, { className: "h-4 w-4 text-muted-foreground" }),
|
|
68
|
-
"Create a remix"
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
] }),
|
|
73
|
-
footer,
|
|
20
|
+
result.links.length > 0 && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2.5", children: result.links.map(({ href, label, icon: Icon }) => /* @__PURE__ */ jsxs(
|
|
21
|
+
Link,
|
|
22
|
+
{
|
|
23
|
+
href,
|
|
24
|
+
className: "flex items-center gap-2 rounded-xl border border-border px-4 py-3 text-sm font-semibold hover:bg-muted/40 transition-colors",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx(Icon, { className: "h-4 w-4 text-muted-foreground" }),
|
|
27
|
+
label
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
href
|
|
31
|
+
)) }),
|
|
32
|
+
/* @__PURE__ */ jsx(RewardEarned, { actionType: result.reward }),
|
|
74
33
|
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: onPublishAnother, className: "w-full sm:w-auto", children: "Publish another" })
|
|
75
34
|
] })
|
|
76
35
|
] }) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/fast-mint/success-view.tsx"],"sourcesContent":["\"use client\";\n\nimport
|
|
1
|
+
{"version":3,"sources":["../../../src/components/fast-mint/success-view.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"../link.js\";\nimport { CheckCircle2 } from \"lucide-react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { Button } from \"../button.js\";\nimport { MedialaneCollectionCard } from \"../medialane-collection-card.js\";\nimport { RewardEarned } from \"../rewards/reward-earned.js\";\nimport type { FormatResult } from \"./formats/types.js\";\n\nexport interface SuccessViewProps {\n presentation?: \"inline\" | \"dialog\";\n previewImage: string | null;\n result: FormatResult;\n onPublishAnother: () => void;\n}\n\nexport function SuccessView({ presentation = \"inline\", previewImage, result, onPublishAnother }: SuccessViewProps) {\n return (\n <section className={cn(presentation === \"dialog\" ? \"\" : \"rounded-2xl border border-border p-6 sm:p-8\")}>\n <div className=\"grid grid-cols-1 sm:grid-cols-[220px_1fr] gap-6 items-start\">\n <MedialaneCollectionCard image={previewImage} name={result.name} collection={result.collectionLabel} />\n <div className=\"space-y-5\">\n <div className=\"space-y-1.5\">\n <div className=\"flex items-center gap-2 text-green-500\">\n <CheckCircle2 className=\"h-5 w-5\" />\n <p className=\"text-sm font-semibold\">{result.headline}</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">{result.detail}</p>\n </div>\n\n {result.links.length > 0 && (\n <div className=\"grid grid-cols-2 gap-2.5\">\n {result.links.map(({ href, label, icon: Icon }) => (\n <Link\n key={href}\n href={href}\n className=\"flex items-center gap-2 rounded-xl border border-border px-4 py-3 text-sm font-semibold hover:bg-muted/40 transition-colors\"\n >\n <Icon className=\"h-4 w-4 text-muted-foreground\" />\n {label}\n </Link>\n ))}\n </div>\n )}\n\n <RewardEarned actionType={result.reward} />\n\n <Button variant=\"outline\" onClick={onPublishAnother} className=\"w-full sm:w-auto\">\n Publish another\n </Button>\n </div>\n </div>\n </section>\n );\n}\n"],"mappings":";AAqBQ,cAGI,YAHJ;AAnBR,OAAO,UAAU;AACjB,SAAS,oBAAoB;AAC7B,SAAS,UAAU;AACnB,SAAS,cAAc;AACvB,SAAS,+BAA+B;AACxC,SAAS,oBAAoB;AAUtB,SAAS,YAAY,EAAE,eAAe,UAAU,cAAc,QAAQ,iBAAiB,GAAqB;AACjH,SACE,oBAAC,aAAQ,WAAW,GAAG,iBAAiB,WAAW,KAAK,6CAA6C,GACnG,+BAAC,SAAI,WAAU,+DACb;AAAA,wBAAC,2BAAwB,OAAO,cAAc,MAAM,OAAO,MAAM,YAAY,OAAO,iBAAiB;AAAA,IACrG,qBAAC,SAAI,WAAU,aACb;AAAA,2BAAC,SAAI,WAAU,eACb;AAAA,6BAAC,SAAI,WAAU,0CACb;AAAA,8BAAC,gBAAa,WAAU,WAAU;AAAA,UAClC,oBAAC,OAAE,WAAU,yBAAyB,iBAAO,UAAS;AAAA,WACxD;AAAA,QACA,oBAAC,OAAE,WAAU,iCAAiC,iBAAO,QAAO;AAAA,SAC9D;AAAA,MAEC,OAAO,MAAM,SAAS,KACrB,oBAAC,SAAI,WAAU,4BACZ,iBAAO,MAAM,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,KAAK,MAC3C;AAAA,QAAC;AAAA;AAAA,UAEC;AAAA,UACA,WAAU;AAAA,UAEV;AAAA,gCAAC,QAAK,WAAU,iCAAgC;AAAA,YAC/C;AAAA;AAAA;AAAA,QALI;AAAA,MAMP,CACD,GACH;AAAA,MAGF,oBAAC,gBAAa,YAAY,OAAO,QAAQ;AAAA,MAEzC,oBAAC,UAAO,SAAQ,WAAU,SAAS,kBAAkB,WAAU,oBAAmB,6BAElF;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/fast-mint/types.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../../../src/components/fast-mint/types.ts"],"sourcesContent":["import type { Call, TypedData } from \"starknet\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\n\nexport type MediaKind = \"image\" | \"audio\" | \"video\" | \"document\";\n\nexport interface FastMintSigner {\n readonly address: string;\n execute(calls: Call[], opts?: { intentIds?: string[] }): Promise<{ txHash: string }>;\n signTypedData(data: TypedData): Promise<string[]>;\n}\n\nexport interface MintedAsset {\n contract: string;\n tokenId: string;\n image: string | null;\n}\n\nexport interface FastMintProps {\n presentation?: \"inline\" | \"dialog\";\n open?: boolean;\n onClose?: () => void;\n\n mediaKindLock?: MediaKind;\n onMinted?: (asset: MintedAsset) => void;\n\n collections: ApiCollection[];\n refetchCollections: () => Promise<ApiCollection[]>;\n\n hasWallet: boolean;\n walletAddress: string | null;\n onRequireWallet: () => void;\n connectLabel?: string;\n getUploadToken: () => Promise<string | null>;\n getSigner: () => Promise<FastMintSigner> | FastMintSigner;\n client: MedialaneClient;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { Call, TypedData } from 'starknet';
|
|
3
2
|
import { ApiCollection } from '@medialane/sdk';
|
|
4
3
|
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
@@ -24,7 +23,6 @@ interface FastMintProps {
|
|
|
24
23
|
onClose?: () => void;
|
|
25
24
|
mediaKindLock?: MediaKind;
|
|
26
25
|
onMinted?: (asset: MintedAsset) => void;
|
|
27
|
-
onNavigate?: (href: string) => void;
|
|
28
26
|
collections: ApiCollection[];
|
|
29
27
|
refetchCollections: () => Promise<ApiCollection[]>;
|
|
30
28
|
hasWallet: boolean;
|
|
@@ -34,7 +32,6 @@ interface FastMintProps {
|
|
|
34
32
|
getUploadToken: () => Promise<string | null>;
|
|
35
33
|
getSigner: () => Promise<FastMintSigner> | FastMintSigner;
|
|
36
34
|
client: MedialaneClient;
|
|
37
|
-
successFooter?: ReactNode;
|
|
38
35
|
}
|
|
39
36
|
|
|
40
37
|
export type { FastMintProps, FastMintSigner, MediaKind, MintedAsset };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { Call, TypedData } from 'starknet';
|
|
3
2
|
import { ApiCollection } from '@medialane/sdk';
|
|
4
3
|
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
@@ -24,7 +23,6 @@ interface FastMintProps {
|
|
|
24
23
|
onClose?: () => void;
|
|
25
24
|
mediaKindLock?: MediaKind;
|
|
26
25
|
onMinted?: (asset: MintedAsset) => void;
|
|
27
|
-
onNavigate?: (href: string) => void;
|
|
28
26
|
collections: ApiCollection[];
|
|
29
27
|
refetchCollections: () => Promise<ApiCollection[]>;
|
|
30
28
|
hasWallet: boolean;
|
|
@@ -34,7 +32,6 @@ interface FastMintProps {
|
|
|
34
32
|
getUploadToken: () => Promise<string | null>;
|
|
35
33
|
getSigner: () => Promise<FastMintSigner> | FastMintSigner;
|
|
36
34
|
client: MedialaneClient;
|
|
37
|
-
successFooter?: ReactNode;
|
|
38
35
|
}
|
|
39
36
|
|
|
40
37
|
export type { FastMintProps, FastMintSigner, MediaKind, MintedAsset };
|
|
@@ -56,11 +56,10 @@ var import_wallet_required = require("../wallet-required.js");
|
|
|
56
56
|
var import_medialane_app = require("../medialane-app.js");
|
|
57
57
|
var import_reward_earned = require("../rewards/reward-earned.js");
|
|
58
58
|
var import_run_intent_calls = require("../../utils/run-intent-calls.js");
|
|
59
|
+
var import_launchpad_actions = require("../../utils/launchpad-actions.js");
|
|
59
60
|
var import_ipfs_upload = require("../../utils/ipfs-upload.js");
|
|
60
61
|
var import_use_transaction = require("../../utils/use-transaction.js");
|
|
61
62
|
var import_use_launchpad_image_upload = require("../../utils/use-launchpad-image-upload.js");
|
|
62
|
-
var import_launchpad_handoff = require("../../utils/launchpad-handoff.js");
|
|
63
|
-
var import_ipfs = require("../../utils/ipfs.js");
|
|
64
63
|
var import_portfolio_cache = require("../../utils/portfolio-cache.js");
|
|
65
64
|
var import_launchpad_defaults = require("../../utils/launchpad-defaults.js");
|
|
66
65
|
const schema = z.object({
|
|
@@ -76,7 +75,7 @@ function CollectionCreateForm({ preset, aside }) {
|
|
|
76
75
|
const walletAddress = app.walletAddress;
|
|
77
76
|
const tx = (0, import_use_transaction.useTransaction)();
|
|
78
77
|
const upload = (0, import_use_launchpad_image_upload.useLaunchpadImageUpload)({ successMessage: "Image uploaded" });
|
|
79
|
-
const { imageFile, imagePreview, imageUri, imageUploading, uploadError, fileInputRef, handleImageSelect, clearImage
|
|
78
|
+
const { imageFile, imagePreview, imageUri, imageUploading, uploadError, fileInputRef, handleImageSelect, clearImage } = upload;
|
|
80
79
|
const [autoSymbol, setAutoSymbol] = (0, import_react.useState)("");
|
|
81
80
|
const [viewHref, setViewHref] = (0, import_react.useState)(null);
|
|
82
81
|
const Icon = preset.icon;
|
|
@@ -85,13 +84,6 @@ function CollectionCreateForm({ preset, aside }) {
|
|
|
85
84
|
defaultValues: { name: "", symbol: "", description: "", external_link: "" }
|
|
86
85
|
});
|
|
87
86
|
const name = form.watch("name");
|
|
88
|
-
(0, import_launchpad_handoff.useAppliedHandoff)(({ name: carriedName, imageUri: carried }) => {
|
|
89
|
-
if (carriedName) form.setValue("name", carriedName);
|
|
90
|
-
if (carried) {
|
|
91
|
-
setImageUri(carried);
|
|
92
|
-
setImagePreview((0, import_ipfs.ipfsToHttp)(carried));
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
87
|
(0, import_react.useEffect)(() => {
|
|
96
88
|
if (!preset.suggestSymbol) return;
|
|
97
89
|
const suggested = (0, import_launchpad_defaults.suggestLaunchpadSymbol)(name);
|
|
@@ -147,12 +139,12 @@ function CollectionCreateForm({ preset, aside }) {
|
|
|
147
139
|
);
|
|
148
140
|
await (0, import_run_intent_calls.runIntentCalls)(
|
|
149
141
|
signer,
|
|
150
|
-
() =>
|
|
142
|
+
() => (0, import_launchpad_actions.serviceCollectionIntent)(api, {
|
|
151
143
|
owner: walletAddress,
|
|
152
144
|
name: values.name,
|
|
153
145
|
symbol: values.symbol,
|
|
154
146
|
baseUri,
|
|
155
|
-
|
|
147
|
+
service: preset.service ?? void 0
|
|
156
148
|
})
|
|
157
149
|
);
|
|
158
150
|
(0, import_portfolio_cache.invalidatePortfolioCache)(walletAddress);
|
|
@@ -233,8 +225,8 @@ function CollectionCreateForm({ preset, aside }) {
|
|
|
233
225
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { type: "button", variant: "outline", size: "sm", disabled: imageUploading, onClick: () => fileInputRef.current?.click(), children: imageUploading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
234
226
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-3.5 w-3.5 mr-1.5 animate-spin" }),
|
|
235
227
|
"Uploading\u2026"
|
|
236
|
-
] }) : imageFile
|
|
237
|
-
|
|
228
|
+
] }) : imageFile ? "Change image" : "Upload image" }),
|
|
229
|
+
imageFile && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
238
230
|
"button",
|
|
239
231
|
{
|
|
240
232
|
type: "button",
|