@blocklet/discuss-kit-ux 2.0.64 → 2.0.66
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-
|
|
7
|
+
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-BHaorx7Z.mjs";
|
|
8
8
|
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -1196,7 +1196,7 @@ function ProfileCard({ user, click, ...rest }) {
|
|
|
1196
1196
|
/* @__PURE__ */ jsx(Box$1, { sx: { mt: 1 }, children: /* @__PURE__ */ jsx(Badge, { passports: (user == null ? void 0 : user.passports) || [], pointInfo: (user == null ? void 0 : user.pointInfo) || {}, did: user == null ? void 0 : user.did }) })
|
|
1197
1197
|
] })
|
|
1198
1198
|
] }),
|
|
1199
|
-
chatUrl && ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) && ((_c2 = session == null ? void 0 : session.user) == null ? void 0 : _c2.did) !== user.did && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1199
|
+
chatUrl && (user == null ? void 0 : user.did) !== window.blocklet.appId && ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) && ((_c2 = session == null ? void 0 : session.user) == null ? void 0 : _c2.did) !== user.did && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1200
1200
|
/* @__PURE__ */ jsx(Box$1, { sx: { my: 2, borderTop: "1px solid #eee" } }),
|
|
1201
1201
|
/* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsx(
|
|
1202
1202
|
Button,
|
|
@@ -1312,9 +1312,10 @@ function AuthorInfo({
|
|
|
1312
1312
|
createdAt = typeof createdAt === "string" ? new Date(createdAt) : createdAt;
|
|
1313
1313
|
return /* @__PURE__ */ jsx(Box$1, { component: RelativeTime, sx: { color: "text.secondary" }, value: createdAt });
|
|
1314
1314
|
};
|
|
1315
|
+
const canClick = linkToProfile && (user == null ? void 0 : user.did) && (user == null ? void 0 : user.did) !== window.blocklet.appId;
|
|
1315
1316
|
const click = (e) => {
|
|
1316
1317
|
var _a2, _b2;
|
|
1317
|
-
if (!
|
|
1318
|
+
if (!canClick) {
|
|
1318
1319
|
return;
|
|
1319
1320
|
}
|
|
1320
1321
|
(_a2 = e == null ? void 0 : e.stopPropagation) == null ? void 0 : _a2.call(e);
|
|
@@ -1338,20 +1339,27 @@ function AuthorInfo({
|
|
|
1338
1339
|
onOpen: () => setOpen(true),
|
|
1339
1340
|
PopperProps: { disablePortal: false },
|
|
1340
1341
|
title: /* @__PURE__ */ jsx(ProfileCard, { user, click }),
|
|
1341
|
-
children: /* @__PURE__ */ jsx(
|
|
1342
|
-
|
|
1342
|
+
children: /* @__PURE__ */ jsx(
|
|
1343
|
+
Box$1,
|
|
1343
1344
|
{
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1345
|
+
sx: { display: "flex", cursor: canClick ? "pointer" : "auto", width: avatarSize, height: avatarSize },
|
|
1346
|
+
onClick: click,
|
|
1347
|
+
children: /* @__PURE__ */ jsx(
|
|
1348
|
+
Avatar,
|
|
1349
|
+
{
|
|
1350
|
+
did: user == null ? void 0 : user.did,
|
|
1351
|
+
src: user == null ? void 0 : user.avatar,
|
|
1352
|
+
size: avatarSize,
|
|
1353
|
+
shape: "circle",
|
|
1354
|
+
variant: "circle",
|
|
1355
|
+
sx: {
|
|
1356
|
+
width: "100%",
|
|
1357
|
+
height: "100%"
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
)
|
|
1353
1361
|
}
|
|
1354
|
-
)
|
|
1362
|
+
)
|
|
1355
1363
|
}
|
|
1356
1364
|
);
|
|
1357
1365
|
}
|
|
@@ -4741,7 +4749,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
|
|
|
4741
4749
|
}
|
|
4742
4750
|
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" }) });
|
|
4743
4751
|
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" }) });
|
|
4744
|
-
const Editor = lazy(() => import("./editor-
|
|
4752
|
+
const Editor = lazy(() => import("./editor-DVoJ3SEG.mjs"));
|
|
4745
4753
|
function LazyEditor(props) {
|
|
4746
4754
|
const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
4747
4755
|
/* @__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-
|
|
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-BHaorx7Z.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -1122,7 +1122,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1122
1122
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { mt: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { passports: (user == null ? void 0 : user.passports) || [], pointInfo: (user == null ? void 0 : user.pointInfo) || {}, did: user == null ? void 0 : user.did }) })
|
|
1123
1123
|
] })
|
|
1124
1124
|
] }),
|
|
1125
|
-
chatUrl && ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) && ((_c2 = session == null ? void 0 : session.user) == null ? void 0 : _c2.did) !== user.did && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1125
|
+
chatUrl && (user == null ? void 0 : user.did) !== window.blocklet.appId && ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) && ((_c2 = session == null ? void 0 : session.user) == null ? void 0 : _c2.did) !== user.did && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1126
1126
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { my: 2, borderTop: "1px solid #eee" } }),
|
|
1127
1127
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1128
1128
|
Button,
|
|
@@ -1238,9 +1238,10 @@ var __publicField = (obj, key, value) => {
|
|
|
1238
1238
|
createdAt = typeof createdAt === "string" ? new Date(createdAt) : createdAt;
|
|
1239
1239
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { component: RelativeTime, sx: { color: "text.secondary" }, value: createdAt });
|
|
1240
1240
|
};
|
|
1241
|
+
const canClick = linkToProfile && (user == null ? void 0 : user.did) && (user == null ? void 0 : user.did) !== window.blocklet.appId;
|
|
1241
1242
|
const click = (e) => {
|
|
1242
1243
|
var _a2, _b2;
|
|
1243
|
-
if (!
|
|
1244
|
+
if (!canClick) {
|
|
1244
1245
|
return;
|
|
1245
1246
|
}
|
|
1246
1247
|
(_a2 = e == null ? void 0 : e.stopPropagation) == null ? void 0 : _a2.call(e);
|
|
@@ -1264,20 +1265,27 @@ var __publicField = (obj, key, value) => {
|
|
|
1264
1265
|
onOpen: () => setOpen(true),
|
|
1265
1266
|
PopperProps: { disablePortal: false },
|
|
1266
1267
|
title: /* @__PURE__ */ jsxRuntime.jsx(ProfileCard, { user, click }),
|
|
1267
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1268
|
-
|
|
1268
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1269
|
+
Box,
|
|
1269
1270
|
{
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1271
|
+
sx: { display: "flex", cursor: canClick ? "pointer" : "auto", width: avatarSize, height: avatarSize },
|
|
1272
|
+
onClick: click,
|
|
1273
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1274
|
+
Avatar,
|
|
1275
|
+
{
|
|
1276
|
+
did: user == null ? void 0 : user.did,
|
|
1277
|
+
src: user == null ? void 0 : user.avatar,
|
|
1278
|
+
size: avatarSize,
|
|
1279
|
+
shape: "circle",
|
|
1280
|
+
variant: "circle",
|
|
1281
|
+
sx: {
|
|
1282
|
+
width: "100%",
|
|
1283
|
+
height: "100%"
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
)
|
|
1279
1287
|
}
|
|
1280
|
-
)
|
|
1288
|
+
)
|
|
1281
1289
|
}
|
|
1282
1290
|
);
|
|
1283
1291
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-ux",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.66",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@arcblock/bridge": "^2.10.5",
|
|
32
32
|
"@arcblock/react-hooks": "^2.10.5",
|
|
33
33
|
"@arcblock/ws": "^1.18.126",
|
|
34
|
-
"@blocklet/editor": "2.0.
|
|
35
|
-
"@blocklet/labels": "2.0.
|
|
34
|
+
"@blocklet/editor": "2.0.66",
|
|
35
|
+
"@blocklet/labels": "2.0.66",
|
|
36
36
|
"@blocklet/uploader": "^0.1.19",
|
|
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": "
|
|
103
|
+
"gitHead": "af63285a90fe7f83f565db17a3e0ea338f7c3c89"
|
|
104
104
|
}
|