@webiny/lexical-editor 5.37.5 → 5.37.6-beta.1

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.
Files changed (100) hide show
  1. package/commands/insertFiles.js +1 -3
  2. package/commands/webiny-list.js +1 -3
  3. package/commands/webiny-quote.js +1 -3
  4. package/components/Editor/HeadingEditor.js +1 -3
  5. package/components/Editor/ParagraphEditor.js +1 -3
  6. package/components/Editor/RichTextEditor.d.ts +15 -18
  7. package/components/Editor/RichTextEditor.js +43 -34
  8. package/components/Editor/RichTextEditor.js.map +1 -1
  9. package/components/ImageComponent.js +1 -3
  10. package/components/LexicalEditorConfig/LexicalEditorConfig.js +1 -3
  11. package/components/LexicalEditorConfig/components/Node.js +1 -3
  12. package/components/LexicalEditorConfig/components/Plugin.js +1 -3
  13. package/components/LexicalEditorConfig/components/ToolbarElement.js +1 -3
  14. package/components/LexicalHtmlRenderer.js +1 -3
  15. package/components/Toolbar/StaticToolbar.js +1 -3
  16. package/components/Toolbar/Toolbar.js +1 -3
  17. package/components/ToolbarActions/BoldAction.js +1 -3
  18. package/components/ToolbarActions/BulletListAction.js +1 -3
  19. package/components/ToolbarActions/CodeHighlightAction.js +1 -3
  20. package/components/ToolbarActions/FontColorAction.js +1 -3
  21. package/components/ToolbarActions/FontSizeAction.js +1 -3
  22. package/components/ToolbarActions/ImageAction.js +1 -3
  23. package/components/ToolbarActions/ItalicAction.js +1 -3
  24. package/components/ToolbarActions/LinkAction.js +1 -3
  25. package/components/ToolbarActions/NumberedListAction.js +1 -3
  26. package/components/ToolbarActions/QuoteAction.js +1 -3
  27. package/components/ToolbarActions/TextAlignmentAction.js +1 -3
  28. package/components/ToolbarActions/TypographyAction.js +1 -3
  29. package/components/ToolbarActions/UnderlineAction.js +1 -3
  30. package/context/FontColorActionContext.js +1 -3
  31. package/context/RichTextEditorContext.js +1 -3
  32. package/context/SharedHistoryContext.js +1 -3
  33. package/context/TextAlignmentActionContextProps.js +1 -3
  34. package/context/TypographyActionContext.js +1 -3
  35. package/hooks/useFontColorPicker.js +1 -3
  36. package/hooks/useList.js +1 -3
  37. package/hooks/useQuote.js +1 -3
  38. package/hooks/useRichTextEditor.js +1 -3
  39. package/hooks/useTextAlignmentAction.js +1 -3
  40. package/hooks/useTypographyAction.js +1 -3
  41. package/index.js +1 -3
  42. package/nodes/FontColorNode.js +1 -3
  43. package/nodes/HeadingNode.js +1 -3
  44. package/nodes/ImageNode.js +1 -3
  45. package/nodes/ListItemNode.js +1 -3
  46. package/nodes/ListNode/formatList.js +1 -3
  47. package/nodes/ListNode.js +1 -3
  48. package/nodes/ParagraphNode.js +1 -3
  49. package/nodes/QuoteNode.js +1 -3
  50. package/nodes/TypographyElementNode.js +1 -3
  51. package/nodes/link-node.js +1 -3
  52. package/nodes/types.js +1 -3
  53. package/nodes/webinyNodes.js +1 -3
  54. package/package.json +6 -6
  55. package/plugins/BlurEventPlugin/BlurEventPlugin.js +1 -3
  56. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js +1 -3
  57. package/plugins/CodeHighlightPlugin/index.js +1 -3
  58. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js +1 -3
  59. package/plugins/FloatingLinkEditorPlugin/index.js +1 -3
  60. package/plugins/FontColorPlugin/FontColorPlugin.js +1 -3
  61. package/plugins/ImagesPlugin/ImagesPlugin.js +1 -3
  62. package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.js +1 -3
  63. package/plugins/LexicalUpdateStatePlugin/index.js +1 -3
  64. package/plugins/ListPLugin/ListPlugin.js +1 -3
  65. package/plugins/TypographyPlugin/TypographyPlugin.js +1 -3
  66. package/plugins/WebinyQuoteNodePlugin/WebinyQuoteNodePlugin.js +1 -3
  67. package/themes/webinyLexicalTheme.js +1 -3
  68. package/types.js +1 -3
  69. package/ui/ContentEditable.js +1 -3
  70. package/ui/Divider.js +1 -3
  71. package/ui/DropDown.js +1 -3
  72. package/ui/ImageResizer.js +1 -3
  73. package/ui/LinkPreview.js +1 -3
  74. package/ui/Placeholder.js +1 -3
  75. package/ui/TextInput.js +1 -3
  76. package/ui/ToolbarActionDialog.js +1 -3
  77. package/utils/canUseDOM.js +1 -3
  78. package/utils/files.js +1 -3
  79. package/utils/findTypographyStyleByHtmlTag.js +1 -3
  80. package/utils/generateInitialLexicalValue.js +1 -3
  81. package/utils/getDOMRangeRect.js +1 -3
  82. package/utils/getLexicalTextSelectionState.js +1 -3
  83. package/utils/getSelectedNode.js +1 -3
  84. package/utils/getTransparentImage.js +1 -3
  85. package/utils/isHTMLElement.js +1 -3
  86. package/utils/isUrlLinkReference.js +1 -3
  87. package/utils/isValidJSON.js +1 -3
  88. package/utils/isValidLexicalData.js +1 -3
  89. package/utils/nodes/clearNodeFormating.js +1 -3
  90. package/utils/nodes/formatToHeading.js +1 -3
  91. package/utils/nodes/formatToParagraph.js +1 -3
  92. package/utils/nodes/formatToQuote.js +1 -3
  93. package/utils/nodes/insertImage.js +1 -3
  94. package/utils/nodes/listNode.js +1 -3
  95. package/utils/point.js +1 -3
  96. package/utils/rect.js +1 -3
  97. package/utils/sanitizeUrl.js +1 -3
  98. package/utils/setFloatingElemPosition.js +1 -3
  99. package/utils/styleObjectToString.js +1 -3
  100. package/utils/toTypographyEmotionMap.js +1 -3
@@ -6,6 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.INSERT_IMAGE_COMMAND = void 0;
7
7
  var _lexical = require("lexical");
8
8
  var INSERT_IMAGE_COMMAND = (0, _lexical.createCommand)("INSERT_IMAGE_COMMAND");
9
- exports.INSERT_IMAGE_COMMAND = INSERT_IMAGE_COMMAND;
10
-
11
- //# sourceMappingURL=insertFiles.js.map
9
+ exports.INSERT_IMAGE_COMMAND = INSERT_IMAGE_COMMAND;
@@ -10,6 +10,4 @@ exports.INSERT_UNORDERED_WEBINY_LIST_COMMAND = INSERT_UNORDERED_WEBINY_LIST_COMM
10
10
  var INSERT_ORDERED_WEBINY_LIST_COMMAND = (0, _lexical.createCommand)("INSERT_ORDERED_WEBINY_LIST_COMMAND");
11
11
  exports.INSERT_ORDERED_WEBINY_LIST_COMMAND = INSERT_ORDERED_WEBINY_LIST_COMMAND;
12
12
  var REMOVE_WEBINY_LIST_COMMAND = (0, _lexical.createCommand)("REMOVE_WEBINY_LIST_COMMAND");
13
- exports.REMOVE_WEBINY_LIST_COMMAND = REMOVE_WEBINY_LIST_COMMAND;
14
-
15
- //# sourceMappingURL=webiny-list.js.map
13
+ exports.REMOVE_WEBINY_LIST_COMMAND = REMOVE_WEBINY_LIST_COMMAND;
@@ -6,6 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.INSERT_WEBINY_QUOTE_COMMAND = void 0;
7
7
  var _lexical = require("lexical");
8
8
  var INSERT_WEBINY_QUOTE_COMMAND = (0, _lexical.createCommand)("INSERT_WEBINY_QUOTE_COMMAND");
9
- exports.INSERT_WEBINY_QUOTE_COMMAND = INSERT_WEBINY_QUOTE_COMMAND;
10
-
11
- //# sourceMappingURL=webiny-quote.js.map
9
+ exports.INSERT_WEBINY_QUOTE_COMMAND = INSERT_WEBINY_QUOTE_COMMAND;
@@ -24,6 +24,4 @@ var HeadingEditor = function HeadingEditor(_ref) {
24
24
  }
25
25
  }), rest === null || rest === void 0 ? void 0 : rest.children);
26
26
  };
27
- exports.HeadingEditor = HeadingEditor;
28
-
29
- //# sourceMappingURL=HeadingEditor.js.map
27
+ exports.HeadingEditor = HeadingEditor;
@@ -24,6 +24,4 @@ var ParagraphEditor = function ParagraphEditor(_ref) {
24
24
  }
25
25
  }), rest === null || rest === void 0 ? void 0 : rest.children);
26
26
  };
27
- exports.ParagraphEditor = ParagraphEditor;
28
-
29
- //# sourceMappingURL=ParagraphEditor.js.map
27
+ exports.ParagraphEditor = ParagraphEditor;
@@ -4,29 +4,26 @@ import { Klass, LexicalNode } from "lexical";
4
4
  import { LexicalValue, ThemeEmotionMap, ToolbarActionPlugin } from "../../types";
5
5
  import { WebinyTheme } from "../../themes/webinyLexicalTheme";
6
6
  export interface RichTextEditorProps {
7
- toolbar?: React.ReactNode;
8
- staticToolbar?: React.ReactNode;
9
- toolbarActionPlugins?: ToolbarActionPlugin[];
10
- tag?: string;
11
- onChange?: (json: LexicalValue) => void;
12
- value: LexicalValue | null;
7
+ children?: React.ReactNode | React.ReactNode[];
8
+ classes?: string;
9
+ contentEditableStyles?: React.CSSProperties;
13
10
  focus?: boolean;
14
- placeholder?: string;
11
+ height?: number | string;
15
12
  nodes?: Klass<LexicalNode>[];
16
- /**
17
- * @description Lexical plugins
18
- */
19
- children?: React.ReactNode | React.ReactNode[];
20
13
  onBlur?: (editorState: LexicalValue) => void;
21
- height?: number | string;
22
- width?: number | string;
23
- theme: WebinyTheme;
24
- themeStylesTransformer?: (cssObject: Record<string, any>) => CSSObject;
25
- themeEmotionMap?: ThemeEmotionMap;
14
+ onChange?: (json: LexicalValue) => void;
15
+ placeholder?: string;
26
16
  placeholderStyles?: React.CSSProperties;
17
+ staticToolbar?: React.ReactNode;
27
18
  styles?: React.CSSProperties;
28
- contentEditableStyles?: React.CSSProperties;
29
- classes?: string;
19
+ tag?: string;
20
+ theme: WebinyTheme;
21
+ themeEmotionMap?: ThemeEmotionMap;
22
+ themeStylesTransformer?: (cssObject: Record<string, any>) => CSSObject;
23
+ toolbar?: React.ReactNode;
24
+ toolbarActionPlugins?: ToolbarActionPlugin[];
25
+ value: LexicalValue | null;
26
+ width?: number | string;
30
27
  }
31
28
  /**
32
29
  * @description Main editor container
@@ -110,37 +110,48 @@ var BaseRichTextEditor = function BaseRichTextEditor(_ref) {
110
110
  }
111
111
  });
112
112
  }
113
- return /*#__PURE__*/_react.default.createElement(_LexicalComposer.LexicalComposer, {
114
- initialConfig: initialConfig
115
- }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, staticToolbar && staticToolbar, /*#__PURE__*/_react.default.createElement("div", {
116
- ref: scrollRef,
117
- style: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, styles), sizeStyle), {}, {
118
- overflow: "auto",
119
- position: "relative"
120
- })
121
- }, /*#__PURE__*/_react.default.createElement(_LexicalOnChangePlugin.OnChangePlugin, {
122
- onChange: handleOnChange
123
- }), value && /*#__PURE__*/_react.default.createElement(_LexicalUpdateStatePlugin.LexicalUpdateStatePlugin, {
124
- value: value
125
- }), /*#__PURE__*/_react.default.createElement(_LexicalClearEditorPlugin.ClearEditorPlugin, null), /*#__PURE__*/_react.default.createElement(_LexicalHistoryPlugin.HistoryPlugin, {
126
- externalHistoryState: historyState
127
- }), onBlur && /*#__PURE__*/_react.default.createElement(_BlurEventPlugin.BlurEventPlugin, {
128
- onBlur: onBlur
129
- }), focus && /*#__PURE__*/_react.default.createElement(_LexicalAutoFocusPlugin.AutoFocusPlugin, null), configPlugins, children, /*#__PURE__*/_react.default.createElement(_LexicalRichTextPlugin.RichTextPlugin, {
130
- contentEditable: /*#__PURE__*/_react.default.createElement("div", {
131
- className: "editor-scroller",
132
- style: (0, _objectSpread2.default)({}, sizeStyle)
133
- }, /*#__PURE__*/_react.default.createElement("div", {
134
- className: "editor",
135
- ref: onRef
136
- }, /*#__PURE__*/_react.default.createElement(_LexicalContentEditable.ContentEditable, {
137
- style: (0, _objectSpread2.default)({
138
- outline: 0
139
- }, contentEditableStyles)
140
- }))),
141
- placeholder: placeholderElem,
142
- ErrorBoundary: _LexicalErrorBoundary.default
143
- }), floatingAnchorElem && toolbar)));
113
+ return (
114
+ /*#__PURE__*/
115
+ /**
116
+ * Once the LexicalComposer is mounted, it caches the `initialConfig` internally, and all future
117
+ * updates to the config will be ignored. This is a problem because we pull in Nodes from our config,
118
+ * and initially, there can be multiple re-renders, while the config object is settled.
119
+ *
120
+ * To bypass this issue, we generate a naive `key` based on the number of Nodes.
121
+ */
122
+ _react.default.createElement(_LexicalComposer.LexicalComposer, {
123
+ initialConfig: initialConfig,
124
+ key: initialConfig.nodes.length
125
+ }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, staticToolbar && staticToolbar, /*#__PURE__*/_react.default.createElement("div", {
126
+ ref: scrollRef,
127
+ style: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, styles), sizeStyle), {}, {
128
+ overflow: "auto",
129
+ position: "relative"
130
+ })
131
+ }, /*#__PURE__*/_react.default.createElement(_LexicalOnChangePlugin.OnChangePlugin, {
132
+ onChange: handleOnChange
133
+ }), value && /*#__PURE__*/_react.default.createElement(_LexicalUpdateStatePlugin.LexicalUpdateStatePlugin, {
134
+ value: value
135
+ }), /*#__PURE__*/_react.default.createElement(_LexicalClearEditorPlugin.ClearEditorPlugin, null), /*#__PURE__*/_react.default.createElement(_LexicalHistoryPlugin.HistoryPlugin, {
136
+ externalHistoryState: historyState
137
+ }), onBlur && /*#__PURE__*/_react.default.createElement(_BlurEventPlugin.BlurEventPlugin, {
138
+ onBlur: onBlur
139
+ }), focus && /*#__PURE__*/_react.default.createElement(_LexicalAutoFocusPlugin.AutoFocusPlugin, null), configPlugins, children, /*#__PURE__*/_react.default.createElement(_LexicalRichTextPlugin.RichTextPlugin, {
140
+ contentEditable: /*#__PURE__*/_react.default.createElement("div", {
141
+ className: "editor-scroller",
142
+ style: (0, _objectSpread2.default)({}, sizeStyle)
143
+ }, /*#__PURE__*/_react.default.createElement("div", {
144
+ className: "editor",
145
+ ref: onRef
146
+ }, /*#__PURE__*/_react.default.createElement(_LexicalContentEditable.ContentEditable, {
147
+ style: (0, _objectSpread2.default)({
148
+ outline: 0
149
+ }, contentEditableStyles)
150
+ }))),
151
+ placeholder: placeholderElem,
152
+ ErrorBoundary: _LexicalErrorBoundary.default
153
+ }), floatingAnchorElem && toolbar)))
154
+ );
144
155
  };
145
156
 
146
157
  /**
@@ -156,6 +167,4 @@ var RichTextEditor = (0, _reactComposition.makeComposable)("RichTextEditor", fun
156
167
  })));
157
168
  })));
158
169
  });
159
- exports.RichTextEditor = RichTextEditor;
160
-
161
- //# sourceMappingURL=RichTextEditor.js.map
170
+ exports.RichTextEditor = RichTextEditor;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_react2","_LexicalComposer","_LexicalOnChangePlugin","_LexicalAutoFocusPlugin","_LexicalClearEditorPlugin","_LexicalRichTextPlugin","_LexicalErrorBoundary","_interopRequireDefault","_reactComposition","_LexicalHistoryPlugin","_LexicalContentEditable","_RichTextEditorContext","_isValidLexicalData","_LexicalUpdateStatePlugin","_BlurEventPlugin","_Placeholder","_generateInitialLexicalValue","_webinyLexicalTheme","_webinyNodes","_SharedHistoryContext","_useRichTextEditor2","_toTypographyEmotionMap","_LexicalEditorConfig","BaseRichTextEditor","_ref","toolbar","staticToolbar","onChange","value","nodes","placeholder","children","onBlur","focus","styles","width","height","theme","themeEmotionMap","toolbarActionPlugins","contentEditableStyles","placeholderStyles","config","useLexicalEditorConfig","_useSharedHistoryCont","useSharedHistoryContext","historyState","placeholderElem","default","createElement","Placeholder","scrollRef","useRef","_useState","useState","undefined","_useState2","_slicedToArray2","floatingAnchorElem","setFloatingAnchorElem","_useRichTextEditor","useRichTextEditor","setTheme","setThemeEmotionMap","setToolbarActionPlugins","useEffect","onRef","_floatingAnchorElem","sizeStyle","configNodes","map","node","configPlugins","plugins","plugin","Fragment","key","name","element","initialConfig","editorState","isValidLexicalData","generateInitialLexicalValue","namespace","onError","error","concat","_toConsumableArray2","WebinyNodes","_objectSpread2","webinyEditorTheme","emotionMap","handleOnChange","editor","read","getEditorState","JSON","stringify","toJSON","LexicalComposer","ref","style","overflow","position","OnChangePlugin","LexicalUpdateStatePlugin","ClearEditorPlugin","HistoryPlugin","externalHistoryState","BlurEventPlugin","AutoFocusPlugin","RichTextPlugin","contentEditable","className","ContentEditable","outline","ErrorBoundary","LexicalErrorBoundary","RichTextEditor","makeComposable","props","LexicalEditorWithConfig","RichTextEditorProvider","ClassNames","_ref2","_props$themeEmotionMa","css","toTypographyEmotionMap","themeStylesTransformer","SharedHistoryContext","Object","assign","exports"],"sources":["RichTextEditor.tsx"],"sourcesContent":["import React, { Fragment, useEffect, useRef, useState } from \"react\";\nimport { ClassNames, CSSObject } from \"@emotion/react\";\nimport { Klass, LexicalEditor, LexicalNode } from \"lexical\";\nimport { EditorState } from \"lexical/LexicalEditorState\";\nimport { LexicalComposer } from \"@lexical/react/LexicalComposer\";\nimport { OnChangePlugin } from \"@lexical/react/LexicalOnChangePlugin\";\nimport { AutoFocusPlugin } from \"@lexical/react/LexicalAutoFocusPlugin\";\nimport { ClearEditorPlugin } from \"@lexical/react/LexicalClearEditorPlugin\";\nimport { RichTextPlugin } from \"@lexical/react/LexicalRichTextPlugin\";\nimport LexicalErrorBoundary from \"@lexical/react/LexicalErrorBoundary\";\nimport { makeComposable } from \"@webiny/react-composition\";\nimport { HistoryPlugin } from \"@lexical/react/LexicalHistoryPlugin\";\nimport { ContentEditable } from \"@lexical/react/LexicalContentEditable\";\nimport { RichTextEditorProvider } from \"~/context/RichTextEditorContext\";\nimport { isValidLexicalData } from \"~/utils/isValidLexicalData\";\nimport { LexicalUpdateStatePlugin } from \"~/plugins/LexicalUpdateStatePlugin\";\nimport { BlurEventPlugin } from \"~/plugins/BlurEventPlugin/BlurEventPlugin\";\nimport { LexicalValue, ThemeEmotionMap, ToolbarActionPlugin } from \"~/types\";\nimport { Placeholder } from \"~/ui/Placeholder\";\nimport { generateInitialLexicalValue } from \"~/utils/generateInitialLexicalValue\";\nimport { webinyEditorTheme, WebinyTheme } from \"~/themes/webinyLexicalTheme\";\nimport { WebinyNodes } from \"~/nodes/webinyNodes\";\nimport { SharedHistoryContext, useSharedHistoryContext } from \"~/context/SharedHistoryContext\";\nimport { useRichTextEditor } from \"~/hooks/useRichTextEditor\";\nimport { toTypographyEmotionMap } from \"~/utils/toTypographyEmotionMap\";\nimport {\n LexicalEditorWithConfig,\n useLexicalEditorConfig\n} from \"~/components/LexicalEditorConfig/LexicalEditorConfig\";\n\nexport interface RichTextEditorProps {\n toolbar?: React.ReactNode;\n staticToolbar?: React.ReactNode;\n toolbarActionPlugins?: ToolbarActionPlugin[];\n tag?: string;\n onChange?: (json: LexicalValue) => void;\n value: LexicalValue | null;\n focus?: boolean;\n placeholder?: string;\n nodes?: Klass<LexicalNode>[];\n /**\n * @description Lexical plugins\n */\n children?: React.ReactNode | React.ReactNode[];\n onBlur?: (editorState: LexicalValue) => void;\n height?: number | string;\n width?: number | string;\n /*\n * @description Theme to be injected into lexical editor\n */\n theme: WebinyTheme;\n themeStylesTransformer?: (cssObject: Record<string, any>) => CSSObject;\n themeEmotionMap?: ThemeEmotionMap;\n\n placeholderStyles?: React.CSSProperties;\n /*\n * Set inline styles to lexical editor container\n * */\n styles?: React.CSSProperties;\n\n /*\n * Set inline styles to lexical editor editable content\n * */\n contentEditableStyles?: React.CSSProperties;\n\n /*\n * Set classes to lexical input container\n * */\n classes?: string;\n}\n\nconst BaseRichTextEditor: React.FC<RichTextEditorProps> = ({\n toolbar,\n staticToolbar,\n onChange,\n value,\n nodes,\n placeholder,\n children,\n onBlur,\n focus,\n styles,\n width,\n height,\n theme,\n themeEmotionMap,\n toolbarActionPlugins,\n contentEditableStyles,\n placeholderStyles\n}: RichTextEditorProps) => {\n const config = useLexicalEditorConfig();\n const { historyState } = useSharedHistoryContext();\n const placeholderElem = (\n <Placeholder styles={placeholderStyles}>{placeholder || \"Enter text...\"}</Placeholder>\n );\n const scrollRef = useRef(null);\n const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLElement | undefined>(\n undefined\n );\n const { setTheme, setThemeEmotionMap, setToolbarActionPlugins } = useRichTextEditor();\n\n useEffect(() => {\n setTheme(theme);\n setThemeEmotionMap(themeEmotionMap);\n }, [themeEmotionMap, theme]);\n\n useEffect(() => {\n if (toolbarActionPlugins) {\n setToolbarActionPlugins(toolbarActionPlugins || []);\n }\n }, [toolbarActionPlugins]);\n\n const onRef = (_floatingAnchorElem: HTMLDivElement) => {\n if (_floatingAnchorElem !== null) {\n setFloatingAnchorElem(_floatingAnchorElem);\n }\n };\n\n const sizeStyle = {\n height: height || \"\",\n width: width || \"\"\n };\n\n const configNodes = config.nodes.map(node => node.node);\n const configPlugins = config.plugins.map(plugin => (\n <Fragment key={plugin.name}>{plugin.element}</Fragment>\n ));\n\n const initialConfig = {\n editorState: isValidLexicalData(value) ? value : generateInitialLexicalValue(),\n namespace: \"webiny\",\n onError: (error: Error) => {\n throw error;\n },\n nodes: [...WebinyNodes, ...configNodes, ...(nodes || [])],\n theme: { ...webinyEditorTheme, emotionMap: themeEmotionMap }\n };\n\n function handleOnChange(editorState: EditorState, editor: LexicalEditor) {\n editorState.read(() => {\n if (typeof onChange === \"function\") {\n const editorState = editor.getEditorState();\n onChange(JSON.stringify(editorState.toJSON()));\n }\n });\n }\n\n return (\n <LexicalComposer initialConfig={initialConfig}>\n <>\n {staticToolbar && staticToolbar}\n <div\n ref={scrollRef}\n style={{ ...styles, ...sizeStyle, overflow: \"auto\", position: \"relative\" }}\n >\n {/* data */}\n <OnChangePlugin onChange={handleOnChange} />\n {value && <LexicalUpdateStatePlugin value={value} />}\n <ClearEditorPlugin />\n <HistoryPlugin externalHistoryState={historyState} />\n {/* Events */}\n {onBlur && <BlurEventPlugin onBlur={onBlur} />}\n {focus && <AutoFocusPlugin />}\n {/* External plugins and components */}\n {configPlugins}\n {children}\n <RichTextPlugin\n contentEditable={\n <div className=\"editor-scroller\" style={{ ...sizeStyle }}>\n <div className=\"editor\" ref={onRef}>\n <ContentEditable\n style={{ outline: 0, ...contentEditableStyles }}\n />\n </div>\n </div>\n }\n placeholder={placeholderElem}\n ErrorBoundary={LexicalErrorBoundary}\n />\n {/* Toolbar */}\n {floatingAnchorElem && toolbar}\n </div>\n </>\n </LexicalComposer>\n );\n};\n\n/**\n * @description Main editor container\n */\nexport const RichTextEditor = makeComposable<RichTextEditorProps>(\"RichTextEditor\", props => {\n return (\n <LexicalEditorWithConfig>\n <RichTextEditorProvider>\n <ClassNames>\n {({ css }) => {\n const themeEmotionMap =\n props?.themeEmotionMap ??\n toTypographyEmotionMap(css, props.theme, props.themeStylesTransformer);\n return (\n <SharedHistoryContext>\n <BaseRichTextEditor {...props} themeEmotionMap={themeEmotionMap} />\n </SharedHistoryContext>\n );\n }}\n </ClassNames>\n </RichTextEditorProvider>\n </LexicalEditorWithConfig>\n );\n});\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAGA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAJ,OAAA;AACA,IAAAK,yBAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAN,OAAA;AACA,IAAAO,qBAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,iBAAA,GAAAT,OAAA;AACA,IAAAU,qBAAA,GAAAV,OAAA;AACA,IAAAW,uBAAA,GAAAX,OAAA;AACA,IAAAY,sBAAA,GAAAZ,OAAA;AACA,IAAAa,mBAAA,GAAAb,OAAA;AACA,IAAAc,yBAAA,GAAAd,OAAA;AACA,IAAAe,gBAAA,GAAAf,OAAA;AAEA,IAAAgB,YAAA,GAAAhB,OAAA;AACA,IAAAiB,4BAAA,GAAAjB,OAAA;AACA,IAAAkB,mBAAA,GAAAlB,OAAA;AACA,IAAAmB,YAAA,GAAAnB,OAAA;AACA,IAAAoB,qBAAA,GAAApB,OAAA;AACA,IAAAqB,mBAAA,GAAArB,OAAA;AACA,IAAAsB,uBAAA,GAAAtB,OAAA;AACA,IAAAuB,oBAAA,GAAAvB,OAAA;AA8CA,IAAMwB,kBAAiD,GAAG,SAApDA,kBAAiDA,CAAAC,IAAA,EAkB5B;EAAA,IAjBvBC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,aAAa,GAAAF,IAAA,CAAbE,aAAa;IACbC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC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C,KAAK,EAAI;EACzF,oBACI3H,MAAA,CAAAmD,OAAA,CAAAC,aAAA,CAAC3B,oBAAA,CAAAmG,uBAAuB,qBACpB5H,MAAA,CAAAmD,OAAA,CAAAC,aAAA,CAACtC,sBAAA,CAAA+G,sBAAsB,qBACnB7H,MAAA,CAAAmD,OAAA,CAAAC,aAAA,CAACjD,OAAA,CAAA2H,UAAU,QACN,UAAAC,KAAA,EAAa;IAAA,IAAAC,qBAAA;IAAA,IAAVC,GAAG,GAAAF,KAAA,CAAHE,GAAG;IACH,IAAMxF,eAAe,IAAAuF,qBAAA,GACjBL,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAElF,eAAe,cAAAuF,qBAAA,cAAAA,qBAAA,GACtB,IAAAE,8CAAsB,EAACD,GAAG,EAAEN,KAAK,CAACnF,KAAK,EAAEmF,KAAK,CAACQ,sBAAsB,CAAC;IAC1E,oBACInI,MAAA,CAAAmD,OAAA,CAAAC,aAAA,CAAC9B,qBAAA,CAAA8G,oBAAoB,qBACjBpI,MAAA,CAAAmD,OAAA,CAAAC,aAAA,CAAC1B,kBAAkB,EAAA2G,MAAA,CAAAC,MAAA,KAAKX,KAAK;MAAElF,eAAe,EAAEA;IAAgB,EAAE,CAChD,CAAC;EAE/B,CACQ,CACQ,CACH,CAAC;AAElC,CAAC,CAAC;AAAC8F,OAAA,CAAAd,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_react2","_LexicalComposer","_LexicalOnChangePlugin","_LexicalAutoFocusPlugin","_LexicalClearEditorPlugin","_LexicalRichTextPlugin","_LexicalErrorBoundary","_interopRequireDefault","_reactComposition","_LexicalHistoryPlugin","_LexicalContentEditable","_RichTextEditorContext","_isValidLexicalData","_LexicalUpdateStatePlugin","_BlurEventPlugin","_Placeholder","_generateInitialLexicalValue","_webinyLexicalTheme","_webinyNodes","_SharedHistoryContext","_useRichTextEditor2","_toTypographyEmotionMap","_LexicalEditorConfig","BaseRichTextEditor","_ref","toolbar","staticToolbar","onChange","value","nodes","placeholder","children","onBlur","focus","styles","width","height","theme","themeEmotionMap","toolbarActionPlugins","contentEditableStyles","placeholderStyles","config","useLexicalEditorConfig","_useSharedHistoryCont","useSharedHistoryContext","historyState","placeholderElem","default","createElement","Placeholder","scrollRef","useRef","_useState","useState","undefined","_useState2","_slicedToArray2","floatingAnchorElem","setFloatingAnchorElem","_useRichTextEditor","useRichTextEditor","setTheme","setThemeEmotionMap","setToolbarActionPlugins","useEffect","onRef","_floatingAnchorElem","sizeStyle","configNodes","map","node","configPlugins","plugins","plugin","Fragment","key","name","element","initialConfig","editorState","isValidLexicalData","generateInitialLexicalValue","namespace","onError","error","concat","_toConsumableArray2","WebinyNodes","_objectSpread2","webinyEditorTheme","emotionMap","handleOnChange","editor","read","getEditorState","JSON","stringify","toJSON","LexicalComposer","length","ref","style","overflow","position","OnChangePlugin","LexicalUpdateStatePlugin","ClearEditorPlugin","HistoryPlugin","externalHistoryState","BlurEventPlugin","AutoFocusPlugin","RichTextPlugin","contentEditable","className","ContentEditable","outline","ErrorBoundary","LexicalErrorBoundary","RichTextEditor","makeComposable","props","LexicalEditorWithConfig","RichTextEditorProvider","ClassNames","_ref2","_props$themeEmotionMa","css","toTypographyEmotionMap","themeStylesTransformer","SharedHistoryContext","Object","assign","exports"],"sources":["RichTextEditor.tsx"],"sourcesContent":["import React, { Fragment, useEffect, useRef, useState } from \"react\";\nimport { ClassNames, CSSObject } from \"@emotion/react\";\nimport { Klass, LexicalEditor, LexicalNode } from \"lexical\";\nimport { EditorState } from \"lexical/LexicalEditorState\";\nimport { LexicalComposer } from \"@lexical/react/LexicalComposer\";\nimport { OnChangePlugin } from \"@lexical/react/LexicalOnChangePlugin\";\nimport { AutoFocusPlugin } from \"@lexical/react/LexicalAutoFocusPlugin\";\nimport { ClearEditorPlugin } from \"@lexical/react/LexicalClearEditorPlugin\";\nimport { RichTextPlugin } from \"@lexical/react/LexicalRichTextPlugin\";\nimport LexicalErrorBoundary from \"@lexical/react/LexicalErrorBoundary\";\nimport { makeComposable } from \"@webiny/react-composition\";\nimport { HistoryPlugin } from \"@lexical/react/LexicalHistoryPlugin\";\nimport { ContentEditable } from \"@lexical/react/LexicalContentEditable\";\nimport { RichTextEditorProvider } from \"~/context/RichTextEditorContext\";\nimport { isValidLexicalData } from \"~/utils/isValidLexicalData\";\nimport { LexicalUpdateStatePlugin } from \"~/plugins/LexicalUpdateStatePlugin\";\nimport { BlurEventPlugin } from \"~/plugins/BlurEventPlugin/BlurEventPlugin\";\nimport { LexicalValue, ThemeEmotionMap, ToolbarActionPlugin } from \"~/types\";\nimport { Placeholder } from \"~/ui/Placeholder\";\nimport { generateInitialLexicalValue } from \"~/utils/generateInitialLexicalValue\";\nimport { webinyEditorTheme, WebinyTheme } from \"~/themes/webinyLexicalTheme\";\nimport { WebinyNodes } from \"~/nodes/webinyNodes\";\nimport { SharedHistoryContext, useSharedHistoryContext } from \"~/context/SharedHistoryContext\";\nimport { useRichTextEditor } from \"~/hooks/useRichTextEditor\";\nimport { toTypographyEmotionMap } from \"~/utils/toTypographyEmotionMap\";\nimport {\n LexicalEditorWithConfig,\n useLexicalEditorConfig\n} from \"~/components/LexicalEditorConfig/LexicalEditorConfig\";\n\nexport interface RichTextEditorProps {\n children?: React.ReactNode | React.ReactNode[];\n classes?: string;\n contentEditableStyles?: React.CSSProperties;\n focus?: boolean;\n height?: number | string;\n nodes?: Klass<LexicalNode>[];\n onBlur?: (editorState: LexicalValue) => void;\n onChange?: (json: LexicalValue) => void;\n placeholder?: string;\n placeholderStyles?: React.CSSProperties;\n staticToolbar?: React.ReactNode;\n styles?: React.CSSProperties;\n tag?: string;\n theme: WebinyTheme;\n themeEmotionMap?: ThemeEmotionMap;\n themeStylesTransformer?: (cssObject: Record<string, any>) => CSSObject;\n toolbar?: React.ReactNode;\n toolbarActionPlugins?: ToolbarActionPlugin[];\n value: LexicalValue | null;\n width?: number | string;\n}\n\nconst BaseRichTextEditor: React.FC<RichTextEditorProps> = ({\n toolbar,\n staticToolbar,\n onChange,\n value,\n nodes,\n placeholder,\n children,\n onBlur,\n focus,\n styles,\n width,\n height,\n theme,\n themeEmotionMap,\n toolbarActionPlugins,\n contentEditableStyles,\n placeholderStyles\n}: RichTextEditorProps) => {\n const config = useLexicalEditorConfig();\n const { historyState } = useSharedHistoryContext();\n const placeholderElem = (\n <Placeholder styles={placeholderStyles}>{placeholder || \"Enter text...\"}</Placeholder>\n );\n const scrollRef = useRef(null);\n const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLElement | undefined>(\n undefined\n );\n const { setTheme, setThemeEmotionMap, setToolbarActionPlugins } = useRichTextEditor();\n\n useEffect(() => {\n setTheme(theme);\n setThemeEmotionMap(themeEmotionMap);\n }, [themeEmotionMap, theme]);\n\n useEffect(() => {\n if (toolbarActionPlugins) {\n setToolbarActionPlugins(toolbarActionPlugins || []);\n }\n }, [toolbarActionPlugins]);\n\n const onRef = (_floatingAnchorElem: HTMLDivElement) => {\n if (_floatingAnchorElem !== null) {\n setFloatingAnchorElem(_floatingAnchorElem);\n }\n };\n\n const sizeStyle = {\n height: height || \"\",\n width: width || \"\"\n };\n\n const configNodes = config.nodes.map(node => node.node);\n const configPlugins = config.plugins.map(plugin => (\n <Fragment key={plugin.name}>{plugin.element}</Fragment>\n ));\n\n const initialConfig = {\n editorState: isValidLexicalData(value) ? value : generateInitialLexicalValue(),\n namespace: \"webiny\",\n onError: (error: Error) => {\n throw error;\n },\n nodes: [...WebinyNodes, ...configNodes, ...(nodes || [])],\n theme: { ...webinyEditorTheme, emotionMap: themeEmotionMap }\n };\n\n function handleOnChange(editorState: EditorState, editor: LexicalEditor) {\n editorState.read(() => {\n if (typeof onChange === \"function\") {\n const editorState = editor.getEditorState();\n onChange(JSON.stringify(editorState.toJSON()));\n }\n });\n }\n\n return (\n /**\n * Once the LexicalComposer is mounted, it caches the `initialConfig` internally, and all future\n * updates to the config will be ignored. This is a problem because we pull in Nodes from our config,\n * and initially, there can be multiple re-renders, while the config object is settled.\n *\n * To bypass this issue, we generate a naive `key` based on the number of Nodes.\n */\n <LexicalComposer initialConfig={initialConfig} key={initialConfig.nodes.length}>\n <>\n {staticToolbar && staticToolbar}\n <div\n ref={scrollRef}\n style={{ ...styles, ...sizeStyle, overflow: \"auto\", position: \"relative\" }}\n >\n {/* data */}\n <OnChangePlugin onChange={handleOnChange} />\n {value && <LexicalUpdateStatePlugin value={value} />}\n <ClearEditorPlugin />\n <HistoryPlugin externalHistoryState={historyState} />\n {/* Events */}\n {onBlur && <BlurEventPlugin onBlur={onBlur} />}\n {focus && <AutoFocusPlugin />}\n {/* External plugins and components */}\n {configPlugins}\n {children}\n <RichTextPlugin\n contentEditable={\n <div className=\"editor-scroller\" style={{ ...sizeStyle }}>\n <div className=\"editor\" ref={onRef}>\n <ContentEditable\n style={{ outline: 0, ...contentEditableStyles }}\n />\n </div>\n </div>\n }\n placeholder={placeholderElem}\n ErrorBoundary={LexicalErrorBoundary}\n />\n {/* Toolbar */}\n {floatingAnchorElem && toolbar}\n </div>\n </>\n </LexicalComposer>\n );\n};\n\n/**\n * @description Main editor container\n */\nexport const RichTextEditor = makeComposable<RichTextEditorProps>(\"RichTextEditor\", props => {\n return (\n <LexicalEditorWithConfig>\n <RichTextEditorProvider>\n <ClassNames>\n {({ css }) => {\n const themeEmotionMap =\n props?.themeEmotionMap ??\n toTypographyEmotionMap(css, props.theme, props.themeStylesTransformer);\n return (\n <SharedHistoryContext>\n <BaseRichTextEditor {...props} themeEmotionMap={themeEmotionMap} />\n </SharedHistoryContext>\n );\n }}\n </ClassNames>\n </RichTextEditorProvider>\n </LexicalEditorWithConfig>\n );\n});\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAGA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAJ,OAAA;AACA,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AVC,GAAG,GAAAF,KAAA,CAAHE,GAAG;IACH,IAAMzF,eAAe,IAAAwF,qBAAA,GACjBL,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEnF,eAAe,cAAAwF,qBAAA,cAAAA,qBAAA,GACtB,IAAAE,8CAAsB,EAACD,GAAG,EAAEN,KAAK,CAACpF,KAAK,EAAEoF,KAAK,CAACQ,sBAAsB,CAAC;IAC1E,oBACIpI,MAAA,CAAAmD,OAAA,CAAAC,aAAA,CAAC9B,qBAAA,CAAA+G,oBAAoB,qBACjBrI,MAAA,CAAAmD,OAAA,CAAAC,aAAA,CAAC1B,kBAAkB,EAAA4G,MAAA,CAAAC,MAAA,KAAKX,KAAK;MAAEnF,eAAe,EAAEA;IAAgB,EAAE,CAChD,CAAC;EAE/B,CACQ,CACQ,CACH,CAAC;AAElC,CAAC,CAAC;AAAC+F,OAAA,CAAAd,cAAA,GAAAA,cAAA"}
@@ -249,6 +249,4 @@ function ImageComponent(_ref2) {
249
249
  onResizeEnd: onResizeEnd,
250
250
  captionsEnabled: captionsEnabled
251
251
  })));
252
- }
253
-
254
- //# sourceMappingURL=ImageComponent.js.map
252
+ }
@@ -70,6 +70,4 @@ function useLexicalEditorConfig() {
70
70
  plugins: config.plugins || [],
71
71
  nodes: config.nodes || []
72
72
  };
73
- }
74
-
75
- //# sourceMappingURL=LexicalEditorConfig.js.map
73
+ }
@@ -35,6 +35,4 @@ var Node = function Node(_ref) {
35
35
  value: node
36
36
  }) : null);
37
37
  };
38
- exports.Node = Node;
39
-
40
- //# sourceMappingURL=Node.js.map
38
+ exports.Node = Node;
@@ -35,6 +35,4 @@ var Plugin = function Plugin(_ref) {
35
35
  value: element
36
36
  }) : null);
37
37
  };
38
- exports.Plugin = Plugin;
39
-
40
- //# sourceMappingURL=Plugin.js.map
38
+ exports.Plugin = Plugin;
@@ -35,6 +35,4 @@ var ToolbarElement = function ToolbarElement(_ref) {
35
35
  value: element
36
36
  }) : null);
37
37
  };
38
- exports.ToolbarElement = ToolbarElement;
39
-
40
- //# sourceMappingURL=ToolbarElement.js.map
38
+ exports.ToolbarElement = ToolbarElement;
@@ -64,6 +64,4 @@ var LexicalHtmlRenderer = function LexicalHtmlRenderer(props) {
64
64
  }));
65
65
  });
66
66
  };
67
- exports.LexicalHtmlRenderer = LexicalHtmlRenderer;
68
-
69
- //# sourceMappingURL=LexicalHtmlRenderer.js.map
67
+ exports.LexicalHtmlRenderer = LexicalHtmlRenderer;
@@ -98,6 +98,4 @@ var StaticToolbar = function StaticToolbar() {
98
98
  editor: editor
99
99
  });
100
100
  };
101
- exports.StaticToolbar = StaticToolbar;
102
-
103
- //# sourceMappingURL=StaticToolbar.js.map
101
+ exports.StaticToolbar = StaticToolbar;
@@ -200,6 +200,4 @@ var Toolbar = function Toolbar(_ref5) {
200
200
  anchorElem: anchorElem
201
201
  });
202
202
  };
203
- exports.Toolbar = Toolbar;
204
-
205
- //# sourceMappingURL=Toolbar.js.map
203
+ exports.Toolbar = Toolbar;
@@ -40,6 +40,4 @@ var BoldAction = function BoldAction() {
40
40
  className: "format bold"
41
41
  }));
42
42
  };
43
- exports.BoldAction = BoldAction;
44
-
45
- //# sourceMappingURL=BoldAction.js.map
43
+ exports.BoldAction = BoldAction;
@@ -53,6 +53,4 @@ var BulletListAction = function BulletListAction() {
53
53
  className: "icon bullet-list"
54
54
  }));
55
55
  };
56
- exports.BulletListAction = BulletListAction;
57
-
58
- //# sourceMappingURL=BulletListAction.js.map
56
+ exports.BulletListAction = BulletListAction;
@@ -40,6 +40,4 @@ var CodeHighlightAction = function CodeHighlightAction() {
40
40
  className: "format code"
41
41
  }));
42
42
  };
43
- exports.CodeHighlightAction = CodeHighlightAction;
44
-
45
- //# sourceMappingURL=CodeHighlightAction.js.map
43
+ exports.CodeHighlightAction = CodeHighlightAction;
@@ -80,6 +80,4 @@ exports.FontColorAction = FontColorAction;
80
80
  {
81
81
  /* Color picker dropdown settings */
82
82
  }
83
- FontColorAction.ColorPicker = FontActionColorPicker;
84
-
85
- //# sourceMappingURL=FontColorAction.js.map
83
+ FontColorAction.ColorPicker = FontActionColorPicker;
@@ -98,6 +98,4 @@ var FontSizeAction = function FontSizeAction() {
98
98
  editor: editor
99
99
  }));
100
100
  };
101
- exports.FontSizeAction = FontSizeAction;
102
-
103
- //# sourceMappingURL=FontSizeAction.js.map
101
+ exports.FontSizeAction = FontSizeAction;
@@ -50,6 +50,4 @@ var ImageAction = function ImageAction() {
50
50
  className: "icon insert-image"
51
51
  }));
52
52
  };
53
- exports.ImageAction = ImageAction;
54
-
55
- //# sourceMappingURL=ImageAction.js.map
53
+ exports.ImageAction = ImageAction;
@@ -40,6 +40,4 @@ var ItalicAction = function ItalicAction() {
40
40
  className: "format italic"
41
41
  }));
42
42
  };
43
- exports.ItalicAction = ItalicAction;
44
-
45
- //# sourceMappingURL=ItalicAction.js.map
43
+ exports.ItalicAction = ItalicAction;
@@ -61,6 +61,4 @@ var LinkAction = function LinkAction() {
61
61
  className: "format link"
62
62
  }));
63
63
  };
64
- exports.LinkAction = LinkAction;
65
-
66
- //# sourceMappingURL=LinkAction.js.map
64
+ exports.LinkAction = LinkAction;
@@ -67,6 +67,4 @@ var NumberedListAction = function NumberedListAction() {
67
67
  className: "icon numbered-list"
68
68
  }));
69
69
  };
70
- exports.NumberedListAction = NumberedListAction;
71
-
72
- //# sourceMappingURL=NumberedListAction.js.map
70
+ exports.NumberedListAction = NumberedListAction;
@@ -49,6 +49,4 @@ var QuoteAction = function QuoteAction() {
49
49
  className: "icon quote"
50
50
  }));
51
51
  };
52
- exports.QuoteAction = QuoteAction;
53
-
54
- //# sourceMappingURL=QuoteAction.js.map
52
+ exports.QuoteAction = QuoteAction;
@@ -67,6 +67,4 @@ var TextAlignmentAction = function TextAlignmentAction() {
67
67
  }, /*#__PURE__*/_react.default.createElement(BaseTextAlignmentDropDown, null));
68
68
  };
69
69
  exports.TextAlignmentAction = TextAlignmentAction;
70
- TextAlignmentAction.TextAlignmentDropDown = TextAlignmentActionDropDown;
71
-
72
- //# sourceMappingURL=TextAlignmentAction.js.map
70
+ TextAlignmentAction.TextAlignmentDropDown = TextAlignmentActionDropDown;
@@ -142,6 +142,4 @@ exports.TypographyAction = TypographyAction;
142
142
  {
143
143
  /* Typography dropdown settings */
144
144
  }
145
- TypographyAction.TypographyDropDown = TypographyActionDropDown;
146
-
147
- //# sourceMappingURL=TypographyAction.js.map
145
+ TypographyAction.TypographyDropDown = TypographyActionDropDown;
@@ -40,6 +40,4 @@ var UnderlineAction = function UnderlineAction() {
40
40
  className: "format underline"
41
41
  }));
42
42
  };
43
- exports.UnderlineAction = UnderlineAction;
44
-
45
- //# sourceMappingURL=UnderlineAction.js.map
43
+ exports.UnderlineAction = UnderlineAction;
@@ -7,6 +7,4 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.FontColorActionContext = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var FontColorActionContext = /*#__PURE__*/_react.default.createContext(undefined);
10
- exports.FontColorActionContext = FontColorActionContext;
11
-
12
- //# sourceMappingURL=FontColorActionContext.js.map
10
+ exports.FontColorActionContext = FontColorActionContext;
@@ -71,6 +71,4 @@ var RichTextEditorProvider = function RichTextEditorProvider(_ref) {
71
71
  }
72
72
  }, children);
73
73
  };
74
- exports.RichTextEditorProvider = RichTextEditorProvider;
75
-
76
- //# sourceMappingURL=RichTextEditorContext.js.map
74
+ exports.RichTextEditorProvider = RichTextEditorProvider;
@@ -23,6 +23,4 @@ exports.SharedHistoryContext = SharedHistoryContext;
23
23
  var useSharedHistoryContext = function useSharedHistoryContext() {
24
24
  return (0, React.useContext)(Context);
25
25
  };
26
- exports.useSharedHistoryContext = useSharedHistoryContext;
27
-
28
- //# sourceMappingURL=SharedHistoryContext.js.map
26
+ exports.useSharedHistoryContext = useSharedHistoryContext;
@@ -7,6 +7,4 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.TextAlignmentActionContext = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var TextAlignmentActionContext = /*#__PURE__*/_react.default.createContext(undefined);
10
- exports.TextAlignmentActionContext = TextAlignmentActionContext;
11
-
12
- //# sourceMappingURL=TextAlignmentActionContextProps.js.map
10
+ exports.TextAlignmentActionContext = TextAlignmentActionContext;
@@ -7,6 +7,4 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.TypographyActionContext = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var TypographyActionContext = /*#__PURE__*/_react.default.createContext(undefined);
10
- exports.TypographyActionContext = TypographyActionContext;
11
-
12
- //# sourceMappingURL=TypographyActionContext.js.map
10
+ exports.TypographyActionContext = TypographyActionContext;
@@ -12,6 +12,4 @@ function useFontColorPicker() {
12
12
  throw Error("Missing FontColorActionContext in the component hierarchy. Are you using \"useFontColorPicker()\" in the right place?");
13
13
  }
14
14
  return context;
15
- }
16
-
17
- //# sourceMappingURL=useFontColorPicker.js.map
15
+ }
package/hooks/useList.js CHANGED
@@ -50,6 +50,4 @@ function useList(editor) {
50
50
  return false;
51
51
  }, _lexical.COMMAND_PRIORITY_LOW));
52
52
  }, [editor]);
53
- }
54
-
55
- //# sourceMappingURL=useList.js.map
53
+ }
package/hooks/useQuote.js CHANGED
@@ -17,6 +17,4 @@ function useQuote(editor) {
17
17
  return false;
18
18
  }, _lexical.COMMAND_PRIORITY_LOW));
19
19
  }, [editor]);
20
- }
21
-
22
- //# sourceMappingURL=useQuote.js.map
20
+ }
@@ -12,6 +12,4 @@ function useRichTextEditor() {
12
12
  throw Error("Missing RichTextEditorContext in the component hierarchy. Are you using \"useRichTextEditor()\" in the right place?");
13
13
  }
14
14
  return context;
15
- }
16
-
17
- //# sourceMappingURL=useRichTextEditor.js.map
15
+ }
@@ -12,6 +12,4 @@ function useTextAlignmentAction() {
12
12
  throw Error("Missing TextAlignmentActionContext in the component hierarchy. Are you using \"useTextAlignmentAction()\" in the right place?");
13
13
  }
14
14
  return context;
15
- }
16
-
17
- //# sourceMappingURL=useTextAlignmentAction.js.map
15
+ }
@@ -12,6 +12,4 @@ function useTypographyAction() {
12
12
  throw Error("Missing TypographyActionContext in the component hierarchy. Are you using \"useTypographyAction()\" in the right place?");
13
13
  }
14
14
  return context;
15
- }
16
-
17
- //# sourceMappingURL=useTypographyAction.js.map
15
+ }
package/index.js CHANGED
@@ -298,6 +298,4 @@ var _clearNodeFormating = require("./utils/nodes/clearNodeFormating");
298
298
  var _insertFiles = require("./commands/insertFiles");
299
299
  var _types = _interopRequireWildcard(require("./types"));
300
300
  exports.types = _types;
301
- var _LexicalEditorConfig = require("./components/LexicalEditorConfig/LexicalEditorConfig");
302
-
303
- //# sourceMappingURL=index.js.map
301
+ var _LexicalEditorConfig = require("./components/LexicalEditorConfig/LexicalEditorConfig");
@@ -120,6 +120,4 @@ exports.$isFontColorNode = $isFontColorNode;
120
120
  function $applyStylesToNode(node, nodeStyleProvider) {
121
121
  node.setFormat(nodeStyleProvider.format);
122
122
  node.setStyle(nodeStyleProvider.style);
123
- }
124
-
125
- //# sourceMappingURL=FontColorNode.js.map
123
+ }
@@ -188,6 +188,4 @@ function $createHeadingNode(tag, typographyStyleId) {
188
188
  }
189
189
  function $isHeadingNode(node) {
190
190
  return node instanceof HeadingNode;
191
- }
192
-
193
- //# sourceMappingURL=HeadingNode.js.map
191
+ }
@@ -203,6 +203,4 @@ function $createImageNode(_ref) {
203
203
  }
204
204
  function $isImageNode(node) {
205
205
  return node instanceof ImageNode;
206
- }
207
-
208
- //# sourceMappingURL=ImageNode.js.map
206
+ }
@@ -444,6 +444,4 @@ function $createListItemNode(checked) {
444
444
  }
445
445
  function $isListItemNode(node) {
446
446
  return node instanceof ListItemNode;
447
- }
448
-
449
- //# sourceMappingURL=ListItemNode.js.map
447
+ }
@@ -444,6 +444,4 @@ function $handleListInsertParagraph() {
444
444
  // Don't leave hanging nested empty lists
445
445
  (0, _listNode.$removeHighestEmptyListParent)(anchor);
446
446
  return true;
447
- }
448
-
449
- //# sourceMappingURL=formatList.js.map
447
+ }