@medialane/ui 0.27.0 → 0.29.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.
Files changed (44) hide show
  1. package/README.md +1 -0
  2. package/dist/components/asset-collection-bar.cjs +135 -0
  3. package/dist/components/asset-collection-bar.cjs.map +1 -0
  4. package/dist/components/asset-collection-bar.d.cts +28 -0
  5. package/dist/components/asset-collection-bar.d.ts +28 -0
  6. package/dist/components/asset-collection-bar.js +101 -0
  7. package/dist/components/asset-collection-bar.js.map +1 -0
  8. package/dist/components/asset-marketplace-panel.cjs +284 -0
  9. package/dist/components/asset-marketplace-panel.cjs.map +1 -0
  10. package/dist/components/asset-marketplace-panel.d.cts +44 -0
  11. package/dist/components/asset-marketplace-panel.d.ts +44 -0
  12. package/dist/components/asset-marketplace-panel.js +270 -0
  13. package/dist/components/asset-marketplace-panel.js.map +1 -0
  14. package/dist/components/asset-top-sections.cjs +4 -9
  15. package/dist/components/asset-top-sections.cjs.map +1 -1
  16. package/dist/components/asset-top-sections.d.cts +1 -3
  17. package/dist/components/asset-top-sections.d.ts +1 -3
  18. package/dist/components/asset-top-sections.js +4 -9
  19. package/dist/components/asset-top-sections.js.map +1 -1
  20. package/dist/components/service-form-shell.cjs +3 -2
  21. package/dist/components/service-form-shell.cjs.map +1 -1
  22. package/dist/components/service-form-shell.d.cts +4 -1
  23. package/dist/components/service-form-shell.d.ts +4 -1
  24. package/dist/components/service-form-shell.js +3 -2
  25. package/dist/components/service-form-shell.js.map +1 -1
  26. package/dist/components/step-nav.cjs +82 -0
  27. package/dist/components/step-nav.cjs.map +1 -0
  28. package/dist/components/step-nav.d.cts +28 -0
  29. package/dist/components/step-nav.d.ts +28 -0
  30. package/dist/components/step-nav.js +58 -0
  31. package/dist/components/step-nav.js.map +1 -0
  32. package/dist/index.cjs +11 -0
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +5 -2
  35. package/dist/index.d.ts +5 -2
  36. package/dist/index.js +8 -1
  37. package/dist/index.js.map +1 -1
  38. package/dist/utils/format.cjs +17 -2
  39. package/dist/utils/format.cjs.map +1 -1
  40. package/dist/utils/format.d.cts +9 -1
  41. package/dist/utils/format.d.ts +9 -1
  42. package/dist/utils/format.js +15 -1
  43. package/dist/utils/format.js.map +1 -1
  44. package/package.json +1 -1
package/README.md CHANGED
@@ -233,6 +233,7 @@ The package uses [tsup](https://tsup.egoist.dev/) and outputs ESM + CJS + type d
233
233
 
234
234
  | Version | Added |
235
235
  |---|---|
236
+ | **v0.28.0** | `StepNav` (presentation-only step indicator — solid active dot, outlined check for done, filling connector, accent-themed). `ServiceFormShell` gains an `aboveForm` slot (left column, between header and form — e.g. a stepper) and a **sticky right rail** on desktop. Lets the Creator Coin page adopt the standard form layout |
236
237
  | **v0.27.0** | `ServiceHeader` gains a `plain` variant (neutral border, no brand gradient); `ServiceFormShell` renders the header `plain` so create/mint form pages carry the gradient border only on the form, not the header. Standalone headers (browse pages, coin page, `/claim` hub) keep the gradient |
237
238
  | **v0.26.0** | `LaunchpadServiceCard` "living color cards" high-fidelity pass: per-hue aurora light-leaks, gradient icon tile, hairline gradient frame that ignites on interaction, staggered entrance reveal, press/hover microinteractions, animated CTA arrow; roomier grid gaps + section rhythm. Touch-first, reduced-motion safe |
238
239
  | **v0.25.0** | `CoinsExplorer`/`CoinCard` refined: kind label over the artwork (brand hues, not red), quote-currency icon on price, marketplace-style Filters dialog; dropped the Verified badge / FDV / holders / per-card glow / Trade button |
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var asset_collection_bar_exports = {};
31
+ __export(asset_collection_bar_exports, {
32
+ AssetCollectionBar: () => AssetCollectionBar
33
+ });
34
+ module.exports = __toCommonJS(asset_collection_bar_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_image = __toESM(require("next/image"), 1);
37
+ var import_link = __toESM(require("next/link"), 1);
38
+ var import_lucide_react = require("lucide-react");
39
+ var import_ip_type_badge = require("./ip-type-badge.js");
40
+ var import_share_button = require("./share-button.js");
41
+ var import_ipfs = require("../utils/ipfs.js");
42
+ var import_cn = require("../utils/cn.js");
43
+ function AssetCollectionBar({
44
+ collectionName,
45
+ collectionImage,
46
+ collectionHref,
47
+ ipType,
48
+ contractExplorerHref,
49
+ shareTitle,
50
+ onReportClick,
51
+ currentTokenId,
52
+ siblingTokens,
53
+ onNavigate
54
+ }) {
55
+ const currentIndex = siblingTokens.findIndex((t) => String(t.tokenId) === String(currentTokenId));
56
+ const prevToken = currentIndex > 0 ? siblingTokens[currentIndex - 1] : null;
57
+ const nextToken = currentIndex >= 0 && currentIndex < siblingTokens.length - 1 ? siblingTokens[currentIndex + 1] : null;
58
+ const showFilmstrip = siblingTokens.length > 1;
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-2xl bg-card/40 px-4 py-3 space-y-3", children: [
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: collectionHref, className: "flex items-center gap-3 min-w-0 group", children: [
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-10 w-10 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-primary/20 to-purple-500/20 ring-1 ring-border/60 group-hover:ring-primary/40 transition", children: collectionImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: (0, import_ipfs.ipfsToHttp)(collectionImage), alt: "", fill: true, className: "object-cover", unoptimized: true }) : null }),
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold truncate group-hover:text-primary transition-colors", children: collectionName }),
64
+ ipType ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ip_type_badge.IpTypeBadge, { ipType, size: "sm" }) : null
65
+ ] }),
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1 shrink-0 text-muted-foreground", children: [
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
68
+ "a",
69
+ {
70
+ href: contractExplorerHref,
71
+ target: "_blank",
72
+ rel: "noopener noreferrer",
73
+ title: "View contract",
74
+ className: "inline-flex h-9 w-9 items-center justify-center rounded-lg hover:bg-muted/50 hover:text-foreground transition-colors",
75
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ExternalLink, { className: "h-4 w-4" })
76
+ }
77
+ ),
78
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_share_button.ShareButton, { title: shareTitle, variant: "ghost", size: "icon" }),
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
80
+ "button",
81
+ {
82
+ type: "button",
83
+ title: "Report this asset",
84
+ onClick: onReportClick,
85
+ className: "inline-flex h-9 w-9 items-center justify-center rounded-lg hover:bg-muted/50 hover:text-foreground transition-colors",
86
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Flag, { className: "h-4 w-4" })
87
+ }
88
+ )
89
+ ] })
90
+ ] }),
91
+ showFilmstrip ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1.5", children: [
92
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
+ "button",
94
+ {
95
+ type: "button",
96
+ disabled: !prevToken,
97
+ onClick: () => prevToken && onNavigate(prevToken.tokenId),
98
+ className: "shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition hover:text-foreground active:scale-95 disabled:opacity-30 disabled:pointer-events-none",
99
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronLeft, { className: "h-4 w-4" })
100
+ }
101
+ ),
102
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center gap-2 overflow-x-auto scroll-smooth [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: siblingTokens.map((sibling) => {
103
+ const isCurrent = String(sibling.tokenId) === String(currentTokenId);
104
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
105
+ "button",
106
+ {
107
+ type: "button",
108
+ onClick: () => onNavigate(sibling.tokenId),
109
+ className: (0, import_cn.cn)(
110
+ "relative h-11 w-11 shrink-0 rounded-lg overflow-hidden ring-2 transition",
111
+ isCurrent ? "ring-primary" : "ring-transparent hover:ring-border"
112
+ ),
113
+ children: sibling.image ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: (0, import_ipfs.ipfsToHttp)(sibling.image), alt: "", fill: true, className: "object-cover", unoptimized: true }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-full w-full bg-muted" })
114
+ },
115
+ sibling.tokenId
116
+ );
117
+ }) }),
118
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
119
+ "button",
120
+ {
121
+ type: "button",
122
+ disabled: !nextToken,
123
+ onClick: () => nextToken && onNavigate(nextToken.tokenId),
124
+ className: "shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition hover:text-foreground active:scale-95 disabled:opacity-30 disabled:pointer-events-none",
125
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronRight, { className: "h-4 w-4" })
126
+ }
127
+ )
128
+ ] }) : null
129
+ ] });
130
+ }
131
+ // Annotate the CommonJS export names for ESM import in node:
132
+ 0 && (module.exports = {
133
+ AssetCollectionBar
134
+ });
135
+ //# sourceMappingURL=asset-collection-bar.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/asset-collection-bar.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { ChevronLeft, ChevronRight, ExternalLink, Flag } from \"lucide-react\";\nimport { IpTypeBadge } from \"./ip-type-badge.js\";\nimport { ShareButton } from \"./share-button.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface AssetCollectionBarSibling {\n tokenId: string;\n image: string | null;\n}\n\nexport interface AssetCollectionBarProps {\n collectionName: string;\n collectionImage?: string | null;\n collectionHref: string;\n ipType?: string | null;\n contractExplorerHref: string;\n shareTitle: string;\n onReportClick: () => void;\n currentTokenId: string;\n siblingTokens: AssetCollectionBarSibling[];\n onNavigate: (tokenId: string) => void;\n}\n\n/**\n * Consolidated collection identity bar: avatar+name, IP-type pill, and\n * explorer/share/report utility icons on one row, with a filmstrip of\n * collection siblings on a second row for browsing (replaces plain-text\n * Prev/Next). Soft `bg-card/40` surface, no hard border — matches the\n * aurora-glow design language instead of an OpenSea-style boxed panel.\n */\nexport function AssetCollectionBar({\n collectionName,\n collectionImage,\n collectionHref,\n ipType,\n contractExplorerHref,\n shareTitle,\n onReportClick,\n currentTokenId,\n siblingTokens,\n onNavigate,\n}: AssetCollectionBarProps) {\n const currentIndex = siblingTokens.findIndex((t) => String(t.tokenId) === String(currentTokenId));\n const prevToken = currentIndex > 0 ? siblingTokens[currentIndex - 1] : null;\n const nextToken =\n currentIndex >= 0 && currentIndex < siblingTokens.length - 1 ? siblingTokens[currentIndex + 1] : null;\n const showFilmstrip = siblingTokens.length > 1;\n\n return (\n <div className=\"rounded-2xl bg-card/40 px-4 py-3 space-y-3\">\n <div className=\"flex items-center justify-between gap-3\">\n <Link href={collectionHref} className=\"flex items-center gap-3 min-w-0 group\">\n <div className=\"relative h-10 w-10 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-primary/20 to-purple-500/20 ring-1 ring-border/60 group-hover:ring-primary/40 transition\">\n {collectionImage ? (\n <Image src={ipfsToHttp(collectionImage)} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : null}\n </div>\n <p className=\"text-sm font-semibold truncate group-hover:text-primary transition-colors\">\n {collectionName}\n </p>\n {ipType ? <IpTypeBadge ipType={ipType} size=\"sm\" /> : null}\n </Link>\n\n <div className=\"flex items-center gap-1 shrink-0 text-muted-foreground\">\n <a\n href={contractExplorerHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title=\"View contract\"\n className=\"inline-flex h-9 w-9 items-center justify-center rounded-lg hover:bg-muted/50 hover:text-foreground transition-colors\"\n >\n <ExternalLink className=\"h-4 w-4\" />\n </a>\n <ShareButton title={shareTitle} variant=\"ghost\" size=\"icon\" />\n <button\n type=\"button\"\n title=\"Report this asset\"\n onClick={onReportClick}\n className=\"inline-flex h-9 w-9 items-center justify-center rounded-lg hover:bg-muted/50 hover:text-foreground transition-colors\"\n >\n <Flag className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n\n {showFilmstrip ? (\n <div className=\"flex items-center gap-1.5\">\n <button\n type=\"button\"\n disabled={!prevToken}\n onClick={() => prevToken && onNavigate(prevToken.tokenId)}\n className=\"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition hover:text-foreground active:scale-95 disabled:opacity-30 disabled:pointer-events-none\"\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </button>\n <div className=\"flex items-center gap-2 overflow-x-auto scroll-smooth [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\">\n {siblingTokens.map((sibling) => {\n const isCurrent = String(sibling.tokenId) === String(currentTokenId);\n return (\n <button\n key={sibling.tokenId}\n type=\"button\"\n onClick={() => onNavigate(sibling.tokenId)}\n className={cn(\n \"relative h-11 w-11 shrink-0 rounded-lg overflow-hidden ring-2 transition\",\n isCurrent ? \"ring-primary\" : \"ring-transparent hover:ring-border\"\n )}\n >\n {sibling.image ? (\n <Image src={ipfsToHttp(sibling.image)} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full bg-muted\" />\n )}\n </button>\n );\n })}\n </div>\n <button\n type=\"button\"\n disabled={!nextToken}\n onClick={() => nextToken && onNavigate(nextToken.tokenId)}\n className=\"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition hover:text-foreground active:scale-95 disabled:opacity-30 disabled:pointer-events-none\"\n >\n <ChevronRight className=\"h-4 w-4\" />\n </button>\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwDQ;AAtDR,mBAAkB;AAClB,kBAAiB;AACjB,0BAA8D;AAC9D,2BAA4B;AAC5B,0BAA4B;AAC5B,kBAA2B;AAC3B,gBAAmB;AA2BZ,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA4B;AAC1B,QAAM,eAAe,cAAc,UAAU,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,OAAO,cAAc,CAAC;AAChG,QAAM,YAAY,eAAe,IAAI,cAAc,eAAe,CAAC,IAAI;AACvE,QAAM,YACJ,gBAAgB,KAAK,eAAe,cAAc,SAAS,IAAI,cAAc,eAAe,CAAC,IAAI;AACnG,QAAM,gBAAgB,cAAc,SAAS;AAE7C,SACE,6CAAC,SAAI,WAAU,8CACb;AAAA,iDAAC,SAAI,WAAU,2CACb;AAAA,mDAAC,YAAAA,SAAA,EAAK,MAAM,gBAAgB,WAAU,yCACpC;AAAA,oDAAC,SAAI,WAAU,0KACZ,4BACC,4CAAC,aAAAC,SAAA,EAAM,SAAK,wBAAW,eAAe,GAAG,KAAI,IAAG,MAAI,MAAC,WAAU,gBAAe,aAAW,MAAC,IACxF,MACN;AAAA,QACA,4CAAC,OAAE,WAAU,6EACV,0BACH;AAAA,QACC,SAAS,4CAAC,oCAAY,QAAgB,MAAK,MAAK,IAAK;AAAA,SACxD;AAAA,MAEA,6CAAC,SAAI,WAAU,0DACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,QAAO;AAAA,YACP,KAAI;AAAA,YACJ,OAAM;AAAA,YACN,WAAU;AAAA,YAEV,sDAAC,oCAAa,WAAU,WAAU;AAAA;AAAA,QACpC;AAAA,QACA,4CAAC,mCAAY,OAAO,YAAY,SAAQ,SAAQ,MAAK,QAAO;AAAA,QAC5D;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAM;AAAA,YACN,SAAS;AAAA,YACT,WAAU;AAAA,YAEV,sDAAC,4BAAK,WAAU,WAAU;AAAA;AAAA,QAC5B;AAAA,SACF;AAAA,OACF;AAAA,IAEC,gBACC,6CAAC,SAAI,WAAU,6BACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAU,CAAC;AAAA,UACX,SAAS,MAAM,aAAa,WAAW,UAAU,OAAO;AAAA,UACxD,WAAU;AAAA,UAEV,sDAAC,mCAAY,WAAU,WAAU;AAAA;AAAA,MACnC;AAAA,MACA,4CAAC,SAAI,WAAU,8GACZ,wBAAc,IAAI,CAAC,YAAY;AAC9B,cAAM,YAAY,OAAO,QAAQ,OAAO,MAAM,OAAO,cAAc;AACnE,eACE;AAAA,UAAC;AAAA;AAAA,YAEC,MAAK;AAAA,YACL,SAAS,MAAM,WAAW,QAAQ,OAAO;AAAA,YACzC,eAAW;AAAA,cACT;AAAA,cACA,YAAY,iBAAiB;AAAA,YAC/B;AAAA,YAEC,kBAAQ,QACP,4CAAC,aAAAA,SAAA,EAAM,SAAK,wBAAW,QAAQ,KAAK,GAAG,KAAI,IAAG,MAAI,MAAC,WAAU,gBAAe,aAAW,MAAC,IAExF,4CAAC,SAAI,WAAU,0BAAyB;AAAA;AAAA,UAXrC,QAAQ;AAAA,QAaf;AAAA,MAEJ,CAAC,GACH;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAU,CAAC;AAAA,UACX,SAAS,MAAM,aAAa,WAAW,UAAU,OAAO;AAAA,UACxD,WAAU;AAAA,UAEV,sDAAC,oCAAa,WAAU,WAAU;AAAA;AAAA,MACpC;AAAA,OACF,IACE;AAAA,KACN;AAEJ;","names":["Link","Image"]}
@@ -0,0 +1,28 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface AssetCollectionBarSibling {
4
+ tokenId: string;
5
+ image: string | null;
6
+ }
7
+ interface AssetCollectionBarProps {
8
+ collectionName: string;
9
+ collectionImage?: string | null;
10
+ collectionHref: string;
11
+ ipType?: string | null;
12
+ contractExplorerHref: string;
13
+ shareTitle: string;
14
+ onReportClick: () => void;
15
+ currentTokenId: string;
16
+ siblingTokens: AssetCollectionBarSibling[];
17
+ onNavigate: (tokenId: string) => void;
18
+ }
19
+ /**
20
+ * Consolidated collection identity bar: avatar+name, IP-type pill, and
21
+ * explorer/share/report utility icons on one row, with a filmstrip of
22
+ * collection siblings on a second row for browsing (replaces plain-text
23
+ * Prev/Next). Soft `bg-card/40` surface, no hard border — matches the
24
+ * aurora-glow design language instead of an OpenSea-style boxed panel.
25
+ */
26
+ declare function AssetCollectionBar({ collectionName, collectionImage, collectionHref, ipType, contractExplorerHref, shareTitle, onReportClick, currentTokenId, siblingTokens, onNavigate, }: AssetCollectionBarProps): react_jsx_runtime.JSX.Element;
27
+
28
+ export { AssetCollectionBar, type AssetCollectionBarProps, type AssetCollectionBarSibling };
@@ -0,0 +1,28 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface AssetCollectionBarSibling {
4
+ tokenId: string;
5
+ image: string | null;
6
+ }
7
+ interface AssetCollectionBarProps {
8
+ collectionName: string;
9
+ collectionImage?: string | null;
10
+ collectionHref: string;
11
+ ipType?: string | null;
12
+ contractExplorerHref: string;
13
+ shareTitle: string;
14
+ onReportClick: () => void;
15
+ currentTokenId: string;
16
+ siblingTokens: AssetCollectionBarSibling[];
17
+ onNavigate: (tokenId: string) => void;
18
+ }
19
+ /**
20
+ * Consolidated collection identity bar: avatar+name, IP-type pill, and
21
+ * explorer/share/report utility icons on one row, with a filmstrip of
22
+ * collection siblings on a second row for browsing (replaces plain-text
23
+ * Prev/Next). Soft `bg-card/40` surface, no hard border — matches the
24
+ * aurora-glow design language instead of an OpenSea-style boxed panel.
25
+ */
26
+ declare function AssetCollectionBar({ collectionName, collectionImage, collectionHref, ipType, contractExplorerHref, shareTitle, onReportClick, currentTokenId, siblingTokens, onNavigate, }: AssetCollectionBarProps): react_jsx_runtime.JSX.Element;
27
+
28
+ export { AssetCollectionBar, type AssetCollectionBarProps, type AssetCollectionBarSibling };
@@ -0,0 +1,101 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import Image from "next/image";
4
+ import Link from "next/link";
5
+ import { ChevronLeft, ChevronRight, ExternalLink, Flag } from "lucide-react";
6
+ import { IpTypeBadge } from "./ip-type-badge.js";
7
+ import { ShareButton } from "./share-button.js";
8
+ import { ipfsToHttp } from "../utils/ipfs.js";
9
+ import { cn } from "../utils/cn.js";
10
+ function AssetCollectionBar({
11
+ collectionName,
12
+ collectionImage,
13
+ collectionHref,
14
+ ipType,
15
+ contractExplorerHref,
16
+ shareTitle,
17
+ onReportClick,
18
+ currentTokenId,
19
+ siblingTokens,
20
+ onNavigate
21
+ }) {
22
+ const currentIndex = siblingTokens.findIndex((t) => String(t.tokenId) === String(currentTokenId));
23
+ const prevToken = currentIndex > 0 ? siblingTokens[currentIndex - 1] : null;
24
+ const nextToken = currentIndex >= 0 && currentIndex < siblingTokens.length - 1 ? siblingTokens[currentIndex + 1] : null;
25
+ const showFilmstrip = siblingTokens.length > 1;
26
+ return /* @__PURE__ */ jsxs("div", { className: "rounded-2xl bg-card/40 px-4 py-3 space-y-3", children: [
27
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
28
+ /* @__PURE__ */ jsxs(Link, { href: collectionHref, className: "flex items-center gap-3 min-w-0 group", children: [
29
+ /* @__PURE__ */ jsx("div", { className: "relative h-10 w-10 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-primary/20 to-purple-500/20 ring-1 ring-border/60 group-hover:ring-primary/40 transition", children: collectionImage ? /* @__PURE__ */ jsx(Image, { src: ipfsToHttp(collectionImage), alt: "", fill: true, className: "object-cover", unoptimized: true }) : null }),
30
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold truncate group-hover:text-primary transition-colors", children: collectionName }),
31
+ ipType ? /* @__PURE__ */ jsx(IpTypeBadge, { ipType, size: "sm" }) : null
32
+ ] }),
33
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 shrink-0 text-muted-foreground", children: [
34
+ /* @__PURE__ */ jsx(
35
+ "a",
36
+ {
37
+ href: contractExplorerHref,
38
+ target: "_blank",
39
+ rel: "noopener noreferrer",
40
+ title: "View contract",
41
+ className: "inline-flex h-9 w-9 items-center justify-center rounded-lg hover:bg-muted/50 hover:text-foreground transition-colors",
42
+ children: /* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4" })
43
+ }
44
+ ),
45
+ /* @__PURE__ */ jsx(ShareButton, { title: shareTitle, variant: "ghost", size: "icon" }),
46
+ /* @__PURE__ */ jsx(
47
+ "button",
48
+ {
49
+ type: "button",
50
+ title: "Report this asset",
51
+ onClick: onReportClick,
52
+ className: "inline-flex h-9 w-9 items-center justify-center rounded-lg hover:bg-muted/50 hover:text-foreground transition-colors",
53
+ children: /* @__PURE__ */ jsx(Flag, { className: "h-4 w-4" })
54
+ }
55
+ )
56
+ ] })
57
+ ] }),
58
+ showFilmstrip ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
59
+ /* @__PURE__ */ jsx(
60
+ "button",
61
+ {
62
+ type: "button",
63
+ disabled: !prevToken,
64
+ onClick: () => prevToken && onNavigate(prevToken.tokenId),
65
+ className: "shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition hover:text-foreground active:scale-95 disabled:opacity-30 disabled:pointer-events-none",
66
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
67
+ }
68
+ ),
69
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 overflow-x-auto scroll-smooth [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: siblingTokens.map((sibling) => {
70
+ const isCurrent = String(sibling.tokenId) === String(currentTokenId);
71
+ return /* @__PURE__ */ jsx(
72
+ "button",
73
+ {
74
+ type: "button",
75
+ onClick: () => onNavigate(sibling.tokenId),
76
+ className: cn(
77
+ "relative h-11 w-11 shrink-0 rounded-lg overflow-hidden ring-2 transition",
78
+ isCurrent ? "ring-primary" : "ring-transparent hover:ring-border"
79
+ ),
80
+ children: sibling.image ? /* @__PURE__ */ jsx(Image, { src: ipfsToHttp(sibling.image), alt: "", fill: true, className: "object-cover", unoptimized: true }) : /* @__PURE__ */ jsx("div", { className: "h-full w-full bg-muted" })
81
+ },
82
+ sibling.tokenId
83
+ );
84
+ }) }),
85
+ /* @__PURE__ */ jsx(
86
+ "button",
87
+ {
88
+ type: "button",
89
+ disabled: !nextToken,
90
+ onClick: () => nextToken && onNavigate(nextToken.tokenId),
91
+ className: "shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition hover:text-foreground active:scale-95 disabled:opacity-30 disabled:pointer-events-none",
92
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
93
+ }
94
+ )
95
+ ] }) : null
96
+ ] });
97
+ }
98
+ export {
99
+ AssetCollectionBar
100
+ };
101
+ //# sourceMappingURL=asset-collection-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/asset-collection-bar.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { ChevronLeft, ChevronRight, ExternalLink, Flag } from \"lucide-react\";\nimport { IpTypeBadge } from \"./ip-type-badge.js\";\nimport { ShareButton } from \"./share-button.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface AssetCollectionBarSibling {\n tokenId: string;\n image: string | null;\n}\n\nexport interface AssetCollectionBarProps {\n collectionName: string;\n collectionImage?: string | null;\n collectionHref: string;\n ipType?: string | null;\n contractExplorerHref: string;\n shareTitle: string;\n onReportClick: () => void;\n currentTokenId: string;\n siblingTokens: AssetCollectionBarSibling[];\n onNavigate: (tokenId: string) => void;\n}\n\n/**\n * Consolidated collection identity bar: avatar+name, IP-type pill, and\n * explorer/share/report utility icons on one row, with a filmstrip of\n * collection siblings on a second row for browsing (replaces plain-text\n * Prev/Next). Soft `bg-card/40` surface, no hard border — matches the\n * aurora-glow design language instead of an OpenSea-style boxed panel.\n */\nexport function AssetCollectionBar({\n collectionName,\n collectionImage,\n collectionHref,\n ipType,\n contractExplorerHref,\n shareTitle,\n onReportClick,\n currentTokenId,\n siblingTokens,\n onNavigate,\n}: AssetCollectionBarProps) {\n const currentIndex = siblingTokens.findIndex((t) => String(t.tokenId) === String(currentTokenId));\n const prevToken = currentIndex > 0 ? siblingTokens[currentIndex - 1] : null;\n const nextToken =\n currentIndex >= 0 && currentIndex < siblingTokens.length - 1 ? siblingTokens[currentIndex + 1] : null;\n const showFilmstrip = siblingTokens.length > 1;\n\n return (\n <div className=\"rounded-2xl bg-card/40 px-4 py-3 space-y-3\">\n <div className=\"flex items-center justify-between gap-3\">\n <Link href={collectionHref} className=\"flex items-center gap-3 min-w-0 group\">\n <div className=\"relative h-10 w-10 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-primary/20 to-purple-500/20 ring-1 ring-border/60 group-hover:ring-primary/40 transition\">\n {collectionImage ? (\n <Image src={ipfsToHttp(collectionImage)} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : null}\n </div>\n <p className=\"text-sm font-semibold truncate group-hover:text-primary transition-colors\">\n {collectionName}\n </p>\n {ipType ? <IpTypeBadge ipType={ipType} size=\"sm\" /> : null}\n </Link>\n\n <div className=\"flex items-center gap-1 shrink-0 text-muted-foreground\">\n <a\n href={contractExplorerHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title=\"View contract\"\n className=\"inline-flex h-9 w-9 items-center justify-center rounded-lg hover:bg-muted/50 hover:text-foreground transition-colors\"\n >\n <ExternalLink className=\"h-4 w-4\" />\n </a>\n <ShareButton title={shareTitle} variant=\"ghost\" size=\"icon\" />\n <button\n type=\"button\"\n title=\"Report this asset\"\n onClick={onReportClick}\n className=\"inline-flex h-9 w-9 items-center justify-center rounded-lg hover:bg-muted/50 hover:text-foreground transition-colors\"\n >\n <Flag className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n\n {showFilmstrip ? (\n <div className=\"flex items-center gap-1.5\">\n <button\n type=\"button\"\n disabled={!prevToken}\n onClick={() => prevToken && onNavigate(prevToken.tokenId)}\n className=\"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition hover:text-foreground active:scale-95 disabled:opacity-30 disabled:pointer-events-none\"\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </button>\n <div className=\"flex items-center gap-2 overflow-x-auto scroll-smooth [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\">\n {siblingTokens.map((sibling) => {\n const isCurrent = String(sibling.tokenId) === String(currentTokenId);\n return (\n <button\n key={sibling.tokenId}\n type=\"button\"\n onClick={() => onNavigate(sibling.tokenId)}\n className={cn(\n \"relative h-11 w-11 shrink-0 rounded-lg overflow-hidden ring-2 transition\",\n isCurrent ? \"ring-primary\" : \"ring-transparent hover:ring-border\"\n )}\n >\n {sibling.image ? (\n <Image src={ipfsToHttp(sibling.image)} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full bg-muted\" />\n )}\n </button>\n );\n })}\n </div>\n <button\n type=\"button\"\n disabled={!nextToken}\n onClick={() => nextToken && onNavigate(nextToken.tokenId)}\n className=\"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition hover:text-foreground active:scale-95 disabled:opacity-30 disabled:pointer-events-none\"\n >\n <ChevronRight className=\"h-4 w-4\" />\n </button>\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":";AAwDQ,SAGM,KAHN;AAtDR,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,aAAa,cAAc,cAAc,YAAY;AAC9D,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AA2BZ,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA4B;AAC1B,QAAM,eAAe,cAAc,UAAU,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,OAAO,cAAc,CAAC;AAChG,QAAM,YAAY,eAAe,IAAI,cAAc,eAAe,CAAC,IAAI;AACvE,QAAM,YACJ,gBAAgB,KAAK,eAAe,cAAc,SAAS,IAAI,cAAc,eAAe,CAAC,IAAI;AACnG,QAAM,gBAAgB,cAAc,SAAS;AAE7C,SACE,qBAAC,SAAI,WAAU,8CACb;AAAA,yBAAC,SAAI,WAAU,2CACb;AAAA,2BAAC,QAAK,MAAM,gBAAgB,WAAU,yCACpC;AAAA,4BAAC,SAAI,WAAU,0KACZ,4BACC,oBAAC,SAAM,KAAK,WAAW,eAAe,GAAG,KAAI,IAAG,MAAI,MAAC,WAAU,gBAAe,aAAW,MAAC,IACxF,MACN;AAAA,QACA,oBAAC,OAAE,WAAU,6EACV,0BACH;AAAA,QACC,SAAS,oBAAC,eAAY,QAAgB,MAAK,MAAK,IAAK;AAAA,SACxD;AAAA,MAEA,qBAAC,SAAI,WAAU,0DACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,QAAO;AAAA,YACP,KAAI;AAAA,YACJ,OAAM;AAAA,YACN,WAAU;AAAA,YAEV,8BAAC,gBAAa,WAAU,WAAU;AAAA;AAAA,QACpC;AAAA,QACA,oBAAC,eAAY,OAAO,YAAY,SAAQ,SAAQ,MAAK,QAAO;AAAA,QAC5D;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAM;AAAA,YACN,SAAS;AAAA,YACT,WAAU;AAAA,YAEV,8BAAC,QAAK,WAAU,WAAU;AAAA;AAAA,QAC5B;AAAA,SACF;AAAA,OACF;AAAA,IAEC,gBACC,qBAAC,SAAI,WAAU,6BACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAU,CAAC;AAAA,UACX,SAAS,MAAM,aAAa,WAAW,UAAU,OAAO;AAAA,UACxD,WAAU;AAAA,UAEV,8BAAC,eAAY,WAAU,WAAU;AAAA;AAAA,MACnC;AAAA,MACA,oBAAC,SAAI,WAAU,8GACZ,wBAAc,IAAI,CAAC,YAAY;AAC9B,cAAM,YAAY,OAAO,QAAQ,OAAO,MAAM,OAAO,cAAc;AACnE,eACE;AAAA,UAAC;AAAA;AAAA,YAEC,MAAK;AAAA,YACL,SAAS,MAAM,WAAW,QAAQ,OAAO;AAAA,YACzC,WAAW;AAAA,cACT;AAAA,cACA,YAAY,iBAAiB;AAAA,YAC/B;AAAA,YAEC,kBAAQ,QACP,oBAAC,SAAM,KAAK,WAAW,QAAQ,KAAK,GAAG,KAAI,IAAG,MAAI,MAAC,WAAU,gBAAe,aAAW,MAAC,IAExF,oBAAC,SAAI,WAAU,0BAAyB;AAAA;AAAA,UAXrC,QAAQ;AAAA,QAaf;AAAA,MAEJ,CAAC,GACH;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAU,CAAC;AAAA,UACX,SAAS,MAAM,aAAa,WAAW,UAAU,OAAO;AAAA,UACxD,WAAU;AAAA,UAEV,8BAAC,gBAAa,WAAU,WAAU;AAAA;AAAA,MACpC;AAAA,OACF,IACE;AAAA,KACN;AAEJ;","names":[]}
@@ -0,0 +1,284 @@
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_marketplace_panel_exports = {};
21
+ __export(asset_marketplace_panel_exports, {
22
+ AssetMarketplacePanel: () => AssetMarketplacePanel
23
+ });
24
+ module.exports = __toCommonJS(asset_marketplace_panel_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_lucide_react = require("lucide-react");
27
+ var import_currency_icon = require("./currency-icon.js");
28
+ var import_address_display = require("./address-display.js");
29
+ var import_format = require("../utils/format.js");
30
+ var import_time = require("../utils/time.js");
31
+ const actionToneClass = {
32
+ blue: "bg-brand-blue",
33
+ orange: "bg-brand-orange",
34
+ purple: "bg-brand-purple",
35
+ destructive: "bg-destructive",
36
+ transparent: "bg-transparent"
37
+ };
38
+ function ActionButton({ label, icon, onClick, tone, disabled = false, helpContent, renderHelp }) {
39
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `btn-border-animated p-[1px] rounded-2xl ${disabled ? "opacity-40 pointer-events-none" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
40
+ "button",
41
+ {
42
+ className: `w-full h-10 rounded-[15px] flex items-center justify-center gap-2 px-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] disabled:opacity-50 ${actionToneClass[tone]}`,
43
+ disabled,
44
+ onClick,
45
+ children: [
46
+ icon,
47
+ label,
48
+ helpContent ? renderHelp(helpContent) : null
49
+ ]
50
+ }
51
+ ) });
52
+ }
53
+ function StatRow({ floorPriceRaw, lastSaleRaw }) {
54
+ if (!floorPriceRaw && !lastSaleRaw) return null;
55
+ const floor = floorPriceRaw ? (0, import_format.parsePriceDisplay)(floorPriceRaw) : null;
56
+ const lastSale = lastSaleRaw ? (0, import_format.parsePriceDisplay)(lastSaleRaw) : null;
57
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-4 text-xs text-muted-foreground", children: [
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex items-center gap-1.5", children: [
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "uppercase tracking-wider font-semibold", children: "Floor" }),
60
+ floor && floor.symbol ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyAmount, { amount: floor.numStr, symbol: floor.symbol, iconSize: 12, amountClassName: "text-foreground font-semibold" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-foreground font-semibold", children: "\u2014" })
61
+ ] }),
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex items-center gap-1.5", children: [
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "uppercase tracking-wider font-semibold", children: "Last sale" }),
64
+ lastSale && lastSale.symbol ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyAmount, { amount: lastSale.numStr, symbol: lastSale.symbol, iconSize: 12, amountClassName: "text-foreground font-semibold" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-foreground font-semibold", children: "\u2014" })
65
+ ] })
66
+ ] });
67
+ }
68
+ function AssetMarketplacePanel({
69
+ cheapest,
70
+ isOwner,
71
+ isSignedIn,
72
+ isProcessing,
73
+ isERC1155,
74
+ isMarketLoading = false,
75
+ myListing,
76
+ activeBids,
77
+ walletAddress,
78
+ remixEnabled = false,
79
+ showDealOption = false,
80
+ floorPriceRaw,
81
+ lastSaleRaw,
82
+ renderAuthAction,
83
+ renderHelp,
84
+ onCancelClick,
85
+ onAcceptBid,
86
+ onOpenListing,
87
+ onOpenTransfer,
88
+ onOpenPurchase,
89
+ onOpenOffer,
90
+ onOpenRemix,
91
+ onProposeDeal
92
+ }) {
93
+ const myBid = !isOwner && walletAddress ? activeBids.find((bid) => bid.offerer.toLowerCase() === walletAddress.toLowerCase()) ?? null : null;
94
+ const canBuyMore = isERC1155 && isOwner && !!cheapest && !!walletAddress && cheapest.offerer.toLowerCase() !== walletAddress.toLowerCase();
95
+ if (isMarketLoading && !cheapest) {
96
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-4", children: [
97
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-9 w-32 rounded-md bg-muted animate-pulse" }),
98
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-12 w-full rounded-2xl bg-muted animate-pulse" })
99
+ ] });
100
+ }
101
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
102
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
103
+ "div",
104
+ {
105
+ "aria-hidden": true,
106
+ className: "aurora-purple pointer-events-none",
107
+ style: { position: "absolute", width: 280, height: 280, top: -60, left: "20%" }
108
+ }
109
+ ),
110
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative space-y-4", children: [
111
+ cheapest ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-4", children: [
112
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-baseline gap-2", children: [
113
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: cheapest.price.currency ?? "", size: 26 }),
114
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-4xl font-bold tracking-tight", children: (0, import_format.formatDisplayPrice)(cheapest.price.formatted) }),
115
+ renderHelp(
116
+ `${isOwner && !canBuyMore ? "Your listing" : "Current price"} \xB7 Expires ${(0, import_time.timeUntil)(cheapest.endTime)}`
117
+ )
118
+ ] }),
119
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatRow, { floorPriceRaw, lastSaleRaw }),
120
+ isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
121
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
122
+ myListing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
123
+ ActionButton,
124
+ {
125
+ label: "Cancel",
126
+ icon: isProcessing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-4 w-4" }),
127
+ onClick: () => onCancelClick(myListing),
128
+ disabled: isProcessing,
129
+ tone: "destructive",
130
+ renderHelp
131
+ }
132
+ ) : null,
133
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "List", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4" }), onClick: onOpenListing, tone: "blue", renderHelp }),
134
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Transfer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, tone: "orange", renderHelp }),
135
+ remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
136
+ ActionButton,
137
+ {
138
+ label: "Remix",
139
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
140
+ onClick: onOpenRemix,
141
+ helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
142
+ tone: "purple",
143
+ renderHelp
144
+ }
145
+ ) : null
146
+ ] }),
147
+ canBuyMore && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
148
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "border-t border-border/40 pt-2 mt-1" }),
149
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
150
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Buy", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), tone: "transparent", renderHelp }),
151
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp })
152
+ ] })
153
+ ] })
154
+ ] }) : isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
155
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
156
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Buy", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), tone: "transparent", renderHelp }),
157
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp }),
158
+ remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
159
+ ActionButton,
160
+ {
161
+ label: "Remix",
162
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
163
+ onClick: onOpenRemix,
164
+ helpContent: "Create your own attributed derivative of this work.",
165
+ tone: "purple",
166
+ renderHelp
167
+ }
168
+ ) : null,
169
+ showDealOption && onProposeDeal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
170
+ ActionButton,
171
+ {
172
+ label: "License",
173
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }),
174
+ onClick: onProposeDeal,
175
+ helpContent: "Propose a license deal to the creator to use this work.",
176
+ tone: "blue",
177
+ renderHelp
178
+ }
179
+ ) : null
180
+ ] }),
181
+ !remixEnabled && !showDealOption ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground mt-2 leading-relaxed", children: "The creator marked this asset as no-derivatives." }) : null
182
+ ] }) : renderAuthAction("Sign in to trade")
183
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
184
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatRow, { floorPriceRaw, lastSaleRaw }),
185
+ isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
186
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "List", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4" }), onClick: onOpenListing, tone: "transparent", renderHelp }),
187
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Transfer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, tone: "orange", renderHelp }),
188
+ remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
189
+ ActionButton,
190
+ {
191
+ label: "Remix",
192
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
193
+ onClick: onOpenRemix,
194
+ helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
195
+ tone: "purple",
196
+ renderHelp
197
+ }
198
+ ) : null
199
+ ] }) : isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
200
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp }),
201
+ remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
202
+ ActionButton,
203
+ {
204
+ label: "Remix",
205
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
206
+ onClick: onOpenRemix,
207
+ helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
208
+ tone: "purple",
209
+ renderHelp
210
+ }
211
+ ) : null
212
+ ] }) : renderAuthAction("Sign in to make an offer")
213
+ ] }),
214
+ myBid ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl bg-amber-500/8 px-4 py-3 flex items-center justify-between gap-3", children: [
215
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex items-center gap-2.5", children: [
216
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4 text-amber-500 shrink-0" }),
217
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
218
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-semibold text-amber-500", children: "Your active offer" }),
219
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs text-muted-foreground flex items-center gap-1.5 mt-0.5", children: [
220
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "font-bold text-foreground inline-flex items-center gap-1", children: [
221
+ (0, import_format.formatDisplayPrice)(myBid.price.formatted),
222
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: myBid.price.currency ?? "", size: 12 })
223
+ ] }),
224
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\xB7" }),
225
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Clock, { className: "h-3 w-3" }),
226
+ (0, import_time.timeUntil)(myBid.endTime)
227
+ ] })
228
+ ] })
229
+ ] }),
230
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
231
+ "button",
232
+ {
233
+ className: "shrink-0 text-xs font-semibold text-red-400 hover:text-red-300 transition-colors flex items-center gap-1",
234
+ onClick: () => onCancelClick(myBid),
235
+ children: [
236
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-3.5 w-3.5" }),
237
+ "Cancel"
238
+ ]
239
+ }
240
+ )
241
+ ] }) : null,
242
+ isOwner && activeBids.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl bg-card/40 p-5 space-y-3", children: [
243
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: [
244
+ "Incoming offers (",
245
+ activeBids.length,
246
+ ")"
247
+ ] }),
248
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-2", children: activeBids.map((bid) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-3 rounded-lg bg-muted/30 px-3 py-2", children: [
249
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
250
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-bold", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
251
+ (0, import_format.formatDisplayPrice)(bid.price.formatted),
252
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: bid.price.currency ?? "", size: 14 })
253
+ ] }) }),
254
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [
255
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_address_display.AddressDisplay, { address: bid.offerer, chars: 4, showCopy: false, className: "text-xs text-muted-foreground" }),
256
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs text-muted-foreground", children: "\xB7" }),
257
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
258
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Clock, { className: "h-3 w-3" }),
259
+ (0, import_time.timeUntil)(bid.endTime)
260
+ ] })
261
+ ] })
262
+ ] }),
263
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
264
+ "button",
265
+ {
266
+ disabled: isProcessing,
267
+ onClick: () => onAcceptBid(bid),
268
+ className: "inline-flex items-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-semibold text-primary-foreground disabled:opacity-50",
269
+ children: [
270
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle, { className: "h-3.5 w-3.5" }),
271
+ "Accept"
272
+ ]
273
+ }
274
+ )
275
+ ] }, bid.orderHash)) })
276
+ ] }) : null
277
+ ] })
278
+ ] });
279
+ }
280
+ // Annotate the CommonJS export names for ESM import in node:
281
+ 0 && (module.exports = {
282
+ AssetMarketplacePanel
283
+ });
284
+ //# sourceMappingURL=asset-marketplace-panel.cjs.map