@webiny/lexical-editor 0.0.0-unstable.d65ec29d44

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 (188) 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 +10 -0
  7. package/components/AddRichTextEditorPlugin.js +31 -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 +23 -0
  19. package/components/Editor/RichTextEditor.js +107 -0
  20. package/components/Editor/RichTextEditor.js.map +1 -0
  21. package/components/LexicalHtmlRenderer.d.ts +9 -0
  22. package/components/LexicalHtmlRenderer.js +44 -0
  23. package/components/LexicalHtmlRenderer.js.map +1 -0
  24. package/components/Toolbar/HeadingToolbar.d.ts +12 -0
  25. package/components/Toolbar/HeadingToolbar.js +23 -0
  26. package/components/Toolbar/HeadingToolbar.js.map +1 -0
  27. package/components/Toolbar/ParagraphToolbar.d.ts +12 -0
  28. package/components/Toolbar/ParagraphToolbar.js +23 -0
  29. package/components/Toolbar/ParagraphToolbar.js.map +1 -0
  30. package/components/Toolbar/Toolbar.css +414 -0
  31. package/components/Toolbar/Toolbar.d.ts +13 -0
  32. package/components/Toolbar/Toolbar.js +161 -0
  33. package/components/Toolbar/Toolbar.js.map +1 -0
  34. package/components/ToolbarActions/BoldAction.d.ts +5 -0
  35. package/components/ToolbarActions/BoldAction.js +38 -0
  36. package/components/ToolbarActions/BoldAction.js.map +1 -0
  37. package/components/ToolbarActions/BulletListAction.d.ts +5 -0
  38. package/components/ToolbarActions/BulletListAction.js +89 -0
  39. package/components/ToolbarActions/BulletListAction.js.map +1 -0
  40. package/components/ToolbarActions/CodeHighlightAction.d.ts +6 -0
  41. package/components/ToolbarActions/CodeHighlightAction.js +39 -0
  42. package/components/ToolbarActions/CodeHighlightAction.js.map +1 -0
  43. package/components/ToolbarActions/FontSizeAction.d.ts +2 -0
  44. package/components/ToolbarActions/FontSizeAction.js +104 -0
  45. package/components/ToolbarActions/FontSizeAction.js.map +1 -0
  46. package/components/ToolbarActions/ItalicAction.d.ts +5 -0
  47. package/components/ToolbarActions/ItalicAction.js +38 -0
  48. package/components/ToolbarActions/ItalicAction.js.map +1 -0
  49. package/components/ToolbarActions/LinkAction.d.ts +7 -0
  50. package/components/ToolbarActions/LinkAction.js +69 -0
  51. package/components/ToolbarActions/LinkAction.js.map +1 -0
  52. package/components/ToolbarActions/NumberedListAction.d.ts +5 -0
  53. package/components/ToolbarActions/NumberedListAction.js +89 -0
  54. package/components/ToolbarActions/NumberedListAction.js.map +1 -0
  55. package/components/ToolbarActions/QuoteAction.d.ts +4 -0
  56. package/components/ToolbarActions/QuoteAction.js +66 -0
  57. package/components/ToolbarActions/QuoteAction.js.map +1 -0
  58. package/components/ToolbarActions/UnderlineAction.d.ts +5 -0
  59. package/components/ToolbarActions/UnderlineAction.js +38 -0
  60. package/components/ToolbarActions/UnderlineAction.js.map +1 -0
  61. package/components/ToolbarPresets/HeadingToolbarPreset.d.ts +2 -0
  62. package/components/ToolbarPresets/HeadingToolbarPreset.js +44 -0
  63. package/components/ToolbarPresets/HeadingToolbarPreset.js.map +1 -0
  64. package/components/ToolbarPresets/ParagraphToolbarPreset.d.ts +2 -0
  65. package/components/ToolbarPresets/ParagraphToolbarPreset.js +59 -0
  66. package/components/ToolbarPresets/ParagraphToolbarPreset.js.map +1 -0
  67. package/context/RichTextEditorContext.d.ts +11 -0
  68. package/context/RichTextEditorContext.js +29 -0
  69. package/context/RichTextEditorContext.js.map +1 -0
  70. package/hooks/useRichTextEditor.d.ts +2 -0
  71. package/hooks/useRichTextEditor.js +15 -0
  72. package/hooks/useRichTextEditor.js.map +1 -0
  73. package/images/icons/LICENSE.md +5 -0
  74. package/images/icons/chat-square-quote.svg +1 -0
  75. package/images/icons/chevron-down.svg +1 -0
  76. package/images/icons/code.svg +1 -0
  77. package/images/icons/link.svg +1 -0
  78. package/images/icons/list-ol.svg +1 -0
  79. package/images/icons/list-ul.svg +1 -0
  80. package/images/icons/pencil-fill.svg +1 -0
  81. package/images/icons/text-center.svg +1 -0
  82. package/images/icons/text-left.svg +1 -0
  83. package/images/icons/text-paragraph.svg +1 -0
  84. package/images/icons/text-right.svg +1 -0
  85. package/images/icons/type-bold.svg +1 -0
  86. package/images/icons/type-h1.svg +1 -0
  87. package/images/icons/type-h2.svg +1 -0
  88. package/images/icons/type-h3.svg +1 -0
  89. package/images/icons/type-h4.svg +1 -0
  90. package/images/icons/type-h5.svg +1 -0
  91. package/images/icons/type-h6.svg +1 -0
  92. package/images/icons/type-italic.svg +1 -0
  93. package/images/icons/type-strikethrough.svg +1 -0
  94. package/images/icons/type-underline.svg +1 -0
  95. package/images/icons/unlink_icon.svg +1 -0
  96. package/index.d.ts +34 -0
  97. package/index.js +239 -0
  98. package/index.js.map +1 -0
  99. package/nodes/webinyNodes.d.ts +2 -0
  100. package/nodes/webinyNodes.js +15 -0
  101. package/nodes/webinyNodes.js.map +1 -0
  102. package/package.json +38 -0
  103. package/plugins/AutoLinkPlugin/AutoLinkPlugin.d.ts +11 -0
  104. package/plugins/AutoLinkPlugin/AutoLinkPlugin.js +46 -0
  105. package/plugins/AutoLinkPlugin/AutoLinkPlugin.js.map +1 -0
  106. package/plugins/AutoLinkPlugin/index.d.ts +1 -0
  107. package/plugins/AutoLinkPlugin/index.js +16 -0
  108. package/plugins/AutoLinkPlugin/index.js.map +1 -0
  109. package/plugins/BlurEventPlugin/BlurEventPlugin.d.ts +7 -0
  110. package/plugins/BlurEventPlugin/BlurEventPlugin.js +28 -0
  111. package/plugins/BlurEventPlugin/BlurEventPlugin.js.map +1 -0
  112. package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.d.ts +17 -0
  113. package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.js +88 -0
  114. package/plugins/ClickableLinkPlugin/ClickableLinkPlugin.js.map +1 -0
  115. package/plugins/ClickableLinkPlugin/index.d.ts +1 -0
  116. package/plugins/ClickableLinkPlugin/index.js +16 -0
  117. package/plugins/ClickableLinkPlugin/index.js.map +1 -0
  118. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.d.ts +1 -0
  119. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js +20 -0
  120. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js.map +1 -0
  121. package/plugins/CodeHighlightPlugin/index.d.ts +1 -0
  122. package/plugins/CodeHighlightPlugin/index.js +16 -0
  123. package/plugins/CodeHighlightPlugin/index.js.map +1 -0
  124. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.css +118 -0
  125. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.d.ts +7 -0
  126. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js +222 -0
  127. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js.map +1 -0
  128. package/plugins/FloatingLinkEditorPlugin/index.d.ts +1 -0
  129. package/plugins/FloatingLinkEditorPlugin/index.js +16 -0
  130. package/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
  131. package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.d.ts +8 -0
  132. package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.js +34 -0
  133. package/plugins/LexicalUpdateStatePlugin/LexicalUpdateStatePlugin.js.map +1 -0
  134. package/plugins/LexicalUpdateStatePlugin/index.d.ts +1 -0
  135. package/plugins/LexicalUpdateStatePlugin/index.js +16 -0
  136. package/plugins/LexicalUpdateStatePlugin/index.js.map +1 -0
  137. package/themes/webinyLexicalTheme.css +422 -0
  138. package/themes/webinyLexicalTheme.d.ts +10 -0
  139. package/themes/webinyLexicalTheme.js +107 -0
  140. package/themes/webinyLexicalTheme.js.map +1 -0
  141. package/types.d.ts +2 -0
  142. package/types.js +5 -0
  143. package/types.js.map +1 -0
  144. package/ui/Divider.d.ts +2 -0
  145. package/ui/Divider.js +13 -0
  146. package/ui/Divider.js.map +1 -0
  147. package/ui/DropDown.d.ts +25 -0
  148. package/ui/DropDown.js +168 -0
  149. package/ui/DropDown.js.map +1 -0
  150. package/ui/Input.css +32 -0
  151. package/ui/LinkPreview.css +69 -0
  152. package/ui/LinkPreview.d.ts +12 -0
  153. package/ui/LinkPreview.js +101 -0
  154. package/ui/LinkPreview.js.map +1 -0
  155. package/ui/Placeholder.css +23 -0
  156. package/ui/Placeholder.d.ts +13 -0
  157. package/ui/Placeholder.js +24 -0
  158. package/ui/Placeholder.js.map +1 -0
  159. package/ui/TextInput.d.ts +18 -0
  160. package/ui/TextInput.js +39 -0
  161. package/ui/TextInput.js.map +1 -0
  162. package/utils/generateInitialLexicalValue.d.ts +5 -0
  163. package/utils/generateInitialLexicalValue.js +29 -0
  164. package/utils/generateInitialLexicalValue.js.map +1 -0
  165. package/utils/getDOMRangeRect.d.ts +10 -0
  166. package/utils/getDOMRangeRect.js +27 -0
  167. package/utils/getDOMRangeRect.js.map +1 -0
  168. package/utils/getSelectedNode.d.ts +2 -0
  169. package/utils/getSelectedNode.js +30 -0
  170. package/utils/getSelectedNode.js.map +1 -0
  171. package/utils/isValidJSON.d.ts +1 -0
  172. package/utils/isValidJSON.js +18 -0
  173. package/utils/isValidJSON.js.map +1 -0
  174. package/utils/isValidLexicalData.d.ts +2 -0
  175. package/utils/isValidLexicalData.js +24 -0
  176. package/utils/isValidLexicalData.js.map +1 -0
  177. package/utils/point.d.ts +21 -0
  178. package/utils/point.js +77 -0
  179. package/utils/point.js.map +1 -0
  180. package/utils/rect.d.ts +47 -0
  181. package/utils/rect.js +169 -0
  182. package/utils/rect.js.map +1 -0
  183. package/utils/sanitizeUrl.d.ts +8 -0
  184. package/utils/sanitizeUrl.js +27 -0
  185. package/utils/sanitizeUrl.js.map +1 -0
  186. package/utils/setFloatingElemPosition.d.ts +3 -0
  187. package/utils/setFloatingElemPosition.js +40 -0
  188. package/utils/setFloatingElemPosition.js.map +1 -0
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Toolbar action. On toolbar, you can see the button that is underline.
4
+ */
5
+ export declare const UnderlineAction: () => JSX.Element;
@@ -0,0 +1,38 @@
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.UnderlineAction = void 0;
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
12
+ var _lexical = require("lexical");
13
+ /**
14
+ * Toolbar action. On toolbar, you can see the button that is underline.
15
+ */
16
+ var UnderlineAction = function UnderlineAction() {
17
+ var _useLexicalComposerCo = (0, _LexicalComposerContext.useLexicalComposerContext)(),
18
+ _useLexicalComposerCo2 = (0, _slicedToArray2.default)(_useLexicalComposerCo, 1),
19
+ editor = _useLexicalComposerCo2[0];
20
+ var _useState = (0, _react.useState)(false),
21
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
22
+ isUnderline = _useState2[0],
23
+ setIsUnderline = _useState2[1];
24
+ var handleClick = function handleClick() {
25
+ editor.dispatchCommand(_lexical.FORMAT_TEXT_COMMAND, "underline");
26
+ setIsUnderline(!isUnderline);
27
+ };
28
+ return /*#__PURE__*/_react.default.createElement("button", {
29
+ onClick: function onClick() {
30
+ return handleClick();
31
+ },
32
+ className: "popup-item spaced " + (isUnderline ? "active" : ""),
33
+ "aria-label": "Format text as italic"
34
+ }, /*#__PURE__*/_react.default.createElement("i", {
35
+ className: "format underline"
36
+ }));
37
+ };
38
+ exports.UnderlineAction = UnderlineAction;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_LexicalComposerContext","_lexical","UnderlineAction","_useLexicalComposerCo","useLexicalComposerContext","_useLexicalComposerCo2","_slicedToArray2","default","editor","_useState","useState","_useState2","isUnderline","setIsUnderline","handleClick","dispatchCommand","FORMAT_TEXT_COMMAND","createElement","onClick","className","exports"],"sources":["UnderlineAction.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { FORMAT_TEXT_COMMAND } from \"lexical\";\n\n/**\n * Toolbar action. On toolbar, you can see the button that is underline.\n */\nexport const UnderlineAction = () => {\n const [editor] = useLexicalComposerContext();\n const [isUnderline, setIsUnderline] = useState(false);\n const handleClick = () => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, \"underline\");\n setIsUnderline(!isUnderline);\n };\n\n return (\n <button\n onClick={() => handleClick()}\n className={\"popup-item spaced \" + (isUnderline ? \"active\" : \"\")}\n aria-label=\"Format text as italic\"\n >\n <i className=\"format underline\" />\n </button>\n );\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACO,IAAMG,eAAe,GAAG,SAAlBA,eAAeA,CAAA,EAAS;EACjC,IAAAC,qBAAA,GAAiB,IAAAC,iDAAyB,GAAE;IAAAC,sBAAA,OAAAC,eAAA,CAAAC,OAAA,EAAAJ,qBAAA;IAArCK,MAAM,GAAAH,sBAAA;EACb,IAAAI,SAAA,GAAsC,IAAAC,eAAQ,EAAC,KAAK,CAAC;IAAAC,UAAA,OAAAL,eAAA,CAAAC,OAAA,EAAAE,SAAA;IAA9CG,WAAW,GAAAD,UAAA;IAAEE,cAAc,GAAAF,UAAA;EAClC,IAAMG,WAAW,GAAG,SAAdA,WAAWA,CAAA,EAAS;IACtBN,MAAM,CAACO,eAAe,CAACC,4BAAmB,EAAE,WAAW,CAAC;IACxDH,cAAc,CAAC,CAACD,WAAW,CAAC;EAChC,CAAC;EAED,oBACIf,MAAA,CAAAU,OAAA,CAAAU,aAAA;IACIC,OAAO,EAAE,SAAAA,QAAA;MAAA,OAAMJ,WAAW,EAAE;IAAA,CAAC;IAC7BK,SAAS,EAAE,oBAAoB,IAAIP,WAAW,GAAG,QAAQ,GAAG,EAAE,CAAE;IAChE,cAAW;EAAuB,gBAElCf,MAAA,CAAAU,OAAA,CAAAU,aAAA;IAAGE,SAAS,EAAC;EAAkB,EAAG,CAC7B;AAEjB,CAAC;AAACC,OAAA,CAAAlB,eAAA,GAAAA,eAAA"}
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const HeadingToolbarPreset: () => JSX.Element;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.HeadingToolbarPreset = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _BoldAction = require("../ToolbarActions/BoldAction");
10
+ var _AddToolbarAction = require("../AddToolbarAction");
11
+ var _ItalicAction = require("../ToolbarActions/ItalicAction");
12
+ var _UnderlineAction = require("../ToolbarActions/UnderlineAction");
13
+ var _CodeHighlightAction = require("../ToolbarActions/CodeHighlightAction");
14
+ var _LinkAction = require("../ToolbarActions/LinkAction");
15
+ var _FontSizeAction = require("../ToolbarActions/FontSizeAction");
16
+ var _Divider = require("../../ui/Divider");
17
+ var HeadingToolbarPreset = function HeadingToolbarPreset() {
18
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
19
+ element: /*#__PURE__*/_react.default.createElement(_FontSizeAction.FontSizeAction, null),
20
+ type: "heading"
21
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
22
+ element: /*#__PURE__*/_react.default.createElement(_Divider.Divider, null),
23
+ type: "heading"
24
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
25
+ element: /*#__PURE__*/_react.default.createElement(_BoldAction.BoldAction, null),
26
+ type: "heading"
27
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
28
+ element: /*#__PURE__*/_react.default.createElement(_ItalicAction.ItalicAction, null),
29
+ type: "heading"
30
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
31
+ element: /*#__PURE__*/_react.default.createElement(_UnderlineAction.UnderlineAction, null),
32
+ type: "heading"
33
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
34
+ element: /*#__PURE__*/_react.default.createElement(_CodeHighlightAction.CodeHighlightAction, null),
35
+ type: "heading"
36
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
37
+ element: /*#__PURE__*/_react.default.createElement(_Divider.Divider, null),
38
+ type: "heading"
39
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
40
+ element: /*#__PURE__*/_react.default.createElement(_LinkAction.LinkAction, null),
41
+ type: "heading"
42
+ }));
43
+ };
44
+ exports.HeadingToolbarPreset = HeadingToolbarPreset;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_BoldAction","_AddToolbarAction","_ItalicAction","_UnderlineAction","_CodeHighlightAction","_LinkAction","_FontSizeAction","_Divider","HeadingToolbarPreset","default","createElement","Fragment","AddToolbarAction","element","FontSizeAction","type","Divider","BoldAction","ItalicAction","UnderlineAction","CodeHighlightAction","LinkAction","exports"],"sources":["HeadingToolbarPreset.tsx"],"sourcesContent":["import React from \"react\";\nimport { BoldAction } from \"~/components/ToolbarActions/BoldAction\";\nimport { AddToolbarAction } from \"~/components/AddToolbarAction\";\nimport { ItalicAction } from \"~/components/ToolbarActions/ItalicAction\";\nimport { UnderlineAction } from \"~/components/ToolbarActions/UnderlineAction\";\nimport { CodeHighlightAction } from \"~/components/ToolbarActions/CodeHighlightAction\";\nimport { LinkAction } from \"~/components/ToolbarActions/LinkAction\";\nimport { FontSizeAction } from \"~/components/ToolbarActions/FontSizeAction\";\nimport { Divider } from \"~/ui/Divider\";\n\nexport const HeadingToolbarPreset = () => {\n return (\n <>\n <AddToolbarAction element={<FontSizeAction />} type={\"heading\"} />\n <AddToolbarAction element={<Divider />} type={\"heading\"} />\n <AddToolbarAction element={<BoldAction />} type={\"heading\"} />\n <AddToolbarAction element={<ItalicAction />} type={\"heading\"} />\n <AddToolbarAction element={<UnderlineAction />} type={\"heading\"} />\n <AddToolbarAction element={<CodeHighlightAction />} type={\"heading\"} />\n <AddToolbarAction element={<Divider />} type={\"heading\"} />\n <AddToolbarAction element={<LinkAction />} type={\"heading\"} />\n </>\n );\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAEO,IAAMS,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAA,EAAS;EACtC,oBACIX,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAAAb,MAAA,CAAAY,OAAA,CAAAE,QAAA,qBACId,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACT,iBAAA,CAAAW,gBAAgB;IAACC,OAAO,eAAEhB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACJ,eAAA,CAAAQ,cAAc,OAAI;IAACC,IAAI,EAAE;EAAU,EAAG,eAClElB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACT,iBAAA,CAAAW,gBAAgB;IAACC,OAAO,eAAEhB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACH,QAAA,CAAAS,OAAO,OAAI;IAACD,IAAI,EAAE;EAAU,EAAG,eAC3DlB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACT,iBAAA,CAAAW,gBAAgB;IAACC,OAAO,eAAEhB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACV,WAAA,CAAAiB,UAAU,OAAI;IAACF,IAAI,EAAE;EAAU,EAAG,eAC9DlB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACT,iBAAA,CAAAW,gBAAgB;IAACC,OAAO,eAAEhB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACR,aAAA,CAAAgB,YAAY,OAAI;IAACH,IAAI,EAAE;EAAU,EAAG,eAChElB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACT,iBAAA,CAAAW,gBAAgB;IAACC,OAAO,eAAEhB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACP,gBAAA,CAAAgB,eAAe,OAAI;IAACJ,IAAI,EAAE;EAAU,EAAG,eACnElB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACT,iBAAA,CAAAW,gBAAgB;IAACC,OAAO,eAAEhB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACN,oBAAA,CAAAgB,mBAAmB,OAAI;IAACL,IAAI,EAAE;EAAU,EAAG,eACvElB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACT,iBAAA,CAAAW,gBAAgB;IAACC,OAAO,eAAEhB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACH,QAAA,CAAAS,OAAO,OAAI;IAACD,IAAI,EAAE;EAAU,EAAG,eAC3DlB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACT,iBAAA,CAAAW,gBAAgB;IAACC,OAAO,eAAEhB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACL,WAAA,CAAAgB,UAAU,OAAI;IAACN,IAAI,EAAE;EAAU,EAAG,CAC/D;AAEX,CAAC;AAACO,OAAA,CAAAd,oBAAA,GAAAA,oBAAA"}
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const ParagraphToolbarPreset: () => JSX.Element;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.ParagraphToolbarPreset = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _BoldAction = require("../ToolbarActions/BoldAction");
10
+ var _AddToolbarAction = require("../AddToolbarAction");
11
+ var _ItalicAction = require("../ToolbarActions/ItalicAction");
12
+ var _UnderlineAction = require("../ToolbarActions/UnderlineAction");
13
+ var _CodeHighlightAction = require("../ToolbarActions/CodeHighlightAction");
14
+ var _LinkAction = require("../ToolbarActions/LinkAction");
15
+ var _FontSizeAction = require("../ToolbarActions/FontSizeAction");
16
+ var _Divider = require("../../ui/Divider");
17
+ var _NumberedListAction = require("../ToolbarActions/NumberedListAction");
18
+ var _BulletListAction = require("../ToolbarActions/BulletListAction");
19
+ var _QuoteAction = require("../ToolbarActions/QuoteAction");
20
+ var ParagraphToolbarPreset = function ParagraphToolbarPreset() {
21
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
22
+ element: /*#__PURE__*/_react.default.createElement(_FontSizeAction.FontSizeAction, null),
23
+ type: "paragraph"
24
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
25
+ element: /*#__PURE__*/_react.default.createElement(_Divider.Divider, null),
26
+ type: "paragraph"
27
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
28
+ element: /*#__PURE__*/_react.default.createElement(_BoldAction.BoldAction, null),
29
+ type: "paragraph"
30
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
31
+ element: /*#__PURE__*/_react.default.createElement(_ItalicAction.ItalicAction, null),
32
+ type: "paragraph"
33
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
34
+ element: /*#__PURE__*/_react.default.createElement(_UnderlineAction.UnderlineAction, null),
35
+ type: "paragraph"
36
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
37
+ element: /*#__PURE__*/_react.default.createElement(_CodeHighlightAction.CodeHighlightAction, null),
38
+ type: "paragraph"
39
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
40
+ element: /*#__PURE__*/_react.default.createElement(_Divider.Divider, null),
41
+ type: "paragraph"
42
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
43
+ element: /*#__PURE__*/_react.default.createElement(_NumberedListAction.NumberedListAction, null),
44
+ type: "paragraph"
45
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
46
+ element: /*#__PURE__*/_react.default.createElement(_BulletListAction.BulletListAction, null),
47
+ type: "paragraph"
48
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
49
+ element: /*#__PURE__*/_react.default.createElement(_Divider.Divider, null),
50
+ type: "paragraph"
51
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
52
+ element: /*#__PURE__*/_react.default.createElement(_LinkAction.LinkAction, null),
53
+ type: "paragraph"
54
+ }), /*#__PURE__*/_react.default.createElement(_AddToolbarAction.AddToolbarAction, {
55
+ element: /*#__PURE__*/_react.default.createElement(_QuoteAction.QuoteAction, null),
56
+ type: "paragraph"
57
+ }));
58
+ };
59
+ exports.ParagraphToolbarPreset = ParagraphToolbarPreset;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_BoldAction","_AddToolbarAction","_ItalicAction","_UnderlineAction","_CodeHighlightAction","_LinkAction","_FontSizeAction","_Divider","_NumberedListAction","_BulletListAction","_QuoteAction","ParagraphToolbarPreset","default","createElement","Fragment","AddToolbarAction","element","FontSizeAction","type","Divider","BoldAction","ItalicAction","UnderlineAction","CodeHighlightAction","NumberedListAction","BulletListAction","LinkAction","QuoteAction","exports"],"sources":["ParagraphToolbarPreset.tsx"],"sourcesContent":["import React from \"react\";\nimport { BoldAction } from \"~/components/ToolbarActions/BoldAction\";\nimport { AddToolbarAction } from \"~/components/AddToolbarAction\";\nimport { ItalicAction } from \"~/components/ToolbarActions/ItalicAction\";\nimport { UnderlineAction } from \"~/components/ToolbarActions/UnderlineAction\";\nimport { CodeHighlightAction } from \"~/components/ToolbarActions/CodeHighlightAction\";\nimport { LinkAction } from \"~/components/ToolbarActions/LinkAction\";\nimport { FontSizeAction } from \"~/components/ToolbarActions/FontSizeAction\";\nimport { Divider } from \"~/ui/Divider\";\nimport { NumberedListAction } from \"~/components/ToolbarActions/NumberedListAction\";\nimport { BulletListAction } from \"~/components/ToolbarActions/BulletListAction\";\nimport { QuoteAction } from \"~/components/ToolbarActions/QuoteAction\";\n\nexport const ParagraphToolbarPreset = () => {\n return (\n <>\n <AddToolbarAction element={<FontSizeAction />} type={\"paragraph\"} />\n <AddToolbarAction element={<Divider />} type={\"paragraph\"} />\n <AddToolbarAction element={<BoldAction />} type={\"paragraph\"} />\n <AddToolbarAction element={<ItalicAction />} type={\"paragraph\"} />\n <AddToolbarAction element={<UnderlineAction />} type={\"paragraph\"} />\n <AddToolbarAction element={<CodeHighlightAction />} type={\"paragraph\"} />\n <AddToolbarAction element={<Divider />} type={\"paragraph\"} />\n <AddToolbarAction element={<NumberedListAction />} type={\"paragraph\"} />\n <AddToolbarAction element={<BulletListAction />} type={\"paragraph\"} />\n <AddToolbarAction element={<Divider />} type={\"paragraph\"} />\n <AddToolbarAction element={<LinkAction />} type={\"paragraph\"} />\n <AddToolbarAction element={<QuoteAction />} type={\"paragraph\"} />\n </>\n );\n};\n"],"mappings":"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"}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export interface RichTextEditorContext {
3
+ nodeIsText: boolean;
4
+ setNodeIsText: (nodeIsText: boolean) => void;
5
+ }
6
+ export declare const RichTextEditorContext: React.Context<RichTextEditorContext | undefined>;
7
+ interface RichTextEditorProviderProps {
8
+ children?: React.ReactNode | React.ReactNode[];
9
+ }
10
+ export declare const RichTextEditorProvider: React.FC<RichTextEditorProviderProps>;
11
+ export {};
@@ -0,0 +1,29 @@
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.RichTextEditorProvider = exports.RichTextEditorContext = void 0;
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var RichTextEditorContext = /*#__PURE__*/(0, _react.createContext)(undefined);
12
+ exports.RichTextEditorContext = RichTextEditorContext;
13
+ var RichTextEditorProvider = function RichTextEditorProvider(_ref) {
14
+ var children = _ref.children;
15
+ var _useState = (0, _react.useState)(false),
16
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
17
+ nodeIsText = _useState2[0],
18
+ setIsText = _useState2[1];
19
+ var setNodeIsText = function setNodeIsText(nodeIsText) {
20
+ setIsText(nodeIsText);
21
+ };
22
+ return /*#__PURE__*/_react.default.createElement(RichTextEditorContext.Provider, {
23
+ value: {
24
+ nodeIsText: nodeIsText,
25
+ setNodeIsText: setNodeIsText
26
+ }
27
+ }, children);
28
+ };
29
+ exports.RichTextEditorProvider = RichTextEditorProvider;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","RichTextEditorContext","createContext","undefined","exports","RichTextEditorProvider","_ref","children","_useState","useState","_useState2","_slicedToArray2","default","nodeIsText","setIsText","setNodeIsText","createElement","Provider","value"],"sources":["RichTextEditorContext.tsx"],"sourcesContent":["import React, { createContext, useState } from \"react\";\n\nexport interface RichTextEditorContext {\n nodeIsText: boolean;\n setNodeIsText: (nodeIsText: boolean) => void;\n}\n\nexport const RichTextEditorContext = createContext<RichTextEditorContext | undefined>(undefined);\n\ninterface RichTextEditorProviderProps {\n children?: React.ReactNode | React.ReactNode[];\n}\n\nexport const RichTextEditorProvider: React.FC<RichTextEditorProviderProps> = ({ children }) => {\n const [nodeIsText, setIsText] = useState<boolean>(false);\n const setNodeIsText = (nodeIsText: boolean) => {\n setIsText(nodeIsText);\n };\n\n return (\n <RichTextEditorContext.Provider\n value={{\n nodeIsText,\n setNodeIsText\n }}\n >\n {children}\n </RichTextEditorContext.Provider>\n );\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAOO,IAAMC,qBAAqB,gBAAG,IAAAC,oBAAa,EAAoCC,SAAS,CAAC;AAACC,OAAA,CAAAH,qBAAA,GAAAA,qBAAA;AAM1F,IAAMI,sBAA6D,GAAG,SAAhEA,sBAA6DA,CAAAC,IAAA,EAAqB;EAAA,IAAfC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EACpF,IAAAC,SAAA,GAAgC,IAAAC,eAAQ,EAAU,KAAK,CAAC;IAAAC,UAAA,OAAAC,eAAA,CAAAC,OAAA,EAAAJ,SAAA;IAAjDK,UAAU,GAAAH,UAAA;IAAEI,SAAS,GAAAJ,UAAA;EAC5B,IAAMK,aAAa,GAAG,SAAhBA,aAAaA,CAAIF,UAAmB,EAAK;IAC3CC,SAAS,CAACD,UAAU,CAAC;EACzB,CAAC;EAED,oBACIf,MAAA,CAAAc,OAAA,CAAAI,aAAA,CAACf,qBAAqB,CAACgB,QAAQ;IAC3BC,KAAK,EAAE;MACHL,UAAU,EAAVA,UAAU;MACVE,aAAa,EAAbA;IACJ;EAAE,GAEDR,QAAQ,CACoB;AAEzC,CAAC;AAACH,OAAA,CAAAC,sBAAA,GAAAA,sBAAA"}
@@ -0,0 +1,2 @@
1
+ import { RichTextEditorContext } from "../context/RichTextEditorContext";
2
+ export declare function useRichTextEditor(): RichTextEditorContext;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useRichTextEditor = useRichTextEditor;
7
+ var _react = require("react");
8
+ var _RichTextEditorContext = require("../context/RichTextEditorContext");
9
+ function useRichTextEditor() {
10
+ var context = (0, _react.useContext)(_RichTextEditorContext.RichTextEditorContext);
11
+ if (!context) {
12
+ throw Error("Missing RichTextEditorContext in the component hierarchy. Are you using \"useRichTextEditor()\" in the right place?");
13
+ }
14
+ return context;
15
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_RichTextEditorContext","useRichTextEditor","context","useContext","RichTextEditorContext","Error"],"sources":["useRichTextEditor.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport { RichTextEditorContext } from \"~/context/RichTextEditorContext\";\n\nexport function useRichTextEditor() {\n const context = useContext(RichTextEditorContext);\n if (!context) {\n throw Error(\n `Missing RichTextEditorContext in the component hierarchy. Are you using \"useRichTextEditor()\" in the right place?`\n );\n }\n\n return context;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAEO,SAASE,iBAAiBA,CAAA,EAAG;EAChC,IAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACC,4CAAqB,CAAC;EACjD,IAAI,CAACF,OAAO,EAAE;IACV,MAAMG,KAAK,uHAEV;EACL;EAEA,OAAOH,OAAO;AAClB"}
@@ -0,0 +1,5 @@
1
+ Bootstrap Icons
2
+ https://icons.getbootstrap.com
3
+
4
+ Licensed under MIT license
5
+ https://github.com/twbs/icons/blob/main/LICENSE.md
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chat-square-quote"><path d="M14 1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1h-2.5a2 2 0 0 0-1.6.8L8 14.333 6.1 11.8a2 2 0 0 0-1.6-.8H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2.5a1 1 0 0 1 .8.4l1.9 2.533a1 1 0 0 0 1.6 0l1.9-2.533a1 1 0 0 1 .8-.4H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M7.066 4.76A1.665 1.665 0 0 0 4 5.668a1.667 1.667 0 0 0 2.561 1.406c-.131.389-.375.804-.777 1.22a.417.417 0 1 0 .6.58c1.486-1.54 1.293-3.214.682-4.112zm4 0A1.665 1.665 0 0 0 8 5.668a1.667 1.667 0 0 0 2.561 1.406c-.131.389-.375.804-.777 1.22a.417.417 0 1 0 .6.58c1.486-1.54 1.293-3.214.682-4.112z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-code"><path d="M5.854 4.854a.5.5 0 1 0-.708-.708l-3.5 3.5a.5.5 0 0 0 0 .708l3.5 3.5a.5.5 0 0 0 .708-.708L2.707 8l3.147-3.146zm4.292 0a.5.5 0 0 1 .708-.708l3.5 3.5a.5.5 0 0 1 0 .708l-3.5 3.5a.5.5 0 0 1-.708-.708L13.293 8l-3.147-3.146z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-link"><path d="M6.354 5.5H4a3 3 0 0 0 0 6h3a3 3 0 0 0 2.83-4H9c-.086 0-.17.01-.25.031A2 2 0 0 1 7 10.5H4a2 2 0 1 1 0-4h1.535c.218-.376.495-.714.82-1z"/><path d="M9 5.5a3 3 0 0 0-2.83 4h1.098A2 2 0 0 1 9 6.5h3a2 2 0 1 1 0 4h-1.535a4.02 4.02 0 0 1-.82 1H12a3 3 0 1 0 0-6H9z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list-ol"><path fill-rule="evenodd" d="M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5z"/><path d="M1.713 11.865v-.474H2c.217 0 .363-.137.363-.317 0-.185-.158-.31-.361-.31-.223 0-.367.152-.373.31h-.59c.016-.467.373-.787.986-.787.588-.002.954.291.957.703a.595.595 0 0 1-.492.594v.033a.615.615 0 0 1 .569.631c.003.533-.502.8-1.051.8-.656 0-1-.37-1.008-.794h.582c.008.178.186.306.422.309.254 0 .424-.145.422-.35-.002-.195-.155-.348-.414-.348h-.3zm-.004-4.699h-.604v-.035c0-.408.295-.844.958-.844.583 0 .96.326.96.756 0 .389-.257.617-.476.848l-.537.572v.03h1.054V9H1.143v-.395l.957-.99c.138-.142.293-.304.293-.508 0-.18-.147-.32-.342-.32a.33.33 0 0 0-.342.338v.041zM2.564 5h-.635V2.924h-.031l-.598.42v-.567l.629-.443h.635V5z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list-ul"><path fill-rule="evenodd" d="M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm-3 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm0 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm0 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil-fill"><path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-text-center"><path fill-rule="evenodd" d="M4 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-text-left"><path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-text-paragraph"><path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm4-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-text-right"><path fill-rule="evenodd" d="M6 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-4-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm4-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-4-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-bold"><path d="M8.21 13c2.106 0 3.412-1.087 3.412-2.823 0-1.306-.984-2.283-2.324-2.386v-.055a2.176 2.176 0 0 0 1.852-2.14c0-1.51-1.162-2.46-3.014-2.46H3.843V13H8.21zM5.908 4.674h1.696c.963 0 1.517.451 1.517 1.244 0 .834-.629 1.32-1.73 1.32H5.908V4.673zm0 6.788V8.598h1.73c1.217 0 1.88.492 1.88 1.415 0 .943-.643 1.449-1.832 1.449H5.907z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-h1"><path d="M8.637 13V3.669H7.379V7.62H2.758V3.67H1.5V13h1.258V8.728h4.62V13h1.259zm5.329 0V3.669h-1.244L10.5 5.316v1.265l2.16-1.565h.062V13h1.244z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-h2"><path d="M7.638 13V3.669H6.38V7.62H1.759V3.67H.5V13h1.258V8.728h4.62V13h1.259zm3.022-6.733v-.048c0-.889.63-1.668 1.716-1.668.957 0 1.675.608 1.675 1.572 0 .855-.554 1.504-1.067 2.085l-3.513 3.999V13H15.5v-1.094h-4.245v-.075l2.481-2.844c.875-.998 1.586-1.784 1.586-2.953 0-1.463-1.155-2.556-2.919-2.556-1.941 0-2.966 1.326-2.966 2.74v.049h1.223z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-h3"><path d="M7.637 13V3.669H6.379V7.62H1.758V3.67H.5V13h1.258V8.728h4.62V13h1.259zm3.625-4.272h1.018c1.142 0 1.935.67 1.949 1.674.013 1.005-.78 1.737-2.01 1.73-1.08-.007-1.853-.588-1.935-1.32H9.108c.069 1.327 1.224 2.386 3.083 2.386 1.935 0 3.343-1.155 3.309-2.789-.027-1.51-1.251-2.16-2.037-2.249v-.068c.704-.123 1.764-.91 1.723-2.229-.035-1.353-1.176-2.4-2.954-2.385-1.873.006-2.857 1.162-2.898 2.358h1.196c.062-.69.711-1.299 1.696-1.299.998 0 1.695.622 1.695 1.525.007.922-.718 1.592-1.695 1.592h-.964v1.074z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-h1"><path d="M7.637 13V3.669H6.379V7.62H1.758V3.67H.5V13h1.258V8.728h4.62V13Zm5.337.2v-2.328H9.108V9.828l3.441-6.35h1.632v6.141H15.5v1.253h-1.319V13.2Zm-2.615-3.581h2.615V6.7L13 4.689l-.872 1.7z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-h1"><path d="M7.637 13V3.669H6.379V7.62H1.758V3.67H.5V13h1.258V8.728h4.62V13Zm2.755-5.791a3.763 3.763 0 0 1 2.113-.517 2.973 2.973 0 0 1 2.995 3.1 3.45 3.45 0 0 1-.9 2.442 3.111 3.111 0 0 1-2.393.968 3.327 3.327 0 0 1-2.094-.671 2.758 2.758 0 0 1-1.007-2h1.284a1.387 1.387 0 0 0 .511 1.1 2.384 2.384 0 0 0 1.4.421 1.819 1.819 0 0 0 1.479-.638 2.042 2.042 0 0 0 .437-1.514 2.17 2.17 0 0 0-.567-1.584 1.958 1.958 0 0 0-1.468-.58 2.358 2.358 0 0 0-1.79.789H9.108V3.478h5.931v1.134h-4.647Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-h1"><path d="M7.637 13V3.669H6.379V7.62H1.758V3.67H.5V13h1.258V8.728h4.62V13Zm5.039-6.13a2.823 2.823 0 0 1 1.419.364 2.69 2.69 0 0 1 1.022 1.05 3.327 3.327 0 0 1 .383 1.642 3.594 3.594 0 0 1-.39 1.7 2.878 2.878 0 0 1-1.1 1.158 3.165 3.165 0 0 1-1.635.416 2.812 2.812 0 0 1-1.734-.545A3.49 3.49 0 0 1 9.51 11.1a6.515 6.515 0 0 1-.4-2.411A7.726 7.726 0 0 1 9.542 6a4.289 4.289 0 0 1 1.233-1.851 2.831 2.831 0 0 1 1.889-.673A2.7 2.7 0 0 1 13.8 3.7a2.463 2.463 0 0 1 .812.586 2.886 2.886 0 0 1 .514.8 2.768 2.768 0 0 1 .223.861H14a1.488 1.488 0 0 0-.453-.923 1.346 1.346 0 0 0-.935-.329 1.509 1.509 0 0 0-1.072.425 2.839 2.839 0 0 0-.71 1.18 6.808 6.808 0 0 0-.323 1.771 2.639 2.639 0 0 1 .918-.889 2.48 2.48 0 0 1 1.251-.312Zm-.285 5.117a1.617 1.617 0 0 0 .91-.256 1.752 1.752 0 0 0 .614-.713 2.336 2.336 0 0 0 .223-1.037 2.211 2.211 0 0 0-.217-1.01 1.6 1.6 0 0 0-.6-.666 1.671 1.671 0 0 0-.892-.236 1.833 1.833 0 0 0-1.164.377 2.4 2.4 0 0 0-.743 1.009 3.749 3.749 0 0 0 .6 1.845 1.5 1.5 0 0 0 1.269.687Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-italic"><path d="M7.991 11.674 9.53 4.455c.123-.595.246-.71 1.347-.807l.11-.52H7.211l-.11.52c1.06.096 1.128.212 1.005.807L6.57 11.674c-.123.595-.246.71-1.346.806l-.11.52h3.774l.11-.52c-1.06-.095-1.129-.211-1.006-.806z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-strikethrough"><path d="M6.333 5.686c0 .31.083.581.27.814H5.166a2.776 2.776 0 0 1-.099-.76c0-1.627 1.436-2.768 3.48-2.768 1.969 0 3.39 1.175 3.445 2.85h-1.23c-.11-1.08-.964-1.743-2.25-1.743-1.23 0-2.18.602-2.18 1.607zm2.194 7.478c-2.153 0-3.589-1.107-3.705-2.81h1.23c.144 1.06 1.129 1.703 2.544 1.703 1.34 0 2.31-.705 2.31-1.675 0-.827-.547-1.374-1.914-1.675L8.046 8.5H1v-1h14v1h-3.504c.468.437.675.994.675 1.697 0 1.826-1.436 2.967-3.644 2.967z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-underline"><path d="M5.313 3.136h-1.23V9.54c0 2.105 1.47 3.623 3.917 3.623s3.917-1.518 3.917-3.623V3.136h-1.23v6.323c0 1.49-.978 2.57-2.687 2.57-1.709 0-2.687-1.08-2.687-2.57V3.136zM12.5 15h-9v-1h9v1z"/></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" ?><svg class="icon icon-tabler icon-tabler-unlink" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none" stroke="none"/><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"/><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"/><line x1="16" x2="16" y1="21" y2="19"/><line x1="19" x2="21" y1="16" y2="16"/><line x1="3" x2="5" y1="8" y2="8"/><line x1="8" x2="8" y1="3" y2="5"/></svg>
package/index.d.ts ADDED
@@ -0,0 +1,34 @@
1
+ export { LexicalHtmlRenderer } from "./components/LexicalHtmlRenderer";
2
+ export { useRichTextEditor } from "./hooks/useRichTextEditor";
3
+ export { Divider } from "./ui/Divider";
4
+ export { DropDownItem } from "./ui/DropDown";
5
+ export { DropDown } from "./ui/DropDown";
6
+ export { BoldAction } from "./components/ToolbarActions/BoldAction";
7
+ export { BulletListAction } from "./components/ToolbarActions/BulletListAction";
8
+ export { CodeHighlightAction } from "./components/ToolbarActions/CodeHighlightAction";
9
+ export { FontSizeAction } from "./components/ToolbarActions/FontSizeAction";
10
+ export { ItalicAction } from "./components/ToolbarActions/ItalicAction";
11
+ export { LinkAction } from "./components/ToolbarActions/LinkAction";
12
+ export { NumberedListAction } from "./components/ToolbarActions/NumberedListAction";
13
+ export { QuoteAction } from "./components/ToolbarActions/QuoteAction";
14
+ export { UnderlineAction } from "./components/ToolbarActions/UnderlineAction";
15
+ export { HeadingToolbar } from "./components/Toolbar/HeadingToolbar";
16
+ export { ParagraphToolbar } from "./components/Toolbar/ParagraphToolbar";
17
+ export { Toolbar } from "./components/Toolbar/Toolbar";
18
+ export { ParagraphToolbarPreset } from "./components/ToolbarPresets/ParagraphToolbarPreset";
19
+ export { HeadingToolbarPreset } from "./components/ToolbarPresets/HeadingToolbarPreset";
20
+ export { RichTextEditor } from "./components/Editor/RichTextEditor";
21
+ export { HeadingEditor } from "./components/Editor/HeadingEditor";
22
+ export { ParagraphEditor } from "./components/Editor/ParagraphEditor";
23
+ export { LinkPlugin } from "@lexical/react/LexicalLinkPlugin";
24
+ export { FloatingLinkEditorPlugin } from "./plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin";
25
+ export { CodeHighlightPlugin } from "./plugins/CodeHighlightPlugin/CodeHighlightPlugin";
26
+ export { ClickableLinkPlugin } from "./plugins/ClickableLinkPlugin/ClickableLinkPlugin";
27
+ export { BlurEventPlugin } from "./plugins/BlurEventPlugin/BlurEventPlugin";
28
+ export { LexicalUpdateStatePlugin } from "./plugins/LexicalUpdateStatePlugin";
29
+ export { AddToolbarAction } from "./components/AddToolbarAction";
30
+ export { AddRichTextEditorPlugin } from "./components/AddRichTextEditorPlugin";
31
+ export { AddRichTextEditorNodeType } from "./components/AddRichTextEditorNodeType";
32
+ export { generateInitialLexicalValue } from "./utils/generateInitialLexicalValue";
33
+ export { isValidLexicalData } from "./utils/isValidLexicalData";
34
+ export * as types from "./types";