@blocklet/discuss-kit-ux 1.6.238 → 1.6.239
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.
|
@@ -22,12 +22,14 @@ interface CommentNotificationMessage extends INotificationMessage {
|
|
|
22
22
|
type: 'comment';
|
|
23
23
|
comment: Pick<Post, 'id' | 'excerpt'>;
|
|
24
24
|
post: Pick<Post, 'id' | 'title' | 'excerpt' | 'cover'>;
|
|
25
|
+
cc?: boolean;
|
|
25
26
|
}
|
|
26
27
|
interface ReplyNotificationMessage extends INotificationMessage {
|
|
27
28
|
type: 'reply';
|
|
28
29
|
reply: Pick<Post, 'id' | 'excerpt'>;
|
|
29
30
|
comment: Pick<Post, 'id' | 'excerpt'>;
|
|
30
31
|
post: Pick<Post, 'id' | 'title' | 'excerpt' | 'cover'>;
|
|
32
|
+
cc?: boolean;
|
|
31
33
|
}
|
|
32
34
|
interface MentionInCommentNotificationMessage extends INotificationMessage {
|
|
33
35
|
type: 'mentionInComment';
|
|
@@ -4,7 +4,7 @@ import { OnContentChangePlugin } from "@blocklet/editor/lib/ext/OnContentChangeP
|
|
|
4
4
|
import { CtrlsShortcutPlugin } from "@blocklet/editor/lib/ext/ShortcutPlugin";
|
|
5
5
|
import { SafeAreaPlugin } from "@blocklet/editor/lib/ext/SafeAreaPlugin";
|
|
6
6
|
import { lazy } from "react";
|
|
7
|
-
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-
|
|
7
|
+
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-F3ym4Tb_.mjs";
|
|
8
8
|
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -1170,7 +1170,8 @@ function ProfileCard({ user, click, ...rest }) {
|
|
|
1170
1170
|
size: 14,
|
|
1171
1171
|
did: user.did
|
|
1172
1172
|
}
|
|
1173
|
-
)
|
|
1173
|
+
),
|
|
1174
|
+
/* @__PURE__ */ jsx(Box$1, { sx: { mt: 1 }, children: /* @__PURE__ */ jsx(Badge, { passports: (user == null ? void 0 : user.passports) || [], pointInfo: (user == null ? void 0 : user.pointInfo) || {}, did: user == null ? void 0 : user.did }) })
|
|
1174
1175
|
] })
|
|
1175
1176
|
] }),
|
|
1176
1177
|
chatUrl && ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) && ((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.did) !== user.did && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -1263,6 +1264,7 @@ function AuthorInfo({
|
|
|
1263
1264
|
open,
|
|
1264
1265
|
onClose: () => setOpen(false),
|
|
1265
1266
|
onOpen: () => setOpen(true),
|
|
1267
|
+
PopperProps: { disablePortal: false },
|
|
1266
1268
|
title: /* @__PURE__ */ jsx(ProfileCard, { user, click }),
|
|
1267
1269
|
children: /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", cursor: "pointer", width: avatarSize, height: avatarSize }, onClick: click, children: /* @__PURE__ */ jsx(
|
|
1268
1270
|
Avatar,
|
|
@@ -1307,7 +1309,7 @@ function AuthorInfo({
|
|
|
1307
1309
|
);
|
|
1308
1310
|
return /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize }, ...rest, children: [
|
|
1309
1311
|
renderAvatar(),
|
|
1310
|
-
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
|
|
1312
|
+
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column", flex: 1, overflow: "hidden" }, children: [
|
|
1311
1313
|
/* @__PURE__ */ jsxs(
|
|
1312
1314
|
Box$1,
|
|
1313
1315
|
{
|
|
@@ -3920,17 +3922,7 @@ function ChatList({ inWallet, ...rest }) {
|
|
|
3920
3922
|
);
|
|
3921
3923
|
if (chat.type === "dm") {
|
|
3922
3924
|
const oppositeUser = getOppositeUser(chat);
|
|
3923
|
-
return /* @__PURE__ */ jsx(
|
|
3924
|
-
AuthorInfo,
|
|
3925
|
-
{
|
|
3926
|
-
user: oppositeUser,
|
|
3927
|
-
showProfileCard: false,
|
|
3928
|
-
showBadge: false,
|
|
3929
|
-
showDID: false,
|
|
3930
|
-
linkToProfile: !inWallet,
|
|
3931
|
-
children: latestMessageTextContent
|
|
3932
|
-
}
|
|
3933
|
-
);
|
|
3925
|
+
return /* @__PURE__ */ jsx(AuthorInfo, { user: oppositeUser, showProfileCard: true, showBadge: false, showDID: false, linkToProfile: !inWallet, children: latestMessageTextContent });
|
|
3934
3926
|
}
|
|
3935
3927
|
if (chat.type === "channel") {
|
|
3936
3928
|
return /* @__PURE__ */ jsx(ChannelGroup, { chat, children: latestMessageTextContent });
|
|
@@ -4160,7 +4152,7 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4160
4152
|
return null;
|
|
4161
4153
|
};
|
|
4162
4154
|
const render = () => {
|
|
4163
|
-
var _a2, _b2, _c, _d
|
|
4155
|
+
var _a2, _b2, _c, _d;
|
|
4164
4156
|
const baseCardSx = {
|
|
4165
4157
|
py: 1.5,
|
|
4166
4158
|
px: 2,
|
|
@@ -4226,13 +4218,13 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4226
4218
|
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4227
4219
|
/* @__PURE__ */ jsx(Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4228
4220
|
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4229
|
-
/* @__PURE__ */ jsx("span", { children: (
|
|
4221
|
+
/* @__PURE__ */ jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.commentedPost") : t("chat.commentedYourPost") })
|
|
4230
4222
|
] }),
|
|
4231
4223
|
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4232
4224
|
]
|
|
4233
4225
|
}
|
|
4234
4226
|
),
|
|
4235
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (
|
|
4227
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_a2 = message == null ? void 0 : message.comment) == null ? void 0 : _a2.excerpt }),
|
|
4236
4228
|
renderQuote(message.post)
|
|
4237
4229
|
]
|
|
4238
4230
|
}
|
|
@@ -4260,7 +4252,7 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4260
4252
|
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4261
4253
|
/* @__PURE__ */ jsx(Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4262
4254
|
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4263
|
-
/* @__PURE__ */ jsx("span", { children: (message == null ? void 0 : message.
|
|
4255
|
+
/* @__PURE__ */ jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.replyComment") : t("chat.replyYourComment") })
|
|
4264
4256
|
] }),
|
|
4265
4257
|
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4266
4258
|
]
|
|
@@ -4303,7 +4295,7 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4303
4295
|
]
|
|
4304
4296
|
}
|
|
4305
4297
|
),
|
|
4306
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (
|
|
4298
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_d = (_b2 = message == null ? void 0 : message.comment) == null ? void 0 : _b2.excerpt) == null ? void 0 : _d.replace((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.fullName, "") }),
|
|
4307
4299
|
renderQuote(message.post)
|
|
4308
4300
|
]
|
|
4309
4301
|
}
|
|
@@ -5537,7 +5529,7 @@ function Pagination({
|
|
|
5537
5529
|
}
|
|
5538
5530
|
);
|
|
5539
5531
|
}
|
|
5540
|
-
const Editor = lazy(() => import("./editor-
|
|
5532
|
+
const Editor = lazy(() => import("./editor-9b3ZIu78.mjs"));
|
|
5541
5533
|
function LazyEditor(props) {
|
|
5542
5534
|
const fallback = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
5543
5535
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
|
@@ -5715,13 +5707,13 @@ const en = {
|
|
|
5715
5707
|
channelDescription: "Channel Description",
|
|
5716
5708
|
channelName: "Channel Name",
|
|
5717
5709
|
deleteChannel: "Delete Channel",
|
|
5718
|
-
commentedYourPost: "commented your post",
|
|
5719
|
-
commentedPost: "commented post",
|
|
5710
|
+
commentedYourPost: "commented on your post",
|
|
5711
|
+
commentedPost: "commented on a post",
|
|
5720
5712
|
newPost: "create a new post",
|
|
5721
5713
|
mentionInComment: "mentioned you in a comment",
|
|
5722
5714
|
mentionInPost: "mentioned you in a post",
|
|
5723
|
-
replyYourComment: "replied your comment",
|
|
5724
|
-
replyComment: "replied comment",
|
|
5715
|
+
replyYourComment: "replied to your comment",
|
|
5716
|
+
replyComment: "replied to a comment",
|
|
5725
5717
|
deleteChannelTitle: "Delete this channel?",
|
|
5726
5718
|
deleteChannelDesc: "If you delete this channel, all messages in the channel will be deleted immediately.",
|
|
5727
5719
|
leaveChannel: "Leave channel",
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@blocklet/labels";
|
|
2
|
-
import { Q, m, U, A, k, ac, B, E, J, H, K, ao, X, W, _, Y, Z, a0, v, C, w, x, z, a4, a5, ag, a7, N, O, ab, D, af, ae, F, G, b, j, ad, M, P, an, q, o, R, S, a8, ap, n, a1, a3, ah, ak, aj, al, aq, L, ar, l, p, r, h, t, f, a9, T, c, $, y, a6, aa, u, am, d, as, a2, ai, e } from "./index-
|
|
2
|
+
import { Q, m, U, A, k, ac, B, E, J, H, K, ao, X, W, _, Y, Z, a0, v, C, w, x, z, a4, a5, ag, a7, N, O, ab, D, af, ae, F, G, b, j, ad, M, P, an, q, o, R, S, a8, ap, n, a1, a3, ah, ak, aj, al, aq, L, ar, l, p, r, h, t, f, a9, T, c, $, y, a6, aa, u, am, d, as, a2, ai, e } from "./index-F3ym4Tb_.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -1102,7 +1102,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1102
1102
|
size: 14,
|
|
1103
1103
|
did: user.did
|
|
1104
1104
|
}
|
|
1105
|
-
)
|
|
1105
|
+
),
|
|
1106
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { mt: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { passports: (user == null ? void 0 : user.passports) || [], pointInfo: (user == null ? void 0 : user.pointInfo) || {}, did: user == null ? void 0 : user.did }) })
|
|
1106
1107
|
] })
|
|
1107
1108
|
] }),
|
|
1108
1109
|
chatUrl && ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) && ((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.did) !== user.did && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1195,6 +1196,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1195
1196
|
open,
|
|
1196
1197
|
onClose: () => setOpen(false),
|
|
1197
1198
|
onOpen: () => setOpen(true),
|
|
1199
|
+
PopperProps: { disablePortal: false },
|
|
1198
1200
|
title: /* @__PURE__ */ jsxRuntime.jsx(ProfileCard, { user, click }),
|
|
1199
1201
|
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { display: "flex", cursor: "pointer", width: avatarSize, height: avatarSize }, onClick: click, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1200
1202
|
Avatar,
|
|
@@ -1239,7 +1241,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1239
1241
|
);
|
|
1240
1242
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize }, ...rest, children: [
|
|
1241
1243
|
renderAvatar(),
|
|
1242
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
|
|
1244
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1, overflow: "hidden" }, children: [
|
|
1243
1245
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1244
1246
|
Box,
|
|
1245
1247
|
{
|
|
@@ -3852,17 +3854,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3852
3854
|
);
|
|
3853
3855
|
if (chat.type === "dm") {
|
|
3854
3856
|
const oppositeUser = getOppositeUser(chat);
|
|
3855
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3856
|
-
AuthorInfo,
|
|
3857
|
-
{
|
|
3858
|
-
user: oppositeUser,
|
|
3859
|
-
showProfileCard: false,
|
|
3860
|
-
showBadge: false,
|
|
3861
|
-
showDID: false,
|
|
3862
|
-
linkToProfile: !inWallet,
|
|
3863
|
-
children: latestMessageTextContent
|
|
3864
|
-
}
|
|
3865
|
-
);
|
|
3857
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AuthorInfo, { user: oppositeUser, showProfileCard: true, showBadge: false, showDID: false, linkToProfile: !inWallet, children: latestMessageTextContent });
|
|
3866
3858
|
}
|
|
3867
3859
|
if (chat.type === "channel") {
|
|
3868
3860
|
return /* @__PURE__ */ jsxRuntime.jsx(ChannelGroup, { chat, children: latestMessageTextContent });
|
|
@@ -4092,7 +4084,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4092
4084
|
return null;
|
|
4093
4085
|
};
|
|
4094
4086
|
const render = () => {
|
|
4095
|
-
var _a2, _b2, _c, _d
|
|
4087
|
+
var _a2, _b2, _c, _d;
|
|
4096
4088
|
const baseCardSx = {
|
|
4097
4089
|
py: 1.5,
|
|
4098
4090
|
px: 2,
|
|
@@ -4158,13 +4150,13 @@ var __publicField = (obj, key, value) => {
|
|
|
4158
4150
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4159
4151
|
/* @__PURE__ */ jsxRuntime.jsx(react$1.Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4160
4152
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4161
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (
|
|
4153
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.commentedPost") : t("chat.commentedYourPost") })
|
|
4162
4154
|
] }),
|
|
4163
4155
|
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4164
4156
|
]
|
|
4165
4157
|
}
|
|
4166
4158
|
),
|
|
4167
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (
|
|
4159
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_a2 = message == null ? void 0 : message.comment) == null ? void 0 : _a2.excerpt }),
|
|
4168
4160
|
renderQuote(message.post)
|
|
4169
4161
|
]
|
|
4170
4162
|
}
|
|
@@ -4192,7 +4184,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4192
4184
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4193
4185
|
/* @__PURE__ */ jsxRuntime.jsx(react$1.Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4194
4186
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4195
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (message == null ? void 0 : message.
|
|
4187
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.replyComment") : t("chat.replyYourComment") })
|
|
4196
4188
|
] }),
|
|
4197
4189
|
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4198
4190
|
]
|
|
@@ -4235,7 +4227,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4235
4227
|
]
|
|
4236
4228
|
}
|
|
4237
4229
|
),
|
|
4238
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (
|
|
4230
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_d = (_b2 = message == null ? void 0 : message.comment) == null ? void 0 : _b2.excerpt) == null ? void 0 : _d.replace((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.fullName, "") }),
|
|
4239
4231
|
renderQuote(message.post)
|
|
4240
4232
|
]
|
|
4241
4233
|
}
|
|
@@ -5647,13 +5639,13 @@ var __publicField = (obj, key, value) => {
|
|
|
5647
5639
|
channelDescription: "Channel Description",
|
|
5648
5640
|
channelName: "Channel Name",
|
|
5649
5641
|
deleteChannel: "Delete Channel",
|
|
5650
|
-
commentedYourPost: "commented your post",
|
|
5651
|
-
commentedPost: "commented post",
|
|
5642
|
+
commentedYourPost: "commented on your post",
|
|
5643
|
+
commentedPost: "commented on a post",
|
|
5652
5644
|
newPost: "create a new post",
|
|
5653
5645
|
mentionInComment: "mentioned you in a comment",
|
|
5654
5646
|
mentionInPost: "mentioned you in a post",
|
|
5655
|
-
replyYourComment: "replied your comment",
|
|
5656
|
-
replyComment: "replied comment",
|
|
5647
|
+
replyYourComment: "replied to your comment",
|
|
5648
|
+
replyComment: "replied to a comment",
|
|
5657
5649
|
deleteChannelTitle: "Delete this channel?",
|
|
5658
5650
|
deleteChannelDesc: "If you delete this channel, all messages in the channel will be deleted immediately.",
|
|
5659
5651
|
leaveChannel: "Leave channel",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-ux",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.239",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@arcblock/bridge": "^2.9.77",
|
|
32
32
|
"@arcblock/ws": "^1.18.116",
|
|
33
|
-
"@blocklet/editor": "1.6.
|
|
34
|
-
"@blocklet/labels": "1.6.
|
|
33
|
+
"@blocklet/editor": "1.6.239",
|
|
34
|
+
"@blocklet/labels": "1.6.239",
|
|
35
35
|
"@blocklet/uploader": "^0.1.2",
|
|
36
36
|
"@emotion/css": "^11.10.5",
|
|
37
37
|
"@emotion/react": "^11.10.5",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"resolutions": {
|
|
96
96
|
"react": "^18.2.0"
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "14c8c180f957d6b4574cefaaf60202b6afeb1a53"
|
|
99
99
|
}
|