@medialane/ui 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/asset-markets-tab.cjs +111 -0
- package/dist/components/asset-markets-tab.cjs.map +1 -0
- package/dist/components/asset-markets-tab.d.cts +16 -0
- package/dist/components/asset-markets-tab.d.ts +16 -0
- package/dist/components/asset-markets-tab.js +87 -0
- package/dist/components/asset-markets-tab.js.map +1 -0
- package/dist/components/asset-overview-content.cjs +102 -0
- package/dist/components/asset-overview-content.cjs.map +1 -0
- package/dist/components/asset-overview-content.d.cts +14 -0
- package/dist/components/asset-overview-content.d.ts +14 -0
- package/dist/components/asset-overview-content.js +78 -0
- package/dist/components/asset-overview-content.js.map +1 -0
- package/dist/components/ip-type-display.cjs +201 -0
- package/dist/components/ip-type-display.cjs.map +1 -0
- package/dist/components/ip-type-display.d.cts +12 -0
- package/dist/components/ip-type-display.d.ts +12 -0
- package/dist/components/ip-type-display.js +181 -0
- package/dist/components/ip-type-display.js.map +1 -0
- package/dist/components/launchpad-strip.cjs +150 -0
- package/dist/components/launchpad-strip.cjs.map +1 -0
- package/dist/components/launchpad-strip.d.cts +16 -0
- package/dist/components/launchpad-strip.d.ts +16 -0
- package/dist/components/launchpad-strip.js +116 -0
- package/dist/components/launchpad-strip.js.map +1 -0
- package/dist/data/ip-templates.cjs +206 -0
- package/dist/data/ip-templates.cjs.map +1 -0
- package/dist/data/ip-templates.d.cts +45 -0
- package/dist/data/ip-templates.d.ts +45 -0
- package/dist/data/ip-templates.js +200 -0
- package/dist/data/ip-templates.js.map +1 -0
- package/dist/data/ip.cjs +163 -0
- package/dist/data/ip.cjs.map +1 -0
- package/dist/data/ip.d.cts +18 -0
- package/dist/data/ip.d.ts +18 -0
- package/dist/data/ip.js +134 -0
- package/dist/data/ip.js.map +1 -0
- package/dist/index.cjs +36 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +34 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/time.cjs +15 -2
- package/dist/utils/time.cjs.map +1 -1
- package/dist/utils/time.d.cts +3 -1
- package/dist/utils/time.d.ts +3 -1
- package/dist/utils/time.js +13 -1
- package/dist/utils/time.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,111 @@
|
|
|
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_markets_tab_exports = {};
|
|
21
|
+
__export(asset_markets_tab_exports, {
|
|
22
|
+
AssetMarketsTab: () => AssetMarketsTab
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(asset_markets_tab_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_address_display = require("./address-display.js");
|
|
27
|
+
var import_currency_icon = require("./currency-icon.js");
|
|
28
|
+
var import_format = require("../utils/format.js");
|
|
29
|
+
var import_time = require("../utils/time.js");
|
|
30
|
+
var import_cn = require("../utils/cn.js");
|
|
31
|
+
var import_lucide_react = require("lucide-react");
|
|
32
|
+
function ActionButton({
|
|
33
|
+
variant = "default",
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
38
|
+
"button",
|
|
39
|
+
{
|
|
40
|
+
className: (0, import_cn.cn)(
|
|
41
|
+
"inline-flex items-center justify-center h-9 rounded-md px-3 text-xs font-medium transition-colors",
|
|
42
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
43
|
+
variant === "destructive" ? "bg-destructive text-destructive-foreground hover:bg-destructive/90" : "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
44
|
+
className
|
|
45
|
+
),
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function AssetMarketsTab({
|
|
51
|
+
activeListings,
|
|
52
|
+
activeBids,
|
|
53
|
+
walletAddress,
|
|
54
|
+
isOwner,
|
|
55
|
+
isProcessing,
|
|
56
|
+
onBuyClick,
|
|
57
|
+
onCancelClick,
|
|
58
|
+
onAcceptClick
|
|
59
|
+
}) {
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mt-4 space-y-6", children: [
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2", children: "Listings" }),
|
|
63
|
+
activeListings.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground py-4 text-center", children: "No active listings." }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "rounded-xl border border-border divide-y divide-border", children: activeListings.map((order) => {
|
|
64
|
+
const isMyOrder = walletAddress && order.offerer.toLowerCase() === walletAddress.toLowerCase();
|
|
65
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between px-4 py-3 gap-4", children: [
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "font-bold text-sm inline-flex items-center gap-1.5", children: [
|
|
68
|
+
(0, import_format.formatDisplayPrice)(order.price.formatted),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: order.price.currency ?? "", size: 14 })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1 text-xs text-muted-foreground mt-0.5", children: [
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Clock, { className: "h-3 w-3" }),
|
|
73
|
+
(0, import_time.timeUntil)(order.endTime)
|
|
74
|
+
] })
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_address_display.AddressDisplay, { address: order.offerer, chars: 4, showCopy: false, className: "text-xs text-muted-foreground" }),
|
|
78
|
+
isMyOrder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { variant: "destructive", disabled: isProcessing, onClick: () => onCancelClick(order), children: "Cancel" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { onClick: () => onBuyClick(order), children: "Buy" })
|
|
79
|
+
] })
|
|
80
|
+
] }, order.orderHash);
|
|
81
|
+
}) })
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2", children: "Offers" }),
|
|
85
|
+
activeBids.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground py-4 text-center", children: "No active offers." }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "rounded-xl border border-border divide-y divide-border", children: activeBids.map((bid) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between px-4 py-3 gap-4", children: [
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-bold text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
88
|
+
(0, import_format.formatDisplayPrice)(bid.price.formatted),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: bid.price.currency ?? "", size: 14 })
|
|
90
|
+
] }) }),
|
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1 text-xs text-muted-foreground mt-0.5", children: [
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Clock, { className: "h-3 w-3" }),
|
|
93
|
+
(0, import_time.timeUntil)(bid.endTime)
|
|
94
|
+
] })
|
|
95
|
+
] }),
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
97
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_address_display.AddressDisplay, { address: bid.offerer, chars: 4, showCopy: false, className: "text-xs text-muted-foreground" }),
|
|
98
|
+
isOwner && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ActionButton, { disabled: isProcessing, onClick: () => onAcceptClick(bid), children: [
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
100
|
+
"Accept"
|
|
101
|
+
] })
|
|
102
|
+
] })
|
|
103
|
+
] }, bid.orderHash)) })
|
|
104
|
+
] })
|
|
105
|
+
] });
|
|
106
|
+
}
|
|
107
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
108
|
+
0 && (module.exports = {
|
|
109
|
+
AssetMarketsTab
|
|
110
|
+
});
|
|
111
|
+
//# sourceMappingURL=asset-markets-tab.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-markets-tab.tsx"],"sourcesContent":["\"use client\";\n\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport { timeUntil } from \"../utils/time.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { Clock, CheckCircle } from \"lucide-react\";\nimport type { ApiOrder } from \"@medialane/sdk\";\n\n/** shadcn-equivalent small button (ui package carries no Radix/shadcn primitives) */\nfunction ActionButton({\n variant = \"default\",\n className,\n ...props\n}: React.ButtonHTMLAttributes<HTMLButtonElement> & { variant?: \"default\" | \"destructive\" }) {\n return (\n <button\n className={cn(\n \"inline-flex items-center justify-center h-9 rounded-md px-3 text-xs font-medium transition-colors\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n variant === \"destructive\"\n ? \"bg-destructive text-destructive-foreground hover:bg-destructive/90\"\n : \"bg-primary text-primary-foreground hover:bg-primary/90\",\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface AssetMarketsTabProps {\n activeListings: ApiOrder[];\n activeBids: ApiOrder[];\n walletAddress?: string;\n isOwner: boolean;\n isProcessing: boolean;\n onBuyClick: (order: ApiOrder) => void;\n onCancelClick: (order: ApiOrder) => void;\n onAcceptClick: (order: ApiOrder) => void;\n}\n\nexport function AssetMarketsTab({\n activeListings,\n activeBids,\n walletAddress,\n isOwner,\n isProcessing,\n onBuyClick,\n onCancelClick,\n onAcceptClick,\n}: AssetMarketsTabProps) {\n return (\n <div className=\"mt-4 space-y-6\">\n <div>\n <p className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2\">Listings</p>\n {activeListings.length === 0 ? (\n <p className=\"text-sm text-muted-foreground py-4 text-center\">No active listings.</p>\n ) : (\n <div className=\"rounded-xl border border-border divide-y divide-border\">\n {activeListings.map((order) => {\n const isMyOrder = walletAddress && order.offerer.toLowerCase() === walletAddress.toLowerCase();\n return (\n <div key={order.orderHash} className=\"flex items-center justify-between px-4 py-3 gap-4\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-sm inline-flex items-center gap-1.5\">\n {formatDisplayPrice(order.price.formatted)}\n <CurrencyIcon symbol={order.price.currency ?? \"\"} size={14} />\n </p>\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground mt-0.5\">\n <Clock className=\"h-3 w-3\" />\n {timeUntil(order.endTime)}\n </div>\n </div>\n <div className=\"flex items-center gap-2 shrink-0\">\n <AddressDisplay address={order.offerer} chars={4} showCopy={false} className=\"text-xs text-muted-foreground\" />\n {isMyOrder ? (\n <ActionButton variant=\"destructive\" disabled={isProcessing} onClick={() => onCancelClick(order)}>\n Cancel\n </ActionButton>\n ) : (\n <ActionButton onClick={() => onBuyClick(order)}>Buy</ActionButton>\n )}\n </div>\n </div>\n );\n })}\n </div>\n )}\n </div>\n\n <div>\n <p className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2\">Offers</p>\n {activeBids.length === 0 ? (\n <p className=\"text-sm text-muted-foreground py-4 text-center\">No active offers.</p>\n ) : (\n <div className=\"rounded-xl border border-border divide-y divide-border\">\n {activeBids.map((bid) => (\n <div key={bid.orderHash} className=\"flex items-center justify-between px-4 py-3 gap-4\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-sm\">\n <span className=\"inline-flex items-center gap-1.5\">\n {formatDisplayPrice(bid.price.formatted)}\n <CurrencyIcon symbol={bid.price.currency ?? \"\"} size={14} />\n </span>\n </p>\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground mt-0.5\">\n <Clock className=\"h-3 w-3\" />\n {timeUntil(bid.endTime)}\n </div>\n </div>\n <div className=\"flex items-center gap-2 shrink-0\">\n <AddressDisplay address={bid.offerer} chars={4} showCopy={false} className=\"text-xs text-muted-foreground\" />\n {isOwner && (\n <ActionButton disabled={isProcessing} onClick={() => onAcceptClick(bid)}>\n <CheckCircle className=\"h-3.5 w-3.5 mr-1.5\" />\n Accept\n </ActionButton>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBI;AAfJ,6BAA+B;AAC/B,2BAA6B;AAC7B,oBAAmC;AACnC,kBAA0B;AAC1B,gBAAmB;AACnB,0BAAmC;AAInC,SAAS,aAAa;AAAA,EACpB,UAAU;AAAA,EACV;AAAA,EACA,GAAG;AACL,GAA4F;AAC1F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,YAAY,gBACR,uEACA;AAAA,QACJ;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAaO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAyB;AACvB,SACE,6CAAC,SAAI,WAAU,kBACb;AAAA,iDAAC,SACC;AAAA,kDAAC,OAAE,WAAU,6EAA4E,sBAAQ;AAAA,MAChG,eAAe,WAAW,IACzB,4CAAC,OAAE,WAAU,kDAAiD,iCAAmB,IAEjF,4CAAC,SAAI,WAAU,0DACZ,yBAAe,IAAI,CAAC,UAAU;AAC7B,cAAM,YAAY,iBAAiB,MAAM,QAAQ,YAAY,MAAM,cAAc,YAAY;AAC7F,eACE,6CAAC,SAA0B,WAAU,qDACnC;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b;AAAA,sDAAC,yCAAe,SAAS,IAAI,SAAS,OAAO,GAAG,UAAU,OAAO,WAAU,iCAAgC;AAAA,UAC1G,WACC,6CAAC,gBAAa,UAAU,cAAc,SAAS,MAAM,cAAc,GAAG,GACpE;AAAA,wDAAC,mCAAY,WAAU,sBAAqB;AAAA,YAAE;AAAA,aAEhD;AAAA,WAEJ;AAAA,WArBQ,IAAI,SAsBd,CACD,GACH;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ApiOrder } from '@medialane/sdk';
|
|
3
|
+
|
|
4
|
+
interface AssetMarketsTabProps {
|
|
5
|
+
activeListings: ApiOrder[];
|
|
6
|
+
activeBids: ApiOrder[];
|
|
7
|
+
walletAddress?: string;
|
|
8
|
+
isOwner: boolean;
|
|
9
|
+
isProcessing: boolean;
|
|
10
|
+
onBuyClick: (order: ApiOrder) => void;
|
|
11
|
+
onCancelClick: (order: ApiOrder) => void;
|
|
12
|
+
onAcceptClick: (order: ApiOrder) => void;
|
|
13
|
+
}
|
|
14
|
+
declare function AssetMarketsTab({ activeListings, activeBids, walletAddress, isOwner, isProcessing, onBuyClick, onCancelClick, onAcceptClick, }: AssetMarketsTabProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { AssetMarketsTab };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ApiOrder } from '@medialane/sdk';
|
|
3
|
+
|
|
4
|
+
interface AssetMarketsTabProps {
|
|
5
|
+
activeListings: ApiOrder[];
|
|
6
|
+
activeBids: ApiOrder[];
|
|
7
|
+
walletAddress?: string;
|
|
8
|
+
isOwner: boolean;
|
|
9
|
+
isProcessing: boolean;
|
|
10
|
+
onBuyClick: (order: ApiOrder) => void;
|
|
11
|
+
onCancelClick: (order: ApiOrder) => void;
|
|
12
|
+
onAcceptClick: (order: ApiOrder) => void;
|
|
13
|
+
}
|
|
14
|
+
declare function AssetMarketsTab({ activeListings, activeBids, walletAddress, isOwner, isProcessing, onBuyClick, onCancelClick, onAcceptClick, }: AssetMarketsTabProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { AssetMarketsTab };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AddressDisplay } from "./address-display.js";
|
|
4
|
+
import { CurrencyIcon } from "./currency-icon.js";
|
|
5
|
+
import { formatDisplayPrice } from "../utils/format.js";
|
|
6
|
+
import { timeUntil } from "../utils/time.js";
|
|
7
|
+
import { cn } from "../utils/cn.js";
|
|
8
|
+
import { Clock, CheckCircle } from "lucide-react";
|
|
9
|
+
function ActionButton({
|
|
10
|
+
variant = "default",
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
"button",
|
|
16
|
+
{
|
|
17
|
+
className: cn(
|
|
18
|
+
"inline-flex items-center justify-center h-9 rounded-md px-3 text-xs font-medium transition-colors",
|
|
19
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
20
|
+
variant === "destructive" ? "bg-destructive text-destructive-foreground hover:bg-destructive/90" : "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
21
|
+
className
|
|
22
|
+
),
|
|
23
|
+
...props
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
function AssetMarketsTab({
|
|
28
|
+
activeListings,
|
|
29
|
+
activeBids,
|
|
30
|
+
walletAddress,
|
|
31
|
+
isOwner,
|
|
32
|
+
isProcessing,
|
|
33
|
+
onBuyClick,
|
|
34
|
+
onCancelClick,
|
|
35
|
+
onAcceptClick
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ jsxs("div", { className: "mt-4 space-y-6", children: [
|
|
38
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
39
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2", children: "Listings" }),
|
|
40
|
+
activeListings.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground py-4 text-center", children: "No active listings." }) : /* @__PURE__ */ jsx("div", { className: "rounded-xl border border-border divide-y divide-border", children: activeListings.map((order) => {
|
|
41
|
+
const isMyOrder = walletAddress && order.offerer.toLowerCase() === walletAddress.toLowerCase();
|
|
42
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-3 gap-4", children: [
|
|
43
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
44
|
+
/* @__PURE__ */ jsxs("p", { className: "font-bold text-sm inline-flex items-center gap-1.5", children: [
|
|
45
|
+
formatDisplayPrice(order.price.formatted),
|
|
46
|
+
/* @__PURE__ */ jsx(CurrencyIcon, { symbol: order.price.currency ?? "", size: 14 })
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-muted-foreground mt-0.5", children: [
|
|
49
|
+
/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }),
|
|
50
|
+
timeUntil(order.endTime)
|
|
51
|
+
] })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(AddressDisplay, { address: order.offerer, chars: 4, showCopy: false, className: "text-xs text-muted-foreground" }),
|
|
55
|
+
isMyOrder ? /* @__PURE__ */ jsx(ActionButton, { variant: "destructive", disabled: isProcessing, onClick: () => onCancelClick(order), children: "Cancel" }) : /* @__PURE__ */ jsx(ActionButton, { onClick: () => onBuyClick(order), children: "Buy" })
|
|
56
|
+
] })
|
|
57
|
+
] }, order.orderHash);
|
|
58
|
+
}) })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
61
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2", children: "Offers" }),
|
|
62
|
+
activeBids.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground py-4 text-center", children: "No active offers." }) : /* @__PURE__ */ jsx("div", { className: "rounded-xl border border-border divide-y divide-border", children: activeBids.map((bid) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-3 gap-4", children: [
|
|
63
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
64
|
+
/* @__PURE__ */ jsx("p", { className: "font-bold text-sm", children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
65
|
+
formatDisplayPrice(bid.price.formatted),
|
|
66
|
+
/* @__PURE__ */ jsx(CurrencyIcon, { symbol: bid.price.currency ?? "", size: 14 })
|
|
67
|
+
] }) }),
|
|
68
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-muted-foreground mt-0.5", children: [
|
|
69
|
+
/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }),
|
|
70
|
+
timeUntil(bid.endTime)
|
|
71
|
+
] })
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
74
|
+
/* @__PURE__ */ jsx(AddressDisplay, { address: bid.offerer, chars: 4, showCopy: false, className: "text-xs text-muted-foreground" }),
|
|
75
|
+
isOwner && /* @__PURE__ */ jsxs(ActionButton, { disabled: isProcessing, onClick: () => onAcceptClick(bid), children: [
|
|
76
|
+
/* @__PURE__ */ jsx(CheckCircle, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
77
|
+
"Accept"
|
|
78
|
+
] })
|
|
79
|
+
] })
|
|
80
|
+
] }, bid.orderHash)) })
|
|
81
|
+
] })
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
AssetMarketsTab
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=asset-markets-tab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-markets-tab.tsx"],"sourcesContent":["\"use client\";\n\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport { timeUntil } from \"../utils/time.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { Clock, CheckCircle } from \"lucide-react\";\nimport type { ApiOrder } from \"@medialane/sdk\";\n\n/** shadcn-equivalent small button (ui package carries no Radix/shadcn primitives) */\nfunction ActionButton({\n variant = \"default\",\n className,\n ...props\n}: React.ButtonHTMLAttributes<HTMLButtonElement> & { variant?: \"default\" | \"destructive\" }) {\n return (\n <button\n className={cn(\n \"inline-flex items-center justify-center h-9 rounded-md px-3 text-xs font-medium transition-colors\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n variant === \"destructive\"\n ? \"bg-destructive text-destructive-foreground hover:bg-destructive/90\"\n : \"bg-primary text-primary-foreground hover:bg-primary/90\",\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface AssetMarketsTabProps {\n activeListings: ApiOrder[];\n activeBids: ApiOrder[];\n walletAddress?: string;\n isOwner: boolean;\n isProcessing: boolean;\n onBuyClick: (order: ApiOrder) => void;\n onCancelClick: (order: ApiOrder) => void;\n onAcceptClick: (order: ApiOrder) => void;\n}\n\nexport function AssetMarketsTab({\n activeListings,\n activeBids,\n walletAddress,\n isOwner,\n isProcessing,\n onBuyClick,\n onCancelClick,\n onAcceptClick,\n}: AssetMarketsTabProps) {\n return (\n <div className=\"mt-4 space-y-6\">\n <div>\n <p className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2\">Listings</p>\n {activeListings.length === 0 ? (\n <p className=\"text-sm text-muted-foreground py-4 text-center\">No active listings.</p>\n ) : (\n <div className=\"rounded-xl border border-border divide-y divide-border\">\n {activeListings.map((order) => {\n const isMyOrder = walletAddress && order.offerer.toLowerCase() === walletAddress.toLowerCase();\n return (\n <div key={order.orderHash} className=\"flex items-center justify-between px-4 py-3 gap-4\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-sm inline-flex items-center gap-1.5\">\n {formatDisplayPrice(order.price.formatted)}\n <CurrencyIcon symbol={order.price.currency ?? \"\"} size={14} />\n </p>\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground mt-0.5\">\n <Clock className=\"h-3 w-3\" />\n {timeUntil(order.endTime)}\n </div>\n </div>\n <div className=\"flex items-center gap-2 shrink-0\">\n <AddressDisplay address={order.offerer} chars={4} showCopy={false} className=\"text-xs text-muted-foreground\" />\n {isMyOrder ? (\n <ActionButton variant=\"destructive\" disabled={isProcessing} onClick={() => onCancelClick(order)}>\n Cancel\n </ActionButton>\n ) : (\n <ActionButton onClick={() => onBuyClick(order)}>Buy</ActionButton>\n )}\n </div>\n </div>\n );\n })}\n </div>\n )}\n </div>\n\n <div>\n <p className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2\">Offers</p>\n {activeBids.length === 0 ? (\n <p className=\"text-sm text-muted-foreground py-4 text-center\">No active offers.</p>\n ) : (\n <div className=\"rounded-xl border border-border divide-y divide-border\">\n {activeBids.map((bid) => (\n <div key={bid.orderHash} className=\"flex items-center justify-between px-4 py-3 gap-4\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-sm\">\n <span className=\"inline-flex items-center gap-1.5\">\n {formatDisplayPrice(bid.price.formatted)}\n <CurrencyIcon symbol={bid.price.currency ?? \"\"} size={14} />\n </span>\n </p>\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground mt-0.5\">\n <Clock className=\"h-3 w-3\" />\n {timeUntil(bid.endTime)}\n </div>\n </div>\n <div className=\"flex items-center gap-2 shrink-0\">\n <AddressDisplay address={bid.offerer} chars={4} showCopy={false} className=\"text-xs text-muted-foreground\" />\n {isOwner && (\n <ActionButton disabled={isProcessing} onClick={() => onAcceptClick(bid)}>\n <CheckCircle className=\"h-3.5 w-3.5 mr-1.5\" />\n Accept\n </ActionButton>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";AAiBI,cAgDgB,YAhDhB;AAfJ,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAC1B,SAAS,UAAU;AACnB,SAAS,OAAO,mBAAmB;AAInC,SAAS,aAAa;AAAA,EACpB,UAAU;AAAA,EACV;AAAA,EACA,GAAG;AACL,GAA4F;AAC1F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,YAAY,gBACR,uEACA;AAAA,QACJ;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAaO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAyB;AACvB,SACE,qBAAC,SAAI,WAAU,kBACb;AAAA,yBAAC,SACC;AAAA,0BAAC,OAAE,WAAU,6EAA4E,sBAAQ;AAAA,MAChG,eAAe,WAAW,IACzB,oBAAC,OAAE,WAAU,kDAAiD,iCAAmB,IAEjF,oBAAC,SAAI,WAAU,0DACZ,yBAAe,IAAI,CAAC,UAAU;AAC7B,cAAM,YAAY,iBAAiB,MAAM,QAAQ,YAAY,MAAM,cAAc,YAAY;AAC7F,eACE,qBAAC,SAA0B,WAAU,qDACnC;AAAA,+BAAC,SAAI,WAAU,WACb;AAAA,iCAAC,OAAE,WAAU,sDACV;AAAA,iCAAmB,MAAM,MAAM,SAAS;AAAA,cACzC,oBAAC,gBAAa,QAAQ,MAAM,MAAM,YAAY,IAAI,MAAM,IAAI;AAAA,eAC9D;AAAA,YACA,qBAAC,SAAI,WA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D;AAAA,WAEJ;AAAA,WArBQ,IAAI,SAsBd,CACD,GACH;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,102 @@
|
|
|
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_overview_content_exports = {};
|
|
21
|
+
__export(asset_overview_content_exports, {
|
|
22
|
+
AssetOverviewContent: () => AssetOverviewContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(asset_overview_content_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_ip_type_display = require("./ip-type-display.js");
|
|
27
|
+
var import_lucide_react = require("lucide-react");
|
|
28
|
+
function AssetOverviewContent({
|
|
29
|
+
attributes,
|
|
30
|
+
hasTemplateData,
|
|
31
|
+
isDisplayAttr
|
|
32
|
+
}) {
|
|
33
|
+
const attr = (trait) => attributes.find((attribute) => attribute.trait_type === trait)?.value;
|
|
34
|
+
const licenseType = attr("License");
|
|
35
|
+
const commercialUse = attr("Commercial Use");
|
|
36
|
+
const derivatives = attr("Derivatives");
|
|
37
|
+
const attribution = attr("Attribution");
|
|
38
|
+
const territory = attr("Territory");
|
|
39
|
+
const aiPolicy = attr("AI Policy");
|
|
40
|
+
const royalty = attr("Royalty");
|
|
41
|
+
const standard = attr("Standard");
|
|
42
|
+
const registration = attr("Registration");
|
|
43
|
+
const hasLicenseData = licenseType || commercialUse || derivatives || attribution;
|
|
44
|
+
const displayAttributes = attributes.filter((attribute) => isDisplayAttr(attribute));
|
|
45
|
+
const rows = [
|
|
46
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Shield, { className: "h-4 w-4" }), label: "License", value: licenseType },
|
|
47
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.DollarSign, { className: "h-4 w-4" }), label: "Commercial Use", value: commercialUse },
|
|
48
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }), label: "Derivatives", value: derivatives },
|
|
49
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.UserCheck, { className: "h-4 w-4" }), label: "Attribution", value: attribution },
|
|
50
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Globe, { className: "h-4 w-4" }), label: "Territory", value: territory },
|
|
51
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Bot, { className: "h-4 w-4" }), label: "AI & Data Mining", value: aiPolicy },
|
|
52
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Percent, { className: "h-4 w-4" }), label: "Royalty", value: royalty },
|
|
53
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Calendar, { className: "h-4 w-4" }), label: "Registration", value: registration }
|
|
54
|
+
].filter((row) => !!row.value);
|
|
55
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mt-4 space-y-6", children: [
|
|
56
|
+
hasTemplateData ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ip_type_display.IPTypeDisplay, { attributes }) : null,
|
|
57
|
+
hasLicenseData ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
|
|
58
|
+
standard ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 rounded-lg bg-primary/5 border border-primary/20 px-4 py-3", children: [
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Shield, { className: "h-4 w-4 text-primary shrink-0" }),
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs font-semibold text-primary", children: [
|
|
62
|
+
standard,
|
|
63
|
+
" Compliant"
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: "Licensing terms are immutably embedded in IPFS metadata and compliant with international copyright law." })
|
|
66
|
+
] })
|
|
67
|
+
] }) : null,
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-2", children: rows.map(({ icon, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-lg border border-border bg-muted/20 p-3 text-center overflow-hidden", children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex justify-center text-muted-foreground mb-1", children: icon }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[10px] uppercase tracking-wider text-muted-foreground truncate", children: label }),
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold mt-0.5 truncate", title: value, children: value })
|
|
72
|
+
] }, label)) })
|
|
73
|
+
] }) : null,
|
|
74
|
+
displayAttributes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2", children: "Attributes" }),
|
|
76
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-2", children: displayAttributes.map((attribute, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-lg border border-border bg-muted/20 p-3 text-center overflow-hidden", children: [
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78
|
+
"p",
|
|
79
|
+
{
|
|
80
|
+
className: "text-[10px] uppercase tracking-wider text-muted-foreground truncate",
|
|
81
|
+
title: attribute.trait_type ?? "Trait",
|
|
82
|
+
children: attribute.trait_type ?? "Trait"
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
86
|
+
"p",
|
|
87
|
+
{
|
|
88
|
+
className: "text-sm font-semibold mt-0.5 truncate",
|
|
89
|
+
title: attribute.value ?? "\u2014",
|
|
90
|
+
children: attribute.value ?? "\u2014"
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
] }, index)) })
|
|
94
|
+
] }) : null,
|
|
95
|
+
!hasTemplateData && displayAttributes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: "No additional details available." }) : null
|
|
96
|
+
] });
|
|
97
|
+
}
|
|
98
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
+
0 && (module.exports = {
|
|
100
|
+
AssetOverviewContent
|
|
101
|
+
});
|
|
102
|
+
//# sourceMappingURL=asset-overview-content.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-overview-content.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { IPTypeDisplay } from \"./ip-type-display.js\";\nimport { Bot, Calendar, DollarSign, GitBranch, Globe, Percent, Shield, UserCheck } from \"lucide-react\";\n\ninterface AssetAttribute {\n trait_type?: string;\n value?: string;\n}\n\ninterface AssetOverviewContentProps {\n attributes: AssetAttribute[];\n hasTemplateData: boolean;\n isDisplayAttr: (attribute: AssetAttribute) => boolean;\n}\n\nexport function AssetOverviewContent({\n attributes,\n hasTemplateData,\n isDisplayAttr,\n}: AssetOverviewContentProps) {\n const attr = (trait: string) => attributes.find((attribute) => attribute.trait_type === trait)?.value;\n const licenseType = attr(\"License\");\n const commercialUse = attr(\"Commercial Use\");\n const derivatives = attr(\"Derivatives\");\n const attribution = attr(\"Attribution\");\n const territory = attr(\"Territory\");\n const aiPolicy = attr(\"AI Policy\");\n const royalty = attr(\"Royalty\");\n const standard = attr(\"Standard\");\n const registration = attr(\"Registration\");\n const hasLicenseData = licenseType || commercialUse || derivatives || attribution;\n const displayAttributes = attributes.filter((attribute) => isDisplayAttr(attribute));\n\n const rows: { icon: ReactNode; label: string; value: string | undefined }[] = [\n { icon: <Shield className=\"h-4 w-4\" />, label: \"License\", value: licenseType },\n { icon: <DollarSign className=\"h-4 w-4\" />, label: \"Commercial Use\", value: commercialUse },\n { icon: <GitBranch className=\"h-4 w-4\" />, label: \"Derivatives\", value: derivatives },\n { icon: <UserCheck className=\"h-4 w-4\" />, label: \"Attribution\", value: attribution },\n { icon: <Globe className=\"h-4 w-4\" />, label: \"Territory\", value: territory },\n { icon: <Bot className=\"h-4 w-4\" />, label: \"AI & Data Mining\", value: aiPolicy },\n { icon: <Percent className=\"h-4 w-4\" />, label: \"Royalty\", value: royalty },\n { icon: <Calendar className=\"h-4 w-4\" />, label: \"Registration\", value: registration },\n ].filter((row) => !!row.value);\n\n return (\n <div className=\"mt-4 space-y-6\">\n {hasTemplateData ? (\n <IPTypeDisplay attributes={attributes} />\n ) : null}\n\n {hasLicenseData ? (\n <div className=\"space-y-3\">\n {standard ? (\n <div className=\"flex items-center gap-2 rounded-lg bg-primary/5 border border-primary/20 px-4 py-3\">\n <Shield className=\"h-4 w-4 text-primary shrink-0\" />\n <div>\n <p className=\"text-xs font-semibold text-primary\">{standard} Compliant</p>\n <p className=\"text-xs text-muted-foreground\">\n Licensing terms are immutably embedded in IPFS metadata and compliant with international copyright law.\n </p>\n </div>\n </div>\n ) : null}\n\n <div className=\"grid grid-cols-2 sm:grid-cols-3 gap-2\">\n {rows.map(({ icon, label, value }) => (\n <div key={label} className=\"rounded-lg border border-border bg-muted/20 p-3 text-center overflow-hidden\">\n <div className=\"flex justify-center text-muted-foreground mb-1\">{icon}</div>\n <p className=\"text-[10px] uppercase tracking-wider text-muted-foreground truncate\">{label}</p>\n <p className=\"text-sm font-semibold mt-0.5 truncate\" title={value}>{value}</p>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n\n {displayAttributes.length > 0 ? (\n <div>\n <p className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2\">Attributes</p>\n <div className=\"grid grid-cols-2 sm:grid-cols-3 gap-2\">\n {displayAttributes.map((attribute, index) => (\n <div key={index} className=\"rounded-lg border border-border bg-muted/20 p-3 text-center overflow-hidden\">\n <p\n className=\"text-[10px] uppercase tracking-wider text-muted-foreground truncate\"\n title={attribute.trait_type ?? \"Trait\"}\n >\n {attribute.trait_type ?? \"Trait\"}\n </p>\n <p\n className=\"text-sm font-semibold mt-0.5 truncate\"\n title={attribute.value ?? \"—\"}\n >\n {attribute.value ?? \"—\"}\n </p>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n\n {!hasTemplateData && displayAttributes.length === 0 ? (\n <p className=\"text-sm text-muted-foreground\">No additional details available.</p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoCY;AAjCZ,6BAA8B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,4CAAC,OAAE,WAAU,iCAAgC,8CAAgC,IAC3E;AAAA,KACN;AAEJ;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface AssetAttribute {
|
|
4
|
+
trait_type?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
}
|
|
7
|
+
interface AssetOverviewContentProps {
|
|
8
|
+
attributes: AssetAttribute[];
|
|
9
|
+
hasTemplateData: boolean;
|
|
10
|
+
isDisplayAttr: (attribute: AssetAttribute) => boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function AssetOverviewContent({ attributes, hasTemplateData, isDisplayAttr, }: AssetOverviewContentProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { AssetOverviewContent };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface AssetAttribute {
|
|
4
|
+
trait_type?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
}
|
|
7
|
+
interface AssetOverviewContentProps {
|
|
8
|
+
attributes: AssetAttribute[];
|
|
9
|
+
hasTemplateData: boolean;
|
|
10
|
+
isDisplayAttr: (attribute: AssetAttribute) => boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function AssetOverviewContent({ attributes, hasTemplateData, isDisplayAttr, }: AssetOverviewContentProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { AssetOverviewContent };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { IPTypeDisplay } from "./ip-type-display.js";
|
|
4
|
+
import { Bot, Calendar, DollarSign, GitBranch, Globe, Percent, Shield, UserCheck } from "lucide-react";
|
|
5
|
+
function AssetOverviewContent({
|
|
6
|
+
attributes,
|
|
7
|
+
hasTemplateData,
|
|
8
|
+
isDisplayAttr
|
|
9
|
+
}) {
|
|
10
|
+
const attr = (trait) => attributes.find((attribute) => attribute.trait_type === trait)?.value;
|
|
11
|
+
const licenseType = attr("License");
|
|
12
|
+
const commercialUse = attr("Commercial Use");
|
|
13
|
+
const derivatives = attr("Derivatives");
|
|
14
|
+
const attribution = attr("Attribution");
|
|
15
|
+
const territory = attr("Territory");
|
|
16
|
+
const aiPolicy = attr("AI Policy");
|
|
17
|
+
const royalty = attr("Royalty");
|
|
18
|
+
const standard = attr("Standard");
|
|
19
|
+
const registration = attr("Registration");
|
|
20
|
+
const hasLicenseData = licenseType || commercialUse || derivatives || attribution;
|
|
21
|
+
const displayAttributes = attributes.filter((attribute) => isDisplayAttr(attribute));
|
|
22
|
+
const rows = [
|
|
23
|
+
{ icon: /* @__PURE__ */ jsx(Shield, { className: "h-4 w-4" }), label: "License", value: licenseType },
|
|
24
|
+
{ icon: /* @__PURE__ */ jsx(DollarSign, { className: "h-4 w-4" }), label: "Commercial Use", value: commercialUse },
|
|
25
|
+
{ icon: /* @__PURE__ */ jsx(GitBranch, { className: "h-4 w-4" }), label: "Derivatives", value: derivatives },
|
|
26
|
+
{ icon: /* @__PURE__ */ jsx(UserCheck, { className: "h-4 w-4" }), label: "Attribution", value: attribution },
|
|
27
|
+
{ icon: /* @__PURE__ */ jsx(Globe, { className: "h-4 w-4" }), label: "Territory", value: territory },
|
|
28
|
+
{ icon: /* @__PURE__ */ jsx(Bot, { className: "h-4 w-4" }), label: "AI & Data Mining", value: aiPolicy },
|
|
29
|
+
{ icon: /* @__PURE__ */ jsx(Percent, { className: "h-4 w-4" }), label: "Royalty", value: royalty },
|
|
30
|
+
{ icon: /* @__PURE__ */ jsx(Calendar, { className: "h-4 w-4" }), label: "Registration", value: registration }
|
|
31
|
+
].filter((row) => !!row.value);
|
|
32
|
+
return /* @__PURE__ */ jsxs("div", { className: "mt-4 space-y-6", children: [
|
|
33
|
+
hasTemplateData ? /* @__PURE__ */ jsx(IPTypeDisplay, { attributes }) : null,
|
|
34
|
+
hasLicenseData ? /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
35
|
+
standard ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg bg-primary/5 border border-primary/20 px-4 py-3", children: [
|
|
36
|
+
/* @__PURE__ */ jsx(Shield, { className: "h-4 w-4 text-primary shrink-0" }),
|
|
37
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
38
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs font-semibold text-primary", children: [
|
|
39
|
+
standard,
|
|
40
|
+
" Compliant"
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Licensing terms are immutably embedded in IPFS metadata and compliant with international copyright law." })
|
|
43
|
+
] })
|
|
44
|
+
] }) : null,
|
|
45
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-2", children: rows.map(({ icon, label, value }) => /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border bg-muted/20 p-3 text-center overflow-hidden", children: [
|
|
46
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center text-muted-foreground mb-1", children: icon }),
|
|
47
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] uppercase tracking-wider text-muted-foreground truncate", children: label }),
|
|
48
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold mt-0.5 truncate", title: value, children: value })
|
|
49
|
+
] }, label)) })
|
|
50
|
+
] }) : null,
|
|
51
|
+
displayAttributes.length > 0 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
52
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2", children: "Attributes" }),
|
|
53
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-2", children: displayAttributes.map((attribute, index) => /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border bg-muted/20 p-3 text-center overflow-hidden", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
"p",
|
|
56
|
+
{
|
|
57
|
+
className: "text-[10px] uppercase tracking-wider text-muted-foreground truncate",
|
|
58
|
+
title: attribute.trait_type ?? "Trait",
|
|
59
|
+
children: attribute.trait_type ?? "Trait"
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
"p",
|
|
64
|
+
{
|
|
65
|
+
className: "text-sm font-semibold mt-0.5 truncate",
|
|
66
|
+
title: attribute.value ?? "\u2014",
|
|
67
|
+
children: attribute.value ?? "\u2014"
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
] }, index)) })
|
|
71
|
+
] }) : null,
|
|
72
|
+
!hasTemplateData && displayAttributes.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "No additional details available." }) : null
|
|
73
|
+
] });
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
AssetOverviewContent
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=asset-overview-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-overview-content.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { IPTypeDisplay } from \"./ip-type-display.js\";\nimport { Bot, Calendar, DollarSign, GitBranch, Globe, Percent, Shield, UserCheck } from \"lucide-react\";\n\ninterface AssetAttribute {\n trait_type?: string;\n value?: string;\n}\n\ninterface AssetOverviewContentProps {\n attributes: AssetAttribute[];\n hasTemplateData: boolean;\n isDisplayAttr: (attribute: AssetAttribute) => boolean;\n}\n\nexport function AssetOverviewContent({\n attributes,\n hasTemplateData,\n isDisplayAttr,\n}: AssetOverviewContentProps) {\n const attr = (trait: string) => attributes.find((attribute) => attribute.trait_type === trait)?.value;\n const licenseType = attr(\"License\");\n const commercialUse = attr(\"Commercial Use\");\n const derivatives = attr(\"Derivatives\");\n const attribution = attr(\"Attribution\");\n const territory = attr(\"Territory\");\n const aiPolicy = attr(\"AI Policy\");\n const royalty = attr(\"Royalty\");\n const standard = attr(\"Standard\");\n const registration = attr(\"Registration\");\n const hasLicenseData = licenseType || commercialUse || derivatives || attribution;\n const displayAttributes = attributes.filter((attribute) => isDisplayAttr(attribute));\n\n const rows: { icon: ReactNode; label: string; value: string | undefined }[] = [\n { icon: <Shield className=\"h-4 w-4\" />, label: \"License\", value: licenseType },\n { icon: <DollarSign className=\"h-4 w-4\" />, label: \"Commercial Use\", value: commercialUse },\n { icon: <GitBranch className=\"h-4 w-4\" />, label: \"Derivatives\", value: derivatives },\n { icon: <UserCheck className=\"h-4 w-4\" />, label: \"Attribution\", value: attribution },\n { icon: <Globe className=\"h-4 w-4\" />, label: \"Territory\", value: territory },\n { icon: <Bot className=\"h-4 w-4\" />, label: \"AI & Data Mining\", value: aiPolicy },\n { icon: <Percent className=\"h-4 w-4\" />, label: \"Royalty\", value: royalty },\n { icon: <Calendar className=\"h-4 w-4\" />, label: \"Registration\", value: registration },\n ].filter((row) => !!row.value);\n\n return (\n <div className=\"mt-4 space-y-6\">\n {hasTemplateData ? (\n <IPTypeDisplay attributes={attributes} />\n ) : null}\n\n {hasLicenseData ? (\n <div className=\"space-y-3\">\n {standard ? (\n <div className=\"flex items-center gap-2 rounded-lg bg-primary/5 border border-primary/20 px-4 py-3\">\n <Shield className=\"h-4 w-4 text-primary shrink-0\" />\n <div>\n <p className=\"text-xs font-semibold text-primary\">{standard} Compliant</p>\n <p className=\"text-xs text-muted-foreground\">\n Licensing terms are immutably embedded in IPFS metadata and compliant with international copyright law.\n </p>\n </div>\n </div>\n ) : null}\n\n <div className=\"grid grid-cols-2 sm:grid-cols-3 gap-2\">\n {rows.map(({ icon, label, value }) => (\n <div key={label} className=\"rounded-lg border border-border bg-muted/20 p-3 text-center overflow-hidden\">\n <div className=\"flex justify-center text-muted-foreground mb-1\">{icon}</div>\n <p className=\"text-[10px] uppercase tracking-wider text-muted-foreground truncate\">{label}</p>\n <p className=\"text-sm font-semibold mt-0.5 truncate\" title={value}>{value}</p>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n\n {displayAttributes.length > 0 ? (\n <div>\n <p className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2\">Attributes</p>\n <div className=\"grid grid-cols-2 sm:grid-cols-3 gap-2\">\n {displayAttributes.map((attribute, index) => (\n <div key={index} className=\"rounded-lg border border-border bg-muted/20 p-3 text-center overflow-hidden\">\n <p\n className=\"text-[10px] uppercase tracking-wider text-muted-foreground truncate\"\n title={attribute.trait_type ?? \"Trait\"}\n >\n {attribute.trait_type ?? \"Trait\"}\n </p>\n <p\n className=\"text-sm font-semibold mt-0.5 truncate\"\n title={attribute.value ?? \"—\"}\n >\n {attribute.value ?? \"—\"}\n </p>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n\n {!hasTemplateData && displayAttributes.length === 0 ? (\n <p className=\"text-sm text-muted-foreground\">No additional details available.</p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";AAoCY,cAsBI,YAtBJ;AAjCZ,SAAS,qBAAqB;AAC9B,SAAS,KAAK,UAAU,YAAY,WAAW,OAAO,SAAS,QAAQ,iBAAiB;AAajF,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AAC5B,QAAM,OAAO,CAAC,UAAkB,WAAW,KAAK,CAAC,cAAc,UAAU,eAAe,KAAK,GAAG;AAChG,QAAM,cAAc,KAAK,SAAS;AAClC,QAAM,gBAAgB,KAAK,gBAAgB;AAC3C,QAAM,cAAc,KAAK,aAAa;AACtC,QAAM,cAAc,KAAK,aAAa;AACtC,QAAM,YAAY,KAAK,WAAW;AAClC,QAAM,WAAW,KAAK,WAAW;AACjC,QAAM,UAAU,KAAK,SAAS;AAC9B,QAAM,WAAW,KAAK,UAAU;AAChC,QAAM,eAAe,KAAK,cAAc;AACxC,QAAM,iBAAiB,eAAe,iBAAiB,eA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