@ckbox/i18n 2.12.0-rc.1 → 2.12.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 +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.12.0
|
|
16
|
+
<script src="https://cdn.ckbox.io/ckbox/2.12.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.12.0
|
|
26
|
+
<script src="https://cdn.ckbox.io/ckbox/2.12.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.12.0
|
|
51
|
+
<script src="https://cdn.ckbox.io/ckbox/2.12.0/ckbox.js"></script>
|
|
52
52
|
<link
|
|
53
53
|
rel="stylesheet"
|
|
54
|
-
href="https://cdn.ckbox.io/ckbox/2.12.0
|
|
54
|
+
href="https://cdn.ckbox.io/ckbox/2.12.0/styles/themes/lark.css"
|
|
55
55
|
/>
|
|
56
56
|
<link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5/47.6.1/ckeditor5.css" />
|
|
57
57
|
</head>
|
package/dist/index.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* @license Copyright (c) 2021-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
|
-
function
|
|
5
|
+
function _0x1e7f(){const _0x51b2a2=['useEffect','Plural\x20form\x20for\x20language\x20\x22','useContext','plural','\x22\x20is\x20not\x20supported.','4gdxcru','length','pluralUtils','indexOf','values','includes','warn','slice',']:\x20Translation\x20for\x20key\x20\x27','56034LppmAB','214UOAxWT','select','6qJoRiT','659448zBAbEB','createContext','createElement','610MbsKVe','\x27\x20is\x20missing.','PluralRules','strong','keys','code','2244625dRInGq','Fragment','isSupported','processTags','_one','4210415erpelV','1757YktXFQ','8QlsoPp','602609gRzwoe','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','push','text','log','tag','charAt','map','944211KYKkco','lang','getKey'];_0x1e7f=function(){return _0x51b2a2;};return _0x1e7f();}const _0x54fedd=_0x4a9c;(function(_0x249471,_0xb61efc){const _0x5efd45=_0x4a9c,_0x224bc5=_0x249471();while(!![]){try{const _0x1eff54=-parseInt(_0x5efd45(0x158))/0x1*(-parseInt(_0x5efd45(0x146))/0x2)+parseInt(_0x5efd45(0x162))/0x3*(-parseInt(_0x5efd45(0x13c))/0x4)+-parseInt(_0x5efd45(0x152))/0x5*(-parseInt(_0x5efd45(0x148))/0x6)+-parseInt(_0x5efd45(0x15a))/0x7*(parseInt(_0x5efd45(0x159))/0x8)+-parseInt(_0x5efd45(0x145))/0x9*(-parseInt(_0x5efd45(0x14c))/0xa)+-parseInt(_0x5efd45(0x157))/0xb+parseInt(_0x5efd45(0x149))/0xc;if(_0x1eff54===_0xb61efc)break;else _0x224bc5['push'](_0x224bc5['shift']());}catch(_0x288935){_0x224bc5['push'](_0x224bc5['shift']());}}}(_0x1e7f,0x4654b));function _0x4a9c(_0x55c611,_0xc613e2){_0x55c611=_0x55c611-0x135;const _0x1e7f47=_0x1e7f();let _0x4a9c34=_0x1e7f47[_0x55c611];return _0x4a9c34;}import*as _0x37f7fd from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x33c915){const _0x4ad132=_0x4a9c;this[_0x4ad132(0x135)]=_0x33c915;try{this['_rules']=new Intl['PluralRules'](_0x33c915);}catch(_0x571f7d){console[_0x4ad132(0x142)](_0x4ad132(0x15b));}}[_0x54fedd(0x136)](_0x955627,_0x39f1a6){const _0x485a88=_0x54fedd;if(!this['_rules'])return _0x955627+_0x485a88(0x156);const _0x2b6fc6=this['_rules'][_0x485a88(0x147)](_0x39f1a6);return _0x955627+'_'+_0x2b6fc6;}}Plural[_0x54fedd(0x154)]=_0x240714=>{const _0x21ae5e=_0x54fedd;try{return Intl[_0x21ae5e(0x14e)]['supportedLocalesOf']([_0x240714])[_0x21ae5e(0x13d)]>0x0;}catch(_0x25bf3a){return![];}};const I18nContext=_0x37f7fd[_0x54fedd(0x14a)]({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x3ae86e,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x4bd891=_0x54fedd;return _0x37f7fd[_0x4bd891(0x137)](()=>{const _0x568dd4=_0x4bd891,_0x2c93ee=Plural[_0x568dd4(0x154)](lang);!_0x2c93ee&&console[_0x568dd4(0x142)](_0x568dd4(0x138)+lang+_0x568dd4(0x13b));},[lang]),_0x37f7fd[_0x4bd891(0x14b)](I18nContext['Provider'],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x3ae86e);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x54fedd(0x14f),_0x54fedd(0x151)],getMsg=(_0xca3b,_0x457f4e={},_0x512b91)=>{const _0x24592f=_0x54fedd,_0x5a111b=_0x512b91[_0x24592f(0x13a)];if(_0x457f4e[_0xca3b]&&_0x5a111b===undefined)return{'found':!![],'msg':_0x457f4e[_0xca3b]};const _0x4b32f6=Object[_0x24592f(0x150)](_0x457f4e)['filter'](_0x15e42d=>_0x15e42d[_0x24592f(0x13f)](_0xca3b)===0x0);if(_0x4b32f6[_0x24592f(0x13d)]===0x0||_0x5a111b===undefined)return{'found':![],'msg':_0xca3b};const _0x306455=_0x512b91[_0x24592f(0x13e)][_0x24592f(0x136)](_0xca3b,_0x5a111b);return{'found':!![],'msg':_0x457f4e[_0x306455]};},parseMsgTags=_0x17a68c=>{const _0x6255e7=_0x54fedd,_0x5abdcb=[];let _0x174828=0x0,_0x2e7718;while((_0x2e7718=TAG_REGEX['exec'](_0x17a68c))!==null){const _0x153ea4=_0x2e7718[0x0],{index:_0x4f0733}=_0x2e7718,_0x3ef4b8=_0x153ea4[_0x6255e7(0x160)](0x1)==='/',_0x3330b4=_0x3ef4b8?_0x153ea4[_0x6255e7(0x143)](0x2,-0x1):_0x153ea4['slice'](0x1,-0x1),_0x1562d8=ALLOWED_TAGS[_0x6255e7(0x141)](_0x3330b4);if(!_0x1562d8)continue;const _0x470966=_0x17a68c[_0x6255e7(0x143)](_0x174828,_0x4f0733);if(!_0x470966){_0x174828=_0x4f0733+_0x153ea4['length'];continue;}_0x3ef4b8?_0x5abdcb[_0x6255e7(0x15c)]({'type':_0x6255e7(0x15f),'name':_0x153ea4['slice'](0x2,-0x1),'content':_0x470966}):_0x5abdcb[_0x6255e7(0x15c)]({'type':_0x6255e7(0x15d),'content':_0x470966}),_0x174828=_0x4f0733+_0x153ea4[_0x6255e7(0x13d)];}return _0x174828<_0x17a68c['length']&&_0x5abdcb[_0x6255e7(0x15c)]({'type':'text','content':_0x17a68c[_0x6255e7(0x143)](_0x174828)}),_0x5abdcb;};function formatMsgWithTags(_0x4d9375){const _0x30346b=_0x54fedd,_0x3c7825=parseMsgTags(_0x4d9375),_0x3ccafe=_0x3c7825[_0x30346b(0x161)](({content:_0x1bde84,type:_0x5e0e53,name:_0x17ac08},_0x4b693f)=>{const _0x425336=_0x30346b,_0x5c9946=_0x5e0e53!==_0x425336(0x15d)&&_0x17ac08?_0x17ac08:_0x37f7fd[_0x425336(0x153)];return _0x37f7fd['createElement'](_0x5c9946,{'key':''+_0x4b693f},_0x1bde84);});return _0x3ccafe;}function formatMsg(_0x5a31eb,_0x2f818f,_0x2bcd3c){const _0x15156a=sprintf(_0x5a31eb,..._0x2f818f??[]);if(!_0x2bcd3c)return _0x15156a;return formatMsgWithTags(_0x15156a);}const useTranslation=()=>{const _0x363a59=_0x54fedd,{lang:_0x46298a,debug:_0xfe996f,pluralUtils:_0x13d459,resources:_0x4de739}=_0x37f7fd[_0x363a59(0x139)](I18nContext);function _0x138c3c(_0x3697a2,_0xd4b0e5){const _0x4ca499=_0x363a59,{found:_0x3b8cb0,msg:_0x2572b9}=getMsg(_0x3697a2,_0x4de739[_0x46298a],{'plural':_0xd4b0e5?.['plural'],'pluralUtils':_0x13d459});_0xfe996f&&!_0x3b8cb0&&console[_0x4ca499(0x15e)]('['+_0x46298a+_0x4ca499(0x144)+_0x3697a2+_0x4ca499(0x14d));if(_0xd4b0e5?.[_0x4ca499(0x155)])return formatMsg(_0x2572b9,_0xd4b0e5?.[_0x4ca499(0x140)],!![]);return formatMsg(_0x2572b9,_0xd4b0e5?.[_0x4ca499(0x140)],![]);}return{'t':_0x138c3c,'lang':_0x46298a};};export{I18nContext,I18nProvider,useTranslation};
|