@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.
Files changed (126) hide show
  1. package/dist/components/account/input-otp.d.cts +2 -2
  2. package/dist/components/account/input-otp.d.ts +2 -2
  3. package/dist/components/approve-mint-dialog.d.cts +0 -1
  4. package/dist/components/approve-mint-dialog.d.ts +0 -1
  5. package/dist/components/button.d.cts +2 -2
  6. package/dist/components/button.d.ts +2 -2
  7. package/dist/components/fast-mint/asset-form-parts.cjs +25 -51
  8. package/dist/components/fast-mint/asset-form-parts.cjs.map +1 -1
  9. package/dist/components/fast-mint/asset-form-parts.d.cts +11 -14
  10. package/dist/components/fast-mint/asset-form-parts.d.ts +11 -14
  11. package/dist/components/fast-mint/asset-form-parts.js +27 -52
  12. package/dist/components/fast-mint/asset-form-parts.js.map +1 -1
  13. package/dist/components/fast-mint/collection-section.cjs +11 -21
  14. package/dist/components/fast-mint/collection-section.cjs.map +1 -1
  15. package/dist/components/fast-mint/collection-section.d.cts +5 -7
  16. package/dist/components/fast-mint/collection-section.d.ts +5 -7
  17. package/dist/components/fast-mint/collection-section.js +11 -21
  18. package/dist/components/fast-mint/collection-section.js.map +1 -1
  19. package/dist/components/fast-mint/create-then-add.cjs +55 -0
  20. package/dist/components/fast-mint/create-then-add.cjs.map +1 -0
  21. package/dist/components/fast-mint/create-then-add.d.cts +24 -0
  22. package/dist/components/fast-mint/create-then-add.d.ts +24 -0
  23. package/dist/components/fast-mint/create-then-add.js +30 -0
  24. package/dist/components/fast-mint/create-then-add.js.map +1 -0
  25. package/dist/components/fast-mint/dropzone.d.cts +0 -1
  26. package/dist/components/fast-mint/dropzone.d.ts +0 -1
  27. package/dist/components/fast-mint/fast-mint.cjs +95 -167
  28. package/dist/components/fast-mint/fast-mint.cjs.map +1 -1
  29. package/dist/components/fast-mint/fast-mint.js +97 -169
  30. package/dist/components/fast-mint/fast-mint.js.map +1 -1
  31. package/dist/components/fast-mint/formats/nft.cjs +233 -0
  32. package/dist/components/fast-mint/formats/nft.cjs.map +1 -0
  33. package/dist/components/fast-mint/formats/nft.d.cts +19 -0
  34. package/dist/components/fast-mint/formats/nft.d.ts +19 -0
  35. package/dist/components/fast-mint/formats/nft.js +214 -0
  36. package/dist/components/fast-mint/formats/nft.js.map +1 -0
  37. package/dist/components/fast-mint/formats/pop.cjs +160 -0
  38. package/dist/components/fast-mint/formats/pop.cjs.map +1 -0
  39. package/dist/components/fast-mint/formats/pop.d.cts +18 -0
  40. package/dist/components/fast-mint/formats/pop.d.ts +18 -0
  41. package/dist/components/fast-mint/formats/pop.js +136 -0
  42. package/dist/components/fast-mint/formats/pop.js.map +1 -0
  43. package/dist/components/fast-mint/formats/registry.cjs +42 -0
  44. package/dist/components/fast-mint/formats/registry.cjs.map +1 -0
  45. package/dist/components/fast-mint/formats/registry.d.cts +20 -0
  46. package/dist/components/fast-mint/formats/registry.d.ts +20 -0
  47. package/dist/components/fast-mint/formats/registry.js +16 -0
  48. package/dist/components/fast-mint/formats/registry.js.map +1 -0
  49. package/dist/components/fast-mint/formats/tiers.cjs +206 -0
  50. package/dist/components/fast-mint/formats/tiers.cjs.map +1 -0
  51. package/dist/components/fast-mint/formats/tiers.d.cts +19 -0
  52. package/dist/components/fast-mint/formats/tiers.d.ts +19 -0
  53. package/dist/components/fast-mint/formats/tiers.js +181 -0
  54. package/dist/components/fast-mint/formats/tiers.js.map +1 -0
  55. package/dist/components/fast-mint/formats/types.cjs +31 -0
  56. package/dist/components/fast-mint/formats/types.cjs.map +1 -0
  57. package/dist/components/fast-mint/formats/types.d.cts +71 -0
  58. package/dist/components/fast-mint/formats/types.d.ts +71 -0
  59. package/dist/components/fast-mint/formats/types.js +7 -0
  60. package/dist/components/fast-mint/formats/types.js.map +1 -0
  61. package/dist/components/fast-mint/media-kind.d.cts +0 -1
  62. package/dist/components/fast-mint/media-kind.d.ts +0 -1
  63. package/dist/components/fast-mint/success-view.cjs +18 -59
  64. package/dist/components/fast-mint/success-view.cjs.map +1 -1
  65. package/dist/components/fast-mint/success-view.d.cts +13 -8
  66. package/dist/components/fast-mint/success-view.d.ts +13 -8
  67. package/dist/components/fast-mint/success-view.js +19 -60
  68. package/dist/components/fast-mint/success-view.js.map +1 -1
  69. package/dist/components/fast-mint/types.cjs.map +1 -1
  70. package/dist/components/fast-mint/types.d.cts +0 -3
  71. package/dist/components/fast-mint/types.d.ts +0 -3
  72. package/dist/components/launchpad/collection-create-form.cjs +6 -14
  73. package/dist/components/launchpad/collection-create-form.cjs.map +1 -1
  74. package/dist/components/launchpad/collection-create-form.js +6 -14
  75. package/dist/components/launchpad/collection-create-form.js.map +1 -1
  76. package/dist/components/launchpad/edition-mint-schema.d.cts +4 -4
  77. package/dist/components/launchpad/edition-mint-schema.d.ts +4 -4
  78. package/dist/components/launchpad/pop-create-fields.cjs +5 -3
  79. package/dist/components/launchpad/pop-create-fields.cjs.map +1 -1
  80. package/dist/components/launchpad/pop-create-fields.d.cts +8 -2
  81. package/dist/components/launchpad/pop-create-fields.d.ts +8 -2
  82. package/dist/components/launchpad/pop-create-fields.js +4 -3
  83. package/dist/components/launchpad/pop-create-fields.js.map +1 -1
  84. package/dist/components/launchpad/pop-create.cjs +9 -22
  85. package/dist/components/launchpad/pop-create.cjs.map +1 -1
  86. package/dist/components/launchpad/pop-create.js +9 -22
  87. package/dist/components/launchpad/pop-create.js.map +1 -1
  88. package/dist/components/launchpad/tier-mint-form.cjs +8 -25
  89. package/dist/components/launchpad/tier-mint-form.cjs.map +1 -1
  90. package/dist/components/launchpad/tier-mint-form.js +6 -23
  91. package/dist/components/launchpad/tier-mint-form.js.map +1 -1
  92. package/dist/components/transfer-dialog.d.cts +0 -1
  93. package/dist/components/transfer-dialog.d.ts +0 -1
  94. package/dist/data/launchpad-services.cjs +12 -12
  95. package/dist/data/launchpad-services.cjs.map +1 -1
  96. package/dist/data/launchpad-services.js +12 -12
  97. package/dist/data/launchpad-services.js.map +1 -1
  98. package/dist/index.d.cts +4 -0
  99. package/dist/index.d.ts +4 -0
  100. package/dist/utils/drop/actions.d.cts +0 -1
  101. package/dist/utils/drop/actions.d.ts +0 -1
  102. package/dist/utils/drop/types.d.cts +0 -1
  103. package/dist/utils/drop/types.d.ts +0 -1
  104. package/dist/utils/launchpad-actions.cjs +90 -0
  105. package/dist/utils/launchpad-actions.cjs.map +1 -0
  106. package/dist/utils/launchpad-actions.d.cts +39 -0
  107. package/dist/utils/launchpad-actions.d.ts +39 -0
  108. package/dist/utils/launchpad-actions.js +60 -0
  109. package/dist/utils/launchpad-actions.js.map +1 -0
  110. package/dist/utils/media-wallet/use-erc20-balance.d.cts +1 -1
  111. package/dist/utils/media-wallet/use-erc20-balance.d.ts +1 -1
  112. package/dist/utils/use-transaction.d.cts +0 -1
  113. package/dist/utils/use-transaction.d.ts +0 -1
  114. package/package.json +1 -1
  115. package/dist/components/fast-mint/mint-asset.cjs +0 -124
  116. package/dist/components/fast-mint/mint-asset.cjs.map +0 -1
  117. package/dist/components/fast-mint/mint-asset.d.cts +0 -41
  118. package/dist/components/fast-mint/mint-asset.d.ts +0 -41
  119. package/dist/components/fast-mint/mint-asset.js +0 -100
  120. package/dist/components/fast-mint/mint-asset.js.map +0 -1
  121. package/dist/utils/launchpad-handoff.cjs +0 -62
  122. package/dist/utils/launchpad-handoff.cjs.map +0 -1
  123. package/dist/utils/launchpad-handoff.d.cts +0 -11
  124. package/dist/utils/launchpad-handoff.d.ts +0 -11
  125. package/dist/utils/launchpad-handoff.js +0 -35
  126. 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,7 @@
1
+ function defineFormat(format) {
2
+ return format;
3
+ }
4
+ export {
5
+ defineFormat
6
+ };
7
+ //# sourceMappingURL=types.js.map
@@ -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":[]}
@@ -1,6 +1,5 @@
1
1
  import { IPType } from '../../data/ip.cjs';
2
2
  import { MediaKind } from './types.cjs';
3
- import 'react';
4
3
  import 'starknet';
5
4
  import '@medialane/sdk';
6
5
  import '@medialane/sdk/starknet';
@@ -1,6 +1,5 @@
1
1
  import { IPType } from '../../data/ip.js';
2
2
  import { MediaKind } from './types.js';
3
- import 'react';
4
3
  import 'starknet';
5
4
  import '@medialane/sdk';
6
5
  import '@medialane/sdk/starknet';
@@ -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
- function SuccessView({
42
- presentation = "inline",
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: "Asset published" })
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: "It is recorded onchain with your wallet as owner." })
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: result.detail })
59
52
  ] }),
60
- mintedAsset && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2.5", children: [
61
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
62
- import_link.default,
63
- {
64
- href: `/asset/STARKNET/${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__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Eye, { className: "h-4 w-4 text-muted-foreground" }),
68
- "View asset"
69
- ]
70
- }
71
- ),
72
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
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 type { ReactNode } from \"react\";\nimport Link from \"../link.js\";\nimport { CheckCircle2, Eye, Tag, ArrowRightLeft, GitBranch } from \"lucide-react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { Button } from \"../button.js\";\nimport { MedialaneCollectionCard } from \"../medialane-collection-card.js\";\nimport type { MintedAsset } from \"./types.js\";\n\nexport interface SuccessViewProps {\n presentation?: \"inline\" | \"dialog\";\n previewImage: string | null;\n name: string;\n collectionLabel?: string;\n mintedAsset: MintedAsset | null;\n onPublishAnother: () => void;\n footer?: ReactNode;\n}\n\nexport function SuccessView({\n presentation = \"inline\",\n previewImage,\n name,\n collectionLabel,\n mintedAsset,\n footer,\n onPublishAnother,\n}: 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={name} collection={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\">Asset published</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n It is recorded onchain with your wallet as owner.\n </p>\n </div>\n\n {mintedAsset && (\n <div className=\"grid grid-cols-2 gap-2.5\">\n <Link\n href={`/asset/STARKNET/${mintedAsset.contract}/${mintedAsset.tokenId}`}\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 <Eye className=\"h-4 w-4 text-muted-foreground\" />\n View asset\n </Link>\n <Link\n href={`/asset/STARKNET/${mintedAsset.contract}/${mintedAsset.tokenId}?action=list`}\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 <Tag className=\"h-4 w-4 text-muted-foreground\" />\n Sell on marketplace\n </Link>\n <Link\n href={`/asset/STARKNET/${mintedAsset.contract}/${mintedAsset.tokenId}?action=transfer`}\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 <ArrowRightLeft className=\"h-4 w-4 text-muted-foreground\" />\n Transfer\n </Link>\n <Link\n href={`/create/remix/${mintedAsset.contract}/${mintedAsset.tokenId}`}\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 <GitBranch className=\"h-4 w-4 text-muted-foreground\" />\n Create a remix\n </Link>\n </div>\n )}\n\n {footer}\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;AAgCQ;AA7BR,kBAAiB;AACjB,0BAAkE;AAClE,gBAAmB;AACnB,oBAAuB;AACvB,uCAAwC;AAajC,SAAS,YAAY;AAAA,EAC1B,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAqB;AACnB,SACE,4CAAC,aAAQ,eAAW,cAAG,iBAAiB,WAAW,KAAK,6CAA6C,GACnG,uDAAC,SAAI,WAAU,+DACb;AAAA,gDAAC,4DAAwB,OAAO,cAAc,MAAY,YAAY,iBAAiB;AAAA,IACvF,6CAAC,SAAI,WAAU,aACb;AAAA,mDAAC,SAAI,WAAU,eACb;AAAA,qDAAC,SAAI,WAAU,0CACb;AAAA,sDAAC,oCAAa,WAAU,WAAU;AAAA,UAClC,4CAAC,OAAE,WAAU,yBAAwB,6BAAe;AAAA,WACtD;AAAA,QACA,4CAAC,OAAE,WAAU,iCAAgC,+DAE7C;AAAA,SACF;AAAA,MAEC,eACC,6CAAC,SAAI,WAAU,4BACb;AAAA;AAAA,UAAC,YAAAA;AAAA,UAAA;AAAA,YACC,MAAM,mBAAmB,YAAY,QAAQ,IAAI,YAAY,OAAO;AAAA,YACpE,WAAU;AAAA,YAEV;AAAA,0DAAC,2BAAI,WAAU,iCAAgC;AAAA,cAAE;AAAA;AAAA;AAAA,QAEnD;AAAA,QACA;AAAA,UAAC,YAAAA;AAAA,UAAA;AAAA,YACC,MAAM,mBAAmB,YAAY,QAAQ,IAAI,YAAY,OAAO;AAAA,YACpE,WAAU;AAAA,YAEV;AAAA,0DAAC,2BAAI,WAAU,iCAAgC;AAAA,cAAE;AAAA;AAAA;AAAA,QAEnD;AAAA,QACA;AAAA,UAAC,YAAAA;AAAA,UAAA;AAAA,YACC,MAAM,mBAAmB,YAAY,QAAQ,IAAI,YAAY,OAAO;AAAA,YACpE,WAAU;AAAA,YAEV;AAAA,0DAAC,sCAAe,WAAU,iCAAgC;AAAA,cAAE;AAAA;AAAA;AAAA,QAE9D;AAAA,QACA;AAAA,UAAC,YAAAA;AAAA,UAAA;AAAA,YACC,MAAM,iBAAiB,YAAY,QAAQ,IAAI,YAAY,OAAO;AAAA,YAClE,WAAU;AAAA,YAEV;AAAA,0DAAC,iCAAU,WAAU,iCAAgC;AAAA,cAAE;AAAA;AAAA;AAAA,QAEzD;AAAA,SACF;AAAA,MAGD;AAAA,MAED,4CAAC,wBAAO,SAAQ,WAAU,SAAS,kBAAkB,WAAU,oBAAmB,6BAElF;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":["Link"]}
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 { ReactNode } from 'react';
3
- import { MintedAsset } from './types.cjs';
4
- import 'starknet';
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
- name: string;
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, name, collectionLabel, mintedAsset, footer, onPublishAnother, }: SuccessViewProps): react_jsx_runtime.JSX.Element;
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 { ReactNode } from 'react';
3
- import { MintedAsset } from './types.js';
4
- import 'starknet';
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
- name: string;
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, name, collectionLabel, mintedAsset, footer, onPublishAnother, }: SuccessViewProps): react_jsx_runtime.JSX.Element;
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, Eye, Tag, ArrowRightLeft, GitBranch } from "lucide-react";
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
- function SuccessView({
9
- presentation = "inline",
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: "Asset published" })
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: "It is recorded onchain with your wallet as owner." })
18
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: result.detail })
26
19
  ] }),
27
- mintedAsset && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2.5", children: [
28
- /* @__PURE__ */ jsxs(
29
- Link,
30
- {
31
- href: `/asset/STARKNET/${mintedAsset.contract}/${mintedAsset.tokenId}`,
32
- 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",
33
- children: [
34
- /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4 text-muted-foreground" }),
35
- "View asset"
36
- ]
37
- }
38
- ),
39
- /* @__PURE__ */ jsxs(
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 type { ReactNode } from \"react\";\nimport Link from \"../link.js\";\nimport { CheckCircle2, Eye, Tag, ArrowRightLeft, GitBranch } from \"lucide-react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { Button } from \"../button.js\";\nimport { MedialaneCollectionCard } from \"../medialane-collection-card.js\";\nimport type { MintedAsset } from \"./types.js\";\n\nexport interface SuccessViewProps {\n presentation?: \"inline\" | \"dialog\";\n previewImage: string | null;\n name: string;\n collectionLabel?: string;\n mintedAsset: MintedAsset | null;\n onPublishAnother: () => void;\n footer?: ReactNode;\n}\n\nexport function SuccessView({\n presentation = \"inline\",\n previewImage,\n name,\n collectionLabel,\n mintedAsset,\n footer,\n onPublishAnother,\n}: 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={name} collection={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\">Asset published</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n It is recorded onchain with your wallet as owner.\n </p>\n </div>\n\n {mintedAsset && (\n <div className=\"grid grid-cols-2 gap-2.5\">\n <Link\n href={`/asset/STARKNET/${mintedAsset.contract}/${mintedAsset.tokenId}`}\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 <Eye className=\"h-4 w-4 text-muted-foreground\" />\n View asset\n </Link>\n <Link\n href={`/asset/STARKNET/${mintedAsset.contract}/${mintedAsset.tokenId}?action=list`}\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 <Tag className=\"h-4 w-4 text-muted-foreground\" />\n Sell on marketplace\n </Link>\n <Link\n href={`/asset/STARKNET/${mintedAsset.contract}/${mintedAsset.tokenId}?action=transfer`}\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 <ArrowRightLeft className=\"h-4 w-4 text-muted-foreground\" />\n Transfer\n </Link>\n <Link\n href={`/create/remix/${mintedAsset.contract}/${mintedAsset.tokenId}`}\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 <GitBranch className=\"h-4 w-4 text-muted-foreground\" />\n Create a remix\n </Link>\n </div>\n )}\n\n {footer}\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":";AAgCQ,cAGI,YAHJ;AA7BR,OAAO,UAAU;AACjB,SAAS,cAAc,KAAK,KAAK,gBAAgB,iBAAiB;AAClE,SAAS,UAAU;AACnB,SAAS,cAAc;AACvB,SAAS,+BAA+B;AAajC,SAAS,YAAY;AAAA,EAC1B,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAqB;AACnB,SACE,oBAAC,aAAQ,WAAW,GAAG,iBAAiB,WAAW,KAAK,6CAA6C,GACnG,+BAAC,SAAI,WAAU,+DACb;AAAA,wBAAC,2BAAwB,OAAO,cAAc,MAAY,YAAY,iBAAiB;AAAA,IACvF,qBAAC,SAAI,WAAU,aACb;AAAA,2BAAC,SAAI,WAAU,eACb;AAAA,6BAAC,SAAI,WAAU,0CACb;AAAA,8BAAC,gBAAa,WAAU,WAAU;AAAA,UAClC,oBAAC,OAAE,WAAU,yBAAwB,6BAAe;AAAA,WACtD;AAAA,QACA,oBAAC,OAAE,WAAU,iCAAgC,+DAE7C;AAAA,SACF;AAAA,MAEC,eACC,qBAAC,SAAI,WAAU,4BACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,mBAAmB,YAAY,QAAQ,IAAI,YAAY,OAAO;AAAA,YACpE,WAAU;AAAA,YAEV;AAAA,kCAAC,OAAI,WAAU,iCAAgC;AAAA,cAAE;AAAA;AAAA;AAAA,QAEnD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,mBAAmB,YAAY,QAAQ,IAAI,YAAY,OAAO;AAAA,YACpE,WAAU;AAAA,YAEV;AAAA,kCAAC,OAAI,WAAU,iCAAgC;AAAA,cAAE;AAAA;AAAA;AAAA,QAEnD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,mBAAmB,YAAY,QAAQ,IAAI,YAAY,OAAO;AAAA,YACpE,WAAU;AAAA,YAEV;AAAA,kCAAC,kBAAe,WAAU,iCAAgC;AAAA,cAAE;AAAA;AAAA;AAAA,QAE9D;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,iBAAiB,YAAY,QAAQ,IAAI,YAAY,OAAO;AAAA,YAClE,WAAU;AAAA,YAEV;AAAA,kCAAC,aAAU,WAAU,iCAAgC;AAAA,cAAE;AAAA;AAAA;AAAA,QAEzD;AAAA,SACF;AAAA,MAGD;AAAA,MAED,oBAAC,UAAO,SAAQ,WAAU,SAAS,kBAAkB,WAAU,oBAAmB,6BAElF;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
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 { ReactNode } from \"react\";\nimport 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 onNavigate?: (href: string) => 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 successFooter?: ReactNode;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
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, setImageUri, setImagePreview } = upload;
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
- () => api.intents.create("create-collection", {
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
- ...preset.service ? { service: preset.service } : {}
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 || imageUri ? "Change image" : "Upload image" }),
237
- (imageFile || imageUri) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
228
+ ] }) : imageFile ? "Change image" : "Upload image" }),
229
+ imageFile && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
238
230
  "button",
239
231
  {
240
232
  type: "button",