@blocklet/discuss-kit-ux 2.0.101 → 2.0.103

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-BQ_vgrJf.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-DRyA-10v.mjs";
8
8
  const BlockletEditor = lazy(() => import("@blocklet/editor"));
9
9
  const Root = styled(Box)`
10
10
  .be-editable,
@@ -4775,7 +4775,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
4775
4775
  }
4776
4776
  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" }) });
4777
4777
  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" }) });
4778
- const Editor = lazy(() => import("./editor-DI-qfaZA.mjs"));
4778
+ const Editor = lazy(() => import("./editor-BGz49WEG.mjs"));
4779
4779
  function LazyEditor(props) {
4780
4780
  const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
4781
4781
  /* @__PURE__ */ jsx(Skeleton, {}),
@@ -4901,6 +4901,9 @@ function ShortcutPlugin({ callback }) {
4901
4901
  if (mobile.any || e.shiftKey) {
4902
4902
  return false;
4903
4903
  }
4904
+ if (document.getElementById("typeahead-menu")) {
4905
+ return false;
4906
+ }
4904
4907
  callback();
4905
4908
  e.preventDefault();
4906
4909
  return true;
@@ -5668,6 +5671,26 @@ function Empty({ sx }) {
5668
5671
  /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontSize: 14, fontWeight: 500 }, children: t("chat.noChats") })
5669
5672
  ] });
5670
5673
  }
5674
+ function DrawerInner(props) {
5675
+ const ref = useRef(null);
5676
+ useEffect(() => {
5677
+ const onTouchMove = (e) => {
5678
+ var _a2;
5679
+ if ((_a2 = window == null ? void 0 : window.getSelection()) == null ? void 0 : _a2.toString()) {
5680
+ e.stopPropagation();
5681
+ }
5682
+ };
5683
+ if (ref.current) {
5684
+ ref.current.addEventListener("touchmove", onTouchMove);
5685
+ return () => {
5686
+ document.removeEventListener("touchmove", onTouchMove);
5687
+ };
5688
+ }
5689
+ return () => {
5690
+ };
5691
+ }, []);
5692
+ return /* @__PURE__ */ jsx(Box$1, { ref, ...props });
5693
+ }
5671
5694
  function ChatListInWallet({ sx, ...rest }) {
5672
5695
  var _a2, _b2, _c2, _d2;
5673
5696
  const { session } = useSessionContext();
@@ -5765,7 +5788,7 @@ function ChatListInWallet({ sx, ...rest }) {
5765
5788
  onOpen: () => {
5766
5789
  },
5767
5790
  children: /* @__PURE__ */ jsx(
5768
- Box$1,
5791
+ DrawerInner,
5769
5792
  {
5770
5793
  sx: {
5771
5794
  width: 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, 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-BQ_vgrJf.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-DRyA-10v.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -4827,6 +4827,9 @@ var __publicField = (obj, key, value) => {
4827
4827
  if (mobile.any || e.shiftKey) {
4828
4828
  return false;
4829
4829
  }
4830
+ if (document.getElementById("typeahead-menu")) {
4831
+ return false;
4832
+ }
4830
4833
  callback();
4831
4834
  e.preventDefault();
4832
4835
  return true;
@@ -5594,6 +5597,26 @@ var __publicField = (obj, key, value) => {
5594
5597
  /* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { fontSize: 14, fontWeight: 500 }, children: t("chat.noChats") })
5595
5598
  ] });
5596
5599
  }
5600
+ function DrawerInner(props) {
5601
+ const ref = react.useRef(null);
5602
+ react.useEffect(() => {
5603
+ const onTouchMove = (e) => {
5604
+ var _a2;
5605
+ if ((_a2 = window == null ? void 0 : window.getSelection()) == null ? void 0 : _a2.toString()) {
5606
+ e.stopPropagation();
5607
+ }
5608
+ };
5609
+ if (ref.current) {
5610
+ ref.current.addEventListener("touchmove", onTouchMove);
5611
+ return () => {
5612
+ document.removeEventListener("touchmove", onTouchMove);
5613
+ };
5614
+ }
5615
+ return () => {
5616
+ };
5617
+ }, []);
5618
+ return /* @__PURE__ */ jsxRuntime.jsx(Box, { ref, ...props });
5619
+ }
5597
5620
  function ChatListInWallet({ sx, ...rest }) {
5598
5621
  var _a2, _b2, _c2, _d2;
5599
5622
  const { session } = useSessionContext();
@@ -5691,7 +5714,7 @@ var __publicField = (obj, key, value) => {
5691
5714
  onOpen: () => {
5692
5715
  },
5693
5716
  children: /* @__PURE__ */ jsxRuntime.jsx(
5694
- Box,
5717
+ DrawerInner,
5695
5718
  {
5696
5719
  sx: {
5697
5720
  width: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "2.0.101",
3
+ "version": "2.0.103",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -31,8 +31,8 @@
31
31
  "@arcblock/bridge": "^2.10.12",
32
32
  "@arcblock/react-hooks": "^2.10.12",
33
33
  "@arcblock/ws": "^1.18.128",
34
- "@blocklet/editor": "2.0.101",
35
- "@blocklet/labels": "2.0.101",
34
+ "@blocklet/editor": "2.0.103",
35
+ "@blocklet/labels": "2.0.103",
36
36
  "@blocklet/uploader": "^0.1.20",
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": "85d4d4f14d233c97bb8f8afa78696deced3a8003"
103
+ "gitHead": "00965afd813a939a3e8e556b374ed0ca40b107ac"
104
104
  }