@ckbox/i18n 2.12.0-rc.0 → 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.0/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.0/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.0/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.0/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>
@@ -92,7 +92,8 @@ The code snippet below presents the simplest scenario for integration of CKEdito
92
92
  } from 'ckeditor5';
93
93
 
94
94
  ClassicEditor
95
- .create( document.querySelector( '#editor' ), {
95
+ .create( {
96
+ attachTo: document.querySelector( '#editor' ),
96
97
  plugins: [
97
98
  CKBox, CloudServices, Essentials, Bold, Italic, Font, Paragraph, LinkEditing,
98
99
  PictureEditing, Image, ImageUploadEditing, ImageUploadProgress, BlockQuote,
@@ -131,7 +132,7 @@ You will find ready to use code snippets and live examples there.
131
132
 
132
133
  **CKBox** (https://ckeditor.com/ckbox/)
133
134
 
134
- Copyright (c) 2003-2024, [CKSource Holding sp. z o.o.](https://cksource.com/) All rights reserved.
135
+ Copyright (c) 2021-2026, [CKSource Holding sp. z o.o.](https://cksource.com/) All rights reserved.
135
136
  **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).
136
137
 
137
138
  Trademarks
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
- const _0x177e8b=_0x51a2;(function(_0x42e217,_0x4c7f39){const _0x1301f5=_0x51a2,_0x1c7134=_0x42e217();while(!![]){try{const _0xdc2bb2=parseInt(_0x1301f5(0x1ce))/0x1+-parseInt(_0x1301f5(0x1bc))/0x2+-parseInt(_0x1301f5(0x1be))/0x3*(parseInt(_0x1301f5(0x1bd))/0x4)+-parseInt(_0x1301f5(0x1de))/0x5+-parseInt(_0x1301f5(0x1d9))/0x6*(parseInt(_0x1301f5(0x1e0))/0x7)+-parseInt(_0x1301f5(0x1cd))/0x8*(parseInt(_0x1301f5(0x1c1))/0x9)+parseInt(_0x1301f5(0x1bf))/0xa*(parseInt(_0x1301f5(0x1d1))/0xb);if(_0xdc2bb2===_0x4c7f39)break;else _0x1c7134['push'](_0x1c7134['shift']());}catch(_0x305781){_0x1c7134['push'](_0x1c7134['shift']());}}}(_0x1cc2,0xf19b4));import*as _0x2229a6 from'react';function _0x1cc2(){const _0x504f55=['7380340pXXnlU','PluralRules','1316gCyOPh','createElement','Plural\x20form\x20for\x20language\x20\x22','processTags','getKey','createContext','2206704VClJND','10232dgLjOc','612GYBfTO','7880VQOaUu','_rules','2371617ztvOVl','indexOf','charAt','length','supportedLocalesOf','isSupported','_one','push','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','text','values','\x27\x20is\x20missing.','48FGEybl','1229478arwENc',']:\x20Translation\x20for\x20key\x20\x27','useContext','80432XcWilV','tag','Provider','keys','select','filter','log','plural','42108lDAaKT','slice','lang','useEffect','warn'];_0x1cc2=function(){return _0x504f55;};return _0x1cc2();}import{sprintf}from'sprintf-js';class Plural{constructor(_0x58eb81){const _0x3dfc27=_0x51a2;this[_0x3dfc27(0x1db)]=_0x58eb81;try{this['_rules']=new Intl[(_0x3dfc27(0x1df))](_0x58eb81);}catch(_0x4c185e){console[_0x3dfc27(0x1dd)](_0x3dfc27(0x1c9));}}[_0x177e8b(0x1ba)](_0x324e43,_0x90f176){const _0x3e936f=_0x177e8b;if(!this[_0x3e936f(0x1c0)])return _0x324e43+_0x3e936f(0x1c7);const _0x1e893=this[_0x3e936f(0x1c0)][_0x3e936f(0x1d5)](_0x90f176);return _0x324e43+'_'+_0x1e893;}}Plural['isSupported']=_0x37fde2=>{const _0x8141e8=_0x177e8b;try{return Intl[_0x8141e8(0x1df)][_0x8141e8(0x1c5)]([_0x37fde2])[_0x8141e8(0x1c4)]>0x0;}catch(_0x1cdd46){return![];}};const I18nContext=_0x2229a6[_0x177e8b(0x1bb)]({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0xae78ac,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x547c18=_0x177e8b;return _0x2229a6[_0x547c18(0x1dc)](()=>{const _0x509e90=_0x547c18,_0x12fe15=Plural[_0x509e90(0x1c6)](lang);!_0x12fe15&&console[_0x509e90(0x1dd)](_0x509e90(0x1e2)+lang+'\x22\x20is\x20not\x20supported.');},[lang]),_0x2229a6[_0x547c18(0x1e1)](I18nContext[_0x547c18(0x1d3)],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0xae78ac);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em','strong','code'],getMsg=(_0x26f315,_0x2abaad={},_0x32353c)=>{const _0x20dd07=_0x177e8b,_0x4392eb=_0x32353c[_0x20dd07(0x1d8)];if(_0x2abaad[_0x26f315]&&_0x4392eb===undefined)return{'found':!![],'msg':_0x2abaad[_0x26f315]};const _0x331494=Object[_0x20dd07(0x1d4)](_0x2abaad)[_0x20dd07(0x1d6)](_0xbf250d=>_0xbf250d[_0x20dd07(0x1c2)](_0x26f315)===0x0);if(_0x331494[_0x20dd07(0x1c4)]===0x0||_0x4392eb===undefined)return{'found':![],'msg':_0x26f315};const _0x1e30b7=_0x32353c['pluralUtils']['getKey'](_0x26f315,_0x4392eb);return{'found':!![],'msg':_0x2abaad[_0x1e30b7]};},parseMsgTags=_0x56a7f3=>{const _0x331ce9=_0x177e8b,_0x5b1141=[];let _0x3b82ec=0x0,_0x2efcde;while((_0x2efcde=TAG_REGEX['exec'](_0x56a7f3))!==null){const _0x19bb78=_0x2efcde[0x0],{index:_0x1789e5}=_0x2efcde,_0x29ef81=_0x19bb78[_0x331ce9(0x1c3)](0x1)==='/',_0x5cbd64=_0x29ef81?_0x19bb78['slice'](0x2,-0x1):_0x19bb78[_0x331ce9(0x1da)](0x1,-0x1),_0xf36513=ALLOWED_TAGS['includes'](_0x5cbd64);if(!_0xf36513)continue;const _0x3febdf=_0x56a7f3[_0x331ce9(0x1da)](_0x3b82ec,_0x1789e5);if(!_0x3febdf){_0x3b82ec=_0x1789e5+_0x19bb78[_0x331ce9(0x1c4)];continue;}_0x29ef81?_0x5b1141['push']({'type':_0x331ce9(0x1d2),'name':_0x19bb78[_0x331ce9(0x1da)](0x2,-0x1),'content':_0x3febdf}):_0x5b1141[_0x331ce9(0x1c8)]({'type':_0x331ce9(0x1ca),'content':_0x3febdf}),_0x3b82ec=_0x1789e5+_0x19bb78[_0x331ce9(0x1c4)];}return _0x3b82ec<_0x56a7f3[_0x331ce9(0x1c4)]&&_0x5b1141[_0x331ce9(0x1c8)]({'type':_0x331ce9(0x1ca),'content':_0x56a7f3['slice'](_0x3b82ec)}),_0x5b1141;};function formatMsgWithTags(_0x4f6ded){const _0x2e29e8=parseMsgTags(_0x4f6ded),_0x3163e9=_0x2e29e8['map'](({content:_0x14d1e4,type:_0x53a884,name:_0x40eccd},_0x2a6537)=>{const _0x4e6a40=_0x51a2,_0x256289=_0x53a884!==_0x4e6a40(0x1ca)&&_0x40eccd?_0x40eccd:_0x2229a6['Fragment'];return _0x2229a6[_0x4e6a40(0x1e1)](_0x256289,{'key':''+_0x2a6537},_0x14d1e4);});return _0x3163e9;}function _0x51a2(_0x2b156e,_0x337c58){_0x2b156e=_0x2b156e-0x1b9;const _0x1cc2b6=_0x1cc2();let _0x51a243=_0x1cc2b6[_0x2b156e];return _0x51a243;}function formatMsg(_0x3faa28,_0x4be57e,_0x48c38b){const _0x3c1eb8=sprintf(_0x3faa28,..._0x4be57e!==null&&_0x4be57e!==void 0x0?_0x4be57e:[]);if(!_0x48c38b)return _0x3c1eb8;return formatMsgWithTags(_0x3c1eb8);}const useTranslation=()=>{const _0x55bd0f=_0x177e8b,{lang:_0x13c782,debug:_0x414c03,pluralUtils:_0x2416ab,resources:_0x2fe15a}=_0x2229a6[_0x55bd0f(0x1d0)](I18nContext);function _0x57d27a(_0x2659fe,_0x285e1b){const _0x736099=_0x55bd0f,{found:_0x309826,msg:_0x59892f}=getMsg(_0x2659fe,_0x2fe15a[_0x13c782],{'plural':_0x285e1b===null||_0x285e1b===void 0x0?void 0x0:_0x285e1b[_0x736099(0x1d8)],'pluralUtils':_0x2416ab});_0x414c03&&!_0x309826&&console[_0x736099(0x1d7)]('['+_0x13c782+_0x736099(0x1cf)+_0x2659fe+_0x736099(0x1cc));if(_0x285e1b===null||_0x285e1b===void 0x0?void 0x0:_0x285e1b[_0x736099(0x1b9)])return formatMsg(_0x59892f,_0x285e1b===null||_0x285e1b===void 0x0?void 0x0:_0x285e1b[_0x736099(0x1cb)],!![]);return formatMsg(_0x59892f,_0x285e1b===null||_0x285e1b===void 0x0?void 0x0:_0x285e1b['values'],![]);}return{'t':_0x57d27a,'lang':_0x13c782};};export{I18nContext,I18nProvider,useTranslation};
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.0",
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",
@@ -30,9 +30,7 @@
30
30
  "react": "^19"
31
31
  },
32
32
  "dependencies": {
33
- "@vitest/coverage-v8": "^4.0.18",
34
33
  "sprintf-js": "^1.1.3",
35
- "tslib": "^2.8.1",
36
- "vitest": "^4.0.18"
34
+ "tslib": "^2.8.1"
37
35
  }
38
36
  }