@arcblock/ux 3.0.9 → 3.0.11

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.
Files changed (66) hide show
  1. package/lib/Address/did-address.js +47 -49
  2. package/lib/Address/responsive-did-address.js +53 -57
  3. package/lib/Avatar/index.js +16 -16
  4. package/lib/BlockletV2/blocklet.js +64 -64
  5. package/lib/BlockletV2/components/tooltip-icon.js +26 -27
  6. package/lib/CardSelector/index.js +1 -2
  7. package/lib/ClickToCopy/hook.js +10 -11
  8. package/lib/ClickToCopy/index.js +16 -16
  9. package/lib/Config/theme-mode-toggle.js +7 -8
  10. package/lib/DID/index.js +131 -133
  11. package/lib/DIDConnect/app-info-item.js +18 -18
  12. package/lib/DIDConnect/auth-apps/index.js +83 -84
  13. package/lib/DIDConnect/did-connect-container.js +89 -90
  14. package/lib/DIDConnect/did-connect-footer.js +25 -25
  15. package/lib/DIDConnect/landing-page.js +17 -17
  16. package/lib/DIDConnect/powered-by.js +11 -11
  17. package/lib/DIDConnect/request-storage-access-api-dialog.js +36 -37
  18. package/lib/DIDConnect/with-container.js +66 -68
  19. package/lib/Dialog/use-confirm.js +40 -43
  20. package/lib/Earth/index.js +21 -22
  21. package/lib/Footer/index.js +15 -16
  22. package/lib/Header/responsive-header.js +23 -24
  23. package/lib/Layout/dashboard/index.js +63 -72
  24. package/lib/Layout/dashboard/sidebar.js +20 -21
  25. package/lib/Layout/dashboard-legacy/index.js +52 -52
  26. package/lib/Locale/context.js +36 -37
  27. package/lib/Locale/selector.js +40 -42
  28. package/lib/NFTDisplay/index.js +114 -118
  29. package/lib/NFTDisplay/render-svg.js +12 -12
  30. package/lib/NavMenu/nav-menu.js +159 -161
  31. package/lib/NavMenu/sub-container.js +25 -26
  32. package/lib/PageScroller/index.js +28 -32
  33. package/lib/Passport/passport.js +11 -11
  34. package/lib/PhoneInput/country-select.js +38 -38
  35. package/lib/PhoneInput/index.js +65 -66
  36. package/lib/Screenshot/index.js +26 -27
  37. package/lib/SessionBlocklet/index.js +87 -93
  38. package/lib/SessionPermission/index.js +5 -9
  39. package/lib/SessionUser/components/did-space.js +24 -25
  40. package/lib/SessionUser/components/logged-in.js +122 -127
  41. package/lib/SessionUser/components/quick-login-item.js +41 -42
  42. package/lib/SessionUser/components/session-user-item.js +35 -36
  43. package/lib/SessionUser/components/session-user-switch.js +81 -85
  44. package/lib/SessionUser/components/un-login.js +41 -41
  45. package/lib/SessionUser/components/user-info.js +43 -47
  46. package/lib/SessionUser/index.js +1 -1
  47. package/lib/SessionUser/libs/utils.js +24 -30
  48. package/lib/SharedBridge/index.js +35 -35
  49. package/lib/Theme/index.js +16 -16
  50. package/lib/Theme/theme.js +42 -43
  51. package/lib/Toast/index.js +24 -25
  52. package/lib/Typography/index.js +42 -42
  53. package/lib/UserCard/Content/basic.js +91 -93
  54. package/lib/UserCard/Content/shorten-label.js +9 -9
  55. package/lib/UserCard/components.js +15 -15
  56. package/lib/Util/deprecate.js +1 -1
  57. package/lib/Util/federated.js +28 -32
  58. package/lib/Util/iframe.js +9 -10
  59. package/lib/Util/index.js +134 -135
  60. package/lib/Util/security.js +9 -10
  61. package/lib/Util/wallet.js +6 -9
  62. package/lib/VerificationCode/index.js +26 -28
  63. package/lib/hooks/use-blocklet-logo.js +11 -14
  64. package/lib/ux.css +1 -1
  65. package/lib/withTracker/index.js +13 -14
  66. package/package.json +10 -11
@@ -1,25 +1,25 @@
1
1
  import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
- import { Box as i, Tooltip as m, IconButton as c } from "@mui/material";
2
+ import { Box as r, Tooltip as m, IconButton as c } from "@mui/material";
3
3
  import f from "@iconify-icons/material-symbols/check";
4
4
  import { Icon as d } from "@iconify/react";
5
5
  import { useSize as h, useCreation as u } from "ahooks";
6
6
  import { useRef as x } from "react";
7
7
  import { DID as w } from "../DID/index.js";
8
- import { mergeSx as I } from "../Util/style.js";
9
- import N from "./app-icon.js";
10
- import { DID_CONNECT_MEDIUM_WIDTH as C } from "../Util/constant.js";
8
+ import { mergeSx as z } from "../Util/style.js";
9
+ import I from "./app-icon.js";
10
+ import { DID_CONNECT_MEDIUM_WIDTH as N } from "../Util/constant.js";
11
11
  function b({
12
- appInfo: r,
13
- active: l = !1,
14
- appLogo: s = null,
12
+ appInfo: o,
13
+ active: s = !1,
14
+ appLogo: l = null,
15
15
  sx: a = {}
16
16
  }) {
17
- const t = x(null), o = h(t), n = u(() => o ? o.width < C - 50 : !0, [o, o == null ? void 0 : o.width]);
17
+ const t = x(null), i = h(t), n = u(() => i ? i.width < N - 50 : !0, [i, i?.width]);
18
18
  return /* @__PURE__ */ p(
19
- i,
19
+ r,
20
20
  {
21
21
  ref: t,
22
- sx: I(
22
+ sx: z(
23
23
  {
24
24
  display: "flex",
25
25
  alignItems: "center",
@@ -42,24 +42,24 @@ function b({
42
42
  a
43
43
  ),
44
44
  children: [
45
- s || /* @__PURE__ */ e(
46
- i,
45
+ l || /* @__PURE__ */ e(
46
+ r,
47
47
  {
48
48
  sx: {
49
49
  borderRadius: 1,
50
50
  overflow: "hidden",
51
51
  fontSize: 0
52
52
  },
53
- children: /* @__PURE__ */ e(N, { appInfo: r })
53
+ children: /* @__PURE__ */ e(I, { appInfo: o })
54
54
  }
55
55
  ),
56
- /* @__PURE__ */ p(i, { className: "app-info-content", children: [
57
- /* @__PURE__ */ e(m, { title: r.appName, placement: "top", children: /* @__PURE__ */ e(i, { className: "app-info-name", children: r.appName }) }),
58
- r.appPid && /* @__PURE__ */ e(
56
+ /* @__PURE__ */ p(r, { className: "app-info-content", children: [
57
+ /* @__PURE__ */ e(m, { title: o.appName, placement: "top", children: /* @__PURE__ */ e(r, { className: "app-info-name", children: o.appName }) }),
58
+ o.appPid && /* @__PURE__ */ e(
59
59
  w,
60
60
  {
61
61
  className: "app-info-did",
62
- did: r.appPid,
62
+ did: o.appPid,
63
63
  sx: { fontSize: "10px !important" },
64
64
  copyable: !1,
65
65
  startChars: n ? 6 : 8,
@@ -68,7 +68,7 @@ function b({
68
68
  }
69
69
  )
70
70
  ] }),
71
- l ? /* @__PURE__ */ e(c, { size: "small", color: "success", children: /* @__PURE__ */ e(d, { icon: f, color: "success" }) }) : null
71
+ s ? /* @__PURE__ */ e(c, { size: "small", color: "success", children: /* @__PURE__ */ e(d, { icon: f, color: "success" }) }) : null
72
72
  ]
73
73
  }
74
74
  );
@@ -1,17 +1,17 @@
1
- import { jsx as i, jsxs as r, Fragment as G } from "react/jsx-runtime";
2
- import { CircularProgress as x, Box as l, Stack as H, Button as v, Typography as J, Link as K } from "@mui/material";
3
- import { useReactive as O, useMemoizedFn as t } from "ahooks";
4
- import c from "lodash/noop";
5
- import Q from "../did-connect-container.js";
6
- import S from "./auth-apps-info.js";
7
- import V from "../../Center/index.js";
8
- import X from "../landing-page.js";
9
- import { translate as Y } from "../../Locale/util.js";
10
- import { useLocaleContext as Z } from "../../Locale/context.js";
11
- import _ from "../../UserCard/index.js";
12
- import { InfoType as $, CardType as P } from "../../UserCard/types.js";
13
- import { mergeSx as b } from "../../Util/style.js";
14
- const ee = {
1
+ import { jsx as e, jsxs as o, Fragment as U } from "react/jsx-runtime";
2
+ import { CircularProgress as u, Box as l, Stack as N, Button as h, Typography as q, Link as E } from "@mui/material";
3
+ import { useReactive as G, useMemoizedFn as i } from "ahooks";
4
+ import d from "lodash/noop";
5
+ import H from "../did-connect-container.js";
6
+ import J from "./auth-apps-info.js";
7
+ import K from "../../Center/index.js";
8
+ import O from "../landing-page.js";
9
+ import { translate as Q } from "../../Locale/util.js";
10
+ import { useLocaleContext as V } from "../../Locale/context.js";
11
+ import X from "../../UserCard/index.js";
12
+ import { InfoType as Y, CardType as Z } from "../../UserCard/types.js";
13
+ import { mergeSx as m } from "../../Util/style.js";
14
+ const _ = {
15
15
  en: {
16
16
  notThis: "Not this?",
17
17
  useAnother: "Use another",
@@ -27,59 +27,58 @@ const ee = {
27
27
  cancel: "取消"
28
28
  }
29
29
  };
30
- function ge({
31
- session: a,
32
- requestAppInfo: z,
33
- currentAppInfo: k,
34
- children: T = null,
35
- userInfo: s = void 0,
36
- hideSwitchConnect: A = !1,
37
- hideAuthorize: D = !1,
38
- hideCancel: I = !1,
39
- notThisText: L = void 0,
40
- authorizeText: W = void 0,
41
- connectText: j = void 0,
42
- cancelText: w = void 0,
43
- useAnotherText: B = void 0,
44
- slotProps: e = void 0,
45
- onConnect: u = c,
46
- onAuthorize: h = c,
47
- onSwitchConnect: m = c,
48
- onCancel: f = c
30
+ function ue({
31
+ session: c,
32
+ requestAppInfo: p,
33
+ currentAppInfo: f,
34
+ children: g = null,
35
+ userInfo: x = void 0,
36
+ hideSwitchConnect: C = !1,
37
+ hideAuthorize: v = !1,
38
+ hideCancel: z = !1,
39
+ notThisText: y = void 0,
40
+ authorizeText: A = void 0,
41
+ connectText: b = void 0,
42
+ cancelText: k = void 0,
43
+ useAnotherText: T = void 0,
44
+ slotProps: r = void 0,
45
+ onConnect: w = d,
46
+ onAuthorize: D = d,
47
+ onSwitchConnect: I = d,
48
+ onCancel: L = d
49
49
  }) {
50
- var p, C, y;
51
- const n = O({
50
+ const n = G({
52
51
  loading: !1
53
- }), { locale: F = "en" } = Z() || {}, d = t((q, E = {}) => Y(ee, q, F, "en", E)), g = t(() => {
52
+ }), { locale: S = "en" } = V() || {}, t = i((M, R = {}) => Q(_, M, S, "en", R)), s = i(() => {
54
53
  n.loading = !1;
55
- }), M = t(() => {
56
- n.loading = !0, u == null || u(g);
57
- }), R = t(() => {
58
- n.loading = !0, m == null || m(g);
59
- }), U = t(() => {
60
- n.loading = !0, h == null || h(g);
61
- }), N = t(() => {
62
- f == null || f();
54
+ }), W = i(() => {
55
+ n.loading = !0, w?.(s);
56
+ }), j = i(() => {
57
+ n.loading = !0, I?.(s);
58
+ }), B = i(() => {
59
+ n.loading = !0, D?.(s);
60
+ }), F = i(() => {
61
+ L?.();
63
62
  });
64
- if (a.loading || !a.initialized)
65
- return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(x, {}) });
66
- const o = s ?? (a == null ? void 0 : a.user);
67
- return /* @__PURE__ */ i(X, { did: (p = window.blocklet) == null ? void 0 : p.appPid, standalone: !0, children: /* @__PURE__ */ i(
63
+ if (c.loading || !c.initialized)
64
+ return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(u, {}) });
65
+ const a = x ?? c?.user;
66
+ return /* @__PURE__ */ e(O, { did: window.blocklet?.appPid, standalone: !0, children: /* @__PURE__ */ e(
68
67
  l,
69
68
  {
70
- ...e == null ? void 0 : e.root,
71
- sx: b(
69
+ ...r?.root,
70
+ sx: m(
72
71
  {
73
72
  width: 420,
74
73
  maxWidth: "100%"
75
74
  },
76
- (C = e == null ? void 0 : e.root) == null ? void 0 : C.sx
75
+ r?.root?.sx
77
76
  ),
78
- children: /* @__PURE__ */ i(Q, { hideCloseButton: !0, ...e == null ? void 0 : e.didConnectContainer, children: /* @__PURE__ */ r(
77
+ children: /* @__PURE__ */ e(H, { hideCloseButton: !0, ...r?.didConnectContainer, children: /* @__PURE__ */ o(
79
78
  l,
80
79
  {
81
- ...e == null ? void 0 : e.contentContainer,
82
- sx: b(
80
+ ...r?.contentContainer,
81
+ sx: m(
83
82
  {
84
83
  display: "flex",
85
84
  flexDirection: "column",
@@ -95,16 +94,16 @@ function ge({
95
94
  },
96
95
  bgcolor: "background.paper"
97
96
  },
98
- (y = e == null ? void 0 : e.contentContainer) == null ? void 0 : y.sx
97
+ r?.contentContainer?.sx
99
98
  ),
100
99
  children: [
101
- /* @__PURE__ */ i(S, { requestAppInfo: z, currentAppInfo: k }),
102
- o ? /* @__PURE__ */ r(G, { children: [
103
- /* @__PURE__ */ i(_, { user: o, showDid: !0, cardType: P.Detailed, infoType: $.Minimal }),
104
- /* @__PURE__ */ i(l, {})
100
+ /* @__PURE__ */ e(J, { requestAppInfo: p, currentAppInfo: f }),
101
+ a ? /* @__PURE__ */ o(U, { children: [
102
+ /* @__PURE__ */ e(X, { user: a, showDid: !0, cardType: Z.Detailed, infoType: Y.Minimal }),
103
+ /* @__PURE__ */ e(l, {})
105
104
  ] }) : null,
106
- T,
107
- /* @__PURE__ */ i(
105
+ g,
106
+ /* @__PURE__ */ e(
108
107
  l,
109
108
  {
110
109
  sx: {
@@ -116,51 +115,51 @@ function ge({
116
115
  }
117
116
  }
118
117
  ),
119
- /* @__PURE__ */ r(H, { direction: "row", spacing: 2, children: [
120
- I ? null : /* @__PURE__ */ i(
121
- v,
118
+ /* @__PURE__ */ o(N, { direction: "row", spacing: 2, children: [
119
+ z ? null : /* @__PURE__ */ e(
120
+ h,
122
121
  {
123
122
  color: "inherit",
124
123
  variant: "outlined",
125
124
  size: "large",
126
125
  fullWidth: !0,
127
- onClick: N,
126
+ onClick: F,
128
127
  sx: {
129
128
  color: "grey.500"
130
129
  },
131
- children: w || d("cancel")
130
+ children: k || t("cancel")
132
131
  }
133
132
  ),
134
- o && !D ? /* @__PURE__ */ r(
135
- v,
133
+ a && !v ? /* @__PURE__ */ o(
134
+ h,
136
135
  {
137
136
  variant: "contained",
138
137
  size: "large",
139
138
  fullWidth: !0,
140
- onClick: U,
139
+ onClick: B,
141
140
  disabled: n.loading,
142
141
  children: [
143
- n.loading ? /* @__PURE__ */ i(x, { size: 20, sx: { mr: 1 } }) : null,
144
- W || d("authorize")
142
+ n.loading ? /* @__PURE__ */ e(u, { size: 20, sx: { mr: 1 } }) : null,
143
+ A || t("authorize")
145
144
  ]
146
145
  }
147
- ) : /* @__PURE__ */ r(
148
- v,
146
+ ) : /* @__PURE__ */ o(
147
+ h,
149
148
  {
150
149
  variant: "contained",
151
150
  size: "large",
152
151
  fullWidth: !0,
153
152
  disabled: n.loading,
154
- onClick: M,
153
+ onClick: W,
155
154
  children: [
156
- n.loading ? /* @__PURE__ */ i(x, { size: 20, sx: { mr: 1 } }) : null,
157
- j || d("connect")
155
+ n.loading ? /* @__PURE__ */ e(u, { size: 20, sx: { mr: 1 } }) : null,
156
+ b || t("connect")
158
157
  ]
159
158
  }
160
159
  )
161
160
  ] }),
162
- A || !o ? null : /* @__PURE__ */ i(l, { sx: { textAlign: "center" }, children: /* @__PURE__ */ r(
163
- J,
161
+ C || !a ? null : /* @__PURE__ */ e(l, { sx: { textAlign: "center" }, children: /* @__PURE__ */ o(
162
+ q,
164
163
  {
165
164
  variant: "body2",
166
165
  sx: {
@@ -170,17 +169,17 @@ function ge({
170
169
  gap: 1
171
170
  },
172
171
  children: [
173
- L || d("notThis"),
172
+ y || t("notThis"),
174
173
  " ",
175
- /* @__PURE__ */ i(
176
- K,
174
+ /* @__PURE__ */ e(
175
+ E,
177
176
  {
178
177
  underline: "hover",
179
- onClick: R,
178
+ onClick: j,
180
179
  sx: {
181
180
  cursor: "pointer"
182
181
  },
183
- children: B || d("useAnother")
182
+ children: T || t("useAnother")
184
183
  }
185
184
  )
186
185
  ]
@@ -193,5 +192,5 @@ function ge({
193
192
  ) });
194
193
  }
195
194
  export {
196
- ge as default
195
+ ue as default
197
196
  };
@@ -1,61 +1,60 @@
1
- import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
- import { memo as J, createElement as U, useRef as X } from "react";
3
- import { useBrowser as Y } from "@arcblock/react-hooks";
4
- import { Backdrop as Z, useMediaQuery as P, useTheme as ee, Box as l, Drawer as oe, SwipeableDrawer as re, Dialog as ne, DialogContent as ae } from "@mui/material";
5
- import { useCreation as ie, useDebounce as te } from "ahooks";
6
- import de from "color-convert";
7
- import { getDIDMotifInfo as ce } from "@arcblock/did-motif";
8
- import le from "lodash/noop";
1
+ import { jsx as a, jsxs as m } from "react/jsx-runtime";
2
+ import { memo as N, createElement as O, useRef as T } from "react";
3
+ import { useBrowser as W } from "@arcblock/react-hooks";
4
+ import { Backdrop as F, useMediaQuery as H, useTheme as K, Box as s, Drawer as Q, SwipeableDrawer as V, Dialog as q, DialogContent as J } from "@mui/material";
5
+ import { useCreation as U, useDebounce as X } from "ahooks";
6
+ import Y from "color-convert";
7
+ import { getDIDMotifInfo as Z } from "@arcblock/did-motif";
8
+ import oo from "lodash/noop";
9
9
  import "../Theme/theme.js";
10
10
  import "../Theme/theme-provider.js";
11
- import { mergeSx as c } from "../Util/style.js";
12
- import { isEthereumDid as ue, getDIDColor as se, hexToRgba as u } from "../Util/index.js";
13
- import h from "./did-connect-footer.js";
14
- const j = J(({ ref: a, ...f }) => /* @__PURE__ */ U(
15
- Z,
11
+ import { mergeSx as l } from "../Util/style.js";
12
+ import { isEthereumDid as ro, getDIDColor as eo, hexToRgba as c } from "../Util/index.js";
13
+ import b from "./did-connect-footer.js";
14
+ const S = N(({ ref: t, ...x }) => /* @__PURE__ */ O(
15
+ F,
16
16
  {
17
17
  open: !0,
18
- ref: a,
18
+ ref: t,
19
19
  style: {
20
20
  backgroundColor: "rgba(0, 0, 0, 0.6)",
21
21
  backdropFilter: "blur(3px)",
22
22
  touchAction: "none"
23
23
  },
24
- ...f,
24
+ ...x,
25
25
  key: "background"
26
26
  }
27
27
  ));
28
- function ye({
29
- open: a = !1,
30
- popup: f = !1,
31
- hideCloseButton: w = !1,
32
- children: g,
33
- appPid: E = void 0,
34
- slotProps: e = void 0,
35
- onClose: G = le,
36
- keepMounted: k = !1
28
+ function ko({
29
+ open: t = !1,
30
+ popup: x = !1,
31
+ hideCloseButton: h = !1,
32
+ children: f,
33
+ appPid: y = void 0,
34
+ slotProps: i = void 0,
35
+ onClose: A = oo,
36
+ keepMounted: w = !1
37
37
  }) {
38
- var y, A, L, _, B, I, z, M;
39
- const n = ie(() => {
40
- const o = E || window.blocklet.appPid, r = ue(o), i = r ? void 0 : ce(o);
41
- return r ? se(o) : i.color;
42
- }, []), C = X(null), N = Y(), O = P("(max-width:640px)");
43
- let s = "page";
44
- f && (s = "dialog", O && N.mobile.any && (s = "drawer"));
45
- const b = ee(), T = ((A = (y = b == null ? void 0 : b.transitions) == null ? void 0 : y.duration) == null ? void 0 : A.leavingScreen) || 500, W = te(a, {
46
- wait: T
47
- }), D = (o, r) => {
48
- ["backdropClick", "escapeKeyDown"].includes(r) || G();
49
- }, v = W || a || k, F = w ? oe : re, H = de.hex.hsl(n), [R, $, d] = H, x = [0, 30, 60, 30, 0, 30, 60, 30], K = Math.max(...x), Q = Math.min(...x);
50
- let p = !1;
51
- (d * (100 + K) / 100 > 100 || d * (100 + Q) / 100 < 0) && (p = !0);
52
- const V = `linear-gradient(45deg, ${x.map((o) => {
53
- let r = d * (100 + o) / 100, i = 0.6;
54
- return p ? i = 0.5 * (100 + o) / 100 : r = d * (100 + o) / 100, `hsla(${R}, ${$}%, ${r}%, ${i})`;
55
- }).join(", ")})`, q = `linear-gradient(45deg, ${x.map((o) => {
56
- let r = d * (100 + o) / 100, i = 0.2;
57
- return p ? i = 0.3 * (100 + o) / 100 : r = d * (100 + o) / 100, `hsla(${R}, ${$}%, ${r}%, ${i})`;
58
- }).join(", ")})`, S = a ? {
38
+ const e = U(() => {
39
+ const o = y || window.blocklet.appPid, r = ro(o), n = r ? void 0 : Z(o);
40
+ return r ? eo(o) : n.color;
41
+ }, []), k = T(null), L = W(), _ = H("(max-width:640px)");
42
+ let u = "page";
43
+ x && (u = "dialog", _ && L.mobile.any && (u = "drawer"));
44
+ const B = K()?.transitions?.duration?.leavingScreen || 500, I = X(t, {
45
+ wait: B
46
+ }), C = (o, r) => {
47
+ ["backdropClick", "escapeKeyDown"].includes(r) || A();
48
+ }, D = I || t || w, P = h ? Q : V, z = Y.hex.hsl(e), [v, R, d] = z, p = [0, 30, 60, 30, 0, 30, 60, 30], M = Math.max(...p), j = Math.min(...p);
49
+ let g = !1;
50
+ (d * (100 + M) / 100 > 100 || d * (100 + j) / 100 < 0) && (g = !0);
51
+ const E = `linear-gradient(45deg, ${p.map((o) => {
52
+ let r = d * (100 + o) / 100, n = 0.6;
53
+ return g ? n = 0.5 * (100 + o) / 100 : r = d * (100 + o) / 100, `hsla(${v}, ${R}%, ${r}%, ${n})`;
54
+ }).join(", ")})`, G = `linear-gradient(45deg, ${p.map((o) => {
55
+ let r = d * (100 + o) / 100, n = 0.2;
56
+ return g ? n = 0.3 * (100 + o) / 100 : r = d * (100 + o) / 100, `hsla(${v}, ${R}%, ${r}%, ${n})`;
57
+ }).join(", ")})`, $ = t ? {
59
58
  overflow: "visible",
60
59
  "&::before, &::after": {
61
60
  content: '""',
@@ -64,7 +63,7 @@ function ye({
64
63
  right: "-3px",
65
64
  bottom: "-3px",
66
65
  left: "-3px",
67
- background: V,
66
+ background: E,
68
67
  backgroundSize: "300% 300%",
69
68
  backgroundRepeat: "no-repeat",
70
69
  animation: "glowRotate 10s linear infinite",
@@ -72,7 +71,7 @@ function ye({
72
71
  zIndex: 0
73
72
  },
74
73
  "&::after": {
75
- background: q,
74
+ background: G,
76
75
  filter: "blur(15px)"
77
76
  },
78
77
  "@keyframes glowRotate": {
@@ -87,25 +86,25 @@ function ye({
87
86
  }
88
87
  }
89
88
  } : {};
90
- return s === "page" ? /* @__PURE__ */ t(
91
- l,
89
+ return u === "page" ? /* @__PURE__ */ a(
90
+ s,
92
91
  {
93
92
  className: "did-connect__container-page",
94
- sx: c(
93
+ sx: l(
95
94
  {
96
95
  borderRadius: 1,
97
96
  position: "relative",
98
97
  zIndex: 1,
99
98
  backgroundColor: "background.default"
100
99
  },
101
- S,
102
- (L = e == null ? void 0 : e.containerPage) == null ? void 0 : L.sx
100
+ $,
101
+ i?.containerPage?.sx
103
102
  ),
104
103
  children: /* @__PURE__ */ m(
105
- l,
104
+ s,
106
105
  {
107
106
  sx: {
108
- border: `1px solid ${u(n, 0.1)}`,
107
+ border: `1px solid ${c(e, 0.1)}`,
109
108
  m: "-1px",
110
109
  position: "relative",
111
110
  borderRadius: "12px",
@@ -114,26 +113,26 @@ function ye({
114
113
  backgroundColor: "background.default"
115
114
  },
116
115
  children: [
117
- g,
118
- /* @__PURE__ */ t(h, { currentAppColor: n, sx: c({ mx: 0 }, (_ = e == null ? void 0 : e.footer) == null ? void 0 : _.sx) })
116
+ f,
117
+ /* @__PURE__ */ a(b, { currentAppColor: e, sx: l({ mx: 0 }, i?.footer?.sx) })
119
118
  ]
120
119
  }
121
120
  )
122
121
  }
123
- ) : s === "drawer" ? /* @__PURE__ */ m(
124
- F,
122
+ ) : u === "drawer" ? /* @__PURE__ */ m(
123
+ P,
125
124
  {
126
125
  className: "did-connect__container-drawer",
127
126
  disableSwipeToOpen: !0,
128
- open: a,
127
+ open: t,
129
128
  anchor: "bottom",
130
- drawerDragger: C.current,
131
- onClose: D,
129
+ drawerDragger: k.current,
130
+ onClose: C,
132
131
  slots: {
133
- backdrop: j
132
+ backdrop: S
134
133
  },
135
134
  PaperProps: {
136
- sx: c(
135
+ sx: l(
137
136
  {
138
137
  backgroundColor: "background.default",
139
138
  borderRadius: 3,
@@ -145,28 +144,28 @@ function ye({
145
144
  backgroundColor: "transparent"
146
145
  },
147
146
  overflow: "hidden",
148
- animation: a ? "glowBreathe 7s linear infinite" : "none",
147
+ animation: t ? "glowBreathe 7s linear infinite" : "none",
149
148
  "@keyframes glowBreathe": {
150
149
  "0%, 100%": {
151
150
  boxShadow: `
152
- inset 0 0 7px ${u(n, 0.3)},
153
- inset 0 0 12px ${u(n, 0.3)}`
151
+ inset 0 0 7px ${c(e, 0.3)},
152
+ inset 0 0 12px ${c(e, 0.3)}`
154
153
  },
155
154
  "50%": {
156
155
  boxShadow: `
157
- inset 0 0 18px ${u(n, 0.7)},
158
- inset 0 0 24px ${u(n, 0.5)}`
156
+ inset 0 0 18px ${c(e, 0.7)},
157
+ inset 0 0 24px ${c(e, 0.5)}`
159
158
  }
160
159
  }
161
160
  },
162
- (B = e == null ? void 0 : e.containerDrawer) == null ? void 0 : B.sx
161
+ i?.containerDrawer?.sx
163
162
  )
164
163
  },
165
164
  children: [
166
- w ? null : /* @__PURE__ */ t(
167
- l,
165
+ h ? null : /* @__PURE__ */ a(
166
+ s,
168
167
  {
169
- ref: C,
168
+ ref: k,
170
169
  sx: {
171
170
  px: 1,
172
171
  pt: 2,
@@ -175,8 +174,8 @@ function ye({
175
174
  mb: -2,
176
175
  zIndex: 2
177
176
  },
178
- children: /* @__PURE__ */ t(
179
- l,
177
+ children: /* @__PURE__ */ a(
178
+ s,
180
179
  {
181
180
  sx: {
182
181
  width: "48px",
@@ -189,7 +188,7 @@ function ye({
189
188
  }
190
189
  ),
191
190
  /* @__PURE__ */ m(
192
- l,
191
+ s,
193
192
  {
194
193
  sx: {
195
194
  touchAction: "none",
@@ -199,25 +198,25 @@ function ye({
199
198
  backgroundColor: "background.default"
200
199
  },
201
200
  children: [
202
- v ? g : null,
203
- /* @__PURE__ */ t(h, { currentAppColor: n, sx: c({ mx: 0 }, (I = e == null ? void 0 : e.footer) == null ? void 0 : I.sx) })
201
+ D ? f : null,
202
+ /* @__PURE__ */ a(b, { currentAppColor: e, sx: l({ mx: 0 }, i?.footer?.sx) })
204
203
  ]
205
204
  }
206
205
  )
207
206
  ]
208
207
  }
209
- ) : /* @__PURE__ */ t(
210
- ne,
208
+ ) : /* @__PURE__ */ a(
209
+ q,
211
210
  {
212
- open: a,
211
+ open: t,
213
212
  slots: {
214
- backdrop: j
213
+ backdrop: S
215
214
  },
216
- keepMounted: k,
215
+ keepMounted: w,
217
216
  className: "did-connect__container-dialog",
218
- onClose: D,
217
+ onClose: C,
219
218
  PaperProps: {
220
- sx: c(
219
+ sx: l(
221
220
  {
222
221
  // 避免样式被 server 中的定义覆盖
223
222
  "&.MuiPaper-rounded": {
@@ -226,12 +225,12 @@ function ye({
226
225
  position: "relative",
227
226
  backgroundColor: "background.default"
228
227
  },
229
- S,
230
- (z = e == null ? void 0 : e.containerDialog) == null ? void 0 : z.sx
228
+ $,
229
+ i?.containerDialog?.sx
231
230
  )
232
231
  },
233
232
  children: /* @__PURE__ */ m(
234
- ae,
233
+ J,
235
234
  {
236
235
  sx: {
237
236
  maxWidth: "calc(100vw - 18px)",
@@ -243,8 +242,8 @@ function ye({
243
242
  backgroundColor: "background.default"
244
243
  },
245
244
  children: [
246
- v ? g : null,
247
- /* @__PURE__ */ t(h, { currentAppColor: n, sx: c({ mx: 0 }, (M = e == null ? void 0 : e.footer) == null ? void 0 : M.sx) })
245
+ D ? f : null,
246
+ /* @__PURE__ */ a(b, { currentAppColor: e, sx: l({ mx: 0 }, i?.footer?.sx) })
248
247
  ]
249
248
  }
250
249
  )
@@ -252,5 +251,5 @@ function ye({
252
251
  );
253
252
  }
254
253
  export {
255
- ye as default
254
+ ko as default
256
255
  };