@ckeditor/ckeditor5-typing 38.0.1 → 38.1.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": "38.0.1",
3
+ "version": "38.1.0",
4
4
  "description": "Typing feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -12,33 +12,11 @@
12
12
  ],
13
13
  "main": "src/index.js",
14
14
  "dependencies": {
15
- "@ckeditor/ckeditor5-core": "^38.0.1",
16
- "@ckeditor/ckeditor5-engine": "^38.0.1",
17
- "@ckeditor/ckeditor5-utils": "^38.0.1",
15
+ "@ckeditor/ckeditor5-core": "38.1.0",
16
+ "@ckeditor/ckeditor5-engine": "38.1.0",
17
+ "@ckeditor/ckeditor5-utils": "38.1.0",
18
18
  "lodash-es": "^4.17.15"
19
19
  },
20
- "devDependencies": {
21
- "@ckeditor/ckeditor5-autoformat": "^38.0.1",
22
- "@ckeditor/ckeditor5-basic-styles": "^38.0.1",
23
- "@ckeditor/ckeditor5-block-quote": "^38.0.1",
24
- "@ckeditor/ckeditor5-code-block": "^38.0.1",
25
- "@ckeditor/ckeditor5-editor-classic": "^38.0.1",
26
- "@ckeditor/ckeditor5-enter": "^38.0.1",
27
- "@ckeditor/ckeditor5-essentials": "^38.0.1",
28
- "@ckeditor/ckeditor5-heading": "^38.0.1",
29
- "@ckeditor/ckeditor5-image": "^38.0.1",
30
- "@ckeditor/ckeditor5-indent": "^38.0.1",
31
- "@ckeditor/ckeditor5-link": "^38.0.1",
32
- "@ckeditor/ckeditor5-list": "^38.0.1",
33
- "@ckeditor/ckeditor5-media-embed": "^38.0.1",
34
- "@ckeditor/ckeditor5-mention": "^38.0.1",
35
- "@ckeditor/ckeditor5-paragraph": "^38.0.1",
36
- "@ckeditor/ckeditor5-table": "^38.0.1",
37
- "@ckeditor/ckeditor5-undo": "^38.0.1",
38
- "typescript": "^4.8.4",
39
- "webpack": "^5.58.1",
40
- "webpack-cli": "^4.9.0"
41
- },
42
20
  "engines": {
43
21
  "node": ">=16.0.0",
44
22
  "npm": ">=5.7.1"
@@ -60,9 +38,5 @@
60
38
  "ckeditor5-metadata.json",
61
39
  "CHANGELOG.md"
62
40
  ],
63
- "scripts": {
64
- "build": "tsc -p ./tsconfig.json",
65
- "postversion": "npm run build"
66
- },
67
41
  "types": "src/index.d.ts"
68
42
  }
package/src/delete.d.ts CHANGED
@@ -18,7 +18,7 @@ export default class Delete extends Plugin {
18
18
  /**
19
19
  * @inheritDoc
20
20
  */
21
- static get pluginName(): 'Delete';
21
+ static get pluginName(): "Delete";
22
22
  /**
23
23
  * @inheritDoc
24
24
  */
package/src/input.d.ts CHANGED
@@ -13,7 +13,7 @@ export default class Input extends Plugin {
13
13
  /**
14
14
  * @inheritDoc
15
15
  */
16
- static get pluginName(): 'Input';
16
+ static get pluginName(): "Input";
17
17
  /**
18
18
  * @inheritDoc
19
19
  */
@@ -17,7 +17,7 @@ export default class TextTransformation extends Plugin {
17
17
  /**
18
18
  * @inheritDoc
19
19
  */
20
- static get pluginName(): 'TextTransformation';
20
+ static get pluginName(): "TextTransformation";
21
21
  /**
22
22
  * @inheritDoc
23
23
  */
@@ -148,7 +148,7 @@ export default class TwoStepCaretMovement extends Plugin {
148
148
  /**
149
149
  * @inheritDoc
150
150
  */
151
- static get pluginName(): 'TwoStepCaretMovement';
151
+ static get pluginName(): "TwoStepCaretMovement";
152
152
  /**
153
153
  * @inheritDoc
154
154
  */
package/src/typing.d.ts CHANGED
@@ -19,5 +19,5 @@ export default class Typing extends Plugin {
19
19
  /**
20
20
  * @inheritDoc
21
21
  */
22
- static get pluginName(): 'Typing';
22
+ static get pluginName(): "Typing";
23
23
  }
@@ -31,13 +31,13 @@
31
31
  */
32
32
  export default function getLastTextLine(range, model) {
33
33
  let start = range.start;
34
- const text = Array.from(range.getItems()).reduce((rangeText, node) => {
34
+ const text = Array.from(range.getWalker({ ignoreElementEnd: false })).reduce((rangeText, { item }) => {
35
35
  // Trim text to a last occurrence of an inline element and update range start.
36
- if (!(node.is('$text') || node.is('$textProxy'))) {
37
- start = model.createPositionAfter(node);
36
+ if (!(item.is('$text') || item.is('$textProxy'))) {
37
+ start = model.createPositionAfter(item);
38
38
  return '';
39
39
  }
40
- return rangeText + node.data;
40
+ return rangeText + item.data;
41
41
  }, '');
42
42
  return { text, range: model.createRange(start, range.end) };
43
43
  }