@blocklet/discuss-kit-ux 1.6.257 → 1.6.259

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-Dn-NpJW2.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-CqCFTP8C.mjs";
8
8
  const BlockletEditor = lazy(() => import("@blocklet/editor"));
9
9
  const Root = styled(Box)`
10
10
  .be-editable,
@@ -666,6 +666,10 @@ const StyledInput = styled(Input)`
666
666
  .be-shell {
667
667
  padding-bottom: 44px;
668
668
  }
669
+ // 评论输入框空间较小, 底部多预留一些空间, 当选中图片时, 避免图片下方的工具栏被遮挡
670
+ .be-editable {
671
+ padding-bottom: 64px !important;
672
+ }
669
673
  > .MuiAlert-root {
670
674
  position: absolute;
671
675
  left: 0;
@@ -3596,7 +3600,7 @@ function UnreadNotificationProvider({ fetchUnreadState, children }) {
3596
3600
  setUnread(unreadState);
3597
3601
  };
3598
3602
  useEffect(() => {
3599
- if (session.user && !preferences.disableNotificationBadge) {
3603
+ if (session.user && !preferences.disableNotificationBadge && preferences.chatEnabled) {
3600
3604
  update();
3601
3605
  }
3602
3606
  }, [session.user]);
@@ -5317,7 +5321,7 @@ const iconoirMessageText = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0
5317
5321
  ] }) });
5318
5322
  function ChatHeaderAddon({ ...rest }) {
5319
5323
  const { unread } = useUnreadNotification();
5320
- if (preferences.disableNotificationBadge) {
5324
+ if (preferences.disableNotificationBadge || !preferences.chatEnabled) {
5321
5325
  return null;
5322
5326
  }
5323
5327
  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 } }) }) });
@@ -5603,7 +5607,7 @@ function Pagination({
5603
5607
  }
5604
5608
  );
5605
5609
  }
5606
- const Editor = lazy(() => import("./editor-BYYdot9H.mjs"));
5610
+ const Editor = lazy(() => import("./editor-BSx9ID0t.mjs"));
5607
5611
  function LazyEditor(props) {
5608
5612
  const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
5609
5613
  /* @__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, 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-Dn-NpJW2.mjs";
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-CqCFTP8C.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -595,6 +595,10 @@ var __publicField = (obj, key, value) => {
595
595
  .be-shell {
596
596
  padding-bottom: 44px;
597
597
  }
598
+ // 评论输入框空间较小, 底部多预留一些空间, 当选中图片时, 避免图片下方的工具栏被遮挡
599
+ .be-editable {
600
+ padding-bottom: 64px !important;
601
+ }
598
602
  > .MuiAlert-root {
599
603
  position: absolute;
600
604
  left: 0;
@@ -3525,7 +3529,7 @@ var __publicField = (obj, key, value) => {
3525
3529
  setUnread(unreadState);
3526
3530
  };
3527
3531
  react.useEffect(() => {
3528
- if (session.user && !preferences.disableNotificationBadge) {
3532
+ if (session.user && !preferences.disableNotificationBadge && preferences.chatEnabled) {
3529
3533
  update();
3530
3534
  }
3531
3535
  }, [session.user]);
@@ -5246,7 +5250,7 @@ var __publicField = (obj, key, value) => {
5246
5250
  ] }) });
5247
5251
  function ChatHeaderAddon({ ...rest }) {
5248
5252
  const { unread } = useUnreadNotification();
5249
- if (preferences.disableNotificationBadge) {
5253
+ if (preferences.disableNotificationBadge || !preferences.chatEnabled) {
5250
5254
  return null;
5251
5255
  }
5252
5256
  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 } }) }) });
@@ -65,5 +65,6 @@ declare const preferences: {
65
65
  blogEnabled: boolean;
66
66
  docEnabled: boolean;
67
67
  bookmarkEnabled: boolean;
68
+ chatEnabled: boolean;
68
69
  };
69
70
  export default preferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "1.6.257",
3
+ "version": "1.6.259",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -31,8 +31,8 @@
31
31
  "@arcblock/bridge": "^2.9.77",
32
32
  "@arcblock/react-hooks": "^2.9.80",
33
33
  "@arcblock/ws": "^1.18.116",
34
- "@blocklet/editor": "1.6.257",
35
- "@blocklet/labels": "1.6.257",
34
+ "@blocklet/editor": "1.6.259",
35
+ "@blocklet/labels": "1.6.259",
36
36
  "@blocklet/uploader": "^0.1.2",
37
37
  "@emotion/css": "^11.10.5",
38
38
  "@emotion/react": "^11.10.5",
@@ -99,5 +99,5 @@
99
99
  "resolutions": {
100
100
  "react": "^18.2.0"
101
101
  },
102
- "gitHead": "427c78b7cf9dbaaab2f6576e8da87d761156e280"
102
+ "gitHead": "78358e835f3095766fe93804a6ae1b30833b2a9f"
103
103
  }