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.

8 lines 2.9 kB
var _templateObject; function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } import { createStaticStyles } from 'antd-style'; export var styles = createStaticStyles(function (_ref) { var css = _ref.css, cssVar = _ref.cssVar; return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n .toolbar {\n position: absolute;\n z-index: 10;\n inset-block-end: 0;\n inset-inline-end: 8px;\n\n opacity: 0;\n }\n\n &:hover {\n .toolbar {\n opacity: 1;\n }\n }\n\n &[data-diff-type='add'] .content {\n position: relative;\n margin-block-start: calc(var(--lobe-markdown-margin-multiple) * 0.5em);\n padding-inline-end: 4px;\n border-inline-end: 3px solid ", ";\n }\n\n &[data-diff-type='remove'] .content {\n position: relative;\n margin-block-start: calc(var(--lobe-markdown-margin-multiple) * 0.5em);\n padding-inline-end: 4px;\n border-inline-end: 3px solid ", ";\n\n > *:first-child * {\n color: ", " !important;\n text-decoration: line-through !important;\n }\n }\n\n &[data-diff-type='listItemModify'] {\n display: inline-block;\n\n p {\n display: block !important;\n }\n }\n\n &[data-diff-type='listItemModify'] .content {\n position: relative;\n margin-block-start: calc(var(--lobe-markdown-margin-multiple) * 0.5em);\n padding-inline-end: 4px;\n border-inline-end: 3px solid ", ";\n\n /* first child: original (deleted) */\n\n /* > *:first-child {} */\n\n /* visually indicate deletion with strike-through for text nodes */\n > *:first-child * {\n color: ", " !important;\n text-decoration: line-through !important;\n }\n\n /* second child: modified/new - normal appearance */\n > *:nth-child(2) {\n color: inherit;\n opacity: 1;\n }\n }\n\n &[data-diff-type='modify'] .content {\n position: relative;\n margin-block-start: calc(var(--lobe-markdown-margin-multiple) * 0.5em);\n padding-inline-end: 4px;\n border-inline-end: 3px solid ", ";\n\n /* first child: original (deleted) */\n\n /* > *:first-child {} */\n\n /* visually indicate deletion with strike-through for text nodes */\n > *:first-child * {\n color: ", " !important;\n text-decoration: line-through !important;\n }\n\n /* second child: modified/new - normal appearance */\n > *:nth-child(2) {\n color: inherit;\n opacity: 1;\n }\n }\n "])), cssVar.colorSuccess, cssVar.colorError, cssVar.colorTextQuaternary, cssVar.colorWarning, cssVar.colorTextQuaternary, cssVar.colorWarning, cssVar.colorTextQuaternary); });