@ckeditor/ckeditor5-utils 37.0.0-alpha.3 → 37.0.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-utils",
|
|
3
|
-
"version": "37.0.0
|
|
3
|
+
"version": "37.0.0",
|
|
4
4
|
"description": "Miscellaneous utilities used by CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"lodash-es": "^4.17.15"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@ckeditor/ckeditor5-build-classic": "^37.0.0
|
|
18
|
-
"@ckeditor/ckeditor5-editor-classic": "^37.0.0
|
|
19
|
-
"@ckeditor/ckeditor5-core": "^37.0.0
|
|
20
|
-
"@ckeditor/ckeditor5-engine": "^37.0.0
|
|
17
|
+
"@ckeditor/ckeditor5-build-classic": "^37.0.0",
|
|
18
|
+
"@ckeditor/ckeditor5-editor-classic": "^37.0.0",
|
|
19
|
+
"@ckeditor/ckeditor5-core": "^37.0.0",
|
|
20
|
+
"@ckeditor/ckeditor5-engine": "^37.0.0",
|
|
21
21
|
"@types/lodash-es": "^4.17.6",
|
|
22
22
|
"typescript": "^4.8.4"
|
|
23
23
|
},
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"typescript"
|
|
26
26
|
],
|
|
27
27
|
"engines": {
|
|
28
|
-
"node": ">=
|
|
28
|
+
"node": ">=16.0.0",
|
|
29
29
|
"npm": ">=5.7.1"
|
|
30
30
|
},
|
|
31
31
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -10,7 +10,7 @@ import type EventInfo from '../eventinfo';
|
|
|
10
10
|
import type { Constructor, Mixed } from '../mix';
|
|
11
11
|
/**
|
|
12
12
|
* Mixin that injects the DOM events API into its host. It provides the API
|
|
13
|
-
* compatible with {@link module:utils/emittermixin~
|
|
13
|
+
* compatible with {@link module:utils/emittermixin~Emitter}.
|
|
14
14
|
*
|
|
15
15
|
* This function creates a class that inherits from the provided `base` and implements `Emitter` interface.
|
|
16
16
|
*
|
|
@@ -35,7 +35,7 @@ import type { Constructor, Mixed } from '../mix';
|
|
|
35
35
|
export default function DomEmitterMixin<Base extends Constructor<Emitter>>(base: Base): Mixed<Base, DomEmitter>;
|
|
36
36
|
/**
|
|
37
37
|
* Mixin that injects the DOM events API into its host. It provides the API
|
|
38
|
-
* compatible with {@link module:utils/emittermixin~
|
|
38
|
+
* compatible with {@link module:utils/emittermixin~Emitter}.
|
|
39
39
|
*
|
|
40
40
|
* This function creates a class that implements `Emitter` interface.
|
|
41
41
|
*
|
package/src/emittermixin.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export default function EmitterMixin(): {
|
|
|
55
55
|
/**
|
|
56
56
|
* Emitter/listener interface.
|
|
57
57
|
*
|
|
58
|
-
* Can be easily implemented by a class by mixing the {@link module:utils/emittermixin~
|
|
58
|
+
* Can be easily implemented by a class by mixing the {@link module:utils/emittermixin~Emitter} mixin.
|
|
59
59
|
*
|
|
60
60
|
* ```ts
|
|
61
61
|
* class MyClass extends EmitterMixin() {
|
|
@@ -76,6 +76,10 @@ export default class KeystrokeHandler {
|
|
|
76
76
|
* @returns Whether the keystroke was handled.
|
|
77
77
|
*/
|
|
78
78
|
press(keyEvtData: Readonly<KeystrokeInfo>): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Stops listening to `keydown` events from the given emitter.
|
|
81
|
+
*/
|
|
82
|
+
stopListening(emitter?: Emitter | HTMLElement | Window): void;
|
|
79
83
|
/**
|
|
80
84
|
* Destroys the keystroke handler.
|
|
81
85
|
*/
|
package/src/keystrokehandler.js
CHANGED
|
@@ -107,10 +107,16 @@ export default class KeystrokeHandler {
|
|
|
107
107
|
press(keyEvtData) {
|
|
108
108
|
return !!this._listener.fire('_keydown:' + getCode(keyEvtData), keyEvtData);
|
|
109
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Stops listening to `keydown` events from the given emitter.
|
|
112
|
+
*/
|
|
113
|
+
stopListening(emitter) {
|
|
114
|
+
this._listener.stopListening(emitter);
|
|
115
|
+
}
|
|
110
116
|
/**
|
|
111
117
|
* Destroys the keystroke handler.
|
|
112
118
|
*/
|
|
113
119
|
destroy() {
|
|
114
|
-
this.
|
|
120
|
+
this.stopListening();
|
|
115
121
|
}
|
|
116
122
|
}
|
package/src/observablemixin.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export default function ObservableMixin(): {
|
|
|
55
55
|
/**
|
|
56
56
|
* An interface which adds "observable properties" and data binding functionality.
|
|
57
57
|
*
|
|
58
|
-
* Can be easily implemented by a class by mixing the {@link module:utils/observablemixin~
|
|
58
|
+
* Can be easily implemented by a class by mixing the {@link module:utils/observablemixin~Observable} mixin.
|
|
59
59
|
*
|
|
60
60
|
* ```ts
|
|
61
61
|
* class MyClass extends ObservableMixin( OtherBaseClass ) {
|
package/src/version.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
declare const version = "37.0.0
|
|
5
|
+
declare const version = "37.0.0";
|
|
6
6
|
export default version;
|
|
7
7
|
declare global {
|
|
8
8
|
var CKEDITOR_VERSION: string;
|
package/src/version.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/* globals window, global */
|
|
9
9
|
import CKEditorError from './ckeditorerror';
|
|
10
|
-
const version = '37.0.0
|
|
10
|
+
const version = '37.0.0';
|
|
11
11
|
export default version;
|
|
12
12
|
/* istanbul ignore next */
|
|
13
13
|
const windowOrGlobal = typeof window === 'object' ? window : global;
|