@atlaskit/editor-plugin-block-type 12.1.31 → 12.1.33
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 +18 -0
- package/dist/cjs/pm-plugins/block-types.js +7 -1
- package/dist/cjs/ui/HeadingBlockMenuItem.js +1 -7
- package/dist/cjs/ui/ParagraphBlockMenuItem.js +1 -7
- package/dist/cjs/ui/QuoteBlockMenuItem.js +5 -13
- package/dist/es2019/pm-plugins/block-types.js +8 -2
- package/dist/es2019/ui/HeadingBlockMenuItem.js +1 -7
- package/dist/es2019/ui/ParagraphBlockMenuItem.js +1 -7
- package/dist/es2019/ui/QuoteBlockMenuItem.js +5 -13
- package/dist/esm/pm-plugins/block-types.js +8 -2
- package/dist/esm/ui/HeadingBlockMenuItem.js +1 -7
- package/dist/esm/ui/ParagraphBlockMenuItem.js +1 -7
- package/dist/esm/ui/QuoteBlockMenuItem.js +5 -13
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
|
2
2
|
|
|
3
|
+
## 12.1.33
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1bd298ad0a152`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1bd298ad0a152) -
|
|
8
|
+
[ux] EDITOR-6280 Clean up platform_editor_block_menu_v2_patch_3 to fix icon and copy in jira block
|
|
9
|
+
menu
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 12.1.32
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`4e313eb8fb024`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4e313eb8fb024) -
|
|
17
|
+
Add TextNormalIcon for normal text block type, gate behind
|
|
18
|
+
platform_editor_change_normal_text_icon, exclude editor-toolbar from barrel ratchet
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 12.1.31
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -17,6 +17,7 @@ var _textHeadingSix = _interopRequireDefault(require("@atlaskit/icon-lab/core/te
|
|
|
17
17
|
var _textHeadingThree = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-three"));
|
|
18
18
|
var _textHeadingTwo = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-two"));
|
|
19
19
|
var _text = _interopRequireDefault(require("@atlaskit/icon/core/text"));
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
21
22
|
var _icons = require("./ui/ToolbarBlockType/icons");
|
|
22
23
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -144,7 +145,12 @@ var toolbarBlockTypesWithRank = exports.toolbarBlockTypesWithRank = function too
|
|
|
144
145
|
var allowFontSize = _ref.allowFontSize;
|
|
145
146
|
return _objectSpread(_objectSpread({
|
|
146
147
|
normal: _objectSpread(_objectSpread({}, NORMAL_TEXT), {}, {
|
|
147
|
-
icon:
|
|
148
|
+
icon:
|
|
149
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
150
|
+
(0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_change_normal_text_icon') ? /*#__PURE__*/_react.default.createElement(_editorToolbar.TextNormalIcon, {
|
|
151
|
+
size: "small",
|
|
152
|
+
label: ""
|
|
153
|
+
}) : /*#__PURE__*/_react.default.createElement(_editorToolbar.TextIcon, {
|
|
148
154
|
size: "small",
|
|
149
155
|
label: ""
|
|
150
156
|
}),
|
|
@@ -16,7 +16,6 @@ var _textHeadingOne = _interopRequireDefault(require("@atlaskit/icon-lab/core/te
|
|
|
16
16
|
var _textHeadingSix = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-six"));
|
|
17
17
|
var _textHeadingThree = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-three"));
|
|
18
18
|
var _textHeadingTwo = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-two"));
|
|
19
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
19
|
var headingIcons = [_textHeadingOne.default, _textHeadingTwo.default, _textHeadingThree.default, _textHeadingFour.default, _textHeadingFive.default, _textHeadingSix.default];
|
|
21
20
|
var headingMessages = [_messages.blockTypeMessages.heading1, _messages.blockTypeMessages.heading2, _messages.blockTypeMessages.heading3, _messages.blockTypeMessages.heading4, _messages.blockTypeMessages.heading5, _messages.blockTypeMessages.heading6];
|
|
22
21
|
var NODE_NAME = 'heading';
|
|
@@ -46,16 +45,11 @@ var HeadingBlockMenuItem = function HeadingBlockMenuItem(_ref) {
|
|
|
46
45
|
}) : null;
|
|
47
46
|
});
|
|
48
47
|
};
|
|
49
|
-
|
|
50
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
51
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
52
|
-
// To clean up: remove conditional, keep only size="small" version.
|
|
53
|
-
var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
54
48
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
55
49
|
onClick: handleClick,
|
|
56
50
|
elemBefore: /*#__PURE__*/_react.default.createElement(Icon, {
|
|
57
51
|
label: "",
|
|
58
|
-
size:
|
|
52
|
+
size: "small"
|
|
59
53
|
})
|
|
60
54
|
}, formatMessage(message));
|
|
61
55
|
};
|
|
@@ -11,7 +11,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
13
13
|
var _textParagraph = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-paragraph"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var NODE_NAME = 'paragraph';
|
|
16
15
|
var ParagraphBlockMenuItem = function ParagraphBlockMenuItem(_ref) {
|
|
17
16
|
var api = _ref.api;
|
|
@@ -33,16 +32,11 @@ var ParagraphBlockMenuItem = function ParagraphBlockMenuItem(_ref) {
|
|
|
33
32
|
}) : null;
|
|
34
33
|
});
|
|
35
34
|
};
|
|
36
|
-
|
|
37
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
38
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
39
|
-
// To clean up: remove conditional, keep only size="small" version.
|
|
40
|
-
var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
41
35
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
42
36
|
onClick: handleClick,
|
|
43
37
|
elemBefore: /*#__PURE__*/_react.default.createElement(_textParagraph.default, {
|
|
44
38
|
label: "",
|
|
45
|
-
size:
|
|
39
|
+
size: "small"
|
|
46
40
|
})
|
|
47
41
|
}, formatMessage(_messages.blockMenuMessages.paragraph));
|
|
48
42
|
};
|
|
@@ -14,7 +14,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
14
14
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
15
15
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
16
16
|
var _quotationMark = _interopRequireDefault(require("@atlaskit/icon/core/quotation-mark"));
|
|
17
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
17
|
var styles = {
|
|
19
18
|
svgOverflow: "_1wrmewfl _172sewfl"
|
|
20
19
|
};
|
|
@@ -39,21 +38,14 @@ var QuoteBlockMenuItem = function QuoteBlockMenuItem(_ref) {
|
|
|
39
38
|
}) : null;
|
|
40
39
|
});
|
|
41
40
|
};
|
|
42
|
-
|
|
43
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
44
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
45
|
-
// Adds overflow: visible to SVGs to fix when view port is in different zoom level, sometimes the right edge of the icon is cut off.
|
|
46
|
-
// To clean up: remove conditionals, keep only size="small" version and always apply svgOverflowStyles wrapper.
|
|
47
|
-
var iconSize = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
48
|
-
var icon = /*#__PURE__*/_react.default.createElement(_quotationMark.default, {
|
|
49
|
-
label: "",
|
|
50
|
-
size: iconSize
|
|
51
|
-
});
|
|
52
41
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
53
42
|
onClick: handleClick,
|
|
54
|
-
elemBefore:
|
|
43
|
+
elemBefore: /*#__PURE__*/_react.default.createElement("span", {
|
|
55
44
|
className: (0, _runtime.ax)([styles.svgOverflow])
|
|
56
|
-
},
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_quotationMark.default, {
|
|
46
|
+
label: "",
|
|
47
|
+
size: "small"
|
|
48
|
+
}))
|
|
57
49
|
}, formatMessage(_messages.blockTypeMessages.blockquote));
|
|
58
50
|
};
|
|
59
51
|
var createQuoteBlockMenuItem = exports.createQuoteBlockMenuItem = function createQuoteBlockMenuItem(_ref3) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { blockTypeMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
3
|
import { BLOCK_QUOTE_MENU_ITEM, HEADING_1_MENU_ITEM, HEADING_2_MENU_ITEM, HEADING_3_MENU_ITEM, HEADING_4_MENU_ITEM, HEADING_5_MENU_ITEM, HEADING_6_MENU_ITEM, NORMAL_TEXT_MENU_ITEM, SMALL_TEXT_MENU_ITEM, TEXT_STYLES_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
|
|
4
|
-
import { TextIcon as EditorToolbarTextIcon, QuoteIcon, HeadingOneIcon, HeadingTwoIcon, HeadingThreeIcon, HeadingFourIcon, HeadingFiveIcon, HeadingSixIcon, TextSmallIcon } from '@atlaskit/editor-toolbar';
|
|
4
|
+
import { TextIcon as EditorToolbarTextIcon, TextNormalIcon, QuoteIcon, HeadingOneIcon, HeadingTwoIcon, HeadingThreeIcon, HeadingFourIcon, HeadingFiveIcon, HeadingSixIcon, TextSmallIcon } from '@atlaskit/editor-toolbar';
|
|
5
5
|
import TextHeadingFiveIcon from '@atlaskit/icon-lab/core/text-heading-five';
|
|
6
6
|
import TextHeadingFourIcon from '@atlaskit/icon-lab/core/text-heading-four';
|
|
7
7
|
import TextHeadingOneIcon from '@atlaskit/icon-lab/core/text-heading-one';
|
|
@@ -9,6 +9,7 @@ import TextHeadingSixIcon from '@atlaskit/icon-lab/core/text-heading-six';
|
|
|
9
9
|
import TextHeadingThreeIcon from '@atlaskit/icon-lab/core/text-heading-three';
|
|
10
10
|
import TextHeadingTwoIcon from '@atlaskit/icon-lab/core/text-heading-two';
|
|
11
11
|
import TextIcon from '@atlaskit/icon/core/text';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
import { Text, H1, H2, H3, H4, H5, H6 } from './ui/ToolbarBlockType/icons';
|
|
14
15
|
export const NORMAL_TEXT = {
|
|
@@ -135,7 +136,12 @@ export const toolbarBlockTypesWithRank = ({
|
|
|
135
136
|
}) => ({
|
|
136
137
|
normal: {
|
|
137
138
|
...NORMAL_TEXT,
|
|
138
|
-
icon:
|
|
139
|
+
icon:
|
|
140
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
141
|
+
expValEquals('platform_editor_small_font_size', 'isEnabled', true) && fg('platform_editor_change_normal_text_icon') ? /*#__PURE__*/React.createElement(TextNormalIcon, {
|
|
142
|
+
size: "small",
|
|
143
|
+
label: ""
|
|
144
|
+
}) : /*#__PURE__*/React.createElement(EditorToolbarTextIcon, {
|
|
139
145
|
size: "small",
|
|
140
146
|
label: ""
|
|
141
147
|
}),
|
|
@@ -9,7 +9,6 @@ import TextHeadingOneIcon from '@atlaskit/icon-lab/core/text-heading-one';
|
|
|
9
9
|
import TextHeadingSixIcon from '@atlaskit/icon-lab/core/text-heading-six';
|
|
10
10
|
import TextHeadingThreeIcon from '@atlaskit/icon-lab/core/text-heading-three';
|
|
11
11
|
import TextHeadingTwoIcon from '@atlaskit/icon-lab/core/text-heading-two';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
const headingIcons = [TextHeadingOneIcon, TextHeadingTwoIcon, TextHeadingThreeIcon, TextHeadingFourIcon, TextHeadingFiveIcon, TextHeadingSixIcon];
|
|
14
13
|
const headingMessages = [blockTypeMessages.heading1, blockTypeMessages.heading2, blockTypeMessages.heading3, blockTypeMessages.heading4, blockTypeMessages.heading5, blockTypeMessages.heading6];
|
|
15
14
|
const NODE_NAME = 'heading';
|
|
@@ -42,16 +41,11 @@ const HeadingBlockMenuItem = ({
|
|
|
42
41
|
}) : null;
|
|
43
42
|
});
|
|
44
43
|
};
|
|
45
|
-
|
|
46
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
47
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
48
|
-
// To clean up: remove conditional, keep only size="small" version.
|
|
49
|
-
const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
50
44
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
51
45
|
onClick: handleClick,
|
|
52
46
|
elemBefore: /*#__PURE__*/React.createElement(Icon, {
|
|
53
47
|
label: "",
|
|
54
|
-
size:
|
|
48
|
+
size: "small"
|
|
55
49
|
})
|
|
56
50
|
}, formatMessage(message));
|
|
57
51
|
};
|
|
@@ -4,7 +4,6 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
4
4
|
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
6
6
|
import TextParagraphIcon from '@atlaskit/icon-lab/core/text-paragraph';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
const NODE_NAME = 'paragraph';
|
|
9
8
|
const ParagraphBlockMenuItem = ({
|
|
10
9
|
api
|
|
@@ -29,16 +28,11 @@ const ParagraphBlockMenuItem = ({
|
|
|
29
28
|
}) : null;
|
|
30
29
|
});
|
|
31
30
|
};
|
|
32
|
-
|
|
33
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
34
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
35
|
-
// To clean up: remove conditional, keep only size="small" version.
|
|
36
|
-
const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
37
31
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
38
32
|
onClick: handleClick,
|
|
39
33
|
elemBefore: /*#__PURE__*/React.createElement(TextParagraphIcon, {
|
|
40
34
|
label: "",
|
|
41
|
-
size:
|
|
35
|
+
size: "small"
|
|
42
36
|
})
|
|
43
37
|
}, formatMessage(blockMenuMessages.paragraph));
|
|
44
38
|
};
|
|
@@ -7,7 +7,6 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
7
7
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
9
9
|
import QuotationMarkIcon from '@atlaskit/icon/core/quotation-mark';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
const styles = {
|
|
12
11
|
svgOverflow: "_1wrmewfl _172sewfl"
|
|
13
12
|
};
|
|
@@ -35,21 +34,14 @@ const QuoteBlockMenuItem = ({
|
|
|
35
34
|
}) : null;
|
|
36
35
|
});
|
|
37
36
|
};
|
|
38
|
-
|
|
39
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
40
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
41
|
-
// Adds overflow: visible to SVGs to fix when view port is in different zoom level, sometimes the right edge of the icon is cut off.
|
|
42
|
-
// To clean up: remove conditionals, keep only size="small" version and always apply svgOverflowStyles wrapper.
|
|
43
|
-
const iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
44
|
-
const icon = /*#__PURE__*/React.createElement(QuotationMarkIcon, {
|
|
45
|
-
label: "",
|
|
46
|
-
size: iconSize
|
|
47
|
-
});
|
|
48
37
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
49
38
|
onClick: handleClick,
|
|
50
|
-
elemBefore:
|
|
39
|
+
elemBefore: /*#__PURE__*/React.createElement("span", {
|
|
51
40
|
className: ax([styles.svgOverflow])
|
|
52
|
-
},
|
|
41
|
+
}, /*#__PURE__*/React.createElement(QuotationMarkIcon, {
|
|
42
|
+
label: "",
|
|
43
|
+
size: "small"
|
|
44
|
+
}))
|
|
53
45
|
}, formatMessage(blockTypeMessages.blockquote));
|
|
54
46
|
};
|
|
55
47
|
export const createQuoteBlockMenuItem = ({
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { blockTypeMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { BLOCK_QUOTE_MENU_ITEM, HEADING_1_MENU_ITEM, HEADING_2_MENU_ITEM, HEADING_3_MENU_ITEM, HEADING_4_MENU_ITEM, HEADING_5_MENU_ITEM, HEADING_6_MENU_ITEM, NORMAL_TEXT_MENU_ITEM, SMALL_TEXT_MENU_ITEM, TEXT_STYLES_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
|
|
7
|
-
import { TextIcon as EditorToolbarTextIcon, QuoteIcon, HeadingOneIcon, HeadingTwoIcon, HeadingThreeIcon, HeadingFourIcon, HeadingFiveIcon, HeadingSixIcon, TextSmallIcon } from '@atlaskit/editor-toolbar';
|
|
7
|
+
import { TextIcon as EditorToolbarTextIcon, TextNormalIcon, QuoteIcon, HeadingOneIcon, HeadingTwoIcon, HeadingThreeIcon, HeadingFourIcon, HeadingFiveIcon, HeadingSixIcon, TextSmallIcon } from '@atlaskit/editor-toolbar';
|
|
8
8
|
import TextHeadingFiveIcon from '@atlaskit/icon-lab/core/text-heading-five';
|
|
9
9
|
import TextHeadingFourIcon from '@atlaskit/icon-lab/core/text-heading-four';
|
|
10
10
|
import TextHeadingOneIcon from '@atlaskit/icon-lab/core/text-heading-one';
|
|
@@ -12,6 +12,7 @@ import TextHeadingSixIcon from '@atlaskit/icon-lab/core/text-heading-six';
|
|
|
12
12
|
import TextHeadingThreeIcon from '@atlaskit/icon-lab/core/text-heading-three';
|
|
13
13
|
import TextHeadingTwoIcon from '@atlaskit/icon-lab/core/text-heading-two';
|
|
14
14
|
import TextIcon from '@atlaskit/icon/core/text';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
17
|
import { Text, H1, H2, H3, H4, H5, H6 } from './ui/ToolbarBlockType/icons';
|
|
17
18
|
export var NORMAL_TEXT = {
|
|
@@ -137,7 +138,12 @@ export var toolbarBlockTypesWithRank = function toolbarBlockTypesWithRank(_ref)
|
|
|
137
138
|
var allowFontSize = _ref.allowFontSize;
|
|
138
139
|
return _objectSpread(_objectSpread({
|
|
139
140
|
normal: _objectSpread(_objectSpread({}, NORMAL_TEXT), {}, {
|
|
140
|
-
icon:
|
|
141
|
+
icon:
|
|
142
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
143
|
+
expValEquals('platform_editor_small_font_size', 'isEnabled', true) && fg('platform_editor_change_normal_text_icon') ? /*#__PURE__*/React.createElement(TextNormalIcon, {
|
|
144
|
+
size: "small",
|
|
145
|
+
label: ""
|
|
146
|
+
}) : /*#__PURE__*/React.createElement(EditorToolbarTextIcon, {
|
|
141
147
|
size: "small",
|
|
142
148
|
label: ""
|
|
143
149
|
}),
|
|
@@ -9,7 +9,6 @@ import TextHeadingOneIcon from '@atlaskit/icon-lab/core/text-heading-one';
|
|
|
9
9
|
import TextHeadingSixIcon from '@atlaskit/icon-lab/core/text-heading-six';
|
|
10
10
|
import TextHeadingThreeIcon from '@atlaskit/icon-lab/core/text-heading-three';
|
|
11
11
|
import TextHeadingTwoIcon from '@atlaskit/icon-lab/core/text-heading-two';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
var headingIcons = [TextHeadingOneIcon, TextHeadingTwoIcon, TextHeadingThreeIcon, TextHeadingFourIcon, TextHeadingFiveIcon, TextHeadingSixIcon];
|
|
14
13
|
var headingMessages = [blockTypeMessages.heading1, blockTypeMessages.heading2, blockTypeMessages.heading3, blockTypeMessages.heading4, blockTypeMessages.heading5, blockTypeMessages.heading6];
|
|
15
14
|
var NODE_NAME = 'heading';
|
|
@@ -39,16 +38,11 @@ var HeadingBlockMenuItem = function HeadingBlockMenuItem(_ref) {
|
|
|
39
38
|
}) : null;
|
|
40
39
|
});
|
|
41
40
|
};
|
|
42
|
-
|
|
43
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
44
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
45
|
-
// To clean up: remove conditional, keep only size="small" version.
|
|
46
|
-
var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
47
41
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
48
42
|
onClick: handleClick,
|
|
49
43
|
elemBefore: /*#__PURE__*/React.createElement(Icon, {
|
|
50
44
|
label: "",
|
|
51
|
-
size:
|
|
45
|
+
size: "small"
|
|
52
46
|
})
|
|
53
47
|
}, formatMessage(message));
|
|
54
48
|
};
|
|
@@ -4,7 +4,6 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
4
4
|
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
6
6
|
import TextParagraphIcon from '@atlaskit/icon-lab/core/text-paragraph';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
var NODE_NAME = 'paragraph';
|
|
9
8
|
var ParagraphBlockMenuItem = function ParagraphBlockMenuItem(_ref) {
|
|
10
9
|
var api = _ref.api;
|
|
@@ -26,16 +25,11 @@ var ParagraphBlockMenuItem = function ParagraphBlockMenuItem(_ref) {
|
|
|
26
25
|
}) : null;
|
|
27
26
|
});
|
|
28
27
|
};
|
|
29
|
-
|
|
30
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
31
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
32
|
-
// To clean up: remove conditional, keep only size="small" version.
|
|
33
|
-
var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
34
28
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
35
29
|
onClick: handleClick,
|
|
36
30
|
elemBefore: /*#__PURE__*/React.createElement(TextParagraphIcon, {
|
|
37
31
|
label: "",
|
|
38
|
-
size:
|
|
32
|
+
size: "small"
|
|
39
33
|
})
|
|
40
34
|
}, formatMessage(blockMenuMessages.paragraph));
|
|
41
35
|
};
|
|
@@ -7,7 +7,6 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
7
7
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
9
9
|
import QuotationMarkIcon from '@atlaskit/icon/core/quotation-mark';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
var styles = {
|
|
12
11
|
svgOverflow: "_1wrmewfl _172sewfl"
|
|
13
12
|
};
|
|
@@ -32,21 +31,14 @@ var QuoteBlockMenuItem = function QuoteBlockMenuItem(_ref) {
|
|
|
32
31
|
}) : null;
|
|
33
32
|
});
|
|
34
33
|
};
|
|
35
|
-
|
|
36
|
-
// [FEATURE FLAG: platform_editor_block_menu_v2_patch_3]
|
|
37
|
-
// Adds size="small" to icons for better visual consistency in block menu.
|
|
38
|
-
// Adds overflow: visible to SVGs to fix when view port is in different zoom level, sometimes the right edge of the icon is cut off.
|
|
39
|
-
// To clean up: remove conditionals, keep only size="small" version and always apply svgOverflowStyles wrapper.
|
|
40
|
-
var iconSize = fg('platform_editor_block_menu_v2_patch_3') ? 'small' : undefined;
|
|
41
|
-
var icon = /*#__PURE__*/React.createElement(QuotationMarkIcon, {
|
|
42
|
-
label: "",
|
|
43
|
-
size: iconSize
|
|
44
|
-
});
|
|
45
34
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
46
35
|
onClick: handleClick,
|
|
47
|
-
elemBefore:
|
|
36
|
+
elemBefore: /*#__PURE__*/React.createElement("span", {
|
|
48
37
|
className: ax([styles.svgOverflow])
|
|
49
|
-
},
|
|
38
|
+
}, /*#__PURE__*/React.createElement(QuotationMarkIcon, {
|
|
39
|
+
label: "",
|
|
40
|
+
size: "small"
|
|
41
|
+
}))
|
|
50
42
|
}, formatMessage(blockTypeMessages.blockquote));
|
|
51
43
|
};
|
|
52
44
|
export var createQuoteBlockMenuItem = function createQuoteBlockMenuItem(_ref3) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.33",
|
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@atlaskit/primitives": "^19.0.0",
|
|
50
50
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
51
51
|
"@atlaskit/prosemirror-input-rules": "^3.6.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^62.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^62.2.0",
|
|
53
53
|
"@atlaskit/tokens": "^13.0.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@compiled/react": "^0.20.0",
|
|
@@ -103,6 +103,9 @@
|
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
"platform-feature-flags": {
|
|
106
|
+
"platform_editor_change_normal_text_icon": {
|
|
107
|
+
"type": "boolean"
|
|
108
|
+
},
|
|
106
109
|
"platform_editor_updated_block_type_colors_a11y": {
|
|
107
110
|
"type": "boolean"
|
|
108
111
|
},
|
|
@@ -112,9 +115,6 @@
|
|
|
112
115
|
"platform_editor_nested_dnd_styles_changes": {
|
|
113
116
|
"type": "boolean"
|
|
114
117
|
},
|
|
115
|
-
"platform_editor_block_menu_v2_patch_3": {
|
|
116
|
-
"type": "boolean"
|
|
117
|
-
},
|
|
118
118
|
"platform_editor_use_preferences_plugin": {
|
|
119
119
|
"type": "boolean"
|
|
120
120
|
},
|