@medialane/ui 0.105.0 → 0.107.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/asset-lightbox.cjs +66 -0
- package/dist/components/asset-lightbox.cjs.map +1 -0
- package/dist/components/asset-lightbox.d.cts +11 -0
- package/dist/components/asset-lightbox.d.ts +11 -0
- package/dist/components/asset-lightbox.js +42 -0
- package/dist/components/asset-lightbox.js.map +1 -0
- package/dist/components/club-owner-actions.cjs +56 -0
- package/dist/components/club-owner-actions.cjs.map +1 -0
- package/dist/components/club-owner-actions.d.cts +11 -0
- package/dist/components/club-owner-actions.d.ts +11 -0
- package/dist/components/club-owner-actions.js +22 -0
- package/dist/components/club-owner-actions.js.map +1 -0
- package/dist/components/collection-activity-tab.cjs +60 -0
- package/dist/components/collection-activity-tab.cjs.map +1 -0
- package/dist/components/collection-activity-tab.d.cts +10 -0
- package/dist/components/collection-activity-tab.d.ts +10 -0
- package/dist/components/collection-activity-tab.js +36 -0
- package/dist/components/collection-activity-tab.js.map +1 -0
- package/dist/components/collection-traits-tab.cjs +79 -0
- package/dist/components/collection-traits-tab.cjs.map +1 -0
- package/dist/components/collection-traits-tab.d.cts +10 -0
- package/dist/components/collection-traits-tab.d.ts +10 -0
- package/dist/components/collection-traits-tab.js +55 -0
- package/dist/components/collection-traits-tab.js.map +1 -0
- package/dist/components/create-form-primitives.cjs +61 -0
- package/dist/components/create-form-primitives.cjs.map +1 -0
- package/dist/components/create-form-primitives.d.cts +16 -0
- package/dist/components/create-form-primitives.d.ts +16 -0
- package/dist/components/create-form-primitives.js +36 -0
- package/dist/components/create-form-primitives.js.map +1 -0
- package/dist/components/creation-record.cjs +86 -0
- package/dist/components/creation-record.cjs.map +1 -0
- package/dist/components/creation-record.d.cts +14 -0
- package/dist/components/creation-record.d.ts +14 -0
- package/dist/components/creation-record.js +52 -0
- package/dist/components/creation-record.js.map +1 -0
- package/dist/components/creator-chip.cjs +58 -0
- package/dist/components/creator-chip.cjs.map +1 -0
- package/dist/components/creator-chip.d.cts +10 -0
- package/dist/components/creator-chip.d.ts +10 -0
- package/dist/components/creator-chip.js +24 -0
- package/dist/components/creator-chip.js.map +1 -0
- package/dist/components/creator-score-inline.cjs +52 -0
- package/dist/components/creator-score-inline.cjs.map +1 -0
- package/dist/components/creator-score-inline.d.cts +19 -0
- package/dist/components/creator-score-inline.d.ts +19 -0
- package/dist/components/creator-score-inline.js +18 -0
- package/dist/components/creator-score-inline.js.map +1 -0
- package/dist/components/dialog.d.cts +9 -9
- package/dist/components/dialog.d.ts +9 -9
- package/dist/components/ip-type-fields.cjs +307 -0
- package/dist/components/ip-type-fields.cjs.map +1 -0
- package/dist/components/ip-type-fields.d.cts +17 -0
- package/dist/components/ip-type-fields.d.ts +17 -0
- package/dist/components/ip-type-fields.js +293 -0
- package/dist/components/ip-type-fields.js.map +1 -0
- package/dist/components/json-ld.cjs +39 -0
- package/dist/components/json-ld.cjs.map +1 -0
- package/dist/components/json-ld.d.cts +8 -0
- package/dist/components/json-ld.d.ts +8 -0
- package/dist/components/json-ld.js +15 -0
- package/dist/components/json-ld.js.map +1 -0
- package/dist/components/nav-theme-toggle.cjs +66 -0
- package/dist/components/nav-theme-toggle.cjs.map +1 -0
- package/dist/components/nav-theme-toggle.d.cts +9 -0
- package/dist/components/nav-theme-toggle.d.ts +9 -0
- package/dist/components/nav-theme-toggle.js +42 -0
- package/dist/components/nav-theme-toggle.js.map +1 -0
- package/dist/components/order-sort-control.cjs +58 -0
- package/dist/components/order-sort-control.cjs.map +1 -0
- package/dist/components/order-sort-control.d.cts +13 -0
- package/dist/components/order-sort-control.d.ts +13 -0
- package/dist/components/order-sort-control.js +39 -0
- package/dist/components/order-sort-control.js.map +1 -0
- package/dist/components/portfolio-activity.cjs +117 -0
- package/dist/components/portfolio-activity.cjs.map +1 -0
- package/dist/components/portfolio-activity.d.cts +10 -0
- package/dist/components/portfolio-activity.d.ts +10 -0
- package/dist/components/portfolio-activity.js +93 -0
- package/dist/components/portfolio-activity.js.map +1 -0
- package/dist/components/price-history-chart.cjs +130 -0
- package/dist/components/price-history-chart.cjs.map +1 -0
- package/dist/components/price-history-chart.d.cts +9 -0
- package/dist/components/price-history-chart.d.ts +9 -0
- package/dist/components/price-history-chart.js +114 -0
- package/dist/components/price-history-chart.js.map +1 -0
- package/dist/components/sheet.cjs +160 -0
- package/dist/components/sheet.cjs.map +1 -0
- package/dist/components/sheet.d.cts +30 -0
- package/dist/components/sheet.d.ts +30 -0
- package/dist/components/sheet.js +117 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/textarea.cjs +57 -0
- package/dist/components/textarea.cjs.map +1 -0
- package/dist/components/textarea.d.cts +6 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.js +23 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/index.cjs +110 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +88 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/format-activity.cjs +143 -0
- package/dist/utils/format-activity.cjs.map +1 -0
- package/dist/utils/format-activity.d.cts +14 -0
- package/dist/utils/format-activity.d.ts +14 -0
- package/dist/utils/format-activity.js +116 -0
- package/dist/utils/format-activity.js.map +1 -0
- package/dist/utils/proxy-body.cjs +60 -0
- package/dist/utils/proxy-body.cjs.map +1 -0
- package/dist/utils/proxy-body.d.cts +22 -0
- package/dist/utils/proxy-body.d.ts +22 -0
- package/dist/utils/proxy-body.js +36 -0
- package/dist/utils/proxy-body.js.map +1 -0
- package/dist/utils/query-keys.cjs +80 -0
- package/dist/utils/query-keys.cjs.map +1 -0
- package/dist/utils/query-keys.d.cts +39 -0
- package/dist/utils/query-keys.d.ts +39 -0
- package/dist/utils/query-keys.js +54 -0
- package/dist/utils/query-keys.js.map +1 -0
- package/dist/utils/use-activities.cjs +68 -0
- package/dist/utils/use-activities.cjs.map +1 -0
- package/dist/utils/use-activities.d.cts +20 -0
- package/dist/utils/use-activities.d.ts +20 -0
- package/dist/utils/use-activities.js +33 -0
- package/dist/utils/use-activities.js.map +1 -0
- package/dist/utils/use-collections.cjs +113 -0
- package/dist/utils/use-collections.cjs.map +1 -0
- package/dist/utils/use-collections.d.cts +43 -0
- package/dist/utils/use-collections.d.ts +43 -0
- package/dist/utils/use-collections.js +75 -0
- package/dist/utils/use-collections.js.map +1 -0
- package/dist/utils/use-profiles.cjs +69 -0
- package/dist/utils/use-profiles.cjs.map +1 -0
- package/dist/utils/use-profiles.d.cts +18 -0
- package/dist/utils/use-profiles.d.ts +18 -0
- package/dist/utils/use-profiles.js +34 -0
- package/dist/utils/use-profiles.js.map +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -176,6 +176,50 @@ import {
|
|
|
176
176
|
FormMessage,
|
|
177
177
|
FormField
|
|
178
178
|
} from "./components/form.js";
|
|
179
|
+
import { Textarea } from "./components/textarea.js";
|
|
180
|
+
import {
|
|
181
|
+
Sheet,
|
|
182
|
+
SheetPortal,
|
|
183
|
+
SheetOverlay,
|
|
184
|
+
SheetTrigger,
|
|
185
|
+
SheetClose,
|
|
186
|
+
SheetContent,
|
|
187
|
+
SheetHeader,
|
|
188
|
+
SheetFooter,
|
|
189
|
+
SheetTitle,
|
|
190
|
+
SheetDescription
|
|
191
|
+
} from "./components/sheet.js";
|
|
192
|
+
import { ToggleGroup, Section } from "./components/create-form-primitives.js";
|
|
193
|
+
import { OrderSortControl, sortOrders } from "./components/order-sort-control.js";
|
|
194
|
+
import { AssetLightbox } from "./components/asset-lightbox.js";
|
|
195
|
+
import { PriceHistoryChart } from "./components/price-history-chart.js";
|
|
196
|
+
import { NavThemeToggle } from "./components/nav-theme-toggle.js";
|
|
197
|
+
import { JsonLd } from "./components/json-ld.js";
|
|
198
|
+
import { CreationRecord } from "./components/creation-record.js";
|
|
199
|
+
import { ClubOwnerActions } from "./components/club-owner-actions.js";
|
|
200
|
+
import { IPTypeFields } from "./components/ip-type-fields.js";
|
|
201
|
+
import { readBodyWithCap } from "./utils/proxy-body.js";
|
|
202
|
+
import {
|
|
203
|
+
formatActivity,
|
|
204
|
+
formatOrderNotification,
|
|
205
|
+
formatOfferAcceptedNotification,
|
|
206
|
+
formatAssetReceivedNotification
|
|
207
|
+
} from "./utils/format-activity.js";
|
|
208
|
+
import { queryKeys, queryKeyPrefix, QUERY_PREFIX } from "./utils/query-keys.js";
|
|
209
|
+
import { useCollectionProfile, useCreatorProfile } from "./utils/use-profiles.js";
|
|
210
|
+
import { useActivities, useActivitiesByAddress } from "./utils/use-activities.js";
|
|
211
|
+
import {
|
|
212
|
+
useCollections,
|
|
213
|
+
useCollection,
|
|
214
|
+
useCollectionsByOwner,
|
|
215
|
+
useCollectionTokens,
|
|
216
|
+
useNearbyCollectionTokens
|
|
217
|
+
} from "./utils/use-collections.js";
|
|
218
|
+
import { CreatorChip } from "./components/creator-chip.js";
|
|
219
|
+
import { CollectionActivityTab } from "./components/collection-activity-tab.js";
|
|
220
|
+
import { CollectionTraitsTab } from "./components/collection-traits-tab.js";
|
|
221
|
+
import { PortfolioActivity } from "./components/portfolio-activity.js";
|
|
222
|
+
import { CreatorScoreInline } from "./components/creator-score-inline.js";
|
|
179
223
|
import { useMedialaneClient } from "./utils/use-medialane-client.js";
|
|
180
224
|
import { useCreators } from "./utils/use-creators.js";
|
|
181
225
|
import {
|
|
@@ -221,6 +265,7 @@ export {
|
|
|
221
265
|
AssetCollectionBar,
|
|
222
266
|
AssetHeaderBlock,
|
|
223
267
|
AssetLicenseSummary,
|
|
268
|
+
AssetLightbox,
|
|
224
269
|
AssetMarketplacePanel,
|
|
225
270
|
AssetMarketsTab,
|
|
226
271
|
AssetMediaColumn,
|
|
@@ -243,6 +288,7 @@ export {
|
|
|
243
288
|
CardTitle,
|
|
244
289
|
Checkbox,
|
|
245
290
|
ClaimRail,
|
|
291
|
+
ClubOwnerActions,
|
|
246
292
|
CoinCard,
|
|
247
293
|
CoinCardSkeleton,
|
|
248
294
|
CoinLaunchPreview,
|
|
@@ -251,14 +297,19 @@ export {
|
|
|
251
297
|
Collapsible,
|
|
252
298
|
CollapsibleContent,
|
|
253
299
|
CollapsibleTrigger,
|
|
300
|
+
CollectionActivityTab,
|
|
254
301
|
CollectionCard,
|
|
255
302
|
CollectionCardSkeleton,
|
|
256
303
|
CollectionFiltersBody,
|
|
257
304
|
CollectionFiltersTrigger,
|
|
258
305
|
CollectionHeroBanner,
|
|
306
|
+
CollectionTraitsTab,
|
|
259
307
|
CommunityRewardsSection,
|
|
308
|
+
CreationRecord,
|
|
260
309
|
CreatorAirdropBanner,
|
|
261
310
|
CreatorAnalytics,
|
|
311
|
+
CreatorChip,
|
|
312
|
+
CreatorScoreInline,
|
|
262
313
|
CtaCardGrid,
|
|
263
314
|
CurrencyAmount,
|
|
264
315
|
CurrencyIcon,
|
|
@@ -317,6 +368,7 @@ export {
|
|
|
317
368
|
HeroSliderSkeleton,
|
|
318
369
|
HiddenContentBanner,
|
|
319
370
|
IPTypeDisplay,
|
|
371
|
+
IPTypeFields,
|
|
320
372
|
IP_TEMPLATES,
|
|
321
373
|
IP_TYPES,
|
|
322
374
|
IP_TYPE_CONFIG,
|
|
@@ -326,6 +378,7 @@ export {
|
|
|
326
378
|
Input,
|
|
327
379
|
IpTypeBadge,
|
|
328
380
|
JourneyPath,
|
|
381
|
+
JsonLd,
|
|
329
382
|
KineticWords,
|
|
330
383
|
LAUNCHPAD_SERVICE_DEFINITIONS,
|
|
331
384
|
LAUNCHPAD_SERVICE_GROUPS,
|
|
@@ -354,7 +407,9 @@ export {
|
|
|
354
407
|
NavBrandButton,
|
|
355
408
|
NavCommandMenu,
|
|
356
409
|
NavIconButton,
|
|
410
|
+
NavThemeToggle,
|
|
357
411
|
NavWalletTrigger,
|
|
412
|
+
OrderSortControl,
|
|
358
413
|
OwnerSetupPanel,
|
|
359
414
|
PageContainer,
|
|
360
415
|
ParentAttributionBanner,
|
|
@@ -362,16 +417,20 @@ export {
|
|
|
362
417
|
PopoverAnchor,
|
|
363
418
|
PopoverContent,
|
|
364
419
|
PopoverTrigger,
|
|
420
|
+
PortfolioActivity,
|
|
365
421
|
PortfolioBentoTile,
|
|
366
422
|
PortfolioChipFilter,
|
|
367
423
|
PortfolioHeader,
|
|
368
424
|
PortfolioOverview,
|
|
425
|
+
PriceHistoryChart,
|
|
426
|
+
QUERY_PREFIX,
|
|
369
427
|
SERVICE_HUES,
|
|
370
428
|
SOCIAL_PLATFORM_META,
|
|
371
429
|
SORT_OPTIONS,
|
|
372
430
|
SPRING,
|
|
373
431
|
ScoreSummaryCard,
|
|
374
432
|
ScrollSection,
|
|
433
|
+
Section,
|
|
375
434
|
Select,
|
|
376
435
|
SelectContent,
|
|
377
436
|
SelectGroup,
|
|
@@ -385,6 +444,16 @@ export {
|
|
|
385
444
|
ServiceFormShell,
|
|
386
445
|
ServiceHeader,
|
|
387
446
|
ShareButton,
|
|
447
|
+
Sheet,
|
|
448
|
+
SheetClose,
|
|
449
|
+
SheetContent,
|
|
450
|
+
SheetDescription,
|
|
451
|
+
SheetFooter,
|
|
452
|
+
SheetHeader,
|
|
453
|
+
SheetOverlay,
|
|
454
|
+
SheetPortal,
|
|
455
|
+
SheetTitle,
|
|
456
|
+
SheetTrigger,
|
|
388
457
|
Skeleton,
|
|
389
458
|
Stagger,
|
|
390
459
|
StaggerItem,
|
|
@@ -398,7 +467,9 @@ export {
|
|
|
398
467
|
TabsContent,
|
|
399
468
|
TabsList,
|
|
400
469
|
TabsTrigger,
|
|
470
|
+
Textarea,
|
|
401
471
|
ThemeAmbientBackground,
|
|
472
|
+
ToggleGroup,
|
|
402
473
|
TokenAmount,
|
|
403
474
|
TokenCard,
|
|
404
475
|
TokenCardSkeleton,
|
|
@@ -412,21 +483,37 @@ export {
|
|
|
412
483
|
coinKind,
|
|
413
484
|
createRewardToast,
|
|
414
485
|
derivePortfolioCounts,
|
|
486
|
+
formatActivity,
|
|
487
|
+
formatAssetReceivedNotification,
|
|
415
488
|
formatCoinPrice,
|
|
416
489
|
formatDisplayPrice,
|
|
417
490
|
formatFdv,
|
|
491
|
+
formatOfferAcceptedNotification,
|
|
492
|
+
formatOrderNotification,
|
|
418
493
|
getReadIds,
|
|
419
494
|
ipfsToHttp,
|
|
420
495
|
isLivingRenderCollection,
|
|
421
496
|
licenseSummary,
|
|
422
497
|
markRead,
|
|
423
498
|
parsePriceDisplay,
|
|
499
|
+
queryKeyPrefix,
|
|
500
|
+
queryKeys,
|
|
501
|
+
readBodyWithCap,
|
|
424
502
|
shortenAddress,
|
|
503
|
+
sortOrders,
|
|
425
504
|
timeAgo,
|
|
426
505
|
timeUntil,
|
|
427
506
|
toDurationDays,
|
|
428
507
|
toLicenseMetadata,
|
|
508
|
+
useActivities,
|
|
509
|
+
useActivitiesByAddress,
|
|
510
|
+
useCollection,
|
|
429
511
|
useCollectionFilters,
|
|
512
|
+
useCollectionProfile,
|
|
513
|
+
useCollectionTokens,
|
|
514
|
+
useCollections,
|
|
515
|
+
useCollectionsByOwner,
|
|
516
|
+
useCreatorProfile,
|
|
430
517
|
useCreators,
|
|
431
518
|
useFormField,
|
|
432
519
|
useIntersectionActive,
|
|
@@ -435,6 +522,7 @@ export {
|
|
|
435
522
|
useMedialaneClient,
|
|
436
523
|
useNavAccountSheet,
|
|
437
524
|
useNavCommandMenu,
|
|
525
|
+
useNearbyCollectionTokens,
|
|
438
526
|
useRewards,
|
|
439
527
|
useRewardsBatch,
|
|
440
528
|
useRewardsCelebrations,
|
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, parsePriceDisplay } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { ipfsToHttp } from \"./utils/ipfs.js\";\nexport { useIntersectionActive } from \"./utils/use-intersection-active.js\";\nexport { getReadIds, markRead } from \"./utils/notification-storage.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\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, AssetOwnerRow, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport type { AssetOwnerRowProps } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\nexport { LIVING_RENDER_COLLECTIONS, isLivingRenderCollection } from \"./data/living-render-collections.js\";\n\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 { 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 } 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// ── 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, DiscoverActivityStrip } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps, DiscoverActivityStripProps } from \"./components/discover-feed-section.js\";\nexport { ActivityCard, ActivityCardSkeleton, ACTIVITY_MESSAGES } from \"./components/activity-card.js\";\nexport type { ActivityCardProps } from \"./components/activity-card.js\";\n\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\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_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, 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.62.0 — nav shell (brand trigger + header buttons + account sheet) ─────\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\n// ── v0.59.0 — portfolio shell (two-level nav + header + overview) ────────────\nexport { PortfolioHeader } from \"./components/portfolio-header.js\";\nexport type {\n PortfolioHeaderProps,\n PortfolioHeaderScore,\n} from \"./components/portfolio-header.js\";\nexport { PortfolioOverview } from \"./components/portfolio-overview.js\";\nexport type {\n PortfolioOverviewProps,\n PortfolioBentoTileConfig,\n} from \"./components/portfolio-overview.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\nexport { PortfolioBentoTile } from \"./components/portfolio-bento-tile.js\";\nexport type { PortfolioBentoTileProps } from \"./components/portfolio-bento-tile.js\";\nexport { PortfolioChipFilter } from \"./components/portfolio-chip-filter.js\";\nexport type {\n PortfolioChipFilterProps,\n PortfolioChipFilterOption,\n} from \"./components/portfolio-chip-filter.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\n// Rewards score kit (v0.36.0)\nexport { LevelBadge } from \"./components/rewards/level-badge.js\";\nexport type { LevelBadgeProps } from \"./components/rewards/level-badge.js\";\nexport { XpProgress } from \"./components/rewards/xp-progress.js\";\nexport type { XpProgressProps } from \"./components/rewards/xp-progress.js\";\nexport { BadgeShelf } from \"./components/rewards/badge-shelf.js\";\nexport type { BadgeShelfProps, BadgeShelfBadge } from \"./components/rewards/badge-shelf.js\";\nexport { ScoreSummaryCard } from \"./components/rewards/score-summary-card.js\";\nexport type { ScoreSummaryCardProps } from \"./components/rewards/score-summary-card.js\";\nexport { LeaderboardTable, LeaderboardWidget } from \"./components/rewards/leaderboard-table.js\";\nexport type { LeaderboardTableProps, LeaderboardWidgetProps, LeaderboardEntryLike } from \"./components/rewards/leaderboard-table.js\";\nexport { LevelJourneyList } from \"./components/rewards/level-journey-list.js\";\nexport type { LevelJourneyListProps, LevelJourneyListLevel } from \"./components/rewards/level-journey-list.js\";\nexport { BadgeCatalog } from \"./components/rewards/badge-catalog.js\";\nexport type { BadgeCatalogProps, BadgeCatalogBadge } from \"./components/rewards/badge-catalog.js\";\nexport { XpToastContent } from \"./components/rewards/xp-toast-content.js\";\nexport type { XpToastContentProps } from \"./components/rewards/xp-toast-content.js\";\nexport { createRewardToast } from \"./components/rewards/reward-toast.js\";\nexport type { RewardToastSnapshot } from \"./components/rewards/reward-toast.js\";\n\n// ── v0.37.0 additions — infinite-scroll trigger ──────────────────────────────\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n\n// ── v0.47.0 additions — community rewards section ────────────────────────────\nexport { CommunityRewardsSection } from \"./components/community-rewards-section.js\";\nexport type { CommunityRewardsSectionProps, CommunityRewardsEntry } from \"./components/community-rewards-section.js\";\nexport { CreatorAirdropBanner } from \"./components/creator-airdrop-banner.js\";\nexport type { CreatorAirdropBannerProps } from \"./components/creator-airdrop-banner.js\";\n\n// ── Design system primitives — action-focus pattern, tokens, data display ────\nexport { ActionButton } from \"./components/action-button.js\";\nexport type { ActionButtonProps, ActionKey, ToneKey } from \"./components/action-button.js\";\nexport { GradientButton } from \"./components/gradient-button.js\";\nexport type { GradientButtonProps } from \"./components/gradient-button.js\";\n\nexport { CoinLaunchPreview } from \"./components/coin-launch-preview.js\";\nexport type { CoinPreviewData } from \"./components/coin-launch-preview.js\";\nexport { MedialaneCollectionCard } from \"./components/medialane-collection-card.js\";\nexport type { MedialaneCollectionCardProps } from \"./components/medialane-collection-card.js\";\nexport { TokenGlyph, TokenAmount } from \"./components/token-glyph.js\";\nexport type { TokenGlyphProps, TokenAmountProps, TokenSymbol } from \"./components/token-glyph.js\";\n\nexport { StatTile, StatPill } from \"./components/stat-tile.js\";\nexport type { StatTileProps, StatPillProps } from \"./components/stat-tile.js\";\n\nexport { ActionDialog } from \"./components/action-dialog.js\";\nexport type { ActionDialogProps } from \"./components/action-dialog.js\";\n\nexport { HiddenContentBanner } from \"./components/hidden-content-banner.js\";\nexport { CollectionHeroBanner } from \"./components/collection-hero-banner.js\";\nexport type { CollectionHeroBannerProps, CollectionHeroStat } from \"./components/collection-hero-banner.js\";\n\n// ── v0.99.0 additions — rewards UX overhaul ───────────────────────────────────\nexport { useRewardsCelebrations } from \"./components/rewards/use-rewards-celebrations.js\";\nexport { LevelUpCelebration } from \"./components/rewards/level-up-celebration.js\";\nexport type { LevelUpCelebrationProps } from \"./components/rewards/level-up-celebration.js\";\nexport { BadgeUnlockToastContent } from \"./components/rewards/badge-unlock-toast-content.js\";\nexport type { BadgeUnlockToastContentProps } from \"./components/rewards/badge-unlock-toast-content.js\";\nexport { JourneyPath } from \"./components/rewards/journey-path.js\";\nexport type { JourneyPathProps, JourneyStep } from \"./components/rewards/journey-path.js\";\n\n// ── Primitives (shadcn-derived, deduplicated from io + starknet) ─────────────\nexport { Skeleton } from \"./components/skeleton.js\";\nexport { Badge, badgeVariants } from \"./components/badge.js\";\nexport type { BadgeProps } from \"./components/badge.js\";\nexport { Label } from \"./components/label.js\";\nexport { Input } from \"./components/input.js\";\nexport { Switch } from \"./components/switch.js\";\nexport { Checkbox } from \"./components/checkbox.js\";\nexport { Alert, AlertTitle, AlertDescription } from \"./components/alert.js\";\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from \"./components/tabs.js\";\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from \"./components/card.js\";\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./components/collapsible.js\";\nexport { Button, buttonVariants } from \"./components/button.js\";\nexport type { ButtonProps } from \"./components/button.js\";\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from \"./components/popover.js\";\nexport { HelpIcon } from \"./components/help-icon.js\";\nexport { EmptyOrError } from \"./components/empty-or-error.js\";\nexport {\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 { useMedialaneClient } from \"./utils/use-medialane-client.js\";\nexport { useCreators } from \"./utils/use-creators.js\";\nexport {\n useRewards, useLeaderboard, useRewardsEvents, useRewardsConfig, useRewardsBatch,\n} from \"./utils/use-rewards.js\";\nexport type { UserRewards, LeaderboardEntry, BadgeSummary, LevelSummary } from \"./utils/use-rewards.js\";\nexport { OwnerSetupPanel } from \"./components/owner-setup-panel.js\";\nexport { DropCountdown } from \"./components/drop-countdown.js\";\nexport { CreatorAnalytics } from \"./components/creator-analytics.js\";\nexport {\n Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger,\n DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription,\n} from \"./components/dialog.js\";\n"],"mappings":"AACA,SAAS,UAAU;AACnB,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,6BAA6B;AACtC,SAAS,YAAY,gBAAgB;AACrC,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,eAAe,yBAAyB;AAErF,SAAS,0BAA0B;AAEnC,SAAS,yBAAyB;AAElC,SAAS,6BAA6B;AAEtC,SAAS,aAAa;AACtB,SAAS,2BAA2B,gCAAgC;AAGpE,SAAS,cAAc,sBAAsB;AAG7C,SAAS,aAAa,gBAAgB,mBAAmB;AAGzD,SAAS,sBAAsB;AAG/B,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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;AAAA,EAAU;AAAA,EAAW;AAAA,EAAa;AAAA,EAAiB;AAAA,EAAa;AAAA,OAC/E;AACP,SAAS,0BAA0B;AACnC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EAAY;AAAA,EAAgB;AAAA,EAAkB;AAAA,EAAkB;AAAA,OAC3D;AAEP,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EAAQ;AAAA,EAAc;AAAA,EAAe;AAAA,EAAa;AAAA,EAClD;AAAA,EAAe;AAAA,EAAc;AAAA,EAAc;AAAA,EAAa;AAAA,OACnD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ── 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 { useIntersectionActive } from \"./utils/use-intersection-active.js\";\nexport { getReadIds, markRead } from \"./utils/notification-storage.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, AssetOwnerRow, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport type { AssetOwnerRowProps } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\nexport { LIVING_RENDER_COLLECTIONS, isLivingRenderCollection } from \"./data/living-render-collections.js\";\n\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 { 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 } 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// ── 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, DiscoverActivityStrip } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps, DiscoverActivityStripProps } from \"./components/discover-feed-section.js\";\nexport { ActivityCard, ActivityCardSkeleton, ACTIVITY_MESSAGES } from \"./components/activity-card.js\";\nexport type { ActivityCardProps } from \"./components/activity-card.js\";\n\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\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_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, 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.62.0 — nav shell (brand trigger + header buttons + account sheet) ─────\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\n// ── v0.59.0 — portfolio shell (two-level nav + header + overview) ────────────\nexport { PortfolioHeader } from \"./components/portfolio-header.js\";\nexport type {\n PortfolioHeaderProps,\n PortfolioHeaderScore,\n} from \"./components/portfolio-header.js\";\nexport { PortfolioOverview } from \"./components/portfolio-overview.js\";\nexport type {\n PortfolioOverviewProps,\n PortfolioBentoTileConfig,\n} from \"./components/portfolio-overview.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\nexport { PortfolioBentoTile } from \"./components/portfolio-bento-tile.js\";\nexport type { PortfolioBentoTileProps } from \"./components/portfolio-bento-tile.js\";\nexport { PortfolioChipFilter } from \"./components/portfolio-chip-filter.js\";\nexport type {\n PortfolioChipFilterProps,\n PortfolioChipFilterOption,\n} from \"./components/portfolio-chip-filter.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\n// Rewards score kit (v0.36.0)\nexport { LevelBadge } from \"./components/rewards/level-badge.js\";\nexport type { LevelBadgeProps } from \"./components/rewards/level-badge.js\";\nexport { XpProgress } from \"./components/rewards/xp-progress.js\";\nexport type { XpProgressProps } from \"./components/rewards/xp-progress.js\";\nexport { BadgeShelf } from \"./components/rewards/badge-shelf.js\";\nexport type { BadgeShelfProps, BadgeShelfBadge } from \"./components/rewards/badge-shelf.js\";\nexport { ScoreSummaryCard } from \"./components/rewards/score-summary-card.js\";\nexport type { ScoreSummaryCardProps } from \"./components/rewards/score-summary-card.js\";\nexport { LeaderboardTable, LeaderboardWidget } from \"./components/rewards/leaderboard-table.js\";\nexport type { LeaderboardTableProps, LeaderboardWidgetProps, LeaderboardEntryLike } from \"./components/rewards/leaderboard-table.js\";\nexport { LevelJourneyList } from \"./components/rewards/level-journey-list.js\";\nexport type { LevelJourneyListProps, LevelJourneyListLevel } from \"./components/rewards/level-journey-list.js\";\nexport { BadgeCatalog } from \"./components/rewards/badge-catalog.js\";\nexport type { BadgeCatalogProps, BadgeCatalogBadge } from \"./components/rewards/badge-catalog.js\";\nexport { XpToastContent } from \"./components/rewards/xp-toast-content.js\";\nexport type { XpToastContentProps } from \"./components/rewards/xp-toast-content.js\";\nexport { createRewardToast } from \"./components/rewards/reward-toast.js\";\nexport type { RewardToastSnapshot } from \"./components/rewards/reward-toast.js\";\n\n// ── v0.37.0 additions — infinite-scroll trigger ──────────────────────────────\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n\n// ── v0.47.0 additions — community rewards section ────────────────────────────\nexport { CommunityRewardsSection } from \"./components/community-rewards-section.js\";\nexport type { CommunityRewardsSectionProps, CommunityRewardsEntry } from \"./components/community-rewards-section.js\";\nexport { CreatorAirdropBanner } from \"./components/creator-airdrop-banner.js\";\nexport type { CreatorAirdropBannerProps } from \"./components/creator-airdrop-banner.js\";\n\n// ── Design system primitives — action-focus pattern, tokens, data display ────\nexport { ActionButton } from \"./components/action-button.js\";\nexport type { ActionButtonProps, ActionKey, ToneKey } from \"./components/action-button.js\";\nexport { GradientButton } from \"./components/gradient-button.js\";\nexport type { GradientButtonProps } from \"./components/gradient-button.js\";\n\nexport { CoinLaunchPreview } from \"./components/coin-launch-preview.js\";\nexport type { CoinPreviewData } from \"./components/coin-launch-preview.js\";\nexport { MedialaneCollectionCard } from \"./components/medialane-collection-card.js\";\nexport type { MedialaneCollectionCardProps } from \"./components/medialane-collection-card.js\";\nexport { TokenGlyph, TokenAmount } from \"./components/token-glyph.js\";\nexport type { TokenGlyphProps, TokenAmountProps, TokenSymbol } from \"./components/token-glyph.js\";\n\nexport { StatTile, StatPill } from \"./components/stat-tile.js\";\nexport type { StatTileProps, StatPillProps } from \"./components/stat-tile.js\";\n\nexport { ActionDialog } from \"./components/action-dialog.js\";\nexport type { ActionDialogProps } from \"./components/action-dialog.js\";\n\nexport { HiddenContentBanner } from \"./components/hidden-content-banner.js\";\nexport { CollectionHeroBanner } from \"./components/collection-hero-banner.js\";\nexport type { CollectionHeroBannerProps, CollectionHeroStat } from \"./components/collection-hero-banner.js\";\n\n// ── v0.99.0 additions — rewards UX overhaul ───────────────────────────────────\nexport { useRewardsCelebrations } from \"./components/rewards/use-rewards-celebrations.js\";\nexport { LevelUpCelebration } from \"./components/rewards/level-up-celebration.js\";\nexport type { LevelUpCelebrationProps } from \"./components/rewards/level-up-celebration.js\";\nexport { BadgeUnlockToastContent } from \"./components/rewards/badge-unlock-toast-content.js\";\nexport type { BadgeUnlockToastContentProps } from \"./components/rewards/badge-unlock-toast-content.js\";\nexport { JourneyPath } from \"./components/rewards/journey-path.js\";\nexport type { JourneyPathProps, JourneyStep } from \"./components/rewards/journey-path.js\";\n\n// ── Primitives (shadcn-derived, deduplicated from io + starknet) ─────────────\nexport { Skeleton } from \"./components/skeleton.js\";\nexport { Badge, badgeVariants } from \"./components/badge.js\";\nexport type { BadgeProps } from \"./components/badge.js\";\nexport { Label } from \"./components/label.js\";\nexport { Input } from \"./components/input.js\";\nexport { Switch } from \"./components/switch.js\";\nexport { Checkbox } from \"./components/checkbox.js\";\nexport { Alert, AlertTitle, AlertDescription } from \"./components/alert.js\";\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from \"./components/tabs.js\";\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from \"./components/card.js\";\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./components/collapsible.js\";\nexport { Button, buttonVariants } from \"./components/button.js\";\nexport type { ButtonProps } from \"./components/button.js\";\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from \"./components/popover.js\";\nexport { HelpIcon } from \"./components/help-icon.js\";\nexport { EmptyOrError } from \"./components/empty-or-error.js\";\nexport {\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\n// ── v0.106.0 additions — dedupe pass 2 (io + starknet audit) ─────────────────\nexport { ToggleGroup, Section } from \"./components/create-form-primitives.js\";\nexport { OrderSortControl, sortOrders } from \"./components/order-sort-control.js\";\nexport type { OrderSort } from \"./components/order-sort-control.js\";\nexport { AssetLightbox } from \"./components/asset-lightbox.js\";\nexport type { AssetLightboxProps } from \"./components/asset-lightbox.js\";\nexport { PriceHistoryChart } from \"./components/price-history-chart.js\";\nexport type { PriceHistoryChartProps } from \"./components/price-history-chart.js\";\nexport { NavThemeToggle } from \"./components/nav-theme-toggle.js\";\nexport { JsonLd } from \"./components/json-ld.js\";\nexport type { JsonLdProps } from \"./components/json-ld.js\";\nexport { CreationRecord } from \"./components/creation-record.js\";\nexport type { CreationRecordProps } from \"./components/creation-record.js\";\nexport { ClubOwnerActions } from \"./components/club-owner-actions.js\";\nexport type { ClubOwnerActionsProps } from \"./components/club-owner-actions.js\";\nexport { IPTypeFields } from \"./components/ip-type-fields.js\";\nexport type { IPTypeFieldsProps, MetadataField } from \"./components/ip-type-fields.js\";\nexport { readBodyWithCap } from \"./utils/proxy-body.js\";\nexport type { CappedBody } from \"./utils/proxy-body.js\";\nexport {\n formatActivity, formatOrderNotification, formatOfferAcceptedNotification, formatAssetReceivedNotification,\n} from \"./utils/format-activity.js\";\nexport type { FormattedEvent } from \"./utils/format-activity.js\";\n\n// ── v0.107.0 additions — dedupe pass 3: data-fetching hooks + their views ────\n// Same getClient-injection pattern as useRewards/useCreators — the app\n// supplies its own SDK client factory, none of this touches wallet state.\nexport { queryKeys, queryKeyPrefix, QUERY_PREFIX } from \"./utils/query-keys.js\";\nexport { useCollectionProfile, useCreatorProfile } from \"./utils/use-profiles.js\";\nexport { useActivities, useActivitiesByAddress } from \"./utils/use-activities.js\";\nexport {\n useCollections, useCollection, useCollectionsByOwner, useCollectionTokens, useNearbyCollectionTokens,\n} from \"./utils/use-collections.js\";\nexport type { CollectionSort } from \"./utils/use-collections.js\";\nexport { CreatorChip } from \"./components/creator-chip.js\";\nexport type { CreatorChipProps } from \"./components/creator-chip.js\";\nexport { CollectionActivityTab } from \"./components/collection-activity-tab.js\";\nexport type { CollectionActivityTabProps } from \"./components/collection-activity-tab.js\";\nexport { CollectionTraitsTab } from \"./components/collection-traits-tab.js\";\nexport type { CollectionTraitsTabProps } from \"./components/collection-traits-tab.js\";\nexport { PortfolioActivity } from \"./components/portfolio-activity.js\";\nexport type { PortfolioActivityProps } from \"./components/portfolio-activity.js\";\nexport { CreatorScoreInline } from \"./components/creator-score-inline.js\";\nexport type { CreatorScoreInlineProps } from \"./components/creator-score-inline.js\";\n\nexport { useMedialaneClient } from \"./utils/use-medialane-client.js\";\nexport { useCreators } from \"./utils/use-creators.js\";\nexport {\n useRewards, useLeaderboard, useRewardsEvents, useRewardsConfig, useRewardsBatch,\n} from \"./utils/use-rewards.js\";\nexport type { UserRewards, LeaderboardEntry, BadgeSummary, LevelSummary } from \"./utils/use-rewards.js\";\nexport { OwnerSetupPanel } from \"./components/owner-setup-panel.js\";\nexport { DropCountdown } from \"./components/drop-countdown.js\";\nexport { CreatorAnalytics } from \"./components/creator-analytics.js\";\nexport {\n Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger,\n DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription,\n} from \"./components/dialog.js\";\n"],"mappings":"AACA,SAAS,UAAU;AACnB,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,6BAA6B;AACtC,SAAS,YAAY,gBAAgB;AACrC,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,eAAe,yBAAyB;AAErF,SAAS,0BAA0B;AAEnC,SAAS,yBAAyB;AAElC,SAAS,6BAA6B;AAEtC,SAAS,aAAa;AACtB,SAAS,2BAA2B,gCAAgC;AAGpE,SAAS,cAAc,sBAAsB;AAG7C,SAAS,aAAa,gBAAgB,mBAAmB;AAGzD,SAAS,sBAAsB;AAG/B,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,0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wnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var format_activity_exports = {};
|
|
20
|
+
__export(format_activity_exports, {
|
|
21
|
+
formatActivity: () => formatActivity,
|
|
22
|
+
formatAssetReceivedNotification: () => formatAssetReceivedNotification,
|
|
23
|
+
formatOfferAcceptedNotification: () => formatOfferAcceptedNotification,
|
|
24
|
+
formatOrderNotification: () => formatOrderNotification
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(format_activity_exports);
|
|
27
|
+
var import_sdk = require("@medialane/sdk");
|
|
28
|
+
var import_format = require("./format.js");
|
|
29
|
+
var import_ipfs = require("./ipfs.js");
|
|
30
|
+
function short(addr) {
|
|
31
|
+
return addr.length > 10 ? `${addr.slice(0, 6)}\u2026${addr.slice(-4)}` : addr;
|
|
32
|
+
}
|
|
33
|
+
function price(p) {
|
|
34
|
+
if (!p?.formatted) return null;
|
|
35
|
+
return `${(0, import_format.formatDisplayPrice)(p.formatted)} ${p.currency}`;
|
|
36
|
+
}
|
|
37
|
+
function formatActivity(event) {
|
|
38
|
+
const contract = event.nftContract ?? event.contractAddress ?? "";
|
|
39
|
+
const tokenId = event.nftTokenId ?? event.tokenId ?? "";
|
|
40
|
+
const href = contract && tokenId ? (0, import_sdk.assetHref)("STARKNET", contract, tokenId) : "/activities";
|
|
41
|
+
const raw = event.token?.image ?? null;
|
|
42
|
+
const image = raw ? (0, import_ipfs.ipfsToHttp)(raw) : null;
|
|
43
|
+
const name = event.token?.name ?? (tokenId ? `#${tokenId}` : "token");
|
|
44
|
+
const p = price(event.price);
|
|
45
|
+
const actor = event.offerer ?? event.fulfiller ?? (event.type === "mint" ? event.to : event.from) ?? null;
|
|
46
|
+
const actorShort = actor ? short(actor) : null;
|
|
47
|
+
switch (event.type) {
|
|
48
|
+
case "sale":
|
|
49
|
+
return {
|
|
50
|
+
title: `${name} sold`,
|
|
51
|
+
description: p ? `${p}${event.to ? ` to ${short(event.to)}` : ""}` : "Sale confirmed",
|
|
52
|
+
image,
|
|
53
|
+
href
|
|
54
|
+
};
|
|
55
|
+
case "listing":
|
|
56
|
+
return {
|
|
57
|
+
title: `${name} listed`,
|
|
58
|
+
description: p ? `Listed for ${p}` : "New listing",
|
|
59
|
+
image,
|
|
60
|
+
href
|
|
61
|
+
};
|
|
62
|
+
case "offer":
|
|
63
|
+
return {
|
|
64
|
+
title: `Offer on ${name}`,
|
|
65
|
+
description: p && actorShort ? `${p} from ${actorShort}` : p ?? "New offer",
|
|
66
|
+
image,
|
|
67
|
+
href
|
|
68
|
+
};
|
|
69
|
+
case "mint":
|
|
70
|
+
return {
|
|
71
|
+
title: `${name} minted`,
|
|
72
|
+
description: actorShort ? `By ${actorShort}` : "New mint",
|
|
73
|
+
image,
|
|
74
|
+
href
|
|
75
|
+
};
|
|
76
|
+
case "transfer":
|
|
77
|
+
return {
|
|
78
|
+
title: `${name} transferred`,
|
|
79
|
+
description: actorShort && event.to ? `${actorShort} \u2192 ${short(event.to)}` : "Token transferred",
|
|
80
|
+
image,
|
|
81
|
+
href
|
|
82
|
+
};
|
|
83
|
+
case "cancelled":
|
|
84
|
+
return {
|
|
85
|
+
title: "Listing cancelled",
|
|
86
|
+
description: name,
|
|
87
|
+
image,
|
|
88
|
+
href
|
|
89
|
+
};
|
|
90
|
+
default:
|
|
91
|
+
return { title: event.type ?? "Activity", description: name, image, href };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function formatOrderNotification(order) {
|
|
95
|
+
const name = order.token?.name ?? `#${order.consideration.identifier}`;
|
|
96
|
+
const raw = order.token?.image ?? null;
|
|
97
|
+
const image = raw ? (0, import_ipfs.ipfsToHttp)(raw) : null;
|
|
98
|
+
const href = (0, import_sdk.assetHref)("STARKNET", order.consideration.token, order.consideration.identifier);
|
|
99
|
+
const p = price(order.price);
|
|
100
|
+
const from = short(order.offerer);
|
|
101
|
+
return {
|
|
102
|
+
title: `Offer on ${name}`,
|
|
103
|
+
description: p ? `${p} from ${from}` : `From ${from}`,
|
|
104
|
+
image,
|
|
105
|
+
href
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function formatOfferAcceptedNotification(order) {
|
|
109
|
+
const name = order.token?.name ?? `#${order.nftTokenId}`;
|
|
110
|
+
const raw = order.token?.image ?? null;
|
|
111
|
+
const image = raw ? (0, import_ipfs.ipfsToHttp)(raw) : null;
|
|
112
|
+
const href = order.nftContract && order.nftTokenId ? (0, import_sdk.assetHref)("STARKNET", order.nftContract, order.nftTokenId) : "/portfolio/assets";
|
|
113
|
+
const p = price(order.price);
|
|
114
|
+
return {
|
|
115
|
+
title: `Your offer was accepted`,
|
|
116
|
+
description: p ? `${name} \xB7 ${p}` : name,
|
|
117
|
+
image,
|
|
118
|
+
href
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function formatAssetReceivedNotification(event) {
|
|
122
|
+
const contract = event.nftContract ?? event.contractAddress ?? "";
|
|
123
|
+
const tokenId = event.nftTokenId ?? event.tokenId ?? "";
|
|
124
|
+
const href = contract && tokenId ? (0, import_sdk.assetHref)("STARKNET", contract, tokenId) : "/portfolio/assets";
|
|
125
|
+
const raw = event.token?.image ?? null;
|
|
126
|
+
const image = raw ? (0, import_ipfs.ipfsToHttp)(raw) : null;
|
|
127
|
+
const name = event.token?.name ?? (tokenId ? `#${tokenId}` : "an asset");
|
|
128
|
+
const from = event.from ? short(event.from) : null;
|
|
129
|
+
return {
|
|
130
|
+
title: `Asset received`,
|
|
131
|
+
description: from ? `${name} from ${from}` : name,
|
|
132
|
+
image,
|
|
133
|
+
href
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
+
0 && (module.exports = {
|
|
138
|
+
formatActivity,
|
|
139
|
+
formatAssetReceivedNotification,
|
|
140
|
+
formatOfferAcceptedNotification,
|
|
141
|
+
formatOrderNotification
|
|
142
|
+
});
|
|
143
|
+
//# sourceMappingURL=format-activity.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/format-activity.ts"],"sourcesContent":["import type { ApiActivity, ApiOrder } from \"@medialane/sdk\";\nimport { assetHref } from \"@medialane/sdk\";\nimport { formatDisplayPrice } from \"./format.js\";\nimport { ipfsToHttp } from \"./ipfs.js\";\n\nexport interface FormattedEvent {\n title: string;\n description: string;\n image: string | null;\n href: string;\n}\n\nfunction short(addr: string): string {\n return addr.length > 10 ? `${addr.slice(0, 6)}…${addr.slice(-4)}` : addr;\n}\n\nfunction price(p?: { formatted?: string | null; currency?: string | null } | null): string | null {\n if (!p?.formatted) return null;\n return `${formatDisplayPrice(p.formatted)} ${p.currency}`;\n}\n\nexport function formatActivity(event: ApiActivity): FormattedEvent {\n const contract = event.nftContract ?? event.contractAddress ?? \"\";\n const tokenId = event.nftTokenId ?? event.tokenId ?? \"\";\n const href = contract && tokenId ? assetHref(\"STARKNET\", contract, tokenId) : \"/activities\";\n const raw = event.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const name = event.token?.name ?? (tokenId ? `#${tokenId}` : \"token\");\n const p = price(event.price);\n\n const actor =\n event.offerer ??\n event.fulfiller ??\n (event.type === \"mint\" ? event.to : event.from) ??\n null;\n const actorShort = actor ? short(actor) : null;\n\n switch (event.type) {\n case \"sale\":\n return {\n title: `${name} sold`,\n description: p\n ? `${p}${event.to ? ` to ${short(event.to)}` : \"\"}`\n : \"Sale confirmed\",\n image, href,\n };\n case \"listing\":\n return {\n title: `${name} listed`,\n description: p ? `Listed for ${p}` : \"New listing\",\n image, href,\n };\n case \"offer\":\n return {\n title: `Offer on ${name}`,\n description: p && actorShort ? `${p} from ${actorShort}` : p ?? \"New offer\",\n image, href,\n };\n case \"mint\":\n return {\n title: `${name} minted`,\n description: actorShort ? `By ${actorShort}` : \"New mint\",\n image, href,\n };\n case \"transfer\":\n return {\n title: `${name} transferred`,\n description:\n actorShort && event.to\n ? `${actorShort} → ${short(event.to)}`\n : \"Token transferred\",\n image, href,\n };\n case \"cancelled\":\n return {\n title: \"Listing cancelled\",\n description: name,\n image, href,\n };\n default:\n return { title: event.type ?? \"Activity\", description: name, image, href };\n }\n}\n\nexport function formatOrderNotification(order: ApiOrder): FormattedEvent {\n const name = order.token?.name ?? `#${order.consideration.identifier}`;\n const raw = order.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const href = assetHref(\"STARKNET\", order.consideration.token, order.consideration.identifier);\n const p = price(order.price);\n const from = short(order.offerer);\n\n return {\n title: `Offer on ${name}`,\n description: p ? `${p} from ${from}` : `From ${from}`,\n image,\n href,\n };\n}\n\nexport function formatOfferAcceptedNotification(order: ApiOrder): FormattedEvent {\n const name = order.token?.name ?? `#${order.nftTokenId}`;\n const raw = order.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const href = order.nftContract && order.nftTokenId\n ? assetHref(\"STARKNET\", order.nftContract, order.nftTokenId)\n : \"/portfolio/assets\";\n const p = price(order.price);\n\n return {\n title: `Your offer was accepted`,\n description: p ? `${name} · ${p}` : name,\n image,\n href,\n };\n}\n\nexport function formatAssetReceivedNotification(event: ApiActivity): FormattedEvent {\n const contract = event.nftContract ?? event.contractAddress ?? \"\";\n const tokenId = event.nftTokenId ?? event.tokenId ?? \"\";\n const href = contract && tokenId ? assetHref(\"STARKNET\", contract, tokenId) : \"/portfolio/assets\";\n const raw = event.token?.image ?? null;\n const image = raw ? ipfsToHttp(raw) : null;\n const name = event.token?.name ?? (tokenId ? `#${tokenId}` : \"an asset\");\n const from = event.from ? short(event.from) : null;\n\n return {\n title: `Asset received`,\n description: from ? `${name} from ${from}` : name,\n image,\n href,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAA0B;AAC1B,oBAAmC;AACnC,kBAA2B;AAS3B,SAAS,MAAM,MAAsB;AACnC,SAAO,KAAK,SAAS,KAAK,GAAG,KAAK,MAAM,GAAG,CAAC,CAAC,SAAI,KAAK,MAAM,EAAE,CAAC,KAAK;AACtE;AAEA,SAAS,MAAM,GAAmF;AAChG,MAAI,CAAC,GAAG,UAAW,QAAO;AAC1B,SAAO,OAAG,kCAAmB,EAAE,SAAS,CAAC,IAAI,EAAE,QAAQ;AACzD;AAEO,SAAS,eAAe,OAAoC;AACjE,QAAM,WAAW,MAAM,eAAe,MAAM,mBAAmB;AAC/D,QAAM,UAAW,MAAM,cAAc,MAAM,WAAW;AACtD,QAAM,OAAW,YAAY,cAAU,sBAAU,YAAY,UAAU,OAAO,IAAI;AAClF,QAAM,MAAW,MAAM,OAAO,SAAS;AACvC,QAAM,QAAW,UAAM,wBAAW,GAAG,IAAI;AACzC,QAAM,OAAW,MAAM,OAAO,SAAS,UAAU,IAAI,OAAO,KAAK;AACjE,QAAM,IAAW,MAAM,MAAM,KAAK;AAElC,QAAM,QACJ,MAAM,WACN,MAAM,cACL,MAAM,SAAS,SAAS,MAAM,KAAK,MAAM,SAC1C;AACF,QAAM,aAAa,QAAQ,MAAM,KAAK,IAAI;AAE1C,UAAQ,MAAM,MAAM;AAAA,IAClB,KAAK;AACH,aAAO;AAAA,QACL,OAAO,GAA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,OAAO;AAElC,SAAO;AAAA,IACL,OAAO,YAAY,IAAI;AAAA,IACvB,aAAa,IAAI,GAAG,CAAC,SAAS,IAAI,KAAK,QAAQ,IAAI;AAAA,IACnD;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,gCAAgC,OAAiC;AAC/E,QAAM,OAAQ,MAAM,OAAO,QAAQ,IAAI,MAAM,UAAU;AACvD,QAAM,MAAQ,MAAM,OAAO,SAAS;AACpC,QAAM,QAAQ,UAAM,wBAAW,GAAG,IAAI;AACtC,QAAM,OAAQ,MAAM,eAAe,MAAM,iBACrC,sBAAU,YAAY,MAAM,aAAa,MAAM,UAAU,IACzD;AACJ,QAAM,IAAI,MAAM,MAAM,KAAK;AAE3B,SAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa,IAAI,GAAG,IAAI,SAAM,CAAC,KAAK;AAAA,IACpC;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,gCAAgC,OAAoC;AAClF,QAAM,WAAW,MAAM,eAAe,MAAM,mBAAmB;AAC/D,QAAM,UAAW,MAAM,cAAc,MAAM,WAAW;AACtD,QAAM,OAAW,YAAY,cAAU,sBAAU,YAAY,UAAU,OAAO,IAAI;AAClF,QAAM,MAAW,MAAM,OAAO,SAAS;AACvC,QAAM,QAAW,UAAM,wBAAW,GAAG,IAAI;AACzC,QAAM,OAAW,MAAM,OAAO,SAAS,UAAU,IAAI,OAAO,KAAK;AACjE,QAAM,OAAW,MAAM,OAAO,MAAM,MAAM,IAAI,IAAI;AAElD,SAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa,OAAO,GAAG,IAAI,SAAS,IAAI,KAAK;AAAA,IAC7C;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ApiActivity, ApiOrder } from '@medialane/sdk';
|
|
2
|
+
|
|
3
|
+
interface FormattedEvent {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
image: string | null;
|
|
7
|
+
href: string;
|
|
8
|
+
}
|
|
9
|
+
declare function formatActivity(event: ApiActivity): FormattedEvent;
|
|
10
|
+
declare function formatOrderNotification(order: ApiOrder): FormattedEvent;
|
|
11
|
+
declare function formatOfferAcceptedNotification(order: ApiOrder): FormattedEvent;
|
|
12
|
+
declare function formatAssetReceivedNotification(event: ApiActivity): FormattedEvent;
|
|
13
|
+
|
|
14
|
+
export { type FormattedEvent, formatActivity, formatAssetReceivedNotification, formatOfferAcceptedNotification, formatOrderNotification };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ApiActivity, ApiOrder } from '@medialane/sdk';
|
|
2
|
+
|
|
3
|
+
interface FormattedEvent {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
image: string | null;
|
|
7
|
+
href: string;
|
|
8
|
+
}
|
|
9
|
+
declare function formatActivity(event: ApiActivity): FormattedEvent;
|
|
10
|
+
declare function formatOrderNotification(order: ApiOrder): FormattedEvent;
|
|
11
|
+
declare function formatOfferAcceptedNotification(order: ApiOrder): FormattedEvent;
|
|
12
|
+
declare function formatAssetReceivedNotification(event: ApiActivity): FormattedEvent;
|
|
13
|
+
|
|
14
|
+
export { type FormattedEvent, formatActivity, formatAssetReceivedNotification, formatOfferAcceptedNotification, formatOrderNotification };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { assetHref } from "@medialane/sdk";
|
|
2
|
+
import { formatDisplayPrice } from "./format.js";
|
|
3
|
+
import { ipfsToHttp } from "./ipfs.js";
|
|
4
|
+
function short(addr) {
|
|
5
|
+
return addr.length > 10 ? `${addr.slice(0, 6)}\u2026${addr.slice(-4)}` : addr;
|
|
6
|
+
}
|
|
7
|
+
function price(p) {
|
|
8
|
+
if (!p?.formatted) return null;
|
|
9
|
+
return `${formatDisplayPrice(p.formatted)} ${p.currency}`;
|
|
10
|
+
}
|
|
11
|
+
function formatActivity(event) {
|
|
12
|
+
const contract = event.nftContract ?? event.contractAddress ?? "";
|
|
13
|
+
const tokenId = event.nftTokenId ?? event.tokenId ?? "";
|
|
14
|
+
const href = contract && tokenId ? assetHref("STARKNET", contract, tokenId) : "/activities";
|
|
15
|
+
const raw = event.token?.image ?? null;
|
|
16
|
+
const image = raw ? ipfsToHttp(raw) : null;
|
|
17
|
+
const name = event.token?.name ?? (tokenId ? `#${tokenId}` : "token");
|
|
18
|
+
const p = price(event.price);
|
|
19
|
+
const actor = event.offerer ?? event.fulfiller ?? (event.type === "mint" ? event.to : event.from) ?? null;
|
|
20
|
+
const actorShort = actor ? short(actor) : null;
|
|
21
|
+
switch (event.type) {
|
|
22
|
+
case "sale":
|
|
23
|
+
return {
|
|
24
|
+
title: `${name} sold`,
|
|
25
|
+
description: p ? `${p}${event.to ? ` to ${short(event.to)}` : ""}` : "Sale confirmed",
|
|
26
|
+
image,
|
|
27
|
+
href
|
|
28
|
+
};
|
|
29
|
+
case "listing":
|
|
30
|
+
return {
|
|
31
|
+
title: `${name} listed`,
|
|
32
|
+
description: p ? `Listed for ${p}` : "New listing",
|
|
33
|
+
image,
|
|
34
|
+
href
|
|
35
|
+
};
|
|
36
|
+
case "offer":
|
|
37
|
+
return {
|
|
38
|
+
title: `Offer on ${name}`,
|
|
39
|
+
description: p && actorShort ? `${p} from ${actorShort}` : p ?? "New offer",
|
|
40
|
+
image,
|
|
41
|
+
href
|
|
42
|
+
};
|
|
43
|
+
case "mint":
|
|
44
|
+
return {
|
|
45
|
+
title: `${name} minted`,
|
|
46
|
+
description: actorShort ? `By ${actorShort}` : "New mint",
|
|
47
|
+
image,
|
|
48
|
+
href
|
|
49
|
+
};
|
|
50
|
+
case "transfer":
|
|
51
|
+
return {
|
|
52
|
+
title: `${name} transferred`,
|
|
53
|
+
description: actorShort && event.to ? `${actorShort} \u2192 ${short(event.to)}` : "Token transferred",
|
|
54
|
+
image,
|
|
55
|
+
href
|
|
56
|
+
};
|
|
57
|
+
case "cancelled":
|
|
58
|
+
return {
|
|
59
|
+
title: "Listing cancelled",
|
|
60
|
+
description: name,
|
|
61
|
+
image,
|
|
62
|
+
href
|
|
63
|
+
};
|
|
64
|
+
default:
|
|
65
|
+
return { title: event.type ?? "Activity", description: name, image, href };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function formatOrderNotification(order) {
|
|
69
|
+
const name = order.token?.name ?? `#${order.consideration.identifier}`;
|
|
70
|
+
const raw = order.token?.image ?? null;
|
|
71
|
+
const image = raw ? ipfsToHttp(raw) : null;
|
|
72
|
+
const href = assetHref("STARKNET", order.consideration.token, order.consideration.identifier);
|
|
73
|
+
const p = price(order.price);
|
|
74
|
+
const from = short(order.offerer);
|
|
75
|
+
return {
|
|
76
|
+
title: `Offer on ${name}`,
|
|
77
|
+
description: p ? `${p} from ${from}` : `From ${from}`,
|
|
78
|
+
image,
|
|
79
|
+
href
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function formatOfferAcceptedNotification(order) {
|
|
83
|
+
const name = order.token?.name ?? `#${order.nftTokenId}`;
|
|
84
|
+
const raw = order.token?.image ?? null;
|
|
85
|
+
const image = raw ? ipfsToHttp(raw) : null;
|
|
86
|
+
const href = order.nftContract && order.nftTokenId ? assetHref("STARKNET", order.nftContract, order.nftTokenId) : "/portfolio/assets";
|
|
87
|
+
const p = price(order.price);
|
|
88
|
+
return {
|
|
89
|
+
title: `Your offer was accepted`,
|
|
90
|
+
description: p ? `${name} \xB7 ${p}` : name,
|
|
91
|
+
image,
|
|
92
|
+
href
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function formatAssetReceivedNotification(event) {
|
|
96
|
+
const contract = event.nftContract ?? event.contractAddress ?? "";
|
|
97
|
+
const tokenId = event.nftTokenId ?? event.tokenId ?? "";
|
|
98
|
+
const href = contract && tokenId ? assetHref("STARKNET", contract, tokenId) : "/portfolio/assets";
|
|
99
|
+
const raw = event.token?.image ?? null;
|
|
100
|
+
const image = raw ? ipfsToHttp(raw) : null;
|
|
101
|
+
const name = event.token?.name ?? (tokenId ? `#${tokenId}` : "an asset");
|
|
102
|
+
const from = event.from ? short(event.from) : null;
|
|
103
|
+
return {
|
|
104
|
+
title: `Asset received`,
|
|
105
|
+
description: from ? `${name} from ${from}` : name,
|
|
106
|
+
image,
|
|
107
|
+
href
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
formatActivity,
|
|
112
|
+
formatAssetReceivedNotification,
|
|
113
|
+
formatOfferAcceptedNotification,
|
|
114
|
+
formatOrderNotification
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=format-activity.js.map
|