@lobehub/ui 1.120.8 → 1.120.9

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,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
5
4
  var _excluded = ["className", "style", "classNames", "expand", "setExpand", "bottomAddons", "topAddons", "onSizeChange", "heights", "onSend"];
@@ -8,7 +7,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
8
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9
8
  import { createStyles } from 'antd-style';
10
9
  import { forwardRef } from 'react';
11
- import useMergeState from 'use-merge-value';
12
10
  import DraggablePanel from "../../DraggablePanel";
13
11
  import ChatInputAreaInner from "../ChatInputAreaInner";
14
12
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -26,7 +24,7 @@ var ChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
26
24
  style = _ref2.style,
27
25
  classNames = _ref2.classNames,
28
26
  _ref2$expand = _ref2.expand,
29
- expand = _ref2$expand === void 0 ? false : _ref2$expand,
27
+ expand = _ref2$expand === void 0 ? true : _ref2$expand,
30
28
  setExpand = _ref2.setExpand,
31
29
  bottomAddons = _ref2.bottomAddons,
32
30
  topAddons = _ref2.topAddons,
@@ -34,19 +32,12 @@ var ChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
34
32
  heights = _ref2.heights,
35
33
  _onSend = _ref2.onSend,
36
34
  rest = _objectWithoutProperties(_ref2, _excluded);
37
- var _useMergeState = useMergeState(expand, {
38
- defaultValue: expand,
39
- onChange: setExpand
40
- }),
41
- _useMergeState2 = _slicedToArray(_useMergeState, 2),
42
- fullscreen = _useMergeState2[0],
43
- setFullscreen = _useMergeState2[1];
44
35
  var _useStyles = useStyles(),
45
36
  styles = _useStyles.styles;
46
37
  return /*#__PURE__*/_jsx(DraggablePanel, {
47
38
  className: className,
48
39
  classNames: classNames,
49
- fullscreen: fullscreen,
40
+ fullscreen: expand,
50
41
  headerHeight: heights === null || heights === void 0 ? void 0 : heights.headerHeight,
51
42
  minHeight: heights === null || heights === void 0 ? void 0 : heights.minHeight,
52
43
  onSizeChange: onSizeChange,
@@ -69,7 +60,7 @@ var ChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
69
60
  className: styles.textarea,
70
61
  onSend: function onSend() {
71
62
  _onSend === null || _onSend === void 0 || _onSend();
72
- setFullscreen(false);
63
+ setExpand === null || setExpand === void 0 || setExpand(false);
73
64
  },
74
65
  ref: ref,
75
66
  type: 'pure'
@@ -45,7 +45,7 @@ var ChatSendButton = /*#__PURE__*/memo(function (_ref) {
45
45
  children: [/*#__PURE__*/_jsx(Icon, {
46
46
  icon: CornerDownLeft
47
47
  }), /*#__PURE__*/_jsx("span", {
48
- children: (texts === null || texts === void 0 ? void 0 : texts.warp) || 'Warp'
48
+ children: (texts === null || texts === void 0 ? void 0 : texts.send) || 'Send'
49
49
  }), /*#__PURE__*/_jsx("span", {
50
50
  children: "/"
51
51
  }), /*#__PURE__*/_jsxs(Flexbox, {
@@ -56,7 +56,7 @@ var ChatSendButton = /*#__PURE__*/memo(function (_ref) {
56
56
  icon: CornerDownLeft
57
57
  })]
58
58
  }), /*#__PURE__*/_jsx("span", {
59
- children: (texts === null || texts === void 0 ? void 0 : texts.send) || 'Send'
59
+ children: (texts === null || texts === void 0 ? void 0 : texts.warp) || 'Warp'
60
60
  })]
61
61
  }), rightAddons, loading ? /*#__PURE__*/_jsx(Button, {
62
62
  icon: loading && /*#__PURE__*/_jsx(Icon, {
@@ -15,15 +15,15 @@ import { Flexbox } from 'react-layout-kit';
15
15
  import useMergeState from 'use-merge-value';
16
16
  import ActionIcon from "../../ActionIcon";
17
17
  import ChatInputAreaInner from "../ChatInputAreaInner";
18
- import { jsx as _jsx } from "react/jsx-runtime";
19
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
20
  var useStyles = createStyles(function (_ref) {
21
21
  var css = _ref.css,
22
22
  token = _ref.token;
23
23
  return {
24
- container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 12px 0;\n background: ", ";\n border-top: 1px solid ", ";\n "])), token.colorBgLayout, rgba(token.colorBorder, 0.25)),
24
+ container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 12px 0;\n background: ", ";\n border-top: 1px solid ", ";\n "])), token.colorFillQuaternary, rgba(token.colorBorder, 0.25)),
25
25
  fullscreen: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 100%;\n "]))),
26
- fullscreenButton: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n right: 14px;\n "]))),
26
+ fullscreenButton: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n left: 14px;\n "]))),
27
27
  fullscreenTextArea: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1;\n "]))),
28
28
  inner: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n height: inherit;\n padding: 0 8px;\n "])))
29
29
  };
@@ -68,14 +68,12 @@ var MobileChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
68
68
  return fullscreen ? /*#__PURE__*/_jsxs(Flexbox, {
69
69
  className: styles.inner,
70
70
  gap: 8,
71
- style: {
72
- paddingTop: 36
73
- },
74
- children: [children, /*#__PURE__*/_jsxs(Flexbox, {
71
+ children: [/*#__PURE__*/_jsxs(Flexbox, {
72
+ gap: 8,
75
73
  horizontal: true,
76
- justify: 'space-between',
77
- children: [textAreaLeftAddons || /*#__PURE__*/_jsx("div", {}), textAreaRightAddons || /*#__PURE__*/_jsx("div", {})]
78
- })]
74
+ justify: 'flex-end',
75
+ children: [textAreaLeftAddons, textAreaRightAddons]
76
+ }), children, topAddons, bottomAddons]
79
77
  }) : /*#__PURE__*/_jsxs(Flexbox, {
80
78
  align: 'flex-end',
81
79
  className: styles.inner,
@@ -91,8 +89,7 @@ var MobileChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
91
89
  style: style,
92
90
  children: [topAddons && /*#__PURE__*/_jsx(Flexbox, {
93
91
  style: showAddons ? {} : {
94
- height: 0,
95
- overflow: 'hidden'
92
+ display: 'none'
96
93
  },
97
94
  children: topAddons
98
95
  }), /*#__PURE__*/_jsxs(Flexbox, {
@@ -112,7 +109,10 @@ var MobileChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
112
109
  blockSize: 24,
113
110
  borderRadius: '50%',
114
111
  fontSize: 14
115
- }
112
+ },
113
+ style: fullscreen ? {
114
+ top: 6
115
+ } : {}
116
116
  }), /*#__PURE__*/_jsx(InnerContainer, {
117
117
  children: /*#__PURE__*/_jsx(ChatInputAreaInner, _objectSpread({
118
118
  autoSize: fullscreen ? false : {
@@ -136,8 +136,7 @@ var MobileChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
136
136
  })]
137
137
  }), bottomAddons && /*#__PURE__*/_jsx(Flexbox, {
138
138
  style: showAddons ? {} : {
139
- height: 0,
140
- overflow: 'hidden'
139
+ display: 'none'
141
140
  },
142
141
  children: bottomAddons
143
142
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.120.8",
3
+ "version": "1.120.9",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",