phx-react 1.3.1569 → 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 (855) hide show
  1. package/dist/cjs/components/Combobox/Combobox.js +9 -3
  2. package/dist/cjs/components/Combobox/Combobox.js.map +1 -1
  3. package/dist/cjs/components/TextEditorV2/commenting/index.d.ts +41 -0
  4. package/dist/cjs/components/TextEditorV2/commenting/index.js +340 -0
  5. package/dist/cjs/components/TextEditorV2/commenting/index.js.map +1 -0
  6. package/dist/cjs/components/TextEditorV2/constants.d.ts +1 -0
  7. package/dist/cjs/components/TextEditorV2/constants.js +5 -0
  8. package/dist/cjs/components/TextEditorV2/constants.js.map +1 -0
  9. package/dist/cjs/components/TextEditorV2/context/SettingsContext.d.ts +12 -0
  10. package/dist/cjs/components/TextEditorV2/context/SettingsContext.js +59 -0
  11. package/dist/cjs/components/TextEditorV2/context/SettingsContext.js.map +1 -0
  12. package/dist/cjs/components/TextEditorV2/context/SharedAutocompleteContext.d.ts +10 -0
  13. package/dist/cjs/components/TextEditorV2/context/SharedAutocompleteContext.js +50 -0
  14. package/dist/cjs/components/TextEditorV2/context/SharedAutocompleteContext.js.map +1 -0
  15. package/dist/cjs/components/TextEditorV2/context/SharedHistoryContext.d.ts +11 -0
  16. package/dist/cjs/components/TextEditorV2/context/SharedHistoryContext.js +17 -0
  17. package/dist/cjs/components/TextEditorV2/context/SharedHistoryContext.js.map +1 -0
  18. package/dist/cjs/components/TextEditorV2/editor.d.ts +10 -0
  19. package/dist/cjs/components/TextEditorV2/editor.js +203 -0
  20. package/dist/cjs/components/TextEditorV2/editor.js.map +1 -0
  21. package/dist/cjs/components/TextEditorV2/hooks/useModal.d.ts +5 -0
  22. package/dist/cjs/components/TextEditorV2/hooks/useModal.js +32 -0
  23. package/dist/cjs/components/TextEditorV2/hooks/useModal.js.map +1 -0
  24. package/dist/cjs/components/TextEditorV2/hooks/useReport.d.ts +1 -0
  25. package/dist/cjs/components/TextEditorV2/hooks/useReport.js +45 -0
  26. package/dist/cjs/components/TextEditorV2/hooks/useReport.js.map +1 -0
  27. package/dist/cjs/components/TextEditorV2/lib/Settings.d.ts +2 -0
  28. package/dist/cjs/components/TextEditorV2/lib/Settings.js +52 -0
  29. package/dist/cjs/components/TextEditorV2/lib/Settings.js.map +1 -0
  30. package/dist/cjs/components/TextEditorV2/lib/appSettings.d.ts +19 -0
  31. package/dist/cjs/components/TextEditorV2/lib/appSettings.js +21 -0
  32. package/dist/cjs/components/TextEditorV2/lib/appSettings.js.map +1 -0
  33. package/dist/cjs/components/TextEditorV2/lib/collaboration.d.ts +3 -0
  34. package/dist/cjs/components/TextEditorV2/lib/collaboration.js +26 -0
  35. package/dist/cjs/components/TextEditorV2/lib/collaboration.js.map +1 -0
  36. package/dist/cjs/components/TextEditorV2/lib/setupEnv.d.ts +1 -0
  37. package/dist/cjs/components/TextEditorV2/lib/setupEnv.js +23 -0
  38. package/dist/cjs/components/TextEditorV2/lib/setupEnv.js.map +1 -0
  39. package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.d.ts +25 -0
  40. package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.js +58 -0
  41. package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.js.map +1 -0
  42. package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.d.ts +18 -0
  43. package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.js +62 -0
  44. package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.js.map +1 -0
  45. package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.d.ts +9 -0
  46. package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.js +72 -0
  47. package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.js.map +1 -0
  48. package/dist/cjs/components/TextEditorV2/nodes/EquationNode.d.ts +26 -0
  49. package/dist/cjs/components/TextEditorV2/nodes/EquationNode.js +126 -0
  50. package/dist/cjs/components/TextEditorV2/nodes/EquationNode.js.map +1 -0
  51. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.d.ts +6 -0
  52. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js +117 -0
  53. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js.map +1 -0
  54. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.d.ts +50 -0
  55. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js +59 -0
  56. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js.map +1 -0
  57. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.d.ts +44 -0
  58. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js +143 -0
  59. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js.map +1 -0
  60. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/index.d.ts +22 -0
  61. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/index.js +103 -0
  62. package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/index.js.map +1 -0
  63. package/dist/cjs/components/TextEditorV2/nodes/ExtendedTextNode.d.ts +12 -0
  64. package/dist/cjs/components/TextEditorV2/nodes/ExtendedTextNode.js +106 -0
  65. package/dist/cjs/components/TextEditorV2/nodes/ExtendedTextNode.js.map +1 -0
  66. package/dist/cjs/components/TextEditorV2/nodes/FigmaNode.d.ts +19 -0
  67. package/dist/cjs/components/TextEditorV2/nodes/FigmaNode.js +63 -0
  68. package/dist/cjs/components/TextEditorV2/nodes/FigmaNode.js.map +1 -0
  69. package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.d.ts +14 -0
  70. package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.js +212 -0
  71. package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.js.map +1 -0
  72. package/dist/cjs/components/TextEditorV2/nodes/ImageNode.d.ts +56 -0
  73. package/dist/cjs/components/TextEditorV2/nodes/ImageNode.js +136 -0
  74. package/dist/cjs/components/TextEditorV2/nodes/ImageNode.js.map +1 -0
  75. package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.d.ts +18 -0
  76. package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js +194 -0
  77. package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -0
  78. package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.d.ts +54 -0
  79. package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.js +142 -0
  80. package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.js.map +1 -0
  81. package/dist/cjs/components/TextEditorV2/nodes/KeywordNode.d.ts +15 -0
  82. package/dist/cjs/components/TextEditorV2/nodes/KeywordNode.js +54 -0
  83. package/dist/cjs/components/TextEditorV2/nodes/KeywordNode.js.map +1 -0
  84. package/dist/cjs/components/TextEditorV2/nodes/LayoutContainerNode.d.ts +21 -0
  85. package/dist/cjs/components/TextEditorV2/nodes/LayoutContainerNode.js +63 -0
  86. package/dist/cjs/components/TextEditorV2/nodes/LayoutContainerNode.js.map +1 -0
  87. package/dist/cjs/components/TextEditorV2/nodes/LayoutItemNode.d.ts +15 -0
  88. package/dist/cjs/components/TextEditorV2/nodes/LayoutItemNode.js +51 -0
  89. package/dist/cjs/components/TextEditorV2/nodes/LayoutItemNode.js.map +1 -0
  90. package/dist/cjs/components/TextEditorV2/nodes/MentionNode.d.ts +20 -0
  91. package/dist/cjs/components/TextEditorV2/nodes/MentionNode.js +89 -0
  92. package/dist/cjs/components/TextEditorV2/nodes/MentionNode.js.map +1 -0
  93. package/dist/cjs/components/TextEditorV2/nodes/PageBreakNode/index.d.ts +17 -0
  94. package/dist/cjs/components/TextEditorV2/nodes/PageBreakNode/index.js +113 -0
  95. package/dist/cjs/components/TextEditorV2/nodes/PageBreakNode/index.js.map +1 -0
  96. package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.d.ts +3 -0
  97. package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.js +68 -0
  98. package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.js.map +1 -0
  99. package/dist/cjs/components/TextEditorV2/nodes/PollComponent.d.ts +8 -0
  100. package/dist/cjs/components/TextEditorV2/nodes/PollComponent.js +113 -0
  101. package/dist/cjs/components/TextEditorV2/nodes/PollComponent.js.map +1 -0
  102. package/dist/cjs/components/TextEditorV2/nodes/PollNode.d.ts +33 -0
  103. package/dist/cjs/components/TextEditorV2/nodes/PollNode.js +149 -0
  104. package/dist/cjs/components/TextEditorV2/nodes/PollNode.js.map +1 -0
  105. package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.d.ts +9 -0
  106. package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.js +167 -0
  107. package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.js.map +1 -0
  108. package/dist/cjs/components/TextEditorV2/nodes/StickyNode.d.ts +37 -0
  109. package/dist/cjs/components/TextEditorV2/nodes/StickyNode.js +94 -0
  110. package/dist/cjs/components/TextEditorV2/nodes/StickyNode.js.map +1 -0
  111. package/dist/cjs/components/TextEditorV2/nodes/TableNode.d.ts +54 -0
  112. package/dist/cjs/components/TextEditorV2/nodes/TableNode.js +198 -0
  113. package/dist/cjs/components/TextEditorV2/nodes/TableNode.js.map +1 -0
  114. package/dist/cjs/components/TextEditorV2/nodes/TweetNode.d.ts +28 -0
  115. package/dist/cjs/components/TextEditorV2/nodes/TweetNode.js +156 -0
  116. package/dist/cjs/components/TextEditorV2/nodes/TweetNode.js.map +1 -0
  117. package/dist/cjs/components/TextEditorV2/nodes/YouTubeNode.d.ts +28 -0
  118. package/dist/cjs/components/TextEditorV2/nodes/YouTubeNode.js +103 -0
  119. package/dist/cjs/components/TextEditorV2/nodes/YouTubeNode.js.map +1 -0
  120. package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.d.ts +2 -0
  121. package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.js +183 -0
  122. package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.js.map +1 -0
  123. package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.d.ts +19 -0
  124. package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js +179 -0
  125. package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js.map +1 -0
  126. package/dist/cjs/components/TextEditorV2/plugins/AutoLinkPlugin/index.d.ts +2 -0
  127. package/dist/cjs/components/TextEditorV2/plugins/AutoLinkPlugin/index.js +16 -0
  128. package/dist/cjs/components/TextEditorV2/plugins/AutoLinkPlugin/index.js.map +1 -0
  129. package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.d.ts +2 -0
  130. package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.js +2465 -0
  131. package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.js.map +1 -0
  132. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +8 -0
  133. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +55 -0
  134. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js.map +1 -0
  135. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +10 -0
  136. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js +159 -0
  137. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js.map +1 -0
  138. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.d.ts +4 -0
  139. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js +111 -0
  140. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js.map +1 -0
  141. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.d.ts +1 -0
  142. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js +21 -0
  143. package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js.map +1 -0
  144. package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.d.ts +1 -0
  145. package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js +12 -0
  146. package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js.map +1 -0
  147. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.d.ts +23 -0
  148. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js +88 -0
  149. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js.map +1 -0
  150. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.d.ts +17 -0
  151. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js +70 -0
  152. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js.map +1 -0
  153. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.d.ts +18 -0
  154. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js +95 -0
  155. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js.map +1 -0
  156. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.d.ts +3 -0
  157. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.js +148 -0
  158. package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.js.map +1 -0
  159. package/dist/cjs/components/TextEditorV2/plugins/ComponentPickerPlugin/index.d.ts +2 -0
  160. package/dist/cjs/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js +264 -0
  161. package/dist/cjs/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js.map +1 -0
  162. package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.d.ts +11 -0
  163. package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.js +171 -0
  164. package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.js.map +1 -0
  165. package/dist/cjs/components/TextEditorV2/plugins/DocsPlugin/index.d.ts +2 -0
  166. package/dist/cjs/components/TextEditorV2/plugins/DocsPlugin/index.js +10 -0
  167. package/dist/cjs/components/TextEditorV2/plugins/DocsPlugin/index.js.map +1 -0
  168. package/dist/cjs/components/TextEditorV2/plugins/DragDropPastePlugin/index.d.ts +1 -0
  169. package/dist/cjs/components/TextEditorV2/plugins/DragDropPastePlugin/index.js +44 -0
  170. package/dist/cjs/components/TextEditorV2/plugins/DragDropPastePlugin/index.js.map +1 -0
  171. package/dist/cjs/components/TextEditorV2/plugins/DraggableBlockPlugin/index.d.ts +4 -0
  172. package/dist/cjs/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js +288 -0
  173. package/dist/cjs/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js.map +1 -0
  174. package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.d.ts +2 -0
  175. package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js +97 -0
  176. package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js.map +1 -0
  177. package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.d.ts +1 -0
  178. package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.js +64 -0
  179. package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.js.map +1 -0
  180. package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.d.ts +14 -0
  181. package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.js +42 -0
  182. package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.js.map +1 -0
  183. package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.d.ts +3 -0
  184. package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js +28 -0
  185. package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js.map +1 -0
  186. package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.d.ts +3 -0
  187. package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.js +25 -0
  188. package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.js.map +1 -0
  189. package/dist/cjs/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.d.ts +7 -0
  190. package/dist/cjs/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js +200 -0
  191. package/dist/cjs/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
  192. package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +4 -0
  193. package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js +229 -0
  194. package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -0
  195. package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.d.ts +22 -0
  196. package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.js +188 -0
  197. package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.js.map +1 -0
  198. package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.d.ts +17 -0
  199. package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.js +193 -0
  200. package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.js.map +1 -0
  201. package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.d.ts +1 -0
  202. package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.js +33 -0
  203. package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.js.map +1 -0
  204. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +6 -0
  205. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js +34 -0
  206. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js.map +1 -0
  207. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.d.ts +7 -0
  208. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js +89 -0
  209. package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js.map +1 -0
  210. package/dist/cjs/components/TextEditorV2/plugins/LinkPlugin/index.d.ts +2 -0
  211. package/dist/cjs/components/TextEditorV2/plugins/LinkPlugin/index.js +11 -0
  212. package/dist/cjs/components/TextEditorV2/plugins/LinkPlugin/index.js.map +1 -0
  213. package/dist/cjs/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.d.ts +5 -0
  214. package/dist/cjs/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js +44 -0
  215. package/dist/cjs/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js.map +1 -0
  216. package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.d.ts +2 -0
  217. package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js +11 -0
  218. package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js.map +1 -0
  219. package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.d.ts +8 -0
  220. package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.js +242 -0
  221. package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.js.map +1 -0
  222. package/dist/cjs/components/TextEditorV2/plugins/MaxLengthPlugin/index.d.ts +3 -0
  223. package/dist/cjs/components/TextEditorV2/plugins/MaxLengthPlugin/index.js +41 -0
  224. package/dist/cjs/components/TextEditorV2/plugins/MaxLengthPlugin/index.js.map +1 -0
  225. package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.d.ts +2 -0
  226. package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.js +560 -0
  227. package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.js.map +1 -0
  228. package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.d.ts +3 -0
  229. package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.js +31 -0
  230. package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.js.map +1 -0
  231. package/dist/cjs/components/TextEditorV2/plugins/PasteLogPlugin/index.d.ts +2 -0
  232. package/dist/cjs/components/TextEditorV2/plugins/PasteLogPlugin/index.js +37 -0
  233. package/dist/cjs/components/TextEditorV2/plugins/PasteLogPlugin/index.js.map +1 -0
  234. package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.d.ts +8 -0
  235. package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.js +46 -0
  236. package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.js.map +1 -0
  237. package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.d.ts +1 -0
  238. package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.js +16 -0
  239. package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.js.map +1 -0
  240. package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.d.ts +1 -0
  241. package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.js +38 -0
  242. package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.js.map +1 -0
  243. package/dist/cjs/components/TextEditorV2/plugins/TableActionMenuPlugin/index.d.ts +5 -0
  244. package/dist/cjs/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js +487 -0
  245. package/dist/cjs/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js.map +1 -0
  246. package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.d.ts +2 -0
  247. package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.js +253 -0
  248. package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.js.map +1 -0
  249. package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.d.ts +2 -0
  250. package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js +117 -0
  251. package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js.map +1 -0
  252. package/dist/cjs/components/TextEditorV2/plugins/TablePlugin.d.ts +32 -0
  253. package/dist/cjs/components/TextEditorV2/plugins/TablePlugin.js +85 -0
  254. package/dist/cjs/components/TextEditorV2/plugins/TablePlugin.js.map +1 -0
  255. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.d.ts +6 -0
  256. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js +18 -0
  257. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js.map +1 -0
  258. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.d.ts +6 -0
  259. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js +28 -0
  260. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js.map +1 -0
  261. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.d.ts +6 -0
  262. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js +65 -0
  263. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js.map +1 -0
  264. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +6 -0
  265. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +71 -0
  266. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -0
  267. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.d.ts +6 -0
  268. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js +18 -0
  269. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js.map +1 -0
  270. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/link.d.ts +5 -0
  271. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js +46 -0
  272. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js.map +1 -0
  273. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.d.ts +6 -0
  274. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js +28 -0
  275. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js.map +1 -0
  276. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.d.ts +6 -0
  277. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js +52 -0
  278. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js.map +1 -0
  279. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.d.ts +6 -0
  280. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js +28 -0
  281. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js.map +1 -0
  282. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.d.ts +6 -0
  283. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js +19 -0
  284. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js.map +1 -0
  285. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.d.ts +6 -0
  286. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js +41 -0
  287. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js.map +1 -0
  288. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.d.ts +11 -0
  289. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js +162 -0
  290. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js.map +1 -0
  291. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.d.ts +4 -0
  292. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js +163 -0
  293. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -0
  294. package/dist/cjs/components/TextEditorV2/plugins/TreeViewPlugin/index.d.ts +2 -0
  295. package/dist/cjs/components/TextEditorV2/plugins/TreeViewPlugin/index.js +12 -0
  296. package/dist/cjs/components/TextEditorV2/plugins/TreeViewPlugin/index.js.map +1 -0
  297. package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.d.ts +3 -0
  298. package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.js +25 -0
  299. package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.js.map +1 -0
  300. package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.d.ts +3 -0
  301. package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.js +25 -0
  302. package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.js.map +1 -0
  303. package/dist/cjs/components/TextEditorV2/shared/canUseDOM.d.ts +1 -0
  304. package/dist/cjs/components/TextEditorV2/shared/canUseDOM.js +7 -0
  305. package/dist/cjs/components/TextEditorV2/shared/canUseDOM.js.map +1 -0
  306. package/dist/cjs/components/TextEditorV2/shared/caretFromPoint.d.ts +4 -0
  307. package/dist/cjs/components/TextEditorV2/shared/caretFromPoint.js +32 -0
  308. package/dist/cjs/components/TextEditorV2/shared/caretFromPoint.js.map +1 -0
  309. package/dist/cjs/components/TextEditorV2/shared/environment.d.ts +16 -0
  310. package/dist/cjs/components/TextEditorV2/shared/environment.js +17 -0
  311. package/dist/cjs/components/TextEditorV2/shared/environment.js.map +1 -0
  312. package/dist/cjs/components/TextEditorV2/shared/invariant.d.ts +1 -0
  313. package/dist/cjs/components/TextEditorV2/shared/invariant.js +15 -0
  314. package/dist/cjs/components/TextEditorV2/shared/invariant.js.map +1 -0
  315. package/dist/cjs/components/TextEditorV2/shared/simpleDiffWithCursor.d.ts +5 -0
  316. package/dist/cjs/components/TextEditorV2/shared/simpleDiffWithCursor.js +28 -0
  317. package/dist/cjs/components/TextEditorV2/shared/simpleDiffWithCursor.js.map +1 -0
  318. package/dist/cjs/components/TextEditorV2/shared/useLayoutEffect.d.ts +3 -0
  319. package/dist/cjs/components/TextEditorV2/shared/useLayoutEffect.js +7 -0
  320. package/dist/cjs/components/TextEditorV2/shared/useLayoutEffect.js.map +1 -0
  321. package/dist/cjs/components/TextEditorV2/shared/warnOnlyOnce.d.ts +1 -0
  322. package/dist/cjs/components/TextEditorV2/shared/warnOnlyOnce.js +16 -0
  323. package/dist/cjs/components/TextEditorV2/shared/warnOnlyOnce.js.map +1 -0
  324. package/dist/cjs/components/TextEditorV2/style.d.ts +2 -0
  325. package/dist/cjs/components/TextEditorV2/style.js +9 -0
  326. package/dist/cjs/components/TextEditorV2/style.js.map +1 -0
  327. package/dist/cjs/components/TextEditorV2/themes/CommentEditorTheme.d.ts +3 -0
  328. package/dist/cjs/components/TextEditorV2/themes/CommentEditorTheme.js +7 -0
  329. package/dist/cjs/components/TextEditorV2/themes/CommentEditorTheme.js.map +1 -0
  330. package/dist/cjs/components/TextEditorV2/themes/PlaygroundEditorTheme.d.ts +3 -0
  331. package/dist/cjs/components/TextEditorV2/themes/PlaygroundEditorTheme.js +107 -0
  332. package/dist/cjs/components/TextEditorV2/themes/PlaygroundEditorTheme.js.map +1 -0
  333. package/dist/cjs/components/TextEditorV2/themes/StickyEditorTheme.d.ts +3 -0
  334. package/dist/cjs/components/TextEditorV2/themes/StickyEditorTheme.js +7 -0
  335. package/dist/cjs/components/TextEditorV2/themes/StickyEditorTheme.js.map +1 -0
  336. package/dist/cjs/components/TextEditorV2/ui/Button.d.ts +11 -0
  337. package/dist/cjs/components/TextEditorV2/ui/Button.js +11 -0
  338. package/dist/cjs/components/TextEditorV2/ui/Button.js.map +1 -0
  339. package/dist/cjs/components/TextEditorV2/ui/ColorPicker.d.ts +12 -0
  340. package/dist/cjs/components/TextEditorV2/ui/ColorPicker.js +216 -0
  341. package/dist/cjs/components/TextEditorV2/ui/ColorPicker.js.map +1 -0
  342. package/dist/cjs/components/TextEditorV2/ui/ContentEditable.d.ts +4 -0
  343. package/dist/cjs/components/TextEditorV2/ui/ContentEditable.js +11 -0
  344. package/dist/cjs/components/TextEditorV2/ui/ContentEditable.js.map +1 -0
  345. package/dist/cjs/components/TextEditorV2/ui/Dialog.d.ts +9 -0
  346. package/dist/cjs/components/TextEditorV2/ui/Dialog.js +15 -0
  347. package/dist/cjs/components/TextEditorV2/ui/Dialog.js.map +1 -0
  348. package/dist/cjs/components/TextEditorV2/ui/DropDown.d.ts +17 -0
  349. package/dist/cjs/components/TextEditorV2/ui/DropDown.js +133 -0
  350. package/dist/cjs/components/TextEditorV2/ui/DropDown.js.map +1 -0
  351. package/dist/cjs/components/TextEditorV2/ui/DropdownColorPicker.d.ts +21 -0
  352. package/dist/cjs/components/TextEditorV2/ui/DropdownColorPicker.js +20 -0
  353. package/dist/cjs/components/TextEditorV2/ui/DropdownColorPicker.js.map +1 -0
  354. package/dist/cjs/components/TextEditorV2/ui/EquationEditor.d.ts +8 -0
  355. package/dist/cjs/components/TextEditorV2/ui/EquationEditor.js +20 -0
  356. package/dist/cjs/components/TextEditorV2/ui/EquationEditor.js.map +1 -0
  357. package/dist/cjs/components/TextEditorV2/ui/FileInput.d.ts +9 -0
  358. package/dist/cjs/components/TextEditorV2/ui/FileInput.js +12 -0
  359. package/dist/cjs/components/TextEditorV2/ui/FileInput.js.map +1 -0
  360. package/dist/cjs/components/TextEditorV2/ui/ImageResizer.d.ts +11 -0
  361. package/dist/cjs/components/TextEditorV2/ui/ImageResizer.js +178 -0
  362. package/dist/cjs/components/TextEditorV2/ui/ImageResizer.js.map +1 -0
  363. package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.d.ts +7 -0
  364. package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.js +39 -0
  365. package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.js.map +1 -0
  366. package/dist/cjs/components/TextEditorV2/ui/KatexRenderer.d.ts +6 -0
  367. package/dist/cjs/components/TextEditorV2/ui/KatexRenderer.js +33 -0
  368. package/dist/cjs/components/TextEditorV2/ui/KatexRenderer.js.map +1 -0
  369. package/dist/cjs/components/TextEditorV2/ui/Modal.d.ts +8 -0
  370. package/dist/cjs/components/TextEditorV2/ui/Modal.js +54 -0
  371. package/dist/cjs/components/TextEditorV2/ui/Modal.js.map +1 -0
  372. package/dist/cjs/components/TextEditorV2/ui/Placeholder.d.ts +6 -0
  373. package/dist/cjs/components/TextEditorV2/ui/Placeholder.js +10 -0
  374. package/dist/cjs/components/TextEditorV2/ui/Placeholder.js.map +1 -0
  375. package/dist/cjs/components/TextEditorV2/ui/Select.d.ts +7 -0
  376. package/dist/cjs/components/TextEditorV2/ui/Select.js +12 -0
  377. package/dist/cjs/components/TextEditorV2/ui/Select.js.map +1 -0
  378. package/dist/cjs/components/TextEditorV2/ui/Switch.d.ts +7 -0
  379. package/dist/cjs/components/TextEditorV2/ui/Switch.js +15 -0
  380. package/dist/cjs/components/TextEditorV2/ui/Switch.js.map +1 -0
  381. package/dist/cjs/components/TextEditorV2/ui/TextInput.d.ts +12 -0
  382. package/dist/cjs/components/TextEditorV2/ui/TextInput.js +14 -0
  383. package/dist/cjs/components/TextEditorV2/ui/TextInput.js.map +1 -0
  384. package/dist/cjs/components/TextEditorV2/utils/emoji-list.d.ts +20 -0
  385. package/dist/cjs/components/TextEditorV2/utils/emoji-list.js +16607 -0
  386. package/dist/cjs/components/TextEditorV2/utils/emoji-list.js.map +1 -0
  387. package/dist/cjs/components/TextEditorV2/utils/getDOMRangeRect.d.ts +1 -0
  388. package/dist/cjs/components/TextEditorV2/utils/getDOMRangeRect.js +19 -0
  389. package/dist/cjs/components/TextEditorV2/utils/getDOMRangeRect.js.map +1 -0
  390. package/dist/cjs/components/TextEditorV2/utils/getPrepopulatedRichText.d.ts +1 -0
  391. package/dist/cjs/components/TextEditorV2/utils/getPrepopulatedRichText.js +35 -0
  392. package/dist/cjs/components/TextEditorV2/utils/getPrepopulatedRichText.js.map +1 -0
  393. package/dist/cjs/components/TextEditorV2/utils/getSelectedNode.d.ts +2 -0
  394. package/dist/cjs/components/TextEditorV2/utils/getSelectedNode.js +21 -0
  395. package/dist/cjs/components/TextEditorV2/utils/getSelectedNode.js.map +1 -0
  396. package/dist/cjs/components/TextEditorV2/utils/guard.d.ts +1 -0
  397. package/dist/cjs/components/TextEditorV2/utils/guard.js +7 -0
  398. package/dist/cjs/components/TextEditorV2/utils/guard.js.map +1 -0
  399. package/dist/cjs/components/TextEditorV2/utils/isMobileWidth.d.ts +0 -0
  400. package/dist/cjs/components/TextEditorV2/utils/isMobileWidth.js +2 -0
  401. package/dist/cjs/components/TextEditorV2/utils/isMobileWidth.js.map +1 -0
  402. package/dist/cjs/components/TextEditorV2/utils/joinClasses.d.ts +1 -0
  403. package/dist/cjs/components/TextEditorV2/utils/joinClasses.js +11 -0
  404. package/dist/cjs/components/TextEditorV2/utils/joinClasses.js.map +1 -0
  405. package/dist/cjs/components/TextEditorV2/utils/point.d.ts +14 -0
  406. package/dist/cjs/components/TextEditorV2/utils/point.js +51 -0
  407. package/dist/cjs/components/TextEditorV2/utils/point.js.map +1 -0
  408. package/dist/cjs/components/TextEditorV2/utils/rect.d.ts +38 -0
  409. package/dist/cjs/components/TextEditorV2/utils/rect.js +125 -0
  410. package/dist/cjs/components/TextEditorV2/utils/rect.js.map +1 -0
  411. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPosition.d.ts +1 -0
  412. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPosition.js +33 -0
  413. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPosition.js.map +1 -0
  414. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
  415. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js +31 -0
  416. package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
  417. package/dist/cjs/components/TextEditorV2/utils/swipe.d.ts +4 -0
  418. package/dist/cjs/components/TextEditorV2/utils/swipe.js +97 -0
  419. package/dist/cjs/components/TextEditorV2/utils/swipe.js.map +1 -0
  420. package/dist/cjs/components/TextEditorV2/utils/url.d.ts +2 -0
  421. package/dist/cjs/components/TextEditorV2/utils/url.js +26 -0
  422. package/dist/cjs/components/TextEditorV2/utils/url.js.map +1 -0
  423. package/dist/cjs/components/Textarea/Textarea.js +28 -4
  424. package/dist/cjs/components/Textarea/Textarea.js.map +1 -1
  425. package/dist/cjs/index.d.ts +2 -1
  426. package/dist/cjs/index.js +5 -3
  427. package/dist/cjs/index.js.map +1 -1
  428. package/dist/esm/components/Combobox/Combobox.js +9 -3
  429. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  430. package/dist/esm/components/TextEditorV2/commenting/index.d.ts +41 -0
  431. package/dist/esm/components/TextEditorV2/commenting/index.js +334 -0
  432. package/dist/esm/components/TextEditorV2/commenting/index.js.map +1 -0
  433. package/dist/esm/components/TextEditorV2/constants.d.ts +1 -0
  434. package/dist/esm/components/TextEditorV2/constants.js +2 -0
  435. package/dist/esm/components/TextEditorV2/constants.js.map +1 -0
  436. package/dist/esm/components/TextEditorV2/context/SettingsContext.d.ts +12 -0
  437. package/dist/esm/components/TextEditorV2/context/SettingsContext.js +54 -0
  438. package/dist/esm/components/TextEditorV2/context/SettingsContext.js.map +1 -0
  439. package/dist/esm/components/TextEditorV2/context/SharedAutocompleteContext.d.ts +10 -0
  440. package/dist/esm/components/TextEditorV2/context/SharedAutocompleteContext.js +44 -0
  441. package/dist/esm/components/TextEditorV2/context/SharedAutocompleteContext.js.map +1 -0
  442. package/dist/esm/components/TextEditorV2/context/SharedHistoryContext.d.ts +11 -0
  443. package/dist/esm/components/TextEditorV2/context/SharedHistoryContext.js +11 -0
  444. package/dist/esm/components/TextEditorV2/context/SharedHistoryContext.js.map +1 -0
  445. package/dist/esm/components/TextEditorV2/editor.d.ts +10 -0
  446. package/dist/esm/components/TextEditorV2/editor.js +200 -0
  447. package/dist/esm/components/TextEditorV2/editor.js.map +1 -0
  448. package/dist/esm/components/TextEditorV2/hooks/useModal.d.ts +5 -0
  449. package/dist/esm/components/TextEditorV2/hooks/useModal.js +28 -0
  450. package/dist/esm/components/TextEditorV2/hooks/useModal.js.map +1 -0
  451. package/dist/esm/components/TextEditorV2/hooks/useReport.d.ts +1 -0
  452. package/dist/esm/components/TextEditorV2/hooks/useReport.js +42 -0
  453. package/dist/esm/components/TextEditorV2/hooks/useReport.js.map +1 -0
  454. package/dist/esm/components/TextEditorV2/lib/Settings.d.ts +2 -0
  455. package/dist/esm/components/TextEditorV2/lib/Settings.js +48 -0
  456. package/dist/esm/components/TextEditorV2/lib/Settings.js.map +1 -0
  457. package/dist/esm/components/TextEditorV2/lib/appSettings.d.ts +19 -0
  458. package/dist/esm/components/TextEditorV2/lib/appSettings.js +18 -0
  459. package/dist/esm/components/TextEditorV2/lib/appSettings.js.map +1 -0
  460. package/dist/esm/components/TextEditorV2/lib/collaboration.d.ts +3 -0
  461. package/dist/esm/components/TextEditorV2/lib/collaboration.js +23 -0
  462. package/dist/esm/components/TextEditorV2/lib/collaboration.js.map +1 -0
  463. package/dist/esm/components/TextEditorV2/lib/setupEnv.d.ts +1 -0
  464. package/dist/esm/components/TextEditorV2/lib/setupEnv.js +21 -0
  465. package/dist/esm/components/TextEditorV2/lib/setupEnv.js.map +1 -0
  466. package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.d.ts +25 -0
  467. package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.js +54 -0
  468. package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.js.map +1 -0
  469. package/dist/esm/components/TextEditorV2/nodes/EmojiNode.d.ts +18 -0
  470. package/dist/esm/components/TextEditorV2/nodes/EmojiNode.js +57 -0
  471. package/dist/esm/components/TextEditorV2/nodes/EmojiNode.js.map +1 -0
  472. package/dist/esm/components/TextEditorV2/nodes/EquationComponent.d.ts +9 -0
  473. package/dist/esm/components/TextEditorV2/nodes/EquationComponent.js +68 -0
  474. package/dist/esm/components/TextEditorV2/nodes/EquationComponent.js.map +1 -0
  475. package/dist/esm/components/TextEditorV2/nodes/EquationNode.d.ts +26 -0
  476. package/dist/esm/components/TextEditorV2/nodes/EquationNode.js +121 -0
  477. package/dist/esm/components/TextEditorV2/nodes/EquationNode.js.map +1 -0
  478. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.d.ts +6 -0
  479. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js +113 -0
  480. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js.map +1 -0
  481. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.d.ts +50 -0
  482. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js +56 -0
  483. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js.map +1 -0
  484. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.d.ts +44 -0
  485. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js +137 -0
  486. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js.map +1 -0
  487. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/index.d.ts +22 -0
  488. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/index.js +98 -0
  489. package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/index.js.map +1 -0
  490. package/dist/esm/components/TextEditorV2/nodes/ExtendedTextNode.d.ts +12 -0
  491. package/dist/esm/components/TextEditorV2/nodes/ExtendedTextNode.js +101 -0
  492. package/dist/esm/components/TextEditorV2/nodes/ExtendedTextNode.js.map +1 -0
  493. package/dist/esm/components/TextEditorV2/nodes/FigmaNode.d.ts +19 -0
  494. package/dist/esm/components/TextEditorV2/nodes/FigmaNode.js +58 -0
  495. package/dist/esm/components/TextEditorV2/nodes/FigmaNode.js.map +1 -0
  496. package/dist/esm/components/TextEditorV2/nodes/ImageComponent.d.ts +14 -0
  497. package/dist/esm/components/TextEditorV2/nodes/ImageComponent.js +207 -0
  498. package/dist/esm/components/TextEditorV2/nodes/ImageComponent.js.map +1 -0
  499. package/dist/esm/components/TextEditorV2/nodes/ImageNode.d.ts +56 -0
  500. package/dist/esm/components/TextEditorV2/nodes/ImageNode.js +131 -0
  501. package/dist/esm/components/TextEditorV2/nodes/ImageNode.js.map +1 -0
  502. package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.d.ts +18 -0
  503. package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js +189 -0
  504. package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -0
  505. package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.d.ts +54 -0
  506. package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.js +137 -0
  507. package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.js.map +1 -0
  508. package/dist/esm/components/TextEditorV2/nodes/KeywordNode.d.ts +15 -0
  509. package/dist/esm/components/TextEditorV2/nodes/KeywordNode.js +49 -0
  510. package/dist/esm/components/TextEditorV2/nodes/KeywordNode.js.map +1 -0
  511. package/dist/esm/components/TextEditorV2/nodes/LayoutContainerNode.d.ts +21 -0
  512. package/dist/esm/components/TextEditorV2/nodes/LayoutContainerNode.js +58 -0
  513. package/dist/esm/components/TextEditorV2/nodes/LayoutContainerNode.js.map +1 -0
  514. package/dist/esm/components/TextEditorV2/nodes/LayoutItemNode.d.ts +15 -0
  515. package/dist/esm/components/TextEditorV2/nodes/LayoutItemNode.js +46 -0
  516. package/dist/esm/components/TextEditorV2/nodes/LayoutItemNode.js.map +1 -0
  517. package/dist/esm/components/TextEditorV2/nodes/MentionNode.d.ts +20 -0
  518. package/dist/esm/components/TextEditorV2/nodes/MentionNode.js +84 -0
  519. package/dist/esm/components/TextEditorV2/nodes/MentionNode.js.map +1 -0
  520. package/dist/esm/components/TextEditorV2/nodes/PageBreakNode/index.d.ts +17 -0
  521. package/dist/esm/components/TextEditorV2/nodes/PageBreakNode/index.js +108 -0
  522. package/dist/esm/components/TextEditorV2/nodes/PageBreakNode/index.js.map +1 -0
  523. package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.d.ts +3 -0
  524. package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.js +66 -0
  525. package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.js.map +1 -0
  526. package/dist/esm/components/TextEditorV2/nodes/PollComponent.d.ts +8 -0
  527. package/dist/esm/components/TextEditorV2/nodes/PollComponent.js +109 -0
  528. package/dist/esm/components/TextEditorV2/nodes/PollComponent.js.map +1 -0
  529. package/dist/esm/components/TextEditorV2/nodes/PollNode.d.ts +33 -0
  530. package/dist/esm/components/TextEditorV2/nodes/PollNode.js +143 -0
  531. package/dist/esm/components/TextEditorV2/nodes/PollNode.js.map +1 -0
  532. package/dist/esm/components/TextEditorV2/nodes/StickyComponent.d.ts +9 -0
  533. package/dist/esm/components/TextEditorV2/nodes/StickyComponent.js +163 -0
  534. package/dist/esm/components/TextEditorV2/nodes/StickyComponent.js.map +1 -0
  535. package/dist/esm/components/TextEditorV2/nodes/StickyNode.d.ts +37 -0
  536. package/dist/esm/components/TextEditorV2/nodes/StickyNode.js +89 -0
  537. package/dist/esm/components/TextEditorV2/nodes/StickyNode.js.map +1 -0
  538. package/dist/esm/components/TextEditorV2/nodes/TableNode.d.ts +54 -0
  539. package/dist/esm/components/TextEditorV2/nodes/TableNode.js +188 -0
  540. package/dist/esm/components/TextEditorV2/nodes/TableNode.js.map +1 -0
  541. package/dist/esm/components/TextEditorV2/nodes/TweetNode.d.ts +28 -0
  542. package/dist/esm/components/TextEditorV2/nodes/TweetNode.js +151 -0
  543. package/dist/esm/components/TextEditorV2/nodes/TweetNode.js.map +1 -0
  544. package/dist/esm/components/TextEditorV2/nodes/YouTubeNode.d.ts +28 -0
  545. package/dist/esm/components/TextEditorV2/nodes/YouTubeNode.js +98 -0
  546. package/dist/esm/components/TextEditorV2/nodes/YouTubeNode.js.map +1 -0
  547. package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.d.ts +2 -0
  548. package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.js +180 -0
  549. package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.js.map +1 -0
  550. package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.d.ts +19 -0
  551. package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js +174 -0
  552. package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js.map +1 -0
  553. package/dist/esm/components/TextEditorV2/plugins/AutoLinkPlugin/index.d.ts +2 -0
  554. package/dist/esm/components/TextEditorV2/plugins/AutoLinkPlugin/index.js +12 -0
  555. package/dist/esm/components/TextEditorV2/plugins/AutoLinkPlugin/index.js.map +1 -0
  556. package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.d.ts +2 -0
  557. package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.js +2461 -0
  558. package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.js.map +1 -0
  559. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +8 -0
  560. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +52 -0
  561. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js.map +1 -0
  562. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +10 -0
  563. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js +155 -0
  564. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js.map +1 -0
  565. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.d.ts +4 -0
  566. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js +108 -0
  567. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js.map +1 -0
  568. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.d.ts +1 -0
  569. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js +18 -0
  570. package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js.map +1 -0
  571. package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.d.ts +1 -0
  572. package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js +9 -0
  573. package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js.map +1 -0
  574. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.d.ts +23 -0
  575. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js +82 -0
  576. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js.map +1 -0
  577. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.d.ts +17 -0
  578. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js +64 -0
  579. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js.map +1 -0
  580. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.d.ts +18 -0
  581. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js +89 -0
  582. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js.map +1 -0
  583. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.d.ts +3 -0
  584. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.js +144 -0
  585. package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.js.map +1 -0
  586. package/dist/esm/components/TextEditorV2/plugins/ComponentPickerPlugin/index.d.ts +2 -0
  587. package/dist/esm/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js +261 -0
  588. package/dist/esm/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js.map +1 -0
  589. package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.d.ts +11 -0
  590. package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.js +167 -0
  591. package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.js.map +1 -0
  592. package/dist/esm/components/TextEditorV2/plugins/DocsPlugin/index.d.ts +2 -0
  593. package/dist/esm/components/TextEditorV2/plugins/DocsPlugin/index.js +6 -0
  594. package/dist/esm/components/TextEditorV2/plugins/DocsPlugin/index.js.map +1 -0
  595. package/dist/esm/components/TextEditorV2/plugins/DragDropPastePlugin/index.d.ts +1 -0
  596. package/dist/esm/components/TextEditorV2/plugins/DragDropPastePlugin/index.js +41 -0
  597. package/dist/esm/components/TextEditorV2/plugins/DragDropPastePlugin/index.js.map +1 -0
  598. package/dist/esm/components/TextEditorV2/plugins/DraggableBlockPlugin/index.d.ts +4 -0
  599. package/dist/esm/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js +284 -0
  600. package/dist/esm/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js.map +1 -0
  601. package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.d.ts +2 -0
  602. package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js +94 -0
  603. package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js.map +1 -0
  604. package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.d.ts +1 -0
  605. package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.js +61 -0
  606. package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.js.map +1 -0
  607. package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.d.ts +14 -0
  608. package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.js +36 -0
  609. package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.js.map +1 -0
  610. package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.d.ts +3 -0
  611. package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js +24 -0
  612. package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js.map +1 -0
  613. package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.d.ts +3 -0
  614. package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.js +21 -0
  615. package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.js.map +1 -0
  616. package/dist/esm/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.d.ts +7 -0
  617. package/dist/esm/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js +196 -0
  618. package/dist/esm/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
  619. package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +4 -0
  620. package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js +225 -0
  621. package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -0
  622. package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.d.ts +22 -0
  623. package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.js +181 -0
  624. package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.js.map +1 -0
  625. package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.d.ts +17 -0
  626. package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.js +187 -0
  627. package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.js.map +1 -0
  628. package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.d.ts +1 -0
  629. package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.js +30 -0
  630. package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.js.map +1 -0
  631. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +6 -0
  632. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js +30 -0
  633. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js.map +1 -0
  634. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.d.ts +7 -0
  635. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js +85 -0
  636. package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js.map +1 -0
  637. package/dist/esm/components/TextEditorV2/plugins/LinkPlugin/index.d.ts +2 -0
  638. package/dist/esm/components/TextEditorV2/plugins/LinkPlugin/index.js +7 -0
  639. package/dist/esm/components/TextEditorV2/plugins/LinkPlugin/index.js.map +1 -0
  640. package/dist/esm/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.d.ts +5 -0
  641. package/dist/esm/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js +41 -0
  642. package/dist/esm/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js.map +1 -0
  643. package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.d.ts +2 -0
  644. package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js +7 -0
  645. package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js.map +1 -0
  646. package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.d.ts +8 -0
  647. package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.js +239 -0
  648. package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.js.map +1 -0
  649. package/dist/esm/components/TextEditorV2/plugins/MaxLengthPlugin/index.d.ts +3 -0
  650. package/dist/esm/components/TextEditorV2/plugins/MaxLengthPlugin/index.js +38 -0
  651. package/dist/esm/components/TextEditorV2/plugins/MaxLengthPlugin/index.js.map +1 -0
  652. package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.d.ts +2 -0
  653. package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.js +557 -0
  654. package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.js.map +1 -0
  655. package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.d.ts +3 -0
  656. package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.js +27 -0
  657. package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.js.map +1 -0
  658. package/dist/esm/components/TextEditorV2/plugins/PasteLogPlugin/index.d.ts +2 -0
  659. package/dist/esm/components/TextEditorV2/plugins/PasteLogPlugin/index.js +33 -0
  660. package/dist/esm/components/TextEditorV2/plugins/PasteLogPlugin/index.js.map +1 -0
  661. package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.d.ts +8 -0
  662. package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.js +40 -0
  663. package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.js.map +1 -0
  664. package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.d.ts +1 -0
  665. package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.js +13 -0
  666. package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.js.map +1 -0
  667. package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.d.ts +1 -0
  668. package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.js +35 -0
  669. package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.js.map +1 -0
  670. package/dist/esm/components/TextEditorV2/plugins/TableActionMenuPlugin/index.d.ts +5 -0
  671. package/dist/esm/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js +483 -0
  672. package/dist/esm/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js.map +1 -0
  673. package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.d.ts +2 -0
  674. package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.js +249 -0
  675. package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.js.map +1 -0
  676. package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.d.ts +2 -0
  677. package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js +113 -0
  678. package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js.map +1 -0
  679. package/dist/esm/components/TextEditorV2/plugins/TablePlugin.d.ts +32 -0
  680. package/dist/esm/components/TextEditorV2/plugins/TablePlugin.js +78 -0
  681. package/dist/esm/components/TextEditorV2/plugins/TablePlugin.js.map +1 -0
  682. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.d.ts +6 -0
  683. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js +14 -0
  684. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js.map +1 -0
  685. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.d.ts +6 -0
  686. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js +24 -0
  687. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js.map +1 -0
  688. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.d.ts +6 -0
  689. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js +61 -0
  690. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js.map +1 -0
  691. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +6 -0
  692. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +67 -0
  693. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -0
  694. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.d.ts +6 -0
  695. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js +14 -0
  696. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js.map +1 -0
  697. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/link.d.ts +5 -0
  698. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js +42 -0
  699. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js.map +1 -0
  700. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.d.ts +6 -0
  701. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js +24 -0
  702. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js.map +1 -0
  703. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.d.ts +6 -0
  704. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js +48 -0
  705. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js.map +1 -0
  706. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.d.ts +6 -0
  707. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js +24 -0
  708. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js.map +1 -0
  709. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.d.ts +6 -0
  710. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js +15 -0
  711. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js.map +1 -0
  712. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.d.ts +6 -0
  713. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js +37 -0
  714. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js.map +1 -0
  715. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.d.ts +11 -0
  716. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js +159 -0
  717. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js.map +1 -0
  718. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.d.ts +4 -0
  719. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js +159 -0
  720. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -0
  721. package/dist/esm/components/TextEditorV2/plugins/TreeViewPlugin/index.d.ts +2 -0
  722. package/dist/esm/components/TextEditorV2/plugins/TreeViewPlugin/index.js +8 -0
  723. package/dist/esm/components/TextEditorV2/plugins/TreeViewPlugin/index.js.map +1 -0
  724. package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.d.ts +3 -0
  725. package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.js +21 -0
  726. package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.js.map +1 -0
  727. package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.d.ts +3 -0
  728. package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.js +21 -0
  729. package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.js.map +1 -0
  730. package/dist/esm/components/TextEditorV2/shared/canUseDOM.d.ts +1 -0
  731. package/dist/esm/components/TextEditorV2/shared/canUseDOM.js +4 -0
  732. package/dist/esm/components/TextEditorV2/shared/canUseDOM.js.map +1 -0
  733. package/dist/esm/components/TextEditorV2/shared/caretFromPoint.d.ts +4 -0
  734. package/dist/esm/components/TextEditorV2/shared/caretFromPoint.js +29 -0
  735. package/dist/esm/components/TextEditorV2/shared/caretFromPoint.js.map +1 -0
  736. package/dist/esm/components/TextEditorV2/shared/environment.d.ts +16 -0
  737. package/dist/esm/components/TextEditorV2/shared/environment.js +14 -0
  738. package/dist/esm/components/TextEditorV2/shared/environment.js.map +1 -0
  739. package/dist/esm/components/TextEditorV2/shared/invariant.d.ts +1 -0
  740. package/dist/esm/components/TextEditorV2/shared/invariant.js +12 -0
  741. package/dist/esm/components/TextEditorV2/shared/invariant.js.map +1 -0
  742. package/dist/esm/components/TextEditorV2/shared/simpleDiffWithCursor.d.ts +5 -0
  743. package/dist/esm/components/TextEditorV2/shared/simpleDiffWithCursor.js +25 -0
  744. package/dist/esm/components/TextEditorV2/shared/simpleDiffWithCursor.js.map +1 -0
  745. package/dist/esm/components/TextEditorV2/shared/useLayoutEffect.d.ts +3 -0
  746. package/dist/esm/components/TextEditorV2/shared/useLayoutEffect.js +5 -0
  747. package/dist/esm/components/TextEditorV2/shared/useLayoutEffect.js.map +1 -0
  748. package/dist/esm/components/TextEditorV2/shared/warnOnlyOnce.d.ts +1 -0
  749. package/dist/esm/components/TextEditorV2/shared/warnOnlyOnce.js +13 -0
  750. package/dist/esm/components/TextEditorV2/shared/warnOnlyOnce.js.map +1 -0
  751. package/dist/esm/components/TextEditorV2/style.d.ts +2 -0
  752. package/dist/esm/components/TextEditorV2/style.js +5 -0
  753. package/dist/esm/components/TextEditorV2/style.js.map +1 -0
  754. package/dist/esm/components/TextEditorV2/themes/CommentEditorTheme.d.ts +3 -0
  755. package/dist/esm/components/TextEditorV2/themes/CommentEditorTheme.js +5 -0
  756. package/dist/esm/components/TextEditorV2/themes/CommentEditorTheme.js.map +1 -0
  757. package/dist/esm/components/TextEditorV2/themes/PlaygroundEditorTheme.d.ts +3 -0
  758. package/dist/esm/components/TextEditorV2/themes/PlaygroundEditorTheme.js +105 -0
  759. package/dist/esm/components/TextEditorV2/themes/PlaygroundEditorTheme.js.map +1 -0
  760. package/dist/esm/components/TextEditorV2/themes/StickyEditorTheme.d.ts +3 -0
  761. package/dist/esm/components/TextEditorV2/themes/StickyEditorTheme.js +5 -0
  762. package/dist/esm/components/TextEditorV2/themes/StickyEditorTheme.js.map +1 -0
  763. package/dist/esm/components/TextEditorV2/ui/Button.d.ts +11 -0
  764. package/dist/esm/components/TextEditorV2/ui/Button.js +8 -0
  765. package/dist/esm/components/TextEditorV2/ui/Button.js.map +1 -0
  766. package/dist/esm/components/TextEditorV2/ui/ColorPicker.d.ts +12 -0
  767. package/dist/esm/components/TextEditorV2/ui/ColorPicker.js +212 -0
  768. package/dist/esm/components/TextEditorV2/ui/ColorPicker.js.map +1 -0
  769. package/dist/esm/components/TextEditorV2/ui/ContentEditable.d.ts +4 -0
  770. package/dist/esm/components/TextEditorV2/ui/ContentEditable.js +7 -0
  771. package/dist/esm/components/TextEditorV2/ui/ContentEditable.js.map +1 -0
  772. package/dist/esm/components/TextEditorV2/ui/Dialog.d.ts +9 -0
  773. package/dist/esm/components/TextEditorV2/ui/Dialog.js +10 -0
  774. package/dist/esm/components/TextEditorV2/ui/Dialog.js.map +1 -0
  775. package/dist/esm/components/TextEditorV2/ui/DropDown.d.ts +17 -0
  776. package/dist/esm/components/TextEditorV2/ui/DropDown.js +129 -0
  777. package/dist/esm/components/TextEditorV2/ui/DropDown.js.map +1 -0
  778. package/dist/esm/components/TextEditorV2/ui/DropdownColorPicker.d.ts +21 -0
  779. package/dist/esm/components/TextEditorV2/ui/DropdownColorPicker.js +17 -0
  780. package/dist/esm/components/TextEditorV2/ui/DropdownColorPicker.js.map +1 -0
  781. package/dist/esm/components/TextEditorV2/ui/EquationEditor.d.ts +8 -0
  782. package/dist/esm/components/TextEditorV2/ui/EquationEditor.js +17 -0
  783. package/dist/esm/components/TextEditorV2/ui/EquationEditor.js.map +1 -0
  784. package/dist/esm/components/TextEditorV2/ui/FileInput.d.ts +9 -0
  785. package/dist/esm/components/TextEditorV2/ui/FileInput.js +8 -0
  786. package/dist/esm/components/TextEditorV2/ui/FileInput.js.map +1 -0
  787. package/dist/esm/components/TextEditorV2/ui/ImageResizer.d.ts +11 -0
  788. package/dist/esm/components/TextEditorV2/ui/ImageResizer.js +174 -0
  789. package/dist/esm/components/TextEditorV2/ui/ImageResizer.js.map +1 -0
  790. package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.d.ts +7 -0
  791. package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.js +35 -0
  792. package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.js.map +1 -0
  793. package/dist/esm/components/TextEditorV2/ui/KatexRenderer.d.ts +6 -0
  794. package/dist/esm/components/TextEditorV2/ui/KatexRenderer.js +29 -0
  795. package/dist/esm/components/TextEditorV2/ui/KatexRenderer.js.map +1 -0
  796. package/dist/esm/components/TextEditorV2/ui/Modal.d.ts +8 -0
  797. package/dist/esm/components/TextEditorV2/ui/Modal.js +50 -0
  798. package/dist/esm/components/TextEditorV2/ui/Modal.js.map +1 -0
  799. package/dist/esm/components/TextEditorV2/ui/Placeholder.d.ts +6 -0
  800. package/dist/esm/components/TextEditorV2/ui/Placeholder.js +6 -0
  801. package/dist/esm/components/TextEditorV2/ui/Placeholder.js.map +1 -0
  802. package/dist/esm/components/TextEditorV2/ui/Select.d.ts +7 -0
  803. package/dist/esm/components/TextEditorV2/ui/Select.js +9 -0
  804. package/dist/esm/components/TextEditorV2/ui/Select.js.map +1 -0
  805. package/dist/esm/components/TextEditorV2/ui/Switch.d.ts +7 -0
  806. package/dist/esm/components/TextEditorV2/ui/Switch.js +11 -0
  807. package/dist/esm/components/TextEditorV2/ui/Switch.js.map +1 -0
  808. package/dist/esm/components/TextEditorV2/ui/TextInput.d.ts +12 -0
  809. package/dist/esm/components/TextEditorV2/ui/TextInput.js +10 -0
  810. package/dist/esm/components/TextEditorV2/ui/TextInput.js.map +1 -0
  811. package/dist/esm/components/TextEditorV2/utils/emoji-list.d.ts +20 -0
  812. package/dist/esm/components/TextEditorV2/utils/emoji-list.js +16605 -0
  813. package/dist/esm/components/TextEditorV2/utils/emoji-list.js.map +1 -0
  814. package/dist/esm/components/TextEditorV2/utils/getDOMRangeRect.d.ts +1 -0
  815. package/dist/esm/components/TextEditorV2/utils/getDOMRangeRect.js +16 -0
  816. package/dist/esm/components/TextEditorV2/utils/getDOMRangeRect.js.map +1 -0
  817. package/dist/esm/components/TextEditorV2/utils/getPrepopulatedRichText.d.ts +1 -0
  818. package/dist/esm/components/TextEditorV2/utils/getPrepopulatedRichText.js +32 -0
  819. package/dist/esm/components/TextEditorV2/utils/getPrepopulatedRichText.js.map +1 -0
  820. package/dist/esm/components/TextEditorV2/utils/getSelectedNode.d.ts +2 -0
  821. package/dist/esm/components/TextEditorV2/utils/getSelectedNode.js +18 -0
  822. package/dist/esm/components/TextEditorV2/utils/getSelectedNode.js.map +1 -0
  823. package/dist/esm/components/TextEditorV2/utils/guard.d.ts +1 -0
  824. package/dist/esm/components/TextEditorV2/utils/guard.js +4 -0
  825. package/dist/esm/components/TextEditorV2/utils/guard.js.map +1 -0
  826. package/dist/esm/components/TextEditorV2/utils/isMobileWidth.d.ts +0 -0
  827. package/dist/esm/components/TextEditorV2/utils/isMobileWidth.js +2 -0
  828. package/dist/esm/components/TextEditorV2/utils/isMobileWidth.js.map +1 -0
  829. package/dist/esm/components/TextEditorV2/utils/joinClasses.d.ts +1 -0
  830. package/dist/esm/components/TextEditorV2/utils/joinClasses.js +8 -0
  831. package/dist/esm/components/TextEditorV2/utils/joinClasses.js.map +1 -0
  832. package/dist/esm/components/TextEditorV2/utils/point.d.ts +14 -0
  833. package/dist/esm/components/TextEditorV2/utils/point.js +47 -0
  834. package/dist/esm/components/TextEditorV2/utils/point.js.map +1 -0
  835. package/dist/esm/components/TextEditorV2/utils/rect.d.ts +38 -0
  836. package/dist/esm/components/TextEditorV2/utils/rect.js +122 -0
  837. package/dist/esm/components/TextEditorV2/utils/rect.js.map +1 -0
  838. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPosition.d.ts +1 -0
  839. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPosition.js +30 -0
  840. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPosition.js.map +1 -0
  841. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
  842. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js +28 -0
  843. package/dist/esm/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
  844. package/dist/esm/components/TextEditorV2/utils/swipe.d.ts +4 -0
  845. package/dist/esm/components/TextEditorV2/utils/swipe.js +91 -0
  846. package/dist/esm/components/TextEditorV2/utils/swipe.js.map +1 -0
  847. package/dist/esm/components/TextEditorV2/utils/url.d.ts +2 -0
  848. package/dist/esm/components/TextEditorV2/utils/url.js +22 -0
  849. package/dist/esm/components/TextEditorV2/utils/url.js.map +1 -0
  850. package/dist/esm/components/Textarea/Textarea.js +28 -4
  851. package/dist/esm/components/Textarea/Textarea.js.map +1 -1
  852. package/dist/esm/index.d.ts +2 -1
  853. package/dist/esm/index.js +2 -1
  854. package/dist/esm/index.js.map +1 -1
  855. package/package.json +11 -2
@@ -0,0 +1,159 @@
1
+ import { __awaiter, __generator } from "tslib";
2
+ import React, { useState } from 'react';
3
+ import { PHXModal } from '../../../../Modal';
4
+ import { FormUpload } from '../../../../UploadFile/FormUpload';
5
+ import { INSERT_IMAGE_COMMAND } from '../../ImagesPlugin';
6
+ export default function UploadPdf(_a) {
7
+ var _this = this;
8
+ var apiCdnUpload = _a.apiCdnUpload, editor = _a.editor;
9
+ var _b = useState(false), openPdfModal = _b[0], setOpenPdfModal = _b[1];
10
+ var _c = useState(null), pdfFile = _c[0], setPdfFile = _c[1];
11
+ var _d = useState(false), loadingConvertPdf = _d[0], setLoadingConvertPdf = _d[1];
12
+ var uploadImageFunction = function (formData) { return __awaiter(_this, void 0, void 0, function () {
13
+ var response;
14
+ return __generator(this, function (_a) {
15
+ switch (_a.label) {
16
+ case 0: return [4 /*yield*/, fetch(apiCdnUpload, {
17
+ method: 'POST',
18
+ body: formData,
19
+ })];
20
+ case 1:
21
+ response = _a.sent();
22
+ if (response.ok) {
23
+ return [2 /*return*/, response.json()];
24
+ }
25
+ return [2 /*return*/];
26
+ }
27
+ });
28
+ }); };
29
+ var uploadImage = function (file) { return __awaiter(_this, void 0, void 0, function () {
30
+ var formData, res, error_1;
31
+ return __generator(this, function (_a) {
32
+ switch (_a.label) {
33
+ case 0:
34
+ _a.trys.push([0, 2, , 3]);
35
+ formData = new FormData();
36
+ formData.append('file', file);
37
+ formData.append('projectId', 'phx-rich-text');
38
+ formData.append('moduleId', 'pdf');
39
+ return [4 /*yield*/, uploadImageFunction(formData)];
40
+ case 1:
41
+ res = _a.sent();
42
+ if (res) {
43
+ return [2 /*return*/, res.link];
44
+ }
45
+ else {
46
+ return [2 /*return*/, null];
47
+ }
48
+ return [3 /*break*/, 3];
49
+ case 2:
50
+ error_1 = _a.sent();
51
+ console.error(error_1);
52
+ return [2 /*return*/, null];
53
+ case 3: return [2 /*return*/];
54
+ }
55
+ });
56
+ }); };
57
+ var handleConvertPdfToImage = function (file) { return __awaiter(_this, void 0, void 0, function () {
58
+ var PDFJS, fileURL, pdfDoc_1, numPages, uploadTasks, _loop_1, i, results, BATCH_SIZE, totalUploadTasks, i, batch, batchResults, sorted, _i, sorted_1, image;
59
+ var _this = this;
60
+ return __generator(this, function (_a) {
61
+ switch (_a.label) {
62
+ case 0:
63
+ setLoadingConvertPdf(true);
64
+ _a.label = 1;
65
+ case 1:
66
+ _a.trys.push([1, , 7, 8]);
67
+ PDFJS = window.pdfjsLib;
68
+ fileURL = URL.createObjectURL(file);
69
+ return [4 /*yield*/, PDFJS.getDocument({ url: fileURL }).promise];
70
+ case 2:
71
+ pdfDoc_1 = _a.sent();
72
+ numPages = pdfDoc_1.numPages;
73
+ uploadTasks = [];
74
+ _loop_1 = function (i) {
75
+ uploadTasks.push(function () { return __awaiter(_this, void 0, void 0, function () {
76
+ var page, viewport, canvas, context, blob, fileName, imageFile, link;
77
+ return __generator(this, function (_a) {
78
+ switch (_a.label) {
79
+ case 0: return [4 /*yield*/, pdfDoc_1.getPage(i)];
80
+ case 1:
81
+ page = _a.sent();
82
+ viewport = page.getViewport({ scale: 2 });
83
+ canvas = document.createElement('canvas');
84
+ context = canvas.getContext('2d');
85
+ canvas.width = viewport.width;
86
+ canvas.height = viewport.height;
87
+ return [4 /*yield*/, page.render({ canvasContext: context, viewport: viewport }).promise];
88
+ case 2:
89
+ _a.sent();
90
+ return [4 /*yield*/, new Promise(function (resolve) { return canvas.toBlob(function (b) { return resolve(b); }, 'image/webp'); })];
91
+ case 3:
92
+ blob = _a.sent();
93
+ fileName = "".concat(file.name.replace(/\.[^/.]+$/, ''), "-page-").concat(i, ".webp");
94
+ imageFile = new File([blob], fileName, { type: 'image/webp' });
95
+ return [4 /*yield*/, uploadImage(imageFile)];
96
+ case 4:
97
+ link = _a.sent();
98
+ return [2 /*return*/, { index: i, link: link }];
99
+ }
100
+ });
101
+ }); });
102
+ };
103
+ for (i = 1; i <= numPages; i++) {
104
+ _loop_1(i);
105
+ }
106
+ results = [];
107
+ BATCH_SIZE = 5;
108
+ totalUploadTasks = uploadTasks.length;
109
+ i = 0;
110
+ _a.label = 3;
111
+ case 3:
112
+ if (!(i < totalUploadTasks)) return [3 /*break*/, 6];
113
+ batch = uploadTasks.slice(i, i + BATCH_SIZE);
114
+ return [4 /*yield*/, Promise.all(batch.map(function (fn) { return fn(); }))];
115
+ case 4:
116
+ batchResults = _a.sent();
117
+ results.push.apply(results, batchResults);
118
+ _a.label = 5;
119
+ case 5:
120
+ i += BATCH_SIZE;
121
+ return [3 /*break*/, 3];
122
+ case 6:
123
+ sorted = results.filter(function (r) { return r.link; }).sort(function (a, b) { return a.index - b.index; });
124
+ for (_i = 0, sorted_1 = sorted; _i < sorted_1.length; _i++) {
125
+ image = sorted_1[_i];
126
+ if (image.link) {
127
+ editor.dispatchCommand(INSERT_IMAGE_COMMAND, {
128
+ altText: 'photo',
129
+ showCaption: false,
130
+ src: image.link,
131
+ });
132
+ }
133
+ }
134
+ return [3 /*break*/, 8];
135
+ case 7:
136
+ setLoadingConvertPdf(false);
137
+ setOpenPdfModal(false);
138
+ setPdfFile(null);
139
+ return [7 /*endfinally*/];
140
+ case 8: return [2 /*return*/];
141
+ }
142
+ });
143
+ }); };
144
+ return (React.createElement(React.Fragment, null,
145
+ React.createElement(PHXModal, { disableSubmit: !pdfFile, show: openPdfModal, onHide: function () { return setOpenPdfModal(false); }, title: 'T\u1EA3i l\u00EAn t\u00E0i li\u1EC7u PDF', onPrimaryClick: function () {
146
+ if (pdfFile)
147
+ handleConvertPdfToImage(pdfFile);
148
+ }, primaryLoading: loadingConvertPdf },
149
+ React.createElement(FormUpload, { fileName: pdfFile === null || pdfFile === void 0 ? void 0 : pdfFile.name, fileType: 'pdf', helpText: 'PDF, t\u1ED1i \u0111a 20MB', isHorizontalLayout: true, handleFileChange: function (e) {
150
+ setPdfFile(e.target.files[0]);
151
+ } })),
152
+ React.createElement("div", { className: 'flex items-center gap-x-2' },
153
+ React.createElement("button", { type: 'button', "data-color-button": 'true', className: 'p-1 rounded-md duration-200 hover:bg-gray-200 cursor-pointer', onClick: function () { return setOpenPdfModal(true); } },
154
+ React.createElement("span", null,
155
+ React.createElement("svg", { width: '20', height: '20', viewBox: '0 0 20 20', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' },
156
+ React.createElement("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M5.5 5.75C5.5 5.05964 6.05964 4.5 6.75 4.5H9.5V7.75C9.5 8.7165 10.2835 9.5 11.25 9.5H14.5V10.25C14.5 10.6642 14.8358 11 15.25 11C15.6642 11 16 10.6642 16 10.25V8.75C16 8.55109 15.921 8.36032 15.7803 8.21967L10.7803 3.21967C10.6397 3.07902 10.4489 3 10.25 3H6.75C5.23122 3 4 4.23122 4 5.75V14.25C4 15.7688 5.23122 17 6.75 17H10.5C10.9142 17 11.25 16.6642 11.25 16.25C11.25 15.8358 10.9142 15.5 10.5 15.5H6.75C6.05964 15.5 5.5 14.9404 5.5 14.25V5.75ZM13.4393 8L11 5.56066V7.75C11 7.88807 11.1119 8 11.25 8H13.4393Z', fill: '#4A4A4A' }),
157
+ React.createElement("path", { d: 'M15 14.3107V17.25C15 17.6642 14.6642 18 14.25 18C13.8358 18 13.5 17.6642 13.5 17.25V14.3107L12.7803 15.0303C12.4874 15.3232 12.0126 15.3232 11.7197 15.0303C11.4268 14.7374 11.4268 14.2626 11.7197 13.9697L13.7197 11.9697C14.0126 11.6768 14.4874 11.6768 14.7803 11.9697L16.7803 13.9697C17.0732 14.2626 17.0732 14.7374 16.7803 15.0303C16.4874 15.3232 16.0126 15.3232 15.7197 15.0303L15 14.3107Z', fill: '#4A4A4A' })))))));
158
+ }
159
+ //# sourceMappingURL=upload-pdf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-pdf.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAQzD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAyE;IAA3G,iBA6IC;QA7ImC,YAAY,kBAAA,EAAE,MAAM,YAAA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,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,kgBAAkgB,EACpgB,IAAI,EAAC,SAAS,GACR;wBACR,8BACE,CAAC,EAAC,yYAAyY,EAC3Y,IAAI,EAAC,SAAS,GACR,CACJ,CACD,CACA,CACL,CACL,CACJ,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ export default function ToolbarPlugin({ apiCdnUpload }: {
3
+ apiCdnUpload: string;
4
+ }): React.JSX.Element;
@@ -0,0 +1,159 @@
1
+ import { $isCodeNode } from '@lexical/code';
2
+ import { $isLinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link';
3
+ import { $isListNode, ListNode } from '@lexical/list';
4
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
5
+ import { $isHeadingNode } from '@lexical/rich-text';
6
+ import { $getSelectionStyleValueForProperty } from '@lexical/selection';
7
+ import { $findMatchingParent, $getNearestNodeOfType, mergeRegister } from '@lexical/utils';
8
+ import { $getSelection, $isElementNode, $isRangeSelection, $isRootOrShadowRoot, COMMAND_PRIORITY_CRITICAL, COMMAND_PRIORITY_NORMAL, KEY_MODIFIER_COMMAND, SELECTION_CHANGE_COMMAND, } from 'lexical';
9
+ import { useCallback, useEffect, useState } from 'react';
10
+ import * as React from 'react';
11
+ import { getSelectedNode } from '../../utils/getSelectedNode';
12
+ import { sanitizeUrl } from '../../utils/url';
13
+ import HeaderDropdown from './components/heading';
14
+ import FontSize from './components/font-size';
15
+ import BoldText from './components/bold-text';
16
+ import ItalicText from './components/italic-text';
17
+ import UnderlineText from './components/underline-text';
18
+ import TextColor from './components/text-color';
19
+ import TextAlign from './components/text-align';
20
+ import Bullet from './components/bullet';
21
+ import NumberBullet from './components/number-bullet';
22
+ import UploadPdf from './components/upload-pdf';
23
+ import UploadImage from './components/upload-image';
24
+ import Link from './components/link';
25
+ var blockTypeToBlockName = {
26
+ bullet: 'Bulleted List',
27
+ check: 'Check List',
28
+ code: 'Code Block',
29
+ h1: 'Heading 1',
30
+ h2: 'Heading 2',
31
+ h3: 'Heading 3',
32
+ h4: 'Heading 4',
33
+ h5: 'Heading 5',
34
+ h6: 'Heading 6',
35
+ number: 'Numbered List',
36
+ paragraph: 'Normal',
37
+ quote: 'Quote',
38
+ };
39
+ export default function ToolbarPlugin(_a) {
40
+ var apiCdnUpload = _a.apiCdnUpload;
41
+ var editor = useLexicalComposerContext()[0];
42
+ var _b = useState(editor), activeEditor = _b[0], setActiveEditor = _b[1];
43
+ var _c = useState('paragraph'), blockType = _c[0], setBlockType = _c[1];
44
+ var _d = useState('14px'), fontSize = _d[0], setFontSize = _d[1];
45
+ var _e = useState('#000'), fontColor = _e[0], setFontColor = _e[1];
46
+ var _f = useState('left'), elementFormat = _f[0], setElementFormat = _f[1];
47
+ var _g = useState(false), isLink = _g[0], setIsLink = _g[1];
48
+ var _h = useState(false), isBold = _h[0], setIsBold = _h[1];
49
+ var _j = useState(false), isItalic = _j[0], setIsItalic = _j[1];
50
+ var _k = useState(false), isUnderline = _k[0], setIsUnderline = _k[1];
51
+ var $updateToolbar = useCallback(function () {
52
+ var selection = $getSelection();
53
+ if ($isRangeSelection(selection)) {
54
+ var anchorNode = selection.anchor.getNode();
55
+ var element = anchorNode.getKey() === 'root'
56
+ ? anchorNode
57
+ : $findMatchingParent(anchorNode, function (e) {
58
+ var parent = e.getParent();
59
+ return parent !== null && $isRootOrShadowRoot(parent);
60
+ });
61
+ if (element === null) {
62
+ element = anchorNode.getTopLevelElementOrThrow();
63
+ }
64
+ var elementKey = element.getKey();
65
+ var elementDOM = activeEditor.getElementByKey(elementKey);
66
+ // Update text format
67
+ setIsBold(selection.hasFormat('bold'));
68
+ setIsItalic(selection.hasFormat('italic'));
69
+ setIsUnderline(selection.hasFormat('underline'));
70
+ // Update links
71
+ var node = getSelectedNode(selection);
72
+ var parent_1 = node.getParent();
73
+ if ($isLinkNode(parent_1) || $isLinkNode(node)) {
74
+ setIsLink(true);
75
+ }
76
+ else {
77
+ setIsLink(false);
78
+ }
79
+ if (elementDOM !== null) {
80
+ if ($isListNode(element)) {
81
+ var parentList = $getNearestNodeOfType(anchorNode, ListNode);
82
+ var type = parentList ? parentList.getListType() : element.getListType();
83
+ setBlockType(type);
84
+ }
85
+ else {
86
+ var type = $isHeadingNode(element) ? element.getTag() : element.getType();
87
+ if (type in blockTypeToBlockName) {
88
+ setBlockType(type);
89
+ }
90
+ if ($isCodeNode(element)) {
91
+ return;
92
+ }
93
+ }
94
+ }
95
+ // Handle buttons
96
+ var fontSize_1 = $getSelectionStyleValueForProperty(selection, 'font-size', '14px') || '14px';
97
+ setFontSize(fontSize_1);
98
+ setFontColor($getSelectionStyleValueForProperty(selection, 'color', '#000'));
99
+ var matchingParent = void 0;
100
+ if ($isLinkNode(parent_1)) {
101
+ // If node is a link, we need to fetch the parent paragraph node to set format
102
+ matchingParent = $findMatchingParent(node, function (parentNode) { return $isElementNode(parentNode) && !parentNode.isInline(); });
103
+ }
104
+ // If matchingParent is a valid node, pass it's format type
105
+ setElementFormat($isElementNode(matchingParent)
106
+ ? matchingParent.getFormatType()
107
+ : $isElementNode(node)
108
+ ? node.getFormatType()
109
+ : (parent_1 === null || parent_1 === void 0 ? void 0 : parent_1.getFormatType()) || 'left');
110
+ }
111
+ }, [activeEditor]);
112
+ useEffect(function () {
113
+ return editor.registerCommand(SELECTION_CHANGE_COMMAND, function (_payload, newEditor) {
114
+ $updateToolbar();
115
+ setActiveEditor(newEditor);
116
+ return false;
117
+ }, COMMAND_PRIORITY_CRITICAL);
118
+ }, [editor, $updateToolbar]);
119
+ useEffect(function () {
120
+ return mergeRegister(activeEditor.registerUpdateListener(function (_a) {
121
+ var editorState = _a.editorState;
122
+ editorState.read(function () {
123
+ $updateToolbar();
124
+ });
125
+ }));
126
+ }, [$updateToolbar, activeEditor, editor]);
127
+ useEffect(function () {
128
+ return activeEditor.registerCommand(KEY_MODIFIER_COMMAND, function (payload) {
129
+ var event = payload;
130
+ var code = event.code, ctrlKey = event.ctrlKey, metaKey = event.metaKey;
131
+ if (code === 'KeyK' && (ctrlKey || metaKey)) {
132
+ event.preventDefault();
133
+ return activeEditor.dispatchCommand(TOGGLE_LINK_COMMAND, sanitizeUrl('https://'));
134
+ }
135
+ return false;
136
+ }, COMMAND_PRIORITY_NORMAL);
137
+ }, [activeEditor, isLink]);
138
+ useEffect(function () {
139
+ if (!window.pdfjsLib) {
140
+ var script = document.createElement('script');
141
+ script.src = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js';
142
+ document.body.appendChild(script);
143
+ }
144
+ }, []);
145
+ return (React.createElement("div", { className: 'flex flex-wrap gap-1 p-2 bg-gray-100 border-b border-gray-300' },
146
+ blockType in blockTypeToBlockName && activeEditor === editor && (React.createElement(HeaderDropdown, { value: blockType, editor: activeEditor })),
147
+ React.createElement(FontSize, { editor: activeEditor, fontSize: parseInt(fontSize, 10) }),
148
+ React.createElement(BoldText, { isActive: isBold, editor: activeEditor }),
149
+ React.createElement(ItalicText, { isActive: isItalic, editor: activeEditor }),
150
+ React.createElement(UnderlineText, { isActive: isUnderline, editor: activeEditor }),
151
+ React.createElement(TextColor, { editor: activeEditor, color: fontColor }),
152
+ React.createElement(TextAlign, { value: elementFormat, editor: activeEditor }),
153
+ React.createElement(Bullet, { isActive: blockType === 'bullet', editor: activeEditor }),
154
+ React.createElement(NumberBullet, { isActive: blockType === 'number', editor: activeEditor }),
155
+ React.createElement(UploadPdf, { editor: activeEditor, apiCdnUpload: apiCdnUpload }),
156
+ React.createElement(UploadImage, { editor: activeEditor, apiCdnUpload: apiCdnUpload }),
157
+ React.createElement(Link, { editor: activeEditor })));
158
+ }
159
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eA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,QAAQ,EAAE,MAAM,EAAE,YAAY,GAAI;QACxE,oBAAC,SAAS,IAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,GAAI;QAC/D,oBAAC,WAAW,IAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,GAAI;QACjE,oBAAC,IAAI,IAAC,MAAM,EAAE,YAAY,GAAI,CAC1B,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export default function TreeViewPlugin(): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
2
+ import { TreeView } from '@lexical/react/LexicalTreeView';
3
+ import * as React from 'react';
4
+ export default function TreeViewPlugin() {
5
+ var editor = useLexicalComposerContext()[0];
6
+ return (React.createElement(TreeView, { editor: editor, timeTravelButtonClassName: 'debug-timetravel-button', timeTravelPanelButtonClassName: 'debug-timetravel-panel-button', timeTravelPanelClassName: 'debug-timetravel-panel', timeTravelPanelSliderClassName: 'debug-timetravel-panel-slider', treeTypeButtonClassName: 'debug-treetype-button', viewClassName: 'tree-view-output' }));
7
+ }
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/TreeViewPlugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,CAAC,OAAO,UAAU,cAAc;IAC7B,IAAA,MAAM,GAAI,yBAAyB,EAAE,GAA/B,CAA+B;IAC5C,OAAO,CACL,oBAAC,QAAQ,IACP,MAAM,EAAE,MAAM,EACd,yBAAyB,EAAC,yBAAyB,EACnD,8BAA8B,EAAC,+BAA+B,EAC9D,wBAAwB,EAAC,wBAAwB,EACjD,8BAA8B,EAAC,+BAA+B,EAC9D,uBAAuB,EAAC,uBAAuB,EAC/C,aAAa,EAAC,kBAAkB,GAChC,CACH,CAAA;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { LexicalCommand } from 'lexical';
2
+ export declare const INSERT_TWEET_COMMAND: LexicalCommand<string>;
3
+ export default function TwitterPlugin(): React.JSX.Element | null;
@@ -0,0 +1,21 @@
1
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
2
+ import { $insertNodeToNearestRoot } from '@lexical/utils';
3
+ import { COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical';
4
+ import { useEffect } from 'react';
5
+ import { $createTweetNode, TweetNode } from '../../nodes/TweetNode';
6
+ export var INSERT_TWEET_COMMAND = createCommand('INSERT_TWEET_COMMAND');
7
+ export default function TwitterPlugin() {
8
+ var editor = useLexicalComposerContext()[0];
9
+ useEffect(function () {
10
+ if (!editor.hasNodes([TweetNode])) {
11
+ throw new Error('TwitterPlugin: TweetNode not registered on editor');
12
+ }
13
+ return editor.registerCommand(INSERT_TWEET_COMMAND, function (payload) {
14
+ var tweetNode = $createTweetNode(payload);
15
+ $insertNodeToNearestRoot(tweetNode);
16
+ return true;
17
+ }, COMMAND_PRIORITY_EDITOR);
18
+ }, [editor]);
19
+ return null;
20
+ }
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/TwitterPlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAkB,MAAM,SAAS,CAAA;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEnE,MAAM,CAAC,IAAM,oBAAoB,GAA2B,aAAa,CAAC,sBAAsB,CAAC,CAAA;AAEjG,MAAM,CAAC,OAAO,UAAU,aAAa;IAC5B,IAAA,MAAM,GAAI,yBAAyB,EAAE,GAA/B,CAA+B;IAE5C,SAAS,CAAC;QACR,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QAED,OAAO,MAAM,CAAC,eAAe,CAC3B,oBAAoB,EACpB,UAAC,OAAO;YACN,IAAM,SAAS,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;YAC3C,wBAAwB,CAAC,SAAS,CAAC,CAAA;YAEnC,OAAO,IAAI,CAAA;QACb,CAAC,EACD,uBAAuB,CACxB,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { LexicalCommand } from 'lexical';
2
+ export declare const INSERT_YOUTUBE_COMMAND: LexicalCommand<string>;
3
+ export default function YouTubePlugin(): React.JSX.Element | null;
@@ -0,0 +1,21 @@
1
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
2
+ import { $insertNodeToNearestRoot } from '@lexical/utils';
3
+ import { COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical';
4
+ import { useEffect } from 'react';
5
+ import { $createYouTubeNode, YouTubeNode } from '../../nodes/YouTubeNode';
6
+ export var INSERT_YOUTUBE_COMMAND = createCommand('INSERT_YOUTUBE_COMMAND');
7
+ export default function YouTubePlugin() {
8
+ var editor = useLexicalComposerContext()[0];
9
+ useEffect(function () {
10
+ if (!editor.hasNodes([YouTubeNode])) {
11
+ throw new Error('YouTubePlugin: YouTubeNode not registered on editor');
12
+ }
13
+ return editor.registerCommand(INSERT_YOUTUBE_COMMAND, function (payload) {
14
+ var youTubeNode = $createYouTubeNode(payload);
15
+ $insertNodeToNearestRoot(youTubeNode);
16
+ return true;
17
+ }, COMMAND_PRIORITY_EDITOR);
18
+ }, [editor]);
19
+ return null;
20
+ }
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/YouTubePlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAkB,MAAM,SAAS,CAAA;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEzE,MAAM,CAAC,IAAM,sBAAsB,GAA2B,aAAa,CAAC,wBAAwB,CAAC,CAAA;AAErG,MAAM,CAAC,OAAO,UAAU,aAAa;IAC5B,IAAA,MAAM,GAAI,yBAAyB,EAAE,GAA/B,CAA+B;IAE5C,SAAS,CAAC;QACR,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;QACxE,CAAC;QAED,OAAO,MAAM,CAAC,eAAe,CAC3B,sBAAsB,EACtB,UAAC,OAAO;YACN,IAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAA;YAC/C,wBAAwB,CAAC,WAAW,CAAC,CAAA;YAErC,OAAO,IAAI,CAAA;QACb,CAAC,EACD,uBAAuB,CACxB,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const CAN_USE_DOM: boolean;
@@ -0,0 +1,4 @@
1
+ export var CAN_USE_DOM = typeof window !== 'undefined' &&
2
+ typeof window.document !== 'undefined' &&
3
+ typeof window.document.createElement !== 'undefined';
4
+ //# sourceMappingURL=canUseDOM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canUseDOM.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/canUseDOM.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,WAAW,GACtB,OAAO,MAAM,KAAK,WAAW;IAC7B,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW;IACtC,OAAO,MAAM,CAAC,QAAQ,CAAC,aAAa,KAAK,WAAW,CAAA"}
@@ -0,0 +1,4 @@
1
+ export default function caretFromPoint(x: number, y: number): null | {
2
+ offset: number;
3
+ node: Node;
4
+ };
@@ -0,0 +1,29 @@
1
+ export default function caretFromPoint(x, y) {
2
+ if (typeof document.caretRangeFromPoint !== 'undefined') {
3
+ var range = document.caretRangeFromPoint(x, y);
4
+ if (range === null) {
5
+ return null;
6
+ }
7
+ return {
8
+ node: range.startContainer,
9
+ offset: range.startOffset,
10
+ };
11
+ // @ts-ignore
12
+ }
13
+ else if (document.caretPositionFromPoint !== 'undefined') {
14
+ // @ts-ignore FF - no types
15
+ var range = document.caretPositionFromPoint(x, y);
16
+ if (range === null) {
17
+ return null;
18
+ }
19
+ return {
20
+ node: range.offsetNode,
21
+ offset: range.offset,
22
+ };
23
+ }
24
+ else {
25
+ // Gracefully handle IE
26
+ return null;
27
+ }
28
+ }
29
+ //# sourceMappingURL=caretFromPoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"caretFromPoint.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/caretFromPoint.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,CAAS,EACT,CAAS;IAKT,IAAI,OAAO,QAAQ,CAAC,mBAAmB,KAAK,WAAW,EAAE,CAAC;QACxD,IAAM,KAAK,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAChD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO,IAAI,CAAA;QACb,CAAC;QACD,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,cAAc;YAC1B,MAAM,EAAE,KAAK,CAAC,WAAW;SAC1B,CAAA;QACD,aAAa;IACf,CAAC;SAAM,IAAI,QAAQ,CAAC,sBAAsB,KAAK,WAAW,EAAE,CAAC;QAC3D,2BAA2B;QAC3B,IAAM,KAAK,GAAG,QAAQ,CAAC,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACnD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO,IAAI,CAAA;QACb,CAAC;QACD,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,UAAU;YACtB,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,CAAA;IACH,CAAC;SAAM,CAAC;QACN,uBAAuB;QACvB,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ declare global {
2
+ interface Document {
3
+ documentMode?: unknown;
4
+ }
5
+ interface Window {
6
+ MSStream?: unknown;
7
+ }
8
+ }
9
+ export declare const IS_APPLE: boolean;
10
+ export declare const IS_FIREFOX: boolean;
11
+ export declare const CAN_USE_BEFORE_INPUT: boolean;
12
+ export declare const IS_SAFARI: boolean;
13
+ export declare const IS_IOS: boolean;
14
+ export declare const IS_ANDROID: boolean;
15
+ export declare const IS_CHROME: boolean;
16
+ export declare const IS_APPLE_WEBKIT: boolean;
@@ -0,0 +1,14 @@
1
+ import { CAN_USE_DOM } from './canUseDOM';
2
+ var documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null;
3
+ export var IS_APPLE = CAN_USE_DOM && /Mac|iPod|iPhone|iPad/.test(navigator.platform);
4
+ export var IS_FIREFOX = CAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
5
+ export var CAN_USE_BEFORE_INPUT = CAN_USE_DOM && 'InputEvent' in window && !documentMode ? 'getTargetRanges' in new window.InputEvent('input') : false;
6
+ export var IS_SAFARI = CAN_USE_DOM && /Version\/[\d.]+.*Safari/.test(navigator.userAgent);
7
+ export var IS_IOS = CAN_USE_DOM && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
8
+ export var IS_ANDROID = CAN_USE_DOM && /Android/.test(navigator.userAgent);
9
+ // Keep these in case we need to use them in the future.
10
+ // export const IS_WINDOWS: boolean = CAN_USE_DOM && /Win/.test(navigator.platform);
11
+ export var IS_CHROME = CAN_USE_DOM && /^(?=.*Chrome).*/i.test(navigator.userAgent);
12
+ // export const canUseTextInputEvent: boolean = CAN_USE_DOM && 'TextEvent' in window && !documentMode;
13
+ export var IS_APPLE_WEBKIT = CAN_USE_DOM && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !IS_CHROME;
14
+ //# sourceMappingURL=environment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAYzC,IAAM,YAAY,GAAG,WAAW,IAAI,cAAc,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAA;AAE7F,MAAM,CAAC,IAAM,QAAQ,GAAY,WAAW,IAAI,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;AAE/F,MAAM,CAAC,IAAM,UAAU,GAAY,WAAW,IAAI,kCAAkC,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;AAE9G,MAAM,CAAC,IAAM,oBAAoB,GAC/B,WAAW,IAAI,YAAY,IAAI,MAAM,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,IAAI,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;AAEtH,MAAM,CAAC,IAAM,SAAS,GAAY,WAAW,IAAI,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;AAEpG,MAAM,CAAC,IAAM,MAAM,GAAY,WAAW,IAAI,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAA;AAE9G,MAAM,CAAC,IAAM,UAAU,GAAY,WAAW,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;AAErF,wDAAwD;AACxD,oFAAoF;AACpF,MAAM,CAAC,IAAM,SAAS,GAAY,WAAW,IAAI,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;AAC7F,sGAAsG;AAEtG,MAAM,CAAC,IAAM,eAAe,GAAG,WAAW,IAAI,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAA"}
@@ -0,0 +1 @@
1
+ export default function invariant(cond?: boolean, message?: string): asserts cond;
@@ -0,0 +1,12 @@
1
+ // invariant(condition, message) will refine types based on "condition", and
2
+ // if "condition" is false will throw an error. This function is special-cased
3
+ // in flow itself, so we can't name it anything else.
4
+ export default function invariant(cond, message) {
5
+ if (cond) {
6
+ return;
7
+ }
8
+ throw new Error('Internal Lexical error: invariant() is meant to be replaced at compile ' +
9
+ 'time. There is no runtime version. Error: ' +
10
+ message);
11
+ }
12
+ //# sourceMappingURL=invariant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invariant.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/invariant.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,8EAA8E;AAC9E,qDAAqD;AACrD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAAc,EAAE,OAAgB;IAChE,IAAI,IAAI,EAAE,CAAC;QACT,OAAM;IACR,CAAC;IAED,MAAM,IAAI,KAAK,CACb,yEAAyE;QACvE,4CAA4C;QAC5C,OAAO,CACV,CAAA;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ export default function simpleDiffWithCursor(a: string, b: string, cursor: number): {
2
+ index: number;
3
+ insert: string;
4
+ remove: number;
5
+ };
@@ -0,0 +1,25 @@
1
+ export default function simpleDiffWithCursor(a, b, cursor) {
2
+ var aLength = a.length;
3
+ var bLength = b.length;
4
+ var left = 0; // number of same characters counting from left
5
+ var right = 0; // number of same characters counting from right
6
+ // Iterate left to the right until we find a changed character
7
+ // First iteration considers the current cursor position
8
+ while (left < aLength && left < bLength && a[left] === b[left] && left < cursor) {
9
+ left++;
10
+ }
11
+ // Iterate right to the left until we find a changed character
12
+ while (right + left < aLength && right + left < bLength && a[aLength - right - 1] === b[bLength - right - 1]) {
13
+ right++;
14
+ }
15
+ // Try to iterate left further to the right without caring about the current cursor position
16
+ while (right + left < aLength && right + left < bLength && a[left] === b[left]) {
17
+ left++;
18
+ }
19
+ return {
20
+ index: left,
21
+ insert: b.slice(left, bLength - right),
22
+ remove: aLength - left - right,
23
+ };
24
+ }
25
+ //# sourceMappingURL=simpleDiffWithCursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simpleDiffWithCursor.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/simpleDiffWithCursor.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,CAAS,EACT,CAAS,EACT,MAAc;IAEd,IAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAA;IACxB,IAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAA;IACxB,IAAI,IAAI,GAAG,CAAC,CAAA,CAAC,+CAA+C;IAC5D,IAAI,KAAK,GAAG,CAAC,CAAA,CAAC,gDAAgD;IAC9D,8DAA8D;IAC9D,wDAAwD;IACxD,OAAO,IAAI,GAAG,OAAO,IAAI,IAAI,GAAG,OAAO,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,MAAM,EAAE,CAAC;QAChF,IAAI,EAAE,CAAA;IACR,CAAC;IACD,8DAA8D;IAC9D,OAAO,KAAK,GAAG,IAAI,GAAG,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,OAAO,IAAI,CAAC,CAAC,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;QAC7G,KAAK,EAAE,CAAA;IACT,CAAC;IACD,4FAA4F;IAC5F,OAAO,KAAK,GAAG,IAAI,GAAG,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,OAAO,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/E,IAAI,EAAE,CAAA;IACR,CAAC;IACD,OAAO;QACL,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,GAAG,KAAK,CAAC;QACtC,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,KAAK;KAC/B,CAAA;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { useLayoutEffect } from 'react';
2
+ declare const useLayoutEffectImpl: typeof useLayoutEffect;
3
+ export default useLayoutEffectImpl;
@@ -0,0 +1,5 @@
1
+ import { useEffect, useLayoutEffect } from 'react';
2
+ import { CAN_USE_DOM } from './canUseDOM';
3
+ var useLayoutEffectImpl = CAN_USE_DOM ? useLayoutEffect : useEffect;
4
+ export default useLayoutEffectImpl;
5
+ //# sourceMappingURL=useLayoutEffect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLayoutEffect.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/useLayoutEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,IAAM,mBAAmB,GAA2B,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAA;AAE7F,eAAe,mBAAmB,CAAA"}
@@ -0,0 +1 @@
1
+ export default function warnOnlyOnce(message: string): () => void;
@@ -0,0 +1,13 @@
1
+ export default function warnOnlyOnce(message) {
2
+ // if (!__DEV__) {
3
+ // return;
4
+ // }
5
+ var run = false;
6
+ return function () {
7
+ if (!run) {
8
+ console.warn(message);
9
+ }
10
+ run = true;
11
+ };
12
+ }
13
+ //# sourceMappingURL=warnOnlyOnce.js.map