dumi-theme-lobehub 3.0.2 → 4.0.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.
Files changed (52) hide show
  1. package/dist/builtins/Previewer/index.js +2 -4
  2. package/dist/builtins/Previewer/style.d.ts +9 -9
  3. package/dist/builtins/Previewer/style.js +7 -8
  4. package/dist/components/ApiHeader/index.js +1 -3
  5. package/dist/components/ApiHeader/style.d.ts +7 -7
  6. package/dist/components/ApiHeader/style.js +7 -8
  7. package/dist/components/NativeSelect/SelectItem/index.d.ts +0 -1
  8. package/dist/components/NativeSelect/SelectItem/index.js +3 -6
  9. package/dist/components/NativeSelect/SelectItem/style.d.ts +2 -2
  10. package/dist/components/NativeSelect/SelectItem/style.js +7 -7
  11. package/dist/components/NativeSelect/index.d.ts +0 -1
  12. package/dist/components/NativeSelect/index.js +1 -6
  13. package/dist/components/NativeSelect/style.d.ts +2 -2
  14. package/dist/components/NativeSelect/style.js +7 -7
  15. package/dist/layouts/DemoLayout/GlobalStyle.js +2 -11
  16. package/dist/layouts/DocLayout/ConfigProvider.js +34 -30
  17. package/dist/layouts/DocLayout/GlobalStyle.js +2 -2
  18. package/dist/pages/Changelog/index.js +1 -3
  19. package/dist/pages/Docs/index.js +1 -3
  20. package/dist/pages/Docs/styles.d.ts +4 -4
  21. package/dist/pages/Docs/styles.js +5 -5
  22. package/dist/slots/Content/index.js +4 -5
  23. package/dist/slots/Content/style.d.ts +3 -2
  24. package/dist/slots/Content/style.js +6 -7
  25. package/dist/slots/ContentFooter/Linker.js +2 -4
  26. package/dist/slots/ContentFooter/Linker.style.d.ts +6 -6
  27. package/dist/slots/ContentFooter/Linker.style.js +6 -6
  28. package/dist/slots/ContentTabs/index.js +1 -3
  29. package/dist/slots/ContentTabs/style.d.ts +3 -3
  30. package/dist/slots/ContentTabs/style.js +8 -8
  31. package/dist/slots/Footer/index.js +3 -5
  32. package/dist/slots/Footer/style.d.ts +4 -4
  33. package/dist/slots/Footer/style.js +5 -6
  34. package/dist/slots/Header/Burger.js +1 -1
  35. package/dist/slots/Logo/index.js +3 -6
  36. package/dist/slots/Logo/style.d.ts +3 -1
  37. package/dist/slots/Logo/style.js +6 -5
  38. package/dist/slots/Navbar/index.js +4 -12
  39. package/dist/slots/PreviewerActions/index.js +1 -3
  40. package/dist/slots/PreviewerActions/style.d.ts +4 -4
  41. package/dist/slots/PreviewerActions/style.js +5 -5
  42. package/dist/slots/SearchBar/index.js +1 -3
  43. package/dist/slots/SearchBar/style.d.ts +5 -5
  44. package/dist/slots/SearchBar/style.js +9 -11
  45. package/dist/slots/SearchResult/index.js +7 -8
  46. package/dist/slots/Sidebar/index.js +1 -3
  47. package/dist/slots/Sidebar/style.d.ts +4 -4
  48. package/dist/slots/Sidebar/style.js +5 -5
  49. package/dist/store/selectors/site.js +1 -1
  50. package/dist/styles/index.d.ts +4 -0
  51. package/dist/styles/index.js +20 -0
  52. package/package.json +5 -6
@@ -7,8 +7,9 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
8
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
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
+ import { cx } from 'antd-style';
10
11
  import Previewer from 'dumi/theme-default/builtins/Previewer';
11
- import { useStyles } from "./style";
12
+ import { styles } from "./style";
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
13
14
  export default (function (_ref) {
14
15
  var center = _ref.center,
@@ -16,9 +17,6 @@ export default (function (_ref) {
16
17
  nopadding = _ref.nopadding,
17
18
  pure = _ref.pure,
18
19
  props = _objectWithoutProperties(_ref, _excluded);
19
- var _useStyles = useStyles(pure),
20
- styles = _useStyles.styles,
21
- cx = _useStyles.cx;
22
20
  return /*#__PURE__*/_jsx("div", {
23
21
  className: cx('ignore-markdown-style', styles.container, pure && styles.pure, center && styles.center, nopadding && styles.nopadding, styles[codePlacement]),
24
22
  children: /*#__PURE__*/_jsx(Previewer, _objectSpread({}, props))
@@ -1,9 +1,9 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- center: import("antd-style").SerializedStyles;
3
- container: import("antd-style").SerializedStyles;
4
- left: import("antd-style").SerializedStyles;
5
- nopadding: import("antd-style").SerializedStyles;
6
- pure: import("antd-style").SerializedStyles;
7
- right: import("antd-style").SerializedStyles;
8
- top: import("antd-style").SerializedStyles;
9
- }>;
1
+ export declare const styles: {
2
+ center: string;
3
+ container: string;
4
+ left: string;
5
+ nopadding: string;
6
+ pure: string;
7
+ right: string;
8
+ top: string;
9
+ };
@@ -1,18 +1,17 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createStyles } from 'antd-style';
4
- import { rgba } from 'polished';
5
- export var useStyles = createStyles(function (_ref) {
3
+ import { createStaticStyles } from 'antd-style';
4
+ var prefixCls = 'ant';
5
+ export var styles = createStaticStyles(function (_ref) {
6
6
  var css = _ref.css,
7
- token = _ref.token,
8
- prefixCls = _ref.prefixCls;
7
+ cssVar = _ref.cssVar;
9
8
  return {
10
9
  center: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .dumi-default-previewer-demo {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n "]))),
11
- container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .dumi-default-previewer {\n position: relative;\n\n overflow: hidden;\n display: flex;\n flex-direction: column;\n\n border-color: ", ";\n\n background: ", ";\n\n &-demo {\n flex: 1;\n border-top-color: ", " !important;\n\n > iframe {\n min-height: 600px;\n border-top: 1px solid ", ";\n }\n\n &[data-iframe]::before {\n background: ", ";\n }\n }\n\n &-meta {\n flex: 1;\n border-color: ", ";\n\n .", "-highlighter {\n pre {\n border-radius: 0 !important;\n }\n }\n }\n\n &-actions:not(:last-child) {\n border-color: ", ";\n }\n\n &-desc {\n .markdown {\n border-color: ", ";\n }\n\n h5 {\n background: linear-gradient(\n to top,\n ", ",\n ", " 50%,\n ", " 100%\n );\n\n a {\n color: ", ";\n }\n }\n }\n\n &-tabs::after {\n border-color: ", ";\n }\n }\n\n .dumi-default-tabs-tab {\n &-btn {\n color: ", ";\n }\n\n &-active {\n .dumi-default-tabs-tab-btn {\n color: ", ";\n }\n }\n }\n "])), token.colorBorderSecondary, token.colorBgContainerSecondary, token.colorBgContainerSecondary, token.colorBorderSecondary, token.colorFillContent, token.colorBorderSecondary, prefixCls, token.colorBorderSecondary, token.colorBorderSecondary, token.colorBgContainer, rgba(token.colorBgContainer, 0.95), rgba(token.colorBgContainer, 0), token.colorText, token.colorBorderSecondary, token.colorTextTertiary, token.colorText),
12
- left: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .dumi-default-previewer {\n flex-direction: row-reverse;\n\n &-demo {\n width: 50%;\n border-left: 1px solid ", ";\n }\n\n &-meta {\n width: 50%;\n }\n }\n "])), token.colorBorderSecondary),
10
+ container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .dumi-default-previewer {\n position: relative;\n\n overflow: hidden;\n display: flex;\n flex-direction: column;\n\n border-color: ", ";\n\n background: ", ";\n\n &-demo {\n flex: 1;\n border-top-color: ", " !important;\n\n > iframe {\n min-height: 600px;\n border-top: 1px solid ", ";\n }\n\n &[data-iframe]::before {\n background: ", ";\n }\n }\n\n &-meta {\n flex: 1;\n border-color: ", ";\n\n .", "-highlighter {\n pre {\n border-radius: 0 !important;\n }\n }\n }\n\n &-actions:not(:last-child) {\n border-color: ", ";\n }\n\n &-desc {\n .markdown {\n border-color: ", ";\n }\n\n h5 {\n background: linear-gradient(\n to top,\n ", ",\n color-mix(in srgb, ", " 95%, transparent) 50%,\n color-mix(in srgb, ", " 0%, transparent) 100%\n );\n\n a {\n color: ", ";\n }\n }\n }\n\n &-tabs::after {\n border-color: ", ";\n }\n }\n\n .dumi-default-tabs-tab {\n &-btn {\n color: ", ";\n }\n\n &-active {\n .dumi-default-tabs-tab-btn {\n color: ", ";\n }\n }\n }\n "])), cssVar.colorBorderSecondary, cssVar.colorBgLayout, cssVar.colorBgLayout, cssVar.colorBorderSecondary, cssVar.colorFillContent, cssVar.colorBorderSecondary, prefixCls, cssVar.colorBorderSecondary, cssVar.colorBorderSecondary, cssVar.colorBgContainer, cssVar.colorBgContainer, cssVar.colorBgContainer, cssVar.colorText, cssVar.colorBorderSecondary, cssVar.colorTextTertiary, cssVar.colorText),
11
+ left: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .dumi-default-previewer {\n flex-direction: row-reverse;\n\n &-demo {\n width: 50%;\n border-left: 1px solid ", ";\n }\n\n &-meta {\n width: 50%;\n }\n }\n "])), cssVar.colorBorderSecondary),
13
12
  nopadding: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .dumi-default-previewer-demo {\n padding: 0;\n }\n "]))),
14
13
  pure: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .dumi-default-previewer {\n margin: 0;\n padding: 0;\n border: none;\n }\n\n .dumi-default-previewer-demo {\n padding: 0;\n }\n\n .dumi-default-previewer-meta {\n display: none;\n }\n "]))),
15
- right: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .dumi-default-previewer {\n flex-direction: row;\n\n &-demo {\n width: 50%;\n border-right: 1px solid ", ";\n }\n\n &-meta {\n width: 50%;\n }\n }\n "])), token.colorBorderSecondary),
14
+ right: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .dumi-default-previewer {\n flex-direction: row;\n\n &-demo {\n width: 50%;\n border-right: 1px solid ", ";\n }\n\n &-meta {\n width: 50%;\n }\n }\n "])), cssVar.colorBorderSecondary),
16
15
  top: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .dumi-default-previewer {\n flex-direction: column-reverse;\n\n &-meta {\n display: flex;\n flex-direction: column;\n }\n\n &-actions {\n order: 1;\n }\n\n &-desc {\n order: 2;\n }\n }\n "])))
17
16
  };
18
17
  });
@@ -13,7 +13,7 @@ import { useResponsive } from 'antd-style';
13
13
  import { Edit3, Github } from 'lucide-react';
14
14
  import { memo } from 'react';
15
15
  import { Flexbox } from 'react-layout-kit';
16
- import { useStyles } from "./style";
16
+ import { styles } from "./style";
17
17
 
18
18
  /**
19
19
  * @title ApiHeaderProps
@@ -38,8 +38,6 @@ export var ApiHeader = /*#__PURE__*/memo(function (_ref) {
38
38
  _ref$serviceList = _ref.serviceList,
39
39
  serviceList = _ref$serviceList === void 0 ? [] : _ref$serviceList,
40
40
  rest = _objectWithoutProperties(_ref, _excluded);
41
- var _useStyles = useStyles(),
42
- styles = _useStyles.styles;
43
41
  var _useResponsive = useResponsive(),
44
42
  mobile = _useResponsive.mobile;
45
43
  var isDoc = type === 'doc';
@@ -1,7 +1,7 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- desc: import("antd-style").SerializedStyles;
3
- label: import("antd-style").SerializedStyles;
4
- meta: import("antd-style").SerializedStyles;
5
- text: import("antd-style").SerializedStyles;
6
- title: import("antd-style").SerializedStyles;
7
- }>;
1
+ export declare const styles: {
2
+ desc: string;
3
+ label: string;
4
+ meta: string;
5
+ text: string;
6
+ title: string;
7
+ };
@@ -1,16 +1,15 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
3
+ import { createStaticStyles, responsive } from 'antd-style';
4
+ import { lobeStaticStylish } from "../../styles";
5
+ export var styles = createStaticStyles(function (_ref) {
5
6
  var css = _ref.css,
6
- token = _ref.token,
7
- r = _ref.responsive,
8
- stylish = _ref.stylish;
7
+ cssVar = _ref.cssVar;
9
8
  return {
10
- desc: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", "px;\n "])), token.fontSizeLG, token.lineHeightLG),
9
+ desc: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: ", ";\n line-height: ", ";\n "])), cssVar.fontSizeLG, cssVar.lineHeightLG),
11
10
  label: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 80px;\n "]))),
12
11
  meta: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral([""]))),
13
- text: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n "])), stylish.resetLinkColor),
14
- title: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", " {\n margin-block: 0;\n font-size: 32px !important;\n }\n "])), r.mobile)
12
+ text: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n "])), lobeStaticStylish.resetLinkColor),
13
+ title: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", " {\n margin-block: 0;\n font-size: 32px !important;\n }\n "])), responsive.sm)
15
14
  };
16
15
  });
@@ -4,7 +4,6 @@ interface SelectItemProps {
4
4
  isActive?: boolean;
5
5
  isSelected?: boolean;
6
6
  label: any;
7
- prefixCls: string;
8
7
  ref?: ForwardedRef<HTMLButtonElement>;
9
8
  value: any;
10
9
  }
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["value", "label", "prefixCls", "isSelected", "isActive", "disabled"];
2
+ var _excluded = ["value", "label", "isSelected", "isActive", "disabled"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -7,20 +7,17 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
8
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
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
+ import { cx } from 'antd-style';
10
11
  import { forwardRef } from 'react';
11
- import { useStyles } from "./style";
12
+ import { styles } from "./style";
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
13
14
  var SelectItem = /*#__PURE__*/forwardRef(function (_ref, reference) {
14
15
  var value = _ref.value,
15
16
  label = _ref.label,
16
- prefixCls = _ref.prefixCls,
17
17
  isSelected = _ref.isSelected,
18
18
  isActive = _ref.isActive,
19
19
  disabled = _ref.disabled,
20
20
  props = _objectWithoutProperties(_ref, _excluded);
21
- var _useStyles = useStyles(prefixCls),
22
- styles = _useStyles.styles,
23
- cx = _useStyles.cx;
24
21
  return /*#__PURE__*/_jsx("button", _objectSpread(_objectSpread({
25
22
  "aria-selected": isSelected,
26
23
  className: cx(styles.item, _defineProperty(_defineProperty({}, styles.selected, isSelected), styles.active, isActive)),
@@ -1,5 +1,5 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
1
+ export declare const styles: {
2
2
  active: string;
3
3
  item: string;
4
4
  selected: string;
5
- }>;
5
+ };
@@ -1,13 +1,13 @@
1
1
  var _templateObject, _templateObject2, _templateObject3;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref, prefixCls) {
3
+ import { createStaticStyles, cx } from 'antd-style';
4
+ var prefixCls = 'ant';
5
+ export var styles = createStaticStyles(function (_ref) {
5
6
  var css = _ref.css,
6
- cx = _ref.cx,
7
- token = _ref.token;
7
+ cssVar = _ref.cssVar;
8
8
  return {
9
- active: cx("".concat(prefixCls, "-item-active"), css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n "])), token.colorFillTertiary)),
10
- item: cx("".concat(prefixCls, "-item"), css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n all: unset;\n\n user-select: none;\n scroll-margin: 50px;\n\n display: block;\n\n box-sizing: inherit;\n width: 100%;\n padding: 12px 10px;\n\n font-family: ", ";\n font-weight: normal;\n line-height: 1;\n color: ", ";\n\n background: transparent;\n border-radius: 5px;\n\n &:hover {\n background: ", ";\n }\n "])), token.fontFamily, token.colorText, token.colorFillTertiary)),
11
- selected: cx("".concat(prefixCls, "-item-selected"), css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n background: ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n "])), token.colorPrimaryText, token.colorPrimaryBg, token.colorPrimaryTextHover, token.colorPrimaryBgHover))
9
+ active: cx("".concat(prefixCls, "-item-active"), css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n "])), cssVar.colorFillTertiary)),
10
+ item: cx("".concat(prefixCls, "-item"), css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n all: unset;\n\n user-select: none;\n scroll-margin: 50px;\n\n display: block;\n\n box-sizing: inherit;\n width: 100%;\n padding: 12px 10px;\n border-radius: 5px;\n\n font-family: ", ";\n font-weight: normal;\n line-height: 1;\n color: ", ";\n\n background: transparent;\n\n &:hover {\n background: ", ";\n }\n "])), cssVar.fontFamily, cssVar.colorText, cssVar.colorFillTertiary)),
11
+ selected: cx("".concat(prefixCls, "-item-selected"), css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n background: ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n "])), cssVar.colorPrimaryText, cssVar.colorPrimaryBg, cssVar.colorPrimaryTextHover, cssVar.colorPrimaryBgHover))
12
12
  };
13
13
  });
@@ -7,7 +7,6 @@ interface OptionType {
7
7
  export interface NativeSelectProps {
8
8
  onChange?: (index: number) => void;
9
9
  options?: OptionType[];
10
- prefixCls?: string;
11
10
  renderItem?: (item: OptionType, index: number) => ReactNode;
12
11
  renderValue?: (index: number) => ReactNode;
13
12
  style?: CSSProperties;
@@ -14,7 +14,7 @@ import { FloatingFocusManager, FloatingOverlay, FloatingPortal, autoUpdate, flip
14
14
  import { memo, useEffect, useRef, useState } from 'react';
15
15
  import useControlledState from 'use-merge-value';
16
16
  import SelectItem from "./SelectItem";
17
- import { useStyles } from "./style";
17
+ import { styles } from "./style";
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
19
  import { Fragment as _Fragment } from "react/jsx-runtime";
20
20
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -22,12 +22,10 @@ var NativeSelect = /*#__PURE__*/memo(function (_ref) {
22
22
  var _ref$options = _ref.options,
23
23
  options = _ref$options === void 0 ? [] : _ref$options,
24
24
  value = _ref.value,
25
- prefixCls = _ref.prefixCls,
26
25
  onChange = _ref.onChange,
27
26
  renderValue = _ref.renderValue,
28
27
  renderItem = _ref.renderItem,
29
28
  style = _ref.style;
30
- var cls = prefixCls !== null && prefixCls !== void 0 ? prefixCls : 'native-select';
31
29
  var _useControlledState = useControlledState(0, {
32
30
  onChange: onChange,
33
31
  value: value
@@ -35,8 +33,6 @@ var NativeSelect = /*#__PURE__*/memo(function (_ref) {
35
33
  _useControlledState2 = _slicedToArray(_useControlledState, 2),
36
34
  selectedIndex = _useControlledState2[0],
37
35
  setSelectedIndex = _useControlledState2[1];
38
- var _useStyles = useStyles(cls),
39
- styles = _useStyles.styles;
40
36
  var listReference = useRef([]);
41
37
  var listContentReference = useRef([]);
42
38
  var overflowReference = useRef(null);
@@ -200,7 +196,6 @@ var NativeSelect = /*#__PURE__*/memo(function (_ref) {
200
196
  isActive: index === activeIndex,
201
197
  isSelected: index === selectedIndex,
202
198
  label: renderItem ? renderItem(item, index) : item.label,
203
- prefixCls: cls,
204
199
  ref: function ref(node) {
205
200
  listReference.current[index] = node;
206
201
  listContentReference.current[index] = item.label;
@@ -1,4 +1,4 @@
1
- export declare const useStyles: (props?: string | undefined) => import("antd-style").ReturnStyles<{
1
+ export declare const styles: {
2
2
  button: string;
3
3
  container: string;
4
- }>;
4
+ };
@@ -1,13 +1,13 @@
1
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
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref, prefixCls) {
3
+ import { createStaticStyles, cx } from 'antd-style';
4
+ import { lobeStaticStylish } from "../../styles";
5
+ var prefixCls = 'ant';
6
+ export var styles = createStaticStyles(function (_ref) {
5
7
  var css = _ref.css,
6
- stylish = _ref.stylish,
7
- cx = _ref.cx,
8
- token = _ref.token;
8
+ cssVar = _ref.cssVar;
9
9
  return {
10
- button: cx("".concat(prefixCls, "-button"), css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n all: unset;\n\n cursor: default;\n user-select: none;\n\n padding: 8px;\n\n font-size: ", "px;\n line-height: 0;\n color: ", ";\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n\n -webkit-tap-highlight-color: transparent;\n\n &:focus-visible {\n border-color: ", ";\n box-shadow: 0 0 0 2px ", ";\n }\n "])), stylish.buttonDefaultHover, token.fontSize, token.colorTextSecondary, token.colorBgContainer, token.colorBorder, token.borderRadius, token.colorPrimary, token.colorPrimaryBg)),
11
- container: cx(prefixCls, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n user-select: none;\n scrollbar-width: none;\n\n overflow-y: auto;\n overscroll-behavior: contain;\n\n box-sizing: border-box;\n width: 160px;\n padding: 5px;\n\n font-size: ", ";\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n outline: 0;\n box-shadow: ", ";\n\n &::-webkit-scrollbar {\n display: none;\n }\n "])), token.fontSize, token.colorBgElevated, token.colorBorder, token.boxShadowSecondary))
10
+ button: cx("".concat(prefixCls, "-button"), css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n all: unset;\n\n cursor: default;\n user-select: none;\n\n padding: 8px;\n\n font-size: ", ";\n line-height: 0;\n color: ", ";\n\n background: ", ";\n\n border: 1px solid ", ";\n border-radius: ", ";\n\n -webkit-tap-highlight-color: transparent;\n\n &:focus-visible {\n border-color: ", ";\n box-shadow: 0 0 0 2px ", ";\n }\n "])), lobeStaticStylish.buttonDefaultHover, cssVar.fontSize, cssVar.colorTextSecondary, cssVar.colorBgContainer, cssVar.colorBorder, cssVar.borderRadius, cssVar.colorPrimary, cssVar.colorPrimaryBg)),
11
+ container: cx(prefixCls, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n user-select: none;\n scrollbar-width: none;\n\n overflow-y: auto;\n overscroll-behavior: contain;\n\n box-sizing: border-box;\n width: 160px;\n padding: 5px;\n border: 1px solid ", ";\n border-radius: 8px;\n\n font-size: ", ";\n\n background: ", ";\n outline: 0;\n box-shadow: ", ";\n\n &::-webkit-scrollbar {\n display: none;\n }\n "])), cssVar.colorBorder, cssVar.fontSize, cssVar.colorBgElevated, cssVar.boxShadowSecondary))
12
12
  };
13
13
  });
@@ -1,14 +1,5 @@
1
1
  var _templateObject;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createGlobalStyle } from 'antd-style';
4
- var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n html, body {\n background: ", ";\n }\n\n #root {\n min-height: 100vh;\n background: ", ";\n }\n\n #nprogress {\n .bar {\n background: ", ";\n }\n\n .peg {\n display: none !important;\n }\n\n .spinner {\n display: none;\n }\n }\n"])), function (_ref) {
5
- var theme = _ref.theme;
6
- return theme.colorBgContainerSecondary;
7
- }, function (_ref2) {
8
- var theme = _ref2.theme;
9
- return theme.colorBgContainerSecondary;
10
- }, function (_ref3) {
11
- var theme = _ref3.theme;
12
- return theme.colorText;
13
- });
3
+ import { createGlobalStyle, cssVar } from 'antd-style';
4
+ var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n html, body {\n background: ", ";\n }\n\n #root {\n min-height: 100vh;\n background: ", ";\n }\n\n #nprogress {\n .bar {\n background: ", ";\n }\n\n .peg {\n display: none !important;\n }\n\n .spinner {\n display: none;\n }\n }\n"])), cssVar.colorBgLayout, cssVar.colorBgLayout, cssVar.colorText);
14
5
  export default GlobalStyle;
@@ -1,41 +1,45 @@
1
1
  'use client';
2
2
 
3
+ import { ConfigProvider as LobehubConfigProvider } from '@lobehub/ui';
3
4
  import { ConfigProvider } from 'antd';
4
- import { useTheme } from 'antd-style';
5
+ import { cssVar } from 'antd-style';
6
+ import * as motion from 'motion/react-m';
5
7
  import { memo } from 'react';
6
8
  import { jsx as _jsx } from "react/jsx-runtime";
7
9
  var Config = /*#__PURE__*/memo(function (_ref) {
8
10
  var children = _ref.children;
9
- var theme = useTheme();
10
- return /*#__PURE__*/_jsx(ConfigProvider, {
11
- theme: {
12
- components: {
13
- Button: {
14
- contentFontSizeSM: 12
15
- },
16
- DatePicker: {
17
- activeBorderColor: theme.colorBorder,
18
- hoverBorderColor: theme.colorBorder
19
- },
20
- Input: {
21
- activeBorderColor: theme.colorBorder,
22
- hoverBorderColor: theme.colorBorder
23
- },
24
- InputNumber: {
25
- activeBorderColor: theme.colorBorder,
26
- hoverBorderColor: theme.colorBorder
27
- },
28
- Mentions: {
29
- activeBorderColor: theme.colorBorder,
30
- hoverBorderColor: theme.colorBorder
31
- },
32
- Select: {
33
- activeBorderColor: theme.colorBorder,
34
- hoverBorderColor: theme.colorBorder
11
+ return /*#__PURE__*/_jsx(LobehubConfigProvider, {
12
+ motion: motion,
13
+ children: /*#__PURE__*/_jsx(ConfigProvider, {
14
+ theme: {
15
+ components: {
16
+ Button: {
17
+ contentFontSizeSM: 12
18
+ },
19
+ DatePicker: {
20
+ activeBorderColor: cssVar.colorBorder,
21
+ hoverBorderColor: cssVar.colorBorder
22
+ },
23
+ Input: {
24
+ activeBorderColor: cssVar.colorBorder,
25
+ hoverBorderColor: cssVar.colorBorder
26
+ },
27
+ InputNumber: {
28
+ activeBorderColor: cssVar.colorBorder,
29
+ hoverBorderColor: cssVar.colorBorder
30
+ },
31
+ Mentions: {
32
+ activeBorderColor: cssVar.colorBorder,
33
+ hoverBorderColor: cssVar.colorBorder
34
+ },
35
+ Select: {
36
+ activeBorderColor: cssVar.colorBorder,
37
+ hoverBorderColor: cssVar.colorBorder
38
+ }
35
39
  }
36
- }
37
- },
38
- children: children
40
+ },
41
+ children: children
42
+ })
39
43
  });
40
44
  });
41
45
  export default Config;
@@ -3,10 +3,10 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
3
3
  import { createGlobalStyle } from 'antd-style';
4
4
  var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n html, body {\n background: ", ";\n }\n\n #root {\n min-height: 100vh;\n background: ", ";\n }\n\n #nprogress {\n .bar {\n background: ", ";\n }\n\n .peg {\n display: none !important;\n }\n\n .spinner {\n display: none;\n }\n }\n"])), function (_ref) {
5
5
  var theme = _ref.theme;
6
- return theme.colorBgContainerSecondary;
6
+ return theme.colorBgLayout;
7
7
  }, function (_ref2) {
8
8
  var theme = _ref2.theme;
9
- return theme.colorBgContainerSecondary;
9
+ return theme.colorBgLayout;
10
10
  }, function (_ref3) {
11
11
  var theme = _ref3.theme;
12
12
  return theme.colorText;
@@ -3,7 +3,7 @@ import isEqual from 'fast-deep-equal';
3
3
  import { memo, useEffect } from 'react';
4
4
  import { Center } from 'react-layout-kit';
5
5
  import { ApiHeader } from "../../components/ApiHeader";
6
- import { useStyles } from "../Docs/styles";
6
+ import { styles } from "../Docs/styles";
7
7
  import Content from "dumi/theme/slots/Content";
8
8
  import { siteSelectors, useSiteStore } from "../../store";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -19,8 +19,6 @@ var Changelog = /*#__PURE__*/memo(function (_ref) {
19
19
  };
20
20
  }, isEqual),
21
21
  fm = _useSiteStore.fm;
22
- var _useStyles = useStyles(),
23
- styles = _useStyles.styles;
24
22
  useEffect(function () {
25
23
  var _window, _document;
26
24
  (_window = window) === null || _window === void 0 || _window.scrollTo(0, 0);
@@ -5,7 +5,7 @@ import { Center } from 'react-layout-kit';
5
5
  import ApiHeader from "dumi/theme/slots/ApiHeader";
6
6
  import Content from "dumi/theme/slots/Content";
7
7
  import { apiHeaderSelectors, siteSelectors, useSiteStore } from "../../store";
8
- import { useStyles } from "./styles";
8
+ import { styles } from "./styles";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
11
  var Documents = /*#__PURE__*/memo(function (_ref) {
@@ -22,8 +22,6 @@ var Documents = /*#__PURE__*/memo(function (_ref) {
22
22
  isApiPage = _useSiteStore.isApiPage,
23
23
  giscus = _useSiteStore.giscus,
24
24
  pathname = _useSiteStore.pathname;
25
- var _useStyles = useStyles(),
26
- styles = _useStyles.styles;
27
25
  useEffect(function () {
28
26
  var _window, _document;
29
27
  (_window = window) === null || _window === void 0 || _window.scrollTo(0, 0);
@@ -1,4 +1,4 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- changelog: import("antd-style").SerializedStyles;
3
- content: import("antd-style").SerializedStyles;
4
- }>;
1
+ export declare const styles: {
2
+ changelog: string;
3
+ content: string;
4
+ };
@@ -1,11 +1,11 @@
1
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
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
3
+ import { createStaticStyles } from 'antd-style';
4
+ export var styles = createStaticStyles(function (_ref) {
5
5
  var css = _ref.css,
6
- token = _ref.token;
6
+ cssVar = _ref.cssVar;
7
7
  return {
8
- changelog: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .markdown {\n font-size: 16px;\n\n h1 {\n display: none;\n }\n\n h2,\n h3 {\n margin-bottom: 0;\n font-size: 28px;\n }\n\n sup {\n color: ", ";\n }\n\n details {\n font-size: 14px;\n }\n\n summary > kbd {\n margin-left: 6px;\n padding: unset;\n\n font-size: inherit;\n line-height: inherit;\n\n background: unset;\n border: unset;\n }\n\n a[href='/changelog#readme-top'] {\n display: block;\n margin-bottom: 32px;\n padding-bottom: 32px;\n border-bottom: 1px solid ", ";\n\n > img {\n display: none;\n }\n }\n }\n "])), token.colorTextDescription, token.colorBorderSecondary),
9
- content: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n max-width: ", "px;\n margin: 0 auto;\n "])), token.contentMaxWidth)
8
+ changelog: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .markdown {\n font-size: 16px;\n\n h1 {\n display: none;\n }\n\n h2,\n h3 {\n margin-bottom: 0;\n font-size: 28px;\n }\n\n sup {\n color: ", ";\n }\n\n details {\n font-size: 14px;\n }\n\n summary > kbd {\n margin-left: 6px;\n padding: unset;\n border: unset;\n\n font-size: inherit;\n line-height: inherit;\n\n background: unset;\n }\n\n a[href='/changelog#readme-top'] {\n display: block;\n margin-bottom: 32px;\n padding-bottom: 32px;\n border-bottom: 1px solid ", ";\n\n > img {\n display: none;\n }\n }\n }\n "])), cssVar.colorTextDescription, cssVar.colorBorderSecondary),
9
+ content: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n max-width: var(--lobe-content-max-width, 960px);\n margin: 0 auto;\n "])))
10
10
  };
11
11
  });
@@ -9,13 +9,13 @@ 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 { Block, Typography } from '@lobehub/ui';
11
11
  import { Skeleton } from 'antd';
12
- import { useResponsive } from 'antd-style';
12
+ import { useResponsive, cx } from 'antd-style';
13
13
  import isEqual from 'fast-deep-equal';
14
14
  import { memo, useEffect } from 'react';
15
15
  import { Flexbox } from 'react-layout-kit';
16
16
  import ContentFooter from "dumi/theme/slots/ContentFooter";
17
17
  import { siteSelectors, useSiteStore } from "../../store";
18
- import { useStyles } from "./style";
18
+ import { styles } from "./style";
19
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
20
  import { jsxs as _jsxs } from "react/jsx-runtime";
21
21
  var Content = /*#__PURE__*/memo(function (_ref) {
@@ -26,8 +26,7 @@ var Content = /*#__PURE__*/memo(function (_ref) {
26
26
  });
27
27
  var _useSiteStore = useSiteStore(siteSelectors.themeConfig, isEqual),
28
28
  docStyle = _useSiteStore.docStyle;
29
- var _useStyles = useStyles(docStyle === 'pure'),
30
- styles = _useStyles.styles;
29
+ var isPure = docStyle === 'pure';
31
30
  var _useResponsive = useResponsive(),
32
31
  mobile = _useResponsive.mobile;
33
32
  useEffect(function () {
@@ -38,7 +37,7 @@ var Content = /*#__PURE__*/memo(function (_ref) {
38
37
  width: '100%'
39
38
  }, props), {}, {
40
39
  children: [/*#__PURE__*/_jsxs(Block, {
41
- className: styles.content,
40
+ className: cx(styles.content, !isPure && styles.content_notPure),
42
41
  shadow: true,
43
42
  variant: 'filled',
44
43
  children: [/*#__PURE__*/_jsx(Skeleton, {
@@ -1,3 +1,4 @@
1
- export declare const useStyles: (props?: boolean | undefined) => import("antd-style").ReturnStyles<{
1
+ export declare const styles: {
2
2
  content: string;
3
- }>;
3
+ content_notPure: string;
4
+ };
@@ -1,12 +1,11 @@
1
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
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref, isPure) {
5
- var cx = _ref.cx,
6
- token = _ref.token,
7
- responsive = _ref.responsive,
8
- css = _ref.css;
3
+ import { createStaticStyles, responsive } from 'antd-style';
4
+ export var styles = createStaticStyles(function (_ref) {
5
+ var css = _ref.css,
6
+ cssVar = _ref.cssVar;
9
7
  return {
10
- content: cx(!isPure && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 24px 48px;\n border-radius: ", "px;\n background-color: ", ";\n\n ", " {\n padding: 8px 16px;\n border-radius: 0;\n }\n "])), token.borderRadiusLG, 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 .dumi-default-table-content {\n overflow: visible !important;\n font-size: 14px;\n }\n\n .dumi-default-badge {\n &:not([type]) {\n border: 1px solid ", ";\n color: ", ";\n background: ", ";\n }\n\n &[type='warning'] {\n border: 1px solid ", ";\n color: ", ";\n background: ", ";\n }\n\n &[type='error'] {\n border: 1px solid ", ";\n color: ", ";\n background: ", ";\n }\n\n &[type='success'] {\n border: 1px solid ", ";\n color: ", ";\n background: ", ";\n }\n }\n "])), token.colorInfoBorder, token.colorInfoText, token.colorInfoBg, token.colorWarningBorder, token.colorWarningText, token.colorWarningBg, token.colorErrorBorder, token.colorErrorText, token.colorErrorBg, token.colorSuccessBorder, token.colorSuccessText, token.colorSuccessBg))
8
+ content: css(_templateObject || (_templateObject = _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 .dumi-default-table-content {\n overflow: visible !important;\n font-size: 14px;\n }\n\n .dumi-default-badge {\n &:not([type]) {\n border: 1px solid ", ";\n color: ", ";\n background: ", ";\n }\n\n &[type='warning'] {\n border: 1px solid ", ";\n color: ", ";\n background: ", ";\n }\n\n &[type='error'] {\n border: 1px solid ", ";\n color: ", ";\n background: ", ";\n }\n\n &[type='success'] {\n border: 1px solid ", ";\n color: ", ";\n background: ", ";\n }\n }\n "])), cssVar.colorInfoBorder, cssVar.colorInfoText, cssVar.colorInfoBg, cssVar.colorWarningBorder, cssVar.colorWarningText, cssVar.colorWarningBg, cssVar.colorErrorBorder, cssVar.colorErrorText, cssVar.colorErrorBg, cssVar.colorSuccessBorder, cssVar.colorSuccessText, cssVar.colorSuccessBg),
9
+ content_notPure: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 24px 48px;\n border-radius: ", ";\n background-color: ", ";\n\n ", " {\n padding: 8px 16px;\n border-radius: 0;\n }\n "])), cssVar.borderRadiusLG, cssVar.colorBgContainer, responsive.sm)
11
10
  };
12
11
  });
@@ -1,9 +1,10 @@
1
1
  import { Icon } from '@lobehub/ui';
2
+ import { cx } from 'antd-style';
2
3
  import { Link } from 'dumi';
3
4
  import { ArrowLeft, ArrowRight } from 'lucide-react';
4
5
  import { memo, useMemo } from 'react';
5
6
  import { Flexbox } from 'react-layout-kit';
6
- import { useStyles } from "./Linker.style";
7
+ import { styles } from "./Linker.style";
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  import { Fragment as _Fragment } from "react/jsx-runtime";
9
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -11,9 +12,6 @@ var Linker = /*#__PURE__*/memo(function (_ref) {
11
12
  var title = _ref.title,
12
13
  link = _ref.link,
13
14
  type = _ref.type;
14
- var _useStyles = useStyles(),
15
- styles = _useStyles.styles,
16
- cx = _useStyles.cx;
17
15
  var navContent = useMemo(function () {
18
16
  switch (type) {
19
17
  case 'prev':
@@ -1,6 +1,6 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- alignmentEnd: import("antd-style").SerializedStyles;
3
- container: import("antd-style").SerializedStyles;
4
- nav: import("antd-style").SerializedStyles;
5
- title: import("antd-style").SerializedStyles;
6
- }>;
1
+ export declare const styles: {
2
+ alignmentEnd: string;
3
+ container: string;
4
+ nav: string;
5
+ title: string;
6
+ };
@@ -1,13 +1,13 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
5
- var token = _ref.token,
6
- css = _ref.css;
3
+ import { createStaticStyles } from 'antd-style';
4
+ export var styles = createStaticStyles(function (_ref) {
5
+ var css = _ref.css,
6
+ cssVar = _ref.cssVar;
7
7
  return {
8
8
  alignmentEnd: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n justify-content: flex-end;\n "]))),
9
- container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: pointer;\n\n min-width: 250px;\n padding: 16px 24px;\n\n background: ", ";\n border-radius: 8px;\n\n &:hover {\n background: ", ";\n }\n "])), token.colorBgContainer, token.colorFillTertiary),
10
- nav: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n "])), token.colorTextTertiary),
9
+ container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: pointer;\n\n min-width: 250px;\n padding: 16px 24px;\n border-radius: 8px;\n\n background: ", ";\n\n &:hover {\n background: ", ";\n }\n "])), cssVar.colorBgContainer, cssVar.colorFillTertiary),
10
+ nav: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n "])), cssVar.colorTextTertiary),
11
11
  title: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: 16px;\n "])))
12
12
  };
13
13
  });
@@ -7,15 +7,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
7
7
  import { Tabs } from '@lobehub/ui';
8
8
  import { useIntl } from 'dumi';
9
9
  import { memo } from 'react';
10
- import { useStyles } from "./style";
10
+ import { styles } from "./style";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  var ContentTabs = /*#__PURE__*/memo(function (_ref) {
13
13
  var tabs = _ref.tabs,
14
14
  key = _ref.tabKey,
15
15
  _onChange = _ref.onChange;
16
16
  var intl = useIntl();
17
- var _useStyles = useStyles(),
18
- styles = _useStyles.styles;
19
17
  // TODO: tab.Extra & tab.Action render
20
18
 
21
19
  return tabs && (tabs === null || tabs === void 0 ? void 0 : tabs.length) > 0 ? /*#__PURE__*/_jsx(Tabs, {
@@ -1,3 +1,3 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- cls: import("antd-style").SerializedStyles;
3
- }>;
1
+ export declare const styles: {
2
+ cls: string;
3
+ };
@@ -1,13 +1,13 @@
1
1
  var _templateObject;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
5
- var token = _ref.token,
6
- prefixCls = _ref.prefixCls,
7
- css = _ref.css;
8
- var prefix = ".".concat(prefixCls, "-tabs");
9
- var marginBlock = 8;
3
+ import { createStaticStyles } from 'antd-style';
4
+ var prefixCls = 'ant';
5
+ var prefix = ".".concat(prefixCls, "-tabs");
6
+ var marginBlock = 8;
7
+ export var styles = createStaticStyles(function (_ref) {
8
+ var css = _ref.css,
9
+ cssVar = _ref.cssVar;
10
10
  return {
11
- cls: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "-tab + ", "-tab {\n margin: 8px 4px !important;\n margin-block: ", "px;\n padding: 0 12px !important;\n }\n\n ", "-tab {\n color: ", ";\n transition: background-color 150ms ease-out;\n\n &:first-child {\n margin-block: ", "px;\n margin-inline: 0 4px;\n padding: 4px 12px !important;\n }\n\n &:hover {\n color: ", " !important;\n background: ", ";\n border-radius: 6px;\n }\n }\n "])), prefix, prefix, marginBlock, prefix, token.colorTextSecondary, marginBlock, token.colorText, token.colorFillTertiary)
11
+ cls: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "-tab + ", "-tab {\n margin: 8px 4px !important;\n margin-block: ", "px;\n padding: 0 12px !important;\n }\n\n ", "-tab {\n color: ", ";\n transition: background-color 150ms ease-out;\n\n &:first-child {\n margin-block: ", "px;\n margin-inline: 0 4px;\n padding: 4px 12px !important;\n }\n\n &:hover {\n border-radius: 6px;\n color: ", " !important;\n background: ", ";\n }\n }\n "])), prefix, prefix, marginBlock, prefix, cssVar.colorTextSecondary, marginBlock, cssVar.colorText, cssVar.colorFillTertiary)
12
12
  };
13
13
  });
@@ -1,12 +1,12 @@
1
1
  import { Footer as Foot } from '@lobehub/ui';
2
2
  import { Divider } from 'antd';
3
- import { useResponsive } from 'antd-style';
3
+ import { useResponsive, useTheme } from 'antd-style';
4
4
  import isEqual from 'fast-deep-equal';
5
5
  import { memo } from 'react';
6
6
  import { Center, Flexbox } from 'react-layout-kit';
7
7
  import { siteSelectors, useSiteStore } from "../../store";
8
8
  import { getColumns } from "./columns";
9
- import { useStyles } from "./style";
9
+ import { styles } from "./style";
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
12
  var Footer = /*#__PURE__*/memo(function () {
@@ -18,9 +18,7 @@ var Footer = /*#__PURE__*/memo(function () {
18
18
  var footerConfig = themeConfig.footerConfig,
19
19
  footer = themeConfig.footer;
20
20
  var githubUrl = useSiteStore(siteSelectors.github);
21
- var _useStyles = useStyles(),
22
- styles = _useStyles.styles,
23
- theme = _useStyles.theme;
21
+ var theme = useTheme();
24
22
  var _useResponsive = useResponsive(),
25
23
  mobile = _useResponsive.mobile;
26
24
  if (!footer) return;
@@ -1,4 +1,4 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- container: import("antd-style").SerializedStyles;
3
- footer: import("antd-style").SerializedStyles;
4
- }>;
1
+ export declare const styles: {
2
+ container: string;
3
+ footer: string;
4
+ };
@@ -1,13 +1,12 @@
1
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
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
3
+ import { createStaticStyles, responsive } from 'antd-style';
4
+ export var styles = createStaticStyles(function (_ref) {
5
5
  var css = _ref.css,
6
- responsive = _ref.responsive,
7
- token = _ref.token;
6
+ cssVar = _ref.cssVar;
8
7
  var prefix = "rc-footer";
9
8
  return {
10
- container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n grid-area: footer;\n align-self: stretch;\n\n color: ", ";\n text-align: center;\n\n border-top: 1px solid ", ";\n\n ", " {\n flex-direction: column;\n border: none;\n }\n "])), token.colorTextDescription, token.colorSplit, responsive.mobile),
11
- footer: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 14px;\n line-height: 1.5;\n color: ", ";\n background-color: ", ";\n\n &.", " {\n a {\n color: ", ";\n text-decoration: none;\n transition: all 0.3s;\n\n &:hover {\n color: ", ";\n }\n }\n }\n\n .", " {\n &-container {\n width: 100%;\n max-width: ", "px;\n margin: auto;\n padding: 60px 0 20px;\n }\n\n &-columns {\n display: flex;\n justify-content: space-around;\n }\n\n &-column {\n h2 {\n position: relative;\n\n margin: 0 auto;\n\n font-size: 16px;\n font-weight: 500;\n color: ", ";\n }\n\n &-icon {\n position: relative;\n top: -1px;\n\n display: inline-block;\n\n width: 22px;\n margin-inline-end: 0.5em;\n\n text-align: center;\n vertical-align: middle;\n\n > span,\n > svg,\n img {\n display: block;\n width: 100%;\n }\n }\n }\n\n &-item {\n margin: 12px 0;\n\n &-icon {\n position: relative;\n top: -1px;\n\n display: inline-block;\n\n width: 16px;\n margin-inline-end: 0.4em;\n\n text-align: center;\n vertical-align: middle;\n\n > span,\n > svg,\n img {\n display: block;\n width: 100%;\n }\n }\n\n &-separator {\n margin: 0 0.3em;\n }\n }\n\n &-bottom {\n &-container {\n width: 100%;\n max-width: 1200px;\n margin: 0 auto;\n padding: 16px 0;\n\n font-size: 16px;\n line-height: 32px;\n text-align: center;\n\n border-top: 1px solid ", ";\n }\n }\n\n &-light {\n color: rgba(0, 0, 0, 85%);\n background-color: transparent;\n\n h2,\n a {\n color: rgba(0, 0, 0, 85%);\n }\n }\n\n &-light &-bottom-container {\n border-top-color: #e8e8e8;\n }\n\n &-light &-item-separator,\n &-light &-item-description {\n color: rgba(0, 0, 0, 45%);\n }\n }\n\n ", " {\n .", " {\n text-align: center;\n\n &-container {\n padding: 40px 0;\n }\n\n &-columns {\n display: block;\n }\n\n &-column {\n display: block;\n margin-bottom: 40px;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n }\n "])), token.colorTextSecondary, token.colorBgLayout, prefix, token.colorTextTertiary, token.colorLinkHover, prefix, token.contentMaxWidth, token.colorText, token.colorBorderSecondary, responsive.mobile, prefix)
9
+ container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n grid-area: footer;\n align-self: stretch;\n\n border-top: 1px solid ", ";\n\n color: ", ";\n text-align: center;\n\n ", " {\n flex-direction: column;\n border: none;\n }\n "])), cssVar.colorSplit, cssVar.colorTextDescription, responsive.sm),
10
+ footer: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 14px;\n line-height: 1.5;\n color: ", ";\n background-color: ", ";\n\n &.", " {\n a {\n color: ", ";\n text-decoration: none;\n transition: all 0.3s;\n\n &:hover {\n color: ", ";\n }\n }\n }\n\n .", " {\n &-container {\n width: 100%;\n max-width: var(--lobe-content-max-width, 960px);\n margin: auto;\n padding: 60px 0 20px;\n }\n\n &-columns {\n display: flex;\n justify-content: space-around;\n }\n\n &-column {\n h2 {\n position: relative;\n\n margin: 0 auto;\n\n font-size: 16px;\n font-weight: 500;\n color: ", ";\n }\n\n &-icon {\n position: relative;\n top: -1px;\n\n display: inline-block;\n\n width: 22px;\n margin-inline-end: 0.5em;\n\n text-align: center;\n vertical-align: middle;\n\n > span,\n > svg,\n img {\n display: block;\n width: 100%;\n }\n }\n }\n\n &-item {\n margin: 12px 0;\n\n &-icon {\n position: relative;\n top: -1px;\n\n display: inline-block;\n\n width: 16px;\n margin-inline-end: 0.4em;\n\n text-align: center;\n vertical-align: middle;\n\n > span,\n > svg,\n img {\n display: block;\n width: 100%;\n }\n }\n\n &-separator {\n margin: 0 0.3em;\n }\n }\n\n &-bottom {\n &-container {\n width: 100%;\n max-width: 1200px;\n margin: 0 auto;\n padding: 16px 0;\n border-top: 1px solid ", ";\n\n font-size: 16px;\n line-height: 32px;\n text-align: center;\n }\n }\n\n &-light {\n color: rgba(0, 0, 0, 85%);\n background-color: transparent;\n\n h2,\n a {\n color: rgba(0, 0, 0, 85%);\n }\n }\n\n &-light &-bottom-container {\n border-top-color: #e8e8e8;\n }\n\n &-light &-item-separator,\n &-light &-item-description {\n color: rgba(0, 0, 0, 45%);\n }\n }\n\n ", " {\n .", " {\n text-align: center;\n\n &-container {\n padding: 40px 0;\n }\n\n &-columns {\n display: block;\n }\n\n &-column {\n display: block;\n margin-bottom: 40px;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n }\n "])), cssVar.colorTextSecondary, cssVar.colorBgLayout, prefix, cssVar.colorTextTertiary, cssVar.colorLinkHover, prefix, cssVar.colorText, cssVar.colorBorderSecondary, responsive.sm, prefix)
12
11
  };
13
12
  });
@@ -6,8 +6,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import { Burger as Menu } from '@lobehub/ui';
8
8
  import { Link } from 'dumi';
9
+ import { uniq } from 'es-toolkit';
9
10
  import isEqual from 'fast-deep-equal';
10
- import { uniq } from 'lodash-es';
11
11
  import { memo, useMemo, useState } from 'react';
12
12
  import { siteSelectors, useSiteStore } from "../../store";
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,13 +1,13 @@
1
1
  import { Avatar } from '@lobehub/ui';
2
2
  import { LobeHub as SiteLogo } from '@lobehub/ui/brand';
3
3
  import { Space } from 'antd';
4
- import { useResponsive } from 'antd-style';
4
+ import { useResponsive, cx } from 'antd-style';
5
5
  import { Link } from 'dumi';
6
6
  import isEqual from 'fast-deep-equal';
7
7
  import { memo } from 'react';
8
8
  import { siteSelectors } from "../../store";
9
9
  import { useSiteStore } from "../../store/useSiteStore";
10
- import { useStyles } from "./style";
10
+ import { styles } from "./style";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
13
  var Logo = /*#__PURE__*/memo(function () {
@@ -15,13 +15,10 @@ var Logo = /*#__PURE__*/memo(function () {
15
15
  var locale = useSiteStore(function (s) {
16
16
  return s.locale;
17
17
  }, isEqual);
18
- var _useStyles = useStyles(),
19
- styles = _useStyles.styles,
20
- cx = _useStyles.cx;
21
18
  var _useResponsive = useResponsive(),
22
19
  mobile = _useResponsive.mobile;
23
20
  return config && /*#__PURE__*/_jsx(Link, {
24
- className: cx(styles),
21
+ className: cx(styles.root),
25
22
  to: 'base' in locale ? locale.base : '/',
26
23
  children: config.logo ? /*#__PURE__*/_jsxs(Space, {
27
24
  children: [/*#__PURE__*/_jsx(Avatar, {
@@ -1 +1,3 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<import("antd-style").SerializedStyles>;
1
+ export declare const styles: {
2
+ root: string;
3
+ };
@@ -1,9 +1,10 @@
1
1
  var _templateObject;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
3
+ import { createStaticStyles, responsive } from 'antd-style';
4
+ export var styles = createStaticStyles(function (_ref) {
5
5
  var css = _ref.css,
6
- responsive = _ref.responsive,
7
- token = _ref.token;
8
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n\n font-size: 22px;\n font-weight: 500;\n line-height: 1;\n color: ", ";\n text-decoration: none;\n\n ", " {\n font-size: 18px;\n }\n "])), token.colorText, responsive.mobile);
6
+ cssVar = _ref.cssVar;
7
+ return {
8
+ root: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n\n font-size: 22px;\n font-weight: 500;\n line-height: 1;\n color: ", ";\n text-decoration: none;\n\n ", " {\n font-size: 18px;\n }\n "])), cssVar.colorText, responsive.sm)
9
+ };
9
10
  });
@@ -1,24 +1,16 @@
1
- var _templateObject;
2
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
1
  import { Tabs } from '@lobehub/ui';
4
- import { createStyles } from 'antd-style';
5
2
  import { Link, history } from 'dumi';
6
3
  import NavbarExtra from 'dumi/theme-default/slots/NavbarExtra';
7
4
  import { memo } from 'react';
8
5
  import { siteSelectors, useSiteStore } from "../../store";
6
+ import { lobeStaticStylish } from "../../styles";
9
7
  import { jsx as _jsx } from "react/jsx-runtime";
10
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
11
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
- var useStyles = createStyles(function (_ref) {
13
- var css = _ref.css,
14
- stylish = _ref.stylish;
15
- return {
16
- link: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n "])), stylish.resetLinkColor)
17
- };
18
- });
10
+ var styles = {
11
+ link: lobeStaticStylish.resetLinkColor
12
+ };
19
13
  var Navbar = /*#__PURE__*/memo(function () {
20
- var _useStyles = useStyles(),
21
- styles = _useStyles.styles;
22
14
  var regLink = /^(\w+:)\/\/|^(mailto|tel):/;
23
15
  var nav = useSiteStore(function (s) {
24
16
  return s.navData;
@@ -9,7 +9,7 @@ import { openCodeSandbox, openStackBlitz, useIntl } from 'dumi';
9
9
  import { Code, Code2, Codesandbox, MonitorUp, Zap } from 'lucide-react';
10
10
  import { useState } from 'react';
11
11
  import SourceCode from "../../builtins/SourceCode";
12
- import { useStyles } from "./style";
12
+ import { styles } from "./style";
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
15
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -31,8 +31,6 @@ var PreviewerActions = function PreviewerActions(props) {
31
31
  setShowCode = _useState4[1];
32
32
  var isSingleFile = files.length === 1;
33
33
  var lang = ((_files$activeKey$0$ma = files[activeKey][0].match(/\.([^.]+)$/)) === null || _files$activeKey$0$ma === void 0 ? void 0 : _files$activeKey$0$ma[1]) || 'text';
34
- var _useStyles = useStyles(),
35
- styles = _useStyles.styles;
36
34
  return /*#__PURE__*/_jsxs(_Fragment, {
37
35
  children: [/*#__PURE__*/_jsxs("div", {
38
36
  className: styles.actionBar,
@@ -1,4 +1,4 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- actionBar: import("antd-style").SerializedStyles;
3
- tabs: import("antd-style").SerializedStyles;
4
- }>;
1
+ export declare const styles: {
2
+ actionBar: string;
3
+ tabs: string;
4
+ };
@@ -1,11 +1,11 @@
1
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
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
5
- var token = _ref.token,
6
- css = _ref.css;
3
+ import { createStaticStyles } from 'antd-style';
4
+ export var styles = createStaticStyles(function (_ref) {
5
+ var css = _ref.css,
6
+ cssVar = _ref.cssVar;
7
7
  return {
8
8
  actionBar: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: center;\n\n height: 36px;\n "]))),
9
- tabs: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 0 12px;\n background: ", ";\n border-top: 1px dashed ", ";\n border-bottom: 1px dashed ", ";\n "])), token.colorBgLayout, token.colorBorderSecondary, token.colorBorderSecondary)
9
+ tabs: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 0 12px;\n border-top: 1px dashed ", ";\n border-bottom: 1px dashed ", ";\n background: ", ";\n "])), cssVar.colorBorderSecondary, cssVar.colorBorderSecondary, cssVar.colorBgLayout)
10
10
  };
11
11
  });
@@ -8,12 +8,10 @@ import { SearchBar as Input } from '@lobehub/ui';
8
8
  import { useSiteSearch } from 'dumi';
9
9
  import { memo, useState } from 'react';
10
10
  import SearchResult from "dumi/theme/slots/SearchResult";
11
- import { useStyles } from "./style";
11
+ import { styles } from "./style";
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
14
  var SearchBar = /*#__PURE__*/memo(function () {
15
- var _useStyles = useStyles(),
16
- styles = _useStyles.styles;
17
15
  var _useState = useState(false),
18
16
  _useState2 = _slicedToArray(_useState, 2),
19
17
  focusing = _useState2[0],
@@ -1,7 +1,7 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- container: import("antd-style").SerializedStyles;
3
- input: import("antd-style").SerializedStyles;
4
- popover: import("antd-style").SerializedStyles;
1
+ export declare const styles: {
2
+ container: string;
3
+ input: string;
4
+ popover: string;
5
5
  shortcut: string;
6
6
  svg: string;
7
- }>;
7
+ };
@@ -1,16 +1,14 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
5
- var token = _ref.token,
6
- responsive = _ref.responsive,
7
- css = _ref.css,
8
- cx = _ref.cx;
3
+ import { createStaticStyles, cx, responsive } from 'antd-style';
4
+ export var styles = createStaticStyles(function (_ref) {
5
+ var css = _ref.css,
6
+ cssVar = _ref.cssVar;
9
7
  return {
10
- container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n // TODO: support search for mobile devices\n ", " {\n display: none;\n }\n "])), responsive.mobile),
11
- input: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n width: 280px;\n height: ", "px;\n padding: 0;\n padding-inline-start: 40px;\n padding-inline-end: 12px;\n\n font-size: 14px;\n color: ", ";\n\n background-color: transparent;\n border: 1px solid ", ";\n border-radius: 20px;\n outline: none;\n\n transition: all 0.3s;\n\n &::input-placeholder {\n color: ", ";\n }\n\n &:focus {\n background: ", ";\n border-color: ", ";\n\n ~ .site-header-shortcut {\n opacity: 0;\n }\n }\n "])), token.controlHeightLG, token.colorTextSecondary, token.colorBorder, token.colorTextPlaceholder, token.colorBgElevated, token.colorBorderSecondary),
12
- popover: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n inset-inline-end: 0;\n\n overflow: auto;\n overscroll-behavior: contain;\n flex: 1;\n\n width: 540px;\n min-height: 60px;\n max-height: 400px;\n margin-top: 8px;\n\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n\n -webkit-overflow-scrolling: touch;\n\n .dumi-default-search-result {\n > dl {\n > dt {\n color: ", ";\n background: ", ";\n }\n\n > dd {\n > a {\n > h4 {\n color: ", ";\n }\n\n > p {\n color: ", ";\n }\n\n &:hover {\n background: ", ";\n }\n }\n\n + dd {\n border-color: ", ";\n }\n }\n }\n\n mark {\n color: #000;\n background: ", ";\n }\n }\n "])), token.colorBgElevated, token.colorBorder, token.borderRadiusLG, token.boxShadow, token.colorText, token.colorFillTertiary, token.colorTextSecondary, token.colorTextDescription, token.colorFillSecondary, token.colorBorderSecondary, token.yellow9),
13
- shortcut: cx('site-header-shortcut', css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n position: absolute;\n top: 50%;\n inset-inline-end: 11px;\n transform: translateY(-50%);\n\n display: inline-block;\n\n padding: 4px 8px;\n\n font-size: 12px;\n line-height: 1;\n color: ", ";\n white-space: nowrap;\n\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 11px;\n\n transition: all 0.3s;\n\n ", " {\n display: none;\n }\n "])), token.colorTextDescription, token.colorFillSecondary, token.colorBorderSecondary, responsive.mobile)),
14
- svg: cx(css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n top: 50%;\n inset-inline-start: 16px;\n transform: translateY(-50%);\n\n width: 16px;\n margin-top: 1px;\n\n color: ", ";\n "])), token.colorTextPlaceholder))
8
+ container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n // TODO: support search for mobile devices\n ", " {\n display: none;\n }\n "])), responsive.sm),
9
+ input: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n width: 280px;\n height: ", ";\n padding: 0;\n padding-inline: 40px 12px;\n border: 1px solid ", ";\n border-radius: 20px;\n\n font-size: 14px;\n color: ", ";\n\n background-color: transparent;\n outline: none;\n\n transition: all 0.3s;\n\n &::input-placeholder {\n color: ", ";\n }\n\n &:focus {\n border-color: ", ";\n background: ", ";\n\n ~ .site-header-shortcut {\n opacity: 0;\n }\n }\n "])), cssVar.controlHeightLG, cssVar.colorBorder, cssVar.colorTextSecondary, cssVar.colorTextPlaceholder, cssVar.colorBorderSecondary, cssVar.colorBgElevated),
10
+ popover: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n inset-inline-end: 0;\n\n overflow: auto;\n overscroll-behavior: contain;\n flex: 1;\n\n width: 540px;\n min-height: 60px;\n max-height: 400px;\n margin-top: 8px;\n border: 1px solid ", ";\n border-radius: ", ";\n\n background-color: ", ";\n box-shadow: ", ";\n\n -webkit-overflow-scrolling: touch;\n\n .dumi-default-search-result {\n > dl {\n > dt {\n color: ", ";\n background: ", ";\n }\n\n > dd {\n > a {\n > h4 {\n color: ", ";\n }\n\n > p {\n color: ", ";\n }\n\n &:hover {\n background: ", ";\n }\n }\n\n + dd {\n border-color: ", ";\n }\n }\n }\n\n mark {\n color: #000;\n background: ", ";\n }\n }\n "])), cssVar.colorBorder, cssVar.borderRadiusLG, cssVar.colorBgElevated, cssVar.boxShadow, cssVar.colorText, cssVar.colorFillTertiary, cssVar.colorTextSecondary, cssVar.colorTextDescription, cssVar.colorFillSecondary, cssVar.colorBorderSecondary, cssVar.yellow9),
11
+ shortcut: cx('site-header-shortcut', css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n position: absolute;\n top: 50%;\n inset-inline-end: 11px;\n transform: translateY(-50%);\n\n display: inline-block;\n\n padding: 4px 8px;\n border: 1px solid ", ";\n border-radius: 11px;\n\n font-size: 12px;\n line-height: 1;\n color: ", ";\n white-space: nowrap;\n\n background-color: ", ";\n\n transition: all 0.3s;\n\n ", " {\n display: none;\n }\n "])), cssVar.colorBorderSecondary, cssVar.colorTextDescription, cssVar.colorFillSecondary, responsive.sm)),
12
+ svg: cx(css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n top: 50%;\n inset-inline-start: 16px;\n transform: translateY(-50%);\n\n width: 16px;\n margin-top: 1px;\n\n color: ", ";\n "])), cssVar.colorTextPlaceholder))
15
13
  };
16
14
  });
@@ -8,7 +8,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
8
8
  import { Icon } from '@lobehub/ui';
9
9
  import animateScrollTo from 'animated-scroll-to';
10
10
  import { Empty, Typography } from 'antd';
11
- import { useTheme } from 'antd-style';
11
+ import { cssVar } from 'antd-style';
12
12
  import { Link, history, useIntl } from 'dumi';
13
13
  import { FileBox, FileIcon, HeadingIcon, LetterText } from 'lucide-react';
14
14
  import { Fragment, memo, useCallback, useEffect, useState } from 'react';
@@ -85,7 +85,6 @@ var useFlatSearchData = function useFlatSearchData(data) {
85
85
  return flatData;
86
86
  };
87
87
  var SearchResult = /*#__PURE__*/memo(function (props) {
88
- var theme = useTheme();
89
88
  var intl = useIntl();
90
89
  var _useFlatSearchData = useFlatSearchData(props.data),
91
90
  _useFlatSearchData2 = _slicedToArray(_useFlatSearchData, 2),
@@ -155,8 +154,8 @@ var SearchResult = /*#__PURE__*/memo(function (props) {
155
154
  paddingBlock: 8,
156
155
  paddingInline: 12,
157
156
  style: {
158
- background: theme.colorFillTertiary,
159
- borderRadius: theme.borderRadius
157
+ background: cssVar.colorFillTertiary,
158
+ borderRadius: cssVar.borderRadius
160
159
  },
161
160
  children: /*#__PURE__*/_jsx(Typography.Title, {
162
161
  ellipsis: {
@@ -192,12 +191,12 @@ var SearchResult = /*#__PURE__*/memo(function (props) {
192
191
  flex: 'none',
193
192
  height: 48,
194
193
  style: {
195
- background: theme.colorFillTertiary,
196
- borderRadius: theme.borderRadius
194
+ background: cssVar.colorFillTertiary,
195
+ borderRadius: cssVar.borderRadius
197
196
  },
198
197
  width: 48,
199
198
  children: /*#__PURE__*/_jsx(Icon, {
200
- color: theme.colorTextDescription,
199
+ color: cssVar.colorTextDescription,
201
200
  icon: ICONS_MAPPING === null || ICONS_MAPPING === void 0 ? void 0 : ICONS_MAPPING[item.value.type],
202
201
  size: 32
203
202
  })
@@ -220,7 +219,7 @@ var SearchResult = /*#__PURE__*/memo(function (props) {
220
219
  rows: 2
221
220
  },
222
221
  style: {
223
- color: theme.colorTextSecondary,
222
+ color: cssVar.colorTextSecondary,
224
223
  fontSize: 12,
225
224
  lineHeight: 1.4,
226
225
  margin: 0
@@ -2,15 +2,13 @@ import { NavLink } from 'dumi';
2
2
  import isEqual from 'fast-deep-equal';
3
3
  import { memo } from 'react';
4
4
  import { useSiteStore } from "../../store/useSiteStore";
5
- import { useStyles } from "./style";
5
+ import { styles } from "./style";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
8
  var Sidebar = /*#__PURE__*/memo(function () {
9
9
  var sidebar = useSiteStore(function (s) {
10
10
  return s.sidebar;
11
11
  }, isEqual);
12
- var _useStyles = useStyles(),
13
- styles = _useStyles.styles;
14
12
  var isEmptySideBar = !sidebar || sidebar.length === 0;
15
13
  return isEmptySideBar ? undefined : /*#__PURE__*/_jsx("section", {
16
14
  className: styles.sidebarInner,
@@ -1,4 +1,4 @@
1
- export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- sidebar: import("antd-style").SerializedStyles;
3
- sidebarInner: import("antd-style").SerializedStyles;
4
- }>;
1
+ export declare const styles: {
2
+ sidebar: string;
3
+ sidebarInner: string;
4
+ };
@@ -1,11 +1,11 @@
1
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
- import { createStyles } from 'antd-style';
4
- export var useStyles = createStyles(function (_ref) {
3
+ import { createStaticStyles } from 'antd-style';
4
+ export var styles = createStaticStyles(function (_ref) {
5
5
  var css = _ref.css,
6
- token = _ref.token;
6
+ cssVar = _ref.cssVar;
7
7
  return {
8
- sidebar: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: ", "px;\n "])), token.headerHeight),
9
- sidebarInner: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: auto;\n width: 100%;\n height: 100%;\n padding: 16px;\n\n dl {\n margin: 0;\n padding: 0;\n line-height: 1;\n\n > dt {\n overflow: hidden;\n\n margin: 8px 0;\n\n font-weight: 500;\n color: ", ";\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n }\n\n > dd {\n margin: 0;\n padding: 2px 0;\n\n > a {\n overflow: hidden;\n display: block;\n\n padding: 6px 12px;\n\n font-size: ", "px;\n line-height: ", ";\n color: ", ";\n text-decoration: none;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n border-radius: 6px;\n\n transition:\n color 600ms ", ",\n background-color 100ms ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:active {\n color: ", ";\n background-color: ", ";\n }\n\n &.active {\n color: ", ";\n background-color: ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:active {\n color: ", ";\n background-color: ", ";\n }\n }\n }\n }\n\n + dl {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px dashed ", ";\n }\n }\n "])), token.colorText, token.fontSize, token.lineHeight, token.colorTextSecondary, token.motionEaseOut, token.motionEaseOut, token.colorText, token.colorFillTertiary, token.colorText, token.colorFill, token.colorText, token.colorFillSecondary, token.colorText, token.colorFillSecondary, token.colorText, token.colorFill, token.colorBorder)
8
+ sidebar: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: var(--lobe-header-height, 64px);\n "]))),
9
+ sidebarInner: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: auto;\n width: 100%;\n height: 100%;\n padding: 16px;\n\n dl {\n margin: 0;\n padding: 0;\n line-height: 1;\n\n > dt {\n overflow: hidden;\n\n margin: 8px 0;\n\n font-weight: 500;\n color: ", ";\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n }\n\n > dd {\n margin: 0;\n padding: 2px 0;\n\n > a {\n overflow: hidden;\n display: block;\n\n padding: 6px 12px;\n border-radius: 6px;\n\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-decoration: none;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n transition:\n color 600ms ", ",\n background-color 100ms ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:active {\n color: ", ";\n background-color: ", ";\n }\n\n &.active {\n color: ", ";\n background-color: ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:active {\n color: ", ";\n background-color: ", ";\n }\n }\n }\n }\n\n + dl {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px dashed ", ";\n }\n }\n "])), cssVar.colorText, cssVar.fontSize, cssVar.lineHeight, cssVar.colorTextSecondary, cssVar.motionEaseOut, cssVar.motionEaseOut, cssVar.colorText, cssVar.colorFillTertiary, cssVar.colorText, cssVar.colorFill, cssVar.colorText, cssVar.colorFillSecondary, cssVar.colorText, cssVar.colorFillSecondary, cssVar.colorText, cssVar.colorFill, cssVar.colorBorder)
10
10
  };
11
11
  });
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- import { merge } from 'lodash-es';
7
+ import { merge } from 'es-toolkit/compat';
8
8
  import { initialThemeConfig } from "../initialState";
9
9
  var themeConfig = function themeConfig(s) {
10
10
  return merge(initialThemeConfig, s.siteData.themeConfig);
@@ -0,0 +1,4 @@
1
+ export declare const lobeStaticStylish: {
2
+ buttonDefaultHover: string;
3
+ resetLinkColor: string;
4
+ };
@@ -0,0 +1,20 @@
1
+ var _templateObject, _templateObject2;
2
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
+ import { createStaticStyles } from 'antd-style';
4
+
5
+ /**
6
+ * 静态 stylish 工具函数
7
+ * 用于 createStaticStyles 中替代动态 stylish
8
+ */
9
+ var _lobeStaticStylish = createStaticStyles(function (_ref) {
10
+ var css = _ref.css,
11
+ cssVar = _ref.cssVar;
12
+ return {
13
+ buttonDefaultHover: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n transition: all 0.2s;\n\n &:hover {\n background: ", ";\n }\n\n &:active {\n background: ", ";\n }\n "])), cssVar.colorFillTertiary, cssVar.colorFill),
14
+ resetLinkColor: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n }\n "])), cssVar.colorText, cssVar.colorPrimary)
15
+ };
16
+ });
17
+ export var lobeStaticStylish = {
18
+ buttonDefaultHover: _lobeStaticStylish.buttonDefaultHover,
19
+ resetLinkColor: _lobeStaticStylish.resetLinkColor
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dumi-theme-lobehub",
3
- "version": "3.0.2",
3
+ "version": "4.0.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",
@@ -26,16 +26,13 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@floating-ui/react": "^0.27.16",
29
- "@giscus/react": "^3.1.0",
30
- "@lobehub/ui": "^3.4.6",
31
29
  "ahooks": "^3.9.6",
32
30
  "animated-scroll-to": "^2.3.2",
33
- "antd-style": "^4.0.0",
31
+ "antd-style": "^4.1.0",
34
32
  "chalk": "^5.6.2",
33
+ "es-toolkit": "^1.32.0",
35
34
  "fast-deep-equal": "^3.1.3",
36
- "lodash-es": "^4.17.22",
37
35
  "lucide-react": "^0.562.0",
38
- "motion": "^12.23.26",
39
36
  "polished": "^4.3.1",
40
37
  "rc-footer": "^0.6.8",
41
38
  "react-layout-kit": "^2.0.1",
@@ -46,8 +43,10 @@
46
43
  "zustand-utils": "^1.3.2"
47
44
  },
48
45
  "peerDependencies": {
46
+ "@lobehub/ui": "^4.3.3",
49
47
  "antd": "^6.1.1",
50
48
  "dumi": "^2.4.17",
49
+ "motion": "^12.23.26",
51
50
  "react": "^19.0.0",
52
51
  "react-dom": "^19.0.0"
53
52
  }