@lobehub/ui 2.13.5 → 2.13.6

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,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- var _excluded = ["value", "defaultAvatar", "onChange", "locale", "allowUpload", "allowDelete", "texts", "onDelete", "compressSize", "customEmojis", "className", "loading", "onUpload", "customTabs", "popupClassName", "popupStyle"];
4
+ var _excluded = ["value", "defaultAvatar", "onChange", "locale", "allowUpload", "allowDelete", "texts", "onDelete", "compressSize", "customEmojis", "className", "loading", "onUpload", "customTabs", "popupClassName", "popupStyle", "customRender"];
5
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
6
  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; }
7
7
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -61,6 +61,7 @@ var EmojiPicker = /*#__PURE__*/memo(function (_ref) {
61
61
  customTabs = _ref$customTabs === void 0 ? [] : _ref$customTabs,
62
62
  popupClassName = _ref.popupClassName,
63
63
  popupStyle = _ref.popupStyle,
64
+ customRender = _ref.customRender,
64
65
  rest = _objectWithoutProperties(_ref, _excluded);
65
66
  var ref = useRef(null);
66
67
  var _useState = useState('emoji'),
@@ -135,7 +136,7 @@ var EmojiPicker = /*#__PURE__*/memo(function (_ref) {
135
136
  label: tab.label
136
137
  };
137
138
  }))).filter(Boolean);
138
- var showTabs = items && items.length > 1;
139
+ var showTabs = allowDelete || items && items.length > 1;
139
140
  var content = /*#__PURE__*/_jsxs(Flexbox, {
140
141
  className: cx(styles.picker, popupClassName),
141
142
  ref: ref,
@@ -201,7 +202,7 @@ var EmojiPicker = /*#__PURE__*/memo(function (_ref) {
201
202
  placement: 'bottomRight',
202
203
  rootClassName: styles.popover,
203
204
  trigger: ['click'],
204
- children: /*#__PURE__*/_jsx(Avatar, _objectSpread({
205
+ children: customRender ? customRender(ava) : /*#__PURE__*/_jsx(Avatar, _objectSpread({
205
206
  avatar: ava,
206
207
  className: cx(styles.root, className),
207
208
  loading: loading
@@ -25,6 +25,7 @@ export interface EmojiPickerProps extends Omit<AvatarProps, 'onChange' | 'avatar
25
25
  allowUpload?: boolean;
26
26
  compressSize?: number;
27
27
  customEmojis?: EmojiPickerCustomEmoji[];
28
+ customRender?: (avatar: string) => ReactNode;
28
29
  customTabs?: EmojiPickerCustomTab[];
29
30
  defaultAvatar?: string;
30
31
  loading?: boolean;
@@ -2,6 +2,7 @@ import type { InputNumberProps as AntdInputNumberProps, InputProps as AntdInputP
2
2
  import type { OTPProps as AntdOPTProps, OTPRef } from 'antd/es/input/OTP';
3
3
  import type { PasswordProps as AntdPasswordProps } from 'antd/es/input/Password';
4
4
  import type { TextAreaProps as AntdTextAreaProps, TextAreaRef } from 'antd/es/input/TextArea';
5
+ import type { InputNumberRef } from 'rc-input-number';
5
6
  import type { Ref } from 'react';
6
7
  export interface InputProps extends AntdInputProps {
7
8
  ref?: Ref<InputRef>;
@@ -13,7 +14,7 @@ export interface TextAreaProps extends AntdTextAreaProps {
13
14
  shadow?: boolean;
14
15
  }
15
16
  export interface InputNumberProps extends AntdInputNumberProps {
16
- ref?: Ref<HTMLInputElement>;
17
+ ref?: Ref<InputNumberRef>;
17
18
  shadow?: boolean;
18
19
  }
19
20
  export interface InputPasswordProps extends AntdPasswordProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "2.13.5",
3
+ "version": "2.13.6",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -55,38 +55,39 @@
55
55
  "@floating-ui/react": "^0.27.16",
56
56
  "@giscus/react": "^3.1.0",
57
57
  "@lobehub/fluent-emoji": "^2.0.0",
58
- "@lobehub/icons": "^2.33.0",
58
+ "@lobehub/icons": "^2.43.1",
59
59
  "@mdx-js/mdx": "^3.1.1",
60
60
  "@mdx-js/react": "^3.1.1",
61
- "@radix-ui/react-slot": "^1.2.3",
62
- "@shikijs/transformers": "^3.12.2",
61
+ "@radix-ui/react-slot": "^1.2.4",
62
+ "@shikijs/transformers": "^3.15.0",
63
63
  "@splinetool/runtime": "0.9.526",
64
- "ahooks": "^3.9.5",
64
+ "ahooks": "^3.9.6",
65
65
  "antd-style": "^3.7.1",
66
66
  "chroma-js": "^3.1.2",
67
67
  "class-variance-authority": "^0.7.1",
68
- "dayjs": "^1.11.18",
68
+ "dayjs": "^1.11.19",
69
69
  "emoji-mart": "^5.6.0",
70
70
  "fast-deep-equal": "^3.1.3",
71
- "framer-motion": "^12.23.13",
72
- "immer": "^10.1.3",
73
- "katex": "^0.16.22",
74
- "leva": "^0.10.0",
71
+ "framer-motion": "^12.23.24",
72
+ "immer": "^10.2.0",
73
+ "katex": "^0.16.25",
74
+ "leva": "^0.10.1",
75
75
  "lodash-es": "^4.17.21",
76
76
  "lucide-react": "^0.543.0",
77
- "marked": "^16.3.0",
78
- "mermaid": "^11.11.0",
77
+ "marked": "^16.4.1",
78
+ "mermaid": "^11.12.1",
79
79
  "numeral": "^2.0.6",
80
80
  "polished": "^4.3.1",
81
- "query-string": "^9.3.0",
81
+ "query-string": "^9.3.1",
82
82
  "rc-collapse": "^4.0.0",
83
83
  "rc-footer": "^0.6.8",
84
84
  "rc-image": "^7.12.0",
85
+ "rc-input-number": "^9.5.0",
85
86
  "rc-menu": "^9.16.1",
86
87
  "re-resizable": "^6.11.2",
87
88
  "react-avatar-editor": "^13.0.2",
88
89
  "react-error-boundary": "^5.0.0",
89
- "react-hotkeys-hook": "^5.1.0",
90
+ "react-hotkeys-hook": "^5.2.1",
90
91
  "react-layout-kit": "^2.0.0",
91
92
  "react-markdown": "^10.1.0",
92
93
  "react-merge-refs": "^3.0.2",
@@ -96,11 +97,11 @@
96
97
  "rehype-katex": "^7.0.1",
97
98
  "rehype-raw": "^7.0.0",
98
99
  "remark-breaks": "^4.0.0",
99
- "remark-cjk-friendly": "^1.2.1",
100
+ "remark-cjk-friendly": "^1.2.3",
100
101
  "remark-gfm": "^4.0.1",
101
102
  "remark-github": "^12.0.0",
102
103
  "remark-math": "^6.0.0",
103
- "shiki": "^3.12.2",
104
+ "shiki": "^3.15.0",
104
105
  "swr": "^2.3.6",
105
106
  "ts-md5": "^2.0.1",
106
107
  "unified": "^11.0.5",