@lobehub/ui 1.153.18 → 1.154.0

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
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["children", "language", "showLanguage", "className", "style", "allowChangeLanguage", "fileName", "icon", "bodyRender", "actionsRender", "copyable", "type"];
4
+ var _excluded = ["children", "language", "showLanguage", "className", "style", "allowChangeLanguage", "fileName", "icon", "bodyRender", "actionsRender", "copyable", "type", "defalutExpand"];
5
5
  import { Select } from 'antd';
6
6
  import { ChevronDown, ChevronRight } from 'lucide-react';
7
7
  import { memo, useState } from 'react';
@@ -33,8 +33,10 @@ export var HighlighterFullFeatured = /*#__PURE__*/memo(function (_ref) {
33
33
  actionsRender = _ref.actionsRender,
34
34
  copyable = _ref.copyable,
35
35
  type = _ref.type,
36
+ _ref$defalutExpand = _ref.defalutExpand,
37
+ defalutExpand = _ref$defalutExpand === void 0 ? true : _ref$defalutExpand,
36
38
  rest = _objectWithoutProperties(_ref, _excluded);
37
- var _useState = useState(true),
39
+ var _useState = useState(defalutExpand),
38
40
  _useState2 = _slicedToArray(_useState, 2),
39
41
  expand = _useState2[0],
40
42
  setExpand = _useState2[1];
@@ -25,6 +25,11 @@ export interface HighlighterProps extends DivProps {
25
25
  * @default true
26
26
  */
27
27
  copyable?: boolean;
28
+ /**
29
+ * @description Whether to expand code blocks by default
30
+ * @default true
31
+ */
32
+ defalutExpand?: boolean;
28
33
  fileName?: string;
29
34
  fullFeatured?: boolean;
30
35
  icon?: ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.153.18",
3
+ "version": "1.154.0",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",