@atlaskit/editor-plugin-highlight 1.12.0 → 1.12.2

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,20 @@
1
1
  # @atlaskit/editor-plugin-highlight
2
2
 
3
+ ## 1.12.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#116760](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116760)
8
+ [`2e309117f02c6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2e309117f02c6) -
9
+ [ED-23062] Clean up feature flag for highlight palette dark mode improvements
10
+ - Updated dependencies
11
+
12
+ ## 1.12.1
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 1.12.0
4
19
 
5
20
  ### Minor Changes
@@ -20,7 +20,6 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
20
20
  var _editorPalette = require("@atlaskit/editor-palette");
21
21
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
22
22
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
23
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
24
23
  var _primitives = require("@atlaskit/primitives");
25
24
  var _commands = require("../commands");
26
25
  var _EditorHighlightIcon = require("./shared/EditorHighlightIcon");
@@ -107,8 +106,7 @@ var ToolbarHighlightColor = function ToolbarHighlightColor(_ref) {
107
106
  // pixels, used to determine where to horizontally position the dropdown when space is limited
108
107
  // this should reflect the width of the dropdown when fully populated with colors, including translations due to layering
109
108
  var fitWidth = 242;
110
- var palette = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.dynamic-palette-borders') ? _uiColor.highlightColorPaletteWithTokenBorders : _uiColor.highlightColorPalette;
111
- var _getSelectedRowAndCol = (0, _uiColor.getSelectedRowAndColumnFromPalette)(palette, highlightState.activeColor),
109
+ var _getSelectedRowAndCol = (0, _uiColor.getSelectedRowAndColumnFromPalette)(_uiColor.highlightColorPalette, highlightState.activeColor),
112
110
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
113
111
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
114
112
  return (0, _react2.jsx)(_primitives.Flex, {
@@ -160,7 +158,7 @@ var ToolbarHighlightColor = function ToolbarHighlightColor(_ref) {
160
158
  },
161
159
  selectedColor: highlightState.activeColor,
162
160
  paletteOptions: {
163
- palette: palette,
161
+ palette: _uiColor.highlightColorPalette,
164
162
  hexToPaletteColor: _editorPalette.hexToEditorTextBackgroundPaletteColor
165
163
  }
166
164
  }))));
@@ -10,7 +10,6 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
10
10
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
11
11
  var _editorPalette = require("@atlaskit/editor-palette");
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var PaletteDropdown = exports.PaletteDropdown = function PaletteDropdown(props) {
15
14
  var popupsMountPoint = props.popupsMountPoint,
16
15
  popupsBoundariesElement = props.popupsBoundariesElement,
@@ -26,8 +25,7 @@ var PaletteDropdown = exports.PaletteDropdown = function PaletteDropdown(props)
26
25
  // pixels, used to determine where to horizontally position the dropdown when space is limited
27
26
  // this should reflect the width of the dropdown when fully populated with colors, including translations due to layering
28
27
  var fitWidth = 242;
29
- var palette = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.dynamic-palette-borders') ? _uiColor.highlightColorPaletteWithTokenBorders : _uiColor.highlightColorPalette;
30
- var _getSelectedRowAndCol = (0, _uiColor.getSelectedRowAndColumnFromPalette)(palette, activeColor),
28
+ var _getSelectedRowAndCol = (0, _uiColor.getSelectedRowAndColumnFromPalette)(_uiColor.highlightColorPalette, activeColor),
31
29
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
32
30
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
33
31
  return /*#__PURE__*/_react.default.createElement(_uiMenu.DropdownContainer, {
@@ -54,7 +52,7 @@ var PaletteDropdown = exports.PaletteDropdown = function PaletteDropdown(props)
54
52
  onClick: onColorChange,
55
53
  selectedColor: activeColor,
56
54
  paletteOptions: {
57
- palette: palette,
55
+ palette: _uiColor.highlightColorPalette,
58
56
  hexToPaletteColor: _editorPalette.hexToEditorTextBackgroundPaletteColor
59
57
  }
60
58
  })));
@@ -9,12 +9,11 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
9
9
  import { getAriaKeyshortcuts, toggleHighlightPalette, tooltip } from '@atlaskit/editor-common/keymaps';
10
10
  import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
11
11
  import { expandIconWrapperStyle } from '@atlaskit/editor-common/styles';
12
- import { ColorPalette, getSelectedRowAndColumnFromPalette, highlightColorPalette, highlightColorPaletteWithTokenBorders } from '@atlaskit/editor-common/ui-color';
12
+ import { ColorPalette, getSelectedRowAndColumnFromPalette, highlightColorPalette } from '@atlaskit/editor-common/ui-color';
13
13
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
14
14
  import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
15
15
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
16
16
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
17
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
18
17
  import { Flex } from '@atlaskit/primitives';
19
18
  import { changeColor, setPalette } from '../commands';
20
19
  import { EditorHighlightIcon } from './shared/EditorHighlightIcon';
@@ -96,11 +95,10 @@ const ToolbarHighlightColor = ({
96
95
  // pixels, used to determine where to horizontally position the dropdown when space is limited
97
96
  // this should reflect the width of the dropdown when fully populated with colors, including translations due to layering
98
97
  const fitWidth = 242;
99
- const palette = getBooleanFF('platform.editor.dynamic-palette-borders') ? highlightColorPaletteWithTokenBorders : highlightColorPalette;
100
98
  const {
101
99
  selectedRowIndex,
102
100
  selectedColumnIndex
103
- } = getSelectedRowAndColumnFromPalette(palette, highlightState.activeColor);
101
+ } = getSelectedRowAndColumnFromPalette(highlightColorPalette, highlightState.activeColor);
104
102
  return jsx(Flex, {
105
103
  alignItems: "center"
106
104
  }, jsx(Dropdown, {
@@ -148,7 +146,7 @@ const ToolbarHighlightColor = ({
148
146
  onClick: color => handleColorChange(color),
149
147
  selectedColor: highlightState.activeColor,
150
148
  paletteOptions: {
151
- palette,
149
+ palette: highlightColorPalette,
152
150
  hexToPaletteColor: hexToEditorTextBackgroundPaletteColor
153
151
  }
154
152
  }))));
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { ColorPalette, getSelectedRowAndColumnFromPalette, highlightColorPalette, highlightColorPaletteWithTokenBorders } from '@atlaskit/editor-common/ui-color';
2
+ import { ColorPalette, getSelectedRowAndColumnFromPalette, highlightColorPalette } from '@atlaskit/editor-common/ui-color';
3
3
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown } from '@atlaskit/editor-common/ui-menu';
4
4
  import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
5
5
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
6
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
6
  export const PaletteDropdown = props => {
8
7
  const {
9
8
  popupsMountPoint,
@@ -21,11 +20,10 @@ export const PaletteDropdown = props => {
21
20
  // pixels, used to determine where to horizontally position the dropdown when space is limited
22
21
  // this should reflect the width of the dropdown when fully populated with colors, including translations due to layering
23
22
  const fitWidth = 242;
24
- const palette = getBooleanFF('platform.editor.dynamic-palette-borders') ? highlightColorPaletteWithTokenBorders : highlightColorPalette;
25
23
  const {
26
24
  selectedRowIndex,
27
25
  selectedColumnIndex
28
- } = getSelectedRowAndColumnFromPalette(palette, activeColor);
26
+ } = getSelectedRowAndColumnFromPalette(highlightColorPalette, activeColor);
29
27
  return /*#__PURE__*/React.createElement(Dropdown, {
30
28
  mountTo: popupsMountPoint,
31
29
  boundariesElement: popupsBoundariesElement,
@@ -50,7 +48,7 @@ export const PaletteDropdown = props => {
50
48
  onClick: onColorChange,
51
49
  selectedColor: activeColor,
52
50
  paletteOptions: {
53
- palette,
51
+ palette: highlightColorPalette,
54
52
  hexToPaletteColor: hexToEditorTextBackgroundPaletteColor
55
53
  }
56
54
  })));
@@ -10,12 +10,11 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
10
10
  import { getAriaKeyshortcuts, toggleHighlightPalette, tooltip } from '@atlaskit/editor-common/keymaps';
11
11
  import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
12
12
  import { expandIconWrapperStyle } from '@atlaskit/editor-common/styles';
13
- import { ColorPalette, getSelectedRowAndColumnFromPalette, highlightColorPalette, highlightColorPaletteWithTokenBorders } from '@atlaskit/editor-common/ui-color';
13
+ import { ColorPalette, getSelectedRowAndColumnFromPalette, highlightColorPalette } from '@atlaskit/editor-common/ui-color';
14
14
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
15
15
  import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
16
16
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
17
17
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
18
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
19
18
  import { Flex } from '@atlaskit/primitives';
20
19
  import { changeColor, setPalette } from '../commands';
21
20
  import { EditorHighlightIcon } from './shared/EditorHighlightIcon';
@@ -96,8 +95,7 @@ var ToolbarHighlightColor = function ToolbarHighlightColor(_ref) {
96
95
  // pixels, used to determine where to horizontally position the dropdown when space is limited
97
96
  // this should reflect the width of the dropdown when fully populated with colors, including translations due to layering
98
97
  var fitWidth = 242;
99
- var palette = getBooleanFF('platform.editor.dynamic-palette-borders') ? highlightColorPaletteWithTokenBorders : highlightColorPalette;
100
- var _getSelectedRowAndCol = getSelectedRowAndColumnFromPalette(palette, highlightState.activeColor),
98
+ var _getSelectedRowAndCol = getSelectedRowAndColumnFromPalette(highlightColorPalette, highlightState.activeColor),
101
99
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
102
100
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
103
101
  return jsx(Flex, {
@@ -149,7 +147,7 @@ var ToolbarHighlightColor = function ToolbarHighlightColor(_ref) {
149
147
  },
150
148
  selectedColor: highlightState.activeColor,
151
149
  paletteOptions: {
152
- palette: palette,
150
+ palette: highlightColorPalette,
153
151
  hexToPaletteColor: hexToEditorTextBackgroundPaletteColor
154
152
  }
155
153
  }))));
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { ColorPalette, getSelectedRowAndColumnFromPalette, highlightColorPalette, highlightColorPaletteWithTokenBorders } from '@atlaskit/editor-common/ui-color';
2
+ import { ColorPalette, getSelectedRowAndColumnFromPalette, highlightColorPalette } from '@atlaskit/editor-common/ui-color';
3
3
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown } from '@atlaskit/editor-common/ui-menu';
4
4
  import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
5
5
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
6
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
6
  export var PaletteDropdown = function PaletteDropdown(props) {
8
7
  var popupsMountPoint = props.popupsMountPoint,
9
8
  popupsBoundariesElement = props.popupsBoundariesElement,
@@ -19,8 +18,7 @@ export var PaletteDropdown = function PaletteDropdown(props) {
19
18
  // pixels, used to determine where to horizontally position the dropdown when space is limited
20
19
  // this should reflect the width of the dropdown when fully populated with colors, including translations due to layering
21
20
  var fitWidth = 242;
22
- var palette = getBooleanFF('platform.editor.dynamic-palette-borders') ? highlightColorPaletteWithTokenBorders : highlightColorPalette;
23
- var _getSelectedRowAndCol = getSelectedRowAndColumnFromPalette(palette, activeColor),
21
+ var _getSelectedRowAndCol = getSelectedRowAndColumnFromPalette(highlightColorPalette, activeColor),
24
22
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
25
23
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
26
24
  return /*#__PURE__*/React.createElement(Dropdown, {
@@ -47,7 +45,7 @@ export var PaletteDropdown = function PaletteDropdown(props) {
47
45
  onClick: onColorChange,
48
46
  selectedColor: activeColor,
49
47
  paletteOptions: {
50
- palette: palette,
48
+ palette: highlightColorPalette,
51
49
  hexToPaletteColor: hexToEditorTextBackgroundPaletteColor
52
50
  }
53
51
  })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-highlight",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "description": "Highlight plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  ".": "./src/index.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@atlaskit/editor-common": "^83.6.0",
41
+ "@atlaskit/editor-common": "^84.2.0",
42
42
  "@atlaskit/editor-palette": "1.6.0",
43
43
  "@atlaskit/editor-plugin-analytics": "^1.4.0",
44
44
  "@atlaskit/editor-plugin-background-color": "^1.3.0",
@@ -47,9 +47,9 @@
47
47
  "@atlaskit/editor-prosemirror": "4.0.1",
48
48
  "@atlaskit/editor-shared-styles": "^2.12.0",
49
49
  "@atlaskit/editor-tables": "^2.7.4",
50
- "@atlaskit/icon": "^22.5.0",
50
+ "@atlaskit/icon": "^22.6.0",
51
51
  "@atlaskit/platform-feature-flags": "^0.3.0",
52
- "@atlaskit/primitives": "^10.0.0",
52
+ "@atlaskit/primitives": "^10.1.0",
53
53
  "@atlaskit/tokens": "^1.53.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1"
@@ -105,9 +105,6 @@
105
105
  }
106
106
  },
107
107
  "platform-feature-flags": {
108
- "platform.editor.dynamic-palette-borders": {
109
- "type": "boolean"
110
- },
111
108
  "platform.editor.refactor-highlight-toolbar_mo0pj": {
112
109
  "type": "boolean"
113
110
  },