@medialane/ui 0.33.0 → 0.34.1
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/asset-collection-bar.cjs +131 -0
- package/dist/components/asset-collection-bar.cjs.map +1 -0
- package/dist/components/asset-collection-bar.d.cts +30 -0
- package/dist/components/asset-collection-bar.d.ts +30 -0
- package/dist/components/asset-collection-bar.js +97 -0
- package/dist/components/asset-collection-bar.js.map +1 -0
- package/dist/components/asset-marketplace-panel.cjs +284 -0
- package/dist/components/asset-marketplace-panel.cjs.map +1 -0
- package/dist/components/asset-marketplace-panel.d.cts +44 -0
- package/dist/components/asset-marketplace-panel.d.ts +44 -0
- package/dist/components/asset-marketplace-panel.js +270 -0
- package/dist/components/asset-marketplace-panel.js.map +1 -0
- package/dist/components/asset-top-sections.cjs +8 -8
- package/dist/components/asset-top-sections.cjs.map +1 -1
- package/dist/components/asset-top-sections.d.cts +1 -2
- package/dist/components/asset-top-sections.d.ts +1 -2
- package/dist/components/asset-top-sections.js +8 -8
- package/dist/components/asset-top-sections.js.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/format.cjs +17 -2
- package/dist/utils/format.cjs.map +1 -1
- package/dist/utils/format.d.cts +9 -1
- package/dist/utils/format.d.ts +9 -1
- package/dist/utils/format.js +15 -1
- package/dist/utils/format.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/asset-top-sections.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { motion } from \"framer-motion\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-top-sections.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { motion } from \"framer-motion\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { ParentAttributionBanner } from \"./parent-attribution-banner.js\";\nimport { IpTypeBadge } from \"./ip-type-badge.js\";\nimport { Layers, Users } from \"lucide-react\";\n\ninterface AssetMediaColumnProps {\n shouldReduce: boolean;\n image: string;\n imageAlt: string;\n imgError: boolean;\n onImageError: () => void;\n fallback: React.ReactNode;\n stats?: Array<{\n value: string;\n label: string;\n icon: React.ReactNode;\n }>;\n}\n\nexport function AssetMediaColumn({\n shouldReduce,\n image,\n imageAlt,\n imgError,\n onImageError,\n fallback,\n stats,\n}: AssetMediaColumnProps) {\n return (\n <motion.div\n initial={shouldReduce ? false : { scale: 1.0, opacity: 0 }}\n animate={{ scale: 1.02, opacity: 1 }}\n transition={{ duration: 0.6, ease: \"easeOut\" }}\n className=\"overflow-hidden rounded-xl lg:sticky lg:top-16\"\n >\n <div className=\"rounded-2xl overflow-hidden border border-border bg-muted\">\n {image && !imgError ? (\n <Image\n src={image}\n alt={imageAlt}\n width={0}\n height={0}\n sizes=\"(max-width: 1024px) 100vw, 66vw\"\n className=\"w-full h-auto\"\n onError={onImageError}\n crossOrigin=\"anonymous\"\n priority\n />\n ) : (\n fallback\n )}\n </div>\n\n {stats && stats.length > 0 ? (\n <div className={`grid gap-3 mt-4 ${stats.length === 2 ? \"grid-cols-2\" : \"grid-cols-1\"}`}>\n {stats.map((stat) => (\n <div key={stat.label} className=\"rounded-xl border border-border bg-muted/20 p-4 text-center\">\n <p className=\"text-2xl font-black\">{stat.value}</p>\n <div className=\"flex items-center justify-center gap-1 text-xs text-muted-foreground mt-1\">\n {stat.icon}\n {stat.label}\n </div>\n </div>\n ))}\n </div>\n ) : null}\n </motion.div>\n );\n}\n\ninterface AssetHeaderBlockProps {\n name: string;\n description?: string | null;\n ipType?: string | null;\n showMultiEditionBadge?: boolean;\n parentContract?: string | null;\n parentTokenId?: string | null;\n ownerAddress?: string | null;\n}\n\nexport function AssetHeaderBlock({\n name,\n description,\n ipType,\n showMultiEditionBadge = false,\n parentContract,\n parentTokenId,\n ownerAddress,\n}: AssetHeaderBlockProps) {\n return (\n <div>\n {parentContract && parentTokenId ? (\n <div className=\"mb-3\">\n <ParentAttributionBanner\n parentContract={parentContract}\n parentTokenId={parentTokenId}\n parentName={`Token #${parentTokenId}`}\n />\n </div>\n ) : null}\n {ownerAddress ? (\n <div className=\"mb-1 flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span className=\"font-semibold uppercase tracking-wider\">Owner</span>\n <Link\n href={`/creator/${ownerAddress}`}\n className=\"hover:text-primary transition-colors font-medium\"\n >\n <AddressDisplay address={ownerAddress} />\n </Link>\n </div>\n ) : null}\n <h1 className=\"text-3xl lg:text-5xl font-bold\">{name}</h1>\n {ipType || showMultiEditionBadge ? (\n <div className=\"flex items-center gap-2 flex-wrap mt-2\">\n {ipType ? <IpTypeBadge ipType={ipType} size=\"md\" /> : null}\n {showMultiEditionBadge ? (\n <span className=\"inline-flex items-center gap-1 text-[11px] font-semibold px-2.5 py-1 rounded-full border border-violet-500/30 bg-violet-500/10 text-violet-500\">\n <Layers className=\"h-3 w-3\" />\n Multi-edition\n </span>\n ) : null}\n </div>\n ) : null}\n {description ? (\n <p className=\"text-sm text-muted-foreground leading-relaxed mt-1\">{description}</p>\n ) : null}\n </div>\n );\n}\n\nexport function buildEditionStats(totalEditions: number, uniqueOwners: number) {\n return [\n {\n value: totalEditions.toLocaleString(),\n label: \"editions minted\",\n icon: <Layers className=\"h-3 w-3\" />,\n },\n {\n value: uniqueOwners.toLocaleString(),\n label: \"unique owners\",\n icon: <Users className=\"h-3 w-3\" />,\n },\n ];\n}\n"],"mappings":";AA0CU,cAqBI,YArBJ;AAxCV,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,cAAc;AACvB,SAAS,sBAAsB;AAC/B,SAAS,+BAA+B;AACxC,SAAS,mBAAmB;AAC5B,SAAS,QAAQ,aAAa;AAgBvB,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0B;AACxB,SACE;AAAA,IAAC,OAAO;AAAA,IAAP;AAAA,MACC,SAAS,eAAe,QAAQ,EAAE,OAAO,GAAK,SAAS,EAAE;AAAA,MACzD,SAAS,EAAE,OAAO,MAAM,SAAS,EAAE;AAAA,MACnC,YAAY,EAAE,UAAU,KAAK,MAAM,UAAU;AAAA,MAC7C,WAAU;AAAA,MAEV;AAAA,4BAAC,SAAI,WAAU,6DACZ,mBAAS,CAAC,WACT;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,KAAK;AAAA,YACL,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,OAAM;AAAA,YACN,WAAU;AAAA,YACV,SAAS;AAAA,YACT,aAAY;AAAA,YACZ,UAAQ;AAAA;AAAA,QACV,IAEA,UAEJ;AAAA,QAEC,SAAS,MAAM,SAAS,IACvB,oBAAC,SAAI,WAAW,mBAAmB,MAAM,WAAW,IAAI,gBAAgB,aAAa,IAClF,gBAAM,IAAI,CAAC,SACV,qBAAC,SAAqB,WAAU,+DAC9B;AAAA,8BAAC,OAAE,WAAU,uBAAuB,eAAK,OAAM;AAAA,UAC/C,qBAAC,SAAI,WAAU,6EACZ;AAAA,iBAAK;AAAA,YACL,KAAK;AAAA,aACR;AAAA,aALQ,KAAK,KAMf,CACD,GACH,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;AAYO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA,wBAAwB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AACF,GAA0B;AACxB,SACE,qBAAC,SACE;AAAA,sBAAkB,gBACjB,oBAAC,SAAI,WAAU,QACb;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,YAAY,UAAU,aAAa;AAAA;AAAA,IACrC,GACF,IACE;AAAA,IACH,eACC,qBAAC,SAAI,WAAU,gEACb;AAAA,0BAAC,UAAK,WAAU,0CAAyC,mBAAK;AAAA,MAC9D;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,YAAY,YAAY;AAAA,UAC9B,WAAU;AAAA,UAEV,8BAAC,kBAAe,SAAS,cAAc;AAAA;AAAA,MACzC;AAAA,OACF,IACE;AAAA,IACJ,oBAAC,QAAG,WAAU,kCAAkC,gBAAK;AAAA,IACpD,UAAU,wBACT,qBAAC,SAAI,WAAU,0CACZ;AAAA,eAAS,oBAAC,eAAY,QAAgB,MAAK,MAAK,IAAK;AAAA,MACrD,wBACC,qBAAC,UAAK,WAAU,kJACd;AAAA,4BAAC,UAAO,WAAU,WAAU;AAAA,QAAE;AAAA,SAEhC,IACE;AAAA,OACN,IACE;AAAA,IACH,cACC,oBAAC,OAAE,WAAU,sDAAsD,uBAAY,IAC7E;AAAA,KACN;AAEJ;AAEO,SAAS,kBAAkB,eAAuB,cAAsB;AAC7E,SAAO;AAAA,IACL;AAAA,MACE,OAAO,cAAc,eAAe;AAAA,MACpC,OAAO;AAAA,MACP,MAAM,oBAAC,UAAO,WAAU,WAAU;AAAA,IACpC;AAAA,IACA;AAAA,MACE,OAAO,aAAa,eAAe;AAAA,MACnC,OAAO;AAAA,MACP,MAAM,oBAAC,SAAM,WAAU,WAAU;AAAA,IACnC;AAAA,EACF;AACF;","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -29,8 +29,10 @@ __export(index_exports, {
|
|
|
29
29
|
AddressDisplay: () => import_address_display.AddressDisplay,
|
|
30
30
|
AssetCard: () => import_asset_card.AssetCard,
|
|
31
31
|
AssetCardSkeleton: () => import_asset_card.AssetCardSkeleton,
|
|
32
|
+
AssetCollectionBar: () => import_asset_collection_bar.AssetCollectionBar,
|
|
32
33
|
AssetHeaderBlock: () => import_asset_top_sections.AssetHeaderBlock,
|
|
33
34
|
AssetLicenseSummary: () => import_asset_license_summary.AssetLicenseSummary,
|
|
35
|
+
AssetMarketplacePanel: () => import_asset_marketplace_panel.AssetMarketplacePanel,
|
|
34
36
|
AssetMarketsTab: () => import_asset_markets_tab.AssetMarketsTab,
|
|
35
37
|
AssetMediaColumn: () => import_asset_top_sections.AssetMediaColumn,
|
|
36
38
|
AssetOverviewContent: () => import_asset_overview_content.AssetOverviewContent,
|
|
@@ -107,6 +109,7 @@ __export(index_exports, {
|
|
|
107
109
|
formatFdv: () => import_coins.formatFdv,
|
|
108
110
|
ipfsToHttp: () => import_ipfs.ipfsToHttp,
|
|
109
111
|
licenseSummary: () => import_license_summary.licenseSummary,
|
|
112
|
+
parsePriceDisplay: () => import_format.parsePriceDisplay,
|
|
110
113
|
shortenAddress: () => import_address.shortenAddress,
|
|
111
114
|
timeAgo: () => import_time.timeAgo,
|
|
112
115
|
timeUntil: () => import_time.timeUntil,
|
|
@@ -127,6 +130,8 @@ var import_asset_license_summary = require("./components/asset-license-summary.j
|
|
|
127
130
|
var import_asset_markets_tab = require("./components/asset-markets-tab.js");
|
|
128
131
|
var import_parent_attribution_banner = require("./components/parent-attribution-banner.js");
|
|
129
132
|
var import_asset_top_sections = require("./components/asset-top-sections.js");
|
|
133
|
+
var import_asset_collection_bar = require("./components/asset-collection-bar.js");
|
|
134
|
+
var import_asset_marketplace_panel = require("./components/asset-marketplace-panel.js");
|
|
130
135
|
var import_brand = require("./data/brand.js");
|
|
131
136
|
var import_currency_icon = require("./components/currency-icon.js");
|
|
132
137
|
var import_ip_type_badge = require("./components/ip-type-badge.js");
|
|
@@ -180,8 +185,10 @@ var import_step_nav = require("./components/step-nav.js");
|
|
|
180
185
|
AddressDisplay,
|
|
181
186
|
AssetCard,
|
|
182
187
|
AssetCardSkeleton,
|
|
188
|
+
AssetCollectionBar,
|
|
183
189
|
AssetHeaderBlock,
|
|
184
190
|
AssetLicenseSummary,
|
|
191
|
+
AssetMarketplacePanel,
|
|
185
192
|
AssetMarketsTab,
|
|
186
193
|
AssetMediaColumn,
|
|
187
194
|
AssetOverviewContent,
|
|
@@ -258,6 +265,7 @@ var import_step_nav = require("./components/step-nav.js");
|
|
|
258
265
|
formatFdv,
|
|
259
266
|
ipfsToHttp,
|
|
260
267
|
licenseSummary,
|
|
268
|
+
parsePriceDisplay,
|
|
261
269
|
shortenAddress,
|
|
262
270
|
timeAgo,
|
|
263
271
|
timeUntil,
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ── Utils ─────────────────────────────────────────────────────────────────────\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { ipfsToHttp } from \"./utils/ipfs.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\n\n// ── Data (server-safe — no React, safe in Server Components) ──────────────────\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, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport { BRAND } from \"./data/brand.js\";\n\n// ── Components (client-only — all have \"use client\") ─────────────────────────\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 { MedialaneIcon } from \"./components/brand-icon.js\";\nexport type { MedialaneIconProps } from \"./components/brand-icon.js\";\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\n// ── v0.2 additions ────────────────────────────────────────────────────────────\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps, RarityTier } from \"./components/token-card.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\n// ── Coin discovery (chain-agnostic; price/data/href injected by the app) ─────\nexport {\n coinKind, formatCoinPrice, formatFdv,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinCard, CoinRow, CoinCardSkeleton, type UseCoinPrice, type CoinTileProps } from \"./components/coin-card.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins,\n} from \"./components/coins-explorer.js\";\n\n// ── v0.3 additions ────────────────────────────────────────────────────────────\nexport { timeAgo, timeUntil } from \"./utils/time.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\n// ── v0.3.2 additions ─────────────────────────────────────────────────────────\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps } 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\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES } from \"./components/launchpad-services.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_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceCategory, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\n// ── v0.5.0 additions ─────────────────────────────────────────────────────────\nexport { NavCommandMenu, useNavCommandMenu } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\n// ── v0.6.0 additions — portfolio subnav + counts ────────────────────────────\nexport { PortfolioSubnav } from \"./components/portfolio-subnav.js\";\nexport type {\n PortfolioSubnavProps,\n PortfolioNavItem,\n PortfolioNavGroup,\n PortfolioBadgeVariant,\n} from \"./components/portfolio-subnav.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\n\n// ── v0.22.0 additions — launchpad/claim form template primitives ─────────────\n// Pure-presentation header + rail shared by every launchpad/claim form. The\n// app supplies its own gate, back button, and form logic. Requires the\n// `.btn-border-animated` class (in @medialane/ui/styles) for the form shell.\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\n// ── v0.23.0 additions — slot-based form shell ────────────────────────────────\n// Pure layout (back slot + header + animated-border compartment + 8/4 bento).\n// No auth/router — the app injects its own gate (around children) + back button.\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,gBAAmB;AACnB,oBAAmC;AACnC,qBAA+B;AAC/B,kBAA2B;AAC3B,6BAA+B;AAG/B,sBAA+C;AAE/C,gBAGO;AAEP,0BAEO;AAEP,6BAA8B;AAC9B,oCAAqC;AACrC,mCAAoC;AACpC,+BAAgC;AAChC,uCAAwC;AAExC,gCAAsE;AACtE,mBAAsB;AAGtB,2BAA6C;AAG7C,2BAAyD;AAGzD,6BAA+B;AAG/B,wBAA8B;AAE9B,wBAAkC;AAIlC,+BAAyF;AACzF,4BAA8B;AAE9B,4BAA8B;AAE9B,0BAA4B;AAE5B,6BAAuD;AAEvD,wBAA6C;AAE7C,wBAA6C;AAG7C,mBAGO;AACP,uBAA2F;AAC3F,4BAGO;AAGP,kBAAmC;AACnC,sBAAmD;AAEnD,yBAA+C;AAE/C,6BAA+B;AAE/B,0BAAiD;AAEjD,0BAA4B;AAE5B,iCAAkC;AAElC,2BAA4B;AAI5B,2BAA6B;AAE7B,+BAA2D;AAE3D,wCAAyC;AAEzC,qCAAsC;AAEtC,mCAAoC;AAEpC,2BAAsE;AAItE,gCAA6E;AAC7E,6BAA+B;AAG/B,IAAAA,6BAAwE;AAIxE,8BAAkD;AAIlD,8BAAgC;AAOhC,8BAAsC;AAOtC,4BAA8B;AAE9B,wBAA0B;AAM1B,gCAAiC;AAEjC,sBAAwB;","names":["import_launchpad_services"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ── Utils ─────────────────────────────────────────────────────────────────────\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice, parsePriceDisplay } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { ipfsToHttp } from \"./utils/ipfs.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\n\n// ── Data (server-safe — no React, safe in Server Components) ──────────────────\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, buildEditionStats } 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 { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\n\n// ── Components (client-only — all have \"use client\") ─────────────────────────\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 { MedialaneIcon } from \"./components/brand-icon.js\";\nexport type { MedialaneIconProps } from \"./components/brand-icon.js\";\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\n// ── v0.2 additions ────────────────────────────────────────────────────────────\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps, RarityTier } from \"./components/token-card.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\n// ── Coin discovery (chain-agnostic; price/data/href injected by the app) ─────\nexport {\n coinKind, formatCoinPrice, formatFdv,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinCard, CoinRow, CoinCardSkeleton, type UseCoinPrice, type CoinTileProps } from \"./components/coin-card.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins,\n} from \"./components/coins-explorer.js\";\n\n// ── v0.3 additions ────────────────────────────────────────────────────────────\nexport { timeAgo, timeUntil } from \"./utils/time.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\n// ── v0.3.2 additions ─────────────────────────────────────────────────────────\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps } 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\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES } from \"./components/launchpad-services.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_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceCategory, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\n// ── v0.5.0 additions ─────────────────────────────────────────────────────────\nexport { NavCommandMenu, useNavCommandMenu } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\n// ── v0.6.0 additions — portfolio subnav + counts ────────────────────────────\nexport { PortfolioSubnav } from \"./components/portfolio-subnav.js\";\nexport type {\n PortfolioSubnavProps,\n PortfolioNavItem,\n PortfolioNavGroup,\n PortfolioBadgeVariant,\n} from \"./components/portfolio-subnav.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\n\n// ── v0.22.0 additions — launchpad/claim form template primitives ─────────────\n// Pure-presentation header + rail shared by every launchpad/claim form. The\n// app supplies its own gate, back button, and form logic. Requires the\n// `.btn-border-animated` class (in @medialane/ui/styles) for the form shell.\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\n// ── v0.23.0 additions — slot-based form shell ────────────────────────────────\n// Pure layout (back slot + header + animated-border compartment + 8/4 bento).\n// No auth/router — the app injects its own gate (around children) + back button.\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,gBAAmB;AACnB,oBAAsD;AACtD,qBAA+B;AAC/B,kBAA2B;AAC3B,6BAA+B;AAG/B,sBAA+C;AAE/C,gBAGO;AAEP,0BAEO;AAEP,6BAA8B;AAC9B,oCAAqC;AACrC,mCAAoC;AACpC,+BAAgC;AAChC,uCAAwC;AAExC,gCAAsE;AACtE,kCAAmC;AAEnC,qCAAsC;AAEtC,mBAAsB;AAGtB,2BAA6C;AAG7C,2BAAyD;AAGzD,6BAA+B;AAG/B,wBAA8B;AAE9B,wBAAkC;AAIlC,+BAAyF;AACzF,4BAA8B;AAE9B,4BAA8B;AAE9B,0BAA4B;AAE5B,6BAAuD;AAEvD,wBAA6C;AAE7C,wBAA6C;AAG7C,mBAGO;AACP,uBAA2F;AAC3F,4BAGO;AAGP,kBAAmC;AACnC,sBAAmD;AAEnD,yBAA+C;AAE/C,6BAA+B;AAE/B,0BAAiD;AAEjD,0BAA4B;AAE5B,iCAAkC;AAElC,2BAA4B;AAI5B,2BAA6B;AAE7B,+BAA2D;AAE3D,wCAAyC;AAEzC,qCAAsC;AAEtC,mCAAoC;AAEpC,2BAAsE;AAItE,gCAA6E;AAC7E,6BAA+B;AAG/B,IAAAA,6BAAwE;AAIxE,8BAAkD;AAIlD,8BAAgC;AAOhC,8BAAsC;AAOtC,4BAA8B;AAE9B,wBAA0B;AAM1B,gCAAiC;AAEjC,sBAAwB;","names":["import_launchpad_services"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { cn } from './utils/cn.cjs';
|
|
2
|
-
export { formatDisplayPrice } from './utils/format.cjs';
|
|
2
|
+
export { formatDisplayPrice, parsePriceDisplay } from './utils/format.cjs';
|
|
3
3
|
export { shortenAddress } from './utils/address.cjs';
|
|
4
4
|
export { ipfsToHttp } from './utils/ipfs.cjs';
|
|
5
5
|
export { licenseSummary } from './utils/license-summary.cjs';
|
|
@@ -12,6 +12,8 @@ export { AssetLicenseSummary } from './components/asset-license-summary.cjs';
|
|
|
12
12
|
export { AssetMarketsTab } from './components/asset-markets-tab.cjs';
|
|
13
13
|
export { ParentAttributionBanner, ParentBannerProps } from './components/parent-attribution-banner.cjs';
|
|
14
14
|
export { AssetHeaderBlock, AssetMediaColumn, buildEditionStats } from './components/asset-top-sections.cjs';
|
|
15
|
+
export { AssetCollectionBar, AssetCollectionBarProps, AssetCollectionBarSibling } from './components/asset-collection-bar.cjs';
|
|
16
|
+
export { ApiOrderLike, AssetMarketplacePanel, AssetMarketplacePanelProps } from './components/asset-marketplace-panel.cjs';
|
|
15
17
|
export { BRAND } from './data/brand.cjs';
|
|
16
18
|
export { CurrencyAmount, CurrencyAmountProps, CurrencyIcon, CurrencyIconProps } from './components/currency-icon.cjs';
|
|
17
19
|
export { IP_TYPE_CONFIG, IP_TYPE_MAP, IpTypeBadge, IpTypeBadgeProps, IpTypeConfig } from './components/ip-type-badge.cjs';
|
|
@@ -56,5 +58,5 @@ import 'clsx';
|
|
|
56
58
|
import 'lucide-react';
|
|
57
59
|
import 'react/jsx-runtime';
|
|
58
60
|
import '@medialane/sdk';
|
|
59
|
-
import 'framer-motion';
|
|
60
61
|
import 'react';
|
|
62
|
+
import 'framer-motion';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { cn } from './utils/cn.js';
|
|
2
|
-
export { formatDisplayPrice } from './utils/format.js';
|
|
2
|
+
export { formatDisplayPrice, parsePriceDisplay } from './utils/format.js';
|
|
3
3
|
export { shortenAddress } from './utils/address.js';
|
|
4
4
|
export { ipfsToHttp } from './utils/ipfs.js';
|
|
5
5
|
export { licenseSummary } from './utils/license-summary.js';
|
|
@@ -12,6 +12,8 @@ export { AssetLicenseSummary } from './components/asset-license-summary.js';
|
|
|
12
12
|
export { AssetMarketsTab } from './components/asset-markets-tab.js';
|
|
13
13
|
export { ParentAttributionBanner, ParentBannerProps } from './components/parent-attribution-banner.js';
|
|
14
14
|
export { AssetHeaderBlock, AssetMediaColumn, buildEditionStats } from './components/asset-top-sections.js';
|
|
15
|
+
export { AssetCollectionBar, AssetCollectionBarProps, AssetCollectionBarSibling } from './components/asset-collection-bar.js';
|
|
16
|
+
export { ApiOrderLike, AssetMarketplacePanel, AssetMarketplacePanelProps } from './components/asset-marketplace-panel.js';
|
|
15
17
|
export { BRAND } from './data/brand.js';
|
|
16
18
|
export { CurrencyAmount, CurrencyAmountProps, CurrencyIcon, CurrencyIconProps } from './components/currency-icon.js';
|
|
17
19
|
export { IP_TYPE_CONFIG, IP_TYPE_MAP, IpTypeBadge, IpTypeBadgeProps, IpTypeConfig } from './components/ip-type-badge.js';
|
|
@@ -56,5 +58,5 @@ import 'clsx';
|
|
|
56
58
|
import 'lucide-react';
|
|
57
59
|
import 'react/jsx-runtime';
|
|
58
60
|
import '@medialane/sdk';
|
|
59
|
-
import 'framer-motion';
|
|
60
61
|
import 'react';
|
|
62
|
+
import 'framer-motion';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "./utils/cn.js";
|
|
2
|
-
import { formatDisplayPrice } from "./utils/format.js";
|
|
2
|
+
import { formatDisplayPrice, parsePriceDisplay } from "./utils/format.js";
|
|
3
3
|
import { shortenAddress } from "./utils/address.js";
|
|
4
4
|
import { ipfsToHttp } from "./utils/ipfs.js";
|
|
5
5
|
import { licenseSummary } from "./utils/license-summary.js";
|
|
@@ -25,6 +25,8 @@ import { AssetLicenseSummary } from "./components/asset-license-summary.js";
|
|
|
25
25
|
import { AssetMarketsTab } from "./components/asset-markets-tab.js";
|
|
26
26
|
import { ParentAttributionBanner } from "./components/parent-attribution-banner.js";
|
|
27
27
|
import { AssetMediaColumn, AssetHeaderBlock, buildEditionStats } from "./components/asset-top-sections.js";
|
|
28
|
+
import { AssetCollectionBar } from "./components/asset-collection-bar.js";
|
|
29
|
+
import { AssetMarketplacePanel } from "./components/asset-marketplace-panel.js";
|
|
28
30
|
import { BRAND } from "./data/brand.js";
|
|
29
31
|
import { CurrencyIcon, CurrencyAmount } from "./components/currency-icon.js";
|
|
30
32
|
import { IpTypeBadge, IP_TYPE_CONFIG, IP_TYPE_MAP } from "./components/ip-type-badge.js";
|
|
@@ -83,8 +85,10 @@ export {
|
|
|
83
85
|
AddressDisplay,
|
|
84
86
|
AssetCard,
|
|
85
87
|
AssetCardSkeleton,
|
|
88
|
+
AssetCollectionBar,
|
|
86
89
|
AssetHeaderBlock,
|
|
87
90
|
AssetLicenseSummary,
|
|
91
|
+
AssetMarketplacePanel,
|
|
88
92
|
AssetMarketsTab,
|
|
89
93
|
AssetMediaColumn,
|
|
90
94
|
AssetOverviewContent,
|
|
@@ -161,6 +165,7 @@ export {
|
|
|
161
165
|
formatFdv,
|
|
162
166
|
ipfsToHttp,
|
|
163
167
|
licenseSummary,
|
|
168
|
+
parsePriceDisplay,
|
|
164
169
|
shortenAddress,
|
|
165
170
|
timeAgo,
|
|
166
171
|
timeUntil,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ── Utils ─────────────────────────────────────────────────────────────────────\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { ipfsToHttp } from \"./utils/ipfs.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\n\n// ── Data (server-safe — no React, safe in Server Components) ──────────────────\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, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport { BRAND } from \"./data/brand.js\";\n\n// ── Components (client-only — all have \"use client\") ─────────────────────────\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 { MedialaneIcon } from \"./components/brand-icon.js\";\nexport type { MedialaneIconProps } from \"./components/brand-icon.js\";\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\n// ── v0.2 additions ────────────────────────────────────────────────────────────\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps, RarityTier } from \"./components/token-card.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\n// ── Coin discovery (chain-agnostic; price/data/href injected by the app) ─────\nexport {\n coinKind, formatCoinPrice, formatFdv,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinCard, CoinRow, CoinCardSkeleton, type UseCoinPrice, type CoinTileProps } from \"./components/coin-card.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins,\n} from \"./components/coins-explorer.js\";\n\n// ── v0.3 additions ────────────────────────────────────────────────────────────\nexport { timeAgo, timeUntil } from \"./utils/time.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\n// ── v0.3.2 additions ─────────────────────────────────────────────────────────\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps } 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\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES } from \"./components/launchpad-services.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_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceCategory, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\n// ── v0.5.0 additions ─────────────────────────────────────────────────────────\nexport { NavCommandMenu, useNavCommandMenu } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\n// ── v0.6.0 additions — portfolio subnav + counts ────────────────────────────\nexport { PortfolioSubnav } from \"./components/portfolio-subnav.js\";\nexport type {\n PortfolioSubnavProps,\n PortfolioNavItem,\n PortfolioNavGroup,\n PortfolioBadgeVariant,\n} from \"./components/portfolio-subnav.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\n\n// ── v0.22.0 additions — launchpad/claim form template primitives ─────────────\n// Pure-presentation header + rail shared by every launchpad/claim form. The\n// app supplies its own gate, back button, and form logic. Requires the\n// `.btn-border-animated` class (in @medialane/ui/styles) for the form shell.\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\n// ── v0.23.0 additions — slot-based form shell ────────────────────────────────\n// Pure layout (back slot + header + animated-border compartment + 8/4 bento).\n// No auth/router — the app injects its own gate (around children) + back button.\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n"],"mappings":"AACA,SAAS,UAAU;AACnB,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAG/B,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,yBAAyB;AACtE,SAAS,aAAa;AAGtB,SAAS,cAAc,sBAAsB;AAG7C,SAAS,aAAa,gBAAgB,mBAAmB;AAGzD,SAAS,sBAAsB;AAG/B,SAAS,qBAAqB;AAE9B,SAAS,yBAAyB;AAIlC,SAAS,YAAY,QAAQ,SAAS,aAAa,cAAc,QAAQ,gBAAgB;AACzF,SAAS,qBAAqB;AAE9B,SAAS,qBAAqB;AAE9B,SAAS,mBAAmB;AAE5B,SAAS,gBAAgB,8BAA8B;AAEvD,SAAS,WAAW,yBAAyB;AAE7C,SAAS,WAAW,yBAAyB;AAG7C;AAAA,EACE;AAAA,EAAU;AAAA,EAAiB;AAAA,OAEtB;AACP,SAAS,UAAU,SAAS,wBAA+D;AAC3F;AAAA,EACE;AAAA,OAEK;AAGP,SAAS,SAAS,iBAAiB;AACnC,SAAS,sBAAsB,oBAAoB;AAEnD,SAAS,YAAY,0BAA0B;AAE/C,SAAS,sBAAsB;AAE/B,SAAS,aAAa,2BAA2B;AAEjD,SAAS,mBAAmB;AAE5B,SAAS,yBAAyB;AAElC,SAAS,mBAAmB;AAI5B,SAAS,oBAAoB;AAE7B,SAAS,kBAAkB,gCAAgC;AAE3D,SAAS,gCAAgC;AAEzC,SAAS,6BAA6B;AAEtC,SAAS,2BAA2B;AAEpC,SAAS,cAAc,sBAAsB,yBAAyB;AAItE,SAAS,0BAA0B,sBAAsB,oBAAoB;AAC7E,SAAS,sBAAsB;AAG/B,SAAS,+BAA+B,gCAAgC;AAIxE,SAAS,gBAAgB,yBAAyB;AAIlD,SAAS,uBAAuB;AAOhC,SAAS,6BAA6B;AAOtC,SAAS,qBAAqB;AAE9B,SAAS,iBAAiB;AAM1B,SAAS,wBAAwB;AAEjC,SAAS,eAAe;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ── Utils ─────────────────────────────────────────────────────────────────────\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice, parsePriceDisplay } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { ipfsToHttp } from \"./utils/ipfs.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\n\n// ── Data (server-safe — no React, safe in Server Components) ──────────────────\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, buildEditionStats } 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 { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\n\n// ── Components (client-only — all have \"use client\") ─────────────────────────\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 { MedialaneIcon } from \"./components/brand-icon.js\";\nexport type { MedialaneIconProps } from \"./components/brand-icon.js\";\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\n// ── v0.2 additions ────────────────────────────────────────────────────────────\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps, RarityTier } from \"./components/token-card.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\n// ── Coin discovery (chain-agnostic; price/data/href injected by the app) ─────\nexport {\n coinKind, formatCoinPrice, formatFdv,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinCard, CoinRow, CoinCardSkeleton, type UseCoinPrice, type CoinTileProps } from \"./components/coin-card.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins,\n} from \"./components/coins-explorer.js\";\n\n// ── v0.3 additions ────────────────────────────────────────────────────────────\nexport { timeAgo, timeUntil } from \"./utils/time.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\n// ── v0.3.2 additions ─────────────────────────────────────────────────────────\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps } 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\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES } from \"./components/launchpad-services.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_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceCategory, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\n// ── v0.5.0 additions ─────────────────────────────────────────────────────────\nexport { NavCommandMenu, useNavCommandMenu } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\n// ── v0.6.0 additions — portfolio subnav + counts ────────────────────────────\nexport { PortfolioSubnav } from \"./components/portfolio-subnav.js\";\nexport type {\n PortfolioSubnavProps,\n PortfolioNavItem,\n PortfolioNavGroup,\n PortfolioBadgeVariant,\n} from \"./components/portfolio-subnav.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\n\n// ── v0.22.0 additions — launchpad/claim form template primitives ─────────────\n// Pure-presentation header + rail shared by every launchpad/claim form. The\n// app supplies its own gate, back button, and form logic. Requires the\n// `.btn-border-animated` class (in @medialane/ui/styles) for the form shell.\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\n// ── v0.23.0 additions — slot-based form shell ────────────────────────────────\n// Pure layout (back slot + header + animated-border compartment + 8/4 bento).\n// No auth/router — the app injects its own gate (around children) + back button.\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n"],"mappings":"AACA,SAAS,UAAU;AACnB,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAG/B,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,yBAAyB;AACtE,SAAS,0BAA0B;AAEnC,SAAS,6BAA6B;AAEtC,SAAS,aAAa;AAGtB,SAAS,cAAc,sBAAsB;AAG7C,SAAS,aAAa,gBAAgB,mBAAmB;AAGzD,SAAS,sBAAsB;AAG/B,SAAS,qBAAqB;AAE9B,SAAS,yBAAyB;AAIlC,SAAS,YAAY,QAAQ,SAAS,aAAa,cAAc,QAAQ,gBAAgB;AACzF,SAAS,qBAAqB;AAE9B,SAAS,qBAAqB;AAE9B,SAAS,mBAAmB;AAE5B,SAAS,gBAAgB,8BAA8B;AAEvD,SAAS,WAAW,yBAAyB;AAE7C,SAAS,WAAW,yBAAyB;AAG7C;AAAA,EACE;AAAA,EAAU;AAAA,EAAiB;AAAA,OAEtB;AACP,SAAS,UAAU,SAAS,wBAA+D;AAC3F;AAAA,EACE;AAAA,OAEK;AAGP,SAAS,SAAS,iBAAiB;AACnC,SAAS,sBAAsB,oBAAoB;AAEnD,SAAS,YAAY,0BAA0B;AAE/C,SAAS,sBAAsB;AAE/B,SAAS,aAAa,2BAA2B;AAEjD,SAAS,mBAAmB;AAE5B,SAAS,yBAAyB;AAElC,SAAS,mBAAmB;AAI5B,SAAS,oBAAoB;AAE7B,SAAS,kBAAkB,gCAAgC;AAE3D,SAAS,gCAAgC;AAEzC,SAAS,6BAA6B;AAEtC,SAAS,2BAA2B;AAEpC,SAAS,cAAc,sBAAsB,yBAAyB;AAItE,SAAS,0BAA0B,sBAAsB,oBAAoB;AAC7E,SAAS,sBAAsB;AAG/B,SAAS,+BAA+B,gCAAgC;AAIxE,SAAS,gBAAgB,yBAAyB;AAIlD,SAAS,uBAAuB;AAOhC,SAAS,6BAA6B;AAOtC,SAAS,qBAAqB;AAE9B,SAAS,iBAAiB;AAM1B,SAAS,wBAAwB;AAEjC,SAAS,eAAe;","names":[]}
|
package/dist/utils/format.cjs
CHANGED
|
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var format_exports = {};
|
|
20
20
|
__export(format_exports, {
|
|
21
|
-
formatDisplayPrice: () => formatDisplayPrice
|
|
21
|
+
formatDisplayPrice: () => formatDisplayPrice,
|
|
22
|
+
parsePriceDisplay: () => parsePriceDisplay
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(format_exports);
|
|
24
25
|
function adaptiveDecimals(num) {
|
|
@@ -42,8 +43,22 @@ function formatDisplayPrice(price) {
|
|
|
42
43
|
});
|
|
43
44
|
return currencyPart ? `${formatted} ${currencyPart}` : formatted;
|
|
44
45
|
}
|
|
46
|
+
function parsePriceDisplay(raw) {
|
|
47
|
+
if (!raw) return { numStr: "\u2014", symbol: null };
|
|
48
|
+
const parts = raw.trim().split(" ");
|
|
49
|
+
const sym = parts.length > 1 ? parts[parts.length - 1] : null;
|
|
50
|
+
const numericPart = sym ? parts.slice(0, -1).join(" ") : raw;
|
|
51
|
+
const num = Number(numericPart);
|
|
52
|
+
if (isNaN(num)) return { numStr: "\u2014", symbol: sym };
|
|
53
|
+
if (num > 1e12) return { numStr: "\u2014", symbol: null };
|
|
54
|
+
const formatted = formatDisplayPrice(numericPart);
|
|
55
|
+
if (!formatted || formatted === "\u2014") return { numStr: "\u2014", symbol: sym };
|
|
56
|
+
const clean = formatted.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
57
|
+
return { numStr: clean || "\u2014", symbol: sym };
|
|
58
|
+
}
|
|
45
59
|
// Annotate the CommonJS export names for ESM import in node:
|
|
46
60
|
0 && (module.exports = {
|
|
47
|
-
formatDisplayPrice
|
|
61
|
+
formatDisplayPrice,
|
|
62
|
+
parsePriceDisplay
|
|
48
63
|
});
|
|
49
64
|
//# sourceMappingURL=format.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/format.ts"],"sourcesContent":["function adaptiveDecimals(num: number): number {\n if (num === 0 || num >= 1) return 2;\n if (num >= 0.01) return 4;\n const leadingZeros = Math.floor(-Math.log10(Math.abs(num)));\n return leadingZeros + 2;\n}\n\n/**\n * Format a display price string with adaptive decimal places.\n * Handles \"1.234 USDC\" format — reformats the numeric part, preserves the symbol.\n */\nexport function formatDisplayPrice(price: string | number | null | undefined): string {\n if (price === null || price === undefined) return \"\";\n const priceStr = String(price);\n const parts = priceStr.split(\" \");\n const numericPart = parts[0];\n const currencyPart = parts.length > 1 ? parts.slice(1).join(\" \") : \"\";\n const num = Number(numericPart);\n if (isNaN(num)) return priceStr;\n const maxDecimals = adaptiveDecimals(num);\n const formatted = num.toLocaleString(undefined, {\n minimumFractionDigits: Math.min(2, maxDecimals),\n maximumFractionDigits: maxDecimals,\n });\n return currencyPart ? `${formatted} ${currencyPart}` : formatted;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,iBAAiB,KAAqB;AAC7C,MAAI,QAAQ,KAAK,OAAO,EAAG,QAAO;AAClC,MAAI,OAAO,KAAM,QAAO;AACxB,QAAM,eAAe,KAAK,MAAM,CAAC,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,CAAC;AAC1D,SAAO,eAAe;AACxB;AAMO,SAAS,mBAAmB,OAAmD;AACpF,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,QAAM,WAAW,OAAO,KAAK;AAC7B,QAAM,QAAQ,SAAS,MAAM,GAAG;AAChC,QAAM,cAAc,MAAM,CAAC;AAC3B,QAAM,eAAe,MAAM,SAAS,IAAI,MAAM,MAAM,CAAC,EAAE,KAAK,GAAG,IAAI;AACnE,QAAM,MAAM,OAAO,WAAW;AAC9B,MAAI,MAAM,GAAG,EAAG,QAAO;AACvB,QAAM,cAAc,iBAAiB,GAAG;AACxC,QAAM,YAAY,IAAI,eAAe,QAAW;AAAA,IAC9C,uBAAuB,KAAK,IAAI,GAAG,WAAW;AAAA,IAC9C,uBAAuB;AAAA,EACzB,CAAC;AACD,SAAO,eAAe,GAAG,SAAS,IAAI,YAAY,KAAK;AACzD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/format.ts"],"sourcesContent":["function adaptiveDecimals(num: number): number {\n if (num === 0 || num >= 1) return 2;\n if (num >= 0.01) return 4;\n const leadingZeros = Math.floor(-Math.log10(Math.abs(num)));\n return leadingZeros + 2;\n}\n\n/**\n * Format a display price string with adaptive decimal places.\n * Handles \"1.234 USDC\" format — reformats the numeric part, preserves the symbol.\n */\nexport function formatDisplayPrice(price: string | number | null | undefined): string {\n if (price === null || price === undefined) return \"\";\n const priceStr = String(price);\n const parts = priceStr.split(\" \");\n const numericPart = parts[0];\n const currencyPart = parts.length > 1 ? parts.slice(1).join(\" \") : \"\";\n const num = Number(numericPart);\n if (isNaN(num)) return priceStr;\n const maxDecimals = adaptiveDecimals(num);\n const formatted = num.toLocaleString(undefined, {\n minimumFractionDigits: Math.min(2, maxDecimals),\n maximumFractionDigits: maxDecimals,\n });\n return currencyPart ? `${formatted} ${currencyPart}` : formatted;\n}\n\n/**\n * Parse a backend price string like \"0.000012000000 WBTC\" into a clean display + symbol.\n * Strips trailing zeros (\"1.500000\" → \"1.50\"); guards against raw-wei values (> 1e12 → \"—\").\n */\nexport function parsePriceDisplay(raw: string | null | undefined): { numStr: string; symbol: string | null } {\n if (!raw) return { numStr: \"—\", symbol: null };\n const parts = raw.trim().split(\" \");\n const sym = parts.length > 1 ? parts[parts.length - 1] : null;\n const numericPart = sym ? parts.slice(0, -1).join(\" \") : raw;\n const num = Number(numericPart);\n if (isNaN(num)) return { numStr: \"—\", symbol: sym };\n if (num > 1e12) return { numStr: \"—\", symbol: null };\n const formatted = formatDisplayPrice(numericPart);\n if (!formatted || formatted === \"—\") return { numStr: \"—\", symbol: sym };\n const clean = formatted.replace(/(\\.\\d*?)0+$/, \"$1\").replace(/\\.$/, \"\");\n return { numStr: clean || \"—\", symbol: sym };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,iBAAiB,KAAqB;AAC7C,MAAI,QAAQ,KAAK,OAAO,EAAG,QAAO;AAClC,MAAI,OAAO,KAAM,QAAO;AACxB,QAAM,eAAe,KAAK,MAAM,CAAC,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,CAAC;AAC1D,SAAO,eAAe;AACxB;AAMO,SAAS,mBAAmB,OAAmD;AACpF,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,QAAM,WAAW,OAAO,KAAK;AAC7B,QAAM,QAAQ,SAAS,MAAM,GAAG;AAChC,QAAM,cAAc,MAAM,CAAC;AAC3B,QAAM,eAAe,MAAM,SAAS,IAAI,MAAM,MAAM,CAAC,EAAE,KAAK,GAAG,IAAI;AACnE,QAAM,MAAM,OAAO,WAAW;AAC9B,MAAI,MAAM,GAAG,EAAG,QAAO;AACvB,QAAM,cAAc,iBAAiB,GAAG;AACxC,QAAM,YAAY,IAAI,eAAe,QAAW;AAAA,IAC9C,uBAAuB,KAAK,IAAI,GAAG,WAAW;AAAA,IAC9C,uBAAuB;AAAA,EACzB,CAAC;AACD,SAAO,eAAe,GAAG,SAAS,IAAI,YAAY,KAAK;AACzD;AAMO,SAAS,kBAAkB,KAA2E;AAC3G,MAAI,CAAC,IAAK,QAAO,EAAE,QAAQ,UAAK,QAAQ,KAAK;AAC7C,QAAM,QAAQ,IAAI,KAAK,EAAE,MAAM,GAAG;AAClC,QAAM,MAAM,MAAM,SAAS,IAAI,MAAM,MAAM,SAAS,CAAC,IAAI;AACzD,QAAM,cAAc,MAAM,MAAM,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,IAAI;AACzD,QAAM,MAAM,OAAO,WAAW;AAC9B,MAAI,MAAM,GAAG,EAAG,QAAO,EAAE,QAAQ,UAAK,QAAQ,IAAI;AAClD,MAAI,MAAM,KAAM,QAAO,EAAE,QAAQ,UAAK,QAAQ,KAAK;AACnD,QAAM,YAAY,mBAAmB,WAAW;AAChD,MAAI,CAAC,aAAa,cAAc,SAAK,QAAO,EAAE,QAAQ,UAAK,QAAQ,IAAI;AACvE,QAAM,QAAQ,UAAU,QAAQ,eAAe,IAAI,EAAE,QAAQ,OAAO,EAAE;AACtE,SAAO,EAAE,QAAQ,SAAS,UAAK,QAAQ,IAAI;AAC7C;","names":[]}
|
package/dist/utils/format.d.cts
CHANGED
|
@@ -3,5 +3,13 @@
|
|
|
3
3
|
* Handles "1.234 USDC" format — reformats the numeric part, preserves the symbol.
|
|
4
4
|
*/
|
|
5
5
|
declare function formatDisplayPrice(price: string | number | null | undefined): string;
|
|
6
|
+
/**
|
|
7
|
+
* Parse a backend price string like "0.000012000000 WBTC" into a clean display + symbol.
|
|
8
|
+
* Strips trailing zeros ("1.500000" → "1.50"); guards against raw-wei values (> 1e12 → "—").
|
|
9
|
+
*/
|
|
10
|
+
declare function parsePriceDisplay(raw: string | null | undefined): {
|
|
11
|
+
numStr: string;
|
|
12
|
+
symbol: string | null;
|
|
13
|
+
};
|
|
6
14
|
|
|
7
|
-
export { formatDisplayPrice };
|
|
15
|
+
export { formatDisplayPrice, parsePriceDisplay };
|
package/dist/utils/format.d.ts
CHANGED
|
@@ -3,5 +3,13 @@
|
|
|
3
3
|
* Handles "1.234 USDC" format — reformats the numeric part, preserves the symbol.
|
|
4
4
|
*/
|
|
5
5
|
declare function formatDisplayPrice(price: string | number | null | undefined): string;
|
|
6
|
+
/**
|
|
7
|
+
* Parse a backend price string like "0.000012000000 WBTC" into a clean display + symbol.
|
|
8
|
+
* Strips trailing zeros ("1.500000" → "1.50"); guards against raw-wei values (> 1e12 → "—").
|
|
9
|
+
*/
|
|
10
|
+
declare function parsePriceDisplay(raw: string | null | undefined): {
|
|
11
|
+
numStr: string;
|
|
12
|
+
symbol: string | null;
|
|
13
|
+
};
|
|
6
14
|
|
|
7
|
-
export { formatDisplayPrice };
|
|
15
|
+
export { formatDisplayPrice, parsePriceDisplay };
|
package/dist/utils/format.js
CHANGED
|
@@ -19,7 +19,21 @@ function formatDisplayPrice(price) {
|
|
|
19
19
|
});
|
|
20
20
|
return currencyPart ? `${formatted} ${currencyPart}` : formatted;
|
|
21
21
|
}
|
|
22
|
+
function parsePriceDisplay(raw) {
|
|
23
|
+
if (!raw) return { numStr: "\u2014", symbol: null };
|
|
24
|
+
const parts = raw.trim().split(" ");
|
|
25
|
+
const sym = parts.length > 1 ? parts[parts.length - 1] : null;
|
|
26
|
+
const numericPart = sym ? parts.slice(0, -1).join(" ") : raw;
|
|
27
|
+
const num = Number(numericPart);
|
|
28
|
+
if (isNaN(num)) return { numStr: "\u2014", symbol: sym };
|
|
29
|
+
if (num > 1e12) return { numStr: "\u2014", symbol: null };
|
|
30
|
+
const formatted = formatDisplayPrice(numericPart);
|
|
31
|
+
if (!formatted || formatted === "\u2014") return { numStr: "\u2014", symbol: sym };
|
|
32
|
+
const clean = formatted.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
33
|
+
return { numStr: clean || "\u2014", symbol: sym };
|
|
34
|
+
}
|
|
22
35
|
export {
|
|
23
|
-
formatDisplayPrice
|
|
36
|
+
formatDisplayPrice,
|
|
37
|
+
parsePriceDisplay
|
|
24
38
|
};
|
|
25
39
|
//# sourceMappingURL=format.js.map
|
package/dist/utils/format.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/format.ts"],"sourcesContent":["function adaptiveDecimals(num: number): number {\n if (num === 0 || num >= 1) return 2;\n if (num >= 0.01) return 4;\n const leadingZeros = Math.floor(-Math.log10(Math.abs(num)));\n return leadingZeros + 2;\n}\n\n/**\n * Format a display price string with adaptive decimal places.\n * Handles \"1.234 USDC\" format — reformats the numeric part, preserves the symbol.\n */\nexport function formatDisplayPrice(price: string | number | null | undefined): string {\n if (price === null || price === undefined) return \"\";\n const priceStr = String(price);\n const parts = priceStr.split(\" \");\n const numericPart = parts[0];\n const currencyPart = parts.length > 1 ? parts.slice(1).join(\" \") : \"\";\n const num = Number(numericPart);\n if (isNaN(num)) return priceStr;\n const maxDecimals = adaptiveDecimals(num);\n const formatted = num.toLocaleString(undefined, {\n minimumFractionDigits: Math.min(2, maxDecimals),\n maximumFractionDigits: maxDecimals,\n });\n return currencyPart ? `${formatted} ${currencyPart}` : formatted;\n}\n"],"mappings":"AAAA,SAAS,iBAAiB,KAAqB;AAC7C,MAAI,QAAQ,KAAK,OAAO,EAAG,QAAO;AAClC,MAAI,OAAO,KAAM,QAAO;AACxB,QAAM,eAAe,KAAK,MAAM,CAAC,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,CAAC;AAC1D,SAAO,eAAe;AACxB;AAMO,SAAS,mBAAmB,OAAmD;AACpF,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,QAAM,WAAW,OAAO,KAAK;AAC7B,QAAM,QAAQ,SAAS,MAAM,GAAG;AAChC,QAAM,cAAc,MAAM,CAAC;AAC3B,QAAM,eAAe,MAAM,SAAS,IAAI,MAAM,MAAM,CAAC,EAAE,KAAK,GAAG,IAAI;AACnE,QAAM,MAAM,OAAO,WAAW;AAC9B,MAAI,MAAM,GAAG,EAAG,QAAO;AACvB,QAAM,cAAc,iBAAiB,GAAG;AACxC,QAAM,YAAY,IAAI,eAAe,QAAW;AAAA,IAC9C,uBAAuB,KAAK,IAAI,GAAG,WAAW;AAAA,IAC9C,uBAAuB;AAAA,EACzB,CAAC;AACD,SAAO,eAAe,GAAG,SAAS,IAAI,YAAY,KAAK;AACzD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/format.ts"],"sourcesContent":["function adaptiveDecimals(num: number): number {\n if (num === 0 || num >= 1) return 2;\n if (num >= 0.01) return 4;\n const leadingZeros = Math.floor(-Math.log10(Math.abs(num)));\n return leadingZeros + 2;\n}\n\n/**\n * Format a display price string with adaptive decimal places.\n * Handles \"1.234 USDC\" format — reformats the numeric part, preserves the symbol.\n */\nexport function formatDisplayPrice(price: string | number | null | undefined): string {\n if (price === null || price === undefined) return \"\";\n const priceStr = String(price);\n const parts = priceStr.split(\" \");\n const numericPart = parts[0];\n const currencyPart = parts.length > 1 ? parts.slice(1).join(\" \") : \"\";\n const num = Number(numericPart);\n if (isNaN(num)) return priceStr;\n const maxDecimals = adaptiveDecimals(num);\n const formatted = num.toLocaleString(undefined, {\n minimumFractionDigits: Math.min(2, maxDecimals),\n maximumFractionDigits: maxDecimals,\n });\n return currencyPart ? `${formatted} ${currencyPart}` : formatted;\n}\n\n/**\n * Parse a backend price string like \"0.000012000000 WBTC\" into a clean display + symbol.\n * Strips trailing zeros (\"1.500000\" → \"1.50\"); guards against raw-wei values (> 1e12 → \"—\").\n */\nexport function parsePriceDisplay(raw: string | null | undefined): { numStr: string; symbol: string | null } {\n if (!raw) return { numStr: \"—\", symbol: null };\n const parts = raw.trim().split(\" \");\n const sym = parts.length > 1 ? parts[parts.length - 1] : null;\n const numericPart = sym ? parts.slice(0, -1).join(\" \") : raw;\n const num = Number(numericPart);\n if (isNaN(num)) return { numStr: \"—\", symbol: sym };\n if (num > 1e12) return { numStr: \"—\", symbol: null };\n const formatted = formatDisplayPrice(numericPart);\n if (!formatted || formatted === \"—\") return { numStr: \"—\", symbol: sym };\n const clean = formatted.replace(/(\\.\\d*?)0+$/, \"$1\").replace(/\\.$/, \"\");\n return { numStr: clean || \"—\", symbol: sym };\n}\n"],"mappings":"AAAA,SAAS,iBAAiB,KAAqB;AAC7C,MAAI,QAAQ,KAAK,OAAO,EAAG,QAAO;AAClC,MAAI,OAAO,KAAM,QAAO;AACxB,QAAM,eAAe,KAAK,MAAM,CAAC,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,CAAC;AAC1D,SAAO,eAAe;AACxB;AAMO,SAAS,mBAAmB,OAAmD;AACpF,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,QAAM,WAAW,OAAO,KAAK;AAC7B,QAAM,QAAQ,SAAS,MAAM,GAAG;AAChC,QAAM,cAAc,MAAM,CAAC;AAC3B,QAAM,eAAe,MAAM,SAAS,IAAI,MAAM,MAAM,CAAC,EAAE,KAAK,GAAG,IAAI;AACnE,QAAM,MAAM,OAAO,WAAW;AAC9B,MAAI,MAAM,GAAG,EAAG,QAAO;AACvB,QAAM,cAAc,iBAAiB,GAAG;AACxC,QAAM,YAAY,IAAI,eAAe,QAAW;AAAA,IAC9C,uBAAuB,KAAK,IAAI,GAAG,WAAW;AAAA,IAC9C,uBAAuB;AAAA,EACzB,CAAC;AACD,SAAO,eAAe,GAAG,SAAS,IAAI,YAAY,KAAK;AACzD;AAMO,SAAS,kBAAkB,KAA2E;AAC3G,MAAI,CAAC,IAAK,QAAO,EAAE,QAAQ,UAAK,QAAQ,KAAK;AAC7C,QAAM,QAAQ,IAAI,KAAK,EAAE,MAAM,GAAG;AAClC,QAAM,MAAM,MAAM,SAAS,IAAI,MAAM,MAAM,SAAS,CAAC,IAAI;AACzD,QAAM,cAAc,MAAM,MAAM,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,IAAI;AACzD,QAAM,MAAM,OAAO,WAAW;AAC9B,MAAI,MAAM,GAAG,EAAG,QAAO,EAAE,QAAQ,UAAK,QAAQ,IAAI;AAClD,MAAI,MAAM,KAAM,QAAO,EAAE,QAAQ,UAAK,QAAQ,KAAK;AACnD,QAAM,YAAY,mBAAmB,WAAW;AAChD,MAAI,CAAC,aAAa,cAAc,SAAK,QAAO,EAAE,QAAQ,UAAK,QAAQ,IAAI;AACvE,QAAM,QAAQ,UAAU,QAAQ,eAAe,IAAI,EAAE,QAAQ,OAAO,EAAE;AACtE,SAAO,EAAE,QAAQ,SAAS,UAAK,QAAQ,IAAI;AAC7C;","names":[]}
|