compelem 0.20.0-b2 → 0.20.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/CompElem.d.ts +19 -47
- package/IComponent.d.ts +4 -19
- package/README.md +63 -41
- package/constants.d.ts +19 -7
- package/decorators/event.d.ts +1 -1
- package/events/event.d.ts +1 -1
- package/index.d.ts +2 -3
- package/index.js +2 -4176
- package/package.json +1 -1
- package/reactive.d.ts +3 -1
- package/render/CssTemplate.d.ts +3 -3
- package/render/render.d.ts +1 -8
- package/compelem.umd.js +0 -4245
package/package.json
CHANGED
package/reactive.d.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { CompElem } from "./CompElem";
|
|
6
6
|
import { UpdatePoint, Updater } from "./types";
|
|
7
|
+
export declare function getterValue(getter: Function | undefined, propertyKey: string, context: CompElem): any;
|
|
8
|
+
export declare function setterValue(propertyKey: string, v: any, context: CompElem): true | undefined;
|
|
7
9
|
export declare const Collector: {
|
|
8
10
|
popDirectiveQ(): string[];
|
|
9
11
|
start(): void;
|
|
@@ -14,7 +16,7 @@ export declare const Collector: {
|
|
|
14
16
|
};
|
|
15
17
|
export declare const OBJECT_VAR_PATH: WeakMap<any, string[]>;
|
|
16
18
|
export declare const PROXY_MAP: WeakMap<Record<string, any>, ProxyConstructor>;
|
|
17
|
-
export declare const EXTRA_CONTEXT_OF_VAR: WeakMap<any, Set<CompElem<any
|
|
19
|
+
export declare const EXTRA_CONTEXT_OF_VAR: WeakMap<any, Set<WeakRef<CompElem<any>>>>;
|
|
18
20
|
export declare function reactive(obj: Record<string, any>, context: CompElem<any>, rootProp?: string): ProxyConstructor;
|
|
19
21
|
export declare function notifyUpdate(context: CompElem, oldValue: any, path: string[], subNewValue?: any, subOldValue?: any): void;
|
|
20
22
|
export declare class Queue {
|
package/render/CssTemplate.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CompElem } from "../CompElem";
|
|
2
1
|
/**
|
|
3
2
|
* 样式模板
|
|
4
3
|
* @author holyhigh2
|
|
@@ -6,7 +5,8 @@ import { CompElem } from "../CompElem";
|
|
|
6
5
|
export declare class CssTemplate {
|
|
7
6
|
strings: Array<string>;
|
|
8
7
|
vars: Array<any>;
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
deps: Array<string> | undefined;
|
|
9
|
+
constructor(strings: Array<string>, vars: Array<any>, deps?: Array<string>);
|
|
10
|
+
getCss(): string;
|
|
11
11
|
destroy(): void;
|
|
12
12
|
}
|
package/render/render.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CompElem } from "../CompElem";
|
|
2
2
|
import { UpdatePoint } from "../types";
|
|
3
|
-
import { CssTemplate } from "./CssTemplate";
|
|
4
3
|
import { Template } from "./Template";
|
|
5
4
|
export declare const ATTR_PREFIX_EVENT = "@";
|
|
6
5
|
export declare const ATTR_PREFIX_PROP = ".";
|
|
@@ -20,7 +19,7 @@ export declare const PLACEHOLDER_EXP: RegExp;
|
|
|
20
19
|
* 构建模板为DOM结构
|
|
21
20
|
* @param html
|
|
22
21
|
*/
|
|
23
|
-
export declare function buildTmplate(updatePoints: Array<UpdatePoint>, html: string, vars: any[], renderComponent: CompElem
|
|
22
|
+
export declare function buildTmplate(updatePoints: Array<UpdatePoint>, html: string, vars: any[], renderComponent: CompElem): NodeListOf<ChildNode>;
|
|
24
23
|
export declare function buildView(tmpl: Template, component: CompElem<any>): NodeListOf<ChildNode>;
|
|
25
24
|
export declare function buildSubView(pointNode: Comment, tmpl: Template, component: CompElem<any>, po: UpdatePoint, bindEvent?: boolean): NodeListOf<ChildNode>;
|
|
26
25
|
export declare function updateView(tmpl: Template, renderComponent: CompElem<any>, updatePoints: UpdatePoint[], changedKeys?: string[]): void;
|
|
@@ -31,12 +30,6 @@ export declare function updateSubScopeView(subScopeUpdatePoint: UpdatePoint, ren
|
|
|
31
30
|
* @param vars
|
|
32
31
|
*/
|
|
33
32
|
export declare function html(strings: TemplateStringsArray, ...vars: any): Template;
|
|
34
|
-
/**
|
|
35
|
-
* 标签函数,用于构建样式
|
|
36
|
-
* @param strings
|
|
37
|
-
* @param vars
|
|
38
|
-
*/
|
|
39
|
-
export declare function css(strings: TemplateStringsArray, ...vars: any): CssTemplate;
|
|
40
33
|
declare class RefObject<T extends Node> {
|
|
41
34
|
#private;
|
|
42
35
|
get current(): T | undefined;
|