@medialane/ui 0.199.0 → 0.200.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/asset-owners-panel.cjs +13 -15
- package/dist/components/asset-owners-panel.cjs.map +1 -1
- package/dist/components/asset-owners-panel.d.cts +2 -4
- package/dist/components/asset-owners-panel.d.ts +2 -4
- package/dist/components/asset-owners-panel.js +13 -15
- package/dist/components/asset-owners-panel.js.map +1 -1
- package/dist/components/asset-top-sections.cjs +70 -103
- package/dist/components/asset-top-sections.cjs.map +1 -1
- package/dist/components/asset-top-sections.d.cts +3 -14
- package/dist/components/asset-top-sections.d.ts +3 -14
- package/dist/components/asset-top-sections.js +69 -101
- package/dist/components/asset-top-sections.js.map +1 -1
- package/dist/components/expandable-text.cjs +53 -0
- package/dist/components/expandable-text.cjs.map +1 -0
- package/dist/components/expandable-text.d.cts +8 -0
- package/dist/components/expandable-text.d.ts +8 -0
- package/dist/components/expandable-text.js +29 -0
- package/dist/components/expandable-text.js.map +1 -0
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -37,20 +37,19 @@ var import_link = __toESM(require("./link.js"), 1);
|
|
|
37
37
|
var import_address_display = require("./address-display.js");
|
|
38
38
|
var import_creator_score_inline = require("./creator-score-inline.js");
|
|
39
39
|
var import_medialane_app = require("./medialane-app.js");
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
showAmount = true
|
|
46
|
-
}) {
|
|
40
|
+
const MAX_VISIBLE = 5;
|
|
41
|
+
function plural(count, word) {
|
|
42
|
+
return `${count.toLocaleString()} ${word}${count === 1 ? "" : "s"}`;
|
|
43
|
+
}
|
|
44
|
+
function AssetOwnersPanel({ balances, total = balances.length, editions }) {
|
|
47
45
|
const { getClient } = (0, import_medialane_app.useMedialaneApp)();
|
|
48
46
|
if (balances.length === 0) return null;
|
|
49
|
-
const
|
|
47
|
+
const owners = plural(total, "owner");
|
|
48
|
+
const label = editions ? `${plural(editions, "edition")} \xB7 ${owners}` : owners;
|
|
50
49
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl border border-border px-4 py-3 space-y-2", children: [
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-2xs font-semibold text-muted-foreground tabular-nums", children: label }),
|
|
52
51
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
53
|
-
balances.slice(0,
|
|
52
|
+
balances.slice(0, MAX_VISIBLE).map((balance) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
54
53
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
55
54
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
55
|
import_link.default,
|
|
@@ -62,15 +61,14 @@ function AssetOwnersPanel({
|
|
|
62
61
|
),
|
|
63
62
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_creator_score_inline.CreatorScoreInline, { getClient, address: balance.owner, size: "sm" })
|
|
64
63
|
] }),
|
|
65
|
-
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-xs text-muted-foreground shrink-0 tabular-nums", children: [
|
|
66
65
|
"\xD7 ",
|
|
67
66
|
balance.amount
|
|
68
|
-
] })
|
|
67
|
+
] })
|
|
69
68
|
] }, balance.owner)),
|
|
70
|
-
total >
|
|
69
|
+
total > MAX_VISIBLE ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs text-muted-foreground/60", children: [
|
|
71
70
|
"+",
|
|
72
|
-
total -
|
|
73
|
-
" more holders"
|
|
71
|
+
plural(total - MAX_VISIBLE, "more owner")
|
|
74
72
|
] }) : null
|
|
75
73
|
] })
|
|
76
74
|
] });
|
|
@@ -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 { useMedialaneApp } from \"./medialane-app.js\";\n\ninterface HolderLike {\n owner: string;\n amount: string;\n}\n\ninterface AssetOwnersPanelProps {\n balances: HolderLike[];\n total?: number;\n
|
|
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 { useMedialaneApp } from \"./medialane-app.js\";\n\ninterface HolderLike {\n owner: string;\n amount: string;\n}\n\ninterface AssetOwnersPanelProps {\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\nexport function AssetOwnersPanel({ balances, total = balances.length, editions }: AssetOwnersPanelProps) {\n const { getClient } = useMedialaneApp();\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\">\n {label}\n </p>\n <div className=\"flex flex-col gap-1.5\">\n {balances.slice(0, MAX_VISIBLE).map((balance) => (\n <div key={balance.owner} className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <Link\n href={`/creator/${balance.owner}`}\n className=\"hover:text-primary transition-colors font-medium text-sm truncate\"\n >\n <AddressDisplay address={balance.owner} chars={6} showCopy={false} />\n </Link>\n <CreatorScoreInline getClient={getClient} address={balance.owner} size=\"sm\" />\n </div>\n <span className=\"text-xs text-muted-foreground shrink-0 tabular-nums\">\n × {balance.amount}\n </span>\n </div>\n ))}\n {total > MAX_VISIBLE ? (\n <p className=\"text-xs text-muted-foreground/60\">\n +{plural(total - MAX_VISIBLE, \"more owner\")}\n </p>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCM;AA/BN,kBAAiB;AACjB,6BAA+B;AAC/B,kCAAmC;AACnC,2BAAgC;AAahC,MAAM,cAAc;AAEpB,SAAS,OAAO,OAAe,MAAc;AAC3C,SAAO,GAAG,MAAM,eAAe,CAAC,IAAI,IAAI,GAAG,UAAU,IAAI,KAAK,GAAG;AACnE;AAEO,SAAS,iBAAiB,EAAE,UAAU,QAAQ,SAAS,QAAQ,SAAS,GAA0B;AACvG,QAAM,EAAE,UAAU,QAAI,sCAAgB;AACtC,MAAI,SAAS,WAAW,EAAG,QAAO;AAElC,QAAM,SAAS,OAAO,OAAO,OAAO;AACpC,QAAM,QAAQ,WAAW,GAAG,OAAO,UAAU,SAAS,CAAC,SAAM,MAAM,KAAK;AAExE,SACE,6CAAC,SAAI,WAAU,uDACb;AAAA,gDAAC,OAAE,WAAU,6DACV,iBACH;AAAA,IACA,6CAAC,SAAI,WAAU,yBACZ;AAAA,eAAS,MAAM,GAAG,WAAW,EAAE,IAAI,CAAC,YACnC,6CAAC,SAAwB,WAAU,2CACjC;AAAA,qDAAC,SAAI,WAAU,qCACb;AAAA;AAAA,YAAC,YAAAA;AAAA,YAAA;AAAA,cACC,MAAM,YAAY,QAAQ,KAAK;AAAA,cAC/B,WAAU;AAAA,cAEV,sDAAC,yCAAe,SAAS,QAAQ,OAAO,OAAO,GAAG,UAAU,OAAO;AAAA;AAAA,UACrE;AAAA,UACA,4CAAC,kDAAmB,WAAsB,SAAS,QAAQ,OAAO,MAAK,MAAK;AAAA,WAC9E;AAAA,QACA,6CAAC,UAAK,WAAU,uDAAsD;AAAA;AAAA,UACjE,QAAQ;AAAA,WACb;AAAA,WAZQ,QAAQ,KAalB,CACD;AAAA,MACA,QAAQ,cACP,6CAAC,OAAE,WAAU,oCAAmC;AAAA;AAAA,QAC5C,OAAO,QAAQ,aAAa,YAAY;AAAA,SAC5C,IACE;AAAA,OACN;AAAA,KACF;AAEJ;","names":["Link"]}
|
|
@@ -7,10 +7,8 @@ interface HolderLike {
|
|
|
7
7
|
interface AssetOwnersPanelProps {
|
|
8
8
|
balances: HolderLike[];
|
|
9
9
|
total?: number;
|
|
10
|
-
|
|
11
|
-
maxVisible?: number;
|
|
12
|
-
showAmount?: boolean;
|
|
10
|
+
editions?: number;
|
|
13
11
|
}
|
|
14
|
-
declare function AssetOwnersPanel({ balances, total,
|
|
12
|
+
declare function AssetOwnersPanel({ balances, total, editions }: AssetOwnersPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
15
13
|
|
|
16
14
|
export { AssetOwnersPanel };
|
|
@@ -7,10 +7,8 @@ interface HolderLike {
|
|
|
7
7
|
interface AssetOwnersPanelProps {
|
|
8
8
|
balances: HolderLike[];
|
|
9
9
|
total?: number;
|
|
10
|
-
|
|
11
|
-
maxVisible?: number;
|
|
12
|
-
showAmount?: boolean;
|
|
10
|
+
editions?: number;
|
|
13
11
|
}
|
|
14
|
-
declare function AssetOwnersPanel({ balances, total,
|
|
12
|
+
declare function AssetOwnersPanel({ balances, total, editions }: AssetOwnersPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
15
13
|
|
|
16
14
|
export { AssetOwnersPanel };
|
|
@@ -4,20 +4,19 @@ import Link from "./link.js";
|
|
|
4
4
|
import { AddressDisplay } from "./address-display.js";
|
|
5
5
|
import { CreatorScoreInline } from "./creator-score-inline.js";
|
|
6
6
|
import { useMedialaneApp } from "./medialane-app.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
showAmount = true
|
|
13
|
-
}) {
|
|
7
|
+
const MAX_VISIBLE = 5;
|
|
8
|
+
function plural(count, word) {
|
|
9
|
+
return `${count.toLocaleString()} ${word}${count === 1 ? "" : "s"}`;
|
|
10
|
+
}
|
|
11
|
+
function AssetOwnersPanel({ balances, total = balances.length, editions }) {
|
|
14
12
|
const { getClient } = useMedialaneApp();
|
|
15
13
|
if (balances.length === 0) return null;
|
|
16
|
-
const
|
|
14
|
+
const owners = plural(total, "owner");
|
|
15
|
+
const label = editions ? `${plural(editions, "edition")} \xB7 ${owners}` : owners;
|
|
17
16
|
return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border px-4 py-3 space-y-2", children: [
|
|
18
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
17
|
+
/* @__PURE__ */ jsx("p", { className: "text-2xs font-semibold text-muted-foreground tabular-nums", children: label }),
|
|
19
18
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
20
|
-
balances.slice(0,
|
|
19
|
+
balances.slice(0, MAX_VISIBLE).map((balance) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
21
20
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
22
21
|
/* @__PURE__ */ jsx(
|
|
23
22
|
Link,
|
|
@@ -29,15 +28,14 @@ function AssetOwnersPanel({
|
|
|
29
28
|
),
|
|
30
29
|
/* @__PURE__ */ jsx(CreatorScoreInline, { getClient, address: balance.owner, size: "sm" })
|
|
31
30
|
] }),
|
|
32
|
-
|
|
31
|
+
/* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground shrink-0 tabular-nums", children: [
|
|
33
32
|
"\xD7 ",
|
|
34
33
|
balance.amount
|
|
35
|
-
] })
|
|
34
|
+
] })
|
|
36
35
|
] }, balance.owner)),
|
|
37
|
-
total >
|
|
36
|
+
total > MAX_VISIBLE ? /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground/60", children: [
|
|
38
37
|
"+",
|
|
39
|
-
total -
|
|
40
|
-
" more holders"
|
|
38
|
+
plural(total - MAX_VISIBLE, "more owner")
|
|
41
39
|
] }) : null
|
|
42
40
|
] })
|
|
43
41
|
] });
|
|
@@ -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 { useMedialaneApp } from \"./medialane-app.js\";\n\ninterface HolderLike {\n owner: string;\n amount: string;\n}\n\ninterface AssetOwnersPanelProps {\n balances: HolderLike[];\n total?: number;\n
|
|
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 { useMedialaneApp } from \"./medialane-app.js\";\n\ninterface HolderLike {\n owner: string;\n amount: string;\n}\n\ninterface AssetOwnersPanelProps {\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\nexport function AssetOwnersPanel({ balances, total = balances.length, editions }: AssetOwnersPanelProps) {\n const { getClient } = useMedialaneApp();\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\">\n {label}\n </p>\n <div className=\"flex flex-col gap-1.5\">\n {balances.slice(0, MAX_VISIBLE).map((balance) => (\n <div key={balance.owner} className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <Link\n href={`/creator/${balance.owner}`}\n className=\"hover:text-primary transition-colors font-medium text-sm truncate\"\n >\n <AddressDisplay address={balance.owner} chars={6} showCopy={false} />\n </Link>\n <CreatorScoreInline getClient={getClient} address={balance.owner} size=\"sm\" />\n </div>\n <span className=\"text-xs text-muted-foreground shrink-0 tabular-nums\">\n × {balance.amount}\n </span>\n </div>\n ))}\n {total > MAX_VISIBLE ? (\n <p className=\"text-xs text-muted-foreground/60\">\n +{plural(total - MAX_VISIBLE, \"more owner\")}\n </p>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";AAiCM,cAMM,YANN;AA/BN,OAAO,UAAU;AACjB,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAahC,MAAM,cAAc;AAEpB,SAAS,OAAO,OAAe,MAAc;AAC3C,SAAO,GAAG,MAAM,eAAe,CAAC,IAAI,IAAI,GAAG,UAAU,IAAI,KAAK,GAAG;AACnE;AAEO,SAAS,iBAAiB,EAAE,UAAU,QAAQ,SAAS,QAAQ,SAAS,GAA0B;AACvG,QAAM,EAAE,UAAU,IAAI,gBAAgB;AACtC,MAAI,SAAS,WAAW,EAAG,QAAO;AAElC,QAAM,SAAS,OAAO,OAAO,OAAO;AACpC,QAAM,QAAQ,WAAW,GAAG,OAAO,UAAU,SAAS,CAAC,SAAM,MAAM,KAAK;AAExE,SACE,qBAAC,SAAI,WAAU,uDACb;AAAA,wBAAC,OAAE,WAAU,6DACV,iBACH;AAAA,IACA,qBAAC,SAAI,WAAU,yBACZ;AAAA,eAAS,MAAM,GAAG,WAAW,EAAE,IAAI,CAAC,YACnC,qBAAC,SAAwB,WAAU,2CACjC;AAAA,6BAAC,SAAI,WAAU,qCACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,MAAM,YAAY,QAAQ,KAAK;AAAA,cAC/B,WAAU;AAAA,cAEV,8BAAC,kBAAe,SAAS,QAAQ,OAAO,OAAO,GAAG,UAAU,OAAO;AAAA;AAAA,UACrE;AAAA,UACA,oBAAC,sBAAmB,WAAsB,SAAS,QAAQ,OAAO,MAAK,MAAK;AAAA,WAC9E;AAAA,QACA,qBAAC,UAAK,WAAU,uDAAsD;AAAA;AAAA,UACjE,QAAQ;AAAA,WACb;AAAA,WAZQ,QAAQ,KAalB,CACD;AAAA,MACA,QAAQ,cACP,qBAAC,OAAE,WAAU,oCAAmC;AAAA;AAAA,QAC5C,OAAO,QAAQ,aAAa,YAAY;AAAA,SAC5C,IACE;AAAA,OACN;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -31,8 +31,7 @@ var asset_top_sections_exports = {};
|
|
|
31
31
|
__export(asset_top_sections_exports, {
|
|
32
32
|
AssetHeaderBlock: () => AssetHeaderBlock,
|
|
33
33
|
AssetMediaColumn: () => AssetMediaColumn,
|
|
34
|
-
AssetOwnerRow: () => AssetOwnerRow
|
|
35
|
-
buildEditionStats: () => buildEditionStats
|
|
34
|
+
AssetOwnerRow: () => AssetOwnerRow
|
|
36
35
|
});
|
|
37
36
|
module.exports = __toCommonJS(asset_top_sections_exports);
|
|
38
37
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -44,7 +43,7 @@ var import_cn = require("../utils/cn.js");
|
|
|
44
43
|
var import_address_display = require("./address-display.js");
|
|
45
44
|
var import_parent_attribution_banner = require("./parent-attribution-banner.js");
|
|
46
45
|
var import_ip_type_badge = require("./ip-type-badge.js");
|
|
47
|
-
var
|
|
46
|
+
var import_expandable_text = require("./expandable-text.js");
|
|
48
47
|
function AssetMediaColumn({
|
|
49
48
|
shouldReduce,
|
|
50
49
|
image,
|
|
@@ -54,8 +53,7 @@ function AssetMediaColumn({
|
|
|
54
53
|
fallback,
|
|
55
54
|
onZoom,
|
|
56
55
|
animationUrl,
|
|
57
|
-
live = false
|
|
58
|
-
stats
|
|
56
|
+
live = false
|
|
59
57
|
}) {
|
|
60
58
|
const [ref, isVisible] = (0, import_use_intersection_active.useIntersectionActive)();
|
|
61
59
|
const [loaded, setLoaded] = (0, import_react.useState)(false);
|
|
@@ -71,96 +69,80 @@ function AssetMediaColumn({
|
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
71
|
);
|
|
74
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
{
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
),
|
|
139
|
-
stats && stats.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `grid gap-3 mt-4 ${stats.length === 2 ? "grid-cols-2" : "grid-cols-1"}`, children: stats.map((stat) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl border border-border bg-muted/20 p-4 text-center", children: [
|
|
140
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-2xl font-black", children: stat.value }),
|
|
141
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-center gap-1 text-xs text-muted-foreground mt-1", children: [
|
|
142
|
-
stat.icon,
|
|
143
|
-
stat.label
|
|
144
|
-
] })
|
|
145
|
-
] }, stat.label)) }) : null
|
|
146
|
-
] });
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, className: "w-full lg:sticky lg:top-16", children: showLive ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full overflow-hidden rounded-3xl aspect-square", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
|
+
"iframe",
|
|
74
|
+
{
|
|
75
|
+
src: animationUrl,
|
|
76
|
+
title: imageAlt,
|
|
77
|
+
sandbox: "allow-scripts",
|
|
78
|
+
loading: "lazy",
|
|
79
|
+
className: "w-full h-full border-0"
|
|
80
|
+
}
|
|
81
|
+
) }) : !image || imgError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full overflow-hidden rounded-3xl", children: fallback }) : onZoom ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
82
|
+
import_framer_motion.motion.button,
|
|
83
|
+
{
|
|
84
|
+
type: "button",
|
|
85
|
+
onClick: onZoom,
|
|
86
|
+
"aria-label": "View full image",
|
|
87
|
+
initial: shouldReduce ? false : { opacity: 0, scale: 0.98 },
|
|
88
|
+
animate: { opacity: 1, scale: 1 },
|
|
89
|
+
transition: { duration: 0.5 },
|
|
90
|
+
className: "group relative block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none",
|
|
91
|
+
children: [
|
|
92
|
+
shimmer,
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
|
+
"img",
|
|
95
|
+
{
|
|
96
|
+
src: image,
|
|
97
|
+
alt: imageAlt,
|
|
98
|
+
crossOrigin: "anonymous",
|
|
99
|
+
onLoad: () => setLoaded(true),
|
|
100
|
+
onError: onImageError,
|
|
101
|
+
className: (0, import_cn.cn)(
|
|
102
|
+
"w-full h-auto max-h-[80vh] object-contain",
|
|
103
|
+
"transition-opacity duration-300 group-hover:opacity-95 group-active:scale-[0.99]",
|
|
104
|
+
loaded ? "opacity-100" : "opacity-0"
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
111
|
+
import_framer_motion.motion.div,
|
|
112
|
+
{
|
|
113
|
+
initial: shouldReduce ? false : { opacity: 0, scale: 0.98 },
|
|
114
|
+
animate: { opacity: 1, scale: 1 },
|
|
115
|
+
transition: { duration: 0.5 },
|
|
116
|
+
className: "relative block w-full overflow-hidden rounded-3xl",
|
|
117
|
+
children: [
|
|
118
|
+
shimmer,
|
|
119
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
120
|
+
"img",
|
|
121
|
+
{
|
|
122
|
+
src: image,
|
|
123
|
+
alt: imageAlt,
|
|
124
|
+
crossOrigin: "anonymous",
|
|
125
|
+
onLoad: () => setLoaded(true),
|
|
126
|
+
onError: onImageError,
|
|
127
|
+
className: (0, import_cn.cn)(
|
|
128
|
+
"w-full h-auto max-h-[80vh] object-contain transition-opacity duration-300",
|
|
129
|
+
loaded ? "opacity-100" : "opacity-0"
|
|
130
|
+
)
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
) });
|
|
147
136
|
}
|
|
148
137
|
function AssetHeaderBlock({
|
|
149
138
|
name,
|
|
150
139
|
description,
|
|
151
140
|
ipType,
|
|
152
|
-
showMultiEditionBadge = false,
|
|
153
141
|
parentContract,
|
|
154
142
|
parentTokenId
|
|
155
143
|
}) {
|
|
156
144
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
157
|
-
ipType
|
|
158
|
-
ipType ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ip_type_badge.IpTypeBadge, { ipType, size: "md" }) : null,
|
|
159
|
-
showMultiEditionBadge ? /* @__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-violet-500/30 bg-violet-500/10 text-violet-500", children: [
|
|
160
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Layers, { className: "h-3 w-3" }),
|
|
161
|
-
"Multi-edition"
|
|
162
|
-
] }) : null
|
|
163
|
-
] }) : null,
|
|
145
|
+
ipType ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center gap-2 flex-wrap mb-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ip_type_badge.IpTypeBadge, { ipType, size: "md" }) }) : null,
|
|
164
146
|
parentContract && parentTokenId ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
165
147
|
import_parent_attribution_banner.ParentAttributionBanner,
|
|
166
148
|
{
|
|
@@ -170,7 +152,7 @@ function AssetHeaderBlock({
|
|
|
170
152
|
}
|
|
171
153
|
) }) : null,
|
|
172
154
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-2xl lg:text-4xl font-bold break-words", children: name }),
|
|
173
|
-
description ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
155
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_expandable_text.ExpandableText, { text: description, className: "mt-1" }) : null
|
|
174
156
|
] });
|
|
175
157
|
}
|
|
176
158
|
function AssetOwnerRow({ ownerAddress, ownerHref }) {
|
|
@@ -179,25 +161,10 @@ function AssetOwnerRow({ ownerAddress, ownerHref }) {
|
|
|
179
161
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: ownerHref, className: "hover:text-primary transition-colors font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_address_display.AddressDisplay, { address: ownerAddress }) })
|
|
180
162
|
] });
|
|
181
163
|
}
|
|
182
|
-
function buildEditionStats(totalEditions, uniqueOwners) {
|
|
183
|
-
return [
|
|
184
|
-
{
|
|
185
|
-
value: totalEditions.toLocaleString(),
|
|
186
|
-
label: "editions minted",
|
|
187
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Layers, { className: "h-3 w-3" })
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
value: uniqueOwners.toLocaleString(),
|
|
191
|
-
label: "unique owners",
|
|
192
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Users, { className: "h-3 w-3" })
|
|
193
|
-
}
|
|
194
|
-
];
|
|
195
|
-
}
|
|
196
164
|
// Annotate the CommonJS export names for ESM import in node:
|
|
197
165
|
0 && (module.exports = {
|
|
198
166
|
AssetHeaderBlock,
|
|
199
167
|
AssetMediaColumn,
|
|
200
|
-
AssetOwnerRow
|
|
201
|
-
buildEditionStats
|
|
168
|
+
AssetOwnerRow
|
|
202
169
|
});
|
|
203
170
|
//# sourceMappingURL=asset-top-sections.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/asset-top-sections.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { useEffect, useState } from \"react\";\nimport { motion } from \"framer-motion\";\nimport { useIntersectionActive } from \"../utils/use-intersection-active.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { ParentAttributionBanner } from \"./parent-attribution-banner.js\";\nimport { IpTypeBadge } from \"./ip-type-badge.js\";\nimport { Layers, Users } from \"lucide-react\";\n\ninterface AssetMediaColumnProps {\n shouldReduce: boolean;\n image: string | null;\n imageAlt: string;\n imgError: boolean;\n onImageError: () => void;\n fallback: React.ReactNode;\n\n onZoom?: () => void;\n\n animationUrl?: string | null;\n\n live?: boolean;\n stats?: Array<{\n value: string;\n label: string;\n icon: React.ReactNode;\n }>;\n}\n\nexport function AssetMediaColumn({\n shouldReduce,\n image,\n imageAlt,\n imgError,\n onImageError,\n fallback,\n onZoom,\n animationUrl,\n live = false,\n stats,\n}: AssetMediaColumnProps) {\n const [ref, isVisible] = useIntersectionActive<HTMLDivElement>();\n const [loaded, setLoaded] = useState(false);\n useEffect(() => setLoaded(false), [image]);\n const showLive = live && !!animationUrl && isVisible;\n\n const shimmer = !loaded && (\n <div\n className=\"absolute inset-0 min-h-80 animate-[shimmer_1.6s_ease-in-out_infinite] bg-foreground/[0.06]\"\n style={{\n backgroundImage:\n \"linear-gradient(90deg, transparent, color-mix(in srgb, var(--foreground) 8%, transparent), transparent)\",\n backgroundSize: \"200% 100%\",\n }}\n />\n );\n\n return (\n <div ref={ref} className=\"w-full lg:sticky lg:top-16\">\n {showLive ? (\n <div className=\"w-full overflow-hidden rounded-3xl aspect-square\">\n <iframe\n src={animationUrl!}\n title={imageAlt}\n sandbox=\"allow-scripts\"\n loading=\"lazy\"\n className=\"w-full h-full border-0\"\n />\n </div>\n ) : !image || imgError ? (\n <div className=\"w-full overflow-hidden rounded-3xl\">{fallback}</div>\n ) : onZoom ? (\n <motion.button\n type=\"button\"\n onClick={onZoom}\n aria-label=\"View full image\"\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"group relative block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none\"\n >\n {shimmer}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onLoad={() => setLoaded(true)}\n onError={onImageError}\n className={cn(\n \"w-full h-auto max-h-[80vh] object-contain\",\n \"transition-opacity duration-300 group-hover:opacity-95 group-active:scale-[0.99]\",\n loaded ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n </motion.button>\n ) : (\n <motion.div\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"relative block w-full overflow-hidden rounded-3xl\"\n >\n {shimmer}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onLoad={() => setLoaded(true)}\n onError={onImageError}\n className={cn(\n \"w-full h-auto max-h-[80vh] object-contain transition-opacity duration-300\",\n loaded ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n </motion.div>\n )}\n\n {stats && stats.length > 0 ? (\n <div className={`grid gap-3 mt-4 ${stats.length === 2 ? \"grid-cols-2\" : \"grid-cols-1\"}`}>\n {stats.map((stat) => (\n <div key={stat.label} className=\"rounded-xl border border-border bg-muted/20 p-4 text-center\">\n <p className=\"text-2xl font-black\">{stat.value}</p>\n <div className=\"flex items-center justify-center gap-1 text-xs text-muted-foreground mt-1\">\n {stat.icon}\n {stat.label}\n </div>\n </div>\n ))}\n </div>\n ) : null}\n </div>\n );\n}\n\ninterface AssetHeaderBlockProps {\n name: string;\n description?: string | null;\n ipType?: string | null;\n showMultiEditionBadge?: boolean;\n parentContract?: string | null;\n parentTokenId?: string | null;\n}\n\nexport function AssetHeaderBlock({\n name,\n description,\n ipType,\n showMultiEditionBadge = false,\n parentContract,\n parentTokenId,\n}: AssetHeaderBlockProps) {\n return (\n <div className=\"min-w-0 flex-1\">\n {ipType || showMultiEditionBadge ? (\n <div className=\"flex items-center gap-2 flex-wrap mb-2\">\n {ipType ? <IpTypeBadge ipType={ipType} size=\"md\" /> : null}\n {showMultiEditionBadge ? (\n <span className=\"inline-flex items-center gap-1 text-2xs font-semibold px-2.5 py-1 rounded-full border border-violet-500/30 bg-violet-500/10 text-violet-500\">\n <Layers className=\"h-3 w-3\" />\n Multi-edition\n </span>\n ) : null}\n </div>\n ) : null}\n {parentContract && parentTokenId ? (\n <div className=\"mb-3\">\n <ParentAttributionBanner\n parentContract={parentContract}\n parentTokenId={parentTokenId}\n parentName={`Token #${parentTokenId}`}\n />\n </div>\n ) : null}\n <h1 className=\"text-2xl lg:text-4xl font-bold break-words\">{name}</h1>\n {description ? (\n <p className=\"text-sm text-muted-foreground leading-relaxed mt-1\">{description}</p>\n ) : null}\n </div>\n );\n}\n\nexport interface AssetOwnerRowProps {\n ownerAddress: string;\n ownerHref: string;\n}\n\nexport function AssetOwnerRow({ ownerAddress, ownerHref }: AssetOwnerRowProps) {\n return (\n <div className=\"flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span>Owner</span>\n <Link href={ownerHref} className=\"hover:text-primary transition-colors font-medium\">\n <AddressDisplay address={ownerAddress} />\n </Link>\n </div>\n );\n}\n\nexport function buildEditionStats(totalEditions: number, uniqueOwners: number) {\n return [\n {\n value: totalEditions.toLocaleString(),\n label: \"editions minted\",\n icon: <Layers className=\"h-3 w-3\" />,\n },\n {\n value: uniqueOwners.toLocaleString(),\n label: \"unique owners\",\n icon: <Users className=\"h-3 w-3\" />,\n },\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkDI;AAhDJ,kBAAiB;AACjB,mBAAoC;AACpC,2BAAuB;AACvB,qCAAsC;AACtC,gBAAmB;AACnB,6BAA+B;AAC/B,uCAAwC;AACxC,2BAA4B;AAC5B,0BAA8B;AAsBvB,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AACF,GAA0B;AACxB,QAAM,CAAC,KAAK,SAAS,QAAI,sDAAsC;AAC/D,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,KAAK;AAC1C,8BAAU,MAAM,UAAU,KAAK,GAAG,CAAC,KAAK,CAAC;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uB;AAC7E,SACE,6CAAC,SAAI,WAAU,2DACb;AAAA,gDAAC,UAAK,mBAAK;AAAA,IACX,4CAAC,YAAAA,SAAA,EAAK,MAAM,WAAW,WAAU,oDAC/B,sDAAC,yCAAe,SAAS,cAAc,GACzC;AAAA,KACF;AAEJ;AAEO,SAAS,kBAAkB,eAAuB,cAAsB;AAC7E,SAAO;AAAA,IACL;AAAA,MACE,OAAO,cAAc,eAAe;AAAA,MACpC,OAAO;AAAA,MACP,MAAM,4CAAC,8BAAO,WAAU,WAAU;AAAA,IACpC;AAAA,IACA;AAAA,MACE,OAAO,aAAa,eAAe;AAAA,MACnC,OAAO;AAAA,MACP,MAAM,4CAAC,6BAAM,WAAU,WAAU;AAAA,IACnC;AAAA,EACF;AACF;","names":["Link"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-top-sections.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { useEffect, useState } from \"react\";\nimport { motion } from \"framer-motion\";\nimport { useIntersectionActive } from \"../utils/use-intersection-active.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { ParentAttributionBanner } from \"./parent-attribution-banner.js\";\nimport { IpTypeBadge } from \"./ip-type-badge.js\";\nimport { ExpandableText } from \"./expandable-text.js\";\n\ninterface AssetMediaColumnProps {\n shouldReduce: boolean;\n image: string | null;\n imageAlt: string;\n imgError: boolean;\n onImageError: () => void;\n fallback: React.ReactNode;\n\n onZoom?: () => void;\n\n animationUrl?: string | null;\n\n live?: boolean;\n}\n\nexport function AssetMediaColumn({\n shouldReduce,\n image,\n imageAlt,\n imgError,\n onImageError,\n fallback,\n onZoom,\n animationUrl,\n live = false,\n}: AssetMediaColumnProps) {\n const [ref, isVisible] = useIntersectionActive<HTMLDivElement>();\n const [loaded, setLoaded] = useState(false);\n useEffect(() => setLoaded(false), [image]);\n const showLive = live && !!animationUrl && isVisible;\n\n const shimmer = !loaded && (\n <div\n className=\"absolute inset-0 min-h-80 animate-[shimmer_1.6s_ease-in-out_infinite] bg-foreground/[0.06]\"\n style={{\n backgroundImage:\n \"linear-gradient(90deg, transparent, color-mix(in srgb, var(--foreground) 8%, transparent), transparent)\",\n backgroundSize: \"200% 100%\",\n }}\n />\n );\n\n return (\n <div ref={ref} className=\"w-full lg:sticky lg:top-16\">\n {showLive ? (\n <div className=\"w-full overflow-hidden rounded-3xl aspect-square\">\n <iframe\n src={animationUrl!}\n title={imageAlt}\n sandbox=\"allow-scripts\"\n loading=\"lazy\"\n className=\"w-full h-full border-0\"\n />\n </div>\n ) : !image || imgError ? (\n <div className=\"w-full overflow-hidden rounded-3xl\">{fallback}</div>\n ) : onZoom ? (\n <motion.button\n type=\"button\"\n onClick={onZoom}\n aria-label=\"View full image\"\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"group relative block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none\"\n >\n {shimmer}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onLoad={() => setLoaded(true)}\n onError={onImageError}\n className={cn(\n \"w-full h-auto max-h-[80vh] object-contain\",\n \"transition-opacity duration-300 group-hover:opacity-95 group-active:scale-[0.99]\",\n loaded ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n </motion.button>\n ) : (\n <motion.div\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"relative block w-full overflow-hidden rounded-3xl\"\n >\n {shimmer}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onLoad={() => setLoaded(true)}\n onError={onImageError}\n className={cn(\n \"w-full h-auto max-h-[80vh] object-contain transition-opacity duration-300\",\n loaded ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n </motion.div>\n )}\n\n </div>\n );\n}\n\ninterface AssetHeaderBlockProps {\n name: string;\n description?: string | null;\n ipType?: string | null;\n parentContract?: string | null;\n parentTokenId?: string | null;\n}\n\nexport function AssetHeaderBlock({\n name,\n description,\n ipType,\n parentContract,\n parentTokenId,\n}: AssetHeaderBlockProps) {\n return (\n <div className=\"min-w-0 flex-1\">\n {ipType ? (\n <div className=\"flex items-center gap-2 flex-wrap mb-2\">\n <IpTypeBadge ipType={ipType} size=\"md\" />\n </div>\n ) : null}\n {parentContract && parentTokenId ? (\n <div className=\"mb-3\">\n <ParentAttributionBanner\n parentContract={parentContract}\n parentTokenId={parentTokenId}\n parentName={`Token #${parentTokenId}`}\n />\n </div>\n ) : null}\n <h1 className=\"text-2xl lg:text-4xl font-bold break-words\">{name}</h1>\n {description ? <ExpandableText text={description} className=\"mt-1\" /> : null}\n </div>\n );\n}\n\nexport interface AssetOwnerRowProps {\n ownerAddress: string;\n ownerHref: string;\n}\n\nexport function AssetOwnerRow({ ownerAddress, ownerHref }: AssetOwnerRowProps) {\n return (\n <div className=\"flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span>Owner</span>\n <Link href={ownerHref} className=\"hover:text-primary transition-colors font-medium\">\n <AddressDisplay address={ownerAddress} />\n </Link>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CI;AA1CJ,kBAAiB;AACjB,mBAAoC;AACpC,2BAAuB;AACvB,qCAAsC;AACtC,gBAAmB;AACnB,6BAA+B;AAC/B,uCAAwC;AACxC,2BAA4B;AAC5B,6BAA+B;AAiBxB,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AACT,GAA0B;AACxB,QAAM,CAAC,KAAK,SAAS,QAAI,sDAAsC;AAC/D,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,KAAK;AAC1C,8BAAU,MAAM,U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A;AAAA,QACD;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,KAAK;AAAA,YACL,aAAY;AAAA,YACZ,QAAQ,MAAM,UAAU,IAAI;AAAA,YAC5B,SAAS;AAAA,YACT,eAAW;AAAA,cACT;AAAA,cACA,SAAS,gBAAgB;AAAA,YAC3B;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF,GAGJ;AAEJ;AAUO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0B;AACxB,SACE,6CAAC,SAAI,WAAU,kBACZ;AAAA,aACC,4CAAC,SAAI,WAAU,0CACb,sDAAC,oCAAY,QAAgB,MAAK,MAAK,GACzC,IACE;AAAA,IACH,kBAAkB,gBACjB,4CAAC,SAAI,WAAU,QACb;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,YAAY,UAAU,aAAa;AAAA;AAAA,IACrC,GACF,IACE;AAAA,IACJ,4CAAC,QAAG,WAAU,8CAA8C,gBAAK;AAAA,IAChE,cAAc,4CAAC,yCAAe,MAAM,aAAa,WAAU,QAAO,IAAK;AAAA,KAC1E;AAEJ;AAOO,SAAS,cAAc,EAAE,cAAc,UAAU,GAAuB;AAC7E,SACE,6CAAC,SAAI,WAAU,2DACb;AAAA,gDAAC,UAAK,mBAAK;AAAA,IACX,4CAAC,YAAAA,SAAA,EAAK,MAAM,WAAW,WAAU,oDAC/B,sDAAC,yCAAe,SAAS,cAAc,GACzC;AAAA,KACF;AAEJ;","names":["Link"]}
|
|
@@ -10,31 +10,20 @@ interface AssetMediaColumnProps {
|
|
|
10
10
|
onZoom?: () => void;
|
|
11
11
|
animationUrl?: string | null;
|
|
12
12
|
live?: boolean;
|
|
13
|
-
stats?: Array<{
|
|
14
|
-
value: string;
|
|
15
|
-
label: string;
|
|
16
|
-
icon: React.ReactNode;
|
|
17
|
-
}>;
|
|
18
13
|
}
|
|
19
|
-
declare function AssetMediaColumn({ shouldReduce, image, imageAlt, imgError, onImageError, fallback, onZoom, animationUrl, live,
|
|
14
|
+
declare function AssetMediaColumn({ shouldReduce, image, imageAlt, imgError, onImageError, fallback, onZoom, animationUrl, live, }: AssetMediaColumnProps): react_jsx_runtime.JSX.Element;
|
|
20
15
|
interface AssetHeaderBlockProps {
|
|
21
16
|
name: string;
|
|
22
17
|
description?: string | null;
|
|
23
18
|
ipType?: string | null;
|
|
24
|
-
showMultiEditionBadge?: boolean;
|
|
25
19
|
parentContract?: string | null;
|
|
26
20
|
parentTokenId?: string | null;
|
|
27
21
|
}
|
|
28
|
-
declare function AssetHeaderBlock({ name, description, ipType,
|
|
22
|
+
declare function AssetHeaderBlock({ name, description, ipType, parentContract, parentTokenId, }: AssetHeaderBlockProps): react_jsx_runtime.JSX.Element;
|
|
29
23
|
interface AssetOwnerRowProps {
|
|
30
24
|
ownerAddress: string;
|
|
31
25
|
ownerHref: string;
|
|
32
26
|
}
|
|
33
27
|
declare function AssetOwnerRow({ ownerAddress, ownerHref }: AssetOwnerRowProps): react_jsx_runtime.JSX.Element;
|
|
34
|
-
declare function buildEditionStats(totalEditions: number, uniqueOwners: number): {
|
|
35
|
-
value: string;
|
|
36
|
-
label: string;
|
|
37
|
-
icon: react_jsx_runtime.JSX.Element;
|
|
38
|
-
}[];
|
|
39
28
|
|
|
40
|
-
export { AssetHeaderBlock, AssetMediaColumn, AssetOwnerRow, type AssetOwnerRowProps
|
|
29
|
+
export { AssetHeaderBlock, AssetMediaColumn, AssetOwnerRow, type AssetOwnerRowProps };
|
|
@@ -10,31 +10,20 @@ interface AssetMediaColumnProps {
|
|
|
10
10
|
onZoom?: () => void;
|
|
11
11
|
animationUrl?: string | null;
|
|
12
12
|
live?: boolean;
|
|
13
|
-
stats?: Array<{
|
|
14
|
-
value: string;
|
|
15
|
-
label: string;
|
|
16
|
-
icon: React.ReactNode;
|
|
17
|
-
}>;
|
|
18
13
|
}
|
|
19
|
-
declare function AssetMediaColumn({ shouldReduce, image, imageAlt, imgError, onImageError, fallback, onZoom, animationUrl, live,
|
|
14
|
+
declare function AssetMediaColumn({ shouldReduce, image, imageAlt, imgError, onImageError, fallback, onZoom, animationUrl, live, }: AssetMediaColumnProps): react_jsx_runtime.JSX.Element;
|
|
20
15
|
interface AssetHeaderBlockProps {
|
|
21
16
|
name: string;
|
|
22
17
|
description?: string | null;
|
|
23
18
|
ipType?: string | null;
|
|
24
|
-
showMultiEditionBadge?: boolean;
|
|
25
19
|
parentContract?: string | null;
|
|
26
20
|
parentTokenId?: string | null;
|
|
27
21
|
}
|
|
28
|
-
declare function AssetHeaderBlock({ name, description, ipType,
|
|
22
|
+
declare function AssetHeaderBlock({ name, description, ipType, parentContract, parentTokenId, }: AssetHeaderBlockProps): react_jsx_runtime.JSX.Element;
|
|
29
23
|
interface AssetOwnerRowProps {
|
|
30
24
|
ownerAddress: string;
|
|
31
25
|
ownerHref: string;
|
|
32
26
|
}
|
|
33
27
|
declare function AssetOwnerRow({ ownerAddress, ownerHref }: AssetOwnerRowProps): react_jsx_runtime.JSX.Element;
|
|
34
|
-
declare function buildEditionStats(totalEditions: number, uniqueOwners: number): {
|
|
35
|
-
value: string;
|
|
36
|
-
label: string;
|
|
37
|
-
icon: react_jsx_runtime.JSX.Element;
|
|
38
|
-
}[];
|
|
39
28
|
|
|
40
|
-
export { AssetHeaderBlock, AssetMediaColumn, AssetOwnerRow, type AssetOwnerRowProps
|
|
29
|
+
export { AssetHeaderBlock, AssetMediaColumn, AssetOwnerRow, type AssetOwnerRowProps };
|