@blocklet/discuss-kit-ux 2.0.127 → 2.0.128

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.
@@ -13,10 +13,11 @@ interface Props {
13
13
  showDID?: boolean;
14
14
  children?: React.ReactNode;
15
15
  linkToProfile?: boolean;
16
+ onAvatarClick?: () => void;
16
17
  avatarSize?: number;
17
18
  fontSize?: number;
18
19
  copyable?: boolean;
19
20
  sx?: SxProps;
20
21
  }
21
- export default function AuthorInfo({ user, createdAt, append, size, responsive, showProfileCard, showBadge, showDID, newTitle, children, linkToProfile, avatarSize, fontSize, copyable, sx, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
22
+ export default function AuthorInfo({ user, createdAt, append, size, responsive, showProfileCard, showBadge, showDID, newTitle, children, linkToProfile, onAvatarClick, avatarSize, fontSize, copyable, sx, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
22
23
  export {};
@@ -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-DPoHmtQ9.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-DTVjWBDu.mjs";
8
8
  const BlockletEditor = lazy(() => import("@blocklet/editor"));
9
9
  const Root = styled(Box)`
10
10
  .be-editable,
@@ -1296,6 +1296,7 @@ function AuthorInfo({
1296
1296
  newTitle = void 0,
1297
1297
  children,
1298
1298
  linkToProfile = true,
1299
+ onAvatarClick,
1299
1300
  avatarSize,
1300
1301
  fontSize,
1301
1302
  copyable,
@@ -1328,6 +1329,7 @@ function AuthorInfo({
1328
1329
  const canClick = linkToProfile && (user == null ? void 0 : user.did) && (user == null ? void 0 : user.did) !== window.blocklet.appId;
1329
1330
  const click = (e) => {
1330
1331
  var _a2, _b2;
1332
+ if (onAvatarClick) onAvatarClick();
1331
1333
  if (!canClick) {
1332
1334
  return;
1333
1335
  }
@@ -1361,7 +1363,7 @@ function AuthorInfo({
1361
1363
  {
1362
1364
  sx: {
1363
1365
  display: "flex",
1364
- cursor: canClick ? "pointer" : "auto",
1366
+ cursor: canClick ? "pointer" : "inherit",
1365
1367
  width: mergedAvatarSize,
1366
1368
  height: mergedAvatarSize
1367
1369
  },
@@ -1390,7 +1392,7 @@ function AuthorInfo({
1390
1392
  {
1391
1393
  sx: {
1392
1394
  display: "flex",
1393
- cursor: canClick ? "pointer" : "auto",
1395
+ cursor: canClick ? "pointer" : "inherit",
1394
1396
  width: mergedAvatarSize,
1395
1397
  height: mergedAvatarSize
1396
1398
  },
@@ -4798,7 +4800,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
4798
4800
  }
4799
4801
  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" }) });
4800
4802
  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" }) });
4801
- const Editor = lazy(() => import("./editor-CsmqIs87.mjs"));
4803
+ const Editor = lazy(() => import("./editor-CDMSG98q.mjs"));
4802
4804
  function LazyEditor(props) {
4803
4805
  const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
4804
4806
  /* @__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-DPoHmtQ9.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-DTVjWBDu.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -1221,6 +1221,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1221
1221
  newTitle = void 0,
1222
1222
  children,
1223
1223
  linkToProfile = true,
1224
+ onAvatarClick,
1224
1225
  avatarSize,
1225
1226
  fontSize,
1226
1227
  copyable,
@@ -1253,6 +1254,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1253
1254
  const canClick = linkToProfile && (user == null ? void 0 : user.did) && (user == null ? void 0 : user.did) !== window.blocklet.appId;
1254
1255
  const click = (e) => {
1255
1256
  var _a2, _b2;
1257
+ if (onAvatarClick) onAvatarClick();
1256
1258
  if (!canClick) {
1257
1259
  return;
1258
1260
  }
@@ -1286,7 +1288,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1286
1288
  {
1287
1289
  sx: {
1288
1290
  display: "flex",
1289
- cursor: canClick ? "pointer" : "auto",
1291
+ cursor: canClick ? "pointer" : "inherit",
1290
1292
  width: mergedAvatarSize,
1291
1293
  height: mergedAvatarSize
1292
1294
  },
@@ -1315,7 +1317,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1315
1317
  {
1316
1318
  sx: {
1317
1319
  display: "flex",
1318
- cursor: canClick ? "pointer" : "auto",
1320
+ cursor: canClick ? "pointer" : "inherit",
1319
1321
  width: mergedAvatarSize,
1320
1322
  height: mergedAvatarSize
1321
1323
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "2.0.127",
3
+ "version": "2.0.128",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -31,8 +31,8 @@
31
31
  "@arcblock/bridge": "^2.10.20",
32
32
  "@arcblock/react-hooks": "^2.10.20",
33
33
  "@arcblock/ws": "^1.18.128",
34
- "@blocklet/editor": "2.0.127",
35
- "@blocklet/labels": "2.0.127",
34
+ "@blocklet/editor": "2.0.128",
35
+ "@blocklet/labels": "2.0.128",
36
36
  "@blocklet/uploader": "^0.1.21",
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": "38065307852200d17a0bf225e5af5d2bf11e4bca"
103
+ "gitHead": "a6aadf3d0dd491109586baf526a2437b9f5d9b2c"
104
104
  }