@medialane/ui 0.3.0 → 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.
Files changed (41) hide show
  1. package/dist/components/collection-card.cjs +2 -5
  2. package/dist/components/collection-card.cjs.map +1 -1
  3. package/dist/components/collection-card.js +3 -6
  4. package/dist/components/collection-card.js.map +1 -1
  5. package/dist/components/discover-collections-strip.cjs +111 -0
  6. package/dist/components/discover-collections-strip.cjs.map +1 -0
  7. package/dist/components/discover-collections-strip.d.cts +12 -0
  8. package/dist/components/discover-collections-strip.d.ts +12 -0
  9. package/dist/components/discover-collections-strip.js +87 -0
  10. package/dist/components/discover-collections-strip.js.map +1 -0
  11. package/dist/components/discover-creators-strip.cjs +131 -0
  12. package/dist/components/discover-creators-strip.cjs.map +1 -0
  13. package/dist/components/discover-creators-strip.d.cts +12 -0
  14. package/dist/components/discover-creators-strip.d.ts +12 -0
  15. package/dist/components/discover-creators-strip.js +107 -0
  16. package/dist/components/discover-creators-strip.js.map +1 -0
  17. package/dist/components/discover-feed-section.cjs +96 -0
  18. package/dist/components/discover-feed-section.cjs.map +1 -0
  19. package/dist/components/discover-feed-section.d.cts +18 -0
  20. package/dist/components/discover-feed-section.d.ts +18 -0
  21. package/dist/components/discover-feed-section.js +72 -0
  22. package/dist/components/discover-feed-section.js.map +1 -0
  23. package/dist/components/discover-hero.cjs +87 -0
  24. package/dist/components/discover-hero.cjs.map +1 -0
  25. package/dist/components/discover-hero.d.cts +16 -0
  26. package/dist/components/discover-hero.d.ts +16 -0
  27. package/dist/components/discover-hero.js +63 -0
  28. package/dist/components/discover-hero.js.map +1 -0
  29. package/dist/components/featured-carousel.cjs +181 -0
  30. package/dist/components/featured-carousel.cjs.map +1 -0
  31. package/dist/components/featured-carousel.d.cts +13 -0
  32. package/dist/components/featured-carousel.d.ts +13 -0
  33. package/dist/components/featured-carousel.js +156 -0
  34. package/dist/components/featured-carousel.js.map +1 -0
  35. package/dist/index.cjs +17 -0
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts +5 -0
  38. package/dist/index.d.ts +5 -0
  39. package/dist/index.js +11 -0
  40. package/dist/index.js.map +1 -1
  41. package/package.json +1 -1
@@ -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,IAAI;AACjE;AAEA,SAAS,sBAAsB;AAC7B,SACE,oBAAC,SAAI,WAAU,gEAA+D;AAElF;AAEA,S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AAC,OAAE,WAAU,uDACX;AAAA,kCAAC,UAAO,WAAU,oBAAmB;AAAA,cACrC,oBAAC,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,oBAAC,UACC,+BAAC,SAAI,WAAU,aACb;AAAA,yBAAC,SAAI,WAAU,qCACb;AAAA,2BAAC,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
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/discover-feed-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { Tag } from \"lucide-react\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { ListingCard, ListingCardSkeleton } from \"./listing-card.js\";\nimport { ActivityFeedShell } from \"./activity-feed-shell.js\";\nimport { ActivityRow } from \"./activity-row.js\";\nimport type { ApiOrder, ApiActivity } from \"@medialane/sdk\";\n\nexport interface DiscoverFeedSectionProps {\n orders: ApiOrder[];\n isLoading: boolean;\n activities: ApiActivity[];\n activitiesLoading: boolean;\n lastUpdated: string;\n getAssetHref?: (contract: string, tokenId: string) => string;\n getActorHref?: (address: string) => string;\n explorerUrl?: string;\n marketplaceHref?: string;\n activitiesHref?: string;\n}\n\nexport function DiscoverFeedSection({\n orders,\n isLoading,\n activities,\n activitiesLoading,\n lastUpdated,\n getAssetHref = (c, t) => `/asset/${c}/${t}`,\n getActorHref = (a) => `/creator/${a}`,\n explorerUrl = \"https://voyager.online\",\n marketplaceHref = \"/marketplace\",\n activitiesHref = \"/activities\",\n}: DiscoverFeedSectionProps) {\n return (\n <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-8\">\n {/* New Listings */}\n <FadeIn>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"section-label\">Markets</p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Tag className=\"h-4 w-4 text-brand-rose\" />\n <h2 className=\"text-lg font-bold\">Activity</h2>\n </div>\n </div>\n <a\n href={marketplaceHref}\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\n </a>\n </div>\n\n {isLoading ? (\n <div className=\"grid grid-cols-3 gap-3\">\n {Array.from({ length: 6 }).map((_, i) => <ListingCardSkeleton key={i} />)}\n </div>\n ) : orders.length === 0 ? (\n <div className=\"rounded-xl border border-border py-12 text-center text-sm text-muted-foreground\">\n No active listings yet.\n </div>\n ) : (\n <div className=\"grid grid-cols-3 gap-3\">\n {orders.map((o) => (\n <ListingCard key={o.orderHash} order={o} compact />\n ))}\n </div>\n )}\n </div>\n </FadeIn>\n\n {/* Recent Activity */}\n <FadeIn delay={0.08}>\n <ActivityFeedShell\n title=\"Community\"\n href={activitiesHref}\n hrefLabel=\"Activities\"\n lastUpdated={lastUpdated}\n isLoading={activitiesLoading}\n >\n {activities.map((act, i) => {\n const key = act.txHash\n ? `${act.txHash}-${act.type}-${act.nftTokenId ?? \"\"}`\n : `activity-${i}`;\n return (\n <ActivityRow\n key={key}\n activity={act}\n showActor\n showExplorer={false}\n compact\n getAssetHref={getAssetHref}\n getActorHref={getActorHref}\n explorerUrl={explorerUrl}\n />\n );\n })}\n </ActivityFeedShell>\n </FadeIn>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyCc;AAvCd,0BAAoB;AACpB,+BAAuB;AACvB,0BAAiD;AACjD,iCAAkC;AAClC,0BAA4B;AAgBrB,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe,CAAC,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC;AAAA,EACzC,eAAe,CAAC,MAAM,YAAY,CAAC;AAAA,EACnC,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB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P;AAAA,QAEJ,CAAC;AAAA;AAAA,IACH,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,18 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ApiOrder, ApiActivity } from '@medialane/sdk';
3
+
4
+ interface DiscoverFeedSectionProps {
5
+ orders: ApiOrder[];
6
+ isLoading: boolean;
7
+ activities: ApiActivity[];
8
+ activitiesLoading: boolean;
9
+ lastUpdated: string;
10
+ getAssetHref?: (contract: string, tokenId: string) => string;
11
+ getActorHref?: (address: string) => string;
12
+ explorerUrl?: string;
13
+ marketplaceHref?: string;
14
+ activitiesHref?: string;
15
+ }
16
+ declare function DiscoverFeedSection({ orders, isLoading, activities, activitiesLoading, lastUpdated, getAssetHref, getActorHref, explorerUrl, marketplaceHref, activitiesHref, }: DiscoverFeedSectionProps): react_jsx_runtime.JSX.Element;
17
+
18
+ export { DiscoverFeedSection, type DiscoverFeedSectionProps };
@@ -0,0 +1,18 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ApiOrder, ApiActivity } from '@medialane/sdk';
3
+
4
+ interface DiscoverFeedSectionProps {
5
+ orders: ApiOrder[];
6
+ isLoading: boolean;
7
+ activities: ApiActivity[];
8
+ activitiesLoading: boolean;
9
+ lastUpdated: string;
10
+ getAssetHref?: (contract: string, tokenId: string) => string;
11
+ getActorHref?: (address: string) => string;
12
+ explorerUrl?: string;
13
+ marketplaceHref?: string;
14
+ activitiesHref?: string;
15
+ }
16
+ declare function DiscoverFeedSection({ orders, isLoading, activities, activitiesLoading, lastUpdated, getAssetHref, getActorHref, explorerUrl, marketplaceHref, activitiesHref, }: DiscoverFeedSectionProps): react_jsx_runtime.JSX.Element;
17
+
18
+ export { DiscoverFeedSection, type DiscoverFeedSectionProps };
@@ -0,0 +1,72 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Tag } from "lucide-react";
4
+ import { FadeIn } from "./motion-primitives.js";
5
+ import { ListingCard, ListingCardSkeleton } from "./listing-card.js";
6
+ import { ActivityFeedShell } from "./activity-feed-shell.js";
7
+ import { ActivityRow } from "./activity-row.js";
8
+ function DiscoverFeedSection({
9
+ orders,
10
+ isLoading,
11
+ activities,
12
+ activitiesLoading,
13
+ lastUpdated,
14
+ getAssetHref = (c, t) => `/asset/${c}/${t}`,
15
+ getActorHref = (a) => `/creator/${a}`,
16
+ explorerUrl = "https://voyager.online",
17
+ marketplaceHref = "/marketplace",
18
+ activitiesHref = "/activities"
19
+ }) {
20
+ return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-8", children: [
21
+ /* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
22
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
23
+ /* @__PURE__ */ jsxs("div", { children: [
24
+ /* @__PURE__ */ jsx("p", { className: "section-label", children: "Markets" }),
25
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-0.5", children: [
26
+ /* @__PURE__ */ jsx(Tag, { className: "h-4 w-4 text-brand-rose" }),
27
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-bold", children: "Activity" })
28
+ ] })
29
+ ] }),
30
+ /* @__PURE__ */ jsx(
31
+ "a",
32
+ {
33
+ href: marketplaceHref,
34
+ 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",
35
+ children: "View all"
36
+ }
37
+ )
38
+ ] }),
39
+ isLoading ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-3", children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsx(ListingCardSkeleton, {}, i)) }) : orders.length === 0 ? /* @__PURE__ */ jsx("div", { className: "rounded-xl border border-border py-12 text-center text-sm text-muted-foreground", children: "No active listings yet." }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-3", children: orders.map((o) => /* @__PURE__ */ jsx(ListingCard, { order: o, compact: true }, o.orderHash)) })
40
+ ] }) }),
41
+ /* @__PURE__ */ jsx(FadeIn, { delay: 0.08, children: /* @__PURE__ */ jsx(
42
+ ActivityFeedShell,
43
+ {
44
+ title: "Community",
45
+ href: activitiesHref,
46
+ hrefLabel: "Activities",
47
+ lastUpdated,
48
+ isLoading: activitiesLoading,
49
+ children: activities.map((act, i) => {
50
+ const key = act.txHash ? `${act.txHash}-${act.type}-${act.nftTokenId ?? ""}` : `activity-${i}`;
51
+ return /* @__PURE__ */ jsx(
52
+ ActivityRow,
53
+ {
54
+ activity: act,
55
+ showActor: true,
56
+ showExplorer: false,
57
+ compact: true,
58
+ getAssetHref,
59
+ getActorHref,
60
+ explorerUrl
61
+ },
62
+ key
63
+ );
64
+ })
65
+ }
66
+ ) })
67
+ ] });
68
+ }
69
+ export {
70
+ DiscoverFeedSection
71
+ };
72
+ //# sourceMappingURL=discover-feed-section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/discover-feed-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { Tag } from \"lucide-react\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { ListingCard, ListingCardSkeleton } from \"./listing-card.js\";\nimport { ActivityFeedShell } from \"./activity-feed-shell.js\";\nimport { ActivityRow } from \"./activity-row.js\";\nimport type { ApiOrder, ApiActivity } from \"@medialane/sdk\";\n\nexport interface DiscoverFeedSectionProps {\n orders: ApiOrder[];\n isLoading: boolean;\n activities: ApiActivity[];\n activitiesLoading: boolean;\n lastUpdated: string;\n getAssetHref?: (contract: string, tokenId: string) => string;\n getActorHref?: (address: string) => string;\n explorerUrl?: string;\n marketplaceHref?: string;\n activitiesHref?: string;\n}\n\nexport function DiscoverFeedSection({\n orders,\n isLoading,\n activities,\n activitiesLoading,\n lastUpdated,\n getAssetHref = (c, t) => `/asset/${c}/${t}`,\n getActorHref = (a) => `/creator/${a}`,\n explorerUrl = \"https://voyager.online\",\n marketplaceHref = \"/marketplace\",\n activitiesHref = \"/activities\",\n}: DiscoverFeedSectionProps) {\n return (\n <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-8\">\n {/* New Listings */}\n <FadeIn>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"section-label\">Markets</p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Tag className=\"h-4 w-4 text-brand-rose\" />\n <h2 className=\"text-lg font-bold\">Activity</h2>\n </div>\n </div>\n <a\n href={marketplaceHref}\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\n </a>\n </div>\n\n {isLoading ? (\n <div className=\"grid grid-cols-3 gap-3\">\n {Array.from({ length: 6 }).map((_, i) => <ListingCardSkeleton key={i} />)}\n </div>\n ) : orders.length === 0 ? (\n <div className=\"rounded-xl border border-border py-12 text-center text-sm text-muted-foreground\">\n No active listings yet.\n </div>\n ) : (\n <div className=\"grid grid-cols-3 gap-3\">\n {orders.map((o) => (\n <ListingCard key={o.orderHash} order={o} compact />\n ))}\n </div>\n )}\n </div>\n </FadeIn>\n\n {/* Recent Activity */}\n <FadeIn delay={0.08}>\n <ActivityFeedShell\n title=\"Community\"\n href={activitiesHref}\n hrefLabel=\"Activities\"\n lastUpdated={lastUpdated}\n isLoading={activitiesLoading}\n >\n {activities.map((act, i) => {\n const key = act.txHash\n ? `${act.txHash}-${act.type}-${act.nftTokenId ?? \"\"}`\n : `activity-${i}`;\n return (\n <ActivityRow\n key={key}\n activity={act}\n showActor\n showExplorer={false}\n compact\n getAssetHref={getAssetHref}\n getActorHref={getActorHref}\n explorerUrl={explorerUrl}\n />\n );\n })}\n </ActivityFeedShell>\n </FadeIn>\n </div>\n );\n}\n"],"mappings":";AAyCc,cACA,YADA;AAvCd,SAAS,WAAW;AACpB,SAAS,cAAc;AACvB,SAAS,aAAa,2BAA2B;AACjD,SAAS,yBAAyB;AACl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,GAAG,IAAI,MAAM,IAAI,IAAI,IAAI,IAAI,IAAI,cAAc,EAAE,KACjD,YAAY,CAAC;AACjB,iBACE;AAAA,YAAC;AAAA;AAAA,cAEC,UAAU;AAAA,cACV,WAAS;AAAA,cACT,cAAc;AAAA,cACd,SAAO;AAAA,cACP;AAAA,cACA;AAAA,cACA;AAAA;AAAA,YAPK;AAAA,UAQP;AAAA,QAEJ,CAAC;AAAA;AAAA,IACH,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,87 @@
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_hero_exports = {};
21
+ __export(discover_hero_exports, {
22
+ DiscoverHero: () => DiscoverHero
23
+ });
24
+ module.exports = __toCommonJS(discover_hero_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_framer_motion = require("framer-motion");
27
+ var import_motion_primitives = require("./motion-primitives.js");
28
+ var import_activity_ticker = require("./activity-ticker.js");
29
+ function DiscoverHero({
30
+ stats,
31
+ orders,
32
+ badgeText = "Creative Works",
33
+ headlineText = "Create, share & explore"
34
+ }) {
35
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-6 pt-2 pb-6 border-b border-border/50", children: [
36
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
37
+ import_framer_motion.motion.div,
38
+ {
39
+ initial: { opacity: 0, y: 12 },
40
+ animate: { opacity: 1, y: 0 },
41
+ transition: { duration: 0.4, ease: import_motion_primitives.EASE_OUT },
42
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pill-badge", children: badgeText })
43
+ }
44
+ ),
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
+ import_framer_motion.motion.div,
47
+ {
48
+ className: "text-3xl sm:text-4xl lg:text-5xl font-black leading-[1.1]",
49
+ style: { perspective: "800px" },
50
+ initial: { opacity: 0, y: 16 },
51
+ animate: { opacity: 1, y: 0 },
52
+ transition: { duration: 0.5, delay: 0.1, ease: import_motion_primitives.EASE_OUT },
53
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "gradient-text", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.KineticWords, { text: headlineText }) })
54
+ }
55
+ ),
56
+ stats && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
+ import_framer_motion.motion.div,
58
+ {
59
+ className: "flex flex-wrap gap-2",
60
+ initial: { opacity: 0 },
61
+ animate: { opacity: 1 },
62
+ transition: { duration: 0.4, delay: 0.35, ease: import_motion_primitives.EASE_OUT },
63
+ children: [
64
+ { label: "Collections", value: stats.collections },
65
+ { label: "Assets", value: stats.tokens },
66
+ { label: "Sales", value: stats.sales }
67
+ ].map(({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
68
+ "div",
69
+ {
70
+ className: "flex items-center gap-1.5 rounded-full border border-border bg-card px-3.5 py-1.5 text-sm",
71
+ children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-bold tabular-nums", children: value?.toLocaleString() ?? "\u2014" }),
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground", children: label })
74
+ ]
75
+ },
76
+ label
77
+ ))
78
+ }
79
+ ),
80
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_activity_ticker.ActivityTicker, { orders })
81
+ ] });
82
+ }
83
+ // Annotate the CommonJS export names for ESM import in node:
84
+ 0 && (module.exports = {
85
+ DiscoverHero
86
+ });
87
+ //# sourceMappingURL=discover-hero.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/discover-hero.tsx"],"sourcesContent":["\"use client\";\n\nimport { motion } from \"framer-motion\";\nimport { KineticWords, EASE_OUT } from \"./motion-primitives.js\";\nimport { ActivityTicker } from \"./activity-ticker.js\";\nimport type { ApiOrder } from \"@medialane/sdk\";\n\nexport interface DiscoverHeroProps {\n stats: { collections: number; tokens: number; sales: number } | null;\n orders: ApiOrder[];\n badgeText?: string;\n headlineText?: string;\n}\n\nexport function DiscoverHero({\n stats,\n orders,\n badgeText = \"Creative Works\",\n headlineText = \"Create, share & explore\",\n}: DiscoverHeroProps) {\n return (\n <div className=\"space-y-6 pt-2 pb-6 border-b border-border/50\">\n {/* Badge */}\n <motion.div\n initial={{ opacity: 0, y: 12 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.4, ease: EASE_OUT }}\n >\n <span className=\"pill-badge\">{badgeText}</span>\n </motion.div>\n\n {/* Headline */}\n <motion.div\n className=\"text-3xl sm:text-4xl lg:text-5xl font-black leading-[1.1]\"\n style={{ perspective: \"800px\" }}\n initial={{ opacity: 0, y: 16 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.5, delay: 0.1, ease: EASE_OUT }}\n >\n <span className=\"gradient-text\">\n <KineticWords text={headlineText} />\n </span>\n </motion.div>\n\n {/* Stats chips */}\n {stats && (\n <motion.div\n className=\"flex flex-wrap gap-2\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ duration: 0.4, delay: 0.35, ease: EASE_OUT }}\n >\n {[\n { label: \"Collections\", value: stats.collections },\n { label: \"Assets\", value: stats.tokens },\n { label: \"Sales\", value: stats.sales },\n ].map(({ label, value }) => (\n <div\n key={label}\n className=\"flex items-center gap-1.5 rounded-full border border-border bg-card px-3.5 py-1.5 text-sm\"\n >\n <span className=\"font-bold tabular-nums\">{value?.toLocaleString() ?? \"—\"}</span>\n <span className=\"text-muted-foreground\">{label}</span>\n </div>\n ))}\n </motion.div>\n )}\n\n {/* Scrolling ticker */}\n <ActivityTicker orders={orders} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BQ;AA1BR,2BAAuB;AACvB,+BAAuC;AACvC,6BAA+B;AAUxB,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,eAAe;AACjB,GAAsB;AACpB,SACE,6CAAC,SAAI,WAAU,iDAEb;AAAA;AAAA,MAAC,4BAAO;AAAA,MAAP;AAAA,QACC,SAAS,EAAE,SAAS,GAAG,GAAG,GAAG;AAAA,QAC7B,SAAS,EAAE,SAAS,GAAG,GAAG,EAAE;AAAA,QAC5B,YAAY,EAAE,UAAU,KAAK,MAAM,kCAAS;AAAA,QAE5C,sDAAC,UAAK,WAAU,cAAc,qBAAU;AAAA;AAAA,IAC1C;AAAA,IAGA;AAAA,MAAC,4BAAO;AAAA,MAAP;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,aAAa,QAAQ;AAAA,QAC9B,SAAS,EAAE,SAAS,GAAG,GAAG,GAAG;AAAA,QAC7B,SAAS,EAAE,SAAS,GAAG,GAAG,EAAE;AAAA,QAC5B,YAAY,EAAE,UAAU,KAAK,OAAO,KAAK,MAAM,kCAAS;AAAA,QAExD,sDAAC,UAAK,WAAU,iBACd,sDAAC,yCAAa,MAAM,cAAc,GACpC;AAAA;AAAA,IACF;AAAA,IAGC,SACC;AAAA,MAAC,4BAAO;AAAA,MAAP;AAAA,QACC,WAAU;AAAA,QACV,SAAS,EAAE,SAAS,EAAE;AAAA,QACtB,SAAS,EAAE,SAAS,EAAE;AAAA,QACtB,YAAY,EAAE,UAAU,KAAK,OAAO,MAAM,MAAM,kCAAS;AAAA,QAExD;AAAA,UACC,EAAE,OAAO,eAAe,OAAO,MAAM,YAAY;AAAA,UACjD,EAAE,OAAO,UAAU,OAAO,MAAM,OAAO;AAAA,UACvC,EAAE,OAAO,SAAS,OAAO,MAAM,MAAM;AAAA,QACvC,EAAE,IAAI,CAAC,EAAE,OAAO,MAAM,MACpB;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YAEV;AAAA,0DAAC,UAAK,WAAU,0BAA0B,iBAAO,eAAe,KAAK,UAAI;AAAA,cACzE,4CAAC,UAAK,WAAU,yBAAyB,iBAAM;AAAA;AAAA;AAAA,UAJ1C;AAAA,QAKP,CACD;AAAA;AAAA,IACH;AAAA,IAIF,4CAAC,yCAAe,QAAgB;AAAA,KAClC;AAEJ;","names":[]}
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ApiOrder } from '@medialane/sdk';
3
+
4
+ interface DiscoverHeroProps {
5
+ stats: {
6
+ collections: number;
7
+ tokens: number;
8
+ sales: number;
9
+ } | null;
10
+ orders: ApiOrder[];
11
+ badgeText?: string;
12
+ headlineText?: string;
13
+ }
14
+ declare function DiscoverHero({ stats, orders, badgeText, headlineText, }: DiscoverHeroProps): react_jsx_runtime.JSX.Element;
15
+
16
+ export { DiscoverHero, type DiscoverHeroProps };
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ApiOrder } from '@medialane/sdk';
3
+
4
+ interface DiscoverHeroProps {
5
+ stats: {
6
+ collections: number;
7
+ tokens: number;
8
+ sales: number;
9
+ } | null;
10
+ orders: ApiOrder[];
11
+ badgeText?: string;
12
+ headlineText?: string;
13
+ }
14
+ declare function DiscoverHero({ stats, orders, badgeText, headlineText, }: DiscoverHeroProps): react_jsx_runtime.JSX.Element;
15
+
16
+ export { DiscoverHero, type DiscoverHeroProps };
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { motion } from "framer-motion";
4
+ import { KineticWords, EASE_OUT } from "./motion-primitives.js";
5
+ import { ActivityTicker } from "./activity-ticker.js";
6
+ function DiscoverHero({
7
+ stats,
8
+ orders,
9
+ badgeText = "Creative Works",
10
+ headlineText = "Create, share & explore"
11
+ }) {
12
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-6 pt-2 pb-6 border-b border-border/50", children: [
13
+ /* @__PURE__ */ jsx(
14
+ motion.div,
15
+ {
16
+ initial: { opacity: 0, y: 12 },
17
+ animate: { opacity: 1, y: 0 },
18
+ transition: { duration: 0.4, ease: EASE_OUT },
19
+ children: /* @__PURE__ */ jsx("span", { className: "pill-badge", children: badgeText })
20
+ }
21
+ ),
22
+ /* @__PURE__ */ jsx(
23
+ motion.div,
24
+ {
25
+ className: "text-3xl sm:text-4xl lg:text-5xl font-black leading-[1.1]",
26
+ style: { perspective: "800px" },
27
+ initial: { opacity: 0, y: 16 },
28
+ animate: { opacity: 1, y: 0 },
29
+ transition: { duration: 0.5, delay: 0.1, ease: EASE_OUT },
30
+ children: /* @__PURE__ */ jsx("span", { className: "gradient-text", children: /* @__PURE__ */ jsx(KineticWords, { text: headlineText }) })
31
+ }
32
+ ),
33
+ stats && /* @__PURE__ */ jsx(
34
+ motion.div,
35
+ {
36
+ className: "flex flex-wrap gap-2",
37
+ initial: { opacity: 0 },
38
+ animate: { opacity: 1 },
39
+ transition: { duration: 0.4, delay: 0.35, ease: EASE_OUT },
40
+ children: [
41
+ { label: "Collections", value: stats.collections },
42
+ { label: "Assets", value: stats.tokens },
43
+ { label: "Sales", value: stats.sales }
44
+ ].map(({ label, value }) => /* @__PURE__ */ jsxs(
45
+ "div",
46
+ {
47
+ className: "flex items-center gap-1.5 rounded-full border border-border bg-card px-3.5 py-1.5 text-sm",
48
+ children: [
49
+ /* @__PURE__ */ jsx("span", { className: "font-bold tabular-nums", children: value?.toLocaleString() ?? "\u2014" }),
50
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label })
51
+ ]
52
+ },
53
+ label
54
+ ))
55
+ }
56
+ ),
57
+ /* @__PURE__ */ jsx(ActivityTicker, { orders })
58
+ ] });
59
+ }
60
+ export {
61
+ DiscoverHero
62
+ };
63
+ //# sourceMappingURL=discover-hero.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/discover-hero.tsx"],"sourcesContent":["\"use client\";\n\nimport { motion } from \"framer-motion\";\nimport { KineticWords, EASE_OUT } from \"./motion-primitives.js\";\nimport { ActivityTicker } from \"./activity-ticker.js\";\nimport type { ApiOrder } from \"@medialane/sdk\";\n\nexport interface DiscoverHeroProps {\n stats: { collections: number; tokens: number; sales: number } | null;\n orders: ApiOrder[];\n badgeText?: string;\n headlineText?: string;\n}\n\nexport function DiscoverHero({\n stats,\n orders,\n badgeText = \"Creative Works\",\n headlineText = \"Create, share & explore\",\n}: DiscoverHeroProps) {\n return (\n <div className=\"space-y-6 pt-2 pb-6 border-b border-border/50\">\n {/* Badge */}\n <motion.div\n initial={{ opacity: 0, y: 12 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.4, ease: EASE_OUT }}\n >\n <span className=\"pill-badge\">{badgeText}</span>\n </motion.div>\n\n {/* Headline */}\n <motion.div\n className=\"text-3xl sm:text-4xl lg:text-5xl font-black leading-[1.1]\"\n style={{ perspective: \"800px\" }}\n initial={{ opacity: 0, y: 16 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.5, delay: 0.1, ease: EASE_OUT }}\n >\n <span className=\"gradient-text\">\n <KineticWords text={headlineText} />\n </span>\n </motion.div>\n\n {/* Stats chips */}\n {stats && (\n <motion.div\n className=\"flex flex-wrap gap-2\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ duration: 0.4, delay: 0.35, ease: EASE_OUT }}\n >\n {[\n { label: \"Collections\", value: stats.collections },\n { label: \"Assets\", value: stats.tokens },\n { label: \"Sales\", value: stats.sales },\n ].map(({ label, value }) => (\n <div\n key={label}\n className=\"flex items-center gap-1.5 rounded-full border border-border bg-card px-3.5 py-1.5 text-sm\"\n >\n <span className=\"font-bold tabular-nums\">{value?.toLocaleString() ?? \"—\"}</span>\n <span className=\"text-muted-foreground\">{label}</span>\n </div>\n ))}\n </motion.div>\n )}\n\n {/* Scrolling ticker */}\n <ActivityTicker orders={orders} />\n </div>\n );\n}\n"],"mappings":";AA4BQ,cA6BI,YA7BJ;AA1BR,SAAS,cAAc;AACvB,SAAS,cAAc,gBAAgB;AACvC,SAAS,sBAAsB;AAUxB,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,eAAe;AACjB,GAAsB;AACpB,SACE,qBAAC,SAAI,WAAU,iDAEb;AAAA;AAAA,MAAC,OAAO;AAAA,MAAP;AAAA,QACC,SAAS,EAAE,SAAS,GAAG,GAAG,GAAG;AAAA,QAC7B,SAAS,EAAE,SAAS,GAAG,GAAG,EAAE;AAAA,QAC5B,YAAY,EAAE,UAAU,KAAK,MAAM,SAAS;AAAA,QAE5C,8BAAC,UAAK,WAAU,cAAc,qBAAU;AAAA;AAAA,IAC1C;AAAA,IAGA;AAAA,MAAC,OAAO;AAAA,MAAP;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,aAAa,QAAQ;AAAA,QAC9B,SAAS,EAAE,SAAS,GAAG,GAAG,GAAG;AAAA,QAC7B,SAAS,EAAE,SAAS,GAAG,GAAG,EAAE;AAAA,QAC5B,YAAY,EAAE,UAAU,KAAK,OAAO,KAAK,MAAM,SAAS;AAAA,QAExD,8BAAC,UAAK,WAAU,iBACd,8BAAC,gBAAa,MAAM,cAAc,GACpC;AAAA;AAAA,IACF;AAAA,IAGC,SACC;AAAA,MAAC,OAAO;AAAA,MAAP;AAAA,QACC,WAAU;AAAA,QACV,SAAS,EAAE,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