@modusoperandi/licit 0.13.24 → 0.14.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 (203) hide show
  1. package/.eslintrc.js +1 -1
  2. package/README.md +1 -0
  3. package/dist/BlockquoteInsertNewLineCommand.js +3 -23
  4. package/dist/BlockquoteNodeSpec.js +3 -13
  5. package/dist/BlockquoteToggleCommand.js +3 -16
  6. package/dist/BookmarkNodeSpec.js +0 -6
  7. package/dist/BulletListNodeSpec.js +2 -16
  8. package/dist/CZIProseMirror.js +3 -27
  9. package/dist/CodeBlockCommand.js +3 -19
  10. package/dist/CodeBlockNodeSpec.js +3 -4
  11. package/dist/CodeMarkSpec.js +0 -4
  12. package/dist/ContentPlaceholderPlugin.js +6 -58
  13. package/dist/CursorPlaceholderPlugin.js +2 -32
  14. package/dist/DocLayoutCommand.js +5 -28
  15. package/dist/DocNodeSpec.js +0 -9
  16. package/dist/EMMarkSpec.js +0 -4
  17. package/dist/EditorCommands.js +5 -33
  18. package/dist/EditorKeyMap.js +4 -18
  19. package/dist/EditorMarks.js +2 -26
  20. package/dist/EditorNodes.js +4 -22
  21. package/dist/EditorPageLayoutPlugin.js +3 -15
  22. package/dist/EditorPlugins.js +0 -4
  23. package/dist/EditorSchema.js +0 -5
  24. package/dist/EditorState.js +0 -2
  25. package/dist/FontSizeMarkSpec.js +0 -12
  26. package/dist/FontTypeMarkSpec.js +15 -19
  27. package/dist/HTMLMutator.js +5 -24
  28. package/dist/HardBreakNodeSpec.js +0 -2
  29. package/dist/HeadingNodeSpec.js +6 -15
  30. package/dist/HistoryRedoCommand.js +3 -11
  31. package/dist/HistoryUndoCommand.js +3 -11
  32. package/dist/HorizontalRuleCommand.js +3 -22
  33. package/dist/HorizontalRuleNodeSpec.js +0 -10
  34. package/dist/ImageFromURLCommand.js +0 -9
  35. package/dist/ImageNodeSpec.js +2 -14
  36. package/dist/ImageSourceCommand.js +3 -39
  37. package/dist/ImageUploadCommand.js +3 -21
  38. package/dist/ImageUploadPlaceholderPlugin.js +10 -48
  39. package/dist/LinkMarkSpec.js +0 -4
  40. package/dist/LinkSetURLCommand.js +3 -28
  41. package/dist/LinkTooltipPlugin.js +6 -52
  42. package/dist/ListItemInsertNewLineCommand.js +3 -23
  43. package/dist/ListItemMergeCommand.js +15 -66
  44. package/dist/ListItemNodeSpec.js +0 -11
  45. package/dist/ListSplitCommand.js +3 -14
  46. package/dist/ListToggleCommand.js +5 -26
  47. package/dist/MarksClearCommand.js +6 -17
  48. package/dist/MathEditCommand.js +3 -38
  49. package/dist/MathNodeSpec.js +0 -10
  50. package/dist/OrderedListNodeSpec.js +0 -24
  51. package/dist/ParagraphNodeSpec.js +5 -26
  52. package/dist/ParagraphSpacingCommand.js +3 -32
  53. package/dist/PrintCommand.js +3 -13
  54. package/dist/SelectionPlaceholderPlugin.js +2 -31
  55. package/dist/SpacerMarkSpec.js +2 -6
  56. package/dist/StrikeMarkSpec.js +0 -4
  57. package/dist/StrongMarkSpec.js +2 -5
  58. package/dist/StyleView.js +1 -7
  59. package/dist/TableBackgroundColorCommand.js +3 -24
  60. package/dist/TableBorderColorCommand.js +3 -24
  61. package/dist/TableCellColorCommand.js +3 -23
  62. package/dist/TableCellMenuPlugin.js +9 -45
  63. package/dist/TableInsertCommand.js +7 -39
  64. package/dist/TableMergeCellsCommand.js +5 -30
  65. package/dist/TableNodesSpecs.js +4 -23
  66. package/dist/TablePlugins.js +0 -5
  67. package/dist/TableResizePlugin.js +54 -138
  68. package/dist/TextColorMarkSpec.js +0 -9
  69. package/dist/TextHighlightMarkSpec.js +0 -8
  70. package/dist/TextInsertTabSpaceCommand.js +3 -28
  71. package/dist/TextNoWrapMarkSpec.js +0 -4
  72. package/dist/TextSelectionMarkSpec.js +0 -5
  73. package/dist/TextSubMarkSpec.js +0 -4
  74. package/dist/TextSuperMarkSpec.js +0 -4
  75. package/dist/TextUnderlineMarkSpec.js +0 -4
  76. package/dist/Types.js +0 -6
  77. package/dist/WebFontLoader.js +3 -8
  78. package/dist/blockQuoteInputRule.js +0 -13
  79. package/dist/bom.xml +1582 -1732
  80. package/dist/buildEditorPlugins.js +5 -27
  81. package/dist/buildInputRules.js +12 -24
  82. package/dist/client/CollabConnector.js +6 -30
  83. package/dist/client/EditorConnection.js +23 -69
  84. package/dist/client/Licit.js +79 -163
  85. package/dist/client/Licit.js.flow +16 -2
  86. package/dist/client/Licit.test.js +6 -13
  87. package/dist/client/Reporter.js +1 -8
  88. package/dist/client/SimpleConnector.js +6 -26
  89. package/dist/client/http.js +8 -15
  90. package/dist/client/throttle.js +0 -2
  91. package/dist/convertFromDOMElement.js +2 -10
  92. package/dist/convertFromHTML.js +0 -5
  93. package/dist/convertFromJSON.js +3 -13
  94. package/dist/convertToCSSPTValue.js +0 -6
  95. package/dist/convertToJSON.js +0 -2
  96. package/dist/createCommand.js +3 -11
  97. package/dist/createEditorKeyMap.js +0 -13
  98. package/dist/createEmptyEditorState.js +0 -7
  99. package/dist/createTableResizingPlugin.js +5 -16
  100. package/dist/findActionableCell.js +0 -19
  101. package/dist/findActiveMark.js +0 -11
  102. package/dist/hyphenize.js +2 -4
  103. package/dist/index.js +0 -9
  104. package/dist/insertTable.js +0 -16
  105. package/dist/isEditorStateEmpty.js +0 -6
  106. package/dist/isTableNode.js +0 -3
  107. package/dist/joinDown.js +0 -7
  108. package/dist/joinListNode.js +0 -15
  109. package/dist/joinUp.js +0 -9
  110. package/dist/keymaps.js +0 -15
  111. package/dist/lookUpElement.js +0 -3
  112. package/dist/nodeAt.js +0 -3
  113. package/dist/normalizeHTML.js +9 -25
  114. package/dist/patchAnchorElements.js +5 -12
  115. package/dist/patchBreakElements.js +0 -6
  116. package/dist/patchElementInlineStyles.js +5 -15
  117. package/dist/patchListElements.js +20 -54
  118. package/dist/patchMathElements.js +11 -21
  119. package/dist/patchParagraphElements.js +0 -5
  120. package/dist/patchStyleElements.js +12 -41
  121. package/dist/patchTableElements.js +9 -37
  122. package/dist/rebaseDocWithSteps.js +0 -6
  123. package/dist/sanitizeURL.js +0 -3
  124. package/dist/splitListItem.js +12 -43
  125. package/dist/toClosestFontPtSize.js +1 -5
  126. package/dist/toSafeHTMLDocument.js +0 -1
  127. package/dist/toggleBlockquote.js +2 -19
  128. package/dist/toggleCodeBlock.js +2 -22
  129. package/dist/ui/AlertInfo.js +6 -22
  130. package/dist/ui/BookmarkNodeView.js +7 -28
  131. package/dist/ui/CommandButton.js +3 -19
  132. package/dist/ui/CommandMenu.js +3 -25
  133. package/dist/ui/CommandMenuButton.js +3 -36
  134. package/dist/ui/CustomEditorView.js +3 -16
  135. package/dist/ui/CustomMenu.js +0 -8
  136. package/dist/ui/CustomMenuItem.js +4 -18
  137. package/dist/ui/CustomNodeView.js +21 -67
  138. package/dist/ui/CustomRadioButton.js +14 -33
  139. package/dist/ui/DocLayoutEditor.js +5 -27
  140. package/dist/ui/Editor.js +18 -79
  141. package/dist/ui/EditorFrameset.js +3 -18
  142. package/dist/ui/EditorToolbar.js +10 -46
  143. package/dist/ui/EditorToolbarConfig.js +10 -20
  144. package/dist/ui/FontSizeCommandMenuButton.js +5 -19
  145. package/dist/ui/FontTypeCommandMenuButton.js +5 -22
  146. package/dist/ui/Frag.js +0 -7
  147. package/dist/ui/Icon.js +5 -25
  148. package/dist/ui/ImageAlignEditor.js +3 -16
  149. package/dist/ui/ImageInlineEditor.js +3 -16
  150. package/dist/ui/ImageNodeView.js +23 -112
  151. package/dist/ui/ImageNodeView.js.flow +3 -3
  152. package/dist/ui/ImageResizeBox.js +3 -53
  153. package/dist/ui/ImageURLEditor.js +3 -28
  154. package/dist/ui/ImageUploadEditor.js +3 -35
  155. package/dist/ui/LinkTooltip.js +5 -25
  156. package/dist/ui/LinkURLEditor.js +3 -29
  157. package/dist/ui/ListItemNodeView.js +15 -30
  158. package/dist/ui/ListTypeButton.js +5 -37
  159. package/dist/ui/ListTypeCommandButton.js +3 -19
  160. package/dist/ui/ListTypeMenu.js +4 -25
  161. package/dist/ui/LoadingIndicator.js +0 -7
  162. package/dist/ui/MathEditor.js +3 -24
  163. package/dist/ui/MathInlineEditor.js +3 -26
  164. package/dist/ui/MathNodeView.js +9 -59
  165. package/dist/ui/PasteMenu.js +4 -20
  166. package/dist/ui/ResizeObserver.js +0 -18
  167. package/dist/ui/RichTextEditor.js +5 -27
  168. package/dist/ui/SelectionObserver.js +3 -29
  169. package/dist/ui/TableCellMenu.js +3 -18
  170. package/dist/ui/TableGridSizeEditor.js +5 -51
  171. package/dist/ui/TableNodeView.js +0 -11
  172. package/dist/ui/bindScrollHandler.js +2 -9
  173. package/dist/ui/canUseCSSFont.js +2 -8
  174. package/dist/ui/czi-icon.css +4 -4
  175. package/dist/ui/findActiveFontSize.js +2 -18
  176. package/dist/ui/findActiveFontType.js +0 -12
  177. package/dist/ui/handleEditorDrop.js +0 -9
  178. package/dist/ui/handleEditorKeyDown.js +0 -7
  179. package/dist/ui/handleEditorPaste.js +0 -9
  180. package/dist/ui/htmlElementToRect.js +0 -4
  181. package/dist/ui/injectStyleSheet.js +0 -10
  182. package/dist/ui/isElementFullyVisible.js +2 -8
  183. package/dist/ui/isOffline.js +0 -2
  184. package/dist/ui/isReactClass.js +0 -4
  185. package/dist/ui/mathquill-editor/MathQuillEditor.js +9 -44
  186. package/dist/ui/mathquill-editor/MathQuillEditorSymbols.js +1 -3
  187. package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +3 -16
  188. package/dist/ui/mathquill-editor/mathquill-import-kludge.js +5 -7
  189. package/dist/ui/renderLaTeXAsHTML.js +2 -13
  190. package/dist/ui/resolveImage.js +7 -32
  191. package/dist/ui/toCSSColor.js +0 -14
  192. package/dist/ui/toCSSLineSpacing.js +10 -11
  193. package/dist/ui/toHexColor.js +0 -8
  194. package/dist/ui/uuid.js +0 -2
  195. package/dist/uuid.js +0 -2
  196. package/licit/client/CustomLicitRuntime.js +30 -4
  197. package/package-lock.json.old +32889 -0
  198. package/package.json +45 -69
  199. package/src/client/Licit.js +16 -2
  200. package/src/ui/ImageNodeView.js +3 -3
  201. package/src/ui/czi-icon.css +4 -4
  202. package/utils/build_web_server.js +1 -7
  203. package/webpack.config.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modusoperandi/licit",
3
- "version": "0.13.24",
3
+ "version": "0.14.0",
4
4
  "subversion": "1",
5
5
  "description": "Rich text editor built with React and ProseMirror",
6
6
  "main": "dist/index.js",
@@ -28,74 +28,75 @@
28
28
  "build:style-service-docker": "docker build . -f style-service.Dockerfile -t style-service:latest"
29
29
  },
30
30
  "devDependencies": {
31
- "@babel/cli": "^7.11.6",
32
- "@babel/core": "^7.11.6",
33
- "@babel/plugin-proposal-class-properties": "^7.10.4",
34
- "@babel/plugin-proposal-decorators": "^7.10.5",
35
- "@babel/plugin-proposal-do-expressions": "^7.10.4",
36
- "@babel/plugin-proposal-export-default-from": "^7.10.4",
37
- "@babel/plugin-proposal-export-namespace-from": "^7.10.4",
38
- "@babel/plugin-proposal-function-sent": "^7.10.4",
39
- "@babel/plugin-proposal-logical-assignment-operators": "^7.11.0",
40
- "@babel/plugin-proposal-object-rest-spread": "^7.11.0",
41
- "@babel/plugin-proposal-pipeline-operator": "^7.10.5",
42
- "@babel/plugin-proposal-throw-expressions": "^7.10.4",
31
+ "@babel/cli": "^7.19.3",
32
+ "@babel/core": "^7.19.3",
33
+ "@babel/eslint-parser": "^7.19.1",
34
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
35
+ "@babel/plugin-proposal-decorators": "^7.19.3",
36
+ "@babel/plugin-proposal-do-expressions": "^7.18.6",
37
+ "@babel/plugin-proposal-export-default-from": "^7.18.10",
38
+ "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
39
+ "@babel/plugin-proposal-function-sent": "^7.18.6",
40
+ "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9",
41
+ "@babel/plugin-proposal-object-rest-spread": "^7.19.4",
42
+ "@babel/plugin-proposal-pipeline-operator": "^7.18.9",
43
+ "@babel/plugin-proposal-throw-expressions": "^7.18.6",
43
44
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
44
45
  "@babel/plugin-syntax-import-meta": "^7.10.4",
45
46
  "@babel/plugin-transform-flow-strip-types": "^7.10.4",
46
- "@babel/plugin-transform-parameters": "^7.10.5",
47
- "@babel/plugin-transform-runtime": "^7.11.5",
48
- "@babel/preset-env": "^7.11.5",
47
+ "@babel/plugin-transform-parameters": "^7.18.8",
48
+ "@babel/plugin-transform-runtime": "^7.19.1",
49
+ "@babel/preset-env": "^7.19.4",
49
50
  "@babel/preset-flow": "^7.10.4",
50
- "@babel/preset-react": "^7.16.0",
51
+ "@babel/preset-react": "^7.18.6",
51
52
  "@cyclonedx/bom": "^3.10.6",
52
- "babel-eslint": "10.1.0",
53
- "babel-jest": "^26.6.3",
54
- "babel-loader": "8.1.0",
53
+ "babel-jest": "^29.2.0",
54
+ "babel-loader": "8.2.5",
55
55
  "babel-plugin-flow-react-proptypes": "26.0.0",
56
56
  "babel-plugin-transform-react-remove-prop-types": "0.4.24",
57
- "clean-webpack-plugin": "3.0.0",
58
- "copy-webpack-plugin": "6.0.3",
57
+ "clean-webpack-plugin": "4.0.0",
58
+ "copy-webpack-plugin": "^11.0.0",
59
59
  "css-loader": "3.6.0",
60
60
  "enzyme": "^3.11.0",
61
- "eslint": "7.4.0",
62
- "eslint-config-prettier": "^6.12.0",
63
- "eslint-plugin-jest": "^24.3.2",
64
- "eslint-plugin-prettier": "^3.1.4",
65
- "eslint-plugin-react": "7.27.0",
61
+ "eslint": "^8.25.0",
62
+ "eslint-config-prettier": "^8.5.0",
63
+ "eslint-plugin-jest": "^27.1.2",
64
+ "eslint-plugin-prettier": "^4.2.1",
65
+ "eslint-plugin-react": "7.31.10",
66
66
  "exports-loader": "^1.1.0",
67
- "file-loader": "^6.1.0",
67
+ "file-loader": "^6.2.0",
68
68
  "flow-bin": "0.128.0",
69
69
  "flow-copy-source": "2.0.9",
70
70
  "flow-webpack-plugin": "1.2.0",
71
71
  "html-loader": "1.1.0",
72
72
  "html-webpack-inline-source-plugin": "1.0.0-beta.2",
73
73
  "html-webpack-plugin": "^4.5.0",
74
- "husky": "^4.3.0",
74
+ "husky": "^8.0.1",
75
75
  "identity-obj-proxy": "^3.0.0",
76
- "jest": "^26.6.3",
77
- "jest-prosemirror": "^1.0.19",
76
+ "jest": "^29.2.0",
77
+ "jest-environment-jsdom": "^29.3.1",
78
+ "jest-prosemirror": "^2.0.6",
78
79
  "jest-sonar-reporter": "^2.0.0",
79
- "lint-staged": "^10.4.0",
80
+ "lint-staged": "^13.0.3",
80
81
  "mkdirp": "^1.0.4",
81
82
  "prettier": "^2.1.2",
82
- "stylelint": "^13.7.2",
83
- "stylelint-config-standard": "^20.0.0",
84
- "stylelint-prettier": "^1.2.0",
83
+ "stylelint": "^14.14.0",
84
+ "stylelint-config-standard": "^29.0.0",
85
+ "stylelint-prettier": "^2.0.0",
85
86
  "terser-webpack-plugin": "^3.1.0",
86
87
  "webpack": "^5.74.0",
87
- "webpack-cli": "^4.9.1",
88
+ "webpack-cli": "^4.10.0",
88
89
  "webpack-dev-server": "^4.11.1",
89
90
  "write-file-webpack-plugin": "4.5.1"
90
91
  },
91
92
  "dependencies": {
92
93
  "@modusoperandi/licit-doc-attrs-step": "^0.1.3",
93
- "@modusoperandi/licit-ui-commands": "^0.1.9",
94
+ "@modusoperandi/licit-ui-commands": "^0.1.11",
94
95
  "@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
95
96
  "body-parser": "^1.19.0",
96
97
  "browserkeymap": "2.0.2",
97
- "classnames": "2.2.6",
98
- "color": "3.1.2",
98
+ "classnames": "2.3.2",
99
+ "color": "^4.2.3",
99
100
  "cors": "^2.8.5",
100
101
  "express": "^4.17.1",
101
102
  "flatted": "^3.1.0",
@@ -107,29 +108,16 @@
107
108
  "mv": "^2.1.1",
108
109
  "node-mathquill": "0.10.2",
109
110
  "nullthrows": "1.1.1",
110
- "prosemirror-collab": "1.2.2",
111
- "prosemirror-commands": "1.1.5",
111
+ "prosemirror-model": "~1.16.0",
112
+ "prosemirror-view": "1.27.0",
113
+ "prosemirror-tables": "1.2.5",
112
114
  "prosemirror-dev-tools": "3.0.2",
113
- "prosemirror-dropcursor": "^1.3.5",
114
- "prosemirror-gapcursor": "^1.2.2",
115
- "prosemirror-history": "1.1.3",
116
- "prosemirror-inputrules": "1.1.3",
117
- "prosemirror-keymap": "^1.1.4",
118
- "prosemirror-model": "^1.16.1",
119
- "prosemirror-state": "^1.3.4",
120
- "prosemirror-tables": "^1.1.1",
121
- "prosemirror-transform": "^1.2.9",
122
- "prosemirror-utils": "^1.0.0-0",
123
- "prosemirror-view": "^1.17.3",
115
+ "prosemirror-collab": "1.2.2",
124
116
  "query-string": "6.13.1",
125
- "react": "^17.0.2",
126
- "react-dom": "^17.0.2",
127
117
  "resize-observer-polyfill": "1.5.1",
128
118
  "smooth-scroll-into-view-if-needed": "1.1.28",
129
- "style-loader": "^1.2.1",
130
119
  "url": "^0.11.0",
131
- "uuid": "8.2.0",
132
- "webfontloader": "1.6.28"
120
+ "uuid": "9.0.0"
133
121
  },
134
122
  "importSort": {
135
123
  ".js": {
@@ -152,17 +140,5 @@
152
140
  "*.json": [
153
141
  "prettier --write"
154
142
  ]
155
- },
156
- "jest": {
157
- "rootDir": "src",
158
- "transform": {
159
- "^.+\\.js?$": "babel-jest"
160
- },
161
- "moduleNameMapper": {
162
- "\\.(css|less|scss|sass)$": "identity-obj-proxy"
163
- },
164
- "setupFiles": [
165
- "../jest.setup.js"
166
- ]
167
143
  }
168
144
  }
@@ -57,6 +57,7 @@ class Licit extends React.Component<any, any> {
57
57
  _skipSCU: boolean; // Flag to decide whether to skip shouldComponentUpdate
58
58
  _defaultEditorSchema: Schema;
59
59
  _defaultEditorPlugins: Array<Plugin>;
60
+ _pasteJSONPlugin: Plugin;
60
61
  _devTools: Promise<any>;
61
62
  _applyDevTools: any;
62
63
 
@@ -118,6 +119,7 @@ class Licit extends React.Component<any, any> {
118
119
  this._defaultEditorPlugins = new DefaultEditorPlugins(
119
120
  this._defaultEditorSchema
120
121
  ).get();
122
+ this._pasteJSONPlugin = null;
121
123
 
122
124
  const editorState = this.initEditorState(plugins, dataType, data);
123
125
  data = editorState.doc;
@@ -175,6 +177,7 @@ class Licit extends React.Component<any, any> {
175
177
  this._defaultEditorPlugins,
176
178
  plugins
177
179
  );
180
+ this._pasteJSONPlugin = effectivePlugins.pasteJSONPlugin;
178
181
  if (DataType.JSON === dataType) {
179
182
  editorState = convertFromJSON(
180
183
  data,
@@ -208,8 +211,9 @@ class Licit extends React.Component<any, any> {
208
211
  schema: Schema,
209
212
  defaultPlugins: Array<Plugin>,
210
213
  plugins: Array<Plugin>
211
- ): { plugins: Array<Plugin>, schema: Schema } {
214
+ ): { plugins: Array<Plugin>, schema: Schema, pasteJSONPlugin: Plugin } {
212
215
  const effectivePlugins = defaultPlugins;
216
+ let pasteJSONPlugin = null;
213
217
 
214
218
  if (plugins) {
215
219
  for (const p of plugins) {
@@ -222,10 +226,14 @@ class Licit extends React.Component<any, any> {
222
226
  if (p.initKeyCommands) {
223
227
  effectivePlugins.push(p.initKeyCommands());
224
228
  }
229
+
230
+ if (p.insert) {
231
+ pasteJSONPlugin = p;
232
+ }
225
233
  }
226
234
  }
227
235
  }
228
- return { plugins: effectivePlugins, schema };
236
+ return { plugins: effectivePlugins, schema, pasteJSONPlugin };
229
237
  }
230
238
 
231
239
  // [FS] IRAD-1578 2021-09-27
@@ -337,6 +345,12 @@ class Licit extends React.Component<any, any> {
337
345
  return document;
338
346
  }
339
347
 
348
+ insertJSON = (json: { [key: string]: any }): void => {
349
+ if (this._pasteJSONPlugin && this._pasteJSONPlugin.insert) {
350
+ this._pasteJSONPlugin.insert(json, this._editorView);
351
+ }
352
+ };
353
+
340
354
  setContent = (content: any = {}, dataType: DataType): void => {
341
355
  this.skipDataTypeCheck = false;
342
356
  // [FS] IRAD-1571 2021-09-27
@@ -69,13 +69,13 @@ function getMaxResizeWidth(el: any): number {
69
69
  return MAX_SIZE;
70
70
  }
71
71
 
72
- function resolveURL(runtime: ?EditorRuntime, src: ?string): ?string {
72
+ async function resolveURL(runtime: ?EditorRuntime, src: ?string): ?string {
73
73
  if (!runtime) {
74
74
  return src;
75
75
  }
76
76
  const { canProxyImageSrc, getProxyImageSrc } = runtime;
77
77
  if (src && canProxyImageSrc && getProxyImageSrc && canProxyImageSrc(src)) {
78
- return getProxyImageSrc(src);
78
+ return await getProxyImageSrc(src);
79
79
  }
80
80
  return src;
81
81
  }
@@ -274,7 +274,7 @@ class ImageViewBody extends React.PureComponent<any, any> {
274
274
 
275
275
  this.setState({ originalSize: DEFAULT_ORIGINAL_SIZE });
276
276
  const src = this.props.node.attrs.src;
277
- const url = resolveURL(this.props.editorView.runtime, src);
277
+ const url = await resolveURL(this.props.editorView.runtime, src);
278
278
  const originalSize = await resolveImage(url);
279
279
  if (!this._mounted) {
280
280
  // unmounted;
@@ -1,11 +1,11 @@
1
1
  .czi-icon {
2
2
  direction: ltr;
3
3
  display: inline-block;
4
- font-family: 'Material Icons', sans-serif;
4
+ font-family: 'Material Icons', sans-serif !important;
5
5
 
6
6
  /* Support for IE. */
7
7
  font-feature-settings: 'liga';
8
- font-size: 20px; /* Preferred icon size */
8
+ font-size: 20px !important; /* Preferred icon size */
9
9
 
10
10
  /* Support for all WebKit browsers. */
11
11
  -webkit-font-smoothing: subpixel-antialiased;
@@ -54,8 +54,8 @@
54
54
  .czi-icon.superscript,
55
55
  .czi-icon.subscript {
56
56
  display: inline-block;
57
- font-family: 'Arial', sans-serif;
58
- font-size: 12px;
57
+ font-family: 'Arial', sans-serif !important;
58
+ font-size: 12px !important;
59
59
  height: 16px;
60
60
  text-align: center;
61
61
  width: 20px;
@@ -2,13 +2,7 @@ const WebpackDevServer = require('webpack-dev-server'),
2
2
  webpack = require('webpack'),
3
3
  config = require('../webpack.config'),
4
4
  env = require('./env'),
5
- path = require('path'),
6
- formidable = require('formidable'),
7
- mv = require('mv'),
8
- // [FS] IRAD-1005 2020-07-07
9
- // Upgrade outdated packages.
10
- uuidv4 = require('uuid').v4,
11
- express = require('express');
5
+ path = require('path');
12
6
 
13
7
  const options = config.chromeExtensionBoilerplate || {};
14
8
  const excludeEntriesToHotReload = options.notHotReload || [];
package/webpack.config.js CHANGED
@@ -94,9 +94,9 @@ var options = {
94
94
  'window.jQuery': 'jquery',
95
95
  }),
96
96
  // type checker
97
- ...(isDev
98
- ? [new FlowWebpackPlugin({ flowArgs: ['--show-all-errors'] })]
99
- : []),
97
+ // ...(isDev
98
+ // ? [new FlowWebpackPlugin({ flowArgs: ['--show-all-errors'] })]
99
+ // : []),
100
100
  // clean the web folder
101
101
  new CleanWebpackPlugin(),
102
102
  // expose and write the allowed env vars on the compiled bundle