@ckbox/i18n 1.6.0-rc.1 → 1.6.0-rc.2
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/README.md +3 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Using a build served from the CDN is the simplest and fastest way of embedding C
|
|
|
12
12
|
To start using CKBox on your website, embed the following `script` element in the HTML code of the page:
|
|
13
13
|
|
|
14
14
|
```html
|
|
15
|
-
<script src="https://cdn.ckbox.io/ckbox/1.6.0-rc.
|
|
15
|
+
<script src="https://cdn.ckbox.io/ckbox/1.6.0-rc.2/ckbox.js"></script>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Quick implementation example:
|
|
@@ -22,7 +22,7 @@ Quick implementation example:
|
|
|
22
22
|
<html>
|
|
23
23
|
<head>
|
|
24
24
|
<meta charset="UTF-8" />
|
|
25
|
-
<script src="https://cdn.ckbox.io/ckbox/1.6.0-rc.
|
|
25
|
+
<script src="https://cdn.ckbox.io/ckbox/1.6.0-rc.2/ckbox.js"></script>
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
|
28
28
|
<div id="ckbox"></div>
|
|
@@ -48,7 +48,7 @@ The code snippet below presents the simplest scenario for integration of CKEdito
|
|
|
48
48
|
<head>
|
|
49
49
|
<meta charset="UTF-8" />
|
|
50
50
|
<script src="https://cdn.ckeditor.com/ckeditor5/36.0.0/classic/ckeditor.js"></script>
|
|
51
|
-
<script src="https://cdn.ckbox.io/ckbox/1.6.0-rc.
|
|
51
|
+
<script src="https://cdn.ckbox.io/ckbox/1.6.0-rc.2/ckbox.js"></script>
|
|
52
52
|
</head>
|
|
53
53
|
<body>
|
|
54
54
|
<div id="editor"></div>
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
const
|
|
4
|
+
const _0x28c014=_0x855c;(function(_0x435c55,_0x483612){const _0x3dbaae=_0x855c,_0x482889=_0x435c55();while(!![]){try{const _0x13bd87=-parseInt(_0x3dbaae(0x146))/0x1+-parseInt(_0x3dbaae(0x14b))/0x2+parseInt(_0x3dbaae(0x13f))/0x3+parseInt(_0x3dbaae(0x14c))/0x4+-parseInt(_0x3dbaae(0x151))/0x5*(-parseInt(_0x3dbaae(0x162))/0x6)+-parseInt(_0x3dbaae(0x155))/0x7*(parseInt(_0x3dbaae(0x15c))/0x8)+parseInt(_0x3dbaae(0x152))/0x9*(-parseInt(_0x3dbaae(0x14e))/0xa);if(_0x13bd87===_0x483612)break;else _0x482889['push'](_0x482889['shift']());}catch(_0xdd8536){_0x482889['push'](_0x482889['shift']());}}}(_0x2455,0x47029));import*as _0x20d830 from'react';function _0x855c(_0x2610de,_0x346655){const _0x245569=_0x2455();return _0x855c=function(_0x855c8b,_0x28cdeb){_0x855c8b=_0x855c8b-0x13a;let _0x5cbc7d=_0x245569[_0x855c8b];return _0x5cbc7d;},_0x855c(_0x2610de,_0x346655);}function _0x2455(){const _0x35b084=['code','lang','\x27\x20is\x20missing.','plural','29640wxwKRq','values','\x22\x20is\x20not\x20supported.','createElement','Fragment','indexOf','6vONfis','log','tag','text','strong','useEffect','push','createContext','1234785MnptSl','filter','Provider','processTags','pluralUtils','select','slice','267308BfBteo','isSupported','charAt',']:\x20Translation\x20for\x20key\x20\x27','useContext','188616nTpIBI','1382796aLvXZC','map','2810390cPsuXm','PluralRules','exec','2881790UVXXaw','9coPjdi','warn','_rules','756EsAxxS','_one','length'];_0x2455=function(){return _0x35b084;};return _0x2455();}import{sprintf}from'sprintf-js';class Plural{constructor(_0x8dc545){const _0x571980=_0x855c;this[_0x571980(0x159)]=_0x8dc545;try{this[_0x571980(0x154)]=new Intl[(_0x571980(0x14f))](_0x8dc545);}catch(_0xce4541){console[_0x571980(0x153)]('Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?');}}['getKey'](_0x30e323,_0x5c0de6){const _0x67c614=_0x855c;if(!this[_0x67c614(0x154)])return _0x30e323+_0x67c614(0x156);const _0x17399a=this[_0x67c614(0x154)][_0x67c614(0x144)](_0x5c0de6);return _0x30e323+'_'+_0x17399a;}}Plural[_0x28c014(0x147)]=_0x35fdae=>{const _0x3c731f=_0x28c014;try{return Intl[_0x3c731f(0x14f)]['supportedLocalesOf']([_0x35fdae])[_0x3c731f(0x157)]>0x0;}catch(_0x17dbd3){return![];}};const I18nContext=_0x20d830[_0x28c014(0x13e)]({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x52ba1b,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x4f2d6f=_0x28c014;return _0x20d830[_0x4f2d6f(0x13c)](()=>{const _0x26fc98=_0x4f2d6f,_0xa1e6cf=Plural[_0x26fc98(0x147)](lang);!_0xa1e6cf&&console['warn']('Plural\x20form\x20for\x20language\x20\x22'+lang+_0x26fc98(0x15e));},[lang]),_0x20d830['createElement'](I18nContext[_0x4f2d6f(0x141)],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x52ba1b);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x28c014(0x13b),_0x28c014(0x158)],getMsg=(_0xe05506,_0x5bf4ee={},_0x8e6129)=>{const _0x216dae=_0x28c014,_0x16fb62=_0x8e6129['plural'];if(_0x5bf4ee[_0xe05506]&&_0x16fb62===undefined)return{'found':!![],'msg':_0x5bf4ee[_0xe05506]};const _0x2e5dc7=Object['keys'](_0x5bf4ee)[_0x216dae(0x140)](_0x755be7=>_0x755be7[_0x216dae(0x161)](_0xe05506)===0x0);if(_0x2e5dc7['length']===0x0||_0x16fb62===undefined)return{'found':![],'msg':_0xe05506};const _0xf897ec=_0x8e6129[_0x216dae(0x143)]['getKey'](_0xe05506,_0x16fb62);return{'found':!![],'msg':_0x5bf4ee[_0xf897ec]};},parseMsgTags=_0x25cf46=>{const _0x233b15=_0x28c014,_0x5253d5=[];let _0x51a160=0x0,_0x2adb72;while((_0x2adb72=TAG_REGEX[_0x233b15(0x150)](_0x25cf46))!==null){const _0x250e4a=_0x2adb72[0x0],{index:_0x1b19db}=_0x2adb72,_0x1cdf7b=_0x250e4a[_0x233b15(0x148)](0x1)==='/',_0x4ac64e=_0x1cdf7b?_0x250e4a[_0x233b15(0x145)](0x2,-0x1):_0x250e4a['slice'](0x1,-0x1),_0x130bdd=ALLOWED_TAGS['includes'](_0x4ac64e);if(!_0x130bdd)continue;const _0x14f6c2=_0x25cf46[_0x233b15(0x145)](_0x51a160,_0x1b19db);if(!_0x14f6c2){_0x51a160=_0x1b19db+_0x250e4a[_0x233b15(0x157)];continue;}_0x1cdf7b?_0x5253d5[_0x233b15(0x13d)]({'type':_0x233b15(0x164),'name':_0x250e4a[_0x233b15(0x145)](0x2,-0x1),'content':_0x14f6c2}):_0x5253d5[_0x233b15(0x13d)]({'type':_0x233b15(0x13a),'content':_0x14f6c2}),_0x51a160=_0x1b19db+_0x250e4a[_0x233b15(0x157)];}return _0x51a160<_0x25cf46[_0x233b15(0x157)]&&_0x5253d5['push']({'type':'text','content':_0x25cf46[_0x233b15(0x145)](_0x51a160)}),_0x5253d5;};function formatMsgWithTags(_0x491faa){const _0x356b42=_0x28c014,_0x264f79=parseMsgTags(_0x491faa),_0x458cce=_0x264f79[_0x356b42(0x14d)](({content:_0x56fb96,type:_0x1108ef,name:_0xc106e3},_0x542c1c)=>{const _0x2dab22=_0x356b42,_0x5a601d=_0x1108ef!=='text'&&_0xc106e3?_0xc106e3:_0x20d830[_0x2dab22(0x160)];return _0x20d830[_0x2dab22(0x15f)](_0x5a601d,{'key':''+_0x542c1c},_0x56fb96);});return _0x458cce;}function formatMsg(_0x4bd2a5,_0x47fad3,_0x13c6e4){const _0x2e0233=sprintf(_0x4bd2a5,..._0x47fad3!==null&&_0x47fad3!==void 0x0?_0x47fad3:[]);if(!_0x13c6e4)return _0x2e0233;return formatMsgWithTags(_0x2e0233);}const useTranslation=()=>{const _0x4149c5=_0x28c014,{lang:_0x2229eb,debug:_0x28d03b,pluralUtils:_0x14f419,resources:_0x183633}=_0x20d830[_0x4149c5(0x14a)](I18nContext);function _0x19a067(_0x76c3e,_0x524d7a){const _0x1a5026=_0x4149c5,{found:_0x4a807f,msg:_0xddb731}=getMsg(_0x76c3e,_0x183633[_0x2229eb],{'plural':_0x524d7a===null||_0x524d7a===void 0x0?void 0x0:_0x524d7a[_0x1a5026(0x15b)],'pluralUtils':_0x14f419});_0x28d03b&&!_0x4a807f&&console[_0x1a5026(0x163)]('['+_0x2229eb+_0x1a5026(0x149)+_0x76c3e+_0x1a5026(0x15a));if(_0x524d7a===null||_0x524d7a===void 0x0?void 0x0:_0x524d7a[_0x1a5026(0x142)])return formatMsg(_0xddb731,_0x524d7a===null||_0x524d7a===void 0x0?void 0x0:_0x524d7a[_0x1a5026(0x15d)],!![]);return formatMsg(_0xddb731,_0x524d7a===null||_0x524d7a===void 0x0?void 0x0:_0x524d7a[_0x1a5026(0x15d)],![]);}return{'t':_0x19a067,'lang':_0x2229eb};};export{I18nContext,I18nProvider,useTranslation};
|