ckbox 1.2.0-dev.0 → 1.2.0-dev.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.
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(_0x37a96e,_0x4f92ed){const _0x1100cf=_0x3a62,_0x116fd6=_0x37a96e();while(!![]){try{const _0x44c03f=parseInt(_0x1100cf(0x1d7))/0x1*(-parseInt(_0x1100cf(0x1da))/0x2)+parseInt(_0x1100cf(0x1dc))/0x3*(parseInt(_0x1100cf(0x1df))/0x4)+-parseInt(_0x1100cf(0x1e1))/0x5+-parseInt(_0x1100cf(0x1e5))/0x6+-parseInt(_0x1100cf(0x1e0))/0x7+parseInt(_0x1100cf(0x1e4))/0x8+parseInt(_0x1100cf(0x1db))/0x9;if(_0x44c03f===_0x4f92ed)break;else _0x116fd6['push'](_0x116fd6['shift']());}catch(_0x237a1b){_0x116fd6['push'](_0x116fd6['shift']());}}}(_0x5b73,0x765d1));function _0x3a62(_0x4b1637,_0x57cfcd){const _0x5b7351=_0x5b73();return _0x3a62=function(_0x3a622f,_0x37c332){_0x3a622f=_0x3a622f-0x1d5;let _0x28507a=_0x5b7351[_0x3a622f];return _0x28507a;},_0x3a62(_0x4b1637,_0x57cfcd);}import*as _0x5bf763 from'react';export{_0x5bf763 as React};import*as _0x4c74f4 from'react-dom/client';import{CKBox as _0x3a7093,version}from'@ckbox/core';export{version}from'@ckbox/core';const getDialogProps=(_0x562b61,_0x47bb2f)=>{const _0x412630=_0x3a62,_0xa62e4c=_0x562b61[_0x412630(0x1d6)];if(!_0xa62e4c)return![];if(typeof _0xa62e4c===_0x412630(0x1d8)){const _0x476414=()=>{_0x47bb2f();};return{'open':!![],'onClose':_0x476414};}const _0x3b8eeb=()=>{const _0x4a8066=_0x412630;var _0x653e4a;(_0x653e4a=_0xa62e4c['onClose'])===null||_0x653e4a===void 0x0?void 0x0:_0x653e4a[_0x4a8066(0x1dd)](_0xa62e4c),_0x47bb2f();};return{..._0xa62e4c,'open':!![],'onClose':_0x3b8eeb};},getAssetsProps=(_0x2de31a,_0x76c19b)=>{const _0x1f4873=_0x3a62;var _0x430f0c;const _0x2d6d5b=(_0x430f0c=_0x2de31a['assets'])===null||_0x430f0c===void 0x0?void 0x0:_0x430f0c['onChoose'];if(!_0x2d6d5b)return _0x2de31a[_0x1f4873(0x1d9)];const _0x41415a=_0xb5b469=>{const _0x96678e=_0x1f4873;var _0x47a64e;_0x2d6d5b(_0xb5b469),_0x76c19b&&typeof _0x76c19b!=='boolean'&&((_0x47a64e=_0x76c19b[_0x96678e(0x1de)])===null||_0x47a64e===void 0x0?void 0x0:_0x47a64e['call'](_0x76c19b));};return{..._0x2de31a[_0x1f4873(0x1d9)],'onChoose':_0x41415a};},mount=(_0x5df67a,_0x58c96f)=>{const _0x15995c=_0x3a62,_0x5b8938=_0x4c74f4['createRoot'](_0x5df67a),_0x33169d=_0x5b8938['unmount'][_0x15995c(0x1e2)](_0x5b8938),_0x40c06d=getDialogProps(_0x58c96f,_0x33169d),_0x51c07d=getAssetsProps(_0x58c96f,_0x40c06d);return _0x5b8938['render'](_0x5bf763[_0x15995c(0x1e3)](_0x3a7093,{..._0x58c96f,'assets':_0x51c07d,'dialog':_0x40c06d})),{'unmount':_0x33169d};};function _0x5b73(){const _0x5d050c=['28042ShiObe','17854047WLnDix','2838129ogCfXa','call','onClose','4Uohatu','5477178LJGQpg','4707995pfgjtf','bind','createElement','1349392ehJqxN','3907638WPWZpL','CKBox','dialog','17tKlCJv','boolean','assets'];_0x5b73=function(){return _0x5d050c;};return _0x5b73();}var CKBox=Object['freeze']({'__proto__':null,'mount':mount,'React':_0x5bf763,'version':version});(function(){const _0x247767=_0x3a62,_0x468b64=globalThis;!_0x468b64[_0x247767(0x1d5)]&&(_0x468b64[_0x247767(0x1d5)]=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-dev.1",
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-dev.1",
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;