@atlaskit/editor-plugin-block-menu 10.1.16 → 11.0.1

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,43 @@
1
1
  # @atlaskit/editor-plugin-block-menu
2
2
 
3
+ ## 11.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`12f4372b86b8d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/12f4372b86b8d) -
8
+ Add `platform_editor_menu_radius_update` experiment that bumps the editor menu surface border
9
+ radius from `radius.small` (4px) to `radius.large` (8px). The block menu and paste actions menu
10
+ now consume the shared `ToolbarMenuContainer` surface rather than rolling their own, so they
11
+ inherit the gated radius along with `ToolbarMenuContainer`'s existing consumers (table and layout
12
+ menus).
13
+ - Updated dependencies
14
+
15
+ ## 11.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
20
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
21
+
22
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
23
+
24
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
25
+
26
+ ```diff
27
+ - "typesVersions": {
28
+ - ">=4.5 <4.9": {
29
+ - "*": [
30
+ - "dist/types-ts4.5/*",
31
+ - "dist/types-ts4.5/index.d.ts"
32
+ - ]
33
+ - }
34
+ - },
35
+ ```
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies
40
+
3
41
  ## 10.1.16
4
42
 
5
43
  ### Patch 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": "10.1.16",
3
+ "version": "11.0.1",
4
4
  "description": "BlockMenu plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -17,40 +17,32 @@
17
17
  "module": "dist/esm/index.js",
18
18
  "module:es2019": "dist/es2019/index.js",
19
19
  "types": "dist/types/index.d.ts",
20
- "typesVersions": {
21
- ">=4.5 <4.9": {
22
- "*": [
23
- "dist/types-ts4.5/*",
24
- "dist/types-ts4.5/index.d.ts"
25
- ]
26
- }
27
- },
28
20
  "sideEffects": false,
29
21
  "atlaskit:src": "src/index.ts",
30
22
  "dependencies": {
31
- "@atlaskit/browser-apis": "^0.0.2",
32
- "@atlaskit/css": "^0.19.0",
33
- "@atlaskit/editor-plugin-analytics": "^11.0.0",
34
- "@atlaskit/editor-plugin-block-controls": "^12.4.0",
35
- "@atlaskit/editor-plugin-decorations": "^11.0.0",
36
- "@atlaskit/editor-plugin-selection": "^11.0.0",
37
- "@atlaskit/editor-plugin-user-intent": "^9.1.0",
38
- "@atlaskit/editor-prosemirror": "^7.3.0",
39
- "@atlaskit/editor-shared-styles": "^3.11.0",
40
- "@atlaskit/editor-tables": "^2.10.0",
41
- "@atlaskit/editor-toolbar": "^1.10.0",
42
- "@atlaskit/flag": "^17.13.0",
43
- "@atlaskit/icon": "^35.4.0",
44
- "@atlaskit/platform-feature-flags": "^1.1.0",
45
- "@atlaskit/primitives": "^19.0.0",
46
- "@atlaskit/prosemirror-history": "^0.2.0",
47
- "@atlaskit/tmp-editor-statsig": "^103.0.0",
48
- "@atlaskit/tokens": "^13.4.0",
23
+ "@atlaskit/browser-apis": "^1.0.0",
24
+ "@atlaskit/css": "^1.0.0",
25
+ "@atlaskit/editor-plugin-analytics": "^12.0.0",
26
+ "@atlaskit/editor-plugin-block-controls": "^13.0.0",
27
+ "@atlaskit/editor-plugin-decorations": "^12.0.0",
28
+ "@atlaskit/editor-plugin-selection": "^12.0.0",
29
+ "@atlaskit/editor-plugin-user-intent": "^10.0.0",
30
+ "@atlaskit/editor-prosemirror": "^8.0.0",
31
+ "@atlaskit/editor-shared-styles": "^4.0.0",
32
+ "@atlaskit/editor-tables": "^3.0.0",
33
+ "@atlaskit/editor-toolbar": "^2.0.0",
34
+ "@atlaskit/flag": "^18.0.0",
35
+ "@atlaskit/icon": "^36.0.0",
36
+ "@atlaskit/platform-feature-flags": "^2.0.0",
37
+ "@atlaskit/primitives": "^20.0.0",
38
+ "@atlaskit/prosemirror-history": "^1.0.0",
39
+ "@atlaskit/tmp-editor-statsig": "^105.0.0",
40
+ "@atlaskit/tokens": "^14.0.0",
49
41
  "@babel/runtime": "^7.0.0",
50
42
  "bind-event-listener": "^3.0.0"
51
43
  },
52
44
  "peerDependencies": {
53
- "@atlaskit/editor-common": "^115.15.0",
45
+ "@atlaskit/editor-common": "^116.1.0",
54
46
  "react": "^18.2.0",
55
47
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
56
48
  },