@blocklet/discuss-kit-ux 2.0.32 → 2.0.33
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/locale/en.d.ts +5 -0
- package/dist/components/locale/index.d.ts +10 -0
- package/dist/components/locale/zh.d.ts +5 -0
- package/dist/components/posts/comment-list/context.d.ts +1 -1
- package/dist/components/posts/post.d.ts +2 -1
- package/dist/{editor-CUgQ0SdF.mjs → editor-BeZPBdVQ.mjs} +1 -1
- package/dist/{index-DpeAMRFO.mjs → index-CyIoAprB.mjs} +25 -4
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +24 -3
- package/dist/preferences.d.ts +6 -0
- package/package.json +4 -4
|
@@ -79,6 +79,11 @@ export declare const translations: {
|
|
|
79
79
|
typeSomething: string;
|
|
80
80
|
send: string;
|
|
81
81
|
};
|
|
82
|
+
userActionLog: {
|
|
83
|
+
editedCapital: string;
|
|
84
|
+
times: string;
|
|
85
|
+
mostRecent: string;
|
|
86
|
+
};
|
|
82
87
|
};
|
|
83
88
|
en: {
|
|
84
89
|
cancel: string;
|
|
@@ -159,5 +164,10 @@ export declare const translations: {
|
|
|
159
164
|
typeSomething: string;
|
|
160
165
|
send: string;
|
|
161
166
|
};
|
|
167
|
+
userActionLog: {
|
|
168
|
+
editedCapital: string;
|
|
169
|
+
times: string;
|
|
170
|
+
mostRecent: string;
|
|
171
|
+
};
|
|
162
172
|
};
|
|
163
173
|
};
|
|
@@ -4,7 +4,7 @@ import { default as React } from 'react';
|
|
|
4
4
|
type Order = 'asc' | 'desc';
|
|
5
5
|
export type CommentsRender = (value: {
|
|
6
6
|
comments: Post[];
|
|
7
|
-
renderComment: (comment: Post) => React.ReactNode;
|
|
7
|
+
renderComment: (comment: Post, restProps: any) => React.ReactNode;
|
|
8
8
|
order: Order;
|
|
9
9
|
}) => React.ReactNode;
|
|
10
10
|
interface CommentsProviderProps {
|
|
@@ -13,6 +13,7 @@ export interface PostProps {
|
|
|
13
13
|
autoCollapse?: boolean;
|
|
14
14
|
showProfileCard?: boolean;
|
|
15
15
|
className?: string;
|
|
16
|
+
authorInfoAppend?: React.ReactNode;
|
|
16
17
|
}
|
|
17
18
|
interface PostContext {
|
|
18
19
|
isAdmin: boolean;
|
|
@@ -20,5 +21,5 @@ interface PostContext {
|
|
|
20
21
|
interactive: boolean;
|
|
21
22
|
post: Post;
|
|
22
23
|
}
|
|
23
|
-
export default function PostComponent({ post, render, renderExtraContent, customMenu, interactive, onContentUpdate, allowCopyLink, autoCollapse, showProfileCard, ...rest }: PostProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default function PostComponent({ post, render, renderExtraContent, customMenu, interactive, onContentUpdate, allowCopyLink, autoCollapse, showProfileCard, authorInfoAppend, ...rest }: PostProps): import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
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-
|
|
7
|
+
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-CyIoAprB.mjs";
|
|
8
8
|
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -1645,6 +1645,7 @@ function PostComponent({
|
|
|
1645
1645
|
allowCopyLink = false,
|
|
1646
1646
|
autoCollapse,
|
|
1647
1647
|
showProfileCard,
|
|
1648
|
+
authorInfoAppend,
|
|
1648
1649
|
...rest
|
|
1649
1650
|
}) {
|
|
1650
1651
|
var _a2;
|
|
@@ -1699,7 +1700,16 @@ function PostComponent({
|
|
|
1699
1700
|
return /* @__PURE__ */ jsxs(Root$1, { sx: { position: "relative", mt: 2, py: 1 }, ...rest, children: [
|
|
1700
1701
|
/* @__PURE__ */ jsxs(Box$1, { id: post.id, flex: "1", className: clsx({ "post-highlighted": isTargetPost && hasEnteredViewport }), children: [
|
|
1701
1702
|
/* @__PURE__ */ jsxs(Box$1, { display: "flex", justifyContent: "space-between", alignItems: "start", children: [
|
|
1702
|
-
/* @__PURE__ */ jsx(
|
|
1703
|
+
/* @__PURE__ */ jsx(
|
|
1704
|
+
AuthorInfo,
|
|
1705
|
+
{
|
|
1706
|
+
size: "sm",
|
|
1707
|
+
user: post.author,
|
|
1708
|
+
createdAt: renderTime(),
|
|
1709
|
+
showProfileCard,
|
|
1710
|
+
append: authorInfoAppend
|
|
1711
|
+
}
|
|
1712
|
+
),
|
|
1703
1713
|
/* @__PURE__ */ jsx(Menu, { items: menuItems, style: { position: "absolute", right: 0, top: 0 } })
|
|
1704
1714
|
] }),
|
|
1705
1715
|
/* @__PURE__ */ jsxs(Box$1, { sx: { ml: 5.5 }, children: [
|
|
@@ -2811,7 +2821,7 @@ function CommentList(props) {
|
|
|
2811
2821
|
if (highlighted) {
|
|
2812
2822
|
return /* @__PURE__ */ jsx(SegmentalList, { ...props });
|
|
2813
2823
|
}
|
|
2814
|
-
const renderComment = (comment) => /* @__PURE__ */ jsx(
|
|
2824
|
+
const renderComment = (comment, restProps) => /* @__PURE__ */ jsx(
|
|
2815
2825
|
Comment,
|
|
2816
2826
|
{
|
|
2817
2827
|
post: comment,
|
|
@@ -2824,7 +2834,8 @@ function CommentList(props) {
|
|
|
2824
2834
|
autoCollapse,
|
|
2825
2835
|
allowCopyLink,
|
|
2826
2836
|
showProfileCard,
|
|
2827
|
-
interactive
|
|
2837
|
+
interactive,
|
|
2838
|
+
...restProps
|
|
2828
2839
|
},
|
|
2829
2840
|
comment.id
|
|
2830
2841
|
);
|
|
@@ -4706,7 +4717,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
|
|
|
4706
4717
|
}
|
|
4707
4718
|
const tablerSend = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", "data-iconify": "tabler", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 14L21 3m0 0l-6.5 18a.55.55 0 0 1-1 0L10 14l-7-3.5a.55.55 0 0 1 0-1z" }) });
|
|
4708
4719
|
const tablerLetterCase = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", "data-iconify": "tabler", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 15.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0M3 19V8.5a3.5 3.5 0 0 1 7 0V19m-7-6h7m11-1v7" }) });
|
|
4709
|
-
const Editor = lazy(() => import("./editor-
|
|
4720
|
+
const Editor = lazy(() => import("./editor-BeZPBdVQ.mjs"));
|
|
4710
4721
|
function LazyEditor(props) {
|
|
4711
4722
|
const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
4712
4723
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
|
@@ -6155,6 +6166,11 @@ const en = {
|
|
|
6155
6166
|
notYetJoinedTheChannel: "Not yet joined the channel",
|
|
6156
6167
|
typeSomething: "Type here. Use Markdown, Drag or paste images",
|
|
6157
6168
|
send: "Send"
|
|
6169
|
+
},
|
|
6170
|
+
userActionLog: {
|
|
6171
|
+
editedCapital: "Edited",
|
|
6172
|
+
times: "times",
|
|
6173
|
+
mostRecent: "most recent"
|
|
6158
6174
|
}
|
|
6159
6175
|
};
|
|
6160
6176
|
const zh = {
|
|
@@ -6236,6 +6252,11 @@ const zh = {
|
|
|
6236
6252
|
notYetJoinedTheChannel: "暂未加入这个频道",
|
|
6237
6253
|
typeSomething: "在这里输入,适用 MarkDown,拽入或者黏贴图片",
|
|
6238
6254
|
send: "发送"
|
|
6255
|
+
},
|
|
6256
|
+
userActionLog: {
|
|
6257
|
+
editedCapital: "编辑",
|
|
6258
|
+
times: "次",
|
|
6259
|
+
mostRecent: "最近"
|
|
6239
6260
|
}
|
|
6240
6261
|
};
|
|
6241
6262
|
const translations = { zh, en };
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@blocklet/labels";
|
|
2
|
-
import { T, n, W, A, m, ad, B, F, K, J, L, ap, Y, X, $, Z, _, a1, w, C, x, y, E, a5, a6, ah, a8, O, Q, ac, D, ag, af, H, G, b, k, ae, M, P, ao, v, q, R, S, a9, aq, o, a2, a4, ai, al, ak, am, ar, N, as, l, f, p, r, j, t, h, aa, U, c, a0, z, a7, ab, u, an, d, at, a3, aj, e } from "./index-
|
|
2
|
+
import { T, n, W, A, m, ad, B, F, K, J, L, ap, Y, X, $, Z, _, a1, w, C, x, y, E, a5, a6, ah, a8, O, Q, ac, D, ag, af, H, G, b, k, ae, M, P, ao, v, q, R, S, a9, aq, o, a2, a4, ai, al, ak, am, ar, N, as, l, f, p, r, j, t, h, aa, U, c, a0, z, a7, ab, u, an, d, at, a3, aj, e } from "./index-CyIoAprB.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -1571,6 +1571,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1571
1571
|
allowCopyLink = false,
|
|
1572
1572
|
autoCollapse,
|
|
1573
1573
|
showProfileCard,
|
|
1574
|
+
authorInfoAppend,
|
|
1574
1575
|
...rest
|
|
1575
1576
|
}) {
|
|
1576
1577
|
var _a2;
|
|
@@ -1625,7 +1626,16 @@ var __publicField = (obj, key, value) => {
|
|
|
1625
1626
|
return /* @__PURE__ */ jsxRuntime.jsxs(Root$2, { sx: { position: "relative", mt: 2, py: 1 }, ...rest, children: [
|
|
1626
1627
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { id: post.id, flex: "1", className: clsx({ "post-highlighted": isTargetPost && hasEnteredViewport }), children: [
|
|
1627
1628
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { display: "flex", justifyContent: "space-between", alignItems: "start", children: [
|
|
1628
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1629
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1630
|
+
AuthorInfo,
|
|
1631
|
+
{
|
|
1632
|
+
size: "sm",
|
|
1633
|
+
user: post.author,
|
|
1634
|
+
createdAt: renderTime(),
|
|
1635
|
+
showProfileCard,
|
|
1636
|
+
append: authorInfoAppend
|
|
1637
|
+
}
|
|
1638
|
+
),
|
|
1629
1639
|
/* @__PURE__ */ jsxRuntime.jsx(Menu, { items: menuItems, style: { position: "absolute", right: 0, top: 0 } })
|
|
1630
1640
|
] }),
|
|
1631
1641
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { ml: 5.5 }, children: [
|
|
@@ -2737,7 +2747,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2737
2747
|
if (highlighted) {
|
|
2738
2748
|
return /* @__PURE__ */ jsxRuntime.jsx(SegmentalList, { ...props });
|
|
2739
2749
|
}
|
|
2740
|
-
const renderComment = (comment) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2750
|
+
const renderComment = (comment, restProps) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2741
2751
|
Comment,
|
|
2742
2752
|
{
|
|
2743
2753
|
post: comment,
|
|
@@ -2750,7 +2760,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2750
2760
|
autoCollapse,
|
|
2751
2761
|
allowCopyLink,
|
|
2752
2762
|
showProfileCard,
|
|
2753
|
-
interactive
|
|
2763
|
+
interactive,
|
|
2764
|
+
...restProps
|
|
2754
2765
|
},
|
|
2755
2766
|
comment.id
|
|
2756
2767
|
);
|
|
@@ -6081,6 +6092,11 @@ var __publicField = (obj, key, value) => {
|
|
|
6081
6092
|
notYetJoinedTheChannel: "Not yet joined the channel",
|
|
6082
6093
|
typeSomething: "Type here. Use Markdown, Drag or paste images",
|
|
6083
6094
|
send: "Send"
|
|
6095
|
+
},
|
|
6096
|
+
userActionLog: {
|
|
6097
|
+
editedCapital: "Edited",
|
|
6098
|
+
times: "times",
|
|
6099
|
+
mostRecent: "most recent"
|
|
6084
6100
|
}
|
|
6085
6101
|
};
|
|
6086
6102
|
const zh = {
|
|
@@ -6162,6 +6178,11 @@ var __publicField = (obj, key, value) => {
|
|
|
6162
6178
|
notYetJoinedTheChannel: "暂未加入这个频道",
|
|
6163
6179
|
typeSomething: "在这里输入,适用 MarkDown,拽入或者黏贴图片",
|
|
6164
6180
|
send: "发送"
|
|
6181
|
+
},
|
|
6182
|
+
userActionLog: {
|
|
6183
|
+
editedCapital: "编辑",
|
|
6184
|
+
times: "次",
|
|
6185
|
+
mostRecent: "最近"
|
|
6165
6186
|
}
|
|
6166
6187
|
};
|
|
6167
6188
|
const translations = { zh, en };
|
package/dist/preferences.d.ts
CHANGED
|
@@ -27,10 +27,16 @@ declare const preferences: {
|
|
|
27
27
|
disableNotificationBadge: boolean;
|
|
28
28
|
enableDiscussLog: boolean;
|
|
29
29
|
discussLogPosition: "top" | "standard";
|
|
30
|
+
enableDiscussPostLog: boolean;
|
|
31
|
+
enableDiscussCommentLog: boolean;
|
|
30
32
|
enableBlogLog: boolean;
|
|
31
33
|
blogLogPosition: "top" | "standard";
|
|
34
|
+
enableBlogPostLog: boolean;
|
|
35
|
+
enableBlogCommentLog: boolean;
|
|
32
36
|
enableDocsLog: boolean;
|
|
33
37
|
docsLogPosition: "top" | "standard";
|
|
38
|
+
enableDocsPostLog: boolean;
|
|
39
|
+
enableDocsCommentLog: boolean;
|
|
34
40
|
badgeList: any[];
|
|
35
41
|
socialShareButtonsDiscussion: boolean;
|
|
36
42
|
socialShareButtonsBlog: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-ux",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.33",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@arcblock/bridge": "^2.10.1",
|
|
32
32
|
"@arcblock/react-hooks": "^2.10.1",
|
|
33
33
|
"@arcblock/ws": "^1.18.123",
|
|
34
|
-
"@blocklet/editor": "2.0.
|
|
35
|
-
"@blocklet/labels": "2.0.
|
|
34
|
+
"@blocklet/editor": "2.0.33",
|
|
35
|
+
"@blocklet/labels": "2.0.33",
|
|
36
36
|
"@blocklet/uploader": "^0.1.15",
|
|
37
37
|
"@emotion/css": "^11.10.5",
|
|
38
38
|
"@emotion/react": "^11.10.5",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"resolutions": {
|
|
101
101
|
"react": "^18.2.0"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "2fe93cb143c75d5b38d224adfbab1904876bd630"
|
|
104
104
|
}
|