@blocklet/discuss-kit-ux 1.6.171 → 1.6.172

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.
@@ -50,7 +50,11 @@ interface TaskNotificationMessage extends INotificationMessage {
50
50
  subtype: 'open' | 'close' | 'assign' | 'unassign';
51
51
  post: Pick<Post, 'id' | 'title' | 'excerpt' | 'cover'>;
52
52
  }
53
- export type NotificationMessage = CommentNotificationMessage | ReplyNotificationMessage | MentionInCommentNotificationMessage | MentionInPostNotificationMessage | PointUpNotificationMessage | TaskNotificationMessage;
53
+ interface PostCreateNotificationMessage extends INotificationMessage {
54
+ type: 'post_create';
55
+ post: Pick<Post, 'id' | 'title' | 'excerpt'>;
56
+ }
57
+ export type NotificationMessage = CommentNotificationMessage | ReplyNotificationMessage | MentionInCommentNotificationMessage | MentionInPostNotificationMessage | PointUpNotificationMessage | TaskNotificationMessage | PostCreateNotificationMessage;
54
58
  interface CommonChat {
55
59
  id: string;
56
60
  participants: User[];
@@ -39,5 +39,8 @@ declare const _default: {
39
39
  timeout: string;
40
40
  error: string;
41
41
  };
42
+ message: {
43
+ newPost: string;
44
+ };
42
45
  };
43
46
  export default _default;
@@ -41,6 +41,9 @@ export declare const translations: {
41
41
  timeout: string;
42
42
  error: string;
43
43
  };
44
+ message: {
45
+ newPost: string;
46
+ };
44
47
  };
45
48
  en: {
46
49
  cancel: string;
@@ -83,5 +86,8 @@ export declare const translations: {
83
86
  timeout: string;
84
87
  error: string;
85
88
  };
89
+ message: {
90
+ newPost: string;
91
+ };
86
92
  };
87
93
  };
@@ -40,5 +40,8 @@ declare const _default: {
40
40
  timeout: string;
41
41
  error: string;
42
42
  };
43
+ message: {
44
+ newPost: string;
45
+ };
43
46
  };
44
47
  export default _default;
@@ -1,6 +1,7 @@
1
1
  import type { User } from '../../types';
2
2
  interface ProfileCardProps {
3
3
  user: User;
4
+ click: () => void;
4
5
  }
5
- export default function ProfileCard({ user, ...rest }: ProfileCardProps): import("react/jsx-runtime").JSX.Element;
6
+ export default function ProfileCard({ user, click, ...rest }: ProfileCardProps): import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -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-L7b9RORw.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-XTjHijc6.mjs";
8
8
  import "@blocklet/labels";
9
9
  import "@mui/material/styles";
10
10
  import "@mui/material/Box";
@@ -30,7 +30,7 @@ import DidAvatar from "@arcblock/did-connect/lib/Avatar";
30
30
  import useMediaQuery$1 from "@mui/material/useMediaQuery";
31
31
  import DID from "@arcblock/ux/lib/DID";
32
32
  import Tooltip, { tooltipClasses } from "@mui/material/Tooltip";
33
- import { useNavigate, Link, useLocation, useSearchParams, unstable_useBlocker, useParams } from "react-router-dom";
33
+ import { Link, useNavigate, useLocation, useSearchParams, unstable_useBlocker, useParams } from "react-router-dom";
34
34
  import UxRelativeTime from "@arcblock/ux/lib/RelativeTime";
35
35
  import Chip from "@mui/material/Chip";
36
36
  import Stack from "@mui/material/Stack";
@@ -912,10 +912,9 @@ const useResponsiveValue = (values2) => {
912
912
  const r = useResponsive();
913
913
  return r(values2);
914
914
  };
915
- function ProfileCard({ user, ...rest }) {
915
+ function ProfileCard({ user, click, ...rest }) {
916
916
  var _a2, _b2;
917
917
  const { session } = useSessionContext();
918
- const navigate = useNavigate();
919
918
  return /* @__PURE__ */ jsxs(
920
919
  Box,
921
920
  {
@@ -932,60 +931,51 @@ function ProfileCard({ user, ...rest }) {
932
931
  },
933
932
  ...rest,
934
933
  children: [
935
- /* @__PURE__ */ jsxs(
936
- Box,
937
- {
938
- sx: { display: "flex", alignItems: "center", gap: 2, cursor: "pointer" },
939
- onClick: () => {
940
- navigate(`/profile/${user == null ? void 0 : user.did}`);
941
- },
942
- children: [
943
- /* @__PURE__ */ jsx(Avatar, { did: user.did, src: user.avatar, size: 44, shape: "circle", variant: "circle" }),
944
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
945
- /* @__PURE__ */ jsxs(
946
- Box,
947
- {
948
- component: "span",
949
- sx: {
950
- display: "flex",
951
- justifyContent: "space-between",
952
- alignItems: "center",
953
- lineHeight: 1.3
954
- },
955
- children: [
956
- /* @__PURE__ */ jsx(Box, { sx: { fontWeight: "bold" }, children: user.fullName }),
957
- user.role && /* @__PURE__ */ jsx(
958
- Box,
959
- {
960
- sx: {
961
- px: 1.25,
962
- border: 1,
963
- borderColor: green[600],
964
- color: green[600],
965
- fontSize: 12,
966
- fontWeight: "bold",
967
- lineHeight: 1.5,
968
- borderRadius: "100vh",
969
- textTransform: "capitalize"
970
- },
971
- children: user.role
972
- }
973
- )
974
- ]
975
- }
976
- ),
977
- /* @__PURE__ */ jsx(
978
- DID,
979
- {
980
- style: { marginTop: 4, lineHeight: 1, height: 14, maxWidth: 250, color: "inherit !important" },
981
- size: 14,
982
- did: user.did
983
- }
984
- )
985
- ] })
986
- ]
987
- }
988
- ),
934
+ /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 2, cursor: "pointer" }, onClick: click, children: [
935
+ /* @__PURE__ */ jsx(Avatar, { did: user.did, src: user.avatar, size: 44, shape: "circle", variant: "circle" }),
936
+ /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
937
+ /* @__PURE__ */ jsxs(
938
+ Box,
939
+ {
940
+ component: "span",
941
+ sx: {
942
+ display: "flex",
943
+ justifyContent: "space-between",
944
+ alignItems: "center",
945
+ lineHeight: 1.3
946
+ },
947
+ children: [
948
+ /* @__PURE__ */ jsx(Box, { sx: { fontWeight: "bold" }, children: user.fullName }),
949
+ user.role && /* @__PURE__ */ jsx(
950
+ Box,
951
+ {
952
+ sx: {
953
+ px: 1.25,
954
+ border: 1,
955
+ borderColor: green[600],
956
+ color: green[600],
957
+ fontSize: 12,
958
+ fontWeight: "bold",
959
+ lineHeight: 1.5,
960
+ borderRadius: "100vh",
961
+ textTransform: "capitalize"
962
+ },
963
+ children: user.role
964
+ }
965
+ )
966
+ ]
967
+ }
968
+ ),
969
+ /* @__PURE__ */ jsx(
970
+ DID,
971
+ {
972
+ style: { marginTop: 4, lineHeight: 1, height: 14, maxWidth: 250, color: "inherit !important" },
973
+ size: 14,
974
+ did: user.did
975
+ }
976
+ )
977
+ ] })
978
+ ] }),
989
979
  ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.did) && ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) !== user.did && /* @__PURE__ */ jsxs(Fragment, { children: [
990
980
  /* @__PURE__ */ jsx(Box, { sx: { my: 2, borderTop: "1px solid #eee" } }),
991
981
  /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
@@ -1027,6 +1017,7 @@ function AuthorInfo({
1027
1017
  const theme = useTheme();
1028
1018
  const downMd = useMediaQuery$1(theme.breakpoints.down("md"));
1029
1019
  const navigate = useNavigate();
1020
+ const [open, setOpen] = useState(false);
1030
1021
  const sm = size === "sm";
1031
1022
  let fontSize = sm ? 12 : 14;
1032
1023
  let avatarSize = profileUse ? 24 : sm ? 32 : 40;
@@ -1044,16 +1035,22 @@ function AuthorInfo({
1044
1035
  createdAt = typeof createdAt === "string" ? new Date(createdAt) : createdAt;
1045
1036
  return /* @__PURE__ */ jsx(RelativeTime, { value: createdAt });
1046
1037
  };
1038
+ const click = () => {
1039
+ setOpen(false);
1040
+ setTimeout(() => {
1041
+ navigate(`/profile/${user == null ? void 0 : user.did}`);
1042
+ }, 100);
1043
+ };
1047
1044
  const renderAvatar = () => {
1048
1045
  if (showProfileCard) {
1049
- return /* @__PURE__ */ jsx(HtmlTooltip$1, { title: /* @__PURE__ */ jsx(ProfileCard, { user }), children: /* @__PURE__ */ jsx(
1050
- Box,
1046
+ return /* @__PURE__ */ jsx(
1047
+ HtmlTooltip$1,
1051
1048
  {
1052
- sx: { display: "flex", cursor: "pointer" },
1053
- onClick: () => {
1054
- navigate(`/profile/${user == null ? void 0 : user.did}`);
1055
- },
1056
- children: /* @__PURE__ */ jsx(
1049
+ open,
1050
+ onClose: () => setOpen(false),
1051
+ onOpen: () => setOpen(true),
1052
+ title: /* @__PURE__ */ jsx(ProfileCard, { user, click }),
1053
+ children: /* @__PURE__ */ jsx(Box, { sx: { display: "flex", cursor: "pointer" }, onClick: click, children: /* @__PURE__ */ jsx(
1057
1054
  Avatar,
1058
1055
  {
1059
1056
  did: user == null ? void 0 : user.did,
@@ -1065,9 +1062,9 @@ function AuthorInfo({
1065
1062
  width: avatarSize
1066
1063
  }
1067
1064
  }
1068
- )
1065
+ ) })
1069
1066
  }
1070
- ) });
1067
+ );
1071
1068
  }
1072
1069
  return /* @__PURE__ */ jsx(
1073
1070
  Avatar,
@@ -3698,6 +3695,7 @@ const getUrlHost = (url) => {
3698
3695
  };
3699
3696
  function NotificationMessage({ chat, message, prevMessage, ...rest }) {
3700
3697
  const { session } = useSessionContext();
3698
+ const { t } = useLocaleContext();
3701
3699
  const renderQuote = ({ title, excerpt, cover }) => {
3702
3700
  if ("post" in message) {
3703
3701
  return /* @__PURE__ */ jsxs(Box, { sx: { mt: 1.5, pl: 1, borderLeft: "4px solid #ddd", color: 14 }, children: [
@@ -3738,7 +3736,14 @@ function NotificationMessage({ chat, message, prevMessage, ...rest }) {
3738
3736
  return null;
3739
3737
  };
3740
3738
  const render = () => {
3741
- var _a2, _b2, _c, _d;
3739
+ var _a2, _b2, _c;
3740
+ if (message.type === "post_create") {
3741
+ return /* @__PURE__ */ jsxs(Box, { children: [
3742
+ /* @__PURE__ */ jsx(Box, { component: "span", sx: { fontWeight: "bold" }, children: message.sourceUser.fullName }),
3743
+ /* @__PURE__ */ jsx("span", { children: t("message.newPost") }),
3744
+ renderQuote(message.post)
3745
+ ] });
3746
+ }
3742
3747
  if (message.type === "comment") {
3743
3748
  return /* @__PURE__ */ jsxs(Box, { children: [
3744
3749
  /* @__PURE__ */ jsxs(Box, { children: [
@@ -3753,7 +3758,7 @@ function NotificationMessage({ chat, message, prevMessage, ...rest }) {
3753
3758
  return /* @__PURE__ */ jsxs(Box, { children: [
3754
3759
  /* @__PURE__ */ jsxs(Box, { children: [
3755
3760
  /* @__PURE__ */ jsx(Box, { component: "span", sx: { color: "grey.600", fontWeight: "bold" }, children: message.sourceUser.fullName }),
3756
- /* @__PURE__ */ jsx("span", { children: ((_c = message == null ? void 0 : message.sourceUser) == null ? void 0 : _c.did) === ((_d = session == null ? void 0 : session.user) == null ? void 0 : _d.did) ? " replied your comment:" : " replied comment:" })
3761
+ /* @__PURE__ */ jsx("span", { children: (message == null ? void 0 : message.recipient) === ((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.did) ? " replied your comment:" : " replied comment:" })
3757
3762
  ] }),
3758
3763
  /* @__PURE__ */ jsx(Typography, { variant: "body1", children: message.reply.excerpt }),
3759
3764
  renderQuote({ title: message.post.title, excerpt: message.comment.excerpt })
@@ -4578,7 +4583,7 @@ function Pagination({
4578
4583
  }
4579
4584
  );
4580
4585
  }
4581
- const Editor = lazy(() => import("./editor-GXcwjd5u.mjs"));
4586
+ const Editor = lazy(() => import("./editor-8X1A2syI.mjs"));
4582
4587
  function LazyEditor(props) {
4583
4588
  const fallback = /* @__PURE__ */ jsxs(Fragment, { children: [
4584
4589
  /* @__PURE__ */ jsx(Skeleton, {}),
@@ -4726,6 +4731,9 @@ const en = {
4726
4731
  staleTip: "You may need to save your changes manually",
4727
4732
  timeout: "Request timeout: please retry the request later",
4728
4733
  error: "Oops, your request failed. Please try again"
4734
+ },
4735
+ message: {
4736
+ newPost: " create a new post:"
4729
4737
  }
4730
4738
  };
4731
4739
  const zh = {
@@ -4769,6 +4777,9 @@ const zh = {
4769
4777
  staleTip: "您可能需要手动备份你的更改",
4770
4778
  timeout: "请求超时: 请稍后重试",
4771
4779
  error: "哎呀,您的请求失败了,请稍后重试"
4780
+ },
4781
+ message: {
4782
+ newPost: " 创建了一个新的帖子:"
4772
4783
  }
4773
4784
  };
4774
4785
  const translations = { zh, en };
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "@blocklet/labels";
2
- import { N, j, Q, A, h, a8, B, y, F, z, H, ak, U, T, W, Y, o, C, q, v, x, a0, a1, ac, a3, K, L, D, ab, aa, E, G, b, f, a9, M, P, aj, n, m, a7, R, S, a4, k, Z, $, ad, ag, af, ah, al, J, am, l, p, r, e, t, a5, O, c, X, w, a2, a6, u, ai, an, _, ae, d } from "./index-L7b9RORw.mjs";
2
+ import { N, j, Q, A, h, a8, B, y, F, z, H, ak, U, T, W, Y, o, C, q, v, x, a0, a1, ac, a3, K, L, D, ab, aa, E, G, b, f, a9, M, P, aj, n, m, a7, R, S, a4, k, Z, $, ad, ag, af, ah, al, J, am, l, p, r, e, t, a5, O, c, X, w, a2, a6, u, ai, an, _, ae, d } from "./index-XTjHijc6.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -849,10 +849,9 @@ var __publicField = (obj, key, value) => {
849
849
  const r = useResponsive();
850
850
  return r(values2);
851
851
  };
852
- function ProfileCard({ user, ...rest }) {
852
+ function ProfileCard({ user, click, ...rest }) {
853
853
  var _a2, _b2;
854
854
  const { session } = useSessionContext();
855
- const navigate = reactRouterDom.useNavigate();
856
855
  return /* @__PURE__ */ jsxRuntime.jsxs(
857
856
  Box,
858
857
  {
@@ -869,60 +868,51 @@ var __publicField = (obj, key, value) => {
869
868
  },
870
869
  ...rest,
871
870
  children: [
872
- /* @__PURE__ */ jsxRuntime.jsxs(
873
- Box,
874
- {
875
- sx: { display: "flex", alignItems: "center", gap: 2, cursor: "pointer" },
876
- onClick: () => {
877
- navigate(`/profile/${user == null ? void 0 : user.did}`);
878
- },
879
- children: [
880
- /* @__PURE__ */ jsxRuntime.jsx(Avatar, { did: user.did, src: user.avatar, size: 44, shape: "circle", variant: "circle" }),
881
- /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
882
- /* @__PURE__ */ jsxRuntime.jsxs(
883
- Box,
884
- {
885
- component: "span",
886
- sx: {
887
- display: "flex",
888
- justifyContent: "space-between",
889
- alignItems: "center",
890
- lineHeight: 1.3
891
- },
892
- children: [
893
- /* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { fontWeight: "bold" }, children: user.fullName }),
894
- user.role && /* @__PURE__ */ jsxRuntime.jsx(
895
- Box,
896
- {
897
- sx: {
898
- px: 1.25,
899
- border: 1,
900
- borderColor: colors.green[600],
901
- color: colors.green[600],
902
- fontSize: 12,
903
- fontWeight: "bold",
904
- lineHeight: 1.5,
905
- borderRadius: "100vh",
906
- textTransform: "capitalize"
907
- },
908
- children: user.role
909
- }
910
- )
911
- ]
912
- }
913
- ),
914
- /* @__PURE__ */ jsxRuntime.jsx(
915
- DID,
916
- {
917
- style: { marginTop: 4, lineHeight: 1, height: 14, maxWidth: 250, color: "inherit !important" },
918
- size: 14,
919
- did: user.did
920
- }
921
- )
922
- ] })
923
- ]
924
- }
925
- ),
871
+ /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 2, cursor: "pointer" }, onClick: click, children: [
872
+ /* @__PURE__ */ jsxRuntime.jsx(Avatar, { did: user.did, src: user.avatar, size: 44, shape: "circle", variant: "circle" }),
873
+ /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
874
+ /* @__PURE__ */ jsxRuntime.jsxs(
875
+ Box,
876
+ {
877
+ component: "span",
878
+ sx: {
879
+ display: "flex",
880
+ justifyContent: "space-between",
881
+ alignItems: "center",
882
+ lineHeight: 1.3
883
+ },
884
+ children: [
885
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { fontWeight: "bold" }, children: user.fullName }),
886
+ user.role && /* @__PURE__ */ jsxRuntime.jsx(
887
+ Box,
888
+ {
889
+ sx: {
890
+ px: 1.25,
891
+ border: 1,
892
+ borderColor: colors.green[600],
893
+ color: colors.green[600],
894
+ fontSize: 12,
895
+ fontWeight: "bold",
896
+ lineHeight: 1.5,
897
+ borderRadius: "100vh",
898
+ textTransform: "capitalize"
899
+ },
900
+ children: user.role
901
+ }
902
+ )
903
+ ]
904
+ }
905
+ ),
906
+ /* @__PURE__ */ jsxRuntime.jsx(
907
+ DID,
908
+ {
909
+ style: { marginTop: 4, lineHeight: 1, height: 14, maxWidth: 250, color: "inherit !important" },
910
+ size: 14,
911
+ did: user.did
912
+ }
913
+ )
914
+ ] })
915
+ ] }),
926
916
  ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.did) && ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) !== user.did && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
927
917
  /* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { my: 2, borderTop: "1px solid #eee" } }),
928
918
  /* @__PURE__ */ jsxRuntime.jsx(Box, { children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -964,6 +954,7 @@ var __publicField = (obj, key, value) => {
964
954
  const theme = styles.useTheme();
965
955
  const downMd = useMediaQuery(theme.breakpoints.down("md"));
966
956
  const navigate = reactRouterDom.useNavigate();
957
+ const [open, setOpen] = react.useState(false);
967
958
  const sm = size === "sm";
968
959
  let fontSize = sm ? 12 : 14;
969
960
  let avatarSize = profileUse ? 24 : sm ? 32 : 40;
@@ -981,16 +972,22 @@ var __publicField = (obj, key, value) => {
981
972
  createdAt = typeof createdAt === "string" ? new Date(createdAt) : createdAt;
982
973
  return /* @__PURE__ */ jsxRuntime.jsx(RelativeTime, { value: createdAt });
983
974
  };
975
+ const click = () => {
976
+ setOpen(false);
977
+ setTimeout(() => {
978
+ navigate(`/profile/${user == null ? void 0 : user.did}`);
979
+ }, 100);
980
+ };
984
981
  const renderAvatar = () => {
985
982
  if (showProfileCard) {
986
- return /* @__PURE__ */ jsxRuntime.jsx(HtmlTooltip$1, { title: /* @__PURE__ */ jsxRuntime.jsx(ProfileCard, { user }), children: /* @__PURE__ */ jsxRuntime.jsx(
987
- Box,
983
+ return /* @__PURE__ */ jsxRuntime.jsx(
984
+ HtmlTooltip$1,
988
985
  {
989
- sx: { display: "flex", cursor: "pointer" },
990
- onClick: () => {
991
- navigate(`/profile/${user == null ? void 0 : user.did}`);
992
- },
993
- children: /* @__PURE__ */ jsxRuntime.jsx(
986
+ open,
987
+ onClose: () => setOpen(false),
988
+ onOpen: () => setOpen(true),
989
+ title: /* @__PURE__ */ jsxRuntime.jsx(ProfileCard, { user, click }),
990
+ children: /* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { display: "flex", cursor: "pointer" }, onClick: click, children: /* @__PURE__ */ jsxRuntime.jsx(
994
991
  Avatar,
995
992
  {
996
993
  did: user == null ? void 0 : user.did,
@@ -1002,9 +999,9 @@ var __publicField = (obj, key, value) => {
1002
999
  width: avatarSize
1003
1000
  }
1004
1001
  }
1005
- )
1002
+ ) })
1006
1003
  }
1007
- ) });
1004
+ );
1008
1005
  }
1009
1006
  return /* @__PURE__ */ jsxRuntime.jsx(
1010
1007
  Avatar,
@@ -3635,6 +3632,7 @@ var __publicField = (obj, key, value) => {
3635
3632
  };
3636
3633
  function NotificationMessage({ chat, message, prevMessage, ...rest }) {
3637
3634
  const { session } = useSessionContext();
3635
+ const { t } = context.useLocaleContext();
3638
3636
  const renderQuote = ({ title, excerpt, cover }) => {
3639
3637
  if ("post" in message) {
3640
3638
  return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { mt: 1.5, pl: 1, borderLeft: "4px solid #ddd", color: 14 }, children: [
@@ -3675,7 +3673,14 @@ var __publicField = (obj, key, value) => {
3675
3673
  return null;
3676
3674
  };
3677
3675
  const render = () => {
3678
- var _a2, _b2, _c, _d;
3676
+ var _a2, _b2, _c;
3677
+ if (message.type === "post_create") {
3678
+ return /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
3679
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { fontWeight: "bold" }, children: message.sourceUser.fullName }),
3680
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: t("message.newPost") }),
3681
+ renderQuote(message.post)
3682
+ ] });
3683
+ }
3679
3684
  if (message.type === "comment") {
3680
3685
  return /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
3681
3686
  /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
@@ -3690,7 +3695,7 @@ var __publicField = (obj, key, value) => {
3690
3695
  return /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
3691
3696
  /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
3692
3697
  /* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { color: "grey.600", fontWeight: "bold" }, children: message.sourceUser.fullName }),
3693
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: ((_c = message == null ? void 0 : message.sourceUser) == null ? void 0 : _c.did) === ((_d = session == null ? void 0 : session.user) == null ? void 0 : _d.did) ? " replied your comment:" : " replied comment:" })
3698
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: (message == null ? void 0 : message.recipient) === ((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.did) ? " replied your comment:" : " replied comment:" })
3694
3699
  ] }),
3695
3700
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", children: message.reply.excerpt }),
3696
3701
  renderQuote({ title: message.post.title, excerpt: message.comment.excerpt })
@@ -4663,6 +4668,9 @@ var __publicField = (obj, key, value) => {
4663
4668
  staleTip: "You may need to save your changes manually",
4664
4669
  timeout: "Request timeout: please retry the request later",
4665
4670
  error: "Oops, your request failed. Please try again"
4671
+ },
4672
+ message: {
4673
+ newPost: " create a new post:"
4666
4674
  }
4667
4675
  };
4668
4676
  const zh = {
@@ -4706,6 +4714,9 @@ var __publicField = (obj, key, value) => {
4706
4714
  staleTip: "您可能需要手动备份你的更改",
4707
4715
  timeout: "请求超时: 请稍后重试",
4708
4716
  error: "哎呀,您的请求失败了,请稍后重试"
4717
+ },
4718
+ message: {
4719
+ newPost: " 创建了一个新的帖子:"
4709
4720
  }
4710
4721
  };
4711
4722
  const translations = { zh, en };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "1.6.171",
3
+ "version": "1.6.172",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@arcblock/ws": "^1.18.112",
32
- "@blocklet/editor": "1.6.171",
33
- "@blocklet/labels": "1.6.171",
32
+ "@blocklet/editor": "1.6.172",
33
+ "@blocklet/labels": "1.6.172",
34
34
  "@blocklet/uploader": "^0.0.74",
35
35
  "@emotion/css": "^11.10.5",
36
36
  "@emotion/react": "^11.10.5",
@@ -94,5 +94,5 @@
94
94
  "resolutions": {
95
95
  "react": "^18.2.0"
96
96
  },
97
- "gitHead": "0bdf75fbab659352675e5295115ee697782908aa"
97
+ "gitHead": "201729156add15057b9350e2ed4f759b744ccb30"
98
98
  }