@atlaskit/editor-plugin-block-controls 11.0.1 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 11.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`675d310a49c28`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/675d310a49c28) -
8
+ Remix entrypoints: ensure `cc-maui-experiment` exposures only fire on user-interactive surfaces.
9
+ - Fire exposure for: editor toolbar remix button, right-side hover button, highlight toolbar,
10
+ inline comment nudge, whiteboard AI action badge
11
+ - Use no-exposure for: props/infrastructure/layout-only checks (e.g., embedded header padding,
12
+ native-embed extension registration)
13
+ - Fix drag-handle controlSide ordering to avoid right-side controls on layout columns
14
+ - Restore layout column drag-handle VR test file
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
20
+ ## 11.0.2
21
+
22
+ ### Patch Changes
23
+
24
+ - [`140f356e0c8c5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/140f356e0c8c5) -
25
+ Fix RangeError: Position -1 outside of fragment when activeNode.rootPos is undefined
26
+ (keyboard-triggered drag handle). Guarded behind platform_editor_block_menu_jira_patch_1 feature
27
+ gate.
28
+ - Updated dependencies
29
+
3
30
  ## 11.0.1
4
31
 
5
32
  ### Patch Changes
@@ -398,7 +398,10 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
398
398
  } else {
399
399
  if (latestActiveNode && (!isActiveNodeDeleted || isReplacedWithSameSize)) {
400
400
  var _nodeDecAtActivePos = getDecorationAtPos(newState, decorations, latestActiveNode.pos, to);
401
- var rootNodeDecAtActivePos = getDecorationAtPos(newState, decorations, latestActiveNode.rootPos, to);
401
+ // Guard against rootPos being undefined (keyboard-triggered handles do not set it),
402
+ // which would cause a RangeError in ProseMirror. When the gate is off, the original
403
+ // behaviour is preserved for safe incremental rollout.
404
+ var rootNodeDecAtActivePos = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_jira_patch_1') ? latestActiveNode.rootPos !== undefined ? getDecorationAtPos(newState, decorations, latestActiveNode.rootPos, to) : undefined : getDecorationAtPos(newState, decorations, latestActiveNode.rootPos, to);
402
405
  if (_nodeDecAtActivePos || rootNodeDecAtActivePos) {
403
406
  isActiveNodeModified = true;
404
407
  }
@@ -1224,7 +1224,7 @@ var DragHandleWithVisibility = exports.DragHandleWithVisibility = function DragH
1224
1224
  var isLayoutColumn = nodeType === 'layoutColumn';
1225
1225
  return (0, _react2.jsx)(_visibilityContainer.VisibilityContainer, {
1226
1226
  api: api,
1227
- controlSide: rightSideControlsEnabled && !isLayoutColumn ? 'left' : undefined,
1227
+ controlSide: !isLayoutColumn && rightSideControlsEnabled ? 'left' : undefined,
1228
1228
  forceVisibleOnMouseOut: (0, _expValEquals.expValEquals)('platform_editor_drag_handle_keyboard_a11y', 'isEnabled', true) && !!(handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused)
1229
1229
  }, (0, _react2.jsx)(DragHandle, {
1230
1230
  view: view,
@@ -387,7 +387,10 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
387
387
  } else {
388
388
  if (latestActiveNode && (!isActiveNodeDeleted || isReplacedWithSameSize)) {
389
389
  const nodeDecAtActivePos = getDecorationAtPos(newState, decorations, latestActiveNode.pos, to);
390
- const rootNodeDecAtActivePos = getDecorationAtPos(newState, decorations, latestActiveNode.rootPos, to);
390
+ // Guard against rootPos being undefined (keyboard-triggered handles do not set it),
391
+ // which would cause a RangeError in ProseMirror. When the gate is off, the original
392
+ // behaviour is preserved for safe incremental rollout.
393
+ const rootNodeDecAtActivePos = fg('platform_editor_block_menu_jira_patch_1') ? latestActiveNode.rootPos !== undefined ? getDecorationAtPos(newState, decorations, latestActiveNode.rootPos, to) : undefined : getDecorationAtPos(newState, decorations, latestActiveNode.rootPos, to);
391
394
  if (nodeDecAtActivePos || rootNodeDecAtActivePos) {
392
395
  isActiveNodeModified = true;
393
396
  }
@@ -1199,7 +1199,7 @@ export const DragHandleWithVisibility = ({
1199
1199
  const isLayoutColumn = nodeType === 'layoutColumn';
1200
1200
  return jsx(VisibilityContainer, {
1201
1201
  api: api,
1202
- controlSide: rightSideControlsEnabled && !isLayoutColumn ? 'left' : undefined,
1202
+ controlSide: !isLayoutColumn && rightSideControlsEnabled ? 'left' : undefined,
1203
1203
  forceVisibleOnMouseOut: expValEquals('platform_editor_drag_handle_keyboard_a11y', 'isEnabled', true) && !!(handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused)
1204
1204
  }, jsx(DragHandle, {
1205
1205
  view: view,
@@ -391,7 +391,10 @@ var _apply = function apply(api, formatMessage, tr, currentState, newState, flag
391
391
  } else {
392
392
  if (latestActiveNode && (!isActiveNodeDeleted || isReplacedWithSameSize)) {
393
393
  var _nodeDecAtActivePos = getDecorationAtPos(newState, decorations, latestActiveNode.pos, to);
394
- var rootNodeDecAtActivePos = getDecorationAtPos(newState, decorations, latestActiveNode.rootPos, to);
394
+ // Guard against rootPos being undefined (keyboard-triggered handles do not set it),
395
+ // which would cause a RangeError in ProseMirror. When the gate is off, the original
396
+ // behaviour is preserved for safe incremental rollout.
397
+ var rootNodeDecAtActivePos = fg('platform_editor_block_menu_jira_patch_1') ? latestActiveNode.rootPos !== undefined ? getDecorationAtPos(newState, decorations, latestActiveNode.rootPos, to) : undefined : getDecorationAtPos(newState, decorations, latestActiveNode.rootPos, to);
395
398
  if (_nodeDecAtActivePos || rootNodeDecAtActivePos) {
396
399
  isActiveNodeModified = true;
397
400
  }
@@ -1220,7 +1220,7 @@ export var DragHandleWithVisibility = function DragHandleWithVisibility(_ref1) {
1220
1220
  var isLayoutColumn = nodeType === 'layoutColumn';
1221
1221
  return jsx(VisibilityContainer, {
1222
1222
  api: api,
1223
- controlSide: rightSideControlsEnabled && !isLayoutColumn ? 'left' : undefined,
1223
+ controlSide: !isLayoutColumn && rightSideControlsEnabled ? 'left' : undefined,
1224
1224
  forceVisibleOnMouseOut: expValEquals('platform_editor_drag_handle_keyboard_a11y', 'isEnabled', true) && !!(handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused)
1225
1225
  }, jsx(DragHandle, {
1226
1226
  view: view,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "11.0.1",
3
+ "version": "11.1.0",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -67,7 +67,7 @@
67
67
  "uuid": "^3.1.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@atlaskit/editor-common": "^114.2.0",
70
+ "@atlaskit/editor-common": "^114.5.0",
71
71
  "react": "^18.2.0",
72
72
  "react-dom": "^18.2.0",
73
73
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"