@medialane/ui 0.105.0 → 0.107.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/asset-lightbox.cjs +66 -0
- package/dist/components/asset-lightbox.cjs.map +1 -0
- package/dist/components/asset-lightbox.d.cts +11 -0
- package/dist/components/asset-lightbox.d.ts +11 -0
- package/dist/components/asset-lightbox.js +42 -0
- package/dist/components/asset-lightbox.js.map +1 -0
- package/dist/components/club-owner-actions.cjs +56 -0
- package/dist/components/club-owner-actions.cjs.map +1 -0
- package/dist/components/club-owner-actions.d.cts +11 -0
- package/dist/components/club-owner-actions.d.ts +11 -0
- package/dist/components/club-owner-actions.js +22 -0
- package/dist/components/club-owner-actions.js.map +1 -0
- package/dist/components/collection-activity-tab.cjs +60 -0
- package/dist/components/collection-activity-tab.cjs.map +1 -0
- package/dist/components/collection-activity-tab.d.cts +10 -0
- package/dist/components/collection-activity-tab.d.ts +10 -0
- package/dist/components/collection-activity-tab.js +36 -0
- package/dist/components/collection-activity-tab.js.map +1 -0
- package/dist/components/collection-traits-tab.cjs +79 -0
- package/dist/components/collection-traits-tab.cjs.map +1 -0
- package/dist/components/collection-traits-tab.d.cts +10 -0
- package/dist/components/collection-traits-tab.d.ts +10 -0
- package/dist/components/collection-traits-tab.js +55 -0
- package/dist/components/collection-traits-tab.js.map +1 -0
- package/dist/components/create-form-primitives.cjs +61 -0
- package/dist/components/create-form-primitives.cjs.map +1 -0
- package/dist/components/create-form-primitives.d.cts +16 -0
- package/dist/components/create-form-primitives.d.ts +16 -0
- package/dist/components/create-form-primitives.js +36 -0
- package/dist/components/create-form-primitives.js.map +1 -0
- package/dist/components/creation-record.cjs +86 -0
- package/dist/components/creation-record.cjs.map +1 -0
- package/dist/components/creation-record.d.cts +14 -0
- package/dist/components/creation-record.d.ts +14 -0
- package/dist/components/creation-record.js +52 -0
- package/dist/components/creation-record.js.map +1 -0
- package/dist/components/creator-chip.cjs +58 -0
- package/dist/components/creator-chip.cjs.map +1 -0
- package/dist/components/creator-chip.d.cts +10 -0
- package/dist/components/creator-chip.d.ts +10 -0
- package/dist/components/creator-chip.js +24 -0
- package/dist/components/creator-chip.js.map +1 -0
- package/dist/components/creator-score-inline.cjs +52 -0
- package/dist/components/creator-score-inline.cjs.map +1 -0
- package/dist/components/creator-score-inline.d.cts +19 -0
- package/dist/components/creator-score-inline.d.ts +19 -0
- package/dist/components/creator-score-inline.js +18 -0
- package/dist/components/creator-score-inline.js.map +1 -0
- package/dist/components/dialog.d.cts +9 -9
- package/dist/components/dialog.d.ts +9 -9
- package/dist/components/ip-type-fields.cjs +307 -0
- package/dist/components/ip-type-fields.cjs.map +1 -0
- package/dist/components/ip-type-fields.d.cts +17 -0
- package/dist/components/ip-type-fields.d.ts +17 -0
- package/dist/components/ip-type-fields.js +293 -0
- package/dist/components/ip-type-fields.js.map +1 -0
- package/dist/components/json-ld.cjs +39 -0
- package/dist/components/json-ld.cjs.map +1 -0
- package/dist/components/json-ld.d.cts +8 -0
- package/dist/components/json-ld.d.ts +8 -0
- package/dist/components/json-ld.js +15 -0
- package/dist/components/json-ld.js.map +1 -0
- package/dist/components/nav-theme-toggle.cjs +66 -0
- package/dist/components/nav-theme-toggle.cjs.map +1 -0
- package/dist/components/nav-theme-toggle.d.cts +9 -0
- package/dist/components/nav-theme-toggle.d.ts +9 -0
- package/dist/components/nav-theme-toggle.js +42 -0
- package/dist/components/nav-theme-toggle.js.map +1 -0
- package/dist/components/order-sort-control.cjs +58 -0
- package/dist/components/order-sort-control.cjs.map +1 -0
- package/dist/components/order-sort-control.d.cts +13 -0
- package/dist/components/order-sort-control.d.ts +13 -0
- package/dist/components/order-sort-control.js +39 -0
- package/dist/components/order-sort-control.js.map +1 -0
- package/dist/components/portfolio-activity.cjs +117 -0
- package/dist/components/portfolio-activity.cjs.map +1 -0
- package/dist/components/portfolio-activity.d.cts +10 -0
- package/dist/components/portfolio-activity.d.ts +10 -0
- package/dist/components/portfolio-activity.js +93 -0
- package/dist/components/portfolio-activity.js.map +1 -0
- package/dist/components/price-history-chart.cjs +130 -0
- package/dist/components/price-history-chart.cjs.map +1 -0
- package/dist/components/price-history-chart.d.cts +9 -0
- package/dist/components/price-history-chart.d.ts +9 -0
- package/dist/components/price-history-chart.js +114 -0
- package/dist/components/price-history-chart.js.map +1 -0
- package/dist/components/sheet.cjs +160 -0
- package/dist/components/sheet.cjs.map +1 -0
- package/dist/components/sheet.d.cts +30 -0
- package/dist/components/sheet.d.ts +30 -0
- package/dist/components/sheet.js +117 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/textarea.cjs +57 -0
- package/dist/components/textarea.cjs.map +1 -0
- package/dist/components/textarea.d.cts +6 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.js +23 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/index.cjs +110 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +88 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/format-activity.cjs +143 -0
- package/dist/utils/format-activity.cjs.map +1 -0
- package/dist/utils/format-activity.d.cts +14 -0
- package/dist/utils/format-activity.d.ts +14 -0
- package/dist/utils/format-activity.js +116 -0
- package/dist/utils/format-activity.js.map +1 -0
- package/dist/utils/proxy-body.cjs +60 -0
- package/dist/utils/proxy-body.cjs.map +1 -0
- package/dist/utils/proxy-body.d.cts +22 -0
- package/dist/utils/proxy-body.d.ts +22 -0
- package/dist/utils/proxy-body.js +36 -0
- package/dist/utils/proxy-body.js.map +1 -0
- package/dist/utils/query-keys.cjs +80 -0
- package/dist/utils/query-keys.cjs.map +1 -0
- package/dist/utils/query-keys.d.cts +39 -0
- package/dist/utils/query-keys.d.ts +39 -0
- package/dist/utils/query-keys.js +54 -0
- package/dist/utils/query-keys.js.map +1 -0
- package/dist/utils/use-activities.cjs +68 -0
- package/dist/utils/use-activities.cjs.map +1 -0
- package/dist/utils/use-activities.d.cts +20 -0
- package/dist/utils/use-activities.d.ts +20 -0
- package/dist/utils/use-activities.js +33 -0
- package/dist/utils/use-activities.js.map +1 -0
- package/dist/utils/use-collections.cjs +113 -0
- package/dist/utils/use-collections.cjs.map +1 -0
- package/dist/utils/use-collections.d.cts +43 -0
- package/dist/utils/use-collections.d.ts +43 -0
- package/dist/utils/use-collections.js +75 -0
- package/dist/utils/use-collections.js.map +1 -0
- package/dist/utils/use-profiles.cjs +69 -0
- package/dist/utils/use-profiles.cjs.map +1 -0
- package/dist/utils/use-profiles.d.cts +18 -0
- package/dist/utils/use-profiles.d.ts +18 -0
- package/dist/utils/use-profiles.js +34 -0
- package/dist/utils/use-profiles.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var create_form_primitives_exports = {};
|
|
20
|
+
__export(create_form_primitives_exports, {
|
|
21
|
+
Section: () => Section,
|
|
22
|
+
ToggleGroup: () => ToggleGroup
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(create_form_primitives_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_cn = require("../utils/cn.js");
|
|
27
|
+
function ToggleGroup({
|
|
28
|
+
value,
|
|
29
|
+
options,
|
|
30
|
+
onChange
|
|
31
|
+
}) {
|
|
32
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex rounded-lg border border-border overflow-hidden w-full", children: options.map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
+
"button",
|
|
34
|
+
{
|
|
35
|
+
type: "button",
|
|
36
|
+
onClick: () => onChange(opt),
|
|
37
|
+
className: (0, import_cn.cn)(
|
|
38
|
+
"flex-1 px-3 py-2 text-sm transition-colors",
|
|
39
|
+
i > 0 && "border-l border-border",
|
|
40
|
+
value === opt ? "bg-primary text-primary-foreground font-medium" : "bg-background hover:bg-muted text-muted-foreground"
|
|
41
|
+
),
|
|
42
|
+
children: opt
|
|
43
|
+
},
|
|
44
|
+
opt
|
|
45
|
+
)) });
|
|
46
|
+
}
|
|
47
|
+
function Section({ title, icon, children }) {
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl border border-border bg-card p-5 space-y-4", children: [
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-primary", children: icon }),
|
|
51
|
+
title
|
|
52
|
+
] }),
|
|
53
|
+
children
|
|
54
|
+
] });
|
|
55
|
+
}
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
Section,
|
|
59
|
+
ToggleGroup
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=create-form-primitives.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/create-form-primitives.tsx"],"sourcesContent":["import { cn } from \"../utils/cn.js\";\n\n/** Segmented two/three-option toggle used across the create flows. */\nexport function ToggleGroup({\n value, options, onChange,\n}: { value: string; options: readonly string[]; onChange: (v: string) => void }) {\n return (\n <div className=\"flex rounded-lg border border-border overflow-hidden w-full\">\n {options.map((opt, i) => (\n <button\n key={opt}\n type=\"button\"\n onClick={() => onChange(opt)}\n className={cn(\n \"flex-1 px-3 py-2 text-sm transition-colors\",\n i > 0 && \"border-l border-border\",\n value === opt\n ? \"bg-primary text-primary-foreground font-medium\"\n : \"bg-background hover:bg-muted text-muted-foreground\",\n )}\n >\n {opt}\n </button>\n ))}\n </div>\n );\n}\n\n/** Titled card section wrapper for the create forms. */\nexport function Section({ title, icon, children }: {\n title: string; icon: React.ReactNode; children: React.ReactNode;\n}) {\n return (\n <div className=\"rounded-xl border border-border bg-card p-5 space-y-4\">\n <div className=\"flex items-center gap-2 text-sm font-semibold\">\n <span className=\"text-primary\">{icon}</span>\n {title}\n </div>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASQ;AATR,gBAAmB;AAGZ,SAAS,YAAY;AAAA,EAC1B;AAAA,EAAO;AAAA,EAAS;AAClB,GAAiF;AAC/E,SACE,4CAAC,SAAI,WAAU,+DACZ,kBAAQ,IAAI,CAAC,KAAK,MACjB;AAAA,IAAC;AAAA;AAAA,MAEC,MAAK;AAAA,MACL,SAAS,MAAM,SAAS,GAAG;AAAA,MAC3B,eAAW;AAAA,QACT;AAAA,QACA,IAAI,KAAK;AAAA,QACT,UAAU,MACN,mDACA;AAAA,MACN;AAAA,MAEC;AAAA;AAAA,IAXI;AAAA,EAYP,CACD,GACH;AAEJ;AAGO,SAAS,QAAQ,EAAE,OAAO,MAAM,SAAS,GAE7C;AACD,SACE,6CAAC,SAAI,WAAU,yDACb;AAAA,iDAAC,SAAI,WAAU,iDACb;AAAA,kDAAC,UAAK,WAAU,gBAAgB,gBAAK;AAAA,MACpC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/** Segmented two/three-option toggle used across the create flows. */
|
|
4
|
+
declare function ToggleGroup({ value, options, onChange, }: {
|
|
5
|
+
value: string;
|
|
6
|
+
options: readonly string[];
|
|
7
|
+
onChange: (v: string) => void;
|
|
8
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
|
+
/** Titled card section wrapper for the create forms. */
|
|
10
|
+
declare function Section({ title, icon, children }: {
|
|
11
|
+
title: string;
|
|
12
|
+
icon: React.ReactNode;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { Section, ToggleGroup };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/** Segmented two/three-option toggle used across the create flows. */
|
|
4
|
+
declare function ToggleGroup({ value, options, onChange, }: {
|
|
5
|
+
value: string;
|
|
6
|
+
options: readonly string[];
|
|
7
|
+
onChange: (v: string) => void;
|
|
8
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
|
+
/** Titled card section wrapper for the create forms. */
|
|
10
|
+
declare function Section({ title, icon, children }: {
|
|
11
|
+
title: string;
|
|
12
|
+
icon: React.ReactNode;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { Section, ToggleGroup };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
function ToggleGroup({
|
|
4
|
+
value,
|
|
5
|
+
options,
|
|
6
|
+
onChange
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ jsx("div", { className: "flex rounded-lg border border-border overflow-hidden w-full", children: options.map((opt, i) => /* @__PURE__ */ jsx(
|
|
9
|
+
"button",
|
|
10
|
+
{
|
|
11
|
+
type: "button",
|
|
12
|
+
onClick: () => onChange(opt),
|
|
13
|
+
className: cn(
|
|
14
|
+
"flex-1 px-3 py-2 text-sm transition-colors",
|
|
15
|
+
i > 0 && "border-l border-border",
|
|
16
|
+
value === opt ? "bg-primary text-primary-foreground font-medium" : "bg-background hover:bg-muted text-muted-foreground"
|
|
17
|
+
),
|
|
18
|
+
children: opt
|
|
19
|
+
},
|
|
20
|
+
opt
|
|
21
|
+
)) });
|
|
22
|
+
}
|
|
23
|
+
function Section({ title, icon, children }) {
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border bg-card p-5 space-y-4", children: [
|
|
25
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
26
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: icon }),
|
|
27
|
+
title
|
|
28
|
+
] }),
|
|
29
|
+
children
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
Section,
|
|
34
|
+
ToggleGroup
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=create-form-primitives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/create-form-primitives.tsx"],"sourcesContent":["import { cn } from \"../utils/cn.js\";\n\n/** Segmented two/three-option toggle used across the create flows. */\nexport function ToggleGroup({\n value, options, onChange,\n}: { value: string; options: readonly string[]; onChange: (v: string) => void }) {\n return (\n <div className=\"flex rounded-lg border border-border overflow-hidden w-full\">\n {options.map((opt, i) => (\n <button\n key={opt}\n type=\"button\"\n onClick={() => onChange(opt)}\n className={cn(\n \"flex-1 px-3 py-2 text-sm transition-colors\",\n i > 0 && \"border-l border-border\",\n value === opt\n ? \"bg-primary text-primary-foreground font-medium\"\n : \"bg-background hover:bg-muted text-muted-foreground\",\n )}\n >\n {opt}\n </button>\n ))}\n </div>\n );\n}\n\n/** Titled card section wrapper for the create forms. */\nexport function Section({ title, icon, children }: {\n title: string; icon: React.ReactNode; children: React.ReactNode;\n}) {\n return (\n <div className=\"rounded-xl border border-border bg-card p-5 space-y-4\">\n <div className=\"flex items-center gap-2 text-sm font-semibold\">\n <span className=\"text-primary\">{icon}</span>\n {title}\n </div>\n {children}\n </div>\n );\n}\n"],"mappings":"AASQ,cAyBF,YAzBE;AATR,SAAS,UAAU;AAGZ,SAAS,YAAY;AAAA,EAC1B;AAAA,EAAO;AAAA,EAAS;AAClB,GAAiF;AAC/E,SACE,oBAAC,SAAI,WAAU,+DACZ,kBAAQ,IAAI,CAAC,KAAK,MACjB;AAAA,IAAC;AAAA;AAAA,MAEC,MAAK;AAAA,MACL,SAAS,MAAM,SAAS,GAAG;AAAA,MAC3B,WAAW;AAAA,QACT;AAAA,QACA,IAAI,KAAK;AAAA,QACT,UAAU,MACN,mDACA;AAAA,MACN;AAAA,MAEC;AAAA;AAAA,IAXI;AAAA,EAYP,CACD,GACH;AAEJ;AAGO,SAAS,QAAQ,EAAE,OAAO,MAAM,SAAS,GAE7C;AACD,SACE,qBAAC,SAAI,WAAU,yDACb;AAAA,yBAAC,SAAI,WAAU,iDACb;AAAA,0BAAC,UAAK,WAAU,gBAAgB,gBAAK;AAAA,MACpC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,86 @@
|
|
|
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 creation_record_exports = {};
|
|
31
|
+
__export(creation_record_exports, {
|
|
32
|
+
CreationRecord: () => CreationRecord
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(creation_record_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_lucide_react = require("lucide-react");
|
|
37
|
+
var import_link = __toESM(require("next/link"), 1);
|
|
38
|
+
var import_sdk = require("@medialane/sdk");
|
|
39
|
+
const EXPLORER_URL = process.env.NEXT_PUBLIC_EXPLORER_URL || "https://voyager.online";
|
|
40
|
+
function CreationRecord({ originalCreator, registeredAt }) {
|
|
41
|
+
const creator = originalCreator ? (0, import_sdk.normalizeAddress)("STARKNET", originalCreator) : "";
|
|
42
|
+
const date = new Date(registeredAt * 1e3);
|
|
43
|
+
const formatted = date.toLocaleDateString(void 0, {
|
|
44
|
+
year: "numeric",
|
|
45
|
+
month: "long",
|
|
46
|
+
day: "numeric"
|
|
47
|
+
});
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-lg bg-amber-500/5 p-4", children: [
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Award, { className: "h-4 w-4 text-amber-500" }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold text-amber-500", children: "Creation Record" })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground mb-3", children: "Immutable on-chain authorship record set at mint and stored permanently for legal evidence of creation (Berne Convention)." }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", { className: "space-y-2 text-sm", children: [
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { className: "text-muted-foreground", children: "Original creator" }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "tabular-nums", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: `/creator/${creator}`, className: "hover:underline", children: [
|
|
58
|
+
creator.slice(0, 6),
|
|
59
|
+
"\u2026",
|
|
60
|
+
creator.slice(-4)
|
|
61
|
+
] }) })
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { className: "text-muted-foreground", children: "Registered at" }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
66
|
+
"a",
|
|
67
|
+
{
|
|
68
|
+
href: `${EXPLORER_URL}/contract/${creator}`,
|
|
69
|
+
target: "_blank",
|
|
70
|
+
rel: "noreferrer",
|
|
71
|
+
className: "inline-flex items-center gap-1 hover:underline",
|
|
72
|
+
children: [
|
|
73
|
+
formatted,
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ExternalLink, { className: "h-3 w-3" })
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
) })
|
|
78
|
+
] })
|
|
79
|
+
] })
|
|
80
|
+
] });
|
|
81
|
+
}
|
|
82
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
+
0 && (module.exports = {
|
|
84
|
+
CreationRecord
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=creation-record.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/creation-record.tsx"],"sourcesContent":["\"use client\";\n\nimport { Award, ExternalLink } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { normalizeAddress } from \"@medialane/sdk\";\n\nconst EXPLORER_URL = process.env.NEXT_PUBLIC_EXPLORER_URL || \"https://voyager.online\";\n\nexport interface CreationRecordProps {\n originalCreator: string;\n registeredAt: number; // unix seconds\n}\n\n/**\n * Berne Convention authorship record surfaced from IPNft.get_full_token_data.\n * Both fields are immutable on-chain — original_creator is set at mint time\n * and never changes regardless of subsequent ownership transfers.\n */\nexport function CreationRecord({ originalCreator, registeredAt }: CreationRecordProps) {\n const creator = originalCreator ? normalizeAddress(\"STARKNET\", originalCreator) : \"\";\n const date = new Date(registeredAt * 1000);\n const formatted = date.toLocaleDateString(undefined, {\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n });\n\n return (\n <div className=\"rounded-lg bg-amber-500/5 p-4\">\n <div className=\"flex items-center gap-2 mb-3\">\n <Award className=\"h-4 w-4 text-amber-500\" />\n <p className=\"text-sm font-semibold text-amber-500\">Creation Record</p>\n </div>\n <p className=\"text-xs text-muted-foreground mb-3\">\n Immutable on-chain authorship record set at mint and stored permanently\n for legal evidence of creation (Berne Convention).\n </p>\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex items-center justify-between\">\n <dt className=\"text-muted-foreground\">Original creator</dt>\n <dd className=\"tabular-nums\">\n <Link href={`/creator/${creator}`} className=\"hover:underline\">\n {creator.slice(0, 6)}…{creator.slice(-4)}\n </Link>\n </dd>\n </div>\n <div className=\"flex items-center justify-between\">\n <dt className=\"text-muted-foreground\">Registered at</dt>\n <dd>\n <a\n href={`${EXPLORER_URL}/contract/${creator}`}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"inline-flex items-center gap-1 hover:underline\"\n >\n {formatted}\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n </dd>\n </div>\n </dl>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BM;AA3BN,0BAAoC;AACpC,kBAAiB;AACjB,iBAAiC;AAEjC,MAAM,eAAe,QAAQ,IAAI,4BAA4B;AAYtD,SAAS,eAAe,EAAE,iBAAiB,aAAa,GAAwB;AACrF,QAAM,UAAU,sBAAkB,6BAAiB,YAAY,eAAe,IAAI;AAClF,QAAM,OAAO,IAAI,KAAK,eAAe,GAAI;AACzC,QAAM,YAAY,KAAK,mBAAmB,QAAW;AAAA,IACnD,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,EACP,CAAC;AAED,SACE,6CAAC,SAAI,WAAU,iCACb;AAAA,iDAAC,SAAI,WAAU,gCACb;AAAA,kDAAC,6BAAM,WAAU,0BAAyB;AAAA,MAC1C,4CAAC,OAAE,WAAU,wCAAuC,6BAAe;AAAA,OACrE;AAAA,IACA,4CAAC,OAAE,WAAU,sCAAqC,wIAGlD;AAAA,IACA,6CAAC,QAAG,WAAU,qBACZ;AAAA,mDAAC,SAAI,WAAU,qCACb;AAAA,oDAAC,QAAG,WAAU,yBAAwB,8BAAgB;AAAA,QACtD,4CAAC,QAAG,WAAU,gBACZ,uDAAC,YAAAA,SAAA,EAAK,MAAM,YAAY,OAAO,IAAI,WAAU,mBAC1C;AAAA,kBAAQ,MAAM,GAAG,CAAC;AAAA,UAAE;AAAA,UAAE,QAAQ,MAAM,EAAE;AAAA,WACzC,GACF;AAAA,SACF;AAAA,MACA,6CAAC,SAAI,WAAU,qCACb;AAAA,oDAAC,QAAG,WAAU,yBAAwB,2BAAa;AAAA,QACnD,4CAAC,QACC;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,GAAG,YAAY,aAAa,OAAO;AAAA,YACzC,QAAO;AAAA,YACP,KAAI;AAAA,YACJ,WAAU;AAAA,YAET;AAAA;AAAA,cACD,4CAAC,oCAAa,WAAU,WAAU;AAAA;AAAA;AAAA,QACpC,GACF;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAEJ;","names":["Link"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface CreationRecordProps {
|
|
4
|
+
originalCreator: string;
|
|
5
|
+
registeredAt: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Berne Convention authorship record surfaced from IPNft.get_full_token_data.
|
|
9
|
+
* Both fields are immutable on-chain — original_creator is set at mint time
|
|
10
|
+
* and never changes regardless of subsequent ownership transfers.
|
|
11
|
+
*/
|
|
12
|
+
declare function CreationRecord({ originalCreator, registeredAt }: CreationRecordProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { CreationRecord, type CreationRecordProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface CreationRecordProps {
|
|
4
|
+
originalCreator: string;
|
|
5
|
+
registeredAt: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Berne Convention authorship record surfaced from IPNft.get_full_token_data.
|
|
9
|
+
* Both fields are immutable on-chain — original_creator is set at mint time
|
|
10
|
+
* and never changes regardless of subsequent ownership transfers.
|
|
11
|
+
*/
|
|
12
|
+
declare function CreationRecord({ originalCreator, registeredAt }: CreationRecordProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { CreationRecord, type CreationRecordProps };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Award, ExternalLink } from "lucide-react";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
import { normalizeAddress } from "@medialane/sdk";
|
|
6
|
+
const EXPLORER_URL = process.env.NEXT_PUBLIC_EXPLORER_URL || "https://voyager.online";
|
|
7
|
+
function CreationRecord({ originalCreator, registeredAt }) {
|
|
8
|
+
const creator = originalCreator ? normalizeAddress("STARKNET", originalCreator) : "";
|
|
9
|
+
const date = new Date(registeredAt * 1e3);
|
|
10
|
+
const formatted = date.toLocaleDateString(void 0, {
|
|
11
|
+
year: "numeric",
|
|
12
|
+
month: "long",
|
|
13
|
+
day: "numeric"
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-amber-500/5 p-4", children: [
|
|
16
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Award, { className: "h-4 w-4 text-amber-500" }),
|
|
18
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-amber-500", children: "Creation Record" })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mb-3", children: "Immutable on-chain authorship record set at mint and stored permanently for legal evidence of creation (Berne Convention)." }),
|
|
21
|
+
/* @__PURE__ */ jsxs("dl", { className: "space-y-2 text-sm", children: [
|
|
22
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
23
|
+
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: "Original creator" }),
|
|
24
|
+
/* @__PURE__ */ jsx("dd", { className: "tabular-nums", children: /* @__PURE__ */ jsxs(Link, { href: `/creator/${creator}`, className: "hover:underline", children: [
|
|
25
|
+
creator.slice(0, 6),
|
|
26
|
+
"\u2026",
|
|
27
|
+
creator.slice(-4)
|
|
28
|
+
] }) })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
31
|
+
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: "Registered at" }),
|
|
32
|
+
/* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsxs(
|
|
33
|
+
"a",
|
|
34
|
+
{
|
|
35
|
+
href: `${EXPLORER_URL}/contract/${creator}`,
|
|
36
|
+
target: "_blank",
|
|
37
|
+
rel: "noreferrer",
|
|
38
|
+
className: "inline-flex items-center gap-1 hover:underline",
|
|
39
|
+
children: [
|
|
40
|
+
formatted,
|
|
41
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3" })
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
) })
|
|
45
|
+
] })
|
|
46
|
+
] })
|
|
47
|
+
] });
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
CreationRecord
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=creation-record.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/creation-record.tsx"],"sourcesContent":["\"use client\";\n\nimport { Award, ExternalLink } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { normalizeAddress } from \"@medialane/sdk\";\n\nconst EXPLORER_URL = process.env.NEXT_PUBLIC_EXPLORER_URL || \"https://voyager.online\";\n\nexport interface CreationRecordProps {\n originalCreator: string;\n registeredAt: number; // unix seconds\n}\n\n/**\n * Berne Convention authorship record surfaced from IPNft.get_full_token_data.\n * Both fields are immutable on-chain — original_creator is set at mint time\n * and never changes regardless of subsequent ownership transfers.\n */\nexport function CreationRecord({ originalCreator, registeredAt }: CreationRecordProps) {\n const creator = originalCreator ? normalizeAddress(\"STARKNET\", originalCreator) : \"\";\n const date = new Date(registeredAt * 1000);\n const formatted = date.toLocaleDateString(undefined, {\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n });\n\n return (\n <div className=\"rounded-lg bg-amber-500/5 p-4\">\n <div className=\"flex items-center gap-2 mb-3\">\n <Award className=\"h-4 w-4 text-amber-500\" />\n <p className=\"text-sm font-semibold text-amber-500\">Creation Record</p>\n </div>\n <p className=\"text-xs text-muted-foreground mb-3\">\n Immutable on-chain authorship record set at mint and stored permanently\n for legal evidence of creation (Berne Convention).\n </p>\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex items-center justify-between\">\n <dt className=\"text-muted-foreground\">Original creator</dt>\n <dd className=\"tabular-nums\">\n <Link href={`/creator/${creator}`} className=\"hover:underline\">\n {creator.slice(0, 6)}…{creator.slice(-4)}\n </Link>\n </dd>\n </div>\n <div className=\"flex items-center justify-between\">\n <dt className=\"text-muted-foreground\">Registered at</dt>\n <dd>\n <a\n href={`${EXPLORER_URL}/contract/${creator}`}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"inline-flex items-center gap-1 hover:underline\"\n >\n {formatted}\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n </dd>\n </div>\n </dl>\n </div>\n );\n}\n"],"mappings":";AA6BM,SACE,KADF;AA3BN,SAAS,OAAO,oBAAoB;AACpC,OAAO,UAAU;AACjB,SAAS,wBAAwB;AAEjC,MAAM,eAAe,QAAQ,IAAI,4BAA4B;AAYtD,SAAS,eAAe,EAAE,iBAAiB,aAAa,GAAwB;AACrF,QAAM,UAAU,kBAAkB,iBAAiB,YAAY,eAAe,IAAI;AAClF,QAAM,OAAO,IAAI,KAAK,eAAe,GAAI;AACzC,QAAM,YAAY,KAAK,mBAAmB,QAAW;AAAA,IACnD,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,EACP,CAAC;AAED,SACE,qBAAC,SAAI,WAAU,iCACb;AAAA,yBAAC,SAAI,WAAU,gCACb;AAAA,0BAAC,SAAM,WAAU,0BAAyB;AAAA,MAC1C,oBAAC,OAAE,WAAU,wCAAuC,6BAAe;AAAA,OACrE;AAAA,IACA,oBAAC,OAAE,WAAU,sCAAqC,wIAGlD;AAAA,IACA,qBAAC,QAAG,WAAU,qBACZ;AAAA,2BAAC,SAAI,WAAU,qCACb;AAAA,4BAAC,QAAG,WAAU,yBAAwB,8BAAgB;AAAA,QACtD,oBAAC,QAAG,WAAU,gBACZ,+BAAC,QAAK,MAAM,YAAY,OAAO,IAAI,WAAU,mBAC1C;AAAA,kBAAQ,MAAM,GAAG,CAAC;AAAA,UAAE;AAAA,UAAE,QAAQ,MAAM,EAAE;AAAA,WACzC,GACF;AAAA,SACF;AAAA,MACA,qBAAC,SAAI,WAAU,qCACb;AAAA,4BAAC,QAAG,WAAU,yBAAwB,2BAAa;AAAA,QACnD,oBAAC,QACC;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,GAAG,YAAY,aAAa,OAAO;AAAA,YACzC,QAAO;AAAA,YACP,KAAI;AAAA,YACJ,WAAU;AAAA,YAET;AAAA;AAAA,cACD,oBAAC,gBAAa,WAAU,WAAU;AAAA;AAAA;AAAA,QACpC,GACF;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var creator_chip_exports = {};
|
|
31
|
+
__export(creator_chip_exports, {
|
|
32
|
+
CreatorChip: () => CreatorChip
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(creator_chip_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_link = __toESM(require("next/link"), 1);
|
|
37
|
+
var import_use_profiles = require("../utils/use-profiles.js");
|
|
38
|
+
var import_address_display = require("./address-display.js");
|
|
39
|
+
function CreatorChip({ getClient, address }) {
|
|
40
|
+
const { profile } = (0, import_use_profiles.useCreatorProfile)(getClient, address);
|
|
41
|
+
const label = profile?.displayName || profile?.username || null;
|
|
42
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
43
|
+
import_link.default,
|
|
44
|
+
{
|
|
45
|
+
href: `/account/${address}`,
|
|
46
|
+
className: "inline-flex items-center gap-1.5 text-sm rounded-full px-2 py-1 hover:bg-muted/60 active:scale-[0.98] transition",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground shrink-0", children: "by" }),
|
|
49
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-semibold text-foreground truncate", children: label }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_address_display.AddressDisplay, { address, chars: 6, showCopy: false, className: "font-semibold text-foreground" })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
CreatorChip
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=creator-chip.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/creator-chip.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport { useCreatorProfile } from \"../utils/use-profiles.js\";\nimport { AddressDisplay } from \"./address-display.js\";\n\nexport interface CreatorChipProps {\n getClient: () => MedialaneClient;\n address: string;\n}\n\nexport function CreatorChip({ getClient, address }: CreatorChipProps) {\n const { profile } = useCreatorProfile(getClient, address);\n const label = profile?.displayName || profile?.username || null;\n\n return (\n <Link\n href={`/account/${address}`}\n className=\"inline-flex items-center gap-1.5 text-sm rounded-full px-2 py-1 hover:bg-muted/60 active:scale-[0.98] transition\"\n >\n <span className=\"text-muted-foreground shrink-0\">by</span>\n {label ? (\n <span className=\"font-semibold text-foreground truncate\">{label}</span>\n ) : (\n <AddressDisplay address={address} chars={6} showCopy={false} className=\"font-semibold text-foreground\" />\n )}\n </Link>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBI;AAfJ,kBAAiB;AAEjB,0BAAkC;AAClC,6BAA+B;AAOxB,SAAS,YAAY,EAAE,WAAW,QAAQ,GAAqB;AACpE,QAAM,EAAE,QAAQ,QAAI,uCAAkB,WAAW,OAAO;AACxD,QAAM,QAAQ,SAAS,eAAe,SAAS,YAAY;AAE3D,SACE;AAAA,IAAC,YAAAA;AAAA,IAAA;AAAA,MACC,MAAM,YAAY,OAAO;AAAA,MACzB,WAAU;AAAA,MAEV;AAAA,oDAAC,UAAK,WAAU,kCAAiC,gBAAE;AAAA,QAClD,QACC,4CAAC,UAAK,WAAU,0CAA0C,iBAAM,IAEhE,4CAAC,yCAAe,SAAkB,OAAO,GAAG,UAAU,OAAO,WAAU,iCAAgC;AAAA;AAAA;AAAA,EAE3G;AAEJ;","names":["Link"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
3
|
+
|
|
4
|
+
interface CreatorChipProps {
|
|
5
|
+
getClient: () => MedialaneClient;
|
|
6
|
+
address: string;
|
|
7
|
+
}
|
|
8
|
+
declare function CreatorChip({ getClient, address }: CreatorChipProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { CreatorChip, type CreatorChipProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
3
|
+
|
|
4
|
+
interface CreatorChipProps {
|
|
5
|
+
getClient: () => MedialaneClient;
|
|
6
|
+
address: string;
|
|
7
|
+
}
|
|
8
|
+
declare function CreatorChip({ getClient, address }: CreatorChipProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { CreatorChip, type CreatorChipProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { useCreatorProfile } from "../utils/use-profiles.js";
|
|
5
|
+
import { AddressDisplay } from "./address-display.js";
|
|
6
|
+
function CreatorChip({ getClient, address }) {
|
|
7
|
+
const { profile } = useCreatorProfile(getClient, address);
|
|
8
|
+
const label = profile?.displayName || profile?.username || null;
|
|
9
|
+
return /* @__PURE__ */ jsxs(
|
|
10
|
+
Link,
|
|
11
|
+
{
|
|
12
|
+
href: `/account/${address}`,
|
|
13
|
+
className: "inline-flex items-center gap-1.5 text-sm rounded-full px-2 py-1 hover:bg-muted/60 active:scale-[0.98] transition",
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground shrink-0", children: "by" }),
|
|
16
|
+
label ? /* @__PURE__ */ jsx("span", { className: "font-semibold text-foreground truncate", children: label }) : /* @__PURE__ */ jsx(AddressDisplay, { address, chars: 6, showCopy: false, className: "font-semibold text-foreground" })
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
CreatorChip
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=creator-chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/creator-chip.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport { useCreatorProfile } from \"../utils/use-profiles.js\";\nimport { AddressDisplay } from \"./address-display.js\";\n\nexport interface CreatorChipProps {\n getClient: () => MedialaneClient;\n address: string;\n}\n\nexport function CreatorChip({ getClient, address }: CreatorChipProps) {\n const { profile } = useCreatorProfile(getClient, address);\n const label = profile?.displayName || profile?.username || null;\n\n return (\n <Link\n href={`/account/${address}`}\n className=\"inline-flex items-center gap-1.5 text-sm rounded-full px-2 py-1 hover:bg-muted/60 active:scale-[0.98] transition\"\n >\n <span className=\"text-muted-foreground shrink-0\">by</span>\n {label ? (\n <span className=\"font-semibold text-foreground truncate\">{label}</span>\n ) : (\n <AddressDisplay address={address} chars={6} showCopy={false} className=\"font-semibold text-foreground\" />\n )}\n </Link>\n );\n}\n"],"mappings":";AAiBI,SAIE,KAJF;AAfJ,OAAO,UAAU;AAEjB,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAOxB,SAAS,YAAY,EAAE,WAAW,QAAQ,GAAqB;AACpE,QAAM,EAAE,QAAQ,IAAI,kBAAkB,WAAW,OAAO;AACxD,QAAM,QAAQ,SAAS,eAAe,SAAS,YAAY;AAE3D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,YAAY,OAAO;AAAA,MACzB,WAAU;AAAA,MAEV;AAAA,4BAAC,UAAK,WAAU,kCAAiC,gBAAE;AAAA,QAClD,QACC,oBAAC,UAAK,WAAU,0CAA0C,iBAAM,IAEhE,oBAAC,kBAAe,SAAkB,OAAO,GAAG,UAAU,OAAO,WAAU,iCAAgC;AAAA;AAAA;AAAA,EAE3G;AAEJ;","names":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var creator_score_inline_exports = {};
|
|
31
|
+
__export(creator_score_inline_exports, {
|
|
32
|
+
CreatorScoreInline: () => CreatorScoreInline
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(creator_score_inline_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_link = __toESM(require("next/link"), 1);
|
|
37
|
+
var import_level_badge = require("./rewards/level-badge.js");
|
|
38
|
+
var import_badge_shelf = require("./rewards/badge-shelf.js");
|
|
39
|
+
var import_use_rewards = require("../utils/use-rewards.js");
|
|
40
|
+
function CreatorScoreInline({ getClient, address, size = "sm", showBadges = false, maxBadges = 6, className }) {
|
|
41
|
+
const { data } = (0, import_use_rewards.useRewards)(getClient, address);
|
|
42
|
+
if (!data || data.totalXp <= 0) return null;
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className, children: [
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: "/rewards", className: "inline-flex active:opacity-80", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_level_badge.LevelBadge, { level: data.currentLevel, name: data.currentLevelName, badgeColor: data.badgeColor, size }) }),
|
|
45
|
+
showBadges && data.badges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge_shelf.BadgeShelf, { badges: data.badges.slice(0, maxBadges), className: "mt-2" })
|
|
46
|
+
] });
|
|
47
|
+
}
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
CreatorScoreInline
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=creator-score-inline.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/creator-score-inline.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport { LevelBadge } from \"./rewards/level-badge.js\";\nimport { BadgeShelf } from \"./rewards/badge-shelf.js\";\nimport { useRewards } from \"../utils/use-rewards.js\";\n\nexport interface CreatorScoreInlineProps {\n getClient: () => MedialaneClient;\n address: string | null | undefined;\n size?: \"sm\" | \"md\" | \"lg\";\n /** Also show the earned badges under the chip (creator/profile pages). */\n showBadges?: boolean;\n /** Max badges when showBadges is set. */\n maxBadges?: number;\n className?: string;\n}\n\n/** Level chip (+ optional badge row) for an address, linking to /rewards.\n * Renders nothing while loading, on failure, or for addresses with no XP —\n * rewards must never add error states or noise to non-rewards pages. */\nexport function CreatorScoreInline({ getClient, address, size = \"sm\", showBadges = false, maxBadges = 6, className }: CreatorScoreInlineProps) {\n const { data } = useRewards(getClient, address);\n if (!data || data.totalXp <= 0) return null;\n\n return (\n <div className={className}>\n <Link href=\"/rewards\" className=\"inline-flex active:opacity-80\">\n <LevelBadge level={data.currentLevel} name={data.currentLevelName} badgeColor={data.badgeColor} size={size} />\n </Link>\n {showBadges && data.badges.length > 0 && (\n <BadgeShelf badges={data.badges.slice(0, maxBadges)} className=\"mt-2\" />\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BI;AAzBJ,kBAAiB;AAEjB,yBAA2B;AAC3B,yBAA2B;AAC3B,yBAA2B;AAgBpB,SAAS,mBAAmB,EAAE,WAAW,SAAS,OAAO,MAAM,aAAa,OAAO,YAAY,GAAG,UAAU,GAA4B;AAC7I,QAAM,EAAE,KAAK,QAAI,+BAAW,WAAW,OAAO;AAC9C,MAAI,CAAC,QAAQ,KAAK,WAAW,EAAG,QAAO;AAEvC,SACE,6CAAC,SAAI,WACH;AAAA,gDAAC,YAAAA,SAAA,EAAK,MAAK,YAAW,WAAU,iCAC9B,sDAAC,iCAAW,OAAO,KAAK,cAAc,MAAM,KAAK,kBAAkB,YAAY,KAAK,YAAY,MAAY,GAC9G;AAAA,IACC,cAAc,KAAK,OAAO,SAAS,KAClC,4CAAC,iCAAW,QAAQ,KAAK,OAAO,MAAM,GAAG,SAAS,GAAG,WAAU,QAAO;AAAA,KAE1E;AAEJ;","names":["Link"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
3
|
+
|
|
4
|
+
interface CreatorScoreInlineProps {
|
|
5
|
+
getClient: () => MedialaneClient;
|
|
6
|
+
address: string | null | undefined;
|
|
7
|
+
size?: "sm" | "md" | "lg";
|
|
8
|
+
/** Also show the earned badges under the chip (creator/profile pages). */
|
|
9
|
+
showBadges?: boolean;
|
|
10
|
+
/** Max badges when showBadges is set. */
|
|
11
|
+
maxBadges?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Level chip (+ optional badge row) for an address, linking to /rewards.
|
|
15
|
+
* Renders nothing while loading, on failure, or for addresses with no XP —
|
|
16
|
+
* rewards must never add error states or noise to non-rewards pages. */
|
|
17
|
+
declare function CreatorScoreInline({ getClient, address, size, showBadges, maxBadges, className }: CreatorScoreInlineProps): react_jsx_runtime.JSX.Element | null;
|
|
18
|
+
|
|
19
|
+
export { CreatorScoreInline, type CreatorScoreInlineProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
3
|
+
|
|
4
|
+
interface CreatorScoreInlineProps {
|
|
5
|
+
getClient: () => MedialaneClient;
|
|
6
|
+
address: string | null | undefined;
|
|
7
|
+
size?: "sm" | "md" | "lg";
|
|
8
|
+
/** Also show the earned badges under the chip (creator/profile pages). */
|
|
9
|
+
showBadges?: boolean;
|
|
10
|
+
/** Max badges when showBadges is set. */
|
|
11
|
+
maxBadges?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Level chip (+ optional badge row) for an address, linking to /rewards.
|
|
15
|
+
* Renders nothing while loading, on failure, or for addresses with no XP —
|
|
16
|
+
* rewards must never add error states or noise to non-rewards pages. */
|
|
17
|
+
declare function CreatorScoreInline({ getClient, address, size, showBadges, maxBadges, className }: CreatorScoreInlineProps): react_jsx_runtime.JSX.Element | null;
|
|
18
|
+
|
|
19
|
+
export { CreatorScoreInline, type CreatorScoreInlineProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { LevelBadge } from "./rewards/level-badge.js";
|
|
5
|
+
import { BadgeShelf } from "./rewards/badge-shelf.js";
|
|
6
|
+
import { useRewards } from "../utils/use-rewards.js";
|
|
7
|
+
function CreatorScoreInline({ getClient, address, size = "sm", showBadges = false, maxBadges = 6, className }) {
|
|
8
|
+
const { data } = useRewards(getClient, address);
|
|
9
|
+
if (!data || data.totalXp <= 0) return null;
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", { className, children: [
|
|
11
|
+
/* @__PURE__ */ jsx(Link, { href: "/rewards", className: "inline-flex active:opacity-80", children: /* @__PURE__ */ jsx(LevelBadge, { level: data.currentLevel, name: data.currentLevelName, badgeColor: data.badgeColor, size }) }),
|
|
12
|
+
showBadges && data.badges.length > 0 && /* @__PURE__ */ jsx(BadgeShelf, { badges: data.badges.slice(0, maxBadges), className: "mt-2" })
|
|
13
|
+
] });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
CreatorScoreInline
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=creator-score-inline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/creator-score-inline.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport { LevelBadge } from \"./rewards/level-badge.js\";\nimport { BadgeShelf } from \"./rewards/badge-shelf.js\";\nimport { useRewards } from \"../utils/use-rewards.js\";\n\nexport interface CreatorScoreInlineProps {\n getClient: () => MedialaneClient;\n address: string | null | undefined;\n size?: \"sm\" | \"md\" | \"lg\";\n /** Also show the earned badges under the chip (creator/profile pages). */\n showBadges?: boolean;\n /** Max badges when showBadges is set. */\n maxBadges?: number;\n className?: string;\n}\n\n/** Level chip (+ optional badge row) for an address, linking to /rewards.\n * Renders nothing while loading, on failure, or for addresses with no XP —\n * rewards must never add error states or noise to non-rewards pages. */\nexport function CreatorScoreInline({ getClient, address, size = \"sm\", showBadges = false, maxBadges = 6, className }: CreatorScoreInlineProps) {\n const { data } = useRewards(getClient, address);\n if (!data || data.totalXp <= 0) return null;\n\n return (\n <div className={className}>\n <Link href=\"/rewards\" className=\"inline-flex active:opacity-80\">\n <LevelBadge level={data.currentLevel} name={data.currentLevelName} badgeColor={data.badgeColor} size={size} />\n </Link>\n {showBadges && data.badges.length > 0 && (\n <BadgeShelf badges={data.badges.slice(0, maxBadges)} className=\"mt-2\" />\n )}\n </div>\n );\n}\n"],"mappings":";AA2BI,SAEI,KAFJ;AAzBJ,OAAO,UAAU;AAEjB,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAgBpB,SAAS,mBAAmB,EAAE,WAAW,SAAS,OAAO,MAAM,aAAa,OAAO,YAAY,GAAG,UAAU,GAA4B;AAC7I,QAAM,EAAE,KAAK,IAAI,WAAW,WAAW,OAAO;AAC9C,MAAI,CAAC,QAAQ,KAAK,WAAW,EAAG,QAAO;AAEvC,SACE,qBAAC,SAAI,WACH;AAAA,wBAAC,QAAK,MAAK,YAAW,WAAU,iCAC9B,8BAAC,cAAW,OAAO,KAAK,cAAc,MAAM,KAAK,kBAAkB,YAAY,KAAK,YAAY,MAAY,GAC9G;AAAA,IACC,cAAc,KAAK,OAAO,SAAS,KAClC,oBAAC,cAAW,QAAQ,KAAK,OAAO,MAAM,GAAG,SAAS,GAAG,WAAU,QAAO;AAAA,KAE1E;AAEJ;","names":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import * as
|
|
3
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
4
4
|
|
|
5
|
-
declare const Dialog: React.FC<
|
|
6
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<
|
|
7
|
-
declare const DialogPortal: React.FC<
|
|
8
|
-
declare const DialogClose: React.ForwardRefExoticComponent<
|
|
9
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<
|
|
10
|
-
interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof
|
|
5
|
+
declare const Dialog: React.FC<SheetPrimitive.DialogProps>;
|
|
6
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
8
|
+
declare const DialogClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> {
|
|
11
11
|
hideClose?: boolean;
|
|
12
12
|
}
|
|
13
13
|
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -19,7 +19,7 @@ declare const DialogFooter: {
|
|
|
19
19
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
20
20
|
displayName: string;
|
|
21
21
|
};
|
|
22
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<
|
|
23
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<
|
|
22
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
23
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
24
24
|
|
|
25
25
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|