@atlaskit/editor-common 110.34.0 → 110.34.2

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 (26) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +4 -9
  3. package/dist/cjs/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +2 -2
  4. package/dist/cjs/monitoring/error.js +1 -1
  5. package/dist/cjs/preset/core-plugin/index.js +1 -1
  6. package/dist/cjs/preset/core-plugin/requestDocument.js +2 -2
  7. package/dist/cjs/ui/DropList/index.js +1 -1
  8. package/dist/cjs/utils/calculate-toolbar-position.js +1 -1
  9. package/dist/cjs/utils/document.js +6 -9
  10. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +4 -9
  11. package/dist/es2019/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +2 -2
  12. package/dist/es2019/monitoring/error.js +1 -1
  13. package/dist/es2019/preset/core-plugin/index.js +1 -1
  14. package/dist/es2019/preset/core-plugin/requestDocument.js +2 -2
  15. package/dist/es2019/ui/DropList/index.js +1 -1
  16. package/dist/es2019/utils/calculate-toolbar-position.js +1 -1
  17. package/dist/es2019/utils/document.js +6 -9
  18. package/dist/esm/element-browser/components/StatelessElementBrowser.js +4 -9
  19. package/dist/esm/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +2 -2
  20. package/dist/esm/monitoring/error.js +1 -1
  21. package/dist/esm/preset/core-plugin/index.js +1 -1
  22. package/dist/esm/preset/core-plugin/requestDocument.js +2 -2
  23. package/dist/esm/ui/DropList/index.js +1 -1
  24. package/dist/esm/utils/calculate-toolbar-position.js +1 -1
  25. package/dist/esm/utils/document.js +6 -9
  26. package/package.json +2 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.34.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0d237a5696b06`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0d237a5696b06) -
8
+ Uncoupled several block of changes from the aifc FG and moved them behind their own FG so they can
9
+ be rolled out quicker
10
+
11
+ ## 110.34.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`24092f8832d34`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/24092f8832d34) -
16
+ [EDITOR-3321] Clean up platform_editor_update_modal_close_button
17
+ - Updated dependencies
18
+
3
19
  ## 110.34.0
4
20
 
5
21
  ### Minor Changes
@@ -161,15 +161,10 @@ function StatelessElementBrowser(props) {
161
161
  // clear the flag if the search happens after a user has chosen the category
162
162
  categoryBeenChosen.current = false;
163
163
  }
164
- if ((0, _platformFeatureFlags.fg)('platform_editor_update_modal_close_button')) {
165
- // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
166
- // After user pick some category the category should stay focused.
167
- isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
168
- } else {
169
- // A11Y: if categories exists, on the initial render search element should receive focus.
170
- // After user pick some category the category should stay focused.
171
- isFocusSearch = !categoryBeenChosen.current || !isEmptySearchTerm;
172
- }
164
+
165
+ // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
166
+ // After user pick some category the category should stay focused.
167
+ isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
173
168
  }
174
169
  var itemIsDisabled = (0, _react.useCallback)(function (index) {
175
170
  var _items$index$isDisabl, _items$index;
@@ -246,7 +246,7 @@ var skipBackwardOffsetToSafeItem = function skipBackwardOffsetToSafeItem(current
246
246
  return currentIndex + 1;
247
247
  };
248
248
  function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, itemIsDisabled, isFocusSearch, autoFocusSearch) {
249
- var _useReducer = (0, _react.useReducer)(reducer, autoFocusSearch && (0, _platformFeatureFlags.fg)('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore)),
249
+ var _useReducer = (0, _react.useReducer)(reducer, autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore)),
250
250
  _useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),
251
251
  state = _useReducer2[0],
252
252
  dispatch = _useReducer2[1];
@@ -267,7 +267,7 @@ function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, it
267
267
 
268
268
  // calls if items size changed
269
269
  var reset = (0, _react.useCallback)(function (listSize) {
270
- var defaultState = autoFocusSearch && (0, _platformFeatureFlags.fg)('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled;
270
+ var defaultState = autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled;
271
271
  var payload = _objectSpread(_objectSpread({}, defaultState), {}, {
272
272
  listSize: listSize
273
273
  });
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  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); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "110.33.2";
19
+ var packageVersion = "110.34.1";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -107,7 +107,7 @@ var corePlugin = exports.corePlugin = function corePlugin(_ref) {
107
107
  if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
108
108
  editorView.dispatch(tr.scrollIntoView());
109
109
  } else {
110
- if ((0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
110
+ if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
111
111
  editorView.dispatch(tr.setMeta('scrollIntoView', false));
112
112
  }
113
113
  }
@@ -33,7 +33,7 @@ function createThrottleSchedule(callback) {
33
33
  }
34
34
  lastArgs = args;
35
35
  if (frameId) {
36
- if ((0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
36
+ if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
37
37
  if (lastArgsBefore) {
38
38
  var _lastArgsBefore = (0, _slicedToArray2.default)(lastArgsBefore, 5),
39
39
  _v = _lastArgsBefore[0],
@@ -54,7 +54,7 @@ function createThrottleSchedule(callback) {
54
54
  frameId = delayFunction(function () {
55
55
  frameId = undefined;
56
56
  if (lastArgs) {
57
- if ((0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
57
+ if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
58
58
  delayedCallbacks.forEach(function (savedArgs) {
59
59
  callback.apply(void 0, (0, _toConsumableArray2.default)(savedArgs));
60
60
  });
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "110.33.2";
27
+ var packageVersion = "110.34.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -113,7 +113,7 @@ var calculateToolbarPositionTrackHead = exports.calculateToolbarPositionTrackHea
113
113
  var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
114
114
  var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
115
115
  var range = null;
116
- if (isMoreRovoOptionsButtonVisible && (0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
116
+ if (isMoreRovoOptionsButtonVisible && (0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
117
117
  if (selection && selection.getRangeAt && selection.rangeCount > 0) {
118
118
  var maybeRange = selection.getRangeAt(0);
119
119
  if (maybeRange instanceof Range) {
@@ -24,16 +24,13 @@ var getStepRange = exports.getStepRange = function getStepRange(transaction) {
24
24
  stepMap.forEach(function (oldStart, oldEnd) {
25
25
  var newStart = transaction.mapping.slice(index).map(oldStart, -1);
26
26
  var newEnd = transaction.mapping.slice(index).map(oldEnd);
27
- from = newStart < from || from === -1 ? newStart : from;
28
- to = newEnd > to || to === -1 ? newEnd : to;
29
-
30
- // See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
31
- // PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
32
- // to see why use clamp here
33
- if ((0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
27
+ if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
34
28
  var docSize = transaction.doc.content.size;
35
- from = (0, _clamp.default)(from, 0, docSize);
36
- to = (0, _clamp.default)(to, 0, docSize);
29
+ from = (0, _clamp.default)(newStart < from || from === -1 ? newStart : from, 0, docSize);
30
+ to = (0, _clamp.default)(newEnd > to || to === -1 ? newEnd : to, 0, docSize);
31
+ } else {
32
+ from = newStart < from || from === -1 ? newStart : from;
33
+ to = newEnd > to || to === -1 ? newEnd : to;
37
34
  }
38
35
  });
39
36
  });
@@ -146,15 +146,10 @@ function StatelessElementBrowser(props) {
146
146
  // clear the flag if the search happens after a user has chosen the category
147
147
  categoryBeenChosen.current = false;
148
148
  }
149
- if (fg('platform_editor_update_modal_close_button')) {
150
- // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
151
- // After user pick some category the category should stay focused.
152
- isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
153
- } else {
154
- // A11Y: if categories exists, on the initial render search element should receive focus.
155
- // After user pick some category the category should stay focused.
156
- isFocusSearch = !categoryBeenChosen.current || !isEmptySearchTerm;
157
- }
149
+
150
+ // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
151
+ // After user pick some category the category should stay focused.
152
+ isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
158
153
  }
159
154
  const itemIsDisabled = useCallback(index => {
160
155
  var _items$index$isDisabl, _items$index;
@@ -250,7 +250,7 @@ const skipBackwardOffsetToSafeItem = (currentIndex, stepSize, itemIsDisabled) =>
250
250
  return currentIndex + 1;
251
251
  };
252
252
  function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, itemIsDisabled, isFocusSearch, autoFocusSearch) {
253
- const [state, dispatch] = useReducer(reducer, autoFocusSearch && fg('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore));
253
+ const [state, dispatch] = useReducer(reducer, autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore));
254
254
  useEffect(() => {
255
255
  dispatch({
256
256
  type: ACTIONS.UPDATE_STATE,
@@ -270,7 +270,7 @@ function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, it
270
270
 
271
271
  // calls if items size changed
272
272
  const reset = useCallback(listSize => {
273
- const defaultState = autoFocusSearch && fg('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled;
273
+ const defaultState = autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled;
274
274
  let payload = {
275
275
  ...defaultState,
276
276
  listSize
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "110.33.2";
4
+ const packageVersion = "110.34.1";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -109,7 +109,7 @@ export const corePlugin = ({
109
109
  if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
110
110
  editorView.dispatch(tr.scrollIntoView());
111
111
  } else {
112
- if (fg('aifc_create_enabled')) {
112
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
113
113
  editorView.dispatch(tr.setMeta('scrollIntoView', false));
114
114
  }
115
115
  }
@@ -19,7 +19,7 @@ export function createThrottleSchedule(callback) {
19
19
  const lastArgsBefore = lastArgs;
20
20
  lastArgs = args;
21
21
  if (frameId) {
22
- if (fg('aifc_create_enabled')) {
22
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
23
23
  if (lastArgsBefore) {
24
24
  const [_v, _c, _t, _f, alwaysFire] = lastArgsBefore;
25
25
  if (alwaysFire) {
@@ -35,7 +35,7 @@ export function createThrottleSchedule(callback) {
35
35
  frameId = delayFunction(() => {
36
36
  frameId = undefined;
37
37
  if (lastArgs) {
38
- if (fg('aifc_create_enabled')) {
38
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
39
39
  delayedCallbacks.forEach(savedArgs => {
40
40
  callback(...savedArgs);
41
41
  });
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "110.33.2";
17
+ const packageVersion = "110.34.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -106,7 +106,7 @@ export const calculateToolbarPositionTrackHead = toolbarTitle => (editorView, ne
106
106
  const moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
107
107
  const isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
108
108
  let range = null;
109
- if (isMoreRovoOptionsButtonVisible && fg('aifc_create_enabled')) {
109
+ if (isMoreRovoOptionsButtonVisible && fg('platform_editor_ai_generic_prep_for_aifc')) {
110
110
  if (selection && selection.getRangeAt && selection.rangeCount > 0) {
111
111
  const maybeRange = selection.getRangeAt(0);
112
112
  if (maybeRange instanceof Range) {
@@ -9,16 +9,13 @@ export const getStepRange = transaction => {
9
9
  stepMap.forEach((oldStart, oldEnd) => {
10
10
  const newStart = transaction.mapping.slice(index).map(oldStart, -1);
11
11
  const newEnd = transaction.mapping.slice(index).map(oldEnd);
12
- from = newStart < from || from === -1 ? newStart : from;
13
- to = newEnd > to || to === -1 ? newEnd : to;
14
-
15
- // See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
16
- // PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
17
- // to see why use clamp here
18
- if (fg('aifc_create_enabled')) {
12
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
19
13
  const docSize = transaction.doc.content.size;
20
- from = clamp(from, 0, docSize);
21
- to = clamp(to, 0, docSize);
14
+ from = clamp(newStart < from || from === -1 ? newStart : from, 0, docSize);
15
+ to = clamp(newEnd > to || to === -1 ? newEnd : to, 0, docSize);
16
+ } else {
17
+ from = newStart < from || from === -1 ? newStart : from;
18
+ to = newEnd > to || to === -1 ? newEnd : to;
22
19
  }
23
20
  });
24
21
  });
@@ -151,15 +151,10 @@ function StatelessElementBrowser(props) {
151
151
  // clear the flag if the search happens after a user has chosen the category
152
152
  categoryBeenChosen.current = false;
153
153
  }
154
- if (fg('platform_editor_update_modal_close_button')) {
155
- // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
156
- // After user pick some category the category should stay focused.
157
- isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
158
- } else {
159
- // A11Y: if categories exists, on the initial render search element should receive focus.
160
- // After user pick some category the category should stay focused.
161
- isFocusSearch = !categoryBeenChosen.current || !isEmptySearchTerm;
162
- }
154
+
155
+ // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
156
+ // After user pick some category the category should stay focused.
157
+ isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
163
158
  }
164
159
  var itemIsDisabled = useCallback(function (index) {
165
160
  var _items$index$isDisabl, _items$index;
@@ -240,7 +240,7 @@ var skipBackwardOffsetToSafeItem = function skipBackwardOffsetToSafeItem(current
240
240
  return currentIndex + 1;
241
241
  };
242
242
  function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, itemIsDisabled, isFocusSearch, autoFocusSearch) {
243
- var _useReducer = useReducer(reducer, autoFocusSearch && fg('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore)),
243
+ var _useReducer = useReducer(reducer, autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore)),
244
244
  _useReducer2 = _slicedToArray(_useReducer, 2),
245
245
  state = _useReducer2[0],
246
246
  dispatch = _useReducer2[1];
@@ -261,7 +261,7 @@ function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, it
261
261
 
262
262
  // calls if items size changed
263
263
  var reset = useCallback(function (listSize) {
264
- var defaultState = autoFocusSearch && fg('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled;
264
+ var defaultState = autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled;
265
265
  var payload = _objectSpread(_objectSpread({}, defaultState), {}, {
266
266
  listSize: listSize
267
267
  });
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "110.33.2";
10
+ var packageVersion = "110.34.1";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -102,7 +102,7 @@ export var corePlugin = function corePlugin(_ref) {
102
102
  if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
103
103
  editorView.dispatch(tr.scrollIntoView());
104
104
  } else {
105
- if (fg('aifc_create_enabled')) {
105
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
106
106
  editorView.dispatch(tr.setMeta('scrollIntoView', false));
107
107
  }
108
108
  }
@@ -24,7 +24,7 @@ export function createThrottleSchedule(callback) {
24
24
  }
25
25
  lastArgs = args;
26
26
  if (frameId) {
27
- if (fg('aifc_create_enabled')) {
27
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
28
28
  if (lastArgsBefore) {
29
29
  var _lastArgsBefore = _slicedToArray(lastArgsBefore, 5),
30
30
  _v = _lastArgsBefore[0],
@@ -45,7 +45,7 @@ export function createThrottleSchedule(callback) {
45
45
  frameId = delayFunction(function () {
46
46
  frameId = undefined;
47
47
  if (lastArgs) {
48
- if (fg('aifc_create_enabled')) {
48
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
49
49
  delayedCallbacks.forEach(function (savedArgs) {
50
50
  callback.apply(void 0, _toConsumableArray(savedArgs));
51
51
  });
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "110.33.2";
24
+ var packageVersion = "110.34.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -107,7 +107,7 @@ export var calculateToolbarPositionTrackHead = function calculateToolbarPosition
107
107
  var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
108
108
  var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
109
109
  var range = null;
110
- if (isMoreRovoOptionsButtonVisible && fg('aifc_create_enabled')) {
110
+ if (isMoreRovoOptionsButtonVisible && fg('platform_editor_ai_generic_prep_for_aifc')) {
111
111
  if (selection && selection.getRangeAt && selection.rangeCount > 0) {
112
112
  var maybeRange = selection.getRangeAt(0);
113
113
  if (maybeRange instanceof Range) {
@@ -9,16 +9,13 @@ export var getStepRange = function getStepRange(transaction) {
9
9
  stepMap.forEach(function (oldStart, oldEnd) {
10
10
  var newStart = transaction.mapping.slice(index).map(oldStart, -1);
11
11
  var newEnd = transaction.mapping.slice(index).map(oldEnd);
12
- from = newStart < from || from === -1 ? newStart : from;
13
- to = newEnd > to || to === -1 ? newEnd : to;
14
-
15
- // See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
16
- // PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
17
- // to see why use clamp here
18
- if (fg('aifc_create_enabled')) {
12
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
19
13
  var docSize = transaction.doc.content.size;
20
- from = clamp(from, 0, docSize);
21
- to = clamp(to, 0, docSize);
14
+ from = clamp(newStart < from || from === -1 ? newStart : from, 0, docSize);
15
+ to = clamp(newEnd > to || to === -1 ? newEnd : to, 0, docSize);
16
+ } else {
17
+ from = newStart < from || from === -1 ? newStart : from;
18
+ to = newEnd > to || to === -1 ? newEnd : to;
22
19
  }
23
20
  });
24
21
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "110.34.0",
3
+ "version": "110.34.2",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -180,7 +180,7 @@
180
180
  "platform_editor_blocktaskitem_patch_3": {
181
181
  "type": "boolean"
182
182
  },
183
- "aifc_create_enabled": {
183
+ "platform_editor_ai_generic_prep_for_aifc": {
184
184
  "type": "boolean"
185
185
  },
186
186
  "platform-visual-refresh-icons": {
@@ -246,9 +246,6 @@
246
246
  "platform_editor_toolbar_aifc_patch_7": {
247
247
  "type": "boolean"
248
248
  },
249
- "platform_editor_update_modal_close_button": {
250
- "type": "boolean"
251
- },
252
249
  "platform_editor_content_mode_button_mvp": {
253
250
  "type": "boolean"
254
251
  },