@ckbox/i18n 1.6.0-dev.0 → 1.6.0-rc.0
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-
|
|
15
|
+
<script src="https://cdn.ckbox.io/ckbox/1.6.0-rc.0/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-
|
|
25
|
+
<script src="https://cdn.ckbox.io/ckbox/1.6.0-rc.0/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-
|
|
51
|
+
<script src="https://cdn.ckbox.io/ckbox/1.6.0-rc.0/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
|
-
|
|
4
|
+
const _0x46e69f=_0x4637;(function(_0xd97350,_0x569c86){const _0x3590cd=_0x4637,_0x15d7e7=_0xd97350();while(!![]){try{const _0x395c07=-parseInt(_0x3590cd(0x12b))/0x1+parseInt(_0x3590cd(0x134))/0x2*(parseInt(_0x3590cd(0x12c))/0x3)+-parseInt(_0x3590cd(0x13e))/0x4*(-parseInt(_0x3590cd(0x13b))/0x5)+parseInt(_0x3590cd(0x148))/0x6+-parseInt(_0x3590cd(0x12e))/0x7*(parseInt(_0x3590cd(0x137))/0x8)+parseInt(_0x3590cd(0x12a))/0x9+-parseInt(_0x3590cd(0x136))/0xa*(parseInt(_0x3590cd(0x140))/0xb);if(_0x395c07===_0x569c86)break;else _0x15d7e7['push'](_0x15d7e7['shift']());}catch(_0x2a4deb){_0x15d7e7['push'](_0x15d7e7['shift']());}}}(_0x5e74,0x9a9db));import*as _0x18cbd3 from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x1da0be){const _0x51ec2d=_0x4637;this[_0x51ec2d(0x133)]=_0x1da0be;try{this['_rules']=new Intl[(_0x51ec2d(0x14d))](_0x1da0be);}catch(_0x4a96d4){console['warn']('Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?');}}[_0x46e69f(0x146)](_0x5556f6,_0x155ccb){const _0x53b429=_0x46e69f;if(!this[_0x53b429(0x139)])return _0x5556f6+_0x53b429(0x130);const _0x3048d5=this['_rules'][_0x53b429(0x13d)](_0x155ccb);return _0x5556f6+'_'+_0x3048d5;}}Plural['isSupported']=_0x435ef4=>{const _0x2ad8bd=_0x46e69f;try{return Intl['PluralRules'][_0x2ad8bd(0x14a)]([_0x435ef4])[_0x2ad8bd(0x14f)]>0x0;}catch(_0x1e5ed6){return![];}};const I18nContext=_0x18cbd3['createContext']({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x431a48,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x4e2398=_0x46e69f;return _0x18cbd3['useEffect'](()=>{const _0x45c599=_0x4637,_0x51ddb1=Plural['isSupported'](lang);!_0x51ddb1&&console['warn']('Plural\x20form\x20for\x20language\x20\x22'+lang+_0x45c599(0x12f));},[lang]),_0x18cbd3[_0x4e2398(0x14e)](I18nContext[_0x4e2398(0x142)],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x431a48);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x46e69f(0x141),_0x46e69f(0x144)],getMsg=(_0x9ce2ad,_0xf1b6d9={},_0x450eb4)=>{const _0xea469f=_0x46e69f,_0x5e0c63=_0x450eb4[_0xea469f(0x14c)];if(_0xf1b6d9[_0x9ce2ad]&&_0x5e0c63===undefined)return{'found':!![],'msg':_0xf1b6d9[_0x9ce2ad]};const _0x30b244=Object[_0xea469f(0x131)](_0xf1b6d9)[_0xea469f(0x135)](_0xb075e8=>_0xb075e8[_0xea469f(0x150)](_0x9ce2ad)===0x0);if(_0x30b244[_0xea469f(0x14f)]===0x0||_0x5e0c63===undefined)return{'found':![],'msg':_0x9ce2ad};const _0x5a5a9b=_0x450eb4[_0xea469f(0x151)][_0xea469f(0x146)](_0x9ce2ad,_0x5e0c63);return{'found':!![],'msg':_0xf1b6d9[_0x5a5a9b]};},parseMsgTags=_0x57dd15=>{const _0x31deca=_0x46e69f,_0xd95e55=[];let _0x8791bf=0x0,_0x2a2257;while((_0x2a2257=TAG_REGEX['exec'](_0x57dd15))!==null){const _0x5b95a5=_0x2a2257[0x0],{index:_0x2d0e3a}=_0x2a2257,_0x3ed90c=_0x5b95a5['charAt'](0x1)==='/',_0x47cde4=_0x3ed90c?_0x5b95a5[_0x31deca(0x13a)](0x2,-0x1):_0x5b95a5[_0x31deca(0x13a)](0x1,-0x1),_0x427970=ALLOWED_TAGS[_0x31deca(0x147)](_0x47cde4);if(!_0x427970)continue;const _0x58ecf9=_0x57dd15[_0x31deca(0x13a)](_0x8791bf,_0x2d0e3a);if(!_0x58ecf9){_0x8791bf=_0x2d0e3a+_0x5b95a5[_0x31deca(0x14f)];continue;}_0x3ed90c?_0xd95e55['push']({'type':_0x31deca(0x13f),'name':_0x5b95a5[_0x31deca(0x13a)](0x2,-0x1),'content':_0x58ecf9}):_0xd95e55[_0x31deca(0x145)]({'type':'text','content':_0x58ecf9}),_0x8791bf=_0x2d0e3a+_0x5b95a5[_0x31deca(0x14f)];}return _0x8791bf<_0x57dd15[_0x31deca(0x14f)]&&_0xd95e55[_0x31deca(0x145)]({'type':_0x31deca(0x13c),'content':_0x57dd15['slice'](_0x8791bf)}),_0xd95e55;};function formatMsgWithTags(_0x4232ee){const _0x1363d9=_0x46e69f,_0x493de0=parseMsgTags(_0x4232ee),_0x537934=_0x493de0[_0x1363d9(0x149)](({content:_0x4228f6,type:_0x3fc9f1,name:_0x4f6af2},_0x66ac37)=>{const _0x101d2e=_0x1363d9,_0x4af53d=_0x3fc9f1!==_0x101d2e(0x13c)&&_0x4f6af2?_0x4f6af2:_0x18cbd3['Fragment'];return _0x18cbd3[_0x101d2e(0x14e)](_0x4af53d,{'key':''+_0x66ac37},_0x4228f6);});return _0x537934;}function _0x5e74(){const _0x1388e9=['lang','4CfarOw','filter','151870UBVhBK','15864abVJUM',']:\x20Translation\x20for\x20key\x20\x27','_rules','slice','58550ZAhfRr','text','select','48XmTCUF','tag','1254xbOyHa','strong','Provider','log','code','push','getKey','includes','6614184pQoMDJ','map','supportedLocalesOf','processTags','plural','PluralRules','createElement','length','indexOf','pluralUtils','9263313yEeBiR','705051JZueIL','1466982ExiCKa','useContext','637MUVoWo','\x22\x20is\x20not\x20supported.','_one','keys','values'];_0x5e74=function(){return _0x1388e9;};return _0x5e74();}function formatMsg(_0x2a893d,_0x20b000,_0x3b72ee){const _0x5f5be6=sprintf(_0x2a893d,..._0x20b000!==null&&_0x20b000!==void 0x0?_0x20b000:[]);if(!_0x3b72ee)return _0x5f5be6;return formatMsgWithTags(_0x5f5be6);}function _0x4637(_0x30f184,_0x38fe8f){const _0x5e7440=_0x5e74();return _0x4637=function(_0x4637b8,_0xa7b65c){_0x4637b8=_0x4637b8-0x12a;let _0x447c08=_0x5e7440[_0x4637b8];return _0x447c08;},_0x4637(_0x30f184,_0x38fe8f);}const useTranslation=()=>{const _0x574ecd=_0x46e69f,{lang:_0x1dd370,debug:_0x2f9b31,pluralUtils:_0x26bf83,resources:_0x251e4c}=_0x18cbd3[_0x574ecd(0x12d)](I18nContext);function _0x387276(_0x3ad048,_0x5224d6){const _0x29ac1e=_0x574ecd,{found:_0x376bad,msg:_0x1f91e0}=getMsg(_0x3ad048,_0x251e4c[_0x1dd370],{'plural':_0x5224d6===null||_0x5224d6===void 0x0?void 0x0:_0x5224d6['plural'],'pluralUtils':_0x26bf83});_0x2f9b31&&!_0x376bad&&console[_0x29ac1e(0x143)]('['+_0x1dd370+_0x29ac1e(0x138)+_0x3ad048+'\x27\x20is\x20missing.');if(_0x5224d6===null||_0x5224d6===void 0x0?void 0x0:_0x5224d6[_0x29ac1e(0x14b)])return formatMsg(_0x1f91e0,_0x5224d6===null||_0x5224d6===void 0x0?void 0x0:_0x5224d6[_0x29ac1e(0x132)],!![]);return formatMsg(_0x1f91e0,_0x5224d6===null||_0x5224d6===void 0x0?void 0x0:_0x5224d6[_0x29ac1e(0x132)],![]);}return{'t':_0x387276,'lang':_0x1dd370};};export{I18nContext,I18nProvider,useTranslation};
|
package/package.json
CHANGED