@medialane/ui 0.102.0 → 0.103.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 (43) hide show
  1. package/dist/components/creator-analytics.cjs +170 -0
  2. package/dist/components/creator-analytics.cjs.map +1 -0
  3. package/dist/components/creator-analytics.d.cts +10 -0
  4. package/dist/components/creator-analytics.d.ts +10 -0
  5. package/dist/components/creator-analytics.js +153 -0
  6. package/dist/components/creator-analytics.js.map +1 -0
  7. package/dist/components/drop-countdown.cjs +66 -0
  8. package/dist/components/drop-countdown.cjs.map +1 -0
  9. package/dist/components/drop-countdown.d.cts +8 -0
  10. package/dist/components/drop-countdown.d.ts +8 -0
  11. package/dist/components/drop-countdown.js +42 -0
  12. package/dist/components/drop-countdown.js.map +1 -0
  13. package/dist/components/owner-setup-panel.cjs +91 -0
  14. package/dist/components/owner-setup-panel.cjs.map +1 -0
  15. package/dist/components/owner-setup-panel.d.cts +10 -0
  16. package/dist/components/owner-setup-panel.d.ts +10 -0
  17. package/dist/components/owner-setup-panel.js +57 -0
  18. package/dist/components/owner-setup-panel.js.map +1 -0
  19. package/dist/index.cjs +28 -2
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +8 -0
  22. package/dist/index.d.ts +8 -0
  23. package/dist/index.js +23 -1
  24. package/dist/index.js.map +1 -1
  25. package/dist/utils/use-creators.cjs +53 -0
  26. package/dist/utils/use-creators.cjs.map +1 -0
  27. package/dist/utils/use-creators.d.cts +11 -0
  28. package/dist/utils/use-creators.d.ts +11 -0
  29. package/dist/utils/use-creators.js +19 -0
  30. package/dist/utils/use-creators.js.map +1 -0
  31. package/dist/utils/use-medialane-client.cjs +33 -0
  32. package/dist/utils/use-medialane-client.cjs.map +1 -0
  33. package/dist/utils/use-medialane-client.d.cts +5 -0
  34. package/dist/utils/use-medialane-client.d.ts +5 -0
  35. package/dist/utils/use-medialane-client.js +9 -0
  36. package/dist/utils/use-medialane-client.js.map +1 -0
  37. package/dist/utils/use-rewards.cjs +100 -0
  38. package/dist/utils/use-rewards.cjs.map +1 -0
  39. package/dist/utils/use-rewards.d.cts +61 -0
  40. package/dist/utils/use-rewards.d.ts +61 -0
  41. package/dist/utils/use-rewards.js +62 -0
  42. package/dist/utils/use-rewards.js.map +1 -0
  43. package/package.json +5 -1
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var creator_analytics_exports = {};
21
+ __export(creator_analytics_exports, {
22
+ CreatorAnalytics: () => CreatorAnalytics
23
+ });
24
+ module.exports = __toCommonJS(creator_analytics_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_react = require("react");
27
+ var import_recharts = require("recharts");
28
+ var import_lucide_react = require("lucide-react");
29
+ function parsePrice(formatted) {
30
+ if (!formatted) return 0;
31
+ return parseFloat(formatted.replace(/[^0-9.]/g, "")) || 0;
32
+ }
33
+ function buildDailyVolume(sales) {
34
+ const buckets = /* @__PURE__ */ new Map();
35
+ const now = Date.now();
36
+ for (let i = 29; i >= 0; i--) {
37
+ const d = new Date(now - i * 864e5);
38
+ buckets.set(
39
+ d.toLocaleDateString("en-US", { month: "short", day: "numeric" }),
40
+ 0
41
+ );
42
+ }
43
+ for (const s of sales) {
44
+ const ts = typeof s.timestamp === "number" ? s.timestamp * 1e3 : new Date(s.timestamp).getTime();
45
+ if (now - ts > 30 * 864e5) continue;
46
+ const label = new Date(ts).toLocaleDateString("en-US", {
47
+ month: "short",
48
+ day: "numeric"
49
+ });
50
+ buckets.set(label, (buckets.get(label) ?? 0) + parsePrice(s.price?.formatted));
51
+ }
52
+ return Array.from(buckets.entries()).map(([label, volume]) => ({ label, volume }));
53
+ }
54
+ function CreatorAnalytics({ activities, isLoading }) {
55
+ const { sales, totalVolume, topCurrency, dailyVolume } = (0, import_react.useMemo)(() => {
56
+ const sales2 = activities.filter((a) => a.type === "sale");
57
+ const byCurrency = /* @__PURE__ */ new Map();
58
+ for (const s of sales2) {
59
+ const cur = s.price?.currency ?? "STRK";
60
+ byCurrency.set(cur, (byCurrency.get(cur) ?? 0) + parsePrice(s.price?.formatted));
61
+ }
62
+ const sorted = [...byCurrency.entries()].sort((a, b) => b[1] - a[1]);
63
+ const topCurrency2 = sorted[0]?.[0] ?? "STRK";
64
+ const totalVolume2 = sorted[0]?.[1] ?? 0;
65
+ const dailyVolume2 = buildDailyVolume(
66
+ sales2.filter((s) => (s.price?.currency ?? "STRK") === topCurrency2)
67
+ );
68
+ return { sales: sales2, totalVolume: totalVolume2, topCurrency: topCurrency2, dailyVolume: dailyVolume2 };
69
+ }, [activities]);
70
+ if (isLoading) {
71
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-4 animate-pulse", children: [1, 2, 3].map((i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-20 rounded-xl bg-muted" }, i)) });
72
+ }
73
+ if (sales.length === 0) {
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "py-12 text-center text-sm text-muted-foreground", children: "No sales recorded yet." });
75
+ }
76
+ const stats = [
77
+ {
78
+ label: "Total Sales",
79
+ value: sales.length.toString(),
80
+ icon: import_lucide_react.ShoppingBag
81
+ },
82
+ {
83
+ label: `Total Volume (${topCurrency})`,
84
+ value: totalVolume.toFixed(2),
85
+ icon: import_lucide_react.Coins
86
+ },
87
+ {
88
+ label: "Last 30 Days",
89
+ value: `${dailyVolume.filter((d) => d.volume > 0).length} active days`,
90
+ icon: import_lucide_react.TrendingUp
91
+ }
92
+ ];
93
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-6", children: [
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: stats.map(({ label, value, icon: Icon }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
95
+ "div",
96
+ {
97
+ className: "rounded-xl border border-border bg-card/50 p-4 space-y-1",
98
+ children: [
99
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
100
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-3.5 w-3.5" }),
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-medium uppercase tracking-wide", children: label })
102
+ ] }),
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-2xl font-bold tabular-nums", children: value })
104
+ ]
105
+ },
106
+ label
107
+ )) }),
108
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl border border-border bg-card/50 p-4 space-y-2", children: [
109
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: [
110
+ "30-day volume \xB7 ",
111
+ topCurrency
112
+ ] }),
113
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: 140, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
114
+ import_recharts.BarChart,
115
+ {
116
+ data: dailyVolume,
117
+ margin: { top: 4, right: 4, bottom: 0, left: 0 },
118
+ children: [
119
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
120
+ import_recharts.XAxis,
121
+ {
122
+ dataKey: "label",
123
+ tick: { fontSize: 10, fill: "hsl(var(--muted-foreground))" },
124
+ axisLine: false,
125
+ tickLine: false,
126
+ interval: 6
127
+ }
128
+ ),
129
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
130
+ import_recharts.YAxis,
131
+ {
132
+ tick: { fontSize: 10, fill: "hsl(var(--muted-foreground))" },
133
+ axisLine: false,
134
+ tickLine: false,
135
+ width: 40
136
+ }
137
+ ),
138
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
139
+ import_recharts.Tooltip,
140
+ {
141
+ contentStyle: {
142
+ background: "hsl(var(--background))",
143
+ border: "1px solid hsl(var(--border))",
144
+ borderRadius: "8px",
145
+ fontSize: "12px",
146
+ color: "hsl(var(--foreground))"
147
+ },
148
+ formatter: (value) => [`${value} ${topCurrency}`, "Volume"]
149
+ }
150
+ ),
151
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
152
+ import_recharts.Bar,
153
+ {
154
+ dataKey: "volume",
155
+ fill: "hsl(var(--primary))",
156
+ radius: [3, 3, 0, 0],
157
+ maxBarSize: 24
158
+ }
159
+ )
160
+ ]
161
+ }
162
+ ) })
163
+ ] })
164
+ ] });
165
+ }
166
+ // Annotate the CommonJS export names for ESM import in node:
167
+ 0 && (module.exports = {
168
+ CreatorAnalytics
169
+ });
170
+ //# sourceMappingURL=creator-analytics.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/creator-analytics.tsx"],"sourcesContent":["\"use client\";\n\nimport { useMemo } from \"react\";\nimport {\n BarChart,\n Bar,\n XAxis,\n YAxis,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\nimport type { ApiActivity } from \"@medialane/sdk\";\nimport { TrendingUp, ShoppingBag, Coins } from \"lucide-react\";\n\ninterface CreatorAnalyticsProps {\n activities: ApiActivity[];\n isLoading: boolean;\n}\n\ninterface DayStat {\n label: string;\n volume: number;\n}\n\nfunction parsePrice(formatted: string | null | undefined): number {\n if (!formatted) return 0;\n return parseFloat(formatted.replace(/[^0-9.]/g, \"\")) || 0;\n}\n\nfunction buildDailyVolume(sales: ApiActivity[]): DayStat[] {\n const buckets = new Map<string, number>();\n const now = Date.now();\n // Pre-fill last 30 days so chart always shows full range\n for (let i = 29; i >= 0; i--) {\n const d = new Date(now - i * 86_400_000);\n buckets.set(\n d.toLocaleDateString(\"en-US\", { month: \"short\", day: \"numeric\" }),\n 0\n );\n }\n for (const s of sales) {\n const ts =\n typeof s.timestamp === \"number\"\n ? s.timestamp * 1000\n : new Date(s.timestamp).getTime();\n if (now - ts > 30 * 86_400_000) continue;\n const label = new Date(ts).toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n });\n buckets.set(label, (buckets.get(label) ?? 0) + parsePrice(s.price?.formatted));\n }\n return Array.from(buckets.entries()).map(([label, volume]) => ({ label, volume }));\n}\n\nexport function CreatorAnalytics({ activities, isLoading }: CreatorAnalyticsProps) {\n const { sales, totalVolume, topCurrency, dailyVolume } = useMemo(() => {\n const sales = activities.filter((a) => a.type === \"sale\");\n\n // Volume per currency\n const byCurrency = new Map<string, number>();\n for (const s of sales) {\n const cur = s.price?.currency ?? \"STRK\";\n byCurrency.set(cur, (byCurrency.get(cur) ?? 0) + parsePrice(s.price?.formatted));\n }\n const sorted = [...byCurrency.entries()].sort((a, b) => b[1] - a[1]);\n const topCurrency = sorted[0]?.[0] ?? \"STRK\";\n const totalVolume = sorted[0]?.[1] ?? 0;\n\n const dailyVolume = buildDailyVolume(\n sales.filter((s) => (s.price?.currency ?? \"STRK\") === topCurrency)\n );\n\n return { sales, totalVolume, topCurrency, dailyVolume };\n }, [activities]);\n\n if (isLoading) {\n return (\n <div className=\"space-y-4 animate-pulse\">\n {[1, 2, 3].map((i) => (\n <div key={i} className=\"h-20 rounded-xl bg-muted\" />\n ))}\n </div>\n );\n }\n\n if (sales.length === 0) {\n return (\n <div className=\"py-12 text-center text-sm text-muted-foreground\">\n No sales recorded yet.\n </div>\n );\n }\n\n const stats = [\n {\n label: \"Total Sales\",\n value: sales.length.toString(),\n icon: ShoppingBag,\n },\n {\n label: `Total Volume (${topCurrency})`,\n value: totalVolume.toFixed(2),\n icon: Coins,\n },\n {\n label: \"Last 30 Days\",\n value: `${dailyVolume.filter((d) => d.volume > 0).length} active days`,\n icon: TrendingUp,\n },\n ];\n\n return (\n <div className=\"space-y-6\">\n {/* Stat cards */}\n <div className=\"grid grid-cols-1 sm:grid-cols-3 gap-3\">\n {stats.map(({ label, value, icon: Icon }) => (\n <div\n key={label}\n className=\"rounded-xl border border-border bg-card/50 p-4 space-y-1\"\n >\n <div className=\"flex items-center gap-2 text-muted-foreground\">\n <Icon className=\"h-3.5 w-3.5\" />\n <p className=\"text-xs font-medium uppercase tracking-wide\">{label}</p>\n </div>\n <p className=\"text-2xl font-bold tabular-nums\">{value}</p>\n </div>\n ))}\n </div>\n\n {/* 30-day volume chart */}\n <div className=\"rounded-xl border border-border bg-card/50 p-4 space-y-2\">\n <p className=\"text-xs font-medium text-muted-foreground uppercase tracking-wide\">\n 30-day volume · {topCurrency}\n </p>\n <ResponsiveContainer width=\"100%\" height={140}>\n <BarChart\n data={dailyVolume}\n margin={{ top: 4, right: 4, bottom: 0, left: 0 }}\n >\n <XAxis\n dataKey=\"label\"\n tick={{ fontSize: 10, fill: \"hsl(var(--muted-foreground))\" }}\n axisLine={false}\n tickLine={false}\n interval={6}\n />\n <YAxis\n tick={{ fontSize: 10, fill: \"hsl(var(--muted-foreground))\" }}\n axisLine={false}\n tickLine={false}\n width={40}\n />\n <Tooltip\n contentStyle={{\n background: \"hsl(var(--background))\",\n border: \"1px solid hsl(var(--border))\",\n borderRadius: \"8px\",\n fontSize: \"12px\",\n color: \"hsl(var(--foreground))\",\n }}\n formatter={(value) => [`${value} ${topCurrency}`, \"Volume\"]}\n />\n <Bar\n dataKey=\"volume\"\n f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K,IAAI,WAAW,IAAI,QAAQ;AAAA;AAAA,YAC5D;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;AAAA,gBACnB,YAAY;AAAA;AAAA,YACd;AAAA;AAAA;AAAA,MACF,GACF;AAAA,OACF;AAAA,KACF;AAEJ;","names":["sales","topCurrency","totalVolume","dailyVolume"]}
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ApiActivity } from '@medialane/sdk';
3
+
4
+ interface CreatorAnalyticsProps {
5
+ activities: ApiActivity[];
6
+ isLoading: boolean;
7
+ }
8
+ declare function CreatorAnalytics({ activities, isLoading }: CreatorAnalyticsProps): react_jsx_runtime.JSX.Element;
9
+
10
+ export { CreatorAnalytics };
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ApiActivity } from '@medialane/sdk';
3
+
4
+ interface CreatorAnalyticsProps {
5
+ activities: ApiActivity[];
6
+ isLoading: boolean;
7
+ }
8
+ declare function CreatorAnalytics({ activities, isLoading }: CreatorAnalyticsProps): react_jsx_runtime.JSX.Element;
9
+
10
+ export { CreatorAnalytics };
@@ -0,0 +1,153 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useMemo } from "react";
4
+ import {
5
+ BarChart,
6
+ Bar,
7
+ XAxis,
8
+ YAxis,
9
+ Tooltip,
10
+ ResponsiveContainer
11
+ } from "recharts";
12
+ import { TrendingUp, ShoppingBag, Coins } from "lucide-react";
13
+ function parsePrice(formatted) {
14
+ if (!formatted) return 0;
15
+ return parseFloat(formatted.replace(/[^0-9.]/g, "")) || 0;
16
+ }
17
+ function buildDailyVolume(sales) {
18
+ const buckets = /* @__PURE__ */ new Map();
19
+ const now = Date.now();
20
+ for (let i = 29; i >= 0; i--) {
21
+ const d = new Date(now - i * 864e5);
22
+ buckets.set(
23
+ d.toLocaleDateString("en-US", { month: "short", day: "numeric" }),
24
+ 0
25
+ );
26
+ }
27
+ for (const s of sales) {
28
+ const ts = typeof s.timestamp === "number" ? s.timestamp * 1e3 : new Date(s.timestamp).getTime();
29
+ if (now - ts > 30 * 864e5) continue;
30
+ const label = new Date(ts).toLocaleDateString("en-US", {
31
+ month: "short",
32
+ day: "numeric"
33
+ });
34
+ buckets.set(label, (buckets.get(label) ?? 0) + parsePrice(s.price?.formatted));
35
+ }
36
+ return Array.from(buckets.entries()).map(([label, volume]) => ({ label, volume }));
37
+ }
38
+ function CreatorAnalytics({ activities, isLoading }) {
39
+ const { sales, totalVolume, topCurrency, dailyVolume } = useMemo(() => {
40
+ const sales2 = activities.filter((a) => a.type === "sale");
41
+ const byCurrency = /* @__PURE__ */ new Map();
42
+ for (const s of sales2) {
43
+ const cur = s.price?.currency ?? "STRK";
44
+ byCurrency.set(cur, (byCurrency.get(cur) ?? 0) + parsePrice(s.price?.formatted));
45
+ }
46
+ const sorted = [...byCurrency.entries()].sort((a, b) => b[1] - a[1]);
47
+ const topCurrency2 = sorted[0]?.[0] ?? "STRK";
48
+ const totalVolume2 = sorted[0]?.[1] ?? 0;
49
+ const dailyVolume2 = buildDailyVolume(
50
+ sales2.filter((s) => (s.price?.currency ?? "STRK") === topCurrency2)
51
+ );
52
+ return { sales: sales2, totalVolume: totalVolume2, topCurrency: topCurrency2, dailyVolume: dailyVolume2 };
53
+ }, [activities]);
54
+ if (isLoading) {
55
+ return /* @__PURE__ */ jsx("div", { className: "space-y-4 animate-pulse", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsx("div", { className: "h-20 rounded-xl bg-muted" }, i)) });
56
+ }
57
+ if (sales.length === 0) {
58
+ return /* @__PURE__ */ jsx("div", { className: "py-12 text-center text-sm text-muted-foreground", children: "No sales recorded yet." });
59
+ }
60
+ const stats = [
61
+ {
62
+ label: "Total Sales",
63
+ value: sales.length.toString(),
64
+ icon: ShoppingBag
65
+ },
66
+ {
67
+ label: `Total Volume (${topCurrency})`,
68
+ value: totalVolume.toFixed(2),
69
+ icon: Coins
70
+ },
71
+ {
72
+ label: "Last 30 Days",
73
+ value: `${dailyVolume.filter((d) => d.volume > 0).length} active days`,
74
+ icon: TrendingUp
75
+ }
76
+ ];
77
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
78
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: stats.map(({ label, value, icon: Icon }) => /* @__PURE__ */ jsxs(
79
+ "div",
80
+ {
81
+ className: "rounded-xl border border-border bg-card/50 p-4 space-y-1",
82
+ children: [
83
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
84
+ /* @__PURE__ */ jsx(Icon, { className: "h-3.5 w-3.5" }),
85
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase tracking-wide", children: label })
86
+ ] }),
87
+ /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold tabular-nums", children: value })
88
+ ]
89
+ },
90
+ label
91
+ )) }),
92
+ /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border bg-card/50 p-4 space-y-2", children: [
93
+ /* @__PURE__ */ jsxs("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: [
94
+ "30-day volume \xB7 ",
95
+ topCurrency
96
+ ] }),
97
+ /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: 140, children: /* @__PURE__ */ jsxs(
98
+ BarChart,
99
+ {
100
+ data: dailyVolume,
101
+ margin: { top: 4, right: 4, bottom: 0, left: 0 },
102
+ children: [
103
+ /* @__PURE__ */ jsx(
104
+ XAxis,
105
+ {
106
+ dataKey: "label",
107
+ tick: { fontSize: 10, fill: "hsl(var(--muted-foreground))" },
108
+ axisLine: false,
109
+ tickLine: false,
110
+ interval: 6
111
+ }
112
+ ),
113
+ /* @__PURE__ */ jsx(
114
+ YAxis,
115
+ {
116
+ tick: { fontSize: 10, fill: "hsl(var(--muted-foreground))" },
117
+ axisLine: false,
118
+ tickLine: false,
119
+ width: 40
120
+ }
121
+ ),
122
+ /* @__PURE__ */ jsx(
123
+ Tooltip,
124
+ {
125
+ contentStyle: {
126
+ background: "hsl(var(--background))",
127
+ border: "1px solid hsl(var(--border))",
128
+ borderRadius: "8px",
129
+ fontSize: "12px",
130
+ color: "hsl(var(--foreground))"
131
+ },
132
+ formatter: (value) => [`${value} ${topCurrency}`, "Volume"]
133
+ }
134
+ ),
135
+ /* @__PURE__ */ jsx(
136
+ Bar,
137
+ {
138
+ dataKey: "volume",
139
+ fill: "hsl(var(--primary))",
140
+ radius: [3, 3, 0, 0],
141
+ maxBarSize: 24
142
+ }
143
+ )
144
+ ]
145
+ }
146
+ ) })
147
+ ] })
148
+ ] });
149
+ }
150
+ export {
151
+ CreatorAnalytics
152
+ };
153
+ //# sourceMappingURL=creator-analytics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/creator-analytics.tsx"],"sourcesContent":["\"use client\";\n\nimport { useMemo } from \"react\";\nimport {\n BarChart,\n Bar,\n XAxis,\n YAxis,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\nimport type { ApiActivity } from \"@medialane/sdk\";\nimport { TrendingUp, ShoppingBag, Coins } from \"lucide-react\";\n\ninterface CreatorAnalyticsProps {\n activities: ApiActivity[];\n isLoading: boolean;\n}\n\ninterface DayStat {\n label: string;\n volume: number;\n}\n\nfunction parsePrice(formatted: string | null | undefined): number {\n if (!formatted) return 0;\n return parseFloat(formatted.replace(/[^0-9.]/g, \"\")) || 0;\n}\n\nfunction buildDailyVolume(sales: ApiActivity[]): DayStat[] {\n const buckets = new Map<string, number>();\n const now = Date.now();\n // Pre-fill last 30 days so chart always shows full range\n for (let i = 29; i >= 0; i--) {\n const d = new Date(now - i * 86_400_000);\n buckets.set(\n d.toLocaleDateString(\"en-US\", { month: \"short\", day: \"numeric\" }),\n 0\n );\n }\n for (const s of sales) {\n const ts =\n typeof s.timestamp === \"number\"\n ? s.timestamp * 1000\n : new Date(s.timestamp).getTime();\n if (now - ts > 30 * 86_400_000) continue;\n const label = new Date(ts).toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n });\n buckets.set(label, (buckets.get(label) ?? 0) + parsePrice(s.price?.formatted));\n }\n return Array.from(buckets.entries()).map(([label, volume]) => ({ label, volume }));\n}\n\nexport function CreatorAnalytics({ activities, isLoading }: CreatorAnalyticsProps) {\n const { sales, totalVolume, topCurrency, dailyVolume } = useMemo(() => {\n const sales = activities.filter((a) => a.type === \"sale\");\n\n // Volume per currency\n const byCurrency = new Map<string, number>();\n for (const s of sales) {\n const cur = s.price?.currency ?? \"STRK\";\n byCurrency.set(cur, (byCurrency.get(cur) ?? 0) + parsePrice(s.price?.formatted));\n }\n const sorted = [...byCurrency.entries()].sort((a, b) => b[1] - a[1]);\n const topCurrency = sorted[0]?.[0] ?? \"STRK\";\n const totalVolume = sorted[0]?.[1] ?? 0;\n\n const dailyVolume = buildDailyVolume(\n sales.filter((s) => (s.price?.currency ?? \"STRK\") === topCurrency)\n );\n\n return { sales, totalVolume, topCurrency, dailyVolume };\n }, [activities]);\n\n if (isLoading) {\n return (\n <div className=\"space-y-4 animate-pulse\">\n {[1, 2, 3].map((i) => (\n <div key={i} className=\"h-20 rounded-xl bg-muted\" />\n ))}\n </div>\n );\n }\n\n if (sales.length === 0) {\n return (\n <div className=\"py-12 text-center text-sm text-muted-foreground\">\n No sales recorded yet.\n </div>\n );\n }\n\n const stats = [\n {\n label: \"Total Sales\",\n value: sales.length.toString(),\n icon: ShoppingBag,\n },\n {\n label: `Total Volume (${topCurrency})`,\n value: totalVolume.toFixed(2),\n icon: Coins,\n },\n {\n label: \"Last 30 Days\",\n value: `${dailyVolume.filter((d) => d.volume > 0).length} active days`,\n icon: TrendingUp,\n },\n ];\n\n return (\n <div className=\"space-y-6\">\n {/* Stat cards */}\n <div className=\"grid grid-cols-1 sm:grid-cols-3 gap-3\">\n {stats.map(({ label, value, icon: Icon }) => (\n <div\n key={label}\n className=\"rounded-xl border border-border bg-card/50 p-4 space-y-1\"\n >\n <div className=\"flex items-center gap-2 text-muted-foreground\">\n <Icon className=\"h-3.5 w-3.5\" />\n <p className=\"text-xs font-medium uppercase tracking-wide\">{label}</p>\n </div>\n <p className=\"text-2xl font-bold tabular-nums\">{value}</p>\n </div>\n ))}\n </div>\n\n {/* 30-day volume chart */}\n <div className=\"rounded-xl border border-border bg-card/50 p-4 space-y-2\">\n <p className=\"text-xs font-medium text-muted-foreground uppercase tracking-wide\">\n 30-day volume · {topCurrency}\n </p>\n <ResponsiveContainer width=\"100%\" height={140}>\n <BarChart\n data={dailyVolume}\n margin={{ top: 4, right: 4, bottom: 0, left: 0 }}\n >\n <XAxis\n dataKey=\"label\"\n tick={{ fontSize: 10, fill: \"hsl(var(--muted-foreground))\" }}\n axisLine={false}\n tickLine={false}\n interval={6}\n />\n <YAxis\n tick={{ fontSize: 10, fill: \"hsl(var(--muted-foreground))\" }}\n axisLine={false}\n tickLine={false}\n width={40}\n />\n <Tooltip\n contentStyle={{\n background: \"hsl(var(--background))\",\n border: \"1px solid hsl(var(--border))\",\n borderRadius: \"8px\",\n fontSize: \"12px\",\n color: \"hsl(var(--foreground))\",\n }}\n formatter={(value) => [`${value} ${topCurrency}`, \"Volume\"]}\n />\n <Bar\n dataKey=\"volume\"\n fill=\"hsl(var(--primary))\"\n radius={[3, 3, 0, 0]}\n maxBarSize={24}\n />\n </BarChart>\n </ResponsiveContainer>\n </div>\n </div>\n );\n}\n"],"mappings":";AAgFU,cAyCE,YAzCF;AA9EV,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,YAAY,aAAa,aAAa;AAY/C,SAAS,WAAW,WAA8C;AAChE,MAAI,CAAC,UAAW,QAAO;AACvB,SAAO,WAAW,UAAU,QAAQ,YAAY,EA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"use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var drop_countdown_exports = {};
21
+ __export(drop_countdown_exports, {
22
+ DropCountdown: () => DropCountdown
23
+ });
24
+ module.exports = __toCommonJS(drop_countdown_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_react = require("react");
27
+ function parts(totalSeconds) {
28
+ const s = Math.max(0, totalSeconds);
29
+ return {
30
+ d: Math.floor(s / 86400),
31
+ h: Math.floor(s % 86400 / 3600),
32
+ m: Math.floor(s % 3600 / 60),
33
+ s: Math.floor(s % 60)
34
+ };
35
+ }
36
+ function DropCountdown({ targetTs, label }) {
37
+ const [now, setNow] = (0, import_react.useState)(() => Math.floor(Date.now() / 1e3));
38
+ (0, import_react.useEffect)(() => {
39
+ const id = setInterval(() => setNow(Math.floor(Date.now() / 1e3)), 1e3);
40
+ return () => clearInterval(id);
41
+ }, []);
42
+ const { d, h, m, s } = parts(targetTs - now);
43
+ const cell = (value, unit) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center", children: [
44
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-2xl font-black tabular-nums leading-none", children: String(value).padStart(2, "0") }),
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-[10px] uppercase tracking-widest text-muted-foreground mt-1", children: unit })
46
+ ] });
47
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-semibold uppercase tracking-widest text-brand-orange", children: label }),
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3", children: [
50
+ d > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
51
+ cell(d, "days"),
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xl text-muted-foreground/40", children: ":" })
53
+ ] }),
54
+ cell(h, "hrs"),
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xl text-muted-foreground/40", children: ":" }),
56
+ cell(m, "min"),
57
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xl text-muted-foreground/40", children: ":" }),
58
+ cell(s, "sec")
59
+ ] })
60
+ ] });
61
+ }
62
+ // Annotate the CommonJS export names for ESM import in node:
63
+ 0 && (module.exports = {
64
+ DropCountdown
65
+ });
66
+ //# sourceMappingURL=drop-countdown.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/drop-countdown.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\n\nfunction parts(totalSeconds: number) {\n const s = Math.max(0, totalSeconds);\n return {\n d: Math.floor(s / 86400),\n h: Math.floor((s % 86400) / 3600),\n m: Math.floor((s % 3600) / 60),\n s: Math.floor(s % 60),\n };\n}\n\n// Counts down to a unix-seconds target (phase start when upcoming, phase end when live).\nexport function DropCountdown({ targetTs, label }: { targetTs: number; label: string }) {\n const [now, setNow] = useState(() => Math.floor(Date.now() / 1000));\n\n useEffect(() => {\n const id = setInterval(() => setNow(Math.floor(Date.now() / 1000)), 1000);\n return () => clearInterval(id);\n }, []);\n\n const { d, h, m, s } = parts(targetTs - now);\n const cell = (value: number, unit: string) => (\n <div className=\"flex flex-col items-center\">\n <span className=\"text-2xl font-black tabular-nums leading-none\">{String(value).padStart(2, \"0\")}</span>\n <span className=\"text-[10px] uppercase tracking-widest text-muted-foreground mt-1\">{unit}</span>\n </div>\n );\n\n return (\n <div className=\"space-y-2\">\n <p className=\"text-xs font-semibold uppercase tracking-widest text-brand-orange\">{label}</p>\n <div className=\"flex items-center gap-3\">\n {d > 0 && (<>{cell(d, \"days\")}<span className=\"text-xl text-muted-foreground/40\">:</span></>)}\n {cell(h, \"hrs\")}\n <span className=\"text-xl text-muted-foreground/40\">:</span>\n {cell(m, \"min\")}\n <span className=\"text-xl text-muted-foreground/40\">:</span>\n {cell(s, \"sec\")}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBI;AAvBJ,mBAAoC;AAEpC,SAAS,MAAM,cAAsB;AACnC,QAAM,IAAI,KAAK,IAAI,GAAG,YAAY;AAClC,SAAO;AAAA,IACL,GAAG,KAAK,MAAM,IAAI,KAAK;AAAA,IACvB,GAAG,KAAK,MAAO,IAAI,QAAS,IAAI;AAAA,IAChC,GAAG,KAAK,MAAO,IAAI,OAAQ,EAAE;AAAA,IAC7B,GAAG,KAAK,MAAM,IAAI,EAAE;AAAA,EACtB;AACF;AAGO,SAAS,cAAc,EAAE,UAAU,MAAM,GAAwC;AACtF,QAAM,CAAC,KAAK,MAAM,QAAI,uBAAS,MAAM,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI,CAAC;AAElE,8BAAU,MAAM;AACd,UAAM,KAAK,YAAY,MAAM,OAAO,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI,CAAC,GAAG,GAAI;AACxE,WAAO,MAAM,cAAc,EAAE;AAAA,EAC/B,GAAG,CAAC,CAAC;AAEL,QAAM,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI,MAAM,WAAW,GAAG;AAC3C,QAAM,OAAO,CAAC,OAAe,SAC3B,6CAAC,SAAI,WAAU,8BACb;AAAA,gDAAC,UAAK,WAAU,iDAAiD,iBAAO,KAAK,EAAE,SAAS,GAAG,GAAG,GAAE;AAAA,IAChG,4CAAC,UAAK,WAAU,oEAAoE,gBAAK;AAAA,KAC3F;AAGF,SACE,6CAAC,SAAI,WAAU,aACb;AAAA,gDAAC,OAAE,WAAU,qEAAqE,iBAAM;AAAA,IACxF,6CAAC,SAAI,WAAU,2BACZ;AAAA,UAAI,KAAM,4EAAG;AAAA,aAAK,GAAG,MAAM;AAAA,QAAE,4CAAC,UAAK,WAAU,oCAAmC,eAAC;AAAA,SAAO;AAAA,MACxF,KAAK,GAAG,KAAK;AAAA,MACd,4CAAC,UAAK,WAAU,oCAAmC,eAAC;AAAA,MACnD,KAAK,GAAG,KAAK;AAAA,MACd,4CAAC,UAAK,WAAU,oCAAmC,eAAC;AAAA,MACnD,KAAK,GAAG,KAAK;AAAA,OAChB;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,8 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function DropCountdown({ targetTs, label }: {
4
+ targetTs: number;
5
+ label: string;
6
+ }): react_jsx_runtime.JSX.Element;
7
+
8
+ export { DropCountdown };
@@ -0,0 +1,8 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function DropCountdown({ targetTs, label }: {
4
+ targetTs: number;
5
+ label: string;
6
+ }): react_jsx_runtime.JSX.Element;
7
+
8
+ export { DropCountdown };
@@ -0,0 +1,42 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useState } from "react";
4
+ function parts(totalSeconds) {
5
+ const s = Math.max(0, totalSeconds);
6
+ return {
7
+ d: Math.floor(s / 86400),
8
+ h: Math.floor(s % 86400 / 3600),
9
+ m: Math.floor(s % 3600 / 60),
10
+ s: Math.floor(s % 60)
11
+ };
12
+ }
13
+ function DropCountdown({ targetTs, label }) {
14
+ const [now, setNow] = useState(() => Math.floor(Date.now() / 1e3));
15
+ useEffect(() => {
16
+ const id = setInterval(() => setNow(Math.floor(Date.now() / 1e3)), 1e3);
17
+ return () => clearInterval(id);
18
+ }, []);
19
+ const { d, h, m, s } = parts(targetTs - now);
20
+ const cell = (value, unit) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
21
+ /* @__PURE__ */ jsx("span", { className: "text-2xl font-black tabular-nums leading-none", children: String(value).padStart(2, "0") }),
22
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] uppercase tracking-widest text-muted-foreground mt-1", children: unit })
23
+ ] });
24
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
25
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-semibold uppercase tracking-widest text-brand-orange", children: label }),
26
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
27
+ d > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
28
+ cell(d, "days"),
29
+ /* @__PURE__ */ jsx("span", { className: "text-xl text-muted-foreground/40", children: ":" })
30
+ ] }),
31
+ cell(h, "hrs"),
32
+ /* @__PURE__ */ jsx("span", { className: "text-xl text-muted-foreground/40", children: ":" }),
33
+ cell(m, "min"),
34
+ /* @__PURE__ */ jsx("span", { className: "text-xl text-muted-foreground/40", children: ":" }),
35
+ cell(s, "sec")
36
+ ] })
37
+ ] });
38
+ }
39
+ export {
40
+ DropCountdown
41
+ };
42
+ //# sourceMappingURL=drop-countdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/drop-countdown.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\n\nfunction parts(totalSeconds: number) {\n const s = Math.max(0, totalSeconds);\n return {\n d: Math.floor(s / 86400),\n h: Math.floor((s % 86400) / 3600),\n m: Math.floor((s % 3600) / 60),\n s: Math.floor(s % 60),\n };\n}\n\n// Counts down to a unix-seconds target (phase start when upcoming, phase end when live).\nexport function DropCountdown({ targetTs, label }: { targetTs: number; label: string }) {\n const [now, setNow] = useState(() => Math.floor(Date.now() / 1000));\n\n useEffect(() => {\n const id = setInterval(() => setNow(Math.floor(Date.now() / 1000)), 1000);\n return () => clearInterval(id);\n }, []);\n\n const { d, h, m, s } = parts(targetTs - now);\n const cell = (value: number, unit: string) => (\n <div className=\"flex flex-col items-center\">\n <span className=\"text-2xl font-black tabular-nums leading-none\">{String(value).padStart(2, \"0\")}</span>\n <span className=\"text-[10px] uppercase tracking-widest text-muted-foreground mt-1\">{unit}</span>\n </div>\n );\n\n return (\n <div className=\"space-y-2\">\n <p className=\"text-xs font-semibold uppercase tracking-widest text-brand-orange\">{label}</p>\n <div className=\"flex items-center gap-3\">\n {d > 0 && (<>{cell(d, \"days\")}<span className=\"text-xl text-muted-foreground/40\">:</span></>)}\n {cell(h, \"hrs\")}\n <span className=\"text-xl text-muted-foreground/40\">:</span>\n {cell(m, \"min\")}\n <span className=\"text-xl text-muted-foreground/40\">:</span>\n {cell(s, \"sec\")}\n </div>\n </div>\n );\n}\n"],"mappings":";AAyBI,SAUe,UATb,KADF;AAvBJ,SAAS,WAAW,gBAAgB;AAEpC,SAAS,MAAM,cAAsB;AACnC,QAAM,IAAI,KAAK,IAAI,GAAG,YAAY;AAClC,SAAO;AAAA,IACL,GAAG,KAAK,MAAM,IAAI,KAAK;AAAA,IACvB,GAAG,KAAK,MAAO,IAAI,QAAS,IAAI;AAAA,IAChC,GAAG,KAAK,MAAO,IAAI,OAAQ,EAAE;AAAA,IAC7B,GAAG,KAAK,MAAM,IAAI,EAAE;AAAA,EACtB;AACF;AAGO,SAAS,cAAc,EAAE,UAAU,MAAM,GAAwC;AACtF,QAAM,CAAC,KAAK,MAAM,IAAI,SAAS,MAAM,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI,CAAC;AAElE,YAAU,MAAM;AACd,UAAM,KAAK,YAAY,MAAM,OAAO,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI,CAAC,GAAG,GAAI;AACxE,WAAO,MAAM,cAAc,EAAE;AAAA,EAC/B,GAAG,CAAC,CAAC;AAEL,QAAM,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI,MAAM,WAAW,GAAG;AAC3C,QAAM,OAAO,CAAC,OAAe,SAC3B,qBAAC,SAAI,WAAU,8BACb;AAAA,wBAAC,UAAK,WAAU,iDAAiD,iBAAO,KAAK,EAAE,SAAS,GAAG,GAAG,GAAE;AAAA,IAChG,oBAAC,UAAK,WAAU,oEAAoE,gBAAK;AAAA,KAC3F;AAGF,SACE,qBAAC,SAAI,WAAU,aACb;AAAA,wBAAC,OAAE,WAAU,qEAAqE,iBAAM;AAAA,IACxF,qBAAC,SAAI,WAAU,2BACZ;AAAA,UAAI,KAAM,iCAAG;AAAA,aAAK,GAAG,MAAM;AAAA,QAAE,oBAAC,UAAK,WAAU,oCAAmC,eAAC;AAAA,SAAO;AAAA,MACxF,KAAK,GAAG,KAAK;AAAA,MACd,oBAAC,UAAK,WAAU,oCAAmC,eAAC;AAAA,MACnD,KAAK,GAAG,KAAK;AAAA,MACd,oBAAC,UAAK,WAAU,oCAAmC,eAAC;AAAA,MACnD,KAAK,GAAG,KAAK;AAAA,OAChB;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,91 @@
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 owner_setup_panel_exports = {};
31
+ __export(owner_setup_panel_exports, {
32
+ OwnerSetupPanel: () => OwnerSetupPanel
33
+ });
34
+ module.exports = __toCommonJS(owner_setup_panel_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_cn = require("../utils/cn.js");
39
+ function OwnerSetupPanel({ contract, profile }) {
40
+ const items = [
41
+ { label: "Display name", done: !!profile?.displayName },
42
+ { label: "Description", done: !!profile?.description },
43
+ { label: "Cover image", done: !!profile?.image },
44
+ { label: "Banner image", done: !!profile?.bannerImage },
45
+ { label: "Social links", done: !!(profile?.twitterUrl || profile?.discordUrl || profile?.websiteUrl) },
46
+ { label: "Exclusive content", done: !!profile?.hasGatedContent }
47
+ ];
48
+ const doneCount = items.filter((i) => i.done).length;
49
+ if (doneCount === items.length) return null;
50
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mx-4 sm:mx-6 mt-3 rounded-2xl border border-border bg-card/80 p-4 space-y-3", children: [
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Settings, { className: "h-4 w-4 text-muted-foreground" }),
54
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold", children: "Set up your collection" })
55
+ ] }),
56
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-xs text-muted-foreground tabular-nums", children: [
57
+ doneCount,
58
+ "/",
59
+ items.length,
60
+ " complete"
61
+ ] })
62
+ ] }),
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full h-1.5 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
+ "div",
65
+ {
66
+ className: "h-full rounded-full btn-border-animated transition-all duration-500",
67
+ style: { width: `${doneCount / items.length * 100}%` }
68
+ }
69
+ ) }),
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-1", children: items.map(({ label, done }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1.5", children: [
71
+ done ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle2, { className: "h-3.5 w-3.5 text-emerald-500 shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Circle, { className: "h-3.5 w-3.5 text-muted-foreground/40 shrink-0" }),
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_cn.cn)("text-xs", done ? "text-muted-foreground line-through" : "text-foreground"), children: label })
73
+ ] }, label)) }),
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
75
+ import_link.default,
76
+ {
77
+ href: `/portfolio/collections/${contract}/settings`,
78
+ className: "inline-flex items-center gap-1.5 text-xs font-semibold text-primary hover:underline",
79
+ children: [
80
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, { className: "h-3 w-3" }),
81
+ "Complete your collection profile"
82
+ ]
83
+ }
84
+ )
85
+ ] });
86
+ }
87
+ // Annotate the CommonJS export names for ESM import in node:
88
+ 0 && (module.exports = {
89
+ OwnerSetupPanel
90
+ });
91
+ //# sourceMappingURL=owner-setup-panel.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/owner-setup-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { CheckCircle2, Circle, Settings, Sparkles } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiCollectionProfile } from \"@medialane/sdk\";\n\ninterface SetupItem {\n label: string;\n done: boolean;\n}\n\ninterface OwnerSetupPanelProps {\n contract: string;\n profile: ApiCollectionProfile | null;\n}\n\nexport function OwnerSetupPanel({ contract, profile }: OwnerSetupPanelProps) {\n const items: SetupItem[] = [\n { label: \"Display name\", done: !!profile?.displayName },\n { label: \"Description\", done: !!profile?.description },\n { label: \"Cover image\", done: !!profile?.image },\n { label: \"Banner image\", done: !!profile?.bannerImage },\n { label: \"Social links\", done: !!(profile?.twitterUrl || profile?.discordUrl || profile?.websiteUrl) },\n { label: \"Exclusive content\", done: !!profile?.hasGatedContent },\n ];\n\n const doneCount = items.filter((i) => i.done).length;\n\n if (doneCount === items.length) return null;\n\n return (\n <div className=\"mx-4 sm:mx-6 mt-3 rounded-2xl border border-border bg-card/80 p-4 space-y-3\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <Settings className=\"h-4 w-4 text-muted-foreground\" />\n <p className=\"text-sm font-semibold\">Set up your collection</p>\n </div>\n <span className=\"text-xs text-muted-foreground tabular-nums\">\n {doneCount}/{items.length} complete\n </span>\n </div>\n\n <div className=\"w-full h-1.5 rounded-full bg-muted overflow-hidden\">\n <div\n className=\"h-full rounded-full btn-border-animated transition-all duration-500\"\n style={{ width: `${(doneCount / items.length) * 100}%` }}\n />\n </div>\n\n <div className=\"grid grid-cols-2 gap-x-4 gap-y-1\">\n {items.map(({ label, done }) => (\n <div key={label} className=\"flex items-center gap-1.5\">\n {done ? (\n <CheckCircle2 className=\"h-3.5 w-3.5 text-emerald-500 shrink-0\" />\n ) : (\n <Circle className=\"h-3.5 w-3.5 text-muted-foreground/40 shrink-0\" />\n )}\n <span className={cn(\"text-xs\", done ? \"text-muted-foreground line-through\" : \"text-foreground\")}>\n {label}\n </span>\n </div>\n ))}\n </div>\n\n <Link\n href={`/portfolio/collections/${contract}/settings`}\n className=\"inline-flex items-center gap-1.5 text-xs font-semibold text-primary hover:underline\"\n >\n <Sparkles className=\"h-3 w-3\" />\n Complete your collection profile\n </Link>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCQ;AAhCR,kBAAiB;AACjB,0BAAyD;AACzD,gBAAmB;AAaZ,SAAS,gBAAgB,EAAE,UAAU,QAAQ,GAAyB;AAC3E,QAAM,QAAqB;AAAA,IACzB,EAAE,OAAO,gBAAqB,MAAM,CAAC,CAAC,SAAS,YAAY;AAAA,IAC3D,EAAE,OAAO,eAAqB,MAAM,CAAC,CAAC,SAAS,YAAY;AAAA,IAC3D,EAAE,OAAO,eAAqB,MAAM,CAAC,CAAC,SAAS,MAAM;AAAA,IACrD,EAAE,OAAO,gBAAqB,MAAM,CAAC,CAAC,SAAS,YAAY;AAAA,IAC3D,EAAE,OAAO,gBAAqB,MAAM,CAAC,EAAE,SAAS,cAAc,SAAS,cAAc,SAAS,YAAY;AAAA,IAC1G,EAAE,OAAO,qBAAqB,MAAM,CAAC,CAAC,SAAS,gBAAgB;AAAA,EACjE;AAEA,QAAM,YAAY,MAAM,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE;AAE9C,MAAI,cAAc,MAAM,OAAQ,QAAO;AAEvC,SACE,6CAAC,SAAI,WAAU,+EACb;AAAA,iDAAC,SAAI,WAAU,qCACb;AAAA,mDAAC,SAAI,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