@atlaskit/editor-plugin-highlight 1.14.3 → 1.16.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,29 @@
1
1
  # @atlaskit/editor-plugin-highlight
2
2
 
3
+ ## 1.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0605ac78bd8a6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0605ac78bd8a6) -
8
+ [ED-23398] Deleted background color plugin and moved background-color mark into the highlight
9
+ plugin
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 1.15.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#133191](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/133191)
20
+ [`78a1927084934`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/78a1927084934) -
21
+ [ux] Remove icon migration feature gate and migrate new icons on primary toolbar
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies
26
+
3
27
  ## 1.14.3
4
28
 
5
29
  ### Patch Changes
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.highlightPlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
+ var _adfSchema = require("@atlaskit/adf-schema");
9
10
  var _commands = require("./commands");
10
11
  var _keymap = require("./pm-plugins/keymap");
11
12
  var _main = require("./pm-plugins/main");
@@ -39,6 +40,12 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
39
40
  });
40
41
  return {
41
42
  name: 'highlight',
43
+ marks: function marks() {
44
+ return [{
45
+ name: 'backgroundColor',
46
+ mark: _adfSchema.backgroundColor
47
+ }];
48
+ },
42
49
  commands: {
43
50
  changeColor: (0, _commands.changeColor)(editorAnalyticsAPI)
44
51
  },
@@ -15,7 +15,7 @@ var _messages = require("@atlaskit/editor-common/messages");
15
15
  var _styles = require("@atlaskit/editor-common/styles");
16
16
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
17
17
  var _editorPalette = require("@atlaskit/editor-palette");
18
- var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
18
+ var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
19
19
  var _primitives = require("@atlaskit/primitives");
20
20
  var _commands = require("../commands");
21
21
  var _EditorHighlightIcon = require("./shared/EditorHighlightIcon");
@@ -98,9 +98,12 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
98
98
  selectedColor: activeColorToken,
99
99
  disabled: highlightState.disabled
100
100
  }), (0, _react2.jsx)("span", {
101
- css: _styles.expandIconWrapperStyle
101
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
102
+ css: _styles.expandIconContainerStyle
102
103
  }, (0, _react2.jsx)(_chevronDown.default, {
103
- label: ""
104
+ label: "",
105
+ color: "currentColor",
106
+ LEGACY_margin: "0 0 0 -8px"
104
107
  })))
105
108
  }),
106
109
  onColorChange: function onColorChange(color) {
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { backgroundColor } from '@atlaskit/adf-schema';
2
3
  import { changeColor } from './commands';
3
4
  import { keymapPlugin } from './pm-plugins/keymap';
4
5
  import { createPlugin, highlightPluginKey } from './pm-plugins/main';
@@ -32,6 +33,12 @@ export const highlightPlugin = ({
32
33
  });
33
34
  return {
34
35
  name: 'highlight',
36
+ marks() {
37
+ return [{
38
+ name: 'backgroundColor',
39
+ mark: backgroundColor
40
+ }];
41
+ },
35
42
  commands: {
36
43
  changeColor: changeColor(editorAnalyticsAPI)
37
44
  },
@@ -11,10 +11,10 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
11
11
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
12
12
  import { getAriaKeyshortcuts, toggleHighlightPalette, tooltip } from '@atlaskit/editor-common/keymaps';
13
13
  import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
14
- import { expandIconWrapperStyle } from '@atlaskit/editor-common/styles';
14
+ import { expandIconContainerStyle } from '@atlaskit/editor-common/styles';
15
15
  import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
16
16
  import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
17
- import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
17
+ import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
18
18
  import { Flex } from '@atlaskit/primitives';
19
19
  import { setPalette } from '../commands';
20
20
  import { EditorHighlightIcon } from './shared/EditorHighlightIcon';
@@ -97,9 +97,12 @@ const PrimaryToolbarHighlightColor = ({
97
97
  selectedColor: activeColorToken,
98
98
  disabled: highlightState.disabled
99
99
  }), jsx("span", {
100
- css: expandIconWrapperStyle
101
- }, jsx(ExpandIcon, {
102
- label: ""
100
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
101
+ css: expandIconContainerStyle
102
+ }, jsx(ChevronDownIcon, {
103
+ label: "",
104
+ color: "currentColor",
105
+ LEGACY_margin: "0 0 0 -8px"
103
106
  })))
104
107
  }),
105
108
  onColorChange: color => handleColorChange({
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { backgroundColor } from '@atlaskit/adf-schema';
2
3
  import { changeColor } from './commands';
3
4
  import { keymapPlugin } from './pm-plugins/keymap';
4
5
  import { createPlugin, highlightPluginKey } from './pm-plugins/main';
@@ -32,6 +33,12 @@ export var highlightPlugin = function highlightPlugin(_ref) {
32
33
  });
33
34
  return {
34
35
  name: 'highlight',
36
+ marks: function marks() {
37
+ return [{
38
+ name: 'backgroundColor',
39
+ mark: backgroundColor
40
+ }];
41
+ },
35
42
  commands: {
36
43
  changeColor: changeColor(editorAnalyticsAPI)
37
44
  },
@@ -11,10 +11,10 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
11
11
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
12
12
  import { getAriaKeyshortcuts, toggleHighlightPalette, tooltip } from '@atlaskit/editor-common/keymaps';
13
13
  import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
14
- import { expandIconWrapperStyle } from '@atlaskit/editor-common/styles';
14
+ import { expandIconContainerStyle } from '@atlaskit/editor-common/styles';
15
15
  import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
16
16
  import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
17
- import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
17
+ import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
18
18
  import { Flex } from '@atlaskit/primitives';
19
19
  import { setPalette } from '../commands';
20
20
  import { EditorHighlightIcon } from './shared/EditorHighlightIcon';
@@ -90,9 +90,12 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
90
90
  selectedColor: activeColorToken,
91
91
  disabled: highlightState.disabled
92
92
  }), jsx("span", {
93
- css: expandIconWrapperStyle
94
- }, jsx(ExpandIcon, {
95
- label: ""
93
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
94
+ css: expandIconContainerStyle
95
+ }, jsx(ChevronDownIcon, {
96
+ label: "",
97
+ color: "currentColor",
98
+ LEGACY_margin: "0 0 0 -8px"
96
99
  })))
97
100
  }),
98
101
  onColorChange: function onColorChange(color) {
@@ -1,7 +1,6 @@
1
1
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
- import type { BackgroundColorPlugin } from '@atlaskit/editor-plugin-background-color';
5
4
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
6
5
  import type { TextFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
7
6
  import type { HighlightPluginState } from './pm-plugins/main';
@@ -11,7 +10,6 @@ export type HighlightPluginOptions = {
11
10
  export type HighlightPlugin = NextEditorPlugin<'highlight', {
12
11
  pluginConfiguration?: HighlightPluginOptions;
13
12
  dependencies: [
14
- BackgroundColorPlugin,
15
13
  OptionalPlugin<AnalyticsPlugin>,
16
14
  OptionalPlugin<TextFormattingPlugin>,
17
15
  OptionalPlugin<PrimaryToolbarPlugin>
@@ -1,7 +1,6 @@
1
1
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
- import type { BackgroundColorPlugin } from '@atlaskit/editor-plugin-background-color';
5
4
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
6
5
  import type { TextFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
7
6
  import type { HighlightPluginState } from './pm-plugins/main';
@@ -11,7 +10,6 @@ export type HighlightPluginOptions = {
11
10
  export type HighlightPlugin = NextEditorPlugin<'highlight', {
12
11
  pluginConfiguration?: HighlightPluginOptions;
13
12
  dependencies: [
14
- BackgroundColorPlugin,
15
13
  OptionalPlugin<AnalyticsPlugin>,
16
14
  OptionalPlugin<TextFormattingPlugin>,
17
15
  OptionalPlugin<PrimaryToolbarPlugin>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-highlight",
3
- "version": "1.14.3",
3
+ "version": "1.16.0",
4
4
  "description": "Highlight plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,16 +38,16 @@
38
38
  ".": "./src/index.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@atlaskit/editor-common": "^88.0.0",
41
+ "@atlaskit/adf-schema": "^40.8.1",
42
+ "@atlaskit/editor-common": "^88.1.0",
42
43
  "@atlaskit/editor-palette": "1.6.0",
43
44
  "@atlaskit/editor-plugin-analytics": "^1.8.0",
44
- "@atlaskit/editor-plugin-background-color": "^1.6.0",
45
45
  "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
46
- "@atlaskit/editor-plugin-text-formatting": "^1.13.0",
46
+ "@atlaskit/editor-plugin-text-formatting": "^1.14.0",
47
47
  "@atlaskit/editor-prosemirror": "5.0.1",
48
48
  "@atlaskit/editor-shared-styles": "^2.13.0",
49
49
  "@atlaskit/editor-tables": "^2.8.0",
50
- "@atlaskit/icon": "^22.14.0",
50
+ "@atlaskit/icon": "^22.15.0",
51
51
  "@atlaskit/primitives": "^12.0.0",
52
52
  "@atlaskit/tokens": "^1.59.0",
53
53
  "@babel/runtime": "^7.0.0",