@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.
- package/dist/engine-core.cjs.js +10 -29
- package/dist/engine-core.cjs.js.map +1 -1
- package/dist/engine-core.js +10 -29
- package/dist/engine-core.js.map +1 -1
- package/package.json +5 -5
- package/types/3rdparty/snabbdom/snabbdom.d.ts +0 -11
- package/types/3rdparty/snabbdom/types.d.ts +0 -70
- package/types/framework/accessor-reactive-observer.d.ts +0 -9
- package/types/framework/api-helpers.d.ts +0 -15
- package/types/framework/context-provider.d.ts +0 -10
- package/types/framework/context.d.ts +0 -17
- package/types/framework/hooks.d.ts +0 -9
- package/types/framework/modules/scope-token-class.d.ts +0 -2
- package/types/framework/performance-timing.d.ts +0 -10
- package/types/framework/upgradable-element.d.ts +0 -7
- package/types/framework/wiring.d.ts +0 -28
- package/types/renderer.d.ts +0 -119
- package/types/testFeatureFlag.d.ts +0 -1
package/dist/engine-core.cjs.js
CHANGED
|
@@ -6402,19 +6402,9 @@ function hydrateElement(elm, vnode, renderer) {
|
|
|
6402
6402
|
return elm;
|
|
6403
6403
|
}
|
|
6404
6404
|
function hydrateCustomElement(elm, vnode, renderer) {
|
|
6405
|
-
if (vnode.
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
!isMatchingElement(vnode, elm, renderer, new Set(vnode.ctor.validationOptOut))) {
|
|
6409
|
-
return handleMismatch(elm, vnode, renderer);
|
|
6410
|
-
}
|
|
6411
|
-
}
|
|
6412
|
-
}
|
|
6413
|
-
else {
|
|
6414
|
-
if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) ||
|
|
6415
|
-
!isMatchingElement(vnode, elm, renderer)) {
|
|
6416
|
-
return handleMismatch(elm, vnode, renderer);
|
|
6417
|
-
}
|
|
6405
|
+
if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) ||
|
|
6406
|
+
!isMatchingElement(vnode, elm, renderer)) {
|
|
6407
|
+
return handleMismatch(elm, vnode, renderer);
|
|
6418
6408
|
}
|
|
6419
6409
|
const { sel, mode, ctor, owner } = vnode;
|
|
6420
6410
|
const vm = createVM(elm, ctor, renderer, {
|
|
@@ -6507,8 +6497,7 @@ function hasCorrectNodeType(vnode, node, nodeType, renderer) {
|
|
|
6507
6497
|
}
|
|
6508
6498
|
return true;
|
|
6509
6499
|
}
|
|
6510
|
-
function isMatchingElement(vnode, elm, renderer
|
|
6511
|
-
var _a, _b;
|
|
6500
|
+
function isMatchingElement(vnode, elm, renderer) {
|
|
6512
6501
|
const { getProperty } = renderer;
|
|
6513
6502
|
if (vnode.sel.toLowerCase() !== getProperty(elm, 'tagName').toLowerCase()) {
|
|
6514
6503
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -6516,14 +6505,10 @@ function isMatchingElement(vnode, elm, renderer, attrsToSkip) {
|
|
|
6516
6505
|
}
|
|
6517
6506
|
return false;
|
|
6518
6507
|
}
|
|
6519
|
-
const
|
|
6520
|
-
const
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
const hasCompatibleStyle = ((_b = attrsToSkip === null || attrsToSkip === void 0 ? void 0 : attrsToSkip.has) === null || _b === void 0 ? void 0 : _b.call(attrsToSkip, 'style'))
|
|
6524
|
-
? true
|
|
6525
|
-
: validateStyleAttr(vnode, elm, renderer);
|
|
6526
|
-
return hasCompatibleAttrs && hasCompatibleClass && hasCompatibleStyle;
|
|
6508
|
+
const hasIncompatibleAttrs = validateAttrs(vnode, elm, renderer);
|
|
6509
|
+
const hasIncompatibleClass = validateClassAttr(vnode, elm, renderer);
|
|
6510
|
+
const hasIncompatibleStyle = validateStyleAttr(vnode, elm, renderer);
|
|
6511
|
+
return hasIncompatibleAttrs && hasIncompatibleClass && hasIncompatibleStyle;
|
|
6527
6512
|
}
|
|
6528
6513
|
function attributeValuesAreEqual(vnodeValue, value) {
|
|
6529
6514
|
const vnodeValueAsString = String(vnodeValue);
|
|
@@ -6538,16 +6523,12 @@ function attributeValuesAreEqual(vnodeValue, value) {
|
|
|
6538
6523
|
// In all other cases, the two values are not considered equal
|
|
6539
6524
|
return false;
|
|
6540
6525
|
}
|
|
6541
|
-
function validateAttrs(vnode, elm, renderer
|
|
6542
|
-
var _a;
|
|
6526
|
+
function validateAttrs(vnode, elm, renderer) {
|
|
6543
6527
|
const { data: { attrs = {} }, } = vnode;
|
|
6544
6528
|
let nodesAreCompatible = true;
|
|
6545
6529
|
// Validate attributes, though we could always recovery from those by running the update mods.
|
|
6546
6530
|
// Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
|
|
6547
6531
|
for (const [attrName, attrValue] of Object.entries(attrs)) {
|
|
6548
|
-
if ((_a = attrsToSkip === null || attrsToSkip === void 0 ? void 0 : attrsToSkip.has) === null || _a === void 0 ? void 0 : _a.call(attrsToSkip, attrName)) {
|
|
6549
|
-
continue;
|
|
6550
|
-
}
|
|
6551
6532
|
const { owner } = vnode;
|
|
6552
6533
|
const { getAttribute } = renderer;
|
|
6553
6534
|
const elmAttrValue = getAttribute(elm, attrName);
|
|
@@ -7008,5 +6989,5 @@ exports.swapTemplate = swapTemplate;
|
|
|
7008
6989
|
exports.track = track;
|
|
7009
6990
|
exports.unwrap = unwrap;
|
|
7010
6991
|
exports.wire = wire;
|
|
7011
|
-
/* version: 2.
|
|
6992
|
+
/* version: 2.41.1 */
|
|
7012
6993
|
//# sourceMappingURL=engine-core.cjs.js.map
|