@lwc/engine-core 2.6.1 → 2.6.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.
@@ -4154,13 +4154,15 @@ function updateElmHook(oldVnode, vnode) {
4154
4154
  }
4155
4155
  function updateChildrenHook(oldVnode, vnode) {
4156
4156
  const {
4157
- children,
4158
- owner
4157
+ elm,
4158
+ children
4159
4159
  } = vnode;
4160
- const fn = hasDynamicChildren(children) ? updateDynamicChildren : updateStaticChildren;
4161
- runWithBoundaryProtection(owner, owner.owner, shared.noop, () => {
4162
- fn(vnode.elm, oldVnode.children, children);
4163
- }, shared.noop);
4160
+
4161
+ if (hasDynamicChildren(children)) {
4162
+ updateDynamicChildren(elm, oldVnode.children, children);
4163
+ } else {
4164
+ updateStaticChildren(elm, oldVnode.children, children);
4165
+ }
4164
4166
  }
4165
4167
  function allocateChildrenHook(vnode, vm) {
4166
4168
  // A component with slots will re-render because:
@@ -5608,7 +5610,7 @@ function logOperationStart(opId, vm) {
5608
5610
  if (isProfilerEnabled) {
5609
5611
  currentDispatcher(opId, 0
5610
5612
  /* Start */
5611
- , vm.tagName, vm.idx);
5613
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
5612
5614
  }
5613
5615
  }
5614
5616
  function logOperationEnd(opId, vm) {
@@ -5621,7 +5623,7 @@ function logOperationEnd(opId, vm) {
5621
5623
  if (isProfilerEnabled) {
5622
5624
  currentDispatcher(opId, 1
5623
5625
  /* Stop */
5624
- , vm.tagName, vm.idx);
5626
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
5625
5627
  }
5626
5628
  }
5627
5629
  function logGlobalOperationStart(opId, vm) {
@@ -5634,7 +5636,7 @@ function logGlobalOperationStart(opId, vm) {
5634
5636
  if (isProfilerEnabled) {
5635
5637
  currentDispatcher(opId, 0
5636
5638
  /* Start */
5637
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
5639
+ , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
5638
5640
  }
5639
5641
  }
5640
5642
  function logGlobalOperationEnd(opId, vm) {
@@ -5647,7 +5649,7 @@ function logGlobalOperationEnd(opId, vm) {
5647
5649
  if (isProfilerEnabled) {
5648
5650
  currentDispatcher(opId, 1
5649
5651
  /* Stop */
5650
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
5652
+ , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
5651
5653
  }
5652
5654
  }
5653
5655
 
@@ -5800,6 +5802,7 @@ function evaluateTemplate(vm, html) {
5800
5802
 
5801
5803
  return vnodes;
5802
5804
  }
5805
+
5803
5806
  function computeHasScopedStyles(template) {
5804
5807
  const {
5805
5808
  stylesheets
@@ -7218,4 +7221,4 @@ exports.swapTemplate = swapTemplate;
7218
7221
  exports.track = track;
7219
7222
  exports.unwrap = unwrap;
7220
7223
  exports.wire = wire;
7221
- /* version: 2.6.1 */
7224
+ /* version: 2.6.2 */
@@ -1,5 +1,5 @@
1
1
  /* proxy-compat-disable */
2
- import { seal, create, isFunction as isFunction$1, ArrayPush as ArrayPush$1, isUndefined as isUndefined$1, ArrayIndexOf, ArraySplice, StringToLowerCase, ArrayJoin, isNull, assign, assert, keys, StringCharCodeAt, isString, StringSlice, freeze, defineProperties, forEach, getOwnPropertyNames as getOwnPropertyNames$1, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, getPropertyDescriptor, isObject, AriaPropNameToAttrNameMap, defineProperty, KEY__SYNTHETIC_MODE, toString as toString$1, isFalse, isTrue, getOwnPropertyDescriptor as getOwnPropertyDescriptor$1, htmlPropertyToAttribute, ArraySlice, hasOwnProperty as hasOwnProperty$1, ArrayFilter, noop, isArray as isArray$1, isNumber, StringReplace, KEY__SHADOW_RESOLVER, KEY__SCOPED_CSS, ArrayUnshift, isFrozen } from '@lwc/shared';
2
+ import { seal, create, isFunction as isFunction$1, ArrayPush as ArrayPush$1, isUndefined as isUndefined$1, ArrayIndexOf, ArraySplice, StringToLowerCase, ArrayJoin, isNull, assign, assert, keys, StringCharCodeAt, isString, StringSlice, freeze, defineProperties, forEach, getOwnPropertyNames as getOwnPropertyNames$1, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, getPropertyDescriptor, isObject, AriaPropNameToAttrNameMap, defineProperty, KEY__SYNTHETIC_MODE, toString as toString$1, isFalse, isTrue, getOwnPropertyDescriptor as getOwnPropertyDescriptor$1, htmlPropertyToAttribute, ArraySlice, hasOwnProperty as hasOwnProperty$1, ArrayFilter, isArray as isArray$1, isNumber, StringReplace, KEY__SHADOW_RESOLVER, KEY__SCOPED_CSS, noop, ArrayUnshift, isFrozen } from '@lwc/shared';
3
3
  import { runtimeFlags } from '@lwc/features';
4
4
  export { setFeatureFlag, setFeatureFlagForTest } from '@lwc/features';
5
5
 
@@ -4151,13 +4151,15 @@ function updateElmHook(oldVnode, vnode) {
4151
4151
  }
4152
4152
  function updateChildrenHook(oldVnode, vnode) {
4153
4153
  const {
4154
- children,
4155
- owner
4154
+ elm,
4155
+ children
4156
4156
  } = vnode;
4157
- const fn = hasDynamicChildren(children) ? updateDynamicChildren : updateStaticChildren;
4158
- runWithBoundaryProtection(owner, owner.owner, noop, () => {
4159
- fn(vnode.elm, oldVnode.children, children);
4160
- }, noop);
4157
+
4158
+ if (hasDynamicChildren(children)) {
4159
+ updateDynamicChildren(elm, oldVnode.children, children);
4160
+ } else {
4161
+ updateStaticChildren(elm, oldVnode.children, children);
4162
+ }
4161
4163
  }
4162
4164
  function allocateChildrenHook(vnode, vm) {
4163
4165
  // A component with slots will re-render because:
@@ -5605,7 +5607,7 @@ function logOperationStart(opId, vm) {
5605
5607
  if (isProfilerEnabled) {
5606
5608
  currentDispatcher(opId, 0
5607
5609
  /* Start */
5608
- , vm.tagName, vm.idx);
5610
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
5609
5611
  }
5610
5612
  }
5611
5613
  function logOperationEnd(opId, vm) {
@@ -5618,7 +5620,7 @@ function logOperationEnd(opId, vm) {
5618
5620
  if (isProfilerEnabled) {
5619
5621
  currentDispatcher(opId, 1
5620
5622
  /* Stop */
5621
- , vm.tagName, vm.idx);
5623
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
5622
5624
  }
5623
5625
  }
5624
5626
  function logGlobalOperationStart(opId, vm) {
@@ -5631,7 +5633,7 @@ function logGlobalOperationStart(opId, vm) {
5631
5633
  if (isProfilerEnabled) {
5632
5634
  currentDispatcher(opId, 0
5633
5635
  /* Start */
5634
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
5636
+ , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
5635
5637
  }
5636
5638
  }
5637
5639
  function logGlobalOperationEnd(opId, vm) {
@@ -5644,7 +5646,7 @@ function logGlobalOperationEnd(opId, vm) {
5644
5646
  if (isProfilerEnabled) {
5645
5647
  currentDispatcher(opId, 1
5646
5648
  /* Stop */
5647
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
5649
+ , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
5648
5650
  }
5649
5651
  }
5650
5652
 
@@ -5797,6 +5799,7 @@ function evaluateTemplate(vm, html) {
5797
5799
 
5798
5800
  return vnodes;
5799
5801
  }
5802
+
5800
5803
  function computeHasScopedStyles(template) {
5801
5804
  const {
5802
5805
  stylesheets
@@ -7182,4 +7185,4 @@ function setHooks(hooks) {
7182
7185
  }
7183
7186
 
7184
7187
  export { LightningElement, profilerControl as __unstable__ProfilerControl, api$1 as api, connectRootElement, createContextProvider, createVM, disconnectRootElement, getAssociatedVMIfPresent, getComponentDef, getComponentInternalDef, getUpgradableConstructor, hydrateRootElement, isComponentConstructor, readonly, register, registerComponent, registerDecorators, registerTemplate, sanitizeAttribute, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
7185
- /* version: 2.6.1 */
7188
+ /* version: 2.6.2 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lwc/engine-core",
3
- "version": "2.6.1",
3
+ "version": "2.6.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.6.1",
28
- "@lwc/shared": "2.6.1"
27
+ "@lwc/features": "2.6.2",
28
+ "@lwc/shared": "2.6.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": "65ae5d96106495314904cade2522cceef2067229"
36
+ "gitHead": "a49666f207d17e164aa914cf00b8f9d5a656228d"
37
37
  }
@@ -7,13 +7,6 @@
7
7
  https://github.com/snabbdom/snabbdom/
8
8
  */
9
9
  import { VM } from '../../framework/vm';
10
- export declare type VNodeStyleDecls = Array<[string, string, boolean]>;
11
- export interface On {
12
- [event: string]: EventListener;
13
- }
14
- export declare type Attrs = Record<string, string | number | boolean>;
15
- export declare type Classes = Record<string, boolean>;
16
- export declare type Props = Record<string, any>;
17
10
  export declare type Key = string | number;
18
11
  export declare type VNodes = Array<VNode | null>;
19
12
  export interface VNode {
@@ -53,16 +46,15 @@ export interface VComment extends VNode {
53
46
  text: string;
54
47
  key: undefined;
55
48
  }
56
- export declare type CustomElementContext = Record<string, Record<string, any>>;
57
49
  export interface VNodeData {
58
- props?: Props;
59
- attrs?: Attrs;
60
- className?: any;
61
- style?: any;
62
- classMap?: Classes;
63
- styleDecls?: VNodeStyleDecls;
64
- context?: CustomElementContext;
65
- on?: On;
50
+ props?: Record<string, any>;
51
+ attrs?: Record<string, string | number | boolean>;
52
+ className?: string;
53
+ style?: string;
54
+ classMap?: Record<string, boolean>;
55
+ styleDecls?: Array<[string, string, boolean]>;
56
+ context?: Record<string, Record<string, any>>;
57
+ on?: Record<string, Function>;
66
58
  svg?: boolean;
67
59
  }
68
60
  export interface VElementData extends VNodeData {
@@ -76,7 +68,3 @@ export interface Hooks<N extends VNode> {
76
68
  remove: (vNode: N, parentNode: Node) => void;
77
69
  hydrate: (vNode: N, node: Node) => void;
78
70
  }
79
- export interface Module<N extends VNode> {
80
- create?: (vNode: N) => void;
81
- update?: (oldVNode: N, vNode: N) => void;
82
- }
@@ -1,4 +1,4 @@
1
- import { VM } from './vm';
1
+ import { RenderMode, ShadowMode, VM } from './vm';
2
2
  export declare const enum OperationId {
3
3
  Constructor = 0,
4
4
  Render = 1,
@@ -15,7 +15,7 @@ declare const enum Phase {
15
15
  Start = 0,
16
16
  Stop = 1
17
17
  }
18
- declare type LogDispatcher = (opId: OperationId, phase: Phase, cmpName?: string, vmIndex?: number) => void;
18
+ declare type LogDispatcher = (opId: OperationId, phase: Phase, cmpName?: string, vmIndex?: number, renderMode?: RenderMode, shadowMode?: ShadowMode) => void;
19
19
  export declare const profilerControl: {
20
20
  enableProfiler(): void;
21
21
  disableProfiler(): void;
@@ -17,4 +17,3 @@ export declare let isUpdatingTemplate: boolean;
17
17
  export declare function getVMBeingRendered(): VM | null;
18
18
  export declare function setVMBeingRendered(vm: VM | null): void;
19
19
  export declare function evaluateTemplate(vm: VM, html: Template): Array<VNode | null>;
20
- export declare function computeHasScopedStyles(template: Template): boolean;