ckbox 2.2.0 → 2.3.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 +5 -4
  4. package/dist/index.js +1 -1
  5. package/dist/styles/ckbox.css +1 -1
  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 +2 -2
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, ImageEditorProps as ImageEditorProps$1 } from '@ckbox/core';
4
+ import { Asset as Asset$1, Props as Props$1, ImageEditorProps as ImageEditorProps$1, ImageEditorFromUrlProps as ImageEditorFromUrlProps$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,7 +14,8 @@ 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
+ type ImageEditorProps = Omit<ImageEditorProps$1, 'open'>;
18
+ type ImageEditorFromUrlProps = Omit<ImageEditorFromUrlProps$1, 'open'>;
18
19
 
19
20
  /**
20
21
  * Creates an instance of CKBox and mounts it at supplied node.
@@ -31,8 +32,8 @@ declare const mount: (root: Element, props: Props) => {
31
32
  * @param root instance's root element
32
33
  * @param props instance's config options
33
34
  */
34
- declare const mountImageEditor: (root: Element, props: ImageEditorProps) => {
35
+ declare const mountImageEditor: (root: Element, props: ImageEditorProps | ImageEditorFromUrlProps) => {
35
36
  unmount: () => void;
36
37
  };
37
38
 
38
- export { type Asset, type CoreAssetsConfigProps, type CoreAssetsOnChooseProps, type CoreDialogProps, type DialogProps, type ImageEditorProps, type Props, mount, mountImageEditor };
39
+ export { type Asset, type CoreAssetsConfigProps, type CoreAssetsOnChooseProps, type CoreDialogProps, type DialogProps, type ImageEditorFromUrlProps, 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 _0x3d2733=_0x25f4;function _0x47df(){const _0x38fd28=['boolean','freeze','4raXfvx','createElement','render','1838082EbbcQH','unmount','createRoot','call','3448RvDAEc','11869758nXiQPD','4662470woRliE','73079mdEiks','assets','onClose','665868SnfwWd','18515ftiqvK','CKBox','dialog','668665irvyxj','34ktYYEH','bind'];_0x47df=function(){return _0x38fd28;};return _0x47df();}(function(_0x52575c,_0x109591){const _0x50324f=_0x25f4,_0x5b8d65=_0x52575c();while(!![]){try{const _0x5d3a55=-parseInt(_0x50324f(0x14b))/0x1*(parseInt(_0x50324f(0x153))/0x2)+-parseInt(_0x50324f(0x14e))/0x3+parseInt(_0x50324f(0x157))/0x4*(-parseInt(_0x50324f(0x152))/0x5)+parseInt(_0x50324f(0x15a))/0x6+-parseInt(_0x50324f(0x14f))/0x7*(-parseInt(_0x50324f(0x148))/0x8)+parseInt(_0x50324f(0x149))/0x9+-parseInt(_0x50324f(0x14a))/0xa;if(_0x5d3a55===_0x109591)break;else _0x5b8d65['push'](_0x5b8d65['shift']());}catch(_0x1065f4){_0x5b8d65['push'](_0x5b8d65['shift']());}}}(_0x47df,0xab1fd));import*as _0x9795 from'react';function _0x25f4(_0x345553,_0x4a826a){const _0x47df7d=_0x47df();return _0x25f4=function(_0x25f481,_0x2f972b){_0x25f481=_0x25f481-0x145;let _0x13304c=_0x47df7d[_0x25f481];return _0x13304c;},_0x25f4(_0x345553,_0x4a826a);}export{_0x9795 as React};import*as _0x54ea97 from'react-dom/client';import{CKBox as _0x12cbac,CKBoxImageEditor,version}from'@ckbox/core';export{version}from'@ckbox/core';const getDialogProps=(_0x518fb3,_0x356d7b)=>{const _0x33ff3f=_0x25f4,_0x9d92cb=_0x518fb3[_0x33ff3f(0x151)];if(!_0x9d92cb)return![];if(typeof _0x9d92cb===_0x33ff3f(0x155)){const _0x1a008a=()=>{_0x356d7b();};return{'open':!![],'onClose':_0x1a008a};}const _0x517146=()=>{const _0x3fbd9a=_0x33ff3f;var _0x177682;(_0x177682=_0x9d92cb[_0x3fbd9a(0x14d)])===null||_0x177682===void 0x0?void 0x0:_0x177682['call'](_0x9d92cb),_0x356d7b();};return{..._0x9d92cb,'open':!![],'onClose':_0x517146};},getAssetsProps=(_0xd55fd4,_0x195391)=>{const _0x48eb9b=_0x25f4;var _0x324354;const _0x5decd6=(_0x324354=_0xd55fd4['assets'])===null||_0x324354===void 0x0?void 0x0:_0x324354['onChoose'];if(!_0x5decd6)return _0xd55fd4[_0x48eb9b(0x14c)];const _0x57faa8=_0x5c35e2=>{const _0x40d396=_0x48eb9b;var _0x2af210;_0x5decd6(_0x5c35e2),_0x195391&&typeof _0x195391!==_0x40d396(0x155)&&((_0x2af210=_0x195391['onClose'])===null||_0x2af210===void 0x0?void 0x0:_0x2af210[_0x40d396(0x147)](_0x195391));};return{..._0xd55fd4[_0x48eb9b(0x14c)],'onChoose':_0x57faa8};},mount=(_0x46321f,_0x802d22)=>{const _0x3bb1cc=_0x25f4,_0x3381a8=_0x54ea97['createRoot'](_0x46321f),_0x553ba9=_0x3381a8[_0x3bb1cc(0x145)][_0x3bb1cc(0x154)](_0x3381a8),_0x3b67ad=getDialogProps(_0x802d22,_0x553ba9),_0x8c4915=getAssetsProps(_0x802d22,_0x3b67ad);return _0x3381a8[_0x3bb1cc(0x159)](_0x9795[_0x3bb1cc(0x158)](_0x12cbac,{..._0x802d22,'assets':_0x8c4915,'dialog':_0x3b67ad})),{'unmount':_0x553ba9};},mountImageEditor=(_0x3c9f42,_0x3f9af6)=>{const _0x4b08dd=_0x25f4,_0x3c2006=_0x54ea97[_0x4b08dd(0x146)](_0x3c9f42),_0x414cd4=_0x3c2006['unmount'][_0x4b08dd(0x154)](_0x3c2006),_0x44ecbb=()=>{const _0x4a0697=_0x4b08dd;var _0x463ea4;(_0x463ea4=_0x3f9af6[_0x4a0697(0x14d)])===null||_0x463ea4===void 0x0?void 0x0:_0x463ea4[_0x4a0697(0x147)](_0x3f9af6),_0x414cd4();};return _0x3c2006[_0x4b08dd(0x159)](_0x9795[_0x4b08dd(0x158)](CKBoxImageEditor,{..._0x3f9af6,'open':!![],'onClose':_0x44ecbb})),{'unmount':_0x414cd4};};var CKBox=Object[_0x3d2733(0x156)]({'__proto__':null,'React':_0x9795,'mount':mount,'mountImageEditor':mountImageEditor,'version':version});(function(){const _0xba5634=_0x3d2733,_0x2e0a2c=globalThis;!_0x2e0a2c[_0xba5634(0x150)]&&(_0x2e0a2c['CKBox']=CKBox);}());export{mount,mountImageEditor};
4
+ const _0x1658c8=_0x1fda;(function(_0x2ca185,_0x5dbcbf){const _0x8527f7=_0x1fda,_0x42f694=_0x2ca185();while(!![]){try{const _0x28e53e=-parseInt(_0x8527f7(0x108))/0x1*(-parseInt(_0x8527f7(0x11c))/0x2)+-parseInt(_0x8527f7(0x10d))/0x3+-parseInt(_0x8527f7(0x109))/0x4+parseInt(_0x8527f7(0x10a))/0x5*(parseInt(_0x8527f7(0x114))/0x6)+-parseInt(_0x8527f7(0x117))/0x7+-parseInt(_0x8527f7(0x115))/0x8+-parseInt(_0x8527f7(0x11b))/0x9*(-parseInt(_0x8527f7(0x10b))/0xa);if(_0x28e53e===_0x5dbcbf)break;else _0x42f694['push'](_0x42f694['shift']());}catch(_0x23e512){_0x42f694['push'](_0x42f694['shift']());}}}(_0x3e1e,0xf355c));import*as _0x355ea9 from'react';export{_0x355ea9 as React};function _0x1fda(_0x5967a3,_0x4c1326){const _0x3e1ef4=_0x3e1e();return _0x1fda=function(_0x1fda0e,_0x5f97c8){_0x1fda0e=_0x1fda0e-0x108;let _0xfc3662=_0x3e1ef4[_0x1fda0e];return _0xfc3662;},_0x1fda(_0x5967a3,_0x4c1326);}import*as _0x19e39a from'react-dom/client';function _0x3e1e(){const _0x2a481d=['CKBox','9VAUjrV','3844686uGJRgR','call','1bCVGuZ','4744824JXNwLo','1215CxkXpV','33161790aDzEyW','createRoot','868419qnAnFx','assets','onChoose','createElement','freeze','unmount','dialog','2316dOQBUD','14038840edcdPv','render','7735602unVrRs','onClose','boolean'];_0x3e1e=function(){return _0x2a481d;};return _0x3e1e();}import{CKBox as _0x4a7946,CKBoxImageEditor,version}from'@ckbox/core';export{version}from'@ckbox/core';const getDialogProps=(_0x28cbca,_0x38df47)=>{const _0x4034b0=_0x1fda,_0x1ec53c=_0x28cbca[_0x4034b0(0x113)];if(!_0x1ec53c)return![];if(typeof _0x1ec53c===_0x4034b0(0x119)){const _0x4c93bd=()=>{_0x38df47();};return{'open':!![],'onClose':_0x4c93bd};}const _0xe11b9b=()=>{const _0x104d7c=_0x4034b0;var _0x151ed0;(_0x151ed0=_0x1ec53c[_0x104d7c(0x118)])===null||_0x151ed0===void 0x0?void 0x0:_0x151ed0['call'](_0x1ec53c),_0x38df47();};return{..._0x1ec53c,'open':!![],'onClose':_0xe11b9b};},getAssetsProps=(_0x5f2b3b,_0x214d0a)=>{const _0x31bde6=_0x1fda;var _0x597cf3;const _0x2053ad=(_0x597cf3=_0x5f2b3b[_0x31bde6(0x10e)])===null||_0x597cf3===void 0x0?void 0x0:_0x597cf3[_0x31bde6(0x10f)];if(!_0x2053ad)return _0x5f2b3b[_0x31bde6(0x10e)];const _0x5e3eca=_0x41c65e=>{const _0x430289=_0x31bde6;var _0x1cd1ae;_0x2053ad(_0x41c65e),_0x214d0a&&typeof _0x214d0a!==_0x430289(0x119)&&((_0x1cd1ae=_0x214d0a[_0x430289(0x118)])===null||_0x1cd1ae===void 0x0?void 0x0:_0x1cd1ae[_0x430289(0x11d)](_0x214d0a));};return{..._0x5f2b3b['assets'],'onChoose':_0x5e3eca};},mount=(_0x44d92e,_0x1d582c)=>{const _0x1464ae=_0x1fda,_0x3d28b0=_0x19e39a[_0x1464ae(0x10c)](_0x44d92e),_0x2a0cc2=_0x3d28b0[_0x1464ae(0x112)]['bind'](_0x3d28b0),_0xb157b4=getDialogProps(_0x1d582c,_0x2a0cc2),_0x3037e5=getAssetsProps(_0x1d582c,_0xb157b4);return _0x3d28b0['render'](_0x355ea9[_0x1464ae(0x110)](_0x4a7946,{..._0x1d582c,'assets':_0x3037e5,'dialog':_0xb157b4})),{'unmount':_0x2a0cc2};},mountImageEditor=(_0x281383,_0x34857a)=>{const _0x44eaec=_0x1fda,_0x2eb79c=_0x19e39a[_0x44eaec(0x10c)](_0x281383),_0x371bb6=_0x2eb79c['unmount']['bind'](_0x2eb79c),_0x1249ee=()=>{const _0x1bae12=_0x44eaec;var _0x19d413;(_0x19d413=_0x34857a['onClose'])===null||_0x19d413===void 0x0?void 0x0:_0x19d413[_0x1bae12(0x11d)](_0x34857a),_0x371bb6();};return _0x2eb79c[_0x44eaec(0x116)](_0x355ea9['createElement'](CKBoxImageEditor,{..._0x34857a,'open':!![],'onClose':_0x1249ee})),{'unmount':_0x371bb6};};var CKBox=Object[_0x1658c8(0x111)]({'__proto__':null,'React':_0x355ea9,'mount':mount,'mountImageEditor':mountImageEditor,'version':version});(function(){const _0x4903f8=_0x1658c8,_0x593dde=globalThis;!_0x593dde[_0x4903f8(0x11a)]&&(_0x593dde[_0x4903f8(0x11a)]=CKBox);}());export{mount,mountImageEditor};