@atlaskit/editor-plugin-highlight 26.0.3 → 26.0.5

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/editor-commands/change-color.js +12 -10
  3. package/dist/cjs/editor-commands/disabled.js +1 -1
  4. package/dist/cjs/editor-commands/palette.js +5 -5
  5. package/dist/cjs/pm-plugins/keymap.js +9 -7
  6. package/dist/cjs/ui/FloatingToolbarHighlightColor.js +28 -26
  7. package/dist/cjs/ui/HighlightColorMenuItem.js +16 -13
  8. package/dist/cjs/ui/PrimaryToolbarHighlightColor.js +22 -20
  9. package/dist/cjs/ui/shared/EditorHighlightIcon.js +2 -2
  10. package/dist/cjs/ui/shared/PaletteDropdown.js +17 -12
  11. package/dist/cjs/ui/toolbar-component.js +5 -4
  12. package/dist/es2019/editor-commands/change-color.js +5 -3
  13. package/dist/es2019/editor-commands/disabled.js +1 -1
  14. package/dist/es2019/editor-commands/palette.js +1 -1
  15. package/dist/es2019/pm-plugins/keymap.js +6 -4
  16. package/dist/es2019/ui/FloatingToolbarHighlightColor.js +9 -7
  17. package/dist/es2019/ui/HighlightColorMenuItem.js +8 -5
  18. package/dist/es2019/ui/PrimaryToolbarHighlightColor.js +9 -7
  19. package/dist/es2019/ui/shared/EditorHighlightIcon.js +1 -1
  20. package/dist/es2019/ui/shared/PaletteDropdown.js +8 -4
  21. package/dist/es2019/ui/toolbar-component.js +2 -1
  22. package/dist/esm/editor-commands/change-color.js +5 -3
  23. package/dist/esm/editor-commands/disabled.js +1 -1
  24. package/dist/esm/editor-commands/palette.js +1 -1
  25. package/dist/esm/pm-plugins/keymap.js +6 -4
  26. package/dist/esm/ui/FloatingToolbarHighlightColor.js +9 -7
  27. package/dist/esm/ui/HighlightColorMenuItem.js +8 -5
  28. package/dist/esm/ui/PrimaryToolbarHighlightColor.js +9 -7
  29. package/dist/esm/ui/shared/EditorHighlightIcon.js +1 -1
  30. package/dist/esm/ui/shared/PaletteDropdown.js +8 -4
  31. package/dist/esm/ui/toolbar-component.js +2 -1
  32. package/dist/types/editor-commands/change-color.d.ts +3 -2
  33. package/dist/types/editor-commands/palette.d.ts +3 -2
  34. package/dist/types/highlightPluginType.d.ts +9 -8
  35. package/dist/types/pm-plugins/keymap.d.ts +1 -1
  36. package/dist/types/ui/FloatingToolbarHighlightColor.d.ts +2 -2
  37. package/dist/types/ui/HighlightColorMenuItem.d.ts +2 -2
  38. package/dist/types/ui/PrimaryToolbarHighlightColor.d.ts +1 -1
  39. package/dist/types/ui/shared/PaletteDropdown.d.ts +1 -1
  40. package/dist/types/ui/shared/useDropdownEvents.d.ts +3 -3
  41. package/dist/types/ui/toolbar-component.d.ts +2 -2
  42. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-highlight
2
2
 
3
+ ## 26.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 26.0.4
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 26.0.3
4
16
 
5
17
  ### Patch Changes
@@ -6,10 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.changeColor = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _analytics = require("@atlaskit/editor-common/analytics");
9
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
10
10
  var _mark = require("@atlaskit/editor-common/mark");
11
+ var _commands = require("@atlaskit/editor-common/mark/commands");
11
12
  var _selection = require("@atlaskit/editor-common/selection");
12
13
  var _uiColor = require("@atlaskit/editor-common/ui-color");
14
+ var _highlightColorPalette = require("@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette");
13
15
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
14
16
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
17
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
@@ -35,7 +37,7 @@ var changeColor = exports.changeColor = function changeColor(editorAnalyticsAPI)
35
37
  }
36
38
  editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(createAnalyticsEvent(color, inputMethod, tr))(tr);
37
39
  tr.scrollIntoView();
38
- if (color === _uiColor.REMOVE_HIGHLIGHT_COLOR) {
40
+ if (color === _highlightColorPalette.REMOVE_HIGHLIGHT_COLOR) {
39
41
  (0, _mark.removeMark)(backgroundColor)({
40
42
  tr: tr
41
43
  });
@@ -54,7 +56,7 @@ var changeColor = exports.changeColor = function changeColor(editorAnalyticsAPI)
54
56
  type: _main.HighlightPluginAction.CHANGE_COLOR,
55
57
  color: color
56
58
  });
57
- (0, _mark.toggleMark)(backgroundColor, {
59
+ (0, _commands.toggleMark)(backgroundColor, {
58
60
  color: color
59
61
  })({
60
62
  tr: tr
@@ -67,8 +69,8 @@ var changeColor = exports.changeColor = function changeColor(editorAnalyticsAPI)
67
69
  };
68
70
  var createAnalyticsEvent = function createAnalyticsEvent(color, inputMethod, tr) {
69
71
  var _getActiveColor;
70
- var previousColor = (_getActiveColor = (0, _color.getActiveColor)(tr)) !== null && _getActiveColor !== void 0 ? _getActiveColor : _uiColor.REMOVE_HIGHLIGHT_COLOR;
71
- var highlightPalette = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_text_bg_color', 'isEnabled', true) ? _uiColor.highlightColorPaletteNew : _uiColor.highlightColorPalette;
72
+ var previousColor = (_getActiveColor = (0, _color.getActiveColor)(tr)) !== null && _getActiveColor !== void 0 ? _getActiveColor : _highlightColorPalette.REMOVE_HIGHLIGHT_COLOR;
73
+ var highlightPalette = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_text_bg_color', 'isEnabled', true) ? _uiColor.highlightColorPaletteNew : _highlightColorPalette.highlightColorPalette;
72
74
 
73
75
  // get color names from palette
74
76
  var newColorFromPalette = highlightPalette.find(function (_ref3) {
@@ -85,14 +87,14 @@ var createAnalyticsEvent = function createAnalyticsEvent(color, inputMethod, tr)
85
87
  textColor = _tr$doc$type$schema$m.textColor,
86
88
  link = _tr$doc$type$schema$m.link;
87
89
  return {
88
- action: _analytics.ACTION.FORMATTED,
89
- actionSubject: _analytics.ACTION_SUBJECT.TEXT,
90
- actionSubjectId: _analytics.ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR,
91
- eventType: _analytics.EVENT_TYPE.TRACK,
90
+ action: _enums.ACTION.FORMATTED,
91
+ actionSubject: _enums.ACTION_SUBJECT.TEXT,
92
+ actionSubjectId: _enums.ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR,
93
+ eventType: _enums.EVENT_TYPE.TRACK,
92
94
  attributes: _objectSpread({
93
95
  newColor: newColorLabel.toLowerCase(),
94
96
  previousColor: previousColorLabel ? previousColorLabel.toLowerCase() : '',
95
97
  inputMethod: inputMethod
96
- }, color === _uiColor.REMOVE_HIGHLIGHT_COLOR ? {} : (0, _mark.getHadMarkAttributes)(tr, [textColor, link]))
98
+ }, color === _highlightColorPalette.REMOVE_HIGHLIGHT_COLOR ? {} : (0, _mark.getHadMarkAttributes)(tr, [textColor, link]))
97
99
  };
98
100
  };
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getDisabledState = void 0;
7
7
  var _mark = require("@atlaskit/editor-common/mark");
8
- var _selection = require("@atlaskit/editor-common/selection");
8
+ var _selection = require("@atlaskit/editor-common/selection/gap-cursor/selection");
9
9
  var _state = require("@atlaskit/editor-prosemirror/state");
10
10
  var getDisabledState = exports.getDisabledState = function getDisabledState(state) {
11
11
  var backgroundColor = state.schema.marks.backgroundColor;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.togglePalette = exports.setPalette = void 0;
7
- var _analytics = require("@atlaskit/editor-common/analytics");
7
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
8
8
  var _main = require("../pm-plugins/main");
9
9
  // oxlint-disable-next-line import/no-duplicates
10
10
 
@@ -48,10 +48,10 @@ var setPalette = exports.setPalette = function setPalette(api) {
48
48
  };
49
49
  var createAnalyticsEvent = function createAnalyticsEvent(isPaletteOpen, inputMethod) {
50
50
  return {
51
- action: isPaletteOpen ? _analytics.ACTION.OPENED : _analytics.ACTION.CLOSED,
52
- actionSubject: _analytics.ACTION_SUBJECT.TOOLBAR,
53
- actionSubjectId: _analytics.ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR,
54
- eventType: _analytics.EVENT_TYPE.TRACK,
51
+ action: isPaletteOpen ? _enums.ACTION.OPENED : _enums.ACTION.CLOSED,
52
+ actionSubject: _enums.ACTION_SUBJECT.TOOLBAR,
53
+ actionSubjectId: _enums.ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR,
54
+ eventType: _enums.EVENT_TYPE.TRACK,
55
55
  attributes: {
56
56
  inputMethod: inputMethod
57
57
  }
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.keymapPlugin = keymapPlugin;
7
- var _analytics = require("@atlaskit/editor-common/analytics");
7
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
8
+ var _keymap = require("@atlaskit/editor-common/keymap");
8
9
  var _keymaps = require("@atlaskit/editor-common/keymaps");
9
- var _preset = require("@atlaskit/editor-common/preset");
10
+ var _editorCommands = require("@atlaskit/editor-common/preset/editor-commands");
10
11
  var _uiColor = require("@atlaskit/editor-common/ui-color");
12
+ var _highlightColorPalette = require("@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette");
11
13
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
12
14
  var _changeColor = require("../editor-commands/change-color");
13
15
  var _palette = require("../editor-commands/palette");
@@ -24,11 +26,11 @@ function keymapPlugin(_ref) {
24
26
  // Ignored via go/ees005
25
27
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
26
28
  (0, _palette.togglePalette)(api)({
27
- inputMethod: _analytics.INPUT_METHOD.SHORTCUT
29
+ inputMethod: _enums.INPUT_METHOD.SHORTCUT
28
30
  }), list);
29
31
  }
30
32
  var analyticsApi = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
31
- var highlightPalette = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_text_bg_color', 'isEnabled', true) ? _uiColor.highlightColorPaletteNew : _uiColor.highlightColorPalette;
33
+ var highlightPalette = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_text_bg_color', 'isEnabled', true) ? _uiColor.highlightColorPaletteNew : _highlightColorPalette.highlightColorPalette;
32
34
  var color = highlightPalette.find(function (_ref2) {
33
35
  var label = _ref2.label;
34
36
  return label === 'Yellow';
@@ -37,10 +39,10 @@ function keymapPlugin(_ref) {
37
39
  (0, _keymaps.bindKeymapWithCommand)(
38
40
  // Ignored via go/ees005
39
41
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
40
- _keymaps.applyYellowHighlight.common, (0, _preset.editorCommandToPMCommand)((0, _changeColor.changeColor)(analyticsApi)({
42
+ _keymaps.applyYellowHighlight.common, (0, _editorCommands.editorCommandToPMCommand)((0, _changeColor.changeColor)(analyticsApi)({
41
43
  color: color.value,
42
- inputMethod: _analytics.INPUT_METHOD.SHORTCUT
44
+ inputMethod: _enums.INPUT_METHOD.SHORTCUT
43
45
  })), list);
44
46
  }
45
- return (0, _keymaps.keymap)(list);
47
+ return (0, _keymap.keymap)(list);
46
48
  }
@@ -8,16 +8,18 @@ exports.FloatingToolbarHighlightColorWithIntl = void 0;
8
8
  var _react = require("react");
9
9
  var _react2 = require("@emotion/react");
10
10
  var _reactIntl = require("react-intl");
11
- var _analytics = require("@atlaskit/editor-common/analytics");
12
- var _hooks = require("@atlaskit/editor-common/hooks");
13
- var _icons = require("@atlaskit/editor-common/icons");
11
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
12
+ var _toolbarButton = require("@atlaskit/editor-common/analytics/types/toolbar-button");
13
+ var _DynamicStrokeIconDecoration = require("@atlaskit/editor-common/icons/DynamicStrokeIconDecoration");
14
14
  var _keymaps = require("@atlaskit/editor-common/keymaps");
15
- var _messages = require("@atlaskit/editor-common/messages");
16
- var _styles = require("@atlaskit/editor-common/styles");
17
- var _uiMenu = require("@atlaskit/editor-common/ui-menu");
18
- var _editorPalette = require("@atlaskit/editor-palette");
15
+ var _highlight = require("@atlaskit/editor-common/messages/highlight");
16
+ var _expand = require("@atlaskit/editor-common/styles/expand");
17
+ var _plugins = require("@atlaskit/editor-common/styles/plugins");
18
+ var _ToolbarButton = _interopRequireDefault(require("@atlaskit/editor-common/ui-menu/ToolbarButton"));
19
+ var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
20
+ var _textBackgroundColor = require("@atlaskit/editor-palette/text-background-color");
19
21
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
20
- var _highlight = _interopRequireDefault(require("@atlaskit/icon/core/highlight"));
22
+ var _highlight2 = _interopRequireDefault(require("@atlaskit/icon/core/highlight"));
21
23
  var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
22
24
  var _palette = require("../editor-commands/palette");
23
25
  var _PaletteDropdown = require("./shared/PaletteDropdown");
@@ -42,7 +44,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
42
44
  formatMessage = _ref.intl.formatMessage,
43
45
  editorView = _ref.editorView;
44
46
  var toolbarItemRef = (0, _react.useRef)(null);
45
- var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, ['highlight'], selector),
47
+ var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(pluginInjectionApi, ['highlight'], selector),
46
48
  activeColor = _useSharedPluginState.activeColor,
47
49
  disabled = _useSharedPluginState.disabled,
48
50
  isPaletteOpen = _useSharedPluginState.isPaletteOpen;
@@ -53,16 +55,16 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
53
55
  dispatch = editorView.dispatch;
54
56
  (0, _palette.setPalette)(pluginInjectionApi)({
55
57
  isPaletteOpen: isOpen,
56
- inputMethod: _analytics.INPUT_METHOD.FLOATING_TB
58
+ inputMethod: _enums.INPUT_METHOD.FLOATING_TB
57
59
  })(state, dispatch);
58
60
  }
59
61
  pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 || _pluginInjectionApi$a.actions.fireAnalyticsEvent({
60
- action: isOpen ? _analytics.ACTION.OPENED : _analytics.ACTION.CLOSED,
61
- actionSubject: _analytics.ACTION_SUBJECT.TOOLBAR,
62
- actionSubjectId: _analytics.ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR,
63
- eventType: _analytics.EVENT_TYPE.TRACK,
62
+ action: isOpen ? _enums.ACTION.OPENED : _enums.ACTION.CLOSED,
63
+ actionSubject: _enums.ACTION_SUBJECT.TOOLBAR,
64
+ actionSubjectId: _enums.ACTION_SUBJECT_ID.FORMAT_BACKGROUND_COLOR,
65
+ eventType: _enums.EVENT_TYPE.TRACK,
64
66
  attributes: {
65
- inputMethod: _analytics.INPUT_METHOD.FLOATING_TB
67
+ inputMethod: _enums.INPUT_METHOD.FLOATING_TB
66
68
  }
67
69
  });
68
70
  };
@@ -84,20 +86,20 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
84
86
  if (activeColor === undefined || disabled === undefined) {
85
87
  return null;
86
88
  }
87
- var toolbarButtonLabel = formatMessage(_messages.highlightMessages.highlight);
89
+ var toolbarButtonLabel = formatMessage(_highlight.highlightMessages.highlight);
88
90
 
89
91
  // Get the design token for the active color (if it exists) to modify the toolbar
90
92
  // icon, but show the nice rainbow if none is selected
91
- var activeColorToken = activeColor === null ? null : (0, _editorPalette.hexToEditorTextBackgroundPaletteColor)(activeColor);
93
+ var activeColorToken = activeColor === null ? null : (0, _textBackgroundColor.hexToEditorTextBackgroundPaletteColor)(activeColor);
92
94
  var title = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? (0, _keymaps.tooltip)(_keymaps.toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
93
95
  return (0, _react2.jsx)(_PaletteDropdown.PaletteDropdown, {
94
96
  isOpen: isDropdownOpen && !disabled,
95
97
  activeColor: activeColor,
96
- trigger: (0, _react2.jsx)(_uiMenu.ToolbarButton
98
+ trigger: (0, _react2.jsx)(_ToolbarButton.default
97
99
  // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides, @atlaskit/ui-styling-standard/no-imported-style-values
98
100
  , {
99
- css: _styles.disableBlueBorderStyles,
100
- buttonId: _uiMenu.TOOLBAR_BUTTON.BACKGROUND_COLOR,
101
+ css: _plugins.disableBlueBorderStyles,
102
+ buttonId: _toolbarButton.TOOLBAR_ACTION_SUBJECT_ID.BACKGROUND_COLOR,
101
103
  spacing: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? 'default' : 'compact',
102
104
  disabled: disabled,
103
105
  selected: isDropdownOpen,
@@ -112,11 +114,11 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
112
114
  iconBefore:
113
115
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
114
116
  (0, _react2.jsx)("div", {
115
- css: _styles.triggerWrapperStylesWithPadding
116
- }, (0, _react2.jsx)(_icons.DynamicStrokeIconDecoration, {
117
+ css: _plugins.triggerWrapperStylesWithPadding
118
+ }, (0, _react2.jsx)(_DynamicStrokeIconDecoration.DynamicStrokeIconDecoration, {
117
119
  selectedColor: activeColorToken,
118
120
  disabled: disabled,
119
- icon: (0, _react2.jsx)(_highlight.default, {
121
+ icon: (0, _react2.jsx)(_highlight2.default, {
120
122
  label: "",
121
123
  color: "currentColor",
122
124
  spacing: "spacious"
@@ -124,19 +126,19 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
124
126
  }),
125
127
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
126
128
  (0, _react2.jsx)("span", {
127
- css: _styles.expandIconContainerStyle
129
+ css: _expand.expandIconContainerStyle
128
130
  }, (0, _react2.jsx)(_chevronDown.default, {
129
131
  label: "",
130
132
  color: "currentColor",
131
133
  size: "small"
132
134
  })))
133
- }, (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'control') && formatMessage(_messages.highlightMessages.highlightFloatingToolbar))
135
+ }, (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'control') && formatMessage(_highlight.highlightMessages.highlightFloatingToolbar))
134
136
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
135
137
  ,
136
138
  onColorChange: function onColorChange(color) {
137
139
  return handleColorChange({
138
140
  color: color,
139
- inputMethod: _analytics.INPUT_METHOD.FLOATING_TB
141
+ inputMethod: _enums.INPUT_METHOD.FLOATING_TB
140
142
  });
141
143
  },
142
144
  isOpenedByKeyboard: isOpenedByKeyboard,
@@ -14,12 +14,15 @@ var _runtime = require("@compiled/react/runtime");
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _reactIntl = require("react-intl");
16
16
  var _css = require("@atlaskit/css");
17
- var _messages = require("@atlaskit/editor-common/messages");
17
+ var _highlight = require("@atlaskit/editor-common/messages/highlight");
18
18
  var _toolbar = require("@atlaskit/editor-common/toolbar");
19
19
  var _uiColor = require("@atlaskit/editor-common/ui-color");
20
- var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
21
- var _editorPalette = require("@atlaskit/editor-palette");
22
- var _editorToolbar = require("@atlaskit/editor-toolbar");
20
+ var _highlightColorPalette = require("@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette");
21
+ var _useSharedPluginStateSelector = require("@atlaskit/editor-common/useSharedPluginStateSelector");
22
+ var _text = require("@atlaskit/editor-palette/text");
23
+ var _textBackgroundColor = require("@atlaskit/editor-palette/text-background-color");
24
+ var _colorPalette = require("@atlaskit/editor-toolbar/color-palette");
25
+ var _toolbarDropdownMenuContext = require("@atlaskit/editor-toolbar/toolbar-dropdown-menu-context");
23
26
  var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
24
27
  var _checkMark = _interopRequireDefault(require("@atlaskit/icon/core/check-mark"));
25
28
  var _textStyle = _interopRequireDefault(require("@atlaskit/icon/core/text-style"));
@@ -42,7 +45,7 @@ var getTextColorIconColor = function getTextColorIconColor(defaultColor, textCol
42
45
  if (!textColor || defaultColor && textColor === defaultColor) {
43
46
  return "var(--ds-icon, #292A2E)";
44
47
  }
45
- return (0, _editorPalette.hexToEditorTextPaletteColor)(textColor) || "var(--ds-icon, #292A2E)";
48
+ return (0, _text.hexToEditorTextPaletteColor)(textColor) || "var(--ds-icon, #292A2E)";
46
49
  };
47
50
  var TextColorIconDecorator = function TextColorIconDecorator(_ref) {
48
51
  var label = _ref.label,
@@ -97,13 +100,13 @@ function HighlightColorMenuItem(_ref3) {
97
100
  formatMessage = _useIntl.formatMessage;
98
101
  var labelId = (0, _react.useId)();
99
102
  var activeColor = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'highlight.activeColor');
100
- var context = (0, _editorToolbar.useToolbarDropdownMenu)();
103
+ var context = (0, _toolbarDropdownMenuContext.useToolbarDropdownMenu)();
101
104
  var _useSelectedTextColor = (0, _uiColor.useSelectedTextColor)(),
102
105
  textColor = _useSelectedTextColor.textColor,
103
106
  defaultColor = _useSelectedTextColor.defaultColor;
104
107
  var closeMenu = context === null || context === void 0 ? void 0 : context.closeMenu;
105
108
  var isNewColorPaletteEnabled = (0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true);
106
- var selectedColor = activeColor || (isNewColorPaletteEnabled ? _uiColor.REMOVE_HIGHLIGHT_COLOR : null);
109
+ var selectedColor = activeColor || (isNewColorPaletteEnabled ? _highlightColorPalette.REMOVE_HIGHLIGHT_COLOR : null);
107
110
  var handleHighlightColorChange = (0, _react.useCallback)(function (color, event) {
108
111
  var _api$highlight;
109
112
  if (api !== null && api !== void 0 && (_api$highlight = api.highlight) !== null && _api$highlight !== void 0 && (_api$highlight = _api$highlight.commands) !== null && _api$highlight !== void 0 && _api$highlight.changeColor) {
@@ -121,12 +124,12 @@ function HighlightColorMenuItem(_ref3) {
121
124
  return color.value === selectedColor;
122
125
  };
123
126
  var iconColor = getTextColorIconColor(defaultColor, textColor, isNewColorPaletteEnabled);
124
- var highlightPalette = isNewColorPaletteEnabled ? _uiColor.highlightColorPaletteNew : _uiColor.highlightColorPalette;
127
+ var highlightPalette = isNewColorPaletteEnabled ? _uiColor.highlightColorPaletteNew : _highlightColorPalette.highlightColorPalette;
125
128
  return highlightPalette.filter(function (color) {
126
- return color.value !== _uiColor.REMOVE_HIGHLIGHT_COLOR;
129
+ return color.value !== _highlightColorPalette.REMOVE_HIGHLIGHT_COLOR;
127
130
  }).map(function (color) {
128
131
  return _objectSpread(_objectSpread({}, color), {}, {
129
- decorator: isNewColorPaletteEnabled && color.value === _uiColor.REMOVE_HIGHLIGHT_COLOR ? /*#__PURE__*/React.createElement(NoColorIconDecorator, {
132
+ decorator: isNewColorPaletteEnabled && color.value === _highlightColorPalette.REMOVE_HIGHLIGHT_COLOR ? /*#__PURE__*/React.createElement(NoColorIconDecorator, {
130
133
  isSelected: isSelected(color),
131
134
  iconColor: iconColor
132
135
  }) : /*#__PURE__*/React.createElement(TextColorIconDecorator, {
@@ -137,7 +140,7 @@ function HighlightColorMenuItem(_ref3) {
137
140
  });
138
141
  });
139
142
  }, [defaultColor, textColor, isNewColorPaletteEnabled, selectedColor]);
140
- var colorPaletteElement = /*#__PURE__*/React.createElement(_editorToolbar.ColorPalette, {
143
+ var colorPaletteElement = /*#__PURE__*/React.createElement(_colorPalette.ColorPalette, {
141
144
  ariaLabelledBy: labelId,
142
145
  cols: isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS : undefined,
143
146
  gap: isNewColorPaletteEnabled ? 'space.0' : undefined
@@ -151,7 +154,7 @@ function HighlightColorMenuItem(_ref3) {
151
154
  ,
152
155
  paletteOptions: {
153
156
  palette: colorPalette || [],
154
- hexToPaletteColor: _editorPalette.hexToEditorTextBackgroundPaletteColor
157
+ hexToPaletteColor: _textBackgroundColor.hexToEditorTextBackgroundPaletteColor
155
158
  }
156
159
  });
157
160
  return /*#__PURE__*/React.createElement(_compiled.Stack, {
@@ -163,7 +166,7 @@ function HighlightColorMenuItem(_ref3) {
163
166
  // The label names the palette's radio group; a heading inside a menu is skipped and has no stable level here
164
167
  ,
165
168
  as: (0, _fg.fg)('platform_editor_a11y_color_palette_radiogroup') ? 'div' : undefined
166
- }, formatMessage(_messages.highlightMessages.highlight)), isNewColorPaletteEnabled ? /*#__PURE__*/React.createElement(_compiled.Bleed, {
169
+ }, formatMessage(_highlight.highlightMessages.highlight)), isNewColorPaletteEnabled ? /*#__PURE__*/React.createElement(_compiled.Bleed, {
167
170
  inline: "space.025"
168
171
  }, colorPaletteElement) : colorPaletteElement);
169
172
  }
@@ -8,16 +8,18 @@ exports.PrimaryToolbarHighlightColorWithIntl = void 0;
8
8
  var _react = require("react");
9
9
  var _react2 = require("@emotion/react");
10
10
  var _reactIntl = require("react-intl");
11
- var _analytics = require("@atlaskit/editor-common/analytics");
12
- var _hooks = require("@atlaskit/editor-common/hooks");
13
- var _icons = require("@atlaskit/editor-common/icons");
11
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
12
+ var _toolbarButton = require("@atlaskit/editor-common/analytics/types/toolbar-button");
13
+ var _DynamicStrokeIconDecoration = require("@atlaskit/editor-common/icons/DynamicStrokeIconDecoration");
14
14
  var _keymaps = require("@atlaskit/editor-common/keymaps");
15
- var _messages = require("@atlaskit/editor-common/messages");
16
- var _styles = require("@atlaskit/editor-common/styles");
17
- var _uiMenu = require("@atlaskit/editor-common/ui-menu");
18
- var _editorPalette = require("@atlaskit/editor-palette");
15
+ var _highlight = require("@atlaskit/editor-common/messages/highlight");
16
+ var _expand = require("@atlaskit/editor-common/styles/expand");
17
+ var _plugins = require("@atlaskit/editor-common/styles/plugins");
18
+ var _ToolbarButton = _interopRequireDefault(require("@atlaskit/editor-common/ui-menu/ToolbarButton"));
19
+ var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
20
+ var _textBackgroundColor = require("@atlaskit/editor-palette/text-background-color");
19
21
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
20
- var _highlight = _interopRequireDefault(require("@atlaskit/icon/core/highlight"));
22
+ var _highlight2 = _interopRequireDefault(require("@atlaskit/icon/core/highlight"));
21
23
  var _compiled = require("@atlaskit/primitives/compiled");
22
24
  var _palette = require("../editor-commands/palette");
23
25
  var _PaletteDropdown = require("./shared/PaletteDropdown");
@@ -47,7 +49,7 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
47
49
  formatMessage = _ref.intl.formatMessage,
48
50
  editorView = _ref.editorView;
49
51
  var toolbarItemRef = (0, _react.useRef)(null);
50
- var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, ['highlight'], selector),
52
+ var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(pluginInjectionApi, ['highlight'], selector),
51
53
  isPaletteOpen = _useSharedPluginState.isPaletteOpen,
52
54
  highlightDisabled = _useSharedPluginState.highlightDisabled,
53
55
  activeColor = _useSharedPluginState.activeColor;
@@ -59,7 +61,7 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
59
61
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
60
62
  (0, _palette.setPalette)(pluginInjectionApi)({
61
63
  isPaletteOpen: isOpen,
62
- inputMethod: _analytics.INPUT_METHOD.TOOLBAR
64
+ inputMethod: _enums.INPUT_METHOD.TOOLBAR
63
65
  })(state, dispatch);
64
66
  }
65
67
  };
@@ -81,11 +83,11 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
81
83
  if (activeColor === undefined || highlightDisabled === undefined) {
82
84
  return null;
83
85
  }
84
- var toolbarButtonLabel = formatMessage(_messages.highlightMessages.highlight);
86
+ var toolbarButtonLabel = formatMessage(_highlight.highlightMessages.highlight);
85
87
 
86
88
  // Get the design token for the active color (if it exists) to modify the toolbar
87
89
  // icon, but show the nice rainbow if none is selected
88
- var activeColorToken = activeColor === null ? null : (0, _editorPalette.hexToEditorTextBackgroundPaletteColor)(activeColor);
90
+ var activeColorToken = activeColor === null ? null : (0, _textBackgroundColor.hexToEditorTextBackgroundPaletteColor)(activeColor);
89
91
  return (0, _react2.jsx)(_compiled.Flex, {
90
92
  alignItems: "center"
91
93
  }, (0, _react2.jsx)(_PaletteDropdown.PaletteDropdown, {
@@ -94,11 +96,11 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
94
96
  popupsScrollableElement: popupsScrollableElement,
95
97
  isOpen: isDropdownOpen && !highlightDisabled,
96
98
  activeColor: activeColor,
97
- trigger: (0, _react2.jsx)(_uiMenu.ToolbarButton
99
+ trigger: (0, _react2.jsx)(_ToolbarButton.default
98
100
  // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides, @atlaskit/ui-styling-standard/no-imported-style-values
99
101
  , {
100
- css: _styles.disableBlueBorderStyles,
101
- buttonId: _uiMenu.TOOLBAR_BUTTON.BACKGROUND_COLOR,
102
+ css: _plugins.disableBlueBorderStyles,
103
+ buttonId: _toolbarButton.TOOLBAR_ACTION_SUBJECT_ID.BACKGROUND_COLOR,
102
104
  spacing: isToolbarReducedSpacing ? 'none' : 'default',
103
105
  disabled: disabled || highlightDisabled,
104
106
  selected: isDropdownOpen,
@@ -113,11 +115,11 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
113
115
  iconBefore:
114
116
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
115
117
  (0, _react2.jsx)("div", {
116
- css: _styles.triggerWrapperStylesWithPadding
117
- }, (0, _react2.jsx)(_icons.DynamicStrokeIconDecoration, {
118
+ css: _plugins.triggerWrapperStylesWithPadding
119
+ }, (0, _react2.jsx)(_DynamicStrokeIconDecoration.DynamicStrokeIconDecoration, {
118
120
  selectedColor: activeColorToken,
119
121
  disabled: highlightDisabled,
120
- icon: (0, _react2.jsx)(_highlight.default, {
122
+ icon: (0, _react2.jsx)(_highlight2.default, {
121
123
  label: "",
122
124
  color: "currentColor",
123
125
  spacing: "spacious"
@@ -125,7 +127,7 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
125
127
  }),
126
128
  //eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
127
129
  (0, _react2.jsx)("span", {
128
- css: _styles.expandIconContainerStyle
130
+ css: _expand.expandIconContainerStyle
129
131
  }, (0, _react2.jsx)(_chevronDown.default, {
130
132
  label: "",
131
133
  color: "currentColor",
@@ -137,7 +139,7 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
137
139
  onColorChange: function onColorChange(color) {
138
140
  return handleColorChange({
139
141
  color: color,
140
- inputMethod: _analytics.INPUT_METHOD.TOOLBAR
142
+ inputMethod: _enums.INPUT_METHOD.TOOLBAR
141
143
  });
142
144
  },
143
145
  isOpenedByKeyboard: isOpenedByKeyboard,
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.EditorHighlightIcon = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _icons = require("@atlaskit/editor-common/icons");
9
+ var _SteppedRainbowIconDecoration = require("@atlaskit/editor-common/icons/SteppedRainbowIconDecoration");
10
10
  var _edit = _interopRequireDefault(require("@atlaskit/icon/core/edit"));
11
11
  var _compiled = require("@atlaskit/primitives/compiled");
12
12
  var EditorHighlightIcon = exports.EditorHighlightIcon = function EditorHighlightIcon(_ref) {
@@ -14,7 +14,7 @@ var EditorHighlightIcon = exports.EditorHighlightIcon = function EditorHighlight
14
14
  selectedColor = _ref.selectedColor;
15
15
  return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
16
16
  paddingInline: "space.050"
17
- }, /*#__PURE__*/_react.default.createElement(_icons.SteppedRainbowIconDecoration, {
17
+ }, /*#__PURE__*/_react.default.createElement(_SteppedRainbowIconDecoration.SteppedRainbowIconDecoration, {
18
18
  selectedColor: selectedColor,
19
19
  disabled: disabled,
20
20
  icon: /*#__PURE__*/_react.default.createElement(_edit.default, {
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
@@ -7,9 +8,13 @@ Object.defineProperty(exports, "__esModule", {
7
8
  exports.PaletteDropdown = void 0;
8
9
  var _react = _interopRequireWildcard(require("react"));
9
10
  var _uiColor = require("@atlaskit/editor-common/ui-color");
10
- var _uiMenu = require("@atlaskit/editor-common/ui-menu");
11
- var _editorPalette = require("@atlaskit/editor-palette");
12
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
+ var _ColorPalette = _interopRequireDefault(require("@atlaskit/editor-common/ui-color/ColorPalette"));
12
+ var _highlightColorPalette = require("@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette");
13
+ var _utils = require("@atlaskit/editor-common/ui-color/ColorPalette/utils");
14
+ var _types = require("@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types");
15
+ var _DropdownContainer = require("@atlaskit/editor-common/ui-menu/DropdownContainer");
16
+ var _textBackgroundColor = require("@atlaskit/editor-palette/text-background-color");
17
+ var _constants = require("@atlaskit/editor-shared-styles/constants");
13
18
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
15
20
  var HIGHLIGHT_COLOR_PICKER_COLUMNS = 8;
@@ -29,10 +34,10 @@ var PaletteDropdown = exports.PaletteDropdown = function PaletteDropdown(props)
29
34
  var highlightPalette = (0, _react.useMemo)(function () {
30
35
  if (isNewColorPaletteEnabled) {
31
36
  return _uiColor.highlightColorPaletteNew.filter(function (color) {
32
- return color.value !== _uiColor.REMOVE_HIGHLIGHT_COLOR;
37
+ return color.value !== _highlightColorPalette.REMOVE_HIGHLIGHT_COLOR;
33
38
  });
34
39
  }
35
- return _uiColor.highlightColorPalette;
40
+ return _highlightColorPalette.highlightColorPalette;
36
41
  }, [isNewColorPaletteEnabled]);
37
42
  var colorPickerColumns = isNewColorPaletteEnabled ? HIGHLIGHT_COLOR_PICKER_COLUMNS_NEW : HIGHLIGHT_COLOR_PICKER_COLUMNS;
38
43
 
@@ -43,24 +48,24 @@ var PaletteDropdown = exports.PaletteDropdown = function PaletteDropdown(props)
43
48
  // 10 cols: 336 = (32 * 10) + (8 + 8)
44
49
  // Not sure where the extra 2px comes from
45
50
 
46
- var selectedColor = activeColor || (isNewColorPaletteEnabled ? _uiColor.REMOVE_HIGHLIGHT_COLOR : null);
47
- var _getSelectedRowAndCol = (0, _uiColor.getSelectedRowAndColumnFromPalette)(highlightPalette, selectedColor, colorPickerColumns),
51
+ var selectedColor = activeColor || (isNewColorPaletteEnabled ? _highlightColorPalette.REMOVE_HIGHLIGHT_COLOR : null);
52
+ var _getSelectedRowAndCol = (0, _utils.getSelectedRowAndColumnFromPalette)(highlightPalette, selectedColor, colorPickerColumns),
48
53
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
49
54
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
50
- return /*#__PURE__*/_react.default.createElement(_uiMenu.DropdownContainer, {
55
+ return /*#__PURE__*/_react.default.createElement(_DropdownContainer.DropdownContainer, {
51
56
  mountTo: popupsMountPoint,
52
57
  boundariesElement: popupsBoundariesElement,
53
58
  scrollableElement: popupsScrollableElement,
54
59
  isOpen: isOpen,
55
60
  handleClickOutside: handleClickOutside,
56
61
  handleEscapeKeydown: handleEscapeKeydown,
57
- zIndex: _editorSharedStyles.akEditorMenuZIndex,
62
+ zIndex: _constants.akEditorMenuZIndex,
58
63
  fitWidth: fitWidth,
59
64
  closeOnTab: true
60
65
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
61
66
  ,
62
67
  arrowKeyNavigationProviderOptions: {
63
- type: _uiMenu.ArrowKeyNavigationType.COLOR,
68
+ type: _types.ArrowKeyNavigationType.COLOR,
64
69
  selectedRowIndex: selectedRowIndex,
65
70
  selectedColumnIndex: selectedColumnIndex,
66
71
  isOpenedByKeyboard: isOpenedByKeyboard,
@@ -69,7 +74,7 @@ var PaletteDropdown = exports.PaletteDropdown = function PaletteDropdown(props)
69
74
  trigger: trigger
70
75
  }, /*#__PURE__*/_react.default.createElement("div", {
71
76
  "data-testid": "highlight-color-palette"
72
- }, /*#__PURE__*/_react.default.createElement(_uiColor.ColorPalette, {
77
+ }, /*#__PURE__*/_react.default.createElement(_ColorPalette.default, {
73
78
  cols: colorPickerColumns,
74
79
  onClick: onColorChange,
75
80
  selectedColor: selectedColor
@@ -77,7 +82,7 @@ var PaletteDropdown = exports.PaletteDropdown = function PaletteDropdown(props)
77
82
  ,
78
83
  paletteOptions: {
79
84
  palette: highlightPalette,
80
- hexToPaletteColor: _editorPalette.hexToEditorTextBackgroundPaletteColor
85
+ hexToPaletteColor: _textBackgroundColor.hexToEditorTextBackgroundPaletteColor
81
86
  }
82
87
  })));
83
88
  };
@@ -7,14 +7,15 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getToolbarComponent = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
- var _toolbar = require("@atlaskit/editor-common/toolbar");
10
+ var _keys = require("@atlaskit/editor-common/toolbar/keys");
11
+ var _rank = require("@atlaskit/editor-common/toolbar/rank");
11
12
  var _HighlightColorMenuItem = require("./HighlightColorMenuItem");
12
13
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
14
  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) { (0, _defineProperty2.default)(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; }
14
15
  var getToolbarComponent = exports.getToolbarComponent = function getToolbarComponent(api) {
15
- return [_objectSpread(_objectSpread({}, _toolbar.HIGHLIGHT_MENU_ITEM), {}, {
16
- parents: [_objectSpread(_objectSpread({}, _toolbar.TEXT_COLOR_HIGHLIGHT_MENU_SECTION), {}, {
17
- rank: _toolbar.TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK[_toolbar.HIGHLIGHT_MENU_ITEM.key]
16
+ return [_objectSpread(_objectSpread({}, _keys.HIGHLIGHT_MENU_ITEM), {}, {
17
+ parents: [_objectSpread(_objectSpread({}, _keys.TEXT_COLOR_HIGHLIGHT_MENU_SECTION), {}, {
18
+ rank: _rank.TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK[_keys.HIGHLIGHT_MENU_ITEM.key]
18
19
  })],
19
20
  component: function component(_ref) {
20
21
  var parents = _ref.parents;
@@ -1,7 +1,9 @@
1
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
2
- import { getHadMarkAttributes, removeMark, toggleMark } from '@atlaskit/editor-common/mark';
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import { getHadMarkAttributes, removeMark } from '@atlaskit/editor-common/mark';
3
+ import { toggleMark } from '@atlaskit/editor-common/mark/commands';
3
4
  import { FORMAT_SELECTION_SYNC_META } from '@atlaskit/editor-common/selection';
4
- import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette, highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
5
+ import { highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
6
+ import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette';
5
7
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
6
8
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
9
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
@@ -1,5 +1,5 @@
1
1
  import { isMarkAllowedInRange, isMarkExcluded } from '@atlaskit/editor-common/mark';
2
- import { GapCursorSelection } from '@atlaskit/editor-common/selection';
2
+ import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
3
3
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  export const getDisabledState = state => {
5
5
  const {
@@ -1,4 +1,4 @@
1
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
2
2
  // oxlint-disable-next-line import/no-duplicates
3
3
 
4
4
  import { HighlightPluginAction, highlightPluginKey } from '../pm-plugins/main';
@@ -1,7 +1,9 @@
1
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import { applyYellowHighlight, bindKeymapWithCommand, keymap, toggleHighlightPalette } from '@atlaskit/editor-common/keymaps';
3
- import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset';
4
- import { highlightColorPalette, highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
1
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import { keymap } from '@atlaskit/editor-common/keymap';
3
+ import { applyYellowHighlight, bindKeymapWithCommand, toggleHighlightPalette } from '@atlaskit/editor-common/keymaps';
4
+ import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset/editor-commands';
5
+ import { highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
6
+ import { highlightColorPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette';
5
7
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
6
8
  import { changeColor } from '../editor-commands/change-color';
7
9
  import { togglePalette } from '../editor-commands/palette';
@@ -6,14 +6,16 @@ import { useRef } from 'react';
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { jsx } from '@emotion/react';
8
8
  import { injectIntl } from 'react-intl';
9
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
10
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
- import { DynamicStrokeIconDecoration } from '@atlaskit/editor-common/icons';
9
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
10
+ import { TOOLBAR_ACTION_SUBJECT_ID as TOOLBAR_BUTTON } from '@atlaskit/editor-common/analytics/types/toolbar-button';
11
+ import { DynamicStrokeIconDecoration } from '@atlaskit/editor-common/icons/DynamicStrokeIconDecoration';
12
12
  import { toggleHighlightPalette, tooltip, getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
13
- import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
14
- import { disableBlueBorderStyles, expandIconContainerStyle, triggerWrapperStylesWithPadding } from '@atlaskit/editor-common/styles';
15
- import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
16
- import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
13
+ import { highlightMessages as messages } from '@atlaskit/editor-common/messages/highlight';
14
+ import { expandIconContainerStyle } from '@atlaskit/editor-common/styles/expand';
15
+ import { disableBlueBorderStyles, triggerWrapperStylesWithPadding } from '@atlaskit/editor-common/styles/plugins';
16
+ import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
17
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
18
+ import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
17
19
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
18
20
  import HighlightIcon from '@atlaskit/icon/core/highlight';
19
21
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
@@ -5,12 +5,15 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useCallback, useId, useMemo } from 'react';
6
6
  import { useIntl } from 'react-intl';
7
7
  import { cx } from '@atlaskit/css';
8
- import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
8
+ import { highlightMessages as messages } from '@atlaskit/editor-common/messages/highlight';
9
9
  import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
10
- import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette, highlightColorPaletteNew, useSelectedTextColor } from '@atlaskit/editor-common/ui-color';
11
- import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
12
- import { hexToEditorTextBackgroundPaletteColor, hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
13
- import { ColorPalette, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
10
+ import { highlightColorPaletteNew, useSelectedTextColor } from '@atlaskit/editor-common/ui-color';
11
+ import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette';
12
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/useSharedPluginStateSelector';
13
+ import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
14
+ import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
15
+ import { ColorPalette } from '@atlaskit/editor-toolbar/color-palette';
16
+ import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar/toolbar-dropdown-menu-context';
14
17
  import Heading from '@atlaskit/heading/heading';
15
18
  import EditorDoneIcon from '@atlaskit/icon/core/check-mark';
16
19
  import Icon from '@atlaskit/icon/core/text-style';
@@ -6,14 +6,16 @@ import { useRef } from 'react';
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { jsx } from '@emotion/react';
8
8
  import { injectIntl } from 'react-intl';
9
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
10
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
- import { DynamicStrokeIconDecoration } from '@atlaskit/editor-common/icons';
9
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
10
+ import { TOOLBAR_ACTION_SUBJECT_ID as TOOLBAR_BUTTON } from '@atlaskit/editor-common/analytics/types/toolbar-button';
11
+ import { DynamicStrokeIconDecoration } from '@atlaskit/editor-common/icons/DynamicStrokeIconDecoration';
12
12
  import { getAriaKeyshortcuts, toggleHighlightPalette, tooltip } from '@atlaskit/editor-common/keymaps';
13
- import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
14
- import { disableBlueBorderStyles, expandIconContainerStyle, triggerWrapperStylesWithPadding } from '@atlaskit/editor-common/styles';
15
- import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
16
- import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
13
+ import { highlightMessages as messages } from '@atlaskit/editor-common/messages/highlight';
14
+ import { expandIconContainerStyle } from '@atlaskit/editor-common/styles/expand';
15
+ import { disableBlueBorderStyles, triggerWrapperStylesWithPadding } from '@atlaskit/editor-common/styles/plugins';
16
+ import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
17
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
18
+ import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
17
19
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
18
20
  import HighlightIcon from '@atlaskit/icon/core/highlight';
19
21
  import { Flex } from '@atlaskit/primitives/compiled';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { SteppedRainbowIconDecoration } from '@atlaskit/editor-common/icons';
2
+ import { SteppedRainbowIconDecoration } from '@atlaskit/editor-common/icons/SteppedRainbowIconDecoration';
3
3
  import EditFilledIcon from '@atlaskit/icon/core/edit';
4
4
  import { Box } from '@atlaskit/primitives/compiled';
5
5
  export const EditorHighlightIcon = ({
@@ -1,8 +1,12 @@
1
1
  import React, { useMemo } from 'react';
2
- import { ColorPalette, REMOVE_HIGHLIGHT_COLOR, getSelectedRowAndColumnFromPalette, highlightColorPalette, highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
3
- import { ArrowKeyNavigationType, DropdownContainer as Dropdown } from '@atlaskit/editor-common/ui-menu';
4
- import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
5
- import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
2
+ import { highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
3
+ import ColorPalette from '@atlaskit/editor-common/ui-color/ColorPalette';
4
+ import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette';
5
+ import { getSelectedRowAndColumnFromPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/utils';
6
+ import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
7
+ import { DropdownContainer as Dropdown } from '@atlaskit/editor-common/ui-menu/DropdownContainer';
8
+ import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
9
+ import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
6
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
11
  const HIGHLIGHT_COLOR_PICKER_COLUMNS = 8;
8
12
  const HIGHLIGHT_COLOR_PICKER_COLUMNS_NEW = 10;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import { HIGHLIGHT_MENU_ITEM, TEXT_COLOR_HIGHLIGHT_MENU_SECTION, TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
2
+ import { HIGHLIGHT_MENU_ITEM, TEXT_COLOR_HIGHLIGHT_MENU_SECTION } from '@atlaskit/editor-common/toolbar/keys';
3
+ import { TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar/rank';
3
4
  import { HighlightColorMenuItem } from './HighlightColorMenuItem';
4
5
  export const getToolbarComponent = api => {
5
6
  return [{
@@ -1,10 +1,12 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
5
- import { getHadMarkAttributes, removeMark, toggleMark } from '@atlaskit/editor-common/mark';
4
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
5
+ import { getHadMarkAttributes, removeMark } from '@atlaskit/editor-common/mark';
6
+ import { toggleMark } from '@atlaskit/editor-common/mark/commands';
6
7
  import { FORMAT_SELECTION_SYNC_META } from '@atlaskit/editor-common/selection';
7
- import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette, highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
8
+ import { highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
9
+ import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette';
8
10
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
9
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
12
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
@@ -1,5 +1,5 @@
1
1
  import { isMarkAllowedInRange, isMarkExcluded } from '@atlaskit/editor-common/mark';
2
- import { GapCursorSelection } from '@atlaskit/editor-common/selection';
2
+ import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
3
3
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  export var getDisabledState = function getDisabledState(state) {
5
5
  var backgroundColor = state.schema.marks.backgroundColor;
@@ -1,4 +1,4 @@
1
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
2
2
  // oxlint-disable-next-line import/no-duplicates
3
3
 
4
4
  import { HighlightPluginAction, highlightPluginKey } from '../pm-plugins/main';
@@ -1,7 +1,9 @@
1
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import { applyYellowHighlight, bindKeymapWithCommand, keymap, toggleHighlightPalette } from '@atlaskit/editor-common/keymaps';
3
- import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset';
4
- import { highlightColorPalette, highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
1
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import { keymap } from '@atlaskit/editor-common/keymap';
3
+ import { applyYellowHighlight, bindKeymapWithCommand, toggleHighlightPalette } from '@atlaskit/editor-common/keymaps';
4
+ import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset/editor-commands';
5
+ import { highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
6
+ import { highlightColorPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette';
5
7
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
6
8
  import { changeColor } from '../editor-commands/change-color';
7
9
  import { togglePalette } from '../editor-commands/palette';
@@ -6,14 +6,16 @@ import { useRef } from 'react';
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { jsx } from '@emotion/react';
8
8
  import { injectIntl } from 'react-intl';
9
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
10
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
- import { DynamicStrokeIconDecoration } from '@atlaskit/editor-common/icons';
9
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
10
+ import { TOOLBAR_ACTION_SUBJECT_ID as TOOLBAR_BUTTON } from '@atlaskit/editor-common/analytics/types/toolbar-button';
11
+ import { DynamicStrokeIconDecoration } from '@atlaskit/editor-common/icons/DynamicStrokeIconDecoration';
12
12
  import { toggleHighlightPalette, tooltip, getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
13
- import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
14
- import { disableBlueBorderStyles, expandIconContainerStyle, triggerWrapperStylesWithPadding } from '@atlaskit/editor-common/styles';
15
- import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
16
- import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
13
+ import { highlightMessages as messages } from '@atlaskit/editor-common/messages/highlight';
14
+ import { expandIconContainerStyle } from '@atlaskit/editor-common/styles/expand';
15
+ import { disableBlueBorderStyles, triggerWrapperStylesWithPadding } from '@atlaskit/editor-common/styles/plugins';
16
+ import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
17
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
18
+ import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
17
19
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
18
20
  import HighlightIcon from '@atlaskit/icon/core/highlight';
19
21
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
@@ -8,12 +8,15 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
8
8
  import { useCallback, useId, useMemo } from 'react';
9
9
  import { useIntl } from 'react-intl';
10
10
  import { cx } from '@atlaskit/css';
11
- import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
11
+ import { highlightMessages as messages } from '@atlaskit/editor-common/messages/highlight';
12
12
  import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
13
- import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette, highlightColorPaletteNew, useSelectedTextColor } from '@atlaskit/editor-common/ui-color';
14
- import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
15
- import { hexToEditorTextBackgroundPaletteColor, hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
16
- import { ColorPalette, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
13
+ import { highlightColorPaletteNew, useSelectedTextColor } from '@atlaskit/editor-common/ui-color';
14
+ import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette';
15
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/useSharedPluginStateSelector';
16
+ import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
17
+ import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
18
+ import { ColorPalette } from '@atlaskit/editor-toolbar/color-palette';
19
+ import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar/toolbar-dropdown-menu-context';
17
20
  import Heading from '@atlaskit/heading/heading';
18
21
  import EditorDoneIcon from '@atlaskit/icon/core/check-mark';
19
22
  import Icon from '@atlaskit/icon/core/text-style';
@@ -6,14 +6,16 @@ import { useRef } from 'react';
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { jsx } from '@emotion/react';
8
8
  import { injectIntl } from 'react-intl';
9
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
10
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
- import { DynamicStrokeIconDecoration } from '@atlaskit/editor-common/icons';
9
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
10
+ import { TOOLBAR_ACTION_SUBJECT_ID as TOOLBAR_BUTTON } from '@atlaskit/editor-common/analytics/types/toolbar-button';
11
+ import { DynamicStrokeIconDecoration } from '@atlaskit/editor-common/icons/DynamicStrokeIconDecoration';
12
12
  import { getAriaKeyshortcuts, toggleHighlightPalette, tooltip } from '@atlaskit/editor-common/keymaps';
13
- import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
14
- import { disableBlueBorderStyles, expandIconContainerStyle, triggerWrapperStylesWithPadding } from '@atlaskit/editor-common/styles';
15
- import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
16
- import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
13
+ import { highlightMessages as messages } from '@atlaskit/editor-common/messages/highlight';
14
+ import { expandIconContainerStyle } from '@atlaskit/editor-common/styles/expand';
15
+ import { disableBlueBorderStyles, triggerWrapperStylesWithPadding } from '@atlaskit/editor-common/styles/plugins';
16
+ import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
17
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
18
+ import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
17
19
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
18
20
  import HighlightIcon from '@atlaskit/icon/core/highlight';
19
21
  import { Flex } from '@atlaskit/primitives/compiled';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { SteppedRainbowIconDecoration } from '@atlaskit/editor-common/icons';
2
+ import { SteppedRainbowIconDecoration } from '@atlaskit/editor-common/icons/SteppedRainbowIconDecoration';
3
3
  import EditFilledIcon from '@atlaskit/icon/core/edit';
4
4
  import { Box } from '@atlaskit/primitives/compiled';
5
5
  export var EditorHighlightIcon = function EditorHighlightIcon(_ref) {
@@ -1,8 +1,12 @@
1
1
  import React, { useMemo } from 'react';
2
- import { ColorPalette, REMOVE_HIGHLIGHT_COLOR, getSelectedRowAndColumnFromPalette, highlightColorPalette, highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
3
- import { ArrowKeyNavigationType, DropdownContainer as Dropdown } from '@atlaskit/editor-common/ui-menu';
4
- import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
5
- import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
2
+ import { highlightColorPaletteNew } from '@atlaskit/editor-common/ui-color';
3
+ import ColorPalette from '@atlaskit/editor-common/ui-color/ColorPalette';
4
+ import { REMOVE_HIGHLIGHT_COLOR, highlightColorPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/highlightColorPalette';
5
+ import { getSelectedRowAndColumnFromPalette } from '@atlaskit/editor-common/ui-color/ColorPalette/utils';
6
+ import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
7
+ import { DropdownContainer as Dropdown } from '@atlaskit/editor-common/ui-menu/DropdownContainer';
8
+ import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
9
+ import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
6
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
11
  var HIGHLIGHT_COLOR_PICKER_COLUMNS = 8;
8
12
  var HIGHLIGHT_COLOR_PICKER_COLUMNS_NEW = 10;
@@ -2,7 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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
- import { HIGHLIGHT_MENU_ITEM, TEXT_COLOR_HIGHLIGHT_MENU_SECTION, TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
5
+ import { HIGHLIGHT_MENU_ITEM, TEXT_COLOR_HIGHLIGHT_MENU_SECTION } from '@atlaskit/editor-common/toolbar/keys';
6
+ import { TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar/rank';
6
7
  import { HighlightColorMenuItem } from './HighlightColorMenuItem';
7
8
  export var getToolbarComponent = function getToolbarComponent(api) {
8
9
  return [_objectSpread(_objectSpread({}, HIGHLIGHT_MENU_ITEM), {}, {
@@ -1,5 +1,6 @@
1
- import type { EditorAnalyticsAPI, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { EditorCommand } from '@atlaskit/editor-common/types';
1
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
2
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
3
+ import type { EditorCommand } from '@atlaskit/editor-common/types/editor-command';
3
4
  export declare const changeColor: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ color, inputMethod }: {
4
5
  color: string;
5
6
  inputMethod: INPUT_METHOD;
@@ -1,5 +1,6 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
1
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import type { Command } from '@atlaskit/editor-common/types/command';
3
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
3
4
  import type { HighlightPlugin } from '../highlightPluginType';
4
5
  export declare const togglePalette: (api: ExtractInjectionAPI<HighlightPlugin>) => ({ inputMethod }: {
5
6
  inputMethod: INPUT_METHOD;
@@ -1,11 +1,12 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
- import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
5
- import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
6
- import type { TextFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
7
- import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
8
- import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
1
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import type { EditorCommand } from '@atlaskit/editor-common/types/editor-command';
3
+ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
4
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
5
+ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar/primary-toolbar-plugin-type';
6
+ import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar/selection-toolbar-plugin-type';
7
+ import type { TextFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting/text-formatting-plugin-type';
8
+ import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar/toolbar-plugin-type';
9
+ import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences/user-preferences-plugin-type';
9
10
  import type { HighlightPluginState } from './pm-plugins/main';
10
11
  export type HighlightPlugin = NextEditorPlugin<'highlight', {
11
12
  commands: {
@@ -1,5 +1,5 @@
1
1
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
3
3
  import type { HighlightPlugin } from '../highlightPluginType';
4
4
  export declare function keymapPlugin({ api }: {
5
5
  api: ExtractInjectionAPI<HighlightPlugin> | undefined;
@@ -1,7 +1,7 @@
1
1
  import type { ComponentType, FC } from 'react';
2
2
  import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
4
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
6
  import type { HighlightPlugin } from '../highlightPluginType';
7
7
  type FloatingToolbarHighlightColorProps = {
@@ -2,8 +2,8 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
- import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
5
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
6
+ import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model/types';
7
7
  import type { HighlightPlugin } from '../highlightPluginType';
8
8
  interface HighlightMenuItemProps {
9
9
  api: ExtractInjectionAPI<HighlightPlugin> | undefined;
@@ -1,6 +1,6 @@
1
1
  import type { ComponentType, FC } from 'react';
2
2
  import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { HighlightPlugin } from '../highlightPluginType';
6
6
  type PrimaryToolbarHighlightColorProps = {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { WithOutsideClickProps } from '@atlaskit/editor-common/ui';
2
+ import type { WithOutsideClickProps } from '@atlaskit/editor-common/with-outer-listeners';
3
3
  type PaletteDropdownProps = {
4
4
  activeColor: string | null;
5
5
  isOpen: boolean;
@@ -1,6 +1,6 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { ToolbarButtonRef } from '@atlaskit/editor-common/ui-menu';
1
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
3
+ import type { ToolbarButtonRef } from '@atlaskit/editor-common/ui-menu/ToolbarButton';
4
4
  import type { HighlightPlugin } from '../../highlightPluginType';
5
5
  type UseDropdownEventArgs = {
6
6
  isDropdownOpen: boolean;
@@ -1,4 +1,4 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
1
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
2
+ import type { RegisterComponent } from '@atlaskit/editor-toolbar-model/types';
3
3
  import type { HighlightPlugin } from '../highlightPluginType';
4
4
  export declare const getToolbarComponent: (api: ExtractInjectionAPI<HighlightPlugin> | undefined) => RegisterComponent[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-highlight",
3
- "version": "26.0.3",
3
+ "version": "26.0.5",
4
4
  "description": "Highlight plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/platform-feature-experiments": "^0.3.0",
46
46
  "@atlaskit/platform-feature-flags": "^2.2.0",
47
47
  "@atlaskit/primitives": "^22.5.0",
48
- "@atlaskit/tmp-editor-statsig": "^230.0.0",
48
+ "@atlaskit/tmp-editor-statsig": "^232.0.0",
49
49
  "@atlaskit/tokens": "^20.4.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1"