@lobehub/ui 1.148.2 → 1.149.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- export interface MobileChatSendButtonProps {
2
+ import { ActionIconProps } from "../../ActionIcon";
3
+ export interface MobileChatSendButtonProps extends Omit<ActionIconProps, 'loading'> {
3
4
  loading?: boolean;
4
5
  onSend?: () => void;
5
6
  onStop?: () => void;
@@ -1,5 +1,8 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["loading", "onStop", "onSend"];
1
4
  import { useTheme } from 'antd-style';
2
- import { Loader2, SendHorizonal } from 'lucide-react';
5
+ import { Loader2, SendHorizontal } from 'lucide-react';
3
6
  import { readableColor } from 'polished';
4
7
  import { memo } from 'react';
5
8
  import ActionIcon from "../../ActionIcon";
@@ -7,20 +10,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
10
  var MobileChatSendButton = /*#__PURE__*/memo(function (_ref) {
8
11
  var loading = _ref.loading,
9
12
  onStop = _ref.onStop,
10
- onSend = _ref.onSend;
13
+ onSend = _ref.onSend,
14
+ rest = _objectWithoutProperties(_ref, _excluded);
11
15
  var theme = useTheme();
12
16
  var size = {
13
17
  blockSize: 36,
14
18
  fontSize: 16
15
19
  };
16
- return loading ? /*#__PURE__*/_jsx(ActionIcon, {
20
+ return loading ? /*#__PURE__*/_jsx(ActionIcon, _objectSpread({
17
21
  active: true,
18
22
  icon: Loader2,
19
23
  onClick: onStop,
20
24
  size: size,
21
25
  spin: true
22
- }) : /*#__PURE__*/_jsx(ActionIcon, {
23
- icon: SendHorizonal,
26
+ }, rest)) : /*#__PURE__*/_jsx(ActionIcon, _objectSpread({
27
+ icon: SendHorizontal,
24
28
  onClick: onSend,
25
29
  size: size,
26
30
  style: {
@@ -28,6 +32,6 @@ var MobileChatSendButton = /*#__PURE__*/memo(function (_ref) {
28
32
  color: readableColor(theme.colorPrimary),
29
33
  flex: 'none'
30
34
  }
31
- });
35
+ }, rest));
32
36
  });
33
37
  export default MobileChatSendButton;
@@ -15,7 +15,7 @@ export var useCode = function useCode(raw) {
15
15
  children = _raw$props.children,
16
16
  className = _raw$props.className;
17
17
  if (!children) return;
18
- var content = (Array.isArray(children) ? children[0] : children).trim();
18
+ var content = Array.isArray(children) ? children[0] : children;
19
19
  var lang = (className === null || className === void 0 ? void 0 : className.replace('language-', '')) || FALLBACK_LANG;
20
20
  var isSingleLine = countLines(content) <= 1 && content.length <= 32;
21
21
  return {
@@ -62,6 +62,7 @@ var MaterialFileTypeIcon = /*#__PURE__*/memo(function (_ref) {
62
62
  width: size
63
63
  }, rest), {}, {
64
64
  children: [/*#__PURE__*/_jsx(FileTypeIcon, {
65
+ size: size,
65
66
  type: variant,
66
67
  variant: 'mono'
67
68
  }), /*#__PURE__*/_jsx(Img, _objectSpread({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.148.2",
3
+ "version": "1.149.1",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",