@medialane/ui 0.397.0 → 0.398.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.
- package/dist/components/account/add-guardian-dialog.cjs +3 -2
- package/dist/components/account/add-guardian-dialog.cjs.map +1 -1
- package/dist/components/account/add-guardian-dialog.js +3 -2
- package/dist/components/account/add-guardian-dialog.js.map +1 -1
- package/dist/components/alert.d.cts +1 -1
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/approve-mint-dialog.cjs +7 -7
- package/dist/components/approve-mint-dialog.cjs.map +1 -1
- package/dist/components/approve-mint-dialog.js +7 -7
- package/dist/components/approve-mint-dialog.js.map +1 -1
- package/dist/components/asset-picker.cjs +5 -5
- package/dist/components/asset-picker.cjs.map +1 -1
- package/dist/components/asset-picker.js +5 -5
- package/dist/components/asset-picker.js.map +1 -1
- package/dist/components/asset-search-picker.cjs +1 -1
- package/dist/components/asset-search-picker.cjs.map +1 -1
- package/dist/components/asset-search-picker.js +1 -1
- package/dist/components/asset-search-picker.js.map +1 -1
- package/dist/components/badge.d.cts +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.d.cts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/coin-launch-preview.cjs +1 -1
- package/dist/components/coin-launch-preview.cjs.map +1 -1
- package/dist/components/coin-launch-preview.js +1 -1
- package/dist/components/coin-launch-preview.js.map +1 -1
- package/dist/components/create-aside.cjs +140 -0
- package/dist/components/create-aside.cjs.map +1 -0
- package/dist/components/create-aside.d.cts +101 -0
- package/dist/components/create-aside.d.ts +101 -0
- package/dist/components/create-aside.js +133 -0
- package/dist/components/create-aside.js.map +1 -0
- package/dist/components/create-sponsorship-aside.cjs +1 -1
- package/dist/components/create-sponsorship-aside.cjs.map +1 -1
- package/dist/components/create-sponsorship-aside.js +1 -1
- package/dist/components/create-sponsorship-aside.js.map +1 -1
- package/dist/components/drop/create/asset-editor.cjs +38 -33
- package/dist/components/drop/create/asset-editor.cjs.map +1 -1
- package/dist/components/drop/create/asset-editor.js +39 -34
- package/dist/components/drop/create/asset-editor.js.map +1 -1
- package/dist/components/drop/create/assets-panel.cjs +9 -9
- package/dist/components/drop/create/assets-panel.cjs.map +1 -1
- package/dist/components/drop/create/assets-panel.js +9 -9
- package/dist/components/drop/create/assets-panel.js.map +1 -1
- package/dist/components/drop/create/collection-panel.cjs +20 -8
- package/dist/components/drop/create/collection-panel.cjs.map +1 -1
- package/dist/components/drop/create/collection-panel.js +21 -9
- package/dist/components/drop/create/collection-panel.js.map +1 -1
- package/dist/components/drop/create/drop-create.cjs +2 -2
- package/dist/components/drop/create/drop-create.cjs.map +1 -1
- package/dist/components/drop/create/drop-create.js +2 -2
- package/dist/components/drop/create/drop-create.js.map +1 -1
- package/dist/components/drop/create/drop-fields.cjs +4 -5
- package/dist/components/drop/create/drop-fields.cjs.map +1 -1
- package/dist/components/drop/create/drop-fields.js +4 -5
- package/dist/components/drop/create/drop-fields.js.map +1 -1
- package/dist/components/drop/create/launch-dialog.cjs +1 -1
- package/dist/components/drop/create/launch-dialog.cjs.map +1 -1
- package/dist/components/drop/create/launch-dialog.js +1 -1
- package/dist/components/drop/create/launch-dialog.js.map +1 -1
- package/dist/components/drop/create/settings-panel.cjs +1 -1
- package/dist/components/drop/create/settings-panel.cjs.map +1 -1
- package/dist/components/drop/create/settings-panel.js +1 -1
- package/dist/components/drop/create/settings-panel.js.map +1 -1
- package/dist/components/external-link-field.cjs +1 -2
- package/dist/components/external-link-field.cjs.map +1 -1
- package/dist/components/external-link-field.js +2 -3
- package/dist/components/external-link-field.js.map +1 -1
- package/dist/components/fast-mint/asset-form-parts.d.cts +2 -0
- package/dist/components/fast-mint/asset-form-parts.d.ts +2 -0
- package/dist/components/fast-mint/collection-section.cjs +8 -9
- package/dist/components/fast-mint/collection-section.cjs.map +1 -1
- package/dist/components/fast-mint/collection-section.d.cts +2 -2
- package/dist/components/fast-mint/collection-section.d.ts +2 -2
- package/dist/components/fast-mint/collection-section.js +8 -9
- package/dist/components/fast-mint/collection-section.js.map +1 -1
- package/dist/components/fast-mint/create-then-add.cjs +4 -5
- package/dist/components/fast-mint/create-then-add.cjs.map +1 -1
- package/dist/components/fast-mint/create-then-add.d.cts +2 -3
- package/dist/components/fast-mint/create-then-add.d.ts +2 -3
- package/dist/components/fast-mint/create-then-add.js +4 -5
- package/dist/components/fast-mint/create-then-add.js.map +1 -1
- package/dist/components/fast-mint/dropzone.cjs +8 -1
- package/dist/components/fast-mint/dropzone.cjs.map +1 -1
- package/dist/components/fast-mint/dropzone.js +8 -1
- package/dist/components/fast-mint/dropzone.js.map +1 -1
- package/dist/components/fast-mint/fast-mint.cjs +25 -16
- package/dist/components/fast-mint/fast-mint.cjs.map +1 -1
- package/dist/components/fast-mint/fast-mint.js +25 -16
- package/dist/components/fast-mint/fast-mint.js.map +1 -1
- package/dist/components/fast-mint/formats/nft.cjs +12 -12
- package/dist/components/fast-mint/formats/nft.cjs.map +1 -1
- package/dist/components/fast-mint/formats/nft.d.cts +2 -0
- package/dist/components/fast-mint/formats/nft.d.ts +2 -0
- package/dist/components/fast-mint/formats/nft.js +12 -12
- package/dist/components/fast-mint/formats/nft.js.map +1 -1
- package/dist/components/fast-mint/formats/pop.cjs +4 -4
- package/dist/components/fast-mint/formats/pop.cjs.map +1 -1
- package/dist/components/fast-mint/formats/pop.d.cts +2 -0
- package/dist/components/fast-mint/formats/pop.d.ts +2 -0
- package/dist/components/fast-mint/formats/pop.js +4 -4
- package/dist/components/fast-mint/formats/pop.js.map +1 -1
- package/dist/components/fast-mint/formats/registry.d.cts +2 -0
- package/dist/components/fast-mint/formats/registry.d.ts +2 -0
- package/dist/components/fast-mint/formats/tiers.cjs +25 -16
- package/dist/components/fast-mint/formats/tiers.cjs.map +1 -1
- package/dist/components/fast-mint/formats/tiers.d.cts +2 -0
- package/dist/components/fast-mint/formats/tiers.d.ts +2 -0
- package/dist/components/fast-mint/formats/tiers.js +25 -16
- package/dist/components/fast-mint/formats/tiers.js.map +1 -1
- package/dist/components/fast-mint/formats/types.cjs.map +1 -1
- package/dist/components/fast-mint/formats/types.d.cts +3 -1
- package/dist/components/fast-mint/formats/types.d.ts +3 -1
- package/dist/components/fast-mint/formats/types.js.map +1 -1
- package/dist/components/fast-mint/ip-type-section.cjs +2 -2
- package/dist/components/fast-mint/ip-type-section.cjs.map +1 -1
- package/dist/components/fast-mint/ip-type-section.js +2 -2
- package/dist/components/fast-mint/ip-type-section.js.map +1 -1
- package/dist/components/fast-mint/success-view.d.cts +2 -0
- package/dist/components/fast-mint/success-view.d.ts +2 -0
- package/dist/components/image-upload-field.cjs +2 -3
- package/dist/components/image-upload-field.cjs.map +1 -1
- package/dist/components/image-upload-field.d.cts +2 -2
- package/dist/components/image-upload-field.d.ts +2 -2
- package/dist/components/image-upload-field.js +2 -3
- package/dist/components/image-upload-field.js.map +1 -1
- package/dist/components/ip-type-fields.cjs +7 -6
- package/dist/components/ip-type-fields.cjs.map +1 -1
- package/dist/components/ip-type-fields.js +7 -6
- package/dist/components/ip-type-fields.js.map +1 -1
- package/dist/components/launchpad/coin-create.cjs +2 -2
- package/dist/components/launchpad/coin-create.cjs.map +1 -1
- package/dist/components/launchpad/coin-create.js +2 -2
- package/dist/components/launchpad/coin-create.js.map +1 -1
- package/dist/components/launchpad/collection-create-form.cjs +11 -12
- package/dist/components/launchpad/collection-create-form.cjs.map +1 -1
- package/dist/components/launchpad/collection-create-form.js +11 -12
- package/dist/components/launchpad/collection-create-form.js.map +1 -1
- package/dist/components/launchpad/collection-create-presets.cjs +31 -37
- package/dist/components/launchpad/collection-create-presets.cjs.map +1 -1
- package/dist/components/launchpad/collection-create-presets.d.cts +0 -3
- package/dist/components/launchpad/collection-create-presets.d.ts +0 -3
- package/dist/components/launchpad/collection-create-presets.js +31 -37
- package/dist/components/launchpad/collection-create-presets.js.map +1 -1
- package/dist/components/launchpad/edition-mint-fields.cjs +13 -22
- package/dist/components/launchpad/edition-mint-fields.cjs.map +1 -1
- package/dist/components/launchpad/edition-mint-fields.d.cts +1 -0
- package/dist/components/launchpad/edition-mint-fields.d.ts +1 -0
- package/dist/components/launchpad/edition-mint-fields.js +14 -23
- package/dist/components/launchpad/edition-mint-fields.js.map +1 -1
- package/dist/components/launchpad/edition-mint-schema.cjs +5 -4
- package/dist/components/launchpad/edition-mint-schema.cjs.map +1 -1
- package/dist/components/launchpad/edition-mint-schema.js +5 -4
- package/dist/components/launchpad/edition-mint-schema.js.map +1 -1
- package/dist/components/launchpad/edition-mint.cjs +16 -14
- package/dist/components/launchpad/edition-mint.cjs.map +1 -1
- package/dist/components/launchpad/edition-mint.js +16 -14
- package/dist/components/launchpad/edition-mint.js.map +1 -1
- package/dist/components/launchpad/pop-create-fields.cjs +34 -39
- package/dist/components/launchpad/pop-create-fields.cjs.map +1 -1
- package/dist/components/launchpad/pop-create-fields.d.cts +1 -0
- package/dist/components/launchpad/pop-create-fields.d.ts +1 -0
- package/dist/components/launchpad/pop-create-fields.js +34 -39
- package/dist/components/launchpad/pop-create-fields.js.map +1 -1
- package/dist/components/launchpad/pop-create-schema.cjs +2 -2
- package/dist/components/launchpad/pop-create-schema.cjs.map +1 -1
- package/dist/components/launchpad/pop-create-schema.js +2 -2
- package/dist/components/launchpad/pop-create-schema.js.map +1 -1
- package/dist/components/launchpad/pop-create.cjs +4 -4
- package/dist/components/launchpad/pop-create.cjs.map +1 -1
- package/dist/components/launchpad/pop-create.js +4 -4
- package/dist/components/launchpad/pop-create.js.map +1 -1
- package/dist/components/launchpad/remix-mint.cjs +32 -26
- package/dist/components/launchpad/remix-mint.cjs.map +1 -1
- package/dist/components/launchpad/remix-mint.js +32 -26
- package/dist/components/launchpad/remix-mint.js.map +1 -1
- package/dist/components/launchpad/single-edition-mint.cjs +27 -24
- package/dist/components/launchpad/single-edition-mint.cjs.map +1 -1
- package/dist/components/launchpad/single-edition-mint.js +27 -24
- package/dist/components/launchpad/single-edition-mint.js.map +1 -1
- package/dist/components/launchpad/sponsorship-create.cjs +17 -16
- package/dist/components/launchpad/sponsorship-create.cjs.map +1 -1
- package/dist/components/launchpad/sponsorship-create.js +17 -16
- package/dist/components/launchpad/sponsorship-create.js.map +1 -1
- package/dist/components/launchpad/tier-mint-form.cjs +8 -16
- package/dist/components/launchpad/tier-mint-form.cjs.map +1 -1
- package/dist/components/launchpad/tier-mint-form.js +8 -16
- package/dist/components/launchpad/tier-mint-form.js.map +1 -1
- package/dist/components/launchpad/tier-mint-presets.cjs +21 -17
- package/dist/components/launchpad/tier-mint-presets.cjs.map +1 -1
- package/dist/components/launchpad/tier-mint-presets.d.cts +2 -0
- package/dist/components/launchpad/tier-mint-presets.d.ts +2 -0
- package/dist/components/launchpad/tier-mint-presets.js +21 -17
- package/dist/components/launchpad/tier-mint-presets.js.map +1 -1
- package/dist/components/license-terms-builder.cjs +4 -4
- package/dist/components/license-terms-builder.cjs.map +1 -1
- package/dist/components/license-terms-builder.js +4 -4
- package/dist/components/license-terms-builder.js.map +1 -1
- package/dist/components/medialane-collection-card.cjs +1 -1
- package/dist/components/medialane-collection-card.cjs.map +1 -1
- package/dist/components/medialane-collection-card.js +1 -1
- package/dist/components/medialane-collection-card.js.map +1 -1
- package/dist/components/report-dialog.cjs +3 -3
- package/dist/components/report-dialog.cjs.map +1 -1
- package/dist/components/report-dialog.js +3 -3
- package/dist/components/report-dialog.js.map +1 -1
- package/dist/components/transaction-dialog.cjs +2 -2
- package/dist/components/transaction-dialog.cjs.map +1 -1
- package/dist/components/transaction-dialog.js +2 -2
- package/dist/components/transaction-dialog.js.map +1 -1
- package/dist/components/transfer-dialog.cjs +2 -1
- package/dist/components/transfer-dialog.cjs.map +1 -1
- package/dist/components/transfer-dialog.js +2 -1
- package/dist/components/transfer-dialog.js.map +1 -1
- package/dist/components/wallet/export-key-section.cjs +3 -2
- package/dist/components/wallet/export-key-section.cjs.map +1 -1
- package/dist/components/wallet/export-key-section.js +3 -2
- package/dist/components/wallet/export-key-section.js.map +1 -1
- package/dist/data/ip-templates.cjs +3 -3
- package/dist/data/ip-templates.cjs.map +1 -1
- package/dist/data/ip-templates.js +3 -3
- package/dist/data/ip-templates.js.map +1 -1
- package/dist/data/launchpad-services.cjs +21 -21
- package/dist/data/launchpad-services.cjs.map +1 -1
- package/dist/data/launchpad-services.js +21 -21
- package/dist/data/launchpad-services.js.map +1 -1
- package/dist/data/nav-commands.cjs +5 -5
- package/dist/data/nav-commands.cjs.map +1 -1
- package/dist/data/nav-commands.js +5 -5
- package/dist/data/nav-commands.js.map +1 -1
- package/dist/i18n/catalog/pt.cjs +276 -200
- package/dist/i18n/catalog/pt.cjs.map +1 -1
- package/dist/i18n/catalog/pt.js +276 -200
- package/dist/i18n/catalog/pt.js.map +1 -1
- package/dist/i18n/tools/scan.cjs +47 -2
- package/dist/i18n/tools/scan.cjs.map +1 -1
- package/dist/i18n/tools/scan.d.cts +6 -1
- package/dist/i18n/tools/scan.d.ts +6 -1
- package/dist/i18n/tools/scan.js +45 -1
- package/dist/i18n/tools/scan.js.map +1 -1
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/drop/draft.cjs +3 -3
- package/dist/utils/drop/draft.cjs.map +1 -1
- package/dist/utils/drop/draft.js +3 -3
- package/dist/utils/drop/draft.js.map +1 -1
- package/dist/utils/ipfs-upload.cjs +10 -1
- package/dist/utils/ipfs-upload.cjs.map +1 -1
- package/dist/utils/ipfs-upload.d.cts +2 -1
- package/dist/utils/ipfs-upload.d.ts +2 -1
- package/dist/utils/ipfs-upload.js +10 -2
- package/dist/utils/ipfs-upload.js.map +1 -1
- package/dist/utils/launchpad-rules.cjs +4 -3
- package/dist/utils/launchpad-rules.cjs.map +1 -1
- package/dist/utils/launchpad-rules.d.cts +1 -1
- package/dist/utils/launchpad-rules.d.ts +1 -1
- package/dist/utils/launchpad-rules.js +4 -3
- package/dist/utils/launchpad-rules.js.map +1 -1
- package/dist/utils/order-form.cjs +3 -2
- package/dist/utils/order-form.cjs.map +1 -1
- package/dist/utils/order-form.js +3 -2
- package/dist/utils/order-form.js.map +1 -1
- package/dist/utils/upload-limits.cjs +10 -4
- package/dist/utils/upload-limits.cjs.map +1 -1
- package/dist/utils/upload-limits.d.cts +2 -1
- package/dist/utils/upload-limits.d.ts +2 -1
- package/dist/utils/upload-limits.js +11 -5
- package/dist/utils/upload-limits.js.map +1 -1
- package/dist/utils/use-file-upload.cjs +1 -1
- package/dist/utils/use-file-upload.cjs.map +1 -1
- package/dist/utils/use-file-upload.d.cts +2 -1
- package/dist/utils/use-file-upload.d.ts +2 -1
- package/dist/utils/use-file-upload.js +1 -1
- package/dist/utils/use-file-upload.js.map +1 -1
- package/dist/utils/use-image-upload.d.cts +1 -0
- package/dist/utils/use-image-upload.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { 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 { gatewayChain, gatewayFallbackSrc, installIpfsGatewayFallback, PUBLIC_IMAGE_GATEWAYS } from \"./utils/ipfs-gateway-fallback.js\";\nexport { IpfsGatewayFallback } from \"./components/ipfs-gateway-fallback.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 { 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 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 AssetKind, type AssetMarketContext, type AssetMarketActions } from \"./components/asset-page.js\";\nexport { AssetCommentsDialog, type AssetCommentsDialogProps } 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 { fireConfetti } from \"./utils/media-wallet/confetti.js\";\nexport { useConfetti } from \"./utils/use-confetti.js\";\nexport { useOnOpen } from \"./utils/use-on-open.js\";\nexport { useCoinGuarantees } from \"./utils/use-coin-guarantees.js\";\nexport { useCoinSupply } from \"./utils/use-coin-supply.js\";\nexport { BRAND, BRAND_COLOR } 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 { PageHeader, PageHeaderSkeleton } from \"./components/page-header.js\";\nexport type { PageHeaderProps } from \"./components/page-header.js\";\nexport { PageState, PageStateSkeleton } from \"./components/page-state.js\";\nexport type { PageStateProps } from \"./components/page-state.js\";\nexport { SectionHeading } from \"./components/section-heading.js\";\nexport type { SectionHeadingProps } from \"./components/section-heading.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, CoinsPage,\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 { CollectionShowcase } from \"./components/collection-showcase.js\";\nexport type { CollectionShowcaseProps } from \"./components/collection-showcase.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 { ListingsGrid, type ListingsGridProps } from \"./components/listings-grid.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport {\n MarketplaceTxLink,\n MarketplaceProcessingState,\n MarketplaceSignInGate,\n MarketplaceErrorState,\n MarketplaceDialogHero,\n OrderSummaryHero,\n CurrencyPicker,\n DurationPicker,\n ListingAssetSummary,\n MarketplaceConfirmStep,\n} from \"./components/marketplace-dialog-primitives.js\";\nexport { useSession, refreshSession, sessionEmail, fetchSession } from \"./utils/use-session.js\";\nexport { OrderFields } from \"./components/order-fields.js\";\nexport type { OrderFieldsProps } from \"./components/order-fields.js\";\nexport { LISTABLE_CURRENCIES, orderFormSchema, counterOfferFormSchema } from \"./utils/order-form.js\";\nexport type { OrderFormValues } from \"./utils/order-form.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 type { DraftAsset, DropDraft } from \"./utils/drop/draft.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 { MyDropsPage } from \"./components/drop/my-drops-page.js\";\nexport { DropDetailPage } from \"./components/drop/drop-detail-page.js\";\nexport { ActivitiesPage } from \"./components/activities-page.js\";\nexport { PopPage } from \"./components/pop-page.js\";\nexport { DropTokenLink } from \"./components/drop/drop-token-link.js\";\nexport type { DropPhase } from \"./utils/drop/view.js\";\nexport { DropCreate } 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 } from \"./components/medialane-app.js\";\nexport { ReportDialog } from \"./components/report-dialog.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, usdValueFor } from \"./utils/use-usd-prices.js\";\nexport type { UsdPrices } from \"./utils/use-usd-prices.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\n\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverActivityStrip } from \"./components/discover-feed-section.js\";\nexport type { 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 type { LaunchpadGroupedSectionsProps, LaunchpadServiceCardProps, ServiceOverride, ServiceOverrides } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_ROUTE_OVERRIDES } from \"./components/launchpad-services.js\";\nexport { COLLECTION_NAME_CLAIM, LAUNCHPAD_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS, getLaunchpadService } 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 { PortfolioOrders, type PortfolioOrdersView, type PortfolioOrderActions, type UsePortfolioOrderActions } from \"./components/portfolio-orders.js\";\nexport { ArchiveAssetDialog, type ArchiveAssetDialogProps } from \"./components/archive-asset-dialog.js\";\nexport { PortfolioAssets, type PortfolioAssetActions, type UsePortfolioAssetActions } from \"./components/portfolio-assets.js\";\nexport { PortfolioShell, PORTFOLIO_TABS, type PortfolioTab } from \"./components/portfolio-shell.js\";\nexport { SoulboundCard, issuedAt } from \"./components/soulbound-card.js\";\nexport type { SoulboundCardProps } from \"./components/soulbound-card.js\";\nexport { RewardsPage } from \"./components/rewards-page.js\";\nexport { JourneyContent } from \"./components/journey-content.js\";\nexport { PortfolioSnapshot, RewardsSnapshot } from \"./components/settings-snapshots.js\";\nexport { RouteError } from \"./components/route-error.js\";\nexport { CreateSponsorshipAside } from \"./components/create-sponsorship-aside.js\";\nexport { AccountLoading, ActivitiesLoading, CollectionLoading, CollectionsLoading, CreatorLoading, IpTypeLoading, MarketplaceLoading, PortfolioLoading } from \"./components/page-skeletons.js\";\nexport { RewardsDashboard, REWARD_ACTION_LABELS } from \"./components/rewards/rewards-dashboard.js\";\nexport { LeaderboardPanel, type LeaderboardPanelProps } from \"./components/rewards/leaderboard-panel.js\";\nexport { CollectionNameClaim } from \"./components/collection-name-claim.js\";\nexport { CollectionSettings } from \"./components/collection-settings.js\";\nexport { MintLanding, type MintLandingCopy } from \"./components/mint-landing.js\";\nexport { ApproveMintDialog, type ApproveMintDialogProps } from \"./components/approve-mint-dialog.js\";\nexport { DiscoverPage, type DiscoverPageProps } from \"./components/discover-page.js\";\nexport { DiscoverCommunitySection } from \"./components/discover-community-section.js\";\nexport { IpTypeNav } from \"./components/ip-type-nav.js\";\nexport { HomePage, FeaturedListings, type HomePageProps } from \"./components/home-page.js\";\nexport { AccountsPage } from \"./components/accounts-page.js\";\nexport { BackButton } from \"./components/back-button.js\";\nexport type { BackButtonProps } from \"./components/back-button.js\";\nexport { SignInPrompt } from \"./components/sign-in-prompt.js\";\nexport { LaunchpadPage, type LaunchpadPageProps } from \"./components/launchpad-page.js\";\nexport { RemixBrowsePage } from \"./components/remix-browse-page.js\";\nexport { ServiceCollectionsPage } from \"./components/service-collections-page.js\";\nexport { EditionsPage } from \"./components/editions-page.js\";\nexport { DropsPage } from \"./components/drops-page.js\";\nexport { PopMyEventsPage } from \"./components/pop-my-events-page.js\";\nexport { CreatorPage, type CreatorPageProps } from \"./components/creator-page.js\";\nexport { AccountPage, type AccountPageProps } from \"./components/account-page.js\";\nexport { CancelOrderConfirm, type CancelOrderConfirmProps } from \"./components/cancel-order-confirm.js\";\nexport { UnderlineTabs, type UnderlineTab } from \"./components/underline-tabs.js\";\nexport { MoreMenu } from \"./components/more-menu.js\";\nexport { LicenseRequestPage } from \"./components/license-request-page.js\";\nexport { orderUsd } from \"./utils/order-usd.js\";\nexport { getSeenOffers, markOffersAsSeen } from \"./utils/seen-offers.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 { PortfolioChipFilter } from \"./components/portfolio-chip-filter.js\";\nexport type {\n PortfolioChipFilterProps,\n PortfolioChipFilterOption,\n} from \"./components/portfolio-chip-filter.js\";\n\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\";\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 { 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 { useTransaction, isBusyPhase } from \"./utils/use-transaction.js\";\nexport type { TransactionPhase } from \"./utils/use-transaction.js\";\nexport { RewardEarned } 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 } from \"./components/action-button.js\";\n\nexport { CoinLaunchPreview } from \"./components/coin-launch-preview.js\";\nexport type { CoinPreviewData } from \"./components/coin-launch-preview.js\";\nexport { CollectionCreateForm } from \"./components/launchpad/collection-create-form.js\";\nexport type { CollectionCreateFormProps } from \"./components/launchpad/collection-create-form.js\";\nexport { CLUB_PRESET, TICKETS_PRESET, EDITIONS_PRESET, SINGLE_PRESET } from \"./components/launchpad/collection-create-presets.js\";\nexport type { CollectionCreatePreset } from \"./components/launchpad/collection-create-presets.js\";\nexport { TierMintForm } from \"./components/launchpad/tier-mint-form.js\";\nexport type { TierMintFormProps } from \"./components/launchpad/tier-mint-form.js\";\nexport { CLUB_TIER_PRESET, TICKETS_TIER_PRESET } from \"./components/launchpad/tier-mint-presets.js\";\nexport type { TierMintPreset } from \"./components/launchpad/tier-mint-presets.js\";\nexport { SingleEditionMint } from \"./components/launchpad/single-edition-mint.js\";\nexport { CollectionPicker } from \"./components/launchpad/collection-picker.js\";\nexport type { CollectionPickerProps } from \"./components/launchpad/collection-picker.js\";\nexport { EditionMint } from \"./components/launchpad/edition-mint.js\";\nexport { RemixMint } from \"./components/launchpad/remix-mint.js\";\nexport { IpTypePage } from \"./components/ip-type-page.js\";\nexport type { IpTypePageProps } from \"./components/ip-type-page.js\";\nexport { CollectionsPage } from \"./components/collections-page.js\";\nexport { SponsorshipCreate } from \"./components/launchpad/sponsorship-create.js\";\nexport { PopCreate } from \"./components/launchpad/pop-create.js\";\nexport { PopClaimButton } from \"./components/pop-claim-button.js\";\nexport { PopBurnButton } from \"./components/pop-burn-button.js\";\nexport { PopManagePage } from \"./components/pop-manage-page.js\";\nexport { CommentsSection } from \"./components/comments-section.js\";\nexport type { CommentsSectionProps } from \"./components/comments-section.js\";\nexport type { PopBurnButtonProps } from \"./components/pop-burn-button.js\";\nexport { SponsorshipOffersPage } from \"./components/sponsorship-offers-page.js\";\nexport { SponsorshipOfferPage } from \"./components/sponsorship-offer-page.js\";\nexport { PortfolioSponsorships } from \"./components/portfolio-sponsorships.js\";\nexport { TransferCollectionOwnership } from \"./components/transfer-collection-ownership.js\";\nexport type { TransferCollectionOwnershipProps } from \"./components/transfer-collection-ownership.js\";\nexport { CoinCreate } from \"./components/launchpad/coin-create.js\";\nexport type { CoinCreateProps } from \"./components/launchpad/coin-create.js\";\nexport { WalletRequired } from \"./components/wallet-required.js\";\nexport type { WalletRequiredProps } from \"./components/wallet-required.js\";\nexport { ClaimRouteShell } from \"./components/claim-route-shell.js\";\nexport { useImageUpload } from \"./utils/use-image-upload.js\";\nexport { useFileUpload } from \"./utils/use-file-upload.js\";\nexport type { FileUpload, FileUploadOptions, FileUploadStatus } from \"./utils/use-file-upload.js\";\nexport { ImageUploadField } from \"./components/image-upload-field.js\";\nexport type { ImageUploadFieldProps } from \"./components/image-upload-field.js\";\nexport { invalidatePortfolioCache } from \"./utils/portfolio-cache.js\";\nexport { TransactionDialog } from \"./components/transaction-dialog.js\";\nexport type { TransactionDialogProps } from \"./components/transaction-dialog.js\";\nexport { TransactionSuccess, DialogTransactionSuccess } from \"./components/transaction-success.js\";\nexport { TransactionDialogStates } from \"./components/transaction-dialog-states.js\";\nexport { TransferDialog } from \"./components/transfer-dialog.js\";\nexport { MarketplaceSearch, SearchInput } from \"./components/marketplace-search.js\";\nexport { ActiveFilters, FiltersButton, FiltersDialog, useMarketplaceFilters } from \"./components/marketplace-filters.js\";\nexport type { MarketplaceFilters } from \"./components/marketplace-filters.js\";\nexport { useDebouncedValue } from \"./utils/use-debounced-value.js\";\nexport type { TransferDialogProps } from \"./components/transfer-dialog.js\";\nexport type { TransactionDialogStatesProps } from \"./components/transaction-dialog-states.js\";\nexport type { TransactionSuccessProps, TransactionSuccessAction } from \"./components/transaction-success.js\";\nexport { successMessages } from \"./utils/success-messages.js\";\nexport { emptyMessages } from \"./utils/empty-messages.js\";\nexport type { EmptyMessage } from \"./utils/empty-messages.js\";\nexport type { SuccessMessage } from \"./utils/success-messages.js\";\nexport { MedialaneCollectionCard } from \"./components/medialane-collection-card.js\";\nexport type { MedialaneCollectionCardProps } from \"./components/medialane-collection-card.js\";\n\nexport { StatTile, StatPill, StatPillRow } from \"./components/stat-tile.js\";\nexport type { StatTileProps, StatPillProps, StatPillRowItem } from \"./components/stat-tile.js\";\n\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\";\n\nexport { Skeleton } from \"./components/skeleton.js\";\nexport { Badge, badgeVariants } from \"./components/badge.js\";\nexport type { BadgeProps } from \"./components/badge.js\";\nexport { Panel, Pill, panelTint, PANEL_INSET } from \"./components/panel.js\";\nexport { IconTile, type IconTileProps } from \"./components/icon-tile.js\";\nexport type { PanelProps, PanelColor, PillProps } from \"./components/panel.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 { NewCollectionMenu, CollectionTypeChoices, COLLECTION_TYPES } from \"./components/new-collection-menu.js\";\nexport { ExternalLinkField } from \"./components/external-link-field.js\";\nexport { PortfolioCollections } from \"./components/portfolio-collections.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 { 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 { formatActivity } 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, useCreatorByUsername } 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 { CollectionProvenanceTab } from \"./components/collection-provenance-tab.js\";\nexport type { CollectionProvenanceTabProps } from \"./components/collection-provenance-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 { useAccounts } from \"./utils/use-accounts.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 { useTokenRemixes } from \"./utils/use-remix-offers.js\";\nexport { useRemixOffers } from \"./utils/use-my-remix-offers.js\";\nexport { useSwapQuote, swapQuoteKey } from \"./utils/use-swap-quote.js\";\nexport { usePaymentOptions, pickPayment, PAYMENT_COINS, type PaymentOption } from \"./utils/use-payment-options.js\";\nexport { PurchasePanel, amountText, editionsAvailable, type PurchasePanelProps } from \"./components/purchase-panel.js\";\nexport type { SwapToken, SwapAmountMode, SwapQuoteSummary } from \"./utils/use-swap-quote.js\";\nexport { RemixesTab } from \"./components/remixes-tab.js\";\nexport type { RemixesTabProps } from \"./components/remixes-tab.js\";\n\nexport { DropCountdown } from \"./components/drop-countdown.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 { useToken, useTokenBalance, useTokenHistory, useTokensByOwner, useOwnedTokens } 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"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AkB;AAG3B,SAAS,qBAAqB;AAC9B;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,UAAU,iBAAiB,iBAAiB,kBAAkB,sBAAsB;AAC7F,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,SAAS,qBAA6D;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { 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 { gatewayChain, gatewayFallbackSrc, installIpfsGatewayFallback, PUBLIC_IMAGE_GATEWAYS } from \"./utils/ipfs-gateway-fallback.js\";\nexport { IpfsGatewayFallback } from \"./components/ipfs-gateway-fallback.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 { 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 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 AssetKind, type AssetMarketContext, type AssetMarketActions } from \"./components/asset-page.js\";\nexport { AssetCommentsDialog, type AssetCommentsDialogProps } 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 { fireConfetti } from \"./utils/media-wallet/confetti.js\";\nexport { useConfetti } from \"./utils/use-confetti.js\";\nexport { useOnOpen } from \"./utils/use-on-open.js\";\nexport { useCoinGuarantees } from \"./utils/use-coin-guarantees.js\";\nexport { useCoinSupply } from \"./utils/use-coin-supply.js\";\nexport { BRAND, BRAND_COLOR } 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 { PageHeader, PageHeaderSkeleton } from \"./components/page-header.js\";\nexport type { PageHeaderProps } from \"./components/page-header.js\";\nexport { PageState, PageStateSkeleton } from \"./components/page-state.js\";\nexport type { PageStateProps } from \"./components/page-state.js\";\nexport { SectionHeading } from \"./components/section-heading.js\";\nexport type { SectionHeadingProps } from \"./components/section-heading.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, CoinsPage,\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 { CollectionShowcase } from \"./components/collection-showcase.js\";\nexport type { CollectionShowcaseProps } from \"./components/collection-showcase.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 { ListingsGrid, type ListingsGridProps } from \"./components/listings-grid.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport {\n MarketplaceTxLink,\n MarketplaceProcessingState,\n MarketplaceSignInGate,\n MarketplaceErrorState,\n MarketplaceDialogHero,\n OrderSummaryHero,\n CurrencyPicker,\n DurationPicker,\n ListingAssetSummary,\n MarketplaceConfirmStep,\n} from \"./components/marketplace-dialog-primitives.js\";\nexport { useSession, refreshSession, sessionEmail, fetchSession } from \"./utils/use-session.js\";\nexport { OrderFields } from \"./components/order-fields.js\";\nexport type { OrderFieldsProps } from \"./components/order-fields.js\";\nexport { LISTABLE_CURRENCIES, orderFormSchema, counterOfferFormSchema } from \"./utils/order-form.js\";\nexport type { OrderFormValues } from \"./utils/order-form.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 type { DraftAsset, DropDraft } from \"./utils/drop/draft.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 { MyDropsPage } from \"./components/drop/my-drops-page.js\";\nexport { DropDetailPage } from \"./components/drop/drop-detail-page.js\";\nexport { ActivitiesPage } from \"./components/activities-page.js\";\nexport { PopPage } from \"./components/pop-page.js\";\nexport { DropTokenLink } from \"./components/drop/drop-token-link.js\";\nexport type { DropPhase } from \"./utils/drop/view.js\";\nexport { DropCreate } 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 } from \"./components/medialane-app.js\";\nexport { ReportDialog } from \"./components/report-dialog.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, usdValueFor } from \"./utils/use-usd-prices.js\";\nexport type { UsdPrices } from \"./utils/use-usd-prices.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\n\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverActivityStrip } from \"./components/discover-feed-section.js\";\nexport type { 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 type { LaunchpadGroupedSectionsProps, LaunchpadServiceCardProps, ServiceOverride, ServiceOverrides } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_ROUTE_OVERRIDES } from \"./components/launchpad-services.js\";\nexport { COLLECTION_NAME_CLAIM, LAUNCHPAD_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS, getLaunchpadService } 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 { PortfolioOrders, type PortfolioOrdersView, type PortfolioOrderActions, type UsePortfolioOrderActions } from \"./components/portfolio-orders.js\";\nexport { ArchiveAssetDialog, type ArchiveAssetDialogProps } from \"./components/archive-asset-dialog.js\";\nexport { PortfolioAssets, type PortfolioAssetActions, type UsePortfolioAssetActions } from \"./components/portfolio-assets.js\";\nexport { PortfolioShell, PORTFOLIO_TABS, type PortfolioTab } from \"./components/portfolio-shell.js\";\nexport { SoulboundCard, issuedAt } from \"./components/soulbound-card.js\";\nexport type { SoulboundCardProps } from \"./components/soulbound-card.js\";\nexport { RewardsPage } from \"./components/rewards-page.js\";\nexport { JourneyContent } from \"./components/journey-content.js\";\nexport { PortfolioSnapshot, RewardsSnapshot } from \"./components/settings-snapshots.js\";\nexport { RouteError } from \"./components/route-error.js\";\nexport { CreateSponsorshipAside } from \"./components/create-sponsorship-aside.js\";\nexport { CreateAside, CREATE_ASIDE_KINDS } from \"./components/create-aside.js\";\nexport type { CreateAsideKind } from \"./components/create-aside.js\";\nexport { AccountLoading, ActivitiesLoading, CollectionLoading, CollectionsLoading, CreatorLoading, IpTypeLoading, MarketplaceLoading, PortfolioLoading } from \"./components/page-skeletons.js\";\nexport { RewardsDashboard, REWARD_ACTION_LABELS } from \"./components/rewards/rewards-dashboard.js\";\nexport { LeaderboardPanel, type LeaderboardPanelProps } from \"./components/rewards/leaderboard-panel.js\";\nexport { CollectionNameClaim } from \"./components/collection-name-claim.js\";\nexport { CollectionSettings } from \"./components/collection-settings.js\";\nexport { MintLanding, type MintLandingCopy } from \"./components/mint-landing.js\";\nexport { ApproveMintDialog, type ApproveMintDialogProps } from \"./components/approve-mint-dialog.js\";\nexport { DiscoverPage, type DiscoverPageProps } from \"./components/discover-page.js\";\nexport { DiscoverCommunitySection } from \"./components/discover-community-section.js\";\nexport { IpTypeNav } from \"./components/ip-type-nav.js\";\nexport { HomePage, FeaturedListings, type HomePageProps } from \"./components/home-page.js\";\nexport { AccountsPage } from \"./components/accounts-page.js\";\nexport { BackButton } from \"./components/back-button.js\";\nexport type { BackButtonProps } from \"./components/back-button.js\";\nexport { SignInPrompt } from \"./components/sign-in-prompt.js\";\nexport { LaunchpadPage, type LaunchpadPageProps } from \"./components/launchpad-page.js\";\nexport { RemixBrowsePage } from \"./components/remix-browse-page.js\";\nexport { ServiceCollectionsPage } from \"./components/service-collections-page.js\";\nexport { EditionsPage } from \"./components/editions-page.js\";\nexport { DropsPage } from \"./components/drops-page.js\";\nexport { PopMyEventsPage } from \"./components/pop-my-events-page.js\";\nexport { CreatorPage, type CreatorPageProps } from \"./components/creator-page.js\";\nexport { AccountPage, type AccountPageProps } from \"./components/account-page.js\";\nexport { CancelOrderConfirm, type CancelOrderConfirmProps } from \"./components/cancel-order-confirm.js\";\nexport { UnderlineTabs, type UnderlineTab } from \"./components/underline-tabs.js\";\nexport { MoreMenu } from \"./components/more-menu.js\";\nexport { LicenseRequestPage } from \"./components/license-request-page.js\";\nexport { orderUsd } from \"./utils/order-usd.js\";\nexport { getSeenOffers, markOffersAsSeen } from \"./utils/seen-offers.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 { PortfolioChipFilter } from \"./components/portfolio-chip-filter.js\";\nexport type {\n PortfolioChipFilterProps,\n PortfolioChipFilterOption,\n} from \"./components/portfolio-chip-filter.js\";\n\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\";\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 { 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 { useTransaction, isBusyPhase } from \"./utils/use-transaction.js\";\nexport type { TransactionPhase } from \"./utils/use-transaction.js\";\nexport { RewardEarned } 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 } from \"./components/action-button.js\";\n\nexport { CoinLaunchPreview } from \"./components/coin-launch-preview.js\";\nexport type { CoinPreviewData } from \"./components/coin-launch-preview.js\";\nexport { CollectionCreateForm } from \"./components/launchpad/collection-create-form.js\";\nexport type { CollectionCreateFormProps } from \"./components/launchpad/collection-create-form.js\";\nexport { CLUB_PRESET, TICKETS_PRESET, EDITIONS_PRESET, SINGLE_PRESET } from \"./components/launchpad/collection-create-presets.js\";\nexport type { CollectionCreatePreset } from \"./components/launchpad/collection-create-presets.js\";\nexport { TierMintForm } from \"./components/launchpad/tier-mint-form.js\";\nexport type { TierMintFormProps } from \"./components/launchpad/tier-mint-form.js\";\nexport { CLUB_TIER_PRESET, TICKETS_TIER_PRESET } from \"./components/launchpad/tier-mint-presets.js\";\nexport type { TierMintPreset } from \"./components/launchpad/tier-mint-presets.js\";\nexport { SingleEditionMint } from \"./components/launchpad/single-edition-mint.js\";\nexport { CollectionPicker } from \"./components/launchpad/collection-picker.js\";\nexport type { CollectionPickerProps } from \"./components/launchpad/collection-picker.js\";\nexport { EditionMint } from \"./components/launchpad/edition-mint.js\";\nexport { RemixMint } from \"./components/launchpad/remix-mint.js\";\nexport { IpTypePage } from \"./components/ip-type-page.js\";\nexport type { IpTypePageProps } from \"./components/ip-type-page.js\";\nexport { CollectionsPage } from \"./components/collections-page.js\";\nexport { SponsorshipCreate } from \"./components/launchpad/sponsorship-create.js\";\nexport { PopCreate } from \"./components/launchpad/pop-create.js\";\nexport { PopClaimButton } from \"./components/pop-claim-button.js\";\nexport { PopBurnButton } from \"./components/pop-burn-button.js\";\nexport { PopManagePage } from \"./components/pop-manage-page.js\";\nexport { CommentsSection } from \"./components/comments-section.js\";\nexport type { CommentsSectionProps } from \"./components/comments-section.js\";\nexport type { PopBurnButtonProps } from \"./components/pop-burn-button.js\";\nexport { SponsorshipOffersPage } from \"./components/sponsorship-offers-page.js\";\nexport { SponsorshipOfferPage } from \"./components/sponsorship-offer-page.js\";\nexport { PortfolioSponsorships } from \"./components/portfolio-sponsorships.js\";\nexport { TransferCollectionOwnership } from \"./components/transfer-collection-ownership.js\";\nexport type { TransferCollectionOwnershipProps } from \"./components/transfer-collection-ownership.js\";\nexport { CoinCreate } from \"./components/launchpad/coin-create.js\";\nexport type { CoinCreateProps } from \"./components/launchpad/coin-create.js\";\nexport { WalletRequired } from \"./components/wallet-required.js\";\nexport type { WalletRequiredProps } from \"./components/wallet-required.js\";\nexport { ClaimRouteShell } from \"./components/claim-route-shell.js\";\nexport { useImageUpload } from \"./utils/use-image-upload.js\";\nexport { useFileUpload } from \"./utils/use-file-upload.js\";\nexport type { FileUpload, FileUploadOptions, FileUploadStatus } from \"./utils/use-file-upload.js\";\nexport { ImageUploadField } from \"./components/image-upload-field.js\";\nexport type { ImageUploadFieldProps } from \"./components/image-upload-field.js\";\nexport { invalidatePortfolioCache } from \"./utils/portfolio-cache.js\";\nexport { TransactionDialog } from \"./components/transaction-dialog.js\";\nexport type { TransactionDialogProps } from \"./components/transaction-dialog.js\";\nexport { TransactionSuccess, DialogTransactionSuccess } from \"./components/transaction-success.js\";\nexport { TransactionDialogStates } from \"./components/transaction-dialog-states.js\";\nexport { TransferDialog } from \"./components/transfer-dialog.js\";\nexport { MarketplaceSearch, SearchInput } from \"./components/marketplace-search.js\";\nexport { ActiveFilters, FiltersButton, FiltersDialog, useMarketplaceFilters } from \"./components/marketplace-filters.js\";\nexport type { MarketplaceFilters } from \"./components/marketplace-filters.js\";\nexport { useDebouncedValue } from \"./utils/use-debounced-value.js\";\nexport type { TransferDialogProps } from \"./components/transfer-dialog.js\";\nexport type { TransactionDialogStatesProps } from \"./components/transaction-dialog-states.js\";\nexport type { TransactionSuccessProps, TransactionSuccessAction } from \"./components/transaction-success.js\";\nexport { successMessages } from \"./utils/success-messages.js\";\nexport { emptyMessages } from \"./utils/empty-messages.js\";\nexport type { EmptyMessage } from \"./utils/empty-messages.js\";\nexport type { SuccessMessage } from \"./utils/success-messages.js\";\nexport { MedialaneCollectionCard } from \"./components/medialane-collection-card.js\";\nexport type { MedialaneCollectionCardProps } from \"./components/medialane-collection-card.js\";\n\nexport { StatTile, StatPill, StatPillRow } from \"./components/stat-tile.js\";\nexport type { StatTileProps, StatPillProps, StatPillRowItem } from \"./components/stat-tile.js\";\n\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\";\n\nexport { Skeleton } from \"./components/skeleton.js\";\nexport { Badge, badgeVariants } from \"./components/badge.js\";\nexport type { BadgeProps } from \"./components/badge.js\";\nexport { Panel, Pill, panelTint, PANEL_INSET } from \"./components/panel.js\";\nexport { IconTile, type IconTileProps } from \"./components/icon-tile.js\";\nexport type { PanelProps, PanelColor, PillProps } from \"./components/panel.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 { NewCollectionMenu, CollectionTypeChoices, COLLECTION_TYPES } from \"./components/new-collection-menu.js\";\nexport { ExternalLinkField } from \"./components/external-link-field.js\";\nexport { PortfolioCollections } from \"./components/portfolio-collections.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 { 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 { formatActivity } 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, useCreatorByUsername } 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 { CollectionProvenanceTab } from \"./components/collection-provenance-tab.js\";\nexport type { CollectionProvenanceTabProps } from \"./components/collection-provenance-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 { useAccounts } from \"./utils/use-accounts.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 { useTokenRemixes } from \"./utils/use-remix-offers.js\";\nexport { useRemixOffers } from \"./utils/use-my-remix-offers.js\";\nexport { useSwapQuote, swapQuoteKey } from \"./utils/use-swap-quote.js\";\nexport { usePaymentOptions, pickPayment, PAYMENT_COINS, type PaymentOption } from \"./utils/use-payment-options.js\";\nexport { PurchasePanel, amountText, editionsAvailable, type PurchasePanelProps } from \"./components/purchase-panel.js\";\nexport type { SwapToken, SwapAmountMode, SwapQuoteSummary } from \"./utils/use-swap-quote.js\";\nexport { RemixesTab } from \"./components/remixes-tab.js\";\nexport type { RemixesTabProps } from \"./components/remixes-tab.js\";\n\nexport { DropCountdown } from \"./components/drop-countdown.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 { useToken, useTokenBalance, useTokenHistory, useTokensByOwner, useOwnedTokens } 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":"AAAA,SAAS,UAAU;AACnB,SAAS,oBAAoB,mBAAmB,kBAAkB,WAAW,gBAAgB,0BAA0B;AACvH,SAAS,sBAAsB;AAC/B,SAAS,uBAAyE;AAClF,SAAS,YAA+B,uBAA6B;AACrE,SAAS,cAAc,oBAAoB,4BAA4B,6BAA6B;AACpG,SAAS,2BAA2B;AACpC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AACP,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,cAAc,wBAAwB;AAE/C;AAAA,EACE;AAAA,EAAU;AAAA,EAAe;AAAA,EAAmB;AAAA,EAC5C;AAAA,EAAqB;AAAA,OAChB;AAEP;AAAA,EACE;AAAA,EAAc;AAAA,EAAqB;AAAA,EAAsB;AAAA,EAAsB;AAAA,OAC1E;AAEP,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AAExC,SAAS,kBAAkB,kBAAkB,qBAAqB;AAClE,SAAS,sBAAsB;AAC/B,SAAS,wBAAoD;AAC7D,SAAS,qBAAsE;AAC/E,SAAS,WAAW,mBAAmB,uBAA8G;AAC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|
function assetErrors(a) {
|
|
91
91
|
const e = {};
|
|
92
|
-
if (!assetImage(a)) e.feature = { text: (0, import_translate.msg)("Add a
|
|
92
|
+
if (!assetImage(a)) e.feature = { text: (0, import_translate.msg)("Add a cover image") };
|
|
93
93
|
if (!(0, import_launchpad_rules.isPositiveInteger)(a.copies)) e.copies = { text: (0, import_translate.msg)("Enter 1 or more") };
|
|
94
94
|
const reserved = a.traits.map((t) => RESERVED.get(t.key.trim().toLowerCase())).find(Boolean);
|
|
95
95
|
if (reserved) e.traits = { text: (0, import_translate.msg)("{name} is set by the license terms"), vars: { name: reserved } };
|
|
@@ -104,8 +104,8 @@ function validateDropDraft(d, now) {
|
|
|
104
104
|
const e = assetErrors(a);
|
|
105
105
|
if (e) assets.byId[a.id] = e;
|
|
106
106
|
}
|
|
107
|
-
if (d.assets.length === 0) assets.list = { text: (0, import_translate.msg)("Add
|
|
108
|
-
else if (draftTokens(d) > import_metadata.MAX_DROP_SUPPLY) assets.list = { text: (0, import_translate.msg)("Up to {count}
|
|
107
|
+
if (d.assets.length === 0) assets.list = { text: (0, import_translate.msg)("Add a work") };
|
|
108
|
+
else if (draftTokens(d) > import_metadata.MAX_DROP_SUPPLY) assets.list = { text: (0, import_translate.msg)("Up to {count} copies"), vars: { count: (0, import_format.formatNumber)(import_metadata.MAX_DROP_SUPPLY) } };
|
|
109
109
|
const settings = { ...(0, import_sale.validateSale)(d.sale, now) };
|
|
110
110
|
if (d.listOnly) {
|
|
111
111
|
const list = (0, import_allowlist.parseAllowlist)(d.allowlist);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/drop/draft.ts"],"sourcesContent":["import { RESERVED_TRAITS } from \"@medialane/sdk\";\nimport { isPositiveInteger } from \"../launchpad-rules.js\";\nimport { suggestLaunchpadSymbol } from \"../launchpad-defaults.js\";\nimport { parseAllowlist } from \"./allowlist.js\";\nimport { MAX_DROP_SUPPLY, type DropLicense } from \"./metadata.js\";\nimport { EMPTY_SALE, validateSale, type SaleDraft, type SaleErrors } from \"./sale.js\";\nimport { formatNumber } from \"../../i18n/format.js\";\nimport { msg, type Phrase } from \"../../i18n/translate.js\";\nimport { detectMediaKind } from \"../../components/fast-mint/media-kind.js\";\nimport type { MediaKind } from \"../../components/fast-mint/types.js\";\n\nexport interface DraftTrait {\n key: string;\n value: string;\n}\n\nexport interface DraftAsset {\n id: string;\n file: File;\n feature: File | null;\n name: string;\n description: string;\n copies: string;\n traits: DraftTrait[];\n}\n\nexport interface DropDraft {\n collection: { name: string; description: string; externalUrl: string; cover: File | null };\n assets: DraftAsset[];\n mixOrder: boolean;\n sale: SaleDraft;\n listOnly: boolean;\n allowlist: string;\n license: DropLicense;\n gated: { enabled: boolean; title: string; url: string; type: string };\n}\n\nexport const EMPTY_DRAFT: DropDraft = {\n collection: { name: \"\", description: \"\", externalUrl: \"\", cover: null },\n assets: [],\n mixOrder: true,\n sale: EMPTY_SALE,\n listOnly: false,\n allowlist: \"\",\n license: {\n ipType: \"Art\", licenseType: \"CC BY-SA\", commercialUse: \"Yes\", derivatives: \"Share-Alike\",\n attribution: \"Required\", geographicScope: \"Worldwide\", aiPolicy: \"Allowed\", royalty: \"0\",\n },\n gated: { enabled: false, title: \"\", url: \"\", type: \"\" },\n};\n\nexport function newAsset(file: File): DraftAsset {\n return { id: crypto.randomUUID(), file, feature: null, name: \"\", description: \"\", copies: \"1\", traits: [] };\n}\n\nexport function assetKind(a: DraftAsset): MediaKind {\n return detectMediaKind(a.file.type) ?? \"document\";\n}\n\nexport function assetImage(a: DraftAsset): File | null {\n return assetKind(a) === \"image\" ? a.file : a.feature;\n}\n\nexport function dropSymbol(name: string): string {\n return suggestLaunchpadSymbol(name) || \"DROP\";\n}\n\nconst featureId = (a: DraftAsset) => `${a.id}:feature`;\n\nexport function assetUploads(assets: DraftAsset[]): { id: string; file: File }[] {\n return assets.flatMap((a) => [\n { id: a.id, file: a.file },\n ...(assetKind(a) !== \"image\" && a.feature ? [{ id: featureId(a), file: a.feature }] : []),\n ]);\n}\n\nexport function assetMedia(a: DraftAsset, uriOf: (id: string) => string | null): { imageUri: string; animationUrl: string | null } {\n if (assetKind(a) === \"image\") return { imageUri: uriOf(a.id)!, animationUrl: null };\n return { imageUri: uriOf(featureId(a))!, animationUrl: uriOf(a.id) };\n}\n\nexport function draftTokens(d: DropDraft): number {\n return d.assets.reduce((n, a) => n + (isPositiveInteger(a.copies) ? Number(a.copies) : 0), 0);\n}\n\nexport type DropPanel = \"collection\" | \"assets\" | \"settings\";\n\ntype AssetErrors = Partial<Record<\"copies\" | \"traits\" | \"feature\", Phrase>>;\n\nexport interface DropDraftErrors {\n collection: Partial<Record<\"name\" | \"externalUrl\", Phrase>>;\n assets: { list?: Phrase; byId: Record<string, AssetErrors> };\n settings: SaleErrors & Partial<Record<\"allowlist\" | \"gated\", Phrase>>;\n}\n\nconst HTTPS = /^https:\\/\\//;\nconst RESERVED = new Map([...RESERVED_TRAITS].map((t) => [t.toLowerCase(), t]));\n\nfunction assetErrors(a: DraftAsset): AssetErrors | null {\n const e: AssetErrors = {};\n if (!assetImage(a)) e.feature = { text: msg(\"Add a
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/drop/draft.ts"],"sourcesContent":["import { RESERVED_TRAITS } from \"@medialane/sdk\";\nimport { isPositiveInteger } from \"../launchpad-rules.js\";\nimport { suggestLaunchpadSymbol } from \"../launchpad-defaults.js\";\nimport { parseAllowlist } from \"./allowlist.js\";\nimport { MAX_DROP_SUPPLY, type DropLicense } from \"./metadata.js\";\nimport { EMPTY_SALE, validateSale, type SaleDraft, type SaleErrors } from \"./sale.js\";\nimport { formatNumber } from \"../../i18n/format.js\";\nimport { msg, type Phrase } from \"../../i18n/translate.js\";\nimport { detectMediaKind } from \"../../components/fast-mint/media-kind.js\";\nimport type { MediaKind } from \"../../components/fast-mint/types.js\";\n\nexport interface DraftTrait {\n key: string;\n value: string;\n}\n\nexport interface DraftAsset {\n id: string;\n file: File;\n feature: File | null;\n name: string;\n description: string;\n copies: string;\n traits: DraftTrait[];\n}\n\nexport interface DropDraft {\n collection: { name: string; description: string; externalUrl: string; cover: File | null };\n assets: DraftAsset[];\n mixOrder: boolean;\n sale: SaleDraft;\n listOnly: boolean;\n allowlist: string;\n license: DropLicense;\n gated: { enabled: boolean; title: string; url: string; type: string };\n}\n\nexport const EMPTY_DRAFT: DropDraft = {\n collection: { name: \"\", description: \"\", externalUrl: \"\", cover: null },\n assets: [],\n mixOrder: true,\n sale: EMPTY_SALE,\n listOnly: false,\n allowlist: \"\",\n license: {\n ipType: \"Art\", licenseType: \"CC BY-SA\", commercialUse: \"Yes\", derivatives: \"Share-Alike\",\n attribution: \"Required\", geographicScope: \"Worldwide\", aiPolicy: \"Allowed\", royalty: \"0\",\n },\n gated: { enabled: false, title: \"\", url: \"\", type: \"\" },\n};\n\nexport function newAsset(file: File): DraftAsset {\n return { id: crypto.randomUUID(), file, feature: null, name: \"\", description: \"\", copies: \"1\", traits: [] };\n}\n\nexport function assetKind(a: DraftAsset): MediaKind {\n return detectMediaKind(a.file.type) ?? \"document\";\n}\n\nexport function assetImage(a: DraftAsset): File | null {\n return assetKind(a) === \"image\" ? a.file : a.feature;\n}\n\nexport function dropSymbol(name: string): string {\n return suggestLaunchpadSymbol(name) || \"DROP\";\n}\n\nconst featureId = (a: DraftAsset) => `${a.id}:feature`;\n\nexport function assetUploads(assets: DraftAsset[]): { id: string; file: File }[] {\n return assets.flatMap((a) => [\n { id: a.id, file: a.file },\n ...(assetKind(a) !== \"image\" && a.feature ? [{ id: featureId(a), file: a.feature }] : []),\n ]);\n}\n\nexport function assetMedia(a: DraftAsset, uriOf: (id: string) => string | null): { imageUri: string; animationUrl: string | null } {\n if (assetKind(a) === \"image\") return { imageUri: uriOf(a.id)!, animationUrl: null };\n return { imageUri: uriOf(featureId(a))!, animationUrl: uriOf(a.id) };\n}\n\nexport function draftTokens(d: DropDraft): number {\n return d.assets.reduce((n, a) => n + (isPositiveInteger(a.copies) ? Number(a.copies) : 0), 0);\n}\n\nexport type DropPanel = \"collection\" | \"assets\" | \"settings\";\n\ntype AssetErrors = Partial<Record<\"copies\" | \"traits\" | \"feature\", Phrase>>;\n\nexport interface DropDraftErrors {\n collection: Partial<Record<\"name\" | \"externalUrl\", Phrase>>;\n assets: { list?: Phrase; byId: Record<string, AssetErrors> };\n settings: SaleErrors & Partial<Record<\"allowlist\" | \"gated\", Phrase>>;\n}\n\nconst HTTPS = /^https:\\/\\//;\nconst RESERVED = new Map([...RESERVED_TRAITS].map((t) => [t.toLowerCase(), t]));\n\nfunction assetErrors(a: DraftAsset): AssetErrors | null {\n const e: AssetErrors = {};\n if (!assetImage(a)) e.feature = { text: msg(\"Add a cover image\") };\n if (!isPositiveInteger(a.copies)) e.copies = { text: msg(\"Enter 1 or more\") };\n const reserved = a.traits.map((t) => RESERVED.get(t.key.trim().toLowerCase())).find(Boolean);\n if (reserved) e.traits = { text: msg(\"{name} is set by the license terms\"), vars: { name: reserved } };\n return Object.keys(e).length > 0 ? e : null;\n}\n\nexport function validateDropDraft(d: DropDraft, now: number): DropDraftErrors {\n const collection: DropDraftErrors[\"collection\"] = {};\n if (!d.collection.name.trim()) collection.name = { text: msg(\"Name the collection\") };\n if (d.collection.externalUrl.trim() && !HTTPS.test(d.collection.externalUrl.trim())) collection.externalUrl = { text: msg(\"Add a link starting with https://\") };\n\n const assets: DropDraftErrors[\"assets\"] = { byId: {} };\n for (const a of d.assets) {\n const e = assetErrors(a);\n if (e) assets.byId[a.id] = e;\n }\n if (d.assets.length === 0) assets.list = { text: msg(\"Add a work\") };\n else if (draftTokens(d) > MAX_DROP_SUPPLY) assets.list = { text: msg(\"Up to {count} copies\"), vars: { count: formatNumber(MAX_DROP_SUPPLY) } };\n\n const settings: DropDraftErrors[\"settings\"] = { ...validateSale(d.sale, now) };\n if (d.listOnly) {\n const list = parseAllowlist(d.allowlist);\n if (list.invalid.length > 0) settings.allowlist = { text: msg(\"Not wallet addresses: {lines}\"), vars: { lines: list.invalid.slice(0, 3).join(\", \") } };\n else if (list.addresses.length === 0) settings.allowlist = { text: msg(\"Add at least one wallet address\") };\n }\n if (d.gated.enabled && !HTTPS.test(d.gated.url)) settings.gated = { text: msg(\"Add a link starting with https://\") };\n return { collection, assets, settings };\n}\n\nconst firstValue = (o: object): Phrase | undefined => Object.values(o).find((v): v is Phrase => !!v && typeof v === \"object\" && \"text\" in v);\n\nexport function firstMissing(e: DropDraftErrors): { panel: DropPanel; message: Phrase } | null {\n const collection = firstValue(e.collection);\n if (collection) return { panel: \"collection\", message: collection };\n const asset = e.assets.list ?? Object.values(e.assets.byId).map(firstValue).find(Boolean);\n if (asset) return { panel: \"assets\", message: asset };\n const settings = firstValue(e.settings);\n if (settings) return { panel: \"settings\", message: settings };\n return null;\n}\n\nexport function hasErrors(e: DropDraftErrors): boolean {\n return firstMissing(e) !== null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAgC;AAChC,6BAAkC;AAClC,gCAAuC;AACvC,uBAA+B;AAC/B,sBAAkD;AAClD,kBAA0E;AAC1E,oBAA6B;AAC7B,uBAAiC;AACjC,wBAAgC;AA6BzB,MAAM,cAAyB;AAAA,EACpC,YAAY,EAAE,MAAM,IAAI,aAAa,IAAI,aAAa,IAAI,OAAO,KAAK;AAAA,EACtE,QAAQ,CAAC;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,IACP,QAAQ;AAAA,IAAO,aAAa;AAAA,IAAY,eAAe;AAAA,IAAO,aAAa;AAAA,IAC3E,aAAa;AAAA,IAAY,iBAAiB;AAAA,IAAa,UAAU;AAAA,IAAW,SAAS;AAAA,EACvF;AAAA,EACA,OAAO,EAAE,SAAS,OAAO,OAAO,IAAI,KAAK,IAAI,MAAM,GAAG;AACxD;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AAO,iCAAe,EAAE,SAAS;AACvC,QAAI,KAAK,QAAQ,SAAS,EAAG,UAAS,YAAY,EAAE,UAAM,sBAAI,+BAA+B,GAAG,MAAM,EAAE,OAAO,KAAK,QAAQ,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,EAAE,EAAE;AAAA,aAC5I,KAAK,UAAU,WAAW,EAAG,UAAS,YAAY,EAAE,UAAM,sBAAI,iCAAiC,EAAE;AAAA,EAC5G;AACA,MAAI,EAAE,MAAM,WAAW,CAAC,MAAM,KAAK,EAAE,MAAM,GAAG,EAAG,UAAS,QAAQ,EAAE,UAAM,sBAAI,mCAAmC,EAAE;AACnH,SAAO,EAAE,YAAY,QAAQ,SAAS;AACxC;AAEA,MAAM,aAAa,CAAC,MAAkC,OAAO,OAAO,CAAC,EAAE,KAAK,CAAC,MAAmB,CAAC,CAAC,KAAK,OAAO,MAAM,YAAY,UAAU,CAAC;AAEpI,SAAS,aAAa,GAAkE;AAC7F,QAAM,aAAa,WAAW,EAAE,UAAU;AAC1C,MAAI,WAAY,QAAO,EAAE,OAAO,cAAc,SAAS,WAAW;AAClE,QAAM,QAAQ,EAAE,OAAO,QAAQ,OAAO,OAAO,EAAE,OAAO,IAAI,EAAE,IAAI,UAAU,EAAE,KAAK,OAAO;AACxF,MAAI,MAAO,QAAO,EAAE,OAAO,UAAU,SAAS,MAAM;AACpD,QAAM,WAAW,WAAW,EAAE,QAAQ;AACtC,MAAI,SAAU,QAAO,EAAE,OAAO,YAAY,SAAS,SAAS;AAC5D,SAAO;AACT;AAEO,SAAS,UAAU,GAA6B;AACrD,SAAO,aAAa,CAAC,MAAM;AAC7B;","names":[]}
|
package/dist/utils/drop/draft.js
CHANGED
|
@@ -56,7 +56,7 @@ const HTTPS = /^https:\/\//;
|
|
|
56
56
|
const RESERVED = new Map([...RESERVED_TRAITS].map((t) => [t.toLowerCase(), t]));
|
|
57
57
|
function assetErrors(a) {
|
|
58
58
|
const e = {};
|
|
59
|
-
if (!assetImage(a)) e.feature = { text: msg("Add a
|
|
59
|
+
if (!assetImage(a)) e.feature = { text: msg("Add a cover image") };
|
|
60
60
|
if (!isPositiveInteger(a.copies)) e.copies = { text: msg("Enter 1 or more") };
|
|
61
61
|
const reserved = a.traits.map((t) => RESERVED.get(t.key.trim().toLowerCase())).find(Boolean);
|
|
62
62
|
if (reserved) e.traits = { text: msg("{name} is set by the license terms"), vars: { name: reserved } };
|
|
@@ -71,8 +71,8 @@ function validateDropDraft(d, now) {
|
|
|
71
71
|
const e = assetErrors(a);
|
|
72
72
|
if (e) assets.byId[a.id] = e;
|
|
73
73
|
}
|
|
74
|
-
if (d.assets.length === 0) assets.list = { text: msg("Add
|
|
75
|
-
else if (draftTokens(d) > MAX_DROP_SUPPLY) assets.list = { text: msg("Up to {count}
|
|
74
|
+
if (d.assets.length === 0) assets.list = { text: msg("Add a work") };
|
|
75
|
+
else if (draftTokens(d) > MAX_DROP_SUPPLY) assets.list = { text: msg("Up to {count} copies"), vars: { count: formatNumber(MAX_DROP_SUPPLY) } };
|
|
76
76
|
const settings = { ...validateSale(d.sale, now) };
|
|
77
77
|
if (d.listOnly) {
|
|
78
78
|
const list = parseAllowlist(d.allowlist);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/drop/draft.ts"],"sourcesContent":["import { RESERVED_TRAITS } from \"@medialane/sdk\";\nimport { isPositiveInteger } from \"../launchpad-rules.js\";\nimport { suggestLaunchpadSymbol } from \"../launchpad-defaults.js\";\nimport { parseAllowlist } from \"./allowlist.js\";\nimport { MAX_DROP_SUPPLY, type DropLicense } from \"./metadata.js\";\nimport { EMPTY_SALE, validateSale, type SaleDraft, type SaleErrors } from \"./sale.js\";\nimport { formatNumber } from \"../../i18n/format.js\";\nimport { msg, type Phrase } from \"../../i18n/translate.js\";\nimport { detectMediaKind } from \"../../components/fast-mint/media-kind.js\";\nimport type { MediaKind } from \"../../components/fast-mint/types.js\";\n\nexport interface DraftTrait {\n key: string;\n value: string;\n}\n\nexport interface DraftAsset {\n id: string;\n file: File;\n feature: File | null;\n name: string;\n description: string;\n copies: string;\n traits: DraftTrait[];\n}\n\nexport interface DropDraft {\n collection: { name: string; description: string; externalUrl: string; cover: File | null };\n assets: DraftAsset[];\n mixOrder: boolean;\n sale: SaleDraft;\n listOnly: boolean;\n allowlist: string;\n license: DropLicense;\n gated: { enabled: boolean; title: string; url: string; type: string };\n}\n\nexport const EMPTY_DRAFT: DropDraft = {\n collection: { name: \"\", description: \"\", externalUrl: \"\", cover: null },\n assets: [],\n mixOrder: true,\n sale: EMPTY_SALE,\n listOnly: false,\n allowlist: \"\",\n license: {\n ipType: \"Art\", licenseType: \"CC BY-SA\", commercialUse: \"Yes\", derivatives: \"Share-Alike\",\n attribution: \"Required\", geographicScope: \"Worldwide\", aiPolicy: \"Allowed\", royalty: \"0\",\n },\n gated: { enabled: false, title: \"\", url: \"\", type: \"\" },\n};\n\nexport function newAsset(file: File): DraftAsset {\n return { id: crypto.randomUUID(), file, feature: null, name: \"\", description: \"\", copies: \"1\", traits: [] };\n}\n\nexport function assetKind(a: DraftAsset): MediaKind {\n return detectMediaKind(a.file.type) ?? \"document\";\n}\n\nexport function assetImage(a: DraftAsset): File | null {\n return assetKind(a) === \"image\" ? a.file : a.feature;\n}\n\nexport function dropSymbol(name: string): string {\n return suggestLaunchpadSymbol(name) || \"DROP\";\n}\n\nconst featureId = (a: DraftAsset) => `${a.id}:feature`;\n\nexport function assetUploads(assets: DraftAsset[]): { id: string; file: File }[] {\n return assets.flatMap((a) => [\n { id: a.id, file: a.file },\n ...(assetKind(a) !== \"image\" && a.feature ? [{ id: featureId(a), file: a.feature }] : []),\n ]);\n}\n\nexport function assetMedia(a: DraftAsset, uriOf: (id: string) => string | null): { imageUri: string; animationUrl: string | null } {\n if (assetKind(a) === \"image\") return { imageUri: uriOf(a.id)!, animationUrl: null };\n return { imageUri: uriOf(featureId(a))!, animationUrl: uriOf(a.id) };\n}\n\nexport function draftTokens(d: DropDraft): number {\n return d.assets.reduce((n, a) => n + (isPositiveInteger(a.copies) ? Number(a.copies) : 0), 0);\n}\n\nexport type DropPanel = \"collection\" | \"assets\" | \"settings\";\n\ntype AssetErrors = Partial<Record<\"copies\" | \"traits\" | \"feature\", Phrase>>;\n\nexport interface DropDraftErrors {\n collection: Partial<Record<\"name\" | \"externalUrl\", Phrase>>;\n assets: { list?: Phrase; byId: Record<string, AssetErrors> };\n settings: SaleErrors & Partial<Record<\"allowlist\" | \"gated\", Phrase>>;\n}\n\nconst HTTPS = /^https:\\/\\//;\nconst RESERVED = new Map([...RESERVED_TRAITS].map((t) => [t.toLowerCase(), t]));\n\nfunction assetErrors(a: DraftAsset): AssetErrors | null {\n const e: AssetErrors = {};\n if (!assetImage(a)) e.feature = { text: msg(\"Add a
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/drop/draft.ts"],"sourcesContent":["import { RESERVED_TRAITS } from \"@medialane/sdk\";\nimport { isPositiveInteger } from \"../launchpad-rules.js\";\nimport { suggestLaunchpadSymbol } from \"../launchpad-defaults.js\";\nimport { parseAllowlist } from \"./allowlist.js\";\nimport { MAX_DROP_SUPPLY, type DropLicense } from \"./metadata.js\";\nimport { EMPTY_SALE, validateSale, type SaleDraft, type SaleErrors } from \"./sale.js\";\nimport { formatNumber } from \"../../i18n/format.js\";\nimport { msg, type Phrase } from \"../../i18n/translate.js\";\nimport { detectMediaKind } from \"../../components/fast-mint/media-kind.js\";\nimport type { MediaKind } from \"../../components/fast-mint/types.js\";\n\nexport interface DraftTrait {\n key: string;\n value: string;\n}\n\nexport interface DraftAsset {\n id: string;\n file: File;\n feature: File | null;\n name: string;\n description: string;\n copies: string;\n traits: DraftTrait[];\n}\n\nexport interface DropDraft {\n collection: { name: string; description: string; externalUrl: string; cover: File | null };\n assets: DraftAsset[];\n mixOrder: boolean;\n sale: SaleDraft;\n listOnly: boolean;\n allowlist: string;\n license: DropLicense;\n gated: { enabled: boolean; title: string; url: string; type: string };\n}\n\nexport const EMPTY_DRAFT: DropDraft = {\n collection: { name: \"\", description: \"\", externalUrl: \"\", cover: null },\n assets: [],\n mixOrder: true,\n sale: EMPTY_SALE,\n listOnly: false,\n allowlist: \"\",\n license: {\n ipType: \"Art\", licenseType: \"CC BY-SA\", commercialUse: \"Yes\", derivatives: \"Share-Alike\",\n attribution: \"Required\", geographicScope: \"Worldwide\", aiPolicy: \"Allowed\", royalty: \"0\",\n },\n gated: { enabled: false, title: \"\", url: \"\", type: \"\" },\n};\n\nexport function newAsset(file: File): DraftAsset {\n return { id: crypto.randomUUID(), file, feature: null, name: \"\", description: \"\", copies: \"1\", traits: [] };\n}\n\nexport function assetKind(a: DraftAsset): MediaKind {\n return detectMediaKind(a.file.type) ?? \"document\";\n}\n\nexport function assetImage(a: DraftAsset): File | null {\n return assetKind(a) === \"image\" ? a.file : a.feature;\n}\n\nexport function dropSymbol(name: string): string {\n return suggestLaunchpadSymbol(name) || \"DROP\";\n}\n\nconst featureId = (a: DraftAsset) => `${a.id}:feature`;\n\nexport function assetUploads(assets: DraftAsset[]): { id: string; file: File }[] {\n return assets.flatMap((a) => [\n { id: a.id, file: a.file },\n ...(assetKind(a) !== \"image\" && a.feature ? [{ id: featureId(a), file: a.feature }] : []),\n ]);\n}\n\nexport function assetMedia(a: DraftAsset, uriOf: (id: string) => string | null): { imageUri: string; animationUrl: string | null } {\n if (assetKind(a) === \"image\") return { imageUri: uriOf(a.id)!, animationUrl: null };\n return { imageUri: uriOf(featureId(a))!, animationUrl: uriOf(a.id) };\n}\n\nexport function draftTokens(d: DropDraft): number {\n return d.assets.reduce((n, a) => n + (isPositiveInteger(a.copies) ? Number(a.copies) : 0), 0);\n}\n\nexport type DropPanel = \"collection\" | \"assets\" | \"settings\";\n\ntype AssetErrors = Partial<Record<\"copies\" | \"traits\" | \"feature\", Phrase>>;\n\nexport interface DropDraftErrors {\n collection: Partial<Record<\"name\" | \"externalUrl\", Phrase>>;\n assets: { list?: Phrase; byId: Record<string, AssetErrors> };\n settings: SaleErrors & Partial<Record<\"allowlist\" | \"gated\", Phrase>>;\n}\n\nconst HTTPS = /^https:\\/\\//;\nconst RESERVED = new Map([...RESERVED_TRAITS].map((t) => [t.toLowerCase(), t]));\n\nfunction assetErrors(a: DraftAsset): AssetErrors | null {\n const e: AssetErrors = {};\n if (!assetImage(a)) e.feature = { text: msg(\"Add a cover image\") };\n if (!isPositiveInteger(a.copies)) e.copies = { text: msg(\"Enter 1 or more\") };\n const reserved = a.traits.map((t) => RESERVED.get(t.key.trim().toLowerCase())).find(Boolean);\n if (reserved) e.traits = { text: msg(\"{name} is set by the license terms\"), vars: { name: reserved } };\n return Object.keys(e).length > 0 ? e : null;\n}\n\nexport function validateDropDraft(d: DropDraft, now: number): DropDraftErrors {\n const collection: DropDraftErrors[\"collection\"] = {};\n if (!d.collection.name.trim()) collection.name = { text: msg(\"Name the collection\") };\n if (d.collection.externalUrl.trim() && !HTTPS.test(d.collection.externalUrl.trim())) collection.externalUrl = { text: msg(\"Add a link starting with https://\") };\n\n const assets: DropDraftErrors[\"assets\"] = { byId: {} };\n for (const a of d.assets) {\n const e = assetErrors(a);\n if (e) assets.byId[a.id] = e;\n }\n if (d.assets.length === 0) assets.list = { text: msg(\"Add a work\") };\n else if (draftTokens(d) > MAX_DROP_SUPPLY) assets.list = { text: msg(\"Up to {count} copies\"), vars: { count: formatNumber(MAX_DROP_SUPPLY) } };\n\n const settings: DropDraftErrors[\"settings\"] = { ...validateSale(d.sale, now) };\n if (d.listOnly) {\n const list = parseAllowlist(d.allowlist);\n if (list.invalid.length > 0) settings.allowlist = { text: msg(\"Not wallet addresses: {lines}\"), vars: { lines: list.invalid.slice(0, 3).join(\", \") } };\n else if (list.addresses.length === 0) settings.allowlist = { text: msg(\"Add at least one wallet address\") };\n }\n if (d.gated.enabled && !HTTPS.test(d.gated.url)) settings.gated = { text: msg(\"Add a link starting with https://\") };\n return { collection, assets, settings };\n}\n\nconst firstValue = (o: object): Phrase | undefined => Object.values(o).find((v): v is Phrase => !!v && typeof v === \"object\" && \"text\" in v);\n\nexport function firstMissing(e: DropDraftErrors): { panel: DropPanel; message: Phrase } | null {\n const collection = firstValue(e.collection);\n if (collection) return { panel: \"collection\", message: collection };\n const asset = e.assets.list ?? Object.values(e.assets.byId).map(firstValue).find(Boolean);\n if (asset) return { panel: \"assets\", message: asset };\n const settings = firstValue(e.settings);\n if (settings) return { panel: \"settings\", message: settings };\n return null;\n}\n\nexport function hasErrors(e: DropDraftErrors): boolean {\n return firstMissing(e) !== null;\n}\n"],"mappings":"AAAA,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAClC,SAAS,8BAA8B;AACvC,SAAS,sBAAsB;AAC/B,SAAS,uBAAyC;AAClD,SAAS,YAAY,oBAAqD;AAC1E,SAAS,oBAAoB;AAC7B,SAAS,WAAwB;AACjC,SAAS,uBAAuB;AA6BzB,MAAM,cAAyB;AAAA,EACpC,YAAY,EAAE,MAAM,IAAI,aAAa,IAAI,aAAa,IAAI,OAAO,KAAK;AAAA,EACtE,QAAQ,CAAC;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,IACP,QAAQ;AAAA,IAAO,aAAa;AAAA,IAAY,eAAe;AAAA,IAAO,aAAa;AAAA,IAC3E,aAAa;AAAA,IAAY,iBAAiB;AAAA,IAAa,UAAU;AAAA,IAAW,SAAS;AAAA,EACvF;AAAA,EACA,OAAO,EAAE,SAAS,OAAO,OAAO,IAAI,KAAK,IAAI,MAAM,GAAG;AACxD;AAEO,SAAS,SAAS,MAAwB;AAC/C,SAAO,EAAE,IAAI,OAAO,WAAW,GAAG,MAAM,SAAS,MAAM,MAAM,IAAI,aAAa,IAAI,QAAQ,KAAK,QAAQ,CAAC,EAAE;AAC5G;AAEO,SAAS,UAAU,GAA0B;AAClD,SAAO,gBAAgB,EAAE,KAAK,IAAI,KAAK;AACzC;AAEO,SAAS,WAAW,GAA4B;AACrD,SAAO,UAAU,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,MAAI,EAAE,MAAM,WAAW,CAAC,MAAM,KAAK,EAAE,MAAM,GAAG,EAAG,UAAS,QAAQ,EAAE,MAAM,IAAI,mCAAmC,EAAE;AACnH,SAAO,EAAE,YAAY,QAAQ,SAAS;AACxC;AAEA,MAAM,aAAa,CAAC,MAAkC,OAAO,OAAO,CAAC,EAAE,KAAK,CAAC,MAAmB,CAAC,CAAC,KAAK,OAAO,MAAM,YAAY,UAAU,CAAC;AAEpI,SAAS,aAAa,GAAkE;AAC7F,QAAM,aAAa,WAAW,EAAE,UAAU;AAC1C,MAAI,WAAY,QAAO,EAAE,OAAO,cAAc,SAAS,WAAW;AAClE,QAAM,QAAQ,EAAE,OAAO,QAAQ,OAAO,OAAO,EAAE,OAAO,IAAI,EAAE,IAAI,UAAU,EAAE,KAAK,OAAO;AACxF,MAAI,MAAO,QAAO,EAAE,OAAO,UAAU,SAAS,MAAM;AACpD,QAAM,WAAW,WAAW,EAAE,QAAQ;AACtC,MAAI,SAAU,QAAO,EAAE,OAAO,YAAY,SAAS,SAAS;AAC5D,SAAO;AACT;AAEO,SAAS,UAAU,GAA6B;AACrD,SAAO,aAAa,CAAC,MAAM;AAC7B;","names":[]}
|
|
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var ipfs_upload_exports = {};
|
|
20
20
|
__export(ipfs_upload_exports, {
|
|
21
21
|
FILE_UPLOAD_FAILED: () => FILE_UPLOAD_FAILED,
|
|
22
|
+
UPLOADS_UNAVAILABLE: () => UPLOADS_UNAVAILABLE,
|
|
22
23
|
isUserRejection: () => isUserRejection,
|
|
23
24
|
pinAssetMetadata: () => pinAssetMetadata,
|
|
24
25
|
setUploadDiagnosticsReporter: () => setUploadDiagnosticsReporter,
|
|
@@ -31,6 +32,7 @@ module.exports = __toCommonJS(ipfs_upload_exports);
|
|
|
31
32
|
var import_sdk = require("@medialane/sdk");
|
|
32
33
|
var import_translate = require("../i18n/translate.js");
|
|
33
34
|
const FILE_UPLOAD_FAILED = "Try the upload again.";
|
|
35
|
+
const UPLOADS_UNAVAILABLE = (0, import_translate.msg)("Uploads are temporarily unavailable. Please try again later. If the error persists, contact our support.");
|
|
34
36
|
function uploadFailed(cause) {
|
|
35
37
|
return Object.assign(new import_sdk.UserFacingError(FILE_UPLOAD_FAILED), { cause });
|
|
36
38
|
}
|
|
@@ -48,7 +50,13 @@ function connectionType() {
|
|
|
48
50
|
return connection?.effectiveType ?? null;
|
|
49
51
|
}
|
|
50
52
|
async function signedUploadUrl(api, kind) {
|
|
51
|
-
const
|
|
53
|
+
const response = await api.metadata.signedUrl(kind).catch((error) => {
|
|
54
|
+
if (error instanceof import_sdk.MedialaneApiError && error.serverCode === "uploads_unavailable") {
|
|
55
|
+
throw Object.assign(new import_sdk.UserFacingError(UPLOADS_UNAVAILABLE), { cause: error });
|
|
56
|
+
}
|
|
57
|
+
throw error;
|
|
58
|
+
});
|
|
59
|
+
const signedUrl = response.data?.url;
|
|
52
60
|
if (!signedUrl) throw new Error("Failed to prepare the upload");
|
|
53
61
|
return signedUrl;
|
|
54
62
|
}
|
|
@@ -159,6 +167,7 @@ async function pinAssetMetadata(api, input) {
|
|
|
159
167
|
// Annotate the CommonJS export names for ESM import in node:
|
|
160
168
|
0 && (module.exports = {
|
|
161
169
|
FILE_UPLOAD_FAILED,
|
|
170
|
+
UPLOADS_UNAVAILABLE,
|
|
162
171
|
isUserRejection,
|
|
163
172
|
pinAssetMetadata,
|
|
164
173
|
setUploadDiagnosticsReporter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/ipfs-upload.ts"],"sourcesContent":["import { buildAssetMetadata, UserFacingError, type ApiClient, type BuildAssetMetadataInput } from \"@medialane/sdk\";\nimport { msg } from \"../i18n/translate.js\";\n\nexport const FILE_UPLOAD_FAILED =\n \"Try the upload again.\";\n\nfunction uploadFailed(cause: unknown): UserFacingError {\n return Object.assign(new UserFacingError(FILE_UPLOAD_FAILED), { cause });\n}\n\nexport interface UploadedIpfsFile {\n cid: string;\n uri: string;\n}\n\nexport type SignedUploadKind = \"image\" | \"document\" | \"media\";\n\nexport interface UploadDiagnostics {\n kind: SignedUploadKind;\n fileSize: number;\n fileType: string;\n failedAfterMs: number;\n error: string;\n fileReadable: string;\n uploadHostReachable: string;\n retry: string;\n online: boolean | null;\n connection: string | null;\n}\n\nlet reportDiagnostics: ((diagnostics: UploadDiagnostics) => void) | null = null;\n\nexport function setUploadDiagnosticsReporter(reporter: ((diagnostics: UploadDiagnostics) => void) | null): void {\n reportDiagnostics = reporter;\n}\n\nfunction describe(err: unknown): string {\n const text = err instanceof Error ? `${err.name}: ${err.message}` : String(err);\n return text.slice(0, 300);\n}\n\nfunction connectionType(): string | null {\n if (typeof navigator === \"undefined\") return null;\n const connection = (navigator as Navigator & { connection?: { effectiveType?: string } }).connection;\n return connection?.effectiveType ?? null;\n}\n\nasync function signedUploadUrl(api: ApiClient, kind: SignedUploadKind): Promise<string> {\n const
|
|
1
|
+
{"version":3,"sources":["../../src/utils/ipfs-upload.ts"],"sourcesContent":["import { buildAssetMetadata, MedialaneApiError, UserFacingError, type ApiClient, type BuildAssetMetadataInput } from \"@medialane/sdk\";\nimport { msg } from \"../i18n/translate.js\";\n\nexport const FILE_UPLOAD_FAILED =\n \"Try the upload again.\";\n\nexport const UPLOADS_UNAVAILABLE = msg(\"Uploads are temporarily unavailable. Please try again later. If the error persists, contact our support.\");\n\nfunction uploadFailed(cause: unknown): UserFacingError {\n return Object.assign(new UserFacingError(FILE_UPLOAD_FAILED), { cause });\n}\n\nexport interface UploadedIpfsFile {\n cid: string;\n uri: string;\n}\n\nexport type SignedUploadKind = \"image\" | \"document\" | \"media\";\n\nexport interface UploadDiagnostics {\n kind: SignedUploadKind;\n fileSize: number;\n fileType: string;\n failedAfterMs: number;\n error: string;\n fileReadable: string;\n uploadHostReachable: string;\n retry: string;\n online: boolean | null;\n connection: string | null;\n}\n\nlet reportDiagnostics: ((diagnostics: UploadDiagnostics) => void) | null = null;\n\nexport function setUploadDiagnosticsReporter(reporter: ((diagnostics: UploadDiagnostics) => void) | null): void {\n reportDiagnostics = reporter;\n}\n\nfunction describe(err: unknown): string {\n const text = err instanceof Error ? `${err.name}: ${err.message}` : String(err);\n return text.slice(0, 300);\n}\n\nfunction connectionType(): string | null {\n if (typeof navigator === \"undefined\") return null;\n const connection = (navigator as Navigator & { connection?: { effectiveType?: string } }).connection;\n return connection?.effectiveType ?? null;\n}\n\nasync function signedUploadUrl(api: ApiClient, kind: SignedUploadKind): Promise<string> {\n const response = await api.metadata.signedUrl(kind).catch((error: unknown) => {\n if (error instanceof MedialaneApiError && error.serverCode === \"uploads_unavailable\") {\n throw Object.assign(new UserFacingError(UPLOADS_UNAVAILABLE), { cause: error });\n }\n throw error;\n });\n const signedUrl = response.data?.url;\n if (!signedUrl) throw new Error(\"Failed to prepare the upload\");\n return signedUrl;\n}\n\nfunction postFile(signedUrl: string, file: File): Promise<Response> {\n const formData = new FormData();\n formData.append(\"file\", file, file.name);\n formData.append(\"network\", \"public\");\n formData.append(\"name\", file.name);\n return fetch(signedUrl, { method: \"POST\", body: formData });\n}\n\nasync function uploadedFile(res: Response): Promise<UploadedIpfsFile> {\n const uploadJson = (await res.json().catch(() => ({}))) as { data?: { cid?: string } };\n const cid = uploadJson.data?.cid;\n if (!res.ok || !cid) {\n throw uploadFailed(new Error(`File upload returned HTTP ${res.status}${cid ? \"\" : \" without a cid\"}`));\n }\n return { cid, uri: `ipfs://${cid}` };\n}\n\nasync function recoverUpload(\n api: ApiClient,\n file: File,\n kind: SignedUploadKind,\n signedUrl: string,\n err: unknown,\n failedAfterMs: number,\n): Promise<UploadedIpfsFile> {\n const diagnostics: UploadDiagnostics = {\n kind,\n fileSize: file.size,\n fileType: file.type,\n failedAfterMs,\n error: describe(err),\n fileReadable: \"not checked\",\n uploadHostReachable: \"not checked\",\n retry: \"not attempted\",\n online: typeof navigator === \"undefined\" ? null : navigator.onLine,\n connection: connectionType(),\n };\n\n let copy: File | null = null;\n try {\n copy = new File([await file.arrayBuffer()], file.name, { type: file.type });\n diagnostics.fileReadable = \"ok\";\n } catch (readErr) {\n diagnostics.fileReadable = describe(readErr);\n }\n\n try {\n await fetch(new URL(signedUrl).origin, { mode: \"no-cors\", cache: \"no-store\" });\n diagnostics.uploadHostReachable = \"ok\";\n } catch (probeErr) {\n diagnostics.uploadHostReachable = describe(probeErr);\n }\n\n let result: UploadedIpfsFile | null = null;\n if (copy) {\n try {\n result = await uploadedFile(await postFile(await signedUploadUrl(api, kind), copy));\n diagnostics.retry = \"ok\";\n } catch (retryErr) {\n diagnostics.retry = describe(retryErr instanceof UserFacingError && retryErr.cause ? retryErr.cause : retryErr);\n }\n }\n\n try {\n reportDiagnostics?.(diagnostics);\n } catch {}\n\n if (result) return result;\n throw Object.assign(uploadFailed(err), { diagnostics });\n}\n\nexport async function uploadFileToIpfs(\n api: ApiClient,\n file: File,\n kind: SignedUploadKind = \"image\",\n): Promise<UploadedIpfsFile> {\n const signedUrl = await signedUploadUrl(api, kind);\n const startedAt = Date.now();\n let uploadRes: Response;\n try {\n uploadRes = await postFile(signedUrl, file);\n } catch (err) {\n return recoverUpload(api, file, kind, signedUrl, err, Date.now() - startedAt);\n }\n return uploadedFile(uploadRes);\n}\n\nexport async function uploadJsonToIpfs(api: ApiClient, payload: unknown): Promise<string> {\n const uri = (await api.metadata.upload(payload as Record<string, unknown>)).data?.url;\n if (!uri) throw new Error(\"Metadata upload failed\");\n return uri;\n}\n\nexport function uploadDirectoryToIpfs(\n api: ApiClient,\n files: { name: string; content: unknown }[],\n): Promise<{ cid: string; baseUri: string }> {\n return api.metadata.uploadDirectory(files);\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: msg(\"Signature declined\"),\n description: msg(\"Try again and approve the request in your wallet.\"),\n };\n }\n return {\n title: msg(\"Upload failed\"),\n description: err instanceof Error ? err.message : undefined,\n };\n}\n\nexport type PinAssetMetadataInput = BuildAssetMetadataInput;\n\nexport interface PinnedAsset {\n uri: string;\n imageUri: string | null;\n}\n\nexport async function pinAssetMetadata(api: ApiClient, input: PinAssetMetadataInput): Promise<PinnedAsset> {\n const imageUri = input.imageUri ?? null;\n\n const uri = await uploadJsonToIpfs(\n api,\n buildAssetMetadata({\n ...input,\n imageUri,\n externalUrl: input.externalUrl || \"https://medialane.io\",\n }),\n );\n\n return { uri, imageUri };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAqH;AACrH,uBAAoB;AAEb,MAAM,qBACX;AAEK,MAAM,0BAAsB,sBAAI,0GAA0G;AAEjJ,SAAS,aAAa,OAAiC;AACrD,SAAO,OAAO,OAAO,IAAI,2BAAgB,kBAAkB,GAAG,EAAE,MAAM,CAAC;AACzE;AAsBA,IAAI,oBAAuE;AAEpE,SAAS,6BAA6B,UAAmE;AAC9G,sBAAoB;AACtB;AAEA,SAAS,SAAS,KAAsB;AACtC,QAAM,OAAO,eAAe,QAAQ,GAAG,IAAI,IAAI,KAAK,IAAI,OAAO,KAAK,OAAO,GAAG;AAC9E,SAAO,KAAK,MAAM,GAAG,GAAG;AAC1B;AAEA,SAAS,iBAAgC;AACvC,MAAI,OAAO,cAAc,YAAa,QAAO;AAC7C,QAAM,aAAc,UAAsE;AAC1F,SAAO,YAAY,iBAAiB;AACtC;AAEA,eAAe,gBAAgB,KAAgB,MAAyC;AACtF,QAAM,WAAW,MAAM,IAAI,SAAS,UAAU,IAAI,EAAE,MAAM,CAAC,UAAmB;AAC5E,QAAI,iBAAiB,gCAAqB,MAAM,eAAe,uBAAuB;AACpF,YAAM,OAAO,OAAO,IAAI,2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S,gBAAgB,KAAuB;AACrD,QAAMA,OAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,OAAO,EAAE;AACjE,SAAO,2CAA2C,KAAKA,IAAG;AAC5D;AAEO,SAAS,mBAAmB,KAAuD;AACxF,MAAI,gBAAgB,GAAG,GAAG;AACxB,WAAO;AAAA,MACL,WAAO,sBAAI,oBAAoB;AAAA,MAC/B,iBAAa,sBAAI,mDAAmD;AAAA,IACtE;AAAA,EACF;AACA,SAAO;AAAA,IACL,WAAO,sBAAI,eAAe;AAAA,IAC1B,aAAa,eAAe,QAAQ,IAAI,UAAU;AAAA,EACpD;AACF;AASA,eAAsB,iBAAiB,KAAgB,OAAoD;AACzG,QAAM,WAAW,MAAM,YAAY;AAEnC,QAAM,MAAM,MAAM;AAAA,IAChB;AAAA,QACA,+BAAmB;AAAA,MACjB,GAAG;AAAA,MACH;AAAA,MACA,aAAa,MAAM,eAAe;AAAA,IACpC,CAAC;AAAA,EACH;AAEA,SAAO,EAAE,KAAK,SAAS;AACzB;","names":["msg"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BuildAssetMetadataInput, ApiClient } from '@medialane/sdk';
|
|
2
2
|
|
|
3
3
|
declare const FILE_UPLOAD_FAILED = "Try the upload again.";
|
|
4
|
+
declare const UPLOADS_UNAVAILABLE: string;
|
|
4
5
|
interface UploadedIpfsFile {
|
|
5
6
|
cid: string;
|
|
6
7
|
uri: string;
|
|
@@ -40,4 +41,4 @@ interface PinnedAsset {
|
|
|
40
41
|
}
|
|
41
42
|
declare function pinAssetMetadata(api: ApiClient, input: PinAssetMetadataInput): Promise<PinnedAsset>;
|
|
42
43
|
|
|
43
|
-
export { FILE_UPLOAD_FAILED, type PinAssetMetadataInput, type PinnedAsset, type SignedUploadKind, type UploadDiagnostics, type UploadedIpfsFile, isUserRejection, pinAssetMetadata, setUploadDiagnosticsReporter, uploadDirectoryToIpfs, uploadFailureToast, uploadFileToIpfs, uploadJsonToIpfs };
|
|
44
|
+
export { FILE_UPLOAD_FAILED, type PinAssetMetadataInput, type PinnedAsset, type SignedUploadKind, UPLOADS_UNAVAILABLE, type UploadDiagnostics, type UploadedIpfsFile, isUserRejection, pinAssetMetadata, setUploadDiagnosticsReporter, uploadDirectoryToIpfs, uploadFailureToast, uploadFileToIpfs, uploadJsonToIpfs };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BuildAssetMetadataInput, ApiClient } from '@medialane/sdk';
|
|
2
2
|
|
|
3
3
|
declare const FILE_UPLOAD_FAILED = "Try the upload again.";
|
|
4
|
+
declare const UPLOADS_UNAVAILABLE: string;
|
|
4
5
|
interface UploadedIpfsFile {
|
|
5
6
|
cid: string;
|
|
6
7
|
uri: string;
|
|
@@ -40,4 +41,4 @@ interface PinnedAsset {
|
|
|
40
41
|
}
|
|
41
42
|
declare function pinAssetMetadata(api: ApiClient, input: PinAssetMetadataInput): Promise<PinnedAsset>;
|
|
42
43
|
|
|
43
|
-
export { FILE_UPLOAD_FAILED, type PinAssetMetadataInput, type PinnedAsset, type SignedUploadKind, type UploadDiagnostics, type UploadedIpfsFile, isUserRejection, pinAssetMetadata, setUploadDiagnosticsReporter, uploadDirectoryToIpfs, uploadFailureToast, uploadFileToIpfs, uploadJsonToIpfs };
|
|
44
|
+
export { FILE_UPLOAD_FAILED, type PinAssetMetadataInput, type PinnedAsset, type SignedUploadKind, UPLOADS_UNAVAILABLE, type UploadDiagnostics, type UploadedIpfsFile, isUserRejection, pinAssetMetadata, setUploadDiagnosticsReporter, uploadDirectoryToIpfs, uploadFailureToast, uploadFileToIpfs, uploadJsonToIpfs };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { buildAssetMetadata, UserFacingError } from "@medialane/sdk";
|
|
1
|
+
import { buildAssetMetadata, MedialaneApiError, UserFacingError } from "@medialane/sdk";
|
|
2
2
|
import { msg } from "../i18n/translate.js";
|
|
3
3
|
const FILE_UPLOAD_FAILED = "Try the upload again.";
|
|
4
|
+
const UPLOADS_UNAVAILABLE = msg("Uploads are temporarily unavailable. Please try again later. If the error persists, contact our support.");
|
|
4
5
|
function uploadFailed(cause) {
|
|
5
6
|
return Object.assign(new UserFacingError(FILE_UPLOAD_FAILED), { cause });
|
|
6
7
|
}
|
|
@@ -18,7 +19,13 @@ function connectionType() {
|
|
|
18
19
|
return connection?.effectiveType ?? null;
|
|
19
20
|
}
|
|
20
21
|
async function signedUploadUrl(api, kind) {
|
|
21
|
-
const
|
|
22
|
+
const response = await api.metadata.signedUrl(kind).catch((error) => {
|
|
23
|
+
if (error instanceof MedialaneApiError && error.serverCode === "uploads_unavailable") {
|
|
24
|
+
throw Object.assign(new UserFacingError(UPLOADS_UNAVAILABLE), { cause: error });
|
|
25
|
+
}
|
|
26
|
+
throw error;
|
|
27
|
+
});
|
|
28
|
+
const signedUrl = response.data?.url;
|
|
22
29
|
if (!signedUrl) throw new Error("Failed to prepare the upload");
|
|
23
30
|
return signedUrl;
|
|
24
31
|
}
|
|
@@ -128,6 +135,7 @@ async function pinAssetMetadata(api, input) {
|
|
|
128
135
|
}
|
|
129
136
|
export {
|
|
130
137
|
FILE_UPLOAD_FAILED,
|
|
138
|
+
UPLOADS_UNAVAILABLE,
|
|
131
139
|
isUserRejection,
|
|
132
140
|
pinAssetMetadata,
|
|
133
141
|
setUploadDiagnosticsReporter,
|