@arcblock/ux 3.0.6 → 3.0.7
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.d.ts +1 -1
- package/lib/ActionButton/index.js +9 -9
- package/lib/ActivityIndicator/index.js +6 -7
- package/lib/Address/compact-text.d.ts +1 -1
- package/lib/Address/compact-text.js +6 -7
- package/lib/Address/did-address.js +4 -4
- package/lib/Address/index.js +6 -6
- package/lib/Address/responsive-did-address.js +17 -17
- package/lib/Alert/index.d.ts +1 -1
- package/lib/Alert/index.js +8 -8
- 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.d.ts +1 -1
- package/lib/Avatar/index.js +6 -6
- package/lib/Badge/index.js +5 -5
- package/lib/Blocklet/blocklet.js +10 -10
- package/lib/Blocklet/index.js +6 -5
- package/lib/Blocklet/utils.js +1 -1
- package/lib/BlockletContext/index.d.ts +1 -1
- package/lib/BlockletContext/index.js +1 -1
- package/lib/BlockletNFT/index.js +19 -19
- package/lib/BlockletV2/blocklet.d.ts +1 -1
- package/lib/BlockletV2/blocklet.js +36 -37
- package/lib/BlockletV2/components/icon-text.d.ts +1 -1
- package/lib/BlockletV2/components/icon-text.js +13 -13
- package/lib/BlockletV2/components/tooltip-icon.js +22 -20
- package/lib/BlockletV2/index.js +8 -7
- package/lib/BlockletV2/utils.js +1 -1
- package/lib/Button/index.js +1 -1
- package/lib/Button/wrap.js +3 -3
- package/lib/ButtonGroup/index.js +1 -1
- package/lib/Center/index.js +4 -4
- package/lib/ClickToCopy/copy-button.js +3 -3
- package/lib/ClickToCopy/index.js +5 -5
- package/lib/CloseButton/index.js +2 -2
- package/lib/CodeBlock/index.js +3 -3
- package/lib/Colors/index.js +3 -3
- package/lib/Config/config-provider.js +15 -16
- package/lib/Config/index.js +3 -5
- package/lib/Config/theme-mode-toggle.js +1 -1
- package/lib/ContactForm/index.js +26 -25
- package/lib/CookieConsent/index.js +1 -1
- package/lib/CountDown/index.js +2 -2
- package/lib/DID/index.js +79 -78
- package/lib/DIDConnect/app-icon.js +10 -10
- package/lib/DIDConnect/app-info-item.js +5 -5
- package/lib/DIDConnect/auth-apps/auth-apps-info.js +1 -1
- package/lib/DIDConnect/auth-apps/index.js +56 -56
- package/lib/DIDConnect/did-connect-container.js +35 -36
- package/lib/DIDConnect/did-connect-footer.js +7 -7
- package/lib/DIDConnect/index.js +10 -10
- package/lib/DIDConnect/landing-page.js +45 -46
- package/lib/DIDConnect/powered-by.js +2 -2
- package/lib/DIDConnect/request-storage-access-api-dialog.js +44 -45
- package/lib/DIDConnect/with-container.js +25 -26
- package/lib/DIDConnect/with-ux-theme.js +6 -7
- package/lib/Datatable/CustomToolbar.d.ts +3 -1
- package/lib/Datatable/CustomToolbar.js +13 -13
- package/lib/Datatable/TableSearch.js +2 -2
- package/lib/Datatable/index.js +6 -6
- package/lib/Dialog/confirm.d.ts +1 -1
- package/lib/Dialog/confirm.js +20 -20
- 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/index.js +10 -10
- package/lib/Empty/index.js +1 -1
- package/lib/ErrorBoundary/fallback.js +15 -15
- package/lib/ErrorBoundary/index.js +1 -6
- package/lib/Footer/index.d.ts +1 -1
- package/lib/Footer/index.js +7 -7
- package/lib/Header/addon-button.d.ts +1 -1
- package/lib/Header/addon-button.js +11 -6
- package/lib/Header/auto-hidden.js +1 -1
- package/lib/Header/header.js +4 -4
- package/lib/Header/index.js +3 -3
- package/lib/Header/responsive-header.d.ts +1 -1
- package/lib/Header/responsive-header.js +33 -34
- package/lib/Icon/image.js +2 -2
- package/lib/Icon/index.js +12 -12
- package/lib/Img/index.js +1 -1
- package/lib/InfoRow/index.d.ts +1 -1
- package/lib/InfoRow/index.js +1 -2
- package/lib/Layout/dashboard/external-link.d.ts +1 -1
- package/lib/Layout/dashboard/external-link.js +1 -1
- package/lib/Layout/dashboard/full-page.js +8 -8
- package/lib/Layout/dashboard/index.js +30 -32
- package/lib/Layout/dashboard/sidebar.js +3 -3
- package/lib/Layout/dashboard-legacy/header.js +12 -12
- package/lib/Layout/dashboard-legacy/index.js +20 -20
- package/lib/Layout/dashboard-legacy/sidebar.d.ts +1 -1
- package/lib/Layout/dashboard-legacy/sidebar.js +20 -13
- package/lib/Layout/index.js +7 -7
- package/lib/LoadingMask/index.d.ts +1 -1
- package/lib/LoadingMask/index.js +4 -4
- package/lib/Locale/context.js +27 -27
- package/lib/Locale/selector.d.ts +1 -1
- package/lib/Locale/selector.js +4 -4
- package/lib/Logo/index.js +19 -19
- package/lib/Metric/index.js +2 -2
- package/lib/NFTDisplay/aspect-ratio-container.d.ts +1 -1
- package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
- package/lib/NFTDisplay/broken.js +2 -2
- package/lib/NFTDisplay/index.js +38 -35
- package/lib/NFTDisplay/loading.js +1 -1
- package/lib/NFTDisplay/render-svg.js +4 -4
- package/lib/NFTDisplay/svg-embedder/img.js +3 -3
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
- package/lib/NavMenu/index.js +2 -2
- package/lib/NavMenu/nav-menu.js +46 -44
- package/lib/NavMenu/products.js +33 -33
- package/lib/NavMenu/style.js +1 -1
- package/lib/NavMenu/sub-item-group.js +1 -1
- package/lib/PageScroller/index.js +53 -53
- package/lib/PageScroller/story/FullPage.js +27 -27
- package/lib/PageScroller/story/PageContain.js +8 -8
- package/lib/Passport/index.js +3 -2
- package/lib/Passport/passport.js +2 -2
- package/lib/PhoneInput/country-select.js +24 -24
- package/lib/PhoneInput/index.js +13 -13
- package/lib/PoweredByArcBlock/index.js +10 -6
- package/lib/PricingTable/PricingPlan.js +1 -1
- package/lib/PricingTable/index.js +3 -3
- package/lib/QRCode/index.js +5 -5
- package/lib/RelativeTime/index.js +17 -17
- package/lib/Result/common.js +4 -6
- package/lib/Result/index.js +2 -2
- package/lib/Result/result.js +5 -5
- package/lib/Screenshot/BaseScreenshot/index.js +3 -3
- package/lib/Screenshot/index.d.ts +1 -1
- package/lib/Screenshot/index.js +10 -10
- package/lib/SessionBlocklet/index.js +8 -8
- package/lib/SessionManager/index.js +3 -2
- package/lib/SessionUser/components/did-space.d.ts +1 -1
- 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 +27 -27
- 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/index.js +2 -2
- package/lib/SharedBridge/index.js +23 -23
- package/lib/Spinner/index.js +2 -2
- package/lib/SplitButton/index.d.ts +1 -1
- package/lib/SplitButton/index.js +2 -2
- package/lib/Success/index.js +1 -1
- package/lib/Switch/index.js +1 -1
- package/lib/Tabs/index.js +16 -9
- package/lib/Tag/index.d.ts +1 -1
- package/lib/Tag/index.js +7 -7
- package/lib/TextCollapse/index.js +3 -3
- package/lib/Theme/index.js +11 -22
- package/lib/Theme/theme-provider.js +60 -55
- package/lib/Theme/theme.js +5 -4
- package/lib/Toast/index.js +11 -11
- package/lib/Typography/index.js +13 -13
- package/lib/UserCard/Cards/avatar-only.js +2 -2
- package/lib/UserCard/Cards/basic-info.d.ts +1 -1
- package/lib/UserCard/Cards/basic-info.js +4 -4
- package/lib/UserCard/Cards/index.d.ts +1 -1
- package/lib/UserCard/Cards/index.js +4 -4
- package/lib/UserCard/Cards/name-only.js +1 -1
- package/lib/UserCard/Container/card.js +8 -8
- package/lib/UserCard/Container/dialog.js +2 -2
- package/lib/UserCard/Content/basic.js +3 -3
- package/lib/UserCard/Content/clock.js +3 -3
- package/lib/UserCard/Content/minimal.d.ts +1 -1
- package/lib/UserCard/Content/minimal.js +8 -8
- package/lib/UserCard/Content/tooltip-avatar.js +18 -18
- 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 +2 -2
- 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/WalletOSIcon/index.d.ts +2 -2
- package/lib/WalletOSIcon/index.js +8 -3
- package/lib/WebWalletSWKeeper/index.d.ts +3 -1
- package/lib/WebWalletSWKeeper/index.js +6 -3
- package/lib/WechatPrompt/index.js +1 -1
- package/lib/hooks/use-blocklet-logo.js +13 -15
- package/lib/hooks/use-clock.js +1 -1
- package/lib/index.js +74 -79
- package/lib/withTheme/index.d.ts +3 -2
- package/lib/withTheme/index.js +13 -14
- package/lib/withTracker/error_boundary.js +1 -1
- package/package.json +7 -7
- package/src/ActionButton/index.jsx +1 -1
- package/src/Address/compact-text.jsx +1 -1
- package/src/Address/did-address.tsx +1 -1
- package/src/Address/index.tsx +1 -1
- package/src/Address/responsive-did-address.tsx +3 -3
- package/src/Alert/index.jsx +1 -1
- package/src/Avatar/index.jsx +1 -1
- package/src/Badge/index.jsx +1 -1
- package/src/BlockletContext/index.tsx +1 -1
- package/src/BlockletNFT/index.jsx +1 -1
- package/src/BlockletV2/blocklet.tsx +1 -1
- package/src/BlockletV2/components/icon-text.tsx +4 -4
- package/src/BlockletV2/components/tooltip-icon.tsx +5 -3
- package/src/Button/wrap.jsx +1 -1
- package/src/Center/index.tsx +1 -1
- package/src/ClickToCopy/copy-button.tsx +1 -1
- package/src/CloseButton/index.tsx +1 -1
- package/src/ContactForm/index.tsx +9 -2
- package/src/DID/index.tsx +5 -4
- package/src/DIDConnect/app-info-item.tsx +1 -1
- package/src/DIDConnect/auth-apps/index.tsx +8 -8
- package/src/DIDConnect/did-connect-container.tsx +2 -2
- package/src/DIDConnect/did-connect-footer.tsx +1 -1
- package/src/DIDConnect/landing-page.tsx +6 -6
- package/src/DIDConnect/request-storage-access-api-dialog.tsx +1 -2
- package/src/Datatable/CustomToolbar.jsx +1 -1
- package/src/Datatable/index.jsx +2 -2
- package/src/Dialog/confirm.jsx +1 -1
- package/src/Earth/index.tsx +1 -1
- package/src/Footer/index.tsx +5 -2
- package/src/Header/addon-button.tsx +7 -2
- package/src/Header/header.tsx +1 -1
- package/src/Header/responsive-header.tsx +1 -2
- package/src/Icon/index.tsx +1 -1
- package/src/InfoRow/index.tsx +1 -2
- package/src/Layout/dashboard/external-link.tsx +1 -1
- package/src/Layout/dashboard/full-page.tsx +1 -1
- package/src/Layout/dashboard/index.tsx +1 -1
- package/src/Layout/dashboard/sidebar.tsx +5 -2
- package/src/Layout/dashboard-legacy/header.tsx +5 -5
- package/src/Layout/dashboard-legacy/index.tsx +3 -3
- package/src/Layout/dashboard-legacy/sidebar.tsx +10 -2
- package/src/Layout/index.tsx +2 -2
- package/src/LoadingMask/index.tsx +5 -5
- package/src/Locale/context.tsx +3 -3
- package/src/Locale/selector.tsx +1 -1
- package/src/Logo/index.tsx +1 -1
- package/src/NFTDisplay/aspect-ratio-container.tsx +1 -1
- package/src/NFTDisplay/index.tsx +2 -1
- package/src/NFTDisplay/render-svg.tsx +1 -1
- package/src/NavMenu/nav-menu.tsx +8 -5
- package/src/NavMenu/products.tsx +3 -1
- package/src/PageScroller/index.tsx +4 -4
- package/src/PhoneInput/country-select.tsx +3 -3
- package/src/PhoneInput/index.tsx +1 -1
- package/src/PoweredByArcBlock/index.tsx +5 -1
- package/src/QRCode/index.tsx +1 -1
- package/src/RelativeTime/index.tsx +3 -3
- package/src/Result/result.tsx +1 -1
- package/src/Screenshot/index.tsx +2 -2
- package/src/SessionUser/components/did-space.tsx +1 -1
- package/src/SessionUser/components/session-user-item.tsx +1 -1
- package/src/SharedBridge/index.tsx +2 -2
- package/src/Spinner/index.tsx +1 -1
- package/src/SplitButton/index.tsx +1 -1
- package/src/Success/index.tsx +1 -1
- package/src/Tabs/index.tsx +10 -3
- package/src/Tag/index.jsx +1 -1
- package/src/TextCollapse/index.tsx +1 -1
- package/src/Theme/theme-provider.tsx +11 -6
- package/src/Theme/theme.ts +5 -0
- package/src/Typography/index.tsx +1 -1
- package/src/UserCard/Cards/basic-info.tsx +1 -1
- package/src/UserCard/Cards/index.tsx +1 -1
- package/src/UserCard/Container/card.tsx +2 -2
- package/src/UserCard/Container/dialog.tsx +1 -1
- package/src/UserCard/Content/basic.tsx +2 -2
- package/src/UserCard/Content/minimal.tsx +1 -1
- package/src/UserCard/Content/tooltip-avatar.tsx +4 -4
- package/src/VerificationCode/index.tsx +1 -1
- package/src/WalletOSIcon/index.tsx +7 -2
- package/src/WebWalletSWKeeper/index.tsx +6 -1
- package/src/withTheme/index.tsx +7 -3
- package/vite.config.mjs +5 -2
- package/lib/ActionButton/ActionButton.stories.d.ts +0 -18
- package/lib/ActivityIndicator/ActivityIndicator.stories.d.ts +0 -8
- package/lib/Address/Address.stories.d.ts +0 -16
- package/lib/Alert/Alert.stories.d.ts +0 -28
- package/lib/AnimationWaiter/AnimationWaiter.stories.d.ts +0 -21
- package/lib/AnimationWaiter/dark-animation.json.js +0 -27
- package/lib/AnimationWaiter/default-animation.json.js +0 -29
- package/lib/Avatar/Avatar.stories.d.ts +0 -11
- package/lib/Badge/Badge.stories.d.ts +0 -13
- package/lib/Blocklet/Blocklet.stories.d.ts +0 -17
- package/lib/BlockletNFT/BlockletNFT.stories.d.ts +0 -17
- package/lib/BlockletV2/Blocklet.stories.d.ts +0 -18
- package/lib/Button/Button.stories.d.ts +0 -19
- package/lib/Center/Center.stories.d.ts +0 -18
- package/lib/ClickToCopy/ClickToCopy.stories.d.ts +0 -16
- package/lib/CodeBlock/CodeBlock.stories.d.ts +0 -20
- package/lib/Colors/Colors.stories.d.ts +0 -34
- package/lib/Config/Config.stories.d.ts +0 -14
- package/lib/ContactForm/ContactForm.stories.d.ts +0 -23
- package/lib/CookieConsent/CookieConsent.stories.d.ts +0 -18
- package/lib/CountDown/CountDown.stories.d.ts +0 -14
- package/lib/DID/DID.stories.d.ts +0 -15
- package/lib/Datatable/Datatable.stories.d.ts +0 -32
- package/lib/Dialog/Dialog.stories.d.ts +0 -20
- package/lib/DidLogo/Logo.stories.d.ts +0 -8
- package/lib/Earth/Earth.stories.d.ts +0 -18
- package/lib/Earth/countries.json.js +0 -13
- package/lib/Empty/Empty.stories.d.ts +0 -17
- package/lib/ErrorBoundary/ErrorBoundary.stories.d.ts +0 -12
- package/lib/Footer/Footer.stories.d.ts +0 -12
- package/lib/Header/Header.stories.d.ts +0 -21
- package/lib/Icon/Icon.stories.d.ts +0 -23
- package/lib/Img/Img.stories.d.ts +0 -13
- package/lib/InfoRow/InfoRow.stories.d.ts +0 -14
- package/lib/Layout/Layout.stories.d.ts +0 -23
- package/lib/Locale/LocaleSelector.stories.d.ts +0 -22
- package/lib/Logo/Logo.stories.d.ts +0 -22
- package/lib/Logo/images/logo-dark-text.svg.js +0 -5
- package/lib/Logo/images/logo-dark-top.svg.js +0 -5
- package/lib/Logo/images/logo-light-text.svg.js +0 -5
- package/lib/Logo/images/logo-light-top.svg.js +0 -5
- package/lib/Metric/Metric.stories.d.ts +0 -14
- package/lib/NFTDisplay/NFTBroken.svg.js +0 -108
- package/lib/NFTDisplay/NFTDisplay.stories.d.ts +0 -15
- package/lib/NavMenu/NavMenu.stories.d.ts +0 -17
- package/lib/NavMenu/images/OCAP.svg.js +0 -5
- package/lib/NavMenu/images/abt-network.svg.js +0 -7
- package/lib/NavMenu/images/ai-kit.svg.js +0 -7
- package/lib/NavMenu/images/aigne.svg.js +0 -7
- package/lib/NavMenu/images/aistro.svg.js +0 -5
- package/lib/NavMenu/images/arcsphere.svg.js +0 -10
- package/lib/NavMenu/images/blocklet-framework.svg.js +0 -7
- package/lib/NavMenu/images/blocklet-launcher.svg.js +0 -5
- package/lib/NavMenu/images/blocklet-server.svg.js +0 -7
- package/lib/NavMenu/images/blocklet-store.svg.js +0 -5
- package/lib/NavMenu/images/creator-studio.svg.js +0 -7
- package/lib/NavMenu/images/did-connect.svg.js +0 -5
- package/lib/NavMenu/images/did-name-service.svg.js +0 -5
- package/lib/NavMenu/images/did-wallet.svg.js +0 -7
- package/lib/NavMenu/images/did.svg.js +0 -5
- package/lib/NavMenu/images/nft-studio.svg.js +0 -5
- package/lib/NavMenu/images/vc.svg.js +0 -5
- package/lib/NavMenu/images/web3-kit.svg.js +0 -7
- package/lib/PageScroller/story/PageScroller.stories.d.ts +0 -13
- package/lib/PhoneInput/PhoneInput.stories.d.ts +0 -12
- package/lib/PricingTable/PricingTable.stories.d.ts +0 -8
- package/lib/QRCode/QRCode.stories.d.ts +0 -13
- package/lib/RelativeTime/RelativeTime.stories.d.ts +0 -20
- package/lib/Result/Result.stories.d.ts +0 -21
- package/lib/Screenshot/Screenshot.stories.d.ts +0 -13
- package/lib/SessionManager/SessionManager.stories.d.ts +0 -9
- package/lib/SessionUser/images/did-spaces.svg.js +0 -5
- package/lib/Sparkline/Sparkline.stories.d.ts +0 -12
- package/lib/Spinner/Spinner.stories.d.ts +0 -18
- package/lib/SplitButton/SplitButton.stories.d.ts +0 -15
- package/lib/Switch/Switch.stories.d.ts +0 -13
- package/lib/Tabs/Tabs.stories.d.ts +0 -14
- package/lib/Tag/Tag.stories.d.ts +0 -13
- package/lib/TextCollapse/TextCollapse.stories.d.ts +0 -28
- package/lib/Theme/Theme.stories.d.ts +0 -10
- package/lib/Toast/Toast.stories.d.ts +0 -15
- package/lib/UserCard/UserCard.stories.d.ts +0 -18
- package/lib/Util/WebWalletOpener.stories.d.ts +0 -5
- package/lib/Video/Video.stories.d.ts +0 -6
- package/lib/Wallet/Action.stories.d.ts +0 -8
- package/lib/Wallet/Download.stories.d.ts +0 -9
- package/lib/Wallet/OpenInWallet.stories.d.ts +0 -5
- package/lib/Wallet/images/android_download.svg.js +0 -5
- package/lib/Wallet/images/app-store.svg.js +0 -5
- package/lib/Wallet/images/google-play.svg.js +0 -5
- package/lib/ux.css +0 -1
package/lib/Earth/index.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
2
|
-
import { useReducer as
|
3
|
-
import
|
2
|
+
import { useReducer as H, useRef as w, useEffect as J } from "react";
|
3
|
+
import U from "react-use/lib/useSpring";
|
4
4
|
import * as N from "d3-geo";
|
5
5
|
import * as V from "topojson-client";
|
6
6
|
import D from "versor";
|
7
|
-
import R from "./countries.json
|
8
|
-
import X from "./util
|
9
|
-
import { withDeprecated as Y } from "../Util/deprecate
|
10
|
-
import { styled as B } from "../Theme
|
7
|
+
import R from "./countries.json";
|
8
|
+
import X from "./util";
|
9
|
+
import { withDeprecated as Y } from "../Util/deprecate";
|
10
|
+
import { styled as B } from "../Theme";
|
11
11
|
const F = V.feature(R, R.objects.ne_110m_admin_0_countries), K = {
|
12
12
|
light: {
|
13
13
|
ocean: "#EDF4F4",
|
@@ -52,11 +52,11 @@ function W({
|
|
52
52
|
height: g = 600,
|
53
53
|
enableRotation: I = !1,
|
54
54
|
rotationSpeed: M = 5,
|
55
|
-
activeMarkerId: a,
|
55
|
+
activeMarkerId: a = void 0,
|
56
56
|
markers: y = [],
|
57
57
|
colors: L = {}
|
58
58
|
}) {
|
59
|
-
const $ = Object.assign(L, K[e]), [r, d] =
|
59
|
+
const $ = Object.assign(L, K[e]), [r, d] = H(Q, {
|
60
60
|
rotation: [0, 0, 0],
|
61
61
|
isDragging: !1,
|
62
62
|
animateDuration: 1,
|
@@ -70,7 +70,7 @@ function W({
|
|
70
70
|
step: 0,
|
71
71
|
markerId: null,
|
72
72
|
iv: null
|
73
|
-
}), C =
|
73
|
+
}), C = U(r.animateDuration, 170, 26), S = a && k.current.markerId !== a && y.some((t) => t.id === a), p = N.geoOrthographic().fitExtent(
|
74
74
|
[
|
75
75
|
[30, 30],
|
76
76
|
[s - 30, g - 30]
|
@@ -79,7 +79,7 @@ function W({
|
|
79
79
|
).rotate(
|
80
80
|
C <= 1 || r.isDragging || !a ? r.rotation : k.current.iv(C / r.animateDuration)
|
81
81
|
), P = N.geoPath().projection(p).pointRadius(2);
|
82
|
-
|
82
|
+
J(() => {
|
83
83
|
if (S) {
|
84
84
|
let { p1: t, p2: o, r1: i, r2: u, markerId: c } = k.current;
|
85
85
|
if (c !== a && !r.isDragging) {
|
package/lib/Empty/index.js
CHANGED
@@ -2,7 +2,7 @@ import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import t from "prop-types";
|
3
3
|
import { Box as o } from "@mui/material";
|
4
4
|
import c from "@arcblock/icons/lib/EmptyIcon";
|
5
|
-
import { styled as s } from "../Theme
|
5
|
+
import { styled as s } from "../Theme";
|
6
6
|
const l = s(o)`
|
7
7
|
display: flex;
|
8
8
|
justify-content: center;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { jsx as
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
2
2
|
import { Alert as c, AlertTitle as s, Typography as u, Box as m } from "@mui/material";
|
3
3
|
import { useRouteError as d } from "react-router-dom";
|
4
|
-
import t from "../Button
|
4
|
+
import t from "../Button";
|
5
5
|
function l({
|
6
6
|
title: r = "Something went wrong...",
|
7
|
-
desc:
|
7
|
+
desc: o,
|
8
8
|
extraContent: i = null,
|
9
9
|
severity: n = "error"
|
10
10
|
}) {
|
@@ -18,43 +18,43 @@ function l({
|
|
18
18
|
justifyContent: "center"
|
19
19
|
},
|
20
20
|
children: [
|
21
|
-
r ? /* @__PURE__ */
|
22
|
-
|
21
|
+
r ? /* @__PURE__ */ e(s, { children: r }) : null,
|
22
|
+
o ? /* @__PURE__ */ e(
|
23
23
|
u,
|
24
24
|
{
|
25
25
|
variant: "body2",
|
26
26
|
sx: {
|
27
27
|
mb: 1
|
28
28
|
},
|
29
|
-
children:
|
29
|
+
children: o
|
30
30
|
}
|
31
31
|
) : null,
|
32
32
|
i ?? /* @__PURE__ */ a(m, { sx: { display: "flex", gap: 1, justifyContent: "center", alignItems: "center" }, children: [
|
33
|
-
/* @__PURE__ */
|
34
|
-
/* @__PURE__ */
|
33
|
+
/* @__PURE__ */ e(t, { variant: "outlined", color: n, size: "small", onClick: () => window.location.replace("/"), children: "Home" }),
|
34
|
+
/* @__PURE__ */ e(t, { variant: "contained", color: n, size: "small", onClick: () => window.location.reload(), children: "Refresh" })
|
35
35
|
] })
|
36
36
|
]
|
37
37
|
}
|
38
38
|
);
|
39
39
|
}
|
40
|
-
function
|
41
|
-
return /* @__PURE__ */
|
40
|
+
function C({ error: r }) {
|
41
|
+
return /* @__PURE__ */ e(l, { desc: r.message });
|
42
42
|
}
|
43
|
-
function b({ error: r, resetErrorBoundary:
|
44
|
-
return /* @__PURE__ */
|
43
|
+
function b({ error: r, resetErrorBoundary: o }) {
|
44
|
+
return /* @__PURE__ */ e(
|
45
45
|
l,
|
46
46
|
{
|
47
47
|
desc: r.message,
|
48
|
-
extraContent: /* @__PURE__ */
|
48
|
+
extraContent: /* @__PURE__ */ e(t, { variant: "contained", color: "error", size: "small", onClick: o, children: "Try again" })
|
49
49
|
}
|
50
50
|
);
|
51
51
|
}
|
52
52
|
function w() {
|
53
53
|
const r = d();
|
54
|
-
return /* @__PURE__ */
|
54
|
+
return /* @__PURE__ */ e(l, { title: "Current route occurred an error", desc: r.message });
|
55
55
|
}
|
56
56
|
export {
|
57
|
-
|
57
|
+
C as ErrorFallback,
|
58
58
|
b as ErrorFallbackRetry,
|
59
59
|
w as ReactRouterErrorFallback
|
60
60
|
};
|
package/lib/Footer/index.d.ts
CHANGED
@@ -6,4 +6,4 @@ export interface FooterProps {
|
|
6
6
|
style?: React.CSSProperties;
|
7
7
|
addon?: React.ReactNode;
|
8
8
|
}
|
9
|
-
export default function Footer(props: FooterProps): import("react/jsx-runtime").JSX.Element;
|
9
|
+
export default function Footer({ ...props }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/Footer/index.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
2
2
|
import { Container as h, Typography as r, Box as g } from "@mui/material";
|
3
|
-
import { mergeProps as w } from "../Util
|
4
|
-
import y from "../Logo
|
5
|
-
import { styled as
|
6
|
-
function
|
3
|
+
import { mergeProps as w } from "../Util";
|
4
|
+
import y from "../Logo";
|
5
|
+
import { styled as u } from "../Theme";
|
6
|
+
function b({ ...e }) {
|
7
7
|
var s;
|
8
|
-
const p = w(e,
|
8
|
+
const p = w(e, b, ["dark", "style"]), { className: d = "", copyStart: m = "2017", style: c = {}, brand: x = "ArcBlock", dark: n = !1, addon: a = null } = p, i = `${(/* @__PURE__ */ new Date()).getFullYear()}`, l = `${m}`, f = i === l ? i : `${l}-${i}`;
|
9
9
|
return /* @__PURE__ */ o(k, { className: d, style: c, dark: n, children: [
|
10
10
|
/* @__PURE__ */ t(h, { maxWidth: !1, children: /* @__PURE__ */ o(r, { component: "div", className: "footer", children: [
|
11
11
|
/* @__PURE__ */ o(r, { component: "p", className: "footer-item", children: [
|
@@ -46,7 +46,7 @@ function u(e) {
|
|
46
46
|
)
|
47
47
|
] });
|
48
48
|
}
|
49
|
-
const k =
|
49
|
+
const k = u("div", {
|
50
50
|
shouldForwardProp: (e) => e !== "dark"
|
51
51
|
})`
|
52
52
|
position: relative;
|
@@ -110,5 +110,5 @@ const k = b("div", {
|
|
110
110
|
}
|
111
111
|
`;
|
112
112
|
export {
|
113
|
-
|
113
|
+
b as default
|
114
114
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ButtonProps } from '@mui/material';
|
2
2
|
type Props<D extends React.ElementType, P = {}> = {
|
3
3
|
icon?: React.ReactNode;
|
4
|
-
children
|
4
|
+
children: React.ReactNode;
|
5
5
|
} & ButtonProps<D, P>;
|
6
6
|
export declare function AddonButton<D extends React.ElementType, P = {}>({ icon, children, sx, ...rest }: Props<D, P>): import("react/jsx-runtime").JSX.Element;
|
7
7
|
export {};
|
@@ -1,6 +1,11 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { Button as
|
3
|
-
function m({
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
2
|
+
import { Button as e } from "@mui/material";
|
3
|
+
function m({
|
4
|
+
icon: t = void 0,
|
5
|
+
children: r,
|
6
|
+
sx: o,
|
7
|
+
...i
|
8
|
+
}) {
|
4
9
|
const n = [
|
5
10
|
{
|
6
11
|
height: 32,
|
@@ -9,7 +14,7 @@ function m({ icon: o, children: t, sx: r, ...i }) {
|
|
9
14
|
borderRadius: "100vh",
|
10
15
|
fontSize: 14,
|
11
16
|
color: "text.secondary",
|
12
|
-
...!
|
17
|
+
...!r && {
|
13
18
|
padding: 0,
|
14
19
|
height: 32,
|
15
20
|
".MuiButton-startIcon": {
|
@@ -17,9 +22,9 @@ function m({ icon: o, children: t, sx: r, ...i }) {
|
|
17
22
|
}
|
18
23
|
}
|
19
24
|
},
|
20
|
-
...Array.isArray(
|
25
|
+
...Array.isArray(o) ? o : [o]
|
21
26
|
];
|
22
|
-
return /* @__PURE__ */ e
|
27
|
+
return /* @__PURE__ */ d(e, { startIcon: t, color: "inherit", variant: "outlined", sx: n, ...i, children: r });
|
23
28
|
}
|
24
29
|
export {
|
25
30
|
m as AddonButton
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
2
|
import { Box as i } from "@mui/material";
|
3
|
-
import { styled as r } from "../Theme
|
3
|
+
import { styled as r } from "../Theme";
|
4
4
|
function p({ height: o, ...t }) {
|
5
5
|
return /* @__PURE__ */ e(f, { height: o, ...t });
|
6
6
|
}
|
package/lib/Header/header.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { jsx as r, jsxs as t, Fragment as y } from "react/jsx-runtime";
|
2
2
|
import { Box as d, Container as w } from "@mui/material";
|
3
3
|
import { useRef as v, useState as N, useEffect as k } from "react";
|
4
|
-
import z from "./auto-hidden
|
5
|
-
import { styled as W } from "../Theme
|
6
|
-
import $ from "./header-addons
|
4
|
+
import z from "./auto-hidden";
|
5
|
+
import { styled as W } from "../Theme";
|
6
|
+
import $ from "./header-addons";
|
7
7
|
function I({
|
8
8
|
logo: e = null,
|
9
9
|
brand: l = null,
|
@@ -13,7 +13,7 @@ function I({
|
|
13
13
|
addons: p = null,
|
14
14
|
prepend: f = null,
|
15
15
|
align: o = "left",
|
16
|
-
maxWidth: x,
|
16
|
+
maxWidth: x = !1,
|
17
17
|
homeLink: i = "/",
|
18
18
|
...m
|
19
19
|
}) {
|
package/lib/Header/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { default as r } from "./header
|
2
|
-
import { default as o } from "./responsive-header
|
3
|
-
import { default as s } from "./header-addons
|
1
|
+
import { default as r } from "./header";
|
2
|
+
import { default as o } from "./responsive-header";
|
3
|
+
import { default as s } from "./header-addons";
|
4
4
|
export {
|
5
5
|
r as Header,
|
6
6
|
s as HeaderAddons,
|
@@ -13,5 +13,5 @@ export interface ResponsiveHeaderProps extends Omit<HeaderProps, 'children'> {
|
|
13
13
|
*
|
14
14
|
* 注意: 暂时不要通过 display: none 隐藏 logo, https://blog.patw.me/archives/1820/inline-svg-same-id-and-display-none-issue/
|
15
15
|
*/
|
16
|
-
declare function ResponsiveHeader({
|
16
|
+
declare function ResponsiveHeader({ prepend, children, ...rest }: ResponsiveHeaderProps): import("react/jsx-runtime").JSX.Element;
|
17
17
|
export default ResponsiveHeader;
|
@@ -1,48 +1,47 @@
|
|
1
|
-
import { jsx as o, jsxs as
|
2
|
-
import { useState as
|
3
|
-
import { useReactive as
|
4
|
-
import { Close as
|
5
|
-
import { Container as
|
6
|
-
import
|
7
|
-
import { styled as
|
8
|
-
function
|
9
|
-
const
|
1
|
+
import { jsx as o, jsxs as f } from "react/jsx-runtime";
|
2
|
+
import { useState as y } from "react";
|
3
|
+
import { useReactive as v, useCreation as h } from "ahooks";
|
4
|
+
import { Close as g, Menu as b } from "@mui/icons-material";
|
5
|
+
import { Container as x, useMediaQuery as w, Drawer as P, Button as k } from "@mui/material";
|
6
|
+
import i from "./header";
|
7
|
+
import { styled as c, useTheme as C } from "../Theme";
|
8
|
+
function D({ prepend: n, children: r = null, ...s }) {
|
9
|
+
const a = C(), l = w(a.breakpoints.down("md")), [t, m] = y(!1), u = typeof r == "function" ? r({ isMobile: l, closeMenu: () => m(!1) }) : r, e = v({
|
10
10
|
changed: !1,
|
11
11
|
value: "",
|
12
12
|
priority: ""
|
13
13
|
});
|
14
14
|
return h(() => {
|
15
|
-
var
|
16
|
-
if ((
|
17
|
-
const
|
15
|
+
var d;
|
16
|
+
if ((d = document.documentElement) != null && d.style) {
|
17
|
+
const p = () => {
|
18
18
|
e.changed && (e.value ? document.documentElement.style.setProperty("overflow", e.value, e.priority) : document.documentElement.style.removeProperty("overflow"), e.value = "", e.priority = "", e.changed = !1);
|
19
19
|
};
|
20
|
-
return t ? (e.changed = !0, e.value = document.documentElement.style.getPropertyValue("overflow"), e.priority = document.documentElement.style.getPropertyPriority("overflow"), document.documentElement.style.setProperty("overflow", "revert", "important")) :
|
20
|
+
return t ? (e.changed = !0, e.value = document.documentElement.style.getPropertyValue("overflow"), e.priority = document.documentElement.style.getPropertyPriority("overflow"), document.documentElement.style.setProperty("overflow", "revert", "important")) : p(), p;
|
21
21
|
}
|
22
22
|
return () => {
|
23
23
|
};
|
24
|
-
}, [t]), r ? /* @__PURE__ */
|
25
|
-
|
24
|
+
}, [t]), r ? /* @__PURE__ */ f(
|
25
|
+
M,
|
26
26
|
{
|
27
|
-
prepend:
|
28
|
-
|
27
|
+
prepend: n || /* @__PURE__ */ o(
|
28
|
+
k,
|
29
29
|
{
|
30
|
-
sx: { color:
|
31
|
-
edge: "start",
|
30
|
+
sx: { color: a.palette.grey[500] },
|
32
31
|
className: "header-menu",
|
33
32
|
"aria-label": "header menu button",
|
34
|
-
onClick: () =>
|
35
|
-
children: t ? /* @__PURE__ */ o(
|
33
|
+
onClick: () => m(!t),
|
34
|
+
children: t ? /* @__PURE__ */ o(g, {}) : /* @__PURE__ */ o(b, {})
|
36
35
|
}
|
37
36
|
),
|
38
|
-
...
|
37
|
+
...s,
|
39
38
|
children: [
|
40
|
-
!
|
41
|
-
|
42
|
-
|
39
|
+
!l && u,
|
40
|
+
l && /* @__PURE__ */ o(
|
41
|
+
P,
|
43
42
|
{
|
44
43
|
open: t,
|
45
|
-
onClose: () =>
|
44
|
+
onClose: () => m(!1),
|
46
45
|
ModalProps: {
|
47
46
|
disablePortal: !1,
|
48
47
|
keepMounted: !0,
|
@@ -51,7 +50,7 @@ function H({ menu: m, prepend: s, children: r, ...u }) {
|
|
51
50
|
anchor: "top",
|
52
51
|
sx: {
|
53
52
|
top: 64,
|
54
|
-
zIndex:
|
53
|
+
zIndex: a.zIndex.appBar - 1
|
55
54
|
},
|
56
55
|
slotProps: {
|
57
56
|
paper: {
|
@@ -60,28 +59,28 @@ function H({ menu: m, prepend: s, children: r, ...u }) {
|
|
60
59
|
bottom: 0,
|
61
60
|
boxShadow: "none",
|
62
61
|
backgroundImage: "none",
|
63
|
-
backgroundColor:
|
62
|
+
backgroundColor: a.palette.background.paper
|
64
63
|
}
|
65
64
|
}
|
66
65
|
},
|
67
|
-
children: /* @__PURE__ */ o(
|
66
|
+
children: /* @__PURE__ */ o(E, { children: u })
|
68
67
|
}
|
69
68
|
)
|
70
69
|
]
|
71
70
|
}
|
72
|
-
) : /* @__PURE__ */ o(
|
71
|
+
) : /* @__PURE__ */ o(i, { prepend: n, ...s });
|
73
72
|
}
|
74
|
-
const
|
73
|
+
const M = c(i)`
|
75
74
|
.header-menu {
|
76
75
|
display: none;
|
77
76
|
}
|
78
|
-
${(
|
77
|
+
${(n) => n.theme.breakpoints.down("md")} {
|
79
78
|
.header-menu {
|
80
79
|
display: flex;
|
81
80
|
margin-right: 12px;
|
82
81
|
}
|
83
82
|
}
|
84
|
-
`,
|
83
|
+
`, E = c(x)`
|
85
84
|
padding-top: 8px;
|
86
85
|
padding-bottom: 16px;
|
87
86
|
.navmenu {
|
@@ -93,5 +92,5 @@ const E = f(c)`
|
|
93
92
|
}
|
94
93
|
`;
|
95
94
|
export {
|
96
|
-
|
95
|
+
D as default
|
97
96
|
};
|
package/lib/Icon/image.js
CHANGED
package/lib/Icon/index.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
2
2
|
import { Icon as d } from "@iconify/react";
|
3
|
-
import l from "../Colors
|
4
|
-
import { styled as p } from "../Theme
|
5
|
-
import { withDeprecated as m } from "../Util/deprecate
|
3
|
+
import l from "../Colors";
|
4
|
+
import { styled as p } from "../Theme";
|
5
|
+
import { withDeprecated as m } from "../Util/deprecate";
|
6
6
|
function h({
|
7
7
|
name: r,
|
8
|
-
color:
|
9
|
-
size:
|
8
|
+
color: e = l.grey[900],
|
9
|
+
size: o = 24,
|
10
10
|
variant: a = "regular",
|
11
11
|
rounded: f = !1,
|
12
12
|
className: i = "",
|
13
|
-
forwardedRef:
|
13
|
+
forwardedRef: s = void 0
|
14
14
|
}) {
|
15
|
-
const
|
16
|
-
return f ? /* @__PURE__ */ t(u, { ref:
|
15
|
+
const c = a === "solid" ? `fa-solid:${r}` : `fa-regular:${r}`, n = /* @__PURE__ */ t(d, { icon: c, color: e, width: o, height: o, className: i });
|
16
|
+
return f ? /* @__PURE__ */ t(u, { ref: s, size: o, color: e, className: i, children: n }) : n;
|
17
17
|
}
|
18
18
|
const u = p("span")`
|
19
19
|
width: ${(r) => r.size * 2}px;
|
@@ -30,13 +30,13 @@ const u = p("span")`
|
|
30
30
|
.far {
|
31
31
|
line-height: ${(r) => r.size}px;
|
32
32
|
}
|
33
|
-
`,
|
33
|
+
`, I = m(
|
34
34
|
({
|
35
35
|
ref: r,
|
36
|
-
...
|
37
|
-
}) => /* @__PURE__ */ t(h, { ...
|
36
|
+
...e
|
37
|
+
}) => /* @__PURE__ */ t(h, { ...e, forwardedRef: r }),
|
38
38
|
{ name: "Icon", alternative: "SVG icons" }
|
39
39
|
);
|
40
40
|
export {
|
41
|
-
|
41
|
+
I as default
|
42
42
|
};
|
package/lib/Img/index.js
CHANGED
@@ -7,7 +7,7 @@ import q from "@iconify-icons/material-symbols/image-rounded";
|
|
7
7
|
import { Icon as h } from "@iconify/react";
|
8
8
|
import { Box as B } from "@mui/material";
|
9
9
|
import I from "lodash/noop";
|
10
|
-
import { mergeSx as C } from "../Util/style
|
10
|
+
import { mergeSx as C } from "../Util/style";
|
11
11
|
const D = "Img", b = {
|
12
12
|
root: `${D}-root`
|
13
13
|
};
|
package/lib/InfoRow/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export interface InfoRowProps {
|
2
2
|
name: React.ReactNode;
|
3
|
-
nameFormatter
|
3
|
+
nameFormatter?: (name: React.ReactNode) => React.ReactNode;
|
4
4
|
layout?: 'horizontal' | 'vertical';
|
5
5
|
children: React.ReactNode;
|
6
6
|
valueComponent?: React.ElementType;
|
package/lib/InfoRow/index.js
CHANGED
@@ -2,10 +2,9 @@ import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import c from "lodash/camelCase";
|
3
3
|
import x from "lodash/upperFirst";
|
4
4
|
import { Typography as e } from "@mui/material";
|
5
|
-
import { styled as d } from "../Theme
|
5
|
+
import { styled as d } from "../Theme";
|
6
6
|
function v({
|
7
7
|
name: t,
|
8
|
-
// eslint-disable-next-line no-shadow
|
9
8
|
nameFormatter: a = (o) => typeof o == "string" ? o.split(" ").map((s) => x(c(s))).join(" ") : o,
|
10
9
|
layout: n = "horizontal",
|
11
10
|
children: r,
|
@@ -4,7 +4,7 @@ type RouterNavLinkProps = React.ComponentProps<typeof RouterNavLink>;
|
|
4
4
|
export interface LinkProps extends RouterLinkProps {
|
5
5
|
external?: false | true;
|
6
6
|
}
|
7
|
-
export declare function Link(props: LinkProps): import("react/jsx-runtime").JSX.Element;
|
7
|
+
export declare function Link({ ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
|
8
8
|
export interface NavLinkProps extends Omit<RouterNavLinkProps, 'className'> {
|
9
9
|
className?: string | ((props: Partial<NavLinkRenderProps>) => string | undefined);
|
10
10
|
external?: false | true;
|
@@ -1,29 +1,29 @@
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
2
2
|
import { createContext as g, use as P, useLayoutEffect as F, useState as f, useMemo as b } from "react";
|
3
3
|
const s = g(null), d = (l) => {
|
4
|
-
const
|
4
|
+
const i = P(s);
|
5
5
|
return F(() => {
|
6
|
-
l &&
|
7
|
-
}, []),
|
6
|
+
l && i.configure(l);
|
7
|
+
}, []), i;
|
8
8
|
};
|
9
|
-
function I({ children: l, ...
|
10
|
-
const [e,
|
9
|
+
function I({ children: l = void 0, ...i }) {
|
10
|
+
const [e, u] = f({
|
11
11
|
inFullPage: !1,
|
12
12
|
showToggleButton: !1,
|
13
13
|
headerVisibleInFullPage: !0,
|
14
14
|
footerVisibleInFullPage: !1,
|
15
15
|
sidebarVisibleInFullPage: !1
|
16
16
|
}), a = () => {
|
17
|
-
|
17
|
+
u((t) => ({ ...t, inFullPage: !t.inFullPage }));
|
18
18
|
}, o = b(() => ({
|
19
19
|
...e,
|
20
20
|
headerVisible: !e.inFullPage || e.headerVisibleInFullPage,
|
21
21
|
footerVisible: !e.inFullPage || e.footerVisibleInFullPage,
|
22
22
|
sidebarVisible: !e.inFullPage || e.sidebarVisibleInFullPage,
|
23
23
|
toggleFullPage: a,
|
24
|
-
configure: (
|
24
|
+
configure: (t) => u((n) => ({ ...n, ...t }))
|
25
25
|
}), [e]);
|
26
|
-
return /* @__PURE__ */ r(s, { value: o, ...
|
26
|
+
return /* @__PURE__ */ r(s, { value: o, ...i, children: l });
|
27
27
|
}
|
28
28
|
export {
|
29
29
|
s as FullPageContext,
|