dumi-theme-lobehub 1.7.6 → 1.8.0

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- <img height="120" src="https://registry.npmmirror.com/@lobehub/assets-logo/1.0.0/files/assets/logo-3d.webp">
5
+ <img height="120" src="https://registry.npmmirror.com/@lobehub/assets-logo/latest/files/assets/logo-3d.webp">
6
6
  <img height="120" src="https://gw.alipayobjects.com/zos/kitchen/qJ3l3EPsdW/split.svg">
7
7
  <img height="120" src="https://gw.alipayobjects.com/zos/bmw-prod/d3e3eb39-1cd7-4aa5-827c-877deced6b7e/lalxt4g3_w256_h256.png">
8
8
 
@@ -36,11 +36,16 @@ dumi-theme-lobehub is a documentation site theme package designed for `Dumi 2`.
36
36
  - [🤯 Usage](#-usage)
37
37
  - [⌨️ Local Development](#️-local-development)
38
38
  - [🤝 Contributing](#-contributing)
39
+ - [🔗 Links](#-links)
40
+ - [More Products](#more-products)
39
41
 
40
42
  ####
41
43
 
42
44
  </details>
43
45
 
46
+ > \[!WARNING]
47
+ > Not Support Dumi >= 2.3 yet
48
+
44
49
  ## ✨ Features
45
50
 
46
51
  - [x] 🤯 **Modern Theme Style:** This theme package adopts modern design techniques such as gradient colors, frosted glass, lighting effects, and natural animations to present the interface in a more concise and visually appealing way, making the documents more intuitive, readable, and user-friendly.
@@ -105,7 +110,7 @@ interface SiteThemeConfig {
105
110
  }
106
111
  ```
107
112
 
108
- > **Note**\
113
+ > \[!NOTE]\
109
114
  > For detailed configuration, please refer to the [📘 Type file](https://github.com/lobehub/dumi-theme-lobehub/blob/master/src/types/config.ts) / [📘 Example](https://github.com/lobehub/dumi-theme-lobehub/blob/master/example/.dumirc.ts).
110
115
 
111
116
  <div align="right">
@@ -1,4 +1,4 @@
1
- import { Icon, Snippet } from '@lobehub/ui';
1
+ import { Icon, Markdown, Snippet } from '@lobehub/ui';
2
2
  import { Divider, Space, Typography } from 'antd';
3
3
  import { useResponsive } from 'antd-style';
4
4
  import { Edit3, Github } from 'lucide-react';
@@ -49,15 +49,15 @@ export var ApiHeader = /*#__PURE__*/memo(function (_ref) {
49
49
  var importString = defaultImport ? "import ".concat(componentName, " from '").concat(pkg, "';") : "import { ".concat(componentName, " } from '").concat(pkg, "';");
50
50
  return /*#__PURE__*/_jsxs(Flexbox, {
51
51
  id: 'api-header',
52
+ style: {
53
+ marginBottom: 24
54
+ },
52
55
  children: [/*#__PURE__*/_jsx(Typography.Title, {
53
56
  className: styles.title,
54
57
  children: title
55
- }), description && /*#__PURE__*/_jsx("div", {
56
- children: /*#__PURE__*/_jsx(Typography.Text, {
57
- className: styles.desc,
58
- type: 'secondary',
59
- children: description
60
- })
58
+ }), description && /*#__PURE__*/_jsx(Markdown, {
59
+ className: styles.desc,
60
+ children: description
61
61
  }), !isDoc && /*#__PURE__*/_jsxs(Flexbox, {
62
62
  gap: mobile ? 16 : 24,
63
63
  style: {
@@ -5,25 +5,25 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
5
5
  var Favicons = /*#__PURE__*/memo(function () {
6
6
  return /*#__PURE__*/_jsxs(Helmet, {
7
7
  children: [/*#__PURE__*/_jsx("link", {
8
- href: "https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/apple-touch-icon.png",
8
+ href: "https://registry.npmmirror.com/@lobehub/assets-favicons/latest/files/assets/apple-touch-icon.png",
9
9
  rel: "apple-touch-icon",
10
10
  sizes: "180x180"
11
11
  }), /*#__PURE__*/_jsx("link", {
12
- href: "https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/favicon-32x32.png",
12
+ href: "https://registry.npmmirror.com/@lobehub/assets-favicons/latest/files/assets/favicon-32x32.png",
13
13
  rel: "icon",
14
14
  sizes: "32x32",
15
15
  type: "image/png"
16
16
  }), /*#__PURE__*/_jsx("link", {
17
- href: "https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/favicon-16x16.png",
17
+ href: "https://registry.npmmirror.com/@lobehub/assets-favicons/latest/files/assets/favicon-16x16.png",
18
18
  rel: "icon",
19
19
  sizes: "16x16",
20
20
  type: "image/png"
21
21
  }), /*#__PURE__*/_jsx("link", {
22
- href: "https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/site.webmanifest",
22
+ href: "https://registry.npmmirror.com/@lobehub/assets-favicons/latest/files/assets/site.webmanifest",
23
23
  rel: "manifest"
24
24
  }), /*#__PURE__*/_jsx("link", {
25
25
  color: "#000000",
26
- href: "https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/safari-pinned-tab.svg",
26
+ href: "https://registry.npmmirror.com/@lobehub/assets-favicons/latest/files/assets/safari-pinned-tab.svg",
27
27
  rel: "mask-icon"
28
28
  }), /*#__PURE__*/_jsx("meta", {
29
29
  content: "LobeHub",
@@ -8,5 +8,5 @@ interface SelectItemProps {
8
8
  ref?: ForwardedRef<HTMLButtonElement>;
9
9
  value: any;
10
10
  }
11
- declare const SelectItem: import("react").NamedExoticComponent<SelectItemProps>;
11
+ declare const SelectItem: import("react").ForwardRefExoticComponent<Omit<SelectItemProps, "ref"> & import("react").RefAttributes<any>>;
12
12
  export default SelectItem;
@@ -7,10 +7,10 @@ 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
  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; }
9
9
  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; }
10
- import { forwardRef, memo } from 'react';
10
+ import { forwardRef } from 'react';
11
11
  import { useStyles } from "./style";
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- var SelectItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, reference) {
13
+ var SelectItem = /*#__PURE__*/forwardRef(function (_ref, reference) {
14
14
  var value = _ref.value,
15
15
  label = _ref.label,
16
16
  prefixCls = _ref.prefixCls,
@@ -32,5 +32,5 @@ var SelectItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, refe
32
32
  }, props), {}, {
33
33
  children: label
34
34
  }), value);
35
- }));
35
+ });
36
36
  export default SelectItem;
@@ -41,8 +41,7 @@ var SSRPlugin = (api) => {
41
41
  api.describe({
42
42
  key: "@"
43
43
  });
44
- if (!api.userConfig.ssr)
45
- return;
44
+ if (!api.userConfig.ssr) return;
46
45
  api.logger.info("detect ssr config, when building html will extract css.");
47
46
  const writeCSSFile = (key, hashKey, cssString) => {
48
47
  const fileName = `ssr-${key}.${(0, import_utils.getHash)(hashKey)}.css`;
@@ -7,6 +7,7 @@ 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
  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; }
9
9
  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; }
10
+ import { Typography } from '@lobehub/ui';
10
11
  import { Skeleton } from 'antd';
11
12
  import { useResponsive } from 'antd-style';
12
13
  import isEqual from 'fast-deep-equal';
@@ -37,20 +38,13 @@ var Content = /*#__PURE__*/memo(function (_ref) {
37
38
  gap: mobile ? 0 : 24,
38
39
  width: '100%'
39
40
  }, props), {}, {
40
- children: [/*#__PURE__*/_jsx("div", {
41
- style: {
42
- height: 0
43
- }
44
- }), /*#__PURE__*/_jsxs("div", {
41
+ children: [/*#__PURE__*/_jsxs("div", {
45
42
  className: cx('dumi-antd-style-content', styles.content),
46
43
  children: [/*#__PURE__*/_jsx(Skeleton, {
47
44
  active: true,
48
45
  loading: loading,
49
- paragraph: true,
50
- style: {
51
- minHeight: '50vh'
52
- }
53
- }), /*#__PURE__*/_jsx("div", {
46
+ paragraph: true
47
+ }), /*#__PURE__*/_jsx(Typography, {
54
48
  style: {
55
49
  display: loading ? 'none' : undefined
56
50
  },
@@ -5,9 +5,8 @@ export var useStyles = createStyles(function (_ref, isPure) {
5
5
  var cx = _ref.cx,
6
6
  token = _ref.token,
7
7
  responsive = _ref.responsive,
8
- css = _ref.css,
9
- stylish = _ref.stylish;
8
+ css = _ref.css;
10
9
  return {
11
- content: cx(!isPure && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 24px 48px;\n background-color: ", ";\n border-radius: 10px;\n\n ", " {\n padding: 8px 16px;\n border-radius: 0;\n }\n "])), token.colorBgContainer, responsive.mobile), css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n box-sizing: border-box;\n width: 100%;\n min-height: 400px;\n\n &:has([data-page-tabs='true']) {\n padding-top: 8px;\n }\n\n .markdown {\n ", ";\n h2,\n h3 {\n &[id^='version'] {\n color: ", ";\n }\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n transition: all 400ms ", ";\n\n > a[aria-hidden]:first-child {\n float: left;\n\n width: 20px;\n margin-inline-start: -24px;\n padding-inline-end: 4px;\n\n font-size: inherit;\n line-height: inherit;\n color: ", ";\n text-align: right;\n\n &:hover {\n border: 0;\n }\n\n > .icon-link::before {\n content: '#';\n font-size: inherit;\n color: ", ";\n }\n }\n\n &:hover {\n color: ", ";\n }\n\n &:not(:hover) > a[aria-hidden]:first-child > .icon-link {\n visibility: hidden;\n }\n }\n\n ol,\n ul {\n padding-inline-start: 18px;\n }\n }\n "])), stylish.markdown, token.colorText, token.motionEaseOut, token.colorText, token.colorTextTertiary, token.colorText))
10
+ content: cx(!isPure && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 24px 48px;\n background-color: ", ";\n border-radius: 10px;\n\n ", " {\n padding: 8px 16px;\n border-radius: 0;\n }\n "])), token.colorBgContainer, responsive.mobile), css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n box-sizing: border-box;\n width: 100%;\n min-height: 400px;\n\n &:has([data-page-tabs='true']) {\n padding-top: 8px;\n }\n "]))))
12
11
  };
13
12
  });
@@ -10,9 +10,9 @@ var Features = /*#__PURE__*/memo(function () {
10
10
  if (!(features !== null && features !== void 0 && features.length)) return;
11
11
  return /*#__PURE__*/_jsx(F, {
12
12
  items: features,
13
+ maxWidth: theme.contentMaxWidth,
13
14
  style: {
14
- margin: '0 16px',
15
- maxWidth: theme.contentMaxWidth
15
+ margin: '0 16px'
16
16
  }
17
17
  });
18
18
  });
@@ -35,7 +35,13 @@ var Navbar = /*#__PURE__*/memo(function () {
35
35
  items: nav.map(function (item) {
36
36
  return {
37
37
  key: String(item.activePath || item.link),
38
- label: /*#__PURE__*/_jsx(Link, {
38
+ label: /^(\w+:)\/\/|^(mailto|tel):/.test(item.link || '') ? /*#__PURE__*/_jsx("a", {
39
+ className: styles.link,
40
+ href: String(item.link),
41
+ rel: "noreferrer",
42
+ target: "_blank",
43
+ children: item.title
44
+ }) : /*#__PURE__*/_jsx(Link, {
39
45
  className: styles.link,
40
46
  to: String(item.link),
41
47
  children: item.title
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dumi-theme-lobehub",
3
- "version": "1.7.6",
3
+ "version": "1.8.0",
4
4
  "description": "dumi-theme-lobehub is a documentation site theme package designed for dumi2. It provides a more beautiful and user-friendly development and reading experience based on @lobehub/ui",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -25,23 +25,22 @@
25
25
  "dist"
26
26
  ],
27
27
  "dependencies": {
28
- "@floating-ui/react": "^0",
29
- "@giscus/react": "^2",
30
- "@lobehub/ui": "latest",
31
- "ahooks": "^3",
32
- "antd": "^5",
33
- "antd-style": "^3",
34
- "chalk": "^4",
35
- "fast-deep-equal": "^3",
36
- "history": "^5",
37
- "lodash-es": "^4",
38
- "lucide-react": "latest",
39
- "polished": "^4",
40
- "rc-footer": "^0",
41
- "react-layout-kit": "^1",
42
- "styled-components": "latest",
43
- "use-merge-value": "^1",
44
- "zustand": "^4"
28
+ "@floating-ui/react": "^0.26.17",
29
+ "@giscus/react": "^2.4.0",
30
+ "@lobehub/ui": "^1.142.4",
31
+ "ahooks": "^3.8.0",
32
+ "antd": "^5.18.2",
33
+ "antd-style": "^3.6.2",
34
+ "chalk": "^4.1.2",
35
+ "fast-deep-equal": "^3.1.3",
36
+ "history": "^5.3.0",
37
+ "lodash-es": "^4.17.21",
38
+ "lucide-react": "^0.395.0",
39
+ "polished": "^4.3.1",
40
+ "rc-footer": "^0.6.8",
41
+ "react-layout-kit": "^1.9.0",
42
+ "use-merge-value": "^1.2.0",
43
+ "zustand": "^4.5.2"
45
44
  },
46
45
  "peerDependencies": {
47
46
  "antd": ">=5",