dumi-theme-lobehub 1.10.3 → 1.10.5

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
@@ -38,6 +38,8 @@ dumi-theme-lobehub is a documentation site theme package designed for `Dumi 2`.
38
38
  - [🤝 Contributing](#-contributing)
39
39
  - [🔗 Links](#-links)
40
40
  - [More Products](#more-products)
41
+ - [Design Resources](#design-resources)
42
+ - [Development Resources](#development-resources)
41
43
 
42
44
  ####
43
45
 
@@ -192,9 +194,22 @@ Contributions of all types are more than welcome, if you are interested in contr
192
194
 
193
195
  ### More Products
194
196
 
195
- - **[🍭 Lobe UI](https://github.com/lobehub/lobe-ui)** - An open-source UI component library for building AIGC web apps.
196
- - **[🤖 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.
197
- - **[🤯 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.
197
+ - **[🤯 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.
198
+ - **[🅰️ 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.
199
+ - **[🧸 Lobe Vidol](https://github.com/lobehub/lobe-vidol)** - Experience the magic of virtual idol creation with Lobe Vidol, enjoy the elegance of our Exquisite UI Design, dance along using MMD Dance Support, and engage in Smooth Conversations.
200
+
201
+ ### Design Resources
202
+
203
+ - **[🍭 Lobe UI](https://ui.lobehub.com)** - An open-source UI component library for building AIGC web apps.
204
+ - **[🥨 Lobe Icons](https://lobehub.com/icons)** - Popular AI / LLM Model Brand SVG Logo and Icon Collection.
205
+ - **[📊 Lobe Charts](https://charts.lobehub.com)** - React modern charts components built on recharts
206
+
207
+ ### Development Resources
208
+
209
+ - **[🎤 Lobe TTS](https://tts.lobehub.com)** - A high-quality & reliable TTS/STT library for Server and Browser
210
+ - **[🌏 Lobe i18n](https://github.com/lobehub/lobe-cli-toolbox/blob/master/packages/lobe-i18n)** - Automation ai tool for the i18n (internationalization) translation process.
211
+
212
+ [More Resources](https://lobehub.com/resources)
198
213
 
199
214
  <div align="right">
200
215
 
@@ -13,21 +13,23 @@ var Documents = /*#__PURE__*/memo(function () {
13
13
  var outlet = useOutlet();
14
14
  var _useResponsive = useResponsive(),
15
15
  mobile = _useResponsive.mobile;
16
- var _useSiteStore = useSiteStore(function (st) {
16
+ var _useSiteStore = useSiteStore(function (s) {
17
17
  return {
18
- giscus: siteSelectors.giscus(st),
19
- isApiPage: apiHeaderSelectors.isApiPage(st)
18
+ giscus: siteSelectors.giscus(s),
19
+ isApiPage: apiHeaderSelectors.isApiPage(s),
20
+ pathname: s.location.pathname
20
21
  };
21
22
  }),
22
23
  isApiPage = _useSiteStore.isApiPage,
23
- giscus = _useSiteStore.giscus;
24
+ giscus = _useSiteStore.giscus,
25
+ pathname = _useSiteStore.pathname;
24
26
  var _useStyles = useStyles(),
25
27
  styles = _useStyles.styles;
26
28
  useEffect(function () {
27
29
  var _window, _document;
28
30
  (_window = window) === null || _window === void 0 || _window.scrollTo(0, 0);
29
31
  (_document = document) === null || _document === void 0 || _document.body.scrollTo(0, 0);
30
- }, [location.pathname]);
32
+ }, [pathname]);
31
33
  var Comment = useCallback(function () {
32
34
  return giscus && /*#__PURE__*/_jsx("div", {
33
35
  style: {
@@ -36,13 +38,13 @@ var Documents = /*#__PURE__*/memo(function () {
36
38
  children: /*#__PURE__*/_jsx(Giscus, {
37
39
  category: giscus.category,
38
40
  categoryId: giscus.categoryId,
39
- id: "lobehub",
41
+ id: "giscus",
40
42
  mapping: "title",
41
43
  repo: giscus.repo,
42
44
  repoId: giscus.repoId
43
45
  })
44
46
  });
45
- }, [giscus, location.pathname]);
47
+ }, [giscus, pathname]);
46
48
  return /*#__PURE__*/_jsxs(Center, {
47
49
  className: styles.content,
48
50
  style: {
@@ -39,7 +39,7 @@ var import_node_path = require("node:path");
39
39
  var import_utils = require("./utils");
40
40
  var SSRPlugin = (api) => {
41
41
  api.describe({
42
- key: "@"
42
+ key: "lobe-docs"
43
43
  });
44
44
  if (!api.userConfig.ssr)
45
45
  return;
@@ -59,7 +59,7 @@ var SSRPlugin = (api) => {
59
59
  };
60
60
  api.modifyExportHTMLFiles(
61
61
  (files) => files.filter((f) => !f.path.includes(":")).map((file) => {
62
- const antdCache = global.__LOBE_CACHE__;
62
+ const antdCache = global.__ANTD_CACHE__;
63
63
  const styles = (0, import_antd_style.extractStaticStyle)(file.content, { antdCache });
64
64
  for (const result of styles) {
65
65
  api.logger.event(
@@ -77,12 +77,13 @@ var SingleSwitch = /*#__PURE__*/memo(function (_ref2) {
77
77
  });
78
78
  });
79
79
  var LangSwitch = /*#__PURE__*/memo(function () {
80
- var locales = useSiteStore(function (s) {
81
- return s.siteData.locales;
82
- });
83
- var current = useSiteStore(function (s) {
84
- return s.locale;
85
- });
80
+ var _useSiteStore = useSiteStore(function (s) {
81
+ return [s.siteData.locales, s.locale, s.location.pathname];
82
+ }),
83
+ _useSiteStore2 = _slicedToArray(_useSiteStore, 3),
84
+ locales = _useSiteStore2[0],
85
+ current = _useSiteStore2[1],
86
+ pathname = _useSiteStore2[2];
86
87
 
87
88
  // do not render in single language
88
89
  if (locales.length <= 1) return;
@@ -90,12 +91,12 @@ var LangSwitch = /*#__PURE__*/memo(function () {
90
91
  onChange: function onChange(index) {
91
92
  console.log(getTargetLocalePath({
92
93
  current: current,
93
- pathname: location.pathname,
94
+ pathname: pathname,
94
95
  target: locales[index]
95
96
  }));
96
97
  history.push(getTargetLocalePath({
97
98
  current: current,
98
- pathname: location.pathname,
99
+ pathname: pathname,
99
100
  target: locales[index]
100
101
  }));
101
102
  },
@@ -9,10 +9,11 @@ import { Icon } from '@lobehub/ui';
9
9
  import animateScrollTo from 'animated-scroll-to';
10
10
  import { Empty, Typography } from 'antd';
11
11
  import { useTheme } from 'antd-style';
12
- import { FormattedMessage, Link, history, useLocation } from 'dumi';
12
+ import { FormattedMessage, Link, history } from 'dumi';
13
13
  import { FileBox, FileIcon, HeadingIcon, LetterText } from 'lucide-react';
14
14
  import React, { Fragment, memo, useCallback, useEffect, useState } from 'react';
15
15
  import { Center, Flexbox } from 'react-layout-kit';
16
+ import { siteSelectors, useSiteStore } from "../../store";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
  import { Fragment as _Fragment } from "react/jsx-runtime";
18
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -93,12 +94,16 @@ var SearchResult = /*#__PURE__*/memo(function (props) {
93
94
  _useState4 = _slicedToArray(_useState3, 2),
94
95
  activeIndex = _useState4[0],
95
96
  setActiveIndex = _useState4[1];
96
- var _useLocation = useLocation(),
97
- pathname = _useLocation.pathname;
97
+ var _useSiteStore = useSiteStore(function (s) {
98
+ return [s.location.pathname, siteSelectors.hostname(s)];
99
+ }),
100
+ _useSiteStore2 = _slicedToArray(_useSiteStore, 2),
101
+ pathname = _useSiteStore2[0],
102
+ hostname = _useSiteStore2[1];
98
103
  var onItemSelect = function onItemSelect(item) {
99
- var _props$onItemSelect;
104
+ var _props$onItemSelect, _location;
100
105
  (_props$onItemSelect = props.onItemSelect) === null || _props$onItemSelect === void 0 || _props$onItemSelect.call(props, item);
101
- var url = new URL(item === null || item === void 0 ? void 0 : item.link, location.origin);
106
+ var url = new URL(item === null || item === void 0 ? void 0 : item.link, hostname || ((_location = location) === null || _location === void 0 ? void 0 : _location.origin));
102
107
  if ((url === null || url === void 0 ? void 0 : url.pathname) === pathname && !url.hash) {
103
108
  setTimeout(function () {
104
109
  animateScrollTo(0, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dumi-theme-lobehub",
3
- "version": "1.10.3",
3
+ "version": "1.10.5",
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",