@atlaskit/editor-plugin-highlight 1.19.4 → 1.19.6

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,17 @@
1
1
  # @atlaskit/editor-plugin-highlight
2
2
 
3
+ ## 1.19.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.19.5
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 1.19.4
4
16
 
5
17
  ### Patch Changes
@@ -8,7 +8,7 @@ exports.highlightPlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _adfSchema = require("@atlaskit/adf-schema");
10
10
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
11
- var _editorCommands = require("./editor-commands");
11
+ var _changeColor = require("./editor-commands/change-color");
12
12
  var _keymap = require("./pm-plugins/keymap");
13
13
  var _main = require("./pm-plugins/main");
14
14
  var _FloatingToolbarHighlightColor = require("./ui/FloatingToolbarHighlightColor");
@@ -48,7 +48,7 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
48
48
  }];
49
49
  },
50
50
  commands: {
51
- changeColor: (0, _editorCommands.changeColor)(editorAnalyticsAPI)
51
+ changeColor: (0, _changeColor.changeColor)(editorAnalyticsAPI)
52
52
  },
53
53
  pmPlugins: function pmPlugins() {
54
54
  return [{
@@ -6,11 +6,17 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.keymapPlugin = keymapPlugin;
7
7
  var _analytics = require("@atlaskit/editor-common/analytics");
8
8
  var _keymaps = require("@atlaskit/editor-common/keymaps");
9
- var _editorCommands = require("../editor-commands");
9
+ var _palette = require("../editor-commands/palette");
10
10
  function keymapPlugin(_ref) {
11
11
  var api = _ref.api;
12
12
  var list = {};
13
- (0, _keymaps.bindKeymapWithCommand)(_keymaps.toggleHighlightPalette.common, (0, _editorCommands.togglePalette)(api)({
13
+ (0, _keymaps.bindKeymapWithCommand)(
14
+ // Ignored via go/ees005
15
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
16
+ _keymaps.toggleHighlightPalette.common,
17
+ // Ignored via go/ees005
18
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
19
+ (0, _palette.togglePalette)(api)({
14
20
  inputMethod: _analytics.INPUT_METHOD.SHORTCUT
15
21
  }), list);
16
22
  return (0, _keymaps.keymap)(list);
@@ -30,6 +30,8 @@ var createPlugin = exports.createPlugin = function createPlugin(_ref) {
30
30
  isPaletteOpen: false
31
31
  };
32
32
  },
33
+ // Ignored via go/ees005
34
+ // eslint-disable-next-line @typescript-eslint/max-params
33
35
  apply: function apply(tr, pluginState, _oldState, newState) {
34
36
  var _tr$getMeta;
35
37
  var action = (_tr$getMeta = tr.getMeta(highlightPluginKey)) === null || _tr$getMeta === void 0 ? void 0 : _tr$getMeta.type;
@@ -21,7 +21,7 @@ var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-
21
21
  var _chevronDown2 = _interopRequireDefault(require("@atlaskit/icon/utility/chevron-down"));
22
22
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
23
23
  var _primitives = require("@atlaskit/primitives");
24
- var _editorCommands = require("../editor-commands");
24
+ var _palette = require("../editor-commands/palette");
25
25
  var _EditorHighlightIcon = require("./shared/EditorHighlightIcon");
26
26
  var _PaletteDropdown = require("./shared/PaletteDropdown");
27
27
  var _useDropdownEvents2 = require("./shared/useDropdownEvents");
@@ -48,7 +48,9 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
48
48
  if (!(highlightState !== null && highlightState !== void 0 && highlightState.disabled)) {
49
49
  var state = editorView.state,
50
50
  dispatch = editorView.dispatch;
51
- (0, _editorCommands.setPalette)(pluginInjectionApi)({
51
+ // Ignored via go/ees005
52
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
53
+ (0, _palette.setPalette)(pluginInjectionApi)({
52
54
  isPaletteOpen: isOpen,
53
55
  inputMethod: _analytics.INPUT_METHOD.TOOLBAR
54
56
  })(state, dispatch);
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.useDropdownEvents = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _react = require("react");
10
- var _editorCommands = require("../../editor-commands");
10
+ var _changeColor = require("../../editor-commands/change-color");
11
11
  var useDropdownEvents = exports.useDropdownEvents = function useDropdownEvents(args) {
12
12
  var toolbarItemRef = args.toolbarItemRef,
13
13
  setIsDropdownOpen = args.setIsDropdownOpen,
@@ -47,7 +47,7 @@ var useDropdownEvents = exports.useDropdownEvents = function useDropdownEvents(a
47
47
  var _pluginInjectionApi$c, _pluginInjectionApi$a;
48
48
  var color = _ref.color,
49
49
  inputMethod = _ref.inputMethod;
50
- pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c = pluginInjectionApi.core) === null || _pluginInjectionApi$c === void 0 || _pluginInjectionApi$c.actions.execute((0, _editorCommands.changeColor)(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions)({
50
+ pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c = pluginInjectionApi.core) === null || _pluginInjectionApi$c === void 0 || _pluginInjectionApi$c.actions.execute((0, _changeColor.changeColor)(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions)({
51
51
  color: color,
52
52
  inputMethod: inputMethod
53
53
  }));
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { backgroundColor } from '@atlaskit/adf-schema';
3
3
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
- import { changeColor } from './editor-commands';
4
+ import { changeColor } from './editor-commands/change-color';
5
5
  import { keymapPlugin } from './pm-plugins/keymap';
6
6
  import { createPlugin, highlightPluginKey } from './pm-plugins/main';
7
7
  import { FloatingToolbarHighlightColorWithIntl as FloatingToolbarHighlightColor } from './ui/FloatingToolbarHighlightColor';
@@ -1,11 +1,17 @@
1
1
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import { bindKeymapWithCommand, keymap, toggleHighlightPalette } from '@atlaskit/editor-common/keymaps';
3
- import { togglePalette } from '../editor-commands';
3
+ import { togglePalette } from '../editor-commands/palette';
4
4
  export function keymapPlugin({
5
5
  api
6
6
  }) {
7
7
  const list = {};
8
- bindKeymapWithCommand(toggleHighlightPalette.common, togglePalette(api)({
8
+ bindKeymapWithCommand(
9
+ // Ignored via go/ees005
10
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
11
+ toggleHighlightPalette.common,
12
+ // Ignored via go/ees005
13
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
14
+ togglePalette(api)({
9
15
  inputMethod: INPUT_METHOD.SHORTCUT
10
16
  }), list);
11
17
  return keymap(list);
@@ -19,6 +19,8 @@ export const createPlugin = ({
19
19
  disabled: getDisabledState(editorState),
20
20
  isPaletteOpen: false
21
21
  }),
22
+ // Ignored via go/ees005
23
+ // eslint-disable-next-line @typescript-eslint/max-params
22
24
  apply: (tr, pluginState, _oldState, newState) => {
23
25
  var _tr$getMeta;
24
26
  const action = (_tr$getMeta = tr.getMeta(highlightPluginKey)) === null || _tr$getMeta === void 0 ? void 0 : _tr$getMeta.type;
@@ -20,7 +20,7 @@ import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
20
20
  import ChevronDownIcon from '@atlaskit/icon/utility/chevron-down';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import { Flex } from '@atlaskit/primitives';
23
- import { setPalette } from '../editor-commands';
23
+ import { setPalette } from '../editor-commands/palette';
24
24
  import { EditorHighlightIcon } from './shared/EditorHighlightIcon';
25
25
  import { PaletteDropdown } from './shared/PaletteDropdown';
26
26
  import { useDropdownEvents } from './shared/useDropdownEvents';
@@ -46,6 +46,8 @@ const PrimaryToolbarHighlightColor = ({
46
46
  state,
47
47
  dispatch
48
48
  } = editorView;
49
+ // Ignored via go/ees005
50
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
49
51
  setPalette(pluginInjectionApi)({
50
52
  isPaletteOpen: isOpen,
51
53
  inputMethod: INPUT_METHOD.TOOLBAR
@@ -1,5 +1,5 @@
1
1
  import { useState } from 'react';
2
- import { changeColor } from '../../editor-commands';
2
+ import { changeColor } from '../../editor-commands/change-color';
3
3
  export const useDropdownEvents = args => {
4
4
  const {
5
5
  toolbarItemRef,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { backgroundColor } from '@atlaskit/adf-schema';
3
3
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
- import { changeColor } from './editor-commands';
4
+ import { changeColor } from './editor-commands/change-color';
5
5
  import { keymapPlugin } from './pm-plugins/keymap';
6
6
  import { createPlugin, highlightPluginKey } from './pm-plugins/main';
7
7
  import { FloatingToolbarHighlightColorWithIntl as FloatingToolbarHighlightColor } from './ui/FloatingToolbarHighlightColor';
@@ -1,10 +1,16 @@
1
1
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import { bindKeymapWithCommand, keymap, toggleHighlightPalette } from '@atlaskit/editor-common/keymaps';
3
- import { togglePalette } from '../editor-commands';
3
+ import { togglePalette } from '../editor-commands/palette';
4
4
  export function keymapPlugin(_ref) {
5
5
  var api = _ref.api;
6
6
  var list = {};
7
- bindKeymapWithCommand(toggleHighlightPalette.common, togglePalette(api)({
7
+ bindKeymapWithCommand(
8
+ // Ignored via go/ees005
9
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10
+ toggleHighlightPalette.common,
11
+ // Ignored via go/ees005
12
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
13
+ togglePalette(api)({
8
14
  inputMethod: INPUT_METHOD.SHORTCUT
9
15
  }), list);
10
16
  return keymap(list);
@@ -23,6 +23,8 @@ export var createPlugin = function createPlugin(_ref) {
23
23
  isPaletteOpen: false
24
24
  };
25
25
  },
26
+ // Ignored via go/ees005
27
+ // eslint-disable-next-line @typescript-eslint/max-params
26
28
  apply: function apply(tr, pluginState, _oldState, newState) {
27
29
  var _tr$getMeta;
28
30
  var action = (_tr$getMeta = tr.getMeta(highlightPluginKey)) === null || _tr$getMeta === void 0 ? void 0 : _tr$getMeta.type;
@@ -20,7 +20,7 @@ import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
20
20
  import ChevronDownIcon from '@atlaskit/icon/utility/chevron-down';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import { Flex } from '@atlaskit/primitives';
23
- import { setPalette } from '../editor-commands';
23
+ import { setPalette } from '../editor-commands/palette';
24
24
  import { EditorHighlightIcon } from './shared/EditorHighlightIcon';
25
25
  import { PaletteDropdown } from './shared/PaletteDropdown';
26
26
  import { useDropdownEvents } from './shared/useDropdownEvents';
@@ -40,6 +40,8 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
40
40
  if (!(highlightState !== null && highlightState !== void 0 && highlightState.disabled)) {
41
41
  var state = editorView.state,
42
42
  dispatch = editorView.dispatch;
43
+ // Ignored via go/ees005
44
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
43
45
  setPalette(pluginInjectionApi)({
44
46
  isPaletteOpen: isOpen,
45
47
  inputMethod: INPUT_METHOD.TOOLBAR
@@ -1,6 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useState } from 'react';
3
- import { changeColor } from '../../editor-commands';
3
+ import { changeColor } from '../../editor-commands/change-color';
4
4
  export var useDropdownEvents = function useDropdownEvents(args) {
5
5
  var toolbarItemRef = args.toolbarItemRef,
6
6
  setIsDropdownOpen = args.setIsDropdownOpen,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-highlight",
3
- "version": "1.19.4",
3
+ "version": "1.19.6",
4
4
  "description": "Highlight plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,10 +37,10 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@atlaskit/adf-schema": "^46.1.0",
40
- "@atlaskit/editor-common": "^96.5.0",
40
+ "@atlaskit/editor-common": "^98.0.0",
41
41
  "@atlaskit/editor-palette": "1.6.3",
42
42
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
43
- "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
43
+ "@atlaskit/editor-plugin-primary-toolbar": "^2.1.0",
44
44
  "@atlaskit/editor-plugin-text-formatting": "^1.16.0",
45
45
  "@atlaskit/editor-prosemirror": "6.2.1",
46
46
  "@atlaskit/editor-shared-styles": "^3.2.0",
@@ -48,8 +48,8 @@
48
48
  "@atlaskit/icon": "^23.1.0",
49
49
  "@atlaskit/platform-feature-flags": "^0.3.0",
50
50
  "@atlaskit/primitives": "^13.3.0",
51
- "@atlaskit/tmp-editor-statsig": "^2.26.0",
52
- "@atlaskit/tokens": "^2.4.0",
51
+ "@atlaskit/tmp-editor-statsig": "^2.31.0",
52
+ "@atlaskit/tokens": "^2.5.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "@emotion/react": "^11.7.1"
55
55
  },
@@ -86,11 +86,9 @@
86
86
  "ui-components": [
87
87
  "lite-mode"
88
88
  ],
89
- "deprecation": [
90
- "no-deprecated-imports"
91
- ],
89
+ "deprecation": "no-deprecated-imports",
92
90
  "styling": [
93
- "static",
91
+ "emotion",
94
92
  "compiled"
95
93
  ],
96
94
  "imports": [
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "changeColor", {
7
- enumerable: true,
8
- get: function get() {
9
- return _changeColor.changeColor;
10
- }
11
- });
12
- Object.defineProperty(exports, "setPalette", {
13
- enumerable: true,
14
- get: function get() {
15
- return _palette.setPalette;
16
- }
17
- });
18
- Object.defineProperty(exports, "togglePalette", {
19
- enumerable: true,
20
- get: function get() {
21
- return _palette.togglePalette;
22
- }
23
- });
24
- var _changeColor = require("./change-color");
25
- var _palette = require("./palette");
@@ -1,2 +0,0 @@
1
- export { changeColor } from './change-color';
2
- export { setPalette, togglePalette } from './palette';
@@ -1,2 +0,0 @@
1
- export { changeColor } from './change-color';
2
- export { setPalette, togglePalette } from './palette';
@@ -1,2 +0,0 @@
1
- export { changeColor } from './change-color';
2
- export { setPalette, togglePalette } from './palette';
@@ -1,2 +0,0 @@
1
- export { changeColor } from './change-color';
2
- export { setPalette, togglePalette } from './palette';