@scottjgilbert/lexical-blog-editor 0.1.4 → 1.0.0-beta.2

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 (313) hide show
  1. package/README.md +73 -67
  2. package/build/Editor.d.ts +8 -3
  3. package/build/Editor.d.ts.map +1 -1
  4. package/build/Editor.js +13 -8
  5. package/build/EditorExport.d.ts +4 -0
  6. package/build/EditorExport.d.ts.map +1 -0
  7. package/build/EditorExport.js +13 -0
  8. package/build/appSettings.d.ts +1 -1
  9. package/build/appSettings.js +1 -1
  10. package/build/buildHTMLConfig.d.ts +1 -1
  11. package/build/buildHTMLConfig.d.ts.map +1 -1
  12. package/build/buildHTMLConfig.js +35 -11
  13. package/build/context/FlashMessageContext.d.ts +2 -2
  14. package/build/context/FlashMessageContext.d.ts.map +1 -1
  15. package/build/context/FlashMessageContext.js +4 -3
  16. package/build/context/SharedHistoryContext.d.ts +3 -3
  17. package/build/context/SharedHistoryContext.d.ts.map +1 -1
  18. package/build/context/SharedHistoryContext.js +3 -2
  19. package/build/context/ToolbarContext.d.ts +1 -0
  20. package/build/context/ToolbarContext.d.ts.map +1 -1
  21. package/build/context/ToolbarContext.js +2 -0
  22. package/build/hooks/useModal.d.ts.map +1 -1
  23. package/build/hooks/useModal.js +1 -0
  24. package/build/hooks/useReport.d.ts +0 -7
  25. package/build/hooks/useReport.d.ts.map +1 -1
  26. package/build/hooks/useReport.js +1 -0
  27. package/build/index.css +283 -246
  28. package/build/index.d.ts +3 -3
  29. package/build/index.d.ts.map +1 -1
  30. package/build/index.js +2 -2
  31. package/build/nodes/CodeNode/CodeHighlightNode.d.ts +35 -0
  32. package/build/nodes/CodeNode/CodeHighlightNode.d.ts.map +1 -0
  33. package/build/nodes/CodeNode/CodeHighlightNode.js +88 -0
  34. package/build/nodes/CodeNode/CodeHighlighterShiki.d.ts +22 -0
  35. package/build/nodes/CodeNode/CodeHighlighterShiki.d.ts.map +1 -0
  36. package/build/nodes/CodeNode/CodeHighlighterShiki.js +644 -0
  37. package/build/nodes/CodeNode/CodeNode.d.ts +48 -0
  38. package/build/nodes/CodeNode/CodeNode.d.ts.map +1 -0
  39. package/build/nodes/CodeNode/CodeNode.js +367 -0
  40. package/build/nodes/CodeNode/FacadeShiki.d.ts +18 -0
  41. package/build/nodes/CodeNode/FacadeShiki.d.ts.map +1 -0
  42. package/build/nodes/CodeNode/FacadeShiki.js +159 -0
  43. package/build/nodes/CodeNode/FlatStructureUtils.d.ts +21 -0
  44. package/build/nodes/CodeNode/FlatStructureUtils.d.ts.map +1 -0
  45. package/build/nodes/CodeNode/FlatStructureUtils.js +85 -0
  46. package/build/nodes/CodeNode/invariant.d.ts +2 -0
  47. package/build/nodes/CodeNode/invariant.d.ts.map +1 -0
  48. package/build/nodes/CodeNode/invariant.js +6 -0
  49. package/build/nodes/DateTimeNode/DateTimeComponent.d.ts.map +1 -1
  50. package/build/nodes/DateTimeNode/DateTimeComponent.js +1 -0
  51. package/build/nodes/DateTimeNode/DateTimeNode.css +21 -0
  52. package/build/nodes/FigmaNode/FigmaNode.d.ts.map +1 -0
  53. package/build/nodes/FigmaNode/ServerFigmaNode.d.ts +21 -0
  54. package/build/nodes/FigmaNode/ServerFigmaNode.d.ts.map +1 -0
  55. package/build/nodes/FigmaNode/ServerFigmaNode.js +48 -0
  56. package/build/nodes/ImageComponent.d.ts.map +1 -1
  57. package/build/nodes/ImageComponent.js +1 -2
  58. package/build/nodes/ImageNode.d.ts +7 -7
  59. package/build/nodes/ImageNode.d.ts.map +1 -1
  60. package/build/nodes/ImageNode.js +30 -30
  61. package/build/nodes/LayoutContainerNode.d.ts +2 -2
  62. package/build/nodes/LayoutContainerNode.d.ts.map +1 -1
  63. package/build/nodes/LayoutContainerNode.js +10 -10
  64. package/build/nodes/PlaygroundNodes/PlaygroundNodes.d.ts.map +1 -0
  65. package/build/nodes/{PlaygroundNodes.js → PlaygroundNodes/PlaygroundNodes.js} +19 -21
  66. package/build/nodes/PlaygroundNodes/ServerPlaygroundNodes.d.ts +11 -0
  67. package/build/nodes/PlaygroundNodes/ServerPlaygroundNodes.d.ts.map +1 -0
  68. package/build/nodes/PlaygroundNodes/ServerPlaygroundNodes.js +65 -0
  69. package/build/nodes/TweetNode/ServerTweetNode.d.ts +20 -0
  70. package/build/nodes/TweetNode/ServerTweetNode.d.ts.map +1 -0
  71. package/build/nodes/TweetNode/ServerTweetNode.js +59 -0
  72. package/build/nodes/TweetNode/TweetNode.d.ts.map +1 -0
  73. package/build/nodes/YouTubeNode/ServerYouTubeNode.d.ts +21 -0
  74. package/build/nodes/YouTubeNode/ServerYouTubeNode.d.ts.map +1 -0
  75. package/build/nodes/YouTubeNode/ServerYouTubeNode.js +67 -0
  76. package/build/nodes/YouTubeNode/YouTubeNode.d.ts.map +1 -0
  77. package/build/plugins/ActionsPlugin/index.d.ts +0 -7
  78. package/build/plugins/ActionsPlugin/index.d.ts.map +1 -1
  79. package/build/plugins/ActionsPlugin/index.js +2 -1
  80. package/build/plugins/AutoEmbedPlugin/index.d.ts +2 -9
  81. package/build/plugins/AutoEmbedPlugin/index.d.ts.map +1 -1
  82. package/build/plugins/AutoEmbedPlugin/index.js +30 -29
  83. package/build/plugins/AutoLinkPlugin/index.d.ts +1 -1
  84. package/build/plugins/AutoLinkPlugin/index.d.ts.map +1 -1
  85. package/build/plugins/AutoLinkPlugin/index.js +3 -2
  86. package/build/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +1 -1
  87. package/build/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts.map +1 -1
  88. package/build/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +7 -6
  89. package/build/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +2 -2
  90. package/build/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts.map +1 -1
  91. package/build/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js +25 -24
  92. package/build/plugins/CodeActionMenuPlugin/index.d.ts +2 -9
  93. package/build/plugins/CodeActionMenuPlugin/index.d.ts.map +1 -1
  94. package/build/plugins/CodeActionMenuPlugin/index.js +22 -20
  95. package/build/plugins/CodeActionMenuPlugin/utils.d.ts.map +1 -1
  96. package/build/plugins/CodeActionMenuPlugin/utils.js +3 -2
  97. package/build/plugins/CodeHighlightPrismPlugin/index.d.ts +1 -1
  98. package/build/plugins/CodeHighlightPrismPlugin/index.d.ts.map +1 -1
  99. package/build/plugins/CodeHighlightPrismPlugin/index.js +4 -10
  100. package/build/plugins/CodeHighlightShikiPlugin/index.d.ts +1 -1
  101. package/build/plugins/CodeHighlightShikiPlugin/index.d.ts.map +1 -1
  102. package/build/plugins/CodeHighlightShikiPlugin/index.js +3 -3
  103. package/build/plugins/CollapsiblePlugin/Collapsible.css +17 -1
  104. package/build/plugins/CollapsiblePlugin/index.d.ts +1 -1
  105. package/build/plugins/CollapsiblePlugin/index.d.ts.map +1 -1
  106. package/build/plugins/CollapsiblePlugin/index.js +11 -10
  107. package/build/plugins/ComponentPickerPlugin/index.d.ts.map +1 -1
  108. package/build/plugins/ComponentPickerPlugin/index.js +3 -8
  109. package/build/plugins/ContextMenuPlugin/index.d.ts +1 -1
  110. package/build/plugins/ContextMenuPlugin/index.d.ts.map +1 -1
  111. package/build/plugins/ContextMenuPlugin/index.js +15 -14
  112. package/build/plugins/DateTimePlugin/index.d.ts +2 -2
  113. package/build/plugins/DateTimePlugin/index.d.ts.map +1 -1
  114. package/build/plugins/DateTimePlugin/index.js +8 -14
  115. package/build/plugins/DragDropPastePlugin/index.d.ts +0 -7
  116. package/build/plugins/DragDropPastePlugin/index.d.ts.map +1 -1
  117. package/build/plugins/DragDropPastePlugin/index.js +12 -11
  118. package/build/plugins/DraggableBlockPlugin/index.css +6 -0
  119. package/build/plugins/DraggableBlockPlugin/index.d.ts +2 -2
  120. package/build/plugins/DraggableBlockPlugin/index.d.ts.map +1 -1
  121. package/build/plugins/DraggableBlockPlugin/index.js +23 -22
  122. package/build/plugins/EmojiPickerPlugin/index.d.ts +0 -7
  123. package/build/plugins/EmojiPickerPlugin/index.d.ts.map +1 -1
  124. package/build/plugins/EmojiPickerPlugin/index.js +1 -0
  125. package/build/plugins/EmojisPlugin/index.d.ts +1 -8
  126. package/build/plugins/EmojisPlugin/index.d.ts.map +1 -1
  127. package/build/plugins/EmojisPlugin/index.js +10 -16
  128. package/build/plugins/EquationsPlugin/index.d.ts +3 -3
  129. package/build/plugins/EquationsPlugin/index.d.ts.map +1 -1
  130. package/build/plugins/EquationsPlugin/index.js +14 -10
  131. package/build/plugins/FigmaPlugin/index.d.ts +2 -2
  132. package/build/plugins/FigmaPlugin/index.d.ts.map +1 -1
  133. package/build/plugins/FigmaPlugin/index.js +8 -14
  134. package/build/plugins/FloatingLinkEditorPlugin/index.css +11 -0
  135. package/build/plugins/FloatingLinkEditorPlugin/index.d.ts +3 -3
  136. package/build/plugins/FloatingLinkEditorPlugin/index.d.ts.map +1 -1
  137. package/build/plugins/FloatingLinkEditorPlugin/index.js +28 -27
  138. package/build/plugins/FloatingTextFormatToolbarPlugin/index.css +15 -0
  139. package/build/plugins/FloatingTextFormatToolbarPlugin/index.d.ts.map +1 -1
  140. package/build/plugins/FloatingTextFormatToolbarPlugin/index.js +2 -1
  141. package/build/plugins/ImagesPlugin/index.d.ts +3 -3
  142. package/build/plugins/ImagesPlugin/index.d.ts.map +1 -1
  143. package/build/plugins/ImagesPlugin/index.js +38 -37
  144. package/build/plugins/KeywordsPlugin/index.d.ts +1 -8
  145. package/build/plugins/KeywordsPlugin/index.d.ts.map +1 -1
  146. package/build/plugins/KeywordsPlugin/index.js +6 -12
  147. package/build/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +2 -2
  148. package/build/plugins/LayoutPlugin/InsertLayoutDialog.d.ts.map +1 -1
  149. package/build/plugins/LayoutPlugin/InsertLayoutDialog.js +10 -9
  150. package/build/plugins/LayoutPlugin/LayoutPlugin.d.ts +1 -1
  151. package/build/plugins/LayoutPlugin/LayoutPlugin.d.ts.map +1 -1
  152. package/build/plugins/LayoutPlugin/LayoutPlugin.js +8 -14
  153. package/build/plugins/LinkPlugin/index.d.ts.map +1 -1
  154. package/build/plugins/LinkPlugin/index.js +1 -0
  155. package/build/plugins/MarkdownShortcutPlugin/index.d.ts.map +1 -1
  156. package/build/plugins/MarkdownShortcutPlugin/index.js +1 -0
  157. package/build/plugins/MarkdownTransformers/index.d.ts +1 -1
  158. package/build/plugins/MarkdownTransformers/index.d.ts.map +1 -1
  159. package/build/plugins/MarkdownTransformers/index.js +25 -25
  160. package/build/plugins/PasteLogPlugin/index.d.ts.map +1 -1
  161. package/build/plugins/PasteLogPlugin/index.js +1 -0
  162. package/build/plugins/ShortcutsPlugin/index.d.ts +0 -7
  163. package/build/plugins/ShortcutsPlugin/index.d.ts.map +1 -1
  164. package/build/plugins/ShortcutsPlugin/index.js +1 -0
  165. package/build/plugins/SpeechToTextPlugin/index.d.ts +2 -2
  166. package/build/plugins/SpeechToTextPlugin/index.d.ts.map +1 -1
  167. package/build/plugins/SpeechToTextPlugin/index.js +7 -11
  168. package/build/plugins/TabFocusPlugin/index.d.ts +0 -7
  169. package/build/plugins/TabFocusPlugin/index.d.ts.map +1 -1
  170. package/build/plugins/TabFocusPlugin/index.js +6 -5
  171. package/build/plugins/TableActionMenuPlugin/index.d.ts +1 -8
  172. package/build/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  173. package/build/plugins/TableActionMenuPlugin/index.js +41 -40
  174. package/build/plugins/TableCellResizer/index.d.ts +2 -2
  175. package/build/plugins/TableCellResizer/index.d.ts.map +1 -1
  176. package/build/plugins/TableCellResizer/index.js +43 -42
  177. package/build/plugins/TableHoverActionsPlugin/index.d.ts +1 -8
  178. package/build/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -1
  179. package/build/plugins/TableHoverActionsPlugin/index.js +19 -18
  180. package/build/plugins/TableHoverActionsV2Plugin/index.d.ts.map +1 -1
  181. package/build/plugins/TableHoverActionsV2Plugin/index.js +1 -0
  182. package/build/plugins/TablePlugin.d.ts +2 -2
  183. package/build/plugins/TablePlugin.d.ts.map +1 -1
  184. package/build/plugins/TablePlugin.js +11 -10
  185. package/build/plugins/TableScrollShadowPlugin/index.d.ts +0 -7
  186. package/build/plugins/TableScrollShadowPlugin/index.d.ts.map +1 -1
  187. package/build/plugins/TableScrollShadowPlugin/index.js +9 -8
  188. package/build/plugins/TestRecorderPlugin/index.d.ts +1 -8
  189. package/build/plugins/TestRecorderPlugin/index.d.ts.map +1 -1
  190. package/build/plugins/TestRecorderPlugin/index.js +45 -44
  191. package/build/plugins/ToolbarPlugin/fontSize.d.ts +2 -2
  192. package/build/plugins/ToolbarPlugin/fontSize.d.ts.map +1 -1
  193. package/build/plugins/ToolbarPlugin/fontSize.js +19 -18
  194. package/build/plugins/ToolbarPlugin/index.d.ts.map +1 -1
  195. package/build/plugins/ToolbarPlugin/index.js +68 -60
  196. package/build/plugins/ToolbarPlugin/languages.d.ts +14 -0
  197. package/build/plugins/ToolbarPlugin/languages.d.ts.map +1 -0
  198. package/build/plugins/ToolbarPlugin/languages.js +185 -0
  199. package/build/plugins/ToolbarPlugin/utils.d.ts +2 -2
  200. package/build/plugins/ToolbarPlugin/utils.js +21 -21
  201. package/build/plugins/TwitterPlugin/index.d.ts +2 -2
  202. package/build/plugins/TwitterPlugin/index.d.ts.map +1 -1
  203. package/build/plugins/TwitterPlugin/index.js +8 -14
  204. package/build/plugins/YouTubePlugin/index.d.ts +2 -2
  205. package/build/plugins/YouTubePlugin/index.d.ts.map +1 -1
  206. package/build/plugins/YouTubePlugin/index.js +8 -14
  207. package/build/themes/PlaygroundEditorTheme.css +301 -33
  208. package/build/themes/ViewerTheme.css +899 -0
  209. package/build/{plugins/MentionsPlugin/index.d.ts → themes/ViewerTheme.d.ts} +5 -3
  210. package/build/themes/ViewerTheme.d.ts.map +1 -0
  211. package/build/themes/ViewerTheme.js +124 -0
  212. package/build/themes/ViewerThemeComplete.css +1043 -0
  213. package/build/ui/ColorPicker.d.ts +2 -2
  214. package/build/ui/ColorPicker.d.ts.map +1 -1
  215. package/build/ui/ColorPicker.js +47 -46
  216. package/build/ui/DropDown.d.ts.map +1 -1
  217. package/build/ui/DropDown.js +1 -0
  218. package/build/ui/FlashMessage.d.ts +3 -3
  219. package/build/ui/FlashMessage.d.ts.map +1 -1
  220. package/build/ui/FlashMessage.js +3 -2
  221. package/build/ui/ImageResizer.d.ts +3 -3
  222. package/build/ui/ImageResizer.d.ts.map +1 -1
  223. package/build/ui/ImageResizer.js +20 -19
  224. package/build/ui/KatexEquationAlterer.css +3 -1
  225. package/build/ui/KatexEquationAlterer.d.ts.map +1 -1
  226. package/build/ui/KatexEquationAlterer.js +1 -0
  227. package/build/ui/KatexRenderer.d.ts.map +1 -1
  228. package/build/ui/KatexRenderer.js +1 -0
  229. package/build/ui/Modal.d.ts.map +1 -1
  230. package/build/ui/Modal.js +1 -0
  231. package/build/ui/Switch.d.ts +2 -2
  232. package/build/ui/Switch.d.ts.map +1 -1
  233. package/build/ui/Switch.js +3 -2
  234. package/build/ui/TextInput.d.ts.map +1 -1
  235. package/build/ui/TextInput.js +1 -0
  236. package/build/utils/ServerBlockWithAlignableContents.d.ts +22 -0
  237. package/build/utils/ServerBlockWithAlignableContents.d.ts.map +1 -0
  238. package/build/utils/ServerBlockWithAlignableContents.js +6 -0
  239. package/build/utils/focusUtils.d.ts.map +1 -1
  240. package/build/utils/focusUtils.js +4 -3
  241. package/build/utils/getDOMRangeRect.d.ts.map +1 -1
  242. package/build/utils/getDOMRangeRect.js +1 -0
  243. package/build/utils/setFloatingElemPosition.d.ts.map +1 -1
  244. package/build/utils/setFloatingElemPosition.js +5 -4
  245. package/build/utils/swipe.d.ts +0 -7
  246. package/build/utils/swipe.d.ts.map +1 -1
  247. package/build/utils/swipe.js +5 -11
  248. package/build/viewer/Viewer.d.ts +18 -0
  249. package/build/viewer/Viewer.d.ts.map +1 -0
  250. package/build/viewer/Viewer.js +105 -0
  251. package/build/viewer/client.d.ts +18 -0
  252. package/build/viewer/client.d.ts.map +1 -0
  253. package/build/viewer/client.js +97 -0
  254. package/build/viewer/index.d.ts +4 -0
  255. package/build/viewer/index.d.ts.map +1 -0
  256. package/build/viewer/index.js +2 -0
  257. package/package.json +58 -36
  258. package/build/collaboration.d.ts +0 -12
  259. package/build/collaboration.d.ts.map +0 -1
  260. package/build/collaboration.js +0 -32
  261. package/build/nodes/FigmaNode.d.ts.map +0 -1
  262. package/build/nodes/PageBreakNode/index.css +0 -64
  263. package/build/nodes/PageBreakNode/index.d.ts +0 -25
  264. package/build/nodes/PageBreakNode/index.d.ts.map +0 -1
  265. package/build/nodes/PageBreakNode/index.js +0 -83
  266. package/build/nodes/PlaygroundNodes.d.ts.map +0 -1
  267. package/build/nodes/PollComponent.d.ts +0 -17
  268. package/build/nodes/PollComponent.d.ts.map +0 -1
  269. package/build/nodes/PollComponent.js +0 -85
  270. package/build/nodes/PollNode.css +0 -165
  271. package/build/nodes/PollNode.d.ts +0 -51
  272. package/build/nodes/PollNode.d.ts.map +0 -1
  273. package/build/nodes/PollNode.js +0 -153
  274. package/build/nodes/StickyComponent.d.ts +0 -18
  275. package/build/nodes/StickyComponent.d.ts.map +0 -1
  276. package/build/nodes/StickyComponent.js +0 -155
  277. package/build/nodes/StickyNode.css +0 -37
  278. package/build/nodes/StickyNode.d.ts +0 -39
  279. package/build/nodes/StickyNode.d.ts.map +0 -1
  280. package/build/nodes/StickyNode.js +0 -66
  281. package/build/nodes/TweetNode.d.ts.map +0 -1
  282. package/build/nodes/YouTubeNode.d.ts.map +0 -1
  283. package/build/plugins/DocsPlugin/index.d.ts +0 -10
  284. package/build/plugins/DocsPlugin/index.d.ts.map +0 -1
  285. package/build/plugins/DocsPlugin/index.js +0 -4
  286. package/build/plugins/MaxLengthPlugin/index.d.ts +0 -11
  287. package/build/plugins/MaxLengthPlugin/index.d.ts.map +0 -1
  288. package/build/plugins/MaxLengthPlugin/index.js +0 -44
  289. package/build/plugins/MentionsPlugin/index.d.ts.map +0 -1
  290. package/build/plugins/MentionsPlugin/index.js +0 -562
  291. package/build/plugins/PageBreakPlugin/index.d.ts +0 -12
  292. package/build/plugins/PageBreakPlugin/index.d.ts.map +0 -1
  293. package/build/plugins/PageBreakPlugin/index.js +0 -34
  294. package/build/plugins/StickyPlugin/index.d.ts +0 -10
  295. package/build/plugins/StickyPlugin/index.d.ts.map +0 -1
  296. package/build/plugins/StickyPlugin/index.js +0 -19
  297. package/build/plugins/TreeViewPlugin/index.d.ts +0 -10
  298. package/build/plugins/TreeViewPlugin/index.d.ts.map +0 -1
  299. package/build/plugins/TreeViewPlugin/index.js +0 -7
  300. package/build/plugins/TypingPerfPlugin/index.d.ts +0 -10
  301. package/build/plugins/TypingPerfPlugin/index.d.ts.map +0 -1
  302. package/build/plugins/TypingPerfPlugin/index.js +0 -100
  303. package/build/plugins/VersionsPlugin/index.css +0 -57
  304. package/build/plugins/VersionsPlugin/index.d.ts +0 -14
  305. package/build/plugins/VersionsPlugin/index.d.ts.map +0 -1
  306. package/build/plugins/VersionsPlugin/index.js +0 -147
  307. /package/build/nodes/{FigmaNode.d.ts → FigmaNode/FigmaNode.d.ts} +0 -0
  308. /package/build/nodes/{FigmaNode.js → FigmaNode/FigmaNode.js} +0 -0
  309. /package/build/nodes/{PlaygroundNodes.d.ts → PlaygroundNodes/PlaygroundNodes.d.ts} +0 -0
  310. /package/build/nodes/{TweetNode.d.ts → TweetNode/TweetNode.d.ts} +0 -0
  311. /package/build/nodes/{TweetNode.js → TweetNode/TweetNode.js} +0 -0
  312. /package/build/nodes/{YouTubeNode.d.ts → YouTubeNode/YouTubeNode.d.ts} +0 -0
  313. /package/build/nodes/{YouTubeNode.js → YouTubeNode/YouTubeNode.js} +0 -0
@@ -1,37 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- *
8
- */
9
- .StickyNode__contentEditable {
10
- min-height: 20px;
11
- border: 0;
12
- resize: none;
13
- cursor: text;
14
- font-size: 24px;
15
- caret-color: rgb(5, 5, 5);
16
- display: block;
17
- position: relative;
18
- outline: 0;
19
- padding: 10px;
20
- user-select: text;
21
- white-space: pre-wrap;
22
- word-wrap: break-word;
23
- }
24
- .StickyNode__placeholder {
25
- font-size: 24px;
26
- color: #999;
27
- overflow: hidden;
28
- position: absolute;
29
- text-overflow: ellipsis;
30
- top: 30px;
31
- left: 20px;
32
- width: 120px;
33
- user-select: none;
34
- white-space: nowrap;
35
- display: inline-block;
36
- pointer-events: none;
37
- }
@@ -1,39 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- import type { EditorConfig, LexicalEditor, LexicalNode, LexicalUpdateJSON, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from 'lexical';
9
- import type { JSX } from 'react';
10
- import { DecoratorNode } from 'lexical';
11
- type StickyNoteColor = 'pink' | 'yellow';
12
- export type SerializedStickyNode = Spread<{
13
- xOffset: number;
14
- yOffset: number;
15
- color: StickyNoteColor;
16
- caption: SerializedEditor;
17
- }, SerializedLexicalNode>;
18
- export declare class StickyNode extends DecoratorNode<JSX.Element> {
19
- __x: number;
20
- __y: number;
21
- __color: StickyNoteColor;
22
- __caption: LexicalEditor;
23
- static getType(): string;
24
- static clone(node: StickyNode): StickyNode;
25
- static importJSON(serializedNode: SerializedStickyNode): StickyNode;
26
- updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedStickyNode>): this;
27
- constructor(x: number, y: number, color: 'pink' | 'yellow', caption?: LexicalEditor, key?: NodeKey);
28
- exportJSON(): SerializedStickyNode;
29
- createDOM(config: EditorConfig): HTMLElement;
30
- updateDOM(): false;
31
- setPosition(x: number, y: number): void;
32
- toggleColor(): void;
33
- decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element;
34
- isIsolated(): true;
35
- }
36
- export declare function $isStickyNode(node: LexicalNode | null | undefined): node is StickyNode;
37
- export declare function $createStickyNode(xOffset: number, yOffset: number): StickyNode;
38
- export {};
39
- //# sourceMappingURL=StickyNode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StickyNode.d.ts","sourceRoot":"","sources":["../../src/nodes/StickyNode.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,gBAAgB,EAChB,qBAAqB,EACrB,MAAM,EACP,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA8B,aAAa,EAAC,MAAM,SAAS,CAAC;AAMnE,KAAK,eAAe,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzC,MAAM,MAAM,oBAAoB,GAAG,MAAM,CACvC;IACE,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,EAAE,gBAAgB,CAAC;CAC3B,EACD,qBAAqB,CACtB,CAAC;AAEF,qBAAa,UAAW,SAAQ,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,eAAe,CAAC;IACzB,SAAS,EAAE,aAAa,CAAC;IAEzB,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU;IAS1C,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,oBAAoB,GAAG,UAAU;IAQnE,cAAc,CACZ,cAAc,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,GACtD,IAAI;gBAYL,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,GAAG,QAAQ,EACxB,OAAO,CAAC,EAAE,aAAa,EACvB,GAAG,CAAC,EAAE,OAAO;IASf,UAAU,IAAI,oBAAoB;IAUlC,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW;IAM5C,SAAS,IAAI,KAAK;IAIlB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAOvC,WAAW,IAAI,IAAI;IAKnB,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAalE,UAAU,IAAI,IAAI;CAGnB;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,UAAU,CAEpB;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,UAAU,CAEZ"}
@@ -1,66 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { $setSelection, createEditor, DecoratorNode } from 'lexical';
3
- import * as React from 'react';
4
- import { createPortal } from 'react-dom';
5
- const StickyComponent = React.lazy(() => import('./StickyComponent'));
6
- export class StickyNode extends DecoratorNode {
7
- static getType() {
8
- return 'sticky';
9
- }
10
- static clone(node) {
11
- return new StickyNode(node.__x, node.__y, node.__color, node.__caption, node.__key);
12
- }
13
- static importJSON(serializedNode) {
14
- return new StickyNode(serializedNode.xOffset, serializedNode.yOffset, serializedNode.color).updateFromJSON(serializedNode);
15
- }
16
- updateFromJSON(serializedNode) {
17
- const stickyNode = super.updateFromJSON(serializedNode);
18
- const caption = serializedNode.caption;
19
- const nestedEditor = stickyNode.__caption;
20
- const editorState = nestedEditor.parseEditorState(caption.editorState);
21
- if (!editorState.isEmpty()) {
22
- nestedEditor.setEditorState(editorState);
23
- }
24
- return stickyNode;
25
- }
26
- constructor(x, y, color, caption, key) {
27
- super(key);
28
- this.__x = x;
29
- this.__y = y;
30
- this.__caption = caption || createEditor();
31
- this.__color = color;
32
- }
33
- exportJSON() {
34
- return Object.assign(Object.assign({}, super.exportJSON()), { caption: this.__caption.toJSON(), color: this.__color, xOffset: this.__x, yOffset: this.__y });
35
- }
36
- createDOM(config) {
37
- const div = document.createElement('div');
38
- div.style.display = 'contents';
39
- return div;
40
- }
41
- updateDOM() {
42
- return false;
43
- }
44
- setPosition(x, y) {
45
- const writable = this.getWritable();
46
- writable.__x = x;
47
- writable.__y = y;
48
- $setSelection(null);
49
- }
50
- toggleColor() {
51
- const writable = this.getWritable();
52
- writable.__color = writable.__color === 'pink' ? 'yellow' : 'pink';
53
- }
54
- decorate(editor, config) {
55
- return createPortal(_jsx(StickyComponent, { color: this.__color, x: this.__x, y: this.__y, nodeKey: this.getKey(), caption: this.__caption }), document.body);
56
- }
57
- isIsolated() {
58
- return true;
59
- }
60
- }
61
- export function $isStickyNode(node) {
62
- return node instanceof StickyNode;
63
- }
64
- export function $createStickyNode(xOffset, yOffset) {
65
- return new StickyNode(xOffset, yOffset, 'yellow');
66
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"TweetNode.d.ts","sourceRoot":"","sources":["../../src/nodes/TweetNode.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,OAAO,EACP,MAAM,EACP,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,0CAA0C,CAAC;AAqGlD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC;IACE,EAAE,EAAE,MAAM,CAAC;CACZ,EACD,4BAA4B,CAC7B,CAAC;AAEF,qBAAa,SAAU,SAAQ,kBAAkB;IAC/C,IAAI,EAAE,MAAM,CAAC;IAEb,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS;IAIxC,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,mBAAmB,GAAG,SAAS;IAIjE,UAAU,IAAI,mBAAmB;IAOjC,MAAM,CAAC,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI;IAc3D,SAAS,IAAI,eAAe;gBAQhB,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,EAAE,GAAG,CAAC,EAAE,OAAO;IAKjE,KAAK,IAAI,MAAM;IAIf,cAAc,CACZ,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,EACnC,qBAAqB,CAAC,EAAE,KAAK,GAAG,SAAS,GACxC,MAAM;IAIT,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;CAgBnE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAE3D;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GAC/C,IAAI,IAAI,SAAS,CAEnB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"YouTubeNode.d.ts","sourceRoot":"","sources":["../../src/nodes/YouTubeNode.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,OAAO,EACP,MAAM,EACP,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,0CAA0C,CAAC;AAqClD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CACxC;IACE,OAAO,EAAE,MAAM,CAAC;CACjB,EACD,4BAA4B,CAC7B,CAAC;AAaF,qBAAa,WAAY,SAAQ,kBAAkB;IACjD,IAAI,EAAE,MAAM,CAAC;IAEb,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW;IAI5C,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,qBAAqB,GAAG,WAAW;IAMrE,UAAU,IAAI,qBAAqB;gBAOvB,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,EAAE,GAAG,CAAC,EAAE,OAAO;IAKjE,SAAS,IAAI,eAAe;IAmB5B,MAAM,CAAC,SAAS,IAAI,gBAAgB,GAAG,IAAI;IAc3C,SAAS,IAAI,KAAK;IAIlB,KAAK,IAAI,MAAM;IAIf,cAAc,CACZ,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,EACnC,qBAAqB,CAAC,EAAE,KAAK,GAAG,SAAS,GACxC,MAAM;IAIT,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;CAepE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAE/D;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GACjD,IAAI,IAAI,WAAW,CAErB"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- import type { JSX } from "react";
9
- export default function DocsPlugin(): JSX.Element;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/DocsPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,CAAC,OAAO,UAAU,UAAU,IAAI,GAAG,CAAC,OAAO,CAUhD"}
@@ -1,4 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- export default function DocsPlugin() {
3
- return (_jsx("a", { target: "__blank", href: "https://lexical.dev/docs/intro", children: _jsx("button", { id: "docs-button", className: "editor-dev-button", title: "Lexical Docs" }) }));
4
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- export declare function MaxLengthPlugin({ maxLength }: {
9
- maxLength: number;
10
- }): null;
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MaxLengthPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,wBAAgB,eAAe,CAAC,EAAC,SAAS,EAAC,EAAE;IAAC,SAAS,EAAE,MAAM,CAAA;CAAC,GAAG,IAAI,CAsCtE"}
@@ -1,44 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
9
- import { $trimTextContentFromAnchor } from '@lexical/selection';
10
- import { $restoreEditorState } from '@lexical/utils';
11
- import { $getSelection, $isRangeSelection, RootNode } from 'lexical';
12
- import { useEffect } from 'react';
13
- export function MaxLengthPlugin({ maxLength }) {
14
- const [editor] = useLexicalComposerContext();
15
- useEffect(() => {
16
- let lastRestoredEditorState = null;
17
- return editor.registerNodeTransform(RootNode, (rootNode) => {
18
- const selection = $getSelection();
19
- if (!$isRangeSelection(selection) || !selection.isCollapsed()) {
20
- return;
21
- }
22
- const prevEditorState = editor.getEditorState();
23
- const prevTextContentSize = prevEditorState.read(() => rootNode.getTextContentSize());
24
- const textContentSize = rootNode.getTextContentSize();
25
- if (prevTextContentSize !== textContentSize) {
26
- const delCount = textContentSize - maxLength;
27
- const anchor = selection.anchor;
28
- if (delCount > 0) {
29
- // Restore the old editor state instead if the last
30
- // text content was already at the limit.
31
- if (prevTextContentSize === maxLength &&
32
- lastRestoredEditorState !== prevEditorState) {
33
- lastRestoredEditorState = prevEditorState;
34
- $restoreEditorState(editor, prevEditorState);
35
- }
36
- else {
37
- $trimTextContentFromAnchor(editor, anchor, delCount);
38
- }
39
- }
40
- }
41
- });
42
- }, [editor, maxLength]);
43
- return null;
44
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MentionsPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAylB/B,MAAM,CAAC,OAAO,UAAU,iBAAiB,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAwF9D"}