@medialane/ui 0.201.6 → 0.201.7
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/collection-header.cjs +9 -9
- package/dist/components/collection-header.cjs.map +1 -1
- package/dist/components/collection-header.js +9 -9
- package/dist/components/collection-header.js.map +1 -1
- package/dist/components/creator-header.cjs +2 -2
- package/dist/components/creator-header.cjs.map +1 -1
- package/dist/components/creator-header.js +2 -2
- package/dist/components/creator-header.js.map +1 -1
- package/dist/components/media-header.cjs +1 -1
- package/dist/components/media-header.cjs.map +1 -1
- package/dist/components/media-header.js +1 -1
- package/dist/components/media-header.js.map +1 -1
- package/package.json +1 -1
|
@@ -51,15 +51,7 @@ function CollectionHeader({ collection, loading = false, onReportClick, children
|
|
|
51
51
|
badges: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
52
52
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: CHIP, children: collection.standard === "ERC1155" ? "Multi-edition" : "Single NFT" }),
|
|
53
53
|
collection.symbol ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: CHIP, children: collection.symbol }) : null
|
|
54
|
-
] })
|
|
55
|
-
utilities: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
-
import_asset_utility_icons.AssetUtilityIcons,
|
|
57
|
-
{
|
|
58
|
-
contractExplorerHref: `${import_explorer_url.EXPLORER_URL}/contract/${collection.contractAddress}`,
|
|
59
|
-
shareTitle: name,
|
|
60
|
-
onReportClick
|
|
61
|
-
}
|
|
62
|
-
)
|
|
54
|
+
] })
|
|
63
55
|
}
|
|
64
56
|
),
|
|
65
57
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_media_header.HeaderStats, { children: [
|
|
@@ -72,6 +64,14 @@ function CollectionHeader({ collection, loading = false, onReportClick, children
|
|
|
72
64
|
collection.owner ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_creator_chip.CreatorChip, { address: collection.owner }) : null,
|
|
73
65
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_address_display.AddressDisplay, { address: collection.contractAddress, chars: 6, className: "text-xs text-muted-foreground" })
|
|
74
66
|
] }),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "-ml-3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
68
|
+
import_asset_utility_icons.AssetUtilityIcons,
|
|
69
|
+
{
|
|
70
|
+
contractExplorerHref: `${import_explorer_url.EXPLORER_URL}/contract/${collection.contractAddress}`,
|
|
71
|
+
shareTitle: name,
|
|
72
|
+
onReportClick
|
|
73
|
+
}
|
|
74
|
+
) }),
|
|
75
75
|
children
|
|
76
76
|
] }) : null });
|
|
77
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/collection-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Layers } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { AssetUtilityIcons } from \"./asset-utility-icons.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorChip } from \"./creator-chip.js\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\n\nconst CHIP = \"text-2xs font-semibold px-2.5 py-1 rounded-full bg-muted text-muted-foreground\";\n\nexport interface CollectionHeaderProps {\n collection: ApiCollection | null | undefined;\n loading?: boolean;\n onReportClick: () => void;\n children?: ReactNode;\n}\n\nfunction PriceStat({ label, raw }: { label: string; raw: string | null }) {\n const { numStr, symbol } = parsePriceDisplay(raw);\n if (!symbol || numStr === \"—\") return null;\n return (\n <HeaderStat label={label}>\n <CurrencyAmount amount={numStr} symbol={symbol} iconSize={12} />\n </HeaderStat>\n );\n}\n\nexport function CollectionHeader({ collection, loading = false, onReportClick, children }: CollectionHeaderProps) {\n const image = collection?.image ? ipfsToHttp(collection.image) : null;\n const name = collection?.name ?? \"Unnamed Collection\";\n\n return (\n <MediaHeader image={image} imageAlt={name} fallbackIcon={Layers} loading={loading || !collection}>\n {collection ? (\n <>\n <AssetHeaderBlock\n name={name}\n description={collection.description}\n badges={(\n <>\n <span className={CHIP}>{collection.standard === \"ERC1155\" ? \"Multi-edition\" : \"Single NFT\"}</span>\n {collection.symbol ? <span className={CHIP}>{collection.symbol}</span> : null}\n </>\n )}\n
|
|
1
|
+
{"version":3,"sources":["../../src/components/collection-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Layers } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { AssetUtilityIcons } from \"./asset-utility-icons.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorChip } from \"./creator-chip.js\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\n\nconst CHIP = \"text-2xs font-semibold px-2.5 py-1 rounded-full bg-muted text-muted-foreground\";\n\nexport interface CollectionHeaderProps {\n collection: ApiCollection | null | undefined;\n loading?: boolean;\n onReportClick: () => void;\n children?: ReactNode;\n}\n\nfunction PriceStat({ label, raw }: { label: string; raw: string | null }) {\n const { numStr, symbol } = parsePriceDisplay(raw);\n if (!symbol || numStr === \"—\") return null;\n return (\n <HeaderStat label={label}>\n <CurrencyAmount amount={numStr} symbol={symbol} iconSize={12} />\n </HeaderStat>\n );\n}\n\nexport function CollectionHeader({ collection, loading = false, onReportClick, children }: CollectionHeaderProps) {\n const image = collection?.image ? ipfsToHttp(collection.image) : null;\n const name = collection?.name ?? \"Unnamed Collection\";\n\n return (\n <MediaHeader image={image} imageAlt={name} fallbackIcon={Layers} loading={loading || !collection}>\n {collection ? (\n <>\n <AssetHeaderBlock\n name={name}\n description={collection.description}\n badges={(\n <>\n <span className={CHIP}>{collection.standard === \"ERC1155\" ? \"Multi-edition\" : \"Single NFT\"}</span>\n {collection.symbol ? <span className={CHIP}>{collection.symbol}</span> : null}\n </>\n )}\n />\n\n <HeaderStats>\n {collection.totalSupply != null ? <HeaderStat label=\"Items\">{collection.totalSupply.toLocaleString()}</HeaderStat> : null}\n {collection.holderCount != null ? <HeaderStat label=\"Holders\">{collection.holderCount.toLocaleString()}</HeaderStat> : null}\n <PriceStat label=\"Floor\" raw={collection.floorPrice} />\n <PriceStat label=\"Volume\" raw={collection.totalVolume} />\n </HeaderStats>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n {collection.owner ? <CreatorChip address={collection.owner} /> : null}\n <AddressDisplay address={collection.contractAddress} chars={6} className=\"text-xs text-muted-foreground\" />\n </div>\n\n <div className=\"-ml-3\">\n <AssetUtilityIcons\n contractExplorerHref={`${EXPLORER_URL}/contract/${collection.contractAddress}`}\n shareTitle={name}\n onReportClick={onReportClick}\n />\n </div>\n\n {children}\n </>\n ) : null}\n </MediaHeader>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BM;AA1BN,0BAAuB;AAEvB,gCAAiC;AACjC,0BAAqD;AACrD,iCAAkC;AAClC,6BAA+B;AAC/B,0BAA4B;AAC5B,2BAA+B;AAC/B,kBAA2B;AAC3B,oBAAkC;AAClC,0BAA6B;AAE7B,MAAM,OAAO;AASb,SAAS,UAAU,EAAE,OAAO,IAAI,GAA0C;AACxE,QAAM,EAAE,QAAQ,OAAO,QAAI,iCAAkB,GAAG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AW,eAAe;AAAA,QAC5E,YAAY;AAAA,QACZ;AAAA;AAAA,IACF,GACF;AAAA,IAEC;AAAA,KACH,IACE,MACN;AAEJ;","names":[]}
|
|
@@ -28,15 +28,7 @@ function CollectionHeader({ collection, loading = false, onReportClick, children
|
|
|
28
28
|
badges: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29
29
|
/* @__PURE__ */ jsx("span", { className: CHIP, children: collection.standard === "ERC1155" ? "Multi-edition" : "Single NFT" }),
|
|
30
30
|
collection.symbol ? /* @__PURE__ */ jsx("span", { className: CHIP, children: collection.symbol }) : null
|
|
31
|
-
] })
|
|
32
|
-
utilities: /* @__PURE__ */ jsx(
|
|
33
|
-
AssetUtilityIcons,
|
|
34
|
-
{
|
|
35
|
-
contractExplorerHref: `${EXPLORER_URL}/contract/${collection.contractAddress}`,
|
|
36
|
-
shareTitle: name,
|
|
37
|
-
onReportClick
|
|
38
|
-
}
|
|
39
|
-
)
|
|
31
|
+
] })
|
|
40
32
|
}
|
|
41
33
|
),
|
|
42
34
|
/* @__PURE__ */ jsxs(HeaderStats, { children: [
|
|
@@ -49,6 +41,14 @@ function CollectionHeader({ collection, loading = false, onReportClick, children
|
|
|
49
41
|
collection.owner ? /* @__PURE__ */ jsx(CreatorChip, { address: collection.owner }) : null,
|
|
50
42
|
/* @__PURE__ */ jsx(AddressDisplay, { address: collection.contractAddress, chars: 6, className: "text-xs text-muted-foreground" })
|
|
51
43
|
] }),
|
|
44
|
+
/* @__PURE__ */ jsx("div", { className: "-ml-3", children: /* @__PURE__ */ jsx(
|
|
45
|
+
AssetUtilityIcons,
|
|
46
|
+
{
|
|
47
|
+
contractExplorerHref: `${EXPLORER_URL}/contract/${collection.contractAddress}`,
|
|
48
|
+
shareTitle: name,
|
|
49
|
+
onReportClick
|
|
50
|
+
}
|
|
51
|
+
) }),
|
|
52
52
|
children
|
|
53
53
|
] }) : null });
|
|
54
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/collection-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Layers } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { AssetUtilityIcons } from \"./asset-utility-icons.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorChip } from \"./creator-chip.js\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\n\nconst CHIP = \"text-2xs font-semibold px-2.5 py-1 rounded-full bg-muted text-muted-foreground\";\n\nexport interface CollectionHeaderProps {\n collection: ApiCollection | null | undefined;\n loading?: boolean;\n onReportClick: () => void;\n children?: ReactNode;\n}\n\nfunction PriceStat({ label, raw }: { label: string; raw: string | null }) {\n const { numStr, symbol } = parsePriceDisplay(raw);\n if (!symbol || numStr === \"—\") return null;\n return (\n <HeaderStat label={label}>\n <CurrencyAmount amount={numStr} symbol={symbol} iconSize={12} />\n </HeaderStat>\n );\n}\n\nexport function CollectionHeader({ collection, loading = false, onReportClick, children }: CollectionHeaderProps) {\n const image = collection?.image ? ipfsToHttp(collection.image) : null;\n const name = collection?.name ?? \"Unnamed Collection\";\n\n return (\n <MediaHeader image={image} imageAlt={name} fallbackIcon={Layers} loading={loading || !collection}>\n {collection ? (\n <>\n <AssetHeaderBlock\n name={name}\n description={collection.description}\n badges={(\n <>\n <span className={CHIP}>{collection.standard === \"ERC1155\" ? \"Multi-edition\" : \"Single NFT\"}</span>\n {collection.symbol ? <span className={CHIP}>{collection.symbol}</span> : null}\n </>\n )}\n
|
|
1
|
+
{"version":3,"sources":["../../src/components/collection-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Layers } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { AssetUtilityIcons } from \"./asset-utility-icons.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorChip } from \"./creator-chip.js\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\n\nconst CHIP = \"text-2xs font-semibold px-2.5 py-1 rounded-full bg-muted text-muted-foreground\";\n\nexport interface CollectionHeaderProps {\n collection: ApiCollection | null | undefined;\n loading?: boolean;\n onReportClick: () => void;\n children?: ReactNode;\n}\n\nfunction PriceStat({ label, raw }: { label: string; raw: string | null }) {\n const { numStr, symbol } = parsePriceDisplay(raw);\n if (!symbol || numStr === \"—\") return null;\n return (\n <HeaderStat label={label}>\n <CurrencyAmount amount={numStr} symbol={symbol} iconSize={12} />\n </HeaderStat>\n );\n}\n\nexport function CollectionHeader({ collection, loading = false, onReportClick, children }: CollectionHeaderProps) {\n const image = collection?.image ? ipfsToHttp(collection.image) : null;\n const name = collection?.name ?? \"Unnamed Collection\";\n\n return (\n <MediaHeader image={image} imageAlt={name} fallbackIcon={Layers} loading={loading || !collection}>\n {collection ? (\n <>\n <AssetHeaderBlock\n name={name}\n description={collection.description}\n badges={(\n <>\n <span className={CHIP}>{collection.standard === \"ERC1155\" ? \"Multi-edition\" : \"Single NFT\"}</span>\n {collection.symbol ? <span className={CHIP}>{collection.symbol}</span> : null}\n </>\n )}\n />\n\n <HeaderStats>\n {collection.totalSupply != null ? <HeaderStat label=\"Items\">{collection.totalSupply.toLocaleString()}</HeaderStat> : null}\n {collection.holderCount != null ? <HeaderStat label=\"Holders\">{collection.holderCount.toLocaleString()}</HeaderStat> : null}\n <PriceStat label=\"Floor\" raw={collection.floorPrice} />\n <PriceStat label=\"Volume\" raw={collection.totalVolume} />\n </HeaderStats>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n {collection.owner ? <CreatorChip address={collection.owner} /> : null}\n <AddressDisplay address={collection.contractAddress} chars={6} className=\"text-xs text-muted-foreground\" />\n </div>\n\n <div className=\"-ml-3\">\n <AssetUtilityIcons\n contractExplorerHref={`${EXPLORER_URL}/contract/${collection.contractAddress}`}\n shareTitle={name}\n onReportClick={onReportClick}\n />\n </div>\n\n {children}\n </>\n ) : null}\n </MediaHeader>\n );\n}\n"],"mappings":";AA6BM,SAiBQ,UAjBR,KAiBQ,YAjBR;AA1BN,SAAS,cAAc;AAEvB,SAAS,wBAAwB;AACjC,SAAS,aAAa,aAAa,kBAAkB;AACrD,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAClC,SAAS,oBAAoB;AAE7B,MAAM,OAAO;AASb,SAAS,UAAU,EAAE,OAAO,IAAI,GAA0C;AACxE,QAAM,EAAE,QAAQ,OAAO,IAAI,kBAAkB,GAAG;AAChD,MAAI,CAAC,UAAU,WAAW,SAAK,QAAO;AACtC,SACE,oBAAC,cAAW,OACV,8BAAC,kBAAe,QAAQ,QAAQ,QAAgB,UAAU,IAAI,GAChE;AAEJ;AAEO,SAAS,iBAAiB,EAAE,YAAY,UAAU,OAAO,eAAe,SAAS,GAA0B;AAChH,QAAM,QAAQ,YAAY,QAAQ,WAAW,WAAW,KAAK,IAAI;AACjE,QAAM,OAAO,YAAY,QAAQ;AAEjC,SACE,oBAAC,eAAY,OAAc,UAAU,MAAM,cAAc,QAAQ,SAAS,WAAW,CAAC,YACnF,uBACC,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,aAAa,WAAW;AAAA,QACxB,QACE,iCACE;AAAA,8BAAC,UAAK,WAAW,MAAO,qBAAW,aAAa,YAAY,kBAAkB,cAAa;AAAA,UAC1F,WAAW,SAAS,oBAAC,UAAK,WAAW,MAAO,qBAAW,QAAO,IAAU;AAAA,WAC3E;AAAA;AAAA,IAEJ;AAAA,IAEA,qBAAC,eACE;AAAA,iBAAW,eAAe,OAAO,oBAAC,cAAW,OAAM,SAAS,qBAAW,YAAY,eAAe,GAAE,IAAgB;AAAA,MACpH,WAAW,eAAe,OAAO,oBAAC,cAAW,OAAM,WAAW,qBAAW,YAAY,eAAe,GAAE,IAAgB;AAAA,MACvH,oBAAC,aAAU,OAAM,SAAQ,KAAK,WAAW,YAAY;AAAA,MACrD,oBAAC,aAAU,OAAM,UAAS,KAAK,WAAW,aAAa;AAAA,OACzD;AAAA,IAEA,qBAAC,SAAI,WAAU,qCACZ;AAAA,iBAAW,QAAQ,oBAAC,eAAY,SAAS,WAAW,OAAO,IAAK;AAAA,MACjE,oBAAC,kBAAe,SAAS,WAAW,iBAAiB,OAAO,GAAG,WAAU,iCAAgC;AAAA,OAC3G;AAAA,IAEA,oBAAC,SAAI,WAAU,SACb;AAAA,MAAC;AAAA;AAAA,QACC,sBAAsB,GAAG,YAAY,aAAa,WAAW,eAAe;AAAA,QAC5E,YAAY;AAAA,QACZ;AAAA;AAAA,IACF,GACF;AAAA,IAEC;AAAA,KACH,IACE,MACN;AAEJ;","names":[]}
|
|
@@ -49,8 +49,7 @@ function CreatorHeader({ creator, image, stats, loading = false, children }) {
|
|
|
49
49
|
{
|
|
50
50
|
name: name ?? identity,
|
|
51
51
|
description: creator.bio,
|
|
52
|
-
badges: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_creator_score_inline.CreatorScoreInline, { address: creator.walletAddress, size: "sm" })
|
|
53
|
-
utilities: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_share_button.ShareButton, { title: name ?? identity, variant: "ghost", size: "icon" })
|
|
52
|
+
badges: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_creator_score_inline.CreatorScoreInline, { address: creator.walletAddress, size: "sm" })
|
|
54
53
|
}
|
|
55
54
|
),
|
|
56
55
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap items-center gap-2 text-sm text-muted-foreground", children: [
|
|
@@ -70,6 +69,7 @@ function CreatorHeader({ creator, image, stats, loading = false, children }) {
|
|
|
70
69
|
},
|
|
71
70
|
key
|
|
72
71
|
)) }) : null,
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "-ml-3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_share_button.ShareButton, { title: name ?? identity, variant: "ghost", size: "icon" }) }),
|
|
73
73
|
children
|
|
74
74
|
] }) : null });
|
|
75
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/creator-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Globe, MessageCircle, Send, Twitter, UserRound } from \"lucide-react\";\nimport type { ApiCreatorProfile } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorScoreInline } from \"./creator-score-inline.js\";\nimport { ShareButton } from \"./share-button.js\";\nimport { profileIdentity } from \"../utils/profile-identity.js\";\n\nexport interface CreatorHeaderStat {\n label: string;\n value: number | null;\n}\n\nexport interface CreatorHeaderProps {\n creator: ApiCreatorProfile | null | undefined;\n image: string | null;\n stats: CreatorHeaderStat[];\n loading?: boolean;\n children?: ReactNode;\n}\n\nconst SOCIALS = [\n { key: \"websiteUrl\", label: \"Website\", icon: Globe },\n { key: \"twitterUrl\", label: \"X\", icon: Twitter },\n { key: \"discordUrl\", label: \"Discord\", icon: MessageCircle },\n { key: \"telegramUrl\", label: \"Telegram\", icon: Send },\n] as const;\n\nexport function CreatorHeader({ creator, image, stats, loading = false, children }: CreatorHeaderProps) {\n const { identity, name } = profileIdentity({\n username: creator?.username,\n name: creator?.name,\n walletAddress: creator?.walletAddress,\n });\n const socials = creator ? SOCIALS.filter((s) => creator[s.key]) : [];\n\n return (\n <MediaHeader image={image} imageAlt={name ?? identity} fallbackIcon={UserRound} loading={loading || !creator}>\n {creator ? (\n <>\n <AssetHeaderBlock\n name={name ?? identity}\n description={creator.bio}\n badges={<CreatorScoreInline address={creator.walletAddress} size=\"sm\" />}\n
|
|
1
|
+
{"version":3,"sources":["../../src/components/creator-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Globe, MessageCircle, Send, Twitter, UserRound } from \"lucide-react\";\nimport type { ApiCreatorProfile } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorScoreInline } from \"./creator-score-inline.js\";\nimport { ShareButton } from \"./share-button.js\";\nimport { profileIdentity } from \"../utils/profile-identity.js\";\n\nexport interface CreatorHeaderStat {\n label: string;\n value: number | null;\n}\n\nexport interface CreatorHeaderProps {\n creator: ApiCreatorProfile | null | undefined;\n image: string | null;\n stats: CreatorHeaderStat[];\n loading?: boolean;\n children?: ReactNode;\n}\n\nconst SOCIALS = [\n { key: \"websiteUrl\", label: \"Website\", icon: Globe },\n { key: \"twitterUrl\", label: \"X\", icon: Twitter },\n { key: \"discordUrl\", label: \"Discord\", icon: MessageCircle },\n { key: \"telegramUrl\", label: \"Telegram\", icon: Send },\n] as const;\n\nexport function CreatorHeader({ creator, image, stats, loading = false, children }: CreatorHeaderProps) {\n const { identity, name } = profileIdentity({\n username: creator?.username,\n name: creator?.name,\n walletAddress: creator?.walletAddress,\n });\n const socials = creator ? SOCIALS.filter((s) => creator[s.key]) : [];\n\n return (\n <MediaHeader image={image} imageAlt={name ?? identity} fallbackIcon={UserRound} loading={loading || !creator}>\n {creator ? (\n <>\n <AssetHeaderBlock\n name={name ?? identity}\n description={creator.bio}\n badges={<CreatorScoreInline address={creator.walletAddress} size=\"sm\" />}\n />\n\n <div className=\"flex flex-wrap items-center gap-2 text-sm text-muted-foreground\">\n {name ? <span className=\"tabular-nums\">{identity}</span> : null}\n <AddressDisplay address={creator.walletAddress} chars={6} className=\"text-xs text-muted-foreground\" />\n </div>\n\n <HeaderStats>\n {stats.map((s) => (s.value != null ? <HeaderStat key={s.label} label={s.label}>{s.value.toLocaleString()}</HeaderStat> : null))}\n </HeaderStats>\n\n {socials.length > 0 ? (\n <div className=\"flex items-center gap-3\">\n {socials.map(({ key, label, icon: Icon }) => (\n <a\n key={key}\n href={creator[key]!}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={label}\n className=\"text-muted-foreground hover:text-foreground transition-colors\"\n >\n <Icon className=\"h-4 w-4\" />\n </a>\n ))}\n </div>\n ) : null}\n\n <div className=\"-ml-3\">\n <ShareButton title={name ?? identity} variant=\"ghost\" size=\"icon\" />\n </div>\n\n {children}\n </>\n ) : null}\n </MediaHeader>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2CQ;AAxCR,0BAA+D;AAE/D,gCAAiC;AACjC,0BAAqD;AACrD,6BAA+B;AAC/B,kCAAmC;AACnC,0BAA4B;AAC5B,8BAAgC;AAehC,MAAM,UAAU;AAAA,EACd,EAAE,KAAK,cAAc,OAAO,WAAW,MAAM,0BAAM;AAAA,EACnD,EAAE,KAAK,cAAc,OAAO,KAAK,MAAM,4BAAQ;AAAA,EAC/C,EAAE,KAAK,cAAc,OAAO,WAAW,MAAM,kCAAc;AAAA,EAC3D,EAAE,KAAK,eAAe,OAAO,YAAY,MAAM,yBAAK;AACtD;AAEO,SAAS,cAAc,EAAE,SAAS,OAAO,OAAO,UAAU,OAAO,SAAS,GAAuB;AACtG,QAAM,EAAE,UAAU,KAAK,QAAI,yCAAgB;AAAA,IACzC,UAAU,SAAS;AAAA,IACnB,MA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Header({ creator, image, stats, loading = false, children }) {
|
|
|
26
26
|
{
|
|
27
27
|
name: name ?? identity,
|
|
28
28
|
description: creator.bio,
|
|
29
|
-
badges: /* @__PURE__ */ jsx(CreatorScoreInline, { address: creator.walletAddress, size: "sm" })
|
|
30
|
-
utilities: /* @__PURE__ */ jsx(ShareButton, { title: name ?? identity, variant: "ghost", size: "icon" })
|
|
29
|
+
badges: /* @__PURE__ */ jsx(CreatorScoreInline, { address: creator.walletAddress, size: "sm" })
|
|
31
30
|
}
|
|
32
31
|
),
|
|
33
32
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 text-sm text-muted-foreground", children: [
|
|
@@ -47,6 +46,7 @@ function CreatorHeader({ creator, image, stats, loading = false, children }) {
|
|
|
47
46
|
},
|
|
48
47
|
key
|
|
49
48
|
)) }) : null,
|
|
49
|
+
/* @__PURE__ */ jsx("div", { className: "-ml-3", children: /* @__PURE__ */ jsx(ShareButton, { title: name ?? identity, variant: "ghost", size: "icon" }) }),
|
|
50
50
|
children
|
|
51
51
|
] }) : null });
|
|
52
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/creator-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Globe, MessageCircle, Send, Twitter, UserRound } from \"lucide-react\";\nimport type { ApiCreatorProfile } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorScoreInline } from \"./creator-score-inline.js\";\nimport { ShareButton } from \"./share-button.js\";\nimport { profileIdentity } from \"../utils/profile-identity.js\";\n\nexport interface CreatorHeaderStat {\n label: string;\n value: number | null;\n}\n\nexport interface CreatorHeaderProps {\n creator: ApiCreatorProfile | null | undefined;\n image: string | null;\n stats: CreatorHeaderStat[];\n loading?: boolean;\n children?: ReactNode;\n}\n\nconst SOCIALS = [\n { key: \"websiteUrl\", label: \"Website\", icon: Globe },\n { key: \"twitterUrl\", label: \"X\", icon: Twitter },\n { key: \"discordUrl\", label: \"Discord\", icon: MessageCircle },\n { key: \"telegramUrl\", label: \"Telegram\", icon: Send },\n] as const;\n\nexport function CreatorHeader({ creator, image, stats, loading = false, children }: CreatorHeaderProps) {\n const { identity, name } = profileIdentity({\n username: creator?.username,\n name: creator?.name,\n walletAddress: creator?.walletAddress,\n });\n const socials = creator ? SOCIALS.filter((s) => creator[s.key]) : [];\n\n return (\n <MediaHeader image={image} imageAlt={name ?? identity} fallbackIcon={UserRound} loading={loading || !creator}>\n {creator ? (\n <>\n <AssetHeaderBlock\n name={name ?? identity}\n description={creator.bio}\n badges={<CreatorScoreInline address={creator.walletAddress} size=\"sm\" />}\n
|
|
1
|
+
{"version":3,"sources":["../../src/components/creator-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Globe, MessageCircle, Send, Twitter, UserRound } from \"lucide-react\";\nimport type { ApiCreatorProfile } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorScoreInline } from \"./creator-score-inline.js\";\nimport { ShareButton } from \"./share-button.js\";\nimport { profileIdentity } from \"../utils/profile-identity.js\";\n\nexport interface CreatorHeaderStat {\n label: string;\n value: number | null;\n}\n\nexport interface CreatorHeaderProps {\n creator: ApiCreatorProfile | null | undefined;\n image: string | null;\n stats: CreatorHeaderStat[];\n loading?: boolean;\n children?: ReactNode;\n}\n\nconst SOCIALS = [\n { key: \"websiteUrl\", label: \"Website\", icon: Globe },\n { key: \"twitterUrl\", label: \"X\", icon: Twitter },\n { key: \"discordUrl\", label: \"Discord\", icon: MessageCircle },\n { key: \"telegramUrl\", label: \"Telegram\", icon: Send },\n] as const;\n\nexport function CreatorHeader({ creator, image, stats, loading = false, children }: CreatorHeaderProps) {\n const { identity, name } = profileIdentity({\n username: creator?.username,\n name: creator?.name,\n walletAddress: creator?.walletAddress,\n });\n const socials = creator ? SOCIALS.filter((s) => creator[s.key]) : [];\n\n return (\n <MediaHeader image={image} imageAlt={name ?? identity} fallbackIcon={UserRound} loading={loading || !creator}>\n {creator ? (\n <>\n <AssetHeaderBlock\n name={name ?? identity}\n description={creator.bio}\n badges={<CreatorScoreInline address={creator.walletAddress} size=\"sm\" />}\n />\n\n <div className=\"flex flex-wrap items-center gap-2 text-sm text-muted-foreground\">\n {name ? <span className=\"tabular-nums\">{identity}</span> : null}\n <AddressDisplay address={creator.walletAddress} chars={6} className=\"text-xs text-muted-foreground\" />\n </div>\n\n <HeaderStats>\n {stats.map((s) => (s.value != null ? <HeaderStat key={s.label} label={s.label}>{s.value.toLocaleString()}</HeaderStat> : null))}\n </HeaderStats>\n\n {socials.length > 0 ? (\n <div className=\"flex items-center gap-3\">\n {socials.map(({ key, label, icon: Icon }) => (\n <a\n key={key}\n href={creator[key]!}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={label}\n className=\"text-muted-foreground hover:text-foreground transition-colors\"\n >\n <Icon className=\"h-4 w-4\" />\n </a>\n ))}\n </div>\n ) : null}\n\n <div className=\"-ml-3\">\n <ShareButton title={name ?? identity} variant=\"ghost\" size=\"icon\" />\n </div>\n\n {children}\n </>\n ) : null}\n </MediaHeader>\n );\n}\n"],"mappings":";AA2CQ,mBAIY,KAGV,YAPF;AAxCR,SAAS,OAAO,eAAe,MAAM,SAAS,iBAAiB;AAE/D,SAAS,wBAAwB;AACjC,SAAS,aAAa,aAAa,kBAAkB;AACrD,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AACnC,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAehC,MAAM,UAAU;AAAA,EACd,EAAE,KAAK,cAAc,OAAO,WAAW,MAAM,MAAM;AAAA,EACnD,EAAE,KAAK,cAAc,OAAO,KAAK,M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Z,WAAU;AAAA,QAEV,8BAAC,QAAK,WAAU,WAAU;AAAA;AAAA,MAPrB;AAAA,IAQP,CACD,GACH,IACE;AAAA,IAEJ,oBAAC,SAAI,WAAU,SACb,8BAAC,eAAY,OAAO,QAAQ,UAAU,SAAQ,SAAQ,MAAK,QAAO,GACpE;AAAA,IAEC;AAAA,KACH,IACE,MACN;AAEJ;","names":[]}
|
|
@@ -41,7 +41,7 @@ function PageBackdrop({ image }) {
|
|
|
41
41
|
}
|
|
42
42
|
) });
|
|
43
43
|
}
|
|
44
|
-
const THUMB = "w-
|
|
44
|
+
const THUMB = "w-full sm:w-44 lg:w-56 aspect-square shrink-0 rounded-2xl overflow-hidden bg-muted";
|
|
45
45
|
function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = false, children }) {
|
|
46
46
|
const [imgError, setImgError] = (0, import_react.useState)(false);
|
|
47
47
|
if (loading) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/media-header.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, type ElementType, type ReactNode } from \"react\";\nimport { Skeleton } from \"./skeleton.js\";\n\nexport interface MediaHeaderProps {\n image: string | null;\n imageAlt: string;\n fallbackIcon: ElementType;\n loading?: boolean;\n children: ReactNode;\n}\n\nexport function PageBackdrop({ image }: { image: string | null }) {\n if (!image) return null;\n return (\n <div className=\"fixed inset-0 -z-10 overflow-hidden pointer-events-none\">\n <img\n src={image}\n alt=\"\"\n aria-hidden\n className=\"absolute inset-0 w-full h-full object-cover opacity-20 scale-110\"\n style={{ filter: \"blur(60px) saturate(1.5)\" }}\n />\n </div>\n );\n}\n\nconst THUMB = \"w-
|
|
1
|
+
{"version":3,"sources":["../../src/components/media-header.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, type ElementType, type ReactNode } from \"react\";\nimport { Skeleton } from \"./skeleton.js\";\n\nexport interface MediaHeaderProps {\n image: string | null;\n imageAlt: string;\n fallbackIcon: ElementType;\n loading?: boolean;\n children: ReactNode;\n}\n\nexport function PageBackdrop({ image }: { image: string | null }) {\n if (!image) return null;\n return (\n <div className=\"fixed inset-0 -z-10 overflow-hidden pointer-events-none\">\n <img\n src={image}\n alt=\"\"\n aria-hidden\n className=\"absolute inset-0 w-full h-full object-cover opacity-20 scale-110\"\n style={{ filter: \"blur(60px) saturate(1.5)\" }}\n />\n </div>\n );\n}\n\nconst THUMB = \"w-full sm:w-44 lg:w-56 aspect-square shrink-0 rounded-2xl overflow-hidden bg-muted\";\n\nexport function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = false, children }: MediaHeaderProps) {\n const [imgError, setImgError] = useState(false);\n\n if (loading) {\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <Skeleton className={THUMB} />\n <div className=\"flex-1 w-full space-y-3\">\n <Skeleton className=\"h-6 w-40\" />\n <Skeleton className=\"h-10 w-2/3\" />\n <Skeleton className=\"h-16 w-full\" />\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <PageBackdrop image={image} />\n\n <div className={THUMB}>\n {image && !imgError ? (\n <img src={image} alt={imageAlt} onError={() => setImgError(true)} className=\"h-full w-full object-cover\" />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center\">\n <FallbackIcon className=\"h-1/3 w-1/3 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n\n <div className=\"flex-1 space-y-5 min-w-0 w-full\">{children}</div>\n </div>\n );\n}\n\nexport function HeaderStats({ children }: { children: ReactNode }) {\n return <div className=\"flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground\">{children}</div>;\n}\n\nexport function HeaderStat({ label, children }: { label: string; children: ReactNode }) {\n return (\n <span className=\"inline-flex items-center gap-1.5\">\n <span>{label}</span>\n <span className=\"font-semibold text-foreground tabular-nums\">{children}</span>\n </span>\n );\n}\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AS,WAAW,EAAE,OAAO,SAAS,GAA2C;AACtF,SACE,6CAAC,UAAK,WAAU,oCACd;AAAA,gDAAC,UAAM,iBAAM;AAAA,IACb,4CAAC,UAAK,WAAU,8CAA8C,UAAS;AAAA,KACzE;AAEJ;","names":[]}
|
|
@@ -15,7 +15,7 @@ function PageBackdrop({ image }) {
|
|
|
15
15
|
}
|
|
16
16
|
) });
|
|
17
17
|
}
|
|
18
|
-
const THUMB = "w-
|
|
18
|
+
const THUMB = "w-full sm:w-44 lg:w-56 aspect-square shrink-0 rounded-2xl overflow-hidden bg-muted";
|
|
19
19
|
function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = false, children }) {
|
|
20
20
|
const [imgError, setImgError] = useState(false);
|
|
21
21
|
if (loading) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/media-header.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, type ElementType, type ReactNode } from \"react\";\nimport { Skeleton } from \"./skeleton.js\";\n\nexport interface MediaHeaderProps {\n image: string | null;\n imageAlt: string;\n fallbackIcon: ElementType;\n loading?: boolean;\n children: ReactNode;\n}\n\nexport function PageBackdrop({ image }: { image: string | null }) {\n if (!image) return null;\n return (\n <div className=\"fixed inset-0 -z-10 overflow-hidden pointer-events-none\">\n <img\n src={image}\n alt=\"\"\n aria-hidden\n className=\"absolute inset-0 w-full h-full object-cover opacity-20 scale-110\"\n style={{ filter: \"blur(60px) saturate(1.5)\" }}\n />\n </div>\n );\n}\n\nconst THUMB = \"w-
|
|
1
|
+
{"version":3,"sources":["../../src/components/media-header.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, type ElementType, type ReactNode } from \"react\";\nimport { Skeleton } from \"./skeleton.js\";\n\nexport interface MediaHeaderProps {\n image: string | null;\n imageAlt: string;\n fallbackIcon: ElementType;\n loading?: boolean;\n children: ReactNode;\n}\n\nexport function PageBackdrop({ image }: { image: string | null }) {\n if (!image) return null;\n return (\n <div className=\"fixed inset-0 -z-10 overflow-hidden pointer-events-none\">\n <img\n src={image}\n alt=\"\"\n aria-hidden\n className=\"absolute inset-0 w-full h-full object-cover opacity-20 scale-110\"\n style={{ filter: \"blur(60px) saturate(1.5)\" }}\n />\n </div>\n );\n}\n\nconst THUMB = \"w-full sm:w-44 lg:w-56 aspect-square shrink-0 rounded-2xl overflow-hidden bg-muted\";\n\nexport function MediaHeader({ image, imageAlt, fallbackIcon: FallbackIcon, loading = false, children }: MediaHeaderProps) {\n const [imgError, setImgError] = useState(false);\n\n if (loading) {\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <Skeleton className={THUMB} />\n <div className=\"flex-1 w-full space-y-3\">\n <Skeleton className=\"h-6 w-40\" />\n <Skeleton className=\"h-10 w-2/3\" />\n <Skeleton className=\"h-16 w-full\" />\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col sm:flex-row gap-6 lg:gap-8 items-start lg:max-w-5xl lg:mx-auto\">\n <PageBackdrop image={image} />\n\n <div className={THUMB}>\n {image && !imgError ? (\n <img src={image} alt={imageAlt} onError={() => setImgError(true)} className=\"h-full w-full object-cover\" />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center\">\n <FallbackIcon className=\"h-1/3 w-1/3 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n\n <div className=\"flex-1 space-y-5 min-w-0 w-full\">{children}</div>\n </div>\n );\n}\n\nexport function HeaderStats({ children }: { children: ReactNode }) {\n return <div className=\"flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground\">{children}</div>;\n}\n\nexport function HeaderStat({ label, children }: { label: string; children: ReactNode }) {\n return (\n <span className=\"inline-flex items-center gap-1.5\">\n <span>{label}</span>\n <span className=\"font-semibold text-foreground tabular-nums\">{children}</span>\n </span>\n );\n}\n"],"mappings":";AAiBM,cAoBE,YApBF;AAfN,SAAS,gBAAkD;AAC3D,SAAS,gBAAgB;AAUlB,SA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