@atlaskit/editor-plugin-text-formatting 2.2.18 → 2.2.19
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 +9 -0
- package/dist/cjs/ui/FloatingToolbarComponent.js +1 -1
- package/dist/cjs/ui/Toolbar/constants.js +33 -18
- package/dist/cjs/ui/Toolbar/hooks/responsive-toolbar-buttons.js +35 -5
- package/dist/es2019/ui/FloatingToolbarComponent.js +2 -2
- package/dist/es2019/ui/Toolbar/constants.js +69 -40
- package/dist/es2019/ui/Toolbar/hooks/responsive-toolbar-buttons.js +36 -6
- package/dist/esm/ui/FloatingToolbarComponent.js +2 -2
- package/dist/esm/ui/Toolbar/constants.js +32 -17
- package/dist/esm/ui/Toolbar/hooks/responsive-toolbar-buttons.js +36 -6
- package/dist/types/ui/Toolbar/constants.d.ts +28 -15
- package/dist/types/ui/Toolbar/hooks/responsive-toolbar-buttons.d.ts +3 -3
- package/dist/types-ts4.5/ui/Toolbar/constants.d.ts +28 -15
- package/dist/types-ts4.5/ui/Toolbar/hooks/responsive-toolbar-buttons.d.ts +3 -3
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-formatting
|
|
2
2
|
|
|
3
|
+
## 2.2.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#169224](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/169224)
|
|
8
|
+
[`95aee735823c6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/95aee735823c6) -
|
|
9
|
+
[ux] ED-27798: Show T icon for block type plugin toolbar, and show only bold as single button,
|
|
10
|
+
italic as dropdown in text formatting toolbar
|
|
11
|
+
|
|
3
12
|
## 2.2.18
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -154,7 +154,7 @@ var FloatingToolbarTextFormat = function FloatingToolbarTextFormat(_ref) {
|
|
|
154
154
|
});
|
|
155
155
|
var _useIconList = (0, _useIconList2.useIconList)({
|
|
156
156
|
icons: defaultIcons,
|
|
157
|
-
iconTypeList: _constants.
|
|
157
|
+
iconTypeList: _constants.ToolbarButtonsStrong,
|
|
158
158
|
shouldUnselect: hasMultiplePartsWithFormattingSelected
|
|
159
159
|
}),
|
|
160
160
|
dropdownItems = _useIconList.dropdownItems,
|
|
@@ -4,28 +4,43 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.ToolbarButtonsStrongItalicUnderline = exports.ToolbarButtonsStrongItalic = exports.ToolbarButtonsStrong = exports.ResponsiveCustomMenuSpacious = exports.ResponsiveCustomMenuMinimal = exports.ResponsiveCustomMenuCompact = exports.ResponsiveCustomButtonToolbarSpacious = exports.ResponsiveCustomButtonToolbarMinimal = exports.ResponsiveCustomButtonToolbarCompact = exports.ButtonsMenuSpacious = exports.ButtonsMenuMinimal = exports.ButtonsMenuCompact = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _types = require("@atlaskit/editor-common/types");
|
|
10
10
|
var _types2 = require("./types");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
11
|
+
var ToolbarButtonsStrongItalic = exports.ToolbarButtonsStrongItalic = [_types2.IconTypes.strong, _types2.IconTypes.em];
|
|
12
|
+
var ToolbarButtonsStrong = exports.ToolbarButtonsStrong = [_types2.IconTypes.strong];
|
|
13
|
+
var ToolbarButtonsStrongItalicUnderline = exports.ToolbarButtonsStrongItalicUnderline = [_types2.IconTypes.strong, _types2.IconTypes.em, _types2.IconTypes.underline];
|
|
14
|
+
var ButtonsMenuMinimal = exports.ButtonsMenuMinimal = [_types2.IconTypes.em, _types2.IconTypes.underline, _types2.IconTypes.strike, _types2.IconTypes.code, _types2.IconTypes.subscript, _types2.IconTypes.superscript];
|
|
15
|
+
var ButtonsMenuCompact = exports.ButtonsMenuCompact = [_types2.IconTypes.underline, _types2.IconTypes.strike, _types2.IconTypes.code, _types2.IconTypes.subscript, _types2.IconTypes.superscript];
|
|
16
|
+
var ButtonsMenuSpacious = exports.ButtonsMenuSpacious = [_types2.IconTypes.strike, _types2.IconTypes.code, _types2.IconTypes.subscript, _types2.IconTypes.superscript];
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* When tidying platform_editor_controls this is to be removed in favor of ResponsiveCustomButtonToolbarNext
|
|
20
|
-
* along with references to platform_editor_controls gate
|
|
18
|
+
/**
|
|
19
|
+
* Minimal toolbar is with Bold as single button, and Italic as a dropdown button.
|
|
21
20
|
*/
|
|
22
|
-
var
|
|
23
|
-
var ResponsiveCustomButtonToolbarNext = exports.ResponsiveCustomButtonToolbarNext = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.ToolbarSize.XXL, DefaultButtonsToolbarNext), _types.ToolbarSize.XL, DefaultButtonsToolbarNext), _types.ToolbarSize.L, DefaultButtonsToolbarNext), _types.ToolbarSize.M, [_types2.IconTypes.strong, _types2.IconTypes.em]), _types.ToolbarSize.S, [_types2.IconTypes.strong, _types2.IconTypes.em]), _types.ToolbarSize.XXXS, [_types2.IconTypes.strong]);
|
|
21
|
+
var ResponsiveCustomButtonToolbarMinimal = exports.ResponsiveCustomButtonToolbarMinimal = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.ToolbarSize.XXL, ToolbarButtonsStrong), _types.ToolbarSize.XL, ToolbarButtonsStrong), _types.ToolbarSize.L, ToolbarButtonsStrong), _types.ToolbarSize.M, ToolbarButtonsStrong), _types.ToolbarSize.S, ToolbarButtonsStrong), _types.ToolbarSize.XXXS, []);
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
* When tidying platform_editor_controls this is to be removed in favor of ResponsiveCustomMenuNext
|
|
28
|
-
* along with references to platform_editor_controls gate
|
|
23
|
+
/**
|
|
24
|
+
* Compact toolbar is with Bold, Italic as single buttons, and underline as a dropdown button.
|
|
29
25
|
*/
|
|
30
|
-
var
|
|
31
|
-
|
|
26
|
+
var ResponsiveCustomButtonToolbarCompact = exports.ResponsiveCustomButtonToolbarCompact = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.ToolbarSize.XXL, ToolbarButtonsStrongItalic), _types.ToolbarSize.XL, ToolbarButtonsStrongItalic), _types.ToolbarSize.L, ToolbarButtonsStrongItalic), _types.ToolbarSize.M, ToolbarButtonsStrongItalic), _types.ToolbarSize.S, ToolbarButtonsStrongItalic), _types.ToolbarSize.XXXS, []);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Spacious toolbar is with Bold, italic, underline as single buttons, and strike as a dropdown button.
|
|
30
|
+
*/
|
|
31
|
+
var ResponsiveCustomButtonToolbarSpacious = exports.ResponsiveCustomButtonToolbarSpacious = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.ToolbarSize.XXL, ToolbarButtonsStrongItalicUnderline), _types.ToolbarSize.XL, ToolbarButtonsStrongItalicUnderline), _types.ToolbarSize.L, ToolbarButtonsStrongItalicUnderline), _types.ToolbarSize.M, ToolbarButtonsStrongItalic), _types.ToolbarSize.S, ToolbarButtonsStrongItalic), _types.ToolbarSize.XXXS, ToolbarButtonsStrong);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarMinimal
|
|
35
|
+
*/
|
|
36
|
+
var ResponsiveCustomMenuMinimal = exports.ResponsiveCustomMenuMinimal = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.ToolbarSize.XXL, ButtonsMenuMinimal), _types.ToolbarSize.XL, ButtonsMenuMinimal), _types.ToolbarSize.L, ButtonsMenuMinimal), _types.ToolbarSize.M, ButtonsMenuMinimal), _types.ToolbarSize.S, ButtonsMenuMinimal), _types.ToolbarSize.XXXS, [_types2.IconTypes.strong, _types2.IconTypes.em].concat(ButtonsMenuMinimal));
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarCompact
|
|
40
|
+
*/
|
|
41
|
+
var ResponsiveCustomMenuCompact = exports.ResponsiveCustomMenuCompact = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.ToolbarSize.XXL, ButtonsMenuCompact), _types.ToolbarSize.XL, ButtonsMenuCompact), _types.ToolbarSize.L, ButtonsMenuCompact), _types.ToolbarSize.M, ButtonsMenuCompact), _types.ToolbarSize.S, ButtonsMenuCompact), _types.ToolbarSize.XXXS, [_types2.IconTypes.strong, _types2.IconTypes.em].concat(ButtonsMenuCompact));
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarSpacious
|
|
45
|
+
*/
|
|
46
|
+
var ResponsiveCustomMenuSpacious = exports.ResponsiveCustomMenuSpacious = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.ToolbarSize.XXL, ButtonsMenuSpacious), _types.ToolbarSize.XL, ButtonsMenuSpacious), _types.ToolbarSize.L, ButtonsMenuSpacious), _types.ToolbarSize.M, [_types2.IconTypes.underline].concat(ButtonsMenuSpacious)), _types.ToolbarSize.S, [_types2.IconTypes.underline].concat(ButtonsMenuSpacious)), _types.ToolbarSize.XXXS, [_types2.IconTypes.em, _types2.IconTypes.underline].concat(ButtonsMenuSpacious));
|
|
@@ -6,32 +6,62 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useResponsiveToolbarButtons = exports.useResponsiveIconTypeMenu = exports.useResponsiveIconTypeButtons = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
|
-
var
|
|
9
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
10
10
|
var _constants = require("../constants");
|
|
11
11
|
var _useIconList = require("./use-icon-list");
|
|
12
12
|
var useResponsiveIconTypeButtons = exports.useResponsiveIconTypeButtons = function useResponsiveIconTypeButtons(_ref) {
|
|
13
13
|
var toolbarSize = _ref.toolbarSize,
|
|
14
14
|
responsivenessEnabled = _ref.responsivenessEnabled;
|
|
15
|
-
var ResponsiveCustomButtonToolbar =
|
|
15
|
+
var ResponsiveCustomButtonToolbar = _constants.ResponsiveCustomButtonToolbarCompact;
|
|
16
|
+
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1')) {
|
|
17
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13')) {
|
|
18
|
+
ResponsiveCustomButtonToolbar = _constants.ResponsiveCustomButtonToolbarMinimal;
|
|
19
|
+
} else {
|
|
20
|
+
ResponsiveCustomButtonToolbar = !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4') ? _constants.ResponsiveCustomButtonToolbarSpacious : _constants.ResponsiveCustomButtonToolbarCompact;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
16
23
|
var iconTypeList = (0, _react.useMemo)(function () {
|
|
17
24
|
return ResponsiveCustomButtonToolbar[toolbarSize];
|
|
18
25
|
}, [toolbarSize, ResponsiveCustomButtonToolbar]);
|
|
19
26
|
if (responsivenessEnabled) {
|
|
20
27
|
return iconTypeList;
|
|
21
28
|
}
|
|
22
|
-
|
|
29
|
+
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1')) {
|
|
30
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13')) {
|
|
31
|
+
return _constants.ToolbarButtonsStrong;
|
|
32
|
+
} else {
|
|
33
|
+
return !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4') ? _constants.ToolbarButtonsStrongItalicUnderline : _constants.ToolbarButtonsStrongItalic;
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
return _constants.ToolbarButtonsStrongItalic;
|
|
37
|
+
}
|
|
23
38
|
};
|
|
24
39
|
var useResponsiveIconTypeMenu = exports.useResponsiveIconTypeMenu = function useResponsiveIconTypeMenu(_ref2) {
|
|
25
40
|
var toolbarSize = _ref2.toolbarSize,
|
|
26
41
|
responsivenessEnabled = _ref2.responsivenessEnabled;
|
|
27
|
-
var ResponsiveCustomMenu =
|
|
42
|
+
var ResponsiveCustomMenu = _constants.ResponsiveCustomMenuCompact;
|
|
43
|
+
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1')) {
|
|
44
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13')) {
|
|
45
|
+
ResponsiveCustomMenu = _constants.ResponsiveCustomMenuMinimal;
|
|
46
|
+
} else {
|
|
47
|
+
ResponsiveCustomMenu = !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4') ? _constants.ResponsiveCustomMenuSpacious : _constants.ResponsiveCustomMenuCompact;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
28
50
|
var iconTypeList = (0, _react.useMemo)(function () {
|
|
29
51
|
return ResponsiveCustomMenu[toolbarSize];
|
|
30
52
|
}, [toolbarSize, ResponsiveCustomMenu]);
|
|
31
53
|
if (responsivenessEnabled) {
|
|
32
54
|
return iconTypeList;
|
|
33
55
|
}
|
|
34
|
-
|
|
56
|
+
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1')) {
|
|
57
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13')) {
|
|
58
|
+
return _constants.ButtonsMenuMinimal;
|
|
59
|
+
} else {
|
|
60
|
+
return !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4') ? _constants.ButtonsMenuSpacious : _constants.ButtonsMenuCompact;
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
return _constants.ToolbarButtonsStrongItalic;
|
|
64
|
+
}
|
|
35
65
|
};
|
|
36
66
|
var useResponsiveToolbarButtons = exports.useResponsiveToolbarButtons = function useResponsiveToolbarButtons(_ref3) {
|
|
37
67
|
var icons = _ref3.icons,
|
|
@@ -13,7 +13,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
|
|
|
13
13
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
|
-
import {
|
|
16
|
+
import { ToolbarButtonsStrong } from './Toolbar/constants';
|
|
17
17
|
import { FormattingTextDropdownMenu } from './Toolbar/dropdown-menu';
|
|
18
18
|
import { getCommonActiveMarks, hasMultiplePartsWithFormattingInSelection } from './Toolbar/formatting-in-selection-utils';
|
|
19
19
|
import { useClearIcon } from './Toolbar/hooks/clear-formatting-icon';
|
|
@@ -155,7 +155,7 @@ const FloatingToolbarTextFormat = ({
|
|
|
155
155
|
singleItems
|
|
156
156
|
} = useIconList({
|
|
157
157
|
icons: defaultIcons,
|
|
158
|
-
iconTypeList:
|
|
158
|
+
iconTypeList: ToolbarButtonsStrong,
|
|
159
159
|
shouldUnselect: hasMultiplePartsWithFormattingSelected
|
|
160
160
|
});
|
|
161
161
|
const clearIcon = useClearIcon({
|
|
@@ -1,51 +1,80 @@
|
|
|
1
1
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { IconTypes } from './types';
|
|
3
|
-
export const
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
3
|
+
export const ToolbarButtonsStrongItalic = [IconTypes.strong, IconTypes.em];
|
|
4
|
+
export const ToolbarButtonsStrong = [IconTypes.strong];
|
|
5
|
+
export const ToolbarButtonsStrongItalicUnderline = [IconTypes.strong, IconTypes.em, IconTypes.underline];
|
|
6
|
+
export const ButtonsMenuMinimal = [IconTypes.em, IconTypes.underline, IconTypes.strike, IconTypes.code, IconTypes.subscript, IconTypes.superscript];
|
|
7
|
+
export const ButtonsMenuCompact = [IconTypes.underline, IconTypes.strike, IconTypes.code, IconTypes.subscript, IconTypes.superscript];
|
|
8
|
+
export const ButtonsMenuSpacious = [IconTypes.strike, IconTypes.code, IconTypes.subscript, IconTypes.superscript];
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* When tidying platform_editor_controls this is to be removed in favor of ResponsiveCustomButtonToolbarNext
|
|
12
|
-
* along with references to platform_editor_controls gate
|
|
10
|
+
/**
|
|
11
|
+
* Minimal toolbar is with Bold as single button, and Italic as a dropdown button.
|
|
13
12
|
*/
|
|
14
|
-
export const
|
|
15
|
-
[ToolbarSize.XXL]:
|
|
16
|
-
[ToolbarSize.XL]:
|
|
17
|
-
[ToolbarSize.L]:
|
|
18
|
-
[ToolbarSize.M]:
|
|
19
|
-
[ToolbarSize.S]:
|
|
13
|
+
export const ResponsiveCustomButtonToolbarMinimal = {
|
|
14
|
+
[ToolbarSize.XXL]: ToolbarButtonsStrong,
|
|
15
|
+
[ToolbarSize.XL]: ToolbarButtonsStrong,
|
|
16
|
+
[ToolbarSize.L]: ToolbarButtonsStrong,
|
|
17
|
+
[ToolbarSize.M]: ToolbarButtonsStrong,
|
|
18
|
+
[ToolbarSize.S]: ToolbarButtonsStrong,
|
|
20
19
|
[ToolbarSize.XXXS]: []
|
|
21
20
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
[ToolbarSize.
|
|
28
|
-
[ToolbarSize.
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Compact toolbar is with Bold, Italic as single buttons, and underline as a dropdown button.
|
|
24
|
+
*/
|
|
25
|
+
export const ResponsiveCustomButtonToolbarCompact = {
|
|
26
|
+
[ToolbarSize.XXL]: ToolbarButtonsStrongItalic,
|
|
27
|
+
[ToolbarSize.XL]: ToolbarButtonsStrongItalic,
|
|
28
|
+
[ToolbarSize.L]: ToolbarButtonsStrongItalic,
|
|
29
|
+
[ToolbarSize.M]: ToolbarButtonsStrongItalic,
|
|
30
|
+
[ToolbarSize.S]: ToolbarButtonsStrongItalic,
|
|
31
|
+
[ToolbarSize.XXXS]: []
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Spacious toolbar is with Bold, italic, underline as single buttons, and strike as a dropdown button.
|
|
36
|
+
*/
|
|
37
|
+
export const ResponsiveCustomButtonToolbarSpacious = {
|
|
38
|
+
[ToolbarSize.XXL]: ToolbarButtonsStrongItalicUnderline,
|
|
39
|
+
[ToolbarSize.XL]: ToolbarButtonsStrongItalicUnderline,
|
|
40
|
+
[ToolbarSize.L]: ToolbarButtonsStrongItalicUnderline,
|
|
41
|
+
[ToolbarSize.M]: ToolbarButtonsStrongItalic,
|
|
42
|
+
[ToolbarSize.S]: ToolbarButtonsStrongItalic,
|
|
43
|
+
[ToolbarSize.XXXS]: ToolbarButtonsStrong
|
|
29
44
|
};
|
|
30
45
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* When tidying platform_editor_controls this is to be removed in favor of ResponsiveCustomMenuNext
|
|
34
|
-
* along with references to platform_editor_controls gate
|
|
46
|
+
/**
|
|
47
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarMinimal
|
|
35
48
|
*/
|
|
36
|
-
export const
|
|
37
|
-
[ToolbarSize.XXL]:
|
|
38
|
-
[ToolbarSize.XL]:
|
|
39
|
-
[ToolbarSize.L]:
|
|
40
|
-
[ToolbarSize.M]:
|
|
41
|
-
[ToolbarSize.S]:
|
|
42
|
-
[ToolbarSize.XXXS]: [IconTypes.strong, IconTypes.em, ...
|
|
49
|
+
export const ResponsiveCustomMenuMinimal = {
|
|
50
|
+
[ToolbarSize.XXL]: ButtonsMenuMinimal,
|
|
51
|
+
[ToolbarSize.XL]: ButtonsMenuMinimal,
|
|
52
|
+
[ToolbarSize.L]: ButtonsMenuMinimal,
|
|
53
|
+
[ToolbarSize.M]: ButtonsMenuMinimal,
|
|
54
|
+
[ToolbarSize.S]: ButtonsMenuMinimal,
|
|
55
|
+
[ToolbarSize.XXXS]: [IconTypes.strong, IconTypes.em, ...ButtonsMenuMinimal]
|
|
43
56
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
[ToolbarSize.
|
|
50
|
-
[ToolbarSize.
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarCompact
|
|
60
|
+
*/
|
|
61
|
+
export const ResponsiveCustomMenuCompact = {
|
|
62
|
+
[ToolbarSize.XXL]: ButtonsMenuCompact,
|
|
63
|
+
[ToolbarSize.XL]: ButtonsMenuCompact,
|
|
64
|
+
[ToolbarSize.L]: ButtonsMenuCompact,
|
|
65
|
+
[ToolbarSize.M]: ButtonsMenuCompact,
|
|
66
|
+
[ToolbarSize.S]: ButtonsMenuCompact,
|
|
67
|
+
[ToolbarSize.XXXS]: [IconTypes.strong, IconTypes.em, ...ButtonsMenuCompact]
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarSpacious
|
|
72
|
+
*/
|
|
73
|
+
export const ResponsiveCustomMenuSpacious = {
|
|
74
|
+
[ToolbarSize.XXL]: ButtonsMenuSpacious,
|
|
75
|
+
[ToolbarSize.XL]: ButtonsMenuSpacious,
|
|
76
|
+
[ToolbarSize.L]: ButtonsMenuSpacious,
|
|
77
|
+
[ToolbarSize.M]: [IconTypes.underline, ...ButtonsMenuSpacious],
|
|
78
|
+
[ToolbarSize.S]: [IconTypes.underline, ...ButtonsMenuSpacious],
|
|
79
|
+
[ToolbarSize.XXXS]: [IconTypes.em, IconTypes.underline, ...ButtonsMenuSpacious]
|
|
51
80
|
};
|
|
@@ -1,29 +1,59 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
4
|
+
import { ButtonsMenuMinimal, ButtonsMenuCompact, ButtonsMenuSpacious, ToolbarButtonsStrong, ToolbarButtonsStrongItalic, ToolbarButtonsStrongItalicUnderline, ResponsiveCustomButtonToolbarMinimal, ResponsiveCustomButtonToolbarCompact, ResponsiveCustomButtonToolbarSpacious, ResponsiveCustomMenuMinimal, ResponsiveCustomMenuCompact, ResponsiveCustomMenuSpacious } from '../constants';
|
|
5
5
|
import { useIconList } from './use-icon-list';
|
|
6
6
|
export const useResponsiveIconTypeButtons = ({
|
|
7
7
|
toolbarSize,
|
|
8
8
|
responsivenessEnabled
|
|
9
9
|
}) => {
|
|
10
|
-
|
|
10
|
+
let ResponsiveCustomButtonToolbar = ResponsiveCustomButtonToolbarCompact;
|
|
11
|
+
if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
|
|
12
|
+
if (fg('platform_editor_controls_patch_13')) {
|
|
13
|
+
ResponsiveCustomButtonToolbar = ResponsiveCustomButtonToolbarMinimal;
|
|
14
|
+
} else {
|
|
15
|
+
ResponsiveCustomButtonToolbar = !fg('platform_editor_controls_patch_4') ? ResponsiveCustomButtonToolbarSpacious : ResponsiveCustomButtonToolbarCompact;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
11
18
|
const iconTypeList = useMemo(() => ResponsiveCustomButtonToolbar[toolbarSize], [toolbarSize, ResponsiveCustomButtonToolbar]);
|
|
12
19
|
if (responsivenessEnabled) {
|
|
13
20
|
return iconTypeList;
|
|
14
21
|
}
|
|
15
|
-
|
|
22
|
+
if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
|
|
23
|
+
if (fg('platform_editor_controls_patch_13')) {
|
|
24
|
+
return ToolbarButtonsStrong;
|
|
25
|
+
} else {
|
|
26
|
+
return !fg('platform_editor_controls_patch_4') ? ToolbarButtonsStrongItalicUnderline : ToolbarButtonsStrongItalic;
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
return ToolbarButtonsStrongItalic;
|
|
30
|
+
}
|
|
16
31
|
};
|
|
17
32
|
export const useResponsiveIconTypeMenu = ({
|
|
18
33
|
toolbarSize,
|
|
19
34
|
responsivenessEnabled
|
|
20
35
|
}) => {
|
|
21
|
-
|
|
36
|
+
let ResponsiveCustomMenu = ResponsiveCustomMenuCompact;
|
|
37
|
+
if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
|
|
38
|
+
if (fg('platform_editor_controls_patch_13')) {
|
|
39
|
+
ResponsiveCustomMenu = ResponsiveCustomMenuMinimal;
|
|
40
|
+
} else {
|
|
41
|
+
ResponsiveCustomMenu = !fg('platform_editor_controls_patch_4') ? ResponsiveCustomMenuSpacious : ResponsiveCustomMenuCompact;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
22
44
|
const iconTypeList = useMemo(() => ResponsiveCustomMenu[toolbarSize], [toolbarSize, ResponsiveCustomMenu]);
|
|
23
45
|
if (responsivenessEnabled) {
|
|
24
46
|
return iconTypeList;
|
|
25
47
|
}
|
|
26
|
-
|
|
48
|
+
if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
|
|
49
|
+
if (fg('platform_editor_controls_patch_13')) {
|
|
50
|
+
return ButtonsMenuMinimal;
|
|
51
|
+
} else {
|
|
52
|
+
return !fg('platform_editor_controls_patch_4') ? ButtonsMenuSpacious : ButtonsMenuCompact;
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
return ToolbarButtonsStrongItalic;
|
|
56
|
+
}
|
|
27
57
|
};
|
|
28
58
|
export const useResponsiveToolbarButtons = ({
|
|
29
59
|
icons,
|
|
@@ -15,7 +15,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
|
|
|
15
15
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
|
-
import {
|
|
18
|
+
import { ToolbarButtonsStrong } from './Toolbar/constants';
|
|
19
19
|
import { FormattingTextDropdownMenu } from './Toolbar/dropdown-menu';
|
|
20
20
|
import { getCommonActiveMarks, hasMultiplePartsWithFormattingInSelection } from './Toolbar/formatting-in-selection-utils';
|
|
21
21
|
import { useClearIcon } from './Toolbar/hooks/clear-formatting-icon';
|
|
@@ -146,7 +146,7 @@ var FloatingToolbarTextFormat = function FloatingToolbarTextFormat(_ref) {
|
|
|
146
146
|
});
|
|
147
147
|
var _useIconList = useIconList({
|
|
148
148
|
icons: defaultIcons,
|
|
149
|
-
iconTypeList:
|
|
149
|
+
iconTypeList: ToolbarButtonsStrong,
|
|
150
150
|
shouldUnselect: hasMultiplePartsWithFormattingSelected
|
|
151
151
|
}),
|
|
152
152
|
dropdownItems = _useIconList.dropdownItems,
|
|
@@ -1,24 +1,39 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { IconTypes } from './types';
|
|
4
|
-
export var
|
|
5
|
-
export var
|
|
6
|
-
export var
|
|
7
|
-
export var
|
|
8
|
-
export var
|
|
4
|
+
export var ToolbarButtonsStrongItalic = [IconTypes.strong, IconTypes.em];
|
|
5
|
+
export var ToolbarButtonsStrong = [IconTypes.strong];
|
|
6
|
+
export var ToolbarButtonsStrongItalicUnderline = [IconTypes.strong, IconTypes.em, IconTypes.underline];
|
|
7
|
+
export var ButtonsMenuMinimal = [IconTypes.em, IconTypes.underline, IconTypes.strike, IconTypes.code, IconTypes.subscript, IconTypes.superscript];
|
|
8
|
+
export var ButtonsMenuCompact = [IconTypes.underline, IconTypes.strike, IconTypes.code, IconTypes.subscript, IconTypes.superscript];
|
|
9
|
+
export var ButtonsMenuSpacious = [IconTypes.strike, IconTypes.code, IconTypes.subscript, IconTypes.superscript];
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* When tidying platform_editor_controls this is to be removed in favor of ResponsiveCustomButtonToolbarNext
|
|
13
|
-
* along with references to platform_editor_controls gate
|
|
11
|
+
/**
|
|
12
|
+
* Minimal toolbar is with Bold as single button, and Italic as a dropdown button.
|
|
14
13
|
*/
|
|
15
|
-
export var
|
|
16
|
-
export var ResponsiveCustomButtonToolbarNext = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ToolbarSize.XXL, DefaultButtonsToolbarNext), ToolbarSize.XL, DefaultButtonsToolbarNext), ToolbarSize.L, DefaultButtonsToolbarNext), ToolbarSize.M, [IconTypes.strong, IconTypes.em]), ToolbarSize.S, [IconTypes.strong, IconTypes.em]), ToolbarSize.XXXS, [IconTypes.strong]);
|
|
14
|
+
export var ResponsiveCustomButtonToolbarMinimal = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ToolbarSize.XXL, ToolbarButtonsStrong), ToolbarSize.XL, ToolbarButtonsStrong), ToolbarSize.L, ToolbarButtonsStrong), ToolbarSize.M, ToolbarButtonsStrong), ToolbarSize.S, ToolbarButtonsStrong), ToolbarSize.XXXS, []);
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* When tidying platform_editor_controls this is to be removed in favor of ResponsiveCustomMenuNext
|
|
21
|
-
* along with references to platform_editor_controls gate
|
|
16
|
+
/**
|
|
17
|
+
* Compact toolbar is with Bold, Italic as single buttons, and underline as a dropdown button.
|
|
22
18
|
*/
|
|
23
|
-
export var
|
|
24
|
-
|
|
19
|
+
export var ResponsiveCustomButtonToolbarCompact = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ToolbarSize.XXL, ToolbarButtonsStrongItalic), ToolbarSize.XL, ToolbarButtonsStrongItalic), ToolbarSize.L, ToolbarButtonsStrongItalic), ToolbarSize.M, ToolbarButtonsStrongItalic), ToolbarSize.S, ToolbarButtonsStrongItalic), ToolbarSize.XXXS, []);
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Spacious toolbar is with Bold, italic, underline as single buttons, and strike as a dropdown button.
|
|
23
|
+
*/
|
|
24
|
+
export var ResponsiveCustomButtonToolbarSpacious = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ToolbarSize.XXL, ToolbarButtonsStrongItalicUnderline), ToolbarSize.XL, ToolbarButtonsStrongItalicUnderline), ToolbarSize.L, ToolbarButtonsStrongItalicUnderline), ToolbarSize.M, ToolbarButtonsStrongItalic), ToolbarSize.S, ToolbarButtonsStrongItalic), ToolbarSize.XXXS, ToolbarButtonsStrong);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarMinimal
|
|
28
|
+
*/
|
|
29
|
+
export var ResponsiveCustomMenuMinimal = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ToolbarSize.XXL, ButtonsMenuMinimal), ToolbarSize.XL, ButtonsMenuMinimal), ToolbarSize.L, ButtonsMenuMinimal), ToolbarSize.M, ButtonsMenuMinimal), ToolbarSize.S, ButtonsMenuMinimal), ToolbarSize.XXXS, [IconTypes.strong, IconTypes.em].concat(ButtonsMenuMinimal));
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarCompact
|
|
33
|
+
*/
|
|
34
|
+
export var ResponsiveCustomMenuCompact = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ToolbarSize.XXL, ButtonsMenuCompact), ToolbarSize.XL, ButtonsMenuCompact), ToolbarSize.L, ButtonsMenuCompact), ToolbarSize.M, ButtonsMenuCompact), ToolbarSize.S, ButtonsMenuCompact), ToolbarSize.XXXS, [IconTypes.strong, IconTypes.em].concat(ButtonsMenuCompact));
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarSpacious
|
|
38
|
+
*/
|
|
39
|
+
export var ResponsiveCustomMenuSpacious = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ToolbarSize.XXL, ButtonsMenuSpacious), ToolbarSize.XL, ButtonsMenuSpacious), ToolbarSize.L, ButtonsMenuSpacious), ToolbarSize.M, [IconTypes.underline].concat(ButtonsMenuSpacious)), ToolbarSize.S, [IconTypes.underline].concat(ButtonsMenuSpacious)), ToolbarSize.XXXS, [IconTypes.em, IconTypes.underline].concat(ButtonsMenuSpacious));
|
|
@@ -1,31 +1,61 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
4
|
+
import { ButtonsMenuMinimal, ButtonsMenuCompact, ButtonsMenuSpacious, ToolbarButtonsStrong, ToolbarButtonsStrongItalic, ToolbarButtonsStrongItalicUnderline, ResponsiveCustomButtonToolbarMinimal, ResponsiveCustomButtonToolbarCompact, ResponsiveCustomButtonToolbarSpacious, ResponsiveCustomMenuMinimal, ResponsiveCustomMenuCompact, ResponsiveCustomMenuSpacious } from '../constants';
|
|
5
5
|
import { useIconList } from './use-icon-list';
|
|
6
6
|
export var useResponsiveIconTypeButtons = function useResponsiveIconTypeButtons(_ref) {
|
|
7
7
|
var toolbarSize = _ref.toolbarSize,
|
|
8
8
|
responsivenessEnabled = _ref.responsivenessEnabled;
|
|
9
|
-
var ResponsiveCustomButtonToolbar =
|
|
9
|
+
var ResponsiveCustomButtonToolbar = ResponsiveCustomButtonToolbarCompact;
|
|
10
|
+
if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
|
|
11
|
+
if (fg('platform_editor_controls_patch_13')) {
|
|
12
|
+
ResponsiveCustomButtonToolbar = ResponsiveCustomButtonToolbarMinimal;
|
|
13
|
+
} else {
|
|
14
|
+
ResponsiveCustomButtonToolbar = !fg('platform_editor_controls_patch_4') ? ResponsiveCustomButtonToolbarSpacious : ResponsiveCustomButtonToolbarCompact;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
10
17
|
var iconTypeList = useMemo(function () {
|
|
11
18
|
return ResponsiveCustomButtonToolbar[toolbarSize];
|
|
12
19
|
}, [toolbarSize, ResponsiveCustomButtonToolbar]);
|
|
13
20
|
if (responsivenessEnabled) {
|
|
14
21
|
return iconTypeList;
|
|
15
22
|
}
|
|
16
|
-
|
|
23
|
+
if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
|
|
24
|
+
if (fg('platform_editor_controls_patch_13')) {
|
|
25
|
+
return ToolbarButtonsStrong;
|
|
26
|
+
} else {
|
|
27
|
+
return !fg('platform_editor_controls_patch_4') ? ToolbarButtonsStrongItalicUnderline : ToolbarButtonsStrongItalic;
|
|
28
|
+
}
|
|
29
|
+
} else {
|
|
30
|
+
return ToolbarButtonsStrongItalic;
|
|
31
|
+
}
|
|
17
32
|
};
|
|
18
33
|
export var useResponsiveIconTypeMenu = function useResponsiveIconTypeMenu(_ref2) {
|
|
19
34
|
var toolbarSize = _ref2.toolbarSize,
|
|
20
35
|
responsivenessEnabled = _ref2.responsivenessEnabled;
|
|
21
|
-
var ResponsiveCustomMenu =
|
|
36
|
+
var ResponsiveCustomMenu = ResponsiveCustomMenuCompact;
|
|
37
|
+
if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
|
|
38
|
+
if (fg('platform_editor_controls_patch_13')) {
|
|
39
|
+
ResponsiveCustomMenu = ResponsiveCustomMenuMinimal;
|
|
40
|
+
} else {
|
|
41
|
+
ResponsiveCustomMenu = !fg('platform_editor_controls_patch_4') ? ResponsiveCustomMenuSpacious : ResponsiveCustomMenuCompact;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
22
44
|
var iconTypeList = useMemo(function () {
|
|
23
45
|
return ResponsiveCustomMenu[toolbarSize];
|
|
24
46
|
}, [toolbarSize, ResponsiveCustomMenu]);
|
|
25
47
|
if (responsivenessEnabled) {
|
|
26
48
|
return iconTypeList;
|
|
27
49
|
}
|
|
28
|
-
|
|
50
|
+
if (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1')) {
|
|
51
|
+
if (fg('platform_editor_controls_patch_13')) {
|
|
52
|
+
return ButtonsMenuMinimal;
|
|
53
|
+
} else {
|
|
54
|
+
return !fg('platform_editor_controls_patch_4') ? ButtonsMenuSpacious : ButtonsMenuCompact;
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
return ToolbarButtonsStrongItalic;
|
|
58
|
+
}
|
|
29
59
|
};
|
|
30
60
|
export var useResponsiveToolbarButtons = function useResponsiveToolbarButtons(_ref3) {
|
|
31
61
|
var icons = _ref3.icons,
|
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { IconTypes } from './types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
3
|
+
export declare const ToolbarButtonsStrongItalic: IconTypes[];
|
|
4
|
+
export declare const ToolbarButtonsStrong: IconTypes[];
|
|
5
|
+
export declare const ToolbarButtonsStrongItalicUnderline: IconTypes[];
|
|
6
|
+
export declare const ButtonsMenuMinimal: IconTypes[];
|
|
7
|
+
export declare const ButtonsMenuCompact: IconTypes[];
|
|
8
|
+
export declare const ButtonsMenuSpacious: IconTypes[];
|
|
9
|
+
/**
|
|
10
|
+
* Minimal toolbar is with Bold as single button, and Italic as a dropdown button.
|
|
11
11
|
*/
|
|
12
|
-
export declare const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* When tidying platform_editor_controls this is to be removed in favor of ResponsiveCustomMenuNext
|
|
16
|
-
* along with references to platform_editor_controls gate
|
|
12
|
+
export declare const ResponsiveCustomButtonToolbarMinimal: Record<ToolbarSize, IconTypes[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Compact toolbar is with Bold, Italic as single buttons, and underline as a dropdown button.
|
|
17
15
|
*/
|
|
18
|
-
export declare const
|
|
19
|
-
|
|
16
|
+
export declare const ResponsiveCustomButtonToolbarCompact: Record<ToolbarSize, IconTypes[]>;
|
|
17
|
+
/**
|
|
18
|
+
* Spacious toolbar is with Bold, italic, underline as single buttons, and strike as a dropdown button.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ResponsiveCustomButtonToolbarSpacious: Record<ToolbarSize, IconTypes[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarMinimal
|
|
23
|
+
*/
|
|
24
|
+
export declare const ResponsiveCustomMenuMinimal: Record<ToolbarSize, IconTypes[]>;
|
|
25
|
+
/**
|
|
26
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarCompact
|
|
27
|
+
*/
|
|
28
|
+
export declare const ResponsiveCustomMenuCompact: Record<ToolbarSize, IconTypes[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarSpacious
|
|
31
|
+
*/
|
|
32
|
+
export declare const ResponsiveCustomMenuSpacious: Record<ToolbarSize, IconTypes[]>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { MenuIconItem } from '../types';
|
|
2
|
+
import type { IconTypes, MenuIconItem } from '../types';
|
|
3
3
|
import { type IconsPositions } from './use-icon-list';
|
|
4
4
|
export declare const useResponsiveIconTypeButtons: ({ toolbarSize, responsivenessEnabled, }: {
|
|
5
5
|
toolbarSize: ToolbarSize;
|
|
6
6
|
responsivenessEnabled: boolean;
|
|
7
|
-
}) =>
|
|
7
|
+
}) => IconTypes[];
|
|
8
8
|
export declare const useResponsiveIconTypeMenu: ({ toolbarSize, responsivenessEnabled, }: {
|
|
9
9
|
toolbarSize: ToolbarSize;
|
|
10
10
|
responsivenessEnabled: boolean;
|
|
11
|
-
}) =>
|
|
11
|
+
}) => IconTypes[];
|
|
12
12
|
export declare const useResponsiveToolbarButtons: ({ icons, toolbarSize, responsivenessEnabled, }: {
|
|
13
13
|
responsivenessEnabled: boolean;
|
|
14
14
|
toolbarSize: ToolbarSize;
|
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { IconTypes } from './types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
3
|
+
export declare const ToolbarButtonsStrongItalic: IconTypes[];
|
|
4
|
+
export declare const ToolbarButtonsStrong: IconTypes[];
|
|
5
|
+
export declare const ToolbarButtonsStrongItalicUnderline: IconTypes[];
|
|
6
|
+
export declare const ButtonsMenuMinimal: IconTypes[];
|
|
7
|
+
export declare const ButtonsMenuCompact: IconTypes[];
|
|
8
|
+
export declare const ButtonsMenuSpacious: IconTypes[];
|
|
9
|
+
/**
|
|
10
|
+
* Minimal toolbar is with Bold as single button, and Italic as a dropdown button.
|
|
11
11
|
*/
|
|
12
|
-
export declare const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* When tidying platform_editor_controls this is to be removed in favor of ResponsiveCustomMenuNext
|
|
16
|
-
* along with references to platform_editor_controls gate
|
|
12
|
+
export declare const ResponsiveCustomButtonToolbarMinimal: Record<ToolbarSize, IconTypes[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Compact toolbar is with Bold, Italic as single buttons, and underline as a dropdown button.
|
|
17
15
|
*/
|
|
18
|
-
export declare const
|
|
19
|
-
|
|
16
|
+
export declare const ResponsiveCustomButtonToolbarCompact: Record<ToolbarSize, IconTypes[]>;
|
|
17
|
+
/**
|
|
18
|
+
* Spacious toolbar is with Bold, italic, underline as single buttons, and strike as a dropdown button.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ResponsiveCustomButtonToolbarSpacious: Record<ToolbarSize, IconTypes[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarMinimal
|
|
23
|
+
*/
|
|
24
|
+
export declare const ResponsiveCustomMenuMinimal: Record<ToolbarSize, IconTypes[]>;
|
|
25
|
+
/**
|
|
26
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarCompact
|
|
27
|
+
*/
|
|
28
|
+
export declare const ResponsiveCustomMenuCompact: Record<ToolbarSize, IconTypes[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Corresponding dropdown menu for the ResponsiveCustomButtonToolbarSpacious
|
|
31
|
+
*/
|
|
32
|
+
export declare const ResponsiveCustomMenuSpacious: Record<ToolbarSize, IconTypes[]>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { MenuIconItem } from '../types';
|
|
2
|
+
import type { IconTypes, MenuIconItem } from '../types';
|
|
3
3
|
import { type IconsPositions } from './use-icon-list';
|
|
4
4
|
export declare const useResponsiveIconTypeButtons: ({ toolbarSize, responsivenessEnabled, }: {
|
|
5
5
|
toolbarSize: ToolbarSize;
|
|
6
6
|
responsivenessEnabled: boolean;
|
|
7
|
-
}) =>
|
|
7
|
+
}) => IconTypes[];
|
|
8
8
|
export declare const useResponsiveIconTypeMenu: ({ toolbarSize, responsivenessEnabled, }: {
|
|
9
9
|
toolbarSize: ToolbarSize;
|
|
10
10
|
responsivenessEnabled: boolean;
|
|
11
|
-
}) =>
|
|
11
|
+
}) => IconTypes[];
|
|
12
12
|
export declare const useResponsiveToolbarButtons: ({ icons, toolbarSize, responsivenessEnabled, }: {
|
|
13
13
|
responsivenessEnabled: boolean;
|
|
14
14
|
toolbarSize: ToolbarSize;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-formatting",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.19",
|
|
4
4
|
"description": "Text-formatting plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -116,6 +116,9 @@
|
|
|
116
116
|
"platform_editor_controls_patch_10": {
|
|
117
117
|
"type": "boolean"
|
|
118
118
|
},
|
|
119
|
+
"platform_editor_controls_patch_13": {
|
|
120
|
+
"type": "boolean"
|
|
121
|
+
},
|
|
119
122
|
"editor_inline_comments_on_inline_nodes": {
|
|
120
123
|
"type": "boolean"
|
|
121
124
|
},
|