@webiny/lexical-editor 0.0.0-unstable.1145e7667f
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/LICENSE +21 -0
- package/README.md +17 -0
- package/commands/webiny-list.d.ts +7 -0
- package/commands/webiny-list.js +13 -0
- package/commands/webiny-list.js.map +1 -0
- package/commands/webiny-quote.d.ts +5 -0
- package/commands/webiny-quote.js +9 -0
- package/commands/webiny-quote.js.map +1 -0
- package/components/AddRichTextEditorNodeType.d.ts +6 -0
- package/components/AddRichTextEditorNodeType.js +28 -0
- package/components/AddRichTextEditorNodeType.js.map +1 -0
- package/components/AddRichTextEditorPlugin.d.ts +12 -0
- package/components/AddRichTextEditorPlugin.js +33 -0
- package/components/AddRichTextEditorPlugin.js.map +1 -0
- package/components/AddToolbarAction.d.ts +7 -0
- package/components/AddToolbarAction.js +33 -0
- package/components/AddToolbarAction.js.map +1 -0
- package/components/Editor/HeadingEditor.d.ts +7 -0
- package/components/Editor/HeadingEditor.js +29 -0
- package/components/Editor/HeadingEditor.js.map +1 -0
- package/components/Editor/ParagraphEditor.d.ts +7 -0
- package/components/Editor/ParagraphEditor.js +30 -0
- package/components/Editor/ParagraphEditor.js.map +1 -0
- package/components/Editor/RichTextEditor.d.ts +26 -0
- package/components/Editor/RichTextEditor.js +138 -0
- package/components/Editor/RichTextEditor.js.map +1 -0
- package/components/LexicalEditorConfig/LexicalEditorConfig.d.ts +9 -0
- package/components/LexicalEditorConfig/LexicalEditorConfig.js +17 -0
- package/components/LexicalEditorConfig/LexicalEditorConfig.js.map +1 -0
- package/components/LexicalHtmlRenderer.d.ts +16 -0
- package/components/LexicalHtmlRenderer.js +67 -0
- package/components/LexicalHtmlRenderer.js.map +1 -0
- package/components/Toolbar/HeadingToolbar.d.ts +12 -0
- package/components/Toolbar/HeadingToolbar.js +23 -0
- package/components/Toolbar/HeadingToolbar.js.map +1 -0
- package/components/Toolbar/ParagraphToolbar.d.ts +12 -0
- package/components/Toolbar/ParagraphToolbar.js +23 -0
- package/components/Toolbar/ParagraphToolbar.js.map +1 -0
- package/components/Toolbar/Toolbar.css +423 -0
- package/components/Toolbar/Toolbar.d.ts +13 -0
- package/components/Toolbar/Toolbar.js +181 -0
- package/components/Toolbar/Toolbar.js.map +1 -0
- package/components/ToolbarActions/BoldAction.d.ts +2 -0
- package/components/ToolbarActions/BoldAction.js +43 -0
- package/components/ToolbarActions/BoldAction.js.map +1 -0
- package/components/ToolbarActions/BulletListAction.d.ts +2 -0
- package/components/ToolbarActions/BulletListAction.js +51 -0
- package/components/ToolbarActions/BulletListAction.js.map +1 -0
- package/components/ToolbarActions/CodeHighlightAction.d.ts +2 -0
- package/components/ToolbarActions/CodeHighlightAction.js +43 -0
- package/components/ToolbarActions/CodeHighlightAction.js.map +1 -0
- package/components/ToolbarActions/FontColorAction.d.ts +11 -0
- package/components/ToolbarActions/FontColorAction.js +83 -0
- package/components/ToolbarActions/FontColorAction.js.map +1 -0
- package/components/ToolbarActions/FontSizeAction.d.ts +2 -0
- package/components/ToolbarActions/FontSizeAction.js +101 -0
- package/components/ToolbarActions/FontSizeAction.js.map +1 -0
- package/components/ToolbarActions/ItalicAction.d.ts +2 -0
- package/components/ToolbarActions/ItalicAction.js +43 -0
- package/components/ToolbarActions/ItalicAction.js.map +1 -0
- package/components/ToolbarActions/LinkAction.d.ts +2 -0
- package/components/ToolbarActions/LinkAction.js +64 -0
- package/components/ToolbarActions/LinkAction.js.map +1 -0
- package/components/ToolbarActions/NumberedListAction.d.ts +2 -0
- package/components/ToolbarActions/NumberedListAction.js +53 -0
- package/components/ToolbarActions/NumberedListAction.js.map +1 -0
- package/components/ToolbarActions/QuoteAction.d.ts +2 -0
- package/components/ToolbarActions/QuoteAction.js +53 -0
- package/components/ToolbarActions/QuoteAction.js.map +1 -0
- package/components/ToolbarActions/TypographyAction.d.ts +11 -0
- package/components/ToolbarActions/TypographyAction.js +118 -0
- package/components/ToolbarActions/TypographyAction.js.map +1 -0
- package/components/ToolbarActions/UnderlineAction.d.ts +2 -0
- package/components/ToolbarActions/UnderlineAction.js +43 -0
- package/components/ToolbarActions/UnderlineAction.js.map +1 -0
- package/components/ToolbarPresets/HeadingToolbarPreset.d.ts +2 -0
- package/components/ToolbarPresets/HeadingToolbarPreset.js +52 -0
- package/components/ToolbarPresets/HeadingToolbarPreset.js.map +1 -0
- package/components/ToolbarPresets/ParagraphToolbarPreset.d.ts +2 -0
- package/components/ToolbarPresets/ParagraphToolbarPreset.js +67 -0
- package/components/ToolbarPresets/ParagraphToolbarPreset.js.map +1 -0
- package/context/FontColorActionContext.d.ts +6 -0
- package/context/FontColorActionContext.js +10 -0
- package/context/FontColorActionContext.js.map +1 -0
- package/context/RichTextEditorContext.d.ts +21 -0
- package/context/RichTextEditorContext.js +56 -0
- package/context/RichTextEditorContext.js.map +1 -0
- package/context/SharedHistoryContext.d.ts +11 -0
- package/context/SharedHistoryContext.js +26 -0
- package/context/SharedHistoryContext.js.map +1 -0
- package/context/TypographyActionContext.d.ts +7 -0
- package/context/TypographyActionContext.js +10 -0
- package/context/TypographyActionContext.js.map +1 -0
- package/hooks/useFontColorPicker.d.ts +2 -0
- package/hooks/useFontColorPicker.js +15 -0
- package/hooks/useFontColorPicker.js.map +1 -0
- package/hooks/useRichTextEditor.d.ts +2 -0
- package/hooks/useRichTextEditor.js +15 -0
- package/hooks/useRichTextEditor.js.map +1 -0
- package/hooks/useTypographyAction.d.ts +1 -0
- package/hooks/useTypographyAction.js +15 -0
- package/hooks/useTypographyAction.js.map +1 -0
- package/hooks/useWebinyList.d.ts +2 -0
- package/hooks/useWebinyList.js +39 -0
- package/hooks/useWebinyList.js.map +1 -0
- package/hooks/useWebinyQuote.d.ts +2 -0
- package/hooks/useWebinyQuote.js +20 -0
- package/hooks/useWebinyQuote.js.map +1 -0
- package/images/icons/LICENSE.md +5 -0
- package/images/icons/chat-square-quote.svg +1 -0
- package/images/icons/chevron-down.svg +1 -0
- package/images/icons/code.svg +1 -0
- package/images/icons/font-color.svg +1 -0
- package/images/icons/link.svg +1 -0
- package/images/icons/list-ol.svg +1 -0
- package/images/icons/list-ul.svg +1 -0
- package/images/icons/pencil-fill.svg +1 -0
- package/images/icons/text-center.svg +1 -0
- package/images/icons/text-left.svg +1 -0
- package/images/icons/text-paragraph.svg +1 -0
- package/images/icons/text-right.svg +1 -0
- package/images/icons/type-bold.svg +1 -0
- package/images/icons/type-h1.svg +1 -0
- package/images/icons/type-h2.svg +1 -0
- package/images/icons/type-h3.svg +1 -0
- package/images/icons/type-h4.svg +1 -0
- package/images/icons/type-h5.svg +1 -0
- package/images/icons/type-h6.svg +1 -0
- package/images/icons/type-italic.svg +1 -0
- package/images/icons/type-strikethrough.svg +1 -0
- package/images/icons/type-underline.svg +1 -0
- package/images/icons/unlink_icon.svg +1 -0
- package/index.d.ts +40 -0
- package/index.js +281 -0
- package/index.js.map +1 -0
- package/nodes/FontColorNode.d.ts +43 -0
- package/nodes/FontColorNode.js +127 -0
- package/nodes/FontColorNode.js.map +1 -0
- package/nodes/TypographyElementNode.d.ts +42 -0
- package/nodes/TypographyElementNode.js +154 -0
- package/nodes/TypographyElementNode.js.map +1 -0
- package/nodes/WebinyQuoteNode.d.ts +29 -0
- package/nodes/WebinyQuoteNode.js +148 -0
- package/nodes/WebinyQuoteNode.js.map +1 -0
- package/nodes/list-node/WebinyListItemNode.d.ts +46 -0
- package/nodes/list-node/WebinyListItemNode.js +441 -0
- package/nodes/list-node/WebinyListItemNode.js.map +1 -0
- package/nodes/list-node/WebinyListNode.d.ts +38 -0
- package/nodes/list-node/WebinyListNode.js +253 -0
- package/nodes/list-node/WebinyListNode.js.map +1 -0
- package/nodes/list-node/formatList.d.ts +12 -0
- package/nodes/list-node/formatList.js +423 -0
- package/nodes/list-node/formatList.js.map +1 -0
- package/nodes/webinyNodes.d.ts +7 -0
- package/nodes/webinyNodes.js +21 -0
- package/nodes/webinyNodes.js.map +1 -0
- package/package.json +41 -0
- package/plugins/AutoLinkPlugin/AutoLinkPlugin.d.ts +11 -0
- package/plugins/AutoLinkPlugin/AutoLinkPlugin.js +46 -0
- package/plugins/AutoLinkPlugin/AutoLinkPlugin.js.map +1 -0
- package/plugins/AutoLinkPlugin/index.d.ts +1 -0
- package/plugins/AutoLinkPlugin/index.js +16 -0
- package/plugins/AutoLinkPlugin/index.js.map +1 -0
- package/plugins/BlurEventPlugin/BlurEventPlugin.d.ts +7 -0
- package/plugins/BlurEventPlugin/BlurEventPlugin.js +28 -0
- package/plugins/BlurEventPlugin/BlurEventPlugin.js.map +1 -0
- package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.d.ts +17 -0
- package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.js +88 -0
- package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.js.map +1 -0
- package/plugins/ClickableLinkPlugin/index.d.ts +1 -0
- package/plugins/ClickableLinkPlugin/index.js +16 -0
- package/plugins/ClickableLinkPlugin/index.js.map +1 -0
- package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.d.ts +1 -0
- package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js +20 -0
- package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js.map +1 -0
- package/plugins/CodeHighlightPlugin/index.d.ts +1 -0
- package/plugins/CodeHighlightPlugin/index.js +16 -0
- package/plugins/CodeHighlightPlugin/index.js.map +1 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.css +118 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.d.ts +7 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js +222 -0
- package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js.map +1 -0
- package/plugins/FloatingLinkEditorPlugin/index.d.ts +1 -0
- package/plugins/FloatingLinkEditorPlugin/index.js +16 -0
- package/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
- package/plugins/FontColorPlugin/FontColorPlugin.d.ts +2 -0
- package/plugins/FontColorPlugin/FontColorPlugin.js +38 -0
- package/plugins/FontColorPlugin/FontColorPlugin.js.map +1 -0
- package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.d.ts +8 -0
- package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.js +34 -0
- package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.js.map +1 -0
- package/plugins/LexicalUpdateStatePlugin/index.d.ts +1 -0
- package/plugins/LexicalUpdateStatePlugin/index.js +16 -0
- package/plugins/LexicalUpdateStatePlugin/index.js.map +1 -0
- package/plugins/TypographyPlugin/TypographyPlugin.d.ts +2 -0
- package/plugins/TypographyPlugin/TypographyPlugin.js +31 -0
- package/plugins/TypographyPlugin/TypographyPlugin.js.map +1 -0
- package/plugins/WebinyListPLugin/WebinyListPlugin.d.ts +1 -0
- package/plugins/WebinyListPLugin/WebinyListPlugin.js +25 -0
- package/plugins/WebinyListPLugin/WebinyListPlugin.js.map +1 -0
- package/plugins/WebinyQuoteNodePlugin/WebinyQuoteNodePlugin.d.ts +1 -0
- package/plugins/WebinyQuoteNodePlugin/WebinyQuoteNodePlugin.js +24 -0
- package/plugins/WebinyQuoteNodePlugin/WebinyQuoteNodePlugin.js.map +1 -0
- package/themes/webinyLexicalTheme.css +420 -0
- package/themes/webinyLexicalTheme.d.ts +9 -0
- package/themes/webinyLexicalTheme.js +87 -0
- package/themes/webinyLexicalTheme.js.map +1 -0
- package/types.d.ts +61 -0
- package/types.js +12 -0
- package/types.js.map +1 -0
- package/ui/Divider.d.ts +2 -0
- package/ui/Divider.js +13 -0
- package/ui/Divider.js.map +1 -0
- package/ui/DropDown.d.ts +26 -0
- package/ui/DropDown.js +173 -0
- package/ui/DropDown.js.map +1 -0
- package/ui/Input.css +32 -0
- package/ui/LinkPreview.css +69 -0
- package/ui/LinkPreview.d.ts +12 -0
- package/ui/LinkPreview.js +101 -0
- package/ui/LinkPreview.js.map +1 -0
- package/ui/Placeholder.css +23 -0
- package/ui/Placeholder.d.ts +13 -0
- package/ui/Placeholder.js +24 -0
- package/ui/Placeholder.js.map +1 -0
- package/ui/TextInput.d.ts +18 -0
- package/ui/TextInput.js +39 -0
- package/ui/TextInput.js.map +1 -0
- package/ui/ToolbarActionDialog.d.ts +12 -0
- package/ui/ToolbarActionDialog.js +106 -0
- package/ui/ToolbarActionDialog.js.map +1 -0
- package/utils/generateInitialLexicalValue.d.ts +5 -0
- package/utils/generateInitialLexicalValue.js +29 -0
- package/utils/generateInitialLexicalValue.js.map +1 -0
- package/utils/getDOMRangeRect.d.ts +10 -0
- package/utils/getDOMRangeRect.js +27 -0
- package/utils/getDOMRangeRect.js.map +1 -0
- package/utils/getLexicalTextSelectionState.d.ts +5 -0
- package/utils/getLexicalTextSelectionState.js +141 -0
- package/utils/getLexicalTextSelectionState.js.map +1 -0
- package/utils/getSelectedNode.d.ts +2 -0
- package/utils/getSelectedNode.js +30 -0
- package/utils/getSelectedNode.js.map +1 -0
- package/utils/isValidJSON.d.ts +1 -0
- package/utils/isValidJSON.js +18 -0
- package/utils/isValidJSON.js.map +1 -0
- package/utils/isValidLexicalData.d.ts +2 -0
- package/utils/isValidLexicalData.js +24 -0
- package/utils/isValidLexicalData.js.map +1 -0
- package/utils/nodes/clearNodeFormating.d.ts +2 -0
- package/utils/nodes/clearNodeFormating.js +28 -0
- package/utils/nodes/clearNodeFormating.js.map +1 -0
- package/utils/nodes/formatToParagraph.d.ts +2 -0
- package/utils/nodes/formatToParagraph.js +19 -0
- package/utils/nodes/formatToParagraph.js.map +1 -0
- package/utils/nodes/formatToQuote.d.ts +2 -0
- package/utils/nodes/formatToQuote.js +20 -0
- package/utils/nodes/formatToQuote.js.map +1 -0
- package/utils/nodes/list-node.d.ts +11 -0
- package/utils/nodes/list-node.js +107 -0
- package/utils/nodes/list-node.js.map +1 -0
- package/utils/point.d.ts +21 -0
- package/utils/point.js +77 -0
- package/utils/point.js.map +1 -0
- package/utils/rect.d.ts +47 -0
- package/utils/rect.js +169 -0
- package/utils/rect.js.map +1 -0
- package/utils/sanitizeUrl.d.ts +8 -0
- package/utils/sanitizeUrl.js +27 -0
- package/utils/sanitizeUrl.js.map +1 -0
- package/utils/setFloatingElemPosition.d.ts +3 -0
- package/utils/setFloatingElemPosition.js +40 -0
- package/utils/setFloatingElemPosition.js.map +1 -0
- package/utils/styleObjectToString.d.ts +2 -0
- package/utils/styleObjectToString.js +22 -0
- package/utils/styleObjectToString.js.map +1 -0
- package/utils/toTypographyEmotionMap.d.ts +3 -0
- package/utils/toTypographyEmotionMap.js +36 -0
- package/utils/toTypographyEmotionMap.js.map +1 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _FloatingLinkEditorPlugin = require("./FloatingLinkEditorPlugin");
|
|
7
|
+
Object.keys(_FloatingLinkEditorPlugin).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _FloatingLinkEditorPlugin[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _FloatingLinkEditorPlugin[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./FloatingLinkEditorPlugin\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.FontColorPlugin = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
11
|
+
var _FontColorNode = require("../../nodes/FontColorNode");
|
|
12
|
+
var _lexical = require("lexical");
|
|
13
|
+
var _utils = require("@lexical/utils");
|
|
14
|
+
var FontColorPlugin = function FontColorPlugin() {
|
|
15
|
+
var _useLexicalComposerCo = (0, _LexicalComposerContext.useLexicalComposerContext)(),
|
|
16
|
+
_useLexicalComposerCo2 = (0, _slicedToArray2.default)(_useLexicalComposerCo, 1),
|
|
17
|
+
editor = _useLexicalComposerCo2[0];
|
|
18
|
+
(0, _react.useEffect)(function () {
|
|
19
|
+
return editor.registerCommand(_FontColorNode.ADD_FONT_COLOR_COMMAND, function (payload) {
|
|
20
|
+
editor.update(function () {
|
|
21
|
+
var color = payload.color,
|
|
22
|
+
themeColorName = payload.themeColorName;
|
|
23
|
+
var selection = (0, _lexical.$getSelection)();
|
|
24
|
+
if ((0, _lexical.$isRangeSelection)(selection)) {
|
|
25
|
+
var fontColorNode = (0, _FontColorNode.$createFontColorNode)(selection.getTextContent(), color, themeColorName);
|
|
26
|
+
(0, _FontColorNode.$applyStylesToNode)(fontColorNode, selection);
|
|
27
|
+
(0, _lexical.$insertNodes)([fontColorNode]);
|
|
28
|
+
if ((0, _lexical.$isRootOrShadowRoot)(fontColorNode.getParentOrThrow())) {
|
|
29
|
+
(0, _utils.$wrapNodeInElement)(fontColorNode, _lexical.$createParagraphNode).selectEnd();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return true;
|
|
34
|
+
}, _lexical.COMMAND_PRIORITY_EDITOR);
|
|
35
|
+
}, [editor]);
|
|
36
|
+
return null;
|
|
37
|
+
};
|
|
38
|
+
exports.FontColorPlugin = FontColorPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FontColorPlugin","useLexicalComposerContext","editor","useEffect","registerCommand","ADD_FONT_COLOR_COMMAND","payload","update","color","themeColorName","selection","$getSelection","$isRangeSelection","fontColorNode","$createFontColorNode","getTextContent","$applyStylesToNode","$insertNodes","$isRootOrShadowRoot","getParentOrThrow","$wrapNodeInElement","$createParagraphNode","selectEnd","COMMAND_PRIORITY_EDITOR"],"sources":["FontColorPlugin.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport {\n $applyStylesToNode,\n $createFontColorNode,\n ADD_FONT_COLOR_COMMAND,\n FontColorPayload\n} from \"~/nodes/FontColorNode\";\nimport {\n $createParagraphNode,\n $getSelection,\n $insertNodes,\n $isRangeSelection,\n $isRootOrShadowRoot,\n COMMAND_PRIORITY_EDITOR\n} from \"lexical\";\nimport { $wrapNodeInElement } from \"@lexical/utils\";\n\nexport const FontColorPlugin: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n return editor.registerCommand<FontColorPayload>(\n ADD_FONT_COLOR_COMMAND,\n payload => {\n editor.update(() => {\n const { color, themeColorName } = payload;\n const selection = $getSelection();\n\n if ($isRangeSelection(selection)) {\n const fontColorNode = $createFontColorNode(\n selection.getTextContent(),\n color,\n themeColorName\n );\n $applyStylesToNode(fontColorNode, selection);\n $insertNodes([fontColorNode]);\n if ($isRootOrShadowRoot(fontColorNode.getParentOrThrow())) {\n $wrapNodeInElement(fontColorNode, $createParagraphNode).selectEnd();\n }\n }\n });\n return true;\n },\n COMMAND_PRIORITY_EDITOR\n );\n }, [editor]);\n\n return null;\n};\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AAMA;AAQA;AAEO,IAAMA,eAAyB,GAAG,SAA5BA,eAAyB,GAAS;EAC3C,4BAAiB,IAAAC,iDAAyB,GAAE;IAAA;IAArCC,MAAM;EAEb,IAAAC,gBAAS,EAAC,YAAM;IACZ,OAAOD,MAAM,CAACE,eAAe,CACzBC,qCAAsB,EACtB,UAAAC,OAAO,EAAI;MACPJ,MAAM,CAACK,MAAM,CAAC,YAAM;QAChB,IAAQC,KAAK,GAAqBF,OAAO,CAAjCE,KAAK;UAAEC,cAAc,GAAKH,OAAO,CAA1BG,cAAc;QAC7B,IAAMC,SAAS,GAAG,IAAAC,sBAAa,GAAE;QAEjC,IAAI,IAAAC,0BAAiB,EAACF,SAAS,CAAC,EAAE;UAC9B,IAAMG,aAAa,GAAG,IAAAC,mCAAoB,EACtCJ,SAAS,CAACK,cAAc,EAAE,EAC1BP,KAAK,EACLC,cAAc,CACjB;UACD,IAAAO,iCAAkB,EAACH,aAAa,EAAEH,SAAS,CAAC;UAC5C,IAAAO,qBAAY,EAAC,CAACJ,aAAa,CAAC,CAAC;UAC7B,IAAI,IAAAK,4BAAmB,EAACL,aAAa,CAACM,gBAAgB,EAAE,CAAC,EAAE;YACvD,IAAAC,yBAAkB,EAACP,aAAa,EAAEQ,6BAAoB,CAAC,CAACC,SAAS,EAAE;UACvE;QACJ;MACJ,CAAC,CAAC;MACF,OAAO,IAAI;IACf,CAAC,EACDC,gCAAuB,CAC1B;EACL,CAAC,EAAE,CAACrB,MAAM,CAAC,CAAC;EAEZ,OAAO,IAAI;AACf,CAAC;AAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.LexicalUpdateStatePlugin = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _isValidLexicalData = require("../../utils/isValidLexicalData");
|
|
13
|
+
var _generateInitialLexicalValue = require("../../utils/generateInitialLexicalValue");
|
|
14
|
+
/*
|
|
15
|
+
* Updates the lexical state if new value is provided to the lexical editor trough props
|
|
16
|
+
*/
|
|
17
|
+
var LexicalUpdateStatePlugin = function LexicalUpdateStatePlugin(_ref) {
|
|
18
|
+
var value = _ref.value;
|
|
19
|
+
var _useLexicalComposerCo = (0, _LexicalComposerContext.useLexicalComposerContext)(),
|
|
20
|
+
_useLexicalComposerCo2 = (0, _slicedToArray2.default)(_useLexicalComposerCo, 1),
|
|
21
|
+
editor = _useLexicalComposerCo2[0];
|
|
22
|
+
(0, _react.useEffect)(function () {
|
|
23
|
+
if (value && editor) {
|
|
24
|
+
var editorState = editor.getEditorState();
|
|
25
|
+
if (JSON.stringify(editorState.toJSON()) === value) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
var initialEditorState = editor.parseEditorState((0, _isValidLexicalData.isValidLexicalData)(value) ? value : (0, _generateInitialLexicalValue.generateInitialLexicalValue)());
|
|
29
|
+
editor.setEditorState(initialEditorState);
|
|
30
|
+
}
|
|
31
|
+
}, [value, editor]);
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
33
|
+
};
|
|
34
|
+
exports.LexicalUpdateStatePlugin = LexicalUpdateStatePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LexicalUpdateStatePlugin","value","useLexicalComposerContext","editor","useEffect","editorState","getEditorState","JSON","stringify","toJSON","initialEditorState","parseEditorState","isValidLexicalData","generateInitialLexicalValue","setEditorState"],"sources":["LexicalUpdateStatePlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport React, { FC, useEffect } from \"react\";\nimport { isValidLexicalData } from \"~/utils/isValidLexicalData\";\nimport { generateInitialLexicalValue } from \"~/utils/generateInitialLexicalValue\";\nimport { LexicalValue } from \"~/types\";\n\ninterface LexicalUpdateStatePlugin {\n value: LexicalValue | null;\n readOnly?: boolean;\n}\n\n/*\n * Updates the lexical state if new value is provided to the lexical editor trough props\n */\nexport const LexicalUpdateStatePlugin: FC<LexicalUpdateStatePlugin> = ({\n value\n}): React.ReactElement => {\n const [editor] = useLexicalComposerContext();\n useEffect(() => {\n if (value && editor) {\n const editorState = editor.getEditorState();\n if (JSON.stringify(editorState.toJSON()) === value) {\n return;\n }\n\n const initialEditorState = editor.parseEditorState(\n isValidLexicalData(value)\n ? (value as string)\n : (generateInitialLexicalValue() as string)\n );\n editor.setEditorState(initialEditorState);\n }\n }, [value, editor]);\n\n return <></>;\n};\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AAQA;AACA;AACA;AACO,IAAMA,wBAAsD,GAAG,SAAzDA,wBAAsD,OAEzC;EAAA,IADtBC,KAAK,QAALA,KAAK;EAEL,4BAAiB,IAAAC,iDAAyB,GAAE;IAAA;IAArCC,MAAM;EACb,IAAAC,gBAAS,EAAC,YAAM;IACZ,IAAIH,KAAK,IAAIE,MAAM,EAAE;MACjB,IAAME,WAAW,GAAGF,MAAM,CAACG,cAAc,EAAE;MAC3C,IAAIC,IAAI,CAACC,SAAS,CAACH,WAAW,CAACI,MAAM,EAAE,CAAC,KAAKR,KAAK,EAAE;QAChD;MACJ;MAEA,IAAMS,kBAAkB,GAAGP,MAAM,CAACQ,gBAAgB,CAC9C,IAAAC,sCAAkB,EAACX,KAAK,CAAC,GAClBA,KAAK,GACL,IAAAY,wDAA2B,GAAa,CAClD;MACDV,MAAM,CAACW,cAAc,CAACJ,kBAAkB,CAAC;IAC7C;EACJ,CAAC,EAAE,CAACT,KAAK,EAAEE,MAAM,CAAC,CAAC;EAEnB,oBAAO,2DAAK;AAChB,CAAC;AAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LexicalUpdateStatePlugin";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _LexicalUpdateStatePlugin = require("./LexicalUpdateStatePlugin");
|
|
7
|
+
Object.keys(_LexicalUpdateStatePlugin).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _LexicalUpdateStatePlugin[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _LexicalUpdateStatePlugin[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./LexicalUpdateStatePlugin\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.TypographyPlugin = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
11
|
+
var _lexical = require("lexical");
|
|
12
|
+
var _TypographyElementNode = require("../../nodes/TypographyElementNode");
|
|
13
|
+
var _selection = require("@lexical/selection");
|
|
14
|
+
var TypographyPlugin = function TypographyPlugin() {
|
|
15
|
+
var _useLexicalComposerCo = (0, _LexicalComposerContext.useLexicalComposerContext)(),
|
|
16
|
+
_useLexicalComposerCo2 = (0, _slicedToArray2.default)(_useLexicalComposerCo, 1),
|
|
17
|
+
editor = _useLexicalComposerCo2[0];
|
|
18
|
+
(0, _react.useEffect)(function () {
|
|
19
|
+
return editor.registerCommand(_TypographyElementNode.ADD_TYPOGRAPHY_ELEMENT_COMMAND, function (payload) {
|
|
20
|
+
var selection = (0, _lexical.$getSelection)();
|
|
21
|
+
if ((0, _lexical.$isRangeSelection)(selection)) {
|
|
22
|
+
(0, _selection.$wrapNodes)(selection, function () {
|
|
23
|
+
return (0, _TypographyElementNode.$createTypographyNode)(payload.value);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return true;
|
|
27
|
+
}, _lexical.COMMAND_PRIORITY_EDITOR);
|
|
28
|
+
}, [editor]);
|
|
29
|
+
return null;
|
|
30
|
+
};
|
|
31
|
+
exports.TypographyPlugin = TypographyPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TypographyPlugin","useLexicalComposerContext","editor","useEffect","registerCommand","ADD_TYPOGRAPHY_ELEMENT_COMMAND","payload","selection","$getSelection","$isRangeSelection","$wrapNodes","$createTypographyNode","value","COMMAND_PRIORITY_EDITOR"],"sources":["TypographyPlugin.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR } from \"lexical\";\nimport {\n $createTypographyNode,\n ADD_TYPOGRAPHY_ELEMENT_COMMAND,\n TypographyPayload\n} from \"~/nodes/TypographyElementNode\";\nimport { $wrapNodes } from \"@lexical/selection\";\n\nexport const TypographyPlugin: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n return editor.registerCommand<TypographyPayload>(\n ADD_TYPOGRAPHY_ELEMENT_COMMAND,\n payload => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n $wrapNodes(selection, () => $createTypographyNode(payload.value));\n }\n return true;\n },\n COMMAND_PRIORITY_EDITOR\n );\n }, [editor]);\n\n return null;\n};\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AAKA;AAEO,IAAMA,gBAA0B,GAAG,SAA7BA,gBAA0B,GAAS;EAC5C,4BAAiB,IAAAC,iDAAyB,GAAE;IAAA;IAArCC,MAAM;EAEb,IAAAC,gBAAS,EAAC,YAAM;IACZ,OAAOD,MAAM,CAACE,eAAe,CACzBC,qDAA8B,EAC9B,UAAAC,OAAO,EAAI;MACP,IAAMC,SAAS,GAAG,IAAAC,sBAAa,GAAE;MACjC,IAAI,IAAAC,0BAAiB,EAACF,SAAS,CAAC,EAAE;QAC9B,IAAAG,qBAAU,EAACH,SAAS,EAAE;UAAA,OAAM,IAAAI,4CAAqB,EAACL,OAAO,CAACM,KAAK,CAAC;QAAA,EAAC;MACrE;MACA,OAAO,IAAI;IACf,CAAC,EACDC,gCAAuB,CAC1B;EACL,CAAC,EAAE,CAACX,MAAM,CAAC,CAAC;EAEZ,OAAO,IAAI;AACf,CAAC;AAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function WebinyListPlugin(): null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.WebinyListPlugin = WebinyListPlugin;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _WebinyListNode = require("../../nodes/list-node/WebinyListNode");
|
|
12
|
+
var _WebinyListItemNode = require("../../nodes/list-node/WebinyListItemNode");
|
|
13
|
+
var _useWebinyList = require("../../hooks/useWebinyList");
|
|
14
|
+
function WebinyListPlugin() {
|
|
15
|
+
var _useLexicalComposerCo = (0, _LexicalComposerContext.useLexicalComposerContext)(),
|
|
16
|
+
_useLexicalComposerCo2 = (0, _slicedToArray2.default)(_useLexicalComposerCo, 1),
|
|
17
|
+
editor = _useLexicalComposerCo2[0];
|
|
18
|
+
(0, _react.useEffect)(function () {
|
|
19
|
+
if (!editor.hasNodes([_WebinyListNode.WebinyListNode, _WebinyListItemNode.WebinyListItemNode])) {
|
|
20
|
+
throw new Error("WebinyListPlugin: WebinyListNode and/or WebinyListItemNode not registered on editor");
|
|
21
|
+
}
|
|
22
|
+
}, [editor]);
|
|
23
|
+
(0, _useWebinyList.useWebinyList)(editor);
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["WebinyListPlugin","useLexicalComposerContext","editor","useEffect","hasNodes","WebinyListNode","WebinyListItemNode","Error","useWebinyList"],"sources":["WebinyListPlugin.ts"],"sourcesContent":["import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { useEffect } from \"react\";\nimport { WebinyListNode } from \"~/nodes/list-node/WebinyListNode\";\nimport { WebinyListItemNode } from \"~/nodes/list-node/WebinyListItemNode\";\nimport { useWebinyList } from \"~/hooks/useWebinyList\";\n\nexport function WebinyListPlugin(): null {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n if (!editor.hasNodes([WebinyListNode, WebinyListItemNode])) {\n throw new Error(\n \"WebinyListPlugin: WebinyListNode and/or WebinyListItemNode not registered on editor\"\n );\n }\n }, [editor]);\n\n useWebinyList(editor);\n\n return null;\n}\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAEO,SAASA,gBAAgB,GAAS;EACrC,4BAAiB,IAAAC,iDAAyB,GAAE;IAAA;IAArCC,MAAM;EAEb,IAAAC,gBAAS,EAAC,YAAM;IACZ,IAAI,CAACD,MAAM,CAACE,QAAQ,CAAC,CAACC,8BAAc,EAAEC,sCAAkB,CAAC,CAAC,EAAE;MACxD,MAAM,IAAIC,KAAK,CACX,qFAAqF,CACxF;IACL;EACJ,CAAC,EAAE,CAACL,MAAM,CAAC,CAAC;EAEZ,IAAAM,4BAAa,EAACN,MAAM,CAAC;EAErB,OAAO,IAAI;AACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function WebinyQuotePlugin(): null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.WebinyQuotePlugin = WebinyQuotePlugin;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _WebinyQuoteNode = require("../../nodes/WebinyQuoteNode");
|
|
12
|
+
var _useWebinyQuote = require("../../hooks/useWebinyQuote");
|
|
13
|
+
function WebinyQuotePlugin() {
|
|
14
|
+
var _useLexicalComposerCo = (0, _LexicalComposerContext.useLexicalComposerContext)(),
|
|
15
|
+
_useLexicalComposerCo2 = (0, _slicedToArray2.default)(_useLexicalComposerCo, 1),
|
|
16
|
+
editor = _useLexicalComposerCo2[0];
|
|
17
|
+
(0, _react.useEffect)(function () {
|
|
18
|
+
if (!editor.hasNodes([_WebinyQuoteNode.WebinyQuoteNode])) {
|
|
19
|
+
throw new Error("WebinyQuoteNodePlugin: WebinyQuoteNode is e not registered on editor");
|
|
20
|
+
}
|
|
21
|
+
}, [editor]);
|
|
22
|
+
(0, _useWebinyQuote.useWebinyQuote)(editor);
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["WebinyQuotePlugin","useLexicalComposerContext","editor","useEffect","hasNodes","WebinyQuoteNode","Error","useWebinyQuote"],"sources":["WebinyQuoteNodePlugin.ts"],"sourcesContent":["import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { useEffect } from \"react\";\nimport { WebinyQuoteNode } from \"~/nodes/WebinyQuoteNode\";\nimport { useWebinyQuote } from \"~/hooks/useWebinyQuote\";\n\nexport function WebinyQuotePlugin(): null {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n if (!editor.hasNodes([WebinyQuoteNode])) {\n throw new Error(\"WebinyQuoteNodePlugin: WebinyQuoteNode is e not registered on editor\");\n }\n }, [editor]);\n\n useWebinyQuote(editor);\n\n return null;\n}\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AAEO,SAASA,iBAAiB,GAAS;EACtC,4BAAiB,IAAAC,iDAAyB,GAAE;IAAA;IAArCC,MAAM;EAEb,IAAAC,gBAAS,EAAC,YAAM;IACZ,IAAI,CAACD,MAAM,CAACE,QAAQ,CAAC,CAACC,gCAAe,CAAC,CAAC,EAAE;MACrC,MAAM,IAAIC,KAAK,CAAC,sEAAsE,CAAC;IAC3F;EACJ,CAAC,EAAE,CAACJ,MAAM,CAAC,CAAC;EAEZ,IAAAK,8BAAc,EAACL,MAAM,CAAC;EAEtB,OAAO,IAAI;AACf"}
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
.ContentEditable__root{
|
|
8
|
+
font-size: inherit;
|
|
9
|
+
line-height: 1.25;
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
.WebinyLexical__ltr {
|
|
13
|
+
text-align: inherit;
|
|
14
|
+
}
|
|
15
|
+
.WebinyLexical__rtl {
|
|
16
|
+
text-align: inherit;
|
|
17
|
+
}
|
|
18
|
+
.WebinyLexical__paragraph {
|
|
19
|
+
margin: 0;
|
|
20
|
+
position: relative;
|
|
21
|
+
text-align: inherit;
|
|
22
|
+
font-size: inherit;
|
|
23
|
+
}
|
|
24
|
+
.WebinyLexical__quote {
|
|
25
|
+
margin: 0;
|
|
26
|
+
margin-left: 20px;
|
|
27
|
+
margin-bottom: 10px;
|
|
28
|
+
font-size: 15px;
|
|
29
|
+
color: rgb(101, 103, 107);
|
|
30
|
+
border-left-color: rgb(206, 208, 212);
|
|
31
|
+
border-left-width: 4px;
|
|
32
|
+
border-left-style: solid;
|
|
33
|
+
padding-left: 16px;
|
|
34
|
+
}
|
|
35
|
+
.WebinyLexical__h1 {
|
|
36
|
+
font-size: 24px;
|
|
37
|
+
color: rgb(5, 5, 5);
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
margin: 0;
|
|
40
|
+
}
|
|
41
|
+
.WebinyLexical__h2 {
|
|
42
|
+
font-size: 15px;
|
|
43
|
+
color: rgb(101, 103, 107);
|
|
44
|
+
font-weight: 700;
|
|
45
|
+
margin: 0;
|
|
46
|
+
text-transform: uppercase;
|
|
47
|
+
}
|
|
48
|
+
.WebinyLexical__h3 {
|
|
49
|
+
font-size: 12px;
|
|
50
|
+
margin: 0;
|
|
51
|
+
text-transform: uppercase;
|
|
52
|
+
}
|
|
53
|
+
.WebinyLexical__textBold {
|
|
54
|
+
font-weight: bold;
|
|
55
|
+
}
|
|
56
|
+
.WebinyLexical__textItalic {
|
|
57
|
+
font-style: italic;
|
|
58
|
+
}
|
|
59
|
+
.WebinyLexical__textUnderline {
|
|
60
|
+
text-decoration: underline;
|
|
61
|
+
}
|
|
62
|
+
.WebinyLexical__textStrikethrough {
|
|
63
|
+
text-decoration: line-through;
|
|
64
|
+
}
|
|
65
|
+
.WebinyLexical__textUnderlineStrikethrough {
|
|
66
|
+
text-decoration: underline line-through;
|
|
67
|
+
}
|
|
68
|
+
.WebinyLexical__textSubscript {
|
|
69
|
+
font-size: 0.8em;
|
|
70
|
+
vertical-align: sub !important;
|
|
71
|
+
}
|
|
72
|
+
.WebinyLexical__textSuperscript {
|
|
73
|
+
font-size: 0.8em;
|
|
74
|
+
vertical-align: super;
|
|
75
|
+
}
|
|
76
|
+
.WebinyLexical__textCode {
|
|
77
|
+
background-color: rgb(240, 242, 245);
|
|
78
|
+
padding: 1px 0.25rem;
|
|
79
|
+
font-family: Menlo, Consolas, Monaco, monospace;
|
|
80
|
+
font-size: 94%;
|
|
81
|
+
}
|
|
82
|
+
.WebinyLexical__hashtag {
|
|
83
|
+
background-color: rgba(88, 144, 255, 0.15);
|
|
84
|
+
border-bottom: 1px solid rgba(88, 144, 255, 0.3);
|
|
85
|
+
}
|
|
86
|
+
.WebinyLexical__link {
|
|
87
|
+
color: rgb(33, 111, 219);
|
|
88
|
+
text-decoration: none;
|
|
89
|
+
}
|
|
90
|
+
.WebinyLexical__link:hover {
|
|
91
|
+
text-decoration: underline;
|
|
92
|
+
}
|
|
93
|
+
.WebinyLexical__code {
|
|
94
|
+
background-color: rgb(240, 242, 245);
|
|
95
|
+
font-family: Menlo, Consolas, Monaco, monospace;
|
|
96
|
+
display: block;
|
|
97
|
+
padding: 8px 8px 8px 52px;
|
|
98
|
+
line-height: 1.53;
|
|
99
|
+
font-size: 13px;
|
|
100
|
+
margin: 0;
|
|
101
|
+
margin-top: 8px;
|
|
102
|
+
margin-bottom: 8px;
|
|
103
|
+
tab-size: 2;
|
|
104
|
+
/* white-space: pre; */
|
|
105
|
+
overflow-x: auto;
|
|
106
|
+
position: relative;
|
|
107
|
+
}
|
|
108
|
+
.WebinyLexical__code:before {
|
|
109
|
+
content: attr(data-gutter);
|
|
110
|
+
position: absolute;
|
|
111
|
+
background-color: #eee;
|
|
112
|
+
left: 0;
|
|
113
|
+
top: 0;
|
|
114
|
+
border-right: 1px solid #ccc;
|
|
115
|
+
padding: 8px;
|
|
116
|
+
color: #777;
|
|
117
|
+
white-space: pre-wrap;
|
|
118
|
+
text-align: right;
|
|
119
|
+
min-width: 25px;
|
|
120
|
+
}
|
|
121
|
+
.WebinyLexical__table {
|
|
122
|
+
border-collapse: collapse;
|
|
123
|
+
border-spacing: 0;
|
|
124
|
+
max-width: 100%;
|
|
125
|
+
overflow-y: scroll;
|
|
126
|
+
table-layout: fixed;
|
|
127
|
+
width: calc(100% - 25px);
|
|
128
|
+
margin: 30px 0;
|
|
129
|
+
}
|
|
130
|
+
.WebinyLexical__tableSelected {
|
|
131
|
+
outline: 2px solid rgb(60, 132, 244);
|
|
132
|
+
}
|
|
133
|
+
.WebinyLexical__tableCell {
|
|
134
|
+
border: 1px solid #bbb;
|
|
135
|
+
min-width: 75px;
|
|
136
|
+
vertical-align: top;
|
|
137
|
+
text-align: start;
|
|
138
|
+
padding: 6px 8px;
|
|
139
|
+
position: relative;
|
|
140
|
+
cursor: default;
|
|
141
|
+
outline: none;
|
|
142
|
+
}
|
|
143
|
+
.WebinyLexical__tableCellSortedIndicator {
|
|
144
|
+
display: block;
|
|
145
|
+
opacity: 0.5;
|
|
146
|
+
position: absolute;
|
|
147
|
+
bottom: 0;
|
|
148
|
+
left: 0;
|
|
149
|
+
width: 100%;
|
|
150
|
+
height: 4px;
|
|
151
|
+
background-color: #999;
|
|
152
|
+
}
|
|
153
|
+
.WebinyLexical__tableCellResizer {
|
|
154
|
+
position: absolute;
|
|
155
|
+
right: -4px;
|
|
156
|
+
height: 100%;
|
|
157
|
+
width: 8px;
|
|
158
|
+
cursor: ew-resize;
|
|
159
|
+
z-index: 10;
|
|
160
|
+
top: 0;
|
|
161
|
+
}
|
|
162
|
+
.WebinyLexical__tableCellHeader {
|
|
163
|
+
background-color: #f2f3f5;
|
|
164
|
+
text-align: start;
|
|
165
|
+
}
|
|
166
|
+
.WebinyLexical__tableCellSelected {
|
|
167
|
+
background-color: #c9dbf0;
|
|
168
|
+
}
|
|
169
|
+
.WebinyLexical__tableCellPrimarySelected {
|
|
170
|
+
border: 2px solid rgb(60, 132, 244);
|
|
171
|
+
display: block;
|
|
172
|
+
height: calc(100% - 2px);
|
|
173
|
+
position: absolute;
|
|
174
|
+
width: calc(100% - 2px);
|
|
175
|
+
left: -1px;
|
|
176
|
+
top: -1px;
|
|
177
|
+
z-index: 2;
|
|
178
|
+
}
|
|
179
|
+
.WebinyLexical__tableCellEditing {
|
|
180
|
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
|
|
181
|
+
border-radius: 3px;
|
|
182
|
+
}
|
|
183
|
+
.WebinyLexical__tableAddColumns {
|
|
184
|
+
position: absolute;
|
|
185
|
+
top: 0;
|
|
186
|
+
width: 20px;
|
|
187
|
+
background-color: #eee;
|
|
188
|
+
height: 100%;
|
|
189
|
+
right: 0;
|
|
190
|
+
animation: table-controls 0.2s ease;
|
|
191
|
+
border: 0;
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.WebinyLexical__tableAddColumns:hover {
|
|
196
|
+
background-color: #c9dbf0;
|
|
197
|
+
}
|
|
198
|
+
.WebinyLexical__tableAddRows {
|
|
199
|
+
position: absolute;
|
|
200
|
+
bottom: -25px;
|
|
201
|
+
width: calc(100% - 25px);
|
|
202
|
+
background-color: #eee;
|
|
203
|
+
height: 20px;
|
|
204
|
+
left: 0;
|
|
205
|
+
animation: table-controls 0.2s ease;
|
|
206
|
+
border: 0;
|
|
207
|
+
cursor: pointer;
|
|
208
|
+
}
|
|
209
|
+
.WebinyLexical__tableAddRows:hover {
|
|
210
|
+
background-color: #c9dbf0;
|
|
211
|
+
}
|
|
212
|
+
@keyframes table-controls {
|
|
213
|
+
0% {
|
|
214
|
+
opacity: 0;
|
|
215
|
+
}
|
|
216
|
+
100% {
|
|
217
|
+
opacity: 1;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
.WebinyLexical__tableCellResizeRuler {
|
|
221
|
+
display: block;
|
|
222
|
+
position: absolute;
|
|
223
|
+
width: 1px;
|
|
224
|
+
background-color: rgb(60, 132, 244);
|
|
225
|
+
height: 100%;
|
|
226
|
+
top: 0;
|
|
227
|
+
}
|
|
228
|
+
.WebinyLexical__tableCellActionButtonContainer {
|
|
229
|
+
display: block;
|
|
230
|
+
right: 5px;
|
|
231
|
+
top: 6px;
|
|
232
|
+
position: absolute;
|
|
233
|
+
z-index: 4;
|
|
234
|
+
width: 20px;
|
|
235
|
+
height: 20px;
|
|
236
|
+
}
|
|
237
|
+
.WebinyLexical__tableCellActionButton {
|
|
238
|
+
background-color: #eee;
|
|
239
|
+
display: block;
|
|
240
|
+
border: 0;
|
|
241
|
+
border-radius: 20px;
|
|
242
|
+
width: 20px;
|
|
243
|
+
height: 20px;
|
|
244
|
+
color: #222;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
}
|
|
247
|
+
.WebinyLexical__tableCellActionButton:hover {
|
|
248
|
+
background-color: #ddd;
|
|
249
|
+
}
|
|
250
|
+
.WebinyLexical__characterLimit {
|
|
251
|
+
display: inline;
|
|
252
|
+
background-color: #ffbbbb !important;
|
|
253
|
+
}
|
|
254
|
+
.WebinyLexical__ol1 {
|
|
255
|
+
list-style: auto;
|
|
256
|
+
padding: 0;
|
|
257
|
+
margin: 0;
|
|
258
|
+
margin-left: 16px;
|
|
259
|
+
list-style-position: inside;
|
|
260
|
+
}
|
|
261
|
+
.WebinyLexical__ol2 {
|
|
262
|
+
list-style: initial;
|
|
263
|
+
padding: 0;
|
|
264
|
+
margin: 0;
|
|
265
|
+
margin-left: 16px;
|
|
266
|
+
list-style-type: upper-alpha;
|
|
267
|
+
list-style-position: inside;
|
|
268
|
+
}
|
|
269
|
+
.WebinyLexical__ol3 {
|
|
270
|
+
list-style: initial;
|
|
271
|
+
list-style: auto;
|
|
272
|
+
padding: 0;
|
|
273
|
+
margin: 0;
|
|
274
|
+
margin-left: 16px;
|
|
275
|
+
list-style-type: lower-alpha;
|
|
276
|
+
list-style-position: inside;
|
|
277
|
+
}
|
|
278
|
+
.WebinyLexical__ol4 {
|
|
279
|
+
list-style: initial;
|
|
280
|
+
padding: 0;
|
|
281
|
+
margin: 0;
|
|
282
|
+
margin-left: 16px;
|
|
283
|
+
list-style-type: upper-roman;
|
|
284
|
+
list-style-position: inside;
|
|
285
|
+
}
|
|
286
|
+
.WebinyLexical__ol5 {
|
|
287
|
+
list-style: initial;
|
|
288
|
+
padding: 0;
|
|
289
|
+
margin: 0;
|
|
290
|
+
margin-left: 16px;
|
|
291
|
+
list-style-type: lower-roman;
|
|
292
|
+
list-style-position: inside;
|
|
293
|
+
}
|
|
294
|
+
.WebinyLexical__ul {
|
|
295
|
+
list-style: initial;
|
|
296
|
+
padding: 0;
|
|
297
|
+
margin: 0;
|
|
298
|
+
margin-left: 16px;
|
|
299
|
+
list-style-position: inside;
|
|
300
|
+
}
|
|
301
|
+
.WebinyLexical__listItem {
|
|
302
|
+
margin: 0 32px;
|
|
303
|
+
}
|
|
304
|
+
.WebinyLexical__listItemChecked,
|
|
305
|
+
.WebinyLexical__listItemUnchecked {
|
|
306
|
+
position: relative;
|
|
307
|
+
margin-left: 8px;
|
|
308
|
+
margin-right: 8px;
|
|
309
|
+
padding-left: 24px;
|
|
310
|
+
padding-right: 24px;
|
|
311
|
+
list-style-type: none;
|
|
312
|
+
outline: none;
|
|
313
|
+
}
|
|
314
|
+
.WebinyLexical__listItemChecked {
|
|
315
|
+
text-decoration: line-through;
|
|
316
|
+
}
|
|
317
|
+
.WebinyLexical__listItemUnchecked:before,
|
|
318
|
+
.WebinyLexical__listItemChecked:before {
|
|
319
|
+
content: '';
|
|
320
|
+
width: 16px;
|
|
321
|
+
height: 16px;
|
|
322
|
+
top: 2px;
|
|
323
|
+
left: 0;
|
|
324
|
+
cursor: pointer;
|
|
325
|
+
display: block;
|
|
326
|
+
background-size: cover;
|
|
327
|
+
position: absolute;
|
|
328
|
+
}
|
|
329
|
+
.WebinyLexical__listItemUnchecked[dir='rtl']:before,
|
|
330
|
+
.WebinyLexical__listItemChecked[dir='rtl']:before {
|
|
331
|
+
left: auto;
|
|
332
|
+
right: 0;
|
|
333
|
+
}
|
|
334
|
+
.WebinyLexical__listItemUnchecked:focus:before,
|
|
335
|
+
.WebinyLexical__listItemChecked:focus:before {
|
|
336
|
+
box-shadow: 0 0 0 2px #a6cdfe;
|
|
337
|
+
border-radius: 2px;
|
|
338
|
+
}
|
|
339
|
+
.WebinyLexical__listItemUnchecked:before {
|
|
340
|
+
border: 1px solid #999;
|
|
341
|
+
border-radius: 2px;
|
|
342
|
+
}
|
|
343
|
+
.WebinyLexical__listItemChecked:before {
|
|
344
|
+
border: 1px solid rgb(61, 135, 245);
|
|
345
|
+
border-radius: 2px;
|
|
346
|
+
background-color: #3d87f5;
|
|
347
|
+
background-repeat: no-repeat;
|
|
348
|
+
}
|
|
349
|
+
.WebinyLexical__listItemChecked:after {
|
|
350
|
+
content: '';
|
|
351
|
+
cursor: pointer;
|
|
352
|
+
border-color: #fff;
|
|
353
|
+
border-style: solid;
|
|
354
|
+
position: absolute;
|
|
355
|
+
display: block;
|
|
356
|
+
top: 6px;
|
|
357
|
+
width: 3px;
|
|
358
|
+
left: 7px;
|
|
359
|
+
height: 6px;
|
|
360
|
+
transform: rotate(45deg);
|
|
361
|
+
border-width: 0 2px 2px 0;
|
|
362
|
+
}
|
|
363
|
+
.WebinyLexical__nestedListItem {
|
|
364
|
+
list-style-type: none;
|
|
365
|
+
}
|
|
366
|
+
.WebinyLexical__nestedListItem:before,
|
|
367
|
+
.WebinyLexical__nestedListItem:after {
|
|
368
|
+
display: none;
|
|
369
|
+
}
|
|
370
|
+
.WebinyLexical__tokenComment {
|
|
371
|
+
color: slategray;
|
|
372
|
+
}
|
|
373
|
+
.WebinyLexical__tokenPunctuation {
|
|
374
|
+
color: #999;
|
|
375
|
+
}
|
|
376
|
+
.WebinyLexical__tokenProperty {
|
|
377
|
+
color: #905;
|
|
378
|
+
}
|
|
379
|
+
.WebinyLexical__tokenSelector {
|
|
380
|
+
color: #690;
|
|
381
|
+
}
|
|
382
|
+
.WebinyLexical__tokenOperator {
|
|
383
|
+
color: #9a6e3a;
|
|
384
|
+
}
|
|
385
|
+
.WebinyLexical__tokenAttr {
|
|
386
|
+
color: #07a;
|
|
387
|
+
}
|
|
388
|
+
.WebinyLexical__tokenVariable {
|
|
389
|
+
color: #e90;
|
|
390
|
+
}
|
|
391
|
+
.WebinyLexical__tokenFunction {
|
|
392
|
+
color: #dd4a68;
|
|
393
|
+
}
|
|
394
|
+
.WebinyLexical__mark {
|
|
395
|
+
background: rgba(255, 212, 0, 0.14);
|
|
396
|
+
border-bottom: 2px solid rgba(255, 212, 0, 0.3);
|
|
397
|
+
padding-bottom: 2px;
|
|
398
|
+
}
|
|
399
|
+
.WebinyLexical__markOverlap {
|
|
400
|
+
background: rgba(255, 212, 0, 0.3);
|
|
401
|
+
border-bottom: 2px solid rgba(255, 212, 0, 0.7);
|
|
402
|
+
}
|
|
403
|
+
.WebinyLexical__mark.selected {
|
|
404
|
+
background: rgba(255, 212, 0, 0.5);
|
|
405
|
+
border-bottom: 2px solid rgba(255, 212, 0, 1);
|
|
406
|
+
}
|
|
407
|
+
.WebinyLexical__markOverlap.selected {
|
|
408
|
+
background: rgba(255, 212, 0, 0.7);
|
|
409
|
+
border-bottom: 2px solid rgba(255, 212, 0, 0.7);
|
|
410
|
+
}
|
|
411
|
+
.WebinyLexical__embedBlock {
|
|
412
|
+
user-select: none;
|
|
413
|
+
}
|
|
414
|
+
.WebinyLexical__embedBlockFocus {
|
|
415
|
+
outline: 2px solid rgb(60, 132, 244);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.WebinyLexical__placeholder {
|
|
419
|
+
text-align: left;
|
|
420
|
+
}
|