@lwc/engine-core 2.47.0 → 2.49.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.
- 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 +19 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +19 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -3087,6 +3087,7 @@ function getComponentDef(Ctor) {
|
|
|
3087
3087
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3088
3088
|
*/
|
|
3089
3089
|
function makeHostToken(token) {
|
|
3090
|
+
// Note: if this ever changes, update the `cssScopeTokens` returned by `@lwc/compiler`
|
|
3090
3091
|
return `${token}-host`;
|
|
3091
3092
|
}
|
|
3092
3093
|
function createInlineStyleVNode(content) {
|
|
@@ -4349,15 +4350,21 @@ function ssf(slotName, factory) {
|
|
|
4349
4350
|
}
|
|
4350
4351
|
// [st]atic node
|
|
4351
4352
|
function st(fragment, key, data) {
|
|
4352
|
-
|
|
4353
|
+
const owner = getVMBeingRendered();
|
|
4354
|
+
const vnode = {
|
|
4353
4355
|
type: 4 /* VNodeType.Static */,
|
|
4354
4356
|
sel: undefined,
|
|
4355
4357
|
key,
|
|
4356
4358
|
elm: undefined,
|
|
4357
4359
|
fragment,
|
|
4358
|
-
owner
|
|
4360
|
+
owner,
|
|
4359
4361
|
data,
|
|
4360
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;
|
|
4361
4368
|
}
|
|
4362
4369
|
// [fr]agment node
|
|
4363
4370
|
function fr(key, children, stable) {
|
|
@@ -6151,7 +6158,7 @@ function hydrateRoot(vm) {
|
|
|
6151
6158
|
hasMismatch = false;
|
|
6152
6159
|
runConnectedCallback(vm);
|
|
6153
6160
|
hydrateVM(vm);
|
|
6154
|
-
if (hasMismatch) {
|
|
6161
|
+
if (hasMismatch && process.env.NODE_ENV !== 'production') {
|
|
6155
6162
|
logError('Hydration completed with errors.', vm);
|
|
6156
6163
|
}
|
|
6157
6164
|
}
|
|
@@ -6223,7 +6230,9 @@ function getValidationPredicate(optOutStaticProp) {
|
|
|
6223
6230
|
if (isArray$1(optOutStaticProp) && arrayEvery(optOutStaticProp, isString)) {
|
|
6224
6231
|
return (attrName) => !ArrayIncludes.call(optOutStaticProp, attrName);
|
|
6225
6232
|
}
|
|
6226
|
-
|
|
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
|
+
}
|
|
6227
6236
|
return (_attrName) => true;
|
|
6228
6237
|
}
|
|
6229
6238
|
function hydrateText(node, vnode, renderer) {
|
|
@@ -6259,7 +6268,8 @@ function hydrateComment(node, vnode, renderer) {
|
|
|
6259
6268
|
return node;
|
|
6260
6269
|
}
|
|
6261
6270
|
function hydrateStaticElement(elm, vnode, renderer) {
|
|
6262
|
-
if (!
|
|
6271
|
+
if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) ||
|
|
6272
|
+
!areCompatibleNodes(vnode.fragment, elm, vnode, renderer)) {
|
|
6263
6273
|
return handleMismatch(elm, vnode, renderer);
|
|
6264
6274
|
}
|
|
6265
6275
|
vnode.elm = elm;
|
|
@@ -6598,7 +6608,9 @@ function areCompatibleNodes(client, ssr, vnode, renderer) {
|
|
|
6598
6608
|
const clientAttrsNames = getProperty(client, 'getAttributeNames').call(client);
|
|
6599
6609
|
clientAttrsNames.forEach((attrName) => {
|
|
6600
6610
|
if (getAttribute(client, attrName) !== getAttribute(ssr, attrName)) {
|
|
6601
|
-
|
|
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
|
+
}
|
|
6602
6614
|
isCompatibleElements = false;
|
|
6603
6615
|
}
|
|
6604
6616
|
});
|
|
@@ -6873,5 +6885,5 @@ function readonly(obj) {
|
|
|
6873
6885
|
}
|
|
6874
6886
|
|
|
6875
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 };
|
|
6876
|
-
/** version: 2.
|
|
6888
|
+
/** version: 2.49.0 */
|
|
6877
6889
|
//# sourceMappingURL=index.js.map
|