@medialane/ui 0.353.0 → 0.355.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/account/input-otp.d.cts +2 -2
- package/dist/components/account/input-otp.d.ts +2 -2
- package/dist/components/accounts-page.cjs +40 -48
- package/dist/components/accounts-page.cjs.map +1 -1
- package/dist/components/accounts-page.js +40 -38
- package/dist/components/accounts-page.js.map +1 -1
- package/dist/components/button.d.cts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/collection-showcase.cjs +192 -0
- package/dist/components/collection-showcase.cjs.map +1 -0
- package/dist/components/collection-showcase.d.cts +11 -0
- package/dist/components/collection-showcase.d.ts +11 -0
- package/dist/components/collection-showcase.js +158 -0
- package/dist/components/collection-showcase.js.map +1 -0
- package/dist/components/home-page.cjs +2 -2
- package/dist/components/home-page.cjs.map +1 -1
- package/dist/components/home-page.js +2 -2
- package/dist/components/home-page.js.map +1 -1
- package/dist/components/launchpad/edition-mint-schema.d.cts +4 -4
- package/dist/components/launchpad/edition-mint-schema.d.ts +4 -4
- package/dist/index.cjs +3 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/medialane.css +1 -6
- package/dist/utils/media-wallet/use-erc20-balance.d.cts +1 -1
- package/dist/utils/media-wallet/use-erc20-balance.d.ts +1 -1
- package/dist/utils/use-accounts.cjs +3 -3
- package/dist/utils/use-accounts.cjs.map +1 -1
- package/dist/utils/use-accounts.d.cts +1 -1
- package/dist/utils/use-accounts.d.ts +1 -1
- package/dist/utils/use-accounts.js +3 -3
- package/dist/utils/use-accounts.js.map +1 -1
- package/package.json +3 -3
- package/dist/components/hero-slider.cjs +0 -103
- package/dist/components/hero-slider.cjs.map +0 -1
- package/dist/components/hero-slider.d.cts +0 -16
- package/dist/components/hero-slider.d.ts +0 -16
- package/dist/components/hero-slider.js +0 -68
- package/dist/components/hero-slider.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/collection-showcase.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState } from \"react\";\nimport { motion, useReducedMotion } from \"framer-motion\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { Skeleton } from \"./skeleton.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\n\nexport interface CollectionShowcaseProps {\n collections: ApiCollection[];\n isLoading: boolean;\n getHref: (collection: ApiCollection) => string;\n}\n\nconst AUTOPLAY_MS = 6000;\nconst SWIPE_PX = 50;\nconst CARD_SIZE = \"aspect-[4/5] w-[58vw] max-w-[260px] sm:max-w-[300px] lg:max-w-[340px]\";\n\nfunction offsetFrom(index: number, current: number, count: number) {\n const distance = (index - current + count) % count;\n return distance > count / 2 ? distance - count : distance;\n}\n\nfunction ShowcaseSkeleton() {\n return (\n <section className=\"px-4 pb-8 pt-10 sm:pt-14\">\n <Skeleton className={cn(\"mx-auto rounded-2xl\", CARD_SIZE)} />\n <Skeleton className=\"mx-auto mt-6 h-9 w-56\" />\n </section>\n );\n}\n\nexport function CollectionShowcase({ collections, isLoading, getHref }: CollectionShowcaseProps) {\n const resolveImage = useImageUrl();\n const reduceMotion = useReducedMotion();\n const [current, setCurrent] = useState(0);\n const [paused, setPaused] = useState(false);\n const dragged = useRef(false);\n const count = collections.length;\n\n const go = (step: number) => setCurrent((index) => (index + step + count) % count);\n\n useEffect(() => {\n if (count <= 1 || paused || reduceMotion) return;\n const id = setInterval(() => setCurrent((index) => (index + 1) % count), AUTOPLAY_MS);\n return () => clearInterval(id);\n }, [count, paused, reduceMotion]);\n\n if (isLoading) return <ShowcaseSkeleton />;\n if (count === 0) return null;\n\n const active = collections[current % count]!;\n const activeImage = resolveImage(active.image, { width: 960 });\n const supply = active.totalSupply;\n const transition = reduceMotion ? { duration: 0 } : { type: \"spring\" as const, stiffness: 220, damping: 26 };\n\n return (\n <section\n className=\"relative overflow-hidden px-4 pb-8 pt-10 sm:pt-14\"\n onPointerEnter={() => setPaused(true)}\n onPointerLeave={() => setPaused(false)}\n onFocus={() => setPaused(true)}\n onBlur={() => setPaused(false)}\n >\n {activeImage && (\n <motion.div\n key={active.contractAddress}\n aria-hidden\n className=\"pointer-events-none absolute inset-0 scale-125 opacity-30 blur-3xl dark:opacity-40\"\n initial={reduceMotion ? false : { opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ duration: 0.6 }}\n >\n <Image src={activeImage} alt=\"\" fill className=\"object-cover\" unoptimized />\n </motion.div>\n )}\n <div aria-hidden className=\"pointer-events-none absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-b from-transparent to-background\" />\n\n <motion.div\n className={cn(\"relative mx-auto touch-pan-y\", CARD_SIZE)}\n drag={count > 1 ? \"x\" : false}\n dragConstraints={{ left: 0, right: 0 }}\n dragElastic={0.2}\n onDragStart={() => { dragged.current = true; }}\n onDragEnd={(_, info) => {\n if (info.offset.x < -SWIPE_PX) go(1);\n else if (info.offset.x > SWIPE_PX) go(-1);\n setTimeout(() => { dragged.current = false; }, 0);\n }}\n >\n {collections.map((collection, index) => {\n const offset = offsetFrom(index, current, count);\n const distance = Math.abs(offset);\n const image = resolveImage(collection.image, { width: 640 });\n const name = collection.name ?? \"Collection\";\n return (\n <motion.div\n key={collection.contractAddress}\n className={cn(\"absolute inset-0\", distance > 2 && \"pointer-events-none\")}\n initial={false}\n animate={{\n x: `${offset * 58}%`,\n rotate: offset * 9,\n scale: 1 - distance * 0.12,\n opacity: distance > 2 ? 0 : 1,\n zIndex: 10 - distance,\n }}\n transition={transition}\n >\n <Link\n href={getHref(collection)}\n aria-label={name}\n draggable={false}\n onClick={(event) => { if (dragged.current) event.preventDefault(); }}\n className=\"relative block h-full w-full overflow-hidden rounded-2xl bg-muted shadow-2xl shadow-black/20 ring-1 ring-border dark:shadow-black/50\"\n >\n {image ? (\n <Image src={image} alt=\"\" fill sizes=\"(min-width: 1024px) 340px, 58vw\" className=\"object-cover\" priority={index === 0} unoptimized />\n ) : (\n <div className=\"absolute inset-0 bg-gradient-to-br from-brand-purple/40 via-brand-blue/20 to-brand-navy/60\" />\n )}\n <span className={cn(\"absolute inset-0 bg-background/40 transition-opacity duration-500\", offset === 0 ? \"opacity-0\" : \"opacity-100\")} />\n </Link>\n </motion.div>\n );\n })}\n </motion.div>\n\n <motion.div\n key={active.contractAddress}\n className=\"relative mt-8 flex flex-col items-center gap-1 text-center\"\n initial={reduceMotion ? false : { opacity: 0, y: 8 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.4 }}\n >\n <Link href={getHref(active)} className=\"transition-opacity hover:opacity-80\">\n <h2 className=\"text-3xl font-semibold leading-tight tracking-tight text-foreground sm:text-4xl lg:text-5xl\">\n {active.name ?? \"Collection\"}\n </h2>\n </Link>\n {supply != null && (\n <p className=\"text-sm text-muted-foreground\">\n {supply.toLocaleString()} {supply === 1 ? \"item\" : \"items\"}\n </p>\n )}\n </motion.div>\n\n {count > 1 && (\n <div className=\"relative mt-3 flex justify-center\">\n {collections.map((collection, index) => (\n <button\n key={collection.contractAddress}\n type=\"button\"\n aria-label={`Show ${collection.name ?? \"collection\"}`}\n aria-current={index === current ? \"true\" : undefined}\n onClick={() => setCurrent(index)}\n className=\"flex h-8 items-center px-0.5\"\n >\n <span className={cn(\"h-1.5 rounded-full transition-all\", index === current ? \"w-6 bg-foreground\" : \"w-1.5 bg-foreground/30\")} />\n </button>\n ))}\n </div>\n )}\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BI;AA1BJ,mBAA4C;AAC5C,2BAAyC;AAEzC,kBAAiB;AACjB,mBAAkB;AAClB,sBAAyB;AACzB,gBAAmB;AACnB,2BAA4B;AAQ5B,MAAM,cAAc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cAClB,GACF;AAAA,cACC,UAAU,QACT,6CAAC,OAAE,WAAU,iCACV;AAAA,uBAAO,eAAe;AAAA,gBAAE;AAAA,gBAAE,WAAW,IAAI,SAAS;AAAA,iBACrD;AAAA;AAAA;AAAA,UAdG,OAAO;AAAA,QAgBd;AAAA,QAEC,QAAQ,KACP,4CAAC,SAAI,WAAU,qCACZ,sBAAY,IAAI,CAAC,YAAY,UAC5B;AAAA,UAAC;AAAA;AAAA,YAEC,MAAK;AAAA,YACL,cAAY,QAAQ,WAAW,QAAQ,YAAY;AAAA,YACnD,gBAAc,UAAU,UAAU,SAAS;AAAA,YAC3C,SAAS,MAAM,WAAW,KAAK;AAAA,YAC/B,WAAU;AAAA,YAEV,sDAAC,UAAK,eAAW,cAAG,qCAAqC,UAAU,UAAU,sBAAsB,wBAAwB,GAAG;AAAA;AAAA,UAPzH,WAAW;AAAA,QAQlB,CACD,GACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["Image","Link"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ApiCollection } from '@medialane/sdk';
|
|
3
|
+
|
|
4
|
+
interface CollectionShowcaseProps {
|
|
5
|
+
collections: ApiCollection[];
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
getHref: (collection: ApiCollection) => string;
|
|
8
|
+
}
|
|
9
|
+
declare function CollectionShowcase({ collections, isLoading, getHref }: CollectionShowcaseProps): react_jsx_runtime.JSX.Element | null;
|
|
10
|
+
|
|
11
|
+
export { CollectionShowcase, type CollectionShowcaseProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ApiCollection } from '@medialane/sdk';
|
|
3
|
+
|
|
4
|
+
interface CollectionShowcaseProps {
|
|
5
|
+
collections: ApiCollection[];
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
getHref: (collection: ApiCollection) => string;
|
|
8
|
+
}
|
|
9
|
+
declare function CollectionShowcase({ collections, isLoading, getHref }: CollectionShowcaseProps): react_jsx_runtime.JSX.Element | null;
|
|
10
|
+
|
|
11
|
+
export { CollectionShowcase, type CollectionShowcaseProps };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
import { motion, useReducedMotion } from "framer-motion";
|
|
5
|
+
import Link from "./link.js";
|
|
6
|
+
import Image from "./image.js";
|
|
7
|
+
import { Skeleton } from "./skeleton.js";
|
|
8
|
+
import { cn } from "../utils/cn.js";
|
|
9
|
+
import { useImageUrl } from "../utils/use-image-url.js";
|
|
10
|
+
const AUTOPLAY_MS = 6e3;
|
|
11
|
+
const SWIPE_PX = 50;
|
|
12
|
+
const CARD_SIZE = "aspect-[4/5] w-[58vw] max-w-[260px] sm:max-w-[300px] lg:max-w-[340px]";
|
|
13
|
+
function offsetFrom(index, current, count) {
|
|
14
|
+
const distance = (index - current + count) % count;
|
|
15
|
+
return distance > count / 2 ? distance - count : distance;
|
|
16
|
+
}
|
|
17
|
+
function ShowcaseSkeleton() {
|
|
18
|
+
return /* @__PURE__ */ jsxs("section", { className: "px-4 pb-8 pt-10 sm:pt-14", children: [
|
|
19
|
+
/* @__PURE__ */ jsx(Skeleton, { className: cn("mx-auto rounded-2xl", CARD_SIZE) }),
|
|
20
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "mx-auto mt-6 h-9 w-56" })
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
function CollectionShowcase({ collections, isLoading, getHref }) {
|
|
24
|
+
const resolveImage = useImageUrl();
|
|
25
|
+
const reduceMotion = useReducedMotion();
|
|
26
|
+
const [current, setCurrent] = useState(0);
|
|
27
|
+
const [paused, setPaused] = useState(false);
|
|
28
|
+
const dragged = useRef(false);
|
|
29
|
+
const count = collections.length;
|
|
30
|
+
const go = (step) => setCurrent((index) => (index + step + count) % count);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (count <= 1 || paused || reduceMotion) return;
|
|
33
|
+
const id = setInterval(() => setCurrent((index) => (index + 1) % count), AUTOPLAY_MS);
|
|
34
|
+
return () => clearInterval(id);
|
|
35
|
+
}, [count, paused, reduceMotion]);
|
|
36
|
+
if (isLoading) return /* @__PURE__ */ jsx(ShowcaseSkeleton, {});
|
|
37
|
+
if (count === 0) return null;
|
|
38
|
+
const active = collections[current % count];
|
|
39
|
+
const activeImage = resolveImage(active.image, { width: 960 });
|
|
40
|
+
const supply = active.totalSupply;
|
|
41
|
+
const transition = reduceMotion ? { duration: 0 } : { type: "spring", stiffness: 220, damping: 26 };
|
|
42
|
+
return /* @__PURE__ */ jsxs(
|
|
43
|
+
"section",
|
|
44
|
+
{
|
|
45
|
+
className: "relative overflow-hidden px-4 pb-8 pt-10 sm:pt-14",
|
|
46
|
+
onPointerEnter: () => setPaused(true),
|
|
47
|
+
onPointerLeave: () => setPaused(false),
|
|
48
|
+
onFocus: () => setPaused(true),
|
|
49
|
+
onBlur: () => setPaused(false),
|
|
50
|
+
children: [
|
|
51
|
+
activeImage && /* @__PURE__ */ jsx(
|
|
52
|
+
motion.div,
|
|
53
|
+
{
|
|
54
|
+
"aria-hidden": true,
|
|
55
|
+
className: "pointer-events-none absolute inset-0 scale-125 opacity-30 blur-3xl dark:opacity-40",
|
|
56
|
+
initial: reduceMotion ? false : { opacity: 0 },
|
|
57
|
+
animate: { opacity: 1 },
|
|
58
|
+
transition: { duration: 0.6 },
|
|
59
|
+
children: /* @__PURE__ */ jsx(Image, { src: activeImage, alt: "", fill: true, className: "object-cover", unoptimized: true })
|
|
60
|
+
},
|
|
61
|
+
active.contractAddress
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-b from-transparent to-background" }),
|
|
64
|
+
/* @__PURE__ */ jsx(
|
|
65
|
+
motion.div,
|
|
66
|
+
{
|
|
67
|
+
className: cn("relative mx-auto touch-pan-y", CARD_SIZE),
|
|
68
|
+
drag: count > 1 ? "x" : false,
|
|
69
|
+
dragConstraints: { left: 0, right: 0 },
|
|
70
|
+
dragElastic: 0.2,
|
|
71
|
+
onDragStart: () => {
|
|
72
|
+
dragged.current = true;
|
|
73
|
+
},
|
|
74
|
+
onDragEnd: (_, info) => {
|
|
75
|
+
if (info.offset.x < -SWIPE_PX) go(1);
|
|
76
|
+
else if (info.offset.x > SWIPE_PX) go(-1);
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
dragged.current = false;
|
|
79
|
+
}, 0);
|
|
80
|
+
},
|
|
81
|
+
children: collections.map((collection, index) => {
|
|
82
|
+
const offset = offsetFrom(index, current, count);
|
|
83
|
+
const distance = Math.abs(offset);
|
|
84
|
+
const image = resolveImage(collection.image, { width: 640 });
|
|
85
|
+
const name = collection.name ?? "Collection";
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
motion.div,
|
|
88
|
+
{
|
|
89
|
+
className: cn("absolute inset-0", distance > 2 && "pointer-events-none"),
|
|
90
|
+
initial: false,
|
|
91
|
+
animate: {
|
|
92
|
+
x: `${offset * 58}%`,
|
|
93
|
+
rotate: offset * 9,
|
|
94
|
+
scale: 1 - distance * 0.12,
|
|
95
|
+
opacity: distance > 2 ? 0 : 1,
|
|
96
|
+
zIndex: 10 - distance
|
|
97
|
+
},
|
|
98
|
+
transition,
|
|
99
|
+
children: /* @__PURE__ */ jsxs(
|
|
100
|
+
Link,
|
|
101
|
+
{
|
|
102
|
+
href: getHref(collection),
|
|
103
|
+
"aria-label": name,
|
|
104
|
+
draggable: false,
|
|
105
|
+
onClick: (event) => {
|
|
106
|
+
if (dragged.current) event.preventDefault();
|
|
107
|
+
},
|
|
108
|
+
className: "relative block h-full w-full overflow-hidden rounded-2xl bg-muted shadow-2xl shadow-black/20 ring-1 ring-border dark:shadow-black/50",
|
|
109
|
+
children: [
|
|
110
|
+
image ? /* @__PURE__ */ jsx(Image, { src: image, alt: "", fill: true, sizes: "(min-width: 1024px) 340px, 58vw", className: "object-cover", priority: index === 0, unoptimized: true }) : /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-br from-brand-purple/40 via-brand-blue/20 to-brand-navy/60" }),
|
|
111
|
+
/* @__PURE__ */ jsx("span", { className: cn("absolute inset-0 bg-background/40 transition-opacity duration-500", offset === 0 ? "opacity-0" : "opacity-100") })
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
},
|
|
116
|
+
collection.contractAddress
|
|
117
|
+
);
|
|
118
|
+
})
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ jsxs(
|
|
122
|
+
motion.div,
|
|
123
|
+
{
|
|
124
|
+
className: "relative mt-8 flex flex-col items-center gap-1 text-center",
|
|
125
|
+
initial: reduceMotion ? false : { opacity: 0, y: 8 },
|
|
126
|
+
animate: { opacity: 1, y: 0 },
|
|
127
|
+
transition: { duration: 0.4 },
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ jsx(Link, { href: getHref(active), className: "transition-opacity hover:opacity-80", children: /* @__PURE__ */ jsx("h2", { className: "text-3xl font-semibold leading-tight tracking-tight text-foreground sm:text-4xl lg:text-5xl", children: active.name ?? "Collection" }) }),
|
|
130
|
+
supply != null && /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
131
|
+
supply.toLocaleString(),
|
|
132
|
+
" ",
|
|
133
|
+
supply === 1 ? "item" : "items"
|
|
134
|
+
] })
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
active.contractAddress
|
|
138
|
+
),
|
|
139
|
+
count > 1 && /* @__PURE__ */ jsx("div", { className: "relative mt-3 flex justify-center", children: collections.map((collection, index) => /* @__PURE__ */ jsx(
|
|
140
|
+
"button",
|
|
141
|
+
{
|
|
142
|
+
type: "button",
|
|
143
|
+
"aria-label": `Show ${collection.name ?? "collection"}`,
|
|
144
|
+
"aria-current": index === current ? "true" : void 0,
|
|
145
|
+
onClick: () => setCurrent(index),
|
|
146
|
+
className: "flex h-8 items-center px-0.5",
|
|
147
|
+
children: /* @__PURE__ */ jsx("span", { className: cn("h-1.5 rounded-full transition-all", index === current ? "w-6 bg-foreground" : "w-1.5 bg-foreground/30") })
|
|
148
|
+
},
|
|
149
|
+
collection.contractAddress
|
|
150
|
+
)) })
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
export {
|
|
156
|
+
CollectionShowcase
|
|
157
|
+
};
|
|
158
|
+
//# sourceMappingURL=collection-showcase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/collection-showcase.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState } from \"react\";\nimport { motion, useReducedMotion } from \"framer-motion\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { Skeleton } from \"./skeleton.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\n\nexport interface CollectionShowcaseProps {\n collections: ApiCollection[];\n isLoading: boolean;\n getHref: (collection: ApiCollection) => string;\n}\n\nconst AUTOPLAY_MS = 6000;\nconst SWIPE_PX = 50;\nconst CARD_SIZE = \"aspect-[4/5] w-[58vw] max-w-[260px] sm:max-w-[300px] lg:max-w-[340px]\";\n\nfunction offsetFrom(index: number, current: number, count: number) {\n const distance = (index - current + count) % count;\n return distance > count / 2 ? distance - count : distance;\n}\n\nfunction ShowcaseSkeleton() {\n return (\n <section className=\"px-4 pb-8 pt-10 sm:pt-14\">\n <Skeleton className={cn(\"mx-auto rounded-2xl\", CARD_SIZE)} />\n <Skeleton className=\"mx-auto mt-6 h-9 w-56\" />\n </section>\n );\n}\n\nexport function CollectionShowcase({ collections, isLoading, getHref }: CollectionShowcaseProps) {\n const resolveImage = useImageUrl();\n const reduceMotion = useReducedMotion();\n const [current, setCurrent] = useState(0);\n const [paused, setPaused] = useState(false);\n const dragged = useRef(false);\n const count = collections.length;\n\n const go = (step: number) => setCurrent((index) => (index + step + count) % count);\n\n useEffect(() => {\n if (count <= 1 || paused || reduceMotion) return;\n const id = setInterval(() => setCurrent((index) => (index + 1) % count), AUTOPLAY_MS);\n return () => clearInterval(id);\n }, [count, paused, reduceMotion]);\n\n if (isLoading) return <ShowcaseSkeleton />;\n if (count === 0) return null;\n\n const active = collections[current % count]!;\n const activeImage = resolveImage(active.image, { width: 960 });\n const supply = active.totalSupply;\n const transition = reduceMotion ? { duration: 0 } : { type: \"spring\" as const, stiffness: 220, damping: 26 };\n\n return (\n <section\n className=\"relative overflow-hidden px-4 pb-8 pt-10 sm:pt-14\"\n onPointerEnter={() => setPaused(true)}\n onPointerLeave={() => setPaused(false)}\n onFocus={() => setPaused(true)}\n onBlur={() => setPaused(false)}\n >\n {activeImage && (\n <motion.div\n key={active.contractAddress}\n aria-hidden\n className=\"pointer-events-none absolute inset-0 scale-125 opacity-30 blur-3xl dark:opacity-40\"\n initial={reduceMotion ? false : { opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ duration: 0.6 }}\n >\n <Image src={activeImage} alt=\"\" fill className=\"object-cover\" unoptimized />\n </motion.div>\n )}\n <div aria-hidden className=\"pointer-events-none absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-b from-transparent to-background\" />\n\n <motion.div\n className={cn(\"relative mx-auto touch-pan-y\", CARD_SIZE)}\n drag={count > 1 ? \"x\" : false}\n dragConstraints={{ left: 0, right: 0 }}\n dragElastic={0.2}\n onDragStart={() => { dragged.current = true; }}\n onDragEnd={(_, info) => {\n if (info.offset.x < -SWIPE_PX) go(1);\n else if (info.offset.x > SWIPE_PX) go(-1);\n setTimeout(() => { dragged.current = false; }, 0);\n }}\n >\n {collections.map((collection, index) => {\n const offset = offsetFrom(index, current, count);\n const distance = Math.abs(offset);\n const image = resolveImage(collection.image, { width: 640 });\n const name = collection.name ?? \"Collection\";\n return (\n <motion.div\n key={collection.contractAddress}\n className={cn(\"absolute inset-0\", distance > 2 && \"pointer-events-none\")}\n initial={false}\n animate={{\n x: `${offset * 58}%`,\n rotate: offset * 9,\n scale: 1 - distance * 0.12,\n opacity: distance > 2 ? 0 : 1,\n zIndex: 10 - distance,\n }}\n transition={transition}\n >\n <Link\n href={getHref(collection)}\n aria-label={name}\n draggable={false}\n onClick={(event) => { if (dragged.current) event.preventDefault(); }}\n className=\"relative block h-full w-full overflow-hidden rounded-2xl bg-muted shadow-2xl shadow-black/20 ring-1 ring-border dark:shadow-black/50\"\n >\n {image ? (\n <Image src={image} alt=\"\" fill sizes=\"(min-width: 1024px) 340px, 58vw\" className=\"object-cover\" priority={index === 0} unoptimized />\n ) : (\n <div className=\"absolute inset-0 bg-gradient-to-br from-brand-purple/40 via-brand-blue/20 to-brand-navy/60\" />\n )}\n <span className={cn(\"absolute inset-0 bg-background/40 transition-opacity duration-500\", offset === 0 ? \"opacity-0\" : \"opacity-100\")} />\n </Link>\n </motion.div>\n );\n })}\n </motion.div>\n\n <motion.div\n key={active.contractAddress}\n className=\"relative mt-8 flex flex-col items-center gap-1 text-center\"\n initial={reduceMotion ? false : { opacity: 0, y: 8 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.4 }}\n >\n <Link href={getHref(active)} className=\"transition-opacity hover:opacity-80\">\n <h2 className=\"text-3xl font-semibold leading-tight tracking-tight text-foreground sm:text-4xl lg:text-5xl\">\n {active.name ?? \"Collection\"}\n </h2>\n </Link>\n {supply != null && (\n <p className=\"text-sm text-muted-foreground\">\n {supply.toLocaleString()} {supply === 1 ? \"item\" : \"items\"}\n </p>\n )}\n </motion.div>\n\n {count > 1 && (\n <div className=\"relative mt-3 flex justify-center\">\n {collections.map((collection, index) => (\n <button\n key={collection.contractAddress}\n type=\"button\"\n aria-label={`Show ${collection.name ?? \"collection\"}`}\n aria-current={index === current ? \"true\" : undefined}\n onClick={() => setCurrent(index)}\n className=\"flex h-8 items-center px-0.5\"\n >\n <span className={cn(\"h-1.5 rounded-full transition-all\", index === current ? \"w-6 bg-foreground\" : \"w-1.5 bg-foreground/30\")} />\n </button>\n ))}\n </div>\n )}\n </section>\n );\n}\n"],"mappings":";AA4BI,SACE,KADF;AA1BJ,SAAS,WAAW,QAAQ,gBAAgB;AAC5C,SAAS,QAAQ,wBAAwB;AAEzC,OAAO,UAAU;AACjB,OAAO,WAAW;AAClB,SAAS,gBAAgB;AACzB,SAAS,UAAU;AACnB,SAAS,mBAAmB;AAQ5B,MAAM,cAAc;AACpB,MAAM,WAAW;AACjB,MAAM,YAAY;AAElB,SAAS,WAAW,OAAe,SAAiB,OAAe;AACjE,QAAM,YAAY,QAAQ,UAAU,SAAS;AAC7C,SAAO,WAAW,QAAQ,IAAI,WAAW,QAAQ;AACnD;AAEA,SAAS,mBAAmB;AAC1B,SACE,qBAAC,aAAQ,WAAU,4BACjB;AAAA,wBAAC,YAAS,WAAW,GAAG,uBAAuB,SAAS,GAAG;AAAA,IAC3D,oBAAC,YAAS,WAAU,yBAAwB;AAAA,KAC9C;AAEJ;AAEO,SAAS,mBAAmB,EAAE,aAAa,WAAW,QAAQ,GAA4B;AAC/F,QAAM,eAAe,YAAY;AACjC,QAAM,eAAe,iBAAiB;AACtC,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,CAAC;AACxC,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,UAAU,OAAO,KAAK;AAC5B,QAAM,QAAQ,YAAY;AAE1B,QAAM,KAAK,CAAC,SAAiB,WAAW,CAAC,WAAW,QAAQ,OAAO,SAAS,KAAK;AAEjF,YAAU,MAAM;AACd,QAAI,SAAS,KAAK,UAAU,aAAc;AAC1C,UAAM,KAAK,YAAY,MAAM,WAAW,CAAC,WAAW,QAAQ,KAAK,KAAK,GAAG,WAAW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lB;AAAA,YAEJ,CAAC;AAAA;AAAA,QACH;AAAA,QAEA;AAAA,UAAC,OAAO;AAAA,UAAP;AAAA,YAEC,WAAU;AAAA,YACV,SAAS,eAAe,QAAQ,EAAE,SAAS,GAAG,GAAG,EAAE;AAAA,YACnD,SAAS,EAAE,SAAS,GAAG,GAAG,EAAE;AAAA,YAC5B,YAAY,EAAE,UAAU,IAAI;AAAA,YAE5B;AAAA,kCAAC,QAAK,MAAM,QAAQ,MAAM,GAAG,WAAU,uCACrC,8BAAC,QAAG,WAAU,+FACX,iBAAO,QAAQ,cAClB,GACF;AAAA,cACC,UAAU,QACT,qBAAC,OAAE,WAAU,iCACV;AAAA,uBAAO,eAAe;AAAA,gBAAE;AAAA,gBAAE,WAAW,IAAI,SAAS;AAAA,iBACrD;AAAA;AAAA;AAAA,UAdG,OAAO;AAAA,QAgBd;AAAA,QAEC,QAAQ,KACP,oBAAC,SAAI,WAAU,qCACZ,sBAAY,IAAI,CAAC,YAAY,UAC5B;AAAA,UAAC;AAAA;AAAA,YAEC,MAAK;AAAA,YACL,cAAY,QAAQ,WAAW,QAAQ,YAAY;AAAA,YACnD,gBAAc,UAAU,UAAU,SAAS;AAAA,YAC3C,SAAS,MAAM,WAAW,KAAK;AAAA,YAC/B,WAAU;AAAA,YAEV,8BAAC,UAAK,WAAW,GAAG,qCAAqC,UAAU,UAAU,sBAAsB,wBAAwB,GAAG;AAAA;AAAA,UAPzH,WAAW;AAAA,QAQlB,CACD,GACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -38,7 +38,7 @@ var import_sdk = require("@medialane/sdk");
|
|
|
38
38
|
var import_lucide_react = require("lucide-react");
|
|
39
39
|
var import_link = __toESM(require("./link.js"), 1);
|
|
40
40
|
var import_page_container = require("./page-container.js");
|
|
41
|
-
var
|
|
41
|
+
var import_collection_showcase = require("./collection-showcase.js");
|
|
42
42
|
var import_activity_ticker = require("./activity-ticker.js");
|
|
43
43
|
var import_scroll_section = require("./scroll-section.js");
|
|
44
44
|
var import_listing_card = require("./listing-card.js");
|
|
@@ -128,7 +128,7 @@ function HomePage({ useMarketActions, initialFeatured }) {
|
|
|
128
128
|
const { collections: featured, isLoading: featuredLoading } = (0, import_use_collections.useCollections)(1, 3, true, "recent", true, void 0, void 0, initialFeatured);
|
|
129
129
|
const { orders: tickerOrders } = (0, import_use_orders.useOrders)({ status: "ACTIVE", sort: "recent", limit: 14 });
|
|
130
130
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pb-20", children: [
|
|
131
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
131
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_collection_showcase.CollectionShowcase, { collections: featured, isLoading: featuredLoading, getHref: (c) => (0, import_sdk.collectionHref)("STARKNET", c.contractAddress) }),
|
|
132
132
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_page_container.PageContainer, { className: "box-border max-w-full pt-6 pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_activity_ticker.ActivityTicker, { orders: tickerOrders, minItems: 3, getHref: (o) => (0, import_sdk.assetHref)("STARKNET", o.nftContract, o.nftTokenId) }) }),
|
|
133
133
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_page_container.PageContainer, { className: "mt-16 box-border max-w-full space-y-10 pt-0 pb-0 sm:space-y-16 lg:space-y-20", children: [
|
|
134
134
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NewListings, { market }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/home-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { assetHref, collectionHref, type ApiCollection, type ApiOrdersQuery } from \"@medialane/sdk\";\nimport type { ReactNode } from \"react\";\nimport { Sparkles, Tag, TrendingUp } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport { PageContainer } from \"./page-container.js\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/home-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { assetHref, collectionHref, type ApiCollection, type ApiOrdersQuery } from \"@medialane/sdk\";\nimport type { ReactNode } from \"react\";\nimport { Sparkles, Tag, TrendingUp } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport { PageContainer } from \"./page-container.js\";\nimport { CollectionShowcase } from \"./collection-showcase.js\";\nimport { ActivityTicker } from \"./activity-ticker.js\";\nimport { ScrollSection } from \"./scroll-section.js\";\nimport { ListingCard, ListingCardSkeleton } from \"./listing-card.js\";\nimport { ListingCardMenu } from \"./listing-card-menu.js\";\nimport { CollectionCard, CollectionCardSkeleton } from \"./collection-card.js\";\nimport { RewardsSection } from \"./rewards-section.js\";\nimport { LaunchpadStrip } from \"./launchpad-strip.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport type { CollectionMarketActions } from \"./collection-page.js\";\nimport { useOrders } from \"../utils/use-orders.js\";\nimport { useCollections } from \"../utils/use-collections.js\";\nimport { useUsdPrices } from \"../utils/use-usd-prices.js\";\nimport { orderUsd } from \"../utils/order-usd.js\";\nimport { isSameAddress } from \"../utils/same-address.js\";\n\nconst LAUNCHPAD_HREFS = {\n nfts: \"/launchpad/single-editions\",\n \"limited-editions\": \"/launchpad/nfteditions\",\n \"collection-drop\": \"/launchpad/drop\",\n \"pop-protocol\": \"/launchpad/pop\",\n \"ip-tickets\": \"/launchpad/tickets\",\n \"creator-coins\": \"/launchpad/coin/create\",\n};\n\nfunction ListingsStrip({\n market, icon, title, query, href, empty,\n}: {\n market: CollectionMarketActions;\n icon: ReactNode;\n title: string;\n query: ApiOrdersQuery;\n href: string;\n empty?: ReactNode;\n}) {\n const { walletAddress } = useMedialaneApp();\n const { orders, isLoading } = useOrders(query);\n const prices = useUsdPrices();\n const listings = orders.filter((o) => o.offer.itemType === \"ERC721\" || o.offer.itemType === \"ERC1155\").slice(0, 10);\n if (!isLoading && listings.length === 0 && !empty) return null;\n return (\n <ScrollSection icon={icon} title={title} href={href}>\n {isLoading\n ? Array.from({ length: 8 }).map((_, i) => (\n <div key={i} className=\"w-56 shrink-0 snap-start sm:w-64\"><ListingCardSkeleton /></div>\n ))\n : listings.length === 0\n ? empty\n : listings.map((order) => {\n const own = !!walletAddress && isSameAddress(order.offerer, walletAddress);\n return (\n <div key={order.orderHash} className=\"w-56 shrink-0 snap-start sm:w-64\">\n <ListingCard\n order={order}\n onBuy={own ? undefined : () => market.buy(order)}\n overflowMenu={<ListingCardMenu order={order} />}\n usdValue={orderUsd(order.price, prices)}\n />\n </div>\n );\n })}\n </ScrollSection>\n );\n}\n\nfunction NewListings({ market }: { market: CollectionMarketActions }) {\n return (\n <ListingsStrip\n market={market}\n icon={<Tag />}\n title=\"Marketplace\"\n query={{ status: \"ACTIVE\", limit: 10, page: 1 }}\n href=\"/marketplace\"\n empty={\n <p className=\"py-4 text-sm text-muted-foreground\">\n <Link href=\"/launchpad/single-editions\" className=\"text-primary hover:underline\">Sell the first asset</Link>\n </p>\n }\n />\n );\n}\n\nexport function FeaturedListings({ market }: { market: CollectionMarketActions }) {\n return (\n <ListingsStrip\n market={market}\n icon={<Sparkles />}\n title=\"Featured\"\n query={{ status: \"ACTIVE\", isFeatured: true, limit: 20, page: 1 }}\n href=\"/marketplace\"\n />\n );\n}\n\nfunction CollectionsStrip() {\n const { collections, isLoading } = useCollections(1, 10, undefined, \"recent\");\n return (\n <ScrollSection\n icon={<TrendingUp className=\"h-4 w-4\" />}\n title=\"Collections\"\n href=\"/collections\"\n >\n {isLoading\n ? Array.from({ length: 5 }).map((_, i) => (\n <div key={i} className=\"w-56 shrink-0 snap-start sm:w-64\"><CollectionCardSkeleton /></div>\n ))\n : collections.map((col) => (\n <div key={col.contractAddress} className=\"w-56 shrink-0 snap-start sm:w-64\"><CollectionCard collection={col} /></div>\n ))}\n </ScrollSection>\n );\n}\n\nexport interface HomePageProps {\n useMarketActions: () => CollectionMarketActions;\n initialFeatured?: ApiCollection[];\n}\n\nexport function HomePage({ useMarketActions, initialFeatured }: HomePageProps) {\n const market = useMarketActions();\n const { collections: featured, isLoading: featuredLoading } = useCollections(1, 3, true, \"recent\", true, undefined, undefined, initialFeatured);\n const { orders: tickerOrders } = useOrders({ status: \"ACTIVE\", sort: \"recent\", limit: 14 });\n return (\n <div className=\"pb-20\">\n <CollectionShowcase collections={featured} isLoading={featuredLoading} getHref={(c) => collectionHref(\"STARKNET\", c.contractAddress)} />\n <PageContainer className=\"box-border max-w-full pt-6 pb-0\">\n <ActivityTicker orders={tickerOrders} minItems={3} getHref={(o) => assetHref(\"STARKNET\", o.nftContract, o.nftTokenId)} />\n </PageContainer>\n <PageContainer className=\"mt-16 box-border max-w-full space-y-10 pt-0 pb-0 sm:space-y-16 lg:space-y-20\">\n <NewListings market={market} />\n <FeaturedListings market={market} />\n <CollectionsStrip />\n <RewardsSection rewardsHref=\"/rewards\" />\n <LaunchpadStrip hrefs={LAUNCHPAD_HREFS} marketplaceHref=\"/marketplace\" launchpadHref=\"/launchpad\" />\n </PageContainer>\n {market.dialogs}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmDsE;AAjDtE,iBAAmF;AAEnF,0BAA0C;AAC1C,kBAAiB;AACjB,4BAA8B;AAC9B,iCAAmC;AACnC,6BAA+B;AAC/B,4BAA8B;AAC9B,0BAAiD;AACjD,+BAAgC;AAChC,6BAAuD;AACvD,6BAA+B;AAC/B,6BAA+B;AAC/B,2BAAgC;AAEhC,wBAA0B;AAC1B,6BAA+B;AAC/B,4BAA6B;AAC7B,uBAAyB;AACzB,0BAA8B;AAE9B,MAAM,kBAAkB;AAAA,EACtB,MAAM;AAAA,EACN,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,iBAAiB;AACnB;AAEA,SAAS,cAAc;AAAA,EACrB;AAAA,EAAQ;AAAA,EAAM;AAAA,EAAO;AAAA,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M,sBAAU,YAAY,EAAE,aAAa,EAAE,UAAU,GAAG,GACzH;AAAA,IACA,6CAAC,uCAAc,WAAU,gFACvB;AAAA,kDAAC,eAAY,QAAgB;AAAA,MAC7B,4CAAC,oBAAiB,QAAgB;AAAA,MAClC,4CAAC,oBAAiB;AAAA,MAClB,4CAAC,yCAAe,aAAY,YAAW;AAAA,MACvC,4CAAC,yCAAe,OAAO,iBAAiB,iBAAgB,gBAAe,eAAc,cAAa;AAAA,OACpG;AAAA,IACC,OAAO;AAAA,KACV;AAEJ;","names":["Link"]}
|
|
@@ -4,7 +4,7 @@ import { assetHref, collectionHref } from "@medialane/sdk";
|
|
|
4
4
|
import { Sparkles, Tag, TrendingUp } from "lucide-react";
|
|
5
5
|
import Link from "./link.js";
|
|
6
6
|
import { PageContainer } from "./page-container.js";
|
|
7
|
-
import {
|
|
7
|
+
import { CollectionShowcase } from "./collection-showcase.js";
|
|
8
8
|
import { ActivityTicker } from "./activity-ticker.js";
|
|
9
9
|
import { ScrollSection } from "./scroll-section.js";
|
|
10
10
|
import { ListingCard, ListingCardSkeleton } from "./listing-card.js";
|
|
@@ -94,7 +94,7 @@ function HomePage({ useMarketActions, initialFeatured }) {
|
|
|
94
94
|
const { collections: featured, isLoading: featuredLoading } = useCollections(1, 3, true, "recent", true, void 0, void 0, initialFeatured);
|
|
95
95
|
const { orders: tickerOrders } = useOrders({ status: "ACTIVE", sort: "recent", limit: 14 });
|
|
96
96
|
return /* @__PURE__ */ jsxs("div", { className: "pb-20", children: [
|
|
97
|
-
/* @__PURE__ */ jsx(
|
|
97
|
+
/* @__PURE__ */ jsx(CollectionShowcase, { collections: featured, isLoading: featuredLoading, getHref: (c) => collectionHref("STARKNET", c.contractAddress) }),
|
|
98
98
|
/* @__PURE__ */ jsx(PageContainer, { className: "box-border max-w-full pt-6 pb-0", children: /* @__PURE__ */ jsx(ActivityTicker, { orders: tickerOrders, minItems: 3, getHref: (o) => assetHref("STARKNET", o.nftContract, o.nftTokenId) }) }),
|
|
99
99
|
/* @__PURE__ */ jsxs(PageContainer, { className: "mt-16 box-border max-w-full space-y-10 pt-0 pb-0 sm:space-y-16 lg:space-y-20", children: [
|
|
100
100
|
/* @__PURE__ */ jsx(NewListings, { market }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/home-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { assetHref, collectionHref, type ApiCollection, type ApiOrdersQuery } from \"@medialane/sdk\";\nimport type { ReactNode } from \"react\";\nimport { Sparkles, Tag, TrendingUp } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport { PageContainer } from \"./page-container.js\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/home-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { assetHref, collectionHref, type ApiCollection, type ApiOrdersQuery } from \"@medialane/sdk\";\nimport type { ReactNode } from \"react\";\nimport { Sparkles, Tag, TrendingUp } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport { PageContainer } from \"./page-container.js\";\nimport { CollectionShowcase } from \"./collection-showcase.js\";\nimport { ActivityTicker } from \"./activity-ticker.js\";\nimport { ScrollSection } from \"./scroll-section.js\";\nimport { ListingCard, ListingCardSkeleton } from \"./listing-card.js\";\nimport { ListingCardMenu } from \"./listing-card-menu.js\";\nimport { CollectionCard, CollectionCardSkeleton } from \"./collection-card.js\";\nimport { RewardsSection } from \"./rewards-section.js\";\nimport { LaunchpadStrip } from \"./launchpad-strip.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport type { CollectionMarketActions } from \"./collection-page.js\";\nimport { useOrders } from \"../utils/use-orders.js\";\nimport { useCollections } from \"../utils/use-collections.js\";\nimport { useUsdPrices } from \"../utils/use-usd-prices.js\";\nimport { orderUsd } from \"../utils/order-usd.js\";\nimport { isSameAddress } from \"../utils/same-address.js\";\n\nconst LAUNCHPAD_HREFS = {\n nfts: \"/launchpad/single-editions\",\n \"limited-editions\": \"/launchpad/nfteditions\",\n \"collection-drop\": \"/launchpad/drop\",\n \"pop-protocol\": \"/launchpad/pop\",\n \"ip-tickets\": \"/launchpad/tickets\",\n \"creator-coins\": \"/launchpad/coin/create\",\n};\n\nfunction ListingsStrip({\n market, icon, title, query, href, empty,\n}: {\n market: CollectionMarketActions;\n icon: ReactNode;\n title: string;\n query: ApiOrdersQuery;\n href: string;\n empty?: ReactNode;\n}) {\n const { walletAddress } = useMedialaneApp();\n const { orders, isLoading } = useOrders(query);\n const prices = useUsdPrices();\n const listings = orders.filter((o) => o.offer.itemType === \"ERC721\" || o.offer.itemType === \"ERC1155\").slice(0, 10);\n if (!isLoading && listings.length === 0 && !empty) return null;\n return (\n <ScrollSection icon={icon} title={title} href={href}>\n {isLoading\n ? Array.from({ length: 8 }).map((_, i) => (\n <div key={i} className=\"w-56 shrink-0 snap-start sm:w-64\"><ListingCardSkeleton /></div>\n ))\n : listings.length === 0\n ? empty\n : listings.map((order) => {\n const own = !!walletAddress && isSameAddress(order.offerer, walletAddress);\n return (\n <div key={order.orderHash} className=\"w-56 shrink-0 snap-start sm:w-64\">\n <ListingCard\n order={order}\n onBuy={own ? undefined : () => market.buy(order)}\n overflowMenu={<ListingCardMenu order={order} />}\n usdValue={orderUsd(order.price, prices)}\n />\n </div>\n );\n })}\n </ScrollSection>\n );\n}\n\nfunction NewListings({ market }: { market: CollectionMarketActions }) {\n return (\n <ListingsStrip\n market={market}\n icon={<Tag />}\n title=\"Marketplace\"\n query={{ status: \"ACTIVE\", limit: 10, page: 1 }}\n href=\"/marketplace\"\n empty={\n <p className=\"py-4 text-sm text-muted-foreground\">\n <Link href=\"/launchpad/single-editions\" className=\"text-primary hover:underline\">Sell the first asset</Link>\n </p>\n }\n />\n );\n}\n\nexport function FeaturedListings({ market }: { market: CollectionMarketActions }) {\n return (\n <ListingsStrip\n market={market}\n icon={<Sparkles />}\n title=\"Featured\"\n query={{ status: \"ACTIVE\", isFeatured: true, limit: 20, page: 1 }}\n href=\"/marketplace\"\n />\n );\n}\n\nfunction CollectionsStrip() {\n const { collections, isLoading } = useCollections(1, 10, undefined, \"recent\");\n return (\n <ScrollSection\n icon={<TrendingUp className=\"h-4 w-4\" />}\n title=\"Collections\"\n href=\"/collections\"\n >\n {isLoading\n ? Array.from({ length: 5 }).map((_, i) => (\n <div key={i} className=\"w-56 shrink-0 snap-start sm:w-64\"><CollectionCardSkeleton /></div>\n ))\n : collections.map((col) => (\n <div key={col.contractAddress} className=\"w-56 shrink-0 snap-start sm:w-64\"><CollectionCard collection={col} /></div>\n ))}\n </ScrollSection>\n );\n}\n\nexport interface HomePageProps {\n useMarketActions: () => CollectionMarketActions;\n initialFeatured?: ApiCollection[];\n}\n\nexport function HomePage({ useMarketActions, initialFeatured }: HomePageProps) {\n const market = useMarketActions();\n const { collections: featured, isLoading: featuredLoading } = useCollections(1, 3, true, \"recent\", true, undefined, undefined, initialFeatured);\n const { orders: tickerOrders } = useOrders({ status: \"ACTIVE\", sort: \"recent\", limit: 14 });\n return (\n <div className=\"pb-20\">\n <CollectionShowcase collections={featured} isLoading={featuredLoading} getHref={(c) => collectionHref(\"STARKNET\", c.contractAddress)} />\n <PageContainer className=\"box-border max-w-full pt-6 pb-0\">\n <ActivityTicker orders={tickerOrders} minItems={3} getHref={(o) => assetHref(\"STARKNET\", o.nftContract, o.nftTokenId)} />\n </PageContainer>\n <PageContainer className=\"mt-16 box-border max-w-full space-y-10 pt-0 pb-0 sm:space-y-16 lg:space-y-20\">\n <NewListings market={market} />\n <FeaturedListings market={market} />\n <CollectionsStrip />\n <RewardsSection rewardsHref=\"/rewards\" />\n <LaunchpadStrip hrefs={LAUNCHPAD_HREFS} marketplaceHref=\"/marketplace\" launchpadHref=\"/launchpad\" />\n </PageContainer>\n {market.dialogs}\n </div>\n );\n}\n"],"mappings":";AAmDsE,cAoFhE,YApFgE;AAjDtE,SAAS,WAAW,sBAA+D;AAEnF,SAAS,UAAU,KAAK,kBAAkB;AAC1C,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAC9B,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AAS,SAAS,EAAE,kBAAkB,gBAAgB,GAAkB;AAC7E,QAAM,SAAS,iBAAiB;AAChC,QAAM,EAAE,aAAa,UAAU,WAAW,gBAAgB,IAAI,eAAe,GAAG,GAAG,MAAM,UAAU,MAAM,QAAW,QAAW,eAAe;AAC9I,QAAM,EAAE,QAAQ,aAAa,IAAI,UAAU,EAAE,QAAQ,UAAU,MAAM,UAAU,OAAO,GAAG,CAAC;AAC1F,SACE,qBAAC,SAAI,WAAU,SACb;AAAA,wBAAC,sBAAmB,aAAa,UAAU,WAAW,iBAAiB,SAAS,CAAC,MAAM,eAAe,YAAY,EAAE,eAAe,GAAG;AAAA,IACtI,oBAAC,iBAAc,WAAU,mCACvB,8BAAC,kBAAe,QAAQ,cAAc,UAAU,GAAG,SAAS,CAAC,MAAM,UAAU,YAAY,EAAE,aAAa,EAAE,UAAU,GAAG,GACzH;AAAA,IACA,qBAAC,iBAAc,WAAU,gFACvB;AAAA,0BAAC,eAAY,QAAgB;AAAA,MAC7B,oBAAC,oBAAiB,QAAgB;AAAA,MAClC,oBAAC,oBAAiB;AAAA,MAClB,oBAAC,kBAAe,aAAY,YAAW;AAAA,MACvC,oBAAC,kBAAe,OAAO,iBAAiB,iBAAgB,gBAAe,eAAc,cAAa;AAAA,OACpG;AAAA,IACC,OAAO;AAAA,KACV;AAEJ;","names":[]}
|
|
@@ -15,8 +15,9 @@ declare const editionMintSchema: z.ZodObject<{
|
|
|
15
15
|
aiPolicy: z.ZodEnum<["Allowed", "Not Allowed", "Training Only"]>;
|
|
16
16
|
royalty: z.ZodNumber;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
name: string;
|
|
19
18
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
19
|
+
name: string;
|
|
20
|
+
value: string;
|
|
20
21
|
licenseType: string;
|
|
21
22
|
commercialUse: "Yes" | "No";
|
|
22
23
|
derivatives: "Allowed" | "Not Allowed" | "Share-Alike";
|
|
@@ -24,13 +25,13 @@ declare const editionMintSchema: z.ZodObject<{
|
|
|
24
25
|
geographicScope: string;
|
|
25
26
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
26
27
|
royalty: number;
|
|
27
|
-
value: string;
|
|
28
28
|
recipient: string;
|
|
29
29
|
description?: string | undefined;
|
|
30
30
|
external_url?: string | undefined;
|
|
31
31
|
}, {
|
|
32
|
-
name: string;
|
|
33
32
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
33
|
+
name: string;
|
|
34
|
+
value: string;
|
|
34
35
|
licenseType: string;
|
|
35
36
|
commercialUse: "Yes" | "No";
|
|
36
37
|
derivatives: "Allowed" | "Not Allowed" | "Share-Alike";
|
|
@@ -38,7 +39,6 @@ declare const editionMintSchema: z.ZodObject<{
|
|
|
38
39
|
geographicScope: string;
|
|
39
40
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
40
41
|
royalty: number;
|
|
41
|
-
value: string;
|
|
42
42
|
recipient: string;
|
|
43
43
|
description?: string | undefined;
|
|
44
44
|
external_url?: string | undefined;
|
|
@@ -15,8 +15,9 @@ declare const editionMintSchema: z.ZodObject<{
|
|
|
15
15
|
aiPolicy: z.ZodEnum<["Allowed", "Not Allowed", "Training Only"]>;
|
|
16
16
|
royalty: z.ZodNumber;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
name: string;
|
|
19
18
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
19
|
+
name: string;
|
|
20
|
+
value: string;
|
|
20
21
|
licenseType: string;
|
|
21
22
|
commercialUse: "Yes" | "No";
|
|
22
23
|
derivatives: "Allowed" | "Not Allowed" | "Share-Alike";
|
|
@@ -24,13 +25,13 @@ declare const editionMintSchema: z.ZodObject<{
|
|
|
24
25
|
geographicScope: string;
|
|
25
26
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
26
27
|
royalty: number;
|
|
27
|
-
value: string;
|
|
28
28
|
recipient: string;
|
|
29
29
|
description?: string | undefined;
|
|
30
30
|
external_url?: string | undefined;
|
|
31
31
|
}, {
|
|
32
|
-
name: string;
|
|
33
32
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
33
|
+
name: string;
|
|
34
|
+
value: string;
|
|
34
35
|
licenseType: string;
|
|
35
36
|
commercialUse: "Yes" | "No";
|
|
36
37
|
derivatives: "Allowed" | "Not Allowed" | "Share-Alike";
|
|
@@ -38,7 +39,6 @@ declare const editionMintSchema: z.ZodObject<{
|
|
|
38
39
|
geographicScope: string;
|
|
39
40
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
40
41
|
royalty: number;
|
|
41
|
-
value: string;
|
|
42
42
|
recipient: string;
|
|
43
43
|
description?: string | undefined;
|
|
44
44
|
external_url?: string | undefined;
|
package/dist/index.cjs
CHANGED
|
@@ -113,6 +113,7 @@ __export(index_exports, {
|
|
|
113
113
|
CollectionPicker: () => import_collection_picker.CollectionPicker,
|
|
114
114
|
CollectionProvenanceTab: () => import_collection_provenance_tab.CollectionProvenanceTab,
|
|
115
115
|
CollectionSettings: () => import_collection_settings.CollectionSettings,
|
|
116
|
+
CollectionShowcase: () => import_collection_showcase.CollectionShowcase,
|
|
116
117
|
CollectionTypeChoices: () => import_new_collection_menu.CollectionTypeChoices,
|
|
117
118
|
CollectionsLoading: () => import_page_skeletons.CollectionsLoading,
|
|
118
119
|
CollectionsPage: () => import_collections_page.CollectionsPage,
|
|
@@ -219,8 +220,6 @@ __export(index_exports, {
|
|
|
219
220
|
GradientButton: () => import_gradient_button.GradientButton,
|
|
220
221
|
GuardianRecoverySection: () => import_guardian_recovery_section.GuardianRecoverySection,
|
|
221
222
|
HelpIcon: () => import_help_icon.HelpIcon,
|
|
222
|
-
HeroSlider: () => import_hero_slider.HeroSlider,
|
|
223
|
-
HeroSliderSkeleton: () => import_hero_slider.HeroSliderSkeleton,
|
|
224
223
|
HiddenContentBanner: () => import_hidden_content_banner.HiddenContentBanner,
|
|
225
224
|
HomePage: () => import_home_page.HomePage,
|
|
226
225
|
IPTypeDisplay: () => import_ip_type_display.IPTypeDisplay,
|
|
@@ -693,7 +692,7 @@ var import_device_approval_dialog = require("./components/account/device-approva
|
|
|
693
692
|
var import_guardian_recovery_section = require("./components/account/guardian-recovery-section.js");
|
|
694
693
|
var import_add_guardian_dialog = require("./components/account/add-guardian-dialog.js");
|
|
695
694
|
var import_activity = require("./data/activity.js");
|
|
696
|
-
var
|
|
695
|
+
var import_collection_showcase = require("./components/collection-showcase.js");
|
|
697
696
|
var import_activity_ticker = require("./components/activity-ticker.js");
|
|
698
697
|
var import_listing_card = require("./components/listing-card.js");
|
|
699
698
|
var import_listings_grid = require("./components/listings-grid.js");
|
|
@@ -1012,6 +1011,7 @@ var import_asset_accents = require("./utils/asset-accents.js");
|
|
|
1012
1011
|
CollectionPicker,
|
|
1013
1012
|
CollectionProvenanceTab,
|
|
1014
1013
|
CollectionSettings,
|
|
1014
|
+
CollectionShowcase,
|
|
1015
1015
|
CollectionTypeChoices,
|
|
1016
1016
|
CollectionsLoading,
|
|
1017
1017
|
CollectionsPage,
|
|
@@ -1118,8 +1118,6 @@ var import_asset_accents = require("./utils/asset-accents.js");
|
|
|
1118
1118
|
GradientButton,
|
|
1119
1119
|
GuardianRecoverySection,
|
|
1120
1120
|
HelpIcon,
|
|
1121
|
-
HeroSlider,
|
|
1122
|
-
HeroSliderSkeleton,
|
|
1123
1121
|
HiddenContentBanner,
|
|
1124
1122
|
HomePage,
|
|
1125
1123
|
IPTypeDisplay,
|