@medialane/ui 0.12.1 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/asset-markets-tab.cjs +111 -0
- package/dist/components/asset-markets-tab.cjs.map +1 -0
- package/dist/components/asset-markets-tab.d.cts +16 -0
- package/dist/components/asset-markets-tab.d.ts +16 -0
- package/dist/components/asset-markets-tab.js +87 -0
- package/dist/components/asset-markets-tab.js.map +1 -0
- package/dist/components/asset-overview-content.cjs +102 -0
- package/dist/components/asset-overview-content.cjs.map +1 -0
- package/dist/components/asset-overview-content.d.cts +14 -0
- package/dist/components/asset-overview-content.d.ts +14 -0
- package/dist/components/asset-overview-content.js +78 -0
- package/dist/components/asset-overview-content.js.map +1 -0
- package/dist/components/asset-top-sections.cjs +147 -0
- package/dist/components/asset-top-sections.cjs.map +1 -0
- package/dist/components/asset-top-sections.d.cts +34 -0
- package/dist/components/asset-top-sections.d.ts +34 -0
- package/dist/components/asset-top-sections.js +111 -0
- package/dist/components/asset-top-sections.js.map +1 -0
- package/dist/components/ip-type-display.cjs +201 -0
- package/dist/components/ip-type-display.cjs.map +1 -0
- package/dist/components/ip-type-display.d.cts +12 -0
- package/dist/components/ip-type-display.d.ts +12 -0
- package/dist/components/ip-type-display.js +181 -0
- package/dist/components/ip-type-display.js.map +1 -0
- package/dist/components/parent-attribution-banner.cjs +57 -0
- package/dist/components/parent-attribution-banner.cjs.map +1 -0
- package/dist/components/parent-attribution-banner.d.cts +11 -0
- package/dist/components/parent-attribution-banner.d.ts +11 -0
- package/dist/components/parent-attribution-banner.js +23 -0
- package/dist/components/parent-attribution-banner.js.map +1 -0
- package/dist/data/ip-templates.cjs +206 -0
- package/dist/data/ip-templates.cjs.map +1 -0
- package/dist/data/ip-templates.d.cts +45 -0
- package/dist/data/ip-templates.d.ts +45 -0
- package/dist/data/ip-templates.js +200 -0
- package/dist/data/ip-templates.js.map +1 -0
- package/dist/data/ip.cjs +163 -0
- package/dist/data/ip.cjs.map +1 -0
- package/dist/data/ip.d.cts +18 -0
- package/dist/data/ip.d.ts +18 -0
- package/dist/data/ip.js +134 -0
- package/dist/data/ip.js.map +1 -0
- package/dist/index.cjs +43 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +38 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/time.cjs +15 -2
- package/dist/utils/time.cjs.map +1 -1
- package/dist/utils/time.d.cts +3 -1
- package/dist/utils/time.d.ts +3 -1
- package/dist/utils/time.js +13 -1
- package/dist/utils/time.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
4
|
+
IP_TEMPLATES,
|
|
5
|
+
EMBED_PLATFORM_META,
|
|
6
|
+
SOCIAL_PLATFORM_META
|
|
7
|
+
} from "../data/ip-templates.js";
|
|
8
|
+
import { ExternalLink } from "lucide-react";
|
|
9
|
+
function parseYouTubeEmbed(url) {
|
|
10
|
+
try {
|
|
11
|
+
const u = new URL(url);
|
|
12
|
+
let id = null;
|
|
13
|
+
if (u.hostname.includes("youtu.be")) {
|
|
14
|
+
id = u.pathname.slice(1);
|
|
15
|
+
} else if (u.hostname.includes("youtube.com")) {
|
|
16
|
+
id = u.searchParams.get("v");
|
|
17
|
+
}
|
|
18
|
+
if (!id) return null;
|
|
19
|
+
return `https://www.youtube.com/embed/${id}`;
|
|
20
|
+
} catch {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function parseSpotifyEmbed(url) {
|
|
25
|
+
try {
|
|
26
|
+
const u = new URL(url);
|
|
27
|
+
if (!u.hostname.includes("spotify.com")) return null;
|
|
28
|
+
const match = u.pathname.match(
|
|
29
|
+
/(track|album|playlist|episode|show|artist)\/([A-Za-z0-9]+)/
|
|
30
|
+
);
|
|
31
|
+
if (!match) return null;
|
|
32
|
+
return `https://open.spotify.com/embed/${match[1]}/${match[2]}`;
|
|
33
|
+
} catch {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function parseSoundCloudEmbed(url) {
|
|
38
|
+
try {
|
|
39
|
+
new URL(url);
|
|
40
|
+
if (!url.includes("soundcloud.com")) return null;
|
|
41
|
+
const encoded = encodeURIComponent(url);
|
|
42
|
+
return `https://w.soundcloud.com/player/?url=${encoded}&color=%23ff5500&auto_play=false&hide_related=true&show_comments=false&show_user=true&show_reposts=false`;
|
|
43
|
+
} catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function parseTikTokEmbed(url) {
|
|
48
|
+
try {
|
|
49
|
+
const u = new URL(url);
|
|
50
|
+
if (!u.hostname.includes("tiktok.com")) return null;
|
|
51
|
+
const match = u.pathname.match(/\/video\/(\d+)/);
|
|
52
|
+
if (!match) return null;
|
|
53
|
+
return `https://www.tiktok.com/embed/v2/${match[1]}`;
|
|
54
|
+
} catch {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function parseVimeoEmbed(url) {
|
|
59
|
+
try {
|
|
60
|
+
const u = new URL(url);
|
|
61
|
+
if (!u.hostname.includes("vimeo.com")) return null;
|
|
62
|
+
const match = u.pathname.match(/(\d+)/);
|
|
63
|
+
if (!match) return null;
|
|
64
|
+
return `https://player.vimeo.com/video/${match[1]}`;
|
|
65
|
+
} catch {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function getEmbedSrc(platform, value) {
|
|
70
|
+
switch (platform) {
|
|
71
|
+
case "youtube":
|
|
72
|
+
return parseYouTubeEmbed(value);
|
|
73
|
+
case "spotify":
|
|
74
|
+
return parseSpotifyEmbed(value);
|
|
75
|
+
case "soundcloud":
|
|
76
|
+
return parseSoundCloudEmbed(value);
|
|
77
|
+
case "tiktok":
|
|
78
|
+
return parseTikTokEmbed(value);
|
|
79
|
+
case "vimeo":
|
|
80
|
+
return parseVimeoEmbed(value);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const COMPACT = {
|
|
84
|
+
spotify: true,
|
|
85
|
+
soundcloud: true,
|
|
86
|
+
youtube: false,
|
|
87
|
+
tiktok: false,
|
|
88
|
+
vimeo: false
|
|
89
|
+
};
|
|
90
|
+
function IPTypeDisplay({ attributes }) {
|
|
91
|
+
const attrs = attributes ?? [];
|
|
92
|
+
const ipType = attrs.find(
|
|
93
|
+
(a) => a.trait_type?.toLowerCase() === "ip type"
|
|
94
|
+
)?.value;
|
|
95
|
+
if (!ipType) return null;
|
|
96
|
+
const template = IP_TEMPLATES[ipType];
|
|
97
|
+
if (!template) return null;
|
|
98
|
+
const getAttr = (key) => attrs.find((a) => a.trait_type === key)?.value ?? null;
|
|
99
|
+
const embeds = (template.embeds ?? []).flatMap((platform) => {
|
|
100
|
+
const meta = EMBED_PLATFORM_META[platform];
|
|
101
|
+
const value = getAttr(meta.traitKey);
|
|
102
|
+
return value ? [{ platform, meta, value }] : [];
|
|
103
|
+
});
|
|
104
|
+
const socials = (template.socials ?? []).flatMap((platform) => {
|
|
105
|
+
const meta = SOCIAL_PLATFORM_META[platform];
|
|
106
|
+
const value = getAttr(meta.traitKey);
|
|
107
|
+
return value ? [{ platform, meta, value }] : [];
|
|
108
|
+
});
|
|
109
|
+
if (embeds.length === 0 && socials.length === 0) return null;
|
|
110
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
|
|
111
|
+
embeds.map(({ platform, meta, value }) => {
|
|
112
|
+
const src = getEmbedSrc(platform, value);
|
|
113
|
+
if (src) {
|
|
114
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
115
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: meta.label }),
|
|
116
|
+
COMPACT[platform] ? /* @__PURE__ */ jsx(
|
|
117
|
+
"iframe",
|
|
118
|
+
{
|
|
119
|
+
src,
|
|
120
|
+
className: "w-full rounded-xl border-0",
|
|
121
|
+
height: 166,
|
|
122
|
+
allow: "autoplay",
|
|
123
|
+
loading: "lazy",
|
|
124
|
+
title: meta.label
|
|
125
|
+
}
|
|
126
|
+
) : /* @__PURE__ */ jsx("div", { className: "relative w-full aspect-video rounded-xl overflow-hidden bg-muted/20", children: /* @__PURE__ */ jsx(
|
|
127
|
+
"iframe",
|
|
128
|
+
{
|
|
129
|
+
src,
|
|
130
|
+
className: "absolute inset-0 w-full h-full",
|
|
131
|
+
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
132
|
+
allowFullScreen: true,
|
|
133
|
+
loading: "lazy",
|
|
134
|
+
title: meta.label
|
|
135
|
+
}
|
|
136
|
+
) })
|
|
137
|
+
] }, platform);
|
|
138
|
+
}
|
|
139
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
140
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-1", children: meta.label }),
|
|
141
|
+
/* @__PURE__ */ jsxs(
|
|
142
|
+
"a",
|
|
143
|
+
{
|
|
144
|
+
href: value,
|
|
145
|
+
target: "_blank",
|
|
146
|
+
rel: "noopener noreferrer",
|
|
147
|
+
className: "inline-flex items-center gap-1.5 text-sm text-primary hover:underline",
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3.5 w-3.5" }),
|
|
150
|
+
"Open link"
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
] }, platform);
|
|
155
|
+
}),
|
|
156
|
+
socials.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
157
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: "Links" }),
|
|
158
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: socials.map(({ platform, meta, value }) => {
|
|
159
|
+
const SIcon = meta.icon;
|
|
160
|
+
return /* @__PURE__ */ jsxs(
|
|
161
|
+
"a",
|
|
162
|
+
{
|
|
163
|
+
href: value,
|
|
164
|
+
target: "_blank",
|
|
165
|
+
rel: "noopener noreferrer",
|
|
166
|
+
className: "inline-flex items-center gap-1.5 rounded-full border border-border bg-muted/30 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:border-primary/40 hover:text-foreground",
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ jsx(SIcon, { className: "h-3.5 w-3.5" }),
|
|
169
|
+
meta.label
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
platform
|
|
173
|
+
);
|
|
174
|
+
}) })
|
|
175
|
+
] })
|
|
176
|
+
] });
|
|
177
|
+
}
|
|
178
|
+
export {
|
|
179
|
+
IPTypeDisplay
|
|
180
|
+
};
|
|
181
|
+
//# sourceMappingURL=ip-type-display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/ip-type-display.tsx"],"sourcesContent":["\"use client\";\n\nimport type { IPType } from \"../data/ip.js\";\nimport {\n IP_TEMPLATES,\n EMBED_PLATFORM_META,\n SOCIAL_PLATFORM_META,\n type EmbedPlatform,\n} from \"../data/ip-templates.js\";\nimport { ExternalLink } from \"lucide-react\";\n\ninterface Attr {\n trait_type?: string | null;\n value?: string | null;\n}\n\ninterface IPTypeDisplayProps {\n attributes: Attr[] | null | undefined;\n}\n\n// ── Embed URL parsers ────────────────────────────────────────────────────────\n\nfunction parseYouTubeEmbed(url: string): string | null {\n try {\n const u = new URL(url);\n let id: string | null = null;\n if (u.hostname.includes(\"youtu.be\")) {\n id = u.pathname.slice(1);\n } else if (u.hostname.includes(\"youtube.com\")) {\n id = u.searchParams.get(\"v\");\n }\n if (!id) return null;\n return `https://www.youtube.com/embed/${id}`;\n } catch {\n return null;\n }\n}\n\nfunction parseSpotifyEmbed(url: string): string | null {\n try {\n const u = new URL(url);\n if (!u.hostname.includes(\"spotify.com\")) return null;\n // Spotify's embed endpoint only accepts /embed/{type}/{id}. Isolate the\n // resource type + id so locale prefixes (e.g. /intl-pt) and trailing query\n // params don't leak through — `/embed/intl-pt/album/…` 404s on Spotify.\n const match = u.pathname.match(\n /(track|album|playlist|episode|show|artist)\\/([A-Za-z0-9]+)/\n );\n if (!match) return null;\n return `https://open.spotify.com/embed/${match[1]}/${match[2]}`;\n } catch {\n return null;\n }\n}\n\nfunction parseSoundCloudEmbed(url: string): string | null {\n try {\n new URL(url); // validate\n if (!url.includes(\"soundcloud.com\")) return null;\n const encoded = encodeURIComponent(url);\n return `https://w.soundcloud.com/player/?url=${encoded}&color=%23ff5500&auto_play=false&hide_related=true&show_comments=false&show_user=true&show_reposts=false`;\n } catch {\n return null;\n }\n}\n\nfunction parseTikTokEmbed(url: string): string | null {\n try {\n const u = new URL(url);\n if (!u.hostname.includes(\"tiktok.com\")) return null;\n const match = u.pathname.match(/\\/video\\/(\\d+)/);\n if (!match) return null;\n return `https://www.tiktok.com/embed/v2/${match[1]}`;\n } catch {\n return null;\n }\n}\n\nfunction parseVimeoEmbed(url: string): string | null {\n try {\n const u = new URL(url);\n if (!u.hostname.includes(\"vimeo.com\")) return null;\n const match = u.pathname.match(/(\\d+)/);\n if (!match) return null;\n return `https://player.vimeo.com/video/${match[1]}`;\n } catch {\n return null;\n }\n}\n\nfunction getEmbedSrc(platform: EmbedPlatform, value: string): string | null {\n switch (platform) {\n case \"youtube\": return parseYouTubeEmbed(value);\n case \"spotify\": return parseSpotifyEmbed(value);\n case \"soundcloud\": return parseSoundCloudEmbed(value);\n case \"tiktok\": return parseTikTokEmbed(value);\n case \"vimeo\": return parseVimeoEmbed(value);\n }\n}\n\n// Compact iframe (fixed height) vs 16:9 video frame.\nconst COMPACT: Record<EmbedPlatform, boolean> = {\n spotify: true,\n soundcloud: true,\n youtube: false,\n tiktok: false,\n vimeo: false,\n};\n\n// ── Component ─────────────────────────────────────────────────────────────────\n\nexport function IPTypeDisplay({ attributes }: IPTypeDisplayProps) {\n const attrs = attributes ?? [];\n\n const ipType = attrs.find(\n (a) => a.trait_type?.toLowerCase() === \"ip type\"\n )?.value as IPType | undefined;\n if (!ipType) return null;\n\n const template = IP_TEMPLATES[ipType];\n if (!template) return null;\n\n const getAttr = (key: string) =>\n attrs.find((a) => a.trait_type === key)?.value ?? null;\n\n const embeds = (template.embeds ?? []).flatMap((platform) => {\n const meta = EMBED_PLATFORM_META[platform];\n const value = getAttr(meta.traitKey);\n return value ? [{ platform, meta, value }] : [];\n });\n\n const socials = (template.socials ?? []).flatMap((platform) => {\n const meta = SOCIAL_PLATFORM_META[platform];\n const value = getAttr(meta.traitKey);\n return value ? [{ platform, meta, value }] : [];\n });\n\n if (embeds.length === 0 && socials.length === 0) return null;\n\n return (\n <div className=\"space-y-5\">\n {embeds.map(({ platform, meta, value }) => {\n const src = getEmbedSrc(platform, value);\n if (src) {\n return (\n <div key={platform} className=\"space-y-1.5\">\n <p className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {meta.label}\n </p>\n {COMPACT[platform] ? (\n <iframe\n src={src}\n className=\"w-full rounded-xl border-0\"\n height={166}\n allow=\"autoplay\"\n loading=\"lazy\"\n title={meta.label}\n />\n ) : (\n <div className=\"relative w-full aspect-video rounded-xl overflow-hidden bg-muted/20\">\n <iframe\n src={src}\n className=\"absolute inset-0 w-full h-full\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n loading=\"lazy\"\n title={meta.label}\n />\n </div>\n )}\n </div>\n );\n }\n // Fallback: plain external link if URL parsing failed\n return (\n <div key={platform}>\n <p className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-1\">\n {meta.label}\n </p>\n <a\n href={value}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1.5 text-sm text-primary hover:underline\"\n >\n <ExternalLink className=\"h-3.5 w-3.5\" />\n Open link\n </a>\n </div>\n );\n })}\n\n {socials.length > 0 && (\n <div className=\"space-y-1.5\">\n <p className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n Links\n </p>\n <div className=\"flex flex-wrap gap-2\">\n {socials.map(({ platform, meta, value }) => {\n const SIcon = meta.icon;\n return (\n <a\n key={platform}\n href={value}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1.5 rounded-full border border-border bg-muted/30 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:border-primary/40 hover:text-foreground\"\n >\n <SIcon className=\"h-3.5 w-3.5\" />\n {meta.label}\n </a>\n );\n })}\n </div>\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";AAiJY,SACE,KADF;AA9IZ;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,oBAAoB;AAa7B,SAAS,kBAAkB,KAA4B;AACrD,MAAI;AACF,UAAM,IAAI,IAAI,IAAI,GAAG;AACrB,QAAI,KAAoB;AACxB,QAAI,EAAE,SAAS,SAAS,UAAU,GAAG;AACnC,WAAK,EAAE,SAAS,MAAM,CAAC;AAAA,IACzB,WAAW,EAAE,SAAS,SAAS,aAAa,GAAG;AAC7C,WAAK,EAAE,aAAa,IAAI,GAAG;AAAA,IAC7B;AACA,QAAI,CAAC,GAAI,QAAO;AAChB,WAAO,iCAAiC,EAAE;AAAA,EAC5C,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,kBAAkB,KAA4B;AACrD,MAAI;AACF,UAAM,IAAI,IAAI,IAAI,GAAG;AACrB,QAAI,CAAC,EAAE,SAAS,SAAS,aAAa,EAAG,QAAO;AAIhD,UAAM,QAAQ,EAAE,SAAS;AAAA,MACvB;AAAA,IACF;AACA,QAAI,CAAC,MAAO,QAAO;AACnB,WAAO,kCAAkC,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,C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AAA;AAAA,UACd,IAEA,oBAAC,SAAI,WAAU,uEACb;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,WAAU;AAAA,cACV,OAAM;AAAA,cACN,iBAAe;AAAA,cACf,SAAQ;AAAA,cACR,OAAO,KAAK;AAAA;AAAA,UACd,GACF;AAAA,aAvBM,QAyBV;AAAA,MAEJ;AAEA,aACE,qBAAC,SACC;AAAA,4BAAC,OAAE,WAAU,6EACV,eAAK,OACR;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,QAAO;AAAA,YACP,KAAI;AAAA,YACJ,WAAU;AAAA,YAEV;AAAA,kCAAC,gBAAa,WAAU,eAAc;AAAA,cAAE;AAAA;AAAA;AAAA,QAE1C;AAAA,WAZQ,QAaV;AAAA,IAEJ,CAAC;AAAA,IAEA,QAAQ,SAAS,KAChB,qBAAC,SAAI,WAAU,eACb;AAAA,0BAAC,OAAE,WAAU,wEAAuE,mBAEpF;AAAA,MACA,oBAAC,SAAI,WAAU,wBACZ,kBAAQ,IAAI,CAAC,EAAE,UAAU,MAAM,MAAM,MAAM;AAC1C,cAAM,QAAQ,KAAK;AACnB,eACE;AAAA,UAAC;AAAA;AAAA,YAEC,MAAM;AAAA,YACN,QAAO;AAAA,YACP,KAAI;AAAA,YACJ,WAAU;AAAA,YAEV;AAAA,kCAAC,SAAM,WAAU,eAAc;AAAA,cAC9B,KAAK;AAAA;AAAA;AAAA,UAPD;AAAA,QAQP;AAAA,MAEJ,CAAC,GACH;AAAA,OACF;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 parent_attribution_banner_exports = {};
|
|
31
|
+
__export(parent_attribution_banner_exports, {
|
|
32
|
+
ParentAttributionBanner: () => ParentAttributionBanner
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(parent_attribution_banner_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 ParentAttributionBanner({ parentContract, parentTokenId, parentName }) {
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
40
|
+
import_link.default,
|
|
41
|
+
{
|
|
42
|
+
href: `/asset/${parentContract}/${parentTokenId}`,
|
|
43
|
+
className: "flex items-center gap-2.5 px-3 py-2 rounded-xl border border-primary/25 bg-primary/5 text-sm hover:bg-primary/10 transition-colors group",
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4 text-primary shrink-0" }),
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground", children: "Remix of" }),
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-medium text-foreground truncate", children: parentName ?? `Token #${parentTokenId}` }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ExternalLink, { className: "h-3.5 w-3.5 text-muted-foreground ml-auto shrink-0 group-hover:text-foreground transition-colors" })
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
54
|
+
0 && (module.exports = {
|
|
55
|
+
ParentAttributionBanner
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=parent-attribution-banner.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/parent-attribution-banner.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { GitBranch, ExternalLink } from \"lucide-react\";\n\nexport interface ParentBannerProps {\n parentContract: string;\n parentTokenId: string;\n parentName?: string;\n}\n\n/** \"Remix of <parent>\" attribution link shown on remix asset pages. */\nexport function ParentAttributionBanner({ parentContract, parentTokenId, parentName }: ParentBannerProps) {\n return (\n <Link\n href={`/asset/${parentContract}/${parentTokenId}`}\n className=\"flex items-center gap-2.5 px-3 py-2 rounded-xl border border-primary/25 bg-primary/5 text-sm hover:bg-primary/10 transition-colors group\"\n >\n <GitBranch className=\"h-4 w-4 text-primary shrink-0\" />\n <span className=\"text-muted-foreground\">Remix of</span>\n <span className=\"font-medium text-foreground truncate\">{parentName ?? `Token #${parentTokenId}`}</span>\n <ExternalLink className=\"h-3.5 w-3.5 text-muted-foreground ml-auto shrink-0 group-hover:text-foreground transition-colors\" />\n </Link>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcI;AAZJ,kBAAiB;AACjB,0BAAwC;AASjC,SAAS,wBAAwB,EAAE,gBAAgB,eAAe,WAAW,GAAsB;AACxG,SACE;AAAA,IAAC,YAAAA;AAAA,IAAA;AAAA,MACC,MAAM,UAAU,cAAc,IAAI,aAAa;AAAA,MAC/C,WAAU;AAAA,MAEV;AAAA,oDAAC,iCAAU,WAAU,iCAAgC;AAAA,QACrD,4CAAC,UAAK,WAAU,yBAAwB,sBAAQ;AAAA,QAChD,4CAAC,UAAK,WAAU,wCAAwC,wBAAc,UAAU,aAAa,IAAG;AAAA,QAChG,4CAAC,oCAAa,WAAU,oGAAmG;AAAA;AAAA;AAAA,EAC7H;AAEJ;","names":["Link"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface ParentBannerProps {
|
|
4
|
+
parentContract: string;
|
|
5
|
+
parentTokenId: string;
|
|
6
|
+
parentName?: string;
|
|
7
|
+
}
|
|
8
|
+
/** "Remix of <parent>" attribution link shown on remix asset pages. */
|
|
9
|
+
declare function ParentAttributionBanner({ parentContract, parentTokenId, parentName }: ParentBannerProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { ParentAttributionBanner, type ParentBannerProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface ParentBannerProps {
|
|
4
|
+
parentContract: string;
|
|
5
|
+
parentTokenId: string;
|
|
6
|
+
parentName?: string;
|
|
7
|
+
}
|
|
8
|
+
/** "Remix of <parent>" attribution link shown on remix asset pages. */
|
|
9
|
+
declare function ParentAttributionBanner({ parentContract, parentTokenId, parentName }: ParentBannerProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { ParentAttributionBanner, type ParentBannerProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { GitBranch, ExternalLink } from "lucide-react";
|
|
5
|
+
function ParentAttributionBanner({ parentContract, parentTokenId, parentName }) {
|
|
6
|
+
return /* @__PURE__ */ jsxs(
|
|
7
|
+
Link,
|
|
8
|
+
{
|
|
9
|
+
href: `/asset/${parentContract}/${parentTokenId}`,
|
|
10
|
+
className: "flex items-center gap-2.5 px-3 py-2 rounded-xl border border-primary/25 bg-primary/5 text-sm hover:bg-primary/10 transition-colors group",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ jsx(GitBranch, { className: "h-4 w-4 text-primary shrink-0" }),
|
|
13
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Remix of" }),
|
|
14
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-foreground truncate", children: parentName ?? `Token #${parentTokenId}` }),
|
|
15
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3.5 w-3.5 text-muted-foreground ml-auto shrink-0 group-hover:text-foreground transition-colors" })
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
ParentAttributionBanner
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=parent-attribution-banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/parent-attribution-banner.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { GitBranch, ExternalLink } from \"lucide-react\";\n\nexport interface ParentBannerProps {\n parentContract: string;\n parentTokenId: string;\n parentName?: string;\n}\n\n/** \"Remix of <parent>\" attribution link shown on remix asset pages. */\nexport function ParentAttributionBanner({ parentContract, parentTokenId, parentName }: ParentBannerProps) {\n return (\n <Link\n href={`/asset/${parentContract}/${parentTokenId}`}\n className=\"flex items-center gap-2.5 px-3 py-2 rounded-xl border border-primary/25 bg-primary/5 text-sm hover:bg-primary/10 transition-colors group\"\n >\n <GitBranch className=\"h-4 w-4 text-primary shrink-0\" />\n <span className=\"text-muted-foreground\">Remix of</span>\n <span className=\"font-medium text-foreground truncate\">{parentName ?? `Token #${parentTokenId}`}</span>\n <ExternalLink className=\"h-3.5 w-3.5 text-muted-foreground ml-auto shrink-0 group-hover:text-foreground transition-colors\" />\n </Link>\n );\n}\n"],"mappings":";AAcI,SAIE,KAJF;AAZJ,OAAO,UAAU;AACjB,SAAS,WAAW,oBAAoB;AASjC,SAAS,wBAAwB,EAAE,gBAAgB,eAAe,WAAW,GAAsB;AACxG,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,UAAU,cAAc,IAAI,aAAa;AAAA,MAC/C,WAAU;AAAA,MAEV;AAAA,4BAAC,aAAU,WAAU,iCAAgC;AAAA,QACrD,oBAAC,UAAK,WAAU,yBAAwB,sBAAQ;AAAA,QAChD,oBAAC,UAAK,WAAU,wCAAwC,wBAAc,UAAU,aAAa,IAAG;AAAA,QAChG,oBAAC,gBAAa,WAAU,oGAAmG;AAAA;AAAA;AAAA,EAC7H;AAEJ;","names":[]}
|
|
@@ -0,0 +1,206 @@
|
|
|
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_templates_exports = {};
|
|
20
|
+
__export(ip_templates_exports, {
|
|
21
|
+
EMBED_PLATFORM_META: () => EMBED_PLATFORM_META,
|
|
22
|
+
IP_TEMPLATES: () => IP_TEMPLATES,
|
|
23
|
+
SOCIAL_PLATFORM_META: () => SOCIAL_PLATFORM_META,
|
|
24
|
+
TEMPLATE_TRAIT_TYPES: () => TEMPLATE_TRAIT_TYPES
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(ip_templates_exports);
|
|
27
|
+
var import_lucide_react = require("lucide-react");
|
|
28
|
+
const EMBED_PLATFORM_META = {
|
|
29
|
+
spotify: { label: "Spotify", icon: import_lucide_react.Music2, traitKey: "Spotify URL", placeholder: "https://open.spotify.com/\u2026" },
|
|
30
|
+
soundcloud: { label: "SoundCloud", icon: import_lucide_react.AudioLines, traitKey: "SoundCloud URL", placeholder: "https://soundcloud.com/\u2026" },
|
|
31
|
+
youtube: { label: "YouTube", icon: import_lucide_react.Youtube, traitKey: "YouTube URL", placeholder: "https://youtube.com/watch?v=\u2026" },
|
|
32
|
+
tiktok: { label: "TikTok", icon: import_lucide_react.Video, traitKey: "TikTok URL", placeholder: "https://tiktok.com/@\u2026/video/\u2026" },
|
|
33
|
+
vimeo: { label: "Vimeo", icon: import_lucide_react.Video, traitKey: "Vimeo URL", placeholder: "https://vimeo.com/\u2026" }
|
|
34
|
+
};
|
|
35
|
+
const SOCIAL_PLATFORM_META = {
|
|
36
|
+
x: { label: "X", icon: import_lucide_react.Twitter, traitKey: "X", placeholder: "https://x.com/\u2026" },
|
|
37
|
+
instagram: { label: "Instagram", icon: import_lucide_react.Instagram, traitKey: "Instagram", placeholder: "https://instagram.com/\u2026" },
|
|
38
|
+
facebook: { label: "Facebook", icon: import_lucide_react.Facebook, traitKey: "Facebook", placeholder: "https://facebook.com/\u2026" },
|
|
39
|
+
tiktok: { label: "TikTok", icon: import_lucide_react.Video, traitKey: "TikTok", placeholder: "https://tiktok.com/@\u2026" },
|
|
40
|
+
website: { label: "Website", icon: import_lucide_react.Globe, traitKey: "Website", placeholder: "https://\u2026" }
|
|
41
|
+
};
|
|
42
|
+
const IP_TEMPLATES = {
|
|
43
|
+
Audio: {
|
|
44
|
+
type: "Audio",
|
|
45
|
+
label: "Audio",
|
|
46
|
+
description: "Music, podcasts, sound effects, audio art",
|
|
47
|
+
icon: import_lucide_react.Music,
|
|
48
|
+
color: { bg: "bg-blue-500/10", text: "text-blue-400", border: "border-blue-500/20" },
|
|
49
|
+
embeds: ["spotify", "soundcloud"],
|
|
50
|
+
traitSuggestions: [
|
|
51
|
+
{ key: "Artist" },
|
|
52
|
+
{ key: "Genre", placeholder: "Soundtrack" },
|
|
53
|
+
{ key: "Mood" },
|
|
54
|
+
{ key: "Label" }
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
Video: {
|
|
58
|
+
type: "Video",
|
|
59
|
+
label: "Video",
|
|
60
|
+
description: "Films, animations, short-form video content",
|
|
61
|
+
icon: import_lucide_react.Clapperboard,
|
|
62
|
+
color: { bg: "bg-red-500/10", text: "text-red-400", border: "border-red-500/20" },
|
|
63
|
+
embeds: ["youtube", "tiktok", "vimeo"],
|
|
64
|
+
traitSuggestions: [
|
|
65
|
+
{ key: "Director" },
|
|
66
|
+
{ key: "Genre" },
|
|
67
|
+
{ key: "Cast" },
|
|
68
|
+
{ key: "Studio" }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
Art: {
|
|
72
|
+
type: "Art",
|
|
73
|
+
label: "Art",
|
|
74
|
+
description: "Digital and physical artwork, illustrations, generative art",
|
|
75
|
+
icon: import_lucide_react.Palette,
|
|
76
|
+
color: { bg: "bg-purple-500/10", text: "text-purple-400", border: "border-purple-500/20" },
|
|
77
|
+
traitSuggestions: [
|
|
78
|
+
{ key: "Medium", placeholder: "Oil on canvas" },
|
|
79
|
+
{ key: "Style", placeholder: "Impressionism" },
|
|
80
|
+
{ key: "Materials" },
|
|
81
|
+
{ key: "Series" }
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
Photography: {
|
|
85
|
+
type: "Photography",
|
|
86
|
+
label: "Photography",
|
|
87
|
+
description: "Photography, photo essays, visual documentation",
|
|
88
|
+
icon: import_lucide_react.Camera,
|
|
89
|
+
color: { bg: "bg-orange-500/10", text: "text-orange-400", border: "border-orange-500/20" },
|
|
90
|
+
traitSuggestions: [
|
|
91
|
+
{ key: "Camera", placeholder: "Sony A7 IV" },
|
|
92
|
+
{ key: "Location" },
|
|
93
|
+
{ key: "Series" },
|
|
94
|
+
{ key: "Edition" }
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
Posts: {
|
|
98
|
+
type: "Posts",
|
|
99
|
+
label: "Posts",
|
|
100
|
+
description: "Articles, blog posts, social media content, essays",
|
|
101
|
+
icon: import_lucide_react.MessageSquare,
|
|
102
|
+
color: { bg: "bg-sky-500/10", text: "text-sky-400", border: "border-sky-500/20" },
|
|
103
|
+
socials: ["x", "instagram", "facebook", "tiktok", "website"],
|
|
104
|
+
traitSuggestions: [
|
|
105
|
+
{ key: "Author" },
|
|
106
|
+
{ key: "Topic" },
|
|
107
|
+
{ key: "Category" }
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
Publications: {
|
|
111
|
+
type: "Publications",
|
|
112
|
+
label: "Publications",
|
|
113
|
+
description: "Books, journals, magazines, academic papers",
|
|
114
|
+
icon: import_lucide_react.BookOpen,
|
|
115
|
+
color: { bg: "bg-indigo-500/10", text: "text-indigo-400", border: "border-indigo-500/20" },
|
|
116
|
+
socials: ["x", "instagram", "website"],
|
|
117
|
+
traitSuggestions: [
|
|
118
|
+
{ key: "Author" },
|
|
119
|
+
{ key: "Publisher" },
|
|
120
|
+
{ key: "Language", placeholder: "English" },
|
|
121
|
+
{ key: "Edition" }
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
Documents: {
|
|
125
|
+
type: "Documents",
|
|
126
|
+
label: "Documents",
|
|
127
|
+
description: "Contracts, reports, whitepapers, legal documents",
|
|
128
|
+
icon: import_lucide_react.FileText,
|
|
129
|
+
color: { bg: "bg-zinc-500/10", text: "text-zinc-400", border: "border-zinc-500/20" },
|
|
130
|
+
traitSuggestions: [
|
|
131
|
+
{ key: "Author" },
|
|
132
|
+
{ key: "Category" },
|
|
133
|
+
{ key: "Language", placeholder: "English" }
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
Patents: {
|
|
137
|
+
type: "Patents",
|
|
138
|
+
label: "Patents",
|
|
139
|
+
description: "Patents, inventions, technical innovations",
|
|
140
|
+
icon: import_lucide_react.Award,
|
|
141
|
+
color: { bg: "bg-amber-500/10", text: "text-amber-400", border: "border-amber-500/20" },
|
|
142
|
+
traitSuggestions: [
|
|
143
|
+
{ key: "Inventor" },
|
|
144
|
+
{ key: "Field" },
|
|
145
|
+
{ key: "Status" }
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
Software: {
|
|
149
|
+
type: "Software",
|
|
150
|
+
label: "Software",
|
|
151
|
+
description: "Applications, scripts, algorithms, code libraries",
|
|
152
|
+
icon: import_lucide_react.Code2,
|
|
153
|
+
color: { bg: "bg-violet-500/10", text: "text-violet-400", border: "border-violet-500/20" },
|
|
154
|
+
socials: ["website"],
|
|
155
|
+
traitSuggestions: [
|
|
156
|
+
{ key: "Language", placeholder: "TypeScript" },
|
|
157
|
+
{ key: "License" },
|
|
158
|
+
{ key: "Platform" }
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
NFT: {
|
|
162
|
+
type: "NFT",
|
|
163
|
+
label: "NFT",
|
|
164
|
+
description: "Blockchain-native digital assets and collectibles",
|
|
165
|
+
icon: import_lucide_react.Hexagon,
|
|
166
|
+
color: { bg: "bg-teal-500/10", text: "text-teal-400", border: "border-teal-500/20" },
|
|
167
|
+
traitSuggestions: [
|
|
168
|
+
{ key: "Collection" },
|
|
169
|
+
{ key: "Edition" },
|
|
170
|
+
{ key: "Rarity", options: ["Common", "Uncommon", "Rare", "Epic", "Legendary"] }
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
RWA: {
|
|
174
|
+
type: "RWA",
|
|
175
|
+
label: "Real World Asset",
|
|
176
|
+
description: "Tokenized physical assets: real estate, commodities, collectibles",
|
|
177
|
+
icon: import_lucide_react.Building2,
|
|
178
|
+
color: { bg: "bg-emerald-500/10", text: "text-emerald-400", border: "border-emerald-500/20" },
|
|
179
|
+
traitSuggestions: [
|
|
180
|
+
{ key: "Asset Type" },
|
|
181
|
+
{ key: "Location" },
|
|
182
|
+
{ key: "Category" }
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
Custom: {
|
|
186
|
+
type: "Custom",
|
|
187
|
+
label: "Custom",
|
|
188
|
+
description: "Custom IP type \u2014 add your own trait pairs for any metadata",
|
|
189
|
+
icon: import_lucide_react.Layers,
|
|
190
|
+
color: { bg: "bg-muted/50", text: "text-muted-foreground", border: "border-border" }
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
const TEMPLATE_TRAIT_TYPES = /* @__PURE__ */ new Set([
|
|
194
|
+
"IP Type",
|
|
195
|
+
...Object.values(EMBED_PLATFORM_META).map((m) => m.traitKey),
|
|
196
|
+
...Object.values(SOCIAL_PLATFORM_META).map((m) => m.traitKey),
|
|
197
|
+
...Object.values(IP_TEMPLATES).flatMap((t) => (t.traitSuggestions ?? []).map((s) => s.key))
|
|
198
|
+
]);
|
|
199
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
200
|
+
0 && (module.exports = {
|
|
201
|
+
EMBED_PLATFORM_META,
|
|
202
|
+
IP_TEMPLATES,
|
|
203
|
+
SOCIAL_PLATFORM_META,
|
|
204
|
+
TEMPLATE_TRAIT_TYPES
|
|
205
|
+
});
|
|
206
|
+
//# sourceMappingURL=ip-templates.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/data/ip-templates.ts"],"sourcesContent":["import {\n Music, Palette, FileText, Hexagon, Clapperboard, Camera,\n Award, MessageSquare, BookOpen, Building2, Code2, Layers,\n Music2, AudioLines, Youtube, Video, Twitter, Instagram, Facebook, Globe,\n type LucideIcon,\n} from \"lucide-react\";\nimport type { IPType } from \"./ip.js\";\n\n// ── Embeds (inline iframe players) ──────────────────────────────────────────\n// Only platforms with clean iframe embeds. Each maps to a stored trait_type key\n// so the asset page can render the player from metadata attributes.\nexport type EmbedPlatform = \"spotify\" | \"soundcloud\" | \"youtube\" | \"tiktok\" | \"vimeo\";\n\nexport const EMBED_PLATFORM_META: Record<\n EmbedPlatform,\n { label: string; icon: LucideIcon; traitKey: string; placeholder: string }\n> = {\n spotify: { label: \"Spotify\", icon: Music2, traitKey: \"Spotify URL\", placeholder: \"https://open.spotify.com/…\" },\n soundcloud: { label: \"SoundCloud\", icon: AudioLines, traitKey: \"SoundCloud URL\", placeholder: \"https://soundcloud.com/…\" },\n youtube: { label: \"YouTube\", icon: Youtube, traitKey: \"YouTube URL\", placeholder: \"https://youtube.com/watch?v=…\" },\n tiktok: { label: \"TikTok\", icon: Video, traitKey: \"TikTok URL\", placeholder: \"https://tiktok.com/@…/video/…\" },\n vimeo: { label: \"Vimeo\", icon: Video, traitKey: \"Vimeo URL\", placeholder: \"https://vimeo.com/…\" },\n};\n\n// ── Socials (icon-chip links — open in a new tab, never iframed) ────────────\n// X / Instagram / Facebook need fragile JS SDKs and sites block iframing, so\n// these render as clickable platform chips on the asset page, not players.\nexport type SocialPlatform = \"x\" | \"instagram\" | \"facebook\" | \"tiktok\" | \"website\";\n\nexport const SOCIAL_PLATFORM_META: Record<\n SocialPlatform,\n { label: string; icon: LucideIcon; traitKey: string; placeholder: string }\n> = {\n x: { label: \"X\", icon: Twitter, traitKey: \"X\", placeholder: \"https://x.com/…\" },\n instagram: { label: \"Instagram\", icon: Instagram, traitKey: \"Instagram\", placeholder: \"https://instagram.com/…\" },\n facebook: { label: \"Facebook\", icon: Facebook, traitKey: \"Facebook\", placeholder: \"https://facebook.com/…\" },\n tiktok: { label: \"TikTok\", icon: Video, traitKey: \"TikTok\", placeholder: \"https://tiktok.com/@…\" },\n website: { label: \"Website\", icon: Globe, traitKey: \"Website\", placeholder: \"https://…\" },\n};\n\n// ── Trait suggestions (friendly, no dates / no technical fields) ────────────\n// Tapping a suggestion pre-fills a trait row. Optional `options` renders the\n// value as a select (e.g. Rarity).\nexport interface TraitSuggestion {\n key: string;\n placeholder?: string;\n options?: string[];\n}\n\nexport interface IPTemplate {\n type: IPType;\n label: string;\n description: string;\n icon: LucideIcon;\n color: { bg: string; text: string; border: string };\n embeds?: EmbedPlatform[];\n socials?: SocialPlatform[];\n traitSuggestions?: TraitSuggestion[];\n}\n\nexport const IP_TEMPLATES: Record<IPType, IPTemplate> = {\n Audio: {\n type: \"Audio\",\n label: \"Audio\",\n description: \"Music, podcasts, sound effects, audio art\",\n icon: Music,\n color: { bg: \"bg-blue-500/10\", text: \"text-blue-400\", border: \"border-blue-500/20\" },\n embeds: [\"spotify\", \"soundcloud\"],\n traitSuggestions: [\n { key: \"Artist\" }, { key: \"Genre\", placeholder: \"Soundtrack\" }, { key: \"Mood\" }, { key: \"Label\" },\n ],\n },\n Video: {\n type: \"Video\",\n label: \"Video\",\n description: \"Films, animations, short-form video content\",\n icon: Clapperboard,\n color: { bg: \"bg-red-500/10\", text: \"text-red-400\", border: \"border-red-500/20\" },\n embeds: [\"youtube\", \"tiktok\", \"vimeo\"],\n traitSuggestions: [\n { key: \"Director\" }, { key: \"Genre\" }, { key: \"Cast\" }, { key: \"Studio\" },\n ],\n },\n Art: {\n type: \"Art\",\n label: \"Art\",\n description: \"Digital and physical artwork, illustrations, generative art\",\n icon: Palette,\n color: { bg: \"bg-purple-500/10\", text: \"text-purple-400\", border: \"border-purple-500/20\" },\n traitSuggestions: [\n { key: \"Medium\", placeholder: \"Oil on canvas\" },\n { key: \"Style\", placeholder: \"Impressionism\" },\n { key: \"Materials\" },\n { key: \"Series\" },\n ],\n },\n Photography: {\n type: \"Photography\",\n label: \"Photography\",\n description: \"Photography, photo essays, visual documentation\",\n icon: Camera,\n color: { bg: \"bg-orange-500/10\", text: \"text-orange-400\", border: \"border-orange-500/20\" },\n traitSuggestions: [\n { key: \"Camera\", placeholder: \"Sony A7 IV\" },\n { key: \"Location\" },\n { key: \"Series\" },\n { key: \"Edition\" },\n ],\n },\n Posts: {\n type: \"Posts\",\n label: \"Posts\",\n description: \"Articles, blog posts, social media content, essays\",\n icon: MessageSquare,\n color: { bg: \"bg-sky-500/10\", text: \"text-sky-400\", border: \"border-sky-500/20\" },\n socials: [\"x\", \"instagram\", \"facebook\", \"tiktok\", \"website\"],\n traitSuggestions: [\n { key: \"Author\" }, { key: \"Topic\" }, { key: \"Category\" },\n ],\n },\n Publications: {\n type: \"Publications\",\n label: \"Publications\",\n description: \"Books, journals, magazines, academic papers\",\n icon: BookOpen,\n color: { bg: \"bg-indigo-500/10\", text: \"text-indigo-400\", border: \"border-indigo-500/20\" },\n socials: [\"x\", \"instagram\", \"website\"],\n traitSuggestions: [\n { key: \"Author\" }, { key: \"Publisher\" }, { key: \"Language\", placeholder: \"English\" }, { key: \"Edition\" },\n ],\n },\n Documents: {\n type: \"Documents\",\n label: \"Documents\",\n description: \"Contracts, reports, whitepapers, legal documents\",\n icon: FileText,\n color: { bg: \"bg-zinc-500/10\", text: \"text-zinc-400\", border: \"border-zinc-500/20\" },\n traitSuggestions: [\n { key: \"Author\" }, { key: \"Category\" }, { key: \"Language\", placeholder: \"English\" },\n ],\n },\n Patents: {\n type: \"Patents\",\n label: \"Patents\",\n description: \"Patents, inventions, technical innovations\",\n icon: Award,\n color: { bg: \"bg-amber-500/10\", text: \"text-amber-400\", border: \"border-amber-500/20\" },\n traitSuggestions: [\n { key: \"Inventor\" }, { key: \"Field\" }, { key: \"Status\" },\n ],\n },\n Software: {\n type: \"Software\",\n label: \"Software\",\n description: \"Applications, scripts, algorithms, code libraries\",\n icon: Code2,\n color: { bg: \"bg-violet-500/10\", text: \"text-violet-400\", border: \"border-violet-500/20\" },\n socials: [\"website\"],\n traitSuggestions: [\n { key: \"Language\", placeholder: \"TypeScript\" }, { key: \"License\" }, { key: \"Platform\" },\n ],\n },\n NFT: {\n type: \"NFT\",\n label: \"NFT\",\n description: \"Blockchain-native digital assets and collectibles\",\n icon: Hexagon,\n color: { bg: \"bg-teal-500/10\", text: \"text-teal-400\", border: \"border-teal-500/20\" },\n traitSuggestions: [\n { key: \"Collection\" },\n { key: \"Edition\" },\n { key: \"Rarity\", options: [\"Common\", \"Uncommon\", \"Rare\", \"Epic\", \"Legendary\"] },\n ],\n },\n RWA: {\n type: \"RWA\",\n label: \"Real World Asset\",\n description: \"Tokenized physical assets: real estate, commodities, collectibles\",\n icon: Building2,\n color: { bg: \"bg-emerald-500/10\", text: \"text-emerald-400\", border: \"border-emerald-500/20\" },\n traitSuggestions: [\n { key: \"Asset Type\" }, { key: \"Location\" }, { key: \"Category\" },\n ],\n },\n Custom: {\n type: \"Custom\",\n label: \"Custom\",\n description: \"Custom IP type — add your own trait pairs for any metadata\",\n icon: Layers,\n color: { bg: \"bg-muted/50\", text: \"text-muted-foreground\", border: \"border-border\" },\n },\n};\n\n/**\n * All trait_type keys owned by templates (embeds + socials + suggestions), plus\n * \"IP Type\" itself. Used to filter template-managed attributes out of other\n * attribute grids so they aren't duplicated.\n */\nexport const TEMPLATE_TRAIT_TYPES = new Set<string>([\n \"IP Type\",\n ...Object.values(EMBED_PLATFORM_META).map((m) => m.traitKey),\n ...Object.values(SOCIAL_PLATFORM_META).map((m) => m.traitKey),\n ...Object.values(IP_TEMPLATES).flatMap((t) => (t.traitSuggestions ?? []).map((s) => s.key)),\n]);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAKO;AAQA,MAAM,sBAGT;AAAA,EACF,SAAY,EAAE,OAAO,WAAc,MAAM,4BAAY,UAAU,eAAkB,aAAa,kCAA6B;AAAA,EAC3H,YAAY,EAAE,OAAO,cAAc,MAAM,gCAAY,UAAU,kBAAkB,aAAa,gCAA2B;AAAA,EACzH,SAAY,EAAE,OAAO,WAAc,MAAM,6BAAY,UAAU,eAAkB,aAAa,qCAAgC;AAAA,EAC9H,QAAY,EAAE,OAAO,UAAc,MAAM,2BAAY,UAAU,cAAkB,aAAa,0CAAgC;AAAA,EAC9H,OAAY,EAAE,OAAO,SAAc,MAAM,2BAAY,UAAU,aAAkB,aAAa,2BAAsB;AACtH;AAOO,MAAM,uBAGT;AAAA,EACF,GAAW,EAAE,OAAO,KAAa,MAAM,6BAAW,UAAU,KAAa,aAAa,uBAAkB;AAAA,EACxG,WAAW,EAAE,OAAO,aAAa,MAAM,+BAAW,UAAU,aAAa,aAAa,+BAA0B;AAAA,EAChH,UAAW,EAAE,OAAO,YAAa,MAAM,8BAAW,UAAU,YAAa,aAAa,8BAAyB;AAAA,EAC/G,QAAW,EAAE,OAAO,UAAa,MAAM,2BAAW,UAAU,UAAa,aAAa,6BAAwB;AAAA,EAC9G,SAAW,EAAE,OAAO,WAAa,MAAM,2BAAW,UAAU,WAAa,aAAa,iBAAY;AACpG;AAsBO,MAAM,eAA2C;AAAA,EACtD,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO,EAAE,IAAI,kBAAkB,MAAM,iBAAiB,QAAQ,qBA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AAY;AAAA,EAClD;AAAA,EACA,GAAG,OAAO,OAAO,mBAAmB,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ;AAAA,EAC3D,GAAG,OAAO,OAAO,oBAAoB,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ;AAAA,EAC5D,GAAG,OAAO,OAAO,YAAY,EAAE,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;AAC5F,CAAC;","names":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-react';
|
|
2
|
+
import { IPType } from './ip.cjs';
|
|
3
|
+
|
|
4
|
+
type EmbedPlatform = "spotify" | "soundcloud" | "youtube" | "tiktok" | "vimeo";
|
|
5
|
+
declare const EMBED_PLATFORM_META: Record<EmbedPlatform, {
|
|
6
|
+
label: string;
|
|
7
|
+
icon: LucideIcon;
|
|
8
|
+
traitKey: string;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
}>;
|
|
11
|
+
type SocialPlatform = "x" | "instagram" | "facebook" | "tiktok" | "website";
|
|
12
|
+
declare const SOCIAL_PLATFORM_META: Record<SocialPlatform, {
|
|
13
|
+
label: string;
|
|
14
|
+
icon: LucideIcon;
|
|
15
|
+
traitKey: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
}>;
|
|
18
|
+
interface TraitSuggestion {
|
|
19
|
+
key: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
options?: string[];
|
|
22
|
+
}
|
|
23
|
+
interface IPTemplate {
|
|
24
|
+
type: IPType;
|
|
25
|
+
label: string;
|
|
26
|
+
description: string;
|
|
27
|
+
icon: LucideIcon;
|
|
28
|
+
color: {
|
|
29
|
+
bg: string;
|
|
30
|
+
text: string;
|
|
31
|
+
border: string;
|
|
32
|
+
};
|
|
33
|
+
embeds?: EmbedPlatform[];
|
|
34
|
+
socials?: SocialPlatform[];
|
|
35
|
+
traitSuggestions?: TraitSuggestion[];
|
|
36
|
+
}
|
|
37
|
+
declare const IP_TEMPLATES: Record<IPType, IPTemplate>;
|
|
38
|
+
/**
|
|
39
|
+
* All trait_type keys owned by templates (embeds + socials + suggestions), plus
|
|
40
|
+
* "IP Type" itself. Used to filter template-managed attributes out of other
|
|
41
|
+
* attribute grids so they aren't duplicated.
|
|
42
|
+
*/
|
|
43
|
+
declare const TEMPLATE_TRAIT_TYPES: Set<string>;
|
|
44
|
+
|
|
45
|
+
export { EMBED_PLATFORM_META, type EmbedPlatform, type IPTemplate, IP_TEMPLATES, SOCIAL_PLATFORM_META, type SocialPlatform, TEMPLATE_TRAIT_TYPES, type TraitSuggestion };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-react';
|
|
2
|
+
import { IPType } from './ip.js';
|
|
3
|
+
|
|
4
|
+
type EmbedPlatform = "spotify" | "soundcloud" | "youtube" | "tiktok" | "vimeo";
|
|
5
|
+
declare const EMBED_PLATFORM_META: Record<EmbedPlatform, {
|
|
6
|
+
label: string;
|
|
7
|
+
icon: LucideIcon;
|
|
8
|
+
traitKey: string;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
}>;
|
|
11
|
+
type SocialPlatform = "x" | "instagram" | "facebook" | "tiktok" | "website";
|
|
12
|
+
declare const SOCIAL_PLATFORM_META: Record<SocialPlatform, {
|
|
13
|
+
label: string;
|
|
14
|
+
icon: LucideIcon;
|
|
15
|
+
traitKey: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
}>;
|
|
18
|
+
interface TraitSuggestion {
|
|
19
|
+
key: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
options?: string[];
|
|
22
|
+
}
|
|
23
|
+
interface IPTemplate {
|
|
24
|
+
type: IPType;
|
|
25
|
+
label: string;
|
|
26
|
+
description: string;
|
|
27
|
+
icon: LucideIcon;
|
|
28
|
+
color: {
|
|
29
|
+
bg: string;
|
|
30
|
+
text: string;
|
|
31
|
+
border: string;
|
|
32
|
+
};
|
|
33
|
+
embeds?: EmbedPlatform[];
|
|
34
|
+
socials?: SocialPlatform[];
|
|
35
|
+
traitSuggestions?: TraitSuggestion[];
|
|
36
|
+
}
|
|
37
|
+
declare const IP_TEMPLATES: Record<IPType, IPTemplate>;
|
|
38
|
+
/**
|
|
39
|
+
* All trait_type keys owned by templates (embeds + socials + suggestions), plus
|
|
40
|
+
* "IP Type" itself. Used to filter template-managed attributes out of other
|
|
41
|
+
* attribute grids so they aren't duplicated.
|
|
42
|
+
*/
|
|
43
|
+
declare const TEMPLATE_TRAIT_TYPES: Set<string>;
|
|
44
|
+
|
|
45
|
+
export { EMBED_PLATFORM_META, type EmbedPlatform, type IPTemplate, IP_TEMPLATES, SOCIAL_PLATFORM_META, type SocialPlatform, TEMPLATE_TRAIT_TYPES, type TraitSuggestion };
|