@arcblock/ux 2.10.66 → 2.10.68
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/Address/did-address.d.ts +6 -5
- package/lib/Address/index.d.ts +1 -1
- package/lib/Avatar/index.d.ts +10 -8
- package/lib/Avatar/index.js +6 -4
- package/lib/Blocklet/blocklet.d.ts +4 -4
- package/lib/Blocklet/blocklet.js +2 -2
- package/lib/BlockletContext/index.d.ts +3 -3
- package/lib/BlockletNFT/index.d.ts +6 -6
- package/lib/BlockletNFT/index.js +3 -3
- package/lib/BlockletV2/blocklet.d.ts +2 -2
- package/lib/Button/wrap.d.ts +4 -4
- package/lib/Button/wrap.js +2 -2
- package/lib/CardSelector/index.js +0 -1
- package/lib/Center/index.d.ts +1 -1
- package/lib/ClickToCopy/copy-button.d.ts +5 -4
- package/lib/ClickToCopy/copy-button.js +0 -1
- package/lib/ClickToCopy/hook.d.ts +3 -8
- package/lib/ClickToCopy/index.d.ts +6 -4
- package/lib/CodeBlock/index.d.ts +3 -1
- package/lib/CookieConsent/index.d.ts +8 -29
- package/lib/CookieConsent/index.js +3 -17
- package/lib/CountDown/index.d.ts +21 -25
- package/lib/CountDown/index.js +12 -11
- package/lib/DID/index.d.ts +9 -8
- package/lib/Datatable/index.d.ts +5 -5
- package/lib/Datatable/index.js +5 -5
- package/lib/Dialog/confirm.d.ts +6 -6
- package/lib/Dialog/confirm.js +3 -3
- package/lib/Dialog/types.d.ts +1 -1
- package/lib/DidLogo/index.d.ts +5 -25
- package/lib/DidLogo/index.js +4 -15
- package/lib/DriftBot/index.d.ts +13 -19
- package/lib/DriftBot/index.js +5 -6
- package/lib/Earth/index.d.ts +28 -10
- package/lib/Earth/index.js +12 -52
- package/lib/Earth/util.d.ts +10 -5
- package/lib/Earth/util.js +1 -0
- package/lib/ErrorBoundary/fallback.d.ts +12 -19
- package/lib/ErrorBoundary/fallback.js +2 -19
- package/lib/ErrorBoundary/index.d.ts +1 -1
- package/lib/Footer/index.d.ts +17 -24
- package/lib/Footer/index.js +2 -11
- package/lib/Header/header.d.ts +2 -2
- package/lib/Icon/image.d.ts +3 -2
- package/lib/Icon/index.d.ts +6 -4
- package/lib/Img/index.d.ts +1 -1
- package/lib/Img/index.js +1 -1
- package/lib/InfoRow/index.d.ts +9 -32
- package/lib/InfoRow/index.js +10 -23
- package/lib/Layout/dashboard/external-link.d.ts +13 -14
- package/lib/Layout/dashboard/external-link.js +5 -22
- package/lib/Layout/dashboard/full-page.d.ts +19 -11
- package/lib/Layout/dashboard/full-page.js +2 -6
- package/lib/Layout/dashboard/index.d.ts +20 -39
- package/lib/Layout/dashboard/index.js +10 -38
- package/lib/Layout/dashboard/sidebar.d.ts +17 -20
- package/lib/Layout/dashboard/sidebar.js +3 -16
- package/lib/Layout/dashboard-legacy/header.d.ts +10 -36
- package/lib/Layout/dashboard-legacy/header.js +5 -24
- package/lib/Layout/dashboard-legacy/index.d.ts +17 -56
- package/lib/Layout/dashboard-legacy/index.js +12 -41
- package/lib/Layout/dashboard-legacy/sidebar.d.ts +15 -26
- package/lib/Layout/dashboard-legacy/sidebar.js +5 -15
- package/lib/Layout/index.d.ts +17 -56
- package/lib/Layout/index.js +24 -50
- package/lib/LoadingMask/index.d.ts +8 -31
- package/lib/LoadingMask/index.js +2 -18
- package/lib/Locale/browser-lang.d.ts +4 -1
- package/lib/Locale/browser-lang.js +8 -3
- package/lib/Locale/context.d.ts +18 -8
- package/lib/Locale/context.js +1 -1
- package/lib/Locale/languages.d.ts +9 -55
- package/lib/Locale/selector.d.ts +10 -26
- package/lib/Locale/selector.js +8 -25
- package/lib/Locale/util.d.ts +4 -3
- package/lib/Locale/util.js +0 -1
- package/lib/Logo/index.d.ts +9 -40
- package/lib/Logo/index.js +88 -46
- package/lib/Metric/index.d.ts +9 -31
- package/lib/Metric/index.js +5 -20
- package/lib/NFTDisplay/aspect-ratio-container.d.ts +5 -12
- package/lib/NFTDisplay/aspect-ratio-container.js +0 -5
- package/lib/NFTDisplay/broken.d.ts +3 -13
- package/lib/NFTDisplay/broken.js +80 -10
- package/lib/NFTDisplay/displayApi.d.ts +1 -1
- package/lib/NFTDisplay/index.d.ts +28 -6
- package/lib/NFTDisplay/index.js +17 -51
- package/lib/NFTDisplay/svg-embedder/img.d.ts +8 -23
- package/lib/NFTDisplay/svg-embedder/img.js +3 -17
- package/lib/NFTDisplay/svg-embedder/inline-svg.d.ts +7 -13
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -8
- package/lib/NavMenu/nav-menu.d.ts +2 -0
- package/lib/NavMenu/nav-menu.js +0 -1
- package/lib/PageScroller/index.d.ts +14 -13
- package/lib/PageScroller/index.js +12 -37
- package/lib/PageScroller/usePrevValue.d.ts +1 -1
- package/lib/PageScroller/usePrevValue.js +1 -2
- package/lib/Passport/index.d.ts +1 -1
- package/lib/Passport/passport.d.ts +10 -30
- package/lib/Passport/passport.js +5 -19
- package/lib/PoweredByArcBlock/index.d.ts +4 -14
- package/lib/PoweredByArcBlock/index.js +1 -8
- package/lib/PricingTable/PricingPlan.d.ts +11 -9
- package/lib/PricingTable/PricingPlan.js +0 -4
- package/lib/PricingTable/index.d.ts +5 -3
- package/lib/PricingTable/index.js +1 -5
- package/lib/QRCode/index.d.ts +11 -22
- package/lib/QRCode/index.js +1 -15
- package/lib/RelativeTime/index.d.ts +12 -40
- package/lib/RelativeTime/index.js +7 -27
- package/lib/Result/common.d.ts +26 -45
- package/lib/Result/common.js +2 -4
- package/lib/Result/index.d.ts +5 -18
- package/lib/Result/index.js +1 -9
- package/lib/Result/result.d.ts +7 -29
- package/lib/Result/result.js +2 -17
- package/lib/Result/translations.d.ts +2 -54
- package/lib/Screenshot/BaseScreenshot/index.d.ts +7 -24
- package/lib/Screenshot/BaseScreenshot/index.js +2 -15
- package/lib/Screenshot/BaseScreenshot/shells/Macbook.d.ts +25 -19
- package/lib/Screenshot/BaseScreenshot/shells/Phone.d.ts +25 -19
- package/lib/Screenshot/index.d.ts +84 -28
- package/lib/Screenshot/index.js +14 -43
- package/lib/SessionBlocklet/index.d.ts +6 -19
- package/lib/SessionBlocklet/index.js +3 -14
- package/lib/SessionManager/index.d.ts +1 -1
- package/lib/SessionPermission/index.d.ts +9 -17
- package/lib/SessionPermission/index.js +3 -11
- package/lib/SessionUser/components/logged-in.d.ts +9 -31
- package/lib/SessionUser/components/logged-in.js +13 -29
- package/lib/SessionUser/components/session-user-item.d.ts +8 -1
- package/lib/SessionUser/components/session-user-item.js +2 -12
- package/lib/SessionUser/components/session-user-switch.d.ts +9 -21
- package/lib/SessionUser/components/session-user-switch.js +3 -15
- package/lib/SessionUser/components/un-login.d.ts +7 -23
- package/lib/SessionUser/components/un-login.js +4 -16
- package/lib/SessionUser/components/user-info.d.ts +12 -29
- package/lib/SessionUser/components/user-info.js +4 -19
- package/lib/SessionUser/index.d.ts +7 -30
- package/lib/SessionUser/index.js +5 -26
- package/lib/SessionUser/libs/translation.d.ts +2 -31
- package/lib/SessionUser/libs/translation.js +1 -0
- package/lib/SessionUser/libs/utils.d.ts +10 -9
- package/lib/Sparkline/index.d.ts +22 -1
- package/lib/Sparkline/index.js +25 -17
- package/lib/Spinner/index.d.ts +6 -1
- package/lib/Spinner/index.js +4 -11
- package/lib/Success/index.d.ts +5 -21
- package/lib/Success/index.js +4 -16
- package/lib/Tabs/index.d.ts +12 -26
- package/lib/Tabs/index.js +7 -37
- package/lib/TextCollapse/index.d.ts +10 -10
- package/lib/TextCollapse/index.js +4 -21
- package/lib/Theme/index.js +0 -2
- package/lib/Theme/theme-provider.d.ts +1 -1
- package/lib/Theme/theme.d.ts +4 -1
- package/lib/Theme/theme.js +1 -2
- package/lib/Typography/index.d.ts +5 -24
- package/lib/Typography/index.js +5 -17
- package/lib/Util/index.d.ts +11 -6
- package/lib/Util/index.js +6 -0
- package/lib/Video/index.d.ts +12 -16
- package/lib/Video/index.js +0 -14
- package/lib/Wallet/Action.d.ts +13 -18
- package/lib/Wallet/Action.js +0 -7
- package/lib/Wallet/Download.d.ts +24 -30
- package/lib/Wallet/Download.js +201 -18
- package/lib/Wallet/Open.d.ts +5 -15
- package/lib/Wallet/Open.js +5 -11
- package/lib/WalletOSIcon/index.d.ts +6 -25
- package/lib/WalletOSIcon/index.js +3 -16
- package/lib/WebWalletSWKeeper/index.d.ts +8 -20
- package/lib/WebWalletSWKeeper/index.js +14 -19
- package/lib/WechatPrompt/index.js +2 -0
- package/lib/global.d.ts +15 -0
- package/lib/type.d.ts +12 -3
- package/lib/withTheme/index.d.ts +8 -6
- package/lib/withTracker/index.d.ts +1 -1
- package/lib/withTracker/index.js +3 -0
- package/package.json +9 -5
- package/src/Address/did-address.tsx +7 -6
- package/src/Address/index.tsx +1 -1
- package/src/Avatar/index.jsx +6 -4
- package/src/Blocklet/blocklet.jsx +2 -2
- package/src/BlockletContext/index.tsx +3 -3
- package/src/BlockletNFT/index.jsx +3 -3
- package/src/BlockletV2/blocklet.tsx +2 -2
- package/src/Button/wrap.jsx +2 -2
- package/src/CardSelector/index.tsx +0 -1
- package/src/Center/index.tsx +1 -1
- package/src/ClickToCopy/copy-button.tsx +4 -4
- package/src/ClickToCopy/hook.ts +3 -2
- package/src/ClickToCopy/index.tsx +6 -5
- package/src/CodeBlock/index.tsx +3 -1
- package/src/CookieConsent/{index.jsx → index.tsx} +16 -19
- package/src/CountDown/{index.jsx → index.tsx} +30 -16
- package/src/DID/index.tsx +9 -8
- package/src/Datatable/index.jsx +5 -5
- package/src/Dialog/confirm.jsx +3 -3
- package/src/Dialog/types.d.ts +1 -1
- package/src/DidLogo/{index.jsx → index.tsx} +7 -14
- package/src/DriftBot/{index.jsx → index.tsx} +13 -11
- package/src/Earth/{index.jsx → index.tsx} +94 -66
- package/src/Earth/{util.js → util.ts} +20 -17
- package/src/ErrorBoundary/{fallback.jsx → fallback.tsx} +20 -21
- package/src/Footer/{index.jsx → index.tsx} +17 -14
- package/src/Header/header.tsx +2 -3
- package/src/Header/responsive-header.tsx +0 -1
- package/src/Icon/image.tsx +3 -3
- package/src/Icon/index.tsx +7 -4
- package/src/Img/index.jsx +1 -1
- package/src/InfoRow/{index.jsx → index.tsx} +32 -25
- package/src/Layout/dashboard/external-link.tsx +46 -0
- package/src/Layout/dashboard/{full-page.jsx → full-page.tsx} +20 -9
- package/src/Layout/dashboard/{index.jsx → index.tsx} +42 -44
- package/src/Layout/dashboard/{sidebar.jsx → sidebar.tsx} +23 -20
- package/src/Layout/dashboard-legacy/{header.jsx → header.tsx} +16 -26
- package/src/Layout/dashboard-legacy/{index.jsx → index.tsx} +32 -46
- package/src/Layout/dashboard-legacy/{sidebar.jsx → sidebar.tsx} +27 -19
- package/src/Layout/{index.jsx → index.tsx} +41 -47
- package/src/LoadingMask/{index.jsx → index.tsx} +17 -19
- package/src/Locale/{browser-lang.js → browser-lang.ts} +9 -7
- package/src/Locale/context.tsx +18 -11
- package/src/Locale/{languages.js → languages.ts} +1 -1
- package/src/Locale/{selector.jsx → selector.tsx} +32 -29
- package/src/Locale/{util.js → util.ts} +9 -2
- package/src/Logo/index.tsx +58 -0
- package/src/Metric/{index.jsx → index.tsx} +23 -18
- package/src/NFTDisplay/{aspect-ratio-container.jsx → aspect-ratio-container.tsx} +9 -7
- package/src/NFTDisplay/{broken.jsx → broken.tsx} +7 -12
- package/src/NFTDisplay/{displayApi.js → displayApi.ts} +4 -4
- package/src/NFTDisplay/{index.jsx → index.tsx} +59 -64
- package/src/NFTDisplay/svg-embedder/{img.jsx → img.tsx} +10 -18
- package/src/NFTDisplay/svg-embedder/{inline-svg.jsx → inline-svg.tsx} +8 -9
- package/src/NavMenu/nav-menu.tsx +2 -3
- package/src/PageScroller/{index.jsx → index.tsx} +40 -53
- package/src/PageScroller/{usePrevValue.js → usePrevValue.ts} +2 -3
- package/src/Passport/{passport.jsx → passport.tsx} +22 -19
- package/src/PoweredByArcBlock/{index.jsx → index.tsx} +6 -11
- package/src/PricingTable/{PricingPlan.jsx → PricingPlan.tsx} +15 -5
- package/src/PricingTable/{index.jsx → index.tsx} +9 -6
- package/src/QRCode/{index.jsx → index.tsx} +13 -17
- package/src/RelativeTime/{index.jsx → index.tsx} +24 -24
- package/src/Result/{common.jsx → common.tsx} +17 -13
- package/src/Result/index.tsx +30 -0
- package/src/Result/{result.jsx → result.tsx} +8 -17
- package/src/Result/{translations.js → translations.ts} +3 -1
- package/src/Screenshot/BaseScreenshot/{index.jsx → index.tsx} +9 -15
- package/src/Screenshot/BaseScreenshot/shells/{Macbook.jsx → Macbook.tsx} +3 -1
- package/src/Screenshot/BaseScreenshot/shells/{Phone.jsx → Phone.tsx} +3 -1
- package/src/Screenshot/{index.jsx → index.tsx} +60 -54
- package/src/SessionBlocklet/{index.jsx → index.tsx} +8 -14
- package/src/SessionPermission/index.tsx +25 -0
- package/src/SessionUser/components/{logged-in.jsx → logged-in.tsx} +49 -31
- package/src/SessionUser/components/session-user-item.tsx +97 -0
- package/src/SessionUser/components/{session-user-switch.jsx → session-user-switch.tsx} +16 -21
- package/src/SessionUser/components/{un-login.jsx → un-login.tsx} +10 -15
- package/src/SessionUser/components/{user-info.jsx → user-info.tsx} +16 -22
- package/src/SessionUser/index.tsx +26 -0
- package/src/SessionUser/libs/{translation.js → translation.ts} +3 -1
- package/src/SessionUser/libs/utils.ts +39 -0
- package/src/Sparkline/{index.jsx → index.tsx} +38 -22
- package/src/Spinner/index.tsx +20 -0
- package/src/Success/{index.jsx → index.tsx} +7 -13
- package/src/Tabs/{index.jsx → index.tsx} +26 -40
- package/src/TextCollapse/{index.jsx → index.tsx} +26 -21
- package/src/Theme/index.ts +0 -1
- package/src/Theme/theme-provider.tsx +1 -1
- package/src/Theme/theme.ts +6 -3
- package/src/Typography/{index.jsx → index.tsx} +19 -22
- package/src/Util/index.ts +14 -8
- package/src/Video/{index.jsx → index.tsx} +7 -10
- package/src/Wallet/{Action.jsx → Action.tsx} +16 -12
- package/src/Wallet/{Download.jsx → Download.tsx} +25 -21
- package/src/Wallet/{Open.jsx → Open.tsx} +8 -11
- package/src/WalletOSIcon/{index.jsx → index.tsx} +8 -16
- package/src/WebWalletSWKeeper/{index.jsx → index.tsx} +21 -24
- package/src/WechatPrompt/{index.jsx → index.tsx} +1 -0
- package/src/global.d.ts +15 -0
- package/src/type.d.ts +12 -3
- package/src/withTheme/{index.jsx → index.tsx} +12 -2
- package/src/withTracker/{index.jsx → index.tsx} +6 -4
- package/src/Layout/dashboard/external-link.jsx +0 -47
- package/src/Logo/index.jsx +0 -66
- package/src/Result/index.jsx +0 -33
- package/src/SessionPermission/index.jsx +0 -28
- package/src/SessionUser/components/session-user-item.jsx +0 -93
- package/src/SessionUser/index.jsx +0 -38
- package/src/SessionUser/libs/utils.js +0 -37
- package/src/Spinner/index.jsx +0 -21
- /package/src/ErrorBoundary/{index.jsx → index.ts} +0 -0
- /package/src/NFTDisplay/{loading.jsx → loading.tsx} +0 -0
- /package/src/Passport/{index.jsx → index.ts} +0 -0
- /package/src/SessionManager/{index.jsx → index.tsx} +0 -0
package/lib/Dialog/confirm.js
CHANGED
@@ -13,9 +13,9 @@ import Dialog from './dialog';
|
|
13
13
|
* onConfirm: Function,
|
14
14
|
* onCancel: Function,
|
15
15
|
* children?: React.ReactNode,
|
16
|
-
* showCancelButton?:
|
17
|
-
* showCloseButton?:
|
18
|
-
* fullScreen?:
|
16
|
+
* showCancelButton?: true | false,
|
17
|
+
* showCloseButton?: true | false,
|
18
|
+
* fullScreen?: false | true,
|
19
19
|
* confirmButton?: {text: string, props?: ButtonProps}
|
20
20
|
* cancelButton?: {text: string, props?: ButtonProps}
|
21
21
|
* PaperProps?: PaperProps
|
package/lib/Dialog/types.d.ts
CHANGED
package/lib/DidLogo/index.d.ts
CHANGED
@@ -1,26 +1,6 @@
|
|
1
|
-
|
2
|
-
style
|
3
|
-
size
|
4
|
-
className
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
6
|
-
declare namespace DidLogo {
|
7
|
-
namespace propTypes {
|
8
|
-
let style: PropTypes.Requireable<object>;
|
9
|
-
let size: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
10
|
-
let className: PropTypes.Requireable<string>;
|
11
|
-
}
|
12
|
-
namespace defaultProps {
|
13
|
-
export { defaultStyle as style };
|
14
|
-
let size_1: number;
|
15
|
-
export { size_1 as size };
|
16
|
-
let className_1: string;
|
17
|
-
export { className_1 as className };
|
18
|
-
}
|
19
|
-
}
|
20
|
-
export default DidLogo;
|
21
|
-
import PropTypes from 'prop-types';
|
22
|
-
declare namespace defaultStyle {
|
23
|
-
let width: string;
|
24
|
-
let height: string;
|
25
|
-
let fill: string;
|
1
|
+
export interface DidLogoProps {
|
2
|
+
style?: React.CSSProperties;
|
3
|
+
size?: string | number;
|
4
|
+
className?: string;
|
26
5
|
}
|
6
|
+
export default function DidLogo({ style, size, className }: DidLogoProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/DidLogo/index.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import DidLogoIcon from '@arcblock/icons/lib/DidLogo';
|
4
3
|
const defaultStyle = {
|
5
4
|
width: 'auto',
|
@@ -7,9 +6,9 @@ const defaultStyle = {
|
|
7
6
|
fill: 'currentColor'
|
8
7
|
};
|
9
8
|
export default function DidLogo({
|
10
|
-
style,
|
11
|
-
size,
|
12
|
-
className
|
9
|
+
style = defaultStyle,
|
10
|
+
size = 0,
|
11
|
+
className = ''
|
13
12
|
}) {
|
14
13
|
const height = Number(size) > 0 ? `${Number(size)}px` : size;
|
15
14
|
return /*#__PURE__*/_jsx(DidLogoIcon, {
|
@@ -18,14 +17,4 @@ export default function DidLogo({
|
|
18
17
|
height
|
19
18
|
} : {})
|
20
19
|
});
|
21
|
-
}
|
22
|
-
DidLogo.propTypes = {
|
23
|
-
style: PropTypes.object,
|
24
|
-
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
25
|
-
className: PropTypes.string
|
26
|
-
};
|
27
|
-
DidLogo.defaultProps = {
|
28
|
-
style: defaultStyle,
|
29
|
-
size: 0,
|
30
|
-
className: ''
|
31
|
-
};
|
20
|
+
}
|
package/lib/DriftBot/index.d.ts
CHANGED
@@ -1,24 +1,18 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { Component } from 'react';
|
2
|
+
export interface DriftBotProps {
|
3
|
+
appId: string;
|
4
|
+
userId?: string;
|
5
|
+
attributes?: Record<string, any>;
|
6
|
+
}
|
7
|
+
export default class DriftBot extends Component<DriftBotProps> {
|
8
|
+
static defaultProps: {
|
9
|
+
userId: string;
|
10
|
+
attributes: Record<string, any>;
|
11
|
+
};
|
12
|
+
constructor(props: DriftBotProps);
|
13
|
+
insertScript(scriptText: string): void;
|
3
14
|
addMainScript(): void;
|
4
15
|
addIdentityVariables(): void;
|
5
|
-
insertScript(scriptText: any): void;
|
6
16
|
componentDidMount(): void;
|
7
17
|
render(): string;
|
8
18
|
}
|
9
|
-
declare namespace DriftBot {
|
10
|
-
namespace propTypes {
|
11
|
-
let appId: PropTypes.Validator<string>;
|
12
|
-
let userId: PropTypes.Requireable<string>;
|
13
|
-
let attributes: PropTypes.Requireable<object>;
|
14
|
-
}
|
15
|
-
namespace defaultProps {
|
16
|
-
let userId_1: string;
|
17
|
-
export { userId_1 as userId };
|
18
|
-
let attributes_1: {};
|
19
|
-
export { attributes_1 as attributes };
|
20
|
-
}
|
21
|
-
}
|
22
|
-
export default DriftBot;
|
23
|
-
import { Component } from 'react';
|
24
|
-
import PropTypes from 'prop-types';
|
package/lib/DriftBot/index.js
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
/* eslint-disable max-len */
|
2
5
|
import { Component } from 'react';
|
3
|
-
import PropTypes from 'prop-types';
|
4
6
|
import { mergeProps } from '../Util';
|
5
7
|
export default class DriftBot extends Component {
|
6
8
|
constructor(props) {
|
@@ -59,11 +61,8 @@ export default class DriftBot extends Component {
|
|
59
61
|
return '';
|
60
62
|
}
|
61
63
|
}
|
62
|
-
|
63
|
-
|
64
|
-
userId: PropTypes.string,
|
65
|
-
attributes: PropTypes.object
|
66
|
-
};
|
64
|
+
// eslint-disable-next-line react/static-property-placement
|
65
|
+
_defineProperty(DriftBot, "defaultProps", void 0);
|
67
66
|
DriftBot.defaultProps = {
|
68
67
|
userId: '',
|
69
68
|
attributes: {}
|
package/lib/Earth/index.d.ts
CHANGED
@@ -1,11 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
export type Marker = {
|
2
|
+
id: string;
|
3
|
+
title: string;
|
4
|
+
description: string;
|
5
|
+
country: string;
|
6
|
+
latitude: number;
|
7
|
+
longitude: number;
|
8
|
+
};
|
9
|
+
export type Colors = {
|
10
|
+
ocean: string;
|
11
|
+
graticule: string;
|
12
|
+
land: string;
|
13
|
+
activeLand: string;
|
14
|
+
border: string;
|
15
|
+
marker: string;
|
16
|
+
activeMarker: string;
|
17
|
+
};
|
18
|
+
export interface EarthProps {
|
19
|
+
theme?: 'light' | 'dark';
|
20
|
+
width?: number;
|
21
|
+
height?: number;
|
22
|
+
enableRotation?: false | true;
|
23
|
+
rotationSpeed?: number;
|
24
|
+
activeMarkerId?: string;
|
25
|
+
markers?: Marker[];
|
26
|
+
colors?: Partial<Colors>;
|
27
|
+
}
|
28
|
+
declare const _default: (props: EarthProps) => import("react/jsx-runtime").JSX.Element;
|
11
29
|
export default _default;
|
package/lib/Earth/index.js
CHANGED
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* eslint-disable consistent-return */
|
3
3
|
import { useReducer, useRef, useEffect } from 'react';
|
4
4
|
import useSpring from 'react-use/lib/useSpring';
|
5
|
-
import PropTypes from 'prop-types';
|
6
5
|
import * as d3 from 'd3-geo';
|
7
6
|
import * as topojson from 'topojson-client';
|
8
7
|
import versor from 'versor';
|
@@ -53,16 +52,16 @@ function stateReducer(state, action) {
|
|
53
52
|
}
|
54
53
|
}
|
55
54
|
function Earth({
|
56
|
-
theme,
|
57
|
-
width,
|
58
|
-
height,
|
59
|
-
enableRotation,
|
60
|
-
rotationSpeed,
|
61
|
-
markers,
|
55
|
+
theme = 'dark',
|
56
|
+
width = 1200,
|
57
|
+
height = 600,
|
58
|
+
enableRotation = false,
|
59
|
+
rotationSpeed = 5,
|
62
60
|
activeMarkerId,
|
63
|
-
|
61
|
+
markers = [],
|
62
|
+
colors: _colors = {}
|
64
63
|
}) {
|
65
|
-
Object.assign(
|
64
|
+
const colors = Object.assign(_colors, themes[theme]);
|
66
65
|
const [state, dispatch] = useReducer(stateReducer, {
|
67
66
|
rotation: [0, 0, 0],
|
68
67
|
isDragging: false,
|
@@ -73,11 +72,7 @@ function Earth({
|
|
73
72
|
const svgRef = useRef(null);
|
74
73
|
|
75
74
|
// variables used to track drag and rotate
|
76
|
-
const dragRef = useRef({
|
77
|
-
v0: undefined,
|
78
|
-
r0: undefined,
|
79
|
-
q0: undefined
|
80
|
-
});
|
75
|
+
const dragRef = useRef({});
|
81
76
|
|
82
77
|
// variables used to track start and end position when there is active marker
|
83
78
|
const rotateRef = useRef({
|
@@ -151,7 +146,7 @@ function Earth({
|
|
151
146
|
});
|
152
147
|
const getMousePosition = event => {
|
153
148
|
const node = svgRef.current;
|
154
|
-
const rect = node
|
149
|
+
const rect = node?.getBoundingClientRect();
|
155
150
|
const mousePosition = [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
|
156
151
|
return mousePosition;
|
157
152
|
};
|
@@ -279,7 +274,7 @@ function Earth({
|
|
279
274
|
return /*#__PURE__*/_jsxs(Container, {
|
280
275
|
width: width,
|
281
276
|
height: height,
|
282
|
-
theme: theme,
|
277
|
+
$theme: theme,
|
283
278
|
colors: colors,
|
284
279
|
onMouseLeave: onDragEnd,
|
285
280
|
children: [renderTooltip(), /*#__PURE__*/_jsxs("svg", {
|
@@ -361,46 +356,11 @@ function Earth({
|
|
361
356
|
})]
|
362
357
|
});
|
363
358
|
}
|
364
|
-
Earth.propTypes = {
|
365
|
-
theme: PropTypes.oneOf(['light', 'dark']),
|
366
|
-
width: PropTypes.number,
|
367
|
-
height: PropTypes.number,
|
368
|
-
enableRotation: PropTypes.bool,
|
369
|
-
rotationSpeed: PropTypes.number,
|
370
|
-
activeMarkerId: PropTypes.string,
|
371
|
-
markers: PropTypes.arrayOf(PropTypes.shape({
|
372
|
-
id: PropTypes.string.isRequired,
|
373
|
-
title: PropTypes.string.isRequired,
|
374
|
-
description: PropTypes.string.isRequired,
|
375
|
-
country: PropTypes.string.isRequired,
|
376
|
-
latitude: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
377
|
-
longitude: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
378
|
-
})),
|
379
|
-
colors: PropTypes.shape({
|
380
|
-
ocean: PropTypes.string,
|
381
|
-
graticule: PropTypes.string,
|
382
|
-
land: PropTypes.string,
|
383
|
-
activeLand: PropTypes.string,
|
384
|
-
border: PropTypes.string,
|
385
|
-
marker: PropTypes.string,
|
386
|
-
activeMarker: PropTypes.string
|
387
|
-
})
|
388
|
-
};
|
389
|
-
Earth.defaultProps = {
|
390
|
-
theme: 'dark',
|
391
|
-
width: 1200,
|
392
|
-
height: 600,
|
393
|
-
enableRotation: false,
|
394
|
-
rotationSpeed: 5,
|
395
|
-
markers: [],
|
396
|
-
activeMarkerId: undefined,
|
397
|
-
colors: {}
|
398
|
-
};
|
399
359
|
export default withDeprecated(Earth, {
|
400
360
|
name: 'Earth'
|
401
361
|
});
|
402
362
|
const Container = styled('div')`
|
403
|
-
background-color: ${props => props
|
363
|
+
background-color: ${props => props.$theme === 'light' ? '#f7f7f7' : '#222'};
|
404
364
|
width: ${props => props.width}px;
|
405
365
|
height: ${props => props.height}px;
|
406
366
|
position: relative;
|
package/lib/Earth/util.d.ts
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
+
export type Vec3 = [number, number, number];
|
2
|
+
export type Vec2 = [number, number];
|
3
|
+
export type Quaternion = [number, number, number, number];
|
4
|
+
export type Rotation = Vec3;
|
5
|
+
export type Angles = Vec3;
|
1
6
|
export default class Util {
|
2
|
-
static fromAngles([l, p, g]:
|
3
|
-
static toAngles([a, b, c, d]:
|
4
|
-
static interpolateAngles(a:
|
5
|
-
static interpolateLinear([a1, b1, c1, d1]:
|
6
|
-
static interpolate([a1, b1, c1, d1]:
|
7
|
+
static fromAngles([l, p, g]: Angles): Quaternion;
|
8
|
+
static toAngles([a, b, c, d]: Quaternion): number[];
|
9
|
+
static interpolateAngles(a: [number, number, number], b: [number, number, number]): (t: number) => number[];
|
10
|
+
static interpolateLinear([a1, b1, c1, d1]: Quaternion, [a2, b2, c2, d2]: Quaternion): (t: number) => Quaternion;
|
11
|
+
static interpolate([a1, b1, c1, d1]: Quaternion, [a2, b2, c2, d2]: Quaternion): (t: number) => Quaternion;
|
7
12
|
}
|
package/lib/Earth/util.js
CHANGED
@@ -1,21 +1,14 @@
|
|
1
|
-
export
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
namespace propTypes {
|
6
|
-
let error: PropTypes.Validator<Error>;
|
7
|
-
}
|
1
|
+
export interface InternalErrorFallbackProps {
|
2
|
+
title?: string;
|
3
|
+
desc: string;
|
4
|
+
retryFunc?: (() => void) | null;
|
8
5
|
}
|
9
|
-
export
|
10
|
-
error:
|
11
|
-
resetErrorBoundary: any;
|
12
|
-
}): import("react/jsx-runtime").JSX.Element;
|
13
|
-
export namespace ErrorFallbackRetry {
|
14
|
-
export namespace propTypes_1 {
|
15
|
-
let error_1: PropTypes.Validator<Error>;
|
16
|
-
export { error_1 as error };
|
17
|
-
export let resetErrorBoundary: PropTypes.Validator<(...args: any[]) => any>;
|
18
|
-
}
|
19
|
-
export { propTypes_1 as propTypes };
|
6
|
+
export interface ErrorFallbackProps {
|
7
|
+
error: Error;
|
20
8
|
}
|
21
|
-
|
9
|
+
export declare function ErrorFallback({ error }: ErrorFallbackProps): import("react/jsx-runtime").JSX.Element;
|
10
|
+
export interface ErrorFallbackRetryProps {
|
11
|
+
error: Error;
|
12
|
+
resetErrorBoundary: () => void;
|
13
|
+
}
|
14
|
+
export declare function ErrorFallbackRetry({ error, resetErrorBoundary }: ErrorFallbackRetryProps): import("react/jsx-runtime").JSX.Element;
|
@@ -1,12 +1,11 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import { red } from '@mui/material/colors';
|
4
3
|
import Button from '../Button';
|
5
4
|
import { styled } from '../Theme';
|
6
5
|
function InternalErrorFallback({
|
7
|
-
title,
|
6
|
+
title = 'Something went wrong...',
|
8
7
|
desc,
|
9
|
-
retryFunc
|
8
|
+
retryFunc = null
|
10
9
|
}) {
|
11
10
|
return /*#__PURE__*/_jsxs(Root, {
|
12
11
|
role: "alert",
|
@@ -23,15 +22,6 @@ function InternalErrorFallback({
|
|
23
22
|
})]
|
24
23
|
});
|
25
24
|
}
|
26
|
-
InternalErrorFallback.propTypes = {
|
27
|
-
title: PropTypes.string,
|
28
|
-
desc: PropTypes.string.isRequired,
|
29
|
-
retryFunc: PropTypes.func
|
30
|
-
};
|
31
|
-
InternalErrorFallback.defaultProps = {
|
32
|
-
title: 'Something went wrong...',
|
33
|
-
retryFunc: null
|
34
|
-
};
|
35
25
|
export function ErrorFallback({
|
36
26
|
error
|
37
27
|
}) {
|
@@ -39,9 +29,6 @@ export function ErrorFallback({
|
|
39
29
|
desc: error.message
|
40
30
|
});
|
41
31
|
}
|
42
|
-
ErrorFallback.propTypes = {
|
43
|
-
error: PropTypes.instanceOf(Error).isRequired
|
44
|
-
};
|
45
32
|
export function ErrorFallbackRetry({
|
46
33
|
error,
|
47
34
|
resetErrorBoundary
|
@@ -51,10 +38,6 @@ export function ErrorFallbackRetry({
|
|
51
38
|
retryFunc: resetErrorBoundary
|
52
39
|
});
|
53
40
|
}
|
54
|
-
ErrorFallbackRetry.propTypes = {
|
55
|
-
error: PropTypes.instanceOf(Error).isRequired,
|
56
|
-
resetErrorBoundary: PropTypes.func.isRequired
|
57
|
-
};
|
58
41
|
const Root = styled('div')`
|
59
42
|
padding: 16px;
|
60
43
|
border: 2px solid ${props => props.theme.palette.error.main};
|
@@ -1 +1 @@
|
|
1
|
-
export * from
|
1
|
+
export * from './fallback';
|
package/lib/Footer/index.d.ts
CHANGED
@@ -1,27 +1,20 @@
|
|
1
|
-
|
1
|
+
export interface FooterProps {
|
2
|
+
dark?: false | true;
|
3
|
+
className?: string;
|
4
|
+
copyStart?: number | string;
|
5
|
+
brand?: string;
|
6
|
+
style?: React.CSSProperties;
|
7
|
+
addon?: React.ReactNode;
|
8
|
+
}
|
9
|
+
declare function Footer(props: FooterProps): import("react/jsx-runtime").JSX.Element;
|
2
10
|
declare namespace Footer {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
}
|
11
|
-
namespace defaultProps {
|
12
|
-
let dark_1: boolean;
|
13
|
-
export { dark_1 as dark };
|
14
|
-
let brand_1: string;
|
15
|
-
export { brand_1 as brand };
|
16
|
-
let copyStart_1: string;
|
17
|
-
export { copyStart_1 as copyStart };
|
18
|
-
let className_1: string;
|
19
|
-
export { className_1 as className };
|
20
|
-
let style_1: {};
|
21
|
-
export { style_1 as style };
|
22
|
-
let addon_1: null;
|
23
|
-
export { addon_1 as addon };
|
24
|
-
}
|
11
|
+
var defaultProps: {
|
12
|
+
dark: boolean;
|
13
|
+
className: string;
|
14
|
+
copyStart: string;
|
15
|
+
brand: string;
|
16
|
+
style: {};
|
17
|
+
addon: null;
|
18
|
+
};
|
25
19
|
}
|
26
20
|
export default Footer;
|
27
|
-
import PropTypes from 'prop-types';
|
package/lib/Footer/index.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
/* eslint-disable react/no-unused-prop-types */
|
3
|
-
import PropTypes from 'prop-types';
|
4
3
|
import Typography from '@mui/material/Typography';
|
5
4
|
import MuiContainer from '@mui/material/Container';
|
6
5
|
import Box from '@mui/material/Box';
|
@@ -87,19 +86,11 @@ export default function Footer(props) {
|
|
87
86
|
})]
|
88
87
|
});
|
89
88
|
}
|
90
|
-
Footer.propTypes = {
|
91
|
-
dark: PropTypes.bool,
|
92
|
-
className: PropTypes.string,
|
93
|
-
copyStart: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
94
|
-
brand: PropTypes.string,
|
95
|
-
style: PropTypes.object,
|
96
|
-
addon: PropTypes.node
|
97
|
-
};
|
98
89
|
Footer.defaultProps = {
|
99
90
|
dark: false,
|
100
|
-
brand: 'ArcBlock',
|
101
|
-
copyStart: '2017',
|
102
91
|
className: '',
|
92
|
+
copyStart: '2017',
|
93
|
+
brand: 'ArcBlock',
|
103
94
|
style: {},
|
104
95
|
addon: null
|
105
96
|
};
|
package/lib/Header/header.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { type Breakpoint } from '@mui/material';
|
2
|
-
export interface HeaderProps extends
|
1
|
+
import { type BoxProps, type Breakpoint } from '@mui/material';
|
2
|
+
export interface HeaderProps extends Omit<BoxProps, 'maxWidth'> {
|
3
3
|
/** logo img/svg, 可以包裹一个 a 标签 */
|
4
4
|
logo?: React.ReactNode;
|
5
5
|
/** 相当于 Title, 可以包裹一个 a 标签 */
|
package/lib/Icon/image.d.ts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
|
1
|
+
import { type ImgProps } from '../Img';
|
2
|
+
export interface ImageIconProps extends Omit<ImgProps, 'size' | 'src'> {
|
2
3
|
name: string;
|
3
4
|
size?: number;
|
4
5
|
color?: string;
|
5
6
|
alt?: string;
|
6
7
|
prefix?: string;
|
7
|
-
showBadge?:
|
8
|
+
showBadge?: false | true;
|
8
9
|
}
|
9
10
|
export default function ImageIcon({ name, size, alt, color, prefix, showBadge, style, ...rest }: ImageIconProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/Icon/index.d.ts
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
|
1
|
+
import { type SxProps } from '@mui/material';
|
2
|
+
export interface IconProps extends React.HTMLAttributes<HTMLDivElement> {
|
2
3
|
name: string;
|
3
4
|
color?: string;
|
4
5
|
size?: number;
|
5
6
|
variant?: 'light' | 'regular' | 'solid';
|
6
|
-
rounded?:
|
7
|
-
forwardedRef?: React.ForwardedRef<
|
7
|
+
rounded?: false | true;
|
8
|
+
forwardedRef?: React.ForwardedRef<HTMLDivElement>;
|
9
|
+
sx?: SxProps;
|
8
10
|
}
|
9
|
-
declare const _default: (props: IconProps & import("react").RefAttributes<
|
11
|
+
declare const _default: (props: IconProps & import("react").RefAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
10
12
|
export default _default;
|
package/lib/Img/index.d.ts
CHANGED
@@ -19,7 +19,7 @@ export type ImgExProps = {
|
|
19
19
|
onError?: Function | undefined;
|
20
20
|
onSuccess?: Function | undefined;
|
21
21
|
};
|
22
|
-
export type ImgProps = ImgExProps & import("
|
22
|
+
export type ImgProps = ImgExProps & import("@mui/material").BoxProps;
|
23
23
|
/**
|
24
24
|
*
|
25
25
|
* @param {ImgProps} props
|
package/lib/Img/index.js
CHANGED
package/lib/InfoRow/index.d.ts
CHANGED
@@ -1,33 +1,10 @@
|
|
1
|
-
export
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
valueComponent: any;
|
9
|
-
nameWidth: any;
|
10
|
-
}): import("react/jsx-runtime").JSX.Element;
|
11
|
-
declare namespace InfoRow {
|
12
|
-
namespace propTypes {
|
13
|
-
let name: PropTypes.Validator<any>;
|
14
|
-
let layout: PropTypes.Requireable<string>;
|
15
|
-
let children: PropTypes.Requireable<any>;
|
16
|
-
let nameFormatter: PropTypes.Requireable<(...args: any[]) => any>;
|
17
|
-
let valueComponent: PropTypes.Requireable<string>;
|
18
|
-
let nameWidth: PropTypes.Requireable<number>;
|
19
|
-
}
|
20
|
-
namespace defaultProps {
|
21
|
-
let children_1: null;
|
22
|
-
export { children_1 as children };
|
23
|
-
let nameWidth_1: number;
|
24
|
-
export { nameWidth_1 as nameWidth };
|
25
|
-
export function nameFormatter_1(name: any): any;
|
26
|
-
export { nameFormatter_1 as nameFormatter };
|
27
|
-
let valueComponent_1: string;
|
28
|
-
export { valueComponent_1 as valueComponent };
|
29
|
-
let layout_1: string;
|
30
|
-
export { layout_1 as layout };
|
31
|
-
}
|
1
|
+
export interface InfoRowProps {
|
2
|
+
name: React.ReactNode;
|
3
|
+
nameFormatter: (name: React.ReactNode) => React.ReactNode;
|
4
|
+
layout?: 'horizontal' | 'vertical';
|
5
|
+
children: React.ReactNode;
|
6
|
+
valueComponent?: React.ElementType;
|
7
|
+
nameWidth?: number;
|
32
8
|
}
|
33
|
-
|
9
|
+
declare function InfoRow({ name, nameFormatter, layout, children, valueComponent, nameWidth, ...rest }: InfoRowProps): import("react/jsx-runtime").JSX.Element;
|
10
|
+
export default InfoRow;
|
package/lib/InfoRow/index.js
CHANGED
@@ -1,16 +1,21 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import camelCase from 'lodash/camelCase';
|
4
3
|
import upperFirst from 'lodash/upperFirst';
|
5
4
|
import Typography from '@mui/material/Typography';
|
6
5
|
import { styled } from '../Theme';
|
7
6
|
function InfoRow({
|
8
7
|
name,
|
9
|
-
|
10
|
-
|
8
|
+
// eslint-disable-next-line no-shadow
|
9
|
+
nameFormatter = name => {
|
10
|
+
if (typeof name === 'string') {
|
11
|
+
return name.split(' ').map(x => upperFirst(camelCase(x))).join(' ');
|
12
|
+
}
|
13
|
+
return name;
|
14
|
+
},
|
15
|
+
layout = 'horizontal',
|
11
16
|
children,
|
12
|
-
valueComponent,
|
13
|
-
nameWidth,
|
17
|
+
valueComponent = 'div',
|
18
|
+
nameWidth = 90,
|
14
19
|
...rest
|
15
20
|
}) {
|
16
21
|
return /*#__PURE__*/_jsxs(Container, {
|
@@ -29,24 +34,6 @@ function InfoRow({
|
|
29
34
|
})]
|
30
35
|
});
|
31
36
|
}
|
32
|
-
InfoRow.propTypes = {
|
33
|
-
name: PropTypes.any.isRequired,
|
34
|
-
layout: PropTypes.oneOf(['horizontal', 'vertical']),
|
35
|
-
children: PropTypes.any,
|
36
|
-
nameFormatter: PropTypes.func,
|
37
|
-
valueComponent: PropTypes.string,
|
38
|
-
nameWidth: PropTypes.number
|
39
|
-
};
|
40
|
-
InfoRow.defaultProps = {
|
41
|
-
children: null,
|
42
|
-
nameWidth: 90,
|
43
|
-
nameFormatter: name => {
|
44
|
-
const resetName = name.split(' ').map(x => upperFirst(camelCase(x))).join(' ');
|
45
|
-
return typeof name === 'string' ? resetName : name;
|
46
|
-
},
|
47
|
-
valueComponent: 'div',
|
48
|
-
layout: 'horizontal'
|
49
|
-
};
|
50
37
|
const Container = styled('div')`
|
51
38
|
display: flex;
|
52
39
|
flex-direction: ${props => props.layout === 'vertical' ? 'column' : 'row'};
|