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