@ckbox/i18n 2.9.0-rc.0 → 2.9.0-rc.1
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.1/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.1/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.1/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.1/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 _0x517e53=_0x32d7;function _0x2dcb(){const _0x475abe=['strong','pluralUtils','length','10zTgEic','\x27\x20is\x20missing.','isSupported','_rules','PluralRules','filter','text','slice','charAt','39LdFtRZ','Fragment','tag','plural','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','includes','select','2017614UBZjNe','8461863lLmKdr','1482665dnfazz','94624ixwPQG','lang','createContext','exec','createElement','warn','getKey','push','452344UPqgXW','1WoorMF','map','code','54776hRmUoo','_one','1052982dlHesU','\x22\x20is\x20not\x20supported.','log','useEffect'];_0x2dcb=function(){return _0x475abe;};return _0x2dcb();}(function(_0x58abfd,_0x1b5873){const _0x562492=_0x32d7,_0x3be8f5=_0x58abfd();while(!![]){try{const _0x56b18c=parseInt(_0x562492(0x19d))/0x1*(-parseInt(_0x562492(0x194))/0x2)+parseInt(_0x562492(0x18a))/0x3*(-parseInt(_0x562492(0x1a0))/0x4)+-parseInt(_0x562492(0x193))/0x5+-parseInt(_0x562492(0x191))/0x6+parseInt(_0x562492(0x17a))/0x7+-parseInt(_0x562492(0x19c))/0x8+-parseInt(_0x562492(0x192))/0x9*(-parseInt(_0x562492(0x181))/0xa);if(_0x56b18c===_0x1b5873)break;else _0x3be8f5['push'](_0x3be8f5['shift']());}catch(_0x51dc24){_0x3be8f5['push'](_0x3be8f5['shift']());}}}(_0x2dcb,0x2af52));function _0x32d7(_0x240735,_0xf5773f){const _0x2dcb69=_0x2dcb();return _0x32d7=function(_0x32d787,_0xf24c9b){_0x32d787=_0x32d787-0x179;let _0x44a155=_0x2dcb69[_0x32d787];return _0x44a155;},_0x32d7(_0x240735,_0xf5773f);}import*as _0x23134e from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x595c9d){const _0x3ce782=_0x32d7;this[_0x3ce782(0x195)]=_0x595c9d;try{this['_rules']=new Intl[(_0x3ce782(0x185))](_0x595c9d);}catch(_0x111f4c){console['warn'](_0x3ce782(0x18e));}}[_0x517e53(0x19a)](_0x1489c9,_0x4174bd){const _0xeab506=_0x517e53;if(!this[_0xeab506(0x184)])return _0x1489c9+_0xeab506(0x179);const _0x46b5e5=this[_0xeab506(0x184)][_0xeab506(0x190)](_0x4174bd);return _0x1489c9+'_'+_0x46b5e5;}}Plural[_0x517e53(0x183)]=_0x15c793=>{const _0x543074=_0x517e53;try{return Intl[_0x543074(0x185)]['supportedLocalesOf']([_0x15c793])['length']>0x0;}catch(_0x1981f6){return![];}};const I18nContext=_0x23134e[_0x517e53(0x196)]({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x3dff54,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x578b8a=_0x517e53;return _0x23134e[_0x578b8a(0x17d)](()=>{const _0x1e2744=_0x578b8a,_0x2b20fe=Plural['isSupported'](lang);!_0x2b20fe&&console[_0x1e2744(0x199)]('Plural\x20form\x20for\x20language\x20\x22'+lang+_0x1e2744(0x17b));},[lang]),_0x23134e[_0x578b8a(0x198)](I18nContext['Provider'],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x3dff54);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x517e53(0x17e),_0x517e53(0x19f)],getMsg=(_0x534328,_0xc57f5e={},_0x15e198)=>{const _0x18843f=_0x517e53,_0x5b70a2=_0x15e198['plural'];if(_0xc57f5e[_0x534328]&&_0x5b70a2===undefined)return{'found':!![],'msg':_0xc57f5e[_0x534328]};const _0x151771=Object['keys'](_0xc57f5e)[_0x18843f(0x186)](_0x397849=>_0x397849['indexOf'](_0x534328)===0x0);if(_0x151771[_0x18843f(0x180)]===0x0||_0x5b70a2===undefined)return{'found':![],'msg':_0x534328};const _0x5be878=_0x15e198[_0x18843f(0x17f)]['getKey'](_0x534328,_0x5b70a2);return{'found':!![],'msg':_0xc57f5e[_0x5be878]};},parseMsgTags=_0x34f5c3=>{const _0xac2416=_0x517e53,_0x673ea1=[];let _0x4d1a92=0x0,_0x5ef956;while((_0x5ef956=TAG_REGEX[_0xac2416(0x197)](_0x34f5c3))!==null){const _0x415e36=_0x5ef956[0x0],{index:_0x1f321c}=_0x5ef956,_0x6c0922=_0x415e36[_0xac2416(0x189)](0x1)==='/',_0x65ba75=_0x6c0922?_0x415e36[_0xac2416(0x188)](0x2,-0x1):_0x415e36['slice'](0x1,-0x1),_0x168a94=ALLOWED_TAGS[_0xac2416(0x18f)](_0x65ba75);if(!_0x168a94)continue;const _0x4ecf48=_0x34f5c3[_0xac2416(0x188)](_0x4d1a92,_0x1f321c);if(!_0x4ecf48){_0x4d1a92=_0x1f321c+_0x415e36['length'];continue;}_0x6c0922?_0x673ea1[_0xac2416(0x19b)]({'type':_0xac2416(0x18c),'name':_0x415e36[_0xac2416(0x188)](0x2,-0x1),'content':_0x4ecf48}):_0x673ea1[_0xac2416(0x19b)]({'type':_0xac2416(0x187),'content':_0x4ecf48}),_0x4d1a92=_0x1f321c+_0x415e36['length'];}return _0x4d1a92<_0x34f5c3[_0xac2416(0x180)]&&_0x673ea1[_0xac2416(0x19b)]({'type':_0xac2416(0x187),'content':_0x34f5c3[_0xac2416(0x188)](_0x4d1a92)}),_0x673ea1;};function formatMsgWithTags(_0x466338){const _0x5a5ed6=_0x517e53,_0x4bdb30=parseMsgTags(_0x466338),_0x5ed1c5=_0x4bdb30[_0x5a5ed6(0x19e)](({content:_0x1c769c,type:_0x32c1e1,name:_0x5cb6b9},_0x1e5062)=>{const _0xb24aac=_0x5a5ed6,_0x59a680=_0x32c1e1!==_0xb24aac(0x187)&&_0x5cb6b9?_0x5cb6b9:_0x23134e[_0xb24aac(0x18b)];return _0x23134e[_0xb24aac(0x198)](_0x59a680,{'key':''+_0x1e5062},_0x1c769c);});return _0x5ed1c5;}function formatMsg(_0x2f496c,_0x18958c,_0x3f30e4){const _0x15ed23=sprintf(_0x2f496c,..._0x18958c!==null&&_0x18958c!==void 0x0?_0x18958c:[]);if(!_0x3f30e4)return _0x15ed23;return formatMsgWithTags(_0x15ed23);}const useTranslation=()=>{const {lang:_0x39977b,debug:_0x21fafb,pluralUtils:_0x525ccf,resources:_0x443f03}=_0x23134e['useContext'](I18nContext);function _0x1aad72(_0x2d9df0,_0x57da04){const _0x1d57df=_0x32d7,{found:_0x3c79cb,msg:_0x2cb8b9}=getMsg(_0x2d9df0,_0x443f03[_0x39977b],{'plural':_0x57da04===null||_0x57da04===void 0x0?void 0x0:_0x57da04[_0x1d57df(0x18d)],'pluralUtils':_0x525ccf});_0x21fafb&&!_0x3c79cb&&console[_0x1d57df(0x17c)]('['+_0x39977b+']:\x20Translation\x20for\x20key\x20\x27'+_0x2d9df0+_0x1d57df(0x182));if(_0x57da04===null||_0x57da04===void 0x0?void 0x0:_0x57da04['processTags'])return formatMsg(_0x2cb8b9,_0x57da04===null||_0x57da04===void 0x0?void 0x0:_0x57da04['values'],!![]);return formatMsg(_0x2cb8b9,_0x57da04===null||_0x57da04===void 0x0?void 0x0:_0x57da04['values'],![]);}return{'t':_0x1aad72,'lang':_0x39977b};};export{I18nContext,I18nProvider,useTranslation};
|