@lobehub/ui 1.153.18 → 1.154.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,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(
|
|
39
|
+
var _useState = useState(defalutExpand),
|
|
38
40
|
_useState2 = _slicedToArray(_useState, 2),
|
|
39
41
|
expand = _useState2[0],
|
|
40
42
|
setExpand = _useState2[1];
|
package/es/Highlighter/type.d.ts
CHANGED
|
@@ -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/es/Modal/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type ModalProps as AntModalProps } from 'antd';
|
|
3
|
-
import { type ActionIconProps } from "../ActionIcon";
|
|
4
3
|
export type ModalProps = AntModalProps & {
|
|
5
4
|
allowFullscreen?: boolean;
|
|
6
|
-
closeIconProps?: Omit<ActionIconProps, 'size'>;
|
|
7
5
|
enableResponsive?: boolean;
|
|
8
6
|
maxHeight?: string | number | false;
|
|
9
7
|
paddings?: {
|
package/es/Modal/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
6
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
7
|
-
var _excluded = ["allowFullscreen", "children", "title", "className", "wrapClassName", "width", "onCancel", "open", "destroyOnClose", "paddings", "maxHeight", "enableResponsive", "
|
|
7
|
+
var _excluded = ["allowFullscreen", "children", "title", "className", "wrapClassName", "width", "onCancel", "open", "destroyOnClose", "paddings", "maxHeight", "enableResponsive", "footer", "styles"],
|
|
8
8
|
_excluded2 = ["body"];
|
|
9
9
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
10
10
|
import { Modal as AntModal, ConfigProvider, Drawer } from 'antd';
|
|
@@ -48,7 +48,6 @@ var Modal = /*#__PURE__*/memo(function (_ref3) {
|
|
|
48
48
|
maxHeight = _ref3$maxHeight === void 0 ? '75dvh' : _ref3$maxHeight,
|
|
49
49
|
_ref3$enableResponsiv = _ref3.enableResponsive,
|
|
50
50
|
enableResponsive = _ref3$enableResponsiv === void 0 ? true : _ref3$enableResponsiv,
|
|
51
|
-
closeIconProps = _ref3.closeIconProps,
|
|
52
51
|
footer = _ref3.footer,
|
|
53
52
|
_ref3$styles = _ref3.styles,
|
|
54
53
|
stylesProps = _ref3$styles === void 0 ? {} : _ref3$styles,
|
|
@@ -104,12 +103,12 @@ var Modal = /*#__PURE__*/memo(function (_ref3) {
|
|
|
104
103
|
children: /*#__PURE__*/_jsx(AntModal, _objectSpread(_objectSpread({
|
|
105
104
|
className: cx(styles.content, className),
|
|
106
105
|
closable: true,
|
|
107
|
-
closeIcon: /*#__PURE__*/_jsx(Icon,
|
|
106
|
+
closeIcon: /*#__PURE__*/_jsx(Icon, {
|
|
108
107
|
icon: X,
|
|
109
108
|
size: {
|
|
110
109
|
fontSize: 20
|
|
111
110
|
}
|
|
112
|
-
}
|
|
111
|
+
}),
|
|
113
112
|
destroyOnClose: destroyOnClose,
|
|
114
113
|
footer: footer,
|
|
115
114
|
maskClosable: true,
|