@atlaskit/editor-core 220.0.3 → 220.1.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 (243) hide show
  1. package/CHANGELOG.md +83 -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/composable-editor/BaseThemeWrapper.js +24 -5
  16. package/dist/cjs/composable-editor/editor-internal-compiled.js +5 -1
  17. package/dist/cjs/composable-editor/editor-internal-emotion.js +6 -2
  18. package/dist/cjs/composable-editor/editor-internal.js +11 -2
  19. package/dist/cjs/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
  20. package/dist/cjs/create-editor/ReactEditorView.js +6 -4
  21. package/dist/cjs/create-editor/addMetadataAttributes.js +36 -0
  22. package/dist/cjs/create-editor/create-editor.js +0 -62
  23. package/dist/cjs/create-editor/create-plugins-list.js +2 -15
  24. package/dist/cjs/create-editor/create-schema.js +4 -35
  25. package/dist/cjs/create-editor/createErrorReporter.js +14 -0
  26. package/dist/cjs/create-editor/createPMPlugins.js +39 -0
  27. package/dist/cjs/create-editor/fixExcludes.js +22 -0
  28. package/dist/cjs/create-editor/getScrollGutterOptions.js +19 -0
  29. package/dist/cjs/create-editor/sortByRank.js +9 -0
  30. package/dist/cjs/entry-points/test-utils.js +4 -2
  31. package/dist/cjs/isElementBySelectorInDocument.js +15 -0
  32. package/dist/cjs/setTextSelection.js +12 -0
  33. package/dist/cjs/test-utils.js +1 -18
  34. package/dist/cjs/ui/Addon/checkForModal.js +25 -0
  35. package/dist/cjs/ui/Addon/click-area-helper.js +5 -52
  36. package/dist/cjs/ui/Addon/outsideProsemirrorEditorClickHandler.js +35 -0
  37. package/dist/cjs/ui/Appearance/Chromeless.js +4 -16
  38. package/dist/cjs/ui/Appearance/ChromelessEditorContainer.js +19 -0
  39. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +13 -0
  40. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
  41. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +5 -2
  42. package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +2 -15
  43. package/dist/cjs/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +13 -0
  44. package/dist/cjs/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +13 -0
  45. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +15 -21
  46. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +12 -17
  47. package/dist/cjs/ui/EditorContentContainer/styles/mentions.js +19 -0
  48. package/dist/cjs/utils/combineQuickInsertProviders.js +16 -0
  49. package/dist/cjs/utils/extensions.js +0 -11
  50. package/dist/cjs/utils/getNodesVisibleInViewport.js +3 -12
  51. package/dist/cjs/utils/isNodeVisible.js +15 -0
  52. package/dist/cjs/utils/prepare-quick-insert-provider.js +2 -1
  53. package/dist/cjs/utils/validNode.js +14 -0
  54. package/dist/cjs/utils/validateNodes.js +3 -11
  55. package/dist/cjs/version-wrapper.js +1 -1
  56. package/dist/es2019/actions/isEmptyParagraph.js +6 -0
  57. package/dist/es2019/actions/temp-is-empty-document.js +1 -6
  58. package/dist/es2019/composable-editor/BaseThemeWrapper.js +19 -3
  59. package/dist/es2019/composable-editor/editor-internal-compiled.js +5 -1
  60. package/dist/es2019/composable-editor/editor-internal-emotion.js +6 -2
  61. package/dist/es2019/composable-editor/editor-internal.js +11 -2
  62. package/dist/es2019/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
  63. package/dist/es2019/create-editor/ReactEditorView.js +3 -1
  64. package/dist/es2019/create-editor/addMetadataAttributes.js +29 -0
  65. package/dist/es2019/create-editor/create-editor.js +0 -53
  66. package/dist/es2019/create-editor/create-plugins-list.js +1 -13
  67. package/dist/es2019/create-editor/create-schema.js +2 -31
  68. package/dist/es2019/create-editor/createErrorReporter.js +8 -0
  69. package/dist/es2019/create-editor/createPMPlugins.js +30 -0
  70. package/dist/es2019/create-editor/fixExcludes.js +12 -0
  71. package/dist/es2019/create-editor/getScrollGutterOptions.js +13 -0
  72. package/dist/es2019/create-editor/sortByRank.js +3 -0
  73. package/dist/es2019/entry-points/test-utils.js +3 -1
  74. package/dist/es2019/isElementBySelectorInDocument.js +9 -0
  75. package/dist/es2019/setTextSelection.js +8 -0
  76. package/dist/es2019/test-utils.js +0 -18
  77. package/dist/es2019/ui/Addon/checkForModal.js +19 -0
  78. package/dist/es2019/ui/Addon/click-area-helper.js +2 -53
  79. package/dist/es2019/ui/Addon/outsideProsemirrorEditorClickHandler.js +33 -0
  80. package/dist/es2019/ui/Appearance/Chromeless.js +2 -12
  81. package/dist/es2019/ui/Appearance/ChromelessEditorContainer.js +12 -0
  82. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +5 -0
  83. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
  84. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +4 -1
  85. package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +1 -8
  86. package/dist/es2019/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +5 -0
  87. package/dist/es2019/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +5 -0
  88. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +14 -19
  89. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +17 -14
  90. package/dist/es2019/ui/EditorContentContainer/styles/mentions.js +19 -0
  91. package/dist/es2019/utils/combineQuickInsertProviders.js +11 -0
  92. package/dist/es2019/utils/extensions.js +0 -11
  93. package/dist/es2019/utils/getNodesVisibleInViewport.js +1 -9
  94. package/dist/es2019/utils/isNodeVisible.js +9 -0
  95. package/dist/es2019/utils/prepare-quick-insert-provider.js +2 -1
  96. package/dist/es2019/utils/validNode.js +8 -0
  97. package/dist/es2019/utils/validateNodes.js +1 -8
  98. package/dist/es2019/version-wrapper.js +1 -1
  99. package/dist/esm/actions/isEmptyParagraph.js +6 -0
  100. package/dist/esm/actions/temp-is-empty-document.js +1 -6
  101. package/dist/esm/composable-editor/BaseThemeWrapper.js +23 -4
  102. package/dist/esm/composable-editor/editor-internal-compiled.js +5 -1
  103. package/dist/esm/composable-editor/editor-internal-emotion.js +6 -2
  104. package/dist/esm/composable-editor/editor-internal.js +11 -2
  105. package/dist/esm/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
  106. package/dist/esm/create-editor/ReactEditorView.js +3 -1
  107. package/dist/esm/create-editor/addMetadataAttributes.js +29 -0
  108. package/dist/esm/create-editor/create-editor.js +0 -58
  109. package/dist/esm/create-editor/create-plugins-list.js +1 -13
  110. package/dist/esm/create-editor/create-schema.js +2 -31
  111. package/dist/esm/create-editor/createErrorReporter.js +8 -0
  112. package/dist/esm/create-editor/createPMPlugins.js +32 -0
  113. package/dist/esm/create-editor/fixExcludes.js +16 -0
  114. package/dist/esm/create-editor/getScrollGutterOptions.js +13 -0
  115. package/dist/esm/create-editor/sortByRank.js +3 -0
  116. package/dist/esm/entry-points/test-utils.js +3 -1
  117. package/dist/esm/isElementBySelectorInDocument.js +9 -0
  118. package/dist/esm/setTextSelection.js +6 -0
  119. package/dist/esm/test-utils.js +0 -16
  120. package/dist/esm/ui/Addon/checkForModal.js +19 -0
  121. package/dist/esm/ui/Addon/click-area-helper.js +2 -49
  122. package/dist/esm/ui/Addon/outsideProsemirrorEditorClickHandler.js +29 -0
  123. package/dist/esm/ui/Appearance/Chromeless.js +2 -14
  124. package/dist/esm/ui/Appearance/ChromelessEditorContainer.js +14 -0
  125. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +7 -0
  126. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
  127. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +4 -1
  128. package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +1 -14
  129. package/dist/esm/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +7 -0
  130. package/dist/esm/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +7 -0
  131. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +18 -21
  132. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +11 -11
  133. package/dist/esm/ui/EditorContentContainer/styles/mentions.js +19 -0
  134. package/dist/esm/utils/combineQuickInsertProviders.js +10 -0
  135. package/dist/esm/utils/extensions.js +0 -10
  136. package/dist/esm/utils/getNodesVisibleInViewport.js +1 -9
  137. package/dist/esm/utils/isNodeVisible.js +9 -0
  138. package/dist/esm/utils/prepare-quick-insert-provider.js +2 -1
  139. package/dist/esm/utils/validNode.js +8 -0
  140. package/dist/esm/utils/validateNodes.js +1 -8
  141. package/dist/esm/version-wrapper.js +1 -1
  142. package/dist/types/actions/isEmptyParagraph.d.ts +5 -0
  143. package/dist/types/actions/temp-is-empty-document.d.ts +0 -4
  144. package/dist/types/composable-editor/BaseThemeWrapper.d.ts +1 -1
  145. package/dist/types/composable-editor/editor-internal-compiled.d.ts +2 -1
  146. package/dist/types/composable-editor/editor-internal-emotion.d.ts +2 -1
  147. package/dist/types/composable-editor/editor-internal.d.ts +1 -1
  148. package/dist/types/create-editor/ReactEditorView.d.ts +2 -2
  149. package/dist/types/create-editor/addMetadataAttributes.d.ts +16 -0
  150. package/dist/types/create-editor/create-editor.d.ts +1 -17
  151. package/dist/types/create-editor/create-plugins-list.d.ts +1 -4
  152. package/dist/types/create-editor/create-schema.d.ts +0 -15
  153. package/dist/types/create-editor/create-universal-preset.d.ts +1 -1
  154. package/dist/types/create-editor/createErrorReporter.d.ts +3 -0
  155. package/dist/types/create-editor/createPMPlugins.d.ts +3 -0
  156. package/dist/types/create-editor/fixExcludes.d.ts +6 -0
  157. package/dist/types/create-editor/get-ui-component.d.ts +1 -1
  158. package/dist/types/create-editor/getScrollGutterOptions.d.ts +3 -0
  159. package/dist/types/create-editor/sortByRank.d.ts +5 -0
  160. package/dist/types/editor.d.ts +1 -1
  161. package/dist/types/entry-points/editor.d.ts +10 -1
  162. package/dist/types/entry-points/test-utils.d.ts +5 -2
  163. package/dist/types/index.d.ts +3 -1
  164. package/dist/types/isElementBySelectorInDocument.d.ts +7 -0
  165. package/dist/types/presets/universal.d.ts +1 -2
  166. package/dist/types/setTextSelection.d.ts +2 -0
  167. package/dist/types/test-utils.d.ts +1 -10
  168. package/dist/types/types/with-appearance-component.d.ts +1 -1
  169. package/dist/types/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +1 -1
  170. package/dist/types/ui/Addon/checkForModal.d.ts +10 -0
  171. package/dist/types/ui/Addon/click-area-helper.d.ts +0 -11
  172. package/dist/types/ui/Addon/outsideProsemirrorEditorClickHandler.d.ts +2 -0
  173. package/dist/types/ui/Appearance/Chromeless.d.ts +2 -10
  174. package/dist/types/ui/Appearance/ChromelessEditorContainer.d.ts +9 -0
  175. package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -1
  176. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapperMigration.d.ts +4 -0
  177. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -1
  178. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
  179. package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -1
  180. package/dist/types/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +1 -1
  181. package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +0 -10
  182. package/dist/types/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.d.ts +4 -0
  183. package/dist/types/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.d.ts +4 -0
  184. package/dist/types/utils/combineQuickInsertProviders.d.ts +2 -0
  185. package/dist/types/utils/extensions.d.ts +0 -1
  186. package/dist/types/utils/getNodesVisibleInViewport.d.ts +0 -5
  187. package/dist/types/utils/isNodeVisible.d.ts +5 -0
  188. package/dist/types/utils/validNode.d.ts +2 -0
  189. package/dist/types/utils/validateNodes.d.ts +0 -1
  190. package/dist/types-ts4.5/actions/isEmptyParagraph.d.ts +5 -0
  191. package/dist/types-ts4.5/actions/temp-is-empty-document.d.ts +0 -4
  192. package/dist/types-ts4.5/composable-editor/BaseThemeWrapper.d.ts +1 -1
  193. package/dist/types-ts4.5/composable-editor/editor-internal-compiled.d.ts +2 -1
  194. package/dist/types-ts4.5/composable-editor/editor-internal-emotion.d.ts +2 -1
  195. package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +1 -1
  196. package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +2 -2
  197. package/dist/types-ts4.5/create-editor/addMetadataAttributes.d.ts +16 -0
  198. package/dist/types-ts4.5/create-editor/create-editor.d.ts +1 -17
  199. package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +1 -4
  200. package/dist/types-ts4.5/create-editor/create-schema.d.ts +0 -15
  201. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +1 -1
  202. package/dist/types-ts4.5/create-editor/createErrorReporter.d.ts +3 -0
  203. package/dist/types-ts4.5/create-editor/createPMPlugins.d.ts +3 -0
  204. package/dist/types-ts4.5/create-editor/fixExcludes.d.ts +6 -0
  205. package/dist/types-ts4.5/create-editor/get-ui-component.d.ts +1 -1
  206. package/dist/types-ts4.5/create-editor/getScrollGutterOptions.d.ts +3 -0
  207. package/dist/types-ts4.5/create-editor/sortByRank.d.ts +5 -0
  208. package/dist/types-ts4.5/editor.d.ts +1 -1
  209. package/dist/types-ts4.5/entry-points/editor.d.ts +10 -1
  210. package/dist/types-ts4.5/entry-points/test-utils.d.ts +5 -2
  211. package/dist/types-ts4.5/index.d.ts +3 -1
  212. package/dist/types-ts4.5/isElementBySelectorInDocument.d.ts +7 -0
  213. package/dist/types-ts4.5/presets/universal.d.ts +1 -2
  214. package/dist/types-ts4.5/setTextSelection.d.ts +2 -0
  215. package/dist/types-ts4.5/test-utils.d.ts +1 -10
  216. package/dist/types-ts4.5/types/with-appearance-component.d.ts +1 -1
  217. package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +1 -1
  218. package/dist/types-ts4.5/ui/Addon/checkForModal.d.ts +10 -0
  219. package/dist/types-ts4.5/ui/Addon/click-area-helper.d.ts +0 -11
  220. package/dist/types-ts4.5/ui/Addon/outsideProsemirrorEditorClickHandler.d.ts +2 -0
  221. package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +2 -10
  222. package/dist/types-ts4.5/ui/Appearance/ChromelessEditorContainer.d.ts +9 -0
  223. package/dist/types-ts4.5/ui/Appearance/Comment/Comment.d.ts +1 -1
  224. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapperMigration.d.ts +4 -0
  225. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -1
  226. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
  227. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -1
  228. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +1 -1
  229. package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbar.d.ts +0 -10
  230. package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.d.ts +4 -0
  231. package/dist/types-ts4.5/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.d.ts +4 -0
  232. package/dist/types-ts4.5/utils/combineQuickInsertProviders.d.ts +2 -0
  233. package/dist/types-ts4.5/utils/extensions.d.ts +0 -1
  234. package/dist/types-ts4.5/utils/getNodesVisibleInViewport.d.ts +0 -5
  235. package/dist/types-ts4.5/utils/isNodeVisible.d.ts +5 -0
  236. package/dist/types-ts4.5/utils/validNode.d.ts +2 -0
  237. package/dist/types-ts4.5/utils/validateNodes.d.ts +0 -1
  238. package/package.json +16 -16
  239. package/dist/cjs/types/index.js +0 -1
  240. package/dist/es2019/types/index.js +0 -0
  241. package/dist/esm/types/index.js +0 -0
  242. package/dist/types/types/index.d.ts +0 -9
  243. 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);
@@ -13,9 +13,10 @@ import { injectIntl } from 'react-intl';
13
13
  import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
14
14
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
15
15
  import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
16
- import { akEditorFullPageNarrowBreakout, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced } from '@atlaskit/editor-shared-styles';
16
+ import { akEditorFullPageNarrowBreakout, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
17
17
  import FeatureGates from '@atlaskit/feature-gate-js-client';
18
18
  import { fg } from '@atlaskit/platform-feature-flags';
19
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
19
20
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
20
21
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
21
22
  // Ignored via go/ees005
@@ -222,7 +223,7 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
222
223
  var contentAreaRef = useRef(null);
223
224
  var containerRef = useRef(null);
224
225
  var allowScrollGutter = (_props$editorAPI = props.editorAPI) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.base) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.sharedState.currentState()) === null || _props$editorAPI === void 0 ? void 0 : _props$editorAPI.allowScrollGutter;
225
- var contentAreaMaxWidth = getTotalPadding() + (!fullWidthMode ? maxWidthMode ? akEditorUltraWideLayoutWidth : theme.layoutMaxWidth : akEditorFullWidthLayoutWidth);
226
+ var contentAreaMaxWidth = getTotalPadding() + (!fullWidthMode ? maxWidthMode ? akEditorUltraWideLayoutWidth : expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true) || expValEquals('platform_editor_core_static_css', 'isEnabled', true) ? akEditorDefaultLayoutWidth : theme.layoutMaxWidth : akEditorFullWidthLayoutWidth);
226
227
 
227
228
  // Get useStandardNodeWidth from block menu plugin shared state
228
229
  // Only access editorAPI when the experiment is enabled to avoid performance impact
@@ -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);
@@ -1,8 +1,12 @@
1
1
  /* EditorContentContainer-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
- // TODO: EDITOR-6833 - Expected across this entire file, future violations are expected. Will try to remove them later after fully migration
3
- /* eslint-disable @atlaskit/platform/use-motion-token-values, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/design-system/no-invalid-css-map, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/platform/expand-spacing-shorthand, @atlaskit/platform/expand-border-shorthand, @atlaskit/platform/expand-background-shorthand */
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
3
  import "./EditorContentContainer-compiled.compiled.css";
5
4
  import { ax, ix } from "@compiled/react/runtime";
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ // TODO: EDITOR-6833 - Expected across this entire file, future violations are expected. Will try to remove them later after fully migration
8
+ /* eslint-disable @atlaskit/platform/use-motion-token-values, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/design-system/no-invalid-css-map, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/platform/expand-spacing-shorthand, @atlaskit/platform/expand-border-shorthand, @atlaskit/platform/expand-background-shorthand */
9
+
6
10
  import React from 'react';
7
11
  // eslint-disable-next-line import/order
8
12
  import { getBrowserInfo } from '@atlaskit/editor-common/browser';
@@ -14,7 +18,7 @@ import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
14
18
  import { AnnotationSharedClassNames, richMediaClassName, expandClassNames, SmartCardSharedCssClassName, CodeBlockSharedCssClassName, tableCellBorderWidth, tableCellMinWidth, TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
15
19
  import { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, SyncBlockStateCssClassName } from '@atlaskit/editor-common/sync-block';
16
20
  import { tableCellBackgroundStyleOverrideForCompiled } from '@atlaskit/editor-common/table-cell-background-for-compiled';
17
- import { akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize, akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier, akEditorTableNumberColumnWidth, editorFontSize } from '@atlaskit/editor-shared-styles';
21
+ import { akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize, akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier, akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
18
22
  import { overflowShadowForCompiled } from '@atlaskit/editor-shared-styles/overflow-shadow-for-compiled';
19
23
  import { fg } from '@atlaskit/platform-feature-flags';
20
24
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -344,24 +348,17 @@ export var EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef(functi
344
348
  var tableOverflowShadow = overflowShadowForCompiled({
345
349
  leftCoverWidth: "var(--ds-space-300, 24px)"
346
350
  });
347
- var style = editorExperiment('platform_editor_preview_panel_responsiveness', true, {
348
- exposure: true
349
- }) ? {
350
- '--ak-editor-base-font-size': "".concat(editorFontSize({
351
- theme: {
352
- baseFontSize: baseFontSize
353
- }
354
- }), "px"),
355
- '--ak-editor--table-overflow-shadow': tableOverflowShadow
356
- } : {
357
- '--ak-editor-base-font-size': "".concat(editorFontSize({
358
- theme: {
359
- baseFontSize: baseFontSize
360
- }
361
- }), "px"),
362
- '--ak-editor--large-gutter-padding': "".concat(akEditorGutterPaddingDynamic(), "px"),
351
+
352
+ // Under the static-CSS experiment, --ak-editor-base-font-size is set earlier on the
353
+ // root div in editor-internal.tsx and inherited via the CSS cascade — do not set it here.
354
+ // For the legacy path, compute it from the Emotion theme as before.
355
+ var style = _objectSpread({
363
356
  '--ak-editor--table-overflow-shadow': tableOverflowShadow
364
- };
357
+ }, !editorExperiment('platform_editor_preview_panel_responsiveness', true, {
358
+ exposure: true
359
+ }) && {
360
+ '--ak-editor--large-gutter-padding': "".concat(akEditorGutterPaddingDynamic(), "px")
361
+ });
365
362
  var browser = getBrowserInfo();
366
363
  return /*#__PURE__*/React.createElement("div", {
367
364
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -390,7 +387,7 @@ export var EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef(functi
390
387
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
391
388
  expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed : contentMode === 'compact' && (expValEquals('confluence_compact_text_format', 'isEnabled', true) ||
392
389
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
393
- expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) ? editorContentStyles.paragraphStylesOldWithScaledMargin : editorContentStyles.paragraphStylesOld, editorContentStyles.linkStyles, browser.safari && editorContentStyles.listsStylesSafariFix, editorExperiment('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesSyncedBlock, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && "", editorExperiment('platform_synced_block', true) ? editorContentStyles.pragmaticResizerStylesCodeBlockSyncedBlockPatch : editorContentStyles.pragmaticResizerStylesCodeBlockLegacy, editorExperiment('advanced_layouts', true) && expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticStylesLayoutFirstNodeResizeHandleFix, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesForTooltip, editorExperiment('platform_editor_preview_panel_responsiveness', true) && (editorExperiment('advanced_layouts', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)) && editorContentStyles.pragmaticResizerStylesWithReducedEditorGutter, editorContentStyles.aiPanelBaseStyles, isFirefox && editorContentStyles.aiPanelBaseFirefoxStyles, colorMode === 'dark' && editorContentStyles.aiPanelDarkStyles, colorMode === 'dark' && isFirefox && editorContentStyles.aiPanelDarkFirefoxStyles, viewMode === 'view' && editorContentStyles.layoutStylesForView, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutSelectedStylesForViewAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', false) && editorContentStyles.layoutSelectedStylesForViewNotAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveStylesForView, isComment && editorContentStyles.commentEditorStyles, isComment && editorContentStyles.tableCommentEditorStyles, isFullPage && editorContentStyles.fullPageEditorStyles, isFullPage && editorContentStyles.scrollbarStyles, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.firstCodeBlockWithNoMargin : editorContentStyles.firstCodeBlockWithNoMarginOld, editorContentStyles.firstBlockNodeStyles, editorContentStyles.mentionNodeStyles, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.mentionsSelectionStylesWithSearchMatch : editorContentStyles.mentionsSelectionStyles, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? editorContentStyles.scaledEmojiStyles : editorContentStyles.emojiStyles, contentMode === 'compact' && isDense && (expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.scaledEmojiDenseStyles, contentMode === 'compact' && isDense && (expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && !expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.emojiDenseStyles, editorContentStyles.panelViewStyles, editorContentStyles.mediaGroupStyles, editorContentStyles.mediaAlignmentStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) ? editorContentStyles.tableLayoutFixesWithFontSize : editorContentStyles.tableLayoutFixes, editorContentStyles.tableContainerStyles, editorContentStyles.tableSharedStyle, (browser.gecko || browser.ie || browser.mac && browser.chrome) && editorContentStyles.tableSharedStyleBackgroundClipFix, editorContentStyles.tableEmptyRowStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeStyles, editorContentStyles.hyperLinkFloatingToolbarStyles, editorContentStyles.selectionToolbarAnimationStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.blockquoteDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.textDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.listDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerDateStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.emojiDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mentionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.decisionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.statusDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerRuleStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mediaDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.nestedPanelDangerStyles, className]),
390
+ expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) ? editorContentStyles.paragraphStylesOldWithScaledMargin : editorContentStyles.paragraphStylesOld, editorContentStyles.linkStyles, browser.safari && editorContentStyles.listsStylesSafariFix, editorExperiment('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesSyncedBlock, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStyles, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorExperiment('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesCodeBlockSyncedBlockPatch, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && !editorExperiment('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesCodeBlockLegacy, editorExperiment('advanced_layouts', true) && expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticStylesLayoutFirstNodeResizeHandleFix, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesForTooltip, editorExperiment('platform_editor_preview_panel_responsiveness', true) && (editorExperiment('advanced_layouts', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)) && editorContentStyles.pragmaticResizerStylesWithReducedEditorGutter, editorContentStyles.aiPanelBaseStyles, isFirefox && editorContentStyles.aiPanelBaseFirefoxStyles, colorMode === 'dark' && editorContentStyles.aiPanelDarkStyles, colorMode === 'dark' && isFirefox && editorContentStyles.aiPanelDarkFirefoxStyles, viewMode === 'view' && editorContentStyles.layoutStylesForView, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutSelectedStylesForViewAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', false) && editorContentStyles.layoutSelectedStylesForViewNotAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveStylesForView, isComment && editorContentStyles.commentEditorStyles, isComment && editorContentStyles.tableCommentEditorStyles, isFullPage && editorContentStyles.fullPageEditorStyles, isFullPage && editorContentStyles.scrollbarStyles, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.firstCodeBlockWithNoMargin : editorContentStyles.firstCodeBlockWithNoMarginOld, editorContentStyles.firstBlockNodeStyles, editorContentStyles.mentionNodeStyles, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.mentionsSelectionStylesWithSearchMatch : editorContentStyles.mentionsSelectionStyles, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? editorContentStyles.scaledEmojiStyles : editorContentStyles.emojiStyles, contentMode === 'compact' && isDense && (expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.scaledEmojiDenseStyles, contentMode === 'compact' && isDense && (expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && !expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.emojiDenseStyles, editorContentStyles.panelViewStyles, editorContentStyles.mediaGroupStyles, editorContentStyles.mediaAlignmentStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) ? editorContentStyles.tableLayoutFixesWithFontSize : editorContentStyles.tableLayoutFixes, editorContentStyles.tableContainerStyles, editorContentStyles.tableSharedStyle, (browser.gecko || browser.ie || browser.mac && browser.chrome) && editorContentStyles.tableSharedStyleBackgroundClipFix, editorContentStyles.tableEmptyRowStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeStyles, editorContentStyles.hyperLinkFloatingToolbarStyles, editorContentStyles.selectionToolbarAnimationStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.blockquoteDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.textDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.listDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerDateStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.emojiDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mentionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.decisionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.statusDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerRuleStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mediaDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.nestedPanelDangerStyles, className]),
394
391
  ref: ref,
395
392
  "data-editor-scroll-container": isScrollable ? 'true' : undefined,
396
393
  "data-testid": "editor-content-container"
@@ -1,4 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2
4
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
3
5
  /**
4
6
  * @jsxRuntime classic
@@ -119,21 +121,19 @@ export var EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef(functio
119
121
  var isComment = appearance === 'comment';
120
122
  var isChromeless = appearance === 'chromeless';
121
123
  var baseFontSize = getBaseFontSize(appearance, contentMode);
122
- var style = editorExperiment('platform_editor_preview_panel_responsiveness', true, {
123
- exposure: true
124
- }) ? {
125
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
124
+
125
+ // Under the static-CSS experiment, --ak-editor-base-font-size is set earlier on the
126
+ // root div in editor-internal.tsx and inherited via the CSS cascade — do not set it here.
127
+ // For the legacy path, compute it from the Emotion theme as before.
128
+ var style = _objectSpread(_objectSpread({}, !expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true) && {
126
129
  '--ak-editor-base-font-size': "".concat(editorFontSize({
127
130
  theme: theme
128
131
  }), "px")
129
- } : {
130
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
131
- '--ak-editor-base-font-size': "".concat(editorFontSize({
132
- theme: theme
133
- }), "px"),
134
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
132
+ }), !editorExperiment('platform_editor_preview_panel_responsiveness', true, {
133
+ exposure: true
134
+ }) && {
135
135
  '--ak-editor--large-gutter-padding': "".concat(akEditorGutterPaddingDynamic(), "px")
136
- };
136
+ });
137
137
  var browser = getBrowserInfo();
138
138
  return jsx("div", {
139
139
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -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.1.0";
@@ -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
  */
@@ -3,5 +3,5 @@ type BaseThemeProps = {
3
3
  baseFontSize?: number;
4
4
  children: React.ReactNode;
5
5
  };
6
- export declare function BaseThemeWrapper({ baseFontSize, children }: BaseThemeProps): React.JSX.Element;
6
+ export declare const BaseThemeWrapper: React.ComponentType<BaseThemeProps>;
7
7
  export {};
@@ -9,6 +9,7 @@
9
9
  * Cleanup: delete this file once the experiment has shipped.
10
10
  */
11
11
  import type { ReactNode } from 'react';
12
- export declare const EditorInternalContainerCompiled: ({ children }: {
12
+ export declare const EditorInternalContainerCompiled: ({ children, fontSize, }: {
13
13
  children?: ReactNode;
14
+ fontSize?: number;
14
15
  }) => React.JSX.Element;
@@ -9,6 +9,7 @@
9
9
  * Cleanup: delete this file once the experiment has shipped.
10
10
  */
11
11
  import type { ReactNode } from 'react';
12
- export declare const EditorInternalContainerEmotion: ({ children }: {
12
+ export declare const EditorInternalContainerEmotion: ({ children, fontSize, }: {
13
13
  children?: ReactNode;
14
+ fontSize?: number;
14
15
  }) => React.JSX.Element;
@@ -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