@atlaskit/editor-core 187.16.0 → 187.17.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 (64) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/create-editor/feature-flags-from-props.js +23 -25
  3. package/dist/cjs/plugins/base/index.js +0 -8
  4. package/dist/cjs/plugins/better-type-history/index.js +34 -0
  5. package/dist/cjs/plugins/{base/pm-plugins/better-type-history.js → better-type-history/pm-plugins/main.js} +4 -5
  6. package/dist/cjs/plugins/better-type-history/pm-plugins/plugin-key.js +9 -0
  7. package/dist/cjs/plugins/index.js +7 -0
  8. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
  9. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -14
  10. package/dist/cjs/plugins/paste/pm-plugins/main.js +7 -7
  11. package/dist/cjs/version-wrapper.js +1 -1
  12. package/dist/cjs/version.json +1 -1
  13. package/dist/es2019/create-editor/feature-flags-from-props.js +23 -25
  14. package/dist/es2019/plugins/base/index.js +0 -7
  15. package/dist/es2019/plugins/better-type-history/index.js +24 -0
  16. package/dist/es2019/plugins/{base/pm-plugins/better-type-history.js → better-type-history/pm-plugins/main.js} +1 -2
  17. package/dist/es2019/plugins/better-type-history/pm-plugins/plugin-key.js +2 -0
  18. package/dist/es2019/plugins/index.js +1 -0
  19. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -2
  20. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +2 -14
  21. package/dist/es2019/plugins/paste/pm-plugins/main.js +7 -7
  22. package/dist/es2019/version-wrapper.js +1 -1
  23. package/dist/es2019/version.json +1 -1
  24. package/dist/esm/create-editor/feature-flags-from-props.js +23 -25
  25. package/dist/esm/plugins/base/index.js +0 -8
  26. package/dist/esm/plugins/better-type-history/index.js +26 -0
  27. package/dist/esm/plugins/{base/pm-plugins/better-type-history.js → better-type-history/pm-plugins/main.js} +1 -2
  28. package/dist/esm/plugins/better-type-history/pm-plugins/plugin-key.js +2 -0
  29. package/dist/esm/plugins/index.js +1 -0
  30. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +2 -2
  31. package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -13
  32. package/dist/esm/plugins/paste/pm-plugins/main.js +7 -7
  33. package/dist/esm/version-wrapper.js +1 -1
  34. package/dist/esm/version.json +1 -1
  35. package/dist/types/plugins/better-type-history/index.d.ts +13 -0
  36. package/dist/types/plugins/{base/pm-plugins/better-type-history.d.ts → better-type-history/pm-plugins/main.d.ts} +0 -2
  37. package/dist/types/plugins/better-type-history/pm-plugins/plugin-key.d.ts +2 -0
  38. package/dist/types/plugins/index.d.ts +1 -0
  39. package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +2 -7
  40. package/dist/types/plugins/paste/index.d.ts +4 -2
  41. package/dist/types-ts4.5/plugins/better-type-history/index.d.ts +13 -0
  42. package/dist/types-ts4.5/plugins/{base/pm-plugins/better-type-history.d.ts → better-type-history/pm-plugins/main.d.ts} +0 -2
  43. package/dist/types-ts4.5/plugins/better-type-history/pm-plugins/plugin-key.d.ts +2 -0
  44. package/dist/types-ts4.5/plugins/index.d.ts +1 -0
  45. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +2 -7
  46. package/dist/types-ts4.5/plugins/paste/index.d.ts +4 -2
  47. package/package.json +1 -1
  48. package/report.api.md +1 -1
  49. package/tmp/api-report-tmp.d.ts +1 -1
  50. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +0 -15
  51. package/dist/cjs/ui/Resizer/ResizeLabel/index.js +0 -20
  52. package/dist/cjs/ui/Resizer/ResizeLabel/styles.js +0 -17
  53. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +0 -8
  54. package/dist/es2019/ui/Resizer/ResizeLabel/index.js +0 -12
  55. package/dist/es2019/ui/Resizer/ResizeLabel/styles.js +0 -25
  56. package/dist/esm/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +0 -8
  57. package/dist/esm/ui/Resizer/ResizeLabel/index.js +0 -12
  58. package/dist/esm/ui/Resizer/ResizeLabel/styles.js +0 -7
  59. package/dist/types/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.d.ts +0 -7
  60. package/dist/types/ui/Resizer/ResizeLabel/index.d.ts +0 -8
  61. package/dist/types/ui/Resizer/ResizeLabel/styles.d.ts +0 -3
  62. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.d.ts +0 -7
  63. package/dist/types-ts4.5/ui/Resizer/ResizeLabel/index.d.ts +0 -8
  64. package/dist/types-ts4.5/ui/Resizer/ResizeLabel/styles.d.ts +0 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`fb3dab2b017`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fb3dab2b017) - Decouple `better-type-history` plugin from `base` plugin
8
+
9
+ ### Patch Changes
10
+
11
+ - [`93a1fd7ce1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/93a1fd7ce1e) - Removed ResizeLabel
12
+
13
+ ## 187.16.1
14
+
15
+ ### Patch Changes
16
+
17
+ - [`8b104cb7575`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8b104cb7575) - [ED-14769] Remove tableCellOptionsinFloatingToolbar feature flag & make it default behaviour
18
+
3
19
  ## 187.16.0
4
20
 
5
21
  ### Minor Changes
@@ -32,9 +32,8 @@ function getSpellCheck(featureFlags) {
32
32
  * which is used by both current and archv3 editors.
33
33
  */
34
34
  function createFeatureFlagsFromProps(props) {
35
- var _props$featureFlags, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$allowTables5, _props$featureFlags10, _props$featureFlags11, _props$allowTables6, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _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$collabEdit, _props$collabEdit2, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41, _props$featureFlags42;
35
+ var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$allowTables5, _props$featureFlags9, _props$featureFlags10, _props$allowTables6, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _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$collabEdit, _props$collabEdit2, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41;
36
36
  var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(props.featureFlags);
37
- var tableCellOptionsInFloatingToolbar = normalizedFeatureFlags.tableCellOptionsInFloatingToolbar || ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableCellOptionsInFloatingToolbar) || undefined;
38
37
  return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
39
38
  newInsertionBehaviour: props.allowNewInsertionBehaviour,
40
39
  interactiveExpand: typeof props.allowExpand === 'boolean' ? props.allowExpand : Boolean(props.allowExpand && props.allowExpand.allowInteractiveExpand !== false),
@@ -45,34 +44,33 @@ function createFeatureFlagsFromProps(props) {
45
44
  singleLayout: (0, _typeof2.default)(props.allowLayouts) === 'object' && !!((_props$allowLayouts = props.allowLayouts) !== null && _props$allowLayouts !== void 0 && _props$allowLayouts.UNSAFE_allowSingleColumnLayout),
46
45
  undoRedoButtons: props.allowUndoRedoButtons,
47
46
  catchAllTracking: (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.catchAllTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled,
48
- stickyHeadersOptimization: typeof ((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.stickyHeadersOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
49
- initialRenderOptimization: typeof ((_props$featureFlags4 = props.featureFlags) === null || _props$featureFlags4 === void 0 ? void 0 : _props$featureFlags4.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags5 = props.featureFlags) !== null && _props$featureFlags5 !== void 0 && _props$featureFlags5.initialRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
50
- mouseMoveOptimization: typeof ((_props$featureFlags6 = props.featureFlags) === null || _props$featureFlags6 === void 0 ? void 0 : _props$featureFlags6.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags7 = props.featureFlags) !== null && _props$featureFlags7 !== void 0 && _props$featureFlags7.mouseMoveOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
51
- tableRenderOptimization: typeof ((_props$featureFlags8 = props.featureFlags) === null || _props$featureFlags8 === void 0 ? void 0 : _props$featureFlags8.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags9 = props.featureFlags) !== null && _props$featureFlags9 !== void 0 && _props$featureFlags9.tableRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && typeof ((_props$allowTables4 = props.allowTables) === null || _props$allowTables4 === void 0 ? void 0 : _props$allowTables4.tableRenderOptimization) === 'boolean' ? (_props$allowTables5 = props.allowTables) === null || _props$allowTables5 === void 0 ? void 0 : _props$allowTables5.tableRenderOptimization : true,
52
- tableOverflowShadowsOptimization: typeof ((_props$featureFlags10 = props.featureFlags) === null || _props$featureFlags10 === void 0 ? void 0 : _props$featureFlags10.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags11 = props.featureFlags) !== null && _props$featureFlags11 !== void 0 && _props$featureFlags11.tableOverflowShadowsOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables6 = props.allowTables) !== null && _props$allowTables6 !== void 0 && _props$allowTables6.tableOverflowShadowsOptimization),
47
+ stickyHeadersOptimization: typeof ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.stickyHeadersOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
48
+ initialRenderOptimization: typeof ((_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.initialRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
49
+ mouseMoveOptimization: typeof ((_props$featureFlags5 = props.featureFlags) === null || _props$featureFlags5 === void 0 ? void 0 : _props$featureFlags5.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags6 = props.featureFlags) !== null && _props$featureFlags6 !== void 0 && _props$featureFlags6.mouseMoveOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
50
+ tableRenderOptimization: typeof ((_props$featureFlags7 = props.featureFlags) === null || _props$featureFlags7 === void 0 ? void 0 : _props$featureFlags7.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.tableRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && typeof ((_props$allowTables4 = props.allowTables) === null || _props$allowTables4 === void 0 ? void 0 : _props$allowTables4.tableRenderOptimization) === 'boolean' ? (_props$allowTables5 = props.allowTables) === null || _props$allowTables5 === void 0 ? void 0 : _props$allowTables5.tableRenderOptimization : true,
51
+ tableOverflowShadowsOptimization: typeof ((_props$featureFlags9 = props.featureFlags) === null || _props$featureFlags9 === void 0 ? void 0 : _props$featureFlags9.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags10 = props.featureFlags) !== null && _props$featureFlags10 !== void 0 && _props$featureFlags10.tableOverflowShadowsOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables6 = props.allowTables) !== null && _props$allowTables6 !== void 0 && _props$allowTables6.tableOverflowShadowsOptimization),
53
52
  extendFloatingToolbar: Boolean((0, _typeof2.default)(props.allowExtension) === 'object' && ((_props$allowExtension = props.allowExtension) === null || _props$allowExtension === void 0 ? void 0 : _props$allowExtension.allowExtendFloatingToolbars)),
54
- showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags12 = props.featureFlags) === null || _props$featureFlags12 === void 0 ? void 0 : _props$featureFlags12.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags13 = props.featureFlags) !== null && _props$featureFlags13 !== void 0 && _props$featureFlags13.showAvatarGroupAsPlugin) : false),
55
- errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags14 = props.featureFlags) === null || _props$featureFlags14 === void 0 ? void 0 : _props$featureFlags14.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags15 = props.featureFlags) !== null && _props$featureFlags15 !== void 0 && _props$featureFlags15.useErrorBoundaryDocStructure) : false),
56
- synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17.synchronyErrorDocStructure) : false),
57
- enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags18 = props.featureFlags) === null || _props$featureFlags18 === void 0 ? void 0 : _props$featureFlags18.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags19 = props.featureFlags) !== null && _props$featureFlags19 !== void 0 && _props$featureFlags19.enableViewUpdateSubscription) : false),
58
- collabAvatarScroll: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.collabAvatarScroll) : false),
59
- ufo: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.ufo) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.ufo) : false),
60
- twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.twoLineEditorToolbar) : false),
61
- saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.saferDispatchedTransactions) : false)),
62
- saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.saferDispatchedTransactionsAnalyticsOnly) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.saferDispatchedTransactionsAnalyticsOnly) : false)),
53
+ showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags11 = props.featureFlags) === null || _props$featureFlags11 === void 0 ? void 0 : _props$featureFlags11.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags12 = props.featureFlags) !== null && _props$featureFlags12 !== void 0 && _props$featureFlags12.showAvatarGroupAsPlugin) : false),
54
+ errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags13 = props.featureFlags) === null || _props$featureFlags13 === void 0 ? void 0 : _props$featureFlags13.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags14 = props.featureFlags) !== null && _props$featureFlags14 !== void 0 && _props$featureFlags14.useErrorBoundaryDocStructure) : false),
55
+ synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags16 = props.featureFlags) !== null && _props$featureFlags16 !== void 0 && _props$featureFlags16.synchronyErrorDocStructure) : false),
56
+ enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags17 = props.featureFlags) === null || _props$featureFlags17 === void 0 ? void 0 : _props$featureFlags17.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags18 = props.featureFlags) !== null && _props$featureFlags18 !== void 0 && _props$featureFlags18.enableViewUpdateSubscription) : false),
57
+ collabAvatarScroll: Boolean(typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags20 = props.featureFlags) !== null && _props$featureFlags20 !== void 0 && _props$featureFlags20.collabAvatarScroll) : false),
58
+ ufo: Boolean(typeof ((_props$featureFlags21 = props.featureFlags) === null || _props$featureFlags21 === void 0 ? void 0 : _props$featureFlags21.ufo) === 'boolean' ? !!((_props$featureFlags22 = props.featureFlags) !== null && _props$featureFlags22 !== void 0 && _props$featureFlags22.ufo) : false),
59
+ twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags23 = props.featureFlags) === null || _props$featureFlags23 === void 0 ? void 0 : _props$featureFlags23.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags24 = props.featureFlags) !== null && _props$featureFlags24 !== void 0 && _props$featureFlags24.twoLineEditorToolbar) : false),
60
+ saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags26 = props.featureFlags) !== null && _props$featureFlags26 !== void 0 && _props$featureFlags26.saferDispatchedTransactions) : false)),
61
+ saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$featureFlags27 = props.featureFlags) === null || _props$featureFlags27 === void 0 ? void 0 : _props$featureFlags27.saferDispatchedTransactionsAnalyticsOnly) === 'boolean' ? !!((_props$featureFlags28 = props.featureFlags) !== null && _props$featureFlags28 !== void 0 && _props$featureFlags28.saferDispatchedTransactionsAnalyticsOnly) : false)),
63
62
  useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
64
- chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
65
- tableCellOptionsInFloatingToolbar: typeof tableCellOptionsInFloatingToolbar === 'boolean' ? tableCellOptionsInFloatingToolbar : false,
66
- showHoverPreview: Boolean(typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.showHoverPreview) === 'boolean' ? !!((_props$featureFlags32 = props.featureFlags) !== null && _props$featureFlags32 !== void 0 && _props$featureFlags32.showHoverPreview) : false),
67
- indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags34 = props.featureFlags) !== null && _props$featureFlags34 !== void 0 && _props$featureFlags34.indentationButtonsInTheToolbar) : false)),
68
- floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags36 = props.featureFlags) !== null && _props$featureFlags36 !== void 0 && _props$featureFlags36.floatingToolbarCopyButton) : false)),
69
- floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
63
+ chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
64
+ showHoverPreview: Boolean(typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30.showHoverPreview) === 'boolean' ? !!((_props$featureFlags31 = props.featureFlags) !== null && _props$featureFlags31 !== void 0 && _props$featureFlags31.showHoverPreview) : false),
65
+ indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags32 = props.featureFlags) === null || _props$featureFlags32 === void 0 ? void 0 : _props$featureFlags32.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags33 = props.featureFlags) !== null && _props$featureFlags33 !== void 0 && _props$featureFlags33.indentationButtonsInTheToolbar) : false)),
66
+ floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags35 = props.featureFlags) !== null && _props$featureFlags35 !== void 0 && _props$featureFlags35.floatingToolbarCopyButton) : false)),
67
+ floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags36 = props.featureFlags) === null || _props$featureFlags36 === void 0 ? void 0 : _props$featureFlags36['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
70
68
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
71
69
  // Including fallback to props.featureFlags so that mobile feature flags
72
70
  // are included (they are not kebab cased)
73
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.restartNumberedLists) === true,
74
- useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags39 = props.featureFlags) === null || _props$featureFlags39 === void 0 ? void 0 : _props$featureFlags39.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags40 = props.featureFlags) !== null && _props$featureFlags40 !== void 0 && _props$featureFlags40.useSomewhatSemanticTextColorNames) : false)),
71
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37.restartNumberedLists) === true,
72
+ useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags39 = props.featureFlags) !== null && _props$featureFlags39 !== void 0 && _props$featureFlags39.useSomewhatSemanticTextColorNames) : false)),
75
73
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
76
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags41 = props.featureFlags) === null || _props$featureFlags41 === void 0 ? void 0 : _props$featureFlags41['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags42 = props.featureFlags) !== null && _props$featureFlags42 !== void 0 && _props$featureFlags42['prevent-popup-overflow']) : false)
74
+ preventPopupOverflow: Boolean(typeof ((_props$featureFlags40 = props.featureFlags) === null || _props$featureFlags40 === void 0 ? void 0 : _props$featureFlags40['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags41 = props.featureFlags) !== null && _props$featureFlags41 !== void 0 && _props$featureFlags41['prevent-popup-overflow']) : false)
77
75
  });
78
76
  }
@@ -17,7 +17,6 @@ var _disableSpellChecking = _interopRequireDefault(require("./pm-plugins/disable
17
17
  var _contextIdentifier = _interopRequireDefault(require("./pm-plugins/context-identifier"));
18
18
  var _newlinePreserveMarks = _interopRequireDefault(require("./pm-plugins/newline-preserve-marks"));
19
19
  var _inlineCursorTarget = _interopRequireDefault(require("./pm-plugins/inline-cursor-target"));
20
- var _betterTypeHistory = _interopRequireDefault(require("./pm-plugins/better-type-history"));
21
20
  var _scrollGutter = _interopRequireDefault(require("./pm-plugins/scroll-gutter"));
22
21
  var _keymaps = require("@atlaskit/editor-common/keymaps");
23
22
  var _frozenEditor = _interopRequireDefault(require("./pm-plugins/frozen-editor"));
@@ -97,13 +96,6 @@ var basePlugin = function basePlugin(options, api) {
97
96
  providerFactory = _ref4.providerFactory;
98
97
  return (0, _contextIdentifier.default)(dispatch, providerFactory);
99
98
  }
100
- }, {
101
- name: 'betterTypeHistory',
102
- plugin: function plugin(_ref5) {
103
- var dispatch = _ref5.dispatch,
104
- providerFactory = _ref5.providerFactory;
105
- return (0, _betterTypeHistory.default)();
106
- }
107
99
  });
108
100
  if (options && options.allowScrollGutter) {
109
101
  plugins.push({
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _main = _interopRequireDefault(require("./pm-plugins/main"));
9
+ var _pluginKey = require("./pm-plugins/plugin-key");
10
+ /**
11
+ * This plugin is aiming to improve undo behaviour for some of our more custom applications, very specific text
12
+ * paste events, splitting blocks of text, new lines.
13
+ */
14
+ var betterTypeHistory = function betterTypeHistory() {
15
+ return {
16
+ name: 'betterTypeHistory',
17
+ actions: {
18
+ flagPasteEvent: function flagPasteEvent(tr) {
19
+ tr.setMeta(_pluginKey.pluginKey, true);
20
+ return tr;
21
+ }
22
+ },
23
+ pmPlugins: function pmPlugins() {
24
+ return [{
25
+ name: 'betterTypeHistory',
26
+ plugin: function plugin() {
27
+ return (0, _main.default)();
28
+ }
29
+ }];
30
+ }
31
+ };
32
+ };
33
+ var _default = betterTypeHistory;
34
+ exports.default = _default;
@@ -3,13 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.pluginKey = exports.default = void 0;
6
+ exports.default = void 0;
7
7
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
8
8
  var _state = require("@atlaskit/editor-prosemirror/state");
9
9
  var _model = require("@atlaskit/editor-prosemirror/model");
10
10
  var _history = require("@atlaskit/editor-prosemirror/history");
11
11
  var _transform = require("@atlaskit/editor-prosemirror/transform");
12
12
  var _step = require("../../../utils/step");
13
+ var _pluginKey = require("./plugin-key");
13
14
  var getEnterKeyboardActionStep = function getEnterKeyboardActionStep(trs) {
14
15
  var firstTr = trs.length === 1 && trs[0];
15
16
  if (!firstTr || !firstTr.docChanged || !firstTr.isGeneric || !(firstTr.selection instanceof _state.TextSelection)) {
@@ -38,14 +39,12 @@ var isSliceAddingNewlineChar = function isSliceAddingNewlineChar(slice, schema)
38
39
  var newLine = _model.Fragment.from(schema.text('\n'));
39
40
  return slice.content.eq(newLine);
40
41
  };
41
- var pluginKey = new _state.PluginKey('betterTypeHistoryPlugin');
42
- exports.pluginKey = pluginKey;
43
42
  var _default = function _default() {
44
43
  return new _safePlugin.SafePlugin({
45
- key: pluginKey,
44
+ key: _pluginKey.pluginKey,
46
45
  appendTransaction: function appendTransaction(transactions, oldState, newState) {
47
46
  var hasHandlePasteMeta = transactions.find(function (tran) {
48
- return tran.getMeta(pluginKey);
47
+ return tran.getMeta(_pluginKey.pluginKey);
49
48
  });
50
49
  if (hasHandlePasteMeta) {
51
50
  return (0, _history.closeHistory)(newState.tr);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.pluginKey = void 0;
7
+ var _state = require("@atlaskit/editor-prosemirror/state");
8
+ var pluginKey = new _state.PluginKey('betterTypeHistoryPlugin');
9
+ exports.pluginKey = pluginKey;
@@ -41,6 +41,12 @@ Object.defineProperty(exports, "beforePrimaryToolbarPlugin", {
41
41
  return _beforePrimaryToolbar.default;
42
42
  }
43
43
  });
44
+ Object.defineProperty(exports, "betterTypeHistoryPlugin", {
45
+ enumerable: true,
46
+ get: function get() {
47
+ return _betterTypeHistory.default;
48
+ }
49
+ });
44
50
  Object.defineProperty(exports, "blockPluginStateKey", {
45
51
  enumerable: true,
46
52
  get: function get() {
@@ -379,6 +385,7 @@ Object.defineProperty(exports, "viewUpdateSubscriptionPlugin", {
379
385
  });
380
386
  var _base = _interopRequireDefault(require("./base"));
381
387
  var _blockType = _interopRequireWildcard(require("./block-type"));
388
+ var _betterTypeHistory = _interopRequireDefault(require("./better-type-history"));
382
389
  var _clearMarksOnChangeToEmptyDocument = _interopRequireDefault(require("./clear-marks-on-change-to-empty-document"));
383
390
  var _codeBlock = _interopRequireDefault(require("./code-block"));
384
391
  var _collabEdit = _interopRequireDefault(require("./collab-edit"));
@@ -395,7 +395,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
395
395
  gutterOffset: _mediaSingle.MEDIA_SINGLE_GUTTER_SIZE
396
396
  })
397
397
  };
398
- var ResizableMediaSingleProps = _objectSpread({
398
+ var resizableMediaSingleProps = _objectSpread({
399
399
  view: view,
400
400
  getPos: getPos,
401
401
  updateSize: this.updateSize,
@@ -429,7 +429,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
429
429
  ref: this.captionPlaceHolderRef,
430
430
  onClick: this.clickPlaceholder
431
431
  }));
432
- return canResize ? (0, _platformFeatureFlags.getBooleanFF)('platform.editor.media.extended-resize-experience') ? (0, _react.jsx)(_ResizableMediaSingleNext.default, ResizableMediaSingleProps, MediaChildren) : (0, _react.jsx)(_ResizableMediaSingle.default, (0, _extends2.default)({}, ResizableMediaSingleProps, {
432
+ return canResize ? (0, _platformFeatureFlags.getBooleanFF)('platform.editor.media.extended-resize-experience') ? (0, _react.jsx)(_ResizableMediaSingleNext.default, resizableMediaSingleProps, MediaChildren) : (0, _react.jsx)(_ResizableMediaSingle.default, (0, _extends2.default)({}, resizableMediaSingleProps, {
433
433
  lineLength: contentWidthForLegacyExperience
434
434
  }), MediaChildren) : (0, _react.jsx)(_ui.MediaSingle, mediaSingleProps, MediaChildren);
435
435
  }
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.resizerNextTestId = exports.default = exports.UnwrappedResizableMediaSingleNext = void 0;
7
+ exports.resizerNextTestId = exports.default = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
@@ -24,9 +24,6 @@ var _utils2 = require("@atlaskit/editor-common/utils");
24
24
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
25
25
  var _styled = require("./styled");
26
26
  var _resizer = require("@atlaskit/editor-common/resizer");
27
- var _ResizeLabel = _interopRequireDefault(require("../../../../ui/Resizer/ResizeLabel"));
28
- var _reactIntlNext = require("react-intl-next");
29
- var _resizableMediaSingleMessages = require("./resizable-media-single-messages");
30
27
  var _analytics = require("@atlaskit/editor-common/analytics");
31
28
  var _classnames = _interopRequireDefault(require("classnames"));
32
29
  var _styles = require("@atlaskit/editor-common/styles");
@@ -474,7 +471,6 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
474
471
  fullWidthMode = _this$props8.fullWidthMode,
475
472
  selected = _this$props8.selected,
476
473
  children = _this$props8.children,
477
- intl = _this$props8.intl,
478
474
  lineLength = _this$props8.lineLength;
479
475
  var _this$state = this.state,
480
476
  isResizing = _this$state.isResizing,
@@ -495,8 +491,6 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
495
491
  'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
496
492
  });
497
493
  var resizerNextClassName = (0, _classnames.default)(className, _styles.resizerStyles);
498
- var showSizeGuide = selected || isResizing;
499
- var label = layout === 'full-width' ? intl.formatMessage(_resizableMediaSingleMessages.messages.fullWidthImage) : "".concat(this.state.size.width, " x ").concat(this.state.size.height);
500
494
  var maxWidth = this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
501
495
  return (0, _react2.jsx)("div", {
502
496
  ref: this.saveWrapper,
@@ -522,14 +516,10 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
522
516
  snap: this.state.snaps,
523
517
  resizeRatio: _utils2.nonWrappedLayouts.includes(layout) ? 2 : 1,
524
518
  "data-testid": resizerNextTestId
525
- }, showSizeGuide && (0, _react2.jsx)(_ResizeLabel.default, {
526
- label: label,
527
- containerWidth: this.state.size.width
528
- }), children));
519
+ }, children));
529
520
  }
530
521
  }]);
531
522
  return ResizableMediaSingleNext;
532
- }(_react.default.Component); // for testing purpose
533
- exports.UnwrappedResizableMediaSingleNext = ResizableMediaSingleNext;
534
- var _default = (0, _reactIntlNext.injectIntl)(ResizableMediaSingleNext);
523
+ }(_react.default.Component);
524
+ var _default = ResizableMediaSingleNext;
535
525
  exports.default = _default;
@@ -36,7 +36,6 @@ var _transforms = require("../../list/transforms");
36
36
  var _paste = require("@atlaskit/editor-common/paste");
37
37
  var _utils5 = require("../../tasks-and-decisions/utils");
38
38
  var _utils6 = require("../../annotation/utils");
39
- var _betterTypeHistory = require("../../base/pm-plugins/better-type-history");
40
39
  var _clipboardTextSerializer = require("./clipboard-text-serializer");
41
40
  var _tinyMCE = require("../util/tinyMCE");
42
41
  var _utils7 = require("@atlaskit/editor-tables/utils");
@@ -212,8 +211,9 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
212
211
  });
213
212
  return tableExists;
214
213
  });
215
- if (!isPastingTextInsidePlaceholderText && !isPastingTable && !isPastingOverLayoutColumns) {
216
- tr.setMeta(_betterTypeHistory.pluginKey, true);
214
+ if (!isPastingTextInsidePlaceholderText && !isPastingTable && !isPastingOverLayoutColumns && pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.dependencies.betterTypeHistory) {
215
+ var _pluginInjectionApi$d;
216
+ tr = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.betterTypeHistory) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.actions.flagPasteEvent(tr);
217
217
  }
218
218
  (0, _card.addLinkMetadata)(view.state.selection, tr, {
219
219
  action: isPlainText ? _analytics2.ACTION.PASTED_AS_PLAIN : _analytics2.ACTION.PASTED,
@@ -241,14 +241,14 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
241
241
  // force a "paste as plain text" action by clearing the markdownSlice.
242
242
  markdownSlice = !((_markdownSlice = markdownSlice) !== null && _markdownSlice !== void 0 && _markdownSlice.size) ? undefined : markdownSlice;
243
243
  if (markdownSlice) {
244
- var _pluginInjectionApi$d, _pluginInjectionApi$d2;
244
+ var _pluginInjectionApi$d2, _pluginInjectionApi$d3;
245
245
  // linkify text prior to converting to macro
246
246
  if ((0, _analytics.handlePasteLinkOnSelectedTextWithAnalytics)(view, event, markdownSlice, _analytics2.PasteTypes.markdown)(state, dispatch)) {
247
247
  return true;
248
248
  }
249
249
 
250
250
  // run macro autoconvert prior to other conversions
251
- if ((0, _handlers.handleMacroAutoConvert)(text, markdownSlice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.card) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.actions) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
251
+ if ((0, _handlers.handleMacroAutoConvert)(text, markdownSlice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d2 = pluginInjectionApi.dependencies.card) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : (_pluginInjectionApi$d3 = _pluginInjectionApi$d2.actions) === null || _pluginInjectionApi$d3 === void 0 ? void 0 : _pluginInjectionApi$d3.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
252
252
  // TODO: handleMacroAutoConvert dispatch twice, so we can't use the helper
253
253
  (0, _analytics.sendPasteAnalyticsEvent)(view, event, markdownSlice, {
254
254
  type: _analytics2.PasteTypes.markdown
@@ -313,7 +313,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
313
313
 
314
314
  // finally, handle rich-text copy-paste
315
315
  if (isRichText) {
316
- var _pluginInjectionApi$d3, _pluginInjectionApi$d4;
316
+ var _pluginInjectionApi$d4, _pluginInjectionApi$d5;
317
317
  // linkify the text where possible
318
318
  slice = (0, _utils.linkifyContent)(state.schema)(slice);
319
319
  if ((0, _analytics.handlePasteLinkOnSelectedTextWithAnalytics)(view, event, slice, _analytics2.PasteTypes.richText)(state, dispatch)) {
@@ -321,7 +321,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
321
321
  }
322
322
 
323
323
  // run macro autoconvert prior to other conversions
324
- if ((0, _handlers.handleMacroAutoConvert)(text, slice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d3 = pluginInjectionApi.dependencies.card) === null || _pluginInjectionApi$d3 === void 0 ? void 0 : (_pluginInjectionApi$d4 = _pluginInjectionApi$d3.actions) === null || _pluginInjectionApi$d4 === void 0 ? void 0 : _pluginInjectionApi$d4.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
324
+ if ((0, _handlers.handleMacroAutoConvert)(text, slice, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d4 = pluginInjectionApi.dependencies.card) === null || _pluginInjectionApi$d4 === void 0 ? void 0 : (_pluginInjectionApi$d5 = _pluginInjectionApi$d4.actions) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : _pluginInjectionApi$d5.queueCardsFromChangedTr, cardOptions, extensionAutoConverter)(state, dispatch, view)) {
325
325
  // TODO: handleMacroAutoConvert dispatch twice, so we can't use the helper
326
326
  (0, _analytics.sendPasteAnalyticsEvent)(view, event, slice, {
327
327
  type: _analytics2.PasteTypes.richText
@@ -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 = "187.16.0";
9
+ var version = "187.17.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": "187.16.0",
3
+ "version": "187.17.0",
4
4
  "sideEffects": false
5
5
  }
@@ -21,9 +21,8 @@ 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, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$allowTables5, _props$featureFlags10, _props$featureFlags11, _props$allowTables6, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _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$collabEdit, _props$collabEdit2, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41, _props$featureFlags42;
24
+ var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$allowTables5, _props$featureFlags9, _props$featureFlags10, _props$allowTables6, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _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$collabEdit, _props$collabEdit2, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41;
25
25
  const normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
26
- const tableCellOptionsInFloatingToolbar = normalizedFeatureFlags.tableCellOptionsInFloatingToolbar || ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableCellOptionsInFloatingToolbar) || undefined;
27
26
  return {
28
27
  ...normalizedFeatureFlags,
29
28
  newInsertionBehaviour: props.allowNewInsertionBehaviour,
@@ -35,34 +34,33 @@ export function createFeatureFlagsFromProps(props) {
35
34
  singleLayout: typeof props.allowLayouts === 'object' && !!((_props$allowLayouts = props.allowLayouts) !== null && _props$allowLayouts !== void 0 && _props$allowLayouts.UNSAFE_allowSingleColumnLayout),
36
35
  undoRedoButtons: props.allowUndoRedoButtons,
37
36
  catchAllTracking: (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.catchAllTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled,
38
- stickyHeadersOptimization: typeof ((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.stickyHeadersOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
39
- initialRenderOptimization: typeof ((_props$featureFlags4 = props.featureFlags) === null || _props$featureFlags4 === void 0 ? void 0 : _props$featureFlags4.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags5 = props.featureFlags) !== null && _props$featureFlags5 !== void 0 && _props$featureFlags5.initialRenderOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
40
- mouseMoveOptimization: typeof ((_props$featureFlags6 = props.featureFlags) === null || _props$featureFlags6 === void 0 ? void 0 : _props$featureFlags6.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags7 = props.featureFlags) !== null && _props$featureFlags7 !== void 0 && _props$featureFlags7.mouseMoveOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
41
- tableRenderOptimization: typeof ((_props$featureFlags8 = props.featureFlags) === null || _props$featureFlags8 === void 0 ? void 0 : _props$featureFlags8.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags9 = props.featureFlags) !== null && _props$featureFlags9 !== void 0 && _props$featureFlags9.tableRenderOptimization) : typeof props.allowTables === 'object' && typeof ((_props$allowTables4 = props.allowTables) === null || _props$allowTables4 === void 0 ? void 0 : _props$allowTables4.tableRenderOptimization) === 'boolean' ? (_props$allowTables5 = props.allowTables) === null || _props$allowTables5 === void 0 ? void 0 : _props$allowTables5.tableRenderOptimization : true,
42
- tableOverflowShadowsOptimization: typeof ((_props$featureFlags10 = props.featureFlags) === null || _props$featureFlags10 === void 0 ? void 0 : _props$featureFlags10.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags11 = props.featureFlags) !== null && _props$featureFlags11 !== void 0 && _props$featureFlags11.tableOverflowShadowsOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables6 = props.allowTables) !== null && _props$allowTables6 !== void 0 && _props$allowTables6.tableOverflowShadowsOptimization),
37
+ stickyHeadersOptimization: typeof ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.stickyHeadersOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
38
+ initialRenderOptimization: typeof ((_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.initialRenderOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
39
+ mouseMoveOptimization: typeof ((_props$featureFlags5 = props.featureFlags) === null || _props$featureFlags5 === void 0 ? void 0 : _props$featureFlags5.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags6 = props.featureFlags) !== null && _props$featureFlags6 !== void 0 && _props$featureFlags6.mouseMoveOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
40
+ tableRenderOptimization: typeof ((_props$featureFlags7 = props.featureFlags) === null || _props$featureFlags7 === void 0 ? void 0 : _props$featureFlags7.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.tableRenderOptimization) : typeof props.allowTables === 'object' && typeof ((_props$allowTables4 = props.allowTables) === null || _props$allowTables4 === void 0 ? void 0 : _props$allowTables4.tableRenderOptimization) === 'boolean' ? (_props$allowTables5 = props.allowTables) === null || _props$allowTables5 === void 0 ? void 0 : _props$allowTables5.tableRenderOptimization : true,
41
+ tableOverflowShadowsOptimization: typeof ((_props$featureFlags9 = props.featureFlags) === null || _props$featureFlags9 === void 0 ? void 0 : _props$featureFlags9.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags10 = props.featureFlags) !== null && _props$featureFlags10 !== void 0 && _props$featureFlags10.tableOverflowShadowsOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables6 = props.allowTables) !== null && _props$allowTables6 !== void 0 && _props$allowTables6.tableOverflowShadowsOptimization),
43
42
  extendFloatingToolbar: Boolean(typeof props.allowExtension === 'object' && ((_props$allowExtension = props.allowExtension) === null || _props$allowExtension === void 0 ? void 0 : _props$allowExtension.allowExtendFloatingToolbars)),
44
- showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags12 = props.featureFlags) === null || _props$featureFlags12 === void 0 ? void 0 : _props$featureFlags12.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags13 = props.featureFlags) !== null && _props$featureFlags13 !== void 0 && _props$featureFlags13.showAvatarGroupAsPlugin) : false),
45
- errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags14 = props.featureFlags) === null || _props$featureFlags14 === void 0 ? void 0 : _props$featureFlags14.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags15 = props.featureFlags) !== null && _props$featureFlags15 !== void 0 && _props$featureFlags15.useErrorBoundaryDocStructure) : false),
46
- synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17.synchronyErrorDocStructure) : false),
47
- enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags18 = props.featureFlags) === null || _props$featureFlags18 === void 0 ? void 0 : _props$featureFlags18.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags19 = props.featureFlags) !== null && _props$featureFlags19 !== void 0 && _props$featureFlags19.enableViewUpdateSubscription) : false),
48
- collabAvatarScroll: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.collabAvatarScroll) : false),
49
- ufo: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.ufo) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.ufo) : false),
50
- twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.twoLineEditorToolbar) : false),
51
- saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.saferDispatchedTransactions) : false)),
52
- saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.saferDispatchedTransactionsAnalyticsOnly) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.saferDispatchedTransactionsAnalyticsOnly) : false)),
43
+ showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags11 = props.featureFlags) === null || _props$featureFlags11 === void 0 ? void 0 : _props$featureFlags11.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags12 = props.featureFlags) !== null && _props$featureFlags12 !== void 0 && _props$featureFlags12.showAvatarGroupAsPlugin) : false),
44
+ errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags13 = props.featureFlags) === null || _props$featureFlags13 === void 0 ? void 0 : _props$featureFlags13.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags14 = props.featureFlags) !== null && _props$featureFlags14 !== void 0 && _props$featureFlags14.useErrorBoundaryDocStructure) : false),
45
+ synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags16 = props.featureFlags) !== null && _props$featureFlags16 !== void 0 && _props$featureFlags16.synchronyErrorDocStructure) : false),
46
+ enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags17 = props.featureFlags) === null || _props$featureFlags17 === void 0 ? void 0 : _props$featureFlags17.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags18 = props.featureFlags) !== null && _props$featureFlags18 !== void 0 && _props$featureFlags18.enableViewUpdateSubscription) : false),
47
+ collabAvatarScroll: Boolean(typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags20 = props.featureFlags) !== null && _props$featureFlags20 !== void 0 && _props$featureFlags20.collabAvatarScroll) : false),
48
+ ufo: Boolean(typeof ((_props$featureFlags21 = props.featureFlags) === null || _props$featureFlags21 === void 0 ? void 0 : _props$featureFlags21.ufo) === 'boolean' ? !!((_props$featureFlags22 = props.featureFlags) !== null && _props$featureFlags22 !== void 0 && _props$featureFlags22.ufo) : false),
49
+ twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags23 = props.featureFlags) === null || _props$featureFlags23 === void 0 ? void 0 : _props$featureFlags23.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags24 = props.featureFlags) !== null && _props$featureFlags24 !== void 0 && _props$featureFlags24.twoLineEditorToolbar) : false),
50
+ saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags26 = props.featureFlags) !== null && _props$featureFlags26 !== void 0 && _props$featureFlags26.saferDispatchedTransactions) : false)),
51
+ saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$featureFlags27 = props.featureFlags) === null || _props$featureFlags27 === void 0 ? void 0 : _props$featureFlags27.saferDispatchedTransactionsAnalyticsOnly) === 'boolean' ? !!((_props$featureFlags28 = props.featureFlags) !== null && _props$featureFlags28 !== void 0 && _props$featureFlags28.saferDispatchedTransactionsAnalyticsOnly) : false)),
53
52
  useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
54
- chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
55
- tableCellOptionsInFloatingToolbar: typeof tableCellOptionsInFloatingToolbar === 'boolean' ? tableCellOptionsInFloatingToolbar : false,
56
- showHoverPreview: Boolean(typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.showHoverPreview) === 'boolean' ? !!((_props$featureFlags32 = props.featureFlags) !== null && _props$featureFlags32 !== void 0 && _props$featureFlags32.showHoverPreview) : false),
57
- indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags34 = props.featureFlags) !== null && _props$featureFlags34 !== void 0 && _props$featureFlags34.indentationButtonsInTheToolbar) : false)),
58
- floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags36 = props.featureFlags) !== null && _props$featureFlags36 !== void 0 && _props$featureFlags36.floatingToolbarCopyButton) : false)),
59
- floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
53
+ chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
54
+ showHoverPreview: Boolean(typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30.showHoverPreview) === 'boolean' ? !!((_props$featureFlags31 = props.featureFlags) !== null && _props$featureFlags31 !== void 0 && _props$featureFlags31.showHoverPreview) : false),
55
+ indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags32 = props.featureFlags) === null || _props$featureFlags32 === void 0 ? void 0 : _props$featureFlags32.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags33 = props.featureFlags) !== null && _props$featureFlags33 !== void 0 && _props$featureFlags33.indentationButtonsInTheToolbar) : false)),
56
+ floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags35 = props.featureFlags) !== null && _props$featureFlags35 !== void 0 && _props$featureFlags35.floatingToolbarCopyButton) : false)),
57
+ floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags36 = props.featureFlags) === null || _props$featureFlags36 === void 0 ? void 0 : _props$featureFlags36['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
60
58
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
61
59
  // Including fallback to props.featureFlags so that mobile feature flags
62
60
  // are included (they are not kebab cased)
63
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.restartNumberedLists) === true,
64
- useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags39 = props.featureFlags) === null || _props$featureFlags39 === void 0 ? void 0 : _props$featureFlags39.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags40 = props.featureFlags) !== null && _props$featureFlags40 !== void 0 && _props$featureFlags40.useSomewhatSemanticTextColorNames) : false)),
61
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37.restartNumberedLists) === true,
62
+ useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags39 = props.featureFlags) !== null && _props$featureFlags39 !== void 0 && _props$featureFlags39.useSomewhatSemanticTextColorNames) : false)),
65
63
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
66
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags41 = props.featureFlags) === null || _props$featureFlags41 === void 0 ? void 0 : _props$featureFlags41['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags42 = props.featureFlags) !== null && _props$featureFlags42 !== void 0 && _props$featureFlags42['prevent-popup-overflow']) : false)
64
+ preventPopupOverflow: Boolean(typeof ((_props$featureFlags40 = props.featureFlags) === null || _props$featureFlags40 === void 0 ? void 0 : _props$featureFlags40['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags41 = props.featureFlags) !== null && _props$featureFlags41 !== void 0 && _props$featureFlags41['prevent-popup-overflow']) : false)
67
65
  };
68
66
  }
@@ -9,7 +9,6 @@ import disableSpellcheckingPlugin from './pm-plugins/disable-spell-checking';
9
9
  import contextIdentifierPlugin from './pm-plugins/context-identifier';
10
10
  import newlinePreserveMarksPlugin from './pm-plugins/newline-preserve-marks';
11
11
  import inlineCursorTargetPlugin from './pm-plugins/inline-cursor-target';
12
- import betterTypeHistoryPlugin from './pm-plugins/better-type-history';
13
12
  import scrollGutter from './pm-plugins/scroll-gutter';
14
13
  import { keymap } from '@atlaskit/editor-common/keymaps';
15
14
  import frozenEditor from './pm-plugins/frozen-editor';
@@ -75,12 +74,6 @@ const basePlugin = (options, api) => {
75
74
  dispatch,
76
75
  providerFactory
77
76
  }) => contextIdentifierPlugin(dispatch, providerFactory)
78
- }, {
79
- name: 'betterTypeHistory',
80
- plugin: ({
81
- dispatch,
82
- providerFactory
83
- }) => betterTypeHistoryPlugin()
84
77
  });
85
78
  if (options && options.allowScrollGutter) {
86
79
  plugins.push({
@@ -0,0 +1,24 @@
1
+ import createPlugin from './pm-plugins/main';
2
+ import { pluginKey } from './pm-plugins/plugin-key';
3
+ /**
4
+ * This plugin is aiming to improve undo behaviour for some of our more custom applications, very specific text
5
+ * paste events, splitting blocks of text, new lines.
6
+ */
7
+ const betterTypeHistory = () => {
8
+ return {
9
+ name: 'betterTypeHistory',
10
+ actions: {
11
+ flagPasteEvent(tr) {
12
+ tr.setMeta(pluginKey, true);
13
+ return tr;
14
+ }
15
+ },
16
+ pmPlugins() {
17
+ return [{
18
+ name: 'betterTypeHistory',
19
+ plugin: () => createPlugin()
20
+ }];
21
+ }
22
+ };
23
+ };
24
+ export default betterTypeHistory;
@@ -3,8 +3,8 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
4
4
  import { closeHistory } from '@atlaskit/editor-prosemirror/history';
5
5
  import { ReplaceStep, ReplaceAroundStep } from '@atlaskit/editor-prosemirror/transform';
6
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
7
6
  import { extractSliceFromStep } from '../../../utils/step';
7
+ import { pluginKey } from './plugin-key';
8
8
  const getEnterKeyboardActionStep = trs => {
9
9
  const firstTr = trs.length === 1 && trs[0];
10
10
  if (!firstTr || !firstTr.docChanged || !firstTr.isGeneric || !(firstTr.selection instanceof TextSelection)) {
@@ -33,7 +33,6 @@ const isSliceAddingNewlineChar = (slice, schema) => {
33
33
  const newLine = Fragment.from(schema.text('\n'));
34
34
  return slice.content.eq(newLine);
35
35
  };
36
- export const pluginKey = new PluginKey('betterTypeHistoryPlugin');
37
36
  export default (() => {
38
37
  return new SafePlugin({
39
38
  key: pluginKey,
@@ -0,0 +1,2 @@
1
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
+ export const pluginKey = new PluginKey('betterTypeHistoryPlugin');
@@ -1,6 +1,7 @@
1
1
  export { default as basePlugin } from './base';
2
2
  export { default as blockTypePlugin } from './block-type';
3
3
  export { pluginKey as blockPluginStateKey } from './block-type';
4
+ export { default as betterTypeHistoryPlugin } from './better-type-history';
4
5
  export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-marks-on-change-to-empty-document';
5
6
  export { default as codeBlockPlugin } from './code-block';
6
7
  export { default as collabEditPlugin } from './collab-edit';