@medialane/ui 0.327.0 → 0.328.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/badge.d.cts +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.d.cts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/home-page.cjs +4 -8
- package/dist/components/home-page.cjs.map +1 -1
- package/dist/components/home-page.js +4 -8
- package/dist/components/home-page.js.map +1 -1
- package/dist/components/portfolio-section.cjs +1 -1
- package/dist/components/portfolio-section.cjs.map +1 -1
- package/dist/components/portfolio-section.js +1 -1
- package/dist/components/portfolio-section.js.map +1 -1
- package/dist/components/section-heading.cjs +1 -1
- package/dist/components/section-heading.cjs.map +1 -1
- package/dist/components/section-heading.js +1 -1
- package/dist/components/section-heading.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
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "outline" | "default" | "destructive" | "secondary" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "outline" | "default" | "destructive" | "secondary" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
10
10
|
}
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
|
|
7
7
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
|
|
7
7
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -65,7 +65,6 @@ function ListingsStrip({
|
|
|
65
65
|
title,
|
|
66
66
|
query,
|
|
67
67
|
href,
|
|
68
|
-
linkLabel,
|
|
69
68
|
empty
|
|
70
69
|
}) {
|
|
71
70
|
const { walletAddress } = (0, import_medialane_app.useMedialaneApp)();
|
|
@@ -73,7 +72,7 @@ function ListingsStrip({
|
|
|
73
72
|
const prices = (0, import_use_usd_prices.useUsdPrices)();
|
|
74
73
|
const listings = orders.filter((o) => o.offer.itemType === "ERC721" || o.offer.itemType === "ERC1155").slice(0, 10);
|
|
75
74
|
if (!isLoading && listings.length === 0 && !empty) return null;
|
|
76
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_scroll_section.ScrollSection, { icon, title, href,
|
|
75
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_scroll_section.ScrollSection, { icon, title, href, children: isLoading ? Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-56 shrink-0 snap-start sm:w-64", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_listing_card.ListingCardSkeleton, {}) }, i)) : listings.length === 0 ? empty : listings.map((order) => {
|
|
77
76
|
const own = !!walletAddress && (0, import_same_address.isSameAddress)(order.offerer, walletAddress);
|
|
78
77
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-56 shrink-0 snap-start sm:w-64", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
79
78
|
import_listing_card.ListingCard,
|
|
@@ -92,10 +91,9 @@ function NewListings({ market }) {
|
|
|
92
91
|
{
|
|
93
92
|
market,
|
|
94
93
|
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, {}),
|
|
95
|
-
title: "
|
|
94
|
+
title: "Marketplace",
|
|
96
95
|
query: { status: "ACTIVE", limit: 10, page: 1 },
|
|
97
96
|
href: "/marketplace",
|
|
98
|
-
linkLabel: "Marketplace",
|
|
99
97
|
empty: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "py-4 text-sm text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: "/launchpad/single-editions", className: "text-primary hover:underline", children: "Sell the first asset" }) })
|
|
100
98
|
}
|
|
101
99
|
);
|
|
@@ -106,10 +104,9 @@ function FeaturedListings({ market }) {
|
|
|
106
104
|
{
|
|
107
105
|
market,
|
|
108
106
|
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, {}),
|
|
109
|
-
title: "Featured
|
|
107
|
+
title: "Featured",
|
|
110
108
|
query: { status: "ACTIVE", isFeatured: true, limit: 20, page: 1 },
|
|
111
|
-
href: "/marketplace"
|
|
112
|
-
linkLabel: "Marketplace"
|
|
109
|
+
href: "/marketplace"
|
|
113
110
|
}
|
|
114
111
|
);
|
|
115
112
|
}
|
|
@@ -121,7 +118,6 @@ function CollectionsStrip() {
|
|
|
121
118
|
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.TrendingUp, { className: "h-4 w-4" }),
|
|
122
119
|
title: "Collections",
|
|
123
120
|
href: "/collections",
|
|
124
|
-
linkLabel: "See all",
|
|
125
121
|
children: isLoading ? Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-56 shrink-0 snap-start sm:w-64", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_collection_card.CollectionCardSkeleton, {}) }, i)) : collections.map((col) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-56 shrink-0 snap-start sm:w-64", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_collection_card.CollectionCard, { collection: col }) }, col.contractAddress))
|
|
126
122
|
}
|
|
127
123
|
);
|
|
@@ -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 { HeroSlider } from \"./hero-slider.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,
|
|
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 { HeroSlider } from \"./hero-slider.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\nfunction 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 <HeroSlider 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;A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;AAOO,SAAS,SAAS,EAAE,kBAAkB,gBAAgB,GAAkB;AAC7E,QAAM,SAAS,iBAAiB;AAChC,QAAM,EAAE,aAAa,UAAU,WAAW,gBAAgB,QAAI,uCAAe,GAAG,GAAG,MAAM,UAAU,MAAM,QAAW,QAAW,eAAe;AAC9I,QAAM,EAAE,QAAQ,aAAa,QAAI,6BAAU,EAAE,QAAQ,UAAU,MAAM,UAAU,OAAO,GAAG,CAAC;AAC1F,SACE,6CAAC,SAAI,WAAU,SACb;AAAA,gDAAC,iCAAW,aAAa,UAAU,WAAW,iBAAiB,SAAS,CAAC,UAAM,2BAAe,YAAY,EAAE,eAAe,GAAG;AAAA,IAC9H,4CAAC,uCAAc,WAAU,mCACvB,sDAAC,yCAAe,QAAQ,cAAc,UAAU,GAAG,SAAS,CAAC,UAAM,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"]}
|
|
@@ -32,7 +32,6 @@ function ListingsStrip({
|
|
|
32
32
|
title,
|
|
33
33
|
query,
|
|
34
34
|
href,
|
|
35
|
-
linkLabel,
|
|
36
35
|
empty
|
|
37
36
|
}) {
|
|
38
37
|
const { walletAddress } = useMedialaneApp();
|
|
@@ -40,7 +39,7 @@ function ListingsStrip({
|
|
|
40
39
|
const prices = useUsdPrices();
|
|
41
40
|
const listings = orders.filter((o) => o.offer.itemType === "ERC721" || o.offer.itemType === "ERC1155").slice(0, 10);
|
|
42
41
|
if (!isLoading && listings.length === 0 && !empty) return null;
|
|
43
|
-
return /* @__PURE__ */ jsx(ScrollSection, { icon, title, href,
|
|
42
|
+
return /* @__PURE__ */ jsx(ScrollSection, { icon, title, href, children: isLoading ? Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "w-56 shrink-0 snap-start sm:w-64", children: /* @__PURE__ */ jsx(ListingCardSkeleton, {}) }, i)) : listings.length === 0 ? empty : listings.map((order) => {
|
|
44
43
|
const own = !!walletAddress && isSameAddress(order.offerer, walletAddress);
|
|
45
44
|
return /* @__PURE__ */ jsx("div", { className: "w-56 shrink-0 snap-start sm:w-64", children: /* @__PURE__ */ jsx(
|
|
46
45
|
ListingCard,
|
|
@@ -59,10 +58,9 @@ function NewListings({ market }) {
|
|
|
59
58
|
{
|
|
60
59
|
market,
|
|
61
60
|
icon: /* @__PURE__ */ jsx(Tag, {}),
|
|
62
|
-
title: "
|
|
61
|
+
title: "Marketplace",
|
|
63
62
|
query: { status: "ACTIVE", limit: 10, page: 1 },
|
|
64
63
|
href: "/marketplace",
|
|
65
|
-
linkLabel: "Marketplace",
|
|
66
64
|
empty: /* @__PURE__ */ jsx("p", { className: "py-4 text-sm text-muted-foreground", children: /* @__PURE__ */ jsx(Link, { href: "/launchpad/single-editions", className: "text-primary hover:underline", children: "Sell the first asset" }) })
|
|
67
65
|
}
|
|
68
66
|
);
|
|
@@ -73,10 +71,9 @@ function FeaturedListings({ market }) {
|
|
|
73
71
|
{
|
|
74
72
|
market,
|
|
75
73
|
icon: /* @__PURE__ */ jsx(Sparkles, {}),
|
|
76
|
-
title: "Featured
|
|
74
|
+
title: "Featured",
|
|
77
75
|
query: { status: "ACTIVE", isFeatured: true, limit: 20, page: 1 },
|
|
78
|
-
href: "/marketplace"
|
|
79
|
-
linkLabel: "Marketplace"
|
|
76
|
+
href: "/marketplace"
|
|
80
77
|
}
|
|
81
78
|
);
|
|
82
79
|
}
|
|
@@ -88,7 +85,6 @@ function CollectionsStrip() {
|
|
|
88
85
|
icon: /* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4" }),
|
|
89
86
|
title: "Collections",
|
|
90
87
|
href: "/collections",
|
|
91
|
-
linkLabel: "See all",
|
|
92
88
|
children: isLoading ? Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "w-56 shrink-0 snap-start sm:w-64", children: /* @__PURE__ */ jsx(CollectionCardSkeleton, {}) }, i)) : collections.map((col) => /* @__PURE__ */ jsx("div", { className: "w-56 shrink-0 snap-start sm:w-64", children: /* @__PURE__ */ jsx(CollectionCard, { collection: col }) }, col.contractAddress))
|
|
93
89
|
}
|
|
94
90
|
);
|
|
@@ -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 { HeroSlider } from \"./hero-slider.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,
|
|
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 { HeroSlider } from \"./hero-slider.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\nfunction 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 <HeroSlider 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,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,qBAAqB;AAC9B,SAAS,aAAa,2BAA2B;AACjD,SAAS,uBAAuB;AAChC,SAAS,gBAAgB,8BAA8B;AACvD,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAEhC,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AACzB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AI,WAAU,SACb;AAAA,wBAAC,cAAW,aAAa,UAAU,WAAW,iBAAiB,SAAS,CAAC,MAAM,eAAe,YAAY,EAAE,eAAe,GAAG;AAAA,IAC9H,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":[]}
|
|
@@ -70,7 +70,7 @@ function PortfolioSection({
|
|
|
70
70
|
href,
|
|
71
71
|
className: "inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",
|
|
72
72
|
children: [
|
|
73
|
-
"
|
|
73
|
+
"View all",
|
|
74
74
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3 w-3" })
|
|
75
75
|
]
|
|
76
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/portfolio-section.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport type PortfolioSectionColor =\n | \"blue\"\n | \"purple\"\n | \"rose\"\n | \"orange\"\n | \"maeve\"\n | \"navy\";\n\nconst BORDER_BY_COLOR: Record<PortfolioSectionColor, string> = {\n blue: \"border-brand-blue/40\",\n purple: \"border-brand-purple/40\",\n rose: \"border-brand-rose/40\",\n orange: \"border-brand-orange/40\",\n maeve: \"border-brand-maeve/40\",\n navy: \"border-brand-navy/40\",\n};\n\nexport interface PortfolioSectionProps {\n title: string;\n href: string;\n\n color?: PortfolioSectionColor;\n\n size?: \"default\" | \"wide\";\n children: React.ReactNode;\n className?: string;\n}\n\nexport function PortfolioSection({\n title,\n href,\n color = \"purple\",\n size = \"default\",\n children,\n className,\n}: PortfolioSectionProps) {\n return (\n <section\n className={cn(\n \"rounded-2xl border min-w-0\",\n BORDER_BY_COLOR[color],\n size === \"wide\" && \"sm:col-span-2 lg:col-span-3\",\n className,\n )}\n >\n <div className=\"flex items-center justify-between gap-3 px-5 pt-5 pb-3\">\n <h2 className=\"text-sm font-black text-foreground tracking-tight\">\n {title}\n </h2>\n <Link\n href={href}\n className=\"inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors\"\n >\n
|
|
1
|
+
{"version":3,"sources":["../../src/components/portfolio-section.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport type PortfolioSectionColor =\n | \"blue\"\n | \"purple\"\n | \"rose\"\n | \"orange\"\n | \"maeve\"\n | \"navy\";\n\nconst BORDER_BY_COLOR: Record<PortfolioSectionColor, string> = {\n blue: \"border-brand-blue/40\",\n purple: \"border-brand-purple/40\",\n rose: \"border-brand-rose/40\",\n orange: \"border-brand-orange/40\",\n maeve: \"border-brand-maeve/40\",\n navy: \"border-brand-navy/40\",\n};\n\nexport interface PortfolioSectionProps {\n title: string;\n href: string;\n\n color?: PortfolioSectionColor;\n\n size?: \"default\" | \"wide\";\n children: React.ReactNode;\n className?: string;\n}\n\nexport function PortfolioSection({\n title,\n href,\n color = \"purple\",\n size = \"default\",\n children,\n className,\n}: PortfolioSectionProps) {\n return (\n <section\n className={cn(\n \"rounded-2xl border min-w-0\",\n BORDER_BY_COLOR[color],\n size === \"wide\" && \"sm:col-span-2 lg:col-span-3\",\n className,\n )}\n >\n <div className=\"flex items-center justify-between gap-3 px-5 pt-5 pb-3\">\n <h2 className=\"text-sm font-black text-foreground tracking-tight\">\n {title}\n </h2>\n <Link\n href={href}\n className=\"inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors\"\n >\n View all\n <ArrowRight className=\"h-3 w-3\" />\n </Link>\n </div>\n <div className=\"px-5 pb-5\">{children}</div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoDQ;AAlDR,kBAAiB;AACjB,0BAA2B;AAC3B,gBAAmB;AAUnB,MAAM,kBAAyD;AAAA,EAC7D,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AACR;AAaO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA;AACF,GAA0B;AACxB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA,gBAAgB,KAAK;AAAA,QACrB,SAAS,UAAU;AAAA,QACnB;AAAA,MACF;AAAA,MAEA;AAAA,qDAAC,SAAI,WAAU,0DACb;AAAA,sDAAC,QAAG,WAAU,qDACX,iBACH;AAAA,UACA;AAAA,YAAC,YAAAA;AAAA,YAAA;AAAA,cACC;AAAA,cACA,WAAU;AAAA,cACX;AAAA;AAAA,gBAEC,4CAAC,kCAAW,WAAU,WAAU;AAAA;AAAA;AAAA,UAClC;AAAA,WACF;AAAA,QACA,4CAAC,SAAI,WAAU,aAAa,UAAS;AAAA;AAAA;AAAA,EACvC;AAEJ;","names":["Link"]}
|
|
@@ -37,7 +37,7 @@ function PortfolioSection({
|
|
|
37
37
|
href,
|
|
38
38
|
className: "inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",
|
|
39
39
|
children: [
|
|
40
|
-
"
|
|
40
|
+
"View all",
|
|
41
41
|
/* @__PURE__ */ jsx(ArrowRight, { className: "h-3 w-3" })
|
|
42
42
|
]
|
|
43
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/portfolio-section.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport type PortfolioSectionColor =\n | \"blue\"\n | \"purple\"\n | \"rose\"\n | \"orange\"\n | \"maeve\"\n | \"navy\";\n\nconst BORDER_BY_COLOR: Record<PortfolioSectionColor, string> = {\n blue: \"border-brand-blue/40\",\n purple: \"border-brand-purple/40\",\n rose: \"border-brand-rose/40\",\n orange: \"border-brand-orange/40\",\n maeve: \"border-brand-maeve/40\",\n navy: \"border-brand-navy/40\",\n};\n\nexport interface PortfolioSectionProps {\n title: string;\n href: string;\n\n color?: PortfolioSectionColor;\n\n size?: \"default\" | \"wide\";\n children: React.ReactNode;\n className?: string;\n}\n\nexport function PortfolioSection({\n title,\n href,\n color = \"purple\",\n size = \"default\",\n children,\n className,\n}: PortfolioSectionProps) {\n return (\n <section\n className={cn(\n \"rounded-2xl border min-w-0\",\n BORDER_BY_COLOR[color],\n size === \"wide\" && \"sm:col-span-2 lg:col-span-3\",\n className,\n )}\n >\n <div className=\"flex items-center justify-between gap-3 px-5 pt-5 pb-3\">\n <h2 className=\"text-sm font-black text-foreground tracking-tight\">\n {title}\n </h2>\n <Link\n href={href}\n className=\"inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors\"\n >\n
|
|
1
|
+
{"version":3,"sources":["../../src/components/portfolio-section.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport type PortfolioSectionColor =\n | \"blue\"\n | \"purple\"\n | \"rose\"\n | \"orange\"\n | \"maeve\"\n | \"navy\";\n\nconst BORDER_BY_COLOR: Record<PortfolioSectionColor, string> = {\n blue: \"border-brand-blue/40\",\n purple: \"border-brand-purple/40\",\n rose: \"border-brand-rose/40\",\n orange: \"border-brand-orange/40\",\n maeve: \"border-brand-maeve/40\",\n navy: \"border-brand-navy/40\",\n};\n\nexport interface PortfolioSectionProps {\n title: string;\n href: string;\n\n color?: PortfolioSectionColor;\n\n size?: \"default\" | \"wide\";\n children: React.ReactNode;\n className?: string;\n}\n\nexport function PortfolioSection({\n title,\n href,\n color = \"purple\",\n size = \"default\",\n children,\n className,\n}: PortfolioSectionProps) {\n return (\n <section\n className={cn(\n \"rounded-2xl border min-w-0\",\n BORDER_BY_COLOR[color],\n size === \"wide\" && \"sm:col-span-2 lg:col-span-3\",\n className,\n )}\n >\n <div className=\"flex items-center justify-between gap-3 px-5 pt-5 pb-3\">\n <h2 className=\"text-sm font-black text-foreground tracking-tight\">\n {title}\n </h2>\n <Link\n href={href}\n className=\"inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors\"\n >\n View all\n <ArrowRight className=\"h-3 w-3\" />\n </Link>\n </div>\n <div className=\"px-5 pb-5\">{children}</div>\n </section>\n );\n}\n"],"mappings":";AAoDQ,cAGA,YAHA;AAlDR,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AAUnB,MAAM,kBAAyD;AAAA,EAC7D,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AACR;AAaO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA;AACF,GAA0B;AACxB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,gBAAgB,KAAK;AAAA,QACrB,SAAS,UAAU;AAAA,QACnB;AAAA,MACF;AAAA,MAEA;AAAA,6BAAC,SAAI,WAAU,0DACb;AAAA,8BAAC,QAAG,WAAU,qDACX,iBACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,WAAU;AAAA,cACX;AAAA;AAAA,gBAEC,oBAAC,cAAW,WAAU,WAAU;AAAA;AAAA;AAAA,UAClC;AAAA,WACF;AAAA,QACA,oBAAC,SAAI,WAAU,aAAa,UAAS;AAAA;AAAA;AAAA,EACvC;AAEJ;","names":[]}
|
|
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(section_heading_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
|
-
function SectionHeading({ icon, title, subtitle, href, linkLabel = "
|
|
38
|
+
function SectionHeading({ icon, title, subtitle, href, linkLabel = "View all" }) {
|
|
39
39
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
40
40
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
41
41
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "shrink-0 text-muted-foreground [&>svg]:h-4 [&>svg]:w-4", children: icon }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/section-heading.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\n\nexport interface SectionHeadingProps {\n icon: React.ReactNode;\n title: string;\n subtitle?: React.ReactNode;\n href: string;\n linkLabel?: string;\n}\n\nexport function SectionHeading({ icon, title, subtitle, href, linkLabel = \"
|
|
1
|
+
{"version":3,"sources":["../../src/components/section-heading.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\n\nexport interface SectionHeadingProps {\n icon: React.ReactNode;\n title: string;\n subtitle?: React.ReactNode;\n href: string;\n linkLabel?: string;\n}\n\nexport function SectionHeading({ icon, title, subtitle, href, linkLabel = \"View all\" }: SectionHeadingProps) {\n return (\n <div className=\"flex items-center justify-between gap-3\">\n <div className=\"flex min-w-0 items-center gap-2\">\n <span className=\"shrink-0 text-muted-foreground [&>svg]:h-4 [&>svg]:w-4\">{icon}</span>\n <div className=\"min-w-0\">\n <h2 className=\"text-sm font-semibold leading-none tracking-tight text-foreground\">{title}</h2>\n {subtitle && <p className=\"mt-1 flex items-center gap-1 text-2xs text-muted-foreground\">{subtitle}</p>}\n </div>\n </div>\n <Link\n href={href}\n className=\"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground\"\n >\n {linkLabel} <ArrowRight className=\"h-3 w-3\" />\n </Link>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBQ;AAfR,kBAAiB;AACjB,0BAA2B;AAUpB,SAAS,eAAe,EAAE,MAAM,OAAO,UAAU,MAAM,YAAY,WAAW,GAAwB;AAC3G,SACE,6CAAC,SAAI,WAAU,2CACb;AAAA,iDAAC,SAAI,WAAU,mCACb;AAAA,kDAAC,UAAK,WAAU,0DAA0D,gBAAK;AAAA,MAC/E,6CAAC,SAAI,WAAU,WACb;AAAA,oDAAC,QAAG,WAAU,qEAAqE,iBAAM;AAAA,QACxF,YAAY,4CAAC,OAAE,WAAU,+DAA+D,oBAAS;AAAA,SACpG;AAAA,OACF;AAAA,IACA;AAAA,MAAC,YAAAA;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAU;AAAA,QAET;AAAA;AAAA,UAAU;AAAA,UAAC,4CAAC,kCAAW,WAAU,WAAU;AAAA;AAAA;AAAA,IAC9C;AAAA,KACF;AAEJ;","names":["Link"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import Link from "./link.js";
|
|
4
4
|
import { ArrowRight } from "lucide-react";
|
|
5
|
-
function SectionHeading({ icon, title, subtitle, href, linkLabel = "
|
|
5
|
+
function SectionHeading({ icon, title, subtitle, href, linkLabel = "View all" }) {
|
|
6
6
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
7
7
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
8
8
|
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-muted-foreground [&>svg]:h-4 [&>svg]:w-4", children: icon }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/section-heading.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\n\nexport interface SectionHeadingProps {\n icon: React.ReactNode;\n title: string;\n subtitle?: React.ReactNode;\n href: string;\n linkLabel?: string;\n}\n\nexport function SectionHeading({ icon, title, subtitle, href, linkLabel = \"
|
|
1
|
+
{"version":3,"sources":["../../src/components/section-heading.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\n\nexport interface SectionHeadingProps {\n icon: React.ReactNode;\n title: string;\n subtitle?: React.ReactNode;\n href: string;\n linkLabel?: string;\n}\n\nexport function SectionHeading({ icon, title, subtitle, href, linkLabel = \"View all\" }: SectionHeadingProps) {\n return (\n <div className=\"flex items-center justify-between gap-3\">\n <div className=\"flex min-w-0 items-center gap-2\">\n <span className=\"shrink-0 text-muted-foreground [&>svg]:h-4 [&>svg]:w-4\">{icon}</span>\n <div className=\"min-w-0\">\n <h2 className=\"text-sm font-semibold leading-none tracking-tight text-foreground\">{title}</h2>\n {subtitle && <p className=\"mt-1 flex items-center gap-1 text-2xs text-muted-foreground\">{subtitle}</p>}\n </div>\n </div>\n <Link\n href={href}\n className=\"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground\"\n >\n {linkLabel} <ArrowRight className=\"h-3 w-3\" />\n </Link>\n </div>\n );\n}\n"],"mappings":";AAiBQ,cACA,YADA;AAfR,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAUpB,SAAS,eAAe,EAAE,MAAM,OAAO,UAAU,MAAM,YAAY,WAAW,GAAwB;AAC3G,SACE,qBAAC,SAAI,WAAU,2CACb;AAAA,yBAAC,SAAI,WAAU,mCACb;AAAA,0BAAC,UAAK,WAAU,0DAA0D,gBAAK;AAAA,MAC/E,qBAAC,SAAI,WAAU,WACb;AAAA,4BAAC,QAAG,WAAU,qEAAqE,iBAAM;AAAA,QACxF,YAAY,oBAAC,OAAE,WAAU,+DAA+D,oBAAS;AAAA,SACpG;AAAA,OACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAU;AAAA,QAET;AAAA;AAAA,UAAU;AAAA,UAAC,oBAAC,cAAW,WAAU,WAAU;AAAA;AAAA;AAAA,IAC9C;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -7,7 +7,7 @@ declare function useTokenBalance(symbol: string | null, holderAddress: string |
|
|
|
7
7
|
rawBalance: bigint | null;
|
|
8
8
|
isLoading: boolean;
|
|
9
9
|
error: any;
|
|
10
|
-
decimals:
|
|
10
|
+
decimals: 6 | 8 | 18;
|
|
11
11
|
};
|
|
12
12
|
declare function hasSufficientBalance(rawBalance: bigint | null, requiredHuman: string, decimals: number): boolean | null;
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ declare function useTokenBalance(symbol: string | null, holderAddress: string |
|
|
|
7
7
|
rawBalance: bigint | null;
|
|
8
8
|
isLoading: boolean;
|
|
9
9
|
error: any;
|
|
10
|
-
decimals:
|
|
10
|
+
decimals: 6 | 8 | 18;
|
|
11
11
|
};
|
|
12
12
|
declare function hasSufficientBalance(rawBalance: bigint | null, requiredHuman: string, decimals: number): boolean | null;
|
|
13
13
|
|