@arcblock/ux 3.1.15 → 3.1.17

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,9 +1,9 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
2
  import { Box as e, Typography as l } from "@mui/material";
3
- import i from "../../Img/index.js";
3
+ import o from "../../Img/index.js";
4
4
  function m({
5
5
  requestAppInfo: a,
6
- currentAppInfo: o
6
+ currentAppInfo: i
7
7
  }) {
8
8
  return /* @__PURE__ */ r(
9
9
  e,
@@ -25,7 +25,7 @@ function m({
25
25
  justifyContent: "center"
26
26
  },
27
27
  children: [
28
- /* @__PURE__ */ t(i, { src: o.appLogo, alt: "Server", width: 48, height: 48, useProxyFallback: !0 }),
28
+ /* @__PURE__ */ t(o, { src: i.appLogo, alt: "Server", width: 48, height: 48, useProxyFallback: !0 }),
29
29
  /* @__PURE__ */ r(
30
30
  e,
31
31
  {
@@ -37,7 +37,7 @@ function m({
37
37
  width: 8,
38
38
  height: 8,
39
39
  borderRadius: "50%",
40
- bgcolor: "divider",
40
+ bgcolor: "grey.500",
41
41
  mx: 0.5
42
42
  }
43
43
  },
@@ -48,7 +48,7 @@ function m({
48
48
  ]
49
49
  }
50
50
  ),
51
- /* @__PURE__ */ t(i, { src: a.appLogo, alt: a.appName, width: 48, height: 48, useProxyFallback: !0 })
51
+ /* @__PURE__ */ t(o, { src: a.appLogo, alt: a.appName, width: 48, height: 48, useProxyFallback: !0 })
52
52
  ]
53
53
  }
54
54
  ),
@@ -1,36 +1,36 @@
1
- import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
- import { Box as n } from "@mui/material";
3
- import { styled as c } from "../Theme/index.js";
4
- function g({ icon: r = null, title: t = "", description: o = "", extra: i = null, ...l }) {
5
- return /* @__PURE__ */ f(s, { ...l, children: [
6
- r,
7
- typeof t == "string" ? /* @__PURE__ */ e(
8
- n,
1
+ import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
+ import { Box as r } from "@mui/material";
3
+ import { styled as x } from "../Theme/index.js";
4
+ function a({ icon: t = null, title: e = "", description: o = "", extra: i = null, ...l }) {
5
+ return /* @__PURE__ */ c(s, { ...l, children: [
6
+ t,
7
+ typeof e == "string" ? /* @__PURE__ */ n(
8
+ r,
9
9
  {
10
10
  sx: {
11
11
  mt: 3,
12
12
  fontSize: 22,
13
13
  fontWeight: 400,
14
- color: "#47494E",
14
+ color: "text.primary",
15
15
  textAlign: "center"
16
16
  },
17
- children: t
17
+ children: e
18
18
  }
19
- ) : t,
20
- typeof o == "string" ? /* @__PURE__ */ e(
21
- n,
19
+ ) : e,
20
+ typeof o == "string" ? /* @__PURE__ */ n(
21
+ r,
22
22
  {
23
23
  sx: {
24
24
  mt: 1,
25
25
  fontSize: 14,
26
- color: "#7F828B",
26
+ color: "text.secondary",
27
27
  textAlign: "center"
28
28
  },
29
29
  children: o
30
30
  }
31
31
  ) : o,
32
- /* @__PURE__ */ e(
33
- n,
32
+ /* @__PURE__ */ n(
33
+ r,
34
34
  {
35
35
  sx: {
36
36
  mt: 3
@@ -40,7 +40,7 @@ function g({ icon: r = null, title: t = "", description: o = "", extra: i = null
40
40
  )
41
41
  ] });
42
42
  }
43
- const s = c("div")`
43
+ const s = x("div")`
44
44
  box-sizing: border-box;
45
45
  display: flex;
46
46
  flex-direction: column;
@@ -49,8 +49,8 @@ const s = c("div")`
49
49
  height: 100%;
50
50
  padding: 16px;
51
51
 
52
- background-color: #f7f8fb;
52
+ background-color: ${({ theme: t }) => t.palette?.background?.default || "#F7F8F8"};
53
53
  `;
54
54
  export {
55
- g as default
55
+ a as default
56
56
  };
@@ -7,7 +7,10 @@ function s(e = window.blocklet) {
7
7
  return (e?.settings?.federated || {}).config;
8
8
  }
9
9
  function d(e = window.blocklet) {
10
- return !e || i(e).appPid === e.appPid ? !1 : s(e)?.status === "approved";
10
+ if (!e)
11
+ return !1;
12
+ const p = i(e);
13
+ return !p || p.appPid === e.appPid ? !1 : s(e)?.status === "approved";
11
14
  }
12
15
  function w(e = window.blocklet) {
13
16
  return i(e)?.appPid;
@@ -56,24 +59,24 @@ function u(e = window.blocklet) {
56
59
  }) : null;
57
60
  }
58
61
  function g(e) {
59
- const p = [], r = c(e), t = u(e), n = d(e);
60
- return t && p.push(t), r && r?.appId !== t?.appId && n && p.push(r), p.reverse();
62
+ const p = [], r = c(e), n = u(e), t = d(e);
63
+ return n && p.push(n), r && r?.appId !== n?.appId && t && p.push(r), p.reverse();
61
64
  }
62
- async function m(e, p = !1) {
65
+ async function l(e, p = !1) {
63
66
  if (!p && a[e])
64
67
  return a[e];
65
68
  try {
66
69
  const r = new URL("__blocklet__.js", e);
67
70
  r.searchParams.set("type", "json");
68
- const n = await (await fetch(r.href)).json();
69
- return a[e] = n, n;
71
+ const t = await (await fetch(r.href)).json();
72
+ return a[e] = t, t;
70
73
  } catch (r) {
71
74
  return console.error(`Failed to get blocklet data: ${e}`, r), null;
72
75
  }
73
76
  }
74
77
  export {
75
78
  g as getApps,
76
- m as getBlockletData,
79
+ l as getBlockletData,
77
80
  s as getConfig,
78
81
  u as getCurrentApp,
79
82
  c as getFederatedApp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "3.1.15",
3
+ "version": "3.1.17",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -66,16 +66,16 @@
66
66
  "react": "^19.0.0",
67
67
  "react-router-dom": "^6.22.3"
68
68
  },
69
- "gitHead": "18d5ccbb8f712ce559d3a4f4758b185b196b858c",
69
+ "gitHead": "5b5551ce69cf45e2bed8cc06fbb3592020b7618c",
70
70
  "dependencies": {
71
- "@arcblock/bridge": "3.1.15",
71
+ "@arcblock/bridge": "3.1.17",
72
72
  "@arcblock/did": "^1.21.3",
73
73
  "@arcblock/did-motif": "^1.1.14",
74
- "@arcblock/icons": "3.1.15",
75
- "@arcblock/nft-display": "3.1.15",
76
- "@arcblock/react-hooks": "3.1.15",
74
+ "@arcblock/icons": "3.1.17",
75
+ "@arcblock/nft-display": "3.1.17",
76
+ "@arcblock/react-hooks": "3.1.17",
77
77
  "@blocklet/js-sdk": "^1.16.48",
78
- "@blocklet/theme": "3.1.15",
78
+ "@blocklet/theme": "3.1.17",
79
79
  "@fontsource/roboto": "~5.1.1",
80
80
  "@fontsource/ubuntu-mono": "^5.2.6",
81
81
  "@iconify-icons/logos": "^1.2.36",
@@ -47,7 +47,7 @@ export default function AuthAppsInfo({
47
47
  width: 8,
48
48
  height: 8,
49
49
  borderRadius: '50%',
50
- bgcolor: 'divider',
50
+ bgcolor: 'grey.500',
51
51
  mx: 0.5,
52
52
  },
53
53
  }}>
@@ -19,7 +19,7 @@ function Result({ icon = null, title = '', description = '', extra = null, ...re
19
19
  mt: 3,
20
20
  fontSize: 22,
21
21
  fontWeight: 400,
22
- color: '#47494E',
22
+ color: 'text.primary',
23
23
  textAlign: 'center',
24
24
  }}>
25
25
  {title}
@@ -32,7 +32,7 @@ function Result({ icon = null, title = '', description = '', extra = null, ...re
32
32
  sx={{
33
33
  mt: 1,
34
34
  fontSize: 14,
35
- color: '#7F828B',
35
+ color: 'text.secondary',
36
36
  textAlign: 'center',
37
37
  }}>
38
38
  {description}
@@ -59,7 +59,7 @@ const Root = styled('div')`
59
59
  height: 100%;
60
60
  padding: 16px;
61
61
 
62
- background-color: #f7f8fb;
62
+ background-color: ${({ theme }) => theme.palette?.background?.default || '#F7F8F8'};
63
63
  `;
64
64
 
65
65
  export default Result;
@@ -19,7 +19,7 @@ export function getFederatedEnabled(blocklet = window.blocklet) {
19
19
  }
20
20
  const master = getMaster(blocklet);
21
21
  // 如果当前应用是 master,则代表未开启统一登录
22
- if (master.appPid === blocklet.appPid) {
22
+ if (!master || master.appPid === blocklet.appPid) {
23
23
  return false;
24
24
  }
25
25