@arcblock/ux 3.1.47 → 3.1.49

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.
@@ -15,6 +15,7 @@ export declare function useConfig(): {
15
15
  changeMode: (mode: import('@mui/material').PaletteMode) => void;
16
16
  prefer?: import('../Theme').Prefer;
17
17
  locale: import('../type').Locale;
18
+ defaultLocale: import('../type').Locale;
18
19
  changeLocale: (locale: import('../type').Locale) => void;
19
20
  t: (key: string, data?: Record<string, any>) => string;
20
21
  languages: {
@@ -1,6 +1,7 @@
1
1
  import { UserPublicInfo } from '@blocklet/js-sdk';
2
2
  declare function SwitchRole({ user, switchPassport, }: {
3
3
  user: UserPublicInfo & {
4
+ role: string;
4
5
  passports: {
5
6
  name: string;
6
7
  title: string;
@@ -19,6 +19,7 @@ export interface LocaleProviderProps {
19
19
  }
20
20
  export interface LocaleContextType {
21
21
  locale: Locale;
22
+ defaultLocale: Locale;
22
23
  changeLocale: (locale: Locale) => void;
23
24
  t: (key: string, data?: Record<string, any>) => string;
24
25
  languages: {
@@ -1,80 +1,80 @@
1
- import { jsx as y } from "react/jsx-runtime";
2
- import { createContext as x, use as k, useState as h, useRef as A, useEffect as R, useCallback as b } from "react";
3
- import j from "lodash/get";
4
- import i from "js-cookie";
5
- import S from "./browser-lang.js";
6
- import { translate as U } from "./util.js";
7
- import { getCookieOptions as D, resolveRootDomain as E } from "../Util/index.js";
8
- const l = "nf_lang", F = (e, o = window.location.href) => {
1
+ import { jsx as x } from "react/jsx-runtime";
2
+ import { createContext as k, use as A, useState as h, useRef as R, useEffect as b, useCallback as j } from "react";
3
+ import S from "lodash/get";
4
+ import l from "js-cookie";
5
+ import U from "./browser-lang.js";
6
+ import { translate as D } from "./util.js";
7
+ import { getCookieOptions as E, resolveRootDomain as F } from "../Util/index.js";
8
+ const i = "nf_lang", O = (e, o = window.location.href) => {
9
9
  const t = new URL(o).searchParams.get("locale");
10
10
  return e.find((c) => c.code === t) ? t : null;
11
- }, O = (e, o = window.location.href) => {
11
+ }, z = (e, o = window.location.href) => {
12
12
  const t = new URL(o);
13
13
  t.searchParams.has("locale") && (t.searchParams.set("locale", e), window.history.replaceState({}, "", t.href));
14
- }, d = (e = []) => {
14
+ }, g = (e = []) => {
15
15
  const o = {
16
16
  languages: e.map((t) => t.code),
17
17
  // 取 languages 首个元素的 code 值, 如果不存在则取 'en'
18
18
  fallback: e?.[0]?.code || "en"
19
19
  };
20
- return F(e) || i.get(l) || S(o);
21
- }, z = (e) => {
22
- const o = D();
20
+ return O(e) || l.get(i) || U(o);
21
+ }, N = (e) => {
22
+ const o = E();
23
23
  if (!o.domain) {
24
- const t = E();
25
- t && i.remove(l, { path: o.path || "/", domain: t });
24
+ const t = F();
25
+ t && l.remove(i, { path: o.path || "/", domain: t });
26
26
  }
27
- i.set(l, e, o), O(e);
28
- }, N = (e) => {
29
- const o = j(window, "blocklet.languages");
27
+ l.set(i, e, o), z(e);
28
+ }, _ = (e) => {
29
+ const o = S(window, "blocklet.languages");
30
30
  return Array.isArray(o) && o.length ? o : Array.isArray(e) && e.length ? e : [
31
31
  { code: "en", name: "English" },
32
32
  { code: "zh", name: "简体中文" }
33
33
  ];
34
- }, g = x(null), { Provider: _, Consumer: M } = g;
35
- function Q({
34
+ }, p = k(null), { Provider: q, Consumer: Q } = p;
35
+ function T({
36
36
  children: e,
37
37
  locale: o = void 0,
38
- fallbackLocale: t = void 0,
38
+ fallbackLocale: t = "en",
39
39
  translations: c,
40
- onLoadingTranslation: p = void 0,
41
- languages: L = [],
42
- ...P
40
+ onLoadingTranslation: L = void 0,
41
+ languages: P = [],
42
+ ...C
43
43
  }) {
44
- const s = N(L);
45
- let [n, v] = h(o || d(s));
46
- const m = A(t || ""), [, C] = h(0), u = (r) => {
47
- v(r), z(r);
44
+ const s = _(P);
45
+ let [n, v] = h(o || g(s));
46
+ const m = s?.[0]?.code ?? t, u = R(m), [, w] = h(0), f = (r) => {
47
+ v(r), N(r);
48
48
  };
49
- if (R(() => {
50
- const r = o || d(s);
51
- r !== n && u(r);
49
+ if (b(() => {
50
+ const r = o || g(s);
51
+ r !== n && f(r);
52
52
  }, [o]), n && c[n] && typeof c[n] == "function") {
53
53
  const r = n;
54
54
  try {
55
55
  Promise.resolve(c[r]()).then((a) => {
56
- a && typeof a == "object" && (c[r] = a, C((f) => f > 999 ? 0 : f + 1));
56
+ a && typeof a == "object" && (c[r] = a, w((d) => d > 999 ? 0 : d + 1));
57
57
  });
58
58
  } catch (a) {
59
59
  console.error(a);
60
60
  }
61
- p?.(r, s), n = m.current;
61
+ L?.(r, s), n = u.current;
62
62
  } else
63
- m.current = n;
64
- const w = b(
65
- (r, a) => U(c, r, n, t, a),
63
+ u.current = n;
64
+ const y = j(
65
+ (r, a) => D(c, r, n, t, a),
66
66
  [c, n, t]
67
67
  );
68
- return /* @__PURE__ */ y(_, { value: { locale: n, changeLocale: u, t: w, languages: s, ...P }, children: e });
68
+ return /* @__PURE__ */ x(q, { value: { locale: n, changeLocale: f, t: y, languages: s, defaultLocale: m, ...C }, children: e });
69
69
  }
70
- function T() {
71
- return k(g);
70
+ function V() {
71
+ return A(p);
72
72
  }
73
73
  export {
74
- M as LocaleConsumer,
75
- g as LocaleContext,
76
- Q as LocaleProvider,
77
- d as getLocale,
78
- z as setLocale,
79
- T as useLocaleContext
74
+ Q as LocaleConsumer,
75
+ p as LocaleContext,
76
+ T as LocaleProvider,
77
+ g as getLocale,
78
+ N as setLocale,
79
+ V as useLocaleContext
80
80
  };
@@ -0,0 +1,5 @@
1
+ import { OrgTransferProps } from './type';
2
+ /**
3
+ * org transfer 弹框
4
+ */
5
+ export default function Index({ org, onSuccess, resourceId, buttonProps, buttonText, locale, dialogProps, children, }: OrgTransferProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { jsxs as d, Fragment as g, jsx as i } from "react/jsx-runtime";
2
+ import { useRef as x, cloneElement as k } from "react";
3
+ import { Button as C } from "@mui/material";
4
+ import { useMemoizedFn as O } from "ahooks";
5
+ import h from "./selector.js";
6
+ import j from "./locales.js";
7
+ import { translate as F } from "../Locale/util.js";
8
+ function T({
9
+ org: e,
10
+ onSuccess: f,
11
+ resourceId: s,
12
+ buttonProps: n,
13
+ buttonText: l,
14
+ locale: t = "en",
15
+ dialogProps: c,
16
+ children: o
17
+ }) {
18
+ const a = O((u, p = {}) => F(j, u, t, "en", p)), r = x(null), m = () => {
19
+ r.current && r.current.open({ selectedOrg: e });
20
+ };
21
+ return /* @__PURE__ */ d(g, { children: [
22
+ o ? k(o, { ...n, onClick: m }) : /* @__PURE__ */ i(C, { ...n, onClick: m, children: l || a("transferOrg") }),
23
+ /* @__PURE__ */ i(
24
+ h,
25
+ {
26
+ locale: t,
27
+ org: e,
28
+ ref: r,
29
+ resourceId: s,
30
+ onSuccess: f,
31
+ dialogProps: c
32
+ }
33
+ )
34
+ ] });
35
+ }
36
+ export {
37
+ T as default
38
+ };
@@ -0,0 +1,25 @@
1
+ declare const _default: {
2
+ en: {
3
+ transferOrg: string;
4
+ cancel: string;
5
+ confirm: string;
6
+ tranferSuccess: string;
7
+ placeholder: string;
8
+ loading: string;
9
+ noResults: string;
10
+ resourceIdRequired: string;
11
+ organizationSameAsCurrent: string;
12
+ };
13
+ zh: {
14
+ transferOrg: string;
15
+ cancel: string;
16
+ confirm: string;
17
+ tranferSuccess: string;
18
+ placeholder: string;
19
+ loading: string;
20
+ noResults: string;
21
+ resourceIdRequired: string;
22
+ organizationSameAsCurrent: string;
23
+ };
24
+ };
25
+ export default _default;
@@ -0,0 +1,27 @@
1
+ const e = {
2
+ en: {
3
+ transferOrg: "Transfer to Other Organization",
4
+ cancel: "Cancel",
5
+ confirm: "Confirm",
6
+ tranferSuccess: "Transfer success",
7
+ placeholder: "Select an organization to transfer",
8
+ loading: "Loading...",
9
+ noResults: "No More",
10
+ resourceIdRequired: "Please select the resource to transfer",
11
+ organizationSameAsCurrent: "The selected organization is the same as the current organization, please select other organizations"
12
+ },
13
+ zh: {
14
+ transferOrg: "转移至其他组织",
15
+ cancel: "取消",
16
+ confirm: "确认",
17
+ tranferSuccess: "转移成功",
18
+ placeholder: "请选择要转移的组织",
19
+ loading: "加载中...",
20
+ noResults: "没有更多了",
21
+ resourceIdRequired: "请选择要转移的资源",
22
+ organizationSameAsCurrent: "选择的组织与当前组织相同,请选择其他组织"
23
+ }
24
+ };
25
+ export {
26
+ e as default
27
+ };
@@ -0,0 +1,2 @@
1
+ import { OrgTransferSelectorProps } from './type';
2
+ export default function OrgTransferSelector({ ref, org, onSuccess, resourceId, locale, dialogProps, }: OrgTransferSelectorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,174 @@
1
+ import { jsx as n, jsxs as i, Fragment as O } from "react/jsx-runtime";
2
+ import { useState as F, useImperativeHandle as _, createElement as y } from "react";
3
+ import { useMemoizedFn as p, useReactive as q, useDebounce as G, useInfiniteScroll as H } from "ahooks";
4
+ import { Box as l, Typography as a, Autocomplete as N, CircularProgress as b, TextField as Q, Button as v } from "@mui/material";
5
+ import w from "../Toast/index.js";
6
+ import Z from "../Dialog/dialog.js";
7
+ import "../Dialog/confirm.js";
8
+ import "lodash/noop";
9
+ import { OrgQueryType as J, client as T } from "../Util/client.js";
10
+ import { formatAxiosError as K } from "../Util/index.js";
11
+ import { translate as U } from "../Locale/util.js";
12
+ import X from "./locales.js";
13
+ const I = 20;
14
+ function ce({
15
+ ref: C,
16
+ org: g,
17
+ onSuccess: S,
18
+ resourceId: f,
19
+ locale: E = "en",
20
+ dialogProps: k
21
+ }) {
22
+ const o = p((e, r = {}) => U(X, e, E, "en", r)), [h, c] = F(""), t = q({
23
+ open: !1,
24
+ selectedOrg: null
25
+ }), x = G(h, { wait: 500 }), { data: A, loadMore: W, loadingMore: d, loading: u, reload: z } = H(
26
+ async (e) => {
27
+ if (!t.open) return { list: [], total: 0 };
28
+ const m = { page: e ? Math.ceil(e.list.length / I) + 1 : 1, pageSize: I, search: x, type: J.OWNED }, R = await T.user.getOrgs(m), { orgs: j = [], paging: B } = R || {};
29
+ return { list: j, total: B?.total || 0 };
30
+ },
31
+ {
32
+ reloadDeps: [x],
33
+ isNoMore: (e) => e?.list.length ? e.list.length >= e?.total : !0,
34
+ onError: (e) => {
35
+ console.error("Get orgs failed", e);
36
+ },
37
+ manual: !0
38
+ // 手动触发,在对话框打开时再加载
39
+ }
40
+ ), s = p(() => {
41
+ t.open = !1, t.selectedOrg = null, c("");
42
+ }), M = p(async () => {
43
+ try {
44
+ if (!f)
45
+ throw new Error(o("resourceIdRequired"));
46
+ if (!t.selectedOrg)
47
+ throw new Error(o("placeholder"));
48
+ if (t.selectedOrg.id === g.id)
49
+ throw new Error(o("organizationSameAsCurrent"));
50
+ await T.user.migrateResourceToOrg({ form: g.id, to: t.selectedOrg.id, resourceId: f }), s(), S?.(t.selectedOrg), w.success(o("tranferSuccess"));
51
+ } catch (e) {
52
+ console.error("Resource transfer failed", e), w.error(K(e));
53
+ }
54
+ });
55
+ _(C, () => ({
56
+ open: (e = {}) => {
57
+ Object.assign(t, { open: !0, selectedOrg: null }, e), setTimeout(() => {
58
+ t.open && z();
59
+ }, 0);
60
+ },
61
+ close: s
62
+ }));
63
+ const D = A?.list || [], { placeholder: L = "", ...P } = k || {};
64
+ return /* @__PURE__ */ n(
65
+ Z,
66
+ {
67
+ title: o("transferOrg"),
68
+ fullWidth: !0,
69
+ maxWidth: "sm",
70
+ open: t.open,
71
+ onClose: s,
72
+ actions: /* @__PURE__ */ i(O, { children: [
73
+ /* @__PURE__ */ n(v, { onClick: s, color: "secondary", variant: "outlined", children: o("cancel") }),
74
+ /* @__PURE__ */ n(v, { onClick: M, color: "primary", variant: "contained", disabled: !t.selectedOrg, children: o("confirm") })
75
+ ] }),
76
+ ...P || {},
77
+ children: /* @__PURE__ */ i(l, { children: [
78
+ /* @__PURE__ */ n(a, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: L || o("placeholder") }),
79
+ /* @__PURE__ */ n(
80
+ N,
81
+ {
82
+ options: D,
83
+ getOptionLabel: (e) => e?.name || "",
84
+ isOptionEqualToValue: (e, r) => e?.id === r?.id,
85
+ value: t.selectedOrg,
86
+ onChange: (e, r) => {
87
+ if (r?.isLoadingItem && !d) {
88
+ W();
89
+ return;
90
+ }
91
+ r?.isLoadingItem || (t.selectedOrg = r, r && c(""));
92
+ },
93
+ inputValue: t.selectedOrg ? t.selectedOrg.name : h,
94
+ onInputChange: (e, r, m) => {
95
+ m === "input" && (t.selectedOrg && (t.selectedOrg = null), c(r));
96
+ },
97
+ loading: u,
98
+ loadingText: o("loading"),
99
+ noOptionsText: o(u ? "loading" : "noResults"),
100
+ renderInput: (e) => /* @__PURE__ */ n(
101
+ Q,
102
+ {
103
+ ...e,
104
+ variant: "outlined",
105
+ fullWidth: !0,
106
+ InputProps: {
107
+ ...e.InputProps,
108
+ endAdornment: /* @__PURE__ */ i(O, { children: [
109
+ u && /* @__PURE__ */ n(b, { color: "inherit", size: 20 }),
110
+ e.InputProps.endAdornment
111
+ ] })
112
+ }
113
+ }
114
+ ),
115
+ renderOption: (e, r) => r.isLoadingItem ? /* @__PURE__ */ y(l, { component: "li", ...e, key: r.id }, /* @__PURE__ */ i(
116
+ l,
117
+ {
118
+ sx: {
119
+ display: "flex",
120
+ alignItems: "center",
121
+ justifyContent: "center",
122
+ flex: 1,
123
+ py: 1,
124
+ color: "primary.main",
125
+ cursor: "pointer"
126
+ },
127
+ children: [
128
+ d && /* @__PURE__ */ n(b, { size: 16, sx: { mr: 1 } }),
129
+ /* @__PURE__ */ n(a, { variant: "body2", sx: { fontStyle: d ? "italic" : "normal" }, children: r.name })
130
+ ]
131
+ }
132
+ )) : /* @__PURE__ */ y(l, { component: "li", ...e, key: r.id }, /* @__PURE__ */ i(l, { sx: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0 }, children: [
133
+ /* @__PURE__ */ n(
134
+ a,
135
+ {
136
+ variant: "body1",
137
+ sx: {
138
+ overflow: "hidden",
139
+ textOverflow: "ellipsis",
140
+ whiteSpace: "nowrap"
141
+ },
142
+ children: r.name
143
+ }
144
+ ),
145
+ r.description && /* @__PURE__ */ n(
146
+ a,
147
+ {
148
+ variant: "body2",
149
+ color: "text.secondary",
150
+ sx: {
151
+ display: "-webkit-box",
152
+ WebkitLineClamp: 3,
153
+ WebkitBoxOrient: "vertical",
154
+ overflow: "hidden",
155
+ textOverflow: "ellipsis"
156
+ },
157
+ children: r.description
158
+ }
159
+ )
160
+ ] })),
161
+ sx: {
162
+ "& .MuiAutocomplete-listbox": {
163
+ maxHeight: 200
164
+ }
165
+ }
166
+ }
167
+ )
168
+ ] })
169
+ }
170
+ );
171
+ }
172
+ export {
173
+ ce as default
174
+ };
@@ -0,0 +1,28 @@
1
+ import { ComponentProps } from 'react';
2
+ import { ButtonProps } from '@mui/material';
3
+ import { default as Dialog } from '../Dialog';
4
+ export type Org = {
5
+ id: string;
6
+ name: string;
7
+ description?: string;
8
+ ownerDid: string;
9
+ metadata?: Record<string, any>;
10
+ };
11
+ type DialogProps = ComponentProps<typeof Dialog> & {
12
+ placeholder?: string;
13
+ };
14
+ export type OrgTransferSelectorProps = Omit<OrgTransferProps, 'children' | 'buttonProps' | 'buttonText'> & {
15
+ ref: React.RefObject<unknown | null>;
16
+ };
17
+ export interface OrgTransferProps {
18
+ resourceId: string;
19
+ onSuccess?: (org: Org) => void;
20
+ org?: Org;
21
+ children?: React.ReactNode;
22
+ buttonProps?: ButtonProps;
23
+ buttonText?: string;
24
+ dialogProps?: DialogProps;
25
+ locale?: string;
26
+ [key: string]: any;
27
+ }
28
+ export {};
@@ -0,0 +1 @@
1
+
@@ -1,6 +1,4 @@
1
- import { AxiosError } from 'axios';
2
1
  import { User } from './types';
3
- export declare const formatAxiosError: (err: AxiosError) => string;
4
2
  /**
5
3
  * 登录用户与当前用户(userDid)的关注关系
6
4
  */
@@ -1,67 +1,63 @@
1
- import { useState as y, useMemo as f, useEffect as d } from "react";
2
- import { useMemoizedFn as w } from "ahooks";
1
+ import { useState as y, useMemo as u, useEffect as F } from "react";
2
+ import { useMemoizedFn as f } from "ahooks";
3
3
  import U from "lodash/isNil";
4
- import { BlockletSDK as x } from "@blocklet/js-sdk";
5
- import u from "../Toast/index.js";
6
- const F = (r) => {
7
- const { response: t } = r;
8
- return t ? `Request failed: ${t.status} ${t.statusText}: ${JSON.stringify(t.data)}` : r.message;
9
- };
10
- function z({
11
- user: r,
12
- t,
13
- isMySelf: n,
4
+ import { BlockletSDK as D } from "@blocklet/js-sdk";
5
+ import a from "../Toast/index.js";
6
+ import { formatAxiosError as d } from "../Util/index.js";
7
+ function K({
8
+ user: e,
9
+ t: w,
10
+ isMySelf: l,
14
11
  visible: m
15
12
  }) {
16
- const [p, c] = y(!1), s = f(() => r?.did, [r]), i = f(() => Object.prototype.hasOwnProperty.call(r, "isFollowing") && !U(r.isFollowing), [r]), e = f(() => {
13
+ const [p, c] = y(!1), t = u(() => e?.did, [e]), n = u(() => Object.prototype.hasOwnProperty.call(e, "isFollowing") && !U(e.isFollowing), [e]), r = u(() => {
17
14
  let o = null;
18
15
  try {
19
- o = new x();
20
- } catch (l) {
21
- console.error("Failed to initialize BlockletSDK:", l), o = null;
16
+ o = new D();
17
+ } catch (s) {
18
+ console.error("Failed to initialize BlockletSDK:", s), o = null;
22
19
  }
23
20
  return o;
24
- }, []), a = w(async () => {
25
- if (!e) {
21
+ }, []), i = f(async () => {
22
+ if (!r) {
26
23
  c(!1);
27
24
  return;
28
25
  }
29
26
  try {
30
- if (n) {
27
+ if (l) {
31
28
  c(!0);
32
29
  return;
33
30
  }
34
- const o = await e.user.isFollowingUser({ userDid: s });
31
+ const o = await r.user.isFollowingUser({ userDid: t });
35
32
  c(o);
36
33
  } catch (o) {
37
34
  console.error(o);
38
35
  }
39
- }), g = w(async (o = s) => {
40
- if (!(!e || n && o === s))
36
+ }), h = f(async (o = t) => {
37
+ if (!(!r || l && o === t))
41
38
  try {
42
- await e.user.followUser({ userDid: o }), u.success(t("follow_success")), a();
43
- } catch (l) {
44
- console.error(l), u.error(F(l));
39
+ await r.user.followUser({ userDid: o }), a.success(w("follow_success")), i();
40
+ } catch (s) {
41
+ console.error(s), a.error(d(s));
45
42
  }
46
- }), h = w(async (o = s) => {
47
- if (!(!e || n && o === s))
43
+ }), g = f(async (o = t) => {
44
+ if (!(!r || l && o === t))
48
45
  try {
49
- await e.user.unfollowUser({ userDid: o }), u.success(t("unfollow_success")), a();
50
- } catch (l) {
51
- console.error(l), u.error(F(l));
46
+ await r.user.unfollowUser({ userDid: o }), a.success(w("unfollow_success")), i();
47
+ } catch (s) {
48
+ console.error(s), a.error(d(s));
52
49
  }
53
50
  });
54
- return d(() => {
55
- m && s && !n && e && !i && a();
56
- }, [a, s, n, e, i, m]), d(() => {
57
- i && c(r?.isFollowing || !1);
58
- }, [i, r]), {
51
+ return F(() => {
52
+ m && t && !l && r && !n && i();
53
+ }, [i, t, l, r, n, m]), F(() => {
54
+ n && c(e?.isFollowing || !1);
55
+ }, [n, e]), {
59
56
  followed: p,
60
- followUser: g,
61
- unfollowUser: h
57
+ followUser: h,
58
+ unfollowUser: g
62
59
  };
63
60
  }
64
61
  export {
65
- z as default,
66
- F as formatAxiosError
62
+ K as default
67
63
  };
@@ -0,0 +1,6 @@
1
+ import { BlockletSDK } from '@blocklet/js-sdk';
2
+ export declare enum OrgQueryType {
3
+ OWNED = "owned",
4
+ JOINED = "joined"
5
+ }
6
+ export declare const client: BlockletSDK;
@@ -0,0 +1,7 @@
1
+ import { BlockletSDK as n } from "@blocklet/js-sdk";
2
+ var t = /* @__PURE__ */ ((o) => (o.OWNED = "owned", o.JOINED = "joined", o))(t || {});
3
+ const r = new n();
4
+ export {
5
+ t as OrgQueryType,
6
+ r as client
7
+ };
@@ -1,5 +1,6 @@
1
1
  import { mergeAllThemeOptions } from '@blocklet/theme';
2
2
  import { default as Cookies } from 'js-cookie';
3
+ import { AxiosError } from 'axios';
3
4
  import { $TSFixMe, Locale } from '../type';
4
5
  declare let dateTool: $TSFixMe | null;
5
6
  /** @deprecated for compatibility, please use `import { mergeAllThemeOptions } from '@blocklet/theme'` instead */
@@ -121,3 +122,4 @@ export declare const compareVersions: (version1: string, version2: string) => bo
121
122
  * 通过 server 的版本和 ux 的版本共同决定
122
123
  */
123
124
  export declare const isSupportFollow: () => boolean;
125
+ export declare const formatAxiosError: (err: AxiosError) => string;