@medialane/ui 0.201.10 → 0.202.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 (183) hide show
  1. package/dist/components/activity-card.cjs +6 -5
  2. package/dist/components/activity-card.cjs.map +1 -1
  3. package/dist/components/activity-card.d.cts +1 -2
  4. package/dist/components/activity-card.d.ts +1 -2
  5. package/dist/components/activity-card.js +6 -5
  6. package/dist/components/activity-card.js.map +1 -1
  7. package/dist/components/activity-row.cjs +7 -7
  8. package/dist/components/activity-row.cjs.map +1 -1
  9. package/dist/components/activity-row.d.cts +1 -3
  10. package/dist/components/activity-row.d.ts +1 -3
  11. package/dist/components/activity-row.js +7 -7
  12. package/dist/components/activity-row.js.map +1 -1
  13. package/dist/components/activity-ticker.cjs +3 -2
  14. package/dist/components/activity-ticker.cjs.map +1 -1
  15. package/dist/components/activity-ticker.js +3 -2
  16. package/dist/components/activity-ticker.js.map +1 -1
  17. package/dist/components/activity-timeline-row.cjs +3 -3
  18. package/dist/components/activity-timeline-row.cjs.map +1 -1
  19. package/dist/components/activity-timeline-row.d.cts +1 -2
  20. package/dist/components/activity-timeline-row.d.ts +1 -2
  21. package/dist/components/activity-timeline-row.js +3 -3
  22. package/dist/components/activity-timeline-row.js.map +1 -1
  23. package/dist/components/asset-access-cards.d.cts +1 -0
  24. package/dist/components/asset-access-cards.d.ts +1 -0
  25. package/dist/components/asset-card.cjs +3 -2
  26. package/dist/components/asset-card.cjs.map +1 -1
  27. package/dist/components/asset-card.js +3 -2
  28. package/dist/components/asset-card.js.map +1 -1
  29. package/dist/components/asset-marketplace-panel.d.cts +1 -0
  30. package/dist/components/asset-marketplace-panel.d.ts +1 -0
  31. package/dist/components/asset-owners-panel.cjs +2 -1
  32. package/dist/components/asset-owners-panel.cjs.map +1 -1
  33. package/dist/components/asset-owners-panel.js +2 -1
  34. package/dist/components/asset-owners-panel.js.map +1 -1
  35. package/dist/components/asset-page.cjs +7 -5
  36. package/dist/components/asset-page.cjs.map +1 -1
  37. package/dist/components/asset-page.js +7 -5
  38. package/dist/components/asset-page.js.map +1 -1
  39. package/dist/components/badge.d.cts +1 -1
  40. package/dist/components/badge.d.ts +1 -1
  41. package/dist/components/button.d.cts +1 -1
  42. package/dist/components/button.d.ts +1 -1
  43. package/dist/components/coin-row.cjs +3 -2
  44. package/dist/components/coin-row.cjs.map +1 -1
  45. package/dist/components/coin-row.js +3 -2
  46. package/dist/components/coin-row.js.map +1 -1
  47. package/dist/components/collection-card.cjs +3 -2
  48. package/dist/components/collection-card.cjs.map +1 -1
  49. package/dist/components/collection-card.js +3 -2
  50. package/dist/components/collection-card.js.map +1 -1
  51. package/dist/components/collection-header.cjs +3 -2
  52. package/dist/components/collection-header.cjs.map +1 -1
  53. package/dist/components/collection-header.js +3 -2
  54. package/dist/components/collection-header.js.map +1 -1
  55. package/dist/components/creation-record.cjs +2 -1
  56. package/dist/components/creation-record.cjs.map +1 -1
  57. package/dist/components/creation-record.js +2 -1
  58. package/dist/components/creation-record.js.map +1 -1
  59. package/dist/components/creator-chip.cjs +2 -1
  60. package/dist/components/creator-chip.cjs.map +1 -1
  61. package/dist/components/creator-chip.js +2 -1
  62. package/dist/components/creator-chip.js.map +1 -1
  63. package/dist/components/discover-creators-strip.cjs +3 -2
  64. package/dist/components/discover-creators-strip.cjs.map +1 -1
  65. package/dist/components/discover-creators-strip.js +3 -2
  66. package/dist/components/discover-creators-strip.js.map +1 -1
  67. package/dist/components/discover-feed-section.cjs +1 -2
  68. package/dist/components/discover-feed-section.cjs.map +1 -1
  69. package/dist/components/discover-feed-section.d.cts +1 -3
  70. package/dist/components/discover-feed-section.d.ts +1 -3
  71. package/dist/components/discover-feed-section.js +1 -2
  72. package/dist/components/discover-feed-section.js.map +1 -1
  73. package/dist/components/drop/drop-card.cjs +3 -2
  74. package/dist/components/drop/drop-card.cjs.map +1 -1
  75. package/dist/components/drop/drop-card.js +3 -2
  76. package/dist/components/drop/drop-card.js.map +1 -1
  77. package/dist/components/drop/page/drop-page.cjs +4 -3
  78. package/dist/components/drop/page/drop-page.cjs.map +1 -1
  79. package/dist/components/drop/page/drop-page.js +4 -3
  80. package/dist/components/drop/page/drop-page.js.map +1 -1
  81. package/dist/components/fast-mint/fast-mint.cjs +5 -3
  82. package/dist/components/fast-mint/fast-mint.cjs.map +1 -1
  83. package/dist/components/fast-mint/fast-mint.js +5 -3
  84. package/dist/components/fast-mint/fast-mint.js.map +1 -1
  85. package/dist/components/featured-carousel.cjs +3 -2
  86. package/dist/components/featured-carousel.cjs.map +1 -1
  87. package/dist/components/featured-carousel.js +3 -2
  88. package/dist/components/featured-carousel.js.map +1 -1
  89. package/dist/components/hero-slider.cjs +3 -2
  90. package/dist/components/hero-slider.cjs.map +1 -1
  91. package/dist/components/hero-slider.js +3 -2
  92. package/dist/components/hero-slider.js.map +1 -1
  93. package/dist/components/listing-card.cjs +3 -2
  94. package/dist/components/listing-card.cjs.map +1 -1
  95. package/dist/components/listing-card.js +3 -2
  96. package/dist/components/listing-card.js.map +1 -1
  97. package/dist/components/make-offer-picker.cjs +3 -2
  98. package/dist/components/make-offer-picker.cjs.map +1 -1
  99. package/dist/components/make-offer-picker.js +3 -2
  100. package/dist/components/make-offer-picker.js.map +1 -1
  101. package/dist/components/medialane-app.cjs +2 -0
  102. package/dist/components/medialane-app.cjs.map +1 -1
  103. package/dist/components/medialane-app.d.cts +5 -1
  104. package/dist/components/medialane-app.d.ts +5 -1
  105. package/dist/components/medialane-app.js +1 -0
  106. package/dist/components/medialane-app.js.map +1 -1
  107. package/dist/components/nav-command-menu.cjs +141 -16
  108. package/dist/components/nav-command-menu.cjs.map +1 -1
  109. package/dist/components/nav-command-menu.d.cts +4 -2
  110. package/dist/components/nav-command-menu.d.ts +4 -2
  111. package/dist/components/nav-command-menu.js +141 -17
  112. package/dist/components/nav-command-menu.js.map +1 -1
  113. package/dist/components/portfolio-activity.cjs +1 -3
  114. package/dist/components/portfolio-activity.cjs.map +1 -1
  115. package/dist/components/portfolio-activity.js +1 -3
  116. package/dist/components/portfolio-activity.js.map +1 -1
  117. package/dist/components/result-thumbnail.cjs +60 -0
  118. package/dist/components/result-thumbnail.cjs.map +1 -0
  119. package/dist/components/result-thumbnail.d.cts +9 -0
  120. package/dist/components/result-thumbnail.d.ts +9 -0
  121. package/dist/components/result-thumbnail.js +26 -0
  122. package/dist/components/result-thumbnail.js.map +1 -0
  123. package/dist/components/router.cjs +4 -2
  124. package/dist/components/router.cjs.map +1 -1
  125. package/dist/components/router.d.cts +1 -1
  126. package/dist/components/router.d.ts +1 -1
  127. package/dist/components/router.js +3 -2
  128. package/dist/components/router.js.map +1 -1
  129. package/dist/components/search-page.cjs +178 -0
  130. package/dist/components/search-page.cjs.map +1 -0
  131. package/dist/components/search-page.d.cts +5 -0
  132. package/dist/components/search-page.d.ts +5 -0
  133. package/dist/components/search-page.js +144 -0
  134. package/dist/components/search-page.js.map +1 -0
  135. package/dist/components/token-card.cjs +3 -2
  136. package/dist/components/token-card.cjs.map +1 -1
  137. package/dist/components/token-card.js +3 -2
  138. package/dist/components/token-card.js.map +1 -1
  139. package/dist/data/nav-commands.cjs +85 -0
  140. package/dist/data/nav-commands.cjs.map +1 -0
  141. package/dist/data/nav-commands.d.cts +342 -0
  142. package/dist/data/nav-commands.d.ts +342 -0
  143. package/dist/data/nav-commands.js +89 -0
  144. package/dist/data/nav-commands.js.map +1 -0
  145. package/dist/index.cjs +23 -0
  146. package/dist/index.cjs.map +1 -1
  147. package/dist/index.d.cts +7 -2
  148. package/dist/index.d.ts +7 -2
  149. package/dist/index.js +16 -2
  150. package/dist/index.js.map +1 -1
  151. package/dist/utils/format-activity.cjs +9 -8
  152. package/dist/utils/format-activity.cjs.map +1 -1
  153. package/dist/utils/format-activity.d.cts +5 -4
  154. package/dist/utils/format-activity.d.ts +5 -4
  155. package/dist/utils/format-activity.js +10 -9
  156. package/dist/utils/format-activity.js.map +1 -1
  157. package/dist/utils/ipfs.cjs +6 -1
  158. package/dist/utils/ipfs.cjs.map +1 -1
  159. package/dist/utils/ipfs.d.cts +6 -1
  160. package/dist/utils/ipfs.d.ts +6 -1
  161. package/dist/utils/ipfs.js +5 -1
  162. package/dist/utils/ipfs.js.map +1 -1
  163. package/dist/utils/token-profile-link.cjs +3 -2
  164. package/dist/utils/token-profile-link.cjs.map +1 -1
  165. package/dist/utils/token-profile-link.js +3 -2
  166. package/dist/utils/token-profile-link.js.map +1 -1
  167. package/dist/utils/use-image-url.cjs +36 -0
  168. package/dist/utils/use-image-url.cjs.map +1 -0
  169. package/dist/utils/use-image-url.d.cts +5 -0
  170. package/dist/utils/use-image-url.d.ts +5 -0
  171. package/dist/utils/use-image-url.js +12 -0
  172. package/dist/utils/use-image-url.js.map +1 -0
  173. package/dist/utils/use-notifications.cjs +7 -5
  174. package/dist/utils/use-notifications.cjs.map +1 -1
  175. package/dist/utils/use-notifications.js +7 -5
  176. package/dist/utils/use-notifications.js.map +1 -1
  177. package/dist/utils/use-search.cjs +59 -0
  178. package/dist/utils/use-search.cjs.map +1 -0
  179. package/dist/utils/use-search.d.cts +14 -0
  180. package/dist/utils/use-search.d.ts +14 -0
  181. package/dist/utils/use-search.js +24 -0
  182. package/dist/utils/use-search.js.map +1 -0
  183. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -133,7 +133,8 @@ import {
133
133
  CoinsExplorer
134
134
  } from "./components/coins-explorer.js";
135
135
  import { timeAgo, timeUntil, isExpired } from "./utils/time.js";
136
- import { toDisplayUrl, toDisplayUrlOrNull, toAbsoluteImageUrl } from "./utils/ipfs.js";
136
+ import { toDisplayUrl, toDisplayUrlOrNull, toAbsoluteImageUrl, createImageResolver } from "./utils/ipfs.js";
137
+ import { useImageUrl } from "./utils/use-image-url.js";
137
138
  import { isSameAddress } from "./utils/same-address.js";
138
139
  import { createAppWallet } from "./utils/app-wallet.js";
139
140
  import { detectPasskeySupport } from "./utils/passkey-support.js";
@@ -205,7 +206,10 @@ import { LaunchpadStrip } from "./components/launchpad-strip.js";
205
206
  import { LaunchpadCtaBanner } from "./components/launchpad-cta-banner.js";
206
207
  import { LAUNCHPAD_ROUTE_OVERRIDES } from "./components/launchpad-services.js";
207
208
  import { LAUNCHPAD_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from "./data/launchpad-services.js";
208
- import { NavCommandMenu, useNavCommandMenu, relevanceFilter } from "./components/nav-command-menu.js";
209
+ import { NavCommandMenu, useNavCommandMenu, relevanceFilter, matchCommands } from "./components/nav-command-menu.js";
210
+ import { SearchPage } from "./components/search-page.js";
211
+ import { NAV_ITEMS, navGroups } from "./data/nav-commands.js";
212
+ import { ResultThumbnail } from "./components/result-thumbnail.js";
209
213
  import {
210
214
  NavBrandButton,
211
215
  NavIconButton,
@@ -332,6 +336,7 @@ import { CreatorScoreInline } from "./components/creator-score-inline.js";
332
336
  import { useMedialaneClient } from "./utils/use-medialane-client.js";
333
337
  import { MediaWalletOverlay, useMediaWallet } from "./components/media-wallet/media-wallet-overlay.js";
334
338
  import { useCreators } from "./utils/use-creators.js";
339
+ import { useSearch, SEARCH_MIN_LENGTH } from "./utils/use-search.js";
335
340
  import {
336
341
  useRewards,
337
342
  useLeaderboard,
@@ -627,6 +632,7 @@ export {
627
632
  MedialaneLogoFull,
628
633
  MotionCard,
629
634
  MyDrops,
635
+ NAV_ITEMS,
630
636
  NETWORK_BUSY,
631
637
  NOTIFICATION_COLOR,
632
638
  NOTIFICATION_ICON,
@@ -657,13 +663,16 @@ export {
657
663
  QUERY_PREFIX,
658
664
  RESEND_COOLDOWN_SECONDS,
659
665
  RemixesTab,
666
+ ResultThumbnail,
660
667
  RewardsSection,
668
+ SEARCH_MIN_LENGTH,
661
669
  SERVICE_HUES,
662
670
  SOCIAL_PLATFORM_META,
663
671
  SORT_OPTIONS,
664
672
  SPRING,
665
673
  ScoreSummaryCard,
666
674
  ScrollSection,
675
+ SearchPage,
667
676
  Section,
668
677
  Select,
669
678
  SelectContent,
@@ -734,6 +743,7 @@ export {
734
743
  coinSupply,
735
744
  collectSitemapData,
736
745
  createAppWallet,
746
+ createImageResolver,
737
747
  createRewardEarned,
738
748
  derivePortfolioCounts,
739
749
  describeError,
@@ -769,6 +779,8 @@ export {
769
779
  isWrongNetwork,
770
780
  licenseSummary,
771
781
  markRead,
782
+ matchCommands,
783
+ navGroups,
772
784
  orderCoins,
773
785
  parsePriceDisplay,
774
786
  passkeyUnsupportedReason,
@@ -821,6 +833,7 @@ export {
821
833
  useEmailCode,
822
834
  useFormField,
823
835
  useFullTokenData,
836
+ useImageUrl,
824
837
  useIntersectionActive,
825
838
  useIsMemberOf,
826
839
  useLaunchpadFilter,
@@ -852,6 +865,7 @@ export {
852
865
  useRewardsCelebrations,
853
866
  useRewardsConfig,
854
867
  useRewardsEvents,
868
+ useSearch,
855
869
  useSponsorshipBids,
856
870
  useSponsorshipLicenses,
857
871
  useSponsorshipOffer,
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 FILE_UPLOAD_FAILED,\n uploadJsonToIpfs,\n uploadDirectoryToIpfs,\n pinAssetMetadata,\n uploadFailureToast,\n isUserRejection,\n setUploadDiagnosticsReporter,\n type SignedUploadKind,\n type UploadedIpfsFile,\n type UploadDiagnostics,\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 CONNECTION_FAILED,\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 } from \"./components/asset-top-sections.js\";\nexport { ExpandableText } from \"./components/expandable-text.js\";\nexport { CollectionHeader, type CollectionHeaderProps } from \"./components/collection-header.js\";\nexport { CreatorHeader, type CreatorHeaderProps, type CreatorHeaderStat } from \"./components/creator-header.js\";\nexport { AssetPage, AssetPageSkeleton, detectAssetKind, type AssetPageProps, type AssetPageSlots, type AssetKind, type AssetMarketContext, type AssetMarketActions } from \"./components/asset-page.js\";\nexport { AssetCommentsDialog, type AssetCommentsDialogProps, type AssetCommentsProps } from \"./components/asset-comments-dialog.js\";\nexport { CollectionPage, canTransferCollectionOwnership, type CollectionPageProps, type CollectionPageSlots, type CollectionMarketActions } from \"./components/collection-page.js\";\nexport { CollectionFiltersDialog, type CollectionFiltersDialogProps } from \"./components/collection-filters-dialog.js\";\nexport { GatedContentHero, GatedContentPanel, type GatedContent, type GatedContentState } from \"./components/gated-content.js\";\nexport { MakeOfferPicker } from \"./components/make-offer-picker.js\";\nexport { ListingCardMenu } from \"./components/listing-card-menu.js\";\nexport { FloatingCommentsButton } from \"./components/floating-comments-button.js\";\nexport { PageBackdrop } from \"./components/media-header.js\";\nexport { useComments, type UseCommentsResult } from \"./utils/use-comments.js\";\nexport { useFullTokenData } from \"./utils/use-full-token-data.js\";\nexport { useAssetMarketState, type AssetMarketState } from \"./utils/asset-market-state.js\";\nexport { assetAttributes, type AssetAttribute } from \"./utils/asset-attributes.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 { DropSigner } from \"./utils/drop/types.js\";\nexport { MedialaneAppProvider, useMedialaneApp, type MedialaneApp, type CompanionApp, type AssetRef, type ReportTarget, type ReportDialogSlot } from \"./components/medialane-app.js\";\nexport { runIntentCalls } from \"./utils/run-intent-calls.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 { 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\";\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\";\nexport { useToken, useTokenBalance, useTokenHistory, useTokensByOwner } from \"./utils/use-tokens.js\";\nexport { checkIsOwner } from \"./utils/ownership.js\";\nexport { AssetOwnersPanel } from \"./components/asset-owners-panel.js\";\nexport { AssetUnavailable } from \"./components/asset-unavailable.js\";\nexport { AssetProvenanceTab } from \"./components/asset-provenance-tab.js\";\nexport { ASSET_ACCENTS, type AssetAccent, type AssetAccentName } from \"./utils/asset-accents.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,EACA;AAAA,EACA;AAAA,OAMK;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,EACA;AAAA,OACK;AAGP,SAAS,cAAc,wBAAwB;AAE/C;AAAA,EACE;AAAA,EAAU;AAAA,EAAe;AAAA,EAAmB;AAAA,EAC5C;AAAA,EAAqB;AAAA,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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;AACzE,SAAS,UAAU,iBAAiB,iBAAiB,wBAAwB;AAC7E,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,SAAS,qBAA6D;","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 FILE_UPLOAD_FAILED,\n uploadJsonToIpfs,\n uploadDirectoryToIpfs,\n pinAssetMetadata,\n uploadFailureToast,\n isUserRejection,\n setUploadDiagnosticsReporter,\n type SignedUploadKind,\n type UploadedIpfsFile,\n type UploadDiagnostics,\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 CONNECTION_FAILED,\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 } from \"./components/asset-top-sections.js\";\nexport { ExpandableText } from \"./components/expandable-text.js\";\nexport { CollectionHeader, type CollectionHeaderProps } from \"./components/collection-header.js\";\nexport { CreatorHeader, type CreatorHeaderProps, type CreatorHeaderStat } from \"./components/creator-header.js\";\nexport { AssetPage, AssetPageSkeleton, detectAssetKind, type AssetPageProps, type AssetPageSlots, type AssetKind, type AssetMarketContext, type AssetMarketActions } from \"./components/asset-page.js\";\nexport { AssetCommentsDialog, type AssetCommentsDialogProps, type AssetCommentsProps } from \"./components/asset-comments-dialog.js\";\nexport { CollectionPage, canTransferCollectionOwnership, type CollectionPageProps, type CollectionPageSlots, type CollectionMarketActions } from \"./components/collection-page.js\";\nexport { CollectionFiltersDialog, type CollectionFiltersDialogProps } from \"./components/collection-filters-dialog.js\";\nexport { GatedContentHero, GatedContentPanel, type GatedContent, type GatedContentState } from \"./components/gated-content.js\";\nexport { MakeOfferPicker } from \"./components/make-offer-picker.js\";\nexport { ListingCardMenu } from \"./components/listing-card-menu.js\";\nexport { FloatingCommentsButton } from \"./components/floating-comments-button.js\";\nexport { PageBackdrop } from \"./components/media-header.js\";\nexport { useComments, type UseCommentsResult } from \"./utils/use-comments.js\";\nexport { useFullTokenData } from \"./utils/use-full-token-data.js\";\nexport { useAssetMarketState, type AssetMarketState } from \"./utils/asset-market-state.js\";\nexport { assetAttributes, type AssetAttribute } from \"./utils/asset-attributes.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, createImageResolver, type DisplayUrlOptions, type ImageResolver } from \"./utils/ipfs.js\";\nexport { useImageUrl } from \"./utils/use-image-url.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 { DropSigner } from \"./utils/drop/types.js\";\nexport { MedialaneAppProvider, useMedialaneApp, type MedialaneApp, type CompanionApp, type AssetRef, type ReportTarget, type ReportDialogSlot } from \"./components/medialane-app.js\";\nexport { runIntentCalls } from \"./utils/run-intent-calls.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, matchCommands } from \"./components/nav-command-menu.js\";\nexport { SearchPage } from \"./components/search-page.js\";\nexport { NAV_ITEMS, navGroups, type NavItemId, type NavGroupSpec } from \"./data/nav-commands.js\";\nexport { ResultThumbnail } from \"./components/result-thumbnail.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 { 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\";\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 { useSearch, SEARCH_MIN_LENGTH, type UseSearchOptions } from \"./utils/use-search.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\";\nexport { useToken, useTokenBalance, useTokenHistory, useTokensByOwner } from \"./utils/use-tokens.js\";\nexport { checkIsOwner } from \"./utils/ownership.js\";\nexport { AssetOwnersPanel } from \"./components/asset-owners-panel.js\";\nexport { AssetUnavailable } from \"./components/asset-unavailable.js\";\nexport { AssetProvenanceTab } from \"./components/asset-provenance-tab.js\";\nexport { ASSET_ACCENTS, type AssetAccent, type AssetAccentName } from \"./utils/asset-accents.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,EACA;AAAA,EACA;AAAA,OAMK;AACP,SAAS,6BAA6B;AACtC,SAAS,YAAY,gBAAgB;AACrC,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA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kB;AAAA,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;AACzE,SAAS,UAAU,iBAAiB,iBAAiB,wBAAwB;AAC7E,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,SAAS,qBAA6D;","names":[]}
@@ -27,6 +27,7 @@ module.exports = __toCommonJS(format_activity_exports);
27
27
  var import_sdk = require("@medialane/sdk");
28
28
  var import_format = require("./format.js");
29
29
  var import_ipfs = require("./ipfs.js");
30
+ const defaultResolver = (0, import_ipfs.createImageResolver)();
30
31
  function short(addr) {
31
32
  return addr.length > 10 ? `${addr.slice(0, 6)}\u2026${addr.slice(-4)}` : addr;
32
33
  }
@@ -34,12 +35,12 @@ function price(p) {
34
35
  if (!p?.formatted) return null;
35
36
  return `${(0, import_format.formatDisplayPrice)(p.formatted)} ${p.currency}`;
36
37
  }
37
- function formatActivity(event) {
38
+ function formatActivity(event, resolveImage = defaultResolver) {
38
39
  const contract = event.nftContract ?? event.contractAddress ?? "";
39
40
  const tokenId = event.nftTokenId ?? event.tokenId ?? "";
40
41
  const href = contract && tokenId ? (0, import_sdk.assetHref)("STARKNET", contract, tokenId) : "/activities";
41
42
  const raw = event.token?.image ?? null;
42
- const image = raw ? (0, import_ipfs.ipfsToHttp)(raw) : null;
43
+ const image = resolveImage(raw);
43
44
  const name = event.token?.name ?? (tokenId ? `#${tokenId}` : "token");
44
45
  const p = price(event.price);
45
46
  const actor = event.offerer ?? event.fulfiller ?? (event.type === "mint" ? event.to : event.from) ?? null;
@@ -91,10 +92,10 @@ function formatActivity(event) {
91
92
  return { title: event.type ?? "Activity", description: name, image, href };
92
93
  }
93
94
  }
94
- function formatOrderNotification(order) {
95
+ function formatOrderNotification(order, resolveImage = defaultResolver) {
95
96
  const name = order.token?.name ?? `#${order.consideration.identifier}`;
96
97
  const raw = order.token?.image ?? null;
97
- const image = raw ? (0, import_ipfs.ipfsToHttp)(raw) : null;
98
+ const image = resolveImage(raw);
98
99
  const href = (0, import_sdk.assetHref)("STARKNET", order.consideration.token, order.consideration.identifier);
99
100
  const p = price(order.price);
100
101
  const from = short(order.offerer);
@@ -105,10 +106,10 @@ function formatOrderNotification(order) {
105
106
  href
106
107
  };
107
108
  }
108
- function formatOfferAcceptedNotification(order) {
109
+ function formatOfferAcceptedNotification(order, resolveImage = defaultResolver) {
109
110
  const name = order.token?.name ?? `#${order.nftTokenId}`;
110
111
  const raw = order.token?.image ?? null;
111
- const image = raw ? (0, import_ipfs.ipfsToHttp)(raw) : null;
112
+ const image = resolveImage(raw);
112
113
  const href = order.nftContract && order.nftTokenId ? (0, import_sdk.assetHref)("STARKNET", order.nftContract, order.nftTokenId) : "/portfolio/assets";
113
114
  const p = price(order.price);
114
115
  return {
@@ -118,12 +119,12 @@ function formatOfferAcceptedNotification(order) {
118
119
  href
119
120
  };
120
121
  }
121
- function formatAssetReceivedNotification(event) {
122
+ function formatAssetReceivedNotification(event, resolveImage = defaultResolver) {
122
123
  const contract = event.nftContract ?? event.contractAddress ?? "";
123
124
  const tokenId = event.nftTokenId ?? event.tokenId ?? "";
124
125
  const href = contract && tokenId ? (0, import_sdk.assetHref)("STARKNET", contract, tokenId) : "/portfolio/assets";
125
126
  const raw = event.token?.image ?? null;
126
- const image = raw ? (0, import_ipfs.ipfsToHttp)(raw) : null;
127
+ const image = resolveImage(raw);
127
128
  const name = event.token?.name ?? (tokenId ? `#${tokenId}` : "an asset");
128
129
  const from = event.from ? short(event.from) : null;
129
130
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/format-activity.ts"],"sourcesContent":["import type { ApiActivity, ApiOrder } from \"@medialane/sdk\";\nimport { assetHref } from \"@medialane/sdk\";\nimport { formatDisplayPrice } from \"./format.js\";\nimport { ipfsToHttp } from \"./ipfs.js\";\n\nexport interface FormattedEvent {\n title: string;\n description: string;\n image: string | null;\n href: string;\n}\n\nfunction short(addr: string): string {\n return addr.length > 10 ? `${addr.slice(0, 6)}…${addr.slice(-4)}` : addr;\n}\n\nfunction price(p?: { formatted?: string | null; currency?: string | null } | null): string | null {\n if (!p?.formatted) return null;\n return `${formatDisplayPrice(p.formatted)} ${p.currency}`;\n}\n\nexport function formatActivity(event: ApiActivity): FormattedEvent {\n const contract = event.nftContract ?? event.contractAddress ?? \"\";\n const tokenId = event.nftTokenId ?? event.tokenId ?? \"\";\n const href = contract && tokenId ? assetHref(\"STARKNET\", contract, tokenId) : \"/activities\";\n const raw = event.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const name = event.token?.name ?? (tokenId ? `#${tokenId}` : \"token\");\n const p = price(event.price);\n\n const actor =\n event.offerer ??\n event.fulfiller ??\n (event.type === \"mint\" ? event.to : event.from) ??\n null;\n const actorShort = actor ? short(actor) : null;\n\n switch (event.type) {\n case \"sale\":\n return {\n title: `${name} sold`,\n description: p\n ? `${p}${event.to ? ` to ${short(event.to)}` : \"\"}`\n : \"Sale confirmed\",\n image, href,\n };\n case \"listing\":\n return {\n title: `${name} listed`,\n description: p ? `Listed for ${p}` : \"New listing\",\n image, href,\n };\n case \"offer\":\n return {\n title: `Offer on ${name}`,\n description: p && actorShort ? `${p} from ${actorShort}` : p ?? \"New offer\",\n image, href,\n };\n case \"mint\":\n return {\n title: `${name} minted`,\n description: actorShort ? `By ${actorShort}` : \"New mint\",\n image, href,\n };\n case \"transfer\":\n return {\n title: `${name} transferred`,\n description:\n actorShort && event.to\n ? `${actorShort} → ${short(event.to)}`\n : \"Token transferred\",\n image, href,\n };\n case \"cancelled\":\n return {\n title: \"Listing cancelled\",\n description: name,\n image, href,\n };\n default:\n return { title: event.type ?? \"Activity\", description: name, image, href };\n }\n}\n\nexport function formatOrderNotification(order: ApiOrder): FormattedEvent {\n const name = order.token?.name ?? `#${order.consideration.identifier}`;\n const raw = order.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const href = assetHref(\"STARKNET\", order.consideration.token, order.consideration.identifier);\n const p = price(order.price);\n const from = short(order.offerer);\n\n return {\n title: `Offer on ${name}`,\n description: p ? `${p} from ${from}` : `From ${from}`,\n image,\n href,\n };\n}\n\nexport function formatOfferAcceptedNotification(order: ApiOrder): FormattedEvent {\n const name = order.token?.name ?? `#${order.nftTokenId}`;\n const raw = order.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const href = order.nftContract && order.nftTokenId\n ? assetHref(\"STARKNET\", order.nftContract, order.nftTokenId)\n : \"/portfolio/assets\";\n const p = price(order.price);\n\n return {\n title: `Your offer was accepted`,\n description: p ? `${name} · ${p}` : name,\n image,\n href,\n };\n}\n\nexport function formatAssetReceivedNotification(event: ApiActivity): FormattedEvent {\n const contract = event.nftContract ?? event.contractAddress ?? \"\";\n const tokenId = event.nftTokenId ?? event.tokenId ?? \"\";\n const href = contract && tokenId ? assetHref(\"STARKNET\", contract, tokenId) : \"/portfolio/assets\";\n const raw = event.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const name = event.token?.name ?? (tokenId ? `#${tokenId}` : \"an asset\");\n const from = event.from ? short(event.from) : null;\n\n return {\n title: `Asset received`,\n description: from ? `${name} from ${from}` : name,\n image,\n href,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAA0B;AAC1B,oBAAmC;AACnC,kBAA2B;AAS3B,SAAS,MAAM,MAAsB;AACnC,SAAO,KAAK,SAAS,KAAK,GAAG,KAAK,MAAM,GAAG,CAAC,CAAC,SAAI,KAAK,MAAM,EAAE,CAAC,KAAK;AACtE;AAEA,SAAS,MAAM,GAAmF;AAChG,MAAI,CAAC,GAAG,UAAW,QAAO;AAC1B,SAAO,OAAG,kCAAmB,EAAE,SAAS,CAAC,IAAI,EAAE,QAAQ;AACzD;AAEO,SAAS,eAAe,OAAoC;AACjE,QAAM,WAAW,MAAM,eAAe,MAAM,mBAAmB;AAC/D,QAAM,UAAW,MAAM,cAAc,MAAM,WAAW;AACtD,QAAM,OAAW,YAAY,cAAU,sBAAU,YAAY,UAAU,OAAO,IAAI;AAClF,QAAM,MAAW,MAAM,OAAO,SAAS;AACvC,QAAM,QAAW,UAAM,wBAAW,GAAG,IAAI;AACzC,QAAM,OAAW,MAAM,OAAO,SAAS,UAAU,IAAI,OAAO,KAAK;AACjE,QAAM,IAAW,MAAM,MAAM,KAAK;AAElC,QAAM,QACJ,MAAM,WACN,MAAM,cACL,MAAM,SAAS,SAAS,MAAM,KAAK,MAAM,SAC1C;AACF,QAAM,aAAa,QAAQ,MAAM,KAAK,IAAI;AAE1C,UAAQ,MAAM,MAAM;AAAA,IAClB,KAAK;AACH,aAAO;AAAA,QACL,OAAO,GAAG,IAAI;AAAA,QACd,aAAa,IACT,GAAG,CAA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Y,IAAI;AAAA,IACvB,aAAa,IAAI,GAAG,CAAC,SAAS,IAAI,KAAK,QAAQ,IAAI;AAAA,IACnD;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,gCAAgC,OAAiC;AAC/E,QAAM,OAAQ,MAAM,OAAO,QAAQ,IAAI,MAAM,UAAU;AACvD,QAAM,MAAQ,MAAM,OAAO,SAAS;AACpC,QAAM,QAAQ,UAAM,wBAAW,GAAG,IAAI;AACtC,QAAM,OAAQ,MAAM,eAAe,MAAM,iBACrC,sBAAU,YAAY,MAAM,aAAa,MAAM,UAAU,IACzD;AACJ,QAAM,IAAI,MAAM,MAAM,KAAK;AAE3B,SAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa,IAAI,GAAG,IAAI,SAAM,CAAC,KAAK;AAAA,IACpC;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,gCAAgC,OAAoC;AAClF,QAAM,WAAW,MAAM,eAAe,MAAM,mBAAmB;AAC/D,QAAM,UAAW,MAAM,cAAc,MAAM,WAAW;AACtD,QAAM,OAAW,YAAY,cAAU,sBAAU,YAAY,UAAU,OAAO,IAAI;AAClF,QAAM,MAAW,MAAM,OAAO,SAAS;AACvC,QAAM,QAAW,UAAM,wBAAW,GAAG,IAAI;AACzC,QAAM,OAAW,MAAM,OAAO,SAAS,UAAU,IAAI,OAAO,KAAK;AACjE,QAAM,OAAW,MAAM,OAAO,MAAM,MAAM,IAAI,IAAI;AAElD,SAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa,OAAO,GAAG,IAAI,SAAS,IAAI,KAAK;AAAA,IAC7C;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/format-activity.ts"],"sourcesContent":["import type { ApiActivity, ApiOrder } from \"@medialane/sdk\";\nimport { assetHref } from \"@medialane/sdk\";\nimport { formatDisplayPrice } from \"./format.js\";\nimport { createImageResolver, type ImageResolver } from \"./ipfs.js\";\n\nconst defaultResolver = createImageResolver();\n\nexport interface FormattedEvent {\n title: string;\n description: string;\n image: string | null;\n href: string;\n}\n\nfunction short(addr: string): string {\n return addr.length > 10 ? `${addr.slice(0, 6)}…${addr.slice(-4)}` : addr;\n}\n\nfunction price(p?: { formatted?: string | null; currency?: string | null } | null): string | null {\n if (!p?.formatted) return null;\n return `${formatDisplayPrice(p.formatted)} ${p.currency}`;\n}\n\nexport function formatActivity(event: ApiActivity, resolveImage: ImageResolver = defaultResolver): FormattedEvent {\n const contract = event.nftContract ?? event.contractAddress ?? \"\";\n const tokenId = event.nftTokenId ?? event.tokenId ?? \"\";\n const href = contract && tokenId ? assetHref(\"STARKNET\", contract, tokenId) : \"/activities\";\n const raw = event.token?.image ?? null;\n const image = resolveImage(raw);\n const name = event.token?.name ?? (tokenId ? `#${tokenId}` : \"token\");\n const p = price(event.price);\n\n const actor =\n event.offerer ??\n event.fulfiller ??\n (event.type === \"mint\" ? event.to : event.from) ??\n null;\n const actorShort = actor ? short(actor) : null;\n\n switch (event.type) {\n case \"sale\":\n return {\n title: `${name} sold`,\n description: p\n ? `${p}${event.to ? ` to ${short(event.to)}` : \"\"}`\n : \"Sale confirmed\",\n image, href,\n };\n case \"listing\":\n return {\n title: `${name} listed`,\n description: p ? `Listed for ${p}` : \"New listing\",\n image, href,\n };\n case \"offer\":\n return {\n title: `Offer on ${name}`,\n description: p && actorShort ? `${p} from ${actorShort}` : p ?? \"New offer\",\n image, href,\n };\n case \"mint\":\n return {\n title: `${name} minted`,\n description: actorShort ? `By ${actorShort}` : \"New mint\",\n image, href,\n };\n case \"transfer\":\n return {\n title: `${name} transferred`,\n description:\n actorShort && event.to\n ? `${actorShort} → ${short(event.to)}`\n : \"Token transferred\",\n image, href,\n };\n case \"cancelled\":\n return {\n title: \"Listing cancelled\",\n description: name,\n image, href,\n };\n default:\n return { title: event.type ?? \"Activity\", description: name, image, href };\n }\n}\n\nexport function formatOrderNotification(order: ApiOrder, resolveImage: ImageResolver = defaultResolver): FormattedEvent {\n const name = order.token?.name ?? `#${order.consideration.identifier}`;\n const raw = order.token?.image ?? null;\n const image = resolveImage(raw);\n const href = assetHref(\"STARKNET\", order.consideration.token, order.consideration.identifier);\n const p = price(order.price);\n const from = short(order.offerer);\n\n return {\n title: `Offer on ${name}`,\n description: p ? `${p} from ${from}` : `From ${from}`,\n image,\n href,\n };\n}\n\nexport function formatOfferAcceptedNotification(order: ApiOrder, resolveImage: ImageResolver = defaultResolver): FormattedEvent {\n const name = order.token?.name ?? `#${order.nftTokenId}`;\n const raw = order.token?.image ?? null;\n const image = resolveImage(raw);\n const href = order.nftContract && order.nftTokenId\n ? assetHref(\"STARKNET\", order.nftContract, order.nftTokenId)\n : \"/portfolio/assets\";\n const p = price(order.price);\n\n return {\n title: `Your offer was accepted`,\n description: p ? `${name} · ${p}` : name,\n image,\n href,\n };\n}\n\nexport function formatAssetReceivedNotification(event: ApiActivity, resolveImage: ImageResolver = defaultResolver): FormattedEvent {\n const contract = event.nftContract ?? event.contractAddress ?? \"\";\n const tokenId = event.nftTokenId ?? event.tokenId ?? \"\";\n const href = contract && tokenId ? assetHref(\"STARKNET\", contract, tokenId) : \"/portfolio/assets\";\n const raw = event.token?.image ?? null;\n const image = resolveImage(raw);\n const name = event.token?.name ?? (tokenId ? `#${tokenId}` : \"an asset\");\n const from = event.from ? short(event.from) : null;\n\n return {\n title: `Asset received`,\n description: from ? `${name} from ${from}` : name,\n image,\n href,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAA0B;AAC1B,oBAAmC;AACnC,kBAAwD;AAExD,MAAM,sBAAkB,iCAAoB;AAS5C,SAAS,MAAM,MAAsB;AACnC,SAAO,KAAK,SAAS,KAAK,GAAG,KAAK,MAAM,GAAG,CAAC,CAAC,SAAI,KAAK,MAAM,EAAE,CAAC,KAAK;AACtE;AAEA,SAAS,MAAM,GAAmF;AAChG,MAAI,CAAC,GAAG,UAAW,QAAO;AA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BAAiC;AACjI,QAAM,WAAW,MAAM,eAAe,MAAM,mBAAmB;AAC/D,QAAM,UAAW,MAAM,cAAc,MAAM,WAAW;AACtD,QAAM,OAAW,YAAY,cAAU,sBAAU,YAAY,UAAU,OAAO,IAAI;AAClF,QAAM,MAAW,MAAM,OAAO,SAAS;AACvC,QAAM,QAAW,aAAa,GAAG;AACjC,QAAM,OAAW,MAAM,OAAO,SAAS,UAAU,IAAI,OAAO,KAAK;AACjE,QAAM,OAAW,MAAM,OAAO,MAAM,MAAM,IAAI,IAAI;AAElD,SAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa,OAAO,GAAG,IAAI,SAAS,IAAI,KAAK;AAAA,IAC7C;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -1,4 +1,5 @@
1
1
  import { ApiActivity, ApiOrder } from '@medialane/sdk';
2
+ import { ImageResolver } from './ipfs.cjs';
2
3
 
3
4
  interface FormattedEvent {
4
5
  title: string;
@@ -6,9 +7,9 @@ interface FormattedEvent {
6
7
  image: string | null;
7
8
  href: string;
8
9
  }
9
- declare function formatActivity(event: ApiActivity): FormattedEvent;
10
- declare function formatOrderNotification(order: ApiOrder): FormattedEvent;
11
- declare function formatOfferAcceptedNotification(order: ApiOrder): FormattedEvent;
12
- declare function formatAssetReceivedNotification(event: ApiActivity): FormattedEvent;
10
+ declare function formatActivity(event: ApiActivity, resolveImage?: ImageResolver): FormattedEvent;
11
+ declare function formatOrderNotification(order: ApiOrder, resolveImage?: ImageResolver): FormattedEvent;
12
+ declare function formatOfferAcceptedNotification(order: ApiOrder, resolveImage?: ImageResolver): FormattedEvent;
13
+ declare function formatAssetReceivedNotification(event: ApiActivity, resolveImage?: ImageResolver): FormattedEvent;
13
14
 
14
15
  export { type FormattedEvent, formatActivity, formatAssetReceivedNotification, formatOfferAcceptedNotification, formatOrderNotification };
@@ -1,4 +1,5 @@
1
1
  import { ApiActivity, ApiOrder } from '@medialane/sdk';
2
+ import { ImageResolver } from './ipfs.js';
2
3
 
3
4
  interface FormattedEvent {
4
5
  title: string;
@@ -6,9 +7,9 @@ interface FormattedEvent {
6
7
  image: string | null;
7
8
  href: string;
8
9
  }
9
- declare function formatActivity(event: ApiActivity): FormattedEvent;
10
- declare function formatOrderNotification(order: ApiOrder): FormattedEvent;
11
- declare function formatOfferAcceptedNotification(order: ApiOrder): FormattedEvent;
12
- declare function formatAssetReceivedNotification(event: ApiActivity): FormattedEvent;
10
+ declare function formatActivity(event: ApiActivity, resolveImage?: ImageResolver): FormattedEvent;
11
+ declare function formatOrderNotification(order: ApiOrder, resolveImage?: ImageResolver): FormattedEvent;
12
+ declare function formatOfferAcceptedNotification(order: ApiOrder, resolveImage?: ImageResolver): FormattedEvent;
13
+ declare function formatAssetReceivedNotification(event: ApiActivity, resolveImage?: ImageResolver): FormattedEvent;
13
14
 
14
15
  export { type FormattedEvent, formatActivity, formatAssetReceivedNotification, formatOfferAcceptedNotification, formatOrderNotification };
@@ -1,6 +1,7 @@
1
1
  import { assetHref } from "@medialane/sdk";
2
2
  import { formatDisplayPrice } from "./format.js";
3
- import { ipfsToHttp } from "./ipfs.js";
3
+ import { createImageResolver } from "./ipfs.js";
4
+ const defaultResolver = createImageResolver();
4
5
  function short(addr) {
5
6
  return addr.length > 10 ? `${addr.slice(0, 6)}\u2026${addr.slice(-4)}` : addr;
6
7
  }
@@ -8,12 +9,12 @@ function price(p) {
8
9
  if (!p?.formatted) return null;
9
10
  return `${formatDisplayPrice(p.formatted)} ${p.currency}`;
10
11
  }
11
- function formatActivity(event) {
12
+ function formatActivity(event, resolveImage = defaultResolver) {
12
13
  const contract = event.nftContract ?? event.contractAddress ?? "";
13
14
  const tokenId = event.nftTokenId ?? event.tokenId ?? "";
14
15
  const href = contract && tokenId ? assetHref("STARKNET", contract, tokenId) : "/activities";
15
16
  const raw = event.token?.image ?? null;
16
- const image = raw ? ipfsToHttp(raw) : null;
17
+ const image = resolveImage(raw);
17
18
  const name = event.token?.name ?? (tokenId ? `#${tokenId}` : "token");
18
19
  const p = price(event.price);
19
20
  const actor = event.offerer ?? event.fulfiller ?? (event.type === "mint" ? event.to : event.from) ?? null;
@@ -65,10 +66,10 @@ function formatActivity(event) {
65
66
  return { title: event.type ?? "Activity", description: name, image, href };
66
67
  }
67
68
  }
68
- function formatOrderNotification(order) {
69
+ function formatOrderNotification(order, resolveImage = defaultResolver) {
69
70
  const name = order.token?.name ?? `#${order.consideration.identifier}`;
70
71
  const raw = order.token?.image ?? null;
71
- const image = raw ? ipfsToHttp(raw) : null;
72
+ const image = resolveImage(raw);
72
73
  const href = assetHref("STARKNET", order.consideration.token, order.consideration.identifier);
73
74
  const p = price(order.price);
74
75
  const from = short(order.offerer);
@@ -79,10 +80,10 @@ function formatOrderNotification(order) {
79
80
  href
80
81
  };
81
82
  }
82
- function formatOfferAcceptedNotification(order) {
83
+ function formatOfferAcceptedNotification(order, resolveImage = defaultResolver) {
83
84
  const name = order.token?.name ?? `#${order.nftTokenId}`;
84
85
  const raw = order.token?.image ?? null;
85
- const image = raw ? ipfsToHttp(raw) : null;
86
+ const image = resolveImage(raw);
86
87
  const href = order.nftContract && order.nftTokenId ? assetHref("STARKNET", order.nftContract, order.nftTokenId) : "/portfolio/assets";
87
88
  const p = price(order.price);
88
89
  return {
@@ -92,12 +93,12 @@ function formatOfferAcceptedNotification(order) {
92
93
  href
93
94
  };
94
95
  }
95
- function formatAssetReceivedNotification(event) {
96
+ function formatAssetReceivedNotification(event, resolveImage = defaultResolver) {
96
97
  const contract = event.nftContract ?? event.contractAddress ?? "";
97
98
  const tokenId = event.nftTokenId ?? event.tokenId ?? "";
98
99
  const href = contract && tokenId ? assetHref("STARKNET", contract, tokenId) : "/portfolio/assets";
99
100
  const raw = event.token?.image ?? null;
100
- const image = raw ? ipfsToHttp(raw) : null;
101
+ const image = resolveImage(raw);
101
102
  const name = event.token?.name ?? (tokenId ? `#${tokenId}` : "an asset");
102
103
  const from = event.from ? short(event.from) : null;
103
104
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/format-activity.ts"],"sourcesContent":["import type { ApiActivity, ApiOrder } from \"@medialane/sdk\";\nimport { assetHref } from \"@medialane/sdk\";\nimport { formatDisplayPrice } from \"./format.js\";\nimport { ipfsToHttp } from \"./ipfs.js\";\n\nexport interface FormattedEvent {\n title: string;\n description: string;\n image: string | null;\n href: string;\n}\n\nfunction short(addr: string): string {\n return addr.length > 10 ? `${addr.slice(0, 6)}…${addr.slice(-4)}` : addr;\n}\n\nfunction price(p?: { formatted?: string | null; currency?: string | null } | null): string | null {\n if (!p?.formatted) return null;\n return `${formatDisplayPrice(p.formatted)} ${p.currency}`;\n}\n\nexport function formatActivity(event: ApiActivity): FormattedEvent {\n const contract = event.nftContract ?? event.contractAddress ?? \"\";\n const tokenId = event.nftTokenId ?? event.tokenId ?? \"\";\n const href = contract && tokenId ? assetHref(\"STARKNET\", contract, tokenId) : \"/activities\";\n const raw = event.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const name = event.token?.name ?? (tokenId ? `#${tokenId}` : \"token\");\n const p = price(event.price);\n\n const actor =\n event.offerer ??\n event.fulfiller ??\n (event.type === \"mint\" ? event.to : event.from) ??\n null;\n const actorShort = actor ? short(actor) : null;\n\n switch (event.type) {\n case \"sale\":\n return {\n title: `${name} sold`,\n description: p\n ? `${p}${event.to ? ` to ${short(event.to)}` : \"\"}`\n : \"Sale confirmed\",\n image, href,\n };\n case \"listing\":\n return {\n title: `${name} listed`,\n description: p ? `Listed for ${p}` : \"New listing\",\n image, href,\n };\n case \"offer\":\n return {\n title: `Offer on ${name}`,\n description: p && actorShort ? `${p} from ${actorShort}` : p ?? \"New offer\",\n image, href,\n };\n case \"mint\":\n return {\n title: `${name} minted`,\n description: actorShort ? `By ${actorShort}` : \"New mint\",\n image, href,\n };\n case \"transfer\":\n return {\n title: `${name} transferred`,\n description:\n actorShort && event.to\n ? `${actorShort} → ${short(event.to)}`\n : \"Token transferred\",\n image, href,\n };\n case \"cancelled\":\n return {\n title: \"Listing cancelled\",\n description: name,\n image, href,\n };\n default:\n return { title: event.type ?? \"Activity\", description: name, image, href };\n }\n}\n\nexport function formatOrderNotification(order: ApiOrder): FormattedEvent {\n const name = order.token?.name ?? `#${order.consideration.identifier}`;\n const raw = order.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const href = assetHref(\"STARKNET\", order.consideration.token, order.consideration.identifier);\n const p = price(order.price);\n const from = short(order.offerer);\n\n return {\n title: `Offer on ${name}`,\n description: p ? `${p} from ${from}` : `From ${from}`,\n image,\n href,\n };\n}\n\nexport function formatOfferAcceptedNotification(order: ApiOrder): FormattedEvent {\n const name = order.token?.name ?? `#${order.nftTokenId}`;\n const raw = order.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const href = order.nftContract && order.nftTokenId\n ? assetHref(\"STARKNET\", order.nftContract, order.nftTokenId)\n : \"/portfolio/assets\";\n const p = price(order.price);\n\n return {\n title: `Your offer was accepted`,\n description: p ? `${name} · ${p}` : name,\n image,\n href,\n };\n}\n\nexport function formatAssetReceivedNotification(event: ApiActivity): FormattedEvent {\n const contract = event.nftContract ?? event.contractAddress ?? \"\";\n const tokenId = event.nftTokenId ?? event.tokenId ?? \"\";\n const href = contract && tokenId ? assetHref(\"STARKNET\", contract, tokenId) : \"/portfolio/assets\";\n const raw = event.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const name = event.token?.name ?? (tokenId ? `#${tokenId}` : \"an asset\");\n const from = event.from ? short(event.from) : null;\n\n return {\n title: `Asset received`,\n description: from ? `${name} from ${from}` : name,\n image,\n href,\n };\n}\n"],"mappings":"AACA,SAAS,iBAAiB;AAC1B,SAAS,0BAA0B;AACnC,SAAS,kBAAkB;AAS3B,SAAS,MAAM,MAAsB;AACnC,SAAO,KAAK,SAAS,KAAK,GAAG,KAAK,MAAM,GAAG,CAAC,CAAC,SAAI,KAAK,MAAM,EAAE,CAAC,KAAK;AACtE;AAEA,SAAS,MAAM,GAAm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CAAgC,OAAoC;AAClF,QAAM,WAAW,MAAM,eAAe,MAAM,mBAAmB;AAC/D,QAAM,UAAW,MAAM,cAAc,MAAM,WAAW;AACtD,QAAM,OAAW,YAAY,UAAU,UAAU,YAAY,UAAU,OAAO,IAAI;AAClF,QAAM,MAAW,MAAM,OAAO,SAAS;AACvC,QAAM,QAAW,MAAM,WAAW,GAAG,IAAI;AACzC,QAAM,OAAW,MAAM,OAAO,SAAS,UAAU,IAAI,OAAO,KAAK;AACjE,QAAM,OAAW,MAAM,OAAO,MAAM,MAAM,IAAI,IAAI;AAElD,SAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa,OAAO,GAAG,IAAI,SAAS,IAAI,KAAK;AAAA,IAC7C;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/format-activity.ts"],"sourcesContent":["import type { ApiActivity, ApiOrder } from \"@medialane/sdk\";\nimport { assetHref } from \"@medialane/sdk\";\nimport { formatDisplayPrice } from \"./format.js\";\nimport { createImageResolver, type ImageResolver } from \"./ipfs.js\";\n\nconst defaultResolver = createImageResolver();\n\nexport interface FormattedEvent {\n title: string;\n description: string;\n image: string | null;\n href: string;\n}\n\nfunction short(addr: string): string {\n return addr.length > 10 ? `${addr.slice(0, 6)}…${addr.slice(-4)}` : addr;\n}\n\nfunction price(p?: { formatted?: string | null; currency?: string | null } | null): string | null {\n if (!p?.formatted) return null;\n return `${formatDisplayPrice(p.formatted)} ${p.currency}`;\n}\n\nexport function formatActivity(event: ApiActivity, resolveImage: ImageResolver = defaultResolver): FormattedEvent {\n const contract = event.nftContract ?? event.contractAddress ?? \"\";\n const tokenId = event.nftTokenId ?? event.tokenId ?? \"\";\n const href = contract && tokenId ? assetHref(\"STARKNET\", contract, tokenId) : \"/activities\";\n const raw = event.token?.image ?? null;\n const image = resolveImage(raw);\n const name = event.token?.name ?? (tokenId ? `#${tokenId}` : \"token\");\n const p = price(event.price);\n\n const actor =\n event.offerer ??\n event.fulfiller ??\n (event.type === \"mint\" ? event.to : event.from) ??\n null;\n const actorShort = actor ? short(actor) : null;\n\n switch (event.type) {\n case \"sale\":\n return {\n title: `${name} sold`,\n description: p\n ? `${p}${event.to ? ` to ${short(event.to)}` : \"\"}`\n : \"Sale confirmed\",\n image, href,\n };\n case \"listing\":\n return {\n title: `${name} listed`,\n description: p ? `Listed for ${p}` : \"New listing\",\n image, href,\n };\n case \"offer\":\n return {\n title: `Offer on ${name}`,\n description: p && actorShort ? `${p} from ${actorShort}` : p ?? \"New offer\",\n image, href,\n };\n case \"mint\":\n return {\n title: `${name} minted`,\n description: actorShort ? `By ${actorShort}` : \"New mint\",\n image, href,\n };\n case \"transfer\":\n return {\n title: `${name} transferred`,\n description:\n actorShort && event.to\n ? `${actorShort} → ${short(event.to)}`\n : \"Token transferred\",\n image, href,\n };\n case \"cancelled\":\n return {\n title: \"Listing cancelled\",\n description: name,\n image, href,\n };\n default:\n return { title: event.type ?? \"Activity\", description: name, image, href };\n }\n}\n\nexport function formatOrderNotification(order: ApiOrder, resolveImage: ImageResolver = defaultResolver): FormattedEvent {\n const name = order.token?.name ?? `#${order.consideration.identifier}`;\n const raw = order.token?.image ?? null;\n const image = resolveImage(raw);\n const href = assetHref(\"STARKNET\", order.consideration.token, order.consideration.identifier);\n const p = price(order.price);\n const from = short(order.offerer);\n\n return {\n title: `Offer on ${name}`,\n description: p ? `${p} from ${from}` : `From ${from}`,\n image,\n href,\n };\n}\n\nexport function formatOfferAcceptedNotification(order: ApiOrder, resolveImage: ImageResolver = defaultResolver): FormattedEvent {\n const name = order.token?.name ?? `#${order.nftTokenId}`;\n const raw = order.token?.image ?? null;\n const image = resolveImage(raw);\n const href = order.nftContract && order.nftTokenId\n ? assetHref(\"STARKNET\", order.nftContract, order.nftTokenId)\n : \"/portfolio/assets\";\n const p = price(order.price);\n\n return {\n title: `Your offer was accepted`,\n description: p ? `${name} · ${p}` : name,\n image,\n href,\n };\n}\n\nexport function formatAssetReceivedNotification(event: ApiActivity, resolveImage: ImageResolver = defaultResolver): FormattedEvent {\n const contract = event.nftContract ?? event.contractAddress ?? \"\";\n const tokenId = event.nftTokenId ?? event.tokenId ?? \"\";\n const href = contract && tokenId ? assetHref(\"STARKNET\", contract, tokenId) : \"/portfolio/assets\";\n const raw = event.token?.image ?? null;\n const image = resolveImage(raw);\n const name = event.token?.name ?? (tokenId ? `#${tokenId}` : \"an asset\");\n const from = event.from ? short(event.from) : null;\n\n return {\n title: `Asset received`,\n description: from ? `${name} from ${from}` : name,\n image,\n href,\n };\n}\n"],"mappings":"AACA,SAAS,iBAAiB;AAC1B,SAAS,0BAA0B;AACnC,SAAS,2BAA+C;AAExD,MAAM,kBAAkB,oBAAoB;AAS5C,SAAS,MAAM,MAAsB;AACnC,SAAO,KAAK,SAAS,KAAK,GAAG,KAAK,MAAM,GAAG,CAAC,CAAC,SAAI,KAAK,MAAM,EAAE,CAAC,KAAK;AACtE;AAEA,SAAS,MAAM,GAAmF;AAChG,MAAI,CAAC,GAAG,UAAW,QAAO;AAC1B,SAAO,GAAG,mBAAmB,EAAE,SAAS,CAAC,IAAI,EAAE,QAAQ;AACzD;AAEO,SAAS,eAAe,OAAoB,eAA8B,iBAAiC;AAChH,QAAM,WAAW,MAAM,eAAe,MAAM,mBAAmB;AAC/D,QAAM,UAAW,MAAM,cAAc,MAAM,WAAW;AACtD,QAAM,OAAW,YAAY,UAAU,UAAU,YAAY,UAAU,OAAO,IAAI;AAClF,QAAM,MAAW,MAAM,OAAO,SAAS;AACvC,QAAM,QAAW,aAAa,GAAG;AACjC,QAAM,OAAW,MAAM,OAAO,SAAS,UAAU,IAAI,OAAO,KAAK;AACjE,QAAM,IAAW,MAAM,MAAM,KAAK;AAElC,QAAM,QACJ,MAAM,WACN,MAAM,cACL,MAAM,SAAS,SAAS,MAAM,KAAK,MAAM,SAC1C;AACF,QAAM,aAAa,QAAQ,MAAM,KAAK,IAAI;AAE1C,UAAQ,MAAM,MAAM;AAAA,IAClB,KAAK;AACH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;AAChC,QAAM,OAAS,MAAM,MAAM,OAAO;AAElC,SAAO;AAAA,IACL,OAAO,YAAY,IAAI;AAAA,IACvB,aAAa,IAAI,GAAG,CAAC,SAAS,IAAI,KAAK,QAAQ,IAAI;AAAA,IACnD;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,gCAAgC,OAAiB,eAA8B,iBAAiC;AAC9H,QAAM,OAAQ,MAAM,OAAO,QAAQ,IAAI,MAAM,UAAU;AACvD,QAAM,MAAQ,MAAM,OAAO,SAAS;AACpC,QAAM,QAAQ,aAAa,GAAG;AAC9B,QAAM,OAAQ,MAAM,eAAe,MAAM,aACrC,UAAU,YAAY,MAAM,aAAa,MAAM,UAAU,IACzD;AACJ,QAAM,IAAI,MAAM,MAAM,KAAK;AAE3B,SAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa,IAAI,GAAG,IAAI,SAAM,CAAC,KAAK;AAAA,IACpC;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,gCAAgC,OAAoB,eAA8B,iBAAiC;AACjI,QAAM,WAAW,MAAM,eAAe,MAAM,mBAAmB;AAC/D,QAAM,UAAW,MAAM,cAAc,MAAM,WAAW;AACtD,QAAM,OAAW,YAAY,UAAU,UAAU,YAAY,UAAU,OAAO,IAAI;AAClF,QAAM,MAAW,MAAM,OAAO,SAAS;AACvC,QAAM,QAAW,aAAa,GAAG;AACjC,QAAM,OAAW,MAAM,OAAO,SAAS,UAAU,IAAI,OAAO,KAAK;AACjE,QAAM,OAAW,MAAM,OAAO,MAAM,MAAM,IAAI,IAAI;AAElD,SAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa,OAAO,GAAG,IAAI,SAAS,IAAI,KAAK;AAAA,IAC7C;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  var ipfs_exports = {};
20
20
  __export(ipfs_exports, {
21
21
  DEFAULT_GATEWAY: () => DEFAULT_GATEWAY,
22
+ createImageResolver: () => createImageResolver,
22
23
  ipfsToHttp: () => ipfsToHttp,
23
24
  toAbsoluteImageUrl: () => toAbsoluteImageUrl,
24
25
  toDisplayUrl: () => toDisplayUrl,
@@ -62,7 +63,7 @@ function toDisplayUrl(uri, opts = {}) {
62
63
  const proxyPath = opts.proxyPath ?? "/api/img";
63
64
  if (!uri) return placeholder;
64
65
  if (uri.startsWith("data:image/")) return uri;
65
- const resolved = ipfsToHttp(uri, { gateway });
66
+ const resolved = ipfsToHttp(uri, { gateway, width: opts.width });
66
67
  if (resolved.startsWith(gateway)) return resolved;
67
68
  if (uri.startsWith("https://") || uri.startsWith("http://")) {
68
69
  return `${proxyPath}?url=${encodeURIComponent(uri)}`;
@@ -78,9 +79,13 @@ function toAbsoluteImageUrl(uri) {
78
79
  if (!uri) return "";
79
80
  return ipfsToHttp(uri) || "";
80
81
  }
82
+ function createImageResolver(base = {}) {
83
+ return (uri, opts) => toDisplayUrlOrNull(uri, { ...base, ...opts });
84
+ }
81
85
  // Annotate the CommonJS export names for ESM import in node:
82
86
  0 && (module.exports = {
83
87
  DEFAULT_GATEWAY,
88
+ createImageResolver,
84
89
  ipfsToHttp,
85
90
  toAbsoluteImageUrl,
86
91
  toDisplayUrl,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/ipfs.ts"],"sourcesContent":["export const DEFAULT_GATEWAY = \"https://gateway.pinata.cloud/ipfs/\";\n\nconst ALLOWED_PROTOCOLS = new Set([\"http:\", \"https:\", \"ipfs:\"]);\n\nconst KNOWN_IPFS_GATEWAY_HOSTS = /(^|\\.)(mypinata\\.cloud|pinata\\.cloud|ipfs\\.io|dweb\\.link|cloudflare-ipfs\\.com|nftstorage\\.link|w3s\\.link)$/i;\n\nconst DEFAULT_WIDTH = 1200;\n\nfunction withSize(url: string, gateway: string, width: number | null): string {\n if (!width || !url.startsWith(gateway)) return url;\n const sep = url.includes(\"?\") ? \"&\" : \"?\";\n return `${url}${sep}img-width=${width}&img-format=webp&img-quality=80`;\n}\n\nexport function ipfsToHttp(\n uri: string | null | undefined,\n opts: { gateway?: string; width?: number | null } = {}\n): string {\n const gateway = opts.gateway ?? DEFAULT_GATEWAY;\n const width = opts.width === undefined ? DEFAULT_WIDTH : opts.width;\n\n if (!uri) return \"\";\n if (uri.startsWith(\"ipfs://\")) {\n return withSize(uri.replace(\"ipfs://\", gateway), gateway, width);\n }\n if (uri.startsWith(\"data:image/\")) {\n return uri;\n }\n try {\n const parsed = new URL(uri);\n if (!ALLOWED_PROTOCOLS.has(parsed.protocol)) return \"\";\n\n if (KNOWN_IPFS_GATEWAY_HOSTS.test(parsed.hostname)) {\n const match = parsed.pathname.match(/\\/ipfs\\/(.+)$/);\n if (match) return withSize(`${gateway}${match[1]}`, gateway, width);\n }\n } catch {\n return \"\";\n }\n return uri;\n}\n\nexport interface DisplayUrlOptions {\n gateway?: string;\n proxyPath?: string;\n placeholder?: string;\n}\n\nexport function toDisplayUrl(\n uri: string | null | undefined,\n opts: DisplayUrlOptions = {},\n): string {\n const gateway = opts.gateway ?? DEFAULT_GATEWAY;\n const placeholder = opts.placeholder ?? \"/placeholder.svg\";\n const proxyPath = opts.proxyPath ?? \"/api/img\";\n\n if (!uri) return placeholder;\n if (uri.startsWith(\"data:image/\")) return uri;\n\n const resolved = ipfsToHttp(uri, { gateway });\n if (resolved.startsWith(gateway)) return resolved;\n\n if (uri.startsWith(\"https://\") || uri.startsWith(\"http://\")) {\n return `${proxyPath}?url=${encodeURIComponent(uri)}`;\n }\n\n return placeholder;\n}\n\nexport function toDisplayUrlOrNull(\n raw: string | null | undefined,\n opts: DisplayUrlOptions = {},\n): string | null {\n if (!raw) return null;\n if (raw.startsWith(\"/\")) return raw;\n return toDisplayUrl(raw, opts);\n}\n\nexport function toAbsoluteImageUrl(uri: string | null | undefined): string {\n if (!uri) return \"\";\n return ipfsToHttp(uri) || \"\";\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AA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,EAAG,QAAO;AAE1C,QAAM,WAAW,WAAW,KAAK,EAAE,QAAQ,CAAC;AAC5C,MAAI,SAAS,WAAW,OAAO,EAAG,QAAO;AAEzC,MAAI,IAAI,WAAW,UAAU,KAAK,IAAI,WAAW,SAAS,GAAG;AAC3D,WAAO,GAAG,SAAS,QAAQ,mBAAmB,GAAG,CAAC;AAAA,EACpD;AAEA,SAAO;AACT;AAEO,SAAS,mBACd,KACA,OAA0B,CAAC,GACZ;AACf,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI,IAAI,WAAW,GAAG,EAAG,QAAO;AAChC,SAAO,aAAa,KAAK,IAAI;AAC/B;AAEO,SAAS,mBAAmB,KAAwC;AACzE,MAAI,CAAC,IAAK,QAAO;AACjB,SAAO,WAAW,GAAG,KAAK;AAC5B;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/ipfs.ts"],"sourcesContent":["export const DEFAULT_GATEWAY = \"https://gateway.pinata.cloud/ipfs/\";\n\nconst ALLOWED_PROTOCOLS = new Set([\"http:\", \"https:\", \"ipfs:\"]);\n\nconst KNOWN_IPFS_GATEWAY_HOSTS = /(^|\\.)(mypinata\\.cloud|pinata\\.cloud|ipfs\\.io|dweb\\.link|cloudflare-ipfs\\.com|nftstorage\\.link|w3s\\.link)$/i;\n\nconst DEFAULT_WIDTH = 1200;\n\nfunction withSize(url: string, gateway: string, width: number | null): string {\n if (!width || !url.startsWith(gateway)) return url;\n const sep = url.includes(\"?\") ? \"&\" : \"?\";\n return `${url}${sep}img-width=${width}&img-format=webp&img-quality=80`;\n}\n\nexport function ipfsToHttp(\n uri: string | null | undefined,\n opts: { gateway?: string; width?: number | null } = {}\n): string {\n const gateway = opts.gateway ?? DEFAULT_GATEWAY;\n const width = opts.width === undefined ? DEFAULT_WIDTH : opts.width;\n\n if (!uri) return \"\";\n if (uri.startsWith(\"ipfs://\")) {\n return withSize(uri.replace(\"ipfs://\", gateway), gateway, width);\n }\n if (uri.startsWith(\"data:image/\")) {\n return uri;\n }\n try {\n const parsed = new URL(uri);\n if (!ALLOWED_PROTOCOLS.has(parsed.protocol)) return \"\";\n\n if (KNOWN_IPFS_GATEWAY_HOSTS.test(parsed.hostname)) {\n const match = parsed.pathname.match(/\\/ipfs\\/(.+)$/);\n if (match) return withSize(`${gateway}${match[1]}`, gateway, width);\n }\n } catch {\n return \"\";\n }\n return uri;\n}\n\nexport interface DisplayUrlOptions {\n gateway?: string;\n proxyPath?: string;\n placeholder?: string;\n width?: number;\n}\n\nexport function toDisplayUrl(\n uri: string | null | undefined,\n opts: DisplayUrlOptions = {},\n): string {\n const gateway = opts.gateway ?? DEFAULT_GATEWAY;\n const placeholder = opts.placeholder ?? \"/placeholder.svg\";\n const proxyPath = opts.proxyPath ?? \"/api/img\";\n\n if (!uri) return placeholder;\n if (uri.startsWith(\"data:image/\")) return uri;\n\n const resolved = ipfsToHttp(uri, { gateway, width: opts.width });\n if (resolved.startsWith(gateway)) return resolved;\n\n if (uri.startsWith(\"https://\") || uri.startsWith(\"http://\")) {\n return `${proxyPath}?url=${encodeURIComponent(uri)}`;\n }\n\n return placeholder;\n}\n\nexport function toDisplayUrlOrNull(\n raw: string | null | undefined,\n opts: DisplayUrlOptions = {},\n): string | null {\n if (!raw) return null;\n if (raw.startsWith(\"/\")) return raw;\n return toDisplayUrl(raw, opts);\n}\n\nexport function toAbsoluteImageUrl(uri: string | null | undefined): string {\n if (!uri) return \"\";\n return ipfsToHttp(uri) || \"\";\n}\n\nexport type ImageResolver = (uri: string | null | undefined, opts?: { width?: number }) => string | null;\n\nexport function createImageResolver(base: DisplayUrlOptions = {}): ImageResolver {\n return (uri, opts) => toDisplayUrlOrNull(uri, { ...base, ...opts });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,kBAAkB;AAE/B,MAAM,oBAAoB,oBAAI,IAAI,CAAC,SAAS,UAAU,OAAO,CAAC;AAE9D,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AI,IAAI,WAAW,UAAU,KAAK,IAAI,WAAW,SAAS,GAAG;AAC3D,WAAO,GAAG,SAAS,QAAQ,mBAAmB,GAAG,CAAC;AAAA,EACpD;AAEA,SAAO;AACT;AAEO,SAAS,mBACd,KACA,OAA0B,CAAC,GACZ;AACf,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI,IAAI,WAAW,GAAG,EAAG,QAAO;AAChC,SAAO,aAAa,KAAK,IAAI;AAC/B;AAEO,SAAS,mBAAmB,KAAwC;AACzE,MAAI,CAAC,IAAK,QAAO;AACjB,SAAO,WAAW,GAAG,KAAK;AAC5B;AAIO,SAAS,oBAAoB,OAA0B,CAAC,GAAkB;AAC/E,SAAO,CAAC,KAAK,SAAS,mBAAmB,KAAK,EAAE,GAAG,MAAM,GAAG,KAAK,CAAC;AACpE;","names":[]}
@@ -7,9 +7,14 @@ interface DisplayUrlOptions {
7
7
  gateway?: string;
8
8
  proxyPath?: string;
9
9
  placeholder?: string;
10
+ width?: number;
10
11
  }
11
12
  declare function toDisplayUrl(uri: string | null | undefined, opts?: DisplayUrlOptions): string;
12
13
  declare function toDisplayUrlOrNull(raw: string | null | undefined, opts?: DisplayUrlOptions): string | null;
13
14
  declare function toAbsoluteImageUrl(uri: string | null | undefined): string;
15
+ type ImageResolver = (uri: string | null | undefined, opts?: {
16
+ width?: number;
17
+ }) => string | null;
18
+ declare function createImageResolver(base?: DisplayUrlOptions): ImageResolver;
14
19
 
15
- export { DEFAULT_GATEWAY, type DisplayUrlOptions, ipfsToHttp, toAbsoluteImageUrl, toDisplayUrl, toDisplayUrlOrNull };
20
+ export { DEFAULT_GATEWAY, type DisplayUrlOptions, type ImageResolver, createImageResolver, ipfsToHttp, toAbsoluteImageUrl, toDisplayUrl, toDisplayUrlOrNull };