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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dothtml-interfaces",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "Dependency injection interfaces for DOTHtml.",
5
5
  "main": "src/index.d.ts",
6
6
  "types": "src/index.d.ts",
@@ -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 added. One parameter will be provided containing the added element.
56
+ * An optional function called after the element has been mounted. May be called mulitple times if the component is rerendered.
61
57
  */
62
- ready?(): void;
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>): IDotDocument;
365
+ (targetSelector: string | Element | Node | NodeList | Array<Node | Element>, targetWindow?: Window): IDotDocument;
366
366
 
367
367
  version: string;
368
368
  styleMode: "sync" | "async";