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/README.md +3 -3
- package/dist/ckbox.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/ckbox.d.ts +0 -16
- package/dist/types.d.ts +0 -8
- package/dist/utils.d.ts +0 -22
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
|
-
|
|
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-
|
|
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-
|
|
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;
|