phx-react 1.3.1570 → 1.3.1571

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 (847) hide show
  1. package/dist/cjs/components/TextEditorV2/commenting/index.d.ts +41 -0
  2. package/dist/cjs/components/TextEditorV2/commenting/index.js +340 -0
  3. package/dist/cjs/components/TextEditorV2/commenting/index.js.map +1 -0
  4. package/dist/cjs/components/TextEditorV2/constants.d.ts +1 -0
  5. package/dist/cjs/components/TextEditorV2/constants.js +5 -0
  6. package/dist/cjs/components/TextEditorV2/constants.js.map +1 -0
  7. package/dist/cjs/components/TextEditorV2/context/SettingsContext.d.ts +12 -0
  8. package/dist/cjs/components/TextEditorV2/context/SettingsContext.js +59 -0
  9. package/dist/cjs/components/TextEditorV2/context/SettingsContext.js.map +1 -0
  10. package/dist/cjs/components/TextEditorV2/context/SharedAutocompleteContext.d.ts +10 -0
  11. package/dist/cjs/components/TextEditorV2/context/SharedAutocompleteContext.js +50 -0
  12. package/dist/cjs/components/TextEditorV2/context/SharedAutocompleteContext.js.map +1 -0
  13. package/dist/cjs/components/TextEditorV2/context/SharedHistoryContext.d.ts +11 -0
  14. package/dist/cjs/components/TextEditorV2/context/SharedHistoryContext.js +17 -0
  15. package/dist/cjs/components/TextEditorV2/context/SharedHistoryContext.js.map +1 -0
  16. package/dist/cjs/components/TextEditorV2/editor.d.ts +10 -0
  17. package/dist/cjs/components/TextEditorV2/editor.js +203 -0
  18. package/dist/cjs/components/TextEditorV2/editor.js.map +1 -0
  19. package/dist/cjs/components/TextEditorV2/hooks/useModal.d.ts +5 -0
  20. package/dist/cjs/components/TextEditorV2/hooks/useModal.js +32 -0
  21. package/dist/cjs/components/TextEditorV2/hooks/useModal.js.map +1 -0
  22. package/dist/cjs/components/TextEditorV2/hooks/useReport.d.ts +1 -0
  23. package/dist/cjs/components/TextEditorV2/hooks/useReport.js +45 -0
  24. package/dist/cjs/components/TextEditorV2/hooks/useReport.js.map +1 -0
  25. package/dist/cjs/components/TextEditorV2/lib/Settings.d.ts +2 -0
  26. package/dist/cjs/components/TextEditorV2/lib/Settings.js +52 -0
  27. package/dist/cjs/components/TextEditorV2/lib/Settings.js.map +1 -0
  28. package/dist/cjs/components/TextEditorV2/lib/appSettings.d.ts +19 -0
  29. package/dist/cjs/components/TextEditorV2/lib/appSettings.js +21 -0
  30. package/dist/cjs/components/TextEditorV2/lib/appSettings.js.map +1 -0
  31. package/dist/cjs/components/TextEditorV2/lib/collaboration.d.ts +3 -0
  32. package/dist/cjs/components/TextEditorV2/lib/collaboration.js +26 -0
  33. package/dist/cjs/components/TextEditorV2/lib/collaboration.js.map +1 -0
  34. package/dist/cjs/components/TextEditorV2/lib/setupEnv.d.ts +1 -0
  35. package/dist/cjs/components/TextEditorV2/lib/setupEnv.js +23 -0
  36. package/dist/cjs/components/TextEditorV2/lib/setupEnv.js.map +1 -0
  37. package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.d.ts +25 -0
  38. package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.js +58 -0
  39. package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.js.map +1 -0
  40. package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.d.ts +18 -0
  41. package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.js +62 -0
  42. package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.js.map +1 -0
  43. package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.d.ts +9 -0
  44. package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.js +72 -0
  45. package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.js.map +1 -0
  46. package/dist/cjs/components/TextEditorV2/nodes/EquationNode.d.ts +26 -0
  47. package/dist/cjs/components/TextEditorV2/nodes/EquationNode.js +126 -0
  48. package/dist/cjs/components/TextEditorV2/nodes/EquationNode.js.map +1 -0
  49. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.d.ts +6 -0
  50. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js +117 -0
  51. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js.map +1 -0
  52. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.d.ts +50 -0
  53. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js +59 -0
  54. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js.map +1 -0
  55. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.d.ts +44 -0
  56. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js +143 -0
  57. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js.map +1 -0
  58. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/index.d.ts +22 -0
  59. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/index.js +103 -0
  60. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/index.js.map +1 -0
  61. package/dist/cjs/components/TextEditorV2/nodes/ExtendedTextNode.d.ts +12 -0
  62. package/dist/cjs/components/TextEditorV2/nodes/ExtendedTextNode.js +106 -0
  63. package/dist/cjs/components/TextEditorV2/nodes/ExtendedTextNode.js.map +1 -0
  64. package/dist/cjs/components/TextEditorV2/nodes/FigmaNode.d.ts +19 -0
  65. package/dist/cjs/components/TextEditorV2/nodes/FigmaNode.js +63 -0
  66. package/dist/cjs/components/TextEditorV2/nodes/FigmaNode.js.map +1 -0
  67. package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.d.ts +14 -0
  68. package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.js +212 -0
  69. package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.js.map +1 -0
  70. package/dist/cjs/components/TextEditorV2/nodes/ImageNode.d.ts +56 -0
  71. package/dist/cjs/components/TextEditorV2/nodes/ImageNode.js +136 -0
  72. package/dist/cjs/components/TextEditorV2/nodes/ImageNode.js.map +1 -0
  73. package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.d.ts +18 -0
  74. package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js +194 -0
  75. package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -0
  76. package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.d.ts +54 -0
  77. package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.js +142 -0
  78. package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.js.map +1 -0
  79. package/dist/cjs/components/TextEditorV2/nodes/KeywordNode.d.ts +15 -0
  80. package/dist/cjs/components/TextEditorV2/nodes/KeywordNode.js +54 -0
  81. package/dist/cjs/components/TextEditorV2/nodes/KeywordNode.js.map +1 -0
  82. package/dist/cjs/components/TextEditorV2/nodes/LayoutContainerNode.d.ts +21 -0
  83. package/dist/cjs/components/TextEditorV2/nodes/LayoutContainerNode.js +63 -0
  84. package/dist/cjs/components/TextEditorV2/nodes/LayoutContainerNode.js.map +1 -0
  85. package/dist/cjs/components/TextEditorV2/nodes/LayoutItemNode.d.ts +15 -0
  86. package/dist/cjs/components/TextEditorV2/nodes/LayoutItemNode.js +51 -0
  87. package/dist/cjs/components/TextEditorV2/nodes/LayoutItemNode.js.map +1 -0
  88. package/dist/cjs/components/TextEditorV2/nodes/MentionNode.d.ts +20 -0
  89. package/dist/cjs/components/TextEditorV2/nodes/MentionNode.js +89 -0
  90. package/dist/cjs/components/TextEditorV2/nodes/MentionNode.js.map +1 -0
  91. package/dist/cjs/components/TextEditorV2/nodes/PageBreakNode/index.d.ts +17 -0
  92. package/dist/cjs/components/TextEditorV2/nodes/PageBreakNode/index.js +113 -0
  93. package/dist/cjs/components/TextEditorV2/nodes/PageBreakNode/index.js.map +1 -0
  94. package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.d.ts +3 -0
  95. package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.js +68 -0
  96. package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.js.map +1 -0
  97. package/dist/cjs/components/TextEditorV2/nodes/PollComponent.d.ts +8 -0
  98. package/dist/cjs/components/TextEditorV2/nodes/PollComponent.js +113 -0
  99. package/dist/cjs/components/TextEditorV2/nodes/PollComponent.js.map +1 -0
  100. package/dist/cjs/components/TextEditorV2/nodes/PollNode.d.ts +33 -0
  101. package/dist/cjs/components/TextEditorV2/nodes/PollNode.js +149 -0
  102. package/dist/cjs/components/TextEditorV2/nodes/PollNode.js.map +1 -0
  103. package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.d.ts +9 -0
  104. package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.js +167 -0
  105. package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.js.map +1 -0
  106. package/dist/cjs/components/TextEditorV2/nodes/StickyNode.d.ts +37 -0
  107. package/dist/cjs/components/TextEditorV2/nodes/StickyNode.js +94 -0
  108. package/dist/cjs/components/TextEditorV2/nodes/StickyNode.js.map +1 -0
  109. package/dist/cjs/components/TextEditorV2/nodes/TableNode.d.ts +54 -0
  110. package/dist/cjs/components/TextEditorV2/nodes/TableNode.js +198 -0
  111. package/dist/cjs/components/TextEditorV2/nodes/TableNode.js.map +1 -0
  112. package/dist/cjs/components/TextEditorV2/nodes/TweetNode.d.ts +28 -0
  113. package/dist/cjs/components/TextEditorV2/nodes/TweetNode.js +156 -0
  114. package/dist/cjs/components/TextEditorV2/nodes/TweetNode.js.map +1 -0
  115. package/dist/cjs/components/TextEditorV2/nodes/YouTubeNode.d.ts +28 -0
  116. package/dist/cjs/components/TextEditorV2/nodes/YouTubeNode.js +103 -0
  117. package/dist/cjs/components/TextEditorV2/nodes/YouTubeNode.js.map +1 -0
  118. package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.d.ts +2 -0
  119. package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.js +183 -0
  120. package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.js.map +1 -0
  121. package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.d.ts +19 -0
  122. package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js +179 -0
  123. package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js.map +1 -0
  124. package/dist/cjs/components/TextEditorV2/plugins/AutoLinkPlugin/index.d.ts +2 -0
  125. package/dist/cjs/components/TextEditorV2/plugins/AutoLinkPlugin/index.js +16 -0
  126. package/dist/cjs/components/TextEditorV2/plugins/AutoLinkPlugin/index.js.map +1 -0
  127. package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.d.ts +2 -0
  128. package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.js +2465 -0
  129. package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.js.map +1 -0
  130. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +8 -0
  131. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +55 -0
  132. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js.map +1 -0
  133. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +10 -0
  134. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js +159 -0
  135. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js.map +1 -0
  136. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.d.ts +4 -0
  137. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js +111 -0
  138. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js.map +1 -0
  139. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.d.ts +1 -0
  140. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js +21 -0
  141. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js.map +1 -0
  142. package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.d.ts +1 -0
  143. package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js +12 -0
  144. package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js.map +1 -0
  145. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.d.ts +23 -0
  146. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js +88 -0
  147. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js.map +1 -0
  148. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.d.ts +17 -0
  149. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js +70 -0
  150. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js.map +1 -0
  151. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.d.ts +18 -0
  152. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js +95 -0
  153. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js.map +1 -0
  154. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.d.ts +3 -0
  155. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.js +148 -0
  156. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.js.map +1 -0
  157. package/dist/cjs/components/TextEditorV2/plugins/ComponentPickerPlugin/index.d.ts +2 -0
  158. package/dist/cjs/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js +264 -0
  159. package/dist/cjs/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js.map +1 -0
  160. package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.d.ts +11 -0
  161. package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.js +171 -0
  162. package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.js.map +1 -0
  163. package/dist/cjs/components/TextEditorV2/plugins/DocsPlugin/index.d.ts +2 -0
  164. package/dist/cjs/components/TextEditorV2/plugins/DocsPlugin/index.js +10 -0
  165. package/dist/cjs/components/TextEditorV2/plugins/DocsPlugin/index.js.map +1 -0
  166. package/dist/cjs/components/TextEditorV2/plugins/DragDropPastePlugin/index.d.ts +1 -0
  167. package/dist/cjs/components/TextEditorV2/plugins/DragDropPastePlugin/index.js +44 -0
  168. package/dist/cjs/components/TextEditorV2/plugins/DragDropPastePlugin/index.js.map +1 -0
  169. package/dist/cjs/components/TextEditorV2/plugins/DraggableBlockPlugin/index.d.ts +4 -0
  170. package/dist/cjs/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js +288 -0
  171. package/dist/cjs/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js.map +1 -0
  172. package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.d.ts +2 -0
  173. package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js +97 -0
  174. package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js.map +1 -0
  175. package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.d.ts +1 -0
  176. package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.js +64 -0
  177. package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.js.map +1 -0
  178. package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.d.ts +14 -0
  179. package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.js +42 -0
  180. package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.js.map +1 -0
  181. package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.d.ts +3 -0
  182. package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js +28 -0
  183. package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js.map +1 -0
  184. package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.d.ts +3 -0
  185. package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.js +25 -0
  186. package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.js.map +1 -0
  187. package/dist/cjs/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.d.ts +7 -0
  188. package/dist/cjs/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js +200 -0
  189. package/dist/cjs/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
  190. package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +4 -0
  191. package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js +229 -0
  192. package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -0
  193. package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.d.ts +22 -0
  194. package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.js +188 -0
  195. package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.js.map +1 -0
  196. package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.d.ts +17 -0
  197. package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.js +193 -0
  198. package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.js.map +1 -0
  199. package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.d.ts +1 -0
  200. package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.js +33 -0
  201. package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.js.map +1 -0
  202. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +6 -0
  203. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js +34 -0
  204. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js.map +1 -0
  205. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.d.ts +7 -0
  206. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js +89 -0
  207. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js.map +1 -0
  208. package/dist/cjs/components/TextEditorV2/plugins/LinkPlugin/index.d.ts +2 -0
  209. package/dist/cjs/components/TextEditorV2/plugins/LinkPlugin/index.js +11 -0
  210. package/dist/cjs/components/TextEditorV2/plugins/LinkPlugin/index.js.map +1 -0
  211. package/dist/cjs/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.d.ts +5 -0
  212. package/dist/cjs/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js +44 -0
  213. package/dist/cjs/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js.map +1 -0
  214. package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.d.ts +2 -0
  215. package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js +11 -0
  216. package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js.map +1 -0
  217. package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.d.ts +8 -0
  218. package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.js +242 -0
  219. package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.js.map +1 -0
  220. package/dist/cjs/components/TextEditorV2/plugins/MaxLengthPlugin/index.d.ts +3 -0
  221. package/dist/cjs/components/TextEditorV2/plugins/MaxLengthPlugin/index.js +41 -0
  222. package/dist/cjs/components/TextEditorV2/plugins/MaxLengthPlugin/index.js.map +1 -0
  223. package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.d.ts +2 -0
  224. package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.js +560 -0
  225. package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.js.map +1 -0
  226. package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.d.ts +3 -0
  227. package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.js +31 -0
  228. package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.js.map +1 -0
  229. package/dist/cjs/components/TextEditorV2/plugins/PasteLogPlugin/index.d.ts +2 -0
  230. package/dist/cjs/components/TextEditorV2/plugins/PasteLogPlugin/index.js +37 -0
  231. package/dist/cjs/components/TextEditorV2/plugins/PasteLogPlugin/index.js.map +1 -0
  232. package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.d.ts +8 -0
  233. package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.js +46 -0
  234. package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.js.map +1 -0
  235. package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.d.ts +1 -0
  236. package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.js +16 -0
  237. package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.js.map +1 -0
  238. package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.d.ts +1 -0
  239. package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.js +38 -0
  240. package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.js.map +1 -0
  241. package/dist/cjs/components/TextEditorV2/plugins/TableActionMenuPlugin/index.d.ts +5 -0
  242. package/dist/cjs/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js +487 -0
  243. package/dist/cjs/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js.map +1 -0
  244. package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.d.ts +2 -0
  245. package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.js +253 -0
  246. package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.js.map +1 -0
  247. package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.d.ts +2 -0
  248. package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js +117 -0
  249. package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js.map +1 -0
  250. package/dist/cjs/components/TextEditorV2/plugins/TablePlugin.d.ts +32 -0
  251. package/dist/cjs/components/TextEditorV2/plugins/TablePlugin.js +85 -0
  252. package/dist/cjs/components/TextEditorV2/plugins/TablePlugin.js.map +1 -0
  253. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.d.ts +6 -0
  254. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js +18 -0
  255. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js.map +1 -0
  256. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.d.ts +6 -0
  257. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js +28 -0
  258. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js.map +1 -0
  259. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.d.ts +6 -0
  260. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js +65 -0
  261. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js.map +1 -0
  262. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +6 -0
  263. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +71 -0
  264. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -0
  265. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.d.ts +6 -0
  266. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js +18 -0
  267. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js.map +1 -0
  268. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/link.d.ts +5 -0
  269. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js +46 -0
  270. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js.map +1 -0
  271. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.d.ts +6 -0
  272. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js +28 -0
  273. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js.map +1 -0
  274. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.d.ts +6 -0
  275. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js +52 -0
  276. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js.map +1 -0
  277. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.d.ts +6 -0
  278. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js +28 -0
  279. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js.map +1 -0
  280. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.d.ts +6 -0
  281. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js +19 -0
  282. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js.map +1 -0
  283. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.d.ts +6 -0
  284. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js +41 -0
  285. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js.map +1 -0
  286. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.d.ts +11 -0
  287. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js +162 -0
  288. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js.map +1 -0
  289. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.d.ts +4 -0
  290. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js +163 -0
  291. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -0
  292. package/dist/cjs/components/TextEditorV2/plugins/TreeViewPlugin/index.d.ts +2 -0
  293. package/dist/cjs/components/TextEditorV2/plugins/TreeViewPlugin/index.js +12 -0
  294. package/dist/cjs/components/TextEditorV2/plugins/TreeViewPlugin/index.js.map +1 -0
  295. package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.d.ts +3 -0
  296. package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.js +25 -0
  297. package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.js.map +1 -0
  298. package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.d.ts +3 -0
  299. package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.js +25 -0
  300. package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.js.map +1 -0
  301. package/dist/cjs/components/TextEditorV2/shared/canUseDOM.d.ts +1 -0
  302. package/dist/cjs/components/TextEditorV2/shared/canUseDOM.js +7 -0
  303. package/dist/cjs/components/TextEditorV2/shared/canUseDOM.js.map +1 -0
  304. package/dist/cjs/components/TextEditorV2/shared/caretFromPoint.d.ts +4 -0
  305. package/dist/cjs/components/TextEditorV2/shared/caretFromPoint.js +32 -0
  306. package/dist/cjs/components/TextEditorV2/shared/caretFromPoint.js.map +1 -0
  307. package/dist/cjs/components/TextEditorV2/shared/environment.d.ts +16 -0
  308. package/dist/cjs/components/TextEditorV2/shared/environment.js +17 -0
  309. package/dist/cjs/components/TextEditorV2/shared/environment.js.map +1 -0
  310. package/dist/cjs/components/TextEditorV2/shared/invariant.d.ts +1 -0
  311. package/dist/cjs/components/TextEditorV2/shared/invariant.js +15 -0
  312. package/dist/cjs/components/TextEditorV2/shared/invariant.js.map +1 -0
  313. package/dist/cjs/components/TextEditorV2/shared/simpleDiffWithCursor.d.ts +5 -0
  314. package/dist/cjs/components/TextEditorV2/shared/simpleDiffWithCursor.js +28 -0
  315. package/dist/cjs/components/TextEditorV2/shared/simpleDiffWithCursor.js.map +1 -0
  316. package/dist/cjs/components/TextEditorV2/shared/useLayoutEffect.d.ts +3 -0
  317. package/dist/cjs/components/TextEditorV2/shared/useLayoutEffect.js +7 -0
  318. package/dist/cjs/components/TextEditorV2/shared/useLayoutEffect.js.map +1 -0
  319. package/dist/cjs/components/TextEditorV2/shared/warnOnlyOnce.d.ts +1 -0
  320. package/dist/cjs/components/TextEditorV2/shared/warnOnlyOnce.js +16 -0
  321. package/dist/cjs/components/TextEditorV2/shared/warnOnlyOnce.js.map +1 -0
  322. package/dist/cjs/components/TextEditorV2/style.d.ts +2 -0
  323. package/dist/cjs/components/TextEditorV2/style.js +9 -0
  324. package/dist/cjs/components/TextEditorV2/style.js.map +1 -0
  325. package/dist/cjs/components/TextEditorV2/themes/CommentEditorTheme.d.ts +3 -0
  326. package/dist/cjs/components/TextEditorV2/themes/CommentEditorTheme.js +7 -0
  327. package/dist/cjs/components/TextEditorV2/themes/CommentEditorTheme.js.map +1 -0
  328. package/dist/cjs/components/TextEditorV2/themes/PlaygroundEditorTheme.d.ts +3 -0
  329. package/dist/cjs/components/TextEditorV2/themes/PlaygroundEditorTheme.js +107 -0
  330. package/dist/cjs/components/TextEditorV2/themes/PlaygroundEditorTheme.js.map +1 -0
  331. package/dist/cjs/components/TextEditorV2/themes/StickyEditorTheme.d.ts +3 -0
  332. package/dist/cjs/components/TextEditorV2/themes/StickyEditorTheme.js +7 -0
  333. package/dist/cjs/components/TextEditorV2/themes/StickyEditorTheme.js.map +1 -0
  334. package/dist/cjs/components/TextEditorV2/ui/Button.d.ts +11 -0
  335. package/dist/cjs/components/TextEditorV2/ui/Button.js +11 -0
  336. package/dist/cjs/components/TextEditorV2/ui/Button.js.map +1 -0
  337. package/dist/cjs/components/TextEditorV2/ui/ColorPicker.d.ts +12 -0
  338. package/dist/cjs/components/TextEditorV2/ui/ColorPicker.js +216 -0
  339. package/dist/cjs/components/TextEditorV2/ui/ColorPicker.js.map +1 -0
  340. package/dist/cjs/components/TextEditorV2/ui/ContentEditable.d.ts +4 -0
  341. package/dist/cjs/components/TextEditorV2/ui/ContentEditable.js +11 -0
  342. package/dist/cjs/components/TextEditorV2/ui/ContentEditable.js.map +1 -0
  343. package/dist/cjs/components/TextEditorV2/ui/Dialog.d.ts +9 -0
  344. package/dist/cjs/components/TextEditorV2/ui/Dialog.js +15 -0
  345. package/dist/cjs/components/TextEditorV2/ui/Dialog.js.map +1 -0
  346. package/dist/cjs/components/TextEditorV2/ui/DropDown.d.ts +17 -0
  347. package/dist/cjs/components/TextEditorV2/ui/DropDown.js +133 -0
  348. package/dist/cjs/components/TextEditorV2/ui/DropDown.js.map +1 -0
  349. package/dist/cjs/components/TextEditorV2/ui/DropdownColorPicker.d.ts +21 -0
  350. package/dist/cjs/components/TextEditorV2/ui/DropdownColorPicker.js +20 -0
  351. package/dist/cjs/components/TextEditorV2/ui/DropdownColorPicker.js.map +1 -0
  352. package/dist/cjs/components/TextEditorV2/ui/EquationEditor.d.ts +8 -0
  353. package/dist/cjs/components/TextEditorV2/ui/EquationEditor.js +20 -0
  354. package/dist/cjs/components/TextEditorV2/ui/EquationEditor.js.map +1 -0
  355. package/dist/cjs/components/TextEditorV2/ui/FileInput.d.ts +9 -0
  356. package/dist/cjs/components/TextEditorV2/ui/FileInput.js +12 -0
  357. package/dist/cjs/components/TextEditorV2/ui/FileInput.js.map +1 -0
  358. package/dist/cjs/components/TextEditorV2/ui/ImageResizer.d.ts +11 -0
  359. package/dist/cjs/components/TextEditorV2/ui/ImageResizer.js +178 -0
  360. package/dist/cjs/components/TextEditorV2/ui/ImageResizer.js.map +1 -0
  361. package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.d.ts +7 -0
  362. package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.js +39 -0
  363. package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.js.map +1 -0
  364. package/dist/cjs/components/TextEditorV2/ui/KatexRenderer.d.ts +6 -0
  365. package/dist/cjs/components/TextEditorV2/ui/KatexRenderer.js +33 -0
  366. package/dist/cjs/components/TextEditorV2/ui/KatexRenderer.js.map +1 -0
  367. package/dist/cjs/components/TextEditorV2/ui/Modal.d.ts +8 -0
  368. package/dist/cjs/components/TextEditorV2/ui/Modal.js +54 -0
  369. package/dist/cjs/components/TextEditorV2/ui/Modal.js.map +1 -0
  370. package/dist/cjs/components/TextEditorV2/ui/Placeholder.d.ts +6 -0
  371. package/dist/cjs/components/TextEditorV2/ui/Placeholder.js +10 -0
  372. package/dist/cjs/components/TextEditorV2/ui/Placeholder.js.map +1 -0
  373. package/dist/cjs/components/TextEditorV2/ui/Select.d.ts +7 -0
  374. package/dist/cjs/components/TextEditorV2/ui/Select.js +12 -0
  375. package/dist/cjs/components/TextEditorV2/ui/Select.js.map +1 -0
  376. package/dist/cjs/components/TextEditorV2/ui/Switch.d.ts +7 -0
  377. package/dist/cjs/components/TextEditorV2/ui/Switch.js +15 -0
  378. package/dist/cjs/components/TextEditorV2/ui/Switch.js.map +1 -0
  379. package/dist/cjs/components/TextEditorV2/ui/TextInput.d.ts +12 -0
  380. package/dist/cjs/components/TextEditorV2/ui/TextInput.js +14 -0
  381. package/dist/cjs/components/TextEditorV2/ui/TextInput.js.map +1 -0
  382. package/dist/cjs/components/TextEditorV2/utils/emoji-list.d.ts +20 -0
  383. package/dist/cjs/components/TextEditorV2/utils/emoji-list.js +16607 -0
  384. package/dist/cjs/components/TextEditorV2/utils/emoji-list.js.map +1 -0
  385. package/dist/cjs/components/TextEditorV2/utils/getDOMRangeRect.d.ts +1 -0
  386. package/dist/cjs/components/TextEditorV2/utils/getDOMRangeRect.js +19 -0
  387. package/dist/cjs/components/TextEditorV2/utils/getDOMRangeRect.js.map +1 -0
  388. package/dist/cjs/components/TextEditorV2/utils/getPrepopulatedRichText.d.ts +1 -0
  389. package/dist/cjs/components/TextEditorV2/utils/getPrepopulatedRichText.js +35 -0
  390. package/dist/cjs/components/TextEditorV2/utils/getPrepopulatedRichText.js.map +1 -0
  391. package/dist/cjs/components/TextEditorV2/utils/getSelectedNode.d.ts +2 -0
  392. package/dist/cjs/components/TextEditorV2/utils/getSelectedNode.js +21 -0
  393. package/dist/cjs/components/TextEditorV2/utils/getSelectedNode.js.map +1 -0
  394. package/dist/cjs/components/TextEditorV2/utils/guard.d.ts +1 -0
  395. package/dist/cjs/components/TextEditorV2/utils/guard.js +7 -0
  396. package/dist/cjs/components/TextEditorV2/utils/guard.js.map +1 -0
  397. package/dist/cjs/components/TextEditorV2/utils/isMobileWidth.d.ts +0 -0
  398. package/dist/cjs/components/TextEditorV2/utils/isMobileWidth.js +2 -0
  399. package/dist/cjs/components/TextEditorV2/utils/isMobileWidth.js.map +1 -0
  400. package/dist/cjs/components/TextEditorV2/utils/joinClasses.d.ts +1 -0
  401. package/dist/cjs/components/TextEditorV2/utils/joinClasses.js +11 -0
  402. package/dist/cjs/components/TextEditorV2/utils/joinClasses.js.map +1 -0
  403. package/dist/cjs/components/TextEditorV2/utils/point.d.ts +14 -0
  404. package/dist/cjs/components/TextEditorV2/utils/point.js +51 -0
  405. package/dist/cjs/components/TextEditorV2/utils/point.js.map +1 -0
  406. package/dist/cjs/components/TextEditorV2/utils/rect.d.ts +38 -0
  407. package/dist/cjs/components/TextEditorV2/utils/rect.js +125 -0
  408. package/dist/cjs/components/TextEditorV2/utils/rect.js.map +1 -0
  409. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPosition.d.ts +1 -0
  410. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPosition.js +33 -0
  411. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPosition.js.map +1 -0
  412. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
  413. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js +31 -0
  414. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
  415. package/dist/cjs/components/TextEditorV2/utils/swipe.d.ts +4 -0
  416. package/dist/cjs/components/TextEditorV2/utils/swipe.js +97 -0
  417. package/dist/cjs/components/TextEditorV2/utils/swipe.js.map +1 -0
  418. package/dist/cjs/components/TextEditorV2/utils/url.d.ts +2 -0
  419. package/dist/cjs/components/TextEditorV2/utils/url.js +26 -0
  420. package/dist/cjs/components/TextEditorV2/utils/url.js.map +1 -0
  421. package/dist/cjs/index.d.ts +2 -1
  422. package/dist/cjs/index.js +5 -3
  423. package/dist/cjs/index.js.map +1 -1
  424. package/dist/esm/components/TextEditorV2/commenting/index.d.ts +41 -0
  425. package/dist/esm/components/TextEditorV2/commenting/index.js +334 -0
  426. package/dist/esm/components/TextEditorV2/commenting/index.js.map +1 -0
  427. package/dist/esm/components/TextEditorV2/constants.d.ts +1 -0
  428. package/dist/esm/components/TextEditorV2/constants.js +2 -0
  429. package/dist/esm/components/TextEditorV2/constants.js.map +1 -0
  430. package/dist/esm/components/TextEditorV2/context/SettingsContext.d.ts +12 -0
  431. package/dist/esm/components/TextEditorV2/context/SettingsContext.js +54 -0
  432. package/dist/esm/components/TextEditorV2/context/SettingsContext.js.map +1 -0
  433. package/dist/esm/components/TextEditorV2/context/SharedAutocompleteContext.d.ts +10 -0
  434. package/dist/esm/components/TextEditorV2/context/SharedAutocompleteContext.js +44 -0
  435. package/dist/esm/components/TextEditorV2/context/SharedAutocompleteContext.js.map +1 -0
  436. package/dist/esm/components/TextEditorV2/context/SharedHistoryContext.d.ts +11 -0
  437. package/dist/esm/components/TextEditorV2/context/SharedHistoryContext.js +11 -0
  438. package/dist/esm/components/TextEditorV2/context/SharedHistoryContext.js.map +1 -0
  439. package/dist/esm/components/TextEditorV2/editor.d.ts +10 -0
  440. package/dist/esm/components/TextEditorV2/editor.js +200 -0
  441. package/dist/esm/components/TextEditorV2/editor.js.map +1 -0
  442. package/dist/esm/components/TextEditorV2/hooks/useModal.d.ts +5 -0
  443. package/dist/esm/components/TextEditorV2/hooks/useModal.js +28 -0
  444. package/dist/esm/components/TextEditorV2/hooks/useModal.js.map +1 -0
  445. package/dist/esm/components/TextEditorV2/hooks/useReport.d.ts +1 -0
  446. package/dist/esm/components/TextEditorV2/hooks/useReport.js +42 -0
  447. package/dist/esm/components/TextEditorV2/hooks/useReport.js.map +1 -0
  448. package/dist/esm/components/TextEditorV2/lib/Settings.d.ts +2 -0
  449. package/dist/esm/components/TextEditorV2/lib/Settings.js +48 -0
  450. package/dist/esm/components/TextEditorV2/lib/Settings.js.map +1 -0
  451. package/dist/esm/components/TextEditorV2/lib/appSettings.d.ts +19 -0
  452. package/dist/esm/components/TextEditorV2/lib/appSettings.js +18 -0
  453. package/dist/esm/components/TextEditorV2/lib/appSettings.js.map +1 -0
  454. package/dist/esm/components/TextEditorV2/lib/collaboration.d.ts +3 -0
  455. package/dist/esm/components/TextEditorV2/lib/collaboration.js +23 -0
  456. package/dist/esm/components/TextEditorV2/lib/collaboration.js.map +1 -0
  457. package/dist/esm/components/TextEditorV2/lib/setupEnv.d.ts +1 -0
  458. package/dist/esm/components/TextEditorV2/lib/setupEnv.js +21 -0
  459. package/dist/esm/components/TextEditorV2/lib/setupEnv.js.map +1 -0
  460. package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.d.ts +25 -0
  461. package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.js +54 -0
  462. package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.js.map +1 -0
  463. package/dist/esm/components/TextEditorV2/nodes/EmojiNode.d.ts +18 -0
  464. package/dist/esm/components/TextEditorV2/nodes/EmojiNode.js +57 -0
  465. package/dist/esm/components/TextEditorV2/nodes/EmojiNode.js.map +1 -0
  466. package/dist/esm/components/TextEditorV2/nodes/EquationComponent.d.ts +9 -0
  467. package/dist/esm/components/TextEditorV2/nodes/EquationComponent.js +68 -0
  468. package/dist/esm/components/TextEditorV2/nodes/EquationComponent.js.map +1 -0
  469. package/dist/esm/components/TextEditorV2/nodes/EquationNode.d.ts +26 -0
  470. package/dist/esm/components/TextEditorV2/nodes/EquationNode.js +121 -0
  471. package/dist/esm/components/TextEditorV2/nodes/EquationNode.js.map +1 -0
  472. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.d.ts +6 -0
  473. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js +113 -0
  474. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js.map +1 -0
  475. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.d.ts +50 -0
  476. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js +56 -0
  477. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js.map +1 -0
  478. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.d.ts +44 -0
  479. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js +137 -0
  480. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js.map +1 -0
  481. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/index.d.ts +22 -0
  482. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/index.js +98 -0
  483. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/index.js.map +1 -0
  484. package/dist/esm/components/TextEditorV2/nodes/ExtendedTextNode.d.ts +12 -0
  485. package/dist/esm/components/TextEditorV2/nodes/ExtendedTextNode.js +101 -0
  486. package/dist/esm/components/TextEditorV2/nodes/ExtendedTextNode.js.map +1 -0
  487. package/dist/esm/components/TextEditorV2/nodes/FigmaNode.d.ts +19 -0
  488. package/dist/esm/components/TextEditorV2/nodes/FigmaNode.js +58 -0
  489. package/dist/esm/components/TextEditorV2/nodes/FigmaNode.js.map +1 -0
  490. package/dist/esm/components/TextEditorV2/nodes/ImageComponent.d.ts +14 -0
  491. package/dist/esm/components/TextEditorV2/nodes/ImageComponent.js +207 -0
  492. package/dist/esm/components/TextEditorV2/nodes/ImageComponent.js.map +1 -0
  493. package/dist/esm/components/TextEditorV2/nodes/ImageNode.d.ts +56 -0
  494. package/dist/esm/components/TextEditorV2/nodes/ImageNode.js +131 -0
  495. package/dist/esm/components/TextEditorV2/nodes/ImageNode.js.map +1 -0
  496. package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.d.ts +18 -0
  497. package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js +189 -0
  498. package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -0
  499. package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.d.ts +54 -0
  500. package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.js +137 -0
  501. package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.js.map +1 -0
  502. package/dist/esm/components/TextEditorV2/nodes/KeywordNode.d.ts +15 -0
  503. package/dist/esm/components/TextEditorV2/nodes/KeywordNode.js +49 -0
  504. package/dist/esm/components/TextEditorV2/nodes/KeywordNode.js.map +1 -0
  505. package/dist/esm/components/TextEditorV2/nodes/LayoutContainerNode.d.ts +21 -0
  506. package/dist/esm/components/TextEditorV2/nodes/LayoutContainerNode.js +58 -0
  507. package/dist/esm/components/TextEditorV2/nodes/LayoutContainerNode.js.map +1 -0
  508. package/dist/esm/components/TextEditorV2/nodes/LayoutItemNode.d.ts +15 -0
  509. package/dist/esm/components/TextEditorV2/nodes/LayoutItemNode.js +46 -0
  510. package/dist/esm/components/TextEditorV2/nodes/LayoutItemNode.js.map +1 -0
  511. package/dist/esm/components/TextEditorV2/nodes/MentionNode.d.ts +20 -0
  512. package/dist/esm/components/TextEditorV2/nodes/MentionNode.js +84 -0
  513. package/dist/esm/components/TextEditorV2/nodes/MentionNode.js.map +1 -0
  514. package/dist/esm/components/TextEditorV2/nodes/PageBreakNode/index.d.ts +17 -0
  515. package/dist/esm/components/TextEditorV2/nodes/PageBreakNode/index.js +108 -0
  516. package/dist/esm/components/TextEditorV2/nodes/PageBreakNode/index.js.map +1 -0
  517. package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.d.ts +3 -0
  518. package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.js +66 -0
  519. package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.js.map +1 -0
  520. package/dist/esm/components/TextEditorV2/nodes/PollComponent.d.ts +8 -0
  521. package/dist/esm/components/TextEditorV2/nodes/PollComponent.js +109 -0
  522. package/dist/esm/components/TextEditorV2/nodes/PollComponent.js.map +1 -0
  523. package/dist/esm/components/TextEditorV2/nodes/PollNode.d.ts +33 -0
  524. package/dist/esm/components/TextEditorV2/nodes/PollNode.js +143 -0
  525. package/dist/esm/components/TextEditorV2/nodes/PollNode.js.map +1 -0
  526. package/dist/esm/components/TextEditorV2/nodes/StickyComponent.d.ts +9 -0
  527. package/dist/esm/components/TextEditorV2/nodes/StickyComponent.js +163 -0
  528. package/dist/esm/components/TextEditorV2/nodes/StickyComponent.js.map +1 -0
  529. package/dist/esm/components/TextEditorV2/nodes/StickyNode.d.ts +37 -0
  530. package/dist/esm/components/TextEditorV2/nodes/StickyNode.js +89 -0
  531. package/dist/esm/components/TextEditorV2/nodes/StickyNode.js.map +1 -0
  532. package/dist/esm/components/TextEditorV2/nodes/TableNode.d.ts +54 -0
  533. package/dist/esm/components/TextEditorV2/nodes/TableNode.js +188 -0
  534. package/dist/esm/components/TextEditorV2/nodes/TableNode.js.map +1 -0
  535. package/dist/esm/components/TextEditorV2/nodes/TweetNode.d.ts +28 -0
  536. package/dist/esm/components/TextEditorV2/nodes/TweetNode.js +151 -0
  537. package/dist/esm/components/TextEditorV2/nodes/TweetNode.js.map +1 -0
  538. package/dist/esm/components/TextEditorV2/nodes/YouTubeNode.d.ts +28 -0
  539. package/dist/esm/components/TextEditorV2/nodes/YouTubeNode.js +98 -0
  540. package/dist/esm/components/TextEditorV2/nodes/YouTubeNode.js.map +1 -0
  541. package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.d.ts +2 -0
  542. package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.js +180 -0
  543. package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.js.map +1 -0
  544. package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.d.ts +19 -0
  545. package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js +174 -0
  546. package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js.map +1 -0
  547. package/dist/esm/components/TextEditorV2/plugins/AutoLinkPlugin/index.d.ts +2 -0
  548. package/dist/esm/components/TextEditorV2/plugins/AutoLinkPlugin/index.js +12 -0
  549. package/dist/esm/components/TextEditorV2/plugins/AutoLinkPlugin/index.js.map +1 -0
  550. package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.d.ts +2 -0
  551. package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.js +2461 -0
  552. package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.js.map +1 -0
  553. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +8 -0
  554. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +52 -0
  555. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js.map +1 -0
  556. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +10 -0
  557. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js +155 -0
  558. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js.map +1 -0
  559. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.d.ts +4 -0
  560. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js +108 -0
  561. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js.map +1 -0
  562. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.d.ts +1 -0
  563. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js +18 -0
  564. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js.map +1 -0
  565. package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.d.ts +1 -0
  566. package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js +9 -0
  567. package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js.map +1 -0
  568. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.d.ts +23 -0
  569. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js +82 -0
  570. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js.map +1 -0
  571. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.d.ts +17 -0
  572. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js +64 -0
  573. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js.map +1 -0
  574. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.d.ts +18 -0
  575. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js +89 -0
  576. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js.map +1 -0
  577. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.d.ts +3 -0
  578. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.js +144 -0
  579. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.js.map +1 -0
  580. package/dist/esm/components/TextEditorV2/plugins/ComponentPickerPlugin/index.d.ts +2 -0
  581. package/dist/esm/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js +261 -0
  582. package/dist/esm/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js.map +1 -0
  583. package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.d.ts +11 -0
  584. package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.js +167 -0
  585. package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.js.map +1 -0
  586. package/dist/esm/components/TextEditorV2/plugins/DocsPlugin/index.d.ts +2 -0
  587. package/dist/esm/components/TextEditorV2/plugins/DocsPlugin/index.js +6 -0
  588. package/dist/esm/components/TextEditorV2/plugins/DocsPlugin/index.js.map +1 -0
  589. package/dist/esm/components/TextEditorV2/plugins/DragDropPastePlugin/index.d.ts +1 -0
  590. package/dist/esm/components/TextEditorV2/plugins/DragDropPastePlugin/index.js +41 -0
  591. package/dist/esm/components/TextEditorV2/plugins/DragDropPastePlugin/index.js.map +1 -0
  592. package/dist/esm/components/TextEditorV2/plugins/DraggableBlockPlugin/index.d.ts +4 -0
  593. package/dist/esm/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js +284 -0
  594. package/dist/esm/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js.map +1 -0
  595. package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.d.ts +2 -0
  596. package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js +94 -0
  597. package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js.map +1 -0
  598. package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.d.ts +1 -0
  599. package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.js +61 -0
  600. package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.js.map +1 -0
  601. package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.d.ts +14 -0
  602. package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.js +36 -0
  603. package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.js.map +1 -0
  604. package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.d.ts +3 -0
  605. package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js +24 -0
  606. package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js.map +1 -0
  607. package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.d.ts +3 -0
  608. package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.js +21 -0
  609. package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.js.map +1 -0
  610. package/dist/esm/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.d.ts +7 -0
  611. package/dist/esm/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js +196 -0
  612. package/dist/esm/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
  613. package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +4 -0
  614. package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js +225 -0
  615. package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -0
  616. package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.d.ts +22 -0
  617. package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.js +181 -0
  618. package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.js.map +1 -0
  619. package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.d.ts +17 -0
  620. package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.js +187 -0
  621. package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.js.map +1 -0
  622. package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.d.ts +1 -0
  623. package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.js +30 -0
  624. package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.js.map +1 -0
  625. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +6 -0
  626. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js +30 -0
  627. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js.map +1 -0
  628. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.d.ts +7 -0
  629. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js +85 -0
  630. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js.map +1 -0
  631. package/dist/esm/components/TextEditorV2/plugins/LinkPlugin/index.d.ts +2 -0
  632. package/dist/esm/components/TextEditorV2/plugins/LinkPlugin/index.js +7 -0
  633. package/dist/esm/components/TextEditorV2/plugins/LinkPlugin/index.js.map +1 -0
  634. package/dist/esm/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.d.ts +5 -0
  635. package/dist/esm/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js +41 -0
  636. package/dist/esm/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js.map +1 -0
  637. package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.d.ts +2 -0
  638. package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js +7 -0
  639. package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js.map +1 -0
  640. package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.d.ts +8 -0
  641. package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.js +239 -0
  642. package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.js.map +1 -0
  643. package/dist/esm/components/TextEditorV2/plugins/MaxLengthPlugin/index.d.ts +3 -0
  644. package/dist/esm/components/TextEditorV2/plugins/MaxLengthPlugin/index.js +38 -0
  645. package/dist/esm/components/TextEditorV2/plugins/MaxLengthPlugin/index.js.map +1 -0
  646. package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.d.ts +2 -0
  647. package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.js +557 -0
  648. package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.js.map +1 -0
  649. package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.d.ts +3 -0
  650. package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.js +27 -0
  651. package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.js.map +1 -0
  652. package/dist/esm/components/TextEditorV2/plugins/PasteLogPlugin/index.d.ts +2 -0
  653. package/dist/esm/components/TextEditorV2/plugins/PasteLogPlugin/index.js +33 -0
  654. package/dist/esm/components/TextEditorV2/plugins/PasteLogPlugin/index.js.map +1 -0
  655. package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.d.ts +8 -0
  656. package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.js +40 -0
  657. package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.js.map +1 -0
  658. package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.d.ts +1 -0
  659. package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.js +13 -0
  660. package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.js.map +1 -0
  661. package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.d.ts +1 -0
  662. package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.js +35 -0
  663. package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.js.map +1 -0
  664. package/dist/esm/components/TextEditorV2/plugins/TableActionMenuPlugin/index.d.ts +5 -0
  665. package/dist/esm/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js +483 -0
  666. package/dist/esm/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js.map +1 -0
  667. package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.d.ts +2 -0
  668. package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.js +249 -0
  669. package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.js.map +1 -0
  670. package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.d.ts +2 -0
  671. package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js +113 -0
  672. package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js.map +1 -0
  673. package/dist/esm/components/TextEditorV2/plugins/TablePlugin.d.ts +32 -0
  674. package/dist/esm/components/TextEditorV2/plugins/TablePlugin.js +78 -0
  675. package/dist/esm/components/TextEditorV2/plugins/TablePlugin.js.map +1 -0
  676. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.d.ts +6 -0
  677. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js +14 -0
  678. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js.map +1 -0
  679. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.d.ts +6 -0
  680. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js +24 -0
  681. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js.map +1 -0
  682. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.d.ts +6 -0
  683. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js +61 -0
  684. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js.map +1 -0
  685. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +6 -0
  686. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +67 -0
  687. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -0
  688. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.d.ts +6 -0
  689. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js +14 -0
  690. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js.map +1 -0
  691. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/link.d.ts +5 -0
  692. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js +42 -0
  693. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js.map +1 -0
  694. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.d.ts +6 -0
  695. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js +24 -0
  696. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js.map +1 -0
  697. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.d.ts +6 -0
  698. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js +48 -0
  699. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js.map +1 -0
  700. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.d.ts +6 -0
  701. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js +24 -0
  702. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js.map +1 -0
  703. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.d.ts +6 -0
  704. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js +15 -0
  705. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js.map +1 -0
  706. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.d.ts +6 -0
  707. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js +37 -0
  708. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js.map +1 -0
  709. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.d.ts +11 -0
  710. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js +159 -0
  711. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js.map +1 -0
  712. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.d.ts +4 -0
  713. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js +159 -0
  714. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -0
  715. package/dist/esm/components/TextEditorV2/plugins/TreeViewPlugin/index.d.ts +2 -0
  716. package/dist/esm/components/TextEditorV2/plugins/TreeViewPlugin/index.js +8 -0
  717. package/dist/esm/components/TextEditorV2/plugins/TreeViewPlugin/index.js.map +1 -0
  718. package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.d.ts +3 -0
  719. package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.js +21 -0
  720. package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.js.map +1 -0
  721. package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.d.ts +3 -0
  722. package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.js +21 -0
  723. package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.js.map +1 -0
  724. package/dist/esm/components/TextEditorV2/shared/canUseDOM.d.ts +1 -0
  725. package/dist/esm/components/TextEditorV2/shared/canUseDOM.js +4 -0
  726. package/dist/esm/components/TextEditorV2/shared/canUseDOM.js.map +1 -0
  727. package/dist/esm/components/TextEditorV2/shared/caretFromPoint.d.ts +4 -0
  728. package/dist/esm/components/TextEditorV2/shared/caretFromPoint.js +29 -0
  729. package/dist/esm/components/TextEditorV2/shared/caretFromPoint.js.map +1 -0
  730. package/dist/esm/components/TextEditorV2/shared/environment.d.ts +16 -0
  731. package/dist/esm/components/TextEditorV2/shared/environment.js +14 -0
  732. package/dist/esm/components/TextEditorV2/shared/environment.js.map +1 -0
  733. package/dist/esm/components/TextEditorV2/shared/invariant.d.ts +1 -0
  734. package/dist/esm/components/TextEditorV2/shared/invariant.js +12 -0
  735. package/dist/esm/components/TextEditorV2/shared/invariant.js.map +1 -0
  736. package/dist/esm/components/TextEditorV2/shared/simpleDiffWithCursor.d.ts +5 -0
  737. package/dist/esm/components/TextEditorV2/shared/simpleDiffWithCursor.js +25 -0
  738. package/dist/esm/components/TextEditorV2/shared/simpleDiffWithCursor.js.map +1 -0
  739. package/dist/esm/components/TextEditorV2/shared/useLayoutEffect.d.ts +3 -0
  740. package/dist/esm/components/TextEditorV2/shared/useLayoutEffect.js +5 -0
  741. package/dist/esm/components/TextEditorV2/shared/useLayoutEffect.js.map +1 -0
  742. package/dist/esm/components/TextEditorV2/shared/warnOnlyOnce.d.ts +1 -0
  743. package/dist/esm/components/TextEditorV2/shared/warnOnlyOnce.js +13 -0
  744. package/dist/esm/components/TextEditorV2/shared/warnOnlyOnce.js.map +1 -0
  745. package/dist/esm/components/TextEditorV2/style.d.ts +2 -0
  746. package/dist/esm/components/TextEditorV2/style.js +5 -0
  747. package/dist/esm/components/TextEditorV2/style.js.map +1 -0
  748. package/dist/esm/components/TextEditorV2/themes/CommentEditorTheme.d.ts +3 -0
  749. package/dist/esm/components/TextEditorV2/themes/CommentEditorTheme.js +5 -0
  750. package/dist/esm/components/TextEditorV2/themes/CommentEditorTheme.js.map +1 -0
  751. package/dist/esm/components/TextEditorV2/themes/PlaygroundEditorTheme.d.ts +3 -0
  752. package/dist/esm/components/TextEditorV2/themes/PlaygroundEditorTheme.js +105 -0
  753. package/dist/esm/components/TextEditorV2/themes/PlaygroundEditorTheme.js.map +1 -0
  754. package/dist/esm/components/TextEditorV2/themes/StickyEditorTheme.d.ts +3 -0
  755. package/dist/esm/components/TextEditorV2/themes/StickyEditorTheme.js +5 -0
  756. package/dist/esm/components/TextEditorV2/themes/StickyEditorTheme.js.map +1 -0
  757. package/dist/esm/components/TextEditorV2/ui/Button.d.ts +11 -0
  758. package/dist/esm/components/TextEditorV2/ui/Button.js +8 -0
  759. package/dist/esm/components/TextEditorV2/ui/Button.js.map +1 -0
  760. package/dist/esm/components/TextEditorV2/ui/ColorPicker.d.ts +12 -0
  761. package/dist/esm/components/TextEditorV2/ui/ColorPicker.js +212 -0
  762. package/dist/esm/components/TextEditorV2/ui/ColorPicker.js.map +1 -0
  763. package/dist/esm/components/TextEditorV2/ui/ContentEditable.d.ts +4 -0
  764. package/dist/esm/components/TextEditorV2/ui/ContentEditable.js +7 -0
  765. package/dist/esm/components/TextEditorV2/ui/ContentEditable.js.map +1 -0
  766. package/dist/esm/components/TextEditorV2/ui/Dialog.d.ts +9 -0
  767. package/dist/esm/components/TextEditorV2/ui/Dialog.js +10 -0
  768. package/dist/esm/components/TextEditorV2/ui/Dialog.js.map +1 -0
  769. package/dist/esm/components/TextEditorV2/ui/DropDown.d.ts +17 -0
  770. package/dist/esm/components/TextEditorV2/ui/DropDown.js +129 -0
  771. package/dist/esm/components/TextEditorV2/ui/DropDown.js.map +1 -0
  772. package/dist/esm/components/TextEditorV2/ui/DropdownColorPicker.d.ts +21 -0
  773. package/dist/esm/components/TextEditorV2/ui/DropdownColorPicker.js +17 -0
  774. package/dist/esm/components/TextEditorV2/ui/DropdownColorPicker.js.map +1 -0
  775. package/dist/esm/components/TextEditorV2/ui/EquationEditor.d.ts +8 -0
  776. package/dist/esm/components/TextEditorV2/ui/EquationEditor.js +17 -0
  777. package/dist/esm/components/TextEditorV2/ui/EquationEditor.js.map +1 -0
  778. package/dist/esm/components/TextEditorV2/ui/FileInput.d.ts +9 -0
  779. package/dist/esm/components/TextEditorV2/ui/FileInput.js +8 -0
  780. package/dist/esm/components/TextEditorV2/ui/FileInput.js.map +1 -0
  781. package/dist/esm/components/TextEditorV2/ui/ImageResizer.d.ts +11 -0
  782. package/dist/esm/components/TextEditorV2/ui/ImageResizer.js +174 -0
  783. package/dist/esm/components/TextEditorV2/ui/ImageResizer.js.map +1 -0
  784. package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.d.ts +7 -0
  785. package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.js +35 -0
  786. package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.js.map +1 -0
  787. package/dist/esm/components/TextEditorV2/ui/KatexRenderer.d.ts +6 -0
  788. package/dist/esm/components/TextEditorV2/ui/KatexRenderer.js +29 -0
  789. package/dist/esm/components/TextEditorV2/ui/KatexRenderer.js.map +1 -0
  790. package/dist/esm/components/TextEditorV2/ui/Modal.d.ts +8 -0
  791. package/dist/esm/components/TextEditorV2/ui/Modal.js +50 -0
  792. package/dist/esm/components/TextEditorV2/ui/Modal.js.map +1 -0
  793. package/dist/esm/components/TextEditorV2/ui/Placeholder.d.ts +6 -0
  794. package/dist/esm/components/TextEditorV2/ui/Placeholder.js +6 -0
  795. package/dist/esm/components/TextEditorV2/ui/Placeholder.js.map +1 -0
  796. package/dist/esm/components/TextEditorV2/ui/Select.d.ts +7 -0
  797. package/dist/esm/components/TextEditorV2/ui/Select.js +9 -0
  798. package/dist/esm/components/TextEditorV2/ui/Select.js.map +1 -0
  799. package/dist/esm/components/TextEditorV2/ui/Switch.d.ts +7 -0
  800. package/dist/esm/components/TextEditorV2/ui/Switch.js +11 -0
  801. package/dist/esm/components/TextEditorV2/ui/Switch.js.map +1 -0
  802. package/dist/esm/components/TextEditorV2/ui/TextInput.d.ts +12 -0
  803. package/dist/esm/components/TextEditorV2/ui/TextInput.js +10 -0
  804. package/dist/esm/components/TextEditorV2/ui/TextInput.js.map +1 -0
  805. package/dist/esm/components/TextEditorV2/utils/emoji-list.d.ts +20 -0
  806. package/dist/esm/components/TextEditorV2/utils/emoji-list.js +16605 -0
  807. package/dist/esm/components/TextEditorV2/utils/emoji-list.js.map +1 -0
  808. package/dist/esm/components/TextEditorV2/utils/getDOMRangeRect.d.ts +1 -0
  809. package/dist/esm/components/TextEditorV2/utils/getDOMRangeRect.js +16 -0
  810. package/dist/esm/components/TextEditorV2/utils/getDOMRangeRect.js.map +1 -0
  811. package/dist/esm/components/TextEditorV2/utils/getPrepopulatedRichText.d.ts +1 -0
  812. package/dist/esm/components/TextEditorV2/utils/getPrepopulatedRichText.js +32 -0
  813. package/dist/esm/components/TextEditorV2/utils/getPrepopulatedRichText.js.map +1 -0
  814. package/dist/esm/components/TextEditorV2/utils/getSelectedNode.d.ts +2 -0
  815. package/dist/esm/components/TextEditorV2/utils/getSelectedNode.js +18 -0
  816. package/dist/esm/components/TextEditorV2/utils/getSelectedNode.js.map +1 -0
  817. package/dist/esm/components/TextEditorV2/utils/guard.d.ts +1 -0
  818. package/dist/esm/components/TextEditorV2/utils/guard.js +4 -0
  819. package/dist/esm/components/TextEditorV2/utils/guard.js.map +1 -0
  820. package/dist/esm/components/TextEditorV2/utils/isMobileWidth.d.ts +0 -0
  821. package/dist/esm/components/TextEditorV2/utils/isMobileWidth.js +2 -0
  822. package/dist/esm/components/TextEditorV2/utils/isMobileWidth.js.map +1 -0
  823. package/dist/esm/components/TextEditorV2/utils/joinClasses.d.ts +1 -0
  824. package/dist/esm/components/TextEditorV2/utils/joinClasses.js +8 -0
  825. package/dist/esm/components/TextEditorV2/utils/joinClasses.js.map +1 -0
  826. package/dist/esm/components/TextEditorV2/utils/point.d.ts +14 -0
  827. package/dist/esm/components/TextEditorV2/utils/point.js +47 -0
  828. package/dist/esm/components/TextEditorV2/utils/point.js.map +1 -0
  829. package/dist/esm/components/TextEditorV2/utils/rect.d.ts +38 -0
  830. package/dist/esm/components/TextEditorV2/utils/rect.js +122 -0
  831. package/dist/esm/components/TextEditorV2/utils/rect.js.map +1 -0
  832. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPosition.d.ts +1 -0
  833. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPosition.js +30 -0
  834. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPosition.js.map +1 -0
  835. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
  836. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js +28 -0
  837. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
  838. package/dist/esm/components/TextEditorV2/utils/swipe.d.ts +4 -0
  839. package/dist/esm/components/TextEditorV2/utils/swipe.js +91 -0
  840. package/dist/esm/components/TextEditorV2/utils/swipe.js.map +1 -0
  841. package/dist/esm/components/TextEditorV2/utils/url.d.ts +2 -0
  842. package/dist/esm/components/TextEditorV2/utils/url.js +22 -0
  843. package/dist/esm/components/TextEditorV2/utils/url.js.map +1 -0
  844. package/dist/esm/index.d.ts +2 -1
  845. package/dist/esm/index.js +2 -1
  846. package/dist/esm/index.js.map +1 -1
  847. package/package.json +11 -2
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ *
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.TweetNode = void 0;
11
+ exports.$createTweetNode = $createTweetNode;
12
+ exports.$isTweetNode = $isTweetNode;
13
+ var tslib_1 = require("tslib");
14
+ var LexicalBlockWithAlignableContents_1 = require("@lexical/react/LexicalBlockWithAlignableContents");
15
+ var LexicalDecoratorBlockNode_1 = require("@lexical/react/LexicalDecoratorBlockNode");
16
+ var React = tslib_1.__importStar(require("react"));
17
+ var react_1 = require("react");
18
+ var WIDGET_SCRIPT_URL = 'https://platform.twitter.com/widgets.js';
19
+ function convertTweetElement(domNode) {
20
+ var id = domNode.getAttribute('data-lexical-tweet-id');
21
+ if (id) {
22
+ var node = $createTweetNode(id);
23
+ return { node: node };
24
+ }
25
+ return null;
26
+ }
27
+ var isTwitterScriptLoading = true;
28
+ function TweetComponent(_a) {
29
+ var _this = this;
30
+ var className = _a.className, format = _a.format, loadingComponent = _a.loadingComponent, nodeKey = _a.nodeKey, onError = _a.onError, onLoad = _a.onLoad, tweetID = _a.tweetID;
31
+ var containerRef = (0, react_1.useRef)(null);
32
+ var previousTweetIDRef = (0, react_1.useRef)('');
33
+ var _b = (0, react_1.useState)(false), isTweetLoading = _b[0], setIsTweetLoading = _b[1];
34
+ var createTweet = (0, react_1.useCallback)(function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
35
+ var error_1;
36
+ return tslib_1.__generator(this, function (_a) {
37
+ switch (_a.label) {
38
+ case 0:
39
+ _a.trys.push([0, 2, , 3]);
40
+ // @ts-expect-error Twitter is attached to the window.
41
+ return [4 /*yield*/, window.twttr.widgets.createTweet(tweetID, containerRef.current)];
42
+ case 1:
43
+ // @ts-expect-error Twitter is attached to the window.
44
+ _a.sent();
45
+ setIsTweetLoading(false);
46
+ isTwitterScriptLoading = false;
47
+ if (onLoad) {
48
+ onLoad();
49
+ }
50
+ return [3 /*break*/, 3];
51
+ case 2:
52
+ error_1 = _a.sent();
53
+ if (onError) {
54
+ onError(String(error_1));
55
+ }
56
+ return [3 /*break*/, 3];
57
+ case 3: return [2 /*return*/];
58
+ }
59
+ });
60
+ }); }, [onError, onLoad, tweetID]);
61
+ (0, react_1.useEffect)(function () {
62
+ var _a;
63
+ if (tweetID !== previousTweetIDRef.current) {
64
+ setIsTweetLoading(true);
65
+ if (isTwitterScriptLoading) {
66
+ var script = document.createElement('script');
67
+ script.src = WIDGET_SCRIPT_URL;
68
+ script.async = true;
69
+ (_a = document.body) === null || _a === void 0 ? void 0 : _a.appendChild(script);
70
+ script.onload = createTweet;
71
+ if (onError) {
72
+ script.onerror = onError;
73
+ }
74
+ }
75
+ else {
76
+ createTweet();
77
+ }
78
+ if (previousTweetIDRef) {
79
+ previousTweetIDRef.current = tweetID;
80
+ }
81
+ }
82
+ }, [createTweet, onError, tweetID]);
83
+ return (React.createElement(LexicalBlockWithAlignableContents_1.BlockWithAlignableContents, { className: className, format: format, nodeKey: nodeKey },
84
+ isTweetLoading ? loadingComponent : null,
85
+ React.createElement("div", { ref: containerRef, style: { display: 'inline-block', width: '550px' } })));
86
+ }
87
+ var TweetNode = /** @class */ (function (_super) {
88
+ tslib_1.__extends(TweetNode, _super);
89
+ function TweetNode(id, format, key) {
90
+ var _this = _super.call(this, format, key) || this;
91
+ _this.__id = id;
92
+ return _this;
93
+ }
94
+ TweetNode.getType = function () {
95
+ return 'tweet';
96
+ };
97
+ TweetNode.clone = function (node) {
98
+ return new TweetNode(node.__id, node.__format, node.__key);
99
+ };
100
+ TweetNode.importJSON = function (serializedNode) {
101
+ var node = $createTweetNode(serializedNode.id);
102
+ node.setFormat(serializedNode.format);
103
+ return node;
104
+ };
105
+ TweetNode.prototype.exportJSON = function () {
106
+ return tslib_1.__assign(tslib_1.__assign({}, _super.prototype.exportJSON.call(this)), { id: this.getId(), type: 'tweet', version: 1 });
107
+ };
108
+ TweetNode.importDOM = function () {
109
+ return {
110
+ div: function (domNode) {
111
+ if (!domNode.hasAttribute('data-lexical-tweet-id')) {
112
+ return null;
113
+ }
114
+ return {
115
+ conversion: convertTweetElement,
116
+ priority: 2,
117
+ };
118
+ },
119
+ };
120
+ };
121
+ TweetNode.prototype.exportDOM = function () {
122
+ var element = document.createElement('div');
123
+ element.setAttribute('data-lexical-tweet-id', this.__id);
124
+ var text = document.createTextNode(this.getTextContent());
125
+ element.append(text);
126
+ return { element: element };
127
+ };
128
+ TweetNode.prototype.getId = function () {
129
+ return this.__id;
130
+ };
131
+ TweetNode.prototype.getTextContent = function (
132
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
133
+ _includeInert,
134
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
135
+ _includeDirectionless) {
136
+ return "https://x.com/i/web/status/".concat(this.__id);
137
+ };
138
+ TweetNode.prototype.decorate = function (editor, config) {
139
+ console.log(editor);
140
+ var embedBlockTheme = config.theme.embedBlock || {};
141
+ var className = {
142
+ base: embedBlockTheme.base || '',
143
+ focus: embedBlockTheme.focus || '',
144
+ };
145
+ return (React.createElement(TweetComponent, { className: className, format: this.__format, loadingComponent: 'Loading...', nodeKey: this.getKey(), tweetID: this.__id }));
146
+ };
147
+ return TweetNode;
148
+ }(LexicalDecoratorBlockNode_1.DecoratorBlockNode));
149
+ exports.TweetNode = TweetNode;
150
+ function $createTweetNode(tweetID) {
151
+ return new TweetNode(tweetID);
152
+ }
153
+ function $isTweetNode(node) {
154
+ return node instanceof TweetNode;
155
+ }
156
+ //# sourceMappingURL=TweetNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TweetNode.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/TweetNode.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAuMH,4CAEC;AAED,oCAEC;;AA3MD,sGAA6F;AAC7F,sFAA2G;AAY3G,mDAA8B;AAC9B,+BAAgE;AAEhE,IAAM,iBAAiB,GAAG,yCAAyC,CAAA;AAenE,SAAS,mBAAmB,CAAC,OAAuB;IAClD,IAAM,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAA;IACxD,IAAI,EAAE,EAAE,CAAC;QACP,IAAM,IAAI,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAA;QACjC,OAAO,EAAE,IAAI,MAAA,EAAE,CAAA;IACjB,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED,IAAI,sBAAsB,GAAG,IAAI,CAAA;AAEjC,SAAS,cAAc,CAAC,EAQF;IARtB,iBA6DC;QA5DC,SAAS,eAAA,EACT,MAAM,YAAA,EACN,gBAAgB,sBAAA,EAChB,OAAO,aAAA,EACP,OAAO,aAAA,EACP,MAAM,YAAA,EACN,OAAO,aAAA;IAEP,IAAM,YAAY,GAAG,IAAA,c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,IACb,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,IAAI,CAAC,QAAQ,EACrB,gBAAgB,EAAC,YAAY,EAC7B,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,EACtB,OAAO,EAAE,IAAI,CAAC,IAAI,GAClB,CACH,CAAA;IACH,CAAC;IACH,gBAAC;AAAD,CAAC,AAnFD,CAA+B,8CAAkB,GAmFhD;AAnFY,8BAAS;AAqFtB,SAAgB,gBAAgB,CAAC,OAAe;IAC9C,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,CAAA;AAC/B,CAAC;AAED,SAAgB,YAAY,CAAC,IAAgD;IAC3E,OAAO,IAAI,YAAY,SAAS,CAAA;AAClC,CAAC"}
@@ -0,0 +1,28 @@
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 { DecoratorBlockNode, SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode';
9
+ import type { DOMConversionMap, DOMExportOutput, EditorConfig, ElementFormatType, LexicalEditor, LexicalNode, NodeKey, Spread } from 'lexical';
10
+ import * as React from 'react';
11
+ export type SerializedYouTubeNode = Spread<{
12
+ videoID: string;
13
+ }, SerializedDecoratorBlockNode>;
14
+ export declare class YouTubeNode extends DecoratorBlockNode {
15
+ __id: string;
16
+ static getType(): string;
17
+ static clone(node: YouTubeNode): YouTubeNode;
18
+ static importJSON(serializedNode: SerializedYouTubeNode): YouTubeNode;
19
+ exportJSON(): SerializedYouTubeNode;
20
+ constructor(id: string, format?: ElementFormatType, key?: NodeKey);
21
+ exportDOM(): DOMExportOutput;
22
+ static importDOM(): DOMConversionMap | null;
23
+ updateDOM(): false;
24
+ getTextContent(_includeInert?: boolean | undefined, _includeDirectionless?: false | undefined): string;
25
+ decorate(_editor: LexicalEditor, config: EditorConfig): React.JSX.Element;
26
+ }
27
+ export declare function $createYouTubeNode(videoID: string): YouTubeNode;
28
+ export declare function $isYouTubeNode(node: YouTubeNode | LexicalNode | null | undefined): node is YouTubeNode;
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ *
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.YouTubeNode = void 0;
11
+ exports.$createYouTubeNode = $createYouTubeNode;
12
+ exports.$isYouTubeNode = $isYouTubeNode;
13
+ var tslib_1 = require("tslib");
14
+ var LexicalBlockWithAlignableContents_1 = require("@lexical/react/LexicalBlockWithAlignableContents");
15
+ var LexicalDecoratorBlockNode_1 = require("@lexical/react/LexicalDecoratorBlockNode");
16
+ var React = tslib_1.__importStar(require("react"));
17
+ function YouTubeComponent(_a) {
18
+ var className = _a.className, format = _a.format, nodeKey = _a.nodeKey, videoID = _a.videoID;
19
+ return (React.createElement(LexicalBlockWithAlignableContents_1.BlockWithAlignableContents, { className: className, format: format, nodeKey: nodeKey },
20
+ React.createElement("iframe", { allow: 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture', allowFullScreen: true, frameBorder: '0', height: '315', src: "https://www.youtube-nocookie.com/embed/".concat(videoID), title: 'YouTube video', width: '560' })));
21
+ }
22
+ function convertYoutubeElement(domNode) {
23
+ var videoID = domNode.getAttribute('data-lexical-youtube');
24
+ if (videoID) {
25
+ var node = $createYouTubeNode(videoID);
26
+ return { node: node };
27
+ }
28
+ return null;
29
+ }
30
+ var YouTubeNode = /** @class */ (function (_super) {
31
+ tslib_1.__extends(YouTubeNode, _super);
32
+ function YouTubeNode(id, format, key) {
33
+ var _this = _super.call(this, format, key) || this;
34
+ _this.__id = id;
35
+ return _this;
36
+ }
37
+ YouTubeNode.getType = function () {
38
+ return 'youtube';
39
+ };
40
+ YouTubeNode.clone = function (node) {
41
+ return new YouTubeNode(node.__id, node.__format, node.__key);
42
+ };
43
+ YouTubeNode.importJSON = function (serializedNode) {
44
+ var node = $createYouTubeNode(serializedNode.videoID);
45
+ node.setFormat(serializedNode.format);
46
+ return node;
47
+ };
48
+ YouTubeNode.prototype.exportJSON = function () {
49
+ return tslib_1.__assign(tslib_1.__assign({}, _super.prototype.exportJSON.call(this)), { type: 'youtube', version: 1, videoID: this.__id });
50
+ };
51
+ YouTubeNode.prototype.exportDOM = function () {
52
+ var element = document.createElement('iframe');
53
+ element.setAttribute('data-lexical-youtube', this.__id);
54
+ element.setAttribute('width', '560');
55
+ element.setAttribute('height', '315');
56
+ element.setAttribute('src', "https://www.youtube-nocookie.com/embed/".concat(this.__id));
57
+ element.setAttribute('frameborder', '0');
58
+ element.setAttribute('allow', 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture');
59
+ element.setAttribute('allowfullscreen', 'true');
60
+ element.setAttribute('title', 'YouTube video');
61
+ return { element: element };
62
+ };
63
+ YouTubeNode.importDOM = function () {
64
+ return {
65
+ iframe: function (domNode) {
66
+ if (!domNode.hasAttribute('data-lexical-youtube')) {
67
+ return null;
68
+ }
69
+ return {
70
+ conversion: convertYoutubeElement,
71
+ priority: 1,
72
+ };
73
+ },
74
+ };
75
+ };
76
+ YouTubeNode.prototype.updateDOM = function () {
77
+ return false;
78
+ };
79
+ YouTubeNode.prototype.getTextContent = function (
80
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
81
+ _includeInert,
82
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
83
+ _includeDirectionless) {
84
+ return "https://www.youtube.com/watch?v=".concat(this.__id);
85
+ };
86
+ YouTubeNode.prototype.decorate = function (_editor, config) {
87
+ var embedBlockTheme = config.theme.embedBlock || {};
88
+ var className = {
89
+ base: embedBlockTheme.base || '',
90
+ focus: embedBlockTheme.focus || '',
91
+ };
92
+ return React.createElement(YouTubeComponent, { className: className, format: this.__format, nodeKey: this.getKey(), videoID: this.__id });
93
+ };
94
+ return YouTubeNode;
95
+ }(LexicalDecoratorBlockNode_1.DecoratorBlockNode));
96
+ exports.YouTubeNode = YouTubeNode;
97
+ function $createYouTubeNode(videoID) {
98
+ return new YouTubeNode(videoID);
99
+ }
100
+ function $isYouTubeNode(node) {
101
+ return node instanceof YouTubeNode;
102
+ }
103
+ //# sourceMappingURL=YouTubeNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"YouTubeNode.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/YouTubeNode.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AA+IH,gDAEC;AAED,wCAEC;;AAnJD,sGAA6F;AAC7F,sFAA2G;AAY3G,mDAA8B;AAY9B,SAAS,gBAAgB,CAAC,EAA8D;QAA5D,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,OAAO,aAAA,EAAE,OAAO,aAAA;IAC7D,OAAO,CACL,oBAAC,8DAA0B,IAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;QAChF,gCACE,KAAK,EAAC,0FAA0F,EAChG,eAAe,QACf,WAAW,EAAC,GAAG,EACf,MAAM,EAAC,KAAK,EACZ,GAAG,EAAE,iDAA0C,OAAO,CAAE,EACxD,KAAK,EAAC,eAAe,EACrB,KAAK,EAAC,KAAK,GACX,CACyB,CAC9B,CAAA;AACH,CAAC;AASD,SAAS,qBAAqB,CAAC,OAAoB;IACjD,IAAM,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAA;IAC5D,IAAI,OAAO,EAAE,CAAC;QACZ,IAAM,IAAI,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAA;QACxC,OAAO,EAAE,IAAI,MAAA,EAAE,CAAA;IACjB,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED;IAAiC,uCAAkB;IA0BjD,qBAAY,EAAU,EAAE,MAA0B,EAAE,GAAa;QAC/D,YAAA,MAAK,YAAC,MA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,WAAW,CAAA;AACpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export default function ActionsPlugin(): React.JSX.Element;
@@ -0,0 +1,183 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = ActionsPlugin;
4
+ var tslib_1 = require("tslib");
5
+ var code_1 = require("@lexical/code");
6
+ var file_1 = require("@lexical/file");
7
+ var markdown_1 = require("@lexical/markdown");
8
+ var LexicalCollaborationContext_1 = require("@lexical/react/LexicalCollaborationContext");
9
+ var LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
10
+ var utils_1 = require("@lexical/utils");
11
+ var yjs_1 = require("@lexical/yjs");
12
+ var lexical_1 = require("lexical");
13
+ var React = tslib_1.__importStar(require("react"));
14
+ var react_1 = require("react");
15
+ var useModal_1 = tslib_1.__importDefault(require("../../hooks/useModal"));
16
+ var Button_1 = tslib_1.__importDefault(require("../../ui/Button"));
17
+ var MarkdownTransformers_1 = require("../MarkdownTransformers");
18
+ function sendEditorState(editor) {
19
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
20
+ var stringifiedEditorState, _a;
21
+ return tslib_1.__generator(this, function (_b) {
22
+ switch (_b.label) {
23
+ case 0:
24
+ stringifiedEditorState = JSON.stringify(editor.getEditorState());
25
+ _b.label = 1;
26
+ case 1:
27
+ _b.trys.push([1, 3, , 4]);
28
+ return [4 /*yield*/, fetch('http://localhost:1235/setEditorState', {
29
+ body: stringifiedEditorState,
30
+ headers: {
31
+ Accept: 'application/json',
32
+ 'Content-type': 'application/json',
33
+ },
34
+ method: 'POST',
35
+ })];
36
+ case 2:
37
+ _b.sent();
38
+ return [3 /*break*/, 4];
39
+ case 3:
40
+ _a = _b.sent();
41
+ return [3 /*break*/, 4];
42
+ case 4: return [2 /*return*/];
43
+ }
44
+ });
45
+ });
46
+ }
47
+ function validateEditorState(editor) {
48
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
49
+ var stringifiedEditorState, response, _a;
50
+ return tslib_1.__generator(this, function (_b) {
51
+ switch (_b.label) {
52
+ case 0:
53
+ stringifiedEditorState = JSON.stringify(editor.getEditorState());
54
+ response = null;
55
+ _b.label = 1;
56
+ case 1:
57
+ _b.trys.push([1, 3, , 4]);
58
+ return [4 /*yield*/, fetch('http://localhost:1235/validateEditorState', {
59
+ body: stringifiedEditorState,
60
+ headers: {
61
+ Accept: 'application/json',
62
+ 'Content-type': 'application/json',
63
+ },
64
+ method: 'POST',
65
+ })];
66
+ case 2:
67
+ response = _b.sent();
68
+ return [3 /*break*/, 4];
69
+ case 3:
70
+ _a = _b.sent();
71
+ return [3 /*break*/, 4];
72
+ case 4:
73
+ if (response !== null && response.status === 403) {
74
+ throw new Error('Editor state validation failed! Server did not accept changes.');
75
+ }
76
+ return [2 /*return*/];
77
+ }
78
+ });
79
+ });
80
+ }
81
+ function ActionsPlugin() {
82
+ var editor = (0, LexicalComposerContext_1.useLexicalComposerContext)()[0];
83
+ var _a = (0, react_1.useState)(function () { return editor.isEditable(); }), isEditable = _a[0], setIsEditable = _a[1];
84
+ var _b = (0, react_1.useState)(false), connected = _b[0], setConnected = _b[1];
85
+ var _c = (0, react_1.useState)(true), isEditorEmpty = _c[0], setIsEditorEmpty = _c[1];
86
+ var _d = (0, useModal_1.default)(), modal = _d[0], showModal = _d[1];
87
+ var isCollabActive = (0, LexicalCollaborationContext_1.useCollaborationContext)().isCollabActive;
88
+ (0, react_1.useEffect)(function () {
89
+ return (0, utils_1.mergeRegister)(editor.registerEditableListener(function (editable) {
90
+ setIsEditable(editable);
91
+ }), editor.registerCommand(yjs_1.CONNECTED_COMMAND, function (payload) {
92
+ var isConnected = payload;
93
+ setConnected(isConnected);
94
+ return false;
95
+ }, lexical_1.COMMAND_PRIORITY_EDITOR));
96
+ }, [editor]);
97
+ (0, react_1.useEffect)(function () {
98
+ return editor.registerUpdateListener(function (_a) {
99
+ var dirtyElements = _a.dirtyElements, tags = _a.tags;
100
+ // If we are in read only mode, send the editor state
101
+ // to server and ask for validation if possible.
102
+ if (!isEditable && dirtyElements.size > 0 && !tags.has('historic') && !tags.has('collaboration')) {
103
+ validateEditorState(editor);
104
+ }
105
+ editor.getEditorState().read(function () {
106
+ var root = (0, lexical_1.$getRoot)();
107
+ var children = root.getChildren();
108
+ if (children.length > 1) {
109
+ setIsEditorEmpty(false);
110
+ }
111
+ else {
112
+ if ((0, lexical_1.$isParagraphNode)(children[0])) {
113
+ var paragraphChildren = children[0].getChildren();
114
+ setIsEditorEmpty(paragraphChildren.length === 0);
115
+ }
116
+ else {
117
+ setIsEditorEmpty(false);
118
+ }
119
+ }
120
+ });
121
+ });
122
+ }, [editor, isEditable]);
123
+ var handleMarkdownToggle = (0, react_1.useCallback)(function () {
124
+ editor.update(function () {
125
+ var root = (0, lexical_1.$getRoot)();
126
+ var firstChild = root.getFirstChild();
127
+ if ((0, code_1.$isCodeNode)(firstChild) && firstChild.getLanguage() === 'markdown') {
128
+ (0, markdown_1.$convertFromMarkdownString)(firstChild.getTextContent(), MarkdownTransformers_1.PLAYGROUND_TRANSFORMERS);
129
+ }
130
+ else {
131
+ var markdown = (0, markdown_1.$convertToMarkdownString)(MarkdownTransformers_1.PLAYGROUND_TRANSFORMERS);
132
+ root.clear().append((0, code_1.$createCodeNode)('markdown').append((0, lexical_1.$createTextNode)(markdown)));
133
+ }
134
+ root.selectEnd();
135
+ });
136
+ }, [editor]);
137
+ return (React.createElement("div", { className: 'actions' },
138
+ React.createElement("button", { "aria-label": 'Import editor state from JSON', className: 'action-button import', onClick: function () { return (0, file_1.importFile)(editor); }, title: 'Import', type: 'button' },
139
+ React.createElement("i", { className: 'import' })),
140
+ React.createElement("button", { "aria-label": 'Export editor state to JSON', className: 'action-button export', onClick: function () {
141
+ return (0, file_1.exportFile)(editor, {
142
+ fileName: "Playground ".concat(new Date().toISOString()),
143
+ source: 'Playground',
144
+ });
145
+ }, title: 'Export', type: 'button' },
146
+ React.createElement("i", { className: 'export' })),
147
+ React.createElement("button", { "aria-label": 'Clear editor contents', className: 'action-button clear', disabled: isEditorEmpty, onClick: function () {
148
+ showModal('Clear editor', function (onClose) { return React.createElement(ShowClearDialog, { editor: editor, onClose: onClose }); });
149
+ }, title: 'Clear', type: 'button' },
150
+ React.createElement("i", { className: 'clear' })),
151
+ React.createElement("button", { "aria-label": "".concat(!isEditable ? 'Unlock' : 'Lock', " read-only mode"), className: "action-button ".concat(!isEditable ? 'unlock' : 'lock'), onClick: function () {
152
+ // Send latest editor state to commenting validation server
153
+ if (isEditable) {
154
+ sendEditorState(editor);
155
+ }
156
+ editor.setEditable(!editor.isEditable());
157
+ }, title: 'Read-Only Mode', type: 'button' },
158
+ React.createElement("i", { className: !isEditable ? 'unlock' : 'lock' })),
159
+ React.createElement("button", { "aria-label": 'Convert from markdown', className: 'action-button', onClick: handleMarkdownToggle, title: 'Convert From Markdown', type: 'button' },
160
+ React.createElement("i", { className: 'markdown' })),
161
+ isCollabActive && (React.createElement("button", { "aria-label": "".concat(connected ? 'Disconnect from' : 'Connect to', " a collaborative editing server"), className: 'action-button connect', onClick: function () {
162
+ editor.dispatchCommand(yjs_1.TOGGLE_CONNECT_COMMAND, !connected);
163
+ }, title: "".concat(connected ? 'Disconnect' : 'Connect', " Collaborative Editing"), type: 'button' },
164
+ React.createElement("i", { className: connected ? 'disconnect' : 'connect' }))),
165
+ modal));
166
+ }
167
+ function ShowClearDialog(_a) {
168
+ var editor = _a.editor, onClose = _a.onClose;
169
+ return (React.createElement(React.Fragment, null,
170
+ "Are you sure you want to clear the editor?",
171
+ React.createElement("div", { className: 'Modal__content' },
172
+ React.createElement(Button_1.default, { onClick: function () {
173
+ editor.dispatchCommand(lexical_1.CLEAR_EDITOR_COMMAND, undefined);
174
+ editor.focus();
175
+ onClose();
176
+ } }, "Clear"),
177
+ ' ',
178
+ React.createElement(Button_1.default, { onClick: function () {
179
+ editor.focus();
180
+ onClose();
181
+ } }, "Cancel"))));
182
+ }
183
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/ActionsPlugin/index.tsx"],"names":[],"mappings":";;AAmDA,gCAiJC;;AApMD,sCAA4D;AAC5D,sCAAsD;AACtD,8CAAwF;AACxF,0FAAoF;AACpF,gFAAiF;AACjF,wCAA8C;AAC9C,oCAAwE;AAExE,mCAAoH;AACpH,mDAA8B;AAC9B,+BAAwD;AACxD,0EAA2C;AAC3C,mEAAoC;AACpC,gEAAiE;AAEjE,SAAe,eAAe,CAAC,MAAqB;;;;;;oBAC5C,sBAAsB,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAA;;;;oBAEpE,qBAAM,KAAK,CAAC,sCAAsC,EAAE;4BAClD,IAAI,EAAE,sBAAsB;4BAC5B,OAAO,EAAE;gCACP,MAAM,EAAE,kBAAkB;gCAC1B,cAAc,EAAE,kBAAkB;6BACnC;4BACD,MAAM,EAAE,MAAM;yBACf,CAAC,EAAA;;oBAPF,SAOE,CAAA;;;;;;;;;CAIL;AAED,SAAe,mBAAmB,CAAC,MAAqB;;;;;;oBAChD,sBAAsB,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAA;oBAClE,QAAQ,GAAG,IAAI,CAAA;;;;oBAEN,qBAAM,KAAK,CAAC,2CAA2C,EAAE;4BAClE,IAAI,EAAE,sBAAsB;4BAC5B,OAAO,EAAE;gCACP,MAAM,EAAE,kBAAkB;gCAC1B,cAAc,EAAE,kBAAkB;6BACnC;4BACD,MAAM,EAAE,MAAM;yBACf,CAAC,EAAA;;oBAPF,QAAQ,GAAG,SAOT,CAAA;;;;;;oBAIJ,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;wBACjD,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAA;oBACnF,CAAC;;;;;CACF;AAED,SAAwB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gBAAM,IACL,OAAO,EAAE;oBACP,MAAM,CAAC,eAAe,CAAC,8BAAoB,EAAE,SAAS,CAAC,CAAA;oBACvD,MAAM,CAAC,KAAK,EAAE,CAAA;oBACd,OAAO,EAAE,CAAA;gBACX,CAAC,YAGM;YAAC,GAAG;YACb,oBAAC,gBAAM,IACL,OAAO,EAAE;oBACP,MAAM,CAAC,KAAK,EAAE,CAAA;oBACd,OAAO,EAAE,CAAA;gBACX,CAAC,aAGM,CACL,CACL,CACJ,CAAA;AACH,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { EmbedConfig } from '@lexical/react/LexicalAutoEmbedPlugin';
2
+ import * as React from 'react';
3
+ interface PlaygroundEmbedConfig extends EmbedConfig {
4
+ contentName: string;
5
+ icon?: React.JSX.Element;
6
+ exampleUrl: string;
7
+ keywords: Array<string>;
8
+ description?: string;
9
+ }
10
+ export declare const YoutubeEmbedConfig: PlaygroundEmbedConfig;
11
+ export declare const TwitterEmbedConfig: PlaygroundEmbedConfig;
12
+ export declare const FigmaEmbedConfig: PlaygroundEmbedConfig;
13
+ export declare const EmbedConfigs: PlaygroundEmbedConfig[];
14
+ export declare function AutoEmbedDialog({ embedConfig, onClose, }: {
15
+ embedConfig: PlaygroundEmbedConfig;
16
+ onClose(): void;
17
+ }): React.JSX.Element;
18
+ export default function AutoEmbedPlugin(): React.JSX.Element;
19
+ export {};