ckbox 2.1.2 → 2.2.0-rc.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.
Files changed (46) hide show
  1. package/README.md +3 -3
  2. package/dist/ckbox.js +1 -1
  3. package/dist/index.d.ts +13 -3
  4. package/dist/index.js +1 -1
  5. package/dist/styles/ckbox.css +1 -3
  6. package/dist/translations/bg.js +1 -1
  7. package/dist/translations/bn.js +1 -1
  8. package/dist/translations/ca.js +1 -1
  9. package/dist/translations/cs.js +1 -1
  10. package/dist/translations/da.js +1 -1
  11. package/dist/translations/de.js +1 -1
  12. package/dist/translations/el.js +1 -1
  13. package/dist/translations/en.js +1 -1
  14. package/dist/translations/es-la.js +1 -1
  15. package/dist/translations/es-mx.js +1 -1
  16. package/dist/translations/es.js +1 -1
  17. package/dist/translations/et.js +1 -1
  18. package/dist/translations/fi.js +1 -1
  19. package/dist/translations/fr-ca.js +1 -1
  20. package/dist/translations/fr.js +1 -1
  21. package/dist/translations/hi.js +1 -1
  22. package/dist/translations/hu.js +1 -1
  23. package/dist/translations/id.js +1 -1
  24. package/dist/translations/it.js +1 -1
  25. package/dist/translations/ja.js +1 -1
  26. package/dist/translations/ko.js +1 -1
  27. package/dist/translations/lt.js +1 -1
  28. package/dist/translations/mr.js +1 -1
  29. package/dist/translations/ms.js +1 -1
  30. package/dist/translations/nl.js +1 -1
  31. package/dist/translations/no.js +1 -1
  32. package/dist/translations/pl.js +1 -1
  33. package/dist/translations/pt-br.js +1 -1
  34. package/dist/translations/pt.js +1 -1
  35. package/dist/translations/ro.js +1 -1
  36. package/dist/translations/ru.js +1 -1
  37. package/dist/translations/sk.js +1 -1
  38. package/dist/translations/sr.js +1 -1
  39. package/dist/translations/sv.js +1 -1
  40. package/dist/translations/th.js +1 -1
  41. package/dist/translations/tr.js +1 -1
  42. package/dist/translations/uk.js +1 -1
  43. package/dist/translations/vi.js +1 -1
  44. package/dist/translations/zh-tw.js +1 -1
  45. package/dist/translations/zh.js +1 -1
  46. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  */
4
- import { Asset as Asset$1, Props as Props$1 } from '@ckbox/core';
4
+ import { Asset as Asset$1, Props as Props$1, ImageEditorProps as ImageEditorProps$1 } from '@ckbox/core';
5
5
  export { version } from '@ckbox/core';
6
6
  import * as react from 'react';
7
7
  export { react as React };
@@ -14,9 +14,10 @@ type DialogProps = Omit<Exclude<CoreDialogProps, boolean>, 'open'>;
14
14
  type Props = Omit<Props$1, 'dialog'> & {
15
15
  dialog?: boolean | DialogProps;
16
16
  };
17
+ type ImageEditorProps = Omit<Exclude<ImageEditorProps$1, boolean>, 'open'>;
17
18
 
18
19
  /**
19
- * Creates an instance and mounts it at supplied node.
20
+ * Creates an instance of CKBox and mounts it at supplied node.
20
21
  *
21
22
  * @param root instance's root element
22
23
  * @param props instance's config options
@@ -24,5 +25,14 @@ type Props = Omit<Props$1, 'dialog'> & {
24
25
  declare const mount: (root: Element, props: Props) => {
25
26
  unmount: () => void;
26
27
  };
28
+ /**
29
+ * Creates an instance of CKBox's image editor and mounts it at supplied node.
30
+ *
31
+ * @param root instance's root element
32
+ * @param props instance's config options
33
+ */
34
+ declare const mountImageEditor: (root: Element, props: ImageEditorProps) => {
35
+ unmount: () => void;
36
+ };
27
37
 
28
- export { Asset, CoreAssetsConfigProps, CoreAssetsOnChooseProps, CoreDialogProps, DialogProps, Props, mount };
38
+ export { type Asset, type CoreAssetsConfigProps, type CoreAssetsOnChooseProps, type CoreDialogProps, type DialogProps, type ImageEditorProps, type Props, mount, mountImageEditor };
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 _0x22e05d=_0x22b5;function _0x22b5(_0x2c5eb8,_0x1e92c7){const _0x4eccd4=_0x4ecc();return _0x22b5=function(_0x22b5f3,_0x38f208){_0x22b5f3=_0x22b5f3-0x182;let _0x890ae=_0x4eccd4[_0x22b5f3];return _0x890ae;},_0x22b5(_0x2c5eb8,_0x1e92c7);}(function(_0x55a7a5,_0x1fd5c1){const _0x18fb99=_0x22b5,_0x46f5de=_0x55a7a5();while(!![]){try{const _0x405c6f=-parseInt(_0x18fb99(0x189))/0x1*(-parseInt(_0x18fb99(0x18e))/0x2)+parseInt(_0x18fb99(0x18d))/0x3*(-parseInt(_0x18fb99(0x185))/0x4)+parseInt(_0x18fb99(0x188))/0x5+parseInt(_0x18fb99(0x18c))/0x6*(-parseInt(_0x18fb99(0x182))/0x7)+parseInt(_0x18fb99(0x18f))/0x8*(parseInt(_0x18fb99(0x199))/0x9)+parseInt(_0x18fb99(0x198))/0xa*(-parseInt(_0x18fb99(0x18a))/0xb)+-parseInt(_0x18fb99(0x19b))/0xc*(-parseInt(_0x18fb99(0x191))/0xd);if(_0x405c6f===_0x1fd5c1)break;else _0x46f5de['push'](_0x46f5de['shift']());}catch(_0x5857d3){_0x46f5de['push'](_0x46f5de['shift']());}}}(_0x4ecc,0xa8726));import*as _0x4ce700 from'react';export{_0x4ce700 as React};import*as _0x207f88 from'react-dom/client';import{CKBox as _0x32ccb9,version}from'@ckbox/core';export{version}from'@ckbox/core';const getDialogProps=(_0x192c87,_0x316e5a)=>{const _0xe0f907=_0x22b5,_0x321fb0=_0x192c87[_0xe0f907(0x18b)];if(!_0x321fb0)return![];if(typeof _0x321fb0===_0xe0f907(0x19a)){const _0x4986ab=()=>{_0x316e5a();};return{'open':!![],'onClose':_0x4986ab};}const _0xae20f0=()=>{const _0x3d52b0=_0xe0f907;var _0xc7fd69;(_0xc7fd69=_0x321fb0['onClose'])===null||_0xc7fd69===void 0x0?void 0x0:_0xc7fd69[_0x3d52b0(0x193)](_0x321fb0),_0x316e5a();};return{..._0x321fb0,'open':!![],'onClose':_0xae20f0};},getAssetsProps=(_0x321b2e,_0x1821e5)=>{const _0x4c7f96=_0x22b5;var _0x39112a;const _0x5055b2=(_0x39112a=_0x321b2e['assets'])===null||_0x39112a===void 0x0?void 0x0:_0x39112a[_0x4c7f96(0x194)];if(!_0x5055b2)return _0x321b2e[_0x4c7f96(0x190)];const _0x6125a5=_0x21f60a=>{const _0x234742=_0x4c7f96;var _0x37a691;_0x5055b2(_0x21f60a),_0x1821e5&&typeof _0x1821e5!==_0x234742(0x19a)&&((_0x37a691=_0x1821e5[_0x234742(0x192)])===null||_0x37a691===void 0x0?void 0x0:_0x37a691[_0x234742(0x193)](_0x1821e5));};return{..._0x321b2e[_0x4c7f96(0x190)],'onChoose':_0x6125a5};},mount=(_0x569c42,_0x3fb97d)=>{const _0x3d578e=_0x22b5,_0xe308a7=_0x207f88[_0x3d578e(0x196)](_0x569c42),_0x540d0a=_0xe308a7[_0x3d578e(0x197)][_0x3d578e(0x186)](_0xe308a7),_0x4210eb=getDialogProps(_0x3fb97d,_0x540d0a),_0x4bb371=getAssetsProps(_0x3fb97d,_0x4210eb);return _0xe308a7[_0x3d578e(0x187)](_0x4ce700[_0x3d578e(0x195)](_0x32ccb9,{..._0x3fb97d,'assets':_0x4bb371,'dialog':_0x4210eb})),{'unmount':_0x540d0a};};var CKBox=Object[_0x22e05d(0x184)]({'__proto__':null,'React':_0x4ce700,'mount':mount,'version':version});(function(){const _0x3af580=_0x22e05d,_0x351d23=globalThis;!_0x351d23[_0x3af580(0x183)]&&(_0x351d23[_0x3af580(0x183)]=CKBox);}());function _0x4ecc(){const _0x5996c7=['536RFwpQb','assets','109551mNFaas','onClose','call','onChoose','createElement','createRoot','unmount','11513690ISQZZI','10485VjxPRO','boolean','1956vTOpds','2933KfGzWX','CKBox','freeze','144792DTaFYG','bind','render','355100VUzvvJ','95ZywJBB','11TZrSRJ','dialog','2100fDbgfP','9LDBJmf','12082ypMKzR'];_0x4ecc=function(){return _0x5996c7;};return _0x4ecc();}export{mount};
4
+ function _0x3334(){const _0x1c8a78=['10GpOBbh','boolean','1410740VPeclM','render','7pNikAv','36299BzpuwG','575382AEbvhM','bind','3172064wLQFTz','6021819AYsbuG','call','12680536wvFZRV','onClose','onChoose','12327DlQvSQ','156lMywMy','createElement','createRoot','freeze','2IRujJY','assets','unmount'];_0x3334=function(){return _0x1c8a78;};return _0x3334();}const _0x156c68=_0x29bf;(function(_0x53ff8a,_0x24108a){const _0x5b81d7=_0x29bf,_0x26847d=_0x53ff8a();while(!![]){try{const _0x4b984e=parseInt(_0x5b81d7(0x16f))/0x1*(-parseInt(_0x5b81d7(0x167))/0x2)+parseInt(_0x5b81d7(0x162))/0x3*(parseInt(_0x5b81d7(0x163))/0x4)+parseInt(_0x5b81d7(0x16c))/0x5+parseInt(_0x5b81d7(0x15a))/0x6*(-parseInt(_0x5b81d7(0x16e))/0x7)+-parseInt(_0x5b81d7(0x15c))/0x8+parseInt(_0x5b81d7(0x15d))/0x9*(-parseInt(_0x5b81d7(0x16a))/0xa)+parseInt(_0x5b81d7(0x15f))/0xb;if(_0x4b984e===_0x24108a)break;else _0x26847d['push'](_0x26847d['shift']());}catch(_0x587c6d){_0x26847d['push'](_0x26847d['shift']());}}}(_0x3334,0x61044));import*as _0x58b04a from'react';export{_0x58b04a as React};import*as _0xa92a5f from'react-dom/client';import{CKBox as _0x491cc5,CKBoxImageEditor,version}from'@ckbox/core';export{version}from'@ckbox/core';const getDialogProps=(_0x1bf588,_0x55476a)=>{const _0x3a157a=_0x29bf,_0x2aa33e=_0x1bf588['dialog'];if(!_0x2aa33e)return![];if(typeof _0x2aa33e===_0x3a157a(0x16b)){const _0x1854c4=()=>{_0x55476a();};return{'open':!![],'onClose':_0x1854c4};}const _0x4250a8=()=>{const _0x3313e3=_0x3a157a;var _0x16ec9c;(_0x16ec9c=_0x2aa33e[_0x3313e3(0x160)])===null||_0x16ec9c===void 0x0?void 0x0:_0x16ec9c[_0x3313e3(0x15e)](_0x2aa33e),_0x55476a();};return{..._0x2aa33e,'open':!![],'onClose':_0x4250a8};},getAssetsProps=(_0x5ce7d4,_0x3e04bc)=>{const _0x512d7f=_0x29bf;var _0x21c8a7;const _0x1e24c7=(_0x21c8a7=_0x5ce7d4['assets'])===null||_0x21c8a7===void 0x0?void 0x0:_0x21c8a7[_0x512d7f(0x161)];if(!_0x1e24c7)return _0x5ce7d4[_0x512d7f(0x168)];const _0x463e90=_0x2836a0=>{const _0x20060a=_0x512d7f;var _0x1fc974;_0x1e24c7(_0x2836a0),_0x3e04bc&&typeof _0x3e04bc!==_0x20060a(0x16b)&&((_0x1fc974=_0x3e04bc[_0x20060a(0x160)])===null||_0x1fc974===void 0x0?void 0x0:_0x1fc974[_0x20060a(0x15e)](_0x3e04bc));};return{..._0x5ce7d4[_0x512d7f(0x168)],'onChoose':_0x463e90};},mount=(_0x5f2569,_0x4f71fb)=>{const _0x2483d3=_0x29bf,_0x5a5369=_0xa92a5f[_0x2483d3(0x165)](_0x5f2569),_0x8d1901=_0x5a5369[_0x2483d3(0x169)][_0x2483d3(0x15b)](_0x5a5369),_0xcc7a99=getDialogProps(_0x4f71fb,_0x8d1901),_0xce0b58=getAssetsProps(_0x4f71fb,_0xcc7a99);return _0x5a5369['render'](_0x58b04a[_0x2483d3(0x164)](_0x491cc5,{..._0x4f71fb,'assets':_0xce0b58,'dialog':_0xcc7a99})),{'unmount':_0x8d1901};},mountImageEditor=(_0x1dd792,_0x39a308)=>{const _0x4ef159=_0x29bf,_0x147eaa=_0xa92a5f[_0x4ef159(0x165)](_0x1dd792),_0x94ec0=_0x147eaa['unmount'][_0x4ef159(0x15b)](_0x147eaa),_0x1f8f2d=()=>{const _0x2f51d0=_0x4ef159;var _0x234480;(_0x234480=_0x39a308[_0x2f51d0(0x160)])===null||_0x234480===void 0x0?void 0x0:_0x234480['call'](_0x39a308),_0x94ec0();};return _0x147eaa[_0x4ef159(0x16d)](_0x58b04a[_0x4ef159(0x164)](CKBoxImageEditor,{..._0x39a308,'open':!![],'onClose':_0x1f8f2d})),{'unmount':_0x94ec0};};function _0x29bf(_0x40f899,_0x39427b){const _0x333451=_0x3334();return _0x29bf=function(_0x29bfc0,_0x266f96){_0x29bfc0=_0x29bfc0-0x15a;let _0x11dfc3=_0x333451[_0x29bfc0];return _0x11dfc3;},_0x29bf(_0x40f899,_0x39427b);}var CKBox=Object[_0x156c68(0x166)]({'__proto__':null,'React':_0x58b04a,'mount':mount,'mountImageEditor':mountImageEditor,'version':version});(function(){const _0x254b93=globalThis;!_0x254b93['CKBox']&&(_0x254b93['CKBox']=CKBox);}());export{mount,mountImageEditor};