dumi-theme-lobehub 1.6.1 → 1.7.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 +55 -82
- package/dist/components/ApiHeader/index.d.ts +2 -16
- package/dist/components/ApiHeader/index.js +3 -1
- package/dist/pages/Docs/index.js +12 -7
- package/dist/slots/Content/index.js +5 -2
- package/dist/slots/Content/style.d.ts +2 -2
- package/dist/slots/Content/style.js +5 -4
- package/dist/slots/Features/index.js +2 -2
- package/dist/slots/Footer/columns.js +22 -7
- package/dist/slots/Footer/index.js +7 -4
- package/dist/slots/Logo/index.js +11 -12
- package/dist/store/selectors/apiHeader.js +4 -1
- package/dist/store/selectors/siteBasicInfo.d.ts +1 -0
- package/dist/store/selectors/siteBasicInfo.js +3 -0
- package/dist/types/config.d.ts +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,18 +10,17 @@
|
|
|
10
10
|
|
|
11
11
|
dumi-theme-lobehub is a documentation site theme package designed for `Dumi 2`. <br/>It provides a more beautiful and user-friendly development and reading experience based on `@lobehub/ui`
|
|
12
12
|
|
|
13
|
-
[
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
[![
|
|
18
|
-
[![
|
|
19
|
-
[![
|
|
20
|
-
[![
|
|
21
|
-
[![
|
|
22
|
-
|
|
23
|
-
[
|
|
24
|
-
[![issues][issues-shield]][issues-url]
|
|
13
|
+
[![][npm-release-shield]][npm-release-link]
|
|
14
|
+
[![][github-releasedate-shield]][github-releasedate-link]
|
|
15
|
+
[![][github-action-test-shield]][github-action-test-link]
|
|
16
|
+
[![][github-action-release-shield]][github-action-release-link]<br/>
|
|
17
|
+
[![][github-contributors-shield]][github-contributors-link]
|
|
18
|
+
[![][github-forks-shield]][github-forks-link]
|
|
19
|
+
[![][github-stars-shield]][github-stars-link]
|
|
20
|
+
[![][github-issues-shield]][github-issues-link]
|
|
21
|
+
[![][github-license-shield]][github-license-link]
|
|
22
|
+
|
|
23
|
+
[Changelog](./CHANGELOG.md) · [Report Bug][github-issues-link] · [Request Feature][github-issues-link]
|
|
25
24
|
|
|
26
25
|

|
|
27
26
|
|
|
@@ -59,10 +58,12 @@ dumi-theme-lobehub is a documentation site theme package designed for `Dumi 2`.
|
|
|
59
58
|
|
|
60
59
|
## 📦 Installation
|
|
61
60
|
|
|
62
|
-
|
|
61
|
+
To install `dumi-theme-lobehub`, run the following command:
|
|
62
|
+
|
|
63
|
+
[![][bun-shield]][bun-link]
|
|
63
64
|
|
|
64
65
|
```bash
|
|
65
|
-
|
|
66
|
+
$ bun add dumi dumi-theme-lobehub
|
|
66
67
|
```
|
|
67
68
|
|
|
68
69
|
<div align="right">
|
|
@@ -102,7 +103,8 @@ interface SiteThemeConfig {
|
|
|
102
103
|
}
|
|
103
104
|
```
|
|
104
105
|
|
|
105
|
-
>
|
|
106
|
+
> **Note**\
|
|
107
|
+
> 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).
|
|
106
108
|
|
|
107
109
|
<div align="right">
|
|
108
110
|
|
|
@@ -112,17 +114,19 @@ interface SiteThemeConfig {
|
|
|
112
114
|
|
|
113
115
|
## ⌨️ Local Development
|
|
114
116
|
|
|
115
|
-
You can use
|
|
117
|
+
You can use Github Codespaces for online development:
|
|
116
118
|
|
|
117
|
-
[![
|
|
119
|
+
[![][github-codespace-shield]][github-codespace-link]
|
|
118
120
|
|
|
119
121
|
Or clone it for local development:
|
|
120
122
|
|
|
123
|
+
[![][bun-shield]][bun-link]
|
|
124
|
+
|
|
121
125
|
```bash
|
|
122
126
|
$ git clone https://github.com/lobehub/dumi-theme-lobehub.git
|
|
123
127
|
$ cd dumi-theme-lobehub
|
|
124
|
-
$
|
|
125
|
-
$
|
|
128
|
+
$ bun install
|
|
129
|
+
$ bun dev
|
|
126
130
|
```
|
|
127
131
|
|
|
128
132
|
<div align="right">
|
|
@@ -133,24 +137,11 @@ $ pnpm start
|
|
|
133
137
|
|
|
134
138
|
## 🤝 Contributing
|
|
135
139
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
> 📊 Total: <kbd>**4**</kbd>
|
|
140
|
+
Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub [Issues][github-issues-link] to get stuck in to show us what you’re made of.
|
|
139
141
|
|
|
140
|
-
|
|
141
|
-
<img src="https://avatars.githubusercontent.com/u/17870709?v=4" width="50" />
|
|
142
|
-
</a>
|
|
143
|
-
<a href="https://github.com/actions-user" title="actions-user">
|
|
144
|
-
<img src="https://avatars.githubusercontent.com/u/65916846?v=4" width="50" />
|
|
145
|
-
</a>
|
|
146
|
-
<a href="https://github.com/arvinxx" title="arvinxx">
|
|
147
|
-
<img src="https://avatars.githubusercontent.com/u/28616219?v=4" width="50" />
|
|
148
|
-
</a>
|
|
149
|
-
<a href="https://github.com/apps/dependabot" title="dependabot[bot]">
|
|
150
|
-
<img src="https://avatars.githubusercontent.com/in/29110?v=4" width="50" />
|
|
151
|
-
</a>
|
|
142
|
+
[![][pr-welcome-shield]][pr-welcome-link]
|
|
152
143
|
|
|
153
|
-
|
|
144
|
+
[![][github-contrib-shield]][github-contrib-link]
|
|
154
145
|
|
|
155
146
|
<div align="right">
|
|
156
147
|
|
|
@@ -162,54 +153,36 @@ $ pnpm start
|
|
|
162
153
|
|
|
163
154
|
#### 📝 License
|
|
164
155
|
|
|
165
|
-
Copyright © 2023 [LobeHub][profile-
|
|
156
|
+
Copyright © 2023 [LobeHub][profile-link]. <br />
|
|
166
157
|
This project is [MIT](./LICENSE) licensed.
|
|
167
158
|
|
|
168
159
|
<!-- LINK GROUP -->
|
|
169
160
|
|
|
170
|
-
[
|
|
171
|
-
[
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
[
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
[
|
|
180
|
-
[
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
[
|
|
185
|
-
[
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
[
|
|
190
|
-
[
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
[
|
|
195
|
-
[
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
[contributors-shield]: https://img.shields.io/github/contributors/lobehub/dumi-theme-lobehub.svg?style=flat
|
|
200
|
-
[contributors-url]: https://github.com/lobehub/dumi-theme-lobehub/graphs/contributors
|
|
201
|
-
|
|
202
|
-
<!-- forks -->
|
|
203
|
-
|
|
204
|
-
[forks-shield]: https://img.shields.io/github/forks/lobehub/dumi-theme-lobehub.svg?style=flat
|
|
205
|
-
[forks-url]: https://github.com/lobehub/dumi-theme-lobehub/network/members
|
|
206
|
-
|
|
207
|
-
<!-- stargazers -->
|
|
208
|
-
|
|
209
|
-
[stargazers-shield]: https://img.shields.io/github/stars/lobehub/dumi-theme-lobehub.svg?style=flat
|
|
210
|
-
[stargazers-url]: https://github.com/lobehub/dumi-theme-lobehub/stargazers
|
|
211
|
-
|
|
212
|
-
<!-- issues -->
|
|
213
|
-
|
|
214
|
-
[issues-shield]: https://img.shields.io/github/issues/lobehub/dumi-theme-lobehub.svg?style=flat
|
|
215
|
-
[issues-url]: https://github.com/lobehub/dumi-theme-lobehub/issues/new/choose
|
|
161
|
+
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-black?style=flat-square
|
|
162
|
+
[bun-link]: https://bun.sh
|
|
163
|
+
[bun-shield]: https://img.shields.io/badge/-speedup%20with%20bun-black?logo=bun&style=for-the-badge
|
|
164
|
+
[github-action-release-link]: https://github.com/lobehub/dumi-theme-lobehub/actions/workflows/release.yml
|
|
165
|
+
[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/dumi-theme-lobehub/release.yml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
166
|
+
[github-action-test-link]: https://github.com/lobehub/dumi-theme-lobehub/actions/workflows/test.yml
|
|
167
|
+
[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/dumi-theme-lobehub/test.yml?label=test&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
168
|
+
[github-codespace-link]: https://codespaces.new/lobehub/dumi-theme-lobehub
|
|
169
|
+
[github-codespace-shield]: https://github.com/codespaces/badge.svg
|
|
170
|
+
[github-contrib-link]: https://github.com/lobehub/dumi-theme-lobehub/graphs/contributors
|
|
171
|
+
[github-contrib-shield]: https://contrib.rocks/image?repo=lobehub%2Fdumi-theme-lobehub
|
|
172
|
+
[github-contributors-link]: https://github.com/lobehub/dumi-theme-lobehub/graphs/contributors
|
|
173
|
+
[github-contributors-shield]: https://img.shields.io/github/contributors/lobehub/dumi-theme-lobehub?color=c4f042&labelColor=black&style=flat-square
|
|
174
|
+
[github-forks-link]: https://github.com/lobehub/dumi-theme-lobehub/network/members
|
|
175
|
+
[github-forks-shield]: https://img.shields.io/github/forks/lobehub/dumi-theme-lobehub?color=8ae8ff&labelColor=black&style=flat-square
|
|
176
|
+
[github-issues-link]: https://github.com/lobehub/dumi-theme-lobehub/issues
|
|
177
|
+
[github-issues-shield]: https://img.shields.io/github/issues/lobehub/dumi-theme-lobehub?color=ff80eb&labelColor=black&style=flat-square
|
|
178
|
+
[github-license-link]: https://github.com/lobehub/dumi-theme-lobehub/blob/main/LICENSE
|
|
179
|
+
[github-license-shield]: https://img.shields.io/github/license/lobehub/dumi-theme-lobehub?color=white&labelColor=black&style=flat-square
|
|
180
|
+
[github-releasedate-link]: https://github.com/lobehub/dumi-theme-lobehub/releases
|
|
181
|
+
[github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/dumi-theme-lobehub?labelColor=black&style=flat-square
|
|
182
|
+
[github-stars-link]: https://github.com/lobehub/dumi-theme-lobehub/network/stargazers
|
|
183
|
+
[github-stars-shield]: https://img.shields.io/github/stars/lobehub/dumi-theme-lobehub?color=ffcb47&labelColor=black&style=flat-square
|
|
184
|
+
[npm-release-link]: https://www.npmjs.com/package/@lobehub/chat
|
|
185
|
+
[npm-release-shield]: https://img.shields.io/npm/v/@lobehub/chat?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
|
186
|
+
[pr-welcome-link]: https://github.com/lobehub/dumi-theme-lobehub/pulls
|
|
187
|
+
[pr-welcome-shield]: https://img.shields.io/badge/%F0%9F%A4%AF%20PR%20WELCOME-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge
|
|
188
|
+
[profile-link]: https://github.com/lobehub
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
+
import { ApiHeaderConfig } from "../../types";
|
|
2
3
|
/**
|
|
3
4
|
* @title ApiHeaderProps
|
|
4
5
|
* @category Props
|
|
5
6
|
* @description ApiHeader 组件的 props 类型定义
|
|
6
7
|
*/
|
|
7
|
-
export interface ApiHeaderProps {
|
|
8
|
+
export interface ApiHeaderProps extends ApiHeaderConfig {
|
|
8
9
|
/**
|
|
9
10
|
* @title 组件名
|
|
10
11
|
* @description ApiHeader 组件的名称
|
|
@@ -21,21 +22,6 @@ export interface ApiHeaderProps {
|
|
|
21
22
|
* @description ApiHeader 组件的描述信息
|
|
22
23
|
*/
|
|
23
24
|
description?: string;
|
|
24
|
-
/**
|
|
25
|
-
* @title 文档链接
|
|
26
|
-
* @description ApiHeader 组件文档的链接
|
|
27
|
-
*/
|
|
28
|
-
docUrl?: string;
|
|
29
|
-
/**
|
|
30
|
-
* @title 包名
|
|
31
|
-
* @description ApiHeader 组件所在的包名
|
|
32
|
-
*/
|
|
33
|
-
pkg?: string;
|
|
34
|
-
/**
|
|
35
|
-
* @title 源代码链接
|
|
36
|
-
* @description ApiHeader 组件源代码的链接
|
|
37
|
-
*/
|
|
38
|
-
sourceUrl?: string;
|
|
39
25
|
/**
|
|
40
26
|
* @title 标题
|
|
41
27
|
* @description ApiHeader 组件的标题
|
|
@@ -19,6 +19,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
19
19
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
20
|
export var ApiHeader = /*#__PURE__*/memo(function (_ref) {
|
|
21
21
|
var title = _ref.title,
|
|
22
|
+
type = _ref.type,
|
|
22
23
|
componentName = _ref.componentName,
|
|
23
24
|
description = _ref.description,
|
|
24
25
|
defaultImport = _ref.defaultImport,
|
|
@@ -31,6 +32,7 @@ export var ApiHeader = /*#__PURE__*/memo(function (_ref) {
|
|
|
31
32
|
styles = _useStyles.styles;
|
|
32
33
|
var _useResponsive = useResponsive(),
|
|
33
34
|
mobile = _useResponsive.mobile;
|
|
35
|
+
var isDoc = type === 'doc';
|
|
34
36
|
var items = [sourceUrl && {
|
|
35
37
|
children: 'Source',
|
|
36
38
|
icon: /*#__PURE__*/_jsx(Icon, {
|
|
@@ -56,7 +58,7 @@ export var ApiHeader = /*#__PURE__*/memo(function (_ref) {
|
|
|
56
58
|
type: 'secondary',
|
|
57
59
|
children: description
|
|
58
60
|
})
|
|
59
|
-
}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
61
|
+
}), !isDoc && /*#__PURE__*/_jsxs(Flexbox, {
|
|
60
62
|
gap: mobile ? 16 : 24,
|
|
61
63
|
style: {
|
|
62
64
|
marginTop: 16
|
package/dist/pages/Docs/index.js
CHANGED
|
@@ -30,13 +30,18 @@ var Documents = /*#__PURE__*/memo(function () {
|
|
|
30
30
|
document.body.scrollTo(0, 0);
|
|
31
31
|
}, [location.pathname]);
|
|
32
32
|
var Comment = useCallback(function () {
|
|
33
|
-
return giscus && /*#__PURE__*/_jsx(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
return giscus && /*#__PURE__*/_jsx("div", {
|
|
34
|
+
style: {
|
|
35
|
+
marginTop: 64
|
|
36
|
+
},
|
|
37
|
+
children: /*#__PURE__*/_jsx(Giscus, {
|
|
38
|
+
category: giscus.category,
|
|
39
|
+
categoryId: giscus.categoryId,
|
|
40
|
+
id: "lobehub",
|
|
41
|
+
mapping: "title",
|
|
42
|
+
repo: giscus.repo,
|
|
43
|
+
repoId: giscus.repoId
|
|
44
|
+
})
|
|
40
45
|
});
|
|
41
46
|
}, [giscus, location.pathname]);
|
|
42
47
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
@@ -9,10 +9,11 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
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
10
|
import { Skeleton } from 'antd';
|
|
11
11
|
import { useResponsive } from 'antd-style';
|
|
12
|
+
import isEqual from 'fast-deep-equal';
|
|
12
13
|
import { memo, useEffect } from 'react';
|
|
13
14
|
import { Flexbox } from 'react-layout-kit';
|
|
14
15
|
import ContentFooter from "dumi/theme/slots/ContentFooter";
|
|
15
|
-
import { useSiteStore } from "../../store";
|
|
16
|
+
import { themeConfig, useSiteStore } from "../../store";
|
|
16
17
|
import { useStyles } from "./style";
|
|
17
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
19
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -22,7 +23,9 @@ var Content = /*#__PURE__*/memo(function (_ref) {
|
|
|
22
23
|
var loading = useSiteStore(function (s) {
|
|
23
24
|
return s.siteData.loading;
|
|
24
25
|
});
|
|
25
|
-
var
|
|
26
|
+
var _useSiteStore = useSiteStore(themeConfig, isEqual),
|
|
27
|
+
docStyle = _useSiteStore.docStyle;
|
|
28
|
+
var _useStyles = useStyles(docStyle === 'pure'),
|
|
26
29
|
styles = _useStyles.styles,
|
|
27
30
|
cx = _useStyles.cx;
|
|
28
31
|
var _useResponsive = useResponsive(),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const useStyles: (props?:
|
|
2
|
-
content:
|
|
1
|
+
export declare const useStyles: (props?: boolean | undefined) => import("antd-style").ReturnStyles<{
|
|
2
|
+
content: string;
|
|
3
3
|
}>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
var _templateObject;
|
|
1
|
+
var _templateObject, _templateObject2;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
|
-
export var useStyles = createStyles(function (_ref) {
|
|
5
|
-
var
|
|
4
|
+
export var useStyles = createStyles(function (_ref, isPure) {
|
|
5
|
+
var cx = _ref.cx,
|
|
6
|
+
token = _ref.token,
|
|
6
7
|
responsive = _ref.responsive,
|
|
7
8
|
css = _ref.css,
|
|
8
9
|
stylish = _ref.stylish;
|
|
9
10
|
return {
|
|
10
|
-
content: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
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))
|
|
11
12
|
};
|
|
12
13
|
});
|
|
@@ -9,10 +9,10 @@ var Features = /*#__PURE__*/memo(function () {
|
|
|
9
9
|
var theme = useTheme();
|
|
10
10
|
if (!(features !== null && features !== void 0 && features.length)) return;
|
|
11
11
|
return /*#__PURE__*/_jsx(F, {
|
|
12
|
-
contentMaxWidth: theme.contentMaxWidth,
|
|
13
12
|
items: features,
|
|
14
13
|
style: {
|
|
15
|
-
margin: '0 16px'
|
|
14
|
+
margin: '0 16px',
|
|
15
|
+
maxWidth: theme.contentMaxWidth
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
});
|
|
@@ -11,14 +11,14 @@ export var getColumns = function getColumns(_ref) {
|
|
|
11
11
|
title: 'Lobe UI',
|
|
12
12
|
url: 'https://github.com/lobehub/lobe-ui'
|
|
13
13
|
}, {
|
|
14
|
-
description: '
|
|
14
|
+
description: 'Awesome lint configs',
|
|
15
15
|
openExternal: true,
|
|
16
|
-
title: 'Lobe
|
|
16
|
+
title: 'Lobe Lint',
|
|
17
17
|
url: 'https://github.com/lobehub/lobe-chat'
|
|
18
18
|
}, {
|
|
19
|
-
description: '
|
|
19
|
+
description: 'Lobe Dumi Theme',
|
|
20
20
|
openExternal: true,
|
|
21
|
-
title: '
|
|
21
|
+
title: 'Dsigned for Dumi 2',
|
|
22
22
|
url: 'https://github.com/lobehub/lobe-flow'
|
|
23
23
|
}],
|
|
24
24
|
title: 'Resources'
|
|
@@ -65,15 +65,30 @@ export var getColumns = function getColumns(_ref) {
|
|
|
65
65
|
};
|
|
66
66
|
var more = {
|
|
67
67
|
items: [{
|
|
68
|
+
description: 'OpenAI Chat Bot',
|
|
69
|
+
openExternal: true,
|
|
70
|
+
title: '🤖 Lobe Chat',
|
|
71
|
+
url: 'https://github.com/lobehub/lobe-chat'
|
|
72
|
+
}, {
|
|
73
|
+
description: 'Stable Diffusion Extension',
|
|
74
|
+
openExternal: true,
|
|
75
|
+
title: '🤯 Lobe Theme',
|
|
76
|
+
url: 'https://github.com/lobehub/sd-webui-lobe-theme'
|
|
77
|
+
}, {
|
|
78
|
+
description: 'Gen intelligently',
|
|
79
|
+
openExternal: true,
|
|
80
|
+
title: '📝 Readme Generator',
|
|
81
|
+
url: 'https://ui.lobehub.com'
|
|
82
|
+
}, {
|
|
68
83
|
description: 'AI Commit CLI',
|
|
69
84
|
openExternal: true,
|
|
70
85
|
title: '💌 Lobe Commit',
|
|
71
86
|
url: 'https://github.com/lobehub/lobe-commit'
|
|
72
87
|
}, {
|
|
73
|
-
description: '
|
|
88
|
+
description: 'AI i18n CLI',
|
|
74
89
|
openExternal: true,
|
|
75
|
-
title: '
|
|
76
|
-
url: 'https://github.com/lobehub/lobe-
|
|
90
|
+
title: '🌐 Lobe i18n',
|
|
91
|
+
url: 'https://github.com/lobehub/lobe-commit'
|
|
77
92
|
}],
|
|
78
93
|
title: 'More Products'
|
|
79
94
|
};
|
|
@@ -16,18 +16,21 @@ var Footer = /*#__PURE__*/memo(function () {
|
|
|
16
16
|
}, isEqual),
|
|
17
17
|
themeConfig = _useSiteStore.themeConfig,
|
|
18
18
|
pkg = _useSiteStore.pkg;
|
|
19
|
+
var footerConfig = themeConfig.footerConfig,
|
|
20
|
+
footer = themeConfig.footer;
|
|
19
21
|
var githubUrl = useSiteStore(githubSel, shallow);
|
|
20
22
|
var _useStyles = useStyles(),
|
|
21
23
|
styles = _useStyles.styles,
|
|
22
24
|
theme = _useStyles.theme;
|
|
23
25
|
var _useResponsive = useResponsive(),
|
|
24
26
|
mobile = _useResponsive.mobile;
|
|
25
|
-
if (!
|
|
26
|
-
var
|
|
27
|
-
var columns = footer !== null && footer !== void 0 && footer.columns ? undefined : getColumns({
|
|
27
|
+
if (!footer) return;
|
|
28
|
+
var columns = footerConfig !== null && footerConfig !== void 0 && footerConfig.columns ? footerConfig === null || footerConfig === void 0 ? void 0 : footerConfig.columns : getColumns({
|
|
28
29
|
github: githubUrl || pkg.homepage
|
|
29
30
|
});
|
|
30
|
-
|
|
31
|
+
if (footerConfig !== null && footerConfig !== void 0 && footerConfig.resources) columns[0] = footerConfig === null || footerConfig === void 0 ? void 0 : footerConfig.resources;
|
|
32
|
+
if (footerConfig !== null && footerConfig !== void 0 && footerConfig.resources) columns[0] = footerConfig === null || footerConfig === void 0 ? void 0 : footerConfig.resources;
|
|
33
|
+
var bottomFooter = (footerConfig === null || footerConfig === void 0 ? void 0 : footerConfig.bottom) || footer;
|
|
31
34
|
return /*#__PURE__*/_jsx(Foot, {
|
|
32
35
|
bottom: mobile ? /*#__PURE__*/_jsxs(Center, {
|
|
33
36
|
className: styles.container,
|
package/dist/slots/Logo/index.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { Logo as SiteLogo } from '@lobehub/ui';
|
|
1
|
+
import { Avatar, Logo as SiteLogo } from '@lobehub/ui';
|
|
2
2
|
import { useResponsive } from 'antd-style';
|
|
3
3
|
import { Link } from 'dumi';
|
|
4
4
|
import isEqual from 'fast-deep-equal';
|
|
5
5
|
import { memo } from 'react';
|
|
6
|
+
import { themeConfig } from "../../store/selectors/siteBasicInfo";
|
|
6
7
|
import { useSiteStore } from "../../store/useSiteStore";
|
|
7
8
|
import { useStyles } from "./style";
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
12
|
var Logo = /*#__PURE__*/memo(function () {
|
|
12
|
-
var
|
|
13
|
-
return s.siteData.themeConfig;
|
|
14
|
-
}, isEqual);
|
|
13
|
+
var config = useSiteStore(themeConfig, isEqual);
|
|
15
14
|
var locale = useSiteStore(function (s) {
|
|
16
15
|
return s.locale;
|
|
17
16
|
}, isEqual);
|
|
@@ -20,18 +19,18 @@ var Logo = /*#__PURE__*/memo(function () {
|
|
|
20
19
|
cx = _useStyles.cx;
|
|
21
20
|
var _useResponsive = useResponsive(),
|
|
22
21
|
mobile = _useResponsive.mobile;
|
|
23
|
-
return
|
|
22
|
+
return config && /*#__PURE__*/_jsx(Link, {
|
|
24
23
|
className: cx(styles),
|
|
25
24
|
to: 'base' in locale ? locale.base : '/',
|
|
26
|
-
children:
|
|
27
|
-
children: [/*#__PURE__*/_jsx(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}),
|
|
25
|
+
children: config.logo ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
26
|
+
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
27
|
+
avatar: config.logo,
|
|
28
|
+
size: mobile ? 32 : 36
|
|
29
|
+
}), config.name]
|
|
31
30
|
}) : /*#__PURE__*/_jsx(SiteLogo, {
|
|
32
|
-
extra:
|
|
31
|
+
extra: config.name,
|
|
33
32
|
size: mobile ? 32 : 36,
|
|
34
|
-
type:
|
|
33
|
+
type: config.logoType || 'combine'
|
|
35
34
|
})
|
|
36
35
|
});
|
|
37
36
|
});
|
|
@@ -29,6 +29,8 @@ export var apiHeaderSel = function apiHeaderSel(s) {
|
|
|
29
29
|
return rawString.replace('{github}', REPO_BASE).replace('{atomId}', fm.atomId || '').replace('{title}', fm.title).replace('{locale}', localeId);
|
|
30
30
|
};
|
|
31
31
|
var _ref = s.siteData.themeConfig.apiHeader || {},
|
|
32
|
+
_ref$type = _ref.type,
|
|
33
|
+
type = _ref$type === void 0 ? 'component' : _ref$type,
|
|
32
34
|
_ref$pkg = _ref.pkg,
|
|
33
35
|
package_ = _ref$pkg === void 0 ? s.siteData.pkg.name : _ref$pkg,
|
|
34
36
|
sourceUrlMatch = _ref.sourceUrl,
|
|
@@ -45,6 +47,7 @@ export var apiHeaderSel = function apiHeaderSel(s) {
|
|
|
45
47
|
docUrl: documentUrl,
|
|
46
48
|
pkg: displayPackage,
|
|
47
49
|
sourceUrl: sourceUrl,
|
|
48
|
-
title: fm.title
|
|
50
|
+
title: fm.title,
|
|
51
|
+
type: type
|
|
49
52
|
};
|
|
50
53
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SiteStore } from '../useSiteStore';
|
|
2
|
+
export declare const themeConfig: (s: SiteStore) => import("../..").SiteThemeConfig;
|
|
2
3
|
export declare const siteTitleSel: (s: SiteStore) => string | undefined;
|
|
3
4
|
export declare const githubSel: (s: SiteStore) => string;
|
|
4
5
|
export declare const discordSel: (s: SiteStore) => "" | `https://discord.gg/${string}`;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { FeaturesProps, FooterProps, HeroProps } from '@lobehub/ui';
|
|
1
|
+
import type { FeaturesProps, FooterProps, HeroProps, LogoProps } from '@lobehub/ui';
|
|
2
|
+
import { FooterColumn } from 'rc-footer/es/column';
|
|
2
3
|
import type { SiteCustomToken } from "../styles/customToken";
|
|
3
4
|
import type { HeroConfig } from './hero';
|
|
4
5
|
export interface ApiHeaderConfig {
|
|
@@ -6,15 +7,19 @@ export interface ApiHeaderConfig {
|
|
|
6
7
|
match?: string[];
|
|
7
8
|
pkg?: string;
|
|
8
9
|
sourceUrl?: string | false;
|
|
10
|
+
type?: 'component' | 'doc';
|
|
9
11
|
}
|
|
10
12
|
export interface FooterConfig {
|
|
11
13
|
bottom?: FooterProps['bottom'];
|
|
12
14
|
columns?: FooterProps['columns'];
|
|
15
|
+
moreProducts?: FooterColumn;
|
|
16
|
+
resources?: FooterColumn;
|
|
13
17
|
}
|
|
14
18
|
export interface SiteThemeConfig {
|
|
15
19
|
actions: HeroProps['actions'];
|
|
16
20
|
apiHeader?: ApiHeaderConfig | false;
|
|
17
21
|
description?: string;
|
|
22
|
+
docStyle?: 'block' | 'pure';
|
|
18
23
|
features: FeaturesProps['items'];
|
|
19
24
|
footer?: string | false;
|
|
20
25
|
footerConfig?: FooterConfig;
|
|
@@ -27,6 +32,7 @@ export interface SiteThemeConfig {
|
|
|
27
32
|
hero?: HeroConfig | Record<string, HeroConfig>;
|
|
28
33
|
hideHomeNav?: boolean;
|
|
29
34
|
logo?: string;
|
|
35
|
+
logoType?: LogoProps['type'];
|
|
30
36
|
name?: string;
|
|
31
37
|
siteToken?: SiteConfigToken;
|
|
32
38
|
socialLinks?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dumi-theme-lobehub",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.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",
|