@atlaskit/editor-plugin-block-controls 22.0.3 → 22.0.4

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,13 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 22.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`806c750c64957`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/806c750c64957) -
8
+ Clean up experiment `platform_editor_diff_plugin_extended`
9
+ - Updated dependencies
10
+
3
11
  ## 22.0.3
4
12
 
5
13
  ### Patch Changes
@@ -113,10 +113,9 @@ var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, e
113
113
 
114
114
  // EDITOR-7926: bail out while a diff is on screen (or a suggestion card is open) so hovering
115
115
  // doesn't dispatch showDragHandleAt and cause the drag handle to jitter over the diff.
116
- // No-exposure check as this runs on every mouseover.
117
116
  var currentUserIntent = api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || (_api$userIntent = _api$userIntent.sharedState.currentState()) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.currentUserIntent;
118
117
  var isDisplayingDiff = (_api$showDiff$sharedS = api === null || api === void 0 || (_api$showDiff = api.showDiff) === null || _api$showDiff === void 0 || (_api$showDiff = _api$showDiff.sharedState.currentState()) === null || _api$showDiff === void 0 ? void 0 : _api$showDiff.isDisplayingChanges) !== null && _api$showDiff$sharedS !== void 0 ? _api$showDiff$sharedS : false;
119
- if ((isDisplayingDiff || currentUserIntent === 'reviewing') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
118
+ if (isDisplayingDiff || currentUserIntent === 'reviewing') {
120
119
  return false;
121
120
  }
122
121
 
@@ -55,7 +55,7 @@ var handleSparseMouseOver = exports.handleSparseMouseOver = function handleSpars
55
55
  }
56
56
  var isDisplayingDiff = (_api$showDiff$sharedS = (_api$showDiff = api.showDiff) === null || _api$showDiff === void 0 || (_api$showDiff = _api$showDiff.sharedState.currentState()) === null || _api$showDiff === void 0 ? void 0 : _api$showDiff.isDisplayingChanges) !== null && _api$showDiff$sharedS !== void 0 ? _api$showDiff$sharedS : false;
57
57
  var currentUserIntent = (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || (_api$userIntent = _api$userIntent.sharedState.currentState()) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.currentUserIntent;
58
- if ((isDisplayingDiff || currentUserIntent === 'reviewing') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
58
+ if (isDisplayingDiff || currentUserIntent === 'reviewing') {
59
59
  return false;
60
60
  }
61
61
  var position;
@@ -115,11 +115,10 @@ var processHoverSide = function processHoverSide(view, api) {
115
115
  var target = event.target instanceof HTMLElement ? event.target : null;
116
116
 
117
117
  // EDITOR-7926: skip hover-side tracking while a diff is on screen (or a suggestion card is open)
118
- // so setHoverSide/mouseEnter don't flip-flop and jitter the controls. No-exposure check as this
119
- // runs on every mouse move.
118
+ // so setHoverSide/mouseEnter don't flip-flop and jitter the controls.
120
119
  var currentUserIntent = api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || (_api$userIntent = _api$userIntent.sharedState.currentState()) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.currentUserIntent;
121
120
  var isDisplayingDiff = (_api$showDiff$sharedS = api === null || api === void 0 || (_api$showDiff = api.showDiff) === null || _api$showDiff === void 0 || (_api$showDiff = _api$showDiff.sharedState.currentState()) === null || _api$showDiff === void 0 ? void 0 : _api$showDiff.isDisplayingChanges) !== null && _api$showDiff$sharedS !== void 0 ? _api$showDiff$sharedS : false;
122
- if ((isDisplayingDiff || currentUserIntent === 'reviewing') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
121
+ if (isDisplayingDiff || currentUserIntent === 'reviewing') {
123
122
  return;
124
123
  }
125
124
 
@@ -14,7 +14,6 @@ var _hooks = require("@atlaskit/editor-common/hooks");
14
14
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
15
15
  var _primitives = require("@atlaskit/primitives");
16
16
  var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
17
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
17
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
19
18
  /**
20
19
  * @jsxRuntime classic
@@ -108,7 +107,7 @@ var useBlockControlsVisibility = exports.useBlockControlsVisibility = function u
108
107
  // hidden by this container.
109
108
  var shouldHideImmediate = !isPersistent && (isTypeAheadOpen || isEditing || shouldHideWhenMouseOut || userIntent === 'aiStreaming' ||
110
109
  // EDITOR-7926: hide the drag handle while a diff is on screen or a suggestion card is open.
111
- (isDisplayingDiff || userIntent === 'reviewing') && (0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true) || sideHidden);
110
+ isDisplayingDiff || userIntent === 'reviewing' || sideHidden);
112
111
 
113
112
  // Delay hiding the right control in view mode to reduce flickering when moving from block
114
113
  // toward the right-edge button (avoids rapid show/hide as mouse crosses boundaries).
@@ -105,10 +105,9 @@ export const handleMouseOver = (view, event, api) => {
105
105
 
106
106
  // EDITOR-7926: bail out while a diff is on screen (or a suggestion card is open) so hovering
107
107
  // doesn't dispatch showDragHandleAt and cause the drag handle to jitter over the diff.
108
- // No-exposure check as this runs on every mouseover.
109
108
  const currentUserIntent = api === null || api === void 0 ? void 0 : (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 ? void 0 : (_api$userIntent$share = _api$userIntent.sharedState.currentState()) === null || _api$userIntent$share === void 0 ? void 0 : _api$userIntent$share.currentUserIntent;
110
109
  const isDisplayingDiff = (_api$showDiff$sharedS = api === null || api === void 0 ? void 0 : (_api$showDiff = api.showDiff) === null || _api$showDiff === void 0 ? void 0 : (_api$showDiff$sharedS2 = _api$showDiff.sharedState.currentState()) === null || _api$showDiff$sharedS2 === void 0 ? void 0 : _api$showDiff$sharedS2.isDisplayingChanges) !== null && _api$showDiff$sharedS !== void 0 ? _api$showDiff$sharedS : false;
111
- if ((isDisplayingDiff || currentUserIntent === 'reviewing') && expValEqualsNoExposure('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
110
+ if (isDisplayingDiff || currentUserIntent === 'reviewing') {
112
111
  return false;
113
112
  }
114
113
 
@@ -46,7 +46,7 @@ export const handleSparseMouseOver = (view, event, api) => {
46
46
  }
47
47
  const isDisplayingDiff = (_api$showDiff$sharedS = (_api$showDiff = api.showDiff) === null || _api$showDiff === void 0 ? void 0 : (_api$showDiff$sharedS2 = _api$showDiff.sharedState.currentState()) === null || _api$showDiff$sharedS2 === void 0 ? void 0 : _api$showDiff$sharedS2.isDisplayingChanges) !== null && _api$showDiff$sharedS !== void 0 ? _api$showDiff$sharedS : false;
48
48
  const currentUserIntent = (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 ? void 0 : (_api$userIntent$share = _api$userIntent.sharedState.currentState()) === null || _api$userIntent$share === void 0 ? void 0 : _api$userIntent$share.currentUserIntent;
49
- if ((isDisplayingDiff || currentUserIntent === 'reviewing') && expValEqualsNoExposure('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
49
+ if (isDisplayingDiff || currentUserIntent === 'reviewing') {
50
50
  return false;
51
51
  }
52
52
  let position;
@@ -92,11 +92,10 @@ const processHoverSide = (view, api) => {
92
92
  const target = event.target instanceof HTMLElement ? event.target : null;
93
93
 
94
94
  // EDITOR-7926: skip hover-side tracking while a diff is on screen (or a suggestion card is open)
95
- // so setHoverSide/mouseEnter don't flip-flop and jitter the controls. No-exposure check as this
96
- // runs on every mouse move.
95
+ // so setHoverSide/mouseEnter don't flip-flop and jitter the controls.
97
96
  const currentUserIntent = api === null || api === void 0 ? void 0 : (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 ? void 0 : (_api$userIntent$share = _api$userIntent.sharedState.currentState()) === null || _api$userIntent$share === void 0 ? void 0 : _api$userIntent$share.currentUserIntent;
98
97
  const isDisplayingDiff = (_api$showDiff$sharedS = api === null || api === void 0 ? void 0 : (_api$showDiff = api.showDiff) === null || _api$showDiff === void 0 ? void 0 : (_api$showDiff$sharedS2 = _api$showDiff.sharedState.currentState()) === null || _api$showDiff$sharedS2 === void 0 ? void 0 : _api$showDiff$sharedS2.isDisplayingChanges) !== null && _api$showDiff$sharedS !== void 0 ? _api$showDiff$sharedS : false;
99
- if ((isDisplayingDiff || currentUserIntent === 'reviewing') && expValEqualsNoExposure('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
98
+ if (isDisplayingDiff || currentUserIntent === 'reviewing') {
100
99
  return;
101
100
  }
102
101
 
@@ -11,7 +11,6 @@ import { akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
11
11
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
12
12
  import { Box, xcss } from '@atlaskit/primitives';
13
13
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
14
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
14
  const RIGHT_CONTROL_HIDE_DELAY_MS = 150;
16
15
  const baseStyles = xcss({
17
16
  transition: 'opacity 0.1s ease-in-out, visibility 0.1s ease-in-out'
@@ -99,7 +98,7 @@ export const useBlockControlsVisibility = ({
99
98
  // hidden by this container.
100
99
  const shouldHideImmediate = !isPersistent && (isTypeAheadOpen || isEditing || shouldHideWhenMouseOut || userIntent === 'aiStreaming' ||
101
100
  // EDITOR-7926: hide the drag handle while a diff is on screen or a suggestion card is open.
102
- (isDisplayingDiff || userIntent === 'reviewing') && expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true) || sideHidden);
101
+ isDisplayingDiff || userIntent === 'reviewing' || sideHidden);
103
102
 
104
103
  // Delay hiding the right control in view mode to reduce flickering when moving from block
105
104
  // toward the right-edge button (avoids rapid show/hide as mouse crosses boundaries).
@@ -106,10 +106,9 @@ export var handleMouseOver = function handleMouseOver(view, event, api) {
106
106
 
107
107
  // EDITOR-7926: bail out while a diff is on screen (or a suggestion card is open) so hovering
108
108
  // doesn't dispatch showDragHandleAt and cause the drag handle to jitter over the diff.
109
- // No-exposure check as this runs on every mouseover.
110
109
  var currentUserIntent = api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || (_api$userIntent = _api$userIntent.sharedState.currentState()) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.currentUserIntent;
111
110
  var isDisplayingDiff = (_api$showDiff$sharedS = api === null || api === void 0 || (_api$showDiff = api.showDiff) === null || _api$showDiff === void 0 || (_api$showDiff = _api$showDiff.sharedState.currentState()) === null || _api$showDiff === void 0 ? void 0 : _api$showDiff.isDisplayingChanges) !== null && _api$showDiff$sharedS !== void 0 ? _api$showDiff$sharedS : false;
112
- if ((isDisplayingDiff || currentUserIntent === 'reviewing') && expValEqualsNoExposure('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
111
+ if (isDisplayingDiff || currentUserIntent === 'reviewing') {
113
112
  return false;
114
113
  }
115
114
 
@@ -49,7 +49,7 @@ export var handleSparseMouseOver = function handleSparseMouseOver(view, event, a
49
49
  }
50
50
  var isDisplayingDiff = (_api$showDiff$sharedS = (_api$showDiff = api.showDiff) === null || _api$showDiff === void 0 || (_api$showDiff = _api$showDiff.sharedState.currentState()) === null || _api$showDiff === void 0 ? void 0 : _api$showDiff.isDisplayingChanges) !== null && _api$showDiff$sharedS !== void 0 ? _api$showDiff$sharedS : false;
51
51
  var currentUserIntent = (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || (_api$userIntent = _api$userIntent.sharedState.currentState()) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.currentUserIntent;
52
- if ((isDisplayingDiff || currentUserIntent === 'reviewing') && expValEqualsNoExposure('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
52
+ if (isDisplayingDiff || currentUserIntent === 'reviewing') {
53
53
  return false;
54
54
  }
55
55
  var position;
@@ -110,11 +110,10 @@ var processHoverSide = function processHoverSide(view, api) {
110
110
  var target = event.target instanceof HTMLElement ? event.target : null;
111
111
 
112
112
  // EDITOR-7926: skip hover-side tracking while a diff is on screen (or a suggestion card is open)
113
- // so setHoverSide/mouseEnter don't flip-flop and jitter the controls. No-exposure check as this
114
- // runs on every mouse move.
113
+ // so setHoverSide/mouseEnter don't flip-flop and jitter the controls.
115
114
  var currentUserIntent = api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || (_api$userIntent = _api$userIntent.sharedState.currentState()) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.currentUserIntent;
116
115
  var isDisplayingDiff = (_api$showDiff$sharedS = api === null || api === void 0 || (_api$showDiff = api.showDiff) === null || _api$showDiff === void 0 || (_api$showDiff = _api$showDiff.sharedState.currentState()) === null || _api$showDiff === void 0 ? void 0 : _api$showDiff.isDisplayingChanges) !== null && _api$showDiff$sharedS !== void 0 ? _api$showDiff$sharedS : false;
117
- if ((isDisplayingDiff || currentUserIntent === 'reviewing') && expValEqualsNoExposure('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
116
+ if (isDisplayingDiff || currentUserIntent === 'reviewing') {
118
117
  return;
119
118
  }
120
119
 
@@ -13,7 +13,6 @@ import { akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
13
13
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
14
14
  import { Box, xcss } from '@atlaskit/primitives';
15
15
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
16
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
16
  var RIGHT_CONTROL_HIDE_DELAY_MS = 150;
18
17
  var baseStyles = xcss({
19
18
  transition: 'opacity 0.1s ease-in-out, visibility 0.1s ease-in-out'
@@ -97,7 +96,7 @@ export var useBlockControlsVisibility = function useBlockControlsVisibility(_ref
97
96
  // hidden by this container.
98
97
  var shouldHideImmediate = !isPersistent && (isTypeAheadOpen || isEditing || shouldHideWhenMouseOut || userIntent === 'aiStreaming' ||
99
98
  // EDITOR-7926: hide the drag handle while a diff is on screen or a suggestion card is open.
100
- (isDisplayingDiff || userIntent === 'reviewing') && expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true) || sideHidden);
99
+ isDisplayingDiff || userIntent === 'reviewing' || sideHidden);
101
100
 
102
101
  // Delay hiding the right control in view mode to reduce flickering when moving from block
103
102
  // toward the right-edge button (avoids rapid show/hide as mouse crosses boundaries).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "22.0.3",
3
+ "version": "22.0.4",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -42,7 +42,7 @@
42
42
  "@atlaskit/editor-plugin-selection": "^21.0.0",
43
43
  "@atlaskit/editor-plugin-show-diff": "^19.0.0",
44
44
  "@atlaskit/editor-plugin-toolbar": "^18.0.0",
45
- "@atlaskit/editor-plugin-type-ahead": "^22.0.0",
45
+ "@atlaskit/editor-plugin-type-ahead": "^22.1.0",
46
46
  "@atlaskit/editor-plugin-ui-control-registry": "^15.0.0",
47
47
  "@atlaskit/editor-plugin-user-intent": "^19.0.0",
48
48
  "@atlaskit/editor-plugin-width": "^22.0.0",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/editor-tables": "^3.2.0",
52
52
  "@atlaskit/editor-ui-control-model": "^2.10.0",
53
53
  "@atlaskit/icon": "^38.0.0",
54
- "@atlaskit/icon-lab": "^7.9.0",
54
+ "@atlaskit/icon-lab": "^7.10.0",
55
55
  "@atlaskit/link": "^5.1.0",
56
56
  "@atlaskit/platform-feature-experiments": "^0.3.0",
57
57
  "@atlaskit/platform-feature-flags": "^2.2.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/primitives": "^22.5.0",
62
62
  "@atlaskit/section-message": "^10.2.0",
63
63
  "@atlaskit/theme": "^28.2.0",
64
- "@atlaskit/tmp-editor-statsig": "^208.0.0",
64
+ "@atlaskit/tmp-editor-statsig": "^209.0.0",
65
65
  "@atlaskit/tokens": "^20.0.0",
66
66
  "@atlaskit/tooltip": "^24.3.0",
67
67
  "@babel/runtime": "^7.0.0",
@@ -73,7 +73,7 @@
73
73
  "uuid": "^11.1.1"
74
74
  },
75
75
  "peerDependencies": {
76
- "@atlaskit/editor-common": "^125.2.0",
76
+ "@atlaskit/editor-common": "^125.4.0",
77
77
  "react": "^18.2.0 || ^19.2.0",
78
78
  "react-dom": "^18.2.0 || ^19.2.0",
79
79
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"