@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,20 +1,14 @@
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 { useLexicalTextEntity } from '@lexical/react/useLexicalTextEntity';
10
- import { useCallback, useEffect } from 'react';
11
- import { $createKeywordNode, KeywordNode } from '../../nodes/KeywordNode';
1
+ "use client";
2
+ import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
3
+ import { useLexicalTextEntity } from "@lexical/react/useLexicalTextEntity";
4
+ import { useCallback, useEffect } from "react";
5
+ import { $createKeywordNode, KeywordNode } from "../../nodes/KeywordNode";
12
6
  const KEYWORDS_REGEX = /(^|$|[^A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ])(congrats|congratulations|gratuluju|gratuluji|gratulujeme|blahopřeju|blahopřeji|blahopřejeme|Til lykke|Tillykke|Glückwunsch|Gratuliere|felicitaciones|enhorabuena|paljon onnea|onnittelut|Félicitations|gratula|gratulálok|gratulálunk|congratulazioni|complimenti|おめでとう|おめでとうございます|축하해|축하해요|gratulerer|Gefeliciteerd|gratulacje|Parabéns|parabéns|felicitações|felicitări|мои поздравления|поздравляем|поздравляю|gratulujem|blahoželám|ยินดีด้วย|ขอแสดงความยินดี|tebrikler|tebrik ederim|恭喜|祝贺你|恭喜你|恭喜|恭喜|baie geluk|veels geluk|অভিনন্দন|Čestitam|Čestitke|Čestitamo|Συγχαρητήρια|Μπράβο|અભિનંદન|badhai|बधाई|अभिनंदन|Честитам|Свака част|hongera|வாழ்த்துகள்|வாழ்த்துக்கள்|అభినందనలు|അഭിനന്ദനങ്ങൾ|Chúc mừng|מזל טוב|mazel tov|mazal tov)(^|$|[^A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ])/i;
13
7
  export default function KeywordsPlugin() {
14
8
  const [editor] = useLexicalComposerContext();
15
9
  useEffect(() => {
16
10
  if (!editor.hasNodes([KeywordNode])) {
17
- throw new Error('KeywordsPlugin: KeywordNode not registered on editor');
11
+ throw new Error("KeywordsPlugin: KeywordNode not registered on editor");
18
12
  }
19
13
  }, [editor]);
20
14
  const $createKeywordNode_ = useCallback((textNode) => {
@@ -5,8 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import type { JSX } from 'react';
9
- import { LexicalEditor } from 'lexical';
8
+ import type { JSX } from "react";
9
+ import { LexicalEditor } from "lexical";
10
10
  export default function InsertLayoutDialog({ activeEditor, onClose, }: {
11
11
  activeEditor: LexicalEditor;
12
12
  onClose: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"InsertLayoutDialog.d.ts","sourceRoot":"","sources":["../../../src/plugins/LayoutPlugin/InsertLayoutDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAgBtC,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,YAAY,EACZ,OAAO,GACR,EAAE;IACD,YAAY,EAAE,aAAa,CAAC;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,GAAG,GAAG,CAAC,OAAO,CA0Bd"}
1
+ {"version":3,"file":"InsertLayoutDialog.d.ts","sourceRoot":"","sources":["../../../src/plugins/LayoutPlugin/InsertLayoutDialog.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAexC,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,YAAY,EACZ,OAAO,GACR,EAAE;IACD,YAAY,EAAE,aAAa,CAAC;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,GAAG,GAAG,CAAC,OAAO,CA4Bd"}
@@ -1,14 +1,15 @@
1
+ "use client";
1
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import Button from '../../ui/Button';
4
- import DropDown, { DropDownItem } from '../../ui/DropDown';
5
- import { INSERT_LAYOUT_COMMAND } from './LayoutPlugin';
3
+ import { useState } from "react";
4
+ import Button from "../../ui/Button";
5
+ import DropDown, { DropDownItem } from "../../ui/DropDown";
6
+ import { INSERT_LAYOUT_COMMAND } from "./LayoutPlugin";
6
7
  const LAYOUTS = [
7
- { label: '2 columns (equal width)', value: '1fr 1fr' },
8
- { label: '2 columns (25% - 75%)', value: '1fr 3fr' },
9
- { label: '3 columns (equal width)', value: '1fr 1fr 1fr' },
10
- { label: '3 columns (25% - 50% - 25%)', value: '1fr 2fr 1fr' },
11
- { label: '4 columns (equal width)', value: '1fr 1fr 1fr 1fr' },
8
+ { label: "2 columns (equal width)", value: "1fr 1fr" },
9
+ { label: "2 columns (25% - 75%)", value: "1fr 3fr" },
10
+ { label: "3 columns (equal width)", value: "1fr 1fr 1fr" },
11
+ { label: "3 columns (25% - 50% - 25%)", value: "1fr 2fr 1fr" },
12
+ { label: "4 columns (equal width)", value: "1fr 1fr 1fr 1fr" },
12
13
  ];
13
14
  export default function InsertLayoutDialog({ activeEditor, onClose, }) {
14
15
  var _a;
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import type { LexicalCommand, NodeKey } from 'lexical';
8
+ import type { LexicalCommand, NodeKey } from "lexical";
9
9
  export declare const INSERT_LAYOUT_COMMAND: LexicalCommand<string>;
10
10
  export declare const UPDATE_LAYOUT_COMMAND: LexicalCommand<{
11
11
  template: string;
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/LayoutPlugin/LayoutPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAc,cAAc,EAAe,OAAO,EAAC,MAAM,SAAS,CAAC;AAkC/E,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,MAAM,CAChC,CAAC;AAE1B,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAyD,CAAC;AAE3D,wBAAgB,YAAY,IAAI,IAAI,CAuLnC"}
1
+ {"version":3,"file":"LayoutPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/LayoutPlugin/LayoutPlugin.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAEV,cAAc,EAEd,OAAO,EACR,MAAM,SAAS,CAAC;AAkCjB,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,MAAM,CAChC,CAAC;AAE1B,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB,CAA2D,CAAC;AAE7D,wBAAgB,YAAY,IAAI,IAAI,CAuLnC"}
@@ -1,23 +1,17 @@
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 { $findMatchingParent, $insertNodeToNearestRoot, mergeRegister, } from '@lexical/utils';
10
- import { $createParagraphNode, $getNodeByKey, $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR, COMMAND_PRIORITY_LOW, createCommand, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_LEFT_COMMAND, KEY_ARROW_RIGHT_COMMAND, KEY_ARROW_UP_COMMAND, } from 'lexical';
11
- import { useEffect } from 'react';
12
- import { $createLayoutContainerNode, $isLayoutContainerNode, LayoutContainerNode, } from '../../nodes/LayoutContainerNode';
13
- import { $createLayoutItemNode, $isLayoutItemNode, LayoutItemNode, } from '../../nodes/LayoutItemNode';
1
+ "use client";
2
+ import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
3
+ import { $findMatchingParent, $insertNodeToNearestRoot, mergeRegister, } from "@lexical/utils";
4
+ import { $createParagraphNode, $getNodeByKey, $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR, COMMAND_PRIORITY_LOW, createCommand, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_LEFT_COMMAND, KEY_ARROW_RIGHT_COMMAND, KEY_ARROW_UP_COMMAND, } from "lexical";
5
+ import { useEffect } from "react";
6
+ import { $createLayoutContainerNode, $isLayoutContainerNode, LayoutContainerNode, } from "../../nodes/LayoutContainerNode";
7
+ import { $createLayoutItemNode, $isLayoutItemNode, LayoutItemNode, } from "../../nodes/LayoutItemNode";
14
8
  export const INSERT_LAYOUT_COMMAND = createCommand();
15
9
  export const UPDATE_LAYOUT_COMMAND = createCommand();
16
10
  export function LayoutPlugin() {
17
11
  const [editor] = useLexicalComposerContext();
18
12
  useEffect(() => {
19
13
  if (!editor.hasNodes([LayoutContainerNode, LayoutItemNode])) {
20
- throw new Error('LayoutPlugin: LayoutContainerNode, or LayoutItemNode not registered on editor');
14
+ throw new Error("LayoutPlugin: LayoutContainerNode, or LayoutItemNode not registered on editor");
21
15
  }
22
16
  const $onEscape = (before) => {
23
17
  var _a, _b;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/LinkPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjC,KAAK,KAAK,GAAG;IACX,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,iBAAyB,GAC1B,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAarB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/LinkPlugin/index.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjC,KAAK,KAAK,GAAG;IACX,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,iBAAyB,GAC1B,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAarB"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { LinkPlugin as LexicalLinkPlugin } from "@lexical/react/LexicalLinkPlugin";
3
4
  export default function LinkPlugin({ hasLinkAttributes = false, }) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MarkdownShortcutPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAMjC,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,GAAG,CAAC,OAAO,CAEpD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MarkdownShortcutPlugin/index.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAMjC,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,GAAG,CAAC,OAAO,CAEpD"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { MarkdownShortcutPlugin } from "@lexical/react/LexicalMarkdownShortcutPlugin";
3
4
  import { PLAYGROUND_TRANSFORMERS } from "../MarkdownTransformers";
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { ElementTransformer, TextMatchTransformer, Transformer } from '@lexical/markdown';
8
+ import { ElementTransformer, TextMatchTransformer, Transformer } from "@lexical/markdown";
9
9
  export declare const HR: ElementTransformer;
10
10
  export declare const IMAGE: TextMatchTransformer;
11
11
  export declare const EMOJI: TextMatchTransformer;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MarkdownTransformers/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,kBAAkB,EAIlB,oBAAoB,EACpB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAkC3B,eAAO,MAAM,EAAE,EAAE,kBAmBhB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,oBAsBnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,oBAanB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,oBAkBtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAgBnB,CAAC;AAMF,eAAO,MAAM,KAAK,EAAE,kBAoInB,CAAC;AAsBF,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,WAAW,CAYtD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MarkdownTransformers/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,kBAAkB,EAIlB,oBAAoB,EACpB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AA0C3B,eAAO,MAAM,EAAE,EAAE,kBAmBhB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,oBAsBnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,oBAanB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,oBAkBtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAgBnB,CAAC;AAMF,eAAO,MAAM,KAAK,EAAE,kBAoInB,CAAC;AAsBF,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,WAAW,CAYtD,CAAC"}
@@ -5,18 +5,18 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { $convertFromMarkdownString, $convertToMarkdownString, CHECK_LIST, ELEMENT_TRANSFORMERS, MULTILINE_ELEMENT_TRANSFORMERS, TEXT_FORMAT_TRANSFORMERS, TEXT_MATCH_TRANSFORMERS, } from '@lexical/markdown';
9
- import { $createHorizontalRuleNode, $isHorizontalRuleNode, HorizontalRuleNode, } from '@lexical/react/LexicalHorizontalRuleNode';
10
- import { $createTableCellNode, $createTableNode, $createTableRowNode, $isTableCellNode, $isTableNode, $isTableRowNode, TableCellHeaderStates, TableCellNode, TableNode, TableRowNode, } from '@lexical/table';
11
- import { $createTextNode, $isParagraphNode, $isTextNode, } from 'lexical';
12
- import { $createEquationNode, $isEquationNode, EquationNode, } from '../../nodes/EquationNode';
13
- import { $createImageNode, $isImageNode, ImageNode } from '../../nodes/ImageNode';
14
- import { $createTweetNode, $isTweetNode, TweetNode } from '../../nodes/TweetNode';
15
- import emojiList from '../../utils/emoji-list';
8
+ import { $convertFromMarkdownString, $convertToMarkdownString, CHECK_LIST, ELEMENT_TRANSFORMERS, MULTILINE_ELEMENT_TRANSFORMERS, TEXT_FORMAT_TRANSFORMERS, TEXT_MATCH_TRANSFORMERS, } from "@lexical/markdown";
9
+ import { $createHorizontalRuleNode, $isHorizontalRuleNode, HorizontalRuleNode, } from "@lexical/extension";
10
+ import { $createTableCellNode, $createTableNode, $createTableRowNode, $isTableCellNode, $isTableNode, $isTableRowNode, TableCellHeaderStates, TableCellNode, TableNode, TableRowNode, } from "@lexical/table";
11
+ import { $createTextNode, $isParagraphNode, $isTextNode, } from "lexical";
12
+ import { $createEquationNode, $isEquationNode, EquationNode, } from "../../nodes/EquationNode";
13
+ import { $createImageNode, $isImageNode, ImageNode, } from "../../nodes/ImageNode";
14
+ import { $createTweetNode, $isTweetNode, TweetNode, } from "../../nodes/TweetNode/TweetNode";
15
+ import emojiList from "../../utils/emoji-list";
16
16
  export const HR = {
17
17
  dependencies: [HorizontalRuleNode],
18
18
  export: (node) => {
19
- return $isHorizontalRuleNode(node) ? '***' : null;
19
+ return $isHorizontalRuleNode(node) ? "***" : null;
20
20
  },
21
21
  regExp: /^(---|\*\*\*|___)\s?$/,
22
22
  replace: (parentNode, _1, _2, isImport) => {
@@ -30,7 +30,7 @@ export const HR = {
30
30
  }
31
31
  line.selectNext();
32
32
  },
33
- type: 'element',
33
+ type: "element",
34
34
  };
35
35
  export const IMAGE = {
36
36
  dependencies: [ImageNode],
@@ -51,8 +51,8 @@ export const IMAGE = {
51
51
  });
52
52
  textNode.replace(imageNode);
53
53
  },
54
- trigger: ')',
55
- type: 'text-match',
54
+ trigger: ")",
55
+ type: "text-match",
56
56
  };
57
57
  export const EMOJI = {
58
58
  dependencies: [],
@@ -66,8 +66,8 @@ export const EMOJI = {
66
66
  textNode.replace($createTextNode(emoji));
67
67
  }
68
68
  },
69
- trigger: ':',
70
- type: 'text-match',
69
+ trigger: ":",
70
+ type: "text-match",
71
71
  };
72
72
  export const EQUATION = {
73
73
  dependencies: [EquationNode],
@@ -84,8 +84,8 @@ export const EQUATION = {
84
84
  const equationNode = $createEquationNode(equation, true);
85
85
  textNode.replace(equationNode);
86
86
  },
87
- trigger: '$',
88
- type: 'text-match',
87
+ trigger: "$",
88
+ type: "text-match",
89
89
  };
90
90
  export const TWEET = {
91
91
  dependencies: [TweetNode],
@@ -101,7 +101,7 @@ export const TWEET = {
101
101
  const tweetNode = $createTweetNode(id);
102
102
  textNode.replace(tweetNode);
103
103
  },
104
- type: 'element',
104
+ type: "element",
105
105
  };
106
106
  // Very primitive table setup
107
107
  const TABLE_ROW_REG_EXP = /^(?:\|)(.+)(?:\|)\s?$/;
@@ -123,19 +123,19 @@ export const TABLE = {
123
123
  // It's TableCellNode so it's just to make flow happy
124
124
  if ($isTableCellNode(cell)) {
125
125
  rowOutput.push($convertToMarkdownString(PLAYGROUND_TRANSFORMERS, cell)
126
- .replace(/\n/g, '\\n')
126
+ .replace(/\n/g, "\\n")
127
127
  .trim());
128
128
  if (cell.__headerState === TableCellHeaderStates.ROW) {
129
129
  isHeaderRow = true;
130
130
  }
131
131
  }
132
132
  }
133
- output.push(`| ${rowOutput.join(' | ')} |`);
133
+ output.push(`| ${rowOutput.join(" | ")} |`);
134
134
  if (isHeaderRow) {
135
- output.push(`| ${rowOutput.map((_) => '---').join(' | ')} |`);
135
+ output.push(`| ${rowOutput.map((_) => "---").join(" | ")} |`);
136
136
  }
137
137
  }
138
- return output.join('\n');
138
+ return output.join("\n");
139
139
  },
140
140
  regExp: TABLE_ROW_REG_EXP,
141
141
  replace: (parentNode, _1, match) => {
@@ -194,7 +194,7 @@ export const TABLE = {
194
194
  const tableRow = $createTableRowNode();
195
195
  table.append(tableRow);
196
196
  for (let i = 0; i < maxCells; i++) {
197
- tableRow.append(i < cells.length ? cells[i] : $createTableCell(''));
197
+ tableRow.append(i < cells.length ? cells[i] : $createTableCell(""));
198
198
  }
199
199
  }
200
200
  const previousSibling = parentNode.getPreviousSibling();
@@ -208,14 +208,14 @@ export const TABLE = {
208
208
  }
209
209
  table.selectEnd();
210
210
  },
211
- type: 'element',
211
+ type: "element",
212
212
  };
213
213
  function getTableColumnsSize(table) {
214
214
  const row = table.getFirstChild();
215
215
  return $isTableRowNode(row) ? row.getChildrenSize() : 0;
216
216
  }
217
217
  const $createTableCell = (textContent) => {
218
- textContent = textContent.replace(/\\n/g, '\n');
218
+ textContent = textContent.replace(/\\n/g, "\n");
219
219
  const cell = $createTableCellNode(TableCellHeaderStates.NO_STATUS);
220
220
  $convertFromMarkdownString(textContent, PLAYGROUND_TRANSFORMERS, cell);
221
221
  return cell;
@@ -225,7 +225,7 @@ const mapToTableCells = (textContent) => {
225
225
  if (!match || !match[1]) {
226
226
  return null;
227
227
  }
228
- return match[1].split('|').map((text) => $createTableCell(text));
228
+ return match[1].split("|").map((text) => $createTableCell(text));
229
229
  };
230
230
  export const PLAYGROUND_TRANSFORMERS = [
231
231
  TABLE,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/PasteLogPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAMjC,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,GAAG,CAAC,OAAO,CAwCpD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/PasteLogPlugin/index.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAMjC,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,GAAG,CAAC,OAAO,CAwCpD"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
3
4
  import { COMMAND_PRIORITY_NORMAL, PASTE_COMMAND } from "lexical";
@@ -1,10 +1,3 @@
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
1
  import { LexicalEditor } from "lexical";
9
2
  import { Dispatch } from "react";
10
3
  export default function ShortcutsPlugin({ editor, setIsLinkEditMode, }: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/ShortcutsPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAOL,aAAa,EAEd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AA2C5C,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,MAAM,EACN,iBAAiB,GAClB,EAAE;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CACtC,GAAG,IAAI,CA0FP"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/ShortcutsPlugin/index.tsx"],"names":[],"mappings":"AAYA,OAAO,EAOL,aAAa,EAEd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AA2C5C,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,MAAM,EACN,iBAAiB,GAClB,EAAE;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CACtC,GAAG,IAAI,CA0FP"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  /**
2
3
  * Copyright (c) Meta Platforms, Inc. and affiliates.
3
4
  *
@@ -8,6 +8,6 @@
8
8
  import type { LexicalCommand } from "lexical";
9
9
  export declare const SPEECH_TO_TEXT_COMMAND: LexicalCommand<boolean>;
10
10
  export declare const SUPPORT_SPEECH_RECOGNITION: boolean;
11
- declare const _default: () => null;
12
- export default _default;
11
+ declare function SpeechToTextPlugin(): null;
12
+ export default SpeechToTextPlugin;
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/SpeechToTextPlugin/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAiC,MAAM,SAAS,CAAC;AAe7E,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,OAAO,CAE1D,CAAC;AAmBF,eAAO,MAAM,0BAA0B,EAAE,OAC6B,CAAC;wBA+EpD,MAAM,IAAI;AAF7B,wBAE8B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/SpeechToTextPlugin/index.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAiC,MAAM,SAAS,CAAC;AAe7E,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,OAAO,CAE1D,CAAC;AAmBF,eAAO,MAAM,0BAA0B,EAAE,OAE+B,CAAC;AAEzE,iBAAS,kBAAkB,IAAI,IAAI,CA6ElC;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,10 +1,4 @@
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
- */
1
+ "use client";
8
2
  import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
9
3
  import { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR, createCommand, REDO_COMMAND, UNDO_COMMAND, } from "lexical";
10
4
  import { useEffect, useRef, useState } from "react";
@@ -21,8 +15,12 @@ const VOICE_COMMANDS = {
21
15
  editor.dispatchCommand(UNDO_COMMAND, undefined);
22
16
  },
23
17
  };
24
- export const SUPPORT_SPEECH_RECOGNITION = "SpeechRecognition" in window || "webkitSpeechRecognition" in window;
18
+ export const SUPPORT_SPEECH_RECOGNITION = typeof window !== "undefined" &&
19
+ ("SpeechRecognition" in window || "webkitSpeechRecognition" in window);
25
20
  function SpeechToTextPlugin() {
21
+ if (!SUPPORT_SPEECH_RECOGNITION) {
22
+ return null;
23
+ }
26
24
  const [editor] = useLexicalComposerContext();
27
25
  const [isEnabled, setIsEnabled] = useState(false);
28
26
  const SpeechRecognition =
@@ -84,6 +82,4 @@ function SpeechToTextPlugin() {
84
82
  }, [editor]);
85
83
  return null;
86
84
  }
87
- export default (SUPPORT_SPEECH_RECOGNITION
88
- ? SpeechToTextPlugin
89
- : () => null);
85
+ export default SpeechToTextPlugin;
@@ -1,9 +1,2 @@
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
1
  export default function TabFocusPlugin(): null;
9
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/TabFocusPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA8BH,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,IAAI,CA4B7C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/TabFocusPlugin/index.tsx"],"names":[],"mappings":"AAsCA,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,IAAI,CA4B7C"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  /**
2
3
  * Copyright (c) Meta Platforms, Inc. and affiliates.
3
4
  *
@@ -5,16 +6,16 @@
5
6
  * LICENSE file in the root directory of this source tree.
6
7
  *
7
8
  */
8
- import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
9
- import { $getSelection, $isRangeSelection, $setSelection, COMMAND_PRIORITY_LOW, FOCUS_COMMAND, } from 'lexical';
10
- import { useEffect } from 'react';
9
+ import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
10
+ import { $getSelection, $isRangeSelection, $setSelection, COMMAND_PRIORITY_LOW, FOCUS_COMMAND, } from "lexical";
11
+ import { useEffect } from "react";
11
12
  const TAB_TO_FOCUS_INTERVAL = 100;
12
13
  let lastTabKeyDownTimestamp = 0;
13
14
  let hasRegisteredKeyDownListener = false;
14
15
  function registerKeyTimeStampTracker() {
15
- window.addEventListener('keydown', (event) => {
16
+ window.addEventListener("keydown", (event) => {
16
17
  // Tab
17
- if (event.key === 'Tab') {
18
+ if (event.key === "Tab") {
18
19
  lastTabKeyDownTimestamp = event.timeStamp;
19
20
  }
20
21
  }, true);
@@ -1,11 +1,4 @@
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 { ReactPortal } from 'react';
1
+ import { ReactPortal } from "react";
9
2
  export default function TableActionMenuPlugin({ anchorElem, cellMerge, }: {
10
3
  anchorElem?: HTMLElement;
11
4
  cellMerge?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/TableActionMenuPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0CH,OAAO,EAAC,WAAW,EAA2C,MAAM,OAAO,CAAC;AAw2B5E,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,UAA0B,EAC1B,SAAiB,GAClB,EAAE;IACD,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,IAAI,GAAG,WAAW,CAWrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/TableActionMenuPlugin/index.tsx"],"names":[],"mappings":"AAiDA,OAAO,EAAE,WAAW,EAA4C,MAAM,OAAO,CAAC;AA63B9E,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,UAA0B,EAC1B,SAAiB,GAClB,EAAE;IACD,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,IAAI,GAAG,WAAW,CAWrB"}