@lwc/engine-core 3.1.2 → 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.
@@ -5,7 +5,6 @@ type N = HostNode;
5
5
  type E = HostElement;
6
6
  export type LifecycleCallback = (elm: E) => void;
7
7
  export interface RendererAPI {
8
- isNativeShadowDefined: boolean;
9
8
  isSyntheticShadowDefined: boolean;
10
9
  insert: (node: N, parent: E, anchor: N | null) => void;
11
10
  remove: (node: N, parent: E) => void;
package/dist/index.cjs.js CHANGED
@@ -5354,7 +5354,7 @@ function invokeServiceHook(vm, cbs) {
5354
5354
  }
5355
5355
 
5356
5356
  /*
5357
- * Copyright (c) 2018, salesforce.com, inc.
5357
+ * Copyright (c) 2023, Salesforce.com, inc.
5358
5358
  * All rights reserved.
5359
5359
  * SPDX-License-Identifier: MIT
5360
5360
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -5545,7 +5545,7 @@ function warnOnStylesheetsMutation(ctor) {
5545
5545
  }
5546
5546
  function computeShadowMode(vm, renderer) {
5547
5547
  const { def } = vm;
5548
- const { isSyntheticShadowDefined, isNativeShadowDefined } = renderer;
5548
+ const { isSyntheticShadowDefined } = renderer;
5549
5549
  let shadowMode;
5550
5550
  if (isSyntheticShadowDefined) {
5551
5551
  if (def.renderMode === 0 /* RenderMode.Light */) {
@@ -5553,34 +5553,25 @@ function computeShadowMode(vm, renderer) {
5553
5553
  // everything defaults to native when the synthetic shadow polyfill is unavailable.
5554
5554
  shadowMode = 0 /* ShadowMode.Native */;
5555
5555
  }
5556
- else if (isNativeShadowDefined) {
5557
- // Not combined with above condition because @lwc/features only supports identifiers in
5558
- // the if-condition.
5559
- if (lwcRuntimeFlags.ENABLE_MIXED_SHADOW_MODE) {
5560
- if (def.shadowSupportMode === "any" /* ShadowSupportMode.Any */) {
5556
+ else if (lwcRuntimeFlags.ENABLE_MIXED_SHADOW_MODE) {
5557
+ if (def.shadowSupportMode === "any" /* ShadowSupportMode.Any */) {
5558
+ shadowMode = 0 /* ShadowMode.Native */;
5559
+ }
5560
+ else {
5561
+ const shadowAncestor = getNearestShadowAncestor(vm);
5562
+ if (!shared.isNull(shadowAncestor) && shadowAncestor.shadowMode === 0 /* ShadowMode.Native */) {
5563
+ // Transitive support for native Shadow DOM. A component in native mode
5564
+ // transitively opts all of its descendants into native.
5561
5565
  shadowMode = 0 /* ShadowMode.Native */;
5562
5566
  }
5563
5567
  else {
5564
- const shadowAncestor = getNearestShadowAncestor(vm);
5565
- if (!shared.isNull(shadowAncestor) &&
5566
- shadowAncestor.shadowMode === 0 /* ShadowMode.Native */) {
5567
- // Transitive support for native Shadow DOM. A component in native mode
5568
- // transitively opts all of its descendants into native.
5569
- shadowMode = 0 /* ShadowMode.Native */;
5570
- }
5571
- else {
5572
- // Synthetic if neither this component nor any of its ancestors are configured
5573
- // to be native.
5574
- shadowMode = 1 /* ShadowMode.Synthetic */;
5575
- }
5568
+ // Synthetic if neither this component nor any of its ancestors are configured
5569
+ // to be native.
5570
+ shadowMode = 1 /* ShadowMode.Synthetic */;
5576
5571
  }
5577
5572
  }
5578
- else {
5579
- shadowMode = 1 /* ShadowMode.Synthetic */;
5580
- }
5581
5573
  }
5582
5574
  else {
5583
- // Synthetic if there is no native Shadow DOM support.
5584
5575
  shadowMode = 1 /* ShadowMode.Synthetic */;
5585
5576
  }
5586
5577
  }
@@ -6930,5 +6921,5 @@ exports.swapTemplate = swapTemplate;
6930
6921
  exports.track = track;
6931
6922
  exports.unwrap = unwrap;
6932
6923
  exports.wire = wire;
6933
- /** version: 3.1.2 */
6924
+ /** version: 3.1.3 */
6934
6925
  //# sourceMappingURL=index.cjs.js.map