@atlaskit/editor-core 187.15.1 → 187.16.1

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 (79) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/create-editor/feature-flags-from-props.js +23 -25
  3. package/dist/cjs/index.js +0 -7
  4. package/dist/cjs/plugins/media/toolbar/alt-text.js +5 -2
  5. package/dist/cjs/plugins/media/toolbar/index.js +7 -5
  6. package/dist/cjs/plugins/media/toolbar/linking-toolbar-appearance.js +3 -4
  7. package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +1 -2
  8. package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +13 -4
  9. package/dist/cjs/version-wrapper.js +1 -1
  10. package/dist/cjs/version.json +1 -1
  11. package/dist/es2019/create-editor/feature-flags-from-props.js +23 -25
  12. package/dist/es2019/index.js +0 -1
  13. package/dist/es2019/plugins/media/toolbar/alt-text.js +6 -4
  14. package/dist/es2019/plugins/media/toolbar/index.js +7 -5
  15. package/dist/es2019/plugins/media/toolbar/linking-toolbar-appearance.js +1 -1
  16. package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +1 -2
  17. package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +13 -4
  18. package/dist/es2019/version-wrapper.js +1 -1
  19. package/dist/es2019/version.json +1 -1
  20. package/dist/esm/create-editor/feature-flags-from-props.js +23 -25
  21. package/dist/esm/index.js +0 -1
  22. package/dist/esm/plugins/media/toolbar/alt-text.js +6 -4
  23. package/dist/esm/plugins/media/toolbar/index.js +7 -5
  24. package/dist/esm/plugins/media/toolbar/linking-toolbar-appearance.js +1 -1
  25. package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +1 -2
  26. package/dist/esm/plugins/panel/pm-plugins/keymaps.js +13 -4
  27. package/dist/esm/version-wrapper.js +1 -1
  28. package/dist/esm/version.json +1 -1
  29. package/dist/types/index.d.ts +0 -5
  30. package/dist/types/plugins/annotation/toolbar.d.ts +1 -1
  31. package/dist/types/plugins/code-block/toolbar.d.ts +1 -2
  32. package/dist/types/plugins/copy-button/toolbar.d.ts +1 -1
  33. package/dist/types/plugins/expand/toolbar.d.ts +1 -1
  34. package/dist/types/plugins/extension/toolbar.d.ts +1 -1
  35. package/dist/types/plugins/floating-toolbar/index.d.ts +3 -6
  36. package/dist/types/plugins/floating-toolbar/ui/CheckboxModal.d.ts +2 -2
  37. package/dist/types/plugins/floating-toolbar/ui/ConfirmationModal.d.ts +2 -2
  38. package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +1 -1
  39. package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +1 -1
  40. package/dist/types/plugins/floating-toolbar/ui/SimpleModal.d.ts +2 -2
  41. package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +1 -1
  42. package/dist/types/plugins/layout/index.d.ts +1 -1
  43. package/dist/types/plugins/layout/toolbar.d.ts +1 -1
  44. package/dist/types/plugins/media/toolbar/alt-text.d.ts +3 -1
  45. package/dist/types/plugins/media/toolbar/index.d.ts +1 -1
  46. package/dist/types/plugins/media/toolbar/linking.d.ts +1 -1
  47. package/dist/types/plugins/panel/toolbar.d.ts +1 -1
  48. package/dist/types-ts4.5/index.d.ts +0 -5
  49. package/dist/types-ts4.5/plugins/annotation/toolbar.d.ts +1 -1
  50. package/dist/types-ts4.5/plugins/code-block/toolbar.d.ts +1 -2
  51. package/dist/types-ts4.5/plugins/copy-button/toolbar.d.ts +1 -1
  52. package/dist/types-ts4.5/plugins/expand/toolbar.d.ts +1 -1
  53. package/dist/types-ts4.5/plugins/extension/toolbar.d.ts +1 -1
  54. package/dist/types-ts4.5/plugins/floating-toolbar/index.d.ts +3 -6
  55. package/dist/types-ts4.5/plugins/floating-toolbar/ui/CheckboxModal.d.ts +2 -2
  56. package/dist/types-ts4.5/plugins/floating-toolbar/ui/ConfirmationModal.d.ts +2 -2
  57. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Dropdown.d.ts +1 -1
  58. package/dist/types-ts4.5/plugins/floating-toolbar/ui/DropdownMenu.d.ts +1 -1
  59. package/dist/types-ts4.5/plugins/floating-toolbar/ui/SimpleModal.d.ts +2 -2
  60. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +1 -1
  61. package/dist/types-ts4.5/plugins/layout/index.d.ts +1 -1
  62. package/dist/types-ts4.5/plugins/layout/toolbar.d.ts +1 -1
  63. package/dist/types-ts4.5/plugins/media/toolbar/alt-text.d.ts +3 -1
  64. package/dist/types-ts4.5/plugins/media/toolbar/index.d.ts +1 -1
  65. package/dist/types-ts4.5/plugins/media/toolbar/linking.d.ts +1 -1
  66. package/dist/types-ts4.5/plugins/panel/toolbar.d.ts +1 -1
  67. package/package.json +2 -2
  68. package/report.api.md +0 -46
  69. package/tmp/api-report-tmp.d.ts +0 -44
  70. package/dist/cjs/plugins/floating-toolbar/types.js +0 -5
  71. package/dist/cjs/plugins/floating-toolbar/ui/types.js +0 -5
  72. package/dist/es2019/plugins/floating-toolbar/types.js +0 -1
  73. package/dist/es2019/plugins/floating-toolbar/ui/types.js +0 -1
  74. package/dist/esm/plugins/floating-toolbar/types.js +0 -1
  75. package/dist/esm/plugins/floating-toolbar/ui/types.js +0 -1
  76. package/dist/types/plugins/floating-toolbar/types.d.ts +0 -1
  77. package/dist/types/plugins/floating-toolbar/ui/types.d.ts +0 -1
  78. package/dist/types-ts4.5/plugins/floating-toolbar/types.d.ts +0 -1
  79. package/dist/types-ts4.5/plugins/floating-toolbar/ui/types.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.16.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8b104cb7575`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8b104cb7575) - [ED-14769] Remove tableCellOptionsinFloatingToolbar feature flag & make it default behaviour
8
+
9
+ ## 187.16.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`3413f770f2b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3413f770f2b) - Moving references to floating-toolbar types to `editor-common`
14
+
15
+ ### Patch Changes
16
+
17
+ - [`3a43f854e59`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a43f854e59) - [ux] ED-18841: When cursor inside panel, at start of content, is backspaced, it should lift panel line of content out of panel, instead of only selecting the node above it (such as an expand or table node).
18
+ - Updated dependencies
19
+
3
20
  ## 187.15.1
4
21
 
5
22
  ### Patch 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
  }
package/dist/cjs/index.js CHANGED
@@ -263,12 +263,6 @@ Object.defineProperty(exports, "deleteDate", {
263
263
  return _actions.deleteDate;
264
264
  }
265
265
  });
266
- Object.defineProperty(exports, "floatingToolbarPluginKey", {
267
- enumerable: true,
268
- get: function get() {
269
- return _floatingToolbar.pluginKey;
270
- }
271
- });
272
266
  Object.defineProperty(exports, "getDefaultPresetOptionsFromEditorProps", {
273
267
  enumerable: true,
274
268
  get: function get() {
@@ -556,7 +550,6 @@ var _gapCursorSelection = require("./plugins/selection/gap-cursor-selection");
556
550
  var _mobileSelection = require("./plugins/mobile-selection");
557
551
  var _commands7 = require("./plugins/expand/commands");
558
552
  var _WithPluginState = _interopRequireDefault(require("./ui/WithPluginState"));
559
- var _floatingToolbar = require("./plugins/floating-toolbar");
560
553
  var _statusColorPalette = require("./ui/ColorPalette/Palettes/statusColorPalette");
561
554
  var _common = require("./ui/ColorPalette/Palettes/common");
562
555
  var _messages = _interopRequireWildcard(require("./messages"));
@@ -14,7 +14,6 @@ var _messages = require("../pm-plugins/alt-text/messages");
14
14
  var _AltTextEdit = _interopRequireWildcard(require("../pm-plugins/alt-text/ui/AltTextEdit"));
15
15
  var _mediaCommon = require("../utils/media-common");
16
16
  var _style = require("../pm-plugins/alt-text/style");
17
- var _forceFocus = require("../../floating-toolbar/pm-plugins/force-focus");
18
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
19
  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; }
@@ -55,9 +54,13 @@ var altTextEditComponent = function altTextEditComponent(options) {
55
54
  * and not close the floating toolbar.
56
55
  */
57
56
  var handleEsc = function handleEsc() {
57
+ var _options$forceFocusSe;
58
58
  var tr = view.state.tr,
59
59
  dispatch = view.dispatch;
60
- dispatch((0, _forceFocus.forceFocusSelector)("[data-testid=\"".concat(testId, "\"]"))(tr));
60
+ var newTr = options === null || options === void 0 ? void 0 : (_options$forceFocusSe = options.forceFocusSelector) === null || _options$forceFocusSe === void 0 ? void 0 : _options$forceFocusSe.call(options, "[data-testid=\"".concat(testId, "\"]"))(tr);
61
+ if (newTr) {
62
+ dispatch(newTr);
63
+ }
61
64
  };
62
65
  return /*#__PURE__*/_react.default.createElement(_AltTextEdit.default, {
63
66
  view: view,
@@ -425,8 +425,10 @@ var floatingToolbar = function floatingToolbar(state, intl) {
425
425
  if (allowAltTextOnImages) {
426
426
  var mediaAltTextPluginState = (0, _altText.getPluginState)(state);
427
427
  if (mediaAltTextPluginState.isAltTextEditorOpen) {
428
+ var _pluginInjectionApi$d9;
428
429
  return (0, _altText2.getAltTextToolbar)(baseToolbar, {
429
- altTextValidator: altTextValidator
430
+ altTextValidator: altTextValidator,
431
+ forceFocusSelector: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d9 = pluginInjectionApi.dependencies.floatingToolbar.actions) === null || _pluginInjectionApi$d9 === void 0 ? void 0 : _pluginInjectionApi$d9.forceFocusSelector
430
432
  });
431
433
  }
432
434
  }
@@ -437,22 +439,22 @@ var floatingToolbar = function floatingToolbar(state, intl) {
437
439
  selectedNodeType = state.selection.node.type;
438
440
  }
439
441
  if (allowMediaInline && (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup) {
440
- var _pluginInjectionApi$d9, _pluginInjectionApi$d10;
442
+ var _pluginInjectionApi$d10, _pluginInjectionApi$d11;
441
443
  var mediaOffset = state.selection.$from.parentOffset + 1;
442
444
  baseToolbar.getDomRef = function () {
443
445
  var _mediaPluginState$ele;
444
446
  var selector = (0, _mediaFilmstrip.mediaFilmstripItemDOMSelector)(mediaOffset);
445
447
  return (_mediaPluginState$ele = mediaPluginState.element) === null || _mediaPluginState$ele === void 0 ? void 0 : _mediaPluginState$ele.querySelector(selector);
446
448
  };
447
- items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d9 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d9 === void 0 ? void 0 : (_pluginInjectionApi$d10 = _pluginInjectionApi$d9.analytics) === null || _pluginInjectionApi$d10 === void 0 ? void 0 : _pluginInjectionApi$d10.actions);
449
+ items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d10 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d10 === void 0 ? void 0 : (_pluginInjectionApi$d11 = _pluginInjectionApi$d10.analytics) === null || _pluginInjectionApi$d11 === void 0 ? void 0 : _pluginInjectionApi$d11.actions);
448
450
  } else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
449
- var _pluginInjectionApi$d11, _pluginInjectionApi$d12;
451
+ var _pluginInjectionApi$d12, _pluginInjectionApi$d13;
450
452
  baseToolbar.getDomRef = function () {
451
453
  var _mediaPluginState$ele2;
452
454
  var element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(".".concat(_styles.MediaInlineNodeSelector));
453
455
  return element || mediaPluginState.element;
454
456
  };
455
- items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d11 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d11 === void 0 ? void 0 : (_pluginInjectionApi$d12 = _pluginInjectionApi$d11.analytics) === null || _pluginInjectionApi$d12 === void 0 ? void 0 : _pluginInjectionApi$d12.actions);
457
+ items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d12 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d12 === void 0 ? void 0 : (_pluginInjectionApi$d13 = _pluginInjectionApi$d12.analytics) === null || _pluginInjectionApi$d13 === void 0 ? void 0 : _pluginInjectionApi$d13.actions);
456
458
  } else {
457
459
  baseToolbar.getDomRef = function () {
458
460
  var _mediaPluginState$ele3;
@@ -15,7 +15,6 @@ var _shortcut = _interopRequireDefault(require("@atlaskit/icon/glyph/shortcut"))
15
15
  var _adfSchema = require("@atlaskit/adf-schema");
16
16
  var _checkMediaType = require("../utils/check-media-type");
17
17
  var _ui = require("@atlaskit/editor-common/ui");
18
- var _Separator = _interopRequireDefault(require("../../floating-toolbar/ui/Separator"));
19
18
  var _messages = require("../../../messages");
20
19
  var _messages2 = require("@atlaskit/editor-common/messages");
21
20
  var _keymaps = require("../../../keymaps");
@@ -73,7 +72,7 @@ var LinkToolbarAppearance = function LinkToolbarAppearance(_ref) {
73
72
  testId: "edit-link-button"
74
73
  }, title)), (0, _react2.jsx)("div", {
75
74
  css: wrapper
76
- }, (0, _react2.jsx)(_Separator.default, null)), (0, _react2.jsx)(_ui.FloatingToolbarButton, {
75
+ }, (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null)), (0, _react2.jsx)(_ui.FloatingToolbarButton, {
77
76
  target: "_blank",
78
77
  href: isValidUrl ? mediaLinkingState.link : undefined,
79
78
  disabled: !isValidUrl,
@@ -83,7 +82,7 @@ var LinkToolbarAppearance = function LinkToolbarAppearance(_ref) {
83
82
  label: linkTitle
84
83
  }),
85
84
  className: "hyperlink-open-link"
86
- }), (0, _react2.jsx)(_Separator.default, null));
85
+ }), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
87
86
  } else {
88
87
  var _title = intl.formatMessage(_messages2.linkToolbarMessages.addLink);
89
88
  return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
@@ -97,7 +96,7 @@ var LinkToolbarAppearance = function LinkToolbarAppearance(_ref) {
97
96
  icon: (0, _react2.jsx)(_link.default, {
98
97
  label: _title
99
98
  })
100
- }), (0, _react2.jsx)(_Separator.default, null));
99
+ }), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
101
100
  }
102
101
  };
103
102
  exports.LinkToolbarAppearance = LinkToolbarAppearance;
@@ -19,7 +19,6 @@ var _react2 = require("@emotion/react");
19
19
  var _ui = require("@atlaskit/editor-common/ui");
20
20
  var _chevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-left-large"));
21
21
  var _unlink = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/unlink"));
22
- var _Separator = _interopRequireDefault(require("../../floating-toolbar/ui/Separator"));
23
22
  var _link = require("@atlaskit/editor-common/link");
24
23
  var _messages = require("@atlaskit/editor-common/messages");
25
24
  var _utils = require("@atlaskit/editor-common/utils");
@@ -143,7 +142,7 @@ var LinkAddToolbar = /*#__PURE__*/function (_React$PureComponent) {
143
142
  _onChange(value);
144
143
  },
145
144
  onKeyDown: onKeyDown
146
- }), (0, _utils.normalizeUrl)(displayUrl) && (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_Separator.default, null), (0, _react2.jsx)(_ui.FloatingToolbarButton, {
145
+ }), (0, _utils.normalizeUrl)(displayUrl) && (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null), (0, _react2.jsx)(_ui.FloatingToolbarButton, {
147
146
  title: formatUnlinkText,
148
147
  icon: (0, _react2.jsx)(_unlink.default, {
149
148
  label: formatUnlinkText
@@ -27,6 +27,7 @@ function keymapPlugin() {
27
27
  };
28
28
  var keymaps = {
29
29
  Backspace: function Backspace(state, dispatch) {
30
+ var _nodeBeforePanel$type, _nodeBeforePanel$type2;
30
31
  var selection = state.selection,
31
32
  nodes = state.schema.nodes,
32
33
  tr = state.tr;
@@ -43,17 +44,25 @@ function keymapPlugin() {
43
44
  if ($from.parentOffset !== 0) {
44
45
  return false;
45
46
  }
46
- var previousPos = tr.doc.resolve(Math.max(0, $from.before($from.depth) - 1));
47
- var previousNodeType = previousPos.pos > 0 && previousPos.parent && previousPos.parent.type;
47
+ var $previousPos = tr.doc.resolve(Math.max(0, $from.before($from.depth) - 1));
48
+ var previousNodeType = $previousPos.pos > 0 && $previousPos.parent && $previousPos.parent.type;
48
49
  var parentNodeType = $from.parent.type;
49
50
  var isPreviousNodeAPanel = previousNodeType === panel;
50
51
  var isParentNodeAPanel = parentNodeType === panel;
52
+ var nodeBeforePanel = $previousPos === null || $previousPos === void 0 ? void 0 : $previousPos.nodeBefore;
51
53
 
52
54
  // Stops merging panels when deleting empty paragraph in between
53
55
  // Stops merging blockquotes with panels when deleting from start of blockquote
54
- if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || (0, _utils.hasParentNodeOfType)(blockquote)(selection)) {
56
+
57
+ if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || (0, _utils.hasParentNodeOfType)(blockquote)(selection) ||
58
+ // Lift line of panel content up and out of the panel, when backspacing
59
+ // at the start of a panel, if the node before the panel is an 'isolating' node
60
+ // (for e.g. a table, or an expand), otherwise the default prosemirror backspace
61
+ // behaviour will fallback to 'select node backward' logic because the node
62
+ // before is an isolating node.
63
+ nodeBeforePanel !== null && nodeBeforePanel !== void 0 && (_nodeBeforePanel$type = nodeBeforePanel.type) !== null && _nodeBeforePanel$type !== void 0 && (_nodeBeforePanel$type2 = _nodeBeforePanel$type.spec) !== null && _nodeBeforePanel$type2 !== void 0 && _nodeBeforePanel$type2.isolating && (0, _utils.hasParentNodeOfType)(panel)(selection)) {
55
64
  var content = $from.node($from.depth).content;
56
- var insertPos = previousPos.pos;
65
+ var insertPos = $previousPos.pos;
57
66
  deleteCurrentItem($from, tr).insert(insertPos, content);
58
67
  if (dispatch) {
59
68
  dispatch((0, _utils.setTextSelection)(insertPos)(tr).scrollIntoView());
@@ -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.15.1";
9
+ var version = "187.16.1";
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.15.1",
3
+ "version": "187.16.1",
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
  }
@@ -52,7 +52,6 @@ export { GapCursorSelection, Side as GapCursorSide } from './plugins/selection/g
52
52
  export { selectionPluginKey } from './plugins/mobile-selection';
53
53
  export { insertExpand } from './plugins/expand/commands';
54
54
  export { default as WithPluginState } from './ui/WithPluginState';
55
- export { pluginKey as floatingToolbarPluginKey } from './plugins/floating-toolbar';
56
55
  export { lightModeStatusColorPalette, darkModeStatusColorPalette } from './ui/ColorPalette/Palettes/statusColorPalette';
57
56
  export { DEFAULT_BORDER_COLOR } from './ui/ColorPalette/Palettes/common';
58
57
  export { default as messages, statusMessages, dateMessages } from './messages';
@@ -2,11 +2,9 @@ import React from 'react';
2
2
  import { openMediaAltTextMenu } from '../pm-plugins/alt-text/commands';
3
3
  import { ToolTipContent, addAltText } from '../../../keymaps';
4
4
  import { messages } from '../pm-plugins/alt-text/messages';
5
- import AltTextEdit from '../pm-plugins/alt-text/ui/AltTextEdit';
6
- import { CONTAINER_WIDTH_IN_PX } from '../pm-plugins/alt-text/ui/AltTextEdit';
5
+ import AltTextEdit, { CONTAINER_WIDTH_IN_PX } from '../pm-plugins/alt-text/ui/AltTextEdit';
7
6
  import { getMediaNodeFromSelection } from '../utils/media-common';
8
7
  import { ClassNames } from '../pm-plugins/alt-text/style';
9
- import { forceFocusSelector } from '../../floating-toolbar/pm-plugins/force-focus';
10
8
  const testId = 'alt-text-edit-button';
11
9
  export const altTextButton = (intl, state) => {
12
10
  const mediaNode = getMediaNodeFromSelection(state);
@@ -42,13 +40,17 @@ export const altTextEditComponent = options => {
42
40
  * and not close the floating toolbar.
43
41
  */
44
42
  const handleEsc = () => {
43
+ var _options$forceFocusSe;
45
44
  const {
46
45
  state: {
47
46
  tr
48
47
  },
49
48
  dispatch
50
49
  } = view;
51
- dispatch(forceFocusSelector(`[data-testid="${testId}"]`)(tr));
50
+ const newTr = options === null || options === void 0 ? void 0 : (_options$forceFocusSe = options.forceFocusSelector) === null || _options$forceFocusSe === void 0 ? void 0 : _options$forceFocusSe.call(options, `[data-testid="${testId}"]`)(tr);
51
+ if (newTr) {
52
+ dispatch(newTr);
53
+ }
52
54
  };
53
55
  return /*#__PURE__*/React.createElement(AltTextEdit, {
54
56
  view: view,
@@ -440,8 +440,10 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
440
440
  if (allowAltTextOnImages) {
441
441
  const mediaAltTextPluginState = getMediaAltTextPluginState(state);
442
442
  if (mediaAltTextPluginState.isAltTextEditorOpen) {
443
+ var _pluginInjectionApi$d9;
443
444
  return getAltTextToolbar(baseToolbar, {
444
- altTextValidator
445
+ altTextValidator,
446
+ forceFocusSelector: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d9 = pluginInjectionApi.dependencies.floatingToolbar.actions) === null || _pluginInjectionApi$d9 === void 0 ? void 0 : _pluginInjectionApi$d9.forceFocusSelector
445
447
  });
446
448
  }
447
449
  }
@@ -452,22 +454,22 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
452
454
  selectedNodeType = state.selection.node.type;
453
455
  }
454
456
  if (allowMediaInline && (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup) {
455
- var _pluginInjectionApi$d9, _pluginInjectionApi$d10;
457
+ var _pluginInjectionApi$d10, _pluginInjectionApi$d11;
456
458
  const mediaOffset = state.selection.$from.parentOffset + 1;
457
459
  baseToolbar.getDomRef = () => {
458
460
  var _mediaPluginState$ele;
459
461
  const selector = mediaFilmstripItemDOMSelector(mediaOffset);
460
462
  return (_mediaPluginState$ele = mediaPluginState.element) === null || _mediaPluginState$ele === void 0 ? void 0 : _mediaPluginState$ele.querySelector(selector);
461
463
  };
462
- items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d9 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d9 === void 0 ? void 0 : (_pluginInjectionApi$d10 = _pluginInjectionApi$d9.analytics) === null || _pluginInjectionApi$d10 === void 0 ? void 0 : _pluginInjectionApi$d10.actions);
464
+ items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d10 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d10 === void 0 ? void 0 : (_pluginInjectionApi$d11 = _pluginInjectionApi$d10.analytics) === null || _pluginInjectionApi$d11 === void 0 ? void 0 : _pluginInjectionApi$d11.actions);
463
465
  } else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
464
- var _pluginInjectionApi$d11, _pluginInjectionApi$d12;
466
+ var _pluginInjectionApi$d12, _pluginInjectionApi$d13;
465
467
  baseToolbar.getDomRef = () => {
466
468
  var _mediaPluginState$ele2;
467
469
  const element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(`.${MediaInlineNodeSelector}`);
468
470
  return element || mediaPluginState.element;
469
471
  };
470
- items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d11 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d11 === void 0 ? void 0 : (_pluginInjectionApi$d12 = _pluginInjectionApi$d11.analytics) === null || _pluginInjectionApi$d12 === void 0 ? void 0 : _pluginInjectionApi$d12.actions);
472
+ items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d12 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d12 === void 0 ? void 0 : (_pluginInjectionApi$d13 = _pluginInjectionApi$d12.analytics) === null || _pluginInjectionApi$d13 === void 0 ? void 0 : _pluginInjectionApi$d13.actions);
471
473
  } else {
472
474
  baseToolbar.getDomRef = () => {
473
475
  var _mediaPluginState$ele3;
@@ -7,7 +7,7 @@ import OpenIcon from '@atlaskit/icon/glyph/shortcut';
7
7
  import { isSafeUrl } from '@atlaskit/adf-schema';
8
8
  import { checkMediaType } from '../utils/check-media-type';
9
9
  import { FloatingToolbarButton as ToolbarButton } from '@atlaskit/editor-common/ui';
10
- import Separator from '../../floating-toolbar/ui/Separator';
10
+ import { FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
11
11
  import { linkMessages } from '../../../messages';
12
12
  import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
13
13
  import { ToolTipContent, addLink } from '../../../keymaps';
@@ -8,8 +8,7 @@ import EditorUnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
8
8
  // Common Translations will live here
9
9
 
10
10
  import { PanelTextInput } from '@atlaskit/editor-common/ui';
11
- import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
12
- import Separator from '../../floating-toolbar/ui/Separator';
11
+ import { FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
13
12
  import { container, containerWithProvider, inputWrapper, RecentSearch } from '@atlaskit/editor-common/link';
14
13
  import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
15
14
  import { normalizeUrl } from '@atlaskit/editor-common/utils';
@@ -20,6 +20,7 @@ export function keymapPlugin() {
20
20
  };
21
21
  const keymaps = {
22
22
  Backspace: (state, dispatch) => {
23
+ var _nodeBeforePanel$type, _nodeBeforePanel$type2;
23
24
  const {
24
25
  selection,
25
26
  schema: {
@@ -44,17 +45,25 @@ export function keymapPlugin() {
44
45
  if ($from.parentOffset !== 0) {
45
46
  return false;
46
47
  }
47
- const previousPos = tr.doc.resolve(Math.max(0, $from.before($from.depth) - 1));
48
- const previousNodeType = previousPos.pos > 0 && previousPos.parent && previousPos.parent.type;
48
+ const $previousPos = tr.doc.resolve(Math.max(0, $from.before($from.depth) - 1));
49
+ const previousNodeType = $previousPos.pos > 0 && $previousPos.parent && $previousPos.parent.type;
49
50
  const parentNodeType = $from.parent.type;
50
51
  const isPreviousNodeAPanel = previousNodeType === panel;
51
52
  const isParentNodeAPanel = parentNodeType === panel;
53
+ const nodeBeforePanel = $previousPos === null || $previousPos === void 0 ? void 0 : $previousPos.nodeBefore;
52
54
 
53
55
  // Stops merging panels when deleting empty paragraph in between
54
56
  // Stops merging blockquotes with panels when deleting from start of blockquote
55
- if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection)) {
57
+
58
+ if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) ||
59
+ // Lift line of panel content up and out of the panel, when backspacing
60
+ // at the start of a panel, if the node before the panel is an 'isolating' node
61
+ // (for e.g. a table, or an expand), otherwise the default prosemirror backspace
62
+ // behaviour will fallback to 'select node backward' logic because the node
63
+ // before is an isolating node.
64
+ nodeBeforePanel !== null && nodeBeforePanel !== void 0 && (_nodeBeforePanel$type = nodeBeforePanel.type) !== null && _nodeBeforePanel$type !== void 0 && (_nodeBeforePanel$type2 = _nodeBeforePanel$type.spec) !== null && _nodeBeforePanel$type2 !== void 0 && _nodeBeforePanel$type2.isolating && hasParentNodeOfType(panel)(selection)) {
56
65
  const content = $from.node($from.depth).content;
57
- const insertPos = previousPos.pos;
66
+ const insertPos = $previousPos.pos;
58
67
  deleteCurrentItem($from, tr).insert(insertPos, content);
59
68
  if (dispatch) {
60
69
  dispatch(setTextSelection(insertPos)(tr).scrollIntoView());