@webiny/lexical-editor 0.0.0-unstable.13771d80a8

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 (210) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -0
  3. package/components/AddRichTextEditorNodeType.d.ts +6 -0
  4. package/components/AddRichTextEditorNodeType.js +28 -0
  5. package/components/AddRichTextEditorNodeType.js.map +1 -0
  6. package/components/AddRichTextEditorPlugin.d.ts +12 -0
  7. package/components/AddRichTextEditorPlugin.js +33 -0
  8. package/components/AddRichTextEditorPlugin.js.map +1 -0
  9. package/components/AddToolbarAction.d.ts +7 -0
  10. package/components/AddToolbarAction.js +33 -0
  11. package/components/AddToolbarAction.js.map +1 -0
  12. package/components/Editor/HeadingEditor.d.ts +7 -0
  13. package/components/Editor/HeadingEditor.js +28 -0
  14. package/components/Editor/HeadingEditor.js.map +1 -0
  15. package/components/Editor/ParagraphEditor.d.ts +7 -0
  16. package/components/Editor/ParagraphEditor.js +30 -0
  17. package/components/Editor/ParagraphEditor.js.map +1 -0
  18. package/components/Editor/RichTextEditor.d.ts +25 -0
  19. package/components/Editor/RichTextEditor.js +112 -0
  20. package/components/Editor/RichTextEditor.js.map +1 -0
  21. package/components/LexicalEditorConfig/LexicalEditorConfig.d.ts +7 -0
  22. package/components/LexicalEditorConfig/LexicalEditorConfig.js +15 -0
  23. package/components/LexicalEditorConfig/LexicalEditorConfig.js.map +1 -0
  24. package/components/LexicalHtmlRenderer.d.ts +11 -0
  25. package/components/LexicalHtmlRenderer.js +48 -0
  26. package/components/LexicalHtmlRenderer.js.map +1 -0
  27. package/components/Toolbar/HeadingToolbar.d.ts +12 -0
  28. package/components/Toolbar/HeadingToolbar.js +23 -0
  29. package/components/Toolbar/HeadingToolbar.js.map +1 -0
  30. package/components/Toolbar/ParagraphToolbar.d.ts +12 -0
  31. package/components/Toolbar/ParagraphToolbar.js +23 -0
  32. package/components/Toolbar/ParagraphToolbar.js.map +1 -0
  33. package/components/Toolbar/Toolbar.css +423 -0
  34. package/components/Toolbar/Toolbar.d.ts +13 -0
  35. package/components/Toolbar/Toolbar.js +161 -0
  36. package/components/Toolbar/Toolbar.js.map +1 -0
  37. package/components/ToolbarActions/BoldAction.d.ts +5 -0
  38. package/components/ToolbarActions/BoldAction.js +38 -0
  39. package/components/ToolbarActions/BoldAction.js.map +1 -0
  40. package/components/ToolbarActions/BulletListAction.d.ts +5 -0
  41. package/components/ToolbarActions/BulletListAction.js +89 -0
  42. package/components/ToolbarActions/BulletListAction.js.map +1 -0
  43. package/components/ToolbarActions/CodeHighlightAction.d.ts +6 -0
  44. package/components/ToolbarActions/CodeHighlightAction.js +39 -0
  45. package/components/ToolbarActions/CodeHighlightAction.js.map +1 -0
  46. package/components/ToolbarActions/FontColorAction.d.ts +11 -0
  47. package/components/ToolbarActions/FontColorAction.js +88 -0
  48. package/components/ToolbarActions/FontColorAction.js.map +1 -0
  49. package/components/ToolbarActions/FontSizeAction.d.ts +2 -0
  50. package/components/ToolbarActions/FontSizeAction.js +104 -0
  51. package/components/ToolbarActions/FontSizeAction.js.map +1 -0
  52. package/components/ToolbarActions/ItalicAction.d.ts +5 -0
  53. package/components/ToolbarActions/ItalicAction.js +38 -0
  54. package/components/ToolbarActions/ItalicAction.js.map +1 -0
  55. package/components/ToolbarActions/LinkAction.d.ts +7 -0
  56. package/components/ToolbarActions/LinkAction.js +69 -0
  57. package/components/ToolbarActions/LinkAction.js.map +1 -0
  58. package/components/ToolbarActions/NumberedListAction.d.ts +5 -0
  59. package/components/ToolbarActions/NumberedListAction.js +89 -0
  60. package/components/ToolbarActions/NumberedListAction.js.map +1 -0
  61. package/components/ToolbarActions/QuoteAction.d.ts +4 -0
  62. package/components/ToolbarActions/QuoteAction.js +66 -0
  63. package/components/ToolbarActions/QuoteAction.js.map +1 -0
  64. package/components/ToolbarActions/UnderlineAction.d.ts +5 -0
  65. package/components/ToolbarActions/UnderlineAction.js +38 -0
  66. package/components/ToolbarActions/UnderlineAction.js.map +1 -0
  67. package/components/ToolbarPresets/HeadingToolbarPreset.d.ts +2 -0
  68. package/components/ToolbarPresets/HeadingToolbarPreset.js +48 -0
  69. package/components/ToolbarPresets/HeadingToolbarPreset.js.map +1 -0
  70. package/components/ToolbarPresets/ParagraphToolbarPreset.d.ts +2 -0
  71. package/components/ToolbarPresets/ParagraphToolbarPreset.js +63 -0
  72. package/components/ToolbarPresets/ParagraphToolbarPreset.js.map +1 -0
  73. package/context/FontColorActionContext.d.ts +6 -0
  74. package/context/FontColorActionContext.js +10 -0
  75. package/context/FontColorActionContext.js.map +1 -0
  76. package/context/RichTextEditorContext.d.ts +11 -0
  77. package/context/RichTextEditorContext.js +29 -0
  78. package/context/RichTextEditorContext.js.map +1 -0
  79. package/hooks/useFontColorPicker.d.ts +2 -0
  80. package/hooks/useFontColorPicker.js +15 -0
  81. package/hooks/useFontColorPicker.js.map +1 -0
  82. package/hooks/useRichTextEditor.d.ts +2 -0
  83. package/hooks/useRichTextEditor.js +15 -0
  84. package/hooks/useRichTextEditor.js.map +1 -0
  85. package/images/icons/LICENSE.md +5 -0
  86. package/images/icons/chat-square-quote.svg +1 -0
  87. package/images/icons/chevron-down.svg +1 -0
  88. package/images/icons/code.svg +1 -0
  89. package/images/icons/font-color.svg +1 -0
  90. package/images/icons/link.svg +1 -0
  91. package/images/icons/list-ol.svg +1 -0
  92. package/images/icons/list-ul.svg +1 -0
  93. package/images/icons/pencil-fill.svg +1 -0
  94. package/images/icons/text-center.svg +1 -0
  95. package/images/icons/text-left.svg +1 -0
  96. package/images/icons/text-paragraph.svg +1 -0
  97. package/images/icons/text-right.svg +1 -0
  98. package/images/icons/type-bold.svg +1 -0
  99. package/images/icons/type-h1.svg +1 -0
  100. package/images/icons/type-h2.svg +1 -0
  101. package/images/icons/type-h3.svg +1 -0
  102. package/images/icons/type-h4.svg +1 -0
  103. package/images/icons/type-h5.svg +1 -0
  104. package/images/icons/type-h6.svg +1 -0
  105. package/images/icons/type-italic.svg +1 -0
  106. package/images/icons/type-strikethrough.svg +1 -0
  107. package/images/icons/type-underline.svg +1 -0
  108. package/images/icons/unlink_icon.svg +1 -0
  109. package/index.d.ts +37 -0
  110. package/index.js +260 -0
  111. package/index.js.map +1 -0
  112. package/nodes/FontColorNode.d.ts +43 -0
  113. package/nodes/FontColorNode.js +127 -0
  114. package/nodes/FontColorNode.js.map +1 -0
  115. package/nodes/webinyNodes.d.ts +2 -0
  116. package/nodes/webinyNodes.js +16 -0
  117. package/nodes/webinyNodes.js.map +1 -0
  118. package/package.json +38 -0
  119. package/plugins/AutoLinkPlugin/AutoLinkPlugin.d.ts +11 -0
  120. package/plugins/AutoLinkPlugin/AutoLinkPlugin.js +46 -0
  121. package/plugins/AutoLinkPlugin/AutoLinkPlugin.js.map +1 -0
  122. package/plugins/AutoLinkPlugin/index.d.ts +1 -0
  123. package/plugins/AutoLinkPlugin/index.js +16 -0
  124. package/plugins/AutoLinkPlugin/index.js.map +1 -0
  125. package/plugins/BlurEventPlugin/BlurEventPlugin.d.ts +7 -0
  126. package/plugins/BlurEventPlugin/BlurEventPlugin.js +28 -0
  127. package/plugins/BlurEventPlugin/BlurEventPlugin.js.map +1 -0
  128. package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.d.ts +17 -0
  129. package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.js +88 -0
  130. package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.js.map +1 -0
  131. package/plugins/ClickableLinkPlugin/index.d.ts +1 -0
  132. package/plugins/ClickableLinkPlugin/index.js +16 -0
  133. package/plugins/ClickableLinkPlugin/index.js.map +1 -0
  134. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.d.ts +1 -0
  135. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js +20 -0
  136. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js.map +1 -0
  137. package/plugins/CodeHighlightPlugin/index.d.ts +1 -0
  138. package/plugins/CodeHighlightPlugin/index.js +16 -0
  139. package/plugins/CodeHighlightPlugin/index.js.map +1 -0
  140. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.css +118 -0
  141. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.d.ts +7 -0
  142. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js +222 -0
  143. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js.map +1 -0
  144. package/plugins/FloatingLinkEditorPlugin/index.d.ts +1 -0
  145. package/plugins/FloatingLinkEditorPlugin/index.js +16 -0
  146. package/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
  147. package/plugins/FontColorPlugin/FontColorPlugin.d.ts +2 -0
  148. package/plugins/FontColorPlugin/FontColorPlugin.js +38 -0
  149. package/plugins/FontColorPlugin/FontColorPlugin.js.map +1 -0
  150. package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.d.ts +8 -0
  151. package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.js +34 -0
  152. package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.js.map +1 -0
  153. package/plugins/LexicalUpdateStatePlugin/index.d.ts +1 -0
  154. package/plugins/LexicalUpdateStatePlugin/index.js +16 -0
  155. package/plugins/LexicalUpdateStatePlugin/index.js.map +1 -0
  156. package/themes/webinyLexicalTheme.css +422 -0
  157. package/themes/webinyLexicalTheme.d.ts +7 -0
  158. package/themes/webinyLexicalTheme.js +86 -0
  159. package/themes/webinyLexicalTheme.js.map +1 -0
  160. package/types.d.ts +3 -0
  161. package/types.js +12 -0
  162. package/types.js.map +1 -0
  163. package/ui/Divider.d.ts +2 -0
  164. package/ui/Divider.js +13 -0
  165. package/ui/Divider.js.map +1 -0
  166. package/ui/DropDown.d.ts +26 -0
  167. package/ui/DropDown.js +173 -0
  168. package/ui/DropDown.js.map +1 -0
  169. package/ui/Input.css +32 -0
  170. package/ui/LinkPreview.css +69 -0
  171. package/ui/LinkPreview.d.ts +12 -0
  172. package/ui/LinkPreview.js +101 -0
  173. package/ui/LinkPreview.js.map +1 -0
  174. package/ui/Placeholder.css +23 -0
  175. package/ui/Placeholder.d.ts +13 -0
  176. package/ui/Placeholder.js +24 -0
  177. package/ui/Placeholder.js.map +1 -0
  178. package/ui/TextInput.d.ts +18 -0
  179. package/ui/TextInput.js +39 -0
  180. package/ui/TextInput.js.map +1 -0
  181. package/ui/ToolbarActionDialog.d.ts +12 -0
  182. package/ui/ToolbarActionDialog.js +107 -0
  183. package/ui/ToolbarActionDialog.js.map +1 -0
  184. package/utils/generateInitialLexicalValue.d.ts +5 -0
  185. package/utils/generateInitialLexicalValue.js +29 -0
  186. package/utils/generateInitialLexicalValue.js.map +1 -0
  187. package/utils/getDOMRangeRect.d.ts +10 -0
  188. package/utils/getDOMRangeRect.js +27 -0
  189. package/utils/getDOMRangeRect.js.map +1 -0
  190. package/utils/getSelectedNode.d.ts +2 -0
  191. package/utils/getSelectedNode.js +30 -0
  192. package/utils/getSelectedNode.js.map +1 -0
  193. package/utils/isValidJSON.d.ts +1 -0
  194. package/utils/isValidJSON.js +18 -0
  195. package/utils/isValidJSON.js.map +1 -0
  196. package/utils/isValidLexicalData.d.ts +2 -0
  197. package/utils/isValidLexicalData.js +24 -0
  198. package/utils/isValidLexicalData.js.map +1 -0
  199. package/utils/point.d.ts +21 -0
  200. package/utils/point.js +77 -0
  201. package/utils/point.js.map +1 -0
  202. package/utils/rect.d.ts +47 -0
  203. package/utils/rect.js +169 -0
  204. package/utils/rect.js.map +1 -0
  205. package/utils/sanitizeUrl.d.ts +8 -0
  206. package/utils/sanitizeUrl.js +27 -0
  207. package/utils/sanitizeUrl.js.map +1 -0
  208. package/utils/setFloatingElemPosition.d.ts +3 -0
  209. package/utils/setFloatingElemPosition.js +40 -0
  210. package/utils/setFloatingElemPosition.js.map +1 -0
@@ -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,8 @@
1
+ import { FC } from "react";
2
+ import { LexicalValue } from "../../types";
3
+ interface LexicalUpdateStatePlugin {
4
+ value: LexicalValue | null;
5
+ readOnly?: boolean;
6
+ }
7
+ export declare const LexicalUpdateStatePlugin: FC<LexicalUpdateStatePlugin>;
8
+ export {};
@@ -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,422 @@
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
+
210
+
211
+ .WebinyLexical__tableAddRows:hover {
212
+ background-color: #c9dbf0;
213
+ }
214
+ @keyframes table-controls {
215
+ 0% {
216
+ opacity: 0;
217
+ }
218
+ 100% {
219
+ opacity: 1;
220
+ }
221
+ }
222
+ .WebinyLexical__tableCellResizeRuler {
223
+ display: block;
224
+ position: absolute;
225
+ width: 1px;
226
+ background-color: rgb(60, 132, 244);
227
+ height: 100%;
228
+ top: 0;
229
+ }
230
+ .WebinyLexical__tableCellActionButtonContainer {
231
+ display: block;
232
+ right: 5px;
233
+ top: 6px;
234
+ position: absolute;
235
+ z-index: 4;
236
+ width: 20px;
237
+ height: 20px;
238
+ }
239
+ .WebinyLexical__tableCellActionButton {
240
+ background-color: #eee;
241
+ display: block;
242
+ border: 0;
243
+ border-radius: 20px;
244
+ width: 20px;
245
+ height: 20px;
246
+ color: #222;
247
+ cursor: pointer;
248
+ }
249
+ .WebinyLexical__tableCellActionButton:hover {
250
+ background-color: #ddd;
251
+ }
252
+ .WebinyLexical__characterLimit {
253
+ display: inline;
254
+ background-color: #ffbbbb !important;
255
+ }
256
+ .WebinyLexical__ol1 {
257
+ list-style: auto;
258
+ padding: 0;
259
+ margin: 0;
260
+ margin-left: 16px;
261
+ list-style-position: inside;
262
+ }
263
+ .WebinyLexical__ol2 {
264
+ list-style: initial;
265
+ padding: 0;
266
+ margin: 0;
267
+ margin-left: 16px;
268
+ list-style-type: upper-alpha;
269
+ list-style-position: inside;
270
+ }
271
+ .WebinyLexical__ol3 {
272
+ list-style: initial;
273
+ list-style: auto;
274
+ padding: 0;
275
+ margin: 0;
276
+ margin-left: 16px;
277
+ list-style-type: lower-alpha;
278
+ list-style-position: inside;
279
+ }
280
+ .WebinyLexical__ol4 {
281
+ list-style: initial;
282
+ padding: 0;
283
+ margin: 0;
284
+ margin-left: 16px;
285
+ list-style-type: upper-roman;
286
+ list-style-position: inside;
287
+ }
288
+ .WebinyLexical__ol5 {
289
+ list-style: initial;
290
+ padding: 0;
291
+ margin: 0;
292
+ margin-left: 16px;
293
+ list-style-type: lower-roman;
294
+ list-style-position: inside;
295
+ }
296
+ .WebinyLexical__ul {
297
+ list-style: initial;
298
+ padding: 0;
299
+ margin: 0;
300
+ margin-left: 16px;
301
+ list-style-position: inside;
302
+ }
303
+ .WebinyLexical__listItem {
304
+ margin: 0 32px;
305
+ }
306
+ .WebinyLexical__listItemChecked,
307
+ .WebinyLexical__listItemUnchecked {
308
+ position: relative;
309
+ margin-left: 8px;
310
+ margin-right: 8px;
311
+ padding-left: 24px;
312
+ padding-right: 24px;
313
+ list-style-type: none;
314
+ outline: none;
315
+ }
316
+ .WebinyLexical__listItemChecked {
317
+ text-decoration: line-through;
318
+ }
319
+ .WebinyLexical__listItemUnchecked:before,
320
+ .WebinyLexical__listItemChecked:before {
321
+ content: '';
322
+ width: 16px;
323
+ height: 16px;
324
+ top: 2px;
325
+ left: 0;
326
+ cursor: pointer;
327
+ display: block;
328
+ background-size: cover;
329
+ position: absolute;
330
+ }
331
+ .WebinyLexical__listItemUnchecked[dir='rtl']:before,
332
+ .WebinyLexical__listItemChecked[dir='rtl']:before {
333
+ left: auto;
334
+ right: 0;
335
+ }
336
+ .WebinyLexical__listItemUnchecked:focus:before,
337
+ .WebinyLexical__listItemChecked:focus:before {
338
+ box-shadow: 0 0 0 2px #a6cdfe;
339
+ border-radius: 2px;
340
+ }
341
+ .WebinyLexical__listItemUnchecked:before {
342
+ border: 1px solid #999;
343
+ border-radius: 2px;
344
+ }
345
+ .WebinyLexical__listItemChecked:before {
346
+ border: 1px solid rgb(61, 135, 245);
347
+ border-radius: 2px;
348
+ background-color: #3d87f5;
349
+ background-repeat: no-repeat;
350
+ }
351
+ .WebinyLexical__listItemChecked:after {
352
+ content: '';
353
+ cursor: pointer;
354
+ border-color: #fff;
355
+ border-style: solid;
356
+ position: absolute;
357
+ display: block;
358
+ top: 6px;
359
+ width: 3px;
360
+ left: 7px;
361
+ height: 6px;
362
+ transform: rotate(45deg);
363
+ border-width: 0 2px 2px 0;
364
+ }
365
+ .WebinyLexical__nestedListItem {
366
+ list-style-type: none;
367
+ }
368
+ .WebinyLexical__nestedListItem:before,
369
+ .WebinyLexical__nestedListItem:after {
370
+ display: none;
371
+ }
372
+ .WebinyLexical__tokenComment {
373
+ color: slategray;
374
+ }
375
+ .WebinyLexical__tokenPunctuation {
376
+ color: #999;
377
+ }
378
+ .WebinyLexical__tokenProperty {
379
+ color: #905;
380
+ }
381
+ .WebinyLexical__tokenSelector {
382
+ color: #690;
383
+ }
384
+ .WebinyLexical__tokenOperator {
385
+ color: #9a6e3a;
386
+ }
387
+ .WebinyLexical__tokenAttr {
388
+ color: #07a;
389
+ }
390
+ .WebinyLexical__tokenVariable {
391
+ color: #e90;
392
+ }
393
+ .WebinyLexical__tokenFunction {
394
+ color: #dd4a68;
395
+ }
396
+ .WebinyLexical__mark {
397
+ background: rgba(255, 212, 0, 0.14);
398
+ border-bottom: 2px solid rgba(255, 212, 0, 0.3);
399
+ padding-bottom: 2px;
400
+ }
401
+ .WebinyLexical__markOverlap {
402
+ background: rgba(255, 212, 0, 0.3);
403
+ border-bottom: 2px solid rgba(255, 212, 0, 0.7);
404
+ }
405
+ .WebinyLexical__mark.selected {
406
+ background: rgba(255, 212, 0, 0.5);
407
+ border-bottom: 2px solid rgba(255, 212, 0, 1);
408
+ }
409
+ .WebinyLexical__markOverlap.selected {
410
+ background: rgba(255, 212, 0, 0.7);
411
+ border-bottom: 2px solid rgba(255, 212, 0, 0.7);
412
+ }
413
+ .WebinyLexical__embedBlock {
414
+ user-select: none;
415
+ }
416
+ .WebinyLexical__embedBlockFocus {
417
+ outline: 2px solid rgb(60, 132, 244);
418
+ }
419
+
420
+ .WebinyLexical__placeholder {
421
+ text-align: left;
422
+ }
@@ -0,0 +1,7 @@
1
+ import type { EditorThemeClasses } from "lexical";
2
+ import "./webinyLexicalTheme.css";
3
+ export declare type WebinyTheme = {
4
+ styles?: Record<string, any>;
5
+ };
6
+ export declare type WebinyEditorTheme = WebinyTheme & EditorThemeClasses;
7
+ export declare const webinyEditorTheme: WebinyEditorTheme;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.webinyEditorTheme = void 0;
7
+ require("./webinyLexicalTheme.css");
8
+ var webinyEditorTheme = {
9
+ styles: undefined,
10
+ characterLimit: "WebinyLexical__characterLimit",
11
+ code: "WebinyLexical__code",
12
+ codeHighlight: {
13
+ atrule: "WebinyLexical__tokenAttr",
14
+ attr: "WebinyLexical__tokenAttr",
15
+ boolean: "WebinyLexical__tokenProperty",
16
+ builtin: "WebinyLexical__tokenSelector",
17
+ cdata: "WebinyLexical__tokenComment",
18
+ char: "WebinyLexical__tokenSelector",
19
+ class: "WebinyLexical__tokenFunction",
20
+ "class-name": "WebinyLexical__tokenFunction",
21
+ comment: "WebinyLexical__tokenComment",
22
+ constant: "WebinyLexical__tokenProperty",
23
+ deleted: "WebinyLexical__tokenProperty",
24
+ doctype: "WebinyLexical__tokenComment",
25
+ entity: "WebinyLexical__tokenOperator",
26
+ function: "WebinyLexical__tokenFunction",
27
+ important: "WebinyLexical__tokenVariable",
28
+ inserted: "WebinyLexical__tokenSelector",
29
+ keyword: "WebinyLexical__tokenAttr",
30
+ namespace: "WebinyLexical__tokenVariable",
31
+ number: "WebinyLexical__tokenProperty",
32
+ operator: "WebinyLexical__tokenOperator",
33
+ prolog: "WebinyLexical__tokenComment",
34
+ property: "WebinyLexical__tokenProperty",
35
+ punctuation: "WebinyLexical__tokenPunctuation",
36
+ regex: "WebinyLexical__tokenVariable",
37
+ selector: "WebinyLexical__tokenSelector",
38
+ string: "WebinyLexical__tokenSelector",
39
+ symbol: "WebinyLexical__tokenProperty",
40
+ tag: "WebinyLexical__tokenProperty",
41
+ url: "WebinyLexical__tokenOperator",
42
+ variable: "WebinyLexical__tokenVariable"
43
+ },
44
+ embedBlock: {
45
+ base: "WebinyLexical__embedBlock",
46
+ focus: "WebinyLexical__embedBlockFocus"
47
+ },
48
+ hashtag: "WebinyLexical__hashtag",
49
+ heading: {
50
+ h1: "WebinyLexical__h1",
51
+ h2: "WebinyLexical__h2",
52
+ h3: "WebinyLexical__h3",
53
+ h4: "WebinyLexical__h4",
54
+ h5: "WebinyLexical__h5",
55
+ h6: "WebinyLexical__h6"
56
+ },
57
+ link: "WebinyLexical__link",
58
+ list: {
59
+ listitem: "WebinyLexical__listItem",
60
+ listitemChecked: "WebinyLexical__listItemChecked",
61
+ listitemUnchecked: "WebinyLexical__listItemUnchecked",
62
+ nested: {
63
+ listitem: "WebinyLexical__nestedListItem"
64
+ },
65
+ olDepth: ["WebinyLexical__ol1", "WebinyLexical__ol2", "WebinyLexical__ol3", "WebinyLexical__ol4", "WebinyLexical__ol5"],
66
+ ul: "WebinyLexical__ul"
67
+ },
68
+ ltr: "WebinyLexical__ltr",
69
+ mark: "WebinyLexical__mark",
70
+ markOverlap: "WebinyLexical__markOverlap",
71
+ paragraph: "WebinyLexical__paragraph",
72
+ quote: "WebinyLexical__quote",
73
+ rtl: "WebinyLexical__rtl",
74
+ text: {
75
+ bold: "WebinyLexical__textBold",
76
+ code: "WebinyLexical__textCode",
77
+ italic: "WebinyLexical__textItalic",
78
+ strikethrough: "WebinyLexical__textStrikethrough",
79
+ subscript: "WebinyLexical__textSubscript",
80
+ superscript: "WebinyLexical__textSuperscript",
81
+ underline: "WebinyLexical__textUnderline",
82
+ underlineStrikethrough: "WebinyLexical__textUnderlineStrikethrough"
83
+ },
84
+ fontColorText: "WebinyLexical__fontColorText"
85
+ };
86
+ exports.webinyEditorTheme = webinyEditorTheme;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["webinyEditorTheme","styles","undefined","characterLimit","code","codeHighlight","atrule","attr","boolean","builtin","cdata","char","class","comment","constant","deleted","doctype","entity","function","important","inserted","keyword","namespace","number","operator","prolog","property","punctuation","regex","selector","string","symbol","tag","url","variable","embedBlock","base","focus","hashtag","heading","h1","h2","h3","h4","h5","h6","link","list","listitem","listitemChecked","listitemUnchecked","nested","olDepth","ul","ltr","mark","markOverlap","paragraph","quote","rtl","text","bold","italic","strikethrough","subscript","superscript","underline","underlineStrikethrough","fontColorText"],"sources":["webinyLexicalTheme.ts"],"sourcesContent":["import type { EditorThemeClasses } from \"lexical\";\n\nimport \"./webinyLexicalTheme.css\";\n\nexport type WebinyTheme = {\n styles?: Record<string, any>;\n};\n\nexport type WebinyEditorTheme = WebinyTheme & EditorThemeClasses;\n\nexport const webinyEditorTheme: WebinyEditorTheme = {\n styles: undefined,\n characterLimit: \"WebinyLexical__characterLimit\",\n code: \"WebinyLexical__code\",\n codeHighlight: {\n atrule: \"WebinyLexical__tokenAttr\",\n attr: \"WebinyLexical__tokenAttr\",\n boolean: \"WebinyLexical__tokenProperty\",\n builtin: \"WebinyLexical__tokenSelector\",\n cdata: \"WebinyLexical__tokenComment\",\n char: \"WebinyLexical__tokenSelector\",\n class: \"WebinyLexical__tokenFunction\",\n \"class-name\": \"WebinyLexical__tokenFunction\",\n comment: \"WebinyLexical__tokenComment\",\n constant: \"WebinyLexical__tokenProperty\",\n deleted: \"WebinyLexical__tokenProperty\",\n doctype: \"WebinyLexical__tokenComment\",\n entity: \"WebinyLexical__tokenOperator\",\n function: \"WebinyLexical__tokenFunction\",\n important: \"WebinyLexical__tokenVariable\",\n inserted: \"WebinyLexical__tokenSelector\",\n keyword: \"WebinyLexical__tokenAttr\",\n namespace: \"WebinyLexical__tokenVariable\",\n number: \"WebinyLexical__tokenProperty\",\n operator: \"WebinyLexical__tokenOperator\",\n prolog: \"WebinyLexical__tokenComment\",\n property: \"WebinyLexical__tokenProperty\",\n punctuation: \"WebinyLexical__tokenPunctuation\",\n regex: \"WebinyLexical__tokenVariable\",\n selector: \"WebinyLexical__tokenSelector\",\n string: \"WebinyLexical__tokenSelector\",\n symbol: \"WebinyLexical__tokenProperty\",\n tag: \"WebinyLexical__tokenProperty\",\n url: \"WebinyLexical__tokenOperator\",\n variable: \"WebinyLexical__tokenVariable\"\n },\n embedBlock: {\n base: \"WebinyLexical__embedBlock\",\n focus: \"WebinyLexical__embedBlockFocus\"\n },\n hashtag: \"WebinyLexical__hashtag\",\n heading: {\n h1: \"WebinyLexical__h1\",\n h2: \"WebinyLexical__h2\",\n h3: \"WebinyLexical__h3\",\n h4: \"WebinyLexical__h4\",\n h5: \"WebinyLexical__h5\",\n h6: \"WebinyLexical__h6\"\n },\n link: \"WebinyLexical__link\",\n list: {\n listitem: \"WebinyLexical__listItem\",\n listitemChecked: \"WebinyLexical__listItemChecked\",\n listitemUnchecked: \"WebinyLexical__listItemUnchecked\",\n nested: {\n listitem: \"WebinyLexical__nestedListItem\"\n },\n olDepth: [\n \"WebinyLexical__ol1\",\n \"WebinyLexical__ol2\",\n \"WebinyLexical__ol3\",\n \"WebinyLexical__ol4\",\n \"WebinyLexical__ol5\"\n ],\n ul: \"WebinyLexical__ul\"\n },\n ltr: \"WebinyLexical__ltr\",\n mark: \"WebinyLexical__mark\",\n markOverlap: \"WebinyLexical__markOverlap\",\n paragraph: \"WebinyLexical__paragraph\",\n quote: \"WebinyLexical__quote\",\n rtl: \"WebinyLexical__rtl\",\n text: {\n bold: \"WebinyLexical__textBold\",\n code: \"WebinyLexical__textCode\",\n italic: \"WebinyLexical__textItalic\",\n strikethrough: \"WebinyLexical__textStrikethrough\",\n subscript: \"WebinyLexical__textSubscript\",\n superscript: \"WebinyLexical__textSuperscript\",\n underline: \"WebinyLexical__textUnderline\",\n underlineStrikethrough: \"WebinyLexical__textUnderlineStrikethrough\"\n },\n fontColorText: \"WebinyLexical__fontColorText\"\n};\n"],"mappings":";;;;;;AAEA;AAQO,IAAMA,iBAAoC,GAAG;EAChDC,MAAM,EAAEC,SAAS;EACjBC,cAAc,EAAE,+BAA+B;EAC/CC,IAAI,EAAE,qBAAqB;EAC3BC,aAAa,EAAE;IACXC,MAAM,EAAE,0BAA0B;IAClCC,IAAI,EAAE,0BAA0B;IAChCC,OAAO,EAAE,8BAA8B;IACvCC,OAAO,EAAE,8BAA8B;IACvCC,KAAK,EAAE,6BAA6B;IACpCC,IAAI,EAAE,8BAA8B;IACpCC,KAAK,EAAE,8BAA8B;IACrC,YAAY,EAAE,8BAA8B;IAC5CC,OAAO,EAAE,6BAA6B;IACtCC,QAAQ,EAAE,8BAA8B;IACxCC,OAAO,EAAE,8BAA8B;IACvCC,OAAO,EAAE,6BAA6B;IACtCC,MAAM,EAAE,8BAA8B;IACtCC,QAAQ,EAAE,8BAA8B;IACxCC,SAAS,EAAE,8BAA8B;IACzCC,QAAQ,EAAE,8BAA8B;IACxCC,OAAO,EAAE,0BAA0B;IACnCC,SAAS,EAAE,8BAA8B;IACzCC,MAAM,EAAE,8BAA8B;IACtCC,QAAQ,EAAE,8BAA8B;IACxCC,MAAM,EAAE,6BAA6B;IACrCC,QAAQ,EAAE,8BAA8B;IACxCC,WAAW,EAAE,iCAAiC;IAC9CC,KAAK,EAAE,8BAA8B;IACrCC,QAAQ,EAAE,8BAA8B;IACxCC,MAAM,EAAE,8BAA8B;IACtCC,MAAM,EAAE,8BAA8B;IACtCC,GAAG,EAAE,8BAA8B;IACnCC,GAAG,EAAE,8BAA8B;IACnCC,QAAQ,EAAE;EACd,CAAC;EACDC,UAAU,EAAE;IACRC,IAAI,EAAE,2BAA2B;IACjCC,KAAK,EAAE;EACX,CAAC;EACDC,OAAO,EAAE,wBAAwB;EACjCC,OAAO,EAAE;IACLC,EAAE,EAAE,mBAAmB;IACvBC,EAAE,EAAE,mBAAmB;IACvBC,EAAE,EAAE,mBAAmB;IACvBC,EAAE,EAAE,mBAAmB;IACvBC,EAAE,EAAE,mBAAmB;IACvBC,EAAE,EAAE;EACR,CAAC;EACDC,IAAI,EAAE,qBAAqB;EAC3BC,IAAI,EAAE;IACFC,QAAQ,EAAE,yBAAyB;IACnCC,eAAe,EAAE,gCAAgC;IACjDC,iBAAiB,EAAE,kCAAkC;IACrDC,MAAM,EAAE;MACJH,QAAQ,EAAE;IACd,CAAC;IACDI,OAAO,EAAE,CACL,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,CACvB;IACDC,EAAE,EAAE;EACR,CAAC;EACDC,GAAG,EAAE,oBAAoB;EACzBC,IAAI,EAAE,qBAAqB;EAC3BC,WAAW,EAAE,4BAA4B;EACzCC,SAAS,EAAE,0BAA0B;EACrCC,KAAK,EAAE,sBAAsB;EAC7BC,GAAG,EAAE,oBAAoB;EACzBC,IAAI,EAAE;IACFC,IAAI,EAAE,yBAAyB;IAC/BzD,IAAI,EAAE,yBAAyB;IAC/B0D,MAAM,EAAE,2BAA2B;IACnCC,aAAa,EAAE,kCAAkC;IACjDC,SAAS,EAAE,8BAA8B;IACzCC,WAAW,EAAE,gCAAgC;IAC7CC,SAAS,EAAE,8BAA8B;IACzCC,sBAAsB,EAAE;EAC5B,CAAC;EACDC,aAAa,EAAE;AACnB,CAAC;AAAC"}
package/types.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export declare type ToolbarType = "heading" | "paragraph" | string;
2
+ export declare type LexicalValue = string;
3
+ export { FontColorPicker } from "./components/ToolbarActions/FontColorAction";
package/types.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "FontColorPicker", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _FontColorAction.FontColorPicker;
10
+ }
11
+ });
12
+ var _FontColorAction = require("./components/ToolbarActions/FontColorAction");
package/types.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export type ToolbarType = \"heading\" | \"paragraph\" | string;\nexport type LexicalValue = string;\nexport { FontColorPicker } from \"~/components/ToolbarActions/FontColorAction\";\n"],"mappings":";;;;;;;;;;;AAEA"}
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function Divider(): JSX.Element;
package/ui/Divider.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.Divider = Divider;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ function Divider() {
10
+ return /*#__PURE__*/_react.default.createElement("div", {
11
+ className: "divider"
12
+ });
13
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Divider"],"sources":["Divider.tsx"],"sourcesContent":["import React from \"react\";\n\nexport function Divider(): JSX.Element {\n return <div className=\"divider\"></div>;\n}\n"],"mappings":";;;;;;;AAAA;AAEO,SAASA,OAAO,GAAgB;EACnC,oBAAO;IAAK,SAAS,EAAC;EAAS,EAAO;AAC1C"}
@@ -0,0 +1,26 @@
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
+ */
8
+ /// <reference types="web" />
9
+ import { ReactNode } from "react";
10
+ import * as React from "react";
11
+ export declare function DropDownItem({ children, className, onClick, title }: {
12
+ children: React.ReactNode;
13
+ className: string;
14
+ onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
15
+ title?: string;
16
+ }): JSX.Element;
17
+ export declare function DropDown({ disabled, buttonLabel, buttonAriaLabel, buttonClassName, buttonIconClassName, children, stopCloseOnClickSelf, showScroll }: {
18
+ disabled?: boolean;
19
+ buttonAriaLabel?: string;
20
+ buttonClassName: string;
21
+ buttonIconClassName?: string;
22
+ buttonLabel?: string;
23
+ children: ReactNode;
24
+ stopCloseOnClickSelf?: boolean;
25
+ showScroll?: boolean;
26
+ }): JSX.Element;