@modusoperandi/licit 0.14.18 → 1.0.1

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 (1064) hide show
  1. package/BlockquoteInsertNewLineCommand.js +87 -0
  2. package/BlockquoteInsertNewLineCommand.js.flow +77 -0
  3. package/BlockquoteNodeSpec.js +30 -0
  4. package/BlockquoteNodeSpec.js.flow +30 -0
  5. package/BlockquoteToggleCommand.js +63 -0
  6. package/BlockquoteToggleCommand.js.flow +56 -0
  7. package/BookmarkNodeSpec.js +40 -0
  8. package/BookmarkNodeSpec.js.flow +39 -0
  9. package/BulletListNodeSpec.js +51 -0
  10. package/BulletListNodeSpec.js.flow +61 -0
  11. package/CZIProseMirror.js +78 -0
  12. package/CZIProseMirror.js.flow +90 -0
  13. package/CodeBlockCommand.js +73 -0
  14. package/CodeBlockCommand.js.flow +65 -0
  15. package/CodeBlockNodeSpec.js +26 -0
  16. package/CodeMarkSpec.js +11 -0
  17. package/CodeMarkSpec.js.flow +14 -0
  18. package/ContentPlaceholderPlugin.js +186 -0
  19. package/ContentPlaceholderPlugin.js.flow +187 -0
  20. package/CursorPlaceholderPlugin.js +119 -0
  21. package/DocLayoutCommand.js +97 -0
  22. package/DocLayoutCommand.js.flow +99 -0
  23. package/DocNodeSpec.js +67 -0
  24. package/DocNodeSpec.js.flow +64 -0
  25. package/EMMarkSpec.js +15 -0
  26. package/EMMarkSpec.js.flow +14 -0
  27. package/EditorCommands.js +111 -0
  28. package/EditorCommands.js.flow +143 -0
  29. package/EditorKeyMap.js +74 -0
  30. package/EditorKeyMap.js.flow +187 -0
  31. package/EditorMarks.js +51 -0
  32. package/EditorMarks.js.flow +71 -0
  33. package/EditorNodes.js +47 -0
  34. package/EditorNodes.js.flow +59 -0
  35. package/EditorPageLayoutPlugin.js +78 -0
  36. package/EditorPageLayoutPlugin.js.flow +67 -0
  37. package/EditorPlugins.js +6 -0
  38. package/EditorPlugins.js.flow +8 -0
  39. package/EditorSchema.js +8 -0
  40. package/EditorSchema.js.flow +12 -0
  41. package/EditorState.js +3 -0
  42. package/FontSizeMarkSpec.js +38 -0
  43. package/FontSizeMarkSpec.js.flow +49 -0
  44. package/FontTypeMarkSpec.js +63 -0
  45. package/FontTypeMarkSpec.js.flow +80 -0
  46. package/HTMLMutator.js +67 -0
  47. package/HTMLMutator.js.flow +59 -0
  48. package/HardBreakNodeSpec.js +13 -0
  49. package/HeadingNodeSpec.js +57 -0
  50. package/HistoryRedoCommand.js +49 -0
  51. package/HistoryRedoCommand.js.flow +41 -0
  52. package/HistoryUndoCommand.js +49 -0
  53. package/HistoryUndoCommand.js.flow +41 -0
  54. package/HorizontalRuleCommand.js +78 -0
  55. package/HorizontalRuleCommand.js.flow +71 -0
  56. package/HorizontalRuleNodeSpec.js +31 -0
  57. package/ImageUploadPlaceholderPlugin.js +181 -0
  58. package/ImageUploadPlaceholderPlugin.js.flow +192 -0
  59. package/LinkMarkSpec.js +34 -0
  60. package/LinkMarkSpec.js.flow +32 -0
  61. package/LinkSetURLCommand.js +111 -0
  62. package/LinkSetURLCommand.js.flow +117 -0
  63. package/LinkTooltipPlugin.js +185 -0
  64. package/LinkTooltipPlugin.js.flow +190 -0
  65. package/ListItemInsertNewLineCommand.js +87 -0
  66. package/ListItemInsertNewLineCommand.js.flow +77 -0
  67. package/ListItemMergeCommand.js +191 -0
  68. package/ListItemMergeCommand.js.flow +199 -0
  69. package/ListItemNodeSpec.js +45 -0
  70. package/ListItemNodeSpec.js.flow +52 -0
  71. package/ListSplitCommand.js +55 -0
  72. package/ListSplitCommand.js.flow +54 -0
  73. package/ListToggleCommand.js +96 -0
  74. package/ListToggleCommand.js.flow +99 -0
  75. package/MarkNames.js +16 -0
  76. package/MarksClearCommand.js +65 -0
  77. package/MarksClearCommand.js.flow +65 -0
  78. package/MathEditCommand.js +116 -0
  79. package/MathEditCommand.js.flow +120 -0
  80. package/MathNodeSpec.js +49 -0
  81. package/MathNodeSpec.js.flow +46 -0
  82. package/NodeNames.js +21 -0
  83. package/OrderedListNodeSpec.js +117 -0
  84. package/OrderedListNodeSpec.js.flow +132 -0
  85. package/ParagraphNodeSpec.js +126 -0
  86. package/ParagraphNodeSpec.js.flow +156 -0
  87. package/ParagraphSpacingCommand.js +119 -0
  88. package/ParagraphSpacingCommand.js.flow +144 -0
  89. package/PrintCommand.js +58 -0
  90. package/PrintCommand.js.flow +53 -0
  91. package/SelectionPlaceholderPlugin.js +120 -0
  92. package/SpacerMarkSpec.js +39 -0
  93. package/SpacerMarkSpec.js.flow +47 -0
  94. package/StrikeMarkSpec.js +17 -0
  95. package/StrikeMarkSpec.js.flow +21 -0
  96. package/StrongMarkSpec.js +26 -0
  97. package/StrongMarkSpec.js.flow +25 -0
  98. package/StyleView.js +29 -0
  99. package/TableBackgroundColorCommand.js +81 -0
  100. package/TableBorderColorCommand.js +81 -0
  101. package/TableCellColorCommand.js +81 -0
  102. package/TableCellColorCommand.js.flow +75 -0
  103. package/TableCellMenuPlugin.js +137 -0
  104. package/TableCellMenuPlugin.js.flow +132 -0
  105. package/TableInsertCommand.js +124 -0
  106. package/TableInsertCommand.js.flow +120 -0
  107. package/TableMergeCellsCommand.js +116 -0
  108. package/TableMergeCellsCommand.js.flow +112 -0
  109. package/TableNodesSpecs.js +78 -0
  110. package/TableNodesSpecs.js.flow +78 -0
  111. package/TablePlugins.js +7 -0
  112. package/TablePlugins.js.flow +14 -0
  113. package/TableResizePlugin.js +542 -0
  114. package/TableResizePlugin.js.flow +632 -0
  115. package/TextColorMarkSpec.js +29 -0
  116. package/TextColorMarkSpec.js.flow +35 -0
  117. package/TextHighlightMarkSpec.js +31 -0
  118. package/TextHighlightMarkSpec.js.flow +38 -0
  119. package/TextInsertTabSpaceCommand.js +98 -0
  120. package/TextInsertTabSpaceCommand.js.flow +106 -0
  121. package/TextNoWrapMarkSpec.js +11 -0
  122. package/TextNoWrapMarkSpec.js.flow +14 -0
  123. package/TextNodeSpec.js +4 -0
  124. package/TextSelectionMarkSpec.js +18 -0
  125. package/TextSelectionMarkSpec.js.flow +24 -0
  126. package/TextSubMarkSpec.js +15 -0
  127. package/TextSubMarkSpec.js.flow +20 -0
  128. package/TextSuperMarkSpec.js +15 -0
  129. package/TextSuperMarkSpec.js.flow +20 -0
  130. package/TextUnderlineMarkSpec.js +21 -0
  131. package/TextUnderlineMarkSpec.js.flow +27 -0
  132. package/Types.js +72 -0
  133. package/WebFontLoader.js +32 -0
  134. package/blockQuoteInputRule.js +25 -0
  135. package/blockQuoteInputRule.js.flow +36 -0
  136. package/bom.xml +66700 -0
  137. package/browser.js +6 -0
  138. package/buildEditorPlugins.js +49 -0
  139. package/buildEditorPlugins.js.flow +49 -0
  140. package/buildInputRules.js +73 -0
  141. package/buildInputRules.js.flow +81 -0
  142. package/client/CollabConnector.js +85 -0
  143. package/client/CollabConnector.js.flow +90 -0
  144. package/client/EditorConnection.js +321 -0
  145. package/client/EditorConnection.js.flow +323 -0
  146. package/client/Licit.js +613 -0
  147. package/client/Licit.js.flow +643 -0
  148. package/client/Licit.test.js +104 -0
  149. package/client/Licit.test.js.flow +98 -0
  150. package/client/Reporter.js +50 -0
  151. package/client/SimpleConnector.js +55 -0
  152. package/client/http.js +90 -0
  153. package/client/throttle.js +20 -0
  154. package/convertFromDOMElement.js +26 -0
  155. package/convertFromDOMElement.js.flow +36 -0
  156. package/convertFromHTML.js +9 -0
  157. package/convertFromHTML.js.flow +17 -0
  158. package/convertFromJSON.js +40 -0
  159. package/convertFromJSON.js.flow +56 -0
  160. package/convertToCSSPTValue.js +18 -0
  161. package/convertToJSON.js +4 -0
  162. package/createCommand.js +59 -0
  163. package/createCommand.js.flow +62 -0
  164. package/createEditorKeyMap.js +54 -0
  165. package/createEditorKeyMap.js.flow +94 -0
  166. package/createEmptyEditorState.js +16 -0
  167. package/createEmptyEditorState.js.flow +31 -0
  168. package/createTableResizingPlugin.js +68 -0
  169. package/findActionableCell.js +53 -0
  170. package/findActionableCell.js.flow +74 -0
  171. package/findActiveMark.js +25 -0
  172. package/hyphenize.js +14 -0
  173. package/index.d.ts +165 -0
  174. package/index.js +8 -0
  175. package/index.js.flow +10 -0
  176. package/insertTable.js +43 -0
  177. package/insertTable.js.flow +56 -0
  178. package/isEditorStateEmpty.js +28 -0
  179. package/isTableNode.js +6 -0
  180. package/joinDown.js +25 -0
  181. package/joinListNode.js +31 -0
  182. package/joinUp.js +30 -0
  183. package/keymaps.js +67 -0
  184. package/lookUpElement.js +9 -0
  185. package/nodeAt.js +9 -0
  186. package/normalizeHTML.js +63 -0
  187. package/normalizeHTML.js.flow +78 -0
  188. package/package.json +43 -33
  189. package/patchAnchorElements.js +29 -0
  190. package/patchAnchorElements.js.flow +38 -0
  191. package/patchBreakElements.js +20 -0
  192. package/patchElementInlineStyles.js +65 -0
  193. package/patchElementInlineStyles.js.flow +92 -0
  194. package/patchListElements.js +228 -0
  195. package/patchListElements.js.flow +276 -0
  196. package/patchMathElements.js +59 -0
  197. package/patchParagraphElements.js +13 -0
  198. package/patchParagraphElements.js.flow +20 -0
  199. package/patchStyleElements.js +152 -0
  200. package/patchStyleElements.js.flow +196 -0
  201. package/patchTableElements.js +86 -0
  202. package/patchTableElements.js.flow +89 -0
  203. package/rebaseDocWithSteps.js +25 -0
  204. package/sanitizeURL.js +10 -0
  205. package/splitListItem.js +170 -0
  206. package/splitListItem.js.flow +191 -0
  207. package/styles.css +19 -0
  208. package/styles0.css +29 -0
  209. package/toClosestFontPtSize.js +17 -0
  210. package/toClosestFontPtSize.js.flow +22 -0
  211. package/toSafeHTMLDocument.js +7 -0
  212. package/toggleBlockquote.js +75 -0
  213. package/toggleBlockquote.js.flow +108 -0
  214. package/toggleCodeBlock.js +75 -0
  215. package/ui/AlertInfo.js +69 -0
  216. package/ui/BookmarkNodeView.js +104 -0
  217. package/ui/BookmarkNodeView.js.flow +66 -0
  218. package/ui/CommandButton.js +76 -0
  219. package/ui/CommandMenu.js +94 -0
  220. package/ui/CommandMenu.js.flow +75 -0
  221. package/ui/CommandMenuButton.js +132 -0
  222. package/ui/CommandMenuButton.js.flow +131 -0
  223. package/ui/CustomEditorView.js +47 -0
  224. package/ui/CustomEditorView.js.flow +28 -0
  225. package/ui/CustomMenu.js +34 -0
  226. package/ui/CustomMenuItem.js +65 -0
  227. package/ui/CustomNodeView.js +237 -0
  228. package/ui/CustomNodeView.js.flow +200 -0
  229. package/ui/CustomRadioButton.js +78 -0
  230. package/ui/CustomRadioButton.js.flow +65 -0
  231. package/ui/DocLayoutEditor.js +147 -0
  232. package/ui/DocLayoutEditor.js.flow +146 -0
  233. package/ui/Editor.js +291 -0
  234. package/ui/Editor.js.flow +288 -0
  235. package/ui/EditorFrameset.js +96 -0
  236. package/ui/EditorToolbar.js +214 -0
  237. package/ui/EditorToolbar.js.flow +218 -0
  238. package/ui/EditorToolbarConfig.js +141 -0
  239. package/ui/EditorToolbarConfig.js.flow +164 -0
  240. package/ui/FontSizeCommandMenuButton.js +67 -0
  241. package/ui/FontSizeCommandMenuButton.js.flow +66 -0
  242. package/ui/FontTypeCommandMenuButton.js +65 -0
  243. package/ui/FontTypeCommandMenuButton.js.flow +61 -0
  244. package/ui/Frag.js +32 -0
  245. package/ui/Icon.js +145 -0
  246. package/ui/Icon.js.flow +89 -0
  247. package/ui/ImageInlineEditor.js +87 -0
  248. package/ui/KeyCodes.js +9 -0
  249. package/ui/LinkTooltip.js +113 -0
  250. package/ui/LinkTooltip.js.flow +85 -0
  251. package/ui/LinkURLEditor.js +114 -0
  252. package/ui/LinkURLEditor.js.flow +117 -0
  253. package/ui/ListItemNodeView.js +92 -0
  254. package/ui/ListItemNodeView.js.flow +98 -0
  255. package/ui/ListTypeButton.js +136 -0
  256. package/ui/ListTypeButton.js.flow +131 -0
  257. package/ui/ListTypeCommandButton.js +91 -0
  258. package/ui/ListTypeCommandButton.js.flow +85 -0
  259. package/ui/ListTypeMenu.js +85 -0
  260. package/ui/ListTypeMenu.js.flow +70 -0
  261. package/ui/LoadingIndicator.js +42 -0
  262. package/ui/MathEditor.js +92 -0
  263. package/ui/MathEditor.js.flow +78 -0
  264. package/ui/MathInlineEditor.js +123 -0
  265. package/ui/MathInlineEditor.js.flow +102 -0
  266. package/ui/MathNodeView.js +217 -0
  267. package/ui/MathNodeView.js.flow +186 -0
  268. package/ui/PasteMenu.js +74 -0
  269. package/ui/ResizeObserver.js +89 -0
  270. package/ui/RichTextEditor.js +125 -0
  271. package/ui/RichTextEditor.js.flow +133 -0
  272. package/ui/SelectionObserver.js +121 -0
  273. package/ui/TableCellMenu.js +64 -0
  274. package/ui/TableCellMenu.js.flow +51 -0
  275. package/ui/TableGridSizeEditor.js +212 -0
  276. package/ui/TableGridSizeEditor.js.flow +184 -0
  277. package/ui/TableNodeView.js +51 -0
  278. package/ui/bindScrollHandler.js +33 -0
  279. package/ui/canUseCSSFont.js +33 -0
  280. package/ui/czi-link-tooltip.css +71 -0
  281. package/ui/czi-table.css +87 -0
  282. package/ui/czi-vars.css +2 -0
  283. package/ui/findActiveFontSize.js +53 -0
  284. package/ui/findActiveFontSize.js.flow +58 -0
  285. package/ui/findActiveFontType.js +32 -0
  286. package/ui/findActiveFontType.js.flow +38 -0
  287. package/ui/handleEditorDrop.js +24 -0
  288. package/ui/handleEditorDrop.js.flow +28 -0
  289. package/ui/handleEditorKeyDown.js +20 -0
  290. package/ui/handleEditorKeyDown.js.flow +39 -0
  291. package/ui/handleEditorPaste.js +22 -0
  292. package/ui/handleEditorPaste.js.flow +33 -0
  293. package/ui/htmlElementToRect.js +17 -0
  294. package/ui/injectStyleSheet.js +37 -0
  295. package/ui/isElementFullyVisible.js +22 -0
  296. package/ui/isOffline.js +6 -0
  297. package/ui/isReactClass.js +10 -0
  298. package/ui/mathquill-editor/MathQuillEditor.js +187 -0
  299. package/ui/mathquill-editor/MathQuillEditor.js.flow +159 -0
  300. package/ui/mathquill-editor/MathQuillEditorSymbols.js +416 -0
  301. package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +69 -0
  302. package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js.flow +50 -0
  303. package/ui/mathquill-editor/mathquill-import-kludge.js +21 -0
  304. package/ui/mathquill-editor/mathquill-import-kludge.js.flow +24 -0
  305. package/ui/renderLaTeXAsHTML.js +55 -0
  306. package/ui/renderLaTeXAsHTML.js.flow +46 -0
  307. package/ui/resolveImage.js +115 -0
  308. package/ui/toCSSColor.js +42 -0
  309. package/ui/toCSSLineSpacing.js +48 -0
  310. package/ui/toHexColor.js +22 -0
  311. package/ui/uuid.js +6 -0
  312. package/uuid.js +6 -0
  313. package/.babelrc +0 -50
  314. package/.dockerignore +0 -4
  315. package/.eslintignore +0 -3
  316. package/.eslintrc.js +0 -87
  317. package/.flowconfig +0 -37
  318. package/.gitattribute +0 -1
  319. package/.github/dependabot.yml +0 -17
  320. package/.github/workflows/build.yml +0 -29
  321. package/.github/workflows/lint.yml +0 -30
  322. package/.prettierignore +0 -6
  323. package/.prettierrc +0 -5
  324. package/.stylelintignore +0 -2
  325. package/.stylelintrc.json +0 -14
  326. package/.travis.yml +0 -18
  327. package/CODEOWNERS +0 -40
  328. package/LICENSE +0 -22
  329. package/README.md +0 -304
  330. package/_config.yml +0 -1
  331. package/babel.config.json +0 -50
  332. package/build_collab_server.py +0 -7
  333. package/build_image_server.py +0 -7
  334. package/dist/BlockquoteInsertNewLineCommand.js +0 -65
  335. package/dist/BlockquoteInsertNewLineCommand.js.flow +0 -55
  336. package/dist/BlockquoteNodeSpec.js +0 -37
  337. package/dist/BlockquoteNodeSpec.js.flow +0 -30
  338. package/dist/BlockquoteToggleCommand.js +0 -41
  339. package/dist/BlockquoteToggleCommand.js.flow +0 -34
  340. package/dist/BookmarkNodeSpec.js +0 -50
  341. package/dist/BookmarkNodeSpec.js.flow +0 -39
  342. package/dist/BulletListNodeSpec.js +0 -59
  343. package/dist/BulletListNodeSpec.js.flow +0 -61
  344. package/dist/CZIProseMirror.js +0 -91
  345. package/dist/CZIProseMirror.js.flow +0 -90
  346. package/dist/CodeBlockCommand.js +0 -51
  347. package/dist/CodeBlockCommand.js.flow +0 -43
  348. package/dist/CodeBlockNodeSpec.js +0 -33
  349. package/dist/CodeMarkSpec.js +0 -18
  350. package/dist/CodeMarkSpec.js.flow +0 -14
  351. package/dist/ContentPlaceholderPlugin.js +0 -164
  352. package/dist/ContentPlaceholderPlugin.js.flow +0 -187
  353. package/dist/CursorPlaceholderPlugin.js +0 -114
  354. package/dist/DocLayoutCommand.js +0 -88
  355. package/dist/DocLayoutCommand.js.flow +0 -94
  356. package/dist/DocNodeSpec.js +0 -79
  357. package/dist/DocNodeSpec.js.flow +0 -64
  358. package/dist/EMMarkSpec.js +0 -22
  359. package/dist/EMMarkSpec.js.flow +0 -14
  360. package/dist/EditorCommands.js +0 -175
  361. package/dist/EditorCommands.js.flow +0 -124
  362. package/dist/EditorKeyMap.js +0 -112
  363. package/dist/EditorKeyMap.js.flow +0 -187
  364. package/dist/EditorMarks.js +0 -80
  365. package/dist/EditorMarks.js.flow +0 -71
  366. package/dist/EditorNodes.js +0 -68
  367. package/dist/EditorNodes.js.flow +0 -59
  368. package/dist/EditorPageLayoutPlugin.js +0 -72
  369. package/dist/EditorPageLayoutPlugin.js.flow +0 -67
  370. package/dist/EditorPlugins.js +0 -13
  371. package/dist/EditorPlugins.js.flow +0 -8
  372. package/dist/EditorSchema.js +0 -16
  373. package/dist/EditorSchema.js.flow +0 -12
  374. package/dist/EditorState.js +0 -10
  375. package/dist/FontSizeMarkSpec.js +0 -47
  376. package/dist/FontSizeMarkSpec.js.flow +0 -49
  377. package/dist/FontTypeMarkSpec.js +0 -74
  378. package/dist/FontTypeMarkSpec.js.flow +0 -80
  379. package/dist/HTMLMutator.js +0 -58
  380. package/dist/HTMLMutator.js.flow +0 -59
  381. package/dist/HardBreakNodeSpec.js +0 -20
  382. package/dist/HeadingNodeSpec.js +0 -64
  383. package/dist/HistoryRedoCommand.js +0 -24
  384. package/dist/HistoryRedoCommand.js.flow +0 -20
  385. package/dist/HistoryUndoCommand.js +0 -24
  386. package/dist/HistoryUndoCommand.js.flow +0 -20
  387. package/dist/HorizontalRuleCommand.js +0 -58
  388. package/dist/HorizontalRuleCommand.js.flow +0 -49
  389. package/dist/HorizontalRuleNodeSpec.js +0 -38
  390. package/dist/ImageUploadPlaceholderPlugin.js +0 -176
  391. package/dist/ImageUploadPlaceholderPlugin.js.flow +0 -192
  392. package/dist/LinkMarkSpec.js +0 -41
  393. package/dist/LinkMarkSpec.js.flow +0 -32
  394. package/dist/LinkSetURLCommand.js +0 -100
  395. package/dist/LinkSetURLCommand.js.flow +0 -103
  396. package/dist/LinkTooltipPlugin.js +0 -180
  397. package/dist/LinkTooltipPlugin.js.flow +0 -192
  398. package/dist/ListItemInsertNewLineCommand.js +0 -65
  399. package/dist/ListItemInsertNewLineCommand.js.flow +0 -55
  400. package/dist/ListItemMergeCommand.js +0 -183
  401. package/dist/ListItemMergeCommand.js.flow +0 -177
  402. package/dist/ListItemNodeSpec.js +0 -57
  403. package/dist/ListItemNodeSpec.js.flow +0 -52
  404. package/dist/ListSplitCommand.js +0 -36
  405. package/dist/ListSplitCommand.js.flow +0 -32
  406. package/dist/ListToggleCommand.js +0 -81
  407. package/dist/ListToggleCommand.js.flow +0 -77
  408. package/dist/MarkNames.js +0 -37
  409. package/dist/MarksClearCommand.js +0 -42
  410. package/dist/MarksClearCommand.js.flow +0 -42
  411. package/dist/MathEditCommand.js +0 -108
  412. package/dist/MathEditCommand.js.flow +0 -110
  413. package/dist/MathNodeSpec.js +0 -57
  414. package/dist/MathNodeSpec.js.flow +0 -46
  415. package/dist/NodeNames.js +0 -47
  416. package/dist/OrderedListNodeSpec.js +0 -125
  417. package/dist/OrderedListNodeSpec.js.flow +0 -132
  418. package/dist/ParagraphNodeSpec.js +0 -151
  419. package/dist/ParagraphNodeSpec.js.flow +0 -156
  420. package/dist/ParagraphSpacingCommand.js +0 -106
  421. package/dist/ParagraphSpacingCommand.js.flow +0 -121
  422. package/dist/PrintCommand.js +0 -33
  423. package/dist/PrintCommand.js.flow +0 -31
  424. package/dist/SelectionPlaceholderPlugin.js +0 -111
  425. package/dist/SpacerMarkSpec.js +0 -50
  426. package/dist/SpacerMarkSpec.js.flow +0 -47
  427. package/dist/StrikeMarkSpec.js +0 -24
  428. package/dist/StrikeMarkSpec.js.flow +0 -21
  429. package/dist/StrongMarkSpec.js +0 -29
  430. package/dist/StrongMarkSpec.js.flow +0 -25
  431. package/dist/StyleView.js +0 -23
  432. package/dist/TableBackgroundColorCommand.js +0 -65
  433. package/dist/TableBorderColorCommand.js +0 -65
  434. package/dist/TableCellColorCommand.js +0 -62
  435. package/dist/TableCellColorCommand.js.flow +0 -71
  436. package/dist/TableCellMenuPlugin.js +0 -129
  437. package/dist/TableCellMenuPlugin.js.flow +0 -132
  438. package/dist/TableInsertCommand.js +0 -117
  439. package/dist/TableInsertCommand.js.flow +0 -112
  440. package/dist/TableMergeCellsCommand.js +0 -97
  441. package/dist/TableMergeCellsCommand.js.flow +0 -90
  442. package/dist/TableNodesSpecs.js +0 -91
  443. package/dist/TableNodesSpecs.js.flow +0 -78
  444. package/dist/TablePlugins.js +0 -14
  445. package/dist/TablePlugins.js.flow +0 -14
  446. package/dist/TableResizePlugin.js +0 -543
  447. package/dist/TableResizePlugin.js.flow +0 -632
  448. package/dist/TextColorMarkSpec.js +0 -39
  449. package/dist/TextColorMarkSpec.js.flow +0 -35
  450. package/dist/TextHighlightMarkSpec.js +0 -42
  451. package/dist/TextHighlightMarkSpec.js.flow +0 -38
  452. package/dist/TextInsertTabSpaceCommand.js +0 -78
  453. package/dist/TextInsertTabSpaceCommand.js.flow +0 -83
  454. package/dist/TextNoWrapMarkSpec.js +0 -18
  455. package/dist/TextNoWrapMarkSpec.js.flow +0 -14
  456. package/dist/TextNodeSpec.js +0 -11
  457. package/dist/TextSelectionMarkSpec.js +0 -25
  458. package/dist/TextSelectionMarkSpec.js.flow +0 -24
  459. package/dist/TextSubMarkSpec.js +0 -22
  460. package/dist/TextSubMarkSpec.js.flow +0 -20
  461. package/dist/TextSuperMarkSpec.js +0 -22
  462. package/dist/TextSuperMarkSpec.js.flow +0 -20
  463. package/dist/TextUnderlineMarkSpec.js +0 -28
  464. package/dist/TextUnderlineMarkSpec.js.flow +0 -27
  465. package/dist/Types.js +0 -81
  466. package/dist/WebFontLoader.js +0 -28
  467. package/dist/blockQuoteInputRule.js +0 -35
  468. package/dist/blockQuoteInputRule.js.flow +0 -36
  469. package/dist/bom.xml +0 -68332
  470. package/dist/browser.js +0 -11
  471. package/dist/buildEditorPlugins.js +0 -44
  472. package/dist/buildEditorPlugins.js.flow +0 -49
  473. package/dist/buildInputRules.js +0 -72
  474. package/dist/buildInputRules.js.flow +0 -81
  475. package/dist/client/CollabConnector.js +0 -80
  476. package/dist/client/CollabConnector.js.flow +0 -90
  477. package/dist/client/EditorConnection.js +0 -290
  478. package/dist/client/EditorConnection.js.flow +0 -323
  479. package/dist/client/Licit.js +0 -621
  480. package/dist/client/Licit.js.flow +0 -708
  481. package/dist/client/Licit.test.js +0 -98
  482. package/dist/client/Licit.test.js.flow +0 -98
  483. package/dist/client/Reporter.js +0 -36
  484. package/dist/client/SimpleConnector.js +0 -59
  485. package/dist/client/http.js +0 -101
  486. package/dist/client/throttle.js +0 -26
  487. package/dist/convertFromDOMElement.js +0 -31
  488. package/dist/convertFromDOMElement.js.flow +0 -36
  489. package/dist/convertFromHTML.js +0 -15
  490. package/dist/convertFromHTML.js.flow +0 -17
  491. package/dist/convertFromJSON.js +0 -45
  492. package/dist/convertFromJSON.js.flow +0 -56
  493. package/dist/convertToCSSPTValue.js +0 -27
  494. package/dist/convertToJSON.js +0 -10
  495. package/dist/createCommand.js +0 -33
  496. package/dist/createCommand.js.flow +0 -40
  497. package/dist/createEditorKeyMap.js +0 -80
  498. package/dist/createEditorKeyMap.js.flow +0 -94
  499. package/dist/createEmptyEditorState.js +0 -24
  500. package/dist/createEmptyEditorState.js.flow +0 -31
  501. package/dist/createTableResizingPlugin.js +0 -79
  502. package/dist/findActionableCell.js +0 -65
  503. package/dist/findActionableCell.js.flow +0 -74
  504. package/dist/findActiveMark.js +0 -29
  505. package/dist/fonts/aclonica/Aclonica.woff2 +0 -0
  506. package/dist/fonts/acme/Acme.woff2 +0 -0
  507. package/dist/fonts/alegreya/Alegreya-Regular-C.woff2 +0 -0
  508. package/dist/fonts/alegreya/Alegreya-Regular-CE.woff2 +0 -0
  509. package/dist/fonts/alegreya/Alegreya-Regular-G.woff2 +0 -0
  510. package/dist/fonts/alegreya/Alegreya-Regular-GE.woff2 +0 -0
  511. package/dist/fonts/alegreya/Alegreya-Regular-L.woff2 +0 -0
  512. package/dist/fonts/alegreya/Alegreya-Regular-LE.woff2 +0 -0
  513. package/dist/fonts/alegreya/Alegreya-Regular-V.woff2 +0 -0
  514. package/dist/fonts/arial-black/ArialBlack-G.woff2 +0 -0
  515. package/dist/fonts/arial-black/ArialBlack-L.woff2 +0 -0
  516. package/dist/fonts/arial-black/ArialBlack-LE.woff2 +0 -0
  517. package/dist/fonts/courier-new/CourierNew-L.woff2 +0 -0
  518. package/dist/fonts/georgia/Georgia-C.woff2 +0 -0
  519. package/dist/fonts/georgia/Georgia-CE.woff2 +0 -0
  520. package/dist/fonts/georgia/Georgia-G.woff2 +0 -0
  521. package/dist/fonts/georgia/Georgia-GE.woff2 +0 -0
  522. package/dist/fonts/georgia/Georgia-L.woff2 +0 -0
  523. package/dist/fonts/georgia/Georgia-LE.woff2 +0 -0
  524. package/dist/fonts/material-icons/MaterialIcons-Regular.ttf +0 -0
  525. package/dist/fonts/tahoma/Tahoma-C.woff2 +0 -0
  526. package/dist/fonts/tahoma/Tahoma-CE.woff2 +0 -0
  527. package/dist/fonts/tahoma/Tahoma-G.woff2 +0 -0
  528. package/dist/fonts/tahoma/Tahoma-GE.woff2 +0 -0
  529. package/dist/fonts/tahoma/Tahoma-L.woff2 +0 -0
  530. package/dist/fonts/tahoma/Tahoma-LE.woff2 +0 -0
  531. package/dist/fonts/times/Times-L.woff2 +0 -0
  532. package/dist/fonts/times/Times-LE.woff2 +0 -0
  533. package/dist/fonts/times-new-roman/TimesNewRoman-C.woff2 +0 -0
  534. package/dist/fonts/times-new-roman/TimesNewRoman-CE.woff2 +0 -0
  535. package/dist/fonts/times-new-roman/TimesNewRoman-G.woff2 +0 -0
  536. package/dist/fonts/times-new-roman/TimesNewRoman-GE.woff2 +0 -0
  537. package/dist/fonts/times-new-roman/TimesNewRoman-L.woff2 +0 -0
  538. package/dist/fonts/times-new-roman/TimesNewRoman-LE.woff2 +0 -0
  539. package/dist/fonts/times-new-roman/TimesNewRoman-V.woff2 +0 -0
  540. package/dist/fonts/verdana/Verdana-C.woff2 +0 -0
  541. package/dist/fonts/verdana/Verdana-CE.woff2 +0 -0
  542. package/dist/fonts/verdana/Verdana-G.woff2 +0 -0
  543. package/dist/fonts/verdana/Verdana-GE.woff2 +0 -0
  544. package/dist/fonts/verdana/Verdana-L.woff2 +0 -0
  545. package/dist/fonts/verdana/Verdana-LE.woff2 +0 -0
  546. package/dist/fonts/verdana/Verdana-V.woff2 +0 -0
  547. package/dist/hyphenize.js +0 -20
  548. package/dist/index.js +0 -80
  549. package/dist/index.js.flow +0 -10
  550. package/dist/insertTable.js +0 -50
  551. package/dist/insertTable.js.flow +0 -56
  552. package/dist/isEditorStateEmpty.js +0 -38
  553. package/dist/isTableNode.js +0 -12
  554. package/dist/joinDown.js +0 -28
  555. package/dist/joinListNode.js +0 -38
  556. package/dist/joinUp.js +0 -33
  557. package/dist/keymaps.js +0 -106
  558. package/dist/lookUpElement.js +0 -15
  559. package/dist/nodeAt.js +0 -15
  560. package/dist/normalizeHTML.js +0 -70
  561. package/dist/normalizeHTML.js.flow +0 -78
  562. package/dist/patchAnchorElements.js +0 -37
  563. package/dist/patchAnchorElements.js.flow +0 -38
  564. package/dist/patchBreakElements.js +0 -28
  565. package/dist/patchElementInlineStyles.js +0 -70
  566. package/dist/patchElementInlineStyles.js.flow +0 -92
  567. package/dist/patchListElements.js +0 -248
  568. package/dist/patchListElements.js.flow +0 -276
  569. package/dist/patchMathElements.js +0 -69
  570. package/dist/patchParagraphElements.js +0 -21
  571. package/dist/patchParagraphElements.js.flow +0 -20
  572. package/dist/patchStyleElements.js +0 -162
  573. package/dist/patchStyleElements.js.flow +0 -194
  574. package/dist/patchTableElements.js +0 -98
  575. package/dist/patchTableElements.js.flow +0 -89
  576. package/dist/rebaseDocWithSteps.js +0 -32
  577. package/dist/sanitizeURL.js +0 -16
  578. package/dist/splitListItem.js +0 -180
  579. package/dist/splitListItem.js.flow +0 -191
  580. package/dist/styles.css +0 -19
  581. package/dist/styles0.css +0 -29
  582. package/dist/toClosestFontPtSize.js +0 -25
  583. package/dist/toClosestFontPtSize.js.flow +0 -22
  584. package/dist/toSafeHTMLDocument.js +0 -13
  585. package/dist/toggleBlockquote.js +0 -86
  586. package/dist/toggleBlockquote.js.flow +0 -91
  587. package/dist/toggleCodeBlock.js +0 -89
  588. package/dist/ui/AlertInfo.js +0 -59
  589. package/dist/ui/BookmarkNodeView.js +0 -77
  590. package/dist/ui/BookmarkNodeView.js.flow +0 -66
  591. package/dist/ui/CommandButton.js +0 -65
  592. package/dist/ui/CommandMenu.js +0 -83
  593. package/dist/ui/CommandMenu.js.flow +0 -75
  594. package/dist/ui/CommandMenuButton.js +0 -120
  595. package/dist/ui/CommandMenuButton.js.flow +0 -131
  596. package/dist/ui/CustomEditorView.js +0 -34
  597. package/dist/ui/CustomEditorView.js.flow +0 -28
  598. package/dist/ui/CustomMenu.js +0 -23
  599. package/dist/ui/CustomMenuItem.js +0 -43
  600. package/dist/ui/CustomNodeView.js +0 -193
  601. package/dist/ui/CustomNodeView.js.flow +0 -200
  602. package/dist/ui/CustomRadioButton.js +0 -67
  603. package/dist/ui/CustomRadioButton.js.flow +0 -65
  604. package/dist/ui/DocLayoutEditor.js +0 -142
  605. package/dist/ui/DocLayoutEditor.js.flow +0 -146
  606. package/dist/ui/Editor.js +0 -289
  607. package/dist/ui/Editor.js.flow +0 -288
  608. package/dist/ui/EditorFrameset.js +0 -86
  609. package/dist/ui/EditorToolbar.js +0 -206
  610. package/dist/ui/EditorToolbar.js.flow +0 -211
  611. package/dist/ui/EditorToolbarConfig.js +0 -148
  612. package/dist/ui/EditorToolbarConfig.js.flow +0 -164
  613. package/dist/ui/FontSizeCommandMenuButton.js +0 -57
  614. package/dist/ui/FontSizeCommandMenuButton.js.flow +0 -66
  615. package/dist/ui/FontTypeCommandMenuButton.js +0 -55
  616. package/dist/ui/FontTypeCommandMenuButton.js.flow +0 -49
  617. package/dist/ui/Frag.js +0 -19
  618. package/dist/ui/Icon.js +0 -104
  619. package/dist/ui/Icon.js.flow +0 -89
  620. package/dist/ui/ImageInlineEditor.js +0 -76
  621. package/dist/ui/KeyCodes.js +0 -23
  622. package/dist/ui/LinkTooltip.js +0 -92
  623. package/dist/ui/LinkTooltip.js.flow +0 -85
  624. package/dist/ui/LinkURLEditor.js +0 -107
  625. package/dist/ui/LinkURLEditor.js.flow +0 -111
  626. package/dist/ui/ListItemNodeView.js +0 -91
  627. package/dist/ui/ListItemNodeView.js.flow +0 -98
  628. package/dist/ui/ListTypeButton.js +0 -123
  629. package/dist/ui/ListTypeButton.js.flow +0 -131
  630. package/dist/ui/ListTypeCommandButton.js +0 -81
  631. package/dist/ui/ListTypeCommandButton.js.flow +0 -85
  632. package/dist/ui/ListTypeMenu.js +0 -72
  633. package/dist/ui/ListTypeMenu.js.flow +0 -70
  634. package/dist/ui/LoadingIndicator.js +0 -28
  635. package/dist/ui/MathEditor.js +0 -80
  636. package/dist/ui/MathEditor.js.flow +0 -78
  637. package/dist/ui/MathInlineEditor.js +0 -111
  638. package/dist/ui/MathInlineEditor.js.flow +0 -102
  639. package/dist/ui/MathNodeView.js +0 -190
  640. package/dist/ui/MathNodeView.js.flow +0 -175
  641. package/dist/ui/PasteMenu.js +0 -56
  642. package/dist/ui/ResizeObserver.js +0 -94
  643. package/dist/ui/RichTextEditor.js +0 -121
  644. package/dist/ui/RichTextEditor.js.flow +0 -133
  645. package/dist/ui/SelectionObserver.js +0 -116
  646. package/dist/ui/TableCellMenu.js +0 -53
  647. package/dist/ui/TableCellMenu.js.flow +0 -51
  648. package/dist/ui/TableGridSizeEditor.js +0 -191
  649. package/dist/ui/TableGridSizeEditor.js.flow +0 -184
  650. package/dist/ui/TableNodeView.js +0 -31
  651. package/dist/ui/bindScrollHandler.js +0 -39
  652. package/dist/ui/canUseCSSFont.js +0 -37
  653. package/dist/ui/czi-link-tooltip.css +0 -71
  654. package/dist/ui/czi-table.css +0 -86
  655. package/dist/ui/czi-vars.css +0 -2
  656. package/dist/ui/findActiveFontSize.js +0 -61
  657. package/dist/ui/findActiveFontSize.js.flow +0 -58
  658. package/dist/ui/findActiveFontType.js +0 -42
  659. package/dist/ui/findActiveFontType.js.flow +0 -38
  660. package/dist/ui/handleEditorDrop.js +0 -33
  661. package/dist/ui/handleEditorDrop.js.flow +0 -28
  662. package/dist/ui/handleEditorKeyDown.js +0 -29
  663. package/dist/ui/handleEditorKeyDown.js.flow +0 -39
  664. package/dist/ui/handleEditorPaste.js +0 -30
  665. package/dist/ui/handleEditorPaste.js.flow +0 -33
  666. package/dist/ui/htmlElementToRect.js +0 -25
  667. package/dist/ui/injectStyleSheet.js +0 -46
  668. package/dist/ui/isElementFullyVisible.js +0 -29
  669. package/dist/ui/isOffline.js +0 -12
  670. package/dist/ui/isReactClass.js +0 -16
  671. package/dist/ui/mathquill-editor/MathQuillEditor.js +0 -148
  672. package/dist/ui/mathquill-editor/MathQuillEditor.js.flow +0 -159
  673. package/dist/ui/mathquill-editor/MathQuillEditorSymbols.js +0 -488
  674. package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +0 -60
  675. package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js.flow +0 -48
  676. package/dist/ui/mathquill-editor/mathquill-import-kludge.js +0 -30
  677. package/dist/ui/mathquill-editor/mathquill-import-kludge.js.flow +0 -24
  678. package/dist/ui/renderLaTeXAsHTML.js +0 -45
  679. package/dist/ui/renderLaTeXAsHTML.js.flow +0 -46
  680. package/dist/ui/resolveImage.js +0 -125
  681. package/dist/ui/toCSSColor.js +0 -52
  682. package/dist/ui/toCSSLineSpacing.js +0 -59
  683. package/dist/ui/toHexColor.js +0 -29
  684. package/dist/ui/uuid.js +0 -12
  685. package/dist/uuid.js +0 -12
  686. package/flow-typed/@modusoperandilicit-customstyles.js +0 -5
  687. package/flow-typed/@modusoperandilicit-doc-attrs-step.js +0 -5
  688. package/flow-typed/@modusoperandilicit-ui-commands.js +0 -5
  689. package/flow-typed/create-emotion.js +0 -5
  690. package/flow-typed/docs-editor.js +0 -3
  691. package/flow-typed/draft-convert.js +0 -3
  692. package/flow-typed/draft-js.js +0 -3
  693. package/flow-typed/flatted.js +0 -5
  694. package/flow-typed/jquery.js +0 -5
  695. package/flow-typed/katex.js +0 -7
  696. package/flow-typed/mathquill.js +0 -5
  697. package/flow-typed/prosemirror-collab.js +0 -5
  698. package/flow-typed/prosemirror-commands.js +0 -5
  699. package/flow-typed/prosemirror-dev-tools.js +0 -5
  700. package/flow-typed/prosemirror-dropcursor.js +0 -5
  701. package/flow-typed/prosemirror-gapcursor.js +0 -5
  702. package/flow-typed/prosemirror-history.js +0 -5
  703. package/flow-typed/prosemirror-inputrules.js +0 -5
  704. package/flow-typed/prosemirror-keymap.js +0 -5
  705. package/flow-typed/prosemirror-model.js +0 -5
  706. package/flow-typed/prosemirror-state.js +0 -5
  707. package/flow-typed/prosemirror-tables.js +0 -5
  708. package/flow-typed/prosemirror-transform.js +0 -5
  709. package/flow-typed/prosemirror-utils.js +0 -5
  710. package/flow-typed/prosemirror-view.js +0 -5
  711. package/flow-typed/resize-observer-polyfill.js +0 -5
  712. package/flow-typed/uuid.js +0 -5
  713. package/jest.config.js +0 -207
  714. package/jest.setup.js +0 -5
  715. package/licit/client/CustomLicitRuntime.js +0 -298
  716. package/licit/client/CustomStyleRuntime.js +0 -136
  717. package/licit/client/index.js +0 -367
  718. package/licit/index.html +0 -11
  719. package/licit/server/collab/instance.js +0 -236
  720. package/licit/server/collab/route.js +0 -69
  721. package/licit/server/collab/server.js +0 -317
  722. package/licit/server/collab/start.js +0 -13
  723. package/licit/server/image/start.js +0 -58
  724. package/lint.sh +0 -4
  725. package/run_collab_server.py +0 -21
  726. package/run_image_server.py +0 -20
  727. package/run_web_server.py +0 -25
  728. package/scripts/build_bin.js +0 -10
  729. package/scripts/build_bin.py +0 -103
  730. package/scripts/ci_check_dist.sh +0 -14
  731. package/scripts/env.js +0 -6
  732. package/scripts/webserver.js +0 -35
  733. package/sonar-project.properties +0 -12
  734. package/src/BlockquoteInsertNewLineCommand.js +0 -55
  735. package/src/BlockquoteNodeSpec.js +0 -30
  736. package/src/BlockquoteToggleCommand.js +0 -34
  737. package/src/BookmarkNodeSpec.js +0 -39
  738. package/src/BulletListNodeSpec.js +0 -61
  739. package/src/CZIProseMirror.js +0 -90
  740. package/src/CodeBlockCommand.js +0 -43
  741. package/src/CodeBlockNodeSpec.js +0 -24
  742. package/src/CodeMarkSpec.js +0 -14
  743. package/src/ContentPlaceholderPlugin.js +0 -187
  744. package/src/CursorPlaceholderPlugin.js +0 -115
  745. package/src/DocLayoutCommand.js +0 -94
  746. package/src/DocNodeSpec.js +0 -64
  747. package/src/EMMarkSpec.js +0 -14
  748. package/src/EditorCommands.js +0 -124
  749. package/src/EditorKeyMap.js +0 -187
  750. package/src/EditorMarks.js +0 -71
  751. package/src/EditorNodes.js +0 -59
  752. package/src/EditorPageLayoutPlugin.js +0 -67
  753. package/src/EditorPlugins.js +0 -8
  754. package/src/EditorSchema.js +0 -12
  755. package/src/EditorState.js +0 -7
  756. package/src/FontSizeMarkSpec.js +0 -49
  757. package/src/FontTypeMarkSpec.js +0 -80
  758. package/src/HTMLMutator.js +0 -59
  759. package/src/HardBreakNodeSpec.js +0 -15
  760. package/src/HeadingNodeSpec.js +0 -52
  761. package/src/HistoryRedoCommand.js +0 -20
  762. package/src/HistoryUndoCommand.js +0 -20
  763. package/src/HorizontalRuleCommand.js +0 -49
  764. package/src/HorizontalRuleNodeSpec.js +0 -39
  765. package/src/ImageUploadPlaceholderPlugin.js +0 -192
  766. package/src/LinkMarkSpec.js +0 -32
  767. package/src/LinkSetURLCommand.js +0 -103
  768. package/src/LinkTooltipPlugin.js +0 -192
  769. package/src/ListItemInsertNewLineCommand.js +0 -55
  770. package/src/ListItemMergeCommand.js +0 -177
  771. package/src/ListItemNodeSpec.js +0 -52
  772. package/src/ListSplitCommand.js +0 -32
  773. package/src/ListToggleCommand.js +0 -77
  774. package/src/MarkNames.js +0 -18
  775. package/src/MarksClearCommand.js +0 -42
  776. package/src/MathEditCommand.js +0 -110
  777. package/src/MathNodeSpec.js +0 -46
  778. package/src/NodeNames.js +0 -23
  779. package/src/OrderedListNodeSpec.js +0 -132
  780. package/src/ParagraphNodeSpec.js +0 -156
  781. package/src/ParagraphSpacingCommand.js +0 -121
  782. package/src/PrintCommand.js +0 -31
  783. package/src/SelectionPlaceholderPlugin.js +0 -131
  784. package/src/SpacerMarkSpec.js +0 -47
  785. package/src/StrikeMarkSpec.js +0 -21
  786. package/src/StrongMarkSpec.js +0 -25
  787. package/src/StyleView.js +0 -19
  788. package/src/TableBackgroundColorCommand.js +0 -75
  789. package/src/TableBorderColorCommand.js +0 -75
  790. package/src/TableCellColorCommand.js +0 -71
  791. package/src/TableCellMenuPlugin.js +0 -132
  792. package/src/TableInsertCommand.js +0 -112
  793. package/src/TableMergeCellsCommand.js +0 -90
  794. package/src/TableNodesSpecs.js +0 -78
  795. package/src/TablePlugins.js +0 -14
  796. package/src/TableResizePlugin.js +0 -632
  797. package/src/TextColorMarkSpec.js +0 -35
  798. package/src/TextHighlightMarkSpec.js +0 -38
  799. package/src/TextInsertTabSpaceCommand.js +0 -83
  800. package/src/TextNoWrapMarkSpec.js +0 -14
  801. package/src/TextNodeSpec.js +0 -7
  802. package/src/TextSelectionMarkSpec.js +0 -24
  803. package/src/TextSubMarkSpec.js +0 -20
  804. package/src/TextSuperMarkSpec.js +0 -20
  805. package/src/TextUnderlineMarkSpec.js +0 -27
  806. package/src/Types.js +0 -75
  807. package/src/WebFontLoader.js +0 -22
  808. package/src/blockQuoteInputRule.js +0 -36
  809. package/src/browser.js +0 -7
  810. package/src/buildEditorPlugins.js +0 -49
  811. package/src/buildInputRules.js +0 -81
  812. package/src/client/CollabConnector.js +0 -90
  813. package/src/client/EditorConnection.js +0 -323
  814. package/src/client/Licit.js +0 -708
  815. package/src/client/Licit.test.js +0 -98
  816. package/src/client/Reporter.js +0 -37
  817. package/src/client/SimpleConnector.js +0 -61
  818. package/src/client/http.js +0 -70
  819. package/src/client/licit.css +0 -12
  820. package/src/client/throttle.js +0 -27
  821. package/src/convertFromDOMElement.js +0 -36
  822. package/src/convertFromHTML.js +0 -17
  823. package/src/convertFromJSON.js +0 -56
  824. package/src/convertToCSSPTValue.js +0 -22
  825. package/src/convertToJSON.js +0 -7
  826. package/src/createCommand.js +0 -40
  827. package/src/createEditorKeyMap.js +0 -94
  828. package/src/createEmptyEditorState.js +0 -31
  829. package/src/createTableResizingPlugin.js +0 -86
  830. package/src/findActionableCell.js +0 -74
  831. package/src/findActiveMark.js +0 -32
  832. package/src/hyphenize.js +0 -17
  833. package/src/index.js +0 -10
  834. package/src/insertTable.js +0 -56
  835. package/src/isEditorStateEmpty.js +0 -32
  836. package/src/isTableNode.js +0 -15
  837. package/src/joinDown.js +0 -27
  838. package/src/joinListNode.js +0 -55
  839. package/src/joinUp.js +0 -39
  840. package/src/keymaps.js +0 -185
  841. package/src/lookUpElement.js +0 -14
  842. package/src/nodeAt.js +0 -12
  843. package/src/normalizeHTML.js +0 -78
  844. package/src/patchAnchorElements.js +0 -38
  845. package/src/patchBreakElements.js +0 -22
  846. package/src/patchElementInlineStyles.js +0 -92
  847. package/src/patchListElements.js +0 -276
  848. package/src/patchMathElements.js +0 -60
  849. package/src/patchParagraphElements.js +0 -20
  850. package/src/patchStyleElements.js +0 -194
  851. package/src/patchTableElements.js +0 -89
  852. package/src/rebaseDocWithSteps.js +0 -42
  853. package/src/sanitizeURL.js +0 -13
  854. package/src/splitListItem.js +0 -191
  855. package/src/styles.css +0 -19
  856. package/src/styles0.css +0 -29
  857. package/src/toClosestFontPtSize.js +0 -22
  858. package/src/toSafeHTMLDocument.js +0 -9
  859. package/src/toggleBlockquote.js +0 -91
  860. package/src/toggleCodeBlock.js +0 -102
  861. package/src/ui/AlertInfo.js +0 -64
  862. package/src/ui/BookmarkNodeView.js +0 -66
  863. package/src/ui/CommandButton.js +0 -68
  864. package/src/ui/CommandMenu.js +0 -75
  865. package/src/ui/CommandMenuButton.js +0 -131
  866. package/src/ui/CustomEditorView.js +0 -28
  867. package/src/ui/CustomMenu.js +0 -17
  868. package/src/ui/CustomMenuItem.js +0 -36
  869. package/src/ui/CustomNodeView.js +0 -200
  870. package/src/ui/CustomRadioButton.js +0 -65
  871. package/src/ui/DocLayoutEditor.js +0 -146
  872. package/src/ui/Editor.js +0 -288
  873. package/src/ui/EditorFrameset.js +0 -81
  874. package/src/ui/EditorToolbar.js +0 -211
  875. package/src/ui/EditorToolbarConfig.js +0 -164
  876. package/src/ui/FontSizeCommandMenuButton.js +0 -66
  877. package/src/ui/FontTypeCommandMenuButton.js +0 -49
  878. package/src/ui/Frag.js +0 -13
  879. package/src/ui/Icon.js +0 -89
  880. package/src/ui/ImageInlineEditor.js +0 -67
  881. package/src/ui/KeyCodes.js +0 -12
  882. package/src/ui/LinkTooltip.js +0 -85
  883. package/src/ui/LinkURLEditor.js +0 -111
  884. package/src/ui/ListItemNodeView.js +0 -98
  885. package/src/ui/ListTypeButton.js +0 -131
  886. package/src/ui/ListTypeCommandButton.js +0 -85
  887. package/src/ui/ListTypeMenu.js +0 -70
  888. package/src/ui/LoadingIndicator.js +0 -20
  889. package/src/ui/MathEditor.js +0 -78
  890. package/src/ui/MathInlineEditor.js +0 -102
  891. package/src/ui/MathNodeView.js +0 -175
  892. package/src/ui/PasteMenu.js +0 -57
  893. package/src/ui/ResizeObserver.js +0 -106
  894. package/src/ui/RichTextEditor.js +0 -133
  895. package/src/ui/SelectionObserver.js +0 -134
  896. package/src/ui/TableCellMenu.js +0 -51
  897. package/src/ui/TableGridSizeEditor.js +0 -184
  898. package/src/ui/TableNodeView.js +0 -25
  899. package/src/ui/bindScrollHandler.js +0 -46
  900. package/src/ui/canUseCSSFont.js +0 -43
  901. package/src/ui/czi-body-layout-editor.css +0 -16
  902. package/src/ui/czi-bookmark-view.css +0 -10
  903. package/src/ui/czi-cursor-placeholder.css +0 -36
  904. package/src/ui/czi-custom-menu-button.css +0 -18
  905. package/src/ui/czi-custom-menu-item.css +0 -30
  906. package/src/ui/czi-custom-menu.css +0 -8
  907. package/src/ui/czi-custom-radio-button.css +0 -80
  908. package/src/ui/czi-custom-scrollbar.css +0 -21
  909. package/src/ui/czi-editor-frameset.css +0 -81
  910. package/src/ui/czi-editor-toolbar.css +0 -122
  911. package/src/ui/czi-editor.css +0 -220
  912. package/src/ui/czi-form.css +0 -107
  913. package/src/ui/czi-frag.css +0 -3
  914. package/src/ui/czi-heading.css +0 -40
  915. package/src/ui/czi-icon.css +0 -72
  916. package/src/ui/czi-image-resize-box.css +0 -165
  917. package/src/ui/czi-image-upload-editor.css +0 -57
  918. package/src/ui/czi-image-upload-placeholder.css +0 -50
  919. package/src/ui/czi-image-url-editor.css +0 -38
  920. package/src/ui/czi-image-view.css +0 -125
  921. package/src/ui/czi-indent.css +0 -137
  922. package/src/ui/czi-inline-editor.css +0 -20
  923. package/src/ui/czi-link-tooltip.css +0 -71
  924. package/src/ui/czi-list.css +0 -410
  925. package/src/ui/czi-loading-indicator.css +0 -111
  926. package/src/ui/czi-math-view.css +0 -62
  927. package/src/ui/czi-selection-placeholder.css +0 -24
  928. package/src/ui/czi-table-cell-menu.css +0 -14
  929. package/src/ui/czi-table-grid-size-editor.css +0 -37
  930. package/src/ui/czi-table.css +0 -86
  931. package/src/ui/czi-vars.css +0 -2
  932. package/src/ui/findActiveFontSize.js +0 -58
  933. package/src/ui/findActiveFontType.js +0 -38
  934. package/src/ui/fonts.css +0 -471
  935. package/src/ui/handleEditorDrop.js +0 -28
  936. package/src/ui/handleEditorKeyDown.js +0 -39
  937. package/src/ui/handleEditorPaste.js +0 -33
  938. package/src/ui/htmlElementToRect.js +0 -18
  939. package/src/ui/icon-font.css +0 -10
  940. package/src/ui/injectStyleSheet.js +0 -42
  941. package/src/ui/isElementFullyVisible.js +0 -26
  942. package/src/ui/isOffline.js +0 -8
  943. package/src/ui/isReactClass.js +0 -12
  944. package/src/ui/listType.css +0 -21
  945. package/src/ui/mathquill-editor/MathQuillEditor.js +0 -159
  946. package/src/ui/mathquill-editor/MathQuillEditorSymbols.js +0 -483
  947. package/src/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +0 -48
  948. package/src/ui/mathquill-editor/czi-mathquill-editor-symbols-panel.css +0 -39
  949. package/src/ui/mathquill-editor/czi-mathquill-editor.css +0 -50
  950. package/src/ui/mathquill-editor/mathquill-import-kludge.js +0 -24
  951. package/src/ui/renderLaTeXAsHTML.js +0 -46
  952. package/src/ui/resolveImage.js +0 -123
  953. package/src/ui/toCSSColor.js +0 -51
  954. package/src/ui/toCSSLineSpacing.js +0 -55
  955. package/src/ui/toHexColor.js +0 -26
  956. package/src/ui/uuid.js +0 -9
  957. package/src/uuid.js +0 -9
  958. package/style-service.Dockerfile +0 -26
  959. package/utils/build_bin.js +0 -9
  960. package/utils/build_image_server.js +0 -72
  961. package/utils/build_licit_collab_server.js +0 -76
  962. package/utils/build_web_server.js +0 -37
  963. package/utils/env.js +0 -6
  964. package/webpack.config.js +0 -128
  965. /package/{dist/CodeBlockNodeSpec.js.flow → CodeBlockNodeSpec.js.flow} +0 -0
  966. /package/{dist/CursorPlaceholderPlugin.js.flow → CursorPlaceholderPlugin.js.flow} +0 -0
  967. /package/{dist/EditorState.js.flow → EditorState.js.flow} +0 -0
  968. /package/{dist/HardBreakNodeSpec.js.flow → HardBreakNodeSpec.js.flow} +0 -0
  969. /package/{dist/HeadingNodeSpec.js.flow → HeadingNodeSpec.js.flow} +0 -0
  970. /package/{dist/HorizontalRuleNodeSpec.js.flow → HorizontalRuleNodeSpec.js.flow} +0 -0
  971. /package/{dist/MarkNames.js.flow → MarkNames.js.flow} +0 -0
  972. /package/{dist/NodeNames.js.flow → NodeNames.js.flow} +0 -0
  973. /package/{dist/SelectionPlaceholderPlugin.js.flow → SelectionPlaceholderPlugin.js.flow} +0 -0
  974. /package/{dist/StyleView.js.flow → StyleView.js.flow} +0 -0
  975. /package/{dist/TableBackgroundColorCommand.js.flow → TableBackgroundColorCommand.js.flow} +0 -0
  976. /package/{dist/TableBorderColorCommand.js.flow → TableBorderColorCommand.js.flow} +0 -0
  977. /package/{dist/TextNodeSpec.js.flow → TextNodeSpec.js.flow} +0 -0
  978. /package/{dist/Types.js.flow → Types.js.flow} +0 -0
  979. /package/{dist/WebFontLoader.js.flow → WebFontLoader.js.flow} +0 -0
  980. /package/{dist/browser.js.flow → browser.js.flow} +0 -0
  981. /package/{dist/client → client}/Reporter.js.flow +0 -0
  982. /package/{dist/client → client}/SimpleConnector.js.flow +0 -0
  983. /package/{dist/client → client}/http.js.flow +0 -0
  984. /package/{dist/client → client}/licit.css +0 -0
  985. /package/{dist/client → client}/throttle.js.flow +0 -0
  986. /package/{dist/convertToCSSPTValue.js.flow → convertToCSSPTValue.js.flow} +0 -0
  987. /package/{dist/convertToJSON.js.flow → convertToJSON.js.flow} +0 -0
  988. /package/{dist/createTableResizingPlugin.js.flow → createTableResizingPlugin.js.flow} +0 -0
  989. /package/{dist/findActiveMark.js.flow → findActiveMark.js.flow} +0 -0
  990. /package/{dist/hyphenize.js.flow → hyphenize.js.flow} +0 -0
  991. /package/{dist/isEditorStateEmpty.js.flow → isEditorStateEmpty.js.flow} +0 -0
  992. /package/{dist/isTableNode.js.flow → isTableNode.js.flow} +0 -0
  993. /package/{dist/joinDown.js.flow → joinDown.js.flow} +0 -0
  994. /package/{dist/joinListNode.js.flow → joinListNode.js.flow} +0 -0
  995. /package/{dist/joinUp.js.flow → joinUp.js.flow} +0 -0
  996. /package/{dist/keymaps.js.flow → keymaps.js.flow} +0 -0
  997. /package/{dist/lookUpElement.js.flow → lookUpElement.js.flow} +0 -0
  998. /package/{dist/nodeAt.js.flow → nodeAt.js.flow} +0 -0
  999. /package/{dist/patchBreakElements.js.flow → patchBreakElements.js.flow} +0 -0
  1000. /package/{dist/patchMathElements.js.flow → patchMathElements.js.flow} +0 -0
  1001. /package/{dist/rebaseDocWithSteps.js.flow → rebaseDocWithSteps.js.flow} +0 -0
  1002. /package/{dist/sanitizeURL.js.flow → sanitizeURL.js.flow} +0 -0
  1003. /package/{dist/toSafeHTMLDocument.js.flow → toSafeHTMLDocument.js.flow} +0 -0
  1004. /package/{dist/toggleCodeBlock.js.flow → toggleCodeBlock.js.flow} +0 -0
  1005. /package/{dist/ui → ui}/AlertInfo.js.flow +0 -0
  1006. /package/{dist/ui → ui}/CommandButton.js.flow +0 -0
  1007. /package/{dist/ui → ui}/CustomMenu.js.flow +0 -0
  1008. /package/{dist/ui → ui}/CustomMenuItem.js.flow +0 -0
  1009. /package/{dist/ui → ui}/EditorFrameset.js.flow +0 -0
  1010. /package/{dist/ui → ui}/Frag.js.flow +0 -0
  1011. /package/{dist/ui → ui}/ImageInlineEditor.js.flow +0 -0
  1012. /package/{dist/ui → ui}/KeyCodes.js.flow +0 -0
  1013. /package/{dist/ui → ui}/LoadingIndicator.js.flow +0 -0
  1014. /package/{dist/ui → ui}/PasteMenu.js.flow +0 -0
  1015. /package/{dist/ui → ui}/ResizeObserver.js.flow +0 -0
  1016. /package/{dist/ui → ui}/SelectionObserver.js.flow +0 -0
  1017. /package/{dist/ui → ui}/TableNodeView.js.flow +0 -0
  1018. /package/{dist/ui → ui}/bindScrollHandler.js.flow +0 -0
  1019. /package/{dist/ui → ui}/canUseCSSFont.js.flow +0 -0
  1020. /package/{dist/ui → ui}/czi-body-layout-editor.css +0 -0
  1021. /package/{dist/ui → ui}/czi-bookmark-view.css +0 -0
  1022. /package/{dist/ui → ui}/czi-cursor-placeholder.css +0 -0
  1023. /package/{dist/ui → ui}/czi-custom-menu-button.css +0 -0
  1024. /package/{dist/ui → ui}/czi-custom-menu-item.css +0 -0
  1025. /package/{dist/ui → ui}/czi-custom-menu.css +0 -0
  1026. /package/{dist/ui → ui}/czi-custom-radio-button.css +0 -0
  1027. /package/{dist/ui → ui}/czi-custom-scrollbar.css +0 -0
  1028. /package/{dist/ui → ui}/czi-editor-frameset.css +0 -0
  1029. /package/{dist/ui → ui}/czi-editor-toolbar.css +0 -0
  1030. /package/{dist/ui → ui}/czi-editor.css +0 -0
  1031. /package/{dist/ui → ui}/czi-form.css +0 -0
  1032. /package/{dist/ui → ui}/czi-frag.css +0 -0
  1033. /package/{dist/ui → ui}/czi-heading.css +0 -0
  1034. /package/{dist/ui → ui}/czi-icon.css +0 -0
  1035. /package/{dist/ui → ui}/czi-image-resize-box.css +0 -0
  1036. /package/{dist/ui → ui}/czi-image-upload-editor.css +0 -0
  1037. /package/{dist/ui → ui}/czi-image-upload-placeholder.css +0 -0
  1038. /package/{dist/ui → ui}/czi-image-url-editor.css +0 -0
  1039. /package/{dist/ui → ui}/czi-image-view.css +0 -0
  1040. /package/{dist/ui → ui}/czi-indent.css +0 -0
  1041. /package/{dist/ui → ui}/czi-inline-editor.css +0 -0
  1042. /package/{dist/ui → ui}/czi-list.css +0 -0
  1043. /package/{dist/ui → ui}/czi-loading-indicator.css +0 -0
  1044. /package/{dist/ui → ui}/czi-math-view.css +0 -0
  1045. /package/{dist/ui → ui}/czi-selection-placeholder.css +0 -0
  1046. /package/{dist/ui → ui}/czi-table-cell-menu.css +0 -0
  1047. /package/{dist/ui → ui}/czi-table-grid-size-editor.css +0 -0
  1048. /package/{dist/ui → ui}/fonts.css +0 -0
  1049. /package/{dist/ui → ui}/htmlElementToRect.js.flow +0 -0
  1050. /package/{dist/ui → ui}/icon-font.css +0 -0
  1051. /package/{dist/ui → ui}/injectStyleSheet.js.flow +0 -0
  1052. /package/{dist/ui → ui}/isElementFullyVisible.js.flow +0 -0
  1053. /package/{dist/ui → ui}/isOffline.js.flow +0 -0
  1054. /package/{dist/ui → ui}/isReactClass.js.flow +0 -0
  1055. /package/{dist/ui → ui}/listType.css +0 -0
  1056. /package/{dist/ui → ui}/mathquill-editor/MathQuillEditorSymbols.js.flow +0 -0
  1057. /package/{dist/ui → ui}/mathquill-editor/czi-mathquill-editor-symbols-panel.css +0 -0
  1058. /package/{dist/ui → ui}/mathquill-editor/czi-mathquill-editor.css +0 -0
  1059. /package/{dist/ui → ui}/resolveImage.js.flow +0 -0
  1060. /package/{dist/ui → ui}/toCSSColor.js.flow +0 -0
  1061. /package/{dist/ui → ui}/toCSSLineSpacing.js.flow +0 -0
  1062. /package/{dist/ui → ui}/toHexColor.js.flow +0 -0
  1063. /package/{dist/ui → ui}/uuid.js.flow +0 -0
  1064. /package/{dist/uuid.js.flow → uuid.js.flow} +0 -0
@@ -1,98 +0,0 @@
1
- import React from 'react';
2
- import { configure, shallow } from 'enzyme';
3
- import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
4
- import Licit, { DataType } from './Licit';
5
- import RichTextEditor from '../ui/RichTextEditor';
6
- import { noop } from '@modusoperandi/licit-ui-commands';
7
-
8
- /**
9
- * Configure Jest to use react / enzyme
10
- */
11
- configure({
12
- adapter: new Adapter(),
13
- });
14
-
15
- describe('<Licit />', () => {
16
- let wrapper;
17
- let licit;
18
-
19
- // provide an empty document just to shut up that warning
20
- const data = {
21
- type: 'doc',
22
- content: [
23
- {
24
- type: 'paragraph',
25
- content: [{ type: 'text', text: ' ' }],
26
- },
27
- ],
28
- };
29
-
30
- // Mocking the functions used in _onReady
31
- const fakeEditorView = {
32
- focus: noop,
33
- dispatch: noop,
34
- state: {
35
- doc: {
36
- content: { size: 10 },
37
- resolve: () => ({
38
- min: () => 0,
39
- max: () => 10,
40
- parent: { inlineContent: true },
41
- }),
42
- toJSON: () => data,
43
- },
44
- tr: {
45
- setSelection: () => fakeEditorView.state.tr,
46
- scrollIntoView: noop,
47
- },
48
- },
49
- };
50
-
51
- beforeEach(() => {
52
- wrapper = shallow(<Licit data={data} />);
53
- licit = wrapper.instance();
54
- });
55
-
56
- it('should render a <RichTextEditor /> ', () => {
57
- expect(wrapper.find(RichTextEditor)).toBeTruthy();
58
- });
59
-
60
- describe('editorView (getter)', () => {
61
- it('should return the prosemirror view', () => {
62
- // Using shallow, the underlying RichTexEditor is never really created,
63
- // and Licit's _onReady method is not called. Call it here with the fake
64
- // view created above
65
- licit._onReady(fakeEditorView);
66
-
67
- // Verify that getter now returns the underlying view.
68
- expect(licit.editorView).toBe(fakeEditorView);
69
- });
70
- });
71
- });
72
-
73
- describe('<Licit with HTML input/>', () => {
74
- let wrapper;
75
- let licit;
76
-
77
- const HELLO = 'Hello ';
78
- const WORLD = 'World';
79
- const data =
80
- '<p stylename="None">' +
81
- HELLO +
82
- '<strong overridden="false">' +
83
- WORLD +
84
- '</strong></p>';
85
-
86
- beforeEach(() => {
87
- wrapper = shallow(<Licit data={data} dataType={DataType.HTML} />);
88
- licit = wrapper.instance();
89
- });
90
-
91
- it('should render a <RichTextEditor /> ', () => {
92
- expect(wrapper.find(RichTextEditor)).toBeTruthy();
93
- });
94
-
95
- it('should match state text content with the passed in text ', () => {
96
- expect(licit.state.editorState.doc.textContent).toBe(HELLO + WORLD);
97
- });
98
- });
@@ -1,37 +0,0 @@
1
- /* eslint-disable */
2
-
3
- class Reporter {
4
- constructor() {
5
- this.setAt = 0;
6
- }
7
-
8
- clearState() {
9
- if (this.state) {
10
- this.state = this.node = null;
11
- this.setAt = 0;
12
- }
13
- }
14
-
15
- failure(err) {
16
- console.error('fail', err.toString());
17
- }
18
-
19
- delay(err) {
20
- if (this.state == 'fail') return;
21
- console.info('delay', err.toString());
22
- }
23
-
24
- show(type, message) {
25
- this.clearState();
26
- this.state = type;
27
- this.setAt = Date.now();
28
- }
29
-
30
- success() {
31
- if (this.state == 'fail' && this.setAt > Date.now() - 1000 * 10)
32
- setTimeout(() => this.success(), 5000);
33
- else this.clearState();
34
- }
35
- }
36
-
37
- export default Reporter;
@@ -1,61 +0,0 @@
1
- // @flow
2
-
3
- import { EditorState } from 'prosemirror-state';
4
- import { Transform } from 'prosemirror-transform';
5
- import { Schema } from 'prosemirror-model';
6
- import { EditorView } from 'prosemirror-view';
7
- import ReactDOM from 'react-dom';
8
-
9
- export type SetStateCall = (
10
- state: { editorState: EditorState },
11
- callback: Function
12
- ) => void;
13
-
14
- class SimpleConnector {
15
- _setState: SetStateCall;
16
- _editorState: EditorState;
17
- // This flag is used to deteremine if data passed in or not
18
- // If not passed in, use the data from collab server when in collab mode.
19
- // else use empty content.
20
- _dataDefined: boolean;
21
-
22
- constructor(editorState: EditorState, setState: SetStateCall) {
23
- this._editorState = editorState;
24
- this._setState = setState;
25
- }
26
-
27
- onEdit = (transaction: Transform, view: EditorView): void => {
28
- ReactDOM.unstable_batchedUpdates(() => {
29
- const editorState = this._editorState.apply(transaction);
30
- // [FS] IRAD-1236 2020-03-05
31
- // The state property should not be directly mutated. Use the updateState method.
32
- if (view) {
33
- view.updateState(editorState);
34
- }
35
-
36
- const state = {
37
- editorState,
38
- data: transaction.doc.toJSON(),
39
- };
40
- this._setState(state, () => {
41
- this._editorState = editorState;
42
- });
43
- });
44
- };
45
-
46
- // FS IRAD-989 2020-18-06
47
- // updating properties should automatically render the changes
48
- getState = (): EditorState => {
49
- return this._editorState;
50
- };
51
-
52
- // FS IRAD-1040 2020-09-02
53
- // Send the modified schema to server
54
- updateSchema = (schema: Schema, data: any) => {};
55
-
56
- updateContent = (data: any) => {};
57
-
58
- cleanUp = () => {};
59
- }
60
-
61
- export default SimpleConnector;
@@ -1,70 +0,0 @@
1
- /* eslint-disable */
2
-
3
- // A simple wrapper for XHR.
4
- export function req(conf) {
5
- let req = new XMLHttpRequest(),
6
- aborted = false;
7
- let result = new Promise((success, failure) => {
8
- req.open(conf.method, conf.url, true);
9
- req.addEventListener('load', () => {
10
- if (aborted) return;
11
- if (req.status < 400) {
12
- success(req.responseText);
13
- } else {
14
- let text = req.responseText;
15
- if (text && /html/.test(req.getResponseHeader('content-type')))
16
- text = makePlain(text);
17
- let err = new Error(
18
- 'Request failed: ' + req.statusText + (text ? '\n\n' + text : '')
19
- );
20
- err.status = req.status;
21
-
22
- failure(err);
23
- }
24
- });
25
- req.addEventListener('error', () => {
26
- if (!aborted) failure(new Error('Network error'));
27
- });
28
- if (conf.headers)
29
- for (let header in conf.headers)
30
- req.setRequestHeader(header, conf.headers[header]);
31
- req.send(conf.body || null);
32
- });
33
- result.abort = () => {
34
- if (!aborted) {
35
- req.abort();
36
- aborted = true;
37
- }
38
- };
39
- return result;
40
- }
41
-
42
- function makePlain(html) {
43
- var elt = document.createElement('div');
44
- elt.innerHTML = html;
45
- return elt.textContent.replace(/\n[^]*|\s+$/g, '');
46
- }
47
-
48
- export function GET(url) {
49
- return req({ url, method: 'GET' });
50
- }
51
-
52
- export function POST(url, body, type) {
53
- return req({ url, method: 'POST', body, headers: { 'Content-Type': type } });
54
- }
55
-
56
- export function PUT(url, body, type) {
57
- return req({ url, method: 'PUT', body, headers: { 'Content-Type': type } });
58
- }
59
-
60
- // [FS] IRAD-1128 2021-02-03
61
- // http DELETE request overrided
62
- export function DELETE(url, type) {
63
- return req({ url, method: 'DELETE', headers: { 'Content-Type': type } });
64
- }
65
-
66
- // [FS] IRAD-1128 2021-02-03
67
- // http PATCH request overrided
68
- export function PATCH(url, body, type) {
69
- return req({ url, method: 'PATCH', body, headers: { 'Content-Type': type } });
70
- }
@@ -1,12 +0,0 @@
1
- html {
2
- background: #fff;
3
- border: 0;
4
- border: none;
5
- margin: 0;
6
- }
7
-
8
- body {
9
- background: #fff;
10
- border: none;
11
- margin: 0;
12
- }
@@ -1,27 +0,0 @@
1
- // @flow
2
-
3
- export default function throttle(
4
- fn: Function,
5
- threshhold: number,
6
- context: any
7
- ): Function {
8
- let last;
9
- let deferTimer: window.TimeoutID;
10
- const boundFn = fn.bind(context);
11
-
12
- return function () {
13
- const now = Date.now();
14
- const args = Array.prototype.slice.call(arguments);
15
- if (last && now < last + threshhold) {
16
- // hold on to it
17
- clearTimeout(deferTimer);
18
- deferTimer = setTimeout(() => {
19
- last = now;
20
- boundFn.apply(null, args);
21
- }, threshhold);
22
- } else {
23
- last = now;
24
- boundFn.apply(null, args);
25
- }
26
- };
27
- }
@@ -1,36 +0,0 @@
1
- // @flow
2
-
3
- import { Schema } from 'prosemirror-model';
4
- import { DOMParser } from 'prosemirror-model';
5
- import { EditorState } from 'prosemirror-state';
6
- import { Plugin } from 'prosemirror-state';
7
-
8
- import { getAttrs } from './DocNodeSpec';
9
- import EditorPlugins from './EditorPlugins';
10
- import EditorSchema from './EditorSchema';
11
-
12
- export default function convertFromDOMElement(
13
- el: HTMLElement,
14
- schema: Schema,
15
- plugins: Array<Plugin>
16
- ): EditorState {
17
- const effectiveSchema = schema || EditorSchema;
18
- const effectivePlugins = plugins || EditorPlugins;
19
- const bodyEl = el.querySelector('body');
20
-
21
- // https://prosemirror.net/docs/ref/#model.ParseOptions.preserveWhitespace
22
- const doc = DOMParser.fromSchema(effectiveSchema).parse(el, {
23
- preserveWhitespace: true,
24
- });
25
-
26
- if (bodyEl) {
27
- // Unfortunately the root node `doc` does not supoort `parseDOM`, thus
28
- // we'd have to assign its `attrs` manually.
29
- doc.attrs = getAttrs(bodyEl);
30
- }
31
-
32
- return EditorState.create({
33
- doc,
34
- plugins: effectivePlugins,
35
- });
36
- }
@@ -1,17 +0,0 @@
1
- // @flow
2
-
3
- import { Schema } from 'prosemirror-model';
4
- import { EditorState } from 'prosemirror-state';
5
- import { Plugin } from 'prosemirror-state';
6
-
7
- import convertFromDOMElement from './convertFromDOMElement';
8
-
9
- export default function convertFromHTML(
10
- html: string,
11
- schema: Schema,
12
- plugins: Array<Plugin>
13
- ): EditorState {
14
- const root = document.createElement('html');
15
- root.innerHTML = html ? html : ' ';
16
- return convertFromDOMElement(root, schema, plugins);
17
- }
@@ -1,56 +0,0 @@
1
- // @flow
2
-
3
- import { Schema } from 'prosemirror-model';
4
- import { EditorState } from 'prosemirror-state';
5
- import { Plugin } from 'prosemirror-state';
6
- import createEmptyEditorState from './createEmptyEditorState';
7
-
8
- export default function convertFromJSON(
9
- json: Object | string,
10
- schema: ?Schema,
11
- defaultSchema: Schema,
12
- effectivePlugins: Array<Plugin>
13
- ): EditorState {
14
- const editorSchema = schema || defaultSchema;
15
- let error = false;
16
-
17
- if (typeof json === 'string') {
18
- try {
19
- json = JSON.parse(json);
20
- } catch (ex) {
21
- console.error('convertFromJSON:', ex);
22
- error = true;
23
- }
24
- }
25
-
26
- if (!json || typeof json !== 'object') {
27
- console.error('convertFromJSON: invalid object', json);
28
- error = true;
29
- }
30
-
31
- if(error) {
32
- // [FS] IRAD-1455 2021-06-16
33
- // Use the effectivePlugins, editor hangs, b'coz of missing default core plugins
34
- return createEmptyEditorState(
35
- schema,
36
- defaultSchema,
37
- effectivePlugins
38
- );
39
- }
40
-
41
- // [FS] IRAD-1067 2020-09-19
42
- // Handle gracefully when error thrown on invalid json
43
- let doc = null;
44
-
45
- try {
46
- doc = editorSchema.nodeFromJSON(json);
47
- } catch (error) {
48
- return null;
49
- }
50
-
51
- return EditorState.create({
52
- doc: doc,
53
- schema: editorSchema,
54
- plugins: effectivePlugins,
55
- });
56
- }
@@ -1,22 +0,0 @@
1
- // @flow
2
-
3
- const SIZE_PATTERN = /([\d\.]+)(px|pt)/i;
4
-
5
- export const PX_TO_PT_RATIO = 0.75292857;
6
- export const PT_TO_PX_RATIO = 1 / PX_TO_PT_RATIO;
7
-
8
- export default function convertToCSSPTValue(styleValue: string): number {
9
- const matches = styleValue.match(SIZE_PATTERN);
10
- if (!matches) {
11
- return 0;
12
- }
13
- let value = parseFloat(matches[1]);
14
- const unit = matches[2];
15
- if (!value || !unit) {
16
- return 0;
17
- }
18
- if (unit === 'px') {
19
- value = PX_TO_PT_RATIO * value;
20
- }
21
- return value;
22
- }
@@ -1,7 +0,0 @@
1
- // @flow
2
-
3
- import { EditorState } from 'prosemirror-state';
4
-
5
- export default function convertToJSON(editorState: EditorState): Object {
6
- return editorState.doc.toJSON();
7
- }
@@ -1,40 +0,0 @@
1
- // @flow
2
-
3
- import { EditorState } from 'prosemirror-state';
4
- import { Transform } from 'prosemirror-transform';
5
- import { EditorView } from 'prosemirror-view';
6
-
7
- import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
8
-
9
- type ExecuteCall = (
10
- state: EditorState,
11
- dispatch?: ?(tr: Transform) => void,
12
- view?: ?EditorView
13
- ) => boolean;
14
-
15
- export default function createCommand(execute: ExecuteCall): UICommand {
16
- class CustomCommand extends UICommand {
17
- isEnabled = (state: EditorState): boolean => {
18
- return this.execute(state);
19
- };
20
-
21
- execute = (
22
- state: EditorState,
23
- dispatch: ?(tr: Transform) => void,
24
- view: ?EditorView
25
- ): boolean => {
26
- const tr = state.tr;
27
- let endTr = tr;
28
- execute(
29
- state,
30
- (nextTr) => {
31
- endTr = nextTr;
32
- dispatch && dispatch(endTr);
33
- },
34
- view
35
- );
36
- return endTr.docChanged || tr !== endTr;
37
- };
38
- }
39
- return new CustomCommand();
40
- }
@@ -1,94 +0,0 @@
1
- // @flow
2
-
3
- import { EditorState } from 'prosemirror-state';
4
- import { Transform } from 'prosemirror-transform';
5
- import { EditorView } from 'prosemirror-view';
6
-
7
- import * as EditorCommands from './EditorCommands';
8
- import * as EditorKeyMap from './EditorKeyMap';
9
- import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
10
- import type {
11
- UserKeyCommand,
12
- UserKeyMap,
13
- } from '@modusoperandi/licit-doc-attrs-step';
14
-
15
- const {
16
- KEY_BACK_DELETE,
17
- KEY_FORWARD_DELETE,
18
- // [FS][07-MAY-2020][IRAD-956]
19
- // KEY_INSERT_NEW_LINE_IN_BLOCKQUOTE,
20
- KEY_INSERT_NEW_LINE_IN_LIST_ITEM,
21
- KEY_REDO,
22
- KEY_SPLIT_LIST_ITEM,
23
- KEY_TAB_SHIFT,
24
- KEY_TAB,
25
- KEY_TOGGLE_BOLD,
26
- KEY_TOGGLE_ITALIC,
27
- KEY_TOGGLE_UNDERLINE,
28
- KEY_UNDO,
29
- } = EditorKeyMap;
30
-
31
- const {
32
- // [FS][07-MAY-2020][IRAD-956]
33
- // BLOCKQUOTE_INSERT_NEW_LINE,
34
- EM,
35
- HISTORY_REDO,
36
- HISTORY_UNDO,
37
- INDENT_LESS,
38
- INDENT_MORE,
39
- LIST_ITEM_INSERT_NEW_LINE,
40
- LIST_ITEM_MERGE_DOWN,
41
- LIST_ITEM_MERGE_UP,
42
- LIST_SPLIT,
43
- TABLE_MOVE_TO_NEXT_CELL,
44
- TABLE_MOVE_TO_PREV_CELL,
45
- TEXT_INSERT_TAB_SPACE,
46
- STRONG,
47
- UNDERLINE,
48
- } = EditorCommands;
49
-
50
- function bindCommands(...commands: Array<UICommand>): UserKeyCommand {
51
- return function (
52
- state: EditorState,
53
- dispatch: ?(tr: Transform) => void,
54
- view: ?EditorView
55
- ): boolean {
56
- return commands.some((cmd) => {
57
- if (cmd.isEnabled(state, view, '')) {
58
- cmd.execute(state, dispatch, view);
59
- return true;
60
- }
61
- return false;
62
- });
63
- };
64
- }
65
-
66
- export default function createEditorKeyMap(): UserKeyMap {
67
- const result = {
68
- [KEY_BACK_DELETE.common]: LIST_ITEM_MERGE_UP.execute,
69
- [KEY_FORWARD_DELETE.common]: LIST_ITEM_MERGE_DOWN.execute,
70
- [KEY_REDO.common]: HISTORY_REDO.execute,
71
- [KEY_SPLIT_LIST_ITEM.common]: LIST_SPLIT.execute,
72
- [KEY_TAB.common]: bindCommands(
73
- TABLE_MOVE_TO_NEXT_CELL,
74
- TEXT_INSERT_TAB_SPACE,
75
- INDENT_MORE
76
- ),
77
- [KEY_TAB_SHIFT.common]: bindCommands(
78
- TABLE_MOVE_TO_PREV_CELL,
79
- TEXT_INSERT_TAB_SPACE,
80
- INDENT_LESS
81
- ),
82
- [KEY_TOGGLE_BOLD.common]: STRONG.execute,
83
- [KEY_TOGGLE_ITALIC.common]: EM.execute,
84
- [KEY_TOGGLE_UNDERLINE.common]: UNDERLINE.execute,
85
- [KEY_UNDO.common]: HISTORY_UNDO.execute,
86
- // [FS][07-MAY-2020][IRAD-956]
87
- // [KEY_INSERT_NEW_LINE_IN_BLOCKQUOTE.common]:
88
- // BLOCKQUOTE_INSERT_NEW_LINE.execute,
89
- [KEY_INSERT_NEW_LINE_IN_LIST_ITEM.common]:
90
- LIST_ITEM_INSERT_NEW_LINE.execute,
91
- };
92
-
93
- return result;
94
- }
@@ -1,31 +0,0 @@
1
- // @flow
2
-
3
- import { Schema } from 'prosemirror-model';
4
- import { EditorState } from 'prosemirror-state';
5
- import { Plugin } from 'prosemirror-state';
6
-
7
- import convertFromJSON from './convertFromJSON';
8
- import EditorSchema from './EditorSchema';
9
-
10
- export const EMPTY_DOC_JSON = {
11
- type: 'doc',
12
- content: [
13
- {
14
- type: 'paragraph',
15
- }, // [FS] IRAD-1710 2022-03-04 - No text content needed
16
- ],
17
- };
18
-
19
- export default function createEmptyEditorState(
20
- schema: ?Schema,
21
- defaultSchema: ?Schema,
22
- plugins: Array<Plugin>
23
- ): EditorState {
24
- // TODO: Check if schema support doc and paragraph nodes.
25
- return convertFromJSON(
26
- EMPTY_DOC_JSON,
27
- schema,
28
- defaultSchema ? defaultSchema : EditorSchema,
29
- plugins
30
- );
31
- }