@atlaskit/editor-plugin-block-type 20.0.8 → 20.1.0

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,22 @@
1
1
  # @atlaskit/editor-plugin-block-type
2
2
 
3
+ ## 20.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`bd2c5b0112185`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd2c5b0112185) -
8
+ Remove stale API report artifacts from published Platform packages.
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 20.0.9
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 20.0.8
4
21
 
5
22
  ### Patch Changes
@@ -17,7 +17,7 @@ var _types = require("@atlaskit/editor-common/types");
17
17
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
18
18
  var _fg = require("@atlaskit/platform-feature-flags/fg");
19
19
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
20
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
20
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
21
21
  var _blockType = require("./pm-plugins/commands/block-type");
22
22
  var _inputRule = _interopRequireDefault(require("./pm-plugins/input-rule"));
23
23
  var _keymap = _interopRequireDefault(require("./pm-plugins/keymap"));
@@ -141,7 +141,7 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
141
141
  component: primaryToolbarComponent
142
142
  });
143
143
  }
144
- if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
144
+ if ((0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
145
145
  var _api$blockMenu;
146
146
  api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents((0, _ui.getBlockTypeComponents)(api));
147
147
  }
@@ -242,7 +242,7 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
242
242
  selectionToolbar: function selectionToolbar() {
243
243
  var _api$userPreferences, _api$selectionToolbar;
244
244
  var toolbarDocking = (0, _fg.fg)('platform_editor_use_preferences_plugin') ? api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.preferences) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.toolbarDockingPosition : api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking;
245
- if (toolbarDocking === 'none' && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
245
+ if (toolbarDocking === 'none' && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1', {
246
246
  exposure: true
247
247
  })) {
248
248
  var toolbarCustom = {
@@ -9,7 +9,7 @@ exports.FloatingToolbarComponent = FloatingToolbarComponent;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _analytics = require("@atlaskit/editor-common/analytics");
11
11
  var _hooks = require("@atlaskit/editor-common/hooks");
12
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
12
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
13
13
  var _ToolbarBlockType = _interopRequireDefault(require("./ToolbarBlockType"));
14
14
  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); }
15
15
  var FloatingToolbarSettings = {
@@ -50,7 +50,7 @@ function FloatingToolbarComponent(_ref) {
50
50
  return /*#__PURE__*/_react.default.createElement(_ToolbarBlockType.default, {
51
51
  isSmall: FloatingToolbarSettings.isSmall,
52
52
  isDisabled: FloatingToolbarSettings.disabled,
53
- isReducedSpacing: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? false : FloatingToolbarSettings.isToolbarReducedSpacing,
53
+ isReducedSpacing: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? false : FloatingToolbarSettings.isToolbarReducedSpacing,
54
54
  setTextLevel: boundSetBlockType,
55
55
  currentBlockType: currentBlockType,
56
56
  blockTypesDisabled: blockTypesDisabled,
@@ -21,7 +21,7 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
21
21
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
22
22
  var _text = _interopRequireDefault(require("@atlaskit/icon/core/text"));
23
23
  var _primitives = require("@atlaskit/primitives");
24
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
24
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
25
25
  var _themeMutationObserver = require("@atlaskit/tokens/theme-mutation-observer");
26
26
  var _blockTypes = require("../../block-types");
27
27
  var _blocktypeButton = require("./blocktype-button");
@@ -99,7 +99,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
99
99
  value: blockType,
100
100
  'aria-label': (0, _keymaps.tooltip)(keyMap, formatMessage(blockType.title)),
101
101
  key: "".concat(blockType.name, "-").concat(index),
102
- elemBefore: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? icon : undefined,
102
+ elemBefore: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? icon : undefined,
103
103
  elemAfter:
104
104
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
105
105
  (0, _react2.jsx)("div", {
@@ -111,7 +111,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
111
111
  });
112
112
  if ((availableBlockTypesInDropdown !== null && availableBlockTypesInDropdown !== void 0 ? availableBlockTypesInDropdown : []).map(function (blockType) {
113
113
  return blockType.name;
114
- }).includes('blockquote') && (0, _experiments.editorExperiment)('platform_editor_controls', 'control')) {
114
+ }).includes('blockquote') && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'control')) {
115
115
  var clearFormattingItem = {
116
116
  content: (0, _react2.jsx)("div", null, (0, _react2.jsx)("p", null, _messages.toolbarMessages.clearFormatting.defaultMessage)),
117
117
  value: {
@@ -300,6 +300,6 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
300
300
  );
301
301
  }
302
302
  }]);
303
- }(_react.default.PureComponent); // eslint-disable-next-line @typescript-eslint/ban-types
303
+ }(_react.default.PureComponent); // eslint-disable-next-line @typescript-eslint/no-restricted-types
304
304
  var _default_1 = (0, _reactIntl.injectIntl)(ToolbarBlockType);
305
305
  var _default = exports.default = _default_1;
@@ -8,7 +8,7 @@ import { ToolbarSize } from '@atlaskit/editor-common/types';
8
8
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
9
9
  import { fg } from '@atlaskit/platform-feature-flags/fg';
10
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
12
12
  import { clearFormatting, insertBlockQuoteWithAnalytics, insertBlockQuoteWithAnalyticsCommand, setBlockTypeWithAnalytics } from './pm-plugins/commands/block-type';
13
13
  import inputRulePlugin from './pm-plugins/input-rule';
14
14
  import keymapPlugin from './pm-plugins/keymap';
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
3
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
5
5
  import ToolbarBlockType from './ToolbarBlockType';
6
6
  const FloatingToolbarSettings = {
7
7
  isSmall: true,
@@ -16,7 +16,7 @@ import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
16
16
  import TextIcon from '@atlaskit/icon/core/text';
17
17
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
18
18
  import { Box, xcss } from '@atlaskit/primitives';
19
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
19
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
20
20
  import { ThemeMutationObserver } from '@atlaskit/tokens/theme-mutation-observer';
21
21
  import { NORMAL_TEXT } from '../../block-types';
22
22
  import { BlockTypeButton } from './blocktype-button';
@@ -272,6 +272,6 @@ class ToolbarBlockType extends React.PureComponent {
272
272
  }
273
273
  }
274
274
 
275
- // eslint-disable-next-line @typescript-eslint/ban-types
275
+ // eslint-disable-next-line @typescript-eslint/no-restricted-types
276
276
  const _default_1 = injectIntl(ToolbarBlockType);
277
277
  export default _default_1;
@@ -12,7 +12,7 @@ import { ToolbarSize } from '@atlaskit/editor-common/types';
12
12
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
13
13
  import { fg } from '@atlaskit/platform-feature-flags/fg';
14
14
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
16
16
  import { clearFormatting as _clearFormatting, insertBlockQuoteWithAnalytics, insertBlockQuoteWithAnalyticsCommand, setBlockTypeWithAnalytics } from './pm-plugins/commands/block-type';
17
17
  import inputRulePlugin from './pm-plugins/input-rule';
18
18
  import keymapPlugin from './pm-plugins/keymap';
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
3
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
5
5
  import ToolbarBlockType from './ToolbarBlockType';
6
6
  var FloatingToolbarSettings = {
7
7
  isSmall: true,
@@ -25,7 +25,7 @@ import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
25
25
  import TextIcon from '@atlaskit/icon/core/text';
26
26
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
27
27
  import { Box, xcss } from '@atlaskit/primitives';
28
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
28
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
29
29
  import { ThemeMutationObserver } from '@atlaskit/tokens/theme-mutation-observer';
30
30
  import { NORMAL_TEXT } from '../../block-types';
31
31
  import { BlockTypeButton } from './blocktype-button';
@@ -296,6 +296,6 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
296
296
  );
297
297
  }
298
298
  }]);
299
- }(React.PureComponent); // eslint-disable-next-line @typescript-eslint/ban-types
299
+ }(React.PureComponent); // eslint-disable-next-line @typescript-eslint/no-restricted-types
300
300
  var _default_1 = injectIntl(ToolbarBlockType);
301
301
  export default _default_1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "20.0.8",
3
+ "version": "20.1.0",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -23,34 +23,34 @@
23
23
  "dependencies": {
24
24
  "@atlaskit/adf-schema": "^57.2.0",
25
25
  "@atlaskit/css": "^1.1.0",
26
- "@atlaskit/editor-plugin-analytics": "^16.0.0",
26
+ "@atlaskit/editor-plugin-analytics": "^16.1.0",
27
27
  "@atlaskit/editor-plugin-block-menu": "^15.0.0",
28
28
  "@atlaskit/editor-plugin-interaction": "^27.0.0",
29
- "@atlaskit/editor-plugin-list": "^18.0.0",
29
+ "@atlaskit/editor-plugin-list": "^18.1.0",
30
30
  "@atlaskit/editor-plugin-primary-toolbar": "^17.0.0",
31
- "@atlaskit/editor-plugin-selection": "^16.0.0",
32
- "@atlaskit/editor-plugin-selection-toolbar": "^17.0.0",
31
+ "@atlaskit/editor-plugin-selection": "^16.1.0",
32
+ "@atlaskit/editor-plugin-selection-toolbar": "^17.1.0",
33
33
  "@atlaskit/editor-plugin-toolbar": "^13.0.0",
34
34
  "@atlaskit/editor-prosemirror": "^8.0.0",
35
- "@atlaskit/editor-shared-styles": "^4.0.0",
36
- "@atlaskit/editor-tables": "^3.0.0",
35
+ "@atlaskit/editor-shared-styles": "^4.1.0",
36
+ "@atlaskit/editor-tables": "^3.1.0",
37
37
  "@atlaskit/editor-toolbar": "^2.6.0",
38
38
  "@atlaskit/editor-toolbar-model": "^1.2.0",
39
- "@atlaskit/icon": "^37.5.0",
39
+ "@atlaskit/icon": "^37.6.0",
40
40
  "@atlaskit/icon-lab": "^7.7.0",
41
41
  "@atlaskit/platform-feature-experiments": "^0.3.0",
42
- "@atlaskit/platform-feature-flags": "^2.1.0",
43
- "@atlaskit/primitives": "^22.4.0",
42
+ "@atlaskit/platform-feature-flags": "^2.2.0",
43
+ "@atlaskit/primitives": "^22.5.0",
44
44
  "@atlaskit/prosemirror-history": "^1.2.0",
45
- "@atlaskit/prosemirror-input-rules": "^4.0.0",
46
- "@atlaskit/tmp-editor-statsig": "^167.0.0",
47
- "@atlaskit/tokens": "^16.9.0",
45
+ "@atlaskit/prosemirror-input-rules": "^4.1.0",
46
+ "@atlaskit/tmp-editor-statsig": "^168.0.0",
47
+ "@atlaskit/tokens": "^16.10.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": "^120.7.0",
53
+ "@atlaskit/editor-common": "^120.9.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"
package/report.api.md DELETED
@@ -1,122 +0,0 @@
1
- <!-- API Report Version: 2.3 -->
2
-
3
- ## API Report File for "@atlaskit/editor-plugin-block-type"
4
-
5
- > Do not edit this file. This report is auto-generated using
6
- > [API Extractor](https://api-extractor.com/).
7
- > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
8
-
9
- ### Table of contents
10
-
11
- - [Main Entry Types](#main-entry-types)
12
- - [Peer Dependencies](#peer-dependencies)
13
-
14
- ### Main Entry Types
15
-
16
- <!--SECTION START: Main Entry Types-->
17
-
18
- ```ts
19
- import type { AllowedBlockTypes } from '@atlaskit/editor-common/types';
20
- import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
21
- import type { Command } from '@atlaskit/editor-common/types';
22
- import type { EditorCommand } from '@atlaskit/editor-common/types';
23
- import type { HeadingLevelsAndNormalText } from '@atlaskit/editor-common/types';
24
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
25
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
26
- import type { MessageDescriptor } from 'react-intl';
27
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
28
- import type { OptionalPlugin } from '@atlaskit/editor-common/types';
29
-
30
- // @public (undocumented)
31
- export interface BlockType {
32
- // (undocumented)
33
- level?: HeadingLevelsAndNormalText;
34
- // (undocumented)
35
- name: string;
36
- // (undocumented)
37
- nodeName: string;
38
- // (undocumented)
39
- tagName?: string;
40
- // (undocumented)
41
- title: MessageDescriptor;
42
- }
43
-
44
- // @public (undocumented)
45
- export type BlockTypePlugin = NextEditorPlugin<
46
- 'blockType',
47
- {
48
- pluginConfiguration: BlockTypePluginOptions | undefined;
49
- dependencies: [OptionalPlugin<typeof analyticsPlugin>];
50
- sharedState: BlockTypeState | undefined;
51
- actions: {
52
- insertBlockQuote: (inputMethod: InputMethod) => Command;
53
- };
54
- commands: {
55
- setTextLevel: (level: TextBlockTypes, inputMethod: InputMethod) => EditorCommand;
56
- };
57
- }
58
- >;
59
-
60
- // @public (undocumented)
61
- export const blockTypePlugin: BlockTypePlugin;
62
-
63
- // @public (undocumented)
64
- export interface BlockTypePluginOptions {
65
- // (undocumented)
66
- allowBlockType?: {
67
- exclude?: Array<AllowedBlockTypes>;
68
- };
69
- // (undocumented)
70
- isUndoRedoButtonsEnabled?: boolean;
71
- // (undocumented)
72
- lastNodeMustBeParagraph?: boolean;
73
- }
74
-
75
- // @public (undocumented)
76
- export type BlockTypeState = {
77
- currentBlockType: BlockType;
78
- blockTypesDisabled: boolean;
79
- availableBlockTypes: BlockType[];
80
- availableWrapperBlockTypes: BlockType[];
81
- };
82
-
83
- // @public (undocumented)
84
- export type DropdownItem = MenuItem & {
85
- value: BlockType;
86
- };
87
-
88
- // @public (undocumented)
89
- export type InputMethod =
90
- | INPUT_METHOD.FORMATTING
91
- | INPUT_METHOD.INSERT_MENU
92
- | INPUT_METHOD.KEYBOARD
93
- | INPUT_METHOD.SHORTCUT
94
- | INPUT_METHOD.TOOLBAR;
95
-
96
- // @public (undocumented)
97
- export type TextBlockTypes =
98
- | 'heading1'
99
- | 'heading2'
100
- | 'heading3'
101
- | 'heading4'
102
- | 'heading5'
103
- | 'heading6'
104
- | 'normal';
105
-
106
- // (No @packageDocumentation comment for this package)
107
- ```
108
-
109
- <!--SECTION END: Main Entry Types-->
110
-
111
- ### Peer Dependencies
112
-
113
- <!--SECTION START: Peer Dependencies-->
114
-
115
- ```json
116
- {
117
- "react": "^16.8.0",
118
- "react-intl": "npm:react-intl@^5.18.1"
119
- }
120
- ```
121
-
122
- <!--SECTION END: Peer Dependencies-->