@atlaskit/editor-plugin-highlight 15.0.8 → 15.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 +13 -0
- package/dist/cjs/editor-commands/change-color.js +2 -1
- package/dist/cjs/highlightPlugin.js +2 -1
- package/dist/es2019/editor-commands/change-color.js +2 -1
- package/dist/es2019/highlightPlugin.js +2 -1
- package/dist/esm/editor-commands/change-color.js +2 -1
- package/dist/esm/highlightPlugin.js +2 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-highlight
|
|
2
2
|
|
|
3
|
+
## 15.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a285770e5decb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a285770e5decb) -
|
|
8
|
+
Use @atlaskit/platform-feature-experiments directly for platform_editor_ai_move_node,
|
|
9
|
+
platform_editor_confluence_base_preset, platform_editor_inline_media_replacement, and
|
|
10
|
+
platform_editor_lovability_color_schema_change.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 15.0.8
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -8,6 +8,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
8
8
|
var _mark = require("@atlaskit/editor-common/mark");
|
|
9
9
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
10
10
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
11
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
11
12
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
13
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
13
14
|
var _main = require("../pm-plugins/main");
|
|
@@ -35,7 +36,7 @@ var changeColor = exports.changeColor = function changeColor(editorAnalyticsAPI)
|
|
|
35
36
|
tr: tr
|
|
36
37
|
});
|
|
37
38
|
} else {
|
|
38
|
-
if ((0,
|
|
39
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_color_schema_change') && !(0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
39
40
|
var overrideMarks = ['textColor'];
|
|
40
41
|
overrideMarks.forEach(function (mark) {
|
|
41
42
|
if (marks[mark]) {
|
|
@@ -8,6 +8,7 @@ exports.highlightPlugin = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
11
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
11
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
14
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -58,7 +59,7 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
|
|
|
58
59
|
return {
|
|
59
60
|
name: 'highlight',
|
|
60
61
|
marks: function marks() {
|
|
61
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) || (0,
|
|
62
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_color_schema_change')) {
|
|
62
63
|
return [{
|
|
63
64
|
name: 'backgroundColor',
|
|
64
65
|
mark: _adfSchema.backgroundColor
|
|
@@ -2,6 +2,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit
|
|
|
2
2
|
import { removeMark, toggleMark } from '@atlaskit/editor-common/mark';
|
|
3
3
|
import { FORMAT_SELECTION_SYNC_META } from '@atlaskit/editor-common/selection';
|
|
4
4
|
import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette, highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
|
|
5
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
7
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
8
|
import { HighlightPluginAction, highlightPluginKey } from '../pm-plugins/main';
|
|
@@ -33,7 +34,7 @@ export const changeColor = editorAnalyticsAPI => ({
|
|
|
33
34
|
tr
|
|
34
35
|
});
|
|
35
36
|
} else {
|
|
36
|
-
if (
|
|
37
|
+
if (isExperimentEnabled('platform_editor_lovability_color_schema_change') && !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
37
38
|
const overrideMarks = ['textColor'];
|
|
38
39
|
overrideMarks.forEach(mark => {
|
|
39
40
|
if (marks[mark]) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { backgroundColor } from '@atlaskit/adf-schema';
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -50,7 +51,7 @@ export const highlightPlugin = ({
|
|
|
50
51
|
return {
|
|
51
52
|
name: 'highlight',
|
|
52
53
|
marks() {
|
|
53
|
-
if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) ||
|
|
54
|
+
if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) || isExperimentEnabled('platform_editor_lovability_color_schema_change')) {
|
|
54
55
|
return [{
|
|
55
56
|
name: 'backgroundColor',
|
|
56
57
|
mark: backgroundColor
|
|
@@ -2,6 +2,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit
|
|
|
2
2
|
import { removeMark, toggleMark } from '@atlaskit/editor-common/mark';
|
|
3
3
|
import { FORMAT_SELECTION_SYNC_META } from '@atlaskit/editor-common/selection';
|
|
4
4
|
import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette, highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
|
|
5
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
7
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
8
|
import { HighlightPluginAction, highlightPluginKey } from '../pm-plugins/main';
|
|
@@ -29,7 +30,7 @@ export var changeColor = function changeColor(editorAnalyticsAPI) {
|
|
|
29
30
|
tr: tr
|
|
30
31
|
});
|
|
31
32
|
} else {
|
|
32
|
-
if (
|
|
33
|
+
if (isExperimentEnabled('platform_editor_lovability_color_schema_change') && !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
33
34
|
var overrideMarks = ['textColor'];
|
|
34
35
|
overrideMarks.forEach(function (mark) {
|
|
35
36
|
if (marks[mark]) {
|
|
@@ -3,6 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { backgroundColor } from '@atlaskit/adf-schema';
|
|
6
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -51,7 +52,7 @@ export var highlightPlugin = function highlightPlugin(_ref) {
|
|
|
51
52
|
return {
|
|
52
53
|
name: 'highlight',
|
|
53
54
|
marks: function marks() {
|
|
54
|
-
if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) ||
|
|
55
|
+
if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) || isExperimentEnabled('platform_editor_lovability_color_schema_change')) {
|
|
55
56
|
return [{
|
|
56
57
|
name: 'backgroundColor',
|
|
57
58
|
mark: backgroundColor
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-highlight",
|
|
3
|
-
"version": "15.0
|
|
3
|
+
"version": "15.1.0",
|
|
4
4
|
"description": "Highlight plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,9 +39,10 @@
|
|
|
39
39
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
40
40
|
"@atlaskit/heading": "^7.0.0",
|
|
41
41
|
"@atlaskit/icon": "^37.4.0",
|
|
42
|
+
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
42
43
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
43
44
|
"@atlaskit/primitives": "^22.3.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^155.0.0",
|
|
45
46
|
"@atlaskit/tokens": "^16.7.0",
|
|
46
47
|
"@babel/runtime": "^7.0.0",
|
|
47
48
|
"@emotion/react": "^11.7.1"
|