@lwc/engine-core 2.48.0 → 2.49.1
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/utils.d.ts +2 -2
- package/dist/framework/vm.d.ts +2 -2
- package/dist/framework/vnodes.d.ts +2 -1
- package/dist/index.cjs.js +18 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4350,15 +4350,21 @@ function ssf(slotName, factory) {
|
|
|
4350
4350
|
}
|
|
4351
4351
|
// [st]atic node
|
|
4352
4352
|
function st(fragment, key, data) {
|
|
4353
|
-
|
|
4353
|
+
const owner = getVMBeingRendered();
|
|
4354
|
+
const vnode = {
|
|
4354
4355
|
type: 4 /* VNodeType.Static */,
|
|
4355
4356
|
sel: undefined,
|
|
4356
4357
|
key,
|
|
4357
4358
|
elm: undefined,
|
|
4358
4359
|
fragment,
|
|
4359
|
-
owner
|
|
4360
|
+
owner,
|
|
4360
4361
|
data,
|
|
4361
4362
|
};
|
|
4363
|
+
const ref = data === null || data === void 0 ? void 0 : data.ref;
|
|
4364
|
+
if (!isUndefined$1(ref)) {
|
|
4365
|
+
setRefVNode(owner, ref, vnode);
|
|
4366
|
+
}
|
|
4367
|
+
return vnode;
|
|
4362
4368
|
}
|
|
4363
4369
|
// [fr]agment node
|
|
4364
4370
|
function fr(key, children, stable) {
|
|
@@ -6152,7 +6158,7 @@ function hydrateRoot(vm) {
|
|
|
6152
6158
|
hasMismatch = false;
|
|
6153
6159
|
runConnectedCallback(vm);
|
|
6154
6160
|
hydrateVM(vm);
|
|
6155
|
-
if (hasMismatch) {
|
|
6161
|
+
if (hasMismatch && process.env.NODE_ENV !== 'production') {
|
|
6156
6162
|
logError('Hydration completed with errors.', vm);
|
|
6157
6163
|
}
|
|
6158
6164
|
}
|
|
@@ -6224,7 +6230,9 @@ function getValidationPredicate(optOutStaticProp) {
|
|
|
6224
6230
|
if (isArray$1(optOutStaticProp) && arrayEvery(optOutStaticProp, isString)) {
|
|
6225
6231
|
return (attrName) => !ArrayIncludes.call(optOutStaticProp, attrName);
|
|
6226
6232
|
}
|
|
6227
|
-
|
|
6233
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6234
|
+
logWarn('Validation opt out must be `true` or an array of attributes that should not be validated.');
|
|
6235
|
+
}
|
|
6228
6236
|
return (_attrName) => true;
|
|
6229
6237
|
}
|
|
6230
6238
|
function hydrateText(node, vnode, renderer) {
|
|
@@ -6260,7 +6268,8 @@ function hydrateComment(node, vnode, renderer) {
|
|
|
6260
6268
|
return node;
|
|
6261
6269
|
}
|
|
6262
6270
|
function hydrateStaticElement(elm, vnode, renderer) {
|
|
6263
|
-
if (!
|
|
6271
|
+
if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) ||
|
|
6272
|
+
!areCompatibleNodes(vnode.fragment, elm, vnode, renderer)) {
|
|
6264
6273
|
return handleMismatch(elm, vnode, renderer);
|
|
6265
6274
|
}
|
|
6266
6275
|
vnode.elm = elm;
|
|
@@ -6599,7 +6608,9 @@ function areCompatibleNodes(client, ssr, vnode, renderer) {
|
|
|
6599
6608
|
const clientAttrsNames = getProperty(client, 'getAttributeNames').call(client);
|
|
6600
6609
|
clientAttrsNames.forEach((attrName) => {
|
|
6601
6610
|
if (getAttribute(client, attrName) !== getAttribute(ssr, attrName)) {
|
|
6602
|
-
|
|
6611
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6612
|
+
logError(`Mismatch hydrating element <${getProperty(client, 'tagName').toLowerCase()}>: attribute "${attrName}" has different values, expected "${getAttribute(client, attrName)}" but found "${getAttribute(ssr, attrName)}"`, vnode.owner);
|
|
6613
|
+
}
|
|
6603
6614
|
isCompatibleElements = false;
|
|
6604
6615
|
}
|
|
6605
6616
|
});
|
|
@@ -6874,5 +6885,5 @@ function readonly(obj) {
|
|
|
6874
6885
|
}
|
|
6875
6886
|
|
|
6876
6887
|
export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, sanitizeAttribute, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
6877
|
-
/** version: 2.
|
|
6888
|
+
/** version: 2.49.1 */
|
|
6878
6889
|
//# sourceMappingURL=index.js.map
|