@lwc/engine-core 2.9.0 → 2.11.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/dist/engine-core.cjs.js +3651 -4805
- package/dist/engine-core.js +3652 -4806
- package/package.json +3 -3
- package/types/framework/check-version-mismatch.d.ts +11 -0
- package/types/framework/component.d.ts +2 -2
- package/types/framework/hydration.d.ts +1 -1
- package/types/framework/rendering.d.ts +2 -6
- package/types/framework/utils.d.ts +2 -0
- package/types/framework/vnodes.d.ts +2 -9
- package/types/renderer.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lwc/engine-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.1",
|
|
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.
|
|
28
|
-
"@lwc/shared": "2.
|
|
27
|
+
"@lwc/features": "2.11.1",
|
|
28
|
+
"@lwc/shared": "2.11.1"
|
|
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;
|
|
@@ -7,9 +7,9 @@ import { VNodes } from './vnodes';
|
|
|
7
7
|
* INTERNAL: This function can only be invoked by compiled code. The compiler
|
|
8
8
|
* will prevent this function from being imported by userland code.
|
|
9
9
|
*/
|
|
10
|
-
export declare function registerComponent(Ctor:
|
|
10
|
+
export declare function registerComponent(Ctor: any, { tmpl }: {
|
|
11
11
|
tmpl: Template;
|
|
12
|
-
}):
|
|
12
|
+
}): any;
|
|
13
13
|
export declare function getComponentRegisteredTemplate(Ctor: LightningElementConstructor): Template | undefined;
|
|
14
14
|
export declare function getTemplateReactiveObserver(vm: VM): ReactiveObserver;
|
|
15
15
|
export declare function renderComponent(vm: VM): VNodes;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { VM } from './vm';
|
|
2
|
-
import { VNodes, VCustomElement
|
|
3
|
-
export declare
|
|
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
|
|
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;
|
package/types/renderer.d.ts
CHANGED
|
@@ -108,7 +108,7 @@ export declare function setIsConnected(isConnectedImpl: isConnectedFunc): void;
|
|
|
108
108
|
declare type insertGlobalStylesheetFunc = (content: string) => void;
|
|
109
109
|
export declare let insertGlobalStylesheet: insertGlobalStylesheetFunc;
|
|
110
110
|
export declare function setInsertGlobalStylesheet(insertGlobalStylesheetImpl: insertGlobalStylesheetFunc): void;
|
|
111
|
-
declare type insertStylesheetFunc = (content: string, target:
|
|
111
|
+
declare type insertStylesheetFunc = (content: string, target: ShadowRoot) => void;
|
|
112
112
|
export declare let insertStylesheet: insertStylesheetFunc;
|
|
113
113
|
export declare function setInsertStylesheet(insertStylesheetImpl: insertStylesheetFunc): void;
|
|
114
114
|
declare type assertInstanceOfHTMLElementFunc = (elm: any, msg: string) => void;
|