@ckbox/i18n 2.9.0-rc.4 → 2.9.0-rc.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.
- package/README.md +4 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Using a build served from the CDN is the simplest and fastest way of embedding C
|
|
|
13
13
|
To start using CKBox on your website, embed the following `script` element in the HTML code of the page:
|
|
14
14
|
|
|
15
15
|
```html
|
|
16
|
-
<script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.
|
|
16
|
+
<script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.5/ckbox.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Quick implementation example:
|
|
@@ -23,7 +23,7 @@ Quick implementation example:
|
|
|
23
23
|
<html>
|
|
24
24
|
<head>
|
|
25
25
|
<meta charset="UTF-8" />
|
|
26
|
-
<script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.
|
|
26
|
+
<script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.5/ckbox.js"></script>
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
|
29
29
|
<div id="ckbox"></div>
|
|
@@ -48,10 +48,10 @@ The code snippet below presents the simplest scenario for integration of CKEdito
|
|
|
48
48
|
<html>
|
|
49
49
|
<head>
|
|
50
50
|
<meta charset="UTF-8" />
|
|
51
|
-
<script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.
|
|
51
|
+
<script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.5/ckbox.js"></script>
|
|
52
52
|
<link
|
|
53
53
|
rel="stylesheet"
|
|
54
|
-
href="https://cdn.ckbox.io/ckbox/2.9.0-rc.
|
|
54
|
+
href="https://cdn.ckbox.io/ckbox/2.9.0-rc.5/styles/themes/lark.css"
|
|
55
55
|
/>
|
|
56
56
|
<link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5/42.0.0/ckeditor5.css" />
|
|
57
57
|
</head>
|
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
|
+
function _0x4a11(_0x570639,_0x2c86bc){const _0xc4ff0c=_0xc4ff();return _0x4a11=function(_0x4a111f,_0x1e67aa){_0x4a111f=_0x4a111f-0xff;let _0x4e9466=_0xc4ff0c[_0x4a111f];return _0x4e9466;},_0x4a11(_0x570639,_0x2c86bc);}const _0x11f0d9=_0x4a11;(function(_0x4a1fb4,_0x56673b){const _0x11a4c2=_0x4a11,_0x4a4829=_0x4a1fb4();while(!![]){try{const _0x31a1d0=-parseInt(_0x11a4c2(0x10a))/0x1*(parseInt(_0x11a4c2(0x121))/0x2)+-parseInt(_0x11a4c2(0x11d))/0x3+-parseInt(_0x11a4c2(0x118))/0x4+parseInt(_0x11a4c2(0x10b))/0x5+-parseInt(_0x11a4c2(0x11b))/0x6*(-parseInt(_0x11a4c2(0x105))/0x7)+-parseInt(_0x11a4c2(0xff))/0x8*(-parseInt(_0x11a4c2(0x107))/0x9)+parseInt(_0x11a4c2(0x127))/0xa*(-parseInt(_0x11a4c2(0x11c))/0xb);if(_0x31a1d0===_0x56673b)break;else _0x4a4829['push'](_0x4a4829['shift']());}catch(_0x4191bf){_0x4a4829['push'](_0x4a4829['shift']());}}}(_0xc4ff,0x18edf));function _0xc4ff(){const _0x1b8d21=['7oLsjbs','375370KlQtge','length','map','getKey','slice','isSupported','code','select','Plural\x20form\x20for\x20language\x20\x22','exec','values','tag','strong','642244Vbjhii','filter','useContext','12xkLunL','51601jlpTrM','55662RLsSBI','useEffect','_rules','Provider','4498CkLqzv','_one','createContext','plural','includes','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','220oQzAIW','processTags','72VdgwQL',']:\x20Translation\x20for\x20key\x20\x27','log','push','warn','createElement','538867McBodS','supportedLocalesOf','171135jbCega','\x22\x20is\x20not\x20supported.','text'];_0xc4ff=function(){return _0x1b8d21;};return _0xc4ff();}import*as _0x1e7126 from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x491c5e){const _0x46c4a0=_0x4a11;this['lang']=_0x491c5e;try{this[_0x46c4a0(0x11f)]=new Intl['PluralRules'](_0x491c5e);}catch(_0xf00628){console[_0x46c4a0(0x103)](_0x46c4a0(0x126));}}[_0x11f0d9(0x10e)](_0x52f03a,_0x419e81){const _0x3407f8=_0x11f0d9;if(!this['_rules'])return _0x52f03a+_0x3407f8(0x122);const _0x54e291=this[_0x3407f8(0x11f)][_0x3407f8(0x112)](_0x419e81);return _0x52f03a+'_'+_0x54e291;}}Plural[_0x11f0d9(0x110)]=_0x5cd18f=>{const _0x1a0062=_0x11f0d9;try{return Intl['PluralRules'][_0x1a0062(0x106)]([_0x5cd18f])['length']>0x0;}catch(_0xe0db00){return![];}};const I18nContext=_0x1e7126[_0x11f0d9(0x123)]({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x220168,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x5a740e=_0x11f0d9;return _0x1e7126[_0x5a740e(0x11e)](()=>{const _0x369334=_0x5a740e,_0x536447=Plural[_0x369334(0x110)](lang);!_0x536447&&console[_0x369334(0x103)](_0x369334(0x113)+lang+_0x369334(0x108));},[lang]),_0x1e7126['createElement'](I18nContext[_0x5a740e(0x120)],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x220168);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x11f0d9(0x117),_0x11f0d9(0x111)],getMsg=(_0x94275,_0x199276={},_0xe80e4f)=>{const _0x100da7=_0x11f0d9,_0x30fb13=_0xe80e4f[_0x100da7(0x124)];if(_0x199276[_0x94275]&&_0x30fb13===undefined)return{'found':!![],'msg':_0x199276[_0x94275]};const _0x6e14ac=Object['keys'](_0x199276)[_0x100da7(0x119)](_0x3f4199=>_0x3f4199['indexOf'](_0x94275)===0x0);if(_0x6e14ac['length']===0x0||_0x30fb13===undefined)return{'found':![],'msg':_0x94275};const _0x1bef02=_0xe80e4f['pluralUtils'][_0x100da7(0x10e)](_0x94275,_0x30fb13);return{'found':!![],'msg':_0x199276[_0x1bef02]};},parseMsgTags=_0x345090=>{const _0x313679=_0x11f0d9,_0x54681f=[];let _0x10b07a=0x0,_0x4a433a;while((_0x4a433a=TAG_REGEX[_0x313679(0x114)](_0x345090))!==null){const _0x4b7de9=_0x4a433a[0x0],{index:_0x47e110}=_0x4a433a,_0xe7d527=_0x4b7de9['charAt'](0x1)==='/',_0x2927d6=_0xe7d527?_0x4b7de9['slice'](0x2,-0x1):_0x4b7de9[_0x313679(0x10f)](0x1,-0x1),_0x18dca0=ALLOWED_TAGS[_0x313679(0x125)](_0x2927d6);if(!_0x18dca0)continue;const _0x3dc890=_0x345090['slice'](_0x10b07a,_0x47e110);if(!_0x3dc890){_0x10b07a=_0x47e110+_0x4b7de9[_0x313679(0x10c)];continue;}_0xe7d527?_0x54681f[_0x313679(0x102)]({'type':_0x313679(0x116),'name':_0x4b7de9[_0x313679(0x10f)](0x2,-0x1),'content':_0x3dc890}):_0x54681f['push']({'type':'text','content':_0x3dc890}),_0x10b07a=_0x47e110+_0x4b7de9[_0x313679(0x10c)];}return _0x10b07a<_0x345090[_0x313679(0x10c)]&&_0x54681f[_0x313679(0x102)]({'type':_0x313679(0x109),'content':_0x345090[_0x313679(0x10f)](_0x10b07a)}),_0x54681f;};function formatMsgWithTags(_0x29f43e){const _0x14609b=_0x11f0d9,_0x55680b=parseMsgTags(_0x29f43e),_0x391fdb=_0x55680b[_0x14609b(0x10d)](({content:_0xbbf232,type:_0x26548f,name:_0x42b1f1},_0x230ca4)=>{const _0x6cbaf0=_0x14609b,_0x20193a=_0x26548f!=='text'&&_0x42b1f1?_0x42b1f1:_0x1e7126['Fragment'];return _0x1e7126[_0x6cbaf0(0x104)](_0x20193a,{'key':''+_0x230ca4},_0xbbf232);});return _0x391fdb;}function formatMsg(_0x2fb5a3,_0x69bdde,_0x3791ba){const _0x1ef53b=sprintf(_0x2fb5a3,..._0x69bdde!==null&&_0x69bdde!==void 0x0?_0x69bdde:[]);if(!_0x3791ba)return _0x1ef53b;return formatMsgWithTags(_0x1ef53b);}const useTranslation=()=>{const _0x3848b6=_0x11f0d9,{lang:_0x38ffc5,debug:_0x42b5cf,pluralUtils:_0x48ad58,resources:_0x52b4b4}=_0x1e7126[_0x3848b6(0x11a)](I18nContext);function _0x4e862a(_0x4684df,_0x3da1ee){const _0x84834f=_0x3848b6,{found:_0xf6af2e,msg:_0x14ab75}=getMsg(_0x4684df,_0x52b4b4[_0x38ffc5],{'plural':_0x3da1ee===null||_0x3da1ee===void 0x0?void 0x0:_0x3da1ee[_0x84834f(0x124)],'pluralUtils':_0x48ad58});_0x42b5cf&&!_0xf6af2e&&console[_0x84834f(0x101)]('['+_0x38ffc5+_0x84834f(0x100)+_0x4684df+'\x27\x20is\x20missing.');if(_0x3da1ee===null||_0x3da1ee===void 0x0?void 0x0:_0x3da1ee[_0x84834f(0x128)])return formatMsg(_0x14ab75,_0x3da1ee===null||_0x3da1ee===void 0x0?void 0x0:_0x3da1ee[_0x84834f(0x115)],!![]);return formatMsg(_0x14ab75,_0x3da1ee===null||_0x3da1ee===void 0x0?void 0x0:_0x3da1ee[_0x84834f(0x115)],![]);}return{'t':_0x4e862a,'lang':_0x38ffc5};};export{I18nContext,I18nProvider,useTranslation};
|