@atlaskit/editor-plugin-toolbar 19.0.10 → 19.0.11

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-toolbar
2
2
 
3
+ ## 19.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`feeef61c773db`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/feeef61c773db) -
8
+ Clean up feature gate `platform_editor_blocks_patch_7`
9
+ - Updated dependencies
10
+
3
11
  ## 19.0.10
4
12
 
5
13
  ### Patch Changes
@@ -53,9 +53,6 @@
53
53
  {
54
54
  "path": "../../../platform/feature-experiments/afm-products/tsconfig.json"
55
55
  },
56
- {
57
- "path": "../../../platform/feature-flags/afm-products/tsconfig.json"
58
- },
59
56
  {
60
57
  "path": "../../tmp-editor-statsig/afm-products/tsconfig.json"
61
58
  },
@@ -15,7 +15,6 @@ var _state = require("@atlaskit/editor-prosemirror/state");
15
15
  var _utils = require("@atlaskit/editor-prosemirror/utils");
16
16
  var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
17
17
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
18
- var _fg = require("@atlaskit/platform-feature-flags/fg");
19
18
  var _selectionToolbarOpenExperience = require("./pm-plugins/experiences/selection-toolbar-open-experience");
20
19
  var _pluginKey = require("./pm-plugins/plugin-key");
21
20
  var _consts = require("./ui/consts");
@@ -203,8 +202,8 @@ var toolbarPlugin = exports.toolbarPlugin = function toolbarPlugin(_ref) {
203
202
  // Prevent outside clicks from reopening a blurred editor's toolbar.
204
203
  var _editorViewModePlugin = api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState();
205
204
  var _isViewModeEnabled = (_editorViewModePlugin === null || _editorViewModePlugin === void 0 ? void 0 : _editorViewModePlugin.mode) === 'view';
206
- // Include focus in nested editable islands when enabled.
207
- var _hasEditorFocus = (0, _fg.fg)('platform_editor_blocks_patch_7') ? _view.hasFocus() || _view.dom.contains(_view.root.activeElement) : _view.hasFocus();
205
+ // Include focus in nested editable islands.
206
+ var _hasEditorFocus = _view.hasFocus() || _view.dom.contains(_view.root.activeElement);
208
207
  var shouldShowToolbar = _isViewModeEnabled ? isMouseUpInEditor || isMouseUpInOwnedToolbar : _hasEditorFocus || isMouseUpInOwnedToolbar;
209
208
  var currentShouldShowToolbar = api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || (_api$toolbar = _api$toolbar.sharedState.currentState()) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.shouldShowToolbar;
210
209
  if (currentShouldShowToolbar !== shouldShowToolbar) {
@@ -225,7 +224,7 @@ var toolbarPlugin = exports.toolbarPlugin = function toolbarPlugin(_ref) {
225
224
  // Focus can sit inside a nested editable region ProseMirror does not own -
226
225
  // such as a reference synced block's island - where `view.hasFocus()` is
227
226
  // false but the user is still interacting with the editor.
228
- var hasEditorFocus = (0, _fg.fg)('platform_editor_blocks_patch_7') ? _view.hasFocus() || _view.dom.contains(_view.root.activeElement) : _view.hasFocus();
227
+ var hasEditorFocus = _view.hasFocus() || _view.dom.contains(_view.root.activeElement);
229
228
  _view.dispatch(_view.state.tr.setMeta(_pluginKey.editorToolbarPluginKey, {
230
229
  shouldShowToolbar: !isViewModeEnabled ? hasEditorFocus || isInToolbar || isInPortal : true
231
230
  }));
@@ -5,7 +5,6 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
6
6
  import { createComponentRegistry } from '@atlaskit/editor-toolbar-model';
7
7
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
8
- import { fg } from '@atlaskit/platform-feature-flags/fg';
9
8
  import { getSelectionToolbarOpenExperiencePlugin } from './pm-plugins/experiences/selection-toolbar-open-experience';
10
9
  import { editorToolbarPluginKey } from './pm-plugins/plugin-key';
11
10
  import { DEFAULT_POPUP_SELECTORS } from './ui/consts';
@@ -195,8 +194,8 @@ export const toolbarPlugin = ({
195
194
  // Prevent outside clicks from reopening a blurred editor's toolbar.
196
195
  const editorViewModePlugin = api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState();
197
196
  const isViewModeEnabled = (editorViewModePlugin === null || editorViewModePlugin === void 0 ? void 0 : editorViewModePlugin.mode) === 'view';
198
- // Include focus in nested editable islands when enabled.
199
- const hasEditorFocus = fg('platform_editor_blocks_patch_7') ? view.hasFocus() || view.dom.contains(view.root.activeElement) : view.hasFocus();
197
+ // Include focus in nested editable islands.
198
+ const hasEditorFocus = view.hasFocus() || view.dom.contains(view.root.activeElement);
200
199
  const shouldShowToolbar = isViewModeEnabled ? isMouseUpInEditor || isMouseUpInOwnedToolbar : hasEditorFocus || isMouseUpInOwnedToolbar;
201
200
  const currentShouldShowToolbar = api === null || api === void 0 ? void 0 : (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : (_api$toolbar$sharedSt = _api$toolbar.sharedState.currentState()) === null || _api$toolbar$sharedSt === void 0 ? void 0 : _api$toolbar$sharedSt.shouldShowToolbar;
202
201
  if (currentShouldShowToolbar !== shouldShowToolbar) {
@@ -217,7 +216,7 @@ export const toolbarPlugin = ({
217
216
  // Focus can sit inside a nested editable region ProseMirror does not own -
218
217
  // such as a reference synced block's island - where `view.hasFocus()` is
219
218
  // false but the user is still interacting with the editor.
220
- const hasEditorFocus = fg('platform_editor_blocks_patch_7') ? view.hasFocus() || view.dom.contains(view.root.activeElement) : view.hasFocus();
219
+ const hasEditorFocus = view.hasFocus() || view.dom.contains(view.root.activeElement);
221
220
  view.dispatch(view.state.tr.setMeta(editorToolbarPluginKey, {
222
221
  shouldShowToolbar: !isViewModeEnabled ? hasEditorFocus || isInToolbar || isInPortal : true
223
222
  }));
@@ -11,7 +11,6 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
11
11
  import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
12
12
  import { createComponentRegistry } from '@atlaskit/editor-toolbar-model';
13
13
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
14
- import { fg } from '@atlaskit/platform-feature-flags/fg';
15
14
  import { getSelectionToolbarOpenExperiencePlugin } from './pm-plugins/experiences/selection-toolbar-open-experience';
16
15
  import { editorToolbarPluginKey } from './pm-plugins/plugin-key';
17
16
  import { DEFAULT_POPUP_SELECTORS } from './ui/consts';
@@ -196,8 +195,8 @@ export var toolbarPlugin = function toolbarPlugin(_ref) {
196
195
  // Prevent outside clicks from reopening a blurred editor's toolbar.
197
196
  var _editorViewModePlugin = api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState();
198
197
  var _isViewModeEnabled = (_editorViewModePlugin === null || _editorViewModePlugin === void 0 ? void 0 : _editorViewModePlugin.mode) === 'view';
199
- // Include focus in nested editable islands when enabled.
200
- var _hasEditorFocus = fg('platform_editor_blocks_patch_7') ? _view.hasFocus() || _view.dom.contains(_view.root.activeElement) : _view.hasFocus();
198
+ // Include focus in nested editable islands.
199
+ var _hasEditorFocus = _view.hasFocus() || _view.dom.contains(_view.root.activeElement);
201
200
  var shouldShowToolbar = _isViewModeEnabled ? isMouseUpInEditor || isMouseUpInOwnedToolbar : _hasEditorFocus || isMouseUpInOwnedToolbar;
202
201
  var currentShouldShowToolbar = api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || (_api$toolbar = _api$toolbar.sharedState.currentState()) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.shouldShowToolbar;
203
202
  if (currentShouldShowToolbar !== shouldShowToolbar) {
@@ -218,7 +217,7 @@ export var toolbarPlugin = function toolbarPlugin(_ref) {
218
217
  // Focus can sit inside a nested editable region ProseMirror does not own -
219
218
  // such as a reference synced block's island - where `view.hasFocus()` is
220
219
  // false but the user is still interacting with the editor.
221
- var hasEditorFocus = fg('platform_editor_blocks_patch_7') ? _view.hasFocus() || _view.dom.contains(_view.root.activeElement) : _view.hasFocus();
220
+ var hasEditorFocus = _view.hasFocus() || _view.dom.contains(_view.root.activeElement);
222
221
  _view.dispatch(_view.state.tr.setMeta(editorToolbarPluginKey, {
223
222
  shouldShowToolbar: !isViewModeEnabled ? hasEditorFocus || isInToolbar || isInPortal : true
224
223
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar",
3
- "version": "19.0.10",
3
+ "version": "19.0.11",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,6 @@
32
32
  "@atlaskit/editor-toolbar": "^2.8.0",
33
33
  "@atlaskit/editor-toolbar-model": "^1.2.0",
34
34
  "@atlaskit/platform-feature-experiments": "^0.3.0",
35
- "@atlaskit/platform-feature-flags": "^2.2.0",
36
35
  "@atlaskit/tmp-editor-statsig": "^218.0.0",
37
36
  "@babel/runtime": "^7.0.0",
38
37
  "bind-event-listener": "^3.0.0"
@@ -42,12 +41,6 @@
42
41
  "react": "^18.2.0 || ^19.2.0",
43
42
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
44
43
  },
45
- "platform-feature-flags": {
46
- "platform_editor_blocks_patch_7": {
47
- "type": "boolean",
48
- "referenceOnly": true
49
- }
50
- },
51
44
  "devDependencies": {
52
45
  "react": "^19.2.0",
53
46
  "react-intl": "^7.0.0"