@blocklet/discuss-kit-ux 2.1.67 → 2.1.69

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 @@ interface UnreadNotificationProviderProps {
4
4
  children: ReactNode;
5
5
  }
6
6
  interface UnreadNotificationContextType {
7
- unread: boolean;
7
+ unread: boolean | undefined;
8
8
  markAsUnread: (value?: boolean) => void;
9
9
  }
10
10
  export declare const UnreadNotificationContext: import('react').Context<UnreadNotificationContextType>;
@@ -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-CLShnSLV.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-D3UlBThf.mjs";
8
8
  const BlockletEditor = lazy(() => import("@blocklet/editor"));
9
9
  const Root = styled(Box)`
10
10
  .be-editable,
@@ -3747,7 +3747,7 @@ const UnreadNotificationContext = createContext(
3747
3747
  const useUnreadNotification = () => useContext(UnreadNotificationContext);
3748
3748
  function UnreadNotificationProvider({ fetchUnreadState, children }) {
3749
3749
  const { session } = useSessionContext();
3750
- const [unread, setUnread] = useState(false);
3750
+ const [unread, setUnread] = useState(void 0);
3751
3751
  const markAsUnread = useCallback((value2 = true) => setUnread(value2), []);
3752
3752
  const update = async () => {
3753
3753
  const unreadState = await fetchUnreadState();
@@ -4714,7 +4714,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
4714
4714
  }
4715
4715
  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" }) });
4716
4716
  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" }) });
4717
- const Editor = lazy(() => import("./editor-DFmGhxrk.mjs"));
4717
+ const Editor = lazy(() => import("./editor-BnOuyZ7N.mjs"));
4718
4718
  function LazyEditor(props) {
4719
4719
  const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
4720
4720
  /* @__PURE__ */ jsx(Skeleton, {}),
@@ -5573,7 +5573,9 @@ function ChatListInWallet({ sx, ...rest }) {
5573
5573
  const { unread } = useUnreadNotification();
5574
5574
  const { navigateToChatList, updateUnreadState, isWebNavbar, isInArcSphere } = useChatInWallet();
5575
5575
  useEffect(() => {
5576
- updateUnreadState(unread);
5576
+ if (unread !== void 0) {
5577
+ updateUnreadState(unread);
5578
+ }
5577
5579
  }, [unread, updateUnreadState]);
5578
5580
  if (!initialized) {
5579
5581
  return /* @__PURE__ */ jsx(Backdrop, { open: true, sx: { zIndex: (theme) => theme.zIndex.drawer + 1, bgcolor: "transparent" }, children: /* @__PURE__ */ jsx(CircularProgress$1, {}) });
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-CLShnSLV.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, 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-D3UlBThf.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -3672,7 +3672,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3672
3672
  const useUnreadNotification = () => react.useContext(UnreadNotificationContext);
3673
3673
  function UnreadNotificationProvider({ fetchUnreadState, children }) {
3674
3674
  const { session } = useSessionContext();
3675
- const [unread, setUnread] = react.useState(false);
3675
+ const [unread, setUnread] = react.useState(void 0);
3676
3676
  const markAsUnread = react.useCallback((value2 = true) => setUnread(value2), []);
3677
3677
  const update = async () => {
3678
3678
  const unreadState = await fetchUnreadState();
@@ -5498,7 +5498,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5498
5498
  const { unread } = useUnreadNotification();
5499
5499
  const { navigateToChatList, updateUnreadState, isWebNavbar, isInArcSphere } = useChatInWallet();
5500
5500
  react.useEffect(() => {
5501
- updateUnreadState(unread);
5501
+ if (unread !== void 0) {
5502
+ updateUnreadState(unread);
5503
+ }
5502
5504
  }, [unread, updateUnreadState]);
5503
5505
  if (!initialized) {
5504
5506
  return /* @__PURE__ */ jsxRuntime.jsx(material.Backdrop, { open: true, sx: { zIndex: (theme) => theme.zIndex.drawer + 1, bgcolor: "transparent" }, children: /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, {}) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "2.1.67",
3
+ "version": "2.1.69",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -44,8 +44,8 @@
44
44
  "ufo": "^1.5.4",
45
45
  "unstated-next": "^1.1.0",
46
46
  "url-join": "^4.0.1",
47
- "@blocklet/editor": "^2.1.67",
48
- "@blocklet/labels": "^2.1.67"
47
+ "@blocklet/editor": "^2.1.69",
48
+ "@blocklet/labels": "^2.1.69"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@arcblock/did-connect": "^2.10.36",