@lwc/engine-core 6.3.3 → 6.4.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/dist/framework/api.d.ts +3 -3
- package/dist/framework/main.d.ts +1 -0
- package/dist/framework/modules/attrs.d.ts +2 -2
- package/dist/framework/modules/computed-class-attr.d.ts +3 -2
- package/dist/framework/modules/computed-style-attr.d.ts +3 -2
- package/dist/framework/modules/events.d.ts +2 -2
- package/dist/framework/modules/refs.d.ts +2 -2
- package/dist/framework/modules/static-parts.d.ts +17 -3
- package/dist/framework/modules/text.d.ts +5 -0
- package/dist/framework/template.d.ts +2 -2
- package/dist/framework/utils.d.ts +0 -20
- package/dist/framework/vm.d.ts +8 -6
- package/dist/framework/vnodes.d.ts +19 -1
- package/dist/index.cjs.js +353 -110
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +354 -111
- package/dist/index.js.map +1 -1
- package/dist/libs/signal-tracker/index.d.ts +1 -1
- package/package.json +5 -5
package/dist/framework/api.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SlotSet } from './vm';
|
|
2
2
|
import { LightningElementConstructor } from './base-lightning-element';
|
|
3
|
-
import { Key, VComment, VCustomElement, VElement, VElementData, VFragment, VNode, VNodes, VScopedSlotFragment, VStatic,
|
|
4
|
-
declare function sp(partId: number, data: VStaticPartData): VStaticPart;
|
|
3
|
+
import { Key, VComment, VCustomElement, VElement, VElementData, VFragment, VNode, VNodes, VScopedSlotFragment, VStatic, VStaticPart, VStaticPartData, VText } from './vnodes';
|
|
4
|
+
declare function sp(partId: number, data: VStaticPartData | null, text: string | null): VStaticPart;
|
|
5
5
|
declare function ssf(slotName: unknown, factory: (value: any, key: any) => VFragment): VScopedSlotFragment;
|
|
6
|
-
declare function st(
|
|
6
|
+
declare function st(fragmentFactory: (parts?: VStaticPart[]) => Element, key: Key, parts?: VStaticPart[]): VStatic;
|
|
7
7
|
declare function fr(key: Key, children: VNodes, stable: 0 | 1): VFragment;
|
|
8
8
|
declare function h(sel: string, data: VElementData, children?: VNodes): VElement;
|
|
9
9
|
declare function ti(value: any): number;
|
package/dist/framework/main.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export { shouldBeFormAssociated } from './utils';
|
|
|
19
19
|
export { getComponentConstructor } from './get-component-constructor';
|
|
20
20
|
export type { RendererAPI, LifecycleCallback } from './renderer';
|
|
21
21
|
export type { ConfigValue as WireConfigValue, ContextValue as WireContextValue, DataCallback, WireAdapter, WireAdapterConstructor, WireAdapterSchemaValue, WireContextSubscriptionPayload, WireContextSubscriptionCallback, } from './wiring';
|
|
22
|
+
export type { FormRestoreState, FormRestoreReason } from './vm';
|
|
22
23
|
export { LightningElement } from './base-lightning-element';
|
|
23
24
|
export { default as api } from './decorators/api';
|
|
24
25
|
export { default as track } from './decorators/track';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RendererAPI } from '../renderer';
|
|
2
|
-
import { VBaseElement, VStatic } from '../vnodes';
|
|
3
|
-
export declare function patchAttributes(oldVnode: VBaseElement | null, vnode: VBaseElement, renderer: RendererAPI): void;
|
|
2
|
+
import { VBaseElement, VStatic, VStaticPartElement } from '../vnodes';
|
|
3
|
+
export declare function patchAttributes(oldVnode: VBaseElement | VStaticPartElement | null, vnode: VBaseElement | VStaticPartElement, renderer: RendererAPI): void;
|
|
4
4
|
export declare function patchSlotAssignment(oldVnode: VBaseElement | VStatic | null, vnode: VBaseElement | VStatic, renderer: RendererAPI): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { RendererAPI } from '../renderer';
|
|
2
|
-
import { VBaseElement } from '../vnodes';
|
|
3
|
-
export declare function
|
|
2
|
+
import { VBaseElement, VStaticPartElement } from '../vnodes';
|
|
3
|
+
export declare function getMapFromClassName(className: string | undefined): Record<string, boolean>;
|
|
4
|
+
export declare function patchClassAttribute(oldVnode: VBaseElement | VStaticPartElement | null, vnode: VBaseElement | VStaticPartElement, renderer: RendererAPI): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { RendererAPI } from '../renderer';
|
|
2
|
-
import { VBaseElement } from '../vnodes';
|
|
3
|
-
|
|
2
|
+
import { VBaseElement, VStaticPartElement } from '../vnodes';
|
|
3
|
+
import { VM } from '../vm';
|
|
4
|
+
export declare function patchStyleAttribute(oldVnode: VBaseElement | VStaticPartElement | null, vnode: VBaseElement | VStaticPartElement, renderer: RendererAPI, owner: VM): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RendererAPI } from '../renderer';
|
|
2
|
-
import { VBaseElement,
|
|
3
|
-
export declare function applyEventListeners(vnode: VBaseElement |
|
|
2
|
+
import { VBaseElement, VStaticPartElement } from '../vnodes';
|
|
3
|
+
export declare function applyEventListeners(vnode: VBaseElement | VStaticPartElement, renderer: RendererAPI): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { VM } from '../vm';
|
|
2
|
-
import { VBaseElement,
|
|
3
|
-
export declare function applyRefs(vnode: VBaseElement |
|
|
2
|
+
import { VBaseElement, VStaticPartElement } from '../vnodes';
|
|
3
|
+
export declare function applyRefs(vnode: VBaseElement | VStaticPartElement, owner: VM): void;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import { VStatic } from '../vnodes';
|
|
1
|
+
import { VStatic, VStaticPart } from '../vnodes';
|
|
2
2
|
import { RendererAPI } from '../renderer';
|
|
3
|
+
/**
|
|
4
|
+
* Given an array of static parts, mounts the DOM element to the part based on the staticPartId
|
|
5
|
+
* @param root the root element
|
|
6
|
+
* @param parts an array of VStaticParts
|
|
7
|
+
* @param renderer the renderer to use
|
|
8
|
+
*/
|
|
9
|
+
export declare function traverseAndSetElements(root: Element, parts: VStaticPart[], renderer: RendererAPI): void;
|
|
3
10
|
/**
|
|
4
11
|
* Given an array of static parts, do all the mounting required for these parts.
|
|
5
12
|
* @param root the root element
|
|
@@ -8,8 +15,15 @@ import { RendererAPI } from '../renderer';
|
|
|
8
15
|
*/
|
|
9
16
|
export declare function mountStaticParts(root: Element, vnode: VStatic, renderer: RendererAPI): void;
|
|
10
17
|
/**
|
|
11
|
-
*
|
|
18
|
+
* Updates the static elements based on the content of the VStaticParts
|
|
12
19
|
* @param n1 the previous VStatic vnode
|
|
13
20
|
* @param n2 the current VStatic vnode
|
|
21
|
+
* @param renderer the renderer to use
|
|
22
|
+
*/
|
|
23
|
+
export declare function patchStaticParts(n1: VStatic, n2: VStatic, renderer: RendererAPI): void;
|
|
24
|
+
/**
|
|
25
|
+
* Mounts the hydration specific attributes
|
|
26
|
+
* @param vnode the parent VStatic node
|
|
27
|
+
* @param renderer the renderer to use
|
|
14
28
|
*/
|
|
15
|
-
export declare function
|
|
29
|
+
export declare function hydrateStaticParts(vnode: VStatic, renderer: RendererAPI): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RendererAPI } from '../renderer';
|
|
2
|
+
import { VComment, VStaticPartText, VText } from '../vnodes';
|
|
3
|
+
export declare function patchTextVNode(n1: VText, n2: VText, renderer: RendererAPI): void;
|
|
4
|
+
export declare function patchTextVStaticPart(n1: VStaticPartText | null, n2: VStaticPartText, renderer: RendererAPI): void;
|
|
5
|
+
export declare function updateTextContent(vnode: VText | VComment | VStaticPartText, renderer: RendererAPI): void;
|
|
@@ -20,8 +20,8 @@ export interface Template {
|
|
|
20
20
|
export declare let isUpdatingTemplate: boolean;
|
|
21
21
|
export declare function getVMBeingRendered(): VM | null;
|
|
22
22
|
export declare function setVMBeingRendered(vm: VM | null): void;
|
|
23
|
-
export declare const parseFragment: (strings: string[], ...keys: number[]) => () => Element;
|
|
24
|
-
export declare const parseSVGFragment: (strings: string[], ...keys: number[]) => () => Element;
|
|
23
|
+
export declare const parseFragment: (strings: string[], ...keys: (string | number)[]) => () => Element;
|
|
24
|
+
export declare const parseSVGFragment: (strings: string[], ...keys: (string | number)[]) => () => Element;
|
|
25
25
|
export declare function evaluateTemplate(vm: VM, html: Template): VNodes;
|
|
26
26
|
export declare function computeHasScopedStyles(template: Template, vm: VM | undefined): boolean;
|
|
27
27
|
export declare function hasStyles(stylesheets: TemplateStylesheetFactories | undefined | null): stylesheets is TemplateStylesheetFactories;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { StylesheetFactory, TemplateStylesheetFactories } from './stylesheet';
|
|
2
2
|
import { LightningElementConstructor } from './base-lightning-element';
|
|
3
|
-
import { VElementData } from './vnodes';
|
|
4
3
|
type Callback = () => void;
|
|
5
4
|
export declare const SPACE_CHAR = 32;
|
|
6
5
|
export declare const EmptyObject: any;
|
|
@@ -18,24 +17,5 @@ export declare function cloneAndOmitKey(object: {
|
|
|
18
17
|
};
|
|
19
18
|
export declare function flattenStylesheets(stylesheets: TemplateStylesheetFactories): StylesheetFactory[];
|
|
20
19
|
export declare function assertNotProd(): void;
|
|
21
|
-
export declare function applyTemporaryCompilerV5SlotFix(data: VElementData): VElementData | {
|
|
22
|
-
attrs: {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
};
|
|
25
|
-
slotAssignment: string;
|
|
26
|
-
key: import("./vnodes").Key;
|
|
27
|
-
external?: boolean | undefined;
|
|
28
|
-
ref?: string | undefined;
|
|
29
|
-
slotData?: any;
|
|
30
|
-
props?: Readonly<Record<string, any>> | undefined;
|
|
31
|
-
className?: string | undefined;
|
|
32
|
-
style?: string | undefined;
|
|
33
|
-
classMap?: Readonly<Record<string, boolean>> | undefined;
|
|
34
|
-
styleDecls?: readonly [string, string, boolean][] | undefined;
|
|
35
|
-
context?: Readonly<Record<string, Readonly<Record<string, any>>>> | undefined;
|
|
36
|
-
on?: Readonly<Record<string, (event: Event) => any>> | undefined;
|
|
37
|
-
svg?: boolean | undefined;
|
|
38
|
-
renderer?: import("./renderer").RendererAPI | undefined;
|
|
39
|
-
};
|
|
40
20
|
export declare function shouldBeFormAssociated(Ctor: LightningElementConstructor): boolean;
|
|
41
21
|
export {};
|
package/dist/framework/vm.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Template } from './template';
|
|
|
4
4
|
import { ComponentDef } from './def';
|
|
5
5
|
import { LightningElement, LightningElementConstructor } from './base-lightning-element';
|
|
6
6
|
import { ReactiveObserver } from './mutation-tracker';
|
|
7
|
-
import { VNodes, VCustomElement, VNode, VBaseElement,
|
|
7
|
+
import { VNodes, VCustomElement, VNode, VBaseElement, VStaticPartElement } from './vnodes';
|
|
8
8
|
import { TemplateStylesheetFactories } from './stylesheet';
|
|
9
9
|
type ShadowRootMode = 'open' | 'closed';
|
|
10
10
|
export interface TemplateCache {
|
|
@@ -65,7 +65,7 @@ export interface Context {
|
|
|
65
65
|
wiredDisconnecting: Array<() => void>;
|
|
66
66
|
}
|
|
67
67
|
export type RefVNodes = {
|
|
68
|
-
[name: string]: VBaseElement |
|
|
68
|
+
[name: string]: VBaseElement | VStaticPartElement;
|
|
69
69
|
};
|
|
70
70
|
export interface VM<N = HostNode, E = HostElement> {
|
|
71
71
|
/** The host element */
|
|
@@ -191,10 +191,12 @@ export declare function resetComponentRoot(vm: VM): void;
|
|
|
191
191
|
export declare function scheduleRehydration(vm: VM): void;
|
|
192
192
|
export declare function runWithBoundaryProtection(vm: VM, owner: VM | null, pre: () => void, job: () => void, post: () => void): void;
|
|
193
193
|
export declare function forceRehydration(vm: VM): void;
|
|
194
|
-
export declare function runFormAssociatedCustomElementCallback(vm: VM, faceCb: () => void): void;
|
|
195
|
-
export declare function runFormAssociatedCallback(elm: HTMLElement): void;
|
|
196
|
-
export declare function runFormDisabledCallback(elm: HTMLElement): void;
|
|
194
|
+
export declare function runFormAssociatedCustomElementCallback(vm: VM, faceCb: () => void, args?: any[]): void;
|
|
195
|
+
export declare function runFormAssociatedCallback(elm: HTMLElement, form: HTMLFormElement | null): void;
|
|
196
|
+
export declare function runFormDisabledCallback(elm: HTMLElement, disabled: boolean): void;
|
|
197
197
|
export declare function runFormResetCallback(elm: HTMLElement): void;
|
|
198
|
-
export
|
|
198
|
+
export type FormRestoreState = File | string | Array<[string, FormDataEntryValue]>;
|
|
199
|
+
export type FormRestoreReason = 'restore' | 'autocomplete';
|
|
200
|
+
export declare function runFormStateRestoreCallback(elm: HTMLElement, state: FormRestoreState | null, reason: FormRestoreReason): void;
|
|
199
201
|
export declare function resetRefVNodes(vm: VM): void;
|
|
200
202
|
export {};
|
|
@@ -10,6 +10,10 @@ export declare const enum VNodeType {
|
|
|
10
10
|
Fragment = 5,
|
|
11
11
|
ScopedSlotFragment = 6
|
|
12
12
|
}
|
|
13
|
+
export declare const enum VStaticPartType {
|
|
14
|
+
Text = 0,
|
|
15
|
+
Element = 1
|
|
16
|
+
}
|
|
13
17
|
export type VNode = VText | VComment | VElement | VCustomElement | VStatic | VFragment | VScopedSlotFragment;
|
|
14
18
|
export type VNodes = Readonly<Array<VNode | null>>;
|
|
15
19
|
export interface BaseVParent {
|
|
@@ -28,11 +32,23 @@ export interface VScopedSlotFragment extends BaseVNode {
|
|
|
28
32
|
slotName: unknown;
|
|
29
33
|
}
|
|
30
34
|
export interface VStaticPart {
|
|
35
|
+
readonly type: VStaticPartType;
|
|
31
36
|
readonly partId: number;
|
|
37
|
+
readonly data: VStaticPartData | null;
|
|
38
|
+
readonly text: string | null;
|
|
39
|
+
elm: Element | Text | undefined;
|
|
40
|
+
}
|
|
41
|
+
export interface VStaticPartElement extends VStaticPart {
|
|
42
|
+
readonly type: VStaticPartType.Element;
|
|
32
43
|
readonly data: VStaticPartData;
|
|
33
44
|
elm: Element | undefined;
|
|
34
45
|
}
|
|
35
|
-
export
|
|
46
|
+
export interface VStaticPartText extends VStaticPart {
|
|
47
|
+
readonly type: VStaticPartType.Text;
|
|
48
|
+
readonly text: string;
|
|
49
|
+
elm: Text | undefined;
|
|
50
|
+
}
|
|
51
|
+
export type VStaticPartData = Pick<VElementData, 'on' | 'ref' | 'attrs' | 'style' | 'className'>;
|
|
36
52
|
export interface VStatic extends BaseVNode {
|
|
37
53
|
readonly type: VNodeType.Static;
|
|
38
54
|
readonly sel: undefined;
|
|
@@ -103,3 +119,5 @@ export declare function isVCustomElement(vnode: VNode | VBaseElement): vnode is
|
|
|
103
119
|
export declare function isVFragment(vnode: VNode): vnode is VFragment;
|
|
104
120
|
export declare function isVScopedSlotFragment(vnode: VNode): vnode is VScopedSlotFragment;
|
|
105
121
|
export declare function isVStatic(vnode: VNode): vnode is VStatic;
|
|
122
|
+
export declare function isVStaticPartElement(vnode: VStaticPart): vnode is VStaticPartElement;
|
|
123
|
+
export declare function isVStaticPartText(vnode: VStaticPart): vnode is VStaticPartText;
|