@medialane/ui 0.377.0 → 0.379.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 (398) hide show
  1. package/dist/components/account/device-approval-dialog.cjs +1 -1
  2. package/dist/components/account/device-approval-dialog.cjs.map +1 -1
  3. package/dist/components/account/device-approval-dialog.js +1 -1
  4. package/dist/components/account/device-approval-dialog.js.map +1 -1
  5. package/dist/components/account/devices-section.cjs +1 -1
  6. package/dist/components/account/devices-section.cjs.map +1 -1
  7. package/dist/components/account/devices-section.js +1 -1
  8. package/dist/components/account/devices-section.js.map +1 -1
  9. package/dist/components/account/guardian-recovery-section.cjs +2 -2
  10. package/dist/components/account/guardian-recovery-section.cjs.map +1 -1
  11. package/dist/components/account/guardian-recovery-section.js +2 -2
  12. package/dist/components/account/guardian-recovery-section.js.map +1 -1
  13. package/dist/components/account/input-otp.d.cts +2 -2
  14. package/dist/components/account/input-otp.d.ts +2 -2
  15. package/dist/components/action-button.cjs +21 -37
  16. package/dist/components/action-button.cjs.map +1 -1
  17. package/dist/components/action-button.d.cts +7 -3
  18. package/dist/components/action-button.d.ts +7 -3
  19. package/dist/components/action-button.js +20 -37
  20. package/dist/components/action-button.js.map +1 -1
  21. package/dist/components/activity-card.cjs +1 -1
  22. package/dist/components/activity-card.cjs.map +1 -1
  23. package/dist/components/activity-card.js +1 -1
  24. package/dist/components/activity-card.js.map +1 -1
  25. package/dist/components/activity-row.cjs +1 -1
  26. package/dist/components/activity-row.cjs.map +1 -1
  27. package/dist/components/activity-row.js +1 -1
  28. package/dist/components/activity-row.js.map +1 -1
  29. package/dist/components/alert.d.cts +1 -1
  30. package/dist/components/alert.d.ts +1 -1
  31. package/dist/components/approve-mint-dialog.cjs +7 -14
  32. package/dist/components/approve-mint-dialog.cjs.map +1 -1
  33. package/dist/components/approve-mint-dialog.js +7 -14
  34. package/dist/components/approve-mint-dialog.js.map +1 -1
  35. package/dist/components/asset-picker.cjs +2 -9
  36. package/dist/components/asset-picker.cjs.map +1 -1
  37. package/dist/components/asset-picker.js +2 -9
  38. package/dist/components/asset-picker.js.map +1 -1
  39. package/dist/components/badge.cjs +2 -2
  40. package/dist/components/badge.cjs.map +1 -1
  41. package/dist/components/badge.d.cts +1 -1
  42. package/dist/components/badge.d.ts +1 -1
  43. package/dist/components/badge.js +2 -2
  44. package/dist/components/badge.js.map +1 -1
  45. package/dist/components/button.cjs +2 -2
  46. package/dist/components/button.cjs.map +1 -1
  47. package/dist/components/button.d.cts +2 -2
  48. package/dist/components/button.d.ts +2 -2
  49. package/dist/components/button.js +2 -2
  50. package/dist/components/button.js.map +1 -1
  51. package/dist/components/club-owner-actions.cjs +5 -11
  52. package/dist/components/club-owner-actions.cjs.map +1 -1
  53. package/dist/components/club-owner-actions.js +5 -11
  54. package/dist/components/club-owner-actions.js.map +1 -1
  55. package/dist/components/collection-filters-dialog.cjs +2 -8
  56. package/dist/components/collection-filters-dialog.cjs.map +1 -1
  57. package/dist/components/collection-filters-dialog.js +2 -8
  58. package/dist/components/collection-filters-dialog.js.map +1 -1
  59. package/dist/components/collection-name-claim.cjs +1 -1
  60. package/dist/components/collection-name-claim.cjs.map +1 -1
  61. package/dist/components/collection-name-claim.js +1 -1
  62. package/dist/components/collection-name-claim.js.map +1 -1
  63. package/dist/components/collection-page.cjs +3 -2
  64. package/dist/components/collection-page.cjs.map +1 -1
  65. package/dist/components/collection-page.js +3 -2
  66. package/dist/components/collection-page.js.map +1 -1
  67. package/dist/components/collection-settings.cjs +4 -4
  68. package/dist/components/collection-settings.cjs.map +1 -1
  69. package/dist/components/collection-settings.js +4 -4
  70. package/dist/components/collection-settings.js.map +1 -1
  71. package/dist/components/collection-slug-claim.cjs +3 -3
  72. package/dist/components/collection-slug-claim.cjs.map +1 -1
  73. package/dist/components/collection-slug-claim.js +3 -3
  74. package/dist/components/collection-slug-claim.js.map +1 -1
  75. package/dist/components/collections-page.cjs +1 -1
  76. package/dist/components/collections-page.cjs.map +1 -1
  77. package/dist/components/collections-page.js +1 -1
  78. package/dist/components/collections-page.js.map +1 -1
  79. package/dist/components/creator-page.cjs +1 -1
  80. package/dist/components/creator-page.cjs.map +1 -1
  81. package/dist/components/creator-page.js +1 -1
  82. package/dist/components/creator-page.js.map +1 -1
  83. package/dist/components/discover-feed-section.cjs +2 -52
  84. package/dist/components/discover-feed-section.cjs.map +1 -1
  85. package/dist/components/discover-feed-section.d.cts +2 -15
  86. package/dist/components/discover-feed-section.d.ts +2 -15
  87. package/dist/components/discover-feed-section.js +2 -51
  88. package/dist/components/discover-feed-section.js.map +1 -1
  89. package/dist/components/drop/create/drop-create.cjs +2 -2
  90. package/dist/components/drop/create/drop-create.cjs.map +1 -1
  91. package/dist/components/drop/create/drop-create.js +2 -2
  92. package/dist/components/drop/create/drop-create.js.map +1 -1
  93. package/dist/components/drop/create/launch-dialog.cjs +5 -5
  94. package/dist/components/drop/create/launch-dialog.cjs.map +1 -1
  95. package/dist/components/drop/create/launch-dialog.js +5 -5
  96. package/dist/components/drop/create/launch-dialog.js.map +1 -1
  97. package/dist/components/drop/drop-listing.cjs +2 -1
  98. package/dist/components/drop/drop-listing.cjs.map +1 -1
  99. package/dist/components/drop/drop-listing.js +2 -1
  100. package/dist/components/drop/drop-listing.js.map +1 -1
  101. package/dist/components/drop/page/drop-action-box.cjs +2 -2
  102. package/dist/components/drop/page/drop-action-box.cjs.map +1 -1
  103. package/dist/components/drop/page/drop-action-box.js +2 -2
  104. package/dist/components/drop/page/drop-action-box.js.map +1 -1
  105. package/dist/components/drop/page/drop-manage.cjs +6 -6
  106. package/dist/components/drop/page/drop-manage.cjs.map +1 -1
  107. package/dist/components/drop/page/drop-manage.js +6 -6
  108. package/dist/components/drop/page/drop-manage.js.map +1 -1
  109. package/dist/components/drop/page/drop-mint-dialog.cjs +2 -2
  110. package/dist/components/drop/page/drop-mint-dialog.cjs.map +1 -1
  111. package/dist/components/drop/page/drop-mint-dialog.js +2 -2
  112. package/dist/components/drop/page/drop-mint-dialog.js.map +1 -1
  113. package/dist/components/drop/page/drop-page.cjs +3 -3
  114. package/dist/components/drop/page/drop-page.cjs.map +1 -1
  115. package/dist/components/drop/page/drop-page.js +3 -3
  116. package/dist/components/drop/page/drop-page.js.map +1 -1
  117. package/dist/components/drop-item-list.cjs +1 -1
  118. package/dist/components/drop-item-list.cjs.map +1 -1
  119. package/dist/components/drop-item-list.js +1 -1
  120. package/dist/components/drop-item-list.js.map +1 -1
  121. package/dist/components/editions-page.cjs +15 -35
  122. package/dist/components/editions-page.cjs.map +1 -1
  123. package/dist/components/editions-page.js +15 -35
  124. package/dist/components/editions-page.js.map +1 -1
  125. package/dist/components/empty-or-error.cjs +2 -2
  126. package/dist/components/empty-or-error.cjs.map +1 -1
  127. package/dist/components/empty-or-error.js +2 -2
  128. package/dist/components/empty-or-error.js.map +1 -1
  129. package/dist/components/fast-mint/dropzone.cjs +1 -1
  130. package/dist/components/fast-mint/dropzone.cjs.map +1 -1
  131. package/dist/components/fast-mint/dropzone.js +1 -1
  132. package/dist/components/fast-mint/dropzone.js.map +1 -1
  133. package/dist/components/fast-mint/fast-mint.cjs +5 -17
  134. package/dist/components/fast-mint/fast-mint.cjs.map +1 -1
  135. package/dist/components/fast-mint/fast-mint.js +5 -17
  136. package/dist/components/fast-mint/fast-mint.js.map +1 -1
  137. package/dist/components/fast-mint/success-view.cjs +1 -1
  138. package/dist/components/fast-mint/success-view.cjs.map +1 -1
  139. package/dist/components/fast-mint/success-view.js +1 -1
  140. package/dist/components/fast-mint/success-view.js.map +1 -1
  141. package/dist/components/gated-content.cjs +10 -16
  142. package/dist/components/gated-content.cjs.map +1 -1
  143. package/dist/components/gated-content.js +10 -16
  144. package/dist/components/gated-content.js.map +1 -1
  145. package/dist/components/ip-type-fields.cjs +2 -2
  146. package/dist/components/ip-type-fields.cjs.map +1 -1
  147. package/dist/components/ip-type-fields.js +2 -2
  148. package/dist/components/ip-type-fields.js.map +1 -1
  149. package/dist/components/ip-type-page.cjs +1 -1
  150. package/dist/components/ip-type-page.cjs.map +1 -1
  151. package/dist/components/ip-type-page.js +1 -1
  152. package/dist/components/ip-type-page.js.map +1 -1
  153. package/dist/components/launchpad/coin-create.cjs +4 -3
  154. package/dist/components/launchpad/coin-create.cjs.map +1 -1
  155. package/dist/components/launchpad/coin-create.js +4 -3
  156. package/dist/components/launchpad/coin-create.js.map +1 -1
  157. package/dist/components/launchpad/collection-create-form.cjs +7 -13
  158. package/dist/components/launchpad/collection-create-form.cjs.map +1 -1
  159. package/dist/components/launchpad/collection-create-form.js +7 -13
  160. package/dist/components/launchpad/collection-create-form.js.map +1 -1
  161. package/dist/components/launchpad/collection-create-presets.cjs +0 -4
  162. package/dist/components/launchpad/collection-create-presets.cjs.map +1 -1
  163. package/dist/components/launchpad/collection-create-presets.d.cts +0 -1
  164. package/dist/components/launchpad/collection-create-presets.d.ts +0 -1
  165. package/dist/components/launchpad/collection-create-presets.js +0 -4
  166. package/dist/components/launchpad/collection-create-presets.js.map +1 -1
  167. package/dist/components/launchpad/collection-picker.cjs +5 -11
  168. package/dist/components/launchpad/collection-picker.cjs.map +1 -1
  169. package/dist/components/launchpad/collection-picker.js +5 -11
  170. package/dist/components/launchpad/collection-picker.js.map +1 -1
  171. package/dist/components/launchpad/edition-mint-fields.cjs +1 -1
  172. package/dist/components/launchpad/edition-mint-fields.cjs.map +1 -1
  173. package/dist/components/launchpad/edition-mint-fields.js +1 -1
  174. package/dist/components/launchpad/edition-mint-fields.js.map +1 -1
  175. package/dist/components/launchpad/edition-mint-schema.d.cts +2 -2
  176. package/dist/components/launchpad/edition-mint-schema.d.ts +2 -2
  177. package/dist/components/launchpad/edition-mint.cjs +1 -1
  178. package/dist/components/launchpad/edition-mint.cjs.map +1 -1
  179. package/dist/components/launchpad/edition-mint.js +1 -1
  180. package/dist/components/launchpad/edition-mint.js.map +1 -1
  181. package/dist/components/launchpad/pop-create-fields.cjs +1 -1
  182. package/dist/components/launchpad/pop-create-fields.cjs.map +1 -1
  183. package/dist/components/launchpad/pop-create-fields.js +1 -1
  184. package/dist/components/launchpad/pop-create-fields.js.map +1 -1
  185. package/dist/components/launchpad/remix-mint.cjs +4 -15
  186. package/dist/components/launchpad/remix-mint.cjs.map +1 -1
  187. package/dist/components/launchpad/remix-mint.js +4 -15
  188. package/dist/components/launchpad/remix-mint.js.map +1 -1
  189. package/dist/components/launchpad/single-edition-mint.cjs +2 -9
  190. package/dist/components/launchpad/single-edition-mint.cjs.map +1 -1
  191. package/dist/components/launchpad/single-edition-mint.js +2 -9
  192. package/dist/components/launchpad/single-edition-mint.js.map +1 -1
  193. package/dist/components/launchpad/sponsorship-create.cjs +4 -15
  194. package/dist/components/launchpad/sponsorship-create.cjs.map +1 -1
  195. package/dist/components/launchpad/sponsorship-create.js +4 -15
  196. package/dist/components/launchpad/sponsorship-create.js.map +1 -1
  197. package/dist/components/launchpad/tier-mint-form.cjs +9 -15
  198. package/dist/components/launchpad/tier-mint-form.cjs.map +1 -1
  199. package/dist/components/launchpad/tier-mint-form.js +9 -15
  200. package/dist/components/launchpad/tier-mint-form.js.map +1 -1
  201. package/dist/components/launchpad/tier-mint-presets.cjs +0 -2
  202. package/dist/components/launchpad/tier-mint-presets.cjs.map +1 -1
  203. package/dist/components/launchpad/tier-mint-presets.d.cts +0 -1
  204. package/dist/components/launchpad/tier-mint-presets.d.ts +0 -1
  205. package/dist/components/launchpad/tier-mint-presets.js +0 -2
  206. package/dist/components/launchpad/tier-mint-presets.js.map +1 -1
  207. package/dist/components/license-request-page.cjs +7 -14
  208. package/dist/components/license-request-page.cjs.map +1 -1
  209. package/dist/components/license-request-page.js +7 -14
  210. package/dist/components/license-request-page.js.map +1 -1
  211. package/dist/components/listing-card-menu.cjs +1 -1
  212. package/dist/components/listing-card-menu.cjs.map +1 -1
  213. package/dist/components/listing-card-menu.js +1 -1
  214. package/dist/components/listing-card-menu.js.map +1 -1
  215. package/dist/components/listing-card.cjs +8 -17
  216. package/dist/components/listing-card.cjs.map +1 -1
  217. package/dist/components/listing-card.js +8 -17
  218. package/dist/components/listing-card.js.map +1 -1
  219. package/dist/components/listings-grid.cjs +1 -1
  220. package/dist/components/listings-grid.cjs.map +1 -1
  221. package/dist/components/listings-grid.js +1 -1
  222. package/dist/components/listings-grid.js.map +1 -1
  223. package/dist/components/make-offer-picker.cjs +1 -1
  224. package/dist/components/make-offer-picker.cjs.map +1 -1
  225. package/dist/components/make-offer-picker.js +1 -1
  226. package/dist/components/make-offer-picker.js.map +1 -1
  227. package/dist/components/marketplace-dialog-primitives.cjs +7 -33
  228. package/dist/components/marketplace-dialog-primitives.cjs.map +1 -1
  229. package/dist/components/marketplace-dialog-primitives.js +7 -33
  230. package/dist/components/marketplace-dialog-primitives.js.map +1 -1
  231. package/dist/components/media-wallet/quick-action.cjs +3 -3
  232. package/dist/components/media-wallet/quick-action.cjs.map +1 -1
  233. package/dist/components/media-wallet/quick-action.d.cts +2 -2
  234. package/dist/components/media-wallet/quick-action.d.ts +2 -2
  235. package/dist/components/media-wallet/quick-action.js +4 -4
  236. package/dist/components/media-wallet/quick-action.js.map +1 -1
  237. package/dist/components/pop-burn-button.cjs +1 -1
  238. package/dist/components/pop-burn-button.cjs.map +1 -1
  239. package/dist/components/pop-burn-button.js +1 -1
  240. package/dist/components/pop-burn-button.js.map +1 -1
  241. package/dist/components/pop-manage-page.cjs +4 -4
  242. package/dist/components/pop-manage-page.cjs.map +1 -1
  243. package/dist/components/pop-manage-page.js +4 -4
  244. package/dist/components/pop-manage-page.js.map +1 -1
  245. package/dist/components/pop-my-events-page.cjs +1 -1
  246. package/dist/components/pop-my-events-page.cjs.map +1 -1
  247. package/dist/components/pop-my-events-page.js +1 -1
  248. package/dist/components/pop-my-events-page.js.map +1 -1
  249. package/dist/components/portfolio-orders.cjs +2 -2
  250. package/dist/components/portfolio-orders.cjs.map +1 -1
  251. package/dist/components/portfolio-orders.js +2 -2
  252. package/dist/components/portfolio-orders.js.map +1 -1
  253. package/dist/components/portfolio-sponsorships.cjs +8 -6
  254. package/dist/components/portfolio-sponsorships.cjs.map +1 -1
  255. package/dist/components/portfolio-sponsorships.js +8 -6
  256. package/dist/components/portfolio-sponsorships.js.map +1 -1
  257. package/dist/components/remix-browse-page.cjs +2 -2
  258. package/dist/components/remix-browse-page.cjs.map +1 -1
  259. package/dist/components/remix-browse-page.js +2 -2
  260. package/dist/components/remix-browse-page.js.map +1 -1
  261. package/dist/components/report-dialog.cjs +2 -2
  262. package/dist/components/report-dialog.cjs.map +1 -1
  263. package/dist/components/report-dialog.js +2 -2
  264. package/dist/components/report-dialog.js.map +1 -1
  265. package/dist/components/share-button.cjs +4 -21
  266. package/dist/components/share-button.cjs.map +1 -1
  267. package/dist/components/share-button.d.cts +1 -1
  268. package/dist/components/share-button.d.ts +1 -1
  269. package/dist/components/share-button.js +4 -21
  270. package/dist/components/share-button.js.map +1 -1
  271. package/dist/components/sheet.cjs +1 -1
  272. package/dist/components/sheet.cjs.map +1 -1
  273. package/dist/components/sheet.js +1 -1
  274. package/dist/components/sheet.js.map +1 -1
  275. package/dist/components/sponsorship-offer-page.cjs +3 -3
  276. package/dist/components/sponsorship-offer-page.cjs.map +1 -1
  277. package/dist/components/sponsorship-offer-page.js +3 -3
  278. package/dist/components/sponsorship-offer-page.js.map +1 -1
  279. package/dist/components/sponsorship-offers-page.cjs +2 -2
  280. package/dist/components/sponsorship-offers-page.cjs.map +1 -1
  281. package/dist/components/sponsorship-offers-page.js +2 -2
  282. package/dist/components/sponsorship-offers-page.js.map +1 -1
  283. package/dist/components/token-card.cjs +10 -39
  284. package/dist/components/token-card.cjs.map +1 -1
  285. package/dist/components/token-card.js +10 -39
  286. package/dist/components/token-card.js.map +1 -1
  287. package/dist/components/transaction-dialog.cjs +1 -1
  288. package/dist/components/transaction-dialog.cjs.map +1 -1
  289. package/dist/components/transaction-dialog.js +1 -1
  290. package/dist/components/transaction-dialog.js.map +1 -1
  291. package/dist/components/transaction-success.cjs +1 -1
  292. package/dist/components/transaction-success.cjs.map +1 -1
  293. package/dist/components/transaction-success.js +1 -1
  294. package/dist/components/transaction-success.js.map +1 -1
  295. package/dist/components/transfer-collection-ownership.cjs +1 -1
  296. package/dist/components/transfer-collection-ownership.cjs.map +1 -1
  297. package/dist/components/transfer-collection-ownership.js +1 -1
  298. package/dist/components/transfer-collection-ownership.js.map +1 -1
  299. package/dist/components/transfer-dialog.cjs +2 -12
  300. package/dist/components/transfer-dialog.cjs.map +1 -1
  301. package/dist/components/transfer-dialog.js +2 -12
  302. package/dist/components/transfer-dialog.js.map +1 -1
  303. package/dist/components/wallet/export-key-section.cjs +2 -2
  304. package/dist/components/wallet/export-key-section.cjs.map +1 -1
  305. package/dist/components/wallet/export-key-section.js +2 -2
  306. package/dist/components/wallet/export-key-section.js.map +1 -1
  307. package/dist/components/wallet-required.cjs +2 -12
  308. package/dist/components/wallet-required.cjs.map +1 -1
  309. package/dist/components/wallet-required.js +2 -12
  310. package/dist/components/wallet-required.js.map +1 -1
  311. package/dist/data/activity.cjs +2 -2
  312. package/dist/data/activity.cjs.map +1 -1
  313. package/dist/data/activity.d.cts +1 -1
  314. package/dist/data/activity.d.ts +1 -1
  315. package/dist/data/activity.js +2 -2
  316. package/dist/data/activity.js.map +1 -1
  317. package/dist/data/brand.cjs +0 -8
  318. package/dist/data/brand.cjs.map +1 -1
  319. package/dist/data/brand.d.cts +1 -3
  320. package/dist/data/brand.d.ts +1 -3
  321. package/dist/data/brand.js +0 -6
  322. package/dist/data/brand.js.map +1 -1
  323. package/dist/i18n/catalog/pt.cjs +0 -4
  324. package/dist/i18n/catalog/pt.cjs.map +1 -1
  325. package/dist/i18n/catalog/pt.js +0 -4
  326. package/dist/i18n/catalog/pt.js.map +1 -1
  327. package/dist/index.cjs +6 -38
  328. package/dist/index.cjs.map +1 -1
  329. package/dist/index.d.cts +3 -13
  330. package/dist/index.d.ts +3 -13
  331. package/dist/index.js +6 -27
  332. package/dist/index.js.map +1 -1
  333. package/dist/medialane.css +15 -152
  334. package/dist/preset/tailwind.cjs +0 -10
  335. package/dist/preset/tailwind.cjs.map +1 -1
  336. package/dist/preset/tailwind.js +0 -10
  337. package/dist/preset/tailwind.js.map +1 -1
  338. package/package.json +1 -1
  339. package/dist/components/activity-feed-shell.cjs +0 -93
  340. package/dist/components/activity-feed-shell.cjs.map +0 -1
  341. package/dist/components/activity-feed-shell.d.cts +0 -13
  342. package/dist/components/activity-feed-shell.d.ts +0 -13
  343. package/dist/components/activity-feed-shell.js +0 -59
  344. package/dist/components/activity-feed-shell.js.map +0 -1
  345. package/dist/components/cta-card-grid.cjs +0 -69
  346. package/dist/components/cta-card-grid.cjs.map +0 -1
  347. package/dist/components/cta-card-grid.d.cts +0 -21
  348. package/dist/components/cta-card-grid.d.ts +0 -21
  349. package/dist/components/cta-card-grid.js +0 -35
  350. package/dist/components/cta-card-grid.js.map +0 -1
  351. package/dist/components/featured-carousel.cjs +0 -171
  352. package/dist/components/featured-carousel.cjs.map +0 -1
  353. package/dist/components/featured-carousel.d.cts +0 -13
  354. package/dist/components/featured-carousel.d.ts +0 -13
  355. package/dist/components/featured-carousel.js +0 -146
  356. package/dist/components/featured-carousel.js.map +0 -1
  357. package/dist/components/gradient-button.cjs +0 -61
  358. package/dist/components/gradient-button.cjs.map +0 -1
  359. package/dist/components/gradient-button.d.cts +0 -10
  360. package/dist/components/gradient-button.d.ts +0 -10
  361. package/dist/components/gradient-button.js +0 -37
  362. package/dist/components/gradient-button.js.map +0 -1
  363. package/dist/components/launchpad-cta-banner.cjs +0 -85
  364. package/dist/components/launchpad-cta-banner.cjs.map +0 -1
  365. package/dist/components/launchpad-cta-banner.d.cts +0 -15
  366. package/dist/components/launchpad-cta-banner.d.ts +0 -15
  367. package/dist/components/launchpad-cta-banner.js +0 -51
  368. package/dist/components/launchpad-cta-banner.js.map +0 -1
  369. package/dist/components/portfolio-section.cjs +0 -90
  370. package/dist/components/portfolio-section.cjs.map +0 -1
  371. package/dist/components/portfolio-section.d.cts +0 -14
  372. package/dist/components/portfolio-section.d.ts +0 -14
  373. package/dist/components/portfolio-section.js +0 -56
  374. package/dist/components/portfolio-section.js.map +0 -1
  375. package/dist/components/rewards/journey-path.cjs +0 -77
  376. package/dist/components/rewards/journey-path.cjs.map +0 -1
  377. package/dist/components/rewards/journey-path.d.cts +0 -17
  378. package/dist/components/rewards/journey-path.d.ts +0 -17
  379. package/dist/components/rewards/journey-path.js +0 -53
  380. package/dist/components/rewards/journey-path.js.map +0 -1
  381. package/dist/components/rewards/score-summary-card.cjs +0 -73
  382. package/dist/components/rewards/score-summary-card.cjs.map +0 -1
  383. package/dist/components/rewards/score-summary-card.d.cts +0 -21
  384. package/dist/components/rewards/score-summary-card.d.ts +0 -21
  385. package/dist/components/rewards/score-summary-card.js +0 -49
  386. package/dist/components/rewards/score-summary-card.js.map +0 -1
  387. package/dist/components/step-nav.cjs +0 -82
  388. package/dist/components/step-nav.cjs.map +0 -1
  389. package/dist/components/step-nav.d.cts +0 -17
  390. package/dist/components/step-nav.d.ts +0 -17
  391. package/dist/components/step-nav.js +0 -58
  392. package/dist/components/step-nav.js.map +0 -1
  393. package/dist/components/token-glyph.cjs +0 -92
  394. package/dist/components/token-glyph.cjs.map +0 -1
  395. package/dist/components/token-glyph.d.cts +0 -19
  396. package/dist/components/token-glyph.d.ts +0 -19
  397. package/dist/components/token-glyph.js +0 -67
  398. package/dist/components/token-glyph.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/launchpad/collection-create-form.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState, type ReactNode } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport * as z from \"zod\";\nimport { ImagePlus, Loader2, X } from \"lucide-react\";\nimport { buildCollectionMetadata, collectionHref, getCoordinates, profileHref } from \"@medialane/sdk\";\nimport { acceptFor } from \"../../utils/upload-limits.js\";\nimport { FIELD_LIMITS } from \"../../utils/field-limits.js\";\nimport { createdCollectionAddress, createdCollectionFromReceipt, deployedCollectionFromReceipt } from \"@medialane/sdk/starknet\";\nimport Image from \"../image.js\";\nimport { Button } from \"../button.js\";\nimport { Input } from \"../input.js\";\nimport { Textarea } from \"../textarea.js\";\nimport { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from \"../form.js\";\nimport { ClaimRouteShell } from \"../claim-route-shell.js\";\nimport { TransactionSuccess } from \"../transaction-success.js\";\nimport { ExternalLinkField } from \"../external-link-field.js\";\nimport { MedialaneCollectionCard } from \"../medialane-collection-card.js\";\nimport { TransactionDialog } from \"../transaction-dialog.js\";\nimport { WalletRequired } from \"../wallet-required.js\";\nimport { useMedialaneApp } from \"../medialane-app.js\";\nimport { RewardEarned } from \"../rewards/reward-earned.js\";\nimport { runIntentCalls } from \"../../utils/run-intent-calls.js\";\nimport { serviceCollectionIntent } from \"../../utils/launchpad-actions.js\";\nimport { uploadJsonToIpfs } from \"../../utils/ipfs-upload.js\";\nimport { useTransaction } from \"../../utils/use-transaction.js\";\nimport { useLaunchpadImageUpload } from \"../../utils/use-launchpad-image-upload.js\";\nimport { invalidatePortfolioCache } from \"../../utils/portfolio-cache.js\";\nimport { suggestLaunchpadSymbol } from \"../../utils/launchpad-defaults.js\";\nimport { symbolField, webLinkField } from \"../../utils/launchpad-rules.js\";\nimport type { CollectionCreatePreset } from \"./collection-create-presets.js\";\nimport { useT } from \"../../i18n/provider.js\";\n\nconst schema = z.object({\n name: z.string().min(1, \"Name required\").max(FIELD_LIMITS.name),\n symbol: symbolField(),\n description: z.string().max(FIELD_LIMITS.description).optional(),\n external_link: webLinkField(),\n});\ntype FormValues = z.infer<typeof schema>;\n\nexport interface CollectionCreateFormProps {\n preset: CollectionCreatePreset;\n aside?: ReactNode;\n}\n\nexport function CollectionCreateForm({ preset, aside }: CollectionCreateFormProps) {\n const t = useT();\n const app = useMedialaneApp();\n const walletAddress = app.walletAddress;\n const tx = useTransaction();\n const upload = useLaunchpadImageUpload({ successMessage: t(\"Image uploaded\") });\n const { imageFile, imagePreview, imageUri, imageUploading, uploadError, fileInputRef, handleImageSelect, clearImage } = upload;\n const [autoSymbol, setAutoSymbol] = useState(\"\");\n const [viewHref, setViewHref] = useState<string | null>(null);\n const Icon = preset.icon;\n\n const form = useForm<FormValues>({\n resolver: zodResolver(schema),\n defaultValues: { name: \"\", symbol: \"\", description: \"\", external_link: \"\" },\n });\n const name = form.watch(\"name\");\n\n useEffect(() => {\n if (!preset.suggestSymbol) return;\n const suggested = suggestLaunchpadSymbol(name);\n if (!suggested) return;\n const current = form.getValues(\"symbol\");\n if (!current || current === autoSymbol) {\n form.setValue(\"symbol\", suggested, { shouldDirty: false });\n setAutoSymbol(suggested);\n }\n }, [autoSymbol, name, form, preset.suggestSymbol]);\n\n const deployedAddress =\n tx.receipt && preset.service ? deployedCollectionFromReceipt(tx.receipt, preset.service) : null;\n const createdId =\n tx.receipt && !preset.service ? createdCollectionFromReceipt(tx.receipt, getCoordinates(\"STARKNET\").collection721)?.collectionId ?? null : null;\n\n useEffect(() => {\n if (tx.phase !== \"success\") return;\n let alive = true;\n const client = app.getClient();\n if (deployedAddress) {\n setViewHref(collectionHref(\"STARKNET\", deployedAddress));\n if (preset.registerAfterDeploy) void client.api.collections.register(deployedAddress).catch(() => {});\n } else if (createdId) {\n createdCollectionAddress(client.provider, getCoordinates(\"STARKNET\").collection721, createdId)\n .then((address) => {\n if (alive && address) setViewHref(collectionHref(\"STARKNET\", address));\n })\n .catch(() => {});\n }\n return () => {\n alive = false;\n };\n }, [tx.phase, deployedAddress, createdId, app, preset.registerAfterDeploy]);\n\n const handleAgain = () => {\n tx.reset();\n setViewHref(null);\n setAutoSymbol(\"\");\n form.reset();\n clearImage();\n };\n\n const onSubmit = (values: FormValues) => {\n if (imageFile && !imageUri && !imageUploading) return;\n if (!walletAddress) return;\n void tx.run(async (signer) => {\n await app.ensureSignedIn?.();\n const api = app.getClient().api;\n const baseUri = await uploadJsonToIpfs(\n api,\n buildCollectionMetadata({\n name: values.name,\n description: values.description,\n image: imageUri,\n externalLink: values.external_link,\n owner: walletAddress,\n }),\n );\n await runIntentCalls(signer, () =>\n serviceCollectionIntent(api, {\n owner: walletAddress,\n name: values.name,\n symbol: values.symbol,\n baseUri,\n service: preset.service ?? undefined,\n }),\n );\n invalidatePortfolioCache(walletAddress);\n });\n };\n\n const { copy } = preset;\n const busy = tx.phase !== \"idle\" || imageUploading;\n const actions = preset.actions({ address: deployedAddress, collectionHref: viewHref });\n\n return (\n <WalletRequired icon={Icon} iconClassName={preset.iconClass} title={t(preset.signedOut.title)} description={t(preset.signedOut.description)}>\n <TransactionDialog tx={tx} title={t(preset.dialog.title)} workingLabel={t(preset.dialog.workingLabel)} firstStepLabel={t(preset.dialog.firstStepLabel)}>\n <TransactionSuccess\n name={name || t(preset.success.fallbackName)}\n image={imagePreview}\n title={t(preset.success.title)}\n description={t(preset.success.description)}\n actions={[actions.primary, actions.secondary, { label: t(preset.success.againLabel), onClick: handleAgain }]}\n >\n <RewardEarned actionType={t(preset.success.reward)} />\n </TransactionSuccess>\n </TransactionDialog>\n\n <ClaimRouteShell\n icon={<Icon className=\"h-4 w-4 text-white\" />}\n title={t(preset.shell.title)}\n subtitle={t(preset.shell.subtitle)}\n aside={\n <>\n <MedialaneCollectionCard\n image={imagePreview}\n name={name}\n collection={form.watch(\"symbol\") || preset.cardFallbackSymbol}\n creator={walletAddress ? `${walletAddress.slice(0, 6)}…${walletAddress.slice(-4)}` : undefined}\n creatorHref={walletAddress ? profileHref({ address: walletAddress }) : undefined}\n />\n {aside}\n </>\n }\n >\n <Form {...form}>\n <form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-5\">\n <div className=\"space-y-2\">\n <p className=\"text-sm font-medium\">{copy.imageHeading}</p>\n <div className=\"flex items-start gap-4\">\n <div\n className=\"relative h-28 w-28 rounded-xl border-2 border-dashed border-border bg-muted flex items-center justify-center overflow-hidden shrink-0 cursor-pointer hover:border-primary/50 transition-colors\"\n role=\"button\"\n tabIndex={0}\n aria-label={`Upload ${copy.imageHeading.toLowerCase()}`}\n onClick={() => !imageUploading && fileInputRef.current?.click()}\n onKeyDown={(e) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n if (!imageUploading) fileInputRef.current?.click();\n }\n }}\n >\n {imagePreview ? (\n <Image src={imagePreview} alt={copy.imageHeading} fill unoptimized className=\"object-cover\" />\n ) : (\n <ImagePlus className=\"h-8 w-8 text-muted-foreground\" />\n )}\n {imageUploading && (\n <div className=\"absolute inset-0 bg-background/70 flex items-center justify-center\">\n <Loader2 className=\"h-5 w-5 animate-spin text-primary\" />\n </div>\n )}\n </div>\n <div className=\"space-y-2 flex-1\">\n <input\n ref={fileInputRef}\n type=\"file\"\n accept={acceptFor(\"image\")}\n className=\"hidden\"\n onChange={(e) => {\n const f = e.target.files?.[0];\n if (f) void handleImageSelect(f);\n }}\n />\n <Button type=\"button\" variant=\"outline\" size=\"sm\" disabled={imageUploading} onClick={() => fileInputRef.current?.click()}>\n {imageUploading ? (\n <>\n <Loader2 className=\"h-3.5 w-3.5 mr-1.5 animate-spin\" />\n {t(\"Uploading…\")}\n </>\n ) : imageFile ? (\n t(\"Change image\")\n ) : (\n t(\"Upload image\")\n )}\n </Button>\n {imageFile && (\n <button\n type=\"button\"\n onClick={clearImage}\n className=\"flex items-center gap-1 text-xs text-muted-foreground hover:text-destructive transition-colors\"\n >\n <X className=\"h-3 w-3\" /> {t(\"Remove\")}\n </button>\n )}\n <p className=\"text-xs text-muted-foreground\">\n {t(\"JPG, PNG, GIF, SVG or WebP\")}\n {imageUri && <span className=\"ml-2 text-emerald-500 font-medium\">{t(\"✓ Uploaded\")}</span>}\n </p>\n {copy.imageHelp && <p className=\"text-xs text-muted-foreground\">{copy.imageHelp}</p>}\n {uploadError && <p className=\"text-xs text-destructive\">{uploadError}</p>}\n </div>\n </div>\n </div>\n\n <FormField control={form.control} name=\"name\" render={({ field }) => (\n <FormItem>\n <FormLabel>{copy.nameLabel}</FormLabel>\n <FormControl><Input placeholder={copy.namePlaceholder} {...field} /></FormControl>\n <FormDescription>{copy.nameHint}</FormDescription>\n <FormMessage />\n </FormItem>\n )} />\n\n <FormField control={form.control} name=\"symbol\" render={({ field }) => (\n <FormItem>\n <FormLabel>{t(\"Symbol *\")}</FormLabel>\n <FormControl>\n <Input\n placeholder={copy.symbolPlaceholder}\n maxLength={FIELD_LIMITS.symbol}\n {...field}\n onChange={(e) => field.onChange(e.target.value.toUpperCase())}\n />\n </FormControl>\n <FormDescription>{copy.symbolHint}</FormDescription>\n <FormMessage />\n </FormItem>\n )} />\n\n <FormField control={form.control} name=\"description\" render={({ field }) => (\n <FormItem>\n <FormLabel>{t(\"Description\")} <span className=\"text-muted-foreground font-normal\">{t(\"(optional)\")}</span></FormLabel>\n <FormControl><Textarea placeholder={copy.descriptionPlaceholder} rows={3} {...field} /></FormControl>\n {copy.descriptionHint && <FormDescription>{copy.descriptionHint}</FormDescription>}\n <FormMessage />\n </FormItem>\n )} />\n\n <ExternalLinkField form={form} address={walletAddress} />\n\n <button\n type=\"submit\"\n disabled={busy}\n className={`w-full h-12 text-base font-semibold text-white rounded-xl flex items-center justify-center gap-2 transition-all hover:brightness-110 active:scale-[0.98] ${preset.buttonClass} ${busy ? \"opacity-40 pointer-events-none\" : \"\"}`}\n >\n <Icon className=\"h-4 w-4\" />\n {copy.submit}\n </button>\n {copy.footnotes.map((note) => (\n <p key={note} className=\"text-xs text-center text-muted-foreground\">{note}</p>\n ))}\n </form>\n </Form>\n </ClaimRouteShell>\n </WalletRequired>\n );\n}\n"],"mappings":";AAuJU,SASA,UATA,KASA,YATA;AArJV,SAAS,WAAW,gBAAgC;AACpD,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,YAAY,OAAO;AACnB,SAAS,WAAW,SAAS,SAAS;AACtC,SAAS,yBAAyB,gBAAgB,gBAAgB,mBAAmB;AACrF,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,0BAA0B,8BAA8B,qCAAqC;AAC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,iBAAgB;AAAA,YAChE,oBAAC,eAAY;AAAA,aACf,GACC;AAAA,UAEH,oBAAC,qBAAkB,MAAY,SAAS,eAAe;AAAA,UAEvD;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,UAAU;AAAA,cACV,WAAW,4JAA4J,OAAO,WAAW,IAAI,OAAO,mCAAmC,EAAE;AAAA,cAEzO;AAAA,oCAAC,QAAK,WAAU,WAAU;AAAA,gBACzB,KAAK;AAAA;AAAA;AAAA,UACR;AAAA,UACC,KAAK,UAAU,IAAI,CAAC,SACnB,oBAAC,OAAa,WAAU,6CAA6C,kBAA7D,IAAkE,CAC3E;AAAA,WACH,GACF;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/launchpad/collection-create-form.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState, type ReactNode } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport * as z from \"zod\";\nimport { ImagePlus, Loader2, X } from \"lucide-react\";\nimport { buildCollectionMetadata, collectionHref, getCoordinates, profileHref } from \"@medialane/sdk\";\nimport { acceptFor } from \"../../utils/upload-limits.js\";\nimport { FIELD_LIMITS } from \"../../utils/field-limits.js\";\nimport { createdCollectionAddress, createdCollectionFromReceipt, deployedCollectionFromReceipt } from \"@medialane/sdk/starknet\";\nimport Image from \"../image.js\";\nimport { Button } from \"../button.js\";\nimport { ActionButton } from \"../action-button.js\";\nimport { Input } from \"../input.js\";\nimport { Textarea } from \"../textarea.js\";\nimport { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from \"../form.js\";\nimport { ClaimRouteShell } from \"../claim-route-shell.js\";\nimport { TransactionSuccess } from \"../transaction-success.js\";\nimport { ExternalLinkField } from \"../external-link-field.js\";\nimport { MedialaneCollectionCard } from \"../medialane-collection-card.js\";\nimport { TransactionDialog } from \"../transaction-dialog.js\";\nimport { WalletRequired } from \"../wallet-required.js\";\nimport { useMedialaneApp } from \"../medialane-app.js\";\nimport { RewardEarned } from \"../rewards/reward-earned.js\";\nimport { runIntentCalls } from \"../../utils/run-intent-calls.js\";\nimport { serviceCollectionIntent } from \"../../utils/launchpad-actions.js\";\nimport { uploadJsonToIpfs } from \"../../utils/ipfs-upload.js\";\nimport { useTransaction } from \"../../utils/use-transaction.js\";\nimport { useLaunchpadImageUpload } from \"../../utils/use-launchpad-image-upload.js\";\nimport { invalidatePortfolioCache } from \"../../utils/portfolio-cache.js\";\nimport { suggestLaunchpadSymbol } from \"../../utils/launchpad-defaults.js\";\nimport { symbolField, webLinkField } from \"../../utils/launchpad-rules.js\";\nimport type { CollectionCreatePreset } from \"./collection-create-presets.js\";\nimport { useT } from \"../../i18n/provider.js\";\n\nconst schema = z.object({\n name: z.string().min(1, \"Name required\").max(FIELD_LIMITS.name),\n symbol: symbolField(),\n description: z.string().max(FIELD_LIMITS.description).optional(),\n external_link: webLinkField(),\n});\ntype FormValues = z.infer<typeof schema>;\n\nexport interface CollectionCreateFormProps {\n preset: CollectionCreatePreset;\n aside?: ReactNode;\n}\n\nexport function CollectionCreateForm({ preset, aside }: CollectionCreateFormProps) {\n const t = useT();\n const app = useMedialaneApp();\n const walletAddress = app.walletAddress;\n const tx = useTransaction();\n const upload = useLaunchpadImageUpload({ successMessage: t(\"Image uploaded\") });\n const { imageFile, imagePreview, imageUri, imageUploading, uploadError, fileInputRef, handleImageSelect, clearImage } = upload;\n const [autoSymbol, setAutoSymbol] = useState(\"\");\n const [viewHref, setViewHref] = useState<string | null>(null);\n const Icon = preset.icon;\n\n const form = useForm<FormValues>({\n resolver: zodResolver(schema),\n defaultValues: { name: \"\", symbol: \"\", description: \"\", external_link: \"\" },\n });\n const name = form.watch(\"name\");\n\n useEffect(() => {\n if (!preset.suggestSymbol) return;\n const suggested = suggestLaunchpadSymbol(name);\n if (!suggested) return;\n const current = form.getValues(\"symbol\");\n if (!current || current === autoSymbol) {\n form.setValue(\"symbol\", suggested, { shouldDirty: false });\n setAutoSymbol(suggested);\n }\n }, [autoSymbol, name, form, preset.suggestSymbol]);\n\n const deployedAddress =\n tx.receipt && preset.service ? deployedCollectionFromReceipt(tx.receipt, preset.service) : null;\n const createdId =\n tx.receipt && !preset.service ? createdCollectionFromReceipt(tx.receipt, getCoordinates(\"STARKNET\").collection721)?.collectionId ?? null : null;\n\n useEffect(() => {\n if (tx.phase !== \"success\") return;\n let alive = true;\n const client = app.getClient();\n if (deployedAddress) {\n setViewHref(collectionHref(\"STARKNET\", deployedAddress));\n if (preset.registerAfterDeploy) void client.api.collections.register(deployedAddress).catch(() => {});\n } else if (createdId) {\n createdCollectionAddress(client.provider, getCoordinates(\"STARKNET\").collection721, createdId)\n .then((address) => {\n if (alive && address) setViewHref(collectionHref(\"STARKNET\", address));\n })\n .catch(() => {});\n }\n return () => {\n alive = false;\n };\n }, [tx.phase, deployedAddress, createdId, app, preset.registerAfterDeploy]);\n\n const handleAgain = () => {\n tx.reset();\n setViewHref(null);\n setAutoSymbol(\"\");\n form.reset();\n clearImage();\n };\n\n const onSubmit = (values: FormValues) => {\n if (imageFile && !imageUri && !imageUploading) return;\n if (!walletAddress) return;\n void tx.run(async (signer) => {\n await app.ensureSignedIn?.();\n const api = app.getClient().api;\n const baseUri = await uploadJsonToIpfs(\n api,\n buildCollectionMetadata({\n name: values.name,\n description: values.description,\n image: imageUri,\n externalLink: values.external_link,\n owner: walletAddress,\n }),\n );\n await runIntentCalls(signer, () =>\n serviceCollectionIntent(api, {\n owner: walletAddress,\n name: values.name,\n symbol: values.symbol,\n baseUri,\n service: preset.service ?? undefined,\n }),\n );\n invalidatePortfolioCache(walletAddress);\n });\n };\n\n const { copy } = preset;\n const busy = tx.phase !== \"idle\" || imageUploading;\n const actions = preset.actions({ address: deployedAddress, collectionHref: viewHref });\n\n return (\n <WalletRequired icon={Icon} iconClassName={preset.iconClass} title={t(preset.signedOut.title)} description={t(preset.signedOut.description)}>\n <TransactionDialog tx={tx} title={t(preset.dialog.title)} workingLabel={t(preset.dialog.workingLabel)} firstStepLabel={t(preset.dialog.firstStepLabel)}>\n <TransactionSuccess\n name={name || t(preset.success.fallbackName)}\n image={imagePreview}\n title={t(preset.success.title)}\n description={t(preset.success.description)}\n actions={[actions.primary, actions.secondary, { label: t(preset.success.againLabel), onClick: handleAgain }]}\n >\n <RewardEarned actionType={t(preset.success.reward)} />\n </TransactionSuccess>\n </TransactionDialog>\n\n <ClaimRouteShell\n icon={<Icon className=\"h-4 w-4 text-white\" />}\n title={t(preset.shell.title)}\n subtitle={t(preset.shell.subtitle)}\n aside={\n <>\n <MedialaneCollectionCard\n image={imagePreview}\n name={name}\n collection={form.watch(\"symbol\") || preset.cardFallbackSymbol}\n creator={walletAddress ? `${walletAddress.slice(0, 6)}…${walletAddress.slice(-4)}` : undefined}\n creatorHref={walletAddress ? profileHref({ address: walletAddress }) : undefined}\n />\n {aside}\n </>\n }\n >\n <Form {...form}>\n <form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-5\">\n <div className=\"space-y-2\">\n <p className=\"text-sm font-medium\">{copy.imageHeading}</p>\n <div className=\"flex items-start gap-4\">\n <div\n className=\"relative h-28 w-28 rounded-xl border-2 border-dashed border-border bg-muted flex items-center justify-center overflow-hidden shrink-0 cursor-pointer hover:border-primary/50 transition-colors\"\n role=\"button\"\n tabIndex={0}\n aria-label={`Upload ${copy.imageHeading.toLowerCase()}`}\n onClick={() => !imageUploading && fileInputRef.current?.click()}\n onKeyDown={(e) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n if (!imageUploading) fileInputRef.current?.click();\n }\n }}\n >\n {imagePreview ? (\n <Image src={imagePreview} alt={copy.imageHeading} fill unoptimized className=\"object-cover\" />\n ) : (\n <ImagePlus className=\"h-8 w-8 text-muted-foreground\" />\n )}\n {imageUploading && (\n <div className=\"absolute inset-0 bg-background/70 flex items-center justify-center\">\n <Loader2 className=\"h-5 w-5 animate-spin text-primary\" />\n </div>\n )}\n </div>\n <div className=\"space-y-2 flex-1\">\n <input\n ref={fileInputRef}\n type=\"file\"\n accept={acceptFor(\"image\")}\n className=\"hidden\"\n onChange={(e) => {\n const f = e.target.files?.[0];\n if (f) void handleImageSelect(f);\n }}\n />\n <Button type=\"button\" variant=\"soft\" size=\"sm\" disabled={imageUploading} onClick={() => fileInputRef.current?.click()}>\n {imageUploading ? (\n <>\n <Loader2 className=\"h-3.5 w-3.5 mr-1.5 animate-spin\" />\n {t(\"Uploading…\")}\n </>\n ) : imageFile ? (\n t(\"Change image\")\n ) : (\n t(\"Upload image\")\n )}\n </Button>\n {imageFile && (\n <button\n type=\"button\"\n onClick={clearImage}\n className=\"flex items-center gap-1 text-xs text-muted-foreground hover:text-destructive transition-colors\"\n >\n <X className=\"h-3 w-3\" /> {t(\"Remove\")}\n </button>\n )}\n <p className=\"text-xs text-muted-foreground\">\n {t(\"JPG, PNG, GIF, SVG or WebP\")}\n {imageUri && <span className=\"ml-2 text-emerald-500 font-medium\">{t(\"✓ Uploaded\")}</span>}\n </p>\n {copy.imageHelp && <p className=\"text-xs text-muted-foreground\">{copy.imageHelp}</p>}\n {uploadError && <p className=\"text-xs text-destructive\">{uploadError}</p>}\n </div>\n </div>\n </div>\n\n <FormField control={form.control} name=\"name\" render={({ field }) => (\n <FormItem>\n <FormLabel>{copy.nameLabel}</FormLabel>\n <FormControl><Input placeholder={copy.namePlaceholder} {...field} /></FormControl>\n <FormDescription>{copy.nameHint}</FormDescription>\n <FormMessage />\n </FormItem>\n )} />\n\n <FormField control={form.control} name=\"symbol\" render={({ field }) => (\n <FormItem>\n <FormLabel>{t(\"Symbol *\")}</FormLabel>\n <FormControl>\n <Input\n placeholder={copy.symbolPlaceholder}\n maxLength={FIELD_LIMITS.symbol}\n {...field}\n onChange={(e) => field.onChange(e.target.value.toUpperCase())}\n />\n </FormControl>\n <FormDescription>{copy.symbolHint}</FormDescription>\n <FormMessage />\n </FormItem>\n )} />\n\n <FormField control={form.control} name=\"description\" render={({ field }) => (\n <FormItem>\n <FormLabel>{t(\"Description\")} <span className=\"text-muted-foreground font-normal\">{t(\"(optional)\")}</span></FormLabel>\n <FormControl><Textarea placeholder={copy.descriptionPlaceholder} rows={3} {...field} /></FormControl>\n {copy.descriptionHint && <FormDescription>{copy.descriptionHint}</FormDescription>}\n <FormMessage />\n </FormItem>\n )} />\n\n <ExternalLinkField form={form} address={walletAddress} />\n\n <ActionButton solid big type=\"submit\" disabled={busy} icon={<Icon className=\"h-4 w-4\" />} className=\"w-full\"> {copy.submit} </ActionButton>\n {copy.footnotes.map((note) => (\n <p key={note} className=\"text-xs text-center text-muted-foreground\">{note}</p>\n ))}\n </form>\n </Form>\n </ClaimRouteShell>\n </WalletRequired>\n );\n}\n"],"mappings":";AAwJU,SASA,UATA,KASA,YATA;AAtJV,SAAS,WAAW,gBAAgC;AACpD,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,YAAY,OAAO;AACnB,SAAS,WAAW,SAAS,SAAS;AACtC,SAAS,yBAAyB,gBAAgB,gBAAgB,mBAAmB;AACrF,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,0BAA0B,8BAA8B,qCAAqC;AACtG,OAAO,WAAW;AAClB,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,MAAM,aAAa,iBAAiB,WAAW,UAAU,WAAW,mBAAmB;AAChG,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,yBAAyB;AAClC,SAAS,+BAA+B;AACxC,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,+BAA+B;AACxC,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,+BAA+B;AACxC,SAAS,gCAAgC;AACzC,SAAS,8BAA8B;AACvC,SAAS,aAAa,oBAAoB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ip-club",
32
32
  icon: import_lucide_react.Users,
33
33
  iconClass: "text-brand-purple",
34
- buttonClass: "bg-brand-purple",
35
34
  signedOut: { title: (0, import_translate.msg)("Secure your account to create a club"), description: (0, import_translate.msg)("Create a club, then mint membership cards for your community.") },
36
35
  shell: { title: (0, import_translate.msg)("Create club"), subtitle: (0, import_translate.msg)("One club \u2014 create membership tiers and mint cards to your community.") },
37
36
  dialog: { title: (0, import_translate.msg)("Create club"), workingLabel: (0, import_translate.msg)("Creating your club\u2026"), firstStepLabel: (0, import_translate.msg)("Prepare metadata") },
@@ -56,7 +55,6 @@ const TICKETS_PRESET = {
56
55
  service: "ip-tickets",
57
56
  icon: import_lucide_react.Ticket,
58
57
  iconClass: "text-teal-500",
59
- buttonClass: "bg-teal-600",
60
58
  signedOut: { title: (0, import_translate.msg)("Secure your account to create tickets"), description: (0, import_translate.msg)("Create a tickets collection, then mint tickets to your audience.") },
61
59
  shell: { title: (0, import_translate.msg)("Create ticket collection"), subtitle: (0, import_translate.msg)("One collection \u2014 create tickets and mint them to your audience.") },
62
60
  dialog: { title: (0, import_translate.msg)("Create tickets collection"), workingLabel: (0, import_translate.msg)("Creating your collection\u2026"), firstStepLabel: (0, import_translate.msg)("Prepare metadata") },
@@ -81,7 +79,6 @@ const EDITIONS_PRESET = {
81
79
  service: "mip-erc1155",
82
80
  icon: import_lucide_react.Layers,
83
81
  iconClass: "text-brand-purple",
84
- buttonClass: "bg-brand-purple",
85
82
  signedOut: { title: (0, import_translate.msg)("Secure your account to create a collection"), description: (0, import_translate.msg)("Create a collection where each piece can have multiple editions.") },
86
83
  shell: { title: (0, import_translate.msg)("Create an edition collection"), subtitle: (0, import_translate.msg)("Create a collection where each piece can have multiple editions \u2014 free to publish, and it's yours.") },
87
84
  dialog: { title: (0, import_translate.msg)("Create collection"), workingLabel: (0, import_translate.msg)("Creating your collection\u2026"), firstStepLabel: (0, import_translate.msg)("Prepare metadata") },
@@ -114,7 +111,6 @@ const SINGLE_PRESET = {
114
111
  service: null,
115
112
  icon: import_lucide_react.Layers,
116
113
  iconClass: "text-brand-blue",
117
- buttonClass: "bg-brand-blue",
118
114
  signedOut: { title: (0, import_translate.msg)("Secure your account to create a collection"), description: (0, import_translate.msg)("Set up a collection to mint your work into.") },
119
115
  shell: { title: (0, import_translate.msg)("Create a collection"), subtitle: (0, import_translate.msg)("Set up a collection to mint your work into \u2014 free to publish, and it's yours.") },
120
116
  dialog: { title: (0, import_translate.msg)("Create collection"), workingLabel: (0, import_translate.msg)("Creating your collection\u2026"), firstStepLabel: (0, import_translate.msg)("Prepare metadata") },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/launchpad/collection-create-presets.ts"],"sourcesContent":["import { Layers, Ticket, Users } from \"lucide-react\";\nimport type { ElementType } from \"react\";\nimport { msg } from \"../../i18n/translate.js\";\n\nexport interface CollectionCreateAction {\n href: string;\n label: string;\n}\n\nexport interface CollectionCreatePreset {\n service: \"ip-club\" | \"ip-tickets\" | \"mip-erc1155\" | null;\n icon: ElementType;\n iconClass: string;\n buttonClass: string;\n signedOut: { title: string; description: string };\n shell: { title: string; subtitle: string };\n dialog: { title: string; workingLabel: string; firstStepLabel: string };\n success: { title: string; description: string; fallbackName: string; reward: string; againLabel: string };\n cardFallbackSymbol: string;\n copy: {\n imageHeading: string;\n imageHelp?: string;\n nameLabel: string;\n namePlaceholder: string;\n nameHint: string;\n symbolPlaceholder: string;\n symbolHint: string;\n descriptionPlaceholder: string;\n descriptionHint?: string;\n submit: string;\n footnotes: string[];\n };\n suggestSymbol: boolean;\n registerAfterDeploy: boolean;\n actions: (found: { address: string | null; collectionHref: string | null }) => {\n primary?: CollectionCreateAction;\n secondary?: CollectionCreateAction;\n };\n}\n\nconst FREE = \"Free to publish — protocol fee is zero.\";\n\nexport const CLUB_PRESET: CollectionCreatePreset = {\n service: \"ip-club\",\n icon: Users,\n iconClass: \"text-brand-purple\",\n buttonClass: \"bg-brand-purple\",\n signedOut: { title: msg(\"Secure your account to create a club\"), description: msg(\"Create a club, then mint membership cards for your community.\") },\n shell: { title: msg(\"Create club\"), subtitle: msg(\"One club — create membership tiers and mint cards to your community.\") },\n dialog: { title: msg(\"Create club\"), workingLabel: msg(\"Creating your club…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Club created\"), description: msg(\"Each membership you create is recorded onchain under your wallet.\"), fallbackName: msg(\"Your club\"), reward: msg(\"create_club\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Club\",\n copy: {\n imageHeading: msg(\"Club image\"),\n nameLabel: msg(\"Club name *\"),\n namePlaceholder: msg(\"My Club\"),\n nameHint: msg(\"Shown in wallets, explorers, and on every membership card.\"),\n symbolPlaceholder: msg(\"CLUB\"),\n symbolHint: msg(\"Short ticker — 2 to 10 uppercase letters.\"),\n descriptionPlaceholder: msg(\"Describe your club — what does membership unlock?\"),\n submit: msg(\"Create club\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => ({ primary: collectionHref ? { href: collectionHref, label: msg(\"Create memberships\") } : undefined }),\n};\n\nexport const TICKETS_PRESET: CollectionCreatePreset = {\n service: \"ip-tickets\",\n icon: Ticket,\n iconClass: \"text-teal-500\",\n buttonClass: \"bg-teal-600\",\n signedOut: { title: msg(\"Secure your account to create tickets\"), description: msg(\"Create a tickets collection, then mint tickets to your audience.\") },\n shell: { title: msg(\"Create ticket collection\"), subtitle: msg(\"One collection — create tickets and mint them to your audience.\") },\n dialog: { title: msg(\"Create tickets collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Ticket collection created\"), description: msg(\"Each ticket you mint into it is recorded onchain under your wallet.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_ticket_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Tickets\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My tickets\"),\n nameHint: msg(\"Shown in wallets, explorers, and on every ticket.\"),\n symbolPlaceholder: msg(\"TIX\"),\n symbolHint: msg(\"Short ticker — 2 to 10 uppercase letters.\"),\n descriptionPlaceholder: msg(\"Describe your tickets — what do they admit or unlock?\"),\n submit: msg(\"Create ticket collection\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => ({ primary: collectionHref ? { href: collectionHref, label: msg(\"Create tickets\") } : undefined }),\n};\n\nexport const EDITIONS_PRESET: CollectionCreatePreset = {\n service: \"mip-erc1155\",\n icon: Layers,\n iconClass: \"text-brand-purple\",\n buttonClass: \"bg-brand-purple\",\n signedOut: { title: msg(\"Secure your account to create a collection\"), description: msg(\"Create a collection where each piece can have multiple editions.\") },\n shell: { title: msg(\"Create an edition collection\"), subtitle: msg(\"Create a collection where each piece can have multiple editions — free to publish, and it's yours.\") },\n dialog: { title: msg(\"Create collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Collection created\"), description: msg(\"Each asset you mint into it carries its own license terms.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Editions\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n imageHelp: msg(\"This becomes the cover for your collection.\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My Creative Works\"),\n nameHint: msg(\"The main title collectors see across the collection page, wallets, and future listings.\"),\n symbolPlaceholder: msg(\"MCW\"),\n symbolHint: msg(\"Short ticker (2–10 uppercase letters). We suggest one from the collection name.\"),\n descriptionPlaceholder: msg(\"Describe your collection and what kind of work it contains…\"),\n descriptionHint: msg(\"Use this to explain the creative direction, media type, or audience for the collection.\"),\n submit: msg(\"Publish collection\"),\n footnotes: [\n FREE,\n msg(\"Next step: mint pieces into this collection — you set the number of copies for each piece when you mint it, and can add more copies later.\"),\n ],\n },\n suggestSymbol: true,\n registerAfterDeploy: true,\n actions: ({ address, collectionHref }) => ({\n primary: address ? { href: `/launchpad/nfteditions/${address}/mint`, label: msg(\"Mint tokens\") } : undefined,\n secondary: collectionHref ? { href: collectionHref, label: msg(\"View collection\") } : undefined,\n }),\n};\n\nexport const SINGLE_PRESET: CollectionCreatePreset = {\n service: null,\n icon: Layers,\n iconClass: \"text-brand-blue\",\n buttonClass: \"bg-brand-blue\",\n signedOut: { title: msg(\"Secure your account to create a collection\"), description: msg(\"Set up a collection to mint your work into.\") },\n shell: { title: msg(\"Create a collection\"), subtitle: msg(\"Set up a collection to mint your work into — free to publish, and it's yours.\") },\n dialog: { title: msg(\"Create collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Collection created\"), description: msg(\"Each asset you mint into it carries its own license terms.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Collection\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My Creative Works\"),\n nameHint: msg(\"The display name for your collection.\"),\n symbolPlaceholder: msg(\"MCW\"),\n symbolHint: msg(\"Short ticker (2–10 uppercase letters). Shown in wallets and marketplaces.\"),\n descriptionPlaceholder: msg(\"Describe your collection and what kind of work it contains…\"),\n submit: msg(\"Create collection\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => {\n const mint = { href: \"/launchpad/single-editions\", label: msg(\"Mint an asset\") };\n return collectionHref ? { primary: { href: collectionHref, label: msg(\"View collection\") }, secondary: mint } : { primary: mint };\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAsC;AAEtC,uBAAoB;AAsCpB,MAAM,OAAO;AAEN,MAAM,cAAsC;AAAA,EAC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AA,EACnI,SAAS,EAAE,WAAO,sBAAI,oBAAoB,GAAG,iBAAa,sBAAI,4DAA4D,GAAG,kBAAc,sBAAI,iBAAiB,GAAG,YAAQ,sBAAI,mBAAmB,GAAG,gBAAY,sBAAI,gBAAgB,EAAE;AAAA,EACvO,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,kBAAc,sBAAI,kBAAkB;AAAA,IACpC,eAAW,sBAAI,mBAAmB;AAAA,IAClC,qBAAiB,sBAAI,mBAAmB;AAAA,IACxC,cAAU,sBAAI,uCAAuC;AAAA,IACrD,uBAAmB,sBAAI,KAAK;AAAA,IAC5B,gBAAY,sBAAI,gFAA2E;AAAA,IAC3F,4BAAwB,sBAAI,kEAA6D;AAAA,IACzF,YAAQ,sBAAI,mBAAmB;AAAA,IAC/B,WAAW,CAAC,IAAI;AAAA,EAClB;AAAA,EACA,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,SAAS,CAAC,EAAE,eAAe,MAAM;AAC/B,UAAM,OAAO,EAAE,MAAM,8BAA8B,WAAO,sBAAI,eAAe,EAAE;AAC/E,WAAO,iBAAiB,EAAE,SAAS,EAAE,MAAM,gBAAgB,WAAO,sBAAI,iBAAiB,EAAE,GAAG,WAAW,KAAK,IAAI,EAAE,SAAS,KAAK;AAAA,EAClI;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/launchpad/collection-create-presets.ts"],"sourcesContent":["import { Layers, Ticket, Users } from \"lucide-react\";\nimport type { ElementType } from \"react\";\nimport { msg } from \"../../i18n/translate.js\";\n\nexport interface CollectionCreateAction {\n href: string;\n label: string;\n}\n\nexport interface CollectionCreatePreset {\n service: \"ip-club\" | \"ip-tickets\" | \"mip-erc1155\" | null;\n icon: ElementType;\n iconClass: string;\n signedOut: { title: string; description: string };\n shell: { title: string; subtitle: string };\n dialog: { title: string; workingLabel: string; firstStepLabel: string };\n success: { title: string; description: string; fallbackName: string; reward: string; againLabel: string };\n cardFallbackSymbol: string;\n copy: {\n imageHeading: string;\n imageHelp?: string;\n nameLabel: string;\n namePlaceholder: string;\n nameHint: string;\n symbolPlaceholder: string;\n symbolHint: string;\n descriptionPlaceholder: string;\n descriptionHint?: string;\n submit: string;\n footnotes: string[];\n };\n suggestSymbol: boolean;\n registerAfterDeploy: boolean;\n actions: (found: { address: string | null; collectionHref: string | null }) => {\n primary?: CollectionCreateAction;\n secondary?: CollectionCreateAction;\n };\n}\n\nconst FREE = \"Free to publish — protocol fee is zero.\";\n\nexport const CLUB_PRESET: CollectionCreatePreset = {\n service: \"ip-club\",\n icon: Users,\n iconClass: \"text-brand-purple\",\n signedOut: { title: msg(\"Secure your account to create a club\"), description: msg(\"Create a club, then mint membership cards for your community.\") },\n shell: { title: msg(\"Create club\"), subtitle: msg(\"One club — create membership tiers and mint cards to your community.\") },\n dialog: { title: msg(\"Create club\"), workingLabel: msg(\"Creating your club…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Club created\"), description: msg(\"Each membership you create is recorded onchain under your wallet.\"), fallbackName: msg(\"Your club\"), reward: msg(\"create_club\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Club\",\n copy: {\n imageHeading: msg(\"Club image\"),\n nameLabel: msg(\"Club name *\"),\n namePlaceholder: msg(\"My Club\"),\n nameHint: msg(\"Shown in wallets, explorers, and on every membership card.\"),\n symbolPlaceholder: msg(\"CLUB\"),\n symbolHint: msg(\"Short ticker — 2 to 10 uppercase letters.\"),\n descriptionPlaceholder: msg(\"Describe your club — what does membership unlock?\"),\n submit: msg(\"Create club\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => ({ primary: collectionHref ? { href: collectionHref, label: msg(\"Create memberships\") } : undefined }),\n};\n\nexport const TICKETS_PRESET: CollectionCreatePreset = {\n service: \"ip-tickets\",\n icon: Ticket,\n iconClass: \"text-teal-500\",\n signedOut: { title: msg(\"Secure your account to create tickets\"), description: msg(\"Create a tickets collection, then mint tickets to your audience.\") },\n shell: { title: msg(\"Create ticket collection\"), subtitle: msg(\"One collection — create tickets and mint them to your audience.\") },\n dialog: { title: msg(\"Create tickets collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Ticket collection created\"), description: msg(\"Each ticket you mint into it is recorded onchain under your wallet.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_ticket_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Tickets\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My tickets\"),\n nameHint: msg(\"Shown in wallets, explorers, and on every ticket.\"),\n symbolPlaceholder: msg(\"TIX\"),\n symbolHint: msg(\"Short ticker — 2 to 10 uppercase letters.\"),\n descriptionPlaceholder: msg(\"Describe your tickets — what do they admit or unlock?\"),\n submit: msg(\"Create ticket collection\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => ({ primary: collectionHref ? { href: collectionHref, label: msg(\"Create tickets\") } : undefined }),\n};\n\nexport const EDITIONS_PRESET: CollectionCreatePreset = {\n service: \"mip-erc1155\",\n icon: Layers,\n iconClass: \"text-brand-purple\",\n signedOut: { title: msg(\"Secure your account to create a collection\"), description: msg(\"Create a collection where each piece can have multiple editions.\") },\n shell: { title: msg(\"Create an edition collection\"), subtitle: msg(\"Create a collection where each piece can have multiple editions — free to publish, and it's yours.\") },\n dialog: { title: msg(\"Create collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Collection created\"), description: msg(\"Each asset you mint into it carries its own license terms.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Editions\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n imageHelp: msg(\"This becomes the cover for your collection.\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My Creative Works\"),\n nameHint: msg(\"The main title collectors see across the collection page, wallets, and future listings.\"),\n symbolPlaceholder: msg(\"MCW\"),\n symbolHint: msg(\"Short ticker (2–10 uppercase letters). We suggest one from the collection name.\"),\n descriptionPlaceholder: msg(\"Describe your collection and what kind of work it contains…\"),\n descriptionHint: msg(\"Use this to explain the creative direction, media type, or audience for the collection.\"),\n submit: msg(\"Publish collection\"),\n footnotes: [\n FREE,\n msg(\"Next step: mint pieces into this collection — you set the number of copies for each piece when you mint it, and can add more copies later.\"),\n ],\n },\n suggestSymbol: true,\n registerAfterDeploy: true,\n actions: ({ address, collectionHref }) => ({\n primary: address ? { href: `/launchpad/nfteditions/${address}/mint`, label: msg(\"Mint tokens\") } : undefined,\n secondary: collectionHref ? { href: collectionHref, label: msg(\"View collection\") } : undefined,\n }),\n};\n\nexport const SINGLE_PRESET: CollectionCreatePreset = {\n service: null,\n icon: Layers,\n iconClass: \"text-brand-blue\",\n signedOut: { title: msg(\"Secure your account to create a collection\"), description: msg(\"Set up a collection to mint your work into.\") },\n shell: { title: msg(\"Create a collection\"), subtitle: msg(\"Set up a collection to mint your work into — free to publish, and it's yours.\") },\n dialog: { title: msg(\"Create collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Collection created\"), description: msg(\"Each asset you mint into it carries its own license terms.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Collection\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My Creative Works\"),\n nameHint: msg(\"The display name for your collection.\"),\n symbolPlaceholder: msg(\"MCW\"),\n symbolHint: msg(\"Short ticker (2–10 uppercase letters). Shown in wallets and marketplaces.\"),\n descriptionPlaceholder: msg(\"Describe your collection and what kind of work it contains…\"),\n submit: msg(\"Create collection\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => {\n const mint = { href: \"/launchpad/single-editions\", label: msg(\"Mint an asset\") };\n return collectionHref ? { primary: { href: collectionHref, label: msg(\"View collection\") }, secondary: mint } : { primary: mint };\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAsC;AAEtC,uBAAoB;AAqCpB,MAAM,OAAO;AAEN,MAAM,cAAsC;AAAA,EACjD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,WAAW;AAAA,EACX,WAAW,EAAE,WAAO,sBAAI,sCAAsC,GAAG,iBAAa,sBAAI,+DAA+D,EAAE;AAAA,EACnJ,OAAO,EAAE,WAAO,sBAAI,aAAa,GAAG,cAAU,sBAAI,2EAAsE,EAAE;AAAA,EAC1H,QAAQ,EAAE,WAAO,sBAAI,aAAa,GAAG,kBAAc,sBAAI,0BAAqB,GAAG,oBAAgB,sBAAI,kBAAkB,EAAE;AAAA,EACvH,SAAS,EAAE,WAAO,sBAAI,cAAc,GAAG,iBAAa,sBAAI,mEAAmE,GAAG,kBAAc,sBAAI,WAAW,GAAG,YAAQ,sBAAI,aAAa,GAAG,gBAAY,sBAAI,gBAAgB,EAAE;AAAA,EAC5N,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,kBAAc,sBAAI,YAAY;AAAA,IAC9B,eAAW,sBAAI,aAAa;AAAA,IAC5B,qBAAiB,sBAAI,SAAS;AAAA,IAC9B,cAAU,sBAAI,4DAA4D;AAAA,IAC1E,uBAAmB,sBAAI,MAAM;AAAA,IAC7B,gBAAY,sBAAI,gDAA2C;AAAA,IAC3D,4BAAwB,sBAAI,wDAAmD;AAAA,IAC/E,YAAQ,sBAAI,aAAa;AAAA,IACzB,WAAW,CAAC,IAAI;AAAA,EAClB;AAAA,EACA,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,SAAS,CAAC,EAAE,eA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X,WAAW,EAAE,WAAO,sBAAI,4CAA4C,GAAG,iBAAa,sBAAI,6CAA6C,EAAE;AAAA,EACvI,OAAO,EAAE,WAAO,sBAAI,qBAAqB,GAAG,cAAU,sBAAI,oFAA+E,EAAE;AAAA,EAC3I,QAAQ,EAAE,WAAO,sBAAI,mBAAmB,GAAG,kBAAc,sBAAI,gCAA2B,GAAG,oBAAgB,sBAAI,kBAAkB,EAAE;AAAA,EACnI,SAAS,EAAE,WAAO,sBAAI,oBAAoB,GAAG,iBAAa,sBAAI,4DAA4D,GAAG,kBAAc,sBAAI,iBAAiB,GAAG,YAAQ,sBAAI,mBAAmB,GAAG,gBAAY,sBAAI,gBAAgB,EAAE;AAAA,EACvO,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,kBAAc,sBAAI,kBAAkB;AAAA,IACpC,eAAW,sBAAI,mBAAmB;AAAA,IAClC,qBAAiB,sBAAI,mBAAmB;AAAA,IACxC,cAAU,sBAAI,uCAAuC;AAAA,IACrD,uBAAmB,sBAAI,KAAK;AAAA,IAC5B,gBAAY,sBAAI,gFAA2E;AAAA,IAC3F,4BAAwB,sBAAI,kEAA6D;AAAA,IACzF,YAAQ,sBAAI,mBAAmB;AAAA,IAC/B,WAAW,CAAC,IAAI;AAAA,EAClB;AAAA,EACA,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,SAAS,CAAC,EAAE,eAAe,MAAM;AAC/B,UAAM,OAAO,EAAE,MAAM,8BAA8B,WAAO,sBAAI,eAAe,EAAE;AAC/E,WAAO,iBAAiB,EAAE,SAAS,EAAE,MAAM,gBAAgB,WAAO,sBAAI,iBAAiB,EAAE,GAAG,WAAW,KAAK,IAAI,EAAE,SAAS,KAAK;AAAA,EAClI;AACF;","names":[]}
@@ -8,7 +8,6 @@ interface CollectionCreatePreset {
8
8
  service: "ip-club" | "ip-tickets" | "mip-erc1155" | null;
9
9
  icon: ElementType;
10
10
  iconClass: string;
11
- buttonClass: string;
12
11
  signedOut: {
13
12
  title: string;
14
13
  description: string;
@@ -8,7 +8,6 @@ interface CollectionCreatePreset {
8
8
  service: "ip-club" | "ip-tickets" | "mip-erc1155" | null;
9
9
  icon: ElementType;
10
10
  iconClass: string;
11
- buttonClass: string;
12
11
  signedOut: {
13
12
  title: string;
14
13
  description: string;
@@ -5,7 +5,6 @@ const CLUB_PRESET = {
5
5
  service: "ip-club",
6
6
  icon: Users,
7
7
  iconClass: "text-brand-purple",
8
- buttonClass: "bg-brand-purple",
9
8
  signedOut: { title: msg("Secure your account to create a club"), description: msg("Create a club, then mint membership cards for your community.") },
10
9
  shell: { title: msg("Create club"), subtitle: msg("One club \u2014 create membership tiers and mint cards to your community.") },
11
10
  dialog: { title: msg("Create club"), workingLabel: msg("Creating your club\u2026"), firstStepLabel: msg("Prepare metadata") },
@@ -30,7 +29,6 @@ const TICKETS_PRESET = {
30
29
  service: "ip-tickets",
31
30
  icon: Ticket,
32
31
  iconClass: "text-teal-500",
33
- buttonClass: "bg-teal-600",
34
32
  signedOut: { title: msg("Secure your account to create tickets"), description: msg("Create a tickets collection, then mint tickets to your audience.") },
35
33
  shell: { title: msg("Create ticket collection"), subtitle: msg("One collection \u2014 create tickets and mint them to your audience.") },
36
34
  dialog: { title: msg("Create tickets collection"), workingLabel: msg("Creating your collection\u2026"), firstStepLabel: msg("Prepare metadata") },
@@ -55,7 +53,6 @@ const EDITIONS_PRESET = {
55
53
  service: "mip-erc1155",
56
54
  icon: Layers,
57
55
  iconClass: "text-brand-purple",
58
- buttonClass: "bg-brand-purple",
59
56
  signedOut: { title: msg("Secure your account to create a collection"), description: msg("Create a collection where each piece can have multiple editions.") },
60
57
  shell: { title: msg("Create an edition collection"), subtitle: msg("Create a collection where each piece can have multiple editions \u2014 free to publish, and it's yours.") },
61
58
  dialog: { title: msg("Create collection"), workingLabel: msg("Creating your collection\u2026"), firstStepLabel: msg("Prepare metadata") },
@@ -88,7 +85,6 @@ const SINGLE_PRESET = {
88
85
  service: null,
89
86
  icon: Layers,
90
87
  iconClass: "text-brand-blue",
91
- buttonClass: "bg-brand-blue",
92
88
  signedOut: { title: msg("Secure your account to create a collection"), description: msg("Set up a collection to mint your work into.") },
93
89
  shell: { title: msg("Create a collection"), subtitle: msg("Set up a collection to mint your work into \u2014 free to publish, and it's yours.") },
94
90
  dialog: { title: msg("Create collection"), workingLabel: msg("Creating your collection\u2026"), firstStepLabel: msg("Prepare metadata") },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/launchpad/collection-create-presets.ts"],"sourcesContent":["import { Layers, Ticket, Users } from \"lucide-react\";\nimport type { ElementType } from \"react\";\nimport { msg } from \"../../i18n/translate.js\";\n\nexport interface CollectionCreateAction {\n href: string;\n label: string;\n}\n\nexport interface CollectionCreatePreset {\n service: \"ip-club\" | \"ip-tickets\" | \"mip-erc1155\" | null;\n icon: ElementType;\n iconClass: string;\n buttonClass: string;\n signedOut: { title: string; description: string };\n shell: { title: string; subtitle: string };\n dialog: { title: string; workingLabel: string; firstStepLabel: string };\n success: { title: string; description: string; fallbackName: string; reward: string; againLabel: string };\n cardFallbackSymbol: string;\n copy: {\n imageHeading: string;\n imageHelp?: string;\n nameLabel: string;\n namePlaceholder: string;\n nameHint: string;\n symbolPlaceholder: string;\n symbolHint: string;\n descriptionPlaceholder: string;\n descriptionHint?: string;\n submit: string;\n footnotes: string[];\n };\n suggestSymbol: boolean;\n registerAfterDeploy: boolean;\n actions: (found: { address: string | null; collectionHref: string | null }) => {\n primary?: CollectionCreateAction;\n secondary?: CollectionCreateAction;\n };\n}\n\nconst FREE = \"Free to publish — protocol fee is zero.\";\n\nexport const CLUB_PRESET: CollectionCreatePreset = {\n service: \"ip-club\",\n icon: Users,\n iconClass: \"text-brand-purple\",\n buttonClass: \"bg-brand-purple\",\n signedOut: { title: msg(\"Secure your account to create a club\"), description: msg(\"Create a club, then mint membership cards for your community.\") },\n shell: { title: msg(\"Create club\"), subtitle: msg(\"One club — create membership tiers and mint cards to your community.\") },\n dialog: { title: msg(\"Create club\"), workingLabel: msg(\"Creating your club…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Club created\"), description: msg(\"Each membership you create is recorded onchain under your wallet.\"), fallbackName: msg(\"Your club\"), reward: msg(\"create_club\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Club\",\n copy: {\n imageHeading: msg(\"Club image\"),\n nameLabel: msg(\"Club name *\"),\n namePlaceholder: msg(\"My Club\"),\n nameHint: msg(\"Shown in wallets, explorers, and on every membership card.\"),\n symbolPlaceholder: msg(\"CLUB\"),\n symbolHint: msg(\"Short ticker — 2 to 10 uppercase letters.\"),\n descriptionPlaceholder: msg(\"Describe your club — what does membership unlock?\"),\n submit: msg(\"Create club\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => ({ primary: collectionHref ? { href: collectionHref, label: msg(\"Create memberships\") } : undefined }),\n};\n\nexport const TICKETS_PRESET: CollectionCreatePreset = {\n service: \"ip-tickets\",\n icon: Ticket,\n iconClass: \"text-teal-500\",\n buttonClass: \"bg-teal-600\",\n signedOut: { title: msg(\"Secure your account to create tickets\"), description: msg(\"Create a tickets collection, then mint tickets to your audience.\") },\n shell: { title: msg(\"Create ticket collection\"), subtitle: msg(\"One collection — create tickets and mint them to your audience.\") },\n dialog: { title: msg(\"Create tickets collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Ticket collection created\"), description: msg(\"Each ticket you mint into it is recorded onchain under your wallet.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_ticket_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Tickets\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My tickets\"),\n nameHint: msg(\"Shown in wallets, explorers, and on every ticket.\"),\n symbolPlaceholder: msg(\"TIX\"),\n symbolHint: msg(\"Short ticker — 2 to 10 uppercase letters.\"),\n descriptionPlaceholder: msg(\"Describe your tickets — what do they admit or unlock?\"),\n submit: msg(\"Create ticket collection\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => ({ primary: collectionHref ? { href: collectionHref, label: msg(\"Create tickets\") } : undefined }),\n};\n\nexport const EDITIONS_PRESET: CollectionCreatePreset = {\n service: \"mip-erc1155\",\n icon: Layers,\n iconClass: \"text-brand-purple\",\n buttonClass: \"bg-brand-purple\",\n signedOut: { title: msg(\"Secure your account to create a collection\"), description: msg(\"Create a collection where each piece can have multiple editions.\") },\n shell: { title: msg(\"Create an edition collection\"), subtitle: msg(\"Create a collection where each piece can have multiple editions — free to publish, and it's yours.\") },\n dialog: { title: msg(\"Create collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Collection created\"), description: msg(\"Each asset you mint into it carries its own license terms.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Editions\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n imageHelp: msg(\"This becomes the cover for your collection.\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My Creative Works\"),\n nameHint: msg(\"The main title collectors see across the collection page, wallets, and future listings.\"),\n symbolPlaceholder: msg(\"MCW\"),\n symbolHint: msg(\"Short ticker (2–10 uppercase letters). We suggest one from the collection name.\"),\n descriptionPlaceholder: msg(\"Describe your collection and what kind of work it contains…\"),\n descriptionHint: msg(\"Use this to explain the creative direction, media type, or audience for the collection.\"),\n submit: msg(\"Publish collection\"),\n footnotes: [\n FREE,\n msg(\"Next step: mint pieces into this collection — you set the number of copies for each piece when you mint it, and can add more copies later.\"),\n ],\n },\n suggestSymbol: true,\n registerAfterDeploy: true,\n actions: ({ address, collectionHref }) => ({\n primary: address ? { href: `/launchpad/nfteditions/${address}/mint`, label: msg(\"Mint tokens\") } : undefined,\n secondary: collectionHref ? { href: collectionHref, label: msg(\"View collection\") } : undefined,\n }),\n};\n\nexport const SINGLE_PRESET: CollectionCreatePreset = {\n service: null,\n icon: Layers,\n iconClass: \"text-brand-blue\",\n buttonClass: \"bg-brand-blue\",\n signedOut: { title: msg(\"Secure your account to create a collection\"), description: msg(\"Set up a collection to mint your work into.\") },\n shell: { title: msg(\"Create a collection\"), subtitle: msg(\"Set up a collection to mint your work into — free to publish, and it's yours.\") },\n dialog: { title: msg(\"Create collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Collection created\"), description: msg(\"Each asset you mint into it carries its own license terms.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Collection\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My Creative Works\"),\n nameHint: msg(\"The display name for your collection.\"),\n symbolPlaceholder: msg(\"MCW\"),\n symbolHint: msg(\"Short ticker (2–10 uppercase letters). Shown in wallets and marketplaces.\"),\n descriptionPlaceholder: msg(\"Describe your collection and what kind of work it contains…\"),\n submit: msg(\"Create collection\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => {\n const mint = { href: \"/launchpad/single-editions\", label: msg(\"Mint an asset\") };\n return collectionHref ? { primary: { href: collectionHref, label: msg(\"View collection\") }, secondary: mint } : { primary: mint };\n },\n};\n"],"mappings":"AAAA,SAAS,QAAQ,QAAQ,aAAa;AAEtC,SAAS,WAAW;AAsCpB,MAAM,OAAO;AAEN,MAAM,cAAsC;AAAA,EACjD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,WAAW;AAAA,EACX,aAAa;AAAA,EACb,WAAW,EAAE,OAAO,IAAI,sCAAsC,GAAG,aAAa,IAAI,+DAA+D,EAAE;AAAA,EACnJ,OAAO,EAAE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B,IAAI,mBAAmB;AAAA,IACxC,UAAU,IAAI,uCAAuC;AAAA,IACrD,mBAAmB,IAAI,KAAK;AAAA,IAC5B,YAAY,IAAI,gFAA2E;AAAA,IAC3F,wBAAwB,IAAI,kEAA6D;AAAA,IACzF,QAAQ,IAAI,mBAAmB;AAAA,IAC/B,WAAW,CAAC,IAAI;AAAA,EAClB;AAAA,EACA,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,SAAS,CAAC,EAAE,eAAe,MAAM;AAC/B,UAAM,OAAO,EAAE,MAAM,8BAA8B,OAAO,IAAI,eAAe,EAAE;AAC/E,WAAO,iBAAiB,EAAE,SAAS,EAAE,MAAM,gBAAgB,OAAO,IAAI,iBAAiB,EAAE,GAAG,WAAW,KAAK,IAAI,EAAE,SAAS,KAAK;AAAA,EAClI;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/launchpad/collection-create-presets.ts"],"sourcesContent":["import { Layers, Ticket, Users } from \"lucide-react\";\nimport type { ElementType } from \"react\";\nimport { msg } from \"../../i18n/translate.js\";\n\nexport interface CollectionCreateAction {\n href: string;\n label: string;\n}\n\nexport interface CollectionCreatePreset {\n service: \"ip-club\" | \"ip-tickets\" | \"mip-erc1155\" | null;\n icon: ElementType;\n iconClass: string;\n signedOut: { title: string; description: string };\n shell: { title: string; subtitle: string };\n dialog: { title: string; workingLabel: string; firstStepLabel: string };\n success: { title: string; description: string; fallbackName: string; reward: string; againLabel: string };\n cardFallbackSymbol: string;\n copy: {\n imageHeading: string;\n imageHelp?: string;\n nameLabel: string;\n namePlaceholder: string;\n nameHint: string;\n symbolPlaceholder: string;\n symbolHint: string;\n descriptionPlaceholder: string;\n descriptionHint?: string;\n submit: string;\n footnotes: string[];\n };\n suggestSymbol: boolean;\n registerAfterDeploy: boolean;\n actions: (found: { address: string | null; collectionHref: string | null }) => {\n primary?: CollectionCreateAction;\n secondary?: CollectionCreateAction;\n };\n}\n\nconst FREE = \"Free to publish — protocol fee is zero.\";\n\nexport const CLUB_PRESET: CollectionCreatePreset = {\n service: \"ip-club\",\n icon: Users,\n iconClass: \"text-brand-purple\",\n signedOut: { title: msg(\"Secure your account to create a club\"), description: msg(\"Create a club, then mint membership cards for your community.\") },\n shell: { title: msg(\"Create club\"), subtitle: msg(\"One club — create membership tiers and mint cards to your community.\") },\n dialog: { title: msg(\"Create club\"), workingLabel: msg(\"Creating your club…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Club created\"), description: msg(\"Each membership you create is recorded onchain under your wallet.\"), fallbackName: msg(\"Your club\"), reward: msg(\"create_club\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Club\",\n copy: {\n imageHeading: msg(\"Club image\"),\n nameLabel: msg(\"Club name *\"),\n namePlaceholder: msg(\"My Club\"),\n nameHint: msg(\"Shown in wallets, explorers, and on every membership card.\"),\n symbolPlaceholder: msg(\"CLUB\"),\n symbolHint: msg(\"Short ticker — 2 to 10 uppercase letters.\"),\n descriptionPlaceholder: msg(\"Describe your club — what does membership unlock?\"),\n submit: msg(\"Create club\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => ({ primary: collectionHref ? { href: collectionHref, label: msg(\"Create memberships\") } : undefined }),\n};\n\nexport const TICKETS_PRESET: CollectionCreatePreset = {\n service: \"ip-tickets\",\n icon: Ticket,\n iconClass: \"text-teal-500\",\n signedOut: { title: msg(\"Secure your account to create tickets\"), description: msg(\"Create a tickets collection, then mint tickets to your audience.\") },\n shell: { title: msg(\"Create ticket collection\"), subtitle: msg(\"One collection — create tickets and mint them to your audience.\") },\n dialog: { title: msg(\"Create tickets collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Ticket collection created\"), description: msg(\"Each ticket you mint into it is recorded onchain under your wallet.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_ticket_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Tickets\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My tickets\"),\n nameHint: msg(\"Shown in wallets, explorers, and on every ticket.\"),\n symbolPlaceholder: msg(\"TIX\"),\n symbolHint: msg(\"Short ticker — 2 to 10 uppercase letters.\"),\n descriptionPlaceholder: msg(\"Describe your tickets — what do they admit or unlock?\"),\n submit: msg(\"Create ticket collection\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => ({ primary: collectionHref ? { href: collectionHref, label: msg(\"Create tickets\") } : undefined }),\n};\n\nexport const EDITIONS_PRESET: CollectionCreatePreset = {\n service: \"mip-erc1155\",\n icon: Layers,\n iconClass: \"text-brand-purple\",\n signedOut: { title: msg(\"Secure your account to create a collection\"), description: msg(\"Create a collection where each piece can have multiple editions.\") },\n shell: { title: msg(\"Create an edition collection\"), subtitle: msg(\"Create a collection where each piece can have multiple editions — free to publish, and it's yours.\") },\n dialog: { title: msg(\"Create collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Collection created\"), description: msg(\"Each asset you mint into it carries its own license terms.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Editions\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n imageHelp: msg(\"This becomes the cover for your collection.\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My Creative Works\"),\n nameHint: msg(\"The main title collectors see across the collection page, wallets, and future listings.\"),\n symbolPlaceholder: msg(\"MCW\"),\n symbolHint: msg(\"Short ticker (2–10 uppercase letters). We suggest one from the collection name.\"),\n descriptionPlaceholder: msg(\"Describe your collection and what kind of work it contains…\"),\n descriptionHint: msg(\"Use this to explain the creative direction, media type, or audience for the collection.\"),\n submit: msg(\"Publish collection\"),\n footnotes: [\n FREE,\n msg(\"Next step: mint pieces into this collection — you set the number of copies for each piece when you mint it, and can add more copies later.\"),\n ],\n },\n suggestSymbol: true,\n registerAfterDeploy: true,\n actions: ({ address, collectionHref }) => ({\n primary: address ? { href: `/launchpad/nfteditions/${address}/mint`, label: msg(\"Mint tokens\") } : undefined,\n secondary: collectionHref ? { href: collectionHref, label: msg(\"View collection\") } : undefined,\n }),\n};\n\nexport const SINGLE_PRESET: CollectionCreatePreset = {\n service: null,\n icon: Layers,\n iconClass: \"text-brand-blue\",\n signedOut: { title: msg(\"Secure your account to create a collection\"), description: msg(\"Set up a collection to mint your work into.\") },\n shell: { title: msg(\"Create a collection\"), subtitle: msg(\"Set up a collection to mint your work into — free to publish, and it's yours.\") },\n dialog: { title: msg(\"Create collection\"), workingLabel: msg(\"Creating your collection…\"), firstStepLabel: msg(\"Prepare metadata\") },\n success: { title: msg(\"Collection created\"), description: msg(\"Each asset you mint into it carries its own license terms.\"), fallbackName: msg(\"Your collection\"), reward: msg(\"create_collection\"), againLabel: msg(\"Create another\") },\n cardFallbackSymbol: \"Collection\",\n copy: {\n imageHeading: msg(\"Collection image\"),\n nameLabel: msg(\"Collection name *\"),\n namePlaceholder: msg(\"My Creative Works\"),\n nameHint: msg(\"The display name for your collection.\"),\n symbolPlaceholder: msg(\"MCW\"),\n symbolHint: msg(\"Short ticker (2–10 uppercase letters). Shown in wallets and marketplaces.\"),\n descriptionPlaceholder: msg(\"Describe your collection and what kind of work it contains…\"),\n submit: msg(\"Create collection\"),\n footnotes: [FREE],\n },\n suggestSymbol: false,\n registerAfterDeploy: false,\n actions: ({ collectionHref }) => {\n const mint = { href: \"/launchpad/single-editions\", label: msg(\"Mint an asset\") };\n return collectionHref ? { primary: { href: collectionHref, label: msg(\"View collection\") }, secondary: mint } : { primary: mint };\n },\n};\n"],"mappings":"AAAA,SAAS,QAAQ,QAAQ,aAAa;AAEtC,SAAS,WAAW;AAqCpB,MAAM,OAAO;AAEN,MAAM,cAAsC;AAAA,EACjD,SAAS;AAAA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,IACJ,cAAc,IAAI,kBAAkB;AAAA,IACpC,WAAW,IAAI,mBAAmB;AAAA,IAClC,iBAAiB,IAAI,mBAAmB;AAAA,IACxC,UAAU,IAAI,uCAAuC;AAAA,IACrD,mBAAmB,IAAI,KAAK;AAAA,IAC5B,YAAY,IAAI,gFAA2E;AAAA,IAC3F,wBAAwB,IAAI,kEAA6D;AAAA,IACzF,QAAQ,IAAI,mBAAmB;AAAA,IAC/B,WAAW,CAAC,IAAI;AAAA,EAClB;AAAA,EACA,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,SAAS,CAAC,EAAE,eAAe,MAAM;AAC/B,UAAM,OAAO,EAAE,MAAM,8BAA8B,OAAO,IAAI,eAAe,EAAE;AAC/E,WAAO,iBAAiB,EAAE,SAAS,EAAE,MAAM,gBAAgB,OAAO,IAAI,iBAAiB,EAAE,GAAG,WAAW,KAAK,IAAI,EAAE,SAAS,KAAK;AAAA,EAClI;AACF;","names":[]}
@@ -44,6 +44,7 @@ var import_cn = require("../../utils/cn.js");
44
44
  var import_use_image_url = require("../../utils/use-image-url.js");
45
45
  var import_provider = require("../../i18n/provider.js");
46
46
  var import_use_format = require("../../i18n/use-format.js");
47
+ var import_action_button = require("../action-button.js");
47
48
  function label(col) {
48
49
  return col.name || col.symbol || `Collection #${col.collectionId}`;
49
50
  }
@@ -63,17 +64,10 @@ function CollectionPicker({ collections, loading, value, onChange, newCollection
63
64
  if (collections.length === 0) {
64
65
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl border border-dashed border-border p-5 text-center space-y-3", children: [
65
66
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: t("No collection found. It may take a minute to display recently created collections.") }),
66
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
67
- import_link.default,
68
- {
69
- href: newCollectionHref,
70
- className: "inline-flex items-center gap-1.5 h-9 px-4 rounded-xl text-sm font-semibold text-white bg-brand-blue hover:brightness-110 transition-all",
71
- children: [
72
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Plus, { className: "h-3.5 w-3.5" }),
73
- t("Create your first collection")
74
- ]
75
- }
76
- )
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { solid: true, small: true, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: newCollectionHref, children: [
68
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Plus, { className: "h-3.5 w-3.5" }),
69
+ t("Create your first collection")
70
+ ] }) })
77
71
  ] });
78
72
  }
79
73
  const selected = collections.find((c) => c.collectionId === value) ?? null;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/launchpad/collection-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Boxes, Check, ChevronDown, Plus } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport Image from \"../image.js\";\nimport Link from \"../link.js\";\nimport { Input } from \"../input.js\";\nimport { Skeleton } from \"../skeleton.js\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { useImageUrl } from \"../../utils/use-image-url.js\";\nimport { useT } from \"../../i18n/provider.js\";\nimport type { T } from \"../../i18n/make-t.js\";\nimport { useFormat, type Format } from \"../../i18n/use-format.js\";\n\nexport interface CollectionPickerProps {\n collections: ApiCollection[];\n loading: boolean;\n value: string;\n onChange: (id: string) => void;\n newCollectionHref: string;\n}\n\nfunction label(col: ApiCollection) {\n return col.name || col.symbol || `Collection #${col.collectionId}`;\n}\n\nfunction works(col: ApiCollection, t: T, intl: Format) {\n return col.totalSupply != null ? t.plural(\"{count} work\", \"{count} works\", col.totalSupply, { count: intl.number(col.totalSupply) }) : t(\"Empty\");\n}\n\nfunction Thumb({ image, size }: { image: string | null | undefined; size: \"sm\" | \"md\" }) {\n const url = useImageUrl()(image);\n return (\n <div className={cn(\"relative rounded-lg overflow-hidden bg-muted shrink-0\", size === \"md\" ? \"h-10 w-10\" : \"h-8 w-8\")}>\n {url ? (\n <Image src={url} alt=\"\" fill unoptimized className=\"object-cover\" />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <Boxes className=\"h-4 w-4 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n );\n}\n\nexport function CollectionPicker({ collections, loading, value, onChange, newCollectionHref }: CollectionPickerProps) {\n const t = useT();\n const intl = useFormat();\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState(\"\");\n\n if (loading) return <Skeleton className=\"h-[4.25rem] rounded-xl\" />;\n\n if (collections.length === 0) {\n return (\n <div className=\"rounded-xl border border-dashed border-border p-5 text-center space-y-3\">\n <p className=\"text-sm text-muted-foreground\">{t(\"No collection found. It may take a minute to display recently created collections.\")}</p>\n <Link\n href={newCollectionHref}\n className=\"inline-flex items-center gap-1.5 h-9 px-4 rounded-xl text-sm font-semibold text-white bg-brand-blue hover:brightness-110 transition-all\"\n >\n <Plus className=\"h-3.5 w-3.5\" />\n {t(\"Create your first collection\")}\n </Link>\n </div>\n );\n }\n\n const selected = collections.find((c) => c.collectionId === value) ?? null;\n const filtered = query.trim() ? collections.filter((c) => label(c).toLowerCase().includes(query.trim().toLowerCase())) : collections;\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n if (!next) setQuery(\"\");\n }}\n >\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-expanded={open}\n className=\"flex w-full items-center gap-3 rounded-xl border border-border p-3 text-left transition-colors hover:bg-muted/40\"\n >\n <Thumb image={selected?.image} size=\"md\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-semibold truncate\">{selected ? label(selected) : t(\"Choose a collection\")}</p>\n <p className=\"text-xs text-muted-foreground\">{selected ? works(selected, t, intl) : t(\"Where this work will live\")}</p>\n </div>\n <span className=\"flex items-center gap-1 text-xs font-medium text-muted-foreground shrink-0\">\n {t(\"Change\")}\n <ChevronDown className=\"h-3.5 w-3.5\" />\n </span>\n </button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[var(--radix-popover-trigger-width)] p-0\" align=\"start\">\n {collections.length > 5 && (\n <div className=\"border-b border-border p-2\">\n <Input value={query} onChange={(e) => setQuery(e.target.value)} placeholder={t(\"Search collections…\")} className=\"h-8\" />\n </div>\n )}\n <div className=\"max-h-64 overflow-y-auto p-1\">\n {filtered.length === 0 ? (\n <p className=\"px-3 py-4 text-center text-sm text-muted-foreground\">{t(\"No collection found.\")}</p>\n ) : (\n filtered.map((col) => (\n <button\n key={col.collectionId!}\n type=\"button\"\n onClick={() => {\n onChange(col.collectionId!);\n setOpen(false);\n }}\n className=\"flex w-full items-center gap-2.5 rounded-lg px-2 py-2 text-left transition-colors hover:bg-muted/60\"\n >\n <Thumb image={col.image} size=\"sm\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium truncate\">{label(col)}</p>\n <p className=\"text-xs text-muted-foreground\">{works(col, t, intl)}</p>\n </div>\n {value === col.collectionId && <Check className=\"h-4 w-4 text-brand-blue shrink-0\" />}\n </button>\n ))\n )}\n </div>\n <div className=\"border-t border-border p-1\">\n <Link\n href={newCollectionHref}\n className=\"flex items-center gap-2 rounded-lg px-2 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/60 hover:text-foreground transition-colors\"\n >\n <Plus className=\"h-4 w-4\" />\n {t(\"New collection\")}\n </Link>\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqCQ;AAnCR,mBAAyB;AACzB,0BAAgD;AAEhD,mBAAkB;AAClB,kBAAiB;AACjB,mBAAsB;AACtB,sBAAyB;AACzB,qBAAwD;AACxD,gBAAmB;AACnB,2BAA4B;AAC5B,sBAAqB;AAErB,wBAAuC;AAUvC,SAAS,MAAM,KAAoB;AACjC,SAAO,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AS,IAAI,YAAa;AAC1B,wBAAQ,KAAK;AAAA,cACf;AAAA,cACA,WAAU;AAAA,cAEV;AAAA,4DAAC,SAAM,OAAO,IAAI,OAAO,MAAK,MAAK;AAAA,gBACnC,6CAAC,SAAI,WAAU,kBACb;AAAA,8DAAC,OAAE,WAAU,gCAAgC,gBAAM,GAAG,GAAE;AAAA,kBACxD,4CAAC,OAAE,WAAU,iCAAiC,gBAAM,KAAK,GAAG,IAAI,GAAE;AAAA,mBACpE;AAAA,gBACC,UAAU,IAAI,gBAAgB,4CAAC,6BAAM,WAAU,oCAAmC;AAAA;AAAA;AAAA,YAb9E,IAAI;AAAA,UAcX,CACD,GAEL;AAAA,UACA,4CAAC,SAAI,WAAU,8BACb;AAAA,YAAC,YAAAA;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,WAAU;AAAA,cAEV;AAAA,4DAAC,4BAAK,WAAU,WAAU;AAAA,gBACzB,EAAE,gBAAgB;AAAA;AAAA;AAAA,UACrB,GACF;AAAA,WACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["Image","Link"]}
1
+ {"version":3,"sources":["../../../src/components/launchpad/collection-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Boxes, Check, ChevronDown, Plus } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport Image from \"../image.js\";\nimport Link from \"../link.js\";\nimport { Input } from \"../input.js\";\nimport { Skeleton } from \"../skeleton.js\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { useImageUrl } from \"../../utils/use-image-url.js\";\nimport { useT } from \"../../i18n/provider.js\";\nimport type { T } from \"../../i18n/make-t.js\";\nimport { useFormat, type Format } from \"../../i18n/use-format.js\";\nimport { ActionButton } from \"../action-button.js\";\n\nexport interface CollectionPickerProps {\n collections: ApiCollection[];\n loading: boolean;\n value: string;\n onChange: (id: string) => void;\n newCollectionHref: string;\n}\n\nfunction label(col: ApiCollection) {\n return col.name || col.symbol || `Collection #${col.collectionId}`;\n}\n\nfunction works(col: ApiCollection, t: T, intl: Format) {\n return col.totalSupply != null ? t.plural(\"{count} work\", \"{count} works\", col.totalSupply, { count: intl.number(col.totalSupply) }) : t(\"Empty\");\n}\n\nfunction Thumb({ image, size }: { image: string | null | undefined; size: \"sm\" | \"md\" }) {\n const url = useImageUrl()(image);\n return (\n <div className={cn(\"relative rounded-lg overflow-hidden bg-muted shrink-0\", size === \"md\" ? \"h-10 w-10\" : \"h-8 w-8\")}>\n {url ? (\n <Image src={url} alt=\"\" fill unoptimized className=\"object-cover\" />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <Boxes className=\"h-4 w-4 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n );\n}\n\nexport function CollectionPicker({ collections, loading, value, onChange, newCollectionHref }: CollectionPickerProps) {\n const t = useT();\n const intl = useFormat();\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState(\"\");\n\n if (loading) return <Skeleton className=\"h-[4.25rem] rounded-xl\" />;\n\n if (collections.length === 0) {\n return (\n <div className=\"rounded-xl border border-dashed border-border p-5 text-center space-y-3\">\n <p className=\"text-sm text-muted-foreground\">{t(\"No collection found. It may take a minute to display recently created collections.\")}</p>\n <ActionButton solid small asChild>\n <Link href={newCollectionHref}>\n <Plus className=\"h-3.5 w-3.5\" />\n {t(\"Create your first collection\")}\n </Link>\n </ActionButton>\n </div>\n );\n }\n\n const selected = collections.find((c) => c.collectionId === value) ?? null;\n const filtered = query.trim() ? collections.filter((c) => label(c).toLowerCase().includes(query.trim().toLowerCase())) : collections;\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n if (!next) setQuery(\"\");\n }}\n >\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-expanded={open}\n className=\"flex w-full items-center gap-3 rounded-xl border border-border p-3 text-left transition-colors hover:bg-muted/40\"\n >\n <Thumb image={selected?.image} size=\"md\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-semibold truncate\">{selected ? label(selected) : t(\"Choose a collection\")}</p>\n <p className=\"text-xs text-muted-foreground\">{selected ? works(selected, t, intl) : t(\"Where this work will live\")}</p>\n </div>\n <span className=\"flex items-center gap-1 text-xs font-medium text-muted-foreground shrink-0\">\n {t(\"Change\")}\n <ChevronDown className=\"h-3.5 w-3.5\" />\n </span>\n </button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[var(--radix-popover-trigger-width)] p-0\" align=\"start\">\n {collections.length > 5 && (\n <div className=\"border-b border-border p-2\">\n <Input value={query} onChange={(e) => setQuery(e.target.value)} placeholder={t(\"Search collections…\")} className=\"h-8\" />\n </div>\n )}\n <div className=\"max-h-64 overflow-y-auto p-1\">\n {filtered.length === 0 ? (\n <p className=\"px-3 py-4 text-center text-sm text-muted-foreground\">{t(\"No collection found.\")}</p>\n ) : (\n filtered.map((col) => (\n <button\n key={col.collectionId!}\n type=\"button\"\n onClick={() => {\n onChange(col.collectionId!);\n setOpen(false);\n }}\n className=\"flex w-full items-center gap-2.5 rounded-lg px-2 py-2 text-left transition-colors hover:bg-muted/60\"\n >\n <Thumb image={col.image} size=\"sm\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium truncate\">{label(col)}</p>\n <p className=\"text-xs text-muted-foreground\">{works(col, t, intl)}</p>\n </div>\n {value === col.collectionId && <Check className=\"h-4 w-4 text-brand-blue shrink-0\" />}\n </button>\n ))\n )}\n </div>\n <div className=\"border-t border-border p-1\">\n <Link\n href={newCollectionHref}\n className=\"flex items-center gap-2 rounded-lg px-2 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/60 hover:text-foreground transition-colors\"\n >\n <Plus className=\"h-4 w-4\" />\n {t(\"New collection\")}\n </Link>\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCQ;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AU,OAAM,GACzH;AAAA,UAEF,4CAAC,SAAI,WAAU,gCACZ,mBAAS,WAAW,IACnB,4CAAC,OAAE,WAAU,uDAAuD,YAAE,sBAAsB,GAAE,IAE9F,SAAS,IAAI,CAAC,QACZ;AAAA,YAAC;AAAA;AAAA,cAEC,MAAK;AAAA,cACL,SAAS,MAAM;AACb,yBAAS,IAAI,YAAa;AAC1B,wBAAQ,KAAK;AAAA,cACf;AAAA,cACA,WAAU;AAAA,cAEV;AAAA,4DAAC,SAAM,OAAO,IAAI,OAAO,MAAK,MAAK;AAAA,gBACnC,6CAAC,SAAI,WAAU,kBACb;AAAA,8DAAC,OAAE,WAAU,gCAAgC,gBAAM,GAAG,GAAE;AAAA,kBACxD,4CAAC,OAAE,WAAU,iCAAiC,gBAAM,KAAK,GAAG,IAAI,GAAE;AAAA,mBACpE;AAAA,gBACC,UAAU,IAAI,gBAAgB,4CAAC,6BAAM,WAAU,oCAAmC;AAAA;AAAA;AAAA,YAb9E,IAAI;AAAA,UAcX,CACD,GAEL;AAAA,UACA,4CAAC,SAAI,WAAU,8BACb;AAAA,YAAC,YAAAA;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,WAAU;AAAA,cAEV;AAAA,4DAAC,4BAAK,WAAU,WAAU;AAAA,gBACzB,EAAE,gBAAgB;AAAA;AAAA;AAAA,UACrB,GACF;AAAA,WACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["Image","Link"]}
@@ -11,6 +11,7 @@ import { cn } from "../../utils/cn.js";
11
11
  import { useImageUrl } from "../../utils/use-image-url.js";
12
12
  import { useT } from "../../i18n/provider.js";
13
13
  import { useFormat } from "../../i18n/use-format.js";
14
+ import { ActionButton } from "../action-button.js";
14
15
  function label(col) {
15
16
  return col.name || col.symbol || `Collection #${col.collectionId}`;
16
17
  }
@@ -30,17 +31,10 @@ function CollectionPicker({ collections, loading, value, onChange, newCollection
30
31
  if (collections.length === 0) {
31
32
  return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-dashed border-border p-5 text-center space-y-3", children: [
32
33
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("No collection found. It may take a minute to display recently created collections.") }),
33
- /* @__PURE__ */ jsxs(
34
- Link,
35
- {
36
- href: newCollectionHref,
37
- className: "inline-flex items-center gap-1.5 h-9 px-4 rounded-xl text-sm font-semibold text-white bg-brand-blue hover:brightness-110 transition-all",
38
- children: [
39
- /* @__PURE__ */ jsx(Plus, { className: "h-3.5 w-3.5" }),
40
- t("Create your first collection")
41
- ]
42
- }
43
- )
34
+ /* @__PURE__ */ jsx(ActionButton, { solid: true, small: true, asChild: true, children: /* @__PURE__ */ jsxs(Link, { href: newCollectionHref, children: [
35
+ /* @__PURE__ */ jsx(Plus, { className: "h-3.5 w-3.5" }),
36
+ t("Create your first collection")
37
+ ] }) })
44
38
  ] });
45
39
  }
46
40
  const selected = collections.find((c) => c.collectionId === value) ?? null;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/launchpad/collection-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Boxes, Check, ChevronDown, Plus } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport Image from \"../image.js\";\nimport Link from \"../link.js\";\nimport { Input } from \"../input.js\";\nimport { Skeleton } from \"../skeleton.js\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { useImageUrl } from \"../../utils/use-image-url.js\";\nimport { useT } from \"../../i18n/provider.js\";\nimport type { T } from \"../../i18n/make-t.js\";\nimport { useFormat, type Format } from \"../../i18n/use-format.js\";\n\nexport interface CollectionPickerProps {\n collections: ApiCollection[];\n loading: boolean;\n value: string;\n onChange: (id: string) => void;\n newCollectionHref: string;\n}\n\nfunction label(col: ApiCollection) {\n return col.name || col.symbol || `Collection #${col.collectionId}`;\n}\n\nfunction works(col: ApiCollection, t: T, intl: Format) {\n return col.totalSupply != null ? t.plural(\"{count} work\", \"{count} works\", col.totalSupply, { count: intl.number(col.totalSupply) }) : t(\"Empty\");\n}\n\nfunction Thumb({ image, size }: { image: string | null | undefined; size: \"sm\" | \"md\" }) {\n const url = useImageUrl()(image);\n return (\n <div className={cn(\"relative rounded-lg overflow-hidden bg-muted shrink-0\", size === \"md\" ? \"h-10 w-10\" : \"h-8 w-8\")}>\n {url ? (\n <Image src={url} alt=\"\" fill unoptimized className=\"object-cover\" />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <Boxes className=\"h-4 w-4 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n );\n}\n\nexport function CollectionPicker({ collections, loading, value, onChange, newCollectionHref }: CollectionPickerProps) {\n const t = useT();\n const intl = useFormat();\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState(\"\");\n\n if (loading) return <Skeleton className=\"h-[4.25rem] rounded-xl\" />;\n\n if (collections.length === 0) {\n return (\n <div className=\"rounded-xl border border-dashed border-border p-5 text-center space-y-3\">\n <p className=\"text-sm text-muted-foreground\">{t(\"No collection found. It may take a minute to display recently created collections.\")}</p>\n <Link\n href={newCollectionHref}\n className=\"inline-flex items-center gap-1.5 h-9 px-4 rounded-xl text-sm font-semibold text-white bg-brand-blue hover:brightness-110 transition-all\"\n >\n <Plus className=\"h-3.5 w-3.5\" />\n {t(\"Create your first collection\")}\n </Link>\n </div>\n );\n }\n\n const selected = collections.find((c) => c.collectionId === value) ?? null;\n const filtered = query.trim() ? collections.filter((c) => label(c).toLowerCase().includes(query.trim().toLowerCase())) : collections;\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n if (!next) setQuery(\"\");\n }}\n >\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-expanded={open}\n className=\"flex w-full items-center gap-3 rounded-xl border border-border p-3 text-left transition-colors hover:bg-muted/40\"\n >\n <Thumb image={selected?.image} size=\"md\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-semibold truncate\">{selected ? label(selected) : t(\"Choose a collection\")}</p>\n <p className=\"text-xs text-muted-foreground\">{selected ? works(selected, t, intl) : t(\"Where this work will live\")}</p>\n </div>\n <span className=\"flex items-center gap-1 text-xs font-medium text-muted-foreground shrink-0\">\n {t(\"Change\")}\n <ChevronDown className=\"h-3.5 w-3.5\" />\n </span>\n </button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[var(--radix-popover-trigger-width)] p-0\" align=\"start\">\n {collections.length > 5 && (\n <div className=\"border-b border-border p-2\">\n <Input value={query} onChange={(e) => setQuery(e.target.value)} placeholder={t(\"Search collections…\")} className=\"h-8\" />\n </div>\n )}\n <div className=\"max-h-64 overflow-y-auto p-1\">\n {filtered.length === 0 ? (\n <p className=\"px-3 py-4 text-center text-sm text-muted-foreground\">{t(\"No collection found.\")}</p>\n ) : (\n filtered.map((col) => (\n <button\n key={col.collectionId!}\n type=\"button\"\n onClick={() => {\n onChange(col.collectionId!);\n setOpen(false);\n }}\n className=\"flex w-full items-center gap-2.5 rounded-lg px-2 py-2 text-left transition-colors hover:bg-muted/60\"\n >\n <Thumb image={col.image} size=\"sm\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium truncate\">{label(col)}</p>\n <p className=\"text-xs text-muted-foreground\">{works(col, t, intl)}</p>\n </div>\n {value === col.collectionId && <Check className=\"h-4 w-4 text-brand-blue shrink-0\" />}\n </button>\n ))\n )}\n </div>\n <div className=\"border-t border-border p-1\">\n <Link\n href={newCollectionHref}\n className=\"flex items-center gap-2 rounded-lg px-2 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/60 hover:text-foreground transition-colors\"\n >\n <Plus className=\"h-4 w-4\" />\n {t(\"New collection\")}\n </Link>\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";AAqCQ,cAsBA,YAtBA;AAnCR,SAAS,gBAAgB;AACzB,SAAS,OAAO,OAAO,aAAa,YAAY;AAEhD,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,S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AAC,OAAE,WAAU,uDAAuD,YAAE,sBAAsB,GAAE,IAE9F,SAAS,IAAI,CAAC,QACZ;AAAA,YAAC;AAAA;AAAA,cAEC,MAAK;AAAA,cACL,SAAS,MAAM;AACb,yBAAS,IAAI,YAAa;AAC1B,wBAAQ,KAAK;AAAA,cACf;AAAA,cACA,WAAU;AAAA,cAEV;AAAA,oCAAC,SAAM,OAAO,IAAI,OAAO,MAAK,MAAK;AAAA,gBACnC,qBAAC,SAAI,WAAU,kBACb;AAAA,sCAAC,OAAE,WAAU,gCAAgC,gBAAM,GAAG,GAAE;AAAA,kBACxD,oBAAC,OAAE,WAAU,iCAAiC,gBAAM,KAAK,GAAG,IAAI,GAAE;AAAA,mBACpE;AAAA,gBACC,UAAU,IAAI,gBAAgB,oBAAC,SAAM,WAAU,oCAAmC;AAAA;AAAA;AAAA,YAb9E,IAAI;AAAA,UAcX,CACD,GAEL;AAAA,UACA,oBAAC,SAAI,WAAU,8BACb;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,WAAU;AAAA,cAEV;AAAA,oCAAC,QAAK,WAAU,WAAU;AAAA,gBACzB,EAAE,gBAAgB;AAAA;AAAA;AAAA,UACrB,GACF;AAAA,WACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/launchpad/collection-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Boxes, Check, ChevronDown, Plus } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport Image from \"../image.js\";\nimport Link from \"../link.js\";\nimport { Input } from \"../input.js\";\nimport { Skeleton } from \"../skeleton.js\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { useImageUrl } from \"../../utils/use-image-url.js\";\nimport { useT } from \"../../i18n/provider.js\";\nimport type { T } from \"../../i18n/make-t.js\";\nimport { useFormat, type Format } from \"../../i18n/use-format.js\";\nimport { ActionButton } from \"../action-button.js\";\n\nexport interface CollectionPickerProps {\n collections: ApiCollection[];\n loading: boolean;\n value: string;\n onChange: (id: string) => void;\n newCollectionHref: string;\n}\n\nfunction label(col: ApiCollection) {\n return col.name || col.symbol || `Collection #${col.collectionId}`;\n}\n\nfunction works(col: ApiCollection, t: T, intl: Format) {\n return col.totalSupply != null ? t.plural(\"{count} work\", \"{count} works\", col.totalSupply, { count: intl.number(col.totalSupply) }) : t(\"Empty\");\n}\n\nfunction Thumb({ image, size }: { image: string | null | undefined; size: \"sm\" | \"md\" }) {\n const url = useImageUrl()(image);\n return (\n <div className={cn(\"relative rounded-lg overflow-hidden bg-muted shrink-0\", size === \"md\" ? \"h-10 w-10\" : \"h-8 w-8\")}>\n {url ? (\n <Image src={url} alt=\"\" fill unoptimized className=\"object-cover\" />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <Boxes className=\"h-4 w-4 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n );\n}\n\nexport function CollectionPicker({ collections, loading, value, onChange, newCollectionHref }: CollectionPickerProps) {\n const t = useT();\n const intl = useFormat();\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState(\"\");\n\n if (loading) return <Skeleton className=\"h-[4.25rem] rounded-xl\" />;\n\n if (collections.length === 0) {\n return (\n <div className=\"rounded-xl border border-dashed border-border p-5 text-center space-y-3\">\n <p className=\"text-sm text-muted-foreground\">{t(\"No collection found. It may take a minute to display recently created collections.\")}</p>\n <ActionButton solid small asChild>\n <Link href={newCollectionHref}>\n <Plus className=\"h-3.5 w-3.5\" />\n {t(\"Create your first collection\")}\n </Link>\n </ActionButton>\n </div>\n );\n }\n\n const selected = collections.find((c) => c.collectionId === value) ?? null;\n const filtered = query.trim() ? collections.filter((c) => label(c).toLowerCase().includes(query.trim().toLowerCase())) : collections;\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n if (!next) setQuery(\"\");\n }}\n >\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-expanded={open}\n className=\"flex w-full items-center gap-3 rounded-xl border border-border p-3 text-left transition-colors hover:bg-muted/40\"\n >\n <Thumb image={selected?.image} size=\"md\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-semibold truncate\">{selected ? label(selected) : t(\"Choose a collection\")}</p>\n <p className=\"text-xs text-muted-foreground\">{selected ? works(selected, t, intl) : t(\"Where this work will live\")}</p>\n </div>\n <span className=\"flex items-center gap-1 text-xs font-medium text-muted-foreground shrink-0\">\n {t(\"Change\")}\n <ChevronDown className=\"h-3.5 w-3.5\" />\n </span>\n </button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[var(--radix-popover-trigger-width)] p-0\" align=\"start\">\n {collections.length > 5 && (\n <div className=\"border-b border-border p-2\">\n <Input value={query} onChange={(e) => setQuery(e.target.value)} placeholder={t(\"Search collections…\")} className=\"h-8\" />\n </div>\n )}\n <div className=\"max-h-64 overflow-y-auto p-1\">\n {filtered.length === 0 ? (\n <p className=\"px-3 py-4 text-center text-sm text-muted-foreground\">{t(\"No collection found.\")}</p>\n ) : (\n filtered.map((col) => (\n <button\n key={col.collectionId!}\n type=\"button\"\n onClick={() => {\n onChange(col.collectionId!);\n setOpen(false);\n }}\n className=\"flex w-full items-center gap-2.5 rounded-lg px-2 py-2 text-left transition-colors hover:bg-muted/60\"\n >\n <Thumb image={col.image} size=\"sm\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium truncate\">{label(col)}</p>\n <p className=\"text-xs text-muted-foreground\">{works(col, t, intl)}</p>\n </div>\n {value === col.collectionId && <Check className=\"h-4 w-4 text-brand-blue shrink-0\" />}\n </button>\n ))\n )}\n </div>\n <div className=\"border-t border-border p-1\">\n <Link\n href={newCollectionHref}\n className=\"flex items-center gap-2 rounded-lg px-2 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/60 hover:text-foreground transition-colors\"\n >\n <Plus className=\"h-4 w-4\" />\n {t(\"New collection\")}\n </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AC,SAAI,WAAU,8BACb,8BAAC,SAAM,OAAO,OAAO,UAAU,CAAC,MAAM,SAAS,EAAE,OAAO,KAAK,GAAG,aAAa,EAAE,0BAAqB,GAAG,WAAU,OAAM,GACzH;AAAA,UAEF,oBAAC,SAAI,WAAU,gCACZ,mBAAS,WAAW,IACnB,oBAAC,OAAE,WAAU,uDAAuD,YAAE,sBAAsB,GAAE,IAE9F,SAAS,IAAI,CAAC,QACZ;AAAA,YAAC;AAAA;AAAA,cAEC,MAAK;AAAA,cACL,SAAS,MAAM;AACb,yBAAS,IAAI,YAAa;AAC1B,wBAAQ,KAAK;AAAA,cACf;AAAA,cACA,WAAU;AAAA,cAEV;AAAA,oCAAC,SAAM,OAAO,IAAI,OAAO,MAAK,MAAK;AAAA,gBACnC,qBAAC,SAAI,WAAU,kBACb;AAAA,sCAAC,OAAE,WAAU,gCAAgC,gBAAM,GAAG,GAAE;AAAA,kBACxD,oBAAC,OAAE,WAAU,iCAAiC,gBAAM,KAAK,GAAG,IAAI,GAAE;AAAA,mBACpE;AAAA,gBACC,UAAU,IAAI,gBAAgB,oBAAC,SAAM,WAAU,oCAAmC;AAAA;AAAA;AAAA,YAb9E,IAAI;AAAA,UAcX,CACD,GAEL;AAAA,UACA,oBAAC,SAAI,WAAU,8BACb;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,WAAU;AAAA,cAEV;AAAA,oCAAC,QAAK,WAAU,WAAU;AAAA,gBACzB,EAAE,gBAAgB;AAAA;AAAA;AAAA,UACrB,GACF;AAAA,WACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -118,7 +118,7 @@ function EditionMintFields({
118
118
  import_button.Button,
119
119
  {
120
120
  type: "button",
121
- variant: "outline",
121
+ variant: "soft",
122
122
  size: "sm",
123
123
  disabled: imageUploading,
124
124
  onClick: () => fileInputRef.current?.click(),