@ckeditor/ckeditor5-format-painter 48.3.1-alpha.0 → 48.3.1-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/index.js +2 -2
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
24
|
-
_0x103b9d(_0x33dca4);var k=class extends v{static get['pluginName'](){return'FormatPainterUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x2423df=this['editor'];_0x2423df['editing']['view']['addObserver'](_0x242cec),_0x2423df['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':L(_0x2423df['locale'],'Copy\x20text\x20formatting'),'keystroke':'Ctrl+Alt+C'},{'label':L(_0x2423df['locale'],'Paste\x20text\x20formatting'),'keystroke':'Ctrl+Alt+V'}]}),_0x2423df['ui']['componentFactory']['add']('formatPainter',_0x31791e=>{const _0x1f1b41=_0x4f40b9(_0x31791e,_0x132006),_0x7f9403=_0x2423df['commands']['get'](w);_0x1f1b41['buttonView']['set']({'label':L(_0x2423df['locale'],'Paint\x20formatting'),'icon':_0x1771dc,'keystroke':'Ctrl+Alt+C','tooltip':!0x0}),_0x1f1b41['class']='ck-format-painter-dropdown',_0x7f9403&&(_0x1f1b41['bind']('isEnabled')['to'](_0x7f9403,'isEnabled'),this['listenTo'](_0x7f9403,'change:isEnabled',(_0x306f40,_0x5fb829,_0x385727)=>{_0x385727||this['_finishPainting']();}),_0x1f1b41['buttonView']['bind']('isOn')['to'](_0x7f9403,'value',_0x463480=>!!_0x463480),this['listenTo'](_0x2423df,'destroy',()=>this['_toggleSpecialCursor'](!0x1)),this['listenTo'](_0x7f9403,'change:value',(_0x47e965,_0x4bab6b,_0x1521be)=>{this['_toggleSpecialCursor'](!!_0x1521be);}));const _0x1515ac=new _0xdf8054({'withText':!0x0,'label':L(_0x2423df['locale'],'Continuous\x20painting'),'tooltip':L(_0x2423df['locale'],'Keeps\x20the\x20painter\x20on\x20after\x20setting\x20the\x20formatting.'),'isOn':!0x1,'role':'menuitemcheckbox'});_0x5afea0(_0x1f1b41,new _0x2232aa([{'type':'switchbutton','model':_0x1515ac}]),{'role':'menu'});const _0x1e006c=()=>{this['_copyFormatting'](),this['listenTo'](_0x3f1e9a['window']['document'],'mouseup',()=>{this['_pasteFormatting'](),_0x1515ac['isOn']||this['_finishPainting']();});};return this['listenTo'](_0x1f1b41,'execute',()=>{_0x1515ac['isOn']=!_0x1515ac['isOn'];}),this['listenTo'](_0x1f1b41['buttonView'],'execute',()=>{_0x2423df['editing']['view']['focus'](),_0x1f1b41['buttonView']['isOn']?this['_finishPainting']():_0x1e006c();}),_0x2423df['keystrokes']['set']('Ctrl+Alt+C',(_0x2a1c63,_0x118545)=>{_0x1e006c(),_0x1515ac['isOn']=!0x0,_0x118545();},{'priority':'high'}),_0x2423df['keystrokes']['set']('Ctrl+Alt+V',(_0x45adaf,_0xf782ca)=>{_0x1f1b41['buttonView']['isOn']&&(this['_pasteFormatting'](),_0x1515ac['isOn']||this['_finishPainting'](),_0xf782ca());},{'priority':'high'}),_0x2423df['keystrokes']['set']('Esc',(_0x825c50,_0x1af8e8)=>{_0x1f1b41['buttonView']['isOn']&&(_0x1515ac['isOn']=!0x1,this['_finishPainting'](),_0x2423df['ui']['ariaLiveAnnouncer']['announce'](L(_0x2423df['locale'],'Painting\x20cancelled.')),_0x1af8e8());}),_0x1f1b41;});}['afterInit'](){!async function(_0x4b5dd3){const _0x41c600='QiLRCSOsZ8pAvDdaPJUE3oxjKlzM2uXgrtGfeyh5cNFkmBw9I6WH0qnb4T17YV',_0x24c045=0x78fa8,_0x4d07e3=window['Date']['now'](),_0x4eb578=_0x4b5dd3['editor'],_0x101bc4=new window['Promise'](_0x5706bb=>{_0x4eb578['once']('ready',_0x5706bb);}),_0xce94af={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x4fb5c5=_0x4eb578['config']['get']('licenseKey');async function _0x4b3ffd(){let _0x36badf,_0x424c25=null,_0x1634e9=null;try{return'GPL'==_0x4fb5c5?'NotAllowed':(_0x36badf=_0x334f83(),_0x36badf?(_0x36badf['usageEndpoint']&&(_0x1634e9=_0x3c5973(_0x36badf['usageEndpoint'],_0x36badf['jti'])),await _0x2d4325()?_0x2972e8()?_0x68da40()?'Expired':_0x2698a()?('evaluation'==_0x36badf['licenseType']&&(_0x424c25=_0x122285('EvaluationLimit')),await _0xfe52e2()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x68da40(){const _0x2e6e67=['evaluation','trial']['includes'](_0x36badf['licenseType'])?_0x4d07e3/0x3e8:0xe10*_0x24c045;return _0x36badf['exp']<_0x2e6e67;}function _0x2972e8(){const _0x17fa2b=_0x36badf['features'];return!!_0x17fa2b&&(!!_0x17fa2b['includes']('*')||(!!_0x17fa2b['includes']('FP')||(!!_0x17fa2b['includes']('PP')||!(!_0x17fa2b['includes']('TRILIUM')||!_0x1ca8d1()))));}function _0x2698a(){const _0x4af8f2=_0x36badf['licensedHosts'];if(!_0x4af8f2||0x0==_0x4af8f2['length'])return!0x0;const {hostname:_0x157e67}=new URL(window['location']['href']);if(_0x4af8f2['includes'](_0x157e67))return!0x0;const _0x4c8767=_0x157e67['split']('.');return _0x4af8f2['filter'](_0x5e153c=>_0x5e153c['includes']('*'))['map'](_0x463b61=>_0x463b61['split']('.'))['filter'](_0x12ec59=>_0x12ec59['length']<=_0x4c8767['length'])['map'](_0x4cb69b=>Array(_0x4c8767['length']-_0x4cb69b['length'])['fill']('*'===_0x4cb69b[0x0]?'*':'')['concat'](_0x4cb69b))['some'](_0x5b3e35=>_0x4c8767['every']((_0x408eb0,_0x1b857d)=>_0x5b3e35[_0x1b857d]===_0x408eb0||'*'===_0x5b3e35[_0x1b857d]));}function _0xfe52e2(){return _0x424c25&&_0x1634e9?new window['Promise']((_0x52cb9c,_0x340bee)=>{_0x424c25['then'](_0x52cb9c,_0x340bee),_0x1634e9['then'](_0x8ac997=>{'Valid'!=_0x8ac997&&_0x52cb9c(_0x8ac997);},_0x340bee);}):_0x424c25||_0x1634e9||'Valid';}}function _0x3c5973(_0x4dfd35,_0x1b9f66){return new window['Promise'](_0xf6ae39=>{if(_0x5951d1())return _0xf6ae39('Valid');_0x2f35c1(),_0x4eb578['decorate']('_sendUsageRequest');let _0x415078=!0x1;const _0x2102a7=_0x3a6658();function _0x5b292c(_0x51fbaa){return!!_0x51fbaa&&('object'==typeof _0x51fbaa||'function'==typeof _0x51fbaa)&&'function'==typeof _0x51fbaa['then']&&'function'==typeof _0x51fbaa['catch'];}function _0x45e29a(_0x246bff){_0xa95926(_0x246bff)['then'](_0x3e1dd3=>_0x3e1dd3&&'ok'==_0x3e1dd3['status']?_0x4d2a64(_0x63b522(_0x2102a7+_0x1b9f66))!=_0x3e1dd3['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x461bc2=>(_0x47dfb3(),_0x461bc2),()=>{const _0x5d9610=_0x4a553b();return null==_0x5d9610?(_0x47dfb3(),'Valid'):_0x4d07e3-_0x5d9610>0x240c8400?'UsageLimit':'Valid';})['then'](_0xf6ae39)['catch'](()=>{_0xf6ae39('UsageLimit');});const _0x1ae39a=0x36ee80;function _0x47dfb3(){const _0x238853='llct-'+_0x4d2a64(_0x63b522(_0x4dfd35)),_0x387ffd=_0x3e394d(_0x4d2a64(window['Math']['ceil'](_0x4d07e3/_0x1ae39a)));window['localStorage']['setItem'](_0x238853,_0x387ffd);}function _0x4a553b(){const _0x4d859e='llct-'+_0x4d2a64(_0x63b522(_0x4dfd35)),_0x3602e5=window['localStorage']['getItem'](_0x4d859e);return _0x3602e5?window['parseInt'](_0x3e394d(_0x3602e5),0x10)*_0x1ae39a:null;}function _0xa95926(_0x515f4b){return new window['Promise']((_0x1eab83,_0x105b2e)=>{_0x515f4b['then'](_0x1eab83,_0x105b2e),window['setTimeout'](_0x105b2e,0x1d4c0);});}}_0x4eb578['on']('_sendUsageRequest',(_0x23ff4c,_0x3c2a17)=>{if(_0x3c2a17[0x0]!=_0x4dfd35)return _0xf6ae39('UsageLimit');_0x3c2a17[0x1]={..._0x3c2a17[0x1],'requestId':_0x2102a7};},{'priority':'high'}),_0x4eb578['on']('_sendUsageRequest',_0x5f13a5=>{_0x5b292c(_0x5f13a5['return'])&&(_0x415078=!0x0,_0x45e29a(_0x5f13a5['return']));},{'priority':'low'}),_0x101bc4['then'](()=>{_0x415078||_0xf6ae39('UsageLimit');});});function _0x5951d1(){return'auto'==_0x4eb578['editing']['view']['_overlayModeHint'];}function _0x2f35c1(){_0x4eb578['editing']['view']['_overlayModeHint']='auto';}}function _0x122285(_0x1c797c){const _0x32220b=[new window['Promise'](_0x136a98=>setTimeout(_0x136a98,0x93ecc)),_0x101bc4['then'](()=>new window['Promise'](_0x134fc3=>{let _0x3371b5=0x0;_0x4eb578['model']['on']('applyOperation',(_0x10b900,_0x22b416)=>{_0x22b416[0x0]['isDocumentOperation']&&_0x3371b5++,0x5e8==_0x3371b5&&(_0x134fc3(),_0x10b900['off']());});}))];return window['Promise']['race'](_0x32220b)['then'](()=>_0x1c797c);}async function _0x53a2e1(){await _0x101bc4,_0x4eb578['model']['change']=_0x1b25db,_0x4eb578['model']['enqueueChange']=_0x1b25db,_0x4eb578['enableReadOnlyMode']('model');}function _0x1ca8d1(){return window['glob']&&window['glob']['triliumVersion'];}function _0x25a088(_0x3d548c){const _0x4ae82a=_0x23ad04();_0x4eb578[_0x4ae82a]='formatPainterLicenseKey'+_0x3d548c,'Valid'!=_0x3d548c&&_0x53a2e1();}function _0x23ad04(){const _0x4e26d4=window['String'](window['performance']['now']())['replace']('.','');let _0x4a11f0='Q';for(let _0x3e56f4=0x0;_0x3e56f4<_0x4e26d4['length'];_0x3e56f4+=0x2){let _0x96382b=window['parseInt'](_0x4e26d4['substring'](_0x3e56f4,_0x3e56f4+0x2));_0x96382b>=0x3e&&(_0x96382b-=0x3e),_0x4a11f0+=_0x41c600[_0x96382b];}return _0x4a11f0;}function _0x334f83(){const _0x29e7af=_0x4fb5c5['split']('.');if(0x3!=_0x29e7af['length'])return null;return _0x9cb1e5(_0x29e7af[0x1]);function _0x9cb1e5(_0x231f24){const _0x3b00de=_0x364d99(_0x231f24);return _0x3b00de&&_0x543a84()?_0x3b00de:null;function _0x543a84(){const _0x1dc34c=_0x3b00de['jti'],_0x4d30a6=window['parseInt'](_0x1dc34c['substring'](_0x1dc34c['length']-0x8),0x10),_0x500b04={..._0x3b00de,'jti':_0x1dc34c['substring'](0x0,_0x1dc34c['length']-0x8)};return delete _0x500b04['vc'],_0x63b522(_0x500b04)==_0x4d30a6;}}}async function _0x2d4325(){let _0x335f68=!0x0;try{const [_0x4d6307,_0x24da0e,_0x2ef87d]=_0x4fb5c5['split']('.');return _0x182e09(_0x4d6307),await _0x4bc5ea(_0x4d6307,_0x24da0e,_0x2ef87d),_0x335f68;}catch{return!0x1;}function _0x182e09(_0x5b8ae0){const _0x1a1f2c=_0x364d99(_0x5b8ae0);_0x1a1f2c&&'ES256'==_0x1a1f2c['alg']||(_0x335f68=!0x1);}async function _0x4bc5ea(_0x1ba6c5,_0x2c921f,_0x3a4128){const _0x354d35=window['Uint8Array']['from'](_0x404e1f(_0x3a4128),_0x43c184=>_0x43c184['charCodeAt'](0x0)),_0x3f5ec5=new window['TextEncoder']()['encode'](_0x1ba6c5+'.'+_0x2c921f),_0x2b3b7c=window['crypto']['subtle'];if(!_0x2b3b7c)return;const _0x52b4a2=await _0x2b3b7c['importKey']('jwk',_0xce94af,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2b3b7c['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x52b4a2,_0x354d35,_0x3f5ec5)||(_0x335f68=!0x1);}}function _0x364d99(_0x32e76c){return _0x32e76c['startsWith']('ey')?JSON['parse'](_0x404e1f(_0x32e76c)):null;}function _0x404e1f(_0x20898d){return window['atob'](_0x20898d['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x63b522(_0x2d67c){let _0x5d66e0=0x1505;function _0x407bf6(_0x1302df){for(let _0x4dea54=0x0;_0x4dea54<_0x1302df['length'];_0x4dea54++){const _0x54ad0e=_0x1302df['charCodeAt'](_0x4dea54);_0x5d66e0=(_0x5d66e0<<0x5)+_0x5d66e0+_0x54ad0e,_0x5d66e0&=_0x5d66e0;}}function _0x30c4da(_0x1d4b1f){Array['isArray'](_0x1d4b1f)?_0x1d4b1f['forEach'](_0x30c4da):_0x1d4b1f&&'object'==typeof _0x1d4b1f?Object['entries'](_0x1d4b1f)['sort']()['forEach'](([_0x3e86d2,_0x5873f8])=>{_0x407bf6(_0x3e86d2),_0x30c4da(_0x5873f8);}):_0x407bf6(window['String'](_0x1d4b1f));}return _0x30c4da(_0x2d67c),_0x5d66e0>>>0x0;}function _0x4d2a64(_0x4f2896){return _0x4f2896['toString'](0x10)['padStart'](0x8,'0');}function _0x3e394d(_0x48cd62){return _0x48cd62['split']('')['reverse']()['join']('');}function _0x1b25db(){}_0x25a088(await _0x4b3ffd());}(this);}['_toggleSpecialCursor'](_0x1e35b1){this['editor']['editing']['view']['change'](_0xfa674d=>{for(const _0x4c396c of this['editor']['editing']['view']['document']['roots'])_0x1e35b1?_0xfa674d['addClass'](h,_0x4c396c):_0xfa674d['removeClass'](h,_0x4c396c);});}['_copyFormatting'](){const {editor:_0x224933}=this;_0x224933['execute'](w),_0x224933['ui']['ariaLiveAnnouncer']['announce'](L(_0x224933['locale'],'Formatting\x20copied.'));}['_pasteFormatting'](){const {editor:_0x29d511}=this,_0x31e08b=_0x29d511['commands']['get'](w)['value'];_0x29d511['execute'](g,_0x31e08b),_0x29d511['ui']['ariaLiveAnnouncer']['announce'](L(_0x29d511['locale'],'Pasted\x20formatting.'));}['_finishPainting'](){this['editor']['commands']['get'](w)['reset'](),this['stopListening'](_0x3f1e9a['window']['document'],'mouseup');}},x=class extends _0x33dca4{static get['requires'](){return[P,k];}static get['pluginName'](){return'FormatPainter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{p as CopyFormatCommand,x as FormatPainter,P as FormatPainterEditing,k as FormatPainterUI,y as PasteFormatCommand};
|
|
23
|
+
import{Command as _0x594c36,Plugin as _0x1722e1}from'@ckeditor/ckeditor5-core';import{RemoveFormatCommand as _0x41a6ab}from'@ckeditor/ckeditor5-remove-format';import{SplitButtonView as _0x2ec91c,UIModel as _0x5d3ceb,addListToDropdown as _0x2d49fc,createDropdown as _0x53fb6c}from'@ckeditor/ckeditor5-ui';import{Collection as _0x433861,DomEmitterMixin as _0x537733,global as _0x2f95e2,uid as _0x3fa883}from'@ckeditor/ckeditor5-utils';import{ClickObserver as _0x168738}from'@ckeditor/ckeditor5-engine';import{IconPaintRoller as _0x454e50}from'@ckeditor/ckeditor5-icons';const w='copyFormat',g='pasteFormat',h='ck-format-painter-active';var p=class extends _0x594c36{constructor(_0x18c5ff){super(_0x18c5ff),this['value']=void 0x0,this['on']('change:isEnabled',(_0x5c07c4,_0x5d61cf,_0x407e1b)=>{_0x407e1b||this['reset']();}),this['on']('change:value',()=>_0x18c5ff['commands']['get'](g)['refresh']());}['execute'](){this['value']=this['_getFormattingAttributes']();}['reset'](){this['value']=void 0x0;}['_getFormattingAttributes'](){const _0x38e860=this['editor']['model'],_0x5b3146=_0x38e860['document']['selection'];return Object['fromEntries'](Array['from'](_0x5b3146['getAttributes']())['filter'](([_0x49387e])=>_0x38e860['schema']['getAttributeProperties'](_0x49387e)['isFormatting']));}},y=class extends _0x594c36{constructor(_0x5e3112){super(_0x5e3112),this['_removeFormatCommand']=new _0x41a6ab(_0x5e3112);}['execute'](_0x55dcbe={}){const _0xe4a7c3=this['editor']['model'],_0x165d6e=_0xe4a7c3['document']['selection'],_0x12b897=Array['from'](_0x165d6e['getRanges']()),_0x23934d=_0x165d6e['isCollapsed']?[this['_createRangeOnEntireWord'](_0xe4a7c3,_0x165d6e)]:_0x12b897;_0xe4a7c3['change'](_0x3ad6b4=>{_0x3ad6b4['setSelection'](_0x23934d),this['_removeFormatCommand']['execute']();for(const _0x1c6b91 in _0x55dcbe)for(const _0x426eec of _0xe4a7c3['schema']['getValidRanges'](_0x23934d,_0x1c6b91))_0x3ad6b4['setAttribute'](_0x1c6b91,_0x55dcbe[_0x1c6b91],_0x426eec);_0x3ad6b4['setSelection'](_0x12b897);});}['_createRangeOnEntireWord'](_0x456c56,_0x5bcf5b){const _0x17aa9d=_0x456c56['createSelection'](_0x5bcf5b);_0x456c56['modifySelection'](_0x17aa9d,{'unit':'word','direction':'backward'});const _0x14e64c=_0x17aa9d['getFirstPosition']();_0x456c56['modifySelection'](_0x17aa9d,{'unit':'word','direction':'forward'});const _0xc504ba=_0x17aa9d['getLastPosition']();return _0x456c56['createRange'](_0x14e64c,_0xc504ba);}},P=class extends _0x1722e1{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FormatPainterEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x1a1654=this['editor'];_0x1a1654['commands']['add'](w,new p(_0x1a1654)),_0x1a1654['commands']['add'](g,new y(_0x1a1654)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2dee93=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x10fdf2;for(const _0x41f21f in _0x2dee93){const _0x384a79=_0x41f21f,_0x245830=_0x2dee93[_0x384a79];if('formatPainterLicenseKeyValid'==_0x245830||'formatPainterLicenseKeyInvalid'==_0x245830||'formatPainterLicenseKeyExpired'==_0x245830||'formatPainterLicenseKeyDomainLimit'==_0x245830||'formatPainterLicenseKeyNotAllowed'==_0x245830||'formatPainterLicenseKeyEvaluationLimit'==_0x245830||'formatPainterLicenseKeyUsageLimit'==_0x245830){delete _0x2dee93[_0x384a79],_0x10fdf2=_0x245830,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'formatPainterLicenseKeyInvalid'==_0x10fdf2&&_0x2dee93['_showLicenseError']('invalid'),'formatPainterLicenseKeyExpired'==_0x10fdf2&&_0x2dee93['_showLicenseError']('expired'),'formatPainterLicenseKeyDomainLimit'==_0x10fdf2&&_0x2dee93['_showLicenseError']('domainLimit'),'formatPainterLicenseKeyNotAllowed'==_0x10fdf2&&_0x2dee93['_showLicenseError']('featureNotAllowed','FormatPainter'),'formatPainterLicenseKeyEvaluationLimit'==_0x10fdf2&&_0x2dee93['_showLicenseError']('evaluationLimit'),'formatPainterLicenseKeyUsageLimit'==_0x10fdf2&&_0x2dee93['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}};function L(_0x588d01,_0x2c671d){const t=_0x588d01['t'];switch(_0x2c671d){case'Paint\x20formatting':return t('Paint\x20formatting');case'Copy\x20text\x20formatting':return t('Copy\x20text\x20formatting');case'Paste\x20text\x20formatting':return t('Paste\x20text\x20formatting');case'Continuous\x20painting':return t('Continuous\x20painting');case'Keeps\x20the\x20painter\x20on\x20after\x20setting\x20the\x20formatting.':return t('Keeps\x20the\x20painter\x20on\x20after\x20setting\x20the\x20formatting.');case'Formatting\x20copied.':return t('Formatting\x20copied.');case'Pasted\x20formatting.':return t('Pasted\x20formatting.');case'Painting\x20cancelled.':return t('Painting\x20cancelled.');default:return _0x2c671d;}}const v=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x537733(_0x1722e1);var k=class extends v{static get['pluginName'](){return'FormatPainterUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x5b7670=this['editor'];_0x5b7670['editing']['view']['addObserver'](_0x168738),_0x5b7670['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':L(_0x5b7670['locale'],'Copy\x20text\x20formatting'),'keystroke':'Ctrl+Alt+C'},{'label':L(_0x5b7670['locale'],'Paste\x20text\x20formatting'),'keystroke':'Ctrl+Alt+V'}]}),_0x5b7670['ui']['componentFactory']['add']('formatPainter',_0x26a837=>{const _0x3342c2=_0x53fb6c(_0x26a837,_0x2ec91c),_0x322840=_0x5b7670['commands']['get'](w);_0x3342c2['buttonView']['set']({'label':L(_0x5b7670['locale'],'Paint\x20formatting'),'icon':_0x454e50,'keystroke':'Ctrl+Alt+C','tooltip':!0x0}),_0x3342c2['class']='ck-format-painter-dropdown',_0x322840&&(_0x3342c2['bind']('isEnabled')['to'](_0x322840,'isEnabled'),this['listenTo'](_0x322840,'change:isEnabled',(_0x38d1c9,_0x4ad13e,_0x20d825)=>{_0x20d825||this['_finishPainting']();}),_0x3342c2['buttonView']['bind']('isOn')['to'](_0x322840,'value',_0x3085e5=>!!_0x3085e5),this['listenTo'](_0x5b7670,'destroy',()=>this['_toggleSpecialCursor'](!0x1)),this['listenTo'](_0x322840,'change:value',(_0x466398,_0x119b9d,_0x1177fe)=>{this['_toggleSpecialCursor'](!!_0x1177fe);}));const _0x2e089d=new _0x5d3ceb({'withText':!0x0,'label':L(_0x5b7670['locale'],'Continuous\x20painting'),'tooltip':L(_0x5b7670['locale'],'Keeps\x20the\x20painter\x20on\x20after\x20setting\x20the\x20formatting.'),'isOn':!0x1,'role':'menuitemcheckbox'});_0x2d49fc(_0x3342c2,new _0x433861([{'type':'switchbutton','model':_0x2e089d}]),{'role':'menu'});const _0x10ed86=()=>{this['_copyFormatting'](),this['listenTo'](_0x2f95e2['window']['document'],'mouseup',()=>{this['_pasteFormatting'](),_0x2e089d['isOn']||this['_finishPainting']();});};return this['listenTo'](_0x3342c2,'execute',()=>{_0x2e089d['isOn']=!_0x2e089d['isOn'];}),this['listenTo'](_0x3342c2['buttonView'],'execute',()=>{_0x5b7670['editing']['view']['focus'](),_0x3342c2['buttonView']['isOn']?this['_finishPainting']():_0x10ed86();}),_0x5b7670['keystrokes']['set']('Ctrl+Alt+C',(_0x4e6940,_0xe589d0)=>{_0x10ed86(),_0x2e089d['isOn']=!0x0,_0xe589d0();},{'priority':'high'}),_0x5b7670['keystrokes']['set']('Ctrl+Alt+V',(_0x1b6650,_0x4ea92b)=>{_0x3342c2['buttonView']['isOn']&&(this['_pasteFormatting'](),_0x2e089d['isOn']||this['_finishPainting'](),_0x4ea92b());},{'priority':'high'}),_0x5b7670['keystrokes']['set']('Esc',(_0x5923ea,_0x3746f8)=>{_0x3342c2['buttonView']['isOn']&&(_0x2e089d['isOn']=!0x1,this['_finishPainting'](),_0x5b7670['ui']['ariaLiveAnnouncer']['announce'](L(_0x5b7670['locale'],'Painting\x20cancelled.')),_0x3746f8());}),_0x3342c2;});}['afterInit'](){!async function(_0x2923bf){const _0x192575='QiLRCSOsZ8pAvDdaPJUE3oxjKlzM2uXgrtGfeyh5cNFkmBw9I6WH0qnb4T17YV',_0x5c7184=0x78fc0,_0x5d8eb0=window['Date']['now'](),_0x586d8d=_0x2923bf['editor'],_0x553c19=new window['Promise'](_0x5752ce=>{_0x586d8d['once']('ready',_0x5752ce);}),_0x4899b7={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x200f6a=_0x586d8d['config']['get']('licenseKey');async function _0x32b85c(){let _0x454388,_0x32485f=null,_0x5faefd=null;try{return'GPL'==_0x200f6a?'NotAllowed':(_0x454388=_0xd1c3a5(),_0x454388?(_0x454388['usageEndpoint']&&(_0x5faefd=_0x5150ef(_0x454388['usageEndpoint'],_0x454388['jti'])),await _0x1d412f()?_0xbe5521()?_0x53d779()?'Expired':_0x335cc3()?('evaluation'==_0x454388['licenseType']&&(_0x32485f=_0x2fe134('EvaluationLimit')),await _0x343306()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x53d779(){const _0x52a369=['evaluation','trial']['includes'](_0x454388['licenseType'])?_0x5d8eb0/0x3e8:0xe10*_0x5c7184;return _0x454388['exp']<_0x52a369;}function _0xbe5521(){const _0x4c0834=_0x454388['features'];return!!_0x4c0834&&(!!_0x4c0834['includes']('*')||(!!_0x4c0834['includes']('FP')||(!!_0x4c0834['includes']('PP')||!(!_0x4c0834['includes']('TRILIUM')||!_0x5c6189()))));}function _0x335cc3(){const _0x2a81a8=_0x454388['licensedHosts'];if(!_0x2a81a8||0x0==_0x2a81a8['length'])return!0x0;const {hostname:_0x33cc00}=new URL(window['location']['href']);if(_0x2a81a8['includes'](_0x33cc00))return!0x0;const _0x48a8f3=_0x33cc00['split']('.');return _0x2a81a8['filter'](_0x484bec=>_0x484bec['includes']('*'))['map'](_0x100e15=>_0x100e15['split']('.'))['filter'](_0x2cf910=>_0x2cf910['length']<=_0x48a8f3['length'])['map'](_0x3e3cda=>Array(_0x48a8f3['length']-_0x3e3cda['length'])['fill']('*'===_0x3e3cda[0x0]?'*':'')['concat'](_0x3e3cda))['some'](_0x2cd068=>_0x48a8f3['every']((_0x36da74,_0x350c67)=>_0x2cd068[_0x350c67]===_0x36da74||'*'===_0x2cd068[_0x350c67]));}function _0x343306(){return _0x32485f&&_0x5faefd?new window['Promise']((_0x189a72,_0x5c996c)=>{_0x32485f['then'](_0x189a72,_0x5c996c),_0x5faefd['then'](_0x23bc67=>{'Valid'!=_0x23bc67&&_0x189a72(_0x23bc67);},_0x5c996c);}):_0x32485f||_0x5faefd||'Valid';}}function _0x5150ef(_0x4371e5,_0x3d15c5){return new window['Promise'](_0x590fec=>{if(_0x455ed1())return _0x590fec('Valid');_0x1591e8(),_0x586d8d['decorate']('_sendUsageRequest');let _0x5e25d8=!0x1;const _0x6bf860=_0x3fa883();function _0x4533e8(_0x5aa050){return!!_0x5aa050&&('object'==typeof _0x5aa050||'function'==typeof _0x5aa050)&&'function'==typeof _0x5aa050['then']&&'function'==typeof _0x5aa050['catch'];}function _0x142c4a(_0x204da3){_0x590f09(_0x204da3)['then'](_0x393b03=>_0x393b03&&'ok'==_0x393b03['status']?_0x5141cd(_0x23a9f4(_0x6bf860+_0x3d15c5))!=_0x393b03['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4f8b6d=>(_0x1825ec(),_0x4f8b6d),()=>{const _0x21ac39=_0x3123ce();return null==_0x21ac39?(_0x1825ec(),'Valid'):_0x5d8eb0-_0x21ac39>0x240c8400?'UsageLimit':'Valid';})['then'](_0x590fec)['catch'](()=>{_0x590fec('UsageLimit');});const _0x4dc186=0x36ee80;function _0x1825ec(){const _0x3a3acc='llct-'+_0x5141cd(_0x23a9f4(_0x4371e5)),_0x135d50=_0x44eee7(_0x5141cd(window['Math']['ceil'](_0x5d8eb0/_0x4dc186)));window['localStorage']['setItem'](_0x3a3acc,_0x135d50);}function _0x3123ce(){const _0x5c2856='llct-'+_0x5141cd(_0x23a9f4(_0x4371e5)),_0x295c72=window['localStorage']['getItem'](_0x5c2856);return _0x295c72?window['parseInt'](_0x44eee7(_0x295c72),0x10)*_0x4dc186:null;}function _0x590f09(_0x3bd13d){return new window['Promise']((_0x23df4c,_0x11a3d2)=>{_0x3bd13d['then'](_0x23df4c,_0x11a3d2),window['setTimeout'](_0x11a3d2,0x1d4c0);});}}_0x586d8d['on']('_sendUsageRequest',(_0x808b4e,_0x599410)=>{if(_0x599410[0x0]!=_0x4371e5)return _0x590fec('UsageLimit');_0x599410[0x1]={..._0x599410[0x1],'requestId':_0x6bf860};},{'priority':'high'}),_0x586d8d['on']('_sendUsageRequest',_0x125f71=>{_0x4533e8(_0x125f71['return'])&&(_0x5e25d8=!0x0,_0x142c4a(_0x125f71['return']));},{'priority':'low'}),_0x553c19['then'](()=>{_0x5e25d8||_0x590fec('UsageLimit');});});function _0x455ed1(){return'auto'==_0x586d8d['editing']['view']['_overlayModeHint'];}function _0x1591e8(){_0x586d8d['editing']['view']['_overlayModeHint']='auto';}}function _0x2fe134(_0x2ad357){const _0x542819=[new window['Promise'](_0x3ccda9=>setTimeout(_0x3ccda9,0x93ecc)),_0x553c19['then'](()=>new window['Promise'](_0x1c2682=>{let _0x392429=0x0;_0x586d8d['model']['on']('applyOperation',(_0x143196,_0x51bd8f)=>{_0x51bd8f[0x0]['isDocumentOperation']&&_0x392429++,0x5e8==_0x392429&&(_0x1c2682(),_0x143196['off']());});}))];return window['Promise']['race'](_0x542819)['then'](()=>_0x2ad357);}async function _0x2a7c42(){await _0x553c19,_0x586d8d['model']['change']=_0x408e4d,_0x586d8d['model']['enqueueChange']=_0x408e4d,_0x586d8d['enableReadOnlyMode']('model');}function _0x5c6189(){return window['glob']&&window['glob']['triliumVersion'];}function _0x2c231b(_0x24cf53){const _0x377b34=_0x1d0999();_0x586d8d[_0x377b34]='formatPainterLicenseKey'+_0x24cf53,'Valid'!=_0x24cf53&&_0x2a7c42();}function _0x1d0999(){const _0x2dccbe=window['String'](window['performance']['now']())['replace']('.','');let _0x3cba61='Q';for(let _0xfa2f25=0x0;_0xfa2f25<_0x2dccbe['length'];_0xfa2f25+=0x2){let _0x4aebfb=window['parseInt'](_0x2dccbe['substring'](_0xfa2f25,_0xfa2f25+0x2));_0x4aebfb>=0x3e&&(_0x4aebfb-=0x3e),_0x3cba61+=_0x192575[_0x4aebfb];}return _0x3cba61;}function _0xd1c3a5(){const _0x17d80f=_0x200f6a['split']('.');if(0x3!=_0x17d80f['length'])return null;return _0x109dc6(_0x17d80f[0x1]);function _0x109dc6(_0x5a6824){const _0x205656=_0x4e8ed4(_0x5a6824);return _0x205656&&_0x1787cc()?_0x205656:null;function _0x1787cc(){const _0x3b8de7=_0x205656['jti'],_0x5ef9a2=window['parseInt'](_0x3b8de7['substring'](_0x3b8de7['length']-0x8),0x10),_0x1fc5a2={..._0x205656,'jti':_0x3b8de7['substring'](0x0,_0x3b8de7['length']-0x8)};return delete _0x1fc5a2['vc'],_0x23a9f4(_0x1fc5a2)==_0x5ef9a2;}}}async function _0x1d412f(){let _0x568044=!0x0;try{const [_0x63441,_0x382620,_0x27a163]=_0x200f6a['split']('.');return _0x211813(_0x63441),await _0x5e54d5(_0x63441,_0x382620,_0x27a163),_0x568044;}catch{return!0x1;}function _0x211813(_0x579aee){const _0x42b0f8=_0x4e8ed4(_0x579aee);_0x42b0f8&&'ES256'==_0x42b0f8['alg']||(_0x568044=!0x1);}async function _0x5e54d5(_0x4a8072,_0x386d76,_0x2fd6c5){const _0x56a0d9=window['Uint8Array']['from'](_0x295cde(_0x2fd6c5),_0x192694=>_0x192694['charCodeAt'](0x0)),_0x14a55b=new window['TextEncoder']()['encode'](_0x4a8072+'.'+_0x386d76),_0x4e96b4=window['crypto']['subtle'];if(!_0x4e96b4)return;const _0x97cfda=await _0x4e96b4['importKey']('jwk',_0x4899b7,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4e96b4['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x97cfda,_0x56a0d9,_0x14a55b)||(_0x568044=!0x1);}}function _0x4e8ed4(_0x59d855){return _0x59d855['startsWith']('ey')?JSON['parse'](_0x295cde(_0x59d855)):null;}function _0x295cde(_0x1c2804){return window['atob'](_0x1c2804['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x23a9f4(_0x313aa7){let _0x23c966=0x1505;function _0x5ad26b(_0x434c4f){for(let _0x341ddc=0x0;_0x341ddc<_0x434c4f['length'];_0x341ddc++){const _0x179a87=_0x434c4f['charCodeAt'](_0x341ddc);_0x23c966=(_0x23c966<<0x5)+_0x23c966+_0x179a87,_0x23c966&=_0x23c966;}}function _0x3dbe38(_0x380bcf){Array['isArray'](_0x380bcf)?_0x380bcf['forEach'](_0x3dbe38):_0x380bcf&&'object'==typeof _0x380bcf?Object['entries'](_0x380bcf)['sort']()['forEach'](([_0x3c7906,_0x427708])=>{_0x5ad26b(_0x3c7906),_0x3dbe38(_0x427708);}):_0x5ad26b(window['String'](_0x380bcf));}return _0x3dbe38(_0x313aa7),_0x23c966>>>0x0;}function _0x5141cd(_0x1f2897){return _0x1f2897['toString'](0x10)['padStart'](0x8,'0');}function _0x44eee7(_0x2c2491){return _0x2c2491['split']('')['reverse']()['join']('');}function _0x408e4d(){}_0x2c231b(await _0x32b85c());}(this);}['_toggleSpecialCursor'](_0x1182ea){this['editor']['editing']['view']['change'](_0x581db1=>{for(const _0x982829 of this['editor']['editing']['view']['document']['roots'])_0x1182ea?_0x581db1['addClass'](h,_0x982829):_0x581db1['removeClass'](h,_0x982829);});}['_copyFormatting'](){const {editor:_0x86b5b9}=this;_0x86b5b9['execute'](w),_0x86b5b9['ui']['ariaLiveAnnouncer']['announce'](L(_0x86b5b9['locale'],'Formatting\x20copied.'));}['_pasteFormatting'](){const {editor:_0x3aa7ed}=this,_0x2286a0=_0x3aa7ed['commands']['get'](w)['value'];_0x3aa7ed['execute'](g,_0x2286a0),_0x3aa7ed['ui']['ariaLiveAnnouncer']['announce'](L(_0x3aa7ed['locale'],'Pasted\x20formatting.'));}['_finishPainting'](){this['editor']['commands']['get'](w)['reset'](),this['stopListening'](_0x2f95e2['window']['document'],'mouseup');}},x=class extends _0x1722e1{static get['requires'](){return[P,k];}static get['pluginName'](){return'FormatPainter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{p as CopyFormatCommand,x as FormatPainter,P as FormatPainterEditing,k as FormatPainterUI,y as PasteFormatCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-format-painter",
|
|
3
|
-
"version": "48.3.1-alpha.
|
|
3
|
+
"version": "48.3.1-alpha.1",
|
|
4
4
|
"description": "Format painter feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"./package.json": "./package.json"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ckeditor/ckeditor5-core": "48.3.1-alpha.
|
|
25
|
-
"@ckeditor/ckeditor5-engine": "48.3.1-alpha.
|
|
26
|
-
"@ckeditor/ckeditor5-icons": "48.3.1-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-remove-format": "48.3.1-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-ui": "48.3.1-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-utils": "48.3.1-alpha.
|
|
24
|
+
"@ckeditor/ckeditor5-core": "48.3.1-alpha.1",
|
|
25
|
+
"@ckeditor/ckeditor5-engine": "48.3.1-alpha.1",
|
|
26
|
+
"@ckeditor/ckeditor5-icons": "48.3.1-alpha.1",
|
|
27
|
+
"@ckeditor/ckeditor5-remove-format": "48.3.1-alpha.1",
|
|
28
|
+
"@ckeditor/ckeditor5-ui": "48.3.1-alpha.1",
|
|
29
|
+
"@ckeditor/ckeditor5-utils": "48.3.1-alpha.1"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"dist",
|