@atlaskit/editor-plugin-block-type 12.1.31 → 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 CHANGED
@@ -1,5 +1,14 @@
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
+
3
12
  ## 12.1.31
4
13
 
5
14
  ### 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: /*#__PURE__*/_react.default.createElement(_editorToolbar.TextIcon, {
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
  }),
@@ -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: /*#__PURE__*/React.createElement(EditorToolbarTextIcon, {
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
  }),
@@ -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: /*#__PURE__*/React.createElement(EditorToolbarTextIcon, {
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
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "12.1.31",
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",
@@ -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.0.0",
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",
@@ -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
  },