@atlaskit/editor-plugin-highlight 2.5.9 → 2.6.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-highlight
|
|
2
2
|
|
|
3
|
+
## 2.6.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
|
## 2.5.9
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.highlightPlugin = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
12
|
var _changeColor = require("./editor-commands/change-color");
|
|
12
13
|
var _keymap = require("./pm-plugins/keymap");
|
|
@@ -75,8 +76,9 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
|
|
|
75
76
|
},
|
|
76
77
|
pluginsOptions: {
|
|
77
78
|
selectionToolbar: function selectionToolbar() {
|
|
78
|
-
var _api$selectionToolbar;
|
|
79
|
-
|
|
79
|
+
var _api$userPreferences, _api$selectionToolbar;
|
|
80
|
+
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;
|
|
81
|
+
if (toolbarDocking === 'none' && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
80
82
|
exposure: true
|
|
81
83
|
})) {
|
|
82
84
|
var toolbarCustom = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { backgroundColor } from '@atlaskit/adf-schema';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
5
|
import { changeColor } from './editor-commands/change-color';
|
|
5
6
|
import { keymapPlugin } from './pm-plugins/keymap';
|
|
@@ -64,8 +65,9 @@ export const highlightPlugin = ({
|
|
|
64
65
|
},
|
|
65
66
|
pluginsOptions: {
|
|
66
67
|
selectionToolbar() {
|
|
67
|
-
var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
|
68
|
-
|
|
68
|
+
var _api$userPreferences, _api$userPreferences$, _api$userPreferences$2, _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
|
69
|
+
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;
|
|
70
|
+
if (toolbarDocking === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
|
|
69
71
|
exposure: true
|
|
70
72
|
})) {
|
|
71
73
|
const toolbarCustom = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { backgroundColor } from '@atlaskit/adf-schema';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
5
|
import { changeColor } from './editor-commands/change-color';
|
|
5
6
|
import { keymapPlugin } from './pm-plugins/keymap';
|
|
@@ -68,8 +69,9 @@ export var highlightPlugin = function highlightPlugin(_ref) {
|
|
|
68
69
|
},
|
|
69
70
|
pluginsOptions: {
|
|
70
71
|
selectionToolbar: function selectionToolbar() {
|
|
71
|
-
var _api$selectionToolbar;
|
|
72
|
-
|
|
72
|
+
var _api$userPreferences, _api$selectionToolbar;
|
|
73
|
+
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;
|
|
74
|
+
if (toolbarDocking === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
|
|
73
75
|
exposure: true
|
|
74
76
|
})) {
|
|
75
77
|
var toolbarCustom = {
|
|
@@ -4,13 +4,15 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
|
4
4
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
5
5
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
6
6
|
import type { TextFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
|
|
7
|
+
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
|
7
8
|
import type { HighlightPluginState } from './pm-plugins/main';
|
|
8
9
|
export type HighlightPlugin = NextEditorPlugin<'highlight', {
|
|
9
10
|
dependencies: [
|
|
10
11
|
OptionalPlugin<AnalyticsPlugin>,
|
|
11
12
|
OptionalPlugin<TextFormattingPlugin>,
|
|
12
13
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
13
|
-
OptionalPlugin<SelectionToolbarPlugin
|
|
14
|
+
OptionalPlugin<SelectionToolbarPlugin>,
|
|
15
|
+
OptionalPlugin<UserPreferencesPlugin>
|
|
14
16
|
];
|
|
15
17
|
sharedState: HighlightPluginState | undefined;
|
|
16
18
|
commands: {
|
|
@@ -4,13 +4,15 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
|
4
4
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
5
5
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
6
6
|
import type { TextFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
|
|
7
|
+
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
|
7
8
|
import type { HighlightPluginState } from './pm-plugins/main';
|
|
8
9
|
export type HighlightPlugin = NextEditorPlugin<'highlight', {
|
|
9
10
|
dependencies: [
|
|
10
11
|
OptionalPlugin<AnalyticsPlugin>,
|
|
11
12
|
OptionalPlugin<TextFormattingPlugin>,
|
|
12
13
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
13
|
-
OptionalPlugin<SelectionToolbarPlugin
|
|
14
|
+
OptionalPlugin<SelectionToolbarPlugin>,
|
|
15
|
+
OptionalPlugin<UserPreferencesPlugin>
|
|
14
16
|
];
|
|
15
17
|
sharedState: HighlightPluginState | undefined;
|
|
16
18
|
commands: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-highlight",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Highlight plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
40
|
-
"@atlaskit/editor-common": "^106.
|
|
40
|
+
"@atlaskit/editor-common": "^106.7.0",
|
|
41
41
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
42
42
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
43
43
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
|
|
44
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^3.
|
|
45
|
-
"@atlaskit/editor-plugin-text-formatting": "^2.
|
|
44
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^3.7.0",
|
|
45
|
+
"@atlaskit/editor-plugin-text-formatting": "^2.3.0",
|
|
46
46
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
47
47
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
48
48
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
51
|
"@atlaskit/primitives": "^14.8.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
|
},
|
|
@@ -110,6 +110,9 @@
|
|
|
110
110
|
"type": "boolean",
|
|
111
111
|
"referenceOnly": "true"
|
|
112
112
|
},
|
|
113
|
+
"platform_editor_use_preferences_plugin": {
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
},
|
|
113
116
|
"platform-visual-refresh-icons": {
|
|
114
117
|
"type": "boolean"
|
|
115
118
|
}
|