@blocklet/discuss-kit-ux 1.6.40 → 1.6.41

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-39b43b9f.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-8ce9d402.mjs";
8
8
  import "@blocklet/labels";
9
9
  import "@mui/material/styles";
10
10
  import "@mui/material/Box";
@@ -111,22 +111,21 @@ function InternalThemeProvider({ children }) {
111
111
  };
112
112
  return /* @__PURE__ */ jsx(ThemeProvider, { theme: merged, children });
113
113
  }
114
- const isSmallScreen = window.innerWidth <= 750;
115
114
  const repairBase64Avatar = (avatar) => {
116
115
  if (avatar && avatar.startsWith("data:")) {
117
116
  return avatar.replace(/\s/g, encodeURIComponent(" "));
118
117
  }
119
118
  return avatar;
120
119
  };
121
- const getResizedAvatar = (avatar, size = 36) => {
120
+ const getResizedAvatar = (avatar, size = 72) => {
122
121
  if (!avatar) {
123
122
  return avatar;
124
123
  }
125
124
  if (avatar.indexOf("/.well-known/service") >= 0) {
126
125
  const tmp = new URL(avatar, window.location.origin);
127
126
  tmp.searchParams.set("imageFilter", "resize");
128
- tmp.searchParams.set("w", (isSmallScreen ? size / 1.5 : size).toString());
129
- tmp.searchParams.set("h", (isSmallScreen ? size / 1.5 : size).toString());
127
+ tmp.searchParams.set("w", size.toString());
128
+ tmp.searchParams.set("h", size.toString());
130
129
  tmp.searchParams.set("f", "webp");
131
130
  return tmp.href;
132
131
  }
@@ -4440,7 +4439,7 @@ function Pagination({ page, size = 20, total, onChange, routerMode = true, ...re
4440
4439
  }
4441
4440
  );
4442
4441
  }
4443
- const Editor = lazy(() => import("./editor-7e83a793.mjs"));
4442
+ const Editor = lazy(() => import("./editor-9918fcea.mjs"));
4444
4443
  function LazyEditor(props) {
4445
4444
  const fallback = /* @__PURE__ */ jsxs(Fragment, { children: [
4446
4445
  /* @__PURE__ */ jsx(Skeleton, {}),
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "@blocklet/labels";
2
- import { K, j, N, A, h, a6, B, z, y, E, Q, O, T, W, o, C, q, v, x, _, $, aa, a1, H, J, D, a9, a8, G, c, b, a7, M, P, ah, n, m, a5, R, S, a2, k, X, Z, ab, ae, ad, af, ai, F, aj, l, p, r, t, d, a3, L, e, U, w, a0, a4, u, ag, ak, Y, ac, f } from "./index-39b43b9f.mjs";
2
+ import { K, j, N, A, h, a6, B, z, y, E, Q, O, T, W, o, C, q, v, x, _, $, aa, a1, H, J, D, a9, a8, G, c, b, a7, M, P, ah, n, m, a5, R, S, a2, k, X, Z, ab, ae, ad, af, ai, F, aj, l, p, r, t, d, a3, L, e, U, w, a0, a4, u, ag, ak, Y, ac, f } from "./index-8ce9d402.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -51,22 +51,21 @@ var __publicField = (obj, key, value) => {
51
51
  };
52
52
  return /* @__PURE__ */ jsxRuntime.jsx(styles.ThemeProvider, { theme: merged, children });
53
53
  }
54
- const isSmallScreen = window.innerWidth <= 750;
55
54
  const repairBase64Avatar = (avatar) => {
56
55
  if (avatar && avatar.startsWith("data:")) {
57
56
  return avatar.replace(/\s/g, encodeURIComponent(" "));
58
57
  }
59
58
  return avatar;
60
59
  };
61
- const getResizedAvatar = (avatar, size = 36) => {
60
+ const getResizedAvatar = (avatar, size = 72) => {
62
61
  if (!avatar) {
63
62
  return avatar;
64
63
  }
65
64
  if (avatar.indexOf("/.well-known/service") >= 0) {
66
65
  const tmp = new URL(avatar, window.location.origin);
67
66
  tmp.searchParams.set("imageFilter", "resize");
68
- tmp.searchParams.set("w", (isSmallScreen ? size / 1.5 : size).toString());
69
- tmp.searchParams.set("h", (isSmallScreen ? size / 1.5 : size).toString());
67
+ tmp.searchParams.set("w", size.toString());
68
+ tmp.searchParams.set("h", size.toString());
70
69
  tmp.searchParams.set("f", "webp");
71
70
  return tmp.href;
72
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "1.6.40",
3
+ "version": "1.6.41",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@arcblock/ws": "^1.18.107",
32
- "@blocklet/editor": "1.6.40",
33
- "@blocklet/labels": "1.6.40",
32
+ "@blocklet/editor": "1.6.41",
33
+ "@blocklet/labels": "1.6.41",
34
34
  "@blocklet/uploader": "^0.0.55",
35
35
  "@emotion/css": "^11.10.5",
36
36
  "@emotion/react": "^11.10.5",
@@ -93,5 +93,5 @@
93
93
  "resolutions": {
94
94
  "react": "^18.2.0"
95
95
  },
96
- "gitHead": "6633bdee66eaab20dc9e75e8ca96c992df81384b"
96
+ "gitHead": "d915c317de8d4e5398b83fef006742c3054df73b"
97
97
  }