@blocklet/discuss-kit-ux 2.0.161 → 2.0.162

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-B3w70bNN.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-hDIi09v6.mjs";
8
8
  const BlockletEditor = lazy(() => import("@blocklet/editor"));
9
9
  const Root = styled(Box)`
10
10
  .be-editable,
@@ -1227,27 +1227,29 @@ function ProfileCard({ user, click, ...rest }) {
1227
1227
  );
1228
1228
  }
1229
1229
  const useChatInWallet = () => {
1230
+ var _a2;
1230
1231
  const navigate = useNavigate();
1231
1232
  const { walletVersion, mobile } = useBrowser();
1232
1233
  const chatInWallet = useMatch("/chat-in-wallet/:chatId?");
1234
+ const isInArcSphere = ((_a2 = window == null ? void 0 : window.navigator) == null ? void 0 : _a2.userAgent.indexOf("ArcSphere")) > -1;
1233
1235
  const isChatInWalletV2 = useMemo(() => {
1234
1236
  try {
1235
1237
  const targetVersion = mobile.apple.device ? "5.3.5" : "5.3.1";
1236
- return !!walletVersion && cmp(walletVersion, targetVersion) === 1;
1238
+ return isInArcSphere || !!walletVersion && cmp(walletVersion, targetVersion) === 1;
1237
1239
  } catch (e) {
1238
1240
  console.error(e);
1239
1241
  return false;
1240
1242
  }
1241
- }, [walletVersion, mobile]);
1243
+ }, [walletVersion, mobile, isInArcSphere]);
1242
1244
  const isWebNavbar = useMemo(() => {
1243
1245
  try {
1244
1246
  const targetVersion = mobile.apple.device ? "5.4.6" : "5.4.4";
1245
- return !!walletVersion && cmp(walletVersion, targetVersion) === 1;
1247
+ return isInArcSphere || !!walletVersion && cmp(walletVersion, targetVersion) === 1;
1246
1248
  } catch (e) {
1247
1249
  console.error(e);
1248
1250
  return false;
1249
1251
  }
1250
- }, [walletVersion, mobile]);
1252
+ }, [walletVersion, mobile, isInArcSphere]);
1251
1253
  const navigateToChat = ({ id: id2, title }) => {
1252
1254
  if (isChatInWalletV2) {
1253
1255
  navigate(`/chat-in-wallet/${id2}`);
@@ -4713,7 +4715,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
4713
4715
  }
4714
4716
  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
4717
  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-DmngQHrs.mjs"));
4718
+ const Editor = lazy(() => import("./editor-CaFDYw-2.mjs"));
4717
4719
  function LazyEditor(props) {
4718
4720
  const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
4719
4721
  /* @__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-B3w70bNN.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-hDIi09v6.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -1152,27 +1152,29 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1152
1152
  );
1153
1153
  }
1154
1154
  const useChatInWallet = () => {
1155
+ var _a2;
1155
1156
  const navigate = reactRouterDom.useNavigate();
1156
1157
  const { walletVersion, mobile } = reactHooks.useBrowser();
1157
1158
  const chatInWallet = reactRouterDom.useMatch("/chat-in-wallet/:chatId?");
1159
+ const isInArcSphere = ((_a2 = window == null ? void 0 : window.navigator) == null ? void 0 : _a2.userAgent.indexOf("ArcSphere")) > -1;
1158
1160
  const isChatInWalletV2 = react.useMemo(() => {
1159
1161
  try {
1160
1162
  const targetVersion = mobile.apple.device ? "5.3.5" : "5.3.1";
1161
- return !!walletVersion && cmp(walletVersion, targetVersion) === 1;
1163
+ return isInArcSphere || !!walletVersion && cmp(walletVersion, targetVersion) === 1;
1162
1164
  } catch (e) {
1163
1165
  console.error(e);
1164
1166
  return false;
1165
1167
  }
1166
- }, [walletVersion, mobile]);
1168
+ }, [walletVersion, mobile, isInArcSphere]);
1167
1169
  const isWebNavbar = react.useMemo(() => {
1168
1170
  try {
1169
1171
  const targetVersion = mobile.apple.device ? "5.4.6" : "5.4.4";
1170
- return !!walletVersion && cmp(walletVersion, targetVersion) === 1;
1172
+ return isInArcSphere || !!walletVersion && cmp(walletVersion, targetVersion) === 1;
1171
1173
  } catch (e) {
1172
1174
  console.error(e);
1173
1175
  return false;
1174
1176
  }
1175
- }, [walletVersion, mobile]);
1177
+ }, [walletVersion, mobile, isInArcSphere]);
1176
1178
  const navigateToChat = ({ id: id2, title }) => {
1177
1179
  if (isChatInWalletV2) {
1178
1180
  navigate(`/chat-in-wallet/${id2}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "2.0.161",
3
+ "version": "2.0.162",
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.161",
35
- "@blocklet/labels": "2.0.161",
34
+ "@blocklet/editor": "2.0.162",
35
+ "@blocklet/labels": "2.0.162",
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": "1fe4182352fd29c606f6e8ceb74eea1a85bcb0bf"
103
+ "gitHead": "f70ab6c37ffa86e93d1e0c3ddec3c377a181ff76"
104
104
  }