@medialane/ui 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/components/discover-collections-strip.cjs +111 -0
  2. package/dist/components/discover-collections-strip.cjs.map +1 -0
  3. package/dist/components/discover-collections-strip.d.cts +12 -0
  4. package/dist/components/discover-collections-strip.d.ts +12 -0
  5. package/dist/components/discover-collections-strip.js +87 -0
  6. package/dist/components/discover-collections-strip.js.map +1 -0
  7. package/dist/components/discover-creators-strip.cjs +118 -0
  8. package/dist/components/discover-creators-strip.cjs.map +1 -0
  9. package/dist/components/discover-creators-strip.d.cts +12 -0
  10. package/dist/components/discover-creators-strip.d.ts +12 -0
  11. package/dist/components/discover-creators-strip.js +94 -0
  12. package/dist/components/discover-creators-strip.js.map +1 -0
  13. package/dist/components/discover-feed-section.cjs +96 -0
  14. package/dist/components/discover-feed-section.cjs.map +1 -0
  15. package/dist/components/discover-feed-section.d.cts +18 -0
  16. package/dist/components/discover-feed-section.d.ts +18 -0
  17. package/dist/components/discover-feed-section.js +72 -0
  18. package/dist/components/discover-feed-section.js.map +1 -0
  19. package/dist/components/discover-hero.cjs +87 -0
  20. package/dist/components/discover-hero.cjs.map +1 -0
  21. package/dist/components/discover-hero.d.cts +16 -0
  22. package/dist/components/discover-hero.d.ts +16 -0
  23. package/dist/components/discover-hero.js +63 -0
  24. package/dist/components/discover-hero.js.map +1 -0
  25. package/dist/components/featured-carousel.cjs +181 -0
  26. package/dist/components/featured-carousel.cjs.map +1 -0
  27. package/dist/components/featured-carousel.d.cts +13 -0
  28. package/dist/components/featured-carousel.d.ts +13 -0
  29. package/dist/components/featured-carousel.js +156 -0
  30. package/dist/components/featured-carousel.js.map +1 -0
  31. package/dist/index.cjs +17 -0
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +5 -0
  34. package/dist/index.d.ts +5 -0
  35. package/dist/index.js +11 -0
  36. package/dist/index.js.map +1 -1
  37. 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 </FadeI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gDAAmB,WAAW,UAAU,GAC3C;AAAA,aAEJ;AAAA,WACF;AAAA,SACF;AAAA;AAAA,EACF;AAEJ;AAEO,SAAS,yBAAyB;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA,qBAAqB;AACvB,GAAkC;AAChC,SACE,4CAAC,mCACC,uDAAC,SAAI,WAAU,aACb;AAAA,iDAAC,SAAI,WAAU,qCACb;AAAA,mDAAC,SACC;AAAA,oDAAC,OAAE,WAAU,iBAAgB,iBAAG;AAAA,QAChC,6CAAC,SAAI,WAAU,kCACb;AAAA,sDAAC,8BAAO,WAAU,2BAA0B;AAAA,UAC5C,4CAAC,QAAG,WAAU,qBAAoB,yBAAW;AAAA,WAC/C;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,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,QAAQ,KAAK,OAAO,CAAC,EAAE,YAAY;AAE/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAU;AAAA,MAEV,+BAAC,SAAI,WAAU,0GACb;AAAA,4BAAC,SAAI,WAAU,mDACZ,kBACC;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,KAAK,WAAW,QAAQ;AAAA,YACxB,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,SAAS,MAA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ACF;AAAA,KACF,GACF;AAEJ;","names":[]}
@@ -0,0 +1,118 @@
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 CreatorChipSkeleton() {
31
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "shrink-0 w-64 aspect-[3/4] rounded-xl bg-muted animate-pulse" });
32
+ }
33
+ function CreatorChip({
34
+ creator,
35
+ href
36
+ }) {
37
+ const [avatarError, setAvatarError] = (0, import_react.useState)(false);
38
+ const [bannerError, setBannerError] = (0, import_react.useState)(false);
39
+ const avatarUrl = creator.avatarImage && !avatarError ? (0, import_ipfs.ipfsToHttp)(creator.avatarImage) : null;
40
+ const bannerUrl = creator.bannerImage && !bannerError ? (0, import_ipfs.ipfsToHttp)(creator.bannerImage) : null;
41
+ const displayName = creator.displayName || `@${creator.username}`;
42
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
43
+ "a",
44
+ {
45
+ href,
46
+ className: "block shrink-0 w-64 snap-start active:scale-[0.97] transition-transform duration-150 select-none",
47
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative aspect-[3/4] rounded-xl overflow-hidden bg-muted", children: [
48
+ bannerUrl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
49
+ "img",
50
+ {
51
+ src: bannerUrl,
52
+ alt: "",
53
+ "aria-hidden": true,
54
+ loading: "lazy",
55
+ className: "absolute inset-0 w-full h-full object-cover",
56
+ onError: () => setBannerError(true)
57
+ }
58
+ ),
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/10 to-transparent" }),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "absolute bottom-0 inset-x-0 p-2.5 space-y-1.5", children: [
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-8 w-8 rounded-full ring-2 ring-white/20 overflow-hidden bg-muted flex items-center justify-center", children: avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
+ "img",
63
+ {
64
+ src: avatarUrl,
65
+ alt: displayName ?? "",
66
+ loading: "lazy",
67
+ className: "h-full w-full object-cover",
68
+ onError: () => setAvatarError(true)
69
+ }
70
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs font-black text-white/60", children: (displayName ?? "?").charAt(0).toUpperCase() }) }),
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-bold text-white text-xs truncate", children: displayName }),
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-[10px] text-white/55 flex items-center gap-0.5", children: [
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AtSign, { className: "h-2 w-2 shrink-0" }),
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "truncate", children: creator.username })
76
+ ] })
77
+ ] })
78
+ ] })
79
+ ] })
80
+ }
81
+ );
82
+ }
83
+ function DiscoverCreatorsStrip({
84
+ creators,
85
+ isLoading,
86
+ getHref,
87
+ allCreatorsHref = "/creators"
88
+ }) {
89
+ if (!isLoading && creators.length === 0) return null;
90
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
91
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
92
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
93
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "section-label", children: "Creator network" }),
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Users, { className: "h-4 w-4 text-brand-purple" }),
96
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-lg font-bold", children: "Creators" })
97
+ ] })
98
+ ] }),
99
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
100
+ "a",
101
+ {
102
+ href: allCreatorsHref,
103
+ 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",
104
+ children: [
105
+ "View all ",
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3.5 w-3.5" })
107
+ ]
108
+ }
109
+ )
110
+ ] }),
111
+ /* @__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)) }) })
112
+ ] }) });
113
+ }
114
+ // Annotate the CommonJS export names for ESM import in node:
115
+ 0 && (module.exports = {
116
+ DiscoverCreatorsStrip
117
+ });
118
+ //# 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 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\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 bg-muted\">\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 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 className=\"h-8 w-8 rounded-full ring-2 ring-white/20 overflow-hidden bg-muted flex items-center justify-center\">\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/60\">\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;AAiBI;AAfJ,mBAAyB;AACzB,0BAA0C;AAC1C,+BAAuB;AACvB,kBAA2B;AAU3B,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,uBAAS,KAAK;AACpD,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AAEpD,QAAM,YAAY,QAAQ,eAAe,CAAC,kBAAc,wBAAW,QAAQ,WAAW,IAAI;AAC1F,QAAM,YAAY,QAAQ,eAAe,CAAC,kBAAc,wBAAW,QAAQ,WAAW,IAAI;AAC1F,QAAM,cAAc,QAAQ,eAAe,IAAI,QAAQ,QAAQ;AAE/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAU;AAAA,MAEV,uDAAC,SAAI,WAAU,6DACZ;AAAA,qBACC;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,KAAI;AAAA,YACJ,eAAW;AAAA,YACX,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,SAAS,MAAM,eAAe,IAAI;AAAA;AAAA,QACpC;AAAA,QAEF,4CAAC,SAAI,WAAU,+EAA8E;AAAA,QAC7F,6CAAC,SAAI,WAAU,iDACb;AAAA,sDAAC,SAAI,WAAU,uGACZ,sBACC;AAAA,YAAC;AAAA;AAAA,cACC,KAAK;AAAA,cACL,KAAK,eAAe;AAAA,cACpB,SAAQ;AAAA,cACR,WAAU;AAAA,cACV,SAAS,MAAM,eAAe,IAAI;AAAA;AAAA,UACpC,IAEA,4CAAC,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+ 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,94 @@
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 CreatorChipSkeleton() {
8
+ return /* @__PURE__ */ jsx("div", { className: "shrink-0 w-64 aspect-[3/4] rounded-xl bg-muted animate-pulse" });
9
+ }
10
+ function CreatorChip({
11
+ creator,
12
+ href
13
+ }) {
14
+ const [avatarError, setAvatarError] = useState(false);
15
+ const [bannerError, setBannerError] = useState(false);
16
+ const avatarUrl = creator.avatarImage && !avatarError ? ipfsToHttp(creator.avatarImage) : null;
17
+ const bannerUrl = creator.bannerImage && !bannerError ? ipfsToHttp(creator.bannerImage) : null;
18
+ const displayName = creator.displayName || `@${creator.username}`;
19
+ return /* @__PURE__ */ jsx(
20
+ "a",
21
+ {
22
+ href,
23
+ className: "block shrink-0 w-64 snap-start active:scale-[0.97] transition-transform duration-150 select-none",
24
+ children: /* @__PURE__ */ jsxs("div", { className: "relative aspect-[3/4] rounded-xl overflow-hidden bg-muted", children: [
25
+ bannerUrl && /* @__PURE__ */ jsx(
26
+ "img",
27
+ {
28
+ src: bannerUrl,
29
+ alt: "",
30
+ "aria-hidden": true,
31
+ loading: "lazy",
32
+ className: "absolute inset-0 w-full h-full object-cover",
33
+ onError: () => setBannerError(true)
34
+ }
35
+ ),
36
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/10 to-transparent" }),
37
+ /* @__PURE__ */ jsxs("div", { className: "absolute bottom-0 inset-x-0 p-2.5 space-y-1.5", children: [
38
+ /* @__PURE__ */ jsx("div", { className: "h-8 w-8 rounded-full ring-2 ring-white/20 overflow-hidden bg-muted flex items-center justify-center", children: avatarUrl ? /* @__PURE__ */ jsx(
39
+ "img",
40
+ {
41
+ src: avatarUrl,
42
+ alt: displayName ?? "",
43
+ loading: "lazy",
44
+ className: "h-full w-full object-cover",
45
+ onError: () => setAvatarError(true)
46
+ }
47
+ ) : /* @__PURE__ */ jsx("span", { className: "text-xs font-black text-white/60", children: (displayName ?? "?").charAt(0).toUpperCase() }) }),
48
+ /* @__PURE__ */ jsxs("div", { children: [
49
+ /* @__PURE__ */ jsx("p", { className: "font-bold text-white text-xs truncate", children: displayName }),
50
+ /* @__PURE__ */ jsxs("p", { className: "text-[10px] text-white/55 flex items-center gap-0.5", children: [
51
+ /* @__PURE__ */ jsx(AtSign, { className: "h-2 w-2 shrink-0" }),
52
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: creator.username })
53
+ ] })
54
+ ] })
55
+ ] })
56
+ ] })
57
+ }
58
+ );
59
+ }
60
+ function DiscoverCreatorsStrip({
61
+ creators,
62
+ isLoading,
63
+ getHref,
64
+ allCreatorsHref = "/creators"
65
+ }) {
66
+ if (!isLoading && creators.length === 0) return null;
67
+ return /* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
68
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
69
+ /* @__PURE__ */ jsxs("div", { children: [
70
+ /* @__PURE__ */ jsx("p", { className: "section-label", children: "Creator network" }),
71
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-0.5", children: [
72
+ /* @__PURE__ */ jsx(Users, { className: "h-4 w-4 text-brand-purple" }),
73
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-bold", children: "Creators" })
74
+ ] })
75
+ ] }),
76
+ /* @__PURE__ */ jsxs(
77
+ "a",
78
+ {
79
+ href: allCreatorsHref,
80
+ 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",
81
+ children: [
82
+ "View all ",
83
+ /* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5" })
84
+ ]
85
+ }
86
+ )
87
+ ] }),
88
+ /* @__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)) }) })
89
+ ] }) });
90
+ }
91
+ export {
92
+ DiscoverCreatorsStrip
93
+ };
94
+ //# 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 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\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 bg-muted\">\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 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 className=\"h-8 w-8 rounded-full ring-2 ring-white/20 overflow-hidden bg-muted flex items-center justify-center\">\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/60\">\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":";AAiBI,cAqDQ,YArDR;AAfJ,SAAS,gBAAgB;AACzB,SAAS,OAAO,YAAY,cAAc;AAC1C,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAU3B,SAAS,sBAAsB;AAC7B,SACE,oBAAC,SAAI,WAAU,gEAA+D;AAElF;AAEA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA;AACF,GAGG;AACD,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AACpD,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AAEpD,QAAM,YAAY,QAAQ,eAAe,CAAC,cAAc,WAAW,QAAQ,W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SACC;AAAA,4BAAC,OAAE,WAAU,iBAAgB,6BAAe;AAAA,QAC5C,qBAAC,SAAI,WAAU,kCACb;AAAA,8BAAC,SAAM,WAAU,6BAA4B;AAAA,UAC7C,oBAAC,QAAG,WAAU,qBAAoB,sBAAQ;AAAA,WAC5C;AAAA,SACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,WAAU;AAAA,UACX;AAAA;AAAA,YACU,oBAAC,cAAW,WAAU,eAAc;AAAA;AAAA;AAAA,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,yBAAyB,CAAG,CAAE,IACvE,SAAS,IAAI,CAAC,MACZ,oBAAC,eAAkC,SAAS,GAAG,MAAM,QAAQ,CAAC,KAA5C,EAAE,aAA6C,CAClE,GACP,GACF;AAAA,KACF,GACF;AAEJ;","names":[]}
@@ -0,0 +1,96 @@
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_feed_section_exports = {};
21
+ __export(discover_feed_section_exports, {
22
+ DiscoverFeedSection: () => DiscoverFeedSection
23
+ });
24
+ module.exports = __toCommonJS(discover_feed_section_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_lucide_react = require("lucide-react");
27
+ var import_motion_primitives = require("./motion-primitives.js");
28
+ var import_listing_card = require("./listing-card.js");
29
+ var import_activity_feed_shell = require("./activity-feed-shell.js");
30
+ var import_activity_row = require("./activity-row.js");
31
+ function DiscoverFeedSection({
32
+ orders,
33
+ isLoading,
34
+ activities,
35
+ activitiesLoading,
36
+ lastUpdated,
37
+ getAssetHref = (c, t) => `/asset/${c}/${t}`,
38
+ getActorHref = (a) => `/creator/${a}`,
39
+ explorerUrl = "https://voyager.online",
40
+ marketplaceHref = "/marketplace",
41
+ activitiesHref = "/activities"
42
+ }) {
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-8", children: [
44
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "section-label", children: "Markets" }),
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4 text-brand-rose" }),
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-lg font-bold", children: "Activity" })
51
+ ] })
52
+ ] }),
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
+ "a",
55
+ {
56
+ href: marketplaceHref,
57
+ 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",
58
+ children: "View all"
59
+ }
60
+ )
61
+ ] }),
62
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-3 gap-3", children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_listing_card.ListingCardSkeleton, {}, i)) }) : orders.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "rounded-xl border border-border py-12 text-center text-sm text-muted-foreground", children: "No active listings yet." }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-3 gap-3", children: orders.map((o) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_listing_card.ListingCard, { order: o, compact: true }, o.orderHash)) })
63
+ ] }) }),
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { delay: 0.08, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
65
+ import_activity_feed_shell.ActivityFeedShell,
66
+ {
67
+ title: "Community",
68
+ href: activitiesHref,
69
+ hrefLabel: "Activities",
70
+ lastUpdated,
71
+ isLoading: activitiesLoading,
72
+ children: activities.map((act, i) => {
73
+ const key = act.txHash ? `${act.txHash}-${act.type}-${act.nftTokenId ?? ""}` : `activity-${i}`;
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
+ import_activity_row.ActivityRow,
76
+ {
77
+ activity: act,
78
+ showActor: true,
79
+ showExplorer: false,
80
+ compact: true,
81
+ getAssetHref,
82
+ getActorHref,
83
+ explorerUrl
84
+ },
85
+ key
86
+ );
87
+ })
88
+ }
89
+ ) })
90
+ ] });
91
+ }
92
+ // Annotate the CommonJS export names for ESM import in node:
93
+ 0 && (module.exports = {
94
+ DiscoverFeedSection
95
+ });
96
+ //# sourceMappingURL=discover-feed-section.cjs.map