@atlaskit/editor-plugin-block-controls 4.0.6 → 4.0.8

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,24 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 4.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#185723](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185723)
8
+ [`751aeb4580469`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/751aeb4580469) -
9
+ ED-28315 clean up fg platform_editor_controls_patch_13
10
+ - Updated dependencies
11
+
12
+ ## 4.0.7
13
+
14
+ ### Patch Changes
15
+
16
+ - [#185940](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185940)
17
+ [`456bee393c4d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/456bee393c4d3) -
18
+ [ux] When editor-area is less than 768px wide, we reduce editor gutters to 24px in Full-page
19
+ editor.
20
+ - Updated dependencies
21
+
3
22
  ## 4.0.6
4
23
 
5
24
  ### Patch Changes
@@ -195,7 +195,7 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
195
195
  isEditing: (_interactionTrackingP = _pmPlugin.interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP === void 0 ? void 0 : _interactionTrackingP.isEditing,
196
196
  isSelectedViaDragHandle: (_key$getState$isSelec = (_key$getState0 = _main.key.getState(editorState)) === null || _key$getState0 === void 0 ? void 0 : _key$getState0.isSelectedViaDragHandle) !== null && _key$getState$isSelec !== void 0 ? _key$getState$isSelec : false
197
197
  };
198
- if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13')) {
198
+ if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
199
199
  var _interactionTrackingP2, _interactionTrackingP3;
200
200
  sharedState.isMouseOut = (_interactionTrackingP2 = (_interactionTrackingP3 = _pmPlugin.interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP3 === void 0 ? void 0 : _interactionTrackingP3.isMouseOut) !== null && _interactionTrackingP2 !== void 0 ? _interactionTrackingP2 : false;
201
201
  }
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _bindEventListener = require("bind-event-listener");
10
10
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
11
11
  var _state = require("@atlaskit/editor-prosemirror/state");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
13
  var _handleKeyDown = require("./handle-key-down");
15
14
  var _handleMouseMove = require("./handle-mouse-move");
@@ -24,26 +23,13 @@ var createInteractionTrackingPlugin = exports.createInteractionTrackingPlugin =
24
23
  var state = {
25
24
  isEditing: false
26
25
  };
27
- if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13')) {
26
+ if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
28
27
  state.isMouseOut = false;
29
28
  }
30
29
  return state;
31
30
  },
32
31
  apply: function apply(tr, pluginState) {
33
32
  var meta = tr.getMeta(interactionTrackingPluginKey);
34
- if (!(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13')) {
35
- switch (meta === null || meta === void 0 ? void 0 : meta.type) {
36
- case 'startEditing':
37
- return {
38
- isEditing: true
39
- };
40
- case 'stopEditing':
41
- return {
42
- isEditing: false
43
- };
44
- }
45
- return pluginState;
46
- }
47
33
  var newState = {};
48
34
  switch (meta === null || meta === void 0 ? void 0 : meta.type) {
49
35
  case 'startEditing':
@@ -68,7 +54,7 @@ var createInteractionTrackingPlugin = exports.createInteractionTrackingPlugin =
68
54
  mousemove: _handleMouseMove.handleMouseMove
69
55
  }
70
56
  },
71
- view: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13') ? function (view) {
57
+ view: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? function (view) {
72
58
  var editorContentArea = view.dom.closest('.ak-editor-content-area');
73
59
  var unbindMouseEnter;
74
60
  var unbindMouseLeave;
@@ -28,10 +28,10 @@ var _consts = require("./consts");
28
28
  */
29
29
  var dragHandlerAnchorSelector = '[data-drag-handler-anchor-name]:not([data-drag-handler-node-type="tableRow"], [data-drag-handler-node-type="media"])';
30
30
  var gutterPaddingWidth = function gutterPaddingWidth() {
31
- return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13') ? "".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px") : '100%';
31
+ return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? "".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px") : '100%';
32
32
  };
33
33
  var gutterPaddingLeft = function gutterPaddingLeft() {
34
- return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13') ? "-".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px") : '-100px';
34
+ return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? "-".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px") : '-100px';
35
35
  };
36
36
  var extendedHoverZone = function extendedHoverZone() {
37
37
  return (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".block-ctrl-drag-preview ".concat(dragHandlerAnchorSelector, "::after"), {
@@ -90,6 +90,15 @@ var extendedHoverZone = function extendedHoverZone() {
90
90
  display: 'none'
91
91
  }));
92
92
  };
93
+ var extendHoverZoneReduced = (0, _react.css)({
94
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
95
+ '.ProseMirror': (0, _defineProperty2.default)({}, "&& [data-drag-handler-anchor-depth=\"0\"]".concat(dragHandlerAnchorSelector, "::after"), (0, _defineProperty2.default)({}, "@container editor-area (max-width: ".concat(_editorSharedStyles.akEditorFullPageNarrowBreakout, "px)"), {
96
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
97
+ left: "-".concat(_editorSharedStyles.akEditorGutterPaddingReduced, "px"),
98
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
99
+ width: "".concat(_editorSharedStyles.akEditorGutterPaddingReduced, "px")
100
+ }))
101
+ });
93
102
  var extendedDragZone = (0, _react.css)({
94
103
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
95
104
  '.ProseMirror': (0, _defineProperty2.default)({}, "&& [data-drag-handler-anchor-depth=\"0\"]".concat(dragHandlerAnchorSelector, "::after"), {
@@ -307,6 +316,6 @@ var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWra
307
316
  disabled: !(0, _expValEquals.expValEquals)('platform_editor_block_controls_perf_optimization', 'isEnabled', true) || !(0, _platformFeatureFlags.fg)('platform_editor_block_controls_perf_opt_patch_1')
308
317
  });
309
318
  return (0, _react.jsx)(_react.Global, {
310
- styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, (0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _experiments.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, (0, _platformFeatureFlags.fg)('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
319
+ styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? extendHoverZoneReduced : undefined, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, (0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _experiments.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, (0, _platformFeatureFlags.fg)('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
311
320
  });
312
321
  };
@@ -186,7 +186,7 @@ export const blockControlsPlugin = ({
186
186
  isEditing: (_interactionTrackingP = interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP === void 0 ? void 0 : _interactionTrackingP.isEditing,
187
187
  isSelectedViaDragHandle: (_key$getState$isSelec = (_key$getState0 = key.getState(editorState)) === null || _key$getState0 === void 0 ? void 0 : _key$getState0.isSelectedViaDragHandle) !== null && _key$getState$isSelec !== void 0 ? _key$getState$isSelec : false
188
188
  };
189
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_13')) {
189
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
190
190
  var _interactionTrackingP2, _interactionTrackingP3;
191
191
  sharedState.isMouseOut = (_interactionTrackingP2 = (_interactionTrackingP3 = interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP3 === void 0 ? void 0 : _interactionTrackingP3.isMouseOut) !== null && _interactionTrackingP2 !== void 0 ? _interactionTrackingP2 : false;
192
192
  }
@@ -1,7 +1,6 @@
1
1
  import { bind } from 'bind-event-listener';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
5
  import { handleKeyDown } from './handle-key-down';
7
6
  import { handleMouseEnter, handleMouseLeave, handleMouseMove } from './handle-mouse-move';
@@ -14,26 +13,13 @@ export const createInteractionTrackingPlugin = () => {
14
13
  const state = {
15
14
  isEditing: false
16
15
  };
17
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_13')) {
16
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
18
17
  state.isMouseOut = false;
19
18
  }
20
19
  return state;
21
20
  },
22
21
  apply(tr, pluginState) {
23
22
  const meta = tr.getMeta(interactionTrackingPluginKey);
24
- if (!fg('platform_editor_controls_patch_13')) {
25
- switch (meta === null || meta === void 0 ? void 0 : meta.type) {
26
- case 'startEditing':
27
- return {
28
- isEditing: true
29
- };
30
- case 'stopEditing':
31
- return {
32
- isEditing: false
33
- };
34
- }
35
- return pluginState;
36
- }
37
23
  const newState = {};
38
24
  switch (meta === null || meta === void 0 ? void 0 : meta.type) {
39
25
  case 'startEditing':
@@ -61,7 +47,7 @@ export const createInteractionTrackingPlugin = () => {
61
47
  mousemove: handleMouseMove
62
48
  }
63
49
  },
64
- view: editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_13') ? view => {
50
+ view: editorExperiment('platform_editor_controls', 'variant1') ? view => {
65
51
  const editorContentArea = view.dom.closest('.ak-editor-content-area');
66
52
  let unbindMouseEnter;
67
53
  let unbindMouseLeave;
@@ -7,7 +7,7 @@ import { css, Global, jsx } from '@emotion/react';
7
7
  import { tableControlsSpacing } from '@atlaskit/editor-common/styles';
8
8
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
9
9
  import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
10
- import { akEditorBreakoutPadding, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
10
+ import { akEditorBreakoutPadding, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
11
11
  import { fg } from '@atlaskit/platform-feature-flags';
12
12
  import { layers } from '@atlaskit/theme/constants';
13
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -19,8 +19,8 @@ import { DRAG_HANDLE_MAX_WIDTH_PLUS_GAP, DRAG_HANDLE_WIDTH } from './consts';
19
19
  * including those within table rows and media.
20
20
  */
21
21
  const dragHandlerAnchorSelector = '[data-drag-handler-anchor-name]:not([data-drag-handler-node-type="tableRow"], [data-drag-handler-node-type="media"])';
22
- const gutterPaddingWidth = () => editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_13') ? `${akEditorGutterPaddingDynamic()}px` : '100%';
23
- const gutterPaddingLeft = () => editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_13') ? `-${akEditorGutterPaddingDynamic()}px` : '-100px';
22
+ const gutterPaddingWidth = () => editorExperiment('platform_editor_controls', 'variant1') ? `${akEditorGutterPaddingDynamic()}px` : '100%';
23
+ const gutterPaddingLeft = () => editorExperiment('platform_editor_controls', 'variant1') ? `-${akEditorGutterPaddingDynamic()}px` : '-100px';
24
24
  const extendedHoverZone = () => css({
25
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
26
26
  [`.block-ctrl-drag-preview ${dragHandlerAnchorSelector}::after`]: {
@@ -97,6 +97,21 @@ const extendedHoverZone = () => css({
97
97
  display: 'none'
98
98
  }
99
99
  });
100
+ const extendHoverZoneReduced = css({
101
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
102
+ '.ProseMirror': {
103
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
104
+ [`&& [data-drag-handler-anchor-depth="0"]${dragHandlerAnchorSelector}::after`]: {
105
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
106
+ [`@container editor-area (max-width: ${akEditorFullPageNarrowBreakout}px)`]: {
107
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
108
+ left: `-${akEditorGutterPaddingReduced}px`,
109
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
110
+ width: `${akEditorGutterPaddingReduced}px`
111
+ }
112
+ }
113
+ }
114
+ });
100
115
  const extendedDragZone = css({
101
116
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
102
117
  '.ProseMirror': {
@@ -340,6 +355,6 @@ export const GlobalStylesWrapper = ({
340
355
  disabled: !expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true) || !fg('platform_editor_block_controls_perf_opt_patch_1')
341
356
  });
342
357
  return jsx(Global, {
343
- styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, fg('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
358
+ styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? extendHoverZoneReduced : undefined, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, fg('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
344
359
  });
345
360
  };
@@ -188,7 +188,7 @@ export var blockControlsPlugin = function blockControlsPlugin(_ref) {
188
188
  isEditing: (_interactionTrackingP = interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP === void 0 ? void 0 : _interactionTrackingP.isEditing,
189
189
  isSelectedViaDragHandle: (_key$getState$isSelec = (_key$getState0 = key.getState(editorState)) === null || _key$getState0 === void 0 ? void 0 : _key$getState0.isSelectedViaDragHandle) !== null && _key$getState$isSelec !== void 0 ? _key$getState$isSelec : false
190
190
  };
191
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_13')) {
191
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
192
192
  var _interactionTrackingP2, _interactionTrackingP3;
193
193
  sharedState.isMouseOut = (_interactionTrackingP2 = (_interactionTrackingP3 = interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP3 === void 0 ? void 0 : _interactionTrackingP3.isMouseOut) !== null && _interactionTrackingP2 !== void 0 ? _interactionTrackingP2 : false;
194
194
  }
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { bind } from 'bind-event-listener';
5
5
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
6
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
8
  import { handleKeyDown } from './handle-key-down';
10
9
  import { handleMouseEnter, handleMouseLeave, handleMouseMove } from './handle-mouse-move';
@@ -17,26 +16,13 @@ export var createInteractionTrackingPlugin = function createInteractionTrackingP
17
16
  var state = {
18
17
  isEditing: false
19
18
  };
20
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_13')) {
19
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
21
20
  state.isMouseOut = false;
22
21
  }
23
22
  return state;
24
23
  },
25
24
  apply: function apply(tr, pluginState) {
26
25
  var meta = tr.getMeta(interactionTrackingPluginKey);
27
- if (!fg('platform_editor_controls_patch_13')) {
28
- switch (meta === null || meta === void 0 ? void 0 : meta.type) {
29
- case 'startEditing':
30
- return {
31
- isEditing: true
32
- };
33
- case 'stopEditing':
34
- return {
35
- isEditing: false
36
- };
37
- }
38
- return pluginState;
39
- }
40
26
  var newState = {};
41
27
  switch (meta === null || meta === void 0 ? void 0 : meta.type) {
42
28
  case 'startEditing':
@@ -61,7 +47,7 @@ export var createInteractionTrackingPlugin = function createInteractionTrackingP
61
47
  mousemove: handleMouseMove
62
48
  }
63
49
  },
64
- view: editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_13') ? function (view) {
50
+ view: editorExperiment('platform_editor_controls', 'variant1') ? function (view) {
65
51
  var editorContentArea = view.dom.closest('.ak-editor-content-area');
66
52
  var unbindMouseEnter;
67
53
  var unbindMouseLeave;
@@ -8,7 +8,7 @@ import { css, Global, jsx } from '@emotion/react';
8
8
  import { tableControlsSpacing } from '@atlaskit/editor-common/styles';
9
9
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
10
10
  import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
11
- import { akEditorBreakoutPadding, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
11
+ import { akEditorBreakoutPadding, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
12
12
  import { fg } from '@atlaskit/platform-feature-flags';
13
13
  import { layers } from '@atlaskit/theme/constants';
14
14
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -21,10 +21,10 @@ import { DRAG_HANDLE_MAX_WIDTH_PLUS_GAP, DRAG_HANDLE_WIDTH } from './consts';
21
21
  */
22
22
  var dragHandlerAnchorSelector = '[data-drag-handler-anchor-name]:not([data-drag-handler-node-type="tableRow"], [data-drag-handler-node-type="media"])';
23
23
  var gutterPaddingWidth = function gutterPaddingWidth() {
24
- return editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_13') ? "".concat(akEditorGutterPaddingDynamic(), "px") : '100%';
24
+ return editorExperiment('platform_editor_controls', 'variant1') ? "".concat(akEditorGutterPaddingDynamic(), "px") : '100%';
25
25
  };
26
26
  var gutterPaddingLeft = function gutterPaddingLeft() {
27
- return editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_13') ? "-".concat(akEditorGutterPaddingDynamic(), "px") : '-100px';
27
+ return editorExperiment('platform_editor_controls', 'variant1') ? "-".concat(akEditorGutterPaddingDynamic(), "px") : '-100px';
28
28
  };
29
29
  var extendedHoverZone = function extendedHoverZone() {
30
30
  return css(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".block-ctrl-drag-preview ".concat(dragHandlerAnchorSelector, "::after"), {
@@ -83,6 +83,15 @@ var extendedHoverZone = function extendedHoverZone() {
83
83
  display: 'none'
84
84
  }));
85
85
  };
86
+ var extendHoverZoneReduced = css({
87
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
88
+ '.ProseMirror': _defineProperty({}, "&& [data-drag-handler-anchor-depth=\"0\"]".concat(dragHandlerAnchorSelector, "::after"), _defineProperty({}, "@container editor-area (max-width: ".concat(akEditorFullPageNarrowBreakout, "px)"), {
89
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
90
+ left: "-".concat(akEditorGutterPaddingReduced, "px"),
91
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
92
+ width: "".concat(akEditorGutterPaddingReduced, "px")
93
+ }))
94
+ });
86
95
  var extendedDragZone = css({
87
96
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
88
97
  '.ProseMirror': _defineProperty({}, "&& [data-drag-handler-anchor-depth=\"0\"]".concat(dragHandlerAnchorSelector, "::after"), {
@@ -300,6 +309,6 @@ export var GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
300
309
  disabled: !expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true) || !fg('platform_editor_block_controls_perf_opt_patch_1')
301
310
  });
302
311
  return jsx(Global, {
303
- styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, fg('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
312
+ styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? extendHoverZoneReduced : undefined, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, fg('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
304
313
  });
305
314
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "4.0.6",
3
+ "version": "4.0.8",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/editor-plugin-user-intent": "^1.0.0",
45
45
  "@atlaskit/editor-plugin-width": "^4.0.0",
46
46
  "@atlaskit/editor-prosemirror": "7.0.0",
47
- "@atlaskit/editor-shared-styles": "^3.4.0",
47
+ "@atlaskit/editor-shared-styles": "^3.5.0",
48
48
  "@atlaskit/editor-tables": "^2.9.0",
49
49
  "@atlaskit/icon": "^27.3.0",
50
50
  "@atlaskit/link": "^3.2.0",
@@ -54,7 +54,7 @@
54
54
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
55
55
  "@atlaskit/primitives": "^14.10.0",
56
56
  "@atlaskit/theme": "^19.0.0",
57
- "@atlaskit/tmp-editor-statsig": "^9.7.0",
57
+ "@atlaskit/tmp-editor-statsig": "^9.8.0",
58
58
  "@atlaskit/tokens": "^5.5.0",
59
59
  "@atlaskit/tooltip": "^20.3.0",
60
60
  "@babel/runtime": "^7.0.0",
@@ -167,9 +167,6 @@
167
167
  "dst-a11y__replace-anchor-with-link__editor-jenga": {
168
168
  "type": "boolean"
169
169
  },
170
- "platform_editor_controls_patch_13": {
171
- "type": "boolean"
172
- },
173
170
  "platform_editor_breakout_resizing_hello_release": {
174
171
  "type": "boolean"
175
172
  },