@medialane/ui 0.322.0 → 0.324.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/button.d.cts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/collection-card.cjs +2 -3
- package/dist/components/collection-card.cjs.map +1 -1
- package/dist/components/collection-card.js +2 -3
- package/dist/components/collection-card.js.map +1 -1
- package/dist/components/collections-page.cjs +32 -26
- package/dist/components/collections-page.cjs.map +1 -1
- package/dist/components/collections-page.js +33 -27
- package/dist/components/collections-page.js.map +1 -1
- package/dist/components/currency-icon.cjs +7 -2
- package/dist/components/currency-icon.cjs.map +1 -1
- package/dist/components/currency-icon.d.cts +2 -1
- package/dist/components/currency-icon.d.ts +2 -1
- package/dist/components/currency-icon.js +5 -1
- package/dist/components/currency-icon.js.map +1 -1
- package/dist/components/discover-collections-strip.cjs +3 -2
- package/dist/components/discover-collections-strip.cjs.map +1 -1
- package/dist/components/discover-collections-strip.d.cts +2 -1
- package/dist/components/discover-collections-strip.d.ts +2 -1
- package/dist/components/discover-collections-strip.js +3 -2
- package/dist/components/discover-collections-strip.js.map +1 -1
- package/dist/components/discover-page.cjs +3 -1
- package/dist/components/discover-page.cjs.map +1 -1
- package/dist/components/discover-page.js +3 -1
- package/dist/components/discover-page.js.map +1 -1
- package/dist/components/fast-mint/fast-mint.d.cts +2 -2
- package/dist/components/fast-mint/fast-mint.d.ts +2 -2
- package/dist/components/featured-carousel.cjs +3 -21
- package/dist/components/featured-carousel.cjs.map +1 -1
- package/dist/components/featured-carousel.js +3 -21
- package/dist/components/featured-carousel.js.map +1 -1
- package/dist/components/ip-type-nav.cjs +2 -14
- package/dist/components/ip-type-nav.cjs.map +1 -1
- package/dist/components/ip-type-nav.js +3 -15
- package/dist/components/ip-type-nav.js.map +1 -1
- package/dist/components/listing-card.cjs +17 -12
- package/dist/components/listing-card.cjs.map +1 -1
- package/dist/components/listing-card.js +17 -12
- package/dist/components/listing-card.js.map +1 -1
- 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/package.json +1 -1
|
@@ -30,7 +30,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
var currency_icon_exports = {};
|
|
31
31
|
__export(currency_icon_exports, {
|
|
32
32
|
CurrencyAmount: () => CurrencyAmount,
|
|
33
|
-
CurrencyIcon: () => CurrencyIcon
|
|
33
|
+
CurrencyIcon: () => CurrencyIcon,
|
|
34
|
+
hasCurrencyIcon: () => hasCurrencyIcon
|
|
34
35
|
});
|
|
35
36
|
module.exports = __toCommonJS(currency_icon_exports);
|
|
36
37
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -43,6 +44,9 @@ const CURRENCY_ICON_PATHS = {
|
|
|
43
44
|
STRK: "/strk.svg",
|
|
44
45
|
WBTC: "/btc.svg"
|
|
45
46
|
};
|
|
47
|
+
function hasCurrencyIcon(symbol) {
|
|
48
|
+
return !!symbol && symbol in CURRENCY_ICON_PATHS;
|
|
49
|
+
}
|
|
46
50
|
function CurrencyIcon({ symbol, size = 16, className, iconsBasePath = "" }) {
|
|
47
51
|
const path = symbol ? CURRENCY_ICON_PATHS[symbol] : void 0;
|
|
48
52
|
if (!path) return null;
|
|
@@ -74,6 +78,7 @@ function CurrencyAmount({
|
|
|
74
78
|
// Annotate the CommonJS export names for ESM import in node:
|
|
75
79
|
0 && (module.exports = {
|
|
76
80
|
CurrencyAmount,
|
|
77
|
-
CurrencyIcon
|
|
81
|
+
CurrencyIcon,
|
|
82
|
+
hasCurrencyIcon
|
|
78
83
|
});
|
|
79
84
|
//# sourceMappingURL=currency-icon.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/currency-icon.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"./image.js\";\nimport { cn } from \"../utils/cn.js\";\n\nconst CURRENCY_ICON_PATHS: Record<string, string> = {\n USDC: \"/usdc.svg\",\n USDT: \"/usdt.svg\",\n ETH: \"/eth.svg\",\n STRK: \"/strk.svg\",\n WBTC: \"/btc.svg\",\n};\n\nexport interface CurrencyIconProps {\n symbol: string | null | undefined;\n size?: number;\n className?: string;\n\n iconsBasePath?: string;\n}\n\nexport function CurrencyIcon({ symbol, size = 16, className, iconsBasePath = \"\" }: CurrencyIconProps) {\n const path = symbol ? CURRENCY_ICON_PATHS[symbol] : undefined;\n if (!path) return null;\n return (\n <Image\n src={`${iconsBasePath}${path}`}\n alt={symbol ?? \"\"}\n width={size}\n height={size}\n className={cn(\"inline-block shrink-0\", className)}\n unoptimized\n />\n );\n}\n\nexport interface CurrencyAmountProps {\n amount: string;\n symbol: string | null | undefined;\n amountClassName?: string;\n iconSize?: number;\n className?: string;\n\n iconsBasePath?: string;\n}\n\nexport function CurrencyAmount({\n amount,\n symbol,\n amountClassName,\n iconSize = 14,\n className,\n iconsBasePath,\n}: CurrencyAmountProps) {\n return (\n <span className={cn(\"inline-flex items-center gap-1\", className)}>\n <CurrencyIcon symbol={symbol} size={iconSize} iconsBasePath={iconsBasePath} />\n <span className={amountClassName}>{amount}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["../../src/components/currency-icon.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"./image.js\";\nimport { cn } from \"../utils/cn.js\";\n\nconst CURRENCY_ICON_PATHS: Record<string, string> = {\n USDC: \"/usdc.svg\",\n USDT: \"/usdt.svg\",\n ETH: \"/eth.svg\",\n STRK: \"/strk.svg\",\n WBTC: \"/btc.svg\",\n};\n\nexport function hasCurrencyIcon(symbol: string | null | undefined): boolean {\n return !!symbol && symbol in CURRENCY_ICON_PATHS;\n}\n\nexport interface CurrencyIconProps {\n symbol: string | null | undefined;\n size?: number;\n className?: string;\n\n iconsBasePath?: string;\n}\n\nexport function CurrencyIcon({ symbol, size = 16, className, iconsBasePath = \"\" }: CurrencyIconProps) {\n const path = symbol ? CURRENCY_ICON_PATHS[symbol] : undefined;\n if (!path) return null;\n return (\n <Image\n src={`${iconsBasePath}${path}`}\n alt={symbol ?? \"\"}\n width={size}\n height={size}\n className={cn(\"inline-block shrink-0\", className)}\n unoptimized\n />\n );\n}\n\nexport interface CurrencyAmountProps {\n amount: string;\n symbol: string | null | undefined;\n amountClassName?: string;\n iconSize?: number;\n className?: string;\n\n iconsBasePath?: string;\n}\n\nexport function CurrencyAmount({\n amount,\n symbol,\n amountClassName,\n iconSize = 14,\n className,\n iconsBasePath,\n}: CurrencyAmountProps) {\n return (\n <span className={cn(\"inline-flex items-center gap-1\", className)}>\n <CurrencyIcon symbol={symbol} size={iconSize} iconsBasePath={iconsBasePath} />\n <span className={amountClassName}>{amount}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BI;AA3BJ,mBAAkB;AAClB,gBAAmB;AAEnB,MAAM,sBAA8C;AAAA,EAClD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AACR;AAEO,SAAS,gBAAgB,QAA4C;AAC1E,SAAO,CAAC,CAAC,UAAU,UAAU;AAC/B;AAUO,SAAS,aAAa,EAAE,QAAQ,OAAO,IAAI,WAAW,gBAAgB,GAAG,GAAsB;AACpG,QAAM,OAAO,SAAS,oBAAoB,MAAM,IAAI;AACpD,MAAI,CAAC,KAAM,QAAO;AAClB,SACE;AAAA,IAAC,aAAAA;AAAA,IAAA;AAAA,MACC,KAAK,GAAG,aAAa,GAAG,IAAI;AAAA,MAC5B,KAAK,UAAU;AAAA,MACf,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,eAAW,cAAG,yBAAyB,SAAS;AAAA,MAChD,aAAW;AAAA;AAAA,EACb;AAEJ;AAYO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AACF,GAAwB;AACtB,SACE,6CAAC,UAAK,eAAW,cAAG,kCAAkC,SAAS,GAC7D;AAAA,gDAAC,gBAAa,QAAgB,MAAM,UAAU,eAA8B;AAAA,IAC5E,4CAAC,UAAK,WAAW,iBAAkB,kBAAO;AAAA,KAC5C;AAEJ;","names":["Image"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
+
declare function hasCurrencyIcon(symbol: string | null | undefined): boolean;
|
|
3
4
|
interface CurrencyIconProps {
|
|
4
5
|
symbol: string | null | undefined;
|
|
5
6
|
size?: number;
|
|
@@ -17,4 +18,4 @@ interface CurrencyAmountProps {
|
|
|
17
18
|
}
|
|
18
19
|
declare function CurrencyAmount({ amount, symbol, amountClassName, iconSize, className, iconsBasePath, }: CurrencyAmountProps): react_jsx_runtime.JSX.Element;
|
|
19
20
|
|
|
20
|
-
export { CurrencyAmount, type CurrencyAmountProps, CurrencyIcon, type CurrencyIconProps };
|
|
21
|
+
export { CurrencyAmount, type CurrencyAmountProps, CurrencyIcon, type CurrencyIconProps, hasCurrencyIcon };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
+
declare function hasCurrencyIcon(symbol: string | null | undefined): boolean;
|
|
3
4
|
interface CurrencyIconProps {
|
|
4
5
|
symbol: string | null | undefined;
|
|
5
6
|
size?: number;
|
|
@@ -17,4 +18,4 @@ interface CurrencyAmountProps {
|
|
|
17
18
|
}
|
|
18
19
|
declare function CurrencyAmount({ amount, symbol, amountClassName, iconSize, className, iconsBasePath, }: CurrencyAmountProps): react_jsx_runtime.JSX.Element;
|
|
19
20
|
|
|
20
|
-
export { CurrencyAmount, type CurrencyAmountProps, CurrencyIcon, type CurrencyIconProps };
|
|
21
|
+
export { CurrencyAmount, type CurrencyAmountProps, CurrencyIcon, type CurrencyIconProps, hasCurrencyIcon };
|
|
@@ -9,6 +9,9 @@ const CURRENCY_ICON_PATHS = {
|
|
|
9
9
|
STRK: "/strk.svg",
|
|
10
10
|
WBTC: "/btc.svg"
|
|
11
11
|
};
|
|
12
|
+
function hasCurrencyIcon(symbol) {
|
|
13
|
+
return !!symbol && symbol in CURRENCY_ICON_PATHS;
|
|
14
|
+
}
|
|
12
15
|
function CurrencyIcon({ symbol, size = 16, className, iconsBasePath = "" }) {
|
|
13
16
|
const path = symbol ? CURRENCY_ICON_PATHS[symbol] : void 0;
|
|
14
17
|
if (!path) return null;
|
|
@@ -39,6 +42,7 @@ function CurrencyAmount({
|
|
|
39
42
|
}
|
|
40
43
|
export {
|
|
41
44
|
CurrencyAmount,
|
|
42
|
-
CurrencyIcon
|
|
45
|
+
CurrencyIcon,
|
|
46
|
+
hasCurrencyIcon
|
|
43
47
|
};
|
|
44
48
|
//# sourceMappingURL=currency-icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/currency-icon.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"./image.js\";\nimport { cn } from \"../utils/cn.js\";\n\nconst CURRENCY_ICON_PATHS: Record<string, string> = {\n USDC: \"/usdc.svg\",\n USDT: \"/usdt.svg\",\n ETH: \"/eth.svg\",\n STRK: \"/strk.svg\",\n WBTC: \"/btc.svg\",\n};\n\nexport interface CurrencyIconProps {\n symbol: string | null | undefined;\n size?: number;\n className?: string;\n\n iconsBasePath?: string;\n}\n\nexport function CurrencyIcon({ symbol, size = 16, className, iconsBasePath = \"\" }: CurrencyIconProps) {\n const path = symbol ? CURRENCY_ICON_PATHS[symbol] : undefined;\n if (!path) return null;\n return (\n <Image\n src={`${iconsBasePath}${path}`}\n alt={symbol ?? \"\"}\n width={size}\n height={size}\n className={cn(\"inline-block shrink-0\", className)}\n unoptimized\n />\n );\n}\n\nexport interface CurrencyAmountProps {\n amount: string;\n symbol: string | null | undefined;\n amountClassName?: string;\n iconSize?: number;\n className?: string;\n\n iconsBasePath?: string;\n}\n\nexport function CurrencyAmount({\n amount,\n symbol,\n amountClassName,\n iconSize = 14,\n className,\n iconsBasePath,\n}: CurrencyAmountProps) {\n return (\n <span className={cn(\"inline-flex items-center gap-1\", className)}>\n <CurrencyIcon symbol={symbol} size={iconSize} iconsBasePath={iconsBasePath} />\n <span className={amountClassName}>{amount}</span>\n </span>\n );\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../../src/components/currency-icon.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"./image.js\";\nimport { cn } from \"../utils/cn.js\";\n\nconst CURRENCY_ICON_PATHS: Record<string, string> = {\n USDC: \"/usdc.svg\",\n USDT: \"/usdt.svg\",\n ETH: \"/eth.svg\",\n STRK: \"/strk.svg\",\n WBTC: \"/btc.svg\",\n};\n\nexport function hasCurrencyIcon(symbol: string | null | undefined): boolean {\n return !!symbol && symbol in CURRENCY_ICON_PATHS;\n}\n\nexport interface CurrencyIconProps {\n symbol: string | null | undefined;\n size?: number;\n className?: string;\n\n iconsBasePath?: string;\n}\n\nexport function CurrencyIcon({ symbol, size = 16, className, iconsBasePath = \"\" }: CurrencyIconProps) {\n const path = symbol ? CURRENCY_ICON_PATHS[symbol] : undefined;\n if (!path) return null;\n return (\n <Image\n src={`${iconsBasePath}${path}`}\n alt={symbol ?? \"\"}\n width={size}\n height={size}\n className={cn(\"inline-block shrink-0\", className)}\n unoptimized\n />\n );\n}\n\nexport interface CurrencyAmountProps {\n amount: string;\n symbol: string | null | undefined;\n amountClassName?: string;\n iconSize?: number;\n className?: string;\n\n iconsBasePath?: string;\n}\n\nexport function CurrencyAmount({\n amount,\n symbol,\n amountClassName,\n iconSize = 14,\n className,\n iconsBasePath,\n}: CurrencyAmountProps) {\n return (\n <span className={cn(\"inline-flex items-center gap-1\", className)}>\n <CurrencyIcon symbol={symbol} size={iconSize} iconsBasePath={iconsBasePath} />\n <span className={amountClassName}>{amount}</span>\n </span>\n );\n}\n"],"mappings":";AA6BI,cA8BA,YA9BA;AA3BJ,OAAO,WAAW;AAClB,SAAS,UAAU;AAEnB,MAAM,sBAA8C;AAAA,EAClD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AACR;AAEO,SAAS,gBAAgB,QAA4C;AAC1E,SAAO,CAAC,CAAC,UAAU,UAAU;AAC/B;AAUO,SAAS,aAAa,EAAE,QAAQ,OAAO,IAAI,WAAW,gBAAgB,GAAG,GAAsB;AACpG,QAAM,OAAO,SAAS,oBAAoB,MAAM,IAAI;AACpD,MAAI,CAAC,KAAM,QAAO;AAClB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK,GAAG,aAAa,GAAG,IAAI;AAAA,MAC5B,KAAK,UAAU;AAAA,MACf,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,WAAW,GAAG,yBAAyB,SAAS;AAAA,MAChD,aAAW;AAAA;AAAA,EACb;AAEJ;AAYO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AACF,GAAwB;AACtB,SACE,qBAAC,UAAK,WAAW,GAAG,kCAAkC,SAAS,GAC7D;AAAA,wBAAC,gBAAa,QAAgB,MAAM,UAAU,eAA8B;AAAA,IAC5E,oBAAC,UAAK,WAAW,iBAAkB,kBAAO;AAAA,KAC5C;AAEJ;","names":[]}
|
|
@@ -30,12 +30,13 @@ function DiscoverCollectionsStrip({
|
|
|
30
30
|
collections,
|
|
31
31
|
isLoading,
|
|
32
32
|
allCollectionsHref = "/collections",
|
|
33
|
-
title = "Collections"
|
|
33
|
+
title = "Collections",
|
|
34
|
+
icon = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Layers, {})
|
|
34
35
|
}) {
|
|
35
36
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
36
37
|
import_scroll_section.ScrollSection,
|
|
37
38
|
{
|
|
38
|
-
icon
|
|
39
|
+
icon,
|
|
39
40
|
title,
|
|
40
41
|
href: allCollectionsHref,
|
|
41
42
|
linkLabel: "View all",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/discover-collections-strip.tsx"],"sourcesContent":["\"use client\";\n\nimport { Layers } from \"lucide-react\";\nimport { ScrollSection } from \"./scroll-section.js\";\nimport { CollectionCard, CollectionCardSkeleton } from \"./collection-card.js\";\nimport type { ApiCollection } from \"@medialane/sdk\";\n\nexport interface DiscoverCollectionsStripProps {\n collections: ApiCollection[];\n isLoading: boolean;\n\n getHref?: (collection: ApiCollection) => string;\n allCollectionsHref?: string;\n\n sectionLabel?: string;\n title?: string;\n}\n\nexport function DiscoverCollectionsStrip({\n collections,\n isLoading,\n allCollectionsHref = \"/collections\",\n title = \"Collections\",\n}: DiscoverCollectionsStripProps) {\n return (\n <ScrollSection\n icon={
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-collections-strip.tsx"],"sourcesContent":["\"use client\";\n\nimport { Layers } from \"lucide-react\";\nimport { ScrollSection } from \"./scroll-section.js\";\nimport { CollectionCard, CollectionCardSkeleton } from \"./collection-card.js\";\nimport type { ApiCollection } from \"@medialane/sdk\";\n\nexport interface DiscoverCollectionsStripProps {\n collections: ApiCollection[];\n isLoading: boolean;\n\n getHref?: (collection: ApiCollection) => string;\n allCollectionsHref?: string;\n\n sectionLabel?: string;\n title?: string;\n icon?: React.ReactNode;\n}\n\nexport function DiscoverCollectionsStrip({\n collections,\n isLoading,\n allCollectionsHref = \"/collections\",\n title = \"Collections\",\n icon = <Layers />,\n}: DiscoverCollectionsStripProps) {\n return (\n <ScrollSection\n icon={icon}\n title={title}\n href={allCollectionsHref}\n linkLabel=\"View all\"\n >\n {isLoading\n ? Array.from({ length: 5 }).map((_, i) => (\n <div key={i} className=\"w-56 sm:w-64 snap-start shrink-0\">\n <CollectionCardSkeleton />\n </div>\n ))\n : collections.map((col) => (\n <div key={col.contractAddress} className=\"w-56 sm:w-64 snap-start shrink-0\">\n <CollectionCard collection={col} />\n </div>\n ))}\n </ScrollSection>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBS;AAtBT,0BAAuB;AACvB,4BAA8B;AAC9B,6BAAuD;AAehD,SAAS,yBAAyB;AAAA,EACvC;AAAA,EACA;AAAA,EACA,qBAAqB;AAAA,EACrB,QAAQ;AAAA,EACR,OAAO,4CAAC,8BAAO;AACjB,GAAkC;AAChC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACN,WAAU;AAAA,MAET,sBACG,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAChC,4CAAC,SAAY,WAAU,oCACrB,sDAAC,iDAAuB,KADhB,CAEV,CACD,IACD,YAAY,IAAI,CAAC,QACf,4CAAC,SAA8B,WAAU,oCACvC,sDAAC,yCAAe,YAAY,KAAK,KADzB,IAAI,eAEd,CACD;AAAA;AAAA,EACP;AAEJ;","names":[]}
|
|
@@ -8,7 +8,8 @@ interface DiscoverCollectionsStripProps {
|
|
|
8
8
|
allCollectionsHref?: string;
|
|
9
9
|
sectionLabel?: string;
|
|
10
10
|
title?: string;
|
|
11
|
+
icon?: React.ReactNode;
|
|
11
12
|
}
|
|
12
|
-
declare function DiscoverCollectionsStrip({ collections, isLoading, allCollectionsHref, title, }: DiscoverCollectionsStripProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
declare function DiscoverCollectionsStrip({ collections, isLoading, allCollectionsHref, title, icon, }: DiscoverCollectionsStripProps): react_jsx_runtime.JSX.Element;
|
|
13
14
|
|
|
14
15
|
export { DiscoverCollectionsStrip, type DiscoverCollectionsStripProps };
|
|
@@ -8,7 +8,8 @@ interface DiscoverCollectionsStripProps {
|
|
|
8
8
|
allCollectionsHref?: string;
|
|
9
9
|
sectionLabel?: string;
|
|
10
10
|
title?: string;
|
|
11
|
+
icon?: React.ReactNode;
|
|
11
12
|
}
|
|
12
|
-
declare function DiscoverCollectionsStrip({ collections, isLoading, allCollectionsHref, title, }: DiscoverCollectionsStripProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
declare function DiscoverCollectionsStrip({ collections, isLoading, allCollectionsHref, title, icon, }: DiscoverCollectionsStripProps): react_jsx_runtime.JSX.Element;
|
|
13
14
|
|
|
14
15
|
export { DiscoverCollectionsStrip, type DiscoverCollectionsStripProps };
|
|
@@ -7,12 +7,13 @@ function DiscoverCollectionsStrip({
|
|
|
7
7
|
collections,
|
|
8
8
|
isLoading,
|
|
9
9
|
allCollectionsHref = "/collections",
|
|
10
|
-
title = "Collections"
|
|
10
|
+
title = "Collections",
|
|
11
|
+
icon = /* @__PURE__ */ jsx(Layers, {})
|
|
11
12
|
}) {
|
|
12
13
|
return /* @__PURE__ */ jsx(
|
|
13
14
|
ScrollSection,
|
|
14
15
|
{
|
|
15
|
-
icon
|
|
16
|
+
icon,
|
|
16
17
|
title,
|
|
17
18
|
href: allCollectionsHref,
|
|
18
19
|
linkLabel: "View all",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/discover-collections-strip.tsx"],"sourcesContent":["\"use client\";\n\nimport { Layers } from \"lucide-react\";\nimport { ScrollSection } from \"./scroll-section.js\";\nimport { CollectionCard, CollectionCardSkeleton } from \"./collection-card.js\";\nimport type { ApiCollection } from \"@medialane/sdk\";\n\nexport interface DiscoverCollectionsStripProps {\n collections: ApiCollection[];\n isLoading: boolean;\n\n getHref?: (collection: ApiCollection) => string;\n allCollectionsHref?: string;\n\n sectionLabel?: string;\n title?: string;\n}\n\nexport function DiscoverCollectionsStrip({\n collections,\n isLoading,\n allCollectionsHref = \"/collections\",\n title = \"Collections\",\n}: DiscoverCollectionsStripProps) {\n return (\n <ScrollSection\n icon={
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-collections-strip.tsx"],"sourcesContent":["\"use client\";\n\nimport { Layers } from \"lucide-react\";\nimport { ScrollSection } from \"./scroll-section.js\";\nimport { CollectionCard, CollectionCardSkeleton } from \"./collection-card.js\";\nimport type { ApiCollection } from \"@medialane/sdk\";\n\nexport interface DiscoverCollectionsStripProps {\n collections: ApiCollection[];\n isLoading: boolean;\n\n getHref?: (collection: ApiCollection) => string;\n allCollectionsHref?: string;\n\n sectionLabel?: string;\n title?: string;\n icon?: React.ReactNode;\n}\n\nexport function DiscoverCollectionsStrip({\n collections,\n isLoading,\n allCollectionsHref = \"/collections\",\n title = \"Collections\",\n icon = <Layers />,\n}: DiscoverCollectionsStripProps) {\n return (\n <ScrollSection\n icon={icon}\n title={title}\n href={allCollectionsHref}\n linkLabel=\"View all\"\n >\n {isLoading\n ? Array.from({ length: 5 }).map((_, i) => (\n <div key={i} className=\"w-56 sm:w-64 snap-start shrink-0\">\n <CollectionCardSkeleton />\n </div>\n ))\n : collections.map((col) => (\n <div key={col.contractAddress} className=\"w-56 sm:w-64 snap-start shrink-0\">\n <CollectionCard collection={col} />\n </div>\n ))}\n </ScrollSection>\n );\n}\n"],"mappings":";AAwBS;AAtBT,SAAS,cAAc;AACvB,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB,8BAA8B;AAehD,SAAS,yBAAyB;AAAA,EACvC;AAAA,EACA;AAAA,EACA,qBAAqB;AAAA,EACrB,QAAQ;AAAA,EACR,OAAO,oBAAC,UAAO;AACjB,GAAkC;AAChC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACN,WAAU;AAAA,MAET,sBACG,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAChC,oBAAC,SAAY,WAAU,oCACrB,8BAAC,0BAAuB,KADhB,CAEV,CACD,IACD,YAAY,IAAI,CAAC,QACf,oBAAC,SAA8B,WAAU,oCACvC,8BAAC,kBAAe,YAAY,KAAK,KADzB,IAAI,eAEd,CACD;AAAA;AAAA,EACP;AAEJ;","names":[]}
|
|
@@ -24,6 +24,7 @@ __export(discover_page_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(discover_page_exports);
|
|
25
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
26
|
var import_sdk = require("@medialane/sdk");
|
|
27
|
+
var import_lucide_react = require("lucide-react");
|
|
27
28
|
var import_page_container = require("./page-container.js");
|
|
28
29
|
var import_discover_hero = require("./discover-hero.js");
|
|
29
30
|
var import_discover_collections_strip = require("./discover-collections-strip.js");
|
|
@@ -63,7 +64,8 @@ function DiscoverPage({ useMarketActions, heroBadge, heroHeadline }) {
|
|
|
63
64
|
isLoading: featuredLoading,
|
|
64
65
|
getHref: (c) => (0, import_sdk.collectionHref)("STARKNET", c.contractAddress),
|
|
65
66
|
allCollectionsHref: "/collections",
|
|
66
|
-
title: "Featured"
|
|
67
|
+
title: "Featured",
|
|
68
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, {})
|
|
67
69
|
}
|
|
68
70
|
),
|
|
69
71
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/discover-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { assetHref, collectionHref } from \"@medialane/sdk\";\nimport { PageContainer } from \"./page-container.js\";\nimport { DiscoverHero } from \"./discover-hero.js\";\nimport { DiscoverCollectionsStrip } from \"./discover-collections-strip.js\";\nimport { DiscoverActivityStrip } from \"./discover-feed-section.js\";\nimport { DiscoverCommunitySection } from \"./discover-community-section.js\";\nimport { IpTypeNav } from \"./ip-type-nav.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 { usePlatformStats } from \"../utils/use-platform-stats.js\";\nimport { isSameAddress } from \"../utils/same-address.js\";\n\nexport interface DiscoverPageProps {\n useMarketActions: () => CollectionMarketActions;\n heroBadge?: string;\n heroHeadline?: string;\n}\n\nexport function DiscoverPage({ useMarketActions, heroBadge, heroHeadline }: DiscoverPageProps) {\n const { walletAddress } = useMedialaneApp();\n const market = useMarketActions();\n const { stats } = usePlatformStats();\n const { orders: tickerOrders } = useOrders({ status: \"ACTIVE\", sort: \"recent\", limit: 14 });\n const { orders: feedOrders, isLoading: feedLoading } = useOrders({ status: \"ACTIVE\", sort: \"recent\", limit: 10 });\n const { collections: featured, isLoading: featuredLoading } = useCollections(1, 8, true);\n const { collections, isLoading: collectionsLoading } = useCollections(1, 8);\n\n return (\n <PageContainer className=\"box-border max-w-full space-y-14 px-4 pt-20 sm:space-y-20 sm:px-5 lg:px-6\">\n <div className=\"space-y-8 sm:space-y-10\">\n <DiscoverHero\n stats={stats ?? null}\n orders={tickerOrders}\n badgeText={heroBadge}\n headlineText={heroHeadline}\n getTickerHref={(o) => assetHref(\"STARKNET\", o.nftContract, o.nftTokenId)}\n />\n <div className=\"space-y-14 sm:space-y-20\">\n {(featuredLoading || featured.length > 0) && (\n <DiscoverCollectionsStrip\n collections={featured}\n isLoading={featuredLoading}\n getHref={(c) => collectionHref(\"STARKNET\", c.contractAddress)}\n allCollectionsHref=\"/collections\"\n title=\"Featured\"\n />\n )}\n <DiscoverCollectionsStrip\n collections={collections}\n isLoading={collectionsLoading}\n getHref={(c) => collectionHref(\"STARKNET\", c.contractAddress)}\n allCollectionsHref=\"/collections\"\n />\n </div>\n </div>\n <DiscoverActivityStrip\n orders={feedOrders}\n isLoading={feedLoading}\n marketplaceHref=\"/marketplace\"\n onBuyOrder={market.buy}\n isOwnOrder={(o) => !!walletAddress && !!o.offerer && isSameAddress(o.offerer, walletAddress)}\n />\n <IpTypeNav />\n <DiscoverCommunitySection />\n {market.dialogs}\n </PageContainer>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { assetHref, collectionHref } from \"@medialane/sdk\";\nimport { Sparkles } from \"lucide-react\";\nimport { PageContainer } from \"./page-container.js\";\nimport { DiscoverHero } from \"./discover-hero.js\";\nimport { DiscoverCollectionsStrip } from \"./discover-collections-strip.js\";\nimport { DiscoverActivityStrip } from \"./discover-feed-section.js\";\nimport { DiscoverCommunitySection } from \"./discover-community-section.js\";\nimport { IpTypeNav } from \"./ip-type-nav.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 { usePlatformStats } from \"../utils/use-platform-stats.js\";\nimport { isSameAddress } from \"../utils/same-address.js\";\n\nexport interface DiscoverPageProps {\n useMarketActions: () => CollectionMarketActions;\n heroBadge?: string;\n heroHeadline?: string;\n}\n\nexport function DiscoverPage({ useMarketActions, heroBadge, heroHeadline }: DiscoverPageProps) {\n const { walletAddress } = useMedialaneApp();\n const market = useMarketActions();\n const { stats } = usePlatformStats();\n const { orders: tickerOrders } = useOrders({ status: \"ACTIVE\", sort: \"recent\", limit: 14 });\n const { orders: feedOrders, isLoading: feedLoading } = useOrders({ status: \"ACTIVE\", sort: \"recent\", limit: 10 });\n const { collections: featured, isLoading: featuredLoading } = useCollections(1, 8, true);\n const { collections, isLoading: collectionsLoading } = useCollections(1, 8);\n\n return (\n <PageContainer className=\"box-border max-w-full space-y-14 px-4 pt-20 sm:space-y-20 sm:px-5 lg:px-6\">\n <div className=\"space-y-8 sm:space-y-10\">\n <DiscoverHero\n stats={stats ?? null}\n orders={tickerOrders}\n badgeText={heroBadge}\n headlineText={heroHeadline}\n getTickerHref={(o) => assetHref(\"STARKNET\", o.nftContract, o.nftTokenId)}\n />\n <div className=\"space-y-14 sm:space-y-20\">\n {(featuredLoading || featured.length > 0) && (\n <DiscoverCollectionsStrip\n collections={featured}\n isLoading={featuredLoading}\n getHref={(c) => collectionHref(\"STARKNET\", c.contractAddress)}\n allCollectionsHref=\"/collections\"\n title=\"Featured\"\n icon={<Sparkles />}\n />\n )}\n <DiscoverCollectionsStrip\n collections={collections}\n isLoading={collectionsLoading}\n getHref={(c) => collectionHref(\"STARKNET\", c.contractAddress)}\n allCollectionsHref=\"/collections\"\n />\n </div>\n </div>\n <DiscoverActivityStrip\n orders={feedOrders}\n isLoading={feedLoading}\n marketplaceHref=\"/marketplace\"\n onBuyOrder={market.buy}\n isOwnOrder={(o) => !!walletAddress && !!o.offerer && isSameAddress(o.offerer, walletAddress)}\n />\n <IpTypeNav />\n <DiscoverCommunitySection />\n {market.dialogs}\n </PageContainer>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmCQ;AAjCR,iBAA0C;AAC1C,0BAAyB;AACzB,4BAA8B;AAC9B,2BAA6B;AAC7B,wCAAyC;AACzC,mCAAsC;AACtC,wCAAyC;AACzC,yBAA0B;AAC1B,2BAAgC;AAEhC,wBAA0B;AAC1B,6BAA+B;AAC/B,gCAAiC;AACjC,0BAA8B;AAQvB,SAAS,aAAa,EAAE,kBAAkB,WAAW,aAAa,GAAsB;AAC7F,QAAM,EAAE,cAAc,QAAI,sCAAgB;AAC1C,QAAM,SAAS,iBAAiB;AAChC,QAAM,EAAE,MAAM,QAAI,4CAAiB;AACnC,QAAM,EAAE,QAAQ,aAAa,QAAI,6BAAU,EAAE,QAAQ,UAAU,MAAM,UAAU,OAAO,GAAG,CAAC;AAC1F,QAAM,EAAE,QAAQ,YAAY,WAAW,YAAY,QAAI,6BAAU,EAAE,QAAQ,UAAU,MAAM,UAAU,OAAO,GAAG,CAAC;AAChH,QAAM,EAAE,aAAa,UAAU,WAAW,gBAAgB,QAAI,uCAAe,GAAG,GAAG,IAAI;AACvF,QAAM,EAAE,aAAa,WAAW,mBAAmB,QAAI,uCAAe,GAAG,CAAC;AAE1E,SACE,6CAAC,uCAAc,WAAU,6EACvB;AAAA,iDAAC,SAAI,WAAU,2BACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,SAAS;AAAA,UAChB,QAAQ;AAAA,UACR,WAAW;AAAA,UACX,cAAc;AAAA,UACd,eAAe,CAAC,UAAM,sBAAU,YAAY,EAAE,aAAa,EAAE,UAAU;AAAA;AAAA,MACzE;AAAA,MACA,6CAAC,SAAI,WAAU,4BACX;AAAA,4BAAmB,SAAS,SAAS,MACrC;AAAA,UAAC;AAAA;AAAA,YACC,aAAa;AAAA,YACb,WAAW;AAAA,YACX,SAAS,CAAC,UAAM,2BAAe,YAAY,EAAE,eAAe;AAAA,YAC5D,oBAAmB;AAAA,YACnB,OAAM;AAAA,YACN,MAAM,4CAAC,gCAAS;AAAA;AAAA,QAClB;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,WAAW;AAAA,YACX,SAAS,CAAC,UAAM,2BAAe,YAAY,EAAE,eAAe;AAAA,YAC5D,oBAAmB;AAAA;AAAA,QACrB;AAAA,SACF;AAAA,OACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,iBAAgB;AAAA,QAChB,YAAY,OAAO;AAAA,QACnB,YAAY,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,EAAE,eAAW,mCAAc,EAAE,SAAS,aAAa;AAAA;AAAA,IAC7F;AAAA,IACA,4CAAC,gCAAU;AAAA,IACX,4CAAC,8DAAyB;AAAA,IACzB,OAAO;AAAA,KACV;AAEJ;","names":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { assetHref, collectionHref } from "@medialane/sdk";
|
|
4
|
+
import { Sparkles } from "lucide-react";
|
|
4
5
|
import { PageContainer } from "./page-container.js";
|
|
5
6
|
import { DiscoverHero } from "./discover-hero.js";
|
|
6
7
|
import { DiscoverCollectionsStrip } from "./discover-collections-strip.js";
|
|
@@ -40,7 +41,8 @@ function DiscoverPage({ useMarketActions, heroBadge, heroHeadline }) {
|
|
|
40
41
|
isLoading: featuredLoading,
|
|
41
42
|
getHref: (c) => collectionHref("STARKNET", c.contractAddress),
|
|
42
43
|
allCollectionsHref: "/collections",
|
|
43
|
-
title: "Featured"
|
|
44
|
+
title: "Featured",
|
|
45
|
+
icon: /* @__PURE__ */ jsx(Sparkles, {})
|
|
44
46
|
}
|
|
45
47
|
),
|
|
46
48
|
/* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/discover-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { assetHref, collectionHref } from \"@medialane/sdk\";\nimport { PageContainer } from \"./page-container.js\";\nimport { DiscoverHero } from \"./discover-hero.js\";\nimport { DiscoverCollectionsStrip } from \"./discover-collections-strip.js\";\nimport { DiscoverActivityStrip } from \"./discover-feed-section.js\";\nimport { DiscoverCommunitySection } from \"./discover-community-section.js\";\nimport { IpTypeNav } from \"./ip-type-nav.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 { usePlatformStats } from \"../utils/use-platform-stats.js\";\nimport { isSameAddress } from \"../utils/same-address.js\";\n\nexport interface DiscoverPageProps {\n useMarketActions: () => CollectionMarketActions;\n heroBadge?: string;\n heroHeadline?: string;\n}\n\nexport function DiscoverPage({ useMarketActions, heroBadge, heroHeadline }: DiscoverPageProps) {\n const { walletAddress } = useMedialaneApp();\n const market = useMarketActions();\n const { stats } = usePlatformStats();\n const { orders: tickerOrders } = useOrders({ status: \"ACTIVE\", sort: \"recent\", limit: 14 });\n const { orders: feedOrders, isLoading: feedLoading } = useOrders({ status: \"ACTIVE\", sort: \"recent\", limit: 10 });\n const { collections: featured, isLoading: featuredLoading } = useCollections(1, 8, true);\n const { collections, isLoading: collectionsLoading } = useCollections(1, 8);\n\n return (\n <PageContainer className=\"box-border max-w-full space-y-14 px-4 pt-20 sm:space-y-20 sm:px-5 lg:px-6\">\n <div className=\"space-y-8 sm:space-y-10\">\n <DiscoverHero\n stats={stats ?? null}\n orders={tickerOrders}\n badgeText={heroBadge}\n headlineText={heroHeadline}\n getTickerHref={(o) => assetHref(\"STARKNET\", o.nftContract, o.nftTokenId)}\n />\n <div className=\"space-y-14 sm:space-y-20\">\n {(featuredLoading || featured.length > 0) && (\n <DiscoverCollectionsStrip\n collections={featured}\n isLoading={featuredLoading}\n getHref={(c) => collectionHref(\"STARKNET\", c.contractAddress)}\n allCollectionsHref=\"/collections\"\n title=\"Featured\"\n />\n )}\n <DiscoverCollectionsStrip\n collections={collections}\n isLoading={collectionsLoading}\n getHref={(c) => collectionHref(\"STARKNET\", c.contractAddress)}\n allCollectionsHref=\"/collections\"\n />\n </div>\n </div>\n <DiscoverActivityStrip\n orders={feedOrders}\n isLoading={feedLoading}\n marketplaceHref=\"/marketplace\"\n onBuyOrder={market.buy}\n isOwnOrder={(o) => !!walletAddress && !!o.offerer && isSameAddress(o.offerer, walletAddress)}\n />\n <IpTypeNav />\n <DiscoverCommunitySection />\n {market.dialogs}\n </PageContainer>\n );\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { assetHref, collectionHref } from \"@medialane/sdk\";\nimport { Sparkles } from \"lucide-react\";\nimport { PageContainer } from \"./page-container.js\";\nimport { DiscoverHero } from \"./discover-hero.js\";\nimport { DiscoverCollectionsStrip } from \"./discover-collections-strip.js\";\nimport { DiscoverActivityStrip } from \"./discover-feed-section.js\";\nimport { DiscoverCommunitySection } from \"./discover-community-section.js\";\nimport { IpTypeNav } from \"./ip-type-nav.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 { usePlatformStats } from \"../utils/use-platform-stats.js\";\nimport { isSameAddress } from \"../utils/same-address.js\";\n\nexport interface DiscoverPageProps {\n useMarketActions: () => CollectionMarketActions;\n heroBadge?: string;\n heroHeadline?: string;\n}\n\nexport function DiscoverPage({ useMarketActions, heroBadge, heroHeadline }: DiscoverPageProps) {\n const { walletAddress } = useMedialaneApp();\n const market = useMarketActions();\n const { stats } = usePlatformStats();\n const { orders: tickerOrders } = useOrders({ status: \"ACTIVE\", sort: \"recent\", limit: 14 });\n const { orders: feedOrders, isLoading: feedLoading } = useOrders({ status: \"ACTIVE\", sort: \"recent\", limit: 10 });\n const { collections: featured, isLoading: featuredLoading } = useCollections(1, 8, true);\n const { collections, isLoading: collectionsLoading } = useCollections(1, 8);\n\n return (\n <PageContainer className=\"box-border max-w-full space-y-14 px-4 pt-20 sm:space-y-20 sm:px-5 lg:px-6\">\n <div className=\"space-y-8 sm:space-y-10\">\n <DiscoverHero\n stats={stats ?? null}\n orders={tickerOrders}\n badgeText={heroBadge}\n headlineText={heroHeadline}\n getTickerHref={(o) => assetHref(\"STARKNET\", o.nftContract, o.nftTokenId)}\n />\n <div className=\"space-y-14 sm:space-y-20\">\n {(featuredLoading || featured.length > 0) && (\n <DiscoverCollectionsStrip\n collections={featured}\n isLoading={featuredLoading}\n getHref={(c) => collectionHref(\"STARKNET\", c.contractAddress)}\n allCollectionsHref=\"/collections\"\n title=\"Featured\"\n icon={<Sparkles />}\n />\n )}\n <DiscoverCollectionsStrip\n collections={collections}\n isLoading={collectionsLoading}\n getHref={(c) => collectionHref(\"STARKNET\", c.contractAddress)}\n allCollectionsHref=\"/collections\"\n />\n </div>\n </div>\n <DiscoverActivityStrip\n orders={feedOrders}\n isLoading={feedLoading}\n marketplaceHref=\"/marketplace\"\n onBuyOrder={market.buy}\n isOwnOrder={(o) => !!walletAddress && !!o.offerer && isSameAddress(o.offerer, walletAddress)}\n />\n <IpTypeNav />\n <DiscoverCommunitySection />\n {market.dialogs}\n </PageContainer>\n );\n}\n"],"mappings":";AAmCQ,cAOA,YAPA;AAjCR,SAAS,WAAW,sBAAsB;AAC1C,SAAS,gBAAgB;AACzB,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,gCAAgC;AACzC,SAAS,6BAA6B;AACtC,SAAS,gCAAgC;AACzC,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAEhC,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AACjC,SAAS,qBAAqB;AAQvB,SAAS,aAAa,EAAE,kBAAkB,WAAW,aAAa,GAAsB;AAC7F,QAAM,EAAE,cAAc,IAAI,gBAAgB;AAC1C,QAAM,SAAS,iBAAiB;AAChC,QAAM,EAAE,MAAM,IAAI,iBAAiB;AACnC,QAAM,EAAE,QAAQ,aAAa,IAAI,UAAU,EAAE,QAAQ,UAAU,MAAM,UAAU,OAAO,GAAG,CAAC;AAC1F,QAAM,EAAE,QAAQ,YAAY,WAAW,YAAY,IAAI,UAAU,EAAE,QAAQ,UAAU,MAAM,UAAU,OAAO,GAAG,CAAC;AAChH,QAAM,EAAE,aAAa,UAAU,WAAW,gBAAgB,IAAI,eAAe,GAAG,GAAG,IAAI;AACvF,QAAM,EAAE,aAAa,WAAW,mBAAmB,IAAI,eAAe,GAAG,CAAC;AAE1E,SACE,qBAAC,iBAAc,WAAU,6EACvB;AAAA,yBAAC,SAAI,WAAU,2BACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,SAAS;AAAA,UAChB,QAAQ;AAAA,UACR,WAAW;AAAA,UACX,cAAc;AAAA,UACd,eAAe,CAAC,MAAM,UAAU,YAAY,EAAE,aAAa,EAAE,UAAU;AAAA;AAAA,MACzE;AAAA,MACA,qBAAC,SAAI,WAAU,4BACX;AAAA,4BAAmB,SAAS,SAAS,MACrC;AAAA,UAAC;AAAA;AAAA,YACC,aAAa;AAAA,YACb,WAAW;AAAA,YACX,SAAS,CAAC,MAAM,eAAe,YAAY,EAAE,eAAe;AAAA,YAC5D,oBAAmB;AAAA,YACnB,OAAM;AAAA,YACN,MAAM,oBAAC,YAAS;AAAA;AAAA,QAClB;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,WAAW;AAAA,YACX,SAAS,CAAC,MAAM,eAAe,YAAY,EAAE,eAAe;AAAA,YAC5D,oBAAmB;AAAA;AAAA,QACrB;AAAA,SACF;AAAA,OACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,iBAAgB;AAAA,QAChB,YAAY,OAAO;AAAA,QACnB,YAAY,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,EAAE,WAAW,cAAc,EAAE,SAAS,aAAa;AAAA;AAAA,IAC7F;AAAA,IACA,oBAAC,aAAU;AAAA,IACX,oBAAC,4BAAyB;AAAA,IACzB,OAAO;AAAA,KACV;AAEJ;","names":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { FastMintProps } from './types.cjs';
|
|
4
4
|
import 'starknet';
|
|
5
5
|
import '@medialane/sdk';
|
|
6
6
|
import '@medialane/sdk/starknet';
|
|
7
7
|
|
|
8
|
-
declare function FastMint(props: FastMintProps): string | number | bigint | boolean |
|
|
8
|
+
declare function FastMint(props: FastMintProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
9
9
|
|
|
10
10
|
export { FastMint };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { FastMintProps } from './types.js';
|
|
4
4
|
import 'starknet';
|
|
5
5
|
import '@medialane/sdk';
|
|
6
6
|
import '@medialane/sdk/starknet';
|
|
7
7
|
|
|
8
|
-
declare function FastMint(props: FastMintProps): string | number | bigint | boolean |
|
|
8
|
+
declare function FastMint(props: FastMintProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
9
9
|
|
|
10
10
|
export { FastMint };
|
|
@@ -28,6 +28,7 @@ var import_react = require("react");
|
|
|
28
28
|
var import_framer_motion = require("framer-motion");
|
|
29
29
|
var import_lucide_react = require("lucide-react");
|
|
30
30
|
var import_motion_primitives = require("./motion-primitives.js");
|
|
31
|
+
var import_section_heading = require("./section-heading.js");
|
|
31
32
|
var import_format = require("../utils/format.js");
|
|
32
33
|
var import_use_image_url = require("../utils/use-image-url.js");
|
|
33
34
|
function Slide({ collection, href }) {
|
|
@@ -75,10 +76,7 @@ function Slide({ collection, href }) {
|
|
|
75
76
|
}
|
|
76
77
|
function FeaturedCarouselSkeleton() {
|
|
77
78
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "space-y-4", children: [
|
|
78
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
79
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, { className: "h-4 w-4 text-brand-purple" }),
|
|
80
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-xl font-bold", children: "Featured Collections" })
|
|
81
|
-
] }),
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_section_heading.SectionHeading, { icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, {}), title: "Featured Collections", href: "/collections", linkLabel: "View all" }),
|
|
82
80
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "-mx-4 sm:-mx-6 lg:-mx-8 aspect-[16/7] sm:aspect-[21/9] bg-muted animate-pulse" })
|
|
83
81
|
] }) });
|
|
84
82
|
}
|
|
@@ -104,23 +102,7 @@ function FeaturedCarousel({
|
|
|
104
102
|
if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FeaturedCarouselSkeleton, {});
|
|
105
103
|
if (total === 0) return null;
|
|
106
104
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "space-y-4", children: [
|
|
107
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
108
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
109
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, { className: "h-4 w-4 text-brand-purple" }),
|
|
110
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-xl font-bold", children: "Featured Collections" })
|
|
111
|
-
] }),
|
|
112
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
113
|
-
"a",
|
|
114
|
-
{
|
|
115
|
-
href: allCollectionsHref,
|
|
116
|
-
className: "inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors",
|
|
117
|
-
children: [
|
|
118
|
-
"View all ",
|
|
119
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3.5 w-3.5" })
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
] }),
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_section_heading.SectionHeading, { icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, {}), title: "Featured Collections", href: allCollectionsHref, linkLabel: "View all" }),
|
|
124
106
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
125
107
|
"div",
|
|
126
108
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/featured-carousel.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useEffect, useCallback } from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\nimport { ChevronLeft, ChevronRight, ArrowRight, Sparkles } from \"lucide-react\";\nimport { FadeIn, EASE_OUT } from \"./motion-primitives.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\n\nexport interface FeaturedCarouselProps {\n collections: ApiCollection[];\n isLoading: boolean;\n getHref: (collection: ApiCollection) => string;\n allCollectionsHref?: string;\n}\n\nfunction Slide({ collection, href }: { collection: ApiCollection; href: string }) {\n const resolveImage = useImageUrl();\n const name = collection.name ?? \"Featured Collection\";\n const image = resolveImage(collection.image);\n\n return (\n <div className=\"relative w-full h-full\">\n {image ? (\n <img\n src={image}\n alt={name}\n loading=\"lazy\"\n className=\"absolute inset-0 w-full h-full object-cover\"\n />\n ) : (\n <div className=\"absolute inset-0 bg-gradient-to-br from-brand-purple/30 via-brand-blue/20 to-brand-navy/40\" />\n )}\n <div className=\"absolute inset-0 bg-gradient-to-t from-black/85 via-black/30 to-black/10\" />\n <div className=\"absolute inset-0 bg-gradient-to-r from-black/50 via-transparent to-transparent\" />\n <div className=\"absolute bottom-0 left-0 right-0 p-5 sm:p-8 lg:p-10\">\n <h2 className=\"text-2xl sm:text-3xl lg:text-4xl font-black text-white leading-tight mb-3 max-w-lg\">\n {name}\n </h2>\n <div className=\"flex items-center gap-4 mb-5\">\n {collection.totalSupply != null && (\n <span className=\"text-sm text-white/70\">\n <span className=\"font-bold text-white\">{collection.totalSupply}</span> items\n </span>\n )}\n {collection.floorPrice && (\n <span className=\"text-sm text-white/70\">\n Floor{\" \"}\n <span className=\"font-bold text-brand-orange\">\n {formatDisplayPrice(collection.floorPrice)}\n </span>\n </span>\n )}\n </div>\n <a\n href={href}\n className=\"inline-flex items-center gap-2 text-sm font-semibold px-4 py-2 rounded-lg bg-white/15 hover:bg-white/25 text-white border border-white/20 backdrop-blur-sm transition-colors\"\n >\n View Collection <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n </div>\n );\n}\n\nexport function FeaturedCarouselSkeleton() {\n return (\n <FadeIn>\n <section className=\"space-y-4\">\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Sparkles className=\"h-4 w-4 text-brand-purple\" />\n <h2 className=\"text-xl font-bold\">Featured Collections</h2>\n </div>\n <div className=\"-mx-4 sm:-mx-6 lg:-mx-8 aspect-[16/7] sm:aspect-[21/9] bg-muted animate-pulse\" />\n </section>\n </FadeIn>\n );\n}\n\nexport function FeaturedCarousel({\n collections,\n isLoading,\n getHref,\n allCollectionsHref = \"/collections\",\n}: FeaturedCarouselProps) {\n const [active, setActive] = useState(0);\n const [paused, setPaused] = useState(false);\n const total = collections.length;\n\n const next = useCallback(() => setActive((p) => (p + 1) % total), [total]);\n const prev = useCallback(() => setActive((p) => (p - 1 + total) % total), [total]);\n\n useEffect(() => { setActive(0); }, [total]);\n\n useEffect(() => {\n if (paused || total <= 1) return;\n const id = setInterval(next, 6000);\n return () => clearInterval(id);\n }, [next, paused, total]);\n\n if (isLoading) return <FeaturedCarouselSkeleton />;\n if (total === 0) return null;\n\n return (\n <FadeIn>\n <section className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Sparkles className=\"h-4 w-4 text-brand-purple\" />\n <h2 className=\"text-xl font-bold\">Featured Collections</h2>\n </div>\n <a\n href={allCollectionsHref}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n View all <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n\n <div\n className=\"-mx-4 sm:-mx-6 lg:-mx-8 relative overflow-hidden aspect-[16/7] sm:aspect-[21/9] bg-muted\"\n onMouseEnter={() => setPaused(true)}\n onMouseLeave={() => setPaused(false)}\n >\n <AnimatePresence mode=\"wait\">\n <motion.div\n key={active}\n className=\"absolute inset-0\"\n initial={{ opacity: 0, x: 40 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: -40 }}\n transition={{ duration: 0.45, ease: EASE_OUT }}\n >\n <Slide collection={collections[active]} href={getHref(collections[active])} />\n </motion.div>\n </AnimatePresence>\n\n {total > 1 && (\n <>\n <button\n onClick={prev}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 min-h-11 min-w-11 rounded-full flex items-center justify-center z-10\"\n aria-label=\"Previous\"\n >\n <span className=\"flex h-9 w-9 items-center justify-center rounded-full bg-black/40 border border-white/10 backdrop-blur-sm text-white hover:bg-black/60 transition-colors\">\n <ChevronLeft className=\"h-4 w-4\" />\n </span>\n </button>\n <button\n onClick={next}\n className=\"absolute right-3 top-1/2 -translate-y-1/2 min-h-11 min-w-11 rounded-full flex items-center justify-center z-10\"\n aria-label=\"Next\"\n >\n <span className=\"flex h-9 w-9 items-center justify-center rounded-full bg-black/40 border border-white/10 backdrop-blur-sm text-white hover:bg-black/60 transition-colors\">\n <ChevronRight className=\"h-4 w-4\" />\n </span>\n </button>\n </>\n )}\n\n {total > 1 && (\n <div className=\"absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-1.5 z-10\">\n {collections.map((_, i) => (\n <button\n key={i}\n onClick={() => setActive(i)}\n className={`h-1.5 rounded-full transition-all duration-300 ${\n i === active ? \"w-6 bg-white\" : \"w-1.5 bg-white/40 hover:bg-white/70\"\n }`}\n aria-label={`Go to slide ${i + 1}`}\n />\n ))}\n </div>\n )}\n </div>\n </section>\n </FadeIn>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBQ;AAvBR,mBAAiD;AACjD,2BAAwC;AACxC,0BAAgE;AAChE,+BAAiC;AACjC,oBAAmC;AAEnC,2BAA4B;AAS5B,SAAS,MAAM,EAAE,YAAY,KAAK,GAAgD;AAChF,QAAM,mBAAe,kCAAY;AACjC,QAAM,OAAO,WAAW,QAAQ;AAChC,QAAM,QAAQ,aAAa,WAAW,KAAK;AAE3C,SACE,6CAAC,SAAI,WAAU,0BACZ;AAAA,YACC;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,KAAK;AAAA,QACL,SAAQ;AAAA,QACR,WAAU;AAAA;AAAA,IACZ,IAEA,4CAAC,SAAI,WAAU,8FAA6F;AAAA,IAE9G,4CAAC,SAAI,WAAU,4EAA2E;AAAA,IAC1F,4CAAC,SAAI,WAAU,kFAAiF;AAAA,IAChG,6CAAC,SAAI,WAAU,uDACb;AAAA,kDAAC,QAAG,WAAU,sFACX,gBACH;AAAA,MACA,6CAAC,SAAI,WAAU,gCACZ;AAAA,mBAAW,eAAe,QACzB,6CAAC,UAAK,WAAU,yBACd;AAAA,sDAAC,UAAK,WAAU,wBAAwB,qBAAW,aAAY;AAAA,UAAO;AAAA,WACxE;AAAA,QAED,WAAW,cACV,6CAAC,UAAK,WAAU,yBAAwB;AAAA;AAAA,UAChC;AAAA,UACN,4CAAC,UAAK,WAAU,+BACb,gDAAmB,WAAW,UAAU,GAC3C;AAAA,WACF;AAAA,SAEJ;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAU;AAAA,UACX;AAAA;AAAA,YACiB,4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AAAA,cAC1B,WAAW,kDACT,MAAM,SAAS,iBAAiB,qCAClC;AAAA,cACA,cAAY,eAAe,IAAI,CAAC;AAAA;AAAA,YAL3B;AAAA,UAMP,CACD,GACH;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/featured-carousel.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useEffect, useCallback } from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\nimport { ChevronLeft, ChevronRight, ArrowRight, Sparkles } from \"lucide-react\";\nimport { FadeIn, EASE_OUT } from \"./motion-primitives.js\";\nimport { SectionHeading } from \"./section-heading.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\n\nexport interface FeaturedCarouselProps {\n collections: ApiCollection[];\n isLoading: boolean;\n getHref: (collection: ApiCollection) => string;\n allCollectionsHref?: string;\n}\n\nfunction Slide({ collection, href }: { collection: ApiCollection; href: string }) {\n const resolveImage = useImageUrl();\n const name = collection.name ?? \"Featured Collection\";\n const image = resolveImage(collection.image);\n\n return (\n <div className=\"relative w-full h-full\">\n {image ? (\n <img\n src={image}\n alt={name}\n loading=\"lazy\"\n className=\"absolute inset-0 w-full h-full object-cover\"\n />\n ) : (\n <div className=\"absolute inset-0 bg-gradient-to-br from-brand-purple/30 via-brand-blue/20 to-brand-navy/40\" />\n )}\n <div className=\"absolute inset-0 bg-gradient-to-t from-black/85 via-black/30 to-black/10\" />\n <div className=\"absolute inset-0 bg-gradient-to-r from-black/50 via-transparent to-transparent\" />\n <div className=\"absolute bottom-0 left-0 right-0 p-5 sm:p-8 lg:p-10\">\n <h2 className=\"text-2xl sm:text-3xl lg:text-4xl font-black text-white leading-tight mb-3 max-w-lg\">\n {name}\n </h2>\n <div className=\"flex items-center gap-4 mb-5\">\n {collection.totalSupply != null && (\n <span className=\"text-sm text-white/70\">\n <span className=\"font-bold text-white\">{collection.totalSupply}</span> items\n </span>\n )}\n {collection.floorPrice && (\n <span className=\"text-sm text-white/70\">\n Floor{\" \"}\n <span className=\"font-bold text-brand-orange\">\n {formatDisplayPrice(collection.floorPrice)}\n </span>\n </span>\n )}\n </div>\n <a\n href={href}\n className=\"inline-flex items-center gap-2 text-sm font-semibold px-4 py-2 rounded-lg bg-white/15 hover:bg-white/25 text-white border border-white/20 backdrop-blur-sm transition-colors\"\n >\n View Collection <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n </div>\n );\n}\n\nexport function FeaturedCarouselSkeleton() {\n return (\n <FadeIn>\n <section className=\"space-y-4\">\n <SectionHeading icon={<Sparkles />} title=\"Featured Collections\" href=\"/collections\" linkLabel=\"View all\" />\n <div className=\"-mx-4 sm:-mx-6 lg:-mx-8 aspect-[16/7] sm:aspect-[21/9] bg-muted animate-pulse\" />\n </section>\n </FadeIn>\n );\n}\n\nexport function FeaturedCarousel({\n collections,\n isLoading,\n getHref,\n allCollectionsHref = \"/collections\",\n}: FeaturedCarouselProps) {\n const [active, setActive] = useState(0);\n const [paused, setPaused] = useState(false);\n const total = collections.length;\n\n const next = useCallback(() => setActive((p) => (p + 1) % total), [total]);\n const prev = useCallback(() => setActive((p) => (p - 1 + total) % total), [total]);\n\n useEffect(() => { setActive(0); }, [total]);\n\n useEffect(() => {\n if (paused || total <= 1) return;\n const id = setInterval(next, 6000);\n return () => clearInterval(id);\n }, [next, paused, total]);\n\n if (isLoading) return <FeaturedCarouselSkeleton />;\n if (total === 0) return null;\n\n return (\n <FadeIn>\n <section className=\"space-y-4\">\n <SectionHeading icon={<Sparkles />} title=\"Featured Collections\" href={allCollectionsHref} linkLabel=\"View all\" />\n\n <div\n className=\"-mx-4 sm:-mx-6 lg:-mx-8 relative overflow-hidden aspect-[16/7] sm:aspect-[21/9] bg-muted\"\n onMouseEnter={() => setPaused(true)}\n onMouseLeave={() => setPaused(false)}\n >\n <AnimatePresence mode=\"wait\">\n <motion.div\n key={active}\n className=\"absolute inset-0\"\n initial={{ opacity: 0, x: 40 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: -40 }}\n transition={{ duration: 0.45, ease: EASE_OUT }}\n >\n <Slide collection={collections[active]} href={getHref(collections[active])} />\n </motion.div>\n </AnimatePresence>\n\n {total > 1 && (\n <>\n <button\n onClick={prev}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 min-h-11 min-w-11 rounded-full flex items-center justify-center z-10\"\n aria-label=\"Previous\"\n >\n <span className=\"flex h-9 w-9 items-center justify-center rounded-full bg-black/40 border border-white/10 backdrop-blur-sm text-white hover:bg-black/60 transition-colors\">\n <ChevronLeft className=\"h-4 w-4\" />\n </span>\n </button>\n <button\n onClick={next}\n className=\"absolute right-3 top-1/2 -translate-y-1/2 min-h-11 min-w-11 rounded-full flex items-center justify-center z-10\"\n aria-label=\"Next\"\n >\n <span className=\"flex h-9 w-9 items-center justify-center rounded-full bg-black/40 border border-white/10 backdrop-blur-sm text-white hover:bg-black/60 transition-colors\">\n <ChevronRight className=\"h-4 w-4\" />\n </span>\n </button>\n </>\n )}\n\n {total > 1 && (\n <div className=\"absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-1.5 z-10\">\n {collections.map((_, i) => (\n <button\n key={i}\n onClick={() => setActive(i)}\n className={`h-1.5 rounded-full transition-all duration-300 ${\n i === active ? \"w-6 bg-white\" : \"w-1.5 bg-white/40 hover:bg-white/70\"\n }`}\n aria-label={`Go to slide ${i + 1}`}\n />\n ))}\n </div>\n )}\n </div>\n </section>\n </FadeIn>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BQ;AAxBR,mBAAiD;AACjD,2BAAwC;AACxC,0BAAgE;AAChE,+BAAiC;AACjC,6BAA+B;AAC/B,oBAAmC;AAEnC,2BAA4B;AAS5B,SAAS,MAAM,EAAE,YAAY,KAAK,GAAgD;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QAAQ,YAAY,MAAM,CAAC,GAAG;AAAA;AAAA,YAPvE;AAAA,UAQP,GACF;AAAA,UAEC,QAAQ,KACP,4EACE;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAS;AAAA,gBACT,WAAU;AAAA,gBACV,cAAW;AAAA,gBAEX,sDAAC,UAAK,WAAU,4JACd,sDAAC,mCAAY,WAAU,WAAU,GACnC;AAAA;AAAA,YACF;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAS;AAAA,gBACT,WAAU;AAAA,gBACV,cAAW;AAAA,gBAEX,sDAAC,UAAK,WAAU,4JACd,sDAAC,oCAAa,WAAU,WAAU,GACpC;AAAA;AAAA,YACF;AAAA,aACF;AAAA,UAGD,QAAQ,KACP,4CAAC,SAAI,WAAU,8EACZ,sBAAY,IAAI,CAAC,GAAG,MACnB;AAAA,YAAC;AAAA;AAAA,cAEC,SAAS,MAAM,UAAU,CAAC;AAAA,cAC1B,WAAW,kDACT,MAAM,SAAS,iBAAiB,qCAClC;AAAA,cACA,cAAY,eAAe,IAAI,CAAC;AAAA;AAAA,YAL3B;AAAA,UAMP,CACD,GACH;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -4,6 +4,7 @@ import { useState, useEffect, useCallback } from "react";
|
|
|
4
4
|
import { motion, AnimatePresence } from "framer-motion";
|
|
5
5
|
import { ChevronLeft, ChevronRight, ArrowRight, Sparkles } from "lucide-react";
|
|
6
6
|
import { FadeIn, EASE_OUT } from "./motion-primitives.js";
|
|
7
|
+
import { SectionHeading } from "./section-heading.js";
|
|
7
8
|
import { formatDisplayPrice } from "../utils/format.js";
|
|
8
9
|
import { useImageUrl } from "../utils/use-image-url.js";
|
|
9
10
|
function Slide({ collection, href }) {
|
|
@@ -51,10 +52,7 @@ function Slide({ collection, href }) {
|
|
|
51
52
|
}
|
|
52
53
|
function FeaturedCarouselSkeleton() {
|
|
53
54
|
return /* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsxs("section", { className: "space-y-4", children: [
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */ jsx(Sparkles, { className: "h-4 w-4 text-brand-purple" }),
|
|
56
|
-
/* @__PURE__ */ jsx("h2", { className: "text-xl font-bold", children: "Featured Collections" })
|
|
57
|
-
] }),
|
|
55
|
+
/* @__PURE__ */ jsx(SectionHeading, { icon: /* @__PURE__ */ jsx(Sparkles, {}), title: "Featured Collections", href: "/collections", linkLabel: "View all" }),
|
|
58
56
|
/* @__PURE__ */ jsx("div", { className: "-mx-4 sm:-mx-6 lg:-mx-8 aspect-[16/7] sm:aspect-[21/9] bg-muted animate-pulse" })
|
|
59
57
|
] }) });
|
|
60
58
|
}
|
|
@@ -80,23 +78,7 @@ function FeaturedCarousel({
|
|
|
80
78
|
if (isLoading) return /* @__PURE__ */ jsx(FeaturedCarouselSkeleton, {});
|
|
81
79
|
if (total === 0) return null;
|
|
82
80
|
return /* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsxs("section", { className: "space-y-4", children: [
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
85
|
-
/* @__PURE__ */ jsx(Sparkles, { className: "h-4 w-4 text-brand-purple" }),
|
|
86
|
-
/* @__PURE__ */ jsx("h2", { className: "text-xl font-bold", children: "Featured Collections" })
|
|
87
|
-
] }),
|
|
88
|
-
/* @__PURE__ */ jsxs(
|
|
89
|
-
"a",
|
|
90
|
-
{
|
|
91
|
-
href: allCollectionsHref,
|
|
92
|
-
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",
|
|
93
|
-
children: [
|
|
94
|
-
"View all ",
|
|
95
|
-
/* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5" })
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
)
|
|
99
|
-
] }),
|
|
81
|
+
/* @__PURE__ */ jsx(SectionHeading, { icon: /* @__PURE__ */ jsx(Sparkles, {}), title: "Featured Collections", href: allCollectionsHref, linkLabel: "View all" }),
|
|
100
82
|
/* @__PURE__ */ jsxs(
|
|
101
83
|
"div",
|
|
102
84
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/featured-carousel.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useEffect, useCallback } from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\nimport { ChevronLeft, ChevronRight, ArrowRight, Sparkles } from \"lucide-react\";\nimport { FadeIn, EASE_OUT } from \"./motion-primitives.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\n\nexport interface FeaturedCarouselProps {\n collections: ApiCollection[];\n isLoading: boolean;\n getHref: (collection: ApiCollection) => string;\n allCollectionsHref?: string;\n}\n\nfunction Slide({ collection, href }: { collection: ApiCollection; href: string }) {\n const resolveImage = useImageUrl();\n const name = collection.name ?? \"Featured Collection\";\n const image = resolveImage(collection.image);\n\n return (\n <div className=\"relative w-full h-full\">\n {image ? (\n <img\n src={image}\n alt={name}\n loading=\"lazy\"\n className=\"absolute inset-0 w-full h-full object-cover\"\n />\n ) : (\n <div className=\"absolute inset-0 bg-gradient-to-br from-brand-purple/30 via-brand-blue/20 to-brand-navy/40\" />\n )}\n <div className=\"absolute inset-0 bg-gradient-to-t from-black/85 via-black/30 to-black/10\" />\n <div className=\"absolute inset-0 bg-gradient-to-r from-black/50 via-transparent to-transparent\" />\n <div className=\"absolute bottom-0 left-0 right-0 p-5 sm:p-8 lg:p-10\">\n <h2 className=\"text-2xl sm:text-3xl lg:text-4xl font-black text-white leading-tight mb-3 max-w-lg\">\n {name}\n </h2>\n <div className=\"flex items-center gap-4 mb-5\">\n {collection.totalSupply != null && (\n <span className=\"text-sm text-white/70\">\n <span className=\"font-bold text-white\">{collection.totalSupply}</span> items\n </span>\n )}\n {collection.floorPrice && (\n <span className=\"text-sm text-white/70\">\n Floor{\" \"}\n <span className=\"font-bold text-brand-orange\">\n {formatDisplayPrice(collection.floorPrice)}\n </span>\n </span>\n )}\n </div>\n <a\n href={href}\n className=\"inline-flex items-center gap-2 text-sm font-semibold px-4 py-2 rounded-lg bg-white/15 hover:bg-white/25 text-white border border-white/20 backdrop-blur-sm transition-colors\"\n >\n View Collection <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n </div>\n );\n}\n\nexport function FeaturedCarouselSkeleton() {\n return (\n <FadeIn>\n <section className=\"space-y-4\">\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Sparkles className=\"h-4 w-4 text-brand-purple\" />\n <h2 className=\"text-xl font-bold\">Featured Collections</h2>\n </div>\n <div className=\"-mx-4 sm:-mx-6 lg:-mx-8 aspect-[16/7] sm:aspect-[21/9] bg-muted animate-pulse\" />\n </section>\n </FadeIn>\n );\n}\n\nexport function FeaturedCarousel({\n collections,\n isLoading,\n getHref,\n allCollectionsHref = \"/collections\",\n}: FeaturedCarouselProps) {\n const [active, setActive] = useState(0);\n const [paused, setPaused] = useState(false);\n const total = collections.length;\n\n const next = useCallback(() => setActive((p) => (p + 1) % total), [total]);\n const prev = useCallback(() => setActive((p) => (p - 1 + total) % total), [total]);\n\n useEffect(() => { setActive(0); }, [total]);\n\n useEffect(() => {\n if (paused || total <= 1) return;\n const id = setInterval(next, 6000);\n return () => clearInterval(id);\n }, [next, paused, total]);\n\n if (isLoading) return <FeaturedCarouselSkeleton />;\n if (total === 0) return null;\n\n return (\n <FadeIn>\n <section className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Sparkles className=\"h-4 w-4 text-brand-purple\" />\n <h2 className=\"text-xl font-bold\">Featured Collections</h2>\n </div>\n <a\n href={allCollectionsHref}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n View all <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n\n <div\n className=\"-mx-4 sm:-mx-6 lg:-mx-8 relative overflow-hidden aspect-[16/7] sm:aspect-[21/9] bg-muted\"\n onMouseEnter={() => setPaused(true)}\n onMouseLeave={() => setPaused(false)}\n >\n <AnimatePresence mode=\"wait\">\n <motion.div\n key={active}\n className=\"absolute inset-0\"\n initial={{ opacity: 0, x: 40 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: -40 }}\n transition={{ duration: 0.45, ease: EASE_OUT }}\n >\n <Slide collection={collections[active]} href={getHref(collections[active])} />\n </motion.div>\n </AnimatePresence>\n\n {total > 1 && (\n <>\n <button\n onClick={prev}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 min-h-11 min-w-11 rounded-full flex items-center justify-center z-10\"\n aria-label=\"Previous\"\n >\n <span className=\"flex h-9 w-9 items-center justify-center rounded-full bg-black/40 border border-white/10 backdrop-blur-sm text-white hover:bg-black/60 transition-colors\">\n <ChevronLeft className=\"h-4 w-4\" />\n </span>\n </button>\n <button\n onClick={next}\n className=\"absolute right-3 top-1/2 -translate-y-1/2 min-h-11 min-w-11 rounded-full flex items-center justify-center z-10\"\n aria-label=\"Next\"\n >\n <span className=\"flex h-9 w-9 items-center justify-center rounded-full bg-black/40 border border-white/10 backdrop-blur-sm text-white hover:bg-black/60 transition-colors\">\n <ChevronRight className=\"h-4 w-4\" />\n </span>\n </button>\n </>\n )}\n\n {total > 1 && (\n <div className=\"absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-1.5 z-10\">\n {collections.map((_, i) => (\n <button\n key={i}\n onClick={() => setActive(i)}\n className={`h-1.5 rounded-full transition-all duration-300 ${\n i === active ? \"w-6 bg-white\" : \"w-1.5 bg-white/40 hover:bg-white/70\"\n }`}\n aria-label={`Go to slide ${i + 1}`}\n />\n ))}\n </div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A,UAMP,CACD,GACH;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/featured-carousel.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useEffect, useCallback } from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\nimport { ChevronLeft, ChevronRight, ArrowRight, Sparkles } from \"lucide-react\";\nimport { FadeIn, EASE_OUT } from \"./motion-primitives.js\";\nimport { SectionHeading } from \"./section-heading.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\n\nexport interface FeaturedCarouselProps {\n collections: ApiCollection[];\n isLoading: boolean;\n getHref: (collection: ApiCollection) => string;\n allCollectionsHref?: string;\n}\n\nfunction Slide({ collection, href }: { collection: ApiCollection; href: string }) {\n const resolveImage = useImageUrl();\n const name = collection.name ?? \"Featured Collection\";\n const image = resolveImage(collection.image);\n\n return (\n <div className=\"relative w-full h-full\">\n {image ? (\n <img\n src={image}\n alt={name}\n loading=\"lazy\"\n className=\"absolute inset-0 w-full h-full object-cover\"\n />\n ) : (\n <div className=\"absolute inset-0 bg-gradient-to-br from-brand-purple/30 via-brand-blue/20 to-brand-navy/40\" />\n )}\n <div className=\"absolute inset-0 bg-gradient-to-t from-black/85 via-black/30 to-black/10\" />\n <div className=\"absolute inset-0 bg-gradient-to-r from-black/50 via-transparent to-transparent\" />\n <div className=\"absolute bottom-0 left-0 right-0 p-5 sm:p-8 lg:p-10\">\n <h2 className=\"text-2xl sm:text-3xl lg:text-4xl font-black text-white leading-tight mb-3 max-w-lg\">\n {name}\n </h2>\n <div className=\"flex items-center gap-4 mb-5\">\n {collection.totalSupply != null && (\n <span className=\"text-sm text-white/70\">\n <span className=\"font-bold text-white\">{collection.totalSupply}</span> items\n </span>\n )}\n {collection.floorPrice && (\n <span className=\"text-sm text-white/70\">\n Floor{\" \"}\n <span className=\"font-bold text-brand-orange\">\n {formatDisplayPrice(collection.floorPrice)}\n </span>\n </span>\n )}\n </div>\n <a\n href={href}\n className=\"inline-flex items-center gap-2 text-sm font-semibold px-4 py-2 rounded-lg bg-white/15 hover:bg-white/25 text-white border border-white/20 backdrop-blur-sm transition-colors\"\n >\n View Collection <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n </div>\n );\n}\n\nexport function FeaturedCarouselSkeleton() {\n return (\n <FadeIn>\n <section className=\"space-y-4\">\n <SectionHeading icon={<Sparkles />} title=\"Featured Collections\" href=\"/collections\" linkLabel=\"View all\" />\n <div className=\"-mx-4 sm:-mx-6 lg:-mx-8 aspect-[16/7] sm:aspect-[21/9] bg-muted animate-pulse\" />\n </section>\n </FadeIn>\n );\n}\n\nexport function FeaturedCarousel({\n collections,\n isLoading,\n getHref,\n allCollectionsHref = \"/collections\",\n}: FeaturedCarouselProps) {\n const [active, setActive] = useState(0);\n const [paused, setPaused] = useState(false);\n const total = collections.length;\n\n const next = useCallback(() => setActive((p) => (p + 1) % total), [total]);\n const prev = useCallback(() => setActive((p) => (p - 1 + total) % total), [total]);\n\n useEffect(() => { setActive(0); }, [total]);\n\n useEffect(() => {\n if (paused || total <= 1) return;\n const id = setInterval(next, 6000);\n return () => clearInterval(id);\n }, [next, paused, total]);\n\n if (isLoading) return <FeaturedCarouselSkeleton />;\n if (total === 0) return null;\n\n return (\n <FadeIn>\n <section className=\"space-y-4\">\n <SectionHeading icon={<Sparkles />} title=\"Featured Collections\" href={allCollectionsHref} linkLabel=\"View all\" />\n\n <div\n className=\"-mx-4 sm:-mx-6 lg:-mx-8 relative overflow-hidden aspect-[16/7] sm:aspect-[21/9] bg-muted\"\n onMouseEnter={() => setPaused(true)}\n onMouseLeave={() => setPaused(false)}\n >\n <AnimatePresence mode=\"wait\">\n <motion.div\n key={active}\n className=\"absolute inset-0\"\n initial={{ opacity: 0, x: 40 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: -40 }}\n transition={{ duration: 0.45, ease: EASE_OUT }}\n >\n <Slide collection={collections[active]} href={getHref(collections[active])} />\n </motion.div>\n </AnimatePresence>\n\n {total > 1 && (\n <>\n <button\n onClick={prev}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 min-h-11 min-w-11 rounded-full flex items-center justify-center z-10\"\n aria-label=\"Previous\"\n >\n <span className=\"flex h-9 w-9 items-center justify-center rounded-full bg-black/40 border border-white/10 backdrop-blur-sm text-white hover:bg-black/60 transition-colors\">\n <ChevronLeft className=\"h-4 w-4\" />\n </span>\n </button>\n <button\n onClick={next}\n className=\"absolute right-3 top-1/2 -translate-y-1/2 min-h-11 min-w-11 rounded-full flex items-center justify-center z-10\"\n aria-label=\"Next\"\n >\n <span className=\"flex h-9 w-9 items-center justify-center rounded-full bg-black/40 border border-white/10 backdrop-blur-sm text-white hover:bg-black/60 transition-colors\">\n <ChevronRight className=\"h-4 w-4\" />\n </span>\n </button>\n </>\n )}\n\n {total > 1 && (\n <div className=\"absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-1.5 z-10\">\n {collections.map((_, i) => (\n <button\n key={i}\n onClick={() => setActive(i)}\n className={`h-1.5 rounded-full transition-all duration-300 ${\n i === active ? \"w-6 bg-white\" : \"w-1.5 bg-white/40 hover:bg-white/70\"\n }`}\n aria-label={`Go to slide ${i + 1}`}\n />\n ))}\n </div>\n )}\n </div>\n </section>\n </FadeIn>\n );\n}\n"],"mappings":";AA0BQ,SAoGI,UApGJ,KAiBI,YAjBJ;AAxBR,SAAS,UAAU,WAAW,mBAAmB;AACjD,SAAS,QAAQ,uBAAuB;AACxC,SAAS,aAAa,cAAc,YAAY,gBAAgB;AAChE,SAAS,QAAQ,gBAAgB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AAEnC,SAAS,mBAAmB;AAS5B,SAAS,MAAM,EAAE,YAAY,KAAK,GAAgD;AAChF,QAAM,eAAe,YAAY;AACjC,QAAM,OAAO,WAAW,QAA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AA,UAEC,QAAQ,KACP,iCACE;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAS;AAAA,gBACT,WAAU;AAAA,gBACV,cAAW;AAAA,gBAEX,8BAAC,UAAK,WAAU,4JACd,8BAAC,eAAY,WAAU,WAAU,GACnC;AAAA;AAAA,YACF;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAS;AAAA,gBACT,WAAU;AAAA,gBACV,cAAW;AAAA,gBAEX,8BAAC,UAAK,WAAU,4JACd,8BAAC,gBAAa,WAAU,WAAU,GACpC;AAAA;AAAA,YACF;AAAA,aACF;AAAA,UAGD,QAAQ,KACP,oBAAC,SAAI,WAAU,8EACZ,sBAAY,IAAI,CAAC,GAAG,MACnB;AAAA,YAAC;AAAA;AAAA,cAEC,SAAS,MAAM,UAAU,CAAC;AAAA,cAC1B,WAAW,kDACT,MAAM,SAAS,iBAAiB,qCAClC;AAAA,cACA,cAAY,eAAe,IAAI,CAAC;AAAA;AAAA,YAL3B;AAAA,UAMP,CACD,GACH;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -35,24 +35,12 @@ module.exports = __toCommonJS(ip_type_nav_exports);
|
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_link = __toESM(require("./link.js"), 1);
|
|
37
37
|
var import_lucide_react = require("lucide-react");
|
|
38
|
+
var import_section_heading = require("./section-heading.js");
|
|
38
39
|
var import_ip_type_badge = require("./ip-type-badge.js");
|
|
39
40
|
var import_cn = require("../utils/cn.js");
|
|
40
41
|
function IpTypeNav() {
|
|
41
42
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "space-y-4", children: [
|
|
42
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
43
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-xl sm:text-2xl font-black", children: "Browse by Type" }),
|
|
44
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
45
|
-
import_link.default,
|
|
46
|
-
{
|
|
47
|
-
href: "/nft",
|
|
48
|
-
className: "flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",
|
|
49
|
-
children: [
|
|
50
|
-
"View all ",
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3.5 w-3.5" })
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
] }),
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_section_heading.SectionHeading, { icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.LayoutGrid, {}), title: "Browse by Type", href: "/nft", linkLabel: "View all" }),
|
|
56
44
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3", children: import_ip_type_badge.IP_TYPE_CONFIG.map(({ slug, label, icon: Icon, colorClass, bgClass }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
57
45
|
import_link.default,
|
|
58
46
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/ip-type-nav.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/ip-type-nav.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { LayoutGrid } from \"lucide-react\";\nimport { SectionHeading } from \"./section-heading.js\";\nimport { IP_TYPE_CONFIG } from \"./ip-type-badge.js\";\nimport { cn } from \"../utils/cn.js\";\n\nexport function IpTypeNav() {\n return (\n <section className=\"space-y-4\">\n <SectionHeading icon={<LayoutGrid />} title=\"Browse by Type\" href=\"/nft\" linkLabel=\"View all\" />\n\n <div className=\"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3\">\n {IP_TYPE_CONFIG.map(({ slug, label, icon: Icon, colorClass, bgClass }) => (\n <Link\n key={slug}\n href={`/${slug}`}\n className=\"group flex flex-col items-center gap-2.5 p-4 rounded-xl border border-border bg-card hover:border-primary/40 hover:bg-card/80 transition-all hover:shadow-md hover:shadow-black/10\"\n >\n <div className={cn(\"h-10 w-10 rounded-xl flex items-center justify-center\", bgClass)}>\n <Icon className={cn(\"h-5 w-5\", colorClass)} />\n </div>\n <span className=\"text-xs font-semibold text-center leading-tight\">{label}</span>\n </Link>\n ))}\n </div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAW4B;AAT5B,kBAAiB;AACjB,0BAA2B;AAC3B,6BAA+B;AAC/B,2BAA+B;AAC/B,gBAAmB;AAEZ,SAAS,YAAY;AAC1B,SACE,6CAAC,aAAQ,WAAU,aACjB;AAAA,gDAAC,yCAAe,MAAM,4CAAC,kCAAW,GAAI,OAAM,kBAAiB,MAAK,QAAO,WAAU,YAAW;AAAA,IAE9F,4CAAC,SAAI,WAAU,wDACZ,8CAAe,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,MAAM,YAAY,QAAQ,MAClE;AAAA,MAAC,YAAAA;AAAA,MAAA;AAAA,QAEC,MAAM,IAAI,IAAI;AAAA,QACd,WAAU;AAAA,QAEV;AAAA,sDAAC,SAAI,eAAW,cAAG,yDAAyD,OAAO,GACjF,sDAAC,QAAK,eAAW,cAAG,WAAW,UAAU,GAAG,GAC9C;AAAA,UACA,4CAAC,UAAK,WAAU,mDAAmD,iBAAM;AAAA;AAAA;AAAA,MAPpE;AAAA,IAQP,CACD,GACH;AAAA,KACF;AAEJ;","names":["Link"]}
|
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import Link from "./link.js";
|
|
4
|
-
import {
|
|
4
|
+
import { LayoutGrid } from "lucide-react";
|
|
5
|
+
import { SectionHeading } from "./section-heading.js";
|
|
5
6
|
import { IP_TYPE_CONFIG } from "./ip-type-badge.js";
|
|
6
7
|
import { cn } from "../utils/cn.js";
|
|
7
8
|
function IpTypeNav() {
|
|
8
9
|
return /* @__PURE__ */ jsxs("section", { className: "space-y-4", children: [
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */ jsx("h2", { className: "text-xl sm:text-2xl font-black", children: "Browse by Type" }),
|
|
11
|
-
/* @__PURE__ */ jsxs(
|
|
12
|
-
Link,
|
|
13
|
-
{
|
|
14
|
-
href: "/nft",
|
|
15
|
-
className: "flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",
|
|
16
|
-
children: [
|
|
17
|
-
"View all ",
|
|
18
|
-
/* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5" })
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
)
|
|
22
|
-
] }),
|
|
10
|
+
/* @__PURE__ */ jsx(SectionHeading, { icon: /* @__PURE__ */ jsx(LayoutGrid, {}), title: "Browse by Type", href: "/nft", linkLabel: "View all" }),
|
|
23
11
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3", children: IP_TYPE_CONFIG.map(({ slug, label, icon: Icon, colorClass, bgClass }) => /* @__PURE__ */ jsxs(
|
|
24
12
|
Link,
|
|
25
13
|
{
|