@atlaskit/editor-core 184.0.0 → 185.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 (201) hide show
  1. package/.eslintrc.js +7 -3
  2. package/CHANGELOG.md +44 -0
  3. package/dist/cjs/create-editor/feature-flags-from-props.js +1 -2
  4. package/dist/cjs/editor-next/index.js +41 -34
  5. package/dist/cjs/editor.js +30 -269
  6. package/dist/cjs/i18n/en_ZZ.js +32 -6
  7. package/dist/cjs/index.js +0 -7
  8. package/dist/cjs/labs/next/presets/default.js +2 -1
  9. package/dist/cjs/plugins/base/index.js +0 -12
  10. package/dist/cjs/plugins/card/nodeviews/blockCard.js +7 -0
  11. package/dist/cjs/plugins/card/nodeviews/embedCard.js +7 -0
  12. package/dist/cjs/plugins/card/nodeviews/inlineCard.js +5 -1
  13. package/dist/cjs/plugins/card/pm-plugins/doc.js +1 -2
  14. package/dist/cjs/plugins/card/toolbar.js +11 -9
  15. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +4 -4
  16. package/dist/cjs/plugins/code-block/index.js +7 -5
  17. package/dist/cjs/plugins/code-block/toolbar.js +5 -5
  18. package/dist/cjs/plugins/copy-button/commands.js +2 -3
  19. package/dist/cjs/plugins/copy-button/toolbar.js +7 -8
  20. package/dist/cjs/plugins/expand/index.js +1 -1
  21. package/dist/cjs/plugins/expand/toolbar.js +40 -39
  22. package/dist/cjs/plugins/extension/index.js +1 -1
  23. package/dist/cjs/plugins/extension/toolbar.js +5 -5
  24. package/dist/cjs/plugins/floating-toolbar/index.js +3 -2
  25. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +2 -4
  26. package/dist/cjs/plugins/layout/index.js +8 -4
  27. package/dist/cjs/plugins/layout/toolbar.js +5 -6
  28. package/dist/cjs/plugins/media/toolbar/index.js +31 -24
  29. package/dist/cjs/plugins/panel/index.js +2 -1
  30. package/dist/cjs/plugins/panel/toolbar.js +7 -7
  31. package/dist/cjs/plugins/placeholder-text/index.js +7 -5
  32. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +19 -0
  33. package/dist/cjs/ui/CollapsedEditor/index.js +1 -2
  34. package/dist/cjs/ui/ColorPickerButton/index.js +2 -2
  35. package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +6 -10
  36. package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
  37. package/dist/cjs/ui/styles.js +6 -0
  38. package/dist/cjs/version-wrapper.js +1 -1
  39. package/dist/cjs/version.json +1 -1
  40. package/dist/es2019/create-editor/feature-flags-from-props.js +1 -2
  41. package/dist/es2019/editor-next/index.js +39 -30
  42. package/dist/es2019/editor.js +29 -232
  43. package/dist/es2019/i18n/en_ZZ.js +32 -6
  44. package/dist/es2019/index.js +1 -2
  45. package/dist/es2019/labs/next/presets/default.js +2 -1
  46. package/dist/es2019/plugins/base/index.js +0 -7
  47. package/dist/es2019/plugins/card/nodeviews/blockCard.js +8 -0
  48. package/dist/es2019/plugins/card/nodeviews/embedCard.js +8 -0
  49. package/dist/es2019/plugins/card/nodeviews/inlineCard.js +5 -1
  50. package/dist/es2019/plugins/card/pm-plugins/doc.js +1 -2
  51. package/dist/es2019/plugins/card/toolbar.js +8 -6
  52. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +2 -2
  53. package/dist/es2019/plugins/code-block/index.js +7 -5
  54. package/dist/es2019/plugins/code-block/toolbar.js +5 -6
  55. package/dist/es2019/plugins/copy-button/commands.js +2 -3
  56. package/dist/es2019/plugins/copy-button/toolbar.js +7 -8
  57. package/dist/es2019/plugins/expand/index.js +1 -1
  58. package/dist/es2019/plugins/expand/toolbar.js +5 -6
  59. package/dist/es2019/plugins/extension/index.js +1 -1
  60. package/dist/es2019/plugins/extension/toolbar.js +5 -6
  61. package/dist/es2019/plugins/floating-toolbar/index.js +3 -2
  62. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +2 -4
  63. package/dist/es2019/plugins/layout/index.js +8 -5
  64. package/dist/es2019/plugins/layout/toolbar.js +5 -6
  65. package/dist/es2019/plugins/media/toolbar/index.js +35 -24
  66. package/dist/es2019/plugins/panel/index.js +2 -2
  67. package/dist/es2019/plugins/panel/toolbar.js +7 -8
  68. package/dist/es2019/plugins/placeholder-text/index.js +7 -5
  69. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +21 -0
  70. package/dist/es2019/ui/CollapsedEditor/index.js +1 -2
  71. package/dist/es2019/ui/ColorPickerButton/index.js +2 -2
  72. package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +5 -10
  73. package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
  74. package/dist/es2019/ui/styles.js +6 -0
  75. package/dist/es2019/version-wrapper.js +1 -1
  76. package/dist/es2019/version.json +1 -1
  77. package/dist/esm/create-editor/feature-flags-from-props.js +1 -2
  78. package/dist/esm/editor-next/index.js +42 -33
  79. package/dist/esm/editor.js +29 -270
  80. package/dist/esm/i18n/en_ZZ.js +32 -6
  81. package/dist/esm/index.js +1 -2
  82. package/dist/esm/labs/next/presets/default.js +2 -1
  83. package/dist/esm/plugins/base/index.js +0 -9
  84. package/dist/esm/plugins/card/nodeviews/blockCard.js +7 -0
  85. package/dist/esm/plugins/card/nodeviews/embedCard.js +7 -0
  86. package/dist/esm/plugins/card/nodeviews/inlineCard.js +5 -1
  87. package/dist/esm/plugins/card/pm-plugins/doc.js +1 -2
  88. package/dist/esm/plugins/card/toolbar.js +7 -6
  89. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +2 -2
  90. package/dist/esm/plugins/code-block/index.js +7 -5
  91. package/dist/esm/plugins/code-block/toolbar.js +5 -5
  92. package/dist/esm/plugins/copy-button/commands.js +2 -3
  93. package/dist/esm/plugins/copy-button/toolbar.js +7 -8
  94. package/dist/esm/plugins/expand/index.js +1 -1
  95. package/dist/esm/plugins/expand/toolbar.js +40 -39
  96. package/dist/esm/plugins/extension/index.js +1 -1
  97. package/dist/esm/plugins/extension/toolbar.js +5 -5
  98. package/dist/esm/plugins/floating-toolbar/index.js +3 -2
  99. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +2 -4
  100. package/dist/esm/plugins/layout/index.js +8 -4
  101. package/dist/esm/plugins/layout/toolbar.js +5 -6
  102. package/dist/esm/plugins/media/toolbar/index.js +31 -24
  103. package/dist/esm/plugins/panel/index.js +2 -1
  104. package/dist/esm/plugins/panel/toolbar.js +7 -7
  105. package/dist/esm/plugins/placeholder-text/index.js +7 -5
  106. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +19 -0
  107. package/dist/esm/ui/CollapsedEditor/index.js +1 -2
  108. package/dist/esm/ui/ColorPickerButton/index.js +2 -2
  109. package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +5 -10
  110. package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
  111. package/dist/esm/ui/styles.js +6 -0
  112. package/dist/esm/version-wrapper.js +1 -1
  113. package/dist/esm/version.json +1 -1
  114. package/dist/types/editor-next/index.d.ts +0 -6
  115. package/dist/types/editor.d.ts +1 -137
  116. package/dist/types/i18n/en_ZZ.d.ts +28 -2
  117. package/dist/types/index.d.ts +0 -1
  118. package/dist/types/labs/next/presets/cxhtml.d.ts +106 -0
  119. package/dist/types/labs/next/presets/default.d.ts +212 -0
  120. package/dist/types/labs/next/presets/mobile.d.ts +106 -0
  121. package/dist/types/plugins/base/index.d.ts +0 -4
  122. package/dist/types/plugins/card/index.d.ts +2 -2
  123. package/dist/types/plugins/card/nodeviews/blockCard.d.ts +3 -0
  124. package/dist/types/plugins/card/nodeviews/embedCard.d.ts +3 -0
  125. package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -0
  126. package/dist/types/plugins/card/pm-plugins/doc.d.ts +1 -1
  127. package/dist/types/plugins/card/pm-plugins/keymap.d.ts +1 -1
  128. package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -2
  129. package/dist/types/plugins/card/toolbar.d.ts +1 -2
  130. package/dist/types/plugins/card/types.d.ts +1 -1
  131. package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +1 -2
  132. package/dist/types/plugins/card/ui/link-toolbar-button-group-options.d.ts +1 -1
  133. package/dist/types/plugins/card/ui/types.d.ts +1 -1
  134. package/dist/types/plugins/code-block/index.d.ts +7 -1
  135. package/dist/types/plugins/code-block/toolbar.d.ts +2 -1
  136. package/dist/types/plugins/copy-button/commands.d.ts +2 -1
  137. package/dist/types/plugins/copy-button/toolbar.d.ts +3 -2
  138. package/dist/types/plugins/expand/index.d.ts +2 -1
  139. package/dist/types/plugins/expand/toolbar.d.ts +2 -1
  140. package/dist/types/plugins/extension/index.d.ts +7 -2
  141. package/dist/types/plugins/extension/toolbar.d.ts +2 -1
  142. package/dist/types/plugins/floating-toolbar/index.d.ts +2 -1
  143. package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
  144. package/dist/types/plugins/layout/index.d.ts +7 -1
  145. package/dist/types/plugins/layout/toolbar.d.ts +2 -1
  146. package/dist/types/plugins/media/index.d.ts +3 -1
  147. package/dist/types/plugins/panel/index.d.ts +2 -0
  148. package/dist/types/plugins/panel/toolbar.d.ts +3 -2
  149. package/dist/types/plugins/placeholder-text/index.d.ts +3 -1
  150. package/dist/types/ui/CollapsedEditor/index.d.ts +1 -2
  151. package/dist/types/ui/ColorPickerButton/index.d.ts +2 -2
  152. package/dist/types-ts4.5/editor-next/index.d.ts +0 -6
  153. package/dist/types-ts4.5/editor.d.ts +1 -137
  154. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +28 -2
  155. package/dist/types-ts4.5/index.d.ts +0 -1
  156. package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +122 -0
  157. package/dist/types-ts4.5/labs/next/presets/default.d.ts +244 -0
  158. package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +122 -0
  159. package/dist/types-ts4.5/plugins/base/index.d.ts +0 -4
  160. package/dist/types-ts4.5/plugins/card/index.d.ts +2 -2
  161. package/dist/types-ts4.5/plugins/card/nodeviews/blockCard.d.ts +3 -0
  162. package/dist/types-ts4.5/plugins/card/nodeviews/embedCard.d.ts +3 -0
  163. package/dist/types-ts4.5/plugins/card/nodeviews/inlineCard.d.ts +1 -0
  164. package/dist/types-ts4.5/plugins/card/pm-plugins/doc.d.ts +1 -1
  165. package/dist/types-ts4.5/plugins/card/pm-plugins/keymap.d.ts +1 -1
  166. package/dist/types-ts4.5/plugins/card/pm-plugins/main.d.ts +1 -2
  167. package/dist/types-ts4.5/plugins/card/toolbar.d.ts +1 -2
  168. package/dist/types-ts4.5/plugins/card/types.d.ts +1 -1
  169. package/dist/types-ts4.5/plugins/card/ui/EditLinkToolbar.d.ts +1 -2
  170. package/dist/types-ts4.5/plugins/card/ui/link-toolbar-button-group-options.d.ts +1 -1
  171. package/dist/types-ts4.5/plugins/card/ui/types.d.ts +1 -1
  172. package/dist/types-ts4.5/plugins/code-block/index.d.ts +7 -1
  173. package/dist/types-ts4.5/plugins/code-block/toolbar.d.ts +2 -1
  174. package/dist/types-ts4.5/plugins/copy-button/commands.d.ts +2 -1
  175. package/dist/types-ts4.5/plugins/copy-button/toolbar.d.ts +3 -2
  176. package/dist/types-ts4.5/plugins/expand/index.d.ts +3 -1
  177. package/dist/types-ts4.5/plugins/expand/toolbar.d.ts +2 -1
  178. package/dist/types-ts4.5/plugins/extension/index.d.ts +4 -2
  179. package/dist/types-ts4.5/plugins/extension/toolbar.d.ts +2 -1
  180. package/dist/types-ts4.5/plugins/floating-toolbar/index.d.ts +3 -1
  181. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
  182. package/dist/types-ts4.5/plugins/layout/index.d.ts +7 -1
  183. package/dist/types-ts4.5/plugins/layout/toolbar.d.ts +2 -1
  184. package/dist/types-ts4.5/plugins/media/index.d.ts +3 -1
  185. package/dist/types-ts4.5/plugins/panel/index.d.ts +4 -0
  186. package/dist/types-ts4.5/plugins/panel/toolbar.d.ts +3 -2
  187. package/dist/types-ts4.5/plugins/placeholder-text/index.d.ts +5 -1
  188. package/dist/types-ts4.5/ui/CollapsedEditor/index.d.ts +1 -2
  189. package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +2 -2
  190. package/package.json +23 -18
  191. package/report.api.md +5 -93
  192. package/dist/cjs/editor-next/editor-migration-component.js +0 -54
  193. package/dist/cjs/plugins/base/pm-plugins/decoration.js +0 -122
  194. package/dist/es2019/editor-next/editor-migration-component.js +0 -30
  195. package/dist/es2019/plugins/base/pm-plugins/decoration.js +0 -111
  196. package/dist/esm/editor-next/editor-migration-component.js +0 -47
  197. package/dist/esm/plugins/base/pm-plugins/decoration.js +0 -113
  198. package/dist/types/editor-next/editor-migration-component.d.ts +0 -6
  199. package/dist/types/plugins/base/pm-plugins/decoration.d.ts +0 -24
  200. package/dist/types-ts4.5/editor-next/editor-migration-component.d.ts +0 -6
  201. package/dist/types-ts4.5/plugins/base/pm-plugins/decoration.d.ts +0 -24
@@ -13,7 +13,6 @@ var _form = require("@atlaskit/form");
13
13
  var _editorPalette = require("@atlaskit/editor-palette");
14
14
  var _common = require("../../../ui/ColorPalette/Palettes/common");
15
15
  var _utils = require("../utils");
16
- var _constants = require("@atlaskit/theme/constants");
17
16
  var _RequiredIndicator = require("./common/RequiredIndicator");
18
17
  var _typography = require("@atlaskit/theme/typography");
19
18
  var _FieldMessages = _interopRequireDefault(require("../FieldMessages"));
@@ -21,7 +20,7 @@ var _ColorPickerButton = _interopRequireDefault(require("../../ColorPickerButton
21
20
  var _ColorPalette = require("../../../ui/ColorPalette");
22
21
  var _templateObject, _templateObject2;
23
22
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
24
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
23
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } /** @jsx jsx */
25
24
  /*
26
25
  NOTE: color used here are not yet in atlaskit code
27
26
  this is part of extended color pack from ADG, which is yet to be release
@@ -377,13 +376,10 @@ var ColorPicker = function ColorPicker(props) {
377
376
  showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames,
378
377
  cols: EXPANDED_COLOR_PICKER_COLUMNS,
379
378
  alignX: "right",
380
- placement: "ConfigPanel"
381
- // TODO: Migrate away from gridSize
382
- // Recommendation: Update types of size object to accept string width/height and then replace gridSize with tokens
383
- ,
379
+ placement: "ConfigPanel",
384
380
  size: {
385
- width: 3 * (0, _constants.gridSize)(),
386
- height: 3 * (0, _constants.gridSize)()
381
+ width: "var(--ds-space-300, 24px)",
382
+ height: "var(--ds-space-300, 24px)"
387
383
  }
388
384
  }) : (0, _react.jsx)(_ColorPickerButton.default, {
389
385
  title: title,
@@ -394,8 +390,8 @@ var ColorPicker = function ColorPicker(props) {
394
390
  alignX: "right",
395
391
  placement: "ConfigPanel",
396
392
  size: {
397
- width: 3 * (0, _constants.gridSize)(),
398
- height: 3 * (0, _constants.gridSize)()
393
+ width: "var(--ds-space-300, 24px)",
394
+ height: "var(--ds-space-300, 24px)"
399
395
  }
400
396
  });
401
397
  };
@@ -84,18 +84,20 @@ function StatelessElementBrowser(props) {
84
84
  /* Only for hitting enter to select item when focused on search bar,
85
85
  * The actual enter key press is handled on individual items level.
86
86
  */
87
+ var selectedItem = items[selectedItemIndex];
87
88
  var onItemsEnterKeyPress = (0, _react.useCallback)(function (e) {
88
89
  if (e.key !== 'Enter') {
89
90
  return;
90
91
  }
91
- props.onInsertItem(items[selectedItemIndex]);
92
- }, [props, items, selectedItemIndex]);
92
+ if (onSelectItem && selectedItem != null) {
93
+ onSelectItem(selectedItem);
94
+ }
95
+ }, [onSelectItem, selectedItem]);
93
96
 
94
97
  /**
95
98
  * On arrow key selection and clicks the selectedItemIndex will change.
96
99
  * Making sure to update parent component.
97
100
  */
98
- var selectedItem = items[selectedItemIndex];
99
101
  (0, _react.useEffect)(function () {
100
102
  if (onSelectItem && selectedItem != null) {
101
103
  onSelectItem(selectedItem);
@@ -26,8 +26,14 @@ var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
26
26
  var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
27
27
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
28
28
  var buttonGroupStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: center;\n\n & > div {\n display: flex;\n }\n"])));
29
+
30
+ // This style is copied to packages/editor/editor-plugin-ai/src/ui/components/AtlassianIntelligenceToolbarButton/styles.tsx
31
+ // If you make change here, change in above file as well.
29
32
  exports.buttonGroupStyle = buttonGroupStyle;
30
33
  var separatorStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n width: 1px;\n height: 24px;\n display: inline-block;\n margin: 0 8px;\n user-select: none;\n"])), "var(--ds-border, ".concat(_colors.N30, ")"));
34
+
35
+ // This style is copied to packages/editor/editor-plugin-ai/src/ui/components/AtlassianIntelligenceToolbarButton/styles.tsx
36
+ // If you make change here, change in above file as well.
31
37
  exports.separatorStyles = separatorStyles;
32
38
  var wrapperStyle = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n\n > div,\n > span {\n display: flex;\n }\n\n > div > div {\n display: flex;\n }\n\n margin-left: 0;\n min-width: auto;\n"])));
33
39
  exports.wrapperStyle = wrapperStyle;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "184.0.0";
9
+ var version = "185.0.0";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "184.0.0",
3
+ "version": "185.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -21,7 +21,7 @@ function getSpellCheck(featureFlags) {
21
21
  * which is used by both current and archv3 editors.
22
22
  */
23
23
  export function createFeatureFlagsFromProps(props) {
24
- var _props$featureFlags, _ref, _props$featureFlags$u, _props$featureFlags2, _props$featureFlags3, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags4, _props$featureFlags5, _props$allowTables, _props$featureFlags6, _props$featureFlags7, _props$allowTables2, _props$featureFlags8, _props$featureFlags9, _props$allowTables3, _props$featureFlags10, _props$featureFlags11, _props$allowTables4, _props$allowTables5, _props$featureFlags12, _props$featureFlags13, _props$allowTables6, _props$allowExtension, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$collabEdit, _props$collabEdit2, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41, _props$featureFlags42, _props$featureFlags43, _props$featureFlags44, _props$featureFlags45, _props$featureFlags46, _props$featureFlags47;
24
+ var _props$featureFlags, _ref, _props$featureFlags$u, _props$featureFlags2, _props$featureFlags3, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags4, _props$featureFlags5, _props$allowTables, _props$featureFlags6, _props$featureFlags7, _props$allowTables2, _props$featureFlags8, _props$featureFlags9, _props$allowTables3, _props$featureFlags10, _props$featureFlags11, _props$allowTables4, _props$allowTables5, _props$featureFlags12, _props$featureFlags13, _props$allowTables6, _props$allowExtension, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$collabEdit, _props$collabEdit2, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41, _props$featureFlags42, _props$featureFlags43, _props$featureFlags44, _props$featureFlags45, _props$featureFlags46;
25
25
  const normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
26
26
  const tableCellOptionsInFloatingToolbar = normalizedFeatureFlags.tableCellOptionsInFloatingToolbar || ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableCellOptionsInFloatingToolbar) || undefined;
27
27
 
@@ -69,7 +69,6 @@ export function createFeatureFlagsFromProps(props) {
69
69
  useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags43 = props.featureFlags) === null || _props$featureFlags43 === void 0 ? void 0 : _props$featureFlags43.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags44 = props.featureFlags) !== null && _props$featureFlags44 !== void 0 && _props$featureFlags44.useSomewhatSemanticTextColorNames) : false)),
70
70
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
71
71
  preventPopupOverflow: Boolean(typeof ((_props$featureFlags45 = props.featureFlags) === null || _props$featureFlags45 === void 0 ? void 0 : _props$featureFlags45['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags46 = props.featureFlags) !== null && _props$featureFlags46 !== void 0 && _props$featureFlags46['prevent-popup-overflow']) : false),
72
- useEditorNext: normalizedFeatureFlags.useEditorNext === true || ((_props$featureFlags47 = props.featureFlags) === null || _props$featureFlags47 === void 0 ? void 0 : _props$featureFlags47.useEditorNext) === true,
73
72
  // duplicated logic from `create-plugins-list.ts` due to presets not being finalised
74
73
  useBetterTypeaheadNavigation: Boolean(typeof pseudoNormalisedUseBetterTypeaheadNavigation === 'boolean' ? !!pseudoNormalisedUseBetterTypeaheadNavigation : true)
75
74
  };
@@ -2,13 +2,14 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /** @jsx jsx */
3
3
 
4
4
  import { WithCreateAnalyticsEvent } from '@atlaskit/editor-common/ui';
5
- import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
5
+ // import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
6
6
  import { jsx } from '@emotion/react';
7
7
  import PropTypes from 'prop-types';
8
8
  import React from 'react';
9
- import { name, version } from '../version-wrapper';
10
- import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
11
- import uuid from 'uuid/v4';
9
+ // import { name, version } from '../version-wrapper';
10
+
11
+ // import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
12
+ // import uuid from 'uuid/v4';
12
13
  import EditorActions from '../actions';
13
14
  import { fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
14
15
  import EditorInternal from './editor-internal';
@@ -19,6 +20,8 @@ import deprecationWarnings from './utils/deprecationWarnings';
19
20
  import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
20
21
  import { basePlugin } from '../plugins';
21
22
  export default class EditorNext extends React.Component {
23
+ // private editorSessionId: string;
24
+
22
25
  constructor(props, context) {
23
26
  super(props);
24
27
  _defineProperty(this, "handleSave", view => {
@@ -32,7 +35,7 @@ export default class EditorNext extends React.Component {
32
35
  _defineProperty(this, "getExperienceStore", () => this.experienceStore);
33
36
  deprecationWarnings(props);
34
37
  this.editorActions = (context || {}).editorActions || new EditorActions();
35
- this.editorSessionId = uuid();
38
+ // this.editorSessionId = uuid();
36
39
  this.startTime = performance.now();
37
40
  this.onEditorCreated = this.onEditorCreated.bind(this);
38
41
  this.onEditorDestroyed = this.onEditorDestroyed.bind(this);
@@ -54,34 +57,40 @@ export default class EditorNext extends React.Component {
54
57
  this.editorActions._privateUnregisterEditor();
55
58
  }
56
59
  render() {
57
- return jsx(FabricEditorAnalyticsContext, {
58
- data: {
59
- packageName: name,
60
- packageVersion: version,
61
- componentName: 'editorCore',
62
- appearance: getAnalyticsAppearance(this.props.appearance),
63
- editorSessionId: this.editorSessionId
64
- }
65
- }, jsx(WithCreateAnalyticsEvent, {
66
- render: createAnalyticsEvent => (this.createAnalyticsEvent = createAnalyticsEvent) && jsx(EditorInternal, {
67
- props: this.props,
68
- handleAnalyticsEvent: this.handleAnalyticsEvent,
69
- createAnalyticsEvent: this.createAnalyticsEvent,
70
- preset: this.props.preset,
71
- handleSave: this.handleSave,
72
- editorActions: this.editorActions,
73
- getExperienceStore: this.getExperienceStore,
74
- onEditorCreated: this.onEditorCreated,
75
- onEditorDestroyed: this.onEditorDestroyed
60
+ // TODO: https://product-fabric.atlassian.net/browse/ED-16979
61
+ // Move `FabricEditorAnalyticsContext` back into `EditorNext`
62
+ // This was moved out here to workaround the issue that the analytics
63
+ // context does not wrap the Preset (and therefore does not pass this context
64
+ // information to analytics calls within plugins). After this cleanup task ^ we will
65
+ // not have to generate the `createAnalyticsEvent` outside the Preset
66
+ // and we can move this back into `EditorNext`.
67
+ return (
68
+ // <FabricEditorAnalyticsContext
69
+ // data={{
70
+ // packageName: name,
71
+ // packageVersion: version,
72
+ // componentName: 'editorCore',
73
+ // appearance: getAnalyticsAppearance(this.props.appearance),
74
+ // editorSessionId: this.editorSessionId,
75
+ // }}
76
+ // >
77
+ jsx(WithCreateAnalyticsEvent, {
78
+ render: createAnalyticsEvent => (this.createAnalyticsEvent = createAnalyticsEvent) && jsx(EditorInternal, {
79
+ props: this.props,
80
+ handleAnalyticsEvent: this.handleAnalyticsEvent,
81
+ createAnalyticsEvent: this.createAnalyticsEvent,
82
+ preset: this.props.preset,
83
+ handleSave: this.handleSave,
84
+ editorActions: this.editorActions,
85
+ getExperienceStore: this.getExperienceStore,
86
+ onEditorCreated: this.onEditorCreated,
87
+ onEditorDestroyed: this.onEditorDestroyed
88
+ })
76
89
  })
77
- }));
90
+ // </FabricEditorAnalyticsContext>
91
+ );
78
92
  }
79
93
  }
80
- /**
81
- * WARNING: Code should be shared between Editor + EditorNext
82
- * If you are making changes that affect both, consider making them
83
- * in editor-next/editor-internal.tsx or editor-next/editor-utils.ts
84
- */
85
94
  _defineProperty(EditorNext, "defaultProps", defaultProps);
86
95
  _defineProperty(EditorNext, "contextTypes", {
87
96
  editorActions: PropTypes.object
@@ -1,222 +1,38 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _extends from "@babel/runtime/helpers/extends";
2
3
  /** @jsx jsx */
3
4
  import { jsx } from '@emotion/react';
4
- import PropTypes from 'prop-types';
5
5
  import React from 'react';
6
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
- import { WithCreateAnalyticsEvent } from '@atlaskit/editor-common/ui';
8
- import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
9
- import { name, version } from './version-wrapper';
6
+ import { defaultProps } from './editor-next/utils/editorPropTypes';
7
+ import EditorNext from './editor-next';
8
+ import useUniversalPreset from './labs/next/presets/useUniversalPreset';
10
9
  import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
10
+ import { name, version } from './version-wrapper';
11
+ import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
11
12
  import uuid from 'uuid/v4';
12
- import EditorActions from './actions';
13
- import { EditorInternalWithoutHooks as EditorInternal } from './editor-next/editor-internal';
14
- import { defaultProps, propTypes } from './editor-next/utils/editorPropTypes';
15
- import trackEditorActions from './editor-next/utils/trackEditorActions';
16
- import onEditorCreated from './editor-next/utils/onEditorCreated';
17
- import deprecationWarnings from './editor-next/utils/deprecationWarnings';
18
- import { createFeatureFlagsFromProps } from './create-editor/feature-flags-from-props';
19
- import { fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
20
- import prepareQuickInsertProvider from './utils/prepare-quick-insert-provider';
21
- import prepareExtensionProvider from './utils/prepare-extension-provider';
22
- import handleProviders from './editor-next/utils/handleProviders';
23
- import getProvidersFromEditorProps from './editor-next/utils/getProvidersFromEditorProps';
24
- import { startMeasure, clearMeasure, stopMeasure, measureTTI } from '@atlaskit/editor-common/utils';
25
- import measurements from './utils/performance/measure-enum';
26
- import editorMeasureTTICallback from './editor-next/utils/editorMeasureTTICallback';
27
- import { ACTION } from '@atlaskit/editor-common/analytics';
28
- import sendDurationAnalytics from './editor-next/utils/sendDurationAnalytics';
29
- import { createPreset } from './create-editor/create-plugins-list';
30
- import { shouldRecreatePreset } from './create-editor/preset-utils';
13
+ const EditorNextWrapper = ({
14
+ props
15
+ }) => {
16
+ const preset = useUniversalPreset({
17
+ props
18
+ });
19
+ return jsx(EditorNext, _extends({
20
+ preset: preset
21
+ }, props));
22
+ };
31
23
  export default class Editor extends React.Component {
32
- constructor(props, context) {
33
- var _props$performanceTra, _props$performanceTra2, _props$featureFlags;
34
- super(props);
35
- /**
36
- * @private
37
- * @deprecated - Do not override this at all, this is an antipattern.
38
- * Please reach out to the Editor team if you were previously using this
39
- * and need to find a workaround.
40
- */
41
- _defineProperty(this, "prepareExtensionProvider", prepareExtensionProvider(() => this.editorActions));
42
- /**
43
- * @private
44
- * @deprecated - Do not override this at all, this is an antipattern.
45
- * Please reach out to the Editor team if you were previously using this
46
- * and need to find a workaround.
47
- */
48
- _defineProperty(this, "prepareQuickInsertProvider", (extensionProvider, quickInsert) => {
49
- return prepareQuickInsertProvider(this.editorActions, extensionProvider, quickInsert, this.createAnalyticsEvent);
50
- });
51
- /**
52
- * @private
53
- * @deprecated - Do not override this at all, this is an antipattern.
54
- * Please reach out to the Editor team if you were previously using this
55
- * and need to find a workaround.
56
- */
57
- _defineProperty(this, "handleSave", view => {
58
- var _this$props$onSave, _this$props;
59
- return (_this$props$onSave = (_this$props = this.props).onSave) === null || _this$props$onSave === void 0 ? void 0 : _this$props$onSave.call(_this$props, view);
60
- });
61
- /**
62
- * @private
63
- * @deprecated - Do not override this at all, this is an antipattern.
64
- * Please reach out to the Editor team if you were previously using this
65
- * and need to find a workaround.
66
- */
67
- _defineProperty(this, "handleAnalyticsEvent", data => fireAnalyticsEvent(this.createAnalyticsEvent)(data));
68
- _defineProperty(this, "getFeatureFlags", () => {
69
- return createFeatureFlagsFromProps(this.props);
70
- });
71
- _defineProperty(this, "getExperienceStore", () => this.experienceStore);
72
- this.providerFactory = new ProviderFactory();
73
- deprecationWarnings(props);
74
- this.editorActions = (context || {}).editorActions || new EditorActions();
75
- this.editorSessionId = uuid();
76
- this.startTime = performance.now();
77
- this.onEditorCreated = this.onEditorCreated.bind(this);
78
- this.onEditorDestroyed = this.onEditorDestroyed.bind(this);
79
- this.getExperienceStore = this.getExperienceStore.bind(this);
80
- this.trackEditorActions(this.editorActions, props);
81
-
82
- /**
83
- * Consider any changes here to corresponding file for `EditorNext` in
84
- * `useEditorConstructor` (editor-next/hooks/useEditorMeasuresConstructor.ts)
85
- */
86
- startMeasure(measurements.EDITOR_MOUNTED);
87
- if ((_props$performanceTra = props.performanceTracking) !== null && _props$performanceTra !== void 0 && (_props$performanceTra2 = _props$performanceTra.ttiTracking) !== null && _props$performanceTra2 !== void 0 && _props$performanceTra2.enabled || (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.ufo) {
88
- var _props$performanceTra3, _props$performanceTra4, _props$performanceTra5, _props$performanceTra6;
89
- measureTTI((tti, ttiFromInvocation, canceled) => {
90
- editorMeasureTTICallback(tti, ttiFromInvocation, canceled, this.props.performanceTracking, this.props.featureFlags, this.createAnalyticsEvent, this.experienceStore);
91
- }, (_props$performanceTra3 = props.performanceTracking) === null || _props$performanceTra3 === void 0 ? void 0 : (_props$performanceTra4 = _props$performanceTra3.ttiTracking) === null || _props$performanceTra4 === void 0 ? void 0 : _props$performanceTra4.ttiIdleThreshold, (_props$performanceTra5 = props.performanceTracking) === null || _props$performanceTra5 === void 0 ? void 0 : (_props$performanceTra6 = _props$performanceTra5.ttiTracking) === null || _props$performanceTra6 === void 0 ? void 0 : _props$performanceTra6.ttiCancelTimeout);
92
- }
93
-
94
- /**
95
- * Consider any changes here to corresponding file for `EditorNext` in
96
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts)
97
- */
98
- const _extensionProvider = this.prepareExtensionProvider(props.extensionProviders);
99
- const quickInsertProvider = this.prepareQuickInsertProvider(_extensionProvider, props.quickInsert);
100
- const preset = createPreset(props, undefined, this.createAnalyticsEvent);
101
- this.state = {
102
- extensionProvider: _extensionProvider,
103
- quickInsertProvider,
104
- preset
105
- };
106
- }
107
-
108
- /**
109
- * Consider any changes here to corresponding file for `EditorNext` in
110
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts) and
111
- * `useMeasureEditorMountTime` (editor-next/hooks/useMeasureEditorMountTime.ts)
112
- */
113
- componentDidMount() {
114
- stopMeasure(measurements.EDITOR_MOUNTED, sendDurationAnalytics(ACTION.EDITOR_MOUNTED, this.props, this.getExperienceStore, this.createAnalyticsEvent));
115
- handleProviders(this.providerFactory, getProvidersFromEditorProps(this.props), this.state.extensionProvider, this.state.quickInsertProvider);
116
- }
117
-
118
- /**
119
- * Consider any changes here to corresponding file for `EditorNext` in
120
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts)
121
- */
122
- componentDidUpdate(prevProps) {
123
- const needsANewPreset = shouldRecreatePreset(prevProps, this.props);
124
- const preset = needsANewPreset ? createPreset(this.props, prevProps, this.createAnalyticsEvent) : this.state.preset;
125
- const {
126
- extensionProviders,
127
- quickInsert
128
- } = this.props;
129
- if (extensionProviders && extensionProviders !== prevProps.extensionProviders ||
130
- // Though this will introduce some performance regression related to quick insert
131
- // loading but we can remove it soon when Forge will move to new API.
132
- // quickInsert={Promise.resolve(consumerQuickInsert)} is one of the main reason behind this performance issue.
133
- quickInsert && quickInsert !== prevProps.quickInsert) {
134
- const extensionProvider = this.prepareExtensionProvider(extensionProviders);
135
- const quickInsertProvider = this.prepareQuickInsertProvider(extensionProvider, quickInsert);
136
- this.setState({
137
- extensionProvider,
138
- quickInsertProvider,
139
- preset
140
- }, () => handleProviders(this.providerFactory, getProvidersFromEditorProps(this.props), this.state.extensionProvider, this.state.quickInsertProvider));
141
- return;
142
- }
143
- if (needsANewPreset) {
144
- this.setState({
145
- preset
146
- });
147
- return;
148
- }
149
- handleProviders(this.providerFactory, getProvidersFromEditorProps(this.props), this.state.extensionProvider, this.state.quickInsertProvider);
150
- }
151
-
152
- /**
153
- * Consider any changes here to corresponding file for `EditorNext` in
154
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts) and
155
- * `useMeasureEditorMountTime` (editor-next/hooks/useMeasureEditorMountTime.ts)
156
- */
157
- componentWillUnmount() {
158
- var _this$props2, _this$props2$performa, _this$props2$performa2, _this$props$featureFl;
159
- this.unregisterEditorFromActions();
160
- this.providerFactory.destroy();
161
- clearMeasure(measurements.EDITOR_MOUNTED);
162
- ((_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$performa = _this$props2.performanceTracking) === null || _this$props2$performa === void 0 ? void 0 : (_this$props2$performa2 = _this$props2$performa.onEditorReadyCallbackTracking) === null || _this$props2$performa2 === void 0 ? void 0 : _this$props2$performa2.enabled) && clearMeasure(measurements.ON_EDITOR_READY_CALLBACK);
163
- if ((_this$props$featureFl = this.props.featureFlags) !== null && _this$props$featureFl !== void 0 && _this$props$featureFl.ufo) {
164
- var _this$experienceStore;
165
- (_this$experienceStore = this.experienceStore) === null || _this$experienceStore === void 0 ? void 0 : _this$experienceStore.abortAll({
166
- reason: 'editor component unmounted'
167
- });
168
- }
169
- }
170
-
171
- /**
172
- * @private
173
- * @deprecated - Do not override this at all, this is an anti-pattern.
174
- * Please reach out to the Editor team if you were previously using this
175
- * and need to find a workaround.
176
- */
177
- trackEditorActions(editorActions, props) {
178
- return trackEditorActions(editorActions, props.performanceTracking, value => this.handleAnalyticsEvent(value));
179
- }
180
- /**
181
- * @private
182
- * @deprecated - Do not override this at all, this is an antipattern.
183
- * Please reach out to the Editor team if you were previously using this
184
- * and need to find a workaround.
185
- */
186
- onEditorCreated(instance) {
187
- onEditorCreated(instance, this.props, experienceStore => this.experienceStore = experienceStore, this.getExperienceStore, () => this.createAnalyticsEvent, this.editorActions, this.startTime, (view, dispatcher, transformerForActions) => this.registerEditorForActions(view, dispatcher, transformerForActions));
188
- }
189
-
190
- /**
191
- * @private
192
- * @deprecated - Do not override this at all, this is an antipattern.
193
- * Please reach out to the Editor team if you were previously using this
194
- * and need to find a workaround.
195
- */
196
- onEditorDestroyed(_instance) {
197
- var _this$props$onDestroy, _this$props3;
198
- this.unregisterEditorFromActions();
199
- (_this$props$onDestroy = (_this$props3 = this.props).onDestroy) === null || _this$props$onDestroy === void 0 ? void 0 : _this$props$onDestroy.call(_this$props3);
200
- }
201
- /**
202
- * @private
203
- * @deprecated - Do not override this at all, this is an antipattern.
204
- * Please reach out to the Editor team if you were previously using this
205
- * and need to find a workaround.
206
- */
207
- registerEditorForActions(editorView, eventDispatcher, contentTransformer) {
208
- this.editorActions._privateRegisterEditor(editorView, eventDispatcher, contentTransformer, this.getFeatureFlags);
209
- }
210
- /**
211
- * @private
212
- * @deprecated - Do not override this at all, this is an antipattern.
213
- * Please reach out to the Editor team if you were previously using this
214
- * and need to find a workaround.
215
- */
216
- unregisterEditorFromActions() {
217
- this.editorActions._privateUnregisterEditor();
24
+ constructor(...args) {
25
+ super(...args);
26
+ _defineProperty(this, "editorSessionId", uuid());
218
27
  }
219
28
  render() {
29
+ // TODO: https://product-fabric.atlassian.net/browse/ED-16979
30
+ // Move `FabricEditorAnalyticsContext` back into `EditorNext`
31
+ // This was moved out here to workaround the issue that the analytics
32
+ // context does not wrap the Preset (and therefore does not pass this context
33
+ // information to analytics calls within plugins). After this cleanup task ^ we will
34
+ // not have to generate the `createAnalyticsEvent` outside the Preset
35
+ // and we can move this back into `EditorNext`.
220
36
  return jsx(FabricEditorAnalyticsContext, {
221
37
  data: {
222
38
  packageName: name,
@@ -225,28 +41,9 @@ export default class Editor extends React.Component {
225
41
  appearance: getAnalyticsAppearance(this.props.appearance),
226
42
  editorSessionId: this.editorSessionId
227
43
  }
228
- }, jsx(WithCreateAnalyticsEvent, {
229
- render: createAnalyticsEvent => (this.createAnalyticsEvent = createAnalyticsEvent) && jsx(EditorInternal, {
230
- props: this.props,
231
- handleAnalyticsEvent: this.handleAnalyticsEvent,
232
- createAnalyticsEvent: this.createAnalyticsEvent,
233
- preset: this.state.preset,
234
- handleSave: this.handleSave,
235
- editorActions: this.editorActions,
236
- providerFactory: this.providerFactory,
237
- onEditorCreated: this.onEditorCreated,
238
- onEditorDestroyed: this.onEditorDestroyed
239
- })
44
+ }, jsx(EditorNextWrapper, {
45
+ props: this.props
240
46
  }));
241
47
  }
242
48
  }
243
- /**
244
- * WARNING: Code should be shared between Editor + EditorNext
245
- * If you are making changes that affect both, consider making them
246
- * in editor-next/editor-internal.tsx or editor-next/editor-utils.ts
247
- */
248
- _defineProperty(Editor, "defaultProps", defaultProps);
249
- _defineProperty(Editor, "contextTypes", {
250
- editorActions: PropTypes.object
251
- });
252
- _defineProperty(Editor, "propTypes", propTypes('minHeight only supports editor appearance chromeless and comment for Editor'));
49
+ _defineProperty(Editor, "defaultProps", defaultProps);