@webiny/lexical-editor 6.0.0-beta.0 → 6.0.0-rc.0

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