@lwc/engine-core 2.40.2-lbc → 2.41.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.
@@ -6400,19 +6400,9 @@ function hydrateElement(elm, vnode, renderer) {
6400
6400
  return elm;
6401
6401
  }
6402
6402
  function hydrateCustomElement(elm, vnode, renderer) {
6403
- if (vnode.ctor.validationOptOut) {
6404
- if (Array.isArray(vnode.ctor.validationOptOut)) {
6405
- if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) ||
6406
- !isMatchingElement(vnode, elm, renderer, new Set(vnode.ctor.validationOptOut))) {
6407
- return handleMismatch(elm, vnode, renderer);
6408
- }
6409
- }
6410
- }
6411
- else {
6412
- if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) ||
6413
- !isMatchingElement(vnode, elm, renderer)) {
6414
- return handleMismatch(elm, vnode, renderer);
6415
- }
6403
+ if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) ||
6404
+ !isMatchingElement(vnode, elm, renderer)) {
6405
+ return handleMismatch(elm, vnode, renderer);
6416
6406
  }
6417
6407
  const { sel, mode, ctor, owner } = vnode;
6418
6408
  const vm = createVM(elm, ctor, renderer, {
@@ -6505,8 +6495,7 @@ function hasCorrectNodeType(vnode, node, nodeType, renderer) {
6505
6495
  }
6506
6496
  return true;
6507
6497
  }
6508
- function isMatchingElement(vnode, elm, renderer, attrsToSkip) {
6509
- var _a, _b;
6498
+ function isMatchingElement(vnode, elm, renderer) {
6510
6499
  const { getProperty } = renderer;
6511
6500
  if (vnode.sel.toLowerCase() !== getProperty(elm, 'tagName').toLowerCase()) {
6512
6501
  if (process.env.NODE_ENV !== 'production') {
@@ -6514,14 +6503,10 @@ function isMatchingElement(vnode, elm, renderer, attrsToSkip) {
6514
6503
  }
6515
6504
  return false;
6516
6505
  }
6517
- const hasCompatibleAttrs = validateAttrs(vnode, elm, renderer, attrsToSkip);
6518
- const hasCompatibleClass = ((_a = attrsToSkip === null || attrsToSkip === void 0 ? void 0 : attrsToSkip.has) === null || _a === void 0 ? void 0 : _a.call(attrsToSkip, 'class'))
6519
- ? true
6520
- : validateClassAttr(vnode, elm, renderer);
6521
- const hasCompatibleStyle = ((_b = attrsToSkip === null || attrsToSkip === void 0 ? void 0 : attrsToSkip.has) === null || _b === void 0 ? void 0 : _b.call(attrsToSkip, 'style'))
6522
- ? true
6523
- : validateStyleAttr(vnode, elm, renderer);
6524
- return hasCompatibleAttrs && hasCompatibleClass && hasCompatibleStyle;
6506
+ const hasIncompatibleAttrs = validateAttrs(vnode, elm, renderer);
6507
+ const hasIncompatibleClass = validateClassAttr(vnode, elm, renderer);
6508
+ const hasIncompatibleStyle = validateStyleAttr(vnode, elm, renderer);
6509
+ return hasIncompatibleAttrs && hasIncompatibleClass && hasIncompatibleStyle;
6525
6510
  }
6526
6511
  function attributeValuesAreEqual(vnodeValue, value) {
6527
6512
  const vnodeValueAsString = String(vnodeValue);
@@ -6536,16 +6521,12 @@ function attributeValuesAreEqual(vnodeValue, value) {
6536
6521
  // In all other cases, the two values are not considered equal
6537
6522
  return false;
6538
6523
  }
6539
- function validateAttrs(vnode, elm, renderer, attrsToSkip) {
6540
- var _a;
6524
+ function validateAttrs(vnode, elm, renderer) {
6541
6525
  const { data: { attrs = {} }, } = vnode;
6542
6526
  let nodesAreCompatible = true;
6543
6527
  // Validate attributes, though we could always recovery from those by running the update mods.
6544
6528
  // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
6545
6529
  for (const [attrName, attrValue] of Object.entries(attrs)) {
6546
- if ((_a = attrsToSkip === null || attrsToSkip === void 0 ? void 0 : attrsToSkip.has) === null || _a === void 0 ? void 0 : _a.call(attrsToSkip, attrName)) {
6547
- continue;
6548
- }
6549
6530
  const { owner } = vnode;
6550
6531
  const { getAttribute } = renderer;
6551
6532
  const elmAttrValue = getAttribute(elm, attrName);
@@ -6969,5 +6950,5 @@ function readonly(obj) {
6969
6950
  }
6970
6951
 
6971
6952
  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 };
6972
- /* version: 2.40.1-lbc */
6953
+ /* version: 2.41.1 */
6973
6954
  //# sourceMappingURL=engine-core.js.map