@medialane/ui 0.390.0 → 0.392.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 (550) hide show
  1. package/dist/components/account/account-section.cjs.map +1 -1
  2. package/dist/components/account/account-section.d.cts +0 -1
  3. package/dist/components/account/account-section.d.ts +0 -1
  4. package/dist/components/account/account-section.js.map +1 -1
  5. package/dist/components/account/add-guardian-dialog.cjs +1 -1
  6. package/dist/components/account/add-guardian-dialog.cjs.map +1 -1
  7. package/dist/components/account/add-guardian-dialog.js +1 -1
  8. package/dist/components/account/add-guardian-dialog.js.map +1 -1
  9. package/dist/components/account/device-approval-dialog.cjs +2 -2
  10. package/dist/components/account/device-approval-dialog.cjs.map +1 -1
  11. package/dist/components/account/device-approval-dialog.js +2 -2
  12. package/dist/components/account/device-approval-dialog.js.map +1 -1
  13. package/dist/components/account/devices-section.cjs +2 -2
  14. package/dist/components/account/devices-section.cjs.map +1 -1
  15. package/dist/components/account/devices-section.js +2 -2
  16. package/dist/components/account/devices-section.js.map +1 -1
  17. package/dist/components/account/email-code-entry.cjs +1 -1
  18. package/dist/components/account/email-code-entry.cjs.map +1 -1
  19. package/dist/components/account/email-code-entry.js +1 -1
  20. package/dist/components/account/email-code-entry.js.map +1 -1
  21. package/dist/components/account/guardian-recovery-section.cjs +4 -4
  22. package/dist/components/account/guardian-recovery-section.cjs.map +1 -1
  23. package/dist/components/account/guardian-recovery-section.js +4 -4
  24. package/dist/components/account/guardian-recovery-section.js.map +1 -1
  25. package/dist/components/action-button.cjs.map +1 -1
  26. package/dist/components/action-button.d.cts +0 -4
  27. package/dist/components/action-button.d.ts +0 -4
  28. package/dist/components/action-button.js.map +1 -1
  29. package/dist/components/approve-mint-dialog.cjs +2 -2
  30. package/dist/components/approve-mint-dialog.cjs.map +1 -1
  31. package/dist/components/approve-mint-dialog.js +2 -2
  32. package/dist/components/approve-mint-dialog.js.map +1 -1
  33. package/dist/components/archive-asset-dialog.cjs +2 -2
  34. package/dist/components/archive-asset-dialog.cjs.map +1 -1
  35. package/dist/components/archive-asset-dialog.js +2 -2
  36. package/dist/components/archive-asset-dialog.js.map +1 -1
  37. package/dist/components/archived-asset-notice.cjs +1 -1
  38. package/dist/components/archived-asset-notice.cjs.map +1 -1
  39. package/dist/components/archived-asset-notice.js +1 -1
  40. package/dist/components/archived-asset-notice.js.map +1 -1
  41. package/dist/components/asset-marketplace-panel.cjs +1 -1
  42. package/dist/components/asset-marketplace-panel.cjs.map +1 -1
  43. package/dist/components/asset-marketplace-panel.js +1 -1
  44. package/dist/components/asset-marketplace-panel.js.map +1 -1
  45. package/dist/components/asset-overview-content.cjs +1 -1
  46. package/dist/components/asset-overview-content.cjs.map +1 -1
  47. package/dist/components/asset-overview-content.js +1 -1
  48. package/dist/components/asset-overview-content.js.map +1 -1
  49. package/dist/components/asset-picker.cjs +1 -1
  50. package/dist/components/asset-picker.cjs.map +1 -1
  51. package/dist/components/asset-picker.js +1 -1
  52. package/dist/components/asset-picker.js.map +1 -1
  53. package/dist/components/asset-provenance-tab.cjs +1 -1
  54. package/dist/components/asset-provenance-tab.cjs.map +1 -1
  55. package/dist/components/asset-provenance-tab.js +1 -1
  56. package/dist/components/asset-provenance-tab.js.map +1 -1
  57. package/dist/components/asset-search-picker.cjs +1 -1
  58. package/dist/components/asset-search-picker.cjs.map +1 -1
  59. package/dist/components/asset-search-picker.js +1 -1
  60. package/dist/components/asset-search-picker.js.map +1 -1
  61. package/dist/components/badge.d.cts +1 -1
  62. package/dist/components/badge.d.ts +1 -1
  63. package/dist/components/button.d.cts +1 -1
  64. package/dist/components/button.d.ts +1 -1
  65. package/dist/components/claim-rail.cjs.map +1 -1
  66. package/dist/components/claim-rail.d.cts +0 -1
  67. package/dist/components/claim-rail.d.ts +0 -1
  68. package/dist/components/claim-rail.js.map +1 -1
  69. package/dist/components/collection-name-claim.cjs +1 -1
  70. package/dist/components/collection-name-claim.cjs.map +1 -1
  71. package/dist/components/collection-name-claim.js +1 -1
  72. package/dist/components/collection-name-claim.js.map +1 -1
  73. package/dist/components/collection-page.cjs +2 -2
  74. package/dist/components/collection-page.cjs.map +1 -1
  75. package/dist/components/collection-page.d.cts +0 -1
  76. package/dist/components/collection-page.d.ts +0 -1
  77. package/dist/components/collection-page.js +2 -2
  78. package/dist/components/collection-page.js.map +1 -1
  79. package/dist/components/collection-provenance-tab.cjs +1 -1
  80. package/dist/components/collection-provenance-tab.cjs.map +1 -1
  81. package/dist/components/collection-provenance-tab.js +1 -1
  82. package/dist/components/collection-provenance-tab.js.map +1 -1
  83. package/dist/components/collection-settings.cjs +21 -21
  84. package/dist/components/collection-settings.cjs.map +1 -1
  85. package/dist/components/collection-settings.js +21 -21
  86. package/dist/components/collection-settings.js.map +1 -1
  87. package/dist/components/collection-slug-claim.cjs +4 -4
  88. package/dist/components/collection-slug-claim.cjs.map +1 -1
  89. package/dist/components/collection-slug-claim.js +4 -4
  90. package/dist/components/collection-slug-claim.js.map +1 -1
  91. package/dist/components/comments-section.cjs +1 -1
  92. package/dist/components/comments-section.cjs.map +1 -1
  93. package/dist/components/comments-section.js +1 -1
  94. package/dist/components/comments-section.js.map +1 -1
  95. package/dist/components/create-form-primitives.cjs +6 -1
  96. package/dist/components/create-form-primitives.cjs.map +1 -1
  97. package/dist/components/create-form-primitives.js +6 -1
  98. package/dist/components/create-form-primitives.js.map +1 -1
  99. package/dist/components/create-sponsorship-aside.cjs +8 -8
  100. package/dist/components/create-sponsorship-aside.cjs.map +1 -1
  101. package/dist/components/create-sponsorship-aside.js +8 -8
  102. package/dist/components/create-sponsorship-aside.js.map +1 -1
  103. package/dist/components/creation-record.cjs +1 -1
  104. package/dist/components/creation-record.cjs.map +1 -1
  105. package/dist/components/creation-record.js +1 -1
  106. package/dist/components/creation-record.js.map +1 -1
  107. package/dist/components/discover-community-section.cjs +1 -1
  108. package/dist/components/discover-community-section.cjs.map +1 -1
  109. package/dist/components/discover-community-section.js +1 -1
  110. package/dist/components/discover-community-section.js.map +1 -1
  111. package/dist/components/discover-features.cjs +3 -3
  112. package/dist/components/discover-features.cjs.map +1 -1
  113. package/dist/components/discover-features.js +3 -3
  114. package/dist/components/discover-features.js.map +1 -1
  115. package/dist/components/discover-hero.cjs +1 -1
  116. package/dist/components/discover-hero.cjs.map +1 -1
  117. package/dist/components/discover-hero.js +1 -1
  118. package/dist/components/discover-hero.js.map +1 -1
  119. package/dist/components/drop/create/asset-editor.cjs +164 -0
  120. package/dist/components/drop/create/asset-editor.cjs.map +1 -0
  121. package/dist/components/drop/create/asset-editor.d.cts +16 -0
  122. package/dist/components/drop/create/asset-editor.d.ts +16 -0
  123. package/dist/components/drop/create/asset-editor.js +140 -0
  124. package/dist/components/drop/create/asset-editor.js.map +1 -0
  125. package/dist/components/drop/create/assets-panel.cjs +269 -0
  126. package/dist/components/drop/create/assets-panel.cjs.map +1 -0
  127. package/dist/components/drop/create/assets-panel.d.cts +10 -0
  128. package/dist/components/drop/create/assets-panel.d.ts +10 -0
  129. package/dist/components/drop/create/assets-panel.js +245 -0
  130. package/dist/components/drop/create/assets-panel.js.map +1 -0
  131. package/dist/components/drop/create/collection-panel.cjs +138 -0
  132. package/dist/components/drop/create/collection-panel.cjs.map +1 -0
  133. package/dist/components/drop/create/collection-panel.d.cts +11 -0
  134. package/dist/components/drop/create/collection-panel.d.ts +11 -0
  135. package/dist/components/drop/create/collection-panel.js +113 -0
  136. package/dist/components/drop/create/collection-panel.js.map +1 -0
  137. package/dist/components/drop/create/drop-create.cjs +57 -112
  138. package/dist/components/drop/create/drop-create.cjs.map +1 -1
  139. package/dist/components/drop/create/drop-create.d.cts +5 -20
  140. package/dist/components/drop/create/drop-create.d.ts +5 -20
  141. package/dist/components/drop/create/drop-create.js +60 -112
  142. package/dist/components/drop/create/drop-create.js.map +1 -1
  143. package/dist/components/drop/create/drop-fields.cjs +40 -144
  144. package/dist/components/drop/create/drop-fields.cjs.map +1 -1
  145. package/dist/components/drop/create/drop-fields.d.cts +3 -20
  146. package/dist/components/drop/create/drop-fields.d.ts +3 -20
  147. package/dist/components/drop/create/drop-fields.js +40 -131
  148. package/dist/components/drop/create/drop-fields.js.map +1 -1
  149. package/dist/components/drop/create/drop-panel.cjs +57 -0
  150. package/dist/components/drop/create/drop-panel.cjs.map +1 -0
  151. package/dist/components/drop/create/drop-panel.d.cts +24 -0
  152. package/dist/components/drop/create/drop-panel.d.ts +24 -0
  153. package/dist/components/drop/create/drop-panel.js +33 -0
  154. package/dist/components/drop/create/drop-panel.js.map +1 -0
  155. package/dist/components/drop/create/exclusive-fields.cjs +2 -2
  156. package/dist/components/drop/create/exclusive-fields.cjs.map +1 -1
  157. package/dist/components/drop/create/exclusive-fields.d.cts +0 -1
  158. package/dist/components/drop/create/exclusive-fields.d.ts +0 -1
  159. package/dist/components/drop/create/exclusive-fields.js +2 -2
  160. package/dist/components/drop/create/exclusive-fields.js.map +1 -1
  161. package/dist/components/drop/create/launch-dialog.cjs +44 -49
  162. package/dist/components/drop/create/launch-dialog.cjs.map +1 -1
  163. package/dist/components/drop/create/launch-dialog.d.cts +3 -5
  164. package/dist/components/drop/create/launch-dialog.d.ts +3 -5
  165. package/dist/components/drop/create/launch-dialog.js +48 -53
  166. package/dist/components/drop/create/launch-dialog.js.map +1 -1
  167. package/dist/components/drop/create/settings-panel.cjs +97 -0
  168. package/dist/components/drop/create/settings-panel.cjs.map +1 -0
  169. package/dist/components/drop/create/settings-panel.d.cts +10 -0
  170. package/dist/components/drop/create/settings-panel.d.ts +10 -0
  171. package/dist/components/drop/create/settings-panel.js +73 -0
  172. package/dist/components/drop/create/settings-panel.js.map +1 -0
  173. package/dist/components/drop/drop-card.cjs.map +1 -1
  174. package/dist/components/drop/drop-card.d.cts +0 -1
  175. package/dist/components/drop/drop-card.d.ts +0 -1
  176. package/dist/components/drop/drop-card.js.map +1 -1
  177. package/dist/components/drop/drop-features.cjs +4 -4
  178. package/dist/components/drop/drop-features.cjs.map +1 -1
  179. package/dist/components/drop/drop-features.js +4 -4
  180. package/dist/components/drop/drop-features.js.map +1 -1
  181. package/dist/components/drop/drop-listing.cjs +1 -1
  182. package/dist/components/drop/drop-listing.cjs.map +1 -1
  183. package/dist/components/drop/drop-listing.js +1 -1
  184. package/dist/components/drop/drop-listing.js.map +1 -1
  185. package/dist/components/drop/drop-token-link.cjs.map +1 -1
  186. package/dist/components/drop/drop-token-link.d.cts +0 -1
  187. package/dist/components/drop/drop-token-link.d.ts +0 -1
  188. package/dist/components/drop/drop-token-link.js.map +1 -1
  189. package/dist/components/drop/page/drop-manage.cjs +4 -4
  190. package/dist/components/drop/page/drop-manage.cjs.map +1 -1
  191. package/dist/components/drop/page/drop-manage.d.cts +0 -1
  192. package/dist/components/drop/page/drop-manage.d.ts +0 -1
  193. package/dist/components/drop/page/drop-manage.js +4 -4
  194. package/dist/components/drop/page/drop-manage.js.map +1 -1
  195. package/dist/components/drop/page/drop-page.cjs +1 -1
  196. package/dist/components/drop/page/drop-page.cjs.map +1 -1
  197. package/dist/components/drop/page/drop-page.js +1 -1
  198. package/dist/components/drop/page/drop-page.js.map +1 -1
  199. package/dist/components/drops-page.cjs +1 -1
  200. package/dist/components/drops-page.cjs.map +1 -1
  201. package/dist/components/drops-page.js +1 -1
  202. package/dist/components/drops-page.js.map +1 -1
  203. package/dist/components/external-link-field.cjs +1 -1
  204. package/dist/components/external-link-field.cjs.map +1 -1
  205. package/dist/components/external-link-field.js +1 -1
  206. package/dist/components/external-link-field.js.map +1 -1
  207. package/dist/components/fast-mint/asset-form-parts.cjs +1 -1
  208. package/dist/components/fast-mint/asset-form-parts.cjs.map +1 -1
  209. package/dist/components/fast-mint/asset-form-parts.js +1 -1
  210. package/dist/components/fast-mint/asset-form-parts.js.map +1 -1
  211. package/dist/components/fast-mint/collection-section.cjs +2 -2
  212. package/dist/components/fast-mint/collection-section.cjs.map +1 -1
  213. package/dist/components/fast-mint/collection-section.js +2 -2
  214. package/dist/components/fast-mint/collection-section.js.map +1 -1
  215. package/dist/components/fast-mint/dropzone.cjs +1 -1
  216. package/dist/components/fast-mint/dropzone.cjs.map +1 -1
  217. package/dist/components/fast-mint/dropzone.js +1 -1
  218. package/dist/components/fast-mint/dropzone.js.map +1 -1
  219. package/dist/components/fast-mint/fast-mint.cjs +3 -3
  220. package/dist/components/fast-mint/fast-mint.cjs.map +1 -1
  221. package/dist/components/fast-mint/fast-mint.js +3 -3
  222. package/dist/components/fast-mint/fast-mint.js.map +1 -1
  223. package/dist/components/gated-content.cjs +4 -4
  224. package/dist/components/gated-content.cjs.map +1 -1
  225. package/dist/components/gated-content.js +4 -4
  226. package/dist/components/gated-content.js.map +1 -1
  227. package/dist/components/hidden-content-banner.cjs +1 -1
  228. package/dist/components/hidden-content-banner.cjs.map +1 -1
  229. package/dist/components/hidden-content-banner.js +1 -1
  230. package/dist/components/hidden-content-banner.js.map +1 -1
  231. package/dist/components/icon-tile.cjs.map +1 -1
  232. package/dist/components/icon-tile.d.cts +0 -2
  233. package/dist/components/icon-tile.d.ts +0 -2
  234. package/dist/components/icon-tile.js.map +1 -1
  235. package/dist/components/ip-type-display.cjs +1 -1
  236. package/dist/components/ip-type-display.cjs.map +1 -1
  237. package/dist/components/ip-type-display.js +1 -1
  238. package/dist/components/ip-type-display.js.map +1 -1
  239. package/dist/components/ipfs-gateway-fallback.cjs.map +1 -1
  240. package/dist/components/ipfs-gateway-fallback.d.cts +0 -4
  241. package/dist/components/ipfs-gateway-fallback.d.ts +0 -4
  242. package/dist/components/ipfs-gateway-fallback.js.map +1 -1
  243. package/dist/components/journey-content.cjs +4 -4
  244. package/dist/components/journey-content.cjs.map +1 -1
  245. package/dist/components/journey-content.js +4 -4
  246. package/dist/components/journey-content.js.map +1 -1
  247. package/dist/components/launchpad/coin-create.cjs +5 -5
  248. package/dist/components/launchpad/coin-create.cjs.map +1 -1
  249. package/dist/components/launchpad/coin-create.js +5 -5
  250. package/dist/components/launchpad/coin-create.js.map +1 -1
  251. package/dist/components/launchpad/collection-create-form.cjs +1 -1
  252. package/dist/components/launchpad/collection-create-form.cjs.map +1 -1
  253. package/dist/components/launchpad/collection-create-form.js +1 -1
  254. package/dist/components/launchpad/collection-create-form.js.map +1 -1
  255. package/dist/components/launchpad/collection-create-presets.cjs +18 -18
  256. package/dist/components/launchpad/collection-create-presets.cjs.map +1 -1
  257. package/dist/components/launchpad/collection-create-presets.js +18 -18
  258. package/dist/components/launchpad/collection-create-presets.js.map +1 -1
  259. package/dist/components/launchpad/collection-picker.cjs +1 -1
  260. package/dist/components/launchpad/collection-picker.cjs.map +1 -1
  261. package/dist/components/launchpad/collection-picker.js +1 -1
  262. package/dist/components/launchpad/collection-picker.js.map +1 -1
  263. package/dist/components/launchpad/edition-mint-fields.cjs +6 -6
  264. package/dist/components/launchpad/edition-mint-fields.cjs.map +1 -1
  265. package/dist/components/launchpad/edition-mint-fields.js +6 -6
  266. package/dist/components/launchpad/edition-mint-fields.js.map +1 -1
  267. package/dist/components/launchpad/edition-mint.cjs +2 -2
  268. package/dist/components/launchpad/edition-mint.cjs.map +1 -1
  269. package/dist/components/launchpad/edition-mint.js +2 -2
  270. package/dist/components/launchpad/edition-mint.js.map +1 -1
  271. package/dist/components/launchpad/pop-create-fields.cjs +6 -6
  272. package/dist/components/launchpad/pop-create-fields.cjs.map +1 -1
  273. package/dist/components/launchpad/pop-create-fields.js +6 -6
  274. package/dist/components/launchpad/pop-create-fields.js.map +1 -1
  275. package/dist/components/launchpad/pop-create.cjs +3 -3
  276. package/dist/components/launchpad/pop-create.cjs.map +1 -1
  277. package/dist/components/launchpad/pop-create.js +3 -3
  278. package/dist/components/launchpad/pop-create.js.map +1 -1
  279. package/dist/components/launchpad/remix-mint.cjs +6 -6
  280. package/dist/components/launchpad/remix-mint.cjs.map +1 -1
  281. package/dist/components/launchpad/remix-mint.js +6 -6
  282. package/dist/components/launchpad/remix-mint.js.map +1 -1
  283. package/dist/components/launchpad/single-edition-mint.cjs +8 -8
  284. package/dist/components/launchpad/single-edition-mint.cjs.map +1 -1
  285. package/dist/components/launchpad/single-edition-mint.js +8 -8
  286. package/dist/components/launchpad/single-edition-mint.js.map +1 -1
  287. package/dist/components/launchpad/sponsorship-create.cjs +4 -4
  288. package/dist/components/launchpad/sponsorship-create.cjs.map +1 -1
  289. package/dist/components/launchpad/sponsorship-create.js +4 -4
  290. package/dist/components/launchpad/sponsorship-create.js.map +1 -1
  291. package/dist/components/launchpad/tier-mint-form.cjs +1 -1
  292. package/dist/components/launchpad/tier-mint-form.cjs.map +1 -1
  293. package/dist/components/launchpad/tier-mint-form.js +1 -1
  294. package/dist/components/launchpad/tier-mint-form.js.map +1 -1
  295. package/dist/components/launchpad/tier-mint-presets.cjs +2 -2
  296. package/dist/components/launchpad/tier-mint-presets.cjs.map +1 -1
  297. package/dist/components/launchpad/tier-mint-presets.js +2 -2
  298. package/dist/components/launchpad/tier-mint-presets.js.map +1 -1
  299. package/dist/components/launchpad-strip.cjs +2 -2
  300. package/dist/components/launchpad-strip.cjs.map +1 -1
  301. package/dist/components/launchpad-strip.js +2 -2
  302. package/dist/components/launchpad-strip.js.map +1 -1
  303. package/dist/components/license-request-page.cjs +2 -2
  304. package/dist/components/license-request-page.cjs.map +1 -1
  305. package/dist/components/license-request-page.js +2 -2
  306. package/dist/components/license-request-page.js.map +1 -1
  307. package/dist/components/license-terms-builder.cjs +5 -5
  308. package/dist/components/license-terms-builder.cjs.map +1 -1
  309. package/dist/components/license-terms-builder.js +5 -5
  310. package/dist/components/license-terms-builder.js.map +1 -1
  311. package/dist/components/marketplace-filters.cjs +1 -1
  312. package/dist/components/marketplace-filters.cjs.map +1 -1
  313. package/dist/components/marketplace-filters.js +1 -1
  314. package/dist/components/marketplace-filters.js.map +1 -1
  315. package/dist/components/media-wallet/activate-card.cjs +1 -1
  316. package/dist/components/media-wallet/activate-card.cjs.map +1 -1
  317. package/dist/components/media-wallet/activate-card.js +1 -1
  318. package/dist/components/media-wallet/activate-card.js.map +1 -1
  319. package/dist/components/media-wallet/media-wallet-activity.cjs +1 -1
  320. package/dist/components/media-wallet/media-wallet-activity.cjs.map +1 -1
  321. package/dist/components/media-wallet/media-wallet-activity.js +1 -1
  322. package/dist/components/media-wallet/media-wallet-activity.js.map +1 -1
  323. package/dist/components/media-wallet/media-wallet-send.cjs +1 -1
  324. package/dist/components/media-wallet/media-wallet-send.cjs.map +1 -1
  325. package/dist/components/media-wallet/media-wallet-send.js +1 -1
  326. package/dist/components/media-wallet/media-wallet-send.js.map +1 -1
  327. package/dist/components/media-wallet/nft-strip.cjs +1 -1
  328. package/dist/components/media-wallet/nft-strip.cjs.map +1 -1
  329. package/dist/components/media-wallet/nft-strip.js +1 -1
  330. package/dist/components/media-wallet/nft-strip.js.map +1 -1
  331. package/dist/components/media-wallet/receive-card.cjs +1 -1
  332. package/dist/components/media-wallet/receive-card.cjs.map +1 -1
  333. package/dist/components/media-wallet/receive-card.js +1 -1
  334. package/dist/components/media-wallet/receive-card.js.map +1 -1
  335. package/dist/components/nav-command-menu.cjs.map +1 -1
  336. package/dist/components/nav-command-menu.js.map +1 -1
  337. package/dist/components/panel.cjs.map +1 -1
  338. package/dist/components/panel.d.cts +0 -4
  339. package/dist/components/panel.d.ts +0 -4
  340. package/dist/components/panel.js.map +1 -1
  341. package/dist/components/pop-manage-page.cjs +3 -3
  342. package/dist/components/pop-manage-page.cjs.map +1 -1
  343. package/dist/components/pop-manage-page.js +3 -3
  344. package/dist/components/pop-manage-page.js.map +1 -1
  345. package/dist/components/portfolio-collections.cjs +2 -2
  346. package/dist/components/portfolio-collections.cjs.map +1 -1
  347. package/dist/components/portfolio-collections.js +2 -2
  348. package/dist/components/portfolio-collections.js.map +1 -1
  349. package/dist/components/portfolio-orders.cjs +2 -2
  350. package/dist/components/portfolio-orders.cjs.map +1 -1
  351. package/dist/components/portfolio-orders.js +2 -2
  352. package/dist/components/portfolio-orders.js.map +1 -1
  353. package/dist/components/portfolio-shell.cjs +1 -1
  354. package/dist/components/portfolio-shell.cjs.map +1 -1
  355. package/dist/components/portfolio-shell.js +1 -1
  356. package/dist/components/portfolio-shell.js.map +1 -1
  357. package/dist/components/purchase-panel.cjs.map +1 -1
  358. package/dist/components/purchase-panel.d.cts +0 -11
  359. package/dist/components/purchase-panel.d.ts +0 -11
  360. package/dist/components/purchase-panel.js.map +1 -1
  361. package/dist/components/remix-browse-page.cjs +2 -2
  362. package/dist/components/remix-browse-page.cjs.map +1 -1
  363. package/dist/components/remix-browse-page.js +2 -2
  364. package/dist/components/remix-browse-page.js.map +1 -1
  365. package/dist/components/report-dialog.cjs +1 -1
  366. package/dist/components/report-dialog.cjs.map +1 -1
  367. package/dist/components/report-dialog.js +1 -1
  368. package/dist/components/report-dialog.js.map +1 -1
  369. package/dist/components/rewards/leaderboard-panel.cjs +1 -1
  370. package/dist/components/rewards/leaderboard-panel.cjs.map +1 -1
  371. package/dist/components/rewards/leaderboard-panel.js +1 -1
  372. package/dist/components/rewards/leaderboard-panel.js.map +1 -1
  373. package/dist/components/rewards/rewards-dashboard.cjs +3 -3
  374. package/dist/components/rewards/rewards-dashboard.cjs.map +1 -1
  375. package/dist/components/rewards/rewards-dashboard.js +3 -3
  376. package/dist/components/rewards/rewards-dashboard.js.map +1 -1
  377. package/dist/components/rewards-page.cjs +1 -1
  378. package/dist/components/rewards-page.cjs.map +1 -1
  379. package/dist/components/rewards-page.js +1 -1
  380. package/dist/components/rewards-page.js.map +1 -1
  381. package/dist/components/rewards-section.cjs +3 -3
  382. package/dist/components/rewards-section.cjs.map +1 -1
  383. package/dist/components/rewards-section.js +3 -3
  384. package/dist/components/rewards-section.js.map +1 -1
  385. package/dist/components/search-page.cjs +2 -2
  386. package/dist/components/search-page.cjs.map +1 -1
  387. package/dist/components/search-page.js +2 -2
  388. package/dist/components/search-page.js.map +1 -1
  389. package/dist/components/service-collections-page.cjs +2 -2
  390. package/dist/components/service-collections-page.cjs.map +1 -1
  391. package/dist/components/service-collections-page.js +2 -2
  392. package/dist/components/service-collections-page.js.map +1 -1
  393. package/dist/components/sponsorship-offer-page.cjs +1 -1
  394. package/dist/components/sponsorship-offer-page.cjs.map +1 -1
  395. package/dist/components/sponsorship-offer-page.js +1 -1
  396. package/dist/components/sponsorship-offer-page.js.map +1 -1
  397. package/dist/components/sponsorship-offers-page.cjs +4 -4
  398. package/dist/components/sponsorship-offers-page.cjs.map +1 -1
  399. package/dist/components/sponsorship-offers-page.js +4 -4
  400. package/dist/components/sponsorship-offers-page.js.map +1 -1
  401. package/dist/components/transaction-success.cjs.map +1 -1
  402. package/dist/components/transaction-success.d.cts +0 -1
  403. package/dist/components/transaction-success.d.ts +0 -1
  404. package/dist/components/transaction-success.js.map +1 -1
  405. package/dist/components/transfer-collection-ownership.cjs +2 -2
  406. package/dist/components/transfer-collection-ownership.cjs.map +1 -1
  407. package/dist/components/transfer-collection-ownership.js +2 -2
  408. package/dist/components/transfer-collection-ownership.js.map +1 -1
  409. package/dist/components/transfer-dialog.cjs +2 -2
  410. package/dist/components/transfer-dialog.cjs.map +1 -1
  411. package/dist/components/transfer-dialog.js +2 -2
  412. package/dist/components/transfer-dialog.js.map +1 -1
  413. package/dist/components/wallet/self-fund-consent-dialog.cjs +2 -2
  414. package/dist/components/wallet/self-fund-consent-dialog.cjs.map +1 -1
  415. package/dist/components/wallet/self-fund-consent-dialog.js +2 -2
  416. package/dist/components/wallet/self-fund-consent-dialog.js.map +1 -1
  417. package/dist/data/brand.cjs.map +1 -1
  418. package/dist/data/brand.js.map +1 -1
  419. package/dist/data/ip-templates.cjs +9 -9
  420. package/dist/data/ip-templates.cjs.map +1 -1
  421. package/dist/data/ip-templates.js +9 -9
  422. package/dist/data/ip-templates.js.map +1 -1
  423. package/dist/data/ip.cjs +5 -5
  424. package/dist/data/ip.cjs.map +1 -1
  425. package/dist/data/ip.js +5 -5
  426. package/dist/data/ip.js.map +1 -1
  427. package/dist/data/launchpad-services.cjs +38 -38
  428. package/dist/data/launchpad-services.cjs.map +1 -1
  429. package/dist/data/launchpad-services.js +38 -38
  430. package/dist/data/launchpad-services.js.map +1 -1
  431. package/dist/draft-CuU1m9P3.d.cts +85 -0
  432. package/dist/draft-DaQIVRMX.d.ts +85 -0
  433. package/dist/i18n/catalog/pt.cjs +303 -289
  434. package/dist/i18n/catalog/pt.cjs.map +1 -1
  435. package/dist/i18n/catalog/pt.js +303 -289
  436. package/dist/i18n/catalog/pt.js.map +1 -1
  437. package/dist/index.cjs.map +1 -1
  438. package/dist/index.d.cts +4 -4
  439. package/dist/index.d.ts +4 -4
  440. package/dist/index.js.map +1 -1
  441. package/dist/medialane.css +1 -5
  442. package/dist/utils/address.cjs.map +1 -1
  443. package/dist/utils/address.js.map +1 -1
  444. package/dist/utils/asset-accents.cjs.map +1 -1
  445. package/dist/utils/asset-accents.js.map +1 -1
  446. package/dist/utils/describe-error.cjs +8 -9
  447. package/dist/utils/describe-error.cjs.map +1 -1
  448. package/dist/utils/describe-error.d.cts +5 -5
  449. package/dist/utils/describe-error.d.ts +5 -5
  450. package/dist/utils/describe-error.js +8 -9
  451. package/dist/utils/describe-error.js.map +1 -1
  452. package/dist/utils/drop/actions.cjs +1 -1
  453. package/dist/utils/drop/actions.cjs.map +1 -1
  454. package/dist/utils/drop/actions.js +1 -1
  455. package/dist/utils/drop/actions.js.map +1 -1
  456. package/dist/utils/drop/allowlist.cjs.map +1 -1
  457. package/dist/utils/drop/allowlist.d.cts +0 -2
  458. package/dist/utils/drop/allowlist.d.ts +0 -2
  459. package/dist/utils/drop/allowlist.js.map +1 -1
  460. package/dist/utils/drop/claim-proof.cjs.map +1 -1
  461. package/dist/utils/drop/claim-proof.d.cts +0 -5
  462. package/dist/utils/drop/claim-proof.d.ts +0 -5
  463. package/dist/utils/drop/claim-proof.js.map +1 -1
  464. package/dist/utils/drop/draft-store.cjs +133 -0
  465. package/dist/utils/drop/draft-store.cjs.map +1 -0
  466. package/dist/utils/drop/draft-store.d.cts +22 -0
  467. package/dist/utils/drop/draft-store.d.ts +22 -0
  468. package/dist/utils/drop/draft-store.js +107 -0
  469. package/dist/utils/drop/draft-store.js.map +1 -0
  470. package/dist/utils/drop/draft.cjs +61 -34
  471. package/dist/utils/drop/draft.cjs.map +1 -1
  472. package/dist/utils/drop/draft.d.cts +2 -40
  473. package/dist/utils/drop/draft.d.ts +2 -40
  474. package/dist/utils/drop/draft.js +57 -33
  475. package/dist/utils/drop/draft.js.map +1 -1
  476. package/dist/utils/drop/metadata.cjs +35 -16
  477. package/dist/utils/drop/metadata.cjs.map +1 -1
  478. package/dist/utils/drop/metadata.d.cts +3 -33
  479. package/dist/utils/drop/metadata.d.ts +3 -33
  480. package/dist/utils/drop/metadata.js +33 -15
  481. package/dist/utils/drop/metadata.js.map +1 -1
  482. package/dist/utils/drop/preview.cjs.map +1 -1
  483. package/dist/utils/drop/preview.d.cts +0 -1
  484. package/dist/utils/drop/preview.d.ts +0 -1
  485. package/dist/utils/drop/preview.js.map +1 -1
  486. package/dist/utils/drop/receipt.cjs.map +1 -1
  487. package/dist/utils/drop/receipt.d.cts +0 -1
  488. package/dist/utils/drop/receipt.d.ts +0 -1
  489. package/dist/utils/drop/receipt.js.map +1 -1
  490. package/dist/utils/drop/sale.cjs.map +1 -1
  491. package/dist/utils/drop/sale.d.cts +0 -4
  492. package/dist/utils/drop/sale.d.ts +0 -4
  493. package/dist/utils/drop/sale.js.map +1 -1
  494. package/dist/utils/drop/upload.cjs.map +1 -1
  495. package/dist/utils/drop/upload.d.cts +0 -1
  496. package/dist/utils/drop/upload.d.ts +0 -1
  497. package/dist/utils/drop/upload.js.map +1 -1
  498. package/dist/utils/drop/use-now.cjs.map +1 -1
  499. package/dist/utils/drop/use-now.d.cts +0 -1
  500. package/dist/utils/drop/use-now.d.ts +0 -1
  501. package/dist/utils/drop/use-now.js.map +1 -1
  502. package/dist/utils/drop/view.cjs.map +1 -1
  503. package/dist/utils/drop/view.d.cts +0 -2
  504. package/dist/utils/drop/view.d.ts +0 -2
  505. package/dist/utils/drop/view.js.map +1 -1
  506. package/dist/utils/empty-messages.cjs +1 -1
  507. package/dist/utils/empty-messages.cjs.map +1 -1
  508. package/dist/utils/empty-messages.js +1 -1
  509. package/dist/utils/empty-messages.js.map +1 -1
  510. package/dist/utils/ipfs-gateway-fallback.cjs.map +1 -1
  511. package/dist/utils/ipfs-gateway-fallback.d.cts +0 -16
  512. package/dist/utils/ipfs-gateway-fallback.d.ts +0 -16
  513. package/dist/utils/ipfs-gateway-fallback.js.map +1 -1
  514. package/dist/utils/ipfs-upload.cjs +1 -1
  515. package/dist/utils/ipfs-upload.cjs.map +1 -1
  516. package/dist/utils/ipfs-upload.d.cts +1 -1
  517. package/dist/utils/ipfs-upload.d.ts +1 -1
  518. package/dist/utils/ipfs-upload.js +1 -1
  519. package/dist/utils/ipfs-upload.js.map +1 -1
  520. package/dist/utils/proxy-body.cjs.map +1 -1
  521. package/dist/utils/proxy-body.js.map +1 -1
  522. package/dist/utils/success-messages.cjs +8 -8
  523. package/dist/utils/success-messages.cjs.map +1 -1
  524. package/dist/utils/success-messages.js +8 -8
  525. package/dist/utils/success-messages.js.map +1 -1
  526. package/dist/utils/time.cjs.map +1 -1
  527. package/dist/utils/time.js.map +1 -1
  528. package/dist/utils/use-drops.cjs.map +1 -1
  529. package/dist/utils/use-drops.d.cts +0 -2
  530. package/dist/utils/use-drops.d.ts +0 -2
  531. package/dist/utils/use-drops.js.map +1 -1
  532. package/dist/utils/use-payment-options.cjs.map +1 -1
  533. package/dist/utils/use-payment-options.d.cts +0 -7
  534. package/dist/utils/use-payment-options.d.ts +0 -7
  535. package/dist/utils/use-payment-options.js.map +1 -1
  536. package/dist/utils/use-pop.cjs.map +1 -1
  537. package/dist/utils/use-pop.d.cts +0 -1
  538. package/dist/utils/use-pop.d.ts +0 -1
  539. package/dist/utils/use-pop.js.map +1 -1
  540. package/dist/utils/use-tiers.cjs.map +1 -1
  541. package/dist/utils/use-tiers.d.cts +0 -3
  542. package/dist/utils/use-tiers.d.ts +0 -3
  543. package/dist/utils/use-tiers.js.map +1 -1
  544. package/dist/utils/wallet-error.cjs.map +1 -1
  545. package/dist/utils/wallet-error.js.map +1 -1
  546. package/dist/utils/wallet-failure.cjs +8 -8
  547. package/dist/utils/wallet-failure.cjs.map +1 -1
  548. package/dist/utils/wallet-failure.js +8 -8
  549. package/dist/utils/wallet-failure.js.map +1 -1
  550. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/sponsorship-offer-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Handshake, ImageIcon, Loader2 } from \"lucide-react\";\nimport { formatAmount, getTokenByAddress, normalizeAddress } from \"@medialane/sdk\";\nimport { BackButton } from \"./back-button.js\";\nimport Image from \"./image.js\";\nimport { Input } from \"./input.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { RewardEarned } from \"./rewards/reward-earned.js\";\nimport { ServiceHeader } from \"./service-header.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\nimport { useSponsorshipBids, useSponsorshipOffer } from \"../utils/use-sponsorship.js\";\nimport { useToken } from \"../utils/use-tokens.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\nimport { ActionButton } from \"./action-button.js\";\n\ntype Action = \"bid\" | \"accept\";\n\nconst COPY = {\n bid: { title: msg(\"Place bid\"), working: msg(\"Placing your bid…\"), message: successMessages.bidPlaced },\n accept: { title: msg(\"Accept bid\"), working: msg(\"Accepting the bid…\"), message: successMessages.bidAccepted },\n} as const;\n\nexport function SponsorshipOfferPage({ offerId }: { offerId: string }) {\n const t = useT();\n const app = useMedialaneApp();\n const walletAddress = app.walletAddress;\n const resolveImage = useImageUrl();\n const { offer, isLoading, mutate: mutateOffer } = useSponsorshipOffer(offerId);\n const { bids, isLoading: bidsLoading, mutate: mutateBids } = useSponsorshipBids(offerId);\n const { token } = useToken(offer?.nftContract ?? \"\", offer?.tokenId ?? \"\");\n const tx = useTransaction();\n const [action, setAction] = useState<Action>(\"bid\");\n const [amount, setAmount] = useState(\"\");\n const [activeSponsor, setActiveSponsor] = useState<string | null>(null);\n\n useEffect(() => {\n if (tx.phase !== \"success\") return;\n setAmount(\"\");\n void Promise.all([mutateOffer(), mutateBids()]);\n }, [tx.phase, mutateOffer, mutateBids]);\n\n if (isLoading) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">{t(\"Loading offer…\")}</div>;\n }\n if (!offer) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">{t(\"Offer not found.\")}</div>;\n }\n\n const isOwner = !!walletAddress && normalizeAddress(\"STARKNET\", walletAddress) === normalizeAddress(\"STARKNET\", offer.author);\n const paymentToken = getTokenByAddress(offer.paymentToken);\n const busy = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n const name = token?.metadata?.name ?? `Token #${offer.tokenId}`;\n const imageUrl = resolveImage(token?.metadata?.image);\n const minDisplay = paymentToken ? `${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : offer.minAmount;\n const format = (value: string) => (paymentToken ? `${formatAmount(value, paymentToken.decimals)} ${paymentToken.symbol}` : value);\n\n const placeBid = () => {\n if (!walletAddress || !paymentToken) return;\n setAction(\"bid\");\n void tx.run(async (signer) => {\n const value = BigInt(Math.round(Number(amount) * 10 ** paymentToken.decimals));\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid\", { sponsor: walletAddress, offerId: offer.offerId, amount: value.toString(), paymentToken: offer.paymentToken }),\n );\n });\n };\n\n const acceptBid = (sponsor: string) => {\n if (!walletAddress) return;\n setAction(\"accept\");\n setActiveSponsor(sponsor);\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid-accept\", { author: walletAddress, offerId: offer.offerId, sponsor }),\n );\n })\n .finally(() => setActiveSponsor(null));\n };\n\n const copy = COPY[action];\n\n return (\n <div className=\"pb-16\">\n <TransactionDialog tx={tx} title={t(copy.title)} workingLabel={t(copy.working)} firstStepLabel={t(\"Prepare\")}>\n <TransactionSuccess\n name={name}\n {...copy.message(t)}\n txHash={tx.txHash}\n actions={[{ label: t(\"Done\"), onClick: tx.reset }]}\n >\n {action === \"bid\" && <RewardEarned actionType=\"place_sponsorship_bid\" />}\n </TransactionSuccess>\n </TransactionDialog>\n\n <section className=\"px-4 pt-10 max-w-3xl mx-auto space-y-6\">\n <BackButton fallbackHref=\"/launchpad/sponsorship\" />\n <FadeIn>\n <ServiceHeader plain icon={<Handshake className=\"h-4 w-4 text-white\" />} title={name} subtitle={offer.open ? t(\"Open for bids\") : t(\"Closed\")} />\n </FadeIn>\n\n <FadeIn>\n <div className=\"panel overflow-hidden\">\n <div className=\"relative aspect-square bg-muted/40\">\n {imageUrl ? (\n <Image src={imageUrl} alt={name} fill sizes=\"(min-width: 768px) 768px, 100vw\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center\">\n <ImageIcon className=\"h-8 w-8 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n <div className=\"p-5 grid grid-cols-2 sm:grid-cols-4 gap-4 text-sm\">\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Minimum bid\")}</p>\n <p className=\"font-semibold\">{minDisplay}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"License length\")}</p>\n <p className=\"font-semibold\">{Math.round(Number(offer.duration) / 86400)} {t(\"days\")}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Resale royalty\")}</p>\n <p className=\"font-semibold\">{(offer.royaltyBps / 100).toFixed(1)}%</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Owner\")}</p>\n <p className=\"font-semibold\">{shortenAddress(offer.author)}</p>\n </div>\n </div>\n </div>\n </FadeIn>\n\n {!offer.open ? (\n <FadeIn>\n <p className=\"text-sm text-muted-foreground text-center py-6\">{t(\"This offer is no longer open.\")}</p>\n </FadeIn>\n ) : isOwner ? (\n <FadeIn>\n <div className=\"space-y-3\">\n <p className=\"text-sm font-semibold\">{t(\"Bids\")}</p>\n {bidsLoading ? (\n <p className=\"text-xs text-muted-foreground\">{t(\"Loading bids…\")}</p>\n ) : bids.length === 0 ? (\n <p className=\"text-xs text-muted-foreground\">{t(\"No bids yet.\")}</p>\n ) : (\n <div className=\"space-y-2\">\n {bids.map((bid) => (\n <div key={bid.id} className=\"panel flex items-center justify-between gap-3 p-3\">\n <div>\n <p className=\"text-sm font-medium\">{shortenAddress(bid.sponsor)}</p>\n <p className=\"text-xs text-muted-foreground\">{format(bid.amount)}</p>\n </div>\n <ActionButton small disabled={busy} onClick={() => acceptBid(bid.sponsor)}>\n {busy && activeSponsor === bid.sponsor ? <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> : t(\"Accept\")}\n </ActionButton>\n </div>\n ))}\n </div>\n )}\n </div>\n </FadeIn>\n ) : (\n <FadeIn>\n <div className=\"space-y-2\">\n <p className=\"text-sm font-semibold\">{t(\"Place a bid\")}</p>\n <div className=\"flex gap-2\">\n <Input type=\"number\" min={0} step=\"0.01\" placeholder={t(\"Your bid\")} value={amount} onChange={(e) => setAmount(e.target.value)} disabled={busy} />\n <ActionButton solid className=\"shrink-0\" disabled={busy || !walletAddress || !paymentToken || !amount || Number(amount) <= 0} onClick={placeBid}>\n {busy ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : t(\"Place bid\")}\n </ActionButton>\n </div>\n {!walletAddress && (\n <button type=\"button\" className=\"text-xs text-muted-foreground underline\" onClick={app.onRequireWallet}>\n {app.connectLabel ?? t(\"Connect\")} {t(\"to place a bid\")}\n </button>\n )}\n {!paymentToken && <p className=\"text-xs text-destructive\">{t(\"This offer uses a currency the app does not support yet.\")}</p>}\n <p className=\"text-xs text-muted-foreground\">\n {t(\"Placing a bid approves the offer's payment token — no funds move until the owner accepts.\")}\n </p>\n </div>\n </FadeIn>\n )}\n </section>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoDW;AAlDX,mBAAoC;AACpC,0BAA8C;AAC9C,iBAAkE;AAClE,yBAA2B;AAC3B,mBAAkB;AAClB,mBAAsB;AACtB,2BAAgC;AAChC,+BAAuB;AACvB,2BAA6B;AAC7B,4BAA8B;AAC9B,gCAAkC;AAClC,iCAAmC;AACnC,qBAA+B;AAC/B,8BAA+B;AAC/B,2BAA4B;AAC5B,6BAAwD;AACxD,wBAAyB;AACzB,6BAA+B;AAC/B,8BAAgC;AAChC,sBAAqB;AACrB,uBAAoB;AACpB,2BAA6B;AAI7B,MAAM,OAAO;AAAA,EACX,KAAK,EAAE,WAAO,sBAAI,WAAW,GAAG,aAAS,sBAAI,wBAAmB,GAAG,SAAS,wCAAgB,UAAU;AAAA,EACtG,QAAQ,EAAE,WAAO,sBAAI,YAAY,GAAG,aAAS,sBAAI,yBAAoB,GAAG,SAAS,wCAAgB,YAAY;AAC/G;AAEO,SAAS,qBAAqB,EAAE,QAAQ,GAAwB;AACrE,QAAM,QAAI,sBAAK;AACf,QAAM,UAAM,sCAAgB;AAC5B,QAAM,gBAAgB,IAAI;AAC1B,QAAM,mBAAe,kCAAY;AACjC,QAAM,EAAE,OAAO,WAAW,QAAQ,YAAY,QAAI,4CAAoB,OAAO;AAC7E,QAAM,EAAE,MAAM,WAAW,aAAa,QAAQ,WAAW,QAAI,2CAAmB,OAAO;AACvF,QAAM,EAAE,MAAM,QAAI,4BAAS,OAAO,eAAe,IAAI,OAAO,WAAW,EAAE;AACzE,QAAM,SAAK,uCAAe;AAC1B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gB;AAAA,WACxD;AAAA,QAED,CAAC,gBAAgB,4CAAC,OAAE,WAAU,4BAA4B,YAAE,0DAA0D,GAAE;AAAA,QACzH,4CAAC,OAAE,WAAU,iCACV,YAAE,gGAA2F,GAChG;AAAA,SACF,GACF;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":["Image"]}
1
+ {"version":3,"sources":["../../src/components/sponsorship-offer-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Handshake, ImageIcon, Loader2 } from \"lucide-react\";\nimport { formatAmount, getTokenByAddress, normalizeAddress } from \"@medialane/sdk\";\nimport { BackButton } from \"./back-button.js\";\nimport Image from \"./image.js\";\nimport { Input } from \"./input.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { RewardEarned } from \"./rewards/reward-earned.js\";\nimport { ServiceHeader } from \"./service-header.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\nimport { useSponsorshipBids, useSponsorshipOffer } from \"../utils/use-sponsorship.js\";\nimport { useToken } from \"../utils/use-tokens.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\nimport { ActionButton } from \"./action-button.js\";\n\ntype Action = \"bid\" | \"accept\";\n\nconst COPY = {\n bid: { title: msg(\"Place bid\"), working: msg(\"Placing your bid…\"), message: successMessages.bidPlaced },\n accept: { title: msg(\"Accept bid\"), working: msg(\"Accepting the bid…\"), message: successMessages.bidAccepted },\n} as const;\n\nexport function SponsorshipOfferPage({ offerId }: { offerId: string }) {\n const t = useT();\n const app = useMedialaneApp();\n const walletAddress = app.walletAddress;\n const resolveImage = useImageUrl();\n const { offer, isLoading, mutate: mutateOffer } = useSponsorshipOffer(offerId);\n const { bids, isLoading: bidsLoading, mutate: mutateBids } = useSponsorshipBids(offerId);\n const { token } = useToken(offer?.nftContract ?? \"\", offer?.tokenId ?? \"\");\n const tx = useTransaction();\n const [action, setAction] = useState<Action>(\"bid\");\n const [amount, setAmount] = useState(\"\");\n const [activeSponsor, setActiveSponsor] = useState<string | null>(null);\n\n useEffect(() => {\n if (tx.phase !== \"success\") return;\n setAmount(\"\");\n void Promise.all([mutateOffer(), mutateBids()]);\n }, [tx.phase, mutateOffer, mutateBids]);\n\n if (isLoading) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">{t(\"Loading offer…\")}</div>;\n }\n if (!offer) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">{t(\"Offer not found.\")}</div>;\n }\n\n const isOwner = !!walletAddress && normalizeAddress(\"STARKNET\", walletAddress) === normalizeAddress(\"STARKNET\", offer.author);\n const paymentToken = getTokenByAddress(offer.paymentToken);\n const busy = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n const name = token?.metadata?.name ?? `Token #${offer.tokenId}`;\n const imageUrl = resolveImage(token?.metadata?.image);\n const minDisplay = paymentToken ? `${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : offer.minAmount;\n const format = (value: string) => (paymentToken ? `${formatAmount(value, paymentToken.decimals)} ${paymentToken.symbol}` : value);\n\n const placeBid = () => {\n if (!walletAddress || !paymentToken) return;\n setAction(\"bid\");\n void tx.run(async (signer) => {\n const value = BigInt(Math.round(Number(amount) * 10 ** paymentToken.decimals));\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid\", { sponsor: walletAddress, offerId: offer.offerId, amount: value.toString(), paymentToken: offer.paymentToken }),\n );\n });\n };\n\n const acceptBid = (sponsor: string) => {\n if (!walletAddress) return;\n setAction(\"accept\");\n setActiveSponsor(sponsor);\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid-accept\", { author: walletAddress, offerId: offer.offerId, sponsor }),\n );\n })\n .finally(() => setActiveSponsor(null));\n };\n\n const copy = COPY[action];\n\n return (\n <div className=\"pb-16\">\n <TransactionDialog tx={tx} title={t(copy.title)} workingLabel={t(copy.working)} firstStepLabel={t(\"Prepare\")}>\n <TransactionSuccess\n name={name}\n {...copy.message(t)}\n txHash={tx.txHash}\n actions={[{ label: t(\"Done\"), onClick: tx.reset }]}\n >\n {action === \"bid\" && <RewardEarned actionType=\"place_sponsorship_bid\" />}\n </TransactionSuccess>\n </TransactionDialog>\n\n <section className=\"px-4 pt-10 max-w-3xl mx-auto space-y-6\">\n <BackButton fallbackHref=\"/launchpad/sponsorship\" />\n <FadeIn>\n <ServiceHeader plain icon={<Handshake className=\"h-4 w-4 text-white\" />} title={name} subtitle={offer.open ? t(\"Open for bids\") : t(\"Closed\")} />\n </FadeIn>\n\n <FadeIn>\n <div className=\"panel overflow-hidden\">\n <div className=\"relative aspect-square bg-muted/40\">\n {imageUrl ? (\n <Image src={imageUrl} alt={name} fill sizes=\"(min-width: 768px) 768px, 100vw\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center\">\n <ImageIcon className=\"h-8 w-8 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n <div className=\"p-5 grid grid-cols-2 sm:grid-cols-4 gap-4 text-sm\">\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Minimum bid\")}</p>\n <p className=\"font-semibold\">{minDisplay}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"License length\")}</p>\n <p className=\"font-semibold\">{Math.round(Number(offer.duration) / 86400)} {t(\"days\")}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Resale royalty\")}</p>\n <p className=\"font-semibold\">{(offer.royaltyBps / 100).toFixed(1)}%</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Owner\")}</p>\n <p className=\"font-semibold\">{shortenAddress(offer.author)}</p>\n </div>\n </div>\n </div>\n </FadeIn>\n\n {!offer.open ? (\n <FadeIn>\n <p className=\"text-sm text-muted-foreground text-center py-6\">{t(\"This offer is no longer open.\")}</p>\n </FadeIn>\n ) : isOwner ? (\n <FadeIn>\n <div className=\"space-y-3\">\n <p className=\"text-sm font-semibold\">{t(\"Bids\")}</p>\n {bidsLoading ? (\n <p className=\"text-xs text-muted-foreground\">{t(\"Loading bids…\")}</p>\n ) : bids.length === 0 ? (\n <p className=\"text-xs text-muted-foreground\">{t(\"No bids yet.\")}</p>\n ) : (\n <div className=\"space-y-2\">\n {bids.map((bid) => (\n <div key={bid.id} className=\"panel flex items-center justify-between gap-3 p-3\">\n <div>\n <p className=\"text-sm font-medium\">{shortenAddress(bid.sponsor)}</p>\n <p className=\"text-xs text-muted-foreground\">{format(bid.amount)}</p>\n </div>\n <ActionButton small disabled={busy} onClick={() => acceptBid(bid.sponsor)}>\n {busy && activeSponsor === bid.sponsor ? <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> : t(\"Accept\")}\n </ActionButton>\n </div>\n ))}\n </div>\n )}\n </div>\n </FadeIn>\n ) : (\n <FadeIn>\n <div className=\"space-y-2\">\n <p className=\"text-sm font-semibold\">{t(\"Place a bid\")}</p>\n <div className=\"flex gap-2\">\n <Input type=\"number\" min={0} step=\"0.01\" placeholder={t(\"Your bid\")} value={amount} onChange={(e) => setAmount(e.target.value)} disabled={busy} />\n <ActionButton solid className=\"shrink-0\" disabled={busy || !walletAddress || !paymentToken || !amount || Number(amount) <= 0} onClick={placeBid}>\n {busy ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : t(\"Place bid\")}\n </ActionButton>\n </div>\n {!walletAddress && (\n <button type=\"button\" className=\"text-xs text-muted-foreground underline\" onClick={app.onRequireWallet}>\n {app.connectLabel ?? t(\"Connect\")} {t(\"to place a bid\")}\n </button>\n )}\n {!paymentToken && <p className=\"text-xs text-destructive\">{t(\"This offer uses a currency the app does not support yet.\")}</p>}\n <p className=\"text-xs text-muted-foreground\">\n {t(\"Funds move only when the owner accepts.\")}\n </p>\n </div>\n </FadeIn>\n )}\n </section>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoDW;AAlDX,mBAAoC;AACpC,0BAA8C;AAC9C,iBAAkE;AAClE,yBAA2B;AAC3B,mBAAkB;AAClB,mBAAsB;AACtB,2BAAgC;AAChC,+BAAuB;AACvB,2BAA6B;AAC7B,4BAA8B;AAC9B,gCAAkC;AAClC,iCAAmC;AACnC,qBAA+B;AAC/B,8BAA+B;AAC/B,2BAA4B;AAC5B,6BAAwD;AACxD,wBAAyB;AACzB,6BAA+B;AAC/B,8BAAgC;AAChC,sBAAqB;AACrB,uBAAoB;AACpB,2BAA6B;AAI7B,MAAM,OAAO;AAAA,EACX,KAAK,EAAE,WAAO,sBAAI,WAAW,GAAG,aAAS,sBAAI,wBAAmB,GAAG,SAAS,wCAAgB,UAAU;AAAA,EACtG,QAAQ,EAAE,WAAO,sBAAI,YAAY,GAAG,aAAS,sBAAI,yBAAoB,GAAG,SAAS,wCAAgB,YAAY;AAC/G;AAEO,SAAS,qBAAqB,EAAE,QAAQ,GAAwB;AACrE,QAAM,QAAI,sBAAK;AACf,QAAM,UAAM,sCAAgB;AAC5B,QAAM,gBAAgB,IAAI;AAC1B,QAAM,mBAAe,kCAAY;AACjC,QAAM,EAAE,OAAO,WAAW,QAAQ,YAAY,QAAI,4CAAoB,OAAO;AAC7E,QAAM,EAAE,MAAM,WAAW,aAAa,QAAQ,WAAW,QAAI,2CAAmB,OAAO;AACvF,QAAM,EAAE,MAAM,QAAI,4BAAS,OAAO,eAAe,IAAI,OAAO,WAAW,EAAE;AACzE,QAAM,SAAK,uCAAe;AAC1B,QAA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AAA,WACxD;AAAA,QAED,CAAC,gBAAgB,4CAAC,OAAE,WAAU,4BAA4B,YAAE,0DAA0D,GAAE;AAAA,QACzH,4CAAC,OAAE,WAAU,iCACV,YAAE,yCAAyC,GAC9C;AAAA,SACF,GACF;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":["Image"]}
@@ -142,7 +142,7 @@ function SponsorshipOfferPage({ offerId }) {
142
142
  t("to place a bid")
143
143
  ] }),
144
144
  !paymentToken && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: t("This offer uses a currency the app does not support yet.") }),
145
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t("Placing a bid approves the offer's payment token \u2014 no funds move until the owner accepts.") })
145
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t("Funds move only when the owner accepts.") })
146
146
  ] }) })
147
147
  ] })
148
148
  ] });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/sponsorship-offer-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Handshake, ImageIcon, Loader2 } from \"lucide-react\";\nimport { formatAmount, getTokenByAddress, normalizeAddress } from \"@medialane/sdk\";\nimport { BackButton } from \"./back-button.js\";\nimport Image from \"./image.js\";\nimport { Input } from \"./input.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { RewardEarned } from \"./rewards/reward-earned.js\";\nimport { ServiceHeader } from \"./service-header.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\nimport { useSponsorshipBids, useSponsorshipOffer } from \"../utils/use-sponsorship.js\";\nimport { useToken } from \"../utils/use-tokens.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\nimport { ActionButton } from \"./action-button.js\";\n\ntype Action = \"bid\" | \"accept\";\n\nconst COPY = {\n bid: { title: msg(\"Place bid\"), working: msg(\"Placing your bid…\"), message: successMessages.bidPlaced },\n accept: { title: msg(\"Accept bid\"), working: msg(\"Accepting the bid…\"), message: successMessages.bidAccepted },\n} as const;\n\nexport function SponsorshipOfferPage({ offerId }: { offerId: string }) {\n const t = useT();\n const app = useMedialaneApp();\n const walletAddress = app.walletAddress;\n const resolveImage = useImageUrl();\n const { offer, isLoading, mutate: mutateOffer } = useSponsorshipOffer(offerId);\n const { bids, isLoading: bidsLoading, mutate: mutateBids } = useSponsorshipBids(offerId);\n const { token } = useToken(offer?.nftContract ?? \"\", offer?.tokenId ?? \"\");\n const tx = useTransaction();\n const [action, setAction] = useState<Action>(\"bid\");\n const [amount, setAmount] = useState(\"\");\n const [activeSponsor, setActiveSponsor] = useState<string | null>(null);\n\n useEffect(() => {\n if (tx.phase !== \"success\") return;\n setAmount(\"\");\n void Promise.all([mutateOffer(), mutateBids()]);\n }, [tx.phase, mutateOffer, mutateBids]);\n\n if (isLoading) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">{t(\"Loading offer…\")}</div>;\n }\n if (!offer) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">{t(\"Offer not found.\")}</div>;\n }\n\n const isOwner = !!walletAddress && normalizeAddress(\"STARKNET\", walletAddress) === normalizeAddress(\"STARKNET\", offer.author);\n const paymentToken = getTokenByAddress(offer.paymentToken);\n const busy = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n const name = token?.metadata?.name ?? `Token #${offer.tokenId}`;\n const imageUrl = resolveImage(token?.metadata?.image);\n const minDisplay = paymentToken ? `${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : offer.minAmount;\n const format = (value: string) => (paymentToken ? `${formatAmount(value, paymentToken.decimals)} ${paymentToken.symbol}` : value);\n\n const placeBid = () => {\n if (!walletAddress || !paymentToken) return;\n setAction(\"bid\");\n void tx.run(async (signer) => {\n const value = BigInt(Math.round(Number(amount) * 10 ** paymentToken.decimals));\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid\", { sponsor: walletAddress, offerId: offer.offerId, amount: value.toString(), paymentToken: offer.paymentToken }),\n );\n });\n };\n\n const acceptBid = (sponsor: string) => {\n if (!walletAddress) return;\n setAction(\"accept\");\n setActiveSponsor(sponsor);\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid-accept\", { author: walletAddress, offerId: offer.offerId, sponsor }),\n );\n })\n .finally(() => setActiveSponsor(null));\n };\n\n const copy = COPY[action];\n\n return (\n <div className=\"pb-16\">\n <TransactionDialog tx={tx} title={t(copy.title)} workingLabel={t(copy.working)} firstStepLabel={t(\"Prepare\")}>\n <TransactionSuccess\n name={name}\n {...copy.message(t)}\n txHash={tx.txHash}\n actions={[{ label: t(\"Done\"), onClick: tx.reset }]}\n >\n {action === \"bid\" && <RewardEarned actionType=\"place_sponsorship_bid\" />}\n </TransactionSuccess>\n </TransactionDialog>\n\n <section className=\"px-4 pt-10 max-w-3xl mx-auto space-y-6\">\n <BackButton fallbackHref=\"/launchpad/sponsorship\" />\n <FadeIn>\n <ServiceHeader plain icon={<Handshake className=\"h-4 w-4 text-white\" />} title={name} subtitle={offer.open ? t(\"Open for bids\") : t(\"Closed\")} />\n </FadeIn>\n\n <FadeIn>\n <div className=\"panel overflow-hidden\">\n <div className=\"relative aspect-square bg-muted/40\">\n {imageUrl ? (\n <Image src={imageUrl} alt={name} fill sizes=\"(min-width: 768px) 768px, 100vw\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center\">\n <ImageIcon className=\"h-8 w-8 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n <div className=\"p-5 grid grid-cols-2 sm:grid-cols-4 gap-4 text-sm\">\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Minimum bid\")}</p>\n <p className=\"font-semibold\">{minDisplay}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"License length\")}</p>\n <p className=\"font-semibold\">{Math.round(Number(offer.duration) / 86400)} {t(\"days\")}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Resale royalty\")}</p>\n <p className=\"font-semibold\">{(offer.royaltyBps / 100).toFixed(1)}%</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Owner\")}</p>\n <p className=\"font-semibold\">{shortenAddress(offer.author)}</p>\n </div>\n </div>\n </div>\n </FadeIn>\n\n {!offer.open ? (\n <FadeIn>\n <p className=\"text-sm text-muted-foreground text-center py-6\">{t(\"This offer is no longer open.\")}</p>\n </FadeIn>\n ) : isOwner ? (\n <FadeIn>\n <div className=\"space-y-3\">\n <p className=\"text-sm font-semibold\">{t(\"Bids\")}</p>\n {bidsLoading ? (\n <p className=\"text-xs text-muted-foreground\">{t(\"Loading bids…\")}</p>\n ) : bids.length === 0 ? (\n <p className=\"text-xs text-muted-foreground\">{t(\"No bids yet.\")}</p>\n ) : (\n <div className=\"space-y-2\">\n {bids.map((bid) => (\n <div key={bid.id} className=\"panel flex items-center justify-between gap-3 p-3\">\n <div>\n <p className=\"text-sm font-medium\">{shortenAddress(bid.sponsor)}</p>\n <p className=\"text-xs text-muted-foreground\">{format(bid.amount)}</p>\n </div>\n <ActionButton small disabled={busy} onClick={() => acceptBid(bid.sponsor)}>\n {busy && activeSponsor === bid.sponsor ? <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> : t(\"Accept\")}\n </ActionButton>\n </div>\n ))}\n </div>\n )}\n </div>\n </FadeIn>\n ) : (\n <FadeIn>\n <div className=\"space-y-2\">\n <p className=\"text-sm font-semibold\">{t(\"Place a bid\")}</p>\n <div className=\"flex gap-2\">\n <Input type=\"number\" min={0} step=\"0.01\" placeholder={t(\"Your bid\")} value={amount} onChange={(e) => setAmount(e.target.value)} disabled={busy} />\n <ActionButton solid className=\"shrink-0\" disabled={busy || !walletAddress || !paymentToken || !amount || Number(amount) <= 0} onClick={placeBid}>\n {busy ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : t(\"Place bid\")}\n </ActionButton>\n </div>\n {!walletAddress && (\n <button type=\"button\" className=\"text-xs text-muted-foreground underline\" onClick={app.onRequireWallet}>\n {app.connectLabel ?? t(\"Connect\")} {t(\"to place a bid\")}\n </button>\n )}\n {!paymentToken && <p className=\"text-xs text-destructive\">{t(\"This offer uses a currency the app does not support yet.\")}</p>}\n <p className=\"text-xs text-muted-foreground\">\n {t(\"Placing a bid approves the offer's payment token — no funds move until the owner accepts.\")}\n </p>\n </div>\n </FadeIn>\n )}\n </section>\n </div>\n );\n}\n"],"mappings":";AAoDW,cAuEG,YAvEH;AAlDX,SAAS,WAAW,gBAAgB;AACpC,SAAS,WAAW,WAAW,eAAe;AAC9C,SAAS,cAAc,mBAAmB,wBAAwB;AAClE,SAAS,kBAAkB;AAC3B,OAAO,WAAW;AAClB,SAAS,aAAa;AACtB,SAAS,uBAAuB;AAChC,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB,2BAA2B;AACxD,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,oBAAoB;AAI7B,MAAM,OAAO;AAAA,EACX,KAAK,EAAE,OAAO,IAAI,WAAW,GAAG,SAAS,IAAI,wBAAmB,GAAG,SAAS,gBAAgB,UAAU;AAAA,EACtG,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AAO,QAAQ,UAAU,CAAC,MAAM,UAAU,EAAE,OAAO,KAAK,GAAG,UAAU,MAAM;AAAA,UAChJ,oBAAC,gBAAa,OAAK,MAAC,WAAU,YAAW,UAAU,QAAQ,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,UAAU,OAAO,MAAM,KAAK,GAAG,SAAS,UACpI,iBAAO,oBAAC,WAAQ,WAAU,wBAAuB,IAAK,EAAE,WAAW,GACtE;AAAA,WACF;AAAA,QACC,CAAC,iBACA,qBAAC,YAAO,MAAK,UAAS,WAAU,2CAA0C,SAAS,IAAI,iBACpF;AAAA,cAAI,gBAAgB,EAAE,SAAS;AAAA,UAAE;AAAA,UAAE,EAAE,gBAAgB;AAAA,WACxD;AAAA,QAED,CAAC,gBAAgB,oBAAC,OAAE,WAAU,4BAA4B,YAAE,0DAA0D,GAAE;AAAA,QACzH,oBAAC,OAAE,WAAU,iCACV,YAAE,gGAA2F,GAChG;AAAA,SACF,GACF;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/sponsorship-offer-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Handshake, ImageIcon, Loader2 } from \"lucide-react\";\nimport { formatAmount, getTokenByAddress, normalizeAddress } from \"@medialane/sdk\";\nimport { BackButton } from \"./back-button.js\";\nimport Image from \"./image.js\";\nimport { Input } from \"./input.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { RewardEarned } from \"./rewards/reward-earned.js\";\nimport { ServiceHeader } from \"./service-header.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\nimport { useSponsorshipBids, useSponsorshipOffer } from \"../utils/use-sponsorship.js\";\nimport { useToken } from \"../utils/use-tokens.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\nimport { ActionButton } from \"./action-button.js\";\n\ntype Action = \"bid\" | \"accept\";\n\nconst COPY = {\n bid: { title: msg(\"Place bid\"), working: msg(\"Placing your bid…\"), message: successMessages.bidPlaced },\n accept: { title: msg(\"Accept bid\"), working: msg(\"Accepting the bid…\"), message: successMessages.bidAccepted },\n} as const;\n\nexport function SponsorshipOfferPage({ offerId }: { offerId: string }) {\n const t = useT();\n const app = useMedialaneApp();\n const walletAddress = app.walletAddress;\n const resolveImage = useImageUrl();\n const { offer, isLoading, mutate: mutateOffer } = useSponsorshipOffer(offerId);\n const { bids, isLoading: bidsLoading, mutate: mutateBids } = useSponsorshipBids(offerId);\n const { token } = useToken(offer?.nftContract ?? \"\", offer?.tokenId ?? \"\");\n const tx = useTransaction();\n const [action, setAction] = useState<Action>(\"bid\");\n const [amount, setAmount] = useState(\"\");\n const [activeSponsor, setActiveSponsor] = useState<string | null>(null);\n\n useEffect(() => {\n if (tx.phase !== \"success\") return;\n setAmount(\"\");\n void Promise.all([mutateOffer(), mutateBids()]);\n }, [tx.phase, mutateOffer, mutateBids]);\n\n if (isLoading) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">{t(\"Loading offer…\")}</div>;\n }\n if (!offer) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">{t(\"Offer not found.\")}</div>;\n }\n\n const isOwner = !!walletAddress && normalizeAddress(\"STARKNET\", walletAddress) === normalizeAddress(\"STARKNET\", offer.author);\n const paymentToken = getTokenByAddress(offer.paymentToken);\n const busy = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n const name = token?.metadata?.name ?? `Token #${offer.tokenId}`;\n const imageUrl = resolveImage(token?.metadata?.image);\n const minDisplay = paymentToken ? `${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : offer.minAmount;\n const format = (value: string) => (paymentToken ? `${formatAmount(value, paymentToken.decimals)} ${paymentToken.symbol}` : value);\n\n const placeBid = () => {\n if (!walletAddress || !paymentToken) return;\n setAction(\"bid\");\n void tx.run(async (signer) => {\n const value = BigInt(Math.round(Number(amount) * 10 ** paymentToken.decimals));\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid\", { sponsor: walletAddress, offerId: offer.offerId, amount: value.toString(), paymentToken: offer.paymentToken }),\n );\n });\n };\n\n const acceptBid = (sponsor: string) => {\n if (!walletAddress) return;\n setAction(\"accept\");\n setActiveSponsor(sponsor);\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid-accept\", { author: walletAddress, offerId: offer.offerId, sponsor }),\n );\n })\n .finally(() => setActiveSponsor(null));\n };\n\n const copy = COPY[action];\n\n return (\n <div className=\"pb-16\">\n <TransactionDialog tx={tx} title={t(copy.title)} workingLabel={t(copy.working)} firstStepLabel={t(\"Prepare\")}>\n <TransactionSuccess\n name={name}\n {...copy.message(t)}\n txHash={tx.txHash}\n actions={[{ label: t(\"Done\"), onClick: tx.reset }]}\n >\n {action === \"bid\" && <RewardEarned actionType=\"place_sponsorship_bid\" />}\n </TransactionSuccess>\n </TransactionDialog>\n\n <section className=\"px-4 pt-10 max-w-3xl mx-auto space-y-6\">\n <BackButton fallbackHref=\"/launchpad/sponsorship\" />\n <FadeIn>\n <ServiceHeader plain icon={<Handshake className=\"h-4 w-4 text-white\" />} title={name} subtitle={offer.open ? t(\"Open for bids\") : t(\"Closed\")} />\n </FadeIn>\n\n <FadeIn>\n <div className=\"panel overflow-hidden\">\n <div className=\"relative aspect-square bg-muted/40\">\n {imageUrl ? (\n <Image src={imageUrl} alt={name} fill sizes=\"(min-width: 768px) 768px, 100vw\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center\">\n <ImageIcon className=\"h-8 w-8 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n <div className=\"p-5 grid grid-cols-2 sm:grid-cols-4 gap-4 text-sm\">\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Minimum bid\")}</p>\n <p className=\"font-semibold\">{minDisplay}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"License length\")}</p>\n <p className=\"font-semibold\">{Math.round(Number(offer.duration) / 86400)} {t(\"days\")}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Resale royalty\")}</p>\n <p className=\"font-semibold\">{(offer.royaltyBps / 100).toFixed(1)}%</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">{t(\"Owner\")}</p>\n <p className=\"font-semibold\">{shortenAddress(offer.author)}</p>\n </div>\n </div>\n </div>\n </FadeIn>\n\n {!offer.open ? (\n <FadeIn>\n <p className=\"text-sm text-muted-foreground text-center py-6\">{t(\"This offer is no longer open.\")}</p>\n </FadeIn>\n ) : isOwner ? (\n <FadeIn>\n <div className=\"space-y-3\">\n <p className=\"text-sm font-semibold\">{t(\"Bids\")}</p>\n {bidsLoading ? (\n <p className=\"text-xs text-muted-foreground\">{t(\"Loading bids…\")}</p>\n ) : bids.length === 0 ? (\n <p className=\"text-xs text-muted-foreground\">{t(\"No bids yet.\")}</p>\n ) : (\n <div className=\"space-y-2\">\n {bids.map((bid) => (\n <div key={bid.id} className=\"panel flex items-center justify-between gap-3 p-3\">\n <div>\n <p className=\"text-sm font-medium\">{shortenAddress(bid.sponsor)}</p>\n <p className=\"text-xs text-muted-foreground\">{format(bid.amount)}</p>\n </div>\n <ActionButton small disabled={busy} onClick={() => acceptBid(bid.sponsor)}>\n {busy && activeSponsor === bid.sponsor ? <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> : t(\"Accept\")}\n </ActionButton>\n </div>\n ))}\n </div>\n )}\n </div>\n </FadeIn>\n ) : (\n <FadeIn>\n <div className=\"space-y-2\">\n <p className=\"text-sm font-semibold\">{t(\"Place a bid\")}</p>\n <div className=\"flex gap-2\">\n <Input type=\"number\" min={0} step=\"0.01\" placeholder={t(\"Your bid\")} value={amount} onChange={(e) => setAmount(e.target.value)} disabled={busy} />\n <ActionButton solid className=\"shrink-0\" disabled={busy || !walletAddress || !paymentToken || !amount || Number(amount) <= 0} onClick={placeBid}>\n {busy ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : t(\"Place bid\")}\n </ActionButton>\n </div>\n {!walletAddress && (\n <button type=\"button\" className=\"text-xs text-muted-foreground underline\" onClick={app.onRequireWallet}>\n {app.connectLabel ?? t(\"Connect\")} {t(\"to place a bid\")}\n </button>\n )}\n {!paymentToken && <p className=\"text-xs text-destructive\">{t(\"This offer uses a currency the app does not support yet.\")}</p>}\n <p className=\"text-xs text-muted-foreground\">\n {t(\"Funds move only when the owner accepts.\")}\n </p>\n </div>\n </FadeIn>\n )}\n </section>\n </div>\n );\n}\n"],"mappings":";AAoDW,cAuEG,YAvEH;AAlDX,SAAS,WAAW,gBAAgB;AACpC,SAAS,WAAW,WAAW,eAAe;AAC9C,SAAS,cAAc,mBAAmB,wBAAwB;AAClE,SAAS,kBAAkB;AAC3B,OAAO,WAAW;AAClB,SAAS,aAAa;AACtB,SAAS,uBAAuB;AAChC,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB,2BAA2B;AACxD,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,oBAAoB;AAI7B,MAAM,OAAO;AAAA,EACX,KAAK,EAAE,OAAO,IAAI,WAAW,GAAG,SAAS,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AS,KAAK,GAAG,MAAK,QAAO,aAAa,EAAE,UAAU,GAAG,OAAO,QAAQ,UAAU,CAAC,MAAM,UAAU,EAAE,OAAO,KAAK,GAAG,UAAU,MAAM;AAAA,UAChJ,oBAAC,gBAAa,OAAK,MAAC,WAAU,YAAW,UAAU,QAAQ,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,UAAU,OAAO,MAAM,KAAK,GAAG,SAAS,UACpI,iBAAO,oBAAC,WAAQ,WAAU,wBAAuB,IAAK,EAAE,WAAW,GACtE;AAAA,WACF;AAAA,QACC,CAAC,iBACA,qBAAC,YAAO,MAAK,UAAS,WAAU,2CAA0C,SAAS,IAAI,iBACpF;AAAA,cAAI,gBAAgB,EAAE,SAAS;AAAA,UAAE;AAAA,UAAE,EAAE,gBAAgB;AAAA,WACxD;AAAA,QAED,CAAC,gBAAgB,oBAAC,OAAE,WAAU,4BAA4B,YAAE,0DAA0D,GAAE;AAAA,QACzH,oBAAC,OAAE,WAAU,iCACV,YAAE,yCAAyC,GAC9C;AAAA,SACF,GACF;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
@@ -49,7 +49,7 @@ var import_action_button = require("./action-button.js");
49
49
  var import_panel = require("./panel.js");
50
50
  var import_icon_tile = require("./icon-tile.js");
51
51
  const FEATURES = [
52
- (0, import_translate.msg)("No escrow \u2014 direct settlement"),
52
+ (0, import_translate.msg)("Direct settlement"),
53
53
  (0, import_translate.msg)("Owner-verified on-chain"),
54
54
  (0, import_translate.msg)("Open bidding or one invited sponsor")
55
55
  ];
@@ -83,7 +83,7 @@ function SponsorshipOffersPage() {
83
83
  plain: true,
84
84
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Handshake, { className: "h-4 w-4 text-white" }),
85
85
  title: t("IP Sponsorship"),
86
- subtitle: t("Sponsorship offers anchored to your IP assets \u2014 a sponsor bids, you accept, they receive a license.")
86
+ subtitle: t("Sponsors bid for a license.")
87
87
  }
88
88
  ) }) })
89
89
  ] }),
@@ -94,7 +94,7 @@ function SponsorshipOffersPage() {
94
94
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { className: "px-4 max-w-5xl mx-auto", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "panel p-5 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between", style: (0, import_panel.panelTint)("rose"), children: [
95
95
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-0.5", children: [
96
96
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold", children: t("Start a sponsorship deal") }),
97
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: t("Offer one of your assets for sponsors to bid on, or propose terms directly on one you'd like to sponsor.") })
97
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: t("Open an asset to sponsors.") })
98
98
  ] }),
99
99
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { solid: true, small: true, asChild: true, className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: "/launchpad/sponsorship/create", children: [
100
100
  t("Get started"),
@@ -110,7 +110,7 @@ function SponsorshipOffersPage() {
110
110
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_tile.IconTile, { size: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Handshake, {}) }) }),
111
111
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1", children: [
112
112
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-semibold text-sm", children: t("No open sponsorship offers yet") }),
113
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: t("Creators open offers from their asset pages \u2014 sponsors bid on them here.") })
113
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: t("Sponsors bid on open offers here.") })
114
114
  ] })
115
115
  ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.Stagger, { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4", children: openOffers.map((offer) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.StaggerItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OfferCard, { offer }) }, offer.id)) })
116
116
  ] })
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/sponsorship-offers-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { ArrowRight, Check, Handshake } from \"lucide-react\";\nimport { formatAmount, getTokenByAddress, type ApiSponsorshipOffer } from \"@medialane/sdk\";\nimport { AssetCard, AssetCardSkeleton } from \"./asset-card.js\";\nimport { BackButton } from \"./back-button.js\";\nimport Link from \"./link.js\";\nimport { FadeIn, Stagger, StaggerItem } from \"./motion-primitives.js\";\nimport { ServiceHeader } from \"./service-header.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { useSponsorshipOffers } from \"../utils/use-sponsorship.js\";\nimport { useToken } from \"../utils/use-tokens.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nimport { msg } from \"../i18n/translate.js\";\nimport { ActionButton } from \"./action-button.js\";\nimport { panelTint } from \"./panel.js\";\nimport { IconTile } from \"./icon-tile.js\";\nconst FEATURES = [\n msg(\"No escrow — direct settlement\"),\n msg(\"Owner-verified on-chain\"),\n msg(\"Open bidding or one invited sponsor\"),\n];\n\nfunction OfferCard({ offer }: { offer: ApiSponsorshipOffer }) {\n const { token } = useToken(offer.nftContract, offer.tokenId);\n const paymentToken = getTokenByAddress(offer.paymentToken);\n const min = paymentToken ? `Min ${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : `Min ${offer.minAmount}`;\n const days = Math.round(Number(offer.duration) / 86400);\n\n return (\n <AssetCard\n href={`/launchpad/sponsorship/${offer.offerId}`}\n name={token?.metadata?.name ?? `Token #${offer.tokenId}`}\n image={token?.metadata?.image ?? null}\n subtitle={shortenAddress(offer.nftContract)}\n fallbackId={offer.tokenId}\n price={{ formatted: `${min} · ${days}d`, currency: null }}\n />\n );\n}\n\nexport function SponsorshipOffersPage() {\n const t = useT();\n const { offers, isLoading } = useSponsorshipOffers();\n const openOffers = offers.filter((o) => o.open);\n\n return (\n <div className=\"pb-16 space-y-10\">\n <section className=\"px-4 pt-10 max-w-5xl mx-auto\">\n <BackButton />\n <FadeIn>\n <div className=\"mt-6\">\n <ServiceHeader\n plain\n icon={<Handshake className=\"h-4 w-4 text-white\" />}\n title={t(\"IP Sponsorship\")}\n subtitle={t(\"Sponsorship offers anchored to your IP assets — a sponsor bids, you accept, they receive a license.\")}\n />\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div className=\"flex flex-wrap gap-2\">\n {FEATURES.map((f) => (\n <span key={f} className=\"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium text-muted-foreground bg-background/40\">\n <Check className=\"h-3 w-3 text-brand-rose shrink-0\" />\n {t(f)}\n </span>\n ))}\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div className=\"panel p-5 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between\" style={panelTint(\"rose\")}>\n <div className=\"space-y-0.5\">\n <p className=\"text-sm font-semibold\">{t(\"Start a sponsorship deal\")}</p>\n <p className=\"text-xs text-muted-foreground\">\n {t(\"Offer one of your assets for sponsors to bid on, or propose terms directly on one you'd like to sponsor.\")}\n </p>\n </div>\n <ActionButton solid small asChild className=\"shrink-0\">\n <Link href=\"/launchpad/sponsorship/create\">\n {t(\"Get started\")}\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </Link>\n </ActionButton>\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 space-y-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div>\n <p className=\"section-label\">{t(\"Open\")}</p>\n <h2 className=\"text-xl font-bold mt-0.5\">{t(\"Sponsorship offers\")}</h2>\n </div>\n </FadeIn>\n\n {isLoading ? (\n <div className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4\">\n {Array.from({ length: 8 }).map((_, i) => <AssetCardSkeleton key={i} />)}\n </div>\n ) : openOffers.length === 0 ? (\n <FadeIn>\n <div className=\"panel relative overflow-hidden p-12 text-center space-y-4\">\n <div className=\"flex justify-center\">\n <IconTile size=\"lg\">\n <Handshake />\n </IconTile>\n </div>\n <div className=\"space-y-1\">\n <p className=\"font-semibold text-sm\">{t(\"No open sponsorship offers yet\")}</p>\n <p className=\"text-xs text-muted-foreground\">{t(\"Creators open offers from their asset pages — sponsors bid on them here.\")}</p>\n </div>\n </div>\n </FadeIn>\n ) : (\n <Stagger className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4\">\n {openOffers.map((offer) => (\n <StaggerItem key={offer.id}>\n <OfferCard offer={offer} />\n </StaggerItem>\n ))}\n </Stagger>\n )}\n </section>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BI;AA7BJ,0BAA6C;AAC7C,iBAA0E;AAC1E,wBAA6C;AAC7C,yBAA2B;AAC3B,kBAAiB;AACjB,+BAA6C;AAC7C,4BAA8B;AAC9B,qBAA+B;AAC/B,6BAAqC;AACrC,wBAAyB;AACzB,sBAAqB;AAErB,uBAAoB;AACpB,2BAA6B;AAC7B,mBAA0B;AAC1B,uBAAyB;AACzB,MAAM,WAAW;AAAA,MACf,sBAAI,oCAA+B;AAAA,MACnC,sBAAI,yBAAyB;AAAA,MAC7B,sBAAI,qCAAqC;AAC3C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,IAEA,4CAAC,oCAAQ,WAAU,wDAChB,qBAAW,IAAI,CAAC,UACf,4CAAC,wCACC,sDAAC,aAAU,OAAc,KADT,MAAM,EAExB,CACD,GACH;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":["Link"]}
1
+ {"version":3,"sources":["../../src/components/sponsorship-offers-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { ArrowRight, Check, Handshake } from \"lucide-react\";\nimport { formatAmount, getTokenByAddress, type ApiSponsorshipOffer } from \"@medialane/sdk\";\nimport { AssetCard, AssetCardSkeleton } from \"./asset-card.js\";\nimport { BackButton } from \"./back-button.js\";\nimport Link from \"./link.js\";\nimport { FadeIn, Stagger, StaggerItem } from \"./motion-primitives.js\";\nimport { ServiceHeader } from \"./service-header.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { useSponsorshipOffers } from \"../utils/use-sponsorship.js\";\nimport { useToken } from \"../utils/use-tokens.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nimport { msg } from \"../i18n/translate.js\";\nimport { ActionButton } from \"./action-button.js\";\nimport { panelTint } from \"./panel.js\";\nimport { IconTile } from \"./icon-tile.js\";\nconst FEATURES = [\n msg(\"Direct settlement\"),\n msg(\"Owner-verified on-chain\"),\n msg(\"Open bidding or one invited sponsor\"),\n];\n\nfunction OfferCard({ offer }: { offer: ApiSponsorshipOffer }) {\n const { token } = useToken(offer.nftContract, offer.tokenId);\n const paymentToken = getTokenByAddress(offer.paymentToken);\n const min = paymentToken ? `Min ${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : `Min ${offer.minAmount}`;\n const days = Math.round(Number(offer.duration) / 86400);\n\n return (\n <AssetCard\n href={`/launchpad/sponsorship/${offer.offerId}`}\n name={token?.metadata?.name ?? `Token #${offer.tokenId}`}\n image={token?.metadata?.image ?? null}\n subtitle={shortenAddress(offer.nftContract)}\n fallbackId={offer.tokenId}\n price={{ formatted: `${min} · ${days}d`, currency: null }}\n />\n );\n}\n\nexport function SponsorshipOffersPage() {\n const t = useT();\n const { offers, isLoading } = useSponsorshipOffers();\n const openOffers = offers.filter((o) => o.open);\n\n return (\n <div className=\"pb-16 space-y-10\">\n <section className=\"px-4 pt-10 max-w-5xl mx-auto\">\n <BackButton />\n <FadeIn>\n <div className=\"mt-6\">\n <ServiceHeader\n plain\n icon={<Handshake className=\"h-4 w-4 text-white\" />}\n title={t(\"IP Sponsorship\")}\n subtitle={t(\"Sponsors bid for a license.\")}\n />\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div className=\"flex flex-wrap gap-2\">\n {FEATURES.map((f) => (\n <span key={f} className=\"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium text-muted-foreground bg-background/40\">\n <Check className=\"h-3 w-3 text-brand-rose shrink-0\" />\n {t(f)}\n </span>\n ))}\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div className=\"panel p-5 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between\" style={panelTint(\"rose\")}>\n <div className=\"space-y-0.5\">\n <p className=\"text-sm font-semibold\">{t(\"Start a sponsorship deal\")}</p>\n <p className=\"text-xs text-muted-foreground\">\n {t(\"Open an asset to sponsors.\")}\n </p>\n </div>\n <ActionButton solid small asChild className=\"shrink-0\">\n <Link href=\"/launchpad/sponsorship/create\">\n {t(\"Get started\")}\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </Link>\n </ActionButton>\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 space-y-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div>\n <p className=\"section-label\">{t(\"Open\")}</p>\n <h2 className=\"text-xl font-bold mt-0.5\">{t(\"Sponsorship offers\")}</h2>\n </div>\n </FadeIn>\n\n {isLoading ? (\n <div className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4\">\n {Array.from({ length: 8 }).map((_, i) => <AssetCardSkeleton key={i} />)}\n </div>\n ) : openOffers.length === 0 ? (\n <FadeIn>\n <div className=\"panel relative overflow-hidden p-12 text-center space-y-4\">\n <div className=\"flex justify-center\">\n <IconTile size=\"lg\">\n <Handshake />\n </IconTile>\n </div>\n <div className=\"space-y-1\">\n <p className=\"font-semibold text-sm\">{t(\"No open sponsorship offers yet\")}</p>\n <p className=\"text-xs text-muted-foreground\">{t(\"Sponsors bid on open offers here.\")}</p>\n </div>\n </div>\n </FadeIn>\n ) : (\n <Stagger className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4\">\n {openOffers.map((offer) => (\n <StaggerItem key={offer.id}>\n <OfferCard offer={offer} />\n </StaggerItem>\n ))}\n </Stagger>\n )}\n </section>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BI;AA7BJ,0BAA6C;AAC7C,iBAA0E;AAC1E,wBAA6C;AAC7C,yBAA2B;AAC3B,kBAAiB;AACjB,+BAA6C;AAC7C,4BAA8B;AAC9B,qBAA+B;AAC/B,6BAAqC;AACrC,wBAAyB;AACzB,sBAAqB;AAErB,uBAAoB;AACpB,2BAA6B;AAC7B,mBAA0B;AAC1B,uBAAyB;AACzB,MAAM,WAAW;AAAA,MACf,sBAAI,mBAAmB;AAAA,MACvB,sBAAI,yBAAyB;AAAA,MAC7B,sBAAI,qCAAqC;AAC3C;AAEA,SAAS,UAAU,EAAE,MAAM,GAAmC;AAC5D,QAAM,EAAE,MAAM,QAAI,4BAAS,MAAM,aAAa,MAAM,OAAO;AAC3D,QAAM,mBAAe,8BAAkB,MAAM,YAAY;AACzD,QAAM,MAAM,eAAe,WAAO,yBAAa,MAAM,WAAW,aAAa,QAAQ,CAAC,IAAI,aAAa,MAAM,KAAK,OAAO,MAAM,SAAS;AACxI,QAAM,OAAO,KAAK,MAAM,OAAO,MAAM,QAAQ,IAAI,KAAK;AAEtD,SACE;AAAA,IAAC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AA4B,GACjC;AAAA,SACF;AAAA,MACA,4CAAC,qCAAa,OAAK,MAAC,OAAK,MAAC,SAAO,MAAC,WAAU,YAC1C,uDAAC,YAAAA,SAAA,EAAK,MAAK,iCACR;AAAA,UAAE,aAAa;AAAA,QAChB,4CAAC,kCAAW,WAAU,eAAc;AAAA,SACtC,GACF;AAAA,OACF,GACF,GACF;AAAA,IAEA,6CAAC,aAAQ,WAAU,oCACjB;AAAA,kDAAC,mCACC,uDAAC,SACC;AAAA,oDAAC,OAAE,WAAU,iBAAiB,YAAE,MAAM,GAAE;AAAA,QACxC,4CAAC,QAAG,WAAU,4BAA4B,YAAE,oBAAoB,GAAE;AAAA,SACpE,GACF;AAAA,MAEC,YACC,4CAAC,SAAI,WAAU,wDACZ,gBAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAAM,4CAAC,yCAAuB,CAAG,CAAE,GACxE,IACE,WAAW,WAAW,IACxB,4CAAC,mCACC,uDAAC,SAAI,WAAU,6DACb;AAAA,oDAAC,SAAI,WAAU,uBACb,sDAAC,6BAAS,MAAK,MACb,sDAAC,iCAAU,GACb,GACF;AAAA,QACA,6CAAC,SAAI,WAAU,aACb;AAAA,sDAAC,OAAE,WAAU,yBAAyB,YAAE,gCAAgC,GAAE;AAAA,UAC1E,4CAAC,OAAE,WAAU,iCAAiC,YAAE,mCAAmC,GAAE;AAAA,WACvF;AAAA,SACF,GACF,IAEA,4CAAC,oCAAQ,WAAU,wDAChB,qBAAW,IAAI,CAAC,UACf,4CAAC,wCACC,sDAAC,aAAU,OAAc,KADT,MAAM,EAExB,CACD,GACH;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":["Link"]}
@@ -16,7 +16,7 @@ import { ActionButton } from "./action-button.js";
16
16
  import { panelTint } from "./panel.js";
17
17
  import { IconTile } from "./icon-tile.js";
18
18
  const FEATURES = [
19
- msg("No escrow \u2014 direct settlement"),
19
+ msg("Direct settlement"),
20
20
  msg("Owner-verified on-chain"),
21
21
  msg("Open bidding or one invited sponsor")
22
22
  ];
@@ -50,7 +50,7 @@ function SponsorshipOffersPage() {
50
50
  plain: true,
51
51
  icon: /* @__PURE__ */ jsx(Handshake, { className: "h-4 w-4 text-white" }),
52
52
  title: t("IP Sponsorship"),
53
- subtitle: t("Sponsorship offers anchored to your IP assets \u2014 a sponsor bids, you accept, they receive a license.")
53
+ subtitle: t("Sponsors bid for a license.")
54
54
  }
55
55
  ) }) })
56
56
  ] }),
@@ -61,7 +61,7 @@ function SponsorshipOffersPage() {
61
61
  /* @__PURE__ */ jsx("section", { className: "px-4 max-w-5xl mx-auto", children: /* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsxs("div", { className: "panel p-5 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between", style: panelTint("rose"), children: [
62
62
  /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
63
63
  /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: t("Start a sponsorship deal") }),
64
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t("Offer one of your assets for sponsors to bid on, or propose terms directly on one you'd like to sponsor.") })
64
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t("Open an asset to sponsors.") })
65
65
  ] }),
66
66
  /* @__PURE__ */ jsx(ActionButton, { solid: true, small: true, asChild: true, className: "shrink-0", children: /* @__PURE__ */ jsxs(Link, { href: "/launchpad/sponsorship/create", children: [
67
67
  t("Get started"),
@@ -77,7 +77,7 @@ function SponsorshipOffersPage() {
77
77
  /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx(IconTile, { size: "lg", children: /* @__PURE__ */ jsx(Handshake, {}) }) }),
78
78
  /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
79
79
  /* @__PURE__ */ jsx("p", { className: "font-semibold text-sm", children: t("No open sponsorship offers yet") }),
80
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t("Creators open offers from their asset pages \u2014 sponsors bid on them here.") })
80
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t("Sponsors bid on open offers here.") })
81
81
  ] })
82
82
  ] }) }) : /* @__PURE__ */ jsx(Stagger, { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4", children: openOffers.map((offer) => /* @__PURE__ */ jsx(StaggerItem, { children: /* @__PURE__ */ jsx(OfferCard, { offer }) }, offer.id)) })
83
83
  ] })
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/sponsorship-offers-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { ArrowRight, Check, Handshake } from \"lucide-react\";\nimport { formatAmount, getTokenByAddress, type ApiSponsorshipOffer } from \"@medialane/sdk\";\nimport { AssetCard, AssetCardSkeleton } from \"./asset-card.js\";\nimport { BackButton } from \"./back-button.js\";\nimport Link from \"./link.js\";\nimport { FadeIn, Stagger, StaggerItem } from \"./motion-primitives.js\";\nimport { ServiceHeader } from \"./service-header.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { useSponsorshipOffers } from \"../utils/use-sponsorship.js\";\nimport { useToken } from \"../utils/use-tokens.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nimport { msg } from \"../i18n/translate.js\";\nimport { ActionButton } from \"./action-button.js\";\nimport { panelTint } from \"./panel.js\";\nimport { IconTile } from \"./icon-tile.js\";\nconst FEATURES = [\n msg(\"No escrow — direct settlement\"),\n msg(\"Owner-verified on-chain\"),\n msg(\"Open bidding or one invited sponsor\"),\n];\n\nfunction OfferCard({ offer }: { offer: ApiSponsorshipOffer }) {\n const { token } = useToken(offer.nftContract, offer.tokenId);\n const paymentToken = getTokenByAddress(offer.paymentToken);\n const min = paymentToken ? `Min ${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : `Min ${offer.minAmount}`;\n const days = Math.round(Number(offer.duration) / 86400);\n\n return (\n <AssetCard\n href={`/launchpad/sponsorship/${offer.offerId}`}\n name={token?.metadata?.name ?? `Token #${offer.tokenId}`}\n image={token?.metadata?.image ?? null}\n subtitle={shortenAddress(offer.nftContract)}\n fallbackId={offer.tokenId}\n price={{ formatted: `${min} · ${days}d`, currency: null }}\n />\n );\n}\n\nexport function SponsorshipOffersPage() {\n const t = useT();\n const { offers, isLoading } = useSponsorshipOffers();\n const openOffers = offers.filter((o) => o.open);\n\n return (\n <div className=\"pb-16 space-y-10\">\n <section className=\"px-4 pt-10 max-w-5xl mx-auto\">\n <BackButton />\n <FadeIn>\n <div className=\"mt-6\">\n <ServiceHeader\n plain\n icon={<Handshake className=\"h-4 w-4 text-white\" />}\n title={t(\"IP Sponsorship\")}\n subtitle={t(\"Sponsorship offers anchored to your IP assets — a sponsor bids, you accept, they receive a license.\")}\n />\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div className=\"flex flex-wrap gap-2\">\n {FEATURES.map((f) => (\n <span key={f} className=\"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium text-muted-foreground bg-background/40\">\n <Check className=\"h-3 w-3 text-brand-rose shrink-0\" />\n {t(f)}\n </span>\n ))}\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div className=\"panel p-5 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between\" style={panelTint(\"rose\")}>\n <div className=\"space-y-0.5\">\n <p className=\"text-sm font-semibold\">{t(\"Start a sponsorship deal\")}</p>\n <p className=\"text-xs text-muted-foreground\">\n {t(\"Offer one of your assets for sponsors to bid on, or propose terms directly on one you'd like to sponsor.\")}\n </p>\n </div>\n <ActionButton solid small asChild className=\"shrink-0\">\n <Link href=\"/launchpad/sponsorship/create\">\n {t(\"Get started\")}\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </Link>\n </ActionButton>\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 space-y-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div>\n <p className=\"section-label\">{t(\"Open\")}</p>\n <h2 className=\"text-xl font-bold mt-0.5\">{t(\"Sponsorship offers\")}</h2>\n </div>\n </FadeIn>\n\n {isLoading ? (\n <div className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4\">\n {Array.from({ length: 8 }).map((_, i) => <AssetCardSkeleton key={i} />)}\n </div>\n ) : openOffers.length === 0 ? (\n <FadeIn>\n <div className=\"panel relative overflow-hidden p-12 text-center space-y-4\">\n <div className=\"flex justify-center\">\n <IconTile size=\"lg\">\n <Handshake />\n </IconTile>\n </div>\n <div className=\"space-y-1\">\n <p className=\"font-semibold text-sm\">{t(\"No open sponsorship offers yet\")}</p>\n <p className=\"text-xs text-muted-foreground\">{t(\"Creators open offers from their asset pages — sponsors bid on them here.\")}</p>\n </div>\n </div>\n </FadeIn>\n ) : (\n <Stagger className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4\">\n {openOffers.map((offer) => (\n <StaggerItem key={offer.id}>\n <OfferCard offer={offer} />\n </StaggerItem>\n ))}\n </Stagger>\n )}\n </section>\n </div>\n );\n}\n"],"mappings":";AA+BI,cAkBE,YAlBF;AA7BJ,SAAS,YAAY,OAAO,iBAAiB;AAC7C,SAAS,cAAc,yBAAmD;AAC1E,SAAS,WAAW,yBAAyB;AAC7C,SAAS,kBAAkB;AAC3B,OAAO,UAAU;AACjB,SAAS,QAAQ,SAAS,mBAAmB;AAC7C,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,gBAAgB;AACzB,SAAS,YAAY;AAErB,SAAS,WAAW;AACpB,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,MAAM,WAAW;AAAA,EACf,IAAI,oCAA+B;AAAA,EACnC,IAAI,yBAAyB;AAAA,EAC7B,IAAI,qCAAqC;AAC3C;AAEA,SAAS,UAAU,EAAE,MAAM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C,eACC,8BAAC,aAAU,OAAc,KADT,MAAM,EAExB,CACD,GACH;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/sponsorship-offers-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { ArrowRight, Check, Handshake } from \"lucide-react\";\nimport { formatAmount, getTokenByAddress, type ApiSponsorshipOffer } from \"@medialane/sdk\";\nimport { AssetCard, AssetCardSkeleton } from \"./asset-card.js\";\nimport { BackButton } from \"./back-button.js\";\nimport Link from \"./link.js\";\nimport { FadeIn, Stagger, StaggerItem } from \"./motion-primitives.js\";\nimport { ServiceHeader } from \"./service-header.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { useSponsorshipOffers } from \"../utils/use-sponsorship.js\";\nimport { useToken } from \"../utils/use-tokens.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nimport { msg } from \"../i18n/translate.js\";\nimport { ActionButton } from \"./action-button.js\";\nimport { panelTint } from \"./panel.js\";\nimport { IconTile } from \"./icon-tile.js\";\nconst FEATURES = [\n msg(\"Direct settlement\"),\n msg(\"Owner-verified on-chain\"),\n msg(\"Open bidding or one invited sponsor\"),\n];\n\nfunction OfferCard({ offer }: { offer: ApiSponsorshipOffer }) {\n const { token } = useToken(offer.nftContract, offer.tokenId);\n const paymentToken = getTokenByAddress(offer.paymentToken);\n const min = paymentToken ? `Min ${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : `Min ${offer.minAmount}`;\n const days = Math.round(Number(offer.duration) / 86400);\n\n return (\n <AssetCard\n href={`/launchpad/sponsorship/${offer.offerId}`}\n name={token?.metadata?.name ?? `Token #${offer.tokenId}`}\n image={token?.metadata?.image ?? null}\n subtitle={shortenAddress(offer.nftContract)}\n fallbackId={offer.tokenId}\n price={{ formatted: `${min} · ${days}d`, currency: null }}\n />\n );\n}\n\nexport function SponsorshipOffersPage() {\n const t = useT();\n const { offers, isLoading } = useSponsorshipOffers();\n const openOffers = offers.filter((o) => o.open);\n\n return (\n <div className=\"pb-16 space-y-10\">\n <section className=\"px-4 pt-10 max-w-5xl mx-auto\">\n <BackButton />\n <FadeIn>\n <div className=\"mt-6\">\n <ServiceHeader\n plain\n icon={<Handshake className=\"h-4 w-4 text-white\" />}\n title={t(\"IP Sponsorship\")}\n subtitle={t(\"Sponsors bid for a license.\")}\n />\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div className=\"flex flex-wrap gap-2\">\n {FEATURES.map((f) => (\n <span key={f} className=\"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium text-muted-foreground bg-background/40\">\n <Check className=\"h-3 w-3 text-brand-rose shrink-0\" />\n {t(f)}\n </span>\n ))}\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div className=\"panel p-5 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between\" style={panelTint(\"rose\")}>\n <div className=\"space-y-0.5\">\n <p className=\"text-sm font-semibold\">{t(\"Start a sponsorship deal\")}</p>\n <p className=\"text-xs text-muted-foreground\">\n {t(\"Open an asset to sponsors.\")}\n </p>\n </div>\n <ActionButton solid small asChild className=\"shrink-0\">\n <Link href=\"/launchpad/sponsorship/create\">\n {t(\"Get started\")}\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </Link>\n </ActionButton>\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 space-y-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div>\n <p className=\"section-label\">{t(\"Open\")}</p>\n <h2 className=\"text-xl font-bold mt-0.5\">{t(\"Sponsorship offers\")}</h2>\n </div>\n </FadeIn>\n\n {isLoading ? (\n <div className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4\">\n {Array.from({ length: 8 }).map((_, i) => <AssetCardSkeleton key={i} />)}\n </div>\n ) : openOffers.length === 0 ? (\n <FadeIn>\n <div className=\"panel relative overflow-hidden p-12 text-center space-y-4\">\n <div className=\"flex justify-center\">\n <IconTile size=\"lg\">\n <Handshake />\n </IconTile>\n </div>\n <div className=\"space-y-1\">\n <p className=\"font-semibold text-sm\">{t(\"No open sponsorship offers yet\")}</p>\n <p className=\"text-xs text-muted-foreground\">{t(\"Sponsors bid on open offers here.\")}</p>\n </div>\n </div>\n </FadeIn>\n ) : (\n <Stagger className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4\">\n {openOffers.map((offer) => (\n <StaggerItem key={offer.id}>\n <OfferCard offer={offer} />\n </StaggerItem>\n ))}\n </Stagger>\n )}\n </section>\n </div>\n );\n}\n"],"mappings":";AA+BI,cAkBE,YAlBF;AA7BJ,SAAS,YAAY,OAAO,iBAAiB;AAC7C,SAAS,cAAc,yBAAmD;AAC1E,SAAS,WAAW,yBAAyB;AAC7C,SAAS,kBAAkB;AAC3B,OAAO,UAAU;AACjB,SAAS,QAAQ,SAAS,mBAAmB;AAC7C,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,gBAAgB;AACzB,SAAS,YAAY;AAErB,SAAS,WAAW;AACpB,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,MAAM,WAAW;AAAA,EACf,IAAI,mBAAmB;AAAA,EACvB,IAAI,yBAAyB;AAAA,EAC7B,IAAI,qCAAqC;AAC3C;AAEA,SAAS,UAAU,EAAE,MAAM,GAAmC;AAC5D,QAAM,EAAE,MAAM,IAAI,SAAS,MAAM,aAAa,MAAM,OAAO;AAC3D,QAAM,eAAe,kBAAkB,MAAM,YAAY;AACzD,QAAM,MAAM,eAAe,OAAO,aAAa,MAAM,WAAW,aAAa,QAAQ,CAAC,IAAI,aAAa,MAAM,KAAK,OAAO,MAAM,SAAS;AACxI,QAAM,OAAO,KAAK,MAAM,OAAO,MAAM,QAAQ,IAAI,KAAK;AAEtD,SACE;AAAA,IAAC;AAAA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,SACF;AAAA,MACA,oBAAC,gBAAa,OAAK,MAAC,OAAK,MAAC,SAAO,MAAC,WAAU,YAC1C,+BAAC,QAAK,MAAK,iCACR;AAAA,UAAE,aAAa;AAAA,QAChB,oBAAC,cAAW,WAAU,eAAc;AAAA,SACtC,GACF;AAAA,OACF,GACF,GACF;AAAA,IAEA,qBAAC,aAAQ,WAAU,oCACjB;AAAA,0BAAC,UACC,+BAAC,SACC;AAAA,4BAAC,OAAE,WAAU,iBAAiB,YAAE,MAAM,GAAE;AAAA,QACxC,oBAAC,QAAG,WAAU,4BAA4B,YAAE,oBAAoB,GAAE;AAAA,SACpE,GACF;AAAA,MAEC,YACC,oBAAC,SAAI,WAAU,wDACZ,gBAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAAM,oBAAC,uBAAuB,CAAG,CAAE,GACxE,IACE,WAAW,WAAW,IACxB,oBAAC,UACC,+BAAC,SAAI,WAAU,6DACb;AAAA,4BAAC,SAAI,WAAU,uBACb,8BAAC,YAAS,MAAK,MACb,8BAAC,aAAU,GACb,GACF;AAAA,QACA,qBAAC,SAAI,WAAU,aACb;AAAA,8BAAC,OAAE,WAAU,yBAAyB,YAAE,gCAAgC,GAAE;AAAA,UAC1E,oBAAC,OAAE,WAAU,iCAAiC,YAAE,mCAAmC,GAAE;AAAA,WACvF;AAAA,SACF,GACF,IAEA,oBAAC,WAAQ,WAAU,wDAChB,qBAAW,IAAI,CAAC,UACf,oBAAC,eACC,8BAAC,aAAU,OAAc,KADT,MAAM,EAExB,CACD,GACH;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/transaction-success.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { ImageIcon } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { Button } from \"./button.js\";\nimport { MarketplaceTxLink } from \"./marketplace-dialog-primitives.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\n\nexport interface TransactionSuccessAction {\n label: string;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface TransactionSuccessProps {\n name: string;\n image?: string | null;\n title: string;\n description?: ReactNode;\n txHash?: string | null;\n actions: Array<TransactionSuccessAction | undefined>;\n children?: ReactNode;\n}\n\nexport function TransactionSuccess({ name, image, title, description, txHash, actions, children }: TransactionSuccessProps) {\n const shown = actions.filter((a): a is TransactionSuccessAction => !!a);\n return (\n <div className=\"flex w-full flex-col items-center gap-6 py-2 text-center\">\n <div className=\"relative h-40 w-40 overflow-hidden rounded-2xl bg-muted shadow-lg\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"160px\" unoptimized className=\"object-cover\" />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center text-muted-foreground/40\">\n <ImageIcon className=\"h-10 w-10\" />\n </div>\n )}\n </div>\n\n <div role=\"status\" className=\"w-full min-w-0 space-y-1\">\n <p className=\"line-clamp-2 break-words text-xl font-bold\">{name}</p>\n <p className=\"font-medium\">{title}</p>\n {description && <div className=\"break-words text-sm text-muted-foreground\">{description}</div>}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={EXPLORER_URL} className=\"pt-1\" />}\n </div>\n\n <div className=\"flex w-full flex-col gap-2\">\n {shown.map((action, i) => (\n <Button key={action.label} asChild={!!action.href} variant={i === 0 ? \"default\" : \"soft\"} className=\"w-full\" onClick={action.onClick}>\n {action.href ? <Link href={action.href}>{action.label}</Link> : action.label}\n </Button>\n ))}\n </div>\n\n {children}\n </div>\n );\n}\n\n/** The success state for a dialog whose content has no padding of its own. */\nexport function DialogTransactionSuccess(props: TransactionSuccessProps) {\n return (\n <div className=\"px-6 pb-6 pt-4\">\n <TransactionSuccess {...props} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCU;AA7BV,0BAA0B;AAC1B,k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port type { ReactNode } from \"react\";\nimport { ImageIcon } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { Button } from \"./button.js\";\nimport { MarketplaceTxLink } from \"./marketplace-dialog-primitives.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\n\nexport interface TransactionSuccessAction {\n label: string;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface TransactionSuccessProps {\n name: string;\n image?: string | null;\n title: string;\n description?: ReactNode;\n txHash?: string | null;\n actions: Array<TransactionSuccessAction | undefined>;\n children?: ReactNode;\n}\n\nexport function TransactionSuccess({ name, image, title, description, txHash, actions, children }: TransactionSuccessProps) {\n const shown = actions.filter((a): a is TransactionSuccessAction => !!a);\n return (\n <div className=\"flex w-full flex-col items-center gap-6 py-2 text-center\">\n <div className=\"relative h-40 w-40 overflow-hidden rounded-2xl bg-muted shadow-lg\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"160px\" unoptimized className=\"object-cover\" />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center text-muted-foreground/40\">\n <ImageIcon className=\"h-10 w-10\" />\n </div>\n )}\n </div>\n\n <div role=\"status\" className=\"w-full min-w-0 space-y-1\">\n <p className=\"line-clamp-2 break-words text-xl font-bold\">{name}</p>\n <p className=\"font-medium\">{title}</p>\n {description && <div className=\"break-words text-sm text-muted-foreground\">{description}</div>}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={EXPLORER_URL} className=\"pt-1\" />}\n </div>\n\n <div className=\"flex w-full flex-col gap-2\">\n {shown.map((action, i) => (\n <Button key={action.label} asChild={!!action.href} variant={i === 0 ? \"default\" : \"soft\"} className=\"w-full\" onClick={action.onClick}>\n {action.href ? <Link href={action.href}>{action.label}</Link> : action.label}\n </Button>\n ))}\n </div>\n\n {children}\n </div>\n );\n}\n\nexport function DialogTransactionSuccess(props: TransactionSuccessProps) {\n return (\n <div className=\"px-6 pb-6 pt-4\">\n <TransactionSuccess {...props} />\n </div>\n );\n}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,sBAAoB,GAAG,OAAO,GACjC;AAEJ;","names":["Image","Link"]}
@@ -16,7 +16,6 @@ interface TransactionSuccessProps {
16
16
  children?: ReactNode;
17
17
  }
18
18
  declare function TransactionSuccess({ name, image, title, description, txHash, actions, children }: TransactionSuccessProps): react_jsx_runtime.JSX.Element;
19
- /** The success state for a dialog whose content has no padding of its own. */
20
19
  declare function DialogTransactionSuccess(props: TransactionSuccessProps): react_jsx_runtime.JSX.Element;
21
20
 
22
21
  export { DialogTransactionSuccess, TransactionSuccess, type TransactionSuccessAction, type TransactionSuccessProps };
@@ -16,7 +16,6 @@ interface TransactionSuccessProps {
16
16
  children?: ReactNode;
17
17
  }
18
18
  declare function TransactionSuccess({ name, image, title, description, txHash, actions, children }: TransactionSuccessProps): react_jsx_runtime.JSX.Element;
19
- /** The success state for a dialog whose content has no padding of its own. */
20
19
  declare function DialogTransactionSuccess(props: TransactionSuccessProps): react_jsx_runtime.JSX.Element;
21
20
 
22
21
  export { DialogTransactionSuccess, TransactionSuccess, type TransactionSuccessAction, type TransactionSuccessProps };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/transaction-success.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { ImageIcon } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { Button } from \"./button.js\";\nimport { MarketplaceTxLink } from \"./marketplace-dialog-primitives.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\n\nexport interface TransactionSuccessAction {\n label: string;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface TransactionSuccessProps {\n name: string;\n image?: string | null;\n title: string;\n description?: ReactNode;\n txHash?: string | null;\n actions: Array<TransactionSuccessAction | undefined>;\n children?: ReactNode;\n}\n\nexport function TransactionSuccess({ name, image, title, description, txHash, actions, children }: TransactionSuccessProps) {\n const shown = actions.filter((a): a is TransactionSuccessAction => !!a);\n return (\n <div className=\"flex w-full flex-col items-center gap-6 py-2 text-center\">\n <div className=\"relative h-40 w-40 overflow-hidden rounded-2xl bg-muted shadow-lg\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"160px\" unoptimized className=\"object-cover\" />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center text-muted-foreground/40\">\n <ImageIcon className=\"h-10 w-10\" />\n </div>\n )}\n </div>\n\n <div role=\"status\" className=\"w-full min-w-0 space-y-1\">\n <p className=\"line-clamp-2 break-words text-xl font-bold\">{name}</p>\n <p className=\"font-medium\">{title}</p>\n {description && <div className=\"break-words text-sm text-muted-foreground\">{description}</div>}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={EXPLORER_URL} className=\"pt-1\" />}\n </div>\n\n <div className=\"flex w-full flex-col gap-2\">\n {shown.map((action, i) => (\n <Button key={action.label} asChild={!!action.href} variant={i === 0 ? \"default\" : \"soft\"} className=\"w-full\" onClick={action.onClick}>\n {action.href ? <Link href={action.href}>{action.label}</Link> : action.label}\n </Button>\n ))}\n </div>\n\n {children}\n </div>\n );\n}\n\n/** The success state for a dialog whose content has no padding of its own. */\nexport function DialogTransactionSuccess(props: TransactionSuccessProps) {\n return (\n <div className=\"px-6 pb-6 pt-4\">\n <TransactionSuccess {...props} />\n </div>\n );\n}\n"],"mappings":";AAgCU,cAQJ,YARI;AA7BV,SAAS,iBAAiB;AAC1B,OAAO,UAAU;AACjB,OAAO,WAAW;AAClB,SAAS,cAAc;AACvB,SAAS,yBAAyB;AAClC,SAAS,oBAAoB;AAkBtB,SAAS,mBAAmB,EAAE,MAAM,OAAO,OAAO,aAAa,QAAQ,SAAS,SAAS,GAA4B;AAC1H,QAAM,QAAQ,QAAQ,OAAO,CAAC,MAAqC,CAAC,CAAC,CAAC;AACtE,SACE,qBAAC,SAAI,WAAU,4DACb;AAAA,wBAAC,SAAI,WAAU,qEACZ,kBACC,oBAAC,SAAM,KAAK,OAAO,KAAK,MAAM,MAAI,MAAC,OAAM,SAAQ,aAAW,MAAC,WAAU,gBAAe,IAEtF,oBAAC,SAAI,WAAU,2EACb,8BAAC,aAAU,WAAU,aAAY,GACnC,GAEJ;AAAA,IAEA,qBAAC,SAAI,MAAK,UAAS,WAAU,4BAC3B;AAAA,0BAAC,OAAE,WAAU,8CAA8C,gBAAK;AAAA,MAChE,oBAAC,OAAE,WAAU,eAAe,iBAAM;AAAA,MACjC,eAAe,oBAAC,SAAI,WAAU,6CAA6C,uBAAY;AAAA,MACvF,UAAU,oBAAC,qBAAkB,QAAgB,aAAa,cAAc,WAAU,QAAO;AAAA,OAC5F;AAAA,IAEA,oBAAC,SAAI,WAAU,8BACZ,gBAAM,IAAI,CAAC,QAAQ,MAClB,oBAAC,UAA0B,SAAS,CAAC,CAAC,OAAO,MAAM,SAAS,MAAM,IAAI,YAAY,QAAQ,WAAU,UAAS,SAAS,OAAO,SAC1H,iBAAO,OAAO,oBAAC,QAAK,MAAM,OAAO,MAAO,iBAAO,OAAM,IAAU,OAAO,SAD5D,OAAO,KAEpB,CACD,GACH;AAAA,IAEC;AAAA,KACH;AAEJ;AAGO,SAAS,yBAAyB,OAAgC;AACvE,SACE,oBAAC,SAAI,WAAU,kBACb,8BAAC,sBAAoB,GAAG,OAAO,GACjC;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/transaction-success.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { ImageIcon } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { Button } from \"./button.js\";\nimport { MarketplaceTxLink } from \"./marketplace-dialog-primitives.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\n\nexport interface TransactionSuccessAction {\n label: string;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface TransactionSuccessProps {\n name: string;\n image?: string | null;\n title: string;\n description?: ReactNode;\n txHash?: string | null;\n actions: Array<TransactionSuccessAction | undefined>;\n children?: ReactNode;\n}\n\nexport function TransactionSuccess({ name, image, title, description, txHash, actions, children }: TransactionSuccessProps) {\n const shown = actions.filter((a): a is TransactionSuccessAction => !!a);\n return (\n <div className=\"flex w-full flex-col items-center gap-6 py-2 text-center\">\n <div className=\"relative h-40 w-40 overflow-hidden rounded-2xl bg-muted shadow-lg\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"160px\" unoptimized className=\"object-cover\" />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center text-muted-foreground/40\">\n <ImageIcon className=\"h-10 w-10\" />\n </div>\n )}\n </div>\n\n <div role=\"status\" className=\"w-full min-w-0 space-y-1\">\n <p className=\"line-clamp-2 break-words text-xl font-bold\">{name}</p>\n <p className=\"font-medium\">{title}</p>\n {description && <div className=\"break-words text-sm text-muted-foreground\">{description}</div>}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={EXPLORER_URL} className=\"pt-1\" />}\n </div>\n\n <div className=\"flex w-full flex-col gap-2\">\n {shown.map((action, i) => (\n <Button key={action.label} asChild={!!action.href} variant={i === 0 ? \"default\" : \"soft\"} className=\"w-full\" onClick={action.onClick}>\n {action.href ? <Link href={action.href}>{action.label}</Link> : action.label}\n </Button>\n ))}\n </div>\n\n {children}\n </div>\n );\n}\n\nexport function DialogTransactionSuccess(props: TransactionSuccessProps) {\n return (\n <div className=\"px-6 pb-6 pt-4\">\n <TransactionSuccess {...props} />\n </div>\n );\n}\n"],"mappings":";AAgCU,cAQJ,YARI;AA7BV,SAAS,iBAAiB;AAC1B,OAAO,UAAU;AACjB,OAAO,WAAW;AAClB,SAAS,cAAc;AACvB,SAAS,yBAAyB;AAClC,SAAS,oBAAoB;AAkBtB,SAAS,mBAAmB,EAAE,MAAM,OAAO,OAAO,aAAa,QAAQ,SAAS,SAAS,GAA4B;AAC1H,QAAM,QAAQ,QAAQ,OAAO,CAAC,MAAqC,CAAC,CAAC,CAAC;AACtE,SACE,qBAAC,SAAI,WAAU,4DACb;AAAA,wBAAC,SAAI,WAAU,qEACZ,kBACC,oBAAC,SAAM,KAAK,OAAO,KAAK,MAAM,MAAI,MAAC,OAAM,SAAQ,aAAW,MAAC,WAAU,gBAAe,IAEtF,oBAAC,SAAI,WAAU,2EACb,8BAAC,aAAU,WAAU,aAAY,GACnC,GAEJ;AAAA,IAEA,qBAAC,SAAI,MAAK,UAAS,WAAU,4BAC3B;AAAA,0BAAC,OAAE,WAAU,8CAA8C,gBAAK;AAAA,MAChE,oBAAC,OAAE,WAAU,eAAe,iBAAM;AAAA,MACjC,eAAe,oBAAC,SAAI,WAAU,6CAA6C,uBAAY;AAAA,MACvF,UAAU,oBAAC,qBAAkB,QAAgB,aAAa,cAAc,WAAU,QAAO;AAAA,OAC5F;AAAA,IAEA,oBAAC,SAAI,WAAU,8BACZ,gBAAM,IAAI,CAAC,QAAQ,MAClB,oBAAC,UAA0B,SAAS,CAAC,CAAC,OAAO,MAAM,SAAS,MAAM,IAAI,YAAY,QAAQ,WAAU,UAAS,SAAS,OAAO,SAC1H,iBAAO,OAAO,oBAAC,QAAK,MAAM,OAAO,MAAO,iBAAO,OAAM,IAAU,OAAO,SAD5D,OAAO,KAEpB,CACD,GACH;AAAA,IAEC;AAAA,KACH;AAEJ;AAEO,SAAS,yBAAyB,OAAgC;AACvE,SACE,oBAAC,SAAI,WAAU,kBACb,8BAAC,sBAAoB,GAAG,OAAO,GACjC;AAEJ;","names":[]}
@@ -80,7 +80,7 @@ function TransferCollectionOwnership({ collectionId, currentOwner, collectionNam
80
80
  " ",
81
81
  collectionName ?? t("collection")
82
82
  ] }),
83
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogDescription, { className: "sr-only", children: t("Transfer the on-chain owner of this collection. Existing tokens are unaffected.") }),
83
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogDescription, { className: "sr-only", children: t("Transfer collection ownership.") }),
84
84
  confirming ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
85
85
  import_marketplace_dialog_primitives.MarketplaceConfirmStep,
86
86
  {
@@ -96,7 +96,7 @@ function TransferCollectionOwnership({ collectionId, currentOwner, collectionNam
96
96
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.UserRoundCog, { className: "h-5 w-5" }),
97
97
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-bold text-lg", children: t("Transfer collection ownership") })
98
98
  ] }),
99
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: t("The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected.") }),
99
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: t("The new owner controls minting.") }),
100
100
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
101
101
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_label.Label, { htmlFor: "new-owner", children: t("New owner address") }),
102
102
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/transfer-collection-ownership.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { UserRoundCog } from \"lucide-react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { MarketplaceConfirmStep } from \"./marketplace-dialog-primitives.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport interface TransferCollectionOwnershipProps {\n collectionId: string;\n currentOwner: string;\n collectionName?: string | null;\n onTransferred?: () => void;\n}\n\nexport function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps) {\n const t = useT();\n const app = useMedialaneApp();\n const tx = useTransaction();\n const [open, setOpen] = useState(false);\n const [confirming, setConfirming] = useState(false);\n const [newOwner, setNewOwner] = useState(\"\");\n\n const trimmed = newOwner.trim();\n const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);\n const wouldNoop = isValid && normalizeAddress(\"STARKNET\", trimmed) === normalizeAddress(\"STARKNET\", currentOwner);\n\n const close = () => {\n setOpen(false);\n setConfirming(false);\n };\n\n const transfer = () => {\n close();\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().createIntent(\"transfer-collection-ownership\", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed }),\n );\n })\n .then((ok) => {\n if (ok) onTransferred?.();\n });\n };\n\n return (\n <>\n <Button variant=\"soft\" size=\"sm\" className=\"gap-2\" onClick={() => { setNewOwner(\"\"); setOpen(true); }}>\n <UserRoundCog className=\"h-4 w-4\" />\n {t(\"Transfer ownership\")}\n </Button>\n\n <Dialog open={open} onOpenChange={(next) => { if (!next) close(); }}>\n <DialogContent className=\"max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl\">\n <DialogTitle className=\"sr-only\">{t(\"Transfer ownership of\")} {collectionName ?? t(\"collection\")}</DialogTitle>\n <DialogDescription className=\"sr-only\">{t(\"Transfer the on-chain owner of this collection. Existing tokens are unaffected.\")}</DialogDescription>\n\n {confirming ? (\n <MarketplaceConfirmStep\n description={t(\"Transfer ownership to {address}?\", { address: shortenAddress(trimmed) })}\n secondaryLabel={t(\"Back\")}\n onSecondary={() => setConfirming(false)}\n primaryLabel={t(\"Transfer ownership\")}\n onPrimary={transfer}\n primaryIcon={<UserRoundCog className=\"h-4 w-4\" />}\n />\n ) : (\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center gap-2\">\n <UserRoundCog className=\"h-5 w-5\" />\n <p className=\"font-bold text-lg\">{t(\"Transfer collection ownership\")}</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n {t(\"The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected.\")}\n </p>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-owner\">{t(\"New owner address\")}</Label>\n <Input\n id=\"new-owner\"\n placeholder=\"0x…\"\n value={newOwner}\n onChange={(e) => setNewOwner(e.target.value)}\n className=\"tabular-nums text-sm\"\n spellCheck={false}\n autoComplete=\"off\"\n />\n {trimmed && !isValid && <p className=\"text-xs text-destructive\">{t(\"Not a valid Starknet address.\")}</p>}\n {wouldNoop && <p className=\"text-xs text-brand-orange\">{t(\"This is already the current owner.\")}</p>}\n </div>\n <div className=\"flex gap-2 pt-2\">\n <Button variant=\"ghost\" className=\"flex-1\" onClick={close}>\n {t(\"Cancel\")}\n </Button>\n <Button className=\"flex-1\" onClick={() => setConfirming(true)} disabled={!isValid || wouldNoop || !app.walletAddress}>\n {t(\"Continue\")}\n </Button>\n </div>\n </div>\n )}\n </DialogContent>\n </Dialog>\n\n <TransactionDialog tx={tx} title={t(\"Transfer ownership\")} workingLabel=\"Transferring ownership…\" firstStepLabel=\"Prepare transfer\">\n <TransactionSuccess\n name={collectionName ?? \"Collection\"}\n {...successMessages.ownershipTransferred({ name: collectionName ?? \"the collection\", to: shortenAddress(trimmed) }, t)}\n txHash={tx.txHash}\n actions={[{ label: t(\"Done\"), onClick: tx.reset }]}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyDI;AAvDJ,mBAAyB;AACzB,0BAA6B;AAC7B,iBAAiC;AACjC,oBAAuB;AACvB,oBAAsE;AACtE,mBAAsB;AACtB,mBAAsB;AACtB,2CAAuC;AACvC,2BAAgC;AAChC,gCAAkC;AAClC,iCAAmC;AACnC,qBAA+B;AAC/B,8BAA+B;AAC/B,8BAAgC;AAChC,6BAA+B;AAC/B,sBAAqB;AASd,SA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AI,GAAG,UAAU,CAAC,WAAW,aAAa,CAAC,IAAI,eACpG,YAAE,UAAU,GACf;AAAA,WACF;AAAA,SACF;AAAA,OAEJ,GACF;AAAA,IAEA,4CAAC,+CAAkB,IAAQ,OAAO,EAAE,oBAAoB,GAAG,cAAa,gCAA0B,gBAAe,oBAC/G;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,kBAAkB;AAAA,QACvB,GAAG,wCAAgB,qBAAqB,EAAE,MAAM,kBAAkB,kBAAkB,QAAI,+BAAe,OAAO,EAAE,GAAG,CAAC;AAAA,QACrH,QAAQ,GAAG;AAAA,QACX,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAAA;AAAA,IACnD,GACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/transfer-collection-ownership.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { UserRoundCog } from \"lucide-react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { MarketplaceConfirmStep } from \"./marketplace-dialog-primitives.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport interface TransferCollectionOwnershipProps {\n collectionId: string;\n currentOwner: string;\n collectionName?: string | null;\n onTransferred?: () => void;\n}\n\nexport function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps) {\n const t = useT();\n const app = useMedialaneApp();\n const tx = useTransaction();\n const [open, setOpen] = useState(false);\n const [confirming, setConfirming] = useState(false);\n const [newOwner, setNewOwner] = useState(\"\");\n\n const trimmed = newOwner.trim();\n const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);\n const wouldNoop = isValid && normalizeAddress(\"STARKNET\", trimmed) === normalizeAddress(\"STARKNET\", currentOwner);\n\n const close = () => {\n setOpen(false);\n setConfirming(false);\n };\n\n const transfer = () => {\n close();\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().createIntent(\"transfer-collection-ownership\", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed }),\n );\n })\n .then((ok) => {\n if (ok) onTransferred?.();\n });\n };\n\n return (\n <>\n <Button variant=\"soft\" size=\"sm\" className=\"gap-2\" onClick={() => { setNewOwner(\"\"); setOpen(true); }}>\n <UserRoundCog className=\"h-4 w-4\" />\n {t(\"Transfer ownership\")}\n </Button>\n\n <Dialog open={open} onOpenChange={(next) => { if (!next) close(); }}>\n <DialogContent className=\"max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl\">\n <DialogTitle className=\"sr-only\">{t(\"Transfer ownership of\")} {collectionName ?? t(\"collection\")}</DialogTitle>\n <DialogDescription className=\"sr-only\">{t(\"Transfer collection ownership.\")}</DialogDescription>\n\n {confirming ? (\n <MarketplaceConfirmStep\n description={t(\"Transfer ownership to {address}?\", { address: shortenAddress(trimmed) })}\n secondaryLabel={t(\"Back\")}\n onSecondary={() => setConfirming(false)}\n primaryLabel={t(\"Transfer ownership\")}\n onPrimary={transfer}\n primaryIcon={<UserRoundCog className=\"h-4 w-4\" />}\n />\n ) : (\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center gap-2\">\n <UserRoundCog className=\"h-5 w-5\" />\n <p className=\"font-bold text-lg\">{t(\"Transfer collection ownership\")}</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n {t(\"The new owner controls minting.\")}\n </p>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-owner\">{t(\"New owner address\")}</Label>\n <Input\n id=\"new-owner\"\n placeholder=\"0x…\"\n value={newOwner}\n onChange={(e) => setNewOwner(e.target.value)}\n className=\"tabular-nums text-sm\"\n spellCheck={false}\n autoComplete=\"off\"\n />\n {trimmed && !isValid && <p className=\"text-xs text-destructive\">{t(\"Not a valid Starknet address.\")}</p>}\n {wouldNoop && <p className=\"text-xs text-brand-orange\">{t(\"This is already the current owner.\")}</p>}\n </div>\n <div className=\"flex gap-2 pt-2\">\n <Button variant=\"ghost\" className=\"flex-1\" onClick={close}>\n {t(\"Cancel\")}\n </Button>\n <Button className=\"flex-1\" onClick={() => setConfirming(true)} disabled={!isValid || wouldNoop || !app.walletAddress}>\n {t(\"Continue\")}\n </Button>\n </div>\n </div>\n )}\n </DialogContent>\n </Dialog>\n\n <TransactionDialog tx={tx} title={t(\"Transfer ownership\")} workingLabel=\"Transferring ownership…\" firstStepLabel=\"Prepare transfer\">\n <TransactionSuccess\n name={collectionName ?? \"Collection\"}\n {...successMessages.ownershipTransferred({ name: collectionName ?? \"the collection\", to: shortenAddress(trimmed) }, t)}\n txHash={tx.txHash}\n actions={[{ label: t(\"Done\"), onClick: tx.reset }]}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyDI;AAvDJ,mBAAyB;AACzB,0BAA6B;AAC7B,iBAAiC;AACjC,oBAAuB;AACvB,oBAAsE;AACtE,mBAAsB;AACtB,mBAAsB;AACtB,2CAAuC;AACvC,2BAAgC;AAChC,gCAAkC;AAClC,iCAAmC;AACnC,qBAA+B;AAC/B,8BAA+B;AAC/B,8BAAgC;AAChC,6BAA+B;AAC/B,sBAAqB;AASd,SAAS,4BAA4B,EAAE,cAAc,cAAc,gBAAgB,cAAc,GAAqC;AAC3I,QAAM,QAAI,sBAAK;AACf,QAAM,UAAM,sCAAgB;AAC5B,QAAM,SAAK,uCAA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CAAkB,IAAQ,OAAO,EAAE,oBAAoB,GAAG,cAAa,gCAA0B,gBAAe,oBAC/G;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,kBAAkB;AAAA,QACvB,GAAG,wCAAgB,qBAAqB,EAAE,MAAM,kBAAkB,kBAAkB,QAAI,+BAAe,OAAO,EAAE,GAAG,CAAC;AAAA,QACrH,QAAQ,GAAG;AAAA,QACX,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAAA;AAAA,IACnD,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -57,7 +57,7 @@ function TransferCollectionOwnership({ collectionId, currentOwner, collectionNam
57
57
  " ",
58
58
  collectionName ?? t("collection")
59
59
  ] }),
60
- /* @__PURE__ */ jsx(DialogDescription, { className: "sr-only", children: t("Transfer the on-chain owner of this collection. Existing tokens are unaffected.") }),
60
+ /* @__PURE__ */ jsx(DialogDescription, { className: "sr-only", children: t("Transfer collection ownership.") }),
61
61
  confirming ? /* @__PURE__ */ jsx(
62
62
  MarketplaceConfirmStep,
63
63
  {
@@ -73,7 +73,7 @@ function TransferCollectionOwnership({ collectionId, currentOwner, collectionNam
73
73
  /* @__PURE__ */ jsx(UserRoundCog, { className: "h-5 w-5" }),
74
74
  /* @__PURE__ */ jsx("p", { className: "font-bold text-lg", children: t("Transfer collection ownership") })
75
75
  ] }),
76
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected.") }),
76
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("The new owner controls minting.") }),
77
77
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
78
78
  /* @__PURE__ */ jsx(Label, { htmlFor: "new-owner", children: t("New owner address") }),
79
79
  /* @__PURE__ */ jsx(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/transfer-collection-ownership.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { UserRoundCog } from \"lucide-react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { MarketplaceConfirmStep } from \"./marketplace-dialog-primitives.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport interface TransferCollectionOwnershipProps {\n collectionId: string;\n currentOwner: string;\n collectionName?: string | null;\n onTransferred?: () => void;\n}\n\nexport function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps) {\n const t = useT();\n const app = useMedialaneApp();\n const tx = useTransaction();\n const [open, setOpen] = useState(false);\n const [confirming, setConfirming] = useState(false);\n const [newOwner, setNewOwner] = useState(\"\");\n\n const trimmed = newOwner.trim();\n const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);\n const wouldNoop = isValid && normalizeAddress(\"STARKNET\", trimmed) === normalizeAddress(\"STARKNET\", currentOwner);\n\n const close = () => {\n setOpen(false);\n setConfirming(false);\n };\n\n const transfer = () => {\n close();\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().createIntent(\"transfer-collection-ownership\", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed }),\n );\n })\n .then((ok) => {\n if (ok) onTransferred?.();\n });\n };\n\n return (\n <>\n <Button variant=\"soft\" size=\"sm\" className=\"gap-2\" onClick={() => { setNewOwner(\"\"); setOpen(true); }}>\n <UserRoundCog className=\"h-4 w-4\" />\n {t(\"Transfer ownership\")}\n </Button>\n\n <Dialog open={open} onOpenChange={(next) => { if (!next) close(); }}>\n <DialogContent className=\"max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl\">\n <DialogTitle className=\"sr-only\">{t(\"Transfer ownership of\")} {collectionName ?? t(\"collection\")}</DialogTitle>\n <DialogDescription className=\"sr-only\">{t(\"Transfer the on-chain owner of this collection. Existing tokens are unaffected.\")}</DialogDescription>\n\n {confirming ? (\n <MarketplaceConfirmStep\n description={t(\"Transfer ownership to {address}?\", { address: shortenAddress(trimmed) })}\n secondaryLabel={t(\"Back\")}\n onSecondary={() => setConfirming(false)}\n primaryLabel={t(\"Transfer ownership\")}\n onPrimary={transfer}\n primaryIcon={<UserRoundCog className=\"h-4 w-4\" />}\n />\n ) : (\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center gap-2\">\n <UserRoundCog className=\"h-5 w-5\" />\n <p className=\"font-bold text-lg\">{t(\"Transfer collection ownership\")}</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n {t(\"The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected.\")}\n </p>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-owner\">{t(\"New owner address\")}</Label>\n <Input\n id=\"new-owner\"\n placeholder=\"0x…\"\n value={newOwner}\n onChange={(e) => setNewOwner(e.target.value)}\n className=\"tabular-nums text-sm\"\n spellCheck={false}\n autoComplete=\"off\"\n />\n {trimmed && !isValid && <p className=\"text-xs text-destructive\">{t(\"Not a valid Starknet address.\")}</p>}\n {wouldNoop && <p className=\"text-xs text-brand-orange\">{t(\"This is already the current owner.\")}</p>}\n </div>\n <div className=\"flex gap-2 pt-2\">\n <Button variant=\"ghost\" className=\"flex-1\" onClick={close}>\n {t(\"Cancel\")}\n </Button>\n <Button className=\"flex-1\" onClick={() => setConfirming(true)} disabled={!isValid || wouldNoop || !app.walletAddress}>\n {t(\"Continue\")}\n </Button>\n </div>\n </div>\n )}\n </DialogContent>\n </Dialog>\n\n <TransactionDialog tx={tx} title={t(\"Transfer ownership\")} workingLabel=\"Transferring ownership…\" firstStepLabel=\"Prepare transfer\">\n <TransactionSuccess\n name={collectionName ?? \"Collection\"}\n {...successMessages.ownershipTransferred({ name: collectionName ?? \"the collection\", to: shortenAddress(trimmed) }, t)}\n txHash={tx.txHash}\n actions={[{ label: t(\"Done\"), onClick: tx.reset }]}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";AAyDI,mBAEI,KADF,YADF;AAvDJ,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,cAAc;AACvB,SAAS,QAAQ,eAAe,mBAAmB,mBAAmB;AACtE,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,YAAY;AASd,SAAS,4BAA4B,EAAE,cAAc,cAAc,gBAAgB,cAAc,GAAqC;AAC3I,QAAM,IAAI,KAAK;AACf,QAAM,MAAM,gBAAgB;AAC5B,QAAM,KAAK,eAAe;AAC1B,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AACtC,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,EAAE;AAE3C,QAAM,UAAU,SAAS,KAAK;AAC9B,QAAM,UAAU,wBAAwB,KAAK,OAAO;AACpD,QAAM,YAAY,WAAW,iBAAiB,YAAY,OAAO,MAAM,iBAAiB,YAAY,YAAY;AAEhH,QAAM,QAAQ,MAAM;AAClB,YAAQ,KAAK;AACb,kBAAc,KAAK;AAAA,EACrB;AAEA,QAAM,WAAW,MAAM;AACrB,UAAM;AACN,SAAK,GACF,IAAI,OAAO,WAAW;AACrB,YAA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,iCACV,YAAE,wHAAwH,GAC7H;AAAA,QACA,qBAAC,SAAI,WAAU,aACb;AAAA,8BAAC,SAAM,SAAQ,aAAa,YAAE,mBAAmB,GAAE;AAAA,UACnD;AAAA,YAAC;AAAA;AAAA,cACC,IAAG;AAAA,cACH,aAAY;AAAA,cACZ,OAAO;AAAA,cACP,UAAU,CAAC,MAAM,YAAY,EAAE,OAAO,KAAK;AAAA,cAC3C,WAAU;AAAA,cACV,YAAY;AAAA,cACZ,cAAa;AAAA;AAAA,UACf;AAAA,UACC,WAAW,CAAC,WAAW,oBAAC,OAAE,WAAU,4BAA4B,YAAE,+BAA+B,GAAE;AAAA,UACnG,aAAa,oBAAC,OAAE,WAAU,6BAA6B,YAAE,oCAAoC,GAAE;AAAA,WAClG;AAAA,QACA,qBAAC,SAAI,WAAU,mBACb;AAAA,8BAAC,UAAO,SAAQ,SAAQ,WAAU,UAAS,SAAS,OACjD,YAAE,QAAQ,GACb;AAAA,UACA,oBAAC,UAAO,WAAU,UAAS,SAAS,MAAM,cAAc,IAAI,GAAG,UAAU,CAAC,WAAW,aAAa,CAAC,IAAI,eACpG,YAAE,UAAU,GACf;AAAA,WACF;AAAA,SACF;AAAA,OAEJ,GACF;AAAA,IAEA,oBAAC,qBAAkB,IAAQ,OAAO,EAAE,oBAAoB,GAAG,cAAa,gCAA0B,gBAAe,oBAC/G;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,kBAAkB;AAAA,QACvB,GAAG,gBAAgB,qBAAqB,EAAE,MAAM,kBAAkB,kBAAkB,IAAI,eAAe,OAAO,EAAE,GAAG,CAAC;AAAA,QACrH,QAAQ,GAAG;AAAA,QACX,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAAA;AAAA,IACnD,GACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/transfer-collection-ownership.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { UserRoundCog } from \"lucide-react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { MarketplaceConfirmStep } from \"./marketplace-dialog-primitives.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport interface TransferCollectionOwnershipProps {\n collectionId: string;\n currentOwner: string;\n collectionName?: string | null;\n onTransferred?: () => void;\n}\n\nexport function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps) {\n const t = useT();\n const app = useMedialaneApp();\n const tx = useTransaction();\n const [open, setOpen] = useState(false);\n const [confirming, setConfirming] = useState(false);\n const [newOwner, setNewOwner] = useState(\"\");\n\n const trimmed = newOwner.trim();\n const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);\n const wouldNoop = isValid && normalizeAddress(\"STARKNET\", trimmed) === normalizeAddress(\"STARKNET\", currentOwner);\n\n const close = () => {\n setOpen(false);\n setConfirming(false);\n };\n\n const transfer = () => {\n close();\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().createIntent(\"transfer-collection-ownership\", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed }),\n );\n })\n .then((ok) => {\n if (ok) onTransferred?.();\n });\n };\n\n return (\n <>\n <Button variant=\"soft\" size=\"sm\" className=\"gap-2\" onClick={() => { setNewOwner(\"\"); setOpen(true); }}>\n <UserRoundCog className=\"h-4 w-4\" />\n {t(\"Transfer ownership\")}\n </Button>\n\n <Dialog open={open} onOpenChange={(next) => { if (!next) close(); }}>\n <DialogContent className=\"max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl\">\n <DialogTitle className=\"sr-only\">{t(\"Transfer ownership of\")} {collectionName ?? t(\"collection\")}</DialogTitle>\n <DialogDescription className=\"sr-only\">{t(\"Transfer collection ownership.\")}</DialogDescription>\n\n {confirming ? (\n <MarketplaceConfirmStep\n description={t(\"Transfer ownership to {address}?\", { address: shortenAddress(trimmed) })}\n secondaryLabel={t(\"Back\")}\n onSecondary={() => setConfirming(false)}\n primaryLabel={t(\"Transfer ownership\")}\n onPrimary={transfer}\n primaryIcon={<UserRoundCog className=\"h-4 w-4\" />}\n />\n ) : (\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center gap-2\">\n <UserRoundCog className=\"h-5 w-5\" />\n <p className=\"font-bold text-lg\">{t(\"Transfer collection ownership\")}</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n {t(\"The new owner controls minting.\")}\n </p>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-owner\">{t(\"New owner address\")}</Label>\n <Input\n id=\"new-owner\"\n placeholder=\"0x…\"\n value={newOwner}\n onChange={(e) => setNewOwner(e.target.value)}\n className=\"tabular-nums text-sm\"\n spellCheck={false}\n autoComplete=\"off\"\n />\n {trimmed && !isValid && <p className=\"text-xs text-destructive\">{t(\"Not a valid Starknet address.\")}</p>}\n {wouldNoop && <p className=\"text-xs text-brand-orange\">{t(\"This is already the current owner.\")}</p>}\n </div>\n <div className=\"flex gap-2 pt-2\">\n <Button variant=\"ghost\" className=\"flex-1\" onClick={close}>\n {t(\"Cancel\")}\n </Button>\n <Button className=\"flex-1\" onClick={() => setConfirming(true)} disabled={!isValid || wouldNoop || !app.walletAddress}>\n {t(\"Continue\")}\n </Button>\n </div>\n </div>\n )}\n </DialogContent>\n </Dialog>\n\n <TransactionDialog tx={tx} title={t(\"Transfer ownership\")} workingLabel=\"Transferring ownership…\" firstStepLabel=\"Prepare transfer\">\n <TransactionSuccess\n name={collectionName ?? \"Collection\"}\n {...successMessages.ownershipTransferred({ name: collectionName ?? \"the collection\", to: shortenAddress(trimmed) }, t)}\n txHash={tx.txHash}\n actions={[{ label: t(\"Done\"), onClick: tx.reset }]}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";AAyDI,mBAEI,KADF,YADF;AAvDJ,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,cAAc;AACvB,SAAS,QAAQ,eAAe,mBAAmB,mBAAmB;AACtE,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,YAAY;AASd,SAAS,4BAA4B,EAAE,cAAc,cAAc,gBAAgB,cAAc,GAAqC;AAC3I,QAAM,IAAI,KAAK;AACf,QAAM,MAAM,gBAAgB;AAC5B,QAAM,KAAK,eAAe;AAC1B,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AACtC,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,EAAE;AAE3C,QAAM,UAAU,SAAS,KAAK;AAC9B,QAAM,UAAU,wBAAwB,KAAK,OAAO;AACpD,QAAM,YAAY,WAAW,iBAAiB,YAAY,OAAO,MAAM,iBAAiB,YAAY,YAAY;AAEhH,QAAM,QAAQ,MAAM;AAClB,YAAQ,KAAK;AACb,kBAAc,KAAK;AAAA,EACrB;AAEA,QAAM,WAAW,MAAM;AACrB,UAAM;AACN,SAAK,GACF,IAAI,OAAO,WAAW;AACrB,YAAM;AAAA,QAAe;AAAA,QAAQ,MAC3B,IAAI,UAAU,EAAE,aAAa,iCAAiC,EAA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AAC,SAAM,SAAQ,aAAa,YAAE,mBAAmB,GAAE;AAAA,UACnD;AAAA,YAAC;AAAA;AAAA,cACC,IAAG;AAAA,cACH,aAAY;AAAA,cACZ,OAAO;AAAA,cACP,UAAU,CAAC,MAAM,YAAY,EAAE,OAAO,KAAK;AAAA,cAC3C,WAAU;AAAA,cACV,YAAY;AAAA,cACZ,cAAa;AAAA;AAAA,UACf;AAAA,UACC,WAAW,CAAC,WAAW,oBAAC,OAAE,WAAU,4BAA4B,YAAE,+BAA+B,GAAE;AAAA,UACnG,aAAa,oBAAC,OAAE,WAAU,6BAA6B,YAAE,oCAAoC,GAAE;AAAA,WAClG;AAAA,QACA,qBAAC,SAAI,WAAU,mBACb;AAAA,8BAAC,UAAO,SAAQ,SAAQ,WAAU,UAAS,SAAS,OACjD,YAAE,QAAQ,GACb;AAAA,UACA,oBAAC,UAAO,WAAU,UAAS,SAAS,MAAM,cAAc,IAAI,GAAG,UAAU,CAAC,WAAW,aAAa,CAAC,IAAI,eACpG,YAAE,UAAU,GACf;AAAA,WACF;AAAA,SACF;AAAA,OAEJ,GACF;AAAA,IAEA,oBAAC,qBAAkB,IAAQ,OAAO,EAAE,oBAAoB,GAAG,cAAa,gCAA0B,gBAAe,oBAC/G;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,kBAAkB;AAAA,QACvB,GAAG,gBAAgB,qBAAqB,EAAE,MAAM,kBAAkB,kBAAkB,IAAI,eAAe,OAAO,EAAE,GAAG,CAAC;AAAA,QACrH,QAAQ,GAAG;AAAA,QACX,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAAA;AAAA,IACnD,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -127,7 +127,7 @@ function TransferDialog({
127
127
  onSuccess?.();
128
128
  } }],
129
129
  errorTitle: t("Transfer failed"),
130
- errorDescription: t("The transaction was submitted, but the transfer could not be completed."),
130
+ errorDescription: t("The transfer did not complete."),
131
131
  onRetry: retryable ? () => {
132
132
  reset();
133
133
  setStep("form");
@@ -173,7 +173,7 @@ function TransferDialog({
173
173
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-bold text-base leading-tight truncate", children: displayName }),
174
174
  hasActiveListing && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_alert.Alert, { variant: "destructive", children: [
175
175
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertCircle, { className: "h-4 w-4" }),
176
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_alert.AlertDescription, { className: "text-xs", children: t("This token has an active listing. Cancelling the listing first keeps the sale from completing after the transfer.") })
176
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_alert.AlertDescription, { className: "text-xs", children: t("Cancel the active listing first.") })
177
177
  ] }),
178
178
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_alert.Alert, { children: [
179
179
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertCircle, { className: "h-4 w-4" }),