@ckeditor/ckeditor5-operations-compressor 41.3.0-alpha.3 → 41.3.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 +2 -3
- package/src/actioncompressor/actioncompressor.js +1 -1
- package/src/actioncompressor/deletingactioncompressor.js +1 -1
- package/src/actioncompressor/forwarddeletingactioncompressor.js +1 -1
- package/src/actioncompressor/typingactioncompressor.js +1 -1
- package/src/actioncompressor/userselectionactioncompressor.js +1 -1
- package/src/compressor.js +1 -1
- package/src/lib/compiledmessages.js +1 -1
- package/src/operationcompressor/annotationmarkeroperationcompressor.js +1 -1
- package/src/operationcompressor/attributeoperationcompressor.js +1 -1
- package/src/operationcompressor/insertoperationcompressor.js +1 -1
- package/src/operationcompressor/markeroperationcompressor.js +1 -1
- package/src/operationcompressor/nooperationcompressor.js +1 -1
- package/src/operationcompressor/operationcompressor.js +1 -1
- package/src/protobufdescriptions.js +1 -1
- package/src/protobuffactory.js +1 -1
- package/src/utils.js +1 -1
- package/dist/content-index.css +0 -4
- package/dist/editor-index.css +0 -4
- package/dist/index.css +0 -4
- package/dist/types/actioncompressor/actioncompressor.d.ts +0 -64
- package/dist/types/actioncompressor/deletingactioncompressor.d.ts +0 -32
- package/dist/types/actioncompressor/forwarddeletingactioncompressor.d.ts +0 -32
- package/dist/types/actioncompressor/typingactioncompressor.d.ts +0 -32
- package/dist/types/actioncompressor/userselectionactioncompressor.d.ts +0 -20
- package/dist/types/compressor.d.ts +0 -49
- package/dist/types/index.d.ts +0 -9
- package/dist/types/operationcompressor/annotationmarkeroperationcompressor.d.ts +0 -26
- package/dist/types/operationcompressor/attributeoperationcompressor.d.ts +0 -21
- package/dist/types/operationcompressor/insertoperationcompressor.d.ts +0 -21
- package/dist/types/operationcompressor/markeroperationcompressor.d.ts +0 -17
- package/dist/types/operationcompressor/nooperationcompressor.d.ts +0 -24
- package/dist/types/operationcompressor/operationcompressor.d.ts +0 -32
- package/dist/types/protobufdescriptions.d.ts +0 -8
- package/dist/types/protobuffactory.d.ts +0 -9
- package/dist/types/utils.d.ts +0 -34
- package/src/index.d.ts +0 -5
- package/src/index.js +0 -23
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
'use strict';
|
|
23
|
+
'use strict';function _0x2dee(){var _0x329eb9=['exports','1876wGoASt','Range','4121307vAuhNV','12774zYZrYq','Position','string','6227864bhiyya','repeated','77oVlpOu','543TzEMot','uint32','11848mdLVcv','14588120vgLqSR','bool','2448870wrWJtO','Element','16744FiNlju'];_0x2dee=function(){return _0x329eb9;};return _0x2dee();}var _0x158bd6=_0x4640;(function(_0x2a6f8d,_0x27d18a){var _0xe54a75=_0x4640,_0x50e640=_0x2a6f8d();while(!![]){try{var _0x2c9ec3=-parseInt(_0xe54a75(0x1cf))/0x1*(-parseInt(_0xe54a75(0x1d2))/0x2)+parseInt(_0xe54a75(0x1d0))/0x3*(parseInt(_0xe54a75(0x1d7))/0x4)+parseInt(_0xe54a75(0x1d5))/0x5+-parseInt(_0xe54a75(0x1dc))/0x6*(-parseInt(_0xe54a75(0x1d9))/0x7)+-parseInt(_0xe54a75(0x1cd))/0x8+parseInt(_0xe54a75(0x1db))/0x9+-parseInt(_0xe54a75(0x1d3))/0xa;if(_0x2c9ec3===_0x27d18a)break;else _0x50e640['push'](_0x50e640['shift']());}catch(_0x3dbd7e){_0x50e640['push'](_0x50e640['shift']());}}}(_0x2dee,0x78cc4));function _0x4640(_0x4cf475,_0x11260c){var _0x2deec1=_0x2dee();return _0x4640=function(_0x4640f6,_0x501b34){_0x4640f6=_0x4640f6-0x1cd;var _0x57c080=_0x2deec1[_0x4640f6];return _0x57c080;},_0x4640(_0x4cf475,_0x11260c);}module[_0x158bd6(0x1d8)]={'AttributeOperation':{'fields':{'range':{'type':_0x158bd6(0x1da),'id':0x1},'key':{'type':_0x158bd6(0x1de),'id':0x2},'oldValueBoolean':{'type':_0x158bd6(0x1d4),'id':0x3},'oldValueJson':{'type':_0x158bd6(0x1de),'id':0x4},'newValueBoolean':{'type':_0x158bd6(0x1d4),'id':0x5},'newValueJson':{'type':_0x158bd6(0x1de),'id':0x6},'wasUndone':{'type':_0x158bd6(0x1d4),'id':0x7}}},'InsertOperation':{'fields':{'position':{'type':_0x158bd6(0x1dd),'id':0x1},'nodes':{'rule':_0x158bd6(0x1ce),'type':_0x158bd6(0x1d6),'id':0x2},'shouldReceiveAttributes':{'type':_0x158bd6(0x1d4),'id':0x3},'wasUndone':{'type':_0x158bd6(0x1d4),'id':0x4}}},'MarkerOperation':{'fields':{'name':{'type':_0x158bd6(0x1de),'id':0x1},'oldRange':{'type':_0x158bd6(0x1da),'id':0x2},'newRange':{'type':_0x158bd6(0x1da),'id':0x3},'affectsData':{'type':_0x158bd6(0x1d4),'id':0x4},'wasUndone':{'type':_0x158bd6(0x1d4),'id':0x5}}},'MergeOperation':{'fields':{'sourcePosition':{'type':_0x158bd6(0x1dd),'id':0x1},'targetPosition':{'type':_0x158bd6(0x1dd),'id':0x2},'graveyardPosition':{'type':_0x158bd6(0x1dd),'id':0x3},'howMany':{'type':_0x158bd6(0x1d1),'id':0x4},'wasUndone':{'type':_0x158bd6(0x1d4),'id':0x5}}},'MoveOperation':{'fields':{'sourcePosition':{'type':_0x158bd6(0x1dd),'id':0x1},'howMany':{'type':_0x158bd6(0x1d1),'id':0x2},'targetPosition':{'type':_0x158bd6(0x1dd),'id':0x3},'wasUndone':{'type':_0x158bd6(0x1d4),'id':0x4}}},'RenameOperation':{'fields':{'position':{'type':_0x158bd6(0x1dd),'id':0x1},'oldName':{'type':_0x158bd6(0x1de),'id':0x2},'newName':{'type':_0x158bd6(0x1de),'id':0x3},'wasUndone':{'type':_0x158bd6(0x1d4),'id':0x4}}},'RootAttributeOperation':{'fields':{'root':{'type':_0x158bd6(0x1de),'id':0x1},'key':{'type':_0x158bd6(0x1de),'id':0x2},'oldValueBoolean':{'type':_0x158bd6(0x1d4),'id':0x3},'oldValueJson':{'type':_0x158bd6(0x1de),'id':0x4},'newValueBoolean':{'type':_0x158bd6(0x1d4),'id':0x5},'newValueJson':{'type':_0x158bd6(0x1de),'id':0x6},'wasUndone':{'type':_0x158bd6(0x1d4),'id':0x7}}},'RootOperation':{'fields':{'rootName':{'type':_0x158bd6(0x1de),'id':0x1},'elementName':{'type':_0x158bd6(0x1de),'id':0x2},'isAdd':{'type':_0x158bd6(0x1d4),'id':0x3},'wasUndone':{'type':_0x158bd6(0x1d4),'id':0x4}}},'SplitOperation':{'fields':{'splitPosition':{'type':_0x158bd6(0x1dd),'id':0x1},'graveyardPosition':{'type':_0x158bd6(0x1dd),'id':0x2},'howMany':{'type':_0x158bd6(0x1d1),'id':0x3},'insertionPosition':{'type':_0x158bd6(0x1dd),'id':0x4},'wasUndone':{'type':_0x158bd6(0x1d4),'id':0x5}}},'Position':{'fields':{'root':{'type':_0x158bd6(0x1de),'id':0x1},'rootMain':{'type':_0x158bd6(0x1d4),'id':0x2},'rootGraveyard':{'type':_0x158bd6(0x1d4),'id':0x3},'path':{'rule':_0x158bd6(0x1ce),'type':_0x158bd6(0x1d1),'id':0x4},'stickiness':{'type':_0x158bd6(0x1de),'id':0x5}}},'Range':{'fields':{'start':{'type':_0x158bd6(0x1dd),'id':0x1},'end':{'type':_0x158bd6(0x1dd),'id':0x2}}},'Element':{'fields':{'name':{'type':_0x158bd6(0x1de),'id':0x1},'children':{'rule':_0x158bd6(0x1ce),'type':_0x158bd6(0x1d6),'id':0x2},'data':{'type':_0x158bd6(0x1de),'id':0x3},'attributesBoolean':{'keyType':_0x158bd6(0x1de),'type':_0x158bd6(0x1d4),'id':0x4},'attributesJson':{'type':_0x158bd6(0x1de),'id':0x5}}}};
|
package/src/protobuffactory.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x4fd8ce=_0x4764;(function(_0x468d6b,_0x3702a3){const _0x5979a8=_0x4764,_0x5cffdc=_0x468d6b();while(!![]){try{const _0x356732=-parseInt(_0x5979a8(0x173))/0x1+-parseInt(_0x5979a8(0x168))/0x2*(parseInt(_0x5979a8(0x16f))/0x3)+-parseInt(_0x5979a8(0x16a))/0x4*(parseInt(_0x5979a8(0x175))/0x5)+-parseInt(_0x5979a8(0x172))/0x6+-parseInt(_0x5979a8(0x17b))/0x7*(-parseInt(_0x5979a8(0x169))/0x8)+-parseInt(_0x5979a8(0x171))/0x9*(-parseInt(_0x5979a8(0x16d))/0xa)+parseInt(_0x5979a8(0x177))/0xb;if(_0x356732===_0x3702a3)break;else _0x5cffdc['push'](_0x5cffdc['shift']());}catch(_0x652fca){_0x5cffdc['push'](_0x5cffdc['shift']());}}}(_0x1407,0xd232c));function _0x4764(_0x3d1de4,_0x5cae2d){const _0x14073a=_0x1407();return _0x4764=function(_0x476440,_0x44227a){_0x476440=_0x476440-0x167;let _0x598370=_0x14073a[_0x476440];return _0x598370;},_0x4764(_0x3d1de4,_0x5cae2d);}import*as _0x4c2d2d from'./lib/compiledmessages.js';export default class r{constructor(){const _0x4c4648=_0x4764;this[_0x4c4648(0x179)]=_0x4c2d2d;}[_0x4fd8ce(0x178)](_0x505738){const _0x1b6896=_0x4fd8ce;return new ProtobufDescriptor(this[_0x1b6896(0x179)][_0x505738]);}}export class ProtobufDescriptor{constructor(_0x3f1b49){const _0x330d02=_0x4fd8ce;this[_0x330d02(0x16c)]=_0x3f1b49;}[_0x4fd8ce(0x170)](_0x51458e){const _0x9cf748=_0x4fd8ce,_0x181e2e=this[_0x9cf748(0x16c)][_0x9cf748(0x17a)](_0x51458e);if(_0x181e2e)throw Error(_0x181e2e);return this[_0x9cf748(0x16c)][_0x9cf748(0x174)](this[_0x9cf748(0x16c)][_0x9cf748(0x16b)](_0x51458e))[_0x9cf748(0x176)]();}[_0x4fd8ce(0x17c)](_0x427c42){const _0x440f81=_0x4fd8ce;return this[_0x440f81(0x16c)][_0x440f81(0x16e)](this[_0x440f81(0x16c)][_0x440f81(0x167)](_0x427c42),{'oneofs':!0x0});}}function _0x1407(){const _0x7fcb93=['580RzMnmm','finish','34878789WniAUK','getDescriptor','_protobufRoot','verify','156359TlzXHF','decompress','decode','1448518kmfhvq','200icXiSn','42552ePVgDe','create','_protobuf','810hxTCdQ','toObject','3DTeyAs','compress','161739CJsSct','4213734puqyDa','1663347CoOuHy','encode'];_0x1407=function(){return _0x7fcb93;};return _0x1407();}
|
package/src/utils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x8e6feb,_0x5c3bbd){const _0x5bacdd=_0x23bc,_0x4d1f06=_0x8e6feb();while(!![]){try{const _0x3b55eb=-parseInt(_0x5bacdd(0x1d7))/0x1*(-parseInt(_0x5bacdd(0x1dd))/0x2)+parseInt(_0x5bacdd(0x1de))/0x3+parseInt(_0x5bacdd(0x1d8))/0x4+-parseInt(_0x5bacdd(0x1e3))/0x5*(-parseInt(_0x5bacdd(0x1dc))/0x6)+-parseInt(_0x5bacdd(0x1df))/0x7+parseInt(_0x5bacdd(0x1d5))/0x8+-parseInt(_0x5bacdd(0x1e1))/0x9;if(_0x3b55eb===_0x5c3bbd)break;else _0x4d1f06['push'](_0x4d1f06['shift']());}catch(_0x9ca0c8){_0x4d1f06['push'](_0x4d1f06['shift']());}}}(_0x9891,0xd1361));import{cloneDeep as _0x282a30,isEqual as _0xb503ba,isObject as _0x579f26}from'lodash-es';export function getPositionShiftedBy(_0x59efeb,_0x59fa33){const _0x2c3cf4=_0x23bc,_0x1a16f3=_0x282a30(_0x59efeb);return _0x1a16f3[_0x2c3cf4(0x1db)][_0x1a16f3[_0x2c3cf4(0x1db)][_0x2c3cf4(0x1e4)]-0x1]+=_0x59fa33,_0x1a16f3;}export function arePositionsEqual(_0x3bcee5,_0x36e02f){const _0x41f674=_0x23bc;return _0x3bcee5[_0x41f674(0x1da)]===_0x36e02f[_0x41f674(0x1da)]&&_0xb503ba(_0x3bcee5[_0x41f674(0x1db)],_0x36e02f[_0x41f674(0x1db)]);}export function parsePositionBeforeCompression(_0xf94b7b){const _0x1d0c33=_0x23bc;P(_0xf94b7b,_0x27d99a=>(_0x1d0c33(0x1d9)==_0x27d99a[_0x1d0c33(0x1da)]?(_0x27d99a[_0x1d0c33(0x1d6)]=!0x0,delete _0x27d99a[_0x1d0c33(0x1da)]):_0x1d0c33(0x1d4)==_0x27d99a[_0x1d0c33(0x1da)]&&(_0x27d99a[_0x1d0c33(0x1e0)]=!0x0,delete _0x27d99a[_0x1d0c33(0x1da)]),_0x27d99a));}function _0x9891(){const _0x4cd4d2=['6553896KODSEd','rootMain','5903WGYLHI','984608pAyNif','main','root','path','30GBqagT','412JBhGuJ','694308VaTunK','2428552wnLXGd','rootGraveyard','12512097hrKzlh','nodes','81255qxFwKx','length','$graveyard'];_0x9891=function(){return _0x4cd4d2;};return _0x9891();}function _0x23bc(_0x5db061,_0x6089fc){const _0x9891c7=_0x9891();return _0x23bc=function(_0x23bc7e,_0x5b3898){_0x23bc7e=_0x23bc7e-0x1d4;let _0x46f0e1=_0x9891c7[_0x23bc7e];return _0x46f0e1;},_0x23bc(_0x5db061,_0x6089fc);}export function parsePositionAfterCompression(_0x3afac6){const _0x346179=_0x23bc;P(_0x3afac6,_0x115fb4=>(_0x115fb4[_0x346179(0x1d6)]?(_0x115fb4[_0x346179(0x1da)]=_0x346179(0x1d9),delete _0x115fb4[_0x346179(0x1d6)]):_0x115fb4[_0x346179(0x1e0)]&&(_0x115fb4[_0x346179(0x1da)]=_0x346179(0x1d4),delete _0x115fb4[_0x346179(0x1e0)]),_0x115fb4));}function P(_0x567934,_0x4da079){const _0x3ab601=_0x23bc;for(const _0x10887e in _0x567934){const _0x3bacb9=_0x567934[_0x10887e];_0x3ab601(0x1e2)!==_0x10887e&&_0x579f26(_0x3bacb9)&&(_0x3bacb9[_0x3ab601(0x1db)]&&(_0x3bacb9[_0x3ab601(0x1da)]||_0x3bacb9[_0x3ab601(0x1d6)]||_0x3bacb9[_0x3ab601(0x1e0)])?_0x567934[_0x10887e]=_0x4da079(_0x3bacb9):P(_0x3bacb9,_0x4da079));}return _0x567934;}
|
package/dist/content-index.css
DELETED
package/dist/editor-index.css
DELETED
package/dist/index.css
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import type { CompressedOperationsData, default as Compressor } from '../compressor.js';
|
|
10
|
-
/**
|
|
11
|
-
* * Compresses and decompresses multiple operations into the one buffer.
|
|
12
|
-
*/
|
|
13
|
-
export default abstract class ActionCompressor {
|
|
14
|
-
constructor(id: number, context: Compressor);
|
|
15
|
-
/**
|
|
16
|
-
* Combines and compress operations from the list.
|
|
17
|
-
* Operations are consumed as long as match this compressor.
|
|
18
|
-
*
|
|
19
|
-
* @param result Object to which compression result should be added.
|
|
20
|
-
* @param operations List of operations in JSON format to compress.
|
|
21
|
-
* @returns `true` when operation is consumed `false` otherwise.
|
|
22
|
-
*/
|
|
23
|
-
compress(result: CompressedOperationsData, operations: Array<any>): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Decompress and split compressed operations. Decompressed operations are consumed (removed from the input data).
|
|
26
|
-
*
|
|
27
|
-
* @param result Decompressed operations in JSON format.
|
|
28
|
-
* @param data Compressed operations data.
|
|
29
|
-
*/
|
|
30
|
-
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
31
|
-
/**
|
|
32
|
-
* Compresses single operation using a proper compressor.
|
|
33
|
-
*
|
|
34
|
-
* @param operation Operation in JSON format.
|
|
35
|
-
* @returns Operation JSON compressed to the binary format.
|
|
36
|
-
*/
|
|
37
|
-
protected abstract _compressSingleOperation(operation: any): Uint8Array;
|
|
38
|
-
/**
|
|
39
|
-
* Decompresses combined operation using a proper compressor.
|
|
40
|
-
*
|
|
41
|
-
* @param data Data to compress.
|
|
42
|
-
* @returns Decompressed operation in JSON format.
|
|
43
|
-
*/
|
|
44
|
-
protected abstract _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
45
|
-
/**
|
|
46
|
-
* Combine next operation into the combined one.
|
|
47
|
-
*
|
|
48
|
-
* @param nextOperation Operation to combine in JSON format.
|
|
49
|
-
* @param combined Combined operation in JSON format.
|
|
50
|
-
* @returns Combined operation in JSON format.
|
|
51
|
-
*/
|
|
52
|
-
protected abstract _combineNext(nextOperation: any, combined: any): any;
|
|
53
|
-
/**
|
|
54
|
-
* Split operation from combined one.
|
|
55
|
-
*
|
|
56
|
-
* @param combined Combined operation in JSON format.
|
|
57
|
-
* @returns Split operation in JSON format.
|
|
58
|
-
*/
|
|
59
|
-
protected abstract _splitCurrent(combined: any): any;
|
|
60
|
-
/**
|
|
61
|
-
* Checks if two operations can be combined.
|
|
62
|
-
*/
|
|
63
|
-
protected abstract _compareOperations(opA: any, opB: any): boolean;
|
|
64
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import ActionCompressor from './actioncompressor.js';
|
|
10
|
-
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
-
export default class DeletingActionCompressor extends ActionCompressor {
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
protected _combineNext(nextOperation: any, combined: any): any;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _splitCurrent(combined: any): any;
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
protected _compareOperations(opA: any, opB: any): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
32
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import ActionCompressor from './actioncompressor.js';
|
|
10
|
-
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
-
export default class ForwardDeletingActionCompressor extends ActionCompressor {
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
protected _combineNext(nextOperation: any, combined: any): any;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _splitCurrent(combined: any): any;
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
protected _compareOperations(opA: any, opB: any): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
32
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import ActionCompressor from './actioncompressor.js';
|
|
10
|
-
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
-
export default class TypingActionCompressor extends ActionCompressor {
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDocs
|
|
14
|
-
*/
|
|
15
|
-
protected _combineNext(nextOperation: any, combined: any): any;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _splitCurrent(combined: any): any;
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
protected _compareOperations(opA: any, opB: any): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
32
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import ActionCompressor from './actioncompressor.js';
|
|
10
|
-
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
-
export default class UserSelectionActionCompressor extends ActionCompressor {
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
compress(result: CompressedOperationsData, operations: Array<any>): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
20
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Compresses and decompresses given set of operations in JSON format to/from the binary format using `Protocol Buffers`.
|
|
11
|
-
*/
|
|
12
|
-
export default class Compressor {
|
|
13
|
-
constructor();
|
|
14
|
-
/**
|
|
15
|
-
* Compress given list of operations in JSON format.
|
|
16
|
-
*
|
|
17
|
-
* **Note** It tries to combine typing-like or deleting-like operations into the one buffer.
|
|
18
|
-
* **Note** Input data will be consumed and modified during compression process. If you need untouched data
|
|
19
|
-
* you need to copy it before the compression.
|
|
20
|
-
*/
|
|
21
|
-
compress(operations: Array<any>): CompressedOperationsData;
|
|
22
|
-
/**
|
|
23
|
-
* Decompress given data to the list of operations in JSON format.
|
|
24
|
-
*
|
|
25
|
-
* **Note** Input data will be consumed during decompression process. If you need untouched data
|
|
26
|
-
* you need to copy it before the decompression.
|
|
27
|
-
*
|
|
28
|
-
* @param data Compressed operations.
|
|
29
|
-
* @returns List of operations in JSON format.
|
|
30
|
-
*/
|
|
31
|
-
decompress(data: CompressedOperationsData): Array<any>;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Compressed operations data.
|
|
35
|
-
*/
|
|
36
|
-
export type CompressedOperationsData = {
|
|
37
|
-
/**
|
|
38
|
-
* List of operations compressed to the binary format.
|
|
39
|
-
*/
|
|
40
|
-
buffers: Array<Uint8Array>;
|
|
41
|
-
/**
|
|
42
|
-
* List of compressor identifiers. According to this types a proper compressor will be used for the decompression.
|
|
43
|
-
*/
|
|
44
|
-
types: Array<number>;
|
|
45
|
-
/**
|
|
46
|
-
* Base version of the first compressed operation.
|
|
47
|
-
*/
|
|
48
|
-
baseVersion: number;
|
|
49
|
-
};
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
export * from './compressor.js';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import MarkerOperationCompressor from './markeroperationcompressor.js';
|
|
10
|
-
import type { ProtobufDescriptor } from '../protobuffactory.js';
|
|
11
|
-
import type { CompressedOperationsData } from '../compressor.js';
|
|
12
|
-
import type { MarkerOperation } from 'ckeditor5/src/engine.js';
|
|
13
|
-
export default class AnnotationMarkerOperationCompressor extends MarkerOperationCompressor {
|
|
14
|
-
/**
|
|
15
|
-
* @inheritDoc
|
|
16
|
-
*/
|
|
17
|
-
constructor(id: number, name: string, descriptor: ProtobufDescriptor, namespaceToOmit: string);
|
|
18
|
-
/**
|
|
19
|
-
* @inheritDoc
|
|
20
|
-
*/
|
|
21
|
-
compress(result: CompressedOperationsData, operations: Array<MarkerOperation>): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
decompress(result: Array<MarkerOperation>, data: CompressedOperationsData): void;
|
|
26
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import OperationCompressor from './operationcompressor.js';
|
|
10
|
-
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
-
import type { AttributeOperation } from 'ckeditor5/src/engine.js';
|
|
12
|
-
export default class AttributeOperationCompressor extends OperationCompressor {
|
|
13
|
-
/**
|
|
14
|
-
* @inheritDoc
|
|
15
|
-
*/
|
|
16
|
-
compress(result: CompressedOperationsData, operations: Array<AttributeOperation>): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* @inheritDoc
|
|
19
|
-
*/
|
|
20
|
-
decompress(result: Array<AttributeOperation>, data: CompressedOperationsData): void;
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import OperationCompressor from './operationcompressor.js';
|
|
10
|
-
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
-
import type { InsertOperation } from 'ckeditor5/src/engine.js';
|
|
12
|
-
export default class InsertOperationCompressor extends OperationCompressor {
|
|
13
|
-
/**
|
|
14
|
-
* @inheritDoc
|
|
15
|
-
*/
|
|
16
|
-
compress(result: CompressedOperationsData, operations: Array<InsertOperation>): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* @inheritDoc
|
|
19
|
-
*/
|
|
20
|
-
decompress(result: Array<InsertOperation>, data: CompressedOperationsData): void;
|
|
21
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import OperationCompressor from './operationcompressor.js';
|
|
10
|
-
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
-
import type { MarkerOperation } from 'ckeditor5/src/engine.js';
|
|
12
|
-
export default class MarkerOperationCompressor extends OperationCompressor {
|
|
13
|
-
/**
|
|
14
|
-
* @inheritDoc
|
|
15
|
-
*/
|
|
16
|
-
decompress(result: Array<MarkerOperation>, data: CompressedOperationsData): void;
|
|
17
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import OperationCompressor from './operationcompressor.js';
|
|
10
|
-
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
-
import type { Operation } from 'ckeditor5/src/engine.js';
|
|
12
|
-
/**
|
|
13
|
-
* @extends OperationCompressor
|
|
14
|
-
*/
|
|
15
|
-
export default class NoOperationCompressor extends OperationCompressor {
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
24
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
import type { CompressedOperationsData } from '../compressor.js';
|
|
10
|
-
import type { ProtobufDescriptor } from '../protobuffactory.js';
|
|
11
|
-
import type { Operation } from 'ckeditor5/src/engine.js';
|
|
12
|
-
/**
|
|
13
|
-
* Compresses and decompresses single operation to the binary format.
|
|
14
|
-
*/
|
|
15
|
-
export default class OperationCompressor {
|
|
16
|
-
constructor(id: number, operationName: string, protobufDescriptor: ProtobufDescriptor);
|
|
17
|
-
/**
|
|
18
|
-
* Serializes and consumes the first operation from the list.
|
|
19
|
-
*
|
|
20
|
-
* @param result Object to which compression result will be added.
|
|
21
|
-
* @param operations List of operations to compress. The first one will be compressed
|
|
22
|
-
* and removed from the list.
|
|
23
|
-
*/
|
|
24
|
-
compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Deserializes and consumes buffered operation.
|
|
27
|
-
*
|
|
28
|
-
* @param result Decompressed operation.
|
|
29
|
-
* @param data Data to decompress.
|
|
30
|
-
*/
|
|
31
|
-
decompress(result: Array<Operation>, data: CompressedOperationsData): void;
|
|
32
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
export {};
|
package/dist/types/utils.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Return new position in JSON format shifted by given offset.
|
|
11
|
-
*
|
|
12
|
-
* @param positionJSON Position serialized to JSON.
|
|
13
|
-
* @param shift Offset shift. Can be a negative value.
|
|
14
|
-
* @returns New position in JSON format.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getPositionShiftedBy(positionJSON: any, shift: number): any;
|
|
17
|
-
/**
|
|
18
|
-
* Checks whether one position serialized to JSON is equal to other position serialized to JSON.
|
|
19
|
-
*/
|
|
20
|
-
export declare function arePositionsEqual(positionA: any, positionB: any): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* For the better compression result one of the two common roots (`main` or `$graveyard`)
|
|
23
|
-
* is compressed to the `Boolean` format.
|
|
24
|
-
*
|
|
25
|
-
* Due tu the Protobuf limitation `Position` descriptor has no dedicated compressor
|
|
26
|
-
* so we need to find and format all positions in the operation.
|
|
27
|
-
*/
|
|
28
|
-
export declare function parsePositionBeforeCompression(operation: any): void;
|
|
29
|
-
/**
|
|
30
|
-
* Position reformatting after decompression.
|
|
31
|
-
*
|
|
32
|
-
* @see {parsePositionBeforeCompression}.
|
|
33
|
-
*/
|
|
34
|
-
export declare function parsePositionAfterCompression(operation: any): void;
|
package/src/index.d.ts
DELETED
package/src/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* +---------------------------------------------------------------------------------+
|
|
8
|
-
* | |
|
|
9
|
-
* | Hello stranger! |
|
|
10
|
-
* | |
|
|
11
|
-
* | |
|
|
12
|
-
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
-
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
-
* | are forbidden and will result in legal consequences. |
|
|
15
|
-
* | |
|
|
16
|
-
* | |
|
|
17
|
-
* +---------------------------------------------------------------------------------+
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
function _0x501b(){var _0x88a2a4=['2008xiloKj','10535292zuNJNQ','1719ONCFDJ','6780NWWPBs','120MwbAkO','5866GTlezN','723015fNzzRA','20Dudgkj','122gAgpsV','565WGeJrv','29029nwmTli','757031FiirLE'];_0x501b=function(){return _0x88a2a4;};return _0x501b();}function _0x57f3(_0x3f7888,_0x2235fe){var _0x501b31=_0x501b();return _0x57f3=function(_0x57f348,_0x5b9fef){_0x57f348=_0x57f348-0x93;var _0x20a617=_0x501b31[_0x57f348];return _0x20a617;},_0x57f3(_0x3f7888,_0x2235fe);}(function(_0x3f49ca,_0x24201a){var _0x347afd=_0x57f3,_0x5c3f1f=_0x3f49ca();while(!![]){try{var _0x17dcf2=-parseInt(_0x347afd(0x93))/0x1*(-parseInt(_0x347afd(0x9c))/0x2)+parseInt(_0x347afd(0x99))/0x3*(parseInt(_0x347afd(0x97))/0x4)+parseInt(_0x347afd(0x94))/0x5*(parseInt(_0x347afd(0x9a))/0x6)+parseInt(_0x347afd(0x95))/0x7*(parseInt(_0x347afd(0x9b))/0x8)+parseInt(_0x347afd(0x9d))/0x9*(parseInt(_0x347afd(0x9e))/0xa)+parseInt(_0x347afd(0x96))/0xb+-parseInt(_0x347afd(0x98))/0xc;if(_0x17dcf2===_0x24201a)break;else _0x5c3f1f['push'](_0x5c3f1f['shift']());}catch(_0x28a7bc){_0x5c3f1f['push'](_0x5c3f1f['shift']());}}}(_0x501b,0x2da25));export*from'./compressor.js';
|