@arcblock/ux 3.0.7 → 3.0.8

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 (188) hide show
  1. package/lib/ActionButton/index.js +8 -8
  2. package/lib/ActivityIndicator/index.js +7 -6
  3. package/lib/Address/compact-text.js +3 -2
  4. package/lib/Address/did-address.js +3 -3
  5. package/lib/Address/index.js +2 -2
  6. package/lib/Address/responsive-did-address.js +3 -3
  7. package/lib/Alert/index.js +7 -7
  8. package/lib/AnimationWaiter/dark-animation.json.js +27 -0
  9. package/lib/AnimationWaiter/default-animation.json.js +29 -0
  10. package/lib/AnimationWaiter/index.js +10 -10
  11. package/lib/Async/index.js +4 -4
  12. package/lib/Avatar/etherscan-blockies.js +15 -15
  13. package/lib/Avatar/index.js +5 -5
  14. package/lib/Badge/index.js +4 -4
  15. package/lib/Blocklet/blocklet.js +10 -10
  16. package/lib/Blocklet/index.js +5 -6
  17. package/lib/Blocklet/utils.js +1 -1
  18. package/lib/BlockletContext/index.js +1 -1
  19. package/lib/BlockletNFT/index.js +18 -18
  20. package/lib/BlockletV2/blocklet.js +36 -35
  21. package/lib/BlockletV2/components/icon-text.js +1 -1
  22. package/lib/BlockletV2/components/tooltip-icon.js +1 -1
  23. package/lib/BlockletV2/index.js +7 -8
  24. package/lib/BlockletV2/utils.js +1 -1
  25. package/lib/Button/index.js +1 -1
  26. package/lib/Button/wrap.js +2 -2
  27. package/lib/ButtonGroup/index.js +1 -1
  28. package/lib/Center/index.js +1 -1
  29. package/lib/ClickToCopy/copy-button.js +1 -1
  30. package/lib/ClickToCopy/index.js +5 -5
  31. package/lib/CloseButton/index.js +1 -1
  32. package/lib/CodeBlock/index.js +3 -3
  33. package/lib/Colors/index.js +3 -3
  34. package/lib/Config/config-provider.js +16 -15
  35. package/lib/Config/index.js +5 -3
  36. package/lib/Config/theme-mode-toggle.js +1 -1
  37. package/lib/ContactForm/index.js +4 -4
  38. package/lib/CookieConsent/index.js +1 -1
  39. package/lib/CountDown/index.js +2 -2
  40. package/lib/DID/index.js +49 -49
  41. package/lib/DIDConnect/app-icon.js +10 -10
  42. package/lib/DIDConnect/app-info-item.js +4 -4
  43. package/lib/DIDConnect/auth-apps/auth-apps-info.js +1 -1
  44. package/lib/DIDConnect/auth-apps/index.js +9 -9
  45. package/lib/DIDConnect/did-connect-container.js +19 -18
  46. package/lib/DIDConnect/did-connect-footer.js +6 -6
  47. package/lib/DIDConnect/index.js +10 -10
  48. package/lib/DIDConnect/landing-page.js +30 -29
  49. package/lib/DIDConnect/powered-by.js +2 -2
  50. package/lib/DIDConnect/request-storage-access-api-dialog.js +5 -5
  51. package/lib/DIDConnect/with-container.js +26 -25
  52. package/lib/DIDConnect/with-ux-theme.js +7 -6
  53. package/lib/Datatable/CustomToolbar.js +12 -12
  54. package/lib/Datatable/TableSearch.js +2 -2
  55. package/lib/Datatable/index.js +4 -4
  56. package/lib/Dialog/confirm.js +10 -10
  57. package/lib/Dialog/dialog.js +7 -7
  58. package/lib/Dialog/index.js +3 -3
  59. package/lib/Dialog/use-confirm.js +1 -1
  60. package/lib/DriftBot/index.js +1 -1
  61. package/lib/Earth/countries.json.js +13 -0
  62. package/lib/Earth/index.js +9 -9
  63. package/lib/Empty/index.js +1 -1
  64. package/lib/ErrorBoundary/fallback.js +15 -15
  65. package/lib/ErrorBoundary/index.js +6 -1
  66. package/lib/Footer/index.js +3 -3
  67. package/lib/Header/auto-hidden.js +1 -1
  68. package/lib/Header/header.js +3 -3
  69. package/lib/Header/index.js +3 -3
  70. package/lib/Header/responsive-header.js +6 -6
  71. package/lib/Icon/image.js +2 -2
  72. package/lib/Icon/index.js +18 -18
  73. package/lib/Img/index.js +1 -1
  74. package/lib/InfoRow/index.js +1 -1
  75. package/lib/Layout/dashboard/index.js +31 -29
  76. package/lib/Layout/dashboard/sidebar.js +2 -2
  77. package/lib/Layout/dashboard-legacy/header.js +2 -2
  78. package/lib/Layout/dashboard-legacy/index.js +4 -4
  79. package/lib/Layout/dashboard-legacy/sidebar.js +8 -8
  80. package/lib/Layout/index.js +5 -5
  81. package/lib/Locale/context.js +20 -20
  82. package/lib/Locale/selector.js +3 -3
  83. package/lib/Logo/images/logo-dark-text.svg.js +5 -0
  84. package/lib/Logo/images/logo-dark-top.svg.js +5 -0
  85. package/lib/Logo/images/logo-light-text.svg.js +5 -0
  86. package/lib/Logo/images/logo-light-top.svg.js +5 -0
  87. package/lib/Logo/index.js +18 -18
  88. package/lib/Metric/index.js +2 -2
  89. package/lib/NFTDisplay/NFTBroken.svg.js +108 -0
  90. package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
  91. package/lib/NFTDisplay/broken.js +2 -2
  92. package/lib/NFTDisplay/index.js +35 -35
  93. package/lib/NFTDisplay/loading.js +1 -1
  94. package/lib/NFTDisplay/render-svg.js +1 -1
  95. package/lib/NFTDisplay/svg-embedder/img.js +3 -3
  96. package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
  97. package/lib/NavMenu/images/OCAP.svg.js +5 -0
  98. package/lib/NavMenu/images/abt-network.svg.js +7 -0
  99. package/lib/NavMenu/images/ai-kit.svg.js +7 -0
  100. package/lib/NavMenu/images/aigne.svg.js +7 -0
  101. package/lib/NavMenu/images/aistro.svg.js +5 -0
  102. package/lib/NavMenu/images/arcsphere.svg.js +10 -0
  103. package/lib/NavMenu/images/blocklet-framework.svg.js +7 -0
  104. package/lib/NavMenu/images/blocklet-launcher.svg.js +5 -0
  105. package/lib/NavMenu/images/blocklet-server.svg.js +7 -0
  106. package/lib/NavMenu/images/blocklet-store.svg.js +5 -0
  107. package/lib/NavMenu/images/creator-studio.svg.js +7 -0
  108. package/lib/NavMenu/images/did-connect.svg.js +5 -0
  109. package/lib/NavMenu/images/did-name-service.svg.js +5 -0
  110. package/lib/NavMenu/images/did-wallet.svg.js +7 -0
  111. package/lib/NavMenu/images/did.svg.js +5 -0
  112. package/lib/NavMenu/images/nft-studio.svg.js +5 -0
  113. package/lib/NavMenu/images/vc.svg.js +5 -0
  114. package/lib/NavMenu/images/web3-kit.svg.js +7 -0
  115. package/lib/NavMenu/index.js +2 -2
  116. package/lib/NavMenu/nav-menu.js +23 -22
  117. package/lib/NavMenu/products.js +32 -32
  118. package/lib/NavMenu/style.js +1 -1
  119. package/lib/NavMenu/sub-item-group.js +1 -1
  120. package/lib/PageScroller/index.js +19 -19
  121. package/lib/PageScroller/story/FullPage.js +27 -27
  122. package/lib/PageScroller/story/PageContain.js +8 -8
  123. package/lib/Passport/index.js +2 -3
  124. package/lib/Passport/passport.js +2 -2
  125. package/lib/PhoneInput/country-select.js +1 -1
  126. package/lib/PhoneInput/index.js +2 -2
  127. package/lib/PricingTable/PricingPlan.js +1 -1
  128. package/lib/PricingTable/index.js +3 -3
  129. package/lib/RelativeTime/index.js +1 -1
  130. package/lib/Result/common.js +6 -4
  131. package/lib/Result/index.js +2 -2
  132. package/lib/Result/result.js +1 -1
  133. package/lib/Screenshot/BaseScreenshot/index.js +3 -3
  134. package/lib/Screenshot/index.js +9 -9
  135. package/lib/SessionBlocklet/index.js +8 -8
  136. package/lib/SessionManager/index.js +2 -3
  137. package/lib/SessionUser/components/did-space.js +14 -14
  138. package/lib/SessionUser/components/logged-in.js +33 -33
  139. package/lib/SessionUser/components/quick-login-item.js +29 -29
  140. package/lib/SessionUser/components/session-user-item.js +23 -23
  141. package/lib/SessionUser/components/session-user-switch.js +4 -4
  142. package/lib/SessionUser/components/un-login.js +7 -7
  143. package/lib/SessionUser/components/user-info.js +16 -16
  144. package/lib/SessionUser/images/did-spaces.svg.js +5 -0
  145. package/lib/SessionUser/index.js +2 -2
  146. package/lib/SharedBridge/index.js +23 -23
  147. package/lib/Spinner/index.js +1 -1
  148. package/lib/SplitButton/index.js +1 -1
  149. package/lib/Switch/index.js +1 -1
  150. package/lib/Tabs/index.js +1 -1
  151. package/lib/Tag/index.js +6 -6
  152. package/lib/TextCollapse/index.js +2 -2
  153. package/lib/Theme/index.js +22 -11
  154. package/lib/Theme/theme-provider.js +2 -2
  155. package/lib/Theme/theme.js +4 -4
  156. package/lib/Toast/index.js +11 -11
  157. package/lib/UserCard/Cards/avatar-only.js +2 -2
  158. package/lib/UserCard/Cards/basic-info.js +3 -3
  159. package/lib/UserCard/Cards/index.js +3 -3
  160. package/lib/UserCard/Cards/name-only.js +1 -1
  161. package/lib/UserCard/Container/card.js +2 -2
  162. package/lib/UserCard/Container/dialog.js +1 -1
  163. package/lib/UserCard/Content/basic.js +1 -1
  164. package/lib/UserCard/Content/clock.js +3 -3
  165. package/lib/UserCard/Content/minimal.js +8 -8
  166. package/lib/UserCard/Content/tooltip-avatar.js +1 -1
  167. package/lib/UserCard/components.js +23 -23
  168. package/lib/UserCard/index.js +12 -12
  169. package/lib/Util/index.js +2 -2
  170. package/lib/VerificationCode/index.js +1 -1
  171. package/lib/Video/index.js +2 -2
  172. package/lib/Wallet/Action.js +4 -4
  173. package/lib/Wallet/Download.js +6 -6
  174. package/lib/Wallet/Open.js +1 -1
  175. package/lib/Wallet/images/android_download.svg.js +5 -0
  176. package/lib/Wallet/images/app-store.svg.js +5 -0
  177. package/lib/Wallet/images/google-play.svg.js +5 -0
  178. package/lib/WalletOSIcon/index.js +1 -1
  179. package/lib/WebWalletSWKeeper/index.js +2 -2
  180. package/lib/WechatPrompt/index.js +1 -1
  181. package/lib/hooks/use-blocklet-logo.js +15 -13
  182. package/lib/hooks/use-clock.js +1 -1
  183. package/lib/index.js +79 -74
  184. package/lib/ux.css +1 -0
  185. package/lib/withTheme/index.js +7 -6
  186. package/lib/withTracker/error_boundary.js +1 -1
  187. package/package.json +7 -7
  188. package/vite.config.mjs +1 -1
@@ -1,10 +1,10 @@
1
1
  import { jsxs as b, jsx as o } from "react/jsx-runtime";
2
2
  import { useState as l, useRef as $, useEffect as c } from "react";
3
- import { Skeleton as M } from "@mui/material";
3
+ import { useTheme as M, Skeleton as E } from "@mui/material";
4
4
  import n from "prop-types";
5
- import E from "react-lottie-player";
6
- import F from "lodash/noop";
7
- import { styled as P, useTheme as R } from "../Theme";
5
+ import F from "react-lottie-player";
6
+ import P from "lodash/noop";
7
+ import { styled as R } from "../Theme/index.js";
8
8
  function W({
9
9
  animationData: m = null,
10
10
  size: s = 256,
@@ -18,11 +18,11 @@ function W({
18
18
  increaseSpeed: x = 0,
19
19
  ...I
20
20
  }) {
21
- const g = R(), [d, N] = l(0), [y, k] = l(h), [w, A] = l(0), [O, S] = l(null), [j, p] = l(!m), C = $((/* @__PURE__ */ new Date()).getTime());
21
+ const g = M(), [d, N] = l(0), [y, k] = l(h), [w, A] = l(0), [O, S] = l(null), [j, p] = l(!m), C = $((/* @__PURE__ */ new Date()).getTime());
22
22
  Array.isArray(r) || (r = [r]), c(() => {
23
23
  m || (p(!0), (async () => {
24
24
  try {
25
- const e = await (g.palette.mode === "dark" ? import("./dark-animation.json") : import("./default-animation.json"));
25
+ const e = await (g.palette.mode === "dark" ? import("./dark-animation.json.js") : import("./default-animation.json.js"));
26
26
  S(e.default || e), p(!1);
27
27
  } catch (e) {
28
28
  console.error("Failed to load animation:", e), p(!1);
@@ -40,7 +40,7 @@ function W({
40
40
  };
41
41
  }, [r, f]), c(() => {
42
42
  if (!a.length)
43
- return F;
43
+ return P;
44
44
  const t = setTimeout(() => {
45
45
  let e = d + 1;
46
46
  e >= a.length && (e = 0), N(e);
@@ -60,8 +60,8 @@ function W({
60
60
  return w === t ? e = "show-message" : w < t && (e = "message-after"), e;
61
61
  };
62
62
  return /* @__PURE__ */ b(q, { ...I, children: [
63
- j ? /* @__PURE__ */ o("div", { style: { width: s, height: s, display: "flex", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ o(M, { variant: "rounded", width: s * 0.4, height: s * 0.4 }) }) : /* @__PURE__ */ o(
64
- E,
63
+ j ? /* @__PURE__ */ o("div", { style: { width: s, height: s, display: "flex", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ o(E, { variant: "rounded", width: s * 0.4, height: s * 0.4 }) }) : /* @__PURE__ */ o(
64
+ F,
65
65
  {
66
66
  loop: !0,
67
67
  animationData: m || O,
@@ -108,7 +108,7 @@ W.propTypes = {
108
108
  maybeDuration: n.number,
109
109
  increaseSpeed: n.number
110
110
  };
111
- const q = P("div")`
111
+ const q = R("div")`
112
112
  display: flex;
113
113
  justify-content: center;
114
114
  align-items: center;
@@ -1,7 +1,7 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as e } from "react/jsx-runtime";
2
2
  import m from "react";
3
3
  import { CircularProgress as p } from "@mui/material";
4
- function d(e, n = "default", s = !0) {
4
+ function d(r, n = "default", s = !0) {
5
5
  class a extends m.Component {
6
6
  constructor(t) {
7
7
  super(t), this.state = {
@@ -10,11 +10,11 @@ function d(e, n = "default", s = !0) {
10
10
  };
11
11
  }
12
12
  componentDidMount() {
13
- e().then((t) => this.setState({ Component: t[n] })).catch((t) => this.setState({ error: `Failed to load async component: ${t.message}` }));
13
+ r().then((t) => this.setState({ Component: t[n] })).catch((t) => this.setState({ error: `Failed to load async component: ${t.message}` }));
14
14
  }
15
15
  render() {
16
16
  const { Component: t, error: o } = this.state;
17
- return o || (t ? /* @__PURE__ */ r(t, { ...this.props }) : s ? /* @__PURE__ */ r(p, { color: "primary" }) : null);
17
+ return o || (t ? /* @__PURE__ */ e(t, { ...this.props }) : s ? /* @__PURE__ */ e(p, { color: "primary" }) : null);
18
18
  }
19
19
  }
20
20
  return a;
@@ -5,20 +5,20 @@ function g(t) {
5
5
  for (let o = 0; o < t.length; o++)
6
6
  n[o % 4] = (n[o % 4] << 5) - n[o % 4] + t.charCodeAt(o);
7
7
  }
8
- function i() {
8
+ function h() {
9
9
  const t = n[0] ^ n[0] << 11;
10
10
  return n[0] = n[1], n[1] = n[2], n[2] = n[3], n[3] = n[3] ^ n[3] >> 19 ^ t ^ t >> 8, (n[3] >>> 0) / (1 << 31 >>> 0);
11
11
  }
12
12
  function d() {
13
- const t = Math.floor(i() * 360), o = `${i() * 60 + 40}%`, e = `${(i() + i() + i() + i()) * 25}%`;
13
+ const t = Math.floor(h() * 360), o = `${h() * 60 + 40}%`, e = `${(h() + h() + h() + h()) * 25}%`;
14
14
  return `hsl(${t},${o},${e})`;
15
15
  }
16
16
  function w(t) {
17
- const o = t, e = t, h = Math.ceil(o / 2), f = o - h, r = [];
18
- for (let a = 0; a < e; a++) {
17
+ const o = t, e = t, a = Math.ceil(o / 2), f = o - a, r = [];
18
+ for (let i = 0; i < e; i++) {
19
19
  let c = [];
20
- for (let s = 0; s < h; s++)
21
- c[s] = Math.floor(i() * 2.3);
20
+ for (let s = 0; s < a; s++)
21
+ c[s] = Math.floor(h() * 2.3);
22
22
  const l = c.slice(0, f);
23
23
  l.reverse(), c = c.concat(l);
24
24
  for (let s = 0; s < c.length; s++)
@@ -26,23 +26,23 @@ function w(t) {
26
26
  }
27
27
  return r;
28
28
  }
29
- function M(t, o, e, h, f) {
30
- const r = document.createElement("canvas"), a = Math.sqrt(t.length);
31
- r.width = r.height = a * e;
29
+ function M(t, o, e, a, f) {
30
+ const r = document.createElement("canvas"), i = Math.sqrt(t.length);
31
+ r.width = r.height = i * e;
32
32
  const c = r.getContext("2d");
33
- c.fillStyle = h, c.fillRect(0, 0, r.width, r.height), c.fillStyle = o;
33
+ c.fillStyle = a, c.fillRect(0, 0, r.width, r.height), c.fillStyle = o;
34
34
  for (let l = 0; l < t.length; l++) {
35
- const s = Math.floor(l / a), u = l % a;
35
+ const s = Math.floor(l / i), u = l % i;
36
36
  c.fillStyle = t[l] === 1 ? o : f, t[l] && c.fillRect(u * e, s * e, e, e);
37
37
  }
38
38
  return r;
39
39
  }
40
40
  function v(t) {
41
41
  t = t || {};
42
- const o = t.size || 8, e = t.scale || 4, h = t.seed || Math.floor(Math.random() * 10 ** 16).toString(16);
43
- g(h);
44
- const f = t.color || d(), r = t.bgcolor || d(), a = t.spotcolor || d(), c = w(o);
45
- return M(c, f, e, r, a);
42
+ const o = t.size || 8, e = t.scale || 4, a = t.seed || Math.floor(Math.random() * 10 ** 16).toString(16);
43
+ g(a);
44
+ const f = t.color || d(), r = t.bgcolor || d(), i = t.spotcolor || d(), c = w(o);
45
+ return M(c, f, e, r, i);
46
46
  }
47
47
  const y = { createIcon: v };
48
48
  export {
@@ -5,11 +5,11 @@ import { ErrorBoundary as z } from "react-error-boundary";
5
5
  import { Shape as D } from "@arcblock/did-motif";
6
6
  import { Box as u } from "@mui/material";
7
7
  import n from "lodash/isUndefined";
8
- import m from "../Img";
9
- import { mergeProps as E, isEthereumDid as R } from "../Util";
10
- import M from "./did-motif";
11
- import T from "./etherscan-blockies";
12
- import { DID_PREFIX as f } from "../Util/constant";
8
+ import m from "../Img/index.js";
9
+ import { mergeProps as E, isEthereumDid as R } from "../Util/index.js";
10
+ import M from "./did-motif.js";
11
+ import T from "./etherscan-blockies.js";
12
+ import { DID_PREFIX as f } from "../Util/constant.js";
13
13
  function d({ ...s }) {
14
14
  const r = Object.assign({}, s);
15
15
  n(r.did) && (r.did = ""), n(r.size) && (r.size = 36), n(r.variant) && (r.variant = "default"), n(r.animation) && (r.animation = !1), n(r.shape) && (r.shape = ""), n(r.blockiesPadding) && (r.blockiesPadding = !0), n(r.responsive) && (r.responsive = !1);
@@ -2,10 +2,10 @@ import { jsx as c } from "react/jsx-runtime";
2
2
  import r from "prop-types";
3
3
  import { Typography as u } from "@mui/material";
4
4
  import n from "lodash/isUndefined";
5
- import o from "../Colors";
6
- import { mergeProps as b } from "../Util";
7
- import { withDeprecated as w } from "../Util/deprecate";
8
- import { styled as x } from "../Theme";
5
+ import o from "../Colors/themes/default.js";
6
+ import { mergeProps as b } from "../Util/index.js";
7
+ import { withDeprecated as w } from "../Util/deprecate.js";
8
+ import { styled as x } from "../Theme/index.js";
9
9
  const s = {
10
10
  error: {
11
11
  color: o.common.white,
@@ -1,13 +1,13 @@
1
1
  import { jsx as o, jsxs as r } from "react/jsx-runtime";
2
2
  import { isValidElement as f } from "react";
3
3
  import t from "prop-types";
4
- import { useMediaQuery as S, Typography as n, CircularProgress as C } from "@mui/material";
5
- import I from "../Avatar";
6
- import P from "../Button";
7
- import A from "../Img";
8
- import { styled as B, useTheme as D } from "../Theme";
9
- import { strippedString as g } from "./utils";
10
- const F = B("div")`
4
+ import { useTheme as C, useMediaQuery as S, Typography as n, CircularProgress as I } from "@mui/material";
5
+ import B from "../Avatar/index.js";
6
+ import P from "../Button/index.js";
7
+ import A from "../Img/index.js";
8
+ import { styled as D } from "../Theme/index.js";
9
+ import { strippedString as g } from "./utils.js";
10
+ const F = D("div")`
11
11
  &.arcblock-blocklet {
12
12
  padding: ${(e) => e.theme.spacing(2)} ${(e) => e.theme.spacing(2)} 0
13
13
  ${(e) => e.theme.spacing(2)};
@@ -135,9 +135,9 @@ function H({
135
135
  }) {
136
136
  const h = (k, M = () => !1) => (i, ...T) => {
137
137
  M() ? (i.preventDefault(), i.stopPropagation()) : k instanceof Function && (i.preventDefault(), i.stopPropagation(), k(...T));
138
- }, w = h(b, () => !!(m || d || a)), y = D(), $ = S(y.breakpoints.up("sm")), N = h(v), z = $ ? 80 : 64;
138
+ }, w = h(b, () => !!(m || d || a)), y = C(), $ = S(y.breakpoints.up("sm")), N = h(v), z = $ ? 80 : 64;
139
139
  return /* @__PURE__ */ o(F, { className: `${_} arcblock-blocklet`, ...x, children: /* @__PURE__ */ r("div", { className: "arcblock-blocklet__content", onClick: N, children: [
140
- s ? /* @__PURE__ */ o("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ o(A, { src: s }) }) : c && /* @__PURE__ */ o("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ o(I, { did: c, size: z }) }),
140
+ s ? /* @__PURE__ */ o("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ o(A, { src: s }) }) : c && /* @__PURE__ */ o("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ o(B, { did: c, size: z }) }),
141
141
  /* @__PURE__ */ r("div", { className: "arcblock-blocklet__info", children: [
142
142
  /* @__PURE__ */ r("div", { className: "arcblock-blocklet__text", children: [
143
143
  f(e) ? /* @__PURE__ */ o(n, { component: "h3", variant: "h3", className: "arcblock-blocklet__title", children: e }) : /* @__PURE__ */ o(
@@ -186,7 +186,7 @@ function H({
186
186
  textAlign: "center"
187
187
  },
188
188
  children: [
189
- a && /* @__PURE__ */ o(C, { size: 15, style: { marginRight: 3, color: "inherit" } }),
189
+ a && /* @__PURE__ */ o(I, { size: 15, style: { marginRight: 3, color: "inherit" } }),
190
190
  u
191
191
  ]
192
192
  }
@@ -1,8 +1,7 @@
1
- import { default as f, strippedString as p } from "./utils";
2
- import "./blocklet";
3
- import { default as l } from "./blocklet";
1
+ import { default as p, strippedString as a } from "./utils.js";
2
+ import o from "./blocklet.js";
4
3
  export {
5
- f as ActionButton,
6
- l as default,
7
- p as strippedString
4
+ p as ActionButton,
5
+ o as default,
6
+ a as strippedString
8
7
  };
@@ -1,4 +1,4 @@
1
- import { styled as o } from "../Theme";
1
+ import { styled as o } from "../Theme/index.js";
2
2
  const e = o("div")`
3
3
  background-color: transparent !important;
4
4
  & > :not(.Mui-disabled) {
@@ -1,7 +1,7 @@
1
1
  import { jsx as B } from "react/jsx-runtime";
2
2
  import { useMemoizedFn as d, useAsyncEffect as h } from "ahooks";
3
3
  import { createContext as D, useState as c, use as p } from "react";
4
- import { getBlockletData as r, getFederatedEnabled as w, getMaster as b } from "../Util/federated";
4
+ import { getBlockletData as r, getFederatedEnabled as w, getMaster as b } from "../Util/federated.js";
5
5
  const s = D({
6
6
  blocklet: null,
7
7
  masterBlocklet: null
@@ -1,13 +1,13 @@
1
1
  import { jsxs as a, jsx as t, Fragment as F } from "react/jsx-runtime";
2
2
  import { useRef as I } from "react";
3
3
  import o from "prop-types";
4
- import { useMediaQuery as m, Typography as f, Portal as q, CircularProgress as A } from "@mui/material";
5
- import O from "../Avatar";
6
- import Z from "../Icon";
7
- import H from "../Button";
8
- import Q from "../Img";
9
- import { styled as U, useTheme as W } from "../Theme";
10
- function E(e, s = 1) {
4
+ import { useTheme as q, useMediaQuery as m, Typography as f, Portal as A, CircularProgress as O } from "@mui/material";
5
+ import W from "../Avatar/index.js";
6
+ import Z from "../Icon/index.js";
7
+ import E from "../Button/index.js";
8
+ import H from "../Img/index.js";
9
+ import { styled as Q } from "../Theme/index.js";
10
+ function U(e, s = 1) {
11
11
  let c = e;
12
12
  const r = ["", "k", "m", "b"];
13
13
  let i = 0;
@@ -15,7 +15,7 @@ function E(e, s = 1) {
15
15
  c = (c / 1e3).toFixed(s), i += 1;
16
16
  return e && `${c}${r[i]}`;
17
17
  }
18
- const G = U("div")`
18
+ const G = Q("div")`
19
19
  &.arcblock-blocklet {
20
20
  padding: 0 16px;
21
21
  background: ${(e) => e.theme.palette.common.white};
@@ -201,33 +201,33 @@ function J({
201
201
  isStickyButton: z = !1,
202
202
  onButtonClick: _ = null,
203
203
  onMainClick: N = null,
204
- className: $ = null,
205
- scaleClickZone: C = 1.5,
204
+ className: C = null,
205
+ scaleClickZone: $ = 1.5,
206
206
  ...M
207
207
  }) {
208
208
  const x = (l, k = () => !1) => (d, ...j) => {
209
209
  k() ? (d.preventDefault(), d.stopPropagation()) : l instanceof Function && (d.preventDefault(), d.stopPropagation(), l(...j));
210
- }, S = x(_, () => !!(h || u || b)), T = x(N), p = W(), P = m(p.breakpoints.down("md")), B = m(p.breakpoints.down("lg")), D = m(p.breakpoints.up("lg")), n = i === "auto" ? P ? "xs" : B ? "sm" : "md" : i, R = i === "auto" ? D ? 80 : 40 : i === "md" ? 80 : 40, g = I(null);
210
+ }, S = x(_, () => !!(h || u || b)), T = x(N), p = q(), B = m(p.breakpoints.down("md")), P = m(p.breakpoints.down("lg")), D = m(p.breakpoints.up("lg")), n = i === "auto" ? B ? "xs" : P ? "sm" : "md" : i, R = i === "auto" ? D ? 80 : 40 : i === "md" ? 80 : 40, g = I(null);
211
211
  return /* @__PURE__ */ a(
212
212
  G,
213
213
  {
214
214
  ...M,
215
- scaleClickZone: C,
216
- className: `${$} arcblock-blocklet arcblock-blocklet--size-${n}`,
215
+ scaleClickZone: $,
216
+ className: `${C} arcblock-blocklet arcblock-blocklet--size-${n}`,
217
217
  children: [
218
218
  /* @__PURE__ */ t("div", { className: "arcblock-blocklet__content", children: /* @__PURE__ */ t("div", { className: "arcblock-blocklet__content--main", onClick: T, ref: g, children: /* @__PURE__ */ a("div", { className: "arcblock-blocklet__content--body", children: [
219
- r ? /* @__PURE__ */ t("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ t(Q, { src: r }) }) : s && /* @__PURE__ */ t("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ t(O, { did: s, size: R }) }),
219
+ r ? /* @__PURE__ */ t("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ t(H, { src: r }) }) : s && /* @__PURE__ */ t("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ t(W, { did: s, size: R }) }),
220
220
  /* @__PURE__ */ a("div", { className: "arcblock-blocklet__info", children: [
221
221
  /* @__PURE__ */ t(f, { component: "h3", variant: "h3", className: "arcblock-blocklet__title", title: e, children: e }),
222
222
  c && /* @__PURE__ */ t(f, { component: "div", variant: "body2", className: "arcblock-blocklet__describe", title: c, children: c }),
223
- ["md", "sm", "xs"].includes(n) && /* @__PURE__ */ t(q, { container: g.current, disablePortal: n === "md", children: /* @__PURE__ */ t(
223
+ ["md", "sm", "xs"].includes(n) && /* @__PURE__ */ t(A, { container: g.current, disablePortal: n === "md", children: /* @__PURE__ */ t(
224
224
  "div",
225
225
  {
226
226
  className: "arcblock-blocklet__button",
227
227
  onClick: S,
228
228
  style: { display: z ? "block" : "" },
229
229
  children: h || _ && /* @__PURE__ */ a(
230
- H,
230
+ E,
231
231
  {
232
232
  className: "arcblock-blocklet__button--hover",
233
233
  variant: "outlined",
@@ -237,7 +237,7 @@ function J({
237
237
  style: n === "md" ? { padding: "3px 20px", fontSize: "14px" } : { padding: "3px 15px", minWidth: "54px", fontSize: "13px" },
238
238
  children: [
239
239
  b && /* @__PURE__ */ t(
240
- A,
240
+ O,
241
241
  {
242
242
  size: n === "md" ? 15 : 13,
243
243
  style: { marginRight: 3, color: "inherit" }
@@ -260,7 +260,7 @@ function J({
260
260
  title: l.title,
261
261
  children: l.empty ? null : /* @__PURE__ */ a(F, { children: [
262
262
  /* @__PURE__ */ t(v, { name: l.icon }),
263
- l.pretty ? E(l.value) : l.value
263
+ l.pretty ? U(l.value) : l.value
264
264
  ] })
265
265
  },
266
266
  k
@@ -1,15 +1,16 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
- import { isValidElement as W } from "react";
3
- import F from "@iconify-icons/tabler/cloud-download";
2
+ import { isValidElement as S } from "react";
3
+ import E from "@iconify-icons/tabler/cloud-download";
4
4
  import { Icon as s } from "@iconify/react";
5
- import { Verified as O } from "@mui/icons-material";
6
- import { Card as V, Stack as h, Typography as I, Box as z, CircularProgress as E } from "@mui/material";
7
- import T from "../Avatar";
8
- import q from "../Button";
9
- import { useTheme as G } from "../Theme";
10
- import d from "./components/icon-text";
11
- import B from "./components/tooltip-icon";
12
- import { strippedString as M, formatDownloadCount as J } from "./utils";
5
+ import { Verified as F } from "@mui/icons-material";
6
+ import { useTheme as O, Card as V, Stack as x, Typography as I, Box as z, CircularProgress as q } from "@mui/material";
7
+ import B from "../Avatar/index.js";
8
+ import G from "../Button/index.js";
9
+ import "../Theme/theme.js";
10
+ import "../Theme/theme-provider.js";
11
+ import d from "./components/icon-text.js";
12
+ import T from "./components/tooltip-icon.js";
13
+ import { strippedString as M, formatDownloadCount as J } from "./utils.js";
13
14
  function co({ ...A }) {
14
15
  const {
15
16
  title: e,
@@ -21,9 +22,9 @@ function co({ ...A }) {
21
22
  did: u,
22
23
  official: l,
23
24
  buttonText: R = "Install",
24
- buttonDisabled: g,
25
+ buttonDisabled: y,
25
26
  buttonLoading: p,
26
- button: y,
27
+ button: g,
27
28
  onButtonClick: k = () => {
28
29
  },
29
30
  onMainClick: b,
@@ -32,10 +33,10 @@ function co({ ...A }) {
32
33
  icons: f,
33
34
  status: i,
34
35
  ...v
35
- } = A, x = G(), w = (o, H = () => !1) => (C, ...N) => {
36
- const S = o instanceof Function;
37
- (H() || S) && (C.preventDefault(), C.stopPropagation(), S && o(...N));
38
- }, _ = b && w(b), j = w(k, () => !!(y || g || p)), c = W(e) ? { children: e } : { title: M(e), dangerouslySetInnerHTML: { __html: e } }, a = W(n) ? { children: n } : { title: M(n), dangerouslySetInnerHTML: { __html: n } };
36
+ } = A, h = O(), w = (o, H = () => !1) => (C, ...N) => {
37
+ const W = o instanceof Function;
38
+ (H() || W) && (C.preventDefault(), C.stopPropagation(), W && o(...N));
39
+ }, _ = b && w(b), j = w(k, () => !!(g || y || p)), a = S(e) ? { children: e } : { title: M(e), dangerouslySetInnerHTML: { __html: e } }, c = S(n) ? { children: n } : { title: M(n), dangerouslySetInnerHTML: { __html: n } };
39
40
  return /* @__PURE__ */ r(
40
41
  V,
41
42
  {
@@ -45,7 +46,7 @@ function co({ ...A }) {
45
46
  sx: { p: { xs: 2, md: 3 }, borderRadius: 1, ...v.sx },
46
47
  children: [
47
48
  /* @__PURE__ */ r(
48
- h,
49
+ x,
49
50
  {
50
51
  direction: "row",
51
52
  sx: {
@@ -56,12 +57,12 @@ function co({ ...A }) {
56
57
  "& > *": { flexShrink: 0 }
57
58
  },
58
59
  children: [
59
- /* @__PURE__ */ t(T, { src: D, did: u, size: 48, variant: "rounded", style: { borderRadius: "8px", overflow: "hidden" } }),
60
+ /* @__PURE__ */ t(B, { src: D, did: u, size: 48, variant: "rounded", style: { borderRadius: "8px", overflow: "hidden" } }),
60
61
  /* @__PURE__ */ t(
61
62
  I,
62
63
  {
63
64
  className: "blocklet-title",
64
- ...c,
65
+ ...a,
65
66
  sx: [
66
67
  {
67
68
  fontWeight: "fontWeightMedium",
@@ -73,7 +74,7 @@ function co({ ...A }) {
73
74
  pl: 0.5,
74
75
  "&&": { flexShrink: 1 }
75
76
  },
76
- ...Array.isArray(c.sx) ? c.sx : [c.sx]
77
+ ...Array.isArray(a.sx) ? a.sx : [a.sx]
77
78
  ]
78
79
  }
79
80
  ),
@@ -88,37 +89,37 @@ function co({ ...A }) {
88
89
  gap: 1
89
90
  },
90
91
  children: [
91
- l && /* @__PURE__ */ t(B, { title: l.tooltip, children: /* @__PURE__ */ t(O, { sx: { color: l.color || "#D97706", fontSize: l.size || 18 } }) }),
92
- f == null ? void 0 : f.map((o) => /* @__PURE__ */ t(B, { title: o.title, children: typeof o.icon == "string" ? /* @__PURE__ */ t(s, { icon: o.icon, style: { color: o.color } }) : o.icon }, o.key))
92
+ l && /* @__PURE__ */ t(T, { title: l.tooltip, children: /* @__PURE__ */ t(F, { sx: { color: l.color || "#D97706", fontSize: l.size || 18 } }) }),
93
+ f == null ? void 0 : f.map((o) => /* @__PURE__ */ t(T, { title: o.title, children: typeof o.icon == "string" ? /* @__PURE__ */ t(s, { icon: o.icon, style: { color: o.color } }) : o.icon }, o.key))
93
94
  ]
94
95
  }
95
96
  ),
96
97
  k && /* @__PURE__ */ r(
97
- q,
98
+ G,
98
99
  {
99
100
  variant: "outlined",
100
101
  size: "small",
101
- disabled: g || p,
102
+ disabled: y || p,
102
103
  style: {
103
- color: x.palette.text.primary,
104
- borderColor: x.palette.grey[300],
104
+ color: h.palette.text.primary,
105
+ borderColor: h.palette.grey[300],
105
106
  borderRadius: 8,
106
107
  fontSize: 13,
107
- fontWeight: x.typography.fontWeightMedium
108
+ fontWeight: h.typography.fontWeightMedium
108
109
  },
109
110
  onClick: j,
110
111
  children: [
111
- p && /* @__PURE__ */ t(E, { size: 15, style: { marginRight: 3, color: "inherit" } }),
112
+ p && /* @__PURE__ */ t(q, { size: 15, style: { marginRight: 3, color: "inherit" } }),
112
113
  R
113
114
  ]
114
115
  }
115
116
  ),
116
- y
117
+ g
117
118
  ]
118
119
  }
119
120
  ),
120
121
  /* @__PURE__ */ t(
121
- h,
122
+ x,
122
123
  {
123
124
  sx: {
124
125
  py: 2
@@ -128,7 +129,7 @@ function co({ ...A }) {
128
129
  {
129
130
  className: "blocklet-description",
130
131
  variant: "body2",
131
- ...a,
132
+ ...c,
132
133
  sx: [
133
134
  {
134
135
  color: "text.secondary",
@@ -140,14 +141,14 @@ function co({ ...A }) {
140
141
  cursor: "default",
141
142
  height: 40
142
143
  },
143
- ...Array.isArray(a.sx) ? a.sx : [a.sx]
144
+ ...Array.isArray(c.sx) ? c.sx : [c.sx]
144
145
  ]
145
146
  }
146
147
  )
147
148
  }
148
149
  ),
149
150
  /* @__PURE__ */ r(
150
- h,
151
+ x,
151
152
  {
152
153
  direction: "row",
153
154
  sx: {
@@ -156,8 +157,8 @@ function co({ ...A }) {
156
157
  color: "text.secondary"
157
158
  },
158
159
  children: [
159
- /* @__PURE__ */ t(d, { icon: /* @__PURE__ */ t(T, { src: L, did: u, size: 20, variant: "circle" }), maxWidth: 200, children: P }),
160
- /* @__PURE__ */ t(d, { icon: /* @__PURE__ */ t(s, { icon: F }), title: m, children: J(m) }),
160
+ /* @__PURE__ */ t(d, { icon: /* @__PURE__ */ t(B, { src: L, did: u, size: 20, variant: "circle" }), maxWidth: 200, children: P }),
161
+ /* @__PURE__ */ t(d, { icon: /* @__PURE__ */ t(s, { icon: E }), title: m, children: J(m) }),
161
162
  i == null ? void 0 : i.filter((o) => o.align !== "right").map((o) => /* @__PURE__ */ t(
162
163
  d,
163
164
  {
@@ -1,6 +1,6 @@
1
1
  import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
2
  import { Stack as n, Typography as p } from "@mui/material";
3
- import f from "./tooltip-icon";
3
+ import f from "./tooltip-icon.js";
4
4
  function u({
5
5
  icon: e = null,
6
6
  children: o = null,
@@ -1,6 +1,6 @@
1
1
  import { jsx as x } from "react/jsx-runtime";
2
2
  import { Tooltip as n, tooltipClasses as f } from "@mui/material";
3
- import { mergeSx as u } from "../../Util/style";
3
+ import { mergeSx as u } from "../../Util/style.js";
4
4
  function I({
5
5
  title: t,
6
6
  sx: c,
@@ -1,10 +1,9 @@
1
- import { default as f, strippedString as p } from "./utils";
2
- import "./blocklet";
3
- import { default as a } from "./blocklet";
4
- import { default as m } from "./components/tooltip-icon";
1
+ import { default as p, strippedString as a } from "./utils.js";
2
+ import o from "./blocklet.js";
3
+ import { default as l } from "./components/tooltip-icon.js";
5
4
  export {
6
- f as ActionButton,
7
- m as TooltipIcon,
8
- a as default,
9
- p as strippedString
5
+ p as ActionButton,
6
+ l as TooltipIcon,
7
+ o as default,
8
+ a as strippedString
10
9
  };
@@ -1,4 +1,4 @@
1
- import { styled as r } from "../Theme";
1
+ import { styled as r } from "../Theme/index.js";
2
2
  const i = r("div")`
3
3
  background-color: transparent !important;
4
4
  & > :not(.Mui-disabled) {
@@ -1,5 +1,5 @@
1
1
  import { Button as o } from "@mui/material";
2
- import t from "./wrap";
2
+ import t from "./wrap.js";
3
3
  const n = t(o);
4
4
  export {
5
5
  n as default
@@ -2,8 +2,8 @@ import { jsx as u, jsxs as x } from "react/jsx-runtime";
2
2
  import r from "prop-types";
3
3
  import i from "lodash/isUndefined";
4
4
  import { CircularProgress as j } from "@mui/material";
5
- import o from "../Colors";
6
- import { mergeProps as k } from "../Util";
5
+ import o from "../Colors/themes/default.js";
6
+ import { mergeProps as k } from "../Util/index.js";
7
7
  const y = {
8
8
  did: {
9
9
  contained: { backgroundColor: o.did.primary, color: o.common.white },
@@ -1,5 +1,5 @@
1
1
  import { ButtonGroup as o } from "@mui/material";
2
- import t from "../Button/wrap";
2
+ import t from "../Button/wrap.js";
3
3
  const m = t(o);
4
4
  export {
5
5
  m as default
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { styled as r } from "../Theme";
2
+ import { styled as r } from "../Theme/index.js";
3
3
  function o({
4
4
  children: e = null,
5
5
  relative: i = "screen"
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import { Tooltip as u } from "@mui/material";
3
3
  import { green as y } from "@mui/material/colors";
4
4
  import { Check as a, ContentCopy as C } from "@mui/icons-material";
5
- import d from "./hook";
5
+ import d from "./hook.js";
6
6
  function S({
7
7
  content: c = "",
8
8
  locale: m = "en",
@@ -3,11 +3,11 @@ import { useSize as F } from "ahooks";
3
3
  import { Tooltip as S } from "@mui/material";
4
4
  import t from "lodash/isUndefined";
5
5
  import { useSnackbar as U } from "notistack";
6
- import _ from "./hook";
7
- import B, { ToastProvider as L } from "../Toast";
8
- import { mergeProps as O } from "../Util";
9
- import { styled as s } from "../Theme";
10
- import { default as X } from "./copy-button";
6
+ import _ from "./hook.js";
7
+ import B, { ToastProvider as L } from "../Toast/index.js";
8
+ import { mergeProps as O } from "../Util/index.js";
9
+ import { styled as s } from "../Theme/index.js";
10
+ import { default as X } from "./copy-button.js";
11
11
  const R = s("span")`
12
12
  display: inline;
13
13
  white-space: pre-wrap;
@@ -3,7 +3,7 @@ import { Box as e } from "@mui/material";
3
3
  import { Icon as i } from "@iconify/react";
4
4
  import m from "@iconify-icons/material-symbols/close-rounded";
5
5
  import s from "lodash/noop";
6
- import { mergeSx as f } from "../Util/style";
6
+ import { mergeSx as f } from "../Util/style.js";
7
7
  function x({
8
8
  onClose: r = s,
9
9
  sx: t = {},