@atlaskit/editor-core 185.2.0 → 185.2.5

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 (258) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/actions/index.js +2 -2
  3. package/dist/cjs/create-editor/ReactEditorViewInternal.js +1 -2
  4. package/dist/cjs/index.js +0 -6
  5. package/dist/cjs/labs/next/internal/hooks/use-editor/create-editor.js +1 -1
  6. package/dist/cjs/messages.js +6 -56
  7. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +2 -2
  8. package/dist/cjs/plugins/base/pm-plugins/scroll-gutter.js +1 -1
  9. package/dist/cjs/plugins/card/nodeviews/blockCard.js +2 -2
  10. package/dist/cjs/plugins/card/nodeviews/embedCard.js +6 -6
  11. package/dist/cjs/plugins/card/nodeviews/genericCard.js +2 -1
  12. package/dist/cjs/plugins/card/pm-plugins/doc.js +9 -11
  13. package/dist/cjs/plugins/card/pm-plugins/keymap.js +3 -6
  14. package/dist/cjs/plugins/card/pm-plugins/main.js +2 -2
  15. package/dist/cjs/plugins/card/toolbar.js +13 -16
  16. package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +19 -18
  17. package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +7 -10
  18. package/dist/cjs/plugins/card/utils.js +3 -4
  19. package/dist/cjs/plugins/clear-marks-on-change-to-empty-document/index.js +1 -1
  20. package/dist/cjs/plugins/custom-autoformat/doc.js +1 -1
  21. package/dist/cjs/plugins/date/pm-plugins/main.js +2 -2
  22. package/dist/cjs/plugins/emoji/index.js +2 -2
  23. package/dist/cjs/plugins/floating-toolbar/index.js +8 -2
  24. package/dist/cjs/plugins/hyperlink/Toolbar.js +8 -8
  25. package/dist/cjs/plugins/hyperlink/commands.js +2 -3
  26. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +2 -2
  27. package/dist/cjs/plugins/layout/actions.js +1 -1
  28. package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
  29. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -3
  30. package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -2
  31. package/dist/cjs/plugins/media/toolbar/index.js +10 -9
  32. package/dist/cjs/plugins/media/toolbar/linking-toolbar-appearance.js +4 -3
  33. package/dist/cjs/plugins/media/toolbar/linking.js +6 -6
  34. package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +1 -1
  35. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +6 -8
  36. package/dist/cjs/plugins/media/utils/media-files.js +8 -7
  37. package/dist/cjs/plugins/mentions/pm-plugins/main.js +2 -2
  38. package/dist/cjs/plugins/placeholder/index.js +2 -3
  39. package/dist/cjs/plugins/status/plugin.js +2 -2
  40. package/dist/cjs/plugins/unsupported-content/index.js +3 -3
  41. package/dist/cjs/ui/LinkSearch/ToolbarComponents.js +4 -11
  42. package/dist/cjs/utils/document.js +7 -249
  43. package/dist/cjs/utils/index.js +1 -23
  44. package/dist/cjs/version-wrapper.js +1 -1
  45. package/dist/cjs/version.json +1 -1
  46. package/dist/es2019/actions/index.js +2 -1
  47. package/dist/es2019/create-editor/ReactEditorViewInternal.js +1 -1
  48. package/dist/es2019/index.js +1 -1
  49. package/dist/es2019/labs/next/internal/hooks/use-editor/create-editor.js +1 -1
  50. package/dist/es2019/messages.js +2 -54
  51. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  52. package/dist/es2019/plugins/base/pm-plugins/scroll-gutter.js +1 -1
  53. package/dist/es2019/plugins/card/nodeviews/blockCard.js +1 -1
  54. package/dist/es2019/plugins/card/nodeviews/embedCard.js +3 -3
  55. package/dist/es2019/plugins/card/nodeviews/genericCard.js +2 -1
  56. package/dist/es2019/plugins/card/pm-plugins/doc.js +2 -3
  57. package/dist/es2019/plugins/card/pm-plugins/keymap.js +3 -3
  58. package/dist/es2019/plugins/card/pm-plugins/main.js +1 -1
  59. package/dist/es2019/plugins/card/toolbar.js +8 -10
  60. package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +10 -8
  61. package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +1 -4
  62. package/dist/es2019/plugins/card/utils.js +1 -2
  63. package/dist/es2019/plugins/clear-marks-on-change-to-empty-document/index.js +1 -1
  64. package/dist/es2019/plugins/custom-autoformat/doc.js +1 -1
  65. package/dist/es2019/plugins/date/pm-plugins/main.js +1 -1
  66. package/dist/es2019/plugins/emoji/index.js +1 -1
  67. package/dist/es2019/plugins/floating-toolbar/index.js +5 -2
  68. package/dist/es2019/plugins/hyperlink/Toolbar.js +3 -3
  69. package/dist/es2019/plugins/hyperlink/commands.js +1 -2
  70. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +1 -1
  71. package/dist/es2019/plugins/layout/actions.js +1 -1
  72. package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
  73. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +1 -1
  74. package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
  75. package/dist/es2019/plugins/media/toolbar/index.js +10 -9
  76. package/dist/es2019/plugins/media/toolbar/linking-toolbar-appearance.js +2 -1
  77. package/dist/es2019/plugins/media/toolbar/linking.js +4 -4
  78. package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +1 -1
  79. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +2 -4
  80. package/dist/es2019/plugins/media/utils/media-files.js +4 -3
  81. package/dist/es2019/plugins/mentions/pm-plugins/main.js +1 -1
  82. package/dist/es2019/plugins/placeholder/index.js +1 -1
  83. package/dist/es2019/plugins/status/plugin.js +1 -1
  84. package/dist/es2019/plugins/unsupported-content/index.js +1 -1
  85. package/dist/es2019/ui/LinkSearch/ToolbarComponents.js +1 -4
  86. package/dist/es2019/utils/document.js +3 -244
  87. package/dist/es2019/utils/index.js +1 -4
  88. package/dist/es2019/version-wrapper.js +1 -1
  89. package/dist/es2019/version.json +1 -1
  90. package/dist/esm/actions/index.js +2 -1
  91. package/dist/esm/create-editor/ReactEditorViewInternal.js +1 -1
  92. package/dist/esm/index.js +1 -1
  93. package/dist/esm/labs/next/internal/hooks/use-editor/create-editor.js +1 -1
  94. package/dist/esm/messages.js +2 -54
  95. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  96. package/dist/esm/plugins/base/pm-plugins/scroll-gutter.js +1 -1
  97. package/dist/esm/plugins/card/nodeviews/blockCard.js +1 -1
  98. package/dist/esm/plugins/card/nodeviews/embedCard.js +3 -3
  99. package/dist/esm/plugins/card/nodeviews/genericCard.js +2 -1
  100. package/dist/esm/plugins/card/pm-plugins/doc.js +2 -3
  101. package/dist/esm/plugins/card/pm-plugins/keymap.js +3 -3
  102. package/dist/esm/plugins/card/pm-plugins/main.js +1 -1
  103. package/dist/esm/plugins/card/toolbar.js +8 -10
  104. package/dist/esm/plugins/card/ui/EditLinkToolbar.js +18 -16
  105. package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +1 -4
  106. package/dist/esm/plugins/card/utils.js +1 -2
  107. package/dist/esm/plugins/clear-marks-on-change-to-empty-document/index.js +1 -1
  108. package/dist/esm/plugins/custom-autoformat/doc.js +1 -1
  109. package/dist/esm/plugins/date/pm-plugins/main.js +1 -1
  110. package/dist/esm/plugins/emoji/index.js +1 -1
  111. package/dist/esm/plugins/floating-toolbar/index.js +5 -2
  112. package/dist/esm/plugins/hyperlink/Toolbar.js +3 -3
  113. package/dist/esm/plugins/hyperlink/commands.js +1 -2
  114. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +1 -1
  115. package/dist/esm/plugins/layout/actions.js +1 -1
  116. package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
  117. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
  118. package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
  119. package/dist/esm/plugins/media/toolbar/index.js +10 -9
  120. package/dist/esm/plugins/media/toolbar/linking-toolbar-appearance.js +2 -1
  121. package/dist/esm/plugins/media/toolbar/linking.js +4 -4
  122. package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +1 -1
  123. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +2 -4
  124. package/dist/esm/plugins/media/utils/media-files.js +4 -3
  125. package/dist/esm/plugins/mentions/pm-plugins/main.js +1 -1
  126. package/dist/esm/plugins/placeholder/index.js +1 -1
  127. package/dist/esm/plugins/status/plugin.js +1 -1
  128. package/dist/esm/plugins/unsupported-content/index.js +1 -1
  129. package/dist/esm/ui/LinkSearch/ToolbarComponents.js +1 -4
  130. package/dist/esm/utils/document.js +6 -240
  131. package/dist/esm/utils/index.js +1 -4
  132. package/dist/esm/version-wrapper.js +1 -1
  133. package/dist/esm/version.json +1 -1
  134. package/dist/types/index.d.ts +1 -2
  135. package/dist/types/labs/next/presets/cxhtml.d.ts +9 -3
  136. package/dist/types/labs/next/presets/default.d.ts +13 -1
  137. package/dist/types/labs/next/presets/mobile.d.ts +9 -3
  138. package/dist/types/messages.d.ts +2 -53
  139. package/dist/types/plugins/card/index.d.ts +3 -1
  140. package/dist/types/plugins/card/nodeviews/blockCard.d.ts +1 -1
  141. package/dist/types/plugins/card/nodeviews/genericCard.d.ts +3 -3
  142. package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
  143. package/dist/types/plugins/card/toolbar.d.ts +1 -1
  144. package/dist/types/plugins/card/types.d.ts +1 -1
  145. package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +7 -4
  146. package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +1 -1
  147. package/dist/types/plugins/date/nodeviews/date.d.ts +1 -1
  148. package/dist/types/plugins/emoji/nodeviews/emoji.d.ts +1 -1
  149. package/dist/types/plugins/floating-toolbar/index.d.ts +2 -6
  150. package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +1 -1
  151. package/dist/types/plugins/hyperlink/Toolbar.d.ts +1 -1
  152. package/dist/types/plugins/hyperlink/commands.d.ts +2 -3
  153. package/dist/types/plugins/hyperlink/index.d.ts +1 -1
  154. package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -1
  155. package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +1 -1
  156. package/dist/types/plugins/media/index.d.ts +3 -1
  157. package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +1 -1
  158. package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +1 -1
  159. package/dist/types/plugins/media/nodeviews/types.d.ts +1 -1
  160. package/dist/types/plugins/media/toolbar/linking.d.ts +3 -1
  161. package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +0 -15
  162. package/dist/types/plugins/media/utils/media-files.d.ts +1 -1
  163. package/dist/types/plugins/mentions/nodeviews/mention.d.ts +1 -1
  164. package/dist/types/plugins/status/nodeviews/status.d.ts +1 -1
  165. package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +1 -1
  166. package/dist/types/types/editor-props.d.ts +1 -1
  167. package/dist/types/ui/LinkSearch/ToolbarComponents.d.ts +0 -4
  168. package/dist/types/utils/document.d.ts +0 -12
  169. package/dist/types/utils/index.d.ts +1 -2
  170. package/dist/types-ts4.5/index.d.ts +1 -2
  171. package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +9 -3
  172. package/dist/types-ts4.5/labs/next/presets/default.d.ts +13 -1
  173. package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +9 -3
  174. package/dist/types-ts4.5/messages.d.ts +2 -53
  175. package/dist/types-ts4.5/plugins/card/index.d.ts +3 -1
  176. package/dist/types-ts4.5/plugins/card/nodeviews/blockCard.d.ts +1 -1
  177. package/dist/types-ts4.5/plugins/card/nodeviews/genericCard.d.ts +3 -3
  178. package/dist/types-ts4.5/plugins/card/nodeviews/inlineCard.d.ts +1 -1
  179. package/dist/types-ts4.5/plugins/card/toolbar.d.ts +1 -1
  180. package/dist/types-ts4.5/plugins/card/types.d.ts +1 -1
  181. package/dist/types-ts4.5/plugins/card/ui/EditLinkToolbar.d.ts +7 -4
  182. package/dist/types-ts4.5/plugins/card/ui/ResizableEmbedCard.d.ts +1 -1
  183. package/dist/types-ts4.5/plugins/date/nodeviews/date.d.ts +1 -1
  184. package/dist/types-ts4.5/plugins/emoji/nodeviews/emoji.d.ts +1 -1
  185. package/dist/types-ts4.5/plugins/floating-toolbar/index.d.ts +2 -9
  186. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +1 -1
  187. package/dist/types-ts4.5/plugins/hyperlink/Toolbar.d.ts +1 -1
  188. package/dist/types-ts4.5/plugins/hyperlink/commands.d.ts +2 -3
  189. package/dist/types-ts4.5/plugins/hyperlink/index.d.ts +1 -1
  190. package/dist/types-ts4.5/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -1
  191. package/dist/types-ts4.5/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +1 -1
  192. package/dist/types-ts4.5/plugins/media/index.d.ts +3 -1
  193. package/dist/types-ts4.5/plugins/media/nodeviews/mediaInline.d.ts +1 -1
  194. package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeUpdater.d.ts +1 -1
  195. package/dist/types-ts4.5/plugins/media/nodeviews/types.d.ts +1 -1
  196. package/dist/types-ts4.5/plugins/media/toolbar/linking.d.ts +3 -1
  197. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +0 -15
  198. package/dist/types-ts4.5/plugins/media/utils/media-files.d.ts +1 -1
  199. package/dist/types-ts4.5/plugins/mentions/nodeviews/mention.d.ts +1 -1
  200. package/dist/types-ts4.5/plugins/status/nodeviews/status.d.ts +1 -1
  201. package/dist/types-ts4.5/plugins/unsupported-content/unsupported-inline-node-view.d.ts +1 -1
  202. package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
  203. package/dist/types-ts4.5/ui/LinkSearch/ToolbarComponents.d.ts +0 -4
  204. package/dist/types-ts4.5/utils/document.d.ts +0 -12
  205. package/dist/types-ts4.5/utils/index.d.ts +1 -2
  206. package/package.json +11 -14
  207. package/report.api.md +11 -34
  208. package/tmp/api-report-tmp.d.ts +10 -34
  209. package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +0 -227
  210. package/dist/cjs/plugins/hyperlink/types.js +0 -5
  211. package/dist/cjs/ui/MediaAndEmbedsToolbar/index.js +0 -152
  212. package/dist/cjs/ui/Resizer/index.js +0 -210
  213. package/dist/cjs/ui/Resizer/styled.js +0 -15
  214. package/dist/cjs/ui/Resizer/types.js +0 -5
  215. package/dist/cjs/ui/Resizer/utils.js +0 -21
  216. package/dist/cjs/utils/filter/privacy-filter.js +0 -55
  217. package/dist/cjs/utils/linking-utils.js +0 -84
  218. package/dist/cjs/utils/rich-media-utils.js +0 -130
  219. package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +0 -221
  220. package/dist/es2019/plugins/hyperlink/types.js +0 -1
  221. package/dist/es2019/ui/MediaAndEmbedsToolbar/index.js +0 -159
  222. package/dist/es2019/ui/Resizer/index.js +0 -191
  223. package/dist/es2019/ui/Resizer/styled.js +0 -15
  224. package/dist/es2019/ui/Resizer/types.js +0 -1
  225. package/dist/es2019/ui/Resizer/utils.js +0 -12
  226. package/dist/es2019/utils/filter/privacy-filter.js +0 -47
  227. package/dist/es2019/utils/linking-utils.js +0 -74
  228. package/dist/es2019/utils/rich-media-utils.js +0 -108
  229. package/dist/esm/nodeviews/getInlineNodeViewProducer.js +0 -217
  230. package/dist/esm/plugins/hyperlink/types.js +0 -1
  231. package/dist/esm/ui/MediaAndEmbedsToolbar/index.js +0 -144
  232. package/dist/esm/ui/Resizer/index.js +0 -203
  233. package/dist/esm/ui/Resizer/styled.js +0 -7
  234. package/dist/esm/ui/Resizer/types.js +0 -1
  235. package/dist/esm/ui/Resizer/utils.js +0 -12
  236. package/dist/esm/utils/filter/privacy-filter.js +0 -48
  237. package/dist/esm/utils/linking-utils.js +0 -74
  238. package/dist/esm/utils/rich-media-utils.js +0 -117
  239. package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +0 -24
  240. package/dist/types/plugins/hyperlink/types.d.ts +0 -35
  241. package/dist/types/ui/MediaAndEmbedsToolbar/index.d.ts +0 -9
  242. package/dist/types/ui/Resizer/index.d.ts +0 -41
  243. package/dist/types/ui/Resizer/styled.d.ts +0 -2
  244. package/dist/types/ui/Resizer/types.d.ts +0 -26
  245. package/dist/types/ui/Resizer/utils.d.ts +0 -6
  246. package/dist/types/utils/filter/privacy-filter.d.ts +0 -9
  247. package/dist/types/utils/linking-utils.d.ts +0 -14
  248. package/dist/types/utils/rich-media-utils.d.ts +0 -8
  249. package/dist/types-ts4.5/nodeviews/getInlineNodeViewProducer.d.ts +0 -24
  250. package/dist/types-ts4.5/plugins/hyperlink/types.d.ts +0 -35
  251. package/dist/types-ts4.5/ui/MediaAndEmbedsToolbar/index.d.ts +0 -9
  252. package/dist/types-ts4.5/ui/Resizer/index.d.ts +0 -41
  253. package/dist/types-ts4.5/ui/Resizer/styled.d.ts +0 -2
  254. package/dist/types-ts4.5/ui/Resizer/types.d.ts +0 -26
  255. package/dist/types-ts4.5/ui/Resizer/utils.d.ts +0 -6
  256. package/dist/types-ts4.5/utils/filter/privacy-filter.d.ts +0 -9
  257. package/dist/types-ts4.5/utils/linking-utils.d.ts +0 -14
  258. package/dist/types-ts4.5/utils/rich-media-utils.d.ts +0 -8
@@ -1,191 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import React from 'react';
3
- import classnames from 'classnames';
4
- import { Resizable } from 're-resizable';
5
- import { gridTypeForLayout } from '@atlaskit/editor-common/utils';
6
- import { snapTo, handleSides } from './utils';
7
- import { richMediaClassName } from '@atlaskit/editor-common/styles';
8
- import { akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
9
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../plugins/analytics';
10
- const getResizeAnalyticsEvent = (type, size, layout) => {
11
- const actionSubject = type === 'embed' ? ACTION_SUBJECT.EMBEDS : ACTION_SUBJECT.MEDIA_SINGLE;
12
- return {
13
- action: ACTION.EDITED,
14
- actionSubject,
15
- actionSubjectId: ACTION_SUBJECT_ID.RESIZED,
16
- attributes: {
17
- size,
18
- layout
19
- },
20
- eventType: EVENT_TYPE.UI
21
- };
22
- };
23
- const getWidthFromSnapPoints = (width, snapPoints) => {
24
- if (snapPoints.length) {
25
- return Math.min(Math.max(width, snapPoints[0]), snapPoints[snapPoints.length - 1]);
26
- }
27
- return width;
28
- };
29
- export default class Resizer extends React.Component {
30
- constructor(...args) {
31
- super(...args);
32
- _defineProperty(this, "resizable", /*#__PURE__*/React.createRef());
33
- _defineProperty(this, "state", {
34
- isResizing: false
35
- });
36
- _defineProperty(this, "handleResizeStart", event => {
37
- const {
38
- innerPadding = 0,
39
- highlights,
40
- displayGrid,
41
- layout,
42
- width,
43
- snapPoints
44
- } = this.props;
45
-
46
- // prevent creating a drag event on Firefox
47
- event.preventDefault();
48
- this.setState({
49
- isResizing: true
50
- }, () => {
51
- const newHighlights = highlights(width + innerPadding, snapPoints);
52
- displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, gridTypeForLayout(layout), newHighlights);
53
- });
54
- });
55
- _defineProperty(this, "handleResize", (_event, _direction, _elementRef, delta) => {
56
- const {
57
- highlights,
58
- calcNewSize,
59
- scaleFactor,
60
- snapPoints,
61
- displayGrid,
62
- layout,
63
- updateSize,
64
- innerPadding = 0
65
- } = this.props;
66
- const resizable = this.resizable.current;
67
- const {
68
- isResizing
69
- } = this.state;
70
- if (!resizable || !resizable.state.original || !isResizing) {
71
- return;
72
- }
73
- const newWidth = getWidthFromSnapPoints(resizable.state.original.width + delta.width * (scaleFactor || 1), snapPoints);
74
- const newSize = calcNewSize(newWidth + innerPadding, false);
75
- if (newSize.layout !== layout) {
76
- updateSize(newSize.width, newSize.layout);
77
- }
78
- const newHighlights = highlights(newWidth, snapPoints);
79
- displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, gridTypeForLayout(newSize.layout), newHighlights);
80
- resizable.updateSize({
81
- width: newWidth,
82
- height: 'auto'
83
- });
84
- resizable.setState({
85
- isResizing: true
86
- });
87
- });
88
- _defineProperty(this, "handleResizeStop", (_event, _direction, _elementRef, delta) => {
89
- const {
90
- highlights,
91
- calcNewSize,
92
- snapPoints,
93
- displayGrid,
94
- layout,
95
- updateSize,
96
- dispatchAnalyticsEvent,
97
- nodeType
98
- } = this.props;
99
- const resizable = this.resizable.current;
100
- const {
101
- isResizing
102
- } = this.state;
103
- if (!resizable || !resizable.state.original || !isResizing) {
104
- return;
105
- }
106
- const newWidth = getWidthFromSnapPoints(resizable.state.original.width + delta.width, snapPoints);
107
- const snapWidth = snapTo(newWidth, snapPoints);
108
- const newSize = calcNewSize(snapWidth, true);
109
- const newHighlights = highlights(newWidth, snapPoints);
110
- if (dispatchAnalyticsEvent) {
111
- dispatchAnalyticsEvent(getResizeAnalyticsEvent(nodeType, newSize.width, newSize.layout));
112
- }
113
- // show committed grid size
114
- displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, gridTypeForLayout(newSize.layout), newHighlights);
115
- this.setState({
116
- isResizing: false
117
- }, () => {
118
- updateSize(newSize.width, newSize.layout);
119
- displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(false, gridTypeForLayout(layout), []);
120
- });
121
- });
122
- }
123
- render() {
124
- const handleStyles = {};
125
- const handles = {};
126
- const handleComponent = {};
127
- const {
128
- innerPadding = 0,
129
- width,
130
- pctWidth,
131
- selected,
132
- layout,
133
- enable,
134
- children,
135
- ratio,
136
- handleComponentFunc
137
- } = this.props;
138
- const {
139
- isResizing
140
- } = this.state;
141
- handleSides.forEach(side => {
142
- handles[side] = `richMedia-resize-handle-${side}`;
143
- handleStyles[side] = {
144
- width: '24px',
145
- [side]: `${-13 - innerPadding}px`,
146
- zIndex: akRichMediaResizeZIndex,
147
- pointerEvents: 'auto'
148
- };
149
- const sideHandleComponent = handleComponentFunc && handleComponentFunc(side);
150
- if (sideHandleComponent) {
151
- handleComponent[side] = sideHandleComponent;
152
- }
153
- });
154
- const className = classnames(richMediaClassName, `image-${layout}`, this.props.className, {
155
- 'is-resizing': isResizing,
156
- 'not-resized': !pctWidth,
157
- 'richMedia-selected': selected,
158
- 'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
159
- });
160
- let handleWrapperStyle;
161
- if (ratio) {
162
- handleWrapperStyle = {
163
- position: 'absolute',
164
- width: '100%',
165
- paddingBottom: `${ratio}%`,
166
- top: 0,
167
- pointerEvents: 'none'
168
- };
169
- }
170
-
171
- // Ideally, Resizable would let you pass in the component rather than
172
- // the div. For now, we just apply the same styles using CSS
173
- return /*#__PURE__*/React.createElement(Resizable, {
174
- ref: this.resizable,
175
- size: {
176
- width,
177
- // just content itself (no paddings)
178
- height: 'auto'
179
- },
180
- className: className,
181
- handleClasses: handles,
182
- handleStyles: handleStyles,
183
- handleWrapperStyle: handleWrapperStyle,
184
- handleComponent: handleComponent,
185
- enable: enable,
186
- onResize: this.handleResize,
187
- onResizeStop: this.handleResizeStop,
188
- onResizeStart: this.handleResizeStart
189
- }, children);
190
- }
191
- }
@@ -1,15 +0,0 @@
1
- import { css } from '@emotion/react';
2
- import { MediaSingleDimensionHelper } from '@atlaskit/editor-common/ui';
3
- export const wrapperStyle = props => css`
4
- & > div {
5
- ${MediaSingleDimensionHelper(props)};
6
- position: relative;
7
- clear: both;
8
-
9
- > div {
10
- position: absolute;
11
- height: 100%;
12
- width: 100%;
13
- }
14
- }
15
- `;
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- export const snapTo = (target, points) => {
2
- return points.length === 0 ?
3
- // extreme last case if there are no points somehow
4
- target : points.reduce((point, closest) => {
5
- return Math.abs(closest - target) < Math.abs(point - target) ? closest : point;
6
- });
7
- };
8
- export const handleSides = ['left', 'right'];
9
- export const imageAlignmentMap = {
10
- left: 'start',
11
- right: 'end'
12
- };
@@ -1,47 +0,0 @@
1
- import { traverse } from '@atlaskit/adf-utils/traverse';
2
- import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
3
- /**
4
- * Sanitises a document where some content should not be in the document (e.g. mention names).
5
- *
6
- * It is expected that these names we be resolved separately (e.g. when rendering
7
- * a node view).
8
- */
9
- export function sanitizeNodeForPrivacy(json, providerFactory) {
10
- const mentionNames = new Map();
11
- let hasCacheableMentions = false;
12
- const sanitizedJSON = traverse(json, {
13
- mention: node => {
14
- if (node.attrs && node.attrs.text) {
15
- hasCacheableMentions = true;
16
- // Remove @ prefix
17
- const text = node.attrs.text;
18
- const name = text.startsWith('@') ? text.slice(1) : text;
19
- mentionNames.set(node.attrs.id, name);
20
- }
21
- return {
22
- ...node,
23
- attrs: {
24
- ...node.attrs,
25
- text: ''
26
- }
27
- };
28
- }
29
- });
30
- if (hasCacheableMentions && providerFactory) {
31
- const handler = (_name, providerPromise) => {
32
- if (providerPromise) {
33
- providerPromise.then(provider => {
34
- if (isResolvingMentionProvider(provider)) {
35
- mentionNames.forEach((name, id) => {
36
- provider.cacheMentionName(id, name);
37
- });
38
- mentionNames.clear();
39
- providerFactory.unsubscribe('mentionProvider', handler);
40
- }
41
- });
42
- }
43
- };
44
- providerFactory.subscribe('mentionProvider', handler);
45
- }
46
- return sanitizedJSON;
47
- }
@@ -1,74 +0,0 @@
1
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- export const buildEditLinkPayload = type => {
3
- return {
4
- action: ACTION.CLICKED,
5
- actionSubject: type === ACTION_SUBJECT_ID.HYPERLINK ? ACTION_SUBJECT.HYPERLINK : ACTION_SUBJECT.SMART_LINK,
6
- actionSubjectId: ACTION_SUBJECT_ID.EDIT_LINK,
7
- attributes: type !== ACTION_SUBJECT_ID.HYPERLINK ? {
8
- display: type
9
- } : {},
10
- eventType: EVENT_TYPE.UI
11
- };
12
- };
13
- const mapLinkTypeToCardAppearance = type => {
14
- switch (type) {
15
- case ACTION_SUBJECT_ID.CARD_INLINE:
16
- {
17
- return 'inline';
18
- }
19
- case ACTION_SUBJECT_ID.CARD_BLOCK:
20
- {
21
- return 'block';
22
- }
23
- case ACTION_SUBJECT_ID.EMBEDS:
24
- {
25
- return 'embed';
26
- }
27
- default:
28
- {
29
- return 'url';
30
- }
31
- }
32
- };
33
- export const buildVisitedLinkPayload = type => {
34
- return type === ACTION_SUBJECT_ID.HYPERLINK ? {
35
- action: ACTION.VISITED,
36
- actionSubject: ACTION_SUBJECT.HYPERLINK,
37
- actionSubjectId: undefined,
38
- attributes: {
39
- inputMethod: INPUT_METHOD.TOOLBAR
40
- },
41
- eventType: EVENT_TYPE.TRACK
42
- } : {
43
- action: ACTION.VISITED,
44
- actionSubject: ACTION_SUBJECT.SMART_LINK,
45
- actionSubjectId: type,
46
- attributes: {
47
- inputMethod: INPUT_METHOD.TOOLBAR
48
- },
49
- eventType: EVENT_TYPE.TRACK
50
- };
51
- };
52
- export const buildOpenedSettingsPayload = type => {
53
- return {
54
- action: ACTION.CLICKED,
55
- actionSubject: ACTION_SUBJECT.BUTTON,
56
- actionSubjectId: ACTION_SUBJECT_ID.GOTO_SMART_LINK_SETTINGS,
57
- attributes: {
58
- inputMethod: INPUT_METHOD.TOOLBAR,
59
- display: mapLinkTypeToCardAppearance(type)
60
- },
61
- eventType: EVENT_TYPE.UI
62
- };
63
- };
64
- export const unlinkPayload = type => {
65
- return {
66
- action: ACTION.UNLINK,
67
- actionSubject: type === ACTION_SUBJECT_ID.HYPERLINK ? ACTION_SUBJECT.HYPERLINK : ACTION_SUBJECT.SMART_LINK,
68
- actionSubjectId: type === ACTION_SUBJECT_ID.HYPERLINK ? undefined : type,
69
- attributes: {
70
- inputMethod: INPUT_METHOD.TOOLBAR
71
- },
72
- eventType: EVENT_TYPE.TRACK
73
- };
74
- };
@@ -1,108 +0,0 @@
1
- import { wrappedLayouts, shouldAddDefaultWrappedWidth, calcPxFromColumns } from '@atlaskit/editor-common/ui';
2
- import { findParentNodeOfTypeClosestToPos } from 'prosemirror-utils';
3
- import { akEditorBreakoutPadding } from '@atlaskit/editor-shared-styles';
4
- export const nonWrappedLayouts = ['center', 'wide', 'full-width'];
5
- export const floatingLayouts = ['wrap-left', 'wrap-right'];
6
- export const isRichMediaInsideOfBlockNode = (view, pos) => {
7
- if (typeof pos !== 'number' || isNaN(pos) || !view) {
8
- return false;
9
- }
10
- const $pos = view.state.doc.resolve(pos);
11
- const {
12
- expand,
13
- nestedExpand,
14
- layoutColumn
15
- } = view.state.schema.nodes;
16
- return !!findParentNodeOfTypeClosestToPos($pos, [expand, nestedExpand, layoutColumn]);
17
- };
18
- export const alignAttributes = (layout, oldAttrs, gridSize = 12, originalWidth, lineLength) => {
19
- let width = oldAttrs.width;
20
- const oldLayout = oldAttrs.layout;
21
- const oldLayoutIsNonWrapped = nonWrappedLayouts.indexOf(oldLayout) > -1;
22
- const newLayoutIsNonWrapped = nonWrappedLayouts.indexOf(layout) > -1;
23
- const newLayoutIsWrapped = wrappedLayouts.indexOf(layout) > -1;
24
- const oldLayoutIsWrapped = wrappedLayouts.indexOf(oldLayout) > -1;
25
- if (oldLayoutIsNonWrapped && shouldAddDefaultWrappedWidth(layout, originalWidth, lineLength)) {
26
- // 'full-width' or 'wide' or 'center' -> 'wrap-left' or 'wrap-right' or 'align-end' or 'align-start'
27
- if (!width || width >= 100 || oldLayout !== 'center' // == 'full-width' or 'wide'
28
- ) {
29
- width = 50;
30
- }
31
- } else if (layout !== oldLayout && ['full-width', 'wide'].indexOf(oldLayout) > -1) {
32
- // 'full-width' -> 'center' or 'wide'
33
- // 'wide' -> 'center' or 'full-width'
34
- // unset width
35
- width = undefined;
36
- } else if (width) {
37
- const cols = Math.round(width / 100 * gridSize);
38
- let targetCols = cols;
39
- if (oldLayoutIsWrapped && newLayoutIsNonWrapped) {
40
- // wrap -> center needs to align to even grid
41
- targetCols = Math.floor(targetCols / 2) * 2;
42
- width = undefined;
43
- } else if (oldLayoutIsNonWrapped && newLayoutIsWrapped) {
44
- // Can be here only if
45
- // 'full-width' or 'wide' or 'center' -> 'wrap-left' or 'wrap-right' or 'align-end' or 'align-start'
46
- // AND
47
- // !originalWidth || !lineLength || small image
48
- // AND
49
- // width defined!
50
-
51
- // cannot resize to full column width, and cannot resize to 1 column
52
- if (cols <= 1) {
53
- targetCols = 2;
54
- } else if (cols >= gridSize) {
55
- targetCols = 10;
56
- }
57
- }
58
- if (targetCols !== cols) {
59
- width = targetCols / gridSize * 100;
60
- }
61
- }
62
- return {
63
- ...oldAttrs,
64
- layout,
65
- width
66
- };
67
- };
68
- export function calculateSnapPoints({
69
- $pos,
70
- akEditorWideLayoutWidth,
71
- allowBreakoutSnapPoints,
72
- containerWidth,
73
- gridSize,
74
- gridWidth,
75
- insideInlineLike,
76
- insideLayout,
77
- isVideoFile,
78
- lineLength,
79
- offsetLeft,
80
- wrappedLayout
81
- }) {
82
- const snapTargets = [];
83
- for (let i = 0; i < gridWidth; i++) {
84
- const pxFromColumns = calcPxFromColumns(i, lineLength, gridWidth);
85
- snapTargets.push(insideLayout ? pxFromColumns : pxFromColumns - offsetLeft);
86
- }
87
- // full width
88
- snapTargets.push(lineLength - offsetLeft);
89
- const columns = wrappedLayout || insideInlineLike ? 1 : 2;
90
- const minimumWidth = calcPxFromColumns(columns, lineLength, gridSize);
91
- let snapPoints = snapTargets.filter(width => width >= minimumWidth);
92
- if (!$pos) {
93
- return snapPoints;
94
- }
95
- snapPoints = isVideoFile ? snapPoints.filter(width => width > 320) : snapPoints;
96
- const isTopLevel = $pos.parent.type.name === 'doc';
97
- if (isTopLevel && allowBreakoutSnapPoints) {
98
- snapPoints.push(akEditorWideLayoutWidth);
99
- const fullWidthPoint = containerWidth - akEditorBreakoutPadding;
100
- if (fullWidthPoint > akEditorWideLayoutWidth) {
101
- snapPoints.push(fullWidthPoint);
102
- }
103
- }
104
-
105
- // EDM-1107: Ensure new snapPoints are sorted with existing points
106
- snapPoints = snapPoints.sort((a, b) => a - b);
107
- return snapPoints;
108
- }
@@ -1,217 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- /** @jsx jsx */
3
- import { jsx } from '@emotion/react';
4
- import React from 'react';
5
- import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
6
- import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../plugins/analytics';
7
- import { analyticsEventKey } from '../plugins/analytics/consts';
8
- import { ErrorBoundary } from '../ui/ErrorBoundary';
9
- import { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from './getPerformanceOptions';
10
- export var inlineNodeViewClassname = 'inlineNodeView';
11
- function createNodeView(_ref) {
12
- var nodeViewParams = _ref.nodeViewParams,
13
- pmPluginFactoryParams = _ref.pmPluginFactoryParams,
14
- Component = _ref.Component,
15
- extraComponentProps = _ref.extraComponentProps;
16
- // We set a variable for the current node which is
17
- // used for comparisions when doing updates, before being
18
- // overwritten to the updated node.
19
- var currentNode = nodeViewParams.node;
20
-
21
- // First we setup the dom element which will be rendered and "tracked" by prosemirror
22
- // and also used as a "editor portal" (not react portal) target by the editor
23
- // portal provider api, for rendering the Component passed.
24
-
25
- var domRef = document.createElement('span');
26
- domRef.contentEditable = 'false';
27
- setDomAttrs(nodeViewParams.node, domRef);
28
-
29
- // @see ED-3790
30
- // something gets messed up during mutation processing inside of a
31
- // nodeView if DOM structure has nested plain "div"s, it doesn't see the
32
- // difference between them and it kills the nodeView
33
- domRef.classList.add("".concat(nodeViewParams.node.type.name, "View-content-wrap"), "".concat(inlineNodeViewClassname));
34
-
35
- // This util is shared for tracking rendering, and the ErrorBoundary that
36
- // is setup to wrap the Component when rendering
37
- // NOTE: This is not a prosemirror dispatch
38
- function dispatchAnalyticsEvent(payload) {
39
- pmPluginFactoryParams.eventDispatcher.emit(analyticsEventKey, {
40
- payload: payload
41
- });
42
- }
43
-
44
- // This is called to render the Component into domRef which is inside the
45
- // prosemirror View.
46
- // Internally it uses the unstable_renderSubtreeIntoContainer api to render,
47
- // to the passed dom element (domRef) which means it is automatically
48
- // "cleaned up" when you do a "re render".
49
- function renderComponent() {
50
- pmPluginFactoryParams.portalProviderAPI.render(getPortalChildren({
51
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
52
- currentNode: currentNode,
53
- nodeViewParams: nodeViewParams,
54
- Component: Component,
55
- extraComponentProps: extraComponentProps
56
- }), domRef, false,
57
- // node views should be rendered with intl context
58
- true);
59
- }
60
- var _getPerformanceOption = getPerformanceOptions(nodeViewParams.view),
61
- samplingRate = _getPerformanceOption.samplingRate,
62
- slowThreshold = _getPerformanceOption.slowThreshold,
63
- trackingEnabled = _getPerformanceOption.trackingEnabled;
64
- trackingEnabled && startMeasureReactNodeViewRendered({
65
- nodeTypeName: currentNode.type.name
66
- });
67
-
68
- // We render the component while creating the node view
69
- renderComponent();
70
- trackingEnabled && stopMeasureReactNodeViewRendered({
71
- nodeTypeName: currentNode.type.name,
72
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
73
- editorState: nodeViewParams.view.state,
74
- samplingRate: samplingRate,
75
- slowThreshold: slowThreshold
76
- });
77
-
78
- // https://prosemirror.net/docs/ref/#view.NodeView
79
- var nodeView = {
80
- get dom() {
81
- return domRef;
82
- },
83
- update: function update(nextNode, _decorations) {
84
- // Let ProseMirror handle the update if node types are different.
85
- // This prevents an issue where it was not possible to select the
86
- // inline node view then replace it by entering text - the node
87
- // view contents would be deleted but the node view itself would
88
- // stay in the view and become uneditable.
89
- if (currentNode.type !== nextNode.type) {
90
- return false;
91
- }
92
- // On updates, we only set the new attributes if the type, attributes, and marks
93
- // have changed on the node.
94
-
95
- // NOTE: this could mean attrs changes aren't reflected in the dom,
96
- // when an attribute key which was previously present is no longer
97
- // present.
98
- // ie.
99
- // -> Original attributes { text: "hello world", color: "red" }
100
- // -> Updated attributes { color: "blue" }
101
- // in this case, the dom text attribute will not be cleared.
102
- //
103
- // This may not be an issue with any of our current node schemas.
104
- if (!currentNode.sameMarkup(nextNode)) {
105
- setDomAttrs(nextNode, domRef);
106
- }
107
- currentNode = nextNode;
108
- renderComponent();
109
- return true;
110
- },
111
- destroy: function destroy() {
112
- // When prosemirror destroys the node view, we need to clean up
113
- // what we have previously rendered using the editor portal
114
- // provider api.
115
- pmPluginFactoryParams.portalProviderAPI.remove(domRef);
116
- // @ts-expect-error Expect an error as domRef is expected to be
117
- // of HTMLSpanElement type however once the node view has
118
- // been destroyed no other consumers should still be using it.
119
- domRef = undefined;
120
- }
121
- };
122
- return nodeView;
123
- }
124
-
125
- /**
126
- * Copies the attributes from a ProseMirror Node to a DOM node.
127
- * @param node The Prosemirror Node from which to source the attributes
128
- */
129
- function setDomAttrs(node, element) {
130
- Object.keys(node.attrs || {}).forEach(function (attr) {
131
- element.setAttribute(attr, node.attrs[attr]);
132
- });
133
- }
134
- function getPortalChildren(_ref2) {
135
- var dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
136
- currentNode = _ref2.currentNode,
137
- nodeViewParams = _ref2.nodeViewParams,
138
- Component = _ref2.Component,
139
- extraComponentProps = _ref2.extraComponentProps;
140
- return function portalChildren() {
141
- var _currentNode$type$nam, _currentNode$type;
142
- // All inline nodes use `display: inline` to allow for multi-line
143
- // wrapping. This does produce an issue in Chrome where it is not
144
- // possible to click select the position after the node,
145
- // see: https://product-fabric.atlassian.net/browse/ED-12003
146
- // however this is only a problem for node views that use
147
- // `display: inline-block` somewhere within the Component.
148
- // Looking at the below structure, spans with className
149
- // `inlineNodeViewAddZeroWidthSpace` have pseudo elements that
150
- // add a zero width space which fixes the problem.
151
- // Without the additional zero width space before the Component,
152
- // it is not possible to use the keyboard to range select in Safari.
153
- //
154
- // Zero width spaces on either side of the Component also prevent
155
- // the cursor from appearing inside the node view on all browsers.
156
- //
157
- // Note:
158
- // In future it is worth considering prohibiting the use of `display: inline-block`
159
- // within inline node view Components however would require a sizable
160
- // refactor. A test suite to catch any instances of this is ideal however
161
- // the refactor required is currently out of scope for https://product-fabric.atlassian.net/browse/ED-14176
162
-
163
- return jsx(ErrorBoundary, {
164
- component: ACTION_SUBJECT.REACT_NODE_VIEW,
165
- componentId: (_currentNode$type$nam = currentNode === null || currentNode === void 0 ? void 0 : (_currentNode$type = currentNode.type) === null || _currentNode$type === void 0 ? void 0 : _currentNode$type.name) !== null && _currentNode$type$nam !== void 0 ? _currentNode$type$nam : ACTION_SUBJECT_ID.UNKNOWN_NODE,
166
- dispatchAnalyticsEvent: dispatchAnalyticsEvent
167
- }, jsx("span", {
168
- "aria-hidden": "true",
169
- className: "zeroWidthSpaceContainer"
170
- }, jsx("span", {
171
- className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
172
- }), ZERO_WIDTH_SPACE), jsx(Component, _extends({
173
- view: nodeViewParams.view,
174
- getPos: nodeViewParams.getPos,
175
- node: currentNode
176
- }, extraComponentProps)), jsx("span", {
177
- "aria-hidden": "true",
178
- className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
179
- }));
180
- };
181
- }
182
-
183
- // https://prosemirror.net/docs/ref/#view.EditorProps.nodeViews
184
- // The prosemirror EditorProps has a nodeViews key which has the rough shape:
185
- // type nodeViews: {
186
- // [nodeViewName: string]: (node, editorView, getPos, decorations, innerDecorations) => NodeView
187
- // }
188
- // So the value of the keys on the nodeViews object, are a function which should return a NodeView.
189
- // The following type NodeViewProducer, refers to these functions which return a NodeView.
190
- //
191
- // So the above type could also be described as
192
- // type NodeViewProducer = (node, editorView, getPos, decorations, innerDecorations) => NodeView
193
- // nodeViews: {
194
- // [nodeViewName: string]: NodeViewProducer
195
- // }
196
- // This return of this function is intended to be the value of a key
197
- // in a ProseMirror nodeViews object.
198
- export function getInlineNodeViewProducer(_ref3) {
199
- var pmPluginFactoryParams = _ref3.pmPluginFactoryParams,
200
- Component = _ref3.Component,
201
- extraComponentProps = _ref3.extraComponentProps;
202
- function nodeViewProducer() {
203
- var nodeView = createNodeView({
204
- nodeViewParams: {
205
- node: arguments.length <= 0 ? undefined : arguments[0],
206
- view: arguments.length <= 1 ? undefined : arguments[1],
207
- getPos: arguments.length <= 2 ? undefined : arguments[2],
208
- decorations: arguments.length <= 3 ? undefined : arguments[3]
209
- },
210
- pmPluginFactoryParams: pmPluginFactoryParams,
211
- Component: Component,
212
- extraComponentProps: extraComponentProps
213
- });
214
- return nodeView;
215
- }
216
- return nodeViewProducer;
217
- }
@@ -1 +0,0 @@
1
- export {};