dumi-theme-lobehub 1.6.1 → 1.7.1

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
@@ -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
- [Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url]
14
-
15
- <!-- SHIELD GROUP -->
16
-
17
- [![release][release-shield]][release-url]
18
- [![releaseDate][release-date-shield]][release-date-url]
19
- [![ciTest][ci-test-shield]][ci-test-url]
20
- [![ciRelease][ci-release-shield]][ci-release-url] <br/>
21
- [![contributors][contributors-shield]][contributors-url]
22
- [![forks][forks-shield]][forks-url]
23
- [![stargazers][stargazers-shield]][stargazers-url]
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
  ![](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
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
- Quick Start Installation It is recommended to use `pnpm` for installation:
61
+ To install `dumi-theme-lobehub`, run the following command:
62
+
63
+ [![][bun-shield]][bun-link]
63
64
 
64
65
  ```bash
65
- pnpm add dumi-theme-antd-style -D
66
+ $ bun add dumi dumi-theme-lobehub
66
67
  ```
67
68
 
68
69
  <div align="right">
@@ -80,6 +81,7 @@ interface SiteThemeConfig {
80
81
  actions: HeroProps['actions'];
81
82
  apiHeader?: ApiHeaderConfig | false;
82
83
  description?: string;
84
+ docStyle?: 'block' | 'pure';
83
85
  features: FeaturesProps['items'];
84
86
  footer?: string | false;
85
87
  footerConfig?: FooterConfig;
@@ -92,6 +94,7 @@ interface SiteThemeConfig {
92
94
  hero?: HeroConfig | Record<string, HeroConfig>;
93
95
  hideHomeNav?: boolean;
94
96
  logo?: string;
97
+ logoType?: LogoProps['type'];
95
98
  name?: string;
96
99
  siteToken?: SiteConfigToken;
97
100
  socialLinks?: {
@@ -102,7 +105,8 @@ interface SiteThemeConfig {
102
105
  }
103
106
  ```
104
107
 
105
- > 👉 Tip: 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).
108
+ > **Note**\
109
+ > 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
110
 
107
111
  <div align="right">
108
112
 
@@ -112,17 +116,17 @@ interface SiteThemeConfig {
112
116
 
113
117
  ## ⌨️ Local Development
114
118
 
115
- You can use Gitpod for online development:
119
+ You can use Github Codespaces for online development:
116
120
 
117
- [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][gitpod-url]
121
+ [![][github-codespace-shield]][github-codespace-link]
118
122
 
119
123
  Or clone it for local development:
120
124
 
121
125
  ```bash
122
126
  $ git clone https://github.com/lobehub/dumi-theme-lobehub.git
123
127
  $ cd dumi-theme-lobehub
124
- $ pnpm install
125
- $ pnpm start
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
- <!-- CONTRIBUTION GROUP -->
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
- <a href="https://github.com/canisminor1990" title="canisminor1990">
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
- <!-- CONTRIBUTION END -->
144
+ [![][github-contrib-shield]][github-contrib-link]
154
145
 
155
146
  <div align="right">
156
147
 
@@ -158,58 +149,53 @@ $ pnpm start
158
149
 
159
150
  </div>
160
151
 
161
- ---
162
-
163
- #### 📝 License
164
-
165
- Copyright © 2023 [LobeHub][profile-url]. <br />
166
- This project is [MIT](./LICENSE) licensed.
167
-
168
- <!-- LINK GROUP -->
169
-
170
- [profile-url]: https://github.com/lobehub
171
- [gitpod-url]: https://gitpod.io/#https://github.com/lobehub/dumi-theme-lobehub
172
-
173
- <!-- SHIELD LINK GROUP -->
174
-
175
- [back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
152
+ ## 🔗 Links
176
153
 
177
- <!-- release -->
154
+ ### More Products
178
155
 
179
- [release-shield]: https://img.shields.io/npm/v/dumi-theme-lobehub?label=%F0%9F%A4%AF%20NPM
180
- [release-url]: https://www.npmjs.com/package/dumi-theme-lobehub
156
+ - **[🍭 Lobe UI](https://github.com/lobehub/lobe-ui)** - An open-source UI component library for building AIGC web apps.
157
+ - **[🤖 Lobe Chat](https://github.com/lobehub/lobe-chat)** - An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application.
158
+ - **[🤯 Lobe Theme](https://github.com/lobehub/sd-webui-lobe-theme)** - The modern theme for stable diffusion webui, exquisite interface design, highly customizable UI, and efficiency boosting features.
181
159
 
182
- <!-- releaseDate -->
183
-
184
- [release-date-shield]: https://img.shields.io/github/release-date/lobehub/dumi-theme-lobehub?style=flat
185
- [release-date-url]: https://github.com/lobehub/dumi-theme-lobehub/releases
186
-
187
- <!-- ciTest -->
188
-
189
- [ci-test-shield]: https://github.com/lobehub/dumi-theme-lobehub/workflows/Test%20CI/badge.svg
190
- [ci-test-url]: https://github.com/lobehub/dumi-theme-lobehub/actions?query=workflow%3ATest%20CI
191
-
192
- <!-- ciRelease -->
193
-
194
- [ci-release-shield]: https://github.com/lobehub/dumi-theme-lobehub/workflows/Release%20CI/badge.svg
195
- [ci-release-url]: https://github.com/lobehub/dumi-theme-lobehub/actions?query=workflow%3ARelease%20CI
196
-
197
- <!-- contributors -->
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
160
+ <div align="right">
201
161
 
202
- <!-- forks -->
162
+ [![][back-to-top]](#readme-top)
203
163
 
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
164
+ </div>
165
+ ---
206
166
 
207
- <!-- stargazers -->
167
+ #### 📝 License
208
168
 
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
169
+ Copyright © 2023 [LobeHub][profile-link]. <br />
170
+ This project is [MIT](./LICENSE) licensed.
211
171
 
212
- <!-- issues -->
172
+ <!-- LINK GROUP -->
213
173
 
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
174
+ [back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-black?style=flat-square
175
+ [bun-link]: https://bun.sh
176
+ [bun-shield]: https://img.shields.io/badge/-speedup%20with%20bun-black?logo=bun&style=for-the-badge
177
+ [github-action-release-link]: https://github.com/lobehub/dumi-theme-lobehub/actions/workflows/release.yml
178
+ [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
179
+ [github-action-test-link]: https://github.com/lobehub/dumi-theme-lobehub/actions/workflows/test.yml
180
+ [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
181
+ [github-codespace-link]: https://codespaces.new/lobehub/dumi-theme-lobehub
182
+ [github-codespace-shield]: https://github.com/codespaces/badge.svg
183
+ [github-contrib-link]: https://github.com/lobehub/dumi-theme-lobehub/graphs/contributors
184
+ [github-contrib-shield]: https://contrib.rocks/image?repo=lobehub%2Fdumi-theme-lobehub
185
+ [github-contributors-link]: https://github.com/lobehub/dumi-theme-lobehub/graphs/contributors
186
+ [github-contributors-shield]: https://img.shields.io/github/contributors/lobehub/dumi-theme-lobehub?color=c4f042&labelColor=black&style=flat-square
187
+ [github-forks-link]: https://github.com/lobehub/dumi-theme-lobehub/network/members
188
+ [github-forks-shield]: https://img.shields.io/github/forks/lobehub/dumi-theme-lobehub?color=8ae8ff&labelColor=black&style=flat-square
189
+ [github-issues-link]: https://github.com/lobehub/dumi-theme-lobehub/issues
190
+ [github-issues-shield]: https://img.shields.io/github/issues/lobehub/dumi-theme-lobehub?color=ff80eb&labelColor=black&style=flat-square
191
+ [github-license-link]: https://github.com/lobehub/dumi-theme-lobehub/blob/main/LICENSE
192
+ [github-license-shield]: https://img.shields.io/github/license/lobehub/dumi-theme-lobehub?color=white&labelColor=black&style=flat-square
193
+ [github-releasedate-link]: https://github.com/lobehub/dumi-theme-lobehub/releases
194
+ [github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/dumi-theme-lobehub?labelColor=black&style=flat-square
195
+ [github-stars-link]: https://github.com/lobehub/dumi-theme-lobehub/network/stargazers
196
+ [github-stars-shield]: https://img.shields.io/github/stars/lobehub/dumi-theme-lobehub?color=ffcb47&labelColor=black&style=flat-square
197
+ [npm-release-link]: https://www.npmjs.com/package/@lobehub/chat
198
+ [npm-release-shield]: https://img.shields.io/npm/v/@lobehub/chat?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
199
+ [pr-welcome-link]: https://github.com/lobehub/dumi-theme-lobehub/pulls
200
+ [pr-welcome-shield]: https://img.shields.io/badge/%F0%9F%A4%AF%20PR%20WELCOME-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge
201
+ [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
@@ -1,5 +1,4 @@
1
1
  import { ThemeProvider } from '@lobehub/ui';
2
- import { extractStaticStyle } from 'antd-style';
3
2
  import { memo } from 'react';
4
3
  import { shallow } from 'zustand/shallow';
5
4
  import Favicons from "../../components/Favicons";
@@ -8,19 +7,15 @@ import GlobalStyle from "./GlobalStyle";
8
7
  import { useThemeStore } from "../../store";
9
8
  import customToken from "../../styles/customToken";
10
9
  import DocumentLayout from "./DocumentLayout";
11
-
12
- // @ts-ignore
13
10
  import { jsx as _jsx } from "react/jsx-runtime";
14
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
12
  import { Fragment as _Fragment } from "react/jsx-runtime";
16
- global.__ANTD_CACHE__ = extractStaticStyle.cache;
17
13
  var App = /*#__PURE__*/memo(function () {
18
14
  var themeMode = useThemeStore(function (st) {
19
15
  return st.themeMode;
20
16
  }, shallow);
21
17
  return /*#__PURE__*/_jsxs(_Fragment, {
22
18
  children: [/*#__PURE__*/_jsx(Favicons, {}), /*#__PURE__*/_jsx(StoreUpdater, {}), /*#__PURE__*/_jsxs(ThemeProvider, {
23
- cache: extractStaticStyle.cache,
24
19
  customToken: customToken,
25
20
  themeMode: themeMode,
26
21
  children: [/*#__PURE__*/_jsx(GlobalStyle, {}), /*#__PURE__*/_jsx(DocumentLayout, {})]
@@ -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(Giscus, {
34
- category: giscus.category,
35
- categoryId: giscus.categoryId,
36
- id: "lobehub",
37
- mapping: "title",
38
- repo: giscus.repo,
39
- repoId: giscus.repoId
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 _useStyles = useStyles(),
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?: unknown) => import("antd-style").ReturnStyles<{
2
- content: import("antd-style").SerializedStyles;
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 token = _ref.token,
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 flex: 1;\n\n box-sizing: border-box;\n width: 100%;\n min-height: 400px;\n padding: 24px 48px;\n\n background-color: ", ";\n border-radius: 10px;\n\n &:has([data-page-tabs='true']) {\n padding-top: 8px;\n }\n\n ", " {\n padding: 8px 16px;\n border-radius: 0;\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 "])), token.colorBgContainer, responsive.mobile, stylish.markdown, token.colorText, token.motionEaseOut, token.colorText, token.colorTextTertiary, token.colorText)
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: 'Chatbot Client',
14
+ description: 'Awesome lint configs',
15
15
  openExternal: true,
16
- title: 'Lobe Chat',
16
+ title: 'Lobe Lint',
17
17
  url: 'https://github.com/lobehub/lobe-chat'
18
18
  }, {
19
- description: 'Node Flow Editor',
19
+ description: 'Lobe Dumi Theme',
20
20
  openExternal: true,
21
- title: 'Lobe Flow',
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: 'Lint Config',
88
+ description: 'AI i18n CLI',
74
89
  openExternal: true,
75
- title: '📐 Lobe Lint',
76
- url: 'https://github.com/lobehub/lobe-lint'
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 (!themeConfig.footer) return;
26
- var footer = themeConfig.footerConfig;
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
- var bottomFooter = (footer === null || footer === void 0 ? void 0 : footer.bottom) || themeConfig.footer;
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,
@@ -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 themeConfig = useSiteStore(function (s) {
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 themeConfig && /*#__PURE__*/_jsx(Link, {
22
+ return config && /*#__PURE__*/_jsx(Link, {
24
23
  className: cx(styles),
25
24
  to: 'base' in locale ? locale.base : '/',
26
- children: themeConfig.logo ? /*#__PURE__*/_jsxs(_Fragment, {
27
- children: [/*#__PURE__*/_jsx("img", {
28
- height: mobile ? 32 : 36,
29
- src: themeConfig.logo
30
- }), themeConfig.name]
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: themeConfig.name,
31
+ extra: config.name,
33
32
  size: mobile ? 32 : 36,
34
- type: "combine"
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}`;
@@ -1,3 +1,6 @@
1
+ export var themeConfig = function themeConfig(s) {
2
+ return s.siteData.themeConfig;
3
+ };
1
4
  export var siteTitleSel = function siteTitleSel(s) {
2
5
  return s.siteData.themeConfig.title;
3
6
  };
@@ -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.6.1",
3
+ "version": "1.7.1",
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",