@arcblock/ux 2.10.24 → 2.10.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. package/babel.config.es.js +1 -0
  2. package/lib/ActionButton/index.js +1 -1
  3. package/lib/ActivityIndicator/index.d.ts +34 -0
  4. package/lib/ActivityIndicator/index.js +1 -1
  5. package/lib/Address/compact-text.js +1 -1
  6. package/lib/Address/did-address.js +1 -1
  7. package/lib/Address/index.js +1 -1
  8. package/lib/Address/responsive-did-address.js +1 -1
  9. package/lib/Alert/index.d.ts +12 -0
  10. package/lib/Alert/index.js +1 -1
  11. package/lib/AnimationWaiter/index.js +1 -1
  12. package/lib/Async/index.js +1 -1
  13. package/lib/Avatar/did-motif.d.ts +29 -0
  14. package/lib/Avatar/did-motif.js +1 -1
  15. package/lib/Avatar/etherscan-blockies.d.ts +5 -0
  16. package/lib/Avatar/index.d.ts +64 -0
  17. package/lib/Avatar/index.js +1 -1
  18. package/lib/Badge/index.d.ts +12 -0
  19. package/lib/Badge/index.js +1 -1
  20. package/lib/Blocklet/blocklet.d.ts +84 -0
  21. package/lib/Blocklet/blocklet.js +1 -1
  22. package/lib/Blocklet/index.d.ts +5 -0
  23. package/lib/Blocklet/utils.d.ts +3 -0
  24. package/lib/BlockletContext/index.js +1 -1
  25. package/lib/BlockletNFT/index.js +1 -1
  26. package/lib/Button/index.d.ts +3 -0
  27. package/lib/Button/wrap.d.ts +27 -0
  28. package/lib/Button/wrap.js +4 -3
  29. package/lib/CardSelector/index.js +1 -1
  30. package/lib/Center/index.js +1 -1
  31. package/lib/ClickToCopy/copy-button.js +1 -1
  32. package/lib/ClickToCopy/index.js +1 -1
  33. package/lib/CodeBlock/index.js +1 -1
  34. package/lib/Colors/index.d.ts +2 -0
  35. package/lib/Colors/themes/default.d.ts +76 -0
  36. package/lib/Colors/themes/temp.d.ts +36 -0
  37. package/lib/ContactForm/index.js +1 -1
  38. package/lib/CookieConsent/index.js +1 -1
  39. package/lib/CountDown/index.js +1 -1
  40. package/lib/DID/index.js +1 -1
  41. package/lib/Datatable/CustomToolbar.d.ts +37 -0
  42. package/lib/Datatable/CustomToolbar.js +1 -1
  43. package/lib/Datatable/DatatableContext.d.ts +4 -0
  44. package/lib/Datatable/DatatableContext.js +1 -1
  45. package/lib/Datatable/TableSearch.d.ts +28 -0
  46. package/lib/Datatable/TableSearch.js +1 -1
  47. package/lib/Datatable/index.d.ts +53 -0
  48. package/lib/Datatable/index.js +11 -3
  49. package/lib/Datatable/utils.d.ts +5 -0
  50. package/lib/Dialog/confirm.d.ts +86 -0
  51. package/lib/Dialog/confirm.js +23 -13
  52. package/lib/Dialog/dialog.d.ts +115 -0
  53. package/lib/Dialog/dialog.js +12 -7
  54. package/lib/Dialog/index.d.ts +3 -0
  55. package/lib/Dialog/use-confirm.d.ts +8 -0
  56. package/lib/Dialog/use-confirm.js +1 -1
  57. package/lib/DidLogo/index.js +1 -1
  58. package/lib/Earth/index.js +1 -1
  59. package/lib/Empty/index.d.ts +39 -0
  60. package/lib/Empty/index.js +1 -1
  61. package/lib/ErrorBoundary/fallback.js +1 -1
  62. package/lib/Footer/index.js +1 -1
  63. package/lib/Header/auto-hidden.js +1 -1
  64. package/lib/Header/header.js +1 -1
  65. package/lib/Header/responsive-header.js +1 -1
  66. package/lib/Icon/image.js +1 -1
  67. package/lib/Icon/index.d.ts +2 -0
  68. package/lib/Icon/index.js +1 -1
  69. package/lib/Img/index.d.ts +77 -0
  70. package/lib/Img/index.js +2 -1
  71. package/lib/InfoRow/index.js +1 -1
  72. package/lib/Layout/dashboard/external-link.js +1 -1
  73. package/lib/Layout/dashboard/full-page.js +1 -1
  74. package/lib/Layout/dashboard/index.js +1 -1
  75. package/lib/Layout/dashboard/sidebar.js +1 -1
  76. package/lib/Layout/dashboard-legacy/header.js +1 -1
  77. package/lib/Layout/dashboard-legacy/index.js +1 -1
  78. package/lib/Layout/dashboard-legacy/sidebar.js +1 -1
  79. package/lib/Layout/index.js +1 -1
  80. package/lib/LoadingMask/index.js +1 -1
  81. package/lib/Locale/context.js +1 -1
  82. package/lib/Locale/selector.js +1 -1
  83. package/lib/Logo/index.d.ts +42 -0
  84. package/lib/Logo/index.js +1 -1
  85. package/lib/Metric/index.js +1 -1
  86. package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
  87. package/lib/NFTDisplay/broken.js +1 -1
  88. package/lib/NFTDisplay/index.js +1 -1
  89. package/lib/NFTDisplay/loading.js +1 -1
  90. package/lib/NFTDisplay/svg-embedder/img.js +1 -1
  91. package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
  92. package/lib/NavMenu/nav-menu.js +1 -1
  93. package/lib/PageScroller/index.js +1 -1
  94. package/lib/PageScroller/story/FullPage.js +1 -1
  95. package/lib/PageScroller/story/PageContain.js +1 -1
  96. package/lib/Passport/passport.js +1 -1
  97. package/lib/PoweredByArcBlock/index.js +1 -1
  98. package/lib/PricingTable/PricingPlan.js +1 -1
  99. package/lib/PricingTable/index.js +1 -1
  100. package/lib/QRCode/index.js +1 -1
  101. package/lib/RelativeTime/index.js +1 -1
  102. package/lib/Result/common.js +1 -1
  103. package/lib/Result/index.js +1 -1
  104. package/lib/Result/result.js +1 -1
  105. package/lib/Screenshot/BaseScreenshot/index.js +1 -1
  106. package/lib/Screenshot/index.js +1 -1
  107. package/lib/SessionBlocklet/index.js +1 -1
  108. package/lib/SessionUser/components/logged-in.js +1 -1
  109. package/lib/SessionUser/components/session-user-item.js +1 -1
  110. package/lib/SessionUser/components/session-user-switch.js +1 -1
  111. package/lib/SessionUser/components/un-login.js +1 -1
  112. package/lib/SessionUser/components/user-info.js +1 -1
  113. package/lib/SessionUser/index.js +1 -1
  114. package/lib/Spinner/index.js +1 -1
  115. package/lib/SplitButton/index.js +8 -8
  116. package/lib/Success/index.js +1 -1
  117. package/lib/Switch/index.d.ts +31 -0
  118. package/lib/Switch/index.js +1 -1
  119. package/lib/Tabs/index.js +1 -1
  120. package/lib/Tag/index.d.ts +14 -0
  121. package/lib/Tag/index.js +11 -7
  122. package/lib/TextCollapse/index.js +1 -1
  123. package/lib/Theme/index.d.ts +14 -0
  124. package/lib/Theme/index.js +9 -0
  125. package/lib/Theme/theme-provider.d.ts +25 -0
  126. package/lib/Theme/theme-provider.js +1 -1
  127. package/lib/Theme/theme.d.ts +17 -0
  128. package/lib/Theme/theme.js +21 -3
  129. package/lib/Toast/index.d.ts +11 -0
  130. package/lib/Toast/index.js +2 -1
  131. package/lib/Typography/index.js +1 -1
  132. package/lib/Util/constant.d.ts +33 -0
  133. package/lib/Util/deprecate.d.ts +5 -0
  134. package/lib/Util/deprecate.js +1 -1
  135. package/lib/Util/index.d.ts +81 -0
  136. package/lib/Video/index.js +1 -1
  137. package/lib/Wallet/Action.js +1 -1
  138. package/lib/Wallet/Download.js +1 -1
  139. package/lib/Wallet/Open.js +1 -1
  140. package/lib/WalletOSIcon/index.js +1 -1
  141. package/lib/WebWalletSWKeeper/index.js +1 -1
  142. package/lib/WechatPrompt/index.js +1 -1
  143. package/lib/withTheme/index.js +1 -1
  144. package/lib/withTracker/error_boundary.js +1 -1
  145. package/lib/withTracker/index.js +1 -1
  146. package/package.json +13 -7
  147. package/src/Button/wrap.js +3 -2
  148. package/src/Datatable/index.jsx +9 -2
  149. package/src/Dialog/confirm.jsx +22 -12
  150. package/src/Dialog/dialog.jsx +11 -6
  151. package/src/SplitButton/index.js +7 -7
  152. package/src/Tag/index.js +10 -6
  153. package/src/Theme/index.js +8 -0
  154. package/src/Theme/theme.js +20 -3
@@ -7,6 +7,7 @@ module.exports = {
7
7
  'babel-plugin-inline-react-svg',
8
8
  '@babel/plugin-syntax-dynamic-import',
9
9
  '@babel/plugin-proposal-class-properties',
10
+ './tools/sticky-react-runtime',
10
11
  ],
11
12
  ignore: ['src/**/*.stories.js', 'src/**/demo'],
12
13
  };
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import PropTypes from 'prop-types';
2
3
  import Button from '../Button';
3
4
  import { mergeProps } from '../Util';
@@ -25,7 +26,6 @@ import { withDeprecated } from '../Util/deprecate';
25
26
  * @param {ActionButtonProps} props
26
27
  * @returns {JSX.Element}
27
28
  */
28
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
29
29
  function ActionButton(props) {
30
30
  /** @type {ActionButtonProps & {}} */
31
31
  const newProps = mergeProps(props, ActionButton);
@@ -0,0 +1,34 @@
1
+ /**
2
+ * ActivityIndicator is used when we want to tell the user the request they made on the UI will take time.
3
+ * @typedef {{
4
+ * interval?: number;
5
+ * messages: string[];
6
+ * } & import('react').ComponentPropsWithoutRef<"div"> } ActivityIndicatorProps
7
+ */
8
+ /**
9
+ * @description ActivityIndicator is used when we want to tell the user the request they made on the UI will take time.
10
+ * @param {ActivityIndicatorProps} props
11
+ * @returns {JSX.Element}
12
+ */
13
+ declare function ActivityIndicator({ messages, interval, ...rest }: ActivityIndicatorProps): JSX.Element;
14
+ declare namespace ActivityIndicator {
15
+ namespace propTypes {
16
+ let interval: PropTypes.Requireable<number>;
17
+ let messages: PropTypes.Requireable<string[]>;
18
+ }
19
+ namespace defaultProps {
20
+ let interval_1: number;
21
+ export { interval_1 as interval };
22
+ let messages_1: string[];
23
+ export { messages_1 as messages };
24
+ }
25
+ }
26
+ export default ActivityIndicator;
27
+ /**
28
+ * ActivityIndicator is used when we want to tell the user the request they made on the UI will take time.
29
+ */
30
+ export type ActivityIndicatorProps = {
31
+ interval?: number;
32
+ messages: string[];
33
+ } & import("react").ComponentPropsWithoutRef<"div">;
34
+ import PropTypes from 'prop-types';
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { useEffect, useState } from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import { green, blue } from '@mui/material/colors';
@@ -18,7 +19,6 @@ import { styled } from '../Theme';
18
19
  * @param {ActivityIndicatorProps} props
19
20
  * @returns {JSX.Element}
20
21
  */
21
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  export default function ActivityIndicator({
23
23
  messages,
24
24
  interval,
@@ -1,10 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { Children } from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import Tooltip, { tooltipClasses } from '@mui/material/Tooltip';
4
5
  import Box from '@mui/material/Box';
5
6
  import { styled } from '../Theme';
6
7
  import { CopyButton } from '../ClickToCopy';
7
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  const StyledTooltip = styled(({
9
9
  className,
10
10
  ...props
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import React, { useRef, useState, forwardRef } from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import '@fontsource/ubuntu-mono/400.css';
@@ -9,7 +10,6 @@ import noop from 'lodash/noop';
9
10
  import { styled } from '../Theme';
10
11
  import { getFontSize } from '../Util';
11
12
  import CompactText from './compact-text';
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  const translations = {
14
14
  en: {
15
15
  copy: 'Click To Copy',
@@ -1,7 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import PropTypes from 'prop-types';
2
3
  import DidAddress from './did-address';
3
4
  import ResponsiveDidAddress from './responsive-did-address';
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
5
  export default function DidAddressWrapper({
6
6
  responsive,
7
7
  ...rest
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { useState, createRef, useEffect, useRef } from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import { useSize } from 'ahooks';
@@ -14,7 +15,6 @@ import DidAddress from './did-address';
14
15
  * - 监听容器宽度变化, 当容器宽度变化时, 对比容器宽度和 did address full-width, => 切换 compact 模式
15
16
  * - TODO: 初始化时, 在确定是否应该以 compact 模式渲染前, 隐藏显示, 避免闪烁问题
16
17
  */
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
18
  export default function ResponsiveDidAddress({
19
19
  style,
20
20
  className,
@@ -0,0 +1,12 @@
1
+ declare const _default: (props: any) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
2
+ export default _default;
3
+ /**
4
+ * Alert notification component
5
+ */
6
+ export type AlertProps = {
7
+ type?: "error" | "warning" | "success" | "tip";
8
+ children: any;
9
+ className?: string;
10
+ style?: object | string;
11
+ variant?: "border" | "icon";
12
+ } & import("react").ComponentPropsWithoutRef<"div">;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import PropTypes from 'prop-types';
2
3
  import Typography from '@mui/material/Typography';
3
4
  import { blueGrey } from '@mui/material/colors';
@@ -6,7 +7,6 @@ import { mergeProps } from '../Util';
6
7
  import colors from '../Colors';
7
8
  import { styled } from '../Theme';
8
9
  import { withDeprecated } from '../Util/deprecate';
9
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
10
  const types = {
11
11
  error: {
12
12
  icon: 'exclamation-circle',
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { useState, useEffect, useRef } from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import Lottie from 'react-lottie-player';
@@ -20,7 +21,6 @@ import { styled } from '../Theme';
20
21
  * @param {Number} increaseSpeed 在 maybeDuration 时间下增加的速度,默认为0(不增加速度)
21
22
  * @returns element
22
23
  */
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
24
  export default function AnimationWaiter({
25
25
  animationData,
26
26
  size,
@@ -1,6 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import * as React from 'react';
2
3
  import CircularProgress from '@mui/material/CircularProgress';
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
4
  export default function LoadAsyncComponent(importComponent, key = 'default', showProgress = true) {
5
5
  class AsyncComponent extends React.Component {
6
6
  constructor(props) {
@@ -0,0 +1,29 @@
1
+ export default DIDMotif;
2
+ declare function DIDMotif({ did, size, animation, shape, responsive, ...rest }: {
3
+ [x: string]: any;
4
+ did: any;
5
+ size: any;
6
+ animation: any;
7
+ shape: any;
8
+ responsive: any;
9
+ }): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
10
+ declare namespace DIDMotif {
11
+ namespace propTypes {
12
+ let did: PropTypes.Validator<string>;
13
+ let size: PropTypes.Requireable<number>;
14
+ let animation: PropTypes.Requireable<boolean>;
15
+ let responsive: PropTypes.Requireable<boolean>;
16
+ let shape: PropTypes.Requireable<number>;
17
+ }
18
+ namespace defaultProps {
19
+ let size_1: number;
20
+ export { size_1 as size };
21
+ let animation_1: boolean;
22
+ export { animation_1 as animation };
23
+ let responsive_1: boolean;
24
+ export { responsive_1 as responsive };
25
+ let shape_1: any;
26
+ export { shape_1 as shape };
27
+ }
28
+ }
29
+ import PropTypes from 'prop-types';
@@ -1,8 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { useRef, useLayoutEffect } from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import { update } from '@arcblock/did-motif';
4
5
  import { Box } from '@mui/material';
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
6
  function DIDMotif({
7
7
  did,
8
8
  size,
@@ -0,0 +1,5 @@
1
+ declare namespace _default {
2
+ export { createIcon };
3
+ }
4
+ export default _default;
5
+ declare function createIcon(opts: any): HTMLCanvasElement;
@@ -0,0 +1,64 @@
1
+ declare function AvatarWithErrorBoundary(props: any): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
2
+ declare namespace AvatarWithErrorBoundary {
3
+ import propTypes = Avatar.propTypes;
4
+ export { propTypes };
5
+ }
6
+ export default AvatarWithErrorBoundary;
7
+ /**
8
+ * Avatar component
9
+ */
10
+ export type AvatarProps = {
11
+ did: string;
12
+ size?: number;
13
+ variant?: "circle" | "rounded" | "default";
14
+ animation?: boolean;
15
+ shape?: "" | "rectangle" | "square" | "hexagon" | "circle";
16
+ src?: string;
17
+ responsive?: boolean;
18
+ };
19
+ /**
20
+ * Avatar component
21
+ * @typedef {{
22
+ * did: string;
23
+ * size?: number;
24
+ * variant?: 'circle' | 'rounded' | 'default';
25
+ * animation?: boolean;
26
+ * shape?: '' | 'rectangle' | 'square' | 'hexagon' | 'circle';
27
+ * src?: string;
28
+ * responsive?: boolean;
29
+ * }} AvatarProps
30
+ */
31
+ /**
32
+ * Avatar component
33
+ * @see 参考: https://github.com/blocklet/block-explorer/issues/478#issuecomment-1038954976
34
+ * @param {AvatarProps} props
35
+ * @returns {JSX.Element}
36
+ */
37
+ declare function Avatar(props: AvatarProps): JSX.Element;
38
+ declare namespace Avatar {
39
+ export namespace propTypes_1 {
40
+ let did: PropTypes.Validator<string>;
41
+ let size: PropTypes.Requireable<number>;
42
+ let variant: PropTypes.Requireable<string>;
43
+ let animation: PropTypes.Requireable<boolean>;
44
+ let shape: PropTypes.Requireable<string>;
45
+ let blockiesPadding: PropTypes.Requireable<boolean>;
46
+ let responsive: PropTypes.Requireable<boolean>;
47
+ }
48
+ export { propTypes_1 as propTypes };
49
+ export namespace defaultProps {
50
+ let size_1: number;
51
+ export { size_1 as size };
52
+ let variant_1: string;
53
+ export { variant_1 as variant };
54
+ let animation_1: boolean;
55
+ export { animation_1 as animation };
56
+ let blockiesPadding_1: boolean;
57
+ export { blockiesPadding_1 as blockiesPadding };
58
+ let shape_1: string;
59
+ export { shape_1 as shape };
60
+ let responsive_1: boolean;
61
+ export { responsive_1 as responsive };
62
+ }
63
+ }
64
+ import PropTypes from 'prop-types';
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  /* eslint-disable react/no-unused-prop-types */
2
3
  import { useState, useMemo } from 'react';
3
4
  import PropTypes from 'prop-types';
@@ -29,7 +30,6 @@ import { DID_PREFIX } from '../Util/constant';
29
30
  * @param {AvatarProps} props
30
31
  * @returns {JSX.Element}
31
32
  */
32
- import { jsx as _jsx } from "react/jsx-runtime";
33
33
  function Avatar(props) {
34
34
  const [imgError, setImgError] = useState(false);
35
35
  const newProps = mergeProps(props, Avatar, []);
@@ -0,0 +1,12 @@
1
+ declare const _default: (props: any) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
2
+ export default _default;
3
+ /**
4
+ * Badge component to display notification badge
5
+ */
6
+ export type BadgeProps = {
7
+ children: import("react").ReactNode;
8
+ content?: string;
9
+ type?: "error" | "warning" | "success" | "primary" | "reverse";
10
+ className?: string;
11
+ style?: object | string;
12
+ } & import("@mui/material").TypographyProps;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { forwardRef } from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import Typography from '@mui/material/Typography';
@@ -5,7 +6,6 @@ import colors from '../Colors';
5
6
  import { mergeProps } from '../Util';
6
7
  import { withDeprecated } from '../Util/deprecate';
7
8
  import { styled } from '../Theme';
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
9
  const types = {
10
10
  error: {
11
11
  color: colors.common.white,
@@ -0,0 +1,84 @@
1
+ /**
2
+ * BlockletStore component
3
+ * @typedef {{
4
+ * title?: string | JSX.Element;
5
+ * did?: string;
6
+ * description?: string | JSX.Element;
7
+ * cover?: string;
8
+ * version?: string;
9
+ * buttonText?: string;
10
+ * buttonDisabled?: boolean;
11
+ * buttonLoading?: boolean;
12
+ * button?: JSX.Element;
13
+ * onButtonClick?: Function;
14
+ * onMainClick?: Function;
15
+ * className?: string;
16
+ * } & import('react').ComponentPropsWithoutRef<"div"> } BlockletStoreProps
17
+ */
18
+ /**
19
+ * BlockletStore component
20
+ * @param {BlockletStoreProps} props
21
+ * @returns {JSX.Element}
22
+ */
23
+ declare function BlockletStore({ title, did, description, cover, version, button, buttonText, buttonDisabled, buttonLoading, onButtonClick, onMainClick, className, ...rest }: BlockletStoreProps): JSX.Element;
24
+ declare namespace BlockletStore {
25
+ namespace propTypes {
26
+ let title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
27
+ let did: PropTypes.Requireable<string>;
28
+ let description: PropTypes.Requireable<PropTypes.ReactNodeLike>;
29
+ let cover: PropTypes.Requireable<string>;
30
+ let buttonText: PropTypes.Requireable<string>;
31
+ let buttonDisabled: PropTypes.Requireable<boolean>;
32
+ let buttonLoading: PropTypes.Requireable<boolean>;
33
+ let button: PropTypes.Requireable<PropTypes.ReactElementLike>;
34
+ let version: PropTypes.Requireable<string>;
35
+ let onButtonClick: PropTypes.Requireable<(...args: any[]) => any>;
36
+ let onMainClick: PropTypes.Requireable<(...args: any[]) => any>;
37
+ let className: PropTypes.Requireable<string>;
38
+ }
39
+ namespace defaultProps {
40
+ let title_1: string;
41
+ export { title_1 as title };
42
+ let description_1: string;
43
+ export { description_1 as description };
44
+ let cover_1: any;
45
+ export { cover_1 as cover };
46
+ let did_1: any;
47
+ export { did_1 as did };
48
+ let buttonText_1: string;
49
+ export { buttonText_1 as buttonText };
50
+ let buttonDisabled_1: boolean;
51
+ export { buttonDisabled_1 as buttonDisabled };
52
+ let buttonLoading_1: boolean;
53
+ export { buttonLoading_1 as buttonLoading };
54
+ let button_1: any;
55
+ export { button_1 as button };
56
+ let version_1: any;
57
+ export { version_1 as version };
58
+ let onButtonClick_1: any;
59
+ export { onButtonClick_1 as onButtonClick };
60
+ let onMainClick_1: any;
61
+ export { onMainClick_1 as onMainClick };
62
+ let className_1: any;
63
+ export { className_1 as className };
64
+ }
65
+ }
66
+ export default BlockletStore;
67
+ /**
68
+ * BlockletStore component
69
+ */
70
+ export type BlockletStoreProps = {
71
+ title?: string | JSX.Element;
72
+ did?: string;
73
+ description?: string | JSX.Element;
74
+ cover?: string;
75
+ version?: string;
76
+ buttonText?: string;
77
+ buttonDisabled?: boolean;
78
+ buttonLoading?: boolean;
79
+ button?: JSX.Element;
80
+ onButtonClick?: Function;
81
+ onMainClick?: Function;
82
+ className?: string;
83
+ } & import("react").ComponentPropsWithoutRef<"div">;
84
+ import PropTypes from 'prop-types';
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  /* eslint-disable react/no-danger */
2
3
  import { isValidElement } from 'react';
3
4
  import PropTypes from 'prop-types';
@@ -9,7 +10,6 @@ import Button from '../Button';
9
10
  import Img from '../Img';
10
11
  import { useTheme, styled } from '../Theme';
11
12
  import { strippedString } from './utils';
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  const Div = styled('div')`
14
14
  &.arcblock-blocklet {
15
15
  padding: ${props => props.theme.spacing(2)} ${props => props.theme.spacing(2)} 0
@@ -0,0 +1,5 @@
1
+ export default Blocklet;
2
+ import ActionButton from './utils';
3
+ import { strippedString } from './utils';
4
+ import Blocklet from './blocklet';
5
+ export { ActionButton, strippedString };
@@ -0,0 +1,3 @@
1
+ export default ActionButton;
2
+ export function strippedString(originalString?: string): string;
3
+ declare const ActionButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,7 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import PropTypes from 'prop-types';
2
3
  import { useMemoizedFn, useAsyncEffect } from 'ahooks';
3
4
  import { createContext, useContext, useState } from 'react';
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
5
  const BlockletContext = /*#__PURE__*/createContext();
6
6
  const {
7
7
  Provider,
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
2
  import { useRef } from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import Portal from '@mui/material/Portal';
@@ -16,7 +17,6 @@ import { useTheme, styled } from '../Theme';
16
17
  * @param {*} digits
17
18
  * @returns
18
19
  */
19
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
20
20
  function prettySize(_size, digits = 1) {
21
21
  let size = _size;
22
22
  const list = ['', 'k', 'm', 'b'];
@@ -0,0 +1,3 @@
1
+ export default ButtonComponent;
2
+ /** @type {import('./wrap').ButtonComponent} */
3
+ declare const ButtonComponent: import("./wrap").ButtonComponent;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @typedef {import('@mui/material').ButtonProps} MuiButtonProps
3
+ * @typedef {{
4
+ * rounded?: boolean,
5
+ * loading?: boolean,
6
+ * forwardedRef?: import('react').ForwardedRef<any>,
7
+ * color?: MuiButtonProps['color'] | 'reverse' | 'did'
8
+ * } & Omit<MuiButtonProps, 'color'>} ButtonProps
9
+ */
10
+ /**
11
+ * @typedef {React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonProps> & React.RefAttributes<HTMLButtonElement>>} ButtonComponent
12
+ */
13
+ /**
14
+ * @description
15
+ * @export
16
+ * @param {import('@mui/material').ExtendButtonBase<import('@mui/material').ButtonTypeMap<{}, "button">>} BaseComponent
17
+ * @return {ButtonComponent}
18
+ */
19
+ export default function _default(BaseComponent: import("@mui/material").ExtendButtonBase<import("@mui/material").ButtonTypeMap<{}, "button">>): ButtonComponent;
20
+ export type MuiButtonProps = import("@mui/material").ButtonProps;
21
+ export type ButtonProps = {
22
+ rounded?: boolean;
23
+ loading?: boolean;
24
+ forwardedRef?: import("react").ForwardedRef<any>;
25
+ color?: MuiButtonProps["color"] | "reverse" | "did";
26
+ } & Omit<MuiButtonProps, "color">;
27
+ export type ButtonComponent = React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonProps> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  /* eslint-disable prefer-destructuring */
2
3
  /* eslint-disable func-names */
3
4
  import { forwardRef } from 'react';
@@ -5,7 +6,6 @@ import PropTypes from 'prop-types';
5
6
  import CircularProgress from '@mui/material/CircularProgress';
6
7
  import colors from '../Colors';
7
8
  import { mergeProps } from '../Util';
8
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  const extendedColors = {
10
10
  did: {
11
11
  contained: {
@@ -30,12 +30,13 @@ const extendedColors = {
30
30
  };
31
31
 
32
32
  /**
33
+ * @typedef {import('@mui/material').ButtonProps} MuiButtonProps
33
34
  * @typedef {{
34
35
  * rounded?: boolean,
35
36
  * loading?: boolean,
36
37
  * forwardedRef?: import('react').ForwardedRef<any>,
37
- * color?: 'default' | 'inherit' | 'primary' | 'secondary' | 'danger' | 'warning' | 'reverse' | 'did'
38
- * } & import('@mui/material').ButtonProps} ButtonProps
38
+ * color?: MuiButtonProps['color'] | 'reverse' | 'did'
39
+ * } & Omit<MuiButtonProps, 'color'>} ButtonProps
39
40
  */
40
41
 
41
42
  /**
@@ -1,8 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { useState, useEffect, useRef } from 'react';
2
3
  import styled from '@emotion/styled';
3
4
  import PropTypes from 'prop-types';
4
5
  import noop from 'lodash/noop';
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
6
  export default function CardSelector({
7
7
  list,
8
8
  width,
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import PropTypes from 'prop-types';
2
3
  import { styled } from '../Theme';
3
4
 
@@ -6,7 +7,6 @@ import { styled } from '../Theme';
6
7
  * @param {string} relative 容器相对尺寸,默认相对屏幕(screen),可设置为父容器(parent)
7
8
  * @returns react component element
8
9
  */
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
10
  export default function Center({
11
11
  children,
12
12
  relative
@@ -1,10 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import PropTypes from 'prop-types';
2
3
  import Tooltip from '@mui/material/Tooltip';
3
4
  import { green } from '@mui/material/colors';
4
5
  import CopyIcon from '@mui/icons-material/ContentCopy';
5
6
  import CheckIcon from '@mui/icons-material/Check';
6
7
  import useCopy from './hook';
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
8
  export default function CopyButton({
9
9
  content,
10
10
  locale,
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import PropTypes from 'prop-types';
2
3
  import { useSize } from 'ahooks';
3
4
  import Tooltip from '@mui/material/Tooltip';
@@ -5,7 +6,6 @@ import useCopy from './hook';
5
6
  import Toast, { ToastProvider } from '../Toast';
6
7
  import { mergeProps } from '../Util';
7
8
  import { styled } from '../Theme';
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
9
  export { default as CopyButton } from './copy-button';
10
10
  const Container = styled('span')`
11
11
  display: inline;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  /* eslint-disable react/no-danger */
2
3
  import { useState } from 'react';
3
4
  import PropTypes from 'prop-types';
@@ -24,7 +25,6 @@ import CheckIcon from '@mui/icons-material/Check';
24
25
  import colors from '../Colors';
25
26
  import { styled } from '../Theme';
26
27
  import LightBox from './LightBox';
27
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
28
28
  hljs.registerLanguage('javascript', javascript);
29
29
  hljs.registerLanguage('js', javascript);
30
30
  hljs.registerLanguage('jsx', javascript);
@@ -0,0 +1,2 @@
1
+ export { default } from "./themes/default";
2
+ export { default as temp } from "./themes/temp";