@atlaskit/editor-core 188.13.0 → 188.13.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,17 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 188.13.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#41634](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41634) [`e7cd20932b9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e7cd20932b9) - on windows, toggles mark when the capslock is on
8
+
9
+ ## 188.13.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#41501](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41501) [`67d84139104`](https://bitbucket.org/atlassian/atlassian-frontend/commits/67d84139104) - Update comment to point to the correct file
14
+
3
15
  ## 188.13.0
4
16
 
5
17
  ### Minor Changes
@@ -4,11 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.keymapPlugin = keymapPlugin;
7
+ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
7
8
  var _keymaps = require("@atlaskit/editor-common/keymaps");
8
9
  var _commands = require("../commands");
10
+ var _keymap = require("@atlaskit/editor-prosemirror/keymap");
9
11
  function keymapPlugin() {
10
12
  var list = {};
11
13
  (0, _keymaps.bindKeymapWithCommand)((0, _keymaps.findKeyMapForBrowser)(_keymaps.redo), _commands.redoFromKeyboard, list);
12
14
  (0, _keymaps.bindKeymapWithCommand)(_keymaps.undo.common, _commands.undoFromKeyboard, list);
13
- return (0, _keymaps.keymap)(list);
15
+ return new _safePlugin.SafePlugin({
16
+ props: {
17
+ handleKeyDown: function handleKeyDown(view, event) {
18
+ var keyboardEvent = (0, _keymaps.isCapsLockOnAndModifyKeyboardEvent)(event);
19
+ return (0, _keymap.keydownHandler)(list)(view, keyboardEvent);
20
+ }
21
+ }
22
+ });
14
23
  }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "188.13.0";
8
+ var version = exports.version = "188.13.2";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -1,8 +1,17 @@
1
- import { undo, redo, keymap, bindKeymapWithCommand, findKeyMapForBrowser } from '@atlaskit/editor-common/keymaps';
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { undo, redo, bindKeymapWithCommand, findKeyMapForBrowser, isCapsLockOnAndModifyKeyboardEvent } from '@atlaskit/editor-common/keymaps';
2
3
  import { redoFromKeyboard, undoFromKeyboard } from '../commands';
4
+ import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
3
5
  export function keymapPlugin() {
4
6
  const list = {};
5
7
  bindKeymapWithCommand(findKeyMapForBrowser(redo), redoFromKeyboard, list);
6
8
  bindKeymapWithCommand(undo.common, undoFromKeyboard, list);
7
- return keymap(list);
9
+ return new SafePlugin({
10
+ props: {
11
+ handleKeyDown(view, event) {
12
+ let keyboardEvent = isCapsLockOnAndModifyKeyboardEvent(event);
13
+ return keydownHandler(list)(view, keyboardEvent);
14
+ }
15
+ }
16
+ });
8
17
  }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "188.13.0";
2
+ export const version = "188.13.2";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,8 +1,17 @@
1
- import { undo, redo, keymap, bindKeymapWithCommand, findKeyMapForBrowser } from '@atlaskit/editor-common/keymaps';
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { undo, redo, bindKeymapWithCommand, findKeyMapForBrowser, isCapsLockOnAndModifyKeyboardEvent } from '@atlaskit/editor-common/keymaps';
2
3
  import { redoFromKeyboard, undoFromKeyboard } from '../commands';
4
+ import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
3
5
  export function keymapPlugin() {
4
6
  var list = {};
5
7
  bindKeymapWithCommand(findKeyMapForBrowser(redo), redoFromKeyboard, list);
6
8
  bindKeymapWithCommand(undo.common, undoFromKeyboard, list);
7
- return keymap(list);
9
+ return new SafePlugin({
10
+ props: {
11
+ handleKeyDown: function handleKeyDown(view, event) {
12
+ var keyboardEvent = isCapsLockOnAndModifyKeyboardEvent(event);
13
+ return keydownHandler(list)(view, keyboardEvent);
14
+ }
15
+ }
16
+ });
8
17
  }
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "188.13.0";
2
+ export var version = "188.13.2";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,2 +1,2 @@
1
- import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  export declare function keymapPlugin(): SafePlugin;
@@ -1,2 +1,2 @@
1
- import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  export declare function keymapPlugin(): SafePlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "188.13.0",
3
+ "version": "188.13.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
49
49
  "@atlaskit/avatar": "^21.4.0",
50
50
  "@atlaskit/avatar-group": "^9.4.0",
51
- "@atlaskit/button": "^16.10.0",
51
+ "@atlaskit/button": "^16.11.0",
52
52
  "@atlaskit/checkbox": "^12.6.0",
53
53
  "@atlaskit/code": "^14.6.0",
54
54
  "@atlaskit/date": "^0.10.0",