@ckeditor/ckeditor5-operations-compressor 40.1.0 → 41.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -16
- package/LICENSE.md +1 -1
- package/README.md +2 -2
- package/package.json +3 -2
- package/src/actioncompressor/actioncompressor.d.ts +2 -2
- package/src/actioncompressor/actioncompressor.js +2 -2
- package/src/actioncompressor/deletingactioncompressor.d.ts +3 -3
- package/src/actioncompressor/deletingactioncompressor.js +2 -2
- package/src/actioncompressor/forwarddeletingactioncompressor.d.ts +3 -3
- package/src/actioncompressor/forwarddeletingactioncompressor.js +2 -2
- package/src/actioncompressor/typingactioncompressor.d.ts +3 -3
- package/src/actioncompressor/typingactioncompressor.js +2 -2
- package/src/actioncompressor/userselectionactioncompressor.d.ts +3 -3
- package/src/actioncompressor/userselectionactioncompressor.js +2 -2
- package/src/compressor.d.ts +1 -1
- package/src/compressor.js +2 -2
- package/src/lib/compiledmessages.js +2 -2
- package/src/operationcompressor/annotationmarkeroperationcompressor.d.ts +5 -5
- package/src/operationcompressor/annotationmarkeroperationcompressor.js +2 -2
- package/src/operationcompressor/attributeoperationcompressor.d.ts +4 -4
- package/src/operationcompressor/attributeoperationcompressor.js +2 -2
- package/src/operationcompressor/insertoperationcompressor.d.ts +4 -4
- package/src/operationcompressor/insertoperationcompressor.js +2 -2
- package/src/operationcompressor/markeroperationcompressor.d.ts +4 -4
- package/src/operationcompressor/markeroperationcompressor.js +2 -2
- package/src/operationcompressor/nooperationcompressor.d.ts +4 -4
- package/src/operationcompressor/nooperationcompressor.js +2 -2
- package/src/operationcompressor/operationcompressor.d.ts +4 -4
- package/src/operationcompressor/operationcompressor.js +2 -2
- package/src/protobufdescriptions.d.ts +1 -1
- package/src/protobufdescriptions.js +2 -2
- package/src/protobuffactory.d.ts +1 -1
- package/src/protobuffactory.js +2 -2
- package/src/utils.d.ts +1 -1
- package/src/utils.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,87 +6,87 @@ All changes in the package are documented at https://github.com/ckeditor/ckedito
|
|
|
6
6
|
Changes for the past releases are available below.
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
## 23.0.0 (2020
|
|
9
|
+
## 23.0.0 (September 25, 2020)
|
|
10
10
|
|
|
11
11
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## 22.0.0 (2020
|
|
14
|
+
## 22.0.0 (August 25, 2020)
|
|
15
15
|
|
|
16
16
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
## 21.0.0 (2020
|
|
19
|
+
## 21.0.0 (July 24, 2020)
|
|
20
20
|
|
|
21
21
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
## 20.0.1 (2020
|
|
24
|
+
## 20.0.1 (June 26, 2020)
|
|
25
25
|
|
|
26
26
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
## 19.0.2 (2020
|
|
29
|
+
## 19.0.2 (May 25, 2020)
|
|
30
30
|
|
|
31
31
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
## 19.0.1 (2020
|
|
34
|
+
## 19.0.1 (April 30, 2020)
|
|
35
35
|
|
|
36
36
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
## 18.0.0 (2020
|
|
39
|
+
## 18.0.0 (March 19, 2020)
|
|
40
40
|
|
|
41
41
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
## 17.0.0 (2020
|
|
44
|
+
## 17.0.0 (February 20, 2020)
|
|
45
45
|
|
|
46
46
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
## 16.0.0 (2019
|
|
49
|
+
## 16.0.0 (December 2, 2019)
|
|
50
50
|
|
|
51
51
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
## 15.0.0 (2019
|
|
54
|
+
## 15.0.0 (October 23, 2019)
|
|
55
55
|
|
|
56
56
|
### Other changes
|
|
57
57
|
|
|
58
58
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
## 1.1.3 (2019
|
|
61
|
+
## 1.1.3 (August 22, 2019)
|
|
62
62
|
|
|
63
63
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
## 1.1.2 (2019
|
|
66
|
+
## 1.1.2 (July 4, 2019)
|
|
67
67
|
|
|
68
68
|
### Bug fixes
|
|
69
69
|
|
|
70
70
|
* Undone user selection changes will now be properly recognized by the operations compressor.
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
## 1.1.1 (2019
|
|
73
|
+
## 1.1.1 (March 6, 2019)
|
|
74
74
|
|
|
75
75
|
### Bug fixes
|
|
76
76
|
|
|
77
77
|
* Fixed decompressing InsertOperation with no nodes.
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
## 1.1.0 (2019
|
|
80
|
+
## 1.1.0 (February 5, 2019)
|
|
81
81
|
|
|
82
82
|
Added special compression codes for annotation markers.
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
## 1.0.1 (2018
|
|
85
|
+
## 1.0.1 (December 6, 2018)
|
|
86
86
|
|
|
87
87
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
## 1.0.0 (2018
|
|
90
|
+
## 1.0.0 (October 8, 2018)
|
|
91
91
|
|
|
92
92
|
The first stable release of the CKEditor 5 operations compressor. Compress and decompress a collection of operations using [Protocol Buffers for JavaScript](https://github.com/dcodeIO/ProtoBuf.js/) and custom optimizations.
|
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Software License Agreement
|
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
**CKEditor 5 operations compressor**<br>
|
|
5
|
-
Copyright (c) 2003–
|
|
5
|
+
Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
6
6
|
|
|
7
7
|
CKEditor 5 operations compressor is licensed under a commercial license and is protected by copyright law.
|
|
8
8
|
For more details about available licensing options please contact us at sales@cksource.com.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@ckeditor/ckeditor5-operations-compressor)
|
|
4
4
|
|
|
5
|
-
CKEditor 5 operations compressor is a low-level API that compresses and decompresses operations to a normalized binary format
|
|
5
|
+
CKEditor 5 operations compressor is a low-level API that compresses and decompresses operations to a normalized binary format to decrease network usage during real-time collaborative editing. It is required by the [CKEditor 5 real-time collaborative editing](https://ckeditor.com/collaboration/real-time/) feature to enable collaboration in [CKEditor 5](https://ckeditor.com/ckeditor-5/).
|
|
6
6
|
|
|
7
7
|
## Documentation
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ As a licensed CKEditor 5 Collaboration features user you can report bugs an
|
|
|
19
19
|
## License
|
|
20
20
|
|
|
21
21
|
**CKEditor 5 operations compressor**<br>
|
|
22
|
-
Copyright (c) 2003
|
|
22
|
+
Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
23
23
|
|
|
24
24
|
CKEditor 5 operations compressor is licensed under a commercial license and is protected by copyright law.
|
|
25
25
|
For more details about available licensing options please contact us at sales@cksource.com.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-operations-compressor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "41.0.0",
|
|
4
4
|
"description": "CKEditor 5 operations compressor for real-time collaboration.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://ckeditor.com/collaboration/real-time/",
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
"bugs": {
|
|
30
30
|
"url": "https://support.ckeditor.com/hc/en-us/requests/new"
|
|
31
31
|
},
|
|
32
|
+
"type": "module",
|
|
32
33
|
"dependencies": {
|
|
33
|
-
"ckeditor5": "
|
|
34
|
+
"ckeditor5": "41.0.0",
|
|
34
35
|
"lodash-es": "4.17.21",
|
|
35
36
|
"protobufjs": "7.2.4"
|
|
36
37
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { CompressedOperationsData, default as Compressor } from '../compressor';
|
|
5
|
+
import type { CompressedOperationsData, default as Compressor } from '../compressor.js';
|
|
6
6
|
/**
|
|
7
7
|
* * Compresses and decompresses multiple operations into the one buffer.
|
|
8
8
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4d27=['_splitCurrent','compress','shift','_compareOperations','_context','decompress','_combineNext','types','_id','push'];(function(_0x346c90,_0x4d2777){const _0x33fa2f=function(_0x27513f){while(--_0x27513f){_0x346c90['push'](_0x346c90['shift']());}};_0x33fa2f(++_0x4d2777);}(_0x4d27,0x140));const _0x33fa=function(_0x346c90,_0x4d2777){_0x346c90=_0x346c90-0x0;let _0x33fa2f=_0x4d27[_0x346c90];return _0x33fa2f;};import{cloneDeep as _0x4e0487}from'lodash-es';export default class b{constructor(_0x15f9a2,_0x565215){this[_0x33fa('0x8')]=_0x15f9a2,this[_0x33fa('0x4')]=_0x565215;}[_0x33fa('0x1')](_0x3db863,_0x472eec){let _0x4806e9;for(;_0x472eec['length']>0x1&&this[_0x33fa('0x3')](_0x472eec[0x0],_0x472eec[0x1]);)_0x4806e9?(_0x4806e9=this['_combineNext'](_0x472eec[_0x33fa('0x2')](),_0x4806e9),_0x3db863[_0x33fa('0x7')][_0x33fa('0x9')](0x0)):(_0x4806e9=_0x4e0487(_0x472eec[_0x33fa('0x2')]()),_0x3db863[_0x33fa('0x7')][_0x33fa('0x9')](this[_0x33fa('0x8')]));return!!_0x4806e9&&(_0x4806e9=this[_0x33fa('0x6')](_0x472eec['shift'](),_0x4806e9),_0x3db863[_0x33fa('0x7')][_0x33fa('0x9')](0x0),_0x3db863['buffers'][_0x33fa('0x9')](this['_compressSingleOperation'](_0x4806e9)),!0x0);}[_0x33fa('0x5')](_0x5b42d9,_0x415c8c){const _0x546b51=this['_decompressSingleOperation'](_0x415c8c);for(;0x0==_0x415c8c[_0x33fa('0x7')][0x0];)_0x415c8c[_0x33fa('0x7')][_0x33fa('0x2')](),_0x5b42d9['push'](this[_0x33fa('0x0')](_0x546b51));_0x5b42d9[_0x33fa('0x9')](_0x546b51);}}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import ActionCompressor from './actioncompressor';
|
|
6
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
5
|
+
import ActionCompressor from './actioncompressor.js';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
7
7
|
export default class DeletingActionCompressor extends ActionCompressor {
|
|
8
8
|
/**
|
|
9
9
|
* @inheritDoc
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1912=['_combineNext','_checkOperation','$graveyard','MoveOperation','decompress','howMany','wasUndone','_getCompressorByName','sourcePosition','_context','_compressSingleOperation','_splitCurrent','targetPosition'];(function(_0x44347d,_0x191241){const _0x437daa=function(_0xe5f1e){while(--_0xe5f1e){_0x44347d['push'](_0x44347d['shift']());}};_0x437daa(++_0x191241);}(_0x1912,0x182));const _0x437d=function(_0x44347d,_0x191241){_0x44347d=_0x44347d-0x0;let _0x437daa=_0x1912[_0x44347d];return _0x437daa;};import _0xf27b6 from'./actioncompressor.js';import{arePositionsEqual as _0x4c1e25,getPositionShiftedBy as _0x421bd8}from'../utils.js';import{cloneDeep as _0x2ae48b}from'lodash-es';export default class c extends _0xf27b6{[_0x437d('0x4')](_0x8ee280,_0xf1868c){return _0xf1868c[_0x437d('0x9')]++,_0xf1868c[_0x437d('0xc')]=_0x2ae48b(_0x8ee280['sourcePosition']),_0xf1868c;}[_0x437d('0x2')](_0x5ed079){const _0x5b1ab9=_0x2ae48b(_0x5ed079);return _0x5ed079[_0x437d('0x9')]--,_0x5b1ab9['howMany']=0x1,_0x5b1ab9[_0x437d('0xc')]=_0x421bd8(_0x5b1ab9['sourcePosition'],_0x5ed079[_0x437d('0x9')]),_0x5b1ab9;}['_compareOperations'](_0x13a1d4,_0x434a84){return!(!this['_checkOperation'](_0x13a1d4)||!this[_0x437d('0x5')](_0x434a84))&&(_0x4c1e25(_0x421bd8(_0x13a1d4[_0x437d('0xc')],-0x1),_0x434a84['sourcePosition'])&&_0x4c1e25(_0x13a1d4['targetPosition'],_0x434a84[_0x437d('0x3')]));}[_0x437d('0x1')](_0x530ce8){const _0x1dea21={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x437d('0x0')][_0x437d('0xb')](_0x437d('0x7'))['compress'](_0x1dea21,[_0x530ce8]),_0x1dea21['buffers'][0x0];}['_decompressSingleOperation'](_0x5c29f4){const _0x5ab554=[];return this['_context'][_0x437d('0xb')]('MoveOperation')[_0x437d('0x8')](_0x5ab554,_0x5c29f4),_0x5ab554[0x0];}[_0x437d('0x5')](_0x17039e){return _0x437d('0x7')==_0x17039e['__className']&&_0x437d('0x6')==_0x17039e[_0x437d('0x3')]['root']&&0x1==_0x17039e[_0x437d('0x9')]&&!_0x17039e[_0x437d('0xa')];}}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import ActionCompressor from './actioncompressor';
|
|
6
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
5
|
+
import ActionCompressor from './actioncompressor.js';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
7
7
|
export default class ForwardDeletingActionCompressor extends ActionCompressor {
|
|
8
8
|
/**
|
|
9
9
|
* @inheritDoc
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4cbc=['_combineNext','_decompressSingleOperation','$graveyard','_compareOperations','targetPosition','buffers','_context','sourcePosition','_compressSingleOperation','root','MoveOperation','howMany','_checkOperation','decompress','_getCompressorByName'];(function(_0x214c76,_0x4cbcc0){const _0x5d8294=function(_0x3328de){while(--_0x3328de){_0x214c76['push'](_0x214c76['shift']());}};_0x5d8294(++_0x4cbcc0);}(_0x4cbc,0xef));const _0x5d82=function(_0x214c76,_0x4cbcc0){_0x214c76=_0x214c76-0x0;let _0x5d8294=_0x4cbc[_0x214c76];return _0x5d8294;};import _0x5d72ba from'./actioncompressor.js';import{arePositionsEqual as _0x2cdb90}from'../utils.js';import{cloneDeep as _0xd6e19d}from'lodash-es';export default class h extends _0x5d72ba{[_0x5d82('0x1')](_0x46df59,_0x564bcc){return _0x564bcc[_0x5d82('0xc')]++,_0x564bcc;}['_splitCurrent'](_0xc771a6){const _0x5c1cdc=_0xd6e19d(_0xc771a6);return _0x5c1cdc[_0x5d82('0xc')]=0x1,_0xc771a6[_0x5d82('0xc')]--,_0x5c1cdc;}[_0x5d82('0x4')](_0xd68cab,_0x54353){return!(!this[_0x5d82('0xd')](_0xd68cab)||!this[_0x5d82('0xd')](_0x54353))&&(_0x2cdb90(_0xd68cab['sourcePosition'],_0x54353[_0x5d82('0x8')])&&_0x2cdb90(_0xd68cab['targetPosition'],_0x54353['targetPosition']));}[_0x5d82('0x9')](_0x48c382){const _0x101249={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x5d82('0x7')][_0x5d82('0x0')](_0x5d82('0xb'))['compress'](_0x101249,[_0x48c382]),_0x101249[_0x5d82('0x6')][0x0];}[_0x5d82('0x2')](_0x2b69e5){const _0xba341f=[];return this['_context'][_0x5d82('0x0')](_0x5d82('0xb'))[_0x5d82('0xe')](_0xba341f,_0x2b69e5),_0xba341f[0x0];}[_0x5d82('0xd')](_0x332616){return _0x5d82('0xb')==_0x332616['__className']&&_0x5d82('0x3')==_0x332616[_0x5d82('0x5')][_0x5d82('0xa')]&&0x1==_0x332616[_0x5d82('0xc')]&&!_0x332616['wasUndone'];}}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import ActionCompressor from './actioncompressor';
|
|
6
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
5
|
+
import ActionCompressor from './actioncompressor.js';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
7
7
|
export default class TypingActionCompressor extends ActionCompressor {
|
|
8
8
|
/**
|
|
9
9
|
* @inheritDocs
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1106=['_getCompressorByName','_compressSingleOperation','from','wasUndone','every','iterator','_checkOperation','attributes','keys','compress','length','_compareOperations','InsertOperation','next','nodes','_combineNext','__className','buffers','substr','value','position','_context','_compareAttributes','data','decompress','_decompressSingleOperation'];(function(_0xed4f59,_0x1106c6){const _0x83fcd2=function(_0x1d4da7){while(--_0x1d4da7){_0xed4f59['push'](_0xed4f59['shift']());}};_0x83fcd2(++_0x1106c6);}(_0x1106,0xa2));const _0x83fc=function(_0xed4f59,_0x1106c6){_0xed4f59=_0xed4f59-0x0;let _0x83fcd2=_0x1106[_0xed4f59];return _0x83fcd2;};import _0x5184e5 from'./actioncompressor.js';import{arePositionsEqual as _0x4bfc61,getPositionShiftedBy as _0x5402c4}from'../utils.js';import{cloneDeep as _0x1d0fda}from'lodash-es';export default class m extends _0x5184e5{[_0x83fc('0x9')](_0xec8481,_0x1f652b){return _0x1f652b[_0x83fc('0x8')][0x0][_0x83fc('0x11')]+=_0xec8481[_0x83fc('0x8')][0x0]['data'],_0x1f652b;}['_splitCurrent'](_0x1426c0){const _0x4119b1=_0x1d0fda(_0x1426c0),_0x34d63a=_0x4119b1[_0x83fc('0x8')][0x0],_0x3a2192=_0x1426c0['nodes'][0x0],_0x374790=_0x3a2192[_0x83fc('0x11')][Symbol[_0x83fc('0x19')]]()[_0x83fc('0x7')]()[_0x83fc('0xd')],_0x2385dc=_0x374790[_0x83fc('0x4')];return _0x34d63a['data']=_0x374790,_0x3a2192[_0x83fc('0x11')]=_0x3a2192[_0x83fc('0x11')][_0x83fc('0xc')](_0x2385dc),_0x1426c0[_0x83fc('0xe')]=_0x5402c4(_0x1426c0[_0x83fc('0xe')],_0x2385dc),_0x4119b1;}[_0x83fc('0x5')](_0x177c7b,_0x535035){if(this['_checkOperation'](_0x177c7b)&&this[_0x83fc('0x0')](_0x535035)){const _0x5816df=_0x177c7b[_0x83fc('0x8')][0x0][_0x83fc('0x11')][_0x83fc('0x4')],_0x1ee647=_0x4bfc61(_0x5402c4(_0x177c7b[_0x83fc('0xe')],_0x5816df),_0x535035[_0x83fc('0xe')]),_0x34f996=_0x177c7b[_0x83fc('0x8')][0x0],_0x5a21fa=_0x535035[_0x83fc('0x8')][0x0];return _0x1ee647&&this[_0x83fc('0x10')](_0x34f996,_0x5a21fa);}return!0x1;}[_0x83fc('0x15')](_0x5935bf){const _0x3bebbd={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x83fc('0xf')]['_getCompressorByName']('InsertOperation')[_0x83fc('0x3')](_0x3bebbd,[_0x5935bf]),_0x3bebbd[_0x83fc('0xb')][0x0];}[_0x83fc('0x13')](_0x177f6f){const _0xe2a20f=[];return this[_0x83fc('0xf')][_0x83fc('0x14')](_0x83fc('0x6'))[_0x83fc('0x12')](_0xe2a20f,_0x177f6f),_0xe2a20f[0x0];}[_0x83fc('0x0')](_0x35ded0){return _0x83fc('0x6')==_0x35ded0[_0x83fc('0xa')]&&0x1==_0x35ded0['nodes'][_0x83fc('0x4')]&&_0x35ded0[_0x83fc('0x8')][0x0][_0x83fc('0x11')]&&!_0x35ded0[_0x83fc('0x17')]&&0x1==Array[_0x83fc('0x16')](_0x35ded0[_0x83fc('0x8')][0x0][_0x83fc('0x11')])[_0x83fc('0x4')];}[_0x83fc('0x10')](_0x5a0bcc,_0x2a744e){const _0x365f42=Object[_0x83fc('0x2')](_0x5a0bcc[_0x83fc('0x1')]||{}),_0x37145a=Object[_0x83fc('0x2')](_0x2a744e['attributes']||{});return _0x365f42[_0x83fc('0x4')]===_0x37145a['length']&&_0x365f42[_0x83fc('0x18')](_0x2b2059=>_0x2a744e[_0x83fc('0x1')][_0x2b2059]&&_0x2a744e[_0x83fc('0x1')][_0x2b2059]===_0x5a0bcc[_0x83fc('0x1')][_0x2b2059]);}}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import ActionCompressor from './actioncompressor';
|
|
6
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
5
|
+
import ActionCompressor from './actioncompressor.js';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
7
7
|
export default class UserSelectionActionCompressor extends ActionCompressor {
|
|
8
8
|
/**
|
|
9
9
|
* @inheritDoc
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1099=['_compressSingleOperation','user:','name','_getCompressorByName','compress','types','_compareOperations','shift','newRange','_id','decompress','stickiness','__className','buffers','user:position:','end','push','start','split','startsWith','_context','MarkerOperation','_decompressSingleOperation'];(function(_0x4f2d4b,_0x1099b2){const _0x1bb00c=function(_0x5acc7f){while(--_0x5acc7f){_0x4f2d4b['push'](_0x4f2d4b['shift']());}};_0x1bb00c(++_0x1099b2);}(_0x1099,0x1b0));const _0x1bb0=function(_0x4f2d4b,_0x1099b2){_0x4f2d4b=_0x4f2d4b-0x0;let _0x1bb00c=_0x1099[_0x4f2d4b];return _0x1bb00c;};import _0x56ba07 from'./actioncompressor.js';import{arePositionsEqual as _0x415fbe}from'../utils.js';import{cloneDeep as _0x1c1543}from'lodash-es';export default class f extends _0x56ba07{[_0x1bb0('0x9')](_0x241a34,_0x2acbba){if(!this[_0x1bb0('0xb')](_0x2acbba[0x0],_0x2acbba[0x1]))return!0x1;const _0x2eaf4f=_0x2acbba[_0x1bb0('0xc')]();return _0x2eaf4f['oldRange']=null,_0x2eaf4f[_0x1bb0('0xd')]&&_0x415fbe(_0x2eaf4f['newRange'][_0x1bb0('0x16')],_0x2eaf4f[_0x1bb0('0xd')][_0x1bb0('0x14')])&&(_0x2eaf4f[_0x1bb0('0xd')]['end']=null),_0x2acbba[_0x1bb0('0xc')](),_0x241a34[_0x1bb0('0xa')][_0x1bb0('0x15')](this[_0x1bb0('0xe')]),_0x241a34['types'][_0x1bb0('0x15')](0x0),_0x241a34[_0x1bb0('0x12')][_0x1bb0('0x15')](this[_0x1bb0('0x5')](_0x2eaf4f)),!0x0;}[_0x1bb0('0xf')](_0x3d9e49,_0x3f9728){const _0x31fdb8=this['_decompressSingleOperation'](_0x3f9728);_0x31fdb8[_0x1bb0('0xd')]&&!_0x31fdb8[_0x1bb0('0xd')][_0x1bb0('0x14')]&&(_0x31fdb8[_0x1bb0('0xd')][_0x1bb0('0x14')]=_0x1c1543(_0x31fdb8[_0x1bb0('0xd')]['start']));const _0x31fba0=_0x1c1543(_0x31fdb8);_0x31fba0[_0x1bb0('0xd')]&&(_0x31fba0['newRange'][_0x1bb0('0x16')][_0x1bb0('0x10')]='toNone',_0x31fba0[_0x1bb0('0xd')]['end']=_0x1c1543(_0x31fba0[_0x1bb0('0xd')][_0x1bb0('0x16')])),_0x31fba0[_0x1bb0('0x7')]=_0x1bb0('0x13')+_0x31fba0[_0x1bb0('0x7')][_0x1bb0('0x0')](':')[0x2],_0x3f9728[_0x1bb0('0xa')][_0x1bb0('0xc')](),_0x3d9e49[_0x1bb0('0x15')](_0x31fdb8),_0x3d9e49[_0x1bb0('0x15')](_0x31fba0);}[_0x1bb0('0x5')](_0x525fd2){const _0x443d6a={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x1bb0('0x2')][_0x1bb0('0x8')](_0x1bb0('0x3'))[_0x1bb0('0x9')](_0x443d6a,[_0x525fd2]),_0x443d6a[_0x1bb0('0x12')][0x0];}[_0x1bb0('0x4')](_0x124158){const _0xe61d6e=[];return this[_0x1bb0('0x2')][_0x1bb0('0x8')](_0x1bb0('0x3'))[_0x1bb0('0xf')](_0xe61d6e,_0x124158),_0xe61d6e[0x0];}[_0x1bb0('0xb')](_0x35004a,_0x2c0159){return!(!_0x35004a||!_0x2c0159)&&(_0x1bb0('0x3')==_0x35004a[_0x1bb0('0x11')]&&_0x1bb0('0x3')==_0x2c0159[_0x1bb0('0x11')]&&!(!_0x35004a[_0x1bb0('0x7')]['startsWith']('user:')||!_0x2c0159[_0x1bb0('0x7')][_0x1bb0('0x1')](_0x1bb0('0x6'))||_0x35004a[_0x1bb0('0x7')]==_0x2c0159[_0x1bb0('0x7')]));}}
|
package/src/compressor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/compressor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0xef90=['UserSelectionAction','_protobufFactory','RenameOperation','TypingAction','comment','MergeOperation','getDescriptor','_compressorByName','types','compress','InsertOperation','CommentMarkerOperation','suggestion','SplitOperation','DeletingAction','_registerCompressor','_getCompressorByName','ForwardDeletingAction','forEach','baseVersion','set','RootAttributeOperation','get','decompress','SuggestionMarkerOperation','RootOperation','_compressorById','NoOperation','_registerOperationCompressor','MoveOperation','_registerActionCompressor','__className','MarkerOperation','length'];(function(_0x50562d,_0xef904d){const _0x19a342=function(_0x346d74){while(--_0x346d74){_0x50562d['push'](_0x50562d['shift']());}};_0x19a342(++_0xef904d);}(_0xef90,0x1b5));const _0x19a3=function(_0x50562d,_0xef904d){_0x50562d=_0x50562d-0x0;let _0x19a342=_0xef90[_0x50562d];return _0x19a342;};import{CKEditorError as _0x3e26df}from'ckeditor5/src/utils.js';import _0x3e0a06 from'./protobuffactory.js';import _0x2fbacd from'./operationcompressor/operationcompressor.js';import _0x95c553 from'./operationcompressor/attributeoperationcompressor.js';import _0x346343 from'./operationcompressor/insertoperationcompressor.js';import _0x5c2465 from'./operationcompressor/markeroperationcompressor.js';import _0x2518c1 from'./operationcompressor/nooperationcompressor.js';import _0x4bcdc7 from'./operationcompressor/annotationmarkeroperationcompressor.js';import _0x4985a9 from'./actioncompressor/typingactioncompressor.js';import _0x31549f from'./actioncompressor/deletingactioncompressor.js';import _0x397dc1 from'./actioncompressor/forwarddeletingactioncompressor.js';import _0x2126e1 from'./actioncompressor/userselectionactioncompressor.js';export default class g{constructor(){this['_compressorById']=new Map(),this['_compressorByName']=new Map(),this[_0x19a3('0x6')]=new _0x3e0a06();const _0x4f1a45=this[_0x19a3('0x6')][_0x19a3('0xb')](_0x19a3('0x3'));this[_0x19a3('0x14')](0x1,_0x19a3('0x20'),new _0x2518c1(0x1,_0x19a3('0x20'),void 0x0)),this[_0x19a3('0x21')](0xa,'AttributeOperation',_0x95c553),this['_registerOperationCompressor'](0xb,_0x19a3('0xf'),_0x346343),this['_registerOperationCompressor'](0xc,_0x19a3('0x3'),_0x5c2465),this[_0x19a3('0x21')](0xd,_0x19a3('0xa'),_0x2fbacd),this[_0x19a3('0x21')](0xe,_0x19a3('0x0'),_0x2fbacd),this[_0x19a3('0x21')](0xf,_0x19a3('0x7'),_0x2fbacd),this[_0x19a3('0x21')](0x10,_0x19a3('0x1a'),_0x95c553),this[_0x19a3('0x21')](0x11,_0x19a3('0x12'),_0x2fbacd),this[_0x19a3('0x14')](0x12,_0x19a3('0x10'),new _0x4bcdc7(0x12,'MarkerOperation',_0x4f1a45,_0x19a3('0x9'))),this['_registerCompressor'](0x13,_0x19a3('0x1d'),new _0x4bcdc7(0x13,'MarkerOperation',_0x4f1a45,_0x19a3('0x11'))),this['_registerOperationCompressor'](0x14,_0x19a3('0x1e'),_0x2fbacd),this[_0x19a3('0x1')](0x64,_0x19a3('0x8'),_0x4985a9),this['_registerActionCompressor'](0x65,_0x19a3('0x13'),_0x31549f),this['_registerActionCompressor'](0x66,_0x19a3('0x16'),_0x397dc1),this[_0x19a3('0x1')](0x67,_0x19a3('0x5'),_0x2126e1);}[_0x19a3('0xe')](_0x10ed06){if(!_0x10ed06||!_0x10ed06[0x0])throw new _0x3e26df('no-operations-provided',this);const _0x250f23={'types':[],'buffers':[],'baseVersion':_0x10ed06[0x0][_0x19a3('0x18')]};for(;_0x10ed06[_0x19a3('0x4')];)this[_0x19a3('0x15')](_0x19a3('0x5'))['compress'](_0x250f23,_0x10ed06)||this['_getCompressorByName'](_0x19a3('0x8'))['compress'](_0x250f23,_0x10ed06)||this[_0x19a3('0x15')](_0x19a3('0x13'))[_0x19a3('0xe')](_0x250f23,_0x10ed06)||this[_0x19a3('0x15')](_0x19a3('0x16'))[_0x19a3('0xe')](_0x250f23,_0x10ed06)||this[_0x19a3('0x15')]('CommentMarkerOperation')[_0x19a3('0xe')](_0x250f23,_0x10ed06)||this[_0x19a3('0x15')](_0x19a3('0x1d'))[_0x19a3('0xe')](_0x250f23,_0x10ed06)||this[_0x19a3('0x15')](_0x10ed06[0x0][_0x19a3('0x2')])[_0x19a3('0xe')](_0x250f23,_0x10ed06);return _0x250f23;}[_0x19a3('0x1c')](_0x4b5338){const _0x1de5aa=[];for(;_0x4b5338[_0x19a3('0xd')][_0x19a3('0x4')];){this[_0x19a3('0x1f')][_0x19a3('0x1b')](_0x4b5338[_0x19a3('0xd')][0x0])[_0x19a3('0x1c')](_0x1de5aa,_0x4b5338);}return _0x1de5aa[_0x19a3('0x17')]((_0x1b45fa,_0x26d72f)=>_0x1b45fa[_0x19a3('0x18')]=_0x4b5338['baseVersion']+_0x26d72f),_0x1de5aa;}[_0x19a3('0x15')](_0x5e8ec1){return this[_0x19a3('0xc')][_0x19a3('0x1b')](_0x5e8ec1);}[_0x19a3('0x21')](_0x5ecf2a,_0x127993,_0x252144){const _0x2e5482=new _0x252144(_0x5ecf2a,_0x127993,this[_0x19a3('0x6')][_0x19a3('0xb')](_0x127993));this[_0x19a3('0x14')](_0x5ecf2a,_0x127993,_0x2e5482);}[_0x19a3('0x1')](_0xa8cc7d,_0x182957,_0x34d34d){const _0x318391=new _0x34d34d(_0xa8cc7d,this);this[_0x19a3('0x14')](_0xa8cc7d,_0x182957,_0x318391);}[_0x19a3('0x14')](_0x5321d0,_0x3b1494,_0x2be1e8){this[_0x19a3('0x1f')]['set'](_0x5321d0,_0x2be1e8),this[_0x19a3('0xc')][_0x19a3('0x19')](_0x3b1494,_0x2be1e8);}}
|