ckbox 2.1.2 → 2.2.0-rc.1

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
+ const _0x4dfba9=_0x5751;(function(_0x12b7cf,_0x4ca5bb){const _0x53dd6e=_0x5751,_0x367739=_0x12b7cf();while(!![]){try{const _0x3349b4=-parseInt(_0x53dd6e(0xf5))/0x1*(-parseInt(_0x53dd6e(0xfb))/0x2)+parseInt(_0x53dd6e(0xf4))/0x3+-parseInt(_0x53dd6e(0xf1))/0x4+parseInt(_0x53dd6e(0xe5))/0x5*(-parseInt(_0x53dd6e(0xf0))/0x6)+parseInt(_0x53dd6e(0xf2))/0x7*(parseInt(_0x53dd6e(0xfa))/0x8)+parseInt(_0x53dd6e(0xef))/0x9+-parseInt(_0x53dd6e(0xf7))/0xa;if(_0x3349b4===_0x4ca5bb)break;else _0x367739['push'](_0x367739['shift']());}catch(_0x31b3e1){_0x367739['push'](_0x367739['shift']());}}}(_0x7b5e,0x4d70b));import*as _0x312d29 from'react';export{_0x312d29 as React};import*as _0x4229df from'react-dom/client';import{CKBox as _0x174393,CKBoxImageEditor,version}from'@ckbox/core';function _0x5751(_0x56ae6a,_0x585fb0){const _0x7b5e62=_0x7b5e();return _0x5751=function(_0x575151,_0x538ff7){_0x575151=_0x575151-0xe5;let _0x51824f=_0x7b5e62[_0x575151];return _0x51824f;},_0x5751(_0x56ae6a,_0x585fb0);}export{version}from'@ckbox/core';function _0x7b5e(){const _0xfd6132=['35CjEziV','boolean','bind','createRoot','assets','createElement','unmount','onChoose','onClose','CKBox','3917052sROEJd','386928qDfCtz','2037032WymGGb','49oekuoX','dialog','985878JdSUiO','2AMoYeg','render','132980zhiZqw','call','freeze','259544VcOQGe','300212MJPMup'];_0x7b5e=function(){return _0xfd6132;};return _0x7b5e();}const getDialogProps=(_0x5744aa,_0x56d64c)=>{const _0x54b9ea=_0x5751,_0x3fadc0=_0x5744aa[_0x54b9ea(0xf3)];if(!_0x3fadc0)return![];if(typeof _0x3fadc0===_0x54b9ea(0xe6)){const _0x30e74d=()=>{_0x56d64c();};return{'open':!![],'onClose':_0x30e74d};}const _0x4b2bc0=()=>{var _0x37c4c3;(_0x37c4c3=_0x3fadc0['onClose'])===null||_0x37c4c3===void 0x0?void 0x0:_0x37c4c3['call'](_0x3fadc0),_0x56d64c();};return{..._0x3fadc0,'open':!![],'onClose':_0x4b2bc0};},getAssetsProps=(_0x2abfa7,_0x256579)=>{const _0x5ad0ba=_0x5751;var _0x5092f3;const _0x1afe60=(_0x5092f3=_0x2abfa7[_0x5ad0ba(0xe9)])===null||_0x5092f3===void 0x0?void 0x0:_0x5092f3[_0x5ad0ba(0xec)];if(!_0x1afe60)return _0x2abfa7[_0x5ad0ba(0xe9)];const _0x3b9a09=_0x5c6778=>{const _0x57bd28=_0x5ad0ba;var _0x586621;_0x1afe60(_0x5c6778),_0x256579&&typeof _0x256579!==_0x57bd28(0xe6)&&((_0x586621=_0x256579['onClose'])===null||_0x586621===void 0x0?void 0x0:_0x586621[_0x57bd28(0xf8)](_0x256579));};return{..._0x2abfa7[_0x5ad0ba(0xe9)],'onChoose':_0x3b9a09};},mount=(_0x7f9832,_0x171e78)=>{const _0x1fcafd=_0x5751,_0x11713f=_0x4229df['createRoot'](_0x7f9832),_0x27de95=_0x11713f['unmount'][_0x1fcafd(0xe7)](_0x11713f),_0x352e2f=getDialogProps(_0x171e78,_0x27de95),_0x3e5aa0=getAssetsProps(_0x171e78,_0x352e2f);return _0x11713f[_0x1fcafd(0xf6)](_0x312d29[_0x1fcafd(0xea)](_0x174393,{..._0x171e78,'assets':_0x3e5aa0,'dialog':_0x352e2f})),{'unmount':_0x27de95};},mountImageEditor=(_0x3254e6,_0x16d798)=>{const _0x363d96=_0x5751,_0x4fd144=_0x4229df[_0x363d96(0xe8)](_0x3254e6),_0x2ed827=_0x4fd144[_0x363d96(0xeb)][_0x363d96(0xe7)](_0x4fd144),_0x335203=()=>{const _0x41e2d8=_0x363d96;var _0x36e46b;(_0x36e46b=_0x16d798[_0x41e2d8(0xed)])===null||_0x36e46b===void 0x0?void 0x0:_0x36e46b[_0x41e2d8(0xf8)](_0x16d798),_0x2ed827();};return _0x4fd144[_0x363d96(0xf6)](_0x312d29[_0x363d96(0xea)](CKBoxImageEditor,{..._0x16d798,'open':!![],'onClose':_0x335203})),{'unmount':_0x2ed827};};var CKBox=Object[_0x4dfba9(0xf9)]({'__proto__':null,'React':_0x312d29,'mount':mount,'mountImageEditor':mountImageEditor,'version':version});(function(){const _0x3ba237=_0x4dfba9,_0x1352a4=globalThis;!_0x1352a4[_0x3ba237(0xee)]&&(_0x1352a4['CKBox']=CKBox);}());export{mount,mountImageEditor};