@blocklet/discuss-kit-ux 2.3.87 → 2.3.89

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,4 +1,4 @@
1
- import { SessionContextUser } from '../hooks/session';
1
+ /// <reference types="react" />
2
2
  interface AccessControlProps {
3
3
  authenticated?: boolean;
4
4
  permissions?: string | string[];
@@ -1,23 +1,3 @@
1
- export interface SessionContextUser {
2
- did: string;
3
- fullName: string;
4
- avatar: string;
5
- passports: {
6
- id: string;
7
- name: string;
8
- title: string;
9
- role: string;
10
- }[];
11
- permissions: string[];
12
- role: string;
13
- locale: string;
14
- }
15
- interface Session {
16
- initialized: boolean;
17
- user: SessionContextUser;
18
- login: (...args: any[]) => void;
19
- switchPassport: (...args: any[]) => void;
20
- }
21
1
  export declare const useSessionContext: () => {
22
2
  isAuthenticated: boolean;
23
3
  isAdmin: boolean;
@@ -28,4 +8,3 @@ export declare const useSessionContext: () => {
28
8
  session: Session;
29
9
  connectApi: any;
30
10
  };
31
- 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 { 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-Dzkqoajm.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-BkSohJfw.mjs";
8
8
  const BlockletEditor = lazyRetry(() => import("@blocklet/editor"));
9
9
  const Root = styled(Box)`
10
10
  .be-editable,
@@ -1789,7 +1789,8 @@ const DISCUSS_KIT_DID = "z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu";
1789
1789
  function hashText(text = "") {
1790
1790
  return murmurhash.v3(text).toString(16);
1791
1791
  }
1792
- const isInlineTranslationAvailable = blockletExists([AIGNE_RUNTIME_DID, AIGNE_STUDIO_DID, DISCUSS_KIT_DID]) && !!window.blocklet.preferences.inlineTranslatorAgentAid;
1792
+ const autoTranslationAID = window.blocklet.preferences.inlineTranslatorAgentAid || window.blocklet.AUTO_TRANSLATION_AID;
1793
+ const isInlineTranslationAvailable = blockletExists([AIGNE_RUNTIME_DID, AIGNE_STUDIO_DID, DISCUSS_KIT_DID]) && !!autoTranslationAID;
1793
1794
  function detectLanguageIso6391(src) {
1794
1795
  return null;
1795
1796
  }
@@ -5092,7 +5093,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, icon, ...rest }) {
5092
5093
  }
5093
5094
  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" }) });
5094
5095
  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" }) });
5095
- const Editor = lazyRetry(() => import("./editor-B6CJ7JCh.mjs"));
5096
+ const Editor = lazyRetry(() => import("./editor-Dky1WFks.mjs"));
5096
5097
  function LazyEditor(props) {
5097
5098
  const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
5098
5099
  /* @__PURE__ */ jsx(Skeleton, {}),
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "@blocklet/labels";
2
- import { W, o, Y, aQ, 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, aR, aS, v, aE, aF, R, S, ab, as, aD, q, aP, a4, a6, ak, an, am, aM, aI, aA, at, Q, ao, aK, au, aJ, ax, ay, aN, aL, l, az, h, p, r, k, aw, t, j, ac, aB, X, aT, c, a2, E, a9, ad, aV, e, u, ap, d, av, aU, aO, a5, al, f } from "./index-Dzkqoajm.mjs";
2
+ import { W, o, Y, aQ, 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, aR, aS, v, aE, aF, R, S, ab, as, aD, q, aP, a4, a6, ak, an, am, aM, aI, aA, at, Q, ao, aK, au, aJ, ax, ay, aN, aL, l, az, h, p, r, k, aw, t, j, ac, aB, X, aT, c, a2, E, a9, ad, aV, e, u, ap, d, av, aU, aO, a5, al, f } from "./index-BkSohJfw.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -1706,7 +1706,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1706
1706
  function hashText(text2 = "") {
1707
1707
  return murmurhash.v3(text2).toString(16);
1708
1708
  }
1709
- const isInlineTranslationAvailable = blockletExists([AIGNE_RUNTIME_DID, AIGNE_STUDIO_DID, DISCUSS_KIT_DID]) && !!window.blocklet.preferences.inlineTranslatorAgentAid;
1709
+ const autoTranslationAID = window.blocklet.preferences.inlineTranslatorAgentAid || window.blocklet.AUTO_TRANSLATION_AID;
1710
+ const isInlineTranslationAvailable = blockletExists([AIGNE_RUNTIME_DID, AIGNE_STUDIO_DID, DISCUSS_KIT_DID]) && !!autoTranslationAID;
1710
1711
  function detectLanguageIso6391(src) {
1711
1712
  return null;
1712
1713
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "2.3.87",
3
+ "version": "2.3.89",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -48,8 +48,8 @@
48
48
  "unstated-next": "^1.1.0",
49
49
  "url-join": "^4.0.1",
50
50
  "zustand": "^4.5.5",
51
- "@blocklet/editor": "^2.3.87",
52
- "@blocklet/labels": "^2.3.87"
51
+ "@blocklet/editor": "^2.3.89",
52
+ "@blocklet/labels": "^2.3.89"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@arcblock/did-connect": "^2.10.36",