@lwc/engine-core 2.9.0 → 2.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lwc/engine-core",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
4
4
  "description": "Core LWC engine APIs.",
5
5
  "homepage": "https://lwc.dev/",
6
6
  "repository": {
@@ -24,8 +24,8 @@
24
24
  "types/"
25
25
  ],
26
26
  "dependencies": {
27
- "@lwc/features": "2.9.0",
28
- "@lwc/shared": "2.9.0"
27
+ "@lwc/features": "2.10.0",
28
+ "@lwc/shared": "2.10.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "observable-membrane": "2.0.0"
@@ -0,0 +1,11 @@
1
+ import { Template } from './template';
2
+ import { StylesheetFactory } from './stylesheet';
3
+ import { LightningElementConstructor } from './base-lightning-element';
4
+ /**
5
+ * Validate a template, stylesheet, or component to make sure that its compiled version matches
6
+ * the version used by the LWC engine at runtime. Note that this only works in dev mode because
7
+ * it relies on code comments, which are stripped in production due to minification.
8
+ */
9
+ export declare function checkVersionMismatch(func: Template, type: 'template'): void;
10
+ export declare function checkVersionMismatch(func: StylesheetFactory, type: 'stylesheet'): void;
11
+ export declare function checkVersionMismatch(func: LightningElementConstructor, type: 'component'): void;
@@ -1,3 +1,3 @@
1
1
  import { VM } from './vm';
2
2
  import { VNodes } from './vnodes';
3
- export declare function hydrateChildren(elmChildren: NodeListOf<ChildNode>, children: VNodes, vm: VM): void;
3
+ export declare function hydrateChildren(elmChildren: NodeList, children: VNodes, vm: VM): void;
@@ -1,9 +1,5 @@
1
1
  import { VM } from './vm';
2
- import { VNodes, VCustomElement, VElement, VText, VComment, Hooks } from './vnodes';
3
- export declare const TextHook: Hooks<VText>;
4
- export declare const CommentHook: Hooks<VComment>;
5
- export declare const ElementHook: Hooks<VElement>;
6
- export declare const CustomElementHook: Hooks<VCustomElement>;
7
- export declare function patchChildren(parent: ParentNode, oldCh: VNodes, newCh: VNodes): void;
2
+ import { VNodes, VCustomElement } from './vnodes';
3
+ export declare function patchChildren(c1: VNodes, c2: VNodes, parent: ParentNode): void;
8
4
  export declare function allocateChildren(vnode: VCustomElement, vm: VM): void;
9
5
  export declare function markAsDynamicChildren(children: VNodes): void;
@@ -1,3 +1,4 @@
1
+ import { StylesheetFactory, TemplateStylesheetFactories } from './stylesheet';
1
2
  declare type Callback = () => void;
2
3
  export declare const SPACE_CHAR = 32;
3
4
  export declare const EmptyObject: any;
@@ -12,4 +13,5 @@ export declare function cloneAndOmitKey(object: {
12
13
  }, keyToOmit: string): {
13
14
  [key: string]: any;
14
15
  };
16
+ export declare function flattenStylesheets(stylesheets: TemplateStylesheetFactories): StylesheetFactory[];
15
17
  export {};
@@ -14,7 +14,6 @@ export interface BaseVNode {
14
14
  elm: Node | undefined;
15
15
  sel: string | undefined;
16
16
  key: Key | undefined;
17
- hook: Hooks<any>;
18
17
  owner: VM;
19
18
  }
20
19
  export interface VText extends BaseVNode {
@@ -43,7 +42,8 @@ export interface VCustomElement extends VBaseElement {
43
42
  type: VNodeType.CustomElement;
44
43
  mode: 'closed' | 'open';
45
44
  ctor: any;
46
- aChildren?: VNodes;
45
+ aChildren: VNodes | undefined;
46
+ vm: VM | undefined;
47
47
  }
48
48
  export interface VNodeData {
49
49
  readonly props?: Readonly<Record<string, any>>;
@@ -59,12 +59,5 @@ export interface VNodeData {
59
59
  export interface VElementData extends VNodeData {
60
60
  readonly key: Key;
61
61
  }
62
- export interface Hooks<N extends VNode> {
63
- create: (vNode: N) => void;
64
- insert: (vNode: N, parentNode: Node, referenceNode: Node | null) => void;
65
- move: (vNode: N, parentNode: Node, referenceNode: Node | null) => void;
66
- update: (oldVNode: N, vNode: N) => void;
67
- remove: (vNode: N, parentNode: Node) => void;
68
- }
69
62
  export declare function isVBaseElement(vnode: VNode): vnode is VElement | VCustomElement;
70
63
  export declare function isSameVnode(vnode1: VNode, vnode2: VNode): boolean;