@blocklet/discuss-kit-ux 2.3.105 → 2.3.106

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 { 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-r29hqncV.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-DjHDHSY9.mjs";
8
8
  const BlockletEditor = lazyRetry(() => import("@blocklet/editor"));
9
9
  const Root = styled(Box)`
10
10
  .be-editable,
@@ -660,6 +660,7 @@ const Input = ({
660
660
  setError("");
661
661
  };
662
662
  const submit = async () => {
663
+ var _a3;
663
664
  if (!send) {
664
665
  return;
665
666
  }
@@ -676,7 +677,7 @@ const Input = ({
676
677
  onSuccess == null ? void 0 : onSuccess(result);
677
678
  } catch (e) {
678
679
  setContent(originContent);
679
- setError(e.message);
680
+ setError((e == null ? void 0 : e.status) === 429 ? ((_a3 = e.response) == null ? void 0 : _a3.data) || e.message : e.message);
680
681
  console.error(e);
681
682
  } finally {
682
683
  setLoading(false);
@@ -5110,7 +5111,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, icon, ...rest }) {
5110
5111
  }
5111
5112
  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" }) });
5112
5113
  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" }) });
5113
- const Editor = lazyRetry(() => import("./editor-DIaoF22Y.mjs"));
5114
+ const Editor = lazyRetry(() => import("./editor-w8GSIliM.mjs"));
5114
5115
  function LazyEditor(props) {
5115
5116
  const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
5116
5117
  /* @__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-r29hqncV.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-DjHDHSY9.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -577,6 +577,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
577
577
  setError("");
578
578
  };
579
579
  const submit = async () => {
580
+ var _a3;
580
581
  if (!send) {
581
582
  return;
582
583
  }
@@ -593,7 +594,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
593
594
  onSuccess == null ? void 0 : onSuccess(result);
594
595
  } catch (e) {
595
596
  setContent(originContent);
596
- setError(e.message);
597
+ setError((e == null ? void 0 : e.status) === 429 ? ((_a3 = e.response) == null ? void 0 : _a3.data) || e.message : e.message);
597
598
  console.error(e);
598
599
  } finally {
599
600
  setLoading(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "2.3.105",
3
+ "version": "2.3.106",
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.105",
52
- "@blocklet/labels": "^2.3.105"
51
+ "@blocklet/editor": "^2.3.106",
52
+ "@blocklet/labels": "^2.3.106"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@arcblock/did-connect": "^2.10.36",