@blocklet/discuss-kit-ux 1.6.13 → 1.6.15
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.
|
@@ -5,6 +5,7 @@ interface Props {
|
|
|
5
5
|
onExitEditing?: () => void;
|
|
6
6
|
onSubmit?: Send;
|
|
7
7
|
autoCollapse?: boolean;
|
|
8
|
+
enableHeadingsIdPlugin?: boolean;
|
|
8
9
|
}
|
|
9
|
-
export default function PostContent({ content, editing, onExitEditing, onSubmit, autoCollapse, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default function PostContent({ content, editing, onExitEditing, onSubmit, autoCollapse, enableHeadingsIdPlugin, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
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-318c076b.mjs";
|
|
8
8
|
import "@blocklet/labels";
|
|
9
9
|
import "@mui/material/styles";
|
|
10
10
|
import "@mui/material/Box";
|
|
@@ -1161,6 +1161,7 @@ function PostContent({
|
|
|
1161
1161
|
onExitEditing,
|
|
1162
1162
|
onSubmit,
|
|
1163
1163
|
autoCollapse,
|
|
1164
|
+
enableHeadingsIdPlugin,
|
|
1164
1165
|
...rest
|
|
1165
1166
|
}) {
|
|
1166
1167
|
if (editing && onSubmit) {
|
|
@@ -1175,16 +1176,32 @@ function PostContent({
|
|
|
1175
1176
|
);
|
|
1176
1177
|
}
|
|
1177
1178
|
if (!autoCollapse) {
|
|
1178
|
-
return /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsxs(
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1179
|
+
return /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsxs(
|
|
1180
|
+
StyledBlockletEditor,
|
|
1181
|
+
{
|
|
1182
|
+
editable: false,
|
|
1183
|
+
editorState: inferInitialEditorState(content),
|
|
1184
|
+
enableHeadingsIdPlugin,
|
|
1185
|
+
children: [
|
|
1186
|
+
/* @__PURE__ */ jsx(ImagePathFixerPlugin, {}),
|
|
1187
|
+
/* @__PURE__ */ jsx(VideoPathFixerPlugin, {}),
|
|
1188
|
+
/* @__PURE__ */ jsx(CheckboxPlugin, { send: onSubmit })
|
|
1189
|
+
]
|
|
1190
|
+
}
|
|
1191
|
+
) });
|
|
1183
1192
|
}
|
|
1184
|
-
return /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(ViewMore, { ...rest, children: /* @__PURE__ */ jsxs(
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1193
|
+
return /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(ViewMore, { ...rest, children: /* @__PURE__ */ jsxs(
|
|
1194
|
+
StyledBlockletEditor,
|
|
1195
|
+
{
|
|
1196
|
+
editable: false,
|
|
1197
|
+
editorState: inferInitialEditorState(content),
|
|
1198
|
+
enableHeadingsIdPlugin,
|
|
1199
|
+
children: [
|
|
1200
|
+
/* @__PURE__ */ jsx(ImagePathFixerPlugin, {}),
|
|
1201
|
+
/* @__PURE__ */ jsx(CheckboxPlugin, { send: onSubmit })
|
|
1202
|
+
]
|
|
1203
|
+
}
|
|
1204
|
+
) }) });
|
|
1188
1205
|
}
|
|
1189
1206
|
const StyledMuiMenu = styled(MuiMenu)`
|
|
1190
1207
|
.MuiMenuItem-root {
|
|
@@ -4404,7 +4421,7 @@ function Pagination({ page, size = 20, total, onChange, routerMode = true, ...re
|
|
|
4404
4421
|
}
|
|
4405
4422
|
);
|
|
4406
4423
|
}
|
|
4407
|
-
const Editor = lazy(() => import("./editor-
|
|
4424
|
+
const Editor = lazy(() => import("./editor-d5d4e4e8.mjs"));
|
|
4408
4425
|
function LazyEditor(props) {
|
|
4409
4426
|
const fallback = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4410
4427
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
|
@@ -4422,11 +4439,20 @@ function EditorPreview({ content, children, ...rest }) {
|
|
|
4422
4439
|
/* @__PURE__ */ jsx(Skeleton, { width: "60%" }),
|
|
4423
4440
|
/* @__PURE__ */ jsx(Skeleton, { width: "40%" })
|
|
4424
4441
|
] });
|
|
4425
|
-
return /* @__PURE__ */ jsx(Suspense, { fallback, children: /* @__PURE__ */ jsxs(
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4442
|
+
return /* @__PURE__ */ jsx(Suspense, { fallback, children: /* @__PURE__ */ jsxs(
|
|
4443
|
+
BlockletEditor,
|
|
4444
|
+
{
|
|
4445
|
+
editorState: inferInitialEditorState(content),
|
|
4446
|
+
editable: false,
|
|
4447
|
+
enableHeadingsIdPlugin: true,
|
|
4448
|
+
...rest,
|
|
4449
|
+
children: [
|
|
4450
|
+
/* @__PURE__ */ jsx(ImagePathFixerPlugin, {}),
|
|
4451
|
+
/* @__PURE__ */ jsx(VideoPathFixerPlugin, {}),
|
|
4452
|
+
children
|
|
4453
|
+
]
|
|
4454
|
+
}
|
|
4455
|
+
) });
|
|
4430
4456
|
}
|
|
4431
4457
|
const useBeforeUnloadPrompt = (dirty) => {
|
|
4432
4458
|
useEffect(() => {
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@blocklet/labels";
|
|
2
|
-
import { K, j, N, A, h, a6, B, z, y, E, Q, O, T, W, o, C, q, v, x, _, $, aa, a1, H, J, D, a9, a8, G, c, b, a7, M, P, ah, n, m, a5, R, S, a2, k, X, Z, ab, ae, ad, af, ai, F, aj, l, p, r, t, d, a3, L, e, U, w, a0, a4, u, ag, ak, Y, ac, f } from "./index-
|
|
2
|
+
import { K, j, N, A, h, a6, B, z, y, E, Q, O, T, W, o, C, q, v, x, _, $, aa, a1, H, J, D, a9, a8, G, c, b, a7, M, P, ah, n, m, a5, R, S, a2, k, X, Z, ab, ae, ad, af, ai, F, aj, l, p, r, t, d, a3, L, e, U, w, a0, a4, u, ag, ak, Y, ac, f } from "./index-318c076b.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -1102,6 +1102,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1102
1102
|
onExitEditing,
|
|
1103
1103
|
onSubmit,
|
|
1104
1104
|
autoCollapse,
|
|
1105
|
+
enableHeadingsIdPlugin,
|
|
1105
1106
|
...rest
|
|
1106
1107
|
}) {
|
|
1107
1108
|
if (editing && onSubmit) {
|
|
@@ -1116,16 +1117,32 @@ var __publicField = (obj, key, value) => {
|
|
|
1116
1117
|
);
|
|
1117
1118
|
}
|
|
1118
1119
|
if (!autoCollapse) {
|
|
1119
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1120
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1121
|
+
StyledBlockletEditor,
|
|
1122
|
+
{
|
|
1123
|
+
editable: false,
|
|
1124
|
+
editorState: inferInitialEditorState(content),
|
|
1125
|
+
enableHeadingsIdPlugin,
|
|
1126
|
+
children: [
|
|
1127
|
+
/* @__PURE__ */ jsxRuntime.jsx(ImagePathFixerPlugin, {}),
|
|
1128
|
+
/* @__PURE__ */ jsxRuntime.jsx(VideoPathFixerPlugin, {}),
|
|
1129
|
+
/* @__PURE__ */ jsxRuntime.jsx(CheckboxPlugin, { send: onSubmit })
|
|
1130
|
+
]
|
|
1131
|
+
}
|
|
1132
|
+
) });
|
|
1124
1133
|
}
|
|
1125
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsx(ViewMore, { ...rest, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1134
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsx(ViewMore, { ...rest, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1135
|
+
StyledBlockletEditor,
|
|
1136
|
+
{
|
|
1137
|
+
editable: false,
|
|
1138
|
+
editorState: inferInitialEditorState(content),
|
|
1139
|
+
enableHeadingsIdPlugin,
|
|
1140
|
+
children: [
|
|
1141
|
+
/* @__PURE__ */ jsxRuntime.jsx(ImagePathFixerPlugin, {}),
|
|
1142
|
+
/* @__PURE__ */ jsxRuntime.jsx(CheckboxPlugin, { send: onSubmit })
|
|
1143
|
+
]
|
|
1144
|
+
}
|
|
1145
|
+
) }) });
|
|
1129
1146
|
}
|
|
1130
1147
|
const StyledMuiMenu = Theme.styled(MuiMenu)`
|
|
1131
1148
|
.MuiMenuItem-root {
|
|
@@ -4363,11 +4380,20 @@ var __publicField = (obj, key, value) => {
|
|
|
4363
4380
|
/* @__PURE__ */ jsxRuntime.jsx(material.Skeleton, { width: "60%" }),
|
|
4364
4381
|
/* @__PURE__ */ jsxRuntime.jsx(material.Skeleton, { width: "40%" })
|
|
4365
4382
|
] });
|
|
4366
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4383
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4384
|
+
BlockletEditor$1,
|
|
4385
|
+
{
|
|
4386
|
+
editorState: inferInitialEditorState(content),
|
|
4387
|
+
editable: false,
|
|
4388
|
+
enableHeadingsIdPlugin: true,
|
|
4389
|
+
...rest,
|
|
4390
|
+
children: [
|
|
4391
|
+
/* @__PURE__ */ jsxRuntime.jsx(ImagePathFixerPlugin, {}),
|
|
4392
|
+
/* @__PURE__ */ jsxRuntime.jsx(VideoPathFixerPlugin, {}),
|
|
4393
|
+
children
|
|
4394
|
+
]
|
|
4395
|
+
}
|
|
4396
|
+
) });
|
|
4371
4397
|
}
|
|
4372
4398
|
const useBeforeUnloadPrompt = (dirty) => {
|
|
4373
4399
|
react.useEffect(() => {
|
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.15",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@arcblock/ws": "^1.18.103",
|
|
32
|
-
"@blocklet/editor": "1.6.
|
|
33
|
-
"@blocklet/labels": "1.6.
|
|
32
|
+
"@blocklet/editor": "1.6.15",
|
|
33
|
+
"@blocklet/labels": "1.6.15",
|
|
34
34
|
"@blocklet/uploader": "^0.0.53",
|
|
35
35
|
"@emotion/css": "^11.10.5",
|
|
36
36
|
"@emotion/react": "^11.10.5",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"resolutions": {
|
|
93
93
|
"react": "^18.2.0"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "eca884fac4b23e5b1af6535ac8e822c8d9f4568f"
|
|
96
96
|
}
|