@chamn/render 0.0.9 → 0.0.10
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/.eslintrc.js +1 -0
- package/CHANGELOG.md +4 -0
- package/build.config.ts +10 -1
- package/dist/commonComponent/index.d.ts +12 -0
- package/dist/const/index.d.ts +2 -0
- package/dist/core/ReactErrorBoundary.d.ts +26 -0
- package/dist/core/adapter.d.ts +64 -0
- package/dist/core/adapterReact.d.ts +108 -0
- package/dist/core/designReactRender.d.ts +47 -0
- package/dist/core/refManager.d.ts +7 -0
- package/dist/core/render.d.ts +32 -0
- package/dist/core/storeManager.d.ts +11 -0
- package/dist/core/type.d.ts +9 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +92 -81
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/util/assetsLoader.d.ts +15 -0
- package/dist/util/index.d.ts +20 -0
- package/package.json +9 -7
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AssetPackage } from '@chamn/model';
|
|
2
|
+
export type Asset = AssetPackage;
|
|
3
|
+
export declare class AssetLoader {
|
|
4
|
+
assets: Asset[];
|
|
5
|
+
loadStatus: 'INIT' | 'SUCCESS' | 'ERROR';
|
|
6
|
+
win: Window;
|
|
7
|
+
private _onSuccessList;
|
|
8
|
+
private _onErrorList;
|
|
9
|
+
constructor(assets: Asset[], options?: {
|
|
10
|
+
window?: Window;
|
|
11
|
+
});
|
|
12
|
+
load(): Promise<unknown> | undefined;
|
|
13
|
+
onSuccess(cb: () => void): this;
|
|
14
|
+
onError(cb: () => void): this;
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ContextType } from '../core/adapter';
|
|
2
|
+
import { StoreManager } from '../core/storeManager';
|
|
3
|
+
import { AssetPackage } from '@chamn/model';
|
|
4
|
+
export declare const isClass: (val: any) => boolean;
|
|
5
|
+
export declare function shouldConstruct(Component: Function): boolean;
|
|
6
|
+
export declare function canAcceptsRef(Comp: any): any;
|
|
7
|
+
export declare function compWrapper(Comp: any): any;
|
|
8
|
+
export declare const runExpression: (expStr: string, context: any) => any;
|
|
9
|
+
export declare const convertCodeStringToFunction: (functionStr: string, $$context: ContextType, storeManager: StoreManager) => (...args: any[]) => void;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param args 对象的值
|
|
13
|
+
* @param argsName 对因位置的 名称
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare const getObjFromArrayMap: (args: any[], argsName: string[]) => Record<any, any>;
|
|
17
|
+
export declare const formatSourceStylePropertyName: (style: Record<string, string>) => Record<string, string>;
|
|
18
|
+
export declare const getCSSTextValue: (cssObj: Record<string, string>) => string;
|
|
19
|
+
export declare const collectVariable: (assetPackages: AssetPackage[], win: Window) => Record<string, any>;
|
|
20
|
+
export declare const flatObject: (obj: Record<string, any>, level?: number) => {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chamn/render",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"test": "jest"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@chamn/model": "0.0.
|
|
21
|
+
"@chamn/model": "0.0.10",
|
|
22
22
|
"cross-env": "^7.0.3",
|
|
23
23
|
"html-tag-names": "^2.0.1",
|
|
24
24
|
"loadjs": "4.3.0-rc1",
|
|
@@ -29,16 +29,18 @@
|
|
|
29
29
|
"zustand": "^4.1.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@chamn/build-script": "0.0.
|
|
33
|
-
"@chamn/demo-page": "0.0.
|
|
34
|
-
"@chamn/material": "0.0.
|
|
32
|
+
"@chamn/build-script": "0.0.10",
|
|
33
|
+
"@chamn/demo-page": "0.0.10",
|
|
34
|
+
"@chamn/material": "0.0.10",
|
|
35
35
|
"@types/loadjs": "^4.0.1",
|
|
36
36
|
"@types/lodash-es": "^4.17.6",
|
|
37
|
+
"@types/node": "^18.15.9",
|
|
37
38
|
"@types/react": "^18.0.15",
|
|
38
39
|
"@types/react-dom": "^18.0.6",
|
|
39
40
|
"antd": "^5.0.0",
|
|
40
|
-
"react-router-dom": "^6.6.1"
|
|
41
|
+
"react-router-dom": "^6.6.1",
|
|
42
|
+
"vite-plugin-dts": "^2.1.0"
|
|
41
43
|
},
|
|
42
44
|
"config": {},
|
|
43
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "89c4cfa2d5a7a8e60970e7317616e564ddd626e1"
|
|
44
46
|
}
|