@lwc/engine-core 8.8.0 → 8.10.0-alpha.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.
Files changed (47) hide show
  1. package/dist/framework/api.d.ts +4 -4
  2. package/dist/framework/base-bridge-element.d.ts +1 -1
  3. package/dist/framework/base-lightning-element.d.ts +4 -13
  4. package/dist/framework/check-version-mismatch.d.ts +2 -2
  5. package/dist/framework/component.d.ts +6 -6
  6. package/dist/framework/decorators/register.d.ts +2 -2
  7. package/dist/framework/def.d.ts +7 -5
  8. package/dist/framework/freeze-template.d.ts +1 -1
  9. package/dist/framework/get-component-constructor.d.ts +1 -1
  10. package/dist/framework/hot-swaps.d.ts +3 -3
  11. package/dist/framework/hydration.d.ts +1 -1
  12. package/dist/framework/invoker.d.ts +3 -3
  13. package/dist/framework/modules/attrs.d.ts +2 -2
  14. package/dist/framework/modules/computed-class-attr.d.ts +2 -2
  15. package/dist/framework/modules/computed-style-attr.d.ts +3 -3
  16. package/dist/framework/modules/events.d.ts +2 -2
  17. package/dist/framework/modules/props.d.ts +2 -2
  18. package/dist/framework/modules/refs.d.ts +2 -2
  19. package/dist/framework/modules/static-class-attr.d.ts +2 -2
  20. package/dist/framework/modules/static-parts.d.ts +2 -2
  21. package/dist/framework/modules/static-style-attr.d.ts +2 -2
  22. package/dist/framework/modules/text.d.ts +2 -2
  23. package/dist/framework/mutation-logger.d.ts +2 -2
  24. package/dist/framework/mutation-tracker.d.ts +3 -2
  25. package/dist/framework/profiler.d.ts +2 -1
  26. package/dist/framework/rendering.d.ts +3 -3
  27. package/dist/framework/reporting.d.ts +1 -1
  28. package/dist/framework/secure-template.d.ts +1 -1
  29. package/dist/framework/stylesheet.d.ts +3 -3
  30. package/dist/framework/template.d.ts +3 -3
  31. package/dist/framework/update-component-value.d.ts +1 -1
  32. package/dist/framework/utils.d.ts +1 -1
  33. package/dist/framework/vm.d.ts +7 -8
  34. package/dist/framework/wiring/context.d.ts +2 -2
  35. package/dist/framework/wiring/wiring.d.ts +1 -1
  36. package/dist/index.cjs.js +201 -85
  37. package/dist/index.cjs.js.map +1 -1
  38. package/dist/index.js +202 -86
  39. package/dist/index.js.map +1 -1
  40. package/dist/libs/aria-reflection/attr-reflection.d.ts +2 -0
  41. package/dist/libs/reflection/aria-reflection.d.ts +1 -0
  42. package/dist/libs/reflection/attr-reflection.d.ts +2 -0
  43. package/dist/libs/reflection/index.d.ts +2 -0
  44. package/dist/shared/error.d.ts +1 -1
  45. package/dist/shared/format.d.ts +1 -1
  46. package/dist/shared/logger.d.ts +1 -1
  47. package/package.json +5 -5
@@ -1,7 +1,7 @@
1
- import { SlotSet } from './vm';
2
- import { LightningElementConstructor } from './base-lightning-element';
3
- import { Key, VComment, VCustomElement, VElement, VElementData, VFragment, VNode, VNodes, VScopedSlotFragment, VStatic, VStaticPart, VStaticPartData, VText } from './vnodes';
4
- import { SanitizedHtmlContent } from './sanitized-html-content';
1
+ import type { SanitizedHtmlContent } from './sanitized-html-content';
2
+ import type { Key, VComment, VCustomElement, VElement, VElementData, VFragment, VNode, VNodes, VScopedSlotFragment, VStatic, VStaticPart, VStaticPartData, VText } from './vnodes';
3
+ import type { LightningElementConstructor } from './base-lightning-element';
4
+ import type { SlotSet } from './vm';
5
5
  declare function sp(partId: number, data: VStaticPartData | null, text: string | null): VStaticPart;
6
6
  declare function ssf(slotName: unknown, factory: (value: any, key: any) => VFragment): VScopedSlotFragment;
7
7
  declare function st(fragmentFactory: (parts?: VStaticPart[]) => Element, key: Key, parts?: VStaticPart[]): VStatic;
@@ -1,4 +1,4 @@
1
- import { LightningElement } from './base-lightning-element';
1
+ import type { LightningElement } from './base-lightning-element';
2
2
  export interface HTMLElementConstructor {
3
3
  prototype: HTMLElement;
4
4
  new (): HTMLElement;
@@ -1,16 +1,7 @@
1
- /**
2
- * This module is responsible for producing the ComponentDef object that is always
3
- * accessible via `vm.def`. This is lazily created during the creation of the first
4
- * instance of a component class, and shared across all instances.
5
- *
6
- * This structure can be used to synthetically create proxies, and understand the
7
- * shape of a component. It is also used internally to apply extra optimizations.
8
- */
9
- import { AccessibleElementProperties } from '@lwc/shared';
10
- import { ShadowSupportMode } from './vm';
11
- import { Template } from './template';
12
- import { HTMLElementConstructor } from './base-bridge-element';
13
- import type { Stylesheets } from '@lwc/shared';
1
+ import type { HTMLElementConstructor } from './base-bridge-element';
2
+ import type { Template } from './template';
3
+ import type { ShadowSupportMode } from './vm';
4
+ import type { Stylesheets, AccessibleElementProperties } from '@lwc/shared';
14
5
  export interface LightningElementConstructor {
15
6
  new (): LightningElement;
16
7
  readonly prototype: LightningElement;
@@ -1,5 +1,5 @@
1
- import { Template } from './template';
2
- import { LightningElementConstructor } from './base-lightning-element';
1
+ import type { Template } from './template';
2
+ import type { LightningElementConstructor } from './base-lightning-element';
3
3
  import type { Stylesheet } from '@lwc/shared';
4
4
  /**
5
5
  * Validate a template, stylesheet, or component to make sure that its compiled version matches
@@ -1,9 +1,9 @@
1
- import { APIVersion } from '@lwc/shared';
2
- import { ReactiveObserver } from './mutation-tracker';
3
- import { VM } from './vm';
4
- import { LightningElementConstructor } from './base-lightning-element';
5
- import { Template } from './template';
6
- import { VNodes } from './vnodes';
1
+ import type { VM } from './vm';
2
+ import type { LightningElementConstructor } from './base-lightning-element';
3
+ import type { Template } from './template';
4
+ import type { VNodes } from './vnodes';
5
+ import type { ReactiveObserver } from './mutation-tracker';
6
+ import type { APIVersion } from '@lwc/shared';
7
7
  type ComponentConstructorMetadata = {
8
8
  tmpl: Template;
9
9
  sel: string;
@@ -1,5 +1,5 @@
1
- import { LightningElementConstructor } from '../base-lightning-element';
2
- import { WireAdapterConstructor, ConfigCallback } from '../wiring';
1
+ import type { WireAdapterConstructor, ConfigCallback } from '../wiring';
2
+ import type { LightningElementConstructor } from '../base-lightning-element';
3
3
  type WireCompilerMeta = Record<string, WireCompilerDef>;
4
4
  type TrackCompilerMeta = Record<string, 1>;
5
5
  type MethodCompilerMeta = string[];
@@ -6,11 +6,13 @@
6
6
  * This structure can be used to synthetically create proxies, and understand the
7
7
  * shape of a component. It is also used internally to apply extra optimizations.
8
8
  */
9
- import { RenderMode, ShadowSupportMode } from '../framework/vm';
10
- import { Template } from './template';
11
- import { LightningElement, LightningElementConstructor } from './base-lightning-element';
12
- import { PropType } from './decorators/register';
13
- import { HTMLElementConstructor } from './base-bridge-element';
9
+ import { RenderMode } from '../framework/vm';
10
+ import { LightningElement } from './base-lightning-element';
11
+ import type { HTMLElementConstructor } from './base-bridge-element';
12
+ import type { PropType } from './decorators/register';
13
+ import type { LightningElementConstructor } from './base-lightning-element';
14
+ import type { Template } from './template';
15
+ import type { ShadowSupportMode } from '../framework/vm';
14
16
  export interface ComponentDef {
15
17
  name: string;
16
18
  wire: PropertyDescriptorMap | undefined;
@@ -1,2 +1,2 @@
1
- import { Template } from './template';
1
+ import type { Template } from './template';
2
2
  export declare function freezeTemplate(tmpl: Template): void;
@@ -1,4 +1,4 @@
1
- import { LightningElement } from './base-lightning-element';
1
+ import type { LightningElement } from './base-lightning-element';
2
2
  /**
3
3
  * EXPERIMENTAL: This function provides access to the component constructor, given an HTMLElement.
4
4
  * This API is subject to change or being removed.
@@ -1,6 +1,6 @@
1
- import { VM } from './vm';
2
- import { LightningElementConstructor } from './base-lightning-element';
3
- import { Template } from './template';
1
+ import type { Template } from './template';
2
+ import type { LightningElementConstructor } from './base-lightning-element';
3
+ import type { VM } from './vm';
4
4
  import type { Stylesheet } from '@lwc/shared';
5
5
  export declare function getTemplateOrSwappedTemplate(tpl: Template): Template;
6
6
  export declare function getComponentOrSwappedComponent(Ctor: LightningElementConstructor): LightningElementConstructor;
@@ -1,2 +1,2 @@
1
- import { VM } from './vm';
1
+ import type { VM } from './vm';
2
2
  export declare function hydrateRoot(vm: VM): void;
@@ -1,6 +1,6 @@
1
- import { VM } from './vm';
2
- import { LightningElement, LightningElementConstructor } from './base-lightning-element';
3
- import { VNodes } from './vnodes';
1
+ import type { VM } from './vm';
2
+ import type { LightningElement, LightningElementConstructor } from './base-lightning-element';
3
+ import type { VNodes } from './vnodes';
4
4
  export declare let isInvokingRender: boolean;
5
5
  export declare let vmBeingConstructed: VM | null;
6
6
  export declare function isBeingConstructed(vm: VM): boolean;
@@ -1,4 +1,4 @@
1
- import { RendererAPI } from '../renderer';
2
- import { VBaseElement, VStatic, VStaticPartElement } from '../vnodes';
1
+ import type { RendererAPI } from '../renderer';
2
+ import type { VBaseElement, VStatic, VStaticPartElement } from '../vnodes';
3
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,4 +1,4 @@
1
- import { RendererAPI } from '../renderer';
2
- import { VBaseElement, VStaticPartElement } from '../vnodes';
1
+ import type { RendererAPI } from '../renderer';
2
+ import type { VBaseElement, VStaticPartElement } from '../vnodes';
3
3
  export declare function getMapFromClassName(className: string | undefined): Record<string, boolean>;
4
4
  export declare function patchClassAttribute(oldVnode: VBaseElement | VStaticPartElement | null, vnode: VBaseElement | VStaticPartElement, renderer: RendererAPI): void;
@@ -1,4 +1,4 @@
1
- import { RendererAPI } from '../renderer';
2
- import { VBaseElement, VStaticPartElement } from '../vnodes';
3
- import { VM } from '../vm';
1
+ import type { RendererAPI } from '../renderer';
2
+ import type { VBaseElement, VStaticPartElement } from '../vnodes';
3
+ import type { VM } from '../vm';
4
4
  export declare function patchStyleAttribute(oldVnode: VBaseElement | VStaticPartElement | null, vnode: VBaseElement | VStaticPartElement, renderer: RendererAPI, owner: VM): void;
@@ -1,3 +1,3 @@
1
- import { RendererAPI } from '../renderer';
2
- import { VBaseElement, VStaticPartElement } from '../vnodes';
1
+ import type { RendererAPI } from '../renderer';
2
+ import type { VBaseElement, VStaticPartElement } from '../vnodes';
3
3
  export declare function applyEventListeners(vnode: VBaseElement | VStaticPartElement, renderer: RendererAPI): void;
@@ -1,3 +1,3 @@
1
- import { RendererAPI } from '../renderer';
2
- import { VBaseElement } from '../vnodes';
1
+ import type { RendererAPI } from '../renderer';
2
+ import type { VBaseElement } from '../vnodes';
3
3
  export declare function patchProps(oldVnode: VBaseElement | null, vnode: VBaseElement, renderer: RendererAPI): void;
@@ -1,3 +1,3 @@
1
- import { VM } from '../vm';
2
- import { VBaseElement, VStaticPartElement } from '../vnodes';
1
+ import type { VM } from '../vm';
2
+ import type { VBaseElement, VStaticPartElement } from '../vnodes';
3
3
  export declare function applyRefs(vnode: VBaseElement | VStaticPartElement, owner: VM): void;
@@ -1,3 +1,3 @@
1
- import { RendererAPI } from '../renderer';
2
- import { VBaseElement } from '../vnodes';
1
+ import type { RendererAPI } from '../renderer';
2
+ import type { VBaseElement } from '../vnodes';
3
3
  export declare function applyStaticClassAttribute(vnode: VBaseElement, renderer: RendererAPI): void;
@@ -1,5 +1,5 @@
1
- import { VStatic, VStaticPart } from '../vnodes';
2
- import { RendererAPI } from '../renderer';
1
+ import type { RendererAPI } from '../renderer';
2
+ import type { VStatic, VStaticPart } from '../vnodes';
3
3
  /**
4
4
  * Given an array of static parts, mounts the DOM element to the part based on the staticPartId
5
5
  * @param root the root element
@@ -1,3 +1,3 @@
1
- import { RendererAPI } from '../renderer';
2
- import { VBaseElement } from '../vnodes';
1
+ import type { RendererAPI } from '../renderer';
2
+ import type { VBaseElement } from '../vnodes';
3
3
  export declare function applyStaticStyleAttribute(vnode: VBaseElement, renderer: RendererAPI): void;
@@ -1,5 +1,5 @@
1
- import { RendererAPI } from '../renderer';
2
- import { VComment, VStaticPartText, VText } from '../vnodes';
1
+ import type { RendererAPI } from '../renderer';
2
+ import type { VComment, VStaticPartText, VText } from '../vnodes';
3
3
  export declare function patchTextVNode(n1: VText, n2: VText, renderer: RendererAPI): void;
4
4
  export declare function patchTextVStaticPart(n1: VStaticPartText | null, n2: VStaticPartText, renderer: RendererAPI): void;
5
5
  export declare function updateTextContent(vnode: VText | VComment | VStaticPartText, renderer: RendererAPI): void;
@@ -1,5 +1,5 @@
1
- import { ReactiveObserver } from '../libs/mutation-tracker';
2
- import { VM } from './vm';
1
+ import type { ReactiveObserver } from '../libs/mutation-tracker';
2
+ import type { VM } from './vm';
3
3
  export interface MutationLog {
4
4
  vm: VM;
5
5
  prop: string;
@@ -1,5 +1,6 @@
1
- import { CallbackFunction, ReactiveObserver } from '../libs/mutation-tracker';
2
- import { VM } from './vm';
1
+ import { ReactiveObserver } from '../libs/mutation-tracker';
2
+ import type { CallbackFunction } from '../libs/mutation-tracker';
3
+ import type { VM } from './vm';
3
4
  export declare function componentValueMutated(vm: VM, key: PropertyKey): void;
4
5
  export declare function componentValueObserved(vm: VM, key: PropertyKey, target?: any): void;
5
6
  export declare function createReactiveObserver(callback: CallbackFunction): ReactiveObserver;
@@ -1,4 +1,5 @@
1
- import { RenderMode, ShadowMode, VM } from './vm';
1
+ import { RenderMode, ShadowMode } from './vm';
2
+ import type { VM } from './vm';
2
3
  import type { MutationLog } from './mutation-logger';
3
4
  export declare const enum OperationId {
4
5
  Constructor = 0,
@@ -1,6 +1,6 @@
1
- import { RendererAPI } from './renderer';
2
- import { VM } from './vm';
3
- import { VCustomElement, VNode, VNodes } from './vnodes';
1
+ import type { VCustomElement, VNode, VNodes } from './vnodes';
2
+ import type { VM } from './vm';
3
+ import type { RendererAPI } from './renderer';
4
4
  export declare function patchChildren(c1: VNodes, c2: VNodes, parent: ParentNode, renderer: RendererAPI): void;
5
5
  export declare function mount(node: VNode, parent: ParentNode, renderer: RendererAPI, anchor: Node | null): void;
6
6
  export declare function removeNode(node: Node, parent: ParentNode, renderer: RendererAPI): void;
@@ -1,4 +1,4 @@
1
- import { RenderMode, ShadowMode, ShadowSupportMode } from './vm';
1
+ import type { RenderMode, ShadowMode, ShadowSupportMode } from './vm';
2
2
  export declare const enum ReportingEventId {
3
3
  CrossRootAriaInSyntheticShadow = "CrossRootAriaInSyntheticShadow",
4
4
  CompilerRuntimeVersionMismatch = "CompilerRuntimeVersionMismatch",
@@ -1,4 +1,4 @@
1
- import { Template } from './template';
1
+ import type { Template } from './template';
2
2
  export declare function defaultEmptyTemplate(): never[];
3
3
  export declare function isTemplateRegistered(tpl: Template): boolean;
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { VM } from './vm';
2
- import { Template } from './template';
3
- import { VCustomElement, VNode } from './vnodes';
1
+ import type { VCustomElement, VNode } from './vnodes';
2
+ import type { Template } from './template';
3
+ import type { VM } from './vm';
4
4
  import type { Stylesheet } from '@lwc/shared';
5
5
  export declare function updateStylesheetToken(vm: VM, template: Template, legacy: boolean): void;
6
6
  export declare function getStylesheetsContent(vm: VM, template: Template): ReadonlyArray<string>;
@@ -1,6 +1,6 @@
1
- import { RenderAPI } from './api';
2
- import { SlotSet, TemplateCache, VM } from './vm';
3
- import { VNodes } from './vnodes';
1
+ import type { VNodes } from './vnodes';
2
+ import type { SlotSet, TemplateCache, VM } from './vm';
3
+ import type { RenderAPI } from './api';
4
4
  import type { Stylesheets } from '@lwc/shared';
5
5
  export interface Template {
6
6
  (api: RenderAPI, cmp: object, slotSet: SlotSet, cache: TemplateCache): VNodes;
@@ -1,2 +1,2 @@
1
- import { VM } from './vm';
1
+ import type { VM } from './vm';
2
2
  export declare function updateComponentValue(vm: VM, key: string, newValue: any): void;
@@ -1,4 +1,4 @@
1
- import { LightningElementConstructor } from './base-lightning-element';
1
+ import type { LightningElementConstructor } from './base-lightning-element';
2
2
  type Callback = () => void;
3
3
  export declare const SPACE_CHAR = 32;
4
4
  export declare const EmptyObject: any;
@@ -1,11 +1,10 @@
1
- import { APIVersion } from '@lwc/shared';
2
- import { HostNode, HostElement, RendererAPI } from './renderer';
3
- import { Template } from './template';
4
- import { ComponentDef } from './def';
5
- import { LightningElement, LightningElementConstructor, LightningElementShadowRoot } from './base-lightning-element';
6
- import { ReactiveObserver } from './mutation-tracker';
7
- import { VNodes, VCustomElement, VNode, VBaseElement, VStaticPartElement } from './vnodes';
8
- import type { Stylesheets } from '@lwc/shared';
1
+ import type { VNodes, VCustomElement, VNode, VBaseElement, VStaticPartElement } from './vnodes';
2
+ import type { ReactiveObserver } from './mutation-tracker';
3
+ import type { LightningElement, LightningElementConstructor, LightningElementShadowRoot } from './base-lightning-element';
4
+ import type { ComponentDef } from './def';
5
+ import type { Template } from './template';
6
+ import type { HostNode, HostElement, RendererAPI } from './renderer';
7
+ import type { Stylesheets, APIVersion } from '@lwc/shared';
9
8
  type ShadowRootMode = 'open' | 'closed';
10
9
  export interface TemplateCache {
11
10
  [key: string]: any;
@@ -1,4 +1,4 @@
1
- import { VM } from '../vm';
2
- import { ContextProvider, ContextValue, RegisterContextProviderFn, WireAdapterConstructor, WireDef } from './types';
1
+ import type { VM } from '../vm';
2
+ import type { ContextProvider, ContextValue, RegisterContextProviderFn, WireAdapterConstructor, WireDef } from './types';
3
3
  export declare function createContextProviderWithRegister(adapter: WireAdapterConstructor, registerContextProvider: RegisterContextProviderFn): ContextProvider;
4
4
  export declare function createContextWatcher(vm: VM, wireDef: WireDef, callbackWhenContextIsReady: (newContext: ContextValue) => void): void;
@@ -1,4 +1,4 @@
1
- import { VM } from '../vm';
1
+ import type { VM } from '../vm';
2
2
  import type { ConfigCallback, WireAdapterConstructor } from './types';
3
3
  export declare function storeWiredMethodMeta(descriptor: PropertyDescriptor, adapter: WireAdapterConstructor, configCallback: ConfigCallback, dynamic: string[]): void;
4
4
  export declare function storeWiredFieldMeta(descriptor: PropertyDescriptor, adapter: WireAdapterConstructor, configCallback: ConfigCallback, dynamic: string[]): void;