@medialane/ui 0.200.1 → 0.201.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/action-button.cjs +3 -3
- package/dist/components/action-button.cjs.map +1 -1
- package/dist/components/action-button.d.cts +1 -2
- package/dist/components/action-button.d.ts +1 -2
- package/dist/components/action-button.js +3 -3
- package/dist/components/action-button.js.map +1 -1
- package/dist/components/activities-feed.cjs +3 -3
- package/dist/components/activities-feed.cjs.map +1 -1
- package/dist/components/activities-feed.d.cts +2 -6
- package/dist/components/activities-feed.d.ts +2 -6
- package/dist/components/activities-feed.js +3 -3
- package/dist/components/activities-feed.js.map +1 -1
- package/dist/components/asset-comments-dialog.cjs +76 -0
- package/dist/components/asset-comments-dialog.cjs.map +1 -0
- package/dist/components/asset-comments-dialog.d.cts +26 -0
- package/dist/components/asset-comments-dialog.d.ts +26 -0
- package/dist/components/asset-comments-dialog.js +42 -0
- package/dist/components/asset-comments-dialog.js.map +1 -0
- package/dist/components/asset-marketplace-panel.cjs +77 -139
- package/dist/components/asset-marketplace-panel.cjs.map +1 -1
- package/dist/components/asset-marketplace-panel.d.cts +2 -5
- package/dist/components/asset-marketplace-panel.d.ts +2 -5
- package/dist/components/asset-marketplace-panel.js +78 -141
- package/dist/components/asset-marketplace-panel.js.map +1 -1
- package/dist/components/asset-owners-panel.cjs +38 -22
- package/dist/components/asset-owners-panel.cjs.map +1 -1
- package/dist/components/asset-owners-panel.d.cts +3 -1
- package/dist/components/asset-owners-panel.d.ts +3 -1
- package/dist/components/asset-owners-panel.js +38 -22
- package/dist/components/asset-owners-panel.js.map +1 -1
- package/dist/components/asset-page.cjs +324 -0
- package/dist/components/asset-page.cjs.map +1 -0
- package/dist/components/asset-page.d.cts +44 -0
- package/dist/components/asset-page.d.ts +44 -0
- package/dist/components/asset-page.js +298 -0
- package/dist/components/asset-page.js.map +1 -0
- package/dist/components/asset-provenance-tab.cjs +1 -3
- package/dist/components/asset-provenance-tab.cjs.map +1 -1
- package/dist/components/asset-provenance-tab.js +1 -3
- package/dist/components/asset-provenance-tab.js.map +1 -1
- package/dist/components/asset-top-sections.cjs +9 -1
- package/dist/components/asset-top-sections.cjs.map +1 -1
- package/dist/components/asset-top-sections.d.cts +3 -1
- package/dist/components/asset-top-sections.d.ts +3 -1
- package/dist/components/asset-top-sections.js +9 -1
- package/dist/components/asset-top-sections.js.map +1 -1
- package/dist/components/asset-type-panels.cjs +139 -0
- package/dist/components/asset-type-panels.cjs.map +1 -0
- package/dist/components/asset-type-panels.d.cts +11 -0
- package/dist/components/asset-type-panels.d.ts +11 -0
- package/dist/components/asset-type-panels.js +114 -0
- package/dist/components/asset-type-panels.js.map +1 -0
- package/dist/components/collection-activity-tab.cjs +2 -2
- package/dist/components/collection-activity-tab.cjs.map +1 -1
- package/dist/components/collection-activity-tab.d.cts +1 -3
- package/dist/components/collection-activity-tab.d.ts +1 -3
- package/dist/components/collection-activity-tab.js +2 -2
- package/dist/components/collection-activity-tab.js.map +1 -1
- package/dist/components/collection-filters-dialog.cjs +98 -0
- package/dist/components/collection-filters-dialog.cjs.map +1 -0
- package/dist/components/collection-filters-dialog.d.cts +13 -0
- package/dist/components/collection-filters-dialog.d.ts +13 -0
- package/dist/components/collection-filters-dialog.js +74 -0
- package/dist/components/collection-filters-dialog.js.map +1 -0
- package/dist/components/collection-header.cjs +82 -0
- package/dist/components/collection-header.cjs.map +1 -0
- package/dist/components/collection-header.d.cts +13 -0
- package/dist/components/collection-header.d.ts +13 -0
- package/dist/components/collection-header.js +58 -0
- package/dist/components/collection-header.js.map +1 -0
- package/dist/components/collection-page.cjs +274 -0
- package/dist/components/collection-page.cjs.map +1 -0
- package/dist/components/collection-page.d.cts +32 -0
- package/dist/components/collection-page.d.ts +32 -0
- package/dist/components/collection-page.js +239 -0
- package/dist/components/collection-page.js.map +1 -0
- package/dist/components/collection-traits-tab.cjs +2 -2
- package/dist/components/collection-traits-tab.cjs.map +1 -1
- package/dist/components/collection-traits-tab.d.cts +1 -3
- package/dist/components/collection-traits-tab.d.ts +1 -3
- package/dist/components/collection-traits-tab.js +2 -2
- package/dist/components/collection-traits-tab.js.map +1 -1
- package/dist/components/creator-chip.cjs +2 -2
- package/dist/components/creator-chip.cjs.map +1 -1
- package/dist/components/creator-chip.d.cts +1 -3
- package/dist/components/creator-chip.d.ts +1 -3
- package/dist/components/creator-chip.js +2 -2
- package/dist/components/creator-chip.js.map +1 -1
- package/dist/components/creator-header.cjs +80 -0
- package/dist/components/creator-header.cjs.map +1 -0
- package/dist/components/creator-header.d.cts +18 -0
- package/dist/components/creator-header.d.ts +18 -0
- package/dist/components/creator-header.js +56 -0
- package/dist/components/creator-header.js.map +1 -0
- package/dist/components/creator-score-inline.cjs +2 -2
- package/dist/components/creator-score-inline.cjs.map +1 -1
- package/dist/components/creator-score-inline.d.cts +1 -3
- package/dist/components/creator-score-inline.d.ts +1 -3
- package/dist/components/creator-score-inline.js +2 -2
- package/dist/components/creator-score-inline.js.map +1 -1
- package/dist/components/drop/create/drop-create.cjs +1 -1
- package/dist/components/drop/create/drop-create.cjs.map +1 -1
- package/dist/components/drop/create/drop-create.js +1 -1
- package/dist/components/drop/create/drop-create.js.map +1 -1
- package/dist/components/drop/drop-listing.cjs +1 -2
- package/dist/components/drop/drop-listing.cjs.map +1 -1
- package/dist/components/drop/drop-listing.d.cts +1 -3
- package/dist/components/drop/drop-listing.d.ts +1 -3
- package/dist/components/drop/drop-listing.js +1 -2
- package/dist/components/drop/drop-listing.js.map +1 -1
- package/dist/components/drop/my-drops.cjs +2 -2
- package/dist/components/drop/my-drops.cjs.map +1 -1
- package/dist/components/drop/my-drops.js +2 -2
- package/dist/components/drop/my-drops.js.map +1 -1
- package/dist/components/drop/page/drop-page.cjs +8 -8
- package/dist/components/drop/page/drop-page.cjs.map +1 -1
- package/dist/components/drop/page/drop-page.js +8 -8
- package/dist/components/drop/page/drop-page.js.map +1 -1
- package/dist/components/floating-comments-button.cjs +78 -0
- package/dist/components/floating-comments-button.cjs.map +1 -0
- package/dist/components/floating-comments-button.d.cts +9 -0
- package/dist/components/floating-comments-button.d.ts +9 -0
- package/dist/components/floating-comments-button.js +54 -0
- package/dist/components/floating-comments-button.js.map +1 -0
- package/dist/components/gated-content.cjs +142 -0
- package/dist/components/gated-content.cjs.map +1 -0
- package/dist/components/gated-content.d.cts +31 -0
- package/dist/components/gated-content.d.ts +31 -0
- package/dist/components/gated-content.js +117 -0
- package/dist/components/gated-content.js.map +1 -0
- package/dist/components/listing-card-menu.cjs +79 -0
- package/dist/components/listing-card-menu.cjs.map +1 -0
- package/dist/components/listing-card-menu.d.cts +8 -0
- package/dist/components/listing-card-menu.d.ts +8 -0
- package/dist/components/listing-card-menu.js +45 -0
- package/dist/components/listing-card-menu.js.map +1 -0
- package/dist/components/listing-card.cjs +2 -1
- package/dist/components/listing-card.cjs.map +1 -1
- package/dist/components/listing-card.js +2 -1
- package/dist/components/listing-card.js.map +1 -1
- package/dist/components/make-offer-picker.cjs +114 -0
- package/dist/components/make-offer-picker.cjs.map +1 -0
- package/dist/components/make-offer-picker.d.cts +9 -0
- package/dist/components/make-offer-picker.d.ts +9 -0
- package/dist/components/make-offer-picker.js +80 -0
- package/dist/components/make-offer-picker.js.map +1 -0
- package/dist/components/media-header.cjs +79 -0
- package/dist/components/media-header.cjs.map +1 -0
- package/dist/components/media-header.d.cts +23 -0
- package/dist/components/media-header.d.ts +23 -0
- package/dist/components/media-header.js +52 -0
- package/dist/components/media-header.js.map +1 -0
- package/dist/components/media-wallet/media-wallet-activity.cjs +3 -1
- package/dist/components/media-wallet/media-wallet-activity.cjs.map +1 -1
- package/dist/components/media-wallet/media-wallet-activity.js +3 -1
- package/dist/components/media-wallet/media-wallet-activity.js.map +1 -1
- package/dist/components/media-wallet/media-wallet-home.cjs +6 -6
- package/dist/components/media-wallet/media-wallet-home.cjs.map +1 -1
- package/dist/components/media-wallet/media-wallet-home.js +6 -6
- package/dist/components/media-wallet/media-wallet-home.js.map +1 -1
- package/dist/components/media-wallet/media-wallet-send.cjs +8 -6
- package/dist/components/media-wallet/media-wallet-send.cjs.map +1 -1
- package/dist/components/media-wallet/media-wallet-send.js +8 -6
- package/dist/components/media-wallet/media-wallet-send.js.map +1 -1
- package/dist/components/media-wallet/media-wallet-token-detail.cjs +4 -3
- package/dist/components/media-wallet/media-wallet-token-detail.cjs.map +1 -1
- package/dist/components/media-wallet/media-wallet-token-detail.js +4 -3
- package/dist/components/media-wallet/media-wallet-token-detail.js.map +1 -1
- package/dist/components/media-wallet/types.cjs.map +1 -1
- package/dist/components/media-wallet/types.d.cts +1 -2
- package/dist/components/media-wallet/types.d.ts +1 -2
- package/dist/components/media-wallet/types.js.map +1 -1
- package/dist/components/medialane-app.cjs.map +1 -1
- package/dist/components/medialane-app.d.cts +18 -2
- package/dist/components/medialane-app.d.ts +18 -2
- package/dist/components/medialane-app.js.map +1 -1
- package/dist/components/portfolio-activity.cjs +2 -2
- package/dist/components/portfolio-activity.cjs.map +1 -1
- package/dist/components/portfolio-activity.d.cts +1 -3
- package/dist/components/portfolio-activity.d.ts +1 -3
- package/dist/components/portfolio-activity.js +2 -2
- package/dist/components/portfolio-activity.js.map +1 -1
- package/dist/components/remixes-tab.cjs +2 -2
- package/dist/components/remixes-tab.cjs.map +1 -1
- package/dist/components/remixes-tab.d.cts +1 -3
- package/dist/components/remixes-tab.d.ts +1 -3
- package/dist/components/remixes-tab.js +2 -2
- package/dist/components/remixes-tab.js.map +1 -1
- package/dist/index.cjs +55 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -4
- package/dist/index.d.ts +18 -4
- package/dist/index.js +36 -3
- package/dist/index.js.map +1 -1
- package/dist/utils/asset-attributes.cjs +48 -0
- package/dist/utils/asset-attributes.cjs.map +1 -0
- package/dist/utils/asset-attributes.d.cts +13 -0
- package/dist/utils/asset-attributes.d.ts +13 -0
- package/dist/utils/asset-attributes.js +24 -0
- package/dist/utils/asset-attributes.js.map +1 -0
- package/dist/utils/asset-market-state.cjs +132 -0
- package/dist/utils/asset-market-state.cjs.map +1 -0
- package/dist/utils/asset-market-state.d.cts +33 -0
- package/dist/utils/asset-market-state.d.ts +33 -0
- package/dist/utils/asset-market-state.js +101 -0
- package/dist/utils/asset-market-state.js.map +1 -0
- package/dist/utils/media-wallet/use-erc20-balance.cjs +5 -3
- package/dist/utils/media-wallet/use-erc20-balance.cjs.map +1 -1
- package/dist/utils/media-wallet/use-erc20-balance.d.cts +3 -5
- package/dist/utils/media-wallet/use-erc20-balance.d.ts +3 -5
- package/dist/utils/media-wallet/use-erc20-balance.js +5 -3
- package/dist/utils/media-wallet/use-erc20-balance.js.map +1 -1
- package/dist/utils/use-activities.cjs +4 -4
- package/dist/utils/use-activities.cjs.map +1 -1
- package/dist/utils/use-activities.d.cts +2 -3
- package/dist/utils/use-activities.d.ts +2 -3
- package/dist/utils/use-activities.js +4 -4
- package/dist/utils/use-activities.js.map +1 -1
- package/dist/utils/use-coin-price.cjs +6 -6
- package/dist/utils/use-coin-price.cjs.map +1 -1
- package/dist/utils/use-coin-price.d.cts +2 -3
- package/dist/utils/use-coin-price.d.ts +2 -3
- package/dist/utils/use-coin-price.js +6 -6
- package/dist/utils/use-coin-price.js.map +1 -1
- package/dist/utils/use-collections.cjs +10 -10
- package/dist/utils/use-collections.cjs.map +1 -1
- package/dist/utils/use-collections.d.cts +5 -6
- package/dist/utils/use-collections.d.ts +5 -6
- package/dist/utils/use-collections.js +10 -10
- package/dist/utils/use-collections.js.map +1 -1
- package/dist/utils/use-comments.cjs +50 -0
- package/dist/utils/use-comments.cjs.map +1 -0
- package/dist/utils/use-comments.d.cts +12 -0
- package/dist/utils/use-comments.d.ts +12 -0
- package/dist/utils/use-comments.js +16 -0
- package/dist/utils/use-comments.js.map +1 -0
- package/dist/utils/use-creators.cjs +3 -1
- package/dist/utils/use-creators.cjs.map +1 -1
- package/dist/utils/use-creators.d.cts +1 -2
- package/dist/utils/use-creators.d.ts +1 -2
- package/dist/utils/use-creators.js +3 -1
- package/dist/utils/use-creators.js.map +1 -1
- package/dist/utils/use-drops.cjs +14 -14
- package/dist/utils/use-drops.cjs.map +1 -1
- package/dist/utils/use-drops.d.cts +7 -7
- package/dist/utils/use-drops.d.ts +7 -7
- package/dist/utils/use-drops.js +14 -14
- package/dist/utils/use-drops.js.map +1 -1
- package/dist/utils/use-full-token-data.cjs +50 -0
- package/dist/utils/use-full-token-data.cjs.map +1 -0
- package/dist/utils/use-full-token-data.d.cts +9 -0
- package/dist/utils/use-full-token-data.d.ts +9 -0
- package/dist/utils/use-full-token-data.js +16 -0
- package/dist/utils/use-full-token-data.js.map +1 -0
- package/dist/utils/use-medialane-client.cjs +3 -1
- package/dist/utils/use-medialane-client.cjs.map +1 -1
- package/dist/utils/use-medialane-client.d.cts +1 -1
- package/dist/utils/use-medialane-client.d.ts +1 -1
- package/dist/utils/use-medialane-client.js +3 -1
- package/dist/utils/use-medialane-client.js.map +1 -1
- package/dist/utils/use-notifications.cjs +4 -4
- package/dist/utils/use-notifications.cjs.map +1 -1
- package/dist/utils/use-notifications.d.cts +1 -2
- package/dist/utils/use-notifications.d.ts +1 -2
- package/dist/utils/use-notifications.js +4 -4
- package/dist/utils/use-notifications.js.map +1 -1
- package/dist/utils/use-orders.cjs +14 -14
- package/dist/utils/use-orders.cjs.map +1 -1
- package/dist/utils/use-orders.d.cts +7 -8
- package/dist/utils/use-orders.d.ts +7 -8
- package/dist/utils/use-orders.js +14 -14
- package/dist/utils/use-orders.js.map +1 -1
- package/dist/utils/use-platform-stats.cjs +2 -2
- package/dist/utils/use-platform-stats.cjs.map +1 -1
- package/dist/utils/use-platform-stats.d.cts +1 -2
- package/dist/utils/use-platform-stats.d.ts +1 -2
- package/dist/utils/use-platform-stats.js +2 -2
- package/dist/utils/use-platform-stats.js.map +1 -1
- package/dist/utils/use-pop.cjs +6 -6
- package/dist/utils/use-pop.cjs.map +1 -1
- package/dist/utils/use-pop.d.cts +3 -4
- package/dist/utils/use-pop.d.ts +3 -4
- package/dist/utils/use-pop.js +6 -6
- package/dist/utils/use-pop.js.map +1 -1
- package/dist/utils/use-profiles.cjs +5 -2
- package/dist/utils/use-profiles.cjs.map +1 -1
- package/dist/utils/use-profiles.d.cts +2 -3
- package/dist/utils/use-profiles.d.ts +2 -3
- package/dist/utils/use-profiles.js +5 -2
- package/dist/utils/use-profiles.js.map +1 -1
- package/dist/utils/use-remix-offers.cjs +2 -2
- package/dist/utils/use-remix-offers.cjs.map +1 -1
- package/dist/utils/use-remix-offers.d.cts +1 -2
- package/dist/utils/use-remix-offers.d.ts +1 -2
- package/dist/utils/use-remix-offers.js +2 -2
- package/dist/utils/use-remix-offers.js.map +1 -1
- package/dist/utils/use-rewards.cjs +11 -5
- package/dist/utils/use-rewards.cjs.map +1 -1
- package/dist/utils/use-rewards.d.cts +5 -6
- package/dist/utils/use-rewards.d.ts +5 -6
- package/dist/utils/use-rewards.js +11 -5
- package/dist/utils/use-rewards.js.map +1 -1
- package/dist/utils/use-sponsorship.cjs +14 -17
- package/dist/utils/use-sponsorship.cjs.map +1 -1
- package/dist/utils/use-sponsorship.d.cts +8 -9
- package/dist/utils/use-sponsorship.d.ts +8 -9
- package/dist/utils/use-sponsorship.js +14 -17
- package/dist/utils/use-sponsorship.js.map +1 -1
- package/dist/utils/use-tiers.cjs +16 -16
- package/dist/utils/use-tiers.cjs.map +1 -1
- package/dist/utils/use-tiers.d.cts +7 -8
- package/dist/utils/use-tiers.d.ts +7 -8
- package/dist/utils/use-tiers.js +16 -16
- package/dist/utils/use-tiers.js.map +1 -1
- package/dist/utils/use-tokens-by-ip-type.cjs +2 -2
- package/dist/utils/use-tokens-by-ip-type.cjs.map +1 -1
- package/dist/utils/use-tokens-by-ip-type.d.cts +1 -2
- package/dist/utils/use-tokens-by-ip-type.d.ts +1 -2
- package/dist/utils/use-tokens-by-ip-type.js +2 -2
- package/dist/utils/use-tokens-by-ip-type.js.map +1 -1
- package/dist/utils/use-tokens.cjs +19 -8
- package/dist/utils/use-tokens.cjs.map +1 -1
- package/dist/utils/use-tokens.d.cts +11 -6
- package/dist/utils/use-tokens.d.ts +11 -6
- package/dist/utils/use-tokens.js +18 -8
- package/dist/utils/use-tokens.js.map +1 -1
- package/package.json +3 -3
- package/dist/components/collection-hero-banner.cjs +0 -118
- package/dist/components/collection-hero-banner.cjs.map +0 -1
- package/dist/components/collection-hero-banner.d.cts +0 -20
- package/dist/components/collection-hero-banner.d.ts +0 -20
- package/dist/components/collection-hero-banner.js +0 -94
- package/dist/components/collection-hero-banner.js.map +0 -1
|
@@ -1,43 +1,59 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
3
4
|
import Link from "./link.js";
|
|
4
5
|
import { AddressDisplay } from "./address-display.js";
|
|
5
6
|
import { CreatorScoreInline } from "./creator-score-inline.js";
|
|
6
|
-
import {
|
|
7
|
+
import { Dialog, DialogContent, DialogTitle } from "./dialog.js";
|
|
8
|
+
import { useTokenOwners } from "../utils/use-tokens.js";
|
|
7
9
|
const MAX_VISIBLE = 5;
|
|
8
10
|
function plural(count, word) {
|
|
9
11
|
return `${count.toLocaleString()} ${word}${count === 1 ? "" : "s"}`;
|
|
10
12
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
+
function OwnerRow({ owner, amount }) {
|
|
14
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
15
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
16
|
+
/* @__PURE__ */ jsx(Link, { href: `/creator/${owner}`, className: "hover:text-primary transition-colors font-medium text-sm truncate", children: /* @__PURE__ */ jsx(AddressDisplay, { address: owner, chars: 6, showCopy: false }) }),
|
|
17
|
+
/* @__PURE__ */ jsx(CreatorScoreInline, { address: owner, size: "sm" })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground shrink-0 tabular-nums", children: [
|
|
20
|
+
"\xD7 ",
|
|
21
|
+
amount
|
|
22
|
+
] })
|
|
23
|
+
] });
|
|
24
|
+
}
|
|
25
|
+
function AssetOwnersDialog({ contract, tokenId, title, open, onOpenChange }) {
|
|
26
|
+
const [page, setPage] = useState(1);
|
|
27
|
+
const [owners, setOwners] = useState([]);
|
|
28
|
+
const { owners: pageOwners, total, isLoading } = useTokenOwners(open ? contract : null, tokenId, page);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (pageOwners.length === 0) return;
|
|
31
|
+
setOwners((prev) => page === 1 ? pageOwners : [...prev, ...pageOwners.filter((o) => !prev.some((p) => p.owner === o.owner))]);
|
|
32
|
+
}, [pageOwners, page]);
|
|
33
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "w-full max-w-md p-0 overflow-hidden gap-0 flex flex-col max-h-[85svh]", children: [
|
|
34
|
+
/* @__PURE__ */ jsx("div", { className: "px-5 py-4 border-b border-border/60 shrink-0", children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-base font-bold tabular-nums", children: title }) }),
|
|
35
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto px-5 py-4 flex flex-col gap-2", children: [
|
|
36
|
+
owners.map((o) => /* @__PURE__ */ jsx(OwnerRow, { ...o }, o.owner)),
|
|
37
|
+
isLoading ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Loading owners\u2026" }) : null,
|
|
38
|
+
!isLoading && owners.length < total ? /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setPage((p) => p + 1), className: "mt-2 self-center text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline", children: "Show more" }) : null
|
|
39
|
+
] })
|
|
40
|
+
] }) });
|
|
41
|
+
}
|
|
42
|
+
function AssetOwnersPanel({ contract, tokenId, balances, total = balances.length, editions }) {
|
|
43
|
+
const [open, setOpen] = useState(false);
|
|
13
44
|
if (balances.length === 0) return null;
|
|
14
45
|
const owners = plural(total, "owner");
|
|
15
46
|
const label = editions ? `${plural(editions, "edition")} \xB7 ${owners}` : owners;
|
|
16
47
|
return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border px-4 py-3 space-y-2", children: [
|
|
17
48
|
/* @__PURE__ */ jsx("p", { className: "text-2xs font-semibold text-muted-foreground tabular-nums", children: label }),
|
|
18
49
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
19
|
-
balances.slice(0, MAX_VISIBLE).map((balance) => /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
/* @__PURE__ */ jsx(
|
|
22
|
-
Link,
|
|
23
|
-
{
|
|
24
|
-
href: `/creator/${balance.owner}`,
|
|
25
|
-
className: "hover:text-primary transition-colors font-medium text-sm truncate",
|
|
26
|
-
children: /* @__PURE__ */ jsx(AddressDisplay, { address: balance.owner, chars: 6, showCopy: false })
|
|
27
|
-
}
|
|
28
|
-
),
|
|
29
|
-
/* @__PURE__ */ jsx(CreatorScoreInline, { getClient, address: balance.owner, size: "sm" })
|
|
30
|
-
] }),
|
|
31
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground shrink-0 tabular-nums", children: [
|
|
32
|
-
"\xD7 ",
|
|
33
|
-
balance.amount
|
|
34
|
-
] })
|
|
35
|
-
] }, balance.owner)),
|
|
36
|
-
total > MAX_VISIBLE ? /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground/60", children: [
|
|
50
|
+
balances.slice(0, MAX_VISIBLE).map((balance) => /* @__PURE__ */ jsx(OwnerRow, { ...balance }, balance.owner)),
|
|
51
|
+
total > MAX_VISIBLE ? /* @__PURE__ */ jsxs("button", { type: "button", onClick: () => setOpen(true), className: "self-start text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline", children: [
|
|
37
52
|
"+",
|
|
38
53
|
plural(total - MAX_VISIBLE, "more owner")
|
|
39
54
|
] }) : null
|
|
40
|
-
] })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsx(AssetOwnersDialog, { contract, tokenId, title: owners, open, onOpenChange: setOpen })
|
|
41
57
|
] });
|
|
42
58
|
}
|
|
43
59
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/asset-owners-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorScoreInline } from \"./creator-score-inline.js\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-owners-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport Link from \"./link.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorScoreInline } from \"./creator-score-inline.js\";\nimport { Dialog, DialogContent, DialogTitle } from \"./dialog.js\";\nimport { useTokenOwners } from \"../utils/use-tokens.js\";\n\ninterface HolderLike {\n owner: string;\n amount: string;\n}\n\ninterface AssetOwnersPanelProps {\n contract: string;\n tokenId: string;\n balances: HolderLike[];\n total?: number;\n editions?: number;\n}\n\nconst MAX_VISIBLE = 5;\n\nfunction plural(count: number, word: string) {\n return `${count.toLocaleString()} ${word}${count === 1 ? \"\" : \"s\"}`;\n}\n\nfunction OwnerRow({ owner, amount }: HolderLike) {\n return (\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <Link href={`/creator/${owner}`} className=\"hover:text-primary transition-colors font-medium text-sm truncate\">\n <AddressDisplay address={owner} chars={6} showCopy={false} />\n </Link>\n <CreatorScoreInline address={owner} size=\"sm\" />\n </div>\n <span className=\"text-xs text-muted-foreground shrink-0 tabular-nums\">× {amount}</span>\n </div>\n );\n}\n\nfunction AssetOwnersDialog({ contract, tokenId, title, open, onOpenChange }: { contract: string; tokenId: string; title: string; open: boolean; onOpenChange: (open: boolean) => void }) {\n const [page, setPage] = useState(1);\n const [owners, setOwners] = useState<HolderLike[]>([]);\n const { owners: pageOwners, total, isLoading } = useTokenOwners(open ? contract : null, tokenId, page);\n\n useEffect(() => {\n if (pageOwners.length === 0) return;\n setOwners((prev) => (page === 1 ? pageOwners : [...prev, ...pageOwners.filter((o) => !prev.some((p) => p.owner === o.owner))]));\n }, [pageOwners, page]);\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className=\"w-full max-w-md p-0 overflow-hidden gap-0 flex flex-col max-h-[85svh]\">\n <div className=\"px-5 py-4 border-b border-border/60 shrink-0\">\n <DialogTitle className=\"text-base font-bold tabular-nums\">{title}</DialogTitle>\n </div>\n <div className=\"flex-1 overflow-y-auto px-5 py-4 flex flex-col gap-2\">\n {owners.map((o) => <OwnerRow key={o.owner} {...o} />)}\n {isLoading ? <p className=\"text-xs text-muted-foreground\">Loading owners…</p> : null}\n {!isLoading && owners.length < total ? (\n <button type=\"button\" onClick={() => setPage((p) => p + 1)} className=\"mt-2 self-center text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline\">\n Show more\n </button>\n ) : null}\n </div>\n </DialogContent>\n </Dialog>\n );\n}\n\nexport function AssetOwnersPanel({ contract, tokenId, balances, total = balances.length, editions }: AssetOwnersPanelProps) {\n const [open, setOpen] = useState(false);\n if (balances.length === 0) return null;\n\n const owners = plural(total, \"owner\");\n const label = editions ? `${plural(editions, \"edition\")} · ${owners}` : owners;\n\n return (\n <div className=\"rounded-xl border border-border px-4 py-3 space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground tabular-nums\">{label}</p>\n <div className=\"flex flex-col gap-1.5\">\n {balances.slice(0, MAX_VISIBLE).map((balance) => <OwnerRow key={balance.owner} {...balance} />)}\n {total > MAX_VISIBLE ? (\n <button type=\"button\" onClick={() => setOpen(true)} className=\"self-start text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline\">\n +{plural(total - MAX_VISIBLE, \"more owner\")}\n </button>\n ) : null}\n </div>\n <AssetO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Y,cAAc,SAAS;AAAA,KAC7G;AAEJ;","names":[]}
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var asset_page_exports = {};
|
|
21
|
+
__export(asset_page_exports, {
|
|
22
|
+
AssetPage: () => AssetPage,
|
|
23
|
+
AssetPageSkeleton: () => AssetPageSkeleton,
|
|
24
|
+
detectAssetKind: () => detectAssetKind
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(asset_page_exports);
|
|
27
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
+
var import_react = require("react");
|
|
29
|
+
var import_framer_motion = require("framer-motion");
|
|
30
|
+
var import_lucide_react = require("lucide-react");
|
|
31
|
+
var import_sdk = require("@medialane/sdk");
|
|
32
|
+
var import_router = require("./router.js");
|
|
33
|
+
var import_page_container = require("./page-container.js");
|
|
34
|
+
var import_media_header = require("./media-header.js");
|
|
35
|
+
var import_asset_top_sections = require("./asset-top-sections.js");
|
|
36
|
+
var import_asset_utility_icons = require("./asset-utility-icons.js");
|
|
37
|
+
var import_asset_marketplace_panel = require("./asset-marketplace-panel.js");
|
|
38
|
+
var import_asset_owners_panel = require("./asset-owners-panel.js");
|
|
39
|
+
var import_asset_collection_bar = require("./asset-collection-bar.js");
|
|
40
|
+
var import_asset_overview_content = require("./asset-overview-content.js");
|
|
41
|
+
var import_asset_markets_tab = require("./asset-markets-tab.js");
|
|
42
|
+
var import_asset_provenance_tab = require("./asset-provenance-tab.js");
|
|
43
|
+
var import_asset_lightbox = require("./asset-lightbox.js");
|
|
44
|
+
var import_asset_unavailable = require("./asset-unavailable.js");
|
|
45
|
+
var import_hidden_content_banner = require("./hidden-content-banner.js");
|
|
46
|
+
var import_drop_token_link = require("./drop/drop-token-link.js");
|
|
47
|
+
var import_floating_comments_button = require("./floating-comments-button.js");
|
|
48
|
+
var import_asset_comments_dialog = require("./asset-comments-dialog.js");
|
|
49
|
+
var import_asset_type_panels = require("./asset-type-panels.js");
|
|
50
|
+
var import_tabs = require("./tabs.js");
|
|
51
|
+
var import_skeleton = require("./skeleton.js");
|
|
52
|
+
var import_medialane_app = require("./medialane-app.js");
|
|
53
|
+
var import_use_tokens = require("../utils/use-tokens.js");
|
|
54
|
+
var import_use_collections = require("../utils/use-collections.js");
|
|
55
|
+
var import_use_orders = require("../utils/use-orders.js");
|
|
56
|
+
var import_use_remix_offers = require("../utils/use-remix-offers.js");
|
|
57
|
+
var import_use_comments = require("../utils/use-comments.js");
|
|
58
|
+
var import_use_full_token_data = require("../utils/use-full-token-data.js");
|
|
59
|
+
var import_asset_market_state = require("../utils/asset-market-state.js");
|
|
60
|
+
var import_asset_attributes = require("../utils/asset-attributes.js");
|
|
61
|
+
var import_asset_accents = require("../utils/asset-accents.js");
|
|
62
|
+
var import_living_render_collections = require("../data/living-render-collections.js");
|
|
63
|
+
var import_explorer_url = require("../utils/explorer-url.js");
|
|
64
|
+
var import_ipfs = require("../utils/ipfs.js");
|
|
65
|
+
const KINDS = {
|
|
66
|
+
standard: { namePrefix: "Token", icon: import_lucide_react.Image, accents: import_asset_accents.ASSET_ACCENTS.standard, market: true, remix: true },
|
|
67
|
+
edition: { namePrefix: "Edition", icon: import_lucide_react.Layers, accents: import_asset_accents.ASSET_ACCENTS.edition, market: true, remix: false },
|
|
68
|
+
ticket: { namePrefix: "Ticket", icon: import_lucide_react.Ticket, accents: import_asset_accents.ASSET_ACCENTS.ticket, market: true, remix: false, Panel: import_asset_type_panels.TicketPanel },
|
|
69
|
+
membership: { namePrefix: "Membership", icon: import_lucide_react.Users, accents: import_asset_accents.ASSET_ACCENTS.membership, market: true, remix: false, Panel: import_asset_type_panels.MembershipPanel },
|
|
70
|
+
pop: { namePrefix: "POP", icon: import_lucide_react.Award, accents: import_asset_accents.ASSET_ACCENTS.standard, market: false, remix: false }
|
|
71
|
+
};
|
|
72
|
+
const VARIANT_KINDS = { edition: "edition", ticket: "ticket", club: "membership", pop: "pop" };
|
|
73
|
+
function detectAssetKind(service, standard) {
|
|
74
|
+
const variant = (0, import_sdk.getService)(service)?.uiVariant;
|
|
75
|
+
if (variant) return VARIANT_KINDS[variant] ?? "standard";
|
|
76
|
+
return standard === "ERC1155" ? "edition" : "standard";
|
|
77
|
+
}
|
|
78
|
+
function AssetPageSkeleton() {
|
|
79
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_page_container.PageContainer, { className: "pt-20 pb-8", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-1 lg:grid-cols-2 lg:gap-10 gap-6 items-start", children: [
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "aspect-square w-full rounded-3xl" }),
|
|
81
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-6", children: [
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-5 w-24 rounded-full" }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-9 w-3/4" }),
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-4 w-full" }),
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-4 w-2/3" })
|
|
87
|
+
] }),
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-[54px] w-full rounded-2xl" }),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex gap-2", children: Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-[46px] flex-1 rounded-[13px]" }, i)) }),
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-16 w-full rounded-2xl" })
|
|
91
|
+
] })
|
|
92
|
+
] }) });
|
|
93
|
+
}
|
|
94
|
+
function AssetPage({ contract, tokenId, slots }) {
|
|
95
|
+
const { token, isLoading, isIndexing } = (0, import_use_tokens.useToken)(contract, tokenId);
|
|
96
|
+
const { collection, isLoading: collectionLoading } = (0, import_use_collections.useCollection)(contract);
|
|
97
|
+
if (isLoading || collectionLoading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AssetPageSkeleton, {});
|
|
98
|
+
if (!token) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_asset_unavailable.AssetUnavailable, { isIndexing });
|
|
99
|
+
const kind = detectAssetKind(collection?.service, collection?.standard ?? token.standard);
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AssetPageView, { contract, tokenId, token, collection: collection ?? null, kind, slots });
|
|
101
|
+
}
|
|
102
|
+
function AssetPageView({
|
|
103
|
+
contract,
|
|
104
|
+
tokenId,
|
|
105
|
+
token,
|
|
106
|
+
collection,
|
|
107
|
+
kind,
|
|
108
|
+
slots
|
|
109
|
+
}) {
|
|
110
|
+
const config = KINDS[kind];
|
|
111
|
+
const router = (0, import_router.useRouter)();
|
|
112
|
+
const shouldReduce = (0, import_framer_motion.useReducedMotion)();
|
|
113
|
+
const { walletAddress, ReportDialog } = (0, import_medialane_app.useMedialaneApp)();
|
|
114
|
+
const { listings, mutate: mutateListings, isLoading: listingsLoading } = (0, import_use_orders.useTokenListings)(contract, tokenId);
|
|
115
|
+
const { history } = (0, import_use_tokens.useTokenHistory)(contract, tokenId);
|
|
116
|
+
const { tokens: collectionTokens } = (0, import_use_collections.useNearbyCollectionTokens)(contract, tokenId);
|
|
117
|
+
const { total: commentTotal } = (0, import_use_comments.useComments)(contract, tokenId);
|
|
118
|
+
const { total: remixCount } = (0, import_use_remix_offers.useTokenRemixes)(contract, tokenId);
|
|
119
|
+
const { data: fullTokenData } = (0, import_use_full_token_data.useFullTokenData)(contract, tokenId);
|
|
120
|
+
const { amount: walletBalance } = (0, import_use_tokens.useTokenBalance)(contract, tokenId, walletAddress);
|
|
121
|
+
const market = (0, import_asset_market_state.useAssetMarketState)({ token, collection, listings, history, walletAddress, walletBalance });
|
|
122
|
+
const [reportOpen, setReportOpen] = (0, import_react.useState)(false);
|
|
123
|
+
const [commentOpen, setCommentOpen] = (0, import_react.useState)(false);
|
|
124
|
+
const [lightboxOpen, setLightboxOpen] = (0, import_react.useState)(false);
|
|
125
|
+
const [imgError, setImgError] = (0, import_react.useState)(false);
|
|
126
|
+
const name = token.metadata?.name || `${config.namePrefix} #${token.tokenId}`;
|
|
127
|
+
const image = token.metadata?.image ? (0, import_ipfs.ipfsToHttp)(token.metadata.image) : null;
|
|
128
|
+
const tokenStandard = kind === "standard" || kind === "pop" ? token.standard ?? collection?.standard ?? "UNKNOWN" : "ERC1155";
|
|
129
|
+
const actions = slots.useMarketActions({
|
|
130
|
+
contract,
|
|
131
|
+
tokenId,
|
|
132
|
+
tokenName: name,
|
|
133
|
+
tokenImage: image,
|
|
134
|
+
tokenStandard,
|
|
135
|
+
activeListings: market.activeListings,
|
|
136
|
+
quantityOwned: market.quantityOwned,
|
|
137
|
+
mutateListings
|
|
138
|
+
});
|
|
139
|
+
const autoActionRef = (0, import_react.useRef)(false);
|
|
140
|
+
(0, import_react.useEffect)(() => {
|
|
141
|
+
if (autoActionRef.current || !config.market || !market.isOwner) return;
|
|
142
|
+
const action = new URLSearchParams(window.location.search).get("action");
|
|
143
|
+
if (action === "list") actions.list();
|
|
144
|
+
else if (action === "transfer") actions.transfer();
|
|
145
|
+
else return;
|
|
146
|
+
autoActionRef.current = true;
|
|
147
|
+
}, [config.market, market.isOwner, actions]);
|
|
148
|
+
const { attributes, hasTemplateData, isDisplayAttr, parentContract, parentTokenId } = (0, import_asset_attributes.assetAttributes)(token.metadata?.attributes);
|
|
149
|
+
const remixPolicy = (0, import_sdk.resolveRemixPolicy)({
|
|
150
|
+
parentNoDerivatives: (0, import_sdk.getDerivativesTerm)(token.metadata?.attributes) === "Not Allowed",
|
|
151
|
+
viewerIsParentOwner: market.isOwner,
|
|
152
|
+
dealAvailable: !!(0, import_sdk.getService)(collection?.service)
|
|
153
|
+
});
|
|
154
|
+
const holders = token.balances ?? [];
|
|
155
|
+
const ownerAddress = !market.isERC1155 ? holders[0]?.owner ?? token.owner ?? null : null;
|
|
156
|
+
const marketCount = market.activeListings.length + market.activeBids.length;
|
|
157
|
+
const { Panel, icon: FallbackIcon } = config;
|
|
158
|
+
const { Comments, PopBurn } = slots;
|
|
159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative z-0 min-h-screen", children: [
|
|
160
|
+
token.isHidden ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_hidden_content_banner.HiddenContentBanner, {}) : null,
|
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_media_header.PageBackdrop, { image }),
|
|
162
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_page_container.PageContainer, { className: "pt-20 space-y-8 pb-8", children: [
|
|
163
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-1 lg:grid-cols-2 lg:gap-10 gap-8 items-start", children: [
|
|
164
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
165
|
+
import_asset_top_sections.AssetMediaColumn,
|
|
166
|
+
{
|
|
167
|
+
shouldReduce: Boolean(shouldReduce),
|
|
168
|
+
image,
|
|
169
|
+
imageAlt: name,
|
|
170
|
+
imgError,
|
|
171
|
+
onImageError: () => setImgError(true),
|
|
172
|
+
onZoom: () => setLightboxOpen(true),
|
|
173
|
+
animationUrl: token.metadata?.animationUrl,
|
|
174
|
+
live: (0, import_living_render_collections.isLivingRenderCollection)(token.chain, token.contractAddress),
|
|
175
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "aspect-square flex items-center justify-center bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FallbackIcon, { className: "h-24 w-24 text-muted-foreground/40" }) })
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
179
|
+
import_framer_motion.motion.div,
|
|
180
|
+
{
|
|
181
|
+
initial: shouldReduce ? false : { opacity: 0, y: 16 },
|
|
182
|
+
animate: { opacity: 1, y: 0 },
|
|
183
|
+
transition: { duration: 0.5, delay: 0.2 },
|
|
184
|
+
className: "space-y-6",
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
187
|
+
import_asset_top_sections.AssetHeaderBlock,
|
|
188
|
+
{
|
|
189
|
+
name,
|
|
190
|
+
description: token.metadata?.description,
|
|
191
|
+
ipType: token.metadata?.ipType,
|
|
192
|
+
parentContract,
|
|
193
|
+
parentTokenId,
|
|
194
|
+
badges: kind === "pop" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "inline-flex items-center gap-1 text-2xs font-semibold px-2.5 py-1 rounded-full border border-emerald-500/30 bg-emerald-500/10 text-emerald-500", children: [
|
|
195
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Award, { className: "h-3 w-3" }),
|
|
196
|
+
"POP"
|
|
197
|
+
] }) : null,
|
|
198
|
+
utilities: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
199
|
+
import_asset_utility_icons.AssetUtilityIcons,
|
|
200
|
+
{
|
|
201
|
+
contractExplorerHref: `${import_explorer_url.EXPLORER_URL}/contract/${token.contractAddress}`,
|
|
202
|
+
shareTitle: name,
|
|
203
|
+
onReportClick: () => setReportOpen(true)
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
),
|
|
208
|
+
Panel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Panel, { contract, tokenId, quantityOwned: market.quantityOwned }) : null,
|
|
209
|
+
config.market ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
210
|
+
import_asset_marketplace_panel.AssetMarketplacePanel,
|
|
211
|
+
{
|
|
212
|
+
asset: token,
|
|
213
|
+
cheapest: market.cheapest,
|
|
214
|
+
usdValue: market.cheapestUsd,
|
|
215
|
+
isOwner: market.isOwner,
|
|
216
|
+
isProcessing: actions.isProcessing,
|
|
217
|
+
isERC1155: market.isERC1155,
|
|
218
|
+
canListMoreEditions: market.canListMoreEditions,
|
|
219
|
+
isMarketLoading: listingsLoading,
|
|
220
|
+
myListing: market.myListing,
|
|
221
|
+
activeBids: market.activeBids,
|
|
222
|
+
remixEnabled: config.remix && remixPolicy.canRemixDirect,
|
|
223
|
+
showDealOption: config.remix && remixPolicy.showDealOption,
|
|
224
|
+
floorPriceRaw: collection?.floorPrice,
|
|
225
|
+
lastSaleRaw: market.lastSaleRaw,
|
|
226
|
+
onCancelClick: actions.cancel,
|
|
227
|
+
onAcceptBid: actions.acceptBid,
|
|
228
|
+
onOpenListing: actions.list,
|
|
229
|
+
onOpenTransfer: actions.transfer,
|
|
230
|
+
onOpenPurchase: actions.buy,
|
|
231
|
+
onOpenOffer: actions.offer,
|
|
232
|
+
onOpenRemix: () => router.push(`/create/remix/${contract}/${tokenId}`)
|
|
233
|
+
}
|
|
234
|
+
) : null,
|
|
235
|
+
kind === "pop" && market.isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopBurn, { collectionAddress: contract, tokenId }) : null,
|
|
236
|
+
market.isERC1155 && holders.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_asset_owners_panel.AssetOwnersPanel, { contract, tokenId, balances: holders, total: token.holderCount, editions: Number(token.supply ?? 0) }) : null,
|
|
237
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pt-5 space-y-5", children: [
|
|
238
|
+
ownerAddress ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_asset_top_sections.AssetOwnerRow, { ownerAddress, ownerHref: `/creator/${ownerAddress}` }) : null,
|
|
239
|
+
collection?.service === "drop-collection" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_token_link.DropTokenLink, { contract, name: collection.name ?? null }) : null,
|
|
240
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
241
|
+
import_asset_collection_bar.AssetCollectionBar,
|
|
242
|
+
{
|
|
243
|
+
collectionName: collection?.name ?? contract.slice(0, 8) + "\u2026",
|
|
244
|
+
collectionImage: collection?.image ? (0, import_ipfs.ipfsToHttp)(collection.image) : null,
|
|
245
|
+
collectionHref: (0, import_sdk.collectionHref)("STARKNET", contract),
|
|
246
|
+
currentTokenId: tokenId,
|
|
247
|
+
siblingTokens: collectionTokens.map((t) => ({
|
|
248
|
+
tokenId: t.tokenId,
|
|
249
|
+
image: t.metadata?.image ? (0, import_ipfs.ipfsToHttp)(t.metadata.image) : null
|
|
250
|
+
})),
|
|
251
|
+
onNavigate: (id) => router.push((0, import_sdk.assetHref)("STARKNET", contract, id))
|
|
252
|
+
}
|
|
253
|
+
)
|
|
254
|
+
] })
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
] }),
|
|
259
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.Tabs, { defaultValue: "overview", children: [
|
|
260
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsList, { children: [
|
|
261
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTrigger, { value: "overview", children: "Overview" }),
|
|
262
|
+
config.market ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsTrigger, { value: "markets", children: [
|
|
263
|
+
"Markets ",
|
|
264
|
+
marketCount > 0 && `(${marketCount})`
|
|
265
|
+
] }) : null,
|
|
266
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsTrigger, { value: "provenance", children: [
|
|
267
|
+
"Provenance ",
|
|
268
|
+
history.length > 0 && `(${history.length})`
|
|
269
|
+
] })
|
|
270
|
+
] }),
|
|
271
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsContent, { value: "overview", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_asset_overview_content.AssetOverviewContent, { attributes, hasTemplateData, isDisplayAttr }) }),
|
|
272
|
+
config.market ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsContent, { value: "markets", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
273
|
+
import_asset_markets_tab.AssetMarketsTab,
|
|
274
|
+
{
|
|
275
|
+
activeListings: market.activeListings,
|
|
276
|
+
activeBids: market.activeBids,
|
|
277
|
+
walletAddress: walletAddress ?? void 0,
|
|
278
|
+
isOwner: market.isOwner,
|
|
279
|
+
isProcessing: actions.isProcessing,
|
|
280
|
+
onBuyClick: actions.buy,
|
|
281
|
+
onCancelClick: actions.cancel,
|
|
282
|
+
onAcceptClick: actions.acceptBid
|
|
283
|
+
}
|
|
284
|
+
) }) : null,
|
|
285
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsContent, { value: "provenance", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
286
|
+
import_asset_provenance_tab.AssetProvenanceTab,
|
|
287
|
+
{
|
|
288
|
+
history,
|
|
289
|
+
contract,
|
|
290
|
+
tokenId,
|
|
291
|
+
remixCount,
|
|
292
|
+
originalCreator: fullTokenData?.originalCreator,
|
|
293
|
+
registeredAt: fullTokenData?.registeredAt
|
|
294
|
+
}
|
|
295
|
+
) })
|
|
296
|
+
] })
|
|
297
|
+
] }),
|
|
298
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_asset_lightbox.AssetLightbox, { open: lightboxOpen, onOpenChange: setLightboxOpen, image, alt: name }),
|
|
299
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_floating_comments_button.FloatingCommentsButton, { onClick: () => setCommentOpen(true), commentTotal }),
|
|
300
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
301
|
+
import_asset_comments_dialog.AssetCommentsDialog,
|
|
302
|
+
{
|
|
303
|
+
open: commentOpen,
|
|
304
|
+
onOpenChange: setCommentOpen,
|
|
305
|
+
contract,
|
|
306
|
+
tokenId,
|
|
307
|
+
name,
|
|
308
|
+
imageUrl: image,
|
|
309
|
+
commentTotal,
|
|
310
|
+
Comments,
|
|
311
|
+
...config.accents
|
|
312
|
+
}
|
|
313
|
+
),
|
|
314
|
+
ReportDialog ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReportDialog, { open: reportOpen, onOpenChange: setReportOpen, target: { type: "TOKEN", contract: token.contractAddress, tokenId: token.tokenId, name } }) : null,
|
|
315
|
+
actions.dialogs
|
|
316
|
+
] });
|
|
317
|
+
}
|
|
318
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
319
|
+
0 && (module.exports = {
|
|
320
|
+
AssetPage,
|
|
321
|
+
AssetPageSkeleton,
|
|
322
|
+
detectAssetKind
|
|
323
|
+
});
|
|
324
|
+
//# sourceMappingURL=asset-page.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState, type ComponentType, type ElementType, type ReactNode } from \"react\";\nimport { motion, useReducedMotion } from \"framer-motion\";\nimport { Award, Image as ImageIcon, Layers, Ticket, Users } from \"lucide-react\";\nimport { assetHref, collectionHref, getDerivativesTerm, getService, resolveRemixPolicy, type ApiActivity, type ApiCollection, type ApiOrder, type ApiToken, type Chain } from \"@medialane/sdk\";\nimport { useRouter } from \"./router.js\";\nimport { PageContainer } from \"./page-container.js\";\nimport { PageBackdrop } from \"./media-header.js\";\nimport { AssetHeaderBlock, AssetMediaColumn, AssetOwnerRow } from \"./asset-top-sections.js\";\nimport { AssetUtilityIcons } from \"./asset-utility-icons.js\";\nimport { AssetMarketplacePanel } from \"./asset-marketplace-panel.js\";\nimport { AssetOwnersPanel } from \"./asset-owners-panel.js\";\nimport { AssetCollectionBar } from \"./asset-collection-bar.js\";\nimport { AssetOverviewContent } from \"./asset-overview-content.js\";\nimport { AssetMarketsTab } from \"./asset-markets-tab.js\";\nimport { AssetProvenanceTab } from \"./asset-provenance-tab.js\";\nimport { AssetLightbox } from \"./asset-lightbox.js\";\nimport { AssetUnavailable } from \"./asset-unavailable.js\";\nimport { HiddenContentBanner } from \"./hidden-content-banner.js\";\nimport { DropTokenLink } from \"./drop/drop-token-link.js\";\nimport { FloatingCommentsButton } from \"./floating-comments-button.js\";\nimport { AssetCommentsDialog, type AssetCommentsProps } from \"./asset-comments-dialog.js\";\nimport { MembershipPanel, TicketPanel, type AssetTypePanelProps } from \"./asset-type-panels.js\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"./tabs.js\";\nimport { Skeleton } from \"./skeleton.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { useToken, useTokenBalance, useTokenHistory } from \"../utils/use-tokens.js\";\nimport { useCollection, useNearbyCollectionTokens } from \"../utils/use-collections.js\";\nimport { useTokenListings } from \"../utils/use-orders.js\";\nimport { useTokenRemixes } from \"../utils/use-remix-offers.js\";\nimport { useComments } from \"../utils/use-comments.js\";\nimport { useFullTokenData } from \"../utils/use-full-token-data.js\";\nimport { useAssetMarketState } from \"../utils/asset-market-state.js\";\nimport { assetAttributes } from \"../utils/asset-attributes.js\";\nimport { ASSET_ACCENTS } from \"../utils/asset-accents.js\";\nimport { isLivingRenderCollection } from \"../data/living-render-collections.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\n\nexport type AssetKind = \"standard\" | \"edition\" | \"ticket\" | \"membership\" | \"pop\";\n\nexport interface AssetMarketContext {\n contract: string;\n tokenId: string;\n tokenName: string;\n tokenImage: string | null;\n tokenStandard: \"ERC721\" | \"ERC1155\" | \"UNKNOWN\";\n activeListings: ApiOrder[];\n quantityOwned?: string;\n mutateListings: () => void;\n}\n\nexport interface AssetMarketActions {\n isProcessing: boolean;\n buy: (order: ApiOrder) => void;\n list: () => void;\n offer: () => void;\n transfer: () => void;\n cancel: (order: ApiOrder) => void;\n acceptBid: (order: ApiOrder) => void;\n dialogs: ReactNode;\n}\n\nexport interface AssetPageSlots {\n useMarketActions: (context: AssetMarketContext) => AssetMarketActions;\n Comments: ComponentType<AssetCommentsProps>;\n PopBurn: ComponentType<{ collectionAddress: string; tokenId: string }>;\n}\n\ninterface KindConfig {\n namePrefix: string;\n icon: ElementType;\n accents: (typeof ASSET_ACCENTS)[keyof typeof ASSET_ACCENTS];\n market: boolean;\n remix: boolean;\n Panel?: ComponentType<AssetTypePanelProps>;\n}\n\nconst KINDS: Record<AssetKind, KindConfig> = {\n standard: { namePrefix: \"Token\", icon: ImageIcon, accents: ASSET_ACCENTS.standard, market: true, remix: true },\n edition: { namePrefix: \"Edition\", icon: Layers, accents: ASSET_ACCENTS.edition, market: true, remix: false },\n ticket: { namePrefix: \"Ticket\", icon: Ticket, accents: ASSET_ACCENTS.ticket, market: true, remix: false, Panel: TicketPanel },\n membership: { namePrefix: \"Membership\", icon: Users, accents: ASSET_ACCENTS.membership, market: true, remix: false, Panel: MembershipPanel },\n pop: { namePrefix: \"POP\", icon: Award, accents: ASSET_ACCENTS.standard, market: false, remix: false },\n};\n\nconst VARIANT_KINDS: Partial<Record<string, AssetKind>> = { edition: \"edition\", ticket: \"ticket\", club: \"membership\", pop: \"pop\" };\n\nexport function detectAssetKind(service: string | null | undefined, standard: string | null | undefined): AssetKind {\n const variant = getService(service)?.uiVariant;\n if (variant) return VARIANT_KINDS[variant] ?? \"standard\";\n return standard === \"ERC1155\" ? \"edition\" : \"standard\";\n}\n\nexport function AssetPageSkeleton() {\n return (\n <PageContainer className=\"pt-20 pb-8\">\n <div className=\"grid grid-cols-1 lg:grid-cols-2 lg:gap-10 gap-6 items-start\">\n <Skeleton className=\"aspect-square w-full rounded-3xl\" />\n <div className=\"space-y-6\">\n <div className=\"space-y-3\">\n <Skeleton className=\"h-5 w-24 rounded-full\" />\n <Skeleton className=\"h-9 w-3/4\" />\n <Skeleton className=\"h-4 w-full\" />\n <Skeleton className=\"h-4 w-2/3\" />\n </div>\n <Skeleton className=\"h-[54px] w-full rounded-2xl\" />\n <div className=\"flex gap-2\">\n {Array.from({ length: 3 }).map((_, i) => <Skeleton key={i} className=\"h-[46px] flex-1 rounded-[13px]\" />)}\n </div>\n <Skeleton className=\"h-16 w-full rounded-2xl\" />\n </div>\n </div>\n </PageContainer>\n );\n}\n\nexport interface AssetPageProps {\n contract: string;\n tokenId: string;\n slots: AssetPageSlots;\n}\n\nexport function AssetPage({ contract, tokenId, slots }: AssetPageProps) {\n const { token, isLoading, isIndexing } = useToken(contract, tokenId);\n const { collection, isLoading: collectionLoading } = useCollection(contract);\n if (isLoading || collectionLoading) return <AssetPageSkeleton />;\n if (!token) return <AssetUnavailable isIndexing={isIndexing} />;\n const kind = detectAssetKind(collection?.service, collection?.standard ?? token.standard);\n return <AssetPageView contract={contract} tokenId={tokenId} token={token} collection={collection ?? null} kind={kind} slots={slots} />;\n}\n\nfunction AssetPageView({\n contract,\n tokenId,\n token,\n collection,\n kind,\n slots,\n}: {\n contract: string;\n tokenId: string;\n token: ApiToken & { isHidden?: boolean };\n collection: ApiCollection | null;\n kind: AssetKind;\n slots: AssetPageSlots;\n}) {\n const config = KINDS[kind];\n const router = useRouter();\n const shouldReduce = useReducedMotion();\n const { walletAddress, ReportDialog } = useMedialaneApp();\n\n const { listings, mutate: mutateListings, isLoading: listingsLoading } = useTokenListings(contract, tokenId);\n const { history } = useTokenHistory(contract, tokenId);\n const { tokens: collectionTokens } = useNearbyCollectionTokens(contract, tokenId);\n const { total: commentTotal } = useComments(contract, tokenId);\n const { total: remixCount } = useTokenRemixes(contract, tokenId);\n const { data: fullTokenData } = useFullTokenData(contract, tokenId);\n const { amount: walletBalance } = useTokenBalance(contract, tokenId, walletAddress);\n const market = useAssetMarketState({ token, collection, listings, history: history as ApiActivity[], walletAddress, walletBalance });\n\n const [reportOpen, setReportOpen] = useState(false);\n const [commentOpen, setCommentOpen] = useState(false);\n const [lightboxOpen, setLightboxOpen] = useState(false);\n const [imgError, setImgError] = useState(false);\n\n const name = token.metadata?.name || `${config.namePrefix} #${token.tokenId}`;\n const image = token.metadata?.image ? ipfsToHttp(token.metadata.image) : null;\n const tokenStandard = kind === \"standard\" || kind === \"pop\"\n ? ((token.standard ?? collection?.standard ?? \"UNKNOWN\") as AssetMarketContext[\"tokenStandard\"])\n : \"ERC1155\";\n\n const actions = slots.useMarketActions({\n contract,\n tokenId,\n tokenName: name,\n tokenImage: image,\n tokenStandard,\n activeListings: market.activeListings,\n quantityOwned: market.quantityOwned,\n mutateListings,\n });\n\n const autoActionRef = useRef(false);\n useEffect(() => {\n if (autoActionRef.current || !config.market || !market.isOwner) return;\n const action = new URLSearchParams(window.location.search).get(\"action\");\n if (action === \"list\") actions.list();\n else if (action === \"transfer\") actions.transfer();\n else return;\n autoActionRef.current = true;\n }, [config.market, market.isOwner, actions]);\n\n const { attributes, hasTemplateData, isDisplayAttr, parentContract, parentTokenId } = assetAttributes(token.metadata?.attributes);\n const remixPolicy = resolveRemixPolicy({\n parentNoDerivatives: getDerivativesTerm(token.metadata?.attributes) === \"Not Allowed\",\n viewerIsParentOwner: market.isOwner,\n dealAvailable: !!getService(collection?.service),\n });\n const holders = token.balances ?? [];\n const ownerAddress = !market.isERC1155 ? (holders[0]?.owner ?? token.owner ?? null) : null;\n const marketCount = market.activeListings.length + market.activeBids.length;\n const { Panel, icon: FallbackIcon } = config;\n const { Comments, PopBurn } = slots;\n\n return (\n <div className=\"relative z-0 min-h-screen\">\n {token.isHidden ? <HiddenContentBanner /> : null}\n <PageBackdrop image={image} />\n\n <PageContainer className=\"pt-20 space-y-8 pb-8\">\n <div className=\"grid grid-cols-1 lg:grid-cols-2 lg:gap-10 gap-8 items-start\">\n <AssetMediaColumn\n shouldReduce={Boolean(shouldReduce)}\n image={image}\n imageAlt={name}\n imgError={imgError}\n onImageError={() => setImgError(true)}\n onZoom={() => setLightboxOpen(true)}\n animationUrl={token.metadata?.animationUrl}\n live={isLivingRenderCollection(token.chain as Chain, token.contractAddress)}\n fallback={(\n <div className=\"aspect-square flex items-center justify-center bg-muted\">\n <FallbackIcon className=\"h-24 w-24 text-muted-foreground/40\" />\n </div>\n )}\n />\n\n <motion.div\n initial={shouldReduce ? false : { opacity: 0, y: 16 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.5, delay: 0.2 }}\n className=\"space-y-6\"\n >\n <AssetHeaderBlock\n name={name}\n description={token.metadata?.description}\n ipType={token.metadata?.ipType}\n parentContract={parentContract}\n parentTokenId={parentTokenId}\n badges={kind === \"pop\" ? (\n <span className=\"inline-flex items-center gap-1 text-2xs font-semibold px-2.5 py-1 rounded-full border border-emerald-500/30 bg-emerald-500/10 text-emerald-500\">\n <Award className=\"h-3 w-3\" />\n POP\n </span>\n ) : null}\n utilities={(\n <AssetUtilityIcons\n contractExplorerHref={`${EXPLORER_URL}/contract/${token.contractAddress}`}\n shareTitle={name}\n onReportClick={() => setReportOpen(true)}\n />\n )}\n />\n\n {Panel ? <Panel contract={contract} tokenId={tokenId} quantityOwned={market.quantityOwned} /> : null}\n\n {config.market ? (\n <AssetMarketplacePanel\n asset={token}\n cheapest={market.cheapest}\n usdValue={market.cheapestUsd}\n isOwner={market.isOwner}\n isProcessing={actions.isProcessing}\n isERC1155={market.isERC1155}\n canListMoreEditions={market.canListMoreEditions}\n isMarketLoading={listingsLoading}\n myListing={market.myListing}\n activeBids={market.activeBids}\n remixEnabled={config.remix && remixPolicy.canRemixDirect}\n showDealOption={config.remix && remixPolicy.showDealOption}\n floorPriceRaw={collection?.floorPrice}\n lastSaleRaw={market.lastSaleRaw}\n onCancelClick={actions.cancel}\n onAcceptBid={actions.acceptBid}\n onOpenListing={actions.list}\n onOpenTransfer={actions.transfer}\n onOpenPurchase={actions.buy}\n onOpenOffer={actions.offer}\n onOpenRemix={() => router.push(`/create/remix/${contract}/${tokenId}`)}\n />\n ) : null}\n\n {kind === \"pop\" && market.isOwner ? <PopBurn collectionAddress={contract} tokenId={tokenId} /> : null}\n\n {market.isERC1155 && holders.length > 0 ? (\n <AssetOwnersPanel contract={contract} tokenId={tokenId} balances={holders} total={token.holderCount} editions={Number(token.supply ?? 0)} />\n ) : null}\n\n <div className=\"pt-5 space-y-5\">\n {ownerAddress ? <AssetOwnerRow ownerAddress={ownerAddress} ownerHref={`/creator/${ownerAddress}`} /> : null}\n {collection?.service === \"drop-collection\" ? <DropTokenLink contract={contract} name={collection.name ?? null} /> : null}\n <AssetCollectionBar\n collectionName={collection?.name ?? contract.slice(0, 8) + \"…\"}\n collectionImage={collection?.image ? ipfsToHttp(collection.image) : null}\n collectionHref={collectionHref(\"STARKNET\", contract)}\n currentTokenId={tokenId}\n siblingTokens={collectionTokens.map((t) => ({\n tokenId: t.tokenId,\n image: t.metadata?.image ? ipfsToHttp(t.metadata.image) : null,\n }))}\n onNavigate={(id) => router.push(assetHref(\"STARKNET\", contract, id))}\n />\n </div>\n </motion.div>\n </div>\n\n <Tabs defaultValue=\"overview\">\n <TabsList>\n <TabsTrigger value=\"overview\">Overview</TabsTrigger>\n {config.market ? <TabsTrigger value=\"markets\">Markets {marketCount > 0 && `(${marketCount})`}</TabsTrigger> : null}\n <TabsTrigger value=\"provenance\">Provenance {history.length > 0 && `(${history.length})`}</TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"overview\">\n <AssetOverviewContent attributes={attributes} hasTemplateData={hasTemplateData} isDisplayAttr={isDisplayAttr} />\n </TabsContent>\n\n {config.market ? (\n <TabsContent value=\"markets\">\n <AssetMarketsTab\n activeListings={market.activeListings}\n activeBids={market.activeBids}\n walletAddress={walletAddress ?? undefined}\n isOwner={market.isOwner}\n isProcessing={actions.isProcessing}\n onBuyClick={actions.buy}\n onCancelClick={actions.cancel}\n onAcceptClick={actions.acceptBid}\n />\n </TabsContent>\n ) : null}\n\n <TabsContent value=\"provenance\">\n <AssetProvenanceTab\n history={history as ApiActivity[]}\n contract={contract}\n tokenId={tokenId}\n remixCount={remixCount}\n originalCreator={fullTokenData?.originalCreator}\n registeredAt={fullTokenData?.registeredAt}\n />\n </TabsContent>\n </Tabs>\n </PageContainer>\n\n <AssetLightbox open={lightboxOpen} onOpenChange={setLightboxOpen} image={image} alt={name} />\n <FloatingCommentsButton onClick={() => setCommentOpen(true)} commentTotal={commentTotal} />\n <AssetCommentsDialog\n open={commentOpen}\n onOpenChange={setCommentOpen}\n contract={contract}\n tokenId={tokenId}\n name={name}\n imageUrl={image}\n commentTotal={commentTotal}\n Comments={Comments}\n {...config.accents}\n />\n {ReportDialog ? <ReportDialog open={reportOpen} onOpenChange={setReportOpen} target={{ type: \"TOKEN\", contract: token.contractAddress, token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AAA;AAAA,QACC,MAAM;AAAA,QACN,cAAc;AAAA,QACd;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACC,GAAG,OAAO;AAAA;AAAA,IACb;AAAA,IACC,eAAe,4CAAC,gBAAa,MAAM,YAAY,cAAc,eAAe,QAAQ,EAAE,MAAM,SAAS,UAAU,MAAM,iBAAiB,SAAS,MAAM,SAAS,KAAK,GAAG,IAAK;AAAA,IAC3K,QAAQ;AAAA,KACX;AAEJ;","names":["ImageIcon"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, ComponentType } from 'react';
|
|
3
|
+
import { ApiOrder } from '@medialane/sdk';
|
|
4
|
+
import { AssetCommentsProps } from './asset-comments-dialog.cjs';
|
|
5
|
+
|
|
6
|
+
type AssetKind = "standard" | "edition" | "ticket" | "membership" | "pop";
|
|
7
|
+
interface AssetMarketContext {
|
|
8
|
+
contract: string;
|
|
9
|
+
tokenId: string;
|
|
10
|
+
tokenName: string;
|
|
11
|
+
tokenImage: string | null;
|
|
12
|
+
tokenStandard: "ERC721" | "ERC1155" | "UNKNOWN";
|
|
13
|
+
activeListings: ApiOrder[];
|
|
14
|
+
quantityOwned?: string;
|
|
15
|
+
mutateListings: () => void;
|
|
16
|
+
}
|
|
17
|
+
interface AssetMarketActions {
|
|
18
|
+
isProcessing: boolean;
|
|
19
|
+
buy: (order: ApiOrder) => void;
|
|
20
|
+
list: () => void;
|
|
21
|
+
offer: () => void;
|
|
22
|
+
transfer: () => void;
|
|
23
|
+
cancel: (order: ApiOrder) => void;
|
|
24
|
+
acceptBid: (order: ApiOrder) => void;
|
|
25
|
+
dialogs: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
interface AssetPageSlots {
|
|
28
|
+
useMarketActions: (context: AssetMarketContext) => AssetMarketActions;
|
|
29
|
+
Comments: ComponentType<AssetCommentsProps>;
|
|
30
|
+
PopBurn: ComponentType<{
|
|
31
|
+
collectionAddress: string;
|
|
32
|
+
tokenId: string;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
declare function detectAssetKind(service: string | null | undefined, standard: string | null | undefined): AssetKind;
|
|
36
|
+
declare function AssetPageSkeleton(): react_jsx_runtime.JSX.Element;
|
|
37
|
+
interface AssetPageProps {
|
|
38
|
+
contract: string;
|
|
39
|
+
tokenId: string;
|
|
40
|
+
slots: AssetPageSlots;
|
|
41
|
+
}
|
|
42
|
+
declare function AssetPage({ contract, tokenId, slots }: AssetPageProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { type AssetKind, type AssetMarketActions, type AssetMarketContext, AssetPage, type AssetPageProps, AssetPageSkeleton, type AssetPageSlots, detectAssetKind };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, ComponentType } from 'react';
|
|
3
|
+
import { ApiOrder } from '@medialane/sdk';
|
|
4
|
+
import { AssetCommentsProps } from './asset-comments-dialog.js';
|
|
5
|
+
|
|
6
|
+
type AssetKind = "standard" | "edition" | "ticket" | "membership" | "pop";
|
|
7
|
+
interface AssetMarketContext {
|
|
8
|
+
contract: string;
|
|
9
|
+
tokenId: string;
|
|
10
|
+
tokenName: string;
|
|
11
|
+
tokenImage: string | null;
|
|
12
|
+
tokenStandard: "ERC721" | "ERC1155" | "UNKNOWN";
|
|
13
|
+
activeListings: ApiOrder[];
|
|
14
|
+
quantityOwned?: string;
|
|
15
|
+
mutateListings: () => void;
|
|
16
|
+
}
|
|
17
|
+
interface AssetMarketActions {
|
|
18
|
+
isProcessing: boolean;
|
|
19
|
+
buy: (order: ApiOrder) => void;
|
|
20
|
+
list: () => void;
|
|
21
|
+
offer: () => void;
|
|
22
|
+
transfer: () => void;
|
|
23
|
+
cancel: (order: ApiOrder) => void;
|
|
24
|
+
acceptBid: (order: ApiOrder) => void;
|
|
25
|
+
dialogs: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
interface AssetPageSlots {
|
|
28
|
+
useMarketActions: (context: AssetMarketContext) => AssetMarketActions;
|
|
29
|
+
Comments: ComponentType<AssetCommentsProps>;
|
|
30
|
+
PopBurn: ComponentType<{
|
|
31
|
+
collectionAddress: string;
|
|
32
|
+
tokenId: string;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
declare function detectAssetKind(service: string | null | undefined, standard: string | null | undefined): AssetKind;
|
|
36
|
+
declare function AssetPageSkeleton(): react_jsx_runtime.JSX.Element;
|
|
37
|
+
interface AssetPageProps {
|
|
38
|
+
contract: string;
|
|
39
|
+
tokenId: string;
|
|
40
|
+
slots: AssetPageSlots;
|
|
41
|
+
}
|
|
42
|
+
declare function AssetPage({ contract, tokenId, slots }: AssetPageProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { type AssetKind, type AssetMarketActions, type AssetMarketContext, AssetPage, type AssetPageProps, AssetPageSkeleton, type AssetPageSlots, detectAssetKind };
|