@ckeditor/ckeditor5-operations-compressor 40.0.0 → 40.2.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 +16 -16
- package/LICENSE.md +7 -8
- package/README.md +1 -1
- package/package.json +2 -2
- 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
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2b01=['_protobufDescriptor','Boolean','newValue','shift','compress','push','decompress','_id','oldValue','_deserializeOneOf','stringify','boolean','buffers','Json','__className','parse','_serializeOneOf'];(function(_0x2c2304,_0x2b0147){const _0x267103=function(_0x473219){while(--_0x473219){_0x2c2304['push'](_0x2c2304['shift']());}};_0x267103(++_0x2b0147);}(_0x2b01,0x11d));const _0x2671=function(_0x2c2304,_0x2b0147){_0x2c2304=_0x2c2304-0x0;let _0x267103=_0x2b01[_0x2c2304];return _0x267103;};import _0x14cb3c from'./operationcompressor';import{parsePositionBeforeCompression as _0x476dca,parsePositionAfterCompression as _0x3a8716}from'../utils';export default class i extends _0x14cb3c{[_0x2671('0x8')](_0x2128fa,_0x12b8d3){const _0xc74352=_0x12b8d3[_0x2671('0x7')]();return this[_0x2671('0x3')]('oldValue',_0xc74352),this[_0x2671('0x3')](_0x2671('0x6'),_0xc74352),_0x476dca(_0xc74352),_0x2128fa[_0x2671('0x10')][_0x2671('0x9')](this[_0x2671('0x4')][_0x2671('0x8')](_0xc74352)),_0x2128fa['types'][_0x2671('0x9')](this[_0x2671('0xb')]),!0x0;}[_0x2671('0xa')](_0x3f35b9,_0x5306b2){const {types:_0x5b1923,buffers:_0x55e0c5}=_0x5306b2,_0x28a649=this['_protobufDescriptor'][_0x2671('0xa')](_0x55e0c5[_0x2671('0x7')]());_0x5b1923['shift'](),this[_0x2671('0xd')](_0x2671('0xc'),_0x28a649),this[_0x2671('0xd')]('newValue',_0x28a649),_0x3a8716(_0x28a649),_0x28a649[_0x2671('0x1')]=this['_operationName'],_0x3f35b9['push'](_0x28a649);}[_0x2671('0x3')](_0xb144bb,_0x2bb3f5){const _0x1b44c0=_0x2bb3f5[_0xb144bb];_0x2671('0xf')==typeof _0x1b44c0?_0x2bb3f5[_0xb144bb+_0x2671('0x5')]=_0x1b44c0:_0x2bb3f5[_0xb144bb+_0x2671('0x0')]=JSON[_0x2671('0xe')](_0x1b44c0);}[_0x2671('0xd')](_0x143a53,_0x3f0715){const _0x1ff4bf=_0x143a53+_0x2671('0x0');_0x3f0715[_0x1ff4bf]?(_0x3f0715[_0x143a53]=JSON[_0x2671('0x2')](_0x3f0715[_0x1ff4bf]),delete _0x3f0715[_0x1ff4bf]):(_0x3f0715[_0x143a53]=_0x3f0715[_0x143a53+_0x2671('0x5')],delete _0x3f0715[_0x143a53+_0x2671('0x5')]);}}
|
|
@@ -1,17 +1,17 @@
|
|
|
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
|
-
import OperationCompressor from './operationcompressor';
|
|
6
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
-
import type { InsertOperation } from 'ckeditor5/src/engine';
|
|
8
|
-
export default class InsertOperationCompressor extends OperationCompressor {
|
|
9
|
-
/**
|
|
10
|
-
* @inheritDoc
|
|
11
|
-
*/
|
|
12
|
-
compress(result: CompressedOperationsData, operations: Array<InsertOperation>): boolean;
|
|
13
|
-
/**
|
|
14
|
-
* @inheritDoc
|
|
15
|
-
*/
|
|
16
|
-
decompress(result: Array<InsertOperation>, data: CompressedOperationsData): void;
|
|
17
|
-
}
|
|
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
|
+
import OperationCompressor from './operationcompressor';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
+
import type { InsertOperation } from 'ckeditor5/src/engine';
|
|
8
|
+
export default class InsertOperationCompressor extends OperationCompressor {
|
|
9
|
+
/**
|
|
10
|
+
* @inheritDoc
|
|
11
|
+
*/
|
|
12
|
+
compress(result: CompressedOperationsData, operations: Array<InsertOperation>): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
decompress(result: Array<InsertOperation>, data: CompressedOperationsData): void;
|
|
17
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4a17=['compress','types','boolean','children','every','_serializeNodesAttributes','parse','nodes','_deserializeNodesAttributes','_areValuesBoolean','buffers','keys','attributes','__className','attributesJson','decompress','_operationName','shift','push','_protobufDescriptor','attributesBoolean','_id'];(function(_0x53f424,_0x4a171b){const _0xab30eb=function(_0x5af2ca){while(--_0x5af2ca){_0x53f424['push'](_0x53f424['shift']());}};_0xab30eb(++_0x4a171b);}(_0x4a17,0x1c5));const _0xab30=function(_0x53f424,_0x4a171b){_0x53f424=_0x53f424-0x0;let _0xab30eb=_0x4a17[_0x53f424];return _0xab30eb;};import _0x5d2c11 from'./operationcompressor';import{parsePositionBeforeCompression as _0x54063a,parsePositionAfterCompression as _0x11f12f}from'../utils';export default class s extends _0x5d2c11{[_0xab30('0x9')](_0x1bd4bc,_0x5ae013){const _0x1247d4=_0x5ae013[_0xab30('0x4')]();return this[_0xab30('0xe')](_0x1247d4[_0xab30('0x10')]),_0x54063a(_0x1247d4),_0x1bd4bc[_0xab30('0x13')][_0xab30('0x5')](this[_0xab30('0x6')][_0xab30('0x9')](_0x1247d4)),_0x1bd4bc[_0xab30('0xa')][_0xab30('0x5')](this[_0xab30('0x8')]),!0x0;}['decompress'](_0x3f8341,_0x61df5f){const {types:_0x1ff299,buffers:_0x3a670a}=_0x61df5f,_0x3c8d83=this['_protobufDescriptor'][_0xab30('0x2')](_0x3a670a[_0xab30('0x4')]());_0x1ff299[_0xab30('0x4')](),_0x3c8d83[_0xab30('0x10')]||(_0x3c8d83[_0xab30('0x10')]=[]),this[_0xab30('0x11')](_0x3c8d83[_0xab30('0x10')]),_0x11f12f(_0x3c8d83),_0x3c8d83[_0xab30('0x0')]=this[_0xab30('0x3')],_0x3f8341[_0xab30('0x5')](_0x3c8d83);}['_serializeNodesAttributes'](_0x5d16a6){for(const _0x22837c of _0x5d16a6){if(_0x22837c[_0xab30('0x15')]){const _0x16f318=_0x22837c[_0xab30('0x15')];this[_0xab30('0x12')](_0x16f318)?_0x22837c[_0xab30('0x7')]=_0x16f318:_0x22837c[_0xab30('0x1')]=JSON['stringify'](_0x16f318);}_0x22837c[_0xab30('0xc')]&&this[_0xab30('0xe')](_0x22837c[_0xab30('0xc')]);}}['_deserializeNodesAttributes'](_0x2cefcc){for(const _0x4221b6 of _0x2cefcc)(_0x4221b6[_0xab30('0x7')]||_0x4221b6['attributesJson'])&&(_0x4221b6[_0xab30('0x7')]?(_0x4221b6['attributes']=_0x4221b6[_0xab30('0x7')],delete _0x4221b6['attributesBoolean']):(_0x4221b6[_0xab30('0x15')]=JSON[_0xab30('0xf')](_0x4221b6['attributesJson']),delete _0x4221b6[_0xab30('0x1')])),_0x4221b6[_0xab30('0xc')]&&this[_0xab30('0x11')](_0x4221b6[_0xab30('0xc')]);}[_0xab30('0x12')](_0x436de2){return Object[_0xab30('0x14')](_0x436de2)[_0xab30('0xd')](_0x2a67ce=>_0xab30('0xb')==typeof _0x436de2[_0x2a67ce]);}}
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
-
import OperationCompressor from './operationcompressor';
|
|
6
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
-
import type { MarkerOperation } from 'ckeditor5/src/engine';
|
|
8
|
-
export default class MarkerOperationCompressor extends OperationCompressor {
|
|
9
|
-
/**
|
|
10
|
-
* @inheritDoc
|
|
11
|
-
*/
|
|
12
|
-
decompress(result: Array<MarkerOperation>, data: CompressedOperationsData): void;
|
|
13
|
-
}
|
|
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
|
+
import OperationCompressor from './operationcompressor';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
+
import type { MarkerOperation } from 'ckeditor5/src/engine';
|
|
8
|
+
export default class MarkerOperationCompressor extends OperationCompressor {
|
|
9
|
+
/**
|
|
10
|
+
* @inheritDoc
|
|
11
|
+
*/
|
|
12
|
+
decompress(result: Array<MarkerOperation>, data: CompressedOperationsData): void;
|
|
13
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x216a=['newRange','length','oldRange','decompress'];(function(_0x12d77f,_0x216ab3){const _0x1d91ba=function(_0x3ca9c3){while(--_0x3ca9c3){_0x12d77f['push'](_0x12d77f['shift']());}};_0x1d91ba(++_0x216ab3);}(_0x216a,0x68));const _0x1d91=function(_0x12d77f,_0x216ab3){_0x12d77f=_0x12d77f-0x0;let _0x1d91ba=_0x216a[_0x12d77f];return _0x1d91ba;};import _0x4fffdf from'./operationcompressor';export default class n extends _0x4fffdf{['decompress'](_0x8ba554,_0x1a382f){super[_0x1d91('0x3')](_0x8ba554,_0x1a382f);const _0x3f10b7=_0x8ba554[_0x8ba554[_0x1d91('0x1')]-0x1];_0x3f10b7['oldRange']||(_0x3f10b7[_0x1d91('0x2')]=null),_0x3f10b7[_0x1d91('0x0')]||(_0x3f10b7[_0x1d91('0x0')]=null);}}
|
|
@@ -1,20 +1,20 @@
|
|
|
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
|
-
import OperationCompressor from './operationcompressor';
|
|
6
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
-
import type { Operation } from 'ckeditor5/src/engine';
|
|
8
|
-
/**
|
|
9
|
-
* @extends OperationCompressor
|
|
10
|
-
*/
|
|
11
|
-
export default class NoOperationCompressor extends OperationCompressor {
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
20
|
-
}
|
|
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
|
+
import OperationCompressor from './operationcompressor';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
+
import type { Operation } from 'ckeditor5/src/engine';
|
|
8
|
+
/**
|
|
9
|
+
* @extends OperationCompressor
|
|
10
|
+
*/
|
|
11
|
+
export default class NoOperationCompressor extends OperationCompressor {
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
20
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x3070=['_id','shift','decompress','push','compress','types'];(function(_0x30c94f,_0x3070b8){var _0x42d94d=function(_0x36bbb3){while(--_0x36bbb3){_0x30c94f['push'](_0x30c94f['shift']());}};_0x42d94d(++_0x3070b8);}(_0x3070,0x131));var _0x42d9=function(_0x30c94f,_0x3070b8){_0x30c94f=_0x30c94f-0x0;var _0x42d94d=_0x3070[_0x30c94f];return _0x42d94d;};import _0x20413d from'./operationcompressor';export default class p extends _0x20413d{[_0x42d9('0x5')](_0x54bcdc,_0x4c6dee){return _0x4c6dee[_0x42d9('0x2')](),_0x54bcdc[_0x42d9('0x0')][_0x42d9('0x4')](this[_0x42d9('0x1')]),!0x0;}[_0x42d9('0x3')](_0x68b79,_0x508fb2){_0x508fb2[_0x42d9('0x0')]['shift'](),_0x68b79[_0x42d9('0x4')]({'__className':this['_operationName']});}}
|
|
@@ -1,28 +1,28 @@
|
|
|
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
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
6
|
-
import type { ProtobufDescriptor } from '../protobuffactory';
|
|
7
|
-
import type { Operation } from 'ckeditor5/src/engine';
|
|
8
|
-
/**
|
|
9
|
-
* Compresses and decompresses single operation to the binary format.
|
|
10
|
-
*/
|
|
11
|
-
export default class OperationCompressor {
|
|
12
|
-
constructor(id: number, operationName: string, protobufDescriptor: ProtobufDescriptor);
|
|
13
|
-
/**
|
|
14
|
-
* Serializes and consumes the first operation from the list.
|
|
15
|
-
*
|
|
16
|
-
* @param result Object to which compression result will be added.
|
|
17
|
-
* @param operations List of operations to compress. The first one will be compressed
|
|
18
|
-
* and removed from the list.
|
|
19
|
-
*/
|
|
20
|
-
compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Deserializes and consumes buffered operation.
|
|
23
|
-
*
|
|
24
|
-
* @param result Decompressed operation.
|
|
25
|
-
* @param data Data to decompress.
|
|
26
|
-
*/
|
|
27
|
-
decompress(result: Array<Operation>, data: CompressedOperationsData): void;
|
|
28
|
-
}
|
|
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
|
+
import type { CompressedOperationsData } from '../compressor';
|
|
6
|
+
import type { ProtobufDescriptor } from '../protobuffactory';
|
|
7
|
+
import type { Operation } from 'ckeditor5/src/engine';
|
|
8
|
+
/**
|
|
9
|
+
* Compresses and decompresses single operation to the binary format.
|
|
10
|
+
*/
|
|
11
|
+
export default class OperationCompressor {
|
|
12
|
+
constructor(id: number, operationName: string, protobufDescriptor: ProtobufDescriptor);
|
|
13
|
+
/**
|
|
14
|
+
* Serializes and consumes the first operation from the list.
|
|
15
|
+
*
|
|
16
|
+
* @param result Object to which compression result will be added.
|
|
17
|
+
* @param operations List of operations to compress. The first one will be compressed
|
|
18
|
+
* and removed from the list.
|
|
19
|
+
*/
|
|
20
|
+
compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Deserializes and consumes buffered operation.
|
|
23
|
+
*
|
|
24
|
+
* @param result Decompressed operation.
|
|
25
|
+
* @param data Data to decompress.
|
|
26
|
+
*/
|
|
27
|
+
decompress(result: Array<Operation>, data: CompressedOperationsData): void;
|
|
28
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2cd7=['types','compress','_protobufDescriptor','shift','_operationName','_id','__className','decompress','push'];(function(_0x4d9a83,_0x2cd7b9){const _0x20e672=function(_0x5779a6){while(--_0x5779a6){_0x4d9a83['push'](_0x4d9a83['shift']());}};_0x20e672(++_0x2cd7b9);}(_0x2cd7,0x1aa));const _0x20e6=function(_0x4d9a83,_0x2cd7b9){_0x4d9a83=_0x4d9a83-0x0;let _0x20e672=_0x2cd7[_0x4d9a83];return _0x20e672;};import{parsePositionBeforeCompression as _0x3924c6,parsePositionAfterCompression as _0x4fa630}from'../utils';export default class e{constructor(_0x1e7187,_0x272554,_0x5c1e43){this[_0x20e6('0x2')]=_0x1e7187,this[_0x20e6('0x1')]=_0x272554,this[_0x20e6('0x8')]=_0x5c1e43;}[_0x20e6('0x7')](_0x211097,_0x5f28d8){const _0xee4865=_0x5f28d8['shift']();return _0x3924c6(_0xee4865),_0x211097['buffers']['push'](this[_0x20e6('0x8')][_0x20e6('0x7')](_0xee4865)),_0x211097[_0x20e6('0x6')][_0x20e6('0x5')](this[_0x20e6('0x2')]),!0x0;}[_0x20e6('0x4')](_0x23c53b,_0x532232){_0x532232[_0x20e6('0x6')][_0x20e6('0x0')]();const _0x342c19=this[_0x20e6('0x8')]['decompress'](_0x532232['buffers'][_0x20e6('0x0')]());_0x4fa630(_0x342c19),_0x342c19[_0x20e6('0x3')]=this['_operationName'],_0x23c53b[_0x20e6('0x5')](_0x342c19);}}
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
-
*/
|
|
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
|
+
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x21dd=['bool','string','Range','uint32','Position','repeated'];(function(_0x5b3770,_0x21dda6){var _0x49939f=function(_0x1a1b5b){while(--_0x1a1b5b){_0x5b3770['push'](_0x5b3770['shift']());}};_0x49939f(++_0x21dda6);}(_0x21dd,0x1e3));var _0x4993=function(_0x5b3770,_0x21dda6){_0x5b3770=_0x5b3770-0x0;var _0x49939f=_0x21dd[_0x5b3770];return _0x49939f;};'use strict';module['exports']={'AttributeOperation':{'fields':{'range':{'type':'Range','id':0x1},'key':{'type':_0x4993('0x4'),'id':0x2},'oldValueBoolean':{'type':_0x4993('0x3'),'id':0x3},'oldValueJson':{'type':_0x4993('0x4'),'id':0x4},'newValueBoolean':{'type':_0x4993('0x3'),'id':0x5},'newValueJson':{'type':_0x4993('0x4'),'id':0x6},'wasUndone':{'type':_0x4993('0x3'),'id':0x7}}},'InsertOperation':{'fields':{'position':{'type':_0x4993('0x1'),'id':0x1},'nodes':{'rule':_0x4993('0x2'),'type':'Element','id':0x2},'shouldReceiveAttributes':{'type':_0x4993('0x3'),'id':0x3},'wasUndone':{'type':_0x4993('0x3'),'id':0x4}}},'MarkerOperation':{'fields':{'name':{'type':_0x4993('0x4'),'id':0x1},'oldRange':{'type':_0x4993('0x5'),'id':0x2},'newRange':{'type':_0x4993('0x5'),'id':0x3},'affectsData':{'type':_0x4993('0x3'),'id':0x4},'wasUndone':{'type':'bool','id':0x5}}},'MergeOperation':{'fields':{'sourcePosition':{'type':_0x4993('0x1'),'id':0x1},'targetPosition':{'type':_0x4993('0x1'),'id':0x2},'graveyardPosition':{'type':_0x4993('0x1'),'id':0x3},'howMany':{'type':_0x4993('0x0'),'id':0x4},'wasUndone':{'type':'bool','id':0x5}}},'MoveOperation':{'fields':{'sourcePosition':{'type':_0x4993('0x1'),'id':0x1},'howMany':{'type':'uint32','id':0x2},'targetPosition':{'type':_0x4993('0x1'),'id':0x3},'wasUndone':{'type':_0x4993('0x3'),'id':0x4}}},'RenameOperation':{'fields':{'position':{'type':_0x4993('0x1'),'id':0x1},'oldName':{'type':_0x4993('0x4'),'id':0x2},'newName':{'type':_0x4993('0x4'),'id':0x3},'wasUndone':{'type':_0x4993('0x3'),'id':0x4}}},'RootAttributeOperation':{'fields':{'root':{'type':_0x4993('0x4'),'id':0x1},'key':{'type':'string','id':0x2},'oldValueBoolean':{'type':_0x4993('0x3'),'id':0x3},'oldValueJson':{'type':'string','id':0x4},'newValueBoolean':{'type':'bool','id':0x5},'newValueJson':{'type':_0x4993('0x4'),'id':0x6},'wasUndone':{'type':'bool','id':0x7}}},'RootOperation':{'fields':{'rootName':{'type':_0x4993('0x4'),'id':0x1},'elementName':{'type':_0x4993('0x4'),'id':0x2},'isAdd':{'type':_0x4993('0x3'),'id':0x3},'wasUndone':{'type':'bool','id':0x4}}},'SplitOperation':{'fields':{'splitPosition':{'type':_0x4993('0x1'),'id':0x1},'graveyardPosition':{'type':'Position','id':0x2},'howMany':{'type':_0x4993('0x0'),'id':0x3},'insertionPosition':{'type':_0x4993('0x1'),'id':0x4},'wasUndone':{'type':'bool','id':0x5}}},'Position':{'fields':{'root':{'type':'string','id':0x1},'rootMain':{'type':_0x4993('0x3'),'id':0x2},'rootGraveyard':{'type':_0x4993('0x3'),'id':0x3},'path':{'rule':_0x4993('0x2'),'type':_0x4993('0x0'),'id':0x4},'stickiness':{'type':_0x4993('0x4'),'id':0x5}}},'Range':{'fields':{'start':{'type':_0x4993('0x1'),'id':0x1},'end':{'type':_0x4993('0x1'),'id':0x2}}},'Element':{'fields':{'name':{'type':_0x4993('0x4'),'id':0x1},'children':{'rule':_0x4993('0x2'),'type':'Element','id':0x2},'data':{'type':'string','id':0x3},'attributesBoolean':{'keyType':_0x4993('0x4'),'type':_0x4993('0x3'),'id':0x4},'attributesJson':{'type':_0x4993('0x4'),'id':0x5}}}};
|
package/src/protobuffactory.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
-
export {};
|
|
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
|
+
export {};
|
package/src/protobuffactory.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5a29=['decompress','_protobufRoot','_protobuf','toObject','encode','verify','getDescriptor','create','compress','decode'];(function(_0x557c27,_0x5a2934){const _0x345615=function(_0x46d063){while(--_0x46d063){_0x557c27['push'](_0x557c27['shift']());}};_0x345615(++_0x5a2934);}(_0x5a29,0x1cb));const _0x3456=function(_0x557c27,_0x5a2934){_0x557c27=_0x557c27-0x0;let _0x345615=_0x5a29[_0x557c27];return _0x345615;};import*as _0x8d29d from'./lib/compiledmessages';export default class r{constructor(){this['_protobufRoot']=_0x8d29d;}[_0x3456('0x7')](_0x5ed47a){return new ProtobufDescriptor(this[_0x3456('0x2')][_0x5ed47a]);}}export class ProtobufDescriptor{constructor(_0x230137){this[_0x3456('0x3')]=_0x230137;}[_0x3456('0x9')](_0xc671b3){const _0x260f7a=this[_0x3456('0x3')][_0x3456('0x6')](_0xc671b3);if(_0x260f7a)throw Error(_0x260f7a);return this[_0x3456('0x3')][_0x3456('0x5')](this[_0x3456('0x3')][_0x3456('0x8')](_0xc671b3))['finish']();}[_0x3456('0x1')](_0x5e69cd){return this[_0x3456('0x3')][_0x3456('0x4')](this['_protobuf'][_0x3456('0x0')](_0x5e69cd),{'oneofs':!0x0});}}
|
package/src/utils.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
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
|
-
* Return new position in JSON format shifted by given offset.
|
|
7
|
-
*
|
|
8
|
-
* @param positionJSON Position serialized to JSON.
|
|
9
|
-
* @param shift Offset shift. Can be a negative value.
|
|
10
|
-
* @returns New position in JSON format.
|
|
11
|
-
*/
|
|
12
|
-
export declare function getPositionShiftedBy(positionJSON: any, shift: number): any;
|
|
13
|
-
/**
|
|
14
|
-
* Checks whether one position serialized to JSON is equal to other position serialized to JSON.
|
|
15
|
-
*/
|
|
16
|
-
export declare function arePositionsEqual(positionA: any, positionB: any): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* For the better compression result one of the two common roots (`main` or `$graveyard`)
|
|
19
|
-
* is compressed to the `Boolean` format.
|
|
20
|
-
*
|
|
21
|
-
* Due tu the Protobuf limitation `Position` descriptor has no dedicated compressor
|
|
22
|
-
* so we need to find and format all positions in the operation.
|
|
23
|
-
*/
|
|
24
|
-
export declare function parsePositionBeforeCompression(operation: any): void;
|
|
25
|
-
/**
|
|
26
|
-
* Position reformatting after decompression.
|
|
27
|
-
*
|
|
28
|
-
* @see {parsePositionBeforeCompression}.
|
|
29
|
-
*/
|
|
30
|
-
export declare function parsePositionAfterCompression(operation: any): void;
|
|
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
|
+
* Return new position in JSON format shifted by given offset.
|
|
7
|
+
*
|
|
8
|
+
* @param positionJSON Position serialized to JSON.
|
|
9
|
+
* @param shift Offset shift. Can be a negative value.
|
|
10
|
+
* @returns New position in JSON format.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getPositionShiftedBy(positionJSON: any, shift: number): any;
|
|
13
|
+
/**
|
|
14
|
+
* Checks whether one position serialized to JSON is equal to other position serialized to JSON.
|
|
15
|
+
*/
|
|
16
|
+
export declare function arePositionsEqual(positionA: any, positionB: any): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* For the better compression result one of the two common roots (`main` or `$graveyard`)
|
|
19
|
+
* is compressed to the `Boolean` format.
|
|
20
|
+
*
|
|
21
|
+
* Due tu the Protobuf limitation `Position` descriptor has no dedicated compressor
|
|
22
|
+
* so we need to find and format all positions in the operation.
|
|
23
|
+
*/
|
|
24
|
+
export declare function parsePositionBeforeCompression(operation: any): void;
|
|
25
|
+
/**
|
|
26
|
+
* Position reformatting after decompression.
|
|
27
|
+
*
|
|
28
|
+
* @see {parsePositionBeforeCompression}.
|
|
29
|
+
*/
|
|
30
|
+
export declare function parsePositionAfterCompression(operation: any): void;
|
package/src/utils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0xa8f1=['$graveyard','main','rootGraveyard','length','root','path','nodes','rootMain'];(function(_0xdf222f,_0xa8f1f0){const _0x23d419=function(_0x46293e){while(--_0x46293e){_0xdf222f['push'](_0xdf222f['shift']());}};_0x23d419(++_0xa8f1f0);}(_0xa8f1,0x9e));const _0x23d4=function(_0xdf222f,_0xa8f1f0){_0xdf222f=_0xdf222f-0x0;let _0x23d419=_0xa8f1[_0xdf222f];return _0x23d419;};import{cloneDeep as _0x2b16c0,isEqual as _0x4afa06,isObject as _0x398673}from'lodash-es';export function getPositionShiftedBy(_0xda0a54,_0x2385b9){const _0x20726b=_0x2b16c0(_0xda0a54);return _0x20726b['path'][_0x20726b[_0x23d4('0x7')][_0x23d4('0x5')]-0x1]+=_0x2385b9,_0x20726b;}export function arePositionsEqual(_0x159071,_0xfa66fb){return _0x159071[_0x23d4('0x6')]===_0xfa66fb['root']&&_0x4afa06(_0x159071[_0x23d4('0x7')],_0xfa66fb[_0x23d4('0x7')]);}export function parsePositionBeforeCompression(_0x2a9d35){P(_0x2a9d35,_0x379126=>(_0x23d4('0x3')==_0x379126[_0x23d4('0x6')]?(_0x379126[_0x23d4('0x1')]=!0x0,delete _0x379126[_0x23d4('0x6')]):_0x23d4('0x2')==_0x379126['root']&&(_0x379126[_0x23d4('0x4')]=!0x0,delete _0x379126['root']),_0x379126));}export function parsePositionAfterCompression(_0x5023fe){P(_0x5023fe,_0x52452e=>(_0x52452e['rootMain']?(_0x52452e[_0x23d4('0x6')]='main',delete _0x52452e['rootMain']):_0x52452e['rootGraveyard']&&(_0x52452e[_0x23d4('0x6')]=_0x23d4('0x2'),delete _0x52452e[_0x23d4('0x4')]),_0x52452e));}function P(_0x286724,_0x5cb4a0){for(const _0x143b74 in _0x286724){const _0x41a126=_0x286724[_0x143b74];_0x23d4('0x0')!==_0x143b74&&_0x398673(_0x41a126)&&(_0x41a126[_0x23d4('0x7')]&&(_0x41a126[_0x23d4('0x6')]||_0x41a126[_0x23d4('0x1')]||_0x41a126[_0x23d4('0x4')])?_0x286724[_0x143b74]=_0x5cb4a0(_0x41a126):P(_0x41a126,_0x5cb4a0));}return _0x286724;}
|