dothtml-interfaces 0.3.9 → 0.3.11
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/package.json +1 -1
- package/src/i-component.d.ts +5 -9
- package/src/i-dot.d.ts +2 -2
package/package.json
CHANGED
package/src/i-component.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface FrameworkItems {
|
|
|
18
18
|
readonly shadowRoot: ShadowRoot;
|
|
19
19
|
readonly isRendered: boolean;
|
|
20
20
|
readonly tagName: string;
|
|
21
|
+
readonly styles: Array<string>;
|
|
21
22
|
readonly args: Array<any>;
|
|
22
23
|
// readonly styleElement: HTMLStyleElement;
|
|
23
24
|
readonly sharedStyles: CSSStyleSheet[];
|
|
@@ -42,24 +43,19 @@ export default interface IComponent/*<TProps extends Array<string> = [], TEvents
|
|
|
42
43
|
// Lifecycle hooks
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
|
-
* A function returning DOThtml (required).
|
|
46
|
+
* A function returning DOThtml (required). The `build` hook is called once per component instance, and constructs the component's virtual DOM.
|
|
46
47
|
*/
|
|
47
48
|
build(): IDotDocument;
|
|
48
49
|
|
|
49
|
-
/**
|
|
50
|
-
* An optional function that is called after builder that stylizes the component using a scoped style builder.
|
|
51
|
-
*/
|
|
52
|
-
style?(css: IDotCss): void;
|
|
53
|
-
|
|
54
50
|
/**
|
|
55
51
|
* An optional function that gets called before the component is created, scoped to the new component object.
|
|
56
52
|
*/
|
|
57
53
|
creating?(): void;
|
|
58
54
|
|
|
59
55
|
/**
|
|
60
|
-
* An optional function called after the element has been
|
|
56
|
+
* An optional function called after the element has been mounted. May be called mulitple times if the component is rerendered.
|
|
61
57
|
*/
|
|
62
|
-
|
|
58
|
+
mounted?(): void;
|
|
63
59
|
|
|
64
60
|
/**
|
|
65
61
|
* An optional function called before the component is deleted.
|
|
@@ -72,7 +68,7 @@ export default interface IComponent/*<TProps extends Array<string> = [], TEvents
|
|
|
72
68
|
deleted?(): void;
|
|
73
69
|
|
|
74
70
|
/**
|
|
75
|
-
* An optional function called after the component is built.
|
|
71
|
+
* An optional function called after the component is built. Is only called once per component instance.
|
|
76
72
|
*/
|
|
77
73
|
built?(): void;
|
|
78
74
|
}
|
package/src/i-dot.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ type AttrVal<T = string | number | boolean> = T | IReactive<T>;
|
|
|
16
16
|
*/
|
|
17
17
|
export interface IDotDocument {
|
|
18
18
|
// Creating a blank DotDocument.
|
|
19
|
-
(document?: Element, classPrefix?: number, targetWindow?: Window): void;
|
|
19
|
+
// (document?: Element, classPrefix?: number, targetWindow?: Window): void;
|
|
20
20
|
|
|
21
21
|
// Internal use only:
|
|
22
22
|
// Removed in v6.
|
|
@@ -362,7 +362,7 @@ export type ComponentArgs<TProps extends Array<string> = [], TEvents extends Arr
|
|
|
362
362
|
* Interface for the dot object.
|
|
363
363
|
*/
|
|
364
364
|
export interface IDotCore extends IDotDocument {
|
|
365
|
-
(targetSelector: string | Element | Node | NodeList | Array<Node | Element
|
|
365
|
+
(targetSelector: string | Element | Node | NodeList | Array<Node | Element>, targetWindow?: Window): IDotDocument;
|
|
366
366
|
|
|
367
367
|
version: string;
|
|
368
368
|
styleMode: "sync" | "async";
|