@lobehub/ui 1.26.0 → 1.26.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 (138) hide show
  1. package/es/ActionIcon/index.d.ts +1 -1
  2. package/es/ActionIcon/index.js +30 -18
  3. package/es/Avatar/index.js +11 -11
  4. package/es/Chat/store/initialState.d.ts +3 -3
  5. package/es/Chat/store/initialState.js +4 -4
  6. package/es/Chat/store/messageReducer.js +71 -49
  7. package/es/Chat/store/selectors.d.ts +3 -3
  8. package/es/Chat/store/selectors.js +3 -3
  9. package/es/Chat/store/store.d.ts +1 -1
  10. package/es/Chat/store/store.js +110 -110
  11. package/es/Chat/types.d.ts +1 -1
  12. package/es/Chat/utils/fetch.d.ts +1 -1
  13. package/es/Chat/utils/fetch.js +4 -4
  14. package/es/ChatInputArea/index.js +2 -1
  15. package/es/ChatInputArea/style.d.ts +3 -3
  16. package/es/ChatInputArea/style.js +5 -5
  17. package/es/ChatItem/index.js +12 -10
  18. package/es/ChatItem/style.d.ts +3 -3
  19. package/es/ChatItem/style.js +7 -7
  20. package/es/ChatList/ActionsBar.d.ts +1 -1
  21. package/es/ChatList/ActionsBar.js +12 -11
  22. package/es/ChatList/index.d.ts +1 -1
  23. package/es/ChatList/index.js +1 -1
  24. package/es/ColorScales/ScaleRow.js +20 -14
  25. package/es/ColorScales/index.js +6 -4
  26. package/es/ColorScales/style.d.ts +2 -2
  27. package/es/ColorScales/style.js +7 -7
  28. package/es/ContextMenu/MenuItem/index.js +14 -14
  29. package/es/ContextMenu/MenuItem/style.d.ts +2 -2
  30. package/es/ContextMenu/MenuItem/style.js +5 -5
  31. package/es/ContextMenu/index.js +42 -42
  32. package/es/ContextMenu/style.d.ts +1 -1
  33. package/es/ContextMenu/style.js +2 -2
  34. package/es/Conversation/App.js +2 -2
  35. package/es/Conversation/ChatList/MessageItem/Content.js +15 -15
  36. package/es/Conversation/ChatList/MessageItem/Toolbar.js +3 -3
  37. package/es/Conversation/ChatList/MessageItem/index.js +14 -14
  38. package/es/Conversation/ChatList/index.js +5 -5
  39. package/es/Conversation/InputArea/ActionBar.d.ts +2 -2
  40. package/es/Conversation/InputArea/ActionBar.js +2 -2
  41. package/es/Conversation/InputArea/index.d.ts +2 -2
  42. package/es/Conversation/InputArea/index.js +10 -12
  43. package/es/Conversation/StoreUpdater.js +1 -1
  44. package/es/Conversation/index.js +2 -2
  45. package/es/CopyButton/index.d.ts +4 -2
  46. package/es/CopyButton/index.js +4 -3
  47. package/es/DraggablePanel/index.d.ts +2 -2
  48. package/es/DraggablePanel/index.js +50 -42
  49. package/es/DraggablePanel/style.d.ts +9 -9
  50. package/es/DraggablePanel/style.js +17 -17
  51. package/es/DraggablePanel/utils.js +12 -4
  52. package/es/EditableMessage/index.js +4 -4
  53. package/es/EditableMessageList/index.js +20 -19
  54. package/es/EditableText/index.js +1 -1
  55. package/es/Features/Item.js +5 -5
  56. package/es/Features/Item.style.d.ts +2 -2
  57. package/es/Features/Item.style.js +4 -4
  58. package/es/Features/index.js +3 -3
  59. package/es/Features/style.js +2 -2
  60. package/es/FontLoader/index.d.ts +6 -0
  61. package/es/FontLoader/index.js +16 -0
  62. package/es/Footer/index.js +2 -2
  63. package/es/GradientButton/style.d.ts +1 -1
  64. package/es/GradientButton/style.js +2 -2
  65. package/es/Header/index.js +2 -2
  66. package/es/Header/style.d.ts +1 -1
  67. package/es/Header/style.js +2 -2
  68. package/es/Hero/style.d.ts +3 -3
  69. package/es/Hero/style.js +14 -13
  70. package/es/Highlighter/SyntaxHighlighter/Prism.js +7 -7
  71. package/es/Highlighter/SyntaxHighlighter/index.js +1 -1
  72. package/es/Highlighter/SyntaxHighlighter/style.d.ts +2 -2
  73. package/es/Highlighter/SyntaxHighlighter/style.js +2 -2
  74. package/es/Highlighter/index.d.ts +1 -2
  75. package/es/Highlighter/index.js +4 -3
  76. package/es/Highlighter/style.d.ts +1 -1
  77. package/es/Highlighter/style.js +2 -2
  78. package/es/Highlighter/theme.js +22 -22
  79. package/es/Icon/index.js +24 -16
  80. package/es/Input/index.js +4 -4
  81. package/es/Layout/index.js +1 -1
  82. package/es/Layout/style.d.ts +5 -5
  83. package/es/Layout/style.js +7 -7
  84. package/es/List/ListItem/index.d.ts +1 -1
  85. package/es/List/ListItem/index.js +21 -42
  86. package/es/List/ListItem/style.d.ts +9 -0
  87. package/es/List/ListItem/style.js +21 -0
  88. package/es/List/index.d.ts +1 -1
  89. package/es/Logo/index.d.ts +2 -2
  90. package/es/Logo/index.js +48 -38
  91. package/es/Logo/style.d.ts +1 -1
  92. package/es/Logo/style.js +2 -2
  93. package/es/Markdown/CodeBlock.d.ts +1 -1
  94. package/es/Markdown/CodeBlock.js +7 -7
  95. package/es/Markdown/index.js +3 -3
  96. package/es/Markdown/style.d.ts +1 -1
  97. package/es/Markdown/style.js +2 -2
  98. package/es/MessageInput/index.d.ts +1 -1
  99. package/es/MessageInput/index.js +5 -5
  100. package/es/MessageModal/index.js +8 -6
  101. package/es/MessageModal/style.d.ts +1 -1
  102. package/es/MessageModal/style.js +2 -2
  103. package/es/SearchBar/index.d.ts +1 -1
  104. package/es/SearchBar/index.js +13 -11
  105. package/es/SearchBar/style.d.ts +2 -2
  106. package/es/SearchBar/style.js +3 -3
  107. package/es/Snippet/index.js +5 -3
  108. package/es/Spotlight/index.js +13 -13
  109. package/es/Spotlight/style.js +1 -1
  110. package/es/StroyBook/index.d.ts +1 -2
  111. package/es/StroyBook/index.js +3 -3
  112. package/es/StroyBook/style.d.ts +1 -1
  113. package/es/StroyBook/style.js +2 -2
  114. package/es/Swatches/index.d.ts +1 -1
  115. package/es/Swatches/index.js +9 -9
  116. package/es/ThemeProvider/index.d.ts +2 -2
  117. package/es/ThemeProvider/index.js +3 -4
  118. package/es/ThemeSwitch/index.js +8 -8
  119. package/es/Toc/TocMobile.d.ts +4 -4
  120. package/es/Toc/TocMobile.js +15 -15
  121. package/es/Toc/style.d.ts +2 -2
  122. package/es/Toc/style.js +3 -3
  123. package/es/TokenTag/style.js +12 -7
  124. package/es/components/ControlInput.d.ts +1 -1
  125. package/es/components/ControlInput.js +7 -6
  126. package/es/hooks/useHighlight.js +14 -14
  127. package/es/index.d.ts +1 -0
  128. package/es/index.js +1 -0
  129. package/es/styles/algorithms/generateColorPalette.js +10 -10
  130. package/es/styles/algorithms/generateCustomStylish.js +5 -5
  131. package/es/styles/algorithms/generateCustomToken.js +42 -17
  132. package/es/styles/algorithms/generateTheme.js +4 -4
  133. package/es/styles/colors.js +65 -65
  134. package/es/styles/theme/base.js +2 -2
  135. package/es/styles/theme/dark.js +16 -16
  136. package/es/styles/theme/light.js +16 -16
  137. package/es/types/llm.d.ts +1 -1
  138. package/package.json +3 -3
package/es/Hero/style.js CHANGED
@@ -2,26 +2,27 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
2
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
3
  import { createStyles } from 'antd-style';
4
4
  export var useStyles = createStyles(function (_ref) {
5
- var css = _ref.css,
5
+ var cx = _ref.cx,
6
+ css = _ref.css,
6
7
  responsive = _ref.responsive,
7
8
  token = _ref.token,
8
9
  stylish = _ref.stylish;
9
10
  return {
10
- container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n box-sizing: border-box;\n text-align: center;\n "]))),
11
- title: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n z-index: 10;\n margin: 0;\n font-size: 100px;\n\n ", "\n\n b {\n ", "\n position: relative;\n z-index: 5;\n background-clip: text;\n\n -webkit-text-fill-color: transparent;\n }\n "])), responsive({
12
- mobile: {
13
- fontSize: 72,
14
- flexDirection: 'column',
15
- display: 'flex',
16
- lineHeight: 1.2
17
- }
18
- }), stylish.gradientAnimation),
19
- desc: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: 0;\n font-size: ", "px;\n color: ", ";\n text-align: center;\n\n ", " {\n margin: 24px 16px;\n font-size: ", "px;\n }\n "])), token.fontSizeHeading3, token.colorTextSecondary, responsive.mobile, token.fontSizeHeading5),
20
- actions: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin-top: 24px;\n\n button {\n padding-inline: 32px !important;\n font-weight: 500;\n }\n\n ", "\n "])), responsive({
11
+ actions: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin-top: 24px;\n\n button {\n padding-inline: 32px !important;\n font-weight: 500;\n }\n\n ", "\n "])), responsive({
21
12
  mobile: {
22
13
  marginTop: 24
23
14
  }
24
15
  })),
25
- canvas: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", ";\n filter: blur(100px);\n\n pointer-events: none;\n\n position: absolute;\n z-index: 10;\n top: -250px;\n left: 50%;\n transform: translateX(-50%) scale(1.5);\n\n width: 600px;\n height: 400px;\n\n opacity: 0.2;\n\n ", " {\n width: 200px;\n height: 300px;\n }\n "])), stylish.gradientAnimation, responsive.mobile)
16
+ canvas: cx(stylish.gradientAnimation, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n position: absolute;\n z-index: 10;\n top: -250px;\n left: 50%;\n transform: translateX(-50%) scale(1.5);\n\n width: 600px;\n height: 400px;\n\n opacity: 0.2;\n filter: blur(100px);\n\n ", " {\n width: 200px;\n height: 300px;\n }\n "])), responsive.mobile)),
17
+ container: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n box-sizing: border-box;\n text-align: center;\n "]))),
18
+ desc: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: 0;\n font-size: ", "px;\n color: ", ";\n text-align: center;\n\n ", " {\n margin: 24px 16px;\n font-size: ", "px;\n }\n "])), token.fontSizeHeading3, token.colorTextSecondary, responsive.mobile, token.fontSizeHeading5),
19
+ title: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n z-index: 10;\n margin: 0;\n font-size: 100px;\n\n ", "\n\n b {\n ", "\n position: relative;\n z-index: 5;\n background-clip: text;\n\n -webkit-text-fill-color: transparent;\n }\n "])), responsive({
20
+ mobile: {
21
+ display: 'flex',
22
+ flexDirection: 'column',
23
+ fontSize: 72,
24
+ lineHeight: 1.2
25
+ }
26
+ }), stylish.gradientAnimation)
26
27
  };
27
28
  });
@@ -21,18 +21,18 @@ export var Prism = /*#__PURE__*/memo(function (_ref) {
21
21
  return /*#__PURE__*/_jsx("pre", {
22
22
  className: className,
23
23
  style: style,
24
- children: tokens.map(function (line, i) {
24
+ children: tokens.map(function (line, index) {
25
25
  return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, getLineProps({
26
- line: line,
27
- key: i
26
+ key: index,
27
+ line: line
28
28
  })), {}, {
29
29
  children: line.map(function (token, key) {
30
30
  return /*#__PURE__*/_jsx("span", _objectSpread({}, getTokenProps({
31
- token: token,
32
- key: key
33
- })), i);
31
+ key: key,
32
+ token: token
33
+ })), index);
34
34
  })
35
- }), i);
35
+ }), index);
36
36
  })
37
37
  });
38
38
  }
@@ -4,8 +4,8 @@ import { Loader2 } from 'lucide-react';
4
4
  import { memo, useEffect } from 'react';
5
5
  import { Center } from 'react-layout-kit';
6
6
  import { shallow } from 'zustand/shallow';
7
+ import Icon from "../../Icon";
7
8
  import { useHighlight } from "../../hooks/useHighlight";
8
- import { Icon } from "../..";
9
9
  import { useStyles } from "./style";
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
- shiki: string;
3
- prism: import("antd-style").SerializedStyles;
4
2
  loading: string;
3
+ prism: import("antd-style").SerializedStyles;
4
+ shiki: string;
5
5
  }>;
@@ -9,8 +9,8 @@ export var useStyles = createStyles(function (_ref) {
9
9
  stylish = _ref.stylish;
10
10
  var prefix = "".concat(prefixCls, "-highlighter");
11
11
  return {
12
- shiki: cx("".concat(prefix, "-shiki"), css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .shiki {\n overflow-x: scroll;\n background: none !important;\n }\n "])))),
12
+ loading: cx(stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 10;\n top: 0;\n right: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n height: 34px;\n padding: 0 8px;\n\n font-family: ", ";\n color: ", ";\n\n border-radius: ", ";\n "])), token.fontFamilyCode, token.colorTextTertiary, token.borderRadius)),
13
13
  prism: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pre {\n overflow-x: scroll;\n font-family: ", " !important;\n }\n "])), token.fontFamilyCode),
14
- loading: cx(stylish.blur, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 10;\n top: 0;\n right: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n height: 34px;\n padding: 0 8px;\n\n font-family: ", ";\n color: ", ";\n\n border-radius: ", ";\n "])), token.fontFamilyCode, token.colorTextTertiary, token.borderRadius))
14
+ shiki: cx("".concat(prefix, "-shiki"), css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .shiki {\n overflow-x: scroll;\n background: none !important;\n }\n "]))))
15
15
  };
16
16
  });
@@ -1,7 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { DivProps } from "../types";
3
- import SyntaxHighlighter, { type SyntaxHighlighterProps } from './SyntaxHighlighter';
4
- export { SyntaxHighlighter, SyntaxHighlighterProps };
5
3
  export interface HighlighterProps extends DivProps {
6
4
  /**
7
5
  * @description The code content to be highlighted
@@ -39,3 +37,4 @@ export interface HighlighterProps extends DivProps {
39
37
  }
40
38
  export declare const Highlighter: import("react").NamedExoticComponent<HighlighterProps>;
41
39
  export default Highlighter;
40
+ export { default as SyntaxHighlighter, type SyntaxHighlighterProps } from './SyntaxHighlighter';
@@ -4,12 +4,12 @@ var _excluded = ["children", "language", "className", "style", "theme", "copyabl
4
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
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; }
6
6
  import { memo } from 'react';
7
- import { CopyButton, Spotlight } from "./..";
7
+ import CopyButton from "../CopyButton";
8
+ import Spotlight from "../Spotlight";
8
9
  import SyntaxHighlighter from "./SyntaxHighlighter";
9
10
  import { useStyles } from "./style";
10
11
  import { jsx as _jsx } from "react/jsx-runtime";
11
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
- export { SyntaxHighlighter };
13
13
  export var Highlighter = /*#__PURE__*/memo(function (_ref) {
14
14
  var children = _ref.children,
15
15
  language = _ref.language,
@@ -49,4 +49,5 @@ export var Highlighter = /*#__PURE__*/memo(function (_ref) {
49
49
  })]
50
50
  }));
51
51
  });
52
- export default Highlighter;
52
+ export default Highlighter;
53
+ export { default as SyntaxHighlighter } from "./SyntaxHighlighter";
@@ -1,5 +1,5 @@
1
1
  export declare const useStyles: (props?: "block" | "ghost" | "pure" | undefined) => import("antd-style").ReturnStyles<{
2
- container: string;
3
2
  button: string;
3
+ container: string;
4
4
  lang: string;
5
5
  }>;
@@ -11,8 +11,8 @@ export var useStyles = createStyles(function (_ref, type) {
11
11
  var langHoverCls = "".concat(prefix, "-hover-lang");
12
12
  var typeStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n\n &:hover {\n background-color: ", ";\n }\n "])), type === 'block' ? token.colorFillTertiary : 'transparent', type === 'block' ? 'transparent' : token.colorBorder, type === 'block' ? token.colorFillTertiary : token.colorFillQuaternary);
13
13
  return {
14
- container: cx(prefix, type !== 'pure' && typeStylish, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n overflow: auto;\n border-radius: ", "px;\n transition: background-color 100ms ", ";\n\n &:hover {\n .", " {\n opacity: 1;\n }\n\n .", " {\n opacity: 1;\n }\n }\n\n .prism-code {\n background: none !important;\n }\n\n pre {\n margin: 0 !important;\n padding: ", " !important;\n background: none !important;\n }\n\n code {\n background: transparent !important;\n }\n "])), token.borderRadius, token.motionEaseOut, buttonHoverCls, langHoverCls, type === 'pure' ? 0 : "16px 24px")),
15
- button: cx(buttonHoverCls, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 51;\n top: ", ";\n right: ", ";\n\n opacity: 0;\n "])), type === 'pure' ? 0 : '8px', type === 'pure' ? 0 : '8px')),
14
+ button: cx(buttonHoverCls, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 51;\n top: ", ";\n right: ", ";\n\n opacity: 0;\n "])), type === 'pure' ? 0 : '8px', type === 'pure' ? 0 : '8px')),
15
+ container: cx(prefix, type !== 'pure' && typeStylish, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n overflow: auto;\n border-radius: ", "px;\n transition: background-color 100ms ", ";\n\n &:hover {\n .", " {\n opacity: 1;\n }\n\n .", " {\n opacity: 1;\n }\n }\n\n .prism-code {\n background: none !important;\n }\n\n pre {\n margin: 0 !important;\n padding: ", " !important;\n background: none !important;\n }\n\n code {\n background: transparent !important;\n }\n "])), token.borderRadius, token.motionEaseOut, buttonHoverCls, langHoverCls, type === 'pure' ? 0 : "16px 24px")),
16
16
  lang: cx(langHoverCls, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 50;\n right: 8px;\n bottom: 8px;\n\n color: ", ";\n\n opacity: 0;\n\n transition: opacity 0.1s;\n "])), token.colorTextPlaceholder))
17
17
  };
18
18
  });
@@ -9,36 +9,38 @@ export var themeConfig = function themeConfig(isDarkMode) {
9
9
  var colorGreen = isDarkMode ? colorScales.lime[type][9] : colorScales.green[type][9];
10
10
  var colorBlue = isDarkMode ? colorScales.blue[type][9] : colorScales.geekblue[type][9];
11
11
  return {
12
+ colors: {
13
+ 'editor.foreground': colorTextSecondary
14
+ },
12
15
  name: type,
13
- type: type,
14
16
  semanticHighlighting: true,
15
17
  semanticTokenColors: {
16
- enumMember: {
17
- foreground: colorBlue
18
- },
19
- 'variable.constant': {
18
+ 'annotation:dart': {
20
19
  foreground: colorGreen
21
20
  },
22
- 'variable.defaultLibrary': {
23
- foreground: colorRed
21
+ 'enumMember': {
22
+ foreground: colorBlue
24
23
  },
25
- 'variable:dart': {
24
+ 'macro': {
26
25
  foreground: colorGreen
27
26
  },
28
- 'property:dart': {
29
- foreground: colorGreen
27
+ 'parameter.label:dart': {
28
+ foreground: colorTextTertiary
30
29
  },
31
- 'annotation:dart': {
30
+ 'property:dart': {
32
31
  foreground: colorGreen
33
32
  },
34
- 'parameter.label:dart': {
35
- foreground: colorTextTertiary
33
+ 'tomlArrayKey': {
34
+ foreground: colorRed
36
35
  },
37
- macro: {
36
+ 'variable.constant': {
38
37
  foreground: colorGreen
39
38
  },
40
- tomlArrayKey: {
39
+ 'variable.defaultLibrary': {
41
40
  foreground: colorRed
41
+ },
42
+ 'variable:dart': {
43
+ foreground: colorGreen
42
44
  }
43
45
  },
44
46
  tokenColors: [{
@@ -1012,8 +1014,8 @@ export var themeConfig = function themeConfig(isDarkMode) {
1012
1014
  foreground: colorTextTertiary
1013
1015
  }
1014
1016
  }, {
1015
- name: 'php illegal.non-null-typehinted',
1016
- scope: 'invalid.illegal.non-null-typehinted.php',
1017
+ name: 'php illegal.non-undefined-typehinted',
1018
+ scope: 'invalid.illegal.non-undefined-typehinted.php',
1017
1019
  settings: {
1018
1020
  foreground: colorRed
1019
1021
  }
@@ -1497,8 +1499,8 @@ export var themeConfig = function themeConfig(isDarkMode) {
1497
1499
  name: 'Comments',
1498
1500
  scope: 'comment, punctuation.definition.comment',
1499
1501
  settings: {
1500
- foreground: colorTextTertiary,
1501
- fontStyle: 'italic'
1502
+ fontStyle: 'italic',
1503
+ foreground: colorTextTertiary
1502
1504
  }
1503
1505
  }, {
1504
1506
  name: '[VSCODE-CUSTOM] Markdown Quote',
@@ -1648,8 +1650,6 @@ export var themeConfig = function themeConfig(isDarkMode) {
1648
1650
  fontStyle: 'italic'
1649
1651
  }
1650
1652
  }],
1651
- colors: {
1652
- 'editor.foreground': colorTextSecondary
1653
- }
1653
+ type: type
1654
1654
  };
1655
1655
  };
package/es/Icon/index.js CHANGED
@@ -11,26 +11,34 @@ var calcSize = function calcSize(size) {
11
11
  var strokeWidth;
12
12
  switch (size) {
13
13
  case 'large':
14
- fontSize = 24;
15
- strokeWidth = 2;
16
- break;
14
+ {
15
+ fontSize = 24;
16
+ strokeWidth = 2;
17
+ break;
18
+ }
17
19
  case 'normal':
18
- fontSize = 20;
19
- strokeWidth = 2;
20
- break;
20
+ {
21
+ fontSize = 20;
22
+ strokeWidth = 2;
23
+ break;
24
+ }
21
25
  case 'small':
22
- fontSize = 14;
23
- strokeWidth = 1.5;
24
- break;
26
+ {
27
+ fontSize = 14;
28
+ strokeWidth = 1.5;
29
+ break;
30
+ }
25
31
  default:
26
- if (size) {
27
- fontSize = (size === null || size === void 0 ? void 0 : size.fontSize) || 24;
28
- strokeWidth = (size === null || size === void 0 ? void 0 : size.strokeWidth) || 2;
29
- } else {
30
- fontSize = '1em';
31
- strokeWidth = 2;
32
+ {
33
+ if (size) {
34
+ fontSize = (size === null || size === void 0 ? void 0 : size.fontSize) || 24;
35
+ strokeWidth = (size === null || size === void 0 ? void 0 : size.strokeWidth) || 2;
36
+ } else {
37
+ fontSize = '1em';
38
+ strokeWidth = 2;
39
+ }
40
+ break;
32
41
  }
33
- break;
34
42
  }
35
43
  return {
36
44
  fontSize: fontSize,
package/es/Input/index.js CHANGED
@@ -8,7 +8,7 @@ import { Input as AntInput } from 'antd';
8
8
  import { forwardRef, memo } from 'react';
9
9
  import { useStyles } from "./style";
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
- export var Input = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
11
+ export var Input = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, reference) {
12
12
  var className = _ref.className,
13
13
  _ref$type = _ref.type,
14
14
  type = _ref$type === void 0 ? 'ghost' : _ref$type,
@@ -21,10 +21,10 @@ export var Input = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, re
21
21
  return /*#__PURE__*/_jsx(AntInput, _objectSpread({
22
22
  bordered: type !== 'pure',
23
23
  className: cx(styles.input, className),
24
- ref: ref
24
+ ref: reference
25
25
  }, props));
26
26
  }));
27
- export var TextArea = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2, ref) {
27
+ export var TextArea = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2, reference) {
28
28
  var className = _ref2.className,
29
29
  _ref2$type = _ref2.type,
30
30
  type = _ref2$type === void 0 ? 'ghost' : _ref2$type,
@@ -40,7 +40,7 @@ export var TextArea = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2
40
40
  return /*#__PURE__*/_jsx(AntInput.TextArea, _objectSpread({
41
41
  bordered: type !== 'pure',
42
42
  className: cx(styles.textarea, className),
43
- ref: ref,
43
+ ref: reference,
44
44
  style: resize ? style : _objectSpread({
45
45
  resize: 'none'
46
46
  }, style)
@@ -1,7 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import { useResponsive } from 'antd-style';
3
3
  import { memo, useEffect, useState } from 'react';
4
- import { DraggablePanel } from "./..";
4
+ import DraggablePanel from "../DraggablePanel";
5
5
  import { useStyles } from "./style";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,11 +1,11 @@
1
1
  export declare const useStyles: (props?: number | undefined) => import("antd-style").ReturnStyles<{
2
2
  app: import("antd-style").SerializedStyles;
3
- header: import("antd-style").SerializedStyles;
4
- glass: import("antd-style").SerializedStyles;
5
- main: import("antd-style").SerializedStyles;
6
- content: import("antd-style").SerializedStyles;
7
- footer: import("antd-style").SerializedStyles;
8
3
  aside: import("antd-style").SerializedStyles;
9
4
  asideInner: import("antd-style").SerializedStyles;
5
+ content: import("antd-style").SerializedStyles;
6
+ footer: import("antd-style").SerializedStyles;
7
+ glass: import("antd-style").SerializedStyles;
8
+ header: import("antd-style").SerializedStyles;
9
+ main: import("antd-style").SerializedStyles;
10
10
  toc: import("antd-style").SerializedStyles;
11
11
  }>;
@@ -8,13 +8,13 @@ export var useStyles = createStyles(function (_ref, headerHeight) {
8
8
  var baseGlass = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pointer-events: none;\n content: '';\n user-select: none;\n\n position: absolute;\n z-index: -1;\n inset: -1px 0 ", ";\n "])), responsive.mobile ? '-25%' : '-50%');
9
9
  return {
10
10
  app: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n height: 100vh;\n "]))),
11
- header: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: sticky;\n z-index: 999;\n top: 0;\n max-width: 100%;\n "]))),
12
- glass: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n z-index: 0;\n\n &::before {\n ", ";\n ", ";\n mask-image: linear-gradient(to bottom, black ", "px, transparent);\n }\n\n &::after {\n ", ";\n }\n "])), stylish.blur, baseGlass, headerHeight, baseGlass),
13
- main: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: stretch;\n max-width: 100vw;\n "]))),
14
- content: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n flex: 1;\n max-width: 100%;\n "]))),
15
- footer: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n position: relative;\n max-width: 100%;\n "]))),
16
- aside: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: sticky;\n z-index: 2;\n height: 100%;\n "]))),
17
- asideInner: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n width: 100%;\n height: calc(100vh - 64px);\n "]))),
11
+ aside: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: sticky;\n z-index: 2;\n height: 100%;\n "]))),
12
+ asideInner: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n width: 100%;\n height: calc(100vh - 64px);\n "]))),
13
+ content: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n flex: 1;\n max-width: 100%;\n "]))),
14
+ footer: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n max-width: 100%;\n "]))),
15
+ glass: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n z-index: 0;\n\n &::before {\n ", ";\n ", ";\n mask-image: linear-gradient(to bottom, black ", "px, transparent);\n }\n\n &::after {\n ", ";\n }\n "])), stylish.blur, baseGlass, headerHeight, baseGlass),
16
+ header: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: sticky;\n z-index: 999;\n top: 0;\n max-width: 100%;\n "]))),
17
+ main: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: stretch;\n max-width: 100vw;\n "]))),
18
18
  toc: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral([""])))
19
19
  };
20
20
  });
@@ -60,5 +60,5 @@ export interface ListItemProps {
60
60
  */
61
61
  title: string;
62
62
  }
63
- declare const ListItem: import("react").ForwardRefExoticComponent<ListItemProps & HTMLAttributes<any> & import("react").RefAttributes<HTMLElement>>;
63
+ declare const ListItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ListItemProps & HTMLAttributes<any> & import("react").RefAttributes<HTMLElement>>>;
64
64
  export default ListItem;
@@ -1,55 +1,34 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
4
3
  var _excluded = ["active", "avatar", "loading", "description", "date", "title", "onHoverChange", "renderActions", "className", "style", "showAction", "classNames"];
5
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
6
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; }
7
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; }
8
6
  import { LoadingOutlined, MessageOutlined } from '@ant-design/icons';
9
- import { createStyles } from 'antd-style';
10
- import { forwardRef } from 'react';
7
+ import { forwardRef, memo } from 'react';
11
8
  import { Flexbox } from 'react-layout-kit';
12
- import { convertAlphaToSolid } from "../../utils/colorUtils";
9
+ import { useStyles } from "./style";
13
10
  import { getChatItemTime } from "./time";
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
- var useStyles = createStyles(function (_ref) {
17
- var css = _ref.css,
18
- cx = _ref.cx,
19
- token = _ref.token;
20
- var textOverlay = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n --overlay-background: ", ";\n\n position: absolute;\n z-index: 10;\n top: 0;\n right: 0;\n\n width: 32px;\n height: 44px;\n\n background: linear-gradient(to right, transparent, var(--overlay-background));\n "])), token.colorBgLayout);
21
- var overlayColor = convertAlphaToSolid(token.colorFillContent, token.colorBgLayout);
22
- var hoverOverlay = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " {\n --overlay-background: ", ";\n }\n "])), cx(textOverlay), overlayColor);
23
- return {
24
- container: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n border-radius: 8px;\n\n &:hover {\n background: ", ";\n ", "\n }\n "])), token.colorTextTertiary, token.colorFillContent, hoverOverlay),
25
- active: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n background: ", ";\n\n ", "\n "])), token.colorText, token.colorFillContent, hoverOverlay),
26
- content: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: 1;\n "]))),
27
- title: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n\n font-size: 0.9em;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))),
28
- time: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n "])), token.colorTextPlaceholder),
29
- desc: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n margin-top: 2px;\n\n font-size: 0.75em;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n opacity: 0.5;\n "]))),
30
- textOverlay: textOverlay
31
- };
32
- });
33
11
 
34
12
  /**
35
13
  * 卡片列表项的属性
36
14
  */
37
-
38
- var ListItem = /*#__PURE__*/forwardRef(function (_ref2, ref) {
39
- var active = _ref2.active,
40
- avatar = _ref2.avatar,
41
- loading = _ref2.loading,
42
- description = _ref2.description,
43
- date = _ref2.date,
44
- title = _ref2.title,
45
- onHoverChange = _ref2.onHoverChange,
46
- renderActions = _ref2.renderActions,
47
- className = _ref2.className,
48
- style = _ref2.style,
49
- showAction = _ref2.showAction,
50
- _ref2$classNames = _ref2.classNames,
51
- classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames,
52
- props = _objectWithoutProperties(_ref2, _excluded);
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ var ListItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, reference) {
18
+ var active = _ref.active,
19
+ avatar = _ref.avatar,
20
+ loading = _ref.loading,
21
+ description = _ref.description,
22
+ date = _ref.date,
23
+ title = _ref.title,
24
+ onHoverChange = _ref.onHoverChange,
25
+ renderActions = _ref.renderActions,
26
+ className = _ref.className,
27
+ style = _ref.style,
28
+ showAction = _ref.showAction,
29
+ _ref$classNames = _ref.classNames,
30
+ classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
31
+ props = _objectWithoutProperties(_ref, _excluded);
53
32
  var _useStyles = useStyles(),
54
33
  styles = _useStyles.styles,
55
34
  cx = _useStyles.cx;
@@ -61,7 +40,7 @@ var ListItem = /*#__PURE__*/forwardRef(function (_ref2, ref) {
61
40
  horizontal: true,
62
41
  paddingBlock: 8,
63
42
  paddingInline: '12px 8px',
64
- ref: ref,
43
+ ref: reference,
65
44
  style: style
66
45
  }, props), {}, {
67
46
  onMouseEnter: function onMouseEnter() {
@@ -106,5 +85,5 @@ var ListItem = /*#__PURE__*/forwardRef(function (_ref2, ref) {
106
85
  children: getChatItemTime(date)
107
86
  })]
108
87
  }));
109
- });
88
+ }));
110
89
  export default ListItem;
@@ -0,0 +1,9 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ active: import("antd-style").SerializedStyles;
3
+ container: import("antd-style").SerializedStyles;
4
+ content: import("antd-style").SerializedStyles;
5
+ desc: import("antd-style").SerializedStyles;
6
+ textOverlay: import("antd-style").SerializedStyles;
7
+ time: import("antd-style").SerializedStyles;
8
+ title: import("antd-style").SerializedStyles;
9
+ }>;
@@ -0,0 +1,21 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
3
+ import { createStyles } from 'antd-style';
4
+ import { convertAlphaToSolid } from "../../utils/colorUtils";
5
+ export var useStyles = createStyles(function (_ref) {
6
+ var css = _ref.css,
7
+ cx = _ref.cx,
8
+ token = _ref.token;
9
+ var textOverlay = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n --overlay-background: ", ";\n\n position: absolute;\n z-index: 10;\n top: 0;\n right: 0;\n\n width: 32px;\n height: 44px;\n\n background: linear-gradient(to right, transparent, var(--overlay-background));\n "])), token.colorBgLayout);
10
+ var overlayColor = convertAlphaToSolid(token.colorFillContent, token.colorBgLayout);
11
+ var hoverOverlay = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " {\n --overlay-background: ", ";\n }\n "])), cx(textOverlay), overlayColor);
12
+ return {
13
+ active: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n background: ", ";\n\n ", "\n "])), token.colorText, token.colorFillContent, hoverOverlay),
14
+ container: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n border-radius: 8px;\n\n &:hover {\n background: ", ";\n ", "\n }\n "])), token.colorTextTertiary, token.colorFillContent, hoverOverlay),
15
+ content: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: 1;\n "]))),
16
+ desc: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n margin-top: 2px;\n\n font-size: 0.75em;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n opacity: 0.5;\n "]))),
17
+ textOverlay: textOverlay,
18
+ time: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n "])), token.colorTextPlaceholder),
19
+ title: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n\n font-size: 0.9em;\n text-overflow: ellipsis;\n white-space: nowrap;\n "])))
20
+ };
21
+ });
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  declare const List: {
3
- Item: import("react").ForwardRefExoticComponent<import("./ListItem").ListItemProps & import("react").HTMLAttributes<any> & import("react").RefAttributes<HTMLElement>>;
3
+ Item: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./ListItem").ListItemProps & import("react").HTMLAttributes<any> & import("react").RefAttributes<HTMLElement>>>;
4
4
  };
5
5
  export default List;
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
1
+ import { type ReactNode } from 'react';
2
2
  import { DivProps } from "../types";
3
3
  export interface LogoProps extends DivProps {
4
4
  /**
5
5
  * @description Additional React Node to be rendered next to the logo
6
6
  */
7
- extra?: React.ReactNode;
7
+ extra?: ReactNode;
8
8
  /**
9
9
  * @description Size of the logo in pixels
10
10
  * @default 32