@ckeditor/ckeditor5-line-height 48.5.0-alpha.3 → 48.5.0-alpha.5

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x5642c4,Plugin as _0x2df8bc}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x4c12f3,Collection as _0x4e0734,first as _0x468237,uid as _0x3b7e7f}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x4d759e,isPercentageStyleValue as _0x16e951}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x2fb419,MenuBarMenuListItemView as _0x5e521c,MenuBarMenuListView as _0x2bd843,MenuBarMenuView as _0x1cede2,UIModel as _0x343f6f,addListToDropdown as _0x46d838,createDropdown as _0x4b2e88}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x2bcafb}from'@ckeditor/ckeditor5-icons';var p=class extends _0x5642c4{['refresh'](){const _0x34c5e3=this['editor']['model']['document'],_0x326579=_0x468237(_0x34c5e3['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x326579)&&this['_canHaveLineHeight'](_0x326579),this['value']=this['isEnabled']&&_0x326579['getAttribute']('lineHeight');}execute(_0x3864ec={}){const _0x41a618=this['editor']['model'],_0x38fa1a=_0x41a618['document']['selection'],_0x1c9ad4=_0x3864ec['value'];_0x41a618['change'](_0x481875=>{const _0xc39119=Array['from'](_0x38fa1a['getSelectedBlocks']())['filter'](_0x2ef110=>this['_canHaveLineHeight'](_0x2ef110));for(const _0x5e3af7 of _0xc39119)_0x1c9ad4?_0x481875['setAttribute']('lineHeight',_0x1c9ad4,_0x5e3af7):_0x481875['removeAttribute']('lineHeight',_0x5e3af7);});}_canHaveLineHeight(_0x2c4223){return this['editor']['model']['schema']['checkAttribute'](_0x2c4223,'lineHeight');}};const y={get 'single'(){return{'title':'Single','model':'single','view':{'key':'class','value':'line-height-single'}};},get 'double'(){return{'title':'Double','model':'double','view':{'key':'class','value':'line-height-double'}};}};function H(_0x563972){return'string'==typeof _0x563972&&'default'===_0x563972['toLowerCase']();}function L(_0x17da0b){return _0x17da0b['options']['map'](_0x8caa21=>{return H(_0x8caa21)?{'title':String(_0x17da0b['defaultValue']),'model':'default'}:('number'==typeof _0x8caa21&&(_0x8caa21=String(_0x8caa21)),'string'!=typeof _0x8caa21?_0x8caa21:parseFloat(_0x8caa21)?{'title':_0x8caa21,'model':_0x8caa21,'view':{'name':'span','styles':{'line-height':_0x8caa21}}}:'string'==typeof(_0x23b844=_0x8caa21)?y[_0x23b844]:y[_0x23b844['model']]);var _0x23b844;})['filter'](_0x31071a=>void 0x0!==_0x31071a);}var v=class extends _0x2df8bc{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {plugins:_0x628ace,conversion:_0x27bb92}=this['editor'];_0x628ace['has']('ListEditing')&&_0x628ace['has']('TodoListEditing')&&(_0x628ace['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x42d9c5,_0x448c2d,_0x35a182,_0x49f7ad,_0x5686b6){'todo'==_0x5686b6['getAttribute']('listType')&&_0x448c2d&&(_0x42d9c5['addClass']('ck-list-marker-line-height',_0x35a182),_0x42d9c5['setStyle']('--ck-content-list-marker-line-height',_0x448c2d,_0x35a182));}}),_0x27bb92['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x27bb92['for']('upcast')['add'](_0x4a0301=>{_0x4a0301['on']('element:li',function(_0x10753e){const _0x12574c=new _0x4d759e(_0x10753e);return(_0x546339,_0x5e5dc0,_0x59272c)=>{const _0x398d2d=_0x12574c['match'](_0x5e5dc0['viewItem']);if(!_0x398d2d)return;const _0x3d1888=_0x398d2d['match'];_0x3d1888['name']=!0x1,_0x59272c['consumable']['consume'](_0x5e5dc0['viewItem'],_0x3d1888);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x2df8bc{static get['pluginName'](){return'LineHeightEditing';}static get requires(){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4a7f1c){super(_0x4a7f1c),_0x4a7f1c['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}init(){const _0x126a30=this['editor'];this['_validateConfig'](),_0x126a30['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x126a30['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x126a30['commands']['add']('lineHeight',new p(_0x126a30)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}afterInit(){!async function(_0x5aa206){const _0x382bec='cvqCYM8ia9TDP6n5dmrzbJtlj03FwLxIpEWSUG7ARu21KfQoXNyg4ZBeOhskHV',_0x3b3e70=0x79410,_0x3afb2a={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x50c981(_0xe9e2b9){const _0x48bb58=new window['Promise'](_0x2a17d3=>{_0xe9e2b9['once']('ready',_0x2a17d3);}),_0x36b3b5=window['Date']['now'](),_0x38ac52=_0xe9e2b9['config']['get']('licenseKey');async function _0x63e780(){let _0x5afd2c,_0x1a5429=null,_0x2e9554=null;try{return'GPL'==_0x38ac52?'NotAllowed':(_0x5afd2c=_0x196f66(),_0x5afd2c?(_0x5afd2c['usageEndpoint']&&(_0x2e9554=_0x578b09(_0x5afd2c['usageEndpoint'],_0x5afd2c['jti'])),await _0xef463()?_0x482720()?_0x1101fd()?'Expired':_0x1e276c()?('evaluation'==_0x5afd2c['licenseType']&&(_0x1a5429=_0x5aa819('EvaluationLimit')),await _0x3d29e6()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x1101fd(){const _0x2c6f5c=['evaluation','trial']['includes'](_0x5afd2c['licenseType'])?_0x36b3b5/0x3e8:0xe10*_0x3b3e70;return _0x5afd2c['exp']<_0x2c6f5c;}function _0x482720(){const _0x1b8d06=_0x5afd2c['features'];return!!_0x1b8d06&&(!!_0x1b8d06['includes']('*')||!!_0x1b8d06['includes']('LH'));}function _0x1e276c(){const _0x2679bb=_0x5afd2c['licensedHosts'];if(!_0x2679bb||0x0==_0x2679bb['length'])return!0x0;const {hostname:_0x3f491b}=new URL(window['location']['href']);if(_0x2679bb['includes'](_0x3f491b))return!0x0;const _0x5a22a3=_0x3f491b['split']('.');return _0x2679bb['filter'](_0x4adc8b=>_0x4adc8b['includes']('*'))['map'](_0x58ca91=>_0x58ca91['split']('.'))['filter'](_0x17ac03=>_0x17ac03['length']<=_0x5a22a3['length'])['map'](_0x392d19=>Array(_0x5a22a3['length']-_0x392d19['length'])['fill']('*'===_0x392d19[0x0]?'*':'')['concat'](_0x392d19))['some'](_0x5c93f5=>_0x5a22a3['every']((_0x387ecb,_0x35cce0)=>_0x5c93f5[_0x35cce0]===_0x387ecb||'*'===_0x5c93f5[_0x35cce0]));}function _0x3d29e6(){return _0x1a5429&&_0x2e9554?new window['Promise']((_0xd09da,_0x4a2119)=>{_0x1a5429['then'](_0xd09da,_0x4a2119),_0x2e9554['then'](_0x4c9a07=>{'Valid'!=_0x4c9a07&&_0xd09da(_0x4c9a07);},_0x4a2119);}):_0x1a5429||_0x2e9554||'Valid';}}function _0x578b09(_0x4d6df3,_0x14efd6){return new window['Promise'](_0x23b683=>{if(_0x4b7eec())return _0x23b683('Valid');_0xcc718d(),_0xe9e2b9['decorate']('_sendUsageRequest');let _0xbaef5c=!0x1;const _0x1b3c10=_0x3b7e7f();function _0x3cbb72(_0x48891d){return!!_0x48891d&&('object'==typeof _0x48891d||'function'==typeof _0x48891d)&&'function'==typeof _0x48891d['then']&&'function'==typeof _0x48891d['catch'];}function _0x2af87b(_0xda17c4){_0x22b384(_0xda17c4)['then'](_0x58fb07=>_0x58fb07&&'ok'==_0x58fb07['status']?_0x5cc887(_0x5211ce(_0x1b3c10+_0x14efd6))!=_0x58fb07['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5b431f=>(_0xf0c4b0(),_0x5b431f),()=>{const _0x297bc7=_0x12b93f();return null==_0x297bc7?(_0xf0c4b0(),'Valid'):_0x36b3b5-_0x297bc7>0x240c8400?'UsageLimit':'Valid';})['then'](_0x23b683)['catch'](()=>{_0x23b683('UsageLimit');});const _0x1750f3=0x36ee80;function _0xf0c4b0(){const _0x54389f='llct-'+_0x5cc887(_0x5211ce(_0x4d6df3)),_0x35a296=_0x221788(_0x5cc887(window['Math']['ceil'](_0x36b3b5/_0x1750f3)));window['localStorage']['setItem'](_0x54389f,_0x35a296);}function _0x12b93f(){const _0x1b9ddb='llct-'+_0x5cc887(_0x5211ce(_0x4d6df3)),_0x5442bd=window['localStorage']['getItem'](_0x1b9ddb);return _0x5442bd?window['parseInt'](_0x221788(_0x5442bd),0x10)*_0x1750f3:null;}function _0x22b384(_0x3cfd74){return new window['Promise']((_0x15d3bd,_0x166be4)=>{_0x3cfd74['then'](_0x15d3bd,_0x166be4),window['setTimeout'](_0x166be4,0x1d4c0);});}}_0xe9e2b9['on']('_sendUsageRequest',(_0x2ab018,_0xc85c40)=>{if(_0xc85c40[0x0]!=_0x4d6df3)return _0x23b683('UsageLimit');_0xc85c40[0x1]={..._0xc85c40[0x1],'requestId':_0x1b3c10};},{'priority':'high'}),_0xe9e2b9['on']('_sendUsageRequest',_0x56ddb9=>{_0x3cbb72(_0x56ddb9['return'])&&(_0xbaef5c=!0x0,_0x2af87b(_0x56ddb9['return']));},{'priority':'low'}),_0x48bb58['then'](()=>{_0xbaef5c||_0x23b683('UsageLimit');});});function _0x4b7eec(){return'auto'==_0xe9e2b9['editing']['view']['_overlayModeHint'];}function _0xcc718d(){_0xe9e2b9['editing']['view']['_overlayModeHint']='auto';}}function _0x5aa819(_0x2e0641){const _0xc6ae79=[new window['Promise'](_0x51de26=>setTimeout(_0x51de26,0x93ecc)),_0x48bb58['then'](()=>new window['Promise'](_0xb41c8a=>{let _0x3be9c5=0x0;_0xe9e2b9['model']['on']('applyOperation',(_0x3e1953,_0x345eb3)=>{_0x345eb3[0x0]['isDocumentOperation']&&_0x3be9c5++,0x5e8==_0x3be9c5&&(_0xb41c8a(),_0x3e1953['off']());});}))];return window['Promise']['race'](_0xc6ae79)['then'](()=>_0x2e0641);}async function _0x29224a(){await _0x48bb58,_0xe9e2b9['model']['change']=_0x55b3fb,_0xe9e2b9['model']['enqueueChange']=_0x55b3fb,_0xe9e2b9['enableReadOnlyMode']('model');}function _0x31a6ba(_0x5d4c01){const _0x3ad532=_0x50bf47();_0xe9e2b9[_0x3ad532]='lineHeightLicenseKey'+_0x5d4c01,'Valid'!=_0x5d4c01&&_0x29224a();}function _0x50bf47(){const _0x23acff=window['String'](window['performance']['now']())['replace']('.','');let _0x2b3ebd='c';for(let _0x36b9bf=0x0;_0x36b9bf<_0x23acff['length'];_0x36b9bf+=0x2){let _0x3ac523=window['parseInt'](_0x23acff['substring'](_0x36b9bf,_0x36b9bf+0x2));_0x3ac523>=0x3e&&(_0x3ac523-=0x3e),_0x2b3ebd+=_0x382bec[_0x3ac523];}return _0x2b3ebd;}function _0x196f66(){const _0x42fcdb=_0x38ac52['split']('.');if(0x3!=_0x42fcdb['length'])return null;return _0x3609a7(_0x42fcdb[0x1]);function _0x3609a7(_0x236b04){const _0x66cbff=_0x53d217(_0x236b04);return _0x66cbff&&_0x383303()?_0x66cbff:null;function _0x383303(){const _0x4fe931=_0x66cbff['jti'],_0x4cd03b=window['parseInt'](_0x4fe931['substring'](_0x4fe931['length']-0x8),0x10),_0x4018e6={..._0x66cbff,'jti':_0x4fe931['substring'](0x0,_0x4fe931['length']-0x8)};return delete _0x4018e6['vc'],_0x5211ce(_0x4018e6)==_0x4cd03b;}}}async function _0xef463(){let _0x35cc69=!0x0;try{const [_0x1b3475,_0x15933e,_0x7e70b]=_0x38ac52['split']('.');return _0x3ea02b(_0x1b3475),await _0x352f75(_0x1b3475,_0x15933e,_0x7e70b),_0x35cc69;}catch{return!0x1;}function _0x3ea02b(_0xc32654){const _0x3c9520=_0x53d217(_0xc32654);_0x3c9520&&'ES256'==_0x3c9520['alg']||(_0x35cc69=!0x1);}async function _0x352f75(_0x43974f,_0x284304,_0xa8a9a7){const _0x218caf=window['Uint8Array']['from'](_0x532ac6(_0xa8a9a7),_0x2d126e=>_0x2d126e['charCodeAt'](0x0)),_0x78a75f=new window['TextEncoder']()['encode'](_0x43974f+'.'+_0x284304),_0x55f11b=window['crypto']['subtle'];if(!_0x55f11b)return;const _0x4286b4=await _0x55f11b['importKey']('jwk',_0x3afb2a,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x55f11b['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4286b4,_0x218caf,_0x78a75f)||(_0x35cc69=!0x1);}}function _0x53d217(_0x1927bc){return _0x1927bc['startsWith']('ey')?JSON['parse'](_0x532ac6(_0x1927bc)):null;}function _0x532ac6(_0x436471){return window['atob'](_0x436471['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5211ce(_0x550492){let _0x358948=0x1505;function _0x56d511(_0x140925){for(let _0x11745b=0x0;_0x11745b<_0x140925['length'];_0x11745b++){const _0x5a646d=_0x140925['charCodeAt'](_0x11745b);_0x358948=(_0x358948<<0x5)+_0x358948+_0x5a646d,_0x358948&=_0x358948;}}function _0x1792a6(_0x38252d){Array['isArray'](_0x38252d)?_0x38252d['forEach'](_0x1792a6):_0x38252d&&'object'==typeof _0x38252d?Object['entries'](_0x38252d)['sort']()['forEach'](([_0x4490e4,_0x565146])=>{_0x56d511(_0x4490e4),_0x1792a6(_0x565146);}):_0x56d511(window['String'](_0x38252d));}return _0x1792a6(_0x550492),_0x358948>>>0x0;}function _0x5cc887(_0x3e4c16){return _0x3e4c16['toString'](0x10)['padStart'](0x8,'0');}function _0x221788(_0x5c1be9){return _0x5c1be9['split']('')['reverse']()['join']('');}function _0x55b3fb(){}_0x31a6ba(await _0x63e780());}_0x50c981(_0x5aa206['editor']);}(this);}_validateConfig(){const _0x5b137a=this['editor'];if(!_0x5b137a['config']['get']('lineHeight.supportAllValues'))return;const _0x41ed48=_0x5b137a['config']['get']('lineHeight.options')['filter'](_0x2d6da2=>'string'==typeof _0x2d6da2&&(!H(_0x2d6da2)&&isNaN(Number(_0x2d6da2))));if(_0x41ed48['length'])throw new _0x4c12f3('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x41ed48});}_prepareAnyValueConverters(){const _0x546efb=this['editor'],_0xa550f=this['editor']['config']['get']('lineHeight.defaultValue');_0x546efb['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x12453f=>String(_0x12453f)===String(_0xa550f)?null:{'key':'style','value':{'line-height':_0x12453f}}}),_0x546efb['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x5c721a=>{let _0x120798=_0x5c721a['getStyle']('line-height');return _0x16e951(_0x120798)&&(_0x120798=String(Number(_0x120798['slice'](0x0,-0x1))/0x64)),String(_0x120798)===String(_0xa550f)?null:_0x120798;}},'view':{'styles':{'line-height':/.*/}}});}_preparePredefinedConverters(){const _0x312ab1=this['editor'],_0x11c91f=this['editor']['config']['get']('lineHeight.defaultValue'),_0x11fa3d=function(_0x1b5f51,_0x14e6cd){const _0x1a3231={'model':{'key':_0x1b5f51,'values':[]},'view':{}};for(const _0x6146d1 of _0x14e6cd)'class'===_0x6146d1['view']?.['key']?(_0x1a3231['model']['values']['push'](_0x6146d1['model']),_0x1a3231['view'][_0x6146d1['model']]={'key':'class','value':_0x6146d1['view']['value']}):(_0x1a3231['model']['values']['push'](_0x6146d1['model']),_0x1a3231['view'][_0x6146d1['model']]={'key':'style','value':'line-height:'+_0x6146d1['model']+';'});return _0x1a3231;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x110d7c=>_0x110d7c['model']));_0x312ab1['conversion']['attributeToAttribute'](_0x11fa3d),_0x312ab1['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x1f0d5e=>{let _0x45f2a8=_0x1f0d5e['getStyle']('line-height');return _0x16e951(_0x45f2a8)&&(_0x45f2a8=String(Number(_0x45f2a8['slice'](0x0,-0x1))/0x64)),_0x45f2a8===String(_0x11c91f)?null:_0x11fa3d['model']['values']['includes'](_0x45f2a8)?_0x45f2a8:null;}}});}},k=class extends _0x2df8bc{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0xef9770={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0xef9770),this['_registerMenuBarComponent'](_0xef9770),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x2f5f94=[this['editor']];for(const _0x3e832e of _0x2f5f94){let _0x5ac059;for(const _0x222464 in _0x3e832e){const _0x3608ea=_0x222464,_0x2bde15=_0x3e832e[_0x3608ea];if('lineHeightLicenseKeyValid'==_0x2bde15||'lineHeightLicenseKeyInvalid'==_0x2bde15||'lineHeightLicenseKeyExpired'==_0x2bde15||'lineHeightLicenseKeyDomainLimit'==_0x2bde15||'lineHeightLicenseKeyNotAllowed'==_0x2bde15||'lineHeightLicenseKeyEvaluationLimit'==_0x2bde15||'lineHeightLicenseKeyUsageLimit'==_0x2bde15){delete _0x3e832e[_0x3608ea],_0x5ac059=_0x2bde15,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x5ac059&&_0x3e832e['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x5ac059&&_0x3e832e['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x5ac059&&_0x3e832e['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x5ac059&&_0x3e832e['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x5ac059&&_0x3e832e['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x5ac059&&_0x3e832e['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_shouldRenderCustomValueOption(){return this['editor']['config']['get']('lineHeight.supportAllValues');}_getLocalizedLineHeightOptions(){const _0x23d383=this['editor'],t=_0x23d383['t'],_0x13018f=_0x23d383['config']['get']('lineHeight'),_0x2b9055={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x13018f)['map'](_0x5782db=>{const _0x15b6c5=_0x2b9055[_0x5782db['title']];return _0x15b6c5&&_0x15b6c5!=_0x5782db['title']&&(_0x5782db=Object['assign']({},_0x5782db,{'title':_0x15b6c5})),_0x5782db;});}_prepareListOptions(){const _0x33b2f7=this['editor']['commands']['get']('lineHeight'),_0x25989e=this['editor']['config']['get']('lineHeight.defaultValue'),_0x2700be=this['_getLocalizedLineHeightOptions'](),_0x3a49af=new _0x4e0734(),_0x20d529=_0x583c9c=>'default'===_0x583c9c||String(_0x25989e)===_0x583c9c;for(const _0xaa1a31 of _0x2700be){const _0x2ae18c={'type':'button','model':new _0x343f6f({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0xaa1a31['title'],'withText':!0x0})};_0x20d529(_0xaa1a31['model'])?(_0x2ae18c['model']['bind']('isOn')['to'](_0x33b2f7,'value',_0x921737=>!_0x921737),_0x2ae18c['model']['commandParam']=void 0x0):(_0x2ae18c['model']['bind']('isOn')['to'](_0x33b2f7,'value',_0x426f6e=>_0x426f6e===_0xaa1a31['model']),_0x2ae18c['model']['commandParam']=_0xaa1a31['model']),_0x3a49af['add'](_0x2ae18c);}if(this['_shouldRenderCustomValueOption']()){const _0x25ef06=this['_getCustomValueOptionDefinition'](_0x2700be);_0x3a49af['add'](_0x25ef06);}return _0x3a49af;}_getCustomValueOptionDefinition(_0x100ab6){const _0x1f8f71=this['editor'],t=_0x1f8f71['t'],_0x38c829=_0x1f8f71['commands']['get']('lineHeight'),_0x32d2fa=_0x100ab6['map'](_0x408664=>_0x408664['model']),_0x340f07={'type':'button','model':new _0x343f6f({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x340f07['model']['bind']('commandParam')['to'](_0x38c829,'value'),_0x340f07['model']['bind']('isOn')['to'](_0x38c829,'value',_0x1336fb=>!!_0x1336fb&&!_0x32d2fa['includes'](String(_0x1336fb))),_0x340f07['model']['bind']('label')['to'](_0x38c829,'value',_0x45e9fa=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x45e9fa))),_0x340f07;}_registerToolbarComponent({accessibleLabel:_0x1450c2,options:_0x1290b1}){const _0xcc082c=this['editor'],_0x59237a=_0xcc082c['commands']['get']('lineHeight');_0xcc082c['ui']['componentFactory']['add']('lineHeight',_0x4631e2=>{const _0x3f05b4=_0x4b2e88(_0x4631e2);return _0x46d838(_0x3f05b4,_0x1290b1,{'role':'menu','ariaLabel':_0x1450c2}),_0x3f05b4['buttonView']['set']({'label':_0x1450c2,'tooltip':!0x0,'icon':_0x2bcafb}),_0x3f05b4['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x3f05b4['bind']('isEnabled')['to'](_0x59237a),this['listenTo'](_0x3f05b4,'execute',_0x27e35e=>{_0xcc082c['execute'](_0x27e35e['source']['commandName'],{'value':_0x27e35e['source']['commandParam']}),_0xcc082c['editing']['view']['focus']();}),_0x3f05b4['once']('change:isOpen',()=>{const _0x23b8a6=_0x3f05b4['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x3f05b4,_0x1290b1,_0x23b8a6);}),_0x3f05b4;});}_registerMenuBarComponent({accessibleLabel:_0xbeca6,options:_0x557673}){const _0x1d1aea=this['editor'],_0x159f9d=_0x1d1aea['commands']['get']('lineHeight');_0x1d1aea['ui']['componentFactory']['add']('menuBar:lineHeight',_0x255e99=>{const _0x1cd314=new _0x1cede2(_0x255e99);_0x1cd314['buttonView']['set']({'label':_0xbeca6,'icon':_0x2bcafb}),_0x1cd314['bind']('isEnabled')['to'](_0x159f9d);const _0x11e3dd=new _0x2bd843(_0x255e99);for(const _0xb0541c of _0x557673){const _0x29082c=new _0x5e521c(_0x255e99,_0x1cd314),_0x176cf3=new _0x2fb419(_0x255e99);_0x176cf3['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x176cf3['bind'](...Object['keys'](_0xb0541c['model']))['to'](_0xb0541c['model']),_0x176cf3['delegate']('execute')['to'](_0x1cd314),_0x176cf3['on']('execute',()=>{_0x1d1aea['execute'](_0xb0541c['model']['commandName'],{'value':_0xb0541c['model']['commandParam']}),_0x1d1aea['editing']['view']['focus']();}),_0x29082c['children']['add'](_0x176cf3),_0x11e3dd['items']['add'](_0x29082c);}return _0x1cd314['panelView']['children']['add'](_0x11e3dd),this['_attachCustomOptionVisibilityHandler'](_0x1cd314,_0x557673,_0x11e3dd),_0x1cd314;});}_attachCustomOptionVisibilityHandler(_0xeeefbf,_0x578858,_0x237cbd){if(!this['_shouldRenderCustomValueOption']())return;const _0x3d5ac0=()=>{if(!_0xeeefbf['isOpen'])return;_0x237cbd['items']['last']['isVisible']=Boolean(_0x578858['last']['model']['isOn']);};_0x3d5ac0(),_0xeeefbf['on']('change:isOpen',()=>{_0x3d5ac0();});}},_=class extends _0x2df8bc{static get requires(){return[b,k];}static get['pluginName'](){return'LineHeight';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{_ as LineHeight,p as LineHeightCommand,b as LineHeightEditing,v as LineHeightTodoListIntegration,k as LineHeightUI};
23
+ import{Command as _0x258e2e,Plugin as _0x104971}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x3dd672,Collection as _0x51b9fa,first as _0x53efcc,uid as _0x15e1f3}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x32b7d7,isPercentageStyleValue as _0x41f31b}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x12a0bc,MenuBarMenuListItemView as _0x2db0f2,MenuBarMenuListView as _0x3aaefa,MenuBarMenuView as _0x345fc2,UIModel as _0x2660d1,addListToDropdown as _0x3002f1,createDropdown as _0x37d9d5}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x329f5d}from'@ckeditor/ckeditor5-icons';var p=class extends _0x258e2e{['refresh'](){const _0x12ed56=this['editor']['model']['document'],_0x572aff=_0x53efcc(_0x12ed56['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x572aff)&&this['_canHaveLineHeight'](_0x572aff),this['value']=this['isEnabled']&&_0x572aff['getAttribute']('lineHeight');}execute(_0x194cba={}){const _0x546430=this['editor']['model'],_0x439f7f=_0x546430['document']['selection'],_0x12daf9=_0x194cba['value'];_0x546430['change'](_0x374341=>{const _0x3eb1d9=Array['from'](_0x439f7f['getSelectedBlocks']())['filter'](_0xee8e26=>this['_canHaveLineHeight'](_0xee8e26));for(const _0x2835fe of _0x3eb1d9)_0x12daf9?_0x374341['setAttribute']('lineHeight',_0x12daf9,_0x2835fe):_0x374341['removeAttribute']('lineHeight',_0x2835fe);});}_canHaveLineHeight(_0x579c4b){return this['editor']['model']['schema']['checkAttribute'](_0x579c4b,'lineHeight');}};const y={get 'single'(){return{'title':'Single','model':'single','view':{'key':'class','value':'line-height-single'}};},get 'double'(){return{'title':'Double','model':'double','view':{'key':'class','value':'line-height-double'}};}};function H(_0x1daa46){return'string'==typeof _0x1daa46&&'default'===_0x1daa46['toLowerCase']();}function L(_0x2fc5d6){return _0x2fc5d6['options']['map'](_0x4a298a=>{return H(_0x4a298a)?{'title':String(_0x2fc5d6['defaultValue']),'model':'default'}:('number'==typeof _0x4a298a&&(_0x4a298a=String(_0x4a298a)),'string'!=typeof _0x4a298a?_0x4a298a:parseFloat(_0x4a298a)?{'title':_0x4a298a,'model':_0x4a298a,'view':{'name':'span','styles':{'line-height':_0x4a298a}}}:'string'==typeof(_0x43e73d=_0x4a298a)?y[_0x43e73d]:y[_0x43e73d['model']]);var _0x43e73d;})['filter'](_0x51b2a2=>void 0x0!==_0x51b2a2);}var v=class extends _0x104971{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {plugins:_0x5cba69,conversion:_0x1cc21}=this['editor'];_0x5cba69['has']('ListEditing')&&_0x5cba69['has']('TodoListEditing')&&(_0x5cba69['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x14acfd,_0x50ff42,_0x4b73a6,_0x1b39e3,_0x3a73d4){'todo'==_0x3a73d4['getAttribute']('listType')&&_0x50ff42&&(_0x14acfd['addClass']('ck-list-marker-line-height',_0x4b73a6),_0x14acfd['setStyle']('--ck-content-list-marker-line-height',_0x50ff42,_0x4b73a6));}}),_0x1cc21['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x1cc21['for']('upcast')['add'](_0x58eaf4=>{_0x58eaf4['on']('element:li',function(_0x449250){const _0x410f5c=new _0x32b7d7(_0x449250);return(_0x5e99f7,_0x2cc70d,_0x4ba035)=>{const _0x4beea6=_0x410f5c['match'](_0x2cc70d['viewItem']);if(!_0x4beea6)return;const _0x4b03e7=_0x4beea6['match'];_0x4b03e7['name']=!0x1,_0x4ba035['consumable']['consume'](_0x2cc70d['viewItem'],_0x4b03e7);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x104971{static get['pluginName'](){return'LineHeightEditing';}static get requires(){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4c8f07){super(_0x4c8f07),_0x4c8f07['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}init(){const _0x3c938c=this['editor'];this['_validateConfig'](),_0x3c938c['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x3c938c['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x3c938c['commands']['add']('lineHeight',new p(_0x3c938c)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}afterInit(){!async function(_0x25dc2b){const _0x396a='cvqCYM8ia9TDP6n5dmrzbJtlj03FwLxIpEWSUG7ARu21KfQoXNyg4ZBeOhskHV',_0x5b8cc7=0x79440,_0x27decd={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x26a00a(_0x1c37e8){const _0x368185=new window['Promise'](_0x28dd0e=>{_0x1c37e8['once']('ready',_0x28dd0e);}),_0x21b5ff=window['Date']['now'](),_0x4585dc=_0x1c37e8['config']['get']('licenseKey');async function _0x5f1128(){let _0x324850,_0x2949b9=null,_0xbf9edf=null;try{return'GPL'==_0x4585dc?'NotAllowed':(_0x324850=_0x240402(),_0x324850?(_0x324850['usageEndpoint']&&(_0xbf9edf=_0x307b3b(_0x324850['usageEndpoint'],_0x324850['jti'])),await _0x1640cb()?_0xc75b09()?_0x534de6()?'Expired':_0x178e4a()?('evaluation'==_0x324850['licenseType']&&(_0x2949b9=_0x3abbe2('EvaluationLimit')),await _0x56878d()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x534de6(){const _0x112f6f=['evaluation','trial']['includes'](_0x324850['licenseType'])?_0x21b5ff/0x3e8:0xe10*_0x5b8cc7;return _0x324850['exp']<_0x112f6f;}function _0xc75b09(){const _0x445a52=_0x324850['features'];return!!_0x445a52&&(!!_0x445a52['includes']('*')||!!_0x445a52['includes']('LH'));}function _0x178e4a(){const _0x9ec14=_0x324850['licensedHosts'];if(!_0x9ec14||0x0==_0x9ec14['length'])return!0x0;const {hostname:_0xabe96a}=new URL(window['location']['href']);if(_0x9ec14['includes'](_0xabe96a))return!0x0;const _0x5aa03a=_0xabe96a['split']('.');return _0x9ec14['filter'](_0x3de5a5=>_0x3de5a5['includes']('*'))['map'](_0x42b65a=>_0x42b65a['split']('.'))['filter'](_0x38ef97=>_0x38ef97['length']<=_0x5aa03a['length'])['map'](_0x40ef50=>Array(_0x5aa03a['length']-_0x40ef50['length'])['fill']('*'===_0x40ef50[0x0]?'*':'')['concat'](_0x40ef50))['some'](_0x4bc042=>_0x5aa03a['every']((_0x2036ab,_0x5ac015)=>_0x4bc042[_0x5ac015]===_0x2036ab||'*'===_0x4bc042[_0x5ac015]));}function _0x56878d(){return _0x2949b9&&_0xbf9edf?new window['Promise']((_0x5c06d6,_0x1fd886)=>{_0x2949b9['then'](_0x5c06d6,_0x1fd886),_0xbf9edf['then'](_0x3d03cd=>{'Valid'!=_0x3d03cd&&_0x5c06d6(_0x3d03cd);},_0x1fd886);}):_0x2949b9||_0xbf9edf||'Valid';}}function _0x307b3b(_0x249479,_0x4556f9){return new window['Promise'](_0x309245=>{if(_0x524d1b())return _0x309245('Valid');_0x20afd1(),_0x1c37e8['decorate']('_sendUsageRequest');let _0x32162e=!0x1;const _0xb3d2d2=_0x15e1f3();function _0x1a183d(_0x372369){return!!_0x372369&&('object'==typeof _0x372369||'function'==typeof _0x372369)&&'function'==typeof _0x372369['then']&&'function'==typeof _0x372369['catch'];}function _0x240528(_0x26d1c3){_0x1db28a(_0x26d1c3)['then'](_0x7dcc47=>_0x7dcc47&&'ok'==_0x7dcc47['status']?_0x5eb2da(_0x385c03(_0xb3d2d2+_0x4556f9))!=_0x7dcc47['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4db70b=>(_0x14bb51(),_0x4db70b),()=>{const _0x30ba86=_0x3e4737();return null==_0x30ba86?(_0x14bb51(),'Valid'):_0x21b5ff-_0x30ba86>0x240c8400?'UsageLimit':'Valid';})['then'](_0x309245)['catch'](()=>{_0x309245('UsageLimit');});const _0xf4e346=0x36ee80;function _0x14bb51(){const _0x235a54='llct-'+_0x5eb2da(_0x385c03(_0x249479)),_0x4619dc=_0xcd3d63(_0x5eb2da(window['Math']['ceil'](_0x21b5ff/_0xf4e346)));window['localStorage']['setItem'](_0x235a54,_0x4619dc);}function _0x3e4737(){const _0x276ea7='llct-'+_0x5eb2da(_0x385c03(_0x249479)),_0x24ddb3=window['localStorage']['getItem'](_0x276ea7);return _0x24ddb3?window['parseInt'](_0xcd3d63(_0x24ddb3),0x10)*_0xf4e346:null;}function _0x1db28a(_0xcf38c5){return new window['Promise']((_0x43be61,_0x1506be)=>{_0xcf38c5['then'](_0x43be61,_0x1506be),window['setTimeout'](_0x1506be,0x1d4c0);});}}_0x1c37e8['on']('_sendUsageRequest',(_0x582c8d,_0x2c74d3)=>{if(_0x2c74d3[0x0]!=_0x249479)return _0x309245('UsageLimit');_0x2c74d3[0x1]={..._0x2c74d3[0x1],'requestId':_0xb3d2d2};},{'priority':'high'}),_0x1c37e8['on']('_sendUsageRequest',_0x39dc4a=>{_0x1a183d(_0x39dc4a['return'])&&(_0x32162e=!0x0,_0x240528(_0x39dc4a['return']));},{'priority':'low'}),_0x368185['then'](()=>{_0x32162e||_0x309245('UsageLimit');});});function _0x524d1b(){return'auto'==_0x1c37e8['editing']['view']['_overlayModeHint'];}function _0x20afd1(){_0x1c37e8['editing']['view']['_overlayModeHint']='auto';}}function _0x3abbe2(_0x3e8063){const _0x8a23dc=[new window['Promise'](_0x8ac7da=>setTimeout(_0x8ac7da,0x93ecc)),_0x368185['then'](()=>new window['Promise'](_0x482ab4=>{let _0x2b88d1=0x0;_0x1c37e8['model']['on']('applyOperation',(_0x1c52ca,_0x2324e7)=>{_0x2324e7[0x0]['isDocumentOperation']&&_0x2b88d1++,0x5e8==_0x2b88d1&&(_0x482ab4(),_0x1c52ca['off']());});}))];return window['Promise']['race'](_0x8a23dc)['then'](()=>_0x3e8063);}async function _0x13c7a8(){await _0x368185,_0x1c37e8['model']['change']=_0x16f1e7,_0x1c37e8['model']['enqueueChange']=_0x16f1e7,_0x1c37e8['enableReadOnlyMode']('model');}function _0x39b737(_0x2cf620){const _0x58b2cb=_0x5617e7();_0x1c37e8[_0x58b2cb]='lineHeightLicenseKey'+_0x2cf620,'Valid'!=_0x2cf620&&_0x13c7a8();}function _0x5617e7(){const _0x2a487b=window['String'](window['performance']['now']())['replace']('.','');let _0x3516d4='c';for(let _0x24dcad=0x0;_0x24dcad<_0x2a487b['length'];_0x24dcad+=0x2){let _0xf8ec84=window['parseInt'](_0x2a487b['substring'](_0x24dcad,_0x24dcad+0x2));_0xf8ec84>=0x3e&&(_0xf8ec84-=0x3e),_0x3516d4+=_0x396a[_0xf8ec84];}return _0x3516d4;}function _0x240402(){const _0xa49c78=_0x4585dc['split']('.');if(0x3!=_0xa49c78['length'])return null;return _0x22a588(_0xa49c78[0x1]);function _0x22a588(_0x2b6251){const _0x1def34=_0x2c876c(_0x2b6251);return _0x1def34&&_0x25e210()?_0x1def34:null;function _0x25e210(){const _0x2042f4=_0x1def34['jti'],_0x55cef2=window['parseInt'](_0x2042f4['substring'](_0x2042f4['length']-0x8),0x10),_0x482227={..._0x1def34,'jti':_0x2042f4['substring'](0x0,_0x2042f4['length']-0x8)};return delete _0x482227['vc'],_0x385c03(_0x482227)==_0x55cef2;}}}async function _0x1640cb(){let _0x18b391=!0x0;try{const [_0x2b6a05,_0x1c5780,_0x45e247]=_0x4585dc['split']('.');return _0x47c71c(_0x2b6a05),await _0x1eb664(_0x2b6a05,_0x1c5780,_0x45e247),_0x18b391;}catch{return!0x1;}function _0x47c71c(_0x251853){const _0x10f237=_0x2c876c(_0x251853);_0x10f237&&'ES256'==_0x10f237['alg']||(_0x18b391=!0x1);}async function _0x1eb664(_0x1a3f1f,_0x5ca142,_0x226897){const _0x27d2ba=window['Uint8Array']['from'](_0x2d599d(_0x226897),_0x1c386c=>_0x1c386c['charCodeAt'](0x0)),_0x35524a=new window['TextEncoder']()['encode'](_0x1a3f1f+'.'+_0x5ca142),_0x424130=window['crypto']['subtle'];if(!_0x424130)return;const _0x15e6c0=await _0x424130['importKey']('jwk',_0x27decd,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x424130['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x15e6c0,_0x27d2ba,_0x35524a)||(_0x18b391=!0x1);}}function _0x2c876c(_0x463363){return _0x463363['startsWith']('ey')?JSON['parse'](_0x2d599d(_0x463363)):null;}function _0x2d599d(_0x2a703c){return window['atob'](_0x2a703c['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x385c03(_0x1607f1){let _0x3c3d84=0x1505;function _0x21c043(_0x4d4205){for(let _0x3e0a02=0x0;_0x3e0a02<_0x4d4205['length'];_0x3e0a02++){const _0xc9f1=_0x4d4205['charCodeAt'](_0x3e0a02);_0x3c3d84=(_0x3c3d84<<0x5)+_0x3c3d84+_0xc9f1,_0x3c3d84&=_0x3c3d84;}}function _0x2c8375(_0x2a9a1e){Array['isArray'](_0x2a9a1e)?_0x2a9a1e['forEach'](_0x2c8375):_0x2a9a1e&&'object'==typeof _0x2a9a1e?Object['entries'](_0x2a9a1e)['sort']()['forEach'](([_0x1d214e,_0x2822f6])=>{_0x21c043(_0x1d214e),_0x2c8375(_0x2822f6);}):_0x21c043(window['String'](_0x2a9a1e));}return _0x2c8375(_0x1607f1),_0x3c3d84>>>0x0;}function _0x5eb2da(_0x41eb92){return _0x41eb92['toString'](0x10)['padStart'](0x8,'0');}function _0xcd3d63(_0x3f59b8){return _0x3f59b8['split']('')['reverse']()['join']('');}function _0x16f1e7(){}_0x39b737(await _0x5f1128());}_0x26a00a(_0x25dc2b['editor']);}(this);}_validateConfig(){const _0x82c2ba=this['editor'];if(!_0x82c2ba['config']['get']('lineHeight.supportAllValues'))return;const _0x98bd3e=_0x82c2ba['config']['get']('lineHeight.options')['filter'](_0x5a71a7=>'string'==typeof _0x5a71a7&&(!H(_0x5a71a7)&&isNaN(Number(_0x5a71a7))));if(_0x98bd3e['length'])throw new _0x3dd672('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x98bd3e});}_prepareAnyValueConverters(){const _0x51d674=this['editor'],_0x1d7aff=this['editor']['config']['get']('lineHeight.defaultValue');_0x51d674['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x2b9e07=>String(_0x2b9e07)===String(_0x1d7aff)?null:{'key':'style','value':{'line-height':_0x2b9e07}}}),_0x51d674['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x122bb3=>{let _0x5e6366=_0x122bb3['getStyle']('line-height');return _0x41f31b(_0x5e6366)&&(_0x5e6366=String(Number(_0x5e6366['slice'](0x0,-0x1))/0x64)),String(_0x5e6366)===String(_0x1d7aff)?null:_0x5e6366;}},'view':{'styles':{'line-height':/.*/}}});}_preparePredefinedConverters(){const _0x5da652=this['editor'],_0x1f6315=this['editor']['config']['get']('lineHeight.defaultValue'),_0xaa9dbf=function(_0x4113df,_0x36b65b){const _0x42a04a={'model':{'key':_0x4113df,'values':[]},'view':{}};for(const _0x1b3cc9 of _0x36b65b)'class'===_0x1b3cc9['view']?.['key']?(_0x42a04a['model']['values']['push'](_0x1b3cc9['model']),_0x42a04a['view'][_0x1b3cc9['model']]={'key':'class','value':_0x1b3cc9['view']['value']}):(_0x42a04a['model']['values']['push'](_0x1b3cc9['model']),_0x42a04a['view'][_0x1b3cc9['model']]={'key':'style','value':'line-height:'+_0x1b3cc9['model']+';'});return _0x42a04a;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x2e4245=>_0x2e4245['model']));_0x5da652['conversion']['attributeToAttribute'](_0xaa9dbf),_0x5da652['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x92f581=>{let _0x39eec8=_0x92f581['getStyle']('line-height');return _0x41f31b(_0x39eec8)&&(_0x39eec8=String(Number(_0x39eec8['slice'](0x0,-0x1))/0x64)),_0x39eec8===String(_0x1f6315)?null:_0xaa9dbf['model']['values']['includes'](_0x39eec8)?_0x39eec8:null;}}});}},k=class extends _0x104971{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x4dba54={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x4dba54),this['_registerMenuBarComponent'](_0x4dba54),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0xc4b490=[this['editor']];for(const _0x545b9a of _0xc4b490){let _0x5ba569;for(const _0x597c5c in _0x545b9a){const _0x1aa318=_0x597c5c,_0x31653f=_0x545b9a[_0x1aa318];if('lineHeightLicenseKeyValid'==_0x31653f||'lineHeightLicenseKeyInvalid'==_0x31653f||'lineHeightLicenseKeyExpired'==_0x31653f||'lineHeightLicenseKeyDomainLimit'==_0x31653f||'lineHeightLicenseKeyNotAllowed'==_0x31653f||'lineHeightLicenseKeyEvaluationLimit'==_0x31653f||'lineHeightLicenseKeyUsageLimit'==_0x31653f){delete _0x545b9a[_0x1aa318],_0x5ba569=_0x31653f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x5ba569&&_0x545b9a['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x5ba569&&_0x545b9a['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x5ba569&&_0x545b9a['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x5ba569&&_0x545b9a['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x5ba569&&_0x545b9a['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x5ba569&&_0x545b9a['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_shouldRenderCustomValueOption(){return this['editor']['config']['get']('lineHeight.supportAllValues');}_getLocalizedLineHeightOptions(){const _0x37836d=this['editor'],t=_0x37836d['t'],_0x3feb99=_0x37836d['config']['get']('lineHeight'),_0x935231={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x3feb99)['map'](_0x1146e8=>{const _0x583278=_0x935231[_0x1146e8['title']];return _0x583278&&_0x583278!=_0x1146e8['title']&&(_0x1146e8=Object['assign']({},_0x1146e8,{'title':_0x583278})),_0x1146e8;});}_prepareListOptions(){const _0x305307=this['editor']['commands']['get']('lineHeight'),_0x4b1b1d=this['editor']['config']['get']('lineHeight.defaultValue'),_0x2c606a=this['_getLocalizedLineHeightOptions'](),_0x554745=new _0x51b9fa(),_0x24cf6e=_0x543fab=>'default'===_0x543fab||String(_0x4b1b1d)===_0x543fab;for(const _0x3f9a04 of _0x2c606a){const _0x569190={'type':'button','model':new _0x2660d1({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x3f9a04['title'],'withText':!0x0})};_0x24cf6e(_0x3f9a04['model'])?(_0x569190['model']['bind']('isOn')['to'](_0x305307,'value',_0x489574=>!_0x489574),_0x569190['model']['commandParam']=void 0x0):(_0x569190['model']['bind']('isOn')['to'](_0x305307,'value',_0x585fee=>_0x585fee===_0x3f9a04['model']),_0x569190['model']['commandParam']=_0x3f9a04['model']),_0x554745['add'](_0x569190);}if(this['_shouldRenderCustomValueOption']()){const _0x42fff5=this['_getCustomValueOptionDefinition'](_0x2c606a);_0x554745['add'](_0x42fff5);}return _0x554745;}_getCustomValueOptionDefinition(_0x1417c5){const _0x27917b=this['editor'],t=_0x27917b['t'],_0x26c915=_0x27917b['commands']['get']('lineHeight'),_0x5e3b95=_0x1417c5['map'](_0x54a1f8=>_0x54a1f8['model']),_0x504e50={'type':'button','model':new _0x2660d1({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x504e50['model']['bind']('commandParam')['to'](_0x26c915,'value'),_0x504e50['model']['bind']('isOn')['to'](_0x26c915,'value',_0x4fef96=>!!_0x4fef96&&!_0x5e3b95['includes'](String(_0x4fef96))),_0x504e50['model']['bind']('label')['to'](_0x26c915,'value',_0x45854e=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x45854e))),_0x504e50;}_registerToolbarComponent({accessibleLabel:_0x5d9035,options:_0x3bdba4}){const _0x2aedf5=this['editor'],_0x531324=_0x2aedf5['commands']['get']('lineHeight');_0x2aedf5['ui']['componentFactory']['add']('lineHeight',_0x51921c=>{const _0x5a8657=_0x37d9d5(_0x51921c);return _0x3002f1(_0x5a8657,_0x3bdba4,{'role':'menu','ariaLabel':_0x5d9035}),_0x5a8657['buttonView']['set']({'label':_0x5d9035,'tooltip':!0x0,'icon':_0x329f5d}),_0x5a8657['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x5a8657['bind']('isEnabled')['to'](_0x531324),this['listenTo'](_0x5a8657,'execute',_0x3ee0e3=>{_0x2aedf5['execute'](_0x3ee0e3['source']['commandName'],{'value':_0x3ee0e3['source']['commandParam']}),_0x2aedf5['editing']['view']['focus']();}),_0x5a8657['once']('change:isOpen',()=>{const _0x455b5b=_0x5a8657['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x5a8657,_0x3bdba4,_0x455b5b);}),_0x5a8657;});}_registerMenuBarComponent({accessibleLabel:_0xc7d4a7,options:_0x14bed1}){const _0x551657=this['editor'],_0x21f52f=_0x551657['commands']['get']('lineHeight');_0x551657['ui']['componentFactory']['add']('menuBar:lineHeight',_0xba0672=>{const _0x116ad9=new _0x345fc2(_0xba0672);_0x116ad9['buttonView']['set']({'label':_0xc7d4a7,'icon':_0x329f5d}),_0x116ad9['bind']('isEnabled')['to'](_0x21f52f);const _0x165bec=new _0x3aaefa(_0xba0672);for(const _0x105533 of _0x14bed1){const _0x2a29dd=new _0x2db0f2(_0xba0672,_0x116ad9),_0x5d82ff=new _0x12a0bc(_0xba0672);_0x5d82ff['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x5d82ff['bind'](...Object['keys'](_0x105533['model']))['to'](_0x105533['model']),_0x5d82ff['delegate']('execute')['to'](_0x116ad9),_0x5d82ff['on']('execute',()=>{_0x551657['execute'](_0x105533['model']['commandName'],{'value':_0x105533['model']['commandParam']}),_0x551657['editing']['view']['focus']();}),_0x2a29dd['children']['add'](_0x5d82ff),_0x165bec['items']['add'](_0x2a29dd);}return _0x116ad9['panelView']['children']['add'](_0x165bec),this['_attachCustomOptionVisibilityHandler'](_0x116ad9,_0x14bed1,_0x165bec),_0x116ad9;});}_attachCustomOptionVisibilityHandler(_0x43fa79,_0x44aac3,_0x208a79){if(!this['_shouldRenderCustomValueOption']())return;const _0x266499=()=>{if(!_0x43fa79['isOpen'])return;_0x208a79['items']['last']['isVisible']=Boolean(_0x44aac3['last']['model']['isOn']);};_0x266499(),_0x43fa79['on']('change:isOpen',()=>{_0x266499();});}},_=class extends _0x104971{static get requires(){return[b,k];}static get['pluginName'](){return'LineHeight';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{_ as LineHeight,p as LineHeightCommand,b as LineHeightEditing,v as LineHeightTodoListIntegration,k as LineHeightUI};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-line-height",
3
- "version": "48.5.0-alpha.3",
3
+ "version": "48.5.0-alpha.5",
4
4
  "description": "Line height feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (https://cksource.com/)",
@@ -26,12 +26,12 @@
26
26
  "dist/translations/*.umd.js"
27
27
  ],
28
28
  "dependencies": {
29
- "@ckeditor/ckeditor5-core": "48.5.0-alpha.3",
30
- "@ckeditor/ckeditor5-engine": "48.5.0-alpha.3",
31
- "@ckeditor/ckeditor5-icons": "48.5.0-alpha.3",
32
- "@ckeditor/ckeditor5-list": "48.5.0-alpha.3",
33
- "@ckeditor/ckeditor5-ui": "48.5.0-alpha.3",
34
- "@ckeditor/ckeditor5-utils": "48.5.0-alpha.3"
29
+ "@ckeditor/ckeditor5-core": "48.5.0-alpha.5",
30
+ "@ckeditor/ckeditor5-engine": "48.5.0-alpha.5",
31
+ "@ckeditor/ckeditor5-icons": "48.5.0-alpha.5",
32
+ "@ckeditor/ckeditor5-list": "48.5.0-alpha.5",
33
+ "@ckeditor/ckeditor5-ui": "48.5.0-alpha.5",
34
+ "@ckeditor/ckeditor5-utils": "48.5.0-alpha.5"
35
35
  },
36
36
  "files": [
37
37
  "dist",