@atlaskit/editor-plugin-block-controls 4.0.5 → 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,24 @@
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
+
13
+ ## 4.0.6
14
+
15
+ ### Patch Changes
16
+
17
+ - [#187144](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/187144)
18
+ [`a16147d8fbdfe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a16147d8fbdfe) -
19
+ Bump @atlaskit/adf-schema to v49.0.5
20
+ - Updated dependencies
21
+
3
22
  ## 4.0.5
4
23
 
5
24
  ### Patch Changes
@@ -43,6 +43,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
43
43
  * @jsxRuntime classic
44
44
  * @jsx jsx
45
45
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
46
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
46
47
  var iconWrapperStyles = (0, _primitives.xcss)({
47
48
  display: 'flex',
48
49
  justifyContent: 'center',
@@ -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
  };
@@ -34,6 +34,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
34
34
  * @jsxRuntime classic
35
35
  * @jsx jsx
36
36
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
37
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
37
38
  var TEXT_PARENT_TYPES = ['paragraph', 'heading', 'blockquote', 'taskItem', 'decisionItem'];
38
39
  var stickyButtonStyles = (0, _primitives.xcss)({
39
40
  top: '0',
@@ -8,6 +8,8 @@ exports.VisibilityContainer = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
10
10
  var _primitives = require("@atlaskit/primitives");
11
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
12
+
11
13
  var baseStyles = (0, _primitives.xcss)({
12
14
  transition: 'opacity 0.1s ease-in-out, visibility 0.1s ease-in-out'
13
15
  });
@@ -23,6 +23,7 @@ import DragHandlerIcon from '@atlaskit/icon/glyph/drag-handler';
23
23
  import { fg } from '@atlaskit/platform-feature-flags';
24
24
  import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
25
25
  import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
26
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
26
27
  import { Box, xcss } from '@atlaskit/primitives';
27
28
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
28
29
  import Tooltip from '@atlaskit/tooltip';
@@ -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
  };
@@ -16,6 +16,7 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
16
16
  import { findParentNode, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
17
17
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
18
18
  import AddIcon from '@atlaskit/icon/core/add';
19
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
19
20
  import { Box, Pressable, xcss } from '@atlaskit/primitives';
20
21
  import Tooltip from '@atlaskit/tooltip';
21
22
  import { getControlBottomCSSValue, getControlHeightCSSValue, getNodeHeight, getTopPosition, shouldBeSticky } from '../pm-plugins/utils/drag-handle-positions';
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
3
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
3
4
  import { Box, xcss } from '@atlaskit/primitives';
4
5
  const baseStyles = xcss({
5
6
  transition: 'opacity 0.1s ease-in-out, visibility 0.1s ease-in-out'
@@ -28,6 +28,7 @@ import DragHandlerIcon from '@atlaskit/icon/glyph/drag-handler';
28
28
  import { fg } from '@atlaskit/platform-feature-flags';
29
29
  import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
30
30
  import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
31
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
31
32
  import { Box, xcss } from '@atlaskit/primitives';
32
33
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
33
34
  import Tooltip from '@atlaskit/tooltip';
@@ -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
  };
@@ -20,6 +20,7 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
20
20
  import { findParentNode, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
21
21
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
22
22
  import AddIcon from '@atlaskit/icon/core/add';
23
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
23
24
  import { Box, Pressable, xcss } from '@atlaskit/primitives';
24
25
  import Tooltip from '@atlaskit/tooltip';
25
26
  import { getControlBottomCSSValue, getControlHeightCSSValue, getNodeHeight, getTopPosition, shouldBeSticky } from '../pm-plugins/utils/drag-handle-positions';
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
3
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
3
4
  import { Box, xcss } from '@atlaskit/primitives';
4
5
  var baseStyles = xcss({
5
6
  transition: 'opacity 0.1s ease-in-out, visibility 0.1s ease-in-out'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "4.0.5",
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",