@ckbox/i18n 2.9.0-rc.1 → 2.9.0-rc.3
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.3/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.3/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.3/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.3/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 _0x361ba1=_0x5c14;(function(_0x1183af,_0x250684){const _0x3244d3=_0x5c14,_0x1d8fdd=_0x1183af();while(!![]){try{const _0x1994ec=-parseInt(_0x3244d3(0x200))/0x1+parseInt(_0x3244d3(0x1fd))/0x2*(-parseInt(_0x3244d3(0x203))/0x3)+parseInt(_0x3244d3(0x201))/0x4+parseInt(_0x3244d3(0x1ea))/0x5*(parseInt(_0x3244d3(0x1f8))/0x6)+-parseInt(_0x3244d3(0x1ee))/0x7*(parseInt(_0x3244d3(0x1ed))/0x8)+parseInt(_0x3244d3(0x209))/0x9+parseInt(_0x3244d3(0x20c))/0xa*(parseInt(_0x3244d3(0x207))/0xb);if(_0x1994ec===_0x250684)break;else _0x1d8fdd['push'](_0x1d8fdd['shift']());}catch(_0x208dd1){_0x1d8fdd['push'](_0x1d8fdd['shift']());}}}(_0x5f4f,0xb1ce2));import*as _0x37b213 from'react';import{sprintf}from'sprintf-js';function _0x5c14(_0x23962d,_0x4e37b3){const _0x5f4f39=_0x5f4f();return _0x5c14=function(_0x5c144d,_0x3f957d){_0x5c144d=_0x5c144d-0x1e5;let _0x217596=_0x5f4f39[_0x5c144d];return _0x217596;},_0x5c14(_0x23962d,_0x4e37b3);}class Plural{constructor(_0x511825){const _0x29ad68=_0x5c14;this[_0x29ad68(0x205)]=_0x511825;try{this['_rules']=new Intl['PluralRules'](_0x511825);}catch(_0x8165a3){console[_0x29ad68(0x1f3)](_0x29ad68(0x1f6));}}['getKey'](_0x199241,_0x42c838){const _0x313ce9=_0x5c14;if(!this[_0x313ce9(0x206)])return _0x199241+'_one';const _0x2010f1=this[_0x313ce9(0x206)][_0x313ce9(0x1fa)](_0x42c838);return _0x199241+'_'+_0x2010f1;}}Plural[_0x361ba1(0x1e5)]=_0x21722c=>{const _0x525236=_0x361ba1;try{return Intl[_0x525236(0x1f7)][_0x525236(0x202)]([_0x21722c])['length']>0x0;}catch(_0x2e6073){return![];}};function _0x5f4f(){const _0x18d25b=['6027340CcmFpx','charAt','8323119stNMgK',']:\x20Translation\x20for\x20key\x20\x27','values','20ggoLeG','strong','map','isSupported','\x27\x20is\x20missing.','push','Fragment','Provider','5OrpCkP','exec','indexOf','100328ZLIXXi','42dEVfnZ','getKey','plural','slice','\x22\x20is\x20not\x20supported.','warn','text','createElement','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','PluralRules','2183862cYJzUM','code','select','useContext','keys','1243468YbeExH','Plural\x20form\x20for\x20language\x20\x22','processTags','1086262KdyQfn','2994472bnshQK','supportedLocalesOf','6vkjrKG','length','lang','_rules'];_0x5f4f=function(){return _0x18d25b;};return _0x5f4f();}const I18nContext=_0x37b213['createContext']({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x16ace5,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x291130=_0x361ba1;return _0x37b213['useEffect'](()=>{const _0x5eeb6f=_0x5c14,_0x5a2308=Plural[_0x5eeb6f(0x1e5)](lang);!_0x5a2308&&console[_0x5eeb6f(0x1f3)](_0x5eeb6f(0x1fe)+lang+_0x5eeb6f(0x1f2));},[lang]),_0x37b213[_0x291130(0x1f5)](I18nContext[_0x291130(0x1e9)],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x16ace5);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x361ba1(0x20d),_0x361ba1(0x1f9)],getMsg=(_0x503e13,_0x137d67={},_0x4c83f2)=>{const _0x44d0f4=_0x361ba1,_0x196cc9=_0x4c83f2['plural'];if(_0x137d67[_0x503e13]&&_0x196cc9===undefined)return{'found':!![],'msg':_0x137d67[_0x503e13]};const _0x90f48=Object[_0x44d0f4(0x1fc)](_0x137d67)['filter'](_0x32b832=>_0x32b832[_0x44d0f4(0x1ec)](_0x503e13)===0x0);if(_0x90f48[_0x44d0f4(0x204)]===0x0||_0x196cc9===undefined)return{'found':![],'msg':_0x503e13};const _0xea66dd=_0x4c83f2['pluralUtils'][_0x44d0f4(0x1ef)](_0x503e13,_0x196cc9);return{'found':!![],'msg':_0x137d67[_0xea66dd]};},parseMsgTags=_0x4b398b=>{const _0x34bc98=_0x361ba1,_0x46862d=[];let _0x4af0a5=0x0,_0x305f7f;while((_0x305f7f=TAG_REGEX[_0x34bc98(0x1eb)](_0x4b398b))!==null){const _0x19c83d=_0x305f7f[0x0],{index:_0x2f8f9d}=_0x305f7f,_0x315c42=_0x19c83d[_0x34bc98(0x208)](0x1)==='/',_0x29f9ba=_0x315c42?_0x19c83d['slice'](0x2,-0x1):_0x19c83d[_0x34bc98(0x1f1)](0x1,-0x1),_0x4c655f=ALLOWED_TAGS['includes'](_0x29f9ba);if(!_0x4c655f)continue;const _0x4e144f=_0x4b398b[_0x34bc98(0x1f1)](_0x4af0a5,_0x2f8f9d);if(!_0x4e144f){_0x4af0a5=_0x2f8f9d+_0x19c83d[_0x34bc98(0x204)];continue;}_0x315c42?_0x46862d['push']({'type':'tag','name':_0x19c83d['slice'](0x2,-0x1),'content':_0x4e144f}):_0x46862d[_0x34bc98(0x1e7)]({'type':'text','content':_0x4e144f}),_0x4af0a5=_0x2f8f9d+_0x19c83d[_0x34bc98(0x204)];}return _0x4af0a5<_0x4b398b[_0x34bc98(0x204)]&&_0x46862d[_0x34bc98(0x1e7)]({'type':'text','content':_0x4b398b[_0x34bc98(0x1f1)](_0x4af0a5)}),_0x46862d;};function formatMsgWithTags(_0x4d9d24){const _0x3d4085=_0x361ba1,_0x2fdbe5=parseMsgTags(_0x4d9d24),_0x44bae3=_0x2fdbe5[_0x3d4085(0x20e)](({content:_0x31c32d,type:_0x272682,name:_0x262527},_0x54d5b0)=>{const _0xd15a24=_0x3d4085,_0x396dbc=_0x272682!==_0xd15a24(0x1f4)&&_0x262527?_0x262527:_0x37b213[_0xd15a24(0x1e8)];return _0x37b213[_0xd15a24(0x1f5)](_0x396dbc,{'key':''+_0x54d5b0},_0x31c32d);});return _0x44bae3;}function formatMsg(_0x5368a3,_0x46441e,_0x1b5d80){const _0x323a43=sprintf(_0x5368a3,..._0x46441e!==null&&_0x46441e!==void 0x0?_0x46441e:[]);if(!_0x1b5d80)return _0x323a43;return formatMsgWithTags(_0x323a43);}const useTranslation=()=>{const _0x12e6d4=_0x361ba1,{lang:_0x3fe42b,debug:_0x31d06c,pluralUtils:_0x5f4ae1,resources:_0x649524}=_0x37b213[_0x12e6d4(0x1fb)](I18nContext);function _0x5bec98(_0x30221e,_0x584c09){const _0x251d6e=_0x12e6d4,{found:_0x41ad1c,msg:_0x3a9fd9}=getMsg(_0x30221e,_0x649524[_0x3fe42b],{'plural':_0x584c09===null||_0x584c09===void 0x0?void 0x0:_0x584c09[_0x251d6e(0x1f0)],'pluralUtils':_0x5f4ae1});_0x31d06c&&!_0x41ad1c&&console['log']('['+_0x3fe42b+_0x251d6e(0x20a)+_0x30221e+_0x251d6e(0x1e6));if(_0x584c09===null||_0x584c09===void 0x0?void 0x0:_0x584c09[_0x251d6e(0x1ff)])return formatMsg(_0x3a9fd9,_0x584c09===null||_0x584c09===void 0x0?void 0x0:_0x584c09[_0x251d6e(0x20b)],!![]);return formatMsg(_0x3a9fd9,_0x584c09===null||_0x584c09===void 0x0?void 0x0:_0x584c09[_0x251d6e(0x20b)],![]);}return{'t':_0x5bec98,'lang':_0x3fe42b};};export{I18nContext,I18nProvider,useTranslation};
|