@blocklet/discuss-kit-ux 2.3.104 → 2.3.105
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/constants.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare const AIGNE_RUNTIME_DID = "z2qaBP9SahqU2L2YA3ip7NecwKACMByTFuiJ2";
|
|
2
2
|
export declare const AIGNE_STUDIO_DID = "z8iZpog7mcgcgBZzTiXJCWESvmnRrQmnd3XBB";
|
|
3
3
|
export declare const DISCUSS_KIT_DID = "z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu";
|
|
4
|
+
export declare const MAX_DISCUSSION_LENGTH: number;
|
|
5
|
+
export declare const MAX_COMMENT_LENGTH: number;
|
|
@@ -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 { lazyRetry } from "@arcblock/ux/lib/Util";
|
|
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-r29hqncV.mjs";
|
|
8
8
|
const BlockletEditor = lazyRetry(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -591,6 +591,20 @@ const useMeasure = () => {
|
|
|
591
591
|
const size = useSize(ref);
|
|
592
592
|
return [ref, size || { width: 0, height: 0 }];
|
|
593
593
|
};
|
|
594
|
+
const AIGNE_RUNTIME_DID = "z2qaBP9SahqU2L2YA3ip7NecwKACMByTFuiJ2";
|
|
595
|
+
const AIGNE_STUDIO_DID = "z8iZpog7mcgcgBZzTiXJCWESvmnRrQmnd3XBB";
|
|
596
|
+
const DISCUSS_KIT_DID = "z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu";
|
|
597
|
+
const DEFAULT_MAX_DISCUSSION_LENGTH = 25e3;
|
|
598
|
+
const DEFAULT_MAX_COMMENT_LENGTH = 1e4;
|
|
599
|
+
const MAX_POST_LENGTH = 5e4;
|
|
600
|
+
const MAX_DISCUSSION_LENGTH = Math.min(
|
|
601
|
+
Number(window.blocklet.DISCUSS_KIT_MAX_DISCUSSION_LENGTH || DEFAULT_MAX_DISCUSSION_LENGTH),
|
|
602
|
+
MAX_POST_LENGTH
|
|
603
|
+
);
|
|
604
|
+
const MAX_COMMENT_LENGTH = Math.min(
|
|
605
|
+
Number(window.blocklet.DISCUSS_KIT_MAX_COMMENT_LENGTH || DEFAULT_MAX_COMMENT_LENGTH),
|
|
606
|
+
MAX_POST_LENGTH
|
|
607
|
+
);
|
|
594
608
|
const BlockletEditor$2 = lazyWithPreload(() => import("@blocklet/editor"));
|
|
595
609
|
const preloadInput = () => BlockletEditor$2.preload();
|
|
596
610
|
const Input = ({
|
|
@@ -684,7 +698,7 @@ const Input = ({
|
|
|
684
698
|
}
|
|
685
699
|
},
|
|
686
700
|
characterLimitConfig: {
|
|
687
|
-
maxLength:
|
|
701
|
+
maxLength: MAX_COMMENT_LENGTH,
|
|
688
702
|
indicatorStyle: {
|
|
689
703
|
position: "absolute",
|
|
690
704
|
bottom: 6,
|
|
@@ -1791,9 +1805,6 @@ const useLocaleContext = () => {
|
|
|
1791
1805
|
...rest
|
|
1792
1806
|
};
|
|
1793
1807
|
};
|
|
1794
|
-
const AIGNE_RUNTIME_DID = "z2qaBP9SahqU2L2YA3ip7NecwKACMByTFuiJ2";
|
|
1795
|
-
const AIGNE_STUDIO_DID = "z8iZpog7mcgcgBZzTiXJCWESvmnRrQmnd3XBB";
|
|
1796
|
-
const DISCUSS_KIT_DID = "z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu";
|
|
1797
1808
|
function hashText(text = "") {
|
|
1798
1809
|
return murmurhash.v3(text).toString(16);
|
|
1799
1810
|
}
|
|
@@ -2012,8 +2023,6 @@ const prefs = window.blocklet.preferences;
|
|
|
2012
2023
|
const preferences = {
|
|
2013
2024
|
...prefs,
|
|
2014
2025
|
// 对 preferences 做一些格式化处理
|
|
2015
|
-
maxCommentLength: parseInt(`${prefs.maxCommentLength}`, 10),
|
|
2016
|
-
maxDiscussionLength: parseInt(`${prefs.maxDiscussionLength}`, 10),
|
|
2017
2026
|
maxPinLimit: parseInt(`${prefs.maxPinLimit}`, 10),
|
|
2018
2027
|
maxFeaturedLimit: parseInt(`${prefs.maxFeaturedLimit}`, 10),
|
|
2019
2028
|
assignmentAuthorizedPassports: (_d = prefs.assignmentAuthorizedPassports) == null ? void 0 : _d.split(",").map((x) => x.trim())
|
|
@@ -5101,7 +5110,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, icon, ...rest }) {
|
|
|
5101
5110
|
}
|
|
5102
5111
|
const tablerSend = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", 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" }) });
|
|
5103
5112
|
const tablerLetterCase = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", 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" }) });
|
|
5104
|
-
const Editor = lazyRetry(() => import("./editor-
|
|
5113
|
+
const Editor = lazyRetry(() => import("./editor-DIaoF22Y.mjs"));
|
|
5105
5114
|
function LazyEditor(props) {
|
|
5106
5115
|
const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
5107
5116
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
|
@@ -5332,7 +5341,7 @@ function ChatInput({ initialContent, send, onContentChange, onFocusChange }) {
|
|
|
5332
5341
|
value: {
|
|
5333
5342
|
minimalMode: true,
|
|
5334
5343
|
characterLimitConfig: {
|
|
5335
|
-
maxLength:
|
|
5344
|
+
maxLength: MAX_COMMENT_LENGTH,
|
|
5336
5345
|
indicatorStyle: { display: "none" }
|
|
5337
5346
|
}
|
|
5338
5347
|
},
|
|
@@ -6346,7 +6355,7 @@ function DefaultEditorConfigProvider({
|
|
|
6346
6355
|
AI,
|
|
6347
6356
|
templatePlugin,
|
|
6348
6357
|
characterLimitConfig: {
|
|
6349
|
-
maxLength:
|
|
6358
|
+
maxLength: MAX_DISCUSSION_LENGTH,
|
|
6350
6359
|
indicatorStyle: {
|
|
6351
6360
|
position: "fixed",
|
|
6352
6361
|
bottom: 12
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@blocklet/labels";
|
|
2
|
-
import { W, o, Y, aQ, A, n, af, B, G, N, L, O, ar, _, Z, a1, $, a0, a3, x, C, y, z, F, a7, a8, aj, aa, T, U, ae, D, ai, ah, K, H, J, aG, aH, b, m, ag, M, P, aC, aq, w, aR, aS, v, aE, aF, R, S, ab, as, aD, q, aP, a4, a6, ak, an, am, aM, aI, aA, at, Q, ao, aK, au, aJ, ax, ay, aN, aL, l, az, h, p, r, k, aw, t, j, ac, aB, X, aT, c, a2, E, a9, ad, aV, e, u, ap, d, av, aU, aO, a5, al, f } from "./index-
|
|
2
|
+
import { W, o, Y, aQ, A, n, af, B, G, N, L, O, ar, _, Z, a1, $, a0, a3, x, C, y, z, F, a7, a8, aj, aa, T, U, ae, D, ai, ah, K, H, J, aG, aH, b, m, ag, M, P, aC, aq, w, aR, aS, v, aE, aF, R, S, ab, as, aD, q, aP, a4, a6, ak, an, am, aM, aI, aA, at, Q, ao, aK, au, aJ, ax, ay, aN, aL, l, az, h, p, r, k, aw, t, j, ac, aB, X, aT, c, a2, E, a9, ad, aV, e, u, ap, d, av, aU, aO, a5, al, f } from "./index-r29hqncV.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -508,6 +508,20 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
508
508
|
const size = ahooks.useSize(ref);
|
|
509
509
|
return [ref, size || { width: 0, height: 0 }];
|
|
510
510
|
};
|
|
511
|
+
const AIGNE_RUNTIME_DID = "z2qaBP9SahqU2L2YA3ip7NecwKACMByTFuiJ2";
|
|
512
|
+
const AIGNE_STUDIO_DID = "z8iZpog7mcgcgBZzTiXJCWESvmnRrQmnd3XBB";
|
|
513
|
+
const DISCUSS_KIT_DID = "z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu";
|
|
514
|
+
const DEFAULT_MAX_DISCUSSION_LENGTH = 25e3;
|
|
515
|
+
const DEFAULT_MAX_COMMENT_LENGTH = 1e4;
|
|
516
|
+
const MAX_POST_LENGTH = 5e4;
|
|
517
|
+
const MAX_DISCUSSION_LENGTH = Math.min(
|
|
518
|
+
Number(window.blocklet.DISCUSS_KIT_MAX_DISCUSSION_LENGTH || DEFAULT_MAX_DISCUSSION_LENGTH),
|
|
519
|
+
MAX_POST_LENGTH
|
|
520
|
+
);
|
|
521
|
+
const MAX_COMMENT_LENGTH = Math.min(
|
|
522
|
+
Number(window.blocklet.DISCUSS_KIT_MAX_COMMENT_LENGTH || DEFAULT_MAX_COMMENT_LENGTH),
|
|
523
|
+
MAX_POST_LENGTH
|
|
524
|
+
);
|
|
511
525
|
const BlockletEditor$3 = reactLazyWithPreload.lazyWithPreload(() => import("@blocklet/editor"));
|
|
512
526
|
const preloadInput = () => BlockletEditor$3.preload();
|
|
513
527
|
const Input = ({
|
|
@@ -601,7 +615,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
601
615
|
}
|
|
602
616
|
},
|
|
603
617
|
characterLimitConfig: {
|
|
604
|
-
maxLength:
|
|
618
|
+
maxLength: MAX_COMMENT_LENGTH,
|
|
605
619
|
indicatorStyle: {
|
|
606
620
|
position: "absolute",
|
|
607
621
|
bottom: 6,
|
|
@@ -1708,9 +1722,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1708
1722
|
...rest
|
|
1709
1723
|
};
|
|
1710
1724
|
};
|
|
1711
|
-
const AIGNE_RUNTIME_DID = "z2qaBP9SahqU2L2YA3ip7NecwKACMByTFuiJ2";
|
|
1712
|
-
const AIGNE_STUDIO_DID = "z8iZpog7mcgcgBZzTiXJCWESvmnRrQmnd3XBB";
|
|
1713
|
-
const DISCUSS_KIT_DID = "z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu";
|
|
1714
1725
|
function hashText(text2 = "") {
|
|
1715
1726
|
return murmurhash.v3(text2).toString(16);
|
|
1716
1727
|
}
|
|
@@ -1929,8 +1940,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1929
1940
|
const preferences = {
|
|
1930
1941
|
...prefs,
|
|
1931
1942
|
// 对 preferences 做一些格式化处理
|
|
1932
|
-
maxCommentLength: parseInt(`${prefs.maxCommentLength}`, 10),
|
|
1933
|
-
maxDiscussionLength: parseInt(`${prefs.maxDiscussionLength}`, 10),
|
|
1934
1943
|
maxPinLimit: parseInt(`${prefs.maxPinLimit}`, 10),
|
|
1935
1944
|
maxFeaturedLimit: parseInt(`${prefs.maxFeaturedLimit}`, 10),
|
|
1936
1945
|
assignmentAuthorizedPassports: (_d = prefs.assignmentAuthorizedPassports) == null ? void 0 : _d.split(",").map((x) => x.trim())
|
|
@@ -5249,7 +5258,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5249
5258
|
value: {
|
|
5250
5259
|
minimalMode: true,
|
|
5251
5260
|
characterLimitConfig: {
|
|
5252
|
-
maxLength:
|
|
5261
|
+
maxLength: MAX_COMMENT_LENGTH,
|
|
5253
5262
|
indicatorStyle: { display: "none" }
|
|
5254
5263
|
}
|
|
5255
5264
|
},
|
|
@@ -6263,7 +6272,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
6263
6272
|
AI,
|
|
6264
6273
|
templatePlugin,
|
|
6265
6274
|
characterLimitConfig: {
|
|
6266
|
-
maxLength:
|
|
6275
|
+
maxLength: MAX_DISCUSSION_LENGTH,
|
|
6267
6276
|
indicatorStyle: {
|
|
6268
6277
|
position: "fixed",
|
|
6269
6278
|
bottom: 12
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-ux",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.105",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"unstated-next": "^1.1.0",
|
|
49
49
|
"url-join": "^4.0.1",
|
|
50
50
|
"zustand": "^4.5.5",
|
|
51
|
-
"@blocklet/editor": "^2.3.
|
|
52
|
-
"@blocklet/labels": "^2.3.
|
|
51
|
+
"@blocklet/editor": "^2.3.105",
|
|
52
|
+
"@blocklet/labels": "^2.3.105"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@arcblock/did-connect": "^2.10.36",
|