@medialane/ui 0.331.0 → 0.332.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/discover-community-section.cjs +79 -67
- package/dist/components/discover-community-section.cjs.map +1 -1
- package/dist/components/discover-community-section.js +79 -67
- package/dist/components/discover-community-section.js.map +1 -1
- package/dist/components/discover-features.cjs +4 -3
- package/dist/components/discover-features.cjs.map +1 -1
- package/dist/components/discover-features.js +5 -3
- package/dist/components/discover-features.js.map +1 -1
- package/dist/components/discover-page.cjs +1 -1
- package/dist/components/discover-page.cjs.map +1 -1
- package/dist/components/discover-page.js +1 -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/rewards/leaderboard-panel.cjs +2 -2
- package/dist/components/rewards/leaderboard-panel.cjs.map +1 -1
- package/dist/components/rewards/leaderboard-panel.js +2 -2
- package/dist/components/rewards/leaderboard-panel.js.map +1 -1
- package/dist/components/rewards/leaderboard-table.cjs +1 -1
- package/dist/components/rewards/leaderboard-table.cjs.map +1 -1
- package/dist/components/rewards/leaderboard-table.js +1 -1
- package/dist/components/rewards/leaderboard-table.js.map +1 -1
- package/dist/components/scroll-section.cjs.map +1 -1
- package/dist/components/scroll-section.d.cts +1 -1
- package/dist/components/scroll-section.d.ts +1 -1
- package/dist/components/scroll-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.d.cts +1 -1
- package/dist/components/section-heading.d.ts +1 -1
- package/dist/components/section-heading.js +1 -1
- package/dist/components/section-heading.js.map +1 -1
- package/package.json +1 -1
|
@@ -36,87 +36,99 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
36
36
|
var import_react = require("react");
|
|
37
37
|
var import_lucide_react = require("lucide-react");
|
|
38
38
|
var import_link = __toESM(require("./link.js"), 1);
|
|
39
|
-
var import_section_heading = require("./section-heading.js");
|
|
40
39
|
var import_skeleton = require("./skeleton.js");
|
|
41
40
|
var import_activity_row = require("./activity-row.js");
|
|
42
41
|
var import_medialane_app = require("./medialane-app.js");
|
|
43
42
|
var import_leaderboard_panel = require("./rewards/leaderboard-panel.js");
|
|
44
43
|
var import_use_activities = require("../utils/use-activities.js");
|
|
45
44
|
var import_time = require("../utils/time.js");
|
|
46
|
-
var import_cn = require("../utils/cn.js");
|
|
47
45
|
var import_empty_messages = require("../utils/empty-messages.js");
|
|
48
|
-
const
|
|
46
|
+
const ROWS = 5;
|
|
47
|
+
function CommunityCard({
|
|
48
|
+
icon,
|
|
49
|
+
title,
|
|
50
|
+
subtitle,
|
|
51
|
+
href,
|
|
52
|
+
linkLabel,
|
|
53
|
+
children
|
|
54
|
+
}) {
|
|
55
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "overflow-hidden rounded-2xl border border-border/50 bg-card", children: [
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-3 border-b border-border/50 px-4 py-3", children: [
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "shrink-0 text-muted-foreground [&>svg]:h-4 [&>svg]:w-4", children: icon }),
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-sm font-semibold leading-none tracking-tight text-foreground", children: title }),
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-1 flex h-3.5 items-center gap-1 text-2xs text-muted-foreground", children: subtitle })
|
|
62
|
+
] })
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
65
|
+
import_link.default,
|
|
66
|
+
{
|
|
67
|
+
href,
|
|
68
|
+
className: "inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",
|
|
69
|
+
children: [
|
|
70
|
+
linkLabel,
|
|
71
|
+
" ",
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3 w-3" })
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "min-h-[324px]", children })
|
|
78
|
+
] });
|
|
79
|
+
}
|
|
49
80
|
function DiscoverCommunitySection() {
|
|
50
|
-
const { activities, isLoading } = (0, import_use_activities.useActivities)({ limit:
|
|
81
|
+
const { activities, isLoading } = (0, import_use_activities.useActivities)({ limit: ROWS });
|
|
51
82
|
const { walletAddress: address } = (0, import_medialane_app.useMedialaneApp)();
|
|
52
83
|
const [lastUpdated, setLastUpdated] = (0, import_react.useState)(() => (/* @__PURE__ */ new Date()).toISOString());
|
|
53
84
|
(0, import_react.useEffect)(() => {
|
|
54
85
|
if (!isLoading) setLastUpdated((/* @__PURE__ */ new Date()).toISOString());
|
|
55
86
|
}, [activities, isLoading]);
|
|
56
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "grid grid-cols-1 lg:grid-cols-
|
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
(0, import_time.timeAgo)(lastUpdated)
|
|
67
|
-
] }),
|
|
68
|
-
href: "/activities",
|
|
69
|
-
linkLabel: "View all"
|
|
70
|
-
}
|
|
71
|
-
),
|
|
72
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "divide-y divide-border/50 rounded-xl border border-border overflow-hidden", children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3 px-4 py-3.5", children: [
|
|
73
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-8 w-8 rounded-lg shrink-0" }),
|
|
74
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-9 w-9 rounded-md shrink-0" }),
|
|
75
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-3.5 w-40" }),
|
|
77
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-2.5 w-24" })
|
|
78
|
-
] })
|
|
79
|
-
] }, i)) }) : activities.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("rounded-xl border border-border py-12 text-center"), children: [
|
|
80
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-medium", children: import_empty_messages.emptyMessages.activity.title }),
|
|
81
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: import_empty_messages.emptyMessages.activity.description })
|
|
82
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "divide-y divide-border/50 rounded-xl border border-border overflow-hidden", children: activities.map((activity, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
|
-
import_activity_row.ActivityRow,
|
|
84
|
-
{
|
|
85
|
-
activity,
|
|
86
|
-
showActor: true,
|
|
87
|
-
showExplorer: true
|
|
88
|
-
},
|
|
89
|
-
activity.txHash ? `${activity.txHash}-${activity.type}-${activity.nftTokenId ?? ""}` : `activity-${i}`
|
|
90
|
-
)) }) })
|
|
91
|
-
] }),
|
|
92
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "lg:col-span-5 space-y-4 sm:space-y-5", children: [
|
|
93
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
|
-
import_section_heading.SectionHeading,
|
|
95
|
-
{
|
|
96
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, { className: "h-4 w-4" }),
|
|
97
|
-
title: "Rewards",
|
|
98
|
-
href: "/rewards",
|
|
99
|
-
linkLabel: "Scoreboard"
|
|
100
|
-
}
|
|
101
|
-
),
|
|
102
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "overflow-hidden rounded-2xl border border-border/50 bg-card", children: [
|
|
103
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-3 bg-gradient-to-r from-brand-rose/10 to-brand-orange/10 px-4 py-3", children: [
|
|
104
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold leading-snug", children: "Earn XP. Share the Creator's Fund." }),
|
|
105
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
106
|
-
import_link.default,
|
|
107
|
-
{
|
|
108
|
-
href: "/rewards",
|
|
109
|
-
className: "inline-flex shrink-0 items-center gap-1 text-xs font-semibold text-brand-rose hover:opacity-80 transition-opacity",
|
|
110
|
-
children: [
|
|
111
|
-
"Start earning ",
|
|
112
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3 w-3" })
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
)
|
|
87
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "grid grid-cols-1 gap-6 lg:grid-cols-2 lg:gap-8", children: [
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
|
+
CommunityCard,
|
|
90
|
+
{
|
|
91
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Activity, {}),
|
|
92
|
+
title: "Activities",
|
|
93
|
+
subtitle: !isLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.RefreshCw, { className: "h-2.5 w-2.5" }),
|
|
95
|
+
"Updated ",
|
|
96
|
+
(0, import_time.timeAgo)(lastUpdated)
|
|
116
97
|
] }),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
98
|
+
href: "/activities",
|
|
99
|
+
linkLabel: "View all",
|
|
100
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "divide-y divide-border/50", children: Array.from({ length: ROWS }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex h-16 items-center gap-3 px-4", children: [
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-8 w-8 shrink-0 rounded-lg" }),
|
|
102
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-9 w-9 shrink-0 rounded-md" }),
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-3.5 w-40" }),
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: "h-2.5 w-24" })
|
|
106
|
+
] })
|
|
107
|
+
] }, i)) }) : activities.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "py-12 text-center", children: [
|
|
108
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-medium", children: import_empty_messages.emptyMessages.activity.title }),
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: import_empty_messages.emptyMessages.activity.description })
|
|
110
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "divide-y divide-border/50", children: activities.map((activity, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
111
|
+
import_activity_row.ActivityRow,
|
|
112
|
+
{
|
|
113
|
+
activity,
|
|
114
|
+
showActor: true,
|
|
115
|
+
showExplorer: true
|
|
116
|
+
},
|
|
117
|
+
activity.txHash ? `${activity.txHash}-${activity.type}-${activity.nftTokenId ?? ""}` : `activity-${i}`
|
|
118
|
+
)) })
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
+
CommunityCard,
|
|
123
|
+
{
|
|
124
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, {}),
|
|
125
|
+
title: "Rewards",
|
|
126
|
+
subtitle: "Earn XP. Share the Creator's Fund.",
|
|
127
|
+
href: "/rewards",
|
|
128
|
+
linkLabel: "Scoreboard",
|
|
129
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_leaderboard_panel.LeaderboardPanel, { myAddress: address, limit: ROWS, showHeading: false, compact: true })
|
|
130
|
+
}
|
|
131
|
+
)
|
|
120
132
|
] });
|
|
121
133
|
}
|
|
122
134
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/discover-community-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Activity, ArrowRight, RefreshCw, Sparkles } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-community-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState, type ReactNode } from \"react\";\nimport { Activity, ArrowRight, RefreshCw, Sparkles } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport { Skeleton } from \"./skeleton.js\";\nimport { ActivityRow } from \"./activity-row.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { LeaderboardPanel } from \"./rewards/leaderboard-panel.js\";\nimport { useActivities } from \"../utils/use-activities.js\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { emptyMessages } from \"../utils/empty-messages.js\";\n\nconst ROWS = 5;\n\nfunction CommunityCard({\n icon,\n title,\n subtitle,\n href,\n linkLabel,\n children,\n}: {\n icon: ReactNode;\n title: string;\n subtitle?: ReactNode;\n href: string;\n linkLabel: string;\n children: ReactNode;\n}) {\n return (\n <section className=\"overflow-hidden rounded-2xl border border-border/50 bg-card\">\n <div className=\"flex items-center justify-between gap-3 border-b border-border/50 px-4 py-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 <p className=\"mt-1 flex h-3.5 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 <div className=\"min-h-[324px]\">{children}</div>\n </section>\n );\n}\n\nexport function DiscoverCommunitySection() {\n const { activities, isLoading } = useActivities({ limit: ROWS });\n const { walletAddress: address } = useMedialaneApp();\n const [lastUpdated, setLastUpdated] = useState(() => new Date().toISOString());\n\n useEffect(() => {\n if (!isLoading) setLastUpdated(new Date().toISOString());\n }, [activities, isLoading]);\n\n return (\n <section className=\"grid grid-cols-1 gap-6 lg:grid-cols-2 lg:gap-8\">\n <CommunityCard\n icon={<Activity />}\n title=\"Activities\"\n subtitle={\n !isLoading && (\n <>\n <RefreshCw className=\"h-2.5 w-2.5\" />\n Updated {timeAgo(lastUpdated)}\n </>\n )\n }\n href=\"/activities\"\n linkLabel=\"View all\"\n >\n {isLoading ? (\n <div className=\"divide-y divide-border/50\">\n {Array.from({ length: ROWS }).map((_, i) => (\n <div key={i} className=\"flex h-16 items-center gap-3 px-4\">\n <Skeleton className=\"h-8 w-8 shrink-0 rounded-lg\" />\n <Skeleton className=\"h-9 w-9 shrink-0 rounded-md\" />\n <div className=\"flex-1 space-y-2\">\n <Skeleton className=\"h-3.5 w-40\" />\n <Skeleton className=\"h-2.5 w-24\" />\n </div>\n </div>\n ))}\n </div>\n ) : activities.length === 0 ? (\n <div className=\"py-12 text-center\">\n <p className=\"text-sm font-medium\">{emptyMessages.activity.title}</p>\n <p className=\"text-sm text-muted-foreground\">{emptyMessages.activity.description}</p>\n </div>\n ) : (\n <div className=\"divide-y divide-border/50\">\n {activities.map((activity, i) => (\n <ActivityRow\n key={activity.txHash ? `${activity.txHash}-${activity.type}-${activity.nftTokenId ?? \"\"}` : `activity-${i}`}\n activity={activity}\n showActor\n showExplorer\n />\n ))}\n </div>\n )}\n </CommunityCard>\n\n <CommunityCard\n icon={<Sparkles />}\n title=\"Rewards\"\n subtitle=\"Earn XP. Share the Creator's Fund.\"\n href=\"/rewards\"\n linkLabel=\"Scoreboard\"\n >\n <LeaderboardPanel myAddress={address} limit={ROWS} showHeading={false} compact />\n </CommunityCard>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCU;AAhCV,mBAAoD;AACpD,0BAA0D;AAC1D,kBAAiB;AACjB,sBAAyB;AACzB,0BAA4B;AAC5B,2BAAgC;AAChC,+BAAiC;AACjC,4BAA8B;AAC9B,kBAAwB;AACxB,4BAA8B;AAE9B,MAAM,OAAO;AAEb,SAAS,cAAc;AAA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SAAI,WAAU,6BACZ,gBAAM,KAAK,EAAE,QAAQ,KAAK,CAAC,EAAE,IAAI,CAAC,GAAG,MACpC,6CAAC,SAAY,WAAU,qCACrB;AAAA,sDAAC,4BAAS,WAAU,+BAA8B;AAAA,UAClD,4CAAC,4BAAS,WAAU,+BAA8B;AAAA,UAClD,6CAAC,SAAI,WAAU,oBACb;AAAA,wDAAC,4BAAS,WAAU,cAAa;AAAA,YACjC,4CAAC,4BAAS,WAAU,cAAa;AAAA,aACnC;AAAA,aANQ,CAOV,CACD,GACH,IACE,WAAW,WAAW,IACxB,6CAAC,SAAI,WAAU,qBACb;AAAA,sDAAC,OAAE,WAAU,uBAAuB,8CAAc,SAAS,OAAM;AAAA,UACjE,4CAAC,OAAE,WAAU,iCAAiC,8CAAc,SAAS,aAAY;AAAA,WACnF,IAEA,4CAAC,SAAI,WAAU,6BACZ,qBAAW,IAAI,CAAC,UAAU,MACzB;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA,WAAS;AAAA,YACT,cAAY;AAAA;AAAA,UAHP,SAAS,SAAS,GAAG,SAAS,MAAM,IAAI,SAAS,IAAI,IAAI,SAAS,cAAc,EAAE,KAAK,YAAY,CAAC;AAAA,QAI3G,CACD,GACH;AAAA;AAAA,IAEJ;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,4CAAC,gCAAS;AAAA,QAChB,OAAM;AAAA,QACN,UAAS;AAAA,QACT,MAAK;AAAA,QACL,WAAU;AAAA,QAEV,sDAAC,6CAAiB,WAAW,SAAS,OAAO,MAAM,aAAa,OAAO,SAAO,MAAC;AAAA;AAAA,IACjF;AAAA,KACF;AAEJ;","names":["Link"]}
|
|
@@ -3,87 +3,99 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { Activity, ArrowRight, RefreshCw, Sparkles } from "lucide-react";
|
|
5
5
|
import Link from "./link.js";
|
|
6
|
-
import { SectionHeading } from "./section-heading.js";
|
|
7
6
|
import { Skeleton } from "./skeleton.js";
|
|
8
7
|
import { ActivityRow } from "./activity-row.js";
|
|
9
8
|
import { useMedialaneApp } from "./medialane-app.js";
|
|
10
9
|
import { LeaderboardPanel } from "./rewards/leaderboard-panel.js";
|
|
11
10
|
import { useActivities } from "../utils/use-activities.js";
|
|
12
11
|
import { timeAgo } from "../utils/time.js";
|
|
13
|
-
import { cn } from "../utils/cn.js";
|
|
14
12
|
import { emptyMessages } from "../utils/empty-messages.js";
|
|
15
|
-
const
|
|
13
|
+
const ROWS = 5;
|
|
14
|
+
function CommunityCard({
|
|
15
|
+
icon,
|
|
16
|
+
title,
|
|
17
|
+
subtitle,
|
|
18
|
+
href,
|
|
19
|
+
linkLabel,
|
|
20
|
+
children
|
|
21
|
+
}) {
|
|
22
|
+
return /* @__PURE__ */ jsxs("section", { className: "overflow-hidden rounded-2xl border border-border/50 bg-card", children: [
|
|
23
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 border-b border-border/50 px-4 py-3", children: [
|
|
24
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
25
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-muted-foreground [&>svg]:h-4 [&>svg]:w-4", children: icon }),
|
|
26
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
27
|
+
/* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold leading-none tracking-tight text-foreground", children: title }),
|
|
28
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 flex h-3.5 items-center gap-1 text-2xs text-muted-foreground", children: subtitle })
|
|
29
|
+
] })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ jsxs(
|
|
32
|
+
Link,
|
|
33
|
+
{
|
|
34
|
+
href,
|
|
35
|
+
className: "inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",
|
|
36
|
+
children: [
|
|
37
|
+
linkLabel,
|
|
38
|
+
" ",
|
|
39
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "h-3 w-3" })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ jsx("div", { className: "min-h-[324px]", children })
|
|
45
|
+
] });
|
|
46
|
+
}
|
|
16
47
|
function DiscoverCommunitySection() {
|
|
17
|
-
const { activities, isLoading } = useActivities({ limit:
|
|
48
|
+
const { activities, isLoading } = useActivities({ limit: ROWS });
|
|
18
49
|
const { walletAddress: address } = useMedialaneApp();
|
|
19
50
|
const [lastUpdated, setLastUpdated] = useState(() => (/* @__PURE__ */ new Date()).toISOString());
|
|
20
51
|
useEffect(() => {
|
|
21
52
|
if (!isLoading) setLastUpdated((/* @__PURE__ */ new Date()).toISOString());
|
|
22
53
|
}, [activities, isLoading]);
|
|
23
|
-
return /* @__PURE__ */ jsxs("section", { className: "grid grid-cols-1 lg:grid-cols-
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
timeAgo(lastUpdated)
|
|
34
|
-
] }),
|
|
35
|
-
href: "/activities",
|
|
36
|
-
linkLabel: "View all"
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
/* @__PURE__ */ jsx("div", { children: isLoading ? /* @__PURE__ */ jsx("div", { className: "divide-y divide-border/50 rounded-xl border border-border overflow-hidden", children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-4 py-3.5", children: [
|
|
40
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-8 rounded-lg shrink-0" }),
|
|
41
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-9 rounded-md shrink-0" }),
|
|
42
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2", children: [
|
|
43
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-40" }),
|
|
44
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-2.5 w-24" })
|
|
45
|
-
] })
|
|
46
|
-
] }, i)) }) : activities.length === 0 ? /* @__PURE__ */ jsxs("div", { className: cn("rounded-xl border border-border py-12 text-center"), children: [
|
|
47
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: emptyMessages.activity.title }),
|
|
48
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: emptyMessages.activity.description })
|
|
49
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "divide-y divide-border/50 rounded-xl border border-border overflow-hidden", children: activities.map((activity, i) => /* @__PURE__ */ jsx(
|
|
50
|
-
ActivityRow,
|
|
51
|
-
{
|
|
52
|
-
activity,
|
|
53
|
-
showActor: true,
|
|
54
|
-
showExplorer: true
|
|
55
|
-
},
|
|
56
|
-
activity.txHash ? `${activity.txHash}-${activity.type}-${activity.nftTokenId ?? ""}` : `activity-${i}`
|
|
57
|
-
)) }) })
|
|
58
|
-
] }),
|
|
59
|
-
/* @__PURE__ */ jsxs("div", { className: "lg:col-span-5 space-y-4 sm:space-y-5", children: [
|
|
60
|
-
/* @__PURE__ */ jsx(
|
|
61
|
-
SectionHeading,
|
|
62
|
-
{
|
|
63
|
-
icon: /* @__PURE__ */ jsx(Sparkles, { className: "h-4 w-4" }),
|
|
64
|
-
title: "Rewards",
|
|
65
|
-
href: "/rewards",
|
|
66
|
-
linkLabel: "Scoreboard"
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
/* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-2xl border border-border/50 bg-card", children: [
|
|
70
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 bg-gradient-to-r from-brand-rose/10 to-brand-orange/10 px-4 py-3", children: [
|
|
71
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold leading-snug", children: "Earn XP. Share the Creator's Fund." }),
|
|
72
|
-
/* @__PURE__ */ jsxs(
|
|
73
|
-
Link,
|
|
74
|
-
{
|
|
75
|
-
href: "/rewards",
|
|
76
|
-
className: "inline-flex shrink-0 items-center gap-1 text-xs font-semibold text-brand-rose hover:opacity-80 transition-opacity",
|
|
77
|
-
children: [
|
|
78
|
-
"Start earning ",
|
|
79
|
-
/* @__PURE__ */ jsx(ArrowRight, { className: "h-3 w-3" })
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
)
|
|
54
|
+
return /* @__PURE__ */ jsxs("section", { className: "grid grid-cols-1 gap-6 lg:grid-cols-2 lg:gap-8", children: [
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
CommunityCard,
|
|
57
|
+
{
|
|
58
|
+
icon: /* @__PURE__ */ jsx(Activity, {}),
|
|
59
|
+
title: "Activities",
|
|
60
|
+
subtitle: !isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
|
+
/* @__PURE__ */ jsx(RefreshCw, { className: "h-2.5 w-2.5" }),
|
|
62
|
+
"Updated ",
|
|
63
|
+
timeAgo(lastUpdated)
|
|
83
64
|
] }),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
65
|
+
href: "/activities",
|
|
66
|
+
linkLabel: "View all",
|
|
67
|
+
children: isLoading ? /* @__PURE__ */ jsx("div", { className: "divide-y divide-border/50", children: Array.from({ length: ROWS }).map((_, i) => /* @__PURE__ */ jsxs("div", { className: "flex h-16 items-center gap-3 px-4", children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-8 shrink-0 rounded-lg" }),
|
|
69
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-9 shrink-0 rounded-md" }),
|
|
70
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2", children: [
|
|
71
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-40" }),
|
|
72
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-2.5 w-24" })
|
|
73
|
+
] })
|
|
74
|
+
] }, i)) }) : activities.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "py-12 text-center", children: [
|
|
75
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: emptyMessages.activity.title }),
|
|
76
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: emptyMessages.activity.description })
|
|
77
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "divide-y divide-border/50", children: activities.map((activity, i) => /* @__PURE__ */ jsx(
|
|
78
|
+
ActivityRow,
|
|
79
|
+
{
|
|
80
|
+
activity,
|
|
81
|
+
showActor: true,
|
|
82
|
+
showExplorer: true
|
|
83
|
+
},
|
|
84
|
+
activity.txHash ? `${activity.txHash}-${activity.type}-${activity.nftTokenId ?? ""}` : `activity-${i}`
|
|
85
|
+
)) })
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ jsx(
|
|
89
|
+
CommunityCard,
|
|
90
|
+
{
|
|
91
|
+
icon: /* @__PURE__ */ jsx(Sparkles, {}),
|
|
92
|
+
title: "Rewards",
|
|
93
|
+
subtitle: "Earn XP. Share the Creator's Fund.",
|
|
94
|
+
href: "/rewards",
|
|
95
|
+
linkLabel: "Scoreboard",
|
|
96
|
+
children: /* @__PURE__ */ jsx(LeaderboardPanel, { myAddress: address, limit: ROWS, showHeading: false, compact: true })
|
|
97
|
+
}
|
|
98
|
+
)
|
|
87
99
|
] });
|
|
88
100
|
}
|
|
89
101
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/discover-community-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Activity, ArrowRight, RefreshCw, Sparkles } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-community-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState, type ReactNode } from \"react\";\nimport { Activity, ArrowRight, RefreshCw, Sparkles } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport { Skeleton } from \"./skeleton.js\";\nimport { ActivityRow } from \"./activity-row.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { LeaderboardPanel } from \"./rewards/leaderboard-panel.js\";\nimport { useActivities } from \"../utils/use-activities.js\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { emptyMessages } from \"../utils/empty-messages.js\";\n\nconst ROWS = 5;\n\nfunction CommunityCard({\n icon,\n title,\n subtitle,\n href,\n linkLabel,\n children,\n}: {\n icon: ReactNode;\n title: string;\n subtitle?: ReactNode;\n href: string;\n linkLabel: string;\n children: ReactNode;\n}) {\n return (\n <section className=\"overflow-hidden rounded-2xl border border-border/50 bg-card\">\n <div className=\"flex items-center justify-between gap-3 border-b border-border/50 px-4 py-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 <p className=\"mt-1 flex h-3.5 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 <div className=\"min-h-[324px]\">{children}</div>\n </section>\n );\n}\n\nexport function DiscoverCommunitySection() {\n const { activities, isLoading } = useActivities({ limit: ROWS });\n const { walletAddress: address } = useMedialaneApp();\n const [lastUpdated, setLastUpdated] = useState(() => new Date().toISOString());\n\n useEffect(() => {\n if (!isLoading) setLastUpdated(new Date().toISOString());\n }, [activities, isLoading]);\n\n return (\n <section className=\"grid grid-cols-1 gap-6 lg:grid-cols-2 lg:gap-8\">\n <CommunityCard\n icon={<Activity />}\n title=\"Activities\"\n subtitle={\n !isLoading && (\n <>\n <RefreshCw className=\"h-2.5 w-2.5\" />\n Updated {timeAgo(lastUpdated)}\n </>\n )\n }\n href=\"/activities\"\n linkLabel=\"View all\"\n >\n {isLoading ? (\n <div className=\"divide-y divide-border/50\">\n {Array.from({ length: ROWS }).map((_, i) => (\n <div key={i} className=\"flex h-16 items-center gap-3 px-4\">\n <Skeleton className=\"h-8 w-8 shrink-0 rounded-lg\" />\n <Skeleton className=\"h-9 w-9 shrink-0 rounded-md\" />\n <div className=\"flex-1 space-y-2\">\n <Skeleton className=\"h-3.5 w-40\" />\n <Skeleton className=\"h-2.5 w-24\" />\n </div>\n </div>\n ))}\n </div>\n ) : activities.length === 0 ? (\n <div className=\"py-12 text-center\">\n <p className=\"text-sm font-medium\">{emptyMessages.activity.title}</p>\n <p className=\"text-sm text-muted-foreground\">{emptyMessages.activity.description}</p>\n </div>\n ) : (\n <div className=\"divide-y divide-border/50\">\n {activities.map((activity, i) => (\n <ActivityRow\n key={activity.txHash ? `${activity.txHash}-${activity.type}-${activity.nftTokenId ?? \"\"}` : `activity-${i}`}\n activity={activity}\n showActor\n showExplorer\n />\n ))}\n </div>\n )}\n </CommunityCard>\n\n <CommunityCard\n icon={<Sparkles />}\n title=\"Rewards\"\n subtitle=\"Earn XP. Share the Creator's Fund.\"\n href=\"/rewards\"\n linkLabel=\"Scoreboard\"\n >\n <LeaderboardPanel myAddress={address} limit={ROWS} showHeading={false} compact />\n </CommunityCard>\n </section>\n );\n}\n"],"mappings":";AAkCU,SAkCE,UAlCF,KACA,YADA;AAhCV,SAAS,WAAW,gBAAgC;AACpD,SAAS,UAAU,YAAY,WAAW,gBAAgB;AAC1D,OAAO,UAAU;AACjB,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAE9B,MAA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,oBAAC,SAAI,WAAU,6BACZ,gBAAM,KAAK,EAAE,QAAQ,KAAK,CAAC,EAAE,IAAI,CAAC,GAAG,MACpC,qBAAC,SAAY,WAAU,qCACrB;AAAA,8BAAC,YAAS,WAAU,+BAA8B;AAAA,UAClD,oBAAC,YAAS,WAAU,+BAA8B;AAAA,UAClD,qBAAC,SAAI,WAAU,oBACb;AAAA,gCAAC,YAAS,WAAU,cAAa;AAAA,YACjC,oBAAC,YAAS,WAAU,cAAa;AAAA,aACnC;AAAA,aANQ,CAOV,CACD,GACH,IACE,WAAW,WAAW,IACxB,qBAAC,SAAI,WAAU,qBACb;AAAA,8BAAC,OAAE,WAAU,uBAAuB,wBAAc,SAAS,OAAM;AAAA,UACjE,oBAAC,OAAE,WAAU,iCAAiC,wBAAc,SAAS,aAAY;AAAA,WACnF,IAEA,oBAAC,SAAI,WAAU,6BACZ,qBAAW,IAAI,CAAC,UAAU,MACzB;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA,WAAS;AAAA,YACT,cAAY;AAAA;AAAA,UAHP,SAAS,SAAS,GAAG,SAAS,MAAM,IAAI,SAAS,IAAI,IAAI,SAAS,cAAc,EAAE,KAAK,YAAY,CAAC;AAAA,QAI3G,CACD,GACH;AAAA;AAAA,IAEJ;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,oBAAC,YAAS;AAAA,QAChB,OAAM;AAAA,QACN,UAAS;AAAA,QACT,MAAK;AAAA,QACL,WAAU;AAAA,QAEV,8BAAC,oBAAiB,WAAW,SAAS,OAAO,MAAM,aAAa,OAAO,SAAO,MAAC;AAAA;AAAA,IACjF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -23,6 +23,7 @@ __export(discover_features_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(discover_features_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_lucide_react = require("lucide-react");
|
|
26
|
+
var import_scroll_section = require("./scroll-section.js");
|
|
26
27
|
var import_cn = require("../utils/cn.js");
|
|
27
28
|
const HUES = [
|
|
28
29
|
{ text: "text-brand-blue", border: "border-brand-blue/30", tint: "bg-brand-blue/10" },
|
|
@@ -47,10 +48,10 @@ const FEATURES = [
|
|
|
47
48
|
{ icon: import_lucide_react.Code, title: "Open source and auditable" }
|
|
48
49
|
];
|
|
49
50
|
function DiscoverFeatures() {
|
|
50
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_scroll_section.ScrollSection, { icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.BadgeCheck, {}), title: "Medialane features", children: FEATURES.map(({ icon: Icon, title }, i) => {
|
|
51
52
|
const hue = HUES[i % HUES.length];
|
|
52
53
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
53
|
-
"
|
|
54
|
+
"div",
|
|
54
55
|
{
|
|
55
56
|
className: (0, import_cn.cn)(
|
|
56
57
|
"flex min-h-[168px] w-56 shrink-0 snap-start flex-col gap-4 rounded-2xl border bg-card p-6 sm:w-64",
|
|
@@ -63,7 +64,7 @@ function DiscoverFeatures() {
|
|
|
63
64
|
},
|
|
64
65
|
title
|
|
65
66
|
);
|
|
66
|
-
}) })
|
|
67
|
+
}) });
|
|
67
68
|
}
|
|
68
69
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
70
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/discover-features.tsx"],"sourcesContent":["import {\n Code,\n Database,\n DoorOpen,\n EyeOff,\n FileCog,\n Gem,\n Globe,\n HandCoins,\n Lock,\n Percent,\n ScanEye,\n Scale,\n ShieldCheck,\n type LucideIcon,\n} from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst HUES = [\n { text: \"text-brand-blue\", border: \"border-brand-blue/30\", tint: \"bg-brand-blue/10\" },\n { text: \"text-brand-maeve\", border: \"border-brand-maeve/30\", tint: \"bg-brand-maeve/10\" },\n { text: \"text-brand-orange\", border: \"border-brand-orange/30\", tint: \"bg-brand-orange/10\" },\n { text: \"text-brand-purple\", border: \"border-brand-purple/30\", tint: \"bg-brand-purple/10\" },\n { text: \"text-brand-rose\", border: \"border-brand-rose/30\", tint: \"bg-brand-rose/10\" },\n];\n\nconst FEATURES: ReadonlyArray<{ icon: LucideIcon; title: string }> = [\n { icon: HandCoins, title: \"99% to creators and owners\" },\n { icon: Globe, title: \"Censorship resistance\" },\n { icon: ShieldCheck, title: \"Stark cryptography\" },\n { icon: EyeOff, title: \"Privacy by design\" },\n { icon: ScanEye, title: \"Zero knowledge proof with Starknet\" },\n { icon: Percent, title: \"Zero fees on protocols\" },\n { icon: Lock, title: \"Immutable smart contracts\" },\n { icon: DoorOpen, title: \"Permissionless\" },\n { icon: Database, title: \"Smart contracts are the source of truth\" },\n { icon: FileCog, title: \"Programmable IP\" },\n { icon: Gem, title: \"Immutable assets\" },\n { icon: Scale, title: \"IP protection compliance\" },\n { icon: Code, title: \"Open source and auditable\" },\n];\n\nexport function DiscoverFeatures() {\n return (\n <
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-features.tsx"],"sourcesContent":["import {\n BadgeCheck,\n Code,\n Database,\n DoorOpen,\n EyeOff,\n FileCog,\n Gem,\n Globe,\n HandCoins,\n Lock,\n Percent,\n ScanEye,\n Scale,\n ShieldCheck,\n type LucideIcon,\n} from \"lucide-react\";\nimport { ScrollSection } from \"./scroll-section.js\";\nimport { cn } from \"../utils/cn.js\";\n\nconst HUES = [\n { text: \"text-brand-blue\", border: \"border-brand-blue/30\", tint: \"bg-brand-blue/10\" },\n { text: \"text-brand-maeve\", border: \"border-brand-maeve/30\", tint: \"bg-brand-maeve/10\" },\n { text: \"text-brand-orange\", border: \"border-brand-orange/30\", tint: \"bg-brand-orange/10\" },\n { text: \"text-brand-purple\", border: \"border-brand-purple/30\", tint: \"bg-brand-purple/10\" },\n { text: \"text-brand-rose\", border: \"border-brand-rose/30\", tint: \"bg-brand-rose/10\" },\n];\n\nconst FEATURES: ReadonlyArray<{ icon: LucideIcon; title: string }> = [\n { icon: HandCoins, title: \"99% to creators and owners\" },\n { icon: Globe, title: \"Censorship resistance\" },\n { icon: ShieldCheck, title: \"Stark cryptography\" },\n { icon: EyeOff, title: \"Privacy by design\" },\n { icon: ScanEye, title: \"Zero knowledge proof with Starknet\" },\n { icon: Percent, title: \"Zero fees on protocols\" },\n { icon: Lock, title: \"Immutable smart contracts\" },\n { icon: DoorOpen, title: \"Permissionless\" },\n { icon: Database, title: \"Smart contracts are the source of truth\" },\n { icon: FileCog, title: \"Programmable IP\" },\n { icon: Gem, title: \"Immutable assets\" },\n { icon: Scale, title: \"IP protection compliance\" },\n { icon: Code, title: \"Open source and auditable\" },\n];\n\nexport function DiscoverFeatures() {\n return (\n <ScrollSection icon={<BadgeCheck />} title=\"Medialane features\">\n {FEATURES.map(({ icon: Icon, title }, i) => {\n const hue = HUES[i % HUES.length]!;\n return (\n <div\n key={title}\n className={cn(\n \"flex min-h-[168px] w-56 shrink-0 snap-start flex-col gap-4 rounded-2xl border bg-card p-6 sm:w-64\",\n hue.border,\n )}\n >\n <span className={cn(\"flex h-11 w-11 items-center justify-center rounded-xl\", hue.tint)}>\n <Icon className={cn(\"h-6 w-6\", hue.text)} />\n </span>\n <h3 className=\"text-lg font-black leading-snug tracking-tight\">{title}</h3>\n </div>\n );\n })}\n </ScrollSection>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8CyB;AA9CzB,0BAgBO;AACP,4BAA8B;AAC9B,gBAAmB;AAEnB,MAAM,OAAO;AAAA,EACX,EAAE,MAAM,mBAAmB,QAAQ,wBAAwB,MAAM,mBAAmB;AAAA,EACpF,EAAE,MAAM,oBAAoB,QAAQ,yBAAyB,MAAM,oBAAoB;AAAA,EACvF,EAAE,MAAM,qBAAqB,QAAQ,0BAA0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AAA,MATjE;AAAA,IAUP;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import {
|
|
3
|
+
BadgeCheck,
|
|
3
4
|
Code,
|
|
4
5
|
Database,
|
|
5
6
|
DoorOpen,
|
|
@@ -14,6 +15,7 @@ import {
|
|
|
14
15
|
Scale,
|
|
15
16
|
ShieldCheck
|
|
16
17
|
} from "lucide-react";
|
|
18
|
+
import { ScrollSection } from "./scroll-section.js";
|
|
17
19
|
import { cn } from "../utils/cn.js";
|
|
18
20
|
const HUES = [
|
|
19
21
|
{ text: "text-brand-blue", border: "border-brand-blue/30", tint: "bg-brand-blue/10" },
|
|
@@ -38,10 +40,10 @@ const FEATURES = [
|
|
|
38
40
|
{ icon: Code, title: "Open source and auditable" }
|
|
39
41
|
];
|
|
40
42
|
function DiscoverFeatures() {
|
|
41
|
-
return /* @__PURE__ */ jsx(
|
|
43
|
+
return /* @__PURE__ */ jsx(ScrollSection, { icon: /* @__PURE__ */ jsx(BadgeCheck, {}), title: "Medialane features", children: FEATURES.map(({ icon: Icon, title }, i) => {
|
|
42
44
|
const hue = HUES[i % HUES.length];
|
|
43
45
|
return /* @__PURE__ */ jsxs(
|
|
44
|
-
"
|
|
46
|
+
"div",
|
|
45
47
|
{
|
|
46
48
|
className: cn(
|
|
47
49
|
"flex min-h-[168px] w-56 shrink-0 snap-start flex-col gap-4 rounded-2xl border bg-card p-6 sm:w-64",
|
|
@@ -54,7 +56,7 @@ function DiscoverFeatures() {
|
|
|
54
56
|
},
|
|
55
57
|
title
|
|
56
58
|
);
|
|
57
|
-
}) })
|
|
59
|
+
}) });
|
|
58
60
|
}
|
|
59
61
|
export {
|
|
60
62
|
DiscoverFeatures
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/discover-features.tsx"],"sourcesContent":["import {\n Code,\n Database,\n DoorOpen,\n EyeOff,\n FileCog,\n Gem,\n Globe,\n HandCoins,\n Lock,\n Percent,\n ScanEye,\n Scale,\n ShieldCheck,\n type LucideIcon,\n} from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst HUES = [\n { text: \"text-brand-blue\", border: \"border-brand-blue/30\", tint: \"bg-brand-blue/10\" },\n { text: \"text-brand-maeve\", border: \"border-brand-maeve/30\", tint: \"bg-brand-maeve/10\" },\n { text: \"text-brand-orange\", border: \"border-brand-orange/30\", tint: \"bg-brand-orange/10\" },\n { text: \"text-brand-purple\", border: \"border-brand-purple/30\", tint: \"bg-brand-purple/10\" },\n { text: \"text-brand-rose\", border: \"border-brand-rose/30\", tint: \"bg-brand-rose/10\" },\n];\n\nconst FEATURES: ReadonlyArray<{ icon: LucideIcon; title: string }> = [\n { icon: HandCoins, title: \"99% to creators and owners\" },\n { icon: Globe, title: \"Censorship resistance\" },\n { icon: ShieldCheck, title: \"Stark cryptography\" },\n { icon: EyeOff, title: \"Privacy by design\" },\n { icon: ScanEye, title: \"Zero knowledge proof with Starknet\" },\n { icon: Percent, title: \"Zero fees on protocols\" },\n { icon: Lock, title: \"Immutable smart contracts\" },\n { icon: DoorOpen, title: \"Permissionless\" },\n { icon: Database, title: \"Smart contracts are the source of truth\" },\n { icon: FileCog, title: \"Programmable IP\" },\n { icon: Gem, title: \"Immutable assets\" },\n { icon: Scale, title: \"IP protection compliance\" },\n { icon: Code, title: \"Open source and auditable\" },\n];\n\nexport function DiscoverFeatures() {\n return (\n <
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-features.tsx"],"sourcesContent":["import {\n BadgeCheck,\n Code,\n Database,\n DoorOpen,\n EyeOff,\n FileCog,\n Gem,\n Globe,\n HandCoins,\n Lock,\n Percent,\n ScanEye,\n Scale,\n ShieldCheck,\n type LucideIcon,\n} from \"lucide-react\";\nimport { ScrollSection } from \"./scroll-section.js\";\nimport { cn } from \"../utils/cn.js\";\n\nconst HUES = [\n { text: \"text-brand-blue\", border: \"border-brand-blue/30\", tint: \"bg-brand-blue/10\" },\n { text: \"text-brand-maeve\", border: \"border-brand-maeve/30\", tint: \"bg-brand-maeve/10\" },\n { text: \"text-brand-orange\", border: \"border-brand-orange/30\", tint: \"bg-brand-orange/10\" },\n { text: \"text-brand-purple\", border: \"border-brand-purple/30\", tint: \"bg-brand-purple/10\" },\n { text: \"text-brand-rose\", border: \"border-brand-rose/30\", tint: \"bg-brand-rose/10\" },\n];\n\nconst FEATURES: ReadonlyArray<{ icon: LucideIcon; title: string }> = [\n { icon: HandCoins, title: \"99% to creators and owners\" },\n { icon: Globe, title: \"Censorship resistance\" },\n { icon: ShieldCheck, title: \"Stark cryptography\" },\n { icon: EyeOff, title: \"Privacy by design\" },\n { icon: ScanEye, title: \"Zero knowledge proof with Starknet\" },\n { icon: Percent, title: \"Zero fees on protocols\" },\n { icon: Lock, title: \"Immutable smart contracts\" },\n { icon: DoorOpen, title: \"Permissionless\" },\n { icon: Database, title: \"Smart contracts are the source of truth\" },\n { icon: FileCog, title: \"Programmable IP\" },\n { icon: Gem, title: \"Immutable assets\" },\n { icon: Scale, title: \"IP protection compliance\" },\n { icon: Code, title: \"Open source and auditable\" },\n];\n\nexport function DiscoverFeatures() {\n return (\n <ScrollSection icon={<BadgeCheck />} title=\"Medialane features\">\n {FEATURES.map(({ icon: Icon, title }, i) => {\n const hue = HUES[i % HUES.length]!;\n return (\n <div\n key={title}\n className={cn(\n \"flex min-h-[168px] w-56 shrink-0 snap-start flex-col gap-4 rounded-2xl border bg-card p-6 sm:w-64\",\n hue.border,\n )}\n >\n <span className={cn(\"flex h-11 w-11 items-center justify-center rounded-xl\", hue.tint)}>\n <Icon className={cn(\"h-6 w-6\", hue.text)} />\n </span>\n <h3 className=\"text-lg font-black leading-snug tracking-tight\">{title}</h3>\n </div>\n );\n })}\n </ScrollSection>\n );\n}\n"],"mappings":"AA8CyB,cAIf,YAJe;AA9CzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;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AAM,GAAG,MAAM;AAC1C,UAAM,MAAM,KAAK,IAAI,KAAK,MAAM;AAChC,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,WAAW;AAAA,UACT;AAAA,UACA,IAAI;AAAA,QACN;AAAA,QAEA;AAAA,8BAAC,UAAK,WAAW,GAAG,yDAAyD,IAAI,IAAI,GACnF,8BAAC,QAAK,WAAW,GAAG,WAAW,IAAI,IAAI,GAAG,GAC5C;AAAA,UACA,oBAAC,QAAG,WAAU,kDAAkD,iBAAM;AAAA;AAAA;AAAA,MATjE;AAAA,IAUP;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
|
|
@@ -91,8 +91,8 @@ function DiscoverPage({ useMarketActions, heroBadge, heroHeadline }) {
|
|
|
91
91
|
}
|
|
92
92
|
),
|
|
93
93
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ip_type_nav.IpTypeNav, {}),
|
|
94
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_discover_features.DiscoverFeatures, {}),
|
|
95
94
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_discover_community_section.DiscoverCommunitySection, {}),
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_discover_features.DiscoverFeatures, {}),
|
|
96
96
|
market.dialogs
|
|
97
97
|
] });
|
|
98
98
|
}
|
|
@@ -1 +1 @@
|
|
|
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 { DiscoverFeatures } from \"./discover-features.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 <
|
|
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 { DiscoverFeatures } from \"./discover-features.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 <DiscoverFeatures />\n {market.dialogs}\n </PageContainer>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoCQ;AAlCR,iBAA0C;AAC1C,0BAAyB;AACzB,4BAA8B;AAC9B,2BAA6B;AAC7B,wCAAyC;AACzC,mCAAsC;AACtC,wCAAyC;AACzC,+BAAiC;AACjC,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,UAA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overPage({ useMarketActions, heroBadge, heroHeadline }) {
|
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
70
|
/* @__PURE__ */ jsx(IpTypeNav, {}),
|
|
71
|
-
/* @__PURE__ */ jsx(DiscoverFeatures, {}),
|
|
72
71
|
/* @__PURE__ */ jsx(DiscoverCommunitySection, {}),
|
|
72
|
+
/* @__PURE__ */ jsx(DiscoverFeatures, {}),
|
|
73
73
|
market.dialogs
|
|
74
74
|
] });
|
|
75
75
|
}
|
|
@@ -1 +1 @@
|
|
|
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 { DiscoverFeatures } from \"./discover-features.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 <
|
|
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 { DiscoverFeatures } from \"./discover-features.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)}\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AAA,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,IAC1B,oBAAC,oBAAiB;AAAA,IACjB,OAAO;AAAA,KACV;AAEJ;","names":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
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 | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> |
|
|
8
|
+
declare function FastMint(props: FastMintProps): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
9
9
|
|
|
10
10
|
export { FastMint };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
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 | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> |
|
|
8
|
+
declare function FastMint(props: FastMintProps): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
9
9
|
|
|
10
10
|
export { FastMint };
|
|
@@ -54,7 +54,7 @@ function CreatorIdentity({ address, compact }) {
|
|
|
54
54
|
walletAddress: address
|
|
55
55
|
});
|
|
56
56
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "inline-flex min-w-0 items-center gap-2.5", children: [
|
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className:
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "relative h-9 w-9 shrink-0 overflow-hidden rounded-full bg-foreground/[0.08]", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
58
|
import_image.default,
|
|
59
59
|
{
|
|
60
60
|
src: avatarUrl ?? "/icon.png",
|
|
@@ -83,7 +83,7 @@ function LeaderboardPanel({
|
|
|
83
83
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex h-7 w-7 items-center justify-center rounded-lg bg-gradient-to-br from-brand-rose to-brand-orange text-white shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, { className: "h-3.5 w-3.5" }) }),
|
|
84
84
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-sm font-black", children: "Community Rewards" })
|
|
85
85
|
] }),
|
|
86
|
-
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: compact ? "divide-y divide-border/40" : "space-y-1.5", children: Array.from({ length: Math.min(limit, 6) }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: compact ? "h-
|
|
86
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: compact ? "divide-y divide-border/40" : "space-y-1.5", children: Array.from({ length: Math.min(limit, 6) }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: compact ? "h-16 w-full rounded-none" : "h-10 w-full rounded-lg" }, i)) }) : rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: (0, import_cn.cn)("text-sm text-muted-foreground py-4", compact && "px-4"), children: "Nobody's earned points yet \u2014 be the first." }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
87
87
|
import_leaderboard_table.LeaderboardTable,
|
|
88
88
|
{
|
|
89
89
|
entries: rows,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/leaderboard-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport { Sparkles } from \"lucide-react\";\nimport { normalizeAddress, profileHref } from \"@medialane/sdk\";\nimport Image from \"../image.js\";\nimport Link from \"../link.js\";\nimport { Skeleton } from \"../skeleton.js\";\nimport { AddressDisplay } from \"../address-display.js\";\nimport { LeaderboardTable } from \"./leaderboard-table.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { profileIdentity } from \"../../utils/profile-identity.js\";\nimport { useCreatorProfile } from \"../../utils/use-profiles.js\";\nimport { useImageUrl } from \"../../utils/use-image-url.js\";\nimport { useLeaderboard } from \"../../utils/use-rewards.js\";\n\nexport interface LeaderboardPanelProps {\n myAddress?: string | null;\n limit?: number;\n showHeading?: boolean;\n viewAllHref?: string;\n compact?: boolean;\n className?: string;\n}\n\nfunction CreatorIdentity({ address, compact }: { address: string; compact?: boolean }) {\n const { profile } = useCreatorProfile(address);\n const avatarUrl = useImageUrl()(profile?.avatarImage, { width: 96 });\n const { identity: name } = profileIdentity({\n username: profile?.username,\n name: profile?.name,\n walletAddress: address,\n });\n\n return (\n <span className=\"inline-flex min-w-0 items-center gap-2.5\">\n <span className
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/leaderboard-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport { Sparkles } from \"lucide-react\";\nimport { normalizeAddress, profileHref } from \"@medialane/sdk\";\nimport Image from \"../image.js\";\nimport Link from \"../link.js\";\nimport { Skeleton } from \"../skeleton.js\";\nimport { AddressDisplay } from \"../address-display.js\";\nimport { LeaderboardTable } from \"./leaderboard-table.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { profileIdentity } from \"../../utils/profile-identity.js\";\nimport { useCreatorProfile } from \"../../utils/use-profiles.js\";\nimport { useImageUrl } from \"../../utils/use-image-url.js\";\nimport { useLeaderboard } from \"../../utils/use-rewards.js\";\n\nexport interface LeaderboardPanelProps {\n myAddress?: string | null;\n limit?: number;\n showHeading?: boolean;\n viewAllHref?: string;\n compact?: boolean;\n className?: string;\n}\n\nfunction CreatorIdentity({ address, compact }: { address: string; compact?: boolean }) {\n const { profile } = useCreatorProfile(address);\n const avatarUrl = useImageUrl()(profile?.avatarImage, { width: 96 });\n const { identity: name } = profileIdentity({\n username: profile?.username,\n name: profile?.name,\n walletAddress: address,\n });\n\n return (\n <span className=\"inline-flex min-w-0 items-center gap-2.5\">\n <span className=\"relative h-9 w-9 shrink-0 overflow-hidden rounded-full bg-foreground/[0.08]\">\n <Image\n src={avatarUrl ?? \"/icon.png\"}\n alt=\"\"\n fill\n unoptimized\n className={avatarUrl ? \"object-cover\" : \"object-cover p-[15%] opacity-50\"}\n />\n </span>\n {name ? (\n <span className={cn(\"truncate font-bold\", compact ? \"text-sm font-semibold\" : \"text-base\")}>{name}</span>\n ) : (\n <AddressDisplay address={address} chars={4} showCopy={false} className={compact ? \"text-sm font-semibold\" : \"text-base font-bold\"} />\n )}\n </span>\n );\n}\n\nexport function LeaderboardPanel({\n myAddress,\n limit = 20,\n showHeading = true,\n viewAllHref,\n compact,\n className,\n}: LeaderboardPanelProps) {\n const { data, isLoading } = useLeaderboard(1, limit);\n const rows = data?.data ?? [];\n\n const highlightAddress = myAddress ? normalizeAddress(\"STARKNET\", myAddress) : null;\n\n return (\n <div className={cn(compact ? \"\" : \"space-y-3\", className)}>\n {showHeading && (\n <div className=\"flex items-center gap-2\">\n <div className=\"flex h-7 w-7 items-center justify-center rounded-lg bg-gradient-to-br from-brand-rose to-brand-orange text-white shrink-0\">\n <Sparkles className=\"h-3.5 w-3.5\" />\n </div>\n <h2 className=\"text-sm font-black\">Community Rewards</h2>\n </div>\n )}\n\n {isLoading ? (\n <div className={compact ? \"divide-y divide-border/40\" : \"space-y-1.5\"}>\n {Array.from({ length: Math.min(limit, 6) }).map((_, i) => (\n <Skeleton key={i} className={compact ? \"h-16 w-full rounded-none\" : \"h-10 w-full rounded-lg\"} />\n ))}\n </div>\n ) : rows.length === 0 ? (\n <p className={cn(\"text-sm text-muted-foreground py-4\", compact && \"px-4\")}>\n Nobody's earned points yet — be the first.\n </p>\n ) : (\n <LeaderboardTable\n entries={rows}\n highlightAddress={highlightAddress}\n compact={compact}\n renderAddress={(address) => (\n <Link href={profileHref({ address })} className=\"hover:text-foreground transition-colors\">\n <CreatorIdentity address={address} compact={compact} />\n </Link>\n )}\n />\n )}\n\n {viewAllHref && rows.length > 0 && (\n <Link\n href={viewAllHref}\n className=\"inline-flex items-center gap-1 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors pt-1\"\n >\n View scoreboard →\n </Link>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCI;AAhCJ,0BAAyB;AACzB,iBAA8C;AAC9C,mBAAkB;AAClB,kBAAiB;AACjB,sBAAyB;AACzB,6BAA+B;AAC/B,+BAAiC;AACjC,gBAAmB;AACnB,8BAAgC;AAChC,0BAAkC;AAClC,2BAA4B;AAC5B,yBAA+B;AAW/B,SAAS,gBAAgB,EAAE,SAAS,QAAQ,GAA2C;AACrF,QAAM,EAAE,QAAQ,QAAI,uCAAkB,OAAO;AAC7C,QAAM,gBAAY,kCAAY,EAAE,SAAS,aAAa,EAAE,OAAO,GAAG,CAAC;AACnE,QAAM,EAAE,UAAU,KAAK,QAAI,yCAAgB;AAAA,IACzC,UAAU,SAAS;AAAA,IACnB,MAAM,SAAS;AAAA,IACf,eAAe;AAAA,EACjB,CAAC;AAED,SACE,6CAAC,UAAK,WAAU,4CACd;AAAA,gDAAC,UAAK,WAAU,+EACd;AAAA,MAAC,aAAAA;AAAA,MAAA;AAAA,QACC,KAAK,aAAa;AAAA,QAClB,KAAI;AAAA,QACJ,MAAI;AAAA,QACJ,aAAW;AAAA,QACX,WAAW,YAAY,iBAAiB;AAAA;AAAA,IAC1C,GACF;AAAA,IACC,OACC,4CAAC,UAAK,eAAW,cAAG,sBAAsB,UAAU,0BAA0B,WAAW,GAAI,gBAAK,IAElG,4CAAC,yCAAe,SAAkB,OAAO,GAAG,UAAU,OAAO,WAAW,UAAU,0BAA0B,uBAAuB;AAAA,KAEvI;AAEJ;AAEO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,QAAQ;AAAA,EACR,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AACF,GAA0B;AACxB,QAAM,EAAE,MAAM,UAAU,QAAI,mCAAe,GAAG,KAAK;AACnD,QAAM,OAAO,MAAM,QAAQ,CAAC;AAE5B,QAAM,mBAAmB,gBAAY,6BAAiB,YAAY,SAAS,IAAI;AAE/E,SACE,6CAAC,SAAI,eAAW,cAAG,UAAU,KAAK,aAAa,SAAS,GACrD;AAAA,mBACC,6CAAC,SAAI,WAAU,2BACb;AAAA,kDAAC,SAAI,WAAU,6HACb,sDAAC,gCAAS,WAAU,eAAc,GACpC;AAAA,MACA,4CAAC,QAAG,WAAU,sBAAqB,+BAAiB;AAAA,OACtD;AAAA,IAGD,YACC,4CAAC,SAAI,WAAW,UAAU,8BAA8B,eACrD,gBAAM,KAAK,EAAE,QAAQ,KAAK,IAAI,OAAO,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAClD,4CAAC,4BAAiB,WAAW,UAAU,6BAA6B,4BAArD,CAA+E,CAC/F,GACH,IACE,KAAK,WAAW,IAClB,4CAAC,OAAE,eAAW,cAAG,sCAAsC,WAAW,MAAM,GAAG,6DAE3E,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA,eAAe,CAAC,YACd,4CAAC,YAAAC,SAAA,EAAK,UAAM,wBAAY,EAAE,QAAQ,CAAC,GAAG,WAAU,2CAC9C,sDAAC,mBAAgB,SAAkB,SAAkB,GACvD;AAAA;AAAA,IAEJ;AAAA,IAGD,eAAe,KAAK,SAAS,KAC5B;AAAA,MAAC,YAAAA;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,WAAU;AAAA,QACX;AAAA;AAAA,IAED;AAAA,KAEJ;AAEJ;","names":["Image","Link"]}
|
|
@@ -21,7 +21,7 @@ function CreatorIdentity({ address, compact }) {
|
|
|
21
21
|
walletAddress: address
|
|
22
22
|
});
|
|
23
23
|
return /* @__PURE__ */ jsxs("span", { className: "inline-flex min-w-0 items-center gap-2.5", children: [
|
|
24
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
24
|
+
/* @__PURE__ */ jsx("span", { className: "relative h-9 w-9 shrink-0 overflow-hidden rounded-full bg-foreground/[0.08]", children: /* @__PURE__ */ jsx(
|
|
25
25
|
Image,
|
|
26
26
|
{
|
|
27
27
|
src: avatarUrl ?? "/icon.png",
|
|
@@ -50,7 +50,7 @@ function LeaderboardPanel({
|
|
|
50
50
|
/* @__PURE__ */ jsx("div", { className: "flex h-7 w-7 items-center justify-center rounded-lg bg-gradient-to-br from-brand-rose to-brand-orange text-white shrink-0", children: /* @__PURE__ */ jsx(Sparkles, { className: "h-3.5 w-3.5" }) }),
|
|
51
51
|
/* @__PURE__ */ jsx("h2", { className: "text-sm font-black", children: "Community Rewards" })
|
|
52
52
|
] }),
|
|
53
|
-
isLoading ? /* @__PURE__ */ jsx("div", { className: compact ? "divide-y divide-border/40" : "space-y-1.5", children: Array.from({ length: Math.min(limit, 6) }).map((_, i) => /* @__PURE__ */ jsx(Skeleton, { className: compact ? "h-
|
|
53
|
+
isLoading ? /* @__PURE__ */ jsx("div", { className: compact ? "divide-y divide-border/40" : "space-y-1.5", children: Array.from({ length: Math.min(limit, 6) }).map((_, i) => /* @__PURE__ */ jsx(Skeleton, { className: compact ? "h-16 w-full rounded-none" : "h-10 w-full rounded-lg" }, i)) }) : rows.length === 0 ? /* @__PURE__ */ jsx("p", { className: cn("text-sm text-muted-foreground py-4", compact && "px-4"), children: "Nobody's earned points yet \u2014 be the first." }) : /* @__PURE__ */ jsx(
|
|
54
54
|
LeaderboardTable,
|
|
55
55
|
{
|
|
56
56
|
entries: rows,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/leaderboard-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport { Sparkles } from \"lucide-react\";\nimport { normalizeAddress, profileHref } from \"@medialane/sdk\";\nimport Image from \"../image.js\";\nimport Link from \"../link.js\";\nimport { Skeleton } from \"../skeleton.js\";\nimport { AddressDisplay } from \"../address-display.js\";\nimport { LeaderboardTable } from \"./leaderboard-table.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { profileIdentity } from \"../../utils/profile-identity.js\";\nimport { useCreatorProfile } from \"../../utils/use-profiles.js\";\nimport { useImageUrl } from \"../../utils/use-image-url.js\";\nimport { useLeaderboard } from \"../../utils/use-rewards.js\";\n\nexport interface LeaderboardPanelProps {\n myAddress?: string | null;\n limit?: number;\n showHeading?: boolean;\n viewAllHref?: string;\n compact?: boolean;\n className?: string;\n}\n\nfunction CreatorIdentity({ address, compact }: { address: string; compact?: boolean }) {\n const { profile } = useCreatorProfile(address);\n const avatarUrl = useImageUrl()(profile?.avatarImage, { width: 96 });\n const { identity: name } = profileIdentity({\n username: profile?.username,\n name: profile?.name,\n walletAddress: address,\n });\n\n return (\n <span className=\"inline-flex min-w-0 items-center gap-2.5\">\n <span className
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/leaderboard-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport { Sparkles } from \"lucide-react\";\nimport { normalizeAddress, profileHref } from \"@medialane/sdk\";\nimport Image from \"../image.js\";\nimport Link from \"../link.js\";\nimport { Skeleton } from \"../skeleton.js\";\nimport { AddressDisplay } from \"../address-display.js\";\nimport { LeaderboardTable } from \"./leaderboard-table.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { profileIdentity } from \"../../utils/profile-identity.js\";\nimport { useCreatorProfile } from \"../../utils/use-profiles.js\";\nimport { useImageUrl } from \"../../utils/use-image-url.js\";\nimport { useLeaderboard } from \"../../utils/use-rewards.js\";\n\nexport interface LeaderboardPanelProps {\n myAddress?: string | null;\n limit?: number;\n showHeading?: boolean;\n viewAllHref?: string;\n compact?: boolean;\n className?: string;\n}\n\nfunction CreatorIdentity({ address, compact }: { address: string; compact?: boolean }) {\n const { profile } = useCreatorProfile(address);\n const avatarUrl = useImageUrl()(profile?.avatarImage, { width: 96 });\n const { identity: name } = profileIdentity({\n username: profile?.username,\n name: profile?.name,\n walletAddress: address,\n });\n\n return (\n <span className=\"inline-flex min-w-0 items-center gap-2.5\">\n <span className=\"relative h-9 w-9 shrink-0 overflow-hidden rounded-full bg-foreground/[0.08]\">\n <Image\n src={avatarUrl ?? \"/icon.png\"}\n alt=\"\"\n fill\n unoptimized\n className={avatarUrl ? \"object-cover\" : \"object-cover p-[15%] opacity-50\"}\n />\n </span>\n {name ? (\n <span className={cn(\"truncate font-bold\", compact ? \"text-sm font-semibold\" : \"text-base\")}>{name}</span>\n ) : (\n <AddressDisplay address={address} chars={4} showCopy={false} className={compact ? \"text-sm font-semibold\" : \"text-base font-bold\"} />\n )}\n </span>\n );\n}\n\nexport function LeaderboardPanel({\n myAddress,\n limit = 20,\n showHeading = true,\n viewAllHref,\n compact,\n className,\n}: LeaderboardPanelProps) {\n const { data, isLoading } = useLeaderboard(1, limit);\n const rows = data?.data ?? [];\n\n const highlightAddress = myAddress ? normalizeAddress(\"STARKNET\", myAddress) : null;\n\n return (\n <div className={cn(compact ? \"\" : \"space-y-3\", className)}>\n {showHeading && (\n <div className=\"flex items-center gap-2\">\n <div className=\"flex h-7 w-7 items-center justify-center rounded-lg bg-gradient-to-br from-brand-rose to-brand-orange text-white shrink-0\">\n <Sparkles className=\"h-3.5 w-3.5\" />\n </div>\n <h2 className=\"text-sm font-black\">Community Rewards</h2>\n </div>\n )}\n\n {isLoading ? (\n <div className={compact ? \"divide-y divide-border/40\" : \"space-y-1.5\"}>\n {Array.from({ length: Math.min(limit, 6) }).map((_, i) => (\n <Skeleton key={i} className={compact ? \"h-16 w-full rounded-none\" : \"h-10 w-full rounded-lg\"} />\n ))}\n </div>\n ) : rows.length === 0 ? (\n <p className={cn(\"text-sm text-muted-foreground py-4\", compact && \"px-4\")}>\n Nobody's earned points yet — be the first.\n </p>\n ) : (\n <LeaderboardTable\n entries={rows}\n highlightAddress={highlightAddress}\n compact={compact}\n renderAddress={(address) => (\n <Link href={profileHref({ address })} className=\"hover:text-foreground transition-colors\">\n <CreatorIdentity address={address} compact={compact} />\n </Link>\n )}\n />\n )}\n\n {viewAllHref && rows.length > 0 && (\n <Link\n href={viewAllHref}\n className=\"inline-flex items-center gap-1 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors pt-1\"\n >\n View scoreboard →\n </Link>\n )}\n </div>\n );\n}\n"],"mappings":";AAkCI,SAEI,KAFJ;AAhCJ,SAAS,gBAAgB;AACzB,SAAS,kBAAkB,mBAAmB;AAC9C,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AACjC,SAAS,UAAU;AACnB,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAW/B,SAAS,gBAAgB,EAAE,SAAS,QAAQ,GAA2C;AACrF,QAAM,EAAE,QAAQ,IAAI,kBAAkB,OAAO;AAC7C,QAAM,YAAY,YAAY,EAAE,SAAS,aAAa,EAAE,OAAO,GAAG,CAAC;AACnE,QAAM,EAAE,UAAU,KAAK,IAAI,gBAAgB;AAAA,IACzC,UAAU,SAAS;AAAA,IACnB,MAAM,SAAS;AAAA,IACf,eAAe;AAAA,EACjB,CAAC;AAED,SACE,qBAAC,UAAK,WAAU,4CACd;AAAA,wBAAC,UAAK,WAAU,+EACd;AAAA,MAAC;AAAA;AAAA,QACC,KAAK,aAAa;AAAA,QAClB,KAAI;AAAA,QACJ,MAAI;AAAA,QACJ,aAAW;AAAA,QACX,WAAW,YAAY,iBAAiB;AAAA;AAAA,IAC1C,GACF;AAAA,IACC,OACC,oBAAC,UAAK,WAAW,GAAG,sBAAsB,UAAU,0BAA0B,WAAW,GAAI,gBAAK,IAElG,oBAAC,kBAAe,SAAkB,OAAO,GAAG,UAAU,OAAO,WAAW,UAAU,0BAA0B,uBAAuB;AAAA,KAEvI;AAEJ;AAEO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,QAAQ;AAAA,EACR,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AACF,GAA0B;AACxB,QAAM,EAAE,MAAM,UAAU,IAAI,eAAe,GAAG,KAAK;AACnD,QAAM,OAAO,MAAM,QAAQ,CAAC;AAE5B,QAAM,mBAAmB,YAAY,iBAAiB,YAAY,SAAS,IAAI;AAE/E,SACE,qBAAC,SAAI,WAAW,GAAG,UAAU,KAAK,aAAa,SAAS,GACrD;AAAA,mBACC,qBAAC,SAAI,WAAU,2BACb;AAAA,0BAAC,SAAI,WAAU,6HACb,8BAAC,YAAS,WAAU,eAAc,GACpC;AAAA,MACA,oBAAC,QAAG,WAAU,sBAAqB,+BAAiB;AAAA,OACtD;AAAA,IAGD,YACC,oBAAC,SAAI,WAAW,UAAU,8BAA8B,eACrD,gBAAM,KAAK,EAAE,QAAQ,KAAK,IAAI,OAAO,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAClD,oBAAC,YAAiB,WAAW,UAAU,6BAA6B,4BAArD,CAA+E,CAC/F,GACH,IACE,KAAK,WAAW,IAClB,oBAAC,OAAE,WAAW,GAAG,sCAAsC,WAAW,MAAM,GAAG,6DAE3E,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA,eAAe,CAAC,YACd,oBAAC,QAAK,MAAM,YAAY,EAAE,QAAQ,CAAC,GAAG,WAAU,2CAC9C,8BAAC,mBAAgB,SAAkB,SAAkB,GACvD;AAAA;AAAA,IAEJ;AAAA,IAGD,eAAe,KAAK,SAAS,KAC5B;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,WAAU;AAAA,QACX;AAAA;AAAA,IAED;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -30,7 +30,7 @@ function LeaderboardTable({ entries, highlightAddress, renderAddress, compact, c
|
|
|
30
30
|
if (compact) {
|
|
31
31
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("divide-y divide-border/40", className), children: entries.map((e) => {
|
|
32
32
|
const isViewer = highlightAddress != null && e.address === highlightAddress;
|
|
33
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("flex items-center gap-3 px-4
|
|
33
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("flex h-16 items-center gap-3 px-4", isViewer && "bg-brand-rose/10"), children: [
|
|
34
34
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "w-4 shrink-0 text-xs font-medium tabular-nums text-muted-foreground", children: e.rank }),
|
|
35
35
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold", children: [
|
|
36
36
|
renderAddress ? renderAddress(e.address) : (0, import_address.shortenAddress)(e.address),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/leaderboard-table.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { shortenAddress } from \"../../utils/address.js\";\nimport { LevelBadge } from \"./level-badge.js\";\n\nexport interface LeaderboardEntryLike {\n\n rank: number;\n address: string;\n publicId?: string | null;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface LeaderboardTableProps {\n entries: LeaderboardEntryLike[];\n\n highlightAddress?: string | null;\n\n renderAddress?: (address: string) => ReactNode;\n compact?: boolean;\n className?: string;\n}\n\nexport function LeaderboardTable({ entries, highlightAddress, renderAddress, compact, className }: LeaderboardTableProps) {\n if (compact) {\n return (\n <div className={cn(\"divide-y divide-border/40\", className)}>\n {entries.map((e) => {\n const isViewer = highlightAddress != null && e.address === highlightAddress;\n return (\n <div key={e.address} className={cn(\"flex items-center gap-3 px-4
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/leaderboard-table.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { shortenAddress } from \"../../utils/address.js\";\nimport { LevelBadge } from \"./level-badge.js\";\n\nexport interface LeaderboardEntryLike {\n\n rank: number;\n address: string;\n publicId?: string | null;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface LeaderboardTableProps {\n entries: LeaderboardEntryLike[];\n\n highlightAddress?: string | null;\n\n renderAddress?: (address: string) => ReactNode;\n compact?: boolean;\n className?: string;\n}\n\nexport function LeaderboardTable({ entries, highlightAddress, renderAddress, compact, className }: LeaderboardTableProps) {\n if (compact) {\n return (\n <div className={cn(\"divide-y divide-border/40\", className)}>\n {entries.map((e) => {\n const isViewer = highlightAddress != null && e.address === highlightAddress;\n return (\n <div key={e.address} className={cn(\"flex h-16 items-center gap-3 px-4\", isViewer && \"bg-brand-rose/10\")}>\n <span className=\"w-4 shrink-0 text-xs font-medium tabular-nums text-muted-foreground\">{e.rank}</span>\n <span className=\"min-w-0 flex-1 truncate text-sm font-semibold\">\n {renderAddress ? renderAddress(e.address) : shortenAddress(e.address)}\n {isViewer && <span className=\"ml-1.5 text-xs font-medium text-foreground/50\">(you)</span>}\n </span>\n <LevelBadge level={e.currentLevel} name={e.currentLevelName} badgeColor={e.badgeColor} size=\"sm\" className=\"hidden sm:inline-flex\" />\n <span className=\"shrink-0 text-sm font-bold tabular-nums\">\n {e.totalXp.toLocaleString()}\n <span className=\"ml-1 text-xs font-medium text-foreground/40\">XP</span>\n </span>\n </div>\n );\n })}\n </div>\n );\n }\n return (\n <div className={cn(\"space-y-1.5\", className)}>\n {entries.map((e) => {\n const isViewer = highlightAddress != null && e.address === highlightAddress;\n return (\n <div\n key={e.address}\n className={cn(\n \"flex items-center gap-4 rounded-2xl px-4 py-3.5 transition-colors\",\n isViewer ? \"bg-brand-rose/10\" : \"bg-foreground/[0.04] hover:bg-foreground/[0.07]\"\n )}\n >\n <span className=\"min-w-0 flex-1 truncate text-base font-bold\">\n {renderAddress ? renderAddress(e.address) : shortenAddress(e.address)}\n {isViewer && <span className=\"ml-1.5 text-xs font-medium text-foreground/50\">(you)</span>}\n </span>\n <LevelBadge level={e.currentLevel} name={e.currentLevelName} badgeColor={e.badgeColor} size=\"sm\" className=\"hidden sm:inline-flex\" />\n <span className=\"shrink-0 text-lg font-black tabular-nums\">\n {e.totalXp.toLocaleString()}\n <span className=\"ml-1 text-xs font-bold text-foreground/40\">XP</span>\n </span>\n </div>\n );\n })}\n </div>\n );\n}\n\nexport interface LeaderboardWidgetProps {\n entries: LeaderboardEntryLike[];\n title?: string;\n\n href?: string;\n renderAddress?: (address: string) => ReactNode;\n className?: string;\n}\n\nexport function LeaderboardWidget({ entries, title = \"Community Rewards\", href, renderAddress, className }: LeaderboardWidgetProps) {\n if (entries.length === 0) return null;\n return (\n <section className={cn(\"rounded-2xl bg-foreground/[0.04] p-5\", className)}>\n <div className=\"mb-3 flex items-center justify-between\">\n <h2 className=\"text-lg font-black\">{title}</h2>\n {href && (\n <a href={href} className=\"text-xs font-bold text-foreground/50 hover:text-foreground active:opacity-70\">\n View scoreboard →\n </a>\n )}\n </div>\n <ol className=\"space-y-2.5\">\n {entries.map((e) => (\n <li key={e.address} className=\"flex items-center gap-2.5\">\n <span className=\"min-w-0 flex-1 truncate text-sm font-bold\">\n {renderAddress ? renderAddress(e.address) : shortenAddress(e.address)}\n </span>\n <LevelBadge level={e.currentLevel} name={e.currentLevelName} badgeColor={e.badgeColor} size=\"sm\" />\n </li>\n ))}\n </ol>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCc;AAjCd,gBAAmB;AACnB,qBAA+B;AAC/B,yBAA2B;AAuBpB,SAAS,iBAAiB,EAAE,SAAS,kBAAkB,eAAe,SAAS,UAAU,GAA0B;AACxH,MAAI,SAAS;AACX,WACE,4CAAC,SAAI,eAAW,cAAG,6BAA6B,SAAS,GACtD,kBAAQ,IAAI,CAAC,MAAM;AAClB,YAAM,WAAW,o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MAdK,EAAE;AAAA,IAeT;AAAA,EAEJ,CAAC,GACH;AAEJ;AAWO,SAAS,kBAAkB,EAAE,SAAS,QAAQ,qBAAqB,MAAM,eAAe,UAAU,GAA2B;AAClI,MAAI,QAAQ,WAAW,EAAG,QAAO;AACjC,SACE,6CAAC,aAAQ,eAAW,cAAG,wCAAwC,SAAS,GACtE;AAAA,iDAAC,SAAI,WAAU,0CACb;AAAA,kDAAC,QAAG,WAAU,sBAAsB,iBAAM;AAAA,MACzC,QACC,4CAAC,OAAE,MAAY,WAAU,gFAA+E,oCAExG;AAAA,OAEJ;AAAA,IACA,4CAAC,QAAG,WAAU,eACX,kBAAQ,IAAI,CAAC,MACZ,6CAAC,QAAmB,WAAU,6BAC5B;AAAA,kDAAC,UAAK,WAAU,6CACb,0BAAgB,cAAc,EAAE,OAAO,QAAI,+BAAe,EAAE,OAAO,GACtE;AAAA,MACA,4CAAC,iCAAW,OAAO,EAAE,cAAc,MAAM,EAAE,kBAAkB,YAAY,EAAE,YAAY,MAAK,MAAK;AAAA,SAJ1F,EAAE,OAKX,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -6,7 +6,7 @@ function LeaderboardTable({ entries, highlightAddress, renderAddress, compact, c
|
|
|
6
6
|
if (compact) {
|
|
7
7
|
return /* @__PURE__ */ jsx("div", { className: cn("divide-y divide-border/40", className), children: entries.map((e) => {
|
|
8
8
|
const isViewer = highlightAddress != null && e.address === highlightAddress;
|
|
9
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-3 px-4
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex h-16 items-center gap-3 px-4", isViewer && "bg-brand-rose/10"), children: [
|
|
10
10
|
/* @__PURE__ */ jsx("span", { className: "w-4 shrink-0 text-xs font-medium tabular-nums text-muted-foreground", children: e.rank }),
|
|
11
11
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold", children: [
|
|
12
12
|
renderAddress ? renderAddress(e.address) : shortenAddress(e.address),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/leaderboard-table.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { shortenAddress } from \"../../utils/address.js\";\nimport { LevelBadge } from \"./level-badge.js\";\n\nexport interface LeaderboardEntryLike {\n\n rank: number;\n address: string;\n publicId?: string | null;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface LeaderboardTableProps {\n entries: LeaderboardEntryLike[];\n\n highlightAddress?: string | null;\n\n renderAddress?: (address: string) => ReactNode;\n compact?: boolean;\n className?: string;\n}\n\nexport function LeaderboardTable({ entries, highlightAddress, renderAddress, compact, className }: LeaderboardTableProps) {\n if (compact) {\n return (\n <div className={cn(\"divide-y divide-border/40\", className)}>\n {entries.map((e) => {\n const isViewer = highlightAddress != null && e.address === highlightAddress;\n return (\n <div key={e.address} className={cn(\"flex items-center gap-3 px-4
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/leaderboard-table.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { shortenAddress } from \"../../utils/address.js\";\nimport { LevelBadge } from \"./level-badge.js\";\n\nexport interface LeaderboardEntryLike {\n\n rank: number;\n address: string;\n publicId?: string | null;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface LeaderboardTableProps {\n entries: LeaderboardEntryLike[];\n\n highlightAddress?: string | null;\n\n renderAddress?: (address: string) => ReactNode;\n compact?: boolean;\n className?: string;\n}\n\nexport function LeaderboardTable({ entries, highlightAddress, renderAddress, compact, className }: LeaderboardTableProps) {\n if (compact) {\n return (\n <div className={cn(\"divide-y divide-border/40\", className)}>\n {entries.map((e) => {\n const isViewer = highlightAddress != null && e.address === highlightAddress;\n return (\n <div key={e.address} className={cn(\"flex h-16 items-center gap-3 px-4\", isViewer && \"bg-brand-rose/10\")}>\n <span className=\"w-4 shrink-0 text-xs font-medium tabular-nums text-muted-foreground\">{e.rank}</span>\n <span className=\"min-w-0 flex-1 truncate text-sm font-semibold\">\n {renderAddress ? renderAddress(e.address) : shortenAddress(e.address)}\n {isViewer && <span className=\"ml-1.5 text-xs font-medium text-foreground/50\">(you)</span>}\n </span>\n <LevelBadge level={e.currentLevel} name={e.currentLevelName} badgeColor={e.badgeColor} size=\"sm\" className=\"hidden sm:inline-flex\" />\n <span className=\"shrink-0 text-sm font-bold tabular-nums\">\n {e.totalXp.toLocaleString()}\n <span className=\"ml-1 text-xs font-medium text-foreground/40\">XP</span>\n </span>\n </div>\n );\n })}\n </div>\n );\n }\n return (\n <div className={cn(\"space-y-1.5\", className)}>\n {entries.map((e) => {\n const isViewer = highlightAddress != null && e.address === highlightAddress;\n return (\n <div\n key={e.address}\n className={cn(\n \"flex items-center gap-4 rounded-2xl px-4 py-3.5 transition-colors\",\n isViewer ? \"bg-brand-rose/10\" : \"bg-foreground/[0.04] hover:bg-foreground/[0.07]\"\n )}\n >\n <span className=\"min-w-0 flex-1 truncate text-base font-bold\">\n {renderAddress ? renderAddress(e.address) : shortenAddress(e.address)}\n {isViewer && <span className=\"ml-1.5 text-xs font-medium text-foreground/50\">(you)</span>}\n </span>\n <LevelBadge level={e.currentLevel} name={e.currentLevelName} badgeColor={e.badgeColor} size=\"sm\" className=\"hidden sm:inline-flex\" />\n <span className=\"shrink-0 text-lg font-black tabular-nums\">\n {e.totalXp.toLocaleString()}\n <span className=\"ml-1 text-xs font-bold text-foreground/40\">XP</span>\n </span>\n </div>\n );\n })}\n </div>\n );\n}\n\nexport interface LeaderboardWidgetProps {\n entries: LeaderboardEntryLike[];\n title?: string;\n\n href?: string;\n renderAddress?: (address: string) => ReactNode;\n className?: string;\n}\n\nexport function LeaderboardWidget({ entries, title = \"Community Rewards\", href, renderAddress, className }: LeaderboardWidgetProps) {\n if (entries.length === 0) return null;\n return (\n <section className={cn(\"rounded-2xl bg-foreground/[0.04] p-5\", className)}>\n <div className=\"mb-3 flex items-center justify-between\">\n <h2 className=\"text-lg font-black\">{title}</h2>\n {href && (\n <a href={href} className=\"text-xs font-bold text-foreground/50 hover:text-foreground active:opacity-70\">\n View scoreboard →\n </a>\n )}\n </div>\n <ol className=\"space-y-2.5\">\n {entries.map((e) => (\n <li key={e.address} className=\"flex items-center gap-2.5\">\n <span className=\"min-w-0 flex-1 truncate text-sm font-bold\">\n {renderAddress ? renderAddress(e.address) : shortenAddress(e.address)}\n </span>\n <LevelBadge level={e.currentLevel} name={e.currentLevelName} badgeColor={e.badgeColor} size=\"sm\" />\n </li>\n ))}\n </ol>\n </section>\n );\n}\n"],"mappings":"AAkCc,cACA,YADA;AAjCd,SAAS,UAAU;AACnB,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAuBpB,SAAS,iBAAiB,EAAE,SAAS,kBAAkB,eAAe,SAAS,UAAU,GAA0B;AACxH,MAAI,SAAS;AACX,WACE,oBAAC,SAAI,WAAW,GAAG,6BAA6B,SAAS,GACtD,kBAAQ,IAAI,CAAC,MAAM;AAClB,YAAM,WAAW,oBAAoB,QAAQ,EAAE,YAAY;AAC3D,aACE,qBAAC,SAAoB,WAAW,GAAG,qCAAqC,YAAY,kBAAkB,GACpG;AAAA,4BAAC,UAAK,WAAU,uEAAuE,YAAE,MAAK;AAAA,QAC9F,qBAAC,UAAK,WAAU,iDACb;AAAA,0BAAgB,cAAc,EAAE,OAAO,IAAI,eAAe,EAAE,OAAO;AAAA,UACnE,YAAY,oBAAC,UAAK,WAAU,iDAAgD,mBAAK;AAAA,WACpF;AAAA,QACA,oBAAC,cAAW,OAAO,EAAE,cAAc,MAAM,EAAE,kBAAkB,YAAY,EAAE,YAAY,MAAK,MAAK,WAAU,yBAAwB;AAAA,QACnI,qBAAC,UAAK,WAAU,2CACb;AAAA,YAAE,QAAQ,eAAe;AAAA,UAC1B,oBAAC,UAAK,WAAU,+CAA8C,gBAA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,eAAe,EAAE,OAAO,GACtE;AAAA,MACA,oBAAC,cAAW,OAAO,EAAE,cAAc,MAAM,EAAE,kBAAkB,YAAY,EAAE,YAAY,MAAK,MAAK;AAAA,SAJ1F,EAAE,OAKX,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/scroll-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { SectionHeading } from \"./section-heading.js\";\n\nexport interface ScrollSectionProps {\n icon: React.ReactNode;\n title: string;\n subtitle?: React.ReactNode;\n href
|
|
1
|
+
{"version":3,"sources":["../../src/components/scroll-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { SectionHeading } from \"./section-heading.js\";\n\nexport interface ScrollSectionProps {\n icon: React.ReactNode;\n title: string;\n subtitle?: React.ReactNode;\n href?: string;\n linkLabel?: string;\n children: React.ReactNode;\n}\n\nexport function ScrollSection({ icon, title, subtitle, href, linkLabel, children }: ScrollSectionProps) {\n return (\n <section className=\"space-y-4\">\n <SectionHeading icon={icon} title={title} subtitle={subtitle} href={href} linkLabel={linkLabel} />\n\n <div className=\"w-full overflow-x-auto scrollbar-hide\">\n <div className=\"flex gap-5 sm:gap-6 snap-x snap-mandatory pb-2\" style={{ width: \"max-content\" }}>\n {children}\n </div>\n </div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAeI;AAbJ,6BAA+B;AAWxB,SAAS,cAAc,EAAE,MAAM,OAAO,UAAU,MAAM,WAAW,SAAS,GAAuB;AACtG,SACE,6CAAC,aAAQ,WAAU,aACjB;AAAA,gDAAC,yCAAe,MAAY,OAAc,UAAoB,MAAY,WAAsB;AAAA,IAEhG,4CAAC,SAAI,WAAU,yCACb,sDAAC,SAAI,WAAU,kDAAiD,OAAO,EAAE,OAAO,cAAc,GAC3F,UACH,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/scroll-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { SectionHeading } from \"./section-heading.js\";\n\nexport interface ScrollSectionProps {\n icon: React.ReactNode;\n title: string;\n subtitle?: React.ReactNode;\n href
|
|
1
|
+
{"version":3,"sources":["../../src/components/scroll-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { SectionHeading } from \"./section-heading.js\";\n\nexport interface ScrollSectionProps {\n icon: React.ReactNode;\n title: string;\n subtitle?: React.ReactNode;\n href?: string;\n linkLabel?: string;\n children: React.ReactNode;\n}\n\nexport function ScrollSection({ icon, title, subtitle, href, linkLabel, children }: ScrollSectionProps) {\n return (\n <section className=\"space-y-4\">\n <SectionHeading icon={icon} title={title} subtitle={subtitle} href={href} linkLabel={linkLabel} />\n\n <div className=\"w-full overflow-x-auto scrollbar-hide\">\n <div className=\"flex gap-5 sm:gap-6 snap-x snap-mandatory pb-2\" style={{ width: \"max-content\" }}>\n {children}\n </div>\n </div>\n </section>\n );\n}\n"],"mappings":";AAeI,SACE,KADF;AAbJ,SAAS,sBAAsB;AAWxB,SAAS,cAAc,EAAE,MAAM,OAAO,UAAU,MAAM,WAAW,SAAS,GAAuB;AACtG,SACE,qBAAC,aAAQ,WAAU,aACjB;AAAA,wBAAC,kBAAe,MAAY,OAAc,UAAoB,MAAY,WAAsB;AAAA,IAEhG,oBAAC,SAAI,WAAU,yCACb,8BAAC,SAAI,WAAU,kDAAiD,OAAO,EAAE,OAAO,cAAc,GAC3F,UACH,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -44,7 +44,7 @@ function SectionHeading({ icon, title, subtitle, href, linkLabel = "View all" })
|
|
|
44
44
|
subtitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-1 flex items-center gap-1 text-2xs text-muted-foreground", children: subtitle })
|
|
45
45
|
] })
|
|
46
46
|
] }),
|
|
47
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
47
|
+
href && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
48
48
|
import_link.default,
|
|
49
49
|
{
|
|
50
50
|
href,
|
|
@@ -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
|
|
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 {href && (\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 )}\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,IACC,QACC;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,KAEJ;AAEJ;","names":["Link"]}
|
|
@@ -4,7 +4,7 @@ interface SectionHeadingProps {
|
|
|
4
4
|
icon: React.ReactNode;
|
|
5
5
|
title: string;
|
|
6
6
|
subtitle?: React.ReactNode;
|
|
7
|
-
href
|
|
7
|
+
href?: string;
|
|
8
8
|
linkLabel?: string;
|
|
9
9
|
}
|
|
10
10
|
declare function SectionHeading({ icon, title, subtitle, href, linkLabel }: SectionHeadingProps): react_jsx_runtime.JSX.Element;
|
|
@@ -4,7 +4,7 @@ interface SectionHeadingProps {
|
|
|
4
4
|
icon: React.ReactNode;
|
|
5
5
|
title: string;
|
|
6
6
|
subtitle?: React.ReactNode;
|
|
7
|
-
href
|
|
7
|
+
href?: string;
|
|
8
8
|
linkLabel?: string;
|
|
9
9
|
}
|
|
10
10
|
declare function SectionHeading({ icon, title, subtitle, href, linkLabel }: SectionHeadingProps): react_jsx_runtime.JSX.Element;
|
|
@@ -11,7 +11,7 @@ function SectionHeading({ icon, title, subtitle, href, linkLabel = "View all" })
|
|
|
11
11
|
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-1 flex items-center gap-1 text-2xs text-muted-foreground", children: subtitle })
|
|
12
12
|
] })
|
|
13
13
|
] }),
|
|
14
|
-
/* @__PURE__ */ jsxs(
|
|
14
|
+
href && /* @__PURE__ */ jsxs(
|
|
15
15
|
Link,
|
|
16
16
|
{
|
|
17
17
|
href,
|
|
@@ -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
|
|
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 {href && (\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 )}\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,IACC,QACC;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAU;AAAA,QAET;AAAA;AAAA,UAAU;AAAA,UAAC,oBAAC,cAAW,WAAU,WAAU;AAAA;AAAA;AAAA,IAC9C;AAAA,KAEJ;AAEJ;","names":[]}
|