@antv/dumi-theme-antv 0.7.3-beta.2 → 0.7.3-beta.3
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/dist/builtins/Playground/index.module.less +0 -3
- package/dist/common/GlobalStyles.js +6 -0
- package/dist/common/styles/Antd.js +9 -0
- package/dist/common/styles/Common.js +9 -0
- package/dist/common/styles/index.js +2 -0
- package/dist/common/styles/variables.less +14 -0
- package/dist/layouts/DocLayout.js +16 -28
- package/dist/pages/Example/index.module.less +1 -4
- package/dist/pages/Examples/index.js +3 -3
- package/dist/pages/Examples/index.module.less +10 -12
- package/dist/pages/Index/components/Cases/index.module.less +2 -2
- package/dist/pages/Index/components/Companies/index.js +5 -17
- package/dist/pages/Index/components/Companies/index.module.less +33 -6
- package/dist/pages/Index/components/Detail/News.module.less +1 -0
- package/dist/pages/Index/components/Detail/index.module.less +1 -25
- package/dist/pages/Index/components/Features/index.js +8 -16
- package/dist/pages/Index/components/Features/index.module.less +21 -23
- package/dist/pages/Index/components/_.less +3 -3
- package/dist/plugin/index.js +0 -10
- package/dist/plugin/remarkFeedback.js +1 -1
- package/dist/slots/Banner/index.module.less +11 -11
- package/dist/slots/CodeEditor/Toolbar.module.less +1 -1
- package/dist/slots/CodeEditor/index.js +5 -1
- package/dist/slots/CodePreview/CodeHeader.js +2 -1
- package/dist/slots/ExampleSider/index.module.less +4 -6
- package/dist/slots/Footer/index.module.less +2 -3
- package/dist/slots/Header/Products/Product.module.less +1 -2
- package/dist/slots/Header/Search/helper.js +1 -0
- package/dist/slots/Header/Search/index.js +1 -3
- package/dist/slots/Header/index.js +28 -24
- package/dist/slots/Header/index.module.less +18 -19
- package/dist/slots/Loading/index.js +11 -4
- package/dist/slots/ManualContent/Main.js +2 -2
- package/dist/slots/ManualContent/index.module.less +11 -14
- package/dist/slots/hooks.js +3 -1
- package/dist/static/style.js +3 -0
- package/package.json +6 -4
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Antd, Common } from "./styles";
|
|
3
|
+
var GlobalStyles = function GlobalStyles() {
|
|
4
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Antd, null), /*#__PURE__*/React.createElement(Common, null));
|
|
5
|
+
};
|
|
6
|
+
export default GlobalStyles;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { css, Global } from '@emotion/react';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export default (function () {
|
|
6
|
+
return /*#__PURE__*/React.createElement(Global, {
|
|
7
|
+
styles: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-btn-text {\n color: rgba(0, 0, 0, 0.85);\n border-color: transparent;\n background: transparent;\n box-shadow: none;\n }\n "])))
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { css, Global } from '@emotion/react';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export default (function () {
|
|
6
|
+
return /*#__PURE__*/React.createElement(Global, {
|
|
7
|
+
styles: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n :root {\n --container-max-width: 1440px;\n --container-padding-large: 80px;\n --container-padding-medium: 80px;\n --container-padding-small: 32px;\n --primary-color: #873bf4;\n --toc-width: 260px;\n --border-color-split: #f0f0f0;\n --text-color-secondary: rgba(0, 0, 0, 0.45);\n --text-color: rgba(0, 0, 0, 0.85);\n --font-family: AlibabaPuHuiTiRHeavy, sans-serif;\n }\n\n @font-face {\n font-family: AlibabaPuHuiTiRHeavy;\n src: url(../../font/Alibaba-PuHuiTi-Heavy.otf);\n }\n\n body {\n margin: 0;\n color: rgba(0, 0, 0, 0.85);\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',\n sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n font-variant: tabular-nums;\n line-height: 1.5715;\n background-color: #fff;\n font-feature-settings: 'tnum';\n text-decoration: none;\n }\n\n a {\n text-decoration: none;\n background-color: transparent;\n outline: none;\n cursor: pointer;\n transition: color 0.3s;\n -webkit-text-decoration-skip: objects;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n > a[aria-hidden]:first-child {\n float: left;\n width: 20px;\n font-size: 0;\n line-height: inherit;\n text-align: right;\n padding-inline-end: 6px;\n margin-inline-start: -20px;\n\n &:hover {\n border: 0;\n }\n\n > .icon-link::before {\n font-size: 20px;\n content: '#';\n }\n }\n\n &:not(:hover) > a[aria-hidden]:first-child > .icon-link {\n visibility: hidden;\n }\n }\n\n /* \u975E\u5E38\u5173\u952E\uFF0C\u7528\u4E8E react-split-pane \u7684\u6837\u5F0F\uFF0C\u5982\u679C\u6CA1\u6709\uFF0C\u4F1A\u6CA1\u6709\u529E\u6CD5\u9F20\u6807\u62D6\u62FD */\n /* \u53C2\u8003\uFF1Ahttps://codesandbox.io/s/mow7x4zyqx */\n .Pane1,\n .Pane2 {\n overflow: auto;\n }\n\n .Resizer {\n z-index: 1;\n box-sizing: border-box;\n background: #000;\n background-clip: padding-box;\n opacity: 0.1;\n\n &:hover {\n transition: all 2s ease;\n }\n\n &.horizontal {\n width: 100%;\n height: 11px;\n margin: -5px 0;\n border-top: 5px solid rgba(255, 255, 255, 0);\n border-bottom: 5px solid rgba(255, 255, 255, 0);\n cursor: row-resize;\n\n &:hover {\n border-top: 5px solid rgba(0, 0, 0, 0.5);\n border-bottom: 5px solid rgba(0, 0, 0, 0.5);\n }\n }\n\n &.vertical {\n width: 11px;\n margin: 0 -5px;\n border-right: 5px solid rgba(255, 255, 255, 0);\n border-left: 5px solid rgba(255, 255, 255, 0);\n cursor: col-resize;\n\n Pane2 {\n border-left: 1px solid #e6e6e6;\n }\n\n &:hover {\n border-right: 5px solid rgba(0, 0, 0, 0.5);\n border-left: 5px solid rgba(0, 0, 0, 0.5);\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n &:hover {\n border-color: transparent;\n }\n }\n }\n\n /* \u6BB5\u843D\u53CD\u9988 Icon */\n .comment-link {\n font-size: 0.8em;\n float: right;\n color: #6d7c92;\n transform: scale(0.9);\n transition: background 0.3s, color 0.3s;\n\n &:hover {\n color: #873bf4;\n background-color: #f8f1ff;\n cursor: pointer;\n border-radius: 2px;\n }\n }\n "])))
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.container1440() {
|
|
2
|
+
width: var(--container-max-width);
|
|
3
|
+
max-width: calc(100% - var(--container-padding-large));
|
|
4
|
+
margin-right: auto;
|
|
5
|
+
margin-left: auto;
|
|
6
|
+
|
|
7
|
+
@media only screen and (max-width: 931.99px) {
|
|
8
|
+
max-width: calc(100% - var(--container-padding-medium));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@media only screen and (max-width: 767.99px) {
|
|
12
|
+
max-width: calc(100% - var(--container-padding-small));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { Helmet, useLocation, useOutlet,
|
|
2
|
-
import
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { default as React, useEffect } from 'react';
|
|
1
|
+
import { Helmet, useLocation, useOutlet, useSiteData } from 'dumi';
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
5
3
|
import { getPurePathname } from "../utils/location";
|
|
6
4
|
import IndexLayout from "./IndexLayout";
|
|
7
5
|
import ManualLayout from "./ManualLayout";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import "../
|
|
11
|
-
import "../slots/_.less";
|
|
6
|
+
import { ConfigProvider } from 'antd';
|
|
7
|
+
import GlobalStyles from "../common/GlobalStyles";
|
|
8
|
+
import "../static/style";
|
|
12
9
|
|
|
13
10
|
/**
|
|
14
11
|
* DocLayout 是 dumi2 的内置 layout 入口,在这里使用页面路径进行区分成自己不同的 Layout。
|
|
@@ -59,27 +56,18 @@ export default (function () {
|
|
|
59
56
|
}
|
|
60
57
|
return outlet;
|
|
61
58
|
}, [purePathname]);
|
|
62
|
-
|
|
63
|
-
// 在服务端渲染时注入 CSS 样式
|
|
64
|
-
useServerInsertedHTML(function () {
|
|
65
|
-
var manifestPath = path.resolve(process.cwd(), 'dist/asset-manifest.json');
|
|
66
|
-
var cssContent = '';
|
|
67
|
-
if (fs.existsSync(manifestPath)) {
|
|
68
|
-
var manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf-8'));
|
|
69
|
-
var cssFile = manifest['umi.css'];
|
|
70
|
-
if (cssFile) {
|
|
71
|
-
var cssPath = path.resolve(process.cwd(), "dist/".concat(cssFile));
|
|
72
|
-
cssContent = fs.existsSync(cssPath) ? fs.readFileSync(cssPath, 'utf-8') : '';
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return /*#__PURE__*/React.createElement("style", {
|
|
76
|
-
dangerouslySetInnerHTML: {
|
|
77
|
-
__html: cssContent
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
59
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Helmet, null, /*#__PURE__*/React.createElement("link", {
|
|
82
60
|
rel: "shortcut icon",
|
|
83
61
|
href: "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*7svFR6wkPMoAAAAAAAAAAAAADmJ7AQ/original"
|
|
84
|
-
})),
|
|
62
|
+
})), /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
63
|
+
theme: {
|
|
64
|
+
token: {
|
|
65
|
+
colorPrimary: '#873bf4',
|
|
66
|
+
borderRadius: 8,
|
|
67
|
+
colorLink: '#873bf4',
|
|
68
|
+
fontSize: 14,
|
|
69
|
+
colorText: 'rgba(0, 0, 0, 0.85)'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}, /*#__PURE__*/React.createElement(GlobalStyles, null), content));
|
|
85
73
|
});
|
|
@@ -5,11 +5,11 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { VerticalAlignTopOutlined } from '@ant-design/icons';
|
|
8
|
-
import { Layout as AntLayout
|
|
8
|
+
import { FloatButton, Layout as AntLayout } from 'antd';
|
|
9
9
|
import React, { lazy, useContext, useEffect } from 'react';
|
|
10
10
|
import { useNavigate } from 'react-router-dom';
|
|
11
|
-
import InViewSuspense from "../../common/InViewSuspense";
|
|
12
11
|
import CommonHelmet from "../../common/CommonHelmet";
|
|
12
|
+
import InViewSuspense from "../../common/InViewSuspense";
|
|
13
13
|
import { ThemeAntVContext } from "../../context";
|
|
14
14
|
import useLocale from "../../hooks/useLocale";
|
|
15
15
|
import Footer from "dumi/theme/slots/Footer";
|
|
@@ -67,7 +67,7 @@ var Examples = function Examples() {
|
|
|
67
67
|
}
|
|
68
68
|
}, /*#__PURE__*/React.createElement(GalleryPageContent, {
|
|
69
69
|
exampleTopics: exampleTopics
|
|
70
|
-
}), /*#__PURE__*/React.createElement(BackTop, {
|
|
70
|
+
}), /*#__PURE__*/React.createElement(FloatButton.BackTop, {
|
|
71
71
|
style: {
|
|
72
72
|
right: 24
|
|
73
73
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import 'antd/es/style/themes/default.less';
|
|
2
|
-
|
|
3
1
|
// 参考 yuque 右侧 tabOfContent 宽度
|
|
4
2
|
@toc-width: 260px;
|
|
5
3
|
|
|
@@ -11,7 +9,7 @@
|
|
|
11
9
|
margin-bottom: 20px;
|
|
12
10
|
font-weight: 500;
|
|
13
11
|
font-size: 30px;
|
|
14
|
-
font-family:
|
|
12
|
+
font-family: var(--font-family);
|
|
15
13
|
line-height: 38px;
|
|
16
14
|
}
|
|
17
15
|
|
|
@@ -32,7 +30,7 @@
|
|
|
32
30
|
clear: both;
|
|
33
31
|
margin: 1em 0 0.3em;
|
|
34
32
|
font-weight: 500;
|
|
35
|
-
font-family:
|
|
33
|
+
font-family: var(--font-family);
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
h3 {
|
|
@@ -40,7 +38,7 @@
|
|
|
40
38
|
margin-bottom: 4px;
|
|
41
39
|
font-weight: 600;
|
|
42
40
|
line-height: 30px;
|
|
43
|
-
border-bottom: 1px solid
|
|
41
|
+
border-bottom: 1px solid var(--border-color-split);
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
h4 {
|
|
@@ -61,7 +59,7 @@
|
|
|
61
59
|
clear: both;
|
|
62
60
|
height: 1px;
|
|
63
61
|
margin: 56px 0;
|
|
64
|
-
background:
|
|
62
|
+
background: var(--border-color-split);
|
|
65
63
|
border: 0;
|
|
66
64
|
}
|
|
67
65
|
|
|
@@ -145,7 +143,7 @@
|
|
|
145
143
|
width: 100%;
|
|
146
144
|
margin: 24px 0;
|
|
147
145
|
empty-cells: show;
|
|
148
|
-
border: 1px solid
|
|
146
|
+
border: 1px solid var(--border-color-split);
|
|
149
147
|
border-collapse: collapse;
|
|
150
148
|
border-spacing: 0;
|
|
151
149
|
|
|
@@ -164,7 +162,7 @@
|
|
|
164
162
|
table td {
|
|
165
163
|
padding: 4px 12px;
|
|
166
164
|
text-align: left;
|
|
167
|
-
border: 1px solid
|
|
165
|
+
border: 1px solid var(--border-color-split);
|
|
168
166
|
line-height: 24px;
|
|
169
167
|
}
|
|
170
168
|
|
|
@@ -182,9 +180,9 @@
|
|
|
182
180
|
blockquote {
|
|
183
181
|
margin: 0.5em 0;
|
|
184
182
|
padding-left: 0.8em;
|
|
185
|
-
color:
|
|
183
|
+
color: var(--text-color-secondary);
|
|
186
184
|
font-size: 90%;
|
|
187
|
-
border-left: 4px solid
|
|
185
|
+
border-left: 4px solid var(--border-color-split);
|
|
188
186
|
}
|
|
189
187
|
|
|
190
188
|
blockquote p {
|
|
@@ -266,7 +264,7 @@
|
|
|
266
264
|
white-space: nowrap;
|
|
267
265
|
|
|
268
266
|
a {
|
|
269
|
-
color:
|
|
267
|
+
color: var(--text-color);
|
|
270
268
|
}
|
|
271
269
|
}
|
|
272
270
|
}
|
|
@@ -382,7 +380,7 @@
|
|
|
382
380
|
}
|
|
383
381
|
|
|
384
382
|
> div {
|
|
385
|
-
border: 1px solid
|
|
383
|
+
border: 1px solid var(--border-color-split);
|
|
386
384
|
border-radius: 6px;
|
|
387
385
|
overflow: hidden;
|
|
388
386
|
height: calc(100vw / 9 - 20px);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../../../../common/styles/variables.less';
|
|
2
2
|
|
|
3
3
|
.wrapper {
|
|
4
4
|
height: 667px;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
margin: 20px 0 0 0;
|
|
57
57
|
|
|
58
58
|
.detail {
|
|
59
|
-
color:
|
|
59
|
+
color: var(--primary-color);
|
|
60
60
|
font-size: 1em;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Col, Row } from 'antd';
|
|
2
1
|
import cx from 'classnames';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import styles from "./index.module.less";
|
|
@@ -13,30 +12,19 @@ export var Companies = function Companies(_ref) {
|
|
|
13
12
|
style: style
|
|
14
13
|
}, /*#__PURE__*/React.createElement("div", {
|
|
15
14
|
key: "content",
|
|
16
|
-
className: styles.content
|
|
15
|
+
className: cx(styles.content, 'container1440')
|
|
17
16
|
}, /*#__PURE__*/React.createElement("p", {
|
|
18
17
|
key: "title",
|
|
19
18
|
className: styles.title
|
|
20
19
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
21
20
|
key: "companies-container",
|
|
22
21
|
className: styles.companiesContainer
|
|
23
|
-
}, /*#__PURE__*/React.createElement(
|
|
24
|
-
|
|
25
|
-
gutter: [{
|
|
26
|
-
xs: 77,
|
|
27
|
-
sm: 77,
|
|
28
|
-
md: 50,
|
|
29
|
-
lg: 124
|
|
30
|
-
}, 10],
|
|
31
|
-
wrap: true,
|
|
32
|
-
className: styles.companies
|
|
22
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: styles.companiesGrid
|
|
33
24
|
}, companies.map(function (company) {
|
|
34
|
-
return /*#__PURE__*/React.createElement(
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
35
26
|
key: company.name,
|
|
36
|
-
className: styles.company
|
|
37
|
-
md: 6,
|
|
38
|
-
sm: 8,
|
|
39
|
-
xs: 12
|
|
27
|
+
className: styles.company
|
|
40
28
|
}, /*#__PURE__*/React.createElement("img", {
|
|
41
29
|
className: styles.companyimg,
|
|
42
30
|
src: company.img,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../../../../common/styles/variables.less';
|
|
2
2
|
|
|
3
3
|
.wrapper {
|
|
4
4
|
display: flex;
|
|
@@ -31,15 +31,42 @@
|
|
|
31
31
|
position: relative;
|
|
32
32
|
margin: auto;
|
|
33
33
|
margin-top: 48px;
|
|
34
|
+
}
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
.companiesGrid {
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-template-columns: repeat(4, 1fr);
|
|
39
|
+
gap: 10px 124px;
|
|
40
|
+
width: 100%;
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
@media only screen and (max-width: 992px) {
|
|
43
|
+
grid-template-columns: repeat(4, 1fr);
|
|
44
|
+
gap: 10px 50px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media only screen and (max-width: 768px) {
|
|
48
|
+
grid-template-columns: repeat(3, 1fr);
|
|
49
|
+
gap: 10px 77px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@media only screen and (max-width: 576px) {
|
|
53
|
+
grid-template-columns: repeat(2, 1fr);
|
|
54
|
+
gap: 10px 77px;
|
|
41
55
|
}
|
|
42
56
|
}
|
|
57
|
+
|
|
58
|
+
.company {
|
|
59
|
+
display: flex;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
align-items: center;
|
|
62
|
+
padding: 12px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.companyimg {
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: auto;
|
|
68
|
+
object-fit: contain;
|
|
69
|
+
}
|
|
43
70
|
}
|
|
44
71
|
|
|
45
72
|
@media (max-width: 768px) {
|
|
@@ -1,28 +1,4 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
|
|
3
|
-
@font-face {
|
|
4
|
-
font-family: AlibabaPuHuiTiRHeavy;
|
|
5
|
-
src: url(../../font/Alibaba-PuHuiTi-Heavy.otf);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.container1440() {
|
|
9
|
-
width: 1440px;
|
|
10
|
-
max-width: calc(100% - 80px);
|
|
11
|
-
margin-left: auto;
|
|
12
|
-
margin-right: auto;
|
|
13
|
-
|
|
14
|
-
@media only screen and (max-width: 931.99px) {
|
|
15
|
-
& {
|
|
16
|
-
max-width: calc(100% - 60px);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@media only screen and (max-width: 767.99px) {
|
|
21
|
-
& {
|
|
22
|
-
max-width: calc(100% - 32px);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
@import '../../../../common/styles/variables.less';
|
|
26
2
|
|
|
27
3
|
.wrapper {
|
|
28
4
|
min-height: 650px;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Col, Row } from 'antd';
|
|
2
1
|
import cx from 'classnames';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { ic } from "../../../../slots/hooks";
|
|
@@ -11,17 +10,6 @@ export var Features = function Features(_ref) {
|
|
|
11
10
|
className = _ref.className,
|
|
12
11
|
style = _ref.style,
|
|
13
12
|
id = _ref.id;
|
|
14
|
-
var getCards = function getCards() {
|
|
15
|
-
var children = features.map(function (card) {
|
|
16
|
-
return /*#__PURE__*/React.createElement(Col, {
|
|
17
|
-
className: styles.cardWrapper,
|
|
18
|
-
key: ic(card.title),
|
|
19
|
-
md: 8,
|
|
20
|
-
xs: 24
|
|
21
|
-
}, /*#__PURE__*/React.createElement(FeatureCard, card));
|
|
22
|
-
});
|
|
23
|
-
return children;
|
|
24
|
-
};
|
|
25
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
26
14
|
id: id,
|
|
27
15
|
className: cx(styles.wrapper, className),
|
|
@@ -36,8 +24,12 @@ export var Features = function Features(_ref) {
|
|
|
36
24
|
}, title ? ic(title) : ''), /*#__PURE__*/React.createElement("div", {
|
|
37
25
|
key: "block",
|
|
38
26
|
className: styles.cardsContainer
|
|
39
|
-
}, /*#__PURE__*/React.createElement(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: styles.cardsGrid
|
|
29
|
+
}, features.map(function (card) {
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
key: ic(card.title),
|
|
32
|
+
className: styles.cardWrapper
|
|
33
|
+
}, /*#__PURE__*/React.createElement(FeatureCard, card));
|
|
34
|
+
}))))));
|
|
43
35
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../../../../common/styles/variables.less';
|
|
2
2
|
|
|
3
3
|
.wrapper {
|
|
4
4
|
display: flex;
|
|
@@ -34,32 +34,30 @@
|
|
|
34
34
|
width: 100%;
|
|
35
35
|
height: 65%;
|
|
36
36
|
position: relative;
|
|
37
|
+
margin-top: 48px;
|
|
38
|
+
}
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
flex-wrap: wrap;
|
|
44
|
-
box-sizing: border-box;
|
|
45
|
-
padding: 0 4.5%;
|
|
46
|
-
|
|
47
|
-
.cardWrapper {
|
|
48
|
-
margin: 48px 0 30px 0;
|
|
49
|
-
background-color: #ffffff;
|
|
50
|
-
border: 1px solid #e5e8ef;
|
|
51
|
-
box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.03);
|
|
52
|
-
border-radius: 16px;
|
|
53
|
-
overflow: hidden;
|
|
54
|
-
margin-right: 29px;
|
|
55
|
-
flex: 1;
|
|
40
|
+
.cardsGrid {
|
|
41
|
+
display: grid;
|
|
42
|
+
grid-template-columns: repeat(3, 1fr);
|
|
43
|
+
gap: 24px;
|
|
44
|
+
width: 100%;
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
}
|
|
46
|
+
@media only screen and (max-width: 768px) {
|
|
47
|
+
grid-template-columns: 1fr;
|
|
61
48
|
}
|
|
62
49
|
}
|
|
50
|
+
|
|
51
|
+
.cardWrapper {
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
width: 100%;
|
|
55
|
+
background-color: #ffffff;
|
|
56
|
+
border: 1px solid #e5e8ef;
|
|
57
|
+
box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.03);
|
|
58
|
+
border-radius: 16px;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
63
61
|
}
|
|
64
62
|
|
|
65
63
|
@media (max-width: 900px) {
|
package/dist/plugin/index.js
CHANGED
|
@@ -47,16 +47,6 @@ var plugin_default = (api) => {
|
|
|
47
47
|
api.describe({ key: `dumi-theme:${require("../../package.json").name}` });
|
|
48
48
|
api.modifyDefaultConfig((memo) => {
|
|
49
49
|
memo.resolve.codeBlockMode = "passive";
|
|
50
|
-
memo.chainWebpack = (memo2) => {
|
|
51
|
-
memo2.module.rule("less").test(/\.less$/).use("style-loader").loader("style-loader").before("css-loader").end().use("css-loader").loader("css-loader").options({
|
|
52
|
-
importLoaders: 1,
|
|
53
|
-
modules: { auto: true }
|
|
54
|
-
// 启用 CSS Modules(可选)
|
|
55
|
-
}).end().use("less-loader").loader("less-loader").options({
|
|
56
|
-
javascriptEnabled: true
|
|
57
|
-
});
|
|
58
|
-
return memo2;
|
|
59
|
-
};
|
|
60
50
|
memo.exportStatic = {};
|
|
61
51
|
memo.exportStatic.extraRoutePaths = (0, import_examples.getExamplePaths)();
|
|
62
52
|
memo.mfsu = false;
|
|
@@ -41,7 +41,7 @@ function remarkFeedback() {
|
|
|
41
41
|
return (tree) => {
|
|
42
42
|
visit(tree, "heading", (node) => {
|
|
43
43
|
const headingText = node.children.filter((child) => child.type === "text").map((child) => child.value).join(" ").split(" ").join("-");
|
|
44
|
-
const template = `<button title="Post a comment" data-feedback-hash=${headingText} type="button" class="ant-btn ant-btn-text ant-btn-icon-only button comment-link
|
|
44
|
+
const template = `<button title="Post a comment" data-feedback-hash=${headingText} type="button" class="ant-btn ant-btn-text ant-btn-icon-only button comment-link">${icon}</button>`;
|
|
45
45
|
const button = {
|
|
46
46
|
type: "html",
|
|
47
47
|
value: template
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../../../../common/styles/variables.less';
|
|
2
2
|
|
|
3
3
|
.wrapper {
|
|
4
4
|
min-height: 650px;
|
|
@@ -56,26 +56,26 @@
|
|
|
56
56
|
z-index: 10;
|
|
57
57
|
position: relative;
|
|
58
58
|
transition: all 0.3s;
|
|
59
|
-
border: 1px solid
|
|
60
|
-
color:
|
|
59
|
+
border: 1px solid var(--primary-color);
|
|
60
|
+
color: var(--primary-color);
|
|
61
61
|
background: transparent;
|
|
62
62
|
text-align: center;
|
|
63
63
|
font-size: 1.14em;
|
|
64
64
|
line-height: 40px;
|
|
65
65
|
|
|
66
66
|
&:hover {
|
|
67
|
-
color: tint(
|
|
68
|
-
border: 1px solid tint(
|
|
69
|
-
background-color: fade(
|
|
67
|
+
color: tint(var(--primary-color), 25%);
|
|
68
|
+
border: 1px solid tint(var(--primary-color), 25%);
|
|
69
|
+
background-color: fade(var(--primary-color), 3%);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
&.primary {
|
|
73
73
|
border: none;
|
|
74
74
|
outline: none;
|
|
75
75
|
color: #fff;
|
|
76
|
-
background: linear-gradient(60deg, fade(
|
|
76
|
+
background: linear-gradient(60deg, fade(var(--primary-color), 70%), shade(var(--primary-color), 20%));
|
|
77
77
|
opacity: 0.8;
|
|
78
|
-
box-shadow: 0 8px 10px fade(
|
|
78
|
+
box-shadow: 0 8px 10px fade(var(--primary-color), 20%);
|
|
79
79
|
|
|
80
80
|
&:hover {
|
|
81
81
|
opacity: 1;
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
width: 40px;
|
|
93
93
|
height: 40px;
|
|
94
94
|
background-size: contain;
|
|
95
|
-
border: 1px solid
|
|
95
|
+
border: 1px solid var(--primary-color);
|
|
96
96
|
border-radius: 20px;
|
|
97
97
|
transition: all 0.15s;
|
|
98
98
|
display: flex;
|
|
@@ -102,14 +102,14 @@
|
|
|
102
102
|
.videoButtonIcon {
|
|
103
103
|
margin-left: 12px;
|
|
104
104
|
font-size: 16px;
|
|
105
|
-
color:
|
|
105
|
+
color: var(--primary-color);
|
|
106
106
|
line-height: 44px;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
.videoButtonText {
|
|
110
110
|
line-height: 40px;
|
|
111
111
|
margin-left: 10px;
|
|
112
|
-
color:
|
|
112
|
+
color: var(--primary-color);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
&:hover {
|
|
@@ -413,7 +413,11 @@ var CodeEditor = function CodeEditor(_ref) {
|
|
|
413
413
|
value: valueOf(tab),
|
|
414
414
|
defaultValue: defaultOf(tab),
|
|
415
415
|
path: "".concat(tab, "_").concat(relativePath || exampleId),
|
|
416
|
-
loading: /*#__PURE__*/React.createElement(Loading,
|
|
416
|
+
loading: /*#__PURE__*/React.createElement(Loading, {
|
|
417
|
+
style: {
|
|
418
|
+
height: 'calc(100vh - 128px)'
|
|
419
|
+
}
|
|
420
|
+
}),
|
|
417
421
|
options: {
|
|
418
422
|
readOnly: tab === EDITOR_TABS.DATA || tab === EDITOR_TABS.SPEC,
|
|
419
423
|
automaticLayout: true,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import '~antd/es/style/themes/default.less';
|
|
2
|
-
|
|
3
1
|
.shadowWrapper {
|
|
4
2
|
position: relative;
|
|
5
3
|
margin-bottom: 12px;
|
|
@@ -60,7 +58,7 @@
|
|
|
60
58
|
}
|
|
61
59
|
|
|
62
60
|
&:hover {
|
|
63
|
-
border-color:
|
|
61
|
+
border-color: var(--primary-color);
|
|
64
62
|
|
|
65
63
|
&:before {
|
|
66
64
|
transition: all 0.3s;
|
|
@@ -70,7 +68,7 @@
|
|
|
70
68
|
bottom: -1px;
|
|
71
69
|
right: -1px;
|
|
72
70
|
left: -1px;
|
|
73
|
-
background-color: fade(
|
|
71
|
+
background-color: fade(#873bf4, 10%);
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
|
|
@@ -98,8 +96,8 @@
|
|
|
98
96
|
}
|
|
99
97
|
|
|
100
98
|
&.current::after {
|
|
101
|
-
background-color: fade(
|
|
102
|
-
border-color:
|
|
99
|
+
background-color: fade(#873bf4, 10%);
|
|
100
|
+
border-color: #873bf4;
|
|
103
101
|
}
|
|
104
102
|
}
|
|
105
103
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
@import '../_.less';
|
|
1
|
+
@import '../../common/styles/variables.less';
|
|
3
2
|
|
|
4
3
|
.footer {
|
|
5
|
-
font-family:
|
|
4
|
+
font-family: var(--font-family);
|
|
6
5
|
|
|
7
6
|
:global(.rc-footer-container),
|
|
8
7
|
:global(.rc-footer-bottom-container) {
|
|
@@ -56,9 +56,7 @@ export var Search = function Search() {
|
|
|
56
56
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
57
57
|
open: open,
|
|
58
58
|
placement: "topLeft",
|
|
59
|
-
destroyTooltipOnHide:
|
|
60
|
-
keepParent: false
|
|
61
|
-
},
|
|
59
|
+
destroyTooltipOnHide: false,
|
|
62
60
|
content: /*#__PURE__*/React.createElement(SearchResult, {
|
|
63
61
|
results: searchResults
|
|
64
62
|
})
|
|
@@ -14,7 +14,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
14
14
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import { CaretDownFilled, DownOutlined, GithubOutlined, LinkOutlined, MenuOutlined, WechatOutlined } from '@ant-design/icons';
|
|
17
|
-
import { Alert, Button, Dropdown, Menu, Modal, Popover
|
|
17
|
+
import { Alert, Button, Dropdown, Menu, Modal, Popover } from 'antd';
|
|
18
18
|
import cx from 'classnames';
|
|
19
19
|
import { FormattedMessage, Link, useLocale, useSiteData } from 'dumi';
|
|
20
20
|
import { get, map, size } from 'lodash-es';
|
|
@@ -311,24 +311,27 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
311
311
|
rootDomain: rootDomain,
|
|
312
312
|
language: defaultLanguage
|
|
313
313
|
})), /** 版本列表 */
|
|
314
|
-
versions && /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(
|
|
315
|
-
defaultValue: versions[findVersion(version, Object.keys(versions))],
|
|
314
|
+
versions && /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
316
315
|
className: styles.versions,
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
316
|
+
menu: {
|
|
317
|
+
items: Object.keys(versions).map(function (version) {
|
|
318
|
+
return {
|
|
319
|
+
label: /*#__PURE__*/React.createElement("a", {
|
|
320
|
+
target: "_blank",
|
|
321
|
+
rel: "noreferrer",
|
|
322
|
+
href: versions[version]
|
|
323
|
+
}, version),
|
|
324
|
+
key: version
|
|
325
|
+
};
|
|
326
|
+
}),
|
|
327
|
+
selectable: true,
|
|
328
|
+
defaultSelectedKeys: [findVersion(version, Object.keys(versions))]
|
|
321
329
|
}
|
|
322
|
-
}, Object.keys(versions).
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
326
|
-
key: url,
|
|
327
|
-
value: url
|
|
328
|
-
}, version);
|
|
330
|
+
}, /*#__PURE__*/React.createElement("span", null, findVersion(version, Object.keys(versions)), /*#__PURE__*/React.createElement(DownOutlined, {
|
|
331
|
+
style: {
|
|
332
|
+
marginLeft: '6px'
|
|
329
333
|
}
|
|
330
|
-
|
|
331
|
-
}))), /** 切换网站语言 */
|
|
334
|
+
})))), /** 切换网站语言 */
|
|
332
335
|
showLanguageSwitcher && /*#__PURE__*/React.createElement("li", {
|
|
333
336
|
className: cx(styles.navIcon, styles.languageSwitcher)
|
|
334
337
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
@@ -353,13 +356,14 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
353
356
|
alt: "wx-qrcode"
|
|
354
357
|
}),
|
|
355
358
|
title: "\u5FAE\u4FE1\u626B\u4E00\u626B\u5173\u6CE8",
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
359
|
+
styles: {
|
|
360
|
+
body: {
|
|
361
|
+
padding: 2
|
|
362
|
+
},
|
|
363
|
+
root: {
|
|
364
|
+
width: 128,
|
|
365
|
+
height: 128
|
|
366
|
+
}
|
|
363
367
|
}
|
|
364
368
|
}, /*#__PURE__*/React.createElement(WechatOutlined, null))), /** GitHub icon */
|
|
365
369
|
showGithubCorner && /*#__PURE__*/React.createElement("li", {
|
|
@@ -386,7 +390,7 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
386
390
|
showIcon: false,
|
|
387
391
|
onClose: onBannerClose
|
|
388
392
|
}), /*#__PURE__*/React.createElement("div", {
|
|
389
|
-
className: styles.container
|
|
393
|
+
className: cx(styles.container)
|
|
390
394
|
}, /*#__PURE__*/React.createElement("div", {
|
|
391
395
|
className: styles.left
|
|
392
396
|
}, /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement("a", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../../common/styles/variables.less';
|
|
2
2
|
|
|
3
3
|
@nav-height: 64px;
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
padding: 0;
|
|
9
9
|
position: relative;
|
|
10
10
|
z-index: 200;
|
|
11
|
-
font-family:
|
|
11
|
+
font-family: var(--font-family);
|
|
12
12
|
transition: box-shadow 0.3s, background 0.3s;
|
|
13
13
|
|
|
14
14
|
&.transparent {
|
|
@@ -203,10 +203,10 @@
|
|
|
203
203
|
box-shadow: 0 2px 0 transparent inset;
|
|
204
204
|
|
|
205
205
|
&.activeItem {
|
|
206
|
-
box-shadow: 0 2px 0
|
|
206
|
+
box-shadow: 0 2px 0 var(--primary-color) inset;
|
|
207
207
|
|
|
208
208
|
a {
|
|
209
|
-
color:
|
|
209
|
+
color: var(--primary-color);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
display: block;
|
|
217
217
|
|
|
218
218
|
&:hover {
|
|
219
|
-
color:
|
|
219
|
+
color: var(--primary-color);
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
|
|
236
236
|
&:hover {
|
|
237
237
|
& {
|
|
238
|
-
color:
|
|
238
|
+
color: var(--primary-color);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
svg {
|
|
@@ -281,27 +281,26 @@
|
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
&:hover {
|
|
284
|
-
fill:
|
|
284
|
+
fill: var(--primary-color);
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
.versions {
|
|
289
|
-
|
|
290
|
-
margin-right: -16px;
|
|
289
|
+
cursor: pointer;
|
|
291
290
|
transition: all 0.3s;
|
|
292
291
|
|
|
293
|
-
|
|
294
|
-
.
|
|
295
|
-
transition: all 0.3s;
|
|
296
|
-
font-size: 10px;
|
|
297
|
-
}
|
|
292
|
+
svg {
|
|
293
|
+
opacity: 0.3;
|
|
298
294
|
}
|
|
299
295
|
|
|
300
296
|
&:hover {
|
|
301
|
-
|
|
297
|
+
& {
|
|
298
|
+
color: var(--primary-color);
|
|
299
|
+
}
|
|
302
300
|
|
|
303
|
-
|
|
304
|
-
color:
|
|
301
|
+
svg {
|
|
302
|
+
color: #697b8c;
|
|
303
|
+
opacity: 0.5;
|
|
305
304
|
}
|
|
306
305
|
}
|
|
307
306
|
}
|
|
@@ -339,10 +338,10 @@
|
|
|
339
338
|
|
|
340
339
|
&.activeItem {
|
|
341
340
|
box-shadow: none;
|
|
342
|
-
background: tint(
|
|
341
|
+
background: tint(#873bf4, 90%);
|
|
343
342
|
|
|
344
343
|
a {
|
|
345
|
-
color:
|
|
344
|
+
color: var(--primary-color);
|
|
346
345
|
}
|
|
347
346
|
}
|
|
348
347
|
|
|
@@ -1,16 +1,23 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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
7
|
import React from 'react';
|
|
2
8
|
import styles from "./index.module.less";
|
|
3
9
|
|
|
4
10
|
/**
|
|
5
11
|
* Loading
|
|
6
12
|
*/
|
|
7
|
-
var Loading = function Loading() {
|
|
13
|
+
var Loading = function Loading(_ref) {
|
|
14
|
+
var style = _ref.style;
|
|
8
15
|
return /*#__PURE__*/React.createElement("div", {
|
|
9
|
-
style: {
|
|
16
|
+
style: _objectSpread({
|
|
10
17
|
position: 'relative',
|
|
11
|
-
height: '
|
|
18
|
+
height: '100vh',
|
|
12
19
|
width: '100%'
|
|
13
|
-
}
|
|
20
|
+
}, style)
|
|
14
21
|
}, /*#__PURE__*/React.createElement("div", {
|
|
15
22
|
className: styles.loading
|
|
16
23
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VerticalAlignTopOutlined } from '@ant-design/icons';
|
|
2
|
-
import {
|
|
2
|
+
import { FloatButton, Layout } from 'antd';
|
|
3
3
|
import { useRouteMeta } from 'dumi';
|
|
4
4
|
import React, { lazy } from 'react';
|
|
5
5
|
import { useMedia } from 'react-use';
|
|
@@ -44,7 +44,7 @@ export var Main = function Main(_ref) {
|
|
|
44
44
|
style: {
|
|
45
45
|
marginTop: '40px'
|
|
46
46
|
}
|
|
47
|
-
}, /*#__PURE__*/React.createElement(Feedback, null)), /*#__PURE__*/React.createElement(PrevAndNext, null)), /*#__PURE__*/React.createElement(BackTop, {
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Feedback, null)), /*#__PURE__*/React.createElement(PrevAndNext, null)), /*#__PURE__*/React.createElement(FloatButton.BackTop, {
|
|
48
48
|
style: {
|
|
49
49
|
right: 24
|
|
50
50
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
@import '~antd/es/style/themes/default.less';
|
|
2
|
-
@import '../_.less';
|
|
3
|
-
|
|
4
1
|
// 参考 yuque 右侧 tabOfContent 宽度
|
|
5
2
|
@toc-width: 260px;
|
|
6
3
|
|
|
@@ -22,7 +19,7 @@
|
|
|
22
19
|
margin-bottom: 20px;
|
|
23
20
|
font-weight: 500;
|
|
24
21
|
font-size: 30px;
|
|
25
|
-
font-family: Avenir,
|
|
22
|
+
font-family: Avenir, var(--font-family), sans-serif;
|
|
26
23
|
line-height: 38px;
|
|
27
24
|
}
|
|
28
25
|
|
|
@@ -43,7 +40,7 @@
|
|
|
43
40
|
clear: both;
|
|
44
41
|
margin: 1em 0 0.3em;
|
|
45
42
|
font-weight: 500;
|
|
46
|
-
font-family: Avenir,
|
|
43
|
+
font-family: Avenir, var(--font-family), sans-serif;
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
h3 {
|
|
@@ -51,7 +48,7 @@
|
|
|
51
48
|
margin-bottom: 4px;
|
|
52
49
|
font-weight: 600;
|
|
53
50
|
line-height: 30px;
|
|
54
|
-
border-bottom: 1px solid
|
|
51
|
+
border-bottom: 1px solid var(--border-color-split);
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
h4 {
|
|
@@ -72,7 +69,7 @@
|
|
|
72
69
|
clear: both;
|
|
73
70
|
height: 1px;
|
|
74
71
|
margin: 56px 0;
|
|
75
|
-
background:
|
|
72
|
+
background: var(--border-color-split);
|
|
76
73
|
border: 0;
|
|
77
74
|
}
|
|
78
75
|
|
|
@@ -164,7 +161,7 @@
|
|
|
164
161
|
width: 100%;
|
|
165
162
|
margin: 24px 0;
|
|
166
163
|
empty-cells: show;
|
|
167
|
-
border: 1px solid
|
|
164
|
+
border: 1px solid var(--border-color-split);
|
|
168
165
|
border-collapse: collapse;
|
|
169
166
|
border-spacing: 0;
|
|
170
167
|
|
|
@@ -183,7 +180,7 @@
|
|
|
183
180
|
table td {
|
|
184
181
|
padding: 4px 12px;
|
|
185
182
|
text-align: left;
|
|
186
|
-
border: 1px solid
|
|
183
|
+
border: 1px solid var(--border-color-split);
|
|
187
184
|
line-height: 24px;
|
|
188
185
|
}
|
|
189
186
|
|
|
@@ -201,9 +198,9 @@
|
|
|
201
198
|
blockquote {
|
|
202
199
|
margin: 0.5em 0;
|
|
203
200
|
padding-left: 0.8em;
|
|
204
|
-
color:
|
|
201
|
+
color: var(--text-color-secondary);
|
|
205
202
|
font-size: 90%;
|
|
206
|
-
border-left: 4px solid
|
|
203
|
+
border-left: 4px solid var(--border-color-split);
|
|
207
204
|
}
|
|
208
205
|
|
|
209
206
|
blockquote p {
|
|
@@ -273,7 +270,7 @@
|
|
|
273
270
|
white-space: nowrap;
|
|
274
271
|
|
|
275
272
|
a {
|
|
276
|
-
color:
|
|
273
|
+
color: var(--text-color);
|
|
277
274
|
}
|
|
278
275
|
}
|
|
279
276
|
}
|
|
@@ -409,7 +406,7 @@
|
|
|
409
406
|
margin: 12px;
|
|
410
407
|
|
|
411
408
|
> div {
|
|
412
|
-
border: 1px solid
|
|
409
|
+
border: 1px solid var(--border-color-split);
|
|
413
410
|
border-radius: 6px;
|
|
414
411
|
overflow: hidden;
|
|
415
412
|
height: calc(100vw / 9 - 20px);
|
|
@@ -600,7 +597,7 @@
|
|
|
600
597
|
:global(.ant-anchor-ink-ball) {
|
|
601
598
|
width: 2px;
|
|
602
599
|
height: 24px;
|
|
603
|
-
background-color:
|
|
600
|
+
background-color: var(--primary-color);
|
|
604
601
|
border: none;
|
|
605
602
|
border-radius: 0;
|
|
606
603
|
transform: translateX(-50%) translateY(-8px);
|
package/dist/slots/hooks.js
CHANGED
|
@@ -21,7 +21,9 @@ export var useChinaMirrorHost = function useChinaMirrorHost() {
|
|
|
21
21
|
return [isChinaMirrorHost];
|
|
22
22
|
};
|
|
23
23
|
export var useScrollToTop = function useScrollToTop() {
|
|
24
|
-
|
|
24
|
+
if (typeof document !== 'undefined') {
|
|
25
|
+
document.body.scrollTop = document.documentElement.scrollTop = 0;
|
|
26
|
+
}
|
|
25
27
|
};
|
|
26
28
|
export var useLogoLink = function useLogoLink(_ref) {
|
|
27
29
|
var _ref$link = _ref.link,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/dumi-theme-antv",
|
|
3
|
-
"version": "0.7.3-beta.
|
|
3
|
+
"version": "0.7.3-beta.3",
|
|
4
4
|
"description": "AntV website theme based on dumi2.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dumi",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@ant-design/icons": "^4.8.3",
|
|
47
|
+
"@ant-design/pro-components": "^2.8.7",
|
|
47
48
|
"@babel/plugin-syntax-unicode-sets-regex": "^7.18.6",
|
|
48
49
|
"@babel/standalone": "^7.26.2",
|
|
49
50
|
"@docsearch/css": "^3.8.0",
|
|
@@ -51,7 +52,8 @@
|
|
|
51
52
|
"@monaco-editor/react": "^4.6.0",
|
|
52
53
|
"@petercatai/assistant": "^2.0.24",
|
|
53
54
|
"@stackblitz/sdk": "^1.11.0",
|
|
54
|
-
"antd": "^
|
|
55
|
+
"antd": "^5.24.5",
|
|
56
|
+
"antd-style": "^3.7.1",
|
|
55
57
|
"chalk": "^4.1.2",
|
|
56
58
|
"cheerio": "^1.0.0-rc.12",
|
|
57
59
|
"classnames": "^2.5.1",
|
|
@@ -73,8 +75,8 @@
|
|
|
73
75
|
"parse-github-url": "^1.0.3",
|
|
74
76
|
"rc-drawer": "^4.4.3",
|
|
75
77
|
"rc-footer": "^0.6.8",
|
|
76
|
-
"react": "
|
|
77
|
-
"react-dom": "
|
|
78
|
+
"react": "18.3.0-canary-c3048aab4-20240326",
|
|
79
|
+
"react-dom": "18.3.0-canary-c3048aab4-20240326",
|
|
78
80
|
"react-error-boundary": "^3.1.4",
|
|
79
81
|
"react-github-button": "^0.1.11",
|
|
80
82
|
"react-intersection-observer": "^9.16.0",
|