@blocklet/discuss-kit-ux 1.6.211 → 1.6.213
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/api-error-handler/api-error-handler.d.ts +2 -1
- package/dist/components/api-error-handler/default-handler.d.ts +1 -0
- package/dist/components/api-error-handler/json-validation-interceptor.d.ts +2 -1
- package/dist/components/authz/access-control.d.ts +3 -3
- package/dist/components/avatars/Avatars.stories.d.ts +2 -1
- package/dist/components/avatars/author-info.d.ts +2 -2
- package/dist/components/avatars/avatars.d.ts +3 -2
- package/dist/components/back.d.ts +1 -0
- package/dist/components/blog/blog-link.d.ts +1 -0
- package/dist/components/blog/blog-list.d.ts +3 -3
- package/dist/components/blog/cover-image.d.ts +2 -2
- package/dist/components/blog/permalink.d.ts +2 -1
- package/dist/components/blog/types.d.ts +2 -1
- package/dist/components/chat/channel-group.d.ts +2 -2
- package/dist/components/chat/chat-client.d.ts +3 -2
- package/dist/components/chat/chat-list.d.ts +1 -0
- package/dist/components/chat/chat-room.d.ts +2 -1
- package/dist/components/chat/chat.d.ts +1 -0
- package/dist/components/chat/context.d.ts +4 -4
- package/dist/components/chat/message-list.d.ts +2 -1
- package/dist/components/chat/message.d.ts +2 -1
- package/dist/components/chat/participants.d.ts +2 -1
- package/dist/components/chat/time.d.ts +2 -1
- package/dist/components/chat/types.d.ts +2 -1
- package/dist/components/chat/unread-notification.d.ts +2 -1
- package/dist/components/confirm.d.ts +3 -2
- package/dist/components/dayjs.d.ts +2 -1
- package/dist/components/default-editor-config-provider.d.ts +2 -2
- package/dist/components/dirty-prompt.d.ts +1 -1
- package/dist/components/editor/editor.d.ts +3 -3
- package/dist/components/editor/lazy-editor.d.ts +2 -1
- package/dist/components/editor/preview.d.ts +2 -2
- package/dist/components/emoji-icon.d.ts +1 -0
- package/dist/components/hooks/responsive.d.ts +2 -1
- package/dist/components/input/auto-clear-plugin.d.ts +1 -0
- package/dist/components/input/comment-input.d.ts +1 -1
- package/dist/components/input/input.d.ts +2 -2
- package/dist/components/input/post-edit.d.ts +1 -0
- package/dist/components/input/scrollable-editor-wrapper.d.ts +1 -1
- package/dist/components/label-picker.d.ts +1 -0
- package/dist/components/lexical.d.ts +1 -0
- package/dist/components/pagination.d.ts +2 -1
- package/dist/components/posts/Post.stories.d.ts +3 -2
- package/dist/components/posts/comment-list/context.d.ts +3 -2
- package/dist/components/posts/comment.d.ts +2 -1
- package/dist/components/posts/menu.d.ts +3 -3
- package/dist/components/posts/post-content.d.ts +1 -0
- package/dist/components/posts/post.d.ts +4 -3
- package/dist/components/profile-card/ProfileCard.stories.d.ts +2 -1
- package/dist/components/profile-card/profile-card.d.ts +2 -1
- package/dist/components/rating/binary-thumb.d.ts +3 -2
- package/dist/components/rating/github-reaction.d.ts +3 -3
- package/dist/components/rating/rater-list.d.ts +2 -1
- package/dist/components/rating/rating.d.ts +1 -1
- package/dist/components/segmented-control.d.ts +2 -2
- package/dist/components/shared/dialog.d.ts +1 -1
- package/dist/components/uploader/index.d.ts +2 -1
- package/dist/components/utils.d.ts +3 -2
- package/dist/editor-g8aVzRyQ.mjs +37 -0
- package/dist/{index-KsyZ0KOb.mjs → index-BvgOMp6U.mjs} +163 -70
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +59 -120
- package/dist/index.umd.js +106 -13
- package/dist/preferences.d.ts +7 -0
- package/dist/test/fixtures/index.d.ts +2 -1
- package/dist/theme/index.d.ts +9 -0
- package/dist/theme/typography.d.ts +3 -0
- package/package.json +8 -8
- package/dist/components/shared/theme.d.ts +0 -5
- package/dist/editor-5I4Vr3U6.mjs +0 -105
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("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/
|
|
3
|
-
})(this, function(exports2, labels, jsxRuntime, styles, react, Box, isNil, config, LexicalComposerContext, lexical$1, ahooks, LoadingButton, iconsMaterial, context, Alert, isBoolean, Button,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@blocklet/labels"), require("react/jsx-runtime"), require("@mui/material/styles"), require("@arcblock/ux/lib/Theme"), require("react"), require("@mui/material/Box"), 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/AvatarGroup"), require("@mui/material/colors"), 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("@arcblock/ux/lib/Empty"), require("@arcblock/did-connect/lib/Session"), require("@mui/material"), require("@mui/icons-material/NotificationsActiveOutlined"), require("@blocklet/editor/lib/ext/CheckboxPlugin"), require("@arcblock/did-connect/lib/Address"), 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("react-flip-toolkit"), require("@mui/material/colors/grey"), require("@mui/material/Fab"), require("lodash/debounce"), require("@mui/material/TextField"), require("@mui/icons-material/Add"), require("axios"), require("@arcblock/ux/lib/Toast"), require("@mui/material/Pagination"), require("unstated-next"), require("js-cookie"), require("@arcblock/ws"), require("@emotion/css"), 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", "@arcblock/ux/lib/Theme", "react", "@mui/material/Box", "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/AvatarGroup", "@mui/material/colors", "@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", "@arcblock/ux/lib/Empty", "@arcblock/did-connect/lib/Session", "@mui/material", "@mui/icons-material/NotificationsActiveOutlined", "@blocklet/editor/lib/ext/CheckboxPlugin", "@arcblock/did-connect/lib/Address", "@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", "react-flip-toolkit", "@mui/material/colors/grey", "@mui/material/Fab", "lodash/debounce", "@mui/material/TextField", "@mui/icons-material/Add", "axios", "@arcblock/ux/lib/Toast", "@mui/material/Pagination", "unstated-next", "js-cookie", "@arcblock/ws", "@emotion/css", "@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.Theme, global.react, global.Box, 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.AvatarGroup, global.colors, 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.Empty$1, global.Session, global.material, global.NotificationsActiveOutlinedIcon, global.CheckboxPlugin, global.DIDAddress, 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.reactFlipToolkit, global.grey, global.Fab, global.debounce, global.TextField, global.AddIcon, global.axios, global.Toast, global.MuiPagination, global.unstatedNext, global.Cookie, global.ws, global.css, global.OnContentChangePlugin, global.ShortcutPlugin, global.SafeAreaPlugin, global.text, global.ImageNode, global.VideoNode));
|
|
3
|
+
})(this, function(exports2, labels, jsxRuntime, styles, Theme, react, Box, isNil, config, LexicalComposerContext, lexical$1, ahooks, LoadingButton, iconsMaterial, context, Alert, isBoolean, Button, DidAvatar, AvatarGroup, colors, useMediaQuery, DID, Tooltip, reactRouterDom, UxRelativeTime, Chip, Stack, groupBy, flatMap, uniqBy, trim, Avatar$1, BrokenImageIcon, react$1, Empty$1, Session, material, NotificationsActiveOutlinedIcon, CheckboxPlugin, DIDAddress, MuiMenuItem, clsx, IconButton$1, MuiMenu, Dialog, orderBy, Typography, Skeleton, joinUrl, reactDom, dayjs, relativeTime, mitt, CircularProgress, reactHelmet, reactFlipToolkit, grey, Fab, debounce, TextField, AddIcon, axios, Toast, MuiPagination, unstatedNext, Cookie, ws, css, 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) => {
|
|
@@ -9,46 +9,138 @@ var __publicField = (obj, key, value) => {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
var _a, _b;
|
|
12
|
+
const typography = {
|
|
13
|
+
h1: {
|
|
14
|
+
fontSize: "1.875rem",
|
|
15
|
+
lineHeight: 1.2,
|
|
16
|
+
fontWeight: 800,
|
|
17
|
+
letterSpacing: "-.025em"
|
|
18
|
+
},
|
|
19
|
+
h2: {
|
|
20
|
+
fontSize: "1.5rem",
|
|
21
|
+
lineHeight: 1.3333333,
|
|
22
|
+
fontWeight: 700,
|
|
23
|
+
letterSpacing: "-.025em"
|
|
24
|
+
},
|
|
25
|
+
h3: {
|
|
26
|
+
fontSize: "1.25rem",
|
|
27
|
+
lineHeight: 1.4,
|
|
28
|
+
fontWeight: 600,
|
|
29
|
+
letterSpacing: "-.025em"
|
|
30
|
+
},
|
|
31
|
+
h4: {
|
|
32
|
+
fontSize: "1.125rem",
|
|
33
|
+
lineHeight: 1.5,
|
|
34
|
+
fontWeight: 600
|
|
35
|
+
},
|
|
36
|
+
h5: {
|
|
37
|
+
fontSize: "1rem",
|
|
38
|
+
lineHeight: 1.75,
|
|
39
|
+
fontWeight: 400
|
|
40
|
+
},
|
|
41
|
+
h6: {
|
|
42
|
+
fontSize: "1rem",
|
|
43
|
+
lineHeight: 1.75,
|
|
44
|
+
fontWeight: 400
|
|
45
|
+
},
|
|
46
|
+
subtitle1: {
|
|
47
|
+
fontSize: "1rem",
|
|
48
|
+
lineHeight: 1.75,
|
|
49
|
+
fontWeight: 400
|
|
50
|
+
},
|
|
51
|
+
subtitle2: {
|
|
52
|
+
fontSize: "1rem",
|
|
53
|
+
lineHeight: 1.75,
|
|
54
|
+
fontWeight: 400
|
|
55
|
+
},
|
|
56
|
+
body1: {
|
|
57
|
+
fontSize: "1rem",
|
|
58
|
+
lineHeight: 1.75
|
|
59
|
+
},
|
|
60
|
+
fontWeightLight: 300,
|
|
61
|
+
fontWeightRegular: 400,
|
|
62
|
+
fontWeightMedium: 500,
|
|
63
|
+
fontWeightBold: 700
|
|
64
|
+
};
|
|
12
65
|
const themeOverrides = {
|
|
66
|
+
shape: {
|
|
67
|
+
borderRadius: 8
|
|
68
|
+
},
|
|
13
69
|
components: {
|
|
70
|
+
MuiInputBase: {
|
|
71
|
+
defaultProps: {
|
|
72
|
+
size: "small"
|
|
73
|
+
},
|
|
74
|
+
styleOverrides: {
|
|
75
|
+
root: ({ theme }) => ({
|
|
76
|
+
fontSize: "0.875rem",
|
|
77
|
+
// 调小输入框字体大小 (16px -> 14px)
|
|
78
|
+
backgroundColor: theme.palette.grey[50]
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
},
|
|
14
82
|
MuiButton: {
|
|
15
83
|
defaultProps: {
|
|
16
84
|
size: "small"
|
|
17
85
|
},
|
|
18
86
|
styleOverrides: {
|
|
19
87
|
root: {
|
|
88
|
+
fontWeight: 500,
|
|
20
89
|
textTransform: "none"
|
|
90
|
+
},
|
|
91
|
+
outlinedPrimary: ({ theme }) => ({
|
|
92
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
93
|
+
backgroundColor: "#fff",
|
|
94
|
+
"&:hover": {
|
|
95
|
+
border: `1px solid ${theme.palette.divider}`
|
|
96
|
+
}
|
|
97
|
+
}),
|
|
98
|
+
sizeSmall: {
|
|
99
|
+
height: 32
|
|
21
100
|
}
|
|
22
101
|
}
|
|
23
102
|
},
|
|
24
103
|
MuiIconButton: {
|
|
25
104
|
defaultProps: {
|
|
26
105
|
size: "small"
|
|
106
|
+
},
|
|
107
|
+
styleOverrides: {
|
|
108
|
+
root: {
|
|
109
|
+
textTransform: "none"
|
|
110
|
+
},
|
|
111
|
+
colorPrimary: {
|
|
112
|
+
backgroundColor: "#fff"
|
|
113
|
+
}
|
|
27
114
|
}
|
|
28
115
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
116
|
+
MuiToggleButton: {
|
|
117
|
+
styleOverrides: {
|
|
118
|
+
root: {
|
|
119
|
+
textTransform: "none"
|
|
120
|
+
}
|
|
32
121
|
}
|
|
33
122
|
},
|
|
34
|
-
|
|
123
|
+
MuiTab: {
|
|
35
124
|
styleOverrides: {
|
|
36
125
|
root: {
|
|
37
126
|
textTransform: "none"
|
|
38
127
|
}
|
|
39
128
|
}
|
|
129
|
+
},
|
|
130
|
+
MuiTooltip: {
|
|
131
|
+
defaultProps: {
|
|
132
|
+
enterTouchDelay: 3e3,
|
|
133
|
+
leaveTouchDelay: 100
|
|
134
|
+
}
|
|
40
135
|
}
|
|
41
136
|
}
|
|
42
137
|
};
|
|
43
138
|
function InternalThemeProvider({ children }) {
|
|
44
139
|
const theme = styles.useTheme();
|
|
45
|
-
const merged = {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// ...themeOverrides.components,
|
|
50
|
-
// },
|
|
51
|
-
};
|
|
140
|
+
const merged = Theme.create(theme, {
|
|
141
|
+
typography,
|
|
142
|
+
...themeOverrides
|
|
143
|
+
});
|
|
52
144
|
return /* @__PURE__ */ jsxRuntime.jsx(styles.ThemeProvider, { theme: merged, children });
|
|
53
145
|
}
|
|
54
146
|
const repairBase64Avatar = (avatar) => {
|
|
@@ -11369,6 +11461,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11369
11461
|
exports2.routes = routes;
|
|
11370
11462
|
exports2.themeOverrides = themeOverrides;
|
|
11371
11463
|
exports2.translations = translations;
|
|
11464
|
+
exports2.typography = typography;
|
|
11372
11465
|
exports2.useApiErrorHandler = useApiErrorHandler;
|
|
11373
11466
|
exports2.useAuthzContext = useAuthzContext;
|
|
11374
11467
|
exports2.useChanged = useChanged;
|
package/dist/preferences.d.ts
CHANGED
|
@@ -50,5 +50,12 @@ declare const preferences: {
|
|
|
50
50
|
bannerDescBookmarkEn: string;
|
|
51
51
|
bannerDescBookmarkZh: string;
|
|
52
52
|
discussionsVisiblePostTypes: string[];
|
|
53
|
+
allowDonationOnDiscussion: boolean;
|
|
54
|
+
allowDonationAmountCustom: boolean;
|
|
55
|
+
discussionDonationButtonText: string;
|
|
56
|
+
discussionDonationHistoryStyle: string;
|
|
57
|
+
discussionDonationMaximum: string;
|
|
58
|
+
discussionDonationMinimum: string;
|
|
59
|
+
discussionDonationPresets: string;
|
|
53
60
|
};
|
|
54
61
|
export default preferences;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { User } from '../../types';
|
|
2
|
+
|
|
2
3
|
export declare const editorContent = "{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"h1\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"heading\",\"version\":1,\"tag\":\"h1\"},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"h2\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"heading\",\"version\":1,\"tag\":\"h2\"},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"h3\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"heading\",\"version\":1,\"tag\":\"h3\"},{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 1\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":1},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 2\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":2}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"list\",\"version\":1,\"listType\":\"bullet\",\"start\":1,\"tag\":\"ul\"},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"Labore in aliqua laboris aute velit. Ea adipisicing velit ut deserunt veniam nulla cupidatat anim excepteur mollit nostrud quis. Amet laboris proident proident consectetur amet occaecat est adipisicing. Proident anim sit est fugiat pariatur excepteur cillum labore nostrud id cillum eu officia.\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}";
|
|
3
4
|
export declare const longEditorContent = "{\"root\":{\"children\":[{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 1\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":1},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 2\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":2},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 3\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":3},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 4\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":4},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 5\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":5},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 6\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":6},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 7\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":7},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 8\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":8},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 9\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":9},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 10\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":10},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 11\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":11},{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"item 12\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"listitem\",\"version\":1,\"value\":12}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"list\",\"version\":1,\"listType\":\"bullet\",\"start\":1,\"tag\":\"ul\"}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}";
|
|
4
5
|
export declare const mockUsers: User[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { typography } from './typography';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { ThemeOptions } from '@mui/material/styles';
|
|
4
|
+
|
|
5
|
+
export { typography };
|
|
6
|
+
export declare const themeOverrides: Partial<ThemeOptions>;
|
|
7
|
+
export declare function InternalThemeProvider({ children }: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
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.213",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@arcblock/ws": "^1.18.115",
|
|
32
|
-
"@blocklet/editor": "1.6.
|
|
33
|
-
"@blocklet/labels": "1.6.
|
|
34
|
-
"@blocklet/uploader": "^0.0.
|
|
32
|
+
"@blocklet/editor": "1.6.213",
|
|
33
|
+
"@blocklet/labels": "1.6.213",
|
|
34
|
+
"@blocklet/uploader": "^0.0.77",
|
|
35
35
|
"@emotion/css": "^11.10.5",
|
|
36
36
|
"@emotion/react": "^11.10.5",
|
|
37
37
|
"@emotion/styled": "^11.10.5",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@storybook/addon-essentials": "^6.5.13",
|
|
74
74
|
"@storybook/addon-interactions": "^6.5.13",
|
|
75
75
|
"@storybook/addon-links": "^6.5.13",
|
|
76
|
-
"@storybook/builder-vite": "^0.
|
|
76
|
+
"@storybook/builder-vite": "^8.0.6",
|
|
77
77
|
"@storybook/react": "^6.5.13",
|
|
78
78
|
"@storybook/testing-library": "^0.0.13",
|
|
79
79
|
"@svgr/core": "^6.5.1",
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
"rollup-plugin-node-externals": "^5.1.3",
|
|
88
88
|
"typescript": "^4.6.4",
|
|
89
89
|
"unplugin-icons": "^0.14.14",
|
|
90
|
-
"vite": "^5.
|
|
91
|
-
"vite-plugin-dts": "^3.
|
|
90
|
+
"vite": "^5.2.8",
|
|
91
|
+
"vite-plugin-dts": "^3.8.1",
|
|
92
92
|
"vite-plugin-libcss": "^1.1.1"
|
|
93
93
|
},
|
|
94
94
|
"resolutions": {
|
|
95
95
|
"react": "^18.2.0"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "03b4c48a34d63d8d539a94c3fc77313fb44b7fbe"
|
|
98
98
|
}
|
package/dist/editor-5I4Vr3U6.mjs
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { styled, Box } from "@mui/material";
|
|
3
|
-
import { OnContentChangePlugin } from "@blocklet/editor/lib/ext/OnContentChangePlugin";
|
|
4
|
-
import { CtrlsShortcutPlugin } from "@blocklet/editor/lib/ext/ShortcutPlugin";
|
|
5
|
-
import { SafeAreaPlugin } from "@blocklet/editor/lib/ext/SafeAreaPlugin";
|
|
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-KsyZ0KOb.mjs";
|
|
8
|
-
import "@blocklet/labels";
|
|
9
|
-
import "@mui/material/styles";
|
|
10
|
-
import "@mui/material/Box";
|
|
11
|
-
import "lodash/isNil";
|
|
12
|
-
import "@blocklet/editor/lib/config";
|
|
13
|
-
import "lexical";
|
|
14
|
-
import "@lexical/text";
|
|
15
|
-
import "url-join";
|
|
16
|
-
import "@lexical/react/LexicalComposerContext";
|
|
17
|
-
import "@blocklet/editor/lib/main/nodes/ImageNode";
|
|
18
|
-
import "@blocklet/editor/lib/ext/VideoPlugin/VideoNode";
|
|
19
|
-
import "ahooks";
|
|
20
|
-
import "@mui/lab/LoadingButton";
|
|
21
|
-
import "@mui/icons-material";
|
|
22
|
-
import "@arcblock/ux/lib/Locale/context";
|
|
23
|
-
import "@mui/material/Alert";
|
|
24
|
-
import "lodash/isBoolean";
|
|
25
|
-
import "@mui/material/Button";
|
|
26
|
-
import "@arcblock/ux/lib/Theme";
|
|
27
|
-
import "@arcblock/did-connect/lib/Avatar";
|
|
28
|
-
import "@mui/material/AvatarGroup";
|
|
29
|
-
import "@mui/material/colors";
|
|
30
|
-
import "@mui/material/useMediaQuery";
|
|
31
|
-
import "@arcblock/ux/lib/DID";
|
|
32
|
-
import "@mui/material/Tooltip";
|
|
33
|
-
import "react-router-dom";
|
|
34
|
-
import "@arcblock/ux/lib/RelativeTime";
|
|
35
|
-
import "@mui/material/Chip";
|
|
36
|
-
import "@mui/material/Stack";
|
|
37
|
-
import "lodash/groupBy";
|
|
38
|
-
import "lodash/flatMap";
|
|
39
|
-
import "lodash/uniqBy";
|
|
40
|
-
import "lodash/trim";
|
|
41
|
-
import "@mui/material/Avatar";
|
|
42
|
-
import "@mui/icons-material/BrokenImage";
|
|
43
|
-
import "@iconify/react";
|
|
44
|
-
import "@arcblock/ux/lib/Empty";
|
|
45
|
-
import "@arcblock/did-connect/lib/Session";
|
|
46
|
-
import "@mui/icons-material/NotificationsActiveOutlined";
|
|
47
|
-
import "@blocklet/editor/lib/ext/CheckboxPlugin";
|
|
48
|
-
import "@arcblock/did-connect/lib/Address";
|
|
49
|
-
import "@mui/material/MenuItem";
|
|
50
|
-
import "clsx";
|
|
51
|
-
import "@mui/material/IconButton";
|
|
52
|
-
import "@mui/material/Menu";
|
|
53
|
-
import "@arcblock/ux/lib/Dialog";
|
|
54
|
-
import "lodash/orderBy";
|
|
55
|
-
import "@mui/material/Typography";
|
|
56
|
-
import "@mui/material/Skeleton";
|
|
57
|
-
import "react-dom";
|
|
58
|
-
import "dayjs";
|
|
59
|
-
import "dayjs/plugin/relativeTime";
|
|
60
|
-
import "mitt";
|
|
61
|
-
import "@mui/material/CircularProgress";
|
|
62
|
-
import "react-helmet";
|
|
63
|
-
import "react-flip-toolkit";
|
|
64
|
-
import "@mui/material/colors/grey";
|
|
65
|
-
import "@mui/material/Fab";
|
|
66
|
-
import "lodash/debounce";
|
|
67
|
-
import "@mui/material/TextField";
|
|
68
|
-
import "@mui/icons-material/Add";
|
|
69
|
-
import "axios";
|
|
70
|
-
import "@arcblock/ux/lib/Toast";
|
|
71
|
-
import "@mui/material/Pagination";
|
|
72
|
-
import "unstated-next";
|
|
73
|
-
import "js-cookie";
|
|
74
|
-
import "@arcblock/ws";
|
|
75
|
-
import "@emotion/css";
|
|
76
|
-
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
77
|
-
const Root = styled(Box)`
|
|
78
|
-
.be-editable,
|
|
79
|
-
.be-content {
|
|
80
|
-
min-height: 150px;
|
|
81
|
-
}
|
|
82
|
-
`;
|
|
83
|
-
function Editor({ initialContent, onChange, children, onSave, ...rest }) {
|
|
84
|
-
const handleChange = async (editorState, editor) => {
|
|
85
|
-
const isEmpty = await isEmptyContent(editorState, editor);
|
|
86
|
-
onChange == null ? void 0 : onChange({
|
|
87
|
-
content: isEmpty ? "" : stringify(editorState),
|
|
88
|
-
editorState,
|
|
89
|
-
editor,
|
|
90
|
-
isEmpty,
|
|
91
|
-
getExcerpt: () => getExcerptSync(editorState)
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
return /* @__PURE__ */ jsx(Root, { children: /* @__PURE__ */ jsxs(BlockletEditor, { editorState: inferInitialEditorState(initialContent), ...rest, children: [
|
|
95
|
-
/* @__PURE__ */ jsx(ImagePathFixerPlugin, {}),
|
|
96
|
-
/* @__PURE__ */ jsx(VideoPathFixerPlugin, {}),
|
|
97
|
-
/* @__PURE__ */ jsx(OnContentChangePlugin, { onChange: handleChange }),
|
|
98
|
-
onSave && /* @__PURE__ */ jsx(CtrlsShortcutPlugin, { callback: onSave }),
|
|
99
|
-
/* @__PURE__ */ jsx(SafeAreaPlugin, {}),
|
|
100
|
-
children
|
|
101
|
-
] }) });
|
|
102
|
-
}
|
|
103
|
-
export {
|
|
104
|
-
Editor as default
|
|
105
|
-
};
|