@atlaskit/editor-plugin-block-type 12.1.30 → 12.1.32
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/pm-plugins/main.js +1 -1
- package/dist/es2019/pm-plugins/block-types.js +8 -2
- package/dist/es2019/pm-plugins/main.js +2 -2
- package/dist/esm/pm-plugins/block-types.js +8 -2
- package/dist/esm/pm-plugins/main.js +2 -2
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
|
2
2
|
|
|
3
|
+
## 12.1.32
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4e313eb8fb024`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4e313eb8fb024) -
|
|
8
|
+
Add TextNormalIcon for normal text block type, gate behind
|
|
9
|
+
platform_editor_change_normal_text_icon, exclude editor-toolbar from barrel ratchet
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 12.1.31
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`73b2fc243f544`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/73b2fc243f544) -
|
|
17
|
+
Cleaning up getBrowserInfo which was behind experiment platform_editor_hydratable_ui and is now
|
|
18
|
+
rolled out
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 12.1.30
|
|
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
|
}),
|
|
@@ -150,7 +150,7 @@ var createPlugin = exports.createPlugin = function createPlugin(editorAPI, dispa
|
|
|
150
150
|
// Check for numpad keys if not found in digits row
|
|
151
151
|
headingLevel = _consts.HEADING_NUMPAD_KEYS.indexOf(event.keyCode);
|
|
152
152
|
}
|
|
153
|
-
var browser = (0,
|
|
153
|
+
var browser = (0, _browser.getBrowserInfo)();
|
|
154
154
|
if (headingLevel > -1 && event.altKey) {
|
|
155
155
|
if (browser.mac && event.metaKey) {
|
|
156
156
|
var _editorAPI$core$actio, _editorAPI$core;
|
|
@@ -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
|
}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import {
|
|
2
|
+
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -134,7 +134,7 @@ export const createPlugin = (editorAPI, dispatch, lastNodeMustBeParagraph, inclu
|
|
|
134
134
|
// Check for numpad keys if not found in digits row
|
|
135
135
|
headingLevel = HEADING_NUMPAD_KEYS.indexOf(event.keyCode);
|
|
136
136
|
}
|
|
137
|
-
const browser =
|
|
137
|
+
const browser = getBrowserInfo();
|
|
138
138
|
if (headingLevel > -1 && event.altKey) {
|
|
139
139
|
if (browser.mac && event.metaKey) {
|
|
140
140
|
var _editorAPI$core$actio, _editorAPI$core;
|
|
@@ -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
|
}),
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import {
|
|
5
|
+
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
7
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -143,7 +143,7 @@ export var createPlugin = function createPlugin(editorAPI, dispatch, lastNodeMus
|
|
|
143
143
|
// Check for numpad keys if not found in digits row
|
|
144
144
|
headingLevel = HEADING_NUMPAD_KEYS.indexOf(event.keyCode);
|
|
145
145
|
}
|
|
146
|
-
var browser =
|
|
146
|
+
var browser = getBrowserInfo();
|
|
147
147
|
if (headingLevel > -1 && event.altKey) {
|
|
148
148
|
if (browser.mac && event.metaKey) {
|
|
149
149
|
var _editorAPI$core$actio, _editorAPI$core;
|
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.32",
|
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,20 +43,20 @@
|
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.20.0",
|
|
45
45
|
"@atlaskit/editor-toolbar-model": "^0.4.0",
|
|
46
|
-
"@atlaskit/icon": "^34.
|
|
47
|
-
"@atlaskit/icon-lab": "^6.
|
|
46
|
+
"@atlaskit/icon": "^34.1.0",
|
|
47
|
+
"@atlaskit/icon-lab": "^6.5.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
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": "^
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^62.1.0",
|
|
53
53
|
"@atlaskit/tokens": "^13.0.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@compiled/react": "^0.20.0",
|
|
56
56
|
"@emotion/react": "^11.7.1"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^112.
|
|
59
|
+
"@atlaskit/editor-common": "^112.21.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0",
|
|
62
62
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -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
|
},
|