@antv/dumi-theme-antv 0.5.5 → 0.5.6
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/slots/Header/index.js +10 -4
- package/package.json +2 -1
|
@@ -10,7 +10,6 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
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; }
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
// import { navigate } from 'gatsby';
|
|
14
13
|
import { CaretDownFilled, CheckOutlined, DownOutlined, GithubOutlined, LinkOutlined, MenuOutlined, WechatOutlined } from '@ant-design/icons';
|
|
15
14
|
import { Alert, Button, Dropdown, Menu, Modal, Popover, Select } from 'antd';
|
|
16
15
|
import cx from 'classnames';
|
|
@@ -24,6 +23,8 @@ import { Navs } from "./Navs";
|
|
|
24
23
|
import { Products } from "./Products";
|
|
25
24
|
import { Search } from "./Search";
|
|
26
25
|
import { findVersion, getLangUrl } from "./utils";
|
|
26
|
+
import { Assistant } from '@petercatai/assistant';
|
|
27
|
+
import '@petercatai/assistant/style';
|
|
27
28
|
import styles from "./index.module.less";
|
|
28
29
|
function redirectChinaMirror(chinaMirrorOrigin) {
|
|
29
30
|
window.location.href = window.location.href.replace(window.location.origin, chinaMirrorOrigin);
|
|
@@ -454,7 +455,8 @@ export var Header = function Header(props) {
|
|
|
454
455
|
ecosystems = themeConfig.ecosystems,
|
|
455
456
|
navs = themeConfig.navs,
|
|
456
457
|
docsearchOptions = themeConfig.docsearchOptions,
|
|
457
|
-
announcement = themeConfig.announcement
|
|
458
|
+
announcement = themeConfig.announcement,
|
|
459
|
+
petercat = themeConfig.petercat;
|
|
458
460
|
var searchOptions = {
|
|
459
461
|
docsearchOptions: docsearchOptions
|
|
460
462
|
};
|
|
@@ -482,7 +484,11 @@ export var Header = function Header(props) {
|
|
|
482
484
|
searchOptions: searchOptions,
|
|
483
485
|
isHomePage: isHomePage,
|
|
484
486
|
transparent: isHomePage && isAntVSite,
|
|
485
|
-
announcement: announcement
|
|
487
|
+
announcement: announcement,
|
|
488
|
+
petercat: petercat
|
|
486
489
|
};
|
|
487
|
-
return /*#__PURE__*/React.createElement(HeaderComponent, Object.assign({}, headerProps, props))
|
|
490
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HeaderComponent, Object.assign({}, headerProps, props)), (petercat === null || petercat === void 0 ? void 0 : petercat.show) && /*#__PURE__*/React.createElement(Assistant, {
|
|
491
|
+
token: petercat === null || petercat === void 0 ? void 0 : petercat.token,
|
|
492
|
+
apiDomain: "https://api.petercat.ai"
|
|
493
|
+
}));
|
|
488
494
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/dumi-theme-antv",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"description": "AntV website theme based on dumi2.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dumi",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"d3-dsv": "^3.0.1",
|
|
57
57
|
"docsearch.js": "^2.6.3",
|
|
58
58
|
"front-matter": "^4.0.2",
|
|
59
|
+
"@petercatai/assistant": "^2.0.17",
|
|
59
60
|
"fs-extra": "^10.1.0",
|
|
60
61
|
"glob": "^8.1.0",
|
|
61
62
|
"hast": "^1.0.0",
|