@antv/dumi-theme-antv 0.3.0-beta.14 → 0.3.0-beta.16
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.js +1 -1
- package/dist/layouts/entry/Index.js +8 -8
- package/dist/layouts/entry/Manual.js +3 -3
- package/dist/pages/404.js +4 -4
- package/dist/pages/Example/index.js +4 -4
- package/dist/pages/Examples/index.js +3 -3
- package/dist/slots/Article/index.d.ts +3 -0
- package/dist/slots/Article/index.js +11 -0
- package/dist/slots/Article/index.module.less +8 -0
- package/dist/slots/CodeEditor/index.js +1 -1
- package/dist/slots/CodeRunner/index.js +3 -3
- package/dist/slots/{TOC → ContentTable}/index.d.ts +1 -1
- package/dist/slots/{TOC → ContentTable}/index.js +1 -1
- package/dist/slots/{TOC → ContentTable}/index.module.less +0 -0
- package/dist/slots/Header/Search.js +4 -3
- package/dist/slots/ManualContent/index.js +4 -4
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ import { get } from 'lodash-es';
|
|
|
15
15
|
import React, { useContext } from 'react';
|
|
16
16
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
17
17
|
import { ThemeAntVContext } from "../../context";
|
|
18
|
-
import { CodeRunner } from "
|
|
18
|
+
import { CodeRunner } from "dumi/theme/slots/CodeRunner";
|
|
19
19
|
import styles from "./index.module.less";
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -6,13 +6,13 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
6
6
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { useLocale, useSiteData, FormattedMessage } from 'dumi';
|
|
9
|
-
import { SEO } from "
|
|
10
|
-
import { Header } from "
|
|
11
|
-
import { Detail } from
|
|
12
|
-
import { Features } from "
|
|
13
|
-
import { Cases } from "
|
|
14
|
-
import { Companies } from "
|
|
15
|
-
import { Footer } from "
|
|
9
|
+
import { SEO } from "dumi/theme/slots/SEO";
|
|
10
|
+
import { Header } from "dumi/theme/slots/Header";
|
|
11
|
+
import { Detail } from 'dumi/theme/slots/Detail';
|
|
12
|
+
import { Features } from "dumi/theme/slots/Features";
|
|
13
|
+
import { Cases } from "dumi/theme/slots/Cases";
|
|
14
|
+
import { Companies } from "dumi/theme/slots/Companies";
|
|
15
|
+
import { Footer } from "dumi/theme/slots/Footer";
|
|
16
16
|
/**
|
|
17
17
|
* Index 路由下的入口
|
|
18
18
|
* - 获取数据
|
|
@@ -73,7 +73,7 @@ export var Index = function Index() {
|
|
|
73
73
|
lang: locale.id
|
|
74
74
|
}), /*#__PURE__*/React.createElement(Header, null), detail && /*#__PURE__*/React.createElement(Detail, detailProps), features && /*#__PURE__*/React.createElement(Features, featuresProps), cases && /*#__PURE__*/React.createElement(Cases, casesProps), /*#__PURE__*/React.createElement(Companies, {
|
|
75
75
|
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
76
|
-
id: "
|
|
76
|
+
id: isAntVSite ? "2000+ 公司正在使用" : "感谢信赖"
|
|
77
77
|
}),
|
|
78
78
|
companies: companies
|
|
79
79
|
}), /*#__PURE__*/React.createElement(Footer, null));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ManualContent } from "
|
|
3
|
-
import { Header } from "
|
|
4
|
-
import { Footer } from "
|
|
2
|
+
import { ManualContent } from "dumi/theme/slots/ManualContent";
|
|
3
|
+
import { Header } from "dumi/theme/slots/Header";
|
|
4
|
+
import { Footer } from "dumi/theme/slots/Footer";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Manual 路由下的入口
|
package/dist/pages/404.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SEO } from "
|
|
3
|
-
import { Header } from "
|
|
4
|
-
import { NotFound as NotFoundPage } from "
|
|
5
|
-
import { Footer } from "
|
|
2
|
+
import { SEO } from "dumi/theme/slots/SEO";
|
|
3
|
+
import { Header } from "dumi/theme/slots/Header";
|
|
4
|
+
import { NotFound as NotFoundPage } from "dumi/theme/slots/404";
|
|
5
|
+
import { Footer } from "dumi/theme/slots/Footer";
|
|
6
6
|
/**
|
|
7
7
|
* 404 页面
|
|
8
8
|
*/
|
|
@@ -15,10 +15,10 @@ import { useParams, useLocation, useNavigate } from 'react-router-dom';
|
|
|
15
15
|
import { get } from 'lodash-es';
|
|
16
16
|
import { Layout } from 'antd';
|
|
17
17
|
import { useLocale, useSiteData } from 'dumi';
|
|
18
|
-
import { SEO } from "
|
|
19
|
-
import { Header } from "
|
|
20
|
-
import { ExampleSider } from "
|
|
21
|
-
import { CodeRunner } from "
|
|
18
|
+
import { SEO } from "dumi/theme/slots/SEO";
|
|
19
|
+
import { Header } from "dumi/theme/slots/Header";
|
|
20
|
+
import { ExampleSider } from "dumi/theme/slots/ExampleSider";
|
|
21
|
+
import { CodeRunner } from "dumi/theme/slots/CodeRunner";
|
|
22
22
|
import { getDemoInfo } from "../../slots/CodeRunner/utils";
|
|
23
23
|
import { ThemeAntVContext } from "../../context";
|
|
24
24
|
import styles from "./index.module.less";
|
|
@@ -15,9 +15,9 @@ import { useContext, useEffect } from 'react';
|
|
|
15
15
|
import { useNavigate } from 'react-router-dom';
|
|
16
16
|
import { BackTop, Layout as AntLayout } from 'antd';
|
|
17
17
|
import { useLocale } from 'dumi';
|
|
18
|
-
import { SEO } from "
|
|
19
|
-
import { Header } from "
|
|
20
|
-
import { Footer } from "
|
|
18
|
+
import { SEO } from "dumi/theme/slots/SEO";
|
|
19
|
+
import { Header } from "dumi/theme/slots/Header";
|
|
20
|
+
import { Footer } from "dumi/theme/slots/Footer";
|
|
21
21
|
import NavigatorBanner from "../../slots/Header/Products/NavigatorBanner";
|
|
22
22
|
import { VerticalAlignTopOutlined } from '@ant-design/icons';
|
|
23
23
|
import { Article } from "./components/Article";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Layout } from 'antd';
|
|
3
|
+
import styles from "./index.module.less";
|
|
4
|
+
|
|
5
|
+
var Article = function Article(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement(Layout.Content, {
|
|
7
|
+
className: styles.article
|
|
8
|
+
}, /*#__PURE__*/React.createElement("article", props));
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default Article;
|
|
@@ -17,7 +17,7 @@ import { debounce, noop } from 'lodash-es';
|
|
|
17
17
|
import { bind, clear } from 'size-sensor';
|
|
18
18
|
import { replaceInsertCss, execute, compile } from "./utils";
|
|
19
19
|
import { Toolbar, EDITOR_TABS } from "./Toolbar";
|
|
20
|
-
import { Loading } from "
|
|
20
|
+
import { Loading } from "dumi/theme/slots/Loading";
|
|
21
21
|
import styles from "./index.module.less";
|
|
22
22
|
loader.config({
|
|
23
23
|
'vs/nls': {
|
|
@@ -14,11 +14,11 @@ import React, { useState } from 'react';
|
|
|
14
14
|
import { useSiteData, useLocale } from 'dumi';
|
|
15
15
|
import { noop } from 'lodash-es';
|
|
16
16
|
import SplitPane from 'react-split-pane';
|
|
17
|
-
import { CodeEditor } from "
|
|
18
|
-
import { CodePreview } from "
|
|
17
|
+
import { CodeEditor } from "dumi/theme/slots/CodeEditor";
|
|
18
|
+
import { CodePreview } from "dumi/theme/slots/CodePreview";
|
|
19
19
|
import { CodeHeader } from "../CodePreview/CodeHeader";
|
|
20
20
|
import { getDemoInfo } from "./utils";
|
|
21
|
-
import { NotFound } from "
|
|
21
|
+
import { NotFound } from "dumi/theme/slots/404";
|
|
22
22
|
import { ic } from "../hooks";
|
|
23
23
|
|
|
24
24
|
/**
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { SearchOutlined } from '@ant-design/icons';
|
|
3
3
|
import { DocSearch } from '@docsearch/react';
|
|
4
|
-
import { useLocale,
|
|
4
|
+
import { useLocale, useIntl } from 'dumi';
|
|
5
5
|
import '@docsearch/css';
|
|
6
6
|
import styles from "./Search.module.less";
|
|
7
7
|
import 'docsearch.js/dist/cdn/docsearch.min.css';
|
|
@@ -48,6 +48,7 @@ function initDocSearchV2(_ref) {
|
|
|
48
48
|
export var Search = function Search(_ref3) {
|
|
49
49
|
var docsearchOptions = _ref3.docsearchOptions;
|
|
50
50
|
var locale = useLocale();
|
|
51
|
+
var intl = useIntl();
|
|
51
52
|
|
|
52
53
|
var _ref4 = docsearchOptions || {},
|
|
53
54
|
_ref4$apiKey = _ref4.apiKey,
|
|
@@ -84,8 +85,8 @@ export var Search = function Search(_ref3) {
|
|
|
84
85
|
}), /*#__PURE__*/React.createElement("input", {
|
|
85
86
|
className: styles.input,
|
|
86
87
|
id: "search",
|
|
87
|
-
placeholder:
|
|
88
|
-
id:
|
|
88
|
+
placeholder: intl.formatMessage({
|
|
89
|
+
id: '搜索…'
|
|
89
90
|
})
|
|
90
91
|
})));
|
|
91
92
|
};
|
|
@@ -27,11 +27,11 @@ import { useNavigate } from "react-router-dom";
|
|
|
27
27
|
import { EditOutlined, MenuFoldOutlined, MenuUnfoldOutlined, VerticalAlignTopOutlined } from '@ant-design/icons';
|
|
28
28
|
import readingTime from 'reading-time';
|
|
29
29
|
import URI from 'uri-parse';
|
|
30
|
-
import { SEO } from "
|
|
30
|
+
import { SEO } from "dumi/theme/slots/SEO";
|
|
31
31
|
import { getBaseRoute, getIndexRoute, getOpenKeys, getNavigateUrl } from "./utils";
|
|
32
32
|
import { NavigatorBanner } from "./NavigatorBanner";
|
|
33
33
|
import ReadingTime from "./ReadingTime";
|
|
34
|
-
import {
|
|
34
|
+
import { ContentTable } from "dumi/theme/slots/ContentTable";
|
|
35
35
|
import { useScrollToTop } from "../hooks";
|
|
36
36
|
import 'rc-drawer/assets/index.css';
|
|
37
37
|
import styles from "./index.module.less";
|
|
@@ -92,7 +92,7 @@ export var ManualContent = function ManualContent(_ref) {
|
|
|
92
92
|
function fullSidebarDataToMenuData(rootList, hrefId, list) {
|
|
93
93
|
// 递归
|
|
94
94
|
rootList.forEach(function (item) {
|
|
95
|
-
var href = !baseRoute.startsWith('/en') ? "/".concat(item.slug) : "/en/".concat(item.slug);
|
|
95
|
+
var href = (!baseRoute.startsWith('/en') ? "/".concat(item.slug) : "/en/".concat(item.slug)).toLocaleLowerCase();
|
|
96
96
|
var id = href.split("/").slice(0, href.split("/").length - 1).join("/");
|
|
97
97
|
|
|
98
98
|
if (href.includes(baseRoute)) {
|
|
@@ -345,5 +345,5 @@ export var ManualContent = function ManualContent(_ref) {
|
|
|
345
345
|
width: 260
|
|
346
346
|
}, /*#__PURE__*/React.createElement(Affix, {
|
|
347
347
|
className: styles.toc
|
|
348
|
-
}, /*#__PURE__*/React.createElement(
|
|
348
|
+
}, /*#__PURE__*/React.createElement(ContentTable, null))) : /*#__PURE__*/React.createElement("div", null)));
|
|
349
349
|
};
|