lwc 2.25.0 → 2.25.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.
Files changed (35) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +237 -141
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +237 -141
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +224 -128
  5. package/dist/engine-dom/iife/es5/engine-dom.js +20 -9
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +18 -7
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +237 -141
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +224 -128
  11. package/dist/engine-dom/umd/es5/engine-dom.js +20 -9
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +18 -7
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +207 -121
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +207 -121
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
  20. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
  22. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
  23. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
  24. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
  25. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
  26. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  27. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  28. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  29. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  30. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  31. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  34. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  35. package/package.json +7 -7
@@ -294,7 +294,7 @@
294
294
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
295
295
  return attributeName;
296
296
  }
297
- /** version: 2.25.0 */
297
+ /** version: 2.25.1 */
298
298
 
299
299
  /**
300
300
  * Copyright (C) 2018 salesforce.com, inc.
@@ -376,7 +376,7 @@
376
376
  patch$1(propName);
377
377
  }
378
378
  }
379
- /** version: 2.25.0 */
379
+ /** version: 2.25.1 */
380
380
 
381
381
  /**
382
382
  * Copyright (C) 2018 salesforce.com, inc.
@@ -402,6 +402,7 @@
402
402
  ENABLE_REACTIVE_SETTER: null,
403
403
  ENABLE_WIRE_SYNC_EMIT: null,
404
404
  ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null,
405
+ DISABLE_LIGHT_DOM_UNSCOPED_CSS: null,
405
406
  };
406
407
  if (!_globalThis.lwcRuntimeFlags) {
407
408
  Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
@@ -2376,167 +2377,262 @@
2376
2377
  * SPDX-License-Identifier: MIT
2377
2378
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2378
2379
  */
2380
+
2379
2381
  function makeHostToken(token) {
2380
- return `${token}-host`;
2382
+ return `${token}-host`;
2381
2383
  }
2384
+
2382
2385
  function createInlineStyleVNode(content) {
2383
- return api.h('style', {
2384
- key: 'style',
2385
- attrs: {
2386
- type: 'text/css',
2387
- },
2388
- }, [api.t(content)]);
2386
+ return api.h('style', {
2387
+ key: 'style',
2388
+ attrs: {
2389
+ type: 'text/css'
2390
+ }
2391
+ }, [api.t(content)]);
2389
2392
  }
2393
+
2390
2394
  function updateStylesheetToken(vm, template) {
2391
- const { elm, context, renderMode, shadowMode, renderer: { getClassList, removeAttribute, setAttribute }, } = vm;
2392
- const { stylesheets: newStylesheets, stylesheetToken: newStylesheetToken } = template;
2393
- const isSyntheticShadow = renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */;
2394
- const { hasScopedStyles } = context;
2395
- let newToken;
2396
- let newHasTokenInClass;
2397
- let newHasTokenInAttribute;
2398
- // Reset the styling token applied to the host element.
2399
- const { stylesheetToken: oldToken, hasTokenInClass: oldHasTokenInClass, hasTokenInAttribute: oldHasTokenInAttribute, } = context;
2400
- if (!isUndefined$1(oldToken)) {
2401
- if (oldHasTokenInClass) {
2402
- getClassList(elm).remove(makeHostToken(oldToken));
2403
- }
2404
- if (oldHasTokenInAttribute) {
2405
- removeAttribute(elm, makeHostToken(oldToken));
2406
- }
2395
+ const {
2396
+ elm,
2397
+ context,
2398
+ renderMode,
2399
+ shadowMode,
2400
+ renderer: {
2401
+ getClassList,
2402
+ removeAttribute,
2403
+ setAttribute
2404
+ }
2405
+ } = vm;
2406
+ const {
2407
+ stylesheets: newStylesheets,
2408
+ stylesheetToken: newStylesheetToken
2409
+ } = template;
2410
+ const isSyntheticShadow = renderMode === 1
2411
+ /* RenderMode.Shadow */
2412
+ && shadowMode === 1
2413
+ /* ShadowMode.Synthetic */
2414
+ ;
2415
+ const {
2416
+ hasScopedStyles
2417
+ } = context;
2418
+ let newToken;
2419
+ let newHasTokenInClass;
2420
+ let newHasTokenInAttribute; // Reset the styling token applied to the host element.
2421
+
2422
+ const {
2423
+ stylesheetToken: oldToken,
2424
+ hasTokenInClass: oldHasTokenInClass,
2425
+ hasTokenInAttribute: oldHasTokenInAttribute
2426
+ } = context;
2427
+
2428
+ if (!isUndefined$1(oldToken)) {
2429
+ if (oldHasTokenInClass) {
2430
+ getClassList(elm).remove(makeHostToken(oldToken));
2407
2431
  }
2408
- // Apply the new template styling token to the host element, if the new template has any
2409
- // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
2410
- if (!isUndefined$1(newStylesheets) && newStylesheets.length !== 0) {
2411
- newToken = newStylesheetToken;
2432
+
2433
+ if (oldHasTokenInAttribute) {
2434
+ removeAttribute(elm, makeHostToken(oldToken));
2412
2435
  }
2413
- // Set the new styling token on the host element
2414
- if (!isUndefined$1(newToken)) {
2415
- if (hasScopedStyles) {
2416
- getClassList(elm).add(makeHostToken(newToken));
2417
- newHasTokenInClass = true;
2418
- }
2419
- if (isSyntheticShadow) {
2420
- setAttribute(elm, makeHostToken(newToken), '');
2421
- newHasTokenInAttribute = true;
2422
- }
2436
+ } // Apply the new template styling token to the host element, if the new template has any
2437
+ // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
2438
+
2439
+
2440
+ if (!isUndefined$1(newStylesheets) && newStylesheets.length !== 0) {
2441
+ newToken = newStylesheetToken;
2442
+ } // Set the new styling token on the host element
2443
+
2444
+
2445
+ if (!isUndefined$1(newToken)) {
2446
+ if (hasScopedStyles) {
2447
+ getClassList(elm).add(makeHostToken(newToken));
2448
+ newHasTokenInClass = true;
2423
2449
  }
2424
- // Update the styling tokens present on the context object.
2425
- context.stylesheetToken = newToken;
2426
- context.hasTokenInClass = newHasTokenInClass;
2427
- context.hasTokenInAttribute = newHasTokenInAttribute;
2450
+
2451
+ if (isSyntheticShadow) {
2452
+ setAttribute(elm, makeHostToken(newToken), '');
2453
+ newHasTokenInAttribute = true;
2454
+ }
2455
+ } // Update the styling tokens present on the context object.
2456
+
2457
+
2458
+ context.stylesheetToken = newToken;
2459
+ context.hasTokenInClass = newHasTokenInClass;
2460
+ context.hasTokenInAttribute = newHasTokenInAttribute;
2428
2461
  }
2462
+
2429
2463
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
2430
- const content = [];
2431
- let root;
2432
- for (let i = 0; i < stylesheets.length; i++) {
2433
- let stylesheet = stylesheets[i];
2434
- if (isArray$1(stylesheet)) {
2435
- ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
2464
+ const content = [];
2465
+ let root;
2466
+
2467
+ for (let i = 0; i < stylesheets.length; i++) {
2468
+ let stylesheet = stylesheets[i];
2469
+
2470
+ if (isArray$1(stylesheet)) {
2471
+ ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
2472
+ } else {
2473
+
2474
+ const isScopedCss = stylesheet[KEY__SCOPED_CSS];
2475
+
2476
+ if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS) {
2477
+ if (!isScopedCss && vm.renderMode === 0
2478
+ /* RenderMode.Light */
2479
+ ) {
2480
+ logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
2481
+ continue;
2436
2482
  }
2437
- else {
2438
- const isScopedCss = stylesheet[KEY__SCOPED_CSS];
2439
- // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
2440
- const scopeToken = isScopedCss ||
2441
- (vm.shadowMode === 1 /* ShadowMode.Synthetic */ && vm.renderMode === 1 /* RenderMode.Shadow */)
2442
- ? stylesheetToken
2443
- : undefined;
2444
- // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
2445
- // native shadow DOM. Synthetic shadow DOM never uses `:host`.
2446
- const useActualHostSelector = vm.renderMode === 0 /* RenderMode.Light */
2447
- ? !isScopedCss
2448
- : vm.shadowMode === 0 /* ShadowMode.Native */;
2449
- // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
2450
- // we use an attribute selector on the host to simulate :dir().
2451
- let useNativeDirPseudoclass;
2452
- if (vm.renderMode === 1 /* RenderMode.Shadow */) {
2453
- useNativeDirPseudoclass = vm.shadowMode === 0 /* ShadowMode.Native */;
2454
- }
2455
- else {
2456
- // Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
2457
- // At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
2458
- if (isUndefined$1(root)) {
2459
- // Only calculate the root once as necessary
2460
- root = getNearestShadowComponent(vm);
2461
- }
2462
- useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0 /* ShadowMode.Native */;
2463
- }
2464
- ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
2483
+ } // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
2484
+
2485
+
2486
+ const scopeToken = isScopedCss || vm.shadowMode === 1
2487
+ /* ShadowMode.Synthetic */
2488
+ && vm.renderMode === 1
2489
+ /* RenderMode.Shadow */
2490
+ ? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
2491
+ // native shadow DOM. Synthetic shadow DOM never uses `:host`.
2492
+
2493
+ const useActualHostSelector = vm.renderMode === 0
2494
+ /* RenderMode.Light */
2495
+ ? !isScopedCss : vm.shadowMode === 0
2496
+ /* ShadowMode.Native */
2497
+ ; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
2498
+ // we use an attribute selector on the host to simulate :dir().
2499
+
2500
+ let useNativeDirPseudoclass;
2501
+
2502
+ if (vm.renderMode === 1
2503
+ /* RenderMode.Shadow */
2504
+ ) {
2505
+ useNativeDirPseudoclass = vm.shadowMode === 0
2506
+ /* ShadowMode.Native */
2507
+ ;
2508
+ } else {
2509
+ // Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
2510
+ // At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
2511
+ if (isUndefined$1(root)) {
2512
+ // Only calculate the root once as necessary
2513
+ root = getNearestShadowComponent(vm);
2465
2514
  }
2515
+
2516
+ useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
2517
+ /* ShadowMode.Native */
2518
+ ;
2519
+ }
2520
+
2521
+ ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
2466
2522
  }
2467
- return content;
2523
+ }
2524
+
2525
+ return content;
2468
2526
  }
2527
+
2469
2528
  function getStylesheetsContent(vm, template) {
2470
- const { stylesheets, stylesheetToken } = template;
2471
- let content = [];
2472
- if (!isUndefined$1(stylesheets) && stylesheets.length !== 0) {
2473
- content = evaluateStylesheetsContent(stylesheets, stylesheetToken, vm);
2474
- }
2475
- return content;
2476
- }
2477
- // It might be worth caching this to avoid doing the lookup repeatedly, but
2529
+ const {
2530
+ stylesheets,
2531
+ stylesheetToken
2532
+ } = template;
2533
+ let content = [];
2534
+
2535
+ if (!isUndefined$1(stylesheets) && stylesheets.length !== 0) {
2536
+ content = evaluateStylesheetsContent(stylesheets, stylesheetToken, vm);
2537
+ }
2538
+
2539
+ return content;
2540
+ } // It might be worth caching this to avoid doing the lookup repeatedly, but
2478
2541
  // perf testing has not shown it to be a huge improvement yet:
2479
2542
  // https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
2543
+
2480
2544
  function getNearestShadowComponent(vm) {
2481
- let owner = vm;
2482
- while (!isNull(owner)) {
2483
- if (owner.renderMode === 1 /* RenderMode.Shadow */) {
2484
- return owner;
2485
- }
2486
- owner = owner.owner;
2545
+ let owner = vm;
2546
+
2547
+ while (!isNull(owner)) {
2548
+ if (owner.renderMode === 1
2549
+ /* RenderMode.Shadow */
2550
+ ) {
2551
+ return owner;
2487
2552
  }
2488
- return owner;
2553
+
2554
+ owner = owner.owner;
2555
+ }
2556
+
2557
+ return owner;
2489
2558
  }
2490
2559
  /**
2491
2560
  * If the component that is currently being rendered uses scoped styles,
2492
2561
  * this returns the unique token for that scoped stylesheet. Otherwise
2493
2562
  * it returns null.
2494
2563
  */
2564
+
2565
+
2495
2566
  function getScopeTokenClass(owner) {
2496
- const { cmpTemplate, context } = owner;
2497
- return (context.hasScopedStyles && (cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken)) || null;
2567
+ const {
2568
+ cmpTemplate,
2569
+ context
2570
+ } = owner;
2571
+ return context.hasScopedStyles && (cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken) || null;
2498
2572
  }
2499
2573
  /**
2500
2574
  * This function returns the host style token for a custom element if it
2501
2575
  * exists. Otherwise it returns null.
2502
2576
  */
2577
+
2503
2578
  function getStylesheetTokenHost(vnode) {
2504
- const { template: { stylesheetToken }, } = getComponentInternalDef(vnode.ctor);
2505
- return !isUndefined$1(stylesheetToken) ? makeHostToken(stylesheetToken) : null;
2579
+ const {
2580
+ template: {
2581
+ stylesheetToken
2582
+ }
2583
+ } = getComponentInternalDef(vnode.ctor);
2584
+ return !isUndefined$1(stylesheetToken) ? makeHostToken(stylesheetToken) : null;
2506
2585
  }
2586
+
2507
2587
  function getNearestNativeShadowComponent(vm) {
2508
- const owner = getNearestShadowComponent(vm);
2509
- if (!isNull(owner) && owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
2510
- // Synthetic-within-native is impossible. So if the nearest shadow component is
2511
- // synthetic, we know we won't find a native component if we go any further.
2512
- return null;
2513
- }
2514
- return owner;
2588
+ const owner = getNearestShadowComponent(vm);
2589
+
2590
+ if (!isNull(owner) && owner.shadowMode === 1
2591
+ /* ShadowMode.Synthetic */
2592
+ ) {
2593
+ // Synthetic-within-native is impossible. So if the nearest shadow component is
2594
+ // synthetic, we know we won't find a native component if we go any further.
2595
+ return null;
2596
+ }
2597
+
2598
+ return owner;
2515
2599
  }
2600
+
2516
2601
  function createStylesheet(vm, stylesheets) {
2517
- const { renderMode, shadowMode, renderer: { insertStylesheet }, } = vm;
2518
- if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
2519
- for (let i = 0; i < stylesheets.length; i++) {
2520
- insertStylesheet(stylesheets[i]);
2521
- }
2522
- }
2523
- else if (vm.hydrated) {
2524
- // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
2525
- // This works in the client, because the stylesheets are created, and cached in the VM
2526
- // the first time the VM renders.
2527
- // native shadow or light DOM, SSR
2528
- return ArrayMap.call(stylesheets, createInlineStyleVNode);
2602
+ const {
2603
+ renderMode,
2604
+ shadowMode,
2605
+ renderer: {
2606
+ insertStylesheet
2529
2607
  }
2530
- else {
2531
- // native shadow or light DOM, DOM renderer
2532
- const root = getNearestNativeShadowComponent(vm);
2533
- // null root means a global style
2534
- const target = isNull(root) ? undefined : root.shadowRoot;
2535
- for (let i = 0; i < stylesheets.length; i++) {
2536
- insertStylesheet(stylesheets[i], target);
2537
- }
2608
+ } = vm;
2609
+
2610
+ if (renderMode === 1
2611
+ /* RenderMode.Shadow */
2612
+ && shadowMode === 1
2613
+ /* ShadowMode.Synthetic */
2614
+ ) {
2615
+ for (let i = 0; i < stylesheets.length; i++) {
2616
+ insertStylesheet(stylesheets[i]);
2617
+ }
2618
+ } else if (vm.hydrated) {
2619
+ // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
2620
+ // This works in the client, because the stylesheets are created, and cached in the VM
2621
+ // the first time the VM renders.
2622
+ // native shadow or light DOM, SSR
2623
+ return ArrayMap.call(stylesheets, createInlineStyleVNode);
2624
+ } else {
2625
+ // native shadow or light DOM, DOM renderer
2626
+ const root = getNearestNativeShadowComponent(vm); // null root means a global style
2627
+
2628
+ const target = isNull(root) ? undefined : root.shadowRoot;
2629
+
2630
+ for (let i = 0; i < stylesheets.length; i++) {
2631
+ insertStylesheet(stylesheets[i], target);
2538
2632
  }
2539
- return null;
2633
+ }
2634
+
2635
+ return null;
2540
2636
  }
2541
2637
 
2542
2638
  /*
@@ -5607,7 +5703,7 @@
5607
5703
  }
5608
5704
  return ctor;
5609
5705
  }
5610
- /* version: 2.25.0 */
5706
+ /* version: 2.25.1 */
5611
5707
 
5612
5708
  /*
5613
5709
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5802,7 +5898,7 @@
5802
5898
  function isNull(obj) {
5803
5899
  return obj === null;
5804
5900
  }
5805
- /** version: 2.25.0 */
5901
+ /** version: 2.25.1 */
5806
5902
 
5807
5903
  /*
5808
5904
  * Copyright (c) 2018, salesforce.com, inc.
@@ -6413,7 +6509,7 @@
6413
6509
  });
6414
6510
  freeze(LightningElement);
6415
6511
  seal(LightningElement.prototype);
6416
- /* version: 2.25.0 */
6512
+ /* version: 2.25.1 */
6417
6513
 
6418
6514
  exports.LightningElement = LightningElement;
6419
6515
  exports.__unstable__ProfilerControl = profilerControl;
@@ -368,9 +368,9 @@
368
368
  // Increment whenever the LWC template compiler changes
369
369
 
370
370
 
371
- var LWC_VERSION = "2.25.0";
371
+ var LWC_VERSION = "2.25.1";
372
372
  var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
373
- /** version: 2.25.0 */
373
+ /** version: 2.25.1 */
374
374
 
375
375
  /**
376
376
  * Copyright (C) 2018 salesforce.com, inc.
@@ -464,7 +464,7 @@
464
464
  patch$1(propName);
465
465
  }
466
466
  }
467
- /** version: 2.25.0 */
467
+ /** version: 2.25.1 */
468
468
 
469
469
  /**
470
470
  * Copyright (C) 2018 salesforce.com, inc.
@@ -491,7 +491,8 @@
491
491
  ENABLE_NODE_PATCH: null,
492
492
  ENABLE_REACTIVE_SETTER: null,
493
493
  ENABLE_WIRE_SYNC_EMIT: null,
494
- ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null
494
+ ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null,
495
+ DISABLE_LIGHT_DOM_UNSCOPED_CSS: null
495
496
  };
496
497
 
497
498
  if (!_globalThis.lwcRuntimeFlags) {
@@ -557,7 +558,7 @@
557
558
  setFeatureFlag(name, value);
558
559
  }
559
560
  }
560
- /** version: 2.25.0 */
561
+ /** version: 2.25.1 */
561
562
 
562
563
  /*
563
564
  * Copyright (c) 2018, salesforce.com, inc.
@@ -4351,7 +4352,17 @@
4351
4352
  stylesheet = getStyleOrSwappedStyle(stylesheet);
4352
4353
  }
4353
4354
 
4354
- var isScopedCss = stylesheet[KEY__SCOPED_CSS]; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
4355
+ var isScopedCss = stylesheet[KEY__SCOPED_CSS];
4356
+
4357
+ if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS) {
4358
+ if (!isScopedCss && vm.renderMode === 0
4359
+ /* RenderMode.Light */
4360
+ ) {
4361
+ logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
4362
+ continue;
4363
+ }
4364
+ } // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
4365
+
4355
4366
 
4356
4367
  var scopeToken = isScopedCss || vm.shadowMode === 1
4357
4368
  /* ShadowMode.Synthetic */
@@ -8543,7 +8554,7 @@
8543
8554
 
8544
8555
  return ctor;
8545
8556
  }
8546
- /* version: 2.25.0 */
8557
+ /* version: 2.25.1 */
8547
8558
 
8548
8559
  /*
8549
8560
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8771,7 +8782,7 @@
8771
8782
  function isNull(obj) {
8772
8783
  return obj === null;
8773
8784
  }
8774
- /** version: 2.25.0 */
8785
+ /** version: 2.25.1 */
8775
8786
 
8776
8787
  /*
8777
8788
  * Copyright (c) 2018, salesforce.com, inc.
@@ -9501,7 +9512,7 @@
9501
9512
  });
9502
9513
  freeze(LightningElement);
9503
9514
  seal(LightningElement.prototype);
9504
- /* version: 2.25.0 */
9515
+ /* version: 2.25.1 */
9505
9516
 
9506
9517
  exports.LightningElement = LightningElement;
9507
9518
  exports.__unstable__ProfilerControl = profilerControl;