@atlaskit/editor-core 214.2.4 → 215.0.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 (90) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cjs/create-editor/ReactEditorView.js +53 -57
  3. package/dist/cjs/index.js +0 -7
  4. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +2 -1
  5. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +38 -2
  6. package/dist/cjs/ui/EditorContentContainer/styles/tableStyles.js +10 -2
  7. package/dist/cjs/version-wrapper.js +1 -1
  8. package/dist/es2019/create-editor/ReactEditorView.js +36 -40
  9. package/dist/es2019/index.js +0 -8
  10. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +3 -2
  11. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +40 -3
  12. package/dist/es2019/ui/EditorContentContainer/styles/tableStyles.js +9 -1
  13. package/dist/es2019/version-wrapper.js +1 -1
  14. package/dist/esm/create-editor/ReactEditorView.js +53 -57
  15. package/dist/esm/index.js +0 -8
  16. package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +3 -2
  17. package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +39 -3
  18. package/dist/esm/ui/EditorContentContainer/styles/tableStyles.js +9 -1
  19. package/dist/esm/version-wrapper.js +1 -1
  20. package/dist/types/index.d.ts +0 -7
  21. package/dist/types/ui/EditorContentContainer/styles/tableStyles.d.ts +1 -0
  22. package/dist/types-ts4.5/index.d.ts +0 -7
  23. package/dist/types-ts4.5/ui/EditorContentContainer/styles/tableStyles.d.ts +1 -0
  24. package/package.json +13 -11
  25. package/create-editor-content-style/package.json +0 -17
  26. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +0 -43
  27. package/dist/cjs/ui/ContentStyles/ai-panels.js +0 -91
  28. package/dist/cjs/ui/ContentStyles/code-bidi-warning.js +0 -75
  29. package/dist/cjs/ui/ContentStyles/code-block.js +0 -28
  30. package/dist/cjs/ui/ContentStyles/date.js +0 -43
  31. package/dist/cjs/ui/ContentStyles/expand.js +0 -37
  32. package/dist/cjs/ui/ContentStyles/extension.js +0 -21
  33. package/dist/cjs/ui/ContentStyles/index.js +0 -220
  34. package/dist/cjs/ui/ContentStyles/layout.js +0 -80
  35. package/dist/cjs/ui/ContentStyles/media.js +0 -27
  36. package/dist/cjs/ui/ContentStyles/panel.js +0 -17
  37. package/dist/cjs/ui/ContentStyles/status.js +0 -158
  38. package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +0 -556
  39. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +0 -47
  40. package/dist/es2019/ui/ContentStyles/ai-panels.js +0 -168
  41. package/dist/es2019/ui/ContentStyles/code-bidi-warning.js +0 -68
  42. package/dist/es2019/ui/ContentStyles/code-block.js +0 -90
  43. package/dist/es2019/ui/ContentStyles/date.js +0 -57
  44. package/dist/es2019/ui/ContentStyles/expand.js +0 -142
  45. package/dist/es2019/ui/ContentStyles/extension.js +0 -236
  46. package/dist/es2019/ui/ContentStyles/index.js +0 -580
  47. package/dist/es2019/ui/ContentStyles/layout.js +0 -388
  48. package/dist/es2019/ui/ContentStyles/media.js +0 -207
  49. package/dist/es2019/ui/ContentStyles/panel.js +0 -66
  50. package/dist/es2019/ui/ContentStyles/status.js +0 -197
  51. package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +0 -551
  52. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +0 -36
  53. package/dist/esm/ui/ContentStyles/ai-panels.js +0 -87
  54. package/dist/esm/ui/ContentStyles/code-bidi-warning.js +0 -68
  55. package/dist/esm/ui/ContentStyles/code-block.js +0 -21
  56. package/dist/esm/ui/ContentStyles/date.js +0 -37
  57. package/dist/esm/ui/ContentStyles/expand.js +0 -31
  58. package/dist/esm/ui/ContentStyles/extension.js +0 -15
  59. package/dist/esm/ui/ContentStyles/index.js +0 -214
  60. package/dist/esm/ui/ContentStyles/layout.js +0 -74
  61. package/dist/esm/ui/ContentStyles/media.js +0 -21
  62. package/dist/esm/ui/ContentStyles/panel.js +0 -11
  63. package/dist/esm/ui/ContentStyles/status.js +0 -152
  64. package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +0 -548
  65. package/dist/types/nodeviews/getInlineNodeViewProducer.styles.d.ts +0 -2
  66. package/dist/types/ui/ContentStyles/ai-panels.d.ts +0 -8
  67. package/dist/types/ui/ContentStyles/code-bidi-warning.d.ts +0 -2
  68. package/dist/types/ui/ContentStyles/code-block.d.ts +0 -2
  69. package/dist/types/ui/ContentStyles/date.d.ts +0 -3
  70. package/dist/types/ui/ContentStyles/expand.d.ts +0 -2
  71. package/dist/types/ui/ContentStyles/extension.d.ts +0 -2
  72. package/dist/types/ui/ContentStyles/index.d.ts +0 -23
  73. package/dist/types/ui/ContentStyles/layout.d.ts +0 -8
  74. package/dist/types/ui/ContentStyles/media.d.ts +0 -2
  75. package/dist/types/ui/ContentStyles/panel.d.ts +0 -2
  76. package/dist/types/ui/ContentStyles/status.d.ts +0 -3
  77. package/dist/types/ui/ContentStyles/tasks-and-decisions.d.ts +0 -6
  78. package/dist/types-ts4.5/nodeviews/getInlineNodeViewProducer.styles.d.ts +0 -2
  79. package/dist/types-ts4.5/ui/ContentStyles/ai-panels.d.ts +0 -8
  80. package/dist/types-ts4.5/ui/ContentStyles/code-bidi-warning.d.ts +0 -2
  81. package/dist/types-ts4.5/ui/ContentStyles/code-block.d.ts +0 -2
  82. package/dist/types-ts4.5/ui/ContentStyles/date.d.ts +0 -3
  83. package/dist/types-ts4.5/ui/ContentStyles/expand.d.ts +0 -2
  84. package/dist/types-ts4.5/ui/ContentStyles/extension.d.ts +0 -2
  85. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +0 -23
  86. package/dist/types-ts4.5/ui/ContentStyles/layout.d.ts +0 -8
  87. package/dist/types-ts4.5/ui/ContentStyles/media.d.ts +0 -2
  88. package/dist/types-ts4.5/ui/ContentStyles/panel.d.ts +0 -2
  89. package/dist/types-ts4.5/ui/ContentStyles/status.d.ts +0 -3
  90. package/dist/types-ts4.5/ui/ContentStyles/tasks-and-decisions.d.ts +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 215.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8d49afb504f95`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d49afb504f95) -
8
+ Cleanup cc_editor_abort_ufo_load_on_editor_scroll
9
+ - [`8cfc5fed7dc74`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8cfc5fed7dc74) -
10
+ Cleanup annotations_defensive_node_name_calculations
11
+
12
+ ## 215.0.0
13
+
14
+ ### Major Changes
15
+
16
+ - [`be54c7e850cd3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/be54c7e850cd3) -
17
+ remove deprecated legacy content styles for editor
18
+
19
+ ### Patch Changes
20
+
21
+ - [`925eb6478e9a5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/925eb6478e9a5) -
22
+ Remove overflowY on tables to prevent Y axis scroll bar showing on Windows.
23
+ - [`30bb04cd8a8e9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/30bb04cd8a8e9) -
24
+ [ux] [ED-29292] Fix 2 issues with wrapped images in editor and renderer
25
+
26
+ 1. There is a gap between the first and the second wrapped images
27
+ 2. For wrapped images in layout, if image is the first node, it not horizontally aligned with the
28
+ following wrapped images
29
+
30
+ - Updated dependencies
31
+
3
32
  ## 214.2.4
4
33
 
5
34
  ### Patch Changes
@@ -503,71 +503,67 @@ function ReactEditorView(props) {
503
503
  var possibleListeners = _react.default.useRef([]);
504
504
  _react.default.useEffect(function () {
505
505
  return function () {
506
- if ((0, _platformFeatureFlags.fg)('cc_editor_abort_ufo_load_on_editor_scroll')) {
507
- if (scrollElement.current) {
508
- // eslint-disable-next-line react-hooks/exhaustive-deps
509
- var _iterator = _createForOfIteratorHelper(possibleListeners.current),
510
- _step;
511
- try {
512
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
513
- var _scrollElement$curren;
514
- var possibleListener = _step.value;
515
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
516
- (_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 || _scrollElement$curren.removeEventListener.apply(_scrollElement$curren, (0, _toConsumableArray2.default)(possibleListener));
517
- }
518
- } catch (err) {
519
- _iterator.e(err);
520
- } finally {
521
- _iterator.f();
506
+ if (scrollElement.current) {
507
+ // eslint-disable-next-line react-hooks/exhaustive-deps
508
+ var _iterator = _createForOfIteratorHelper(possibleListeners.current),
509
+ _step;
510
+ try {
511
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
512
+ var _scrollElement$curren;
513
+ var possibleListener = _step.value;
514
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
515
+ (_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 || _scrollElement$curren.removeEventListener.apply(_scrollElement$curren, (0, _toConsumableArray2.default)(possibleListener));
522
516
  }
517
+ } catch (err) {
518
+ _iterator.e(err);
519
+ } finally {
520
+ _iterator.f();
523
521
  }
524
- scrollElement.current = null;
525
522
  }
523
+ scrollElement.current = null;
526
524
  };
527
525
  }, []);
528
526
  var handleEditorViewRef = (0, _react.useCallback)(function (node) {
529
- if ((0, _platformFeatureFlags.fg)('cc_editor_abort_ufo_load_on_editor_scroll')) {
530
- if (node) {
531
- scrollElement.current = document.querySelector('[data-editor-scroll-container]');
532
- var cleanupListeners = function cleanupListeners() {
533
- // eslint-disable-next-line react-hooks/exhaustive-deps
534
- var _iterator2 = _createForOfIteratorHelper(possibleListeners.current),
535
- _step2;
536
- try {
537
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
538
- var _scrollElement$curren2;
539
- var possibleListener = _step2.value;
540
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
541
- (_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 || _scrollElement$curren2.removeEventListener.apply(_scrollElement$curren2, (0, _toConsumableArray2.default)(possibleListener));
542
- }
543
- } catch (err) {
544
- _iterator2.e(err);
545
- } finally {
546
- _iterator2.f();
527
+ if (node) {
528
+ scrollElement.current = document.querySelector('[data-editor-scroll-container]');
529
+ var cleanupListeners = function cleanupListeners() {
530
+ // eslint-disable-next-line react-hooks/exhaustive-deps
531
+ var _iterator2 = _createForOfIteratorHelper(possibleListeners.current),
532
+ _step2;
533
+ try {
534
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
535
+ var _scrollElement$curren2;
536
+ var possibleListener = _step2.value;
537
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
538
+ (_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 || _scrollElement$curren2.removeEventListener.apply(_scrollElement$curren2, (0, _toConsumableArray2.default)(possibleListener));
547
539
  }
548
- };
549
- if (scrollElement.current) {
550
- var wheelAbortHandler = function wheelAbortHandler() {
551
- var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
552
- if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
553
- (0, _interactionMetrics.abortAll)('new_interaction', "wheel-on-editor-element");
554
- }
555
- cleanupListeners();
556
- };
557
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
558
- scrollElement.current.addEventListener('wheel', wheelAbortHandler);
559
- possibleListeners.current.push(['wheel', wheelAbortHandler]);
560
- var scrollAbortHandler = function scrollAbortHandler() {
561
- var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
562
- if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
563
- (0, _interactionMetrics.abortAll)('new_interaction', "scroll-on-editor-element");
564
- }
565
- cleanupListeners();
566
- };
567
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
568
- scrollElement.current.addEventListener('scroll', scrollAbortHandler);
569
- possibleListeners.current.push(['scroll', scrollAbortHandler]);
540
+ } catch (err) {
541
+ _iterator2.e(err);
542
+ } finally {
543
+ _iterator2.f();
570
544
  }
545
+ };
546
+ if (scrollElement.current) {
547
+ var wheelAbortHandler = function wheelAbortHandler() {
548
+ var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
549
+ if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
550
+ (0, _interactionMetrics.abortAll)('new_interaction', "wheel-on-editor-element");
551
+ }
552
+ cleanupListeners();
553
+ };
554
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
555
+ scrollElement.current.addEventListener('wheel', wheelAbortHandler);
556
+ possibleListeners.current.push(['wheel', wheelAbortHandler]);
557
+ var scrollAbortHandler = function scrollAbortHandler() {
558
+ var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
559
+ if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
560
+ (0, _interactionMetrics.abortAll)('new_interaction', "scroll-on-editor-element");
561
+ }
562
+ cleanupListeners();
563
+ };
564
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
565
+ scrollElement.current.addEventListener('scroll', scrollAbortHandler);
566
+ possibleListeners.current.push(['scroll', scrollAbortHandler]);
571
567
  }
572
568
  }
573
569
  if (!viewRef.current && node) {
package/dist/cjs/index.js CHANGED
@@ -64,12 +64,6 @@ Object.defineProperty(exports, "WithHelpTrigger", {
64
64
  return _WithHelpTrigger.default;
65
65
  }
66
66
  });
67
- Object.defineProperty(exports, "createEditorContentStyle", {
68
- enumerable: true,
69
- get: function get() {
70
- return _ContentStyles.createEditorContentStyle;
71
- }
72
- });
73
67
  Object.defineProperty(exports, "createFeatureFlagsFromProps", {
74
68
  enumerable: true,
75
69
  get: function get() {
@@ -125,6 +119,5 @@ var _getNodesCount = require("./utils/getNodesCount");
125
119
  var _measureEnum = _interopRequireDefault(require("./utils/performance/measure-enum"));
126
120
  var _featureFlagsFromProps = require("./utils/feature-flags-from-props");
127
121
  var _actions = _interopRequireDefault(require("./actions"));
128
- var _ContentStyles = require("./ui/ContentStyles");
129
122
  var _createPluginsList = require("./create-editor/create-plugins-list");
130
123
  var _ReactEditorView = require("./create-editor/ReactEditorView");
@@ -13,6 +13,7 @@ var _reactIntlNext = require("react-intl-next");
13
13
  var _contextPanel = require("@atlaskit/editor-common/context-panel");
14
14
  var _toolbar = require("@atlaskit/editor-common/toolbar");
15
15
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
18
  var _toolbar2 = require("../../../utils/toolbar");
18
19
  var _Toolbar = require("../../Toolbar/Toolbar");
@@ -114,7 +115,7 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
114
115
  }, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/_react.default.createElement("div", {
115
116
  "data-testid": 'before-primary-toolbar-components-plugin',
116
117
  className: (0, _runtime.ax)([styles.beforePrimaryToolbarComponents])
117
- }, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents))) : toolbarDockingPosition !== 'none' && components && (0, _toolbar2.isToolbar)(toolbar) && (!(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
118
+ }, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents)), (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_patch_7') && /*#__PURE__*/_react.default.createElement(_ToolbarPortal.ToolbarPortalMountPoint, null)) : toolbarDockingPosition !== 'none' && components && (0, _toolbar2.isToolbar)(toolbar) && (!(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
118
119
  toolbar: toolbar,
119
120
  components: components,
120
121
  editorView: editorView,
@@ -5,9 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
8
9
  var _react = _interopRequireDefault(require("react"));
9
10
  var _react2 = require("@emotion/react");
10
11
  var _browser = require("@atlaskit/editor-common/browser");
12
+ var _styles = require("@atlaskit/editor-common/styles");
11
13
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
15
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
@@ -74,6 +76,34 @@ var _whitespaceStyles = require("./styles/whitespaceStyles");
74
76
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
75
77
 
76
78
  var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
79
+ var alignMultipleWrappedImageInLayoutStyles = {
80
+ '.ProseMirror [data-layout-section] [data-layout-column] > div': {
81
+ // apply marginTop to wrapped mediaSingle that has preceding wrapped mediaSingle (even when there's gap cursor in between them)
82
+ // Given the first wrapped mediaSingle in layout has 0 marginTop, this is needed to make sure fellow wrapped mediaSingle align with it horizontally
83
+ '.mediaSingleView-content-wrap[layout^=wrap] + .mediaSingleView-content-wrap[layout^=wrap], .mediaSingleView-content-wrap[layout^=wrap] + .ProseMirror-gapcursor + .mediaSingleView-content-wrap[layout^=wrap]': {
84
+ '.rich-media-item': {
85
+ marginTop: 0
86
+ }
87
+ },
88
+ // Due to the above rule, wrapped mediaSingle (not the first node in layout) that are followed by wrapped mediaSingle should also have 0 marginTop
89
+ // so it's aligned with the following wrapped mediaSingle
90
+ '.mediaSingleView-content-wrap[layout^=wrap]:has( + .mediaSingleView-content-wrap[layout^=wrap])': {
91
+ '.rich-media-item': {
92
+ marginTop: 0
93
+ }
94
+ }
95
+ }
96
+ };
97
+ var firstWrappedMediaStyles = {
98
+ '.ProseMirror': {
99
+ // Remove gap between first wrapped mediaSingle and its fellow wrapped mediaSingle
100
+ "& [layout^='wrap-']:has(+ [layout^='wrap-']), & [layout^='wrap-']:has(+ .ProseMirror-gapcursor + [layout^='wrap-'])": (0, _defineProperty2.default)({}, "& .".concat(_styles.richMediaClassName), {
101
+ marginLeft: 0,
102
+ marginRight: 0
103
+ })
104
+ }
105
+ };
106
+
77
107
  /**
78
108
  * EditorContentStyles is a wrapper component that applies styles to its children
79
109
  * based on the provided feature flags, view mode, and other props.
@@ -183,6 +213,8 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
183
213
  _rule.ruleStyles,
184
214
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
185
215
  _mediaStyles.mediaStyles,
216
+ // merge firstWrappedMediaStyles with mediaStyles when clean up platform_editor_fix_media_in_renderer
217
+ (0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles,
186
218
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
187
219
  _telepointerStyles.telepointerStyle, /* This needs to be after telepointer styles as some overlapping rules have equal specificity, and so the order is significant */
188
220
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -264,7 +296,9 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
264
296
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
265
297
  _resizerStyles.resizerStyles,
266
298
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
267
- _layout.layoutBaseStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_synced_block', 'isEnabled', true) &&
299
+ _layout.layoutBaseStyles,
300
+ // merge alignMultipleWrappedImageInLayoutStyles with layoutBaseStyles when clean up platform_editor_fix_media_in_renderer
301
+ (0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && alignMultipleWrappedImageInLayoutStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_synced_block', 'isEnabled', true) &&
268
302
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
269
303
  _syncBlockStyles.syncBlockStyles,
270
304
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -366,10 +400,12 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
366
400
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
367
401
  _mediaStyles.mediaAlignmentStyles,
368
402
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
369
- _tableStyles.tableLayoutFixes, (0, _expValEquals.expValEquals)('platform_editor_table_container_width_fix', 'isEnabled', true) &&
403
+ _tableStyles.tableLayoutFixes,
370
404
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
371
405
  _tableStyles.tableContainerStyles,
372
406
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
407
+ !(0, _platformFeatureFlags.fg)('platform_editor_table_container_y_overflow_fix') && _tableStyles.tableContainerOverflowY,
408
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
373
409
  _link.hyperLinkFloatingToolbarStyles,
374
410
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
375
411
  !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _link.linkLegacyIconStylesFix,
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.tableLayoutFixes = exports.tableContainerStyles = exports.tableCommentEditorStyles = exports.tableCommentEditorMarginOverride = void 0;
7
+ exports.tableLayoutFixes = exports.tableContainerStyles = exports.tableContainerOverflowY = exports.tableCommentEditorStyles = exports.tableCommentEditorMarginOverride = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("@emotion/react");
10
10
  var _scrollbarStyles = require("./scrollbarStyles");
@@ -41,7 +41,6 @@ var tableContainerStyles = exports.tableContainerStyles = (0, _react.css)({
41
41
  '.ProseMirror .pm-table-wrapper': {
42
42
  maxWidth: '100%',
43
43
  overflowX: 'auto',
44
- overflowY: 'visible',
45
44
  // Ensure the wrapper doesn't grow beyond its container
46
45
  width: '100%',
47
46
  boxSizing: 'border-box'
@@ -55,4 +54,13 @@ var tableContainerStyles = exports.tableContainerStyles = (0, _react.css)({
55
54
  // Ensure tables can be scrolled horizontally if needed
56
55
  minWidth: 'auto'
57
56
  }
57
+ });
58
+
59
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
60
+ var tableContainerOverflowY = exports.tableContainerOverflowY = (0, _react.css)({
61
+ /* Fix for HOT-119925: Ensure table containers have proper width constraints and overflow handling */
62
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
63
+ '.ProseMirror .pm-table-wrapper': {
64
+ overflowY: 'visible'
65
+ }
58
66
  });
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "0.0.0-development";
8
+ var version = exports.version = "215.0.0";
@@ -470,53 +470,49 @@ export function ReactEditorView(props) {
470
470
  const possibleListeners = React.useRef([]);
471
471
  React.useEffect(() => {
472
472
  return () => {
473
- if (fg('cc_editor_abort_ufo_load_on_editor_scroll')) {
474
- if (scrollElement.current) {
475
- // eslint-disable-next-line react-hooks/exhaustive-deps
476
- for (const possibleListener of possibleListeners.current) {
477
- var _scrollElement$curren;
478
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
479
- (_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 ? void 0 : _scrollElement$curren.removeEventListener(...possibleListener);
480
- }
473
+ if (scrollElement.current) {
474
+ // eslint-disable-next-line react-hooks/exhaustive-deps
475
+ for (const possibleListener of possibleListeners.current) {
476
+ var _scrollElement$curren;
477
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
478
+ (_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 ? void 0 : _scrollElement$curren.removeEventListener(...possibleListener);
481
479
  }
482
- scrollElement.current = null;
483
480
  }
481
+ scrollElement.current = null;
484
482
  };
485
483
  }, []);
486
484
  const handleEditorViewRef = useCallback(node => {
487
- if (fg('cc_editor_abort_ufo_load_on_editor_scroll')) {
488
- if (node) {
489
- scrollElement.current = document.querySelector('[data-editor-scroll-container]');
490
- const cleanupListeners = () => {
491
- // eslint-disable-next-line react-hooks/exhaustive-deps
492
- for (const possibleListener of possibleListeners.current) {
493
- var _scrollElement$curren2;
494
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
495
- (_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 ? void 0 : _scrollElement$curren2.removeEventListener(...possibleListener);
496
- }
497
- };
498
- if (scrollElement.current) {
499
- const wheelAbortHandler = () => {
500
- const activeInteraction = getActiveInteraction();
501
- if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
502
- abortAll('new_interaction', `wheel-on-editor-element`);
503
- }
504
- cleanupListeners();
505
- };
485
+ if (node) {
486
+ scrollElement.current = document.querySelector('[data-editor-scroll-container]');
487
+ const cleanupListeners = () => {
488
+ // eslint-disable-next-line react-hooks/exhaustive-deps
489
+ for (const possibleListener of possibleListeners.current) {
490
+ var _scrollElement$curren2;
506
491
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
507
- scrollElement.current.addEventListener('wheel', wheelAbortHandler);
508
- possibleListeners.current.push(['wheel', wheelAbortHandler]);
509
- const scrollAbortHandler = () => {
510
- const activeInteraction = getActiveInteraction();
511
- if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
512
- abortAll('new_interaction', `scroll-on-editor-element`);
513
- }
514
- cleanupListeners();
515
- };
516
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
517
- scrollElement.current.addEventListener('scroll', scrollAbortHandler);
518
- possibleListeners.current.push(['scroll', scrollAbortHandler]);
492
+ (_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 ? void 0 : _scrollElement$curren2.removeEventListener(...possibleListener);
519
493
  }
494
+ };
495
+ if (scrollElement.current) {
496
+ const wheelAbortHandler = () => {
497
+ const activeInteraction = getActiveInteraction();
498
+ if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
499
+ abortAll('new_interaction', `wheel-on-editor-element`);
500
+ }
501
+ cleanupListeners();
502
+ };
503
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
504
+ scrollElement.current.addEventListener('wheel', wheelAbortHandler);
505
+ possibleListeners.current.push(['wheel', wheelAbortHandler]);
506
+ const scrollAbortHandler = () => {
507
+ const activeInteraction = getActiveInteraction();
508
+ if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
509
+ abortAll('new_interaction', `scroll-on-editor-element`);
510
+ }
511
+ cleanupListeners();
512
+ };
513
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
514
+ scrollElement.current.addEventListener('scroll', scrollAbortHandler);
515
+ possibleListeners.current.push(['scroll', scrollAbortHandler]);
520
516
  }
521
517
  }
522
518
  if (!viewRef.current && node) {
@@ -36,13 +36,5 @@ export { getNodesCount } from './utils/getNodesCount';
36
36
  export { default as measurements } from './utils/performance/measure-enum';
37
37
  export { createFeatureFlagsFromProps } from './utils/feature-flags-from-props';
38
38
  export { default as EditorActions } from './actions';
39
- export {
40
- // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
41
- /**
42
- * @deprecated
43
- * DO NOT USE THIS WILL BE REMOVED SOON.
44
- * use this instead: packages/editor/editor-core/src/ui/EditorContentContainer.tsx
45
- */
46
- createEditorContentStyle } from './ui/ContentStyles';
47
39
  export { getDefaultPresetOptionsFromEditorProps } from './create-editor/create-plugins-list';
48
40
  export { ReactEditorView } from './create-editor/ReactEditorView';
@@ -6,10 +6,11 @@ import { useIntl } from 'react-intl-next';
6
6
  import { ContextPanelConsumer } from '@atlaskit/editor-common/context-panel';
7
7
  import { TOOLBARS } from '@atlaskit/editor-common/toolbar';
8
8
  import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
11
  import { isToolbar } from '../../../utils/toolbar';
11
12
  import { ToolbarNext } from '../../Toolbar/Toolbar';
12
- import { useToolbarPortal } from '../../Toolbar/ToolbarPortal';
13
+ import { ToolbarPortalMountPoint, useToolbarPortal } from '../../Toolbar/ToolbarPortal';
13
14
  const styles = {
14
15
  mainToolbarIconBefore: "_19pkpxbi _2hwxpxbi _otyrpxbi",
15
16
  mainToolbarIconBeforeNew: "_4cvr1h6o _1e0c1txw",
@@ -109,7 +110,7 @@ export const FullPageToolbarNext = ({
109
110
  }, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/React.createElement("div", {
110
111
  "data-testid": 'before-primary-toolbar-components-plugin',
111
112
  className: ax([styles.beforePrimaryToolbarComponents])
112
- }, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents))) : toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && (!expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/React.createElement(ToolbarNext, {
113
+ }, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents)), fg('platform_editor_toolbar_aifc_patch_7') && /*#__PURE__*/React.createElement(ToolbarPortalMountPoint, null)) : toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && (!expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/React.createElement(ToolbarNext, {
113
114
  toolbar: toolbar,
114
115
  components: components,
115
116
  editorView: editorView,
@@ -9,6 +9,7 @@ import React from 'react';
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { jsx, useTheme } from '@emotion/react';
11
11
  import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
12
+ import { richMediaClassName } from '@atlaskit/editor-common/styles';
12
13
  import { akEditorGutterPaddingDynamic, editorFontSize } from '@atlaskit/editor-shared-styles';
13
14
  import { fg } from '@atlaskit/platform-feature-flags';
14
15
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -58,7 +59,7 @@ import { shadowStyles } from './styles/shadowStyles';
58
59
  import { editorControlsSmartCardStyles, linkingVisualRefreshV1Styles, smartCardStyles, smartCardStylesWithSearchMatch, smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, smartLinksInLivePagesStyles } from './styles/smartCardStyles';
59
60
  import { statusDangerStyles, statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_fg_platform_component_visual_refresh_with_search_match, statusStylesMixin_without_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match } from './styles/statusStyles';
60
61
  import { syncBlockStyles } from './styles/syncBlockStyles';
61
- import { tableCommentEditorStyles, tableContainerStyles, tableLayoutFixes } from './styles/tableStyles';
62
+ import { tableCommentEditorStyles, tableContainerOverflowY, tableContainerStyles, tableLayoutFixes } from './styles/tableStyles';
62
63
  import { decisionStyles, tasksAndDecisionsStyles, decisionIconWithVisualRefresh, decisionIconWithoutVisualRefresh, taskItemStyles, taskItemStylesWithBlockTaskItem, decisionDangerStyles } from './styles/tasksAndDecisionsStyles';
63
64
  import { telepointerColorAndCommonStyle, telepointerStyle } from './styles/telepointerStyles';
64
65
  import { textColorStyles } from './styles/textColorStyles';
@@ -66,6 +67,36 @@ import { textHighlightStyle } from './styles/textHighlightStyles';
66
67
  import { unsupportedStyles } from './styles/unsupportedStyles';
67
68
  import { whitespaceStyles } from './styles/whitespaceStyles';
68
69
  const isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
70
+ const alignMultipleWrappedImageInLayoutStyles = {
71
+ '.ProseMirror [data-layout-section] [data-layout-column] > div': {
72
+ // apply marginTop to wrapped mediaSingle that has preceding wrapped mediaSingle (even when there's gap cursor in between them)
73
+ // Given the first wrapped mediaSingle in layout has 0 marginTop, this is needed to make sure fellow wrapped mediaSingle align with it horizontally
74
+ '.mediaSingleView-content-wrap[layout^=wrap] + .mediaSingleView-content-wrap[layout^=wrap], .mediaSingleView-content-wrap[layout^=wrap] + .ProseMirror-gapcursor + .mediaSingleView-content-wrap[layout^=wrap]': {
75
+ '.rich-media-item': {
76
+ marginTop: 0
77
+ }
78
+ },
79
+ // Due to the above rule, wrapped mediaSingle (not the first node in layout) that are followed by wrapped mediaSingle should also have 0 marginTop
80
+ // so it's aligned with the following wrapped mediaSingle
81
+ '.mediaSingleView-content-wrap[layout^=wrap]:has( + .mediaSingleView-content-wrap[layout^=wrap])': {
82
+ '.rich-media-item': {
83
+ marginTop: 0
84
+ }
85
+ }
86
+ }
87
+ };
88
+ const firstWrappedMediaStyles = {
89
+ '.ProseMirror': {
90
+ // Remove gap between first wrapped mediaSingle and its fellow wrapped mediaSingle
91
+ "& [layout^='wrap-']:has(+ [layout^='wrap-']), & [layout^='wrap-']:has(+ .ProseMirror-gapcursor + [layout^='wrap-'])": {
92
+ [`& .${richMediaClassName}`]: {
93
+ marginLeft: 0,
94
+ marginRight: 0
95
+ }
96
+ }
97
+ }
98
+ };
99
+
69
100
  /**
70
101
  * EditorContentStyles is a wrapper component that applies styles to its children
71
102
  * based on the provided feature flags, view mode, and other props.
@@ -178,6 +209,8 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
178
209
  ruleStyles,
179
210
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
180
211
  mediaStyles,
212
+ // merge firstWrappedMediaStyles with mediaStyles when clean up platform_editor_fix_media_in_renderer
213
+ fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles,
181
214
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
182
215
  telepointerStyle, /* This needs to be after telepointer styles as some overlapping rules have equal specificity, and so the order is significant */
183
216
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -259,7 +292,9 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
259
292
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
260
293
  resizerStyles,
261
294
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
262
- layoutBaseStyles, expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) &&
295
+ layoutBaseStyles,
296
+ // merge alignMultipleWrappedImageInLayoutStyles with layoutBaseStyles when clean up platform_editor_fix_media_in_renderer
297
+ fg('platform_editor_fix_media_in_renderer') && alignMultipleWrappedImageInLayoutStyles, expValEqualsNoExposure('platform_synced_block', 'isEnabled', true) &&
263
298
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
264
299
  syncBlockStyles,
265
300
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -361,10 +396,12 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
361
396
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
362
397
  mediaAlignmentStyles,
363
398
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
364
- tableLayoutFixes, expValEquals('platform_editor_table_container_width_fix', 'isEnabled', true) &&
399
+ tableLayoutFixes,
365
400
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
366
401
  tableContainerStyles,
367
402
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
403
+ !fg('platform_editor_table_container_y_overflow_fix') && tableContainerOverflowY,
404
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
368
405
  hyperLinkFloatingToolbarStyles,
369
406
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
370
407
  !fg('platform-visual-refresh-icons') && linkLegacyIconStylesFix,
@@ -37,7 +37,6 @@ export const tableContainerStyles = css({
37
37
  '.ProseMirror .pm-table-wrapper': {
38
38
  maxWidth: '100%',
39
39
  overflowX: 'auto',
40
- overflowY: 'visible',
41
40
  // Ensure the wrapper doesn't grow beyond its container
42
41
  width: '100%',
43
42
  boxSizing: 'border-box'
@@ -51,4 +50,13 @@ export const tableContainerStyles = css({
51
50
  // Ensure tables can be scrolled horizontally if needed
52
51
  minWidth: 'auto'
53
52
  }
53
+ });
54
+
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
56
+ export const tableContainerOverflowY = css({
57
+ /* Fix for HOT-119925: Ensure table containers have proper width constraints and overflow handling */
58
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
59
+ '.ProseMirror .pm-table-wrapper': {
60
+ overflowY: 'visible'
61
+ }
54
62
  });
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "0.0.0-development";
2
+ export const version = "215.0.0";