@ckeditor/ckeditor5-track-changes 0.0.0-nightly-20230725.0 → 0.0.0-nightly-20230725.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-track-changes",
|
|
3
|
-
"version": "0.0.0-nightly-20230725.
|
|
3
|
+
"version": "0.0.0-nightly-20230725.1",
|
|
4
4
|
"description": "CKEditor 5 track changes plugin.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"CHANGELOG.md"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"ckeditor5": "0.0.0-nightly-20230725.
|
|
43
|
-
"ckeditor5-collaboration": "0.0.0-nightly-20230725.
|
|
42
|
+
"ckeditor5": "0.0.0-nightly-20230725.1",
|
|
43
|
+
"ckeditor5-collaboration": "0.0.0-nightly-20230725.1",
|
|
44
44
|
"lodash-es": "4.17.21"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x48f7=['model','name','formatBlock','filter','ELEMENT_CODE_BLOCK','forceValue','languages','enableCommand','commandParams','rootElement','selection','registerDescriptionCallback','TrackChangesEditing','markBlockFormat','blockName','label','indentCodeBlock','from','has','codeBlock','change','_descriptionFactory','plugins','*Format:*\x20%0','format','config','get','language','getSelectedBlocks','outdentCodeBlock','value','CodeBlock','checkChild','afterInit'];(function(_0x4944be,_0x48f7d9){const _0x38a860=function(_0x4a951e){while(--_0x4a951e){_0x4944be['push'](_0x4944be['shift']());}};_0x38a860(++_0x48f7d9);}(_0x48f7,0x198));const _0x38a8=function(_0x4944be,_0x48f7d9){_0x4944be=_0x4944be-0x0;let _0x38a860=_0x48f7[_0x4944be];return _0x38a860;};import{Plugin as _0x70a4c2}from'ckeditor5/src/core';import{getTranslation as _0x3f928c}from'../utils/common-translations';import{getRangesOfBlockGroups as _0x39f005}from'../utils/utils';export default class O extends _0x70a4c2{[_0x38a8('0x21')](){const _0x456adc=this['editor'];if(!_0x456adc[_0x38a8('0x16')][_0x38a8('0x12')](_0x38a8('0x1f')))return;const _0xf1c6aa=_0x456adc['plugins'][_0x38a8('0x1a')](_0x38a8('0xc')),_0x583b54=_0x456adc['locale'],_0x2c93a2=_0x456adc[_0x38a8('0x19')][_0x38a8('0x1a')](_0x38a8('0x13'))[_0x38a8('0x6')],_0x366ddc=_0x456adc['commands'][_0x38a8('0x1a')](_0x38a8('0x13'));_0xf1c6aa[_0x38a8('0x7')](_0x38a8('0x10')),_0xf1c6aa[_0x38a8('0x7')](_0x38a8('0x1d')),_0xf1c6aa['enableCommand'](_0x38a8('0x13'),(_0x90e2af,_0x5999c1={})=>{const _0x4b4786=_0x456adc[_0x38a8('0x0')],_0x94fae0=_0x456adc[_0x38a8('0x0')]['document'][_0x38a8('0xa')],_0x5452aa=_0x5999c1&&void 0x0!==_0x5999c1[_0x38a8('0x5')]?_0x5999c1[_0x38a8('0x5')]:!_0x366ddc[_0x38a8('0x1e')];let _0x1f50c5;_0x5999c1[_0x38a8('0x1b')]||(_0x5999c1['language']=_0x2c93a2[0x0][_0x38a8('0x1b')]),_0x1f50c5=_0x5452aa?Array['from'](_0x94fae0[_0x38a8('0x1c')]())[_0x38a8('0x3')](_0x52dd5f=>oo(_0x52dd5f)||function(_0x35f635,_0x4fc59d){if(_0x35f635['is'](_0x38a8('0x9'))||_0x4fc59d['isLimit'](_0x35f635))return!0x1;return _0x4fc59d[_0x38a8('0x20')](_0x35f635['parent'],'codeBlock');}(_0x52dd5f,_0x4b4786['schema'])):Array[_0x38a8('0x11')](_0x94fae0['getSelectedBlocks']())['filter'](_0x12aa33=>oo(_0x12aa33));const _0x516359=_0x39f005(_0x1f50c5,_0x4b4786);_0x4b4786[_0x38a8('0x14')](()=>{for(const _0x347754 of _0x516359)_0xf1c6aa[_0x38a8('0xd')](_0x347754,{'commandName':_0x38a8('0x13'),'commandParams':[{..._0x5999c1,'forceValue':_0x5452aa}],'formatGroupId':_0x38a8('0xe')});});}),(_0xf1c6aa['_descriptionFactory']['registerElementLabel'](_0x38a8('0x13'),_0x1b07be=>_0x3f928c(_0x583b54,_0x38a8('0x4'),_0x1b07be)),_0xf1c6aa[_0x38a8('0x15')][_0x38a8('0xb')](_0x19280a=>{const _0x335f39=_0x583b54['t'],{type:_0x54ce3b,data:_0x321086}=_0x19280a;if(_0x38a8('0x2')==_0x54ce3b&&_0x321086&&_0x38a8('0x13')==_0x321086['commandName']){const _0x5eafe2=_0x321086[_0x38a8('0x8')][0x0][_0x38a8('0x1b')],_0x5dc484=_0x335f39(_0x2c93a2['find'](_0x395974=>_0x395974['language']===_0x5eafe2)[_0x38a8('0xf')]);return _0x321086['commandParams'][0x0][_0x38a8('0x5')]?{'type':_0x38a8('0x18'),'content':_0x3f928c(_0x583b54,_0x38a8('0x17'),_0x3f928c(_0x583b54,_0x38a8('0x4'),0x1)+'\x20('+_0x5dc484+')')}:{'type':'format','content':_0x3f928c(_0x583b54,'*Remove\x20format:*\x20%0',_0x3f928c(_0x583b54,_0x38a8('0x4'),0x1))};}}));}}function oo(_0x56a455){return _0x38a8('0x13')==_0x56a455[_0x38a8('0x1')];}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2d72=['schema','getLastPosition','getAttributeProperties','from','pasteFormat','backward','length','word','createSelection','getFirstPosition','createRange','registerDescriptionCallback','locale','selection','keys','toLowerCase','TrackChangesEditing','enableCommand','entries','editor','_descriptionFactory','slice','getAttributes','commands','*Remove\x20all\x20formatting*','fontColor.colors','change','*Set\x20format\x20to:*\x20%0','plugins','isFormatting','title','isCollapsed','format','push','config','normalizeSizeOptions','fontBackgroundColor','markInlineFormat','getRanges','afterInit','commandName','forward','copyFormat','get','fontSize','document','modifySelection','find'];(function(_0x5b7ca3,_0x2d729a){const _0x101326=function(_0x57753a){while(--_0x57753a){_0x5b7ca3['push'](_0x5b7ca3['shift']());}};_0x101326(++_0x2d729a);}(_0x2d72,0x1e4));const _0x1013=function(_0x5b7ca3,_0x2d729a){_0x5b7ca3=_0x5b7ca3-0x0;let _0x101326=_0x2d72[_0x5b7ca3];return _0x101326;};import{Plugin as _0xee0e21}from'ckeditor5/src/core';import{normalizeColorOptions as _0x116fdd}from'ckeditor5/src/ui';import{first as _0x608acc}from'ckeditor5/src/utils';import{getTranslation as _0x5c9d3e}from'../utils/common-translations';export default class W extends _0xee0e21{[_0x1013('0x23')](){const _0xe81d9d=this[_0x1013('0xf')],_0x8ea3cd=_0xe81d9d['model'],_0xf7e3ff=_0x8ea3cd[_0x1013('0x29')][_0x1013('0x9')],_0x558a10=_0xe81d9d[_0x1013('0x18')]['get'](_0x1013('0xc')),_0x58325f=_0xe81d9d[_0x1013('0x8')],_0x37584c=_0xe81d9d[_0x1013('0x13')][_0x1013('0x27')](_0x1013('0x26')),_0x2977b9=_0xe81d9d[_0x1013('0x13')][_0x1013('0x27')](_0x1013('0x0'));_0x37584c&&_0x2977b9&&(_0x558a10[_0x1013('0xd')]('pasteFormat',(_0x37f284,_0x17cfc7={})=>{const _0x7b9302=_0x17cfc7;_0x8ea3cd[_0x1013('0x16')](()=>{const _0x46b8cd=Array[_0x1013('0x2f')](_0xf7e3ff['getRanges']()),_0xe231b1=_0xf7e3ff[_0x1013('0x1b')]?[ro(_0x8ea3cd,_0xf7e3ff)]:_0x46b8cd,_0x3ff025=!!_0x608acc(function*(_0x39385e,_0x1df071){const _0x45065e=_0x28e750=>!!_0x608acc(function*(_0x29227a,_0x4d1435){for(const [_0x4aca74]of _0x29227a[_0x1013('0x12')]()){const _0x108f08=_0x4d1435[_0x1013('0x2e')](_0x4aca74);_0x108f08&&_0x108f08[_0x1013('0x19')]&&(yield _0x4aca74);}}(_0x28e750,_0x1df071));for(const _0x5920e9 of _0x39385e[_0x1013('0x22')]())for(const _0x1ed8bc of _0x5920e9['getItems']())!_0x1df071['isBlock'](_0x1ed8bc)&&_0x45065e(_0x1ed8bc)&&(yield _0x1ed8bc);for(const _0xe8bc2e of _0x39385e['getSelectedBlocks']())_0x45065e(_0xe8bc2e)&&(yield _0xe8bc2e);_0x45065e(_0x39385e)&&(yield _0x39385e);}(_0xf7e3ff,_0x8ea3cd[_0x1013('0x2c')]));if(_0x3ff025||0x0!==Object[_0x1013('0xa')](_0x7b9302)[_0x1013('0x2')])for(const _0x4dde42 of _0xe231b1)_0x558a10[_0x1013('0x21')](_0x4dde42,{'commandName':_0x1013('0x0'),'commandParams':[_0x7b9302]});});}),_0x558a10[_0x1013('0x10')][_0x1013('0x7')](_0x1aa03f=>{const {data:_0x397d28}=_0x1aa03f;if(_0x397d28&&_0x1013('0x0')===_0x397d28[_0x1013('0x24')]){const _0x4b5377=[],_0x3aaef5=_0x397d28['commandParams'][0x0];for(const [_0x27d2e7,_0x255ea6]of Object[_0x1013('0xe')](_0x3aaef5))_0x4b5377[_0x1013('0x1d')](no(_0xe81d9d,_0x27d2e7,_0x255ea6));return _0x4b5377[_0x1013('0x2')]?{'type':'format','content':_0x5c9d3e(_0x58325f,_0x1013('0x17'),_0x4b5377['join'](',\x20'))}:{'type':_0x1013('0x1c'),'content':_0x5c9d3e(_0x58325f,_0x1013('0x14'))};}}),_0xe81d9d[_0x1013('0x18')]['get']('TrackChangesEditing')[_0x1013('0xd')](_0x1013('0x26')));}}function ro(_0x5336f3,_0x4dac18){const _0x465fe4=_0x5336f3[_0x1013('0x4')](_0x4dac18);_0x5336f3[_0x1013('0x2a')](_0x465fe4,{'unit':_0x1013('0x3'),'direction':_0x1013('0x1')});const _0xf7d206=_0x465fe4[_0x1013('0x5')]();_0x5336f3['modifySelection'](_0x465fe4,{'unit':_0x1013('0x3'),'direction':_0x1013('0x25')});const _0x35e57a=_0x465fe4[_0x1013('0x2d')]();return _0x5336f3[_0x1013('0x6')](_0xf7d206,_0x35e57a);}function no(_0x3f76a3,_0x2ef73c,_0x477fd2){const _0x1e07f4=_0x3f76a3[_0x1013('0x8')]['t'],_0x395045=_0x2ef73c['split'](/(?=[A-Z])/)['join']('\x20'),_0x4d3242=_0x1e07f4(_0x395045['charAt'](0x0)['toUpperCase']()+_0x395045[_0x1013('0x11')](0x1))[_0x1013('0xb')]();if('boolean'==typeof _0x477fd2)return _0x4d3242;if('fontColor'===_0x2ef73c||_0x1013('0x20')===_0x2ef73c){const _0x277a14=_0x116fdd(_0x3f76a3[_0x1013('0x1e')][_0x1013('0x27')](_0x1013('0x15')))['find'](_0x48bac4=>_0x48bac4['model']==_0x477fd2);return _0x4d3242+'\x20('+(_0x277a14?_0x1e07f4(_0x277a14['label'])[_0x1013('0xb')]():_0x477fd2)+')';}if(_0x1013('0x28')===_0x2ef73c&&isNaN(parseFloat(_0x477fd2))){const _0x50e002=_0x3f76a3[_0x1013('0x18')]['get']('FontSize')[_0x1013('0x1f')](_0x3f76a3['config'][_0x1013('0x27')]('fontSize.options'))[_0x1013('0x2b')](_0xb22a6b=>_0xb22a6b['model']==_0x477fd2);return _0x4d3242+'\x20('+(_0x50e002?_0x1e07f4(_0x50e002[_0x1013('0x1a')])[_0x1013('0xb')]():_0x477fd2)+')';}return _0x4d3242+'\x20('+_0x477fd2+')';}
|
package/src/utils/utils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5547=['change','isInContent','createPositionAt','createPositionAfter','content','start','schema','isCollapsed','add','join','color','end','deletion','getMarkers','getRange','splice','\x20[color\x20','sort','length','isObject','type','isTouching','isMultiRange','value','isIntersecting','push','map','replace','createRange','getRanges','execute'];(function(_0x35c642,_0x5547de){const _0x5874e9=function(_0x138d1f){while(--_0x138d1f){_0x35c642['push'](_0x35c642['shift']());}};_0x5874e9(++_0x5547de);}(_0x5547,0x146));const _0x5874=function(_0x35c642,_0x5547de){_0x35c642=_0x35c642-0x0;let _0x5874e9=_0x5547[_0x35c642];return _0x5874e9;};export function normalizeDescription(_0xb52926){return Array['isArray'](_0xb52926)||(_0xb52926=[_0xb52926]),_0xb52926[_0x5874('0xa')](_0x2b5ab1=>{const _0x19fdab=_0x2b5ab1[_0x5874('0x13')][_0x5874('0xb')](/\*/g,''),_0x479ab7=_0x2b5ab1[_0x5874('0x19')]?_0x5874('0x0')+_0x2b5ab1[_0x5874('0x19')][_0x5874('0x7')]+']':'';return'['+_0x2b5ab1[_0x5874('0x4')]+']\x20'+_0x19fdab+_0x479ab7;})[_0x5874('0x18')](';\x20');}export function sortSuggestions(_0x4f2789){return _0x4f2789[_0x5874('0x1')]((_0x11330d,_0x305c1b)=>_0x5874('0x1b')==_0x11330d['type']&&_0x5874('0x1b')!=_0x305c1b['type']?-0x1:_0x5874('0x1b')!=_0x11330d[_0x5874('0x4')]&&_0x5874('0x1b')==_0x305c1b[_0x5874('0x4')]?0x1:0x0);}export function getSelectedSuggestions(_0x5d3d1b,_0x4547f9){const _0x573bb5=Array['from'](_0x5d3d1b[_0x5874('0xd')]()),_0x1603a9=new Set();for(const _0x2492de of _0x4547f9)if(_0x2492de[_0x5874('0x10')])for(const _0x1ce115 of _0x573bb5)for(const _0x241ed6 of _0x2492de[_0x5874('0x1c')]()){const _0xc5e4dc=_0x241ed6[_0x5874('0x1d')]();(_0x1ce115[_0x5874('0x8')](_0xc5e4dc)||_0x5d3d1b[_0x5874('0x16')]&&!_0x2492de[_0x5874('0x6')]&&_0x2492de['next']&&_0xc5e4dc[_0x5874('0x1a')][_0x5874('0x5')](_0x1ce115[_0x5874('0x14')]))&&_0x1603a9[_0x5874('0x17')](_0x2492de);}return _0x1603a9;}export function getRangesOfBlockGroups(_0x107b15,_0x35644e){let _0x253acd,_0x58f15f=0x0;const _0x184573=[],_0x1e85e0=_0x35644e[_0x5874('0x15')];for(;_0x58f15f<_0x107b15[_0x5874('0x2')];){const _0x3bc1ec=_0x107b15[_0x58f15f],_0x548df0=_0x107b15[_0x58f15f+0x1];_0x253acd||(_0x253acd=_0x35644e['createPositionBefore'](_0x3bc1ec)),co(_0x35644e,_0x3bc1ec,_0x548df0)||(_0x184573[_0x5874('0x9')](_0x35644e[_0x5874('0xc')](_0x253acd,_0x1e85e0[_0x5874('0x3')](_0x3bc1ec)?_0x35644e['createPositionAfter'](_0x3bc1ec):_0x35644e[_0x5874('0x11')](_0x3bc1ec,_0x5874('0x1a')))),_0x253acd=null),_0x58f15f++;}return _0x184573;}function co(_0x297480,_0x1f9fc9,_0x1b7e23){if(!_0x1b7e23)return!0x1;const _0x3d5ec4=_0x297480[_0x5874('0x12')](_0x1f9fc9),_0x29fc14=_0x297480['createPositionBefore'](_0x1b7e23);return _0x3d5ec4[_0x5874('0x5')](_0x29fc14);}export const MAX_SUGGESTION_ACTIONS_IN_BATCH=0x64;export function executeCommandForSuggestions(_0x181082,_0x28f6db,_0x264317){for(;_0x264317[_0x5874('0x2')];){const _0x500bc4=_0x264317[_0x5874('0x1e')](0x0,0x64);_0x181082[_0x5874('0xf')](()=>{for(const _0xfb2528 of _0x500bc4)_0xfb2528[_0x5874('0x10')]&&_0x28f6db[_0x5874('0xe')](_0xfb2528['id']);});}}
|