@medialane/ui 0.97.0 → 0.99.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.
Files changed (73) hide show
  1. package/dist/components/community-rewards-section.cjs +123 -0
  2. package/dist/components/community-rewards-section.cjs.map +1 -0
  3. package/dist/components/community-rewards-section.d.cts +15 -0
  4. package/dist/components/community-rewards-section.d.ts +15 -0
  5. package/dist/components/community-rewards-section.js +89 -0
  6. package/dist/components/community-rewards-section.js.map +1 -0
  7. package/dist/components/creator-airdrop-banner.cjs +79 -0
  8. package/dist/components/creator-airdrop-banner.cjs.map +1 -0
  9. package/dist/components/creator-airdrop-banner.d.cts +9 -0
  10. package/dist/components/creator-airdrop-banner.d.ts +9 -0
  11. package/dist/components/creator-airdrop-banner.js +45 -0
  12. package/dist/components/creator-airdrop-banner.js.map +1 -0
  13. package/dist/components/rewards/badge-shelf.cjs +2 -0
  14. package/dist/components/rewards/badge-shelf.cjs.map +1 -1
  15. package/dist/components/rewards/badge-shelf.d.cts +6 -1
  16. package/dist/components/rewards/badge-shelf.d.ts +6 -1
  17. package/dist/components/rewards/badge-shelf.js +1 -0
  18. package/dist/components/rewards/badge-shelf.js.map +1 -1
  19. package/dist/components/rewards/badge-unlock-toast-content.cjs +49 -0
  20. package/dist/components/rewards/badge-unlock-toast-content.cjs.map +1 -0
  21. package/dist/components/rewards/badge-unlock-toast-content.d.cts +11 -0
  22. package/dist/components/rewards/badge-unlock-toast-content.d.ts +11 -0
  23. package/dist/components/rewards/badge-unlock-toast-content.js +25 -0
  24. package/dist/components/rewards/badge-unlock-toast-content.js.map +1 -0
  25. package/dist/components/rewards/journey-path.cjs +77 -0
  26. package/dist/components/rewards/journey-path.cjs.map +1 -0
  27. package/dist/components/rewards/journey-path.d.cts +26 -0
  28. package/dist/components/rewards/journey-path.d.ts +26 -0
  29. package/dist/components/rewards/journey-path.js +53 -0
  30. package/dist/components/rewards/journey-path.js.map +1 -0
  31. package/dist/components/rewards/level-badge.cjs +1 -3
  32. package/dist/components/rewards/level-badge.cjs.map +1 -1
  33. package/dist/components/rewards/level-badge.d.cts +4 -2
  34. package/dist/components/rewards/level-badge.d.ts +4 -2
  35. package/dist/components/rewards/level-badge.js +1 -3
  36. package/dist/components/rewards/level-badge.js.map +1 -1
  37. package/dist/components/rewards/level-up-celebration.cjs +71 -0
  38. package/dist/components/rewards/level-up-celebration.cjs.map +1 -0
  39. package/dist/components/rewards/level-up-celebration.d.cts +16 -0
  40. package/dist/components/rewards/level-up-celebration.d.ts +16 -0
  41. package/dist/components/rewards/level-up-celebration.js +47 -0
  42. package/dist/components/rewards/level-up-celebration.js.map +1 -0
  43. package/dist/components/rewards/reward-toast.cjs +20 -2
  44. package/dist/components/rewards/reward-toast.cjs.map +1 -1
  45. package/dist/components/rewards/reward-toast.d.cts +6 -2
  46. package/dist/components/rewards/reward-toast.d.ts +6 -2
  47. package/dist/components/rewards/reward-toast.js +20 -2
  48. package/dist/components/rewards/reward-toast.js.map +1 -1
  49. package/dist/components/rewards/use-rewards-celebrations.cjs +70 -0
  50. package/dist/components/rewards/use-rewards-celebrations.cjs.map +1 -0
  51. package/dist/components/rewards/use-rewards-celebrations.d.cts +25 -0
  52. package/dist/components/rewards/use-rewards-celebrations.d.ts +25 -0
  53. package/dist/components/rewards/use-rewards-celebrations.js +46 -0
  54. package/dist/components/rewards/use-rewards-celebrations.js.map +1 -0
  55. package/dist/components/rewards/xp-toast-content.cjs +23 -18
  56. package/dist/components/rewards/xp-toast-content.cjs.map +1 -1
  57. package/dist/components/rewards/xp-toast-content.d.cts +7 -1
  58. package/dist/components/rewards/xp-toast-content.d.ts +7 -1
  59. package/dist/components/rewards/xp-toast-content.js +23 -18
  60. package/dist/components/rewards/xp-toast-content.js.map +1 -1
  61. package/dist/index.cjs +20 -5
  62. package/dist/index.cjs.map +1 -1
  63. package/dist/index.d.cts +7 -2
  64. package/dist/index.d.ts +7 -2
  65. package/dist/index.js +13 -3
  66. package/dist/index.js.map +1 -1
  67. package/package.json +1 -1
  68. package/dist/components/creators-fund-section.cjs +0 -139
  69. package/dist/components/creators-fund-section.cjs.map +0 -1
  70. package/dist/components/creators-fund-section.d.cts +0 -26
  71. package/dist/components/creators-fund-section.d.ts +0 -26
  72. package/dist/components/creators-fund-section.js +0 -105
  73. package/dist/components/creators-fund-section.js.map +0 -1
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var community_rewards_section_exports = {};
31
+ __export(community_rewards_section_exports, {
32
+ CommunityRewardsSection: () => CommunityRewardsSection
33
+ });
34
+ module.exports = __toCommonJS(community_rewards_section_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_link = __toESM(require("next/link"), 1);
37
+ var import_lucide_react = require("lucide-react");
38
+ var import_address_display = require("./address-display.js");
39
+ const EARN_ACTIONS = [
40
+ { icon: import_lucide_react.Zap, label: "Mint" },
41
+ { icon: import_lucide_react.Palette, label: "Create" },
42
+ { icon: import_lucide_react.ShoppingBag, label: "Trade" },
43
+ { icon: import_lucide_react.MessageSquare, label: "Engage" }
44
+ ];
45
+ function CommunityRewardsSection({
46
+ entries,
47
+ isLoading = false,
48
+ rewardsHref,
49
+ creatorHref
50
+ }) {
51
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "rounded-2xl bg-muted/50 dark:bg-card overflow-hidden grid lg:grid-cols-2 max-lg:divide-y lg:divide-x divide-brand-orange/20", children: [
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "px-7 py-8 sm:px-9 flex flex-col gap-6", children: [
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
54
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs font-bold uppercase tracking-widest text-brand-orange", children: "Creator's Fund" }),
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "mt-4 text-2xl font-bold tracking-tight leading-tight", children: "Community Rewards" }),
56
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-1.5 text-sm text-muted-foreground leading-relaxed", children: "Earn XP. Share the Creator's Fund." })
57
+ ] }),
58
+ !isLoading && entries.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "border-y border-brand-orange/20 py-3", children: [
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground mb-2", children: "Recently active" }),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex -space-x-2", children: entries.slice(0, 5).map((entry) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
+ "span",
62
+ {
63
+ title: `${entry.totalXp.toLocaleString()} XP`,
64
+ className: "flex h-7 w-7 items-center justify-center rounded-full border-2 border-background bg-brand-orange/15 text-[9px] font-bold text-brand-orange",
65
+ children: entry.address.slice(2, 4).toUpperCase()
66
+ },
67
+ entry.address
68
+ )) })
69
+ ] }),
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-x-5 gap-y-2", children: EARN_ACTIONS.map(({ icon: Icon, label }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
71
+ "span",
72
+ {
73
+ className: "flex items-center gap-1.5 text-xs font-medium text-muted-foreground",
74
+ children: [
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-3 w-3 text-brand-orange/70" }),
76
+ label
77
+ ]
78
+ },
79
+ label
80
+ )) }),
81
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
82
+ import_link.default,
83
+ {
84
+ href: rewardsHref,
85
+ className: "mt-auto inline-flex items-center justify-center gap-2 rounded-xl bg-brand-orange px-6 py-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98]",
86
+ children: [
87
+ "Start earning XP",
88
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3.5 w-3.5" })
89
+ ]
90
+ }
91
+ )
92
+ ] }),
93
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "p-5 sm:p-6", children: !isLoading && entries.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-2 gap-3 h-full", children: entries.slice(0, 4).map((entry) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
94
+ import_link.default,
95
+ {
96
+ href: creatorHref(entry.address),
97
+ className: "group relative rounded-xl bg-card dark:bg-muted/30 hover:bg-card/70 dark:hover:bg-muted/50 overflow-hidden transition-colors flex flex-col justify-between p-4",
98
+ children: [
99
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-x-0 top-0 h-0.5 bg-brand-orange/40" }),
100
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-0.5 pt-1", children: [
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-2xl font-black tabular-nums leading-none", children: entry.totalXp.toLocaleString() }),
102
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "XP earned" })
103
+ ] }),
104
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
105
+ import_address_display.AddressDisplay,
106
+ {
107
+ address: entry.address,
108
+ chars: 4,
109
+ showCopy: false,
110
+ className: "text-xs font-medium text-muted-foreground group-hover:text-foreground transition-colors"
111
+ }
112
+ )
113
+ ]
114
+ },
115
+ entry.address
116
+ )) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-2 gap-3 h-full", children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "min-h-[100px] rounded-xl bg-card dark:bg-muted/30 animate-pulse" }, i)) }) })
117
+ ] });
118
+ }
119
+ // Annotate the CommonJS export names for ESM import in node:
120
+ 0 && (module.exports = {
121
+ CommunityRewardsSection
122
+ });
123
+ //# sourceMappingURL=community-rewards-section.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/community-rewards-section.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { ArrowRight, Zap, Palette, ShoppingBag, MessageSquare } from \"lucide-react\";\nimport { AddressDisplay } from \"./address-display.js\";\n\nexport interface CommunityRewardsEntry {\n address: string;\n totalXp: number;\n}\n\nexport interface CommunityRewardsSectionProps {\n entries: CommunityRewardsEntry[];\n isLoading?: boolean;\n rewardsHref: string;\n creatorHref: (address: string) => string;\n}\n\nconst EARN_ACTIONS = [\n { icon: Zap, label: \"Mint\" },\n { icon: Palette, label: \"Create\" },\n { icon: ShoppingBag, label: \"Trade\" },\n { icon: MessageSquare, label: \"Engage\" },\n];\n\nexport function CommunityRewardsSection({\n entries,\n isLoading = false,\n rewardsHref,\n creatorHref,\n}: CommunityRewardsSectionProps) {\n return (\n <section className=\"rounded-2xl bg-muted/50 dark:bg-card overflow-hidden grid lg:grid-cols-2 max-lg:divide-y lg:divide-x divide-brand-orange/20\">\n\n {/* Left — info panel */}\n <div className=\"px-7 py-8 sm:px-9 flex flex-col gap-6\">\n <div>\n {/* Creator's Fund eyebrow — shared with CreatorAirdropBanner */}\n <span className=\"text-xs font-bold uppercase tracking-widest text-brand-orange\">\n Creator&apos;s Fund\n </span>\n <h2 className=\"mt-4 text-2xl font-bold tracking-tight leading-tight\">\n Community Rewards\n </h2>\n <p className=\"mt-1.5 text-sm text-muted-foreground leading-relaxed\">\n Earn XP. Share the Creator&apos;s Fund.\n </p>\n </div>\n\n {/* Recently active — live rail sourced from the same entries as the\n member cards on the right, no rank/podium framing. */}\n {!isLoading && entries.length > 0 && (\n <div className=\"border-y border-brand-orange/20 py-3\">\n <p className=\"text-[10px] font-bold uppercase tracking-widest text-muted-foreground mb-2\">\n Recently active\n </p>\n <div className=\"flex -space-x-2\">\n {entries.slice(0, 5).map((entry) => (\n <span\n key={entry.address}\n title={`${entry.totalXp.toLocaleString()} XP`}\n className=\"flex h-7 w-7 items-center justify-center rounded-full border-2 border-background bg-brand-orange/15 text-[9px] font-bold text-brand-orange\"\n >\n {entry.address.slice(2, 4).toUpperCase()}\n </span>\n ))}\n </div>\n </div>\n )}\n\n {/* Earn actions — plain text row */}\n <div className=\"flex flex-wrap gap-x-5 gap-y-2\">\n {EARN_ACTIONS.map(({ icon: Icon, label }) => (\n <span\n key={label}\n className=\"flex items-center gap-1.5 text-xs font-medium text-muted-foreground\"\n >\n <Icon className=\"h-3 w-3 text-brand-orange/70\" />\n {label}\n </span>\n ))}\n </div>\n\n <Link\n href={rewardsHref}\n className=\"mt-auto inline-flex items-center justify-center gap-2 rounded-xl bg-brand-orange px-6 py-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98]\"\n >\n Start earning XP\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </Link>\n </div>\n\n {/* Right — member cards */}\n <div className=\"p-5 sm:p-6\">\n {!isLoading && entries.length > 0 ? (\n <div className=\"grid grid-cols-2 gap-3 h-full\">\n {entries.slice(0, 4).map((entry) => (\n <Link\n key={entry.address}\n href={creatorHref(entry.address)}\n className=\"group relative rounded-xl bg-card dark:bg-muted/30 hover:bg-card/70 dark:hover:bg-muted/50 overflow-hidden transition-colors flex flex-col justify-between p-4\"\n >\n <div className=\"absolute inset-x-0 top-0 h-0.5 bg-brand-orange/40\" />\n\n {/* XP — hero number */}\n <div className=\"space-y-0.5 pt-1\">\n <p className=\"text-2xl font-black tabular-nums leading-none\">\n {entry.totalXp.toLocaleString()}\n </p>\n <p className=\"text-[11px] text-muted-foreground\">XP earned</p>\n </div>\n\n <AddressDisplay\n address={entry.address}\n chars={4}\n showCopy={false}\n className=\"text-xs font-medium text-muted-foreground group-hover:text-foreground transition-colors\"\n />\n </Link>\n ))}\n </div>\n ) : (\n <div className=\"grid grid-cols-2 gap-3 h-full\">\n {Array.from({ length: 4 }).map((_, i) => (\n <div key={i} className=\"min-h-[100px] rounded-xl bg-card dark:bg-muted/30 animate-pulse\" />\n ))}\n </div>\n )}\n </div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoCQ;AAlCR,kBAAiB;AACjB,0BAAqE;AACrE,6BAA+B;AAc/B,MAAM,eAAe;AAAA,EACnB,EAAE,MAAM,yBAAK,OAAO,OAAO;AAAA,EAC3B,EAAE,MAAM,6BAAS,OAAO,SAAS;AAAA,EACjC,EAAE,MAAM,iCAAa,OAAO,QAAQ;AAAA,EACpC,EAAE,MAAM,mCAAe,OAAO,SAAS;AACzC;AAEO,SAAS,wBAAwB;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AC,UACxB;AAAA,MAAC,YAAAA;AAAA,MAAA;AAAA,QAEC,MAAM,YAAY,MAAM,OAAO;AAAA,QAC/B,WAAU;AAAA,QAEV;AAAA,sDAAC,SAAI,WAAU,qDAAoD;AAAA,UAGnE,6CAAC,SAAI,WAAU,oBACb;AAAA,wDAAC,OAAE,WAAU,iDACV,gBAAM,QAAQ,eAAe,GAChC;AAAA,YACA,4CAAC,OAAE,WAAU,qCAAoC,uBAAS;AAAA,aAC5D;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,SAAS,MAAM;AAAA,cACf,OAAO;AAAA,cACP,UAAU;AAAA,cACV,WAAU;AAAA;AAAA,UACZ;AAAA;AAAA;AAAA,MAnBK,MAAM;AAAA,IAoBb,CACD,GACH,IAEA,4CAAC,SAAI,WAAU,iCACZ,gBAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MACjC,4CAAC,SAAY,WAAU,qEAAb,CAA+E,CAC1F,GACH,GAEJ;AAAA,KACF;AAEJ;","names":["Link"]}
@@ -0,0 +1,15 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface CommunityRewardsEntry {
4
+ address: string;
5
+ totalXp: number;
6
+ }
7
+ interface CommunityRewardsSectionProps {
8
+ entries: CommunityRewardsEntry[];
9
+ isLoading?: boolean;
10
+ rewardsHref: string;
11
+ creatorHref: (address: string) => string;
12
+ }
13
+ declare function CommunityRewardsSection({ entries, isLoading, rewardsHref, creatorHref, }: CommunityRewardsSectionProps): react_jsx_runtime.JSX.Element;
14
+
15
+ export { type CommunityRewardsEntry, CommunityRewardsSection, type CommunityRewardsSectionProps };
@@ -0,0 +1,15 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface CommunityRewardsEntry {
4
+ address: string;
5
+ totalXp: number;
6
+ }
7
+ interface CommunityRewardsSectionProps {
8
+ entries: CommunityRewardsEntry[];
9
+ isLoading?: boolean;
10
+ rewardsHref: string;
11
+ creatorHref: (address: string) => string;
12
+ }
13
+ declare function CommunityRewardsSection({ entries, isLoading, rewardsHref, creatorHref, }: CommunityRewardsSectionProps): react_jsx_runtime.JSX.Element;
14
+
15
+ export { type CommunityRewardsEntry, CommunityRewardsSection, type CommunityRewardsSectionProps };
@@ -0,0 +1,89 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import Link from "next/link";
4
+ import { ArrowRight, Zap, Palette, ShoppingBag, MessageSquare } from "lucide-react";
5
+ import { AddressDisplay } from "./address-display.js";
6
+ const EARN_ACTIONS = [
7
+ { icon: Zap, label: "Mint" },
8
+ { icon: Palette, label: "Create" },
9
+ { icon: ShoppingBag, label: "Trade" },
10
+ { icon: MessageSquare, label: "Engage" }
11
+ ];
12
+ function CommunityRewardsSection({
13
+ entries,
14
+ isLoading = false,
15
+ rewardsHref,
16
+ creatorHref
17
+ }) {
18
+ return /* @__PURE__ */ jsxs("section", { className: "rounded-2xl bg-muted/50 dark:bg-card overflow-hidden grid lg:grid-cols-2 max-lg:divide-y lg:divide-x divide-brand-orange/20", children: [
19
+ /* @__PURE__ */ jsxs("div", { className: "px-7 py-8 sm:px-9 flex flex-col gap-6", children: [
20
+ /* @__PURE__ */ jsxs("div", { children: [
21
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-bold uppercase tracking-widest text-brand-orange", children: "Creator's Fund" }),
22
+ /* @__PURE__ */ jsx("h2", { className: "mt-4 text-2xl font-bold tracking-tight leading-tight", children: "Community Rewards" }),
23
+ /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-sm text-muted-foreground leading-relaxed", children: "Earn XP. Share the Creator's Fund." })
24
+ ] }),
25
+ !isLoading && entries.length > 0 && /* @__PURE__ */ jsxs("div", { className: "border-y border-brand-orange/20 py-3", children: [
26
+ /* @__PURE__ */ jsx("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground mb-2", children: "Recently active" }),
27
+ /* @__PURE__ */ jsx("div", { className: "flex -space-x-2", children: entries.slice(0, 5).map((entry) => /* @__PURE__ */ jsx(
28
+ "span",
29
+ {
30
+ title: `${entry.totalXp.toLocaleString()} XP`,
31
+ className: "flex h-7 w-7 items-center justify-center rounded-full border-2 border-background bg-brand-orange/15 text-[9px] font-bold text-brand-orange",
32
+ children: entry.address.slice(2, 4).toUpperCase()
33
+ },
34
+ entry.address
35
+ )) })
36
+ ] }),
37
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-x-5 gap-y-2", children: EARN_ACTIONS.map(({ icon: Icon, label }) => /* @__PURE__ */ jsxs(
38
+ "span",
39
+ {
40
+ className: "flex items-center gap-1.5 text-xs font-medium text-muted-foreground",
41
+ children: [
42
+ /* @__PURE__ */ jsx(Icon, { className: "h-3 w-3 text-brand-orange/70" }),
43
+ label
44
+ ]
45
+ },
46
+ label
47
+ )) }),
48
+ /* @__PURE__ */ jsxs(
49
+ Link,
50
+ {
51
+ href: rewardsHref,
52
+ className: "mt-auto inline-flex items-center justify-center gap-2 rounded-xl bg-brand-orange px-6 py-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98]",
53
+ children: [
54
+ "Start earning XP",
55
+ /* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5" })
56
+ ]
57
+ }
58
+ )
59
+ ] }),
60
+ /* @__PURE__ */ jsx("div", { className: "p-5 sm:p-6", children: !isLoading && entries.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3 h-full", children: entries.slice(0, 4).map((entry) => /* @__PURE__ */ jsxs(
61
+ Link,
62
+ {
63
+ href: creatorHref(entry.address),
64
+ className: "group relative rounded-xl bg-card dark:bg-muted/30 hover:bg-card/70 dark:hover:bg-muted/50 overflow-hidden transition-colors flex flex-col justify-between p-4",
65
+ children: [
66
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 top-0 h-0.5 bg-brand-orange/40" }),
67
+ /* @__PURE__ */ jsxs("div", { className: "space-y-0.5 pt-1", children: [
68
+ /* @__PURE__ */ jsx("p", { className: "text-2xl font-black tabular-nums leading-none", children: entry.totalXp.toLocaleString() }),
69
+ /* @__PURE__ */ jsx("p", { className: "text-[11px] text-muted-foreground", children: "XP earned" })
70
+ ] }),
71
+ /* @__PURE__ */ jsx(
72
+ AddressDisplay,
73
+ {
74
+ address: entry.address,
75
+ chars: 4,
76
+ showCopy: false,
77
+ className: "text-xs font-medium text-muted-foreground group-hover:text-foreground transition-colors"
78
+ }
79
+ )
80
+ ]
81
+ },
82
+ entry.address
83
+ )) }) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3 h-full", children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "min-h-[100px] rounded-xl bg-card dark:bg-muted/30 animate-pulse" }, i)) }) })
84
+ ] });
85
+ }
86
+ export {
87
+ CommunityRewardsSection
88
+ };
89
+ //# sourceMappingURL=community-rewards-section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/community-rewards-section.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { ArrowRight, Zap, Palette, ShoppingBag, MessageSquare } from \"lucide-react\";\nimport { AddressDisplay } from \"./address-display.js\";\n\nexport interface CommunityRewardsEntry {\n address: string;\n totalXp: number;\n}\n\nexport interface CommunityRewardsSectionProps {\n entries: CommunityRewardsEntry[];\n isLoading?: boolean;\n rewardsHref: string;\n creatorHref: (address: string) => string;\n}\n\nconst EARN_ACTIONS = [\n { icon: Zap, label: \"Mint\" },\n { icon: Palette, label: \"Create\" },\n { icon: ShoppingBag, label: \"Trade\" },\n { icon: MessageSquare, label: \"Engage\" },\n];\n\nexport function CommunityRewardsSection({\n entries,\n isLoading = false,\n rewardsHref,\n creatorHref,\n}: CommunityRewardsSectionProps) {\n return (\n <section className=\"rounded-2xl bg-muted/50 dark:bg-card overflow-hidden grid lg:grid-cols-2 max-lg:divide-y lg:divide-x divide-brand-orange/20\">\n\n {/* Left — info panel */}\n <div className=\"px-7 py-8 sm:px-9 flex flex-col gap-6\">\n <div>\n {/* Creator's Fund eyebrow — shared with CreatorAirdropBanner */}\n <span className=\"text-xs font-bold uppercase tracking-widest text-brand-orange\">\n Creator&apos;s Fund\n </span>\n <h2 className=\"mt-4 text-2xl font-bold tracking-tight leading-tight\">\n Community Rewards\n </h2>\n <p className=\"mt-1.5 text-sm text-muted-foreground leading-relaxed\">\n Earn XP. Share the Creator&apos;s Fund.\n </p>\n </div>\n\n {/* Recently active — live rail sourced from the same entries as the\n member cards on the right, no rank/podium framing. */}\n {!isLoading && entries.length > 0 && (\n <div className=\"border-y border-brand-orange/20 py-3\">\n <p className=\"text-[10px] font-bold uppercase tracking-widest text-muted-foreground mb-2\">\n Recently active\n </p>\n <div className=\"flex -space-x-2\">\n {entries.slice(0, 5).map((entry) => (\n <span\n key={entry.address}\n title={`${entry.totalXp.toLocaleString()} XP`}\n className=\"flex h-7 w-7 items-center justify-center rounded-full border-2 border-background bg-brand-orange/15 text-[9px] font-bold text-brand-orange\"\n >\n {entry.address.slice(2, 4).toUpperCase()}\n </span>\n ))}\n </div>\n </div>\n )}\n\n {/* Earn actions — plain text row */}\n <div className=\"flex flex-wrap gap-x-5 gap-y-2\">\n {EARN_ACTIONS.map(({ icon: Icon, label }) => (\n <span\n key={label}\n className=\"flex items-center gap-1.5 text-xs font-medium text-muted-foreground\"\n >\n <Icon className=\"h-3 w-3 text-brand-orange/70\" />\n {label}\n </span>\n ))}\n </div>\n\n <Link\n href={rewardsHref}\n className=\"mt-auto inline-flex items-center justify-center gap-2 rounded-xl bg-brand-orange px-6 py-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98]\"\n >\n Start earning XP\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </Link>\n </div>\n\n {/* Right — member cards */}\n <div className=\"p-5 sm:p-6\">\n {!isLoading && entries.length > 0 ? (\n <div className=\"grid grid-cols-2 gap-3 h-full\">\n {entries.slice(0, 4).map((entry) => (\n <Link\n key={entry.address}\n href={creatorHref(entry.address)}\n className=\"group relative rounded-xl bg-card dark:bg-muted/30 hover:bg-card/70 dark:hover:bg-muted/50 overflow-hidden transition-colors flex flex-col justify-between p-4\"\n >\n <div className=\"absolute inset-x-0 top-0 h-0.5 bg-brand-orange/40\" />\n\n {/* XP — hero number */}\n <div className=\"space-y-0.5 pt-1\">\n <p className=\"text-2xl font-black tabular-nums leading-none\">\n {entry.totalXp.toLocaleString()}\n </p>\n <p className=\"text-[11px] text-muted-foreground\">XP earned</p>\n </div>\n\n <AddressDisplay\n address={entry.address}\n chars={4}\n showCopy={false}\n className=\"text-xs font-medium text-muted-foreground group-hover:text-foreground transition-colors\"\n />\n </Link>\n ))}\n </div>\n ) : (\n <div className=\"grid grid-cols-2 gap-3 h-full\">\n {Array.from({ length: 4 }).map((_, i) => (\n <div key={i} className=\"min-h-[100px] rounded-xl bg-card dark:bg-muted/30 animate-pulse\" />\n ))}\n </div>\n )}\n </div>\n </section>\n );\n}\n"],"mappings":";AAoCQ,SAEE,KAFF;AAlCR,OAAO,UAAU;AACjB,SAAS,YAAY,KAAK,SAAS,aAAa,qBAAqB;AACrE,SAAS,sBAAsB;AAc/B,MAAM,eAAe;AAAA,EACnB,EAAE,MAAM,KAAK,OAAO,OAAO;AAAA,EAC3B,EAAE,MAAM,SAAS,OAAO,SAAS;AAAA,EACjC,EAAE,MAAM,aAAa,OAAO,QAAQ;AAAA,EACpC,EAAE,MAAM,eAAe,OAAO,SAAS;AACzC;AAEO,SAAS,wBAAwB;AAAA,EACtC;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA;AACF,GAAiC;AAC/B,SACE,qBAAC,aAAQ,WAAU,+HAGjB;AAAA,yBAAC,SAAI,WAAU,yCACb;AAAA,2BAAC,SAEC;AAAA,4BAAC,UAAK,WAAU,iEAAgE,4BAEhF;AAAA,QACA,oBAAC,QAAG,WAAU,wDAAuD,+BAErE;AAAA,QACA,oBAAC,OAAE,WAAU,wDAAuD,gDAEp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YAAC;AAAA;AAAA,cACC,SAAS,MAAM;AAAA,cACf,OAAO;AAAA,cACP,UAAU;AAAA,cACV,WAAU;AAAA;AAAA,UACZ;AAAA;AAAA;AAAA,MAnBK,MAAM;AAAA,IAoBb,CACD,GACH,IAEA,oBAAC,SAAI,WAAU,iCACZ,gBAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MACjC,oBAAC,SAAY,WAAU,qEAAb,CAA+E,CAC1F,GACH,GAEJ;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var creator_airdrop_banner_exports = {};
31
+ __export(creator_airdrop_banner_exports, {
32
+ CreatorAirdropBanner: () => CreatorAirdropBanner
33
+ });
34
+ module.exports = __toCommonJS(creator_airdrop_banner_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_link = __toESM(require("next/link"), 1);
37
+ var import_lucide_react = require("lucide-react");
38
+ const HIGHLIGHTS = [
39
+ "Free and frictionless participation",
40
+ "Eligible for every prize distribution",
41
+ "Create, trade and earn more rewards"
42
+ ];
43
+ function CreatorAirdropBanner({ href }) {
44
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "rounded-2xl bg-muted/50 dark:bg-card px-7 py-8 sm:px-9", children: [
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3", children: [
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs font-bold uppercase tracking-widest text-brand-orange", children: "Creator's Fund" }),
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex items-center gap-1.5 text-xs font-medium text-muted-foreground", children: [
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-brand-orange animate-pulse" }),
49
+ "Live"
50
+ ] })
51
+ ] }),
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mt-4 flex flex-col sm:flex-row sm:items-center gap-6", children: [
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0", children: [
54
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-2xl sm:text-3xl font-bold tracking-tight leading-tight", children: "Creator's Airdrop" }),
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-1.5 text-sm text-muted-foreground leading-relaxed max-w-md", children: "Claim your participation and join the creator's fund distribution." })
56
+ ] }),
57
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
58
+ import_link.default,
59
+ {
60
+ href,
61
+ className: "inline-flex items-center justify-center gap-2 rounded-xl bg-brand-orange px-6 py-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] shrink-0",
62
+ children: [
63
+ "Read More",
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-4 w-4" })
65
+ ]
66
+ }
67
+ )
68
+ ] }),
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-7 border-t border-brand-orange/20 pt-4 flex flex-wrap items-center gap-x-2.5 gap-y-1.5 text-sm text-muted-foreground", children: HIGHLIGHTS.map((h, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex items-center gap-2.5", children: [
70
+ i > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-brand-orange/50", "aria-hidden": true, children: "\xB7" }),
71
+ h
72
+ ] }, h)) })
73
+ ] });
74
+ }
75
+ // Annotate the CommonJS export names for ESM import in node:
76
+ 0 && (module.exports = {
77
+ CreatorAirdropBanner
78
+ });
79
+ //# sourceMappingURL=creator-airdrop-banner.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/creator-airdrop-banner.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { ArrowRight } from \"lucide-react\";\n\nexport interface CreatorAirdropBannerProps {\n /** Route of the airdrop claim page. */\n href: string;\n}\n\nconst HIGHLIGHTS = [\n \"Free and frictionless participation\",\n \"Eligible for every prize distribution\",\n \"Create, trade and earn more rewards\",\n];\n\nexport function CreatorAirdropBanner({ href }: CreatorAirdropBannerProps) {\n return (\n <section className=\"rounded-2xl bg-muted/50 dark:bg-card px-7 py-8 sm:px-9\">\n {/* Creator's Fund eyebrow — shared with CommunityRewardsSection */}\n <div className=\"flex items-center gap-3\">\n <span className=\"text-xs font-bold uppercase tracking-widest text-brand-orange\">\n Creator&apos;s Fund\n </span>\n <span className=\"flex items-center gap-1.5 text-xs font-medium text-muted-foreground\">\n <span className=\"h-1.5 w-1.5 rounded-full bg-brand-orange animate-pulse\" />\n Live\n </span>\n </div>\n\n <div className=\"mt-4 flex flex-col sm:flex-row sm:items-center gap-6\">\n <div className=\"flex-1 min-w-0\">\n <h2 className=\"text-2xl sm:text-3xl font-bold tracking-tight leading-tight\">\n Creator&apos;s Airdrop\n </h2>\n <p className=\"mt-1.5 text-sm text-muted-foreground leading-relaxed max-w-md\">\n Claim your participation and join the creator&apos;s fund distribution.\n </p>\n </div>\n\n <Link\n href={href}\n className=\"inline-flex items-center justify-center gap-2 rounded-xl bg-brand-orange px-6 py-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] shrink-0\"\n >\n Read More\n <ArrowRight className=\"h-4 w-4\" />\n </Link>\n </div>\n\n <div className=\"mt-7 border-t border-brand-orange/20 pt-4 flex flex-wrap items-center gap-x-2.5 gap-y-1.5 text-sm text-muted-foreground\">\n {HIGHLIGHTS.map((h, i) => (\n <span key={h} className=\"flex items-center gap-2.5\">\n {i > 0 && <span className=\"text-brand-orange/50\" aria-hidden>·</span>}\n {h}\n </span>\n ))}\n </div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBQ;AAnBR,kBAAiB;AACjB,0BAA2B;AAO3B,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,qBAAqB,EAAE,KAAK,GAA8B;AACxE,SACE,6CAAC,aAAQ,WAAU,0DAEjB;AAAA,iDAAC,SAAI,WAAU,2BACb;AAAA,kDAAC,UAAK,WAAU,iEAAgE,4BAEhF;AAAA,MACA,6CAAC,UAAK,WAAU,uEACd;AAAA,oDAAC,UAAK,WAAU,0DAAyD;AAAA,QAAE;AAAA,SAE7E;AAAA,OACF;AAAA,IAEA,6CAAC,SAAI,WAAU,wDACb;AAAA,mDAAC,SAAI,WAAU,kBACb;AAAA,oDAAC,QAAG,WAAU,+DAA8D,+BAE5E;AAAA,QACA,4CAAC,OAAE,WAAU,iEAAgE,gFAE7E;AAAA,SACF;AAAA,MAEA;AAAA,QAAC,YAAAA;AAAA,QAAA;AAAA,UACC;AAAA,UACA,WAAU;AAAA,UACX;AAAA;AAAA,YAEC,4CAAC,kCAAW,WAAU,WAAU;AAAA;AAAA;AAAA,MAClC;AAAA,OACF;AAAA,IAEA,4CAAC,SAAI,WAAU,2HACZ,qBAAW,IAAI,CAAC,GAAG,MAClB,6CAAC,UAAa,WAAU,6BACrB;AAAA,UAAI,KAAK,4CAAC,UAAK,WAAU,wBAAuB,eAAW,MAAC,kBAAC;AAAA,MAC7D;AAAA,SAFQ,CAGX,CACD,GACH;AAAA,KACF;AAEJ;","names":["Link"]}
@@ -0,0 +1,9 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface CreatorAirdropBannerProps {
4
+ /** Route of the airdrop claim page. */
5
+ href: string;
6
+ }
7
+ declare function CreatorAirdropBanner({ href }: CreatorAirdropBannerProps): react_jsx_runtime.JSX.Element;
8
+
9
+ export { CreatorAirdropBanner, type CreatorAirdropBannerProps };
@@ -0,0 +1,9 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface CreatorAirdropBannerProps {
4
+ /** Route of the airdrop claim page. */
5
+ href: string;
6
+ }
7
+ declare function CreatorAirdropBanner({ href }: CreatorAirdropBannerProps): react_jsx_runtime.JSX.Element;
8
+
9
+ export { CreatorAirdropBanner, type CreatorAirdropBannerProps };
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import Link from "next/link";
4
+ import { ArrowRight } from "lucide-react";
5
+ const HIGHLIGHTS = [
6
+ "Free and frictionless participation",
7
+ "Eligible for every prize distribution",
8
+ "Create, trade and earn more rewards"
9
+ ];
10
+ function CreatorAirdropBanner({ href }) {
11
+ return /* @__PURE__ */ jsxs("section", { className: "rounded-2xl bg-muted/50 dark:bg-card px-7 py-8 sm:px-9", children: [
12
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
13
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-bold uppercase tracking-widest text-brand-orange", children: "Creator's Fund" }),
14
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 text-xs font-medium text-muted-foreground", children: [
15
+ /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-brand-orange animate-pulse" }),
16
+ "Live"
17
+ ] })
18
+ ] }),
19
+ /* @__PURE__ */ jsxs("div", { className: "mt-4 flex flex-col sm:flex-row sm:items-center gap-6", children: [
20
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
21
+ /* @__PURE__ */ jsx("h2", { className: "text-2xl sm:text-3xl font-bold tracking-tight leading-tight", children: "Creator's Airdrop" }),
22
+ /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-sm text-muted-foreground leading-relaxed max-w-md", children: "Claim your participation and join the creator's fund distribution." })
23
+ ] }),
24
+ /* @__PURE__ */ jsxs(
25
+ Link,
26
+ {
27
+ href,
28
+ className: "inline-flex items-center justify-center gap-2 rounded-xl bg-brand-orange px-6 py-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] shrink-0",
29
+ children: [
30
+ "Read More",
31
+ /* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" })
32
+ ]
33
+ }
34
+ )
35
+ ] }),
36
+ /* @__PURE__ */ jsx("div", { className: "mt-7 border-t border-brand-orange/20 pt-4 flex flex-wrap items-center gap-x-2.5 gap-y-1.5 text-sm text-muted-foreground", children: HIGHLIGHTS.map((h, i) => /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2.5", children: [
37
+ i > 0 && /* @__PURE__ */ jsx("span", { className: "text-brand-orange/50", "aria-hidden": true, children: "\xB7" }),
38
+ h
39
+ ] }, h)) })
40
+ ] });
41
+ }
42
+ export {
43
+ CreatorAirdropBanner
44
+ };
45
+ //# sourceMappingURL=creator-airdrop-banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/creator-airdrop-banner.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { ArrowRight } from \"lucide-react\";\n\nexport interface CreatorAirdropBannerProps {\n /** Route of the airdrop claim page. */\n href: string;\n}\n\nconst HIGHLIGHTS = [\n \"Free and frictionless participation\",\n \"Eligible for every prize distribution\",\n \"Create, trade and earn more rewards\",\n];\n\nexport function CreatorAirdropBanner({ href }: CreatorAirdropBannerProps) {\n return (\n <section className=\"rounded-2xl bg-muted/50 dark:bg-card px-7 py-8 sm:px-9\">\n {/* Creator's Fund eyebrow — shared with CommunityRewardsSection */}\n <div className=\"flex items-center gap-3\">\n <span className=\"text-xs font-bold uppercase tracking-widest text-brand-orange\">\n Creator&apos;s Fund\n </span>\n <span className=\"flex items-center gap-1.5 text-xs font-medium text-muted-foreground\">\n <span className=\"h-1.5 w-1.5 rounded-full bg-brand-orange animate-pulse\" />\n Live\n </span>\n </div>\n\n <div className=\"mt-4 flex flex-col sm:flex-row sm:items-center gap-6\">\n <div className=\"flex-1 min-w-0\">\n <h2 className=\"text-2xl sm:text-3xl font-bold tracking-tight leading-tight\">\n Creator&apos;s Airdrop\n </h2>\n <p className=\"mt-1.5 text-sm text-muted-foreground leading-relaxed max-w-md\">\n Claim your participation and join the creator&apos;s fund distribution.\n </p>\n </div>\n\n <Link\n href={href}\n className=\"inline-flex items-center justify-center gap-2 rounded-xl bg-brand-orange px-6 py-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] shrink-0\"\n >\n Read More\n <ArrowRight className=\"h-4 w-4\" />\n </Link>\n </div>\n\n <div className=\"mt-7 border-t border-brand-orange/20 pt-4 flex flex-wrap items-center gap-x-2.5 gap-y-1.5 text-sm text-muted-foreground\">\n {HIGHLIGHTS.map((h, i) => (\n <span key={h} className=\"flex items-center gap-2.5\">\n {i > 0 && <span className=\"text-brand-orange/50\" aria-hidden>·</span>}\n {h}\n </span>\n ))}\n </div>\n </section>\n );\n}\n"],"mappings":";AAqBQ,cAGA,YAHA;AAnBR,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAO3B,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,qBAAqB,EAAE,KAAK,GAA8B;AACxE,SACE,qBAAC,aAAQ,WAAU,0DAEjB;AAAA,yBAAC,SAAI,WAAU,2BACb;AAAA,0BAAC,UAAK,WAAU,iEAAgE,4BAEhF;AAAA,MACA,qBAAC,UAAK,WAAU,uEACd;AAAA,4BAAC,UAAK,WAAU,0DAAyD;AAAA,QAAE;AAAA,SAE7E;AAAA,OACF;AAAA,IAEA,qBAAC,SAAI,WAAU,wDACb;AAAA,2BAAC,SAAI,WAAU,kBACb;AAAA,4BAAC,QAAG,WAAU,+DAA8D,+BAE5E;AAAA,QACA,oBAAC,OAAE,WAAU,iEAAgE,gFAE7E;AAAA,SACF;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAU;AAAA,UACX;AAAA;AAAA,YAEC,oBAAC,cAAW,WAAU,WAAU;AAAA;AAAA;AAAA,MAClC;AAAA,OACF;AAAA,IAEA,oBAAC,SAAI,WAAU,2HACZ,qBAAW,IAAI,CAAC,GAAG,MAClB,qBAAC,UAAa,WAAU,6BACrB;AAAA,UAAI,KAAK,oBAAC,UAAK,WAAU,wBAAuB,eAAW,MAAC,kBAAC;AAAA,MAC7D;AAAA,SAFQ,CAGX,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
@@ -29,6 +29,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
30
  var badge_shelf_exports = {};
31
31
  __export(badge_shelf_exports, {
32
+ BadgeIcon: () => BadgeIcon,
32
33
  BadgeShelf: () => BadgeShelf
33
34
  });
34
35
  module.exports = __toCommonJS(badge_shelf_exports);
@@ -85,6 +86,7 @@ function BadgeShelf({ badges, earnedKeys, showLocked = false, className }) {
85
86
  }
86
87
  // Annotate the CommonJS export names for ESM import in node:
87
88
  0 && (module.exports = {
89
+ BadgeIcon,
88
90
  BadgeShelf
89
91
  });
90
92
  //# sourceMappingURL=badge-shelf.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/rewards/badge-shelf.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../utils/cn.js\";\n\nexport interface BadgeShelfBadge {\n key: string;\n name: string;\n description: string;\n icon: string;\n color: string;\n category: string;\n}\n\nexport interface BadgeShelfProps {\n /** The badges to render — the earned set, or the full catalog with `earnedKeys`. */\n badges: BadgeShelfBadge[];\n /** When set, badges outside this set render locked (grayscale, reduced opacity). */\n earnedKeys?: string[];\n /** Render locked badges too (requires `earnedKeys`); default hides them. */\n showLocked?: boolean;\n className?: string;\n}\n\n// Lazily resolve lucide icons by name at runtime (icon names come from the API).\nconst iconCache = new Map<string, React.ComponentType<LucideProps>>();\n\nfunction BadgeIcon({ name, color, className }: { name: string; color: string; className?: string }) {\n const [Icon, setIcon] = React.useState<React.ComponentType<LucideProps> | null>(\n () => iconCache.get(name) ?? null\n );\n\n React.useEffect(() => {\n if (iconCache.has(name)) {\n setIcon(() => iconCache.get(name)!);\n return;\n }\n import(\"lucide-react\").then((mod) => {\n const C = (mod as Record<string, unknown>)[name] as React.ComponentType<LucideProps> | undefined;\n if (C) {\n iconCache.set(name, C);\n setIcon(() => C);\n }\n });\n }, [name]);\n\n if (!Icon) return <span className={cn(\"rounded-full\", className)} style={{ backgroundColor: color }} />;\n return <Icon className={className} style={{ color }} />;\n}\n\n/** Badge chips with native tooltips. Earned badges render in their color;\n * locked ones (present in `badges` but not `earnedKeys`) render muted. */\nexport function BadgeShelf({ badges, earnedKeys, showLocked = false, className }: BadgeShelfProps) {\n const earned = earnedKeys ? new Set(earnedKeys) : null;\n const visible = badges.filter((b) => showLocked || !earned || earned.has(b.key));\n if (visible.length === 0) return null;\n\n return (\n <div className={cn(\"flex flex-wrap gap-2\", className)}>\n {visible.map((badge) => {\n const isLocked = earned ? !earned.has(badge.key) : false;\n return (\n <div\n key={badge.key}\n title={isLocked ? `${badge.description} — keep going to earn this` : badge.description}\n className={cn(\n \"flex h-7 select-none items-center gap-1.5 rounded-full border px-2.5\",\n isLocked && \"opacity-45 grayscale\"\n )}\n style={{\n borderColor: `${badge.color}60`,\n backgroundColor: `${badge.color}14`,\n }}\n >\n <BadgeIcon name={badge.icon} color={badge.color} className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"text-xs font-semibold\" style={{ color: badge.color }}>\n {badge.name}\n </span>\n </div>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+CoB;AA7CpB,mBAAkB;AAElB,gBAAmB;AAsBnB,MAAM,YAAY,oBAAI,IAA8C;AAEpE,SAAS,UAAU,EAAE,MAAM,OAAO,UAAU,GAAwD;AAClG,QAAM,CAAC,MAAM,OAAO,IAAI,aAAAA,QAAM;AAAA,IAC5B,MAAM,UAAU,IAAI,IAAI,KAAK;AAAA,EAC/B;AAEA,eAAAA,QAAM,UAAU,MAAM;AACpB,QAAI,UAAU,IAAI,IAAI,GAAG;AACvB,cAAQ,MAAM,UAAU,IAAI,IAAI,CAAE;AAClC;AAAA,IACF;AACA,WAAO,cAAc,EAAE,KAAK,CAAC,QAAQ;AACnC,YAAM,IAAK,IAAgC,IAAI;AAC/C,UAAI,GAAG;AACL,kBAAU,IAAI,MAAM,CAAC;AACrB,gBAAQ,MAAM,CAAC;AAAA,MACjB;AAAA,IACF,CAAC;AAAA,EACH,GAAG,CAAC,IAAI,CAAC;AAET,MAAI,CAAC,KAAM,QAAO,4CAAC,UAAK,eAAW,cAAG,gBAAgB,SAAS,GAAG,OAAO,EAAE,iBAAiB,MAAM,GAAG;AACrG,SAAO,4CAAC,QAAK,WAAsB,OAAO,EAAE,MAAM,GAAG;AACvD;AAIO,SAAS,WAAW,EAAE,QAAQ,YAAY,aAAa,OAAO,UAAU,GAAoB;AACjG,QAAM,SAAS,aAAa,IAAI,IAAI,UAAU,IAAI;AAClD,QAAM,UAAU,OAAO,OAAO,CAAC,MAAM,cAAc,CAAC,UAAU,OAAO,IAAI,EAAE,GAAG,CAAC;AAC/E,MAAI,QAAQ,WAAW,EAAG,QAAO;AAEjC,SACE,4CAAC,SAAI,eAAW,cAAG,wBAAwB,SAAS,GACjD,kBAAQ,IAAI,CAAC,UAAU;AACtB,UAAM,WAAW,SAAS,CAAC,OAAO,IAAI,MAAM,GAAG,IAAI;AACnD,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,OAAO,WAAW,GAAG,MAAM,WAAW,oCAA+B,MAAM;AAAA,QAC3E,eAAW;AAAA,UACT;AAAA,UACA,YAAY;AAAA,QACd;AAAA,QACA,OAAO;AAAA,UACL,aAAa,GAAG,MAAM,KAAK;AAAA,UAC3B,iBAAiB,GAAG,MAAM,KAAK;AAAA,QACjC;AAAA,QAEA;AAAA,sDAAC,aAAU,MAAM,MAAM,MAAM,OAAO,MAAM,OAAO,WAAU,wBAAuB;AAAA,UAClF,4CAAC,UAAK,WAAU,yBAAwB,OAAO,EAAE,OAAO,MAAM,MAAM,GACjE,gBAAM,MACT;AAAA;AAAA;AAAA,MAdK,MAAM;AAAA,IAeb;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":["React"]}
1
+ {"version":3,"sources":["../../../src/components/rewards/badge-shelf.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../utils/cn.js\";\n\nexport interface BadgeShelfBadge {\n key: string;\n name: string;\n description: string;\n icon: string;\n color: string;\n category: string;\n}\n\nexport interface BadgeShelfProps {\n /** The badges to render — the earned set, or the full catalog with `earnedKeys`. */\n badges: BadgeShelfBadge[];\n /** When set, badges outside this set render locked (grayscale, reduced opacity). */\n earnedKeys?: string[];\n /** Render locked badges too (requires `earnedKeys`); default hides them. */\n showLocked?: boolean;\n className?: string;\n}\n\n// Lazily resolve lucide icons by name at runtime (icon names come from the API).\nconst iconCache = new Map<string, React.ComponentType<LucideProps>>();\n\nexport function BadgeIcon({ name, color, className }: { name: string; color: string; className?: string }) {\n const [Icon, setIcon] = React.useState<React.ComponentType<LucideProps> | null>(\n () => iconCache.get(name) ?? null\n );\n\n React.useEffect(() => {\n if (iconCache.has(name)) {\n setIcon(() => iconCache.get(name)!);\n return;\n }\n import(\"lucide-react\").then((mod) => {\n const C = (mod as Record<string, unknown>)[name] as React.ComponentType<LucideProps> | undefined;\n if (C) {\n iconCache.set(name, C);\n setIcon(() => C);\n }\n });\n }, [name]);\n\n if (!Icon) return <span className={cn(\"rounded-full\", className)} style={{ backgroundColor: color }} />;\n return <Icon className={className} style={{ color }} />;\n}\n\n/** Badge chips with native tooltips. Earned badges render in their color;\n * locked ones (present in `badges` but not `earnedKeys`) render muted. */\nexport function BadgeShelf({ badges, earnedKeys, showLocked = false, className }: BadgeShelfProps) {\n const earned = earnedKeys ? new Set(earnedKeys) : null;\n const visible = badges.filter((b) => showLocked || !earned || earned.has(b.key));\n if (visible.length === 0) return null;\n\n return (\n <div className={cn(\"flex flex-wrap gap-2\", className)}>\n {visible.map((badge) => {\n const isLocked = earned ? !earned.has(badge.key) : false;\n return (\n <div\n key={badge.key}\n title={isLocked ? `${badge.description} — keep going to earn this` : badge.description}\n className={cn(\n \"flex h-7 select-none items-center gap-1.5 rounded-full border px-2.5\",\n isLocked && \"opacity-45 grayscale\"\n )}\n style={{\n borderColor: `${badge.color}60`,\n backgroundColor: `${badge.color}14`,\n }}\n >\n <BadgeIcon name={badge.icon} color={badge.color} className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"text-xs font-semibold\" style={{ color: badge.color }}>\n {badge.name}\n </span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AI;AACnD,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,OAAO,WAAW,GAAG,MAAM,WAAW,oCAA+B,MAAM;AAAA,QAC3E,eAAW;AAAA,UACT;AAAA,UACA,YAAY;AAAA,QACd;AAAA,QACA,OAAO;AAAA,UACL,aAAa,GAAG,MAAM,KAAK;AAAA,UAC3B,iBAAiB,GAAG,MAAM,KAAK;AAAA,QACjC;AAAA,QAEA;AAAA,sDAAC,aAAU,MAAM,MAAM,MAAM,OAAO,MAAM,OAAO,WAAU,wBAAuB;AAAA,UAClF,4CAAC,UAAK,WAAU,yBAAwB,OAAO,EAAE,OAAO,MAAM,MAAM,GACjE,gBAAM,MACT;AAAA;AAAA;AAAA,MAdK,MAAM;AAAA,IAeb;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":["React"]}
@@ -17,8 +17,13 @@ interface BadgeShelfProps {
17
17
  showLocked?: boolean;
18
18
  className?: string;
19
19
  }
20
+ declare function BadgeIcon({ name, color, className }: {
21
+ name: string;
22
+ color: string;
23
+ className?: string;
24
+ }): react_jsx_runtime.JSX.Element;
20
25
  /** Badge chips with native tooltips. Earned badges render in their color;
21
26
  * locked ones (present in `badges` but not `earnedKeys`) render muted. */
22
27
  declare function BadgeShelf({ badges, earnedKeys, showLocked, className }: BadgeShelfProps): react_jsx_runtime.JSX.Element | null;
23
28
 
24
- export { BadgeShelf, type BadgeShelfBadge, type BadgeShelfProps };
29
+ export { BadgeIcon, BadgeShelf, type BadgeShelfBadge, type BadgeShelfProps };
@@ -17,8 +17,13 @@ interface BadgeShelfProps {
17
17
  showLocked?: boolean;
18
18
  className?: string;
19
19
  }
20
+ declare function BadgeIcon({ name, color, className }: {
21
+ name: string;
22
+ color: string;
23
+ className?: string;
24
+ }): react_jsx_runtime.JSX.Element;
20
25
  /** Badge chips with native tooltips. Earned badges render in their color;
21
26
  * locked ones (present in `badges` but not `earnedKeys`) render muted. */
22
27
  declare function BadgeShelf({ badges, earnedKeys, showLocked, className }: BadgeShelfProps): react_jsx_runtime.JSX.Element | null;
23
28
 
24
- export { BadgeShelf, type BadgeShelfBadge, type BadgeShelfProps };
29
+ export { BadgeIcon, BadgeShelf, type BadgeShelfBadge, type BadgeShelfProps };
@@ -51,6 +51,7 @@ function BadgeShelf({ badges, earnedKeys, showLocked = false, className }) {
51
51
  }) });
52
52
  }
53
53
  export {
54
+ BadgeIcon,
54
55
  BadgeShelf
55
56
  };
56
57
  //# sourceMappingURL=badge-shelf.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/rewards/badge-shelf.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../utils/cn.js\";\n\nexport interface BadgeShelfBadge {\n key: string;\n name: string;\n description: string;\n icon: string;\n color: string;\n category: string;\n}\n\nexport interface BadgeShelfProps {\n /** The badges to render — the earned set, or the full catalog with `earnedKeys`. */\n badges: BadgeShelfBadge[];\n /** When set, badges outside this set render locked (grayscale, reduced opacity). */\n earnedKeys?: string[];\n /** Render locked badges too (requires `earnedKeys`); default hides them. */\n showLocked?: boolean;\n className?: string;\n}\n\n// Lazily resolve lucide icons by name at runtime (icon names come from the API).\nconst iconCache = new Map<string, React.ComponentType<LucideProps>>();\n\nfunction BadgeIcon({ name, color, className }: { name: string; color: string; className?: string }) {\n const [Icon, setIcon] = React.useState<React.ComponentType<LucideProps> | null>(\n () => iconCache.get(name) ?? null\n );\n\n React.useEffect(() => {\n if (iconCache.has(name)) {\n setIcon(() => iconCache.get(name)!);\n return;\n }\n import(\"lucide-react\").then((mod) => {\n const C = (mod as Record<string, unknown>)[name] as React.ComponentType<LucideProps> | undefined;\n if (C) {\n iconCache.set(name, C);\n setIcon(() => C);\n }\n });\n }, [name]);\n\n if (!Icon) return <span className={cn(\"rounded-full\", className)} style={{ backgroundColor: color }} />;\n return <Icon className={className} style={{ color }} />;\n}\n\n/** Badge chips with native tooltips. Earned badges render in their color;\n * locked ones (present in `badges` but not `earnedKeys`) render muted. */\nexport function BadgeShelf({ badges, earnedKeys, showLocked = false, className }: BadgeShelfProps) {\n const earned = earnedKeys ? new Set(earnedKeys) : null;\n const visible = badges.filter((b) => showLocked || !earned || earned.has(b.key));\n if (visible.length === 0) return null;\n\n return (\n <div className={cn(\"flex flex-wrap gap-2\", className)}>\n {visible.map((badge) => {\n const isLocked = earned ? !earned.has(badge.key) : false;\n return (\n <div\n key={badge.key}\n title={isLocked ? `${badge.description} — keep going to earn this` : badge.description}\n className={cn(\n \"flex h-7 select-none items-center gap-1.5 rounded-full border px-2.5\",\n isLocked && \"opacity-45 grayscale\"\n )}\n style={{\n borderColor: `${badge.color}60`,\n backgroundColor: `${badge.color}14`,\n }}\n >\n <BadgeIcon name={badge.icon} color={badge.color} className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"text-xs font-semibold\" style={{ color: badge.color }}>\n {badge.name}\n </span>\n </div>\n );\n })}\n </div>\n );\n}\n"],"mappings":";AA+CoB,cAgBV,YAhBU;AA7CpB,OAAO,WAAW;AAElB,SAAS,UAAU;AAsBnB,MAAM,YAAY,oBAAI,IAA8C;AAEpE,SAAS,UAAU,EAAE,MAAM,OAAO,UAAU,GAAwD;AAClG,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM;AAAA,IAC5B,MAAM,UAAU,IAAI,IAAI,KAAK;AAAA,EAC/B;AAEA,QAAM,UAAU,MAAM;AACpB,QAAI,UAAU,IAAI,IAAI,GAAG;AACvB,cAAQ,MAAM,UAAU,IAAI,IAAI,CAAE;AAClC;AAAA,IACF;AACA,WAAO,cAAc,EAAE,KAAK,CAAC,QAAQ;AACnC,YAAM,IAAK,IAAgC,IAAI;AAC/C,UAAI,GAAG;AACL,kBAAU,IAAI,MAAM,CAAC;AACrB,gBAAQ,MAAM,CAAC;AAAA,MACjB;AAAA,IACF,CAAC;AAAA,EACH,GAAG,CAAC,IAAI,CAAC;AAET,MAAI,CAAC,KAAM,QAAO,oBAAC,UAAK,WAAW,GAAG,gBAAgB,SAAS,GAAG,OAAO,EAAE,iBAAiB,MAAM,GAAG;AACrG,SAAO,oBAAC,QAAK,WAAsB,OAAO,EAAE,MAAM,GAAG;AACvD;AAIO,SAAS,WAAW,EAAE,QAAQ,YAAY,aAAa,OAAO,UAAU,GAAoB;AACjG,QAAM,SAAS,aAAa,IAAI,IAAI,UAAU,IAAI;AAClD,QAAM,UAAU,OAAO,OAAO,CAAC,MAAM,cAAc,CAAC,UAAU,OAAO,IAAI,EAAE,GAAG,CAAC;AAC/E,MAAI,QAAQ,WAAW,EAAG,QAAO;AAEjC,SACE,oBAAC,SAAI,WAAW,GAAG,wBAAwB,SAAS,GACjD,kBAAQ,IAAI,CAAC,UAAU;AACtB,UAAM,WAAW,SAAS,CAAC,OAAO,IAAI,MAAM,GAAG,IAAI;AACnD,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,OAAO,WAAW,GAAG,MAAM,WAAW,oCAA+B,MAAM;AAAA,QAC3E,WAAW;AAAA,UACT;AAAA,UACA,YAAY;AAAA,QACd;AAAA,QACA,OAAO;AAAA,UACL,aAAa,GAAG,MAAM,KAAK;AAAA,UAC3B,iBAAiB,GAAG,MAAM,KAAK;AAAA,QACjC;AAAA,QAEA;AAAA,8BAAC,aAAU,MAAM,MAAM,MAAM,OAAO,MAAM,OAAO,WAAU,wBAAuB;AAAA,UAClF,oBAAC,UAAK,WAAU,yBAAwB,OAAO,EAAE,OAAO,MAAM,MAAM,GACjE,gBAAM,MACT;AAAA;AAAA;AAAA,MAdK,MAAM;AAAA,IAeb;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/rewards/badge-shelf.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport type { LucideProps } from \"lucide-react\";\nimport { cn } from \"../../utils/cn.js\";\n\nexport interface BadgeShelfBadge {\n key: string;\n name: string;\n description: string;\n icon: string;\n color: string;\n category: string;\n}\n\nexport interface BadgeShelfProps {\n /** The badges to render — the earned set, or the full catalog with `earnedKeys`. */\n badges: BadgeShelfBadge[];\n /** When set, badges outside this set render locked (grayscale, reduced opacity). */\n earnedKeys?: string[];\n /** Render locked badges too (requires `earnedKeys`); default hides them. */\n showLocked?: boolean;\n className?: string;\n}\n\n// Lazily resolve lucide icons by name at runtime (icon names come from the API).\nconst iconCache = new Map<string, React.ComponentType<LucideProps>>();\n\nexport function BadgeIcon({ name, color, className }: { name: string; color: string; className?: string }) {\n const [Icon, setIcon] = React.useState<React.ComponentType<LucideProps> | null>(\n () => iconCache.get(name) ?? null\n );\n\n React.useEffect(() => {\n if (iconCache.has(name)) {\n setIcon(() => iconCache.get(name)!);\n return;\n }\n import(\"lucide-react\").then((mod) => {\n const C = (mod as Record<string, unknown>)[name] as React.ComponentType<LucideProps> | undefined;\n if (C) {\n iconCache.set(name, C);\n setIcon(() => C);\n }\n });\n }, [name]);\n\n if (!Icon) return <span className={cn(\"rounded-full\", className)} style={{ backgroundColor: color }} />;\n return <Icon className={className} style={{ color }} />;\n}\n\n/** Badge chips with native tooltips. Earned badges render in their color;\n * locked ones (present in `badges` but not `earnedKeys`) render muted. */\nexport function BadgeShelf({ badges, earnedKeys, showLocked = false, className }: BadgeShelfProps) {\n const earned = earnedKeys ? new Set(earnedKeys) : null;\n const visible = badges.filter((b) => showLocked || !earned || earned.has(b.key));\n if (visible.length === 0) return null;\n\n return (\n <div className={cn(\"flex flex-wrap gap-2\", className)}>\n {visible.map((badge) => {\n const isLocked = earned ? !earned.has(badge.key) : false;\n return (\n <div\n key={badge.key}\n title={isLocked ? `${badge.description} — keep going to earn this` : badge.description}\n className={cn(\n \"flex h-7 select-none items-center gap-1.5 rounded-full border px-2.5\",\n isLocked && \"opacity-45 grayscale\"\n )}\n style={{\n borderColor: `${badge.color}60`,\n backgroundColor: `${badge.color}14`,\n }}\n >\n <BadgeIcon name={badge.icon} color={badge.color} className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"text-xs font-semibold\" style={{ color: badge.color }}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AO,WAAW,GAAG,MAAM,WAAW,oCAA+B,MAAM;AAAA,QAC3E,WAAW;AAAA,UACT;AAAA,UACA,YAAY;AAAA,QACd;AAAA,QACA,OAAO;AAAA,UACL,aAAa,GAAG,MAAM,KAAK;AAAA,UAC3B,iBAAiB,GAAG,MAAM,KAAK;AAAA,QACjC;AAAA,QAEA;AAAA,8BAAC,aAAU,MAAM,MAAM,MAAM,OAAO,MAAM,OAAO,WAAU,wBAAuB;AAAA,UAClF,oBAAC,UAAK,WAAU,yBAAwB,OAAO,EAAE,OAAO,MAAM,MAAM,GACjE,gBAAM,MACT;AAAA;AAAA;AAAA,MAdK,MAAM;AAAA,IAeb;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var badge_unlock_toast_content_exports = {};
20
+ __export(badge_unlock_toast_content_exports, {
21
+ BadgeUnlockToastContent: () => BadgeUnlockToastContent
22
+ });
23
+ module.exports = __toCommonJS(badge_unlock_toast_content_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_badge_shelf = require("./badge-shelf.js");
26
+ function BadgeUnlockToastContent({ badge }) {
27
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2.5", children: [
28
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
29
+ "span",
30
+ {
31
+ className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full border",
32
+ style: { borderColor: `${badge.color}60`, backgroundColor: `${badge.color}18` },
33
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge_shelf.BadgeIcon, { name: badge.icon, color: badge.color, className: "h-4 w-4" })
34
+ }
35
+ ),
36
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
37
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "truncate text-sm font-semibold", children: [
38
+ "Badge earned \xB7 ",
39
+ badge.name
40
+ ] }),
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground truncate", children: badge.description })
42
+ ] })
43
+ ] });
44
+ }
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ BadgeUnlockToastContent
48
+ });
49
+ //# sourceMappingURL=badge-unlock-toast-content.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/rewards/badge-unlock-toast-content.tsx"],"sourcesContent":["import { BadgeIcon } from \"./badge-shelf.js\";\nimport type { BadgeShelfBadge } from \"./badge-shelf.js\";\n\nexport interface BadgeUnlockToastContentProps {\n badge: BadgeShelfBadge;\n}\n\n/** Toast body for a newly-earned badge: icon, name, description — the\n * badge equivalent of XpToastContent. */\nexport function BadgeUnlockToastContent({ badge }: BadgeUnlockToastContentProps) {\n return (\n <div className=\"flex items-center gap-2.5\">\n <span\n className=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border\"\n style={{ borderColor: `${badge.color}60`, backgroundColor: `${badge.color}18` }}\n >\n <BadgeIcon name={badge.icon} color={badge.color} className=\"h-4 w-4\" />\n </span>\n <div className=\"min-w-0\">\n <p className=\"truncate text-sm font-semibold\">Badge earned · {badge.name}</p>\n <p className=\"text-xs text-muted-foreground truncate\">{badge.description}</p>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBQ;AAhBR,yBAA0B;AASnB,SAAS,wBAAwB,EAAE,MAAM,GAAiC;AAC/E,SACE,6CAAC,SAAI,WAAU,6BACb;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,aAAa,GAAG,MAAM,KAAK,MAAM,iBAAiB,GAAG,MAAM,KAAK,KAAK;AAAA,QAE9E,sDAAC,gCAAU,MAAM,MAAM,MAAM,OAAO,MAAM,OAAO,WAAU,WAAU;AAAA;AAAA,IACvE;AAAA,IACA,6CAAC,SAAI,WAAU,WACb;AAAA,mDAAC,OAAE,WAAU,kCAAiC;AAAA;AAAA,QAAgB,MAAM;AAAA,SAAK;AAAA,MACzE,4CAAC,OAAE,WAAU,0CAA0C,gBAAM,aAAY;AAAA,OAC3E;AAAA,KACF;AAEJ;","names":[]}