@medialane/ui 0.1.6 → 0.2.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 (37) hide show
  1. package/dist/components/collection-card.cjs +124 -0
  2. package/dist/components/collection-card.cjs.map +1 -0
  3. package/dist/components/collection-card.d.cts +13 -0
  4. package/dist/components/collection-card.d.ts +13 -0
  5. package/dist/components/collection-card.js +89 -0
  6. package/dist/components/collection-card.js.map +1 -0
  7. package/dist/components/motion-primitives.cjs +126 -0
  8. package/dist/components/motion-primitives.cjs.map +1 -0
  9. package/dist/components/motion-primitives.d.cts +36 -0
  10. package/dist/components/motion-primitives.d.ts +36 -0
  11. package/dist/components/motion-primitives.js +96 -0
  12. package/dist/components/motion-primitives.js.map +1 -0
  13. package/dist/components/scroll-section.cjs +72 -0
  14. package/dist/components/scroll-section.cjs.map +1 -0
  15. package/dist/components/scroll-section.d.cts +18 -0
  16. package/dist/components/scroll-section.d.ts +18 -0
  17. package/dist/components/scroll-section.js +38 -0
  18. package/dist/components/scroll-section.js.map +1 -0
  19. package/dist/components/share-button.cjs +86 -0
  20. package/dist/components/share-button.cjs.map +1 -0
  21. package/dist/components/share-button.d.cts +12 -0
  22. package/dist/components/share-button.d.ts +12 -0
  23. package/dist/components/share-button.js +62 -0
  24. package/dist/components/share-button.js.map +1 -0
  25. package/dist/components/token-card.cjs +281 -0
  26. package/dist/components/token-card.cjs.map +1 -0
  27. package/dist/components/token-card.d.cts +31 -0
  28. package/dist/components/token-card.d.ts +31 -0
  29. package/dist/components/token-card.js +256 -0
  30. package/dist/components/token-card.js.map +1 -0
  31. package/dist/index.cjs +31 -0
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +7 -0
  34. package/dist/index.d.ts +7 -0
  35. package/dist/index.js +18 -0
  36. package/dist/index.js.map +1 -1
  37. package/package.json +15 -9
@@ -0,0 +1,72 @@
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 scroll_section_exports = {};
31
+ __export(scroll_section_exports, {
32
+ ScrollSection: () => ScrollSection
33
+ });
34
+ module.exports = __toCommonJS(scroll_section_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_link = __toESM(require("next/link"), 1);
37
+ var import_lucide_react = require("lucide-react");
38
+ function ScrollSection({
39
+ icon,
40
+ iconBg,
41
+ title,
42
+ href,
43
+ linkLabel = "See all",
44
+ children
45
+ }) {
46
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "space-y-4", children: [
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2.5", children: [
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `h-7 w-7 rounded-lg flex items-center justify-center ${iconBg}`, children: icon }),
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-lg sm:text-xl font-semibold", children: title })
51
+ ] }),
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
53
+ import_link.default,
54
+ {
55
+ href,
56
+ className: "inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors",
57
+ children: [
58
+ linkLabel,
59
+ " ",
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3.5 w-3.5" })
61
+ ]
62
+ }
63
+ )
64
+ ] }),
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full overflow-x-auto scrollbar-hide", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex gap-4 snap-x snap-mandatory pb-2", style: { width: "max-content" }, children }) })
66
+ ] });
67
+ }
68
+ // Annotate the CommonJS export names for ESM import in node:
69
+ 0 && (module.exports = {
70
+ ScrollSection
71
+ });
72
+ //# sourceMappingURL=scroll-section.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/scroll-section.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { ArrowRight } from \"lucide-react\";\n\nexport interface ScrollSectionProps {\n /** Icon element rendered inside the colored badge */\n icon: React.ReactNode;\n /** Tailwind classes for the icon badge (background + shadow) */\n iconBg: string;\n title: string;\n /** \"See all\" link destination */\n href: string;\n /** Button label — defaults to \"See all\" */\n linkLabel?: string;\n /** Scroll items: wrap each in a sized snap-start div */\n children: React.ReactNode;\n}\n\nexport function ScrollSection({\n icon,\n iconBg,\n title,\n href,\n linkLabel = \"See all\",\n children,\n}: ScrollSectionProps) {\n return (\n <section className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2.5\">\n <div className={`h-7 w-7 rounded-lg flex items-center justify-center ${iconBg}`}>\n {icon}\n </div>\n <h2 className=\"text-lg sm:text-xl font-semibold\">{title}</h2>\n </div>\n <Link\n href={href}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n {linkLabel} <ArrowRight className=\"h-3.5 w-3.5\" />\n </Link>\n </div>\n\n <div className=\"w-full overflow-x-auto scrollbar-hide\">\n <div className=\"flex gap-4 snap-x snap-mandatory pb-2\" style={{ width: \"max-content\" }}>\n {children}\n </div>\n </div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BQ;AA5BR,kBAAiB;AACjB,0BAA2B;AAgBpB,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ;AACF,GAAuB;AACrB,SACE,6CAAC,aAAQ,WAAU,aACjB;AAAA,iDAAC,SAAI,WAAU,qCACb;AAAA,mDAAC,SAAI,WAAU,6BACb;AAAA,oDAAC,SAAI,WAAW,uDAAuD,MAAM,IAC1E,gBACH;AAAA,QACA,4CAAC,QAAG,WAAU,oCAAoC,iBAAM;AAAA,SAC1D;AAAA,MACA;AAAA,QAAC,YAAAA;AAAA,QAAA;AAAA,UACC;AAAA,UACA,WAAU;AAAA,UAET;AAAA;AAAA,YAAU;AAAA,YAAC,4CAAC,kCAAW,WAAU,eAAc;AAAA;AAAA;AAAA,MAClD;AAAA,OACF;AAAA,IAEA,4CAAC,SAAI,WAAU,yCACb,sDAAC,SAAI,WAAU,yCAAwC,OAAO,EAAE,OAAO,cAAc,GAClF,UACH,GACF;AAAA,KACF;AAEJ;","names":["Link"]}
@@ -0,0 +1,18 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface ScrollSectionProps {
4
+ /** Icon element rendered inside the colored badge */
5
+ icon: React.ReactNode;
6
+ /** Tailwind classes for the icon badge (background + shadow) */
7
+ iconBg: string;
8
+ title: string;
9
+ /** "See all" link destination */
10
+ href: string;
11
+ /** Button label — defaults to "See all" */
12
+ linkLabel?: string;
13
+ /** Scroll items: wrap each in a sized snap-start div */
14
+ children: React.ReactNode;
15
+ }
16
+ declare function ScrollSection({ icon, iconBg, title, href, linkLabel, children, }: ScrollSectionProps): react_jsx_runtime.JSX.Element;
17
+
18
+ export { ScrollSection, type ScrollSectionProps };
@@ -0,0 +1,18 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface ScrollSectionProps {
4
+ /** Icon element rendered inside the colored badge */
5
+ icon: React.ReactNode;
6
+ /** Tailwind classes for the icon badge (background + shadow) */
7
+ iconBg: string;
8
+ title: string;
9
+ /** "See all" link destination */
10
+ href: string;
11
+ /** Button label — defaults to "See all" */
12
+ linkLabel?: string;
13
+ /** Scroll items: wrap each in a sized snap-start div */
14
+ children: React.ReactNode;
15
+ }
16
+ declare function ScrollSection({ icon, iconBg, title, href, linkLabel, children, }: ScrollSectionProps): react_jsx_runtime.JSX.Element;
17
+
18
+ export { ScrollSection, type ScrollSectionProps };
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import Link from "next/link";
4
+ import { ArrowRight } from "lucide-react";
5
+ function ScrollSection({
6
+ icon,
7
+ iconBg,
8
+ title,
9
+ href,
10
+ linkLabel = "See all",
11
+ children
12
+ }) {
13
+ return /* @__PURE__ */ jsxs("section", { className: "space-y-4", children: [
14
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
15
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
16
+ /* @__PURE__ */ jsx("div", { className: `h-7 w-7 rounded-lg flex items-center justify-center ${iconBg}`, children: icon }),
17
+ /* @__PURE__ */ jsx("h2", { className: "text-lg sm:text-xl font-semibold", children: title })
18
+ ] }),
19
+ /* @__PURE__ */ jsxs(
20
+ Link,
21
+ {
22
+ href,
23
+ className: "inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors",
24
+ children: [
25
+ linkLabel,
26
+ " ",
27
+ /* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5" })
28
+ ]
29
+ }
30
+ )
31
+ ] }),
32
+ /* @__PURE__ */ jsx("div", { className: "w-full overflow-x-auto scrollbar-hide", children: /* @__PURE__ */ jsx("div", { className: "flex gap-4 snap-x snap-mandatory pb-2", style: { width: "max-content" }, children }) })
33
+ ] });
34
+ }
35
+ export {
36
+ ScrollSection
37
+ };
38
+ //# sourceMappingURL=scroll-section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/scroll-section.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { ArrowRight } from \"lucide-react\";\n\nexport interface ScrollSectionProps {\n /** Icon element rendered inside the colored badge */\n icon: React.ReactNode;\n /** Tailwind classes for the icon badge (background + shadow) */\n iconBg: string;\n title: string;\n /** \"See all\" link destination */\n href: string;\n /** Button label — defaults to \"See all\" */\n linkLabel?: string;\n /** Scroll items: wrap each in a sized snap-start div */\n children: React.ReactNode;\n}\n\nexport function ScrollSection({\n icon,\n iconBg,\n title,\n href,\n linkLabel = \"See all\",\n children,\n}: ScrollSectionProps) {\n return (\n <section className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2.5\">\n <div className={`h-7 w-7 rounded-lg flex items-center justify-center ${iconBg}`}>\n {icon}\n </div>\n <h2 className=\"text-lg sm:text-xl font-semibold\">{title}</h2>\n </div>\n <Link\n href={href}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n {linkLabel} <ArrowRight className=\"h-3.5 w-3.5\" />\n </Link>\n </div>\n\n <div className=\"w-full overflow-x-auto scrollbar-hide\">\n <div className=\"flex gap-4 snap-x snap-mandatory pb-2\" style={{ width: \"max-content\" }}>\n {children}\n </div>\n </div>\n </section>\n );\n}\n"],"mappings":";AA8BQ,SACE,KADF;AA5BR,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAgBpB,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ;AACF,GAAuB;AACrB,SACE,qBAAC,aAAQ,WAAU,aACjB;AAAA,yBAAC,SAAI,WAAU,qCACb;AAAA,2BAAC,SAAI,WAAU,6BACb;AAAA,4BAAC,SAAI,WAAW,uDAAuD,MAAM,IAC1E,gBACH;AAAA,QACA,oBAAC,QAAG,WAAU,oCAAoC,iBAAM;AAAA,SAC1D;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAU;AAAA,UAET;AAAA;AAAA,YAAU;AAAA,YAAC,oBAAC,cAAW,WAAU,eAAc;AAAA;AAAA;AAAA,MAClD;AAAA,OACF;AAAA,IAEA,oBAAC,SAAI,WAAU,yCACb,8BAAC,SAAI,WAAU,yCAAwC,OAAO,EAAE,OAAO,cAAc,GAClF,UACH,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,86 @@
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 share_button_exports = {};
21
+ __export(share_button_exports, {
22
+ ShareButton: () => ShareButton
23
+ });
24
+ module.exports = __toCommonJS(share_button_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_react = require("react");
27
+ var import_lucide_react = require("lucide-react");
28
+ var import_sonner = require("sonner");
29
+ var import_cn = require("../utils/cn.js");
30
+ const VARIANT_CLASSES = {
31
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
32
+ ghost: "hover:bg-accent hover:text-accent-foreground",
33
+ default: "bg-primary text-primary-foreground hover:bg-primary/90"
34
+ };
35
+ const SIZE_CLASSES = {
36
+ sm: "h-9 px-3 text-xs rounded-md",
37
+ default: "h-10 px-4 py-2 text-sm rounded-md",
38
+ lg: "h-11 px-8 text-sm rounded-md",
39
+ icon: "h-9 w-9 rounded-md"
40
+ };
41
+ function ShareButton({
42
+ title,
43
+ url,
44
+ variant = "outline",
45
+ size = "sm",
46
+ className
47
+ }) {
48
+ const [copied, setCopied] = (0, import_react.useState)(false);
49
+ const handleShare = async () => {
50
+ const shareUrl = url ?? (typeof window !== "undefined" ? window.location.href : "");
51
+ if (typeof navigator !== "undefined" && navigator.share) {
52
+ try {
53
+ await navigator.share({ title, url: shareUrl });
54
+ } catch {
55
+ }
56
+ } else {
57
+ await navigator.clipboard.writeText(shareUrl);
58
+ setCopied(true);
59
+ import_sonner.toast.success("Link copied to clipboard");
60
+ setTimeout(() => setCopied(false), 2e3);
61
+ }
62
+ };
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
64
+ "button",
65
+ {
66
+ onClick: handleShare,
67
+ className: (0, import_cn.cn)(
68
+ "inline-flex items-center justify-center font-medium transition-colors",
69
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
70
+ "disabled:pointer-events-none disabled:opacity-50",
71
+ VARIANT_CLASSES[variant],
72
+ SIZE_CLASSES[size],
73
+ className
74
+ ),
75
+ children: [
76
+ copied ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "h-3.5 w-3.5 text-emerald-500" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Share2, { className: "h-3.5 w-3.5" }),
77
+ size !== "icon" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-1.5", children: copied ? "Copied" : "Share" })
78
+ ]
79
+ }
80
+ );
81
+ }
82
+ // Annotate the CommonJS export names for ESM import in node:
83
+ 0 && (module.exports = {
84
+ ShareButton
85
+ });
86
+ //# sourceMappingURL=share-button.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/share-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Share2, Check } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface ShareButtonProps {\n title: string;\n url?: string;\n variant?: \"outline\" | \"ghost\" | \"default\";\n size?: \"sm\" | \"default\" | \"lg\" | \"icon\";\n className?: string;\n}\n\nconst VARIANT_CLASSES: Record<NonNullable<ShareButtonProps[\"variant\"]>, string> = {\n outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n};\n\nconst SIZE_CLASSES: Record<NonNullable<ShareButtonProps[\"size\"]>, string> = {\n sm: \"h-9 px-3 text-xs rounded-md\",\n default: \"h-10 px-4 py-2 text-sm rounded-md\",\n lg: \"h-11 px-8 text-sm rounded-md\",\n icon: \"h-9 w-9 rounded-md\",\n};\n\nexport function ShareButton({\n title,\n url,\n variant = \"outline\",\n size = \"sm\",\n className,\n}: ShareButtonProps) {\n const [copied, setCopied] = useState(false);\n\n const handleShare = async () => {\n const shareUrl = url ?? (typeof window !== \"undefined\" ? window.location.href : \"\");\n if (typeof navigator !== \"undefined\" && navigator.share) {\n try {\n await navigator.share({ title, url: shareUrl });\n } catch {\n // User cancelled — ignore\n }\n } else {\n await navigator.clipboard.writeText(shareUrl);\n setCopied(true);\n toast.success(\"Link copied to clipboard\");\n setTimeout(() => setCopied(false), 2000);\n }\n };\n\n return (\n <button\n onClick={handleShare}\n className={cn(\n \"inline-flex items-center justify-center font-medium transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n VARIANT_CLASSES[variant],\n SIZE_CLASSES[size],\n className\n )}\n >\n {copied\n ? <Check className=\"h-3.5 w-3.5 text-emerald-500\" />\n : <Share2 className=\"h-3.5 w-3.5\" />\n }\n {size !== \"icon\" && (\n <span className=\"ml-1.5\">{copied ? \"Copied\" : \"Share\"}</span>\n )}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsDI;AApDJ,mBAAyB;AACzB,0BAA8B;AAC9B,oBAAsB;AACtB,gBAAmB;AAUnB,MAAM,kBAA4E;AAAA,EAChF,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX;AAEA,MAAM,eAAsE;AAAA,EAC1E,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,MAAM;AACR;AAEO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AACF,GAAqB;AACnB,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,KAAK;AAE1C,QAAM,cAAc,YAAY;AAC9B,UAAM,WAAW,QAAQ,OAAO,WAAW,cAAc,OAAO,SAAS,OAAO;AAChF,QAAI,OAAO,cAAc,eAAe,UAAU,OAAO;AACvD,UAAI;AACF,cAAM,UAAU,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC;AAAA,MAChD,QAAQ;AAAA,MAER;AAAA,IACF,OAAO;AACL,YAAM,UAAU,UAAU,UAAU,QAAQ;AAC5C,gBAAU,IAAI;AACd,0BAAM,QAAQ,0BAA0B;AACxC,iBAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,IACzC;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA,gBAAgB,OAAO;AAAA,QACvB,aAAa,IAAI;AAAA,QACjB;AAAA,MACF;AAAA,MAEC;AAAA,iBACG,4CAAC,6BAAM,WAAU,gCAA+B,IAChD,4CAAC,8BAAO,WAAU,eAAc;AAAA,QAEnC,SAAS,UACR,4CAAC,UAAK,WAAU,UAAU,mBAAS,WAAW,SAAQ;AAAA;AAAA;AAAA,EAE1D;AAEJ;","names":[]}
@@ -0,0 +1,12 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface ShareButtonProps {
4
+ title: string;
5
+ url?: string;
6
+ variant?: "outline" | "ghost" | "default";
7
+ size?: "sm" | "default" | "lg" | "icon";
8
+ className?: string;
9
+ }
10
+ declare function ShareButton({ title, url, variant, size, className, }: ShareButtonProps): react_jsx_runtime.JSX.Element;
11
+
12
+ export { ShareButton, type ShareButtonProps };
@@ -0,0 +1,12 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface ShareButtonProps {
4
+ title: string;
5
+ url?: string;
6
+ variant?: "outline" | "ghost" | "default";
7
+ size?: "sm" | "default" | "lg" | "icon";
8
+ className?: string;
9
+ }
10
+ declare function ShareButton({ title, url, variant, size, className, }: ShareButtonProps): react_jsx_runtime.JSX.Element;
11
+
12
+ export { ShareButton, type ShareButtonProps };
@@ -0,0 +1,62 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { Share2, Check } from "lucide-react";
5
+ import { toast } from "sonner";
6
+ import { cn } from "../utils/cn.js";
7
+ const VARIANT_CLASSES = {
8
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
9
+ ghost: "hover:bg-accent hover:text-accent-foreground",
10
+ default: "bg-primary text-primary-foreground hover:bg-primary/90"
11
+ };
12
+ const SIZE_CLASSES = {
13
+ sm: "h-9 px-3 text-xs rounded-md",
14
+ default: "h-10 px-4 py-2 text-sm rounded-md",
15
+ lg: "h-11 px-8 text-sm rounded-md",
16
+ icon: "h-9 w-9 rounded-md"
17
+ };
18
+ function ShareButton({
19
+ title,
20
+ url,
21
+ variant = "outline",
22
+ size = "sm",
23
+ className
24
+ }) {
25
+ const [copied, setCopied] = useState(false);
26
+ const handleShare = async () => {
27
+ const shareUrl = url ?? (typeof window !== "undefined" ? window.location.href : "");
28
+ if (typeof navigator !== "undefined" && navigator.share) {
29
+ try {
30
+ await navigator.share({ title, url: shareUrl });
31
+ } catch {
32
+ }
33
+ } else {
34
+ await navigator.clipboard.writeText(shareUrl);
35
+ setCopied(true);
36
+ toast.success("Link copied to clipboard");
37
+ setTimeout(() => setCopied(false), 2e3);
38
+ }
39
+ };
40
+ return /* @__PURE__ */ jsxs(
41
+ "button",
42
+ {
43
+ onClick: handleShare,
44
+ className: cn(
45
+ "inline-flex items-center justify-center font-medium transition-colors",
46
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
47
+ "disabled:pointer-events-none disabled:opacity-50",
48
+ VARIANT_CLASSES[variant],
49
+ SIZE_CLASSES[size],
50
+ className
51
+ ),
52
+ children: [
53
+ copied ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 text-emerald-500" }) : /* @__PURE__ */ jsx(Share2, { className: "h-3.5 w-3.5" }),
54
+ size !== "icon" && /* @__PURE__ */ jsx("span", { className: "ml-1.5", children: copied ? "Copied" : "Share" })
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ export {
60
+ ShareButton
61
+ };
62
+ //# sourceMappingURL=share-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/share-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Share2, Check } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface ShareButtonProps {\n title: string;\n url?: string;\n variant?: \"outline\" | \"ghost\" | \"default\";\n size?: \"sm\" | \"default\" | \"lg\" | \"icon\";\n className?: string;\n}\n\nconst VARIANT_CLASSES: Record<NonNullable<ShareButtonProps[\"variant\"]>, string> = {\n outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n};\n\nconst SIZE_CLASSES: Record<NonNullable<ShareButtonProps[\"size\"]>, string> = {\n sm: \"h-9 px-3 text-xs rounded-md\",\n default: \"h-10 px-4 py-2 text-sm rounded-md\",\n lg: \"h-11 px-8 text-sm rounded-md\",\n icon: \"h-9 w-9 rounded-md\",\n};\n\nexport function ShareButton({\n title,\n url,\n variant = \"outline\",\n size = \"sm\",\n className,\n}: ShareButtonProps) {\n const [copied, setCopied] = useState(false);\n\n const handleShare = async () => {\n const shareUrl = url ?? (typeof window !== \"undefined\" ? window.location.href : \"\");\n if (typeof navigator !== \"undefined\" && navigator.share) {\n try {\n await navigator.share({ title, url: shareUrl });\n } catch {\n // User cancelled — ignore\n }\n } else {\n await navigator.clipboard.writeText(shareUrl);\n setCopied(true);\n toast.success(\"Link copied to clipboard\");\n setTimeout(() => setCopied(false), 2000);\n }\n };\n\n return (\n <button\n onClick={handleShare}\n className={cn(\n \"inline-flex items-center justify-center font-medium transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n VARIANT_CLASSES[variant],\n SIZE_CLASSES[size],\n className\n )}\n >\n {copied\n ? <Check className=\"h-3.5 w-3.5 text-emerald-500\" />\n : <Share2 className=\"h-3.5 w-3.5\" />\n }\n {size !== \"icon\" && (\n <span className=\"ml-1.5\">{copied ? \"Copied\" : \"Share\"}</span>\n )}\n </button>\n );\n}\n"],"mappings":";AAsDI,SAYM,KAZN;AApDJ,SAAS,gBAAgB;AACzB,SAAS,QAAQ,aAAa;AAC9B,SAAS,aAAa;AACtB,SAAS,UAAU;AAUnB,MAAM,kBAA4E;AAAA,EAChF,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX;AAEA,MAAM,eAAsE;AAAA,EAC1E,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,MAAM;AACR;AAEO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AACF,GAAqB;AACnB,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAE1C,QAAM,cAAc,YAAY;AAC9B,UAAM,WAAW,QAAQ,OAAO,WAAW,cAAc,OAAO,SAAS,OAAO;AAChF,QAAI,OAAO,cAAc,eAAe,UAAU,OAAO;AACvD,UAAI;AACF,cAAM,UAAU,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC;AAAA,MAChD,QAAQ;AAAA,MAER;AAAA,IACF,OAAO;AACL,YAAM,UAAU,UAAU,UAAU,QAAQ;AAC5C,gBAAU,IAAI;AACd,YAAM,QAAQ,0BAA0B;AACxC,iBAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,IACzC;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA,gBAAgB,OAAO;AAAA,QACvB,aAAa,IAAI;AAAA,QACjB;AAAA,MACF;AAAA,MAEC;AAAA,iBACG,oBAAC,SAAM,WAAU,gCAA+B,IAChD,oBAAC,UAAO,WAAU,eAAc;AAAA,QAEnC,SAAS,UACR,oBAAC,UAAK,WAAU,UAAU,mBAAS,WAAW,SAAQ;AAAA;AAAA;AAAA,EAE1D;AAEJ;","names":[]}
@@ -0,0 +1,281 @@
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 token_card_exports = {};
31
+ __export(token_card_exports, {
32
+ TokenCard: () => TokenCard,
33
+ TokenCardSkeleton: () => TokenCardSkeleton
34
+ });
35
+ module.exports = __toCommonJS(token_card_exports);
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_react = require("react");
38
+ var import_link = __toESM(require("next/link"), 1);
39
+ var import_image = __toESM(require("next/image"), 1);
40
+ var import_lucide_react = require("lucide-react");
41
+ var import_cn = require("../utils/cn.js");
42
+ var import_ipfs = require("../utils/ipfs.js");
43
+ var import_format = require("../utils/format.js");
44
+ var import_currency_icon = require("./currency-icon.js");
45
+ var import_ip_type_badge = require("./ip-type-badge.js");
46
+ var import_motion_primitives = require("./motion-primitives.js");
47
+ const RARITY_STYLE = {
48
+ legendary: { label: "Legendary", className: "bg-yellow-400/90 text-yellow-900" },
49
+ epic: { label: "Epic", className: "bg-purple-500/85 text-white" },
50
+ rare: { label: "Rare", className: "bg-blue-500/85 text-white" },
51
+ uncommon: { label: "Uncommon", className: "bg-emerald-500/85 text-white" },
52
+ common: null
53
+ };
54
+ const BTN_BASE = "h-8 rounded-[11px] flex items-center justify-center gap-1.5 text-xs font-semibold transition-all active:scale-[0.98] shadow-none border-0";
55
+ const BTN_SOLID = (0, import_cn.cn)(BTN_BASE, "text-white hover:brightness-110");
56
+ const BTN_OUTLINE = (0, import_cn.cn)(BTN_BASE, "border border-border/60 text-foreground hover:bg-muted/60");
57
+ function TokenCard({
58
+ token,
59
+ isOwner = false,
60
+ inCart = false,
61
+ showBuyButton = true,
62
+ rarityTier,
63
+ className,
64
+ onBuy,
65
+ onCart,
66
+ onOffer,
67
+ onList,
68
+ onCancel,
69
+ onTransfer,
70
+ overflowMenu
71
+ }) {
72
+ const [imgError, setImgError] = (0, import_react.useState)(false);
73
+ const name = token.metadata?.name || `Token #${token.tokenId}`;
74
+ const image = (0, import_ipfs.ipfsToHttp)(token.metadata?.image);
75
+ const activeOrder = token.activeOrders?.[0];
76
+ const assetHref = `/asset/${token.contractAddress}/${token.tokenId}`;
77
+ const renderActions = () => {
78
+ if (!isOwner && activeOrder && showBuyButton) {
79
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
80
+ onBuy && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
81
+ "button",
82
+ {
83
+ className: (0, import_cn.cn)(BTN_SOLID, "flex-1 bg-brand-purple"),
84
+ onClick: (e) => {
85
+ e.preventDefault();
86
+ e.stopPropagation();
87
+ onBuy(token);
88
+ },
89
+ children: [
90
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Zap, { className: "h-3.5 w-3.5 shrink-0" }),
91
+ "Buy"
92
+ ]
93
+ }
94
+ ),
95
+ onCart && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
+ "button",
97
+ {
98
+ className: (0, import_cn.cn)(
99
+ BTN_OUTLINE,
100
+ "w-8 shrink-0",
101
+ inCart && "border-brand-orange/50 bg-brand-orange/10 text-brand-orange"
102
+ ),
103
+ onClick: (e) => {
104
+ e.preventDefault();
105
+ e.stopPropagation();
106
+ onCart(token);
107
+ },
108
+ disabled: inCart,
109
+ "aria-label": inCart ? "In cart" : "Add to cart",
110
+ children: inCart ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-3.5 w-3.5" })
111
+ }
112
+ ),
113
+ onOffer && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
114
+ "button",
115
+ {
116
+ className: (0, import_cn.cn)(BTN_OUTLINE, "w-8 shrink-0 text-brand-orange border-brand-orange/40 hover:bg-brand-orange/10"),
117
+ onClick: (e) => {
118
+ e.preventDefault();
119
+ e.stopPropagation();
120
+ onOffer(token);
121
+ },
122
+ "aria-label": "Make an offer",
123
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-3.5 w-3.5" })
124
+ }
125
+ )
126
+ ] });
127
+ }
128
+ if (!isOwner) {
129
+ if (!onOffer) return null;
130
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
131
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: assetHref, className: (0, import_cn.cn)(BTN_OUTLINE, "flex-1"), children: [
132
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowUpRight, { className: "h-3.5 w-3.5 shrink-0" }),
133
+ "View"
134
+ ] }),
135
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
136
+ "button",
137
+ {
138
+ className: (0, import_cn.cn)(BTN_OUTLINE, "w-8 shrink-0 text-brand-orange border-brand-orange/40 hover:bg-brand-orange/10"),
139
+ onClick: (e) => {
140
+ e.preventDefault();
141
+ e.stopPropagation();
142
+ onOffer(token);
143
+ },
144
+ "aria-label": "Make an offer",
145
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-3.5 w-3.5" })
146
+ }
147
+ )
148
+ ] });
149
+ }
150
+ if (isOwner && activeOrder) {
151
+ if (!onCancel) return null;
152
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
153
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
154
+ "button",
155
+ {
156
+ className: (0, import_cn.cn)(BTN_SOLID, "flex-1 bg-brand-rose"),
157
+ onClick: (e) => {
158
+ e.preventDefault();
159
+ e.stopPropagation();
160
+ onCancel(token);
161
+ },
162
+ children: [
163
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-3.5 w-3.5 shrink-0" }),
164
+ "Cancel listing"
165
+ ]
166
+ }
167
+ ),
168
+ onTransfer && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
169
+ "button",
170
+ {
171
+ className: (0, import_cn.cn)(BTN_OUTLINE, "w-8 shrink-0"),
172
+ onClick: (e) => {
173
+ e.preventDefault();
174
+ e.stopPropagation();
175
+ onTransfer(token);
176
+ },
177
+ "aria-label": "Transfer",
178
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-3.5 w-3.5" })
179
+ }
180
+ )
181
+ ] });
182
+ }
183
+ if (isOwner && !activeOrder) {
184
+ if (!onList) return null;
185
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
186
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
187
+ "button",
188
+ {
189
+ className: (0, import_cn.cn)(BTN_SOLID, "flex-1 bg-brand-blue"),
190
+ onClick: (e) => {
191
+ e.preventDefault();
192
+ e.stopPropagation();
193
+ onList(token);
194
+ },
195
+ children: [
196
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-3.5 w-3.5 shrink-0" }),
197
+ "List for sale"
198
+ ]
199
+ }
200
+ ),
201
+ onTransfer && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
202
+ "button",
203
+ {
204
+ className: (0, import_cn.cn)(BTN_OUTLINE, "w-8 shrink-0"),
205
+ onClick: (e) => {
206
+ e.preventDefault();
207
+ e.stopPropagation();
208
+ onTransfer(token);
209
+ },
210
+ "aria-label": "Transfer",
211
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-3.5 w-3.5" })
212
+ }
213
+ )
214
+ ] });
215
+ }
216
+ return null;
217
+ };
218
+ const actionContent = renderActions();
219
+ const showActionBar = actionContent != null || !!overflowMenu;
220
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_motion_primitives.MotionCard, { className: (0, import_cn.cn)("card-base group relative overflow-hidden flex flex-col", className), children: [
221
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: assetHref, className: "block relative shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative aspect-square bg-muted overflow-hidden", children: [
222
+ !imgError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
223
+ import_image.default,
224
+ {
225
+ src: image,
226
+ alt: name,
227
+ fill: true,
228
+ unoptimized: true,
229
+ sizes: "(max-width: 640px) 50vw, (max-width: 1024px) 33vw, 22vw",
230
+ className: "object-cover transition-transform duration-500 group-hover:scale-105",
231
+ onError: () => setImgError(true)
232
+ }
233
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-brand-purple/15 to-brand-blue/15", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-2xl font-mono text-muted-foreground", children: [
234
+ "#",
235
+ token.tokenId
236
+ ] }) }),
237
+ token.metadata?.ipType && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute top-2 left-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ip_type_badge.IpTypeBadge, { ipType: token.metadata.ipType, size: "sm" }) }),
238
+ rarityTier && RARITY_STYLE[rarityTier] && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute top-2 right-2 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_cn.cn)(
239
+ "inline-flex items-center px-1.5 py-0.5 rounded-md backdrop-blur-sm text-[10px] font-bold leading-none",
240
+ RARITY_STYLE[rarityTier].className
241
+ ), children: RARITY_STYLE[rarityTier].label }) }),
242
+ (token.metadataStatus === "PENDING" || token.metadataStatus === "FETCHING") && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "absolute bottom-0 inset-x-0 flex items-center justify-center gap-1.5 bg-black/50 backdrop-blur-sm py-1.5", children: [
243
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-3 w-3 animate-spin text-white/70" }),
244
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-[10px] text-white/70", children: "Indexing\u2026" })
245
+ ] })
246
+ ] }) }),
247
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-3 pt-2.5 pb-1 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: assetHref, className: "block space-y-0.5 mb-2", children: [
248
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xl font-bold line-clamp-2 leading-tight", children: name }),
249
+ activeOrder && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "flex items-center gap-1 text-[11px] font-semibold text-foreground/80", children: [
250
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: activeOrder.price.currency, size: 11 }),
251
+ (0, import_format.formatDisplayPrice)(activeOrder.price.formatted),
252
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-normal text-muted-foreground", children: activeOrder.price.currency })
253
+ ] }),
254
+ token.metadata?.description ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[10px] text-muted-foreground truncate leading-snug", children: token.metadata.description }) : token.metadata?.ipType ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[10px] text-muted-foreground opacity-70", children: token.metadata.ipType }) : null
255
+ ] }) }),
256
+ showActionBar && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1.5 px-2 pb-2", children: [
257
+ actionContent,
258
+ overflowMenu
259
+ ] })
260
+ ] });
261
+ }
262
+ function TokenCardSkeleton() {
263
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "card-base overflow-hidden", children: [
264
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "aspect-square w-full animate-pulse bg-muted" }),
265
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "px-3 pt-2.5 pb-2 space-y-1.5", children: [
266
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-5 w-3/4 rounded-md animate-pulse bg-muted" }),
267
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-2.5 w-2/5 rounded-md animate-pulse bg-muted" })
268
+ ] }),
269
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "px-2 pb-2 flex gap-1.5", children: [
270
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-8 flex-1 rounded-[11px] animate-pulse bg-muted" }),
271
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-8 w-8 rounded-[11px] animate-pulse bg-muted shrink-0" }),
272
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-8 w-8 rounded-[11px] animate-pulse bg-muted shrink-0" })
273
+ ] })
274
+ ] });
275
+ }
276
+ // Annotate the CommonJS export names for ESM import in node:
277
+ 0 && (module.exports = {
278
+ TokenCard,
279
+ TokenCardSkeleton
280
+ });
281
+ //# sourceMappingURL=token-card.cjs.map