@blocklet/discuss-kit-ux 2.0.156 → 2.0.158
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-BsuKlk5J.mjs";
|
|
8
8
|
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -3756,7 +3756,7 @@ function UnreadNotificationProvider({ fetchUnreadState, children }) {
|
|
|
3756
3756
|
setUnread(unreadState);
|
|
3757
3757
|
};
|
|
3758
3758
|
useEffect(() => {
|
|
3759
|
-
if (session.user &&
|
|
3759
|
+
if (session.user && preferences.enableNotificationBadge && preferences.chatEnabled) {
|
|
3760
3760
|
update();
|
|
3761
3761
|
}
|
|
3762
3762
|
}, [session.user]);
|
|
@@ -4304,7 +4304,7 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4304
4304
|
const renderQuote = ({ title, cover }) => {
|
|
4305
4305
|
if ("post" in message) {
|
|
4306
4306
|
return /* @__PURE__ */ jsxs(Box$1, { sx: { color: 14, mt: 1 }, children: [
|
|
4307
|
-
|
|
4307
|
+
/* @__PURE__ */ jsx(
|
|
4308
4308
|
Typography,
|
|
4309
4309
|
{
|
|
4310
4310
|
component: "a",
|
|
@@ -4312,7 +4312,7 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4312
4312
|
href: message.link,
|
|
4313
4313
|
target: "_blank",
|
|
4314
4314
|
style: { fontSize: 14, color: "#2fafff", textDecoration: "none" },
|
|
4315
|
-
children: title
|
|
4315
|
+
children: title || t("common.link")
|
|
4316
4316
|
}
|
|
4317
4317
|
),
|
|
4318
4318
|
cover && // cover image
|
|
@@ -4713,7 +4713,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
|
|
|
4713
4713
|
}
|
|
4714
4714
|
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" }) });
|
|
4715
4715
|
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" }) });
|
|
4716
|
-
const Editor = lazy(() => import("./editor-
|
|
4716
|
+
const Editor = lazy(() => import("./editor-CiPMRi-E.mjs"));
|
|
4717
4717
|
function LazyEditor(props) {
|
|
4718
4718
|
const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
4719
4719
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
|
@@ -5750,7 +5750,7 @@ const iconoirMessageText = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0
|
|
|
5750
5750
|
] }) });
|
|
5751
5751
|
function ChatHeaderAddon({ ...rest }) {
|
|
5752
5752
|
const { unread } = useUnreadNotification();
|
|
5753
|
-
if (preferences.
|
|
5753
|
+
if (!preferences.enableNotificationBadge || !preferences.chatEnabled) {
|
|
5754
5754
|
return null;
|
|
5755
5755
|
}
|
|
5756
5756
|
return /* @__PURE__ */ jsx(IconButton$2, { size: "medium", ...rest, component: Link, to: "/chat", children: /* @__PURE__ */ jsx(Badge$1, { color: "error", variant: "dot", invisible: !unread, children: /* @__PURE__ */ jsx(iconoirMessageText, { style: { fontSize: 20 } }) }) });
|
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-BsuKlk5J.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -3681,7 +3681,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3681
3681
|
setUnread(unreadState);
|
|
3682
3682
|
};
|
|
3683
3683
|
react.useEffect(() => {
|
|
3684
|
-
if (session.user &&
|
|
3684
|
+
if (session.user && preferences.enableNotificationBadge && preferences.chatEnabled) {
|
|
3685
3685
|
update();
|
|
3686
3686
|
}
|
|
3687
3687
|
}, [session.user]);
|
|
@@ -4229,7 +4229,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4229
4229
|
const renderQuote = ({ title, cover }) => {
|
|
4230
4230
|
if ("post" in message) {
|
|
4231
4231
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { color: 14, mt: 1 }, children: [
|
|
4232
|
-
|
|
4232
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4233
4233
|
Typography,
|
|
4234
4234
|
{
|
|
4235
4235
|
component: "a",
|
|
@@ -4237,7 +4237,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4237
4237
|
href: message.link,
|
|
4238
4238
|
target: "_blank",
|
|
4239
4239
|
style: { fontSize: 14, color: "#2fafff", textDecoration: "none" },
|
|
4240
|
-
children: title
|
|
4240
|
+
children: title || t("common.link")
|
|
4241
4241
|
}
|
|
4242
4242
|
),
|
|
4243
4243
|
cover && // cover image
|
|
@@ -5675,7 +5675,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5675
5675
|
] }) });
|
|
5676
5676
|
function ChatHeaderAddon({ ...rest }) {
|
|
5677
5677
|
const { unread } = useUnreadNotification();
|
|
5678
|
-
if (preferences.
|
|
5678
|
+
if (!preferences.enableNotificationBadge || !preferences.chatEnabled) {
|
|
5679
5679
|
return null;
|
|
5680
5680
|
}
|
|
5681
5681
|
return /* @__PURE__ */ jsxRuntime.jsx(material.IconButton, { size: "medium", ...rest, component: reactRouterDom.Link, to: "/chat", children: /* @__PURE__ */ jsxRuntime.jsx(material.Badge, { color: "error", variant: "dot", invisible: !unread, children: /* @__PURE__ */ jsxRuntime.jsx(iconoirMessageText, { style: { fontSize: 20 } }) }) });
|
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.158",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@arcblock/bridge": "^2.10.28",
|
|
32
32
|
"@arcblock/react-hooks": "^2.10.28",
|
|
33
33
|
"@arcblock/ws": "^1.18.135",
|
|
34
|
-
"@blocklet/editor": "2.0.
|
|
35
|
-
"@blocklet/labels": "2.0.
|
|
34
|
+
"@blocklet/editor": "2.0.158",
|
|
35
|
+
"@blocklet/labels": "2.0.158",
|
|
36
36
|
"@blocklet/uploader": "^0.1.28",
|
|
37
37
|
"@emotion/css": "^11.10.5",
|
|
38
38
|
"@emotion/react": "^11.10.5",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"resolutions": {
|
|
101
101
|
"react": "^18.2.0"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "bda2e08a9457b80e0e2e28fc8aaae0491be88ad5"
|
|
104
104
|
}
|