@medialane/ui 0.101.2 → 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.
- package/dist/components/alert.cjs +75 -0
- package/dist/components/alert.cjs.map +1 -0
- package/dist/components/alert.d.cts +11 -0
- package/dist/components/alert.d.ts +11 -0
- package/dist/components/alert.js +39 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/badge.cjs +52 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.d.cts +13 -0
- package/dist/components/badge.d.ts +13 -0
- package/dist/components/badge.js +27 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.cjs +86 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.d.cts +14 -0
- package/dist/components/button.d.ts +14 -0
- package/dist/components/button.js +51 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.cjs +87 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.d.cts +10 -0
- package/dist/components/card.d.ts +10 -0
- package/dist/components/card.js +48 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/checkbox.cjs +63 -0
- package/dist/components/checkbox.cjs.map +1 -0
- package/dist/components/checkbox.d.cts +6 -0
- package/dist/components/checkbox.d.ts +6 -0
- package/dist/components/checkbox.js +29 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.cjs +47 -0
- package/dist/components/collapsible.cjs.map +1 -0
- package/dist/components/collapsible.d.cts +8 -0
- package/dist/components/collapsible.d.ts +8 -0
- package/dist/components/collapsible.js +11 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/creator-analytics.cjs +170 -0
- package/dist/components/creator-analytics.cjs.map +1 -0
- package/dist/components/creator-analytics.d.cts +10 -0
- package/dist/components/creator-analytics.d.ts +10 -0
- package/dist/components/creator-analytics.js +153 -0
- package/dist/components/creator-analytics.js.map +1 -0
- package/dist/components/drop-countdown.cjs +66 -0
- package/dist/components/drop-countdown.cjs.map +1 -0
- package/dist/components/drop-countdown.d.cts +8 -0
- package/dist/components/drop-countdown.d.ts +8 -0
- package/dist/components/drop-countdown.js +42 -0
- package/dist/components/drop-countdown.js.map +1 -0
- package/dist/components/empty-or-error.cjs +88 -0
- package/dist/components/empty-or-error.cjs.map +1 -0
- package/dist/components/empty-or-error.d.cts +23 -0
- package/dist/components/empty-or-error.d.ts +23 -0
- package/dist/components/empty-or-error.js +54 -0
- package/dist/components/empty-or-error.js.map +1 -0
- package/dist/components/form.cjs +150 -0
- package/dist/components/form.cjs.map +1 -0
- package/dist/components/form.d.cts +29 -0
- package/dist/components/form.d.ts +29 -0
- package/dist/components/form.js +113 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/help-icon.cjs +47 -0
- package/dist/components/help-icon.cjs.map +1 -0
- package/dist/components/help-icon.d.cts +14 -0
- package/dist/components/help-icon.d.ts +14 -0
- package/dist/components/help-icon.js +23 -0
- package/dist/components/help-icon.js.map +1 -0
- package/dist/components/input.cjs +58 -0
- package/dist/components/input.cjs.map +1 -0
- package/dist/components/input.d.cts +5 -0
- package/dist/components/input.d.ts +5 -0
- package/dist/components/input.js +24 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.cjs +49 -0
- package/dist/components/label.cjs.map +1 -0
- package/dist/components/label.d.cts +8 -0
- package/dist/components/label.d.ts +8 -0
- package/dist/components/label.js +15 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/owner-setup-panel.cjs +91 -0
- package/dist/components/owner-setup-panel.cjs.map +1 -0
- package/dist/components/owner-setup-panel.d.cts +10 -0
- package/dist/components/owner-setup-panel.d.ts +10 -0
- package/dist/components/owner-setup-panel.js +57 -0
- package/dist/components/owner-setup-panel.js.map +1 -0
- package/dist/components/popover.cjs +66 -0
- package/dist/components/popover.cjs.map +1 -0
- package/dist/components/popover.d.cts +9 -0
- package/dist/components/popover.d.ts +9 -0
- package/dist/components/popover.js +29 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/select.cjs +163 -0
- package/dist/components/select.cjs.map +1 -0
- package/dist/components/select.d.cts +15 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.js +120 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/skeleton.cjs +42 -0
- package/dist/components/skeleton.cjs.map +1 -0
- package/dist/components/skeleton.d.cts +5 -0
- package/dist/components/skeleton.d.ts +5 -0
- package/dist/components/skeleton.js +18 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/switch.cjs +63 -0
- package/dist/components/switch.cjs.map +1 -0
- package/dist/components/switch.d.cts +6 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.js +29 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/tabs.cjs +86 -0
- package/dist/components/tabs.cjs.map +1 -0
- package/dist/components/tabs.d.cts +9 -0
- package/dist/components/tabs.d.ts +9 -0
- package/dist/components/tabs.js +49 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/index.cjs +142 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +108 -1
- package/dist/index.js.map +1 -1
- package/dist/medialane.css +0 -16
- package/dist/utils/use-creators.cjs +53 -0
- package/dist/utils/use-creators.cjs.map +1 -0
- package/dist/utils/use-creators.d.cts +11 -0
- package/dist/utils/use-creators.d.ts +11 -0
- package/dist/utils/use-creators.js +19 -0
- package/dist/utils/use-creators.js.map +1 -0
- package/dist/utils/use-medialane-client.cjs +33 -0
- package/dist/utils/use-medialane-client.cjs.map +1 -0
- package/dist/utils/use-medialane-client.d.cts +5 -0
- package/dist/utils/use-medialane-client.d.ts +5 -0
- package/dist/utils/use-medialane-client.js +9 -0
- package/dist/utils/use-medialane-client.js.map +1 -0
- package/dist/utils/use-rewards.cjs +100 -0
- package/dist/utils/use-rewards.cjs.map +1 -0
- package/dist/utils/use-rewards.d.cts +61 -0
- package/dist/utils/use-rewards.d.ts +61 -0
- package/dist/utils/use-rewards.js +62 -0
- package/dist/utils/use-rewards.js.map +1 -0
- package/package.json +25 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/card.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"rounded-lg border bg-card text-card-foreground shadow-sm\", className)}\n {...props}\n />\n )\n);\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex flex-col space-y-1.5 p-6\", className)} {...props} />\n )\n);\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"text-2xl font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n )\n);\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm text-muted-foreground\", className)} {...props} />\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n )\n);\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center p-6 pt-0\", className)} {...props} />\n )\n);\nCardFooter.displayName = \"CardFooter\";\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n"],"mappings":"AAKI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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 checkbox_exports = {};
|
|
31
|
+
__export(checkbox_exports, {
|
|
32
|
+
Checkbox: () => Checkbox
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(checkbox_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var React = __toESM(require("react"), 1);
|
|
37
|
+
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
38
|
+
var import_lucide_react = require("lucide-react");
|
|
39
|
+
var import_cn = require("../utils/cn.js");
|
|
40
|
+
const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
41
|
+
CheckboxPrimitive.Root,
|
|
42
|
+
{
|
|
43
|
+
ref,
|
|
44
|
+
className: (0, import_cn.cn)(
|
|
45
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
46
|
+
className
|
|
47
|
+
),
|
|
48
|
+
...props,
|
|
49
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
+
CheckboxPrimitive.Indicator,
|
|
51
|
+
{
|
|
52
|
+
className: (0, import_cn.cn)("flex items-center justify-center text-current"),
|
|
53
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "h-4 w-4" })
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
));
|
|
58
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
Checkbox
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=checkbox.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\n\nimport { cn } from \"../utils/cn.js\";\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBM;AArBN,YAAuB;AACvB,wBAAmC;AACnC,0BAAsB;AAEtB,gBAAmB;AAEnB,MAAM,WAAW,MAAM,WAGrB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,kBAAkB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,eAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,MAAC,kBAAkB;AAAA,MAAlB;AAAA,QACC,eAAW,cAAG,+CAA+C;AAAA,QAE7D,sDAAC,6BAAM,WAAU,WAAU;AAAA;AAAA,IAC7B;AAAA;AACF,CACD;AACD,SAAS,cAAc,kBAAkB,KAAK;","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
|
|
4
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
|
|
6
|
+
export { Checkbox };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
|
|
4
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
|
|
6
|
+
export { Checkbox };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
5
|
+
import { Check } from "lucide-react";
|
|
6
|
+
import { cn } from "../utils/cn.js";
|
|
7
|
+
const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8
|
+
CheckboxPrimitive.Root,
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
className: cn(
|
|
12
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
13
|
+
className
|
|
14
|
+
),
|
|
15
|
+
...props,
|
|
16
|
+
children: /* @__PURE__ */ jsx(
|
|
17
|
+
CheckboxPrimitive.Indicator,
|
|
18
|
+
{
|
|
19
|
+
className: cn("flex items-center justify-center text-current"),
|
|
20
|
+
children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" })
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
));
|
|
25
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
26
|
+
export {
|
|
27
|
+
Checkbox
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\n\nimport { cn } from \"../utils/cn.js\";\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n"],"mappings":";AAuBM;AArBN,YAAY,WAAW;AACvB,YAAY,uBAAuB;AACnC,SAAS,aAAa;AAEtB,SAAS,UAAU;AAEnB,MAAM,WAAW,MAAM,WAGrB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,kBAAkB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,MAAC,kBAAkB;AAAA,MAAlB;AAAA,QACC,WAAW,GAAG,+CAA+C;AAAA,QAE7D,8BAAC,SAAM,WAAU,WAAU;AAAA;AAAA,IAC7B;AAAA;AACF,CACD;AACD,SAAS,cAAc,kBAAkB,KAAK;","names":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 collapsible_exports = {};
|
|
31
|
+
__export(collapsible_exports, {
|
|
32
|
+
Collapsible: () => Collapsible,
|
|
33
|
+
CollapsibleContent: () => CollapsibleContent,
|
|
34
|
+
CollapsibleTrigger: () => CollapsibleTrigger
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(collapsible_exports);
|
|
37
|
+
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"), 1);
|
|
38
|
+
const Collapsible = CollapsiblePrimitive.Root;
|
|
39
|
+
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
|
40
|
+
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
Collapsible,
|
|
44
|
+
CollapsibleContent,
|
|
45
|
+
CollapsibleTrigger
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=collapsible.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/collapsible.tsx"],"sourcesContent":["\"use client\";\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,2BAAsC;AAEtC,MAAM,cAAc,qBAAqB;AAEzC,MAAM,qBAAqB,qBAAqB;AAEhD,MAAM,qBAAqB,qBAAqB;","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
3
|
+
|
|
4
|
+
declare const Collapsible: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const CollapsibleContent: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
|
|
8
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
3
|
+
|
|
4
|
+
declare const Collapsible: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const CollapsibleContent: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
|
|
8
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
3
|
+
const Collapsible = CollapsiblePrimitive.Root;
|
|
4
|
+
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
|
5
|
+
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
6
|
+
export {
|
|
7
|
+
Collapsible,
|
|
8
|
+
CollapsibleContent,
|
|
9
|
+
CollapsibleTrigger
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=collapsible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/collapsible.tsx"],"sourcesContent":["\"use client\";\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"],"mappings":";AAEA,YAAY,0BAA0B;AAEtC,MAAM,cAAc,qBAAqB;AAEzC,MAAM,qBAAqB,qBAAqB;AAEhD,MAAM,qBAAqB,qBAAqB;","names":[]}
|
|
@@ -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 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":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgFU;AA9E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AY;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,EAAE,CAAC,KAAK;AAC1D;AAEA,SAAS,iBAAiB,OAAiC;AACzD,QAAM,UAAU,oBAAI,IAAoB;AACxC,QAAM,MAAM,KAAK,IAAI;AAErB,WAAS,IAAI,IAAI,KA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