@atlaskit/editor-core 177.0.1 → 178.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.
Files changed (79) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +147 -0
  3. package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +58 -0
  4. package/dist/cjs/create-editor/ErrorBoundary.js +3 -1
  5. package/dist/cjs/create-editor/ReactEditorView.js +3 -2
  6. package/dist/cjs/create-editor/create-editor.js +3 -1
  7. package/dist/cjs/editor.js +7 -0
  8. package/dist/cjs/plugins/block-type/commands/delete-and-move-cursor.js +67 -0
  9. package/dist/cjs/plugins/block-type/commands/index.js +9 -1
  10. package/dist/cjs/plugins/block-type/pm-plugins/keymap.js +8 -3
  11. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +12 -12
  12. package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +39 -11
  13. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +8 -15
  14. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -0
  15. package/dist/cjs/plugins/text-color/commands/change-color.js +1 -2
  16. package/dist/cjs/plugins/text-color/pm-plugins/main.js +1 -1
  17. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +2 -10
  18. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +19 -1
  19. package/dist/cjs/ui/ColorPalette/Palettes/textColorPalette.js +0 -6
  20. package/dist/cjs/ui/ColorPickerButton/index.js +3 -8
  21. package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +27 -2
  22. package/dist/cjs/utils/performance/instrumented-plugin.js +6 -3
  23. package/dist/cjs/utils/performance/safer-transactions.js +8 -2
  24. package/dist/cjs/version-wrapper.js +1 -1
  25. package/dist/cjs/version.json +1 -1
  26. package/dist/es2019/create-editor/ErrorBoundary.js +3 -1
  27. package/dist/es2019/create-editor/ReactEditorView.js +3 -2
  28. package/dist/es2019/create-editor/create-editor.js +3 -1
  29. package/dist/es2019/editor.js +7 -0
  30. package/dist/es2019/plugins/block-type/commands/delete-and-move-cursor.js +63 -0
  31. package/dist/es2019/plugins/block-type/commands/index.js +2 -1
  32. package/dist/es2019/plugins/block-type/pm-plugins/keymap.js +7 -4
  33. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +12 -12
  34. package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +42 -11
  35. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +9 -17
  36. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -0
  37. package/dist/es2019/plugins/text-color/commands/change-color.js +1 -2
  38. package/dist/es2019/plugins/text-color/pm-plugins/main.js +2 -2
  39. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +2 -6
  40. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +19 -1
  41. package/dist/es2019/ui/ColorPalette/Palettes/textColorPalette.js +1 -1
  42. package/dist/es2019/ui/ColorPickerButton/index.js +20 -9
  43. package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +27 -2
  44. package/dist/es2019/utils/performance/instrumented-plugin.js +5 -3
  45. package/dist/es2019/utils/performance/safer-transactions.js +8 -2
  46. package/dist/es2019/version-wrapper.js +1 -1
  47. package/dist/es2019/version.json +1 -1
  48. package/dist/esm/create-editor/ErrorBoundary.js +3 -1
  49. package/dist/esm/create-editor/ReactEditorView.js +3 -2
  50. package/dist/esm/create-editor/create-editor.js +3 -1
  51. package/dist/esm/editor.js +7 -0
  52. package/dist/esm/plugins/block-type/commands/delete-and-move-cursor.js +58 -0
  53. package/dist/esm/plugins/block-type/commands/index.js +2 -1
  54. package/dist/esm/plugins/block-type/pm-plugins/keymap.js +7 -4
  55. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +12 -12
  56. package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +40 -12
  57. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +9 -17
  58. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -0
  59. package/dist/esm/plugins/text-color/commands/change-color.js +1 -2
  60. package/dist/esm/plugins/text-color/pm-plugins/main.js +2 -2
  61. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +2 -9
  62. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +19 -1
  63. package/dist/esm/ui/ColorPalette/Palettes/textColorPalette.js +1 -1
  64. package/dist/esm/ui/ColorPickerButton/index.js +5 -10
  65. package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +27 -2
  66. package/dist/esm/utils/performance/instrumented-plugin.js +6 -3
  67. package/dist/esm/utils/performance/safer-transactions.js +8 -2
  68. package/dist/esm/version-wrapper.js +1 -1
  69. package/dist/esm/version.json +1 -1
  70. package/dist/types/plugins/block-type/commands/delete-and-move-cursor.d.ts +12 -0
  71. package/dist/types/plugins/block-type/commands/index.d.ts +1 -0
  72. package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +1 -0
  73. package/dist/types/plugins/text-color/pm-plugins/main.d.ts +1 -1
  74. package/dist/types/ui/ColorPalette/Palettes/textColorPalette.d.ts +1 -1
  75. package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +2 -1
  76. package/dist/types/utils/performance/instrumented-plugin.d.ts +1 -0
  77. package/dist/types/utils/performance/safer-transactions.d.ts +2 -1
  78. package/package.json +9 -10
  79. package/report.api.md +18 -2
@@ -384,13 +384,6 @@ var Toolbar = /*#__PURE__*/function (_Component) {
384
384
 
385
385
  (0, _classCallCheck2.default)(this, Toolbar);
386
386
  _this = _super.call(this, props);
387
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusToolbar", function (event) {
388
- if (event.altKey && event.keyCode === 121) {
389
- var _getFirstFocusableEle, _this$toolbarContaine;
390
-
391
- (_getFirstFocusableEle = (0, _utils.getFirstFocusableElement)((_this$toolbarContaine = _this.toolbarContainerRef) === null || _this$toolbarContaine === void 0 ? void 0 : _this$toolbarContaine.current)) === null || _getFirstFocusableEle === void 0 ? void 0 : _getFirstFocusableEle.focus();
392
- }
393
- });
394
387
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "shouldHandleArrowKeys", function () {
395
388
  var _this$props$items;
396
389
 
@@ -467,7 +460,6 @@ var Toolbar = /*#__PURE__*/function (_Component) {
467
460
  this.setState({
468
461
  mounted: true
469
462
  });
470
- document.addEventListener('keydown', this.focusToolbar);
471
463
  }
472
464
  }, {
473
465
  key: "componentDidUpdate",
@@ -484,13 +476,7 @@ var Toolbar = /*#__PURE__*/function (_Component) {
484
476
  this.resetStyling({
485
477
  table: this.props.node.type.name === 'table'
486
478
  });
487
- document.removeEventListener('keydown', this.focusToolbar);
488
479
  }
489
- /**
490
- * To listen to keyboard shortcut Alt+F10 and focus floating toolbar's first focusable element.
491
- * @param event
492
- */
493
-
494
480
  }, {
495
481
  key: "render",
496
482
  value: function render() {
@@ -510,11 +496,18 @@ var Toolbar = /*#__PURE__*/function (_Component) {
510
496
  var hasSelect = items.find(function (item) {
511
497
  return item.type === 'select' && item.selectType === 'list';
512
498
  });
499
+
500
+ var isShortcutToFocusToolbar = function isShortcutToFocusToolbar(event) {
501
+ //Alt + F10 to reach first element in this floating toolbar
502
+ return event.altKey && (event.key === 'F10' || event.keyCode === 121);
503
+ };
504
+
513
505
  return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_ToolbarArrowKeyNavigationProvider.ToolbarArrowKeyNavigationProvider, {
514
506
  editorView: this.props.editorView,
515
507
  handleEscape: this.handleEscape,
516
508
  disableArrowKeyNavigation: !this.shouldHandleArrowKeys(),
517
- childComponentSelector: "[data-testid='editor-floating-toolbar']"
509
+ childComponentSelector: "[data-testid='editor-floating-toolbar']",
510
+ isShortcutToFocusToolbar: isShortcutToFocusToolbar
518
511
  }, (0, _react2.jsx)("div", {
519
512
  ref: this.toolbarContainerRef,
520
513
  css: function css(theme) {
@@ -1005,6 +1005,7 @@ var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
1005
1005
  }), displayUrl && (0, _react2.jsx)(_tooltip.default, {
1006
1006
  content: formatClearLinkText
1007
1007
  }, (0, _react2.jsx)("button", {
1008
+ type: "button",
1008
1009
  css: clearText,
1009
1010
  onClick: this.handleClearText
1010
1011
  }, (0, _react2.jsx)(_crossCircle.default, {
@@ -1032,6 +1033,7 @@ var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
1032
1033
  }), displayText && (0, _react2.jsx)(_tooltip.default, {
1033
1034
  content: formatMessage(messages.clearText)
1034
1035
  }, (0, _react2.jsx)("button", {
1036
+ type: "button",
1035
1037
  css: clearText,
1036
1038
  onClick: this.handleClearDisplayText,
1037
1039
  onKeyDown: this.handleClearTextKeyDown
@@ -53,8 +53,7 @@ var changeColor = function changeColor(color) {
53
53
  var pluginState = _main.pluginKey.getState(state);
54
54
 
55
55
  var activeColor = (0, _color.getActiveColor)(state);
56
- var withColorAnalytics = createWithColorAnalytics(color, activeColor, // palette is a subset of paletteExpanded
57
- pluginState.paletteExpanded || pluginState.palette);
56
+ var withColorAnalytics = createWithColorAnalytics(color, activeColor, pluginState.palette);
58
57
 
59
58
  if (pluginState.disabled) {
60
59
  return false;
@@ -42,7 +42,7 @@ function createInitialPluginState(editorState, pluginConfig) {
42
42
  value: defaultColor.color,
43
43
  label: defaultColor.label,
44
44
  border: _common.DEFAULT_BORDER_COLOR
45
- }].concat((0, _toConsumableArray2.default)(_textColorPalette.textColorPaletteExtended));
45
+ }].concat((0, _toConsumableArray2.default)(_textColorPalette.textColorPalette));
46
46
  var state = {
47
47
  color: (0, _color.getActiveColor)(editorState),
48
48
  disabled: (0, _disabled.getDisabledState)(editorState),
@@ -35,8 +35,6 @@ var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-
35
35
 
36
36
  var _ColorPalette = _interopRequireDefault(require("../../../../ui/ColorPalette"));
37
37
 
38
- var _textColorPalette = require("../../../../ui/ColorPalette/Palettes/textColorPalette");
39
-
40
38
  var _Dropdown = _interopRequireDefault(require("../../../../ui/Dropdown"));
41
39
 
42
40
  var _styles = require("../../../../ui/styles");
@@ -109,20 +107,14 @@ var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
109
107
  if (!disabled) {
110
108
  var _this$props$editorVie;
111
109
 
112
- var _this$props$pluginSta = _this.props.pluginState,
113
- palette = _this$props$pluginSta.palette,
114
- defaultColor = _this$props$pluginSta.defaultColor; // we store color names in analytics
110
+ var palette = _this.props.pluginState.palette; // we store color names in analytics
115
111
 
116
112
  var swatch = palette.find(function (sw) {
117
113
  return sw.value === color;
118
114
  });
119
- var isNewColor = color !== defaultColor && !_textColorPalette.textColorPalette.some(function (col) {
120
- return col.value === color;
121
- });
122
115
 
123
116
  _this.dispatchAnalyticsEvent(_this.buildAnalyticsSelectColor({
124
- color: (swatch ? swatch.label : color).toLowerCase(),
125
- isNewColor: isNewColor
117
+ color: (swatch ? swatch.label : color).toLowerCase()
126
118
  }));
127
119
 
128
120
  _this.handleOpenChange({
@@ -99,13 +99,31 @@ var EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
99
99
  };
100
100
  }
101
101
  });
102
+
103
+ var isShortcutToFocusToolbar = function isShortcutToFocusToolbar(event) {
104
+ //Alt + F9 to reach first element in this main toolbar
105
+ return event.altKey && (event.key === 'F9' || event.keyCode === 120);
106
+ };
107
+
108
+ var handleEscape = function handleEscape(event) {
109
+ var _props$editorView;
110
+
111
+ if (!((_props$editorView = props.editorView) !== null && _props$editorView !== void 0 && _props$editorView.hasFocus())) {
112
+ var _props$editorView2;
113
+
114
+ (_props$editorView2 = props.editorView) === null || _props$editorView2 === void 0 ? void 0 : _props$editorView2.focus();
115
+ }
116
+ };
117
+
102
118
  return (0, _react2.jsx)(_context.ContextPanelConsumer, null, function (_ref) {
103
119
  var _props$featureFlags8, _props$featureFlags9, _props$featureFlags10;
104
120
 
105
121
  var contextPanelWidth = _ref.width;
106
122
  return (0, _react2.jsx)(_ToolbarArrowKeyNavigationProvider.ToolbarArrowKeyNavigationProvider, {
107
123
  editorView: props.editorView,
108
- childComponentSelector: "[data-testid='ak-editor-main-toolbar']"
124
+ childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
125
+ isShortcutToFocusToolbar: isShortcutToFocusToolbar,
126
+ handleEscape: handleEscape
109
127
  }, (0, _react2.jsx)("div", {
110
128
  css: (0, _MainToolbar.mainToolbarStyle)(props.showKeyline || contextPanelWidth > 0, !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.twoLineEditorToolbar)),
111
129
  "data-testid": "ak-editor-main-toolbar"
@@ -9,11 +9,5 @@ Object.defineProperty(exports, "textColorPalette", {
9
9
  return _uiColor.textColorPalette;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "textColorPaletteExtended", {
13
- enumerable: true,
14
- get: function get() {
15
- return _uiColor.textColorPaletteExtended;
16
- }
17
- });
18
12
 
19
13
  var _uiColor = require("@atlaskit/editor-common/ui-color");
@@ -35,7 +35,7 @@ var _consts = require("../../plugins/analytics/consts");
35
35
 
36
36
  var _types = require("../../plugins/analytics/types");
37
37
 
38
- var _templateObject, _templateObject2;
38
+ var _templateObject, _templateObject2, _templateObject3;
39
39
 
40
40
  // helps adjusts position of popup
41
41
  var colorPickerButtonWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"]))); // Control the size of color picker buttons and preview
@@ -126,6 +126,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
126
126
  };
127
127
 
128
128
  var title = props.title || '';
129
+ var buttonStyle = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: 6px;\n background-color: ", ";\n &:before {\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: center;\n content: '';\n border: 1px solid ", ";\n border-radius: ", "px;\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n padding: 0;\n }\n "])), "var(--ds-background-neutral, transparent)", _common.DEFAULT_BORDER_COLOR, (0, _constants.borderRadius)(), props.currentColor || 'transparent', ((_props$size = props.size) === null || _props$size === void 0 ? void 0 : _props$size.width) || 14, ((_props$size2 = props.size) === null || _props$size2 === void 0 ? void 0 : _props$size2.height) || 14);
129
130
  return (0, _react2.jsx)("div", {
130
131
  css: colorPickerButtonWrapper
131
132
  }, (0, _react2.jsx)(_tooltip.default, {
@@ -136,13 +137,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
136
137
  "aria-label": title,
137
138
  spacing: "compact",
138
139
  onClick: togglePopup,
139
- style: {
140
- backgroundColor: props.currentColor || 'transparent',
141
- border: "1px solid ".concat(_common.DEFAULT_BORDER_COLOR),
142
- width: "".concat(((_props$size = props.size) === null || _props$size === void 0 ? void 0 : _props$size.width) || 20, "px"),
143
- height: "".concat(((_props$size2 = props.size) === null || _props$size2 === void 0 ? void 0 : _props$size2.height) || 20, "px"),
144
- padding: 0
145
- }
140
+ css: buttonStyle
146
141
  })), renderPopup());
147
142
  };
148
143
 
@@ -40,7 +40,8 @@ var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigationProvid
40
40
  editorView = _ref.editorView,
41
41
  childComponentSelector = _ref.childComponentSelector,
42
42
  handleEscape = _ref.handleEscape,
43
- disableArrowKeyNavigation = _ref.disableArrowKeyNavigation;
43
+ disableArrowKeyNavigation = _ref.disableArrowKeyNavigation,
44
+ isShortcutToFocusToolbar = _ref.isShortcutToFocusToolbar;
44
45
  var wrapperRef = (0, _react.useRef)(null);
45
46
  var selectedItemIndex = (0, _react.useRef)(0);
46
47
  var incrementIndex = (0, _react.useCallback)(function (list) {
@@ -156,11 +157,35 @@ var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigationProvid
156
157
  }
157
158
  };
158
159
 
160
+ var globalKeyDownHandler = function globalKeyDownHandler(event) {
161
+ //To focus the first element in the toolbar
162
+ if (isShortcutToFocusToolbar(event)) {
163
+ var _filteredFocusableEle4, _filteredFocusableEle5;
164
+
165
+ var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
166
+ (_filteredFocusableEle4 = filteredFocusableElements[0]) === null || _filteredFocusableEle4 === void 0 ? void 0 : _filteredFocusableEle4.focus();
167
+ (_filteredFocusableEle5 = filteredFocusableElements[0]) === null || _filteredFocusableEle5 === void 0 ? void 0 : _filteredFocusableEle5.scrollIntoView({
168
+ behavior: 'smooth',
169
+ block: 'center',
170
+ inline: 'nearest'
171
+ });
172
+ }
173
+ };
174
+
159
175
  element === null || element === void 0 ? void 0 : element.addEventListener('keydown', handleKeyDown);
176
+
177
+ if (isShortcutToFocusToolbar) {
178
+ document.addEventListener('keydown', globalKeyDownHandler);
179
+ }
180
+
160
181
  return function () {
161
182
  element === null || element === void 0 ? void 0 : element.removeEventListener('keydown', handleKeyDown);
183
+
184
+ if (isShortcutToFocusToolbar) {
185
+ document.removeEventListener('keydown', globalKeyDownHandler);
186
+ }
162
187
  };
163
- }, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex]);
188
+ }, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar]);
164
189
  return /*#__PURE__*/_react.default.createElement("div", {
165
190
  className: "custom-key-handler-wrapper",
166
191
  ref: wrapperRef
@@ -50,17 +50,20 @@ var InstrumentedPlugin = /*#__PURE__*/function (_SafePlugin) {
50
50
  } : _options$uiTracking,
51
51
  _options$saferDispatc = options.saferDispatchedTransactions,
52
52
  saferDispatchedTransactions = _options$saferDispatc === void 0 ? false : _options$saferDispatc,
53
+ _options$saferDispatc2 = options.saferDispatchedTransactionsAnalyticsOnly,
54
+ saferDispatchedTransactionsAnalyticsOnly = _options$saferDispatc2 === void 0 ? false : _options$saferDispatc2,
53
55
  dispatchAnalyticsEvent = options.dispatchAnalyticsEvent;
54
- var shouldOverrideApply = transactionTracking.enabled && transactionTracker || saferDispatchedTransactions;
56
+ var shouldOverrideApply = transactionTracking.enabled && transactionTracker || saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly;
55
57
 
56
58
  if (shouldOverrideApply && spec.state) {
57
59
  var originalApply = spec.state.apply.bind(spec.state);
58
60
 
59
61
  spec.state.apply = function (aTr, value, oldState, newState) {
60
62
  var self = (0, _assertThisInitialized2.default)(_this);
61
- var tr = saferDispatchedTransactions ? new Proxy(aTr, (0, _saferTransactions.freezeUnsafeTransactionProperties)({
63
+ var tr = saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly ? new Proxy(aTr, (0, _saferTransactions.freezeUnsafeTransactionProperties)({
62
64
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
63
- pluginKey: self.key
65
+ pluginKey: self.key,
66
+ analyticsOnly: saferDispatchedTransactionsAnalyticsOnly
64
67
  })) : aTr;
65
68
  var shouldTrackTransactions = transactionTracker === null || transactionTracker === void 0 ? void 0 : transactionTracker.shouldTrackTransaction(transactionTracking);
66
69
 
@@ -21,7 +21,8 @@ var isReadOnlyProperty = function isReadOnlyProperty(prop) {
21
21
 
22
22
  var freezeUnsafeTransactionProperties = function freezeUnsafeTransactionProperties(_ref) {
23
23
  var dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
24
- pluginKey = _ref.pluginKey;
24
+ pluginKey = _ref.pluginKey,
25
+ analyticsOnly = _ref.analyticsOnly;
25
26
 
26
27
  var isUnsafe = function isUnsafe() {
27
28
  if (dispatchAnalyticsEvent) {
@@ -31,11 +32,16 @@ var freezeUnsafeTransactionProperties = function freezeUnsafeTransactionProperti
31
32
  eventType: _analytics.EVENT_TYPE.OPERATIONAL,
32
33
  attributes: {
33
34
  pluginKey: pluginKey || 'unknown'
35
+ },
36
+ nonPrivacySafeAttributes: {
37
+ stack: new Error().stack
34
38
  }
35
39
  });
36
40
  }
37
41
 
38
- throw new Error(UNSAFE_PROPERTY_SET_ERROR);
42
+ if (!analyticsOnly) {
43
+ throw new Error(UNSAFE_PROPERTY_SET_ERROR);
44
+ }
39
45
  };
40
46
 
41
47
  return {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "177.0.1";
9
+ var version = "178.0.0";
10
10
  exports.version = version;
11
11
 
12
12
  var nextMajorVersion = function nextMajorVersion() {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "177.0.1",
3
+ "version": "178.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -68,8 +68,10 @@ export class ErrorBoundaryWithEditorView extends React.Component {
68
68
  actionSubject: ACTION_SUBJECT.EDITOR,
69
69
  eventType: EVENT_TYPE.OPERATIONAL,
70
70
  attributes: {
71
- errorStack,
72
71
  errorId: sharedId
72
+ },
73
+ nonPrivacySafeAttributes: {
74
+ errorStack
73
75
  }
74
76
  });
75
77
 
@@ -331,9 +331,10 @@ export class ReactEditorView extends React.Component {
331
331
 
332
332
  const nodes = findChangedNodesFromTransaction(unsafeTransaction);
333
333
  const changedNodesValid = validateNodes(nodes);
334
- const transaction = this.featureFlags.saferDispatchedTransactions ? new Proxy(unsafeTransaction, freezeUnsafeTransactionProperties({
334
+ const transaction = this.featureFlags.saferDispatchedTransactions || this.featureFlags.saferDispatchedTransactionsAnalyticsOnly ? new Proxy(unsafeTransaction, freezeUnsafeTransactionProperties({
335
335
  dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
336
- pluginKey: 'unknown-reacteditorview'
336
+ pluginKey: 'unknown-reacteditorview',
337
+ analyticsOnly: this.featureFlags.saferDispatchedTransactionsAnalyticsOnly
337
338
  })) : unsafeTransaction;
338
339
 
339
340
  if (changedNodesValid) {
@@ -96,7 +96,8 @@ export function createPMPlugins(config) {
96
96
  transactionTracking = TRACKING_DEFAULT
97
97
  } = performanceTracking;
98
98
  const saferDispatchedTransactions = featureFlags.saferDispatchedTransactions;
99
- const useInstrumentedPlugin = uiTracking.enabled || transactionTracking.enabled || saferDispatchedTransactions;
99
+ const saferDispatchedTransactionsAnalyticsOnly = featureFlags.saferDispatchedTransactionsAnalyticsOnly;
100
+ const useInstrumentedPlugin = uiTracking.enabled || transactionTracking.enabled || saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly;
100
101
 
101
102
  if (process.env.NODE_ENV === 'development' && transactionTracking.enabled && !transactionTracker) {
102
103
  // eslint-disable-next-line no-console
@@ -107,6 +108,7 @@ export function createPMPlugins(config) {
107
108
  uiTracking,
108
109
  transactionTracking,
109
110
  saferDispatchedTransactions,
111
+ saferDispatchedTransactionsAnalyticsOnly,
110
112
  dispatchAnalyticsEvent
111
113
  }, transactionTracker) : plugin => plugin;
112
114
  return editorConfig.pmPlugins.sort(sortByOrder('plugins')).map(({
@@ -312,6 +312,8 @@ export default class Editor extends React.Component {
312
312
  }
313
313
 
314
314
  deprecationWarnings(props) {
315
+ var _props$allowTextColor;
316
+
315
317
  if (process.env.NODE_ENV === 'production') {
316
318
  return;
317
319
  }
@@ -344,6 +346,11 @@ export default class Editor extends React.Component {
344
346
  // eslint-disable-next-line no-console
345
347
  console.warn(`Advanced table options are deprecated (except isHeaderRowRequired) to continue using advanced table features use - <Editor allowTables={{ advanced: true }} /> [Will be changed in editor-core@${nextVersion}]`);
346
348
  }
349
+
350
+ if (props.hasOwnProperty('allowTextColor') && typeof props.allowTextColor !== 'boolean' && (props === null || props === void 0 ? void 0 : (_props$allowTextColor = props.allowTextColor) === null || _props$allowTextColor === void 0 ? void 0 : _props$allowTextColor.allowMoreTextColors) !== undefined) {
351
+ // eslint-disable-next-line no-console
352
+ console.warn(`"allowMoreTextColors" field of "allowTextColor" property is deprecated. It will be removedin editor-core@${nextVersion}. The color palette now shows more colors by default.`);
353
+ }
347
354
  }
348
355
 
349
356
  onEditorDestroyed(_instance) {
@@ -0,0 +1,63 @@
1
+ import { Selection, TextSelection } from 'prosemirror-state';
2
+
3
+ // We should override default behaviour when selection spans node depths or
4
+ // ends at a node junction
5
+ const shouldMoveCursorAfterDelete = state => {
6
+ const {
7
+ selection: {
8
+ $from,
9
+ $to
10
+ }
11
+ } = state;
12
+ const nodeRange = $from.blockRange($to);
13
+
14
+ if (!nodeRange) {
15
+ return false;
16
+ }
17
+
18
+ const hasSameAncestor = $from.depth === $to.depth && $from.depth - 1 === nodeRange.depth;
19
+ const toPositionHasNodeAfter = !!$to.nodeAfter;
20
+
21
+ if (hasSameAncestor || toPositionHasNodeAfter) {
22
+ return false;
23
+ }
24
+
25
+ return true;
26
+ };
27
+ /**
28
+ * Fixes cursor position after delete for list/task in panel and table
29
+ *
30
+ * ED-13873 fixes a bug where after deleting a list the cursor would move
31
+ * to the cell to the right. Uses setSelection to position the cursor as expected after deleting.
32
+ *
33
+ * @param state EditorState<any>
34
+ * @param dispatch CommandDispatch
35
+ * @returns boolean
36
+ */
37
+
38
+
39
+ export const deleteAndMoveCursor = (state, dispatch) => {
40
+ if (state.selection.empty || !(state.selection instanceof TextSelection)) {
41
+ return false;
42
+ }
43
+
44
+ if (!shouldMoveCursorAfterDelete(state)) {
45
+ return false;
46
+ }
47
+
48
+ const {
49
+ tr
50
+ } = state;
51
+ tr.deleteSelection(); // Make sure the next position is not out of boundaries
52
+
53
+ const previousPosition = Math.min(Math.max(state.selection.$from.pos, 0), tr.doc.content.size); // Override default delete behaviour that moves the cursor to first suitable position after selection (postive bias).
54
+ // See. selectionToInsertionEnd. We will override behavior with negative bias (search for suitable cursor position backwards).
55
+
56
+ tr.setSelection(Selection.near(tr.doc.resolve(previousPosition), -1));
57
+
58
+ if (dispatch) {
59
+ dispatch(tr.scrollIntoView());
60
+ }
61
+
62
+ return true;
63
+ };
@@ -1,3 +1,4 @@
1
1
  export { cleanUpAtTheStartOfDocument, insertBlockType, insertBlockTypesWithAnalytics, setBlockType, setBlockTypeWithAnalytics, setHeading, setHeadingWithAnalytics, setNormalText, setNormalTextWithAnalytics } from './block-type';
2
2
  export { insertBlock } from './insert-block';
3
- export { isConvertableToCodeBlock, transformToCodeBlockAction } from './transform-to-code-block';
3
+ export { isConvertableToCodeBlock, transformToCodeBlockAction } from './transform-to-code-block';
4
+ export { deleteAndMoveCursor } from './delete-and-move-cursor';
@@ -1,12 +1,15 @@
1
1
  import { redo, undo } from 'prosemirror-history';
2
+ import { chainCommands } from 'prosemirror-commands';
2
3
  import * as keymaps from '../../../keymaps';
3
4
  import * as commands from '../../../commands';
4
5
  import * as blockTypes from '../types';
5
6
  import { keymap } from '../../../utils/keymap';
6
- import { cleanUpAtTheStartOfDocument, insertBlockTypesWithAnalytics } from '../commands';
7
+ import { cleanUpAtTheStartOfDocument, deleteAndMoveCursor, insertBlockTypesWithAnalytics } from '../commands';
7
8
  import { deleteEmptyParagraphAndMoveBlockUp } from '../../../utils/commands';
8
9
  import { INPUT_METHOD } from '../../analytics';
9
10
  import { isNodeAWrappingBlockNode } from '../utils';
11
+ const backspace = chainCommands(cleanUpAtTheStartOfDocument, deleteAndMoveCursor);
12
+ const del = chainCommands(deleteEmptyParagraphAndMoveBlockUp(isNodeAWrappingBlockNode), deleteAndMoveCursor);
10
13
  export default function keymapPlugin(schema, featureFlags) {
11
14
  const list = {};
12
15
  keymaps.bindKeymapWithCommand(keymaps.insertNewLine.common, commands.insertNewLineWithAnalytics, list);
@@ -14,9 +17,9 @@ export default function keymapPlugin(schema, featureFlags) {
14
17
  keymaps.bindKeymapWithCommand(keymaps.moveDown.common, commands.createNewParagraphBelow, list);
15
18
  keymaps.bindKeymapWithCommand(keymaps.findKeyMapForBrowser(keymaps.redo), redo, list);
16
19
  keymaps.bindKeymapWithCommand(keymaps.undo.common, undo, list);
17
- keymaps.bindKeymapWithCommand(keymaps.backspace.common, cleanUpAtTheStartOfDocument, list);
18
- keymaps.bindKeymapWithCommand(keymaps.deleteKey.common, deleteEmptyParagraphAndMoveBlockUp(isNodeAWrappingBlockNode), list);
19
- keymaps.bindKeymapWithCommand(keymaps.forwardDelete.mac, deleteEmptyParagraphAndMoveBlockUp(isNodeAWrappingBlockNode), list);
20
+ keymaps.bindKeymapWithCommand(keymaps.backspace.common, backspace, list);
21
+ keymaps.bindKeymapWithCommand(keymaps.deleteKey.common, del, list);
22
+ keymaps.bindKeymapWithCommand(keymaps.forwardDelete.mac, del, list);
20
23
 
21
24
  if (schema.nodes[blockTypes.BLOCK_QUOTE.nodeName]) {
22
25
  keymaps.bindKeymapWithCommand(keymaps.findShortcutByKeymap(keymaps.toggleBlockQuote), insertBlockTypesWithAnalytics(blockTypes.BLOCK_QUOTE.name, INPUT_METHOD.KEYBOARD), list);
@@ -26,7 +26,7 @@ function getSpellCheck(featureFlags) {
26
26
 
27
27
 
28
28
  export function createFeatureFlagsFromProps(props) {
29
- var _props$featureFlags, _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$allowTables5, _props$featureFlags10, _props$featureFlags11, _props$allowTables6, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$collabEdit, _props$collabEdit2, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41, _props$featureFlags42;
29
+ var _props$featureFlags, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$allowTables5, _props$featureFlags10, _props$featureFlags11, _props$allowTables6, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$collabEdit, _props$collabEdit2, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41, _props$featureFlags42, _props$featureFlags43, _props$featureFlags44;
30
30
 
31
31
  const normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
32
32
  const tableCellOptionsInFloatingToolbar = normalizedFeatureFlags.tableCellOptionsInFloatingToolbar || ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableCellOptionsInFloatingToolbar) || undefined;
@@ -34,7 +34,6 @@ export function createFeatureFlagsFromProps(props) {
34
34
  newInsertionBehaviour: props.allowNewInsertionBehaviour,
35
35
  interactiveExpand: typeof props.allowExpand === 'boolean' ? props.allowExpand : Boolean(props.allowExpand && props.allowExpand.allowInteractiveExpand !== false),
36
36
  placeholderBracketHint: !!props.placeholderBracketHint,
37
- moreTextColors: typeof props.allowTextColor === 'boolean' ? false : Boolean(((_props$allowTextColor = props.allowTextColor) === null || _props$allowTextColor === void 0 ? void 0 : _props$allowTextColor.allowMoreTextColors) === true),
38
37
  findReplace: !!props.allowFindReplace,
39
38
  findReplaceMatchCase: typeof props.allowFindReplace === 'object' && Boolean(props.allowFindReplace.allowMatchCase),
40
39
  addColumnWithCustomStep: !props.allowTables || typeof props.allowTables === 'boolean' ? false : Boolean(props.allowTables.allowAddColumnWithCustomStep),
@@ -55,21 +54,22 @@ export function createFeatureFlagsFromProps(props) {
55
54
  ufo: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.ufo) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.ufo) : false),
56
55
  twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.twoLineEditorToolbar) : false),
57
56
  saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.saferDispatchedTransactions) : false)),
57
+ saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.saferDispatchedTransactionsAnalyticsOnly) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.saferDispatchedTransactionsAnalyticsOnly) : false)),
58
58
  useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
59
- chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
59
+ chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
60
60
  tableCellOptionsInFloatingToolbar: typeof tableCellOptionsInFloatingToolbar === 'boolean' ? tableCellOptionsInFloatingToolbar : false,
61
- showHoverPreview: Boolean(typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29.showHoverPreview) === 'boolean' ? !!((_props$featureFlags30 = props.featureFlags) !== null && _props$featureFlags30 !== void 0 && _props$featureFlags30.showHoverPreview) : false),
62
- indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags32 = props.featureFlags) !== null && _props$featureFlags32 !== void 0 && _props$featureFlags32.indentationButtonsInTheToolbar) : false)),
63
- floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags34 = props.featureFlags) !== null && _props$featureFlags34 !== void 0 && _props$featureFlags34.floatingToolbarCopyButton) : false)),
64
- floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
61
+ showHoverPreview: Boolean(typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.showHoverPreview) === 'boolean' ? !!((_props$featureFlags32 = props.featureFlags) !== null && _props$featureFlags32 !== void 0 && _props$featureFlags32.showHoverPreview) : false),
62
+ indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags34 = props.featureFlags) !== null && _props$featureFlags34 !== void 0 && _props$featureFlags34.indentationButtonsInTheToolbar) : false)),
63
+ floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags36 = props.featureFlags) !== null && _props$featureFlags36 !== void 0 && _props$featureFlags36.floatingToolbarCopyButton) : false)),
64
+ floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
65
65
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
66
66
  // Including fallback to props.featureFlags so that mobile feature flags
67
67
  // are included (they are not kebab cased)
68
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags36 = props.featureFlags) === null || _props$featureFlags36 === void 0 ? void 0 : _props$featureFlags36.restartNumberedLists) === true,
69
- listNumberContinuity: normalizedFeatureFlags.listNumberContinuity === true || ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37.listNumberContinuity) === true,
70
- restartNumberedListsToolbar: normalizedFeatureFlags.restartNumberedListsToolbar === true || ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.restartNumberedListsToolbar) === true,
71
- useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags39 = props.featureFlags) === null || _props$featureFlags39 === void 0 ? void 0 : _props$featureFlags39.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags40 = props.featureFlags) !== null && _props$featureFlags40 !== void 0 && _props$featureFlags40.useSomewhatSemanticTextColorNames) : false)),
68
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.restartNumberedLists) === true,
69
+ listNumberContinuity: normalizedFeatureFlags.listNumberContinuity === true || ((_props$featureFlags39 = props.featureFlags) === null || _props$featureFlags39 === void 0 ? void 0 : _props$featureFlags39.listNumberContinuity) === true,
70
+ restartNumberedListsToolbar: normalizedFeatureFlags.restartNumberedListsToolbar === true || ((_props$featureFlags40 = props.featureFlags) === null || _props$featureFlags40 === void 0 ? void 0 : _props$featureFlags40.restartNumberedListsToolbar) === true,
71
+ useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags41 = props.featureFlags) === null || _props$featureFlags41 === void 0 ? void 0 : _props$featureFlags41.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags42 = props.featureFlags) !== null && _props$featureFlags42 !== void 0 && _props$featureFlags42.useSomewhatSemanticTextColorNames) : false)),
72
72
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
73
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags41 = props.featureFlags) === null || _props$featureFlags41 === void 0 ? void 0 : _props$featureFlags41['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags42 = props.featureFlags) !== null && _props$featureFlags42 !== void 0 && _props$featureFlags42['prevent-popup-overflow']) : false)
73
+ preventPopupOverflow: Boolean(typeof ((_props$featureFlags43 = props.featureFlags) === null || _props$featureFlags43 === void 0 ? void 0 : _props$featureFlags43['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags44 = props.featureFlags) !== null && _props$featureFlags44 !== void 0 && _props$featureFlags44['prevent-popup-overflow']) : false)
74
74
  };
75
75
  }