UNPKG

@lobehub/editor

Version:

A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.

17 lines 2.83 kB
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7; function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } /* eslint-disable sort-keys-fix/sort-keys-fix */ import { createStaticStyles, cx } from 'antd-style'; export var styles = createStaticStyles(function (_ref) { var css = _ref.css, cssVar = _ref.cssVar; var latex = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n user-select: none;\n font-size: 1em;\n\n .katex-error {\n color: ", " !important;\n }\n\n .katex-html {\n overflow: auto hidden;\n padding: 3px;\n\n .base {\n margin-block: 0;\n margin-inline: auto;\n }\n\n .tag {\n position: relative !important;\n display: inline-block;\n padding-inline-start: 0.5rem;\n }\n }\n\n &.selected {\n color: #000;\n background: ", ";\n }\n\n &:hover {\n background: ", ";\n }\n\n &.editing {\n background: ", ";\n }\n\n &:has(.katex-error) {\n background: ", ";\n }\n "])), cssVar.colorError, cssVar.yellow, cssVar.colorFillTertiary, cssVar.colorFillTertiary, cssVar.colorErrorBg); return { mathInline: cx(latex, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n border-radius: calc(var(--lobe-markdown-border-radius) * 0.5px);\n "])))), mathBlock: cx(latex, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: auto hidden;\n display: block;\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n white-space: nowrap;\n "])))), mathEditor: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 999;\n width: 320px;\n background: ", ";\n\n textarea {\n width: 100%;\n\n font-family: ", ";\n font-size: 13px;\n\n background: transparent !important;\n\n transition: none !important;\n }\n "])), cssVar.colorBgElevated, cssVar.fontFamilyCode), mathEditorFooter: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-block-start: 1px solid ", ";\n background: ", ";\n "])), cssVar.colorBorderSecondary, cssVar.colorFillQuaternary), mathEditorTextArea: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-block: 4px;\n "]))), mathPlaceholder: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding-inline: 0.2em;\n font-style: italic;\n "]))) }; });