@ckeditor/ckeditor5-operations-compressor 41.3.0-alpha.4 → 41.3.1
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 +3 -4
- 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';function
|
|
23
|
+
'use strict';function _0x1689(_0x8d6dfb,_0x1eff56){var _0x24e551=_0x24e5();return _0x1689=function(_0x16893a,_0x2aaeea){_0x16893a=_0x16893a-0xdc;var _0x441a6f=_0x24e551[_0x16893a];return _0x441a6f;},_0x1689(_0x8d6dfb,_0x1eff56);}var _0x436828=_0x1689;(function(_0x4c4245,_0x481271){var _0x34cf99=_0x1689,_0x11b8a1=_0x4c4245();while(!![]){try{var _0x58ea64=parseInt(_0x34cf99(0xed))/0x1+-parseInt(_0x34cf99(0xe7))/0x2*(-parseInt(_0x34cf99(0xec))/0x3)+-parseInt(_0x34cf99(0xde))/0x4+parseInt(_0x34cf99(0xe5))/0x5*(parseInt(_0x34cf99(0xdd))/0x6)+parseInt(_0x34cf99(0xee))/0x7*(-parseInt(_0x34cf99(0xe6))/0x8)+parseInt(_0x34cf99(0xe1))/0x9+-parseInt(_0x34cf99(0xeb))/0xa*(-parseInt(_0x34cf99(0xe2))/0xb);if(_0x58ea64===_0x481271)break;else _0x11b8a1['push'](_0x11b8a1['shift']());}catch(_0x162f40){_0x11b8a1['push'](_0x11b8a1['shift']());}}}(_0x24e5,0x81d74));module[_0x436828(0xdc)]={'AttributeOperation':{'fields':{'range':{'type':_0x436828(0xe8),'id':0x1},'key':{'type':_0x436828(0xdf),'id':0x2},'oldValueBoolean':{'type':_0x436828(0xe4),'id':0x3},'oldValueJson':{'type':_0x436828(0xdf),'id':0x4},'newValueBoolean':{'type':_0x436828(0xe4),'id':0x5},'newValueJson':{'type':_0x436828(0xdf),'id':0x6},'wasUndone':{'type':_0x436828(0xe4),'id':0x7}}},'InsertOperation':{'fields':{'position':{'type':_0x436828(0xe9),'id':0x1},'nodes':{'rule':_0x436828(0xe3),'type':_0x436828(0xe0),'id':0x2},'shouldReceiveAttributes':{'type':_0x436828(0xe4),'id':0x3},'wasUndone':{'type':_0x436828(0xe4),'id':0x4}}},'MarkerOperation':{'fields':{'name':{'type':_0x436828(0xdf),'id':0x1},'oldRange':{'type':_0x436828(0xe8),'id':0x2},'newRange':{'type':_0x436828(0xe8),'id':0x3},'affectsData':{'type':_0x436828(0xe4),'id':0x4},'wasUndone':{'type':_0x436828(0xe4),'id':0x5}}},'MergeOperation':{'fields':{'sourcePosition':{'type':_0x436828(0xe9),'id':0x1},'targetPosition':{'type':_0x436828(0xe9),'id':0x2},'graveyardPosition':{'type':_0x436828(0xe9),'id':0x3},'howMany':{'type':_0x436828(0xea),'id':0x4},'wasUndone':{'type':_0x436828(0xe4),'id':0x5}}},'MoveOperation':{'fields':{'sourcePosition':{'type':_0x436828(0xe9),'id':0x1},'howMany':{'type':_0x436828(0xea),'id':0x2},'targetPosition':{'type':_0x436828(0xe9),'id':0x3},'wasUndone':{'type':_0x436828(0xe4),'id':0x4}}},'RenameOperation':{'fields':{'position':{'type':_0x436828(0xe9),'id':0x1},'oldName':{'type':_0x436828(0xdf),'id':0x2},'newName':{'type':_0x436828(0xdf),'id':0x3},'wasUndone':{'type':_0x436828(0xe4),'id':0x4}}},'RootAttributeOperation':{'fields':{'root':{'type':_0x436828(0xdf),'id':0x1},'key':{'type':_0x436828(0xdf),'id':0x2},'oldValueBoolean':{'type':_0x436828(0xe4),'id':0x3},'oldValueJson':{'type':_0x436828(0xdf),'id':0x4},'newValueBoolean':{'type':_0x436828(0xe4),'id':0x5},'newValueJson':{'type':_0x436828(0xdf),'id':0x6},'wasUndone':{'type':_0x436828(0xe4),'id':0x7}}},'RootOperation':{'fields':{'rootName':{'type':_0x436828(0xdf),'id':0x1},'elementName':{'type':_0x436828(0xdf),'id':0x2},'isAdd':{'type':_0x436828(0xe4),'id':0x3},'wasUndone':{'type':_0x436828(0xe4),'id':0x4}}},'SplitOperation':{'fields':{'splitPosition':{'type':_0x436828(0xe9),'id':0x1},'graveyardPosition':{'type':_0x436828(0xe9),'id':0x2},'howMany':{'type':_0x436828(0xea),'id':0x3},'insertionPosition':{'type':_0x436828(0xe9),'id':0x4},'wasUndone':{'type':_0x436828(0xe4),'id':0x5}}},'Position':{'fields':{'root':{'type':_0x436828(0xdf),'id':0x1},'rootMain':{'type':_0x436828(0xe4),'id':0x2},'rootGraveyard':{'type':_0x436828(0xe4),'id':0x3},'path':{'rule':_0x436828(0xe3),'type':_0x436828(0xea),'id':0x4},'stickiness':{'type':_0x436828(0xdf),'id':0x5}}},'Range':{'fields':{'start':{'type':_0x436828(0xe9),'id':0x1},'end':{'type':_0x436828(0xe9),'id':0x2}}},'Element':{'fields':{'name':{'type':_0x436828(0xdf),'id':0x1},'children':{'rule':_0x436828(0xe3),'type':_0x436828(0xe0),'id':0x2},'data':{'type':_0x436828(0xdf),'id':0x3},'attributesBoolean':{'keyType':_0x436828(0xdf),'type':_0x436828(0xe4),'id':0x4},'attributesJson':{'type':_0x436828(0xdf),'id':0x5}}}};function _0x24e5(){var _0x113fdd=['bool','795FQLROL','2521264dAlhkA','8WmfWxi','Range','Position','uint32','220GYcMlr','278037VisLCe','327487ftmKCq','7XWXDNr','exports','4098nyuBCt','2665988hLAUQH','string','Element','1263825iLOZlc','283129VxJIpH','repeated'];_0x24e5=function(){return _0x113fdd;};return _0x24e5();}
|
package/src/protobuffactory.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0xf1d450=_0x4949;(function(_0x28a03f,_0xdb41e9){const _0x517cb=_0x4949,_0x116ac3=_0x28a03f();while(!![]){try{const _0x4793e8=-parseInt(_0x517cb(0x164))/0x1+-parseInt(_0x517cb(0x160))/0x2*(-parseInt(_0x517cb(0x165))/0x3)+-parseInt(_0x517cb(0x16a))/0x4*(parseInt(_0x517cb(0x166))/0x5)+-parseInt(_0x517cb(0x169))/0x6*(parseInt(_0x517cb(0x163))/0x7)+-parseInt(_0x517cb(0x15e))/0x8+-parseInt(_0x517cb(0x15a))/0x9*(-parseInt(_0x517cb(0x15f))/0xa)+parseInt(_0x517cb(0x161))/0xb*(parseInt(_0x517cb(0x15d))/0xc);if(_0x4793e8===_0xdb41e9)break;else _0x116ac3['push'](_0x116ac3['shift']());}catch(_0x1e18ae){_0x116ac3['push'](_0x116ac3['shift']());}}}(_0x2432,0x622ed));import*as _0x3c4ae3 from'./lib/compiledmessages.js';export default class r{constructor(){const _0x202a67=_0x4949;this[_0x202a67(0x158)]=_0x3c4ae3;}[_0xf1d450(0x159)](_0x14a03f){const _0x5d3dea=_0xf1d450;return new ProtobufDescriptor(this[_0x5d3dea(0x158)][_0x14a03f]);}}export class ProtobufDescriptor{constructor(_0x165320){const _0x387555=_0xf1d450;this[_0x387555(0x16d)]=_0x165320;}[_0xf1d450(0x162)](_0xb3c941){const _0x4fea59=_0xf1d450,_0x21e079=this[_0x4fea59(0x16d)][_0x4fea59(0x16c)](_0xb3c941);if(_0x21e079)throw Error(_0x21e079);return this[_0x4fea59(0x16d)][_0x4fea59(0x15b)](this[_0x4fea59(0x16d)][_0x4fea59(0x16b)](_0xb3c941))[_0x4fea59(0x168)]();}[_0xf1d450(0x15c)](_0x365170){const _0x4ebf16=_0xf1d450;return this[_0x4ebf16(0x16d)][_0x4ebf16(0x167)](this[_0x4ebf16(0x16d)][_0x4ebf16(0x157)](_0x365170),{'oneofs':!0x0});}}function _0x4949(_0x572a5c,_0x317d9e){const _0x243264=_0x2432();return _0x4949=function(_0x4949e5,_0x3b6bca){_0x4949e5=_0x4949e5-0x157;let _0x121748=_0x243264[_0x4949e5];return _0x121748;},_0x4949(_0x572a5c,_0x317d9e);}function _0x2432(){const _0x3353f5=['54CQOACP','2457652AFGAhS','create','verify','_protobuf','decode','_protobufRoot','getDescriptor','1395dtKuET','encode','decompress','58404CMNKMD','2023984hBlcrn','20540KTmtjT','26MSSaLD','3586suoimh','compress','539581cPjFjh','275394YCzfUQ','77007YeYTZn','5ssGgzs','toObject','finish'];_0x2432=function(){return _0x3353f5;};return _0x2432();}
|
package/src/utils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x48ab92,_0x356a3a){const _0x1814f9=_0x2383,_0x592f28=_0x48ab92();while(!![]){try{const _0x43fdb6=-parseInt(_0x1814f9(0x1d2))/0x1*(parseInt(_0x1814f9(0x1d4))/0x2)+-parseInt(_0x1814f9(0x1cb))/0x3+parseInt(_0x1814f9(0x1ce))/0x4+parseInt(_0x1814f9(0x1cc))/0x5+parseInt(_0x1814f9(0x1d5))/0x6+parseInt(_0x1814f9(0x1d9))/0x7+-parseInt(_0x1814f9(0x1d8))/0x8;if(_0x43fdb6===_0x356a3a)break;else _0x592f28['push'](_0x592f28['shift']());}catch(_0x2d6e3b){_0x592f28['push'](_0x592f28['shift']());}}}(_0x2d55,0xe7e99));function _0x2d55(){const _0x5aeb77=['rootGraveyard','main','13970056scnViu','12670728fkKXYi','rootMain','4572468pzakfQ','2525455zVTdQP','nodes','7225416PvwRxU','length','$graveyard','root','4877YwbQeQ','path','212tJiuCL','3694434MGAUss'];_0x2d55=function(){return _0x5aeb77;};return _0x2d55();}import{cloneDeep as _0x4580d3,isEqual as _0x2b5833,isObject as _0x1b89ac}from'lodash-es';export function getPositionShiftedBy(_0x590b02,_0x4d5bc1){const _0x15ded2=_0x2383,_0x4be085=_0x4580d3(_0x590b02);return _0x4be085[_0x15ded2(0x1d3)][_0x4be085[_0x15ded2(0x1d3)][_0x15ded2(0x1cf)]-0x1]+=_0x4d5bc1,_0x4be085;}export function arePositionsEqual(_0xeef2aa,_0x3b2f7c){const _0x770f2b=_0x2383;return _0xeef2aa[_0x770f2b(0x1d1)]===_0x3b2f7c[_0x770f2b(0x1d1)]&&_0x2b5833(_0xeef2aa[_0x770f2b(0x1d3)],_0x3b2f7c[_0x770f2b(0x1d3)]);}function _0x2383(_0x5144e1,_0x27e9a6){const _0x2d554e=_0x2d55();return _0x2383=function(_0x23834f,_0x3107cd){_0x23834f=_0x23834f-0x1cb;let _0x315e48=_0x2d554e[_0x23834f];return _0x315e48;},_0x2383(_0x5144e1,_0x27e9a6);}export function parsePositionBeforeCompression(_0x2ebf5d){const _0x10bd4a=_0x2383;P(_0x2ebf5d,_0x5deb8a=>(_0x10bd4a(0x1d7)==_0x5deb8a[_0x10bd4a(0x1d1)]?(_0x5deb8a[_0x10bd4a(0x1da)]=!0x0,delete _0x5deb8a[_0x10bd4a(0x1d1)]):_0x10bd4a(0x1d0)==_0x5deb8a[_0x10bd4a(0x1d1)]&&(_0x5deb8a[_0x10bd4a(0x1d6)]=!0x0,delete _0x5deb8a[_0x10bd4a(0x1d1)]),_0x5deb8a));}export function parsePositionAfterCompression(_0x2e6bf9){const _0x5684b7=_0x2383;P(_0x2e6bf9,_0x26e5ca=>(_0x26e5ca[_0x5684b7(0x1da)]?(_0x26e5ca[_0x5684b7(0x1d1)]=_0x5684b7(0x1d7),delete _0x26e5ca[_0x5684b7(0x1da)]):_0x26e5ca[_0x5684b7(0x1d6)]&&(_0x26e5ca[_0x5684b7(0x1d1)]=_0x5684b7(0x1d0),delete _0x26e5ca[_0x5684b7(0x1d6)]),_0x26e5ca));}function P(_0x23afb6,_0x1d8f27){const _0x22d45f=_0x2383;for(const _0x4caf56 in _0x23afb6){const _0x9d634e=_0x23afb6[_0x4caf56];_0x22d45f(0x1cd)!==_0x4caf56&&_0x1b89ac(_0x9d634e)&&(_0x9d634e[_0x22d45f(0x1d3)]&&(_0x9d634e[_0x22d45f(0x1d1)]||_0x9d634e[_0x22d45f(0x1da)]||_0x9d634e[_0x22d45f(0x1d6)])?_0x23afb6[_0x4caf56]=_0x1d8f27(_0x9d634e):P(_0x9d634e,_0x1d8f27));}return _0x23afb6;}
|
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 _0x907f(_0x20d174,_0x4de489){var _0x2fb580=_0x2fb5();return _0x907f=function(_0x907f69,_0x57f336){_0x907f69=_0x907f69-0x143;var _0x2236b0=_0x2fb580[_0x907f69];return _0x2236b0;},_0x907f(_0x20d174,_0x4de489);}(function(_0xaaaa90,_0x2b459f){var _0x396b20=_0x907f,_0x194a57=_0xaaaa90();while(!![]){try{var _0x88af84=-parseInt(_0x396b20(0x146))/0x1*(parseInt(_0x396b20(0x144))/0x2)+parseInt(_0x396b20(0x14b))/0x3*(-parseInt(_0x396b20(0x14e))/0x4)+parseInt(_0x396b20(0x147))/0x5*(parseInt(_0x396b20(0x145))/0x6)+-parseInt(_0x396b20(0x14c))/0x7+parseInt(_0x396b20(0x148))/0x8*(-parseInt(_0x396b20(0x14a))/0x9)+-parseInt(_0x396b20(0x149))/0xa+-parseInt(_0x396b20(0x143))/0xb*(-parseInt(_0x396b20(0x14d))/0xc);if(_0x88af84===_0x2b459f)break;else _0x194a57['push'](_0x194a57['shift']());}catch(_0x31980e){_0x194a57['push'](_0x194a57['shift']());}}}(_0x2fb5,0x779bd));function _0x2fb5(){var _0x47b30d=['35sOhHTh','1488rEepof','5568280rwXvsp','25191VdOHLQ','406851QEdaOY','6680695adeEVQ','19213404DVbiRj','16DuoTMU','22EALwFL','20498AWurco','400002pvUbny','59zqBmwV'];_0x2fb5=function(){return _0x47b30d;};return _0x2fb5();}export*from'./compressor.js';
|