@atlaskit/editor-plugin-expand 4.3.1 → 5.0.0

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,13 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e882e86092666`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e882e86092666) -
8
+ [ux] Register expand, layout and code block itmes in block menu. Update panel item.
9
+ - Updated dependencies
10
+
3
11
  ## 4.3.1
4
12
 
5
13
  ### Patch Changes
@@ -8,9 +8,12 @@ exports.expandPlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _adfSchema = require("@atlaskit/adf-schema");
10
10
  var _analytics = require("@atlaskit/editor-common/analytics");
11
+ var _blockMenu = require("@atlaskit/editor-common/block-menu");
11
12
  var _messages = require("@atlaskit/editor-common/messages");
12
13
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
13
14
  var _utils = require("@atlaskit/editor-common/utils");
15
+ var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
16
+ var _ExpandBlockMenuItem = require("../ui/ExpandBlockMenuItem");
14
17
  var _commands = require("./commands");
15
18
  var _keymap = require("./pm-plugins/keymap");
16
19
  var _main = require("./pm-plugins/main");
@@ -22,6 +25,19 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
22
25
  var _ref$config = _ref.config,
23
26
  options = _ref$config === void 0 ? {} : _ref$config,
24
27
  api = _ref.api;
28
+ if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
29
+ var _api$blockMenu;
30
+ api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
31
+ type: 'block-menu-item',
32
+ key: _blockMenu.FORMAT_EXPAND_MENU_ITEM.key,
33
+ parent: {
34
+ type: 'block-menu-section',
35
+ key: _blockMenu.FORMAT_MENU_ITEM.key,
36
+ rank: _blockMenu.FORMAT_NESTED_MENU_RANK[_blockMenu.FORMAT_EXPAND_MENU_ITEM.key]
37
+ },
38
+ component: (0, _ExpandBlockMenuItem.createExpandBlockMenuItem)(api)
39
+ }]);
40
+ }
25
41
  return {
26
42
  name: 'expand',
27
43
  nodes: function nodes() {
@@ -8,10 +8,13 @@ exports.expandPlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _adfSchema = require("@atlaskit/adf-schema");
10
10
  var _analytics = require("@atlaskit/editor-common/analytics");
11
+ var _blockMenu = require("@atlaskit/editor-common/block-menu");
11
12
  var _messages = require("@atlaskit/editor-common/messages");
12
13
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
13
14
  var _utils = require("@atlaskit/editor-common/utils");
14
15
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
+ var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
17
+ var _ExpandBlockMenuItem = require("../ui/ExpandBlockMenuItem");
15
18
  var _commands = require("./commands");
16
19
  var _keymap = require("./pm-plugins/keymap");
17
20
  var _main = require("./pm-plugins/main");
@@ -23,6 +26,19 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
23
26
  var _ref$config = _ref.config,
24
27
  options = _ref$config === void 0 ? {} : _ref$config,
25
28
  api = _ref.api;
29
+ if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
30
+ var _api$blockMenu;
31
+ api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
32
+ type: 'block-menu-item',
33
+ key: _blockMenu.FORMAT_EXPAND_MENU_ITEM.key,
34
+ parent: {
35
+ type: 'block-menu-section',
36
+ key: _blockMenu.FORMAT_MENU_ITEM.key,
37
+ rank: _blockMenu.FORMAT_NESTED_MENU_RANK[_blockMenu.FORMAT_EXPAND_MENU_ITEM.key]
38
+ },
39
+ component: (0, _ExpandBlockMenuItem.createExpandBlockMenuItem)(api)
40
+ }]);
41
+ }
26
42
  return {
27
43
  name: 'expand',
28
44
  nodes: function nodes() {
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.createExpandBlockMenuItem = void 0;
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _reactIntlNext = require("react-intl-next");
11
+ var _messages = require("@atlaskit/editor-common/messages");
12
+ var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
13
+ var _state = require("@atlaskit/editor-prosemirror/state");
14
+ var _editorToolbar = require("@atlaskit/editor-toolbar");
15
+ var _expandElement = _interopRequireDefault(require("@atlaskit/icon-lab/core/expand-element"));
16
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
+ var nodeName = 'expand';
18
+ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
19
+ var api = _ref.api;
20
+ var _useIntl = (0, _reactIntlNext.useIntl)(),
21
+ formatMessage = _useIntl.formatMessage;
22
+ var selection = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'selection.selection');
23
+ var isExpandSelected = (0, _react.useMemo)(function () {
24
+ if (!selection) {
25
+ return false;
26
+ }
27
+ if (selection instanceof _state.NodeSelection) {
28
+ return selection.node.type.name === nodeName;
29
+ }
30
+ return false;
31
+ }, [selection]);
32
+ var handleClick = function handleClick() {
33
+ var _api$blockMenu;
34
+ api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName));
35
+ };
36
+ return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
37
+ onClick: handleClick,
38
+ isSelected: isExpandSelected,
39
+ elemBefore: /*#__PURE__*/_react.default.createElement(_expandElement.default, {
40
+ label: ""
41
+ })
42
+ }, formatMessage(_messages.toolbarInsertBlockMessages.expand));
43
+ };
44
+ var createExpandBlockMenuItem = exports.createExpandBlockMenuItem = function createExpandBlockMenuItem(api) {
45
+ return function () {
46
+ return /*#__PURE__*/_react.default.createElement(ExpandBlockMenuItem, {
47
+ api: api
48
+ });
49
+ };
50
+ };
@@ -1,9 +1,12 @@
1
1
  import React from 'react';
2
2
  import { expandWithNestedExpand, nestedExpand } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
+ import { FORMAT_MENU_ITEM, FORMAT_EXPAND_MENU_ITEM, FORMAT_NESTED_MENU_RANK } from '@atlaskit/editor-common/block-menu';
4
5
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
6
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
6
7
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
8
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
9
+ import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
7
10
  import { createExpandNode, insertExpand, insertExpandWithInputMethod, toggleExpandWithMatch } from './commands';
8
11
  import { expandKeymap } from './pm-plugins/keymap';
9
12
  import { createPlugin } from './pm-plugins/main';
@@ -16,6 +19,19 @@ export let expandPlugin = ({
16
19
  api
17
20
  }) => {
18
21
  var _api$analytics, _api$analytics2;
22
+ if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
23
+ var _api$blockMenu;
24
+ api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents([{
25
+ type: 'block-menu-item',
26
+ key: FORMAT_EXPAND_MENU_ITEM.key,
27
+ parent: {
28
+ type: 'block-menu-section',
29
+ key: FORMAT_MENU_ITEM.key,
30
+ rank: FORMAT_NESTED_MENU_RANK[FORMAT_EXPAND_MENU_ITEM.key]
31
+ },
32
+ component: createExpandBlockMenuItem(api)
33
+ }]);
34
+ }
19
35
  return {
20
36
  name: 'expand',
21
37
  nodes() {
@@ -1,10 +1,13 @@
1
1
  import React from 'react';
2
2
  import { expandWithNestedExpand, expandWithNestedExpandLocalId, nestedExpand, nestedExpandWithLocalId } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
+ import { FORMAT_MENU_ITEM, FORMAT_EXPAND_MENU_ITEM, FORMAT_NESTED_MENU_RANK } from '@atlaskit/editor-common/block-menu';
4
5
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
6
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
6
7
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
7
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
10
+ import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
8
11
  import { createExpandNode, insertExpand, insertExpandWithInputMethod, toggleExpandWithMatch } from './commands';
9
12
  import { expandKeymap } from './pm-plugins/keymap';
10
13
  import { createPlugin } from './pm-plugins/main';
@@ -17,6 +20,19 @@ export let expandPlugin = ({
17
20
  api
18
21
  }) => {
19
22
  var _api$analytics, _api$analytics2;
23
+ if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
24
+ var _api$blockMenu;
25
+ api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents([{
26
+ type: 'block-menu-item',
27
+ key: FORMAT_EXPAND_MENU_ITEM.key,
28
+ parent: {
29
+ type: 'block-menu-section',
30
+ key: FORMAT_MENU_ITEM.key,
31
+ rank: FORMAT_NESTED_MENU_RANK[FORMAT_EXPAND_MENU_ITEM.key]
32
+ },
33
+ component: createExpandBlockMenuItem(api)
34
+ }]);
35
+ }
20
36
  return {
21
37
  name: 'expand',
22
38
  nodes() {
@@ -0,0 +1,41 @@
1
+ import React, { useMemo } from 'react';
2
+ import { useIntl } from 'react-intl-next';
3
+ import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
4
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
5
+ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
6
+ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
7
+ import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
8
+ const nodeName = 'expand';
9
+ const ExpandBlockMenuItem = ({
10
+ api
11
+ }) => {
12
+ const {
13
+ formatMessage
14
+ } = useIntl();
15
+ const selection = useSharedPluginStateSelector(api, 'selection.selection');
16
+ const isExpandSelected = useMemo(() => {
17
+ if (!selection) {
18
+ return false;
19
+ }
20
+ if (selection instanceof NodeSelection) {
21
+ return selection.node.type.name === nodeName;
22
+ }
23
+ return false;
24
+ }, [selection]);
25
+ const handleClick = () => {
26
+ var _api$blockMenu;
27
+ api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName));
28
+ };
29
+ return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
30
+ onClick: handleClick,
31
+ isSelected: isExpandSelected,
32
+ elemBefore: /*#__PURE__*/React.createElement(ExpandElementIcon, {
33
+ label: ""
34
+ })
35
+ }, formatMessage(toolbarInsertBlockMessages.expand));
36
+ };
37
+ export const createExpandBlockMenuItem = api => {
38
+ return () => /*#__PURE__*/React.createElement(ExpandBlockMenuItem, {
39
+ api: api
40
+ });
41
+ };
@@ -1,9 +1,12 @@
1
1
  import React from 'react';
2
2
  import { expandWithNestedExpand, nestedExpand } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
+ import { FORMAT_MENU_ITEM, FORMAT_EXPAND_MENU_ITEM, FORMAT_NESTED_MENU_RANK } from '@atlaskit/editor-common/block-menu';
4
5
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
6
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
6
7
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
8
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
9
+ import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
7
10
  import { createExpandNode, insertExpand, insertExpandWithInputMethod, toggleExpandWithMatch as _toggleExpandWithMatch } from './commands';
8
11
  import { expandKeymap } from './pm-plugins/keymap';
9
12
  import { createPlugin } from './pm-plugins/main';
@@ -16,6 +19,19 @@ export var expandPlugin = function expandPlugin(_ref) {
16
19
  var _ref$config = _ref.config,
17
20
  options = _ref$config === void 0 ? {} : _ref$config,
18
21
  api = _ref.api;
22
+ if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
23
+ var _api$blockMenu;
24
+ api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
25
+ type: 'block-menu-item',
26
+ key: FORMAT_EXPAND_MENU_ITEM.key,
27
+ parent: {
28
+ type: 'block-menu-section',
29
+ key: FORMAT_MENU_ITEM.key,
30
+ rank: FORMAT_NESTED_MENU_RANK[FORMAT_EXPAND_MENU_ITEM.key]
31
+ },
32
+ component: createExpandBlockMenuItem(api)
33
+ }]);
34
+ }
19
35
  return {
20
36
  name: 'expand',
21
37
  nodes: function nodes() {
@@ -1,10 +1,13 @@
1
1
  import React from 'react';
2
2
  import { expandWithNestedExpand, expandWithNestedExpandLocalId, nestedExpand, nestedExpandWithLocalId } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
+ import { FORMAT_MENU_ITEM, FORMAT_EXPAND_MENU_ITEM, FORMAT_NESTED_MENU_RANK } from '@atlaskit/editor-common/block-menu';
4
5
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
6
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
6
7
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
7
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
10
+ import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
8
11
  import { createExpandNode, insertExpand, insertExpandWithInputMethod, toggleExpandWithMatch as _toggleExpandWithMatch } from './commands';
9
12
  import { expandKeymap } from './pm-plugins/keymap';
10
13
  import { createPlugin } from './pm-plugins/main';
@@ -17,6 +20,19 @@ export var expandPlugin = function expandPlugin(_ref) {
17
20
  var _ref$config = _ref.config,
18
21
  options = _ref$config === void 0 ? {} : _ref$config,
19
22
  api = _ref.api;
23
+ if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
24
+ var _api$blockMenu;
25
+ api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
26
+ type: 'block-menu-item',
27
+ key: FORMAT_EXPAND_MENU_ITEM.key,
28
+ parent: {
29
+ type: 'block-menu-section',
30
+ key: FORMAT_MENU_ITEM.key,
31
+ rank: FORMAT_NESTED_MENU_RANK[FORMAT_EXPAND_MENU_ITEM.key]
32
+ },
33
+ component: createExpandBlockMenuItem(api)
34
+ }]);
35
+ }
20
36
  return {
21
37
  name: 'expand',
22
38
  nodes: function nodes() {
@@ -0,0 +1,41 @@
1
+ import React, { useMemo } from 'react';
2
+ import { useIntl } from 'react-intl-next';
3
+ import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
4
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
5
+ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
6
+ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
7
+ import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
8
+ var nodeName = 'expand';
9
+ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
10
+ var api = _ref.api;
11
+ var _useIntl = useIntl(),
12
+ formatMessage = _useIntl.formatMessage;
13
+ var selection = useSharedPluginStateSelector(api, 'selection.selection');
14
+ var isExpandSelected = useMemo(function () {
15
+ if (!selection) {
16
+ return false;
17
+ }
18
+ if (selection instanceof NodeSelection) {
19
+ return selection.node.type.name === nodeName;
20
+ }
21
+ return false;
22
+ }, [selection]);
23
+ var handleClick = function handleClick() {
24
+ var _api$blockMenu;
25
+ api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName));
26
+ };
27
+ return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
28
+ onClick: handleClick,
29
+ isSelected: isExpandSelected,
30
+ elemBefore: /*#__PURE__*/React.createElement(ExpandElementIcon, {
31
+ label: ""
32
+ })
33
+ }, formatMessage(toolbarInsertBlockMessages.expand));
34
+ };
35
+ export var createExpandBlockMenuItem = function createExpandBlockMenuItem(api) {
36
+ return function () {
37
+ return /*#__PURE__*/React.createElement(ExpandBlockMenuItem, {
38
+ api: api
39
+ });
40
+ };
41
+ };
@@ -1,6 +1,7 @@
1
1
  import { type INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import type { EditorAppearance, EditorCommand, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
+ import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu';
4
5
  import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
6
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
6
7
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
@@ -46,7 +47,8 @@ export type ExpandPluginDependencies = [
46
47
  OptionalPlugin<SelectionMarkerPlugin>,
47
48
  OptionalPlugin<EditorDisabledPlugin>,
48
49
  OptionalPlugin<FeatureFlagsPlugin>,
49
- OptionalPlugin<EditorViewModePlugin>
50
+ OptionalPlugin<EditorViewModePlugin>,
51
+ OptionalPlugin<BlockMenuPlugin>
50
52
  ];
51
53
  export type ExpandPlugin = NextEditorPlugin<'expand', {
52
54
  actions: {
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { ExpandPlugin } from '../types';
4
+ export declare const createExpandBlockMenuItem: (api: ExtractInjectionAPI<ExpandPlugin>) => () => React.JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { type INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import type { EditorAppearance, EditorCommand, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
+ import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu';
4
5
  import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
6
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
6
7
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
@@ -46,7 +47,8 @@ export type ExpandPluginDependencies = [
46
47
  OptionalPlugin<SelectionMarkerPlugin>,
47
48
  OptionalPlugin<EditorDisabledPlugin>,
48
49
  OptionalPlugin<FeatureFlagsPlugin>,
49
- OptionalPlugin<EditorViewModePlugin>
50
+ OptionalPlugin<EditorViewModePlugin>,
51
+ OptionalPlugin<BlockMenuPlugin>
50
52
  ];
51
53
  export type ExpandPlugin = NextEditorPlugin<'expand', {
52
54
  actions: {
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { ExpandPlugin } from '../types';
4
+ export declare const createExpandBlockMenuItem: (api: ExtractInjectionAPI<ExpandPlugin>) => () => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "4.3.1",
3
+ "version": "5.0.0",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,18 +31,21 @@
31
31
  "dependencies": {
32
32
  "@atlaskit/adf-schema": "^50.2.3",
33
33
  "@atlaskit/button": "^23.4.0",
34
- "@atlaskit/editor-plugin-analytics": "^3.0.0",
35
- "@atlaskit/editor-plugin-decorations": "^3.1.0",
36
- "@atlaskit/editor-plugin-editor-disabled": "^3.0.0",
37
- "@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
38
- "@atlaskit/editor-plugin-selection": "^3.2.0",
39
- "@atlaskit/editor-plugin-selection-marker": "^3.0.0",
34
+ "@atlaskit/editor-plugin-analytics": "^4.0.0",
35
+ "@atlaskit/editor-plugin-block-menu": "^1.0.0",
36
+ "@atlaskit/editor-plugin-decorations": "^4.0.0",
37
+ "@atlaskit/editor-plugin-editor-disabled": "^4.0.0",
38
+ "@atlaskit/editor-plugin-editor-viewmode": "^6.0.0",
39
+ "@atlaskit/editor-plugin-selection": "^4.0.0",
40
+ "@atlaskit/editor-plugin-selection-marker": "^4.0.0",
40
41
  "@atlaskit/editor-prosemirror": "7.0.0",
41
42
  "@atlaskit/editor-shared-styles": "^3.6.0",
42
43
  "@atlaskit/editor-tables": "^2.9.0",
44
+ "@atlaskit/editor-toolbar": "^0.6.0",
43
45
  "@atlaskit/icon": "^28.1.0",
46
+ "@atlaskit/icon-lab": "^5.7.0",
44
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
- "@atlaskit/tmp-editor-statsig": "^11.9.0",
48
+ "@atlaskit/tmp-editor-statsig": "^12.0.0",
46
49
  "@atlaskit/tokens": "^6.1.0",
47
50
  "@atlaskit/tooltip": "^20.4.0",
48
51
  "@babel/runtime": "^7.0.0",
@@ -51,19 +54,19 @@
51
54
  "w3c-keyname": "^2.1.8"
52
55
  },
53
56
  "peerDependencies": {
54
- "@atlaskit/editor-common": "^107.33.0",
57
+ "@atlaskit/editor-common": "^108.0.0",
55
58
  "react": "^18.2.0",
56
59
  "react-dom": "^18.2.0",
57
60
  "react-intl-next": "npm:react-intl@^5.18.1"
58
61
  },
59
62
  "devDependencies": {
60
63
  "@atlaskit/analytics-next": "^11.1.0",
61
- "@atlaskit/editor-plugin-content-insertion": "^3.1.0",
62
- "@atlaskit/editor-plugin-guideline": "^3.0.0",
63
- "@atlaskit/editor-plugin-quick-insert": "^3.0.0",
64
- "@atlaskit/editor-plugin-table": "^12.3.0",
65
- "@atlaskit/editor-plugin-type-ahead": "^3.1.0",
66
- "@atlaskit/editor-plugin-width": "^4.0.0",
64
+ "@atlaskit/editor-plugin-content-insertion": "^4.0.0",
65
+ "@atlaskit/editor-plugin-guideline": "^4.0.0",
66
+ "@atlaskit/editor-plugin-quick-insert": "^4.0.0",
67
+ "@atlaskit/editor-plugin-table": "^13.0.0",
68
+ "@atlaskit/editor-plugin-type-ahead": "^4.0.0",
69
+ "@atlaskit/editor-plugin-width": "^5.0.0",
67
70
  "@testing-library/react": "^13.4.0",
68
71
  "react-test-renderer": "^18.2.0"
69
72
  },