@atlaskit/editor-plugin-block-type 5.1.26 → 5.2.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,17 @@
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
2
2
|
|
3
|
+
## 5.2.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [#158546](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/158546)
|
8
|
+
[`b7fe4e6f226f3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b7fe4e6f226f3) -
|
9
|
+
ED-27284 use user preferences plugin in editor preset.
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- Updated dependencies
|
14
|
+
|
3
15
|
## 5.1.26
|
4
16
|
|
5
17
|
### Patch Changes
|
@@ -208,8 +208,9 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
|
|
208
208
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined,
|
209
209
|
pluginsOptions: _objectSpread({
|
210
210
|
selectionToolbar: function selectionToolbar() {
|
211
|
-
var _api$selectionToolbar;
|
212
|
-
|
211
|
+
var _api$userPreferences, _api$selectionToolbar;
|
212
|
+
var toolbarDocking = (0, _platformFeatureFlags.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;
|
213
|
+
if (toolbarDocking === 'none' && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
213
214
|
exposure: true
|
214
215
|
})) {
|
215
216
|
var toolbarCustom = {
|
@@ -195,8 +195,9 @@ const blockTypePlugin = ({
|
|
195
195
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined,
|
196
196
|
pluginsOptions: {
|
197
197
|
selectionToolbar: () => {
|
198
|
-
var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
199
|
-
|
198
|
+
var _api$userPreferences, _api$userPreferences$, _api$userPreferences$2, _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
199
|
+
const toolbarDocking = fg('platform_editor_use_preferences_plugin') ? api === null || api === void 0 ? void 0 : (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 ? void 0 : (_api$userPreferences$ = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences$ === void 0 ? void 0 : (_api$userPreferences$2 = _api$userPreferences$.preferences) === null || _api$userPreferences$2 === void 0 ? void 0 : _api$userPreferences$2.toolbarDockingPosition : api === null || api === void 0 ? void 0 : (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 ? void 0 : (_api$selectionToolbar2 = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar2 === void 0 ? void 0 : (_api$selectionToolbar3 = _api$selectionToolbar2.currentState()) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.toolbarDocking;
|
200
|
+
if (toolbarDocking === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
|
200
201
|
exposure: true
|
201
202
|
})) {
|
202
203
|
const toolbarCustom = {
|
@@ -201,8 +201,9 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
|
|
201
201
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined,
|
202
202
|
pluginsOptions: _objectSpread({
|
203
203
|
selectionToolbar: function selectionToolbar() {
|
204
|
-
var _api$selectionToolbar;
|
205
|
-
|
204
|
+
var _api$userPreferences, _api$selectionToolbar;
|
205
|
+
var toolbarDocking = 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;
|
206
|
+
if (toolbarDocking === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
|
206
207
|
exposure: true
|
207
208
|
})) {
|
208
209
|
var toolbarCustom = {
|
@@ -2,6 +2,7 @@ import type { Command, EditorCommand, NextEditorPlugin, OptionalPlugin } from '@
|
|
2
2
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
3
3
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
4
4
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
5
|
+
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
5
6
|
import type { TextBlockTypes } from './pm-plugins/block-types';
|
6
7
|
import type { ClearFormattingInputMethod, InputMethod } from './pm-plugins/commands/block-type';
|
7
8
|
import type { BlockTypeState } from './pm-plugins/main';
|
@@ -11,7 +12,8 @@ export type BlockTypePlugin = NextEditorPlugin<'blockType', {
|
|
11
12
|
dependencies: [
|
12
13
|
OptionalPlugin<AnalyticsPlugin>,
|
13
14
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
14
|
-
OptionalPlugin<SelectionToolbarPlugin
|
15
|
+
OptionalPlugin<SelectionToolbarPlugin>,
|
16
|
+
OptionalPlugin<UserPreferencesPlugin>
|
15
17
|
];
|
16
18
|
sharedState: BlockTypeState | undefined;
|
17
19
|
actions: {
|
@@ -2,6 +2,7 @@ import type { Command, EditorCommand, NextEditorPlugin, OptionalPlugin } from '@
|
|
2
2
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
3
3
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
4
4
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
5
|
+
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
5
6
|
import type { TextBlockTypes } from './pm-plugins/block-types';
|
6
7
|
import type { ClearFormattingInputMethod, InputMethod } from './pm-plugins/commands/block-type';
|
7
8
|
import type { BlockTypeState } from './pm-plugins/main';
|
@@ -11,7 +12,8 @@ export type BlockTypePlugin = NextEditorPlugin<'blockType', {
|
|
11
12
|
dependencies: [
|
12
13
|
OptionalPlugin<AnalyticsPlugin>,
|
13
14
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
14
|
-
OptionalPlugin<SelectionToolbarPlugin
|
15
|
+
OptionalPlugin<SelectionToolbarPlugin>,
|
16
|
+
OptionalPlugin<UserPreferencesPlugin>
|
15
17
|
];
|
16
18
|
sharedState: BlockTypeState | undefined;
|
17
19
|
actions: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.2.0",
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
5
5
|
"author": "Atlassian Pty Ltd",
|
6
6
|
"license": "Apache-2.0",
|
@@ -36,10 +36,10 @@
|
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
38
|
"@atlaskit/adf-schema": "^47.6.0",
|
39
|
-
"@atlaskit/editor-common": "^106.
|
39
|
+
"@atlaskit/editor-common": "^106.7.0",
|
40
40
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
41
41
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
|
42
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^3.
|
42
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^3.7.0",
|
43
43
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
44
44
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
45
45
|
"@atlaskit/editor-tables": "^2.9.0",
|
@@ -50,7 +50,7 @@
|
|
50
50
|
"@atlaskit/prosemirror-input-rules": "^3.3.0",
|
51
51
|
"@atlaskit/theme": "^18.0.0",
|
52
52
|
"@atlaskit/tmp-editor-statsig": "^7.0.0",
|
53
|
-
"@atlaskit/tokens": "^5.
|
53
|
+
"@atlaskit/tokens": "^5.2.0",
|
54
54
|
"@babel/runtime": "^7.0.0",
|
55
55
|
"@emotion/react": "^11.7.1"
|
56
56
|
},
|
@@ -123,6 +123,9 @@
|
|
123
123
|
"platform_editor_comments_toolbar_responsiveness": {
|
124
124
|
"type": "boolean"
|
125
125
|
},
|
126
|
+
"platform_editor_use_preferences_plugin": {
|
127
|
+
"type": "boolean"
|
128
|
+
},
|
126
129
|
"platform_editor_controls_patch_4": {
|
127
130
|
"type": "boolean"
|
128
131
|
}
|