sykpcomposer 0.0.384 → 0.0.385

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 (351) hide show
  1. package/{dist/index.html → index.html} +13 -14
  2. package/index.ts +1 -0
  3. package/package.json +60 -76
  4. package/postcss.config.cjs +6 -0
  5. package/{dist → public}/assets/icons/3-columns.svg +3 -3
  6. package/{dist → public}/assets/icons/LICENSE.md +5 -5
  7. package/{dist → public}/assets/icons/add-sign.svg +3 -3
  8. package/{dist → public}/assets/icons/file-earmark-text.svg +3 -3
  9. package/{dist → public}/assets/icons/minus-sign.svg +3 -3
  10. package/{dist → public}/assets/icons/scissors.svg +2 -2
  11. package/public/index.html +43 -0
  12. package/{dist → public}/manifest.json +25 -25
  13. package/{dist → public}/robots.txt +3 -3
  14. package/src/index.tsx +8 -0
  15. package/src/lexical/App.tsx +139 -0
  16. package/src/lexical/Editor.tsx +496 -0
  17. package/src/lexical/appSettings.ts +34 -0
  18. package/src/lexical/codoxCollab.js +11 -0
  19. package/src/lexical/commenting/index.ts +451 -0
  20. package/src/lexical/context/SettingsContext.tsx +81 -0
  21. package/src/lexical/context/SharedAutocompleteContext.tsx +71 -0
  22. package/src/lexical/context/SharedHistoryContext.tsx +35 -0
  23. package/src/lexical/hooks/useModal.tsx +60 -0
  24. package/src/lexical/hooks/useReport.ts +64 -0
  25. package/src/lexical/http.ts +67 -0
  26. package/src/lexical/images/cat-typing.gif +0 -0
  27. package/src/lexical/images/emoji/1F600.png +0 -0
  28. package/src/lexical/images/emoji/1F641.png +0 -0
  29. package/src/lexical/images/emoji/1F642.png +0 -0
  30. package/src/lexical/images/emoji/2764.png +0 -0
  31. package/src/lexical/images/emoji/LICENSE.md +5 -0
  32. package/src/lexical/images/icons/3-columns.svg +3 -0
  33. package/src/lexical/images/icons/LICENSE.md +5 -0
  34. package/src/lexical/images/icons/add-sign.svg +3 -0
  35. package/src/lexical/images/icons/arrow-clockwise.svg +1 -0
  36. package/src/lexical/images/icons/arrow-counterclockwise.svg +1 -0
  37. package/src/lexical/images/icons/bg-color.svg +1 -0
  38. package/src/lexical/images/icons/camera.svg +1 -0
  39. package/src/lexical/images/icons/card-checklist.svg +1 -0
  40. package/src/lexical/images/icons/caret-right-fill.svg +1 -0
  41. package/src/lexical/images/icons/chat-left-text.svg +1 -0
  42. package/src/lexical/images/icons/chat-right-dots.svg +1 -0
  43. package/src/lexical/images/icons/chat-right-text.svg +1 -0
  44. package/src/lexical/images/icons/chat-right.svg +1 -0
  45. package/src/lexical/images/icons/chat-square-quote.svg +1 -0
  46. package/src/lexical/images/icons/chevron-down.svg +1 -0
  47. package/src/lexical/images/icons/clipboard.svg +1 -0
  48. package/src/lexical/images/icons/close.svg +1 -0
  49. package/src/lexical/images/icons/code.svg +1 -0
  50. package/src/lexical/images/icons/comments.svg +1 -0
  51. package/src/lexical/images/icons/copy.svg +1 -0
  52. package/src/lexical/images/icons/diagram-2.svg +1 -0
  53. package/src/lexical/images/icons/download.svg +1 -0
  54. package/src/lexical/images/icons/draggable-block-menu.svg +1 -0
  55. package/src/lexical/images/icons/dropdown-more.svg +1 -0
  56. package/src/lexical/images/icons/figma.svg +1 -0
  57. package/src/lexical/images/icons/file-earmark-text.svg +4 -0
  58. package/src/lexical/images/icons/file-image.svg +1 -0
  59. package/src/lexical/images/icons/filetype-gif.svg +1 -0
  60. package/src/lexical/images/icons/font-color.svg +1 -0
  61. package/src/lexical/images/icons/font-family.svg +1 -0
  62. package/src/lexical/images/icons/gear.svg +1 -0
  63. package/src/lexical/images/icons/horizontal-rule.svg +1 -0
  64. package/src/lexical/images/icons/indent.svg +1 -0
  65. package/src/lexical/images/icons/journal-code.svg +1 -0
  66. package/src/lexical/images/icons/journal-text.svg +1 -0
  67. package/src/lexical/images/icons/justify.svg +1 -0
  68. package/src/lexical/images/icons/link.svg +1 -0
  69. package/src/lexical/images/icons/list-ol.svg +1 -0
  70. package/src/lexical/images/icons/list-ul.svg +1 -0
  71. package/src/lexical/images/icons/lock-fill.svg +1 -0
  72. package/src/lexical/images/icons/lock.svg +1 -0
  73. package/src/lexical/images/icons/markdown.svg +1 -0
  74. package/src/lexical/images/icons/mic.svg +1 -0
  75. package/src/lexical/images/icons/minus-sign.svg +3 -0
  76. package/src/lexical/images/icons/outdent.svg +1 -0
  77. package/src/lexical/images/icons/paint-bucket.svg +1 -0
  78. package/src/lexical/images/icons/palette.svg +1 -0
  79. package/src/lexical/images/icons/pencil-fill.svg +1 -0
  80. package/src/lexical/images/icons/plug-fill.svg +1 -0
  81. package/src/lexical/images/icons/plug.svg +1 -0
  82. package/src/lexical/images/icons/plus-slash-minus.svg +1 -0
  83. package/src/lexical/images/icons/plus.svg +1 -0
  84. package/src/lexical/images/icons/prettier-error.svg +1 -0
  85. package/src/lexical/images/icons/prettier.svg +1 -0
  86. package/src/lexical/images/icons/scissors.svg +3 -0
  87. package/src/lexical/images/icons/send.svg +1 -0
  88. package/src/lexical/images/icons/square-check.svg +1 -0
  89. package/src/lexical/images/icons/sticky.svg +1 -0
  90. package/src/lexical/images/icons/success-alt.svg +1 -0
  91. package/src/lexical/images/icons/success.svg +1 -0
  92. package/src/lexical/images/icons/table.svg +1 -0
  93. package/src/lexical/images/icons/text-center.svg +1 -0
  94. package/src/lexical/images/icons/text-left.svg +1 -0
  95. package/src/lexical/images/icons/text-paragraph.svg +1 -0
  96. package/src/lexical/images/icons/text-right.svg +1 -0
  97. package/src/lexical/images/icons/trash.svg +1 -0
  98. package/src/lexical/images/icons/trash3.svg +1 -0
  99. package/src/lexical/images/icons/tweet.svg +1 -0
  100. package/src/lexical/images/icons/type-bold.svg +1 -0
  101. package/src/lexical/images/icons/type-h1.svg +1 -0
  102. package/src/lexical/images/icons/type-h2.svg +1 -0
  103. package/src/lexical/images/icons/type-h3.svg +1 -0
  104. package/src/lexical/images/icons/type-h4.svg +1 -0
  105. package/src/lexical/images/icons/type-h5.svg +1 -0
  106. package/src/lexical/images/icons/type-h6.svg +1 -0
  107. package/src/lexical/images/icons/type-italic.svg +1 -0
  108. package/src/lexical/images/icons/type-strikethrough.svg +1 -0
  109. package/src/lexical/images/icons/type-subscript.svg +1 -0
  110. package/src/lexical/images/icons/type-superscript.svg +1 -0
  111. package/src/lexical/images/icons/type-underline.svg +1 -0
  112. package/src/lexical/images/icons/upload.svg +1 -0
  113. package/src/lexical/images/icons/user.svg +1 -0
  114. package/src/lexical/images/icons/youtube.svg +1 -0
  115. package/src/lexical/images/image/LICENSE.md +5 -0
  116. package/src/lexical/images/landscape.jpg +0 -0
  117. package/src/lexical/images/logo.svg +1 -0
  118. package/src/lexical/images/yellow-flower-small.jpg +0 -0
  119. package/src/lexical/images/yellow-flower.jpg +0 -0
  120. package/src/lexical/index.css +1787 -0
  121. package/src/lexical/nodes/AutocompleteNode.tsx +107 -0
  122. package/src/lexical/nodes/EmojiNode.tsx +102 -0
  123. package/src/lexical/nodes/EquationComponent.tsx +132 -0
  124. package/src/lexical/nodes/FigmaNode.tsx +135 -0
  125. package/src/lexical/nodes/ImageComponent.tsx +427 -0
  126. package/src/lexical/nodes/ImageNode.css +43 -0
  127. package/src/lexical/nodes/ImageNode.tsx +253 -0
  128. package/src/lexical/nodes/InlineImageComponent.tsx +409 -0
  129. package/src/lexical/nodes/InlineImageNode.css +94 -0
  130. package/src/lexical/nodes/InlineImageNode.tsx +294 -0
  131. package/src/lexical/nodes/KeywordNode.ts +67 -0
  132. package/src/lexical/nodes/LayoutContainerNode.ts +137 -0
  133. package/src/lexical/nodes/LayoutItemNode.ts +71 -0
  134. package/src/lexical/nodes/MentionNode.ts +131 -0
  135. package/src/lexical/nodes/PageBreakNode/index.css +56 -0
  136. package/src/lexical/nodes/PageBreakNode/index.tsx +168 -0
  137. package/src/lexical/nodes/PlaygroundNodes.ts +72 -0
  138. package/src/lexical/nodes/PollComponent.tsx +248 -0
  139. package/src/lexical/nodes/PollNode.css +164 -0
  140. package/src/lexical/nodes/PollNode.tsx +209 -0
  141. package/src/lexical/nodes/StickyNode.css +37 -0
  142. package/src/lexical/nodes/TableNode.tsx +93 -0
  143. package/src/lexical/nodes/TweetNode.tsx +223 -0
  144. package/src/lexical/nodes/YouTubeNode.tsx +184 -0
  145. package/src/lexical/plugins/ActionsPlugin/index.tsx +0 -0
  146. package/src/lexical/plugins/AutoEmbedPlugin/index.tsx +354 -0
  147. package/src/lexical/plugins/AutoLinkPlugin/index.tsx +32 -0
  148. package/src/lexical/plugins/AutocompletePlugin/index.tsx +2529 -0
  149. package/src/lexical/plugins/CodeHighlightPlugin/index.ts +21 -0
  150. package/src/lexical/plugins/CollapsiblePlugin/Collapsible.css +57 -0
  151. package/src/lexical/plugins/CollapsiblePlugin/CollapsibleContainerNode.ts +136 -0
  152. package/src/lexical/plugins/CollapsiblePlugin/CollapsibleContentNode.ts +96 -0
  153. package/src/lexical/plugins/CollapsiblePlugin/CollapsibleTitleNode.ts +132 -0
  154. package/src/lexical/plugins/CollapsiblePlugin/index.ts +297 -0
  155. package/src/lexical/plugins/CommentPlugin/index.css +443 -0
  156. package/src/lexical/plugins/CommentPlugin/index.tsx +981 -0
  157. package/src/lexical/plugins/ContextMenuPlugin/index.tsx +244 -0
  158. package/src/lexical/plugins/DocsPlugin/index.tsx +20 -0
  159. package/src/lexical/plugins/DragDropPastePlugin/index.ts +51 -0
  160. package/src/lexical/plugins/DraggableBlockPlugin/index.css +36 -0
  161. package/src/lexical/plugins/DraggableBlockPlugin/index.tsx +431 -0
  162. package/src/lexical/plugins/EmojiPickerPlugin/index.tsx +199 -0
  163. package/src/lexical/plugins/EmojisPlugin/index.ts +79 -0
  164. package/src/lexical/plugins/FigmaPlugin/index.tsx +40 -0
  165. package/src/lexical/plugins/FloatingLinkEditorPlugin/index.css +41 -0
  166. package/src/lexical/plugins/FloatingLinkEditorPlugin/index.tsx +391 -0
  167. package/src/lexical/plugins/FloatingTextFormatToolbarPlugin/index.css +133 -0
  168. package/src/lexical/plugins/FloatingTextFormatToolbarPlugin/index.tsx +392 -0
  169. package/src/lexical/plugins/ImagesPlugin/index.tsx +354 -0
  170. package/src/lexical/plugins/InlineImagePlugin/index.tsx +343 -0
  171. package/src/lexical/plugins/KeywordsPlugin/index.ts +56 -0
  172. package/src/lexical/plugins/LayoutPlugin/InsertLayoutDialog.tsx +56 -0
  173. package/src/lexical/plugins/LayoutPlugin/LayoutPlugin.tsx +219 -0
  174. package/src/lexical/plugins/LinkPlugin/index.tsx +16 -0
  175. package/src/lexical/plugins/ListMaxIndentLevelPlugin/index.ts +86 -0
  176. package/src/lexical/plugins/MaxLengthPlugin/index.tsx +53 -0
  177. package/src/lexical/plugins/MentionsPlugin/index.tsx +696 -0
  178. package/src/lexical/plugins/PageBreakPlugin/index.tsx +57 -0
  179. package/src/lexical/plugins/PasteLogPlugin/index.tsx +54 -0
  180. package/src/lexical/plugins/PollPlugin/index.tsx +87 -0
  181. package/src/lexical/plugins/SpeechToTextPlugin/index.ts +125 -0
  182. package/src/lexical/plugins/StickyPlugin/index.ts +22 -0
  183. package/src/lexical/plugins/TabFocusPlugin/index.tsx +65 -0
  184. package/src/lexical/plugins/TableActionMenuPlugin/index.tsx +791 -0
  185. package/src/lexical/plugins/TableCellResizer/index.css +12 -0
  186. package/src/lexical/plugins/TableCellResizer/index.tsx +419 -0
  187. package/src/lexical/plugins/TableOfContentsPlugin/index.css +87 -0
  188. package/src/lexical/plugins/TableOfContentsPlugin/index.tsx +197 -0
  189. package/src/lexical/plugins/TablePlugin.tsx +182 -0
  190. package/src/lexical/plugins/TestRecorderPlugin/index.tsx +464 -0
  191. package/src/lexical/plugins/ToolbarPlugin/fontSize.css +44 -0
  192. package/src/lexical/plugins/ToolbarPlugin/fontSize.tsx +212 -0
  193. package/src/lexical/plugins/ToolbarPlugin/index.tsx +1001 -0
  194. package/src/lexical/plugins/TreeViewPlugin/index.tsx +26 -0
  195. package/src/lexical/plugins/TwitterPlugin/index.ts +41 -0
  196. package/src/lexical/plugins/TypingPerfPlugin/index.ts +117 -0
  197. package/src/lexical/plugins/YouTubePlugin/index.ts +41 -0
  198. package/src/lexical/server/validation.ts +132 -0
  199. package/src/lexical/themes/CommentEditorTheme.css +13 -0
  200. package/src/lexical/themes/CommentEditorTheme.ts +20 -0
  201. package/src/lexical/themes/PlaygroundEditorTheme.css +441 -0
  202. package/src/lexical/themes/PlaygroundEditorTheme.ts +119 -0
  203. package/src/lexical/themes/StickyEditorTheme.css +13 -0
  204. package/src/lexical/themes/StickyEditorTheme.ts +20 -0
  205. package/src/lexical/ui/Button.css +36 -0
  206. package/src/lexical/ui/Button.tsx +49 -0
  207. package/src/lexical/ui/ColorPicker.css +88 -0
  208. package/src/lexical/ui/ColorPicker.tsx +363 -0
  209. package/src/lexical/ui/ContentEditable.css +23 -0
  210. package/src/lexical/ui/ContentEditable.tsx +20 -0
  211. package/src/lexical/ui/Dialog.css +17 -0
  212. package/src/lexical/ui/Dialog.tsx +32 -0
  213. package/src/lexical/ui/DropDown.tsx +259 -0
  214. package/src/lexical/ui/DropdownColorPicker.tsx +41 -0
  215. package/src/lexical/ui/EquationEditor.css +38 -0
  216. package/src/lexical/ui/EquationEditor.tsx +56 -0
  217. package/src/lexical/ui/FileInput.tsx +38 -0
  218. package/src/lexical/ui/ImageResizer.tsx +313 -0
  219. package/src/lexical/ui/Input.css +32 -0
  220. package/src/lexical/ui/KatexEquationAlterer.css +41 -0
  221. package/src/lexical/ui/KatexEquationAlterer.tsx +81 -0
  222. package/src/lexical/ui/KatexRenderer.tsx +54 -0
  223. package/src/lexical/ui/Modal.css +62 -0
  224. package/src/lexical/ui/Modal.tsx +106 -0
  225. package/src/lexical/ui/Placeholder.css +28 -0
  226. package/src/lexical/ui/Placeholder.tsx +22 -0
  227. package/src/lexical/ui/Select.css +34 -0
  228. package/src/lexical/ui/Select.tsx +34 -0
  229. package/src/lexical/ui/Switch.tsx +36 -0
  230. package/src/lexical/ui/TextInput.tsx +46 -0
  231. package/src/lexical/utils/canUseDOM.ts +12 -0
  232. package/src/lexical/utils/emoji-list.ts +16615 -0
  233. package/src/lexical/utils/environment.ts +57 -0
  234. package/src/lexical/utils/getDOMRangeRect.ts +27 -0
  235. package/src/lexical/utils/getSelectedNode.ts +27 -0
  236. package/src/lexical/utils/guard.ts +10 -0
  237. package/src/lexical/utils/invariant.ts +26 -0
  238. package/src/lexical/utils/isMobileWidth.ts +7 -0
  239. package/src/lexical/utils/joinClasses.ts +13 -0
  240. package/src/lexical/utils/point.ts +55 -0
  241. package/src/lexical/utils/rect.ts +158 -0
  242. package/src/lexical/utils/setFloatingElemPosition.ts +51 -0
  243. package/src/lexical/utils/setFloatingElemPositionForLinkEditor.ts +46 -0
  244. package/src/lexical/utils/swipe.ts +127 -0
  245. package/src/lexical/utils/url.ts +38 -0
  246. package/src/lexical/utils/useLayoutEffect.ts +16 -0
  247. package/sykpcomposer-0.0.273.tgz +0 -0
  248. package/tailwind.config.cjs +8 -0
  249. package/tsconfig.json +23 -0
  250. package/tsconfig.node.json +9 -0
  251. package/vite.config.ts +26 -0
  252. package/yjs-wss-db/000015.ldb +0 -0
  253. package/yjs-wss-db/000018.ldb +0 -0
  254. package/yjs-wss-db/000019.log +0 -0
  255. package/yjs-wss-db/CURRENT +1 -0
  256. package/yjs-wss-db/LOCK +0 -0
  257. package/yjs-wss-db/LOG +5 -0
  258. package/yjs-wss-db/LOG.old +5 -0
  259. package/yjs-wss-db/MANIFEST-000017 +0 -0
  260. package/dist/assets/ImageComponent-DncIDz48.js +0 -23
  261. package/dist/assets/ImageComponent-NSP6xs1B.css +0 -1
  262. package/dist/assets/InlineImageComponent-BefYBd1k.js +0 -1
  263. package/dist/assets/InlineImageComponent-BnmVdNhp.css +0 -1
  264. package/dist/assets/LexicalNestedComposer.prod-BGbK0rVf.js +0 -1
  265. package/dist/assets/PollComponent-Brv_H-Vr.js +0 -1
  266. package/dist/assets/PollComponent-CymKlNoB.css +0 -1
  267. package/dist/assets/emoji-list-D_N31RbD.js +0 -1
  268. package/dist/assets/index-BR8wqG2P.js +0 -1441
  269. package/dist/assets/index-CDE-KF5Y.css +0 -1
  270. /package/{dist → public}/assets/icons/arrow-clockwise.svg +0 -0
  271. /package/{dist → public}/assets/icons/arrow-counterclockwise.svg +0 -0
  272. /package/{dist → public}/assets/icons/bg-color.svg +0 -0
  273. /package/{dist → public}/assets/icons/camera.svg +0 -0
  274. /package/{dist → public}/assets/icons/card-checklist.svg +0 -0
  275. /package/{dist → public}/assets/icons/caret-right-fill.svg +0 -0
  276. /package/{dist → public}/assets/icons/chat-left-text.svg +0 -0
  277. /package/{dist → public}/assets/icons/chat-right-dots.svg +0 -0
  278. /package/{dist → public}/assets/icons/chat-right-text.svg +0 -0
  279. /package/{dist → public}/assets/icons/chat-right.svg +0 -0
  280. /package/{dist → public}/assets/icons/chat-square-quote.svg +0 -0
  281. /package/{dist → public}/assets/icons/chevron-down.svg +0 -0
  282. /package/{dist → public}/assets/icons/clipboard.svg +0 -0
  283. /package/{dist → public}/assets/icons/close.svg +0 -0
  284. /package/{dist → public}/assets/icons/code.svg +0 -0
  285. /package/{dist → public}/assets/icons/comments.svg +0 -0
  286. /package/{dist → public}/assets/icons/copy.svg +0 -0
  287. /package/{dist → public}/assets/icons/diagram-2.svg +0 -0
  288. /package/{dist → public}/assets/icons/download.svg +0 -0
  289. /package/{dist → public}/assets/icons/draggable-block-menu.svg +0 -0
  290. /package/{dist → public}/assets/icons/dropdown-more.svg +0 -0
  291. /package/{dist → public}/assets/icons/figma.svg +0 -0
  292. /package/{dist → public}/assets/icons/file-image.svg +0 -0
  293. /package/{dist → public}/assets/icons/filetype-gif.svg +0 -0
  294. /package/{dist → public}/assets/icons/font-color.svg +0 -0
  295. /package/{dist → public}/assets/icons/font-family.svg +0 -0
  296. /package/{dist → public}/assets/icons/gear.svg +0 -0
  297. /package/{dist → public}/assets/icons/horizontal-rule.svg +0 -0
  298. /package/{dist → public}/assets/icons/indent.svg +0 -0
  299. /package/{dist → public}/assets/icons/journal-code.svg +0 -0
  300. /package/{dist → public}/assets/icons/journal-text.svg +0 -0
  301. /package/{dist → public}/assets/icons/justify.svg +0 -0
  302. /package/{dist → public}/assets/icons/link.svg +0 -0
  303. /package/{dist → public}/assets/icons/list-ol.svg +0 -0
  304. /package/{dist → public}/assets/icons/list-ul.svg +0 -0
  305. /package/{dist → public}/assets/icons/lock-fill.svg +0 -0
  306. /package/{dist → public}/assets/icons/lock.svg +0 -0
  307. /package/{dist → public}/assets/icons/markdown.svg +0 -0
  308. /package/{dist → public}/assets/icons/mic.svg +0 -0
  309. /package/{dist → public}/assets/icons/outdent.svg +0 -0
  310. /package/{dist → public}/assets/icons/paint-bucket.svg +0 -0
  311. /package/{dist → public}/assets/icons/palette.svg +0 -0
  312. /package/{dist → public}/assets/icons/pdf-svgrepo-com.svg +0 -0
  313. /package/{dist → public}/assets/icons/pencil-fill.svg +0 -0
  314. /package/{dist → public}/assets/icons/plug-fill.svg +0 -0
  315. /package/{dist → public}/assets/icons/plug.svg +0 -0
  316. /package/{dist → public}/assets/icons/plus-slash-minus.svg +0 -0
  317. /package/{dist → public}/assets/icons/plus.svg +0 -0
  318. /package/{dist → public}/assets/icons/prettier-error.svg +0 -0
  319. /package/{dist → public}/assets/icons/prettier.svg +0 -0
  320. /package/{dist → public}/assets/icons/send.svg +0 -0
  321. /package/{dist → public}/assets/icons/square-check.svg +0 -0
  322. /package/{dist → public}/assets/icons/sticky.svg +0 -0
  323. /package/{dist → public}/assets/icons/success-alt.svg +0 -0
  324. /package/{dist → public}/assets/icons/success.svg +0 -0
  325. /package/{dist → public}/assets/icons/table.svg +0 -0
  326. /package/{dist → public}/assets/icons/text-center.svg +0 -0
  327. /package/{dist → public}/assets/icons/text-left.svg +0 -0
  328. /package/{dist → public}/assets/icons/text-paragraph.svg +0 -0
  329. /package/{dist → public}/assets/icons/text-right.svg +0 -0
  330. /package/{dist → public}/assets/icons/trash.svg +0 -0
  331. /package/{dist → public}/assets/icons/trash3.svg +0 -0
  332. /package/{dist → public}/assets/icons/tweet.svg +0 -0
  333. /package/{dist → public}/assets/icons/type-bold.svg +0 -0
  334. /package/{dist → public}/assets/icons/type-h1.svg +0 -0
  335. /package/{dist → public}/assets/icons/type-h2.svg +0 -0
  336. /package/{dist → public}/assets/icons/type-h3.svg +0 -0
  337. /package/{dist → public}/assets/icons/type-h4.svg +0 -0
  338. /package/{dist → public}/assets/icons/type-h5.svg +0 -0
  339. /package/{dist → public}/assets/icons/type-h6.svg +0 -0
  340. /package/{dist → public}/assets/icons/type-italic.svg +0 -0
  341. /package/{dist → public}/assets/icons/type-strikethrough.svg +0 -0
  342. /package/{dist → public}/assets/icons/type-subscript.svg +0 -0
  343. /package/{dist → public}/assets/icons/type-superscript.svg +0 -0
  344. /package/{dist → public}/assets/icons/type-underline.svg +0 -0
  345. /package/{dist → public}/assets/icons/upload.svg +0 -0
  346. /package/{dist → public}/assets/icons/user.svg +0 -0
  347. /package/{dist → public}/assets/icons/youtube.svg +0 -0
  348. /package/{dist → public}/favicon.ico +0 -0
  349. /package/{dist → public}/logo192.png +0 -0
  350. /package/{dist → public}/logo512.png +0 -0
  351. /package/{dist → public}/vite.svg +0 -0
@@ -1,14 +1,13 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Vite + React + TS</title>
8
- <script type="module" crossorigin src="/assets/index-BR8wqG2P.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-CDE-KF5Y.css">
10
- </head>
11
- <body>
12
- <div id="root"></div>
13
- </body>
14
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Vite + React + TS</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/index.tsx"></script>
12
+ </body>
13
+ </html>
package/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { Editor } from "./src/lexical/Editor";
package/package.json CHANGED
@@ -1,76 +1,60 @@
1
- {
2
- "name": "sykpcomposer",
3
- "description": "code for captions",
4
- "private": false,
5
- "version": "0.0.384",
6
- "type": "module",
7
- "main": "dist/index.umd.js",
8
- "module": "dist/index.es.js",
9
- "types": "dist/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "import": "./dist/index.es.js",
13
- "require": "./dist/index.umd.js",
14
- "types": "./dist/index.d.ts"
15
- }
16
- },
17
- "files": [
18
- "/dist"
19
- ],
20
- "publishConfig": {
21
- "access": "public"
22
- },
23
- "scripts": {
24
- "dev": "vite",
25
- "build": "vite build",
26
- "prepare": "npm run build",
27
- "preview": "vite preview",
28
- "test": "jest"
29
- },
30
- "dependencies": {
31
- "@codoxhq/lexical-provider": "1.0.4",
32
- "@lexical/headless": "0.20.0",
33
- "@lexical/list": "0.14.2",
34
- "@lexical/mark": "0.14.2",
35
- "@lexical/react": "0.14.2",
36
- "@lexical/rich-text": "0.14.2",
37
- "@lexical/table": "0.14.2",
38
- "@types/lodash-es": "4.17.12",
39
- "@vitejs/plugin-react": "^4.3.4",
40
- "buffer": "6.0.3",
41
- "docx": "9.1.1",
42
- "file-saver": "2.0.5",
43
- "jquery": "3.7.1",
44
- "jspdf": "2.5.2",
45
- "jspdf-autotable": "3.8.4",
46
- "katex": "^0.15.2",
47
- "lexical": "0.14.2",
48
- "lodash-es": "4.17.21",
49
- "mammoth": "1.8.0",
50
- "react": "17.0.2",
51
- "react-dom": "17.0.2",
52
- "react-helmet": "6.1.0",
53
- "react-image-crop": "11.0.7",
54
- "styled-components": "5.3.11",
55
- "sykpcomposer": "0.0.40",
56
- "tailwindcss": "3.2.4",
57
- "y-webrtc": "10.3.0",
58
- "y-websocket": "2.0.2",
59
- "yjs": "13.6.15"
60
- },
61
- "devDependencies": {
62
- "@testing-library/jest-dom": "^6.6.3",
63
- "@testing-library/react": "^16.2.0",
64
- "@types/jest": "^29.5.14",
65
- "@types/react": "^18.0.26",
66
- "@types/react-dom": "^18.0.9",
67
- "@vitejs/plugin-react-swc": "^3.8.0",
68
- "autoprefixer": "^10.4.13",
69
- "esbuild": "^0.13.4",
70
- "jest": "^29.7.0",
71
- "postcss": "^8.4.20",
72
- "typescript": "^4.9.3",
73
- "vite": "^4.0.0",
74
- "vite-plugin-dts": "^1.7.1"
75
- }
76
- }
1
+ {
2
+ "name": "sykpcomposer",
3
+ "description": "code for captions",
4
+ "private": false,
5
+ "version": "0.0.385",
6
+ "type": "module",
7
+ "scripts": {
8
+ "dev": "vite",
9
+ "build": "vite build",
10
+ "prepare": "npm run build",
11
+ "preview": "vite preview",
12
+ "test": "jest"
13
+ },
14
+ "dependencies": {
15
+ "@codoxhq/lexical-provider": "1.0.4",
16
+ "@lexical/headless": "0.20.0",
17
+ "@lexical/list": "0.14.2",
18
+ "@lexical/mark": "0.14.2",
19
+ "@lexical/react": "0.14.2",
20
+ "@lexical/rich-text": "0.14.2",
21
+ "@lexical/table": "0.14.2",
22
+ "@types/lodash-es": "4.17.12",
23
+ "@vitejs/plugin-react": "^4.3.4",
24
+ "buffer": "6.0.3",
25
+ "docx": "9.1.1",
26
+ "file-saver": "2.0.5",
27
+ "jquery": "3.7.1",
28
+ "jspdf": "2.5.2",
29
+ "jspdf-autotable": "3.8.4",
30
+ "katex": "^0.15.2",
31
+ "lexical": "0.14.2",
32
+ "lodash-es": "4.17.21",
33
+ "mammoth": "1.8.0",
34
+ "react": "17.0.2",
35
+ "react-dom": "17.0.2",
36
+ "react-helmet": "6.1.0",
37
+ "react-image-crop": "11.0.7",
38
+ "styled-components": "5.3.11",
39
+ "sykpcomposer": "0.0.40",
40
+ "tailwindcss": "3.2.4",
41
+ "y-webrtc": "10.3.0",
42
+ "y-websocket": "2.0.2",
43
+ "yjs": "13.6.15"
44
+ },
45
+ "devDependencies": {
46
+ "@testing-library/jest-dom": "6.6.3",
47
+ "@testing-library/react": "16.2.0",
48
+ "@types/jest": "29.5.14",
49
+ "@types/react": "18.0.26",
50
+ "@types/react-dom": "18.0.9",
51
+ "@vitejs/plugin-react-swc": "3.8.0",
52
+ "autoprefixer": "10.4.13",
53
+ "esbuild": "0.13.4",
54
+ "jest": "29.7.0",
55
+ "postcss": "8.4.20",
56
+ "typescript": "4.9.3",
57
+ "vite": "4.0.0",
58
+ "vite-plugin-dts": "1.7.1"
59
+ }
60
+ }
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ }
@@ -1,3 +1,3 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-layout-three-columns" viewBox="0 0 16 16">
2
- <path d="M0 1.5A1.5 1.5 0 0 1 1.5 0h13A1.5 1.5 0 0 1 16 1.5v13a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 14.5v-13zM1.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5H5V1H1.5zM10 15V1H6v14h4zm1 0h3.5a.5.5 0 0 0 .5-.5v-13a.5.5 0 0 0-.5-.5H11v14z"/>
3
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-layout-three-columns" viewBox="0 0 16 16">
2
+ <path d="M0 1.5A1.5 1.5 0 0 1 1.5 0h13A1.5 1.5 0 0 1 16 1.5v13a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 14.5v-13zM1.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5H5V1H1.5zM10 15V1H6v14h4zm1 0h3.5a.5.5 0 0 0 .5-.5v-13a.5.5 0 0 0-.5-.5H11v14z"/>
3
+ </svg>
@@ -1,5 +1,5 @@
1
- Bootstrap Icons
2
- https://icons.getbootstrap.com
3
-
4
- Licensed under MIT license
5
- https://github.com/twbs/icons/blob/main/LICENSE.md
1
+ Bootstrap Icons
2
+ https://icons.getbootstrap.com
3
+
4
+ Licensed under MIT license
5
+ https://github.com/twbs/icons/blob/main/LICENSE.md
@@ -1,3 +1,3 @@
1
- <svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 17">
2
- <path fill="" d="M10 7H6V3H4v4H0v2h4v4h2V9h4z"/>
3
- </svg>
1
+ <svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 17">
2
+ <path fill="" d="M10 7H6V3H4v4H0v2h4v4h2V9h4z"/>
3
+ </svg>
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-file-earmark-text" viewBox="0 0 16 16">
2
- <path d="M5.5 7a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zM5 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5z"/>
3
- <path d="M9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.5L9.5 0zm0 1v2A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5z"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-file-earmark-text" viewBox="0 0 16 16">
2
+ <path d="M5.5 7a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zM5 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5z"/>
3
+ <path d="M9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.5L9.5 0zm0 1v2A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5z"/>
4
4
  </svg>
@@ -1,3 +1,3 @@
1
- <svg width="18" height="18" version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 17">
2
- <path d="M0 7h8v2H0z"/>
3
- </svg>
1
+ <svg width="18" height="18" version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 17">
2
+ <path d="M0 7h8v2H0z"/>
3
+ </svg>
@@ -1,3 +1,3 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-scissors" viewBox="0 0 16 16" transform="matrix(-1, 0, 0, 1, 0, 0)rotate(270)">
2
- <path d="M3.5 3.5c-.614-.884-.074-1.962.858-2.5L8 7.226 11.642 1c.932.538 1.472 1.616.858 2.5L8.81 8.61l1.556 2.661a2.5 2.5 0 1 1-.794.637L8 9.73l-1.572 2.177a2.5 2.5 0 1 1-.794-.637L7.19 8.61 3.5 3.5zm2.5 10a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0zm7 0a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0z"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-scissors" viewBox="0 0 16 16" transform="matrix(-1, 0, 0, 1, 0, 0)rotate(270)">
2
+ <path d="M3.5 3.5c-.614-.884-.074-1.962.858-2.5L8 7.226 11.642 1c.932.538 1.472 1.616.858 2.5L8.81 8.61l1.556 2.661a2.5 2.5 0 1 1-.794.637L8 9.73l-1.572 2.177a2.5 2.5 0 1 1-.794-.637L7.19 8.61 3.5 3.5zm2.5 10a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0zm7 0a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0z"/>
3
3
  </svg>
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <meta name="theme-color" content="#000000" />
8
+ <meta
9
+ name="description"
10
+ content="Web site created using create-react-app"
11
+ />
12
+ <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
+ <!--
14
+ manifest.json provides metadata used when your web app is installed on a
15
+ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16
+ -->
17
+ <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18
+ <!--
19
+ Notice the use of %PUBLIC_URL% in the tags above.
20
+ It will be replaced with the URL of the `public` folder during the build.
21
+ Only files inside the `public` folder can be referenced from the HTML.
22
+
23
+ Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24
+ work correctly both with client-side routing and a non-root public URL.
25
+ Learn how to configure a non-root public URL by running `npm run build`.
26
+ -->
27
+ <title>React App</title>
28
+ </head>
29
+ <body>
30
+ <noscript>You need to enable JavaScript to run this app.</noscript>
31
+ <div id="root"></div>
32
+ <!--
33
+ This HTML file is a template.
34
+ If you open it directly in the browser, you will see an empty page.
35
+
36
+ You can add webfonts, meta tags, or analytics to this file.
37
+ The build step will place the bundled scripts into the <body> tag.
38
+
39
+ To begin the development, run `npm start` or `yarn start`.
40
+ To create a production bundle, use `npm run build` or `yarn build`.
41
+ -->
42
+ </body>
43
+ </html>
@@ -1,25 +1,25 @@
1
- {
2
- "short_name": "React App",
3
- "name": "Create React App Sample",
4
- "icons": [
5
- {
6
- "src": "favicon.ico",
7
- "sizes": "64x64 32x32 24x24 16x16",
8
- "type": "image/x-icon"
9
- },
10
- {
11
- "src": "logo192.png",
12
- "type": "image/png",
13
- "sizes": "192x192"
14
- },
15
- {
16
- "src": "logo512.png",
17
- "type": "image/png",
18
- "sizes": "512x512"
19
- }
20
- ],
21
- "start_url": ".",
22
- "display": "standalone",
23
- "theme_color": "#000000",
24
- "background_color": "#ffffff"
25
- }
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
@@ -1,3 +1,3 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow:
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
package/src/index.tsx ADDED
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import ReactDOM from 'react-dom'; // Import from 'react-dom'
3
+ import App from './lexical/App'; // Ensure correct path
4
+ //@ts-ignore
5
+ ReactDOM.render(
6
+ <App />,
7
+ document.getElementById('root') as HTMLElement // Typecasting to HTMLElement
8
+ );
@@ -0,0 +1,139 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { Editor } from './Editor';
3
+
4
+ function App() {
5
+ const [initialEditorState, setInitialEditorState] = useState<any>({});
6
+ const [CollabApiKey, setCollabApiKey] = useState("");
7
+ const [docId, setDocId] = useState('id_1');
8
+ const [showEd,setshowEd] = useState(false);
9
+ const [isValidEditorState,setisValidEditorState] = useState(false);
10
+ const [userObjData, setUserObj] = useState(
11
+ {
12
+ userName: 'sample',
13
+ userId: 1,
14
+ userEmail: 'sample@gmail.com',
15
+ }
16
+ );
17
+ const mentionItems = [
18
+ "tarun",
19
+ 'Niraj',
20
+ 'Borvo the Hutt',
21
+ 'Akash',
22
+ 'C-3PO',
23
+ ];
24
+
25
+ function convertToJSON(inputString: any) {
26
+ // Fixing property names by replacing unquoted keys with double quotes
27
+ const fixedJsonString = inputString
28
+ .replace(/([a-zA-Z0-9_]+):/g, '"$1":').replace(/'(.*?)'/g, '"$1"');
29
+
30
+ try {
31
+ const jsonObject = JSON.parse(fixedJsonString);
32
+ console.log(jsonObject);
33
+ return jsonObject;
34
+ } catch (error) {
35
+ console.error("Error parsing JSON:", error);
36
+ return null;
37
+ }
38
+ }
39
+
40
+ useEffect(() => {
41
+ const handleMessage = (event:any) => {
42
+ if (event.data) {
43
+ let eventData = JSON.parse(event.data);
44
+ if (eventData) {
45
+ console.log("eventData from spinverse 11111111 ==>", eventData);
46
+ console.log("eventData from spinverse 222222222==>", convertToJSON(eventData.initialEditorState));
47
+ setInitialEditorState(JSON.parse(eventData?.initialEditorState));
48
+ setCollabApiKey(eventData?.key);
49
+ setDocId(eventData?.doc_Id);
50
+ setUserObj(eventData?.userObj);
51
+ }
52
+ }
53
+ };
54
+ window.addEventListener("message", handleMessage);
55
+ return () => {
56
+ window.removeEventListener("message", handleMessage);
57
+ };
58
+ }, []);
59
+
60
+ const sendEditorDataToParent = (editorData:any) => {
61
+ const message = {
62
+ action: 'saveEditorData',
63
+ editorData: editorData,
64
+ };
65
+ window.parent.postMessage(message, "*");
66
+ };
67
+
68
+ const Empty =
69
+ {
70
+ root: {
71
+ children: [
72
+ {
73
+ children: [
74
+ {
75
+ detail: 0,
76
+ format: "",
77
+ mode: "normal",
78
+ style: "",
79
+ text: "Welcome A",
80
+ type: "text",
81
+ version: 1,
82
+ },
83
+ ],
84
+ direction: "ltr",
85
+ format: "",
86
+ indent: 0,
87
+ type: "paragraph",
88
+ version: 1,
89
+ textFormat: 0,
90
+ },
91
+ ],
92
+ direction: "ltr",
93
+ format: "",
94
+ indent: 0,
95
+ type: "root",
96
+ version: 1,
97
+ },
98
+ comments: []
99
+ }
100
+
101
+ React.useEffect(() => {
102
+ console.log("useEffect props",initialEditorState,userObjData)
103
+ if(initialEditorState && initialEditorState.root && initialEditorState.root.children && userObjData && userObjData.userName){
104
+ setTimeout(() => {
105
+ setisValidEditorState(true)
106
+ }, 2000);
107
+ }
108
+ else{
109
+ setisValidEditorState(false)
110
+ }
111
+ },[initialEditorState,userObjData])
112
+
113
+
114
+
115
+ console.log("Iframe rendered",initialEditorState,userObjData)
116
+
117
+ return (
118
+ <div className="min-h-screen bg-gray-100 flex flex-col">
119
+ <div className="flex-1 container mx-auto px-4">
120
+ <div className="bg-white rounded-lg shadow-md p-4">
121
+ {true ? (
122
+ <Editor
123
+ initialEditorState={initialEditorState}
124
+ docId={docId}
125
+ userObj={userObjData}
126
+ CollabApiKey={"aee67aec-6fad-4e92-b780-bc9fb7f16672"}
127
+ mentionItems={mentionItems}
128
+ sendEditorDataToParent={sendEditorDataToParent}
129
+ />
130
+ ) : (
131
+ <div>Loading editor...</div>
132
+ )}
133
+ </div>
134
+ </div>
135
+ </div>
136
+ );
137
+ }
138
+
139
+ export default App;