@atlaskit/editor-plugin-block-menu 11.0.0 → 11.0.2
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 +18 -0
- package/dist/cjs/ui/block-menu.js +18 -0
- package/dist/es2019/ui/block-menu.js +16 -0
- package/dist/esm/ui/block-menu.js +18 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-menu
|
|
2
2
|
|
|
3
|
+
## 11.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 11.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`12f4372b86b8d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/12f4372b86b8d) -
|
|
14
|
+
Add `platform_editor_menu_radius_update` experiment that bumps the editor menu surface border
|
|
15
|
+
radius from `radius.small` (4px) to `radius.large` (8px). The block menu and paste actions menu
|
|
16
|
+
now consume the shared `ToolbarMenuContainer` surface rather than rolling their own, so they
|
|
17
|
+
inherit the gated radius along with `ToolbarMenuContainer`'s existing consumers (table and layout
|
|
18
|
+
menus).
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 11.0.0
|
|
4
22
|
|
|
5
23
|
### Major Changes
|
|
@@ -22,6 +22,7 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
22
22
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
23
23
|
var _uiReact = require("@atlaskit/editor-common/ui-react");
|
|
24
24
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
25
|
+
var _toolbarMenuContainer = require("@atlaskit/editor-toolbar/toolbar-menu-container");
|
|
25
26
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
27
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
27
28
|
var _prosemirrorHistory = require("@atlaskit/prosemirror-history");
|
|
@@ -138,6 +139,23 @@ var BlockMenuContent = function BlockMenuContent(_ref4) {
|
|
|
138
139
|
}
|
|
139
140
|
return target.closest('[data-toolbar-nested-dropdown-menu]') !== null;
|
|
140
141
|
};
|
|
142
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_menu_radius_update', 'isEnabled', true)) {
|
|
143
|
+
return /*#__PURE__*/_react.default.createElement(_toolbarMenuContainer.ToolbarMenuContainer, {
|
|
144
|
+
testId: _blockMenu.BLOCK_MENU_TEST_ID,
|
|
145
|
+
ref: ref,
|
|
146
|
+
xcss: styles.maxWidthStyles
|
|
147
|
+
}, /*#__PURE__*/_react.default.createElement(_uiMenu.ArrowKeyNavigationProvider, {
|
|
148
|
+
type: _uiMenu.ArrowKeyNavigationType.MENU
|
|
149
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
150
|
+
,
|
|
151
|
+
handleClose: function handleClose(e) {
|
|
152
|
+
return e.preventDefault();
|
|
153
|
+
},
|
|
154
|
+
disableArrowKeyNavigation: shouldDisableArrowKeyNavigation
|
|
155
|
+
}, /*#__PURE__*/_react.default.createElement(_BlockMenuRenderer.BlockMenuRenderer, {
|
|
156
|
+
allRegisteredComponents: blockMenuComponents || []
|
|
157
|
+
})));
|
|
158
|
+
}
|
|
141
159
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
142
160
|
testId: _blockMenu.BLOCK_MENU_TEST_ID,
|
|
143
161
|
role: (0, _expValEquals.expValEquals)('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? 'menu' : undefined,
|
|
@@ -13,6 +13,7 @@ import { Popup } from '@atlaskit/editor-common/ui';
|
|
|
13
13
|
import { ArrowKeyNavigationProvider, ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu';
|
|
14
14
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
15
15
|
import { akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
16
|
+
import { ToolbarMenuContainer } from '@atlaskit/editor-toolbar/toolbar-menu-container';
|
|
16
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
18
19
|
import { redo, undo } from '@atlaskit/prosemirror-history';
|
|
@@ -129,6 +130,21 @@ const BlockMenuContent = ({
|
|
|
129
130
|
}
|
|
130
131
|
return target.closest('[data-toolbar-nested-dropdown-menu]') !== null;
|
|
131
132
|
};
|
|
133
|
+
if (expValEquals('platform_editor_menu_radius_update', 'isEnabled', true)) {
|
|
134
|
+
return /*#__PURE__*/React.createElement(ToolbarMenuContainer, {
|
|
135
|
+
testId: BLOCK_MENU_TEST_ID,
|
|
136
|
+
ref: ref,
|
|
137
|
+
xcss: styles.maxWidthStyles
|
|
138
|
+
}, /*#__PURE__*/React.createElement(ArrowKeyNavigationProvider, {
|
|
139
|
+
type: ArrowKeyNavigationType.MENU
|
|
140
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
141
|
+
,
|
|
142
|
+
handleClose: e => e.preventDefault(),
|
|
143
|
+
disableArrowKeyNavigation: shouldDisableArrowKeyNavigation
|
|
144
|
+
}, /*#__PURE__*/React.createElement(BlockMenuRenderer, {
|
|
145
|
+
allRegisteredComponents: blockMenuComponents || []
|
|
146
|
+
})));
|
|
147
|
+
}
|
|
132
148
|
return /*#__PURE__*/React.createElement(Box, {
|
|
133
149
|
testId: BLOCK_MENU_TEST_ID,
|
|
134
150
|
role: expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? 'menu' : undefined,
|
|
@@ -14,6 +14,7 @@ import { Popup } from '@atlaskit/editor-common/ui';
|
|
|
14
14
|
import { ArrowKeyNavigationProvider, ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu';
|
|
15
15
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
16
16
|
import { akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
17
|
+
import { ToolbarMenuContainer } from '@atlaskit/editor-toolbar/toolbar-menu-container';
|
|
17
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
19
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
19
20
|
import { redo, undo } from '@atlaskit/prosemirror-history';
|
|
@@ -129,6 +130,23 @@ var BlockMenuContent = function BlockMenuContent(_ref4) {
|
|
|
129
130
|
}
|
|
130
131
|
return target.closest('[data-toolbar-nested-dropdown-menu]') !== null;
|
|
131
132
|
};
|
|
133
|
+
if (expValEquals('platform_editor_menu_radius_update', 'isEnabled', true)) {
|
|
134
|
+
return /*#__PURE__*/React.createElement(ToolbarMenuContainer, {
|
|
135
|
+
testId: BLOCK_MENU_TEST_ID,
|
|
136
|
+
ref: ref,
|
|
137
|
+
xcss: styles.maxWidthStyles
|
|
138
|
+
}, /*#__PURE__*/React.createElement(ArrowKeyNavigationProvider, {
|
|
139
|
+
type: ArrowKeyNavigationType.MENU
|
|
140
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
141
|
+
,
|
|
142
|
+
handleClose: function handleClose(e) {
|
|
143
|
+
return e.preventDefault();
|
|
144
|
+
},
|
|
145
|
+
disableArrowKeyNavigation: shouldDisableArrowKeyNavigation
|
|
146
|
+
}, /*#__PURE__*/React.createElement(BlockMenuRenderer, {
|
|
147
|
+
allRegisteredComponents: blockMenuComponents || []
|
|
148
|
+
})));
|
|
149
|
+
}
|
|
132
150
|
return /*#__PURE__*/React.createElement(Box, {
|
|
133
151
|
testId: BLOCK_MENU_TEST_ID,
|
|
134
152
|
role: expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? 'menu' : undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-menu",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.2",
|
|
4
4
|
"description": "BlockMenu plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
37
37
|
"@atlaskit/primitives": "^20.0.0",
|
|
38
38
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
39
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
39
|
+
"@atlaskit/tmp-editor-statsig": "^106.0.0",
|
|
40
40
|
"@atlaskit/tokens": "^14.0.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"bind-event-listener": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@atlaskit/editor-common": "^116.
|
|
45
|
+
"@atlaskit/editor-common": "^116.2.0",
|
|
46
46
|
"react": "^18.2.0",
|
|
47
47
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
48
48
|
},
|