dumi-theme-lobehub 2.0.2 → 2.0.4

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.
@@ -0,0 +1,3 @@
1
+ import { PropsWithChildren } from 'react';
2
+ declare const StyleRegistry: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
3
+ export default StyleRegistry;
@@ -0,0 +1,12 @@
1
+ 'use client';
2
+
3
+ import { StyleProvider, extractStaticStyle } from 'antd-style';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ var StyleRegistry = function StyleRegistry(_ref) {
6
+ var children = _ref.children;
7
+ return /*#__PURE__*/_jsx(StyleProvider, {
8
+ cache: extractStaticStyle.cache,
9
+ children: children
10
+ });
11
+ };
12
+ export default StyleRegistry;
@@ -1,25 +1,20 @@
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
8
+ import StyleRegistry from "./StyleRegistry";
11
9
  import { jsx as _jsx } from "react/jsx-runtime";
12
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
- global.__ANTD_CACHE__ = extractStaticStyle.cache;
14
11
  export default /*#__PURE__*/memo(function (_ref) {
15
12
  var children = _ref.children;
16
13
  var themeMode = useThemeStore(function (st) {
17
14
  return st.themeMode;
18
15
  });
19
16
  var userToken = useSiteStore(siteSelectors.token, isEqual);
20
- return /*#__PURE__*/_jsx(StyleProvider, {
21
- cache: extractStaticStyle.cache,
22
- speedy: process.env.NODE_ENV === 'production',
17
+ return /*#__PURE__*/_jsx(StyleRegistry, {
23
18
  children: /*#__PURE__*/_jsxs(ThemeProvider, {
24
19
  appearance: themeMode !== 'auto' ? themeMode : undefined,
25
20
  customToken: function customToken(themeToken) {
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.4",
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",