@modusoperandi/licit 0.14.17 → 1.0.0

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 (1062) 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 +66662 -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 +6 -0
  174. package/index.js +8 -0
  175. package/insertTable.js +43 -0
  176. package/insertTable.js.flow +56 -0
  177. package/isEditorStateEmpty.js +28 -0
  178. package/isTableNode.js +6 -0
  179. package/joinDown.js +25 -0
  180. package/joinListNode.js +31 -0
  181. package/joinUp.js +30 -0
  182. package/keymaps.js +67 -0
  183. package/lookUpElement.js +9 -0
  184. package/nodeAt.js +9 -0
  185. package/normalizeHTML.js +63 -0
  186. package/normalizeHTML.js.flow +78 -0
  187. package/package.json +48 -34
  188. package/patchAnchorElements.js +29 -0
  189. package/patchAnchorElements.js.flow +38 -0
  190. package/patchBreakElements.js +20 -0
  191. package/patchElementInlineStyles.js +65 -0
  192. package/patchElementInlineStyles.js.flow +92 -0
  193. package/patchListElements.js +228 -0
  194. package/patchListElements.js.flow +276 -0
  195. package/patchMathElements.js +59 -0
  196. package/patchParagraphElements.js +13 -0
  197. package/patchParagraphElements.js.flow +20 -0
  198. package/patchStyleElements.js +152 -0
  199. package/patchStyleElements.js.flow +196 -0
  200. package/patchTableElements.js +86 -0
  201. package/patchTableElements.js.flow +89 -0
  202. package/rebaseDocWithSteps.js +25 -0
  203. package/sanitizeURL.js +10 -0
  204. package/splitListItem.js +170 -0
  205. package/splitListItem.js.flow +191 -0
  206. package/styles.css +19 -0
  207. package/styles0.css +29 -0
  208. package/toClosestFontPtSize.js +17 -0
  209. package/toClosestFontPtSize.js.flow +22 -0
  210. package/toSafeHTMLDocument.js +7 -0
  211. package/toggleBlockquote.js +75 -0
  212. package/toggleBlockquote.js.flow +108 -0
  213. package/toggleCodeBlock.js +75 -0
  214. package/ui/AlertInfo.js +69 -0
  215. package/ui/BookmarkNodeView.js +104 -0
  216. package/ui/BookmarkNodeView.js.flow +66 -0
  217. package/ui/CommandButton.js +76 -0
  218. package/ui/CommandMenu.js +94 -0
  219. package/ui/CommandMenu.js.flow +75 -0
  220. package/ui/CommandMenuButton.js +132 -0
  221. package/ui/CommandMenuButton.js.flow +131 -0
  222. package/ui/CustomEditorView.js +47 -0
  223. package/ui/CustomEditorView.js.flow +28 -0
  224. package/ui/CustomMenu.js +34 -0
  225. package/ui/CustomMenuItem.js +65 -0
  226. package/ui/CustomNodeView.js +237 -0
  227. package/ui/CustomNodeView.js.flow +200 -0
  228. package/ui/CustomRadioButton.js +78 -0
  229. package/ui/CustomRadioButton.js.flow +65 -0
  230. package/ui/DocLayoutEditor.js +147 -0
  231. package/ui/DocLayoutEditor.js.flow +146 -0
  232. package/ui/Editor.js +291 -0
  233. package/ui/Editor.js.flow +288 -0
  234. package/ui/EditorFrameset.js +96 -0
  235. package/ui/EditorToolbar.js +214 -0
  236. package/ui/EditorToolbar.js.flow +218 -0
  237. package/ui/EditorToolbarConfig.js +141 -0
  238. package/ui/EditorToolbarConfig.js.flow +164 -0
  239. package/ui/FontSizeCommandMenuButton.js +67 -0
  240. package/ui/FontSizeCommandMenuButton.js.flow +66 -0
  241. package/ui/FontTypeCommandMenuButton.js +65 -0
  242. package/ui/FontTypeCommandMenuButton.js.flow +61 -0
  243. package/ui/Frag.js +32 -0
  244. package/ui/Icon.js +145 -0
  245. package/ui/Icon.js.flow +89 -0
  246. package/ui/ImageInlineEditor.js +87 -0
  247. package/ui/KeyCodes.js +9 -0
  248. package/ui/LinkTooltip.js +113 -0
  249. package/ui/LinkTooltip.js.flow +85 -0
  250. package/ui/LinkURLEditor.js +114 -0
  251. package/ui/LinkURLEditor.js.flow +117 -0
  252. package/ui/ListItemNodeView.js +92 -0
  253. package/ui/ListItemNodeView.js.flow +98 -0
  254. package/ui/ListTypeButton.js +136 -0
  255. package/ui/ListTypeButton.js.flow +131 -0
  256. package/ui/ListTypeCommandButton.js +91 -0
  257. package/ui/ListTypeCommandButton.js.flow +85 -0
  258. package/ui/ListTypeMenu.js +85 -0
  259. package/ui/ListTypeMenu.js.flow +70 -0
  260. package/ui/LoadingIndicator.js +42 -0
  261. package/ui/MathEditor.js +92 -0
  262. package/ui/MathEditor.js.flow +78 -0
  263. package/ui/MathInlineEditor.js +123 -0
  264. package/ui/MathInlineEditor.js.flow +102 -0
  265. package/ui/MathNodeView.js +217 -0
  266. package/ui/MathNodeView.js.flow +186 -0
  267. package/ui/PasteMenu.js +74 -0
  268. package/ui/ResizeObserver.js +89 -0
  269. package/ui/RichTextEditor.js +125 -0
  270. package/ui/RichTextEditor.js.flow +133 -0
  271. package/ui/SelectionObserver.js +121 -0
  272. package/ui/TableCellMenu.js +64 -0
  273. package/ui/TableCellMenu.js.flow +51 -0
  274. package/ui/TableGridSizeEditor.js +212 -0
  275. package/ui/TableGridSizeEditor.js.flow +184 -0
  276. package/ui/TableNodeView.js +51 -0
  277. package/ui/bindScrollHandler.js +33 -0
  278. package/ui/canUseCSSFont.js +33 -0
  279. package/ui/czi-link-tooltip.css +71 -0
  280. package/ui/czi-table.css +87 -0
  281. package/ui/czi-vars.css +2 -0
  282. package/ui/findActiveFontSize.js +53 -0
  283. package/ui/findActiveFontSize.js.flow +58 -0
  284. package/ui/findActiveFontType.js +32 -0
  285. package/ui/findActiveFontType.js.flow +38 -0
  286. package/ui/handleEditorDrop.js +24 -0
  287. package/ui/handleEditorDrop.js.flow +28 -0
  288. package/ui/handleEditorKeyDown.js +20 -0
  289. package/ui/handleEditorKeyDown.js.flow +39 -0
  290. package/ui/handleEditorPaste.js +22 -0
  291. package/ui/handleEditorPaste.js.flow +33 -0
  292. package/ui/htmlElementToRect.js +17 -0
  293. package/ui/injectStyleSheet.js +37 -0
  294. package/ui/isElementFullyVisible.js +22 -0
  295. package/ui/isOffline.js +6 -0
  296. package/ui/isReactClass.js +10 -0
  297. package/ui/mathquill-editor/MathQuillEditor.js +187 -0
  298. package/ui/mathquill-editor/MathQuillEditor.js.flow +159 -0
  299. package/ui/mathquill-editor/MathQuillEditorSymbols.js +416 -0
  300. package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +69 -0
  301. package/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js.flow +50 -0
  302. package/ui/mathquill-editor/mathquill-import-kludge.js +21 -0
  303. package/ui/mathquill-editor/mathquill-import-kludge.js.flow +24 -0
  304. package/ui/renderLaTeXAsHTML.js +55 -0
  305. package/ui/renderLaTeXAsHTML.js.flow +46 -0
  306. package/ui/resolveImage.js +115 -0
  307. package/ui/toCSSColor.js +42 -0
  308. package/ui/toCSSLineSpacing.js +48 -0
  309. package/ui/toHexColor.js +22 -0
  310. package/ui/uuid.js +6 -0
  311. package/uuid.js +6 -0
  312. package/.babelrc +0 -54
  313. package/.dockerignore +0 -4
  314. package/.eslintignore +0 -3
  315. package/.eslintrc.js +0 -87
  316. package/.flowconfig +0 -37
  317. package/.gitattribute +0 -1
  318. package/.github/workflows/build.yml +0 -29
  319. package/.github/workflows/lint.yml +0 -30
  320. package/.prettierignore +0 -6
  321. package/.prettierrc +0 -5
  322. package/.stylelintignore +0 -2
  323. package/.stylelintrc.json +0 -14
  324. package/.travis.yml +0 -18
  325. package/CODEOWNERS +0 -40
  326. package/LICENSE +0 -22
  327. package/README.md +0 -304
  328. package/_config.yml +0 -1
  329. package/babel.config.json +0 -54
  330. package/build_collab_server.py +0 -7
  331. package/build_image_server.py +0 -7
  332. package/dist/BlockquoteInsertNewLineCommand.js +0 -65
  333. package/dist/BlockquoteInsertNewLineCommand.js.flow +0 -55
  334. package/dist/BlockquoteNodeSpec.js +0 -37
  335. package/dist/BlockquoteNodeSpec.js.flow +0 -30
  336. package/dist/BlockquoteToggleCommand.js +0 -41
  337. package/dist/BlockquoteToggleCommand.js.flow +0 -34
  338. package/dist/BookmarkNodeSpec.js +0 -50
  339. package/dist/BookmarkNodeSpec.js.flow +0 -39
  340. package/dist/BulletListNodeSpec.js +0 -59
  341. package/dist/BulletListNodeSpec.js.flow +0 -61
  342. package/dist/CZIProseMirror.js +0 -91
  343. package/dist/CZIProseMirror.js.flow +0 -90
  344. package/dist/CodeBlockCommand.js +0 -51
  345. package/dist/CodeBlockCommand.js.flow +0 -43
  346. package/dist/CodeBlockNodeSpec.js +0 -33
  347. package/dist/CodeMarkSpec.js +0 -18
  348. package/dist/CodeMarkSpec.js.flow +0 -14
  349. package/dist/ContentPlaceholderPlugin.js +0 -164
  350. package/dist/ContentPlaceholderPlugin.js.flow +0 -187
  351. package/dist/CursorPlaceholderPlugin.js +0 -114
  352. package/dist/DocLayoutCommand.js +0 -88
  353. package/dist/DocLayoutCommand.js.flow +0 -94
  354. package/dist/DocNodeSpec.js +0 -79
  355. package/dist/DocNodeSpec.js.flow +0 -64
  356. package/dist/EMMarkSpec.js +0 -22
  357. package/dist/EMMarkSpec.js.flow +0 -14
  358. package/dist/EditorCommands.js +0 -175
  359. package/dist/EditorCommands.js.flow +0 -124
  360. package/dist/EditorKeyMap.js +0 -112
  361. package/dist/EditorKeyMap.js.flow +0 -187
  362. package/dist/EditorMarks.js +0 -80
  363. package/dist/EditorMarks.js.flow +0 -71
  364. package/dist/EditorNodes.js +0 -68
  365. package/dist/EditorNodes.js.flow +0 -59
  366. package/dist/EditorPageLayoutPlugin.js +0 -72
  367. package/dist/EditorPageLayoutPlugin.js.flow +0 -67
  368. package/dist/EditorPlugins.js +0 -13
  369. package/dist/EditorPlugins.js.flow +0 -8
  370. package/dist/EditorSchema.js +0 -16
  371. package/dist/EditorSchema.js.flow +0 -12
  372. package/dist/EditorState.js +0 -10
  373. package/dist/FontSizeMarkSpec.js +0 -47
  374. package/dist/FontSizeMarkSpec.js.flow +0 -49
  375. package/dist/FontTypeMarkSpec.js +0 -74
  376. package/dist/FontTypeMarkSpec.js.flow +0 -80
  377. package/dist/HTMLMutator.js +0 -58
  378. package/dist/HTMLMutator.js.flow +0 -59
  379. package/dist/HardBreakNodeSpec.js +0 -20
  380. package/dist/HeadingNodeSpec.js +0 -64
  381. package/dist/HistoryRedoCommand.js +0 -24
  382. package/dist/HistoryRedoCommand.js.flow +0 -20
  383. package/dist/HistoryUndoCommand.js +0 -24
  384. package/dist/HistoryUndoCommand.js.flow +0 -20
  385. package/dist/HorizontalRuleCommand.js +0 -58
  386. package/dist/HorizontalRuleCommand.js.flow +0 -49
  387. package/dist/HorizontalRuleNodeSpec.js +0 -38
  388. package/dist/ImageUploadPlaceholderPlugin.js +0 -176
  389. package/dist/ImageUploadPlaceholderPlugin.js.flow +0 -192
  390. package/dist/LinkMarkSpec.js +0 -41
  391. package/dist/LinkMarkSpec.js.flow +0 -32
  392. package/dist/LinkSetURLCommand.js +0 -100
  393. package/dist/LinkSetURLCommand.js.flow +0 -103
  394. package/dist/LinkTooltipPlugin.js +0 -180
  395. package/dist/LinkTooltipPlugin.js.flow +0 -192
  396. package/dist/ListItemInsertNewLineCommand.js +0 -65
  397. package/dist/ListItemInsertNewLineCommand.js.flow +0 -55
  398. package/dist/ListItemMergeCommand.js +0 -183
  399. package/dist/ListItemMergeCommand.js.flow +0 -177
  400. package/dist/ListItemNodeSpec.js +0 -57
  401. package/dist/ListItemNodeSpec.js.flow +0 -52
  402. package/dist/ListSplitCommand.js +0 -36
  403. package/dist/ListSplitCommand.js.flow +0 -32
  404. package/dist/ListToggleCommand.js +0 -81
  405. package/dist/ListToggleCommand.js.flow +0 -77
  406. package/dist/MarkNames.js +0 -37
  407. package/dist/MarksClearCommand.js +0 -42
  408. package/dist/MarksClearCommand.js.flow +0 -42
  409. package/dist/MathEditCommand.js +0 -108
  410. package/dist/MathEditCommand.js.flow +0 -110
  411. package/dist/MathNodeSpec.js +0 -57
  412. package/dist/MathNodeSpec.js.flow +0 -46
  413. package/dist/NodeNames.js +0 -47
  414. package/dist/OrderedListNodeSpec.js +0 -125
  415. package/dist/OrderedListNodeSpec.js.flow +0 -132
  416. package/dist/ParagraphNodeSpec.js +0 -151
  417. package/dist/ParagraphNodeSpec.js.flow +0 -156
  418. package/dist/ParagraphSpacingCommand.js +0 -106
  419. package/dist/ParagraphSpacingCommand.js.flow +0 -121
  420. package/dist/PrintCommand.js +0 -33
  421. package/dist/PrintCommand.js.flow +0 -31
  422. package/dist/SelectionPlaceholderPlugin.js +0 -111
  423. package/dist/SpacerMarkSpec.js +0 -50
  424. package/dist/SpacerMarkSpec.js.flow +0 -47
  425. package/dist/StrikeMarkSpec.js +0 -24
  426. package/dist/StrikeMarkSpec.js.flow +0 -21
  427. package/dist/StrongMarkSpec.js +0 -29
  428. package/dist/StrongMarkSpec.js.flow +0 -25
  429. package/dist/StyleView.js +0 -23
  430. package/dist/TableBackgroundColorCommand.js +0 -65
  431. package/dist/TableBorderColorCommand.js +0 -65
  432. package/dist/TableCellColorCommand.js +0 -62
  433. package/dist/TableCellColorCommand.js.flow +0 -71
  434. package/dist/TableCellMenuPlugin.js +0 -129
  435. package/dist/TableCellMenuPlugin.js.flow +0 -132
  436. package/dist/TableInsertCommand.js +0 -117
  437. package/dist/TableInsertCommand.js.flow +0 -112
  438. package/dist/TableMergeCellsCommand.js +0 -97
  439. package/dist/TableMergeCellsCommand.js.flow +0 -90
  440. package/dist/TableNodesSpecs.js +0 -91
  441. package/dist/TableNodesSpecs.js.flow +0 -78
  442. package/dist/TablePlugins.js +0 -14
  443. package/dist/TablePlugins.js.flow +0 -14
  444. package/dist/TableResizePlugin.js +0 -543
  445. package/dist/TableResizePlugin.js.flow +0 -632
  446. package/dist/TextColorMarkSpec.js +0 -39
  447. package/dist/TextColorMarkSpec.js.flow +0 -35
  448. package/dist/TextHighlightMarkSpec.js +0 -42
  449. package/dist/TextHighlightMarkSpec.js.flow +0 -38
  450. package/dist/TextInsertTabSpaceCommand.js +0 -78
  451. package/dist/TextInsertTabSpaceCommand.js.flow +0 -83
  452. package/dist/TextNoWrapMarkSpec.js +0 -18
  453. package/dist/TextNoWrapMarkSpec.js.flow +0 -14
  454. package/dist/TextNodeSpec.js +0 -11
  455. package/dist/TextSelectionMarkSpec.js +0 -25
  456. package/dist/TextSelectionMarkSpec.js.flow +0 -24
  457. package/dist/TextSubMarkSpec.js +0 -22
  458. package/dist/TextSubMarkSpec.js.flow +0 -20
  459. package/dist/TextSuperMarkSpec.js +0 -22
  460. package/dist/TextSuperMarkSpec.js.flow +0 -20
  461. package/dist/TextUnderlineMarkSpec.js +0 -28
  462. package/dist/TextUnderlineMarkSpec.js.flow +0 -27
  463. package/dist/Types.js +0 -81
  464. package/dist/WebFontLoader.js +0 -28
  465. package/dist/blockQuoteInputRule.js +0 -35
  466. package/dist/blockQuoteInputRule.js.flow +0 -36
  467. package/dist/bom.xml +0 -14724
  468. package/dist/browser.js +0 -11
  469. package/dist/buildEditorPlugins.js +0 -44
  470. package/dist/buildEditorPlugins.js.flow +0 -49
  471. package/dist/buildInputRules.js +0 -72
  472. package/dist/buildInputRules.js.flow +0 -81
  473. package/dist/client/CollabConnector.js +0 -80
  474. package/dist/client/CollabConnector.js.flow +0 -90
  475. package/dist/client/EditorConnection.js +0 -290
  476. package/dist/client/EditorConnection.js.flow +0 -323
  477. package/dist/client/Licit.js +0 -621
  478. package/dist/client/Licit.js.flow +0 -708
  479. package/dist/client/Licit.test.js +0 -98
  480. package/dist/client/Licit.test.js.flow +0 -98
  481. package/dist/client/Reporter.js +0 -36
  482. package/dist/client/SimpleConnector.js +0 -59
  483. package/dist/client/http.js +0 -101
  484. package/dist/client/throttle.js +0 -26
  485. package/dist/convertFromDOMElement.js +0 -31
  486. package/dist/convertFromDOMElement.js.flow +0 -36
  487. package/dist/convertFromHTML.js +0 -15
  488. package/dist/convertFromHTML.js.flow +0 -17
  489. package/dist/convertFromJSON.js +0 -45
  490. package/dist/convertFromJSON.js.flow +0 -56
  491. package/dist/convertToCSSPTValue.js +0 -27
  492. package/dist/convertToJSON.js +0 -10
  493. package/dist/createCommand.js +0 -33
  494. package/dist/createCommand.js.flow +0 -40
  495. package/dist/createEditorKeyMap.js +0 -80
  496. package/dist/createEditorKeyMap.js.flow +0 -94
  497. package/dist/createEmptyEditorState.js +0 -24
  498. package/dist/createEmptyEditorState.js.flow +0 -31
  499. package/dist/createTableResizingPlugin.js +0 -79
  500. package/dist/findActionableCell.js +0 -65
  501. package/dist/findActionableCell.js.flow +0 -74
  502. package/dist/findActiveMark.js +0 -29
  503. package/dist/fonts/aclonica/Aclonica.woff2 +0 -0
  504. package/dist/fonts/acme/Acme.woff2 +0 -0
  505. package/dist/fonts/alegreya/Alegreya-Regular-C.woff2 +0 -0
  506. package/dist/fonts/alegreya/Alegreya-Regular-CE.woff2 +0 -0
  507. package/dist/fonts/alegreya/Alegreya-Regular-G.woff2 +0 -0
  508. package/dist/fonts/alegreya/Alegreya-Regular-GE.woff2 +0 -0
  509. package/dist/fonts/alegreya/Alegreya-Regular-L.woff2 +0 -0
  510. package/dist/fonts/alegreya/Alegreya-Regular-LE.woff2 +0 -0
  511. package/dist/fonts/alegreya/Alegreya-Regular-V.woff2 +0 -0
  512. package/dist/fonts/arial-black/ArialBlack-G.woff2 +0 -0
  513. package/dist/fonts/arial-black/ArialBlack-L.woff2 +0 -0
  514. package/dist/fonts/arial-black/ArialBlack-LE.woff2 +0 -0
  515. package/dist/fonts/courier-new/CourierNew-L.woff2 +0 -0
  516. package/dist/fonts/georgia/Georgia-C.woff2 +0 -0
  517. package/dist/fonts/georgia/Georgia-CE.woff2 +0 -0
  518. package/dist/fonts/georgia/Georgia-G.woff2 +0 -0
  519. package/dist/fonts/georgia/Georgia-GE.woff2 +0 -0
  520. package/dist/fonts/georgia/Georgia-L.woff2 +0 -0
  521. package/dist/fonts/georgia/Georgia-LE.woff2 +0 -0
  522. package/dist/fonts/material-icons/MaterialIcons-Regular.ttf +0 -0
  523. package/dist/fonts/tahoma/Tahoma-C.woff2 +0 -0
  524. package/dist/fonts/tahoma/Tahoma-CE.woff2 +0 -0
  525. package/dist/fonts/tahoma/Tahoma-G.woff2 +0 -0
  526. package/dist/fonts/tahoma/Tahoma-GE.woff2 +0 -0
  527. package/dist/fonts/tahoma/Tahoma-L.woff2 +0 -0
  528. package/dist/fonts/tahoma/Tahoma-LE.woff2 +0 -0
  529. package/dist/fonts/times/Times-L.woff2 +0 -0
  530. package/dist/fonts/times/Times-LE.woff2 +0 -0
  531. package/dist/fonts/times-new-roman/TimesNewRoman-C.woff2 +0 -0
  532. package/dist/fonts/times-new-roman/TimesNewRoman-CE.woff2 +0 -0
  533. package/dist/fonts/times-new-roman/TimesNewRoman-G.woff2 +0 -0
  534. package/dist/fonts/times-new-roman/TimesNewRoman-GE.woff2 +0 -0
  535. package/dist/fonts/times-new-roman/TimesNewRoman-L.woff2 +0 -0
  536. package/dist/fonts/times-new-roman/TimesNewRoman-LE.woff2 +0 -0
  537. package/dist/fonts/times-new-roman/TimesNewRoman-V.woff2 +0 -0
  538. package/dist/fonts/verdana/Verdana-C.woff2 +0 -0
  539. package/dist/fonts/verdana/Verdana-CE.woff2 +0 -0
  540. package/dist/fonts/verdana/Verdana-G.woff2 +0 -0
  541. package/dist/fonts/verdana/Verdana-GE.woff2 +0 -0
  542. package/dist/fonts/verdana/Verdana-L.woff2 +0 -0
  543. package/dist/fonts/verdana/Verdana-LE.woff2 +0 -0
  544. package/dist/fonts/verdana/Verdana-V.woff2 +0 -0
  545. package/dist/hyphenize.js +0 -20
  546. package/dist/index.js +0 -80
  547. package/dist/insertTable.js +0 -50
  548. package/dist/insertTable.js.flow +0 -56
  549. package/dist/isEditorStateEmpty.js +0 -38
  550. package/dist/isTableNode.js +0 -12
  551. package/dist/joinDown.js +0 -28
  552. package/dist/joinListNode.js +0 -38
  553. package/dist/joinUp.js +0 -33
  554. package/dist/keymaps.js +0 -106
  555. package/dist/lookUpElement.js +0 -15
  556. package/dist/nodeAt.js +0 -15
  557. package/dist/normalizeHTML.js +0 -70
  558. package/dist/normalizeHTML.js.flow +0 -78
  559. package/dist/patchAnchorElements.js +0 -37
  560. package/dist/patchAnchorElements.js.flow +0 -38
  561. package/dist/patchBreakElements.js +0 -28
  562. package/dist/patchElementInlineStyles.js +0 -70
  563. package/dist/patchElementInlineStyles.js.flow +0 -92
  564. package/dist/patchListElements.js +0 -248
  565. package/dist/patchListElements.js.flow +0 -276
  566. package/dist/patchMathElements.js +0 -69
  567. package/dist/patchParagraphElements.js +0 -21
  568. package/dist/patchParagraphElements.js.flow +0 -20
  569. package/dist/patchStyleElements.js +0 -162
  570. package/dist/patchStyleElements.js.flow +0 -194
  571. package/dist/patchTableElements.js +0 -98
  572. package/dist/patchTableElements.js.flow +0 -89
  573. package/dist/rebaseDocWithSteps.js +0 -32
  574. package/dist/sanitizeURL.js +0 -16
  575. package/dist/splitListItem.js +0 -180
  576. package/dist/splitListItem.js.flow +0 -191
  577. package/dist/styles.css +0 -19
  578. package/dist/styles0.css +0 -29
  579. package/dist/toClosestFontPtSize.js +0 -25
  580. package/dist/toClosestFontPtSize.js.flow +0 -22
  581. package/dist/toSafeHTMLDocument.js +0 -13
  582. package/dist/toggleBlockquote.js +0 -86
  583. package/dist/toggleBlockquote.js.flow +0 -91
  584. package/dist/toggleCodeBlock.js +0 -89
  585. package/dist/ui/AlertInfo.js +0 -59
  586. package/dist/ui/BookmarkNodeView.js +0 -77
  587. package/dist/ui/BookmarkNodeView.js.flow +0 -66
  588. package/dist/ui/CommandButton.js +0 -65
  589. package/dist/ui/CommandMenu.js +0 -83
  590. package/dist/ui/CommandMenu.js.flow +0 -75
  591. package/dist/ui/CommandMenuButton.js +0 -120
  592. package/dist/ui/CommandMenuButton.js.flow +0 -131
  593. package/dist/ui/CustomEditorView.js +0 -34
  594. package/dist/ui/CustomEditorView.js.flow +0 -28
  595. package/dist/ui/CustomMenu.js +0 -23
  596. package/dist/ui/CustomMenuItem.js +0 -43
  597. package/dist/ui/CustomNodeView.js +0 -193
  598. package/dist/ui/CustomNodeView.js.flow +0 -200
  599. package/dist/ui/CustomRadioButton.js +0 -67
  600. package/dist/ui/CustomRadioButton.js.flow +0 -65
  601. package/dist/ui/DocLayoutEditor.js +0 -142
  602. package/dist/ui/DocLayoutEditor.js.flow +0 -146
  603. package/dist/ui/Editor.js +0 -289
  604. package/dist/ui/Editor.js.flow +0 -288
  605. package/dist/ui/EditorFrameset.js +0 -86
  606. package/dist/ui/EditorToolbar.js +0 -206
  607. package/dist/ui/EditorToolbar.js.flow +0 -211
  608. package/dist/ui/EditorToolbarConfig.js +0 -148
  609. package/dist/ui/EditorToolbarConfig.js.flow +0 -164
  610. package/dist/ui/FontSizeCommandMenuButton.js +0 -57
  611. package/dist/ui/FontSizeCommandMenuButton.js.flow +0 -66
  612. package/dist/ui/FontTypeCommandMenuButton.js +0 -55
  613. package/dist/ui/FontTypeCommandMenuButton.js.flow +0 -49
  614. package/dist/ui/Frag.js +0 -19
  615. package/dist/ui/Icon.js +0 -104
  616. package/dist/ui/Icon.js.flow +0 -89
  617. package/dist/ui/ImageInlineEditor.js +0 -76
  618. package/dist/ui/KeyCodes.js +0 -23
  619. package/dist/ui/LinkTooltip.js +0 -92
  620. package/dist/ui/LinkTooltip.js.flow +0 -85
  621. package/dist/ui/LinkURLEditor.js +0 -107
  622. package/dist/ui/LinkURLEditor.js.flow +0 -111
  623. package/dist/ui/ListItemNodeView.js +0 -91
  624. package/dist/ui/ListItemNodeView.js.flow +0 -98
  625. package/dist/ui/ListTypeButton.js +0 -123
  626. package/dist/ui/ListTypeButton.js.flow +0 -131
  627. package/dist/ui/ListTypeCommandButton.js +0 -81
  628. package/dist/ui/ListTypeCommandButton.js.flow +0 -85
  629. package/dist/ui/ListTypeMenu.js +0 -72
  630. package/dist/ui/ListTypeMenu.js.flow +0 -70
  631. package/dist/ui/LoadingIndicator.js +0 -28
  632. package/dist/ui/MathEditor.js +0 -80
  633. package/dist/ui/MathEditor.js.flow +0 -78
  634. package/dist/ui/MathInlineEditor.js +0 -111
  635. package/dist/ui/MathInlineEditor.js.flow +0 -102
  636. package/dist/ui/MathNodeView.js +0 -190
  637. package/dist/ui/MathNodeView.js.flow +0 -175
  638. package/dist/ui/PasteMenu.js +0 -56
  639. package/dist/ui/ResizeObserver.js +0 -94
  640. package/dist/ui/RichTextEditor.js +0 -121
  641. package/dist/ui/RichTextEditor.js.flow +0 -133
  642. package/dist/ui/SelectionObserver.js +0 -116
  643. package/dist/ui/TableCellMenu.js +0 -53
  644. package/dist/ui/TableCellMenu.js.flow +0 -51
  645. package/dist/ui/TableGridSizeEditor.js +0 -191
  646. package/dist/ui/TableGridSizeEditor.js.flow +0 -184
  647. package/dist/ui/TableNodeView.js +0 -31
  648. package/dist/ui/bindScrollHandler.js +0 -39
  649. package/dist/ui/canUseCSSFont.js +0 -37
  650. package/dist/ui/czi-link-tooltip.css +0 -71
  651. package/dist/ui/czi-table.css +0 -86
  652. package/dist/ui/czi-vars.css +0 -2
  653. package/dist/ui/findActiveFontSize.js +0 -61
  654. package/dist/ui/findActiveFontSize.js.flow +0 -58
  655. package/dist/ui/findActiveFontType.js +0 -42
  656. package/dist/ui/findActiveFontType.js.flow +0 -38
  657. package/dist/ui/handleEditorDrop.js +0 -33
  658. package/dist/ui/handleEditorDrop.js.flow +0 -28
  659. package/dist/ui/handleEditorKeyDown.js +0 -29
  660. package/dist/ui/handleEditorKeyDown.js.flow +0 -39
  661. package/dist/ui/handleEditorPaste.js +0 -30
  662. package/dist/ui/handleEditorPaste.js.flow +0 -33
  663. package/dist/ui/htmlElementToRect.js +0 -25
  664. package/dist/ui/injectStyleSheet.js +0 -46
  665. package/dist/ui/isElementFullyVisible.js +0 -29
  666. package/dist/ui/isOffline.js +0 -12
  667. package/dist/ui/isReactClass.js +0 -16
  668. package/dist/ui/mathquill-editor/MathQuillEditor.js +0 -148
  669. package/dist/ui/mathquill-editor/MathQuillEditor.js.flow +0 -159
  670. package/dist/ui/mathquill-editor/MathQuillEditorSymbols.js +0 -488
  671. package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +0 -60
  672. package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js.flow +0 -48
  673. package/dist/ui/mathquill-editor/mathquill-import-kludge.js +0 -30
  674. package/dist/ui/mathquill-editor/mathquill-import-kludge.js.flow +0 -24
  675. package/dist/ui/renderLaTeXAsHTML.js +0 -45
  676. package/dist/ui/renderLaTeXAsHTML.js.flow +0 -46
  677. package/dist/ui/resolveImage.js +0 -125
  678. package/dist/ui/toCSSColor.js +0 -52
  679. package/dist/ui/toCSSLineSpacing.js +0 -59
  680. package/dist/ui/toHexColor.js +0 -29
  681. package/dist/ui/uuid.js +0 -12
  682. package/dist/uuid.js +0 -12
  683. package/flow-typed/@modusoperandilicit-customstyles.js +0 -5
  684. package/flow-typed/@modusoperandilicit-doc-attrs-step.js +0 -5
  685. package/flow-typed/@modusoperandilicit-ui-commands.js +0 -5
  686. package/flow-typed/create-emotion.js +0 -5
  687. package/flow-typed/docs-editor.js +0 -3
  688. package/flow-typed/draft-convert.js +0 -3
  689. package/flow-typed/draft-js.js +0 -3
  690. package/flow-typed/flatted.js +0 -5
  691. package/flow-typed/jquery.js +0 -5
  692. package/flow-typed/katex.js +0 -7
  693. package/flow-typed/mathquill.js +0 -5
  694. package/flow-typed/prosemirror-collab.js +0 -5
  695. package/flow-typed/prosemirror-commands.js +0 -5
  696. package/flow-typed/prosemirror-dev-tools.js +0 -5
  697. package/flow-typed/prosemirror-dropcursor.js +0 -5
  698. package/flow-typed/prosemirror-gapcursor.js +0 -5
  699. package/flow-typed/prosemirror-history.js +0 -5
  700. package/flow-typed/prosemirror-inputrules.js +0 -5
  701. package/flow-typed/prosemirror-keymap.js +0 -5
  702. package/flow-typed/prosemirror-model.js +0 -5
  703. package/flow-typed/prosemirror-state.js +0 -5
  704. package/flow-typed/prosemirror-tables.js +0 -5
  705. package/flow-typed/prosemirror-transform.js +0 -5
  706. package/flow-typed/prosemirror-utils.js +0 -5
  707. package/flow-typed/prosemirror-view.js +0 -5
  708. package/flow-typed/resize-observer-polyfill.js +0 -5
  709. package/flow-typed/uuid.js +0 -5
  710. package/jest.config.js +0 -207
  711. package/jest.setup.js +0 -5
  712. package/licit/client/CustomLicitRuntime.js +0 -298
  713. package/licit/client/CustomStyleRuntime.js +0 -136
  714. package/licit/client/index.js +0 -367
  715. package/licit/index.html +0 -11
  716. package/licit/server/collab/instance.js +0 -236
  717. package/licit/server/collab/route.js +0 -69
  718. package/licit/server/collab/server.js +0 -317
  719. package/licit/server/collab/start.js +0 -13
  720. package/licit/server/image/start.js +0 -58
  721. package/lint.sh +0 -4
  722. package/run_collab_server.py +0 -21
  723. package/run_image_server.py +0 -20
  724. package/run_web_server.py +0 -25
  725. package/scripts/build_bin.js +0 -10
  726. package/scripts/build_bin.py +0 -103
  727. package/scripts/ci_check_dist.sh +0 -14
  728. package/scripts/env.js +0 -6
  729. package/scripts/webserver.js +0 -35
  730. package/sonar-project.properties +0 -12
  731. package/src/BlockquoteInsertNewLineCommand.js +0 -55
  732. package/src/BlockquoteNodeSpec.js +0 -30
  733. package/src/BlockquoteToggleCommand.js +0 -34
  734. package/src/BookmarkNodeSpec.js +0 -39
  735. package/src/BulletListNodeSpec.js +0 -61
  736. package/src/CZIProseMirror.js +0 -90
  737. package/src/CodeBlockCommand.js +0 -43
  738. package/src/CodeBlockNodeSpec.js +0 -24
  739. package/src/CodeMarkSpec.js +0 -14
  740. package/src/ContentPlaceholderPlugin.js +0 -187
  741. package/src/CursorPlaceholderPlugin.js +0 -115
  742. package/src/DocLayoutCommand.js +0 -94
  743. package/src/DocNodeSpec.js +0 -64
  744. package/src/EMMarkSpec.js +0 -14
  745. package/src/EditorCommands.js +0 -124
  746. package/src/EditorKeyMap.js +0 -187
  747. package/src/EditorMarks.js +0 -71
  748. package/src/EditorNodes.js +0 -59
  749. package/src/EditorPageLayoutPlugin.js +0 -67
  750. package/src/EditorPlugins.js +0 -8
  751. package/src/EditorSchema.js +0 -12
  752. package/src/EditorState.js +0 -7
  753. package/src/FontSizeMarkSpec.js +0 -49
  754. package/src/FontTypeMarkSpec.js +0 -80
  755. package/src/HTMLMutator.js +0 -59
  756. package/src/HardBreakNodeSpec.js +0 -15
  757. package/src/HeadingNodeSpec.js +0 -52
  758. package/src/HistoryRedoCommand.js +0 -20
  759. package/src/HistoryUndoCommand.js +0 -20
  760. package/src/HorizontalRuleCommand.js +0 -49
  761. package/src/HorizontalRuleNodeSpec.js +0 -39
  762. package/src/ImageUploadPlaceholderPlugin.js +0 -192
  763. package/src/LinkMarkSpec.js +0 -32
  764. package/src/LinkSetURLCommand.js +0 -103
  765. package/src/LinkTooltipPlugin.js +0 -192
  766. package/src/ListItemInsertNewLineCommand.js +0 -55
  767. package/src/ListItemMergeCommand.js +0 -177
  768. package/src/ListItemNodeSpec.js +0 -52
  769. package/src/ListSplitCommand.js +0 -32
  770. package/src/ListToggleCommand.js +0 -77
  771. package/src/MarkNames.js +0 -18
  772. package/src/MarksClearCommand.js +0 -42
  773. package/src/MathEditCommand.js +0 -110
  774. package/src/MathNodeSpec.js +0 -46
  775. package/src/NodeNames.js +0 -23
  776. package/src/OrderedListNodeSpec.js +0 -132
  777. package/src/ParagraphNodeSpec.js +0 -156
  778. package/src/ParagraphSpacingCommand.js +0 -121
  779. package/src/PrintCommand.js +0 -31
  780. package/src/SelectionPlaceholderPlugin.js +0 -131
  781. package/src/SpacerMarkSpec.js +0 -47
  782. package/src/StrikeMarkSpec.js +0 -21
  783. package/src/StrongMarkSpec.js +0 -25
  784. package/src/StyleView.js +0 -19
  785. package/src/TableBackgroundColorCommand.js +0 -75
  786. package/src/TableBorderColorCommand.js +0 -75
  787. package/src/TableCellColorCommand.js +0 -71
  788. package/src/TableCellMenuPlugin.js +0 -132
  789. package/src/TableInsertCommand.js +0 -112
  790. package/src/TableMergeCellsCommand.js +0 -90
  791. package/src/TableNodesSpecs.js +0 -78
  792. package/src/TablePlugins.js +0 -14
  793. package/src/TableResizePlugin.js +0 -632
  794. package/src/TextColorMarkSpec.js +0 -35
  795. package/src/TextHighlightMarkSpec.js +0 -38
  796. package/src/TextInsertTabSpaceCommand.js +0 -83
  797. package/src/TextNoWrapMarkSpec.js +0 -14
  798. package/src/TextNodeSpec.js +0 -7
  799. package/src/TextSelectionMarkSpec.js +0 -24
  800. package/src/TextSubMarkSpec.js +0 -20
  801. package/src/TextSuperMarkSpec.js +0 -20
  802. package/src/TextUnderlineMarkSpec.js +0 -27
  803. package/src/Types.js +0 -75
  804. package/src/WebFontLoader.js +0 -22
  805. package/src/blockQuoteInputRule.js +0 -36
  806. package/src/browser.js +0 -7
  807. package/src/buildEditorPlugins.js +0 -49
  808. package/src/buildInputRules.js +0 -81
  809. package/src/client/CollabConnector.js +0 -90
  810. package/src/client/EditorConnection.js +0 -323
  811. package/src/client/Licit.js +0 -708
  812. package/src/client/Licit.test.js +0 -98
  813. package/src/client/Reporter.js +0 -37
  814. package/src/client/SimpleConnector.js +0 -61
  815. package/src/client/http.js +0 -70
  816. package/src/client/licit.css +0 -12
  817. package/src/client/throttle.js +0 -27
  818. package/src/convertFromDOMElement.js +0 -36
  819. package/src/convertFromHTML.js +0 -17
  820. package/src/convertFromJSON.js +0 -56
  821. package/src/convertToCSSPTValue.js +0 -22
  822. package/src/convertToJSON.js +0 -7
  823. package/src/createCommand.js +0 -40
  824. package/src/createEditorKeyMap.js +0 -94
  825. package/src/createEmptyEditorState.js +0 -31
  826. package/src/createTableResizingPlugin.js +0 -86
  827. package/src/findActionableCell.js +0 -74
  828. package/src/findActiveMark.js +0 -32
  829. package/src/hyphenize.js +0 -17
  830. package/src/index.js +0 -10
  831. package/src/insertTable.js +0 -56
  832. package/src/isEditorStateEmpty.js +0 -32
  833. package/src/isTableNode.js +0 -15
  834. package/src/joinDown.js +0 -27
  835. package/src/joinListNode.js +0 -55
  836. package/src/joinUp.js +0 -39
  837. package/src/keymaps.js +0 -185
  838. package/src/lookUpElement.js +0 -14
  839. package/src/nodeAt.js +0 -12
  840. package/src/normalizeHTML.js +0 -78
  841. package/src/patchAnchorElements.js +0 -38
  842. package/src/patchBreakElements.js +0 -22
  843. package/src/patchElementInlineStyles.js +0 -92
  844. package/src/patchListElements.js +0 -276
  845. package/src/patchMathElements.js +0 -60
  846. package/src/patchParagraphElements.js +0 -20
  847. package/src/patchStyleElements.js +0 -194
  848. package/src/patchTableElements.js +0 -89
  849. package/src/rebaseDocWithSteps.js +0 -42
  850. package/src/sanitizeURL.js +0 -13
  851. package/src/splitListItem.js +0 -191
  852. package/src/styles.css +0 -19
  853. package/src/styles0.css +0 -29
  854. package/src/toClosestFontPtSize.js +0 -22
  855. package/src/toSafeHTMLDocument.js +0 -9
  856. package/src/toggleBlockquote.js +0 -91
  857. package/src/toggleCodeBlock.js +0 -102
  858. package/src/ui/AlertInfo.js +0 -64
  859. package/src/ui/BookmarkNodeView.js +0 -66
  860. package/src/ui/CommandButton.js +0 -68
  861. package/src/ui/CommandMenu.js +0 -75
  862. package/src/ui/CommandMenuButton.js +0 -131
  863. package/src/ui/CustomEditorView.js +0 -28
  864. package/src/ui/CustomMenu.js +0 -17
  865. package/src/ui/CustomMenuItem.js +0 -36
  866. package/src/ui/CustomNodeView.js +0 -200
  867. package/src/ui/CustomRadioButton.js +0 -65
  868. package/src/ui/DocLayoutEditor.js +0 -146
  869. package/src/ui/Editor.js +0 -288
  870. package/src/ui/EditorFrameset.js +0 -81
  871. package/src/ui/EditorToolbar.js +0 -211
  872. package/src/ui/EditorToolbarConfig.js +0 -164
  873. package/src/ui/FontSizeCommandMenuButton.js +0 -66
  874. package/src/ui/FontTypeCommandMenuButton.js +0 -49
  875. package/src/ui/Frag.js +0 -13
  876. package/src/ui/Icon.js +0 -89
  877. package/src/ui/ImageInlineEditor.js +0 -67
  878. package/src/ui/KeyCodes.js +0 -12
  879. package/src/ui/LinkTooltip.js +0 -85
  880. package/src/ui/LinkURLEditor.js +0 -111
  881. package/src/ui/ListItemNodeView.js +0 -98
  882. package/src/ui/ListTypeButton.js +0 -131
  883. package/src/ui/ListTypeCommandButton.js +0 -85
  884. package/src/ui/ListTypeMenu.js +0 -70
  885. package/src/ui/LoadingIndicator.js +0 -20
  886. package/src/ui/MathEditor.js +0 -78
  887. package/src/ui/MathInlineEditor.js +0 -102
  888. package/src/ui/MathNodeView.js +0 -175
  889. package/src/ui/PasteMenu.js +0 -57
  890. package/src/ui/ResizeObserver.js +0 -106
  891. package/src/ui/RichTextEditor.js +0 -133
  892. package/src/ui/SelectionObserver.js +0 -134
  893. package/src/ui/TableCellMenu.js +0 -51
  894. package/src/ui/TableGridSizeEditor.js +0 -184
  895. package/src/ui/TableNodeView.js +0 -25
  896. package/src/ui/bindScrollHandler.js +0 -46
  897. package/src/ui/canUseCSSFont.js +0 -43
  898. package/src/ui/czi-body-layout-editor.css +0 -16
  899. package/src/ui/czi-bookmark-view.css +0 -10
  900. package/src/ui/czi-cursor-placeholder.css +0 -36
  901. package/src/ui/czi-custom-menu-button.css +0 -18
  902. package/src/ui/czi-custom-menu-item.css +0 -30
  903. package/src/ui/czi-custom-menu.css +0 -8
  904. package/src/ui/czi-custom-radio-button.css +0 -80
  905. package/src/ui/czi-custom-scrollbar.css +0 -21
  906. package/src/ui/czi-editor-frameset.css +0 -81
  907. package/src/ui/czi-editor-toolbar.css +0 -122
  908. package/src/ui/czi-editor.css +0 -220
  909. package/src/ui/czi-form.css +0 -107
  910. package/src/ui/czi-frag.css +0 -3
  911. package/src/ui/czi-heading.css +0 -40
  912. package/src/ui/czi-icon.css +0 -72
  913. package/src/ui/czi-image-resize-box.css +0 -165
  914. package/src/ui/czi-image-upload-editor.css +0 -57
  915. package/src/ui/czi-image-upload-placeholder.css +0 -50
  916. package/src/ui/czi-image-url-editor.css +0 -38
  917. package/src/ui/czi-image-view.css +0 -125
  918. package/src/ui/czi-indent.css +0 -137
  919. package/src/ui/czi-inline-editor.css +0 -20
  920. package/src/ui/czi-link-tooltip.css +0 -71
  921. package/src/ui/czi-list.css +0 -410
  922. package/src/ui/czi-loading-indicator.css +0 -111
  923. package/src/ui/czi-math-view.css +0 -62
  924. package/src/ui/czi-selection-placeholder.css +0 -24
  925. package/src/ui/czi-table-cell-menu.css +0 -14
  926. package/src/ui/czi-table-grid-size-editor.css +0 -37
  927. package/src/ui/czi-table.css +0 -86
  928. package/src/ui/czi-vars.css +0 -2
  929. package/src/ui/findActiveFontSize.js +0 -58
  930. package/src/ui/findActiveFontType.js +0 -38
  931. package/src/ui/fonts.css +0 -471
  932. package/src/ui/handleEditorDrop.js +0 -28
  933. package/src/ui/handleEditorKeyDown.js +0 -39
  934. package/src/ui/handleEditorPaste.js +0 -33
  935. package/src/ui/htmlElementToRect.js +0 -18
  936. package/src/ui/icon-font.css +0 -10
  937. package/src/ui/injectStyleSheet.js +0 -42
  938. package/src/ui/isElementFullyVisible.js +0 -26
  939. package/src/ui/isOffline.js +0 -8
  940. package/src/ui/isReactClass.js +0 -12
  941. package/src/ui/listType.css +0 -21
  942. package/src/ui/mathquill-editor/MathQuillEditor.js +0 -159
  943. package/src/ui/mathquill-editor/MathQuillEditorSymbols.js +0 -483
  944. package/src/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +0 -48
  945. package/src/ui/mathquill-editor/czi-mathquill-editor-symbols-panel.css +0 -39
  946. package/src/ui/mathquill-editor/czi-mathquill-editor.css +0 -50
  947. package/src/ui/mathquill-editor/mathquill-import-kludge.js +0 -24
  948. package/src/ui/renderLaTeXAsHTML.js +0 -46
  949. package/src/ui/resolveImage.js +0 -123
  950. package/src/ui/toCSSColor.js +0 -51
  951. package/src/ui/toCSSLineSpacing.js +0 -55
  952. package/src/ui/toHexColor.js +0 -26
  953. package/src/ui/uuid.js +0 -9
  954. package/src/uuid.js +0 -9
  955. package/style-service.Dockerfile +0 -26
  956. package/utils/build_bin.js +0 -9
  957. package/utils/build_image_server.js +0 -72
  958. package/utils/build_licit_collab_server.js +0 -76
  959. package/utils/build_web_server.js +0 -37
  960. package/utils/env.js +0 -6
  961. package/webpack.config.js +0 -128
  962. /package/{dist/CodeBlockNodeSpec.js.flow → CodeBlockNodeSpec.js.flow} +0 -0
  963. /package/{dist/CursorPlaceholderPlugin.js.flow → CursorPlaceholderPlugin.js.flow} +0 -0
  964. /package/{dist/EditorState.js.flow → EditorState.js.flow} +0 -0
  965. /package/{dist/HardBreakNodeSpec.js.flow → HardBreakNodeSpec.js.flow} +0 -0
  966. /package/{dist/HeadingNodeSpec.js.flow → HeadingNodeSpec.js.flow} +0 -0
  967. /package/{dist/HorizontalRuleNodeSpec.js.flow → HorizontalRuleNodeSpec.js.flow} +0 -0
  968. /package/{dist/MarkNames.js.flow → MarkNames.js.flow} +0 -0
  969. /package/{dist/NodeNames.js.flow → NodeNames.js.flow} +0 -0
  970. /package/{dist/SelectionPlaceholderPlugin.js.flow → SelectionPlaceholderPlugin.js.flow} +0 -0
  971. /package/{dist/StyleView.js.flow → StyleView.js.flow} +0 -0
  972. /package/{dist/TableBackgroundColorCommand.js.flow → TableBackgroundColorCommand.js.flow} +0 -0
  973. /package/{dist/TableBorderColorCommand.js.flow → TableBorderColorCommand.js.flow} +0 -0
  974. /package/{dist/TextNodeSpec.js.flow → TextNodeSpec.js.flow} +0 -0
  975. /package/{dist/Types.js.flow → Types.js.flow} +0 -0
  976. /package/{dist/WebFontLoader.js.flow → WebFontLoader.js.flow} +0 -0
  977. /package/{dist/browser.js.flow → browser.js.flow} +0 -0
  978. /package/{dist/client → client}/Reporter.js.flow +0 -0
  979. /package/{dist/client → client}/SimpleConnector.js.flow +0 -0
  980. /package/{dist/client → client}/http.js.flow +0 -0
  981. /package/{dist/client → client}/licit.css +0 -0
  982. /package/{dist/client → client}/throttle.js.flow +0 -0
  983. /package/{dist/convertToCSSPTValue.js.flow → convertToCSSPTValue.js.flow} +0 -0
  984. /package/{dist/convertToJSON.js.flow → convertToJSON.js.flow} +0 -0
  985. /package/{dist/createTableResizingPlugin.js.flow → createTableResizingPlugin.js.flow} +0 -0
  986. /package/{dist/findActiveMark.js.flow → findActiveMark.js.flow} +0 -0
  987. /package/{dist/hyphenize.js.flow → hyphenize.js.flow} +0 -0
  988. /package/{dist/index.js.flow → index.js.flow} +0 -0
  989. /package/{dist/isEditorStateEmpty.js.flow → isEditorStateEmpty.js.flow} +0 -0
  990. /package/{dist/isTableNode.js.flow → isTableNode.js.flow} +0 -0
  991. /package/{dist/joinDown.js.flow → joinDown.js.flow} +0 -0
  992. /package/{dist/joinListNode.js.flow → joinListNode.js.flow} +0 -0
  993. /package/{dist/joinUp.js.flow → joinUp.js.flow} +0 -0
  994. /package/{dist/keymaps.js.flow → keymaps.js.flow} +0 -0
  995. /package/{dist/lookUpElement.js.flow → lookUpElement.js.flow} +0 -0
  996. /package/{dist/nodeAt.js.flow → nodeAt.js.flow} +0 -0
  997. /package/{dist/patchBreakElements.js.flow → patchBreakElements.js.flow} +0 -0
  998. /package/{dist/patchMathElements.js.flow → patchMathElements.js.flow} +0 -0
  999. /package/{dist/rebaseDocWithSteps.js.flow → rebaseDocWithSteps.js.flow} +0 -0
  1000. /package/{dist/sanitizeURL.js.flow → sanitizeURL.js.flow} +0 -0
  1001. /package/{dist/toSafeHTMLDocument.js.flow → toSafeHTMLDocument.js.flow} +0 -0
  1002. /package/{dist/toggleCodeBlock.js.flow → toggleCodeBlock.js.flow} +0 -0
  1003. /package/{dist/ui → ui}/AlertInfo.js.flow +0 -0
  1004. /package/{dist/ui → ui}/CommandButton.js.flow +0 -0
  1005. /package/{dist/ui → ui}/CustomMenu.js.flow +0 -0
  1006. /package/{dist/ui → ui}/CustomMenuItem.js.flow +0 -0
  1007. /package/{dist/ui → ui}/EditorFrameset.js.flow +0 -0
  1008. /package/{dist/ui → ui}/Frag.js.flow +0 -0
  1009. /package/{dist/ui → ui}/ImageInlineEditor.js.flow +0 -0
  1010. /package/{dist/ui → ui}/KeyCodes.js.flow +0 -0
  1011. /package/{dist/ui → ui}/LoadingIndicator.js.flow +0 -0
  1012. /package/{dist/ui → ui}/PasteMenu.js.flow +0 -0
  1013. /package/{dist/ui → ui}/ResizeObserver.js.flow +0 -0
  1014. /package/{dist/ui → ui}/SelectionObserver.js.flow +0 -0
  1015. /package/{dist/ui → ui}/TableNodeView.js.flow +0 -0
  1016. /package/{dist/ui → ui}/bindScrollHandler.js.flow +0 -0
  1017. /package/{dist/ui → ui}/canUseCSSFont.js.flow +0 -0
  1018. /package/{dist/ui → ui}/czi-body-layout-editor.css +0 -0
  1019. /package/{dist/ui → ui}/czi-bookmark-view.css +0 -0
  1020. /package/{dist/ui → ui}/czi-cursor-placeholder.css +0 -0
  1021. /package/{dist/ui → ui}/czi-custom-menu-button.css +0 -0
  1022. /package/{dist/ui → ui}/czi-custom-menu-item.css +0 -0
  1023. /package/{dist/ui → ui}/czi-custom-menu.css +0 -0
  1024. /package/{dist/ui → ui}/czi-custom-radio-button.css +0 -0
  1025. /package/{dist/ui → ui}/czi-custom-scrollbar.css +0 -0
  1026. /package/{dist/ui → ui}/czi-editor-frameset.css +0 -0
  1027. /package/{dist/ui → ui}/czi-editor-toolbar.css +0 -0
  1028. /package/{dist/ui → ui}/czi-editor.css +0 -0
  1029. /package/{dist/ui → ui}/czi-form.css +0 -0
  1030. /package/{dist/ui → ui}/czi-frag.css +0 -0
  1031. /package/{dist/ui → ui}/czi-heading.css +0 -0
  1032. /package/{dist/ui → ui}/czi-icon.css +0 -0
  1033. /package/{dist/ui → ui}/czi-image-resize-box.css +0 -0
  1034. /package/{dist/ui → ui}/czi-image-upload-editor.css +0 -0
  1035. /package/{dist/ui → ui}/czi-image-upload-placeholder.css +0 -0
  1036. /package/{dist/ui → ui}/czi-image-url-editor.css +0 -0
  1037. /package/{dist/ui → ui}/czi-image-view.css +0 -0
  1038. /package/{dist/ui → ui}/czi-indent.css +0 -0
  1039. /package/{dist/ui → ui}/czi-inline-editor.css +0 -0
  1040. /package/{dist/ui → ui}/czi-list.css +0 -0
  1041. /package/{dist/ui → ui}/czi-loading-indicator.css +0 -0
  1042. /package/{dist/ui → ui}/czi-math-view.css +0 -0
  1043. /package/{dist/ui → ui}/czi-selection-placeholder.css +0 -0
  1044. /package/{dist/ui → ui}/czi-table-cell-menu.css +0 -0
  1045. /package/{dist/ui → ui}/czi-table-grid-size-editor.css +0 -0
  1046. /package/{dist/ui → ui}/fonts.css +0 -0
  1047. /package/{dist/ui → ui}/htmlElementToRect.js.flow +0 -0
  1048. /package/{dist/ui → ui}/icon-font.css +0 -0
  1049. /package/{dist/ui → ui}/injectStyleSheet.js.flow +0 -0
  1050. /package/{dist/ui → ui}/isElementFullyVisible.js.flow +0 -0
  1051. /package/{dist/ui → ui}/isOffline.js.flow +0 -0
  1052. /package/{dist/ui → ui}/isReactClass.js.flow +0 -0
  1053. /package/{dist/ui → ui}/listType.css +0 -0
  1054. /package/{dist/ui → ui}/mathquill-editor/MathQuillEditorSymbols.js.flow +0 -0
  1055. /package/{dist/ui → ui}/mathquill-editor/czi-mathquill-editor-symbols-panel.css +0 -0
  1056. /package/{dist/ui → ui}/mathquill-editor/czi-mathquill-editor.css +0 -0
  1057. /package/{dist/ui → ui}/resolveImage.js.flow +0 -0
  1058. /package/{dist/ui → ui}/toCSSColor.js.flow +0 -0
  1059. /package/{dist/ui → ui}/toCSSLineSpacing.js.flow +0 -0
  1060. /package/{dist/ui → ui}/toHexColor.js.flow +0 -0
  1061. /package/{dist/ui → ui}/uuid.js.flow +0 -0
  1062. /package/{dist/uuid.js.flow → uuid.js.flow} +0 -0
@@ -0,0 +1,113 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
7
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
10
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
12
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
13
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
+ import { EditorView } from 'prosemirror-view';
19
+ import * as React from 'react';
20
+ import scrollIntoView from 'smooth-scroll-into-view-if-needed';
21
+ import sanitizeURL from '../sanitizeURL.js';
22
+ import { CustomButton } from '@modusoperandi/licit-ui-commands';
23
+ import './czi-link-tooltip.css';
24
+ function isBookMarkHref(href) {
25
+ return !!href && href.indexOf('#') === 0 && href.length >= 2;
26
+ }
27
+ var LinkTooltip = /*#__PURE__*/function (_React$PureComponent) {
28
+ _inherits(LinkTooltip, _React$PureComponent);
29
+ function LinkTooltip() {
30
+ var _this;
31
+ _classCallCheck(this, LinkTooltip);
32
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
33
+ args[_key] = arguments[_key];
34
+ }
35
+ _this = _callSuper(this, LinkTooltip, [].concat(args));
36
+ _defineProperty(_assertThisInitialized(_this), "props", void 0);
37
+ _defineProperty(_assertThisInitialized(_this), "_unmounted", false);
38
+ _defineProperty(_assertThisInitialized(_this), "state", {
39
+ hidden: false
40
+ });
41
+ _defineProperty(_assertThisInitialized(_this), "_openLink", function (href) {
42
+ if (isBookMarkHref(href)) {
43
+ var id = href.substr(1);
44
+ var el = document.getElementById(id);
45
+ if (el) {
46
+ var _this$props = _this.props,
47
+ onCancel = _this$props.onCancel,
48
+ editorView = _this$props.editorView;
49
+ onCancel(editorView);
50
+ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
51
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
52
+ while (1) switch (_context.prev = _context.next) {
53
+ case 0:
54
+ _context.next = 2;
55
+ return scrollIntoView(el, {
56
+ scrollMode: 'if-needed',
57
+ // block: 'nearest',
58
+ // inline: 'nearest',
59
+ behavior: 'smooth'
60
+ });
61
+ case 2:
62
+ case "end":
63
+ return _context.stop();
64
+ }
65
+ }, _callee);
66
+ }))();
67
+ }
68
+ return;
69
+ }
70
+ if (href) {
71
+ window.open(sanitizeURL(href));
72
+ }
73
+ });
74
+ return _this;
75
+ }
76
+ _createClass(LinkTooltip, [{
77
+ key: "render",
78
+ value: function render() {
79
+ var _this$props2 = this.props,
80
+ href = _this$props2.href,
81
+ editorView = _this$props2.editorView,
82
+ onEdit = _this$props2.onEdit,
83
+ onRemove = _this$props2.onRemove;
84
+ // [FS] IRAD-1013 2020-07-09
85
+ // Change button in "Apply Link" missing in LICIT.
86
+
87
+ return /*#__PURE__*/React.createElement("div", {
88
+ className: "czi-link-tooltip"
89
+ }, /*#__PURE__*/React.createElement("div", {
90
+ className: "czi-link-tooltip-body"
91
+ }, /*#__PURE__*/React.createElement("div", {
92
+ className: "czi-link-tooltip-row"
93
+ }, /*#__PURE__*/React.createElement(CustomButton, {
94
+ className: "czi-link-tooltip-href",
95
+ label: href,
96
+ onClick: this._openLink,
97
+ target: "new",
98
+ title: href,
99
+ value: href
100
+ }), /*#__PURE__*/React.createElement(CustomButton, {
101
+ label: "Change",
102
+ onClick: onEdit,
103
+ value: editorView
104
+ }), /*#__PURE__*/React.createElement(CustomButton, {
105
+ label: "Remove",
106
+ onClick: onRemove,
107
+ value: editorView
108
+ }))));
109
+ }
110
+ }]);
111
+ return LinkTooltip;
112
+ }(React.PureComponent);
113
+ export default LinkTooltip;
@@ -0,0 +1,85 @@
1
+ // @flow
2
+
3
+ import { EditorView } from 'prosemirror-view';
4
+ import * as React from 'react';
5
+ import scrollIntoView from 'smooth-scroll-into-view-if-needed';
6
+
7
+ import sanitizeURL from '../sanitizeURL.js';
8
+ import { CustomButton } from '@modusoperandi/licit-ui-commands';
9
+
10
+ import './czi-link-tooltip.css';
11
+
12
+ function isBookMarkHref(href: string): boolean {
13
+ return !!href && href.indexOf('#') === 0 && href.length >= 2;
14
+ }
15
+
16
+ class LinkTooltip extends React.PureComponent<any, any> {
17
+ props: {
18
+ editorView: EditorView,
19
+ href: string,
20
+ onCancel: (view: EditorView) => void,
21
+ onEdit: (view: EditorView) => void,
22
+ onRemove: (view: EditorView) => void,
23
+ };
24
+
25
+ _unmounted = false;
26
+
27
+ state = {
28
+ hidden: false,
29
+ };
30
+
31
+ render(): React.Element<any> {
32
+ const { href, editorView, onEdit, onRemove } = this.props;
33
+ // [FS] IRAD-1013 2020-07-09
34
+ // Change button in "Apply Link" missing in LICIT.
35
+
36
+ return (
37
+ <div className="czi-link-tooltip">
38
+ <div className="czi-link-tooltip-body">
39
+ <div className="czi-link-tooltip-row">
40
+ <CustomButton
41
+ className="czi-link-tooltip-href"
42
+ label={href}
43
+ onClick={this._openLink}
44
+ target="new"
45
+ title={href}
46
+ value={href}
47
+ />
48
+ <CustomButton label="Change" onClick={onEdit} value={editorView} />
49
+ <CustomButton
50
+ label="Remove"
51
+ onClick={onRemove}
52
+ value={editorView}
53
+ />
54
+ </div>
55
+ </div>
56
+ </div>
57
+ );
58
+ }
59
+
60
+ _openLink = (href: string): void => {
61
+ if (isBookMarkHref(href)) {
62
+ const id = href.substr(1);
63
+ const el = document.getElementById(id);
64
+ if (el) {
65
+ const { onCancel, editorView } = this.props;
66
+ onCancel(editorView);
67
+ (async () => {
68
+ // https://www.npmjs.com/package/smooth-scroll-into-view-if-needed
69
+ await scrollIntoView(el, {
70
+ scrollMode: 'if-needed',
71
+ // block: 'nearest',
72
+ // inline: 'nearest',
73
+ behavior: 'smooth',
74
+ });
75
+ })();
76
+ }
77
+ return;
78
+ }
79
+ if (href) {
80
+ window.open(sanitizeURL(href));
81
+ }
82
+ };
83
+ }
84
+
85
+ export default LinkTooltip;
@@ -0,0 +1,114 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
6
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
7
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
9
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
10
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
+ import * as React from 'react';
16
+ import PropTypes from 'prop-types';
17
+ import sanitizeURL from '../sanitizeURL.js';
18
+ import { CustomButton } from '@modusoperandi/licit-ui-commands';
19
+ import { ENTER } from './KeyCodes.js';
20
+ import { preventEventDefault } from '@modusoperandi/licit-ui-commands';
21
+ import './czi-form.css';
22
+ import './czi-image-url-editor.css';
23
+ var BAD_CHARACTER_PATTER = /\s/;
24
+ var LinkURLEditor = /*#__PURE__*/function (_React$PureComponent) {
25
+ _inherits(LinkURLEditor, _React$PureComponent);
26
+ function LinkURLEditor() {
27
+ var _this;
28
+ _classCallCheck(this, LinkURLEditor);
29
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
30
+ args[_key] = arguments[_key];
31
+ }
32
+ _this = _callSuper(this, LinkURLEditor, [].concat(args));
33
+ _defineProperty(_assertThisInitialized(_this), "state", {
34
+ url: _this.props.href
35
+ });
36
+ _defineProperty(_assertThisInitialized(_this), "_onKeyDown", function (e) {
37
+ if (e.keyCode === ENTER) {
38
+ e.preventDefault();
39
+ _this._apply();
40
+ }
41
+ });
42
+ _defineProperty(_assertThisInitialized(_this), "_onURLChange", function (e) {
43
+ var url = e.target.value;
44
+ _this.setState({
45
+ url: url
46
+ });
47
+ });
48
+ _defineProperty(_assertThisInitialized(_this), "_cancel", function () {
49
+ _this.props.close();
50
+ });
51
+ _defineProperty(_assertThisInitialized(_this), "_apply", function () {
52
+ var url = _this.state.url;
53
+ if (url && !BAD_CHARACTER_PATTER.test(url)) {
54
+ _this.props.close(sanitizeURL(url));
55
+ }
56
+ });
57
+ return _this;
58
+ }
59
+ _createClass(LinkURLEditor, [{
60
+ key: "render",
61
+ value: function render() {
62
+ var href = this.props.href;
63
+ var url = this.state.url;
64
+ var error = url ? BAD_CHARACTER_PATTER.test(url) : false;
65
+ var label = 'Apply';
66
+ var disabled = !!error;
67
+ if (href) {
68
+ label = url ? 'Apply' : 'Remove';
69
+ disabled = error;
70
+ } else {
71
+ disabled = error || !url;
72
+ }
73
+ return /*#__PURE__*/React.createElement("div", {
74
+ className: "czi-image-url-editor"
75
+ }, /*#__PURE__*/React.createElement("form", {
76
+ className: "czi-form",
77
+ onSubmit: preventEventDefault
78
+ }, /*#__PURE__*/React.createElement("fieldset", null, /*#__PURE__*/React.createElement("legend", null, "Add a Link"), /*#__PURE__*/React.createElement("input", {
79
+ autoFocus: true,
80
+ onChange: this._onURLChange,
81
+ onKeyDown: this._onKeyDown,
82
+ placeholder: "Paste a URL",
83
+ spellCheck: false,
84
+ type: "text",
85
+ value: url || ''
86
+ })), /*#__PURE__*/React.createElement("div", {
87
+ className: "czi-form-buttons"
88
+ }, /*#__PURE__*/React.createElement(CustomButton, {
89
+ label: "Cancel",
90
+ onClick: this._cancel
91
+ }), /*#__PURE__*/React.createElement(CustomButton, {
92
+ active: true,
93
+ disabled: disabled,
94
+ label: label,
95
+ onClick: this._apply
96
+ }))));
97
+ }
98
+ }]);
99
+ return LinkURLEditor;
100
+ }(React.PureComponent);
101
+ // [FS] IRAD-1005 2020-07-07
102
+ // Upgrade outdated packages.
103
+ // To take care of the property type declaration.
104
+ _defineProperty(LinkURLEditor, "propsTypes", {
105
+ href: PropTypes.string,
106
+ close: function close(props, propName) {
107
+ var fn = props[propName];
108
+ if (!fn.prototype || typeof fn.prototype.constructor !== 'function' && fn.prototype.constructor.length !== 1) {
109
+ return new Error(propName + 'must be a function with 1 arg of type string');
110
+ }
111
+ return null;
112
+ }
113
+ });
114
+ export default LinkURLEditor;
@@ -0,0 +1,117 @@
1
+ // @flow
2
+
3
+ import * as React from 'react';
4
+ import PropTypes from 'prop-types';
5
+
6
+ import sanitizeURL from '../sanitizeURL.js';
7
+ import {
8
+ CustomButton
9
+ } from '@modusoperandi/licit-ui-commands';
10
+ import {
11
+ ENTER
12
+ } from './KeyCodes.js';
13
+ import {
14
+ preventEventDefault
15
+ } from '@modusoperandi/licit-ui-commands';
16
+
17
+ import './czi-form.css';
18
+ import './czi-image-url-editor.css';
19
+
20
+ const BAD_CHARACTER_PATTER = /\s/;
21
+
22
+ class LinkURLEditor extends React.PureComponent<any, any> {
23
+ // [FS] IRAD-1005 2020-07-07
24
+ // Upgrade outdated packages.
25
+ // To take care of the property type declaration.
26
+ static propsTypes = {
27
+ href: PropTypes.string,
28
+ close: function (props: any, propName: string) {
29
+ const fn = props[propName];
30
+ if (
31
+ !fn.prototype ||
32
+ (typeof fn.prototype.constructor !== 'function' &&
33
+ fn.prototype.constructor.length !== 1)
34
+ ) {
35
+ return new Error(
36
+ propName + 'must be a function with 1 arg of type string'
37
+ );
38
+ }
39
+ return null;
40
+ },
41
+ };
42
+
43
+ state = {
44
+ url: this.props.href,
45
+ };
46
+
47
+ render(): React.Element<any> {
48
+ const { href } = this.props;
49
+ const { url } = this.state;
50
+
51
+ const error = url ? BAD_CHARACTER_PATTER.test(url) : false;
52
+
53
+ let label = 'Apply';
54
+ let disabled = !!error;
55
+ if (href) {
56
+ label = url ? 'Apply' : 'Remove';
57
+ disabled = error;
58
+ } else {
59
+ disabled = error || !url;
60
+ }
61
+
62
+ return (
63
+ <div className="czi-image-url-editor">
64
+ <form className="czi-form" onSubmit={preventEventDefault}>
65
+ <fieldset>
66
+ <legend>Add a Link</legend>
67
+ <input
68
+ autoFocus={true}
69
+ onChange={this._onURLChange}
70
+ onKeyDown={this._onKeyDown}
71
+ placeholder="Paste a URL"
72
+ spellCheck={false}
73
+ type="text"
74
+ value={url || ''}
75
+ />
76
+ </fieldset>
77
+ <div className="czi-form-buttons">
78
+ <CustomButton label="Cancel" onClick={this._cancel} />
79
+ <CustomButton
80
+ active={true}
81
+ disabled={disabled}
82
+ label={label}
83
+ onClick={this._apply}
84
+ />
85
+ </div>
86
+ </form>
87
+ </div>
88
+ );
89
+ }
90
+
91
+ _onKeyDown = (e: any) => {
92
+ if (e.keyCode === ENTER) {
93
+ e.preventDefault();
94
+ this._apply();
95
+ }
96
+ };
97
+
98
+ _onURLChange = (e: SyntheticInputEvent<>) => {
99
+ const url = e.target.value;
100
+ this.setState({
101
+ url,
102
+ });
103
+ };
104
+
105
+ _cancel = (): void => {
106
+ this.props.close();
107
+ };
108
+
109
+ _apply = (): void => {
110
+ const { url } = this.state;
111
+ if (url && !BAD_CHARACTER_PATTER.test(url)) {
112
+ this.props.close(sanitizeURL(url));
113
+ }
114
+ };
115
+ }
116
+
117
+ export default LinkURLEditor;
@@ -0,0 +1,92 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ import { Node } from 'prosemirror-model';
9
+ import { Decoration, EditorView } from 'prosemirror-view';
10
+ import { MARK_TEXT_COLOR, MARK_FONT_SIZE } from '../MarkNames.js';
11
+
12
+ // This implements the `NodeView` interface
13
+ // https://prosemirror.net/docs/ref/#view.NodeView
14
+ var ListItemNodeView = /*#__PURE__*/function () {
15
+ function ListItemNodeView(node, editorView, getPos, decorations) {
16
+ _classCallCheck(this, ListItemNodeView);
17
+ // This implements the `NodeView` interface
18
+ // The outer DOM node that represents the list item element.
19
+ _defineProperty(this, "dom", void 0);
20
+ // This implements the `NodeView` interface.
21
+ // The DOM node that should hold the node's content.
22
+ _defineProperty(this, "contentDOM", void 0);
23
+ _defineProperty(this, "_nodeUpdated", void 0);
24
+ var dom = document.createElement('li');
25
+ this.dom = dom;
26
+ this.contentDOM = dom;
27
+ this._updateDOM(node);
28
+ }
29
+
30
+ // This implements the `NodeView` interface.
31
+ _createClass(ListItemNodeView, [{
32
+ key: "update",
33
+ value: function update(node, decorations) {
34
+ return this._updateDOM(node);
35
+ }
36
+ }, {
37
+ key: "_updateDOM",
38
+ value: function _updateDOM(node) {
39
+ if (this._nodeUpdated === node) {
40
+ return false;
41
+ }
42
+ this._nodeUpdated = node;
43
+ var dom = this.dom;
44
+ // According to `ListItemNodeSpec`, a valid list item has the following
45
+ // structure: `li > paragraph > text`.
46
+ var paragraph = node.firstChild;
47
+ var initialContent = paragraph ? paragraph.firstChild : null;
48
+
49
+ // This resolves the styles for the counter by examines the marks for the
50
+ // first text node of the list item.
51
+ var marks = initialContent && initialContent.isText && initialContent.textContent ? initialContent.marks : null;
52
+ var cssColor;
53
+ var cssFontSize;
54
+ var cssText = '';
55
+ if (Array.isArray(marks)) {
56
+ marks.forEach(function (mark) {
57
+ var attrs = mark.attrs,
58
+ type = mark.type;
59
+ switch (type.name) {
60
+ case MARK_TEXT_COLOR:
61
+ cssColor = attrs.color;
62
+ break;
63
+ case MARK_FONT_SIZE:
64
+ cssFontSize = attrs.pt;
65
+ break;
66
+ }
67
+ });
68
+ }
69
+
70
+ // The counter of the list item is a pseudo-element that uses
71
+ // the CSS variables (e.g `--czi-list-style-color`) for styling.
72
+ // This defines the CSS variables scoped for the pseudo-element.
73
+ // See `src/ui/czi-list.css` for more details.
74
+ if (cssColor) {
75
+ cssText += "--czi-list-style-color: ".concat(cssColor, ";");
76
+ }
77
+ if (cssFontSize) {
78
+ cssText += "--czi-list-style-font-size: ".concat(cssFontSize, "pt;");
79
+ }
80
+ dom.style.cssText = cssText;
81
+ var align = node.attrs.align;
82
+ if (align) {
83
+ dom.setAttribute('data-align', align);
84
+ } else {
85
+ dom.removeAttribute('data-align');
86
+ }
87
+ return true;
88
+ }
89
+ }]);
90
+ return ListItemNodeView;
91
+ }();
92
+ export default ListItemNodeView;
@@ -0,0 +1,98 @@
1
+ // @flow
2
+
3
+ import { Node } from 'prosemirror-model';
4
+ import { Decoration, EditorView } from 'prosemirror-view';
5
+ import { MARK_TEXT_COLOR, MARK_FONT_SIZE } from '../MarkNames.js';
6
+
7
+ // This implements the `NodeView` interface
8
+ // https://prosemirror.net/docs/ref/#view.NodeView
9
+ class ListItemNodeView {
10
+ // This implements the `NodeView` interface
11
+ // The outer DOM node that represents the list item element.
12
+ dom: HTMLLIElement;
13
+
14
+ // This implements the `NodeView` interface.
15
+ // The DOM node that should hold the node's content.
16
+ contentDOM: HTMLLIElement;
17
+
18
+ _nodeUpdated: ?Node;
19
+
20
+ constructor(
21
+ node: Node,
22
+ editorView: EditorView,
23
+ getPos: () => number,
24
+ decorations: Array<Decoration>
25
+ ) {
26
+ const dom = document.createElement('li');
27
+ this.dom = dom;
28
+ this.contentDOM = dom;
29
+ this._updateDOM(node);
30
+ }
31
+
32
+ // This implements the `NodeView` interface.
33
+ update(node: Node, decorations: Array<Decoration>): boolean {
34
+ return this._updateDOM(node);
35
+ }
36
+
37
+ _updateDOM(node: Node): boolean {
38
+ if (this._nodeUpdated === node) {
39
+ return false;
40
+ }
41
+
42
+ this._nodeUpdated = node;
43
+
44
+ const dom = this.dom;
45
+ // According to `ListItemNodeSpec`, a valid list item has the following
46
+ // structure: `li > paragraph > text`.
47
+ const paragraph = node.firstChild;
48
+ const initialContent = paragraph ? paragraph.firstChild : null;
49
+
50
+ // This resolves the styles for the counter by examines the marks for the
51
+ // first text node of the list item.
52
+ const marks =
53
+ initialContent && initialContent.isText && initialContent.textContent
54
+ ? initialContent.marks
55
+ : null;
56
+
57
+ let cssColor;
58
+ let cssFontSize;
59
+ let cssText = '';
60
+ if (Array.isArray(marks)) {
61
+ marks.forEach((mark) => {
62
+ const { attrs, type } = mark;
63
+ switch (type.name) {
64
+ case MARK_TEXT_COLOR:
65
+ cssColor = attrs.color;
66
+ break;
67
+ case MARK_FONT_SIZE:
68
+ cssFontSize = attrs.pt;
69
+ break;
70
+ }
71
+ });
72
+ }
73
+
74
+ // The counter of the list item is a pseudo-element that uses
75
+ // the CSS variables (e.g `--czi-list-style-color`) for styling.
76
+ // This defines the CSS variables scoped for the pseudo-element.
77
+ // See `src/ui/czi-list.css` for more details.
78
+ if (cssColor) {
79
+ cssText += `--czi-list-style-color: ${cssColor};`;
80
+ }
81
+
82
+ if (cssFontSize) {
83
+ cssText += `--czi-list-style-font-size: ${cssFontSize}pt;`;
84
+ }
85
+
86
+ dom.style.cssText = cssText;
87
+
88
+ const { align } = node.attrs;
89
+ if (align) {
90
+ dom.setAttribute('data-align', align);
91
+ } else {
92
+ dom.removeAttribute('data-align');
93
+ }
94
+ return true;
95
+ }
96
+ }
97
+
98
+ export default ListItemNodeView;