@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.
- package/lib/ActionButton/index.js +8 -8
- package/lib/ActivityIndicator/index.js +7 -6
- package/lib/Address/compact-text.js +3 -2
- package/lib/Address/did-address.js +3 -3
- package/lib/Address/index.js +2 -2
- package/lib/Address/responsive-did-address.js +3 -3
- package/lib/Alert/index.js +7 -7
- package/lib/AnimationWaiter/dark-animation.json.js +27 -0
- package/lib/AnimationWaiter/default-animation.json.js +29 -0
- package/lib/AnimationWaiter/index.js +10 -10
- package/lib/Async/index.js +4 -4
- package/lib/Avatar/etherscan-blockies.js +15 -15
- package/lib/Avatar/index.js +5 -5
- package/lib/Badge/index.js +4 -4
- package/lib/Blocklet/blocklet.js +10 -10
- package/lib/Blocklet/index.js +5 -6
- package/lib/Blocklet/utils.js +1 -1
- package/lib/BlockletContext/index.js +1 -1
- package/lib/BlockletNFT/index.js +18 -18
- package/lib/BlockletV2/blocklet.js +36 -35
- package/lib/BlockletV2/components/icon-text.js +1 -1
- package/lib/BlockletV2/components/tooltip-icon.js +1 -1
- package/lib/BlockletV2/index.js +7 -8
- package/lib/BlockletV2/utils.js +1 -1
- package/lib/Button/index.js +1 -1
- package/lib/Button/wrap.js +2 -2
- package/lib/ButtonGroup/index.js +1 -1
- package/lib/Center/index.js +1 -1
- package/lib/ClickToCopy/copy-button.js +1 -1
- package/lib/ClickToCopy/index.js +5 -5
- package/lib/CloseButton/index.js +1 -1
- package/lib/CodeBlock/index.js +3 -3
- package/lib/Colors/index.js +3 -3
- package/lib/Config/config-provider.js +16 -15
- package/lib/Config/index.js +5 -3
- package/lib/Config/theme-mode-toggle.js +1 -1
- package/lib/ContactForm/index.js +4 -4
- package/lib/CookieConsent/index.js +1 -1
- package/lib/CountDown/index.js +2 -2
- package/lib/DID/index.js +49 -49
- package/lib/DIDConnect/app-icon.js +10 -10
- package/lib/DIDConnect/app-info-item.js +4 -4
- package/lib/DIDConnect/auth-apps/auth-apps-info.js +1 -1
- package/lib/DIDConnect/auth-apps/index.js +9 -9
- package/lib/DIDConnect/did-connect-container.js +19 -18
- package/lib/DIDConnect/did-connect-footer.js +6 -6
- package/lib/DIDConnect/index.js +10 -10
- package/lib/DIDConnect/landing-page.js +30 -29
- package/lib/DIDConnect/powered-by.js +2 -2
- package/lib/DIDConnect/request-storage-access-api-dialog.js +5 -5
- package/lib/DIDConnect/with-container.js +26 -25
- package/lib/DIDConnect/with-ux-theme.js +7 -6
- package/lib/Datatable/CustomToolbar.js +12 -12
- package/lib/Datatable/TableSearch.js +2 -2
- package/lib/Datatable/index.js +4 -4
- package/lib/Dialog/confirm.js +10 -10
- package/lib/Dialog/dialog.js +7 -7
- package/lib/Dialog/index.js +3 -3
- package/lib/Dialog/use-confirm.js +1 -1
- package/lib/DriftBot/index.js +1 -1
- package/lib/Earth/countries.json.js +13 -0
- package/lib/Earth/index.js +9 -9
- package/lib/Empty/index.js +1 -1
- package/lib/ErrorBoundary/fallback.js +15 -15
- package/lib/ErrorBoundary/index.js +6 -1
- package/lib/Footer/index.js +3 -3
- package/lib/Header/auto-hidden.js +1 -1
- package/lib/Header/header.js +3 -3
- package/lib/Header/index.js +3 -3
- package/lib/Header/responsive-header.js +6 -6
- package/lib/Icon/image.js +2 -2
- package/lib/Icon/index.js +18 -18
- package/lib/Img/index.js +1 -1
- package/lib/InfoRow/index.js +1 -1
- package/lib/Layout/dashboard/index.js +31 -29
- package/lib/Layout/dashboard/sidebar.js +2 -2
- package/lib/Layout/dashboard-legacy/header.js +2 -2
- package/lib/Layout/dashboard-legacy/index.js +4 -4
- package/lib/Layout/dashboard-legacy/sidebar.js +8 -8
- package/lib/Layout/index.js +5 -5
- package/lib/Locale/context.js +20 -20
- package/lib/Locale/selector.js +3 -3
- package/lib/Logo/images/logo-dark-text.svg.js +5 -0
- package/lib/Logo/images/logo-dark-top.svg.js +5 -0
- package/lib/Logo/images/logo-light-text.svg.js +5 -0
- package/lib/Logo/images/logo-light-top.svg.js +5 -0
- package/lib/Logo/index.js +18 -18
- package/lib/Metric/index.js +2 -2
- package/lib/NFTDisplay/NFTBroken.svg.js +108 -0
- package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
- package/lib/NFTDisplay/broken.js +2 -2
- package/lib/NFTDisplay/index.js +35 -35
- package/lib/NFTDisplay/loading.js +1 -1
- package/lib/NFTDisplay/render-svg.js +1 -1
- package/lib/NFTDisplay/svg-embedder/img.js +3 -3
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
- package/lib/NavMenu/images/OCAP.svg.js +5 -0
- package/lib/NavMenu/images/abt-network.svg.js +7 -0
- package/lib/NavMenu/images/ai-kit.svg.js +7 -0
- package/lib/NavMenu/images/aigne.svg.js +7 -0
- package/lib/NavMenu/images/aistro.svg.js +5 -0
- package/lib/NavMenu/images/arcsphere.svg.js +10 -0
- package/lib/NavMenu/images/blocklet-framework.svg.js +7 -0
- package/lib/NavMenu/images/blocklet-launcher.svg.js +5 -0
- package/lib/NavMenu/images/blocklet-server.svg.js +7 -0
- package/lib/NavMenu/images/blocklet-store.svg.js +5 -0
- package/lib/NavMenu/images/creator-studio.svg.js +7 -0
- package/lib/NavMenu/images/did-connect.svg.js +5 -0
- package/lib/NavMenu/images/did-name-service.svg.js +5 -0
- package/lib/NavMenu/images/did-wallet.svg.js +7 -0
- package/lib/NavMenu/images/did.svg.js +5 -0
- package/lib/NavMenu/images/nft-studio.svg.js +5 -0
- package/lib/NavMenu/images/vc.svg.js +5 -0
- package/lib/NavMenu/images/web3-kit.svg.js +7 -0
- package/lib/NavMenu/index.js +2 -2
- package/lib/NavMenu/nav-menu.js +23 -22
- package/lib/NavMenu/products.js +32 -32
- package/lib/NavMenu/style.js +1 -1
- package/lib/NavMenu/sub-item-group.js +1 -1
- package/lib/PageScroller/index.js +19 -19
- package/lib/PageScroller/story/FullPage.js +27 -27
- package/lib/PageScroller/story/PageContain.js +8 -8
- package/lib/Passport/index.js +2 -3
- package/lib/Passport/passport.js +2 -2
- package/lib/PhoneInput/country-select.js +1 -1
- package/lib/PhoneInput/index.js +2 -2
- package/lib/PricingTable/PricingPlan.js +1 -1
- package/lib/PricingTable/index.js +3 -3
- package/lib/RelativeTime/index.js +1 -1
- package/lib/Result/common.js +6 -4
- package/lib/Result/index.js +2 -2
- package/lib/Result/result.js +1 -1
- package/lib/Screenshot/BaseScreenshot/index.js +3 -3
- package/lib/Screenshot/index.js +9 -9
- package/lib/SessionBlocklet/index.js +8 -8
- package/lib/SessionManager/index.js +2 -3
- package/lib/SessionUser/components/did-space.js +14 -14
- package/lib/SessionUser/components/logged-in.js +33 -33
- package/lib/SessionUser/components/quick-login-item.js +29 -29
- package/lib/SessionUser/components/session-user-item.js +23 -23
- package/lib/SessionUser/components/session-user-switch.js +4 -4
- package/lib/SessionUser/components/un-login.js +7 -7
- package/lib/SessionUser/components/user-info.js +16 -16
- package/lib/SessionUser/images/did-spaces.svg.js +5 -0
- package/lib/SessionUser/index.js +2 -2
- package/lib/SharedBridge/index.js +23 -23
- package/lib/Spinner/index.js +1 -1
- package/lib/SplitButton/index.js +1 -1
- package/lib/Switch/index.js +1 -1
- package/lib/Tabs/index.js +1 -1
- package/lib/Tag/index.js +6 -6
- package/lib/TextCollapse/index.js +2 -2
- package/lib/Theme/index.js +22 -11
- package/lib/Theme/theme-provider.js +2 -2
- package/lib/Theme/theme.js +4 -4
- package/lib/Toast/index.js +11 -11
- package/lib/UserCard/Cards/avatar-only.js +2 -2
- package/lib/UserCard/Cards/basic-info.js +3 -3
- package/lib/UserCard/Cards/index.js +3 -3
- package/lib/UserCard/Cards/name-only.js +1 -1
- package/lib/UserCard/Container/card.js +2 -2
- package/lib/UserCard/Container/dialog.js +1 -1
- package/lib/UserCard/Content/basic.js +1 -1
- package/lib/UserCard/Content/clock.js +3 -3
- package/lib/UserCard/Content/minimal.js +8 -8
- package/lib/UserCard/Content/tooltip-avatar.js +1 -1
- package/lib/UserCard/components.js +23 -23
- package/lib/UserCard/index.js +12 -12
- package/lib/Util/index.js +2 -2
- package/lib/VerificationCode/index.js +1 -1
- package/lib/Video/index.js +2 -2
- package/lib/Wallet/Action.js +4 -4
- package/lib/Wallet/Download.js +6 -6
- package/lib/Wallet/Open.js +1 -1
- package/lib/Wallet/images/android_download.svg.js +5 -0
- package/lib/Wallet/images/app-store.svg.js +5 -0
- package/lib/Wallet/images/google-play.svg.js +5 -0
- package/lib/WalletOSIcon/index.js +1 -1
- package/lib/WebWalletSWKeeper/index.js +2 -2
- package/lib/WechatPrompt/index.js +1 -1
- package/lib/hooks/use-blocklet-logo.js +15 -13
- package/lib/hooks/use-clock.js +1 -1
- package/lib/index.js +79 -74
- package/lib/ux.css +1 -0
- package/lib/withTheme/index.js +7 -6
- package/lib/withTracker/error_boundary.js +1 -1
- package/package.json +7 -7
- 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 {
|
3
|
+
import { useTheme as M, Skeleton as E } from "@mui/material";
|
4
4
|
import n from "prop-types";
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import { styled as
|
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 =
|
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
|
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(
|
64
|
-
|
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 =
|
111
|
+
const q = R("div")`
|
112
112
|
display: flex;
|
113
113
|
justify-content: center;
|
114
114
|
align-items: center;
|
package/lib/Async/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { jsx as
|
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(
|
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
|
-
|
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__ */
|
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
|
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(
|
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,
|
18
|
-
for (let
|
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 <
|
21
|
-
c[s] = Math.floor(
|
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,
|
30
|
-
const r = document.createElement("canvas"),
|
31
|
-
r.width = r.height =
|
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 =
|
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 /
|
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,
|
43
|
-
g(
|
44
|
-
const f = t.color || d(), r = t.bgcolor || d(),
|
45
|
-
return M(c, f, e, r,
|
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 {
|
package/lib/Avatar/index.js
CHANGED
@@ -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);
|
package/lib/Badge/index.js
CHANGED
@@ -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,
|
package/lib/Blocklet/blocklet.js
CHANGED
@@ -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
|
5
|
-
import
|
6
|
-
import P from "../Button";
|
7
|
-
import A from "../Img";
|
8
|
-
import { styled as
|
9
|
-
import { strippedString as g } from "./utils";
|
10
|
-
const F =
|
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 =
|
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(
|
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(
|
189
|
+
a && /* @__PURE__ */ o(I, { size: 15, style: { marginRight: 3, color: "inherit" } }),
|
190
190
|
u
|
191
191
|
]
|
192
192
|
}
|
package/lib/Blocklet/index.js
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
import { default as
|
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
|
-
|
6
|
-
|
7
|
-
|
4
|
+
p as ActionButton,
|
5
|
+
o as default,
|
6
|
+
a as strippedString
|
8
7
|
};
|
package/lib/Blocklet/utils.js
CHANGED
@@ -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
|
package/lib/BlockletNFT/index.js
CHANGED
@@ -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
|
5
|
-
import
|
6
|
-
import Z from "../Icon";
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import { styled as
|
10
|
-
function
|
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 =
|
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:
|
205
|
-
scaleClickZone:
|
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 =
|
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:
|
216
|
-
className: `${
|
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(
|
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(
|
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
|
-
|
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
|
-
|
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 ?
|
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
|
3
|
-
import
|
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
|
6
|
-
import { Card as V, Stack as
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
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:
|
25
|
+
buttonDisabled: y,
|
25
26
|
buttonLoading: p,
|
26
|
-
button:
|
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,
|
36
|
-
const
|
37
|
-
(H() ||
|
38
|
-
}, _ = b && w(b), j = w(k, () => !!(
|
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
|
-
|
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(
|
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
|
-
...
|
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(
|
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(
|
92
|
-
f == null ? void 0 : f.map((o) => /* @__PURE__ */ t(
|
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
|
-
|
98
|
+
G,
|
98
99
|
{
|
99
100
|
variant: "outlined",
|
100
101
|
size: "small",
|
101
|
-
disabled:
|
102
|
+
disabled: y || p,
|
102
103
|
style: {
|
103
|
-
color:
|
104
|
-
borderColor:
|
104
|
+
color: h.palette.text.primary,
|
105
|
+
borderColor: h.palette.grey[300],
|
105
106
|
borderRadius: 8,
|
106
107
|
fontSize: 13,
|
107
|
-
fontWeight:
|
108
|
+
fontWeight: h.typography.fontWeightMedium
|
108
109
|
},
|
109
110
|
onClick: j,
|
110
111
|
children: [
|
111
|
-
p && /* @__PURE__ */ t(
|
112
|
+
p && /* @__PURE__ */ t(q, { size: 15, style: { marginRight: 3, color: "inherit" } }),
|
112
113
|
R
|
113
114
|
]
|
114
115
|
}
|
115
116
|
),
|
116
|
-
|
117
|
+
g
|
117
118
|
]
|
118
119
|
}
|
119
120
|
),
|
120
121
|
/* @__PURE__ */ t(
|
121
|
-
|
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
|
-
...
|
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(
|
144
|
+
...Array.isArray(c.sx) ? c.sx : [c.sx]
|
144
145
|
]
|
145
146
|
}
|
146
147
|
)
|
147
148
|
}
|
148
149
|
),
|
149
150
|
/* @__PURE__ */ r(
|
150
|
-
|
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(
|
160
|
-
/* @__PURE__ */ t(d, { icon: /* @__PURE__ */ t(s, { icon:
|
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
|
{
|
package/lib/BlockletV2/index.js
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import { default as
|
2
|
-
import "./blocklet";
|
3
|
-
import { default as
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
p as ActionButton,
|
6
|
+
l as TooltipIcon,
|
7
|
+
o as default,
|
8
|
+
a as strippedString
|
10
9
|
};
|
package/lib/BlockletV2/utils.js
CHANGED
package/lib/Button/index.js
CHANGED
package/lib/Button/wrap.js
CHANGED
@@ -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 },
|
package/lib/ButtonGroup/index.js
CHANGED
package/lib/Center/index.js
CHANGED
@@ -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",
|
package/lib/ClickToCopy/index.js
CHANGED
@@ -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;
|
package/lib/CloseButton/index.js
CHANGED
@@ -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 = {},
|