@lobehub/ui 1.96.2 → 1.97.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.
@@ -7,11 +7,13 @@ export type ChatInputAreaMobile = ChatInputBase & InputProps & {
7
7
  inputId?: string;
8
8
  inputStyle?: CSSProperties;
9
9
  minHeight?: number;
10
+ safeArea?: boolean;
10
11
  };
11
12
  declare const ChatInputArea: import("react").ForwardRefExoticComponent<ChatInputBase & InputProps & {
12
13
  inputClassName?: string | undefined;
13
14
  inputId?: string | undefined;
14
15
  inputStyle?: CSSProperties | undefined;
15
16
  minHeight?: number | undefined;
17
+ safeArea?: boolean | undefined;
16
18
  } & import("react").RefAttributes<InputRef>>;
17
19
  export default ChatInputArea;
@@ -1,7 +1,7 @@
1
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
- var _excluded = ["inputClassName", "style", "inputStyle", "minHeight", "className", "actions", "expand", "placeholder", "onExpandChange", "onSend", "defaultValue", "loading", "disabled", "onInputChange", "onPressEnter", "onCompositionStart", "onCompositionEnd", "onBlur", "onChange", "inputId", "actionsRight", "onStop", "value"];
4
+ var _excluded = ["inputClassName", "style", "inputStyle", "minHeight", "className", "actions", "safeArea", "expand", "placeholder", "onExpandChange", "onSend", "defaultValue", "loading", "disabled", "onInputChange", "onPressEnter", "onCompositionStart", "onCompositionEnd", "onBlur", "onChange", "inputId", "actionsRight", "onStop", "value"];
5
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
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; }
7
7
  import { Button } from 'antd';
@@ -11,6 +11,7 @@ import { Flexbox } from 'react-layout-kit';
11
11
  import useControlledState from 'use-merge-value';
12
12
  import Icon from "../Icon";
13
13
  import { Input } from "../Input";
14
+ import MobileSafeArea from "../MobileSafeArea";
14
15
  import Action from "./Action";
15
16
  import { useStyles } from "./style.mobile";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -23,6 +24,8 @@ var ChatInputArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
23
24
  minHeight = _ref$minHeight === void 0 ? 200 : _ref$minHeight,
24
25
  className = _ref.className,
25
26
  actions = _ref.actions,
27
+ _ref$safeArea = _ref.safeArea,
28
+ safeArea = _ref$safeArea === void 0 ? true : _ref$safeArea,
26
29
  expand = _ref.expand,
27
30
  _ref$placeholder = _ref.placeholder,
28
31
  placeholder = _ref$placeholder === void 0 ? 'Type something to chat...' : _ref$placeholder,
@@ -126,6 +129,8 @@ var ChatInputArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
126
129
  type: 'primary'
127
130
  })
128
131
  })]
132
+ }), safeArea && /*#__PURE__*/_jsx(MobileSafeArea, {
133
+ position: 'bottom'
129
134
  })]
130
135
  });
131
136
  });
@@ -13,5 +13,6 @@ declare const ChatInputArea: import("react").ForwardRefExoticComponent<import(".
13
13
  inputId?: string | undefined;
14
14
  inputStyle?: import("react").CSSProperties | undefined;
15
15
  minHeight?: number | undefined;
16
+ safeArea?: boolean | undefined;
16
17
  } & import("react").RefAttributes<InputRef>>;
17
18
  export default ChatInputArea;
@@ -3,13 +3,12 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  var _excluded = ["onActionClick", "renderMessageExtra", "className", "data", "type", "text", "showTitle", "onMessageChange", "renderMessage", "renderErrorMessage", "loadingId", "renderItem", "enableHistoryCount", "historyCount"];
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
- import { memo } from 'react';
6
+ import { Fragment, memo } from 'react';
7
7
  import Group from "./Group";
8
8
  import HistoryDivider from "./HistoryDivider";
9
9
  import Item from "./Item";
10
10
  import { useStyles } from "./style";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
- import { Fragment as _Fragment } from "react/jsx-runtime";
13
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
13
  var ChatList = /*#__PURE__*/memo(function (_ref) {
15
14
  var onActionClick = _ref.onActionClick,
@@ -52,7 +51,7 @@ var ChatList = /*#__PURE__*/memo(function (_ref) {
52
51
  var historyLength = data.length;
53
52
  var enableHistoryDivider = enableHistoryCount && historyLength > historyCount && historyCount === historyLength - index + 1;
54
53
  if (item.children && ((_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) > 0) {
55
- return /*#__PURE__*/_jsxs(_Fragment, {
54
+ return /*#__PURE__*/_jsxs(Fragment, {
56
55
  children: [/*#__PURE__*/_jsx(HistoryDivider, {
57
56
  enable: enableHistoryDivider,
58
57
  text: text
@@ -61,15 +60,15 @@ var ChatList = /*#__PURE__*/memo(function (_ref) {
61
60
  return _objectSpread(_objectSpread({}, props), childrenItem);
62
61
  }),
63
62
  meta: item.meta
64
- }, item.children[0].id)]
65
- });
63
+ })]
64
+ }, item.children[0].id);
66
65
  }
67
- return /*#__PURE__*/_jsxs(_Fragment, {
66
+ return /*#__PURE__*/_jsxs(Fragment, {
68
67
  children: [/*#__PURE__*/_jsx(HistoryDivider, {
69
68
  enable: enableHistoryDivider,
70
69
  text: text
71
- }), /*#__PURE__*/_jsx(Item, _objectSpread(_objectSpread({}, props), item), item.id)]
72
- });
70
+ }), /*#__PURE__*/_jsx(Item, _objectSpread(_objectSpread({}, props), item))]
71
+ }, item.id);
73
72
  })
74
73
  }));
75
74
  });
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface MetaProps {
3
+ description?: string;
3
4
  title?: string;
4
5
  withManifest?: boolean;
5
6
  }
@@ -6,17 +6,22 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
6
6
  var Meta = /*#__PURE__*/memo(function (_ref) {
7
7
  var _ref$title = _ref.title,
8
8
  title = _ref$title === void 0 ? 'LobeHub' : _ref$title,
9
+ _ref$description = _ref.description,
10
+ description = _ref$description === void 0 ? 'Empowering your AI dreams with LobeHub' : _ref$description,
9
11
  withManifest = _ref.withManifest;
10
12
  var genCdnUrl = useCdnFn();
11
13
  var genAssets = useCallback(function (path) {
12
14
  return genCdnUrl({
13
15
  path: path,
14
16
  pkg: '@lobehub/assets-favicons',
15
- version: '1.1.0'
17
+ version: 'latest'
16
18
  });
17
19
  }, []);
18
20
  return /*#__PURE__*/_jsxs(_Fragment, {
19
21
  children: [/*#__PURE__*/_jsx("link", {
22
+ href: genAssets('assets/favicon.ico'),
23
+ rel: "shortcut icon"
24
+ }), /*#__PURE__*/_jsx("link", {
20
25
  href: genAssets('assets/apple-touch-icon.png'),
21
26
  rel: "apple-touch-icon",
22
27
  sizes: "180x180"
@@ -30,22 +35,38 @@ var Meta = /*#__PURE__*/memo(function (_ref) {
30
35
  rel: "icon",
31
36
  sizes: "16x16",
32
37
  type: "image/png"
33
- }), /*#__PURE__*/_jsx("link", {
34
- color: "#000000",
35
- href: genAssets('assets/safari-pinned-tab.svg'),
36
- rel: "mask-icon"
38
+ }), /*#__PURE__*/_jsx("meta", {
39
+ content: "width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover, user-scalable=no",
40
+ name: "viewport"
37
41
  }), /*#__PURE__*/_jsx("meta", {
38
42
  content: title,
39
43
  name: "apple-mobile-web-app-title"
40
44
  }), /*#__PURE__*/_jsx("meta", {
41
45
  content: title,
42
46
  name: "application-name"
47
+ }), /*#__PURE__*/_jsx("meta", {
48
+ content: description,
49
+ name: "description"
43
50
  }), /*#__PURE__*/_jsx("meta", {
44
51
  content: "#000000",
45
52
  name: "msapplication-TileColor"
46
53
  }), /*#__PURE__*/_jsx("meta", {
47
- content: "#000000",
54
+ content: "#fff",
55
+ media: "(prefers-color-scheme: light)",
56
+ name: "theme-color"
57
+ }), /*#__PURE__*/_jsx("meta", {
58
+ content: "#000",
59
+ media: "(prefers-color-scheme: dark)",
48
60
  name: "theme-color"
61
+ }), /*#__PURE__*/_jsx("meta", {
62
+ content: "yes",
63
+ name: "apple-mobile-web-app-capable"
64
+ }), /*#__PURE__*/_jsx("meta", {
65
+ content: title,
66
+ name: "apple-mobile-web-app-title"
67
+ }), /*#__PURE__*/_jsx("meta", {
68
+ content: "black-translucent",
69
+ name: "apple-mobile-web-app-status-bar-style"
49
70
  }), withManifest && /*#__PURE__*/_jsx("link", {
50
71
  href: genAssets('assets/site.webmanifest'),
51
72
  rel: "manifest"
@@ -3,6 +3,6 @@ export interface CdnApi {
3
3
  path: string;
4
4
  pkg: string;
5
5
  proxy?: CDN;
6
- version: string;
6
+ version?: string;
7
7
  }
8
8
  export declare const genCdnUrl: ({ pkg, version, path, proxy }: CdnApi) => string;
@@ -3,7 +3,8 @@ var UNPKG_API = 'https://unpkg.com';
3
3
  var ALIYUN_API = 'https://registry.npmmirror.com';
4
4
  export var genCdnUrl = function genCdnUrl(_ref) {
5
5
  var pkg = _ref.pkg,
6
- version = _ref.version,
6
+ _ref$version = _ref.version,
7
+ version = _ref$version === void 0 ? 'latest' : _ref$version,
7
8
  path = _ref.path,
8
9
  proxy = _ref.proxy;
9
10
  switch (proxy) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.96.2",
3
+ "version": "1.97.1",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",