@atlaskit/editor-plugin-text-formatting 1.16.5 → 1.16.7
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/editor-commands/clear-formatting.js +5 -0
- package/dist/cjs/editor-commands/transform-to-code.js +13 -1
- package/dist/cjs/editor-commands/utils/cell-selection.js +4 -1
- package/dist/cjs/pm-plugins/clear-formatting-keymap.js +4 -1
- package/dist/cjs/pm-plugins/clear-formatting.js +2 -0
- package/dist/cjs/pm-plugins/cursor.js +6 -1
- package/dist/cjs/pm-plugins/input-rule.js +13 -1
- package/dist/cjs/pm-plugins/keymap.js +28 -7
- package/dist/cjs/pm-plugins/main.js +7 -0
- package/dist/cjs/pm-plugins/smart-input-rule.js +30 -0
- package/dist/cjs/ui/FloatingToolbarComponent.js +8 -4
- package/dist/cjs/ui/Toolbar/bold-button.js +5 -2
- package/dist/cjs/ui/Toolbar/dropdown-menu.js +4 -6
- package/dist/cjs/ui/Toolbar/index.js +8 -2
- package/dist/es2019/editor-commands/clear-formatting.js +7 -2
- package/dist/es2019/editor-commands/transform-to-code.js +13 -1
- package/dist/es2019/editor-commands/utils/cell-selection.js +4 -1
- package/dist/es2019/editor-commands/utils.js +1 -1
- package/dist/es2019/pm-plugins/clear-formatting-keymap.js +4 -1
- package/dist/es2019/pm-plugins/clear-formatting.js +2 -0
- package/dist/es2019/pm-plugins/cursor.js +6 -1
- package/dist/es2019/pm-plugins/input-rule.js +13 -1
- package/dist/es2019/pm-plugins/keymap.js +29 -8
- package/dist/es2019/pm-plugins/main.js +6 -0
- package/dist/es2019/pm-plugins/smart-input-rule.js +31 -1
- package/dist/es2019/ui/FloatingToolbarComponent.js +8 -2
- package/dist/es2019/ui/Toolbar/bold-button.js +6 -3
- package/dist/es2019/ui/Toolbar/dropdown-menu.js +5 -5
- package/dist/es2019/ui/Toolbar/index.js +8 -2
- package/dist/esm/editor-commands/clear-formatting.js +5 -0
- package/dist/esm/editor-commands/transform-to-code.js +13 -1
- package/dist/esm/editor-commands/utils/cell-selection.js +4 -1
- package/dist/esm/pm-plugins/clear-formatting-keymap.js +4 -1
- package/dist/esm/pm-plugins/clear-formatting.js +2 -0
- package/dist/esm/pm-plugins/cursor.js +6 -1
- package/dist/esm/pm-plugins/input-rule.js +13 -1
- package/dist/esm/pm-plugins/keymap.js +28 -7
- package/dist/esm/pm-plugins/main.js +6 -0
- package/dist/esm/pm-plugins/smart-input-rule.js +30 -0
- package/dist/esm/ui/FloatingToolbarComponent.js +8 -3
- package/dist/esm/ui/Toolbar/bold-button.js +6 -3
- package/dist/esm/ui/Toolbar/dropdown-menu.js +5 -7
- package/dist/esm/ui/Toolbar/index.js +8 -2
- package/dist/types/ui/Toolbar/dropdown-menu.d.ts +3 -1
- package/dist/types-ts4.5/ui/Toolbar/dropdown-menu.d.ts +3 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import React, { useCallback,
|
|
2
|
+
import React, { useCallback, useState } from 'react';
|
|
3
3
|
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
|
|
5
5
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
@@ -27,11 +27,6 @@ export var FormattingTextDropdownMenu = /*#__PURE__*/React.memo(function (_ref)
|
|
|
27
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
28
28
|
isOpenedByKeyboard = _useState2[0],
|
|
29
29
|
setIsOpenedByKeyboard = _useState2[1];
|
|
30
|
-
var group = useMemo(function () {
|
|
31
|
-
return [{
|
|
32
|
-
items: items
|
|
33
|
-
}];
|
|
34
|
-
}, [items]);
|
|
35
30
|
var onItemActivated = useCallback(function (_ref2) {
|
|
36
31
|
var item = _ref2.item,
|
|
37
32
|
_ref2$shouldCloseMenu = _ref2.shouldCloseMenu,
|
|
@@ -50,11 +45,14 @@ export var FormattingTextDropdownMenu = /*#__PURE__*/React.memo(function (_ref)
|
|
|
50
45
|
scrollableElement: popupsScrollableElement,
|
|
51
46
|
onItemActivated: onItemActivated,
|
|
52
47
|
isOpen: isMenuOpen,
|
|
53
|
-
items:
|
|
48
|
+
items: items,
|
|
54
49
|
zIndex: akEditorMenuZIndex,
|
|
55
50
|
fitHeight: 188,
|
|
56
51
|
fitWidth: 136,
|
|
57
52
|
shouldUseDefaultRole: true,
|
|
53
|
+
section: {
|
|
54
|
+
hasSeparator: true
|
|
55
|
+
},
|
|
58
56
|
shouldFocusFirstItem: function shouldFocusFirstItem() {
|
|
59
57
|
if (isOpenedByKeyboard) {
|
|
60
58
|
setIsOpenedByKeyboard(false);
|
|
@@ -111,9 +111,15 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
|
|
|
111
111
|
}
|
|
112
112
|
var items = useMemo(function () {
|
|
113
113
|
if (!clearIcon) {
|
|
114
|
-
return
|
|
114
|
+
return [{
|
|
115
|
+
items: dropdownItems
|
|
116
|
+
}];
|
|
115
117
|
}
|
|
116
|
-
return [
|
|
118
|
+
return [{
|
|
119
|
+
items: dropdownItems
|
|
120
|
+
}, {
|
|
121
|
+
items: [clearIcon]
|
|
122
|
+
}];
|
|
117
123
|
}, [clearIcon, dropdownItems]);
|
|
118
124
|
var moreFormattingButtonLabel = intl.formatMessage(toolbarMessages.moreFormatting);
|
|
119
125
|
var labelTextFormat = intl.formatMessage(toolbarMessages.textFormatting);
|
|
@@ -5,7 +5,9 @@ import { type MenuIconItem, ToolbarType } from './types';
|
|
|
5
5
|
type DropdownMenuProps = {
|
|
6
6
|
editorView: EditorView;
|
|
7
7
|
isReducedSpacing: boolean;
|
|
8
|
-
items:
|
|
8
|
+
items: {
|
|
9
|
+
items: MenuIconItem[];
|
|
10
|
+
}[];
|
|
9
11
|
moreButtonLabel: string;
|
|
10
12
|
hasFormattingActive: boolean;
|
|
11
13
|
popupsBoundariesElement?: HTMLElement;
|
|
@@ -5,7 +5,9 @@ import { type MenuIconItem, ToolbarType } from './types';
|
|
|
5
5
|
type DropdownMenuProps = {
|
|
6
6
|
editorView: EditorView;
|
|
7
7
|
isReducedSpacing: boolean;
|
|
8
|
-
items:
|
|
8
|
+
items: {
|
|
9
|
+
items: MenuIconItem[];
|
|
10
|
+
}[];
|
|
9
11
|
moreButtonLabel: string;
|
|
10
12
|
hasFormattingActive: boolean;
|
|
11
13
|
popupsBoundariesElement?: HTMLElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-formatting",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.7",
|
|
4
4
|
"description": "Text-formatting plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
|
-
"@atlaskit/editor-common": "^
|
|
35
|
+
"@atlaskit/editor-common": "^98.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
37
37
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.1.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/icon": "^23.1.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
43
43
|
"@atlaskit/prosemirror-input-rules": "^3.2.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^2.31.0",
|
|
45
45
|
"@atlaskit/tokens": "^2.5.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"@emotion/react": "^11.7.1",
|