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

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,15 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 4.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#185940](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185940)
8
+ [`456bee393c4d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/456bee393c4d3) -
9
+ [ux] When editor-area is less than 768px wide, we reduce editor gutters to 24px in Full-page
10
+ editor.
11
+ - Updated dependencies
12
+
3
13
  ## 4.0.6
4
14
 
5
15
  ### Patch Changes
@@ -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
  };
@@ -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';
@@ -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
  };
@@ -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';
@@ -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.7",
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",