@medialane/ui 0.366.0 → 0.368.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 (208) hide show
  1. package/dist/components/alert.d.cts +1 -1
  2. package/dist/components/alert.d.ts +1 -1
  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/asset-card.cjs +3 -3
  6. package/dist/components/asset-card.cjs.map +1 -1
  7. package/dist/components/asset-card.js +3 -3
  8. package/dist/components/asset-card.js.map +1 -1
  9. package/dist/components/badge.d.cts +1 -1
  10. package/dist/components/badge.d.ts +1 -1
  11. package/dist/components/button.d.cts +1 -1
  12. package/dist/components/button.d.ts +1 -1
  13. package/dist/components/collection-card.cjs +3 -3
  14. package/dist/components/collection-card.cjs.map +1 -1
  15. package/dist/components/collection-card.js +3 -3
  16. package/dist/components/collection-card.js.map +1 -1
  17. package/dist/components/collection-page.cjs +1 -1
  18. package/dist/components/collection-page.cjs.map +1 -1
  19. package/dist/components/collection-page.js +1 -1
  20. package/dist/components/collection-page.js.map +1 -1
  21. package/dist/components/fast-mint/asset-form-parts.cjs +25 -51
  22. package/dist/components/fast-mint/asset-form-parts.cjs.map +1 -1
  23. package/dist/components/fast-mint/asset-form-parts.d.cts +11 -14
  24. package/dist/components/fast-mint/asset-form-parts.d.ts +11 -14
  25. package/dist/components/fast-mint/asset-form-parts.js +27 -52
  26. package/dist/components/fast-mint/asset-form-parts.js.map +1 -1
  27. package/dist/components/fast-mint/collection-section.cjs +11 -21
  28. package/dist/components/fast-mint/collection-section.cjs.map +1 -1
  29. package/dist/components/fast-mint/collection-section.d.cts +5 -7
  30. package/dist/components/fast-mint/collection-section.d.ts +5 -7
  31. package/dist/components/fast-mint/collection-section.js +11 -21
  32. package/dist/components/fast-mint/collection-section.js.map +1 -1
  33. package/dist/components/fast-mint/create-then-add.cjs +55 -0
  34. package/dist/components/fast-mint/create-then-add.cjs.map +1 -0
  35. package/dist/components/fast-mint/create-then-add.d.cts +24 -0
  36. package/dist/components/fast-mint/create-then-add.d.ts +24 -0
  37. package/dist/components/fast-mint/create-then-add.js +30 -0
  38. package/dist/components/fast-mint/create-then-add.js.map +1 -0
  39. package/dist/components/fast-mint/dropzone.d.cts +0 -1
  40. package/dist/components/fast-mint/dropzone.d.ts +0 -1
  41. package/dist/components/fast-mint/fast-mint.cjs +96 -167
  42. package/dist/components/fast-mint/fast-mint.cjs.map +1 -1
  43. package/dist/components/fast-mint/fast-mint.js +98 -169
  44. package/dist/components/fast-mint/fast-mint.js.map +1 -1
  45. package/dist/components/fast-mint/formats/nft.cjs +236 -0
  46. package/dist/components/fast-mint/formats/nft.cjs.map +1 -0
  47. package/dist/components/fast-mint/formats/nft.d.cts +19 -0
  48. package/dist/components/fast-mint/formats/nft.d.ts +19 -0
  49. package/dist/components/fast-mint/formats/nft.js +217 -0
  50. package/dist/components/fast-mint/formats/nft.js.map +1 -0
  51. package/dist/components/fast-mint/formats/pop.cjs +161 -0
  52. package/dist/components/fast-mint/formats/pop.cjs.map +1 -0
  53. package/dist/components/fast-mint/formats/pop.d.cts +18 -0
  54. package/dist/components/fast-mint/formats/pop.d.ts +18 -0
  55. package/dist/components/fast-mint/formats/pop.js +137 -0
  56. package/dist/components/fast-mint/formats/pop.js.map +1 -0
  57. package/dist/components/fast-mint/formats/registry.cjs +42 -0
  58. package/dist/components/fast-mint/formats/registry.cjs.map +1 -0
  59. package/dist/components/fast-mint/formats/registry.d.cts +20 -0
  60. package/dist/components/fast-mint/formats/registry.d.ts +20 -0
  61. package/dist/components/fast-mint/formats/registry.js +16 -0
  62. package/dist/components/fast-mint/formats/registry.js.map +1 -0
  63. package/dist/components/fast-mint/formats/tiers.cjs +206 -0
  64. package/dist/components/fast-mint/formats/tiers.cjs.map +1 -0
  65. package/dist/components/fast-mint/formats/tiers.d.cts +19 -0
  66. package/dist/components/fast-mint/formats/tiers.d.ts +19 -0
  67. package/dist/components/fast-mint/formats/tiers.js +181 -0
  68. package/dist/components/fast-mint/formats/tiers.js.map +1 -0
  69. package/dist/components/fast-mint/formats/types.cjs +31 -0
  70. package/dist/components/fast-mint/formats/types.cjs.map +1 -0
  71. package/dist/components/fast-mint/formats/types.d.cts +71 -0
  72. package/dist/components/fast-mint/formats/types.d.ts +71 -0
  73. package/dist/components/fast-mint/formats/types.js +7 -0
  74. package/dist/components/fast-mint/formats/types.js.map +1 -0
  75. package/dist/components/fast-mint/media-kind.d.cts +0 -1
  76. package/dist/components/fast-mint/media-kind.d.ts +0 -1
  77. package/dist/components/fast-mint/success-view.cjs +18 -59
  78. package/dist/components/fast-mint/success-view.cjs.map +1 -1
  79. package/dist/components/fast-mint/success-view.d.cts +13 -8
  80. package/dist/components/fast-mint/success-view.d.ts +13 -8
  81. package/dist/components/fast-mint/success-view.js +19 -60
  82. package/dist/components/fast-mint/success-view.js.map +1 -1
  83. package/dist/components/fast-mint/types.cjs.map +1 -1
  84. package/dist/components/fast-mint/types.d.cts +0 -3
  85. package/dist/components/fast-mint/types.d.ts +0 -3
  86. package/dist/components/launchpad/collection-create-form.cjs +9 -18
  87. package/dist/components/launchpad/collection-create-form.cjs.map +1 -1
  88. package/dist/components/launchpad/collection-create-form.js +9 -18
  89. package/dist/components/launchpad/collection-create-form.js.map +1 -1
  90. package/dist/components/launchpad/edition-mint-schema.cjs +3 -4
  91. package/dist/components/launchpad/edition-mint-schema.cjs.map +1 -1
  92. package/dist/components/launchpad/edition-mint-schema.d.cts +1 -1
  93. package/dist/components/launchpad/edition-mint-schema.d.ts +1 -1
  94. package/dist/components/launchpad/edition-mint-schema.js +3 -4
  95. package/dist/components/launchpad/edition-mint-schema.js.map +1 -1
  96. package/dist/components/launchpad/pop-create-fields.cjs +8 -6
  97. package/dist/components/launchpad/pop-create-fields.cjs.map +1 -1
  98. package/dist/components/launchpad/pop-create-fields.d.cts +8 -2
  99. package/dist/components/launchpad/pop-create-fields.d.ts +8 -2
  100. package/dist/components/launchpad/pop-create-fields.js +7 -6
  101. package/dist/components/launchpad/pop-create-fields.js.map +1 -1
  102. package/dist/components/launchpad/pop-create-schema.cjs +3 -4
  103. package/dist/components/launchpad/pop-create-schema.cjs.map +1 -1
  104. package/dist/components/launchpad/pop-create-schema.js +3 -4
  105. package/dist/components/launchpad/pop-create-schema.js.map +1 -1
  106. package/dist/components/launchpad/pop-create.cjs +12 -25
  107. package/dist/components/launchpad/pop-create.cjs.map +1 -1
  108. package/dist/components/launchpad/pop-create.js +12 -25
  109. package/dist/components/launchpad/pop-create.js.map +1 -1
  110. package/dist/components/launchpad/single-edition-mint.cjs +2 -1
  111. package/dist/components/launchpad/single-edition-mint.cjs.map +1 -1
  112. package/dist/components/launchpad/single-edition-mint.js +2 -1
  113. package/dist/components/launchpad/single-edition-mint.js.map +1 -1
  114. package/dist/components/launchpad/tier-mint-form.cjs +11 -27
  115. package/dist/components/launchpad/tier-mint-form.cjs.map +1 -1
  116. package/dist/components/launchpad/tier-mint-form.js +9 -25
  117. package/dist/components/launchpad/tier-mint-form.js.map +1 -1
  118. package/dist/components/launchpad-page.cjs +1 -2
  119. package/dist/components/launchpad-page.cjs.map +1 -1
  120. package/dist/components/launchpad-page.js +1 -2
  121. package/dist/components/launchpad-page.js.map +1 -1
  122. package/dist/components/page-skeletons.cjs +79 -47
  123. package/dist/components/page-skeletons.cjs.map +1 -1
  124. package/dist/components/page-skeletons.d.cts +3 -1
  125. package/dist/components/page-skeletons.d.ts +3 -1
  126. package/dist/components/page-skeletons.js +77 -47
  127. package/dist/components/page-skeletons.js.map +1 -1
  128. package/dist/components/pop-burn-button.cjs +1 -1
  129. package/dist/components/pop-burn-button.cjs.map +1 -1
  130. package/dist/components/pop-burn-button.js +1 -1
  131. package/dist/components/pop-burn-button.js.map +1 -1
  132. package/dist/components/pop-claim-button.cjs +3 -3
  133. package/dist/components/pop-claim-button.cjs.map +1 -1
  134. package/dist/components/pop-claim-button.js +3 -3
  135. package/dist/components/pop-claim-button.js.map +1 -1
  136. package/dist/components/pop-manage-page.cjs +3 -3
  137. package/dist/components/pop-manage-page.cjs.map +1 -1
  138. package/dist/components/pop-manage-page.js +3 -3
  139. package/dist/components/pop-manage-page.js.map +1 -1
  140. package/dist/components/service-collections-page.cjs +3 -2
  141. package/dist/components/service-collections-page.cjs.map +1 -1
  142. package/dist/components/service-collections-page.d.cts +2 -2
  143. package/dist/components/service-collections-page.d.ts +2 -2
  144. package/dist/components/service-collections-page.js +3 -2
  145. package/dist/components/service-collections-page.js.map +1 -1
  146. package/dist/components/token-card.cjs +7 -4
  147. package/dist/components/token-card.cjs.map +1 -1
  148. package/dist/components/token-card.js +7 -4
  149. package/dist/components/token-card.js.map +1 -1
  150. package/dist/components/transfer-dialog.d.cts +0 -1
  151. package/dist/components/transfer-dialog.d.ts +0 -1
  152. package/dist/data/launchpad-services.cjs +48 -27
  153. package/dist/data/launchpad-services.cjs.map +1 -1
  154. package/dist/data/launchpad-services.d.cts +11 -1
  155. package/dist/data/launchpad-services.d.ts +11 -1
  156. package/dist/data/launchpad-services.js +44 -26
  157. package/dist/data/launchpad-services.js.map +1 -1
  158. package/dist/index.cjs +8 -0
  159. package/dist/index.cjs.map +1 -1
  160. package/dist/index.d.cts +6 -2
  161. package/dist/index.d.ts +6 -2
  162. package/dist/index.js +6 -2
  163. package/dist/index.js.map +1 -1
  164. package/dist/utils/drop/actions.d.cts +0 -1
  165. package/dist/utils/drop/actions.d.ts +0 -1
  166. package/dist/utils/drop/draft.cjs +3 -2
  167. package/dist/utils/drop/draft.cjs.map +1 -1
  168. package/dist/utils/drop/draft.js +3 -2
  169. package/dist/utils/drop/draft.js.map +1 -1
  170. package/dist/utils/drop/sale.cjs +2 -1
  171. package/dist/utils/drop/sale.cjs.map +1 -1
  172. package/dist/utils/drop/sale.js +2 -1
  173. package/dist/utils/drop/sale.js.map +1 -1
  174. package/dist/utils/drop/types.d.cts +0 -1
  175. package/dist/utils/drop/types.d.ts +0 -1
  176. package/dist/utils/launchpad-actions.cjs +90 -0
  177. package/dist/utils/launchpad-actions.cjs.map +1 -0
  178. package/dist/utils/launchpad-actions.d.cts +39 -0
  179. package/dist/utils/launchpad-actions.d.ts +39 -0
  180. package/dist/utils/launchpad-actions.js +60 -0
  181. package/dist/utils/launchpad-actions.js.map +1 -0
  182. package/dist/utils/launchpad-rules.cjs +77 -0
  183. package/dist/utils/launchpad-rules.cjs.map +1 -0
  184. package/dist/utils/launchpad-rules.d.cts +13 -0
  185. package/dist/utils/launchpad-rules.d.ts +13 -0
  186. package/dist/utils/launchpad-rules.js +35 -0
  187. package/dist/utils/launchpad-rules.js.map +1 -0
  188. package/dist/utils/success-messages.cjs +5 -5
  189. package/dist/utils/success-messages.cjs.map +1 -1
  190. package/dist/utils/success-messages.d.cts +1 -1
  191. package/dist/utils/success-messages.d.ts +1 -1
  192. package/dist/utils/success-messages.js +5 -5
  193. package/dist/utils/success-messages.js.map +1 -1
  194. package/dist/utils/use-transaction.d.cts +0 -1
  195. package/dist/utils/use-transaction.d.ts +0 -1
  196. package/package.json +1 -1
  197. package/dist/components/fast-mint/mint-asset.cjs +0 -124
  198. package/dist/components/fast-mint/mint-asset.cjs.map +0 -1
  199. package/dist/components/fast-mint/mint-asset.d.cts +0 -41
  200. package/dist/components/fast-mint/mint-asset.d.ts +0 -41
  201. package/dist/components/fast-mint/mint-asset.js +0 -100
  202. package/dist/components/fast-mint/mint-asset.js.map +0 -1
  203. package/dist/utils/launchpad-handoff.cjs +0 -62
  204. package/dist/utils/launchpad-handoff.cjs.map +0 -1
  205. package/dist/utils/launchpad-handoff.d.cts +0 -11
  206. package/dist/utils/launchpad-handoff.d.ts +0 -11
  207. package/dist/utils/launchpad-handoff.js +0 -35
  208. 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,27 +56,25 @@ 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");
65
+ var import_launchpad_rules = require("../../utils/launchpad-rules.js");
66
66
  const schema = z.object({
67
67
  name: z.string().min(1, "Name required").max(import_field_limits.FIELD_LIMITS.name),
68
- symbol: z.string().min(1, "Symbol required").max(import_field_limits.FIELD_LIMITS.symbol, `Max ${import_field_limits.FIELD_LIMITS.symbol} characters`).regex(/^[A-Z0-9]+$/, "Uppercase letters and numbers only"),
68
+ symbol: (0, import_launchpad_rules.symbolField)(),
69
69
  description: z.string().max(import_field_limits.FIELD_LIMITS.description).optional(),
70
- external_link: z.string().max(500).refine((v) => !v || v.startsWith("http://") || v.startsWith("https://"), {
71
- message: "Must start with http:// or https://"
72
- }).optional()
70
+ external_link: (0, import_launchpad_rules.webLinkField)()
73
71
  });
74
72
  function CollectionCreateForm({ preset, aside }) {
75
73
  const app = (0, import_medialane_app.useMedialaneApp)();
76
74
  const walletAddress = app.walletAddress;
77
75
  const tx = (0, import_use_transaction.useTransaction)();
78
76
  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;
77
+ const { imageFile, imagePreview, imageUri, imageUploading, uploadError, fileInputRef, handleImageSelect, clearImage } = upload;
80
78
  const [autoSymbol, setAutoSymbol] = (0, import_react.useState)("");
81
79
  const [viewHref, setViewHref] = (0, import_react.useState)(null);
82
80
  const Icon = preset.icon;
@@ -85,13 +83,6 @@ function CollectionCreateForm({ preset, aside }) {
85
83
  defaultValues: { name: "", symbol: "", description: "", external_link: "" }
86
84
  });
87
85
  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
86
  (0, import_react.useEffect)(() => {
96
87
  if (!preset.suggestSymbol) return;
97
88
  const suggested = (0, import_launchpad_defaults.suggestLaunchpadSymbol)(name);
@@ -147,12 +138,12 @@ function CollectionCreateForm({ preset, aside }) {
147
138
  );
148
139
  await (0, import_run_intent_calls.runIntentCalls)(
149
140
  signer,
150
- () => api.intents.create("create-collection", {
141
+ () => (0, import_launchpad_actions.serviceCollectionIntent)(api, {
151
142
  owner: walletAddress,
152
143
  name: values.name,
153
144
  symbol: values.symbol,
154
145
  baseUri,
155
- ...preset.service ? { service: preset.service } : {}
146
+ service: preset.service ?? void 0
156
147
  })
157
148
  );
158
149
  (0, import_portfolio_cache.invalidatePortfolioCache)(walletAddress);
@@ -233,8 +224,8 @@ function CollectionCreateForm({ preset, aside }) {
233
224
  /* @__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
225
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-3.5 w-3.5 mr-1.5 animate-spin" }),
235
226
  "Uploading\u2026"
236
- ] }) : imageFile || imageUri ? "Change image" : "Upload image" }),
237
- (imageFile || imageUri) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
227
+ ] }) : imageFile ? "Change image" : "Upload image" }),
228
+ imageFile && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
238
229
  "button",
239
230
  {
240
231
  type: "button",