@blocklet/discuss-kit-ux 2.1.29 → 2.1.31
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.
|
@@ -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-BEQYUvbN.mjs";
|
|
8
8
|
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -2525,8 +2525,12 @@ const uniqAndSort$1 = (list, order) => {
|
|
|
2525
2525
|
const sorted = orderBy(unique, ["createdAt", "id"], [order, order]);
|
|
2526
2526
|
return sorted;
|
|
2527
2527
|
};
|
|
2528
|
+
const getHighlightedId = () => {
|
|
2529
|
+
const id2 = window.location.hash.substring(1);
|
|
2530
|
+
return /^[\w-]+$/.test(id2) ? id2 : "";
|
|
2531
|
+
};
|
|
2528
2532
|
const useAutoScroll = (data, containerHeight) => {
|
|
2529
|
-
const highlightedRef = useRef(
|
|
2533
|
+
const highlightedRef = useRef(getHighlightedId());
|
|
2530
2534
|
const lastHeightRef = useRef(containerHeight);
|
|
2531
2535
|
const autoScrolledRef = useRef(false);
|
|
2532
2536
|
const matchTargetedPost = (posts) => {
|
|
@@ -2602,7 +2606,7 @@ function CommentsProvider({
|
|
|
2602
2606
|
return acc;
|
|
2603
2607
|
}, {});
|
|
2604
2608
|
}, [state]);
|
|
2605
|
-
const highlightedRef = useRef(
|
|
2609
|
+
const highlightedRef = useRef(getHighlightedId());
|
|
2606
2610
|
const limit = 15;
|
|
2607
2611
|
const initialRepliesLimit = -1;
|
|
2608
2612
|
useEffect(() => {
|
|
@@ -4717,7 +4721,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
|
|
|
4717
4721
|
}
|
|
4718
4722
|
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" }) });
|
|
4719
4723
|
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" }) });
|
|
4720
|
-
const Editor = lazy(() => import("./editor-
|
|
4724
|
+
const Editor = lazy(() => import("./editor-Dp_ggY0W.mjs"));
|
|
4721
4725
|
function LazyEditor(props) {
|
|
4722
4726
|
const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
4723
4727
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
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, ar, N, am, 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, ar, N, am, as, l, f, p, r, j, t, h, aa, U, c, a0, z, a7, ab, u, an, d, at, a3, aj, e } from "./index-BEQYUvbN.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -2448,8 +2448,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2448
2448
|
const sorted = orderBy(unique, ["createdAt", "id"], [order, order]);
|
|
2449
2449
|
return sorted;
|
|
2450
2450
|
};
|
|
2451
|
+
const getHighlightedId = () => {
|
|
2452
|
+
const id2 = window.location.hash.substring(1);
|
|
2453
|
+
return /^[\w-]+$/.test(id2) ? id2 : "";
|
|
2454
|
+
};
|
|
2451
2455
|
const useAutoScroll = (data, containerHeight) => {
|
|
2452
|
-
const highlightedRef = react.useRef(
|
|
2456
|
+
const highlightedRef = react.useRef(getHighlightedId());
|
|
2453
2457
|
const lastHeightRef = react.useRef(containerHeight);
|
|
2454
2458
|
const autoScrolledRef = react.useRef(false);
|
|
2455
2459
|
const matchTargetedPost = (posts) => {
|
|
@@ -2525,7 +2529,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2525
2529
|
return acc;
|
|
2526
2530
|
}, {});
|
|
2527
2531
|
}, [state]);
|
|
2528
|
-
const highlightedRef = react.useRef(
|
|
2532
|
+
const highlightedRef = react.useRef(getHighlightedId());
|
|
2529
2533
|
const limit = 15;
|
|
2530
2534
|
const initialRepliesLimit = -1;
|
|
2531
2535
|
react.useEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-ux",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.31",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"ufo": "^1.5.4",
|
|
44
44
|
"unstated-next": "^1.1.0",
|
|
45
45
|
"url-join": "^4.0.1",
|
|
46
|
-
"@blocklet/editor": "^2.1.
|
|
47
|
-
"@blocklet/labels": "^2.1.
|
|
46
|
+
"@blocklet/editor": "^2.1.31",
|
|
47
|
+
"@blocklet/labels": "^2.1.31"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@arcblock/did-connect": "^2.10.36",
|