@blocklet/discuss-kit-ux 2.0.126 → 2.0.127
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
1
2
|
import { User } from '../../types';
|
|
2
3
|
|
|
3
4
|
interface Props {
|
|
@@ -14,6 +15,8 @@ interface Props {
|
|
|
14
15
|
linkToProfile?: boolean;
|
|
15
16
|
avatarSize?: number;
|
|
16
17
|
fontSize?: number;
|
|
18
|
+
copyable?: boolean;
|
|
19
|
+
sx?: SxProps;
|
|
17
20
|
}
|
|
18
|
-
export default function AuthorInfo({ user, createdAt, append, size, responsive, showProfileCard, showBadge, showDID, newTitle, children, linkToProfile, avatarSize, fontSize, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
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;
|
|
19
22
|
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-
|
|
7
|
+
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-DPoHmtQ9.mjs";
|
|
8
8
|
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -1298,6 +1298,8 @@ function AuthorInfo({
|
|
|
1298
1298
|
linkToProfile = true,
|
|
1299
1299
|
avatarSize,
|
|
1300
1300
|
fontSize,
|
|
1301
|
+
copyable,
|
|
1302
|
+
sx,
|
|
1301
1303
|
...rest
|
|
1302
1304
|
}) {
|
|
1303
1305
|
const theme = useTheme();
|
|
@@ -1386,7 +1388,12 @@ function AuthorInfo({
|
|
|
1386
1388
|
return /* @__PURE__ */ jsx(
|
|
1387
1389
|
Box$1,
|
|
1388
1390
|
{
|
|
1389
|
-
sx: {
|
|
1391
|
+
sx: {
|
|
1392
|
+
display: "flex",
|
|
1393
|
+
cursor: canClick ? "pointer" : "auto",
|
|
1394
|
+
width: mergedAvatarSize,
|
|
1395
|
+
height: mergedAvatarSize
|
|
1396
|
+
},
|
|
1390
1397
|
onClick: click,
|
|
1391
1398
|
children: /* @__PURE__ */ jsx(
|
|
1392
1399
|
Avatar,
|
|
@@ -1414,7 +1421,7 @@ function AuthorInfo({
|
|
|
1414
1421
|
did: user == null ? void 0 : user.did
|
|
1415
1422
|
}
|
|
1416
1423
|
);
|
|
1417
|
-
return /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize: mergedFontSize }, ...rest, children: [
|
|
1424
|
+
return /* @__PURE__ */ jsxs(Box$1, { sx: mergeSx({ display: "flex", alignItems: "center", gap: 1, fontSize: mergedFontSize }, sx), ...rest, children: [
|
|
1418
1425
|
renderAvatar(),
|
|
1419
1426
|
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column", flex: 1, overflow: "hidden" }, children: [
|
|
1420
1427
|
/* @__PURE__ */ jsxs(
|
|
@@ -1435,7 +1442,15 @@ function AuthorInfo({
|
|
|
1435
1442
|
}
|
|
1436
1443
|
),
|
|
1437
1444
|
showBadge && downMd && /* @__PURE__ */ jsx(Box$1, { mt: 0.5, children: BadgeRender }),
|
|
1438
|
-
showDID && !(responsive && downMd) && /* @__PURE__ */ jsx(
|
|
1445
|
+
showDID && !(responsive && downMd) && /* @__PURE__ */ jsx(
|
|
1446
|
+
DID,
|
|
1447
|
+
{
|
|
1448
|
+
style: { lineHeight: 1.5, minHeight: 20, maxWidth: 250 },
|
|
1449
|
+
size: mergedFontSize,
|
|
1450
|
+
did: user == null ? void 0 : user.did,
|
|
1451
|
+
copyable
|
|
1452
|
+
}
|
|
1453
|
+
),
|
|
1439
1454
|
children && /* @__PURE__ */ jsx(Box$1, { children })
|
|
1440
1455
|
] })
|
|
1441
1456
|
] });
|
|
@@ -4783,7 +4798,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
|
|
|
4783
4798
|
}
|
|
4784
4799
|
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" }) });
|
|
4785
4800
|
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" }) });
|
|
4786
|
-
const Editor = lazy(() => import("./editor-
|
|
4801
|
+
const Editor = lazy(() => import("./editor-CsmqIs87.mjs"));
|
|
4787
4802
|
function LazyEditor(props) {
|
|
4788
4803
|
const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
4789
4804
|
/* @__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-DPoHmtQ9.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -1223,6 +1223,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1223
1223
|
linkToProfile = true,
|
|
1224
1224
|
avatarSize,
|
|
1225
1225
|
fontSize,
|
|
1226
|
+
copyable,
|
|
1227
|
+
sx,
|
|
1226
1228
|
...rest
|
|
1227
1229
|
}) {
|
|
1228
1230
|
const theme = styles.useTheme();
|
|
@@ -1311,7 +1313,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1311
1313
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1312
1314
|
Box,
|
|
1313
1315
|
{
|
|
1314
|
-
sx: {
|
|
1316
|
+
sx: {
|
|
1317
|
+
display: "flex",
|
|
1318
|
+
cursor: canClick ? "pointer" : "auto",
|
|
1319
|
+
width: mergedAvatarSize,
|
|
1320
|
+
height: mergedAvatarSize
|
|
1321
|
+
},
|
|
1315
1322
|
onClick: click,
|
|
1316
1323
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1317
1324
|
Avatar,
|
|
@@ -1339,7 +1346,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1339
1346
|
did: user == null ? void 0 : user.did
|
|
1340
1347
|
}
|
|
1341
1348
|
);
|
|
1342
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize: mergedFontSize }, ...rest, children: [
|
|
1349
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: mergeSx({ display: "flex", alignItems: "center", gap: 1, fontSize: mergedFontSize }, sx), ...rest, children: [
|
|
1343
1350
|
renderAvatar(),
|
|
1344
1351
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1, overflow: "hidden" }, children: [
|
|
1345
1352
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1360,7 +1367,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1360
1367
|
}
|
|
1361
1368
|
),
|
|
1362
1369
|
showBadge && downMd && /* @__PURE__ */ jsxRuntime.jsx(Box, { mt: 0.5, children: BadgeRender }),
|
|
1363
|
-
showDID && !(responsive && downMd) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1370
|
+
showDID && !(responsive && downMd) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1371
|
+
DID,
|
|
1372
|
+
{
|
|
1373
|
+
style: { lineHeight: 1.5, minHeight: 20, maxWidth: 250 },
|
|
1374
|
+
size: mergedFontSize,
|
|
1375
|
+
did: user == null ? void 0 : user.did,
|
|
1376
|
+
copyable
|
|
1377
|
+
}
|
|
1378
|
+
),
|
|
1364
1379
|
children && /* @__PURE__ */ jsxRuntime.jsx(Box, { children })
|
|
1365
1380
|
] })
|
|
1366
1381
|
] });
|
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.127",
|
|
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.
|
|
35
|
-
"@blocklet/labels": "2.0.
|
|
34
|
+
"@blocklet/editor": "2.0.127",
|
|
35
|
+
"@blocklet/labels": "2.0.127",
|
|
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": "
|
|
103
|
+
"gitHead": "38065307852200d17a0bf225e5af5d2bf11e4bca"
|
|
104
104
|
}
|