@ckeditor/ckeditor5-operations-compressor 48.2.0 → 48.3.0-alpha.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/dist/actioncompressor/actioncompressor.d.ts +57 -57
- package/dist/actioncompressor/deletingactioncompressor.d.ts +27 -27
- package/dist/actioncompressor/forwarddeletingactioncompressor.d.ts +27 -27
- package/dist/actioncompressor/typingactioncompressor.d.ts +27 -27
- package/dist/actioncompressor/userselectionactioncompressor.d.ts +15 -15
- package/dist/compressor.d.ts +60 -60
- package/dist/errors.d.ts +0 -4
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/operationcompressor/annotationmarkeroperationcompressor.d.ts +20 -21
- package/dist/operationcompressor/attributeoperationcompressor.d.ts +15 -16
- package/dist/operationcompressor/insertoperationcompressor.d.ts +15 -16
- package/dist/operationcompressor/markeroperationcompressor.d.ts +11 -12
- package/dist/operationcompressor/nooperationcompressor.d.ts +17 -17
- package/dist/operationcompressor/operationcompressor.d.ts +23 -24
- package/dist/protobuffactory.d.ts +0 -4
- package/dist/utils.d.ts +21 -21
- package/package.json +2 -3
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { MarkerOperationCompressor } from
|
|
9
|
-
import type { ProtobufDescriptor } from
|
|
10
|
-
import type { CompressedOperationsData, CompressionInput, DecompressionInput } from
|
|
11
|
-
import type { MarkerOperation } from '@ckeditor/ckeditor5-engine';
|
|
6
|
+
* @module operations-compressor/operationcompressor/annotationmarkeroperationcompressor
|
|
7
|
+
*/
|
|
8
|
+
import { MarkerOperationCompressor } from "./markeroperationcompressor.js";
|
|
9
|
+
import type { ProtobufDescriptor } from "../protobuffactory.js";
|
|
10
|
+
import type { CompressedOperationsData, CompressionInput, DecompressionInput } from "../compressor.js";
|
|
12
11
|
export declare class AnnotationMarkerOperationCompressor extends MarkerOperationCompressor {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
constructor(id: number, name: string, descriptor: ProtobufDescriptor, namespaceToOmit: string);
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
override compress(result: CompressedOperationsData, input: CompressionInput): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
override decompress(result: Array<Record<string, unknown>>, input: DecompressionInput): void;
|
|
25
24
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { OperationCompressor } from
|
|
9
|
-
import type { CompressedOperationsData, CompressionInput, DecompressionInput } from
|
|
10
|
-
import type { AttributeOperation } from '@ckeditor/ckeditor5-engine';
|
|
6
|
+
* @module operations-compressor/operationcompressor/attributeoperationcompressor
|
|
7
|
+
*/
|
|
8
|
+
import { OperationCompressor } from "./operationcompressor.js";
|
|
9
|
+
import type { CompressedOperationsData, CompressionInput, DecompressionInput } from "../compressor.js";
|
|
11
10
|
export declare class AttributeOperationCompressor extends OperationCompressor {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
override compress(result: CompressedOperationsData, input: CompressionInput): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
override decompress(result: Array<Record<string, unknown>>, input: DecompressionInput): void;
|
|
20
19
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { OperationCompressor } from
|
|
9
|
-
import type { CompressedOperationsData, CompressionInput, DecompressionInput } from
|
|
10
|
-
import type { InsertOperation } from '@ckeditor/ckeditor5-engine';
|
|
6
|
+
* @module operations-compressor/operationcompressor/insertoperationcompressor
|
|
7
|
+
*/
|
|
8
|
+
import { OperationCompressor } from "./operationcompressor.js";
|
|
9
|
+
import type { CompressedOperationsData, CompressionInput, DecompressionInput } from "../compressor.js";
|
|
11
10
|
export declare class InsertOperationCompressor extends OperationCompressor {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
override compress(result: CompressedOperationsData, input: CompressionInput): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
override decompress(result: Array<Record<string, unknown>>, input: DecompressionInput): void;
|
|
20
19
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { OperationCompressor } from
|
|
9
|
-
import type { DecompressionInput } from
|
|
10
|
-
import type { MarkerOperation } from '@ckeditor/ckeditor5-engine';
|
|
6
|
+
* @module operations-compressor/operationcompressor/markeroperationcompressor
|
|
7
|
+
*/
|
|
8
|
+
import { OperationCompressor } from "./operationcompressor.js";
|
|
9
|
+
import type { DecompressionInput } from "../compressor.js";
|
|
11
10
|
export declare class MarkerOperationCompressor extends OperationCompressor {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
override decompress(result: Array<Record<string, unknown>>, input: DecompressionInput): void;
|
|
16
15
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { OperationCompressor } from
|
|
9
|
-
import type { CompressedOperationsData, CompressionInput, DecompressionInput } from
|
|
6
|
+
* @module operations-compressor/operationcompressor/nooperationcompressor
|
|
7
|
+
*/
|
|
8
|
+
import { OperationCompressor } from "./operationcompressor.js";
|
|
9
|
+
import type { CompressedOperationsData, CompressionInput, DecompressionInput } from "../compressor.js";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* @extends OperationCompressor
|
|
12
|
+
*/
|
|
13
13
|
export declare class NoOperationCompressor extends OperationCompressor {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
override compress(result: CompressedOperationsData, input: CompressionInput): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
override decompress(result: Array<Record<string, unknown>>, input: DecompressionInput): void;
|
|
22
22
|
}
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { CompressedOperationsData, CompressionInput, DecompressionInput } from
|
|
6
|
-
import type { ProtobufDescriptor } from
|
|
7
|
-
import type { Operation } from '@ckeditor/ckeditor5-engine';
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import type { CompressedOperationsData, CompressionInput, DecompressionInput } from "../compressor.js";
|
|
6
|
+
import type { ProtobufDescriptor } from "../protobuffactory.js";
|
|
8
7
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
* Compresses and decompresses single operation to the binary format.
|
|
9
|
+
*/
|
|
11
10
|
export declare class OperationCompressor {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
11
|
+
constructor(id: number, operationName: string, protobufDescriptor: ProtobufDescriptor);
|
|
12
|
+
/**
|
|
13
|
+
* Serializes and consumes the first operation from the list.
|
|
14
|
+
*
|
|
15
|
+
* @param result Object to which compression result will be added.
|
|
16
|
+
* @param input Input data to compress. The operation compressor will compress one operation (at `input.index`) and increment
|
|
17
|
+
* `input.index`.
|
|
18
|
+
*/
|
|
19
|
+
compress(result: CompressedOperationsData, input: CompressionInput): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Deserializes and consumes buffered operation.
|
|
22
|
+
*
|
|
23
|
+
* @param result Decompressed operation.
|
|
24
|
+
* @param input Input data to decompress.
|
|
25
|
+
*/
|
|
26
|
+
decompress(result: Array<Record<string, unknown>>, input: DecompressionInput): void;
|
|
28
27
|
}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
12
|
export declare function getPositionShiftedBy(positionJSON: any, shift: number): any;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* Checks whether one position serialized to JSON is equal to other position serialized to JSON.
|
|
15
|
+
*/
|
|
16
16
|
export declare function arePositionsEqual(positionA: any, positionB: any): boolean;
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
24
|
export declare function parsePositionBeforeCompression(operation: any): void;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
* Position reformatting after decompression.
|
|
27
|
+
*
|
|
28
|
+
* @see {parsePositionBeforeCompression}.
|
|
29
|
+
*/
|
|
30
30
|
export declare function parsePositionAfterCompression(operation: any): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-operations-compressor",
|
|
3
|
-
"version": "48.
|
|
3
|
+
"version": "48.3.0-alpha.1",
|
|
4
4
|
"description": "CKEditor 5 operations compressor for real-time collaboration.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -37,8 +37,7 @@
|
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@ckeditor/ckeditor5-
|
|
41
|
-
"@ckeditor/ckeditor5-utils": "48.2.0",
|
|
40
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.1",
|
|
42
41
|
"es-toolkit": "1.45.1",
|
|
43
42
|
"protobufjs": "7.5.8"
|
|
44
43
|
},
|