@ckeditor/ckeditor5-typing 35.3.1 → 35.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-typing",
3
- "version": "35.3.1",
3
+ "version": "35.4.0",
4
4
  "description": "Typing feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -12,29 +12,29 @@
12
12
  ],
13
13
  "main": "src/index.js",
14
14
  "dependencies": {
15
- "@ckeditor/ckeditor5-core": "^35.3.1",
16
- "@ckeditor/ckeditor5-engine": "^35.3.1",
17
- "@ckeditor/ckeditor5-utils": "^35.3.1",
15
+ "@ckeditor/ckeditor5-core": "^35.4.0",
16
+ "@ckeditor/ckeditor5-engine": "^35.4.0",
17
+ "@ckeditor/ckeditor5-utils": "^35.4.0",
18
18
  "lodash-es": "^4.17.15"
19
19
  },
20
20
  "devDependencies": {
21
- "@ckeditor/ckeditor5-autoformat": "^35.3.1",
22
- "@ckeditor/ckeditor5-basic-styles": "^35.3.1",
23
- "@ckeditor/ckeditor5-block-quote": "^35.3.1",
24
- "@ckeditor/ckeditor5-code-block": "^35.3.1",
25
- "@ckeditor/ckeditor5-editor-classic": "^35.3.1",
26
- "@ckeditor/ckeditor5-enter": "^35.3.1",
27
- "@ckeditor/ckeditor5-essentials": "^35.3.1",
28
- "@ckeditor/ckeditor5-heading": "^35.3.1",
29
- "@ckeditor/ckeditor5-image": "^35.3.1",
30
- "@ckeditor/ckeditor5-indent": "^35.3.1",
31
- "@ckeditor/ckeditor5-link": "^35.3.1",
32
- "@ckeditor/ckeditor5-list": "^35.3.1",
33
- "@ckeditor/ckeditor5-media-embed": "^35.3.1",
34
- "@ckeditor/ckeditor5-mention": "^35.3.1",
35
- "@ckeditor/ckeditor5-paragraph": "^35.3.1",
36
- "@ckeditor/ckeditor5-table": "^35.3.1",
37
- "@ckeditor/ckeditor5-undo": "^35.3.1",
21
+ "@ckeditor/ckeditor5-autoformat": "^35.4.0",
22
+ "@ckeditor/ckeditor5-basic-styles": "^35.4.0",
23
+ "@ckeditor/ckeditor5-block-quote": "^35.4.0",
24
+ "@ckeditor/ckeditor5-code-block": "^35.4.0",
25
+ "@ckeditor/ckeditor5-editor-classic": "^35.4.0",
26
+ "@ckeditor/ckeditor5-enter": "^35.4.0",
27
+ "@ckeditor/ckeditor5-essentials": "^35.4.0",
28
+ "@ckeditor/ckeditor5-heading": "^35.4.0",
29
+ "@ckeditor/ckeditor5-image": "^35.4.0",
30
+ "@ckeditor/ckeditor5-indent": "^35.4.0",
31
+ "@ckeditor/ckeditor5-link": "^35.4.0",
32
+ "@ckeditor/ckeditor5-list": "^35.4.0",
33
+ "@ckeditor/ckeditor5-media-embed": "^35.4.0",
34
+ "@ckeditor/ckeditor5-mention": "^35.4.0",
35
+ "@ckeditor/ckeditor5-paragraph": "^35.4.0",
36
+ "@ckeditor/ckeditor5-table": "^35.4.0",
37
+ "@ckeditor/ckeditor5-undo": "^35.4.0",
38
38
  "typescript": "^4.8.4",
39
39
  "webpack": "^5.58.1",
40
40
  "webpack-cli": "^4.9.0"
package/src/delete.js CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module typing/delete
7
7
  */
8
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
9
  import DeleteCommand from './deletecommand';
10
10
  import DeleteObserver from './deleteobserver';
11
11
  /**
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module typing/deletecommand
7
7
  */
8
- import Command from '@ckeditor/ckeditor5-core/src/command';
9
- import count from '@ckeditor/ckeditor5-utils/src/count';
8
+ import { Command } from '@ckeditor/ckeditor5-core';
9
+ import { count } from '@ckeditor/ckeditor5-utils';
10
10
  import ChangeBuffer from './utils/changebuffer';
11
11
  // Import config.typing declaration.
12
12
  import './typingconfig';
@@ -5,10 +5,8 @@
5
5
  /**
6
6
  * @module typing/deleteobserver
7
7
  */
8
- import Observer from '@ckeditor/ckeditor5-engine/src/view/observer/observer';
9
- import DomEventData from '@ckeditor/ckeditor5-engine/src/view/observer/domeventdata';
10
- import BubblingEventInfo from '@ckeditor/ckeditor5-engine/src/view/observer/bubblingeventinfo';
11
8
  import { env, keyCodes } from '@ckeditor/ckeditor5-utils';
9
+ import { BubblingEventInfo, DomEventData, Observer } from '@ckeditor/ckeditor5-engine';
12
10
  const DELETE_CHARACTER = 'character';
13
11
  const DELETE_WORD = 'word';
14
12
  const DELETE_CODE_POINT = 'codePoint';
@@ -204,7 +202,7 @@ function enableChromeWorkaround(observer) {
204
202
  if (isMatchingBeforeInput) {
205
203
  beforeInputReceived = true;
206
204
  }
207
- });
205
+ }, { priority: 'high' });
208
206
  document.on('beforeinput', (evt, { inputType, data }) => {
209
207
  const shouldIgnoreBeforeInput = pressedKeyCode == keyCodes.delete &&
210
208
  inputType == 'insertText' &&
package/src/input.js CHANGED
@@ -5,10 +5,10 @@
5
5
  /**
6
6
  * @module typing/input
7
7
  */
8
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ import { env } from '@ckeditor/ckeditor5-utils';
9
10
  import InsertTextCommand from './inserttextcommand';
10
11
  import InsertTextObserver from './inserttextobserver';
11
- import env from '@ckeditor/ckeditor5-utils/src/env';
12
12
  // Import config.typing declaration.
13
13
  import './typingconfig';
14
14
  /**
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module typing/inserttextcommand
7
7
  */
8
- import Command from '@ckeditor/ckeditor5-core/src/command';
8
+ import { Command } from '@ckeditor/ckeditor5-core';
9
9
  import ChangeBuffer from './utils/changebuffer';
10
10
  /**
11
11
  * The insert text command. Used by the {@link module:typing/input~Input input feature} to handle typing.
@@ -5,10 +5,8 @@
5
5
  /**
6
6
  * @module typing/inserttextobserver
7
7
  */
8
- import DomEventData from '@ckeditor/ckeditor5-engine/src/view/observer/domeventdata';
9
- import Observer from '@ckeditor/ckeditor5-engine/src/view/observer/observer';
10
- import EventInfo from '@ckeditor/ckeditor5-utils/src/eventinfo';
11
- import env from '@ckeditor/ckeditor5-utils/src/env';
8
+ import { env, EventInfo } from '@ckeditor/ckeditor5-utils';
9
+ import { DomEventData, Observer } from '@ckeditor/ckeditor5-engine';
12
10
  const TYPING_INPUT_TYPES = [
13
11
  // For collapsed range:
14
12
  // - This one is a regular typing (all browsers, all systems).
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module typing/texttransformation
7
7
  */
8
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
9
  import TextWatcher from './textwatcher';
10
10
  import { escapeRegExp } from 'lodash-es';
11
11
  // All named transformations.
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module typing/textwatcher
7
7
  */
8
- import { Observable } from '@ckeditor/ckeditor5-utils/src/observablemixin';
8
+ import { ObservableMixin } from '@ckeditor/ckeditor5-utils';
9
9
  import getLastTextLine from './utils/getlasttextline';
10
10
  /**
11
11
  * The text watcher feature.
@@ -17,7 +17,7 @@ import getLastTextLine from './utils/getlasttextline';
17
17
  * @private
18
18
  * @mixes module:utils/observablemixin~ObservableMixin
19
19
  */
20
- export default class TextWatcher extends Observable {
20
+ export default class TextWatcher extends ObservableMixin() {
21
21
  /**
22
22
  * Creates a text watcher instance.
23
23
  *
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module typing/twostepcaretmovement
7
7
  */
8
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
9
- import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ import { keyCodes } from '@ckeditor/ckeditor5-utils';
10
10
  /**
11
11
  * This plugin enables the two-step caret (phantom) movement behavior for
12
12
  * {@link module:typing/twostepcaretmovement~TwoStepCaretMovement#registerAttribute registered attributes}
@@ -99,6 +99,12 @@ import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
99
99
  *
100
100
  */
101
101
  export default class TwoStepCaretMovement extends Plugin {
102
+ /**
103
+ * @inheritDoc
104
+ */
105
+ static get pluginName() {
106
+ return 'TwoStepCaretMovement';
107
+ }
102
108
  /**
103
109
  * @inheritDoc
104
110
  */
@@ -120,12 +126,6 @@ export default class TwoStepCaretMovement extends Plugin {
120
126
  */
121
127
  this._overrideUid = null;
122
128
  }
123
- /**
124
- * @inheritDoc
125
- */
126
- static get pluginName() {
127
- return 'TwoStepCaretMovement';
128
- }
129
129
  /**
130
130
  * @inheritDoc
131
131
  */
package/src/typing.js CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module typing/typing
7
7
  */
8
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
9
  import Input from './input';
10
10
  import Delete from './delete';
11
11
  /**