@webiny/lexical-editor 0.0.0-unstable.06b2ede40f

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 (308) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -0
  3. package/commands/image.d.ts +6 -0
  4. package/commands/image.js +4 -0
  5. package/commands/image.js.map +1 -0
  6. package/commands/index.d.ts +5 -0
  7. package/commands/index.js +7 -0
  8. package/commands/index.js.map +1 -0
  9. package/commands/list.d.ts +7 -0
  10. package/commands/list.js +6 -0
  11. package/commands/list.js.map +1 -0
  12. package/commands/quote.d.ts +5 -0
  13. package/commands/quote.js +4 -0
  14. package/commands/quote.js.map +1 -0
  15. package/commands/toolbar.d.ts +1 -0
  16. package/commands/toolbar.js +4 -0
  17. package/commands/toolbar.js.map +1 -0
  18. package/commands/typography.d.ts +8 -0
  19. package/commands/typography.js +4 -0
  20. package/commands/typography.js.map +1 -0
  21. package/components/Editor/EnsureHeadingTagPlugin.d.ts +6 -0
  22. package/components/Editor/EnsureHeadingTagPlugin.js +20 -0
  23. package/components/Editor/EnsureHeadingTagPlugin.js.map +1 -0
  24. package/components/Editor/HeadingEditor.d.ts +7 -0
  25. package/components/Editor/HeadingEditor.js +22 -0
  26. package/components/Editor/HeadingEditor.js.map +1 -0
  27. package/components/Editor/ParagraphEditor.d.ts +7 -0
  28. package/components/Editor/ParagraphEditor.js +22 -0
  29. package/components/Editor/ParagraphEditor.js.map +1 -0
  30. package/components/Editor/RichTextEditor.d.ts +49 -0
  31. package/components/Editor/RichTextEditor.js +133 -0
  32. package/components/Editor/RichTextEditor.js.map +1 -0
  33. package/components/Editor/normalizeInputValue.d.ts +6 -0
  34. package/components/Editor/normalizeInputValue.js +16 -0
  35. package/components/Editor/normalizeInputValue.js.map +1 -0
  36. package/components/LexicalEditorConfig/LexicalEditorConfig.d.ts +20 -0
  37. package/components/LexicalEditorConfig/LexicalEditorConfig.js +63 -0
  38. package/components/LexicalEditorConfig/LexicalEditorConfig.js.map +1 -0
  39. package/components/LexicalEditorConfig/components/Node.d.ts +14 -0
  40. package/components/LexicalEditorConfig/components/Node.js +30 -0
  41. package/components/LexicalEditorConfig/components/Node.js.map +1 -0
  42. package/components/LexicalEditorConfig/components/Plugin.d.ts +13 -0
  43. package/components/LexicalEditorConfig/components/Plugin.js +30 -0
  44. package/components/LexicalEditorConfig/components/Plugin.js.map +1 -0
  45. package/components/LexicalEditorConfig/components/ToolbarElement.d.ts +13 -0
  46. package/components/LexicalEditorConfig/components/ToolbarElement.js +30 -0
  47. package/components/LexicalEditorConfig/components/ToolbarElement.js.map +1 -0
  48. package/components/LexicalHtmlRenderer.d.ts +14 -0
  49. package/components/LexicalHtmlRenderer.js +55 -0
  50. package/components/LexicalHtmlRenderer.js.map +1 -0
  51. package/components/Toolbar/StaticToolbar.css +260 -0
  52. package/components/Toolbar/StaticToolbar.d.ts +5 -0
  53. package/components/Toolbar/StaticToolbar.js +22 -0
  54. package/components/Toolbar/StaticToolbar.js.map +1 -0
  55. package/components/Toolbar/Toolbar.css +643 -0
  56. package/components/Toolbar/Toolbar.d.ts +6 -0
  57. package/components/Toolbar/Toolbar.js +148 -0
  58. package/components/Toolbar/Toolbar.js.map +1 -0
  59. package/components/ToolbarActions/BoldAction.d.ts +2 -0
  60. package/components/ToolbarActions/BoldAction.js +25 -0
  61. package/components/ToolbarActions/BoldAction.js.map +1 -0
  62. package/components/ToolbarActions/BulletListAction.d.ts +2 -0
  63. package/components/ToolbarActions/BulletListAction.js +40 -0
  64. package/components/ToolbarActions/BulletListAction.js.map +1 -0
  65. package/components/ToolbarActions/CodeHighlightAction.d.ts +2 -0
  66. package/components/ToolbarActions/CodeHighlightAction.js +25 -0
  67. package/components/ToolbarActions/CodeHighlightAction.js.map +1 -0
  68. package/components/ToolbarActions/FontColorAction.d.ts +29 -0
  69. package/components/ToolbarActions/FontColorAction.js +50 -0
  70. package/components/ToolbarActions/FontColorAction.js.map +1 -0
  71. package/components/ToolbarActions/FontSizeAction.d.ts +14 -0
  72. package/components/ToolbarActions/FontSizeAction.js +91 -0
  73. package/components/ToolbarActions/FontSizeAction.js.map +1 -0
  74. package/components/ToolbarActions/ImageAction.d.ts +2 -0
  75. package/components/ToolbarActions/ImageAction.js +37 -0
  76. package/components/ToolbarActions/ImageAction.js.map +1 -0
  77. package/components/ToolbarActions/ItalicAction.d.ts +2 -0
  78. package/components/ToolbarActions/ItalicAction.js +25 -0
  79. package/components/ToolbarActions/ItalicAction.js.map +1 -0
  80. package/components/ToolbarActions/LinkAction.d.ts +2 -0
  81. package/components/ToolbarActions/LinkAction.js +37 -0
  82. package/components/ToolbarActions/LinkAction.js.map +1 -0
  83. package/components/ToolbarActions/NumberedListAction.d.ts +2 -0
  84. package/components/ToolbarActions/NumberedListAction.js +48 -0
  85. package/components/ToolbarActions/NumberedListAction.js.map +1 -0
  86. package/components/ToolbarActions/QuoteAction.d.ts +2 -0
  87. package/components/ToolbarActions/QuoteAction.js +33 -0
  88. package/components/ToolbarActions/QuoteAction.js.map +1 -0
  89. package/components/ToolbarActions/TextAlignmentAction.d.ts +29 -0
  90. package/components/ToolbarActions/TextAlignmentAction.js +61 -0
  91. package/components/ToolbarActions/TextAlignmentAction.js.map +1 -0
  92. package/components/ToolbarActions/TypographyAction.d.ts +29 -0
  93. package/components/ToolbarActions/TypographyAction.js +108 -0
  94. package/components/ToolbarActions/TypographyAction.js.map +1 -0
  95. package/components/ToolbarActions/UnderlineAction.d.ts +2 -0
  96. package/components/ToolbarActions/UnderlineAction.js +24 -0
  97. package/components/ToolbarActions/UnderlineAction.js.map +1 -0
  98. package/context/FontColorActionContext.d.ts +6 -0
  99. package/context/FontColorActionContext.js +4 -0
  100. package/context/FontColorActionContext.js.map +1 -0
  101. package/context/RichTextEditorContext.d.ts +19 -0
  102. package/context/RichTextEditorContext.js +21 -0
  103. package/context/RichTextEditorContext.js.map +1 -0
  104. package/context/SharedHistoryContext.d.ts +10 -0
  105. package/context/SharedHistoryContext.js +19 -0
  106. package/context/SharedHistoryContext.js.map +1 -0
  107. package/context/TextAlignmentActionContextProps.d.ts +9 -0
  108. package/context/TextAlignmentActionContextProps.js +4 -0
  109. package/context/TextAlignmentActionContextProps.js.map +1 -0
  110. package/context/TypographyActionContext.d.ts +8 -0
  111. package/context/TypographyActionContext.js +4 -0
  112. package/context/TypographyActionContext.js.map +1 -0
  113. package/hooks/index.d.ts +8 -0
  114. package/hooks/index.js +10 -0
  115. package/hooks/index.js.map +1 -0
  116. package/hooks/useCurrentElement.d.ts +7 -0
  117. package/hooks/useCurrentElement.js +27 -0
  118. package/hooks/useCurrentElement.js.map +1 -0
  119. package/hooks/useCurrentSelection.d.ts +13 -0
  120. package/hooks/useCurrentSelection.js +57 -0
  121. package/hooks/useCurrentSelection.js.map +1 -0
  122. package/hooks/useFontColorPicker.d.ts +2 -0
  123. package/hooks/useFontColorPicker.js +11 -0
  124. package/hooks/useFontColorPicker.js.map +1 -0
  125. package/hooks/useIsMounted.d.ts +1 -0
  126. package/hooks/useIsMounted.js +12 -0
  127. package/hooks/useIsMounted.js.map +1 -0
  128. package/hooks/useList.d.ts +2 -0
  129. package/hooks/useList.js +50 -0
  130. package/hooks/useList.js.map +1 -0
  131. package/hooks/useQuote.d.ts +2 -0
  132. package/hooks/useQuote.js +17 -0
  133. package/hooks/useQuote.js.map +1 -0
  134. package/hooks/useRichTextEditor.d.ts +2 -0
  135. package/hooks/useRichTextEditor.js +11 -0
  136. package/hooks/useRichTextEditor.js.map +1 -0
  137. package/hooks/useTextAlignmentAction.d.ts +1 -0
  138. package/hooks/useTextAlignmentAction.js +11 -0
  139. package/hooks/useTextAlignmentAction.js.map +1 -0
  140. package/hooks/useTypographyAction.d.ts +1 -0
  141. package/hooks/useTypographyAction.js +11 -0
  142. package/hooks/useTypographyAction.js.map +1 -0
  143. package/images/icons/LICENSE.md +5 -0
  144. package/images/icons/chat-square-quote.svg +1 -0
  145. package/images/icons/chevron-down.svg +1 -0
  146. package/images/icons/code.svg +1 -0
  147. package/images/icons/font-color.svg +1 -0
  148. package/images/icons/indent.svg +3 -0
  149. package/images/icons/insert-image.svg +4 -0
  150. package/images/icons/justify.svg +3 -0
  151. package/images/icons/link.svg +1 -0
  152. package/images/icons/list-ol.svg +1 -0
  153. package/images/icons/list-ul.svg +1 -0
  154. package/images/icons/outdent.svg +3 -0
  155. package/images/icons/pencil-fill.svg +1 -0
  156. package/images/icons/text-center.svg +1 -0
  157. package/images/icons/text-left.svg +1 -0
  158. package/images/icons/text-paragraph.svg +1 -0
  159. package/images/icons/text-right.svg +1 -0
  160. package/images/icons/type-bold.svg +1 -0
  161. package/images/icons/type-h1.svg +1 -0
  162. package/images/icons/type-h2.svg +1 -0
  163. package/images/icons/type-h3.svg +1 -0
  164. package/images/icons/type-h4.svg +1 -0
  165. package/images/icons/type-h5.svg +1 -0
  166. package/images/icons/type-h6.svg +1 -0
  167. package/images/icons/type-italic.svg +1 -0
  168. package/images/icons/type-strikethrough.svg +1 -0
  169. package/images/icons/type-underline.svg +1 -0
  170. package/images/icons/unlink_icon.svg +1 -0
  171. package/index.d.ts +37 -0
  172. package/index.js +50 -0
  173. package/index.js.map +1 -0
  174. package/package.json +40 -0
  175. package/plugins/BlurEventPlugin/BlurEventPlugin.d.ts +7 -0
  176. package/plugins/BlurEventPlugin/BlurEventPlugin.js +20 -0
  177. package/plugins/BlurEventPlugin/BlurEventPlugin.js.map +1 -0
  178. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.d.ts +1 -0
  179. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js +14 -0
  180. package/plugins/CodeHighlightPlugin/CodeHighlightPlugin.js.map +1 -0
  181. package/plugins/CodeHighlightPlugin/index.d.ts +1 -0
  182. package/plugins/CodeHighlightPlugin/index.js +3 -0
  183. package/plugins/CodeHighlightPlugin/index.js.map +1 -0
  184. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.d.ts +16 -0
  185. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js +158 -0
  186. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js.map +1 -0
  187. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorController.d.ts +8 -0
  188. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorController.js +62 -0
  189. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorController.js.map +1 -0
  190. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.css +176 -0
  191. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.d.ts +7 -0
  192. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js +14 -0
  193. package/plugins/FloatingLinkEditorPlugin/FloatingLinkEditorPlugin.js.map +1 -0
  194. package/plugins/FloatingLinkEditorPlugin/LinkEditForm.d.ts +8 -0
  195. package/plugins/FloatingLinkEditorPlugin/LinkEditForm.js +104 -0
  196. package/plugins/FloatingLinkEditorPlugin/LinkEditForm.js.map +1 -0
  197. package/plugins/FloatingLinkEditorPlugin/LinkPreviewForm.d.ts +9 -0
  198. package/plugins/FloatingLinkEditorPlugin/LinkPreviewForm.js +34 -0
  199. package/plugins/FloatingLinkEditorPlugin/LinkPreviewForm.js.map +1 -0
  200. package/plugins/FloatingLinkEditorPlugin/index.d.ts +1 -0
  201. package/plugins/FloatingLinkEditorPlugin/index.js +3 -0
  202. package/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
  203. package/plugins/FloatingLinkEditorPlugin/isChildOfLinkEditor.d.ts +1 -0
  204. package/plugins/FloatingLinkEditorPlugin/isChildOfLinkEditor.js +12 -0
  205. package/plugins/FloatingLinkEditorPlugin/isChildOfLinkEditor.js.map +1 -0
  206. package/plugins/FontColorPlugin/FontColorPlugin.d.ts +1 -0
  207. package/plugins/FontColorPlugin/FontColorPlugin.js +27 -0
  208. package/plugins/FontColorPlugin/FontColorPlugin.js.map +1 -0
  209. package/plugins/FontColorPlugin/applyColorToNode.d.ts +3 -0
  210. package/plugins/FontColorPlugin/applyColorToNode.js +8 -0
  211. package/plugins/FontColorPlugin/applyColorToNode.js.map +1 -0
  212. package/plugins/FontColorPlugin/applyColorToSelection.d.ts +3 -0
  213. package/plugins/FontColorPlugin/applyColorToSelection.js +66 -0
  214. package/plugins/FontColorPlugin/applyColorToSelection.js.map +1 -0
  215. package/plugins/ImagesPlugin/ImagesPlugin.d.ts +12 -0
  216. package/plugins/ImagesPlugin/ImagesPlugin.js +151 -0
  217. package/plugins/ImagesPlugin/ImagesPlugin.js.map +1 -0
  218. package/plugins/LinkPlugin/LinkPlugin.d.ts +5 -0
  219. package/plugins/LinkPlugin/LinkPlugin.js +59 -0
  220. package/plugins/LinkPlugin/LinkPlugin.js.map +1 -0
  221. package/plugins/ListPLugin/ListPlugin.d.ts +1 -0
  222. package/plugins/ListPLugin/ListPlugin.js +17 -0
  223. package/plugins/ListPLugin/ListPlugin.js.map +1 -0
  224. package/plugins/QuoteNodePlugin/QuoteNodePlugin.d.ts +1 -0
  225. package/plugins/QuoteNodePlugin/QuoteNodePlugin.js +18 -0
  226. package/plugins/QuoteNodePlugin/QuoteNodePlugin.js.map +1 -0
  227. package/plugins/StateHandlingPlugin.d.ts +8 -0
  228. package/plugins/StateHandlingPlugin.js +75 -0
  229. package/plugins/StateHandlingPlugin.js.map +1 -0
  230. package/plugins/TypographyPlugin/TypographyPlugin.d.ts +1 -0
  231. package/plugins/TypographyPlugin/TypographyPlugin.js +27 -0
  232. package/plugins/TypographyPlugin/TypographyPlugin.js.map +1 -0
  233. package/types.d.ts +12 -0
  234. package/types.js +9 -0
  235. package/types.js.map +1 -0
  236. package/ui/ContentEditable.css +22 -0
  237. package/ui/ContentEditable.d.ts +12 -0
  238. package/ui/ContentEditable.js +19 -0
  239. package/ui/ContentEditable.js.map +1 -0
  240. package/ui/Divider.d.ts +2 -0
  241. package/ui/Divider.js +8 -0
  242. package/ui/Divider.js.map +1 -0
  243. package/ui/DropDown.d.ts +25 -0
  244. package/ui/DropDown.js +182 -0
  245. package/ui/DropDown.js.map +1 -0
  246. package/ui/ImageResizer.d.ts +24 -0
  247. package/ui/ImageResizer.js +211 -0
  248. package/ui/ImageResizer.js.map +1 -0
  249. package/ui/Input.css +32 -0
  250. package/ui/LinkPreview.css +69 -0
  251. package/ui/LinkPreview.d.ts +12 -0
  252. package/ui/LinkPreview.js +97 -0
  253. package/ui/LinkPreview.js.map +1 -0
  254. package/ui/Placeholder.css +20 -0
  255. package/ui/Placeholder.d.ts +15 -0
  256. package/ui/Placeholder.js +24 -0
  257. package/ui/Placeholder.js.map +1 -0
  258. package/ui/TextInput.d.ts +18 -0
  259. package/ui/TextInput.js +34 -0
  260. package/ui/TextInput.js.map +1 -0
  261. package/ui/ToolbarActionDialog.d.ts +11 -0
  262. package/ui/ToolbarActionDialog.js +77 -0
  263. package/ui/ToolbarActionDialog.js.map +1 -0
  264. package/utils/canUseDOM.d.ts +1 -0
  265. package/utils/canUseDOM.js +3 -0
  266. package/utils/canUseDOM.js.map +1 -0
  267. package/utils/files.d.ts +11 -0
  268. package/utils/files.js +21 -0
  269. package/utils/files.js.map +1 -0
  270. package/utils/getDOMRangeRect.d.ts +8 -0
  271. package/utils/getDOMRangeRect.js +23 -0
  272. package/utils/getDOMRangeRect.js.map +1 -0
  273. package/utils/getSelectedNode.d.ts +2 -0
  274. package/utils/getSelectedNode.js +25 -0
  275. package/utils/getSelectedNode.js.map +1 -0
  276. package/utils/getTransparentImage.d.ts +1 -0
  277. package/utils/getTransparentImage.js +5 -0
  278. package/utils/getTransparentImage.js.map +1 -0
  279. package/utils/insertImage.d.ts +2 -0
  280. package/utils/insertImage.js +16 -0
  281. package/utils/insertImage.js.map +1 -0
  282. package/utils/isAnchorLink.d.ts +1 -0
  283. package/utils/isAnchorLink.js +5 -0
  284. package/utils/isAnchorLink.js.map +1 -0
  285. package/utils/isChildOfFloatingToolbar.d.ts +1 -0
  286. package/utils/isChildOfFloatingToolbar.js +12 -0
  287. package/utils/isChildOfFloatingToolbar.js.map +1 -0
  288. package/utils/isHTMLElement.d.ts +8 -0
  289. package/utils/isHTMLElement.js +12 -0
  290. package/utils/isHTMLElement.js.map +1 -0
  291. package/utils/isValidJSON.d.ts +1 -0
  292. package/utils/isValidJSON.js +13 -0
  293. package/utils/isValidJSON.js.map +1 -0
  294. package/utils/isValidLexicalData.d.ts +4 -0
  295. package/utils/isValidLexicalData.js +24 -0
  296. package/utils/isValidLexicalData.js.map +1 -0
  297. package/utils/point.d.ts +21 -0
  298. package/utils/point.js +49 -0
  299. package/utils/point.js.map +1 -0
  300. package/utils/rect.d.ts +45 -0
  301. package/utils/rect.js +130 -0
  302. package/utils/rect.js.map +1 -0
  303. package/utils/sanitizeUrl.d.ts +1 -0
  304. package/utils/sanitizeUrl.js +25 -0
  305. package/utils/sanitizeUrl.js.map +1 -0
  306. package/utils/setFloatingElemPosition.d.ts +1 -0
  307. package/utils/setFloatingElemPosition.js +30 -0
  308. package/utils/setFloatingElemPosition.js.map +1 -0
@@ -0,0 +1,643 @@
1
+ .floating-toolbar {
2
+ display: flex;
3
+ padding: 4px;
4
+ vertical-align: middle;
5
+ position: absolute;
6
+ top: 0;
7
+ left: 0;
8
+ z-index: 30;
9
+ opacity: 0;
10
+ background-color: #fff;
11
+ box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
12
+ border-radius: 8px;
13
+ transition: opacity 0.5s;
14
+ height: 35px;
15
+ will-change: transform;
16
+ }
17
+
18
+ .floating-toolbar button.popup-item {
19
+ border: 0;
20
+ display: flex;
21
+ background: none;
22
+ border-radius: 10px;
23
+ padding: 8px;
24
+ cursor: pointer;
25
+ vertical-align: middle;
26
+ }
27
+
28
+ .floating-toolbar button.popup-item:disabled {
29
+ cursor: not-allowed;
30
+ }
31
+
32
+ .floating-toolbar button.popup-item.spaced {
33
+ margin-right: 2px;
34
+ }
35
+
36
+ .floating-toolbar button.popup-item i.format {
37
+ background-size: contain;
38
+ display: inline-block;
39
+ height: 18px;
40
+ width: 18px;
41
+ margin-top: 2px;
42
+ vertical-align: -0.25em;
43
+ display: flex;
44
+ opacity: 0.6;
45
+ }
46
+
47
+ .floating-toolbar button.popup-item:disabled i.format {
48
+ opacity: 0.2;
49
+ }
50
+
51
+ .floating-toolbar button.popup-item.active {
52
+ background-color: rgba(223, 232, 250, 0.3);
53
+ }
54
+
55
+ .floating-toolbar button.popup-item.active i {
56
+ opacity: 1;
57
+ }
58
+
59
+ .floating-toolbar .popup-item:hover:not([disabled]) {
60
+ background-color: #eee;
61
+ }
62
+
63
+ .floating-toolbar select.popup-item {
64
+ border: 0;
65
+ display: flex;
66
+ background: none;
67
+ border-radius: 10px;
68
+ padding: 8px;
69
+ vertical-align: middle;
70
+ -webkit-appearance: none;
71
+ -moz-appearance: none;
72
+ width: 70px;
73
+ font-size: 14px;
74
+ color: #777;
75
+ text-overflow: ellipsis;
76
+ }
77
+
78
+ .floating-toolbar select.code-language {
79
+ text-transform: capitalize;
80
+ width: 130px;
81
+ }
82
+
83
+ .floating-toolbar .popup-item .text {
84
+ display: flex;
85
+ line-height: 20px;
86
+ width: 200px;
87
+ vertical-align: middle;
88
+ font-size: 14px;
89
+ color: #777;
90
+ text-overflow: ellipsis;
91
+ width: 70px;
92
+ overflow: hidden;
93
+ height: 20px;
94
+ text-align: left;
95
+ }
96
+
97
+ .floating-toolbar .popup-item .icon {
98
+ display: flex;
99
+ width: 20px;
100
+ height: 20px;
101
+ user-select: none;
102
+ margin-right: 8px;
103
+ line-height: 16px;
104
+ background-size: contain;
105
+ }
106
+
107
+ .floating-toolbar i.chevron-down {
108
+ margin-top: 3px;
109
+ width: 16px;
110
+ height: 16px;
111
+ display: flex;
112
+ user-select: none;
113
+ }
114
+
115
+ .floating-toolbar i.chevron-down.inside {
116
+ width: 16px;
117
+ height: 16px;
118
+ display: flex;
119
+ margin-left: -25px;
120
+ margin-top: 11px;
121
+ margin-right: 10px;
122
+ pointer-events: none;
123
+ }
124
+
125
+ .floating-toolbar .divider {
126
+ width: 1px;
127
+ background-color: #eee;
128
+ margin: 0 4px;
129
+ }
130
+
131
+ i.bold {
132
+ background-image: url("../../images/icons/type-bold.svg");
133
+ }
134
+
135
+ i.italic {
136
+ background-image: url("../../images/icons/type-italic.svg");
137
+ }
138
+
139
+ i.code {
140
+ background-image: url("../../images/icons/code.svg");
141
+ }
142
+
143
+ i.underline {
144
+ background-image: url("../../images/icons/type-underline.svg");
145
+ }
146
+
147
+ i.strikethrough {
148
+ background-image: url("../../images/icons/type-strikethrough.svg");
149
+ }
150
+
151
+ i.link {
152
+ background-image: url("../../images/icons/link.svg");
153
+ }
154
+
155
+ i.quote {
156
+ background-image: url("../../images/icons/chat-square-quote.svg");
157
+ }
158
+
159
+ .icon.left-align,
160
+ i.left-align {
161
+ background-image: url("../../images/icons/text-left.svg");
162
+ }
163
+
164
+ i.center-align {
165
+ background-image: url("../../images/icons/text-center.svg");
166
+ }
167
+
168
+ i.right-align {
169
+ background-image: url("../../images/icons/text-right.svg");
170
+ }
171
+
172
+ i.indent {
173
+ background-image: url("../../images/icons/indent.svg");
174
+ }
175
+
176
+ i.outdent {
177
+ background-image: url("../../images/icons/outdent.svg");
178
+ }
179
+
180
+ i.justify-align {
181
+ background-image: url("../../images/icons/justify.svg");
182
+ }
183
+
184
+ i.chevron-down {
185
+ background-color: transparent;
186
+ background-size: contain;
187
+ display: inline-block;
188
+ height: 8px;
189
+ width: 8px;
190
+ background-image: url("../../images/icons/chevron-down.svg");
191
+ }
192
+
193
+ i.insert-image,
194
+ .icon.insert-image {
195
+ background-color: transparent;
196
+ background-size: contain;
197
+ display: inline-block;
198
+ height: 8px;
199
+ width: 8px;
200
+ background-image: url("../../images/icons/insert-image.svg");
201
+ }
202
+
203
+ .icon.bullet-list,
204
+ .icon.bullet {
205
+ background-image: url("../../images/icons/list-ul.svg");
206
+ }
207
+
208
+ .icon.numbered-list,
209
+ .icon.number {
210
+ background-image: url("../../images/icons/list-ol.svg");
211
+ }
212
+
213
+ i.font-color,
214
+ .icon.font-color {
215
+ background-image: url("../../images/icons/font-color.svg");
216
+ }
217
+
218
+ .link-editor .button.active,
219
+ .toolbar .button.active {
220
+ background-color: rgb(223, 232, 250);
221
+ }
222
+
223
+ .floating-toolbar button.toolbar-item {
224
+ border: 0;
225
+ display: flex;
226
+ background: none;
227
+ border-radius: 10px;
228
+ padding: 8px;
229
+ cursor: pointer;
230
+ vertical-align: middle;
231
+ flex-shrink: 0;
232
+ align-items: center;
233
+ justify-content: space-between;
234
+ }
235
+
236
+ .floating-toolbar button.toolbar-item:disabled {
237
+ cursor: not-allowed;
238
+ }
239
+
240
+ .floating-toolbar button.toolbar-item.spaced {
241
+ margin-right: 2px;
242
+ }
243
+
244
+ .floating-toolbar button.toolbar-item i.format {
245
+ background-size: contain;
246
+ display: inline-block;
247
+ height: 18px;
248
+ width: 18px;
249
+ vertical-align: -0.25em;
250
+ display: flex;
251
+ opacity: 0.6;
252
+ }
253
+
254
+ .floating-toolbar button.toolbar-item:disabled .icon,
255
+ .floating-toolbar button.toolbar-item:disabled .text,
256
+ .floating-toolbar button.toolbar-item:disabled i.format,
257
+ .floating-toolbar button.toolbar-item:disabled .chevron-down {
258
+ opacity: 0.2;
259
+ }
260
+
261
+ .floating-toolbar button.toolbar-item.active {
262
+ background-color: rgba(223, 232, 250, 0.3);
263
+ }
264
+
265
+ .floating-toolbar button.toolbar-item.active i {
266
+ opacity: 1;
267
+ }
268
+
269
+ .floating-toolbar .toolbar-item:hover:not([disabled]) {
270
+ background-color: #eee;
271
+ }
272
+
273
+ .floating-toolbar .toolbar-item.font-family .text {
274
+ display: block;
275
+ max-width: 40px;
276
+ }
277
+
278
+ .floating-toolbar .code-language {
279
+ width: 150px;
280
+ }
281
+
282
+ .floating-toolbar .toolbar-item .text {
283
+ display: flex;
284
+ line-height: 20px;
285
+ vertical-align: middle;
286
+ font-size: 14px;
287
+ color: #777;
288
+ text-overflow: ellipsis;
289
+ overflow: hidden;
290
+ height: 20px;
291
+ text-align: left;
292
+ padding-right: 10px;
293
+ }
294
+
295
+ .floating-toolbar .toolbar-item .icon {
296
+ display: flex;
297
+ width: 20px;
298
+ height: 20px;
299
+ user-select: none;
300
+ margin-right: 8px;
301
+ line-height: 16px;
302
+ background-size: contain;
303
+ }
304
+
305
+ .floating-toolbar i.chevron-down {
306
+ margin-top: 3px;
307
+ width: 16px;
308
+ height: 16px;
309
+ display: flex;
310
+ user-select: none;
311
+ }
312
+
313
+ .floating-toolbar i.chevron-down.inside {
314
+ width: 16px;
315
+ height: 16px;
316
+ display: flex;
317
+ margin-left: -25px;
318
+ margin-top: 11px;
319
+ margin-right: 10px;
320
+ pointer-events: none;
321
+ }
322
+
323
+ .toolbar .divider {
324
+ width: 1px;
325
+ background-color: #eee;
326
+ margin: 0 4px;
327
+ }
328
+
329
+ .lexical-dropdown-container {
330
+ position: absolute;
331
+ bottom: -5px;
332
+ left: 0;
333
+ }
334
+
335
+ .lexical-dropdown {
336
+ z-index: 10;
337
+ display: block;
338
+ position: fixed;
339
+ box-shadow: 0 12px 28px 0 rgba(0, 0, 0, 0.2), 0 2px 4px 0 rgba(0, 0, 0, 0.1),
340
+ inset 0 0 0 1px rgba(255, 255, 255, 0.5);
341
+ border-radius: 8px;
342
+ min-height: 40px;
343
+ background-color: #fff;
344
+ max-height: 250px;
345
+ overflow: hidden;
346
+ overflow-y: auto;
347
+ }
348
+
349
+ .lexical-dropdown.no-scroll {
350
+ max-height: inherit;
351
+ overflow: auto;
352
+ overflow-y: auto;
353
+ }
354
+
355
+ .lexical-dropdown .item {
356
+ margin: 0 8px 0 8px;
357
+ padding: 8px;
358
+ color: #050505;
359
+ cursor: pointer;
360
+ line-height: 16px;
361
+ font-size: 15px;
362
+ display: flex;
363
+ align-content: center;
364
+ flex-direction: row;
365
+ flex-shrink: 0;
366
+ justify-content: space-between;
367
+ background-color: #fff;
368
+ border-radius: 8px;
369
+ border: 0;
370
+ max-width: 250px;
371
+ min-width: 100px;
372
+ }
373
+
374
+ .lexical-dropdown .item.fontsize-item,
375
+ .lexical-dropdown .item.fontsize-item .text {
376
+ min-width: unset;
377
+ }
378
+
379
+ .lexical-dropdown .item .active {
380
+ display: flex;
381
+ width: 20px;
382
+ height: 20px;
383
+ background-size: contain;
384
+ }
385
+
386
+ .lexical-dropdown .item:first-child {
387
+ margin-top: 8px;
388
+ }
389
+
390
+ .lexical-dropdown .item:last-child {
391
+ margin-bottom: 8px;
392
+ }
393
+
394
+ .lexical-dropdown .item:hover {
395
+ background-color: #eee;
396
+ }
397
+
398
+ .lexical-dropdown .item .text {
399
+ display: flex;
400
+ line-height: 20px;
401
+ flex-grow: 1;
402
+ min-width: 150px;
403
+ }
404
+
405
+ .lexical-dropdown .item .icon {
406
+ display: flex;
407
+ width: 20px;
408
+ height: 20px;
409
+ user-select: none;
410
+ margin-right: 12px;
411
+ line-height: 16px;
412
+ background-size: contain;
413
+ background-position: center;
414
+ background-repeat: no-repeat;
415
+ }
416
+
417
+ .lexical-dropdown .divider {
418
+ width: auto;
419
+ background-color: #eee;
420
+ margin: 4px 8px;
421
+ height: 1px;
422
+ }
423
+
424
+ @media screen and (max-width: 1100px) {
425
+ .dropdown-button-text {
426
+ display: none !important;
427
+ }
428
+ .font-size .dropdown-button-text {
429
+ display: flex !important;
430
+ }
431
+ .code-language .dropdown-button-text {
432
+ display: flex !important;
433
+ }
434
+ }
435
+
436
+ button.item i {
437
+ opacity: 0.6;
438
+ }
439
+
440
+ button.item.dropdown-item-active {
441
+ background-color: rgba(223, 232, 250, 0.3);
442
+ }
443
+
444
+ button.item.dropdown-item-active i {
445
+ opacity: 1;
446
+ }
447
+
448
+ .editor-shell span.editor-image {
449
+ cursor: default;
450
+ display: inline-block;
451
+ position: relative;
452
+ user-select: none;
453
+ }
454
+
455
+ .editor-shell .editor-image img {
456
+ max-width: 100%;
457
+ cursor: default;
458
+ }
459
+
460
+ .editor-shell .editor-image img.focused {
461
+ outline: 2px solid rgb(60, 132, 244);
462
+ user-select: none;
463
+ }
464
+
465
+ .editor-shell .editor-image img.focused.draggable {
466
+ cursor: grab;
467
+ }
468
+
469
+ .editor-shell .editor-image img.focused.draggable:active {
470
+ cursor: grabbing;
471
+ }
472
+
473
+ .editor-shell .editor-image .image-caption-container .tree-view-output {
474
+ margin: 0;
475
+ border-radius: 0;
476
+ }
477
+
478
+ .editor-shell .editor-image .image-caption-container {
479
+ display: block;
480
+ position: absolute;
481
+ bottom: 4px;
482
+ left: 0;
483
+ right: 0;
484
+ padding: 0;
485
+ margin: 0;
486
+ border-top: 1px solid #fff;
487
+ background-color: #ffffffe6;
488
+ min-width: 100px;
489
+ color: #000;
490
+ overflow: hidden;
491
+ }
492
+
493
+ .editor-shell .editor-image .image-caption-button {
494
+ display: block;
495
+ position: absolute;
496
+ bottom: 20px;
497
+ left: 0;
498
+ right: 0;
499
+ width: 30%;
500
+ padding: 10px;
501
+ margin: 0 auto;
502
+ border: 1px solid rgba(255, 255, 255, 0.3);
503
+ border-radius: 5px;
504
+ background-color: #00000080;
505
+ min-width: 100px;
506
+ color: #fff;
507
+ cursor: pointer;
508
+ user-select: none;
509
+ }
510
+
511
+ .editor-shell .editor-image .image-caption-button:hover {
512
+ background-color: #3c84f480;
513
+ }
514
+
515
+ .editor-shell .editor-image .image-resizer {
516
+ display: block;
517
+ width: 7px;
518
+ height: 7px;
519
+ position: absolute;
520
+ background-color: #3c84f4;
521
+ border: 1px solid #fff;
522
+ }
523
+
524
+ .editor-shell .editor-image .image-resizer.image-resizer-n {
525
+ top: -6px;
526
+ left: 48%;
527
+ cursor: n-resize;
528
+ }
529
+
530
+ .editor-shell .editor-image .image-resizer.image-resizer-ne {
531
+ top: -6px;
532
+ right: -6px;
533
+ cursor: ne-resize;
534
+ }
535
+
536
+ .editor-shell .editor-image .image-resizer.image-resizer-e {
537
+ bottom: 48%;
538
+ right: -6px;
539
+ cursor: e-resize;
540
+ }
541
+
542
+ .editor-shell .editor-image .image-resizer.image-resizer-se {
543
+ bottom: -2px;
544
+ right: -6px;
545
+ cursor: nwse-resize;
546
+ }
547
+
548
+ .editor-shell .editor-image .image-resizer.image-resizer-s {
549
+ bottom: -2px;
550
+ left: 48%;
551
+ cursor: s-resize;
552
+ }
553
+
554
+ .editor-shell .editor-image .image-resizer.image-resizer-sw {
555
+ bottom: -2px;
556
+ left: -6px;
557
+ cursor: sw-resize;
558
+ }
559
+
560
+ .editor-shell .editor-image .image-resizer.image-resizer-w {
561
+ bottom: 48%;
562
+ left: -6px;
563
+ cursor: w-resize;
564
+ }
565
+
566
+ .editor-shell .editor-image .image-resizer.image-resizer-nw {
567
+ top: -6px;
568
+ left: -6px;
569
+ cursor: nw-resize;
570
+ }
571
+
572
+ .editor-shell span.inline-editor-image {
573
+ cursor: default;
574
+ display: inline-block;
575
+ position: relative;
576
+ z-index: 1;
577
+ }
578
+
579
+ .editor-shell .inline-editor-image img {
580
+ max-width: 100%;
581
+ cursor: default;
582
+ }
583
+
584
+ .editor-shell .inline-editor-image img.focused {
585
+ outline: 2px solid rgb(60, 132, 244);
586
+ }
587
+
588
+ .editor-shell .inline-editor-image img.focused.draggable {
589
+ cursor: grab;
590
+ }
591
+
592
+ .editor-shell .inline-editor-image img.focused.draggable:active {
593
+ cursor: grabbing;
594
+ }
595
+
596
+ .editor-shell .inline-editor-image .image-caption-container .tree-view-output {
597
+ margin: 0;
598
+ border-radius: 0;
599
+ }
600
+
601
+ .editor-shell .inline-editor-image.position-full {
602
+ margin: 1em 0;
603
+ }
604
+
605
+ .editor-shell .inline-editor-image.position-left {
606
+ float: left;
607
+ width: 50%;
608
+ margin: 1em 1em 0 0;
609
+ }
610
+
611
+ .editor-shell .inline-editor-image.position-right {
612
+ float: right;
613
+ width: 50%;
614
+ margin: 1em 0 0 1em;
615
+ }
616
+
617
+ .editor-shell .inline-editor-image .image-edit-button {
618
+ display: block;
619
+ position: absolute;
620
+ top: 12px;
621
+ right: 12px;
622
+ padding: 6px 8px;
623
+ margin: 0 auto;
624
+ border: 1px solid rgba(255, 255, 255, 0.3);
625
+ border-radius: 5px;
626
+ background-color: #00000080;
627
+ min-width: 60px;
628
+ color: #fff;
629
+ cursor: pointer;
630
+ user-select: none;
631
+ }
632
+
633
+ .editor-shell .inline-editor-image .image-edit-button:hover {
634
+ background-color: #3c84f480;
635
+ }
636
+
637
+ .editor-shell .inline-editor-image .image-caption-container {
638
+ display: block;
639
+ background-color: #f4f4f4;
640
+ min-width: 100%;
641
+ color: #000;
642
+ overflow: hidden;
643
+ }
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import "./Toolbar.css";
3
+ export interface ToolbarProps {
4
+ anchorElem?: HTMLElement;
5
+ }
6
+ export declare const Toolbar: ({ anchorElem }: ToolbarProps) => React.ReactPortal | null;