@atlaskit/editor-plugin-block-type 23.0.0 → 23.0.2

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,19 @@
1
1
  # @atlaskit/editor-plugin-block-type
2
2
 
3
+ ## 23.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 23.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`8d37dc7e55d62`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d37dc7e55d62) -
14
+ Clean up shipped experiment `platform_editor_block_menu`
15
+ - Updated dependencies
16
+
3
17
  ## 23.0.0
4
18
 
5
19
  ### Patch Changes
@@ -13,9 +13,9 @@ var _fontSize = require("@atlaskit/adf-schema/font-size");
13
13
  var _hardBreak = require("@atlaskit/adf-schema/hard-break");
14
14
  var _heading = require("@atlaskit/adf-schema/heading");
15
15
  var _analytics = require("@atlaskit/editor-common/analytics");
16
+ var _assets = require("@atlaskit/editor-common/assets");
16
17
  var _keymaps = require("@atlaskit/editor-common/keymaps");
17
18
  var _messages = require("@atlaskit/editor-common/messages");
18
- var _assets = require("@atlaskit/editor-common/assets");
19
19
  var _types = require("@atlaskit/editor-common/types");
20
20
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
21
21
  var _fg = require("@atlaskit/platform-feature-flags/fg");
@@ -107,6 +107,7 @@ var blockquotePluginOptions = function blockquotePluginOptions(_ref2, isAllowed,
107
107
  }];
108
108
  };
109
109
  var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3) {
110
+ var _api$blockMenu;
110
111
  var options = _ref3.config,
111
112
  api = _ref3.api;
112
113
  var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
@@ -143,12 +144,9 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
143
144
  component: primaryToolbarComponent
144
145
  });
145
146
  }
146
- if ((0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
147
- var _api$blockMenu;
148
- api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents((0, _ui.getBlockTypeComponents)(api, {
149
- allowFontSize: options === null || options === void 0 ? void 0 : options.allowFontSize
150
- }));
151
- }
147
+ api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents((0, _ui.getBlockTypeComponents)(api, {
148
+ allowFontSize: options === null || options === void 0 ? void 0 : options.allowFontSize
149
+ }));
152
150
  if (isRegisteredSlashCommandEnabled) {
153
151
  var _api$uiControlRegistr, _options$allowBlockTy, _options$allowBlockTy2;
154
152
  api === null || api === void 0 || (_api$uiControlRegistr = api.uiControlRegistry) === null || _api$uiControlRegistr === void 0 || _api$uiControlRegistr.actions.register((0, _getBlockTypeQuickInsertComponents.getBlockTypeQuickInsertComponents)({
@@ -12,13 +12,13 @@ var _analytics = require("@atlaskit/editor-common/analytics");
12
12
  var _keymaps = require("@atlaskit/editor-common/keymaps");
13
13
  var _messages = require("@atlaskit/editor-common/messages");
14
14
  var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
15
- var _quotationMark = _interopRequireDefault(require("@atlaskit/icon/core/quotation-mark"));
16
15
  var _textHeadingFive = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-five"));
17
16
  var _textHeadingFour = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-four"));
18
17
  var _textHeadingOne = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-one"));
19
18
  var _textHeadingSix = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-six"));
20
19
  var _textHeadingThree = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-three"));
21
20
  var _textHeadingTwo = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-heading-two"));
21
+ var _quotationMark = _interopRequireDefault(require("@atlaskit/icon/core/quotation-mark"));
22
22
  var _tooltip, _tooltip2, _tooltip3, _tooltip4, _tooltip5, _tooltip6;
23
23
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
24
24
  var headingQuickInsertMessages = {
@@ -4,9 +4,9 @@ import { fontSize } from '@atlaskit/adf-schema/font-size';
4
4
  import { hardBreak } from '@atlaskit/adf-schema/hard-break';
5
5
  import { heading } from '@atlaskit/adf-schema/heading';
6
6
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
7
+ import { IconHeading, IconQuote } from '@atlaskit/editor-common/assets';
7
8
  import { keymap, tooltip } from '@atlaskit/editor-common/keymaps';
8
9
  import { blockTypeMessages as messages } from '@atlaskit/editor-common/messages';
9
- import { IconHeading, IconQuote } from '@atlaskit/editor-common/assets';
10
10
  import { ToolbarSize } from '@atlaskit/editor-common/types';
11
11
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
12
12
  import { fg } from '@atlaskit/platform-feature-flags/fg';
@@ -97,6 +97,7 @@ const blockTypePlugin = ({
97
97
  config: options,
98
98
  api
99
99
  }) => {
100
+ var _api$blockMenu;
100
101
  const isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
101
102
  const isRegisteredSlashCommandEnabled = isExperimentEnabled('platform_editor_slash_command');
102
103
  const primaryToolbarComponent = ({
@@ -132,12 +133,9 @@ const blockTypePlugin = ({
132
133
  component: primaryToolbarComponent
133
134
  });
134
135
  }
135
- if (editorExperiment('platform_editor_block_menu', true)) {
136
- var _api$blockMenu;
137
- api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents(getBlockTypeComponents(api, {
138
- allowFontSize: options === null || options === void 0 ? void 0 : options.allowFontSize
139
- }));
140
- }
136
+ api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents(getBlockTypeComponents(api, {
137
+ allowFontSize: options === null || options === void 0 ? void 0 : options.allowFontSize
138
+ }));
141
139
  if (isRegisteredSlashCommandEnabled) {
142
140
  var _api$uiControlRegistr, _options$allowBlockTy, _options$allowBlockTy2;
143
141
  api === null || api === void 0 ? void 0 : (_api$uiControlRegistr = api.uiControlRegistry) === null || _api$uiControlRegistr === void 0 ? void 0 : _api$uiControlRegistr.actions.register(getBlockTypeQuickInsertComponents({
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { blockTypePlugin } from '../blockTypePlugin';
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL } from '../pm-plugins/block-types';
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
2
+
2
3
  import React from 'react';
3
4
  const SVGContainer = ({
4
5
  children
@@ -5,13 +5,13 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
5
5
  import { toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, tooltip } from '@atlaskit/editor-common/keymaps';
6
6
  import { blockTypeMessages as messages } from '@atlaskit/editor-common/messages';
7
7
  import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
8
- import QuotationMarkIcon from '@atlaskit/icon/core/quotation-mark';
9
8
  import TextHeadingFiveIcon from '@atlaskit/icon-lab/core/text-heading-five';
10
9
  import TextHeadingFourIcon from '@atlaskit/icon-lab/core/text-heading-four';
11
10
  import TextHeadingOneIcon from '@atlaskit/icon-lab/core/text-heading-one';
12
11
  import TextHeadingSixIcon from '@atlaskit/icon-lab/core/text-heading-six';
13
12
  import TextHeadingThreeIcon from '@atlaskit/icon-lab/core/text-heading-three';
14
13
  import TextHeadingTwoIcon from '@atlaskit/icon-lab/core/text-heading-two';
14
+ import QuotationMarkIcon from '@atlaskit/icon/core/quotation-mark';
15
15
  const headingQuickInsertMessages = {
16
16
  1: {
17
17
  description: messages.heading1Description,
@@ -8,9 +8,9 @@ import { fontSize } from '@atlaskit/adf-schema/font-size';
8
8
  import { hardBreak } from '@atlaskit/adf-schema/hard-break';
9
9
  import { heading } from '@atlaskit/adf-schema/heading';
10
10
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
11
+ import { IconHeading, IconQuote } from '@atlaskit/editor-common/assets';
11
12
  import { keymap, tooltip } from '@atlaskit/editor-common/keymaps';
12
13
  import { blockTypeMessages as messages } from '@atlaskit/editor-common/messages';
13
- import { IconHeading, IconQuote } from '@atlaskit/editor-common/assets';
14
14
  import { ToolbarSize } from '@atlaskit/editor-common/types';
15
15
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
16
16
  import { fg } from '@atlaskit/platform-feature-flags/fg';
@@ -100,6 +100,7 @@ var blockquotePluginOptions = function blockquotePluginOptions(_ref2, isAllowed,
100
100
  }];
101
101
  };
102
102
  var blockTypePlugin = function blockTypePlugin(_ref3) {
103
+ var _api$blockMenu;
103
104
  var options = _ref3.config,
104
105
  api = _ref3.api;
105
106
  var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
@@ -136,12 +137,9 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
136
137
  component: primaryToolbarComponent
137
138
  });
138
139
  }
139
- if (editorExperiment('platform_editor_block_menu', true)) {
140
- var _api$blockMenu;
141
- api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents(getBlockTypeComponents(api, {
142
- allowFontSize: options === null || options === void 0 ? void 0 : options.allowFontSize
143
- }));
144
- }
140
+ api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents(getBlockTypeComponents(api, {
141
+ allowFontSize: options === null || options === void 0 ? void 0 : options.allowFontSize
142
+ }));
145
143
  if (isRegisteredSlashCommandEnabled) {
146
144
  var _api$uiControlRegistr, _options$allowBlockTy, _options$allowBlockTy2;
147
145
  api === null || api === void 0 || (_api$uiControlRegistr = api.uiControlRegistry) === null || _api$uiControlRegistr === void 0 || _api$uiControlRegistr.actions.register(getBlockTypeQuickInsertComponents({
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { blockTypePlugin } from '../blockTypePlugin';
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL } from '../pm-plugins/block-types';
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
2
+
2
3
  import React from 'react';
3
4
  var SVGContainer = function SVGContainer(_ref) {
4
5
  var children = _ref.children;
@@ -5,13 +5,13 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
5
5
  import { toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, tooltip } from '@atlaskit/editor-common/keymaps';
6
6
  import { blockTypeMessages as messages } from '@atlaskit/editor-common/messages';
7
7
  import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
8
- import QuotationMarkIcon from '@atlaskit/icon/core/quotation-mark';
9
8
  import TextHeadingFiveIcon from '@atlaskit/icon-lab/core/text-heading-five';
10
9
  import TextHeadingFourIcon from '@atlaskit/icon-lab/core/text-heading-four';
11
10
  import TextHeadingOneIcon from '@atlaskit/icon-lab/core/text-heading-one';
12
11
  import TextHeadingSixIcon from '@atlaskit/icon-lab/core/text-heading-six';
13
12
  import TextHeadingThreeIcon from '@atlaskit/icon-lab/core/text-heading-three';
14
13
  import TextHeadingTwoIcon from '@atlaskit/icon-lab/core/text-heading-two';
14
+ import QuotationMarkIcon from '@atlaskit/icon/core/quotation-mark';
15
15
  var headingQuickInsertMessages = {
16
16
  1: {
17
17
  description: messages.heading1Description,
@@ -7,8 +7,8 @@ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolb
7
7
  import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
8
8
  import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
9
9
  import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
10
- import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
11
10
  import type { UiControlRegistryPlugin } from '@atlaskit/editor-plugin-ui-control-registry';
11
+ import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
12
12
  import type { TextBlockTypes } from './pm-plugins/block-types';
13
13
  import type { ClearFormattingInputMethod, InputMethod } from './pm-plugins/commands/block-type';
14
14
  import type { BlockTypeState } from './pm-plugins/main';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "23.0.0",
3
+ "version": "23.0.2",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  "@atlaskit/editor-prosemirror": "^9.0.0",
35
35
  "@atlaskit/editor-shared-styles": "^4.3.0",
36
36
  "@atlaskit/editor-tables": "^3.2.0",
37
- "@atlaskit/editor-toolbar": "^2.6.0",
37
+ "@atlaskit/editor-toolbar": "^2.7.0",
38
38
  "@atlaskit/editor-toolbar-model": "^1.2.0",
39
39
  "@atlaskit/icon": "^37.7.0",
40
40
  "@atlaskit/icon-lab": "^7.9.0",
@@ -43,14 +43,14 @@
43
43
  "@atlaskit/primitives": "^22.5.0",
44
44
  "@atlaskit/prosemirror-history": "^1.2.0",
45
45
  "@atlaskit/prosemirror-input-rules": "^4.1.0",
46
- "@atlaskit/tmp-editor-statsig": "^199.0.0",
46
+ "@atlaskit/tmp-editor-statsig": "^201.0.0",
47
47
  "@atlaskit/tokens": "^18.2.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "@compiled/react": "^1.0.2",
50
50
  "@emotion/react": "^11.7.1"
51
51
  },
52
52
  "peerDependencies": {
53
- "@atlaskit/editor-common": "^123.0.0",
53
+ "@atlaskit/editor-common": "^123.2.0",
54
54
  "react": "^18.2.0 || ^19.2.0",
55
55
  "react-dom": "^18.2.0 || ^19.2.0",
56
56
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"