@atlaskit/editor-common 114.47.3 → 114.48.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/clipboard/index.js +43 -42
  3. package/dist/cjs/element-browser/components/ElementList/ElementList.js +4 -1
  4. package/dist/cjs/extensibility/ExtensionComponent.js +15 -15
  5. package/dist/cjs/extensions/combine-extension-providers.js +7 -7
  6. package/dist/cjs/extensions/default-extension-provider.js +25 -28
  7. package/dist/cjs/extensions/extension-handlers.js +8 -8
  8. package/dist/cjs/extensions/manifest-helpers.js +7 -7
  9. package/dist/cjs/extensions/module-helpers.js +10 -10
  10. package/dist/cjs/floating-toolbar/DropdownMenuExtensionItems.js +17 -18
  11. package/dist/cjs/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +2 -1
  12. package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +92 -97
  13. package/dist/cjs/link/LinkSearch/index.js +47 -54
  14. package/dist/cjs/monitoring/error.js +15 -15
  15. package/dist/cjs/provider-helpers/combine-providers.js +24 -26
  16. package/dist/cjs/safe-plugin/index.js +2 -1
  17. package/dist/cjs/ui/DropList/index.js +1 -1
  18. package/dist/cjs/user-preferences/user-preferences-provider.js +8 -8
  19. package/dist/cjs/utils/index.js +6 -0
  20. package/dist/cjs/utils/node-type-utils.js +21 -1
  21. package/dist/es2019/element-browser/components/ElementList/ElementList.js +4 -1
  22. package/dist/es2019/monitoring/error.js +1 -1
  23. package/dist/es2019/ui/DropList/index.js +1 -1
  24. package/dist/es2019/utils/index.js +1 -1
  25. package/dist/es2019/utils/node-type-utils.js +20 -1
  26. package/dist/esm/clipboard/index.js +42 -41
  27. package/dist/esm/element-browser/components/ElementList/ElementList.js +4 -1
  28. package/dist/esm/extensibility/ExtensionComponent.js +14 -14
  29. package/dist/esm/extensions/combine-extension-providers.js +7 -7
  30. package/dist/esm/extensions/default-extension-provider.js +25 -28
  31. package/dist/esm/extensions/extension-handlers.js +8 -8
  32. package/dist/esm/extensions/manifest-helpers.js +7 -7
  33. package/dist/esm/extensions/module-helpers.js +10 -10
  34. package/dist/esm/floating-toolbar/DropdownMenuExtensionItems.js +16 -17
  35. package/dist/esm/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +2 -1
  36. package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +91 -96
  37. package/dist/esm/link/LinkSearch/index.js +47 -54
  38. package/dist/esm/monitoring/error.js +14 -14
  39. package/dist/esm/provider-helpers/combine-providers.js +24 -26
  40. package/dist/esm/safe-plugin/index.js +2 -1
  41. package/dist/esm/ui/DropList/index.js +1 -1
  42. package/dist/esm/user-preferences/user-preferences-provider.js +8 -8
  43. package/dist/esm/utils/index.js +1 -1
  44. package/dist/esm/utils/node-type-utils.js +20 -1
  45. package/dist/types/utils/index.d.ts +1 -1
  46. package/dist/types/utils/node-type-utils.d.ts +7 -1
  47. package/dist/types-ts4.5/utils/index.d.ts +1 -1
  48. package/dist/types-ts4.5/utils/node-type-utils.d.ts +7 -1
  49. package/package.json +6 -6
  50. package/dist/cjs/types/valign.js +0 -1
  51. package/dist/es2019/types/valign.js +0 -0
  52. package/dist/esm/types/valign.js +0 -0
  53. package/dist/types/types/valign.d.ts +0 -1
  54. package/dist/types-ts4.5/types/valign.d.ts +0 -1
  55. package/types/valign/package.json +0 -17
@@ -25,19 +25,19 @@ var _default = exports.default = function _default(providers) {
25
25
  var getFulfilledProviders = /*#__PURE__*/function () {
26
26
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
27
27
  var results;
28
- return _regenerator.default.wrap(function _callee$(_context) {
28
+ return _regenerator.default.wrap(function (_context) {
29
29
  while (1) switch (_context.prev = _context.next) {
30
30
  case 0:
31
- _context.next = 2;
31
+ _context.next = 1;
32
32
  return (0, _promiseHelpers.waitForAllPromises)(providers.map(function (result) {
33
33
  return Promise.resolve(result);
34
34
  }));
35
- case 2:
35
+ case 1:
36
36
  results = _context.sent;
37
37
  return _context.abrupt("return", (0, _promiseHelpers.getOnlyFulfilled)(results).filter(function (provider) {
38
38
  return provider != null;
39
39
  }));
40
- case 4:
40
+ case 2:
41
41
  case "end":
42
42
  return _context.stop();
43
43
  }
@@ -49,16 +49,16 @@ var _default = exports.default = function _default(providers) {
49
49
  }();
50
50
  var runInAllProviders = /*#__PURE__*/function () {
51
51
  var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(mapFunction) {
52
- return _regenerator.default.wrap(function _callee2$(_context2) {
52
+ return _regenerator.default.wrap(function (_context2) {
53
53
  while (1) switch (_context2.prev = _context2.next) {
54
54
  case 0:
55
- _context2.next = 2;
55
+ _context2.next = 1;
56
56
  return getFulfilledProviders();
57
- case 2:
57
+ case 1:
58
58
  return _context2.abrupt("return", _context2.sent.map(function (provider) {
59
59
  return mapFunction(provider);
60
60
  }));
61
- case 3:
61
+ case 2:
62
62
  case "end":
63
63
  return _context2.stop();
64
64
  }
@@ -90,18 +90,17 @@ var _default = exports.default = function _default(providers) {
90
90
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
91
91
  var invokeSingle = /*#__PURE__*/function () {
92
92
  var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(methodName, args) {
93
- var callback;
94
- return _regenerator.default.wrap(function _callee3$(_context3) {
93
+ var callback, _t;
94
+ return _regenerator.default.wrap(function (_context3) {
95
95
  while (1) switch (_context3.prev = _context3.next) {
96
96
  case 0:
97
97
  callback = createCallback(methodName, args);
98
- _context3.t0 = _promiseHelpers.waitForFirstFulfilledPromise;
99
- _context3.next = 4;
98
+ _t = _promiseHelpers.waitForFirstFulfilledPromise;
99
+ _context3.next = 1;
100
100
  return runInAllProviders(callback);
101
- case 4:
102
- _context3.t1 = _context3.sent;
103
- return _context3.abrupt("return", (0, _context3.t0)(_context3.t1));
104
- case 6:
101
+ case 1:
102
+ return _context3.abrupt("return", _t(_context3.sent));
103
+ case 2:
105
104
  case "end":
106
105
  return _context3.stop();
107
106
  }
@@ -121,25 +120,24 @@ var _default = exports.default = function _default(providers) {
121
120
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
122
121
  var invokeList = /*#__PURE__*/function () {
123
122
  var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(methodName, args) {
124
- var callback, results, fulfilledResults;
125
- return _regenerator.default.wrap(function _callee4$(_context4) {
123
+ var callback, results, fulfilledResults, _t2;
124
+ return _regenerator.default.wrap(function (_context4) {
126
125
  while (1) switch (_context4.prev = _context4.next) {
127
126
  case 0:
128
127
  callback = createCallback(methodName, args);
129
- _context4.t0 = _promiseHelpers.waitForAllPromises;
130
- _context4.next = 4;
128
+ _t2 = _promiseHelpers.waitForAllPromises;
129
+ _context4.next = 1;
131
130
  return runInAllProviders(callback);
132
- case 4:
133
- _context4.t1 = _context4.sent;
134
- _context4.next = 7;
135
- return (0, _context4.t0)(_context4.t1);
136
- case 7:
131
+ case 1:
132
+ _context4.next = 2;
133
+ return _t2(_context4.sent);
134
+ case 2:
137
135
  results = _context4.sent;
138
136
  fulfilledResults = (0, _promiseHelpers.getOnlyFulfilled)(results);
139
137
  return _context4.abrupt("return", flatten(fulfilledResults).filter(function (result) {
140
138
  return result;
141
139
  }));
142
- case 10:
140
+ case 3:
143
141
  case "end":
144
142
  return _context4.stop();
145
143
  }
@@ -22,6 +22,7 @@ var _prosemirrorDomMetadata = require("../prosemirror-dom-metadata");
22
22
  var _nativeAnchor = require("../styles/shared/native-anchor");
23
23
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
24
24
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
25
+ 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; }
25
26
  /**
26
27
  * 🧱 Internal Helper Function: Editor FE Platform
27
28
  *
@@ -86,7 +87,7 @@ var wrapGetPosExceptions = function wrapGetPosExceptions(spec) {
86
87
  node = _argumentsList[0],
87
88
  view = _argumentsList[1],
88
89
  unsafeGetPos = _argumentsList[2],
89
- more = _argumentsList.slice(3);
90
+ more = _arrayLikeToArray(_argumentsList).slice(3);
90
91
  if (!nodeIdProvider && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
91
92
  nodeIdProvider = (0, _nodeAnchorProvider.getNodeIdProvider)(view);
92
93
  }
@@ -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 = "114.47.2";
27
+ var packageVersion = "114.48.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -65,15 +65,15 @@ var UserPreferencesProvider = exports.UserPreferencesProvider = /*#__PURE__*/fun
65
65
  value: (function () {
66
66
  var _loadPreferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
67
67
  var userPreferences;
68
- return _regenerator.default.wrap(function _callee$(_context) {
68
+ return _regenerator.default.wrap(function (_context) {
69
69
  while (1) switch (_context.prev = _context.next) {
70
70
  case 0:
71
- _context.next = 2;
71
+ _context.next = 1;
72
72
  return this.persistenceAPI.loadUserPreferences();
73
- case 2:
73
+ case 1:
74
74
  userPreferences = _context.sent;
75
75
  this.setUserPreferences(userPreferences);
76
- case 4:
76
+ case 2:
77
77
  case "end":
78
78
  return _context.stop();
79
79
  }
@@ -98,15 +98,15 @@ var UserPreferencesProvider = exports.UserPreferencesProvider = /*#__PURE__*/fun
98
98
  value: (function () {
99
99
  var _updatePreference = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(key, value) {
100
100
  var userPreferences;
101
- return _regenerator.default.wrap(function _callee2$(_context2) {
101
+ return _regenerator.default.wrap(function (_context2) {
102
102
  while (1) switch (_context2.prev = _context2.next) {
103
103
  case 0:
104
- _context2.next = 2;
104
+ _context2.next = 1;
105
105
  return this.persistenceAPI.updateUserPreference(key, value);
106
- case 2:
106
+ case 1:
107
107
  userPreferences = _context2.sent;
108
108
  this.setUserPreferences(userPreferences);
109
- case 4:
109
+ case 2:
110
110
  case "end":
111
111
  return _context2.stop();
112
112
  }
@@ -785,6 +785,12 @@ Object.defineProperty(exports, "isNodeSelectedOrInRange", {
785
785
  return _nodes.isNodeSelectedOrInRange;
786
786
  }
787
787
  });
788
+ Object.defineProperty(exports, "isNodeTypeValidChildOf", {
789
+ enumerable: true,
790
+ get: function get() {
791
+ return _nodeTypeUtils.isNodeTypeValidChildOf;
792
+ }
793
+ });
788
794
  Object.defineProperty(exports, "isParagraph", {
789
795
  enumerable: true,
790
796
  get: function get() {
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getBaseNodeTypeName = getBaseNodeTypeName;
7
7
  exports.isNodeOfSameBaseType = isNodeOfSameBaseType;
8
+ exports.isNodeTypeValidChildOf = isNodeTypeValidChildOf;
9
+ var _model = require("@atlaskit/editor-prosemirror/model");
8
10
  /**
9
11
  * Returns the base name of a node type, stripping known variant suffixes.
10
12
  */
@@ -24,4 +26,22 @@ function getBaseNodeTypeName(nodeType) {
24
26
  */
25
27
  function isNodeOfSameBaseType(a, b) {
26
28
  return getBaseNodeTypeName(a) === getBaseNodeTypeName(b);
27
- }
29
+ }
30
+
31
+ /**
32
+ * Checks if a node type is a valid child of a parent node by creating a minimal valid
33
+ * instance and validating it against the parent's content expression. Unlike ProseMirror's
34
+ * canReplaceWith, this checks general type compatibility without requiring a specific insertion index.
35
+ */
36
+ function isNodeTypeValidChildOf(childTypeName, parentNode, schema) {
37
+ var childType = schema.nodes[childTypeName];
38
+ if (!childType) {
39
+ return false;
40
+ }
41
+ var candidate = childType.createAndFill();
42
+ if (!candidate) {
43
+ return false;
44
+ }
45
+ return parentNode.type.validContent(_model.Fragment.from(candidate));
46
+ }
47
+ ;
@@ -414,11 +414,14 @@ export function ElementItem({
414
414
  id: `searched-item-${index}`,
415
415
  isDisabled: isDisabled,
416
416
  role: role
417
+ // @ts-expect-error -- see A11Y-30538
418
+ ,
419
+ tabIndex: expValEquals('platform_editor_fix_a11y_tab_focus_insertion_menu', 'isEnabled', true) ? -1 : undefined
417
420
  }, jsx(ItemContent
418
421
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
419
422
  , {
420
423
  style: inlineMode ? null : itemStyleOverrides,
421
- tabIndex: 0,
424
+ tabIndex: expValEquals('platform_editor_fix_a11y_tab_focus_insertion_menu', 'isEnabled', true) ? undefined : 0,
422
425
  title: title,
423
426
  description: description,
424
427
  keyshortcut: keyshortcut,
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "114.47.2";
7
+ const packageVersion = "114.48.0";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -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 = "114.47.2";
17
+ const packageVersion = "114.48.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -363,4 +363,4 @@ export { calculateToolbarPositionAboveSelection, calculateToolbarPositionOnCellS
363
363
  export { findNodePosByLocalIds } from './nodes-by-localIds';
364
364
  export { getPageElementCounts } from './page-element-counts';
365
365
  export { withFeatureFlaggedComponent } from './withFeatureFlaggedComponent';
366
- export { isNodeOfSameBaseType, getBaseNodeTypeName } from './node-type-utils';
366
+ export { isNodeOfSameBaseType, getBaseNodeTypeName, isNodeTypeValidChildOf } from './node-type-utils';
@@ -1,3 +1,4 @@
1
+ import { Fragment } from '@atlaskit/editor-prosemirror/model';
1
2
  /**
2
3
  * Returns the base name of a node type, stripping known variant suffixes.
3
4
  */
@@ -17,4 +18,22 @@ export function getBaseNodeTypeName(nodeType) {
17
18
  */
18
19
  export function isNodeOfSameBaseType(a, b) {
19
20
  return getBaseNodeTypeName(a) === getBaseNodeTypeName(b);
20
- }
21
+ }
22
+
23
+ /**
24
+ * Checks if a node type is a valid child of a parent node by creating a minimal valid
25
+ * instance and validating it against the parent's content expression. Unlike ProseMirror's
26
+ * canReplaceWith, this checks general type compatibility without requiring a specific insertion index.
27
+ */
28
+ export function isNodeTypeValidChildOf(childTypeName, parentNode, schema) {
29
+ const childType = schema.nodes[childTypeName];
30
+ if (!childType) {
31
+ return false;
32
+ }
33
+ const candidate = childType.createAndFill();
34
+ if (!candidate) {
35
+ return false;
36
+ }
37
+ return parentNode.type.validContent(Fragment.from(candidate));
38
+ }
39
+ ;
@@ -29,51 +29,52 @@ var isExtensionNode = function isExtensionNode(node) {
29
29
  };
30
30
  export var copyToClipboard = /*#__PURE__*/function () {
31
31
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(textToCopy) {
32
- return _regeneratorRuntime.wrap(function _callee$(_context) {
32
+ var _t, _t2;
33
+ return _regeneratorRuntime.wrap(function (_context) {
33
34
  while (1) switch (_context.prev = _context.next) {
34
35
  case 0:
35
36
  if (!isClipboardApiSupported()) {
36
- _context.next = 11;
37
+ _context.next = 5;
37
38
  break;
38
39
  }
39
40
  _context.prev = 1;
40
- _context.next = 4;
41
+ _context.next = 2;
41
42
  return navigator.clipboard.writeText(textToCopy);
42
- case 4:
43
- _context.next = 9;
43
+ case 2:
44
+ _context.next = 4;
44
45
  break;
45
- case 6:
46
- _context.prev = 6;
47
- _context.t0 = _context["catch"](1);
46
+ case 3:
47
+ _context.prev = 3;
48
+ _t = _context["catch"](1);
48
49
  throw new Error('Clipboard api is not supported');
49
- case 9:
50
- _context.next = 23;
50
+ case 4:
51
+ _context.next = 11;
51
52
  break;
52
- case 11:
53
+ case 5:
53
54
  if (!isIEClipboardApiSupported()) {
54
- _context.next = 22;
55
+ _context.next = 10;
55
56
  break;
56
57
  }
57
- _context.prev = 12;
58
- _context.next = 15;
58
+ _context.prev = 6;
59
+ _context.next = 7;
59
60
  return window.clipboardData.setData('text', textToCopy);
60
- case 15:
61
- _context.next = 20;
61
+ case 7:
62
+ _context.next = 9;
62
63
  break;
63
- case 17:
64
- _context.prev = 17;
65
- _context.t1 = _context["catch"](12);
64
+ case 8:
65
+ _context.prev = 8;
66
+ _t2 = _context["catch"](6);
66
67
  throw new Error('IE clipboard api is not supported');
67
- case 20:
68
- _context.next = 23;
68
+ case 9:
69
+ _context.next = 11;
69
70
  break;
70
- case 22:
71
+ case 10:
71
72
  throw new Error('Clipboard api is not supported');
72
- case 23:
73
+ case 11:
73
74
  case "end":
74
75
  return _context.stop();
75
76
  }
76
- }, _callee, null, [[1, 6], [12, 17]]);
77
+ }, _callee, null, [[1, 3], [6, 8]]);
77
78
  }));
78
79
  return function copyToClipboard(_x) {
79
80
  return _ref.apply(this, arguments);
@@ -81,12 +82,12 @@ export var copyToClipboard = /*#__PURE__*/function () {
81
82
  }();
82
83
  export var copyHTMLToClipboard = /*#__PURE__*/function () {
83
84
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(elementToCopy, plainTextToCopy) {
84
- var data;
85
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
85
+ var data, _t3;
86
+ return _regeneratorRuntime.wrap(function (_context2) {
86
87
  while (1) switch (_context2.prev = _context2.next) {
87
88
  case 0:
88
89
  if (!(isClipboardApiSupported() && typeof ClipboardItem !== 'undefined')) {
89
- _context2.next = 12;
90
+ _context2.next = 5;
90
91
  break;
91
92
  }
92
93
  _context2.prev = 1;
@@ -98,19 +99,19 @@ export var copyHTMLToClipboard = /*#__PURE__*/function () {
98
99
  type: 'text/html'
99
100
  })
100
101
  }); // @ts-ignore
101
- _context2.next = 5;
102
+ _context2.next = 2;
102
103
  return navigator.clipboard.write([data]);
103
- case 5:
104
- _context2.next = 10;
104
+ case 2:
105
+ _context2.next = 4;
105
106
  break;
106
- case 7:
107
- _context2.prev = 7;
108
- _context2.t0 = _context2["catch"](1);
107
+ case 3:
108
+ _context2.prev = 3;
109
+ _t3 = _context2["catch"](1);
109
110
  throw new Error('Clipboard api is not supported');
110
- case 10:
111
- _context2.next = 13;
111
+ case 4:
112
+ _context2.next = 6;
112
113
  break;
113
- case 12:
114
+ case 5:
114
115
  if (!!document && (typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object') {
115
116
  try {
116
117
  // ED-17083 extension copy seems have issue with ClipboardItem API
@@ -121,11 +122,11 @@ export var copyHTMLToClipboard = /*#__PURE__*/function () {
121
122
  console.log(error);
122
123
  }
123
124
  }
124
- case 13:
125
+ case 6:
125
126
  case "end":
126
127
  return _context2.stop();
127
128
  }
128
- }, _callee2, null, [[1, 7]]);
129
+ }, _callee2, null, [[1, 3]]);
129
130
  }));
130
131
  return function copyHTMLToClipboard(_x2, _x3) {
131
132
  return _ref2.apply(this, arguments);
@@ -137,7 +138,7 @@ export var copyHTMLToClipboard = /*#__PURE__*/function () {
137
138
  export var copyHTMLToClipboardPolyfill = /*#__PURE__*/function () {
138
139
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(elementToCopy, plainTextToCopy) {
139
140
  var dt;
140
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
141
+ return _regeneratorRuntime.wrap(function (_context3) {
141
142
  while (1) switch (_context3.prev = _context3.next) {
142
143
  case 0:
143
144
  dt = new clipboard.ClipboardItem({
@@ -148,9 +149,9 @@ export var copyHTMLToClipboardPolyfill = /*#__PURE__*/function () {
148
149
  type: 'text/plain'
149
150
  })
150
151
  });
151
- _context3.next = 3;
152
+ _context3.next = 1;
152
153
  return clipboard.write([dt]);
153
- case 3:
154
+ case 1:
154
155
  case "end":
155
156
  return _context3.stop();
156
157
  }
@@ -412,11 +412,14 @@ export function ElementItem(_ref6) {
412
412
  id: "searched-item-".concat(index),
413
413
  isDisabled: isDisabled,
414
414
  role: role
415
+ // @ts-expect-error -- see A11Y-30538
416
+ ,
417
+ tabIndex: expValEquals('platform_editor_fix_a11y_tab_focus_insertion_menu', 'isEnabled', true) ? -1 : undefined
415
418
  }, jsx(ItemContent
416
419
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
417
420
  , {
418
421
  style: inlineMode ? null : itemStyleOverrides,
419
- tabIndex: 0,
422
+ tabIndex: expValEquals('platform_editor_fix_a11y_tab_focus_insertion_menu', 'isEnabled', true) ? undefined : 0,
420
423
  title: title,
421
424
  description: description,
422
425
  keyshortcut: keyshortcut,
@@ -98,44 +98,44 @@ var ExtensionComponentInner = /*#__PURE__*/function (_Component) {
98
98
  * handler which only handles `render`/component concerns.
99
99
  */
100
100
  _defineProperty(_this, "parsePrivateNodePropsIfNeeded", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
101
- var _this$props$node$attr, extensionType, extensionKey, privateProps;
102
- return _regeneratorRuntime.wrap(function _callee$(_context) {
101
+ var _this$props$node$attr, extensionType, extensionKey, privateProps, _t;
102
+ return _regeneratorRuntime.wrap(function (_context) {
103
103
  while (1) switch (_context.prev = _context.next) {
104
104
  case 0:
105
105
  if (!(_this.privatePropsParsed || !_this.props.extensionProvider)) {
106
- _context.next = 2;
106
+ _context.next = 1;
107
107
  break;
108
108
  }
109
109
  return _context.abrupt("return");
110
- case 2:
110
+ case 1:
111
111
  _this.privatePropsParsed = true;
112
112
  _this$props$node$attr = _this.props.node.attrs, extensionType = _this$props$node$attr.extensionType, extensionKey = _this$props$node$attr.extensionKey;
113
113
  /**
114
114
  * getExtensionModuleNodePrivateProps can throw if there are issues in the
115
115
  * manifest
116
116
  */
117
- _context.prev = 4;
118
- _context.next = 7;
117
+ _context.prev = 2;
118
+ _context.next = 3;
119
119
  return _this.getExtensionModuleNodePrivateProps(_this.props.extensionProvider, extensionType, extensionKey);
120
- case 7:
120
+ case 3:
121
121
  privateProps = _context.sent;
122
122
  _this.setState({
123
123
  _privateProps: privateProps
124
124
  });
125
- _context.next = 14;
125
+ _context.next = 5;
126
126
  break;
127
- case 11:
128
- _context.prev = 11;
129
- _context.t0 = _context["catch"](4);
127
+ case 4:
128
+ _context.prev = 4;
129
+ _t = _context["catch"](2);
130
130
  // eslint-disable-next-line no-console
131
- console.error('Provided extension handler has thrown an error\n', _context.t0);
131
+ console.error('Provided extension handler has thrown an error\n', _t);
132
132
  /** We don't want this error to block renderer */
133
133
  /** We keep rendering the default content */
134
- case 14:
134
+ case 5:
135
135
  case "end":
136
136
  return _context.stop();
137
137
  }
138
- }, _callee, null, [[4, 11]]);
138
+ }, _callee, null, [[2, 4]]);
139
139
  })));
140
140
  _defineProperty(_this, "handleExtension", function (pmNode, actions) {
141
141
  var _pmNode$marks;
@@ -19,26 +19,26 @@ export default (function (extensionProviders) {
19
19
  },
20
20
  preload: function preload() {
21
21
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
22
- return _regeneratorRuntime.wrap(function _callee$(_context) {
22
+ return _regeneratorRuntime.wrap(function (_context) {
23
23
  while (1) switch (_context.prev = _context.next) {
24
24
  case 0:
25
25
  if (!(providersCache.length === 0)) {
26
- _context.next = 4;
26
+ _context.next = 2;
27
27
  break;
28
28
  }
29
- _context.next = 3;
29
+ _context.next = 1;
30
30
  return Promise.all(extensionProviders.map(function (provider) {
31
31
  return Promise.resolve(provider);
32
32
  }));
33
- case 3:
33
+ case 1:
34
34
  providersCache = _context.sent;
35
- case 4:
36
- _context.next = 6;
35
+ case 2:
36
+ _context.next = 3;
37
37
  return Promise.all(providersCache.map(function (provider) {
38
38
  var _provider$preload;
39
39
  return provider === null || provider === void 0 || (_provider$preload = provider.preload) === null || _provider$preload === void 0 ? void 0 : _provider$preload.call(provider);
40
40
  }));
41
- case 6:
41
+ case 3:
42
42
  case "end":
43
43
  return _context.stop();
44
44
  }