@blueking/bk-weweb 0.0.2-5.beta.1 → 0.0.2-5.beta.2
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/collect-source.js +107 -37
- package/dist/collect-source.js.map +1 -1
- package/dist/index.esm.js +109 -37
- package/dist/index.esm.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -1
- package/typings/base-app/collect-source.d.ts +3 -0
- package/typings/base-app/element.d.ts +13 -0
- package/typings/common/state.d.ts +8 -8
- package/typings/component/web-compnent.d.ts +9 -9
- package/typings/entry/script.d.ts +5 -0
- package/typings/entry/style.d.ts +9 -0
- package/typings/mode/instance.d.ts +1 -1
- package/CHANGELOG.md +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueking/bk-weweb",
|
|
3
|
-
"version": "0.0.25.beta.
|
|
3
|
+
"version": "0.0.25.beta.2",
|
|
4
4
|
"description": "bk micro frontend web",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.esm.js",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"@types/node": "^20.10.3",
|
|
59
59
|
"@typescript-eslint/eslint-plugin": "^6.13.2",
|
|
60
60
|
"@typescript-eslint/parser": "^6.13.2",
|
|
61
|
+
"chalk": "^5.3.0",
|
|
61
62
|
"cross-env": "^7.0.3",
|
|
62
63
|
"eslint": "^8.55.0",
|
|
63
64
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param parent 父节点
|
|
3
|
+
* @param newChild 新节点
|
|
4
|
+
* @param passiveChild 被动节点
|
|
5
|
+
* @param rawMethod 原始方法
|
|
6
|
+
* @returns 返回原始方法的执行结果
|
|
7
|
+
*/
|
|
1
8
|
export declare function baseElementInertHandle(parent: Node, newChild: Node, passiveChild: Node | null, rawMethod: Function): any;
|
|
9
|
+
/**
|
|
10
|
+
* @param parent 父节点
|
|
11
|
+
* @param newChild 新节点
|
|
12
|
+
* @param rawMethod 原始方法
|
|
13
|
+
* @returns 返回原始方法的执行结果
|
|
14
|
+
*/
|
|
2
15
|
export declare function baseElementAppendHandle(parent: Node, newChild: Node, rawMethod: Function): any;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare enum AppState {
|
|
2
|
-
ACTIVATED = "ACTIVATED"
|
|
3
|
-
DEACTIVATED = "DEACTIVATED"
|
|
4
|
-
ERROR = "ERROR"
|
|
5
|
-
LOADED = "LOADED"
|
|
6
|
-
LOADING = "LOADING"
|
|
7
|
-
MOUNTED = "MOUNTED"
|
|
8
|
-
MOUNTING = "MOUNTING"
|
|
9
|
-
UNMOUNT = "UNMOUNT"
|
|
2
|
+
ACTIVATED = "ACTIVATED",// 激活
|
|
3
|
+
DEACTIVATED = "DEACTIVATED",// 未激活
|
|
4
|
+
ERROR = "ERROR",// Error
|
|
5
|
+
LOADED = "LOADED",// 加载完成
|
|
6
|
+
LOADING = "LOADING",// 加载中
|
|
7
|
+
MOUNTED = "MOUNTED",// 挂载完成
|
|
8
|
+
MOUNTING = "MOUNTING",// 挂载中
|
|
9
|
+
UNMOUNT = "UNMOUNT",// 卸载
|
|
10
10
|
UNSET = "UNSET"
|
|
11
11
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { IAppModleProps, IJsModelProps } from '../typings';
|
|
2
2
|
export declare enum WewebCustomAttrs {
|
|
3
|
-
data = "data"
|
|
4
|
-
id = "id"
|
|
5
|
-
keepAlive = "keepAlive"
|
|
6
|
-
mode = "mode"
|
|
7
|
-
scopeCss = "scopeCss"
|
|
8
|
-
scopeJs = "scopeJs"
|
|
9
|
-
scopeLocation = "scopeLocation"
|
|
10
|
-
setShodowDom = "setShodowDom"
|
|
11
|
-
showSourceCode = "showSourceCode"
|
|
3
|
+
data = "data",// 传递给子应用的数据
|
|
4
|
+
id = "id",// 应用id
|
|
5
|
+
keepAlive = "keepAlive",// 是否缓存
|
|
6
|
+
mode = "mode",// 模式
|
|
7
|
+
scopeCss = "scopeCss",// 是否开启css隔离
|
|
8
|
+
scopeJs = "scopeJs",// 是否开启js隔离
|
|
9
|
+
scopeLocation = "scopeLocation",// 是否开启location隔离
|
|
10
|
+
setShodowDom = "setShodowDom",// 是否开启shadowDom
|
|
11
|
+
showSourceCode = "showSourceCode",// 是否显示源码
|
|
12
12
|
url = "url"
|
|
13
13
|
}
|
|
14
14
|
export default class BkWewebElement extends HTMLElement {
|
|
@@ -10,6 +10,11 @@ export declare class Script {
|
|
|
10
10
|
scoped: boolean;
|
|
11
11
|
url: string | undefined;
|
|
12
12
|
constructor({ async, code, defer, fromHtml, initial, isModule, url }: IScriptOption);
|
|
13
|
+
/**
|
|
14
|
+
* @param app 应用
|
|
15
|
+
* @param needRelaceScriptElement 是否需要替换script标签
|
|
16
|
+
* @returns 返回执行后的script标签或注释
|
|
17
|
+
*/
|
|
13
18
|
excuteCode(app: BaseModel, needRelaceScriptElement?: boolean): Promise<Comment | HTMLScriptElement | undefined>;
|
|
14
19
|
executeMemoryScript(app: BaseModel, scopedCode: string): void;
|
|
15
20
|
executeSourceScript(scriptElement: HTMLScriptElement, scopedCode: string): void;
|
package/typings/entry/style.d.ts
CHANGED
|
@@ -9,8 +9,17 @@ export declare class Style {
|
|
|
9
9
|
scopedCode: string;
|
|
10
10
|
url: string | undefined;
|
|
11
11
|
constructor({ code, fromHtml, initial, prefetch, preload, url }: IStyleOption);
|
|
12
|
+
/**
|
|
13
|
+
* @param templateStyle 模板样式
|
|
14
|
+
* @param styleElement 样式node
|
|
15
|
+
* @param app 应用实例
|
|
16
|
+
*/
|
|
12
17
|
commonScoped(templateStyle: HTMLStyleElement, styleElement: HTMLStyleElement, app: BaseModel): void;
|
|
13
18
|
createStyleElement(): HTMLStyleElement;
|
|
19
|
+
/**
|
|
20
|
+
* @param app 应用实例
|
|
21
|
+
* @returns 返回执行后的style标签
|
|
22
|
+
*/
|
|
14
23
|
excuteCode(app: BaseModel): Promise<HTMLStyleElement>;
|
|
15
24
|
getCode(app?: BaseModel): Promise<string>;
|
|
16
25
|
linkedBaseStyle(styleElement: HTMLStyleElement, app: BaseModel): boolean;
|
|
@@ -26,7 +26,7 @@ export declare class MicroInstanceModel implements BaseModel {
|
|
|
26
26
|
onMount(): void;
|
|
27
27
|
registerRunningApp(): void;
|
|
28
28
|
start(): Promise<void>;
|
|
29
|
+
unmount(needDestroy?: boolean): void;
|
|
29
30
|
set status(v: AppState);
|
|
30
31
|
get status(): AppState;
|
|
31
|
-
unmount(needDestroy?: boolean): void;
|
|
32
32
|
}
|
package/CHANGELOG.md
DELETED
|
File without changes
|