@atlaskit/editor-core 220.0.3 → 220.1.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 (216) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/codemods/createRenameVariableTransform.ts +17 -0
  3. package/codemods/findImportFromPackage.ts +54 -0
  4. package/codemods/migrates/createJSXRenameVariableToNestedKeyTransform.ts +43 -0
  5. package/codemods/migrates/createUpdateEditorToMigrationComponent.ts +25 -0
  6. package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +1 -1
  7. package/codemods/migrates/remove-config-panel-width-prop.ts +1 -1
  8. package/codemods/migrates/rename-editor-to-editor-migration-component.ts +1 -22
  9. package/codemods/migrates/rename-smartlinks-prop.ts +1 -40
  10. package/codemods/migrates/rename-unsafe-allowUndoRedoButtons-prop.ts +1 -1
  11. package/codemods/migrates/rename-unsafe-cards-prop.ts +1 -1
  12. package/codemods/utils.ts +0 -67
  13. package/dist/cjs/actions/isEmptyParagraph.js +12 -0
  14. package/dist/cjs/actions/temp-is-empty-document.js +2 -9
  15. package/dist/cjs/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
  16. package/dist/cjs/create-editor/ReactEditorView.js +6 -4
  17. package/dist/cjs/create-editor/addMetadataAttributes.js +36 -0
  18. package/dist/cjs/create-editor/create-editor.js +0 -62
  19. package/dist/cjs/create-editor/create-plugins-list.js +2 -15
  20. package/dist/cjs/create-editor/create-schema.js +4 -35
  21. package/dist/cjs/create-editor/createErrorReporter.js +14 -0
  22. package/dist/cjs/create-editor/createPMPlugins.js +39 -0
  23. package/dist/cjs/create-editor/fixExcludes.js +22 -0
  24. package/dist/cjs/create-editor/getScrollGutterOptions.js +19 -0
  25. package/dist/cjs/create-editor/sortByRank.js +9 -0
  26. package/dist/cjs/entry-points/test-utils.js +4 -2
  27. package/dist/cjs/isElementBySelectorInDocument.js +15 -0
  28. package/dist/cjs/setTextSelection.js +12 -0
  29. package/dist/cjs/test-utils.js +1 -18
  30. package/dist/cjs/ui/Addon/checkForModal.js +25 -0
  31. package/dist/cjs/ui/Addon/click-area-helper.js +5 -52
  32. package/dist/cjs/ui/Addon/outsideProsemirrorEditorClickHandler.js +35 -0
  33. package/dist/cjs/ui/Appearance/Chromeless.js +4 -16
  34. package/dist/cjs/ui/Appearance/ChromelessEditorContainer.js +19 -0
  35. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +13 -0
  36. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +5 -2
  37. package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +2 -15
  38. package/dist/cjs/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +13 -0
  39. package/dist/cjs/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +13 -0
  40. package/dist/cjs/ui/EditorContentContainer/styles/mentions.js +19 -0
  41. package/dist/cjs/utils/combineQuickInsertProviders.js +16 -0
  42. package/dist/cjs/utils/extensions.js +0 -11
  43. package/dist/cjs/utils/getNodesVisibleInViewport.js +3 -12
  44. package/dist/cjs/utils/isNodeVisible.js +15 -0
  45. package/dist/cjs/utils/prepare-quick-insert-provider.js +2 -1
  46. package/dist/cjs/utils/validNode.js +14 -0
  47. package/dist/cjs/utils/validateNodes.js +3 -11
  48. package/dist/cjs/version-wrapper.js +1 -1
  49. package/dist/es2019/actions/isEmptyParagraph.js +6 -0
  50. package/dist/es2019/actions/temp-is-empty-document.js +1 -6
  51. package/dist/es2019/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
  52. package/dist/es2019/create-editor/ReactEditorView.js +3 -1
  53. package/dist/es2019/create-editor/addMetadataAttributes.js +29 -0
  54. package/dist/es2019/create-editor/create-editor.js +0 -53
  55. package/dist/es2019/create-editor/create-plugins-list.js +1 -13
  56. package/dist/es2019/create-editor/create-schema.js +2 -31
  57. package/dist/es2019/create-editor/createErrorReporter.js +8 -0
  58. package/dist/es2019/create-editor/createPMPlugins.js +30 -0
  59. package/dist/es2019/create-editor/fixExcludes.js +12 -0
  60. package/dist/es2019/create-editor/getScrollGutterOptions.js +13 -0
  61. package/dist/es2019/create-editor/sortByRank.js +3 -0
  62. package/dist/es2019/entry-points/test-utils.js +3 -1
  63. package/dist/es2019/isElementBySelectorInDocument.js +9 -0
  64. package/dist/es2019/setTextSelection.js +8 -0
  65. package/dist/es2019/test-utils.js +0 -18
  66. package/dist/es2019/ui/Addon/checkForModal.js +19 -0
  67. package/dist/es2019/ui/Addon/click-area-helper.js +2 -53
  68. package/dist/es2019/ui/Addon/outsideProsemirrorEditorClickHandler.js +33 -0
  69. package/dist/es2019/ui/Appearance/Chromeless.js +2 -12
  70. package/dist/es2019/ui/Appearance/ChromelessEditorContainer.js +12 -0
  71. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +5 -0
  72. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +4 -1
  73. package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +1 -8
  74. package/dist/es2019/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +5 -0
  75. package/dist/es2019/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +5 -0
  76. package/dist/es2019/ui/EditorContentContainer/styles/mentions.js +19 -0
  77. package/dist/es2019/utils/combineQuickInsertProviders.js +11 -0
  78. package/dist/es2019/utils/extensions.js +0 -11
  79. package/dist/es2019/utils/getNodesVisibleInViewport.js +1 -9
  80. package/dist/es2019/utils/isNodeVisible.js +9 -0
  81. package/dist/es2019/utils/prepare-quick-insert-provider.js +2 -1
  82. package/dist/es2019/utils/validNode.js +8 -0
  83. package/dist/es2019/utils/validateNodes.js +1 -8
  84. package/dist/es2019/version-wrapper.js +1 -1
  85. package/dist/esm/actions/isEmptyParagraph.js +6 -0
  86. package/dist/esm/actions/temp-is-empty-document.js +1 -6
  87. package/dist/esm/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
  88. package/dist/esm/create-editor/ReactEditorView.js +3 -1
  89. package/dist/esm/create-editor/addMetadataAttributes.js +29 -0
  90. package/dist/esm/create-editor/create-editor.js +0 -58
  91. package/dist/esm/create-editor/create-plugins-list.js +1 -13
  92. package/dist/esm/create-editor/create-schema.js +2 -31
  93. package/dist/esm/create-editor/createErrorReporter.js +8 -0
  94. package/dist/esm/create-editor/createPMPlugins.js +32 -0
  95. package/dist/esm/create-editor/fixExcludes.js +16 -0
  96. package/dist/esm/create-editor/getScrollGutterOptions.js +13 -0
  97. package/dist/esm/create-editor/sortByRank.js +3 -0
  98. package/dist/esm/entry-points/test-utils.js +3 -1
  99. package/dist/esm/isElementBySelectorInDocument.js +9 -0
  100. package/dist/esm/setTextSelection.js +6 -0
  101. package/dist/esm/test-utils.js +0 -16
  102. package/dist/esm/ui/Addon/checkForModal.js +19 -0
  103. package/dist/esm/ui/Addon/click-area-helper.js +2 -49
  104. package/dist/esm/ui/Addon/outsideProsemirrorEditorClickHandler.js +29 -0
  105. package/dist/esm/ui/Appearance/Chromeless.js +2 -14
  106. package/dist/esm/ui/Appearance/ChromelessEditorContainer.js +14 -0
  107. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +7 -0
  108. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +4 -1
  109. package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +1 -14
  110. package/dist/esm/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +7 -0
  111. package/dist/esm/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +7 -0
  112. package/dist/esm/ui/EditorContentContainer/styles/mentions.js +19 -0
  113. package/dist/esm/utils/combineQuickInsertProviders.js +10 -0
  114. package/dist/esm/utils/extensions.js +0 -10
  115. package/dist/esm/utils/getNodesVisibleInViewport.js +1 -9
  116. package/dist/esm/utils/isNodeVisible.js +9 -0
  117. package/dist/esm/utils/prepare-quick-insert-provider.js +2 -1
  118. package/dist/esm/utils/validNode.js +8 -0
  119. package/dist/esm/utils/validateNodes.js +1 -8
  120. package/dist/esm/version-wrapper.js +1 -1
  121. package/dist/types/actions/isEmptyParagraph.d.ts +5 -0
  122. package/dist/types/actions/temp-is-empty-document.d.ts +0 -4
  123. package/dist/types/composable-editor/editor-internal.d.ts +1 -1
  124. package/dist/types/create-editor/ReactEditorView.d.ts +2 -2
  125. package/dist/types/create-editor/addMetadataAttributes.d.ts +16 -0
  126. package/dist/types/create-editor/create-editor.d.ts +1 -17
  127. package/dist/types/create-editor/create-plugins-list.d.ts +1 -4
  128. package/dist/types/create-editor/create-schema.d.ts +0 -15
  129. package/dist/types/create-editor/create-universal-preset.d.ts +1 -1
  130. package/dist/types/create-editor/createErrorReporter.d.ts +3 -0
  131. package/dist/types/create-editor/createPMPlugins.d.ts +3 -0
  132. package/dist/types/create-editor/fixExcludes.d.ts +6 -0
  133. package/dist/types/create-editor/get-ui-component.d.ts +1 -1
  134. package/dist/types/create-editor/getScrollGutterOptions.d.ts +3 -0
  135. package/dist/types/create-editor/sortByRank.d.ts +5 -0
  136. package/dist/types/editor.d.ts +1 -1
  137. package/dist/types/entry-points/editor.d.ts +10 -1
  138. package/dist/types/entry-points/test-utils.d.ts +5 -2
  139. package/dist/types/index.d.ts +3 -1
  140. package/dist/types/isElementBySelectorInDocument.d.ts +7 -0
  141. package/dist/types/presets/universal.d.ts +1 -2
  142. package/dist/types/setTextSelection.d.ts +2 -0
  143. package/dist/types/test-utils.d.ts +1 -10
  144. package/dist/types/types/with-appearance-component.d.ts +1 -1
  145. package/dist/types/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +1 -1
  146. package/dist/types/ui/Addon/checkForModal.d.ts +10 -0
  147. package/dist/types/ui/Addon/click-area-helper.d.ts +0 -11
  148. package/dist/types/ui/Addon/outsideProsemirrorEditorClickHandler.d.ts +2 -0
  149. package/dist/types/ui/Appearance/Chromeless.d.ts +2 -10
  150. package/dist/types/ui/Appearance/ChromelessEditorContainer.d.ts +9 -0
  151. package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -1
  152. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapperMigration.d.ts +4 -0
  153. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -1
  154. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
  155. package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -1
  156. package/dist/types/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +1 -1
  157. package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +0 -10
  158. package/dist/types/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.d.ts +4 -0
  159. package/dist/types/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.d.ts +4 -0
  160. package/dist/types/utils/combineQuickInsertProviders.d.ts +2 -0
  161. package/dist/types/utils/extensions.d.ts +0 -1
  162. package/dist/types/utils/getNodesVisibleInViewport.d.ts +0 -5
  163. package/dist/types/utils/isNodeVisible.d.ts +5 -0
  164. package/dist/types/utils/validNode.d.ts +2 -0
  165. package/dist/types/utils/validateNodes.d.ts +0 -1
  166. package/dist/types-ts4.5/actions/isEmptyParagraph.d.ts +5 -0
  167. package/dist/types-ts4.5/actions/temp-is-empty-document.d.ts +0 -4
  168. package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +1 -1
  169. package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +2 -2
  170. package/dist/types-ts4.5/create-editor/addMetadataAttributes.d.ts +16 -0
  171. package/dist/types-ts4.5/create-editor/create-editor.d.ts +1 -17
  172. package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +1 -4
  173. package/dist/types-ts4.5/create-editor/create-schema.d.ts +0 -15
  174. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +1 -1
  175. package/dist/types-ts4.5/create-editor/createErrorReporter.d.ts +3 -0
  176. package/dist/types-ts4.5/create-editor/createPMPlugins.d.ts +3 -0
  177. package/dist/types-ts4.5/create-editor/fixExcludes.d.ts +6 -0
  178. package/dist/types-ts4.5/create-editor/get-ui-component.d.ts +1 -1
  179. package/dist/types-ts4.5/create-editor/getScrollGutterOptions.d.ts +3 -0
  180. package/dist/types-ts4.5/create-editor/sortByRank.d.ts +5 -0
  181. package/dist/types-ts4.5/editor.d.ts +1 -1
  182. package/dist/types-ts4.5/entry-points/editor.d.ts +10 -1
  183. package/dist/types-ts4.5/entry-points/test-utils.d.ts +5 -2
  184. package/dist/types-ts4.5/index.d.ts +3 -1
  185. package/dist/types-ts4.5/isElementBySelectorInDocument.d.ts +7 -0
  186. package/dist/types-ts4.5/presets/universal.d.ts +1 -2
  187. package/dist/types-ts4.5/setTextSelection.d.ts +2 -0
  188. package/dist/types-ts4.5/test-utils.d.ts +1 -10
  189. package/dist/types-ts4.5/types/with-appearance-component.d.ts +1 -1
  190. package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +1 -1
  191. package/dist/types-ts4.5/ui/Addon/checkForModal.d.ts +10 -0
  192. package/dist/types-ts4.5/ui/Addon/click-area-helper.d.ts +0 -11
  193. package/dist/types-ts4.5/ui/Addon/outsideProsemirrorEditorClickHandler.d.ts +2 -0
  194. package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +2 -10
  195. package/dist/types-ts4.5/ui/Appearance/ChromelessEditorContainer.d.ts +9 -0
  196. package/dist/types-ts4.5/ui/Appearance/Comment/Comment.d.ts +1 -1
  197. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapperMigration.d.ts +4 -0
  198. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -1
  199. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
  200. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -1
  201. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +1 -1
  202. package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbar.d.ts +0 -10
  203. package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.d.ts +4 -0
  204. package/dist/types-ts4.5/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.d.ts +4 -0
  205. package/dist/types-ts4.5/utils/combineQuickInsertProviders.d.ts +2 -0
  206. package/dist/types-ts4.5/utils/extensions.d.ts +0 -1
  207. package/dist/types-ts4.5/utils/getNodesVisibleInViewport.d.ts +0 -5
  208. package/dist/types-ts4.5/utils/isNodeVisible.d.ts +5 -0
  209. package/dist/types-ts4.5/utils/validNode.d.ts +2 -0
  210. package/dist/types-ts4.5/utils/validateNodes.d.ts +0 -1
  211. package/package.json +11 -11
  212. package/dist/cjs/types/index.js +0 -1
  213. package/dist/es2019/types/index.js +0 -0
  214. package/dist/esm/types/index.js +0 -0
  215. package/dist/types/types/index.d.ts +0 -9
  216. package/dist/types-ts4.5/types/index.d.ts +0 -9
@@ -1,8 +1,7 @@
1
- import { tintDirtyTransaction } from '@atlaskit/editor-common/collab';
2
- import { addParagraphAtEnd } from '@atlaskit/editor-common/commands';
3
- import { setSelectionTopLevelBlocks } from '@atlaskit/editor-common/selection';
4
1
  import { closestElement } from '@atlaskit/editor-common/utils';
2
+ import { checkForModal } from './checkForModal';
5
3
  import { ignoreAttribute } from './ClickAreaBlock/contentComponentWrapper';
4
+ import { outsideProsemirrorEditorClickHandler } from './outsideProsemirrorEditorClickHandler';
6
5
 
7
6
  // we ignore all of the clicks made inside <div class="ak-editor-content-area" /> (but not clicks on the node itself)
8
7
  var insideContentArea = function insideContentArea(ref) {
@@ -19,26 +18,6 @@ var insideContentArea = function insideContentArea(ref) {
19
18
  var insideProseMirrorEditableArea = function insideProseMirrorEditableArea(ref) {
20
19
  return Boolean(ref === null || ref === void 0 ? void 0 : ref.closest('.ProseMirror'));
21
20
  };
22
-
23
- /**
24
- * @see ED-14699 - check if editor is inside a modal to continue to bring cursor to input when
25
- * any part of the editor container is clicked
26
- *
27
- * Handles two cases when a click event is fired:
28
- *
29
- * 1. if editor (e.g. comment inside of Jira ticket view) is inside modal then ensure focus and cursor is brought to the input
30
- * 2. if another modal is open (e.g. delete confirmation modal for confluence table) then ignore clicks as they shouldn't influence editor state
31
- */
32
- export var checkForModal = function checkForModal(target) {
33
- var modalDialog = target === null || target === void 0 ? void 0 : target.closest('[role=dialog]');
34
- if (modalDialog) {
35
- // return false if not an editor inside modal, otherwise return true
36
- return !!(modalDialog !== null && modalDialog !== void 0 && modalDialog.querySelector('.akEditor'));
37
- }
38
-
39
- // no modal present so we can return true
40
- return true;
41
- };
42
21
  var clickAreaClickHandler = function clickAreaClickHandler(view, event) {
43
22
  var _view$hasFocus, _target$parentElement, _event$currentTarget, _event$currentTarget2;
44
23
  var isEditorFocused = !!(view !== null && view !== void 0 && (_view$hasFocus = view.hasFocus) !== null && _view$hasFocus !== void 0 && _view$hasFocus.call(view));
@@ -100,30 +79,4 @@ var clickAreaClickHandler = function clickAreaClickHandler(view, event) {
100
79
  outsideProsemirrorEditorClickHandler(view, event);
101
80
  }
102
81
  };
103
- export var outsideProsemirrorEditorClickHandler = function outsideProsemirrorEditorClickHandler(view, event) {
104
- var _view$hasFocus2;
105
- var dispatch = view.dispatch,
106
- dom = view.dom,
107
- state = view.state;
108
- var tr = state.tr;
109
- var isEditorFocused = !!(view !== null && view !== void 0 && (_view$hasFocus2 = view.hasFocus) !== null && _view$hasFocus2 !== void 0 && _view$hasFocus2.call(view));
110
- var isBottomAreaClicked = event.clientY > dom.getBoundingClientRect().bottom;
111
- if (isBottomAreaClicked) {
112
- tr.setMeta('outsideProsemirrorEditorClicked', true);
113
- addParagraphAtEnd(tr);
114
- }
115
- setSelectionTopLevelBlocks(tr, event,
116
- // Ignored via go/ees005
117
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
118
- dom, view.posAtCoords.bind(view), isEditorFocused);
119
- tintDirtyTransaction(tr);
120
- if (!tr.docChanged && !tr.selectionSet) {
121
- return;
122
- }
123
- if (dispatch) {
124
- dispatch(tr);
125
- }
126
- view.focus();
127
- event.preventDefault();
128
- };
129
82
  export { clickAreaClickHandler };
@@ -0,0 +1,29 @@
1
+ import { tintDirtyTransaction } from '@atlaskit/editor-common/collab';
2
+ import { addParagraphAtEnd } from '@atlaskit/editor-common/commands';
3
+ import { setSelectionTopLevelBlocks } from '@atlaskit/editor-common/selection';
4
+ export var outsideProsemirrorEditorClickHandler = function outsideProsemirrorEditorClickHandler(view, event) {
5
+ var _view$hasFocus;
6
+ var dispatch = view.dispatch,
7
+ dom = view.dom,
8
+ state = view.state;
9
+ var tr = state.tr;
10
+ var isEditorFocused = !!(view !== null && view !== void 0 && (_view$hasFocus = view.hasFocus) !== null && _view$hasFocus !== void 0 && _view$hasFocus.call(view));
11
+ var isBottomAreaClicked = event.clientY > dom.getBoundingClientRect().bottom;
12
+ if (isBottomAreaClicked) {
13
+ tr.setMeta('outsideProsemirrorEditorClicked', true);
14
+ addParagraphAtEnd(tr);
15
+ }
16
+ setSelectionTopLevelBlocks(tr, event,
17
+ // Ignored via go/ees005
18
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
19
+ dom, view.posAtCoords.bind(view), isEditorFocused);
20
+ tintDirtyTransaction(tr);
21
+ if (!tr.docChanged && !tr.selectionSet) {
22
+ return;
23
+ }
24
+ if (dispatch) {
25
+ dispatch(tr);
26
+ }
27
+ view.focus();
28
+ event.preventDefault();
29
+ };
@@ -8,13 +8,11 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  import React, { Fragment } from 'react';
10
10
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
- import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
12
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import EditorContentContainer from '../EditorContentContainer/EditorContentContainer';
14
13
  import PluginSlot from '../PluginSlot';
15
14
  import WithFlash from '../WithFlash';
16
- import { ChromelessEditorContainerCompiled } from './Chromeless-compiled';
17
- import { ChromelessEditorContainerEmotion } from './Chromeless-emotion';
15
+ import { ChromelessEditorContainer } from './ChromelessEditorContainer';
18
16
  /**
19
17
  * Render the editor in a chromeless appearance.
20
18
  * Example use is the inline comment editor, which doesn't have editor toolbar
@@ -123,14 +121,4 @@ function RenderWithPluginState(_ref2) {
123
121
  return /*#__PURE__*/React.createElement(Fragment, null, renderChrome({
124
122
  maxContentSize: maxContentSize
125
123
  }));
126
- }
127
-
128
- /**
129
- * Container for the chromeless editor appearance. This is used to set the max and min height
130
- * of the editor content area, and to provide a ref to the container element for the popups.
131
- * @param param0 props for the chromeless editor container
132
- * @returns JSX element representing the chromeless editor container
133
- */
134
- export var ChromelessEditorContainer = componentWithCondition(function () {
135
- return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
136
- }, ChromelessEditorContainerCompiled, ChromelessEditorContainerEmotion);
124
+ }
@@ -0,0 +1,14 @@
1
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
+ import { ChromelessEditorContainerCompiled } from './Chromeless-compiled';
4
+ import { ChromelessEditorContainerEmotion } from './Chromeless-emotion';
5
+
6
+ /**
7
+ * Container for the chromeless editor appearance. This is used to set the max and min height
8
+ * of the editor content area, and to provide a ref to the container element for the popups.
9
+ * @param param0 props for the chromeless editor container
10
+ * @returns JSX element representing the chromeless editor container
11
+ */
12
+ export var ChromelessEditorContainer = componentWithCondition(function () {
13
+ return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
14
+ }, ChromelessEditorContainerCompiled, ChromelessEditorContainerEmotion);
@@ -0,0 +1,7 @@
1
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
+ import { CustomToolbarWrapperCompiled } from './MainToolbar-compiled';
4
+ import { CustomToolbarWrapperEmotion } from './MainToolbar-emotion';
5
+ export var CustomToolbarWrapperMigration = componentWithCondition(function () {
6
+ return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
7
+ }, CustomToolbarWrapperCompiled, CustomToolbarWrapperEmotion);
@@ -9,8 +9,11 @@ import { ToolbarPortalMountPoint, useToolbarPortal } from '../../Toolbar/Toolbar
9
9
  import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
10
10
  import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
11
11
  import { MainToolbarForFirstChildWrapper, MainToolbarForSecondChildWrapper } from './CustomToolbarWrapper';
12
- import { CustomToolbarWrapperMigration, MainToolbarIconBeforeMigration, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, NonCustomToolbarWrapperMigration } from './MainToolbar';
12
+ import { CustomToolbarWrapperMigration } from './CustomToolbarWrapperMigration';
13
+ import { MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
14
+ import { MainToolbarIconBeforeMigration } from './MainToolbarIconBeforeMigration';
13
15
  import { MainToolbarWrapper } from './MainToolbarWrapper';
16
+ import { NonCustomToolbarWrapperMigration } from './NonCustomToolbarWrapperMigration';
14
17
  export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
15
18
  var _props$primaryToolbar, _useToolbarPortal, _props$customPrimaryT;
16
19
  var _useState = useState(false),
@@ -1,14 +1 @@
1
- import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
- import { CustomToolbarWrapperCompiled, MainToolbarIconBeforeCompiled, NonCustomToolbarWrapperCompiled } from './MainToolbar-compiled';
4
- import { CustomToolbarWrapperEmotion, MainToolbarIconBeforeEmotion, NonCustomToolbarWrapperEmotion } from './MainToolbar-emotion';
5
- export var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
6
- export var NonCustomToolbarWrapperMigration = componentWithCondition(function () {
7
- return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
8
- }, NonCustomToolbarWrapperCompiled, NonCustomToolbarWrapperEmotion);
9
- export var CustomToolbarWrapperMigration = componentWithCondition(function () {
10
- return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
11
- }, CustomToolbarWrapperCompiled, CustomToolbarWrapperEmotion);
12
- export var MainToolbarIconBeforeMigration = componentWithCondition(function () {
13
- return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
14
- }, MainToolbarIconBeforeCompiled, MainToolbarIconBeforeEmotion);
1
+ export var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
@@ -0,0 +1,7 @@
1
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
+ import { MainToolbarIconBeforeCompiled } from './MainToolbar-compiled';
4
+ import { MainToolbarIconBeforeEmotion } from './MainToolbar-emotion';
5
+ export var MainToolbarIconBeforeMigration = componentWithCondition(function () {
6
+ return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
7
+ }, MainToolbarIconBeforeCompiled, MainToolbarIconBeforeEmotion);
@@ -0,0 +1,7 @@
1
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
+ import { NonCustomToolbarWrapperCompiled } from './MainToolbar-compiled';
4
+ import { NonCustomToolbarWrapperEmotion } from './MainToolbar-emotion';
5
+ export var NonCustomToolbarWrapperMigration = componentWithCondition(function () {
6
+ return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
7
+ }, NonCustomToolbarWrapperCompiled, NonCustomToolbarWrapperEmotion);
@@ -75,6 +75,25 @@ export var mentionNodeStyles = css({
75
75
  '&:active': {
76
76
  background: "var(--ds-background-brand-bold-pressed, #144794)"
77
77
  }
78
+ },
79
+ // Disabled variant — mirrors `MentionType.DISABLED` in
80
+ // `packages/elements/mention/src/components/Mention/PrimitiveMention.tsx`.
81
+ // Hover / active states are intentionally flat: a disabled chip should
82
+ // not respond to mouse interaction. The chip is still keyboard-focusable
83
+ // (see `MentionNodeView.setClassList`) so the focus ring is still
84
+ // allowed to render via `:focus-visible`.
85
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
86
+ '.editor-mention-primitive.mention-disabled': {
87
+ background: "var(--ds-background-disabled, #0515240F)",
88
+ border: '1px solid transparent',
89
+ color: "var(--ds-text-disabled, #080F214A)",
90
+ cursor: 'default',
91
+ '&:hover': {
92
+ background: "var(--ds-background-disabled, #0515240F)"
93
+ },
94
+ '&:active': {
95
+ background: "var(--ds-background-disabled, #0515240F)"
96
+ }
78
97
  }
79
98
  });
80
99
 
@@ -0,0 +1,10 @@
1
+ import { combineProviders } from '@atlaskit/editor-common/provider-helpers';
2
+ export function combineQuickInsertProviders(quickInsertProviders) {
3
+ var _combineProviders = combineProviders(quickInsertProviders),
4
+ invokeList = _combineProviders.invokeList;
5
+ return {
6
+ getItems: function getItems() {
7
+ return invokeList('getItems');
8
+ }
9
+ };
10
+ }
@@ -7,7 +7,6 @@ import React from 'react';
7
7
  import Loadable from 'react-loadable';
8
8
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEvent, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
9
9
  import { getQuickInsertItemsFromModule, resolveImport } from '@atlaskit/editor-common/extensions';
10
- import { combineProviders } from '@atlaskit/editor-common/provider-helpers';
11
10
  import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
12
11
  import { fg } from '@atlaskit/platform-feature-flags';
13
12
 
@@ -168,13 +167,4 @@ function _extensionProviderToQuickInsertProvider() {
168
167
  }, _callee);
169
168
  }));
170
169
  return _extensionProviderToQuickInsertProvider.apply(this, arguments);
171
- }
172
- export function combineQuickInsertProviders(quickInsertProviders) {
173
- var _combineProviders = combineProviders(quickInsertProviders),
174
- invokeList = _combineProviders.invokeList;
175
- return {
176
- getItems: function getItems() {
177
- return invokeList('getItems');
178
- }
179
- };
180
170
  }
@@ -1,12 +1,4 @@
1
- /**
2
- * Check if a DOM element is visible within the viewport. We deem a node visible if the top left corner coordinate is within the viewport.
3
- * This may not look visible, and may include a node that looks below the fold – but it's more than 0 pixels within the viewport.
4
- */
5
- export var isNodeVisible = function isNodeVisible(node) {
6
- var rect = node.getBoundingClientRect();
7
- var isVisible = rect.x >= 0 && rect.x < window.innerWidth && rect.y >= 0 && rect.y < window.innerHeight;
8
- return isVisible;
9
- };
1
+ import { isNodeVisible } from './isNodeVisible';
10
2
 
11
3
  /**
12
4
  * Get visible nodes in viewport by looping through the first N nodes (MAX_NODES_TO_COUNT)
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Check if a DOM element is visible within the viewport. We deem a node visible if the top left corner coordinate is within the viewport.
3
+ * This may not look visible, and may include a node that looks below the fold – but it's more than 0 pixels within the viewport.
4
+ */
5
+ export var isNodeVisible = function isNodeVisible(node) {
6
+ var rect = node.getBoundingClientRect();
7
+ var isVisible = rect.x >= 0 && rect.x < window.innerWidth && rect.y >= 0 && rect.y < window.innerHeight;
8
+ return isVisible;
9
+ };
@@ -1,4 +1,5 @@
1
- import { combineQuickInsertProviders, extensionProviderToQuickInsertProvider } from './extensions';
1
+ import { combineQuickInsertProviders } from './combineQuickInsertProviders';
2
+ import { extensionProviderToQuickInsertProvider } from './extensions';
2
3
 
3
4
  /**
4
5
  *
@@ -0,0 +1,8 @@
1
+ export var validNode = function validNode(node) {
2
+ try {
3
+ node.check();
4
+ } catch (error) {
5
+ return false;
6
+ }
7
+ return true;
8
+ };
@@ -1,11 +1,4 @@
1
- export var validNode = function validNode(node) {
2
- try {
3
- node.check();
4
- } catch (error) {
5
- return false;
6
- }
7
- return true;
8
- };
1
+ import { validNode } from './validNode';
9
2
 
10
3
  /** Validates prosemirror nodes, and returns true only if all nodes are valid */
11
4
  export var validateNodes = function validateNodes(nodes) {
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "220.0.2";
2
+ export var version = "220.0.3";
@@ -0,0 +1,5 @@
1
+ import type { Node } from '@atlaskit/editor-prosemirror/model';
2
+ /**
3
+ * Checks if node is an empty paragraph.
4
+ */
5
+ export declare function isEmptyParagraph(node?: Node | null): boolean;
@@ -5,10 +5,6 @@
5
5
  * help decouple it from editor-common
6
6
  */
7
7
  import type { Node } from '@atlaskit/editor-prosemirror/model';
8
- /**
9
- * Checks if node is an empty paragraph.
10
- */
11
- export declare function isEmptyParagraph(node?: Node | null): boolean;
12
8
  /**
13
9
  * Checks if a node looks like an empty document
14
10
  */
@@ -8,7 +8,7 @@ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
8
8
  import type { Transformer } from '@atlaskit/editor-common/types';
9
9
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
10
10
  import type EditorActions from '../actions';
11
- import type { EditorAppearanceComponentProps } from '../types';
11
+ import type { EditorAppearanceComponentProps } from '../types/editor-appearance-component';
12
12
  import type { EditorNextProps } from '../types/editor-props';
13
13
  interface InternalProps {
14
14
  AppearanceComponent: React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<[]>>>;
@@ -8,8 +8,8 @@ import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/
8
8
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
9
9
  import type { PublicPluginAPI, Transformer } from '@atlaskit/editor-common/types';
10
10
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
11
- import type { EditorConfig, EditorProps } from '../types';
12
- import type { EditorNextProps } from '../types/editor-props';
11
+ import type { EditorConfig } from '../types/editor-config';
12
+ import type { EditorNextProps, EditorProps } from '../types/editor-props';
13
13
  export interface EditorViewProps extends WrappedComponentProps {
14
14
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
15
15
  disabled?: boolean;
@@ -0,0 +1,16 @@
1
+ import type { DOMOutputSpec, Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ /**
3
+ * 🧱 Internal Helper Function: Editor FE Platform
4
+ *
5
+ * Adds generic metadata attributes to a DOMOutputSpec array based on the provided node or mark.
6
+ * This function ensures that the DOMOutputSpec is annotated with ProseMirror-specific metadata.
7
+ *
8
+ * @param {object} params - Parameters object.
9
+ * @param {PMNode | PMMark} params.nodeOrMark - The ProseMirror node or mark to extract metadata from.
10
+ * @param {DOMOutputSpec} params.domSpec - The DOMOutputSpec to which attributes will be added.
11
+ * @returns {DOMOutputSpec} The modified DOMOutputSpec with additional metadata.
12
+ */
13
+ export declare const addMetadataAttributes: ({ nodeOrMark, domSpec, }: {
14
+ domSpec: DOMOutputSpec;
15
+ nodeOrMark: PMNode | PMMark;
16
+ }) => DOMOutputSpec;
@@ -1,19 +1,3 @@
1
- import type { ErrorReportingHandler } from '@atlaskit/editor-common/error-reporter';
2
- import { ErrorReporter } from '@atlaskit/editor-common/error-reporter';
3
- import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
1
  import type { EditorPlugin } from '@atlaskit/editor-common/types';
5
- import type { MarkSpec } from '@atlaskit/editor-prosemirror/model';
6
- import type { EditorConfig, PMPluginCreateConfig } from '../types';
7
- export declare function sortByRank(a: {
8
- rank: number;
9
- }, b: {
10
- rank: number;
11
- }): number;
12
- export declare function fixExcludes(marks: {
13
- [key: string]: MarkSpec;
14
- }): {
15
- [key: string]: MarkSpec;
16
- };
2
+ import type { EditorConfig } from '../types/editor-config';
17
3
  export declare function processPluginsList(plugins: EditorPlugin[]): EditorConfig;
18
- export declare function createPMPlugins(config: PMPluginCreateConfig): SafePlugin[];
19
- export declare function createErrorReporter(errorReporterHandler?: ErrorReportingHandler): ErrorReporter;
@@ -1,11 +1,8 @@
1
1
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
2
2
  import type { EditorPluginInjectionAPI, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
3
3
  import type { EditorPlugin } from '@atlaskit/editor-common/types';
4
- import type { ScrollGutterPluginOptions } from '@atlaskit/editor-plugins/base';
5
4
  import type { DefaultPresetPluginOptions } from '../../src/presets/default';
6
- import type { EditorProps } from '../types';
7
- import type { EditorPluginFeatureProps } from '../types/editor-props';
8
- export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
5
+ import type { EditorPluginFeatureProps, EditorProps } from '../types/editor-props';
9
6
  export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): DefaultPresetPluginOptions & Omit<EditorPluginFeatureProps, 'placeholder'>;
10
7
  /**
11
8
  * Maps EditorProps to EditorPlugins
@@ -2,21 +2,6 @@ import type { MarkConfig, NodeConfig } from '@atlaskit/editor-common/types';
2
2
  import type { DOMOutputSpec, MarkSpec, NodeSpec, Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
3
  import { Schema } from '@atlaskit/editor-prosemirror/model';
4
4
  type toDOMType = (node: PMNode | PMMark) => DOMOutputSpec;
5
- /**
6
- * 🧱 Internal Helper Function: Editor FE Platform
7
- *
8
- * Adds generic metadata attributes to a DOMOutputSpec array based on the provided node or mark.
9
- * This function ensures that the DOMOutputSpec is annotated with ProseMirror-specific metadata.
10
- *
11
- * @param {object} params - Parameters object.
12
- * @param {PMNode | PMMark} params.nodeOrMark - The ProseMirror node or mark to extract metadata from.
13
- * @param {DOMOutputSpec} params.domSpec - The DOMOutputSpec to which attributes will be added.
14
- * @returns {DOMOutputSpec} The modified DOMOutputSpec with additional metadata.
15
- */
16
- export declare const addMetadataAttributes: ({ nodeOrMark, domSpec, }: {
17
- domSpec: DOMOutputSpec;
18
- nodeOrMark: PMNode | PMMark;
19
- }) => DOMOutputSpec;
20
5
  /**
21
6
  * 🧱 Internal Helper Function: Editor FE Platform
22
7
  *
@@ -1,5 +1,5 @@
1
1
  import type { InitialPluginConfiguration } from '../presets/universal';
2
- import type { EditorProps } from '../types';
2
+ import type { EditorProps } from '../types/editor-props';
3
3
  export declare function createUniversalPreset({ props, prevProps, initialPluginConfiguration, }: {
4
4
  initialPluginConfiguration?: InitialPluginConfiguration;
5
5
  prevProps?: EditorProps;
@@ -0,0 +1,3 @@
1
+ import type { ErrorReportingHandler } from '@atlaskit/editor-common/error-reporter';
2
+ import { ErrorReporter } from '@atlaskit/editor-common/error-reporter';
3
+ export declare function createErrorReporter(errorReporterHandler?: ErrorReportingHandler): ErrorReporter;
@@ -0,0 +1,3 @@
1
+ import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import type { PMPluginCreateConfig } from '../types/pm-plugin-list';
3
+ export declare function createPMPlugins(config: PMPluginCreateConfig): SafePlugin[];
@@ -0,0 +1,6 @@
1
+ import type { MarkSpec } from '@atlaskit/editor-prosemirror/model';
2
+ export declare function fixExcludes(marks: {
3
+ [key: string]: MarkSpec;
4
+ }): {
5
+ [key: string]: MarkSpec;
6
+ };
@@ -1,5 +1,5 @@
1
1
  import type { EditorAppearance } from '@atlaskit/editor-common/types';
2
- import type { EditorAppearanceComponentProps } from '../types';
2
+ import type { EditorAppearanceComponentProps } from '../types/editor-appearance-component';
3
3
  type ReturnType = React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<any[]>>>;
4
4
  export default function getUiComponent(appearance: EditorAppearance): ReturnType;
5
5
  export {};
@@ -0,0 +1,3 @@
1
+ import type { ScrollGutterPluginOptions } from '@atlaskit/editor-plugins/base';
2
+ import type { EditorProps } from '../types/editor-props';
3
+ export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
@@ -0,0 +1,5 @@
1
+ export declare function sortByRank(a: {
2
+ rank: number;
3
+ }, b: {
4
+ rank: number;
5
+ }): number;
@@ -6,7 +6,6 @@ import React from 'react';
6
6
  import { jsx } from '@emotion/react';
7
7
  import type { InitialPluginConfiguration } from './preset-universal';
8
8
  import type { EditorProps } from './types/editor-props';
9
- export type { Command, CommandDispatch, DomAtPos, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorProps, ExtensionConfig, ExtensionProvidersProp, MessageDescriptor, PMPluginCreateConfig, } from './types';
10
9
  interface EditorPropsWithInitialPluginConfiguration extends EditorProps {
11
10
  initialPluginConfiguration?: InitialPluginConfiguration;
12
11
  }
@@ -22,3 +21,4 @@ export default class Editor extends React.Component<EditorPropsWithInitialPlugin
22
21
  constructor(props: EditorPropsWithInitialPluginConfiguration);
23
22
  render(): jsx.JSX.Element;
24
23
  }
24
+ export {};
@@ -1,2 +1,11 @@
1
- export type { Command, CommandDispatch, DomAtPos, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorProps, ExtensionConfig, ExtensionProvidersProp, MessageDescriptor, PMPluginCreateConfig, } from '../editor';
1
+ export type { Command, CommandDispatch } from '../types/command';
2
+ export type { DomAtPos } from '../types/dom-at-pos';
3
+ export type { EditorAppearanceComponentProps } from '../types/editor-appearance-component';
4
+ export type { EditorConfig } from '../types/editor-config';
5
+ export type { EditorInstance } from '../types/editor-instance';
6
+ export type { EditorProps } from '../types/editor-props';
7
+ export type { ExtensionConfig } from '../types/extension-config';
8
+ export type { ExtensionProvidersProp } from '../types/editor-props';
9
+ export type { MessageDescriptor } from '../types/i18n';
10
+ export type { PMPluginCreateConfig } from '../types/pm-plugin-list';
2
11
  export { default } from '../editor';
@@ -1,2 +1,5 @@
1
- export { createPMSchemaAndPlugins, isElementBySelectorInDocument, setTextSelection, } from '../test-utils';
2
- export type { LightEditorConfig, LightEditorPlugin } from '../test-utils';
1
+ export { isElementBySelectorInDocument } from '../isElementBySelectorInDocument';
2
+ export { setTextSelection } from '../setTextSelection';
3
+ export { createPMSchemaAndPlugins } from '../test-utils';
4
+ export type { LightEditorConfig } from '../test-utils';
5
+ export type { LightEditorPlugin } from '../create-editor/get-plugins';
@@ -26,7 +26,9 @@ ContextPanel, } from './ui/ContextPanel';
26
26
  export { getNodesCount } from './utils/getNodesCount';
27
27
  export { default as measurements } from './utils/performance/measure-enum';
28
28
  export { createFeatureFlagsFromProps } from './utils/feature-flags-from-props';
29
- export type { Command, EditorProps, EditorInstance, CommandDispatch } from './types';
29
+ export type { EditorInstance } from './types/editor-instance';
30
+ export type { Command, CommandDispatch } from './types/command';
31
+ export type { EditorProps } from './types/editor-props';
30
32
  export { default as EditorActions } from './actions';
31
33
  export { getDefaultPresetOptionsFromEditorProps } from './create-editor/create-plugins-list';
32
34
  export { ReactEditorView } from './create-editor/ReactEditorView';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Given a selector, checks if an element matching the selector exists in the
3
+ * document.
4
+ * @param selector
5
+ * @returns true if element matching selector exists in document, false otherwise
6
+ */
7
+ export declare const isElementBySelectorInDocument: (selector: string) => boolean;
@@ -4,8 +4,7 @@ import type { EditorAppearance, FeatureFlags } from '@atlaskit/editor-common/typ
4
4
  import type { ToolbarInsertBlockButtonsConfig } from '@atlaskit/editor-plugin-insert-block';
5
5
  import type { ExtensionPluginOptions } from '@atlaskit/editor-plugins/extension';
6
6
  import type { BreakpointPreset } from '@atlaskit/editor-toolbar';
7
- import type { EditorProps } from '../types';
8
- import type { EditorPluginFeatureProps, EditorProviderProps, EditorSharedPropsWithPlugins } from '../types/editor-props';
7
+ import type { EditorPluginFeatureProps, EditorProps, EditorProviderProps, EditorSharedPropsWithPlugins } from '../types/editor-props';
9
8
  import type { DefaultPresetPluginOptions } from './default';
10
9
  export type UniversalPresetProps = DefaultPresetPluginOptions & EditorSharedPropsWithPlugins & Omit<EditorPluginFeatureProps, 'placeholder'> & EditorProviderProps;
11
10
  /**
@@ -0,0 +1,2 @@
1
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
+ export declare function setTextSelection(view: EditorView, anchor: number, head?: number): void;
@@ -3,9 +3,7 @@ import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
3
3
  import type { MarkConfig, NodeConfig, ReactHookFactory, UIComponentFactory } from '@atlaskit/editor-common/types';
4
4
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
5
5
  import type { Plugin } from '@atlaskit/editor-prosemirror/state';
6
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
6
  import type { LightPMPlugin, LightPMPluginFactoryParams, OnEditorViewStateUpdated } from './create-editor/get-plugins';
8
- export type { LightEditorPlugin } from './create-editor/get-plugins';
9
7
  export interface LightEditorConfig {
10
8
  contentComponents: UIComponentFactory[];
11
9
  marks: MarkConfig[];
@@ -23,11 +21,4 @@ type PluginData = {
23
21
  export declare const createPMSchemaAndPlugins: (inputPreset?: EditorPresetBuilder) => (pluginFactoryParams: Omit<LightPMPluginFactoryParams, "schema"> & {
24
22
  pluginInjectionAPI: EditorPluginInjectionAPI;
25
23
  }) => PluginData;
26
- export declare function setTextSelection(view: EditorView, anchor: number, head?: number): void;
27
- /**
28
- * Given a selector, checks if an element matching the selector exists in the
29
- * document.
30
- * @param selector
31
- * @returns true if element matching selector exists in document, false otherwise
32
- */
33
- export declare const isElementBySelectorInDocument: (selector: string) => boolean;
24
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- import type { EditorAppearanceComponentProps } from '../types';
2
+ import type { EditorAppearanceComponentProps } from '../types/editor-appearance-component';
3
3
  export type WithAppearanceComponent = {
4
4
  AppearanceComponent: React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<NextEditorPlugin<any, any>[]>>>;
5
5
  };
@@ -1,4 +1,4 @@
1
- import type { ReactComponents } from '../../../types';
1
+ import type { ReactComponents } from '../../../types/editor-props';
2
2
  export declare const ignoreAttribute = "data-editor-content-component";
3
3
  /**
4
4
  * Wraps content components in a data attribute to ignore
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @see ED-14699 - check if editor is inside a modal to continue to bring cursor to input when
3
+ * any part of the editor container is clicked
4
+ *
5
+ * Handles two cases when a click event is fired:
6
+ *
7
+ * 1. if editor (e.g. comment inside of Jira ticket view) is inside modal then ensure focus and cursor is brought to the input
8
+ * 2. if another modal is open (e.g. delete confirmation modal for confluence table) then ignore clicks as they shouldn't influence editor state
9
+ */
10
+ export declare const checkForModal: (target: HTMLElement | null) => boolean;