@lwc/engine-core 2.7.1 → 2.7.2

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.7.1",
3
+ "version": "2.7.2",
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.7.1",
28
- "@lwc/shared": "2.7.1"
27
+ "@lwc/features": "2.7.2",
28
+ "@lwc/shared": "2.7.2"
29
29
  },
30
30
  "devDependencies": {
31
31
  "observable-membrane": "2.0.0"
@@ -33,5 +33,5 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "1b2e246e03c6bfbc80bea3def43b7d0281a1de21"
36
+ "gitHead": "f668a3ad36bbebbaa33a5863408a45bf4185d218"
37
37
  }
@@ -0,0 +1,2 @@
1
+ export declare const HTMLElementConstructor: typeof HTMLElement;
2
+ export declare const HTMLElementPrototype: HTMLElement;
@@ -18,5 +18,5 @@ export { profilerControl as __unstable__ProfilerControl } from './profiler';
18
18
  export { getUpgradableConstructor } from './upgradable-element';
19
19
  export { swapTemplate, swapComponent, swapStyle } from './hot-swaps';
20
20
  export { setHooks } from './overridable-hooks';
21
- export type { Renderer } from './renderer';
22
21
  export type { ConfigValue as WireConfigValue, ContextValue as WireContextValue, DataCallback, WireAdapter, WireAdapterConstructor, WireAdapterSchemaValue, } from './wiring';
22
+ export { setAssertInstanceOfHTMLElement, setAttachShadow, setCreateComment, setCreateElement, setCreateText, setDefineCustomElement, setDispatchEvent, setGetAttribute, setGetBoundingClientRect, setGetChildNodes, setGetChildren, setGetClassList, setGetCustomElement, setGetElementsByClassName, setGetElementsByTagName, setGetFirstChild, setGetFirstElementChild, setGetLastChild, setGetLastElementChild, setGetProperty, setHTMLElement, setInsert, setInsertGlobalStylesheet, setInsertStylesheet, setIsConnected, setIsHydrating, setIsNativeShadowDefined, setIsSyntheticShadowDefined, setNextSibling, setQuerySelector, setQuerySelectorAll, setRemove, setRemoveAttribute, setRemoveEventListener, setSetAttribute, setSetCSSStyleProperty, setSetProperty, setSetText, setSsr, setAddEventListener, } from '../renderer';
@@ -1,7 +1,6 @@
1
- import { Renderer } from './renderer';
2
1
  declare type UpgradeCallback = (elm: HTMLElement) => void;
3
2
  interface UpgradableCustomElementConstructor extends CustomElementConstructor {
4
3
  new (upgradeCallback?: UpgradeCallback): HTMLElement;
5
4
  }
6
- export declare function getUpgradableConstructor(tagName: string, renderer: Renderer): CustomElementConstructor | UpgradableCustomElementConstructor;
5
+ export declare function getUpgradableConstructor(tagName: string): CustomElementConstructor | UpgradableCustomElementConstructor;
7
6
  export {};
@@ -1,9 +1,9 @@
1
+ import type { HostNode, HostElement } from '../renderer';
1
2
  import { Template } from './template';
2
3
  import { ComponentDef } from './def';
3
4
  import { LightningElement } from './base-lightning-element';
4
5
  import { ReactiveObserver } from './mutation-tracker';
5
6
  import { AccessorReactiveObserver } from './decorators/api';
6
- import { Renderer, HostNode, HostElement } from './renderer';
7
7
  import { VNodes, VCustomElement, VNode } from '../3rdparty/snabbdom/types';
8
8
  declare type ShadowRootMode = 'open' | 'closed';
9
9
  export interface TemplateCache {
@@ -60,7 +60,6 @@ export interface VM<N = HostNode, E = HostElement> {
60
60
  /** The owner VM or null for root elements. */
61
61
  readonly owner: VM<N, E> | null;
62
62
  /** Rendering operations associated with the VM */
63
- readonly renderer: Renderer<N, E>;
64
63
  renderMode: RenderMode;
65
64
  shadowMode: ShadowMode;
66
65
  /** The component creation index. */
@@ -127,7 +126,6 @@ export declare function createVM<HostNode, HostElement>(elm: HostElement, def: C
127
126
  mode: ShadowRootMode;
128
127
  owner: VM<HostNode, HostElement> | null;
129
128
  tagName: string;
130
- renderer: Renderer;
131
129
  }): VM;
132
130
  export declare function associateVM(obj: VMAssociable, vm: VM): void;
133
131
  export declare function getAssociatedVM(obj: VMAssociable): VM;
@@ -0,0 +1,122 @@
1
+ export declare type HostNode = any;
2
+ export declare type HostElement = any;
3
+ declare type N = HostNode;
4
+ declare type E = HostElement;
5
+ export declare let ssr: boolean;
6
+ export declare function setSsr(ssrImpl: boolean): void;
7
+ export declare let isNativeShadowDefined: boolean;
8
+ export declare function setIsNativeShadowDefined(isNativeShadowDefinedImpl: boolean): void;
9
+ export declare let isSyntheticShadowDefined: boolean;
10
+ export declare function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl: boolean): void;
11
+ declare type HTMLElementType = typeof HTMLElement;
12
+ declare let HTMLElementExported: HTMLElementType;
13
+ export { HTMLElementExported as HTMLElement };
14
+ export declare function setHTMLElement(HTMLElementImpl: HTMLElementType): void;
15
+ declare type isHydratingFunc = () => boolean;
16
+ export declare let isHydrating: isHydratingFunc;
17
+ export declare function setIsHydrating(isHydratingImpl: isHydratingFunc): void;
18
+ declare type insertFunc = (node: N, parent: E, anchor: N | null) => void;
19
+ export declare let insert: insertFunc;
20
+ export declare function setInsert(insertImpl: insertFunc): void;
21
+ declare type removeFunc = (node: N, parent: E) => void;
22
+ export declare let remove: removeFunc;
23
+ export declare function setRemove(removeImpl: removeFunc): void;
24
+ declare type createElementFunc = (tagName: string, namespace?: string) => E;
25
+ export declare let createElement: createElementFunc;
26
+ export declare function setCreateElement(createElementImpl: createElementFunc): void;
27
+ declare type createTextFunc = (content: string) => N;
28
+ export declare let createText: createTextFunc;
29
+ export declare function setCreateText(createTextImpl: createTextFunc): void;
30
+ declare type createCommentFunc = (content: string) => N;
31
+ export declare let createComment: createCommentFunc;
32
+ export declare function setCreateComment(createCommentImpl: createCommentFunc): void;
33
+ declare type nextSiblingFunc = (node: N) => N | null;
34
+ export declare let nextSibling: nextSiblingFunc;
35
+ export declare function setNextSibling(nextSiblingImpl: nextSiblingFunc): void;
36
+ declare type attachShadowFunc = (element: E, options: ShadowRootInit) => N;
37
+ export declare let attachShadow: attachShadowFunc;
38
+ export declare function setAttachShadow(attachShadowImpl: attachShadowFunc): void;
39
+ declare type getPropertyFunc = (node: N, key: string) => any;
40
+ export declare let getProperty: getPropertyFunc;
41
+ export declare function setGetProperty(getPropertyImpl: getPropertyFunc): void;
42
+ declare type setPropertyFunc = (node: N, key: string, value: any) => void;
43
+ export declare let setProperty: setPropertyFunc;
44
+ export declare function setSetProperty(setPropertyImpl: setPropertyFunc): void;
45
+ declare type setTextFunc = (node: N, content: string) => void;
46
+ export declare let setText: setTextFunc;
47
+ export declare function setSetText(setTextImpl: setTextFunc): void;
48
+ declare type getAttributeFunc = (element: E, name: string, namespace?: string | null) => string | null;
49
+ export declare let getAttribute: getAttributeFunc;
50
+ export declare function setGetAttribute(getAttributeImpl: getAttributeFunc): void;
51
+ declare type setAttributeFunc = (element: E, name: string, value: string, namespace?: string | null) => void;
52
+ export declare let setAttribute: setAttributeFunc;
53
+ export declare function setSetAttribute(setAttributeImpl: setAttributeFunc): void;
54
+ declare type removeAttributeFunc = (element: E, name: string, namespace?: string | null) => void;
55
+ export declare let removeAttribute: removeAttributeFunc;
56
+ export declare function setRemoveAttribute(removeAttributeImpl: removeAttributeFunc): void;
57
+ declare type addEventListenerFunc = (target: N, type: string, callback: (event: Event) => any, options?: AddEventListenerOptions | boolean) => void;
58
+ export declare let addEventListener: addEventListenerFunc;
59
+ export declare function setAddEventListener(addEventListenerImpl: addEventListenerFunc): void;
60
+ declare type removeEventListenerFunc = (target: N, type: string, callback: (event: Event) => any, options?: EventListenerOptions | boolean) => void;
61
+ export declare let removeEventListener: removeEventListenerFunc;
62
+ export declare function setRemoveEventListener(removeEventListenerImpl: removeEventListenerFunc): void;
63
+ declare type dispatchEventFunc = (target: N, event: Event) => boolean;
64
+ export declare let dispatchEvent: dispatchEventFunc;
65
+ export declare function setDispatchEvent(dispatchEventImpl: dispatchEventFunc): void;
66
+ declare type getClassListFunc = (element: E) => DOMTokenList;
67
+ export declare let getClassList: getClassListFunc;
68
+ export declare function setGetClassList(getClassListImpl: getClassListFunc): void;
69
+ declare type setCSSStylePropertyFunc = (element: E, name: string, value: string, important: boolean) => void;
70
+ export declare let setCSSStyleProperty: setCSSStylePropertyFunc;
71
+ export declare function setSetCSSStyleProperty(setCSSStylePropertyImpl: setCSSStylePropertyFunc): void;
72
+ declare type getBoundingClientRectFunc = (element: E) => ClientRect;
73
+ export declare let getBoundingClientRect: getBoundingClientRectFunc;
74
+ export declare function setGetBoundingClientRect(getBoundingClientRectImpl: getBoundingClientRectFunc): void;
75
+ declare type querySelectorFunc = (element: E, selectors: string) => E | null;
76
+ export declare let querySelector: querySelectorFunc;
77
+ export declare function setQuerySelector(querySelectorImpl: querySelectorFunc): void;
78
+ declare type querySelectorAllFunc = (element: E, selectors: string) => NodeList;
79
+ export declare let querySelectorAll: querySelectorAllFunc;
80
+ export declare function setQuerySelectorAll(querySelectorAllImpl: querySelectorAllFunc): void;
81
+ declare type getElementsByTagNameFunc = (element: E, tagNameOrWildCard: string) => HTMLCollection;
82
+ export declare let getElementsByTagName: getElementsByTagNameFunc;
83
+ export declare function setGetElementsByTagName(getElementsByTagNameImpl: getElementsByTagNameFunc): void;
84
+ declare type getElementsByClassNameFunc = (element: E, names: string) => HTMLCollection;
85
+ export declare let getElementsByClassName: getElementsByClassNameFunc;
86
+ export declare function setGetElementsByClassName(getElementsByClassNameImpl: getElementsByClassNameFunc): void;
87
+ declare type getChildrenFunc = (element: E) => HTMLCollection;
88
+ export declare let getChildren: getChildrenFunc;
89
+ export declare function setGetChildren(getChildrenImpl: getChildrenFunc): void;
90
+ declare type getChildNodesFunc = (element: E) => NodeList;
91
+ export declare let getChildNodes: getChildNodesFunc;
92
+ export declare function setGetChildNodes(getChildNodesImpl: getChildNodesFunc): void;
93
+ declare type getFirstChildFunc = (element: E) => N | null;
94
+ export declare let getFirstChild: getFirstChildFunc;
95
+ export declare function setGetFirstChild(getFirstChildImpl: getFirstChildFunc): void;
96
+ declare type getFirstElementChildFunc = (element: E) => E | null;
97
+ export declare let getFirstElementChild: getFirstElementChildFunc;
98
+ export declare function setGetFirstElementChild(getFirstElementChildImpl: getFirstElementChildFunc): void;
99
+ declare type getLastChildFunc = (element: E) => N | null;
100
+ export declare let getLastChild: getLastChildFunc;
101
+ export declare function setGetLastChild(getLastChildImpl: getLastChildFunc): void;
102
+ declare type getLastElementChildFunc = (element: E) => E | null;
103
+ export declare let getLastElementChild: getLastElementChildFunc;
104
+ export declare function setGetLastElementChild(getLastElementChildImpl: getLastElementChildFunc): void;
105
+ declare type isConnectedFunc = (node: N) => boolean;
106
+ export declare let isConnected: isConnectedFunc;
107
+ export declare function setIsConnected(isConnectedImpl: isConnectedFunc): void;
108
+ declare type insertGlobalStylesheetFunc = (content: string) => void;
109
+ export declare let insertGlobalStylesheet: insertGlobalStylesheetFunc;
110
+ export declare function setInsertGlobalStylesheet(insertGlobalStylesheetImpl: insertGlobalStylesheetFunc): void;
111
+ declare type insertStylesheetFunc = (content: string, target: N) => void;
112
+ export declare let insertStylesheet: insertStylesheetFunc;
113
+ export declare function setInsertStylesheet(insertStylesheetImpl: insertStylesheetFunc): void;
114
+ declare type assertInstanceOfHTMLElementFunc = (elm: any, msg: string) => void;
115
+ export declare let assertInstanceOfHTMLElement: assertInstanceOfHTMLElementFunc;
116
+ export declare function setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElementImpl: assertInstanceOfHTMLElementFunc): void;
117
+ declare type defineCustomElementFunc = (name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions) => void;
118
+ export declare let defineCustomElement: defineCustomElementFunc;
119
+ export declare function setDefineCustomElement(defineCustomElementImpl: defineCustomElementFunc): void;
120
+ declare type getCustomElementFunc = (name: string) => CustomElementConstructor | undefined;
121
+ export declare let getCustomElement: getCustomElementFunc;
122
+ export declare function setGetCustomElement(getCustomElementImpl: getCustomElementFunc): void;
@@ -1,46 +0,0 @@
1
- export declare type HostNode = any;
2
- export declare type HostElement = any;
3
- export interface Renderer<N = HostNode, E = HostElement> {
4
- ssr: boolean;
5
- isHydrating(): boolean;
6
- isNativeShadowDefined: boolean;
7
- isSyntheticShadowDefined: boolean;
8
- insert(node: N, parent: E, anchor: N | null): void;
9
- remove(node: N, parent: E): void;
10
- createElement(tagName: string, namespace?: string): E;
11
- createText(content: string): N;
12
- createComment(content: string): N;
13
- nextSibling(node: N): N | null;
14
- attachShadow(element: E, options: ShadowRootInit): N;
15
- getProperty(node: N, key: string): any;
16
- setProperty(node: N, key: string, value: any): void;
17
- setText(node: N, content: string): void;
18
- getAttribute(element: E, name: string, namespace?: string | null): string | null;
19
- setAttribute(element: E, name: string, value: string, namespace?: string | null): void;
20
- removeAttribute(element: E, name: string, namespace?: string | null): void;
21
- addEventListener(target: E, type: string, callback: (event: Event) => any, options?: AddEventListenerOptions | boolean): void;
22
- removeEventListener(target: E, type: string, callback: (event: Event) => any, options?: EventListenerOptions | boolean): void;
23
- dispatchEvent(target: N, event: Event): boolean;
24
- getClassList(element: E): DOMTokenList;
25
- setCSSStyleProperty(element: E, name: string, value: string, important: boolean): void;
26
- getBoundingClientRect(element: E): ClientRect;
27
- querySelector(element: E, selectors: string): E | null;
28
- querySelectorAll(element: E, selectors: string): NodeList;
29
- getElementsByTagName(element: E, tagNameOrWildCard: string): HTMLCollection;
30
- getElementsByClassName(element: E, names: string): HTMLCollection;
31
- getChildren(element: E): HTMLCollection;
32
- getChildNodes(element: E): NodeList;
33
- getFirstChild(element: E): N | null;
34
- getFirstElementChild(element: E): E | null;
35
- getLastChild(element: E): N | null;
36
- getLastElementChild(element: E): E | null;
37
- isConnected(node: N): boolean;
38
- insertGlobalStylesheet(content: string): void;
39
- insertStylesheet(content: string, target: N): void;
40
- assertInstanceOfHTMLElement?(elm: any, msg: string): void;
41
- defineCustomElement(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void;
42
- getCustomElement(name: string): CustomElementConstructor | undefined;
43
- HTMLElement: typeof HTMLElement;
44
- }
45
- export declare const HTMLElementConstructor: typeof HTMLElement;
46
- export declare const HTMLElementPrototype: HTMLElement;