@atlaskit/editor-core 205.9.1 → 206.0.0

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,26 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 206.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [#148725](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/148725)
8
+ [`1bc7ac4bd7eff`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1bc7ac4bd7eff) -
9
+ [ux] [ED-27491] Make main content area focus-able and remove autofocus behaviour from editor-core
10
+ - Updated dependencies
11
+
12
+ ## 205.10.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#140315](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140315)
17
+ [`e9258b34b7063`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e9258b34b7063) -
18
+ MODES-6284 Add CMD+OPT+Y as yellow text highlight shortcut
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 205.9.1
4
25
 
5
26
  ### Patch Changes
@@ -46,14 +46,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
46
46
  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; }
47
47
  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; }
48
48
  var EDIT_AREA_ID = 'ak-editor-textarea';
49
- var focusElementOutsideEditor = function focusElementOutsideEditor() {
50
- // TODO: ED-26841 - This is an awful way of selecting this, would love a
51
- // better way be that a ref or even an id or data attibute.
52
- var aiButton = document.querySelector('[data-testid="platform-ai-button"]');
53
- if (aiButton && aiButton instanceof HTMLElement) {
54
- aiButton.focus();
55
- }
56
- };
57
49
  function ReactEditorView(props) {
58
50
  var _pluginInjectionAPI$c, _media, _linking, _document$querySelect, _props$render, _props$render2;
59
51
  var preset = props.preset,
@@ -486,17 +478,13 @@ function ReactEditorView(props) {
486
478
  if ((0, _platformFeatureFlags.fg)('platform_editor_reduce_scroll_jump_on_editor_start')) {
487
479
  if (!mitigateScrollJump) {
488
480
  var liveDocWithContent = __livePage && !(0, _document.isEmptyDocument)(editorView.state.doc);
489
- if (liveDocWithContent && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
490
- focusElementOutsideEditor();
491
- } else {
481
+ if (!liveDocWithContent || !(0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
492
482
  focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(editorView);
493
483
  }
494
484
  }
495
485
  } else {
496
486
  var _liveDocWithContent = __livePage && !(0, _document.isEmptyDocument)(editorView.state.doc);
497
- if (_liveDocWithContent && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
498
- focusElementOutsideEditor();
499
- } else {
487
+ if (!_liveDocWithContent || !(0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
500
488
  focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(editorView);
501
489
  }
502
490
  }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ /* prettier-ignore */
8
+ /**
9
+ * NOTE:
10
+ *
11
+ * This file is automatically generated by Traduki 2.0.
12
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
13
+ */
14
+ //Croatian (Croatia) [hr-HR]
15
+ var _default = exports.default = {
16
+ 'fabric.editor.chromeCollapsedPlaceholder': 'Upiši nešto...',
17
+ 'fabric.editor.editorAssistiveLabel': 'Glavno područje sadržaja, počni tipkati za unos teksta.',
18
+ 'fabric.editor.headingLink.toolbarHelpTitle': 'Otvori dijaloški okvir pomoći'
19
+ };
@@ -14,5 +14,6 @@ exports.default = void 0;
14
14
  //Slovak
15
15
  var _default = exports.default = {
16
16
  'fabric.editor.chromeCollapsedPlaceholder': 'None',
17
+ 'fabric.editor.editorAssistiveLabel': 'Hlavná oblasť obsahu, sem začnite zadávať text.',
17
18
  'fabric.editor.headingLink.toolbarHelpTitle': 'None'
18
19
  };
@@ -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 = "205.9.1";
8
+ var version = exports.version = "206.0.0";
@@ -31,14 +31,6 @@ import { handleEditorFocus } from './ReactEditorView/handleEditorFocus';
31
31
  import { useDispatchTransaction } from './ReactEditorView/useDispatchTransaction';
32
32
  import { useFireFullWidthEvent } from './ReactEditorView/useFireFullWidthEvent';
33
33
  const EDIT_AREA_ID = 'ak-editor-textarea';
34
- const focusElementOutsideEditor = () => {
35
- // TODO: ED-26841 - This is an awful way of selecting this, would love a
36
- // better way be that a ref or even an id or data attibute.
37
- const aiButton = document.querySelector('[data-testid="platform-ai-button"]');
38
- if (aiButton && aiButton instanceof HTMLElement) {
39
- aiButton.focus();
40
- }
41
- };
42
34
  export function ReactEditorView(props) {
43
35
  var _pluginInjectionAPI$c, _pluginInjectionAPI$c2, _pluginInjectionAPI$c3, _media, _linking, _linking$smartLinks, _document$querySelect, _props$render, _props$render2;
44
36
  const {
@@ -456,17 +448,13 @@ export function ReactEditorView(props) {
456
448
  if (fg('platform_editor_reduce_scroll_jump_on_editor_start')) {
457
449
  if (!mitigateScrollJump) {
458
450
  const liveDocWithContent = __livePage && !isEmptyDocument(editorView.state.doc);
459
- if (liveDocWithContent && fg('platform_editor_no_cursor_on_live_doc_init')) {
460
- focusElementOutsideEditor();
461
- } else {
451
+ if (!liveDocWithContent || !fg('platform_editor_no_cursor_on_live_doc_init')) {
462
452
  focusTimeoutId.current = handleEditorFocus(editorView);
463
453
  }
464
454
  }
465
455
  } else {
466
456
  const liveDocWithContent = __livePage && !isEmptyDocument(editorView.state.doc);
467
- if (liveDocWithContent && fg('platform_editor_no_cursor_on_live_doc_init')) {
468
- focusElementOutsideEditor();
469
- } else {
457
+ if (!liveDocWithContent || !fg('platform_editor_no_cursor_on_live_doc_init')) {
470
458
  focusTimeoutId.current = handleEditorFocus(editorView);
471
459
  }
472
460
  }
@@ -0,0 +1,13 @@
1
+ /* prettier-ignore */
2
+ /**
3
+ * NOTE:
4
+ *
5
+ * This file is automatically generated by Traduki 2.0.
6
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
7
+ */
8
+ //Croatian (Croatia) [hr-HR]
9
+ export default {
10
+ 'fabric.editor.chromeCollapsedPlaceholder': 'Upiši nešto...',
11
+ 'fabric.editor.editorAssistiveLabel': 'Glavno područje sadržaja, počni tipkati za unos teksta.',
12
+ 'fabric.editor.headingLink.toolbarHelpTitle': 'Otvori dijaloški okvir pomoći'
13
+ };
@@ -8,5 +8,6 @@
8
8
  //Slovak
9
9
  export default {
10
10
  'fabric.editor.chromeCollapsedPlaceholder': 'None',
11
+ 'fabric.editor.editorAssistiveLabel': 'Hlavná oblasť obsahu, sem začnite zadávať text.',
11
12
  'fabric.editor.headingLink.toolbarHelpTitle': 'None'
12
13
  };
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "205.9.1";
2
+ export const version = "206.0.0";
@@ -35,14 +35,6 @@ import { handleEditorFocus } from './ReactEditorView/handleEditorFocus';
35
35
  import { useDispatchTransaction } from './ReactEditorView/useDispatchTransaction';
36
36
  import { useFireFullWidthEvent } from './ReactEditorView/useFireFullWidthEvent';
37
37
  var EDIT_AREA_ID = 'ak-editor-textarea';
38
- var focusElementOutsideEditor = function focusElementOutsideEditor() {
39
- // TODO: ED-26841 - This is an awful way of selecting this, would love a
40
- // better way be that a ref or even an id or data attibute.
41
- var aiButton = document.querySelector('[data-testid="platform-ai-button"]');
42
- if (aiButton && aiButton instanceof HTMLElement) {
43
- aiButton.focus();
44
- }
45
- };
46
38
  export function ReactEditorView(props) {
47
39
  var _pluginInjectionAPI$c, _media, _linking, _document$querySelect, _props$render, _props$render2;
48
40
  var preset = props.preset,
@@ -475,17 +467,13 @@ export function ReactEditorView(props) {
475
467
  if (fg('platform_editor_reduce_scroll_jump_on_editor_start')) {
476
468
  if (!mitigateScrollJump) {
477
469
  var liveDocWithContent = __livePage && !isEmptyDocument(editorView.state.doc);
478
- if (liveDocWithContent && fg('platform_editor_no_cursor_on_live_doc_init')) {
479
- focusElementOutsideEditor();
480
- } else {
470
+ if (!liveDocWithContent || !fg('platform_editor_no_cursor_on_live_doc_init')) {
481
471
  focusTimeoutId.current = handleEditorFocus(editorView);
482
472
  }
483
473
  }
484
474
  } else {
485
475
  var _liveDocWithContent = __livePage && !isEmptyDocument(editorView.state.doc);
486
- if (_liveDocWithContent && fg('platform_editor_no_cursor_on_live_doc_init')) {
487
- focusElementOutsideEditor();
488
- } else {
476
+ if (!_liveDocWithContent || !fg('platform_editor_no_cursor_on_live_doc_init')) {
489
477
  focusTimeoutId.current = handleEditorFocus(editorView);
490
478
  }
491
479
  }
@@ -0,0 +1,13 @@
1
+ /* prettier-ignore */
2
+ /**
3
+ * NOTE:
4
+ *
5
+ * This file is automatically generated by Traduki 2.0.
6
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
7
+ */
8
+ //Croatian (Croatia) [hr-HR]
9
+ export default {
10
+ 'fabric.editor.chromeCollapsedPlaceholder': 'Upiši nešto...',
11
+ 'fabric.editor.editorAssistiveLabel': 'Glavno područje sadržaja, počni tipkati za unos teksta.',
12
+ 'fabric.editor.headingLink.toolbarHelpTitle': 'Otvori dijaloški okvir pomoći'
13
+ };
@@ -8,5 +8,6 @@
8
8
  //Slovak
9
9
  export default {
10
10
  'fabric.editor.chromeCollapsedPlaceholder': 'None',
11
+ 'fabric.editor.editorAssistiveLabel': 'Hlavná oblasť obsahu, sem začnite zadávať text.',
11
12
  'fabric.editor.headingLink.toolbarHelpTitle': 'None'
12
13
  };
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "205.9.1";
2
+ export var version = "206.0.0";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.editor.chromeCollapsedPlaceholder': string;
9
+ 'fabric.editor.editorAssistiveLabel': string;
10
+ 'fabric.editor.headingLink.toolbarHelpTitle': string;
11
+ };
12
+ export default _default;
@@ -6,6 +6,7 @@
6
6
  */
7
7
  declare const _default: {
8
8
  'fabric.editor.chromeCollapsedPlaceholder': string;
9
+ 'fabric.editor.editorAssistiveLabel': string;
9
10
  'fabric.editor.headingLink.toolbarHelpTitle': string;
10
11
  };
11
12
  export default _default;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.editor.chromeCollapsedPlaceholder': string;
9
+ 'fabric.editor.editorAssistiveLabel': string;
10
+ 'fabric.editor.headingLink.toolbarHelpTitle': string;
11
+ };
12
+ export default _default;
@@ -6,6 +6,7 @@
6
6
  */
7
7
  declare const _default: {
8
8
  'fabric.editor.chromeCollapsedPlaceholder': string;
9
+ 'fabric.editor.editorAssistiveLabel': string;
9
10
  'fabric.editor.headingLink.toolbarHelpTitle': string;
10
11
  };
11
12
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "205.9.1",
3
+ "version": "206.0.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
47
47
  "@atlaskit/button": "^23.0.0",
48
48
  "@atlaskit/css": "^0.10.0",
49
- "@atlaskit/editor-common": "^103.22.0",
49
+ "@atlaskit/editor-common": "^104.0.0",
50
50
  "@atlaskit/editor-json-transformer": "^8.24.0",
51
51
  "@atlaskit/editor-performance-metrics": "^2.1.0",
52
52
  "@atlaskit/editor-plugin-quick-insert": "^2.4.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/platform-feature-flags-react": "^0.1.0",
62
62
  "@atlaskit/react-ufo": "^3.9.0",
63
63
  "@atlaskit/task-decision": "^19.2.0",
64
- "@atlaskit/tmp-editor-statsig": "^4.15.0",
64
+ "@atlaskit/tmp-editor-statsig": "^4.16.0",
65
65
  "@atlaskit/tokens": "^4.8.0",
66
66
  "@atlaskit/tooltip": "^20.0.0",
67
67
  "@atlaskit/width-detector": "^5.0.0",
@@ -79,7 +79,7 @@
79
79
  },
80
80
  "peerDependencies": {
81
81
  "@atlaskit/link-provider": "^2.1.0",
82
- "@atlaskit/media-core": "^35.0.0",
82
+ "@atlaskit/media-core": "^36.0.0",
83
83
  "react": "^18.2.0",
84
84
  "react-dom": "^18.2.0",
85
85
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -96,13 +96,13 @@
96
96
  "@atlaskit/editor-plugin-paste": "^3.3.0",
97
97
  "@atlaskit/link-provider": "^2.1.0",
98
98
  "@atlaskit/logo": "^18.0.0",
99
- "@atlaskit/media-core": "^35.0.0",
99
+ "@atlaskit/media-core": "^36.0.0",
100
100
  "@atlaskit/media-integration-test-helpers": "workspace:^",
101
- "@atlaskit/media-test-helpers": "^35.0.0",
101
+ "@atlaskit/media-test-helpers": "^36.0.0",
102
102
  "@atlaskit/modal-dialog": "^14.1.0",
103
- "@atlaskit/primitives": "^14.6.0",
104
- "@atlaskit/renderer": "^114.13.0",
105
- "@atlaskit/smart-card": "^36.13.0",
103
+ "@atlaskit/primitives": "^14.7.0",
104
+ "@atlaskit/renderer": "^115.0.0",
105
+ "@atlaskit/smart-card": "^36.15.0",
106
106
  "@atlaskit/synchrony-test-helpers": "workspace:^",
107
107
  "@atlaskit/toggle": "^15.0.0",
108
108
  "@atlaskit/util-data-test": "^18.0.0",
@@ -511,10 +511,6 @@
511
511
  "type": "boolean",
512
512
  "referenceOnly": true
513
513
  },
514
- "platform_editor_render_media_viewer_as_inline": {
515
- "type": "boolean",
516
- "referenceOnly": true
517
- },
518
514
  "platform_editor_paste_full_table_inside_empty_cell": {
519
515
  "type": "boolean",
520
516
  "referenceOnly": true
@@ -621,6 +617,10 @@
621
617
  "type": "boolean",
622
618
  "referenceOnly": true
623
619
  },
620
+ "platform_editor_yellow_text_highlight_shortcut": {
621
+ "type": "boolean",
622
+ "referenceOnly": true
623
+ },
624
624
  "platform_editor_controls_widget_visibility": {
625
625
  "type": "boolean",
626
626
  "referenceOnly": true