@blocklet/discuss-kit-ux 2.0.120 → 2.0.122
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-mevW5K3n.mjs";
|
|
8
8
|
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
4
|
var _a, _b, _c, _d;
|
|
8
5
|
import { Labels2, LabelPicker } from "@blocklet/labels";
|
|
9
6
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
@@ -537,12 +534,9 @@ function AutoClearPlugin$1({ value, isChanged }) {
|
|
|
537
534
|
const [editor] = useLexicalComposerContext();
|
|
538
535
|
useEffect(() => {
|
|
539
536
|
try {
|
|
540
|
-
if (!isChanged)
|
|
541
|
-
|
|
542
|
-
if (
|
|
543
|
-
return;
|
|
544
|
-
if (!editor)
|
|
545
|
-
return;
|
|
537
|
+
if (!isChanged) return;
|
|
538
|
+
if (value) return;
|
|
539
|
+
if (!editor) return;
|
|
546
540
|
editor.update(() => {
|
|
547
541
|
const root = $getRoot();
|
|
548
542
|
const selection = $getSelection();
|
|
@@ -1803,7 +1797,7 @@ function PostComponent({
|
|
|
1803
1797
|
renderExtraContent && renderExtraContent(postContext)
|
|
1804
1798
|
] });
|
|
1805
1799
|
}
|
|
1806
|
-
const tablerMessageCircle = (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: "m3 20l1.3-3.9C1.976 12.663 2.874 8.228 6.4 5.726c3.526-2.501 8.59-2.296 11.845.48c3.255 2.777 3.695 7.266 1.029 10.
|
|
1800
|
+
const tablerMessageCircle = (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: "m3 20l1.3-3.9C1.976 12.663 2.874 8.228 6.4 5.726c3.526-2.501 8.59-2.296 11.845.48c3.255 2.777 3.695 7.266 1.029 10.501S11.659 20.922 7.7 19z" }) });
|
|
1807
1801
|
const iconoirThumbsUp = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeWidth: 1.5, children: [
|
|
1808
1802
|
/* @__PURE__ */ jsx("path", { d: "M16.472 20H4.1a.6.6 0 0 1-.6-.6V9.6a.6.6 0 0 1 .6-.6h2.768a2 2 0 0 0 1.715-.971l2.71-4.517a1.631 1.631 0 0 1 2.961 1.308l-1.022 3.408a.6.6 0 0 0 .574.772h4.575a2 2 0 0 1 1.93 2.526l-1.91 7A2 2 0 0 1 16.473 20Z" }),
|
|
1809
1803
|
/* @__PURE__ */ jsx("path", { strokeLinejoin: "round", d: "M7 20V9" })
|
|
@@ -4789,7 +4783,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
|
|
|
4789
4783
|
}
|
|
4790
4784
|
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" }) });
|
|
4791
4785
|
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" }) });
|
|
4792
|
-
const Editor = lazy(() => import("./editor-
|
|
4786
|
+
const Editor = lazy(() => import("./editor-BFM9XLmp.mjs"));
|
|
4793
4787
|
function LazyEditor(props) {
|
|
4794
4788
|
const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
4795
4789
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
|
@@ -4947,8 +4941,7 @@ function ChatInput({ initialContent, send, onContentChange, onFocusChange }) {
|
|
|
4947
4941
|
};
|
|
4948
4942
|
const compactView = mobile.any && !focused;
|
|
4949
4943
|
const handleSend = () => {
|
|
4950
|
-
if (!content || editorBusy)
|
|
4951
|
-
return;
|
|
4944
|
+
if (!content || editorBusy) return;
|
|
4952
4945
|
send(content);
|
|
4953
4946
|
setContent("");
|
|
4954
4947
|
setLastSent(Date.now());
|
|
@@ -5135,8 +5128,7 @@ function ChatRoom({ chat, inWallet, ...rest }) {
|
|
|
5135
5128
|
};
|
|
5136
5129
|
const onFocusChange = (focused) => {
|
|
5137
5130
|
var _a3;
|
|
5138
|
-
if (downSm && focused)
|
|
5139
|
-
(_a3 = messageListRef.current) == null ? void 0 : _a3.scrollToBottom();
|
|
5131
|
+
if (downSm && focused) (_a3 = messageListRef.current) == null ? void 0 : _a3.scrollToBottom();
|
|
5140
5132
|
};
|
|
5141
5133
|
const renderRoomHeader = () => {
|
|
5142
5134
|
if (chat.type === "notification") {
|
|
@@ -12017,8 +12009,7 @@ function PointUpProvider({ children }) {
|
|
|
12017
12009
|
useEffect(() => {
|
|
12018
12010
|
wsClient.connect();
|
|
12019
12011
|
return () => {
|
|
12020
|
-
if (wsClient.isConnected())
|
|
12021
|
-
;
|
|
12012
|
+
if (wsClient.isConnected()) ;
|
|
12022
12013
|
};
|
|
12023
12014
|
}, []);
|
|
12024
12015
|
const value = useMemo(() => {
|
|
@@ -12162,8 +12153,7 @@ function ButtonGroup({
|
|
|
12162
12153
|
} else {
|
|
12163
12154
|
setSelectAll(true);
|
|
12164
12155
|
}
|
|
12165
|
-
if (onSelectTab)
|
|
12166
|
-
onSelectTab(selectTab);
|
|
12156
|
+
if (onSelectTab) onSelectTab(selectTab);
|
|
12167
12157
|
}, [selectTab, selectedArray, boardId]);
|
|
12168
12158
|
return (
|
|
12169
12159
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
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, am, ar, N, 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, am, ar, N, as, l, f, p, r, j, t, h, aa, U, c, a0, z, a7, ab, u, an, d, at, a3, aj, e } from "./index-mevW5K3n.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
})(this, function(exports2, labels, jsxRuntime, styles, Theme, react, material, isNil, config, reactLazyWithPreload, LexicalComposerContext, lexical$1, ahooks, Box, LoadingButton, iconsMaterial, context, Alert, isBoolean, Button, DidAvatar, AvatarGroup, colors, useMediaQuery, DID, Tooltip, reactRouterDom, reactHooks, UxRelativeTime, Chip, Stack, groupBy, flatMap, uniqBy, trim, Avatar$1, BrokenImageIcon, react$1, Empty$3, Session, cmp, bridge, NotificationsActiveOutlinedIcon, CheckboxPlugin, DIDAddress, MuiMenuItem, clsx, IconButton$1, MuiMenu, Dialog, orderBy, Typography, Skeleton, ReactDOM, joinUrl, dayjs, relativeTime, mitt, CircularProgress, reactHelmet, reactFlipToolkit, grey, editor$1, Fab, debounce, useIsFocused, BusyPlugin, TextField, AddIcon, axios, Toast, MuiPagination, unstatedNext, Cookie, ws, css, OnContentChangePlugin, ShortcutPlugin$1, SafeAreaPlugin, text, ufo, 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
|
-
var __publicField = (obj, key, value) =>
|
|
7
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
-
return value;
|
|
9
|
-
};
|
|
6
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
7
|
|
|
11
8
|
var _a, _b, _c, _d;
|
|
12
9
|
const typography = {
|
|
@@ -462,12 +459,9 @@ var __publicField = (obj, key, value) => {
|
|
|
462
459
|
const [editor2] = LexicalComposerContext.useLexicalComposerContext();
|
|
463
460
|
react.useEffect(() => {
|
|
464
461
|
try {
|
|
465
|
-
if (!isChanged)
|
|
466
|
-
|
|
467
|
-
if (
|
|
468
|
-
return;
|
|
469
|
-
if (!editor2)
|
|
470
|
-
return;
|
|
462
|
+
if (!isChanged) return;
|
|
463
|
+
if (value) return;
|
|
464
|
+
if (!editor2) return;
|
|
471
465
|
editor2.update(() => {
|
|
472
466
|
const root = lexical$1.$getRoot();
|
|
473
467
|
const selection = lexical$1.$getSelection();
|
|
@@ -1728,7 +1722,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1728
1722
|
renderExtraContent && renderExtraContent(postContext)
|
|
1729
1723
|
] });
|
|
1730
1724
|
}
|
|
1731
|
-
const tablerMessageCircle = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", "data-iconify": "tabler", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m3 20l1.3-3.9C1.976 12.663 2.874 8.228 6.4 5.726c3.526-2.501 8.59-2.296 11.845.48c3.255 2.777 3.695 7.266 1.029 10.
|
|
1725
|
+
const tablerMessageCircle = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", "data-iconify": "tabler", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m3 20l1.3-3.9C1.976 12.663 2.874 8.228 6.4 5.726c3.526-2.501 8.59-2.296 11.845.48c3.255 2.777 3.695 7.266 1.029 10.501S11.659 20.922 7.7 19z" }) });
|
|
1732
1726
|
const iconoirThumbsUp = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeWidth: 1.5, children: [
|
|
1733
1727
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.472 20H4.1a.6.6 0 0 1-.6-.6V9.6a.6.6 0 0 1 .6-.6h2.768a2 2 0 0 0 1.715-.971l2.71-4.517a1.631 1.631 0 0 1 2.961 1.308l-1.022 3.408a.6.6 0 0 0 .574.772h4.575a2 2 0 0 1 1.93 2.526l-1.91 7A2 2 0 0 1 16.473 20Z" }),
|
|
1734
1728
|
/* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinejoin: "round", d: "M7 20V9" })
|
|
@@ -4872,8 +4866,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4872
4866
|
};
|
|
4873
4867
|
const compactView = mobile.any && !focused;
|
|
4874
4868
|
const handleSend = () => {
|
|
4875
|
-
if (!content || editorBusy)
|
|
4876
|
-
return;
|
|
4869
|
+
if (!content || editorBusy) return;
|
|
4877
4870
|
send(content);
|
|
4878
4871
|
setContent("");
|
|
4879
4872
|
setLastSent(Date.now());
|
|
@@ -5060,8 +5053,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5060
5053
|
};
|
|
5061
5054
|
const onFocusChange = (focused) => {
|
|
5062
5055
|
var _a3;
|
|
5063
|
-
if (downSm && focused)
|
|
5064
|
-
(_a3 = messageListRef.current) == null ? void 0 : _a3.scrollToBottom();
|
|
5056
|
+
if (downSm && focused) (_a3 = messageListRef.current) == null ? void 0 : _a3.scrollToBottom();
|
|
5065
5057
|
};
|
|
5066
5058
|
const renderRoomHeader = () => {
|
|
5067
5059
|
if (chat.type === "notification") {
|
|
@@ -11942,8 +11934,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11942
11934
|
react.useEffect(() => {
|
|
11943
11935
|
wsClient.connect();
|
|
11944
11936
|
return () => {
|
|
11945
|
-
if (wsClient.isConnected())
|
|
11946
|
-
;
|
|
11937
|
+
if (wsClient.isConnected()) ;
|
|
11947
11938
|
};
|
|
11948
11939
|
}, []);
|
|
11949
11940
|
const value = react.useMemo(() => {
|
|
@@ -12087,8 +12078,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12087
12078
|
} else {
|
|
12088
12079
|
setSelectAll(true);
|
|
12089
12080
|
}
|
|
12090
|
-
if (onSelectTab)
|
|
12091
|
-
onSelectTab(selectTab);
|
|
12081
|
+
if (onSelectTab) onSelectTab(selectTab);
|
|
12092
12082
|
}, [selectTab, selectedArray, boardId]);
|
|
12093
12083
|
return (
|
|
12094
12084
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
@@ -12359,11 +12349,10 @@ var __publicField = (obj, key, value) => {
|
|
|
12359
12349
|
exports2.useUploader = useUploader;
|
|
12360
12350
|
exports2.utils = utils;
|
|
12361
12351
|
Object.keys(labels).forEach((k) => {
|
|
12362
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k))
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
});
|
|
12352
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k)) Object.defineProperty(exports2, k, {
|
|
12353
|
+
enumerable: true,
|
|
12354
|
+
get: () => labels[k]
|
|
12355
|
+
});
|
|
12367
12356
|
});
|
|
12368
12357
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
12369
12358
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-ux",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.122",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@arcblock/bridge": "^2.10.
|
|
32
|
-
"@arcblock/react-hooks": "^2.10.
|
|
31
|
+
"@arcblock/bridge": "^2.10.20",
|
|
32
|
+
"@arcblock/react-hooks": "^2.10.20",
|
|
33
33
|
"@arcblock/ws": "^1.18.128",
|
|
34
|
-
"@blocklet/editor": "2.0.
|
|
35
|
-
"@blocklet/labels": "2.0.
|
|
34
|
+
"@blocklet/editor": "2.0.122",
|
|
35
|
+
"@blocklet/labels": "2.0.122",
|
|
36
36
|
"@blocklet/uploader": "^0.1.20",
|
|
37
37
|
"@emotion/css": "^11.10.5",
|
|
38
38
|
"@emotion/react": "^11.10.5",
|
|
@@ -93,12 +93,12 @@
|
|
|
93
93
|
"rollup-plugin-node-externals": "^7.1.2",
|
|
94
94
|
"typescript": "^4.6.4",
|
|
95
95
|
"unplugin-icons": "^0.14.14",
|
|
96
|
-
"vite": "^5.
|
|
96
|
+
"vite": "^5.4.0",
|
|
97
97
|
"vite-plugin-dts": "^3.8.1",
|
|
98
98
|
"vite-plugin-libcss": "^1.1.1"
|
|
99
99
|
},
|
|
100
100
|
"resolutions": {
|
|
101
101
|
"react": "^18.2.0"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "710c483b528511a1f4e77e39f71e8c9b7fb3290f"
|
|
104
104
|
}
|