@medialane/ui 0.1.0 → 0.1.2
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 +71 -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 +37 -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 +78 -0
- package/dist/components/currency-icon.cjs.map +1 -0
- package/dist/components/currency-icon.d.cts +18 -0
- package/dist/components/currency-icon.d.ts +18 -0
- package/dist/components/currency-icon.js +43 -0
- package/dist/components/currency-icon.js.map +1 -0
- package/dist/components/ip-type-badge.cjs +81 -0
- package/dist/components/ip-type-badge.cjs.map +1 -0
- package/dist/components/ip-type-badge.d.cts +23 -0
- package/dist/components/ip-type-badge.d.ts +23 -0
- package/dist/components/ip-type-badge.js +68 -0
- package/dist/components/ip-type-badge.js.map +1 -0
- package/dist/index.cjs +47 -199
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -62
- package/dist/index.d.ts +8 -62
- package/dist/index.js +16 -185
- package/dist/index.js.map +1 -1
- package/dist/preset/tailwind.cjs +28 -9
- package/dist/preset/tailwind.cjs.map +1 -1
- package/dist/preset/tailwind.js +8 -8
- 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,71 @@
|
|
|
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 brand_icon_exports = {};
|
|
31
|
+
__export(brand_icon_exports, {
|
|
32
|
+
MedialaneIcon: () => MedialaneIcon
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(brand_icon_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_next_themes = require("next-themes");
|
|
39
|
+
var import_react = require("react");
|
|
40
|
+
function MedialaneIcon({ size = 256, href = "/", className }) {
|
|
41
|
+
const { resolvedTheme } = (0, import_next_themes.useTheme)();
|
|
42
|
+
const [mounted, setMounted] = (0, import_react.useState)(false);
|
|
43
|
+
(0, import_react.useEffect)(() => {
|
|
44
|
+
setMounted(true);
|
|
45
|
+
}, []);
|
|
46
|
+
if (!mounted) {
|
|
47
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href, className, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { width: size, height: size } }) });
|
|
48
|
+
}
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
+
import_link.default,
|
|
51
|
+
{
|
|
52
|
+
href,
|
|
53
|
+
className: `transition-opacity hover:opacity-80 drop-shadow-md ${className ?? ""}`,
|
|
54
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
import_image.default,
|
|
56
|
+
{
|
|
57
|
+
src: resolvedTheme === "dark" ? "/icon.png" : "/icon.png",
|
|
58
|
+
alt: "Medialane",
|
|
59
|
+
width: size,
|
|
60
|
+
height: size,
|
|
61
|
+
priority: true
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
+
0 && (module.exports = {
|
|
69
|
+
MedialaneIcon
|
|
70
|
+
});
|
|
71
|
+
//# sourceMappingURL=brand-icon.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/brand-icon.tsx"],"sourcesContent":["\"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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBQ;AAtBR,mBAAkB;AAClB,kBAAiB;AACjB,yBAAyB;AACzB,mBAAoC;AAQ7B,SAAS,cAAc,EAAE,OAAO,KAAK,OAAO,KAAK,UAAU,GAAuB;AACvF,QAAM,EAAE,cAAc,QAAI,6BAAS;AACnC,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,KAAK;AAE5C,8BAAU,MAAM;AACd,eAAW,IAAI;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,MAAI,CAAC,SAAS;AACZ,WACE,4CAAC,YAAAA,SAAA,EAAK,MAAY,WAChB,sDAAC,SAAI,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK,GAAG,GAC7C;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC,YAAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,sDAAsD,aAAa,EAAE;AAAA,MAEhF;AAAA,QAAC,aAAAC;AAAA,QAAA;AAAA,UACC,KAAK,kBAAkB,SAAS,cAAc;AAAA,UAC9C,KAAI;AAAA,UACJ,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,UAAQ;AAAA;AAAA,MACV;AAAA;AAAA,EACF;AAEJ;","names":["Link","Image"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface MedialaneIconProps {
|
|
4
|
+
size?: number;
|
|
5
|
+
href?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function MedialaneIcon({ size, href, className }: MedialaneIconProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { MedialaneIcon, type MedialaneIconProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface MedialaneIconProps {
|
|
4
|
+
size?: number;
|
|
5
|
+
href?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function MedialaneIcon({ size, href, className }: MedialaneIconProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { MedialaneIcon, type MedialaneIconProps };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import Image from "next/image";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
import { useTheme } from "next-themes";
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
function MedialaneIcon({ size = 256, href = "/", className }) {
|
|
8
|
+
const { resolvedTheme } = useTheme();
|
|
9
|
+
const [mounted, setMounted] = useState(false);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
setMounted(true);
|
|
12
|
+
}, []);
|
|
13
|
+
if (!mounted) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Link, { href, className, children: /* @__PURE__ */ jsx("div", { style: { width: size, height: size } }) });
|
|
15
|
+
}
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
Link,
|
|
18
|
+
{
|
|
19
|
+
href,
|
|
20
|
+
className: `transition-opacity hover:opacity-80 drop-shadow-md ${className ?? ""}`,
|
|
21
|
+
children: /* @__PURE__ */ jsx(
|
|
22
|
+
Image,
|
|
23
|
+
{
|
|
24
|
+
src: resolvedTheme === "dark" ? "/icon.png" : "/icon.png",
|
|
25
|
+
alt: "Medialane",
|
|
26
|
+
width: size,
|
|
27
|
+
height: size,
|
|
28
|
+
priority: true
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
MedialaneIcon
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=brand-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/brand-icon.tsx"],"sourcesContent":["\"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"],"mappings":";AAwBQ;AAtBR,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,gBAAgB;AACzB,SAAS,WAAW,gBAAgB;AAQ7B,SAAS,cAAc,EAAE,OAAO,KAAK,OAAO,KAAK,UAAU,GAAuB;AACvF,QAAM,EAAE,cAAc,IAAI,SAAS;AACnC,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAE5C,YAAU,MAAM;AACd,eAAW,IAAI;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,MAAI,CAAC,SAAS;AACZ,WACE,oBAAC,QAAK,MAAY,WAChB,8BAAC,SAAI,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK,GAAG,GAC7C;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,sDAAsD,aAAa,EAAE;AAAA,MAEhF;AAAA,QAAC;AAAA;AAAA,UACC,KAAK,kBAAkB,SAAS,cAAc;AAAA,UAC9C,KAAI;AAAA,UACJ,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,UAAQ;AAAA;AAAA,MACV;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,85 @@
|
|
|
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 brand_logo_exports = {};
|
|
31
|
+
__export(brand_logo_exports, {
|
|
32
|
+
MedialaneLogoFull: () => MedialaneLogoFull
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(brand_logo_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_link = __toESM(require("next/link"), 1);
|
|
37
|
+
var import_image = __toESM(require("next/image"), 1);
|
|
38
|
+
var import_next_themes = require("next-themes");
|
|
39
|
+
var import_react = require("react");
|
|
40
|
+
function MedialaneLogoFull({
|
|
41
|
+
width = 196,
|
|
42
|
+
height = 34,
|
|
43
|
+
href = "/",
|
|
44
|
+
className
|
|
45
|
+
}) {
|
|
46
|
+
const { resolvedTheme } = (0, import_next_themes.useTheme)();
|
|
47
|
+
const [mounted, setMounted] = (0, import_react.useState)(false);
|
|
48
|
+
(0, import_react.useEffect)(() => {
|
|
49
|
+
setMounted(true);
|
|
50
|
+
}, []);
|
|
51
|
+
if (!mounted) {
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href, className, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { width, height } }) }) });
|
|
53
|
+
}
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
import_link.default,
|
|
56
|
+
{
|
|
57
|
+
href,
|
|
58
|
+
className: `transition-opacity hover:opacity-80 drop-shadow-md ${className ?? ""}`,
|
|
59
|
+
children: resolvedTheme === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
+
import_image.default,
|
|
61
|
+
{
|
|
62
|
+
src: "/medialane-light-logo.png",
|
|
63
|
+
alt: "Medialane",
|
|
64
|
+
width,
|
|
65
|
+
height,
|
|
66
|
+
priority: true
|
|
67
|
+
}
|
|
68
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
|
+
import_image.default,
|
|
70
|
+
{
|
|
71
|
+
src: "/medialane-dark-logo.png",
|
|
72
|
+
alt: "Medialane",
|
|
73
|
+
width,
|
|
74
|
+
height,
|
|
75
|
+
priority: true
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
) });
|
|
80
|
+
}
|
|
81
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
+
0 && (module.exports = {
|
|
83
|
+
MedialaneLogoFull
|
|
84
|
+
});
|
|
85
|
+
//# sourceMappingURL=brand-logo.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/brand-logo.tsx"],"sourcesContent":["\"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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BU;AA7BV,kBAAiB;AACjB,mBAAkB;AAClB,yBAAyB;AACzB,mBAAoC;AAS7B,SAAS,kBAAkB;AAAA,EAChC,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP;AACF,GAA2B;AACzB,QAAM,EAAE,cAAc,QAAI,6BAAS;AACnC,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,KAAK;AAE5C,8BAAU,MAAM;AACd,eAAW,IAAI;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,MAAI,CAAC,SAAS;AACZ,WACE,4CAAC,SAAI,WAAU,+BACb,sDAAC,YAAAA,SAAA,EAAK,MAAY,WAChB,sDAAC,SAAI,OAAO,EAAE,OAAO,OAAO,GAAG,GACjC,GACF;AAAA,EAEJ;AAEA,SACE,4CAAC,SAAI,WAAU,+BACb;AAAA,IAAC,YAAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,sDAAsD,aAAa,EAAE;AAAA,MAE/E,4BAAkB,SACjB;AAAA,QAAC,aAAAC;AAAA,QAAA;AAAA,UACC,KAAI;AAAA,UACJ,KAAI;AAAA,UACJ;AAAA,UACA;AAAA,UACA,UAAQ;AAAA;AAAA,MACV,IAEA;AAAA,QAAC,aAAAA;AAAA,QAAA;AAAA,UACC,KAAI;AAAA,UACJ,KAAI;AAAA,UACJ;AAAA,UACA;AAAA,UACA,UAAQ;AAAA;AAAA,MACV;AAAA;AAAA,EAEJ,GACF;AAEJ;","names":["Link","Image"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface MedialaneLogoFullProps {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
href?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function MedialaneLogoFull({ width, height, href, className, }: MedialaneLogoFullProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { MedialaneLogoFull, type MedialaneLogoFullProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface MedialaneLogoFullProps {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
href?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function MedialaneLogoFull({ width, height, href, className, }: MedialaneLogoFullProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { MedialaneLogoFull, type MedialaneLogoFullProps };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import Image from "next/image";
|
|
5
|
+
import { useTheme } from "next-themes";
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
function MedialaneLogoFull({
|
|
8
|
+
width = 196,
|
|
9
|
+
height = 34,
|
|
10
|
+
href = "/",
|
|
11
|
+
className
|
|
12
|
+
}) {
|
|
13
|
+
const { resolvedTheme } = useTheme();
|
|
14
|
+
const [mounted, setMounted] = useState(false);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
setMounted(true);
|
|
17
|
+
}, []);
|
|
18
|
+
if (!mounted) {
|
|
19
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ jsx(Link, { href, className, children: /* @__PURE__ */ jsx("div", { style: { width, height } }) }) });
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ jsx(
|
|
22
|
+
Link,
|
|
23
|
+
{
|
|
24
|
+
href,
|
|
25
|
+
className: `transition-opacity hover:opacity-80 drop-shadow-md ${className ?? ""}`,
|
|
26
|
+
children: resolvedTheme === "dark" ? /* @__PURE__ */ jsx(
|
|
27
|
+
Image,
|
|
28
|
+
{
|
|
29
|
+
src: "/medialane-light-logo.png",
|
|
30
|
+
alt: "Medialane",
|
|
31
|
+
width,
|
|
32
|
+
height,
|
|
33
|
+
priority: true
|
|
34
|
+
}
|
|
35
|
+
) : /* @__PURE__ */ jsx(
|
|
36
|
+
Image,
|
|
37
|
+
{
|
|
38
|
+
src: "/medialane-dark-logo.png",
|
|
39
|
+
alt: "Medialane",
|
|
40
|
+
width,
|
|
41
|
+
height,
|
|
42
|
+
priority: true
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
) });
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
MedialaneLogoFull
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=brand-logo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/brand-logo.tsx"],"sourcesContent":["\"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"],"mappings":";AA+BU;AA7BV,OAAO,UAAU;AACjB,OAAO,WAAW;AAClB,SAAS,gBAAgB;AACzB,SAAS,WAAW,gBAAgB;AAS7B,SAAS,kBAAkB;AAAA,EAChC,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP;AACF,GAA2B;AACzB,QAAM,EAAE,cAAc,IAAI,SAAS;AACnC,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAE5C,YAAU,MAAM;AACd,eAAW,IAAI;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,MAAI,CAAC,SAAS;AACZ,WACE,oBAAC,SAAI,WAAU,+BACb,8BAAC,QAAK,MAAY,WAChB,8BAAC,SAAI,OAAO,EAAE,OAAO,OAAO,GAAG,GACjC,GACF;AAAA,EAEJ;AAEA,SACE,oBAAC,SAAI,WAAU,+BACb;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,sDAAsD,aAAa,EAAE;AAAA,MAE/E,4BAAkB,SACjB;AAAA,QAAC;AAAA;AAAA,UACC,KAAI;AAAA,UACJ,KAAI;AAAA,UACJ;AAAA,UACA;AAAA,UACA,UAAQ;AAAA;AAAA,MACV,IAEA;AAAA,QAAC;AAAA;AAAA,UACC,KAAI;AAAA,UACJ,KAAI;AAAA,UACJ;AAAA,UACA;AAAA,UACA,UAAQ;AAAA;AAAA,MACV;AAAA;AAAA,EAEJ,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 currency_icon_exports = {};
|
|
31
|
+
__export(currency_icon_exports, {
|
|
32
|
+
CurrencyAmount: () => CurrencyAmount,
|
|
33
|
+
CurrencyIcon: () => CurrencyIcon
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(currency_icon_exports);
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_image = __toESM(require("next/image"), 1);
|
|
38
|
+
var import_cn = require("../utils/cn.js");
|
|
39
|
+
const CURRENCY_ICONS = {
|
|
40
|
+
USDC: "/usdc.svg",
|
|
41
|
+
USDT: "/usdt.svg",
|
|
42
|
+
ETH: "/eth.svg",
|
|
43
|
+
STRK: "/strk.svg",
|
|
44
|
+
WBTC: "/btc.svg"
|
|
45
|
+
};
|
|
46
|
+
function CurrencyIcon({ symbol, size = 16, className }) {
|
|
47
|
+
const src = symbol ? CURRENCY_ICONS[symbol] : void 0;
|
|
48
|
+
if (!src) return null;
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
+
import_image.default,
|
|
51
|
+
{
|
|
52
|
+
src,
|
|
53
|
+
alt: symbol ?? "",
|
|
54
|
+
width: size,
|
|
55
|
+
height: size,
|
|
56
|
+
className: (0, import_cn.cn)("inline-block shrink-0", className),
|
|
57
|
+
unoptimized: true
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
function CurrencyAmount({
|
|
62
|
+
amount,
|
|
63
|
+
symbol,
|
|
64
|
+
amountClassName,
|
|
65
|
+
iconSize = 14,
|
|
66
|
+
className
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: (0, import_cn.cn)("inline-flex items-center gap-1", className), children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CurrencyIcon, { symbol, size: iconSize }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: amountClassName, children: amount })
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
74
|
+
0 && (module.exports = {
|
|
75
|
+
CurrencyAmount,
|
|
76
|
+
CurrencyIcon
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=currency-icon.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/currency-icon.tsx"],"sourcesContent":["\"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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBI;AArBJ,mBAAkB;AAClB,gBAAmB;AAEnB,MAAM,iBAAyC;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AACR;AAQO,SAAS,aAAa,EAAE,QAAQ,OAAO,IAAI,UAAU,GAAsB;AAChF,QAAM,MAAM,SAAS,eAAe,MAAM,IAAI;AAC9C,MAAI,CAAC,IAAK,QAAO;AACjB,SACE;AAAA,IAAC,aAAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA,KAAK,UAAU;AAAA,MACf,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,eAAW,cAAG,yBAAyB,SAAS;AAAA,MAChD,aAAW;AAAA;AAAA,EACb;AAEJ;AAUO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AACF,GAAwB;AACtB,SACE,6CAAC,UAAK,eAAW,cAAG,kCAAkC,SAAS,GAC7D;AAAA,gDAAC,gBAAa,QAAgB,MAAM,UAAU;AAAA,IAC9C,4CAAC,UAAK,WAAW,iBAAkB,kBAAO;AAAA,KAC5C;AAEJ;","names":["Image"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface CurrencyIconProps {
|
|
4
|
+
symbol: string | null | undefined;
|
|
5
|
+
size?: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function CurrencyIcon({ symbol, size, className }: CurrencyIconProps): react_jsx_runtime.JSX.Element | null;
|
|
9
|
+
interface CurrencyAmountProps {
|
|
10
|
+
amount: string;
|
|
11
|
+
symbol: string | null | undefined;
|
|
12
|
+
amountClassName?: string;
|
|
13
|
+
iconSize?: number;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
declare function CurrencyAmount({ amount, symbol, amountClassName, iconSize, className, }: CurrencyAmountProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
export { CurrencyAmount, type CurrencyAmountProps, CurrencyIcon, type CurrencyIconProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface CurrencyIconProps {
|
|
4
|
+
symbol: string | null | undefined;
|
|
5
|
+
size?: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function CurrencyIcon({ symbol, size, className }: CurrencyIconProps): react_jsx_runtime.JSX.Element | null;
|
|
9
|
+
interface CurrencyAmountProps {
|
|
10
|
+
amount: string;
|
|
11
|
+
symbol: string | null | undefined;
|
|
12
|
+
amountClassName?: string;
|
|
13
|
+
iconSize?: number;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
declare function CurrencyAmount({ amount, symbol, amountClassName, iconSize, className, }: CurrencyAmountProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
export { CurrencyAmount, type CurrencyAmountProps, CurrencyIcon, type CurrencyIconProps };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Image from "next/image";
|
|
4
|
+
import { cn } from "../utils/cn.js";
|
|
5
|
+
const CURRENCY_ICONS = {
|
|
6
|
+
USDC: "/usdc.svg",
|
|
7
|
+
USDT: "/usdt.svg",
|
|
8
|
+
ETH: "/eth.svg",
|
|
9
|
+
STRK: "/strk.svg",
|
|
10
|
+
WBTC: "/btc.svg"
|
|
11
|
+
};
|
|
12
|
+
function CurrencyIcon({ symbol, size = 16, className }) {
|
|
13
|
+
const src = symbol ? CURRENCY_ICONS[symbol] : void 0;
|
|
14
|
+
if (!src) return null;
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
Image,
|
|
17
|
+
{
|
|
18
|
+
src,
|
|
19
|
+
alt: symbol ?? "",
|
|
20
|
+
width: size,
|
|
21
|
+
height: size,
|
|
22
|
+
className: cn("inline-block shrink-0", className),
|
|
23
|
+
unoptimized: true
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
function CurrencyAmount({
|
|
28
|
+
amount,
|
|
29
|
+
symbol,
|
|
30
|
+
amountClassName,
|
|
31
|
+
iconSize = 14,
|
|
32
|
+
className
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */ jsxs("span", { className: cn("inline-flex items-center gap-1", className), children: [
|
|
35
|
+
/* @__PURE__ */ jsx(CurrencyIcon, { symbol, size: iconSize }),
|
|
36
|
+
/* @__PURE__ */ jsx("span", { className: amountClassName, children: amount })
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
CurrencyAmount,
|
|
41
|
+
CurrencyIcon
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=currency-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/currency-icon.tsx"],"sourcesContent":["\"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"],"mappings":";AAuBI,cA2BA,YA3BA;AArBJ,OAAO,WAAW;AAClB,SAAS,UAAU;AAEnB,MAAM,iBAAyC;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AACR;AAQO,SAAS,aAAa,EAAE,QAAQ,OAAO,IAAI,UAAU,GAAsB;AAChF,QAAM,MAAM,SAAS,eAAe,MAAM,IAAI;AAC9C,MAAI,CAAC,IAAK,QAAO;AACjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,KAAK,UAAU;AAAA,MACf,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,WAAW,GAAG,yBAAyB,SAAS;AAAA,MAChD,aAAW;AAAA;AAAA,EACb;AAEJ;AAUO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AACF,GAAwB;AACtB,SACE,qBAAC,UAAK,WAAW,GAAG,kCAAkC,SAAS,GAC7D;AAAA,wBAAC,gBAAa,QAAgB,MAAM,UAAU;AAAA,IAC9C,oBAAC,UAAK,WAAW,iBAAkB,kBAAO;AAAA,KAC5C;AAEJ;","names":[]}
|
|
@@ -0,0 +1,81 @@
|
|
|
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 ip_type_badge_exports = {};
|
|
21
|
+
__export(ip_type_badge_exports, {
|
|
22
|
+
IP_TYPE_CONFIG: () => IP_TYPE_CONFIG,
|
|
23
|
+
IP_TYPE_MAP: () => IP_TYPE_MAP,
|
|
24
|
+
IpTypeBadge: () => IpTypeBadge
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(ip_type_badge_exports);
|
|
27
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
+
var import_lucide_react = require("lucide-react");
|
|
29
|
+
var import_cn = require("../utils/cn.js");
|
|
30
|
+
const IP_TYPE_CONFIG = [
|
|
31
|
+
{ slug: "audio", label: "Audio", icon: import_lucide_react.Music, colorClass: "text-violet-400", bgClass: "bg-violet-500/10", apiValue: "Audio" },
|
|
32
|
+
{ slug: "video", label: "Video", icon: import_lucide_react.Film, colorClass: "text-red-400", bgClass: "bg-red-500/10", apiValue: "Video" },
|
|
33
|
+
{ slug: "art", label: "Art", icon: import_lucide_react.Palette, colorClass: "text-pink-400", bgClass: "bg-pink-500/10", apiValue: "Art" },
|
|
34
|
+
{ slug: "photography", label: "Photography", icon: import_lucide_react.Camera, colorClass: "text-amber-400", bgClass: "bg-amber-500/10", apiValue: "Photography" },
|
|
35
|
+
{ slug: "nft", label: "NFT", icon: import_lucide_react.Gem, colorClass: "text-blue-400", bgClass: "bg-blue-500/10", apiValue: null },
|
|
36
|
+
{ slug: "software", label: "Software", icon: import_lucide_react.Code, colorClass: "text-cyan-400", bgClass: "bg-cyan-500/10", apiValue: "Software" },
|
|
37
|
+
{ slug: "rwa", label: "RWA", icon: import_lucide_react.Building, colorClass: "text-lime-400", bgClass: "bg-lime-500/10", apiValue: "RWA" },
|
|
38
|
+
{ slug: "patents", label: "Patents", icon: import_lucide_react.Award, colorClass: "text-emerald-400", bgClass: "bg-emerald-500/10", apiValue: "Patents" },
|
|
39
|
+
{ slug: "posts", label: "Posts", icon: import_lucide_react.FileText, colorClass: "text-orange-400", bgClass: "bg-orange-500/10", apiValue: "Posts" },
|
|
40
|
+
{ slug: "publications", label: "Publications", icon: import_lucide_react.BookOpen, colorClass: "text-teal-400", bgClass: "bg-teal-500/10", apiValue: "Publications" },
|
|
41
|
+
{ slug: "documents", label: "Documents", icon: import_lucide_react.File, colorClass: "text-slate-400", bgClass: "bg-slate-500/10", apiValue: "Documents" },
|
|
42
|
+
{ slug: "custom", label: "Custom", icon: import_lucide_react.Layers, colorClass: "text-indigo-400", bgClass: "bg-indigo-500/10", apiValue: "Custom" }
|
|
43
|
+
];
|
|
44
|
+
const IP_TYPE_MAP = Object.fromEntries(
|
|
45
|
+
IP_TYPE_CONFIG.map((c) => [c.slug, c])
|
|
46
|
+
);
|
|
47
|
+
const SIZE = {
|
|
48
|
+
sm: { container: "h-6 w-6", icon: "h-3 w-3" },
|
|
49
|
+
md: { container: "h-8 w-8", icon: "h-4 w-4" }
|
|
50
|
+
};
|
|
51
|
+
function IpTypeBadge({ ipType, size = "sm", className, baseUrl = "" }) {
|
|
52
|
+
const config = IP_TYPE_CONFIG.find(
|
|
53
|
+
(c) => c.label === ipType || c.apiValue === ipType
|
|
54
|
+
);
|
|
55
|
+
if (!config) return null;
|
|
56
|
+
const { icon: Icon, colorClass, bgClass, slug, label } = config;
|
|
57
|
+
const { container, icon } = SIZE[size];
|
|
58
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
"a",
|
|
60
|
+
{
|
|
61
|
+
href: `${baseUrl}/${slug}`,
|
|
62
|
+
title: label,
|
|
63
|
+
className: (0, import_cn.cn)(
|
|
64
|
+
"inline-flex items-center justify-center rounded-full",
|
|
65
|
+
"transition-opacity hover:opacity-80",
|
|
66
|
+
bgClass,
|
|
67
|
+
container,
|
|
68
|
+
className
|
|
69
|
+
),
|
|
70
|
+
onClick: (e) => e.stopPropagation(),
|
|
71
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: (0, import_cn.cn)(colorClass, icon) })
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
+
0 && (module.exports = {
|
|
77
|
+
IP_TYPE_CONFIG,
|
|
78
|
+
IP_TYPE_MAP,
|
|
79
|
+
IpTypeBadge
|
|
80
|
+
});
|
|
81
|
+
//# sourceMappingURL=ip-type-badge.cjs.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\";\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"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsEM;AApEN,0BAGO;AACP,gBAAmB;AAYZ,MAAM,iBAAiC;AAAA,EAC5C,EAAE,MAAM,SAAgB,OAAO,SAAgB,MAAM,2BAAU,YAAY,mBAAoB,SAAS,oBAAqB,UAAU,QAAQ;AAAA,EAC/I,EAAE,MAAM,SAAgB,OAAO,SAAgB,MAAM,0BAAU,YAAY,gBAAoB,SAAS,iBAAqB,UAAU,QAAQ;AAAA,EAC/I,EAAE,MAAM,OAAgB,OAAO,OAAgB,MAAM,6BAAU,YAAY,iBAAoB,SAAS,kBAAqB,UAAU,MAAM;AAAA,EAC7I,EAAE,MAAM,eAAgB,OAAO,eAAgB,MAAM,4BAAU,YAAY,kBAAoB,SAAS,mBAAqB,UAAU,cAAc;AAAA,EACrJ,EAAE,MAAM,OAAgB,OAAO,OAAgB,MAAM,yBAAU,YAAY,iBAAoB,SAAS,kBAAqB,UAAU,KAAK;AAAA,EAC5I,EAAE,MAAM,YAAgB,OAAO,YAAgB,MAAM,0BAAU,YAAY,iBAAoB,SAAS,kBAAqB,UAAU,WAAW;AAAA,EAClJ,EAAE,MAAM,OAAgB,OAAO,OAAgB,MAAM,8BAAU,YAAY,iBAAoB,SAAS,kBAAqB,UAAU,MAAM;AAAA,EAC7I,EAAE,MAAM,WAAgB,OAAO,WAAgB,MAAM,2BAAU,YAAY,oBAAoB,SAAS,qBAAqB,UAAU,UAAU;AAAA,EACjJ,EAAE,MAAM,SAAgB,OAAO,SAAgB,MAAM,8BAAU,YAAY,mBAAoB,SAAS,oBAAqB,UAAU,QAAQ;AAAA,EAC/I,EAAE,MAAM,gBAAgB,OAAO,gBAAgB,MAAM,8BAAU,YAAY,iBAAoB,SAAS,kBAAqB,UAAU,eAAe;AAAA,EACtJ,EAAE,MAAM,aAAgB,OAAO,aAAgB,MAAM,0BAAU,YAAY,kBAAoB,SAAS,mBAAqB,UAAU,YAAY;AAAA,EACnJ,EAAE,MAAM,UAAgB,OAAO,UAAgB,MAAM,4BAAU,YAAY,mBAAoB,SAAS,oBAAqB,UAAU,SAAS;AAClJ;AAEO,MAAM,cAAc,OAAO;AAAA,EAChC,eAAe,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;AACvC;AAEA,MAAM,OAAO;AAAA,EACX,IAAI,EAAE,WAAW,WAAW,MAAM,UAAU;AAAA,EAC5C,IAAI,EAAE,WAAW,WAAW,MAAM,UAAU;AAC9C;AAUO,SAAS,YAAY,EAAE,QAAQ,OAAO,MAAM,WAAW,UAAU,GAAG,GAAqB;AAC9F,QAAM,SAAS,eAAe;AAAA,IAC5B,CAAC,MAAM,EAAE,UAAU,UAAU,EAAE,aAAa;AAAA,EAC9C;AACA,MAAI,CAAC,OAAQ,QAAO;AACpB,QAAM,EAAE,MAAM,MAAM,YAAY,SAAS,MAAM,MAAM,IAAI;AACzD,QAAM,EAAE,WAAW,KAAK,IAAI,KAAK,IAAI;AACrC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,GAAG,OAAO,IAAI,IAAI;AAAA,MACxB,OAAO;AAAA,MACP,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,MAElC,sDAAC,QAAK,eAAW,cAAG,YAAY,IAAI,GAAG;AAAA;AAAA,EACzC;AAEJ;","names":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface IpTypeConfig {
|
|
4
|
+
slug: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon: React.ElementType;
|
|
7
|
+
colorClass: string;
|
|
8
|
+
bgClass: string;
|
|
9
|
+
/** API ipType value — null means "nft" special case */
|
|
10
|
+
apiValue: string | null;
|
|
11
|
+
}
|
|
12
|
+
declare const IP_TYPE_CONFIG: IpTypeConfig[];
|
|
13
|
+
declare const IP_TYPE_MAP: Record<string, IpTypeConfig>;
|
|
14
|
+
interface IpTypeBadgeProps {
|
|
15
|
+
ipType: string;
|
|
16
|
+
size?: "sm" | "md";
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Base URL for IP type pages. Default: "" (relative). Example: "https://medialane.io" */
|
|
19
|
+
baseUrl?: string;
|
|
20
|
+
}
|
|
21
|
+
declare function IpTypeBadge({ ipType, size, className, baseUrl }: IpTypeBadgeProps): react_jsx_runtime.JSX.Element | null;
|
|
22
|
+
|
|
23
|
+
export { IP_TYPE_CONFIG, IP_TYPE_MAP, IpTypeBadge, type IpTypeBadgeProps, type IpTypeConfig };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface IpTypeConfig {
|
|
4
|
+
slug: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon: React.ElementType;
|
|
7
|
+
colorClass: string;
|
|
8
|
+
bgClass: string;
|
|
9
|
+
/** API ipType value — null means "nft" special case */
|
|
10
|
+
apiValue: string | null;
|
|
11
|
+
}
|
|
12
|
+
declare const IP_TYPE_CONFIG: IpTypeConfig[];
|
|
13
|
+
declare const IP_TYPE_MAP: Record<string, IpTypeConfig>;
|
|
14
|
+
interface IpTypeBadgeProps {
|
|
15
|
+
ipType: string;
|
|
16
|
+
size?: "sm" | "md";
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Base URL for IP type pages. Default: "" (relative). Example: "https://medialane.io" */
|
|
19
|
+
baseUrl?: string;
|
|
20
|
+
}
|
|
21
|
+
declare function IpTypeBadge({ ipType, size, className, baseUrl }: IpTypeBadgeProps): react_jsx_runtime.JSX.Element | null;
|
|
22
|
+
|
|
23
|
+
export { IP_TYPE_CONFIG, IP_TYPE_MAP, IpTypeBadge, type IpTypeBadgeProps, type IpTypeConfig };
|