@atlaskit/editor-core 204.7.0 → 204.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 204.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#131485](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/131485)
8
+ [`bd6274bb72cb1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd6274bb72cb1) -
9
+ ENGHEALTH-23692 Iconography uplift for editor-core
10
+ - [#131407](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/131407)
11
+ [`59a88ee61a0c5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/59a88ee61a0c5) -
12
+ [ux] EDF-2626: Add view isDestroyed check in editor auto-focusing logic to ensure bail before
13
+ posFromDOM and editor selection operations committed on destroyed docView instance, behind
14
+ platform_editor_posfromdom_null_fix
15
+ - [#131280](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/131280)
16
+ [`9ff92ea2432f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ff92ea2432f2) -
17
+ [ED-27082] Fix media overflow toolbar to show correct options + update separators between button
18
+ groups
19
+ - Updated dependencies
20
+
21
+ ## 204.7.1
22
+
23
+ ### Patch Changes
24
+
25
+ - [#131048](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/131048)
26
+ [`40f0ae20820a0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/40f0ae20820a0) -
27
+ Clean up platform_editor_advanced_layouts_a11y
28
+ - [#128309](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/128309)
29
+ [`5668591816f6a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5668591816f6a) -
30
+ Clean up platform_editor_advanced_layouts_dnd_remove_layout
31
+ - Updated dependencies
32
+
3
33
  ## 204.7.0
4
34
 
5
35
  ### Minor Changes
@@ -25,6 +25,14 @@ function handleEditorFocus(view) {
25
25
  return window.setTimeout(fn, 0);
26
26
  };
27
27
  return react16OnlySetTimeout(function () {
28
+ // Due to race conditions during editor lifecycle transitions (e.g. SPA route changes during opening or closing)
29
+ // where the view (and its internal docView) may have been destroyed, the timeout callback may fire on a stale view.
30
+ // Bail out in that scenario to prevent operating on an unmounted view.
31
+ if ((0, _platformFeatureFlags.fg)('platform_editor_posfromdom_null_fix')) {
32
+ if (view !== null && view !== void 0 && view.isDestroyed) {
33
+ return;
34
+ }
35
+ }
28
36
  if (view !== null && view !== void 0 && view.hasFocus()) {
29
37
  return;
30
38
  }
@@ -43,6 +51,7 @@ function handleEditorFocus(view) {
43
51
  view.focus();
44
52
  return;
45
53
  }
54
+
46
55
  // set cursor/selection and focus
47
56
  var anchor = view === null || view === void 0 ? void 0 : view.posAtDOM(range.startContainer, range.startOffset);
48
57
  var head = view === null || view === void 0 ? void 0 : view.posAtDOM(range.endContainer, range.endOffset);
@@ -8,7 +8,7 @@ exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
11
- var _question = _interopRequireDefault(require("@atlaskit/icon/glyph/question"));
11
+ var _questionCircleQuestion = _interopRequireDefault(require("@atlaskit/icon/core/migration/question-circle--question"));
12
12
  var _EditorContext = require("../EditorContext");
13
13
  var _messages = require("./messages");
14
14
  // Please, do not copy or use this kind of code below
@@ -59,7 +59,7 @@ var TooltipHelpTrigger = function TooltipHelpTrigger(_ref) {
59
59
  onClick: showHelp,
60
60
  title: displayTitle,
61
61
  titlePosition: titlePosition,
62
- iconBefore: /*#__PURE__*/_react.default.createElement(_question.default, {
62
+ iconBefore: /*#__PURE__*/_react.default.createElement(_questionCircleQuestion.default, {
63
63
  label: displayTitle
64
64
  })
65
65
  });
@@ -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 = "204.7.0";
8
+ var version = exports.version = "204.7.2";
@@ -14,6 +14,14 @@ export function handleEditorFocus(view) {
14
14
  */
15
15
  const react16OnlySetTimeout = React !== null && React !== void 0 && React.startTransition && fg('platform_editor_react_18_autofocus_fix') ? fn => fn() : fn => window.setTimeout(fn, 0);
16
16
  return react16OnlySetTimeout(() => {
17
+ // Due to race conditions during editor lifecycle transitions (e.g. SPA route changes during opening or closing)
18
+ // where the view (and its internal docView) may have been destroyed, the timeout callback may fire on a stale view.
19
+ // Bail out in that scenario to prevent operating on an unmounted view.
20
+ if (fg('platform_editor_posfromdom_null_fix')) {
21
+ if (view !== null && view !== void 0 && view.isDestroyed) {
22
+ return;
23
+ }
24
+ }
17
25
  if (view !== null && view !== void 0 && view.hasFocus()) {
18
26
  return;
19
27
  }
@@ -32,6 +40,7 @@ export function handleEditorFocus(view) {
32
40
  view.focus();
33
41
  return;
34
42
  }
43
+
35
44
  // set cursor/selection and focus
36
45
  const anchor = view === null || view === void 0 ? void 0 : view.posAtDOM(range.startContainer, range.startOffset);
37
46
  const head = view === null || view === void 0 ? void 0 : view.posAtDOM(range.endContainer, range.endOffset);
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { injectIntl } from 'react-intl-next';
3
3
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
4
- import QuestionIcon from '@atlaskit/icon/glyph/question';
4
+ import QuestionIcon from '@atlaskit/icon/core/migration/question-circle--question';
5
5
  import { useEditorContext } from '../EditorContext';
6
6
  import { messages } from './messages';
7
7
  // Please, do not copy or use this kind of code below
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "204.7.0";
2
+ export const version = "204.7.2";
@@ -18,6 +18,14 @@ export function handleEditorFocus(view) {
18
18
  return window.setTimeout(fn, 0);
19
19
  };
20
20
  return react16OnlySetTimeout(function () {
21
+ // Due to race conditions during editor lifecycle transitions (e.g. SPA route changes during opening or closing)
22
+ // where the view (and its internal docView) may have been destroyed, the timeout callback may fire on a stale view.
23
+ // Bail out in that scenario to prevent operating on an unmounted view.
24
+ if (fg('platform_editor_posfromdom_null_fix')) {
25
+ if (view !== null && view !== void 0 && view.isDestroyed) {
26
+ return;
27
+ }
28
+ }
21
29
  if (view !== null && view !== void 0 && view.hasFocus()) {
22
30
  return;
23
31
  }
@@ -36,6 +44,7 @@ export function handleEditorFocus(view) {
36
44
  view.focus();
37
45
  return;
38
46
  }
47
+
39
48
  // set cursor/selection and focus
40
49
  var anchor = view === null || view === void 0 ? void 0 : view.posAtDOM(range.startContainer, range.startOffset);
41
50
  var head = view === null || view === void 0 ? void 0 : view.posAtDOM(range.endContainer, range.endOffset);
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { injectIntl } from 'react-intl-next';
3
3
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
4
- import QuestionIcon from '@atlaskit/icon/glyph/question';
4
+ import QuestionIcon from '@atlaskit/icon/core/migration/question-circle--question';
5
5
  import { useEditorContext } from '../EditorContext';
6
6
  import { messages } from './messages';
7
7
  // Please, do not copy or use this kind of code below
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "204.7.0";
2
+ export var version = "204.7.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "204.7.0",
3
+ "version": "204.7.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -60,7 +60,7 @@
60
60
  "@atlaskit/platform-feature-flags": "^1.1.0",
61
61
  "@atlaskit/react-ufo": "^3.4.0",
62
62
  "@atlaskit/task-decision": "^19.1.0",
63
- "@atlaskit/tmp-editor-statsig": "^4.3.0",
63
+ "@atlaskit/tmp-editor-statsig": "^4.4.0",
64
64
  "@atlaskit/tokens": "^4.5.0",
65
65
  "@atlaskit/tooltip": "^20.0.0",
66
66
  "@atlaskit/width-detector": "^5.0.0",
@@ -100,7 +100,7 @@
100
100
  "@atlaskit/media-test-helpers": "^35.0.0",
101
101
  "@atlaskit/modal-dialog": "^13.4.0",
102
102
  "@atlaskit/primitives": "^14.2.0",
103
- "@atlaskit/renderer": "^114.4.0",
103
+ "@atlaskit/renderer": "^114.5.0",
104
104
  "@atlaskit/smart-card": "^36.0.0",
105
105
  "@atlaskit/synchrony-test-helpers": "^3.1.0",
106
106
  "@atlaskit/toggle": "^15.0.0",
@@ -343,10 +343,6 @@
343
343
  "type": "boolean",
344
344
  "referenceOnly": true
345
345
  },
346
- "platform_editor_advanced_layouts_a11y": {
347
- "type": "boolean",
348
- "referenceOnly": true
349
- },
350
346
  "platform_editor_floating_toolbar_padding_fix": {
351
347
  "type": "boolean",
352
348
  "referenceOnly": true
@@ -424,10 +420,6 @@
424
420
  "type": "boolean",
425
421
  "referenceOnly": true
426
422
  },
427
- "platform_editor_advanced_layouts_dnd_remove_layout": {
428
- "type": "boolean",
429
- "referenceOnly": true
430
- },
431
423
  "platform_editor_css_migrate_stage_1": {
432
424
  "type": "boolean",
433
425
  "referenceOnly": true
@@ -575,6 +567,9 @@
575
567
  },
576
568
  "platform_editor_keep_focus_on_content_comp_clicks": {
577
569
  "type": "boolean"
570
+ },
571
+ "platform_editor_posfromdom_null_fix": {
572
+ "type": "boolean"
578
573
  }
579
574
  },
580
575
  "stricter": {