@medialane/ui 0.1.1 → 0.1.3
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/brand-icon.cjs +69 -0
- package/dist/components/brand-icon.cjs.map +1 -0
- package/dist/components/brand-icon.d.cts +10 -0
- package/dist/components/brand-icon.d.ts +10 -0
- package/dist/components/brand-icon.js +35 -0
- package/dist/components/brand-icon.js.map +1 -0
- package/dist/components/brand-logo.cjs +85 -0
- package/dist/components/brand-logo.cjs.map +1 -0
- package/dist/components/brand-logo.d.cts +11 -0
- package/dist/components/brand-logo.d.ts +11 -0
- package/dist/components/brand-logo.js +51 -0
- package/dist/components/brand-logo.js.map +1 -0
- package/dist/components/currency-icon.cjs +79 -0
- package/dist/components/currency-icon.cjs.map +1 -0
- package/dist/components/currency-icon.d.cts +25 -0
- package/dist/components/currency-icon.d.ts +25 -0
- package/dist/components/currency-icon.js +44 -0
- package/dist/components/currency-icon.js.map +1 -0
- package/dist/components/ip-type-badge.cjs +89 -0
- package/dist/components/ip-type-badge.cjs.map +1 -0
- package/dist/components/ip-type-badge.d.cts +21 -0
- package/dist/components/ip-type-badge.d.ts +21 -0
- package/dist/components/ip-type-badge.js +74 -0
- package/dist/components/ip-type-badge.js.map +1 -0
- package/dist/data/ip-types.cjs +47 -0
- package/dist/data/ip-types.cjs.map +1 -0
- package/dist/data/ip-types.d.cts +13 -0
- package/dist/data/ip-types.d.ts +13 -0
- package/dist/data/ip-types.js +22 -0
- package/dist/data/ip-types.js.map +1 -0
- package/dist/index.cjs +51 -199
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -62
- package/dist/index.d.ts +9 -62
- package/dist/index.js +18 -185
- package/dist/index.js.map +1 -1
- package/dist/preset/tailwind.cjs +23 -4
- package/dist/preset/tailwind.cjs.map +1 -1
- package/dist/preset/tailwind.js +3 -3
- package/dist/preset/tailwind.js.map +1 -1
- package/dist/utils/cn.cjs +33 -0
- package/dist/utils/cn.cjs.map +1 -0
- package/dist/utils/cn.d.cts +5 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.js +9 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/format.cjs +49 -0
- package/dist/utils/format.cjs.map +1 -0
- package/dist/utils/format.d.cts +7 -0
- package/dist/utils/format.d.ts +7 -0
- package/dist/utils/format.js +25 -0
- package/dist/utils/format.js.map +1 -0
- package/package.json +1 -1
- package/dist/preset/tailwind.d.cts +0 -5
- package/dist/preset/tailwind.d.ts +0 -5
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
4
|
+
Music,
|
|
5
|
+
Palette,
|
|
6
|
+
Film,
|
|
7
|
+
Camera,
|
|
8
|
+
Gem,
|
|
9
|
+
Award,
|
|
10
|
+
FileText,
|
|
11
|
+
BookOpen,
|
|
12
|
+
File,
|
|
13
|
+
Building,
|
|
14
|
+
Code,
|
|
15
|
+
Layers
|
|
16
|
+
} from "lucide-react";
|
|
17
|
+
import { cn } from "../utils/cn.js";
|
|
18
|
+
import { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from "../data/ip-types.js";
|
|
19
|
+
const IP_TYPE_CONFIG = IP_TYPE_DATA.map((d) => {
|
|
20
|
+
const icons = {
|
|
21
|
+
audio: Music,
|
|
22
|
+
video: Film,
|
|
23
|
+
art: Palette,
|
|
24
|
+
photography: Camera,
|
|
25
|
+
nft: Gem,
|
|
26
|
+
software: Code,
|
|
27
|
+
rwa: Building,
|
|
28
|
+
patents: Award,
|
|
29
|
+
posts: FileText,
|
|
30
|
+
publications: BookOpen,
|
|
31
|
+
documents: File,
|
|
32
|
+
custom: Layers
|
|
33
|
+
};
|
|
34
|
+
return { ...d, icon: icons[d.slug] ?? Layers };
|
|
35
|
+
});
|
|
36
|
+
const IP_TYPE_MAP = Object.fromEntries(
|
|
37
|
+
IP_TYPE_CONFIG.map((c) => [c.slug, c])
|
|
38
|
+
);
|
|
39
|
+
const SIZE = {
|
|
40
|
+
sm: { container: "h-6 w-6", icon: "h-3 w-3" },
|
|
41
|
+
md: { container: "h-8 w-8", icon: "h-4 w-4" }
|
|
42
|
+
};
|
|
43
|
+
function IpTypeBadge({ ipType, size = "sm", className, baseUrl = "" }) {
|
|
44
|
+
const config = IP_TYPE_CONFIG.find(
|
|
45
|
+
(c) => c.label === ipType || c.apiValue === ipType
|
|
46
|
+
);
|
|
47
|
+
if (!config) return null;
|
|
48
|
+
const { icon: Icon, colorClass, bgClass, slug, label } = config;
|
|
49
|
+
const { container, icon } = SIZE[size];
|
|
50
|
+
return /* @__PURE__ */ jsx(
|
|
51
|
+
"a",
|
|
52
|
+
{
|
|
53
|
+
href: `${baseUrl}/${slug}`,
|
|
54
|
+
title: label,
|
|
55
|
+
className: cn(
|
|
56
|
+
"inline-flex items-center justify-center rounded-full",
|
|
57
|
+
"transition-opacity hover:opacity-80",
|
|
58
|
+
bgClass,
|
|
59
|
+
container,
|
|
60
|
+
className
|
|
61
|
+
),
|
|
62
|
+
onClick: (e) => e.stopPropagation(),
|
|
63
|
+
children: /* @__PURE__ */ jsx(Icon, { className: cn(colorClass, icon) })
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
IP_TYPE_CONFIG,
|
|
69
|
+
IP_TYPE_DATA,
|
|
70
|
+
IP_TYPE_DATA_MAP,
|
|
71
|
+
IP_TYPE_MAP,
|
|
72
|
+
IpTypeBadge
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=ip-type-badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/ip-type-badge.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Music, Palette, Film, Camera, Gem, Award,\n FileText, BookOpen, File, Building, Code, Layers,\n} from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"../data/ip-types.js\";\nimport type { IpTypeData } from \"../data/ip-types.js\";\n\n/** Client-only: extends IpTypeData with a React icon component. */\nexport interface IpTypeConfig extends IpTypeData {\n icon: React.ElementType;\n}\n\nexport const IP_TYPE_CONFIG: IpTypeConfig[] = IP_TYPE_DATA.map((d) => {\n const icons: Record<string, React.ElementType> = {\n audio: Music,\n video: Film,\n art: Palette,\n photography: Camera,\n nft: Gem,\n software: Code,\n rwa: Building,\n patents: Award,\n posts: FileText,\n publications: BookOpen,\n documents: File,\n custom: Layers,\n };\n return { ...d, icon: icons[d.slug] ?? Layers };\n});\n\nexport const IP_TYPE_MAP = Object.fromEntries(\n IP_TYPE_CONFIG.map((c) => [c.slug, c])\n) as Record<string, IpTypeConfig>;\n\n// Re-export server-safe data so consumers only need one import path\nexport { IP_TYPE_DATA, IP_TYPE_DATA_MAP };\nexport type { IpTypeData };\n\nconst SIZE = {\n sm: { container: \"h-6 w-6\", icon: \"h-3 w-3\" },\n md: { container: \"h-8 w-8\", icon: \"h-4 w-4\" },\n};\n\nexport interface IpTypeBadgeProps {\n ipType: string;\n size?: \"sm\" | \"md\";\n className?: string;\n /** Base URL for IP type pages. Default: \"\" (relative). */\n baseUrl?: string;\n}\n\nexport function IpTypeBadge({ ipType, size = \"sm\", className, baseUrl = \"\" }: IpTypeBadgeProps) {\n const config = IP_TYPE_CONFIG.find(\n (c) => c.label === ipType || c.apiValue === ipType\n );\n if (!config) return null;\n const { icon: Icon, colorClass, bgClass, slug, label } = config;\n const { container, icon } = SIZE[size];\n return (\n <a\n href={`${baseUrl}/${slug}`}\n title={label}\n className={cn(\n \"inline-flex items-center justify-center rounded-full\",\n \"transition-opacity hover:opacity-80\",\n bgClass,\n container,\n className\n )}\n onClick={(e) => e.stopPropagation()}\n >\n <Icon className={cn(colorClass, icon)} />\n </a>\n );\n}\n"],"mappings":";AA0EM;AAxEN;AAAA,EACE;AAAA,EAAO;AAAA,EAAS;AAAA,EAAM;AAAA,EAAQ;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AAA,MAElC,8BAAC,QAAK,WAAW,GAAG,YAAY,IAAI,GAAG;AAAA;AAAA,EACzC;AAEJ;","names":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var ip_types_exports = {};
|
|
20
|
+
__export(ip_types_exports, {
|
|
21
|
+
IP_TYPE_DATA: () => IP_TYPE_DATA,
|
|
22
|
+
IP_TYPE_DATA_MAP: () => IP_TYPE_DATA_MAP
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(ip_types_exports);
|
|
25
|
+
const IP_TYPE_DATA = [
|
|
26
|
+
{ slug: "audio", label: "Audio", apiValue: "Audio", colorClass: "text-violet-400", bgClass: "bg-violet-500/10" },
|
|
27
|
+
{ slug: "video", label: "Video", apiValue: "Video", colorClass: "text-red-400", bgClass: "bg-red-500/10" },
|
|
28
|
+
{ slug: "art", label: "Art", apiValue: "Art", colorClass: "text-pink-400", bgClass: "bg-pink-500/10" },
|
|
29
|
+
{ slug: "photography", label: "Photography", apiValue: "Photography", colorClass: "text-amber-400", bgClass: "bg-amber-500/10" },
|
|
30
|
+
{ slug: "nft", label: "NFT", apiValue: null, colorClass: "text-blue-400", bgClass: "bg-blue-500/10" },
|
|
31
|
+
{ slug: "software", label: "Software", apiValue: "Software", colorClass: "text-cyan-400", bgClass: "bg-cyan-500/10" },
|
|
32
|
+
{ slug: "rwa", label: "RWA", apiValue: "RWA", colorClass: "text-lime-400", bgClass: "bg-lime-500/10" },
|
|
33
|
+
{ slug: "patents", label: "Patents", apiValue: "Patents", colorClass: "text-emerald-400", bgClass: "bg-emerald-500/10" },
|
|
34
|
+
{ slug: "posts", label: "Posts", apiValue: "Posts", colorClass: "text-orange-400", bgClass: "bg-orange-500/10" },
|
|
35
|
+
{ slug: "publications", label: "Publications", apiValue: "Publications", colorClass: "text-teal-400", bgClass: "bg-teal-500/10" },
|
|
36
|
+
{ slug: "documents", label: "Documents", apiValue: "Documents", colorClass: "text-slate-400", bgClass: "bg-slate-500/10" },
|
|
37
|
+
{ slug: "custom", label: "Custom", apiValue: "Custom", colorClass: "text-indigo-400", bgClass: "bg-indigo-500/10" }
|
|
38
|
+
];
|
|
39
|
+
const IP_TYPE_DATA_MAP = Object.fromEntries(
|
|
40
|
+
IP_TYPE_DATA.map((d) => [d.slug, d])
|
|
41
|
+
);
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
IP_TYPE_DATA,
|
|
45
|
+
IP_TYPE_DATA_MAP
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=ip-types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/data/ip-types.ts"],"sourcesContent":["/** Server-safe IP type data — no React components, safe to import in Server Components. */\nexport interface IpTypeData {\n slug: string;\n label: string;\n /** API ipType value — null means \"nft\" special case */\n apiValue: string | null;\n colorClass: string;\n bgClass: string;\n}\n\nexport const IP_TYPE_DATA: IpTypeData[] = [\n { slug: \"audio\", label: \"Audio\", apiValue: \"Audio\", colorClass: \"text-violet-400\", bgClass: \"bg-violet-500/10\" },\n { slug: \"video\", label: \"Video\", apiValue: \"Video\", colorClass: \"text-red-400\", bgClass: \"bg-red-500/10\" },\n { slug: \"art\", label: \"Art\", apiValue: \"Art\", colorClass: \"text-pink-400\", bgClass: \"bg-pink-500/10\" },\n { slug: \"photography\", label: \"Photography\", apiValue: \"Photography\", colorClass: \"text-amber-400\", bgClass: \"bg-amber-500/10\" },\n { slug: \"nft\", label: \"NFT\", apiValue: null, colorClass: \"text-blue-400\", bgClass: \"bg-blue-500/10\" },\n { slug: \"software\", label: \"Software\", apiValue: \"Software\", colorClass: \"text-cyan-400\", bgClass: \"bg-cyan-500/10\" },\n { slug: \"rwa\", label: \"RWA\", apiValue: \"RWA\", colorClass: \"text-lime-400\", bgClass: \"bg-lime-500/10\" },\n { slug: \"patents\", label: \"Patents\", apiValue: \"Patents\", colorClass: \"text-emerald-400\", bgClass: \"bg-emerald-500/10\" },\n { slug: \"posts\", label: \"Posts\", apiValue: \"Posts\", colorClass: \"text-orange-400\", bgClass: \"bg-orange-500/10\" },\n { slug: \"publications\", label: \"Publications\", apiValue: \"Publications\", colorClass: \"text-teal-400\", bgClass: \"bg-teal-500/10\" },\n { slug: \"documents\", label: \"Documents\", apiValue: \"Documents\", colorClass: \"text-slate-400\", bgClass: \"bg-slate-500/10\" },\n { slug: \"custom\", label: \"Custom\", apiValue: \"Custom\", colorClass: \"text-indigo-400\", bgClass: \"bg-indigo-500/10\" },\n];\n\nexport const IP_TYPE_DATA_MAP = Object.fromEntries(\n IP_TYPE_DATA.map((d) => [d.slug, d])\n) as Record<string, IpTypeData>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,MAAM,eAA6B;AAAA,EACxC,EAAE,MAAM,SAAgB,OAAO,SAAgB,UAAU,SAAgB,YAAY,mBAAoB,SAAS,mBAAoB;AAAA,EACtI,EAAE,MAAM,SAAgB,OAAO,SAAgB,UAAU,SAAgB,YAAY,gBAAoB,SAAS,gBAAoB;AAAA,EACtI,EAAE,MAAM,OAAgB,OAAO,OAAgB,UAAU,OAAgB,YAAY,iBAAoB,SAAS,iBAAoB;AAAA,EACtI,EAAE,MAAM,eAAgB,OAAO,eAAgB,UAAU,eAAgB,YAAY,kBAAoB,SAAS,kBAAoB;AAAA,EACtI,EAAE,MAAM,OAAgB,OAAO,OAAgB,UAAU,MAAgB,YAAY,iBAAoB,SAAS,iBAAoB;AAAA,EACtI,EAAE,MAAM,YAAgB,OAAO,YAAgB,UAAU,YAAgB,YAAY,iBAAoB,SAAS,iBAAoB;AAAA,EACtI,EAAE,MAAM,OAAgB,OAAO,OAAgB,UAAU,OAAgB,YAAY,iBAAoB,SAAS,iBAAoB;AAAA,EACtI,EAAE,MAAM,WAAgB,OAAO,WAAgB,UAAU,WAAgB,YAAY,oBAAoB,SAAS,oBAAoB;AAAA,EACtI,EAAE,MAAM,SAAgB,OAAO,SAAgB,UAAU,SAAgB,YAAY,mBAAoB,SAAS,mBAAoB;AAAA,EACtI,EAAE,MAAM,gBAAgB,OAAO,gBAAgB,UAAU,gBAAgB,YAAY,iBAAoB,SAAS,iBAAoB;AAAA,EACtI,EAAE,MAAM,aAAgB,OAAO,aAAgB,UAAU,aAAgB,YAAY,kBAAoB,SAAS,kBAAoB;AAAA,EACtI,EAAE,MAAM,UAAgB,OAAO,UAAgB,UAAU,UAAgB,YAAY,mBAAoB,SAAS,mBAAoB;AACxI;AAEO,MAAM,mBAAmB,OAAO;AAAA,EACrC,aAAa,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;AACrC;","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Server-safe IP type data — no React components, safe to import in Server Components. */
|
|
2
|
+
interface IpTypeData {
|
|
3
|
+
slug: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** API ipType value — null means "nft" special case */
|
|
6
|
+
apiValue: string | null;
|
|
7
|
+
colorClass: string;
|
|
8
|
+
bgClass: string;
|
|
9
|
+
}
|
|
10
|
+
declare const IP_TYPE_DATA: IpTypeData[];
|
|
11
|
+
declare const IP_TYPE_DATA_MAP: Record<string, IpTypeData>;
|
|
12
|
+
|
|
13
|
+
export { IP_TYPE_DATA, IP_TYPE_DATA_MAP, type IpTypeData };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Server-safe IP type data — no React components, safe to import in Server Components. */
|
|
2
|
+
interface IpTypeData {
|
|
3
|
+
slug: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** API ipType value — null means "nft" special case */
|
|
6
|
+
apiValue: string | null;
|
|
7
|
+
colorClass: string;
|
|
8
|
+
bgClass: string;
|
|
9
|
+
}
|
|
10
|
+
declare const IP_TYPE_DATA: IpTypeData[];
|
|
11
|
+
declare const IP_TYPE_DATA_MAP: Record<string, IpTypeData>;
|
|
12
|
+
|
|
13
|
+
export { IP_TYPE_DATA, IP_TYPE_DATA_MAP, type IpTypeData };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const IP_TYPE_DATA = [
|
|
2
|
+
{ slug: "audio", label: "Audio", apiValue: "Audio", colorClass: "text-violet-400", bgClass: "bg-violet-500/10" },
|
|
3
|
+
{ slug: "video", label: "Video", apiValue: "Video", colorClass: "text-red-400", bgClass: "bg-red-500/10" },
|
|
4
|
+
{ slug: "art", label: "Art", apiValue: "Art", colorClass: "text-pink-400", bgClass: "bg-pink-500/10" },
|
|
5
|
+
{ slug: "photography", label: "Photography", apiValue: "Photography", colorClass: "text-amber-400", bgClass: "bg-amber-500/10" },
|
|
6
|
+
{ slug: "nft", label: "NFT", apiValue: null, colorClass: "text-blue-400", bgClass: "bg-blue-500/10" },
|
|
7
|
+
{ slug: "software", label: "Software", apiValue: "Software", colorClass: "text-cyan-400", bgClass: "bg-cyan-500/10" },
|
|
8
|
+
{ slug: "rwa", label: "RWA", apiValue: "RWA", colorClass: "text-lime-400", bgClass: "bg-lime-500/10" },
|
|
9
|
+
{ slug: "patents", label: "Patents", apiValue: "Patents", colorClass: "text-emerald-400", bgClass: "bg-emerald-500/10" },
|
|
10
|
+
{ slug: "posts", label: "Posts", apiValue: "Posts", colorClass: "text-orange-400", bgClass: "bg-orange-500/10" },
|
|
11
|
+
{ slug: "publications", label: "Publications", apiValue: "Publications", colorClass: "text-teal-400", bgClass: "bg-teal-500/10" },
|
|
12
|
+
{ slug: "documents", label: "Documents", apiValue: "Documents", colorClass: "text-slate-400", bgClass: "bg-slate-500/10" },
|
|
13
|
+
{ slug: "custom", label: "Custom", apiValue: "Custom", colorClass: "text-indigo-400", bgClass: "bg-indigo-500/10" }
|
|
14
|
+
];
|
|
15
|
+
const IP_TYPE_DATA_MAP = Object.fromEntries(
|
|
16
|
+
IP_TYPE_DATA.map((d) => [d.slug, d])
|
|
17
|
+
);
|
|
18
|
+
export {
|
|
19
|
+
IP_TYPE_DATA,
|
|
20
|
+
IP_TYPE_DATA_MAP
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=ip-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/data/ip-types.ts"],"sourcesContent":["/** Server-safe IP type data — no React components, safe to import in Server Components. */\nexport interface IpTypeData {\n slug: string;\n label: string;\n /** API ipType value — null means \"nft\" special case */\n apiValue: string | null;\n colorClass: string;\n bgClass: string;\n}\n\nexport const IP_TYPE_DATA: IpTypeData[] = [\n { slug: \"audio\", label: \"Audio\", apiValue: \"Audio\", colorClass: \"text-violet-400\", bgClass: \"bg-violet-500/10\" },\n { slug: \"video\", label: \"Video\", apiValue: \"Video\", colorClass: \"text-red-400\", bgClass: \"bg-red-500/10\" },\n { slug: \"art\", label: \"Art\", apiValue: \"Art\", colorClass: \"text-pink-400\", bgClass: \"bg-pink-500/10\" },\n { slug: \"photography\", label: \"Photography\", apiValue: \"Photography\", colorClass: \"text-amber-400\", bgClass: \"bg-amber-500/10\" },\n { slug: \"nft\", label: \"NFT\", apiValue: null, colorClass: \"text-blue-400\", bgClass: \"bg-blue-500/10\" },\n { slug: \"software\", label: \"Software\", apiValue: \"Software\", colorClass: \"text-cyan-400\", bgClass: \"bg-cyan-500/10\" },\n { slug: \"rwa\", label: \"RWA\", apiValue: \"RWA\", colorClass: \"text-lime-400\", bgClass: \"bg-lime-500/10\" },\n { slug: \"patents\", label: \"Patents\", apiValue: \"Patents\", colorClass: \"text-emerald-400\", bgClass: \"bg-emerald-500/10\" },\n { slug: \"posts\", label: \"Posts\", apiValue: \"Posts\", colorClass: \"text-orange-400\", bgClass: \"bg-orange-500/10\" },\n { slug: \"publications\", label: \"Publications\", apiValue: \"Publications\", colorClass: \"text-teal-400\", bgClass: \"bg-teal-500/10\" },\n { slug: \"documents\", label: \"Documents\", apiValue: \"Documents\", colorClass: \"text-slate-400\", bgClass: \"bg-slate-500/10\" },\n { slug: \"custom\", label: \"Custom\", apiValue: \"Custom\", colorClass: \"text-indigo-400\", bgClass: \"bg-indigo-500/10\" },\n];\n\nexport const IP_TYPE_DATA_MAP = Object.fromEntries(\n IP_TYPE_DATA.map((d) => [d.slug, d])\n) as Record<string, IpTypeData>;\n"],"mappings":"AAUO,MAAM,eAA6B;AAAA,EACxC,EAAE,MAAM,SAAgB,OAAO,SAAgB,UAAU,SAAgB,YAAY,mBAAoB,SAAS,mBAAoB;AAAA,EACtI,EAAE,MAAM,SAAgB,OAAO,SAAgB,UAAU,SAAgB,YAAY,gBAAoB,SAAS,gBAAoB;AAAA,EACtI,EAAE,MAAM,OAAgB,OAAO,OAAgB,UAAU,OAAgB,YAAY,iBAAoB,SAAS,iBAAoB;AAAA,EACtI,EAAE,MAAM,eAAgB,OAAO,eAAgB,UAAU,eAAgB,YAAY,kBAAoB,SAAS,kBAAoB;AAAA,EACtI,EAAE,MAAM,OAAgB,OAAO,OAAgB,UAAU,MAAgB,YAAY,iBAAoB,SAAS,iBAAoB;AAAA,EACtI,EAAE,MAAM,YAAgB,OAAO,YAAgB,UAAU,YAAgB,YAAY,iBAAoB,SAAS,iBAAoB;AAAA,EACtI,EAAE,MAAM,OAAgB,OAAO,OAAgB,UAAU,OAAgB,YAAY,iBAAoB,SAAS,iBAAoB;AAAA,EACtI,EAAE,MAAM,WAAgB,OAAO,WAAgB,UAAU,WAAgB,YAAY,oBAAoB,SAAS,oBAAoB;AAAA,EACtI,EAAE,MAAM,SAAgB,OAAO,SAAgB,UAAU,SAAgB,YAAY,mBAAoB,SAAS,mBAAoB;AAAA,EACtI,EAAE,MAAM,gBAAgB,OAAO,gBAAgB,UAAU,gBAAgB,YAAY,iBAAoB,SAAS,iBAAoB;AAAA,EACtI,EAAE,MAAM,aAAgB,OAAO,aAAgB,UAAU,aAAgB,YAAY,kBAAoB,SAAS,kBAAoB;AAAA,EACtI,EAAE,MAAM,UAAgB,OAAO,UAAgB,UAAU,UAAgB,YAAY,mBAAoB,SAAS,mBAAoB;AACxI;AAEO,MAAM,mBAAmB,OAAO;AAAA,EACrC,aAAa,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;AACrC;","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,202 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var nextThemes = require('next-themes');
|
|
10
|
-
var react = require('react');
|
|
11
|
-
|
|
12
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
|
|
14
|
-
var Image3__default = /*#__PURE__*/_interopDefault(Image3);
|
|
15
|
-
var Link__default = /*#__PURE__*/_interopDefault(Link);
|
|
16
|
-
|
|
17
|
-
// src/utils/cn.ts
|
|
18
|
-
function cn(...inputs) {
|
|
19
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// src/utils/format.ts
|
|
23
|
-
function adaptiveDecimals(num) {
|
|
24
|
-
if (num === 0 || num >= 1) return 2;
|
|
25
|
-
if (num >= 0.01) return 4;
|
|
26
|
-
const leadingZeros = Math.floor(-Math.log10(Math.abs(num)));
|
|
27
|
-
return leadingZeros + 2;
|
|
28
|
-
}
|
|
29
|
-
function formatDisplayPrice(price) {
|
|
30
|
-
if (price === null || price === void 0) return "";
|
|
31
|
-
const priceStr = String(price);
|
|
32
|
-
const parts = priceStr.split(" ");
|
|
33
|
-
const numericPart = parts[0];
|
|
34
|
-
const currencyPart = parts.length > 1 ? parts.slice(1).join(" ") : "";
|
|
35
|
-
const num = Number(numericPart);
|
|
36
|
-
if (isNaN(num)) return priceStr;
|
|
37
|
-
const maxDecimals = adaptiveDecimals(num);
|
|
38
|
-
const formatted = num.toLocaleString(void 0, {
|
|
39
|
-
minimumFractionDigits: Math.min(2, maxDecimals),
|
|
40
|
-
maximumFractionDigits: maxDecimals
|
|
41
|
-
});
|
|
42
|
-
return currencyPart ? `${formatted} ${currencyPart}` : formatted;
|
|
43
|
-
}
|
|
44
|
-
var CURRENCY_ICONS = {
|
|
45
|
-
USDC: "/usdc.svg",
|
|
46
|
-
USDT: "/usdt.svg",
|
|
47
|
-
ETH: "/eth.svg",
|
|
48
|
-
STRK: "/strk.svg",
|
|
49
|
-
WBTC: "/btc.svg"
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
50
9
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
{
|
|
57
|
-
src,
|
|
58
|
-
alt: symbol ?? "",
|
|
59
|
-
width: size,
|
|
60
|
-
height: size,
|
|
61
|
-
className: cn("inline-block shrink-0", className),
|
|
62
|
-
unoptimized: true
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
function CurrencyAmount({
|
|
67
|
-
amount,
|
|
68
|
-
symbol,
|
|
69
|
-
amountClassName,
|
|
70
|
-
iconSize = 14,
|
|
71
|
-
className
|
|
72
|
-
}) {
|
|
73
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("inline-flex items-center gap-1", className), children: [
|
|
74
|
-
/* @__PURE__ */ jsxRuntime.jsx(CurrencyIcon, { symbol, size: iconSize }),
|
|
75
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: amountClassName, children: amount })
|
|
76
|
-
] });
|
|
77
|
-
}
|
|
78
|
-
var IP_TYPE_CONFIG = [
|
|
79
|
-
{ slug: "audio", label: "Audio", icon: lucideReact.Music, colorClass: "text-violet-400", bgClass: "bg-violet-500/10", apiValue: "Audio" },
|
|
80
|
-
{ slug: "video", label: "Video", icon: lucideReact.Film, colorClass: "text-red-400", bgClass: "bg-red-500/10", apiValue: "Video" },
|
|
81
|
-
{ slug: "art", label: "Art", icon: lucideReact.Palette, colorClass: "text-pink-400", bgClass: "bg-pink-500/10", apiValue: "Art" },
|
|
82
|
-
{ slug: "photography", label: "Photography", icon: lucideReact.Camera, colorClass: "text-amber-400", bgClass: "bg-amber-500/10", apiValue: "Photography" },
|
|
83
|
-
{ slug: "nft", label: "NFT", icon: lucideReact.Gem, colorClass: "text-blue-400", bgClass: "bg-blue-500/10", apiValue: null },
|
|
84
|
-
{ slug: "software", label: "Software", icon: lucideReact.Code, colorClass: "text-cyan-400", bgClass: "bg-cyan-500/10", apiValue: "Software" },
|
|
85
|
-
{ slug: "rwa", label: "RWA", icon: lucideReact.Building, colorClass: "text-lime-400", bgClass: "bg-lime-500/10", apiValue: "RWA" },
|
|
86
|
-
{ slug: "patents", label: "Patents", icon: lucideReact.Award, colorClass: "text-emerald-400", bgClass: "bg-emerald-500/10", apiValue: "Patents" },
|
|
87
|
-
{ slug: "posts", label: "Posts", icon: lucideReact.FileText, colorClass: "text-orange-400", bgClass: "bg-orange-500/10", apiValue: "Posts" },
|
|
88
|
-
{ slug: "publications", label: "Publications", icon: lucideReact.BookOpen, colorClass: "text-teal-400", bgClass: "bg-teal-500/10", apiValue: "Publications" },
|
|
89
|
-
{ slug: "documents", label: "Documents", icon: lucideReact.File, colorClass: "text-slate-400", bgClass: "bg-slate-500/10", apiValue: "Documents" },
|
|
90
|
-
{ slug: "custom", label: "Custom", icon: lucideReact.Layers, colorClass: "text-indigo-400", bgClass: "bg-indigo-500/10", apiValue: "Custom" }
|
|
91
|
-
];
|
|
92
|
-
var IP_TYPE_MAP = Object.fromEntries(
|
|
93
|
-
IP_TYPE_CONFIG.map((c) => [c.slug, c])
|
|
94
|
-
);
|
|
95
|
-
var SIZE = {
|
|
96
|
-
sm: { container: "h-6 w-6", icon: "h-3 w-3" },
|
|
97
|
-
md: { container: "h-8 w-8", icon: "h-4 w-4" }
|
|
98
|
-
};
|
|
99
|
-
function IpTypeBadge({ ipType, size = "sm", className, baseUrl = "" }) {
|
|
100
|
-
const config = IP_TYPE_CONFIG.find(
|
|
101
|
-
(c) => c.label === ipType || c.apiValue === ipType
|
|
102
|
-
);
|
|
103
|
-
if (!config) return null;
|
|
104
|
-
const { icon: Icon, colorClass, bgClass, slug, label } = config;
|
|
105
|
-
const { container, icon } = SIZE[size];
|
|
106
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
107
|
-
"a",
|
|
108
|
-
{
|
|
109
|
-
href: `${baseUrl}/${slug}`,
|
|
110
|
-
title: label,
|
|
111
|
-
className: cn(
|
|
112
|
-
"inline-flex items-center justify-center rounded-full",
|
|
113
|
-
"transition-opacity hover:opacity-80",
|
|
114
|
-
bgClass,
|
|
115
|
-
container,
|
|
116
|
-
className
|
|
117
|
-
),
|
|
118
|
-
onClick: (e) => e.stopPropagation(),
|
|
119
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: cn(colorClass, icon) })
|
|
120
|
-
}
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
function MedialaneIcon({ size = 256, href = "/", className }) {
|
|
124
|
-
const { resolvedTheme } = nextThemes.useTheme();
|
|
125
|
-
const [mounted, setMounted] = react.useState(false);
|
|
126
|
-
react.useEffect(() => {
|
|
127
|
-
setMounted(true);
|
|
128
|
-
}, []);
|
|
129
|
-
if (!mounted) {
|
|
130
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href, className, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: size, height: size } }) });
|
|
131
|
-
}
|
|
132
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
133
|
-
Link__default.default,
|
|
134
|
-
{
|
|
135
|
-
href,
|
|
136
|
-
className: `transition-opacity hover:opacity-80 drop-shadow-md ${className ?? ""}`,
|
|
137
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138
|
-
Image3__default.default,
|
|
139
|
-
{
|
|
140
|
-
src: resolvedTheme === "dark" ? "/icon.png" : "/icon.png",
|
|
141
|
-
alt: "Medialane",
|
|
142
|
-
width: size,
|
|
143
|
-
height: size,
|
|
144
|
-
priority: true
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
function MedialaneLogoFull({
|
|
151
|
-
width = 196,
|
|
152
|
-
height = 34,
|
|
153
|
-
href = "/",
|
|
154
|
-
className
|
|
155
|
-
}) {
|
|
156
|
-
const { resolvedTheme } = nextThemes.useTheme();
|
|
157
|
-
const [mounted, setMounted] = react.useState(false);
|
|
158
|
-
react.useEffect(() => {
|
|
159
|
-
setMounted(true);
|
|
160
|
-
}, []);
|
|
161
|
-
if (!mounted) {
|
|
162
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href, className, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width, height } }) }) });
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
163
15
|
}
|
|
164
|
-
return
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
__export(index_exports, {
|
|
21
|
+
CurrencyAmount: () => import_currency_icon.CurrencyAmount,
|
|
22
|
+
CurrencyIcon: () => import_currency_icon.CurrencyIcon,
|
|
23
|
+
IP_TYPE_CONFIG: () => import_ip_type_badge.IP_TYPE_CONFIG,
|
|
24
|
+
IP_TYPE_DATA: () => import_ip_type_badge.IP_TYPE_DATA,
|
|
25
|
+
IP_TYPE_DATA_MAP: () => import_ip_type_badge.IP_TYPE_DATA_MAP,
|
|
26
|
+
IP_TYPE_MAP: () => import_ip_type_badge.IP_TYPE_MAP,
|
|
27
|
+
IpTypeBadge: () => import_ip_type_badge.IpTypeBadge,
|
|
28
|
+
MedialaneIcon: () => import_brand_icon.MedialaneIcon,
|
|
29
|
+
MedialaneLogoFull: () => import_brand_logo.MedialaneLogoFull,
|
|
30
|
+
cn: () => import_cn.cn,
|
|
31
|
+
formatDisplayPrice: () => import_format.formatDisplayPrice
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(index_exports);
|
|
34
|
+
var import_cn = require("./utils/cn.js");
|
|
35
|
+
var import_format = require("./utils/format.js");
|
|
36
|
+
var import_currency_icon = require("./components/currency-icon.js");
|
|
37
|
+
var import_ip_type_badge = require("./components/ip-type-badge.js");
|
|
38
|
+
var import_brand_icon = require("./components/brand-icon.js");
|
|
39
|
+
var import_brand_logo = require("./components/brand-logo.js");
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
CurrencyAmount,
|
|
43
|
+
CurrencyIcon,
|
|
44
|
+
IP_TYPE_CONFIG,
|
|
45
|
+
IP_TYPE_DATA,
|
|
46
|
+
IP_TYPE_DATA_MAP,
|
|
47
|
+
IP_TYPE_MAP,
|
|
48
|
+
IpTypeBadge,
|
|
49
|
+
MedialaneIcon,
|
|
50
|
+
MedialaneLogoFull,
|
|
51
|
+
cn,
|
|
52
|
+
formatDisplayPrice
|
|
53
|
+
});
|
|
202
54
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/cn.ts","../src/utils/format.ts","../src/components/currency-icon.tsx","../src/components/ip-type-badge.tsx","../src/components/brand-icon.tsx","../src/components/brand-logo.tsx"],"names":["twMerge","clsx","jsx","Image","Music","Film","Palette","Camera","Gem","Code","Building","Award","FileText","BookOpen","File","Layers","useTheme","useState","useEffect","Link"],"mappings":";;;;;;;;;;;;;;;;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J;AAEA,EAAA,uBACEA,cAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,+BACb,QAAA,kBAAAA,cAAAA;AAAA,IAACiB,qBAAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,SAAA,EAAW,CAAA,mDAAA,EAAsD,SAAA,IAAa,EAAE,CAAA,CAAA;AAAA,MAE/E,QAAA,EAAA,aAAA,KAAkB,yBACjBjB,cAAAA;AAAA,QAACC,uBAAAA;AAAA,QAAA;AAAA,UACC,GAAA,EAAI,2BAAA;AAAA,UACJ,GAAA,EAAI,WAAA;AAAA,UACJ,KAAA;AAAA,UACA,MAAA;AAAA,UACA,QAAA,EAAQ;AAAA;AAAA,0BAGVD,cAAAA;AAAA,QAACC,uBAAAA;AAAA,QAAA;AAAA,UACC,GAAA,EAAI,0BAAA;AAAA,UACJ,GAAA,EAAI,WAAA;AAAA,UACJ,KAAA;AAAA,UACA,MAAA;AAAA,UACA,QAAA,EAAQ;AAAA;AAAA;AACV;AAAA,GAEJ,EACF,CAAA;AAEJ","file":"index.cjs","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","function adaptiveDecimals(num: number): number {\n if (num === 0 || num >= 1) return 2;\n if (num >= 0.01) return 4;\n const leadingZeros = Math.floor(-Math.log10(Math.abs(num)));\n return leadingZeros + 2;\n}\n\n/**\n * Format a display price string with adaptive decimal places.\n * Handles \"1.234 USDC\" format — reformats the numeric part, preserves the symbol.\n */\nexport function formatDisplayPrice(price: string | number | null | undefined): string {\n if (price === null || price === undefined) return \"\";\n const priceStr = String(price);\n const parts = priceStr.split(\" \");\n const numericPart = parts[0];\n const currencyPart = parts.length > 1 ? parts.slice(1).join(\" \") : \"\";\n const num = Number(numericPart);\n if (isNaN(num)) return priceStr;\n const maxDecimals = adaptiveDecimals(num);\n const formatted = num.toLocaleString(undefined, {\n minimumFractionDigits: Math.min(2, maxDecimals),\n maximumFractionDigits: maxDecimals,\n });\n return currencyPart ? `${formatted} ${currencyPart}` : formatted;\n}\n","\"use client\";\n\nimport Image from \"next/image\";\nimport { cn } from \"../utils/cn.js\";\n\nconst CURRENCY_ICONS: Record<string, string> = {\n USDC: \"/usdc.svg\",\n USDT: \"/usdt.svg\",\n ETH: \"/eth.svg\",\n STRK: \"/strk.svg\",\n WBTC: \"/btc.svg\",\n};\n\nexport interface CurrencyIconProps {\n symbol: string | null | undefined;\n size?: number;\n className?: string;\n}\n\nexport function CurrencyIcon({ symbol, size = 16, className }: CurrencyIconProps) {\n const src = symbol ? CURRENCY_ICONS[symbol] : undefined;\n if (!src) return null;\n return (\n <Image\n src={src}\n alt={symbol ?? \"\"}\n width={size}\n height={size}\n className={cn(\"inline-block shrink-0\", className)}\n unoptimized\n />\n );\n}\n\nexport interface CurrencyAmountProps {\n amount: string;\n symbol: string | null | undefined;\n amountClassName?: string;\n iconSize?: number;\n className?: string;\n}\n\nexport function CurrencyAmount({\n amount,\n symbol,\n amountClassName,\n iconSize = 14,\n className,\n}: CurrencyAmountProps) {\n return (\n <span className={cn(\"inline-flex items-center gap-1\", className)}>\n <CurrencyIcon symbol={symbol} size={iconSize} />\n <span className={amountClassName}>{amount}</span>\n </span>\n );\n}\n","\"use client\";\n\nimport {\n Music, Palette, Film, Camera, Gem, Award,\n FileText, BookOpen, File, Building, Code, Layers,\n} from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface IpTypeConfig {\n slug: string;\n label: string;\n icon: React.ElementType;\n colorClass: string;\n bgClass: string;\n /** API ipType value — null means \"nft\" special case */\n apiValue: string | null;\n}\n\nexport const IP_TYPE_CONFIG: IpTypeConfig[] = [\n { slug: \"audio\", label: \"Audio\", icon: Music, colorClass: \"text-violet-400\", bgClass: \"bg-violet-500/10\", apiValue: \"Audio\" },\n { slug: \"video\", label: \"Video\", icon: Film, colorClass: \"text-red-400\", bgClass: \"bg-red-500/10\", apiValue: \"Video\" },\n { slug: \"art\", label: \"Art\", icon: Palette, colorClass: \"text-pink-400\", bgClass: \"bg-pink-500/10\", apiValue: \"Art\" },\n { slug: \"photography\", label: \"Photography\", icon: Camera, colorClass: \"text-amber-400\", bgClass: \"bg-amber-500/10\", apiValue: \"Photography\" },\n { slug: \"nft\", label: \"NFT\", icon: Gem, colorClass: \"text-blue-400\", bgClass: \"bg-blue-500/10\", apiValue: null },\n { slug: \"software\", label: \"Software\", icon: Code, colorClass: \"text-cyan-400\", bgClass: \"bg-cyan-500/10\", apiValue: \"Software\" },\n { slug: \"rwa\", label: \"RWA\", icon: Building, colorClass: \"text-lime-400\", bgClass: \"bg-lime-500/10\", apiValue: \"RWA\" },\n { slug: \"patents\", label: \"Patents\", icon: Award, colorClass: \"text-emerald-400\", bgClass: \"bg-emerald-500/10\", apiValue: \"Patents\" },\n { slug: \"posts\", label: \"Posts\", icon: FileText, colorClass: \"text-orange-400\", bgClass: \"bg-orange-500/10\", apiValue: \"Posts\" },\n { slug: \"publications\", label: \"Publications\", icon: BookOpen, colorClass: \"text-teal-400\", bgClass: \"bg-teal-500/10\", apiValue: \"Publications\" },\n { slug: \"documents\", label: \"Documents\", icon: File, colorClass: \"text-slate-400\", bgClass: \"bg-slate-500/10\", apiValue: \"Documents\" },\n { slug: \"custom\", label: \"Custom\", icon: Layers, colorClass: \"text-indigo-400\", bgClass: \"bg-indigo-500/10\", apiValue: \"Custom\" },\n];\n\nexport const IP_TYPE_MAP = Object.fromEntries(\n IP_TYPE_CONFIG.map((c) => [c.slug, c])\n) as Record<string, IpTypeConfig>;\n\nconst SIZE = {\n sm: { container: \"h-6 w-6\", icon: \"h-3 w-3\" },\n md: { container: \"h-8 w-8\", icon: \"h-4 w-4\" },\n};\n\nexport interface IpTypeBadgeProps {\n ipType: string;\n size?: \"sm\" | \"md\";\n className?: string;\n /** Base URL for IP type pages. Default: \"\" (relative). Example: \"https://medialane.io\" */\n baseUrl?: string;\n}\n\nexport function IpTypeBadge({ ipType, size = \"sm\", className, baseUrl = \"\" }: IpTypeBadgeProps) {\n const config = IP_TYPE_CONFIG.find(\n (c) => c.label === ipType || c.apiValue === ipType\n );\n if (!config) return null;\n const { icon: Icon, colorClass, bgClass, slug, label } = config;\n const { container, icon } = SIZE[size];\n return (\n <a\n href={`${baseUrl}/${slug}`}\n title={label}\n className={cn(\n \"inline-flex items-center justify-center rounded-full\",\n \"transition-opacity hover:opacity-80\",\n bgClass,\n container,\n className\n )}\n onClick={(e) => e.stopPropagation()}\n >\n <Icon className={cn(colorClass, icon)} />\n </a>\n );\n}\n","\"use client\";\n\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { useTheme } from \"next-themes\";\nimport { useEffect, useState } from \"react\";\n\nexport interface MedialaneIconProps {\n size?: number;\n href?: string;\n className?: string;\n}\n\nexport function MedialaneIcon({ size = 256, href = \"/\", className }: MedialaneIconProps) {\n const { resolvedTheme } = useTheme();\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) {\n return (\n <Link href={href} className={className}>\n <div style={{ width: size, height: size }} />\n </Link>\n );\n }\n\n return (\n <Link\n href={href}\n className={`transition-opacity hover:opacity-80 drop-shadow-md ${className ?? \"\"}`}\n >\n <Image\n src={resolvedTheme === \"dark\" ? \"/icon.png\" : \"/icon.png\"}\n alt=\"Medialane\"\n width={size}\n height={size}\n priority\n />\n </Link>\n );\n}\n","\"use client\";\n\nimport Link from \"next/link\";\nimport Image from \"next/image\";\nimport { useTheme } from \"next-themes\";\nimport { useEffect, useState } from \"react\";\n\nexport interface MedialaneLogoFullProps {\n width?: number;\n height?: number;\n href?: string;\n className?: string;\n}\n\nexport function MedialaneLogoFull({\n width = 196,\n height = 34,\n href = \"/\",\n className,\n}: MedialaneLogoFullProps) {\n const { resolvedTheme } = useTheme();\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) {\n return (\n <div className=\"flex items-center space-x-2\">\n <Link href={href} className={className}>\n <div style={{ width, height }} />\n </Link>\n </div>\n );\n }\n\n return (\n <div className=\"flex items-center space-x-2\">\n <Link\n href={href}\n className={`transition-opacity hover:opacity-80 drop-shadow-md ${className ?? \"\"}`}\n >\n {resolvedTheme === \"dark\" ? (\n <Image\n src=\"/medialane-light-logo.png\"\n alt=\"Medialane\"\n width={width}\n height={height}\n priority\n />\n ) : (\n <Image\n src=\"/medialane-dark-logo.png\"\n alt=\"Medialane\"\n width={width}\n height={height}\n priority\n />\n )}\n </Link>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice } from \"./utils/format.js\";\n\nexport { CurrencyIcon, CurrencyAmount } from \"./components/currency-icon.js\";\nexport type { CurrencyIconProps, CurrencyAmountProps } from \"./components/currency-icon.js\";\n\nexport { IpTypeBadge, IP_TYPE_CONFIG, IP_TYPE_MAP, IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"./components/ip-type-badge.js\";\nexport type { IpTypeBadgeProps, IpTypeConfig, IpTypeData } from \"./components/ip-type-badge.js\";\n\nexport { MedialaneIcon } from \"./components/brand-icon.js\";\nexport type { MedialaneIconProps } from \"./components/brand-icon.js\";\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAmB;AACnB,oBAAmC;AAEnC,2BAA6C;AAG7C,2BAAyF;AAGzF,wBAA8B;AAE9B,wBAAkC;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,62 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
declare function formatDisplayPrice(price: string | number | null | undefined): string;
|
|
11
|
-
|
|
12
|
-
interface CurrencyIconProps {
|
|
13
|
-
symbol: string | null | undefined;
|
|
14
|
-
size?: number;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
declare function CurrencyIcon({ symbol, size, className }: CurrencyIconProps): react_jsx_runtime.JSX.Element | null;
|
|
18
|
-
interface CurrencyAmountProps {
|
|
19
|
-
amount: string;
|
|
20
|
-
symbol: string | null | undefined;
|
|
21
|
-
amountClassName?: string;
|
|
22
|
-
iconSize?: number;
|
|
23
|
-
className?: string;
|
|
24
|
-
}
|
|
25
|
-
declare function CurrencyAmount({ amount, symbol, amountClassName, iconSize, className, }: CurrencyAmountProps): react_jsx_runtime.JSX.Element;
|
|
26
|
-
|
|
27
|
-
interface IpTypeConfig {
|
|
28
|
-
slug: string;
|
|
29
|
-
label: string;
|
|
30
|
-
icon: React.ElementType;
|
|
31
|
-
colorClass: string;
|
|
32
|
-
bgClass: string;
|
|
33
|
-
/** API ipType value — null means "nft" special case */
|
|
34
|
-
apiValue: string | null;
|
|
35
|
-
}
|
|
36
|
-
declare const IP_TYPE_CONFIG: IpTypeConfig[];
|
|
37
|
-
declare const IP_TYPE_MAP: Record<string, IpTypeConfig>;
|
|
38
|
-
interface IpTypeBadgeProps {
|
|
39
|
-
ipType: string;
|
|
40
|
-
size?: "sm" | "md";
|
|
41
|
-
className?: string;
|
|
42
|
-
/** Base URL for IP type pages. Default: "" (relative). Example: "https://medialane.io" */
|
|
43
|
-
baseUrl?: string;
|
|
44
|
-
}
|
|
45
|
-
declare function IpTypeBadge({ ipType, size, className, baseUrl }: IpTypeBadgeProps): react_jsx_runtime.JSX.Element | null;
|
|
46
|
-
|
|
47
|
-
interface MedialaneIconProps {
|
|
48
|
-
size?: number;
|
|
49
|
-
href?: string;
|
|
50
|
-
className?: string;
|
|
51
|
-
}
|
|
52
|
-
declare function MedialaneIcon({ size, href, className }: MedialaneIconProps): react_jsx_runtime.JSX.Element;
|
|
53
|
-
|
|
54
|
-
interface MedialaneLogoFullProps {
|
|
55
|
-
width?: number;
|
|
56
|
-
height?: number;
|
|
57
|
-
href?: string;
|
|
58
|
-
className?: string;
|
|
59
|
-
}
|
|
60
|
-
declare function MedialaneLogoFull({ width, height, href, className, }: MedialaneLogoFullProps): react_jsx_runtime.JSX.Element;
|
|
61
|
-
|
|
62
|
-
export { CurrencyAmount, type CurrencyAmountProps, CurrencyIcon, type CurrencyIconProps, IP_TYPE_CONFIG, IP_TYPE_MAP, IpTypeBadge, type IpTypeBadgeProps, type IpTypeConfig, MedialaneIcon, type MedialaneIconProps, MedialaneLogoFull, type MedialaneLogoFullProps, cn, formatDisplayPrice };
|
|
1
|
+
export { cn } from './utils/cn.cjs';
|
|
2
|
+
export { formatDisplayPrice } from './utils/format.cjs';
|
|
3
|
+
export { CurrencyAmount, CurrencyAmountProps, CurrencyIcon, CurrencyIconProps } from './components/currency-icon.cjs';
|
|
4
|
+
export { IP_TYPE_CONFIG, IP_TYPE_MAP, IpTypeBadge, IpTypeBadgeProps, IpTypeConfig } from './components/ip-type-badge.cjs';
|
|
5
|
+
export { MedialaneIcon, MedialaneIconProps } from './components/brand-icon.cjs';
|
|
6
|
+
export { MedialaneLogoFull, MedialaneLogoFullProps } from './components/brand-logo.cjs';
|
|
7
|
+
export { IP_TYPE_DATA, IP_TYPE_DATA_MAP, IpTypeData } from './data/ip-types.cjs';
|
|
8
|
+
import 'clsx';
|
|
9
|
+
import 'react/jsx-runtime';
|