@ag2/weave 0.21.0 → 0.22.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/lobby/LobbyCards.d.ts +2 -0
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -68,6 +68,8 @@ export declare type LobbyRoomRowProps = {
|
|
|
68
68
|
unread?: number;
|
|
69
69
|
/** Mentions among them, for the badge's highlight. */
|
|
70
70
|
highlight?: boolean;
|
|
71
|
+
/** Messages that need her (mentions, replies, DMs). When passed, the badge shows this number and never the unread count; plain unread only makes the name semibold. */
|
|
72
|
+
mentionCount?: number;
|
|
71
73
|
};
|
|
72
74
|
/** A room you're in, in Jump back in. Click opens it at the first unread. */
|
|
73
75
|
export declare const LobbyRoomRow: <T extends React.ElementType<any> = "button">(props: import("..").AsOutProps<T, LobbyRoomRowProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
package/dist/index.js
CHANGED
|
@@ -19289,25 +19289,34 @@ const LobbyRoomRow = as(
|
|
|
19289
19289
|
time,
|
|
19290
19290
|
unread = 0,
|
|
19291
19291
|
highlight,
|
|
19292
|
+
mentionCount,
|
|
19292
19293
|
className,
|
|
19293
19294
|
...props
|
|
19294
19295
|
}, ref) => /* @__PURE__ */ jsxs(
|
|
19295
19296
|
Component,
|
|
19296
19297
|
{
|
|
19297
19298
|
type: Component === "button" ? "button" : void 0,
|
|
19298
|
-
"data-unread": unread > 0 || void 0,
|
|
19299
|
+
"data-unread": unread > 0 || (mentionCount ?? 0) > 0 || void 0,
|
|
19299
19300
|
className: classNames(RoomRow, className),
|
|
19300
19301
|
...props,
|
|
19301
19302
|
ref,
|
|
19302
19303
|
children: [
|
|
19303
19304
|
/* @__PURE__ */ jsx("span", { className: RoomMark["36"], children: mark ?? /* @__PURE__ */ jsx(Icon$2, { size: "100", src: Icons.Hash, "aria-hidden": true }) }),
|
|
19304
19305
|
/* @__PURE__ */ jsxs("span", { className: RoomRowText, children: [
|
|
19305
|
-
/* @__PURE__ */ jsx(
|
|
19306
|
+
/* @__PURE__ */ jsx(
|
|
19307
|
+
Text$1,
|
|
19308
|
+
{
|
|
19309
|
+
as: "span",
|
|
19310
|
+
size: unread > 0 || (mentionCount ?? 0) > 0 ? "H6" : "T300",
|
|
19311
|
+
className: Name,
|
|
19312
|
+
children: name
|
|
19313
|
+
}
|
|
19314
|
+
),
|
|
19306
19315
|
lastMessage && /* @__PURE__ */ jsx(Text$1, { as: "span", size: "T200", className: LastMessage, children: lastMessage })
|
|
19307
19316
|
] }),
|
|
19308
19317
|
/* @__PURE__ */ jsxs("span", { className: RoomRowMeta, children: [
|
|
19309
19318
|
time && /* @__PURE__ */ jsx(Text$1, { as: "span", size: "C400", className: Upright, children: time }),
|
|
19310
|
-
unread > 0 && /* @__PURE__ */ jsx(UnreadBadge, { count: unread, highlight })
|
|
19319
|
+
mentionCount === void 0 ? unread > 0 && /* @__PURE__ */ jsx(UnreadBadge, { count: unread, highlight }) : mentionCount > 0 && /* @__PURE__ */ jsx(UnreadBadge, { count: 0, mentionCount })
|
|
19311
19320
|
] })
|
|
19312
19321
|
]
|
|
19313
19322
|
}
|