@medialane/ui 0.341.0 → 0.342.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/account/input-otp.d.cts +2 -2
- package/dist/components/account/input-otp.d.ts +2 -2
- package/dist/components/activities-feed.cjs +0 -47
- package/dist/components/activities-feed.cjs.map +1 -1
- package/dist/components/activities-feed.js +1 -38
- package/dist/components/activities-feed.js.map +1 -1
- package/dist/components/badge.d.cts +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.d.cts +2 -2
- package/dist/components/button.d.ts +2 -2
- package/dist/components/launchpad/edition-mint-schema.d.cts +2 -2
- package/dist/components/launchpad/edition-mint-schema.d.ts +2 -2
- package/dist/components/sheet.d.cts +1 -1
- package/dist/components/sheet.d.ts +1 -1
- package/dist/index.cjs +0 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -6
- package/dist/index.d.ts +1 -6
- package/dist/index.js +1 -20
- package/dist/index.js.map +1 -1
- package/dist/utils/format-activity.cjs +2 -50
- package/dist/utils/format-activity.cjs.map +1 -1
- package/dist/utils/format-activity.d.cts +2 -5
- package/dist/utils/format-activity.d.ts +2 -5
- package/dist/utils/format-activity.js +1 -46
- package/dist/utils/format-activity.js.map +1 -1
- package/dist/utils/use-activities.cjs +2 -2
- package/dist/utils/use-activities.cjs.map +1 -1
- package/dist/utils/use-activities.js +2 -2
- package/dist/utils/use-activities.js.map +1 -1
- package/dist/utils/use-coin-price.cjs +1 -2
- package/dist/utils/use-coin-price.cjs.map +1 -1
- package/dist/utils/use-coin-price.js +1 -2
- package/dist/utils/use-coin-price.js.map +1 -1
- package/dist/utils/use-collections.cjs +1 -1
- package/dist/utils/use-collections.cjs.map +1 -1
- package/dist/utils/use-collections.js +1 -1
- package/dist/utils/use-collections.js.map +1 -1
- package/dist/utils/use-comments.cjs +1 -1
- package/dist/utils/use-comments.cjs.map +1 -1
- package/dist/utils/use-comments.js +1 -1
- package/dist/utils/use-comments.js.map +1 -1
- package/dist/utils/use-orders.cjs +4 -4
- package/dist/utils/use-orders.cjs.map +1 -1
- package/dist/utils/use-orders.js +4 -4
- package/dist/utils/use-orders.js.map +1 -1
- package/dist/utils/use-remix-offers.cjs +1 -1
- package/dist/utils/use-remix-offers.cjs.map +1 -1
- package/dist/utils/use-remix-offers.js +1 -1
- package/dist/utils/use-remix-offers.js.map +1 -1
- package/dist/utils/use-tokens-by-ip-type.cjs +1 -1
- package/dist/utils/use-tokens-by-ip-type.cjs.map +1 -1
- package/dist/utils/use-tokens-by-ip-type.js +1 -1
- package/dist/utils/use-tokens-by-ip-type.js.map +1 -1
- package/dist/utils/use-tokens.cjs +2 -2
- package/dist/utils/use-tokens.cjs.map +1 -1
- package/dist/utils/use-tokens.d.cts +1 -1
- package/dist/utils/use-tokens.d.ts +1 -1
- package/dist/utils/use-tokens.js +2 -2
- package/dist/utils/use-tokens.js.map +1 -1
- package/dist/utils/use-usd-prices.cjs +0 -1
- package/dist/utils/use-usd-prices.cjs.map +1 -1
- package/dist/utils/use-usd-prices.js +0 -1
- package/dist/utils/use-usd-prices.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/notification-row.cjs +0 -117
- package/dist/components/notification-row.cjs.map +0 -1
- package/dist/components/notification-row.d.cts +0 -11
- package/dist/components/notification-row.d.ts +0 -11
- package/dist/components/notification-row.js +0 -83
- package/dist/components/notification-row.js.map +0 -1
- package/dist/data/notification-meta.cjs +0 -66
- package/dist/data/notification-meta.cjs.map +0 -1
- package/dist/data/notification-meta.d.cts +0 -7
- package/dist/data/notification-meta.d.ts +0 -7
- package/dist/data/notification-meta.js +0 -50
- package/dist/data/notification-meta.js.map +0 -1
- package/dist/data/notification.cjs +0 -17
- package/dist/data/notification.cjs.map +0 -1
- package/dist/data/notification.d.cts +0 -31
- package/dist/data/notification.d.ts +0 -31
- package/dist/data/notification.js +0 -1
- package/dist/data/notification.js.map +0 -1
- package/dist/utils/notification-readiness.cjs +0 -32
- package/dist/utils/notification-readiness.cjs.map +0 -1
- package/dist/utils/notification-readiness.d.cts +0 -9
- package/dist/utils/notification-readiness.d.ts +0 -9
- package/dist/utils/notification-readiness.js +0 -8
- package/dist/utils/notification-readiness.js.map +0 -1
- package/dist/utils/notification-storage.cjs +0 -52
- package/dist/utils/notification-storage.cjs.map +0 -1
- package/dist/utils/notification-storage.d.cts +0 -4
- package/dist/utils/notification-storage.d.ts +0 -4
- package/dist/utils/notification-storage.js +0 -27
- package/dist/utils/notification-storage.js.map +0 -1
- package/dist/utils/use-notifications.cjs +0 -182
- package/dist/utils/use-notifications.cjs.map +0 -1
- package/dist/utils/use-notifications.d.cts +0 -11
- package/dist/utils/use-notifications.d.ts +0 -11
- package/dist/utils/use-notifications.js +0 -153
- package/dist/utils/use-notifications.js.map +0 -1
|
@@ -1,117 +0,0 @@
|
|
|
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 notification_row_exports = {};
|
|
31
|
-
__export(notification_row_exports, {
|
|
32
|
-
NotificationRow: () => NotificationRow
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(notification_row_exports);
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var import_link = __toESM(require("./link.js"), 1);
|
|
37
|
-
var import_image = __toESM(require("./image.js"), 1);
|
|
38
|
-
var import_lucide_react = require("lucide-react");
|
|
39
|
-
var import_time = require("../utils/time.js");
|
|
40
|
-
var import_cn = require("../utils/cn.js");
|
|
41
|
-
var import_notification_meta = require("../data/notification-meta.js");
|
|
42
|
-
function NotificationRow({
|
|
43
|
-
notification,
|
|
44
|
-
onNavigate,
|
|
45
|
-
compact = false
|
|
46
|
-
}) {
|
|
47
|
-
const { type, title, description, image, href, timestamp, isUnread } = notification;
|
|
48
|
-
const Icon = import_notification_meta.NOTIFICATION_ICON[type] ?? import_lucide_react.Bell;
|
|
49
|
-
const colorClass = import_notification_meta.NOTIFICATION_COLOR[type] ?? "text-muted-foreground bg-muted/40";
|
|
50
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
51
|
-
import_link.default,
|
|
52
|
-
{
|
|
53
|
-
href,
|
|
54
|
-
onClick: onNavigate,
|
|
55
|
-
className: (0, import_cn.cn)(
|
|
56
|
-
"flex items-start gap-3 px-4 transition-colors group",
|
|
57
|
-
compact ? "py-3" : "py-4",
|
|
58
|
-
isUnread && "bg-primary/[0.03]",
|
|
59
|
-
"hover:bg-muted/40"
|
|
60
|
-
),
|
|
61
|
-
children: [
|
|
62
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative shrink-0 mt-0.5", children: image ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-10 w-10 rounded-xl overflow-hidden bg-muted ring-1 ring-border/40", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
|
-
import_image.default,
|
|
65
|
-
{
|
|
66
|
-
src: image,
|
|
67
|
-
alt: "",
|
|
68
|
-
width: 40,
|
|
69
|
-
height: 40,
|
|
70
|
-
className: "object-cover w-full h-full",
|
|
71
|
-
unoptimized: true
|
|
72
|
-
}
|
|
73
|
-
) }),
|
|
74
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
75
|
-
"div",
|
|
76
|
-
{
|
|
77
|
-
className: (0, import_cn.cn)(
|
|
78
|
-
"absolute -bottom-1 -right-1 h-5 w-5 rounded-full border-2 border-background flex items-center justify-center",
|
|
79
|
-
colorClass
|
|
80
|
-
),
|
|
81
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-2.5 w-2.5" })
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
-
"div",
|
|
86
|
-
{
|
|
87
|
-
className: (0, import_cn.cn)(
|
|
88
|
-
"h-10 w-10 rounded-xl flex items-center justify-center ring-1 ring-border/20",
|
|
89
|
-
colorClass
|
|
90
|
-
),
|
|
91
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-4 w-4" })
|
|
92
|
-
}
|
|
93
|
-
) }),
|
|
94
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0 space-y-0.5", children: [
|
|
95
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
-
"p",
|
|
97
|
-
{
|
|
98
|
-
className: (0, import_cn.cn)(
|
|
99
|
-
"text-sm leading-snug truncate",
|
|
100
|
-
isUnread ? "font-semibold text-foreground" : "font-medium text-foreground/90"
|
|
101
|
-
),
|
|
102
|
-
children: title
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground truncate", children: description }),
|
|
106
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-2xs text-muted-foreground/50 pt-0.5", children: (0, import_time.timeAgo)(timestamp) })
|
|
107
|
-
] }),
|
|
108
|
-
isUnread && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-2 w-2 rounded-full bg-primary shrink-0 mt-2" })
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
114
|
-
0 && (module.exports = {
|
|
115
|
-
NotificationRow
|
|
116
|
-
});
|
|
117
|
-
//# sourceMappingURL=notification-row.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/notification-row.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { Bell } from \"lucide-react\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { NOTIFICATION_ICON, NOTIFICATION_COLOR } from \"../data/notification-meta.js\";\nimport type { Notification } from \"../data/notification.js\";\n\nexport interface NotificationRowProps {\n notification: Notification;\n onNavigate?: () => void;\n compact?: boolean;\n}\n\nexport function NotificationRow({\n notification,\n onNavigate,\n compact = false,\n}: NotificationRowProps) {\n const { type, title, description, image, href, timestamp, isUnread } = notification;\n const Icon = NOTIFICATION_ICON[type] ?? Bell;\n const colorClass = NOTIFICATION_COLOR[type] ?? \"text-muted-foreground bg-muted/40\";\n\n return (\n <Link\n href={href}\n onClick={onNavigate}\n className={cn(\n \"flex items-start gap-3 px-4 transition-colors group\",\n compact ? \"py-3\" : \"py-4\",\n isUnread && \"bg-primary/[0.03]\",\n \"hover:bg-muted/40\"\n )}\n >\n\n <div className=\"relative shrink-0 mt-0.5\">\n {image ? (\n <>\n <div className=\"h-10 w-10 rounded-xl overflow-hidden bg-muted ring-1 ring-border/40\">\n <Image\n src={image}\n alt=\"\"\n width={40}\n height={40}\n className=\"object-cover w-full h-full\"\n unoptimized\n />\n </div>\n <div\n className={cn(\n \"absolute -bottom-1 -right-1 h-5 w-5 rounded-full border-2 border-background flex items-center justify-center\",\n colorClass\n )}\n >\n <Icon className=\"h-2.5 w-2.5\" />\n </div>\n </>\n ) : (\n <div\n className={cn(\n \"h-10 w-10 rounded-xl flex items-center justify-center ring-1 ring-border/20\",\n colorClass\n )}\n >\n <Icon className=\"h-4 w-4\" />\n </div>\n )}\n </div>\n\n <div className=\"flex-1 min-w-0 space-y-0.5\">\n <p\n className={cn(\n \"text-sm leading-snug truncate\",\n isUnread ? \"font-semibold text-foreground\" : \"font-medium text-foreground/90\"\n )}\n >\n {title}\n </p>\n <p className=\"text-xs text-muted-foreground truncate\">{description}</p>\n <p className=\"text-2xs text-muted-foreground/50 pt-0.5\">{timeAgo(timestamp)}</p>\n </div>\n\n {isUnread && (\n <div className=\"h-2 w-2 rounded-full bg-primary shrink-0 mt-2\" />\n )}\n </Link>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCU;AArCV,kBAAiB;AACjB,mBAAkB;AAClB,0BAAqB;AACrB,kBAAwB;AACxB,gBAAmB;AACnB,+BAAsD;AAS/C,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,UAAU;AACZ,GAAyB;AACvB,QAAM,EAAE,MAAM,OAAO,aAAa,OAAO,MAAM,WAAW,SAAS,IAAI;AACvE,QAAM,OAAO,2CAAkB,IAAI,KAAK;AACxC,QAAM,aAAa,4CAAmB,IAAI,KAAK;AAE/C,SACE;AAAA,IAAC,YAAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAS;AAAA,MACT,eAAW;AAAA,QACT;AAAA,QACA,UAAU,SAAS;AAAA,QACnB,YAAY;AAAA,QACZ;AAAA,MACF;AAAA,MAGA;AAAA,oDAAC,SAAI,WAAU,4BACZ,kBACC,4EACE;AAAA,sDAAC,SAAI,WAAU,uEACb;AAAA,YAAC,aAAAC;AAAA,YAAA;AAAA,cACC,KAAK;AAAA,cACL,KAAI;AAAA,cACJ,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,WAAU;AAAA,cACV,aAAW;AAAA;AAAA,UACb,GACF;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,eAAW;AAAA,gBACT;AAAA,gBACA;AAAA,cACF;AAAA,cAEA,sDAAC,QAAK,WAAU,eAAc;AAAA;AAAA,UAChC;AAAA,WACF,IAEA;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA,cACA;AAAA,YACF;AAAA,YAEA,sDAAC,QAAK,WAAU,WAAU;AAAA;AAAA,QAC5B,GAEJ;AAAA,QAEA,6CAAC,SAAI,WAAU,8BACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,eAAW;AAAA,gBACT;AAAA,gBACA,WAAW,kCAAkC;AAAA,cAC/C;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,UACA,4CAAC,OAAE,WAAU,0CAA0C,uBAAY;AAAA,UACnE,4CAAC,OAAE,WAAU,4CAA4C,mCAAQ,SAAS,GAAE;AAAA,WAC9E;AAAA,QAEC,YACC,4CAAC,SAAI,WAAU,iDAAgD;AAAA;AAAA;AAAA,EAEnE;AAEJ;","names":["Link","Image"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Notification } from '../data/notification.cjs';
|
|
3
|
-
|
|
4
|
-
interface NotificationRowProps {
|
|
5
|
-
notification: Notification;
|
|
6
|
-
onNavigate?: () => void;
|
|
7
|
-
compact?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare function NotificationRow({ notification, onNavigate, compact, }: NotificationRowProps): react_jsx_runtime.JSX.Element;
|
|
10
|
-
|
|
11
|
-
export { NotificationRow, type NotificationRowProps };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Notification } from '../data/notification.js';
|
|
3
|
-
|
|
4
|
-
interface NotificationRowProps {
|
|
5
|
-
notification: Notification;
|
|
6
|
-
onNavigate?: () => void;
|
|
7
|
-
compact?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare function NotificationRow({ notification, onNavigate, compact, }: NotificationRowProps): react_jsx_runtime.JSX.Element;
|
|
10
|
-
|
|
11
|
-
export { NotificationRow, type NotificationRowProps };
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Link from "./link.js";
|
|
4
|
-
import Image from "./image.js";
|
|
5
|
-
import { Bell } from "lucide-react";
|
|
6
|
-
import { timeAgo } from "../utils/time.js";
|
|
7
|
-
import { cn } from "../utils/cn.js";
|
|
8
|
-
import { NOTIFICATION_ICON, NOTIFICATION_COLOR } from "../data/notification-meta.js";
|
|
9
|
-
function NotificationRow({
|
|
10
|
-
notification,
|
|
11
|
-
onNavigate,
|
|
12
|
-
compact = false
|
|
13
|
-
}) {
|
|
14
|
-
const { type, title, description, image, href, timestamp, isUnread } = notification;
|
|
15
|
-
const Icon = NOTIFICATION_ICON[type] ?? Bell;
|
|
16
|
-
const colorClass = NOTIFICATION_COLOR[type] ?? "text-muted-foreground bg-muted/40";
|
|
17
|
-
return /* @__PURE__ */ jsxs(
|
|
18
|
-
Link,
|
|
19
|
-
{
|
|
20
|
-
href,
|
|
21
|
-
onClick: onNavigate,
|
|
22
|
-
className: cn(
|
|
23
|
-
"flex items-start gap-3 px-4 transition-colors group",
|
|
24
|
-
compact ? "py-3" : "py-4",
|
|
25
|
-
isUnread && "bg-primary/[0.03]",
|
|
26
|
-
"hover:bg-muted/40"
|
|
27
|
-
),
|
|
28
|
-
children: [
|
|
29
|
-
/* @__PURE__ */ jsx("div", { className: "relative shrink-0 mt-0.5", children: image ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30
|
-
/* @__PURE__ */ jsx("div", { className: "h-10 w-10 rounded-xl overflow-hidden bg-muted ring-1 ring-border/40", children: /* @__PURE__ */ jsx(
|
|
31
|
-
Image,
|
|
32
|
-
{
|
|
33
|
-
src: image,
|
|
34
|
-
alt: "",
|
|
35
|
-
width: 40,
|
|
36
|
-
height: 40,
|
|
37
|
-
className: "object-cover w-full h-full",
|
|
38
|
-
unoptimized: true
|
|
39
|
-
}
|
|
40
|
-
) }),
|
|
41
|
-
/* @__PURE__ */ jsx(
|
|
42
|
-
"div",
|
|
43
|
-
{
|
|
44
|
-
className: cn(
|
|
45
|
-
"absolute -bottom-1 -right-1 h-5 w-5 rounded-full border-2 border-background flex items-center justify-center",
|
|
46
|
-
colorClass
|
|
47
|
-
),
|
|
48
|
-
children: /* @__PURE__ */ jsx(Icon, { className: "h-2.5 w-2.5" })
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
] }) : /* @__PURE__ */ jsx(
|
|
52
|
-
"div",
|
|
53
|
-
{
|
|
54
|
-
className: cn(
|
|
55
|
-
"h-10 w-10 rounded-xl flex items-center justify-center ring-1 ring-border/20",
|
|
56
|
-
colorClass
|
|
57
|
-
),
|
|
58
|
-
children: /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" })
|
|
59
|
-
}
|
|
60
|
-
) }),
|
|
61
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 space-y-0.5", children: [
|
|
62
|
-
/* @__PURE__ */ jsx(
|
|
63
|
-
"p",
|
|
64
|
-
{
|
|
65
|
-
className: cn(
|
|
66
|
-
"text-sm leading-snug truncate",
|
|
67
|
-
isUnread ? "font-semibold text-foreground" : "font-medium text-foreground/90"
|
|
68
|
-
),
|
|
69
|
-
children: title
|
|
70
|
-
}
|
|
71
|
-
),
|
|
72
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground truncate", children: description }),
|
|
73
|
-
/* @__PURE__ */ jsx("p", { className: "text-2xs text-muted-foreground/50 pt-0.5", children: timeAgo(timestamp) })
|
|
74
|
-
] }),
|
|
75
|
-
isUnread && /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-primary shrink-0 mt-2" })
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
export {
|
|
81
|
-
NotificationRow
|
|
82
|
-
};
|
|
83
|
-
//# sourceMappingURL=notification-row.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/notification-row.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { Bell } from \"lucide-react\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { NOTIFICATION_ICON, NOTIFICATION_COLOR } from \"../data/notification-meta.js\";\nimport type { Notification } from \"../data/notification.js\";\n\nexport interface NotificationRowProps {\n notification: Notification;\n onNavigate?: () => void;\n compact?: boolean;\n}\n\nexport function NotificationRow({\n notification,\n onNavigate,\n compact = false,\n}: NotificationRowProps) {\n const { type, title, description, image, href, timestamp, isUnread } = notification;\n const Icon = NOTIFICATION_ICON[type] ?? Bell;\n const colorClass = NOTIFICATION_COLOR[type] ?? \"text-muted-foreground bg-muted/40\";\n\n return (\n <Link\n href={href}\n onClick={onNavigate}\n className={cn(\n \"flex items-start gap-3 px-4 transition-colors group\",\n compact ? \"py-3\" : \"py-4\",\n isUnread && \"bg-primary/[0.03]\",\n \"hover:bg-muted/40\"\n )}\n >\n\n <div className=\"relative shrink-0 mt-0.5\">\n {image ? (\n <>\n <div className=\"h-10 w-10 rounded-xl overflow-hidden bg-muted ring-1 ring-border/40\">\n <Image\n src={image}\n alt=\"\"\n width={40}\n height={40}\n className=\"object-cover w-full h-full\"\n unoptimized\n />\n </div>\n <div\n className={cn(\n \"absolute -bottom-1 -right-1 h-5 w-5 rounded-full border-2 border-background flex items-center justify-center\",\n colorClass\n )}\n >\n <Icon className=\"h-2.5 w-2.5\" />\n </div>\n </>\n ) : (\n <div\n className={cn(\n \"h-10 w-10 rounded-xl flex items-center justify-center ring-1 ring-border/20\",\n colorClass\n )}\n >\n <Icon className=\"h-4 w-4\" />\n </div>\n )}\n </div>\n\n <div className=\"flex-1 min-w-0 space-y-0.5\">\n <p\n className={cn(\n \"text-sm leading-snug truncate\",\n isUnread ? \"font-semibold text-foreground\" : \"font-medium text-foreground/90\"\n )}\n >\n {title}\n </p>\n <p className=\"text-xs text-muted-foreground truncate\">{description}</p>\n <p className=\"text-2xs text-muted-foreground/50 pt-0.5\">{timeAgo(timestamp)}</p>\n </div>\n\n {isUnread && (\n <div className=\"h-2 w-2 rounded-full bg-primary shrink-0 mt-2\" />\n )}\n </Link>\n );\n}\n"],"mappings":";AAuCU,mBAEI,KAFJ;AArCV,OAAO,UAAU;AACjB,OAAO,WAAW;AAClB,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,UAAU;AACnB,SAAS,mBAAmB,0BAA0B;AAS/C,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,UAAU;AACZ,GAAyB;AACvB,QAAM,EAAE,MAAM,OAAO,aAAa,OAAO,MAAM,WAAW,SAAS,IAAI;AACvE,QAAM,OAAO,kBAAkB,IAAI,KAAK;AACxC,QAAM,aAAa,mBAAmB,IAAI,KAAK;AAE/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,SAAS;AAAA,MACT,WAAW;AAAA,QACT;AAAA,QACA,UAAU,SAAS;AAAA,QACnB,YAAY;AAAA,QACZ;AAAA,MACF;AAAA,MAGA;AAAA,4BAAC,SAAI,WAAU,4BACZ,kBACC,iCACE;AAAA,8BAAC,SAAI,WAAU,uEACb;AAAA,YAAC;AAAA;AAAA,cACC,KAAK;AAAA,cACL,KAAI;AAAA,cACJ,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,WAAU;AAAA,cACV,aAAW;AAAA;AAAA,UACb,GACF;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA;AAAA,cACF;AAAA,cAEA,8BAAC,QAAK,WAAU,eAAc;AAAA;AAAA,UAChC;AAAA,WACF,IAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA;AAAA,YACF;AAAA,YAEA,8BAAC,QAAK,WAAU,WAAU;AAAA;AAAA,QAC5B,GAEJ;AAAA,QAEA,qBAAC,SAAI,WAAU,8BACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA,WAAW,kCAAkC;AAAA,cAC/C;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,UACA,oBAAC,OAAE,WAAU,0CAA0C,uBAAY;AAAA,UACnE,oBAAC,OAAE,WAAU,4CAA4C,kBAAQ,SAAS,GAAE;AAAA,WAC9E;AAAA,QAEC,YACC,oBAAC,SAAI,WAAU,iDAAgD;AAAA;AAAA;AAAA,EAEnE;AAEJ;","names":[]}
|
|
@@ -1,66 +0,0 @@
|
|
|
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 notification_meta_exports = {};
|
|
20
|
-
__export(notification_meta_exports, {
|
|
21
|
-
NOTIFICATION_COLOR: () => NOTIFICATION_COLOR,
|
|
22
|
-
NOTIFICATION_ICON: () => NOTIFICATION_ICON,
|
|
23
|
-
NOTIFICATION_LABEL: () => NOTIFICATION_LABEL
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(notification_meta_exports);
|
|
26
|
-
var import_lucide_react = require("lucide-react");
|
|
27
|
-
const NOTIFICATION_ICON = {
|
|
28
|
-
offer_accepted: import_lucide_react.CheckCircle2,
|
|
29
|
-
asset_received: import_lucide_react.Gift,
|
|
30
|
-
offer: import_lucide_react.HandCoins,
|
|
31
|
-
sale: import_lucide_react.Zap,
|
|
32
|
-
listing: import_lucide_react.Tag,
|
|
33
|
-
mint: import_lucide_react.Sparkles,
|
|
34
|
-
transfer: import_lucide_react.ArrowRightLeft,
|
|
35
|
-
cancelled: import_lucide_react.X,
|
|
36
|
-
announcement: import_lucide_react.Megaphone
|
|
37
|
-
};
|
|
38
|
-
const NOTIFICATION_COLOR = {
|
|
39
|
-
offer_accepted: "text-emerald-400 bg-emerald-500/10",
|
|
40
|
-
asset_received: "text-teal-400 bg-teal-500/10",
|
|
41
|
-
offer: "text-amber-400 bg-amber-500/10",
|
|
42
|
-
sale: "text-violet-400 bg-violet-500/10",
|
|
43
|
-
listing: "text-sky-400 bg-sky-500/10",
|
|
44
|
-
mint: "text-emerald-400 bg-emerald-500/10",
|
|
45
|
-
transfer: "text-slate-400 bg-slate-500/10",
|
|
46
|
-
cancelled: "text-rose-400 bg-rose-500/10",
|
|
47
|
-
announcement: "text-purple-400 bg-purple-500/10"
|
|
48
|
-
};
|
|
49
|
-
const NOTIFICATION_LABEL = {
|
|
50
|
-
offer_accepted: "Offer accepted",
|
|
51
|
-
asset_received: "Asset received",
|
|
52
|
-
offer: "New offer",
|
|
53
|
-
sale: "Sale",
|
|
54
|
-
listing: "Listing",
|
|
55
|
-
mint: "Mint",
|
|
56
|
-
transfer: "Transfer",
|
|
57
|
-
cancelled: "Cancelled",
|
|
58
|
-
announcement: "Announcement"
|
|
59
|
-
};
|
|
60
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
-
0 && (module.exports = {
|
|
62
|
-
NOTIFICATION_COLOR,
|
|
63
|
-
NOTIFICATION_ICON,
|
|
64
|
-
NOTIFICATION_LABEL
|
|
65
|
-
});
|
|
66
|
-
//# sourceMappingURL=notification-meta.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/data/notification-meta.ts"],"sourcesContent":["import {\n CheckCircle2, Gift, HandCoins, Megaphone, Zap, Tag, Sparkles, ArrowRightLeft, X,\n} from \"lucide-react\";\nimport type { NotificationType } from \"./notification.js\";\n\nexport const NOTIFICATION_ICON: Record<NotificationType, React.ElementType> = {\n offer_accepted: CheckCircle2,\n asset_received: Gift,\n offer: HandCoins,\n sale: Zap,\n listing: Tag,\n mint: Sparkles,\n transfer: ArrowRightLeft,\n cancelled: X,\n announcement: Megaphone,\n};\n\nexport const NOTIFICATION_COLOR: Record<NotificationType, string> = {\n offer_accepted: \"text-emerald-400 bg-emerald-500/10\",\n asset_received: \"text-teal-400 bg-teal-500/10\",\n offer: \"text-amber-400 bg-amber-500/10\",\n sale: \"text-violet-400 bg-violet-500/10\",\n listing: \"text-sky-400 bg-sky-500/10\",\n mint: \"text-emerald-400 bg-emerald-500/10\",\n transfer: \"text-slate-400 bg-slate-500/10\",\n cancelled: \"text-rose-400 bg-rose-500/10\",\n announcement: \"text-purple-400 bg-purple-500/10\",\n};\n\nexport const NOTIFICATION_LABEL: Record<NotificationType, string> = {\n offer_accepted: \"Offer accepted\",\n asset_received: \"Asset received\",\n offer: \"New offer\",\n sale: \"Sale\",\n listing: \"Listing\",\n mint: \"Mint\",\n transfer: \"Transfer\",\n cancelled: \"Cancelled\",\n announcement: \"Announcement\",\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAEO;AAGA,MAAM,oBAAiE;AAAA,EAC5E,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,OAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,SAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,UAAgB;AAAA,EAChB,WAAgB;AAAA,EAChB,cAAgB;AAClB;AAEO,MAAM,qBAAuD;AAAA,EAClE,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,OAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,SAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,UAAgB;AAAA,EAChB,WAAgB;AAAA,EAChB,cAAgB;AAClB;AAEO,MAAM,qBAAuD;AAAA,EAClE,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,OAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,SAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,UAAgB;AAAA,EAChB,WAAgB;AAAA,EAChB,cAAgB;AAClB;","names":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { NotificationType } from './notification.cjs';
|
|
2
|
-
|
|
3
|
-
declare const NOTIFICATION_ICON: Record<NotificationType, React.ElementType>;
|
|
4
|
-
declare const NOTIFICATION_COLOR: Record<NotificationType, string>;
|
|
5
|
-
declare const NOTIFICATION_LABEL: Record<NotificationType, string>;
|
|
6
|
-
|
|
7
|
-
export { NOTIFICATION_COLOR, NOTIFICATION_ICON, NOTIFICATION_LABEL };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { NotificationType } from './notification.js';
|
|
2
|
-
|
|
3
|
-
declare const NOTIFICATION_ICON: Record<NotificationType, React.ElementType>;
|
|
4
|
-
declare const NOTIFICATION_COLOR: Record<NotificationType, string>;
|
|
5
|
-
declare const NOTIFICATION_LABEL: Record<NotificationType, string>;
|
|
6
|
-
|
|
7
|
-
export { NOTIFICATION_COLOR, NOTIFICATION_ICON, NOTIFICATION_LABEL };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CheckCircle2,
|
|
3
|
-
Gift,
|
|
4
|
-
HandCoins,
|
|
5
|
-
Megaphone,
|
|
6
|
-
Zap,
|
|
7
|
-
Tag,
|
|
8
|
-
Sparkles,
|
|
9
|
-
ArrowRightLeft,
|
|
10
|
-
X
|
|
11
|
-
} from "lucide-react";
|
|
12
|
-
const NOTIFICATION_ICON = {
|
|
13
|
-
offer_accepted: CheckCircle2,
|
|
14
|
-
asset_received: Gift,
|
|
15
|
-
offer: HandCoins,
|
|
16
|
-
sale: Zap,
|
|
17
|
-
listing: Tag,
|
|
18
|
-
mint: Sparkles,
|
|
19
|
-
transfer: ArrowRightLeft,
|
|
20
|
-
cancelled: X,
|
|
21
|
-
announcement: Megaphone
|
|
22
|
-
};
|
|
23
|
-
const NOTIFICATION_COLOR = {
|
|
24
|
-
offer_accepted: "text-emerald-400 bg-emerald-500/10",
|
|
25
|
-
asset_received: "text-teal-400 bg-teal-500/10",
|
|
26
|
-
offer: "text-amber-400 bg-amber-500/10",
|
|
27
|
-
sale: "text-violet-400 bg-violet-500/10",
|
|
28
|
-
listing: "text-sky-400 bg-sky-500/10",
|
|
29
|
-
mint: "text-emerald-400 bg-emerald-500/10",
|
|
30
|
-
transfer: "text-slate-400 bg-slate-500/10",
|
|
31
|
-
cancelled: "text-rose-400 bg-rose-500/10",
|
|
32
|
-
announcement: "text-purple-400 bg-purple-500/10"
|
|
33
|
-
};
|
|
34
|
-
const NOTIFICATION_LABEL = {
|
|
35
|
-
offer_accepted: "Offer accepted",
|
|
36
|
-
asset_received: "Asset received",
|
|
37
|
-
offer: "New offer",
|
|
38
|
-
sale: "Sale",
|
|
39
|
-
listing: "Listing",
|
|
40
|
-
mint: "Mint",
|
|
41
|
-
transfer: "Transfer",
|
|
42
|
-
cancelled: "Cancelled",
|
|
43
|
-
announcement: "Announcement"
|
|
44
|
-
};
|
|
45
|
-
export {
|
|
46
|
-
NOTIFICATION_COLOR,
|
|
47
|
-
NOTIFICATION_ICON,
|
|
48
|
-
NOTIFICATION_LABEL
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=notification-meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/data/notification-meta.ts"],"sourcesContent":["import {\n CheckCircle2, Gift, HandCoins, Megaphone, Zap, Tag, Sparkles, ArrowRightLeft, X,\n} from \"lucide-react\";\nimport type { NotificationType } from \"./notification.js\";\n\nexport const NOTIFICATION_ICON: Record<NotificationType, React.ElementType> = {\n offer_accepted: CheckCircle2,\n asset_received: Gift,\n offer: HandCoins,\n sale: Zap,\n listing: Tag,\n mint: Sparkles,\n transfer: ArrowRightLeft,\n cancelled: X,\n announcement: Megaphone,\n};\n\nexport const NOTIFICATION_COLOR: Record<NotificationType, string> = {\n offer_accepted: \"text-emerald-400 bg-emerald-500/10\",\n asset_received: \"text-teal-400 bg-teal-500/10\",\n offer: \"text-amber-400 bg-amber-500/10\",\n sale: \"text-violet-400 bg-violet-500/10\",\n listing: \"text-sky-400 bg-sky-500/10\",\n mint: \"text-emerald-400 bg-emerald-500/10\",\n transfer: \"text-slate-400 bg-slate-500/10\",\n cancelled: \"text-rose-400 bg-rose-500/10\",\n announcement: \"text-purple-400 bg-purple-500/10\",\n};\n\nexport const NOTIFICATION_LABEL: Record<NotificationType, string> = {\n offer_accepted: \"Offer accepted\",\n asset_received: \"Asset received\",\n offer: \"New offer\",\n sale: \"Sale\",\n listing: \"Listing\",\n mint: \"Mint\",\n transfer: \"Transfer\",\n cancelled: \"Cancelled\",\n announcement: \"Announcement\",\n};\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EAAc;AAAA,EAAM;AAAA,EAAW;AAAA,EAAW;AAAA,EAAK;AAAA,EAAK;AAAA,EAAU;AAAA,EAAgB;AAAA,OACzE;AAGA,MAAM,oBAAiE;AAAA,EAC5E,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,OAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,SAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,UAAgB;AAAA,EAChB,WAAgB;AAAA,EAChB,cAAgB;AAClB;AAEO,MAAM,qBAAuD;AAAA,EAClE,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,OAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,SAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,UAAgB;AAAA,EAChB,WAAgB;AAAA,EAChB,cAAgB;AAClB;AAEO,MAAM,qBAAuD;AAAA,EAClE,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,OAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,SAAgB;AAAA,EAChB,MAAgB;AAAA,EAChB,UAAgB;AAAA,EAChB,WAAgB;AAAA,EAChB,cAAgB;AAClB;","names":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var notification_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(notification_exports);
|
|
17
|
-
//# sourceMappingURL=notification.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/data/notification.ts"],"sourcesContent":["export type NotificationType =\n | \"offer\"\n | \"offer_accepted\"\n | \"sale\"\n | \"listing\"\n | \"mint\"\n | \"transfer\"\n | \"asset_received\"\n | \"cancelled\"\n | \"announcement\";\n\nexport type NotificationPriority = \"normal\" | \"spotlight\";\n\nexport interface Notification {\n id: string;\n type: NotificationType;\n title: string;\n description: string;\n image: string | null;\n href: string;\n timestamp: string;\n isUnread: boolean;\n priority: NotificationPriority;\n\n celebratory?: boolean;\n\n metadata?: {\n amount?: string;\n currency?: string;\n txHash?: string;\n assetName?: string;\n };\n}\n\nexport interface Announcement {\n id: string;\n title: string;\n body: string;\n image: string | null;\n href: string;\n created_at: string;\n pinned?: boolean;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
type NotificationType = "offer" | "offer_accepted" | "sale" | "listing" | "mint" | "transfer" | "asset_received" | "cancelled" | "announcement";
|
|
2
|
-
type NotificationPriority = "normal" | "spotlight";
|
|
3
|
-
interface Notification {
|
|
4
|
-
id: string;
|
|
5
|
-
type: NotificationType;
|
|
6
|
-
title: string;
|
|
7
|
-
description: string;
|
|
8
|
-
image: string | null;
|
|
9
|
-
href: string;
|
|
10
|
-
timestamp: string;
|
|
11
|
-
isUnread: boolean;
|
|
12
|
-
priority: NotificationPriority;
|
|
13
|
-
celebratory?: boolean;
|
|
14
|
-
metadata?: {
|
|
15
|
-
amount?: string;
|
|
16
|
-
currency?: string;
|
|
17
|
-
txHash?: string;
|
|
18
|
-
assetName?: string;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
interface Announcement {
|
|
22
|
-
id: string;
|
|
23
|
-
title: string;
|
|
24
|
-
body: string;
|
|
25
|
-
image: string | null;
|
|
26
|
-
href: string;
|
|
27
|
-
created_at: string;
|
|
28
|
-
pinned?: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type { Announcement, Notification, NotificationPriority, NotificationType };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
type NotificationType = "offer" | "offer_accepted" | "sale" | "listing" | "mint" | "transfer" | "asset_received" | "cancelled" | "announcement";
|
|
2
|
-
type NotificationPriority = "normal" | "spotlight";
|
|
3
|
-
interface Notification {
|
|
4
|
-
id: string;
|
|
5
|
-
type: NotificationType;
|
|
6
|
-
title: string;
|
|
7
|
-
description: string;
|
|
8
|
-
image: string | null;
|
|
9
|
-
href: string;
|
|
10
|
-
timestamp: string;
|
|
11
|
-
isUnread: boolean;
|
|
12
|
-
priority: NotificationPriority;
|
|
13
|
-
celebratory?: boolean;
|
|
14
|
-
metadata?: {
|
|
15
|
-
amount?: string;
|
|
16
|
-
currency?: string;
|
|
17
|
-
txHash?: string;
|
|
18
|
-
assetName?: string;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
interface Announcement {
|
|
22
|
-
id: string;
|
|
23
|
-
title: string;
|
|
24
|
-
body: string;
|
|
25
|
-
image: string | null;
|
|
26
|
-
href: string;
|
|
27
|
-
created_at: string;
|
|
28
|
-
pinned?: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type { Announcement, Notification, NotificationPriority, NotificationType };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=notification.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,32 +0,0 @@
|
|
|
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 notification_readiness_exports = {};
|
|
20
|
-
__export(notification_readiness_exports, {
|
|
21
|
-
notificationsAreLoading: () => notificationsAreLoading
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(notification_readiness_exports);
|
|
24
|
-
function notificationsAreLoading(state) {
|
|
25
|
-
if (!state.hasAddress) return false;
|
|
26
|
-
return state.ordersLoading || state.receivedLoading || state.activitiesLoading;
|
|
27
|
-
}
|
|
28
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
-
0 && (module.exports = {
|
|
30
|
-
notificationsAreLoading
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=notification-readiness.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/notification-readiness.ts"],"sourcesContent":["export interface NotificationSourceState {\n ordersLoading: boolean;\n receivedLoading: boolean;\n activitiesLoading: boolean;\n hasAddress: boolean;\n}\n\nexport function notificationsAreLoading(state: NotificationSourceState): boolean {\n if (!state.hasAddress) return false;\n return state.ordersLoading || state.receivedLoading || state.activitiesLoading;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,SAAS,wBAAwB,OAAyC;AAC/E,MAAI,CAAC,MAAM,WAAY,QAAO;AAC9B,SAAO,MAAM,iBAAiB,MAAM,mBAAmB,MAAM;AAC/D;","names":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface NotificationSourceState {
|
|
2
|
-
ordersLoading: boolean;
|
|
3
|
-
receivedLoading: boolean;
|
|
4
|
-
activitiesLoading: boolean;
|
|
5
|
-
hasAddress: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare function notificationsAreLoading(state: NotificationSourceState): boolean;
|
|
8
|
-
|
|
9
|
-
export { type NotificationSourceState, notificationsAreLoading };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface NotificationSourceState {
|
|
2
|
-
ordersLoading: boolean;
|
|
3
|
-
receivedLoading: boolean;
|
|
4
|
-
activitiesLoading: boolean;
|
|
5
|
-
hasAddress: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare function notificationsAreLoading(state: NotificationSourceState): boolean;
|
|
8
|
-
|
|
9
|
-
export { type NotificationSourceState, notificationsAreLoading };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/notification-readiness.ts"],"sourcesContent":["export interface NotificationSourceState {\n ordersLoading: boolean;\n receivedLoading: boolean;\n activitiesLoading: boolean;\n hasAddress: boolean;\n}\n\nexport function notificationsAreLoading(state: NotificationSourceState): boolean {\n if (!state.hasAddress) return false;\n return state.ordersLoading || state.receivedLoading || state.activitiesLoading;\n}\n"],"mappings":"AAOO,SAAS,wBAAwB,OAAyC;AAC/E,MAAI,CAAC,MAAM,WAAY,QAAO;AAC9B,SAAO,MAAM,iBAAiB,MAAM,mBAAmB,MAAM;AAC/D;","names":[]}
|
|
@@ -1,52 +0,0 @@
|
|
|
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 notification_storage_exports = {};
|
|
20
|
-
__export(notification_storage_exports, {
|
|
21
|
-
getReadIds: () => getReadIds,
|
|
22
|
-
markRead: () => markRead
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(notification_storage_exports);
|
|
25
|
-
const KEY = "ml-notification-reads";
|
|
26
|
-
function getReadIds() {
|
|
27
|
-
if (typeof window === "undefined") return /* @__PURE__ */ new Set();
|
|
28
|
-
try {
|
|
29
|
-
const raw = localStorage.getItem(KEY);
|
|
30
|
-
const parsed = raw ? JSON.parse(raw) : [];
|
|
31
|
-
if (!Array.isArray(parsed)) return /* @__PURE__ */ new Set();
|
|
32
|
-
return new Set(parsed);
|
|
33
|
-
} catch {
|
|
34
|
-
return /* @__PURE__ */ new Set();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
function markRead(ids) {
|
|
38
|
-
if (typeof window === "undefined") return;
|
|
39
|
-
try {
|
|
40
|
-
const existing = getReadIds();
|
|
41
|
-
ids.forEach((id) => existing.add(id));
|
|
42
|
-
const arr = [...existing].slice(-1e3);
|
|
43
|
-
localStorage.setItem(KEY, JSON.stringify(arr));
|
|
44
|
-
} catch {
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
-
0 && (module.exports = {
|
|
49
|
-
getReadIds,
|
|
50
|
-
markRead
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=notification-storage.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/notification-storage.ts"],"sourcesContent":["const KEY = \"ml-notification-reads\";\n\nexport function getReadIds(): Set<string> {\n if (typeof window === \"undefined\") return new Set();\n try {\n const raw = localStorage.getItem(KEY);\n const parsed: unknown = raw ? JSON.parse(raw) : [];\n if (!Array.isArray(parsed)) return new Set();\n return new Set(parsed as string[]);\n } catch {\n return new Set();\n }\n}\n\nexport function markRead(ids: string[]): void {\n if (typeof window === \"undefined\") return;\n try {\n const existing = getReadIds();\n ids.forEach((id) => existing.add(id));\n\n const arr = [...existing].slice(-1000);\n localStorage.setItem(KEY, JSON.stringify(arr));\n } catch { }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,MAAM;AAEL,SAAS,aAA0B;AACxC,MAAI,OAAO,WAAW,YAAa,QAAO,oBAAI,IAAI;AAClD,MAAI;AACF,UAAM,MAAM,aAAa,QAAQ,GAAG;AACpC,UAAM,SAAkB,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;AACjD,QAAI,CAAC,MAAM,QAAQ,MAAM,EAAG,QAAO,oBAAI,IAAI;AAC3C,WAAO,IAAI,IAAI,MAAkB;AAAA,EACnC,QAAQ;AACN,WAAO,oBAAI,IAAI;AAAA,EACjB;AACF;AAEO,SAAS,SAAS,KAAqB;AAC5C,MAAI,OAAO,WAAW,YAAa;AACnC,MAAI;AACF,UAAM,WAAW,WAAW;AAC5B,QAAI,QAAQ,CAAC,OAAO,SAAS,IAAI,EAAE,CAAC;AAEpC,UAAM,MAAM,CAAC,GAAG,QAAQ,EAAE,MAAM,IAAK;AACrC,iBAAa,QAAQ,KAAK,KAAK,UAAU,GAAG,CAAC;AAAA,EAC/C,QAAQ;AAAA,EAAG;AACb;","names":[]}
|