@atlaskit/editor-core 207.21.1 → 207.21.3

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 207.21.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#172260](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172260)
8
+ [`ab178138e93db`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ab178138e93db) -
9
+ revert list layout shift fix
10
+ - Updated dependencies
11
+
12
+ ## 207.21.2
13
+
14
+ ### Patch Changes
15
+
16
+ - [#171657](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/171657)
17
+ [`cb6c865095af1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cb6c865095af1) -
18
+ Clean-up platform_editor_lcm_nested_panel_icon_fix
19
+ - Updated dependencies
20
+
3
21
  ## 207.21.1
4
22
 
5
23
  ### Patch Changes
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.ReactEditorView = ReactEditorView;
9
9
  exports.default = void 0;
10
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
11
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
12
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
13
  var _react = _interopRequireWildcard(require("react"));
@@ -27,6 +28,7 @@ var _document = require("@atlaskit/editor-common/utils/document");
27
28
  var _state2 = require("@atlaskit/editor-prosemirror/state");
28
29
  var _view = require("@atlaskit/editor-prosemirror/view");
29
30
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
31
+ var _interactionMetrics = require("@atlaskit/react-ufo/interaction-metrics");
30
32
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
31
33
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
32
34
  var _useProviders = require("../composable-editor/hooks/useProviders");
@@ -45,6 +47,9 @@ var _handleEditorFocus = require("./ReactEditorView/handleEditorFocus");
45
47
  var _useDispatchTransaction = require("./ReactEditorView/useDispatchTransaction");
46
48
  var _useFireFullWidthEvent = require("./ReactEditorView/useFireFullWidthEvent");
47
49
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
50
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
51
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
52
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
48
53
  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; }
49
54
  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) { (0, _defineProperty2.default)(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; }
50
55
  var EDIT_AREA_ID = 'ak-editor-textarea';
@@ -498,7 +503,77 @@ function ReactEditorView(props) {
498
503
  }
499
504
  }
500
505
  }, [editorView, shouldFocus, __livePage, mitigateScrollJump]);
506
+ var scrollElement = _react.default.useRef();
507
+ var possibleListeners = _react.default.useRef([]);
508
+ _react.default.useEffect(function () {
509
+ return function () {
510
+ if ((0, _platformFeatureFlags.fg)('cc_editor_abort_ufo_load_on_editor_scroll')) {
511
+ if (scrollElement.current) {
512
+ // eslint-disable-next-line react-hooks/exhaustive-deps
513
+ var _iterator = _createForOfIteratorHelper(possibleListeners.current),
514
+ _step;
515
+ try {
516
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
517
+ var _scrollElement$curren;
518
+ var possibleListener = _step.value;
519
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
520
+ (_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 || _scrollElement$curren.removeEventListener.apply(_scrollElement$curren, (0, _toConsumableArray2.default)(possibleListener));
521
+ }
522
+ } catch (err) {
523
+ _iterator.e(err);
524
+ } finally {
525
+ _iterator.f();
526
+ }
527
+ }
528
+ scrollElement.current = null;
529
+ }
530
+ };
531
+ }, []);
501
532
  var handleEditorViewRef = (0, _react.useCallback)(function (node) {
533
+ if ((0, _platformFeatureFlags.fg)('cc_editor_abort_ufo_load_on_editor_scroll')) {
534
+ if (node) {
535
+ scrollElement.current = document.querySelector('[data-editor-scroll-container]');
536
+ var cleanupListeners = function cleanupListeners() {
537
+ // eslint-disable-next-line react-hooks/exhaustive-deps
538
+ var _iterator2 = _createForOfIteratorHelper(possibleListeners.current),
539
+ _step2;
540
+ try {
541
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
542
+ var _scrollElement$curren2;
543
+ var possibleListener = _step2.value;
544
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
545
+ (_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 || _scrollElement$curren2.removeEventListener.apply(_scrollElement$curren2, (0, _toConsumableArray2.default)(possibleListener));
546
+ }
547
+ } catch (err) {
548
+ _iterator2.e(err);
549
+ } finally {
550
+ _iterator2.f();
551
+ }
552
+ };
553
+ if (scrollElement.current) {
554
+ var wheelAbortHandler = function wheelAbortHandler() {
555
+ var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
556
+ if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
557
+ (0, _interactionMetrics.abortAll)('new_interaction', "wheel-on-editor-element");
558
+ }
559
+ cleanupListeners();
560
+ };
561
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
562
+ scrollElement.current.addEventListener('wheel', wheelAbortHandler);
563
+ possibleListeners.current.push(['wheel', wheelAbortHandler]);
564
+ var scrollAbortHandler = function scrollAbortHandler() {
565
+ var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
566
+ if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
567
+ (0, _interactionMetrics.abortAll)('new_interaction', "scroll-on-editor-element");
568
+ }
569
+ cleanupListeners();
570
+ };
571
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
572
+ scrollElement.current.addEventListener('scroll', scrollAbortHandler);
573
+ possibleListeners.current.push(['scroll', scrollAbortHandler]);
574
+ }
575
+ }
576
+ }
502
577
  if (!viewRef.current && node) {
503
578
  // make sure this doesn't expose the experiment
504
579
  if ((0, _experiments.editorExperiment)('platform_editor_nodevisibility', true, {
@@ -509,8 +584,8 @@ function ReactEditorView(props) {
509
584
  var view = createEditorView(node);
510
585
  if ((0, _platformFeatureFlags.fg)('platform_editor_reduce_scroll_jump_on_editor_start')) {
511
586
  if (mitigateScrollJump) {
512
- var scrollElement = document.querySelector('[data-editor-scroll-container]');
513
- scrollElement === null || scrollElement === void 0 || scrollElement.scrollTo({
587
+ var _scrollElement = document.querySelector('[data-editor-scroll-container]');
588
+ _scrollElement === null || _scrollElement === void 0 || _scrollElement.scrollTo({
514
589
  top: originalScrollToRestore.current,
515
590
  behavior: 'instant'
516
591
  });
@@ -170,13 +170,6 @@ var legacyContentStyles = function legacyContentStyles(props) {
170
170
  exposure: false
171
171
  }) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? (0, _status.vanillaStatusStyles)() : null, (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? (0, _styles.getSmartCardSharedStyles)() : _styles.smartCardSharedStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? _date.dateVanillaStyles : null, _date.dateStyles, (0, _styles.embedCardStyles)(), _styles.unsupportedStyles, _styles.resizerStyles, (0, _styles.pragmaticResizerStyles)(), (0, _styles.pragmaticStylesLayoutFirstNodeResizeHandleFix)(), (0, _styles.pragmaticResizerStylesForTooltip)(), (0, _aiPanels.aiPanelStyles)(props.colorMode), firstBlockNodeStylesNew, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
172
172
  };
173
- var listLayoutShiftFix = (0, _react2.css)({
174
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
175
- '.ProseMirror ul, .ProseMirror ol': {
176
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
177
- marginTop: '10px'
178
- }
179
- });
180
173
  var createEditorContentStyle = exports.createEditorContentStyle = function createEditorContentStyle(styles) {
181
174
  return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
182
175
  var className = props.className,
@@ -209,7 +202,7 @@ var createEditorContentStyle = exports.createEditorContentStyle = function creat
209
202
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
210
203
  className: className,
211
204
  ref: ref,
212
- css: [memoizedStyle, styles, (0, _platformFeatureFlags.fg)('platform_editor_ssr_fix_lists') && listLayoutShiftFix],
205
+ css: [memoizedStyle, styles],
213
206
  "data-testid": "editor-content-container"
214
207
  }, children);
215
208
  });
@@ -162,11 +162,9 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
162
162
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
163
163
  _panelStyles.panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') &&
164
164
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
165
- _panelStyles.panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, (0, _platformFeatureFlags.fg)('platform_editor_lcm_nested_panel_icon_fix') ?
165
+ _panelStyles.panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes,
166
166
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
167
- _panelStyles.panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix :
168
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
169
- _panelStyles.panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix,
167
+ _panelStyles.panelStylesMixin,
170
168
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
171
169
  _mentions.mentionsStyles,
172
170
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -308,9 +306,7 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
308
306
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
309
307
  isFullPage && _fullPageEditorStyles.fullPageEditorStyles,
310
308
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
311
- isFullPage && _scrollbarStyles.scrollbarStyles,
312
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
313
- (0, _platformFeatureFlags.fg)('platform_editor_ssr_fix_lists') && _list.listLayoutShiftFix, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ?
309
+ isFullPage && _scrollbarStyles.scrollbarStyles, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ?
314
310
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
315
311
  _codeBlockStyles.firstCodeBlockWithNoMargin :
316
312
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -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.listsStylesSafariFix = exports.listsStyles = exports.listLayoutShiftFix = void 0;
7
+ exports.listsStylesSafariFix = exports.listsStyles = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("@emotion/react");
10
10
  // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
@@ -147,13 +147,4 @@ var listsStylesSafariFix = exports.listsStylesSafariFix = (0, _react.css)((0, _d
147
147
  }), ".ProseMirror:not(.".concat(BLOCK_CARD_CONTAINER, ") > li > p:first-child, .ProseMirror:not(.").concat(BLOCK_CARD_CONTAINER, ") > li > .code-block:first-child, .ProseMirror:not(.").concat(BLOCK_CARD_CONTAINER, ") > li > .ProseMirror-gapcursor:first-child + .code-block"), {
148
148
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
149
149
  marginTop: "-".concat(akEditorLineHeight, "em !important")
150
- }));
151
-
152
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
153
- var listLayoutShiftFix = exports.listLayoutShiftFix = (0, _react.css)({
154
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
155
- '.ProseMirror ul, .ProseMirror ol': {
156
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
157
- marginTop: '10px'
158
- }
159
- });
150
+ }));
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.panelViewStyles = exports.panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix = exports.panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes = exports.panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix = exports.panelStylesMixin_fg_platform_editor_add_border_for_nested_panel = exports.panelStyles = void 0;
6
+ exports.panelViewStyles = exports.panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes = exports.panelStylesMixin_fg_platform_editor_add_border_for_nested_panel = exports.panelStylesMixin = exports.panelStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
9
9
 
@@ -233,7 +233,7 @@ var panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes = exports.pane
233
233
  });
234
234
 
235
235
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
236
- var panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix = exports.panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix = (0, _react.css)({
236
+ var panelStylesMixin = exports.panelStylesMixin = (0, _react.css)({
237
237
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
238
238
  '.ProseMirror': {
239
239
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
@@ -290,64 +290,6 @@ var panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix = exports.pane
290
290
  }
291
291
  });
292
292
 
293
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
294
- var panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix = exports.panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix = (0, _react.css)({
295
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
296
- '.ProseMirror': {
297
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
298
- '.ak-editor-panel': {
299
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
300
- '&[data-panel-type="info"]': {
301
- // getIconStyles(PanelType.INFO),
302
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
303
- '.ak-editor-panel__icon': {
304
- color: "var(--ds-icon-information, #1D7AFC)"
305
- }
306
- },
307
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
308
- '&[data-panel-type="note"]': {
309
- // getIconStyles(PanelType.NOTE),
310
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
311
- '.ak-editor-panel__icon': {
312
- color: "var(--ds-icon-discovery, #8270DB)"
313
- }
314
- },
315
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
316
- '&[data-panel-type="tip"]': {
317
- // getIconStyles(PanelType.TIP),
318
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
319
- '.ak-editor-panel__icon': {
320
- color: "var(--ds-icon-success, #22A06B)"
321
- }
322
- },
323
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
324
- '&[data-panel-type="warning"]': {
325
- // getIconStyles(PanelType.WARNING),
326
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
327
- '.ak-editor-panel__icon': {
328
- color: "var(--ds-icon-warning, #E56910)"
329
- }
330
- },
331
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
332
- '&[data-panel-type="error"]': {
333
- // getIconStyles(PanelType.ERROR),
334
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
335
- '.ak-editor-panel__icon': {
336
- color: "var(--ds-icon-danger, #C9372C)"
337
- }
338
- },
339
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
340
- '&[data-panel-type="success"]': {
341
- // getIconStyles(PanelType.SUCCESS),
342
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
343
- '.ak-editor-panel__icon': {
344
- color: "var(--ds-icon-success, #22A06B)"
345
- }
346
- }
347
- }
348
- }
349
- });
350
-
351
293
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
352
294
  var panelViewStyles = exports.panelViewStyles = (0, _react.css)({
353
295
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
@@ -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 = "207.21.0";
8
+ var version = exports.version = "207.21.2";
@@ -16,6 +16,7 @@ import { isEmptyDocument } from '@atlaskit/editor-common/utils/document';
16
16
  import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
17
17
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
18
18
  import { fg } from '@atlaskit/platform-feature-flags';
19
+ import { abortAll, getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
19
20
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
20
21
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
21
22
  import { useProviders } from '../composable-editor/hooks/useProviders';
@@ -469,7 +470,59 @@ export function ReactEditorView(props) {
469
470
  }
470
471
  }
471
472
  }, [editorView, shouldFocus, __livePage, mitigateScrollJump]);
473
+ const scrollElement = React.useRef();
474
+ const possibleListeners = React.useRef([]);
475
+ React.useEffect(() => {
476
+ return () => {
477
+ if (fg('cc_editor_abort_ufo_load_on_editor_scroll')) {
478
+ if (scrollElement.current) {
479
+ // eslint-disable-next-line react-hooks/exhaustive-deps
480
+ for (const possibleListener of possibleListeners.current) {
481
+ var _scrollElement$curren;
482
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
483
+ (_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 ? void 0 : _scrollElement$curren.removeEventListener(...possibleListener);
484
+ }
485
+ }
486
+ scrollElement.current = null;
487
+ }
488
+ };
489
+ }, []);
472
490
  const handleEditorViewRef = useCallback(node => {
491
+ if (fg('cc_editor_abort_ufo_load_on_editor_scroll')) {
492
+ if (node) {
493
+ scrollElement.current = document.querySelector('[data-editor-scroll-container]');
494
+ const cleanupListeners = () => {
495
+ // eslint-disable-next-line react-hooks/exhaustive-deps
496
+ for (const possibleListener of possibleListeners.current) {
497
+ var _scrollElement$curren2;
498
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
499
+ (_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 ? void 0 : _scrollElement$curren2.removeEventListener(...possibleListener);
500
+ }
501
+ };
502
+ if (scrollElement.current) {
503
+ const wheelAbortHandler = () => {
504
+ const activeInteraction = getActiveInteraction();
505
+ if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
506
+ abortAll('new_interaction', `wheel-on-editor-element`);
507
+ }
508
+ cleanupListeners();
509
+ };
510
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
511
+ scrollElement.current.addEventListener('wheel', wheelAbortHandler);
512
+ possibleListeners.current.push(['wheel', wheelAbortHandler]);
513
+ const scrollAbortHandler = () => {
514
+ const activeInteraction = getActiveInteraction();
515
+ if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
516
+ abortAll('new_interaction', `scroll-on-editor-element`);
517
+ }
518
+ cleanupListeners();
519
+ };
520
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
521
+ scrollElement.current.addEventListener('scroll', scrollAbortHandler);
522
+ possibleListeners.current.push(['scroll', scrollAbortHandler]);
523
+ }
524
+ }
525
+ }
473
526
  if (!viewRef.current && node) {
474
527
  // make sure this doesn't expose the experiment
475
528
  if (editorExperiment('platform_editor_nodevisibility', true, {
@@ -515,13 +515,6 @@ const legacyContentStyles = props => css`
515
515
  }
516
516
  ` : null}
517
517
  `;
518
- const listLayoutShiftFix = css({
519
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
520
- '.ProseMirror ul, .ProseMirror ol': {
521
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
522
- marginTop: '10px'
523
- }
524
- });
525
518
  export const createEditorContentStyle = styles => {
526
519
  return /*#__PURE__*/React.forwardRef((props, ref) => {
527
520
  const {
@@ -555,7 +548,7 @@ export const createEditorContentStyle = styles => {
555
548
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
556
549
  className: className,
557
550
  ref: ref,
558
- css: [memoizedStyle, styles, fg('platform_editor_ssr_fix_lists') && listLayoutShiftFix],
551
+ css: [memoizedStyle, styles],
559
552
  "data-testid": "editor-content-container"
560
553
  }, children);
561
554
  });
@@ -37,15 +37,15 @@ import { gapCursorStyles } from './styles/gapCursorStyles';
37
37
  import { gridStyles } from './styles/gridStyles';
38
38
  import { indentationStyles } from './styles/indentationStyles';
39
39
  import { InlineNodeViewSharedStyles } from './styles/inlineNodeViewSharedStyles';
40
- import { layoutColumnResponsiveStyles, layoutBaseStyles, layoutBaseStylesAdvanced, layoutBaseStylesFixesUnderNestedDnDFG, layoutSelectedStylesNotAdvanced, layoutSelectedStylesForViewNotAdvanced, layoutColumnMartinTopFixesNew, layoutColumnMartinTopFixesOld, layoutColumnStylesAdvanced, layoutColumnStylesNotAdvanced, layoutResponsiveBaseStyles, layoutResponsiveStylesForView, layoutSectionStylesAdvanced, layoutSectionStylesNotAdvanced, layoutStylesForView, layoutSelectedStylesAdvanced, layoutSelectedStylesForViewAdvanced } from './styles/layout';
41
- import { hyperLinkFloatingToolbarStyles, linkStyles, linkStylesOld, linkLegacyIconStylesFix } from './styles/link';
42
- import { listLayoutShiftFix, listsStyles, listsStylesSafariFix } from './styles/list';
40
+ import { layoutBaseStyles, layoutBaseStylesAdvanced, layoutBaseStylesFixesUnderNestedDnDFG, layoutColumnMartinTopFixesNew, layoutColumnMartinTopFixesOld, layoutColumnResponsiveStyles, layoutColumnStylesAdvanced, layoutColumnStylesNotAdvanced, layoutResponsiveBaseStyles, layoutResponsiveStylesForView, layoutSectionStylesAdvanced, layoutSectionStylesNotAdvanced, layoutSelectedStylesAdvanced, layoutSelectedStylesForViewAdvanced, layoutSelectedStylesForViewNotAdvanced, layoutSelectedStylesNotAdvanced, layoutStylesForView } from './styles/layout';
41
+ import { hyperLinkFloatingToolbarStyles, linkLegacyIconStylesFix, linkStyles, linkStylesOld } from './styles/link';
42
+ import { listsStyles, listsStylesSafariFix } from './styles/list';
43
43
  import { mediaAlignmentStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
44
- import { mentionsStyles, vanillaMentionsStyles, vanillaMentionsSelectionStyles } from './styles/mentions';
45
- import { panelStyles, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix, panelViewStyles } from './styles/panelStyles';
44
+ import { mentionsStyles, vanillaMentionsSelectionStyles, vanillaMentionsStyles } from './styles/mentions';
45
+ import { panelStyles, panelStylesMixin, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelViewStyles } from './styles/panelStyles';
46
46
  import { paragraphStylesOld, paragraphStylesUGCModernized, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
47
47
  import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderWrapStyles } from './styles/placeholderStyles';
48
- import { resizerStyles, pragmaticResizerStyles, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip } from './styles/resizerStyles';
48
+ import { pragmaticResizerStyles, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip, resizerStyles } from './styles/resizerStyles';
49
49
  import { ruleStyles } from './styles/rule';
50
50
  import { scrollbarStyles } from './styles/scrollbarStyles';
51
51
  import { hideCursorWhenHideSelectionStyles, hideSelectionStyles, selectedNodeStyles } from './styles/selectionStyles';
@@ -53,7 +53,7 @@ import { shadowStyles } from './styles/shadowStyles';
53
53
  import { linkingVisualRefreshV1Styles, smartCardStyles, smartLinksInLivePagesStyles, smartLinksInLivePagesStylesOld } from './styles/smartCardStyles';
54
54
  import { statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh, vanillaStatusStyles, vanillaStatusStylesMixin_fg_platform_component_visual_refresh, vanillaStatusStylesMixin_without_fg_platform_component_visual_refresh } from './styles/statusStyles';
55
55
  import { tableCommentEditorStyles, tableLayoutFixes } from './styles/tableStyles';
56
- import { decisionStyles, tasksAndDecisionsStyles, vanillaDecisionIconWithoutVisualRefresh, vanillaDecisionIconWithVisualRefresh, vanillaDecisionStyles, vanillaTaskItemStyles } from './styles/tasksAndDecisionsStyles';
56
+ import { decisionStyles, tasksAndDecisionsStyles, vanillaDecisionIconWithVisualRefresh, vanillaDecisionIconWithoutVisualRefresh, vanillaDecisionStyles, vanillaTaskItemStyles } from './styles/tasksAndDecisionsStyles';
57
57
  import { telepointerColorAndCommonStyle, telepointerStyle, telepointerStyleWithInitialOnly } from './styles/telepointerStyles';
58
58
  import { textColorStyles } from './styles/textColorStyles';
59
59
  import { textHighlightStyle } from './styles/textHighlightStyles';
@@ -157,11 +157,9 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
157
157
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
158
158
  panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, fg('platform_editor_nested_dnd_styles_changes') &&
159
159
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
160
- panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, fg('platform_editor_lcm_nested_panel_icon_fix') ?
160
+ panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes,
161
161
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
162
- panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix :
163
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
164
- panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix,
162
+ panelStylesMixin,
165
163
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
166
164
  mentionsStyles,
167
165
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -303,9 +301,7 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
303
301
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
304
302
  isFullPage && fullPageEditorStyles,
305
303
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
306
- isFullPage && scrollbarStyles,
307
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
308
- fg('platform_editor_ssr_fix_lists') && listLayoutShiftFix, fg('platform_editor_nested_dnd_styles_changes') ?
304
+ isFullPage && scrollbarStyles, fg('platform_editor_nested_dnd_styles_changes') ?
309
305
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
310
306
  firstCodeBlockWithNoMargin :
311
307
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -143,13 +143,4 @@ export const listsStylesSafariFix = css({
143
143
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
144
144
  marginTop: `-${akEditorLineHeight}em !important`
145
145
  }
146
- });
147
-
148
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
149
- export const listLayoutShiftFix = css({
150
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
151
- '.ProseMirror ul, .ProseMirror ol': {
152
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
153
- marginTop: '10px'
154
- }
155
146
  });
@@ -226,7 +226,7 @@ export const panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes = css
226
226
  });
227
227
 
228
228
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
229
- export const panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix = css({
229
+ export const panelStylesMixin = css({
230
230
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
231
231
  '.ProseMirror': {
232
232
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
@@ -283,64 +283,6 @@ export const panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix = css
283
283
  }
284
284
  });
285
285
 
286
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
287
- export const panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix = css({
288
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
289
- '.ProseMirror': {
290
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
291
- '.ak-editor-panel': {
292
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
293
- '&[data-panel-type="info"]': {
294
- // getIconStyles(PanelType.INFO),
295
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
296
- '.ak-editor-panel__icon': {
297
- color: "var(--ds-icon-information, #1D7AFC)"
298
- }
299
- },
300
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
301
- '&[data-panel-type="note"]': {
302
- // getIconStyles(PanelType.NOTE),
303
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
304
- '.ak-editor-panel__icon': {
305
- color: "var(--ds-icon-discovery, #8270DB)"
306
- }
307
- },
308
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
309
- '&[data-panel-type="tip"]': {
310
- // getIconStyles(PanelType.TIP),
311
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
312
- '.ak-editor-panel__icon': {
313
- color: "var(--ds-icon-success, #22A06B)"
314
- }
315
- },
316
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
317
- '&[data-panel-type="warning"]': {
318
- // getIconStyles(PanelType.WARNING),
319
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
320
- '.ak-editor-panel__icon': {
321
- color: "var(--ds-icon-warning, #E56910)"
322
- }
323
- },
324
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
325
- '&[data-panel-type="error"]': {
326
- // getIconStyles(PanelType.ERROR),
327
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
328
- '.ak-editor-panel__icon': {
329
- color: "var(--ds-icon-danger, #C9372C)"
330
- }
331
- },
332
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
333
- '&[data-panel-type="success"]': {
334
- // getIconStyles(PanelType.SUCCESS),
335
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
336
- '.ak-editor-panel__icon': {
337
- color: "var(--ds-icon-success, #22A06B)"
338
- }
339
- }
340
- }
341
- }
342
- });
343
-
344
286
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
345
287
  export const panelViewStyles = css({
346
288
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "207.21.0";
2
+ export const version = "207.21.2";
@@ -1,5 +1,9 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
1
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
5
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
6
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3
7
  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; }
4
8
  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; }
5
9
  import React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
@@ -20,6 +24,7 @@ import { isEmptyDocument } from '@atlaskit/editor-common/utils/document';
20
24
  import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
21
25
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
22
26
  import { fg } from '@atlaskit/platform-feature-flags';
27
+ import { abortAll, getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
23
28
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
24
29
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
25
30
  import { useProviders } from '../composable-editor/hooks/useProviders';
@@ -488,7 +493,77 @@ export function ReactEditorView(props) {
488
493
  }
489
494
  }
490
495
  }, [editorView, shouldFocus, __livePage, mitigateScrollJump]);
496
+ var scrollElement = React.useRef();
497
+ var possibleListeners = React.useRef([]);
498
+ React.useEffect(function () {
499
+ return function () {
500
+ if (fg('cc_editor_abort_ufo_load_on_editor_scroll')) {
501
+ if (scrollElement.current) {
502
+ // eslint-disable-next-line react-hooks/exhaustive-deps
503
+ var _iterator = _createForOfIteratorHelper(possibleListeners.current),
504
+ _step;
505
+ try {
506
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
507
+ var _scrollElement$curren;
508
+ var possibleListener = _step.value;
509
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
510
+ (_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 || _scrollElement$curren.removeEventListener.apply(_scrollElement$curren, _toConsumableArray(possibleListener));
511
+ }
512
+ } catch (err) {
513
+ _iterator.e(err);
514
+ } finally {
515
+ _iterator.f();
516
+ }
517
+ }
518
+ scrollElement.current = null;
519
+ }
520
+ };
521
+ }, []);
491
522
  var handleEditorViewRef = useCallback(function (node) {
523
+ if (fg('cc_editor_abort_ufo_load_on_editor_scroll')) {
524
+ if (node) {
525
+ scrollElement.current = document.querySelector('[data-editor-scroll-container]');
526
+ var cleanupListeners = function cleanupListeners() {
527
+ // eslint-disable-next-line react-hooks/exhaustive-deps
528
+ var _iterator2 = _createForOfIteratorHelper(possibleListeners.current),
529
+ _step2;
530
+ try {
531
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
532
+ var _scrollElement$curren2;
533
+ var possibleListener = _step2.value;
534
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
535
+ (_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 || _scrollElement$curren2.removeEventListener.apply(_scrollElement$curren2, _toConsumableArray(possibleListener));
536
+ }
537
+ } catch (err) {
538
+ _iterator2.e(err);
539
+ } finally {
540
+ _iterator2.f();
541
+ }
542
+ };
543
+ if (scrollElement.current) {
544
+ var wheelAbortHandler = function wheelAbortHandler() {
545
+ var activeInteraction = getActiveInteraction();
546
+ if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
547
+ abortAll('new_interaction', "wheel-on-editor-element");
548
+ }
549
+ cleanupListeners();
550
+ };
551
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
552
+ scrollElement.current.addEventListener('wheel', wheelAbortHandler);
553
+ possibleListeners.current.push(['wheel', wheelAbortHandler]);
554
+ var scrollAbortHandler = function scrollAbortHandler() {
555
+ var activeInteraction = getActiveInteraction();
556
+ if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
557
+ abortAll('new_interaction', "scroll-on-editor-element");
558
+ }
559
+ cleanupListeners();
560
+ };
561
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
562
+ scrollElement.current.addEventListener('scroll', scrollAbortHandler);
563
+ possibleListeners.current.push(['scroll', scrollAbortHandler]);
564
+ }
565
+ }
566
+ }
492
567
  if (!viewRef.current && node) {
493
568
  // make sure this doesn't expose the experiment
494
569
  if (editorExperiment('platform_editor_nodevisibility', true, {
@@ -499,8 +574,8 @@ export function ReactEditorView(props) {
499
574
  var view = createEditorView(node);
500
575
  if (fg('platform_editor_reduce_scroll_jump_on_editor_start')) {
501
576
  if (mitigateScrollJump) {
502
- var scrollElement = document.querySelector('[data-editor-scroll-container]');
503
- scrollElement === null || scrollElement === void 0 || scrollElement.scrollTo({
577
+ var _scrollElement = document.querySelector('[data-editor-scroll-container]');
578
+ _scrollElement === null || _scrollElement === void 0 || _scrollElement.scrollTo({
504
579
  top: originalScrollToRestore.current,
505
580
  behavior: 'instant'
506
581
  });
@@ -163,13 +163,6 @@ var legacyContentStyles = function legacyContentStyles(props) {
163
163
  exposure: false
164
164
  }) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null, annotationSharedStyles(), smartCardStyles(), fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles, editorExperiment('platform_editor_vanilla_dom', true) ? dateVanillaStyles : null, dateStyles, embedCardStyles(), unsupportedStyles, resizerStyles, pragmaticResizerStyles(), pragmaticStylesLayoutFirstNodeResizeHandleFix(), pragmaticResizerStylesForTooltip(), aiPanelStyles(props.colorMode), firstBlockNodeStylesNew, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !fg('platform-visual-refresh-icons') ? css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
165
165
  };
166
- var listLayoutShiftFix = css({
167
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
168
- '.ProseMirror ul, .ProseMirror ol': {
169
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
170
- marginTop: '10px'
171
- }
172
- });
173
166
  export var createEditorContentStyle = function createEditorContentStyle(styles) {
174
167
  return /*#__PURE__*/React.forwardRef(function (props, ref) {
175
168
  var className = props.className,
@@ -202,7 +195,7 @@ export var createEditorContentStyle = function createEditorContentStyle(styles)
202
195
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
203
196
  className: className,
204
197
  ref: ref,
205
- css: [memoizedStyle, styles, fg('platform_editor_ssr_fix_lists') && listLayoutShiftFix],
198
+ css: [memoizedStyle, styles],
206
199
  "data-testid": "editor-content-container"
207
200
  }, children);
208
201
  });
@@ -37,15 +37,15 @@ import { gapCursorStyles } from './styles/gapCursorStyles';
37
37
  import { gridStyles } from './styles/gridStyles';
38
38
  import { indentationStyles } from './styles/indentationStyles';
39
39
  import { InlineNodeViewSharedStyles } from './styles/inlineNodeViewSharedStyles';
40
- import { layoutColumnResponsiveStyles, layoutBaseStyles, layoutBaseStylesAdvanced, layoutBaseStylesFixesUnderNestedDnDFG, layoutSelectedStylesNotAdvanced, layoutSelectedStylesForViewNotAdvanced, layoutColumnMartinTopFixesNew, layoutColumnMartinTopFixesOld, layoutColumnStylesAdvanced, layoutColumnStylesNotAdvanced, layoutResponsiveBaseStyles, layoutResponsiveStylesForView, layoutSectionStylesAdvanced, layoutSectionStylesNotAdvanced, layoutStylesForView, layoutSelectedStylesAdvanced, layoutSelectedStylesForViewAdvanced } from './styles/layout';
41
- import { hyperLinkFloatingToolbarStyles, linkStyles, linkStylesOld, linkLegacyIconStylesFix } from './styles/link';
42
- import { listLayoutShiftFix, listsStyles, listsStylesSafariFix } from './styles/list';
40
+ import { layoutBaseStyles, layoutBaseStylesAdvanced, layoutBaseStylesFixesUnderNestedDnDFG, layoutColumnMartinTopFixesNew, layoutColumnMartinTopFixesOld, layoutColumnResponsiveStyles, layoutColumnStylesAdvanced, layoutColumnStylesNotAdvanced, layoutResponsiveBaseStyles, layoutResponsiveStylesForView, layoutSectionStylesAdvanced, layoutSectionStylesNotAdvanced, layoutSelectedStylesAdvanced, layoutSelectedStylesForViewAdvanced, layoutSelectedStylesForViewNotAdvanced, layoutSelectedStylesNotAdvanced, layoutStylesForView } from './styles/layout';
41
+ import { hyperLinkFloatingToolbarStyles, linkLegacyIconStylesFix, linkStyles, linkStylesOld } from './styles/link';
42
+ import { listsStyles, listsStylesSafariFix } from './styles/list';
43
43
  import { mediaAlignmentStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
44
- import { mentionsStyles, vanillaMentionsStyles, vanillaMentionsSelectionStyles } from './styles/mentions';
45
- import { panelStyles, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix, panelViewStyles } from './styles/panelStyles';
44
+ import { mentionsStyles, vanillaMentionsSelectionStyles, vanillaMentionsStyles } from './styles/mentions';
45
+ import { panelStyles, panelStylesMixin, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelViewStyles } from './styles/panelStyles';
46
46
  import { paragraphStylesOld, paragraphStylesUGCModernized, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
47
47
  import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderWrapStyles } from './styles/placeholderStyles';
48
- import { resizerStyles, pragmaticResizerStyles, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip } from './styles/resizerStyles';
48
+ import { pragmaticResizerStyles, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip, resizerStyles } from './styles/resizerStyles';
49
49
  import { ruleStyles } from './styles/rule';
50
50
  import { scrollbarStyles } from './styles/scrollbarStyles';
51
51
  import { hideCursorWhenHideSelectionStyles, hideSelectionStyles, selectedNodeStyles } from './styles/selectionStyles';
@@ -53,7 +53,7 @@ import { shadowStyles } from './styles/shadowStyles';
53
53
  import { linkingVisualRefreshV1Styles, smartCardStyles, smartLinksInLivePagesStyles, smartLinksInLivePagesStylesOld } from './styles/smartCardStyles';
54
54
  import { statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh, vanillaStatusStyles, vanillaStatusStylesMixin_fg_platform_component_visual_refresh, vanillaStatusStylesMixin_without_fg_platform_component_visual_refresh } from './styles/statusStyles';
55
55
  import { tableCommentEditorStyles, tableLayoutFixes } from './styles/tableStyles';
56
- import { decisionStyles, tasksAndDecisionsStyles, vanillaDecisionIconWithoutVisualRefresh, vanillaDecisionIconWithVisualRefresh, vanillaDecisionStyles, vanillaTaskItemStyles } from './styles/tasksAndDecisionsStyles';
56
+ import { decisionStyles, tasksAndDecisionsStyles, vanillaDecisionIconWithVisualRefresh, vanillaDecisionIconWithoutVisualRefresh, vanillaDecisionStyles, vanillaTaskItemStyles } from './styles/tasksAndDecisionsStyles';
57
57
  import { telepointerColorAndCommonStyle, telepointerStyle, telepointerStyleWithInitialOnly } from './styles/telepointerStyles';
58
58
  import { textColorStyles } from './styles/textColorStyles';
59
59
  import { textHighlightStyle } from './styles/textHighlightStyles';
@@ -154,11 +154,9 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
154
154
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
155
155
  panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, fg('platform_editor_nested_dnd_styles_changes') &&
156
156
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
157
- panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, fg('platform_editor_lcm_nested_panel_icon_fix') ?
157
+ panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes,
158
158
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
159
- panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix :
160
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
161
- panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix,
159
+ panelStylesMixin,
162
160
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
163
161
  mentionsStyles,
164
162
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -300,9 +298,7 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
300
298
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
301
299
  isFullPage && fullPageEditorStyles,
302
300
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
303
- isFullPage && scrollbarStyles,
304
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
305
- fg('platform_editor_ssr_fix_lists') && listLayoutShiftFix, fg('platform_editor_nested_dnd_styles_changes') ?
301
+ isFullPage && scrollbarStyles, fg('platform_editor_nested_dnd_styles_changes') ?
306
302
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
307
303
  firstCodeBlockWithNoMargin :
308
304
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -139,13 +139,4 @@ export var listsStylesSafariFix = css(_defineProperty(_defineProperty({}, ".Pros
139
139
  }), ".ProseMirror:not(.".concat(BLOCK_CARD_CONTAINER, ") > li > p:first-child, .ProseMirror:not(.").concat(BLOCK_CARD_CONTAINER, ") > li > .code-block:first-child, .ProseMirror:not(.").concat(BLOCK_CARD_CONTAINER, ") > li > .ProseMirror-gapcursor:first-child + .code-block"), {
140
140
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
141
141
  marginTop: "-".concat(akEditorLineHeight, "em !important")
142
- }));
143
-
144
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
145
- export var listLayoutShiftFix = css({
146
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
147
- '.ProseMirror ul, .ProseMirror ol': {
148
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
149
- marginTop: '10px'
150
- }
151
- });
142
+ }));
@@ -226,7 +226,7 @@ export var panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes = css({
226
226
  });
227
227
 
228
228
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
229
- export var panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix = css({
229
+ export var panelStylesMixin = css({
230
230
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
231
231
  '.ProseMirror': {
232
232
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
@@ -283,64 +283,6 @@ export var panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix = css({
283
283
  }
284
284
  });
285
285
 
286
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
287
- export var panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix = css({
288
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
289
- '.ProseMirror': {
290
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
291
- '.ak-editor-panel': {
292
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
293
- '&[data-panel-type="info"]': {
294
- // getIconStyles(PanelType.INFO),
295
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
296
- '.ak-editor-panel__icon': {
297
- color: "var(--ds-icon-information, #1D7AFC)"
298
- }
299
- },
300
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
301
- '&[data-panel-type="note"]': {
302
- // getIconStyles(PanelType.NOTE),
303
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
304
- '.ak-editor-panel__icon': {
305
- color: "var(--ds-icon-discovery, #8270DB)"
306
- }
307
- },
308
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
309
- '&[data-panel-type="tip"]': {
310
- // getIconStyles(PanelType.TIP),
311
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
312
- '.ak-editor-panel__icon': {
313
- color: "var(--ds-icon-success, #22A06B)"
314
- }
315
- },
316
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
317
- '&[data-panel-type="warning"]': {
318
- // getIconStyles(PanelType.WARNING),
319
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
320
- '.ak-editor-panel__icon': {
321
- color: "var(--ds-icon-warning, #E56910)"
322
- }
323
- },
324
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
325
- '&[data-panel-type="error"]': {
326
- // getIconStyles(PanelType.ERROR),
327
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
328
- '.ak-editor-panel__icon': {
329
- color: "var(--ds-icon-danger, #C9372C)"
330
- }
331
- },
332
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
333
- '&[data-panel-type="success"]': {
334
- // getIconStyles(PanelType.SUCCESS),
335
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
336
- '.ak-editor-panel__icon': {
337
- color: "var(--ds-icon-success, #22A06B)"
338
- }
339
- }
340
- }
341
- }
342
- });
343
-
344
286
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
345
287
  export var panelViewStyles = css({
346
288
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "207.21.0";
2
+ export var version = "207.21.2";
@@ -1,3 +1,2 @@
1
1
  export declare const listsStyles: import("@emotion/react").SerializedStyles;
2
2
  export declare const listsStylesSafariFix: import("@emotion/react").SerializedStyles;
3
- export declare const listLayoutShiftFix: import("@emotion/react").SerializedStyles;
@@ -1,6 +1,5 @@
1
1
  export declare const panelStyles: import("@emotion/react").SerializedStyles;
2
2
  export declare const panelStylesMixin_fg_platform_editor_add_border_for_nested_panel: import("@emotion/react").SerializedStyles;
3
3
  export declare const panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes: import("@emotion/react").SerializedStyles;
4
- export declare const panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix: import("@emotion/react").SerializedStyles;
5
- export declare const panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix: import("@emotion/react").SerializedStyles;
4
+ export declare const panelStylesMixin: import("@emotion/react").SerializedStyles;
6
5
  export declare const panelViewStyles: import("@emotion/react").SerializedStyles;
@@ -1,3 +1,2 @@
1
1
  export declare const listsStyles: import("@emotion/react").SerializedStyles;
2
2
  export declare const listsStylesSafariFix: import("@emotion/react").SerializedStyles;
3
- export declare const listLayoutShiftFix: import("@emotion/react").SerializedStyles;
@@ -1,6 +1,5 @@
1
1
  export declare const panelStyles: import("@emotion/react").SerializedStyles;
2
2
  export declare const panelStylesMixin_fg_platform_editor_add_border_for_nested_panel: import("@emotion/react").SerializedStyles;
3
3
  export declare const panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes: import("@emotion/react").SerializedStyles;
4
- export declare const panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix: import("@emotion/react").SerializedStyles;
5
- export declare const panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix: import("@emotion/react").SerializedStyles;
4
+ export declare const panelStylesMixin: import("@emotion/react").SerializedStyles;
6
5
  export declare const panelViewStyles: import("@emotion/react").SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "207.21.1",
3
+ "version": "207.21.3",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -105,7 +105,7 @@
105
105
  "@atlaskit/primitives": "^14.8.0",
106
106
  "@atlaskit/renderer": "^118.7.0",
107
107
  "@atlaskit/section-message": "^8.2.0",
108
- "@atlaskit/smart-card": "^38.9.0",
108
+ "@atlaskit/smart-card": "^38.10.0",
109
109
  "@atlaskit/synchrony-test-helpers": "workspace:^",
110
110
  "@atlaskit/toggle": "^15.0.0",
111
111
  "@atlaskit/util-data-test": "^18.0.0",
@@ -152,6 +152,9 @@
152
152
  "cc_complexit_fe_improve_node_validation": {
153
153
  "type": "boolean"
154
154
  },
155
+ "cc_editor_abort_ufo_load_on_editor_scroll": {
156
+ "type": "boolean"
157
+ },
155
158
  "platform_editor_reduce_scroll_jump_on_editor_start": {
156
159
  "type": "boolean"
157
160
  },
@@ -411,10 +414,6 @@
411
414
  "type": "boolean",
412
415
  "referenceOnly": true
413
416
  },
414
- "platform_editor_non_macros_list_indent_fix": {
415
- "type": "boolean",
416
- "referenceOnly": true
417
- },
418
417
  "platform_editor_remove_drag_handle_fix": {
419
418
  "type": "boolean",
420
419
  "referenceOnly": true
@@ -641,9 +640,6 @@
641
640
  "platform_editor_interaction_api_refactor": {
642
641
  "type": "boolean"
643
642
  },
644
- "platform_editor_ssr_fix_lists": {
645
- "type": "boolean"
646
- },
647
643
  "dst-a11y__replace-anchor-with-link__editor": {
648
644
  "type": "boolean"
649
645
  },
@@ -668,14 +664,6 @@
668
664
  "platform_editor_add_border_for_nested_panel": {
669
665
  "type": "boolean",
670
666
  "referenceOnly": true
671
- },
672
- "platform_editor_lcm_nested_panel_icon_fix": {
673
- "type": "boolean",
674
- "referenceOnly": true
675
- },
676
- "platform_editor_inline_selection_marker_cursor": {
677
- "type": "boolean",
678
- "referenceOnly": true
679
667
  }
680
668
  },
681
669
  "stricter": {