@lwc/engine-core 6.6.4 → 6.6.6
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/vnodes.d.ts +7 -6
- package/dist/index.cjs.js +22 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +22 -10
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -27,7 +27,7 @@ export interface BaseVParent {
|
|
|
27
27
|
export interface BaseVNode {
|
|
28
28
|
type: VNodeType;
|
|
29
29
|
elm: Node | undefined;
|
|
30
|
-
sel: string
|
|
30
|
+
sel: string;
|
|
31
31
|
key: Key | undefined;
|
|
32
32
|
owner: VM;
|
|
33
33
|
}
|
|
@@ -35,6 +35,7 @@ export interface VScopedSlotFragment extends BaseVNode {
|
|
|
35
35
|
factory: (value: any, key: any) => VFragment;
|
|
36
36
|
type: VNodeType.ScopedSlotFragment;
|
|
37
37
|
slotName: unknown;
|
|
38
|
+
sel: '__scoped_slot_fragment__';
|
|
38
39
|
}
|
|
39
40
|
export interface VStaticPart {
|
|
40
41
|
readonly type: VStaticPartType;
|
|
@@ -56,7 +57,7 @@ export interface VStaticPartText extends VStaticPart {
|
|
|
56
57
|
export type VStaticPartData = Pick<VElementData, 'on' | 'ref' | 'attrs' | 'style' | 'className'>;
|
|
57
58
|
export interface VStatic extends BaseVNode {
|
|
58
59
|
readonly type: VNodeType.Static;
|
|
59
|
-
readonly sel:
|
|
60
|
+
readonly sel: '__static__';
|
|
60
61
|
readonly key: Key;
|
|
61
62
|
readonly fragment: Element;
|
|
62
63
|
readonly parts: VStaticPart[] | undefined;
|
|
@@ -64,7 +65,7 @@ export interface VStatic extends BaseVNode {
|
|
|
64
65
|
slotAssignment: string | undefined;
|
|
65
66
|
}
|
|
66
67
|
export interface VFragment extends BaseVNode, BaseVParent {
|
|
67
|
-
sel:
|
|
68
|
+
sel: '__fragment__';
|
|
68
69
|
type: VNodeType.Fragment;
|
|
69
70
|
stable: 0 | 1;
|
|
70
71
|
leading: VText | VComment;
|
|
@@ -72,15 +73,15 @@ export interface VFragment extends BaseVNode, BaseVParent {
|
|
|
72
73
|
}
|
|
73
74
|
export interface VText extends BaseVNode {
|
|
74
75
|
type: VNodeType.Text;
|
|
75
|
-
sel:
|
|
76
|
+
sel: '__text__';
|
|
76
77
|
text: string;
|
|
77
78
|
key: undefined;
|
|
78
79
|
}
|
|
79
80
|
export interface VComment extends BaseVNode {
|
|
80
81
|
type: VNodeType.Comment;
|
|
81
|
-
sel:
|
|
82
|
+
sel: '__comment__';
|
|
82
83
|
text: string;
|
|
83
|
-
key:
|
|
84
|
+
key: undefined;
|
|
84
85
|
}
|
|
85
86
|
export interface VBaseElement extends BaseVNode, BaseVParent {
|
|
86
87
|
sel: string;
|
package/dist/index.cjs.js
CHANGED
|
@@ -3336,6 +3336,9 @@ function rehydrateHotTemplate(tpl) {
|
|
|
3336
3336
|
}
|
|
3337
3337
|
function rehydrateHotStyle(style) {
|
|
3338
3338
|
const activeVMs = activeStyles.get(style);
|
|
3339
|
+
if (!activeVMs.size) {
|
|
3340
|
+
return true;
|
|
3341
|
+
}
|
|
3339
3342
|
unrenderStylesheet(style);
|
|
3340
3343
|
for (const vm of activeVMs) {
|
|
3341
3344
|
// if a style definition is swapped, we must reset
|
|
@@ -5059,7 +5062,7 @@ function ssf(slotName, factory) {
|
|
|
5059
5062
|
factory,
|
|
5060
5063
|
owner: getVMBeingRendered(),
|
|
5061
5064
|
elm: undefined,
|
|
5062
|
-
sel:
|
|
5065
|
+
sel: '__scoped_slot_fragment__',
|
|
5063
5066
|
key: undefined,
|
|
5064
5067
|
slotName,
|
|
5065
5068
|
};
|
|
@@ -5070,7 +5073,7 @@ function st(fragmentFactory, key, parts) {
|
|
|
5070
5073
|
const fragment = fragmentFactory(parts);
|
|
5071
5074
|
const vnode = {
|
|
5072
5075
|
type: 4 /* VNodeType.Static */,
|
|
5073
|
-
sel:
|
|
5076
|
+
sel: '__static__',
|
|
5074
5077
|
key,
|
|
5075
5078
|
elm: undefined,
|
|
5076
5079
|
fragment,
|
|
@@ -5088,7 +5091,7 @@ function fr(key, children, stable) {
|
|
|
5088
5091
|
const trailing = useCommentNodes ? co('') : t('');
|
|
5089
5092
|
return {
|
|
5090
5093
|
type: 5 /* VNodeType.Fragment */,
|
|
5091
|
-
sel:
|
|
5094
|
+
sel: '__fragment__',
|
|
5092
5095
|
key,
|
|
5093
5096
|
elm: undefined,
|
|
5094
5097
|
children: [leading, ...children, trailing],
|
|
@@ -5205,7 +5208,16 @@ function s(slotName, data, children, slotset) {
|
|
|
5205
5208
|
// to the vnode because the current way the diffing algo works, it will replace the original reference
|
|
5206
5209
|
// to the host element with a new one. This means the new element will be mounted and immediately unmounted.
|
|
5207
5210
|
// Creating a copy of the vnode to preserve a reference to the previous host element.
|
|
5208
|
-
|
|
5211
|
+
if (shared.isUndefined(vnode.elm)) {
|
|
5212
|
+
// vnode.elm is undefined during initial render.
|
|
5213
|
+
// We don't need to clone at this point because it doesn't need to be unmounted.
|
|
5214
|
+
vnode.slotAssignment = data.slotAssignment;
|
|
5215
|
+
}
|
|
5216
|
+
else {
|
|
5217
|
+
// Clone when the vnode.elm is defined to ensure we don't lose reference to the previous element.
|
|
5218
|
+
// This is specifically for slot forwarding.
|
|
5219
|
+
clonedVNode = { ...vnode, slotAssignment: data.slotAssignment };
|
|
5220
|
+
}
|
|
5209
5221
|
}
|
|
5210
5222
|
// If the slot content is standard type, the content is static, no additional
|
|
5211
5223
|
// processing needed on the vnode
|
|
@@ -5373,10 +5385,10 @@ function f(items) {
|
|
|
5373
5385
|
}
|
|
5374
5386
|
// [t]ext node
|
|
5375
5387
|
function t(text) {
|
|
5376
|
-
let
|
|
5388
|
+
let key, elm;
|
|
5377
5389
|
return {
|
|
5378
5390
|
type: 0 /* VNodeType.Text */,
|
|
5379
|
-
sel,
|
|
5391
|
+
sel: '__text__',
|
|
5380
5392
|
text,
|
|
5381
5393
|
elm,
|
|
5382
5394
|
key,
|
|
@@ -5385,13 +5397,13 @@ function t(text) {
|
|
|
5385
5397
|
}
|
|
5386
5398
|
// [co]mment node
|
|
5387
5399
|
function co(text) {
|
|
5388
|
-
let
|
|
5400
|
+
let elm, key;
|
|
5389
5401
|
return {
|
|
5390
5402
|
type: 1 /* VNodeType.Comment */,
|
|
5391
|
-
sel,
|
|
5403
|
+
sel: '__comment__',
|
|
5392
5404
|
text,
|
|
5393
5405
|
elm,
|
|
5394
|
-
key
|
|
5406
|
+
key,
|
|
5395
5407
|
owner: getVMBeingRendered(),
|
|
5396
5408
|
};
|
|
5397
5409
|
}
|
|
@@ -7965,5 +7977,5 @@ exports.swapTemplate = swapTemplate;
|
|
|
7965
7977
|
exports.track = track;
|
|
7966
7978
|
exports.unwrap = unwrap;
|
|
7967
7979
|
exports.wire = wire;
|
|
7968
|
-
/** version: 6.6.
|
|
7980
|
+
/** version: 6.6.6 */
|
|
7969
7981
|
//# sourceMappingURL=index.cjs.js.map
|