dumi-theme-lobehub 2.0.2 → 2.0.3

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.
@@ -1,35 +1,27 @@
1
1
  import { ThemeProvider } from '@lobehub/ui';
2
- import { StyleProvider, extractStaticStyle } from 'antd-style';
3
2
  import 'antd/dist/reset.css';
4
3
  import isEqual from 'fast-deep-equal';
5
4
  import { memo } from 'react';
6
5
  import GlobalStyle from "./GlobalStyle";
7
6
  import { siteSelectors, useSiteStore, useThemeStore } from "../../store";
8
7
  import _customToken from "../../styles/customToken";
9
-
10
- //@ts-ignore
11
8
  import { jsx as _jsx } from "react/jsx-runtime";
12
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
- global.__ANTD_CACHE__ = extractStaticStyle.cache;
14
10
  export default /*#__PURE__*/memo(function (_ref) {
15
11
  var children = _ref.children;
16
12
  var themeMode = useThemeStore(function (st) {
17
13
  return st.themeMode;
18
14
  });
19
15
  var userToken = useSiteStore(siteSelectors.token, isEqual);
20
- return /*#__PURE__*/_jsx(StyleProvider, {
21
- cache: extractStaticStyle.cache,
22
- speedy: process.env.NODE_ENV === 'production',
23
- children: /*#__PURE__*/_jsxs(ThemeProvider, {
24
- appearance: themeMode !== 'auto' ? themeMode : undefined,
25
- customToken: function customToken(themeToken) {
26
- return Object.assign({}, _customToken(themeToken), userToken);
27
- },
28
- theme: {
29
- cssVar: true
30
- },
31
- themeMode: themeMode,
32
- children: [/*#__PURE__*/_jsx(GlobalStyle, {}), children]
33
- })
16
+ return /*#__PURE__*/_jsxs(ThemeProvider, {
17
+ appearance: themeMode !== 'auto' ? themeMode : undefined,
18
+ customToken: function customToken(themeToken) {
19
+ return Object.assign({}, _customToken(themeToken), userToken);
20
+ },
21
+ theme: {
22
+ cssVar: true
23
+ },
24
+ themeMode: themeMode,
25
+ children: [/*#__PURE__*/_jsx(GlobalStyle, {}), children]
34
26
  });
35
27
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dumi-theme-lobehub",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
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",