@ckeditor/ckeditor5-operations-compressor 39.0.1 → 40.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/CHANGELOG.md +1 -1
- package/LICENSE.md +7 -7
- package/README.md +9 -9
- package/package.json +2 -6
- package/src/actioncompressor/actioncompressor.d.ts +60 -60
- package/src/actioncompressor/actioncompressor.js +1 -1
- package/src/actioncompressor/deletingactioncompressor.d.ts +28 -28
- package/src/actioncompressor/deletingactioncompressor.js +1 -1
- package/src/actioncompressor/forwarddeletingactioncompressor.d.ts +28 -28
- package/src/actioncompressor/forwarddeletingactioncompressor.js +1 -1
- package/src/actioncompressor/typingactioncompressor.d.ts +28 -28
- package/src/actioncompressor/typingactioncompressor.js +1 -1
- package/src/actioncompressor/userselectionactioncompressor.d.ts +16 -16
- package/src/actioncompressor/userselectionactioncompressor.js +1 -1
- package/src/compressor.d.ts +45 -45
- package/src/compressor.js +1 -1
- package/src/lib/compiledmessages.js +1 -1
- package/src/operationcompressor/annotationmarkeroperationcompressor.d.ts +22 -22
- package/src/operationcompressor/annotationmarkeroperationcompressor.js +1 -1
- package/src/operationcompressor/attributeoperationcompressor.d.ts +17 -17
- package/src/operationcompressor/attributeoperationcompressor.js +1 -1
- package/src/operationcompressor/insertoperationcompressor.d.ts +17 -17
- package/src/operationcompressor/insertoperationcompressor.js +1 -1
- package/src/operationcompressor/markeroperationcompressor.d.ts +13 -13
- package/src/operationcompressor/markeroperationcompressor.js +1 -1
- package/src/operationcompressor/nooperationcompressor.d.ts +20 -20
- package/src/operationcompressor/nooperationcompressor.js +1 -1
- package/src/operationcompressor/operationcompressor.d.ts +28 -28
- package/src/operationcompressor/operationcompressor.js +1 -1
- package/src/protobufdescriptions.d.ts +4 -4
- package/src/protobufdescriptions.js +1 -1
- package/src/protobuffactory.d.ts +5 -5
- package/src/protobuffactory.js +1 -1
- package/src/utils.d.ts +30 -30
- package/src/utils.js +1 -1
package/src/compressor.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Compresses and decompresses given set of operations in JSON format to/from the binary format using `Protocol Buffers`.
|
|
7
|
-
*/
|
|
8
|
-
export default class Compressor {
|
|
9
|
-
constructor();
|
|
10
|
-
/**
|
|
11
|
-
* Compress given list of operations in JSON format.
|
|
12
|
-
*
|
|
13
|
-
* **Note** It tries to combine typing-like or deleting-like operations into the one buffer.
|
|
14
|
-
* **Note** Input data will be consumed and modified during compression process. If you need untouched data
|
|
15
|
-
* you need to copy it before the compression.
|
|
16
|
-
*/
|
|
17
|
-
compress(operations: Array<any>): CompressedOperationsData;
|
|
18
|
-
/**
|
|
19
|
-
* Decompress given data to the list of operations in JSON format.
|
|
20
|
-
*
|
|
21
|
-
* **Note** Input data will be consumed during decompression process. If you need untouched data
|
|
22
|
-
* you need to copy it before the decompression.
|
|
23
|
-
*
|
|
24
|
-
* @param data Compressed operations.
|
|
25
|
-
* @returns List of operations in JSON format.
|
|
26
|
-
*/
|
|
27
|
-
decompress(data: CompressedOperationsData): Array<any>;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Compressed operations data.
|
|
31
|
-
*/
|
|
32
|
-
export type CompressedOperationsData = {
|
|
33
|
-
/**
|
|
34
|
-
* List of operations compressed to the binary format.
|
|
35
|
-
*/
|
|
36
|
-
buffers: Array<Uint8Array>;
|
|
37
|
-
/**
|
|
38
|
-
* List of compressor identifiers. According to this types a proper compressor will be used for the decompression.
|
|
39
|
-
*/
|
|
40
|
-
types: Array<number>;
|
|
41
|
-
/**
|
|
42
|
-
* Base version of the first compressed operation.
|
|
43
|
-
*/
|
|
44
|
-
baseVersion: number;
|
|
45
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Compresses and decompresses given set of operations in JSON format to/from the binary format using `Protocol Buffers`.
|
|
7
|
+
*/
|
|
8
|
+
export default class Compressor {
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Compress given list of operations in JSON format.
|
|
12
|
+
*
|
|
13
|
+
* **Note** It tries to combine typing-like or deleting-like operations into the one buffer.
|
|
14
|
+
* **Note** Input data will be consumed and modified during compression process. If you need untouched data
|
|
15
|
+
* you need to copy it before the compression.
|
|
16
|
+
*/
|
|
17
|
+
compress(operations: Array<any>): CompressedOperationsData;
|
|
18
|
+
/**
|
|
19
|
+
* Decompress given data to the list of operations in JSON format.
|
|
20
|
+
*
|
|
21
|
+
* **Note** Input data will be consumed during decompression process. If you need untouched data
|
|
22
|
+
* you need to copy it before the decompression.
|
|
23
|
+
*
|
|
24
|
+
* @param data Compressed operations.
|
|
25
|
+
* @returns List of operations in JSON format.
|
|
26
|
+
*/
|
|
27
|
+
decompress(data: CompressedOperationsData): Array<any>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Compressed operations data.
|
|
31
|
+
*/
|
|
32
|
+
export type CompressedOperationsData = {
|
|
33
|
+
/**
|
|
34
|
+
* List of operations compressed to the binary format.
|
|
35
|
+
*/
|
|
36
|
+
buffers: Array<Uint8Array>;
|
|
37
|
+
/**
|
|
38
|
+
* List of compressor identifiers. According to this types a proper compressor will be used for the decompression.
|
|
39
|
+
*/
|
|
40
|
+
types: Array<number>;
|
|
41
|
+
/**
|
|
42
|
+
* Base version of the first compressed operation.
|
|
43
|
+
*/
|
|
44
|
+
baseVersion: number;
|
|
45
|
+
};
|
package/src/compressor.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2850=['_registerActionCompressor','SuggestionMarkerOperation','_compressorByName','ForwardDeletingAction','forEach','_protobufFactory','MergeOperation','suggestion','getDescriptor','MoveOperation','RootAttributeOperation','compress','DeletingAction','baseVersion','NoOperation','_compressorById','_registerOperationCompressor','get','set','MarkerOperation','__className','CommentMarkerOperation','no-operations-provided','RenameOperation','decompress','length','_getCompressorByName','types','RootOperation','_registerCompressor'];(function(_0x448602,_0x285045){const _0x42eaf7=function(_0x50e052){while(--_0x50e052){_0x448602['push'](_0x448602['shift']());}};_0x42eaf7(++_0x285045);}(_0x2850,0x75));const _0x42ea=function(_0x448602,_0x285045){_0x448602=_0x448602-0x0;let _0x42eaf7=_0x2850[_0x448602];return _0x42eaf7;};import{CKEditorError as _0x1effc6}from'ckeditor5/src/utils';import _0x249653 from'./protobuffactory';import _0x14476f from'./operationcompressor/operationcompressor';import _0x59f9e2 from'./operationcompressor/attributeoperationcompressor';import _0xb34dfa from'./operationcompressor/insertoperationcompressor';import _0x10a13c from'./operationcompressor/markeroperationcompressor';import _0x5c681b from'./operationcompressor/nooperationcompressor';import _0x436435 from'./operationcompressor/annotationmarkeroperationcompressor';import _0x401fa8 from'./actioncompressor/typingactioncompressor';import _0x126bd1 from'./actioncompressor/deletingactioncompressor';import _0x4b208a from'./actioncompressor/forwarddeletingactioncompressor';import _0x1459a4 from'./actioncompressor/userselectionactioncompressor';export default class g{constructor(){this[_0x42ea('0x12')]=new Map(),this['_compressorByName']=new Map(),this[_0x42ea('0x8')]=new _0x249653();const _0x19ee3c=this[_0x42ea('0x8')]['getDescriptor'](_0x42ea('0x16'));this[_0x42ea('0x2')](0x1,_0x42ea('0x11'),new _0x5c681b(0x1,_0x42ea('0x11'),void 0x0)),this[_0x42ea('0x13')](0xa,'AttributeOperation',_0x59f9e2),this[_0x42ea('0x13')](0xb,'InsertOperation',_0xb34dfa),this[_0x42ea('0x13')](0xc,'MarkerOperation',_0x10a13c),this[_0x42ea('0x13')](0xd,_0x42ea('0x9'),_0x14476f),this[_0x42ea('0x13')](0xe,_0x42ea('0xc'),_0x14476f),this[_0x42ea('0x13')](0xf,_0x42ea('0x1a'),_0x14476f),this[_0x42ea('0x13')](0x10,_0x42ea('0xd'),_0x59f9e2),this[_0x42ea('0x13')](0x11,'SplitOperation',_0x14476f),this[_0x42ea('0x2')](0x12,_0x42ea('0x18'),new _0x436435(0x12,'MarkerOperation',_0x19ee3c,'comment')),this[_0x42ea('0x2')](0x13,_0x42ea('0x4'),new _0x436435(0x13,'MarkerOperation',_0x19ee3c,_0x42ea('0xa'))),this[_0x42ea('0x13')](0x14,_0x42ea('0x1'),_0x14476f),this[_0x42ea('0x3')](0x64,'TypingAction',_0x401fa8),this[_0x42ea('0x3')](0x65,_0x42ea('0xf'),_0x126bd1),this[_0x42ea('0x3')](0x66,_0x42ea('0x6'),_0x4b208a),this[_0x42ea('0x3')](0x67,'UserSelectionAction',_0x1459a4);}[_0x42ea('0xe')](_0x5b7411){if(!_0x5b7411||!_0x5b7411[0x0])throw new _0x1effc6(_0x42ea('0x19'),this);const _0x317ccc={'types':[],'buffers':[],'baseVersion':_0x5b7411[0x0][_0x42ea('0x10')]};for(;_0x5b7411[_0x42ea('0x1c')];)this[_0x42ea('0x1d')]('UserSelectionAction')[_0x42ea('0xe')](_0x317ccc,_0x5b7411)||this[_0x42ea('0x1d')]('TypingAction')[_0x42ea('0xe')](_0x317ccc,_0x5b7411)||this[_0x42ea('0x1d')]('DeletingAction')[_0x42ea('0xe')](_0x317ccc,_0x5b7411)||this['_getCompressorByName'](_0x42ea('0x6'))[_0x42ea('0xe')](_0x317ccc,_0x5b7411)||this[_0x42ea('0x1d')](_0x42ea('0x18'))['compress'](_0x317ccc,_0x5b7411)||this[_0x42ea('0x1d')](_0x42ea('0x4'))[_0x42ea('0xe')](_0x317ccc,_0x5b7411)||this['_getCompressorByName'](_0x5b7411[0x0][_0x42ea('0x17')])[_0x42ea('0xe')](_0x317ccc,_0x5b7411);return _0x317ccc;}['decompress'](_0x15ee15){const _0x3b92bf=[];for(;_0x15ee15[_0x42ea('0x0')][_0x42ea('0x1c')];){this[_0x42ea('0x12')][_0x42ea('0x14')](_0x15ee15[_0x42ea('0x0')][0x0])[_0x42ea('0x1b')](_0x3b92bf,_0x15ee15);}return _0x3b92bf[_0x42ea('0x7')]((_0xc9b2dc,_0x38b0be)=>_0xc9b2dc[_0x42ea('0x10')]=_0x15ee15[_0x42ea('0x10')]+_0x38b0be),_0x3b92bf;}[_0x42ea('0x1d')](_0x270c2b){return this[_0x42ea('0x5')][_0x42ea('0x14')](_0x270c2b);}[_0x42ea('0x13')](_0x4996cb,_0x5f1345,_0x143b35){const _0x180d4a=new _0x143b35(_0x4996cb,_0x5f1345,this[_0x42ea('0x8')][_0x42ea('0xb')](_0x5f1345));this['_registerCompressor'](_0x4996cb,_0x5f1345,_0x180d4a);}['_registerActionCompressor'](_0xb1a99c,_0x2a735b,_0x1d167b){const _0x399a3d=new _0x1d167b(_0xb1a99c,this);this[_0x42ea('0x2')](_0xb1a99c,_0x2a735b,_0x399a3d);}[_0x42ea('0x2')](_0x48687f,_0x13d974,_0xf20e8){this[_0x42ea('0x12')][_0x42ea('0x15')](_0x48687f,_0xf20e8),this[_0x42ea('0x5')][_0x42ea('0x15')](_0x13d974,_0xf20e8);}}
|