@lobehub/ui 1.16.0 → 1.16.2

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 (107) hide show
  1. package/es/ActionIcon/index.d.ts +15 -15
  2. package/es/ActionIcon/index.js +7 -5
  3. package/es/ActionIcon/style.d.ts +1 -1
  4. package/es/ActionIcon/style.js +5 -3
  5. package/es/Avatar/index.d.ts +9 -9
  6. package/es/Avatar/index.js +3 -3
  7. package/es/Chat/store/initialState.d.ts +12 -12
  8. package/es/Chat/store/messageReducer.d.ts +12 -12
  9. package/es/Chat/store/store.d.ts +12 -12
  10. package/es/Chat/store/store.js +11 -9
  11. package/es/Chat/types.d.ts +14 -14
  12. package/es/Chat/utils/fetch.d.ts +1 -1
  13. package/es/Chat/utils/fetch.js +3 -3
  14. package/es/ColorScales/ScaleRow.d.ts +1 -1
  15. package/es/ColorScales/ScaleRow.js +3 -3
  16. package/es/ColorScales/index.d.ts +1 -1
  17. package/es/ColorScales/index.js +8 -8
  18. package/es/ContextMenu/MenuItem/icons.js +23 -23
  19. package/es/ContextMenu/MenuItem/index.d.ts +4 -4
  20. package/es/ContextMenu/MenuItem/index.js +6 -5
  21. package/es/ContextMenu/index.d.ts +4 -4
  22. package/es/ContextMenu/index.js +11 -17
  23. package/es/ContextMenu/types/menuItem.d.ts +3 -3
  24. package/es/Conversation/App.d.ts +5 -5
  25. package/es/Conversation/App.js +5 -5
  26. package/es/Conversation/ChatList/MessageItem/Content.js +13 -13
  27. package/es/Conversation/ChatList/MessageItem/Toolbar.d.ts +3 -3
  28. package/es/Conversation/ChatList/MessageItem/Toolbar.js +20 -23
  29. package/es/Conversation/ChatList/MessageItem/index.js +15 -15
  30. package/es/Conversation/ChatList/index.d.ts +4 -4
  31. package/es/Conversation/ChatList/index.js +8 -6
  32. package/es/Conversation/InputArea/ActionBar.js +7 -7
  33. package/es/Conversation/InputArea/index.js +17 -17
  34. package/es/Conversation/StoreUpdater.d.ts +1 -1
  35. package/es/Conversation/index.js +4 -2
  36. package/es/CopyButton/index.d.ts +10 -10
  37. package/es/CopyButton/index.js +10 -8
  38. package/es/DraggablePanel/index.d.ts +45 -44
  39. package/es/DraggablePanel/index.js +11 -10
  40. package/es/EditableMessage/index.d.ts +23 -23
  41. package/es/EditableMessage/index.js +15 -15
  42. package/es/EditableMessageList/index.d.ts +5 -5
  43. package/es/EditableMessageList/index.js +16 -16
  44. package/es/EditableText/index.js +9 -9
  45. package/es/Highlighter/SyntaxHighlighter/Prism.d.ts +1 -1
  46. package/es/Highlighter/SyntaxHighlighter/Prism.js +4 -2
  47. package/es/Highlighter/SyntaxHighlighter/index.js +8 -8
  48. package/es/Highlighter/SyntaxHighlighter/style.d.ts +1 -1
  49. package/es/Highlighter/SyntaxHighlighter/style.js +3 -2
  50. package/es/Highlighter/index.d.ts +5 -5
  51. package/es/Highlighter/index.js +5 -5
  52. package/es/Icon/index.d.ts +6 -6
  53. package/es/Icon/index.js +3 -1
  54. package/es/Input/index.js +7 -5
  55. package/es/List/ListItem/index.d.ts +21 -21
  56. package/es/List/ListItem/index.js +13 -11
  57. package/es/List/ListItem/time.js +1 -1
  58. package/es/Logo/Divider.js +4 -2
  59. package/es/Logo/Logo3D.js +3 -1
  60. package/es/Logo/LogoFlat.js +46 -44
  61. package/es/Logo/LogoHighContrast.js +7 -5
  62. package/es/Logo/LogoText.js +6 -4
  63. package/es/Logo/index.d.ts +5 -5
  64. package/es/Logo/index.js +3 -1
  65. package/es/Markdown/Code.js +1 -1
  66. package/es/Markdown/CodeBlock.js +4 -4
  67. package/es/MessageInput/index.d.ts +10 -10
  68. package/es/MessageInput/index.js +12 -10
  69. package/es/MessageModal/index.d.ts +11 -11
  70. package/es/MessageModal/index.js +15 -15
  71. package/es/SearchBar/index.d.ts +5 -5
  72. package/es/SearchBar/index.js +19 -17
  73. package/es/SideNav/index.d.ts +5 -5
  74. package/es/SideNav/index.js +9 -7
  75. package/es/Snippet/index.d.ts +5 -5
  76. package/es/Snippet/index.js +5 -3
  77. package/es/StroyBook/index.d.ts +2 -2
  78. package/es/StroyBook/index.js +7 -5
  79. package/es/StroyBook/style.d.ts +1 -1
  80. package/es/Swatches/index.d.ts +4 -4
  81. package/es/Swatches/index.js +7 -7
  82. package/es/TabsNav/index.d.ts +6 -6
  83. package/es/TabsNav/index.js +3 -1
  84. package/es/ThemeProvider/GlobalStyle.js +5 -2
  85. package/es/ThemeProvider/index.d.ts +6 -6
  86. package/es/ThemeProvider/index.js +3 -3
  87. package/es/ThemeSwitch/index.d.ts +5 -5
  88. package/es/ThemeSwitch/index.js +11 -9
  89. package/es/Tooltip/index.js +5 -3
  90. package/es/components/ControlInput.d.ts +1 -1
  91. package/es/components/ControlInput.js +20 -18
  92. package/es/hooks/useHighlight.d.ts +8 -8
  93. package/es/hooks/useHighlight.js +4 -4
  94. package/es/styles/algorithms/generateColorPalette.d.ts +4 -4
  95. package/es/styles/algorithms/generateCustomStylish.d.ts +1 -1
  96. package/es/styles/algorithms/generateCustomStylish.js +1 -1
  97. package/es/styles/algorithms/generateCustomToken.d.ts +1 -1
  98. package/es/styles/algorithms/generateCustomToken.js +3 -2
  99. package/es/styles/algorithms/generateTheme.js +3 -1
  100. package/es/styles/colors.d.ts +13 -13
  101. package/es/styles/colors.js +1 -1
  102. package/es/styles/theme/dark.js +3 -1
  103. package/es/styles/theme/light.js +3 -1
  104. package/es/types/customStylish.d.ts +4 -4
  105. package/es/types/customToken.d.ts +5 -5
  106. package/es/types/global.d.ts +2 -0
  107. package/package.json +71 -68
@@ -1,6 +1,8 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["size", "themeMode", "onThemeSwitch"];
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
6
  import { ActionIcon, Icon } from "./..";
5
7
  import { Dropdown } from 'antd';
6
8
  import { Monitor, Moon, Sun } from 'lucide-react';
@@ -14,22 +16,22 @@ var icons = {
14
16
  var items = [{
15
17
  label: 'System',
16
18
  icon: /*#__PURE__*/_jsx(Icon, {
17
- size: "small",
18
- icon: icons.auto
19
+ icon: icons.auto,
20
+ size: "small"
19
21
  }),
20
22
  key: 'auto'
21
23
  }, {
22
24
  label: 'Light',
23
25
  icon: /*#__PURE__*/_jsx(Icon, {
24
- size: "small",
25
- icon: icons.light
26
+ icon: icons.light,
27
+ size: "small"
26
28
  }),
27
29
  key: 'light'
28
30
  }, {
29
31
  label: 'Dark',
30
32
  icon: /*#__PURE__*/_jsx(Icon, {
31
- size: "small",
32
- icon: icons.dark
33
+ icon: icons.dark,
34
+ size: "small"
33
35
  }),
34
36
  key: 'dark'
35
37
  }];
@@ -50,8 +52,8 @@ var ThemeSwitch = /*#__PURE__*/memo(function (_ref) {
50
52
  trigger: ['click']
51
53
  }, props), {}, {
52
54
  children: /*#__PURE__*/_jsx(ActionIcon, {
53
- size: size,
54
- icon: icons[themeMode]
55
+ icon: icons[themeMode],
56
+ size: size
55
57
  })
56
58
  }));
57
59
  });
@@ -1,6 +1,8 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["className", "arrow"];
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
6
  import { Tooltip as AntdTooltip } from 'antd';
5
7
  import { memo } from 'react';
6
8
  import { useStyles } from "./style";
@@ -14,8 +16,8 @@ var Tooltip = /*#__PURE__*/memo(function (_ref) {
14
16
  styles = _useStyles.styles,
15
17
  cx = _useStyles.cx;
16
18
  return /*#__PURE__*/_jsx(AntdTooltip, _objectSpread({
17
- overlayClassName: cx(styles.tooltip, className),
18
- arrow: arrow
19
+ arrow: arrow,
20
+ overlayClassName: cx(styles.tooltip, className)
19
21
  }, props));
20
22
  });
21
23
  export default Tooltip;
@@ -2,8 +2,8 @@
2
2
  import { InputProps } from "../index";
3
3
  export interface ControlInputProps extends Omit<InputProps, 'onChange' | 'value' | 'onAbort'> {
4
4
  onChange?: (value: string) => void;
5
+ onChangeEnd?: (value: string) => void;
5
6
  onValueChanging?: (value: string) => void;
6
7
  value?: string;
7
- onChangeEnd?: (value: string) => void;
8
8
  }
9
9
  export declare const ControlInput: import("react").NamedExoticComponent<ControlInputProps>;
@@ -1,11 +1,13 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
4
  var _excluded = ["value", "onChange", "onValueChanging", "onChangeEnd"];
5
- import { ActionIcon, Input } from "./..";
5
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
7
  import { ConfigProvider, Space } from 'antd';
7
8
  import { RotateCcw, Save } from 'lucide-react';
8
9
  import { memo, useCallback, useEffect, useRef, useState } from 'react';
10
+ import { ActionIcon, Input } from "./..";
9
11
  import { jsx as _jsx } from "react/jsx-runtime";
10
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
13
  export var ControlInput = /*#__PURE__*/memo(function (_ref) {
@@ -30,16 +32,6 @@ export var ControlInput = /*#__PURE__*/memo(function (_ref) {
30
32
  return /*#__PURE__*/_jsx(Input, _objectSpread(_objectSpread({
31
33
  ref: inputRef
32
34
  }, props), {}, {
33
- value: input,
34
- onCompositionStart: function onCompositionStart() {
35
- isChineseInput.current = true;
36
- },
37
- onCompositionEnd: function onCompositionEnd() {
38
- isChineseInput.current = false;
39
- },
40
- onFocus: function onFocus() {
41
- isFocusing.current = true;
42
- },
43
35
  onBlur: function onBlur() {
44
36
  isFocusing.current = false;
45
37
  onChangeEnd === null || onChangeEnd === void 0 ? void 0 : onChangeEnd(input);
@@ -48,6 +40,15 @@ export var ControlInput = /*#__PURE__*/memo(function (_ref) {
48
40
  setInput(e.target.value);
49
41
  onValueChanging === null || onValueChanging === void 0 ? void 0 : onValueChanging(e.target.value);
50
42
  },
43
+ onCompositionEnd: function onCompositionEnd() {
44
+ isChineseInput.current = false;
45
+ },
46
+ onCompositionStart: function onCompositionStart() {
47
+ isChineseInput.current = true;
48
+ },
49
+ onFocus: function onFocus() {
50
+ isFocusing.current = true;
51
+ },
51
52
  onPressEnter: function onPressEnter(e) {
52
53
  if (!e.shiftKey && !isChineseInput.current) {
53
54
  e.preventDefault();
@@ -65,19 +66,20 @@ export var ControlInput = /*#__PURE__*/memo(function (_ref) {
65
66
  children: /*#__PURE__*/_jsxs(Space, {
66
67
  size: 2,
67
68
  children: [/*#__PURE__*/_jsx(ActionIcon, {
68
- title: "Reset",
69
69
  icon: RotateCcw,
70
- size: "small",
71
70
  onClick: function onClick() {
72
71
  setInput(value);
73
- }
72
+ },
73
+ size: "small",
74
+ title: "Reset"
74
75
  }), /*#__PURE__*/_jsx(ActionIcon, {
75
- title: "\u2705 Save",
76
76
  icon: Save,
77
+ onClick: updateValue,
77
78
  size: "small",
78
- onClick: updateValue
79
+ title: "\u2705 Save"
79
80
  })]
80
81
  })
81
- })
82
+ }),
83
+ value: input
82
84
  }));
83
85
  });
@@ -4,6 +4,14 @@ export declare const languageMap: readonly ["javascript", "js", "jsx", "json", "
4
4
  * @title 代码高亮的存储对象
5
5
  */
6
6
  interface Store {
7
+ /**
8
+ * @title 将代码转化为 HTML 字符串
9
+ * @param text - 代码文本
10
+ * @param language - 代码语言
11
+ * @param isDarkMode - 是否为暗黑模式
12
+ * @returns HTML 字符串
13
+ */
14
+ codeToHtml: (text: string, language: string, isDarkMode: boolean) => string;
7
15
  /**
8
16
  * @title 高亮器对象
9
17
  */
@@ -13,14 +21,6 @@ interface Store {
13
21
  * @returns 初始化 Promise 对象
14
22
  */
15
23
  initHighlighter: () => Promise<void>;
16
- /**
17
- * @title 将代码转化为 HTML 字符串
18
- * @param text - 代码文本
19
- * @param language - 代码语言
20
- * @param isDarkMode - 是否为暗黑模式
21
- * @returns HTML 字符串
22
- */
23
- codeToHtml: (text: string, language: string, isDarkMode: boolean) => string;
24
24
  }
25
25
  export declare const useHighlight: import("zustand").UseBoundStore<import("zustand").StoreApi<Store>>;
26
26
  export {};
@@ -1,8 +1,8 @@
1
- import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
- import { themeConfig } from "../Highlighter/theme";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
3
  import { getHighlighter } from 'shiki-es';
5
4
  import { create } from 'zustand';
5
+ import { themeConfig } from "../Highlighter/theme";
6
6
  export var languageMap = ['javascript', 'js', 'jsx', 'json', 'markdown', 'md', 'less', 'css', 'typescript', 'ts', 'tsx', 'diff', 'bash'];
7
7
 
8
8
  /**
@@ -13,9 +13,9 @@ export var useHighlight = create(function (set, get) {
13
13
  return {
14
14
  highlighter: undefined,
15
15
  initHighlighter: function () {
16
- var _initHighlighter = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
16
+ var _initHighlighter = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
17
17
  var highlighter;
18
- return _regeneratorRuntime().wrap(function _callee$(_context) {
18
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
19
19
  while (1) switch (_context.prev = _context.next) {
20
20
  case 0:
21
21
  if (get().highlighter) {
@@ -1,11 +1,11 @@
1
- import { ColorScaleItem } from "../colors";
2
1
  import { AliasToken } from 'antd/es/theme/interface';
2
+ import { ColorScaleItem } from "../colors";
3
3
  export declare const generateColorPalette: ({ type, scale, appearance, }: {
4
- type: 'Primary' | 'Success' | 'Warning' | 'Error' | 'Info' | string;
5
- scale: ColorScaleItem;
6
4
  appearance: 'light' | 'dark';
5
+ scale: ColorScaleItem;
6
+ type: 'Primary' | 'Success' | 'Warning' | 'Error' | 'Info' | string;
7
7
  }) => Partial<AliasToken>;
8
8
  export declare const generateColorNeutralPalette: ({ scale, appearance, }: {
9
- scale: ColorScaleItem;
10
9
  appearance: 'light' | 'dark';
10
+ scale: ColorScaleItem;
11
11
  }) => Partial<AliasToken>;
@@ -1,3 +1,3 @@
1
- import { LobeCustomStylish } from "../../types/customStylish";
2
1
  import { GetCustomStylish } from 'antd-style';
2
+ import { LobeCustomStylish } from "../../types/customStylish";
3
3
  export declare const generateCustomStylish: GetCustomStylish<LobeCustomStylish>;
@@ -13,7 +13,7 @@ export var generateCustomStylish = function generateCustomStylish(_ref) {
13
13
  heroGradientFlow: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n animation: flow 5s ease infinite;\n\n @keyframes flow {\n 0% {\n background-position: 0 0;\n }\n\n 50% {\n background-position: 100% 100%;\n }\n\n 100% {\n background-position: 0 0;\n }\n }\n "]))),
14
14
  heroBlurBall: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n will-change: transform;\n\n background: linear-gradient(\n 135deg,\n ", " 0%,\n ", " 30%,\n ", " 70%,\n ", " 100%\n );\n background-size: 200% 200%;\n filter: blur(69px);\n\n animation: glow 10s ease infinite;\n\n @keyframes glow {\n 0% {\n background-position: 0 -100%;\n }\n\n 50% {\n background-position: 200% 50%;\n }\n\n 100% {\n background-position: 0 -100%;\n }\n }\n "])), token.gradientColor3, token.gradientColor1, token.red, token.cyan),
15
15
  iconGradientDefault: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background-image: radial-gradient(\n 100% 100% at 50% 0,\n ", " 0,\n ", " 100%\n );\n "])), rgba(token.colorSolid, 0.2), rgba(token.colorSolid, 0.1)),
16
- blur: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n backdrop-filter: blur(7px);\n "]))),
16
+ blur: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n backdrop-filter: saturate(180%) blur(10px);\n "]))),
17
17
  markdown: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n\n h1,\n h2,\n h3,\n h4,\n h5 {\n font-weight: 600;\n }\n\n p {\n margin: 20px auto;\n\n font-size: 14px;\n line-height: 1.8;\n color: ", ";\n text-align: justify;\n word-wrap: break-word;\n }\n\n blockquote {\n margin: 16px 0;\n padding: 0 12px;\n p {\n font-style: italic;\n color: ", ";\n }\n }\n\n p:not(:last-child) {\n margin-bottom: 1em;\n }\n\n a {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n }\n\n img {\n max-width: 100%;\n }\n\n pre {\n border-radius: ", "px;\n }\n\n > :not([data-code-type='highlighter']) code {\n padding: 2px 6px;\n\n font-size: ", "px;\n color: ", ";\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n }\n\n table {\n border-spacing: 0;\n\n width: 100%;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding: 8px;\n\n border: 1px solid ", ";\n border-radius: ", "px;\n }\n\n th,\n td {\n padding-block-start: 10px;\n padding-block-end: 10px;\n padding-inline-start: 16px;\n padding-inline-end: 16px;\n }\n\n thead {\n tr {\n th {\n background: ", ";\n &:first-child {\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n }\n &:last-child {\n border-top-right-radius: ", "px;\n border-bottom-right-radius: ", "px;\n }\n }\n }\n }\n\n ul li {\n line-height: 1.8;\n }\n "])), isDarkMode ? token.colorTextSecondary : token.colorText, token.colorText, token.colorTextDescription, token.colorLink, token.colorLinkHover, token.colorLinkActive, token.borderRadius, token.fontSizeSM, isDarkMode ? token.cyan9A : token.cyan10A, isDarkMode ? token.cyan1A : token.cyan3A, isDarkMode ? token.cyan1A : token.cyan4A, token.borderRadiusSM, token.colorBorderSecondary, token.borderRadius, token.colorFillTertiary, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius)
18
18
  };
19
19
  };
@@ -1,3 +1,3 @@
1
- import { LobeCustomToken } from "../../types/customToken";
2
1
  import { GetCustomToken } from 'antd-style';
2
+ import { LobeCustomToken } from "../../types/customToken";
3
3
  export declare const generateCustomToken: GetCustomToken<LobeCustomToken>;
@@ -1,8 +1,9 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- import { colorScales } from "../colors";
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
5
  import { camelCase } from 'lodash';
6
+ import { colorScales } from "../colors";
6
7
  var generateColorPalette = function generateColorPalette(_ref) {
7
8
  var _ref2;
8
9
  var name = _ref.name,
@@ -1,4 +1,6 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2
4
  import darkBaseToken from "../theme/dark";
3
5
  import lightBaseToken from "../theme/light";
4
6
  export var lightTheme = {
@@ -14,26 +14,26 @@ declare type colorStep = [
14
14
  string
15
15
  ];
16
16
  export interface ColorScaleItem {
17
- light: colorStep;
18
- lightA: colorStep;
19
17
  dark: colorStep;
20
18
  darkA: colorStep;
19
+ light: colorStep;
20
+ lightA: colorStep;
21
21
  }
22
22
  export interface ColorScales {
23
- red: ColorScaleItem;
24
- volcano: ColorScaleItem;
25
- orange: ColorScaleItem;
26
- gold: ColorScaleItem;
27
- yellow: ColorScaleItem;
28
- lime: ColorScaleItem;
29
- green: ColorScaleItem;
30
- cyan: ColorScaleItem;
31
23
  blue: ColorScaleItem;
24
+ bnw: ColorScaleItem;
25
+ cyan: ColorScaleItem;
32
26
  geekblue: ColorScaleItem;
33
- purple: ColorScaleItem;
34
- magenta: ColorScaleItem;
27
+ gold: ColorScaleItem;
35
28
  gray: ColorScaleItem;
36
- bnw: ColorScaleItem;
29
+ green: ColorScaleItem;
30
+ lime: ColorScaleItem;
31
+ magenta: ColorScaleItem;
32
+ orange: ColorScaleItem;
33
+ purple: ColorScaleItem;
34
+ red: ColorScaleItem;
35
+ volcano: ColorScaleItem;
36
+ yellow: ColorScaleItem;
37
37
  }
38
38
  export declare const colorScales: ColorScales;
39
39
  export {};
@@ -75,7 +75,7 @@ export var colorScales = {
75
75
  light: ['#ffffff', '#f8f8f8', '#eeeeee', '#e3e3e3', '#dddddd', '#cccccc', '#bbbbbb', '#aaaaaa', '#999999', '#888888', '#666666', '#333333', '#080808'],
76
76
  lightA: ['rgba(0, 0, 0, 0.015)', 'rgba(0, 0, 0, 0.03)', 'rgba(0, 0, 0, 0.06)', 'rgba(0, 0, 0, 0.12)', 'rgba(0, 0, 0, 0.18)', 'rgba(0, 0, 0, 0.24)', 'rgba(0, 0, 0, 0.32)', 'rgba(0, 0, 0, 0.38)', 'rgba(0, 0, 0, 0.44)', 'rgba(0, 0, 0, 0.5)', 'rgba(0, 0, 0, 0.68)', 'rgba(0, 0, 0, 0.84)', 'rgba(0, 0, 0, 0.98)'],
77
77
  dark: ['#000000', '#111111', '#222222', '#2d2d2d', '#333333', '#444444', '#555555', '#666666', '#6f6f6f', '#777777', '#aaaaaa', '#dddddd', '#ffffff'],
78
- darkA: ['rgba(255, 255, 255, 0.02)', 'rgba(255, 255, 255, 0.04)', 'rgba(255, 255, 255, 0.08)', 'rgba(255, 255, 255, 0.16)', 'rgba(255, 255, 255, 0.24)', 'rgba(255, 255, 255, 0.28)', 'rgba(255, 255, 255, 0.32)', 'rgba(255, 255, 255, 0.38)', 'rgba(255, 255, 255, 0.44)', 'rgba(255, 255, 255, 0.5)', 'rgba(255, 255, 255, 0.66)', 'rgba(255, 255, 255, 0.84)', '#ffffff']
78
+ darkA: ['rgba(255, 255, 255, 0.02)', 'rgba(255, 255, 255, 0.06)', 'rgba(255, 255, 255, 0.10)', 'rgba(255, 255, 255, 0.16)', 'rgba(255, 255, 255, 0.24)', 'rgba(255, 255, 255, 0.28)', 'rgba(255, 255, 255, 0.32)', 'rgba(255, 255, 255, 0.38)', 'rgba(255, 255, 255, 0.44)', 'rgba(255, 255, 255, 0.5)', 'rgba(255, 255, 255, 0.66)', 'rgba(255, 255, 255, 0.84)', '#ffffff']
79
79
  },
80
80
  bnw: {
81
81
  light: ['#ffffff', '#f5f5f5', '#eeeeee', '#cccccc', '#aaaaaa', '#888888', '#666666', '#444444', '#333333', '#222222', '#111111', '#111111', '#111111'],
@@ -1,4 +1,6 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2
4
  import { generateColorNeutralPalette, generateColorPalette } from "../algorithms/generateColorPalette";
3
5
  import { colorScales } from "../colors";
4
6
  import { baseToken } from "./base";
@@ -1,4 +1,6 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2
4
  import { generateColorNeutralPalette, generateColorPalette } from "../algorithms/generateColorPalette";
3
5
  import { colorScales } from "../colors";
4
6
  import { baseToken } from "./base";
@@ -1,14 +1,14 @@
1
1
  export interface LobeCustomStylish {
2
+ blur: string;
2
3
  clickableText: string;
3
- resetLinkColor: string;
4
4
 
5
+ heroBlurBall: string;
5
6
  heroButtonGradient: string;
6
- heroGradient: string;
7
7
 
8
+ heroGradient: string;
8
9
  heroGradientFlow: string;
9
- heroBlurBall: string;
10
10
 
11
11
  iconGradientDefault: string;
12
- blur: string;
13
12
  markdown: string;
13
+ resetLinkColor: string;
14
14
  }
@@ -46,14 +46,14 @@ export type ColorPalettesAlpha = {
46
46
  };
47
47
 
48
48
  export interface LobeCustomToken extends ColorToken, ColorPalettes, ColorPalettesAlpha {
49
- headerHeight: number;
50
- footerHeight: number;
51
- sidebarWidth: number;
52
- tocWidth: number;
53
- contentMaxWidth: number;
54
49
  colorSolid: string;
50
+ contentMaxWidth: number;
51
+ footerHeight: number;
55
52
  gradientColor1: string;
56
53
  gradientColor2: string;
57
54
  gradientColor3: string;
58
55
  gradientHeroBgG: string;
56
+ headerHeight: number;
57
+ sidebarWidth: number;
58
+ tocWidth: number;
59
59
  }
@@ -1,5 +1,7 @@
1
1
  import 'antd-style';
2
+
2
3
  import { AntdToken } from 'antd-style/lib/types/theme';
4
+
3
5
  import { LobeCustomStylish } from './customStylish';
4
6
  import { LobeCustomToken } from './customToken';
5
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.16.0",
3
+ "version": "1.16.2",
4
4
  "description": "Lobe UI is an open-source UI component library for building chatbot web apps",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -37,15 +37,15 @@
37
37
  "dev:theme": "npm run dev --prefix=packages/dumi-theme-lobehub",
38
38
  "docs:build": "npm run build:theme && dumi build",
39
39
  "doctor": "father doctor",
40
- "lint": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
41
- "lint:fix": "npm run lint --fix",
40
+ "lint": "eslint \"{src,tests,packages}/**/*.{js,jsx,ts,tsx}\"",
41
+ "lint:fix": "eslint \"{src,tests,packages}/**/*.{js,jsx,ts,tsx}\" --fix",
42
42
  "prepare": "husky install && npm run setup",
43
43
  "prepublishOnly": "father doctor && npm run build",
44
44
  "prettier": "prettier -c --write \"**/**\"",
45
45
  "release": "semantic-release",
46
46
  "setup": "dumi setup",
47
47
  "start": "dumi dev",
48
- "stylelint": "stylelint \"{src,test}/**/*.{js,jsx,ts,tsx}\" --fix",
48
+ "stylelint": "stylelint \"{src,tests,packages}/**/*.{js,jsx,ts,tsx}\" --fix",
49
49
  "test": "vitest --passWithNoTests",
50
50
  "test:coverage": "vitest run --coverage --passWithNoTests",
51
51
  "test:update": "vitest -u",
@@ -67,75 +67,78 @@
67
67
  ]
68
68
  },
69
69
  "dependencies": {
70
- "@ant-design/icons": "^5.1.3",
71
- "@babel/runtime": "^7.22.3",
72
- "@dqbd/tiktoken": "^1.0.7",
73
- "@floating-ui/react": "^0.24.2",
74
- "ahooks": "^3.7.7",
75
- "antd-style": "^3.2.1",
76
- "chroma-js": "^2.4.2",
77
- "copy-to-clipboard": "^3.3.3",
78
- "dayjs": "^1.11.7",
79
- "fast-deep-equal": "^3.1.3",
80
- "immer": "^10.0.2",
81
- "leva": "^0.9.34",
82
- "lodash": "^4.17.21",
70
+ "@ant-design/icons": "^5",
71
+ "@babel/runtime": "^7",
72
+ "@dqbd/tiktoken": "^1",
73
+ "@floating-ui/react": "^0",
74
+ "ahooks": "^3",
75
+ "antd-style": "^3",
76
+ "chroma-js": "^2",
77
+ "copy-to-clipboard": "^3",
78
+ "dayjs": "^1",
79
+ "fast-deep-equal": "^3",
80
+ "immer": "^10",
81
+ "leva": "^0",
82
+ "lodash": "^4",
83
83
  "lucide-react": "latest",
84
- "pangu": "^4.0.7",
85
- "polished": "^4.2.2",
86
- "prism-react-renderer": "^2.0.4",
87
- "re-resizable": "^6.9.9",
88
- "react-font-loader": "^2.0.0",
89
- "react-layout-kit": "^1.7.0",
90
- "react-markdown": "^8.0.7",
91
- "react-rnd": "^10.4.1",
92
- "remark-gfm": "^3.0.1",
93
- "shiki-es": "^0.2.0",
94
- "styled-components": "6.0.0-rc.2",
95
- "ts-md5": "^1.3.1",
96
- "use-merge-value": "^1.2.0",
97
- "zustand": "^4.3.8",
98
- "zustand-utils": "^1.2.2"
84
+ "pangu": "^4",
85
+ "polished": "^4",
86
+ "prism-react-renderer": "^2",
87
+ "re-resizable": "^6",
88
+ "react-font-loader": "^2",
89
+ "react-layout-kit": "^1",
90
+ "react-markdown": "^8",
91
+ "react-rnd": "^10",
92
+ "remark-gfm": "^3",
93
+ "shiki-es": "^0",
94
+ "styled-components": "beta",
95
+ "ts-md5": "^1",
96
+ "use-merge-value": "^1",
97
+ "zustand": "^4",
98
+ "zustand-utils": "^1"
99
99
  },
100
100
  "devDependencies": {
101
- "@ant-design/colors": "^7.0.0",
102
- "@commitlint/cli": "^17.6.3",
103
- "@testing-library/react": "^14.0.0",
104
- "@types/chroma-js": "^2.4.0",
105
- "@types/lodash": "^4.14.195",
106
- "@types/pangu": "^4.0.0",
107
- "@types/react": "^18.2.7",
108
- "@types/react-dom": "^18.2.4",
109
- "@umijs/lint": "^4.0.69",
101
+ "@ant-design/colors": "^7",
102
+ "@commitlint/cli": "^17",
103
+ "@testing-library/react": "^14",
104
+ "@types/chroma-js": "^2",
105
+ "@types/lodash": "^4",
106
+ "@types/pangu": "^4",
107
+ "@types/react": "^18",
108
+ "@types/react-dom": "^18",
109
+ "@umijs/lint": "^4",
110
110
  "@vitest/coverage-c8": "latest",
111
- "antd": "^5.5.1",
112
- "commitlint": "^17.6.3",
113
- "commitlint-config-gitmoji": "^2.3.1",
114
- "concurrently": "^8.0.1",
115
- "cross-env": "^7.0.3",
116
- "dumi": "^2.2.0",
117
- "dumi-assets-types": "^1.0.1",
111
+ "antd": "^5",
112
+ "commitlint": "^17",
113
+ "commitlint-config-gitmoji": "^2",
114
+ "concurrently": "^8",
115
+ "cross-env": "^7",
116
+ "dumi": "^2",
117
+ "dumi-assets-types": "^1",
118
118
  "dumi-theme-lobehub": "workspace:latest",
119
- "eslint": "^8.41.0",
120
- "eslint-import-resolver-alias": "^1.1.2",
121
- "eslint-import-resolver-typescript": "^3.5.5",
122
- "father": "^4.2.1",
123
- "husky": "^8.0.3",
124
- "jsdom": "^22.1.0",
125
- "lint-staged": "^13.2.2",
126
- "postcss-styled-syntax": "^0.4.0",
127
- "prettier": "^2.8.8",
128
- "prettier-plugin-organize-imports": "^3.2.2",
129
- "prettier-plugin-packagejson": "^2.4.3",
130
- "react": "^18.2.0",
131
- "react-dom": "^18.2.0",
132
- "semantic-release": "^21.0.2",
133
- "semantic-release-config-gitmoji": "^1.5.0",
134
- "stylelint": "^15.6.2",
135
- "stylelint-config-clean-order": "^5.0.1",
136
- "stylelint-config-recommended": "^12.0.0",
137
- "stylelint-order": "^6.0.3",
138
- "typescript": "^5.0.4",
119
+ "eslint": "^8",
120
+ "eslint-import-resolver-alias": "^1",
121
+ "eslint-import-resolver-typescript": "^3",
122
+ "eslint-plugin-import": "^2",
123
+ "eslint-plugin-simple-import-sort": "^10",
124
+ "eslint-plugin-typescript-sort-keys": "^2",
125
+ "father": "^4",
126
+ "husky": "^8",
127
+ "jsdom": "^22",
128
+ "lint-staged": "^13",
129
+ "postcss-styled-syntax": "^0",
130
+ "prettier": "^2",
131
+ "prettier-plugin-organize-imports": "^3",
132
+ "prettier-plugin-packagejson": "^2",
133
+ "react": "^18",
134
+ "react-dom": "^18",
135
+ "semantic-release": "^21",
136
+ "semantic-release-config-gitmoji": "^1",
137
+ "stylelint": "^15",
138
+ "stylelint-config-clean-order": "^5",
139
+ "stylelint-config-recommended": "^12",
140
+ "stylelint-order": "^6",
141
+ "typescript": "^5",
139
142
  "vitest": "latest"
140
143
  },
141
144
  "peerDependencies": {