@blocklet/discuss-kit-ux 1.6.114 → 1.6.116
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/avatars/author-info.d.ts +3 -1
- package/dist/components/avatars/index.d.ts +1 -0
- package/dist/{editor-QNrA3UUD.mjs → editor-xAUilO57.mjs} +2 -2
- package/dist/{index-9vwtO_IV.mjs → index-vKEw0S5J.mjs} +132 -104
- package/dist/index.es.js +44 -43
- package/dist/index.umd.js +91 -63
- package/package.json +7 -7
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { User } from '../../types';
|
|
3
3
|
interface Props {
|
|
4
4
|
user: User;
|
|
5
|
+
newTitle?: string;
|
|
5
6
|
createdAt?: Date | string | React.ReactElement;
|
|
6
7
|
append?: React.ReactNode;
|
|
7
8
|
size?: 'sm' | 'normal';
|
|
@@ -9,6 +10,7 @@ interface Props {
|
|
|
9
10
|
showProfileCard?: boolean;
|
|
10
11
|
showBadge?: boolean;
|
|
11
12
|
showDID?: boolean;
|
|
13
|
+
profileUse?: boolean;
|
|
12
14
|
}
|
|
13
|
-
export default function AuthorInfo({ user, createdAt, append, size, responsive, showProfileCard, showBadge, showDID, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default function AuthorInfo({ user, createdAt, append, size, responsive, showProfileCard, showBadge, showDID, newTitle, profileUse, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
16
|
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-vKEw0S5J.mjs";
|
|
8
8
|
import "@blocklet/labels";
|
|
9
9
|
import "@mui/material/styles";
|
|
10
10
|
import "@mui/material/Box";
|
|
@@ -28,6 +28,7 @@ import "@arcblock/did-connect/lib/Avatar";
|
|
|
28
28
|
import "@mui/material/useMediaQuery";
|
|
29
29
|
import "@arcblock/ux/lib/DID";
|
|
30
30
|
import "@mui/material/Tooltip";
|
|
31
|
+
import "react-router-dom";
|
|
31
32
|
import "@arcblock/ux/lib/RelativeTime";
|
|
32
33
|
import "@mui/material/Chip";
|
|
33
34
|
import "@mui/material/Stack";
|
|
@@ -38,7 +39,6 @@ import "lodash/trim";
|
|
|
38
39
|
import "@mui/material/Avatar";
|
|
39
40
|
import "@mui/icons-material/BrokenImage";
|
|
40
41
|
import "@iconify/react";
|
|
41
|
-
import "react-router-dom";
|
|
42
42
|
import "@mui/material/colors";
|
|
43
43
|
import "@arcblock/did-connect/lib/Session";
|
|
44
44
|
import "@arcblock/did-connect/lib/Address";
|
|
@@ -30,6 +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 } from "react-router-dom";
|
|
33
34
|
import UxRelativeTime from "@arcblock/ux/lib/RelativeTime";
|
|
34
35
|
import Chip from "@mui/material/Chip";
|
|
35
36
|
import Stack from "@mui/material/Stack";
|
|
@@ -40,7 +41,6 @@ import trim from "lodash/trim";
|
|
|
40
41
|
import Avatar$1 from "@mui/material/Avatar";
|
|
41
42
|
import BrokenImageIcon from "@mui/icons-material/BrokenImage";
|
|
42
43
|
import { Icon } from "@iconify/react";
|
|
43
|
-
import { Link, useNavigate, useLocation, useSearchParams, unstable_useBlocker } from "react-router-dom";
|
|
44
44
|
import { green } from "@mui/material/colors";
|
|
45
45
|
import { SessionContext } from "@arcblock/did-connect/lib/Session";
|
|
46
46
|
import { useTheme as useTheme$1, useMediaQuery, Box as Box$1, Tooltip as Tooltip$1, Chip as Chip$1, alpha, ClickAwayListener, Dialog as Dialog$1, DialogTitle, DialogContent, DialogActions, DialogContentText, Button as Button$1, Skeleton, IconButton as IconButton$2, InputBase, tooltipClasses as tooltipClasses$1, Badge as Badge$1 } from "@mui/material";
|
|
@@ -691,7 +691,10 @@ const iconStyle = {
|
|
|
691
691
|
const animationHeight = 8;
|
|
692
692
|
const getExtraAnimation = (value) => "";
|
|
693
693
|
const formatKey = (key) => {
|
|
694
|
-
|
|
694
|
+
if (typeof key === "string") {
|
|
695
|
+
return trim(key.toLowerCase());
|
|
696
|
+
}
|
|
697
|
+
return "";
|
|
695
698
|
};
|
|
696
699
|
const badgeList = flatMap(
|
|
697
700
|
(((_b = (_a = window == null ? void 0 : window.blocklet) == null ? void 0 : _a.preferences) == null ? void 0 : _b.badgeList) || []).filter((item) => [true, "true"].includes(item.enabled)).map((item) => {
|
|
@@ -895,6 +898,7 @@ const useResponsiveValue = (values2) => {
|
|
|
895
898
|
function ProfileCard({ user, ...rest }) {
|
|
896
899
|
var _a2, _b2;
|
|
897
900
|
const { session } = useSessionContext();
|
|
901
|
+
const navigate = useNavigate();
|
|
898
902
|
return /* @__PURE__ */ jsxs(
|
|
899
903
|
Box,
|
|
900
904
|
{
|
|
@@ -911,51 +915,60 @@ function ProfileCard({ user, ...rest }) {
|
|
|
911
915
|
},
|
|
912
916
|
...rest,
|
|
913
917
|
children: [
|
|
914
|
-
/* @__PURE__ */ jsxs(
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
{
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
918
|
+
/* @__PURE__ */ jsxs(
|
|
919
|
+
Box,
|
|
920
|
+
{
|
|
921
|
+
sx: { display: "flex", alignItems: "center", gap: 2, cursor: "pointer" },
|
|
922
|
+
onClick: () => {
|
|
923
|
+
navigate(`/profile/${user == null ? void 0 : user.did}`);
|
|
924
|
+
},
|
|
925
|
+
children: [
|
|
926
|
+
/* @__PURE__ */ jsx(Avatar, { did: user.did, src: user.avatar, size: 44, shape: "circle", variant: "circle" }),
|
|
927
|
+
/* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
|
|
928
|
+
/* @__PURE__ */ jsxs(
|
|
929
|
+
Box,
|
|
930
|
+
{
|
|
931
|
+
component: "span",
|
|
932
|
+
sx: {
|
|
933
|
+
display: "flex",
|
|
934
|
+
justifyContent: "space-between",
|
|
935
|
+
alignItems: "center",
|
|
936
|
+
lineHeight: 1.3
|
|
937
|
+
},
|
|
938
|
+
children: [
|
|
939
|
+
/* @__PURE__ */ jsx(Box, { sx: { fontWeight: "bold" }, children: user.fullName }),
|
|
940
|
+
user.role && /* @__PURE__ */ jsx(
|
|
941
|
+
Box,
|
|
942
|
+
{
|
|
943
|
+
sx: {
|
|
944
|
+
px: 1.25,
|
|
945
|
+
border: 1,
|
|
946
|
+
borderColor: green[600],
|
|
947
|
+
color: green[600],
|
|
948
|
+
fontSize: 12,
|
|
949
|
+
fontWeight: "bold",
|
|
950
|
+
lineHeight: 1.5,
|
|
951
|
+
borderRadius: "100vh",
|
|
952
|
+
textTransform: "capitalize"
|
|
953
|
+
},
|
|
954
|
+
children: user.role
|
|
955
|
+
}
|
|
956
|
+
)
|
|
957
|
+
]
|
|
958
|
+
}
|
|
959
|
+
),
|
|
960
|
+
/* @__PURE__ */ jsx(
|
|
961
|
+
DID,
|
|
962
|
+
{
|
|
963
|
+
style: { marginTop: 4, lineHeight: 1, height: 14, maxWidth: 250, color: "inherit !important" },
|
|
964
|
+
size: 14,
|
|
965
|
+
did: user.did
|
|
966
|
+
}
|
|
967
|
+
)
|
|
968
|
+
] })
|
|
969
|
+
]
|
|
970
|
+
}
|
|
971
|
+
),
|
|
959
972
|
((_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: [
|
|
960
973
|
/* @__PURE__ */ jsx(Box, { sx: { my: 2, borderTop: "1px solid #eee" } }),
|
|
961
974
|
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
|
|
@@ -990,13 +1003,16 @@ function AuthorInfo({
|
|
|
990
1003
|
showProfileCard,
|
|
991
1004
|
showBadge = true,
|
|
992
1005
|
showDID = true,
|
|
1006
|
+
newTitle = void 0,
|
|
1007
|
+
profileUse = false,
|
|
993
1008
|
...rest
|
|
994
1009
|
}) {
|
|
995
1010
|
const theme = useTheme();
|
|
996
1011
|
const downMd = useMediaQuery$1(theme.breakpoints.down("md"));
|
|
1012
|
+
const navigate = useNavigate();
|
|
997
1013
|
const sm = size === "sm";
|
|
998
1014
|
let fontSize = sm ? 12 : 14;
|
|
999
|
-
let avatarSize = sm ? 32 : 40;
|
|
1015
|
+
let avatarSize = profileUse ? 24 : sm ? 32 : 40;
|
|
1000
1016
|
if (responsive && downMd) {
|
|
1001
1017
|
fontSize = 12;
|
|
1002
1018
|
avatarSize = 24;
|
|
@@ -1013,19 +1029,28 @@ function AuthorInfo({
|
|
|
1013
1029
|
};
|
|
1014
1030
|
const renderAvatar = () => {
|
|
1015
1031
|
if (showProfileCard) {
|
|
1016
|
-
return /* @__PURE__ */ jsx(HtmlTooltip$1, { title: /* @__PURE__ */ jsx(ProfileCard, { user }), children: /* @__PURE__ */ jsx(
|
|
1017
|
-
|
|
1032
|
+
return /* @__PURE__ */ jsx(HtmlTooltip$1, { title: /* @__PURE__ */ jsx(ProfileCard, { user }), children: /* @__PURE__ */ jsx(
|
|
1033
|
+
Box,
|
|
1018
1034
|
{
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1035
|
+
sx: { display: "flex", cursor: "pointer" },
|
|
1036
|
+
onClick: () => {
|
|
1037
|
+
navigate(`/profile/${user == null ? void 0 : user.did}`);
|
|
1038
|
+
},
|
|
1039
|
+
children: /* @__PURE__ */ jsx(
|
|
1040
|
+
Avatar,
|
|
1041
|
+
{
|
|
1042
|
+
did: user == null ? void 0 : user.did,
|
|
1043
|
+
src: user == null ? void 0 : user.avatar,
|
|
1044
|
+
size: avatarSize,
|
|
1045
|
+
shape: "circle",
|
|
1046
|
+
variant: "circle",
|
|
1047
|
+
sx: {
|
|
1048
|
+
width: avatarSize
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
)
|
|
1027
1052
|
}
|
|
1028
|
-
) })
|
|
1053
|
+
) });
|
|
1029
1054
|
}
|
|
1030
1055
|
return /* @__PURE__ */ jsx(
|
|
1031
1056
|
Avatar,
|
|
@@ -1059,7 +1084,7 @@ function AuthorInfo({
|
|
|
1059
1084
|
sx: { display: "flex", alignItems: "center", minHeight: 20, flexWrap: "wrap", lineHeight: 1.5 },
|
|
1060
1085
|
lineHeight: 1,
|
|
1061
1086
|
children: [
|
|
1062
|
-
/* @__PURE__ */ jsx("span", { className: "user-fullname", children: user == null ? void 0 : user.fullName }),
|
|
1087
|
+
/* @__PURE__ */ jsx("span", { className: "user-fullname", children: newTitle || (user == null ? void 0 : user.fullName) }),
|
|
1063
1088
|
createdAt && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1064
1089
|
/* @__PURE__ */ jsx(Box, { component: "span", display: "inline-block", mx: 0.5, children: "·" }),
|
|
1065
1090
|
renderTime()
|
|
@@ -1943,6 +1968,8 @@ function Comment({
|
|
|
1943
1968
|
return items;
|
|
1944
1969
|
};
|
|
1945
1970
|
const render = ({ post, interactive }) => {
|
|
1971
|
+
var _a2, _b2;
|
|
1972
|
+
((_a2 = post == null ? void 0 : post.author) == null ? void 0 : _a2.did) === ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did);
|
|
1946
1973
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1947
1974
|
/* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", mt: 1, children: /* @__PURE__ */ jsx(
|
|
1948
1975
|
GithubReaction,
|
|
@@ -1950,14 +1977,14 @@ function Comment({
|
|
|
1950
1977
|
data: (post == null ? void 0 : post.rating) || [],
|
|
1951
1978
|
onRate: ({ value, ratingType }) => onRate(post, value, ratingType),
|
|
1952
1979
|
onUnrate: () => onUnrate(post),
|
|
1953
|
-
append: (!!(session == null ? void 0 : session.user) || preferences.displayReplyButtonForAnonymousUsers) && interactive && /* @__PURE__ */ jsx(
|
|
1980
|
+
append: /* @__PURE__ */ jsx(Fragment, { children: (!!(session == null ? void 0 : session.user) || preferences.displayReplyButtonForAnonymousUsers) && interactive && /* @__PURE__ */ jsx(
|
|
1954
1981
|
Box,
|
|
1955
1982
|
{
|
|
1956
1983
|
onClick: () => protectLogin(session, () => setInputVisible(!inputVisible)),
|
|
1957
1984
|
sx: { display: "flex", lineHeight: 1, "&:hover": { cursor: "pointer" } },
|
|
1958
1985
|
children: /* @__PURE__ */ jsx(ChatBubbleOutlineOutlined, { sx: { fontSize: 18, color: "grey.600" } })
|
|
1959
1986
|
}
|
|
1960
|
-
),
|
|
1987
|
+
) }),
|
|
1961
1988
|
interactive
|
|
1962
1989
|
}
|
|
1963
1990
|
) }),
|
|
@@ -4494,7 +4521,7 @@ function Pagination({ page, size = 20, total, onChange, routerMode = true, ...re
|
|
|
4494
4521
|
}
|
|
4495
4522
|
);
|
|
4496
4523
|
}
|
|
4497
|
-
const Editor = lazy(() => import("./editor-
|
|
4524
|
+
const Editor = lazy(() => import("./editor-xAUilO57.mjs"));
|
|
4498
4525
|
function LazyEditor(props) {
|
|
4499
4526
|
const fallback = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4500
4527
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
|
@@ -10348,56 +10375,57 @@ function PointUpProvider({ children }) {
|
|
|
10348
10375
|
] });
|
|
10349
10376
|
}
|
|
10350
10377
|
export {
|
|
10351
|
-
|
|
10378
|
+
Confirm as $,
|
|
10352
10379
|
Avatar as A,
|
|
10353
|
-
|
|
10380
|
+
Badge as B,
|
|
10354
10381
|
CommentInput as C,
|
|
10355
10382
|
DefaultEditorConfigProvider as D,
|
|
10356
|
-
|
|
10357
|
-
|
|
10383
|
+
BlogCard as E,
|
|
10384
|
+
BlogPermaLink as F,
|
|
10358
10385
|
GithubReaction as G,
|
|
10359
|
-
|
|
10386
|
+
getBlogLink as H,
|
|
10360
10387
|
ImagePathFixerPlugin as I,
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10388
|
+
CoverImage as J,
|
|
10389
|
+
CoverImageUpload as K,
|
|
10390
|
+
AccessControl as L,
|
|
10364
10391
|
Menu as M,
|
|
10365
|
-
|
|
10366
|
-
|
|
10392
|
+
useAuthzContext as N,
|
|
10393
|
+
AuthzProvider as O,
|
|
10367
10394
|
Pagination as P,
|
|
10368
|
-
|
|
10395
|
+
ChatClient as Q,
|
|
10369
10396
|
RelativeTime as R,
|
|
10370
10397
|
ScrollableEditorWrapper as S,
|
|
10371
|
-
|
|
10372
|
-
|
|
10398
|
+
Chat as T,
|
|
10399
|
+
ChatHeaderAddon as U,
|
|
10373
10400
|
VideoPathFixerPlugin as V,
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10401
|
+
useChatContext as W,
|
|
10402
|
+
ChatProvider as X,
|
|
10403
|
+
UnreadNotificationContext as Y,
|
|
10404
|
+
useUnreadNotification as Z,
|
|
10405
|
+
UnreadNotificationProvider as _,
|
|
10379
10406
|
isEmptyContent as a,
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10407
|
+
ConfirmContext as a0,
|
|
10408
|
+
useConfirm as a1,
|
|
10409
|
+
ConfirmProvider as a2,
|
|
10410
|
+
SecureLabelPicker as a3,
|
|
10411
|
+
useApiErrorHandler as a4,
|
|
10412
|
+
useDefaultApiErrorHandler as a5,
|
|
10413
|
+
PreviousLocationRecorder as a6,
|
|
10414
|
+
Back as a7,
|
|
10415
|
+
LazyEditor as a8,
|
|
10416
|
+
EditorPreview as a9,
|
|
10417
|
+
DirtyPromptContainer as aa,
|
|
10418
|
+
ConfirmNavigation as ab,
|
|
10419
|
+
UploaderContext as ac,
|
|
10420
|
+
useUploader as ad,
|
|
10421
|
+
UploaderTrigger as ae,
|
|
10422
|
+
UploaderProvider as af,
|
|
10423
|
+
composeImageUrl as ag,
|
|
10424
|
+
usePointUpContext as ah,
|
|
10425
|
+
PointUpProvider as ai,
|
|
10426
|
+
create as aj,
|
|
10427
|
+
getWsClient as ak,
|
|
10428
|
+
useSubscription as al,
|
|
10401
10429
|
InternalThemeProvider as b,
|
|
10402
10430
|
Input as c,
|
|
10403
10431
|
translations as d,
|
|
@@ -10421,6 +10449,6 @@ export {
|
|
|
10421
10449
|
CommentsContext as v,
|
|
10422
10450
|
useCommentsContext as w,
|
|
10423
10451
|
CommentsProvider as x,
|
|
10424
|
-
|
|
10425
|
-
|
|
10452
|
+
BinaryThumb as y,
|
|
10453
|
+
BlogListWrapper as z
|
|
10426
10454
|
};
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@blocklet/labels";
|
|
2
|
-
import {
|
|
2
|
+
import { L, j, O, A, h, a7, B, y, E, z, F, T, Q, U, X, o, C, q, v, x, $, a0, ab, a2, J, K, D, aa, a9, G, c, b, a8, M, P, ai, n, m, a6, R, S, a3, k, Y, _, ac, af, ae, ag, aj, H, ak, l, p, r, t, d, a4, N, e, W, w, a1, a5, u, ah, al, Z, ad, f } from "./index-vKEw0S5J.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
|
@@ -26,6 +26,7 @@ import "@arcblock/did-connect/lib/Avatar";
|
|
|
26
26
|
import "@mui/material/useMediaQuery";
|
|
27
27
|
import "@arcblock/ux/lib/DID";
|
|
28
28
|
import "@mui/material/Tooltip";
|
|
29
|
+
import "react-router-dom";
|
|
29
30
|
import "@arcblock/ux/lib/RelativeTime";
|
|
30
31
|
import "@mui/material/Chip";
|
|
31
32
|
import "@mui/material/Stack";
|
|
@@ -36,7 +37,6 @@ import "lodash/trim";
|
|
|
36
37
|
import "@mui/material/Avatar";
|
|
37
38
|
import "@mui/icons-material/BrokenImage";
|
|
38
39
|
import "@iconify/react";
|
|
39
|
-
import "react-router-dom";
|
|
40
40
|
import "@mui/material/colors";
|
|
41
41
|
import "@arcblock/did-connect/lib/Address";
|
|
42
42
|
import "@blocklet/editor/lib/ext/CheckboxPlugin";
|
|
@@ -64,73 +64,74 @@ import "unstated-next";
|
|
|
64
64
|
import "js-cookie";
|
|
65
65
|
import "@arcblock/ws";
|
|
66
66
|
export {
|
|
67
|
-
|
|
67
|
+
L as AccessControl,
|
|
68
68
|
j as AuthorInfo,
|
|
69
|
-
|
|
69
|
+
O as AuthzProvider,
|
|
70
70
|
A as Avatar,
|
|
71
71
|
h as Avatars,
|
|
72
|
-
|
|
73
|
-
B as
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
a7 as Back,
|
|
73
|
+
B as Badge,
|
|
74
|
+
y as BinaryThumb,
|
|
75
|
+
E as BlogCard,
|
|
76
|
+
z as BlogList,
|
|
77
|
+
F as BlogPermaLink,
|
|
78
|
+
T as Chat,
|
|
79
|
+
Q as ChatClient,
|
|
80
|
+
U as ChatHeaderAddon,
|
|
81
|
+
X as ChatProvider,
|
|
81
82
|
o as Comment,
|
|
82
83
|
C as CommentInput,
|
|
83
84
|
q as CommentList,
|
|
84
85
|
v as CommentsContext,
|
|
85
86
|
x as CommentsProvider,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
$ as Confirm,
|
|
88
|
+
a0 as ConfirmContext,
|
|
89
|
+
ab as ConfirmNavigation,
|
|
90
|
+
a2 as ConfirmProvider,
|
|
91
|
+
J as CoverImage,
|
|
92
|
+
K as CoverImageUpload,
|
|
92
93
|
D as DefaultEditorConfigProvider,
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
aa as DirtyPromptContainer,
|
|
95
|
+
a9 as EditorPreview,
|
|
95
96
|
G as GithubReaction,
|
|
96
97
|
c as Input,
|
|
97
98
|
b as InternalThemeProvider,
|
|
98
|
-
|
|
99
|
+
a8 as LazyEditor,
|
|
99
100
|
M as Menu,
|
|
100
101
|
P as Pagination,
|
|
101
|
-
|
|
102
|
+
ai as PointUpProvider,
|
|
102
103
|
n as Post,
|
|
103
104
|
m as PostContent,
|
|
104
|
-
|
|
105
|
+
a6 as PreviousLocationRecorder,
|
|
105
106
|
R as RelativeTime,
|
|
106
107
|
S as ScrollableEditorWrapper,
|
|
107
|
-
|
|
108
|
+
a3 as SecureLabelPicker,
|
|
108
109
|
k as SystemUser,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
110
|
+
Y as UnreadNotificationContext,
|
|
111
|
+
_ as UnreadNotificationProvider,
|
|
112
|
+
ac as UploaderContext,
|
|
113
|
+
af as UploaderProvider,
|
|
114
|
+
ae as UploaderTrigger,
|
|
115
|
+
ag as composeImageUrl,
|
|
116
|
+
aj as create,
|
|
117
|
+
H as getBlogLink,
|
|
118
|
+
ak as getWsClient,
|
|
118
119
|
l as lexicalUtils,
|
|
119
120
|
p as preferences,
|
|
120
121
|
r as routes,
|
|
121
122
|
t as themeOverrides,
|
|
122
123
|
d as translations,
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
a4 as useApiErrorHandler,
|
|
125
|
+
N as useAuthzContext,
|
|
125
126
|
e as useChanged,
|
|
126
|
-
|
|
127
|
+
W as useChatContext,
|
|
127
128
|
w as useCommentsContext,
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
a1 as useConfirm,
|
|
130
|
+
a5 as useDefaultApiErrorHandler,
|
|
130
131
|
u as useNow,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
ah as usePointUpContext,
|
|
133
|
+
al as useSubscription,
|
|
134
|
+
Z as useUnreadNotification,
|
|
135
|
+
ad as useUploader,
|
|
135
136
|
f as utils
|
|
136
137
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@blocklet/labels"), require("react/jsx-runtime"), require("@mui/material/styles"), require("react"), require("@mui/material/Box"), require("@arcblock/ux/lib/Theme"), require("lodash/isNil"), require("@blocklet/editor/lib/config"), require("@lexical/react/LexicalComposerContext"), require("lexical"), require("ahooks"), require("@mui/lab/LoadingButton"), require("@mui/icons-material"), require("@arcblock/ux/lib/Locale/context"), require("@mui/material/Alert"), require("lodash/isBoolean"), require("@mui/material/Button"), require("@arcblock/did-connect/lib/Avatar"), require("@mui/material/useMediaQuery"), require("@arcblock/ux/lib/DID"), require("@mui/material/Tooltip"), require("@arcblock/ux/lib/RelativeTime"), require("@mui/material/Chip"), require("@mui/material/Stack"), require("lodash/groupBy"), require("lodash/flatMap"), require("lodash/uniqBy"), require("lodash/trim"), require("@mui/material/Avatar"), require("@mui/icons-material/BrokenImage"), require("@iconify/react"), require("
|
|
3
|
-
})(this, function(exports2, labels, jsxRuntime, styles, react, Box, Theme, isNil, config, LexicalComposerContext, lexical$1, ahooks, LoadingButton, iconsMaterial, context, Alert, isBoolean, Button, DidAvatar, useMediaQuery, DID, Tooltip, UxRelativeTime, Chip, Stack, groupBy, flatMap, uniqBy, trim, Avatar$1, BrokenImageIcon, react$1,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@blocklet/labels"), require("react/jsx-runtime"), require("@mui/material/styles"), require("react"), require("@mui/material/Box"), require("@arcblock/ux/lib/Theme"), require("lodash/isNil"), require("@blocklet/editor/lib/config"), require("@lexical/react/LexicalComposerContext"), require("lexical"), require("ahooks"), require("@mui/lab/LoadingButton"), require("@mui/icons-material"), require("@arcblock/ux/lib/Locale/context"), require("@mui/material/Alert"), require("lodash/isBoolean"), require("@mui/material/Button"), require("@arcblock/did-connect/lib/Avatar"), require("@mui/material/useMediaQuery"), require("@arcblock/ux/lib/DID"), require("@mui/material/Tooltip"), require("react-router-dom"), require("@arcblock/ux/lib/RelativeTime"), require("@mui/material/Chip"), require("@mui/material/Stack"), require("lodash/groupBy"), require("lodash/flatMap"), require("lodash/uniqBy"), require("lodash/trim"), require("@mui/material/Avatar"), require("@mui/icons-material/BrokenImage"), require("@iconify/react"), require("@mui/material/colors"), require("@arcblock/did-connect/lib/Session"), require("@mui/material"), require("@arcblock/did-connect/lib/Address"), require("@blocklet/editor/lib/ext/CheckboxPlugin"), require("@mui/material/MenuItem"), require("clsx"), require("@mui/material/IconButton"), require("@mui/material/Menu"), require("@arcblock/ux/lib/Dialog"), require("lodash/orderBy"), require("@mui/material/Typography"), require("@mui/material/Skeleton"), require("url-join"), require("react-dom"), require("dayjs"), require("dayjs/plugin/relativeTime"), require("mitt"), require("@mui/material/CircularProgress"), require("react-helmet"), require("@mui/material/Fab"), require("lodash/debounce"), require("@mui/material/TextField"), require("axios"), require("@arcblock/ux/lib/Toast"), require("@mui/material/Pagination"), require("unstated-next"), require("js-cookie"), require("@arcblock/ws"), require("@blocklet/editor/lib/ext/OnContentChangePlugin"), require("@blocklet/editor/lib/ext/ShortcutPlugin"), require("@blocklet/editor/lib/ext/SafeAreaPlugin"), require("@lexical/text"), require("@blocklet/editor/lib/main/nodes/ImageNode"), require("@blocklet/editor/lib/ext/VideoPlugin/VideoNode")) : typeof define === "function" && define.amd ? define(["exports", "@blocklet/labels", "react/jsx-runtime", "@mui/material/styles", "react", "@mui/material/Box", "@arcblock/ux/lib/Theme", "lodash/isNil", "@blocklet/editor/lib/config", "@lexical/react/LexicalComposerContext", "lexical", "ahooks", "@mui/lab/LoadingButton", "@mui/icons-material", "@arcblock/ux/lib/Locale/context", "@mui/material/Alert", "lodash/isBoolean", "@mui/material/Button", "@arcblock/did-connect/lib/Avatar", "@mui/material/useMediaQuery", "@arcblock/ux/lib/DID", "@mui/material/Tooltip", "react-router-dom", "@arcblock/ux/lib/RelativeTime", "@mui/material/Chip", "@mui/material/Stack", "lodash/groupBy", "lodash/flatMap", "lodash/uniqBy", "lodash/trim", "@mui/material/Avatar", "@mui/icons-material/BrokenImage", "@iconify/react", "@mui/material/colors", "@arcblock/did-connect/lib/Session", "@mui/material", "@arcblock/did-connect/lib/Address", "@blocklet/editor/lib/ext/CheckboxPlugin", "@mui/material/MenuItem", "clsx", "@mui/material/IconButton", "@mui/material/Menu", "@arcblock/ux/lib/Dialog", "lodash/orderBy", "@mui/material/Typography", "@mui/material/Skeleton", "url-join", "react-dom", "dayjs", "dayjs/plugin/relativeTime", "mitt", "@mui/material/CircularProgress", "react-helmet", "@mui/material/Fab", "lodash/debounce", "@mui/material/TextField", "axios", "@arcblock/ux/lib/Toast", "@mui/material/Pagination", "unstated-next", "js-cookie", "@arcblock/ws", "@blocklet/editor/lib/ext/OnContentChangePlugin", "@blocklet/editor/lib/ext/ShortcutPlugin", "@blocklet/editor/lib/ext/SafeAreaPlugin", "@lexical/text", "@blocklet/editor/lib/main/nodes/ImageNode", "@blocklet/editor/lib/ext/VideoPlugin/VideoNode"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.DiscussKitComponents = {}, global.labels, global.jsxRuntime, global.styles, global.react, global.Box, global.Theme, global.isNil, global.config, global.LexicalComposerContext, global.lexical$1, global.ahooks, global.LoadingButton, global.iconsMaterial, global.context, global.Alert, global.isBoolean, global.Button, global.DidAvatar, global.useMediaQuery, global.DID, global.Tooltip, global.reactRouterDom, global.UxRelativeTime, global.Chip, global.Stack, global.groupBy, global.flatMap, global.uniqBy, global.trim, global.Avatar$1, global.BrokenImageIcon, global.react$1, global.colors, global.Session, global.material, global.DIDAddress, global.CheckboxPlugin, global.MuiMenuItem, global.clsx, global.IconButton$1, global.MuiMenu, global.Dialog, global.orderBy, global.Typography, global.Skeleton, global.joinUrl, global.reactDom, global.dayjs, global.relativeTime, global.mitt, global.CircularProgress, global.reactHelmet, global.Fab, global.debounce, global.TextField, global.axios, global.Toast, global.MuiPagination, global.unstatedNext, global.Cookie, global.ws, global.OnContentChangePlugin, global.ShortcutPlugin, global.SafeAreaPlugin, global.text, global.ImageNode, global.VideoNode));
|
|
3
|
+
})(this, function(exports2, labels, jsxRuntime, styles, react, Box, Theme, isNil, config, LexicalComposerContext, lexical$1, ahooks, LoadingButton, iconsMaterial, context, Alert, isBoolean, Button, DidAvatar, useMediaQuery, DID, Tooltip, reactRouterDom, UxRelativeTime, Chip, Stack, groupBy, flatMap, uniqBy, trim, Avatar$1, BrokenImageIcon, react$1, colors, Session, material, DIDAddress, CheckboxPlugin, MuiMenuItem, clsx, IconButton$1, MuiMenu, Dialog, orderBy, Typography, Skeleton, joinUrl, reactDom, dayjs, relativeTime, mitt, CircularProgress, reactHelmet, Fab, debounce, TextField, axios, Toast, MuiPagination, unstatedNext, Cookie, ws, OnContentChangePlugin, ShortcutPlugin, SafeAreaPlugin, text, ImageNode, VideoNode) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
6
|
var __publicField = (obj, key, value) => {
|
|
@@ -631,7 +631,10 @@ var __publicField = (obj, key, value) => {
|
|
|
631
631
|
const animationHeight = 8;
|
|
632
632
|
const getExtraAnimation = (value) => "";
|
|
633
633
|
const formatKey = (key) => {
|
|
634
|
-
|
|
634
|
+
if (typeof key === "string") {
|
|
635
|
+
return trim(key.toLowerCase());
|
|
636
|
+
}
|
|
637
|
+
return "";
|
|
635
638
|
};
|
|
636
639
|
const badgeList = flatMap(
|
|
637
640
|
(((_b = (_a = window == null ? void 0 : window.blocklet) == null ? void 0 : _a.preferences) == null ? void 0 : _b.badgeList) || []).filter((item) => [true, "true"].includes(item.enabled)).map((item) => {
|
|
@@ -835,6 +838,7 @@ var __publicField = (obj, key, value) => {
|
|
|
835
838
|
function ProfileCard({ user, ...rest }) {
|
|
836
839
|
var _a2, _b2;
|
|
837
840
|
const { session } = useSessionContext();
|
|
841
|
+
const navigate = reactRouterDom.useNavigate();
|
|
838
842
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
839
843
|
Box,
|
|
840
844
|
{
|
|
@@ -851,51 +855,60 @@ var __publicField = (obj, key, value) => {
|
|
|
851
855
|
},
|
|
852
856
|
...rest,
|
|
853
857
|
children: [
|
|
854
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
{
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
858
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
859
|
+
Box,
|
|
860
|
+
{
|
|
861
|
+
sx: { display: "flex", alignItems: "center", gap: 2, cursor: "pointer" },
|
|
862
|
+
onClick: () => {
|
|
863
|
+
navigate(`/profile/${user == null ? void 0 : user.did}`);
|
|
864
|
+
},
|
|
865
|
+
children: [
|
|
866
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { did: user.did, src: user.avatar, size: 44, shape: "circle", variant: "circle" }),
|
|
867
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
|
|
868
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
869
|
+
Box,
|
|
870
|
+
{
|
|
871
|
+
component: "span",
|
|
872
|
+
sx: {
|
|
873
|
+
display: "flex",
|
|
874
|
+
justifyContent: "space-between",
|
|
875
|
+
alignItems: "center",
|
|
876
|
+
lineHeight: 1.3
|
|
877
|
+
},
|
|
878
|
+
children: [
|
|
879
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { fontWeight: "bold" }, children: user.fullName }),
|
|
880
|
+
user.role && /* @__PURE__ */ jsxRuntime.jsx(
|
|
881
|
+
Box,
|
|
882
|
+
{
|
|
883
|
+
sx: {
|
|
884
|
+
px: 1.25,
|
|
885
|
+
border: 1,
|
|
886
|
+
borderColor: colors.green[600],
|
|
887
|
+
color: colors.green[600],
|
|
888
|
+
fontSize: 12,
|
|
889
|
+
fontWeight: "bold",
|
|
890
|
+
lineHeight: 1.5,
|
|
891
|
+
borderRadius: "100vh",
|
|
892
|
+
textTransform: "capitalize"
|
|
893
|
+
},
|
|
894
|
+
children: user.role
|
|
895
|
+
}
|
|
896
|
+
)
|
|
897
|
+
]
|
|
898
|
+
}
|
|
899
|
+
),
|
|
900
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
901
|
+
DID,
|
|
902
|
+
{
|
|
903
|
+
style: { marginTop: 4, lineHeight: 1, height: 14, maxWidth: 250, color: "inherit !important" },
|
|
904
|
+
size: 14,
|
|
905
|
+
did: user.did
|
|
906
|
+
}
|
|
907
|
+
)
|
|
908
|
+
] })
|
|
909
|
+
]
|
|
910
|
+
}
|
|
911
|
+
),
|
|
899
912
|
((_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: [
|
|
900
913
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { my: 2, borderTop: "1px solid #eee" } }),
|
|
901
914
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -930,13 +943,16 @@ var __publicField = (obj, key, value) => {
|
|
|
930
943
|
showProfileCard,
|
|
931
944
|
showBadge = true,
|
|
932
945
|
showDID = true,
|
|
946
|
+
newTitle = void 0,
|
|
947
|
+
profileUse = false,
|
|
933
948
|
...rest
|
|
934
949
|
}) {
|
|
935
950
|
const theme = styles.useTheme();
|
|
936
951
|
const downMd = useMediaQuery(theme.breakpoints.down("md"));
|
|
952
|
+
const navigate = reactRouterDom.useNavigate();
|
|
937
953
|
const sm = size === "sm";
|
|
938
954
|
let fontSize = sm ? 12 : 14;
|
|
939
|
-
let avatarSize = sm ? 32 : 40;
|
|
955
|
+
let avatarSize = profileUse ? 24 : sm ? 32 : 40;
|
|
940
956
|
if (responsive && downMd) {
|
|
941
957
|
fontSize = 12;
|
|
942
958
|
avatarSize = 24;
|
|
@@ -953,19 +969,28 @@ var __publicField = (obj, key, value) => {
|
|
|
953
969
|
};
|
|
954
970
|
const renderAvatar = () => {
|
|
955
971
|
if (showProfileCard) {
|
|
956
|
-
return /* @__PURE__ */ jsxRuntime.jsx(HtmlTooltip$1, { title: /* @__PURE__ */ jsxRuntime.jsx(ProfileCard, { user }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
957
|
-
|
|
972
|
+
return /* @__PURE__ */ jsxRuntime.jsx(HtmlTooltip$1, { title: /* @__PURE__ */ jsxRuntime.jsx(ProfileCard, { user }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
973
|
+
Box,
|
|
958
974
|
{
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
975
|
+
sx: { display: "flex", cursor: "pointer" },
|
|
976
|
+
onClick: () => {
|
|
977
|
+
navigate(`/profile/${user == null ? void 0 : user.did}`);
|
|
978
|
+
},
|
|
979
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
980
|
+
Avatar,
|
|
981
|
+
{
|
|
982
|
+
did: user == null ? void 0 : user.did,
|
|
983
|
+
src: user == null ? void 0 : user.avatar,
|
|
984
|
+
size: avatarSize,
|
|
985
|
+
shape: "circle",
|
|
986
|
+
variant: "circle",
|
|
987
|
+
sx: {
|
|
988
|
+
width: avatarSize
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
)
|
|
967
992
|
}
|
|
968
|
-
) })
|
|
993
|
+
) });
|
|
969
994
|
}
|
|
970
995
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
971
996
|
Avatar,
|
|
@@ -999,7 +1024,7 @@ var __publicField = (obj, key, value) => {
|
|
|
999
1024
|
sx: { display: "flex", alignItems: "center", minHeight: 20, flexWrap: "wrap", lineHeight: 1.5 },
|
|
1000
1025
|
lineHeight: 1,
|
|
1001
1026
|
children: [
|
|
1002
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "user-fullname", children: user == null ? void 0 : user.fullName }),
|
|
1027
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "user-fullname", children: newTitle || (user == null ? void 0 : user.fullName) }),
|
|
1003
1028
|
createdAt && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1004
1029
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", display: "inline-block", mx: 0.5, children: "·" }),
|
|
1005
1030
|
renderTime()
|
|
@@ -1883,6 +1908,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1883
1908
|
return items;
|
|
1884
1909
|
};
|
|
1885
1910
|
const render = ({ post, interactive }) => {
|
|
1911
|
+
var _a2, _b2;
|
|
1912
|
+
((_a2 = post == null ? void 0 : post.author) == null ? void 0 : _a2.did) === ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did);
|
|
1886
1913
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1887
1914
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { display: "flex", alignItems: "center", mt: 1, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1888
1915
|
GithubReaction,
|
|
@@ -1890,14 +1917,14 @@ var __publicField = (obj, key, value) => {
|
|
|
1890
1917
|
data: (post == null ? void 0 : post.rating) || [],
|
|
1891
1918
|
onRate: ({ value, ratingType }) => onRate(post, value, ratingType),
|
|
1892
1919
|
onUnrate: () => onUnrate(post),
|
|
1893
|
-
append: (!!(session == null ? void 0 : session.user) || preferences.displayReplyButtonForAnonymousUsers) && interactive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1920
|
+
append: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: (!!(session == null ? void 0 : session.user) || preferences.displayReplyButtonForAnonymousUsers) && interactive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1894
1921
|
Box,
|
|
1895
1922
|
{
|
|
1896
1923
|
onClick: () => protectLogin(session, () => setInputVisible(!inputVisible)),
|
|
1897
1924
|
sx: { display: "flex", lineHeight: 1, "&:hover": { cursor: "pointer" } },
|
|
1898
1925
|
children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ChatBubbleOutlineOutlined, { sx: { fontSize: 18, color: "grey.600" } })
|
|
1899
1926
|
}
|
|
1900
|
-
),
|
|
1927
|
+
) }),
|
|
1901
1928
|
interactive
|
|
1902
1929
|
}
|
|
1903
1930
|
) }),
|
|
@@ -10324,6 +10351,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10324
10351
|
exports2.Avatar = Avatar;
|
|
10325
10352
|
exports2.Avatars = Avatars;
|
|
10326
10353
|
exports2.Back = Back;
|
|
10354
|
+
exports2.Badge = Badge;
|
|
10327
10355
|
exports2.BinaryThumb = BinaryThumb;
|
|
10328
10356
|
exports2.BlogCard = BlogCard;
|
|
10329
10357
|
exports2.BlogList = BlogListWrapper;
|
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.116",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@arcblock/ws": "^1.18.110",
|
|
32
|
-
"@blocklet/editor": "1.6.
|
|
33
|
-
"@blocklet/labels": "1.6.
|
|
32
|
+
"@blocklet/editor": "1.6.116",
|
|
33
|
+
"@blocklet/labels": "1.6.116",
|
|
34
34
|
"@blocklet/uploader": "^0.0.69",
|
|
35
35
|
"@emotion/css": "^11.10.5",
|
|
36
36
|
"@emotion/react": "^11.10.5",
|
|
37
37
|
"@emotion/styled": "^11.10.5",
|
|
38
38
|
"@iconify/react": "^4.0.1",
|
|
39
|
-
"@lexical/react": "0.
|
|
40
|
-
"@lexical/text": "0.
|
|
39
|
+
"@lexical/react": "0.13.1",
|
|
40
|
+
"@lexical/text": "0.13.1",
|
|
41
41
|
"ahooks": "^3.7.8",
|
|
42
42
|
"axios": "^0.27.2",
|
|
43
43
|
"dayjs": "^1.11.7",
|
|
44
44
|
"js-cookie": "^3.0.5",
|
|
45
|
-
"lexical": "0.
|
|
45
|
+
"lexical": "0.13.1",
|
|
46
46
|
"lottie-react": "^2.4.0",
|
|
47
47
|
"mitt": "^3.0.0",
|
|
48
48
|
"react-helmet": "^6.1.0",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"resolutions": {
|
|
94
94
|
"react": "^18.2.0"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "31c9248d0e75f46c756640e6757eaeee03369f88"
|
|
97
97
|
}
|