ckbox 2.2.0 → 2.3.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.
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
+ (function(_0x29f943,_0x21dc44){const _0x4959bb=_0x1152,_0x3c7f06=_0x29f943();while(!![]){try{const _0x2fe8cc=parseInt(_0x4959bb(0xb4))/0x1+-parseInt(_0x4959bb(0xbe))/0x2*(parseInt(_0x4959bb(0xc2))/0x3)+-parseInt(_0x4959bb(0xaf))/0x4*(parseInt(_0x4959bb(0xbd))/0x5)+parseInt(_0x4959bb(0xc1))/0x6+-parseInt(_0x4959bb(0xb3))/0x7*(parseInt(_0x4959bb(0xbc))/0x8)+-parseInt(_0x4959bb(0xb7))/0x9*(-parseInt(_0x4959bb(0xbb))/0xa)+-parseInt(_0x4959bb(0xb5))/0xb;if(_0x2fe8cc===_0x21dc44)break;else _0x3c7f06['push'](_0x3c7f06['shift']());}catch(_0x177b6b){_0x3c7f06['push'](_0x3c7f06['shift']());}}}(_0x16b7,0x79814));import*as _0x1bbcae from'react';function _0x16b7(){const _0x559174=['boolean','1647vyKjFx','call','assets','createRoot','39330qLCJYd','119384NJtIVB','145MbWcMz','1443530NyPLwJ','unmount','dialog','4216116PqfCCa','3tdTIaB','onChoose','61216FxXDOJ','render','bind','onClose','7SxJMoE','452184UuCujG','2160631JPeOky'];_0x16b7=function(){return _0x559174;};return _0x16b7();}export{_0x1bbcae as React};import*as _0x13172b from'react-dom/client';import{CKBox as _0x36da46,CKBoxImageEditor,version}from'@ckbox/core';export{version}from'@ckbox/core';const getDialogProps=(_0x5af52c,_0x261024)=>{const _0x208317=_0x1152,_0x23f5ba=_0x5af52c[_0x208317(0xc0)];if(!_0x23f5ba)return![];if(typeof _0x23f5ba===_0x208317(0xb6)){const _0x4fe061=()=>{_0x261024();};return{'open':!![],'onClose':_0x4fe061};}const _0x48a780=()=>{const _0x58db8f=_0x208317;var _0x27f723;(_0x27f723=_0x23f5ba[_0x58db8f(0xb2)])===null||_0x27f723===void 0x0?void 0x0:_0x27f723[_0x58db8f(0xb8)](_0x23f5ba),_0x261024();};return{..._0x23f5ba,'open':!![],'onClose':_0x48a780};},getAssetsProps=(_0x368c4c,_0x1daf50)=>{const _0x5bb840=_0x1152;var _0x389ddf;const _0xfbe07a=(_0x389ddf=_0x368c4c[_0x5bb840(0xb9)])===null||_0x389ddf===void 0x0?void 0x0:_0x389ddf[_0x5bb840(0xc3)];if(!_0xfbe07a)return _0x368c4c['assets'];const _0x353515=_0x48832c=>{const _0x1b8fc0=_0x5bb840;var _0x42515c;_0xfbe07a(_0x48832c),_0x1daf50&&typeof _0x1daf50!=='boolean'&&((_0x42515c=_0x1daf50[_0x1b8fc0(0xb2)])===null||_0x42515c===void 0x0?void 0x0:_0x42515c[_0x1b8fc0(0xb8)](_0x1daf50));};return{..._0x368c4c['assets'],'onChoose':_0x353515};},mount=(_0x5c7aad,_0x5ccc9c)=>{const _0x35613a=_0x1152,_0x5a5ca2=_0x13172b[_0x35613a(0xba)](_0x5c7aad),_0x3c7989=_0x5a5ca2[_0x35613a(0xbf)][_0x35613a(0xb1)](_0x5a5ca2),_0x4a4758=getDialogProps(_0x5ccc9c,_0x3c7989),_0x22d24e=getAssetsProps(_0x5ccc9c,_0x4a4758);return _0x5a5ca2[_0x35613a(0xb0)](_0x1bbcae['createElement'](_0x36da46,{..._0x5ccc9c,'assets':_0x22d24e,'dialog':_0x4a4758})),{'unmount':_0x3c7989};},mountImageEditor=(_0x4de3bb,_0x4531b7)=>{const _0x42535c=_0x1152,_0x270777=_0x13172b['createRoot'](_0x4de3bb),_0x15fd59=_0x270777[_0x42535c(0xbf)][_0x42535c(0xb1)](_0x270777),_0x15628b=()=>{const _0x5bd54f=_0x42535c;var _0x5b383a;(_0x5b383a=_0x4531b7[_0x5bd54f(0xb2)])===null||_0x5b383a===void 0x0?void 0x0:_0x5b383a['call'](_0x4531b7),_0x15fd59();};return _0x270777[_0x42535c(0xb0)](_0x1bbcae['createElement'](CKBoxImageEditor,{..._0x4531b7,'open':!![],'onClose':_0x15628b})),{'unmount':_0x15fd59};};function _0x1152(_0x204639,_0x2604a5){const _0x16b72a=_0x16b7();return _0x1152=function(_0x115291,_0x2b87bd){_0x115291=_0x115291-0xaf;let _0x5e442c=_0x16b72a[_0x115291];return _0x5e442c;},_0x1152(_0x204639,_0x2604a5);}var CKBox=Object['freeze']({'__proto__':null,'React':_0x1bbcae,'mount':mount,'mountImageEditor':mountImageEditor,'version':version});(function(){const _0x55226d=globalThis;!_0x55226d['CKBox']&&(_0x55226d['CKBox']=CKBox);}());export{mount,mountImageEditor};