@atlaskit/editor-plugin-block-type 12.1.13 → 12.1.15

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,21 @@
1
1
  # @atlaskit/editor-plugin-block-type
2
2
 
3
+ ## 12.1.15
4
+
5
+ ### Patch Changes
6
+
7
+ - [`da0d44bd1fc45`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/da0d44bd1fc45) -
8
+ Cleanup history feature flag bug fix
9
+ - Updated dependencies
10
+
11
+ ## 12.1.14
12
+
13
+ ### Patch Changes
14
+
15
+ - [`88a7ee0806123`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88a7ee0806123) -
16
+ Mechanical type-import autofix for block, layout, and control packages.
17
+ - Updated dependencies
18
+
3
19
  ## 12.1.13
4
20
 
5
21
  ### Patch Changes
@@ -10,7 +10,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
10
10
  var _browser = require("@atlaskit/editor-common/browser");
11
11
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
12
12
  var _state = require("@atlaskit/editor-prosemirror/state");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
14
  var _blockTypes = require("./block-types");
16
15
  var _blockType = require("./commands/block-type");
@@ -99,11 +98,7 @@ var createPlugin = exports.createPlugin = function createPlugin(editorAPI, dispa
99
98
  var lastNode = pos.node(1);
100
99
  var paragraph = newState.schema.nodes.paragraph;
101
100
  if (lastNode && lastNode.isBlock && lastNode.type !== paragraph) {
102
- if ((0, _platformFeatureFlags.fg)('platform_editor_fix_insert_paragraph_undo')) {
103
- return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
104
- } else {
105
- return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create()).setMeta('addToHistory', false);
106
- }
101
+ return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
107
102
  }
108
103
  }
109
104
  },
@@ -2,7 +2,6 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import { browser as browserLegacy, 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
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
6
  import { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, HEADINGS_BY_LEVEL, NORMAL_TEXT, OTHER, PANEL, TEXT_BLOCK_TYPES, WRAPPER_BLOCK_TYPES, getBlockTypesInDropdown, SMALL_TEXT } from './block-types';
8
7
  import { setHeadingWithAnalytics, setNormalTextWithAnalytics, setSmallTextWithAnalytics } from './commands/block-type';
@@ -88,11 +87,7 @@ export const createPlugin = (editorAPI, dispatch, lastNodeMustBeParagraph, inclu
88
87
  paragraph
89
88
  } = newState.schema.nodes;
90
89
  if (lastNode && lastNode.isBlock && lastNode.type !== paragraph) {
91
- if (fg('platform_editor_fix_insert_paragraph_undo')) {
92
- return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
93
- } else {
94
- return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create()).setMeta('addToHistory', false);
95
- }
90
+ return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
96
91
  }
97
92
  }
98
93
  },
@@ -3,7 +3,6 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
-
7
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
7
  import { jsx } from '@emotion/react';
9
8
  import { FormattedMessage } from 'react-intl-next';
@@ -5,7 +5,6 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
5
5
  import { browser as browserLegacy, 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
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
9
  import { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, HEADINGS_BY_LEVEL, NORMAL_TEXT, OTHER, PANEL, TEXT_BLOCK_TYPES, WRAPPER_BLOCK_TYPES, getBlockTypesInDropdown, SMALL_TEXT } from './block-types';
11
10
  import { setHeadingWithAnalytics, setNormalTextWithAnalytics, setSmallTextWithAnalytics } from './commands/block-type';
@@ -92,11 +91,7 @@ export var createPlugin = function createPlugin(editorAPI, dispatch, lastNodeMus
92
91
  var lastNode = pos.node(1);
93
92
  var paragraph = newState.schema.nodes.paragraph;
94
93
  if (lastNode && lastNode.isBlock && lastNode.type !== paragraph) {
95
- if (fg('platform_editor_fix_insert_paragraph_undo')) {
96
- return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
97
- } else {
98
- return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create()).setMeta('addToHistory', false);
99
- }
94
+ return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
100
95
  }
101
96
  }
102
97
  },
@@ -3,7 +3,6 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
-
7
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
7
  import { jsx } from '@emotion/react';
9
8
  import { FormattedMessage } from 'react-intl-next';
@@ -1,3 +1,3 @@
1
- import { type BlockTypePlugin } from './blockTypePluginType';
1
+ import type { BlockTypePlugin } from './blockTypePluginType';
2
2
  declare const blockTypePlugin: BlockTypePlugin;
3
3
  export { blockTypePlugin };
@@ -1,6 +1,6 @@
1
1
  import type { Node, NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import { type CellSelection } from '@atlaskit/editor-tables/cell-selection';
3
+ import type { CellSelection } from '@atlaskit/editor-tables/cell-selection';
4
4
  export declare const FORMATTING_NODE_TYPES: string[];
5
5
  export declare const FORMATTING_MARK_TYPES: string[];
6
6
  export declare const formatTypes: Record<string, string>;
@@ -1,3 +1,3 @@
1
- import { type EditorCommand } from '@atlaskit/editor-common/types';
1
+ import type { EditorCommand } from '@atlaskit/editor-common/types';
2
2
  import type { NodeType } from '@atlaskit/editor-prosemirror/model';
3
3
  export declare function wrapSelectionInBlockType(nodeType: NodeType): EditorCommand;
@@ -2,7 +2,8 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import React, { type ReactElement } from 'react';
5
+ import React from 'react';
6
+ import type { ReactElement } from 'react';
6
7
  import { jsx } from '@emotion/react';
7
8
  import type { MessageDescriptor, WrappedComponentProps } from 'react-intl-next';
8
9
  export interface BlockTypeButtonProps {
@@ -7,7 +7,8 @@ import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
7
7
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
8
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
9
9
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
10
- import { ThemeMutationObserver, type ThemeState } from '@atlaskit/tokens';
10
+ import { ThemeMutationObserver } from '@atlaskit/tokens';
11
+ import type { ThemeState } from '@atlaskit/tokens';
11
12
  import type { BlockTypePlugin } from '../../../blockTypePluginType';
12
13
  import type { TextBlockTypes } from '../../block-types';
13
14
  import type { BlockType } from '../../types';
@@ -1,3 +1,3 @@
1
- import { type BlockTypePlugin } from './blockTypePluginType';
1
+ import type { BlockTypePlugin } from './blockTypePluginType';
2
2
  declare const blockTypePlugin: BlockTypePlugin;
3
3
  export { blockTypePlugin };
@@ -1,6 +1,6 @@
1
1
  import type { Node, NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import { type CellSelection } from '@atlaskit/editor-tables/cell-selection';
3
+ import type { CellSelection } from '@atlaskit/editor-tables/cell-selection';
4
4
  export declare const FORMATTING_NODE_TYPES: string[];
5
5
  export declare const FORMATTING_MARK_TYPES: string[];
6
6
  export declare const formatTypes: Record<string, string>;
@@ -1,3 +1,3 @@
1
- import { type EditorCommand } from '@atlaskit/editor-common/types';
1
+ import type { EditorCommand } from '@atlaskit/editor-common/types';
2
2
  import type { NodeType } from '@atlaskit/editor-prosemirror/model';
3
3
  export declare function wrapSelectionInBlockType(nodeType: NodeType): EditorCommand;
@@ -2,7 +2,8 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import React, { type ReactElement } from 'react';
5
+ import React from 'react';
6
+ import type { ReactElement } from 'react';
6
7
  import { jsx } from '@emotion/react';
7
8
  import type { MessageDescriptor, WrappedComponentProps } from 'react-intl-next';
8
9
  export interface BlockTypeButtonProps {
@@ -7,7 +7,8 @@ import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
7
7
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
8
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
9
9
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
10
- import { ThemeMutationObserver, type ThemeState } from '@atlaskit/tokens';
10
+ import { ThemeMutationObserver } from '@atlaskit/tokens';
11
+ import type { ThemeState } from '@atlaskit/tokens';
11
12
  import type { BlockTypePlugin } from '../../../blockTypePluginType';
12
13
  import type { TextBlockTypes } from '../../block-types';
13
14
  import type { BlockType } from '../../types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "12.1.13",
3
+ "version": "12.1.15",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/editor-plugin-list": "^10.1.0",
37
37
  "@atlaskit/editor-plugin-primary-toolbar": "^9.0.0",
38
38
  "@atlaskit/editor-plugin-selection": "^8.0.0",
39
- "@atlaskit/editor-plugin-selection-toolbar": "^9.0.0",
39
+ "@atlaskit/editor-plugin-selection-toolbar": "^9.1.0",
40
40
  "@atlaskit/editor-plugin-toolbar": "^5.1.0",
41
41
  "@atlaskit/editor-prosemirror": "^7.3.0",
42
42
  "@atlaskit/editor-shared-styles": "^3.10.0",
@@ -49,14 +49,14 @@
49
49
  "@atlaskit/primitives": "^18.1.0",
50
50
  "@atlaskit/prosemirror-history": "^0.2.0",
51
51
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
52
- "@atlaskit/tmp-editor-statsig": "^47.0.0",
52
+ "@atlaskit/tmp-editor-statsig": "^48.0.0",
53
53
  "@atlaskit/tokens": "^11.3.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.10.0",
59
+ "@atlaskit/editor-common": "^112.11.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"
@@ -118,9 +118,6 @@
118
118
  "platform_editor_use_preferences_plugin": {
119
119
  "type": "boolean"
120
120
  },
121
- "platform_editor_fix_insert_paragraph_undo": {
122
- "type": "boolean"
123
- },
124
121
  "platform_editor_adf_with_localid": {
125
122
  "type": "boolean"
126
123
  }