@atlaskit/editor-plugin-text-formatting 3.0.14 → 3.0.15
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 +17 -0
- package/dist/cjs/ui/Toolbar/components/Component.js +16 -22
- package/dist/cjs/ui/toolbar-components.js +12 -9
- package/dist/es2019/ui/Toolbar/components/Component.js +17 -22
- package/dist/es2019/ui/toolbar-components.js +12 -8
- package/dist/esm/ui/Toolbar/components/Component.js +17 -23
- package/dist/esm/ui/toolbar-components.js +13 -10
- package/dist/types/ui/Toolbar/components/Component.d.ts +2 -4
- package/dist/types/ui/Toolbar/components/utils.d.ts +1 -2
- package/dist/types-ts4.5/ui/Toolbar/components/Component.d.ts +2 -4
- package/dist/types-ts4.5/ui/Toolbar/components/utils.d.ts +1 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-formatting
|
|
2
2
|
|
|
3
|
+
## 3.0.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3145f278b1f7a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3145f278b1f7a) -
|
|
8
|
+
[ux] [ED-28473] minor UI updates for editor-toolbar
|
|
9
|
+
|
|
10
|
+
- Use ADS ButtonGroup for ToolbarButtonGroup
|
|
11
|
+
- Remove groupLocation prop and use CSS instead
|
|
12
|
+
- Use DropdownItemGroup for ToolbarDropdownItemSection and expand props for section separator and
|
|
13
|
+
title
|
|
14
|
+
- Support ReactNode as content for ToolbarTooltip and add missing shortcuts in tooltips
|
|
15
|
+
- Center Icons for split buttons and make chevron icon 24px wide
|
|
16
|
+
- Align dropdown menu UI with current editor design
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 3.0.14
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -62,9 +62,7 @@ var FormatButton = exports.FormatButton = function FormatButton(_ref2) {
|
|
|
62
62
|
toggleMarkWithAnalyticsCallback = _ref2.toggleMarkWithAnalyticsCallback,
|
|
63
63
|
icon = _ref2.icon,
|
|
64
64
|
shortcut = _ref2.shortcut,
|
|
65
|
-
title = _ref2.title
|
|
66
|
-
_ref2$groupLocation = _ref2.groupLocation,
|
|
67
|
-
groupLocation = _ref2$groupLocation === void 0 ? 'start' : _ref2$groupLocation;
|
|
65
|
+
title = _ref2.title;
|
|
68
66
|
var _useComponentInfo2 = (0, _utils.useComponentInfo)({
|
|
69
67
|
api: api,
|
|
70
68
|
optionType: optionType,
|
|
@@ -79,22 +77,20 @@ var FormatButton = exports.FormatButton = function FormatButton(_ref2) {
|
|
|
79
77
|
ariaLabel = _useComponentInfo2.ariaLabel,
|
|
80
78
|
formatTitle = _useComponentInfo2.formatTitle;
|
|
81
79
|
var Icon = icon;
|
|
82
|
-
return (
|
|
83
|
-
/*#__PURE__*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}))
|
|
97
|
-
);
|
|
80
|
+
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
|
|
81
|
+
content: /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
|
|
82
|
+
description: formatTitle,
|
|
83
|
+
keymap: shortcut
|
|
84
|
+
})
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButton, {
|
|
86
|
+
iconBefore: /*#__PURE__*/_react.default.createElement(Icon, {
|
|
87
|
+
label: ariaLabel
|
|
88
|
+
}),
|
|
89
|
+
onClick: onClick,
|
|
90
|
+
isSelected: isActive,
|
|
91
|
+
isDisabled: isDisabled,
|
|
92
|
+
ariaKeyshortcuts: (0, _keymaps.getAriaKeyshortcuts)(shortcut)
|
|
93
|
+
}));
|
|
98
94
|
};
|
|
99
95
|
var ClearFormatMenuItem = exports.ClearFormatMenuItem = function ClearFormatMenuItem(_ref3) {
|
|
100
96
|
var api = _ref3.api,
|
|
@@ -132,8 +128,7 @@ var ClearFormatMenuItem = exports.ClearFormatMenuItem = function ClearFormatMenu
|
|
|
132
128
|
}, formatTitle);
|
|
133
129
|
};
|
|
134
130
|
var MoreFormattingMenu = exports.MoreFormattingMenu = function MoreFormattingMenu(_ref4) {
|
|
135
|
-
var children = _ref4.children
|
|
136
|
-
groupLocation = _ref4.groupLocation;
|
|
131
|
+
var children = _ref4.children;
|
|
137
132
|
var _useIntl2 = (0, _reactIntlNext.useIntl)(),
|
|
138
133
|
formatMessage = _useIntl2.formatMessage;
|
|
139
134
|
var content = formatMessage(_messages.toolbarMessages.moreFormatting);
|
|
@@ -142,7 +137,6 @@ var MoreFormattingMenu = exports.MoreFormattingMenu = function MoreFormattingMen
|
|
|
142
137
|
label: "",
|
|
143
138
|
testId: "more-formatting"
|
|
144
139
|
}),
|
|
145
|
-
groupLocation: groupLocation,
|
|
146
140
|
label: content
|
|
147
141
|
}, children);
|
|
148
142
|
};
|
|
@@ -90,11 +90,8 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
90
90
|
rank: _toolbar.TEXT_FORMAT_GROUP_RANK[_toolbar.TEXT_FORMATTING_MENU.key]
|
|
91
91
|
}],
|
|
92
92
|
component: function component(_ref5) {
|
|
93
|
-
var children = _ref5.children
|
|
94
|
-
|
|
95
|
-
return /*#__PURE__*/_react.default.createElement(_Component.MoreFormattingMenu, {
|
|
96
|
-
groupLocation: groupLocation
|
|
97
|
-
}, children);
|
|
93
|
+
var children = _ref5.children;
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement(_Component.MoreFormattingMenu, null, children);
|
|
98
95
|
}
|
|
99
96
|
}, {
|
|
100
97
|
type: _toolbar.TEXT_FORMATTING_MENU_SECTION.type,
|
|
@@ -111,7 +108,13 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
111
108
|
type: _toolbar.TEXT_FORMATTING_MENU.type,
|
|
112
109
|
key: _toolbar.TEXT_FORMATTING_MENU.key,
|
|
113
110
|
rank: _toolbar.TEXT_FORMAT_MENU_RANK[_toolbar.CLEAR_FORMARTTING_MENU_SECTION.key]
|
|
114
|
-
}]
|
|
111
|
+
}],
|
|
112
|
+
component: function component(_ref6) {
|
|
113
|
+
var children = _ref6.children;
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItemSection, {
|
|
115
|
+
hasSeparator: true
|
|
116
|
+
}, children);
|
|
117
|
+
}
|
|
115
118
|
}, {
|
|
116
119
|
type: _toolbar.CLEAR_FORMATTING_MENU_ITEM.type,
|
|
117
120
|
key: _toolbar.CLEAR_FORMATTING_MENU_ITEM.key,
|
|
@@ -120,9 +123,9 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
120
123
|
key: _toolbar.CLEAR_FORMARTTING_MENU_SECTION.key,
|
|
121
124
|
rank: _toolbar.CLEAR_FORMARTTING_MENU_SECTION_RANK[_toolbar.CLEAR_FORMATTING_MENU_ITEM.key]
|
|
122
125
|
}],
|
|
123
|
-
component: function component(
|
|
124
|
-
var parents =
|
|
125
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(
|
|
126
|
+
component: function component(_ref7) {
|
|
127
|
+
var parents = _ref7.parents;
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Component.ClearFormatMenuItem, {
|
|
126
129
|
parents: parents,
|
|
127
130
|
api: api
|
|
128
131
|
}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import { clearFormatting, getAriaKeyshortcuts, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
4
|
+
import { ToolTipContent, clearFormatting, getAriaKeyshortcuts, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
5
5
|
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
7
7
|
import { ToolbarButton, ToolbarDropdownItem, ClearFormattingIcon, ToolbarKeyboardShortcutHint, ToolbarDropdownMenu, MoreItemsIcon, ToolbarTooltip } from '@atlaskit/editor-toolbar';
|
|
@@ -57,8 +57,7 @@ export const FormatButton = ({
|
|
|
57
57
|
toggleMarkWithAnalyticsCallback,
|
|
58
58
|
icon,
|
|
59
59
|
shortcut,
|
|
60
|
-
title
|
|
61
|
-
groupLocation = 'start'
|
|
60
|
+
title
|
|
62
61
|
}) => {
|
|
63
62
|
const {
|
|
64
63
|
isActive,
|
|
@@ -75,22 +74,20 @@ export const FormatButton = ({
|
|
|
75
74
|
parents
|
|
76
75
|
});
|
|
77
76
|
const Icon = icon;
|
|
78
|
-
return (
|
|
79
|
-
/*#__PURE__*/
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}))
|
|
93
|
-
);
|
|
77
|
+
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
78
|
+
content: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
79
|
+
description: formatTitle,
|
|
80
|
+
keymap: shortcut
|
|
81
|
+
})
|
|
82
|
+
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
83
|
+
iconBefore: /*#__PURE__*/React.createElement(Icon, {
|
|
84
|
+
label: ariaLabel
|
|
85
|
+
}),
|
|
86
|
+
onClick: onClick,
|
|
87
|
+
isSelected: isActive,
|
|
88
|
+
isDisabled: isDisabled,
|
|
89
|
+
ariaKeyshortcuts: getAriaKeyshortcuts(shortcut)
|
|
90
|
+
}));
|
|
94
91
|
};
|
|
95
92
|
export const ClearFormatMenuItem = ({
|
|
96
93
|
api,
|
|
@@ -131,8 +128,7 @@ export const ClearFormatMenuItem = ({
|
|
|
131
128
|
}, formatTitle);
|
|
132
129
|
};
|
|
133
130
|
export const MoreFormattingMenu = ({
|
|
134
|
-
children
|
|
135
|
-
groupLocation
|
|
131
|
+
children
|
|
136
132
|
}) => {
|
|
137
133
|
const {
|
|
138
134
|
formatMessage
|
|
@@ -143,7 +139,6 @@ export const MoreFormattingMenu = ({
|
|
|
143
139
|
label: "",
|
|
144
140
|
testId: "more-formatting"
|
|
145
141
|
}),
|
|
146
|
-
groupLocation: groupLocation,
|
|
147
142
|
label: content
|
|
148
143
|
}, children);
|
|
149
144
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CLEAR_FORMARTTING_MENU_SECTION, CLEAR_FORMATTING_MENU_ITEM, TEXT_FORMATTING_GROUP, TEXT_FORMATTING_HERO_BUTTON, TEXT_FORMATTING_MENU, TEXT_FORMATTING_MENU_SECTION, TEXT_SECTION, TEXT_SECTION_RANK, TEXT_FORMAT_GROUP_RANK, TEXT_FORMAT_MENU_RANK, CLEAR_FORMARTTING_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
|
|
3
|
-
import {
|
|
3
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
4
4
|
import { FormatMenuItem, FormatButton, ClearFormatMenuItem, MoreFormattingMenu } from './Toolbar/components/Component';
|
|
5
5
|
import { formatOptions } from './Toolbar/components/utils';
|
|
6
6
|
import { FormatOptions } from './Toolbar/types';
|
|
@@ -81,12 +81,9 @@ export const getToolbarComponents = api => [{
|
|
|
81
81
|
rank: TEXT_FORMAT_GROUP_RANK[TEXT_FORMATTING_MENU.key]
|
|
82
82
|
}],
|
|
83
83
|
component: ({
|
|
84
|
-
children
|
|
85
|
-
groupLocation
|
|
84
|
+
children
|
|
86
85
|
}) => {
|
|
87
|
-
return /*#__PURE__*/React.createElement(MoreFormattingMenu,
|
|
88
|
-
groupLocation: groupLocation
|
|
89
|
-
}, children);
|
|
86
|
+
return /*#__PURE__*/React.createElement(MoreFormattingMenu, null, children);
|
|
90
87
|
}
|
|
91
88
|
}, {
|
|
92
89
|
type: TEXT_FORMATTING_MENU_SECTION.type,
|
|
@@ -103,7 +100,14 @@ export const getToolbarComponents = api => [{
|
|
|
103
100
|
type: TEXT_FORMATTING_MENU.type,
|
|
104
101
|
key: TEXT_FORMATTING_MENU.key,
|
|
105
102
|
rank: TEXT_FORMAT_MENU_RANK[CLEAR_FORMARTTING_MENU_SECTION.key]
|
|
106
|
-
}]
|
|
103
|
+
}],
|
|
104
|
+
component: ({
|
|
105
|
+
children
|
|
106
|
+
}) => {
|
|
107
|
+
return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
|
|
108
|
+
hasSeparator: true
|
|
109
|
+
}, children);
|
|
110
|
+
}
|
|
107
111
|
}, {
|
|
108
112
|
type: CLEAR_FORMATTING_MENU_ITEM.type,
|
|
109
113
|
key: CLEAR_FORMATTING_MENU_ITEM.key,
|
|
@@ -115,7 +119,7 @@ export const getToolbarComponents = api => [{
|
|
|
115
119
|
component: ({
|
|
116
120
|
parents
|
|
117
121
|
}) => {
|
|
118
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
122
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ClearFormatMenuItem, {
|
|
119
123
|
parents: parents,
|
|
120
124
|
api: api
|
|
121
125
|
}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import { clearFormatting, getAriaKeyshortcuts, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
4
|
+
import { ToolTipContent, clearFormatting, getAriaKeyshortcuts, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
5
5
|
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
7
7
|
import { ToolbarButton, ToolbarDropdownItem, ClearFormattingIcon, ToolbarKeyboardShortcutHint, ToolbarDropdownMenu, MoreItemsIcon, ToolbarTooltip } from '@atlaskit/editor-toolbar';
|
|
@@ -55,9 +55,7 @@ export var FormatButton = function FormatButton(_ref2) {
|
|
|
55
55
|
toggleMarkWithAnalyticsCallback = _ref2.toggleMarkWithAnalyticsCallback,
|
|
56
56
|
icon = _ref2.icon,
|
|
57
57
|
shortcut = _ref2.shortcut,
|
|
58
|
-
title = _ref2.title
|
|
59
|
-
_ref2$groupLocation = _ref2.groupLocation,
|
|
60
|
-
groupLocation = _ref2$groupLocation === void 0 ? 'start' : _ref2$groupLocation;
|
|
58
|
+
title = _ref2.title;
|
|
61
59
|
var _useComponentInfo2 = useComponentInfo({
|
|
62
60
|
api: api,
|
|
63
61
|
optionType: optionType,
|
|
@@ -72,22 +70,20 @@ export var FormatButton = function FormatButton(_ref2) {
|
|
|
72
70
|
ariaLabel = _useComponentInfo2.ariaLabel,
|
|
73
71
|
formatTitle = _useComponentInfo2.formatTitle;
|
|
74
72
|
var Icon = icon;
|
|
75
|
-
return (
|
|
76
|
-
/*#__PURE__*/
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}))
|
|
90
|
-
);
|
|
73
|
+
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
74
|
+
content: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
75
|
+
description: formatTitle,
|
|
76
|
+
keymap: shortcut
|
|
77
|
+
})
|
|
78
|
+
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
79
|
+
iconBefore: /*#__PURE__*/React.createElement(Icon, {
|
|
80
|
+
label: ariaLabel
|
|
81
|
+
}),
|
|
82
|
+
onClick: onClick,
|
|
83
|
+
isSelected: isActive,
|
|
84
|
+
isDisabled: isDisabled,
|
|
85
|
+
ariaKeyshortcuts: getAriaKeyshortcuts(shortcut)
|
|
86
|
+
}));
|
|
91
87
|
};
|
|
92
88
|
export var ClearFormatMenuItem = function ClearFormatMenuItem(_ref3) {
|
|
93
89
|
var api = _ref3.api,
|
|
@@ -125,8 +121,7 @@ export var ClearFormatMenuItem = function ClearFormatMenuItem(_ref3) {
|
|
|
125
121
|
}, formatTitle);
|
|
126
122
|
};
|
|
127
123
|
export var MoreFormattingMenu = function MoreFormattingMenu(_ref4) {
|
|
128
|
-
var children = _ref4.children
|
|
129
|
-
groupLocation = _ref4.groupLocation;
|
|
124
|
+
var children = _ref4.children;
|
|
130
125
|
var _useIntl2 = useIntl(),
|
|
131
126
|
formatMessage = _useIntl2.formatMessage;
|
|
132
127
|
var content = formatMessage(toolbarMessages.moreFormatting);
|
|
@@ -135,7 +130,6 @@ export var MoreFormattingMenu = function MoreFormattingMenu(_ref4) {
|
|
|
135
130
|
label: "",
|
|
136
131
|
testId: "more-formatting"
|
|
137
132
|
}),
|
|
138
|
-
groupLocation: groupLocation,
|
|
139
133
|
label: content
|
|
140
134
|
}, children);
|
|
141
135
|
};
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { CLEAR_FORMARTTING_MENU_SECTION, CLEAR_FORMATTING_MENU_ITEM, TEXT_FORMATTING_GROUP, TEXT_FORMATTING_HERO_BUTTON, TEXT_FORMATTING_MENU, TEXT_FORMATTING_MENU_SECTION, TEXT_SECTION, TEXT_SECTION_RANK, TEXT_FORMAT_GROUP_RANK, TEXT_FORMAT_MENU_RANK, CLEAR_FORMARTTING_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
|
|
5
|
-
import {
|
|
5
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
6
6
|
import { FormatMenuItem, FormatButton, ClearFormatMenuItem, MoreFormattingMenu } from './Toolbar/components/Component';
|
|
7
7
|
import { formatOptions } from './Toolbar/components/utils';
|
|
8
8
|
import { FormatOptions } from './Toolbar/types';
|
|
@@ -83,11 +83,8 @@ export var getToolbarComponents = function getToolbarComponents(api) {
|
|
|
83
83
|
rank: TEXT_FORMAT_GROUP_RANK[TEXT_FORMATTING_MENU.key]
|
|
84
84
|
}],
|
|
85
85
|
component: function component(_ref5) {
|
|
86
|
-
var children = _ref5.children
|
|
87
|
-
|
|
88
|
-
return /*#__PURE__*/React.createElement(MoreFormattingMenu, {
|
|
89
|
-
groupLocation: groupLocation
|
|
90
|
-
}, children);
|
|
86
|
+
var children = _ref5.children;
|
|
87
|
+
return /*#__PURE__*/React.createElement(MoreFormattingMenu, null, children);
|
|
91
88
|
}
|
|
92
89
|
}, {
|
|
93
90
|
type: TEXT_FORMATTING_MENU_SECTION.type,
|
|
@@ -104,7 +101,13 @@ export var getToolbarComponents = function getToolbarComponents(api) {
|
|
|
104
101
|
type: TEXT_FORMATTING_MENU.type,
|
|
105
102
|
key: TEXT_FORMATTING_MENU.key,
|
|
106
103
|
rank: TEXT_FORMAT_MENU_RANK[CLEAR_FORMARTTING_MENU_SECTION.key]
|
|
107
|
-
}]
|
|
104
|
+
}],
|
|
105
|
+
component: function component(_ref6) {
|
|
106
|
+
var children = _ref6.children;
|
|
107
|
+
return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
|
|
108
|
+
hasSeparator: true
|
|
109
|
+
}, children);
|
|
110
|
+
}
|
|
108
111
|
}, {
|
|
109
112
|
type: CLEAR_FORMATTING_MENU_ITEM.type,
|
|
110
113
|
key: CLEAR_FORMATTING_MENU_ITEM.key,
|
|
@@ -113,9 +116,9 @@ export var getToolbarComponents = function getToolbarComponents(api) {
|
|
|
113
116
|
key: CLEAR_FORMARTTING_MENU_SECTION.key,
|
|
114
117
|
rank: CLEAR_FORMARTTING_MENU_SECTION_RANK[CLEAR_FORMATTING_MENU_ITEM.key]
|
|
115
118
|
}],
|
|
116
|
-
component: function component(
|
|
117
|
-
var parents =
|
|
118
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
119
|
+
component: function component(_ref7) {
|
|
120
|
+
var parents = _ref7.parents;
|
|
121
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ClearFormatMenuItem, {
|
|
119
122
|
parents: parents,
|
|
120
123
|
api: api
|
|
121
124
|
}));
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { type ToolbarButtonGroupLocation } from '@atlaskit/editor-toolbar';
|
|
4
3
|
import type { FormatComponentProps } from './utils';
|
|
5
4
|
export declare const FormatMenuItem: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, }: FormatComponentProps) => React.JSX.Element | null;
|
|
6
|
-
export declare const FormatButton: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title,
|
|
5
|
+
export declare const FormatButton: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, }: FormatComponentProps) => React.JSX.Element;
|
|
7
6
|
export declare const ClearFormatMenuItem: ({ api, parents, }: Pick<FormatComponentProps, "api" | "parents">) => React.JSX.Element | null;
|
|
8
|
-
export declare const MoreFormattingMenu: ({ children
|
|
7
|
+
export declare const MoreFormattingMenu: ({ children }: {
|
|
9
8
|
children?: ReactNode;
|
|
10
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
11
9
|
}) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
import type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
-
import { type IconComponent
|
|
4
|
+
import { type IconComponent } from '@atlaskit/editor-toolbar';
|
|
5
5
|
import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
|
|
6
6
|
import type { ToggleMarkWithAnalyticsEditorCommand, ClearFormattingWithAnalyticsEditorCommand } from '../../../editor-commands/types';
|
|
7
7
|
import { type TextFormattingPlugin } from '../../../textFormattingPluginType';
|
|
@@ -15,7 +15,6 @@ export type FormatComponentProps = {
|
|
|
15
15
|
optionType: FormatOptions;
|
|
16
16
|
toggleMarkWithAnalyticsCallback: ToggleMarkWithAnalyticsEditorCommand | ClearFormattingWithAnalyticsEditorCommand;
|
|
17
17
|
ariaLabel?: string;
|
|
18
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
19
18
|
};
|
|
20
19
|
export declare const useComponentInfo: ({ api, optionType, title, shortcut, toggleMarkWithAnalyticsCallback, parents, }: Omit<FormatComponentProps, "icon" | "ariaLabel" | "groupLocation">) => {
|
|
21
20
|
formatTitle: string;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { type ToolbarButtonGroupLocation } from '@atlaskit/editor-toolbar';
|
|
4
3
|
import type { FormatComponentProps } from './utils';
|
|
5
4
|
export declare const FormatMenuItem: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, }: FormatComponentProps) => React.JSX.Element | null;
|
|
6
|
-
export declare const FormatButton: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title,
|
|
5
|
+
export declare const FormatButton: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, }: FormatComponentProps) => React.JSX.Element;
|
|
7
6
|
export declare const ClearFormatMenuItem: ({ api, parents, }: Pick<FormatComponentProps, "api" | "parents">) => React.JSX.Element | null;
|
|
8
|
-
export declare const MoreFormattingMenu: ({ children
|
|
7
|
+
export declare const MoreFormattingMenu: ({ children }: {
|
|
9
8
|
children?: ReactNode;
|
|
10
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
11
9
|
}) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
import type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
-
import { type IconComponent
|
|
4
|
+
import { type IconComponent } from '@atlaskit/editor-toolbar';
|
|
5
5
|
import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
|
|
6
6
|
import type { ToggleMarkWithAnalyticsEditorCommand, ClearFormattingWithAnalyticsEditorCommand } from '../../../editor-commands/types';
|
|
7
7
|
import { type TextFormattingPlugin } from '../../../textFormattingPluginType';
|
|
@@ -15,7 +15,6 @@ export type FormatComponentProps = {
|
|
|
15
15
|
optionType: FormatOptions;
|
|
16
16
|
toggleMarkWithAnalyticsCallback: ToggleMarkWithAnalyticsEditorCommand | ClearFormattingWithAnalyticsEditorCommand;
|
|
17
17
|
ariaLabel?: string;
|
|
18
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
19
18
|
};
|
|
20
19
|
export declare const useComponentInfo: ({ api, optionType, title, shortcut, toggleMarkWithAnalyticsCallback, parents, }: Omit<FormatComponentProps, "icon" | "ariaLabel" | "groupLocation">) => {
|
|
21
20
|
formatTitle: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-formatting",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.15",
|
|
4
4
|
"description": "Text-formatting plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"@atlaskit/icon": "^27.12.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
48
|
"@atlaskit/prosemirror-input-rules": "^3.4.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^9.29.0",
|
|
50
50
|
"@atlaskit/tokens": "^6.0.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@emotion/react": "^11.7.1",
|
|
53
53
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^107.
|
|
56
|
+
"@atlaskit/editor-common": "^107.24.0",
|
|
57
57
|
"react": "^18.2.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|