@lobehub/ui 2.1.13 → 2.1.14
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.
package/es/Markdown/Markdown.js
CHANGED
|
@@ -43,8 +43,7 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
43
43
|
fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,
|
|
44
44
|
_ref$headerMultiple = _ref.headerMultiple,
|
|
45
45
|
headerMultiple = _ref$headerMultiple === void 0 ? 0.25 : _ref$headerMultiple,
|
|
46
|
-
|
|
47
|
-
marginMultiple = _ref$marginMultiple === void 0 ? 1 : _ref$marginMultiple,
|
|
46
|
+
marginMultiple = _ref.marginMultiple,
|
|
48
47
|
showFootnotes = _ref.showFootnotes,
|
|
49
48
|
_ref$variant = _ref.variant,
|
|
50
49
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
@@ -125,7 +124,7 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
125
124
|
fontSize: fontSize,
|
|
126
125
|
headerMultiple: headerMultiple,
|
|
127
126
|
lineHeight: lineHeight,
|
|
128
|
-
marginMultiple: marginMultiple,
|
|
127
|
+
marginMultiple: marginMultiple || (variant === 'chat' ? 1 : 2),
|
|
129
128
|
onDoubleClick: onDoubleClick,
|
|
130
129
|
ref: ref,
|
|
131
130
|
style: style
|
|
@@ -18,7 +18,8 @@ var Typography = /*#__PURE__*/memo(function (_ref) {
|
|
|
18
18
|
className = _ref.className,
|
|
19
19
|
fontSize = _ref.fontSize,
|
|
20
20
|
headerMultiple = _ref.headerMultiple,
|
|
21
|
-
marginMultiple = _ref.marginMultiple,
|
|
21
|
+
_ref$marginMultiple = _ref.marginMultiple,
|
|
22
|
+
marginMultiple = _ref$marginMultiple === void 0 ? 2 : _ref$marginMultiple,
|
|
22
23
|
lineHeight = _ref.lineHeight,
|
|
23
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
25
|
var _useStyles = useStyles({
|
|
@@ -11,7 +11,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
11
11
|
_ref2$headerMultiple = _ref2.headerMultiple,
|
|
12
12
|
headerMultiple = _ref2$headerMultiple === void 0 ? 1 : _ref2$headerMultiple,
|
|
13
13
|
_ref2$marginMultiple = _ref2.marginMultiple,
|
|
14
|
-
marginMultiple = _ref2$marginMultiple === void 0 ?
|
|
14
|
+
marginMultiple = _ref2$marginMultiple === void 0 ? 2 : _ref2$marginMultiple,
|
|
15
15
|
_ref2$lineHeight = _ref2.lineHeight,
|
|
16
16
|
lineHeight = _ref2$lineHeight === void 0 ? 1.8 : _ref2$lineHeight;
|
|
17
17
|
var __root = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n --lobe-markdown-font-size: ", "px;\n --lobe-markdown-header-multiple: ", ";\n --lobe-markdown-margin-multiple: ", ";\n --lobe-markdown-line-height: ", ";\n --lobe-markdown-border-radius: ", ";\n --lobe-markdown-border-color: ", ";\n\n position: relative;\n\n width: 100%;\n max-width: 100%;\n padding-inline: 1px;\n\n font-size: var(--lobe-markdown-font-size);\n line-height: var(--lobe-markdown-line-height);\n word-break: break-word;\n\n ", " {\n font-size: 14px;\n line-height: 1.5;\n }\n "])), fontSize, headerMultiple, marginMultiple, lineHeight, token.borderRadiusLG, token.colorFillQuaternary, IGNORE_CLASSNAME);
|
|
@@ -13,24 +13,24 @@ var useStyles = createStyles(function (_ref) {
|
|
|
13
13
|
var css = _ref.css,
|
|
14
14
|
token = _ref.token;
|
|
15
15
|
return {
|
|
16
|
-
fallback: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-block: 1em;\n font-size: 0.875em;\n color: ", ";\n\n ol {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5em;\n\n margin: 0;\n padding: 0;\n\n list-style-type: none;\n }\n\n ol li {\n position: relative;\n\n overflow: hidden;\n display: flex;\n flex-direction: row;\n\n margin: 0 !important;\n padding-block: 0 !important;\n padding-inline: 0 0.4em !important;\n
|
|
16
|
+
fallback: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-block: 1em;\n font-size: 0.875em;\n color: ", ";\n\n ol {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5em;\n\n margin: 0;\n padding: 0;\n\n list-style-type: none;\n }\n\n ol li {\n position: relative;\n\n overflow: hidden;\n display: flex;\n flex-direction: row;\n\n margin: 0 !important;\n padding-block: 0 !important;\n padding-inline: 0 0.4em !important;\n border: 1px solid ", ";\n border-radius: 0.25em;\n\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &::before {\n content: counter(list-item);\n counter-increment: list-item;\n\n display: block;\n\n margin-inline-end: 0.4em;\n padding-inline: 0.6em;\n\n background: ", ";\n }\n\n p,\n a {\n overflow: hidden;\n\n margin: 0 !important;\n padding: 0 !important;\n\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n "])), token.colorTextSecondary, token.colorBorderSecondary, token.colorFillSecondary)
|
|
17
17
|
};
|
|
18
18
|
});
|
|
19
19
|
var Footnotes = function Footnotes(_ref2) {
|
|
20
20
|
var children = _ref2.children,
|
|
21
|
-
|
|
21
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
22
22
|
var _useStyles = useStyles(),
|
|
23
23
|
styles = _useStyles.styles,
|
|
24
24
|
cx = _useStyles.cx;
|
|
25
25
|
var links = useMemo(function () {
|
|
26
26
|
try {
|
|
27
|
-
return JSON.parse(
|
|
27
|
+
return JSON.parse(rest['data-footnote-links'] || '');
|
|
28
28
|
} catch (error) {
|
|
29
29
|
console.error(error);
|
|
30
|
-
console.log(
|
|
30
|
+
console.log(rest);
|
|
31
31
|
return [];
|
|
32
32
|
}
|
|
33
|
-
}, [
|
|
33
|
+
}, [rest['data-footnote-links']]);
|
|
34
34
|
var isError = links.length === 0;
|
|
35
35
|
return /*#__PURE__*/_jsx("section", {
|
|
36
36
|
className: cx('footnotes', isError && styles.fallback),
|
|
@@ -22,7 +22,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
22
22
|
var useStyles = createStyles(function (_ref) {
|
|
23
23
|
var css = _ref.css;
|
|
24
24
|
return {
|
|
25
|
-
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n margin-block: 0.5em;\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color) inset;\n "])))
|
|
25
|
+
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 0.5em);\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color) inset;\n "])))
|
|
26
26
|
};
|
|
27
27
|
});
|
|
28
28
|
export var Pre = function Pre(_ref2) {
|