@antv/dumi-theme-antv 0.5.4-beta.0 → 0.5.4-beta.2

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.
Files changed (66) hide show
  1. package/README.md +6 -2
  2. package/dist/hooks/useMenu.js +4 -1
  3. package/dist/pages/404.js +1 -1
  4. package/dist/pages/Examples/components/Accouncement/index.js +3 -3
  5. package/dist/pages/Examples/components/Article/index.js +1 -1
  6. package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.js +3 -3
  7. package/dist/pages/Examples/components/ExampleTopicMenu/index.js +3 -3
  8. package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.js +3 -4
  9. package/dist/pages/Examples/components/GalleryPageContent/index.js +3 -3
  10. package/dist/pages/Examples/index.js +9 -10
  11. package/dist/pages/Examples/index.module.less +1 -2
  12. package/dist/plugin/examples.js +1 -5
  13. package/dist/plugin/index.js +3 -9
  14. package/dist/slots/404.js +2 -2
  15. package/dist/slots/API/index.js +2 -2
  16. package/dist/slots/API/index.module.less +20 -14
  17. package/dist/slots/Article/index.js +1 -1
  18. package/dist/slots/Banner/Notification.js +1 -1
  19. package/dist/slots/Banner/index.js +4 -4
  20. package/dist/slots/Banner/index.module.less +2 -4
  21. package/dist/slots/Cases/index.js +4 -5
  22. package/dist/slots/Cases/index.module.less +1 -1
  23. package/dist/slots/CodeEditor/Toolbar.module.less +5 -4
  24. package/dist/slots/CodeEditor/index.module.less +1 -1
  25. package/dist/slots/CodePreview/CodeHeader.js +1 -1
  26. package/dist/slots/CodePreview/index.js +1 -1
  27. package/dist/slots/CodePreview/index.module.less +5 -4
  28. package/dist/slots/CodeRunner/index.js +4 -4
  29. package/dist/slots/Companies/index.js +2 -2
  30. package/dist/slots/Companies/index.module.less +1 -1
  31. package/dist/slots/ContentTable/index.module.less +5 -5
  32. package/dist/slots/Detail/News.js +1 -1
  33. package/dist/slots/Detail/News.module.less +10 -10
  34. package/dist/slots/Detail/index.js +2 -2
  35. package/dist/slots/Detail/index.module.less +16 -16
  36. package/dist/slots/ExampleSider/index.js +6 -6
  37. package/dist/slots/Features/FeatureCard.js +1 -1
  38. package/dist/slots/Features/FeatureCard.module.less +3 -3
  39. package/dist/slots/Features/index.js +3 -3
  40. package/dist/slots/Features/index.module.less +4 -4
  41. package/dist/slots/Footer/index.js +8 -9
  42. package/dist/slots/Footer/index.module.less +5 -5
  43. package/dist/slots/Header/Navs.js +5 -5
  44. package/dist/slots/Header/Products/NavigatorBanner.js +2 -2
  45. package/dist/slots/Header/Products/NavigatorBanner.module.less +1 -1
  46. package/dist/slots/Header/Products/Product.module.less +4 -4
  47. package/dist/slots/Header/Products/index.js +4 -4
  48. package/dist/slots/Header/Search/SearchResult.js +3 -3
  49. package/dist/slots/Header/Search/SearchResult.module.less +1 -1
  50. package/dist/slots/Header/Search/helper.js +18 -5
  51. package/dist/slots/Header/Search/index.js +10 -4
  52. package/dist/slots/Header/index.js +9 -9
  53. package/dist/slots/Header/index.module.less +10 -12
  54. package/dist/slots/Header/utils.js +3 -3
  55. package/dist/slots/Loading/index.module.less +9 -9
  56. package/dist/slots/ManualContent/NavigatorBanner.js +3 -3
  57. package/dist/slots/ManualContent/NavigatorBanner.module.less +1 -1
  58. package/dist/slots/ManualContent/Preview.module.less +1 -3
  59. package/dist/slots/ManualContent/ReadingTime.js +2 -2
  60. package/dist/slots/ManualContent/index.module.less +5 -34
  61. package/dist/slots/ManualContent/utils.js +9 -9
  62. package/dist/slots/_.less +1 -2
  63. package/dist/slots/global.js +1 -1
  64. package/dist/slots/hooks.js +3 -3
  65. package/dist/typings.d.ts +5 -5
  66. package/package.json +4 -1
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # @antv/dumi-theme-antv
2
2
 
3
- [![NPM version](https://img.shields.io/npm/v/@antv/dumi-theme-antv.svg?style=flat)](https://npmjs.org/package/@antv/dumi-theme-antv)
4
- [![NPM downloads](http://img.shields.io/npm/dm/@antv/dumi-theme-antv.svg?style=flat)](https://npmjs.org/package/@antv/dumi-theme-antv)
3
+ [![NPM version](https://img.shields.io/npm/v/@antv/dumi-theme-antv.svg?style=flat)](https://npmjs.org/package/@antv/dumi-theme-antv) [![NPM downloads](http://img.shields.io/npm/dm/@antv/dumi-theme-antv.svg?style=flat)](https://npmjs.org/package/@antv/dumi-theme-antv)
5
4
 
6
5
  A theme package for the [dumi](https://next.d.umijs.org) framework.
7
6
 
@@ -31,6 +30,11 @@ That's all, now you can execute `dumi dev` and enjoy this theme.
31
30
 
32
31
  TODO
33
32
 
33
+ `themeConfig.docsearchOptions.sort` 用于配置搜索结果的排序规则。可以通过字符串数组来定义排序逻辑。
34
+
35
+ - 每个字符串可以是一个路径片段,用于匹配搜索结果的链接。
36
+ - 如果字符串以 `!` 开头,则表示不包含该路径片段的结果应排在包含该路径片段的结果之前。
37
+
34
38
  ## Development
35
39
 
36
40
  ```bash
@@ -111,7 +111,10 @@ export var useMenu = function useMenu() {
111
111
  if (!flattedMenuData.find(function (item) {
112
112
  return item.link === selectedKey;
113
113
  })) {
114
- navigate(flattedMenuData[0].link);
114
+ var firstValidMenuItem = flattedMenuData.find(function (item) {
115
+ return item.link;
116
+ });
117
+ navigate(firstValidMenuItem.link);
115
118
  }
116
119
  return [menuData, selectedKey, flattedMenuData];
117
120
  };
package/dist/pages/404.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
+ import SEO from "../common/SEO";
2
3
  import { NotFound as NotFoundPage } from "dumi/theme/slots/404";
3
4
  import { Footer } from "dumi/theme/slots/Footer";
4
5
  import { Header } from "dumi/theme/slots/Header";
5
- import SEO from "../common/SEO";
6
6
  /**
7
7
  * 404 页面
8
8
  */
@@ -6,11 +6,11 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
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); }
7
7
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
8
8
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
9
- import React, { useEffect } from 'react';
10
- import { Alert } from 'antd';
11
- import { get } from 'lodash-es';
12
9
  import { NotificationFilled } from '@ant-design/icons';
10
+ import { Alert } from 'antd';
13
11
  import cx from 'classnames';
12
+ import { get } from 'lodash-es';
13
+ import React, { useEffect } from 'react';
14
14
  import styles from "./index.module.less";
15
15
 
16
16
  /**
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import { Layout } from 'antd';
2
+ import React from 'react';
3
3
  import styles from "./index.module.less";
4
4
  export var Article = function Article(props) {
5
5
  return /*#__PURE__*/React.createElement(Layout.Content, {
@@ -4,12 +4,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
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
- import React, { useState } from 'react';
7
+ import { createFromIconfontCN } from '@ant-design/icons';
8
8
  import { Anchor, Menu } from 'antd';
9
9
  import { useLocale } from 'dumi';
10
- import { createFromIconfontCN } from '@ant-design/icons';
11
- import { getCategoryId } from "../../../../utils";
10
+ import React, { useState } from 'react';
12
11
  import styles from "../../../../index.module.less";
12
+ import { getCategoryId } from "../../../../utils";
13
13
  var MenuIcon = createFromIconfontCN({
14
14
  scriptUrl: '//at.alicdn.com/t/font_470089_1lnym745udm.js' // generated by iconfont.cn
15
15
  });
@@ -4,13 +4,13 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
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
- import React, { useState } from 'react';
7
+ import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons';
8
8
  import { Affix, Layout as AntLayout } from 'antd';
9
9
  import Drawer from 'rc-drawer';
10
- import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons';
10
+ import React, { useState } from 'react';
11
11
  import { useMedia } from 'react-use';
12
- import { LeftMenu } from "./components/LeftMenu";
13
12
  import styles from "../../index.module.less";
13
+ import { LeftMenu } from "./components/LeftMenu";
14
14
 
15
15
  /**
16
16
  * Examples 左侧 LeftMenu
@@ -1,10 +1,9 @@
1
- import React from 'react';
2
- import { Link, useLocale } from 'dumi';
3
- import cx from 'classnames';
4
1
  import { Badge } from 'antd';
2
+ import cx from 'classnames';
3
+ import { Link, useLocale } from 'dumi';
4
+ import React from 'react';
5
5
  import { ic } from "../../../../../slots/hooks";
6
6
  import styles from "../../../index.module.less";
7
-
8
7
  /**
9
8
  * DEMO 的卡片预览
10
9
  *
@@ -4,11 +4,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
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
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
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); }
7
- import React from 'react';
8
7
  import { useLocale } from 'dumi';
9
- import { DemoCard } from "./DemoCard";
10
- import { getCategoryId } from "../../utils";
8
+ import React from 'react';
11
9
  import styles from "../../index.module.less";
10
+ import { getCategoryId } from "../../utils";
11
+ import { DemoCard } from "./DemoCard";
12
12
 
13
13
  /**
14
14
  * Examples 首页内容预览组件
@@ -4,22 +4,21 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
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
- import React from 'react';
8
- import { useContext, useEffect } from 'react';
9
- import { useNavigate } from 'react-router-dom';
10
- import { BackTop, Layout as AntLayout } from 'antd';
7
+ import { VerticalAlignTopOutlined } from '@ant-design/icons';
8
+ import { Layout as AntLayout, BackTop } from 'antd';
11
9
  import { useLocale } from 'dumi';
12
- import { Header } from "dumi/theme/slots/Header";
10
+ import React, { useContext, useEffect } from 'react';
11
+ import { useNavigate } from 'react-router-dom';
12
+ import SEO from "../../common/SEO";
13
+ import { ThemeAntVContext } from "../../context";
13
14
  import { Footer } from "dumi/theme/slots/Footer";
15
+ import { Header } from "dumi/theme/slots/Header";
14
16
  import NavigatorBanner from "../../slots/Header/Products/NavigatorBanner";
15
- import { VerticalAlignTopOutlined } from '@ant-design/icons';
17
+ import { usePrevAndNext } from "../../slots/hooks";
16
18
  import { Article } from "./components/Article";
17
19
  import { ExampleTopicMenu } from "./components/ExampleTopicMenu";
18
20
  import { GalleryPageContent } from "./components/GalleryPageContent";
19
- import { usePrevAndNext } from "../../slots/hooks";
20
- import { ThemeAntVContext } from "../../context";
21
21
  import styles from "./index.module.less";
22
- import SEO from "../../common/SEO";
23
22
 
24
23
  /**
25
24
  * Examples 页面
@@ -38,7 +37,7 @@ var Example = function Example() {
38
37
  next = _usePrevAndNext2[1];
39
38
  var title = {
40
39
  zh: '所有图表',
41
- en: "Gallery"
40
+ en: 'Gallery'
42
41
  }[locale.id];
43
42
 
44
43
  // 为 zh 做兜底
@@ -608,8 +608,7 @@
608
608
  transition: color 0.3s;
609
609
  color: #868484;
610
610
  background-color: #fff;
611
- box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
612
- 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
611
+ box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
613
612
  transition: color 0.3s;
614
613
  width: 44px;
615
614
  height: 44px;
@@ -109,11 +109,7 @@ var getExamplesPageTopics = (exampleTopics, showAPIDoc) => {
109
109
  function getExamplePaths() {
110
110
  const exampleTopicPaths = glob.sync(`${examplesBaseDir}/*/*`);
111
111
  const paths = exampleTopicPaths.map((p) => p.replace(process.cwd(), ""));
112
- return [
113
- ...paths,
114
- ...paths.map((p) => `/zh${p}`),
115
- ...paths.map((p) => `/en${p}`)
116
- ];
112
+ return [...paths, ...paths.map((p) => `/zh${p}`), ...paths.map((p) => `/en${p}`)];
117
113
  }
118
114
  // Annotate the CommonJS export names for ESM import in node:
119
115
  0 && (module.exports = {
@@ -45,9 +45,7 @@ var plugin_default = (api) => {
45
45
  memo.exportStatic.extraRoutePaths = (0, import_examples.getExamplePaths)();
46
46
  memo.mfsu = false;
47
47
  memo.jsMinifier = "terser";
48
- memo.favicons = [
49
- "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*7svFR6wkPMoAAAAAAAAAAAAADmJ7AQ/original"
50
- ];
48
+ memo.favicons = ["https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*7svFR6wkPMoAAAAAAAAAAAAADmJ7AQ/original"];
51
49
  memo.extraRehypePlugins = [import_rehypeObservable.default];
52
50
  return memo;
53
51
  });
@@ -94,9 +92,7 @@ var plugin_default = (api) => {
94
92
  content: `
95
93
  import React from 'react';
96
94
  import { useOutlet, useSiteData } from 'dumi';
97
- import { ThemeAntVContext } from '${(0, import_plugin_utils.winPath)(
98
- path.join(__dirname, "../context")
99
- )}';
95
+ import { ThemeAntVContext } from '${(0, import_plugin_utils.winPath)(path.join(__dirname, "../context"))}';
100
96
 
101
97
  export default function ThemeAntVContextWrapper() {
102
98
  const outlet = useOutlet();
@@ -138,7 +134,5 @@ export default function ThemeAntVContextWrapper() {
138
134
  routes["404"].meta = MOCK_META;
139
135
  return routes;
140
136
  });
141
- api.addTmpGenerateWatcherPaths(() => [
142
- path.resolve(process.cwd(), "examples")
143
- ]);
137
+ api.addTmpGenerateWatcherPaths(() => [path.resolve(process.cwd(), "examples")]);
144
138
  };
package/dist/slots/404.js CHANGED
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
1
  import { HomeOutlined } from '@ant-design/icons';
3
- import { Result, Button } from 'antd';
2
+ import { Button, Result } from 'antd';
4
3
  import { Link } from 'dumi';
4
+ import React from 'react';
5
5
  export var NotFound = function NotFound() {
6
6
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Result, {
7
7
  status: '404',
@@ -7,11 +7,11 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
7
  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); }
8
8
  import { ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons';
9
9
  import { Collapse, Popover } from 'antd';
10
- import { get, uniq, sortBy } from 'lodash-es';
10
+ import { get, sortBy, uniq } from 'lodash-es';
11
11
  import React from 'react';
12
12
  import Markdown from 'react-markdown';
13
- import remarkGfm from 'remark-gfm';
14
13
  import rehypeRaw from 'rehype-raw';
14
+ import remarkGfm from 'remark-gfm';
15
15
  import { useSnapshot } from 'valtio';
16
16
  import { store } from "../../model";
17
17
  import { CollapsedIcon } from "../../pages/Example/components/CollapsedIcon";
@@ -1,6 +1,6 @@
1
1
  .api {
2
2
  height: 100%;
3
- color: rgba(0,0,0, 85%);
3
+ color: rgba(0, 0, 0, 85%);
4
4
 
5
5
  .header {
6
6
  position: relative;
@@ -37,22 +37,27 @@
37
37
  margin-bottom: 0;
38
38
  }
39
39
 
40
- h1, h2, h3, h4, h5, h6 {
41
- font-weight: 400;
42
- margin-bottom: 0;
43
- margin-top: 8px;
44
- color: rgba(0,0,0, 85%);
45
- border-top: 1px solid #F8F9FC;
46
-
47
- &:first-child {
48
- margin-top: 0;
49
- border-top: none;
50
- }
40
+ h1,
41
+ h2,
42
+ h3,
43
+ h4,
44
+ h5,
45
+ h6 {
46
+ font-weight: 400;
47
+ margin-bottom: 0;
48
+ margin-top: 8px;
49
+ color: rgba(0, 0, 0, 85%);
50
+ border-top: 1px solid #f8f9fc;
51
+
52
+ &:first-child {
53
+ margin-top: 0;
54
+ border-top: none;
55
+ }
51
56
  }
52
57
 
53
58
  .border() {
54
59
  border-width: 1px;
55
- border-color: #ececec
60
+ border-color: #ececec;
56
61
  }
57
62
 
58
63
  table {
@@ -63,7 +68,8 @@
63
68
  margin-bottom: 6px;
64
69
  }
65
70
 
66
- td, th {
71
+ td,
72
+ th {
67
73
  .border();
68
74
 
69
75
  text-align: left;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import { Layout } from 'antd';
2
+ import React from 'react';
3
3
  import styles from "./index.module.less";
4
4
  var Article = function Article(props) {
5
5
  return /*#__PURE__*/React.createElement(Layout.Content, {
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import { Link } from 'dumi';
2
+ import React from 'react';
3
3
  import styles from "./Notification.module.less";
4
4
  var numberImages = ['https://gw.alipayobjects.com/zos/antfincdn/IqREAm36K7/1.png', 'https://gw.alipayobjects.com/zos/antfincdn/3fG1Iqjfnz/2.png'];
5
5
  var Notification = function Notification(_ref) {
@@ -11,13 +11,13 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
11
11
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
12
  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; } }
13
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
- import React, { useEffect, useState } from 'react';
15
- import { Modal } from 'antd';
16
14
  import { CaretRightOutlined } from '@ant-design/icons';
17
- import { FormattedMessage, Link, useLocale, useSiteData } from 'dumi';
15
+ import { Modal } from 'antd';
18
16
  import classNames from 'classnames';
19
- import GitHubButton from 'react-github-button';
17
+ import { FormattedMessage, Link, useLocale, useSiteData } from 'dumi';
20
18
  import gh from 'parse-github-url';
19
+ import React, { useEffect, useState } from 'react';
20
+ import GitHubButton from 'react-github-button';
21
21
  import { Player } from 'video-react';
22
22
  import Notification from "./Notification";
23
23
  import 'video-react/dist/video-react.css';
@@ -42,7 +42,7 @@
42
42
  display: flex;
43
43
  margin-top: 5.56%;
44
44
 
45
- .buttonLink+.buttonLink {
45
+ .buttonLink + .buttonLink {
46
46
  margin-left: 16px;
47
47
  }
48
48
 
@@ -73,9 +73,7 @@
73
73
  border: none;
74
74
  outline: none;
75
75
  color: #fff;
76
- background: linear-gradient(60deg,
77
- fade(@primary-color, 70%),
78
- shade(@primary-color, 20%));
76
+ background: linear-gradient(60deg, fade(@primary-color, 70%), shade(@primary-color, 20%));
79
77
  opacity: 0.8;
80
78
  box-shadow: 0 8px 10px fade(@primary-color, 20%);
81
79
 
@@ -1,13 +1,12 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import React from 'react';
3
2
  import { ArrowLeftOutlined, ArrowRightOutlined } from '@ant-design/icons';
4
- import { Link, FormattedMessage } from 'dumi';
5
- import Slider from 'react-slick';
6
3
  import cx from 'classnames';
7
- import { useLocale } from 'dumi';
4
+ import { FormattedMessage, Link, useLocale } from 'dumi';
5
+ import React from 'react';
6
+ import Slider from 'react-slick';
8
7
  import { ic, icWithLocale } from "../hooks";
9
- import 'slick-carousel/slick/slick.css';
10
8
  import 'slick-carousel/slick/slick-theme.css';
9
+ import 'slick-carousel/slick/slick.css';
11
10
  import styles from "./index.module.less";
12
11
  export var Cases = function Cases(_ref) {
13
12
  var _ref$cases = _ref.cases,
@@ -234,4 +234,4 @@
234
234
  }
235
235
  }
236
236
  }
237
- }
237
+ }
@@ -10,7 +10,7 @@
10
10
  color: #777;
11
11
  background: #f8f9fc;
12
12
 
13
- >* {
13
+ > * {
14
14
  display: inline-block;
15
15
  transition: all 0.3s;
16
16
 
@@ -31,12 +31,13 @@
31
31
  height: 16px;
32
32
  overflow: hidden;
33
33
  text-indent: -9999px;
34
- background: transparent url('https://gw.alipayobjects.com/zos/rmsportal/DlHbxMCyeuyOrqOdbgik.svg') center / 12px no-repeat;
34
+ background: transparent url('https://gw.alipayobjects.com/zos/rmsportal/DlHbxMCyeuyOrqOdbgik.svg') center / 12px
35
+ no-repeat;
35
36
  border: 0;
36
37
  cursor: pointer;
37
38
  transition: all 0.3s;
38
39
  position: relative;
39
- top: .5px;
40
+ top: 0.5px;
40
41
  line-height: 1;
41
42
  }
42
43
 
@@ -78,4 +79,4 @@
78
79
  border-left: #ececec solid 1px;
79
80
  }
80
81
  }
81
- }
82
+ }
@@ -8,4 +8,4 @@
8
8
  height: 100%;
9
9
  width: 100%;
10
10
  }
11
- }
11
+ }
@@ -1,5 +1,5 @@
1
+ import { Divider, PageHeader, Space } from 'antd';
1
2
  import React from 'react';
2
- import { PageHeader, Space, Divider } from 'antd';
3
3
  /**
4
4
  * 组件的 header
5
5
  */
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  import { Result } from 'antd';
3
2
  import { FormattedMessage } from 'dumi';
3
+ import React from 'react';
4
4
  import styles from "./index.module.less";
5
5
  function getErrorMessage(e) {
6
6
  return (e.reason ? e.reason : e.message ? e.message : e).toString();
@@ -19,8 +19,9 @@
19
19
  position: relative;
20
20
  flex: 1;
21
21
  min-height: 0;
22
-
23
- .playgroundScriptContainer, .playgroundCodeContainer {
22
+
23
+ .playgroundScriptContainer,
24
+ .playgroundCodeContainer {
24
25
  position: relative;
25
26
  width: 100%;
26
27
  height: 100%;
@@ -45,8 +46,8 @@
45
46
  position: absolute;
46
47
  top: 0;
47
48
  left: 0;
48
-
49
+
49
50
  background: #fff;
50
51
  }
51
52
  }
52
- }
53
+ }
@@ -4,16 +4,16 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
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
- import React, { useState } from 'react';
8
- import { useSiteData, useLocale } from 'dumi';
7
+ import { useLocale, useSiteData } from 'dumi';
9
8
  import { noop } from 'lodash-es';
9
+ import React, { useState } from 'react';
10
10
  import SplitPane from 'react-split-pane';
11
+ import { NotFound } from "dumi/theme/slots/404";
11
12
  import { CodeEditor } from "dumi/theme/slots/CodeEditor";
12
13
  import { CodePreview } from "dumi/theme/slots/CodePreview";
13
14
  import { CodeHeader } from "../CodePreview/CodeHeader";
14
- import { getDemoInfo } from "./utils";
15
- import { NotFound } from "dumi/theme/slots/404";
16
15
  import { ic } from "../hooks";
16
+ import { getDemoInfo } from "./utils";
17
17
  /**
18
18
  * 代码编辑器 + 代码预览区域
19
19
  */
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { Row, Col } from 'antd';
1
+ import { Col, Row } from 'antd';
3
2
  import cx from 'classnames';
3
+ import React from 'react';
4
4
  import styles from "./index.module.less";
5
5
  export var Companies = function Companies(_ref) {
6
6
  var title = _ref.title,
@@ -65,4 +65,4 @@
65
65
  }
66
66
  }
67
67
  }
68
- }
68
+ }
@@ -1,11 +1,11 @@
1
1
  :global {
2
2
  ul.dumi-default-toc {
3
- >li {
4
- margin-left: 0px!important;
3
+ > li {
4
+ margin-left: 0px !important;
5
5
  }
6
6
  .active {
7
- color: #873bf4!important;
8
- border-left: 3px solid #873bf4!important;
7
+ color: #873bf4 !important;
8
+ border-left: 3px solid #873bf4 !important;
9
9
  }
10
10
  }
11
- }
11
+ }
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import { Link, useLocale } from 'dumi';
2
+ import React from 'react';
3
3
  import { ic } from "../hooks";
4
4
  import styles from "./News.module.less";
5
5
  var numberImages = ['https://gw.alipayobjects.com/zos/antfincdn/IqREAm36K7/1.png', 'https://gw.alipayobjects.com/zos/antfincdn/3fG1Iqjfnz/2.png'];
@@ -1,9 +1,9 @@
1
1
  .news {
2
2
  width: 50%;
3
3
  margin-right: 2%;
4
- background-color: #FFFFFF;
5
- border: 1px solid #E5E8EF;
6
- box-shadow: 0 8px 28px 0 rgba(0,0,0,0.05);
4
+ background-color: #ffffff;
5
+ border: 1px solid #e5e8ef;
6
+ box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.05);
7
7
  border-radius: 16px;
8
8
  height: 100%;
9
9
 
@@ -13,7 +13,7 @@
13
13
 
14
14
  .container {
15
15
  height: 100%;
16
- color: #1D2129;
16
+ color: #1d2129;
17
17
  letter-spacing: 0;
18
18
 
19
19
  .content {
@@ -28,13 +28,13 @@
28
28
  top: 0;
29
29
  margin-bottom: 0;
30
30
  transition: all 0.3s;
31
- font-family: PingFangSC;
31
+ font-family: PingFangSC;
32
32
  font-weight: 500;
33
33
  font-size: 20px;
34
34
  text-align: center;
35
35
  position: relative;
36
36
 
37
- >img {
37
+ > img {
38
38
  width: 24px;
39
39
  height: 24px;
40
40
  position: relative;
@@ -43,8 +43,9 @@
43
43
  }
44
44
  }
45
45
 
46
- .date,.subTitle {
47
- color: #424E66;
46
+ .date,
47
+ .subTitle {
48
+ color: #424e66;
48
49
  bottom: 0;
49
50
  font-size: 1em;
50
51
  margin-top: 4px;
@@ -55,7 +56,7 @@
55
56
  }
56
57
 
57
58
  &:hover .description {
58
- color: #691EFF;
59
+ color: #691eff;
59
60
  }
60
61
  }
61
62
 
@@ -163,4 +164,3 @@
163
164
  z-index: 0;
164
165
  }
165
166
  }
166
-
@@ -14,11 +14,11 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
14
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
15
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
16
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
17
- import React, { useState, useEffect } from 'react';
18
17
  import cx from 'classnames';
18
+ import { useLocale } from 'dumi/dist/client/theme-api';
19
19
  import gh from 'parse-github-url';
20
+ import React, { useEffect, useState } from 'react';
20
21
  import GitHubButton from 'react-github-button';
21
- import { useLocale } from 'dumi/dist/client/theme-api';
22
22
  import { ic } from "../hooks";
23
23
  import { News } from "./News";
24
24
  import styles from "./index.module.less";