@lwc/engine-core 7.1.0 → 7.1.2

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/index.js CHANGED
@@ -3227,9 +3227,9 @@ function unrenderStylesheet(stylesheet) {
3227
3227
  }
3228
3228
  for (const cssContent of cssContents) {
3229
3229
  const abortController = cssContentToAbortControllers.get(cssContent);
3230
- /* istanbul ignore if */
3231
3230
  if (isUndefined$1(abortController)) {
3232
- throw new Error('Cannot find AbortController for CSS content');
3231
+ // Two stylesheets with the same content will share an abort controller, in which case it only needs to be called once.
3232
+ continue;
3233
3233
  }
3234
3234
  abortController.abort();
3235
3235
  // remove association with AbortController in case stylesheet is rendered again
@@ -5627,6 +5627,11 @@ function shc(content) {
5627
5627
  * https://github.com/vuejs/core/blob/e790e1bdd7df7be39e14780529db86e4da47a3db/packages/shared/src/normalizeProp.ts#L63-L82
5628
5628
  */
5629
5629
  function ncls(value) {
5630
+ if (isUndefined$1(value) || isNull(value)) {
5631
+ // Returning undefined here improves initial render cost, because the old vnode's class will be considered
5632
+ // undefined in the `patchClassAttribute` routine, so `oldClass === newClass` will be true so we return early
5633
+ return undefined;
5634
+ }
5630
5635
  let res = '';
5631
5636
  if (isString(value)) {
5632
5637
  res = value;
@@ -7271,9 +7276,11 @@ function textNodeContentsAreEqual(node, vnode, renderer) {
7271
7276
  // LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
7272
7277
  function getValidationPredicate(elm, renderer, optOutStaticProp) {
7273
7278
  // `data-lwc-host-mutated` is a special attribute added by the SSR engine itself,
7274
- // which does the same thing as an explicit `static validationOptOut = true`.
7275
- if (renderer.getAttribute(elm, 'data-lwc-host-mutated') === '') {
7276
- return (_attrName) => false;
7279
+ // which does the same thing as an explicit `static validationOptOut = ['attr1', 'attr2']`.
7280
+ const hostMutatedValue = renderer.getAttribute(elm, 'data-lwc-host-mutated');
7281
+ if (isString(hostMutatedValue)) {
7282
+ const mutatedAttrValues = new Set(StringSplit.call(hostMutatedValue, / /));
7283
+ return (attrName) => !mutatedAttrValues.has(attrName);
7277
7284
  }
7278
7285
  if (isUndefined$1(optOutStaticProp)) {
7279
7286
  return (_attrName) => true;
@@ -8037,5 +8044,5 @@ function readonly(obj) {
8037
8044
  }
8038
8045
 
8039
8046
  export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, computeShadowAndRenderMode, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentAPIVersion, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, registerComponent, registerDecorators, registerTemplate, runFormAssociatedCallback, runFormDisabledCallback, runFormResetCallback, runFormStateRestoreCallback, sanitizeAttribute, setHooks, shouldBeFormAssociated, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
8040
- /** version: 7.1.0 */
8047
+ /** version: 7.1.2 */
8041
8048
  //# sourceMappingURL=index.js.map