@medialane/ui 0.3.1 → 0.3.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/discover-collections-strip.cjs +111 -0
- package/dist/components/discover-collections-strip.cjs.map +1 -0
- package/dist/components/discover-collections-strip.d.cts +12 -0
- package/dist/components/discover-collections-strip.d.ts +12 -0
- package/dist/components/discover-collections-strip.js +87 -0
- package/dist/components/discover-collections-strip.js.map +1 -0
- package/dist/components/discover-creators-strip.cjs +131 -0
- package/dist/components/discover-creators-strip.cjs.map +1 -0
- package/dist/components/discover-creators-strip.d.cts +12 -0
- package/dist/components/discover-creators-strip.d.ts +12 -0
- package/dist/components/discover-creators-strip.js +107 -0
- package/dist/components/discover-creators-strip.js.map +1 -0
- package/dist/components/discover-feed-section.cjs +96 -0
- package/dist/components/discover-feed-section.cjs.map +1 -0
- package/dist/components/discover-feed-section.d.cts +18 -0
- package/dist/components/discover-feed-section.d.ts +18 -0
- package/dist/components/discover-feed-section.js +72 -0
- package/dist/components/discover-feed-section.js.map +1 -0
- package/dist/components/discover-hero.cjs +87 -0
- package/dist/components/discover-hero.cjs.map +1 -0
- package/dist/components/discover-hero.d.cts +16 -0
- package/dist/components/discover-hero.d.ts +16 -0
- package/dist/components/discover-hero.js +63 -0
- package/dist/components/discover-hero.js.map +1 -0
- package/dist/components/featured-carousel.cjs +181 -0
- package/dist/components/featured-carousel.cjs.map +1 -0
- package/dist/components/featured-carousel.d.cts +13 -0
- package/dist/components/featured-carousel.d.ts +13 -0
- package/dist/components/featured-carousel.js +156 -0
- package/dist/components/featured-carousel.js.map +1 -0
- package/dist/index.cjs +17 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,111 @@
|
|
|
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 discover_collections_strip_exports = {};
|
|
21
|
+
__export(discover_collections_strip_exports, {
|
|
22
|
+
DiscoverCollectionsStrip: () => DiscoverCollectionsStrip
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(discover_collections_strip_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_lucide_react = require("lucide-react");
|
|
28
|
+
var import_motion_primitives = require("./motion-primitives.js");
|
|
29
|
+
var import_ipfs = require("../utils/ipfs.js");
|
|
30
|
+
var import_format = require("../utils/format.js");
|
|
31
|
+
function CollectionChipSkeleton() {
|
|
32
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "shrink-0 w-80 rounded-xl border border-border overflow-hidden", children: [
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "aspect-square w-full bg-muted animate-pulse" }),
|
|
34
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "p-3 space-y-1.5", children: [
|
|
35
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-3.5 w-28 bg-muted animate-pulse rounded" }),
|
|
36
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-3 w-16 bg-muted animate-pulse rounded" })
|
|
37
|
+
] })
|
|
38
|
+
] });
|
|
39
|
+
}
|
|
40
|
+
function CollectionChip({
|
|
41
|
+
collection,
|
|
42
|
+
href
|
|
43
|
+
}) {
|
|
44
|
+
const [imgError, setImgError] = (0, import_react.useState)(false);
|
|
45
|
+
const image = collection.image && !imgError ? (0, import_ipfs.ipfsToHttp)(collection.image) : null;
|
|
46
|
+
const initial = (collection.name ?? "?").charAt(0).toUpperCase();
|
|
47
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
+
"a",
|
|
49
|
+
{
|
|
50
|
+
href,
|
|
51
|
+
className: "block shrink-0 w-80 snap-start active:scale-[0.97] transition-transform duration-150",
|
|
52
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl border border-border overflow-hidden group bg-card hover:border-border/80 transition-colors", children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "aspect-square bg-muted relative overflow-hidden", children: image ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
"img",
|
|
55
|
+
{
|
|
56
|
+
src: image,
|
|
57
|
+
alt: collection.name ?? "",
|
|
58
|
+
loading: "lazy",
|
|
59
|
+
className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",
|
|
60
|
+
onError: () => setImgError(true)
|
|
61
|
+
}
|
|
62
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-brand-purple/30 via-brand-blue/20 to-brand-navy/40 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-5xl font-black text-white/10 select-none", children: initial }) }) }),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "p-3 space-y-0.5", children: [
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold truncate", children: collection.name ?? "Unnamed" }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: [
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
|
|
67
|
+
collection.totalSupply ?? 0,
|
|
68
|
+
" items"
|
|
69
|
+
] }),
|
|
70
|
+
collection.floorPrice && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-semibold text-brand-orange", children: (0, import_format.formatDisplayPrice)(collection.floorPrice) })
|
|
71
|
+
] })
|
|
72
|
+
] })
|
|
73
|
+
] })
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
function DiscoverCollectionsStrip({
|
|
78
|
+
collections,
|
|
79
|
+
isLoading,
|
|
80
|
+
getHref,
|
|
81
|
+
allCollectionsHref = "/collections"
|
|
82
|
+
}) {
|
|
83
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "section-label", children: "NFT" }),
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Layers, { className: "h-4 w-4 text-brand-blue" }),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-lg font-bold", children: "Collections" })
|
|
90
|
+
] })
|
|
91
|
+
] }),
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
93
|
+
"a",
|
|
94
|
+
{
|
|
95
|
+
href: allCollectionsHref,
|
|
96
|
+
className: "inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors",
|
|
97
|
+
children: [
|
|
98
|
+
"View all ",
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3.5 w-3.5" })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
] }),
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "overflow-x-auto scrollbar-hide snap-x snap-mandatory -mx-4 px-4 md:mx-0 md:px-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex gap-3 w-max pb-1", children: isLoading ? Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollectionChipSkeleton, {}, i)) : collections.map((col) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollectionChip, { collection: col, href: getHref(col) }, col.contractAddress)) }) })
|
|
105
|
+
] }) });
|
|
106
|
+
}
|
|
107
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
108
|
+
0 && (module.exports = {
|
|
109
|
+
DiscoverCollectionsStrip
|
|
110
|
+
});
|
|
111
|
+
//# sourceMappingURL=discover-collections-strip.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-collections-strip.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Layers, ArrowRight } from \"lucide-react\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport type { ApiCollection } from \"@medialane/sdk\";\n\nexport interface DiscoverCollectionsStripProps {\n collections: ApiCollection[];\n isLoading: boolean;\n getHref: (collection: ApiCollection) => string;\n allCollectionsHref?: string;\n}\n\nfunction CollectionChipSkeleton() {\n return (\n <div className=\"shrink-0 w-80 rounded-xl border border-border overflow-hidden\">\n <div className=\"aspect-square w-full bg-muted animate-pulse\" />\n <div className=\"p-3 space-y-1.5\">\n <div className=\"h-3.5 w-28 bg-muted animate-pulse rounded\" />\n <div className=\"h-3 w-16 bg-muted animate-pulse rounded\" />\n </div>\n </div>\n );\n}\n\nfunction CollectionChip({\n collection,\n href,\n}: {\n collection: ApiCollection;\n href: string;\n}) {\n const [imgError, setImgError] = useState(false);\n const image = collection.image && !imgError ? ipfsToHttp(collection.image) : null;\n const initial = (collection.name ?? \"?\").charAt(0).toUpperCase();\n\n return (\n <a\n href={href}\n className=\"block shrink-0 w-80 snap-start active:scale-[0.97] transition-transform duration-150\"\n >\n <div className=\"rounded-xl border border-border overflow-hidden group bg-card hover:border-border/80 transition-colors\">\n <div className=\"aspect-square bg-muted relative overflow-hidden\">\n {image ? (\n <img\n src={image}\n alt={collection.name ?? \"\"}\n loading=\"lazy\"\n className=\"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500\"\n onError={() => setImgError(true)}\n />\n ) : (\n <div className=\"absolute inset-0 bg-gradient-to-br from-brand-purple/30 via-brand-blue/20 to-brand-navy/40 flex items-center justify-center\">\n <span className=\"text-5xl font-black text-white/10 select-none\">{initial}</span>\n </div>\n )}\n </div>\n <div className=\"p-3 space-y-0.5\">\n <p className=\"text-sm font-semibold truncate\">{collection.name ?? \"Unnamed\"}</p>\n <div className=\"flex items-center justify-between text-xs text-muted-foreground\">\n <span>{collection.totalSupply ?? 0} items</span>\n {collection.floorPrice && (\n <span className=\"font-semibold text-brand-orange\">\n {formatDisplayPrice(collection.floorPrice)}\n </span>\n )}\n </div>\n </div>\n </div>\n </a>\n );\n}\n\nexport function DiscoverCollectionsStrip({\n collections,\n isLoading,\n getHref,\n allCollectionsHref = \"/collections\",\n}: DiscoverCollectionsStripProps) {\n return (\n <FadeIn>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"section-label\">NFT</p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Layers className=\"h-4 w-4 text-brand-blue\" />\n <h2 className=\"text-lg font-bold\">Collections</h2>\n </div>\n </div>\n <a\n href={allCollectionsHref}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n View all <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n <div className=\"overflow-x-auto scrollbar-hide snap-x snap-mandatory -mx-4 px-4 md:mx-0 md:px-0\">\n <div className=\"flex gap-3 w-max pb-1\">\n {isLoading\n ? Array.from({ length: 6 }).map((_, i) => <CollectionChipSkeleton key={i} />)\n : collections.map((col) => (\n <CollectionChip key={col.contractAddress} collection={col} href={getHref(col)} />\n ))}\n </div>\n </div>\n </div>\n </FadeIn>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBM;AAjBN,mBAAyB;AACzB,0BAAmC;AACnC,+BAAuB;AACvB,kBAA2B;AAC3B,oBAAmC;AAUnC,SAAS,yBAAyB;AAChC,SACE,6CAAC,SAAI,WAAU,iEACb;AAAA,gDAAC,SAAI,WAAU,+CAA8C;AAAA,IAC7D,6CAAC,SAAI,WAAU,mBACb;AAAA,kDAAC,SAAI,WAAU,6CAA4C;AAAA,MAC3D,4CAAC,SAAI,WAAU,2CAA0C;AAAA,OAC3D;AAAA,KACF;AAEJ;AAEA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AACF,GAGG;AACD,QAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,KAAK;AAC9C,QAAM,QAAQ,WAAW,SAAS,CAAC,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AAAA;AAAA,YACU,4CAAC,kCAAW,WAAU,eAAc;AAAA;AAAA;AAAA,MAC/C;AAAA,OACF;AAAA,IACA,4CAAC,SAAI,WAAU,mFACb,sDAAC,SAAI,WAAU,yBACZ,sBACG,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAAM,4CAAC,4BAA4B,CAAG,CAAE,IAC1E,YAAY,IAAI,CAAC,QACf,4CAAC,kBAAyC,YAAY,KAAK,MAAM,QAAQ,GAAG,KAAvD,IAAI,eAAsD,CAChF,GACP,GACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ApiCollection } from '@medialane/sdk';
|
|
3
|
+
|
|
4
|
+
interface DiscoverCollectionsStripProps {
|
|
5
|
+
collections: ApiCollection[];
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
getHref: (collection: ApiCollection) => string;
|
|
8
|
+
allCollectionsHref?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function DiscoverCollectionsStrip({ collections, isLoading, getHref, allCollectionsHref, }: DiscoverCollectionsStripProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { DiscoverCollectionsStrip, type DiscoverCollectionsStripProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ApiCollection } from '@medialane/sdk';
|
|
3
|
+
|
|
4
|
+
interface DiscoverCollectionsStripProps {
|
|
5
|
+
collections: ApiCollection[];
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
getHref: (collection: ApiCollection) => string;
|
|
8
|
+
allCollectionsHref?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function DiscoverCollectionsStrip({ collections, isLoading, getHref, allCollectionsHref, }: DiscoverCollectionsStripProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { DiscoverCollectionsStrip, type DiscoverCollectionsStripProps };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Layers, ArrowRight } from "lucide-react";
|
|
5
|
+
import { FadeIn } from "./motion-primitives.js";
|
|
6
|
+
import { ipfsToHttp } from "../utils/ipfs.js";
|
|
7
|
+
import { formatDisplayPrice } from "../utils/format.js";
|
|
8
|
+
function CollectionChipSkeleton() {
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", { className: "shrink-0 w-80 rounded-xl border border-border overflow-hidden", children: [
|
|
10
|
+
/* @__PURE__ */ jsx("div", { className: "aspect-square w-full bg-muted animate-pulse" }),
|
|
11
|
+
/* @__PURE__ */ jsxs("div", { className: "p-3 space-y-1.5", children: [
|
|
12
|
+
/* @__PURE__ */ jsx("div", { className: "h-3.5 w-28 bg-muted animate-pulse rounded" }),
|
|
13
|
+
/* @__PURE__ */ jsx("div", { className: "h-3 w-16 bg-muted animate-pulse rounded" })
|
|
14
|
+
] })
|
|
15
|
+
] });
|
|
16
|
+
}
|
|
17
|
+
function CollectionChip({
|
|
18
|
+
collection,
|
|
19
|
+
href
|
|
20
|
+
}) {
|
|
21
|
+
const [imgError, setImgError] = useState(false);
|
|
22
|
+
const image = collection.image && !imgError ? ipfsToHttp(collection.image) : null;
|
|
23
|
+
const initial = (collection.name ?? "?").charAt(0).toUpperCase();
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
"a",
|
|
26
|
+
{
|
|
27
|
+
href,
|
|
28
|
+
className: "block shrink-0 w-80 snap-start active:scale-[0.97] transition-transform duration-150",
|
|
29
|
+
children: /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border overflow-hidden group bg-card hover:border-border/80 transition-colors", children: [
|
|
30
|
+
/* @__PURE__ */ jsx("div", { className: "aspect-square bg-muted relative overflow-hidden", children: image ? /* @__PURE__ */ jsx(
|
|
31
|
+
"img",
|
|
32
|
+
{
|
|
33
|
+
src: image,
|
|
34
|
+
alt: collection.name ?? "",
|
|
35
|
+
loading: "lazy",
|
|
36
|
+
className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",
|
|
37
|
+
onError: () => setImgError(true)
|
|
38
|
+
}
|
|
39
|
+
) : /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-br from-brand-purple/30 via-brand-blue/20 to-brand-navy/40 flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-5xl font-black text-white/10 select-none", children: initial }) }) }),
|
|
40
|
+
/* @__PURE__ */ jsxs("div", { className: "p-3 space-y-0.5", children: [
|
|
41
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold truncate", children: collection.name ?? "Unnamed" }),
|
|
42
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: [
|
|
43
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
44
|
+
collection.totalSupply ?? 0,
|
|
45
|
+
" items"
|
|
46
|
+
] }),
|
|
47
|
+
collection.floorPrice && /* @__PURE__ */ jsx("span", { className: "font-semibold text-brand-orange", children: formatDisplayPrice(collection.floorPrice) })
|
|
48
|
+
] })
|
|
49
|
+
] })
|
|
50
|
+
] })
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
function DiscoverCollectionsStrip({
|
|
55
|
+
collections,
|
|
56
|
+
isLoading,
|
|
57
|
+
getHref,
|
|
58
|
+
allCollectionsHref = "/collections"
|
|
59
|
+
}) {
|
|
60
|
+
return /* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
61
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
62
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
63
|
+
/* @__PURE__ */ jsx("p", { className: "section-label", children: "NFT" }),
|
|
64
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Layers, { className: "h-4 w-4 text-brand-blue" }),
|
|
66
|
+
/* @__PURE__ */ jsx("h2", { className: "text-lg font-bold", children: "Collections" })
|
|
67
|
+
] })
|
|
68
|
+
] }),
|
|
69
|
+
/* @__PURE__ */ jsxs(
|
|
70
|
+
"a",
|
|
71
|
+
{
|
|
72
|
+
href: allCollectionsHref,
|
|
73
|
+
className: "inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors",
|
|
74
|
+
children: [
|
|
75
|
+
"View all ",
|
|
76
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5" })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto scrollbar-hide snap-x snap-mandatory -mx-4 px-4 md:mx-0 md:px-0", children: /* @__PURE__ */ jsx("div", { className: "flex gap-3 w-max pb-1", children: isLoading ? Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsx(CollectionChipSkeleton, {}, i)) : collections.map((col) => /* @__PURE__ */ jsx(CollectionChip, { collection: col, href: getHref(col) }, col.contractAddress)) }) })
|
|
82
|
+
] }) });
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
DiscoverCollectionsStrip
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=discover-collections-strip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-collections-strip.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Layers, ArrowRight } from \"lucide-react\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport type { ApiCollection } from \"@medialane/sdk\";\n\nexport interface DiscoverCollectionsStripProps {\n collections: ApiCollection[];\n isLoading: boolean;\n getHref: (collection: ApiCollection) => string;\n allCollectionsHref?: string;\n}\n\nfunction CollectionChipSkeleton() {\n return (\n <div className=\"shrink-0 w-80 rounded-xl border border-border overflow-hidden\">\n <div className=\"aspect-square w-full bg-muted animate-pulse\" />\n <div className=\"p-3 space-y-1.5\">\n <div className=\"h-3.5 w-28 bg-muted animate-pulse rounded\" />\n <div className=\"h-3 w-16 bg-muted animate-pulse rounded\" />\n </div>\n </div>\n );\n}\n\nfunction CollectionChip({\n collection,\n href,\n}: {\n collection: ApiCollection;\n href: string;\n}) {\n const [imgError, setImgError] = useState(false);\n const image = collection.image && !imgError ? ipfsToHttp(collection.image) : null;\n const initial = (collection.name ?? \"?\").charAt(0).toUpperCase();\n\n return (\n <a\n href={href}\n className=\"block shrink-0 w-80 snap-start active:scale-[0.97] transition-transform duration-150\"\n >\n <div className=\"rounded-xl border border-border overflow-hidden group bg-card hover:border-border/80 transition-colors\">\n <div className=\"aspect-square bg-muted relative overflow-hidden\">\n {image ? (\n <img\n src={image}\n alt={collection.name ?? \"\"}\n loading=\"lazy\"\n className=\"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500\"\n onError={() => setImgError(true)}\n />\n ) : (\n <div className=\"absolute inset-0 bg-gradient-to-br from-brand-purple/30 via-brand-blue/20 to-brand-navy/40 flex items-center justify-center\">\n <span className=\"text-5xl font-black text-white/10 select-none\">{initial}</span>\n </div>\n )}\n </div>\n <div className=\"p-3 space-y-0.5\">\n <p className=\"text-sm font-semibold truncate\">{collection.name ?? \"Unnamed\"}</p>\n <div className=\"flex items-center justify-between text-xs text-muted-foreground\">\n <span>{collection.totalSupply ?? 0} items</span>\n {collection.floorPrice && (\n <span className=\"font-semibold text-brand-orange\">\n {formatDisplayPrice(collection.floorPrice)}\n </span>\n )}\n </div>\n </div>\n </div>\n </a>\n );\n}\n\nexport function DiscoverCollectionsStrip({\n collections,\n isLoading,\n getHref,\n allCollectionsHref = \"/collections\",\n}: DiscoverCollectionsStripProps) {\n return (\n <FadeIn>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"section-label\">NFT</p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Layers className=\"h-4 w-4 text-brand-blue\" />\n <h2 className=\"text-lg font-bold\">Collections</h2>\n </div>\n </div>\n <a\n href={allCollectionsHref}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n View all <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n <div className=\"overflow-x-auto scrollbar-hide snap-x snap-mandatory -mx-4 px-4 md:mx-0 md:px-0\">\n <div className=\"flex gap-3 w-max pb-1\">\n {isLoading\n ? Array.from({ length: 6 }).map((_, i) => <CollectionChipSkeleton key={i} />)\n : collections.map((col) => (\n <CollectionChip key={col.contractAddress} collection={col} href={getHref(col)} />\n ))}\n </div>\n </div>\n </div>\n </FadeIn>\n );\n}\n"],"mappings":";AAmBM,cACA,YADA;AAjBN,SAAS,gBAAgB;AACzB,SAAS,QAAQ,kBAAkB;AACnC,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,0BAA0B;AAUnC,SAAS,yBAAyB;AAChC,SACE,qBAAC,SAAI,WAAU,iEACb;AAAA,wBAAC,SAAI,WAAU,+CAA8C;AAAA,IAC7D,qBAAC,SAAI,WAAU,mBACb;AAAA,0BAAC,SAAI,WAAU,6CAA4C;AAAA,MAC3D,oBAAC,SAAI,WAAU,2CAA0C;AAAA,OAC3D;AAAA,KACF;AAEJ;AAEA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AACF,GAGG;AACD,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,QAAQ,WAAW,SAAS,CAAC,WAAW,WAAW,WAAW,KAAK,IAAI;AAC7E,QAAM,WAAW,WAAW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A,MAC/C;AAAA,OACF;AAAA,IACA,oBAAC,SAAI,WAAU,mFACb,8BAAC,SAAI,WAAU,yBACZ,sBACG,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAAM,oBAAC,4BAA4B,CAAG,CAAE,IAC1E,YAAY,IAAI,CAAC,QACf,oBAAC,kBAAyC,YAAY,KAAK,MAAM,QAAQ,GAAG,KAAvD,IAAI,eAAsD,CAChF,GACP,GACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,131 @@
|
|
|
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 discover_creators_strip_exports = {};
|
|
21
|
+
__export(discover_creators_strip_exports, {
|
|
22
|
+
DiscoverCreatorsStrip: () => DiscoverCreatorsStrip
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(discover_creators_strip_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_lucide_react = require("lucide-react");
|
|
28
|
+
var import_motion_primitives = require("./motion-primitives.js");
|
|
29
|
+
var import_ipfs = require("../utils/ipfs.js");
|
|
30
|
+
function hslGradient(seed) {
|
|
31
|
+
const hue = seed.split("").reduce((acc, c) => acc + c.charCodeAt(0), 0) % 360;
|
|
32
|
+
const hue2 = (hue + 60) % 360;
|
|
33
|
+
return `linear-gradient(135deg, hsl(${hue},55%,35%), hsl(${hue2},50%,22%))`;
|
|
34
|
+
}
|
|
35
|
+
function CreatorChipSkeleton() {
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "shrink-0 w-64 aspect-[3/4] rounded-xl bg-muted animate-pulse" });
|
|
37
|
+
}
|
|
38
|
+
function CreatorChip({
|
|
39
|
+
creator,
|
|
40
|
+
href
|
|
41
|
+
}) {
|
|
42
|
+
const [avatarError, setAvatarError] = (0, import_react.useState)(false);
|
|
43
|
+
const [bannerError, setBannerError] = (0, import_react.useState)(false);
|
|
44
|
+
const avatarUrl = creator.avatarImage && !avatarError ? (0, import_ipfs.ipfsToHttp)(creator.avatarImage) : null;
|
|
45
|
+
const bannerUrl = creator.bannerImage && !bannerError ? (0, import_ipfs.ipfsToHttp)(creator.bannerImage) : null;
|
|
46
|
+
const displayName = creator.displayName || `@${creator.username}`;
|
|
47
|
+
const gradient = hslGradient(creator.username ?? "a");
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
|
+
"a",
|
|
50
|
+
{
|
|
51
|
+
href,
|
|
52
|
+
className: "block shrink-0 w-64 snap-start active:scale-[0.97] transition-transform duration-150 select-none",
|
|
53
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative aspect-[3/4] rounded-xl overflow-hidden", children: [
|
|
54
|
+
bannerUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
"img",
|
|
56
|
+
{
|
|
57
|
+
src: bannerUrl,
|
|
58
|
+
alt: "",
|
|
59
|
+
"aria-hidden": true,
|
|
60
|
+
loading: "lazy",
|
|
61
|
+
className: "absolute inset-0 w-full h-full object-cover",
|
|
62
|
+
onError: () => setBannerError(true)
|
|
63
|
+
}
|
|
64
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0", style: { background: gradient } }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/10 to-transparent" }),
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "absolute bottom-0 inset-x-0 p-2.5 space-y-1.5", children: [
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
className: "h-8 w-8 rounded-full ring-2 ring-white/20 overflow-hidden flex items-center justify-center",
|
|
71
|
+
style: !avatarUrl ? { background: gradient } : {},
|
|
72
|
+
children: avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
|
+
"img",
|
|
74
|
+
{
|
|
75
|
+
src: avatarUrl,
|
|
76
|
+
alt: displayName ?? "",
|
|
77
|
+
loading: "lazy",
|
|
78
|
+
className: "h-full w-full object-cover",
|
|
79
|
+
onError: () => setAvatarError(true)
|
|
80
|
+
}
|
|
81
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs font-black text-white", children: (displayName ?? "?").charAt(0).toUpperCase() })
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-bold text-white text-xs truncate", children: displayName }),
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-[10px] text-white/55 flex items-center gap-0.5", children: [
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AtSign, { className: "h-2 w-2 shrink-0" }),
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "truncate", children: creator.username })
|
|
89
|
+
] })
|
|
90
|
+
] })
|
|
91
|
+
] })
|
|
92
|
+
] })
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
function DiscoverCreatorsStrip({
|
|
97
|
+
creators,
|
|
98
|
+
isLoading,
|
|
99
|
+
getHref,
|
|
100
|
+
allCreatorsHref = "/creators"
|
|
101
|
+
}) {
|
|
102
|
+
if (!isLoading && creators.length === 0) return null;
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "section-label", children: "Creator network" }),
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
108
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Users, { className: "h-4 w-4 text-brand-purple" }),
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-lg font-bold", children: "Creators" })
|
|
110
|
+
] })
|
|
111
|
+
] }),
|
|
112
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
113
|
+
"a",
|
|
114
|
+
{
|
|
115
|
+
href: allCreatorsHref,
|
|
116
|
+
className: "inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors",
|
|
117
|
+
children: [
|
|
118
|
+
"View all ",
|
|
119
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3.5 w-3.5" })
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "overflow-x-auto scrollbar-hide snap-x snap-mandatory -mx-4 px-4 md:mx-0 md:px-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex gap-3 w-max pb-1", children: isLoading ? Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CreatorChipSkeleton, {}, i)) : creators.map((c) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CreatorChip, { creator: c, href: getHref(c) }, c.walletAddress)) }) })
|
|
125
|
+
] }) });
|
|
126
|
+
}
|
|
127
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
128
|
+
0 && (module.exports = {
|
|
129
|
+
DiscoverCreatorsStrip
|
|
130
|
+
});
|
|
131
|
+
//# sourceMappingURL=discover-creators-strip.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-creators-strip.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Users, ArrowRight, AtSign } from \"lucide-react\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport type { ApiCreatorProfile } from \"@medialane/sdk\";\n\nexport interface DiscoverCreatorsStripProps {\n creators: ApiCreatorProfile[];\n isLoading: boolean;\n getHref: (creator: ApiCreatorProfile) => string;\n allCreatorsHref?: string;\n}\n\nfunction hslGradient(seed: string) {\n const hue = seed.split(\"\").reduce((acc, c) => acc + c.charCodeAt(0), 0) % 360;\n const hue2 = (hue + 60) % 360;\n return `linear-gradient(135deg, hsl(${hue},55%,35%), hsl(${hue2},50%,22%))`;\n}\n\nfunction CreatorChipSkeleton() {\n return (\n <div className=\"shrink-0 w-64 aspect-[3/4] rounded-xl bg-muted animate-pulse\" />\n );\n}\n\nfunction CreatorChip({\n creator,\n href,\n}: {\n creator: ApiCreatorProfile;\n href: string;\n}) {\n const [avatarError, setAvatarError] = useState(false);\n const [bannerError, setBannerError] = useState(false);\n\n const avatarUrl = creator.avatarImage && !avatarError ? ipfsToHttp(creator.avatarImage) : null;\n const bannerUrl = creator.bannerImage && !bannerError ? ipfsToHttp(creator.bannerImage) : null;\n const displayName = creator.displayName || `@${creator.username}`;\n const gradient = hslGradient(creator.username ?? \"a\");\n\n return (\n <a\n href={href}\n className=\"block shrink-0 w-64 snap-start active:scale-[0.97] transition-transform duration-150 select-none\"\n >\n <div className=\"relative aspect-[3/4] rounded-xl overflow-hidden\">\n {bannerUrl ? (\n <img\n src={bannerUrl}\n alt=\"\"\n aria-hidden\n loading=\"lazy\"\n className=\"absolute inset-0 w-full h-full object-cover\"\n onError={() => setBannerError(true)}\n />\n ) : (\n <div className=\"absolute inset-0\" style={{ background: gradient }} />\n )}\n <div className=\"absolute inset-0 bg-gradient-to-t from-black/80 via-black/10 to-transparent\" />\n <div className=\"absolute bottom-0 inset-x-0 p-2.5 space-y-1.5\">\n <div\n className=\"h-8 w-8 rounded-full ring-2 ring-white/20 overflow-hidden flex items-center justify-center\"\n style={!avatarUrl ? { background: gradient } : {}}\n >\n {avatarUrl ? (\n <img\n src={avatarUrl}\n alt={displayName ?? \"\"}\n loading=\"lazy\"\n className=\"h-full w-full object-cover\"\n onError={() => setAvatarError(true)}\n />\n ) : (\n <span className=\"text-xs font-black text-white\">\n {(displayName ?? \"?\").charAt(0).toUpperCase()}\n </span>\n )}\n </div>\n <div>\n <p className=\"font-bold text-white text-xs truncate\">{displayName}</p>\n <p className=\"text-[10px] text-white/55 flex items-center gap-0.5\">\n <AtSign className=\"h-2 w-2 shrink-0\" />\n <span className=\"truncate\">{creator.username}</span>\n </p>\n </div>\n </div>\n </div>\n </a>\n );\n}\n\nexport function DiscoverCreatorsStrip({\n creators,\n isLoading,\n getHref,\n allCreatorsHref = \"/creators\",\n}: DiscoverCreatorsStripProps) {\n if (!isLoading && creators.length === 0) return null;\n\n return (\n <FadeIn>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"section-label\">Creator network</p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Users className=\"h-4 w-4 text-brand-purple\" />\n <h2 className=\"text-lg font-bold\">Creators</h2>\n </div>\n </div>\n <a\n href={allCreatorsHref}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n View all <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n <div className=\"overflow-x-auto scrollbar-hide snap-x snap-mandatory -mx-4 px-4 md:mx-0 md:px-0\">\n <div className=\"flex gap-3 w-max pb-1\">\n {isLoading\n ? Array.from({ length: 6 }).map((_, i) => <CreatorChipSkeleton key={i} />)\n : creators.map((c) => (\n <CreatorChip key={c.walletAddress} creator={c} href={getHref(c)} />\n ))}\n </div>\n </div>\n </div>\n </FadeIn>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBI;AArBJ,mBAAyB;AACzB,0BAA0C;AAC1C,+BAAuB;AACvB,kBAA2B;AAU3B,SAAS,YAAY,MAAc;AACjC,QAAM,MAAM,KAAK,MAAM,EAAE,EAAE,OAAO,CAAC,KAAK,MAAM,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,IAAI;AAC1E,QAAM,QAAQ,MAAM,MAAM;AAC1B,SAAO,+BAA+B,GAAG,kBAAkB,IAAI;AACjE;AAEA,SAAS,sBAAsB;AAC7B,SACE,4CAAC,SAAI,WAAU,gEAA+D;AAElF;AAEA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA;AACF,GAGG;AACD,QAAM,CAAC,aAAa,cAAc,QAAI,uB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C,UAAK,WAAU,YAAY,kBAAQ,UAAS;AAAA,eAC/C;AAAA,aACF;AAAA,WACF;AAAA,SACF;AAAA;AAAA,EACF;AAEJ;AAEO,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA,kBAAkB;AACpB,GAA+B;AAC7B,MAAI,CAAC,aAAa,SAAS,WAAW,EAAG,QAAO;AAEhD,SACE,4CAAC,mCACC,uDAAC,SAAI,WAAU,aACb;AAAA,iDAAC,SAAI,WAAU,qCACb;AAAA,mDAAC,SACC;AAAA,oDAAC,OAAE,WAAU,iBAAgB,6BAAe;AAAA,QAC5C,6CAAC,SAAI,WAAU,kCACb;AAAA,sDAAC,6BAAM,WAAU,6BAA4B;AAAA,UAC7C,4CAAC,QAAG,WAAU,qBAAoB,sBAAQ;AAAA,WAC5C;AAAA,SACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,WAAU;AAAA,UACX;AAAA;AAAA,YACU,4CAAC,kCAAW,WAAU,eAAc;AAAA;AAAA;AAAA,MAC/C;AAAA,OACF;AAAA,IACA,4CAAC,SAAI,WAAU,mFACb,sDAAC,SAAI,WAAU,yBACZ,sBACG,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAAM,4CAAC,yBAAyB,CAAG,CAAE,IACvE,SAAS,IAAI,CAAC,MACZ,4CAAC,eAAkC,SAAS,GAAG,MAAM,QAAQ,CAAC,KAA5C,EAAE,aAA6C,CAClE,GACP,GACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ApiCreatorProfile } from '@medialane/sdk';
|
|
3
|
+
|
|
4
|
+
interface DiscoverCreatorsStripProps {
|
|
5
|
+
creators: ApiCreatorProfile[];
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
getHref: (creator: ApiCreatorProfile) => string;
|
|
8
|
+
allCreatorsHref?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function DiscoverCreatorsStrip({ creators, isLoading, getHref, allCreatorsHref, }: DiscoverCreatorsStripProps): react_jsx_runtime.JSX.Element | null;
|
|
11
|
+
|
|
12
|
+
export { DiscoverCreatorsStrip, type DiscoverCreatorsStripProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ApiCreatorProfile } from '@medialane/sdk';
|
|
3
|
+
|
|
4
|
+
interface DiscoverCreatorsStripProps {
|
|
5
|
+
creators: ApiCreatorProfile[];
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
getHref: (creator: ApiCreatorProfile) => string;
|
|
8
|
+
allCreatorsHref?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function DiscoverCreatorsStrip({ creators, isLoading, getHref, allCreatorsHref, }: DiscoverCreatorsStripProps): react_jsx_runtime.JSX.Element | null;
|
|
11
|
+
|
|
12
|
+
export { DiscoverCreatorsStrip, type DiscoverCreatorsStripProps };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Users, ArrowRight, AtSign } from "lucide-react";
|
|
5
|
+
import { FadeIn } from "./motion-primitives.js";
|
|
6
|
+
import { ipfsToHttp } from "../utils/ipfs.js";
|
|
7
|
+
function hslGradient(seed) {
|
|
8
|
+
const hue = seed.split("").reduce((acc, c) => acc + c.charCodeAt(0), 0) % 360;
|
|
9
|
+
const hue2 = (hue + 60) % 360;
|
|
10
|
+
return `linear-gradient(135deg, hsl(${hue},55%,35%), hsl(${hue2},50%,22%))`;
|
|
11
|
+
}
|
|
12
|
+
function CreatorChipSkeleton() {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", { className: "shrink-0 w-64 aspect-[3/4] rounded-xl bg-muted animate-pulse" });
|
|
14
|
+
}
|
|
15
|
+
function CreatorChip({
|
|
16
|
+
creator,
|
|
17
|
+
href
|
|
18
|
+
}) {
|
|
19
|
+
const [avatarError, setAvatarError] = useState(false);
|
|
20
|
+
const [bannerError, setBannerError] = useState(false);
|
|
21
|
+
const avatarUrl = creator.avatarImage && !avatarError ? ipfsToHttp(creator.avatarImage) : null;
|
|
22
|
+
const bannerUrl = creator.bannerImage && !bannerError ? ipfsToHttp(creator.bannerImage) : null;
|
|
23
|
+
const displayName = creator.displayName || `@${creator.username}`;
|
|
24
|
+
const gradient = hslGradient(creator.username ?? "a");
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
"a",
|
|
27
|
+
{
|
|
28
|
+
href,
|
|
29
|
+
className: "block shrink-0 w-64 snap-start active:scale-[0.97] transition-transform duration-150 select-none",
|
|
30
|
+
children: /* @__PURE__ */ jsxs("div", { className: "relative aspect-[3/4] rounded-xl overflow-hidden", children: [
|
|
31
|
+
bannerUrl ? /* @__PURE__ */ jsx(
|
|
32
|
+
"img",
|
|
33
|
+
{
|
|
34
|
+
src: bannerUrl,
|
|
35
|
+
alt: "",
|
|
36
|
+
"aria-hidden": true,
|
|
37
|
+
loading: "lazy",
|
|
38
|
+
className: "absolute inset-0 w-full h-full object-cover",
|
|
39
|
+
onError: () => setBannerError(true)
|
|
40
|
+
}
|
|
41
|
+
) : /* @__PURE__ */ jsx("div", { className: "absolute inset-0", style: { background: gradient } }),
|
|
42
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/10 to-transparent" }),
|
|
43
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute bottom-0 inset-x-0 p-2.5 space-y-1.5", children: [
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: "h-8 w-8 rounded-full ring-2 ring-white/20 overflow-hidden flex items-center justify-center",
|
|
48
|
+
style: !avatarUrl ? { background: gradient } : {},
|
|
49
|
+
children: avatarUrl ? /* @__PURE__ */ jsx(
|
|
50
|
+
"img",
|
|
51
|
+
{
|
|
52
|
+
src: avatarUrl,
|
|
53
|
+
alt: displayName ?? "",
|
|
54
|
+
loading: "lazy",
|
|
55
|
+
className: "h-full w-full object-cover",
|
|
56
|
+
onError: () => setAvatarError(true)
|
|
57
|
+
}
|
|
58
|
+
) : /* @__PURE__ */ jsx("span", { className: "text-xs font-black text-white", children: (displayName ?? "?").charAt(0).toUpperCase() })
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
62
|
+
/* @__PURE__ */ jsx("p", { className: "font-bold text-white text-xs truncate", children: displayName }),
|
|
63
|
+
/* @__PURE__ */ jsxs("p", { className: "text-[10px] text-white/55 flex items-center gap-0.5", children: [
|
|
64
|
+
/* @__PURE__ */ jsx(AtSign, { className: "h-2 w-2 shrink-0" }),
|
|
65
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: creator.username })
|
|
66
|
+
] })
|
|
67
|
+
] })
|
|
68
|
+
] })
|
|
69
|
+
] })
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function DiscoverCreatorsStrip({
|
|
74
|
+
creators,
|
|
75
|
+
isLoading,
|
|
76
|
+
getHref,
|
|
77
|
+
allCreatorsHref = "/creators"
|
|
78
|
+
}) {
|
|
79
|
+
if (!isLoading && creators.length === 0) return null;
|
|
80
|
+
return /* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
81
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
82
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
83
|
+
/* @__PURE__ */ jsx("p", { className: "section-label", children: "Creator network" }),
|
|
84
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
85
|
+
/* @__PURE__ */ jsx(Users, { className: "h-4 w-4 text-brand-purple" }),
|
|
86
|
+
/* @__PURE__ */ jsx("h2", { className: "text-lg font-bold", children: "Creators" })
|
|
87
|
+
] })
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ jsxs(
|
|
90
|
+
"a",
|
|
91
|
+
{
|
|
92
|
+
href: allCreatorsHref,
|
|
93
|
+
className: "inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors",
|
|
94
|
+
children: [
|
|
95
|
+
"View all ",
|
|
96
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5" })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto scrollbar-hide snap-x snap-mandatory -mx-4 px-4 md:mx-0 md:px-0", children: /* @__PURE__ */ jsx("div", { className: "flex gap-3 w-max pb-1", children: isLoading ? Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsx(CreatorChipSkeleton, {}, i)) : creators.map((c) => /* @__PURE__ */ jsx(CreatorChip, { creator: c, href: getHref(c) }, c.walletAddress)) }) })
|
|
102
|
+
] }) });
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
DiscoverCreatorsStrip
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=discover-creators-strip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-creators-strip.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Users, ArrowRight, AtSign } from \"lucide-react\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport type { ApiCreatorProfile } from \"@medialane/sdk\";\n\nexport interface DiscoverCreatorsStripProps {\n creators: ApiCreatorProfile[];\n isLoading: boolean;\n getHref: (creator: ApiCreatorProfile) => string;\n allCreatorsHref?: string;\n}\n\nfunction hslGradient(seed: string) {\n const hue = seed.split(\"\").reduce((acc, c) => acc + c.charCodeAt(0), 0) % 360;\n const hue2 = (hue + 60) % 360;\n return `linear-gradient(135deg, hsl(${hue},55%,35%), hsl(${hue2},50%,22%))`;\n}\n\nfunction CreatorChipSkeleton() {\n return (\n <div className=\"shrink-0 w-64 aspect-[3/4] rounded-xl bg-muted animate-pulse\" />\n );\n}\n\nfunction CreatorChip({\n creator,\n href,\n}: {\n creator: ApiCreatorProfile;\n href: string;\n}) {\n const [avatarError, setAvatarError] = useState(false);\n const [bannerError, setBannerError] = useState(false);\n\n const avatarUrl = creator.avatarImage && !avatarError ? ipfsToHttp(creator.avatarImage) : null;\n const bannerUrl = creator.bannerImage && !bannerError ? ipfsToHttp(creator.bannerImage) : null;\n const displayName = creator.displayName || `@${creator.username}`;\n const gradient = hslGradient(creator.username ?? \"a\");\n\n return (\n <a\n href={href}\n className=\"block shrink-0 w-64 snap-start active:scale-[0.97] transition-transform duration-150 select-none\"\n >\n <div className=\"relative aspect-[3/4] rounded-xl overflow-hidden\">\n {bannerUrl ? (\n <img\n src={bannerUrl}\n alt=\"\"\n aria-hidden\n loading=\"lazy\"\n className=\"absolute inset-0 w-full h-full object-cover\"\n onError={() => setBannerError(true)}\n />\n ) : (\n <div className=\"absolute inset-0\" style={{ background: gradient }} />\n )}\n <div className=\"absolute inset-0 bg-gradient-to-t from-black/80 via-black/10 to-transparent\" />\n <div className=\"absolute bottom-0 inset-x-0 p-2.5 space-y-1.5\">\n <div\n className=\"h-8 w-8 rounded-full ring-2 ring-white/20 overflow-hidden flex items-center justify-center\"\n style={!avatarUrl ? { background: gradient } : {}}\n >\n {avatarUrl ? (\n <img\n src={avatarUrl}\n alt={displayName ?? \"\"}\n loading=\"lazy\"\n className=\"h-full w-full object-cover\"\n onError={() => setAvatarError(true)}\n />\n ) : (\n <span className=\"text-xs font-black text-white\">\n {(displayName ?? \"?\").charAt(0).toUpperCase()}\n </span>\n )}\n </div>\n <div>\n <p className=\"font-bold text-white text-xs truncate\">{displayName}</p>\n <p className=\"text-[10px] text-white/55 flex items-center gap-0.5\">\n <AtSign className=\"h-2 w-2 shrink-0\" />\n <span className=\"truncate\">{creator.username}</span>\n </p>\n </div>\n </div>\n </div>\n </a>\n );\n}\n\nexport function DiscoverCreatorsStrip({\n creators,\n isLoading,\n getHref,\n allCreatorsHref = \"/creators\",\n}: DiscoverCreatorsStripProps) {\n if (!isLoading && creators.length === 0) return null;\n\n return (\n <FadeIn>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"section-label\">Creator network</p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Users className=\"h-4 w-4 text-brand-purple\" />\n <h2 className=\"text-lg font-bold\">Creators</h2>\n </div>\n </div>\n <a\n href={allCreatorsHref}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n View all <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n <div className=\"overflow-x-auto scrollbar-hide snap-x snap-mandatory -mx-4 px-4 md:mx-0 md:px-0\">\n <div className=\"flex gap-3 w-max pb-1\">\n {isLoading\n ? Array.from({ length: 6 }).map((_, i) => <CreatorChipSkeleton key={i} />)\n : creators.map((c) => (\n <CreatorChip key={c.walletAddress} creator={c} href={getHref(c)} />\n ))}\n </div>\n </div>\n </div>\n </FadeIn>\n );\n}\n"],"mappings":";AAuBI,cA2DQ,YA3DR;AArBJ,SAAS,gBAAgB;AACzB,SAAS,OAAO,YAAY,cAAc;AAC1C,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAU3B,SAAS,YAAY,MAAc;AACjC,QAAM,MAAM,KAAK,MAAM,EAAE,EAAE,OAAO,CAAC,KAAK,MAAM,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,IAAI;AAC1E,QAAM,QAAQ,MAAM,MAAM;AAC1B,SAAO,+BAA+B,GAAG,kBAAkB,I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