@atlaskit/editor-plugin-highlight 7.3.7 → 7.3.8

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,13 @@
1
1
  # @atlaskit/editor-plugin-highlight
2
2
 
3
+ ## 7.3.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9da7abaf781fa`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9da7abaf781fa) -
8
+ [ux] clean up platform_editor_text_highlight_padding
9
+ - Updated dependencies
10
+
3
11
  ## 7.3.7
4
12
 
5
13
  ### Patch Changes
@@ -8,7 +8,6 @@ exports.highlightPlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _adfSchema = require("@atlaskit/adf-schema");
10
10
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
11
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
12
  var _changeColor = require("./editor-commands/change-color");
14
13
  var _highlightPadding = require("./pm-plugins/highlight-padding");
@@ -19,8 +18,7 @@ var _PrimaryToolbarHighlightColor = require("./ui/PrimaryToolbarHighlightColor")
19
18
  var _toolbarComponent = require("./ui/toolbar-component");
20
19
  var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
21
20
  var _api$analytics;
22
- var api = _ref.api,
23
- options = _ref.config;
21
+ var api = _ref.api;
24
22
  var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
25
23
  var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
26
24
  var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
@@ -79,15 +77,12 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
79
77
  api: api
80
78
  });
81
79
  }
80
+ }, {
81
+ name: 'highlightPadding',
82
+ plugin: function plugin() {
83
+ return (0, _highlightPadding.createHighlightPaddingPlugin)();
84
+ }
82
85
  }];
83
- if ((0, _expValEquals.expValEquals)('platform_editor_text_highlight_padding', 'isEnabled', true)) {
84
- plugins.push({
85
- name: 'highlightPadding',
86
- plugin: function plugin() {
87
- return (0, _highlightPadding.createHighlightPaddingPlugin)();
88
- }
89
- });
90
- }
91
86
  return plugins;
92
87
  },
93
88
  getSharedState: function getSharedState(editorState) {
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { backgroundColor } from '@atlaskit/adf-schema';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
5
  import { changeColor } from './editor-commands/change-color';
7
6
  import { createHighlightPaddingPlugin } from './pm-plugins/highlight-padding';
@@ -11,8 +10,7 @@ import { FloatingToolbarHighlightColorWithIntl as FloatingToolbarHighlightColor
11
10
  import { PrimaryToolbarHighlightColorWithIntl as PrimaryToolbarHighlightColor } from './ui/PrimaryToolbarHighlightColor';
12
11
  import { getToolbarComponent } from './ui/toolbar-component';
13
12
  export const highlightPlugin = ({
14
- api,
15
- config: options
13
+ api
16
14
  }) => {
17
15
  var _api$analytics;
18
16
  const editorAnalyticsAPI = api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
@@ -70,13 +68,10 @@ export const highlightPlugin = ({
70
68
  plugin: () => keymapPlugin({
71
69
  api
72
70
  })
71
+ }, {
72
+ name: 'highlightPadding',
73
+ plugin: () => createHighlightPaddingPlugin()
73
74
  }];
74
- if (expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true)) {
75
- plugins.push({
76
- name: 'highlightPadding',
77
- plugin: () => createHighlightPaddingPlugin()
78
- });
79
- }
80
75
  return plugins;
81
76
  },
82
77
  getSharedState(editorState) {
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { backgroundColor } from '@atlaskit/adf-schema';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
5
  import { changeColor } from './editor-commands/change-color';
7
6
  import { createHighlightPaddingPlugin } from './pm-plugins/highlight-padding';
@@ -12,8 +11,7 @@ import { PrimaryToolbarHighlightColorWithIntl as PrimaryToolbarHighlightColor }
12
11
  import { getToolbarComponent } from './ui/toolbar-component';
13
12
  export var highlightPlugin = function highlightPlugin(_ref) {
14
13
  var _api$analytics;
15
- var api = _ref.api,
16
- options = _ref.config;
14
+ var api = _ref.api;
17
15
  var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
18
16
  var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
19
17
  var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
@@ -72,15 +70,12 @@ export var highlightPlugin = function highlightPlugin(_ref) {
72
70
  api: api
73
71
  });
74
72
  }
73
+ }, {
74
+ name: 'highlightPadding',
75
+ plugin: function plugin() {
76
+ return createHighlightPaddingPlugin();
77
+ }
75
78
  }];
76
- if (expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true)) {
77
- plugins.push({
78
- name: 'highlightPadding',
79
- plugin: function plugin() {
80
- return createHighlightPaddingPlugin();
81
- }
82
- });
83
- }
84
79
  return plugins;
85
80
  },
86
81
  getSharedState: function getSharedState(editorState) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-highlight",
3
- "version": "7.3.7",
3
+ "version": "7.3.8",
4
4
  "description": "Highlight plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/icon": "^30.0.0",
50
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
51
51
  "@atlaskit/primitives": "^18.0.0",
52
- "@atlaskit/tmp-editor-statsig": "^20.0.0",
52
+ "@atlaskit/tmp-editor-statsig": "^20.2.0",
53
53
  "@atlaskit/tokens": "^11.0.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1"