compelem 0.20.0-b2 → 0.20.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/constants.d.ts CHANGED
@@ -15,13 +15,25 @@ export declare enum Mode {
15
15
  Prod = "prod",
16
16
  Dev = "dev"
17
17
  }
18
- export declare const DefinitionCompEventMap: Map<string, Record<string, any>[]>;
18
+ export declare const DefinitionCompEventMap: Map<Function, Record<string, any>[]>;
19
19
  export declare const DefinitionTagMap: Record<string, string>;
20
- export declare const DefinitionWatchMap: Map<string, Record<string, Record<string, any>[]>>;
21
- export declare const DefinitionComputedMap: Map<string, Record<string, Getter>>;
22
- export declare const DefinitionStateMap: Map<string, Record<string, StateOption>>;
23
- export declare const DefinitionPropMap: Map<string, Record<string, PropOption>>;
24
- export declare const DefinitionDecoratorMap: Map<string, DecoratorWrapper[]>;
25
- export declare const ObservedAttrsMap: Map<string, Set<string>>;
20
+ export declare const DefinitionComputedMap: WeakMap<Function, Record<string, Getter>>;
21
+ export declare const DefinitionStateMap: WeakMap<Function, Record<string, StateOption>>;
22
+ export declare const DefinitionPropMap: WeakMap<Function, Record<string, PropOption>>;
23
+ export declare const DefinitionDecoratorMap: Map<Function, DecoratorWrapper[]>;
24
+ export declare const ObservedAttrsMap: Map<Function, Set<string>>;
25
+ export declare const WatchKeysOnceMap: WeakMap<Function, Map<string, boolean>>;
26
+ export declare const WatchKeysDeepListMap: WeakMap<Function, string[]>;
27
+ export declare const WatchKeysListMap: WeakMap<Function, string[]>;
28
+ export declare const WatchUpdateMap: WeakMap<Function, Record<string, Set<Function>>>;
29
+ export declare const WatchDeepUpdateMap: WeakMap<Function, Record<string, Set<Function>>>;
30
+ export declare const WatchImmediateListMap: WeakMap<Function, Record<string, Set<Function>>>;
31
+ export declare const PropSyncKeySetMap: WeakMap<Function, Set<string>>;
32
+ export declare const StateShallowKeySetMap: WeakMap<Function, Set<string>>;
33
+ export declare const HasChangedPropOrStateMap: WeakMap<Function, Map<string, Function>>;
34
+ export declare const ComputedUpdateDepsMap: WeakMap<Function, Map<string, Set<Function>>>;
35
+ export declare const CssUpdateDepsMap: WeakMap<Function, Set<string>>;
26
36
  export declare const ComponentDynamicCssUpdaterMap: WeakMap<CompElem<any>, Map<Function, CSSStyleSheet>>;
27
37
  export declare const PATH_SEPARATOR = "-";
38
+ export declare const PROP_NAME_SLOTS = "slots";
39
+ export declare const DATA_KEY = "__data_";
@@ -4,4 +4,4 @@ import { CompElem } from "../CompElem";
4
4
  * @param eventName 事件名,含修饰参数。同视图模板中的事件名
5
5
  * @param eventTarget 事件绑定目标,默认this
6
6
  */
7
- export declare function event(eventName: string, eventTarget?: (comp?: CompElem) => (HTMLElement | Promise<HTMLElement> | Window)): (target: any, name: string, descriptor: PropertyDescriptor) => void;
7
+ export declare function event(eventName: string, eventTarget?: (comp: CompElem) => (HTMLElement | Promise<HTMLElement> | Window)): (target: any, name: string, descriptor: PropertyDescriptor) => void;
package/events/event.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { CompElem } from "../CompElem";
2
2
  export type EvHadler = (ev: Event) => any;
3
- export declare function addEvent(fullName: string, cbk: EvHadler, node: Element, component: CompElem<any>): ((remove?: boolean) => void) | undefined;
3
+ export declare function addEvent(fullName: string, cbk: EvHadler, node: Element, component: CompElem<any>): void | ((remove?: boolean) => void);
package/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { CssTemplate } from './render/CssTemplate';
2
- import { buildHTML, createRef, css, html } from "./render/render";
1
+ import { buildHTML, createRef, html } from "./render/render";
3
2
  import { Template } from './render/Template';
4
3
  export * from "./decorator/Decorator";
5
4
  export * from "./decorator/index";
@@ -27,7 +26,7 @@ export * from "./directives/Slot";
27
26
  export * from "./directives/Styles";
28
27
  export * from "./directives/Sync";
29
28
  export * from "./directives/When";
30
- export { buildHTML, createRef, css, CssTemplate, html, Template };
29
+ export { buildHTML, createRef, html, Template };
31
30
  export * from './CompElem';
32
31
  export * from './types';
33
32
  export * from './utils';