@atlaskit/editor-common 123.0.1 → 123.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/messages/codeBlockButton.js +5 -0
  3. package/dist/cjs/node-anchor/limited-mode-document-thresholds.js +3 -7
  4. package/dist/cjs/node-anchor/should-enable-limited-mode.js +1 -2
  5. package/dist/cjs/node-selection/index.js +0 -1
  6. package/dist/cjs/ui/Popup/index.js +1 -3
  7. package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +4 -12
  8. package/dist/cjs/utils/commands.js +0 -11
  9. package/dist/es2019/messages/codeBlockButton.js +5 -0
  10. package/dist/es2019/node-anchor/limited-mode-document-thresholds.js +4 -9
  11. package/dist/es2019/node-anchor/should-enable-limited-mode.js +1 -2
  12. package/dist/es2019/node-selection/index.js +0 -1
  13. package/dist/es2019/ui/Popup/index.js +1 -3
  14. package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +4 -12
  15. package/dist/es2019/utils/commands.js +0 -11
  16. package/dist/esm/messages/codeBlockButton.js +5 -0
  17. package/dist/esm/node-anchor/limited-mode-document-thresholds.js +3 -8
  18. package/dist/esm/node-anchor/should-enable-limited-mode.js +1 -2
  19. package/dist/esm/node-selection/index.js +0 -1
  20. package/dist/esm/ui/Popup/index.js +1 -3
  21. package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +4 -12
  22. package/dist/esm/utils/commands.js +0 -11
  23. package/dist/types/messages/codeBlockButton.d.ts +5 -0
  24. package/dist/types/node-anchor/limited-mode-document-thresholds.d.ts +2 -2
  25. package/dist/types/node-anchor/should-enable-limited-mode.d.ts +1 -2
  26. package/dist/types/node-selection/index.d.ts +0 -1
  27. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 123.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`38bbb9af238e1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/38bbb9af238e1) -
8
+ Clean up experiment `platform_editor_limited_threshold_tweaks`
9
+ - [`8d37dc7e55d62`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d37dc7e55d62) -
10
+ Clean up shipped experiment `platform_editor_block_menu`
11
+ - [`8864ef7070f02`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8864ef7070f02) -
12
+ Use the precise code-block copy accessible name behind platform_editor_a11y_codeblock_copy_name.
13
+ - Updated dependencies
14
+
3
15
  ## 123.0.1
4
16
 
5
17
  ### Patch Changes
@@ -11,6 +11,11 @@ var codeBlockButtonMessages = exports.codeBlockButtonMessages = (0, _reactIntl.d
11
11
  defaultMessage: 'Copy as text',
12
12
  description: 'Copy the content of the code block as text to your clipboard'
13
13
  },
14
+ copyCodeSnippetToClipboard: {
15
+ id: 'editor-common.messages.codeBlockButton.copyCodeSnippetToClipboard',
16
+ defaultMessage: 'Copy code text',
17
+ description: 'Copy the code text to your clipboard'
18
+ },
14
19
  copiedCodeToClipboard: {
15
20
  id: 'fabric.editor.codeBlockCopyButton.copiedToClipboard',
16
21
  defaultMessage: 'Copied!',
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getLimitedModeThresholds = exports.LIMITED_MODE_TWEAKED_NODE_COUNT_THRESHOLD = exports.LIMITED_MODE_TWEAKED_DOC_SIZE_THRESHOLD = exports.LIMITED_MODE_DEFAULT_NODE_COUNT_THRESHOLD = exports.LIMITED_MODE_DEFAULT_DOC_SIZE_THRESHOLD = void 0;
7
- var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
8
7
  /** Fixed document thresholds for limited (performance) mode (previously Statsig-driven). */
9
8
  var LIMITED_MODE_DEFAULT_NODE_COUNT_THRESHOLD = exports.LIMITED_MODE_DEFAULT_NODE_COUNT_THRESHOLD = 5000;
10
9
 
@@ -38,16 +37,13 @@ var LIMITED_MODE_TWEAKED_DOC_SIZE_THRESHOLD = exports.LIMITED_MODE_TWEAKED_DOC_S
38
37
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
39
38
 
40
39
  /**
41
- * The document thresholds currently in force. This is the only place the cohort is resolved — the
42
- * limited-mode decision itself is identical either way, only these two numbers change.
40
+ * The document thresholds currently in force. Only these two numbers determine when limited mode
41
+ * engages — the decision logic itself is identical regardless of threshold values.
43
42
  */
44
43
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
45
44
  var getLimitedModeThresholds = exports.getLimitedModeThresholds = function getLimitedModeThresholds() {
46
- return (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_limited_threshold_tweaks') ? {
45
+ return {
47
46
  docSizeThreshold: LIMITED_MODE_TWEAKED_DOC_SIZE_THRESHOLD,
48
47
  nodeCountThreshold: LIMITED_MODE_TWEAKED_NODE_COUNT_THRESHOLD
49
- } : {
50
- docSizeThreshold: LIMITED_MODE_DEFAULT_DOC_SIZE_THRESHOLD,
51
- nodeCountThreshold: LIMITED_MODE_DEFAULT_NODE_COUNT_THRESHOLD
52
48
  };
53
49
  };
@@ -21,8 +21,7 @@ var LEGACY_CONTENT_EXTENSION_KEY = 'legacy-content';
21
21
  * 3. node count exceeds the node-count threshold
22
22
  *
23
23
  * Thresholds default to `getLimitedModeThresholds()` but can be passed in, which is how the
24
- * limited-mode plugin's latch policy supplies them from its own config. That default is where the
25
- * `platform_editor_limited_threshold_tweaks` cohort is resolved — see
24
+ * limited-mode plugin's latch policy supplies them from its own config. See
26
25
  * `limited-mode-document-thresholds.ts` for the values and the data behind them.
27
26
  *
28
27
  * Performance: doc size is checked first so an oversized document skips the traversal entirely.
@@ -8,7 +8,6 @@ var _state = require("@atlaskit/editor-prosemirror/state");
8
8
  var _utils = require("@atlaskit/editor-tables/utils");
9
9
  /**
10
10
  * Returns a NodeSelection for the node at `start`.
11
- * Matches the `platform_editor_block_menu=true` path in block-controls:
12
11
  * mediaGroup with a single child → select the child; all others → select the node.
13
12
  * Returns false when no node exists at `start`.
14
13
  */
@@ -17,8 +17,6 @@ var _focusTrap = _interopRequireDefault(require("focus-trap"));
17
17
  var _rafSchd = _interopRequireDefault(require("raf-schd"));
18
18
  var _reactDom = require("react-dom");
19
19
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
20
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
21
- var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
22
20
  var _utils = require("./utils");
23
21
  var _validatePosition = require("./validatePosition");
24
22
  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; }
@@ -73,7 +71,7 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
73
71
  returnFocusOnDeactivate: false
74
72
  };
75
73
  var trapConfig = typeof _this.props.focusTrap === 'boolean' ? defaultTrapConfig : _objectSpread(_objectSpread({}, defaultTrapConfig), _this.props.focusTrap);
76
- _this.focusTrap = (0, _focusTrap.default)(popup, (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true) || (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) ? trapConfig : defaultTrapConfig);
74
+ _this.focusTrap = (0, _focusTrap.default)(popup, trapConfig);
77
75
  _this.focusTrap.activate();
78
76
  }));
79
77
  return _this;
@@ -56,6 +56,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
56
56
  }
57
57
  });
58
58
  (0, _defineProperty2.default)(_this, "handleKeyDown", function (evt) {
59
+ var _this$props$handleKey, _this$props;
59
60
  if (!_this.props.isActiveComponent) {
60
61
  return;
61
62
  }
@@ -73,12 +74,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
73
74
  } else if ((evt.code === 'Delete' || evt.code === 'Backspace') && _this.props.handleBackspaceDeleteKeydown) {
74
75
  _this.props.handleBackspaceDeleteKeydown(evt);
75
76
  }
76
- if ((0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true, {
77
- exposure: true
78
- })) {
79
- var _this$props$handleKey, _this$props;
80
- (_this$props$handleKey = (_this$props = _this.props).handleKeyDown) === null || _this$props$handleKey === void 0 || _this$props$handleKey.call(_this$props, evt);
81
- }
77
+ (_this$props$handleKey = (_this$props = _this.props).handleKeyDown) === null || _this$props$handleKey === void 0 || _this$props$handleKey.call(_this$props, evt);
82
78
  });
83
79
  return _this;
84
80
  }
@@ -94,9 +90,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
94
90
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
95
91
  document.addEventListener('click', this.handleClick, options);
96
92
  }
97
- if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown && (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true, {
98
- exposure: true
99
- })) {
93
+ if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown) {
100
94
  var _this$props$editorRef;
101
95
  // Attached event to the menu so that 'ESC' events from the opened menu also will be handled.
102
96
  // Ignored via go/ees005
@@ -121,9 +115,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
121
115
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
122
116
  document.removeEventListener('click', this.handleClick, options);
123
117
  }
124
- if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown && (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true, {
125
- exposure: true
126
- })) {
118
+ if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown) {
127
119
  var _this$props$editorRef2;
128
120
  // Ignored via go/ees005
129
121
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
@@ -44,7 +44,6 @@ Object.defineProperty(exports, "insertNewLine", {
44
44
  });
45
45
  exports.walkPrevNode = exports.walkNextNode = exports.isEmptySelectionAtStart = exports.isEmptySelectionAtEnd = exports.insertNewLineWithAnalytics = void 0;
46
46
  var _state = require("@atlaskit/editor-prosemirror/state");
47
- var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
48
47
  var _analytics = require("../analytics");
49
48
  var _editorAnalytics = require("../editor-analytics");
50
49
  var _selection = require("../selection");
@@ -192,11 +191,6 @@ function canMoveUp(state) {
192
191
  if (selection instanceof _state.NodeSelection && (0, _isMediaNode.isMediaNode)(selection.node)) {
193
192
  return true;
194
193
  }
195
- if (selection instanceof _state.TextSelection && !(0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
196
- if (!selection.empty) {
197
- return true;
198
- }
199
- }
200
194
  return !(0, _atTheBeginningOfDoc.atTheBeginningOfDoc)(state);
201
195
  }
202
196
  function canMoveDown(state) {
@@ -208,11 +202,6 @@ function canMoveDown(state) {
208
202
  if (selection instanceof _state.NodeSelection && (0, _isMediaNode.isMediaNode)(selection.node)) {
209
203
  return true;
210
204
  }
211
- if (selection instanceof _state.TextSelection && !(0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
212
- if (!selection.empty) {
213
- return true;
214
- }
215
- }
216
205
  return !(0, _atTheEndOfDoc.atTheEndOfDoc)(state);
217
206
  }
218
207
 
@@ -5,6 +5,11 @@ export const codeBlockButtonMessages = defineMessages({
5
5
  defaultMessage: 'Copy as text',
6
6
  description: 'Copy the content of the code block as text to your clipboard'
7
7
  },
8
+ copyCodeSnippetToClipboard: {
9
+ id: 'editor-common.messages.codeBlockButton.copyCodeSnippetToClipboard',
10
+ defaultMessage: 'Copy code text',
11
+ description: 'Copy the code text to your clipboard'
12
+ },
8
13
  copiedCodeToClipboard: {
9
14
  id: 'fabric.editor.codeBlockCopyButton.copiedToClipboard',
10
15
  defaultMessage: 'Copied!',
@@ -1,5 +1,3 @@
1
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
2
-
3
1
  /** Fixed document thresholds for limited (performance) mode (previously Statsig-driven). */
4
2
  export const LIMITED_MODE_DEFAULT_NODE_COUNT_THRESHOLD = 5000;
5
3
 
@@ -33,14 +31,11 @@ export const LIMITED_MODE_TWEAKED_DOC_SIZE_THRESHOLD = 750000;
33
31
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
34
32
 
35
33
  /**
36
- * The document thresholds currently in force. This is the only place the cohort is resolved — the
37
- * limited-mode decision itself is identical either way, only these two numbers change.
34
+ * The document thresholds currently in force. Only these two numbers determine when limited mode
35
+ * engages — the decision logic itself is identical regardless of threshold values.
38
36
  */
39
37
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
40
- export const getLimitedModeThresholds = () => isExperimentEnabled('platform_editor_limited_threshold_tweaks') ? {
38
+ export const getLimitedModeThresholds = () => ({
41
39
  docSizeThreshold: LIMITED_MODE_TWEAKED_DOC_SIZE_THRESHOLD,
42
40
  nodeCountThreshold: LIMITED_MODE_TWEAKED_NODE_COUNT_THRESHOLD
43
- } : {
44
- docSizeThreshold: LIMITED_MODE_DEFAULT_DOC_SIZE_THRESHOLD,
45
- nodeCountThreshold: LIMITED_MODE_DEFAULT_NODE_COUNT_THRESHOLD
46
- };
41
+ });
@@ -15,8 +15,7 @@ const LEGACY_CONTENT_EXTENSION_KEY = 'legacy-content';
15
15
  * 3. node count exceeds the node-count threshold
16
16
  *
17
17
  * Thresholds default to `getLimitedModeThresholds()` but can be passed in, which is how the
18
- * limited-mode plugin's latch policy supplies them from its own config. That default is where the
19
- * `platform_editor_limited_threshold_tweaks` cohort is resolved — see
18
+ * limited-mode plugin's latch policy supplies them from its own config. See
20
19
  * `limited-mode-document-thresholds.ts` for the values and the data behind them.
21
20
  *
22
21
  * Performance: doc size is checked first so an oversized document skips the traversal entirely.
@@ -3,7 +3,6 @@ import { selectTableClosestToPos } from '@atlaskit/editor-tables/utils';
3
3
 
4
4
  /**
5
5
  * Returns a NodeSelection for the node at `start`.
6
- * Matches the `platform_editor_block_menu=true` path in block-controls:
7
6
  * mediaGroup with a single child → select the child; all others → select the node.
8
7
  * Returns false when no node exists at `start`.
9
8
  */
@@ -5,8 +5,6 @@ import createFocusTrap from 'focus-trap';
5
5
  import rafSchedule from 'raf-schd';
6
6
  import { createPortal, flushSync } from 'react-dom';
7
7
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
8
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
10
8
  import { calculatePlacement, calculatePosition, findOverflowScrollParent } from './utils';
11
9
  import { validatePosition } from './validatePosition';
12
10
  // Ignored via go/ees005
@@ -53,7 +51,7 @@ export default class Popup extends React.Component {
53
51
  ...defaultTrapConfig,
54
52
  ...this.props.focusTrap
55
53
  };
56
- this.focusTrap = createFocusTrap(popup, editorExperiment('platform_editor_block_menu', true) || expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? trapConfig : defaultTrapConfig);
54
+ this.focusTrap = createFocusTrap(popup, trapConfig);
57
55
  this.focusTrap.activate();
58
56
  }));
59
57
  }
@@ -28,6 +28,7 @@ class WithOutsideClick extends PureComponent {
28
28
  }
29
29
  });
30
30
  _defineProperty(this, "handleKeyDown", evt => {
31
+ var _this$props$handleKey, _this$props;
31
32
  if (!this.props.isActiveComponent) {
32
33
  return;
33
34
  }
@@ -45,12 +46,7 @@ class WithOutsideClick extends PureComponent {
45
46
  } else if ((evt.code === 'Delete' || evt.code === 'Backspace') && this.props.handleBackspaceDeleteKeydown) {
46
47
  this.props.handleBackspaceDeleteKeydown(evt);
47
48
  }
48
- if (editorExperiment('platform_editor_block_menu', true, {
49
- exposure: true
50
- })) {
51
- var _this$props$handleKey, _this$props;
52
- (_this$props$handleKey = (_this$props = this.props).handleKeyDown) === null || _this$props$handleKey === void 0 ? void 0 : _this$props$handleKey.call(_this$props, evt);
53
- }
49
+ (_this$props$handleKey = (_this$props = this.props).handleKeyDown) === null || _this$props$handleKey === void 0 ? void 0 : _this$props$handleKey.call(_this$props, evt);
54
50
  });
55
51
  }
56
52
  componentDidMount() {
@@ -62,9 +58,7 @@ class WithOutsideClick extends PureComponent {
62
58
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
63
59
  document.addEventListener('click', this.handleClick, options);
64
60
  }
65
- if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown && editorExperiment('platform_editor_block_menu', true, {
66
- exposure: true
67
- })) {
61
+ if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown) {
68
62
  var _this$props$editorRef;
69
63
  // Attached event to the menu so that 'ESC' events from the opened menu also will be handled.
70
64
  // Ignored via go/ees005
@@ -87,9 +81,7 @@ class WithOutsideClick extends PureComponent {
87
81
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
88
82
  document.removeEventListener('click', this.handleClick, options);
89
83
  }
90
- if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown && editorExperiment('platform_editor_block_menu', true, {
91
- exposure: true
92
- })) {
84
+ if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown) {
93
85
  var _this$props$editorRef2;
94
86
  // Ignored via go/ees005
95
87
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
@@ -1,7 +1,6 @@
1
1
  /* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
2
2
 
3
3
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
4
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
5
4
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../analytics';
6
5
  import { withAnalytics } from '../editor-analytics';
7
6
  import { GapCursorSelection } from '../selection';
@@ -151,11 +150,6 @@ function canMoveUp(state) {
151
150
  if (selection instanceof NodeSelection && isMediaNode(selection.node)) {
152
151
  return true;
153
152
  }
154
- if (selection instanceof TextSelection && !editorExperiment('platform_editor_block_menu', true)) {
155
- if (!selection.empty) {
156
- return true;
157
- }
158
- }
159
153
  return !atTheBeginningOfDoc(state);
160
154
  }
161
155
  function canMoveDown(state) {
@@ -169,11 +163,6 @@ function canMoveDown(state) {
169
163
  if (selection instanceof NodeSelection && isMediaNode(selection.node)) {
170
164
  return true;
171
165
  }
172
- if (selection instanceof TextSelection && !editorExperiment('platform_editor_block_menu', true)) {
173
- if (!selection.empty) {
174
- return true;
175
- }
176
- }
177
166
  return !atTheEndOfDoc(state);
178
167
  }
179
168
 
@@ -5,6 +5,11 @@ export var codeBlockButtonMessages = defineMessages({
5
5
  defaultMessage: 'Copy as text',
6
6
  description: 'Copy the content of the code block as text to your clipboard'
7
7
  },
8
+ copyCodeSnippetToClipboard: {
9
+ id: 'editor-common.messages.codeBlockButton.copyCodeSnippetToClipboard',
10
+ defaultMessage: 'Copy code text',
11
+ description: 'Copy the code text to your clipboard'
12
+ },
8
13
  copiedCodeToClipboard: {
9
14
  id: 'fabric.editor.codeBlockCopyButton.copiedToClipboard',
10
15
  defaultMessage: 'Copied!',
@@ -1,5 +1,3 @@
1
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
2
-
3
1
  /** Fixed document thresholds for limited (performance) mode (previously Statsig-driven). */
4
2
  export var LIMITED_MODE_DEFAULT_NODE_COUNT_THRESHOLD = 5000;
5
3
 
@@ -33,16 +31,13 @@ export var LIMITED_MODE_TWEAKED_DOC_SIZE_THRESHOLD = 750000;
33
31
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
34
32
 
35
33
  /**
36
- * The document thresholds currently in force. This is the only place the cohort is resolved — the
37
- * limited-mode decision itself is identical either way, only these two numbers change.
34
+ * The document thresholds currently in force. Only these two numbers determine when limited mode
35
+ * engages — the decision logic itself is identical regardless of threshold values.
38
36
  */
39
37
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
40
38
  export var getLimitedModeThresholds = function getLimitedModeThresholds() {
41
- return isExperimentEnabled('platform_editor_limited_threshold_tweaks') ? {
39
+ return {
42
40
  docSizeThreshold: LIMITED_MODE_TWEAKED_DOC_SIZE_THRESHOLD,
43
41
  nodeCountThreshold: LIMITED_MODE_TWEAKED_NODE_COUNT_THRESHOLD
44
- } : {
45
- docSizeThreshold: LIMITED_MODE_DEFAULT_DOC_SIZE_THRESHOLD,
46
- nodeCountThreshold: LIMITED_MODE_DEFAULT_NODE_COUNT_THRESHOLD
47
42
  };
48
43
  };
@@ -15,8 +15,7 @@ var LEGACY_CONTENT_EXTENSION_KEY = 'legacy-content';
15
15
  * 3. node count exceeds the node-count threshold
16
16
  *
17
17
  * Thresholds default to `getLimitedModeThresholds()` but can be passed in, which is how the
18
- * limited-mode plugin's latch policy supplies them from its own config. That default is where the
19
- * `platform_editor_limited_threshold_tweaks` cohort is resolved — see
18
+ * limited-mode plugin's latch policy supplies them from its own config. See
20
19
  * `limited-mode-document-thresholds.ts` for the values and the data behind them.
21
20
  *
22
21
  * Performance: doc size is checked first so an oversized document skips the traversal entirely.
@@ -3,7 +3,6 @@ import { selectTableClosestToPos } from '@atlaskit/editor-tables/utils';
3
3
 
4
4
  /**
5
5
  * Returns a NodeSelection for the node at `start`.
6
- * Matches the `platform_editor_block_menu=true` path in block-controls:
7
6
  * mediaGroup with a single child → select the child; all others → select the node.
8
7
  * Returns false when no node exists at `start`.
9
8
  */
@@ -14,8 +14,6 @@ import createFocusTrap from 'focus-trap';
14
14
  import rafSchedule from 'raf-schd';
15
15
  import { createPortal, flushSync } from 'react-dom';
16
16
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
17
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
18
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
19
17
  import { calculatePlacement, calculatePosition as _calculatePosition, findOverflowScrollParent } from './utils';
20
18
  import { validatePosition } from './validatePosition';
21
19
  // Ignored via go/ees005
@@ -66,7 +64,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
66
64
  returnFocusOnDeactivate: false
67
65
  };
68
66
  var trapConfig = typeof _this.props.focusTrap === 'boolean' ? defaultTrapConfig : _objectSpread(_objectSpread({}, defaultTrapConfig), _this.props.focusTrap);
69
- _this.focusTrap = createFocusTrap(popup, editorExperiment('platform_editor_block_menu', true) || expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? trapConfig : defaultTrapConfig);
67
+ _this.focusTrap = createFocusTrap(popup, trapConfig);
70
68
  _this.focusTrap.activate();
71
69
  }));
72
70
  return _this;
@@ -42,6 +42,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
42
42
  }
43
43
  });
44
44
  _defineProperty(_this, "handleKeyDown", function (evt) {
45
+ var _this$props$handleKey, _this$props;
45
46
  if (!_this.props.isActiveComponent) {
46
47
  return;
47
48
  }
@@ -59,12 +60,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
59
60
  } else if ((evt.code === 'Delete' || evt.code === 'Backspace') && _this.props.handleBackspaceDeleteKeydown) {
60
61
  _this.props.handleBackspaceDeleteKeydown(evt);
61
62
  }
62
- if (editorExperiment('platform_editor_block_menu', true, {
63
- exposure: true
64
- })) {
65
- var _this$props$handleKey, _this$props;
66
- (_this$props$handleKey = (_this$props = _this.props).handleKeyDown) === null || _this$props$handleKey === void 0 || _this$props$handleKey.call(_this$props, evt);
67
- }
63
+ (_this$props$handleKey = (_this$props = _this.props).handleKeyDown) === null || _this$props$handleKey === void 0 || _this$props$handleKey.call(_this$props, evt);
68
64
  });
69
65
  return _this;
70
66
  }
@@ -80,9 +76,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
80
76
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
81
77
  document.addEventListener('click', this.handleClick, options);
82
78
  }
83
- if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown && editorExperiment('platform_editor_block_menu', true, {
84
- exposure: true
85
- })) {
79
+ if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown) {
86
80
  var _this$props$editorRef;
87
81
  // Attached event to the menu so that 'ESC' events from the opened menu also will be handled.
88
82
  // Ignored via go/ees005
@@ -107,9 +101,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
107
101
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
108
102
  document.removeEventListener('click', this.handleClick, options);
109
103
  }
110
- if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown && editorExperiment('platform_editor_block_menu', true, {
111
- exposure: true
112
- })) {
104
+ if (this.props.handleEscapeKeydown || this.props.handleBackspaceDeleteKeydown || this.props.handleKeyDown) {
113
105
  var _this$props$editorRef2;
114
106
  // Ignored via go/ees005
115
107
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
@@ -1,7 +1,6 @@
1
1
  /* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
2
2
 
3
3
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
4
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
5
4
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../analytics';
6
5
  import { withAnalytics } from '../editor-analytics';
7
6
  import { GapCursorSelection } from '../selection';
@@ -146,11 +145,6 @@ function canMoveUp(state) {
146
145
  if (selection instanceof NodeSelection && isMediaNode(selection.node)) {
147
146
  return true;
148
147
  }
149
- if (selection instanceof TextSelection && !editorExperiment('platform_editor_block_menu', true)) {
150
- if (!selection.empty) {
151
- return true;
152
- }
153
- }
154
148
  return !atTheBeginningOfDoc(state);
155
149
  }
156
150
  function canMoveDown(state) {
@@ -162,11 +156,6 @@ function canMoveDown(state) {
162
156
  if (selection instanceof NodeSelection && isMediaNode(selection.node)) {
163
157
  return true;
164
158
  }
165
- if (selection instanceof TextSelection && !editorExperiment('platform_editor_block_menu', true)) {
166
- if (!selection.empty) {
167
- return true;
168
- }
169
- }
170
159
  return !atTheEndOfDoc(state);
171
160
  }
172
161
 
@@ -9,6 +9,11 @@ export declare const codeBlockButtonMessages: {
9
9
  description: string;
10
10
  id: string;
11
11
  };
12
+ copyCodeSnippetToClipboard: {
13
+ defaultMessage: string;
14
+ description: string;
15
+ id: string;
16
+ };
12
17
  copyCodeToClipboard: {
13
18
  defaultMessage: string;
14
19
  description: string;
@@ -26,7 +26,7 @@ export type LimitedModeThresholds = {
26
26
  nodeCountThreshold: number;
27
27
  };
28
28
  /**
29
- * The document thresholds currently in force. This is the only place the cohort is resolved — the
30
- * limited-mode decision itself is identical either way, only these two numbers change.
29
+ * The document thresholds currently in force. Only these two numbers determine when limited mode
30
+ * engages — the decision logic itself is identical regardless of threshold values.
31
31
  */
32
32
  export declare const getLimitedModeThresholds: () => LimitedModeThresholds;
@@ -14,8 +14,7 @@ import type { LimitedModeThresholds } from './limited-mode-document-thresholds';
14
14
  * 3. node count exceeds the node-count threshold
15
15
  *
16
16
  * Thresholds default to `getLimitedModeThresholds()` but can be passed in, which is how the
17
- * limited-mode plugin's latch policy supplies them from its own config. That default is where the
18
- * `platform_editor_limited_threshold_tweaks` cohort is resolved — see
17
+ * limited-mode plugin's latch policy supplies them from its own config. See
19
18
  * `limited-mode-document-thresholds.ts` for the values and the data behind them.
20
19
  *
21
20
  * Performance: doc size is checked first so an oversized document skips the traversal entirely.
@@ -3,7 +3,6 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
4
4
  /**
5
5
  * Returns a NodeSelection for the node at `start`.
6
- * Matches the `platform_editor_block_menu=true` path in block-controls:
7
6
  * mediaGroup with a single child → select the child; all others → select the node.
8
7
  * Returns false when no node exists at `start`.
9
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "123.0.1",
3
+ "version": "123.0.2",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -76,7 +76,7 @@
76
76
  "@atlaskit/profilecard": "^26.24.0",
77
77
  "@atlaskit/prosemirror-history": "^1.2.0",
78
78
  "@atlaskit/react-compiler-gating": "^0.2.0",
79
- "@atlaskit/react-ufo": "^7.12.0",
79
+ "@atlaskit/react-ufo": "^7.13.0",
80
80
  "@atlaskit/section-message": "^10.2.0",
81
81
  "@atlaskit/smart-card": "^45.24.0",
82
82
  "@atlaskit/smart-user-picker": "^11.8.0",
@@ -84,7 +84,7 @@
84
84
  "@atlaskit/task-decision": "^21.10.0",
85
85
  "@atlaskit/teams-app-config": "^3.1.0",
86
86
  "@atlaskit/textfield": "^10.2.0",
87
- "@atlaskit/tmp-editor-statsig": "^199.0.0",
87
+ "@atlaskit/tmp-editor-statsig": "^200.0.0",
88
88
  "@atlaskit/tokens": "^18.2.0",
89
89
  "@atlaskit/tooltip": "^24.3.0",
90
90
  "@atlaskit/width-detector": "^7.2.0",