dumi-theme-lobehub 1.15.2 → 2.0.0

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,4 +1,4 @@
1
- import { Features } from '@lobehub/ui';
1
+ import { Features } from '@lobehub/ui/awesome';
2
2
  import { MoonStar, Palette, Zap } from 'lucide-react';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  export default (function () {
@@ -8,7 +8,7 @@ export var useStyles = createStyles(function (_ref) {
8
8
  prefixCls = _ref.prefixCls;
9
9
  return {
10
10
  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 &-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.colorBgLayout, token.colorBorder, 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),
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
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),
13
13
  nopadding: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .dumi-default-previewer-demo {\n padding: 0;\n }\n "]))),
14
14
  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 "]))),
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  export declare const StoreUpdater: React.MemoExoticComponent<() => null>;
@@ -15,7 +15,8 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
15
15
  import { useDebounceEffect } from 'ahooks';
16
16
  import { useLocale, useLocation, useNavData, useSidebarData, useSiteData, useTabMeta } from 'dumi';
17
17
  import isEqual from 'fast-deep-equal';
18
- import React, { memo, useEffect } from 'react';
18
+ import { memo, useEffect } from 'react';
19
+ import * as React from 'react';
19
20
  import { useStoreApi } from "../../store/useSiteStore";
20
21
  import { useRouteMeta } from "./useRouteMeta";
21
22
  var isBrowser = typeof window !== 'undefined';
@@ -1,8 +1,11 @@
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
3
  import { createGlobalStyle } from 'antd-style';
4
- var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n #root {\n min-height: 100vh;\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) {
4
+ var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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;
7
+ }, function (_ref2) {
8
+ var theme = _ref2.theme;
6
9
  return theme.colorText;
7
10
  });
8
11
  export default GlobalStyle;
@@ -71,8 +71,8 @@ var DocumentLayout = /*#__PURE__*/memo(function () {
71
71
  property: "og:keywords"
72
72
  }), !fm.title || page === 'home' ? /*#__PURE__*/_jsx("title", {
73
73
  children: siteTitle
74
- }) : /*#__PURE__*/_jsxs("title", {
75
- children: [fm.title, " - ", siteTitle]
74
+ }) : /*#__PURE__*/_jsx("title", {
75
+ children: siteTitle ? "".concat(fm.title, "-").concat(siteTitle) : fm.title
76
76
  })]
77
77
  });
78
78
  }, [intl, fm, siteTitle, page]);
@@ -1,4 +1,4 @@
1
- import { Giscus } from '@lobehub/ui';
1
+ import { Giscus } from '@lobehub/ui/awesome';
2
2
  import { useResponsive } from 'antd-style';
3
3
  import { useOutlet } from 'dumi';
4
4
  import { memo, useCallback, useEffect } from 'react';
@@ -7,7 +7,7 @@ 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 { Typography } from '@lobehub/ui';
10
+ import { Block, Typography } from '@lobehub/ui';
11
11
  import { Skeleton } from 'antd';
12
12
  import { useResponsive } from 'antd-style';
13
13
  import isEqual from 'fast-deep-equal';
@@ -37,8 +37,10 @@ var Content = /*#__PURE__*/memo(function (_ref) {
37
37
  gap: mobile ? 0 : 24,
38
38
  width: '100%'
39
39
  }, props), {}, {
40
- children: [/*#__PURE__*/_jsxs("div", {
40
+ children: [/*#__PURE__*/_jsxs(Block, {
41
41
  className: styles.content,
42
+ shadow: true,
43
+ variant: 'filled',
42
44
  children: [/*#__PURE__*/_jsx(Skeleton, {
43
45
  active: true,
44
46
  loading: loading,
@@ -7,6 +7,6 @@ export var useStyles = createStyles(function (_ref, isPure) {
7
7
  responsive = _ref.responsive,
8
8
  css = _ref.css;
9
9
  return {
10
- content: cx(!isPure && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 24px 48px;\n background-color: ", ";\n border-radius: 10px;\n\n ", " {\n padding: 8px 16px;\n border-radius: 0;\n }\n "])), 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 color: ", ";\n background: ", ";\n border: 1px solid ", ";\n }\n\n &[type='warning'] {\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n }\n\n &[type='error'] {\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n }\n\n &[type='success'] {\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n }\n }\n "])), token.colorInfoText, token.colorInfoBg, token.colorInfoBorder, token.colorWarningText, token.colorWarningBg, token.colorWarningBorder, token.colorErrorText, token.colorErrorBg, token.colorErrorBorder, token.colorSuccessText, token.colorSuccessBg, token.colorSuccessBorder))
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))
11
11
  };
12
12
  });
@@ -1,4 +1,4 @@
1
- import { Features as F } from '@lobehub/ui';
1
+ import { Features as F } from '@lobehub/ui/awesome';
2
2
  import { useTheme } from 'antd-style';
3
3
  import isEqual from 'fast-deep-equal';
4
4
  import { memo } from 'react';
@@ -1,31 +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 { ActionIcon } from '@lobehub/ui';
4
- import { createStyles } from 'antd-style';
5
- import { createLucideIcon } from 'lucide-react';
2
+ import { DiscordIcon } from '@lobehub/ui/icons';
6
3
  import { memo } from 'react';
7
4
  import { siteSelectors, useSiteStore } from "../../store";
8
5
  import { jsx as _jsx } from "react/jsx-runtime";
9
- var Discord = createLucideIcon('Discord', [['path', {
10
- d: 'M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z',
11
- key: '18tl5t'
12
- }]]);
13
- var useStyles = createStyles(function (_ref) {
14
- var css = _ref.css;
15
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n svg {\n overflow: visible !important;\n }\n "])));
16
- });
17
6
  var DiscordButton = /*#__PURE__*/memo(function () {
18
7
  var inviteUrl = useSiteStore(siteSelectors.discord);
19
- var _useStyles = useStyles(),
20
- styles = _useStyles.styles;
21
8
  return inviteUrl ? /*#__PURE__*/_jsx("a", {
22
9
  href: inviteUrl,
23
10
  rel: "noreferrer",
24
11
  target: '_blank',
25
12
  children: /*#__PURE__*/_jsx(ActionIcon, {
26
- className: styles,
27
- icon: Discord,
28
- size: "site"
13
+ icon: DiscordIcon
29
14
  })
30
15
  }) : undefined;
31
16
  });
@@ -1,27 +1,15 @@
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 _templateObject;
3
2
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
4
3
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
5
4
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
6
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
7
5
  import { ActionIcon } from '@lobehub/ui';
8
- import { createStyles } from 'antd-style';
6
+ import { BottomGradientButton } from '@lobehub/ui/awesome';
9
7
  import { Github } from 'lucide-react';
10
- import { rgba } from 'polished';
11
8
  import { memo } from 'react';
12
9
  import useSWR from 'swr';
13
10
  import { siteSelectors, useSiteStore } from "../../store";
14
11
  import { jsx as _jsx } from "react/jsx-runtime";
15
- var useStyles = createStyles(function (_ref) {
16
- var css = _ref.css,
17
- token = _ref.token;
18
- return {
19
- button: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n\n font-weight: bold;\n color: ", ";\n\n border: 1px solid ", ";\n border-radius: 36px !important;\n\n transition: all 0.2s ease-in-out;\n\n &::before {\n content: '';\n\n position: absolute;\n inset-block-end: 0;\n\n display: block;\n\n width: 50%;\n height: 1px;\n\n opacity: 0;\n background-image: linear-gradient(to right, transparent, ", ", transparent);\n\n transition: all 0.2s ease-in-out;\n }\n\n &:hover {\n background: ", ";\n\n &::before {\n opacity: 1;\n }\n }\n "])), token.colorTextSecondary, rgba(token.colorText, 0.1), token.gold, token.colorBgContainer)
20
- };
21
- });
22
12
  var GithubButton = /*#__PURE__*/memo(function () {
23
- var _useStyles = useStyles(),
24
- styles = _useStyles.styles;
25
13
  var repoUrl = useSiteStore(siteSelectors.github);
26
14
  var _useSWR = useSWR('github-star', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
27
15
  var url, res, json;
@@ -67,25 +55,15 @@ var GithubButton = /*#__PURE__*/memo(function () {
67
55
  rel: "noreferrer",
68
56
  target: '_blank',
69
57
  children: /*#__PURE__*/_jsx(ActionIcon, {
70
- icon: Github,
71
- size: "site"
58
+ icon: Github
72
59
  })
73
60
  });
74
- return /*#__PURE__*/_jsx("a", {
61
+ return /*#__PURE__*/_jsx(BottomGradientButton, {
75
62
  href: repoUrl,
63
+ icon: Github,
76
64
  rel: "noreferrer",
77
65
  target: '_blank',
78
- children: /*#__PURE__*/_jsx(ActionIcon, {
79
- className: styles.button,
80
- gap: 4,
81
- icon: Github,
82
- paddingInline: 16,
83
- size: "site",
84
- style: {
85
- width: 'unset'
86
- },
87
- children: githubStar > 1000 ? (githubStar / 1000).toFixed(1) + 'K' : githubStar + ' ⭐️'
88
- })
66
+ children: githubStar > 1000 ? (githubStar / 1000).toFixed(1) + 'K' : githubStar + ' ⭐️'
89
67
  });
90
68
  });
91
69
  export default GithubButton;
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { Hero as H } from '@lobehub/ui';
7
+ import { Hero as H } from '@lobehub/ui/awesome';
8
8
  import { Link } from 'dumi';
9
9
  import { memo } from 'react';
10
10
  import { heroSelectors, useSiteStore } from "../../store";
@@ -1,4 +1,5 @@
1
- import { Avatar, Logo as SiteLogo } from '@lobehub/ui';
1
+ import { Avatar } from '@lobehub/ui';
2
+ import { LobeHub as SiteLogo } from '@lobehub/ui/brand';
2
3
  import { Space } from 'antd';
3
4
  import { useResponsive } from 'antd-style';
4
5
  import { Link } from 'dumi';
@@ -1,6 +1,6 @@
1
- var _templateObject, _templateObject2;
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 { TabsNav } from '@lobehub/ui';
3
+ import { Tabs } from '@lobehub/ui';
4
4
  import { createStyles } from 'antd-style';
5
5
  import { Link, history } from 'dumi';
6
6
  import NavbarExtra from 'dumi/theme-default/slots/NavbarExtra';
@@ -11,13 +11,9 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
11
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
12
  var useStyles = createStyles(function (_ref) {
13
13
  var css = _ref.css,
14
- stylish = _ref.stylish,
15
- token = _ref.token,
16
- responsive = _ref.responsive,
17
- prefixCls = _ref.prefixCls;
14
+ stylish = _ref.stylish;
18
15
  return {
19
- link: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n "])), stylish.resetLinkColor),
20
- tabs: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", "-tabs-tab-active a {\n color: ", " !important;\n }\n ", " {\n display: none;\n }\n "])), prefixCls, token.colorText, responsive.mobile)
16
+ link: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n "])), stylish.resetLinkColor)
21
17
  };
22
18
  });
23
19
  var Navbar = /*#__PURE__*/memo(function () {
@@ -29,9 +25,8 @@ var Navbar = /*#__PURE__*/memo(function () {
29
25
  });
30
26
  var activePath = useSiteStore(siteSelectors.activePath);
31
27
  return /*#__PURE__*/_jsxs(_Fragment, {
32
- children: [/*#__PURE__*/_jsx(TabsNav, {
28
+ children: [/*#__PURE__*/_jsx(Tabs, {
33
29
  activeKey: activePath,
34
- className: styles.tabs,
35
30
  items: nav.map(function (item) {
36
31
  return {
37
32
  key: String(item.activePath || item.link),
@@ -1,3 +1,3 @@
1
- import { type FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  declare const Page404: FC;
3
3
  export default Page404;
@@ -1,7 +1,6 @@
1
1
  import { FluentEmoji } from '@lobehub/ui';
2
2
  import { Button } from 'antd';
3
3
  import { Link, useIntl, useLocale } from 'dumi';
4
- import React from 'react';
5
4
  import { Center } from 'react-layout-kit';
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { ActionIcon, TabsNav } from '@lobehub/ui';
7
+ import { ActionIcon, Tabs } from '@lobehub/ui';
8
8
  import { openCodeSandbox, openStackBlitz, useIntl } from 'dumi';
9
9
  import { Code, Code2, Codesandbox, MonitorUp, Zap } from 'lucide-react';
10
10
  import { useState } from 'react';
@@ -13,11 +13,6 @@ import { useStyles } 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";
16
- var SIZE = {
17
- blockSize: 24,
18
- fontSize: 16,
19
- strokeWidth: 2
20
- };
21
16
  var PreviewerActions = function PreviewerActions(props) {
22
17
  var _files$activeKey$0$ma, _props$disabledAction, _props$disabledAction2, _props$disabledAction3;
23
18
  var intl = useIntl();
@@ -46,7 +41,7 @@ var PreviewerActions = function PreviewerActions(props) {
46
41
  onClick: function onClick() {
47
42
  return openCodeSandbox(props);
48
43
  },
49
- size: SIZE,
44
+ size: 'small',
50
45
  title: intl.formatMessage({
51
46
  id: 'previewer.actions.codesandbox'
52
47
  })
@@ -55,7 +50,7 @@ var PreviewerActions = function PreviewerActions(props) {
55
50
  onClick: function onClick() {
56
51
  return openStackBlitz(props);
57
52
  },
58
- size: SIZE,
53
+ size: 'small',
59
54
  title: intl.formatMessage({
60
55
  id: 'previewer.actions.stackblitz'
61
56
  })
@@ -65,7 +60,7 @@ var PreviewerActions = function PreviewerActions(props) {
65
60
  target: "_blank",
66
61
  children: /*#__PURE__*/_jsx(ActionIcon, {
67
62
  icon: MonitorUp,
68
- size: SIZE,
63
+ size: 'small',
69
64
  title: intl.formatMessage({
70
65
  id: 'previewer.actions.separate'
71
66
  })
@@ -77,7 +72,7 @@ var PreviewerActions = function PreviewerActions(props) {
77
72
  return !previous;
78
73
  });
79
74
  },
80
- size: SIZE,
75
+ size: 'small',
81
76
  title: intl.formatMessage({
82
77
  id: "previewer.actions.code.".concat(showCode ? 'shrink' : 'expand')
83
78
  })
@@ -85,7 +80,7 @@ var PreviewerActions = function PreviewerActions(props) {
85
80
  }), showCode && /*#__PURE__*/_jsxs(_Fragment, {
86
81
  children: [/*#__PURE__*/_jsx("div", {
87
82
  className: styles.tabs,
88
- children: !isSingleFile && /*#__PURE__*/_jsx(TabsNav, {
83
+ children: !isSingleFile && /*#__PURE__*/_jsx(Tabs, {
89
84
  activeKey: String(activeKey),
90
85
  items: files.map(function (_ref3, index) {
91
86
  var _ref4 = _slicedToArray(_ref3, 1),
@@ -1,10 +1,10 @@
1
+ /// <reference types="react" />
1
2
  import { type useSiteSearch } from 'dumi';
2
- import React from 'react';
3
3
  type ISearchResult = ReturnType<typeof useSiteSearch>['result'];
4
4
  export interface SearchResultProps {
5
5
  data: ISearchResult;
6
6
  loading: boolean;
7
7
  onItemSelect?: (item: ISearchResult[0]['hints'][0]) => void;
8
8
  }
9
- declare const SearchResult: React.NamedExoticComponent<SearchResultProps>;
9
+ declare const SearchResult: import("react").NamedExoticComponent<SearchResultProps>;
10
10
  export default SearchResult;
@@ -11,7 +11,7 @@ import { Empty, Typography } from 'antd';
11
11
  import { useTheme } from 'antd-style';
12
12
  import { Link, history, useIntl } from 'dumi';
13
13
  import { FileBox, FileIcon, HeadingIcon, LetterText } from 'lucide-react';
14
- import React, { Fragment, memo, useCallback, useEffect, useState } from 'react';
14
+ import { Fragment, memo, useCallback, useEffect, useState } from 'react';
15
15
  import { Center, Flexbox } from 'react-layout-kit';
16
16
  import { siteSelectors, useSiteStore } from "../../store";
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -199,9 +199,7 @@ var SearchResult = /*#__PURE__*/memo(function (props) {
199
199
  children: /*#__PURE__*/_jsx(Icon, {
200
200
  color: theme.colorTextDescription,
201
201
  icon: ICONS_MAPPING === null || ICONS_MAPPING === void 0 ? void 0 : ICONS_MAPPING[item.value.type],
202
- size: {
203
- fontSize: 32
204
- }
202
+ size: 32
205
203
  })
206
204
  }), /*#__PURE__*/_jsxs(Flexbox, {
207
205
  children: [/*#__PURE__*/_jsx(Typography.Title, {
@@ -1,7 +1,7 @@
1
- import { type FeatureItem } from '@lobehub/ui';
1
+ import type { FeaturesProps } from '@lobehub/ui/awesome';
2
2
  import { SiteStore } from '../useSiteStore';
3
3
  export declare const heroSelectors: {
4
- features: (s: SiteStore) => FeatureItem[];
4
+ features: (s: SiteStore) => FeaturesProps['items'];
5
5
  heroActions: (s: SiteStore) => any;
6
6
  heroDesc: (s: SiteStore) => any;
7
7
  heroTitle: (s: SiteStore) => any;
@@ -1,4 +1,6 @@
1
- import type { FeaturesProps, FooterProps, HeroProps, LogoProps } from '@lobehub/ui';
1
+ import type { FooterProps } from '@lobehub/ui';
2
+ import type { FeaturesProps, HeroProps } from '@lobehub/ui/awesome';
3
+ import type { LobeHubProps } from '@lobehub/ui/brand';
2
4
  import { IThemeConfig } from 'dumi/dist/client/theme-api/types';
3
5
  import { FooterColumn } from 'rc-footer/es/column';
4
6
  import type { SiteCustomToken } from "../styles/customToken";
@@ -11,7 +13,7 @@ export interface ApiHeaderConfig {
11
13
  type?: 'component' | 'doc';
12
14
  }
13
15
  export interface FooterConfig {
14
- bottom?: FooterProps['bottom'];
16
+ bottom?: string;
15
17
  columns?: FooterProps['columns'];
16
18
  moreProducts?: FooterColumn;
17
19
  resources?: FooterColumn;
@@ -45,7 +47,7 @@ export interface SiteThemeConfig extends IThemeConfig {
45
47
  hero?: HeroConfig | Record<string, HeroConfig>;
46
48
  hideHomeNav?: boolean;
47
49
  logo?: string;
48
- logoType?: LogoProps['type'];
50
+ logoType?: LobeHubProps['type'];
49
51
  metadata?: {
50
52
  description?: string;
51
53
  icons?: {
@@ -1,8 +1,8 @@
1
- import { type FeatureItem, type HeroAction } from '@lobehub/ui';
1
+ import type { FeaturesProps, HeroAction } from '@lobehub/ui/awesome';
2
2
  export type ImageContainerType = 'light' | 'primary' | 'soon';
3
3
  export interface HeroConfig {
4
4
  actions: HeroAction[];
5
5
  description?: string;
6
- features?: FeatureItem[];
6
+ features?: FeaturesProps['items'];
7
7
  title?: string;
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dumi-theme-lobehub",
3
- "version": "1.15.2",
3
+ "version": "2.0.0",
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",
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "@floating-ui/react": "^0.27.5",
29
29
  "@giscus/react": "^3.1.0",
30
- "@lobehub/ui": "^1.167.0",
30
+ "@lobehub/ui": "^2.0.0",
31
31
  "ahooks": "^3.8.4",
32
32
  "animated-scroll-to": "^2.3.2",
33
33
  "antd-style": "^3.7.1",
@@ -47,7 +47,7 @@
47
47
  "peerDependencies": {
48
48
  "antd": "^5.23.0",
49
49
  "dumi": "^2.4.17",
50
- "react": "^18.0.0 || ^19.0.0",
51
- "react-dom": "^18.0.0 || ^19.0.0"
50
+ "react": "^19.0.0",
51
+ "react-dom": "^19.0.0"
52
52
  }
53
53
  }