@medialane/ui 0.184.0 → 0.186.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 (251) hide show
  1. package/dist/components/drop/create/drop-create.cjs +6 -4
  2. package/dist/components/drop/create/drop-create.cjs.map +1 -1
  3. package/dist/components/drop/create/drop-create.d.cts +4 -6
  4. package/dist/components/drop/create/drop-create.d.ts +4 -6
  5. package/dist/components/drop/create/drop-create.js +6 -4
  6. package/dist/components/drop/create/drop-create.js.map +1 -1
  7. package/dist/components/drop/create/launch-dialog.cjs +4 -1
  8. package/dist/components/drop/create/launch-dialog.cjs.map +1 -1
  9. package/dist/components/drop/create/launch-dialog.js +5 -2
  10. package/dist/components/drop/create/launch-dialog.js.map +1 -1
  11. package/dist/components/drop/create/sale-section.cjs +2 -2
  12. package/dist/components/drop/create/sale-section.cjs.map +1 -1
  13. package/dist/components/drop/create/sale-section.d.cts +3 -3
  14. package/dist/components/drop/create/sale-section.d.ts +3 -3
  15. package/dist/components/drop/create/sale-section.js +2 -2
  16. package/dist/components/drop/create/sale-section.js.map +1 -1
  17. package/dist/components/drop/drop-card.cjs +2 -2
  18. package/dist/components/drop/drop-card.cjs.map +1 -1
  19. package/dist/components/drop/drop-card.js +1 -1
  20. package/dist/components/drop/drop-card.js.map +1 -1
  21. package/dist/components/drop/drop-features.cjs +44 -0
  22. package/dist/components/drop/drop-features.cjs.map +1 -0
  23. package/dist/components/drop/drop-features.d.cts +5 -0
  24. package/dist/components/drop/drop-features.d.ts +5 -0
  25. package/dist/components/drop/drop-features.js +20 -0
  26. package/dist/components/drop/drop-features.js.map +1 -0
  27. package/dist/components/{drop-status-display.cjs → drop/drop-status.cjs} +5 -5
  28. package/dist/components/drop/drop-status.cjs.map +1 -0
  29. package/dist/components/{drop-status-display.d.ts → drop/drop-status.d.cts} +1 -2
  30. package/dist/components/{drop-status-display.d.cts → drop/drop-status.d.ts} +1 -2
  31. package/dist/components/{drop-status-display.js → drop/drop-status.js} +2 -2
  32. package/dist/components/drop/drop-status.js.map +1 -0
  33. package/dist/components/drop/page/drop-action-box.cjs +3 -3
  34. package/dist/components/drop/page/drop-action-box.cjs.map +1 -1
  35. package/dist/components/drop/page/drop-action-box.d.cts +0 -1
  36. package/dist/components/drop/page/drop-action-box.d.ts +0 -1
  37. package/dist/components/drop/page/drop-action-box.js +1 -1
  38. package/dist/components/drop/page/drop-action-box.js.map +1 -1
  39. package/dist/components/drop/page/drop-page.cjs +6 -4
  40. package/dist/components/drop/page/drop-page.cjs.map +1 -1
  41. package/dist/components/drop/page/drop-page.d.cts +1 -2
  42. package/dist/components/drop/page/drop-page.d.ts +1 -2
  43. package/dist/components/drop/page/drop-page.js +7 -5
  44. package/dist/components/drop/page/drop-page.js.map +1 -1
  45. package/dist/components/media-wallet/action-button.cjs +54 -0
  46. package/dist/components/media-wallet/action-button.cjs.map +1 -0
  47. package/dist/components/media-wallet/action-button.d.cts +10 -0
  48. package/dist/components/media-wallet/action-button.d.ts +10 -0
  49. package/dist/components/media-wallet/action-button.js +28 -0
  50. package/dist/components/media-wallet/action-button.js.map +1 -0
  51. package/dist/components/media-wallet/action-modal.cjs +84 -0
  52. package/dist/components/media-wallet/action-modal.cjs.map +1 -0
  53. package/dist/components/media-wallet/action-modal.d.cts +20 -0
  54. package/dist/components/media-wallet/action-modal.d.ts +20 -0
  55. package/dist/components/media-wallet/action-modal.js +56 -0
  56. package/dist/components/media-wallet/action-modal.js.map +1 -0
  57. package/dist/components/media-wallet/activate-card.cjs +72 -0
  58. package/dist/components/media-wallet/activate-card.cjs.map +1 -0
  59. package/dist/components/media-wallet/activate-card.d.cts +7 -0
  60. package/dist/components/media-wallet/activate-card.d.ts +7 -0
  61. package/dist/components/media-wallet/activate-card.js +48 -0
  62. package/dist/components/media-wallet/activate-card.js.map +1 -0
  63. package/dist/components/media-wallet/address-qr.cjs +64 -0
  64. package/dist/components/media-wallet/address-qr.cjs.map +1 -0
  65. package/dist/components/media-wallet/address-qr.d.cts +8 -0
  66. package/dist/components/media-wallet/address-qr.d.ts +8 -0
  67. package/dist/components/media-wallet/address-qr.js +30 -0
  68. package/dist/components/media-wallet/address-qr.js.map +1 -0
  69. package/dist/components/media-wallet/back-button.cjs +41 -0
  70. package/dist/components/media-wallet/back-button.cjs.map +1 -0
  71. package/dist/components/media-wallet/back-button.d.cts +7 -0
  72. package/dist/components/media-wallet/back-button.d.ts +7 -0
  73. package/dist/components/media-wallet/back-button.js +17 -0
  74. package/dist/components/media-wallet/back-button.js.map +1 -0
  75. package/dist/components/media-wallet/copy-icon.cjs +49 -0
  76. package/dist/components/media-wallet/copy-icon.cjs.map +1 -0
  77. package/dist/components/media-wallet/copy-icon.d.cts +7 -0
  78. package/dist/components/media-wallet/copy-icon.d.ts +7 -0
  79. package/dist/components/media-wallet/copy-icon.js +25 -0
  80. package/dist/components/media-wallet/copy-icon.js.map +1 -0
  81. package/dist/components/media-wallet/currency-sheet.cjs +54 -0
  82. package/dist/components/media-wallet/currency-sheet.cjs.map +1 -0
  83. package/dist/components/media-wallet/currency-sheet.d.cts +12 -0
  84. package/dist/components/media-wallet/currency-sheet.d.ts +12 -0
  85. package/dist/components/media-wallet/currency-sheet.js +30 -0
  86. package/dist/components/media-wallet/currency-sheet.js.map +1 -0
  87. package/dist/components/media-wallet/media-wallet-activity.cjs +223 -0
  88. package/dist/components/media-wallet/media-wallet-activity.cjs.map +1 -0
  89. package/dist/components/media-wallet/media-wallet-activity.d.cts +12 -0
  90. package/dist/components/media-wallet/media-wallet-activity.d.ts +12 -0
  91. package/dist/components/media-wallet/media-wallet-activity.js +189 -0
  92. package/dist/components/media-wallet/media-wallet-activity.js.map +1 -0
  93. package/dist/components/media-wallet/media-wallet-header.cjs +97 -0
  94. package/dist/components/media-wallet/media-wallet-header.cjs.map +1 -0
  95. package/dist/components/media-wallet/media-wallet-header.d.cts +8 -0
  96. package/dist/components/media-wallet/media-wallet-header.d.ts +8 -0
  97. package/dist/components/media-wallet/media-wallet-header.js +63 -0
  98. package/dist/components/media-wallet/media-wallet-header.js.map +1 -0
  99. package/dist/components/media-wallet/media-wallet-home.cjs +258 -0
  100. package/dist/components/media-wallet/media-wallet-home.cjs.map +1 -0
  101. package/dist/components/media-wallet/media-wallet-home.d.cts +14 -0
  102. package/dist/components/media-wallet/media-wallet-home.d.ts +14 -0
  103. package/dist/components/media-wallet/media-wallet-home.js +224 -0
  104. package/dist/components/media-wallet/media-wallet-home.js.map +1 -0
  105. package/dist/components/media-wallet/media-wallet-overlay.cjs +137 -0
  106. package/dist/components/media-wallet/media-wallet-overlay.cjs.map +1 -0
  107. package/dist/components/media-wallet/media-wallet-overlay.d.cts +14 -0
  108. package/dist/components/media-wallet/media-wallet-overlay.d.ts +14 -0
  109. package/dist/components/media-wallet/media-wallet-overlay.js +102 -0
  110. package/dist/components/media-wallet/media-wallet-overlay.js.map +1 -0
  111. package/dist/components/media-wallet/media-wallet-send.cjs +313 -0
  112. package/dist/components/media-wallet/media-wallet-send.cjs.map +1 -0
  113. package/dist/components/media-wallet/media-wallet-send.d.cts +14 -0
  114. package/dist/components/media-wallet/media-wallet-send.d.ts +14 -0
  115. package/dist/components/media-wallet/media-wallet-send.js +289 -0
  116. package/dist/components/media-wallet/media-wallet-send.js.map +1 -0
  117. package/dist/components/media-wallet/media-wallet-token-detail.cjs +164 -0
  118. package/dist/components/media-wallet/media-wallet-token-detail.cjs.map +1 -0
  119. package/dist/components/media-wallet/media-wallet-token-detail.d.cts +13 -0
  120. package/dist/components/media-wallet/media-wallet-token-detail.d.ts +13 -0
  121. package/dist/components/media-wallet/media-wallet-token-detail.js +140 -0
  122. package/dist/components/media-wallet/media-wallet-token-detail.js.map +1 -0
  123. package/dist/components/media-wallet/media-wallet.cjs +51 -0
  124. package/dist/components/media-wallet/media-wallet.cjs.map +1 -0
  125. package/dist/components/media-wallet/media-wallet.d.cts +13 -0
  126. package/dist/components/media-wallet/media-wallet.d.ts +13 -0
  127. package/dist/components/media-wallet/media-wallet.js +27 -0
  128. package/dist/components/media-wallet/media-wallet.js.map +1 -0
  129. package/dist/components/media-wallet/nft-strip.cjs +85 -0
  130. package/dist/components/media-wallet/nft-strip.cjs.map +1 -0
  131. package/dist/components/media-wallet/nft-strip.d.cts +12 -0
  132. package/dist/components/media-wallet/nft-strip.d.ts +12 -0
  133. package/dist/components/media-wallet/nft-strip.js +51 -0
  134. package/dist/components/media-wallet/nft-strip.js.map +1 -0
  135. package/dist/components/media-wallet/quick-action.cjs +59 -0
  136. package/dist/components/media-wallet/quick-action.cjs.map +1 -0
  137. package/dist/components/media-wallet/quick-action.d.cts +12 -0
  138. package/dist/components/media-wallet/quick-action.d.ts +12 -0
  139. package/dist/components/media-wallet/quick-action.js +35 -0
  140. package/dist/components/media-wallet/quick-action.js.map +1 -0
  141. package/dist/components/media-wallet/receive-card.cjs +86 -0
  142. package/dist/components/media-wallet/receive-card.cjs.map +1 -0
  143. package/dist/components/media-wallet/receive-card.d.cts +7 -0
  144. package/dist/components/media-wallet/receive-card.d.ts +7 -0
  145. package/dist/components/media-wallet/receive-card.js +52 -0
  146. package/dist/components/media-wallet/receive-card.js.map +1 -0
  147. package/dist/components/media-wallet/section-header.cjs +32 -0
  148. package/dist/components/media-wallet/section-header.cjs.map +1 -0
  149. package/dist/components/media-wallet/section-header.d.cts +7 -0
  150. package/dist/components/media-wallet/section-header.d.ts +7 -0
  151. package/dist/components/media-wallet/section-header.js +8 -0
  152. package/dist/components/media-wallet/section-header.js.map +1 -0
  153. package/dist/components/media-wallet/success-dialog.cjs +75 -0
  154. package/dist/components/media-wallet/success-dialog.cjs.map +1 -0
  155. package/dist/components/media-wallet/success-dialog.d.cts +11 -0
  156. package/dist/components/media-wallet/success-dialog.d.ts +11 -0
  157. package/dist/components/media-wallet/success-dialog.js +51 -0
  158. package/dist/components/media-wallet/success-dialog.js.map +1 -0
  159. package/dist/components/media-wallet/types.cjs +37 -0
  160. package/dist/components/media-wallet/types.cjs.map +1 -0
  161. package/dist/components/media-wallet/types.d.cts +66 -0
  162. package/dist/components/media-wallet/types.d.ts +66 -0
  163. package/dist/components/media-wallet/types.js +12 -0
  164. package/dist/components/media-wallet/types.js.map +1 -0
  165. package/dist/components/media-wallet/wallet-activity-icon.cjs +69 -0
  166. package/dist/components/media-wallet/wallet-activity-icon.cjs.map +1 -0
  167. package/dist/components/media-wallet/wallet-activity-icon.d.cts +8 -0
  168. package/dist/components/media-wallet/wallet-activity-icon.d.ts +8 -0
  169. package/dist/components/media-wallet/wallet-activity-icon.js +45 -0
  170. package/dist/components/media-wallet/wallet-activity-icon.js.map +1 -0
  171. package/dist/index.cjs +13 -3
  172. package/dist/index.cjs.map +1 -1
  173. package/dist/index.d.cts +6 -2
  174. package/dist/index.d.ts +6 -2
  175. package/dist/index.js +8 -2
  176. package/dist/index.js.map +1 -1
  177. package/dist/utils/drop/sale.cjs +3 -3
  178. package/dist/utils/drop/sale.cjs.map +1 -1
  179. package/dist/utils/drop/sale.d.cts +2 -2
  180. package/dist/utils/drop/sale.d.ts +2 -2
  181. package/dist/utils/drop/sale.js +4 -4
  182. package/dist/utils/drop/sale.js.map +1 -1
  183. package/dist/utils/drop/view.cjs +2 -2
  184. package/dist/utils/drop/view.cjs.map +1 -1
  185. package/dist/utils/drop/view.d.cts +2 -2
  186. package/dist/utils/drop/view.d.ts +2 -2
  187. package/dist/utils/drop/view.js +2 -2
  188. package/dist/utils/drop/view.js.map +1 -1
  189. package/dist/utils/media-wallet/activity-feed.cjs +35 -0
  190. package/dist/utils/media-wallet/activity-feed.cjs.map +1 -0
  191. package/dist/utils/media-wallet/activity-feed.d.cts +14 -0
  192. package/dist/utils/media-wallet/activity-feed.d.ts +14 -0
  193. package/dist/utils/media-wallet/activity-feed.js +11 -0
  194. package/dist/utils/media-wallet/activity-feed.js.map +1 -0
  195. package/dist/utils/media-wallet/confetti.cjs +51 -0
  196. package/dist/utils/media-wallet/confetti.cjs.map +1 -0
  197. package/dist/utils/media-wallet/confetti.d.cts +3 -0
  198. package/dist/utils/media-wallet/confetti.d.ts +3 -0
  199. package/dist/utils/media-wallet/confetti.js +17 -0
  200. package/dist/utils/media-wallet/confetti.js.map +1 -0
  201. package/dist/utils/media-wallet/nft-items.cjs +38 -0
  202. package/dist/utils/media-wallet/nft-items.cjs.map +1 -0
  203. package/dist/utils/media-wallet/nft-items.d.cts +13 -0
  204. package/dist/utils/media-wallet/nft-items.d.ts +13 -0
  205. package/dist/utils/media-wallet/nft-items.js +14 -0
  206. package/dist/utils/media-wallet/nft-items.js.map +1 -0
  207. package/dist/utils/media-wallet/run-intent-calls.cjs +32 -0
  208. package/dist/utils/media-wallet/run-intent-calls.cjs.map +1 -0
  209. package/dist/utils/media-wallet/run-intent-calls.d.cts +16 -0
  210. package/dist/utils/media-wallet/run-intent-calls.d.ts +16 -0
  211. package/dist/utils/media-wallet/run-intent-calls.js +8 -0
  212. package/dist/utils/media-wallet/run-intent-calls.js.map +1 -0
  213. package/dist/utils/media-wallet/use-erc20-balance.cjs +75 -0
  214. package/dist/utils/media-wallet/use-erc20-balance.cjs.map +1 -0
  215. package/dist/utils/media-wallet/use-erc20-balance.d.cts +15 -0
  216. package/dist/utils/media-wallet/use-erc20-balance.d.ts +15 -0
  217. package/dist/utils/media-wallet/use-erc20-balance.js +40 -0
  218. package/dist/utils/media-wallet/use-erc20-balance.js.map +1 -0
  219. package/dist/utils/media-wallet/use-tokens-by-owner.cjs +52 -0
  220. package/dist/utils/media-wallet/use-tokens-by-owner.cjs.map +1 -0
  221. package/dist/utils/media-wallet/use-tokens-by-owner.d.cts +10 -0
  222. package/dist/utils/media-wallet/use-tokens-by-owner.d.ts +10 -0
  223. package/dist/utils/media-wallet/use-tokens-by-owner.js +18 -0
  224. package/dist/utils/media-wallet/use-tokens-by-owner.js.map +1 -0
  225. package/dist/utils/media-wallet/wallet-activity.cjs +83 -0
  226. package/dist/utils/media-wallet/wallet-activity.cjs.map +1 -0
  227. package/dist/utils/media-wallet/wallet-activity.d.cts +7 -0
  228. package/dist/utils/media-wallet/wallet-activity.d.ts +7 -0
  229. package/dist/utils/media-wallet/wallet-activity.js +57 -0
  230. package/dist/utils/media-wallet/wallet-activity.js.map +1 -0
  231. package/dist/utils/media-wallet/wallet-format.cjs +59 -0
  232. package/dist/utils/media-wallet/wallet-format.cjs.map +1 -0
  233. package/dist/utils/media-wallet/wallet-format.d.cts +9 -0
  234. package/dist/utils/media-wallet/wallet-format.d.ts +9 -0
  235. package/dist/utils/media-wallet/wallet-format.js +29 -0
  236. package/dist/utils/media-wallet/wallet-format.js.map +1 -0
  237. package/dist/utils/media-wallet/wallet-tokens.cjs +39 -0
  238. package/dist/utils/media-wallet/wallet-tokens.cjs.map +1 -0
  239. package/dist/utils/media-wallet/wallet-tokens.d.cts +10 -0
  240. package/dist/utils/media-wallet/wallet-tokens.d.ts +10 -0
  241. package/dist/utils/media-wallet/wallet-tokens.js +15 -0
  242. package/dist/utils/media-wallet/wallet-tokens.js.map +1 -0
  243. package/dist/utils/use-drops.cjs +7 -0
  244. package/dist/utils/use-drops.cjs.map +1 -1
  245. package/dist/utils/use-drops.d.cts +3 -1
  246. package/dist/utils/use-drops.d.ts +3 -1
  247. package/dist/utils/use-drops.js +6 -0
  248. package/dist/utils/use-drops.js.map +1 -1
  249. package/package.json +11 -3
  250. package/dist/components/drop-status-display.cjs.map +0 -1
  251. package/dist/components/drop-status-display.js.map +0 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice, parsePriceDisplay, isStableCurrency, formatUsd, formatUsdPrice, formatSmallDecimal } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { profileIdentity, type ProfileIdentity, type ProfileIdentitySource } from \"./utils/profile-identity.js\";\nexport { ipfsToHttp, DEFAULT_GATEWAY as PINATA_PUBLIC_GATEWAY } from \"./utils/ipfs.js\";\nexport {\n uploadFileToIpfs,\n uploadJsonToIpfs,\n uploadDirectoryToIpfs,\n pinAssetMetadata,\n uploadFailureToast,\n isUserRejection,\n type SignedUploadKind,\n type UploadedIpfsFile,\n type PinAssetMetadataInput,\n type PinnedAsset,\n} from \"./utils/ipfs-upload.js\";\nexport { useIntersectionActive } from \"./utils/use-intersection-active.js\";\nexport { getReadIds, markRead } from \"./utils/notification-storage.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\nexport {\n isBareExecuteFailure,\n isUserRejectedRequest,\n isWrongNetwork,\n assertCorrectNetwork,\n WrongNetworkError,\n} from \"./utils/wallet-error.js\";\nexport {\n describeError,\n UserFacingError,\n NOT_SUBMITTED,\n GENERIC,\n NETWORK_BUSY,\n} from \"./utils/describe-error.js\";\nexport type { ErrorNotice } from \"./utils/describe-error.js\";\n\nexport { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"./data/ip-types.js\";\nexport type { IpTypeData } from \"./data/ip-types.js\";\nexport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES,\n DERIVATIVES_OPTIONS, LICENSE_TRAIT_TYPES,\n} from \"./data/ip.js\";\nexport type { IPType, LicenseType } from \"./data/ip.js\";\nexport {\n IP_TEMPLATES, EMBED_PLATFORM_META, SOCIAL_PLATFORM_META, TEMPLATE_TRAIT_TYPES, DOC_UPLOAD,\n} from \"./data/ip-templates.js\";\nexport type { EmbedPlatform, SocialPlatform, TraitSuggestion, IPTemplate, DocUploadConfig } from \"./data/ip-templates.js\";\nexport { IPTypeDisplay } from \"./components/ip-type-display.js\";\nexport { AssetOverviewContent } from \"./components/asset-overview-content.js\";\nexport { AssetLicenseSummary } from \"./components/asset-license-summary.js\";\nexport { AssetMarketsTab } from \"./components/asset-markets-tab.js\";\nexport { ParentAttributionBanner } from \"./components/parent-attribution-banner.js\";\nexport type { ParentBannerProps } from \"./components/parent-attribution-banner.js\";\nexport { AssetMediaColumn, AssetHeaderBlock, AssetOwnerRow, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport type { AssetOwnerRowProps } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\nexport { LIVING_RENDER_COLLECTIONS, isLivingRenderCollection } from \"./data/living-render-collections.js\";\n\nexport { CurrencyIcon, CurrencyAmount } from \"./components/currency-icon.js\";\nexport type { CurrencyIconProps, CurrencyAmountProps } from \"./components/currency-icon.js\";\n\nexport { IpTypeBadge, IP_TYPE_CONFIG, IP_TYPE_MAP } from \"./components/ip-type-badge.js\";\nexport type { IpTypeBadgeProps, IpTypeConfig } from \"./components/ip-type-badge.js\";\n\nexport { AddressDisplay } from \"./components/address-display.js\";\nexport type { AddressDisplayProps } from \"./components/address-display.js\";\n\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps } from \"./components/token-card.js\";\nexport { AnimatedTokenMedia } from \"./components/animated-token-media.js\";\nexport type { AnimatedTokenMediaProps } from \"./components/animated-token-media.js\";\nexport { ThemeAmbientBackground } from \"./components/theme-ambient-background.js\";\nexport {\n useCollectionFilters, SORT_OPTIONS, CollectionFiltersTrigger, CollectionFiltersBody,\n} from \"./components/collection-filters.js\";\nexport type { TraitSection, CollectionFiltersTriggerProps, CollectionFiltersBodyProps } from \"./components/collection-filters.js\";\nexport {\n DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem,\n DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel,\n DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup,\n DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent,\n DropdownMenuSubTrigger, DropdownMenuRadioGroup,\n} from \"./components/dropdown-menu.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\nexport { AssetPicker } from \"./components/asset-picker.js\";\nexport type { AssetPickerProps, OwnedAsset } from \"./components/asset-picker.js\";\nexport { AssetSearchPicker } from \"./components/asset-search-picker.js\";\nexport type { AssetSearchPickerProps } from \"./components/asset-search-picker.js\";\nexport { LicenseTermsBuilder, EMPTY_SPONSORSHIP_TERMS, MEDIA_TYPES, DURATION_UNITS, toLicenseMetadata, toDurationDays } from \"./components/license-terms-builder.js\";\nexport type { LicenseTermsBuilderProps, SponsorshipTerms, DurationUnit } from \"./components/license-terms-builder.js\";\n\nexport {\n coinKind, coinKindLabel, coinKindLabelPlural, COIN_KINDS, coinAccentToken, coinServiceIds, isCoinService, formatCoinPrice, coinSupply, formatFdvUsd, fdvUsd,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinGuarantees, type CoinGuaranteesProps, type CoinGuaranteesData } from \"./components/coin-guarantees.js\";\nexport { CoinRow, CoinRowSkeleton, CoinAvatar, COIN_GRID, type UseCoinPrice, type CoinRowProps, type CoinMarketStatus } from \"./components/coin-row.js\";\nexport { orderCoins, type CoinPriceSort } from \"./data/coin-order.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins, type UsePriceMap, type CoinCounts,\n} from \"./components/coins-explorer.js\";\n\nexport { timeAgo, timeUntil, isExpired } from \"./utils/time.js\";\nexport { toDisplayUrl, toDisplayUrlOrNull, toAbsoluteImageUrl, type DisplayUrlOptions } from \"./utils/ipfs.js\";\nexport { isSameAddress } from \"./utils/same-address.js\";\nexport { createAppWallet } from \"./utils/app-wallet.js\";\nexport type { AppWalletConfig } from \"./utils/app-wallet.js\";\nexport { detectPasskeySupport } from \"./utils/passkey-support.js\";\nexport type { PasskeySupport } from \"./utils/passkey-support.js\";\nexport { describeWalletFailure, isPasskeyCancelled, passkeyUnsupportedReason } from \"./utils/wallet-failure.js\";\nexport type { PasskeyUnsupportedReason, WalletFailureKind, WalletFailureNotice } from \"./utils/wallet-failure.js\";\nexport {\n RESEND_COOLDOWN_SECONDS,\n canResendCode,\n canVerifyCode,\n emailCodeReducer,\n initialEmailCodeState,\n} from \"./utils/email-code.js\";\nexport type { EmailCodeAction, EmailCodeState, EmailCodeStatus } from \"./utils/email-code.js\";\nexport { useEmailCode } from \"./utils/use-email-code.js\";\nexport type { EmailCode, EmailCodeApi } from \"./utils/use-email-code.js\";\nexport { AccountSection } from \"./components/account/account-section.js\";\nexport type { AccountSectionProps } from \"./components/account/account-section.js\";\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } from \"./components/account/input-otp.js\";\nexport { EmailCodeEntry } from \"./components/account/email-code-entry.js\";\nexport type { EmailCodeEntryProps } from \"./components/account/email-code-entry.js\";\nexport { DevicesSection } from \"./components/account/devices-section.js\";\nexport type { DevicesSectionProps } from \"./components/account/devices-section.js\";\nexport { DeviceApprovalDialog } from \"./components/account/device-approval-dialog.js\";\nexport type { DeviceApprovalDialogProps } from \"./components/account/device-approval-dialog.js\";\nexport { GuardianRecoverySection } from \"./components/account/guardian-recovery-section.js\";\nexport type { GuardianRecoverySectionProps } from \"./components/account/guardian-recovery-section.js\";\nexport { AddGuardianDialog } from \"./components/account/add-guardian-dialog.js\";\nexport type { AddGuardianDialogProps } from \"./components/account/add-guardian-dialog.js\";\nexport type { DeviceWallet, GuardianWallet, LoadSealedOwner } from \"./components/account/wallet-types.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport {\n MarketplaceTxLink,\n MarketplaceProcessingState,\n MarketplaceSignInGate,\n MarketplaceSuccessState,\n MarketplaceErrorState,\n MarketplaceDialogHero,\n CurrencyPicker,\n DurationPicker,\n MarketplaceConfirmStep,\n} from \"./components/marketplace-dialog-primitives.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport { ActivityTimelineRow } from \"./components/activity-timeline-row.js\";\nexport type { ActivityTimelineRowProps } from \"./components/activity-timeline-row.js\";\nexport { DropItemList } from \"./components/drop-item-list.js\";\nexport type { DraftItem } from \"./components/drop-item-list.js\";\nexport { getDefaultClaimWindow, suggestLaunchpadSymbol } from \"./utils/launchpad-defaults.js\";\nexport { DropStatusBadge, DropSupplyProgress } from \"./components/drop-status-display.js\";\nexport { DropCard, DropGrid, DropGridSkeleton } from \"./components/drop/drop-card.js\";\nexport { DropListing } from \"./components/drop/drop-listing.js\";\nexport { MyDrops } from \"./components/drop/my-drops.js\";\nexport { DropTokenLink } from \"./components/drop/drop-token-link.js\";\nexport type { DropPhase } from \"./utils/drop/view.js\";\nexport { DropCreate, DraftSummary } from \"./components/drop/create/drop-create.js\";\nexport { ExclusiveFields } from \"./components/drop/create/exclusive-fields.js\";\nexport { DropPage } from \"./components/drop/page/drop-page.js\";\nexport { DropActionBox } from \"./components/drop/page/drop-action-box.js\";\nexport { DropActivityList } from \"./components/drop/page/drop-activity.js\";\nexport { claimProofFor } from \"./utils/drop/claim-proof.js\";\nexport type { DropAppProps, DropSigner, DropProvider } from \"./utils/drop/types.js\";\nexport { GATED_CONTENT_TYPES, GATED_CONTENT_TYPE_FALLBACK } from \"./data/gated-content-types.js\";\nexport type { ContentTypeConfig } from \"./data/gated-content-types.js\";\nexport { CollapsibleSection } from \"./components/collapsible-section.js\";\nexport { useUsdPrices, usdPriceFor } from \"./utils/use-usd-prices.js\";\nexport type { UsdPrices } from \"./utils/use-usd-prices.js\";\nexport { NotificationRow } from \"./components/notification-row.js\";\nexport type { NotificationRowProps } from \"./components/notification-row.js\";\nexport { NOTIFICATION_ICON, NOTIFICATION_COLOR, NOTIFICATION_LABEL } from \"./data/notification-meta.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection, DiscoverActivityStrip } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps, DiscoverActivityStripProps } from \"./components/discover-feed-section.js\";\nexport { ActivityCard, ActivityCardSkeleton, ACTIVITY_MESSAGES } from \"./components/activity-card.js\";\nexport type { ActivityCardProps } from \"./components/activity-card.js\";\n\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES, useLaunchpadFilter } from \"./components/launchpad-services.js\";\nexport { LaunchpadFilterBar } from \"./components/launchpad-filter-bar.js\";\nexport type { LaunchpadFilterBarProps } from \"./components/launchpad-filter-bar.js\";\nexport { LaunchpadStrip } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadStripProps } from \"./components/launchpad-strip.js\";\nexport { LaunchpadCtaBanner } from \"./components/launchpad-cta-banner.js\";\nexport type { LaunchpadCtaBannerProps } from \"./components/launchpad-cta-banner.js\";\nexport type { LaunchpadGroupedSectionsProps, LaunchpadServiceCardProps, ServiceOverride, ServiceOverrides } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_ROUTE_OVERRIDES } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\nexport { NavCommandMenu, useNavCommandMenu, relevanceFilter } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\nexport {\n NavBrandButton,\n NavIconButton,\n NavWalletTrigger,\n NavAccountSheet,\n useNavAccountSheet,\n} from \"./components/nav-shell.js\";\nexport type {\n NavBrandButtonProps,\n NavIconButtonProps,\n NavWalletTriggerProps,\n NavAccountSheetProps,\n} from \"./components/nav-shell.js\";\n\nexport { PortfolioHeader } from \"./components/portfolio-header.js\";\nexport type {\n PortfolioHeaderProps,\n PortfolioHeaderScore,\n} from \"./components/portfolio-header.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\nexport { PortfolioSection } from \"./components/portfolio-section.js\";\nexport type {\n PortfolioSectionProps,\n PortfolioSectionColor,\n} from \"./components/portfolio-section.js\";\nexport { PortfolioChipFilter } from \"./components/portfolio-chip-filter.js\";\nexport type {\n PortfolioChipFilterProps,\n PortfolioChipFilterOption,\n} from \"./components/portfolio-chip-filter.js\";\n\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n\nexport { LevelBadge } from \"./components/rewards/level-badge.js\";\nexport type { LevelBadgeProps } from \"./components/rewards/level-badge.js\";\nexport { XpProgress } from \"./components/rewards/xp-progress.js\";\nexport type { XpProgressProps } from \"./components/rewards/xp-progress.js\";\nexport { BadgeShelf } from \"./components/rewards/badge-shelf.js\";\nexport type { BadgeShelfProps, BadgeShelfBadge } from \"./components/rewards/badge-shelf.js\";\nexport { ScoreSummaryCard } from \"./components/rewards/score-summary-card.js\";\nexport type { ScoreSummaryCardProps } from \"./components/rewards/score-summary-card.js\";\nexport { LeaderboardTable, LeaderboardWidget } from \"./components/rewards/leaderboard-table.js\";\nexport type { LeaderboardTableProps, LeaderboardWidgetProps, LeaderboardEntryLike } from \"./components/rewards/leaderboard-table.js\";\nexport { LevelJourneyList } from \"./components/rewards/level-journey-list.js\";\nexport type { LevelJourneyListProps, LevelJourneyListLevel } from \"./components/rewards/level-journey-list.js\";\nexport { BadgeCatalog } from \"./components/rewards/badge-catalog.js\";\nexport type { BadgeCatalogProps, BadgeCatalogBadge } from \"./components/rewards/badge-catalog.js\";\nexport { XpEarned } from \"./components/rewards/xp-earned.js\";\nexport type { XpEarnedProps } from \"./components/rewards/xp-earned.js\";\nexport { createRewardEarned } from \"./components/rewards/reward-earned.js\";\nexport type { RewardEarnedProps, RewardSnapshot } from \"./components/rewards/reward-earned.js\";\n\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport { ActivitiesFeed } from \"./components/activities-feed.js\";\nexport type { ActivitiesFeedProps } from \"./components/activities-feed.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n\nexport { RewardsSection } from \"./components/rewards-section.js\";\nexport type { RewardsSectionProps } from \"./components/rewards-section.js\";\n\nexport { ActionButton } from \"./components/action-button.js\";\nexport type { ActionButtonProps, ActionKey, ToneKey } from \"./components/action-button.js\";\nexport { GradientButton } from \"./components/gradient-button.js\";\nexport type { GradientButtonProps } from \"./components/gradient-button.js\";\n\nexport { CoinLaunchPreview } from \"./components/coin-launch-preview.js\";\nexport type { CoinPreviewData } from \"./components/coin-launch-preview.js\";\nexport { MedialaneCollectionCard } from \"./components/medialane-collection-card.js\";\nexport type { MedialaneCollectionCardProps } from \"./components/medialane-collection-card.js\";\nexport { TokenGlyph, TokenAmount } from \"./components/token-glyph.js\";\nexport type { TokenGlyphProps, TokenAmountProps, TokenSymbol } from \"./components/token-glyph.js\";\n\nexport { StatTile, StatPill, StatPillRow } from \"./components/stat-tile.js\";\nexport type { StatTileProps, StatPillProps, StatPillRowItem } from \"./components/stat-tile.js\";\n\nexport { ActionDialog } from \"./components/action-dialog.js\";\nexport type { ActionDialogProps } from \"./components/action-dialog.js\";\n\nexport { HiddenContentBanner } from \"./components/hidden-content-banner.js\";\nexport { CollectionHeroBanner } from \"./components/collection-hero-banner.js\";\nexport type { CollectionHeroBannerProps, CollectionHeroStat } from \"./components/collection-hero-banner.js\";\n\nexport { useRewardsCelebrations } from \"./components/rewards/use-rewards-celebrations.js\";\nexport { LevelUpCelebration } from \"./components/rewards/level-up-celebration.js\";\nexport type { LevelUpCelebrationProps } from \"./components/rewards/level-up-celebration.js\";\nexport { BadgeUnlocked } from \"./components/rewards/badge-unlocked.js\";\nexport type { BadgeUnlockedProps } from \"./components/rewards/badge-unlocked.js\";\nexport { JourneyPath } from \"./components/rewards/journey-path.js\";\nexport type { JourneyPathProps, JourneyStep } from \"./components/rewards/journey-path.js\";\n\nexport { Skeleton } from \"./components/skeleton.js\";\nexport { Badge, badgeVariants } from \"./components/badge.js\";\nexport type { BadgeProps } from \"./components/badge.js\";\nexport { Label } from \"./components/label.js\";\nexport { Input } from \"./components/input.js\";\nexport { Switch } from \"./components/switch.js\";\nexport { Checkbox } from \"./components/checkbox.js\";\nexport { Alert, AlertTitle, AlertDescription } from \"./components/alert.js\";\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from \"./components/tabs.js\";\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from \"./components/card.js\";\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./components/collapsible.js\";\nexport { Button, buttonVariants } from \"./components/button.js\";\nexport type { ButtonProps } from \"./components/button.js\";\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from \"./components/popover.js\";\nexport { HelpIcon } from \"./components/help-icon.js\";\nexport { EmptyOrError } from \"./components/empty-or-error.js\";\nexport { TabEmptyState } from \"./components/tab-empty-state.js\";\nexport type { TabEmptyStateProps } from \"./components/tab-empty-state.js\";\nexport {\n Select, SelectGroup, SelectValue, SelectTrigger, SelectContent,\n SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton,\n} from \"./components/select.js\";\nexport {\n useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField,\n} from \"./components/form.js\";\nexport { Textarea } from \"./components/textarea.js\";\nexport type { TextareaProps } from \"./components/textarea.js\";\nexport {\n Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent,\n SheetHeader, SheetFooter, SheetTitle, SheetDescription,\n} from \"./components/sheet.js\";\n\nexport { ToggleGroup, Section } from \"./components/create-form-primitives.js\";\nexport { OrderSortControl, sortOrders } from \"./components/order-sort-control.js\";\nexport type { OrderSort } from \"./components/order-sort-control.js\";\nexport { AssetLightbox } from \"./components/asset-lightbox.js\";\nexport type { AssetLightboxProps } from \"./components/asset-lightbox.js\";\nexport { PriceHistoryChart } from \"./components/price-history-chart.js\";\nexport type { PriceHistoryChartProps } from \"./components/price-history-chart.js\";\nexport { NavThemeToggle } from \"./components/nav-theme-toggle.js\";\nexport { JsonLd } from \"./components/json-ld.js\";\nexport type { JsonLdProps } from \"./components/json-ld.js\";\nexport { CreationRecord } from \"./components/creation-record.js\";\nexport type { CreationRecordProps } from \"./components/creation-record.js\";\nexport { ClubOwnerActions } from \"./components/club-owner-actions.js\";\nexport type { ClubOwnerActionsProps } from \"./components/club-owner-actions.js\";\nexport { IPTypeFields } from \"./components/ip-type-fields.js\";\nexport type { IPTypeFieldsProps, MetadataField } from \"./components/ip-type-fields.js\";\n\nexport { FastMint } from \"./components/fast-mint/fast-mint.js\";\nexport { Dropzone } from \"./components/fast-mint/dropzone.js\";\nexport type { DropzoneProps } from \"./components/fast-mint/dropzone.js\";\nexport { SuccessView } from \"./components/fast-mint/success-view.js\";\nexport type { SuccessViewProps } from \"./components/fast-mint/success-view.js\";\nexport type {\n MediaKind, FastMintSigner, MintedAsset, FastMintProps,\n} from \"./components/fast-mint/types.js\";\nexport { readBodyWithCap } from \"./utils/proxy-body.js\";\nexport type { CappedBody } from \"./utils/proxy-body.js\";\nexport {\n formatActivity, formatOrderNotification, formatOfferAcceptedNotification, formatAssetReceivedNotification,\n} from \"./utils/format-activity.js\";\nexport type { FormattedEvent } from \"./utils/format-activity.js\";\n\nexport { queryKeys, queryKeyPrefix, QUERY_PREFIX } from \"./utils/query-keys.js\";\nexport { useCollectionProfile, useCreatorProfile } from \"./utils/use-profiles.js\";\nexport { useActivities, useActivitiesByAddress } from \"./utils/use-activities.js\";\nexport {\n useCollections, useCollection, useCollectionsByOwner, useCollectionTokens, useNearbyCollectionTokens,\n} from \"./utils/use-collections.js\";\nexport type { CollectionSort } from \"./utils/use-collections.js\";\nexport { CreatorChip } from \"./components/creator-chip.js\";\nexport type { CreatorChipProps } from \"./components/creator-chip.js\";\nexport { CollectionActivityTab } from \"./components/collection-activity-tab.js\";\nexport type { CollectionActivityTabProps } from \"./components/collection-activity-tab.js\";\nexport { CollectionTraitsTab } from \"./components/collection-traits-tab.js\";\nexport type { CollectionTraitsTabProps } from \"./components/collection-traits-tab.js\";\nexport { PortfolioActivity } from \"./components/portfolio-activity.js\";\nexport type { PortfolioActivityProps } from \"./components/portfolio-activity.js\";\nexport { CreatorScoreInline } from \"./components/creator-score-inline.js\";\nexport type { CreatorScoreInlineProps } from \"./components/creator-score-inline.js\";\n\nexport { useMedialaneClient } from \"./utils/use-medialane-client.js\";\nexport { useCreators } from \"./utils/use-creators.js\";\nexport {\n useRewards, useLeaderboard, useRewardsEvents, useRewardsConfig, useRewardsBatch,\n} from \"./utils/use-rewards.js\";\nexport type { UserRewards, LeaderboardEntry, BadgeSummary, LevelSummary } from \"./utils/use-rewards.js\";\n\nexport {\n useOrders, useOrder, useTokenListings, useUserOrders, useCounterOffers,\n useReceivedOffers, useCollectionFloorListings,\n} from \"./utils/use-orders.js\";\nexport { useNotifications } from \"./utils/use-notifications.js\";\nexport type { Notification, NotificationType, NotificationPriority, Announcement } from \"./data/notification.js\";\nexport { useTokenRemixes } from \"./utils/use-remix-offers.js\";\nexport { RemixesTab } from \"./components/remixes-tab.js\";\nexport type { RemixesTabProps } from \"./components/remixes-tab.js\";\n\nexport { OwnerSetupPanel } from \"./components/owner-setup-panel.js\";\nexport { DropCountdown } from \"./components/drop-countdown.js\";\nexport { CreatorAnalytics } from \"./components/creator-analytics.js\";\nexport {\n Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger,\n DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription,\n} from \"./components/dialog.js\";\nexport { SelfFundConsentDialog, feeLabelFor } from \"./components/wallet/self-fund-consent-dialog.js\";\nexport { ExportKeySection, type ExportKeySectionProps } from \"./components/wallet/export-key-section.js\";\nexport { useDrops, useMyDrops, useDrop, useDropMints, useDropFile, useDropChain } from \"./utils/use-drops.js\";\nexport type { DropChainState } from \"./utils/use-drops.js\";\nexport { usePopCollections, useMyPopEvents, usePopClaimStatus } from \"./utils/use-pop.js\";\nexport { usePlatformStats } from \"./utils/use-platform-stats.js\";\nexport { useTokensByIpType } from \"./utils/use-tokens-by-ip-type.js\";\nexport { usePriceMap, useCoinPrice } from \"./utils/use-coin-price.js\";\nexport {\n useSponsorshipOffers, useSponsorshipOffer, useSponsorshipBids, useSponsorshipProposals,\n useSponsorshipProposal, usePendingProposalsForAsset, useSponsorshipLicenses, useMySponsorshipDealCounts,\n} from \"./utils/use-sponsorship.js\";\nexport {\n predictNextMembershipId, predictNextTicketId, useMyClubCollections, useMyTicketCollections,\n useMembershipList, useTicketList, useMembershipOnchain, useTicketOnchain, useIsMemberOf,\n type TierOnchain, type TierListItem,\n} from \"./utils/use-tiers.js\";\nexport { collectSitemapData, type SitemapData, type SitemapLimits } from \"./utils/sitemap-data.js\";\n"],"mappings":"AACA,SAAS,UAAU;AACnB,SAAS,oBAAoB,mBAAmB,kBAAkB,WAAW,gBAAgB,0BAA0B;AACvH,SAAS,sBAAsB;AAC/B,SAAS,uBAAyE;AAClF,SAAS,YAA+B,uBAA6B;AACrE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP,SAAS,6BAA6B;AACtC,SAAS,YAAY,gBAAgB;AACrC,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,S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EAAmB;AAAA,EAAe;AAAA,EAAsB;AAAA,EAAkB;AAAA,OAErE;AACP,SAAS,0BAAgE;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice, parsePriceDisplay, isStableCurrency, formatUsd, formatUsdPrice, formatSmallDecimal } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { profileIdentity, type ProfileIdentity, type ProfileIdentitySource } from \"./utils/profile-identity.js\";\nexport { ipfsToHttp, DEFAULT_GATEWAY as PINATA_PUBLIC_GATEWAY } from \"./utils/ipfs.js\";\nexport {\n uploadFileToIpfs,\n uploadJsonToIpfs,\n uploadDirectoryToIpfs,\n pinAssetMetadata,\n uploadFailureToast,\n isUserRejection,\n type SignedUploadKind,\n type UploadedIpfsFile,\n type PinAssetMetadataInput,\n type PinnedAsset,\n} from \"./utils/ipfs-upload.js\";\nexport { useIntersectionActive } from \"./utils/use-intersection-active.js\";\nexport { getReadIds, markRead } from \"./utils/notification-storage.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\nexport {\n isBareExecuteFailure,\n isUserRejectedRequest,\n isWrongNetwork,\n assertCorrectNetwork,\n WrongNetworkError,\n} from \"./utils/wallet-error.js\";\nexport {\n describeError,\n UserFacingError,\n NOT_SUBMITTED,\n GENERIC,\n NETWORK_BUSY,\n} from \"./utils/describe-error.js\";\nexport type { ErrorNotice } from \"./utils/describe-error.js\";\n\nexport { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"./data/ip-types.js\";\nexport type { IpTypeData } from \"./data/ip-types.js\";\nexport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES,\n DERIVATIVES_OPTIONS, LICENSE_TRAIT_TYPES,\n} from \"./data/ip.js\";\nexport type { IPType, LicenseType } from \"./data/ip.js\";\nexport {\n IP_TEMPLATES, EMBED_PLATFORM_META, SOCIAL_PLATFORM_META, TEMPLATE_TRAIT_TYPES, DOC_UPLOAD,\n} from \"./data/ip-templates.js\";\nexport type { EmbedPlatform, SocialPlatform, TraitSuggestion, IPTemplate, DocUploadConfig } from \"./data/ip-templates.js\";\nexport { IPTypeDisplay } from \"./components/ip-type-display.js\";\nexport { AssetOverviewContent } from \"./components/asset-overview-content.js\";\nexport { AssetLicenseSummary } from \"./components/asset-license-summary.js\";\nexport { AssetMarketsTab } from \"./components/asset-markets-tab.js\";\nexport { ParentAttributionBanner } from \"./components/parent-attribution-banner.js\";\nexport type { ParentBannerProps } from \"./components/parent-attribution-banner.js\";\nexport { AssetMediaColumn, AssetHeaderBlock, AssetOwnerRow, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport type { AssetOwnerRowProps } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\nexport { LIVING_RENDER_COLLECTIONS, isLivingRenderCollection } from \"./data/living-render-collections.js\";\n\nexport { CurrencyIcon, CurrencyAmount } from \"./components/currency-icon.js\";\nexport type { CurrencyIconProps, CurrencyAmountProps } from \"./components/currency-icon.js\";\n\nexport { IpTypeBadge, IP_TYPE_CONFIG, IP_TYPE_MAP } from \"./components/ip-type-badge.js\";\nexport type { IpTypeBadgeProps, IpTypeConfig } from \"./components/ip-type-badge.js\";\n\nexport { AddressDisplay } from \"./components/address-display.js\";\nexport type { AddressDisplayProps } from \"./components/address-display.js\";\n\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps } from \"./components/token-card.js\";\nexport { AnimatedTokenMedia } from \"./components/animated-token-media.js\";\nexport type { AnimatedTokenMediaProps } from \"./components/animated-token-media.js\";\nexport { ThemeAmbientBackground } from \"./components/theme-ambient-background.js\";\nexport {\n useCollectionFilters, SORT_OPTIONS, CollectionFiltersTrigger, CollectionFiltersBody,\n} from \"./components/collection-filters.js\";\nexport type { TraitSection, CollectionFiltersTriggerProps, CollectionFiltersBodyProps } from \"./components/collection-filters.js\";\nexport {\n DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem,\n DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel,\n DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup,\n DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent,\n DropdownMenuSubTrigger, DropdownMenuRadioGroup,\n} from \"./components/dropdown-menu.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\nexport { AssetPicker } from \"./components/asset-picker.js\";\nexport type { AssetPickerProps, OwnedAsset } from \"./components/asset-picker.js\";\nexport { AssetSearchPicker } from \"./components/asset-search-picker.js\";\nexport type { AssetSearchPickerProps } from \"./components/asset-search-picker.js\";\nexport { LicenseTermsBuilder, EMPTY_SPONSORSHIP_TERMS, MEDIA_TYPES, DURATION_UNITS, toLicenseMetadata, toDurationDays } from \"./components/license-terms-builder.js\";\nexport type { LicenseTermsBuilderProps, SponsorshipTerms, DurationUnit } from \"./components/license-terms-builder.js\";\n\nexport {\n coinKind, coinKindLabel, coinKindLabelPlural, COIN_KINDS, coinAccentToken, coinServiceIds, isCoinService, formatCoinPrice, coinSupply, formatFdvUsd, fdvUsd,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinGuarantees, type CoinGuaranteesProps, type CoinGuaranteesData } from \"./components/coin-guarantees.js\";\nexport { CoinRow, CoinRowSkeleton, CoinAvatar, COIN_GRID, type UseCoinPrice, type CoinRowProps, type CoinMarketStatus } from \"./components/coin-row.js\";\nexport { orderCoins, type CoinPriceSort } from \"./data/coin-order.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins, type UsePriceMap, type CoinCounts,\n} from \"./components/coins-explorer.js\";\n\nexport { timeAgo, timeUntil, isExpired } from \"./utils/time.js\";\nexport { toDisplayUrl, toDisplayUrlOrNull, toAbsoluteImageUrl, type DisplayUrlOptions } from \"./utils/ipfs.js\";\nexport { isSameAddress } from \"./utils/same-address.js\";\nexport { createAppWallet } from \"./utils/app-wallet.js\";\nexport type { AppWalletConfig } from \"./utils/app-wallet.js\";\nexport { detectPasskeySupport } from \"./utils/passkey-support.js\";\nexport type { PasskeySupport } from \"./utils/passkey-support.js\";\nexport { describeWalletFailure, isPasskeyCancelled, passkeyUnsupportedReason } from \"./utils/wallet-failure.js\";\nexport type { PasskeyUnsupportedReason, WalletFailureKind, WalletFailureNotice } from \"./utils/wallet-failure.js\";\nexport {\n RESEND_COOLDOWN_SECONDS,\n canResendCode,\n canVerifyCode,\n emailCodeReducer,\n initialEmailCodeState,\n} from \"./utils/email-code.js\";\nexport type { EmailCodeAction, EmailCodeState, EmailCodeStatus } from \"./utils/email-code.js\";\nexport { useEmailCode } from \"./utils/use-email-code.js\";\nexport type { EmailCode, EmailCodeApi } from \"./utils/use-email-code.js\";\nexport { AccountSection } from \"./components/account/account-section.js\";\nexport type { AccountSectionProps } from \"./components/account/account-section.js\";\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } from \"./components/account/input-otp.js\";\nexport { EmailCodeEntry } from \"./components/account/email-code-entry.js\";\nexport type { EmailCodeEntryProps } from \"./components/account/email-code-entry.js\";\nexport { DevicesSection } from \"./components/account/devices-section.js\";\nexport type { DevicesSectionProps } from \"./components/account/devices-section.js\";\nexport { DeviceApprovalDialog } from \"./components/account/device-approval-dialog.js\";\nexport type { DeviceApprovalDialogProps } from \"./components/account/device-approval-dialog.js\";\nexport { GuardianRecoverySection } from \"./components/account/guardian-recovery-section.js\";\nexport type { GuardianRecoverySectionProps } from \"./components/account/guardian-recovery-section.js\";\nexport { AddGuardianDialog } from \"./components/account/add-guardian-dialog.js\";\nexport type { AddGuardianDialogProps } from \"./components/account/add-guardian-dialog.js\";\nexport type { DeviceWallet, GuardianWallet, LoadSealedOwner } from \"./components/account/wallet-types.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport {\n MarketplaceTxLink,\n MarketplaceProcessingState,\n MarketplaceSignInGate,\n MarketplaceSuccessState,\n MarketplaceErrorState,\n MarketplaceDialogHero,\n CurrencyPicker,\n DurationPicker,\n MarketplaceConfirmStep,\n} from \"./components/marketplace-dialog-primitives.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport { ActivityTimelineRow } from \"./components/activity-timeline-row.js\";\nexport type { ActivityTimelineRowProps } from \"./components/activity-timeline-row.js\";\nexport { DropItemList } from \"./components/drop-item-list.js\";\nexport type { DraftItem } from \"./components/drop-item-list.js\";\nexport { getDefaultClaimWindow, suggestLaunchpadSymbol } from \"./utils/launchpad-defaults.js\";\nexport { DropStatusBadge, DropSupplyProgress } from \"./components/drop/drop-status.js\";\nexport { DropCard, DropGrid, DropGridSkeleton } from \"./components/drop/drop-card.js\";\nexport { DropListing } from \"./components/drop/drop-listing.js\";\nexport { DropFeatures } from \"./components/drop/drop-features.js\";\nexport { MyDrops } from \"./components/drop/my-drops.js\";\nexport { DropTokenLink } from \"./components/drop/drop-token-link.js\";\nexport type { DropPhase } from \"./utils/drop/view.js\";\nexport { DropCreate, DraftSummary } from \"./components/drop/create/drop-create.js\";\nexport { ExclusiveFields } from \"./components/drop/create/exclusive-fields.js\";\nexport { DropPage } from \"./components/drop/page/drop-page.js\";\nexport { DropActionBox } from \"./components/drop/page/drop-action-box.js\";\nexport { DropActivityList } from \"./components/drop/page/drop-activity.js\";\nexport { claimProofFor } from \"./utils/drop/claim-proof.js\";\nexport type { DropAppProps, DropSigner, DropProvider } from \"./utils/drop/types.js\";\nexport { GATED_CONTENT_TYPES, GATED_CONTENT_TYPE_FALLBACK } from \"./data/gated-content-types.js\";\nexport type { ContentTypeConfig } from \"./data/gated-content-types.js\";\nexport { CollapsibleSection } from \"./components/collapsible-section.js\";\nexport { useUsdPrices, usdPriceFor } from \"./utils/use-usd-prices.js\";\nexport type { UsdPrices } from \"./utils/use-usd-prices.js\";\nexport { NotificationRow } from \"./components/notification-row.js\";\nexport type { NotificationRowProps } from \"./components/notification-row.js\";\nexport { NOTIFICATION_ICON, NOTIFICATION_COLOR, NOTIFICATION_LABEL } from \"./data/notification-meta.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection, DiscoverActivityStrip } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps, DiscoverActivityStripProps } from \"./components/discover-feed-section.js\";\nexport { ActivityCard, ActivityCardSkeleton, ACTIVITY_MESSAGES } from \"./components/activity-card.js\";\nexport type { ActivityCardProps } from \"./components/activity-card.js\";\n\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES, useLaunchpadFilter } from \"./components/launchpad-services.js\";\nexport { LaunchpadFilterBar } from \"./components/launchpad-filter-bar.js\";\nexport type { LaunchpadFilterBarProps } from \"./components/launchpad-filter-bar.js\";\nexport { LaunchpadStrip } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadStripProps } from \"./components/launchpad-strip.js\";\nexport { LaunchpadCtaBanner } from \"./components/launchpad-cta-banner.js\";\nexport type { LaunchpadCtaBannerProps } from \"./components/launchpad-cta-banner.js\";\nexport type { LaunchpadGroupedSectionsProps, LaunchpadServiceCardProps, ServiceOverride, ServiceOverrides } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_ROUTE_OVERRIDES } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\nexport { NavCommandMenu, useNavCommandMenu, relevanceFilter } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\nexport {\n NavBrandButton,\n NavIconButton,\n NavWalletTrigger,\n NavAccountSheet,\n useNavAccountSheet,\n} from \"./components/nav-shell.js\";\nexport type {\n NavBrandButtonProps,\n NavIconButtonProps,\n NavWalletTriggerProps,\n NavAccountSheetProps,\n} from \"./components/nav-shell.js\";\n\nexport { PortfolioHeader } from \"./components/portfolio-header.js\";\nexport type {\n PortfolioHeaderProps,\n PortfolioHeaderScore,\n} from \"./components/portfolio-header.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\nexport { PortfolioSection } from \"./components/portfolio-section.js\";\nexport type {\n PortfolioSectionProps,\n PortfolioSectionColor,\n} from \"./components/portfolio-section.js\";\nexport { PortfolioChipFilter } from \"./components/portfolio-chip-filter.js\";\nexport type {\n PortfolioChipFilterProps,\n PortfolioChipFilterOption,\n} from \"./components/portfolio-chip-filter.js\";\n\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n\nexport { LevelBadge } from \"./components/rewards/level-badge.js\";\nexport type { LevelBadgeProps } from \"./components/rewards/level-badge.js\";\nexport { XpProgress } from \"./components/rewards/xp-progress.js\";\nexport type { XpProgressProps } from \"./components/rewards/xp-progress.js\";\nexport { BadgeShelf } from \"./components/rewards/badge-shelf.js\";\nexport type { BadgeShelfProps, BadgeShelfBadge } from \"./components/rewards/badge-shelf.js\";\nexport { ScoreSummaryCard } from \"./components/rewards/score-summary-card.js\";\nexport type { ScoreSummaryCardProps } from \"./components/rewards/score-summary-card.js\";\nexport { LeaderboardTable, LeaderboardWidget } from \"./components/rewards/leaderboard-table.js\";\nexport type { LeaderboardTableProps, LeaderboardWidgetProps, LeaderboardEntryLike } from \"./components/rewards/leaderboard-table.js\";\nexport { LevelJourneyList } from \"./components/rewards/level-journey-list.js\";\nexport type { LevelJourneyListProps, LevelJourneyListLevel } from \"./components/rewards/level-journey-list.js\";\nexport { BadgeCatalog } from \"./components/rewards/badge-catalog.js\";\nexport type { BadgeCatalogProps, BadgeCatalogBadge } from \"./components/rewards/badge-catalog.js\";\nexport { XpEarned } from \"./components/rewards/xp-earned.js\";\nexport type { XpEarnedProps } from \"./components/rewards/xp-earned.js\";\nexport { createRewardEarned } from \"./components/rewards/reward-earned.js\";\nexport type { RewardEarnedProps, RewardSnapshot } from \"./components/rewards/reward-earned.js\";\n\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport { ActivitiesFeed } from \"./components/activities-feed.js\";\nexport type { ActivitiesFeedProps } from \"./components/activities-feed.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n\nexport { RewardsSection } from \"./components/rewards-section.js\";\nexport type { RewardsSectionProps } from \"./components/rewards-section.js\";\n\nexport { ActionButton } from \"./components/action-button.js\";\nexport type { ActionButtonProps, ActionKey, ToneKey } from \"./components/action-button.js\";\nexport { GradientButton } from \"./components/gradient-button.js\";\nexport type { GradientButtonProps } from \"./components/gradient-button.js\";\n\nexport { CoinLaunchPreview } from \"./components/coin-launch-preview.js\";\nexport type { CoinPreviewData } from \"./components/coin-launch-preview.js\";\nexport { MedialaneCollectionCard } from \"./components/medialane-collection-card.js\";\nexport type { MedialaneCollectionCardProps } from \"./components/medialane-collection-card.js\";\nexport { TokenGlyph, TokenAmount } from \"./components/token-glyph.js\";\nexport type { TokenGlyphProps, TokenAmountProps, TokenSymbol } from \"./components/token-glyph.js\";\n\nexport { StatTile, StatPill, StatPillRow } from \"./components/stat-tile.js\";\nexport type { StatTileProps, StatPillProps, StatPillRowItem } from \"./components/stat-tile.js\";\n\nexport { ActionDialog } from \"./components/action-dialog.js\";\nexport type { ActionDialogProps } from \"./components/action-dialog.js\";\n\nexport { HiddenContentBanner } from \"./components/hidden-content-banner.js\";\nexport { CollectionHeroBanner } from \"./components/collection-hero-banner.js\";\nexport type { CollectionHeroBannerProps, CollectionHeroStat } from \"./components/collection-hero-banner.js\";\n\nexport { useRewardsCelebrations } from \"./components/rewards/use-rewards-celebrations.js\";\nexport { LevelUpCelebration } from \"./components/rewards/level-up-celebration.js\";\nexport type { LevelUpCelebrationProps } from \"./components/rewards/level-up-celebration.js\";\nexport { BadgeUnlocked } from \"./components/rewards/badge-unlocked.js\";\nexport type { BadgeUnlockedProps } from \"./components/rewards/badge-unlocked.js\";\nexport { JourneyPath } from \"./components/rewards/journey-path.js\";\nexport type { JourneyPathProps, JourneyStep } from \"./components/rewards/journey-path.js\";\n\nexport { Skeleton } from \"./components/skeleton.js\";\nexport { Badge, badgeVariants } from \"./components/badge.js\";\nexport type { BadgeProps } from \"./components/badge.js\";\nexport { Label } from \"./components/label.js\";\nexport { Input } from \"./components/input.js\";\nexport { Switch } from \"./components/switch.js\";\nexport { Checkbox } from \"./components/checkbox.js\";\nexport { Alert, AlertTitle, AlertDescription } from \"./components/alert.js\";\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from \"./components/tabs.js\";\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from \"./components/card.js\";\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./components/collapsible.js\";\nexport { Button, buttonVariants } from \"./components/button.js\";\nexport type { ButtonProps } from \"./components/button.js\";\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from \"./components/popover.js\";\nexport { HelpIcon } from \"./components/help-icon.js\";\nexport { EmptyOrError } from \"./components/empty-or-error.js\";\nexport { TabEmptyState } from \"./components/tab-empty-state.js\";\nexport type { TabEmptyStateProps } from \"./components/tab-empty-state.js\";\nexport {\n Select, SelectGroup, SelectValue, SelectTrigger, SelectContent,\n SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton,\n} from \"./components/select.js\";\nexport {\n useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField,\n} from \"./components/form.js\";\nexport { Textarea } from \"./components/textarea.js\";\nexport type { TextareaProps } from \"./components/textarea.js\";\nexport {\n Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent,\n SheetHeader, SheetFooter, SheetTitle, SheetDescription,\n} from \"./components/sheet.js\";\n\nexport { ToggleGroup, Section } from \"./components/create-form-primitives.js\";\nexport { OrderSortControl, sortOrders } from \"./components/order-sort-control.js\";\nexport type { OrderSort } from \"./components/order-sort-control.js\";\nexport { AssetLightbox } from \"./components/asset-lightbox.js\";\nexport type { AssetLightboxProps } from \"./components/asset-lightbox.js\";\nexport { PriceHistoryChart } from \"./components/price-history-chart.js\";\nexport type { PriceHistoryChartProps } from \"./components/price-history-chart.js\";\nexport { NavThemeToggle } from \"./components/nav-theme-toggle.js\";\nexport { JsonLd } from \"./components/json-ld.js\";\nexport type { JsonLdProps } from \"./components/json-ld.js\";\nexport { CreationRecord } from \"./components/creation-record.js\";\nexport type { CreationRecordProps } from \"./components/creation-record.js\";\nexport { ClubOwnerActions } from \"./components/club-owner-actions.js\";\nexport type { ClubOwnerActionsProps } from \"./components/club-owner-actions.js\";\nexport { IPTypeFields } from \"./components/ip-type-fields.js\";\nexport type { IPTypeFieldsProps, MetadataField } from \"./components/ip-type-fields.js\";\n\nexport { FastMint } from \"./components/fast-mint/fast-mint.js\";\nexport { Dropzone } from \"./components/fast-mint/dropzone.js\";\nexport type { DropzoneProps } from \"./components/fast-mint/dropzone.js\";\nexport { SuccessView } from \"./components/fast-mint/success-view.js\";\nexport type { SuccessViewProps } from \"./components/fast-mint/success-view.js\";\nexport type {\n MediaKind, FastMintSigner, MintedAsset, FastMintProps,\n} from \"./components/fast-mint/types.js\";\nexport { readBodyWithCap } from \"./utils/proxy-body.js\";\nexport type { CappedBody } from \"./utils/proxy-body.js\";\nexport {\n formatActivity, formatOrderNotification, formatOfferAcceptedNotification, formatAssetReceivedNotification,\n} from \"./utils/format-activity.js\";\nexport type { FormattedEvent } from \"./utils/format-activity.js\";\n\nexport { queryKeys, queryKeyPrefix, QUERY_PREFIX } from \"./utils/query-keys.js\";\nexport { useCollectionProfile, useCreatorProfile } from \"./utils/use-profiles.js\";\nexport { useActivities, useActivitiesByAddress } from \"./utils/use-activities.js\";\nexport {\n useCollections, useCollection, useCollectionsByOwner, useCollectionTokens, useNearbyCollectionTokens,\n} from \"./utils/use-collections.js\";\nexport type { CollectionSort } from \"./utils/use-collections.js\";\nexport { CreatorChip } from \"./components/creator-chip.js\";\nexport type { CreatorChipProps } from \"./components/creator-chip.js\";\nexport { CollectionActivityTab } from \"./components/collection-activity-tab.js\";\nexport type { CollectionActivityTabProps } from \"./components/collection-activity-tab.js\";\nexport { CollectionTraitsTab } from \"./components/collection-traits-tab.js\";\nexport type { CollectionTraitsTabProps } from \"./components/collection-traits-tab.js\";\nexport { PortfolioActivity } from \"./components/portfolio-activity.js\";\nexport type { PortfolioActivityProps } from \"./components/portfolio-activity.js\";\nexport { CreatorScoreInline } from \"./components/creator-score-inline.js\";\nexport type { CreatorScoreInlineProps } from \"./components/creator-score-inline.js\";\n\nexport { useMedialaneClient } from \"./utils/use-medialane-client.js\";\n\nexport { MediaWalletOverlay, useMediaWallet } from \"./components/media-wallet/media-wallet-overlay.js\";\nexport type {\n MediaWalletAppProps,\n MediaWalletHeaderIdentity,\n MediaWalletSession,\n MediaWalletView,\n WalletWriteAction,\n WalletWriteStatus,\n} from \"./components/media-wallet/types.js\";\nexport { useCreators } from \"./utils/use-creators.js\";\nexport {\n useRewards, useLeaderboard, useRewardsEvents, useRewardsConfig, useRewardsBatch,\n} from \"./utils/use-rewards.js\";\nexport type { UserRewards, LeaderboardEntry, BadgeSummary, LevelSummary } from \"./utils/use-rewards.js\";\n\nexport {\n useOrders, useOrder, useTokenListings, useUserOrders, useCounterOffers,\n useReceivedOffers, useCollectionFloorListings,\n} from \"./utils/use-orders.js\";\nexport { useNotifications } from \"./utils/use-notifications.js\";\nexport type { Notification, NotificationType, NotificationPriority, Announcement } from \"./data/notification.js\";\nexport { useTokenRemixes } from \"./utils/use-remix-offers.js\";\nexport { RemixesTab } from \"./components/remixes-tab.js\";\nexport type { RemixesTabProps } from \"./components/remixes-tab.js\";\n\nexport { OwnerSetupPanel } from \"./components/owner-setup-panel.js\";\nexport { DropCountdown } from \"./components/drop-countdown.js\";\nexport { CreatorAnalytics } from \"./components/creator-analytics.js\";\nexport {\n Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger,\n DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription,\n} from \"./components/dialog.js\";\nexport { SelfFundConsentDialog, feeLabelFor } from \"./components/wallet/self-fund-consent-dialog.js\";\nexport { ExportKeySection, type ExportKeySectionProps } from \"./components/wallet/export-key-section.js\";\nexport { useDrops, useMyDrops, useDrop, useDropMints, useDropFee, useDropFile, useDropChain } from \"./utils/use-drops.js\";\nexport type { DropChainState } from \"./utils/use-drops.js\";\nexport { usePopCollections, useMyPopEvents, usePopClaimStatus } from \"./utils/use-pop.js\";\nexport { usePlatformStats } from \"./utils/use-platform-stats.js\";\nexport { useTokensByIpType } from \"./utils/use-tokens-by-ip-type.js\";\nexport { usePriceMap, useCoinPrice } from \"./utils/use-coin-price.js\";\nexport {\n useSponsorshipOffers, useSponsorshipOffer, useSponsorshipBids, useSponsorshipProposals,\n useSponsorshipProposal, usePendingProposalsForAsset, useSponsorshipLicenses, useMySponsorshipDealCounts,\n} from \"./utils/use-sponsorship.js\";\nexport {\n predictNextMembershipId, predictNextTicketId, useMyClubCollections, useMyTicketCollections,\n useMembershipList, useTicketList, useMembershipOnchain, useTicketOnchain, useIsMemberOf,\n type TierOnchain, type TierListItem,\n} from \"./utils/use-tiers.js\";\nexport { collectSitemapData, type SitemapData, type SitemapLimits } from \"./utils/sitemap-data.js\";\n"],"mappings":"AACA,SAAS,UAAU;AACnB,SAAS,oBAAoB,mBAAmB,kBAAkB,WAAW,gBAAgB,0BAA0B;AACvH,SAAS,sBAAsB;AAC/B,SAAS,uBAAyE;AAClF,SAAS,YAA+B,uBAA6B;AACrE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP,SAAS,6BAA6B;AACtC,SAAS,YAAY,gBAAgB;AACrC,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,cAAc,wBAAwB;AAE/C;AAAA,EACE;AAAA,EAAU;AAAA,EAAe;AAAA,EAAmB;AAAA,EAC5C;AAAA,EAAqB;AAAA,OAChB;AAEP;AAAA,EACE;AAAA,EAAc;AAAA,EAAqB;AAAA,EAAsB;AAAA,EAAsB;AAAA,OAC1E;AAEP,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AAExC,SAAS,kBAAkB,kBAAkB,eAAe,yBAAyB;AAErF,SAAS,0BAA0B;AAEnC,SAAS,yBAAyB;AAElC,SAAS,6BAA6B;AAEtC,SAAS,aAAa;AACtB,SAAS,2BAA2B,gCAAgC;AAEpE,SAAS,cAAc,sBAAsB;AAG7C,SAAS,aAAa,gBAAgB,mBAAmB;AAGzD,SAAS,sBAAsB;AAG/B,SAAS,yBAAyB;AAGlC,SAAS,YAA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EAAe;AAAA,EACtD;AAAA,EAAmB;AAAA,OACd;AACP,SAAS,wBAAwB;AAEjC,SAAS,uBAAuB;AAChC,SAAS,kBAAkB;AAG3B,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EAAQ;AAAA,EAAc;AAAA,EAAe;AAAA,EAAa;AAAA,EAClD;AAAA,EAAe;AAAA,EAAc;AAAA,EAAc;AAAA,EAAa;AAAA,OACnD;AACP,SAAS,uBAAuB,mBAAmB;AACnD,SAAS,wBAAoD;AAC7D,SAAS,UAAU,YAAY,SAAS,cAAc,YAAY,aAAa,oBAAoB;AAEnG,SAAS,mBAAmB,gBAAgB,yBAAyB;AACrE,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAClC,SAAS,aAAa,oBAAoB;AAC1C;AAAA,EACE;AAAA,EAAsB;AAAA,EAAqB;AAAA,EAAoB;AAAA,EAC/D;AAAA,EAAwB;AAAA,EAA6B;AAAA,EAAwB;AAAA,OACxE;AACP;AAAA,EACE;AAAA,EAAyB;AAAA,EAAqB;AAAA,EAAsB;AAAA,EACpE;AAAA,EAAmB;AAAA,EAAe;AAAA,EAAsB;AAAA,EAAkB;AAAA,OAErE;AACP,SAAS,0BAAgE;","names":[]}
@@ -77,14 +77,14 @@ function toDropTerms(d) {
77
77
  maxPerWallet: d.limitPerWallet ? d.perWallet : "0"
78
78
  };
79
79
  }
80
- function collectorPriceLine(d, cfg) {
80
+ function collectorPriceLine(d, feeBps) {
81
81
  const token = d.paid ? saleToken(d.tokenSymbol) : null;
82
82
  if (!token || validateSale({ ...EMPTY_SALE, paid: true, price: d.price, tokenSymbol: d.tokenSymbol }, 0).price) return null;
83
83
  const price = BigInt((0, import_sdk.parseAmount)(d.price, token.decimals));
84
- const { fee, total } = (0, import_starknet.dropMintCost)(price, 1, cfg);
84
+ const { fee, total } = (0, import_starknet.dropMintCost)(price, 1, feeBps);
85
85
  const amount = (v) => `${(0, import_sdk.formatAmount)(v.toString(), token.decimals)} ${token.symbol}`;
86
86
  if (fee === 0n) return `Collectors pay ${amount(price)}.`;
87
- return `Collectors pay ${amount(total)} (incl. ${(0, import_starknet.feeBps)("launchpad", cfg) / 100}% platform fee). You receive ${amount(price)}.`;
87
+ return `Collectors pay ${amount(total)} (incl. ${feeBps / 100}% platform fee). You receive ${amount(price)}.`;
88
88
  }
89
89
  function priceLabel(price, paymentToken) {
90
90
  if (BigInt(price) === 0n) return "Free";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/drop/sale.ts"],"sourcesContent":["import { formatAmount, getListableTokens, getTokenByAddress, parseAmount, type DropTermsBody, type ResolvedFeeConfig } from \"@medialane/sdk\";\nimport { dropMintCost, feeBps } from \"@medialane/sdk/starknet\";\n\nexport interface SaleDraft {\n paid: boolean;\n /** In the token's normal units, e.g. \"5.5\". */\n price: string;\n tokenSymbol: string;\n startNow: boolean;\n /** `datetime-local` value in the creator's time zone. */\n start: string;\n hasEnd: boolean;\n end: string;\n limitPerWallet: boolean;\n perWallet: string;\n}\n\nexport const EMPTY_SALE: SaleDraft = {\n paid: false, price: \"\", tokenSymbol: \"USDC\",\n startNow: true, start: \"\", hasEnd: false, end: \"\",\n limitPerWallet: false, perWallet: \"\",\n};\n\nexport type SaleErrors = Partial<Record<\"price\" | \"start\" | \"end\" | \"perWallet\", string>>;\n\nexport function saleToken(symbol: string) {\n return getListableTokens().find((t) => t.symbol === symbol) ?? null;\n}\n\nconst toSeconds = (local: string): number | null => {\n if (!local) return null;\n const ms = new Date(local).getTime();\n return Number.isNaN(ms) ? null : Math.floor(ms / 1000);\n};\n\nexport function validateSale(d: SaleDraft, now: number): SaleErrors {\n const errors: SaleErrors = {};\n if (d.paid) {\n const token = saleToken(d.tokenSymbol);\n const decimals = d.price.split(\".\")[1]?.length ?? 0;\n if (!token) errors.price = \"Choose a currency\";\n else if (!/^\\d+(\\.\\d+)?$/.test(d.price)) errors.price = \"Enter a price above 0\";\n else if (decimals > token.decimals) errors.price = `Use at most ${token.decimals} decimals for ${token.symbol}`;\n else if (BigInt(parseAmount(d.price, token.decimals)) === 0n) errors.price = \"Enter a price above 0\";\n }\n const start = d.startNow ? now : toSeconds(d.start);\n if (!d.startNow && (start === null || start <= now)) errors.start = \"Pick a start time in the future\";\n if (d.hasEnd) {\n const end = toSeconds(d.end);\n if (end === null || (start !== null && end <= start)) errors.end = \"The sale must end after it starts\";\n }\n if (d.limitPerWallet && !/^[1-9]\\d*$/.test(d.perWallet)) errors.perWallet = \"Enter 1 or more\";\n return errors;\n}\n\n/** Terms for the create intent; call only after `validateSale` returns no errors. */\nexport function toDropTerms(d: SaleDraft): DropTermsBody {\n const token = d.paid ? saleToken(d.tokenSymbol) : null;\n return {\n startTime: d.startNow ? 0 : toSeconds(d.start)!,\n endTime: d.hasEnd ? toSeconds(d.end)! : 0,\n price: token ? parseAmount(d.price, token.decimals) : \"0\",\n paymentToken: token ? token.address : \"0x0\",\n maxPerWallet: d.limitPerWallet ? d.perWallet : \"0\",\n };\n}\n\n/** What one token costs a collector, with the platform fee; null while the price is free or unfinished. */\nexport function collectorPriceLine(d: SaleDraft, cfg: ResolvedFeeConfig): string | null {\n const token = d.paid ? saleToken(d.tokenSymbol) : null;\n if (!token || validateSale({ ...EMPTY_SALE, paid: true, price: d.price, tokenSymbol: d.tokenSymbol }, 0).price) return null;\n const price = BigInt(parseAmount(d.price, token.decimals));\n const { fee, total } = dropMintCost(price, 1, cfg);\n const amount = (v: bigint) => `${formatAmount(v.toString(), token.decimals)} ${token.symbol}`;\n if (fee === 0n) return `Collectors pay ${amount(price)}.`;\n return `Collectors pay ${amount(total)} (incl. ${feeBps(\"launchpad\", cfg) / 100}% platform fee). You receive ${amount(price)}.`;\n}\n\nexport function priceLabel(price: string, paymentToken: string): string {\n if (BigInt(price) === 0n) return \"Free\";\n const token = getTokenByAddress(paymentToken);\n return token ? `${formatAmount(price, token.decimals)} ${token.symbol}` : \"Paid\";\n}\n\nconst count = (v: string) => Number(v).toLocaleString(\"en-US\");\n\nexport function supplyLabel(minted: string, maxSupply: string): string {\n return maxSupply === \"0\" ? `${count(minted)} minted` : `${count(minted)} / ${count(maxSupply)} minted`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA4H;AAC5H,sBAAqC;AAgB9B,MAAM,aAAwB;AAAA,EACnC,MAAM;AAAA,EAAO,OAAO;AAAA,EAAI,aAAa;AAAA,EACrC,UAAU;AAAA,EAAM,OAAO;AAAA,EAAI,QAAQ;AAAA,EAAO,KAAK;AAAA,EAC/C,gBAAgB;AAAA,EAAO,WAAW;AACpC;AAIO,SAAS,UAAU,QAAgB;AACxC,aAAO,8BAAkB,EAAE,KAAK,CAAC,MAAM,EAAE,WAAW,MAAM,KAAK;AACjE;AAEA,MAAM,YAAY,CAAC,UAAiC;AAClD,MAAI,CAAC,MAAO,QAAO;AACnB,QAAM,KAAK,IAAI,KAAK,KAAK,EAAE,QAAQ;AACnC,SAAO,OAAO,MAAM,EAAE,IAAI,OAAO,KAAK,MAAM,KAAK,GAAI;AACvD;AAEO,SAAS,aAAa,GAAc,KAAyB;AAClE,QAAM,SAAqB,CAAC;AAC5B,MAAI,EAAE,MAAM;AACV,UAAM,QAAQ,UAAU,EAAE,WAAW;AACrC,UAAM,WAAW,EAAE,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,UAAU;AAClD,QAAI,CAAC,MAAO,QAAO,QAAQ;AAAA,aAClB,CAAC,gBAAgB,KAAK,EAAE,KAAK,EAAG,QAAO,QAAQ;AAAA,aAC/C,WAAW,MAAM,SAAU,QAAO,QAAQ,eAAe,MAAM,QAAQ,iBAAiB,MAAM,MAAM;AAAA,aACpG,WAAO,wBAAY,EAAE,OAAO,MAAM,QAAQ,CAAC,MAAM,GAAI,QAAO,QAAQ;AAAA,EAC/E;AACA,QAAM,QAAQ,EAAE,WAAW,MAA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aAAa,GAAG,IAAI,GAAG,gCAAgC,OAAO,KAAK,CAAC;AAC9H;AAEO,SAAS,WAAW,OAAe,cAA8B;AACtE,MAAI,OAAO,KAAK,MAAM,GAAI,QAAO;AACjC,QAAM,YAAQ,8BAAkB,YAAY;AAC5C,SAAO,QAAQ,OAAG,yBAAa,OAAO,MAAM,QAAQ,CAAC,IAAI,MAAM,MAAM,KAAK;AAC5E;AAEA,MAAM,QAAQ,CAAC,MAAc,OAAO,CAAC,EAAE,eAAe,OAAO;AAEtD,SAAS,YAAY,QAAgB,WAA2B;AACrE,SAAO,cAAc,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,GAAG,MAAM,MAAM,CAAC,MAAM,MAAM,SAAS,CAAC;AAC/F;","names":[]}
1
+ {"version":3,"sources":["../../../src/utils/drop/sale.ts"],"sourcesContent":["import { formatAmount, getListableTokens, getTokenByAddress, parseAmount, type DropTermsBody } from \"@medialane/sdk\";\nimport { dropMintCost } from \"@medialane/sdk/starknet\";\n\nexport interface SaleDraft {\n paid: boolean;\n /** In the token's normal units, e.g. \"5.5\". */\n price: string;\n tokenSymbol: string;\n startNow: boolean;\n /** `datetime-local` value in the creator's time zone. */\n start: string;\n hasEnd: boolean;\n end: string;\n limitPerWallet: boolean;\n perWallet: string;\n}\n\nexport const EMPTY_SALE: SaleDraft = {\n paid: false, price: \"\", tokenSymbol: \"USDC\",\n startNow: true, start: \"\", hasEnd: false, end: \"\",\n limitPerWallet: false, perWallet: \"\",\n};\n\nexport type SaleErrors = Partial<Record<\"price\" | \"start\" | \"end\" | \"perWallet\", string>>;\n\nexport function saleToken(symbol: string) {\n return getListableTokens().find((t) => t.symbol === symbol) ?? null;\n}\n\nconst toSeconds = (local: string): number | null => {\n if (!local) return null;\n const ms = new Date(local).getTime();\n return Number.isNaN(ms) ? null : Math.floor(ms / 1000);\n};\n\nexport function validateSale(d: SaleDraft, now: number): SaleErrors {\n const errors: SaleErrors = {};\n if (d.paid) {\n const token = saleToken(d.tokenSymbol);\n const decimals = d.price.split(\".\")[1]?.length ?? 0;\n if (!token) errors.price = \"Choose a currency\";\n else if (!/^\\d+(\\.\\d+)?$/.test(d.price)) errors.price = \"Enter a price above 0\";\n else if (decimals > token.decimals) errors.price = `Use at most ${token.decimals} decimals for ${token.symbol}`;\n else if (BigInt(parseAmount(d.price, token.decimals)) === 0n) errors.price = \"Enter a price above 0\";\n }\n const start = d.startNow ? now : toSeconds(d.start);\n if (!d.startNow && (start === null || start <= now)) errors.start = \"Pick a start time in the future\";\n if (d.hasEnd) {\n const end = toSeconds(d.end);\n if (end === null || (start !== null && end <= start)) errors.end = \"The sale must end after it starts\";\n }\n if (d.limitPerWallet && !/^[1-9]\\d*$/.test(d.perWallet)) errors.perWallet = \"Enter 1 or more\";\n return errors;\n}\n\n/** Terms for the create intent; call only after `validateSale` returns no errors. */\nexport function toDropTerms(d: SaleDraft): DropTermsBody {\n const token = d.paid ? saleToken(d.tokenSymbol) : null;\n return {\n startTime: d.startNow ? 0 : toSeconds(d.start)!,\n endTime: d.hasEnd ? toSeconds(d.end)! : 0,\n price: token ? parseAmount(d.price, token.decimals) : \"0\",\n paymentToken: token ? token.address : \"0x0\",\n maxPerWallet: d.limitPerWallet ? d.perWallet : \"0\",\n };\n}\n\n/** What one token costs a collector, with the platform fee; null while the price is free or unfinished. */\nexport function collectorPriceLine(d: SaleDraft, feeBps: number): string | null {\n const token = d.paid ? saleToken(d.tokenSymbol) : null;\n if (!token || validateSale({ ...EMPTY_SALE, paid: true, price: d.price, tokenSymbol: d.tokenSymbol }, 0).price) return null;\n const price = BigInt(parseAmount(d.price, token.decimals));\n const { fee, total } = dropMintCost(price, 1, feeBps);\n const amount = (v: bigint) => `${formatAmount(v.toString(), token.decimals)} ${token.symbol}`;\n if (fee === 0n) return `Collectors pay ${amount(price)}.`;\n return `Collectors pay ${amount(total)} (incl. ${feeBps / 100}% platform fee). You receive ${amount(price)}.`;\n}\n\nexport function priceLabel(price: string, paymentToken: string): string {\n if (BigInt(price) === 0n) return \"Free\";\n const token = getTokenByAddress(paymentToken);\n return token ? `${formatAmount(price, token.decimals)} ${token.symbol}` : \"Paid\";\n}\n\nconst count = (v: string) => Number(v).toLocaleString(\"en-US\");\n\nexport function supplyLabel(minted: string, maxSupply: string): string {\n return maxSupply === \"0\" ? `${count(minted)} minted` : `${count(minted)} / ${count(maxSupply)} minted`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAoG;AACpG,sBAA6B;AAgBtB,MAAM,aAAwB;AAAA,EACnC,MAAM;AAAA,EAAO,OAAO;AAAA,EAAI,aAAa;AAAA,EACrC,UAAU;AAAA,EAAM,OAAO;AAAA,EAAI,QAAQ;AAAA,EAAO,KAAK;AAAA,EAC/C,gBAAgB;AAAA,EAAO,WAAW;AACpC;AAIO,SAAS,UAAU,QAAgB;AACxC,aAAO,8BAAkB,EAAE,KAAK,CAAC,MAAM,EAAE,WAAW,MAAM,KAAK;AACjE;AAEA,MAAM,YAAY,CAAC,UAAiC;AAClD,MAAI,CAAC,MAAO,QAAO;AACnB,QAAM,KAAK,IAAI,KAAK,KAAK,EAAE,QAAQ;AACnC,SAAO,OAAO,MAAM,EAAE,IAAI,OAAO,KAAK,MAAM,KAAK,GAAI;AACvD;AAEO,SAAS,aAAa,GAAc,KAAyB;AAClE,QAAM,SAAqB,CAAC;AAC5B,MAAI,EAAE,MAAM;AACV,UAAM,QAAQ,UAAU,EAAE,WAAW;AACrC,UAAM,WAAW,EAAE,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,UAAU;AAClD,QAAI,CAAC,MAAO,QAAO,QAAQ;AAAA,aAClB,CAAC,gBAAgB,KAAK,EAAE,KAAK,EAAG,QAAO,QAAQ;AAAA,aAC/C,WAAW,MAAM,SAAU,QAAO,QAAQ,eAAe,MAAM,QAAQ,iBAAiB,MAAM,MAAM;AAAA,aACpG,WAAO,wBAA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3F,MAAI,QAAQ,GAAI,QAAO,kBAAkB,OAAO,KAAK,CAAC;AACtD,SAAO,kBAAkB,OAAO,KAAK,CAAC,WAAW,SAAS,GAAG,gCAAgC,OAAO,KAAK,CAAC;AAC5G;AAEO,SAAS,WAAW,OAAe,cAA8B;AACtE,MAAI,OAAO,KAAK,MAAM,GAAI,QAAO;AACjC,QAAM,YAAQ,8BAAkB,YAAY;AAC5C,SAAO,QAAQ,OAAG,yBAAa,OAAO,MAAM,QAAQ,CAAC,IAAI,MAAM,MAAM,KAAK;AAC5E;AAEA,MAAM,QAAQ,CAAC,MAAc,OAAO,CAAC,EAAE,eAAe,OAAO;AAEtD,SAAS,YAAY,QAAgB,WAA2B;AACrE,SAAO,cAAc,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,GAAG,MAAM,MAAM,CAAC,MAAM,MAAM,SAAS,CAAC;AAC/F;","names":[]}
@@ -1,4 +1,4 @@
1
- import { ResolvedFeeConfig, DropTermsBody } from '@medialane/sdk';
1
+ import { DropTermsBody } from '@medialane/sdk';
2
2
 
3
3
  interface SaleDraft {
4
4
  paid: boolean;
@@ -45,7 +45,7 @@ declare function validateSale(d: SaleDraft, now: number): SaleErrors;
45
45
  /** Terms for the create intent; call only after `validateSale` returns no errors. */
46
46
  declare function toDropTerms(d: SaleDraft): DropTermsBody;
47
47
  /** What one token costs a collector, with the platform fee; null while the price is free or unfinished. */
48
- declare function collectorPriceLine(d: SaleDraft, cfg: ResolvedFeeConfig): string | null;
48
+ declare function collectorPriceLine(d: SaleDraft, feeBps: number): string | null;
49
49
  declare function priceLabel(price: string, paymentToken: string): string;
50
50
  declare function supplyLabel(minted: string, maxSupply: string): string;
51
51
 
@@ -1,4 +1,4 @@
1
- import { ResolvedFeeConfig, DropTermsBody } from '@medialane/sdk';
1
+ import { DropTermsBody } from '@medialane/sdk';
2
2
 
3
3
  interface SaleDraft {
4
4
  paid: boolean;
@@ -45,7 +45,7 @@ declare function validateSale(d: SaleDraft, now: number): SaleErrors;
45
45
  /** Terms for the create intent; call only after `validateSale` returns no errors. */
46
46
  declare function toDropTerms(d: SaleDraft): DropTermsBody;
47
47
  /** What one token costs a collector, with the platform fee; null while the price is free or unfinished. */
48
- declare function collectorPriceLine(d: SaleDraft, cfg: ResolvedFeeConfig): string | null;
48
+ declare function collectorPriceLine(d: SaleDraft, feeBps: number): string | null;
49
49
  declare function priceLabel(price: string, paymentToken: string): string;
50
50
  declare function supplyLabel(minted: string, maxSupply: string): string;
51
51
 
@@ -1,5 +1,5 @@
1
1
  import { formatAmount, getListableTokens, getTokenByAddress, parseAmount } from "@medialane/sdk";
2
- import { dropMintCost, feeBps } from "@medialane/sdk/starknet";
2
+ import { dropMintCost } from "@medialane/sdk/starknet";
3
3
  const EMPTY_SALE = {
4
4
  paid: false,
5
5
  price: "",
@@ -48,14 +48,14 @@ function toDropTerms(d) {
48
48
  maxPerWallet: d.limitPerWallet ? d.perWallet : "0"
49
49
  };
50
50
  }
51
- function collectorPriceLine(d, cfg) {
51
+ function collectorPriceLine(d, feeBps) {
52
52
  const token = d.paid ? saleToken(d.tokenSymbol) : null;
53
53
  if (!token || validateSale({ ...EMPTY_SALE, paid: true, price: d.price, tokenSymbol: d.tokenSymbol }, 0).price) return null;
54
54
  const price = BigInt(parseAmount(d.price, token.decimals));
55
- const { fee, total } = dropMintCost(price, 1, cfg);
55
+ const { fee, total } = dropMintCost(price, 1, feeBps);
56
56
  const amount = (v) => `${formatAmount(v.toString(), token.decimals)} ${token.symbol}`;
57
57
  if (fee === 0n) return `Collectors pay ${amount(price)}.`;
58
- return `Collectors pay ${amount(total)} (incl. ${feeBps("launchpad", cfg) / 100}% platform fee). You receive ${amount(price)}.`;
58
+ return `Collectors pay ${amount(total)} (incl. ${feeBps / 100}% platform fee). You receive ${amount(price)}.`;
59
59
  }
60
60
  function priceLabel(price, paymentToken) {
61
61
  if (BigInt(price) === 0n) return "Free";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/drop/sale.ts"],"sourcesContent":["import { formatAmount, getListableTokens, getTokenByAddress, parseAmount, type DropTermsBody, type ResolvedFeeConfig } from \"@medialane/sdk\";\nimport { dropMintCost, feeBps } from \"@medialane/sdk/starknet\";\n\nexport interface SaleDraft {\n paid: boolean;\n /** In the token's normal units, e.g. \"5.5\". */\n price: string;\n tokenSymbol: string;\n startNow: boolean;\n /** `datetime-local` value in the creator's time zone. */\n start: string;\n hasEnd: boolean;\n end: string;\n limitPerWallet: boolean;\n perWallet: string;\n}\n\nexport const EMPTY_SALE: SaleDraft = {\n paid: false, price: \"\", tokenSymbol: \"USDC\",\n startNow: true, start: \"\", hasEnd: false, end: \"\",\n limitPerWallet: false, perWallet: \"\",\n};\n\nexport type SaleErrors = Partial<Record<\"price\" | \"start\" | \"end\" | \"perWallet\", string>>;\n\nexport function saleToken(symbol: string) {\n return getListableTokens().find((t) => t.symbol === symbol) ?? null;\n}\n\nconst toSeconds = (local: string): number | null => {\n if (!local) return null;\n const ms = new Date(local).getTime();\n return Number.isNaN(ms) ? null : Math.floor(ms / 1000);\n};\n\nexport function validateSale(d: SaleDraft, now: number): SaleErrors {\n const errors: SaleErrors = {};\n if (d.paid) {\n const token = saleToken(d.tokenSymbol);\n const decimals = d.price.split(\".\")[1]?.length ?? 0;\n if (!token) errors.price = \"Choose a currency\";\n else if (!/^\\d+(\\.\\d+)?$/.test(d.price)) errors.price = \"Enter a price above 0\";\n else if (decimals > token.decimals) errors.price = `Use at most ${token.decimals} decimals for ${token.symbol}`;\n else if (BigInt(parseAmount(d.price, token.decimals)) === 0n) errors.price = \"Enter a price above 0\";\n }\n const start = d.startNow ? now : toSeconds(d.start);\n if (!d.startNow && (start === null || start <= now)) errors.start = \"Pick a start time in the future\";\n if (d.hasEnd) {\n const end = toSeconds(d.end);\n if (end === null || (start !== null && end <= start)) errors.end = \"The sale must end after it starts\";\n }\n if (d.limitPerWallet && !/^[1-9]\\d*$/.test(d.perWallet)) errors.perWallet = \"Enter 1 or more\";\n return errors;\n}\n\n/** Terms for the create intent; call only after `validateSale` returns no errors. */\nexport function toDropTerms(d: SaleDraft): DropTermsBody {\n const token = d.paid ? saleToken(d.tokenSymbol) : null;\n return {\n startTime: d.startNow ? 0 : toSeconds(d.start)!,\n endTime: d.hasEnd ? toSeconds(d.end)! : 0,\n price: token ? parseAmount(d.price, token.decimals) : \"0\",\n paymentToken: token ? token.address : \"0x0\",\n maxPerWallet: d.limitPerWallet ? d.perWallet : \"0\",\n };\n}\n\n/** What one token costs a collector, with the platform fee; null while the price is free or unfinished. */\nexport function collectorPriceLine(d: SaleDraft, cfg: ResolvedFeeConfig): string | null {\n const token = d.paid ? saleToken(d.tokenSymbol) : null;\n if (!token || validateSale({ ...EMPTY_SALE, paid: true, price: d.price, tokenSymbol: d.tokenSymbol }, 0).price) return null;\n const price = BigInt(parseAmount(d.price, token.decimals));\n const { fee, total } = dropMintCost(price, 1, cfg);\n const amount = (v: bigint) => `${formatAmount(v.toString(), token.decimals)} ${token.symbol}`;\n if (fee === 0n) return `Collectors pay ${amount(price)}.`;\n return `Collectors pay ${amount(total)} (incl. ${feeBps(\"launchpad\", cfg) / 100}% platform fee). You receive ${amount(price)}.`;\n}\n\nexport function priceLabel(price: string, paymentToken: string): string {\n if (BigInt(price) === 0n) return \"Free\";\n const token = getTokenByAddress(paymentToken);\n return token ? `${formatAmount(price, token.decimals)} ${token.symbol}` : \"Paid\";\n}\n\nconst count = (v: string) => Number(v).toLocaleString(\"en-US\");\n\nexport function supplyLabel(minted: string, maxSupply: string): string {\n return maxSupply === \"0\" ? `${count(minted)} minted` : `${count(minted)} / ${count(maxSupply)} minted`;\n}\n"],"mappings":"AAAA,SAAS,cAAc,mBAAmB,mBAAmB,mBAA+D;AAC5H,SAAS,cAAc,cAAc;AAgB9B,MAAM,aAAwB;AAAA,EACnC,MAAM;AAAA,EAAO,OAAO;AAAA,EAAI,aAAa;AAAA,EACrC,UAAU;AAAA,EAAM,OAAO;AAAA,EAAI,QAAQ;AAAA,EAAO,K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,MAAM,MAAM,CAAC,MAAM,MAAM,SAAS,CAAC;AAC/F;","names":[]}
1
+ {"version":3,"sources":["../../../src/utils/drop/sale.ts"],"sourcesContent":["import { formatAmount, getListableTokens, getTokenByAddress, parseAmount, type DropTermsBody } from \"@medialane/sdk\";\nimport { dropMintCost } from \"@medialane/sdk/starknet\";\n\nexport interface SaleDraft {\n paid: boolean;\n /** In the token's normal units, e.g. \"5.5\". */\n price: string;\n tokenSymbol: string;\n startNow: boolean;\n /** `datetime-local` value in the creator's time zone. */\n start: string;\n hasEnd: boolean;\n end: string;\n limitPerWallet: boolean;\n perWallet: string;\n}\n\nexport const EMPTY_SALE: SaleDraft = {\n paid: false, price: \"\", tokenSymbol: \"USDC\",\n startNow: true, start: \"\", hasEnd: false, end: \"\",\n limitPerWallet: false, perWallet: \"\",\n};\n\nexport type SaleErrors = Partial<Record<\"price\" | \"start\" | \"end\" | \"perWallet\", string>>;\n\nexport function saleToken(symbol: string) {\n return getListableTokens().find((t) => t.symbol === symbol) ?? null;\n}\n\nconst toSeconds = (local: string): number | null => {\n if (!local) return null;\n const ms = new Date(local).getTime();\n return Number.isNaN(ms) ? null : Math.floor(ms / 1000);\n};\n\nexport function validateSale(d: SaleDraft, now: number): SaleErrors {\n const errors: SaleErrors = {};\n if (d.paid) {\n const token = saleToken(d.tokenSymbol);\n const decimals = d.price.split(\".\")[1]?.length ?? 0;\n if (!token) errors.price = \"Choose a currency\";\n else if (!/^\\d+(\\.\\d+)?$/.test(d.price)) errors.price = \"Enter a price above 0\";\n else if (decimals > token.decimals) errors.price = `Use at most ${token.decimals} decimals for ${token.symbol}`;\n else if (BigInt(parseAmount(d.price, token.decimals)) === 0n) errors.price = \"Enter a price above 0\";\n }\n const start = d.startNow ? now : toSeconds(d.start);\n if (!d.startNow && (start === null || start <= now)) errors.start = \"Pick a start time in the future\";\n if (d.hasEnd) {\n const end = toSeconds(d.end);\n if (end === null || (start !== null && end <= start)) errors.end = \"The sale must end after it starts\";\n }\n if (d.limitPerWallet && !/^[1-9]\\d*$/.test(d.perWallet)) errors.perWallet = \"Enter 1 or more\";\n return errors;\n}\n\n/** Terms for the create intent; call only after `validateSale` returns no errors. */\nexport function toDropTerms(d: SaleDraft): DropTermsBody {\n const token = d.paid ? saleToken(d.tokenSymbol) : null;\n return {\n startTime: d.startNow ? 0 : toSeconds(d.start)!,\n endTime: d.hasEnd ? toSeconds(d.end)! : 0,\n price: token ? parseAmount(d.price, token.decimals) : \"0\",\n paymentToken: token ? token.address : \"0x0\",\n maxPerWallet: d.limitPerWallet ? d.perWallet : \"0\",\n };\n}\n\n/** What one token costs a collector, with the platform fee; null while the price is free or unfinished. */\nexport function collectorPriceLine(d: SaleDraft, feeBps: number): string | null {\n const token = d.paid ? saleToken(d.tokenSymbol) : null;\n if (!token || validateSale({ ...EMPTY_SALE, paid: true, price: d.price, tokenSymbol: d.tokenSymbol }, 0).price) return null;\n const price = BigInt(parseAmount(d.price, token.decimals));\n const { fee, total } = dropMintCost(price, 1, feeBps);\n const amount = (v: bigint) => `${formatAmount(v.toString(), token.decimals)} ${token.symbol}`;\n if (fee === 0n) return `Collectors pay ${amount(price)}.`;\n return `Collectors pay ${amount(total)} (incl. ${feeBps / 100}% platform fee). You receive ${amount(price)}.`;\n}\n\nexport function priceLabel(price: string, paymentToken: string): string {\n if (BigInt(price) === 0n) return \"Free\";\n const token = getTokenByAddress(paymentToken);\n return token ? `${formatAmount(price, token.decimals)} ${token.symbol}` : \"Paid\";\n}\n\nconst count = (v: string) => Number(v).toLocaleString(\"en-US\");\n\nexport function supplyLabel(minted: string, maxSupply: string): string {\n return maxSupply === \"0\" ? `${count(minted)} minted` : `${count(minted)} / ${count(maxSupply)} minted`;\n}\n"],"mappings":"AAAA,SAAS,cAAc,mBAAmB,mBAAmB,mBAAuC;AACpG,SAAS,oBAAoB;AAgBtB,MAAM,aAAwB;AAAA,EACnC,MAAM;AAAA,EAAO,OAAO;AAAA,EAAI,aAAa;AAAA,EACrC,UAAU;AAAA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MAAM,MAAM,CAAC,YAAY,GAAG,MAAM,MAAM,CAAC,MAAM,MAAM,SAAS,CAAC;AAC/F;","names":[]}
@@ -33,7 +33,7 @@ function dropPhase(t, maxSupply, minted, now) {
33
33
  }
34
34
  const when = (ts) => new Date(ts * 1e3).toLocaleString(void 0, { weekday: "short", day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" });
35
35
  function actionBoxView(input) {
36
- const { drop, mint, feeConfig, now } = input;
36
+ const { drop, mint, feeBps, now } = input;
37
37
  const phase = dropPhase(drop, drop.maxSupply, drop.totalMinted, now);
38
38
  const token = (0, import_sdk.getTokenByAddress)(drop.paymentToken);
39
39
  const listed = BigInt(drop.allowlistRoot) !== 0n;
@@ -42,7 +42,7 @@ function actionBoxView(input) {
42
42
  const countdown = phase === "upcoming" ? { label: "Starts in", target: drop.startTime } : phase === "live" && drop.endTime !== 0 ? { label: "Ends in", target: drop.endTime } : null;
43
43
  let totalText = null;
44
44
  if (mint.state === "ready" && drop.price > 0n && token) {
45
- const { total } = (0, import_starknet.dropMintCost)(drop.price, quantity, feeConfig);
45
+ const { total } = (0, import_starknet.dropMintCost)(drop.price, quantity, feeBps);
46
46
  totalText = `Total ${(0, import_sdk.formatAmount)(total.toString(), token.decimals)} ${token.symbol} (incl. platform fee)`;
47
47
  }
48
48
  const button = (() => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/drop/view.ts"],"sourcesContent":["import { formatAmount, getTokenByAddress, type ResolvedFeeConfig } from \"@medialane/sdk\";\nimport { dropMintCost, type DropMintState, type DropOnchain } from \"@medialane/sdk/starknet\";\nimport { priceLabel } from \"./sale.js\";\n\nexport type DropPhase = \"upcoming\" | \"live\" | \"sold-out\" | \"ended\";\n\nexport function dropPhase(t: { startTime: number; endTime: number }, maxSupply: bigint, minted: bigint, now: number): DropPhase {\n if (maxSupply !== 0n && minted >= maxSupply) return \"sold-out\";\n if (t.startTime !== 0 && now < t.startTime) return \"upcoming\";\n if (t.endTime !== 0 && now > t.endTime) return \"ended\";\n return \"live\";\n}\n\nexport interface ActionBoxView {\n phase: DropPhase;\n statusText: string;\n countdown: { label: string; target: number } | null;\n priceText: string;\n totalText: string | null;\n eligibility: string | null;\n button: { label: string; action: \"mint\" | \"sign-in\" | \"none\" };\n maxQuantity: bigint;\n}\n\nconst when = (ts: number) => new Date(ts * 1000).toLocaleString(undefined, { weekday: \"short\", day: \"numeric\", month: \"short\", hour: \"2-digit\", minute: \"2-digit\" });\n\n/** Everything the mint box shows, decided from chain state before any transaction. */\nexport function actionBoxView(input: {\n drop: DropOnchain;\n mint: DropMintState;\n quantity: bigint;\n feeConfig: ResolvedFeeConfig;\n now: number;\n}): ActionBoxView {\n const { drop, mint, feeConfig, now } = input;\n const phase = dropPhase(drop, drop.maxSupply, drop.totalMinted, now);\n const token = getTokenByAddress(drop.paymentToken);\n const listed = BigInt(drop.allowlistRoot) !== 0n;\n const quantity = input.quantity < 1n ? 1n : input.quantity > mint.maxQuantity ? mint.maxQuantity : input.quantity;\n\n const statusText =\n phase === \"upcoming\" ? `Upcoming · starts ${when(drop.startTime)}`\n : phase === \"sold-out\" ? \"Sold out\"\n : phase === \"ended\" ? \"Ended\"\n : drop.endTime === 0 ? \"Live · no end date\" : \"Live\";\n const countdown =\n phase === \"upcoming\" ? { label: \"Starts in\", target: drop.startTime }\n : phase === \"live\" && drop.endTime !== 0 ? { label: \"Ends in\", target: drop.endTime }\n : null;\n\n let totalText: string | null = null;\n if (mint.state === \"ready\" && drop.price > 0n && token) {\n const { total } = dropMintCost(drop.price, quantity, feeConfig);\n totalText = `Total ${formatAmount(total.toString(), token.decimals)} ${token.symbol} (incl. platform fee)`;\n }\n\n const button: ActionBoxView[\"button\"] = (() => {\n switch (mint.state) {\n case \"ready\": return { label: `Mint ${quantity}`, action: \"mint\" };\n case \"no-wallet\": return { label: \"Sign in to mint\", action: \"sign-in\" };\n case \"upcoming\": return { label: `Starts ${when(drop.startTime)}`, action: \"none\" };\n case \"ended\": return { label: \"This drop has ended\", action: \"none\" };\n case \"sold-out\": return { label: \"Sold out\", action: \"none\" };\n case \"no-link\": return { label: \"Open your claim link to mint\", action: \"none\" };\n case \"not-on-list\": return { label: \"This wallet isn't on the list\", action: \"none\" };\n case \"limit-reached\": return { label: `You've minted your limit (${drop.maxPerWallet})`, action: \"none\" };\n case \"insufficient-balance\": return { label: `Not enough ${token?.symbol ?? \"balance\"}`, action: \"none\" };\n case \"loading\": return { label: \"Checking…\", action: \"none\" };\n }\n })();\n\n const eligibility =\n !listed ? \"Open to everyone\"\n : mint.state === \"ready\" ? \"You're on the list\"\n : mint.state === \"no-link\" ? \"This drop is for a list — open your claim link to mint\"\n : \"This drop is for a list\";\n\n return {\n phase,\n statusText,\n countdown,\n priceText: priceLabel(drop.price.toString(), drop.paymentToken),\n totalText,\n eligibility,\n button,\n maxQuantity: mint.maxQuantity,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAwE;AACxE,sBAAmE;AACnE,kBAA2B;AAIpB,SAAS,UAAU,GAA2C,WAAmB,QAAgB,KAAwB;AAC9H,MAAI,cAAc,MAAM,UAAU,UAAW,QAAO;AACpD,MAAI,EAAE,cAAc,KAAK,MAAM,EAAE,UAAW,QAAO;AACnD,MAAI,EAAE,YAAY,KAAK,MAAM,EAAE,QAAS,QAAO;AAC/C,SAAO;AACT;AAaA,MAAM,OAAO,CAAC,OAAe,IAAI,KAAK,KAAK,GAAI,EAAE,eAAe,QAAW,EAAE,SAAS,SAAS,KAAK,WAAW,OAAO,SAAS,MAAM,WAAW,QAAQ,UAAU,CAAC;AAG5J,SAAS,cAAc,OAMZ;AAChB,QAAM,EAAE,MAAM,MAAM,WAAW,IAAI,IAAI;AACvC,QAAM,QAAQ,UAAU,MAAM,KAAK,WAAW,KAAK,aAAa,GAAG;AACnE,QAAM,YAAQ,8BAAkB,KAAK,YAAY;AACjD,QAAM,SAAS,OAAO,KAAK,aAAa,MA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ACxG,KAAK;AAAwB,eAAO,EAAE,OAAO,cAAc,OAAO,UAAU,SAAS,IAAI,QAAQ,OAAO;AAAA,MACxG,KAAK;AAAW,eAAO,EAAE,OAAO,kBAAa,QAAQ,OAAO;AAAA,IAC9D;AAAA,EACF,GAAG;AAEH,QAAM,cACJ,CAAC,SAAS,qBACR,KAAK,UAAU,UAAU,uBACzB,KAAK,UAAU,YAAY,gEAC3B;AAEJ,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAW,wBAAW,KAAK,MAAM,SAAS,GAAG,KAAK,YAAY;AAAA,IAC9D;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,KAAK;AAAA,EACpB;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/utils/drop/view.ts"],"sourcesContent":["import { formatAmount, getTokenByAddress } from \"@medialane/sdk\";\nimport { dropMintCost, type DropMintState, type DropOnchain } from \"@medialane/sdk/starknet\";\nimport { priceLabel } from \"./sale.js\";\n\nexport type DropPhase = \"upcoming\" | \"live\" | \"sold-out\" | \"ended\";\n\nexport function dropPhase(t: { startTime: number; endTime: number }, maxSupply: bigint, minted: bigint, now: number): DropPhase {\n if (maxSupply !== 0n && minted >= maxSupply) return \"sold-out\";\n if (t.startTime !== 0 && now < t.startTime) return \"upcoming\";\n if (t.endTime !== 0 && now > t.endTime) return \"ended\";\n return \"live\";\n}\n\nexport interface ActionBoxView {\n phase: DropPhase;\n statusText: string;\n countdown: { label: string; target: number } | null;\n priceText: string;\n totalText: string | null;\n eligibility: string | null;\n button: { label: string; action: \"mint\" | \"sign-in\" | \"none\" };\n maxQuantity: bigint;\n}\n\nconst when = (ts: number) => new Date(ts * 1000).toLocaleString(undefined, { weekday: \"short\", day: \"numeric\", month: \"short\", hour: \"2-digit\", minute: \"2-digit\" });\n\n/** Everything the mint box shows, decided from chain state before any transaction. */\nexport function actionBoxView(input: {\n drop: DropOnchain;\n mint: DropMintState;\n quantity: bigint;\n /** Platform fee added to a mint, in basis points. */\n feeBps: number;\n now: number;\n}): ActionBoxView {\n const { drop, mint, feeBps, now } = input;\n const phase = dropPhase(drop, drop.maxSupply, drop.totalMinted, now);\n const token = getTokenByAddress(drop.paymentToken);\n const listed = BigInt(drop.allowlistRoot) !== 0n;\n const quantity = input.quantity < 1n ? 1n : input.quantity > mint.maxQuantity ? mint.maxQuantity : input.quantity;\n\n const statusText =\n phase === \"upcoming\" ? `Upcoming · starts ${when(drop.startTime)}`\n : phase === \"sold-out\" ? \"Sold out\"\n : phase === \"ended\" ? \"Ended\"\n : drop.endTime === 0 ? \"Live · no end date\" : \"Live\";\n const countdown =\n phase === \"upcoming\" ? { label: \"Starts in\", target: drop.startTime }\n : phase === \"live\" && drop.endTime !== 0 ? { label: \"Ends in\", target: drop.endTime }\n : null;\n\n let totalText: string | null = null;\n if (mint.state === \"ready\" && drop.price > 0n && token) {\n const { total } = dropMintCost(drop.price, quantity, feeBps);\n totalText = `Total ${formatAmount(total.toString(), token.decimals)} ${token.symbol} (incl. platform fee)`;\n }\n\n const button: ActionBoxView[\"button\"] = (() => {\n switch (mint.state) {\n case \"ready\": return { label: `Mint ${quantity}`, action: \"mint\" };\n case \"no-wallet\": return { label: \"Sign in to mint\", action: \"sign-in\" };\n case \"upcoming\": return { label: `Starts ${when(drop.startTime)}`, action: \"none\" };\n case \"ended\": return { label: \"This drop has ended\", action: \"none\" };\n case \"sold-out\": return { label: \"Sold out\", action: \"none\" };\n case \"no-link\": return { label: \"Open your claim link to mint\", action: \"none\" };\n case \"not-on-list\": return { label: \"This wallet isn't on the list\", action: \"none\" };\n case \"limit-reached\": return { label: `You've minted your limit (${drop.maxPerWallet})`, action: \"none\" };\n case \"insufficient-balance\": return { label: `Not enough ${token?.symbol ?? \"balance\"}`, action: \"none\" };\n case \"loading\": return { label: \"Checking…\", action: \"none\" };\n }\n })();\n\n const eligibility =\n !listed ? \"Open to everyone\"\n : mint.state === \"ready\" ? \"You're on the list\"\n : mint.state === \"no-link\" ? \"This drop is for a list — open your claim link to mint\"\n : \"This drop is for a list\";\n\n return {\n phase,\n statusText,\n countdown,\n priceText: priceLabel(drop.price.toString(), drop.paymentToken),\n totalText,\n eligibility,\n button,\n maxQuantity: mint.maxQuantity,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAgD;AAChD,sBAAmE;AACnE,kBAA2B;AAIpB,SAAS,UAAU,GAA2C,WAAmB,QAAgB,KAAwB;AAC9H,MAAI,cAAc,MAAM,UAAU,UAAW,QAAO;AACpD,MAAI,EAAE,cAAc,KAAK,MAAM,EAAE,UAAW,QAAO;AACnD,MAAI,EAAE,YAAY,KAAK,MAAM,EAAE,QAAS,QAAO;AAC/C,SAAO;AACT;AAaA,MAAM,OAAO,CAAC,OAAe,IAAI,KAAK,KAAK,GAAI,EAAE,eAAe,QAAW,EAAE,SAAS,SAAS,KAAK,WAAW,OAAO,SAAS,MAAM,WAAW,QAAQ,UAAU,CAAC;AAG5J,SAAS,cAAc,OAOZ;AAChB,QAAM,EAAE,MAAM,MAAM,QAAQ,IAAI,IAAI;AACpC,QAAM,QAAQ,UAAU,MAAM,KAAK,WAAW,KAAK,aAAa,GAAG;AACnE,QAAM,YAAQ,8BAAkB,KAAK,YAAY;AACjD,QAAM,SAAS,OAAO,KAAK,aAAa,MAAM;AAC9C,QAAM,WAAW,MAAM,WAAW,KAAK,KAAK,MAAM,WAAW,KAAK,cAAc,KAAK,cAAc,MAAM;AAEzG,QAAM,aACJ,UAAU,aAAa,wBAAqB,KAAK,KAAK,SAAS,CAAC,KAC9D,UAAU,aAAa,aACvB,UAAU,UAAU,UACpB,KAAK,YAAY,IAAI,0BAAuB;AAChD,QAAM,YACJ,UAAU,aAAa,EAAE,OAAO,aAAa,QAAQ,KAAK,UAAU,IAClE,UAAU,UAAU,KAAK,YAAY,IAAI,EAAE,OAAO,WAAW,QAAQ,KAAK,QAAQ,IAClF;AAEJ,MAAI,YAA2B;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AAA,IACA;AAAA,IACA,aAAa,KAAK;AAAA,EACpB;AACF;","names":[]}
@@ -1,4 +1,3 @@
1
- import { ResolvedFeeConfig } from '@medialane/sdk';
2
1
  import { DropOnchain, DropMintState } from '@medialane/sdk/starknet';
3
2
 
4
3
  type DropPhase = "upcoming" | "live" | "sold-out" | "ended";
@@ -27,7 +26,8 @@ declare function actionBoxView(input: {
27
26
  drop: DropOnchain;
28
27
  mint: DropMintState;
29
28
  quantity: bigint;
30
- feeConfig: ResolvedFeeConfig;
29
+ /** Platform fee added to a mint, in basis points. */
30
+ feeBps: number;
31
31
  now: number;
32
32
  }): ActionBoxView;
33
33
 
@@ -1,4 +1,3 @@
1
- import { ResolvedFeeConfig } from '@medialane/sdk';
2
1
  import { DropOnchain, DropMintState } from '@medialane/sdk/starknet';
3
2
 
4
3
  type DropPhase = "upcoming" | "live" | "sold-out" | "ended";
@@ -27,7 +26,8 @@ declare function actionBoxView(input: {
27
26
  drop: DropOnchain;
28
27
  mint: DropMintState;
29
28
  quantity: bigint;
30
- feeConfig: ResolvedFeeConfig;
29
+ /** Platform fee added to a mint, in basis points. */
30
+ feeBps: number;
31
31
  now: number;
32
32
  }): ActionBoxView;
33
33
 
@@ -9,7 +9,7 @@ function dropPhase(t, maxSupply, minted, now) {
9
9
  }
10
10
  const when = (ts) => new Date(ts * 1e3).toLocaleString(void 0, { weekday: "short", day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" });
11
11
  function actionBoxView(input) {
12
- const { drop, mint, feeConfig, now } = input;
12
+ const { drop, mint, feeBps, now } = input;
13
13
  const phase = dropPhase(drop, drop.maxSupply, drop.totalMinted, now);
14
14
  const token = getTokenByAddress(drop.paymentToken);
15
15
  const listed = BigInt(drop.allowlistRoot) !== 0n;
@@ -18,7 +18,7 @@ function actionBoxView(input) {
18
18
  const countdown = phase === "upcoming" ? { label: "Starts in", target: drop.startTime } : phase === "live" && drop.endTime !== 0 ? { label: "Ends in", target: drop.endTime } : null;
19
19
  let totalText = null;
20
20
  if (mint.state === "ready" && drop.price > 0n && token) {
21
- const { total } = dropMintCost(drop.price, quantity, feeConfig);
21
+ const { total } = dropMintCost(drop.price, quantity, feeBps);
22
22
  totalText = `Total ${formatAmount(total.toString(), token.decimals)} ${token.symbol} (incl. platform fee)`;
23
23
  }
24
24
  const button = (() => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/drop/view.ts"],"sourcesContent":["import { formatAmount, getTokenByAddress, type ResolvedFeeConfig } from \"@medialane/sdk\";\nimport { dropMintCost, type DropMintState, type DropOnchain } from \"@medialane/sdk/starknet\";\nimport { priceLabel } from \"./sale.js\";\n\nexport type DropPhase = \"upcoming\" | \"live\" | \"sold-out\" | \"ended\";\n\nexport function dropPhase(t: { startTime: number; endTime: number }, maxSupply: bigint, minted: bigint, now: number): DropPhase {\n if (maxSupply !== 0n && minted >= maxSupply) return \"sold-out\";\n if (t.startTime !== 0 && now < t.startTime) return \"upcoming\";\n if (t.endTime !== 0 && now > t.endTime) return \"ended\";\n return \"live\";\n}\n\nexport interface ActionBoxView {\n phase: DropPhase;\n statusText: string;\n countdown: { label: string; target: number } | null;\n priceText: string;\n totalText: string | null;\n eligibility: string | null;\n button: { label: string; action: \"mint\" | \"sign-in\" | \"none\" };\n maxQuantity: bigint;\n}\n\nconst when = (ts: number) => new Date(ts * 1000).toLocaleString(undefined, { weekday: \"short\", day: \"numeric\", month: \"short\", hour: \"2-digit\", minute: \"2-digit\" });\n\n/** Everything the mint box shows, decided from chain state before any transaction. */\nexport function actionBoxView(input: {\n drop: DropOnchain;\n mint: DropMintState;\n quantity: bigint;\n feeConfig: ResolvedFeeConfig;\n now: number;\n}): ActionBoxView {\n const { drop, mint, feeConfig, now } = input;\n const phase = dropPhase(drop, drop.maxSupply, drop.totalMinted, now);\n const token = getTokenByAddress(drop.paymentToken);\n const listed = BigInt(drop.allowlistRoot) !== 0n;\n const quantity = input.quantity < 1n ? 1n : input.quantity > mint.maxQuantity ? mint.maxQuantity : input.quantity;\n\n const statusText =\n phase === \"upcoming\" ? `Upcoming · starts ${when(drop.startTime)}`\n : phase === \"sold-out\" ? \"Sold out\"\n : phase === \"ended\" ? \"Ended\"\n : drop.endTime === 0 ? \"Live · no end date\" : \"Live\";\n const countdown =\n phase === \"upcoming\" ? { label: \"Starts in\", target: drop.startTime }\n : phase === \"live\" && drop.endTime !== 0 ? { label: \"Ends in\", target: drop.endTime }\n : null;\n\n let totalText: string | null = null;\n if (mint.state === \"ready\" && drop.price > 0n && token) {\n const { total } = dropMintCost(drop.price, quantity, feeConfig);\n totalText = `Total ${formatAmount(total.toString(), token.decimals)} ${token.symbol} (incl. platform fee)`;\n }\n\n const button: ActionBoxView[\"button\"] = (() => {\n switch (mint.state) {\n case \"ready\": return { label: `Mint ${quantity}`, action: \"mint\" };\n case \"no-wallet\": return { label: \"Sign in to mint\", action: \"sign-in\" };\n case \"upcoming\": return { label: `Starts ${when(drop.startTime)}`, action: \"none\" };\n case \"ended\": return { label: \"This drop has ended\", action: \"none\" };\n case \"sold-out\": return { label: \"Sold out\", action: \"none\" };\n case \"no-link\": return { label: \"Open your claim link to mint\", action: \"none\" };\n case \"not-on-list\": return { label: \"This wallet isn't on the list\", action: \"none\" };\n case \"limit-reached\": return { label: `You've minted your limit (${drop.maxPerWallet})`, action: \"none\" };\n case \"insufficient-balance\": return { label: `Not enough ${token?.symbol ?? \"balance\"}`, action: \"none\" };\n case \"loading\": return { label: \"Checking…\", action: \"none\" };\n }\n })();\n\n const eligibility =\n !listed ? \"Open to everyone\"\n : mint.state === \"ready\" ? \"You're on the list\"\n : mint.state === \"no-link\" ? \"This drop is for a list — open your claim link to mint\"\n : \"This drop is for a list\";\n\n return {\n phase,\n statusText,\n countdown,\n priceText: priceLabel(drop.price.toString(), drop.paymentToken),\n totalText,\n eligibility,\n button,\n maxQuantity: mint.maxQuantity,\n };\n}\n"],"mappings":"AAAA,SAAS,cAAc,yBAAiD;AACxE,SAAS,oBAA0D;AACnE,SAAS,kBAAk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;AAAA,MAClB,KAAK;AAAS,eAAO,EAAE,OAAO,QAAQ,QAAQ,IAAI,QAAQ,OAAO;AAAA,MACjE,KAAK;AAAa,eAAO,EAAE,OAAO,mBAAmB,QAAQ,UAAU;AAAA,MACvE,KAAK;AAAY,eAAO,EAAE,OAAO,UAAU,KAAK,KAAK,SAAS,CAAC,IAAI,QAAQ,OAAO;AAAA,MAClF,KAAK;AAAS,eAAO,EAAE,OAAO,uBAAuB,QAAQ,OAAO;AAAA,MACpE,KAAK;AAAY,eAAO,EAAE,OAAO,YAAY,QAAQ,OAAO;AAAA,MAC5D,KAAK;AAAW,eAAO,EAAE,OAAO,gCAAgC,QAAQ,OAAO;AAAA,MAC/E,KAAK;AAAe,eAAO,EAAE,OAAO,iCAAiC,QAAQ,OAAO;AAAA,MACpF,KAAK;AAAiB,eAAO,EAAE,OAAO,6BAA6B,KAAK,YAAY,KAAK,QAAQ,OAAO;AAAA,MACxG,KAAK;AAAwB,eAAO,EAAE,OAAO,cAAc,OAAO,UAAU,SAAS,IAAI,QAAQ,OAAO;AAAA,MACxG,KAAK;AAAW,eAAO,EAAE,OAAO,kBAAa,QAAQ,OAAO;AAAA,IAC9D;AAAA,EACF,GAAG;AAEH,QAAM,cACJ,CAAC,SAAS,qBACR,KAAK,UAAU,UAAU,uBACzB,KAAK,UAAU,YAAY,gEAC3B;AAEJ,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,WAAW,KAAK,MAAM,SAAS,GAAG,KAAK,YAAY;AAAA,IAC9D;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,KAAK;AAAA,EACpB;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/utils/drop/view.ts"],"sourcesContent":["import { formatAmount, getTokenByAddress } from \"@medialane/sdk\";\nimport { dropMintCost, type DropMintState, type DropOnchain } from \"@medialane/sdk/starknet\";\nimport { priceLabel } from \"./sale.js\";\n\nexport type DropPhase = \"upcoming\" | \"live\" | \"sold-out\" | \"ended\";\n\nexport function dropPhase(t: { startTime: number; endTime: number }, maxSupply: bigint, minted: bigint, now: number): DropPhase {\n if (maxSupply !== 0n && minted >= maxSupply) return \"sold-out\";\n if (t.startTime !== 0 && now < t.startTime) return \"upcoming\";\n if (t.endTime !== 0 && now > t.endTime) return \"ended\";\n return \"live\";\n}\n\nexport interface ActionBoxView {\n phase: DropPhase;\n statusText: string;\n countdown: { label: string; target: number } | null;\n priceText: string;\n totalText: string | null;\n eligibility: string | null;\n button: { label: string; action: \"mint\" | \"sign-in\" | \"none\" };\n maxQuantity: bigint;\n}\n\nconst when = (ts: number) => new Date(ts * 1000).toLocaleString(undefined, { weekday: \"short\", day: \"numeric\", month: \"short\", hour: \"2-digit\", minute: \"2-digit\" });\n\n/** Everything the mint box shows, decided from chain state before any transaction. */\nexport function actionBoxView(input: {\n drop: DropOnchain;\n mint: DropMintState;\n quantity: bigint;\n /** Platform fee added to a mint, in basis points. */\n feeBps: number;\n now: number;\n}): ActionBoxView {\n const { drop, mint, feeBps, now } = input;\n const phase = dropPhase(drop, drop.maxSupply, drop.totalMinted, now);\n const token = getTokenByAddress(drop.paymentToken);\n const listed = BigInt(drop.allowlistRoot) !== 0n;\n const quantity = input.quantity < 1n ? 1n : input.quantity > mint.maxQuantity ? mint.maxQuantity : input.quantity;\n\n const statusText =\n phase === \"upcoming\" ? `Upcoming · starts ${when(drop.startTime)}`\n : phase === \"sold-out\" ? \"Sold out\"\n : phase === \"ended\" ? \"Ended\"\n : drop.endTime === 0 ? \"Live · no end date\" : \"Live\";\n const countdown =\n phase === \"upcoming\" ? { label: \"Starts in\", target: drop.startTime }\n : phase === \"live\" && drop.endTime !== 0 ? { label: \"Ends in\", target: drop.endTime }\n : null;\n\n let totalText: string | null = null;\n if (mint.state === \"ready\" && drop.price > 0n && token) {\n const { total } = dropMintCost(drop.price, quantity, feeBps);\n totalText = `Total ${formatAmount(total.toString(), token.decimals)} ${token.symbol} (incl. platform fee)`;\n }\n\n const button: ActionBoxView[\"button\"] = (() => {\n switch (mint.state) {\n case \"ready\": return { label: `Mint ${quantity}`, action: \"mint\" };\n case \"no-wallet\": return { label: \"Sign in to mint\", action: \"sign-in\" };\n case \"upcoming\": return { label: `Starts ${when(drop.startTime)}`, action: \"none\" };\n case \"ended\": return { label: \"This drop has ended\", action: \"none\" };\n case \"sold-out\": return { label: \"Sold out\", action: \"none\" };\n case \"no-link\": return { label: \"Open your claim link to mint\", action: \"none\" };\n case \"not-on-list\": return { label: \"This wallet isn't on the list\", action: \"none\" };\n case \"limit-reached\": return { label: `You've minted your limit (${drop.maxPerWallet})`, action: \"none\" };\n case \"insufficient-balance\": return { label: `Not enough ${token?.symbol ?? \"balance\"}`, action: \"none\" };\n case \"loading\": return { label: \"Checking…\", action: \"none\" };\n }\n })();\n\n const eligibility =\n !listed ? \"Open to everyone\"\n : mint.state === \"ready\" ? \"You're on the list\"\n : mint.state === \"no-link\" ? \"This drop is for a list — open your claim link to mint\"\n : \"This drop is for a list\";\n\n return {\n phase,\n statusText,\n countdown,\n priceText: priceLabel(drop.price.toString(), drop.paymentToken),\n totalText,\n eligibility,\n button,\n maxQuantity: mint.maxQuantity,\n };\n}\n"],"mappings":"AAAA,SAAS,cAAc,yBAAyB;AAChD,SAAS,oBAA0D;AACnE,SAAS,kBAAkB;AAIpB,SAAS,UAAU,GAA2C,WAAmB,QAAgB,KAAwB;AAC9H,MAAI,cAAc,MAAM,UAAU,UAAW,QAAO;AACpD,MAAI,EAAE,cAAc,KAAK,MAAM,EAAE,UAAW,QAAO;AACnD,MAAI,EAAE,YAAY,KAAK,MAAM,EAAE,QAAS,QAAO;AAC/C,SAAO;AACT;AAaA,MAAM,OAAO,CAAC,OAAe,IAAI,KAAK,KAAK,GAAI,EAAE,eAAe,QAAW,EAAE,SAAS,SAAS,KAAK,WAAW,OAAO,SAAS,MAAM,WAAW,QAAQ,UAAU,CAAC;AAG5J,SAAS,cAAc,OAOZ;AAChB,QAAM,EAAE,MAAM,MAAM,QAAQ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,MAC/E,KAAK;AAAe,eAAO,EAAE,OAAO,iCAAiC,QAAQ,OAAO;AAAA,MACpF,KAAK;AAAiB,eAAO,EAAE,OAAO,6BAA6B,KAAK,YAAY,KAAK,QAAQ,OAAO;AAAA,MACxG,KAAK;AAAwB,eAAO,EAAE,OAAO,cAAc,OAAO,UAAU,SAAS,IAAI,QAAQ,OAAO;AAAA,MACxG,KAAK;AAAW,eAAO,EAAE,OAAO,kBAAa,QAAQ,OAAO;AAAA,IAC9D;AAAA,EACF,GAAG;AAEH,QAAM,cACJ,CAAC,SAAS,qBACR,KAAK,UAAU,UAAU,uBACzB,KAAK,UAAU,YAAY,gEAC3B;AAEJ,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,WAAW,KAAK,MAAM,SAAS,GAAG,KAAK,YAAY;AAAA,IAC9D;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,KAAK;AAAA,EACpB;AACF;","names":[]}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var activity_feed_exports = {};
20
+ __export(activity_feed_exports, {
21
+ mergeActivityFeeds: () => mergeActivityFeeds
22
+ });
23
+ module.exports = __toCommonJS(activity_feed_exports);
24
+ function mergeActivityFeeds(walletActivity, protocolActivity) {
25
+ const wallet = walletActivity.map((data) => ({ source: "wallet", timestamp: data.timestamp, data }));
26
+ const protocol = protocolActivity.map((data) => ({ source: "protocol", timestamp: data.timestamp, data }));
27
+ return [...wallet, ...protocol].sort(
28
+ (a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()
29
+ );
30
+ }
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ mergeActivityFeeds
34
+ });
35
+ //# sourceMappingURL=activity-feed.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utils/media-wallet/activity-feed.ts"],"sourcesContent":["import type { ApiWalletActivity, ApiActivity } from \"@medialane/sdk\";\n\nexport type MergedActivityItem =\n | { source: \"wallet\"; timestamp: string; data: ApiWalletActivity }\n | { source: \"protocol\"; timestamp: string; data: ApiActivity };\n\nexport function mergeActivityFeeds(\n walletActivity: ApiWalletActivity[],\n protocolActivity: ApiActivity[],\n): MergedActivityItem[] {\n const wallet: MergedActivityItem[] = walletActivity.map((data) => ({ source: \"wallet\", timestamp: data.timestamp, data }));\n const protocol: MergedActivityItem[] = protocolActivity.map((data) => ({ source: \"protocol\", timestamp: data.timestamp, data }));\n return [...wallet, ...protocol].sort(\n (a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,SAAS,mBACd,gBACA,kBACsB;AACtB,QAAM,SAA+B,eAAe,IAAI,CAAC,UAAU,EAAE,QAAQ,UAAU,WAAW,KAAK,WAAW,KAAK,EAAE;AACzH,QAAM,WAAiC,iBAAiB,IAAI,CAAC,UAAU,EAAE,QAAQ,YAAY,WAAW,KAAK,WAAW,KAAK,EAAE;AAC/H,SAAO,CAAC,GAAG,QAAQ,GAAG,QAAQ,EAAE;AAAA,IAC9B,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,SAAS,EAAE,QAAQ,IAAI,IAAI,KAAK,EAAE,SAAS,EAAE,QAAQ;AAAA,EAC5E;AACF;","names":[]}
@@ -0,0 +1,14 @@
1
+ import { ApiWalletActivity, ApiActivity } from '@medialane/sdk';
2
+
3
+ type MergedActivityItem = {
4
+ source: "wallet";
5
+ timestamp: string;
6
+ data: ApiWalletActivity;
7
+ } | {
8
+ source: "protocol";
9
+ timestamp: string;
10
+ data: ApiActivity;
11
+ };
12
+ declare function mergeActivityFeeds(walletActivity: ApiWalletActivity[], protocolActivity: ApiActivity[]): MergedActivityItem[];
13
+
14
+ export { type MergedActivityItem, mergeActivityFeeds };
@@ -0,0 +1,14 @@
1
+ import { ApiWalletActivity, ApiActivity } from '@medialane/sdk';
2
+
3
+ type MergedActivityItem = {
4
+ source: "wallet";
5
+ timestamp: string;
6
+ data: ApiWalletActivity;
7
+ } | {
8
+ source: "protocol";
9
+ timestamp: string;
10
+ data: ApiActivity;
11
+ };
12
+ declare function mergeActivityFeeds(walletActivity: ApiWalletActivity[], protocolActivity: ApiActivity[]): MergedActivityItem[];
13
+
14
+ export { type MergedActivityItem, mergeActivityFeeds };
@@ -0,0 +1,11 @@
1
+ function mergeActivityFeeds(walletActivity, protocolActivity) {
2
+ const wallet = walletActivity.map((data) => ({ source: "wallet", timestamp: data.timestamp, data }));
3
+ const protocol = protocolActivity.map((data) => ({ source: "protocol", timestamp: data.timestamp, data }));
4
+ return [...wallet, ...protocol].sort(
5
+ (a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()
6
+ );
7
+ }
8
+ export {
9
+ mergeActivityFeeds
10
+ };
11
+ //# sourceMappingURL=activity-feed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utils/media-wallet/activity-feed.ts"],"sourcesContent":["import type { ApiWalletActivity, ApiActivity } from \"@medialane/sdk\";\n\nexport type MergedActivityItem =\n | { source: \"wallet\"; timestamp: string; data: ApiWalletActivity }\n | { source: \"protocol\"; timestamp: string; data: ApiActivity };\n\nexport function mergeActivityFeeds(\n walletActivity: ApiWalletActivity[],\n protocolActivity: ApiActivity[],\n): MergedActivityItem[] {\n const wallet: MergedActivityItem[] = walletActivity.map((data) => ({ source: \"wallet\", timestamp: data.timestamp, data }));\n const protocol: MergedActivityItem[] = protocolActivity.map((data) => ({ source: \"protocol\", timestamp: data.timestamp, data }));\n return [...wallet, ...protocol].sort(\n (a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(),\n );\n}\n"],"mappings":"AAMO,SAAS,mBACd,gBACA,kBACsB;AACtB,QAAM,SAA+B,eAAe,IAAI,CAAC,UAAU,EAAE,QAAQ,UAAU,WAAW,KAAK,WAAW,KAAK,EAAE;AACzH,QAAM,WAAiC,iBAAiB,IAAI,CAAC,UAAU,EAAE,QAAQ,YAAY,WAAW,KAAK,WAAW,KAAK,EAAE;AAC/H,SAAO,CAAC,GAAG,QAAQ,GAAG,QAAQ,EAAE;AAAA,IAC9B,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,SAAS,EAAE,QAAQ,IAAI,IAAI,KAAK,EAAE,SAAS,EAAE,QAAQ;AAAA,EAC5E;AACF;","names":[]}