@lwc/engine-core 3.1.1 → 3.1.3

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
@@ -3153,7 +3153,8 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
3153
3153
  if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS &&
3154
3154
  !isScopedCss &&
3155
3155
  vm.renderMode === 0 /* RenderMode.Light */) {
3156
- logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
3156
+ logError('Unscoped CSS is not supported in Light DOM in this environment. Please use scoped CSS ' +
3157
+ '(*.scoped.css) instead of unscoped CSS (*.css). See also: https://sfdc.co/scoped-styles-light-dom');
3157
3158
  continue;
3158
3159
  }
3159
3160
  // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
@@ -5349,7 +5350,7 @@ function invokeServiceHook(vm, cbs) {
5349
5350
  }
5350
5351
 
5351
5352
  /*
5352
- * Copyright (c) 2018, salesforce.com, inc.
5353
+ * Copyright (c) 2023, Salesforce.com, inc.
5353
5354
  * All rights reserved.
5354
5355
  * SPDX-License-Identifier: MIT
5355
5356
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -5540,7 +5541,7 @@ function warnOnStylesheetsMutation(ctor) {
5540
5541
  }
5541
5542
  function computeShadowMode(vm, renderer) {
5542
5543
  const { def } = vm;
5543
- const { isSyntheticShadowDefined, isNativeShadowDefined } = renderer;
5544
+ const { isSyntheticShadowDefined } = renderer;
5544
5545
  let shadowMode;
5545
5546
  if (isSyntheticShadowDefined) {
5546
5547
  if (def.renderMode === 0 /* RenderMode.Light */) {
@@ -5548,34 +5549,25 @@ function computeShadowMode(vm, renderer) {
5548
5549
  // everything defaults to native when the synthetic shadow polyfill is unavailable.
5549
5550
  shadowMode = 0 /* ShadowMode.Native */;
5550
5551
  }
5551
- else if (isNativeShadowDefined) {
5552
- // Not combined with above condition because @lwc/features only supports identifiers in
5553
- // the if-condition.
5554
- if (lwcRuntimeFlags.ENABLE_MIXED_SHADOW_MODE) {
5555
- if (def.shadowSupportMode === "any" /* ShadowSupportMode.Any */) {
5552
+ else if (lwcRuntimeFlags.ENABLE_MIXED_SHADOW_MODE) {
5553
+ if (def.shadowSupportMode === "any" /* ShadowSupportMode.Any */) {
5554
+ shadowMode = 0 /* ShadowMode.Native */;
5555
+ }
5556
+ else {
5557
+ const shadowAncestor = getNearestShadowAncestor(vm);
5558
+ if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0 /* ShadowMode.Native */) {
5559
+ // Transitive support for native Shadow DOM. A component in native mode
5560
+ // transitively opts all of its descendants into native.
5556
5561
  shadowMode = 0 /* ShadowMode.Native */;
5557
5562
  }
5558
5563
  else {
5559
- const shadowAncestor = getNearestShadowAncestor(vm);
5560
- if (!isNull(shadowAncestor) &&
5561
- shadowAncestor.shadowMode === 0 /* ShadowMode.Native */) {
5562
- // Transitive support for native Shadow DOM. A component in native mode
5563
- // transitively opts all of its descendants into native.
5564
- shadowMode = 0 /* ShadowMode.Native */;
5565
- }
5566
- else {
5567
- // Synthetic if neither this component nor any of its ancestors are configured
5568
- // to be native.
5569
- shadowMode = 1 /* ShadowMode.Synthetic */;
5570
- }
5564
+ // Synthetic if neither this component nor any of its ancestors are configured
5565
+ // to be native.
5566
+ shadowMode = 1 /* ShadowMode.Synthetic */;
5571
5567
  }
5572
5568
  }
5573
- else {
5574
- shadowMode = 1 /* ShadowMode.Synthetic */;
5575
- }
5576
5569
  }
5577
5570
  else {
5578
- // Synthetic if there is no native Shadow DOM support.
5579
5571
  shadowMode = 1 /* ShadowMode.Synthetic */;
5580
5572
  }
5581
5573
  }
@@ -6887,5 +6879,5 @@ function readonly(obj) {
6887
6879
  }
6888
6880
 
6889
6881
  export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentAPIVersion, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, sanitizeAttribute, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
6890
- /** version: 3.1.1 */
6882
+ /** version: 3.1.3 */
6891
6883
  //# sourceMappingURL=index.js.map