@lobehub/ui 1.164.8 → 1.164.10
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,8 @@
|
|
|
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 = ["children"];
|
|
4
|
+
var _excluded = ["className", "children"];
|
|
5
|
+
var _templateObject;
|
|
5
6
|
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
7
|
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
8
|
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; }
|
|
@@ -9,13 +10,27 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
10
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
12
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
+
import { createStyles } from 'antd-style';
|
|
12
15
|
import { memo } from 'react';
|
|
13
16
|
import { Flexbox } from 'react-layout-kit';
|
|
14
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
+
var useStyles = createStyles(function (_ref) {
|
|
19
|
+
var css = _ref.css,
|
|
20
|
+
responsive = _ref.responsive;
|
|
21
|
+
return {
|
|
22
|
+
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", " {\n padding: 16px;\n }\n "])), responsive.mobile)
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
var FormFooter = /*#__PURE__*/memo(function (_ref2) {
|
|
26
|
+
var className = _ref2.className,
|
|
27
|
+
children = _ref2.children,
|
|
28
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
29
|
+
var _useStyles = useStyles(),
|
|
30
|
+
cx = _useStyles.cx,
|
|
31
|
+
styles = _useStyles.styles;
|
|
18
32
|
return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
33
|
+
className: cx(styles.container, className),
|
|
19
34
|
gap: 8,
|
|
20
35
|
horizontal: true,
|
|
21
36
|
justify: 'flex-end'
|
package/es/Markdown/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AnchorProps } from 'antd';
|
|
2
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
3
3
|
import { Components } from 'react-markdown/lib';
|
|
4
4
|
import type { Pluggable } from 'unified';
|
|
5
5
|
import { type HighlighterProps } from "../Highlighter";
|
|
@@ -21,7 +21,7 @@ export interface MarkdownProps extends TypographyProps {
|
|
|
21
21
|
pre?: Partial<PreProps>;
|
|
22
22
|
video?: Partial<VideoProps>;
|
|
23
23
|
};
|
|
24
|
-
components?: Components
|
|
24
|
+
components?: Components & Record<string, FC>;
|
|
25
25
|
customRender?: (dom: ReactNode, context: {
|
|
26
26
|
text: string;
|
|
27
27
|
}) => ReactNode;
|
|
@@ -32,6 +32,7 @@ export interface MarkdownProps extends TypographyProps {
|
|
|
32
32
|
onDoubleClick?: () => void;
|
|
33
33
|
rehypePlugins?: Pluggable[];
|
|
34
34
|
remarkPlugins?: Pluggable[];
|
|
35
|
+
remarkPluginsAhead?: Pluggable[];
|
|
35
36
|
style?: CSSProperties;
|
|
36
37
|
variant?: 'normal' | 'chat';
|
|
37
38
|
}
|
package/es/Markdown/index.js
CHANGED
|
@@ -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 = ["children", "className", "style", "fullFeaturedCodeBlock", "onDoubleClick", "enableLatex", "enableMermaid", "enableImageGallery", "componentProps", "allowHtml", "fontSize", "headerMultiple", "marginMultiple", "variant", "lineHeight", "rehypePlugins", "remarkPlugins", "components", "customRender"];
|
|
4
|
+
var _excluded = ["children", "className", "style", "fullFeaturedCodeBlock", "onDoubleClick", "enableLatex", "enableMermaid", "enableImageGallery", "componentProps", "allowHtml", "fontSize", "headerMultiple", "marginMultiple", "variant", "lineHeight", "rehypePlugins", "remarkPlugins", "remarkPluginsAhead", "components", "customRender"];
|
|
5
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
6
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
7
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -54,6 +54,7 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
54
54
|
lineHeight = _ref.lineHeight,
|
|
55
55
|
rehypePlugins = _ref.rehypePlugins,
|
|
56
56
|
remarkPlugins = _ref.remarkPlugins,
|
|
57
|
+
remarkPluginsAhead = _ref.remarkPluginsAhead,
|
|
57
58
|
_ref$components = _ref.components,
|
|
58
59
|
components = _ref$components === void 0 ? {} : _ref$components,
|
|
59
60
|
customRender = _ref.customRender,
|
|
@@ -112,9 +113,10 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
112
113
|
return [allowHtml && rehypeRaw, enableLatex && rehypeKatex, enableLatex && rehypeKatexDir].concat(_toConsumableArray(innerRehypePlugins)).filter(Boolean);
|
|
113
114
|
}, [allowHtml, enableLatex].concat(_toConsumableArray(innerRehypePlugins)));
|
|
114
115
|
var innerRemarkPlugins = Array.isArray(remarkPlugins) ? remarkPlugins : [remarkPlugins];
|
|
116
|
+
var innerRemarkPluginsAhead = Array.isArray(remarkPluginsAhead) ? remarkPluginsAhead : [remarkPluginsAhead];
|
|
115
117
|
var memoRemarkPlugins = useMemo(function () {
|
|
116
|
-
return [remarkGfm, enableLatex && remarkMath, isChatMode && remarkBreaks]
|
|
117
|
-
}, [isChatMode, enableLatex].concat(_toConsumableArray(innerRemarkPlugins)));
|
|
118
|
+
return [].concat(_toConsumableArray(innerRemarkPluginsAhead), [remarkGfm, enableLatex && remarkMath, isChatMode && remarkBreaks], _toConsumableArray(innerRemarkPlugins)).filter(Boolean);
|
|
119
|
+
}, [isChatMode, enableLatex].concat(_toConsumableArray(innerRemarkPluginsAhead), _toConsumableArray(innerRemarkPlugins)));
|
|
118
120
|
var defaultDOM = /*#__PURE__*/_jsx(ImageGallery, {
|
|
119
121
|
enable: enableImageGallery,
|
|
120
122
|
children: /*#__PURE__*/_jsx(ReactMarkdown, _objectSpread(_objectSpread({
|
|
@@ -129,7 +131,7 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
129
131
|
var markdownContent = customRender ? customRender(defaultDOM, {
|
|
130
132
|
text: escapedContent
|
|
131
133
|
}) : defaultDOM;
|
|
132
|
-
return /*#__PURE__*/_jsx("
|
|
134
|
+
return /*#__PURE__*/_jsx("div", {
|
|
133
135
|
className: cx(styles.root, className),
|
|
134
136
|
"data-code-type": "markdown",
|
|
135
137
|
onDoubleClick: onDoubleClick,
|
|
@@ -17,18 +17,18 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
17
17
|
return {
|
|
18
18
|
__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 svg {\n line-height: 1;\n }\n "])), fontSize, headerMultiple, marginMultiple, lineHeight, token.borderRadiusLG, isDarkMode ? token.colorBorderSecondary : rgba(token.colorBorderSecondary, 0.5)),
|
|
19
19
|
a: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n a {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n }\n "])), token.colorInfoText, token.colorInfoHover),
|
|
20
|
-
blockquote: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n blockquote {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n margin-inline: 0;\n padding-block: 0;\n padding-inline: 1em;\n
|
|
21
|
-
code: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n code:not(:has(span)) {\n display: inline;\n\n margin-inline: 0.25em;\n padding-block: 0.2em;\n padding-inline: 0.4em;\n\n font-family: ", ";\n font-size: 0.875em;\n line-height: 1;\n word-break: break-word;\n white-space: break-spaces;\n\n background: ", ";\n
|
|
22
|
-
details: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n details {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n padding-block: 0.75em;\n padding-inline: 1em;\n
|
|
20
|
+
blockquote: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n blockquote {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n margin-inline: 0;\n padding-block: 0;\n padding-inline: 1em;\n border-inline-start: solid 4px ", ";\n\n color: ", ";\n }\n "])), token.colorBorder, token.colorTextSecondary),
|
|
21
|
+
code: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n code:not(:has(span)) {\n display: inline;\n\n margin-inline: 0.25em;\n padding-block: 0.2em;\n padding-inline: 0.4em;\n border: 1px solid var(--lobe-markdown-border-color);\n border-radius: 0.25em;\n\n font-family: ", ";\n font-size: 0.875em;\n line-height: 1;\n word-break: break-word;\n white-space: break-spaces;\n\n background: ", ";\n }\n "])), token.fontFamilyCode, token.colorFillSecondary),
|
|
22
|
+
details: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n details {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n padding-block: 0.75em;\n padding-inline: 1em;\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n\n background: ", ";\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color);\n\n summary {\n cursor: pointer;\n display: flex;\n align-items: center;\n list-style: none;\n\n &::before {\n content: '';\n\n position: absolute;\n inset-inline-end: 1.25em;\n transform: rotateZ(-45deg);\n\n display: block;\n\n width: 0.4em;\n height: 0.4em;\n border-block-end: 1.5px solid ", ";\n border-inline-end: 1.5px solid ", ";\n\n font-family: ", ";\n\n transition: transform 200ms ", ";\n }\n }\n\n &[open] {\n summary {\n padding-block-end: 0.75em;\n border-block-end: 1px dashed ", ";\n\n &::before {\n transform: rotateZ(45deg);\n }\n }\n }\n }\n "])), token.colorFillTertiary, token.colorTextSecondary, token.colorTextSecondary, token.fontFamily, token.motionEaseOut, token.colorBorder),
|
|
23
23
|
header: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-block: max(\n calc(\n var(--lobe-markdown-header-multiple) * var(--lobe-markdown-margin-multiple) * 0.4em\n ),\n var(--lobe-markdown-font-size)\n );\n font-weight: bold;\n line-height: 1.25;\n }\n\n h1 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + 1.5 * var(--lobe-markdown-header-multiple))\n );\n }\n\n h2 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + var(--lobe-markdown-header-multiple))\n );\n }\n\n h3 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + 0.5 * var(--lobe-markdown-header-multiple))\n );\n }\n\n h4 {\n font-size: calc(\n var(--lobe-markdown-font-size) * (1 + 0.25 * var(--lobe-markdown-header-multiple))\n );\n }\n\n h5,\n h6 {\n font-size: calc(var(--lobe-markdown-font-size) * 1);\n }\n "]))),
|
|
24
|
-
hr: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n hr {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1.5em);\n
|
|
24
|
+
hr: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n hr {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1.5em);\n border-color: ", ";\n border-style: dashed;\n border-width: 1px;\n border-block-start: none;\n border-inline-start: none;\n border-inline-end: none;\n }\n "])), token.colorBorderSecondary),
|
|
25
25
|
img: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n img {\n max-width: 100%;\n }\n\n > img,\n > p > img {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color);\n }\n "]))),
|
|
26
|
-
kbd: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n kbd {\n cursor: default;\n\n display: inline-block;\n\n min-width: 1em;\n margin-inline: 0.25em;\n padding-block: 0.2em;\n padding-inline: 0.4em;\n\n font-family: ", ";\n font-size: 0.875em;\n font-weight: 500;\n line-height: 1;\n text-align: center;\n\n background: ", ";\n
|
|
26
|
+
kbd: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n kbd {\n cursor: default;\n\n display: inline-block;\n\n min-width: 1em;\n margin-inline: 0.25em;\n padding-block: 0.2em;\n padding-inline: 0.4em;\n border: 1px solid ", ";\n border-radius: 0.25em;\n\n font-family: ", ";\n font-size: 0.875em;\n font-weight: 500;\n line-height: 1;\n text-align: center;\n\n background: ", ";\n }\n "])), token.colorBorderSecondary, token.fontFamily, token.colorBgLayout),
|
|
27
27
|
list: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n li {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 0.33em);\n\n p {\n display: inline;\n }\n }\n\n ul,\n ol {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n margin-inline-start: 1em;\n padding-inline-start: 0;\n list-style-position: outside;\n\n ul,\n ol {\n margin-block: 0;\n }\n\n li {\n margin-inline-start: 1em;\n }\n }\n\n ol {\n list-style: auto;\n }\n\n ul {\n list-style-type: none;\n\n li {\n &::before {\n content: '-';\n display: inline-block;\n margin-inline: -1em 0.5em;\n opacity: 0.5;\n }\n }\n }\n "]))),
|
|
28
|
-
p: css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n p {\n
|
|
29
|
-
pre: css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n pre,\n [data-code-type='highlighter'] {\n white-space: break-spaces;\n
|
|
28
|
+
p: css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n p {\n margin-block: 4px;\n line-height: var(--lobe-markdown-line-height);\n letter-spacing: 0.02em;\n }\n\n p:not(:first-child) {\n margin-block-start: calc(var(--lobe-markdown-margin-multiple) * 1em);\n }\n\n p:not(:last-child) {\n margin-block-end: calc(var(--lobe-markdown-margin-multiple) * 1em);\n }\n "]))),
|
|
29
|
+
pre: css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n pre,\n [data-code-type='highlighter'] {\n border: none;\n white-space: break-spaces;\n\n > code {\n padding: 0 !important;\n border: none !important;\n\n font-family: ", ";\n font-size: 0.875em;\n line-height: 1.6;\n }\n }\n "])), token.fontFamilyCode),
|
|
30
30
|
strong: css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n strong {\n font-weight: 600;\n }\n "]))),
|
|
31
|
-
table: css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n table {\n unicode-bidi: isolate;\n overflow: auto hidden;\n display: block;\n border-spacing: 0;\n border-collapse: collapse;\n\n box-sizing: border-box;\n width: max-content;\n max-width: 100%;\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n\n text-align: start;\n text-indent: initial;\n text-wrap: pretty;\n word-break: auto-phrase;\n overflow-wrap: break-word;\n\n background: ", ";\n
|
|
31
|
+
table: css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n table {\n unicode-bidi: isolate;\n overflow: auto hidden;\n display: block;\n border-spacing: 0;\n border-collapse: collapse;\n\n box-sizing: border-box;\n width: max-content;\n max-width: 100%;\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n\n text-align: start;\n text-indent: initial;\n text-wrap: pretty;\n word-break: auto-phrase;\n overflow-wrap: break-word;\n\n background: ", ";\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color);\n\n code {\n word-break: break-word;\n }\n\n thead {\n background: ", ";\n }\n\n tr {\n box-shadow: 0 1px 0 var(--lobe-markdown-border-color);\n }\n\n th,\n td {\n min-width: 120px;\n padding-block: 0.75em;\n padding-inline: 1em;\n text-align: start;\n }\n }\n "])), token.colorFillQuaternary, token.colorFillQuaternary),
|
|
32
32
|
video: css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n > video,\n > p > video {\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color);\n }\n\n video {\n max-width: 100%;\n }\n "])))
|
|
33
33
|
};
|
|
34
34
|
});
|
package/es/Markdown/style.js
CHANGED
|
@@ -15,8 +15,8 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
15
15
|
lineHeight = _ref2$lineHeight === void 0 ? 1.6 : _ref2$lineHeight;
|
|
16
16
|
var cyanColor = isDarkMode ? token.cyan9A : token.cyan11A;
|
|
17
17
|
return {
|
|
18
|
-
chat: 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\n
|
|
18
|
+
chat: 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\n ol,\n ul {\n li {\n &::marker {\n color: ", " !important;\n }\n\n li {\n &::marker {\n color: ", " !important;\n }\n }\n }\n }\n\n ul {\n list-style: unset;\n\n li {\n &::before {\n content: unset;\n display: unset;\n }\n }\n }\n "])), fontSize, headerMultiple, marginMultiple, lineHeight, token.borderRadius, cyanColor, token.colorTextSecondary),
|
|
19
19
|
latex: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .katex-html {\n overflow: auto hidden;\n padding: 3px;\n\n .base {\n margin-block: 0;\n margin-inline: auto;\n }\n }\n\n .katex-html:has(span.tag) {\n display: flex !important;\n }\n\n .katex-html > .tag {\n position: relative !important;\n float: right;\n margin-inline-start: 0.25rem;\n }\n "]))),
|
|
20
|
-
root: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n max-width: 100%;\n\n #footnote-label {\n display: none;\n }\n\n sup:has(a[aria-describedby='footnote-label']) {\n margin-inline: 0.2em;\n padding-block: 0.05em;\n padding-inline: 0.4em;\n\n font-size: 0.75em;\n vertical-align: super !important;\n\n background: ", ";\n
|
|
20
|
+
root: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n max-width: 100%;\n\n #footnote-label {\n display: none;\n }\n\n sup:has(a[aria-describedby='footnote-label']) {\n margin-inline: 0.2em;\n padding-block: 0.05em;\n padding-inline: 0.4em;\n border: 1px solid ", ";\n border-radius: 0.25em;\n\n font-size: 0.75em;\n vertical-align: super !important;\n\n background: ", ";\n }\n\n section.footnotes {\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 }\n "])), token.colorBorderSecondary, token.colorFillTertiary, token.colorTextSecondary, token.colorBorderSecondary, token.colorFillSecondary)
|
|
21
21
|
};
|
|
22
22
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
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
4
|
var _excluded = ["fullFeatured", "fileName", "allowChangeLanguage", "language", "children", "className", "style", "icon"],
|
|
5
5
|
_excluded2 = ["language", "children", "className", "style"],
|
|
6
|
-
_excluded3 = ["fullFeatured", "children", "className", "style"];
|
|
6
|
+
_excluded3 = ["fullFeatured", "children", "className", "style", "type"];
|
|
7
7
|
var _templateObject;
|
|
8
8
|
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; }
|
|
9
9
|
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; }
|
|
@@ -81,6 +81,7 @@ export var PreMermaid = function PreMermaid(_ref4) {
|
|
|
81
81
|
children = _ref4.children,
|
|
82
82
|
className = _ref4.className,
|
|
83
83
|
style = _ref4.style,
|
|
84
|
+
type = _ref4.type,
|
|
84
85
|
rest = _objectWithoutProperties(_ref4, _excluded3);
|
|
85
86
|
var _useStyles3 = useStyles(),
|
|
86
87
|
styles = _useStyles3.styles,
|
|
@@ -93,7 +94,7 @@ export var PreMermaid = function PreMermaid(_ref4) {
|
|
|
93
94
|
},
|
|
94
95
|
fullFeatured: fullFeatured,
|
|
95
96
|
style: style,
|
|
96
|
-
type:
|
|
97
|
+
type: type || 'pure'
|
|
97
98
|
}, rest), {}, {
|
|
98
99
|
children: children
|
|
99
100
|
}));
|