ckbox 1.2.0-dev.0 → 1.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.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  */
4
- const _0x209ca2=_0xdf34;function _0x27c7(){const _0x556deb=['1179548pwSZNE','createRoot','1015365OBgHia','9vSXjJA','unmount','13856168IjpeSL','call','5376343kIfSQN','render','freeze','681713XeWALh','1366672GZQPcE','boolean','1539870ZUFEKR','createElement','CKBox','onClose','6XDVAyn','assets'];_0x27c7=function(){return _0x556deb;};return _0x27c7();}function _0xdf34(_0x4b653e,_0x553798){const _0x27c7e3=_0x27c7();return _0xdf34=function(_0xdf3406,_0x2e5b5b){_0xdf3406=_0xdf3406-0x1c5;let _0xc0bcab=_0x27c7e3[_0xdf3406];return _0xc0bcab;},_0xdf34(_0x4b653e,_0x553798);}(function(_0x1e13c3,_0x302882){const _0x3d1424=_0xdf34,_0x528a83=_0x1e13c3();while(!![]){try{const _0x4f8261=parseInt(_0x3d1424(0x1c9))/0x1+parseInt(_0x3d1424(0x1ca))/0x2+-parseInt(_0x3d1424(0x1cc))/0x3+parseInt(_0x3d1424(0x1d2))/0x4+parseInt(_0x3d1424(0x1d4))/0x5+-parseInt(_0x3d1424(0x1d0))/0x6*(-parseInt(_0x3d1424(0x1c6))/0x7)+-parseInt(_0x3d1424(0x1d7))/0x8*(parseInt(_0x3d1424(0x1d5))/0x9);if(_0x4f8261===_0x302882)break;else _0x528a83['push'](_0x528a83['shift']());}catch(_0x140675){_0x528a83['push'](_0x528a83['shift']());}}}(_0x27c7,0x5e2d3));import*as _0x4500cb from'react';export{_0x4500cb as React};import*as _0xda0041 from'react-dom/client';import{CKBox as _0x360644,version}from'@ckbox/core';export{version}from'@ckbox/core';const getDialogProps=(_0x275fe0,_0x3b0879)=>{const _0x126d58=_0xdf34,_0x32d4db=_0x275fe0['dialog'];if(!_0x32d4db)return![];if(typeof _0x32d4db===_0x126d58(0x1cb)){const _0x2e4368=()=>{_0x3b0879();};return{'open':!![],'onClose':_0x2e4368};}const _0x2d4d29=()=>{const _0x368a57=_0x126d58;var _0x2c0a0b;(_0x2c0a0b=_0x32d4db['onClose'])===null||_0x2c0a0b===void 0x0?void 0x0:_0x2c0a0b[_0x368a57(0x1c5)](_0x32d4db),_0x3b0879();};return{..._0x32d4db,'open':!![],'onClose':_0x2d4d29};},getAssetsProps=(_0x14c805,_0x2b94af)=>{const _0x61d80e=_0xdf34;var _0x312dd;const _0x1b6e94=(_0x312dd=_0x14c805['assets'])===null||_0x312dd===void 0x0?void 0x0:_0x312dd['onChoose'];if(!_0x1b6e94)return _0x14c805[_0x61d80e(0x1d1)];const _0x3af32f=_0xc9d4d=>{const _0x23a9a4=_0x61d80e;var _0x5f4fb8;_0x1b6e94(_0xc9d4d),_0x2b94af&&typeof _0x2b94af!=='boolean'&&((_0x5f4fb8=_0x2b94af[_0x23a9a4(0x1cf)])===null||_0x5f4fb8===void 0x0?void 0x0:_0x5f4fb8[_0x23a9a4(0x1c5)](_0x2b94af));};return{..._0x14c805[_0x61d80e(0x1d1)],'onChoose':_0x3af32f};},mount=(_0x23f7c4,_0x52d959)=>{const _0x311e05=_0xdf34,_0x26e824=_0xda0041[_0x311e05(0x1d3)](_0x23f7c4),_0x4721b8=_0x26e824[_0x311e05(0x1d6)]['bind'](_0x26e824),_0x6d141a=getDialogProps(_0x52d959,_0x4721b8),_0x300c4c=getAssetsProps(_0x52d959,_0x6d141a);return _0x26e824[_0x311e05(0x1c7)](_0x4500cb[_0x311e05(0x1cd)](_0x360644,{..._0x52d959,'assets':_0x300c4c,'dialog':_0x6d141a})),{'unmount':_0x4721b8};};var CKBox=Object[_0x209ca2(0x1c8)]({'__proto__':null,'mount':mount,'React':_0x4500cb,'version':version});(function(){const _0x5a5dea=_0x209ca2,_0x336fb6=globalThis;!_0x336fb6[_0x5a5dea(0x1ce)]&&(_0x336fb6[_0x5a5dea(0x1ce)]=CKBox);}());export{mount};
4
+ (function(_0x4c1269,_0x30d0f6){const _0x35b3ff=_0x15a6,_0x35de73=_0x4c1269();while(!![]){try{const _0x12ec7b=-parseInt(_0x35b3ff(0x1ca))/0x1*(-parseInt(_0x35b3ff(0x1cc))/0x2)+-parseInt(_0x35b3ff(0x1d5))/0x3*(-parseInt(_0x35b3ff(0x1cd))/0x4)+-parseInt(_0x35b3ff(0x1d7))/0x5+-parseInt(_0x35b3ff(0x1d4))/0x6*(parseInt(_0x35b3ff(0x1d6))/0x7)+parseInt(_0x35b3ff(0x1d1))/0x8*(parseInt(_0x35b3ff(0x1c8))/0x9)+parseInt(_0x35b3ff(0x1db))/0xa+-parseInt(_0x35b3ff(0x1cb))/0xb*(-parseInt(_0x35b3ff(0x1dc))/0xc);if(_0x12ec7b===_0x30d0f6)break;else _0x35de73['push'](_0x35de73['shift']());}catch(_0x9f79e2){_0x35de73['push'](_0x35de73['shift']());}}}(_0x4fc0,0x47c3e));import*as _0x273f0a from'react';function _0x4fc0(){const _0x19b32a=['createElement','assets','6mdYnMv','44247lEdWqe','4094797TkbXIE','1544910lNoRpY','CKBox','boolean','call','2791760oCAysJ','1844604TbwzDW','unmount','325233zkumNO','bind','11hmBMqG','22LArIXA','18548wMnZlX','8hLQKQM','createRoot','onClose','dialog','104MbBdYS'];_0x4fc0=function(){return _0x19b32a;};return _0x4fc0();}export{_0x273f0a as React};import*as _0x221a9c from'react-dom/client';import{CKBox as _0x2e3977,version}from'@ckbox/core';export{version}from'@ckbox/core';const getDialogProps=(_0xe84eb2,_0x526d53)=>{const _0x2aa976=_0x15a6,_0x395463=_0xe84eb2[_0x2aa976(0x1d0)];if(!_0x395463)return![];if(typeof _0x395463===_0x2aa976(0x1d9)){const _0x3d855e=()=>{_0x526d53();};return{'open':!![],'onClose':_0x3d855e};}const _0x5257a8=()=>{const _0xa6df10=_0x2aa976;var _0x3ec33c;(_0x3ec33c=_0x395463[_0xa6df10(0x1cf)])===null||_0x3ec33c===void 0x0?void 0x0:_0x3ec33c['call'](_0x395463),_0x526d53();};return{..._0x395463,'open':!![],'onClose':_0x5257a8};},getAssetsProps=(_0x1afdba,_0x139db1)=>{const _0x13ba75=_0x15a6;var _0x2a660c;const _0x48dece=(_0x2a660c=_0x1afdba['assets'])===null||_0x2a660c===void 0x0?void 0x0:_0x2a660c['onChoose'];if(!_0x48dece)return _0x1afdba['assets'];const _0x56b567=_0x1bb7ed=>{const _0x2f56e2=_0x15a6;var _0x188fdb;_0x48dece(_0x1bb7ed),_0x139db1&&typeof _0x139db1!==_0x2f56e2(0x1d9)&&((_0x188fdb=_0x139db1[_0x2f56e2(0x1cf)])===null||_0x188fdb===void 0x0?void 0x0:_0x188fdb[_0x2f56e2(0x1da)](_0x139db1));};return{..._0x1afdba[_0x13ba75(0x1d3)],'onChoose':_0x56b567};},mount=(_0x56ffc6,_0x2b36f0)=>{const _0x5d8182=_0x15a6,_0x10a2c4=_0x221a9c[_0x5d8182(0x1ce)](_0x56ffc6),_0x30d20d=_0x10a2c4[_0x5d8182(0x1dd)][_0x5d8182(0x1c9)](_0x10a2c4),_0x120a40=getDialogProps(_0x2b36f0,_0x30d20d),_0x4df780=getAssetsProps(_0x2b36f0,_0x120a40);return _0x10a2c4['render'](_0x273f0a[_0x5d8182(0x1d2)](_0x2e3977,{..._0x2b36f0,'assets':_0x4df780,'dialog':_0x120a40})),{'unmount':_0x30d20d};};function _0x15a6(_0x4b1f09,_0x3d71f0){const _0x4fc0d3=_0x4fc0();return _0x15a6=function(_0x15a683,_0x3566bd){_0x15a683=_0x15a683-0x1c8;let _0x46c19c=_0x4fc0d3[_0x15a683];return _0x46c19c;},_0x15a6(_0x4b1f09,_0x3d71f0);}var CKBox=Object['freeze']({'__proto__':null,'mount':mount,'React':_0x273f0a,'version':version});(function(){const _0x1ae223=_0x15a6,_0x161080=globalThis;!_0x161080[_0x1ae223(0x1d8)]&&(_0x161080['CKBox']=CKBox);}());export{mount};
package/package.json CHANGED
@@ -20,12 +20,12 @@
20
20
  ],
21
21
  "license": "SEE LICENSE IN LICENSE.md",
22
22
  "name": "ckbox",
23
- "version": "1.2.0-dev.0",
23
+ "version": "1.2.0-rc.0",
24
24
  "description": "Main CKBox package",
25
25
  "main": "dist/index.js",
26
26
  "types": "dist/index.d.ts",
27
27
  "dependencies": {
28
- "@ckbox/core": "1.2.0-dev.0",
28
+ "@ckbox/core": "1.2.0-rc.0",
29
29
  "@types/react": "^18.0.24",
30
30
  "@types/react-dom": "^18.0.8",
31
31
  "react": "^18.2.0",
package/dist/ckbox.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import * as React from 'react';
2
- import { version } from '@ckbox/core';
3
- import { Props } from './types';
4
- /**
5
- * Creates an instance and mounts it at supplied node.
6
- *
7
- * @param root instance's root element
8
- * @param props instance's config options
9
- */
10
- export declare const mount: (root: Element, props: Props) => {
11
- unmount: () => void;
12
- };
13
- /**
14
- * Expose React object so that it can be used to create custom components.
15
- */
16
- export { React, version };
package/dist/types.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import * as Core from '@ckbox/core';
2
- export declare type Asset = Core.Asset;
3
- export declare type CoreDialogProps = Required<Core.Props>['dialog'];
4
- export declare type CoreAssetsProps = Core.Props['assets'];
5
- export declare type DialogProps = Omit<Exclude<CoreDialogProps, boolean>, 'open'>;
6
- export declare type Props = Omit<Core.Props, 'dialog'> & {
7
- dialog?: boolean | DialogProps;
8
- };
package/dist/utils.d.ts DELETED
@@ -1,22 +0,0 @@
1
- import { CoreAssetsProps, CoreDialogProps, Props } from './types';
2
- /**
3
- * Enhances instance's dialog props with ability to close dialog.
4
- *
5
- * @param props instance's config options
6
- * @param unmount function which unmounts component
7
- * @returns enhanced dialog options
8
- */
9
- export declare const getDialogProps: (props: Props, unmount: () => void) => false | {
10
- open: boolean;
11
- onClose: () => void;
12
- height?: string | number | undefined;
13
- width?: string | number | undefined;
14
- };
15
- /**
16
- * Enhances instance's `assets.onChoose` option with ability to close dialog.
17
- *
18
- * @param props instance's config options
19
- * @param dialogProps enhanced dialog props
20
- * @returns enhanced assets props
21
- */
22
- export declare const getAssetsProps: (props: Props, dialogProps: CoreDialogProps) => CoreAssetsProps;