@ckbox/i18n 2.12.0-rc.1 → 2.12.0-rc.2

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 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-rc.1/ckbox.js"></script>
16
+ <script src="https://cdn.ckbox.io/ckbox/2.12.0-rc.2/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-rc.1/ckbox.js"></script>
26
+ <script src="https://cdn.ckbox.io/ckbox/2.12.0-rc.2/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-rc.1/ckbox.js"></script>
51
+ <script src="https://cdn.ckbox.io/ckbox/2.12.0-rc.2/ckbox.js"></script>
52
52
  <link
53
53
  rel="stylesheet"
54
- href="https://cdn.ckbox.io/ckbox/2.12.0-rc.1/styles/themes/lark.css"
54
+ href="https://cdn.ckbox.io/ckbox/2.12.0-rc.2/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 _0x2b0d(_0x1a997c,_0x2cf679){_0x1a997c=_0x1a997c-0xa4;const _0x42e7eb=_0x42e7();let _0x2b0d8c=_0x42e7eb[_0x1a997c];return _0x2b0d8c;}const _0x1ab863=_0x2b0d;(function(_0x15f09d,_0x35c920){const _0x5b4f87=_0x2b0d,_0x508fa8=_0x15f09d();while(!![]){try{const _0x623589=parseInt(_0x5b4f87(0xbe))/0x1*(parseInt(_0x5b4f87(0xb2))/0x2)+parseInt(_0x5b4f87(0xad))/0x3+-parseInt(_0x5b4f87(0xb5))/0x4*(-parseInt(_0x5b4f87(0xbc))/0x5)+parseInt(_0x5b4f87(0xac))/0x6+parseInt(_0x5b4f87(0xce))/0x7*(-parseInt(_0x5b4f87(0xc9))/0x8)+-parseInt(_0x5b4f87(0xa9))/0x9*(parseInt(_0x5b4f87(0xc4))/0xa)+parseInt(_0x5b4f87(0xb6))/0xb*(-parseInt(_0x5b4f87(0xbf))/0xc);if(_0x623589===_0x35c920)break;else _0x508fa8['push'](_0x508fa8['shift']());}catch(_0x1ee62b){_0x508fa8['push'](_0x508fa8['shift']());}}}(_0x42e7,0x3d64a));import*as _0x2b2db6 from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x7b8974){const _0x141c94=_0x2b0d;this['lang']=_0x7b8974;try{this[_0x141c94(0xcc)]=new Intl[(_0x141c94(0xb4))](_0x7b8974);}catch(_0x2c1a8f){console[_0x141c94(0xb8)](_0x141c94(0xd0));}}[_0x1ab863(0xae)](_0x227d42,_0x868b29){const _0x492baf=_0x1ab863;if(!this[_0x492baf(0xcc)])return _0x227d42+_0x492baf(0xb0);const _0x2dcb67=this[_0x492baf(0xcc)][_0x492baf(0xcf)](_0x868b29);return _0x227d42+'_'+_0x2dcb67;}}Plural[_0x1ab863(0xcb)]=_0x43cf1e=>{try{return Intl['PluralRules']['supportedLocalesOf']([_0x43cf1e])['length']>0x0;}catch(_0x25bd68){return![];}};const I18nContext=_0x2b2db6[_0x1ab863(0xbd)]({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x74d1d2,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x1612c0=_0x1ab863;return _0x2b2db6['useEffect'](()=>{const _0x1b5ee3=_0x2b0d,_0xb3cf34=Plural[_0x1b5ee3(0xcb)](lang);!_0xb3cf34&&console[_0x1b5ee3(0xb8)](_0x1b5ee3(0xba)+lang+_0x1b5ee3(0xc3));},[lang]),_0x2b2db6[_0x1612c0(0xc0)](I18nContext[_0x1612c0(0xc5)],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x74d1d2);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x1ab863(0xc1),_0x1ab863(0xaf)],getMsg=(_0x3255e3,_0x563d99={},_0x10ec4f)=>{const _0x4d3f1d=_0x1ab863,_0x12a08e=_0x10ec4f[_0x4d3f1d(0xab)];if(_0x563d99[_0x3255e3]&&_0x12a08e===undefined)return{'found':!![],'msg':_0x563d99[_0x3255e3]};const _0x492797=Object[_0x4d3f1d(0xcd)](_0x563d99)[_0x4d3f1d(0xa5)](_0x93d7d9=>_0x93d7d9['indexOf'](_0x3255e3)===0x0);if(_0x492797[_0x4d3f1d(0xa6)]===0x0||_0x12a08e===undefined)return{'found':![],'msg':_0x3255e3};const _0xee35ac=_0x10ec4f[_0x4d3f1d(0xc7)][_0x4d3f1d(0xae)](_0x3255e3,_0x12a08e);return{'found':!![],'msg':_0x563d99[_0xee35ac]};},parseMsgTags=_0x57d93a=>{const _0x518199=_0x1ab863,_0x1bb529=[];let _0x15372d=0x0,_0x5961de;while((_0x5961de=TAG_REGEX[_0x518199(0xa4)](_0x57d93a))!==null){const _0x78962a=_0x5961de[0x0],{index:_0x155243}=_0x5961de,_0x282022=_0x78962a[_0x518199(0xbb)](0x1)==='/',_0x1b85ac=_0x282022?_0x78962a['slice'](0x2,-0x1):_0x78962a['slice'](0x1,-0x1),_0x4bb9bd=ALLOWED_TAGS[_0x518199(0xb3)](_0x1b85ac);if(!_0x4bb9bd)continue;const _0x241bea=_0x57d93a['slice'](_0x15372d,_0x155243);if(!_0x241bea){_0x15372d=_0x155243+_0x78962a['length'];continue;}_0x282022?_0x1bb529[_0x518199(0xc6)]({'type':_0x518199(0xca),'name':_0x78962a[_0x518199(0xa7)](0x2,-0x1),'content':_0x241bea}):_0x1bb529[_0x518199(0xc6)]({'type':_0x518199(0xb9),'content':_0x241bea}),_0x15372d=_0x155243+_0x78962a['length'];}return _0x15372d<_0x57d93a[_0x518199(0xa6)]&&_0x1bb529[_0x518199(0xc6)]({'type':_0x518199(0xb9),'content':_0x57d93a[_0x518199(0xa7)](_0x15372d)}),_0x1bb529;};function formatMsgWithTags(_0x421fb9){const _0x1e91b0=_0x1ab863,_0x2536f1=parseMsgTags(_0x421fb9),_0x1d7439=_0x2536f1[_0x1e91b0(0xa8)](({content:_0x294d2c,type:_0x2bf0f2,name:_0x4a6149},_0x4af27f)=>{const _0xe2a906=_0x1e91b0,_0x31cf9b=_0x2bf0f2!==_0xe2a906(0xb9)&&_0x4a6149?_0x4a6149:_0x2b2db6[_0xe2a906(0xc8)];return _0x2b2db6[_0xe2a906(0xc0)](_0x31cf9b,{'key':''+_0x4af27f},_0x294d2c);});return _0x1d7439;}function formatMsg(_0x34e4d2,_0x426526,_0x31aab3){const _0x130549=sprintf(_0x34e4d2,..._0x426526??[]);if(!_0x31aab3)return _0x130549;return formatMsgWithTags(_0x130549);}const useTranslation=()=>{const _0x4749c7=_0x1ab863,{lang:_0x1d9fd3,debug:_0x3b3fe3,pluralUtils:_0x242eb8,resources:_0x129888}=_0x2b2db6[_0x4749c7(0xaa)](I18nContext);function _0xc726e1(_0x16052c,_0x317f5e){const _0x5c30d1=_0x4749c7,{found:_0x1fa2ca,msg:_0x4e23dd}=getMsg(_0x16052c,_0x129888[_0x1d9fd3],{'plural':_0x317f5e?.[_0x5c30d1(0xab)],'pluralUtils':_0x242eb8});_0x3b3fe3&&!_0x1fa2ca&&console[_0x5c30d1(0xb1)]('['+_0x1d9fd3+']:\x20Translation\x20for\x20key\x20\x27'+_0x16052c+_0x5c30d1(0xc2));if(_0x317f5e?.['processTags'])return formatMsg(_0x4e23dd,_0x317f5e?.[_0x5c30d1(0xb7)],!![]);return formatMsg(_0x4e23dd,_0x317f5e?.[_0x5c30d1(0xb7)],![]);}return{'t':_0xc726e1,'lang':_0x1d9fd3};};export{I18nContext,I18nProvider,useTranslation};function _0x42e7(){const _0x25ad2c=['strong','\x27\x20is\x20missing.','\x22\x20is\x20not\x20supported.','1206080yqUATj','Provider','push','pluralUtils','Fragment','318984DOOfcw','tag','isSupported','_rules','keys','14Hnddiw','select','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','exec','filter','length','slice','map','36WtOMXK','useContext','plural','2463978xMNTuW','728469NFWQaT','getKey','code','_one','log','2qJnzkw','includes','PluralRules','1482316byonqT','134662NivhPA','values','warn','text','Plural\x20form\x20for\x20language\x20\x22','charAt','5JWXuAh','createContext','426163jYDWyN','624fBCGJI','createElement'];_0x42e7=function(){return _0x25ad2c;};return _0x42e7();}
5
+ const _0x1da54a=_0x8b17;function _0x8b17(_0x31d746,_0x1eb098){_0x31d746=_0x31d746-0xa9;const _0x31f608=_0x31f6();let _0x8b1728=_0x31f608[_0x31d746];return _0x8b1728;}(function(_0xc5a9cd,_0x2f8618){const _0x15a2a9=_0x8b17,_0x5acbbf=_0xc5a9cd();while(!![]){try{const _0x234446=parseInt(_0x15a2a9(0xb6))/0x1+parseInt(_0x15a2a9(0xb4))/0x2*(-parseInt(_0x15a2a9(0xc3))/0x3)+parseInt(_0x15a2a9(0xcf))/0x4*(-parseInt(_0x15a2a9(0xbe))/0x5)+parseInt(_0x15a2a9(0xc5))/0x6+parseInt(_0x15a2a9(0xb1))/0x7*(-parseInt(_0x15a2a9(0xcc))/0x8)+parseInt(_0x15a2a9(0xc0))/0x9+-parseInt(_0x15a2a9(0xab))/0xa;if(_0x234446===_0x2f8618)break;else _0x5acbbf['push'](_0x5acbbf['shift']());}catch(_0x12bdb0){_0x5acbbf['push'](_0x5acbbf['shift']());}}}(_0x31f6,0xb8f8a));import*as _0x276fed from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x5f4d16){const _0x4bda8d=_0x8b17;this[_0x4bda8d(0xc2)]=_0x5f4d16;try{this[_0x4bda8d(0xbd)]=new Intl[(_0x4bda8d(0xad))](_0x5f4d16);}catch(_0x3af4a4){console[_0x4bda8d(0xb3)](_0x4bda8d(0xa9));}}[_0x1da54a(0xcd)](_0x370753,_0x4c402a){const _0x2f591e=_0x1da54a;if(!this['_rules'])return _0x370753+'_one';const _0x35aa08=this[_0x2f591e(0xbd)][_0x2f591e(0xb2)](_0x4c402a);return _0x370753+'_'+_0x35aa08;}}Plural['isSupported']=_0x515917=>{const _0x17aa9e=_0x1da54a;try{return Intl[_0x17aa9e(0xad)][_0x17aa9e(0xce)]([_0x515917])[_0x17aa9e(0xc7)]>0x0;}catch(_0x20bad3){return![];}};const I18nContext=_0x276fed[_0x1da54a(0xbb)]({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0xfadf9e,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x129428=_0x1da54a;return _0x276fed[_0x129428(0xca)](()=>{const _0xc68f22=_0x129428,_0x4e17a7=Plural['isSupported'](lang);!_0x4e17a7&&console['warn'](_0xc68f22(0xb8)+lang+'\x22\x20is\x20not\x20supported.');},[lang]),_0x276fed[_0x129428(0xc8)](I18nContext['Provider'],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0xfadf9e);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em','strong','code'],getMsg=(_0x328fb7,_0x593dd3={},_0x4fb598)=>{const _0x212451=_0x1da54a,_0x2af8e5=_0x4fb598[_0x212451(0xd1)];if(_0x593dd3[_0x328fb7]&&_0x2af8e5===undefined)return{'found':!![],'msg':_0x593dd3[_0x328fb7]};const _0x30aeea=Object[_0x212451(0xaf)](_0x593dd3)[_0x212451(0xaa)](_0x3e05ce=>_0x3e05ce[_0x212451(0xc9)](_0x328fb7)===0x0);if(_0x30aeea['length']===0x0||_0x2af8e5===undefined)return{'found':![],'msg':_0x328fb7};const _0x375b30=_0x4fb598[_0x212451(0xc1)][_0x212451(0xcd)](_0x328fb7,_0x2af8e5);return{'found':!![],'msg':_0x593dd3[_0x375b30]};},parseMsgTags=_0x1bcc03=>{const _0x16fe42=_0x1da54a,_0x16691b=[];let _0x3def7e=0x0,_0x19fcfd;while((_0x19fcfd=TAG_REGEX['exec'](_0x1bcc03))!==null){const _0x11ec50=_0x19fcfd[0x0],{index:_0xe674bb}=_0x19fcfd,_0x515138=_0x11ec50[_0x16fe42(0xb0)](0x1)==='/',_0x474407=_0x515138?_0x11ec50['slice'](0x2,-0x1):_0x11ec50['slice'](0x1,-0x1),_0x3cd213=ALLOWED_TAGS[_0x16fe42(0xac)](_0x474407);if(!_0x3cd213)continue;const _0x21914b=_0x1bcc03[_0x16fe42(0xb7)](_0x3def7e,_0xe674bb);if(!_0x21914b){_0x3def7e=_0xe674bb+_0x11ec50['length'];continue;}_0x515138?_0x16691b[_0x16fe42(0xbc)]({'type':_0x16fe42(0xb9),'name':_0x11ec50[_0x16fe42(0xb7)](0x2,-0x1),'content':_0x21914b}):_0x16691b[_0x16fe42(0xbc)]({'type':'text','content':_0x21914b}),_0x3def7e=_0xe674bb+_0x11ec50['length'];}return _0x3def7e<_0x1bcc03[_0x16fe42(0xc7)]&&_0x16691b[_0x16fe42(0xbc)]({'type':_0x16fe42(0xae),'content':_0x1bcc03['slice'](_0x3def7e)}),_0x16691b;};function formatMsgWithTags(_0x29faee){const _0x55bd85=_0x1da54a,_0xda1390=parseMsgTags(_0x29faee),_0x1bdcde=_0xda1390[_0x55bd85(0xc6)](({content:_0xad9bba,type:_0x4a9da9,name:_0x37e7ff},_0x29c037)=>{const _0x1812d8=_0x55bd85,_0x2ac5bd=_0x4a9da9!==_0x1812d8(0xae)&&_0x37e7ff?_0x37e7ff:_0x276fed[_0x1812d8(0xbf)];return _0x276fed[_0x1812d8(0xc8)](_0x2ac5bd,{'key':''+_0x29c037},_0xad9bba);});return _0x1bdcde;}function formatMsg(_0x17cbfc,_0x1bb512,_0x3035d3){const _0x2d4c37=sprintf(_0x17cbfc,..._0x1bb512??[]);if(!_0x3035d3)return _0x2d4c37;return formatMsgWithTags(_0x2d4c37);}const useTranslation=()=>{const _0x3adb1a=_0x1da54a,{lang:_0x1d37a1,debug:_0x398b10,pluralUtils:_0x128fd9,resources:_0x55d6d2}=_0x276fed[_0x3adb1a(0xc4)](I18nContext);function _0x2eb98c(_0x4f2194,_0x48dd13){const _0x3a599d=_0x3adb1a,{found:_0x2d2352,msg:_0x37fa84}=getMsg(_0x4f2194,_0x55d6d2[_0x1d37a1],{'plural':_0x48dd13?.[_0x3a599d(0xd1)],'pluralUtils':_0x128fd9});_0x398b10&&!_0x2d2352&&console[_0x3a599d(0xba)]('['+_0x1d37a1+_0x3a599d(0xcb)+_0x4f2194+_0x3a599d(0xb5));if(_0x48dd13?.['processTags'])return formatMsg(_0x37fa84,_0x48dd13?.['values'],!![]);return formatMsg(_0x37fa84,_0x48dd13?.[_0x3a599d(0xd0)],![]);}return{'t':_0x2eb98c,'lang':_0x1d37a1};};function _0x31f6(){const _0x5b9685=['1465070hqvMHx','includes','PluralRules','text','keys','charAt','3234434JVVyMb','select','warn','30JOxREC','\x27\x20is\x20missing.','1186255SOxkyS','slice','Plural\x20form\x20for\x20language\x20\x22','tag','log','createContext','push','_rules','2442940nUofSm','Fragment','6962499zALOUN','pluralUtils','lang','184305sSeBac','useContext','7671120VyqNtN','map','length','createElement','indexOf','useEffect',']:\x20Translation\x20for\x20key\x20\x27','16ADMEgi','getKey','supportedLocalesOf','4ZEdqQp','values','plural','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','filter'];_0x31f6=function(){return _0x5b9685;};return _0x31f6();}export{I18nContext,I18nProvider,useTranslation};
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "license": "SEE LICENSE IN LICENSE.md",
24
24
  "name": "@ckbox/i18n",
25
- "version": "2.12.0-rc.1",
25
+ "version": "2.12.0-rc.2",
26
26
  "description": "I18n utils of CKBox",
27
27
  "main": "dist/index.js",
28
28
  "types": "dist/index.d.ts",