@atlaskit/editor-plugin-block-controls 27.0.5 → 27.0.6

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,12 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 27.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`df5a172e148f7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/df5a172e148f7) -
8
+ EDITOR-8886 Add 24px margin for anchors next to active sticky headers
9
+
3
10
  ## 27.0.5
4
11
 
5
12
  ### Patch Changes
@@ -1,4 +1,5 @@
1
- ._zulpv77o{gap:var(--ds-space-025,2px)}._154iu2gc{top:var(--ds-space-100,8px)}
1
+ ._zulpv77o{gap:var(--ds-space-025,2px)}._154i1ejb{top:var(--ds-space-300,24px)}
2
+ ._154iu2gc{top:var(--ds-space-100,8px)}
2
3
  ._17c61i8t{position-visibility:anchors-valid}
3
4
  ._1bahesu3{justify-content:flex-end}
4
5
  ._1e0c1txw{display:flex}
@@ -28,6 +28,9 @@ var leftSurfaceRowStyles = null;
28
28
  // can stick near the top of the viewport instead of scrolling off with the node's top edge.
29
29
  // Keep in sync with STICKY_CONTROLS_TOP_MARGIN in ./consts (must be a static literal here).
30
30
  var leftSurfaceStickyStyles = null;
31
+
32
+ // Keep in sync with STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER in ./consts (must be a static literal here)
33
+ var leftSurfaceStickyTableHeaderStyles = null;
31
34
  var BlockControlsLeftSurfaceContent = function BlockControlsLeftSurfaceContent(_ref) {
32
35
  var api = _ref.api,
33
36
  components = _ref.components,
@@ -55,7 +58,7 @@ var BlockControlsLeftSurfaceContent = function BlockControlsLeftSurfaceContent(_
55
58
  style: placement.style,
56
59
  className: (0, _runtime.ax)(["_kqswstnw _17c61i8t _1pbyb4wl", isTopLevel && leftSurfaceGutterStyles.container])
57
60
  }, /*#__PURE__*/_react.default.createElement("div", {
58
- className: (0, _runtime.ax)(["_zulpv77o _4cvr1h6o _1e0c1txw", isTopLevel && leftSurfaceGutterStyles.row, isSticky && "_kqsw1if8 _154iu2gc"])
61
+ className: (0, _runtime.ax)(["_zulpv77o _4cvr1h6o _1e0c1txw", isTopLevel && leftSurfaceGutterStyles.row, isSticky && "_kqsw1if8 _154iu2gc", isSticky && (blockControlsContext === null || blockControlsContext === void 0 ? void 0 : blockControlsContext.targetNode.type.name) === 'table' && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_controls_sticky_header_fix') && "_154i1ejb"])
59
62
  }, /*#__PURE__*/_react.default.createElement(_blockControlsSurfaceComponents.BlockControlsVisibilityProvider, {
60
63
  shouldHideHoverControls: shouldHideHoverControls,
61
64
  useCssStyles: useCssStyles
@@ -1,4 +1,5 @@
1
- ._zulpv77o{gap:var(--ds-space-025,2px)}._154iu2gc{top:var(--ds-space-100,8px)}
1
+ ._zulpv77o{gap:var(--ds-space-025,2px)}._154i1ejb{top:var(--ds-space-300,24px)}
2
+ ._154iu2gc{top:var(--ds-space-100,8px)}
2
3
  ._17c61i8t{position-visibility:anchors-valid}
3
4
  ._1e0c1txw{display:flex}
4
5
  ._1pbyb4wl{z-index:100}
@@ -9,8 +9,10 @@ exports.BlockControlsRightSurface = void 0;
9
9
  require("./block-controls-right-surface.compiled.css");
10
10
  var _runtime = require("@compiled/react/runtime");
11
11
  var _react = _interopRequireDefault(require("react"));
12
+ var _blockControlUiContext = require("@atlaskit/editor-common/block-controls/block-control-ui-context");
12
13
  var _surfaceKeys = require("@atlaskit/editor-common/block-controls/surface-keys");
13
14
  var _surfaceRenderer = require("@atlaskit/editor-ui-control-model/surface-renderer");
15
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
14
16
  var _blockControlsSurfaceComponents = require("./block-controls-surface-components");
15
17
  var _visibilityContainer = require("./visibility-container");
16
18
  var rightSurfaceOuterStyles = null;
@@ -21,6 +23,9 @@ var rightSurfaceRowStyles = null;
21
23
  // can stick near the top of the viewport instead of scrolling off with the node's top edge.
22
24
  // Keep in sync with STICKY_CONTROLS_TOP_MARGIN in ./consts (must be a static literal here).
23
25
  var rightSurfaceStickyStyles = null;
26
+
27
+ // Keep in sync with STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER in ./consts (must be a static literal here)
28
+ var rightSurfaceStickyTableHeaderStyles = null;
24
29
  var BlockControlsRightSurfaceContent = function BlockControlsRightSurfaceContent(_ref) {
25
30
  var api = _ref.api,
26
31
  components = _ref.components,
@@ -28,6 +33,7 @@ var BlockControlsRightSurfaceContent = function BlockControlsRightSurfaceContent
28
33
  placement = _ref.placement,
29
34
  source = _ref.source,
30
35
  surfaceContext = _ref.surfaceContext;
36
+ var blockControlsContext = surfaceContext.get(_blockControlUiContext.BLOCK_CONTROL_UI_CONTEXT);
31
37
  var _useBlockControlsVisi = (0, _visibilityContainer.useBlockControlsVisibility)({
32
38
  api: api,
33
39
  controlSide: 'right',
@@ -45,7 +51,7 @@ var BlockControlsRightSurfaceContent = function BlockControlsRightSurfaceContent
45
51
  style: placement.style,
46
52
  className: (0, _runtime.ax)(["_kqswstnw _17c61i8t _1pbyb4wl"])
47
53
  }, /*#__PURE__*/_react.default.createElement("div", {
48
- className: (0, _runtime.ax)(["_zulpv77o _4cvr1h6o _1e0c1txw", isSticky && "_kqsw1if8 _154iu2gc"])
54
+ className: (0, _runtime.ax)(["_zulpv77o _4cvr1h6o _1e0c1txw", isSticky && "_kqsw1if8 _154iu2gc", isSticky && (blockControlsContext === null || blockControlsContext === void 0 ? void 0 : blockControlsContext.targetNode.type.name) === 'table' && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_controls_sticky_header_fix') && "_154i1ejb"])
49
55
  }, /*#__PURE__*/_react.default.createElement(_blockControlsSurfaceComponents.BlockControlsVisibilityProvider, {
50
56
  shouldHideHoverControls: shouldHideHoverControls,
51
57
  useCssStyles: useCssStyles
@@ -1,4 +1,5 @@
1
- ._zulpv77o{gap:var(--ds-space-025,2px)}._154iu2gc{top:var(--ds-space-100,8px)}
1
+ ._zulpv77o{gap:var(--ds-space-025,2px)}._154i1ejb{top:var(--ds-space-300,24px)}
2
+ ._154iu2gc{top:var(--ds-space-100,8px)}
2
3
  ._17c61i8t{position-visibility:anchors-valid}
3
4
  ._1bahesu3{justify-content:flex-end}
4
5
  ._1e0c1txw{display:flex}
@@ -21,6 +21,9 @@ const leftSurfaceRowStyles = null;
21
21
  // can stick near the top of the viewport instead of scrolling off with the node's top edge.
22
22
  // Keep in sync with STICKY_CONTROLS_TOP_MARGIN in ./consts (must be a static literal here).
23
23
  const leftSurfaceStickyStyles = null;
24
+
25
+ // Keep in sync with STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER in ./consts (must be a static literal here)
26
+ const leftSurfaceStickyTableHeaderStyles = null;
24
27
  const BlockControlsLeftSurfaceContent = ({
25
28
  api,
26
29
  components,
@@ -50,7 +53,7 @@ const BlockControlsLeftSurfaceContent = ({
50
53
  style: placement.style,
51
54
  className: ax(["_kqswstnw _17c61i8t _1pbyb4wl", isTopLevel && leftSurfaceGutterStyles.container])
52
55
  }, /*#__PURE__*/React.createElement("div", {
53
- className: ax(["_zulpv77o _4cvr1h6o _1e0c1txw", isTopLevel && leftSurfaceGutterStyles.row, isSticky && "_kqsw1if8 _154iu2gc"])
56
+ className: ax(["_zulpv77o _4cvr1h6o _1e0c1txw", isTopLevel && leftSurfaceGutterStyles.row, isSticky && "_kqsw1if8 _154iu2gc", isSticky && (blockControlsContext === null || blockControlsContext === void 0 ? void 0 : blockControlsContext.targetNode.type.name) === 'table' && isExperimentEnabled('platform_editor_block_controls_sticky_header_fix') && "_154i1ejb"])
54
57
  }, /*#__PURE__*/React.createElement(BlockControlsVisibilityProvider, {
55
58
  shouldHideHoverControls: shouldHideHoverControls,
56
59
  useCssStyles: useCssStyles
@@ -1,4 +1,5 @@
1
- ._zulpv77o{gap:var(--ds-space-025,2px)}._154iu2gc{top:var(--ds-space-100,8px)}
1
+ ._zulpv77o{gap:var(--ds-space-025,2px)}._154i1ejb{top:var(--ds-space-300,24px)}
2
+ ._154iu2gc{top:var(--ds-space-100,8px)}
2
3
  ._17c61i8t{position-visibility:anchors-valid}
3
4
  ._1e0c1txw{display:flex}
4
5
  ._1pbyb4wl{z-index:100}
@@ -2,8 +2,10 @@
2
2
  import "./block-controls-right-surface.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
+ import { BLOCK_CONTROL_UI_CONTEXT } from '@atlaskit/editor-common/block-controls/block-control-ui-context';
5
6
  import { BLOCK_CONTROLS_RIGHT_SURFACE } from '@atlaskit/editor-common/block-controls/surface-keys';
6
7
  import { SurfaceRenderer } from '@atlaskit/editor-ui-control-model/surface-renderer';
8
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
7
9
  import { BlockControlsVisibilityProvider } from './block-controls-surface-components';
8
10
  import { useBlockControlsVisibility } from './visibility-container';
9
11
  const rightSurfaceOuterStyles = null;
@@ -14,6 +16,9 @@ const rightSurfaceRowStyles = null;
14
16
  // can stick near the top of the viewport instead of scrolling off with the node's top edge.
15
17
  // Keep in sync with STICKY_CONTROLS_TOP_MARGIN in ./consts (must be a static literal here).
16
18
  const rightSurfaceStickyStyles = null;
19
+
20
+ // Keep in sync with STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER in ./consts (must be a static literal here)
21
+ const rightSurfaceStickyTableHeaderStyles = null;
17
22
  const BlockControlsRightSurfaceContent = ({
18
23
  api,
19
24
  components,
@@ -22,6 +27,7 @@ const BlockControlsRightSurfaceContent = ({
22
27
  source,
23
28
  surfaceContext
24
29
  }) => {
30
+ const blockControlsContext = surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT);
25
31
  const {
26
32
  shouldHide: shouldHideHoverControls,
27
33
  useCssStyles
@@ -40,7 +46,7 @@ const BlockControlsRightSurfaceContent = ({
40
46
  style: placement.style,
41
47
  className: ax(["_kqswstnw _17c61i8t _1pbyb4wl"])
42
48
  }, /*#__PURE__*/React.createElement("div", {
43
- className: ax(["_zulpv77o _4cvr1h6o _1e0c1txw", isSticky && "_kqsw1if8 _154iu2gc"])
49
+ className: ax(["_zulpv77o _4cvr1h6o _1e0c1txw", isSticky && "_kqsw1if8 _154iu2gc", isSticky && (blockControlsContext === null || blockControlsContext === void 0 ? void 0 : blockControlsContext.targetNode.type.name) === 'table' && isExperimentEnabled('platform_editor_block_controls_sticky_header_fix') && "_154i1ejb"])
44
50
  }, /*#__PURE__*/React.createElement(BlockControlsVisibilityProvider, {
45
51
  shouldHideHoverControls: shouldHideHoverControls,
46
52
  useCssStyles: useCssStyles
@@ -1,4 +1,5 @@
1
- ._zulpv77o{gap:var(--ds-space-025,2px)}._154iu2gc{top:var(--ds-space-100,8px)}
1
+ ._zulpv77o{gap:var(--ds-space-025,2px)}._154i1ejb{top:var(--ds-space-300,24px)}
2
+ ._154iu2gc{top:var(--ds-space-100,8px)}
2
3
  ._17c61i8t{position-visibility:anchors-valid}
3
4
  ._1bahesu3{justify-content:flex-end}
4
5
  ._1e0c1txw{display:flex}
@@ -21,6 +21,9 @@ var leftSurfaceRowStyles = null;
21
21
  // can stick near the top of the viewport instead of scrolling off with the node's top edge.
22
22
  // Keep in sync with STICKY_CONTROLS_TOP_MARGIN in ./consts (must be a static literal here).
23
23
  var leftSurfaceStickyStyles = null;
24
+
25
+ // Keep in sync with STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER in ./consts (must be a static literal here)
26
+ var leftSurfaceStickyTableHeaderStyles = null;
24
27
  var BlockControlsLeftSurfaceContent = function BlockControlsLeftSurfaceContent(_ref) {
25
28
  var api = _ref.api,
26
29
  components = _ref.components,
@@ -48,7 +51,7 @@ var BlockControlsLeftSurfaceContent = function BlockControlsLeftSurfaceContent(_
48
51
  style: placement.style,
49
52
  className: ax(["_kqswstnw _17c61i8t _1pbyb4wl", isTopLevel && leftSurfaceGutterStyles.container])
50
53
  }, /*#__PURE__*/React.createElement("div", {
51
- className: ax(["_zulpv77o _4cvr1h6o _1e0c1txw", isTopLevel && leftSurfaceGutterStyles.row, isSticky && "_kqsw1if8 _154iu2gc"])
54
+ className: ax(["_zulpv77o _4cvr1h6o _1e0c1txw", isTopLevel && leftSurfaceGutterStyles.row, isSticky && "_kqsw1if8 _154iu2gc", isSticky && (blockControlsContext === null || blockControlsContext === void 0 ? void 0 : blockControlsContext.targetNode.type.name) === 'table' && isExperimentEnabled('platform_editor_block_controls_sticky_header_fix') && "_154i1ejb"])
52
55
  }, /*#__PURE__*/React.createElement(BlockControlsVisibilityProvider, {
53
56
  shouldHideHoverControls: shouldHideHoverControls,
54
57
  useCssStyles: useCssStyles
@@ -1,4 +1,5 @@
1
- ._zulpv77o{gap:var(--ds-space-025,2px)}._154iu2gc{top:var(--ds-space-100,8px)}
1
+ ._zulpv77o{gap:var(--ds-space-025,2px)}._154i1ejb{top:var(--ds-space-300,24px)}
2
+ ._154iu2gc{top:var(--ds-space-100,8px)}
2
3
  ._17c61i8t{position-visibility:anchors-valid}
3
4
  ._1e0c1txw{display:flex}
4
5
  ._1pbyb4wl{z-index:100}
@@ -2,8 +2,10 @@
2
2
  import "./block-controls-right-surface.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
+ import { BLOCK_CONTROL_UI_CONTEXT } from '@atlaskit/editor-common/block-controls/block-control-ui-context';
5
6
  import { BLOCK_CONTROLS_RIGHT_SURFACE } from '@atlaskit/editor-common/block-controls/surface-keys';
6
7
  import { SurfaceRenderer } from '@atlaskit/editor-ui-control-model/surface-renderer';
8
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
7
9
  import { BlockControlsVisibilityProvider } from './block-controls-surface-components';
8
10
  import { useBlockControlsVisibility } from './visibility-container';
9
11
  var rightSurfaceOuterStyles = null;
@@ -14,6 +16,9 @@ var rightSurfaceRowStyles = null;
14
16
  // can stick near the top of the viewport instead of scrolling off with the node's top edge.
15
17
  // Keep in sync with STICKY_CONTROLS_TOP_MARGIN in ./consts (must be a static literal here).
16
18
  var rightSurfaceStickyStyles = null;
19
+
20
+ // Keep in sync with STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER in ./consts (must be a static literal here)
21
+ var rightSurfaceStickyTableHeaderStyles = null;
17
22
  var BlockControlsRightSurfaceContent = function BlockControlsRightSurfaceContent(_ref) {
18
23
  var api = _ref.api,
19
24
  components = _ref.components,
@@ -21,6 +26,7 @@ var BlockControlsRightSurfaceContent = function BlockControlsRightSurfaceContent
21
26
  placement = _ref.placement,
22
27
  source = _ref.source,
23
28
  surfaceContext = _ref.surfaceContext;
29
+ var blockControlsContext = surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT);
24
30
  var _useBlockControlsVisi = useBlockControlsVisibility({
25
31
  api: api,
26
32
  controlSide: 'right',
@@ -38,7 +44,7 @@ var BlockControlsRightSurfaceContent = function BlockControlsRightSurfaceContent
38
44
  style: placement.style,
39
45
  className: ax(["_kqswstnw _17c61i8t _1pbyb4wl"])
40
46
  }, /*#__PURE__*/React.createElement("div", {
41
- className: ax(["_zulpv77o _4cvr1h6o _1e0c1txw", isSticky && "_kqsw1if8 _154iu2gc"])
47
+ className: ax(["_zulpv77o _4cvr1h6o _1e0c1txw", isSticky && "_kqsw1if8 _154iu2gc", isSticky && (blockControlsContext === null || blockControlsContext === void 0 ? void 0 : blockControlsContext.targetNode.type.name) === 'table' && isExperimentEnabled('platform_editor_block_controls_sticky_header_fix') && "_154i1ejb"])
42
48
  }, /*#__PURE__*/React.createElement(BlockControlsVisibilityProvider, {
43
49
  shouldHideHoverControls: shouldHideHoverControls,
44
50
  useCssStyles: useCssStyles
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "27.0.5",
3
+ "version": "27.0.6",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/editor-plugin-interaction": "^40.0.0",
39
39
  "@atlaskit/editor-plugin-limited-mode": "^23.0.0",
40
40
  "@atlaskit/editor-plugin-metrics": "^27.0.0",
41
- "@atlaskit/editor-plugin-quick-insert": "^26.0.0",
41
+ "@atlaskit/editor-plugin-quick-insert": "^26.1.0",
42
42
  "@atlaskit/editor-plugin-selection": "^26.0.0",
43
43
  "@atlaskit/editor-plugin-show-diff": "^24.1.0",
44
44
  "@atlaskit/editor-plugin-toolbar": "^23.0.0",
@@ -73,7 +73,7 @@
73
73
  "uuid": "^11.1.1"
74
74
  },
75
75
  "peerDependencies": {
76
- "@atlaskit/editor-common": "^130.3.0",
76
+ "@atlaskit/editor-common": "^130.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"