@atlaskit/editor-plugin-block-type 10.3.2 → 10.3.4
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 +14 -0
- package/dist/cjs/ui/HeadingBlockMenuItem.js +21 -32
- package/dist/cjs/ui/ParagraphBlockMenuItem.js +19 -37
- package/dist/cjs/ui/QuoteBlockMenuItem.js +19 -20
- package/dist/es2019/ui/HeadingBlockMenuItem.js +22 -33
- package/dist/es2019/ui/ParagraphBlockMenuItem.js +20 -39
- package/dist/es2019/ui/QuoteBlockMenuItem.js +20 -21
- package/dist/esm/ui/HeadingBlockMenuItem.js +21 -32
- package/dist/esm/ui/ParagraphBlockMenuItem.js +19 -37
- package/dist/esm/ui/QuoteBlockMenuItem.js +19 -20
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
|
2
2
|
|
|
3
|
+
## 10.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b5d004bf834f8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b5d004bf834f8) -
|
|
8
|
+
[ux] Adds block menu action to check if 'Turn into' item should be rendered or not.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 10.3.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 10.3.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -9,8 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
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
12
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
15
13
|
var _textHeadingFive = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-five"));
|
|
16
14
|
var _textHeadingFour = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-four"));
|
|
@@ -18,50 +16,41 @@ var _textHeadingOne = _interopRequireDefault(require("@atlaskit/icon-lab/core/te
|
|
|
18
16
|
var _textHeadingSix = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-six"));
|
|
19
17
|
var _textHeadingThree = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-three"));
|
|
20
18
|
var _textHeadingTwo = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-two"));
|
|
21
|
-
var _consts = require("./consts");
|
|
22
19
|
var headingIcons = [_textHeadingOne.default, _textHeadingTwo.default, _textHeadingThree.default, _textHeadingFour.default, _textHeadingFive.default, _textHeadingSix.default];
|
|
23
20
|
var headingMessages = [_messages.blockTypeMessages.heading1, _messages.blockTypeMessages.heading2, _messages.blockTypeMessages.heading3, _messages.blockTypeMessages.heading4, _messages.blockTypeMessages.heading5, _messages.blockTypeMessages.heading6];
|
|
24
|
-
var HeadingBlockTypes = [_consts.HEADING_1, _consts.HEADING_2, _consts.HEADING_3, _consts.HEADING_4, _consts.HEADING_5, _consts.HEADING_6];
|
|
25
21
|
var HeadingBlockMenuItem = function HeadingBlockMenuItem(_ref) {
|
|
22
|
+
var _api$blockMenu2;
|
|
26
23
|
var level = _ref.level,
|
|
27
24
|
api = _ref.api;
|
|
28
25
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
29
26
|
formatMessage = _useIntl.formatMessage;
|
|
30
27
|
var Icon = headingIcons[level - 1];
|
|
31
28
|
var message = headingMessages[level - 1];
|
|
32
|
-
var currentBlockType = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'blockType.currentBlockType');
|
|
33
|
-
var selection = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'selection.selection');
|
|
34
|
-
var isTextSelection = selection instanceof _state.TextSelection;
|
|
35
|
-
var isHeading = isTextSelection && currentBlockType && HeadingBlockTypes.includes(currentBlockType);
|
|
36
|
-
var currentHeadingLevel = isHeading ? currentBlockType.level : undefined;
|
|
37
|
-
var isSelected = isHeading && currentHeadingLevel === level;
|
|
38
29
|
var handleClick = function handleClick(event) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
targetTypeName: "heading".concat(level),
|
|
52
|
-
targetAttrs: {
|
|
53
|
-
level: level
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
return command ? command({
|
|
57
|
-
tr: tr
|
|
58
|
-
}) : null;
|
|
30
|
+
var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
|
|
31
|
+
var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
|
|
32
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
33
|
+
var _api$blockMenu;
|
|
34
|
+
var tr = _ref2.tr;
|
|
35
|
+
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.heading, {
|
|
36
|
+
inputMethod: inputMethod,
|
|
37
|
+
triggeredFrom: triggeredFrom,
|
|
38
|
+
targetTypeName: "heading".concat(level),
|
|
39
|
+
targetAttrs: {
|
|
40
|
+
level: level
|
|
41
|
+
}
|
|
59
42
|
});
|
|
60
|
-
|
|
43
|
+
return command ? command({
|
|
44
|
+
tr: tr
|
|
45
|
+
}) : null;
|
|
46
|
+
});
|
|
61
47
|
};
|
|
48
|
+
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled('heading');
|
|
49
|
+
if (isTransfromToPanelDisabled) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
62
52
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
63
53
|
onClick: handleClick,
|
|
64
|
-
isSelected: isSelected,
|
|
65
54
|
elemBefore: /*#__PURE__*/_react.default.createElement(Icon, {
|
|
66
55
|
label: ""
|
|
67
56
|
})
|
|
@@ -8,55 +8,37 @@ exports.createParagraphBlockMenuItem = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
|
-
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
12
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
|
-
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
14
12
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
15
13
|
var _textParagraph = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-paragraph"));
|
|
16
|
-
var
|
|
14
|
+
var nodeName = 'paragraph';
|
|
17
15
|
var ParagraphBlockMenuItem = function ParagraphBlockMenuItem(_ref) {
|
|
16
|
+
var _api$blockMenu2;
|
|
18
17
|
var api = _ref.api;
|
|
19
18
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
20
19
|
formatMessage = _useIntl.formatMessage;
|
|
21
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['blockType', 'list', 'selection'], function (states) {
|
|
22
|
-
var _states$blockTypeStat, _states$listState, _states$listState2, _states$selectionStat;
|
|
23
|
-
return {
|
|
24
|
-
currentBlockType: (_states$blockTypeStat = states.blockTypeState) === null || _states$blockTypeStat === void 0 ? void 0 : _states$blockTypeStat.currentBlockType,
|
|
25
|
-
bulletListActive: (_states$listState = states.listState) === null || _states$listState === void 0 ? void 0 : _states$listState.bulletListActive,
|
|
26
|
-
orderedListActive: (_states$listState2 = states.listState) === null || _states$listState2 === void 0 ? void 0 : _states$listState2.orderedListActive,
|
|
27
|
-
selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection
|
|
28
|
-
};
|
|
29
|
-
}),
|
|
30
|
-
currentBlockType = _useSharedPluginState.currentBlockType,
|
|
31
|
-
bulletListActive = _useSharedPluginState.bulletListActive,
|
|
32
|
-
orderedListActive = _useSharedPluginState.orderedListActive,
|
|
33
|
-
selection = _useSharedPluginState.selection;
|
|
34
|
-
var isTextSelection = selection instanceof _state.TextSelection;
|
|
35
|
-
var isParagraph = isTextSelection && currentBlockType && currentBlockType === _consts.NORMAL_TEXT && !bulletListActive && !orderedListActive;
|
|
36
20
|
var handleClick = function handleClick(event) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.paragraph, {
|
|
47
|
-
inputMethod: inputMethod,
|
|
48
|
-
triggeredFrom: triggeredFrom,
|
|
49
|
-
targetTypeName: "paragraph"
|
|
50
|
-
});
|
|
51
|
-
return command ? command({
|
|
52
|
-
tr: tr
|
|
53
|
-
}) : null;
|
|
21
|
+
var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
|
|
22
|
+
var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
|
|
23
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
24
|
+
var _api$blockMenu;
|
|
25
|
+
var tr = _ref2.tr;
|
|
26
|
+
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.paragraph, {
|
|
27
|
+
inputMethod: inputMethod,
|
|
28
|
+
triggeredFrom: triggeredFrom,
|
|
29
|
+
targetTypeName: nodeName
|
|
54
30
|
});
|
|
55
|
-
|
|
31
|
+
return command ? command({
|
|
32
|
+
tr: tr
|
|
33
|
+
}) : null;
|
|
34
|
+
});
|
|
56
35
|
};
|
|
36
|
+
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
|
|
37
|
+
if (isTransfromToPanelDisabled) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
57
40
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
58
41
|
onClick: handleClick,
|
|
59
|
-
isSelected: isParagraph,
|
|
60
42
|
elemBefore: /*#__PURE__*/_react.default.createElement(_textParagraph.default, {
|
|
61
43
|
label: ""
|
|
62
44
|
})
|
|
@@ -9,37 +9,36 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
|
-
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
13
12
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
14
13
|
var _quotationMark = _interopRequireDefault(require("@atlaskit/icon/core/quotation-mark"));
|
|
15
|
-
var
|
|
14
|
+
var nodeName = 'blockquote';
|
|
16
15
|
var QuoteBlockMenuItem = function QuoteBlockMenuItem(_ref) {
|
|
16
|
+
var _api$blockMenu2;
|
|
17
17
|
var api = _ref.api;
|
|
18
18
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
19
19
|
formatMessage = _useIntl.formatMessage;
|
|
20
|
-
var currentBlockType = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'blockType.currentBlockType');
|
|
21
|
-
var isBlockQuote = currentBlockType && currentBlockType === _consts.BLOCK_QUOTE;
|
|
22
20
|
var handleClick = function handleClick(event) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
targetTypeName: "blockquote"
|
|
33
|
-
});
|
|
34
|
-
return command ? command({
|
|
35
|
-
tr: tr
|
|
36
|
-
}) : null;
|
|
21
|
+
var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
|
|
22
|
+
var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
|
|
23
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
24
|
+
var _api$blockMenu;
|
|
25
|
+
var tr = _ref2.tr;
|
|
26
|
+
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.blockquote, {
|
|
27
|
+
inputMethod: inputMethod,
|
|
28
|
+
triggeredFrom: triggeredFrom,
|
|
29
|
+
targetTypeName: nodeName
|
|
37
30
|
});
|
|
38
|
-
|
|
31
|
+
return command ? command({
|
|
32
|
+
tr: tr
|
|
33
|
+
}) : null;
|
|
34
|
+
});
|
|
39
35
|
};
|
|
36
|
+
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
|
|
37
|
+
if (isTransfromToPanelDisabled) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
40
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
41
41
|
onClick: handleClick,
|
|
42
|
-
isSelected: isBlockQuote,
|
|
43
42
|
elemBefore: /*#__PURE__*/_react.default.createElement(_quotationMark.default, {
|
|
44
43
|
label: ""
|
|
45
44
|
})
|
|
@@ -2,8 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
6
|
-
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
8
6
|
import TextHeadingFiveIcon from '@atlaskit/icon-lab/core/text-heading-five';
|
|
9
7
|
import TextHeadingFourIcon from '@atlaskit/icon-lab/core/text-heading-four';
|
|
@@ -11,53 +9,44 @@ import TextHeadingOneIcon from '@atlaskit/icon-lab/core/text-heading-one';
|
|
|
11
9
|
import TextHeadingSixIcon from '@atlaskit/icon-lab/core/text-heading-six';
|
|
12
10
|
import TextHeadingThreeIcon from '@atlaskit/icon-lab/core/text-heading-three';
|
|
13
11
|
import TextHeadingTwoIcon from '@atlaskit/icon-lab/core/text-heading-two';
|
|
14
|
-
import { HEADING_2, HEADING_5, HEADING_1, HEADING_3, HEADING_4, HEADING_6 } from './consts';
|
|
15
12
|
const headingIcons = [TextHeadingOneIcon, TextHeadingTwoIcon, TextHeadingThreeIcon, TextHeadingFourIcon, TextHeadingFiveIcon, TextHeadingSixIcon];
|
|
16
13
|
const headingMessages = [blockTypeMessages.heading1, blockTypeMessages.heading2, blockTypeMessages.heading3, blockTypeMessages.heading4, blockTypeMessages.heading5, blockTypeMessages.heading6];
|
|
17
|
-
const HeadingBlockTypes = [HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6];
|
|
18
14
|
const HeadingBlockMenuItem = ({
|
|
19
15
|
level,
|
|
20
16
|
api
|
|
21
17
|
}) => {
|
|
18
|
+
var _api$blockMenu2;
|
|
22
19
|
const {
|
|
23
20
|
formatMessage
|
|
24
21
|
} = useIntl();
|
|
25
22
|
const Icon = headingIcons[level - 1];
|
|
26
23
|
const message = headingMessages[level - 1];
|
|
27
|
-
const currentBlockType = useSharedPluginStateSelector(api, 'blockType.currentBlockType');
|
|
28
|
-
const selection = useSharedPluginStateSelector(api, 'selection.selection');
|
|
29
|
-
const isTextSelection = selection instanceof TextSelection;
|
|
30
|
-
const isHeading = isTextSelection && currentBlockType && HeadingBlockTypes.includes(currentBlockType);
|
|
31
|
-
const currentHeadingLevel = isHeading ? currentBlockType.level : undefined;
|
|
32
|
-
const isSelected = isHeading && currentHeadingLevel === level;
|
|
33
24
|
const handleClick = event => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
api === null || api === void 0 ? void 0 : api.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
targetTypeName: `heading${level}`,
|
|
48
|
-
targetAttrs: {
|
|
49
|
-
level
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
return command ? command({
|
|
53
|
-
tr
|
|
54
|
-
}) : null;
|
|
25
|
+
const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
|
|
26
|
+
const inputMethod = INPUT_METHOD.BLOCK_MENU;
|
|
27
|
+
api === null || api === void 0 ? void 0 : api.core.actions.execute(({
|
|
28
|
+
tr
|
|
29
|
+
}) => {
|
|
30
|
+
var _api$blockMenu;
|
|
31
|
+
const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.heading, {
|
|
32
|
+
inputMethod,
|
|
33
|
+
triggeredFrom,
|
|
34
|
+
targetTypeName: `heading${level}`,
|
|
35
|
+
targetAttrs: {
|
|
36
|
+
level
|
|
37
|
+
}
|
|
55
38
|
});
|
|
56
|
-
|
|
39
|
+
return command ? command({
|
|
40
|
+
tr
|
|
41
|
+
}) : null;
|
|
42
|
+
});
|
|
57
43
|
};
|
|
44
|
+
const isTransfromToPanelDisabled = api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled('heading');
|
|
45
|
+
if (isTransfromToPanelDisabled) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
58
48
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
59
49
|
onClick: handleClick,
|
|
60
|
-
isSelected: isSelected,
|
|
61
50
|
elemBefore: /*#__PURE__*/React.createElement(Icon, {
|
|
62
51
|
label: ""
|
|
63
52
|
})
|
|
@@ -1,59 +1,40 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
4
|
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
-
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
8
6
|
import TextParagraphIcon from '@atlaskit/icon-lab/core/text-paragraph';
|
|
9
|
-
|
|
7
|
+
const nodeName = 'paragraph';
|
|
10
8
|
const ParagraphBlockMenuItem = ({
|
|
11
9
|
api
|
|
12
10
|
}) => {
|
|
11
|
+
var _api$blockMenu2;
|
|
13
12
|
const {
|
|
14
13
|
formatMessage
|
|
15
14
|
} = useIntl();
|
|
16
|
-
const {
|
|
17
|
-
currentBlockType,
|
|
18
|
-
bulletListActive,
|
|
19
|
-
orderedListActive,
|
|
20
|
-
selection
|
|
21
|
-
} = useSharedPluginStateWithSelector(api, ['blockType', 'list', 'selection'], states => {
|
|
22
|
-
var _states$blockTypeStat, _states$listState, _states$listState2, _states$selectionStat;
|
|
23
|
-
return {
|
|
24
|
-
currentBlockType: (_states$blockTypeStat = states.blockTypeState) === null || _states$blockTypeStat === void 0 ? void 0 : _states$blockTypeStat.currentBlockType,
|
|
25
|
-
bulletListActive: (_states$listState = states.listState) === null || _states$listState === void 0 ? void 0 : _states$listState.bulletListActive,
|
|
26
|
-
orderedListActive: (_states$listState2 = states.listState) === null || _states$listState2 === void 0 ? void 0 : _states$listState2.orderedListActive,
|
|
27
|
-
selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
const isTextSelection = selection instanceof TextSelection;
|
|
31
|
-
const isParagraph = isTextSelection && currentBlockType && currentBlockType === NORMAL_TEXT && !bulletListActive && !orderedListActive;
|
|
32
15
|
const handleClick = event => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
api === null || api === void 0 ? void 0 : api.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.paragraph, {
|
|
44
|
-
inputMethod,
|
|
45
|
-
triggeredFrom,
|
|
46
|
-
targetTypeName: `paragraph`
|
|
47
|
-
});
|
|
48
|
-
return command ? command({
|
|
49
|
-
tr
|
|
50
|
-
}) : null;
|
|
16
|
+
const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
|
|
17
|
+
const inputMethod = INPUT_METHOD.BLOCK_MENU;
|
|
18
|
+
api === null || api === void 0 ? void 0 : api.core.actions.execute(({
|
|
19
|
+
tr
|
|
20
|
+
}) => {
|
|
21
|
+
var _api$blockMenu;
|
|
22
|
+
const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.paragraph, {
|
|
23
|
+
inputMethod,
|
|
24
|
+
triggeredFrom,
|
|
25
|
+
targetTypeName: nodeName
|
|
51
26
|
});
|
|
52
|
-
|
|
27
|
+
return command ? command({
|
|
28
|
+
tr
|
|
29
|
+
}) : null;
|
|
30
|
+
});
|
|
53
31
|
};
|
|
32
|
+
const isTransfromToPanelDisabled = api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
|
|
33
|
+
if (isTransfromToPanelDisabled) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
54
36
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
55
37
|
onClick: handleClick,
|
|
56
|
-
isSelected: isParagraph,
|
|
57
38
|
elemBefore: /*#__PURE__*/React.createElement(TextParagraphIcon, {
|
|
58
39
|
label: ""
|
|
59
40
|
})
|
|
@@ -2,40 +2,39 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
6
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
7
6
|
import QuotationMarkIcon from '@atlaskit/icon/core/quotation-mark';
|
|
8
|
-
|
|
7
|
+
const nodeName = 'blockquote';
|
|
9
8
|
const QuoteBlockMenuItem = ({
|
|
10
9
|
api
|
|
11
10
|
}) => {
|
|
11
|
+
var _api$blockMenu2;
|
|
12
12
|
const {
|
|
13
13
|
formatMessage
|
|
14
14
|
} = useIntl();
|
|
15
|
-
const currentBlockType = useSharedPluginStateSelector(api, 'blockType.currentBlockType');
|
|
16
|
-
const isBlockQuote = currentBlockType && currentBlockType === BLOCK_QUOTE;
|
|
17
15
|
const handleClick = event => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
targetTypeName: `blockquote`
|
|
29
|
-
});
|
|
30
|
-
return command ? command({
|
|
31
|
-
tr
|
|
32
|
-
}) : null;
|
|
16
|
+
const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
|
|
17
|
+
const inputMethod = INPUT_METHOD.BLOCK_MENU;
|
|
18
|
+
api === null || api === void 0 ? void 0 : api.core.actions.execute(({
|
|
19
|
+
tr
|
|
20
|
+
}) => {
|
|
21
|
+
var _api$blockMenu;
|
|
22
|
+
const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.blockquote, {
|
|
23
|
+
inputMethod,
|
|
24
|
+
triggeredFrom,
|
|
25
|
+
targetTypeName: nodeName
|
|
33
26
|
});
|
|
34
|
-
|
|
27
|
+
return command ? command({
|
|
28
|
+
tr
|
|
29
|
+
}) : null;
|
|
30
|
+
});
|
|
35
31
|
};
|
|
32
|
+
const isTransfromToPanelDisabled = api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
|
|
33
|
+
if (isTransfromToPanelDisabled) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
36
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
37
37
|
onClick: handleClick,
|
|
38
|
-
isSelected: isBlockQuote,
|
|
39
38
|
elemBefore: /*#__PURE__*/React.createElement(QuotationMarkIcon, {
|
|
40
39
|
label: ""
|
|
41
40
|
})
|
|
@@ -2,8 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
6
|
-
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
8
6
|
import TextHeadingFiveIcon from '@atlaskit/icon-lab/core/text-heading-five';
|
|
9
7
|
import TextHeadingFourIcon from '@atlaskit/icon-lab/core/text-heading-four';
|
|
@@ -11,50 +9,41 @@ import TextHeadingOneIcon from '@atlaskit/icon-lab/core/text-heading-one';
|
|
|
11
9
|
import TextHeadingSixIcon from '@atlaskit/icon-lab/core/text-heading-six';
|
|
12
10
|
import TextHeadingThreeIcon from '@atlaskit/icon-lab/core/text-heading-three';
|
|
13
11
|
import TextHeadingTwoIcon from '@atlaskit/icon-lab/core/text-heading-two';
|
|
14
|
-
import { HEADING_2, HEADING_5, HEADING_1, HEADING_3, HEADING_4, HEADING_6 } from './consts';
|
|
15
12
|
var headingIcons = [TextHeadingOneIcon, TextHeadingTwoIcon, TextHeadingThreeIcon, TextHeadingFourIcon, TextHeadingFiveIcon, TextHeadingSixIcon];
|
|
16
13
|
var headingMessages = [blockTypeMessages.heading1, blockTypeMessages.heading2, blockTypeMessages.heading3, blockTypeMessages.heading4, blockTypeMessages.heading5, blockTypeMessages.heading6];
|
|
17
|
-
var HeadingBlockTypes = [HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6];
|
|
18
14
|
var HeadingBlockMenuItem = function HeadingBlockMenuItem(_ref) {
|
|
15
|
+
var _api$blockMenu2;
|
|
19
16
|
var level = _ref.level,
|
|
20
17
|
api = _ref.api;
|
|
21
18
|
var _useIntl = useIntl(),
|
|
22
19
|
formatMessage = _useIntl.formatMessage;
|
|
23
20
|
var Icon = headingIcons[level - 1];
|
|
24
21
|
var message = headingMessages[level - 1];
|
|
25
|
-
var currentBlockType = useSharedPluginStateSelector(api, 'blockType.currentBlockType');
|
|
26
|
-
var selection = useSharedPluginStateSelector(api, 'selection.selection');
|
|
27
|
-
var isTextSelection = selection instanceof TextSelection;
|
|
28
|
-
var isHeading = isTextSelection && currentBlockType && HeadingBlockTypes.includes(currentBlockType);
|
|
29
|
-
var currentHeadingLevel = isHeading ? currentBlockType.level : undefined;
|
|
30
|
-
var isSelected = isHeading && currentHeadingLevel === level;
|
|
31
22
|
var handleClick = function handleClick(event) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
targetTypeName: "heading".concat(level),
|
|
45
|
-
targetAttrs: {
|
|
46
|
-
level: level
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
return command ? command({
|
|
50
|
-
tr: tr
|
|
51
|
-
}) : null;
|
|
23
|
+
var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
|
|
24
|
+
var inputMethod = INPUT_METHOD.BLOCK_MENU;
|
|
25
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
26
|
+
var _api$blockMenu;
|
|
27
|
+
var tr = _ref2.tr;
|
|
28
|
+
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.heading, {
|
|
29
|
+
inputMethod: inputMethod,
|
|
30
|
+
triggeredFrom: triggeredFrom,
|
|
31
|
+
targetTypeName: "heading".concat(level),
|
|
32
|
+
targetAttrs: {
|
|
33
|
+
level: level
|
|
34
|
+
}
|
|
52
35
|
});
|
|
53
|
-
|
|
36
|
+
return command ? command({
|
|
37
|
+
tr: tr
|
|
38
|
+
}) : null;
|
|
39
|
+
});
|
|
54
40
|
};
|
|
41
|
+
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled('heading');
|
|
42
|
+
if (isTransfromToPanelDisabled) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
55
45
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
56
46
|
onClick: handleClick,
|
|
57
|
-
isSelected: isSelected,
|
|
58
47
|
elemBefore: /*#__PURE__*/React.createElement(Icon, {
|
|
59
48
|
label: ""
|
|
60
49
|
})
|
|
@@ -1,55 +1,37 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
4
|
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
-
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
8
6
|
import TextParagraphIcon from '@atlaskit/icon-lab/core/text-paragraph';
|
|
9
|
-
|
|
7
|
+
var nodeName = 'paragraph';
|
|
10
8
|
var ParagraphBlockMenuItem = function ParagraphBlockMenuItem(_ref) {
|
|
9
|
+
var _api$blockMenu2;
|
|
11
10
|
var api = _ref.api;
|
|
12
11
|
var _useIntl = useIntl(),
|
|
13
12
|
formatMessage = _useIntl.formatMessage;
|
|
14
|
-
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['blockType', 'list', 'selection'], function (states) {
|
|
15
|
-
var _states$blockTypeStat, _states$listState, _states$listState2, _states$selectionStat;
|
|
16
|
-
return {
|
|
17
|
-
currentBlockType: (_states$blockTypeStat = states.blockTypeState) === null || _states$blockTypeStat === void 0 ? void 0 : _states$blockTypeStat.currentBlockType,
|
|
18
|
-
bulletListActive: (_states$listState = states.listState) === null || _states$listState === void 0 ? void 0 : _states$listState.bulletListActive,
|
|
19
|
-
orderedListActive: (_states$listState2 = states.listState) === null || _states$listState2 === void 0 ? void 0 : _states$listState2.orderedListActive,
|
|
20
|
-
selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection
|
|
21
|
-
};
|
|
22
|
-
}),
|
|
23
|
-
currentBlockType = _useSharedPluginState.currentBlockType,
|
|
24
|
-
bulletListActive = _useSharedPluginState.bulletListActive,
|
|
25
|
-
orderedListActive = _useSharedPluginState.orderedListActive,
|
|
26
|
-
selection = _useSharedPluginState.selection;
|
|
27
|
-
var isTextSelection = selection instanceof TextSelection;
|
|
28
|
-
var isParagraph = isTextSelection && currentBlockType && currentBlockType === NORMAL_TEXT && !bulletListActive && !orderedListActive;
|
|
29
13
|
var handleClick = function handleClick(event) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.paragraph, {
|
|
40
|
-
inputMethod: inputMethod,
|
|
41
|
-
triggeredFrom: triggeredFrom,
|
|
42
|
-
targetTypeName: "paragraph"
|
|
43
|
-
});
|
|
44
|
-
return command ? command({
|
|
45
|
-
tr: tr
|
|
46
|
-
}) : null;
|
|
14
|
+
var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
|
|
15
|
+
var inputMethod = INPUT_METHOD.BLOCK_MENU;
|
|
16
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
17
|
+
var _api$blockMenu;
|
|
18
|
+
var tr = _ref2.tr;
|
|
19
|
+
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.paragraph, {
|
|
20
|
+
inputMethod: inputMethod,
|
|
21
|
+
triggeredFrom: triggeredFrom,
|
|
22
|
+
targetTypeName: nodeName
|
|
47
23
|
});
|
|
48
|
-
|
|
24
|
+
return command ? command({
|
|
25
|
+
tr: tr
|
|
26
|
+
}) : null;
|
|
27
|
+
});
|
|
49
28
|
};
|
|
29
|
+
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
|
|
30
|
+
if (isTransfromToPanelDisabled) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
50
33
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
51
34
|
onClick: handleClick,
|
|
52
|
-
isSelected: isParagraph,
|
|
53
35
|
elemBefore: /*#__PURE__*/React.createElement(TextParagraphIcon, {
|
|
54
36
|
label: ""
|
|
55
37
|
})
|
|
@@ -2,37 +2,36 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
6
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
7
6
|
import QuotationMarkIcon from '@atlaskit/icon/core/quotation-mark';
|
|
8
|
-
|
|
7
|
+
var nodeName = 'blockquote';
|
|
9
8
|
var QuoteBlockMenuItem = function QuoteBlockMenuItem(_ref) {
|
|
9
|
+
var _api$blockMenu2;
|
|
10
10
|
var api = _ref.api;
|
|
11
11
|
var _useIntl = useIntl(),
|
|
12
12
|
formatMessage = _useIntl.formatMessage;
|
|
13
|
-
var currentBlockType = useSharedPluginStateSelector(api, 'blockType.currentBlockType');
|
|
14
|
-
var isBlockQuote = currentBlockType && currentBlockType === BLOCK_QUOTE;
|
|
15
13
|
var handleClick = function handleClick(event) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
targetTypeName: "blockquote"
|
|
26
|
-
});
|
|
27
|
-
return command ? command({
|
|
28
|
-
tr: tr
|
|
29
|
-
}) : null;
|
|
14
|
+
var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
|
|
15
|
+
var inputMethod = INPUT_METHOD.BLOCK_MENU;
|
|
16
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
17
|
+
var _api$blockMenu;
|
|
18
|
+
var tr = _ref2.tr;
|
|
19
|
+
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.blockquote, {
|
|
20
|
+
inputMethod: inputMethod,
|
|
21
|
+
triggeredFrom: triggeredFrom,
|
|
22
|
+
targetTypeName: nodeName
|
|
30
23
|
});
|
|
31
|
-
|
|
24
|
+
return command ? command({
|
|
25
|
+
tr: tr
|
|
26
|
+
}) : null;
|
|
27
|
+
});
|
|
32
28
|
};
|
|
29
|
+
var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
|
|
30
|
+
if (isTransfromToPanelDisabled) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
33
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
34
34
|
onClick: handleClick,
|
|
35
|
-
isSelected: isBlockQuote,
|
|
36
35
|
elemBefore: /*#__PURE__*/React.createElement(QuotationMarkIcon, {
|
|
37
36
|
label: ""
|
|
38
37
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.4",
|
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/adf-schema": "^51.5.0",
|
|
33
|
-
"@atlaskit/css": "^0.
|
|
33
|
+
"@atlaskit/css": "^0.19.0",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
35
35
|
"@atlaskit/editor-plugin-block-menu": "^5.2.0",
|
|
36
36
|
"@atlaskit/editor-plugin-list": "^8.2.0",
|
|
37
37
|
"@atlaskit/editor-plugin-primary-toolbar": "^7.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-selection": "^6.1.0",
|
|
39
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^7.
|
|
40
|
-
"@atlaskit/editor-plugin-toolbar": "^3.
|
|
39
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^7.2.0",
|
|
40
|
+
"@atlaskit/editor-plugin-toolbar": "^3.5.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"@atlaskit/icon-lab": "^5.13.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
50
|
-
"@atlaskit/primitives": "^
|
|
50
|
+
"@atlaskit/primitives": "^17.0.0",
|
|
51
51
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
52
52
|
"@atlaskit/prosemirror-input-rules": "^3.6.0",
|
|
53
53
|
"@atlaskit/theme": "^21.0.0",
|
|
54
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
55
|
-
"@atlaskit/tokens": "^
|
|
54
|
+
"@atlaskit/tmp-editor-statsig": "^16.1.0",
|
|
55
|
+
"@atlaskit/tokens": "^9.0.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
57
57
|
"@emotion/react": "^11.7.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@atlaskit/editor-common": "^110.
|
|
60
|
+
"@atlaskit/editor-common": "^110.48.0",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
62
|
"react-dom": "^18.2.0",
|
|
63
63
|
"react-intl-next": "npm:react-intl@^5.18.1"
|