@medialane/ui 0.141.1 → 0.142.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 (57) hide show
  1. package/dist/components/asset-card.cjs +1 -1
  2. package/dist/components/asset-card.cjs.map +1 -1
  3. package/dist/components/asset-card.js +1 -1
  4. package/dist/components/asset-card.js.map +1 -1
  5. package/dist/components/collection-card.cjs +1 -1
  6. package/dist/components/collection-card.cjs.map +1 -1
  7. package/dist/components/collection-card.js +1 -1
  8. package/dist/components/collection-card.js.map +1 -1
  9. package/dist/components/fast-mint/dropzone.cjs +120 -0
  10. package/dist/components/fast-mint/dropzone.cjs.map +1 -0
  11. package/dist/components/fast-mint/dropzone.d.cts +17 -0
  12. package/dist/components/fast-mint/dropzone.d.ts +17 -0
  13. package/dist/components/fast-mint/dropzone.js +96 -0
  14. package/dist/components/fast-mint/dropzone.js.map +1 -0
  15. package/dist/components/fast-mint/fast-mint.cjs +887 -0
  16. package/dist/components/fast-mint/fast-mint.cjs.map +1 -0
  17. package/dist/components/fast-mint/fast-mint.d.cts +10 -0
  18. package/dist/components/fast-mint/fast-mint.d.ts +10 -0
  19. package/dist/components/fast-mint/fast-mint.js +873 -0
  20. package/dist/components/fast-mint/fast-mint.js.map +1 -0
  21. package/dist/components/fast-mint/success-view.cjs +113 -0
  22. package/dist/components/fast-mint/success-view.cjs.map +1 -0
  23. package/dist/components/fast-mint/success-view.d.cts +17 -0
  24. package/dist/components/fast-mint/success-view.d.ts +17 -0
  25. package/dist/components/fast-mint/success-view.js +79 -0
  26. package/dist/components/fast-mint/success-view.js.map +1 -0
  27. package/dist/components/listing-card.cjs +1 -1
  28. package/dist/components/listing-card.cjs.map +1 -1
  29. package/dist/components/listing-card.js +1 -1
  30. package/dist/components/listing-card.js.map +1 -1
  31. package/dist/components/token-card.cjs +1 -1
  32. package/dist/components/token-card.cjs.map +1 -1
  33. package/dist/components/token-card.js +1 -1
  34. package/dist/components/token-card.js.map +1 -1
  35. package/dist/data/drop-create-schema.d.cts +2 -2
  36. package/dist/data/drop-create-schema.d.ts +2 -2
  37. package/dist/index.cjs +18 -0
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.d.cts +7 -1
  40. package/dist/index.d.ts +7 -1
  41. package/dist/index.js +16 -0
  42. package/dist/index.js.map +1 -1
  43. package/dist/types-7TZuHZVP.d.cts +35 -0
  44. package/dist/types-7TZuHZVP.d.ts +35 -0
  45. package/dist/utils/ipfs-upload.cjs +87 -0
  46. package/dist/utils/ipfs-upload.cjs.map +1 -0
  47. package/dist/utils/ipfs-upload.d.cts +13 -0
  48. package/dist/utils/ipfs-upload.d.ts +13 -0
  49. package/dist/utils/ipfs-upload.js +60 -0
  50. package/dist/utils/ipfs-upload.js.map +1 -0
  51. package/dist/utils/ipfs.cjs +11 -3
  52. package/dist/utils/ipfs.cjs.map +1 -1
  53. package/dist/utils/ipfs.d.cts +4 -1
  54. package/dist/utils/ipfs.d.ts +4 -1
  55. package/dist/utils/ipfs.js +11 -3
  56. package/dist/utils/ipfs.js.map +1 -1
  57. package/package.json +5 -3
package/dist/index.js CHANGED
@@ -2,6 +2,12 @@ import { cn } from "./utils/cn.js";
2
2
  import { formatDisplayPrice, parsePriceDisplay, isStableCurrency, formatUsd, formatUsdPrice, formatSmallDecimal } from "./utils/format.js";
3
3
  import { shortenAddress } from "./utils/address.js";
4
4
  import { ipfsToHttp, DEFAULT_GATEWAY } from "./utils/ipfs.js";
5
+ import {
6
+ uploadFileToIpfs,
7
+ uploadJsonToIpfs,
8
+ uploadFailureToast,
9
+ isUserRejection
10
+ } from "./utils/ipfs-upload.js";
5
11
  import { useIntersectionActive } from "./utils/use-intersection-active.js";
6
12
  import { getReadIds, markRead } from "./utils/notification-storage.js";
7
13
  import { licenseSummary } from "./utils/license-summary.js";
@@ -236,6 +242,9 @@ import { JsonLd } from "./components/json-ld.js";
236
242
  import { CreationRecord } from "./components/creation-record.js";
237
243
  import { ClubOwnerActions } from "./components/club-owner-actions.js";
238
244
  import { IPTypeFields } from "./components/ip-type-fields.js";
245
+ import { FastMint } from "./components/fast-mint/fast-mint.js";
246
+ import { Dropzone } from "./components/fast-mint/dropzone.js";
247
+ import { SuccessView } from "./components/fast-mint/success-view.js";
239
248
  import { readBodyWithCap } from "./utils/proxy-body.js";
240
249
  import {
241
250
  formatActivity,
@@ -403,6 +412,7 @@ export {
403
412
  DropdownMenuSubContent,
404
413
  DropdownMenuSubTrigger,
405
414
  DropdownMenuTrigger,
415
+ Dropzone,
406
416
  DurationPicker,
407
417
  EASE_OUT,
408
418
  EMBED_PLATFORM_META,
@@ -410,6 +420,7 @@ export {
410
420
  EmailVerificationGate,
411
421
  EmptyOrError,
412
422
  FadeIn,
423
+ FastMint,
413
424
  FeaturedCarousel,
414
425
  FeaturedCarouselSkeleton,
415
426
  Form,
@@ -534,6 +545,7 @@ export {
534
545
  StatPillRow,
535
546
  StatTile,
536
547
  StepNav,
548
+ SuccessView,
537
549
  Switch,
538
550
  TEMPLATE_TRAIT_TYPES,
539
551
  TYPE_FILTERS,
@@ -588,6 +600,7 @@ export {
588
600
  isLivingRenderCollection,
589
601
  isStableCurrency,
590
602
  isUserRejectedRequest,
603
+ isUserRejection,
591
604
  isWrongNetwork,
592
605
  licenseSummary,
593
606
  markRead,
@@ -603,6 +616,9 @@ export {
603
616
  timeUntil,
604
617
  toDurationDays,
605
618
  toLicenseMetadata,
619
+ uploadFailureToast,
620
+ uploadFileToIpfs,
621
+ uploadJsonToIpfs,
606
622
  usdPriceFor,
607
623
  useActivities,
608
624
  useActivitiesByAddress,
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 { ipfsToHttp, DEFAULT_GATEWAY as PINATA_PUBLIC_GATEWAY } from \"./utils/ipfs.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 getFriendlyWalletError,\n isBareExecuteFailure,\n isUserRejectedRequest,\n isWrongNetwork,\n assertCorrectNetwork,\n WrongNetworkError,\n} from \"./utils/wallet-error.js\";\nexport type { FriendlyWalletError } from \"./utils/wallet-error.js\";\n\nexport { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"./data/ip-types.js\";\nexport type { IpTypeData } from \"./data/ip-types.js\";\nexport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES,\n DERIVATIVES_OPTIONS, LICENSE_TRAIT_TYPES,\n} from \"./data/ip.js\";\nexport type { IPType, LicenseType } from \"./data/ip.js\";\nexport {\n IP_TEMPLATES, EMBED_PLATFORM_META, SOCIAL_PLATFORM_META, TEMPLATE_TRAIT_TYPES, DOC_UPLOAD,\n} from \"./data/ip-templates.js\";\nexport type { EmbedPlatform, SocialPlatform, TraitSuggestion, IPTemplate, DocUploadConfig } from \"./data/ip-templates.js\";\nexport { IPTypeDisplay } from \"./components/ip-type-display.js\";\nexport { AssetOverviewContent } from \"./components/asset-overview-content.js\";\nexport { AssetLicenseSummary } from \"./components/asset-license-summary.js\";\nexport { AssetMarketsTab } from \"./components/asset-markets-tab.js\";\nexport { ParentAttributionBanner } from \"./components/parent-attribution-banner.js\";\nexport type { ParentBannerProps } from \"./components/parent-attribution-banner.js\";\nexport { AssetMediaColumn, AssetHeaderBlock, AssetOwnerRow, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport type { AssetOwnerRowProps } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { EmailVerificationGate } from \"./components/email-verification-gate.js\";\nexport type { EmailVerificationGateProps } from \"./components/email-verification-gate.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 } from \"./utils/time.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 { dropCreateSchema } from \"./data/drop-create-schema.js\";\nexport type { DropCreateFormValues } from \"./data/drop-create-schema.js\";\nexport { getDefaultDropSchedule, getDefaultClaimWindow, suggestLaunchpadSymbol } from \"./utils/launchpad-defaults.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 } 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 { XpToastContent } from \"./components/rewards/xp-toast-content.js\";\nexport type { XpToastContentProps } from \"./components/rewards/xp-toast-content.js\";\nexport { createRewardToast } from \"./components/rewards/reward-toast.js\";\nexport type { RewardToastSnapshot } from \"./components/rewards/reward-toast.js\";\n\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n\nexport { RewardsSection } from \"./components/rewards-section.js\";\nexport type { RewardsSectionProps } from \"./components/rewards-section.js\";\n\nexport { ActionButton } from \"./components/action-button.js\";\nexport type { ActionButtonProps, ActionKey, ToneKey } from \"./components/action-button.js\";\nexport { GradientButton } from \"./components/gradient-button.js\";\nexport type { GradientButtonProps } from \"./components/gradient-button.js\";\n\nexport { CoinLaunchPreview } from \"./components/coin-launch-preview.js\";\nexport type { CoinPreviewData } from \"./components/coin-launch-preview.js\";\nexport { MedialaneCollectionCard } from \"./components/medialane-collection-card.js\";\nexport type { MedialaneCollectionCardProps } from \"./components/medialane-collection-card.js\";\nexport { TokenGlyph, TokenAmount } from \"./components/token-glyph.js\";\nexport type { TokenGlyphProps, TokenAmountProps, TokenSymbol } from \"./components/token-glyph.js\";\n\nexport { StatTile, StatPill, StatPillRow } from \"./components/stat-tile.js\";\nexport type { StatTileProps, StatPillProps, StatPillRowItem } from \"./components/stat-tile.js\";\n\nexport { ActionDialog } from \"./components/action-dialog.js\";\nexport type { ActionDialogProps } from \"./components/action-dialog.js\";\n\nexport { HiddenContentBanner } from \"./components/hidden-content-banner.js\";\nexport { CollectionHeroBanner } from \"./components/collection-hero-banner.js\";\nexport type { CollectionHeroBannerProps, CollectionHeroStat } from \"./components/collection-hero-banner.js\";\n\nexport { useRewardsCelebrations } from \"./components/rewards/use-rewards-celebrations.js\";\nexport { LevelUpCelebration } from \"./components/rewards/level-up-celebration.js\";\nexport type { LevelUpCelebrationProps } from \"./components/rewards/level-up-celebration.js\";\nexport { BadgeUnlockToastContent } from \"./components/rewards/badge-unlock-toast-content.js\";\nexport type { BadgeUnlockToastContentProps } from \"./components/rewards/badge-unlock-toast-content.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\";\nexport { readBodyWithCap } from \"./utils/proxy-body.js\";\nexport type { CappedBody } from \"./utils/proxy-body.js\";\nexport {\n formatActivity, formatOrderNotification, formatOfferAcceptedNotification, formatAssetReceivedNotification,\n} from \"./utils/format-activity.js\";\nexport type { FormattedEvent } from \"./utils/format-activity.js\";\n\nexport { queryKeys, queryKeyPrefix, QUERY_PREFIX } from \"./utils/query-keys.js\";\nexport { useCollectionProfile, useCreatorProfile } from \"./utils/use-profiles.js\";\nexport { useActivities, useActivitiesByAddress } from \"./utils/use-activities.js\";\nexport {\n useCollections, useCollection, useCollectionsByOwner, useCollectionTokens, useNearbyCollectionTokens,\n} from \"./utils/use-collections.js\";\nexport type { CollectionSort } from \"./utils/use-collections.js\";\nexport { CreatorChip } from \"./components/creator-chip.js\";\nexport type { CreatorChipProps } from \"./components/creator-chip.js\";\nexport { CollectionActivityTab } from \"./components/collection-activity-tab.js\";\nexport type { CollectionActivityTabProps } from \"./components/collection-activity-tab.js\";\nexport { CollectionTraitsTab } from \"./components/collection-traits-tab.js\";\nexport type { CollectionTraitsTabProps } from \"./components/collection-traits-tab.js\";\nexport { PortfolioActivity } from \"./components/portfolio-activity.js\";\nexport type { PortfolioActivityProps } from \"./components/portfolio-activity.js\";\nexport { CreatorScoreInline } from \"./components/creator-score-inline.js\";\nexport type { CreatorScoreInlineProps } from \"./components/creator-score-inline.js\";\n\nexport { useMedialaneClient } from \"./utils/use-medialane-client.js\";\nexport { useCreators } from \"./utils/use-creators.js\";\nexport {\n useRewards, useLeaderboard, useRewardsEvents, useRewardsConfig, useRewardsBatch,\n} from \"./utils/use-rewards.js\";\nexport type { UserRewards, LeaderboardEntry, BadgeSummary, LevelSummary } from \"./utils/use-rewards.js\";\n\nexport { apiFetch, ApiError } from \"./utils/api-fetch.js\";\nexport type { ApiFetchConfig, ApiFetchOptions } from \"./utils/api-fetch.js\";\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\";\n"],"mappings":"AACA,SAAS,UAAU;AACnB,SAAS,oBAAoB,mBAAmB,kBAAkB,WAAW,gBAAgB,0BAA0B;AACvH,SAAS,sBAAsB;AAC/B,SAAS,YAA+B,uBAA6B;AACrE,SAAS,6BAA6B;AACtC,SAAS,YAAY,gBAAgB;AACrC,SAAS,sBAAsB;AAC/B;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,OAChB;AAEP;AAAA,EACE;AAAA,EAAc;AAAA,EAAqB;AAAA,EAAsB;AAAA,EAAsB;AAAA,OAC1E;AAEP,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AAExC,SAAS,kBAAkB,kBAAkB,eAAe,yBAAyB;AAErF,SAAS,0BAA0B;AAEnC,SAAS,yBAAyB;AAElC,SAAS,6BAA6B;AAEtC,SAAS,6BAA6B;AAEtC,SAAS,aAAa;AACtB,SAAS,2BAA2B,gCAAgC;AAEpE,SAAS,cAAc,sBAAsB;AAG7C,SAAS,aAAa,gBAAgB,mBAAmB;AAGzD,SAAS,sBAAsB;AAG/B,SAAS,yBAAyB;AAGlC,SAAS,YAAY,QAAQ,SAAS,aAAa,cAAc,Q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AA8B;AACtD;AAAA,EACE;AAAA,EAAgB;AAAA,EAAe;AAAA,EAAuB;AAAA,EAAqB;AAAA,OACtE;AAEP,SAAS,mBAAmB;AAE5B,SAAS,6BAA6B;AAEtC,SAAS,2BAA2B;AAEpC,SAAS,yBAAyB;AAElC,SAAS,0BAA0B;AAGnC,SAAS,0BAA0B;AACnC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EAAY;AAAA,EAAgB;AAAA,EAAkB;AAAA,EAAkB;AAAA,OAC3D;AAGP,SAAS,UAAU,gBAAgB;AAEnC;AAAA,EACE;AAAA,EAAW;AAAA,EAAU;AAAA,EAAkB;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;","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 { ipfsToHttp, DEFAULT_GATEWAY as PINATA_PUBLIC_GATEWAY } from \"./utils/ipfs.js\";\nexport {\n uploadFileToIpfs,\n uploadJsonToIpfs,\n uploadFailureToast,\n isUserRejection,\n type UploadedIpfsFile,\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 getFriendlyWalletError,\n isBareExecuteFailure,\n isUserRejectedRequest,\n isWrongNetwork,\n assertCorrectNetwork,\n WrongNetworkError,\n} from \"./utils/wallet-error.js\";\nexport type { FriendlyWalletError } from \"./utils/wallet-error.js\";\n\nexport { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"./data/ip-types.js\";\nexport type { IpTypeData } from \"./data/ip-types.js\";\nexport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES,\n DERIVATIVES_OPTIONS, LICENSE_TRAIT_TYPES,\n} from \"./data/ip.js\";\nexport type { IPType, LicenseType } from \"./data/ip.js\";\nexport {\n IP_TEMPLATES, EMBED_PLATFORM_META, SOCIAL_PLATFORM_META, TEMPLATE_TRAIT_TYPES, DOC_UPLOAD,\n} from \"./data/ip-templates.js\";\nexport type { EmbedPlatform, SocialPlatform, TraitSuggestion, IPTemplate, DocUploadConfig } from \"./data/ip-templates.js\";\nexport { IPTypeDisplay } from \"./components/ip-type-display.js\";\nexport { AssetOverviewContent } from \"./components/asset-overview-content.js\";\nexport { AssetLicenseSummary } from \"./components/asset-license-summary.js\";\nexport { AssetMarketsTab } from \"./components/asset-markets-tab.js\";\nexport { ParentAttributionBanner } from \"./components/parent-attribution-banner.js\";\nexport type { ParentBannerProps } from \"./components/parent-attribution-banner.js\";\nexport { AssetMediaColumn, AssetHeaderBlock, AssetOwnerRow, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport type { AssetOwnerRowProps } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { EmailVerificationGate } from \"./components/email-verification-gate.js\";\nexport type { EmailVerificationGateProps } from \"./components/email-verification-gate.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 } from \"./utils/time.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 { dropCreateSchema } from \"./data/drop-create-schema.js\";\nexport type { DropCreateFormValues } from \"./data/drop-create-schema.js\";\nexport { getDefaultDropSchedule, getDefaultClaimWindow, suggestLaunchpadSymbol } from \"./utils/launchpad-defaults.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 } 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 { XpToastContent } from \"./components/rewards/xp-toast-content.js\";\nexport type { XpToastContentProps } from \"./components/rewards/xp-toast-content.js\";\nexport { createRewardToast } from \"./components/rewards/reward-toast.js\";\nexport type { RewardToastSnapshot } from \"./components/rewards/reward-toast.js\";\n\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n\nexport { RewardsSection } from \"./components/rewards-section.js\";\nexport type { RewardsSectionProps } from \"./components/rewards-section.js\";\n\nexport { ActionButton } from \"./components/action-button.js\";\nexport type { ActionButtonProps, ActionKey, ToneKey } from \"./components/action-button.js\";\nexport { GradientButton } from \"./components/gradient-button.js\";\nexport type { GradientButtonProps } from \"./components/gradient-button.js\";\n\nexport { CoinLaunchPreview } from \"./components/coin-launch-preview.js\";\nexport type { CoinPreviewData } from \"./components/coin-launch-preview.js\";\nexport { MedialaneCollectionCard } from \"./components/medialane-collection-card.js\";\nexport type { MedialaneCollectionCardProps } from \"./components/medialane-collection-card.js\";\nexport { TokenGlyph, TokenAmount } from \"./components/token-glyph.js\";\nexport type { TokenGlyphProps, TokenAmountProps, TokenSymbol } from \"./components/token-glyph.js\";\n\nexport { StatTile, StatPill, StatPillRow } from \"./components/stat-tile.js\";\nexport type { StatTileProps, StatPillProps, StatPillRowItem } from \"./components/stat-tile.js\";\n\nexport { ActionDialog } from \"./components/action-dialog.js\";\nexport type { ActionDialogProps } from \"./components/action-dialog.js\";\n\nexport { HiddenContentBanner } from \"./components/hidden-content-banner.js\";\nexport { CollectionHeroBanner } from \"./components/collection-hero-banner.js\";\nexport type { CollectionHeroBannerProps, CollectionHeroStat } from \"./components/collection-hero-banner.js\";\n\nexport { useRewardsCelebrations } from \"./components/rewards/use-rewards-celebrations.js\";\nexport { LevelUpCelebration } from \"./components/rewards/level-up-celebration.js\";\nexport type { LevelUpCelebrationProps } from \"./components/rewards/level-up-celebration.js\";\nexport { BadgeUnlockToastContent } from \"./components/rewards/badge-unlock-toast-content.js\";\nexport type { BadgeUnlockToastContentProps } from \"./components/rewards/badge-unlock-toast-content.js\";\nexport { JourneyPath } from \"./components/rewards/journey-path.js\";\nexport type { JourneyPathProps, JourneyStep } from \"./components/rewards/journey-path.js\";\n\nexport { Skeleton } from \"./components/skeleton.js\";\nexport { Badge, badgeVariants } from \"./components/badge.js\";\nexport type { BadgeProps } from \"./components/badge.js\";\nexport { Label } from \"./components/label.js\";\nexport { Input } from \"./components/input.js\";\nexport { Switch } from \"./components/switch.js\";\nexport { Checkbox } from \"./components/checkbox.js\";\nexport { Alert, AlertTitle, AlertDescription } from \"./components/alert.js\";\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from \"./components/tabs.js\";\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from \"./components/card.js\";\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./components/collapsible.js\";\nexport { Button, buttonVariants } from \"./components/button.js\";\nexport type { ButtonProps } from \"./components/button.js\";\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from \"./components/popover.js\";\nexport { HelpIcon } from \"./components/help-icon.js\";\nexport { EmptyOrError } from \"./components/empty-or-error.js\";\nexport { TabEmptyState } from \"./components/tab-empty-state.js\";\nexport type { TabEmptyStateProps } from \"./components/tab-empty-state.js\";\nexport {\n Select, SelectGroup, SelectValue, SelectTrigger, SelectContent,\n SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton,\n} from \"./components/select.js\";\nexport {\n useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField,\n} from \"./components/form.js\";\nexport { Textarea } from \"./components/textarea.js\";\nexport type { TextareaProps } from \"./components/textarea.js\";\nexport {\n Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent,\n SheetHeader, SheetFooter, SheetTitle, SheetDescription,\n} from \"./components/sheet.js\";\n\nexport { ToggleGroup, Section } from \"./components/create-form-primitives.js\";\nexport { OrderSortControl, sortOrders } from \"./components/order-sort-control.js\";\nexport type { OrderSort } from \"./components/order-sort-control.js\";\nexport { AssetLightbox } from \"./components/asset-lightbox.js\";\nexport type { AssetLightboxProps } from \"./components/asset-lightbox.js\";\nexport { PriceHistoryChart } from \"./components/price-history-chart.js\";\nexport type { PriceHistoryChartProps } from \"./components/price-history-chart.js\";\nexport { NavThemeToggle } from \"./components/nav-theme-toggle.js\";\nexport { JsonLd } from \"./components/json-ld.js\";\nexport type { JsonLdProps } from \"./components/json-ld.js\";\nexport { CreationRecord } from \"./components/creation-record.js\";\nexport type { CreationRecordProps } from \"./components/creation-record.js\";\nexport { ClubOwnerActions } from \"./components/club-owner-actions.js\";\nexport type { ClubOwnerActionsProps } from \"./components/club-owner-actions.js\";\nexport { IPTypeFields } from \"./components/ip-type-fields.js\";\nexport type { IPTypeFieldsProps, MetadataField } from \"./components/ip-type-fields.js\";\n\nexport { FastMint } from \"./components/fast-mint/fast-mint.js\";\nexport { Dropzone } from \"./components/fast-mint/dropzone.js\";\nexport type { DropzoneProps } from \"./components/fast-mint/dropzone.js\";\nexport { SuccessView } from \"./components/fast-mint/success-view.js\";\nexport type { SuccessViewProps } from \"./components/fast-mint/success-view.js\";\nexport type {\n MediaKind, FastMintSigner, MintedAsset, FastMintProps,\n} from \"./components/fast-mint/types.js\";\nexport { readBodyWithCap } from \"./utils/proxy-body.js\";\nexport type { CappedBody } from \"./utils/proxy-body.js\";\nexport {\n formatActivity, formatOrderNotification, formatOfferAcceptedNotification, formatAssetReceivedNotification,\n} from \"./utils/format-activity.js\";\nexport type { FormattedEvent } from \"./utils/format-activity.js\";\n\nexport { queryKeys, queryKeyPrefix, QUERY_PREFIX } from \"./utils/query-keys.js\";\nexport { useCollectionProfile, useCreatorProfile } from \"./utils/use-profiles.js\";\nexport { useActivities, useActivitiesByAddress } from \"./utils/use-activities.js\";\nexport {\n useCollections, useCollection, useCollectionsByOwner, useCollectionTokens, useNearbyCollectionTokens,\n} from \"./utils/use-collections.js\";\nexport type { CollectionSort } from \"./utils/use-collections.js\";\nexport { CreatorChip } from \"./components/creator-chip.js\";\nexport type { CreatorChipProps } from \"./components/creator-chip.js\";\nexport { CollectionActivityTab } from \"./components/collection-activity-tab.js\";\nexport type { CollectionActivityTabProps } from \"./components/collection-activity-tab.js\";\nexport { CollectionTraitsTab } from \"./components/collection-traits-tab.js\";\nexport type { CollectionTraitsTabProps } from \"./components/collection-traits-tab.js\";\nexport { PortfolioActivity } from \"./components/portfolio-activity.js\";\nexport type { PortfolioActivityProps } from \"./components/portfolio-activity.js\";\nexport { CreatorScoreInline } from \"./components/creator-score-inline.js\";\nexport type { CreatorScoreInlineProps } from \"./components/creator-score-inline.js\";\n\nexport { useMedialaneClient } from \"./utils/use-medialane-client.js\";\nexport { useCreators } from \"./utils/use-creators.js\";\nexport {\n useRewards, useLeaderboard, useRewardsEvents, useRewardsConfig, useRewardsBatch,\n} from \"./utils/use-rewards.js\";\nexport type { UserRewards, LeaderboardEntry, BadgeSummary, LevelSummary } from \"./utils/use-rewards.js\";\n\nexport { apiFetch, ApiError } from \"./utils/api-fetch.js\";\nexport type { ApiFetchConfig, ApiFetchOptions } from \"./utils/api-fetch.js\";\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\";\n"],"mappings":"AACA,SAAS,UAAU;AACnB,SAAS,oBAAoB,mBAAmB,kBAAkB,WAAW,gBAAgB,0BAA0B;AACvH,SAAS,sBAAsB;AAC/B,SAAS,YAA+B,uBAA6B;AACrE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,6BAA6B;AACtC,SAAS,YAAY,gBAAgB;AACrC,SAAS,sBAAsB;AAC/B;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,OAChB;AAEP;AAAA,EACE;AAAA,EAAc;AAAA,EAAqB;AAAA,EAAsB;AAAA,EAAsB;AAAA,OAC1E;AAEP,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AAExC,SAAS,kBAAkB,kBAAkB,eAAe,yBAAyB;AAErF,SAAS,0BAA0B;AAEnC,SAAS,yBAAyB;AAElC,SAAS,6BAA6B;AAEtC,SAAS,6BAA6B;AAEtC,SAAS,aAAa;AACtB,SAAS,2BAA2B,gCAAgC;AAEpE,SAAS,cAAc,sB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EzB,SAAS,mBAAmB;AAK5B,SAAS,uBAAuB;AAEhC;AAAA,EACE;AAAA,EAAgB;AAAA,EAAyB;AAAA,EAAiC;AAAA,OACrE;AAGP,SAAS,WAAW,gBAAgB,oBAAoB;AACxD,SAAS,sBAAsB,yBAAyB;AACxD,SAAS,eAAe,8BAA8B;AACtD;AAAA,EACE;AAAA,EAAgB;AAAA,EAAe;AAAA,EAAuB;AAAA,EAAqB;AAAA,OACtE;AAEP,SAAS,mBAAmB;AAE5B,SAAS,6BAA6B;AAEtC,SAAS,2BAA2B;AAEpC,SAAS,yBAAyB;AAElC,SAAS,0BAA0B;AAGnC,SAAS,0BAA0B;AACnC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EAAY;AAAA,EAAgB;AAAA,EAAkB;AAAA,EAAkB;AAAA,OAC3D;AAGP,SAAS,UAAU,gBAAgB;AAEnC;AAAA,EACE;AAAA,EAAW;AAAA,EAAU;AAAA,EAAkB;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;","names":[]}
@@ -0,0 +1,35 @@
1
+ import { Call, TypedData } from 'starknet';
2
+ import { ApiCollection } from '@medialane/sdk';
3
+ import { MedialaneClient, ReceiptProvider } from '@medialane/sdk/starknet';
4
+
5
+ type MediaKind = "image" | "audio" | "video" | "document";
6
+ interface FastMintSigner {
7
+ readonly address: string;
8
+ execute(calls: Call[]): Promise<{
9
+ txHash: string;
10
+ }>;
11
+ signTypedData(data: TypedData): Promise<string[]>;
12
+ }
13
+ interface MintedAsset {
14
+ contract: string;
15
+ tokenId: string;
16
+ image: string | null;
17
+ }
18
+ interface FastMintProps {
19
+ presentation?: "inline" | "dialog";
20
+ open?: boolean;
21
+ onClose?: () => void;
22
+ mediaKindLock?: MediaKind;
23
+ onMinted?: (asset: MintedAsset) => void;
24
+ collections: ApiCollection[];
25
+ refetchCollections: () => Promise<ApiCollection[]>;
26
+ hasWallet: boolean;
27
+ walletAddress: string | null;
28
+ onRequireWallet: () => void;
29
+ getUploadToken: () => Promise<string | null>;
30
+ getSigner: () => Promise<FastMintSigner> | FastMintSigner;
31
+ client: MedialaneClient;
32
+ provider: ReceiptProvider;
33
+ }
34
+
35
+ export type { FastMintProps as F, MediaKind as M, FastMintSigner as a, MintedAsset as b };
@@ -0,0 +1,35 @@
1
+ import { Call, TypedData } from 'starknet';
2
+ import { ApiCollection } from '@medialane/sdk';
3
+ import { MedialaneClient, ReceiptProvider } from '@medialane/sdk/starknet';
4
+
5
+ type MediaKind = "image" | "audio" | "video" | "document";
6
+ interface FastMintSigner {
7
+ readonly address: string;
8
+ execute(calls: Call[]): Promise<{
9
+ txHash: string;
10
+ }>;
11
+ signTypedData(data: TypedData): Promise<string[]>;
12
+ }
13
+ interface MintedAsset {
14
+ contract: string;
15
+ tokenId: string;
16
+ image: string | null;
17
+ }
18
+ interface FastMintProps {
19
+ presentation?: "inline" | "dialog";
20
+ open?: boolean;
21
+ onClose?: () => void;
22
+ mediaKindLock?: MediaKind;
23
+ onMinted?: (asset: MintedAsset) => void;
24
+ collections: ApiCollection[];
25
+ refetchCollections: () => Promise<ApiCollection[]>;
26
+ hasWallet: boolean;
27
+ walletAddress: string | null;
28
+ onRequireWallet: () => void;
29
+ getUploadToken: () => Promise<string | null>;
30
+ getSigner: () => Promise<FastMintSigner> | FastMintSigner;
31
+ client: MedialaneClient;
32
+ provider: ReceiptProvider;
33
+ }
34
+
35
+ export type { FastMintProps as F, MediaKind as M, FastMintSigner as a, MintedAsset as b };
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var ipfs_upload_exports = {};
20
+ __export(ipfs_upload_exports, {
21
+ isUserRejection: () => isUserRejection,
22
+ uploadFailureToast: () => uploadFailureToast,
23
+ uploadFileToIpfs: () => uploadFileToIpfs,
24
+ uploadJsonToIpfs: () => uploadJsonToIpfs
25
+ });
26
+ module.exports = __toCommonJS(ipfs_upload_exports);
27
+ function authHeaders(token) {
28
+ return token ? { Authorization: `Bearer ${token}` } : {};
29
+ }
30
+ async function uploadFileToIpfs(file, token, kind = "image") {
31
+ const signedRes = await fetch("/api/pinata/signed-url", {
32
+ method: "POST",
33
+ headers: { "Content-Type": "application/json", ...authHeaders(token) },
34
+ body: JSON.stringify({ kind })
35
+ });
36
+ const signed = await signedRes.json().catch(() => ({}));
37
+ if (!signedRes.ok || !signed.url) {
38
+ throw new Error(signed.error ?? "Failed to prepare the upload");
39
+ }
40
+ const formData = new FormData();
41
+ formData.append("file", file, file.name);
42
+ formData.append("network", "public");
43
+ formData.append("name", file.name);
44
+ const uploadRes = await fetch(signed.url, { method: "POST", body: formData });
45
+ const uploadJson = await uploadRes.json().catch(() => ({}));
46
+ const cid = uploadJson.data?.cid;
47
+ if (!uploadRes.ok || !cid) {
48
+ throw new Error("Upload to IPFS failed");
49
+ }
50
+ return { cid, uri: `ipfs://${cid}` };
51
+ }
52
+ async function uploadJsonToIpfs(payload, token) {
53
+ const res = await fetch("/api/pinata/json", {
54
+ method: "POST",
55
+ headers: { "Content-Type": "application/json", ...authHeaders(token) },
56
+ body: JSON.stringify(payload)
57
+ });
58
+ const data = await res.json().catch(() => ({}));
59
+ if (!res.ok || !data.uri) {
60
+ throw new Error(data.error ?? "Metadata upload failed");
61
+ }
62
+ return data.uri;
63
+ }
64
+ function isUserRejection(err) {
65
+ const msg = err instanceof Error ? err.message : String(err ?? "");
66
+ return /reject|denied|declin|abort|cancel|refus/i.test(msg);
67
+ }
68
+ function uploadFailureToast(err) {
69
+ if (isUserRejection(err)) {
70
+ return {
71
+ title: "Signature declined",
72
+ description: "Uploads need a one-time, free sign-in signature \u2014 it's not a transaction and costs nothing. Try again and approve the request in your wallet."
73
+ };
74
+ }
75
+ return {
76
+ title: "Upload failed",
77
+ description: err instanceof Error ? err.message : void 0
78
+ };
79
+ }
80
+ // Annotate the CommonJS export names for ESM import in node:
81
+ 0 && (module.exports = {
82
+ isUserRejection,
83
+ uploadFailureToast,
84
+ uploadFileToIpfs,
85
+ uploadJsonToIpfs
86
+ });
87
+ //# sourceMappingURL=ipfs-upload.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/ipfs-upload.ts"],"sourcesContent":["export interface UploadedIpfsFile {\n cid: string;\n uri: string;\n}\n\nfunction authHeaders(token: string | null): Record<string, string> {\n return token ? { Authorization: `Bearer ${token}` } : {};\n}\n\nexport async function uploadFileToIpfs(\n file: File,\n token: string | null,\n kind: \"image\" | \"document\" | \"media\" = \"image\",\n): Promise<UploadedIpfsFile> {\n const signedRes = await fetch(\"/api/pinata/signed-url\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\", ...authHeaders(token) },\n body: JSON.stringify({ kind }),\n });\n const signed = (await signedRes.json().catch(() => ({}))) as { url?: string; error?: string };\n if (!signedRes.ok || !signed.url) {\n throw new Error(signed.error ?? \"Failed to prepare the upload\");\n }\n\n const formData = new FormData();\n formData.append(\"file\", file, file.name);\n formData.append(\"network\", \"public\");\n formData.append(\"name\", file.name);\n\n const uploadRes = await fetch(signed.url, { method: \"POST\", body: formData });\n const uploadJson = (await uploadRes.json().catch(() => ({}))) as { data?: { cid?: string } };\n const cid = uploadJson.data?.cid;\n if (!uploadRes.ok || !cid) {\n throw new Error(\"Upload to IPFS failed\");\n }\n\n return { cid, uri: `ipfs://${cid}` };\n}\n\nexport async function uploadJsonToIpfs(payload: unknown, token: string | null): Promise<string> {\n const res = await fetch(\"/api/pinata/json\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\", ...authHeaders(token) },\n body: JSON.stringify(payload),\n });\n const data = (await res.json().catch(() => ({}))) as { uri?: string; error?: string };\n\n if (!res.ok || !data.uri) {\n throw new Error(data.error ?? \"Metadata upload failed\");\n }\n\n return data.uri;\n}\n\nexport function isUserRejection(err: unknown): boolean {\n const msg = err instanceof Error ? err.message : String(err ?? \"\");\n return /reject|denied|declin|abort|cancel|refus/i.test(msg);\n}\n\nexport function uploadFailureToast(err: unknown): { title: string; description?: string } {\n if (isUserRejection(err)) {\n return {\n title: \"Signature declined\",\n description:\n \"Uploads need a one-time, free sign-in signature — it's not a transaction and costs nothing. Try again and approve the request in your wallet.\",\n };\n }\n return {\n title: \"Upload failed\",\n description: err instanceof Error ? err.message : undefined,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,SAAS,YAAY,OAA8C;AACjE,SAAO,QAAQ,EAAE,eAAe,UAAU,KAAK,GAAG,IAAI,CAAC;AACzD;AAEA,eAAsB,iBACpB,MACA,OACA,OAAuC,SACZ;AAC3B,QAAM,YAAY,MAAM,MAAM,0BAA0B;AAAA,IACtD,QAAQ;AAAA,IACR,SAAS,EAAE,gBAAgB,oBAAoB,GAAG,YAAY,KAAK,EAAE;AAAA,IACr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AAEO,SAAS,mBAAmB,KAAuD;AACxF,MAAI,gBAAgB,GAAG,GAAG;AACxB,WAAO;AAAA,MACL,OAAO;AAAA,MACP,aACE;AAAA,IACJ;AAAA,EACF;AACA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa,eAAe,QAAQ,IAAI,UAAU;AAAA,EACpD;AACF;","names":[]}
@@ -0,0 +1,13 @@
1
+ interface UploadedIpfsFile {
2
+ cid: string;
3
+ uri: string;
4
+ }
5
+ declare function uploadFileToIpfs(file: File, token: string | null, kind?: "image" | "document" | "media"): Promise<UploadedIpfsFile>;
6
+ declare function uploadJsonToIpfs(payload: unknown, token: string | null): Promise<string>;
7
+ declare function isUserRejection(err: unknown): boolean;
8
+ declare function uploadFailureToast(err: unknown): {
9
+ title: string;
10
+ description?: string;
11
+ };
12
+
13
+ export { type UploadedIpfsFile, isUserRejection, uploadFailureToast, uploadFileToIpfs, uploadJsonToIpfs };
@@ -0,0 +1,13 @@
1
+ interface UploadedIpfsFile {
2
+ cid: string;
3
+ uri: string;
4
+ }
5
+ declare function uploadFileToIpfs(file: File, token: string | null, kind?: "image" | "document" | "media"): Promise<UploadedIpfsFile>;
6
+ declare function uploadJsonToIpfs(payload: unknown, token: string | null): Promise<string>;
7
+ declare function isUserRejection(err: unknown): boolean;
8
+ declare function uploadFailureToast(err: unknown): {
9
+ title: string;
10
+ description?: string;
11
+ };
12
+
13
+ export { type UploadedIpfsFile, isUserRejection, uploadFailureToast, uploadFileToIpfs, uploadJsonToIpfs };
@@ -0,0 +1,60 @@
1
+ function authHeaders(token) {
2
+ return token ? { Authorization: `Bearer ${token}` } : {};
3
+ }
4
+ async function uploadFileToIpfs(file, token, kind = "image") {
5
+ const signedRes = await fetch("/api/pinata/signed-url", {
6
+ method: "POST",
7
+ headers: { "Content-Type": "application/json", ...authHeaders(token) },
8
+ body: JSON.stringify({ kind })
9
+ });
10
+ const signed = await signedRes.json().catch(() => ({}));
11
+ if (!signedRes.ok || !signed.url) {
12
+ throw new Error(signed.error ?? "Failed to prepare the upload");
13
+ }
14
+ const formData = new FormData();
15
+ formData.append("file", file, file.name);
16
+ formData.append("network", "public");
17
+ formData.append("name", file.name);
18
+ const uploadRes = await fetch(signed.url, { method: "POST", body: formData });
19
+ const uploadJson = await uploadRes.json().catch(() => ({}));
20
+ const cid = uploadJson.data?.cid;
21
+ if (!uploadRes.ok || !cid) {
22
+ throw new Error("Upload to IPFS failed");
23
+ }
24
+ return { cid, uri: `ipfs://${cid}` };
25
+ }
26
+ async function uploadJsonToIpfs(payload, token) {
27
+ const res = await fetch("/api/pinata/json", {
28
+ method: "POST",
29
+ headers: { "Content-Type": "application/json", ...authHeaders(token) },
30
+ body: JSON.stringify(payload)
31
+ });
32
+ const data = await res.json().catch(() => ({}));
33
+ if (!res.ok || !data.uri) {
34
+ throw new Error(data.error ?? "Metadata upload failed");
35
+ }
36
+ return data.uri;
37
+ }
38
+ function isUserRejection(err) {
39
+ const msg = err instanceof Error ? err.message : String(err ?? "");
40
+ return /reject|denied|declin|abort|cancel|refus/i.test(msg);
41
+ }
42
+ function uploadFailureToast(err) {
43
+ if (isUserRejection(err)) {
44
+ return {
45
+ title: "Signature declined",
46
+ description: "Uploads need a one-time, free sign-in signature \u2014 it's not a transaction and costs nothing. Try again and approve the request in your wallet."
47
+ };
48
+ }
49
+ return {
50
+ title: "Upload failed",
51
+ description: err instanceof Error ? err.message : void 0
52
+ };
53
+ }
54
+ export {
55
+ isUserRejection,
56
+ uploadFailureToast,
57
+ uploadFileToIpfs,
58
+ uploadJsonToIpfs
59
+ };
60
+ //# sourceMappingURL=ipfs-upload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/ipfs-upload.ts"],"sourcesContent":["export interface UploadedIpfsFile {\n cid: string;\n uri: string;\n}\n\nfunction authHeaders(token: string | null): Record<string, string> {\n return token ? { Authorization: `Bearer ${token}` } : {};\n}\n\nexport async function uploadFileToIpfs(\n file: File,\n token: string | null,\n kind: \"image\" | \"document\" | \"media\" = \"image\",\n): Promise<UploadedIpfsFile> {\n const signedRes = await fetch(\"/api/pinata/signed-url\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\", ...authHeaders(token) },\n body: JSON.stringify({ kind }),\n });\n const signed = (await signedRes.json().catch(() => ({}))) as { url?: string; error?: string };\n if (!signedRes.ok || !signed.url) {\n throw new Error(signed.error ?? \"Failed to prepare the upload\");\n }\n\n const formData = new FormData();\n formData.append(\"file\", file, file.name);\n formData.append(\"network\", \"public\");\n formData.append(\"name\", file.name);\n\n const uploadRes = await fetch(signed.url, { method: \"POST\", body: formData });\n const uploadJson = (await uploadRes.json().catch(() => ({}))) as { data?: { cid?: string } };\n const cid = uploadJson.data?.cid;\n if (!uploadRes.ok || !cid) {\n throw new Error(\"Upload to IPFS failed\");\n }\n\n return { cid, uri: `ipfs://${cid}` };\n}\n\nexport async function uploadJsonToIpfs(payload: unknown, token: string | null): Promise<string> {\n const res = await fetch(\"/api/pinata/json\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\", ...authHeaders(token) },\n body: JSON.stringify(payload),\n });\n const data = (await res.json().catch(() => ({}))) as { uri?: string; error?: string };\n\n if (!res.ok || !data.uri) {\n throw new Error(data.error ?? \"Metadata upload failed\");\n }\n\n return data.uri;\n}\n\nexport function isUserRejection(err: unknown): boolean {\n const msg = err instanceof Error ? err.message : String(err ?? \"\");\n return /reject|denied|declin|abort|cancel|refus/i.test(msg);\n}\n\nexport function uploadFailureToast(err: unknown): { title: string; description?: string } {\n if (isUserRejection(err)) {\n return {\n title: \"Signature declined\",\n description:\n \"Uploads need a one-time, free sign-in signature — it's not a transaction and costs nothing. Try again and approve the request in your wallet.\",\n };\n }\n return {\n title: \"Upload failed\",\n description: err instanceof Error ? err.message : undefined,\n };\n}\n"],"mappings":"AAKA,SAAS,YAAY,OAA8C;AACjE,SAAO,QAAQ,EAAE,eAAe,UAAU,KAAK,GAAG,IAAI,CAAC;AACzD;AAEA,eAAsB,iBACpB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ACxD;AAEA,SAAO,KAAK;AACd;AAEO,SAAS,gBAAgB,KAAuB;AACrD,QAAM,MAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,OAAO,EAAE;AACjE,SAAO,2CAA2C,KAAK,GAAG;AAC5D;AAEO,SAAS,mBAAmB,KAAuD;AACxF,MAAI,gBAAgB,GAAG,GAAG;AACxB,WAAO;AAAA,MACL,OAAO;AAAA,MACP,aACE;AAAA,IACJ;AAAA,EACF;AACA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa,eAAe,QAAQ,IAAI,UAAU;AAAA,EACpD;AACF;","names":[]}
@@ -25,10 +25,18 @@ module.exports = __toCommonJS(ipfs_exports);
25
25
  const DEFAULT_GATEWAY = "https://gateway.pinata.cloud/ipfs/";
26
26
  const ALLOWED_PROTOCOLS = /* @__PURE__ */ new Set(["http:", "https:", "ipfs:"]);
27
27
  const KNOWN_IPFS_GATEWAY_HOSTS = /(^|\.)(mypinata\.cloud|pinata\.cloud|ipfs\.io|dweb\.link|cloudflare-ipfs\.com|nftstorage\.link|w3s\.link)$/i;
28
- function ipfsToHttp(uri, gateway = DEFAULT_GATEWAY) {
28
+ const DEFAULT_WIDTH = 1200;
29
+ function withSize(url, gateway, width) {
30
+ if (!width || !url.startsWith(gateway)) return url;
31
+ const sep = url.includes("?") ? "&" : "?";
32
+ return `${url}${sep}img-width=${width}&img-format=webp&img-quality=80`;
33
+ }
34
+ function ipfsToHttp(uri, opts = {}) {
35
+ const gateway = opts.gateway ?? DEFAULT_GATEWAY;
36
+ const width = opts.width === void 0 ? DEFAULT_WIDTH : opts.width;
29
37
  if (!uri) return "";
30
38
  if (uri.startsWith("ipfs://")) {
31
- return uri.replace("ipfs://", gateway);
39
+ return withSize(uri.replace("ipfs://", gateway), gateway, width);
32
40
  }
33
41
  if (uri.startsWith("data:image/")) {
34
42
  return uri;
@@ -38,7 +46,7 @@ function ipfsToHttp(uri, gateway = DEFAULT_GATEWAY) {
38
46
  if (!ALLOWED_PROTOCOLS.has(parsed.protocol)) return "";
39
47
  if (KNOWN_IPFS_GATEWAY_HOSTS.test(parsed.hostname)) {
40
48
  const match = parsed.pathname.match(/\/ipfs\/(.+)$/);
41
- if (match) return `${gateway}${match[1]}`;
49
+ if (match) return withSize(`${gateway}${match[1]}`, gateway, width);
42
50
  }
43
51
  } catch {
44
52
  return "";
@@ -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\nexport function ipfsToHttp(\n uri: string | null | undefined,\n gateway = DEFAULT_GATEWAY\n): string {\n if (!uri) return \"\";\n if (uri.startsWith(\"ipfs://\")) {\n return uri.replace(\"ipfs://\", gateway);\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 `${gateway}${match[1]}`;\n }\n } catch {\n return \"\";\n }\n return uri;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,kBAAkB;AAE/B,MAAM,oBAAoB,oBAAI,IAAI,CAAC,SAAS,UAAU,OAAO,CAAC;AAE9D,MAAM,2BAA2B;AAE1B,SAAS,WACd,KACA,UAAU,iBACF;AACR,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI,IAAI,WAAW,SAAS,GAAG;AAC7B,WAAO,IAAI,QAAQ,WAAW,OAAO;AAAA,EACvC;AACA,MAAI,IAAI,WAAW,aAAa,GAAG;AACjC,WAAO;AAAA,EACT;AACA,MAAI;AACF,UAAM,SAAS,IAAI,IAAI,GAAG;AAC1B,QAAI,CAAC,kBAAkB,IAAI,OAAO,QAAQ,EAAG,QAAO;AAEpD,QAAI,yBAAyB,KAAK,OAAO,QAAQ,GAAG;AAClD,YAAM,QAAQ,OAAO,SAAS,MAAM,eAAe;AACnD,UAAI,MAAO,QAAO,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;AAAA,IACzC;AAAA,EACF,QAAQ;AACN,WAAO;AAAA,EACT;AACA,SAAO;AACT;","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"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,kBAAkB;AAE/B,MAAM,oBAAoB,oBAAI,IAAI,CAAC,SAAS,UAAU,OAAO,CAAC;AAE9D,MAAM,2BAA2B;AAEjC,MAAM,gBAAgB;AAEtB,SAAS,SAAS,KAAa,SAAiB,OAA8B;AAC5E,MAAI,CAAC,SAAS,CAAC,IAAI,WAAW,OAAO,EAAG,QAAO;AAC/C,QAAM,MAAM,IAAI,SAAS,GAAG,IAAI,MAAM;AACtC,SAAO,GAAG,GAAG,GAAG,GAAG,aAAa,KAAK;AACvC;AAEO,SAAS,WACd,KACA,OAAoD,CAAC,GAC7C;AACR,QAAM,UAAU,KAAK,WAAW;AAChC,QAAM,QAAQ,KAAK,UAAU,SAAY,gBAAgB,KAAK;AAE9D,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI,IAAI,WAAW,SAAS,GAAG;AAC7B,WAAO,SAAS,IAAI,QAAQ,WAAW,OAAO,GAAG,SAAS,KAAK;AAAA,EACjE;AACA,MAAI,IAAI,WAAW,aAAa,GAAG;AACjC,WAAO;AAAA,EACT;AACA,MAAI;AACF,UAAM,SAAS,IAAI,IAAI,GAAG;AAC1B,QAAI,CAAC,kBAAkB,IAAI,OAAO,QAAQ,EAAG,QAAO;AAEpD,QAAI,yBAAyB,KAAK,OAAO,QAAQ,GAAG;AAClD,YAAM,QAAQ,OAAO,SAAS,MAAM,eAAe;AACnD,UAAI,MAAO,QAAO,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC,IAAI,SAAS,KAAK;AAAA,IACpE;AAAA,EACF,QAAQ;AACN,WAAO;AAAA,EACT;AACA,SAAO;AACT;","names":[]}
@@ -1,4 +1,7 @@
1
1
  declare const DEFAULT_GATEWAY = "https://gateway.pinata.cloud/ipfs/";
2
- declare function ipfsToHttp(uri: string | null | undefined, gateway?: string): string;
2
+ declare function ipfsToHttp(uri: string | null | undefined, opts?: {
3
+ gateway?: string;
4
+ width?: number | null;
5
+ }): string;
3
6
 
4
7
  export { DEFAULT_GATEWAY, ipfsToHttp };
@@ -1,4 +1,7 @@
1
1
  declare const DEFAULT_GATEWAY = "https://gateway.pinata.cloud/ipfs/";
2
- declare function ipfsToHttp(uri: string | null | undefined, gateway?: string): string;
2
+ declare function ipfsToHttp(uri: string | null | undefined, opts?: {
3
+ gateway?: string;
4
+ width?: number | null;
5
+ }): string;
3
6
 
4
7
  export { DEFAULT_GATEWAY, ipfsToHttp };
@@ -1,10 +1,18 @@
1
1
  const DEFAULT_GATEWAY = "https://gateway.pinata.cloud/ipfs/";
2
2
  const ALLOWED_PROTOCOLS = /* @__PURE__ */ new Set(["http:", "https:", "ipfs:"]);
3
3
  const KNOWN_IPFS_GATEWAY_HOSTS = /(^|\.)(mypinata\.cloud|pinata\.cloud|ipfs\.io|dweb\.link|cloudflare-ipfs\.com|nftstorage\.link|w3s\.link)$/i;
4
- function ipfsToHttp(uri, gateway = DEFAULT_GATEWAY) {
4
+ const DEFAULT_WIDTH = 1200;
5
+ function withSize(url, gateway, width) {
6
+ if (!width || !url.startsWith(gateway)) return url;
7
+ const sep = url.includes("?") ? "&" : "?";
8
+ return `${url}${sep}img-width=${width}&img-format=webp&img-quality=80`;
9
+ }
10
+ function ipfsToHttp(uri, opts = {}) {
11
+ const gateway = opts.gateway ?? DEFAULT_GATEWAY;
12
+ const width = opts.width === void 0 ? DEFAULT_WIDTH : opts.width;
5
13
  if (!uri) return "";
6
14
  if (uri.startsWith("ipfs://")) {
7
- return uri.replace("ipfs://", gateway);
15
+ return withSize(uri.replace("ipfs://", gateway), gateway, width);
8
16
  }
9
17
  if (uri.startsWith("data:image/")) {
10
18
  return uri;
@@ -14,7 +22,7 @@ function ipfsToHttp(uri, gateway = DEFAULT_GATEWAY) {
14
22
  if (!ALLOWED_PROTOCOLS.has(parsed.protocol)) return "";
15
23
  if (KNOWN_IPFS_GATEWAY_HOSTS.test(parsed.hostname)) {
16
24
  const match = parsed.pathname.match(/\/ipfs\/(.+)$/);
17
- if (match) return `${gateway}${match[1]}`;
25
+ if (match) return withSize(`${gateway}${match[1]}`, gateway, width);
18
26
  }
19
27
  } catch {
20
28
  return "";
@@ -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\nexport function ipfsToHttp(\n uri: string | null | undefined,\n gateway = DEFAULT_GATEWAY\n): string {\n if (!uri) return \"\";\n if (uri.startsWith(\"ipfs://\")) {\n return uri.replace(\"ipfs://\", gateway);\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 `${gateway}${match[1]}`;\n }\n } catch {\n return \"\";\n }\n return uri;\n}\n"],"mappings":"AAAO,MAAM,kBAAkB;AAE/B,MAAM,oBAAoB,oBAAI,IAAI,CAAC,SAAS,UAAU,OAAO,CAAC;AAE9D,MAAM,2BAA2B;AAE1B,SAAS,WACd,KACA,UAAU,iBACF;AACR,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI,IAAI,WAAW,SAAS,GAAG;AAC7B,WAAO,IAAI,QAAQ,WAAW,OAAO;AAAA,EACvC;AACA,MAAI,IAAI,WAAW,aAAa,GAAG;AACjC,WAAO;AAAA,EACT;AACA,MAAI;AACF,UAAM,SAAS,IAAI,IAAI,GAAG;AAC1B,QAAI,CAAC,kBAAkB,IAAI,OAAO,QAAQ,EAAG,QAAO;AAEpD,QAAI,yBAAyB,KAAK,OAAO,QAAQ,GAAG;AAClD,YAAM,QAAQ,OAAO,SAAS,MAAM,eAAe;AACnD,UAAI,MAAO,QAAO,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;AAAA,IACzC;AAAA,EACF,QAAQ;AACN,WAAO;AAAA,EACT;AACA,SAAO;AACT;","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"],"mappings":"AAAO,MAAM,kBAAkB;AAE/B,MAAM,oBAAoB,oBAAI,IAAI,CAAC,SAAS,UAAU,OAAO,CAAC;AAE9D,MAAM,2BAA2B;AAEjC,MAAM,gBAAgB;AAEtB,SAAS,SAAS,KAAa,SAAiB,OAA8B;AAC5E,MAAI,CAAC,SAAS,CAAC,IAAI,WAAW,OAAO,EAAG,QAAO;AAC/C,QAAM,MAAM,IAAI,SAAS,GAAG,IAAI,MAAM;AACtC,SAAO,GAAG,GAAG,GAAG,GAAG,aAAa,KAAK;AACvC;AAEO,SAAS,WACd,KACA,OAAoD,CAAC,GAC7C;AACR,QAAM,UAAU,KAAK,WAAW;AAChC,QAAM,QAAQ,KAAK,UAAU,SAAY,gBAAgB,KAAK;AAE9D,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI,IAAI,WAAW,SAAS,GAAG;AAC7B,WAAO,SAAS,IAAI,QAAQ,WAAW,OAAO,GAAG,SAAS,KAAK;AAAA,EACjE;AACA,MAAI,IAAI,WAAW,aAAa,GAAG;AACjC,WAAO;AAAA,EACT;AACA,MAAI;AACF,UAAM,SAAS,IAAI,IAAI,GAAG;AAC1B,QAAI,CAAC,kBAAkB,IAAI,OAAO,QAAQ,EAAG,QAAO;AAEpD,QAAI,yBAAyB,KAAK,OAAO,QAAQ,GAAG;AAClD,YAAM,QAAQ,OAAO,SAAS,MAAM,eAAe;AACnD,UAAI,MAAO,QAAO,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC,IAAI,SAAS,KAAK;AAAA,IACpE;AAAA,EACF,QAAQ;AACN,WAAO;AAAA,EACT;AACA,SAAO;AACT;","names":[]}