ckbox 2.1.1 → 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 _0x5dc0dc=_0xb2a0;function _0x3828(){const _0xdf0a5e=['2445085tiUTwM','72dQuYUK','onChoose','createRoot','createElement','onClose','88656QOShyW','1ycSLwA','4731885hOMDzy','935328hEPToO','unmount','freeze','boolean','assets','15055240ClDCQS','CKBox','dialog','call','97349Midthd','3298598poXJQg','bind','368uGfGUB'];_0x3828=function(){return _0xdf0a5e;};return _0x3828();}(function(_0x2e1f6a,_0x405da8){const _0x3379e7=_0xb2a0,_0x3df919=_0x2e1f6a();while(!![]){try{const _0x2ffea5=-parseInt(_0x3379e7(0x1ce))/0x1*(parseInt(_0x3379e7(0x1da))/0x2)+parseInt(_0x3379e7(0x1de))/0x3*(parseInt(_0x3379e7(0x1cd))/0x4)+parseInt(_0x3379e7(0x1dd))/0x5+parseInt(_0x3379e7(0x1d0))/0x6+-parseInt(_0x3379e7(0x1d9))/0x7*(parseInt(_0x3379e7(0x1dc))/0x8)+parseInt(_0x3379e7(0x1cf))/0x9+parseInt(_0x3379e7(0x1d5))/0xa;if(_0x2ffea5===_0x405da8)break;else _0x3df919['push'](_0x3df919['shift']());}catch(_0x2dcbd3){_0x3df919['push'](_0x3df919['shift']());}}}(_0x3828,0xe0645));import*as _0x167e30 from'react';export{_0x167e30 as React};import*as _0x3714dd from'react-dom/client';import{CKBox as _0x17b353,version}from'@ckbox/core';export{version}from'@ckbox/core';const getDialogProps=(_0x4647b9,_0x1cab7f)=>{const _0x2d61d3=_0xb2a0,_0x38ad31=_0x4647b9[_0x2d61d3(0x1d7)];if(!_0x38ad31)return![];if(typeof _0x38ad31===_0x2d61d3(0x1d3)){const _0x5227f7=()=>{_0x1cab7f();};return{'open':!![],'onClose':_0x5227f7};}const _0x4394f7=()=>{const _0x54000a=_0x2d61d3;var _0x42ac36;(_0x42ac36=_0x38ad31['onClose'])===null||_0x42ac36===void 0x0?void 0x0:_0x42ac36[_0x54000a(0x1d8)](_0x38ad31),_0x1cab7f();};return{..._0x38ad31,'open':!![],'onClose':_0x4394f7};},getAssetsProps=(_0x3c12e6,_0x6f3519)=>{const _0x5e01af=_0xb2a0;var _0x5bda5e;const _0x3b4274=(_0x5bda5e=_0x3c12e6[_0x5e01af(0x1d4)])===null||_0x5bda5e===void 0x0?void 0x0:_0x5bda5e[_0x5e01af(0x1df)];if(!_0x3b4274)return _0x3c12e6[_0x5e01af(0x1d4)];const _0x3e67e8=_0x2642e5=>{const _0x1fbb57=_0x5e01af;var _0x3c6a60;_0x3b4274(_0x2642e5),_0x6f3519&&typeof _0x6f3519!=='boolean'&&((_0x3c6a60=_0x6f3519[_0x1fbb57(0x1cc)])===null||_0x3c6a60===void 0x0?void 0x0:_0x3c6a60['call'](_0x6f3519));};return{..._0x3c12e6[_0x5e01af(0x1d4)],'onChoose':_0x3e67e8};},mount=(_0x12825f,_0xa00226)=>{const _0xab5fbe=_0xb2a0,_0x32b445=_0x3714dd[_0xab5fbe(0x1e0)](_0x12825f),_0xf9b7b2=_0x32b445[_0xab5fbe(0x1d1)][_0xab5fbe(0x1db)](_0x32b445),_0x231500=getDialogProps(_0xa00226,_0xf9b7b2),_0x2c1d6f=getAssetsProps(_0xa00226,_0x231500);return _0x32b445['render'](_0x167e30[_0xab5fbe(0x1cb)](_0x17b353,{..._0xa00226,'assets':_0x2c1d6f,'dialog':_0x231500})),{'unmount':_0xf9b7b2};};function _0xb2a0(_0x399842,_0x23baab){const _0x3828e0=_0x3828();return _0xb2a0=function(_0xb2a0c7,_0x1a87be){_0xb2a0c7=_0xb2a0c7-0x1cb;let _0x22c732=_0x3828e0[_0xb2a0c7];return _0x22c732;},_0xb2a0(_0x399842,_0x23baab);}var CKBox=Object[_0x5dc0dc(0x1d2)]({'__proto__':null,'React':_0x167e30,'mount':mount,'version':version});(function(){const _0x2e3373=_0x5dc0dc,_0x494695=globalThis;!_0x494695[_0x2e3373(0x1d6)]&&(_0x494695[_0x2e3373(0x1d6)]=CKBox);}());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};