@blocklet/discuss-kit-ux 2.3.77 → 2.3.79

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.
@@ -6,3 +6,7 @@ export declare const getUsername: (user: {
6
6
  did: string;
7
7
  fullName?: string;
8
8
  } | null | undefined, fallback?: string) => string;
9
+ export declare const isValidUser: (user: {
10
+ did?: string;
11
+ fullName?: string;
12
+ } | null | undefined) => boolean | "" | undefined;
@@ -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 { lazyRetry } from "@arcblock/ux/lib/Util";
7
- import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-Yx5s4qYH.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-CAz8UkyW.mjs";
8
8
  const BlockletEditor = lazyRetry(() => import("@blocklet/editor"));
9
9
  const Root = styled(Box)`
10
10
  .be-editable,
@@ -1399,6 +1399,9 @@ const getUsername = (user, fallback2) => {
1399
1399
  }
1400
1400
  return isBlockletApp((user == null ? void 0 : user.did) || "") ? "System" : "Unknown";
1401
1401
  };
1402
+ const isValidUser = (user) => {
1403
+ return (user == null ? void 0 : user.did) && (user == null ? void 0 : user.fullName) && !isBlockletApp(user.did) && user.did !== window.blocklet.appId;
1404
+ };
1402
1405
  function AuthorInfo({
1403
1406
  user,
1404
1407
  createdAt,
@@ -4989,7 +4992,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, icon, ...rest }) {
4989
4992
  }
4990
4993
  const tablerSend = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", 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" }) });
4991
4994
  const tablerLetterCase = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", 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" }) });
4992
- const Editor = lazyRetry(() => import("./editor-DhIp7DID.mjs"));
4995
+ const Editor = lazyRetry(() => import("./editor-DZ46VaGf.mjs"));
4993
4996
  function LazyEditor(props) {
4994
4997
  const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
4995
4998
  /* @__PURE__ */ jsx(Skeleton, {}),
@@ -12653,6 +12656,7 @@ export {
12653
12656
  blockletMountPointsByDid as aI,
12654
12657
  isBlockletApp as aJ,
12655
12658
  getUsername as aK,
12659
+ isValidUser as aL,
12656
12660
  ConfirmProvider as aa,
12657
12661
  SecureLabelPicker as ab,
12658
12662
  useApiErrorHandler as ac,
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "@blocklet/labels";
2
- import { W, o, Y, A, n, af, B, G, N, L, O, ar, _, Z, a1, $, a0, a3, x, C, y, z, F, a7, a8, aj, aa, T, U, ae, D, ai, ah, K, H, J, aG, aH, b, m, ag, M, P, aC, aq, w, v, aE, aF, R, S, ab, as, aD, q, a4, a6, ak, an, am, aI, aA, at, Q, ao, aK, au, aJ, ax, ay, l, az, h, p, r, k, aw, t, j, ac, aB, X, c, a2, E, a9, ad, e, u, ap, d, av, a5, al, f } from "./index-Yx5s4qYH.mjs";
2
+ import { W, o, Y, A, n, af, B, G, N, L, O, ar, _, Z, a1, $, a0, a3, x, C, y, z, F, a7, a8, aj, aa, T, U, ae, D, ai, ah, K, H, J, aG, aH, b, m, ag, M, P, aC, aq, w, v, aE, aF, R, S, ab, as, aD, q, a4, a6, ak, an, am, aI, aA, at, Q, ao, aK, au, aJ, ax, ay, aL, l, az, h, p, r, k, aw, t, j, ac, aB, X, c, a2, E, a9, ad, e, u, ap, d, av, a5, al, f } from "./index-CAz8UkyW.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
@@ -79,6 +79,7 @@ export {
79
79
  aJ as isBlockletApp,
80
80
  ax as isInArcSphere,
81
81
  ay as isInArcSphereDialog,
82
+ aL as isValidUser,
82
83
  l as lexicalUtils,
83
84
  az as openArcSphereDialog,
84
85
  h as preferences,
package/dist/index.umd.js CHANGED
@@ -1321,6 +1321,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1321
1321
  }
1322
1322
  return isBlockletApp((user == null ? void 0 : user.did) || "") ? "System" : "Unknown";
1323
1323
  };
1324
+ const isValidUser = (user) => {
1325
+ return (user == null ? void 0 : user.did) && (user == null ? void 0 : user.fullName) && !isBlockletApp(user.did) && user.did !== window.blocklet.appId;
1326
+ };
1324
1327
  function AuthorInfo({
1325
1328
  user,
1326
1329
  createdAt,
@@ -12633,6 +12636,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
12633
12636
  exports2.isBlockletApp = isBlockletApp;
12634
12637
  exports2.isInArcSphere = isInArcSphere$1;
12635
12638
  exports2.isInArcSphereDialog = isInArcSphereDialog;
12639
+ exports2.isValidUser = isValidUser;
12636
12640
  exports2.lexicalUtils = lexical;
12637
12641
  exports2.openArcSphereDialog = openArcSphereDialog;
12638
12642
  exports2.preferences = preferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "2.3.77",
3
+ "version": "2.3.79",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -18,8 +18,8 @@
18
18
  "access": "public"
19
19
  },
20
20
  "dependencies": {
21
- "@arcblock/bridge": "^2.13.61",
22
- "@arcblock/react-hooks": "^2.13.61",
21
+ "@arcblock/bridge": "^2.13.62",
22
+ "@arcblock/react-hooks": "^2.13.62",
23
23
  "@arcblock/ws": "^1.20.13",
24
24
  "@blocklet/uploader": "^0.1.95",
25
25
  "@emotion/css": "^11.13.0",
@@ -45,8 +45,8 @@
45
45
  "ufo": "^1.5.4",
46
46
  "unstated-next": "^1.1.0",
47
47
  "url-join": "^4.0.1",
48
- "@blocklet/editor": "^2.3.77",
49
- "@blocklet/labels": "^2.3.77"
48
+ "@blocklet/editor": "^2.3.79",
49
+ "@blocklet/labels": "^2.3.79"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@arcblock/did-connect": "^2.10.36",
@@ -63,7 +63,7 @@
63
63
  "devDependencies": {
64
64
  "@arcblock/eslint-config-ts": "^0.3.3",
65
65
  "@babel/core": "^7.25.2",
66
- "@blocklet/sdk": "^1.16.43",
66
+ "@blocklet/sdk": "^1.16.44",
67
67
  "@iconify-json/iconoir": "^1.2.1",
68
68
  "@iconify-json/material-symbols": "^1.2.1",
69
69
  "@iconify-json/mdi": "^1.2.0",