@ckbox/i18n 2.9.0-dev.0 → 2.9.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/LICENSE.md +1 -1
- package/README.md +4 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
**CKBox** (https://ckeditor.com/ckbox/)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2003-
|
|
3
|
+
Copyright (c) 2003-2025, [CKSource Holding sp. z o.o.](https://cksource.com/) All rights reserved.
|
|
4
4
|
**CKBox** is licensed under a commercial license and is protected by copyright law. For more details about available licensing options please contact us at [sales@cksource.com](mailto:sales@cksource.com).
|
|
5
5
|
|
|
6
6
|
Trademarks
|
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-
|
|
16
|
+
<script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.0/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-
|
|
26
|
+
<script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.0/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-
|
|
51
|
+
<script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.0/ckbox.js"></script>
|
|
52
52
|
<link
|
|
53
53
|
rel="stylesheet"
|
|
54
|
-
href="https://cdn.ckbox.io/ckbox/2.9.0-
|
|
54
|
+
href="https://cdn.ckbox.io/ckbox/2.9.0-rc.0/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
|
+
const _0x1670b1=_0x444f;function _0x1e25(){const _0x824918=['_one','623357ZsEoKJ','log','\x27\x20is\x20missing.','filter','_rules','30PROBCJ','isSupported','values','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','supportedLocalesOf','select','useEffect','1SjlBTS','warn','35nGTQGA','PluralRules','plural','153848laWHqq','includes','1392RFBgzV','map','getKey','push','698236qHyVWv','914856ZvcpRu','63VcSVIN','length','tag','slice','createElement','strong','620068fpADbh','65lyMWom','charAt','lang','exec','processTags','Plural\x20form\x20for\x20language\x20\x22','595380IVUqHT','42OnXfDr',']:\x20Translation\x20for\x20key\x20\x27','keys','indexOf'];_0x1e25=function(){return _0x824918;};return _0x1e25();}(function(_0x10ecd4,_0x255591){const _0x317177=_0x444f,_0x34a56b=_0x10ecd4();while(!![]){try{const _0x3406a9=parseInt(_0x317177(0x16a))/0x1*(parseInt(_0x317177(0x151))/0x2)+parseInt(_0x317177(0x14a))/0x3+-parseInt(_0x317177(0x16f))/0x4*(-parseInt(_0x317177(0x16c))/0x5)+parseInt(_0x317177(0x159))/0x6*(-parseInt(_0x317177(0x15e))/0x7)+parseInt(_0x317177(0x171))/0x8*(parseInt(_0x317177(0x14b))/0x9)+parseInt(_0x317177(0x163))/0xa*(-parseInt(_0x317177(0x175))/0xb)+parseInt(_0x317177(0x158))/0xc*(parseInt(_0x317177(0x152))/0xd);if(_0x3406a9===_0x255591)break;else _0x34a56b['push'](_0x34a56b['shift']());}catch(_0x1a5466){_0x34a56b['push'](_0x34a56b['shift']());}}}(_0x1e25,0x4e0f0));import*as _0x29980a from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x19a62a){const _0x1f8658=_0x444f;this[_0x1f8658(0x154)]=_0x19a62a;try{this[_0x1f8658(0x162)]=new Intl[(_0x1f8658(0x16d))](_0x19a62a);}catch(_0x34beda){console[_0x1f8658(0x16b)](_0x1f8658(0x166));}}[_0x1670b1(0x173)](_0x588746,_0xdaf734){const _0x5d8627=_0x1670b1;if(!this[_0x5d8627(0x162)])return _0x588746+_0x5d8627(0x15d);const _0x47b7b8=this['_rules'][_0x5d8627(0x168)](_0xdaf734);return _0x588746+'_'+_0x47b7b8;}}Plural[_0x1670b1(0x164)]=_0x3a1acd=>{const _0x5d0e88=_0x1670b1;try{return Intl[_0x5d0e88(0x16d)][_0x5d0e88(0x167)]([_0x3a1acd])[_0x5d0e88(0x14c)]>0x0;}catch(_0x3e0db3){return![];}};const I18nContext=_0x29980a['createContext']({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x34eb36,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x2b8658=_0x1670b1;return _0x29980a[_0x2b8658(0x169)](()=>{const _0x510d5c=_0x2b8658,_0x2057a5=Plural['isSupported'](lang);!_0x2057a5&&console[_0x510d5c(0x16b)](_0x510d5c(0x157)+lang+'\x22\x20is\x20not\x20supported.');},[lang]),_0x29980a[_0x2b8658(0x14f)](I18nContext['Provider'],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x34eb36);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x1670b1(0x150),'code'],getMsg=(_0x44f799,_0x2c2ba0={},_0x1b722f)=>{const _0xa3adc3=_0x1670b1,_0x189368=_0x1b722f[_0xa3adc3(0x16e)];if(_0x2c2ba0[_0x44f799]&&_0x189368===undefined)return{'found':!![],'msg':_0x2c2ba0[_0x44f799]};const _0x6a7c8c=Object[_0xa3adc3(0x15b)](_0x2c2ba0)[_0xa3adc3(0x161)](_0x27e613=>_0x27e613[_0xa3adc3(0x15c)](_0x44f799)===0x0);if(_0x6a7c8c[_0xa3adc3(0x14c)]===0x0||_0x189368===undefined)return{'found':![],'msg':_0x44f799};const _0x4d62c0=_0x1b722f['pluralUtils'][_0xa3adc3(0x173)](_0x44f799,_0x189368);return{'found':!![],'msg':_0x2c2ba0[_0x4d62c0]};},parseMsgTags=_0xa88d04=>{const _0x523e16=_0x1670b1,_0x47596c=[];let _0x3724fd=0x0,_0x2fca07;while((_0x2fca07=TAG_REGEX[_0x523e16(0x155)](_0xa88d04))!==null){const _0x44325c=_0x2fca07[0x0],{index:_0x2c782d}=_0x2fca07,_0x4ef030=_0x44325c[_0x523e16(0x153)](0x1)==='/',_0x1f0160=_0x4ef030?_0x44325c[_0x523e16(0x14e)](0x2,-0x1):_0x44325c['slice'](0x1,-0x1),_0x44bef6=ALLOWED_TAGS[_0x523e16(0x170)](_0x1f0160);if(!_0x44bef6)continue;const _0x2a42c7=_0xa88d04[_0x523e16(0x14e)](_0x3724fd,_0x2c782d);if(!_0x2a42c7){_0x3724fd=_0x2c782d+_0x44325c[_0x523e16(0x14c)];continue;}_0x4ef030?_0x47596c[_0x523e16(0x174)]({'type':_0x523e16(0x14d),'name':_0x44325c[_0x523e16(0x14e)](0x2,-0x1),'content':_0x2a42c7}):_0x47596c['push']({'type':'text','content':_0x2a42c7}),_0x3724fd=_0x2c782d+_0x44325c[_0x523e16(0x14c)];}return _0x3724fd<_0xa88d04[_0x523e16(0x14c)]&&_0x47596c['push']({'type':'text','content':_0xa88d04[_0x523e16(0x14e)](_0x3724fd)}),_0x47596c;};function formatMsgWithTags(_0x467cc0){const _0x158d4b=_0x1670b1,_0x9a69c1=parseMsgTags(_0x467cc0),_0xbb973=_0x9a69c1[_0x158d4b(0x172)](({content:_0x424d51,type:_0x19730e,name:_0x527fcb},_0x4d6d17)=>{const _0x50b7ce=_0x19730e!=='text'&&_0x527fcb?_0x527fcb:_0x29980a['Fragment'];return _0x29980a['createElement'](_0x50b7ce,{'key':''+_0x4d6d17},_0x424d51);});return _0xbb973;}function formatMsg(_0x5a797f,_0x254eeb,_0x203e22){const _0x15bb6f=sprintf(_0x5a797f,..._0x254eeb!==null&&_0x254eeb!==void 0x0?_0x254eeb:[]);if(!_0x203e22)return _0x15bb6f;return formatMsgWithTags(_0x15bb6f);}const useTranslation=()=>{const {lang:_0x4f70e6,debug:_0x16cb18,pluralUtils:_0x5bacd2,resources:_0x59e235}=_0x29980a['useContext'](I18nContext);function _0x32d458(_0x3b95ff,_0x4d1aa6){const _0x547e8b=_0x444f,{found:_0x23eac7,msg:_0x2c2a37}=getMsg(_0x3b95ff,_0x59e235[_0x4f70e6],{'plural':_0x4d1aa6===null||_0x4d1aa6===void 0x0?void 0x0:_0x4d1aa6[_0x547e8b(0x16e)],'pluralUtils':_0x5bacd2});_0x16cb18&&!_0x23eac7&&console[_0x547e8b(0x15f)]('['+_0x4f70e6+_0x547e8b(0x15a)+_0x3b95ff+_0x547e8b(0x160));if(_0x4d1aa6===null||_0x4d1aa6===void 0x0?void 0x0:_0x4d1aa6[_0x547e8b(0x156)])return formatMsg(_0x2c2a37,_0x4d1aa6===null||_0x4d1aa6===void 0x0?void 0x0:_0x4d1aa6[_0x547e8b(0x165)],!![]);return formatMsg(_0x2c2a37,_0x4d1aa6===null||_0x4d1aa6===void 0x0?void 0x0:_0x4d1aa6[_0x547e8b(0x165)],![]);}return{'t':_0x32d458,'lang':_0x4f70e6};};function _0x444f(_0xc1dced,_0x211b6e){const _0x1e255f=_0x1e25();return _0x444f=function(_0x444f45,_0x2ebbdb){_0x444f45=_0x444f45-0x14a;let _0x5df6c6=_0x1e255f[_0x444f45];return _0x5df6c6;},_0x444f(_0xc1dced,_0x211b6e);}export{I18nContext,I18nProvider,useTranslation};
|
package/package.json
CHANGED