lwc 2.24.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 +256 -141
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +256 -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 +243 -128
  5. package/dist/engine-dom/iife/es5/engine-dom.js +44 -12
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +42 -10
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +256 -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 +243 -128
  11. package/dist/engine-dom/umd/es5/engine-dom.js +44 -12
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +42 -10
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +208 -122
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +208 -122
  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
@@ -299,9 +299,9 @@ function htmlPropertyToAttribute(propName) {
299
299
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
300
300
  */
301
301
  // Increment whenever the LWC template compiler changes
302
- const LWC_VERSION = "2.24.0";
302
+ const LWC_VERSION = "2.25.1";
303
303
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
304
- /** version: 2.24.0 */
304
+ /** version: 2.25.1 */
305
305
 
306
306
  /**
307
307
  * Copyright (C) 2018 salesforce.com, inc.
@@ -383,7 +383,7 @@ for (let i = 0, len = ElementPrototypeAriaPropertyNames.length; i < len; i += 1)
383
383
  patch$1(propName);
384
384
  }
385
385
  }
386
- /** version: 2.24.0 */
386
+ /** version: 2.25.1 */
387
387
 
388
388
  /**
389
389
  * Copyright (C) 2018 salesforce.com, inc.
@@ -409,6 +409,7 @@ const features = {
409
409
  ENABLE_REACTIVE_SETTER: null,
410
410
  ENABLE_WIRE_SYNC_EMIT: null,
411
411
  ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null,
412
+ DISABLE_LIGHT_DOM_UNSCOPED_CSS: null,
412
413
  };
413
414
  if (!_globalThis.lwcRuntimeFlags) {
414
415
  Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
@@ -462,7 +463,7 @@ function setFeatureFlagForTest(name, value) {
462
463
  setFeatureFlag(name, value);
463
464
  }
464
465
  }
465
- /** version: 2.24.0 */
466
+ /** version: 2.25.1 */
466
467
 
467
468
  /*
468
469
  * Copyright (c) 2018, salesforce.com, inc.
@@ -3459,167 +3460,270 @@ function getComponentDef(Ctor) {
3459
3460
  * SPDX-License-Identifier: MIT
3460
3461
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3461
3462
  */
3463
+
3462
3464
  function makeHostToken(token) {
3463
- return `${token}-host`;
3465
+ return `${token}-host`;
3464
3466
  }
3467
+
3465
3468
  function createInlineStyleVNode(content) {
3466
- return api.h('style', {
3467
- key: 'style',
3468
- attrs: {
3469
- type: 'text/css',
3470
- },
3471
- }, [api.t(content)]);
3469
+ return api.h('style', {
3470
+ key: 'style',
3471
+ attrs: {
3472
+ type: 'text/css'
3473
+ }
3474
+ }, [api.t(content)]);
3472
3475
  }
3476
+
3473
3477
  function updateStylesheetToken(vm, template) {
3474
- const { elm, context, renderMode, shadowMode, renderer: { getClassList, removeAttribute, setAttribute }, } = vm;
3475
- const { stylesheets: newStylesheets, stylesheetToken: newStylesheetToken } = template;
3476
- const isSyntheticShadow = renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */;
3477
- const { hasScopedStyles } = context;
3478
- let newToken;
3479
- let newHasTokenInClass;
3480
- let newHasTokenInAttribute;
3481
- // Reset the styling token applied to the host element.
3482
- const { stylesheetToken: oldToken, hasTokenInClass: oldHasTokenInClass, hasTokenInAttribute: oldHasTokenInAttribute, } = context;
3483
- if (!isUndefined$1(oldToken)) {
3484
- if (oldHasTokenInClass) {
3485
- getClassList(elm).remove(makeHostToken(oldToken));
3486
- }
3487
- if (oldHasTokenInAttribute) {
3488
- removeAttribute(elm, makeHostToken(oldToken));
3489
- }
3490
- }
3491
- // Apply the new template styling token to the host element, if the new template has any
3492
- // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
3493
- if (!isUndefined$1(newStylesheets) && newStylesheets.length !== 0) {
3494
- newToken = newStylesheetToken;
3495
- }
3496
- // Set the new styling token on the host element
3497
- if (!isUndefined$1(newToken)) {
3498
- if (hasScopedStyles) {
3499
- getClassList(elm).add(makeHostToken(newToken));
3500
- newHasTokenInClass = true;
3501
- }
3502
- if (isSyntheticShadow) {
3503
- setAttribute(elm, makeHostToken(newToken), '');
3504
- newHasTokenInAttribute = true;
3505
- }
3506
- }
3507
- // Update the styling tokens present on the context object.
3508
- context.stylesheetToken = newToken;
3509
- context.hasTokenInClass = newHasTokenInClass;
3510
- context.hasTokenInAttribute = newHasTokenInAttribute;
3478
+ const {
3479
+ elm,
3480
+ context,
3481
+ renderMode,
3482
+ shadowMode,
3483
+ renderer: {
3484
+ getClassList,
3485
+ removeAttribute,
3486
+ setAttribute
3487
+ }
3488
+ } = vm;
3489
+ const {
3490
+ stylesheets: newStylesheets,
3491
+ stylesheetToken: newStylesheetToken
3492
+ } = template;
3493
+ const isSyntheticShadow = renderMode === 1
3494
+ /* RenderMode.Shadow */
3495
+ && shadowMode === 1
3496
+ /* ShadowMode.Synthetic */
3497
+ ;
3498
+ const {
3499
+ hasScopedStyles
3500
+ } = context;
3501
+ let newToken;
3502
+ let newHasTokenInClass;
3503
+ let newHasTokenInAttribute; // Reset the styling token applied to the host element.
3504
+
3505
+ const {
3506
+ stylesheetToken: oldToken,
3507
+ hasTokenInClass: oldHasTokenInClass,
3508
+ hasTokenInAttribute: oldHasTokenInAttribute
3509
+ } = context;
3510
+
3511
+ if (!isUndefined$1(oldToken)) {
3512
+ if (oldHasTokenInClass) {
3513
+ getClassList(elm).remove(makeHostToken(oldToken));
3514
+ }
3515
+
3516
+ if (oldHasTokenInAttribute) {
3517
+ removeAttribute(elm, makeHostToken(oldToken));
3518
+ }
3519
+ } // Apply the new template styling token to the host element, if the new template has any
3520
+ // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
3521
+
3522
+
3523
+ if (!isUndefined$1(newStylesheets) && newStylesheets.length !== 0) {
3524
+ newToken = newStylesheetToken;
3525
+ } // Set the new styling token on the host element
3526
+
3527
+
3528
+ if (!isUndefined$1(newToken)) {
3529
+ if (hasScopedStyles) {
3530
+ getClassList(elm).add(makeHostToken(newToken));
3531
+ newHasTokenInClass = true;
3532
+ }
3533
+
3534
+ if (isSyntheticShadow) {
3535
+ setAttribute(elm, makeHostToken(newToken), '');
3536
+ newHasTokenInAttribute = true;
3537
+ }
3538
+ } // Update the styling tokens present on the context object.
3539
+
3540
+
3541
+ context.stylesheetToken = newToken;
3542
+ context.hasTokenInClass = newHasTokenInClass;
3543
+ context.hasTokenInAttribute = newHasTokenInAttribute;
3511
3544
  }
3545
+
3512
3546
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
3513
- const content = [];
3514
- let root;
3515
- for (let i = 0; i < stylesheets.length; i++) {
3516
- let stylesheet = stylesheets[i];
3517
- if (isArray$1(stylesheet)) {
3518
- ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
3547
+ const content = [];
3548
+ let root;
3549
+
3550
+ for (let i = 0; i < stylesheets.length; i++) {
3551
+ let stylesheet = stylesheets[i];
3552
+
3553
+ if (isArray$1(stylesheet)) {
3554
+ ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
3555
+ } else {
3556
+ if (process.env.NODE_ENV !== 'production') {
3557
+ // Check for compiler version mismatch in dev mode only
3558
+ checkVersionMismatch(stylesheet, 'stylesheet'); // in dev-mode, we support hot swapping of stylesheet, which means that
3559
+ // the component instance might be attempting to use an old version of
3560
+ // the stylesheet, while internally, we have a replacement for it.
3561
+
3562
+ stylesheet = getStyleOrSwappedStyle(stylesheet);
3563
+ }
3564
+
3565
+ const isScopedCss = stylesheet[KEY__SCOPED_CSS];
3566
+
3567
+ if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS) {
3568
+ if (!isScopedCss && vm.renderMode === 0
3569
+ /* RenderMode.Light */
3570
+ ) {
3571
+ logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
3572
+ continue;
3519
3573
  }
3520
- else {
3521
- if (process.env.NODE_ENV !== 'production') {
3522
- // Check for compiler version mismatch in dev mode only
3523
- checkVersionMismatch(stylesheet, 'stylesheet');
3524
- // in dev-mode, we support hot swapping of stylesheet, which means that
3525
- // the component instance might be attempting to use an old version of
3526
- // the stylesheet, while internally, we have a replacement for it.
3527
- stylesheet = getStyleOrSwappedStyle(stylesheet);
3528
- }
3529
- const isScopedCss = stylesheet[KEY__SCOPED_CSS];
3530
- // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
3531
- const scopeToken = isScopedCss ||
3532
- (vm.shadowMode === 1 /* ShadowMode.Synthetic */ && vm.renderMode === 1 /* RenderMode.Shadow */)
3533
- ? stylesheetToken
3534
- : undefined;
3535
- // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
3536
- // native shadow DOM. Synthetic shadow DOM never uses `:host`.
3537
- const useActualHostSelector = vm.renderMode === 0 /* RenderMode.Light */
3538
- ? !isScopedCss
3539
- : vm.shadowMode === 0 /* ShadowMode.Native */;
3540
- // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
3541
- // we use an attribute selector on the host to simulate :dir().
3542
- let useNativeDirPseudoclass;
3543
- if (vm.renderMode === 1 /* RenderMode.Shadow */) {
3544
- useNativeDirPseudoclass = vm.shadowMode === 0 /* ShadowMode.Native */;
3545
- }
3546
- else {
3547
- // Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
3548
- // At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
3549
- if (isUndefined$1(root)) {
3550
- // Only calculate the root once as necessary
3551
- root = getNearestShadowComponent(vm);
3552
- }
3553
- useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0 /* ShadowMode.Native */;
3554
- }
3555
- ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
3574
+ } // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
3575
+
3576
+
3577
+ const scopeToken = isScopedCss || vm.shadowMode === 1
3578
+ /* ShadowMode.Synthetic */
3579
+ && vm.renderMode === 1
3580
+ /* RenderMode.Shadow */
3581
+ ? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
3582
+ // native shadow DOM. Synthetic shadow DOM never uses `:host`.
3583
+
3584
+ const useActualHostSelector = vm.renderMode === 0
3585
+ /* RenderMode.Light */
3586
+ ? !isScopedCss : vm.shadowMode === 0
3587
+ /* ShadowMode.Native */
3588
+ ; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
3589
+ // we use an attribute selector on the host to simulate :dir().
3590
+
3591
+ let useNativeDirPseudoclass;
3592
+
3593
+ if (vm.renderMode === 1
3594
+ /* RenderMode.Shadow */
3595
+ ) {
3596
+ useNativeDirPseudoclass = vm.shadowMode === 0
3597
+ /* ShadowMode.Native */
3598
+ ;
3599
+ } else {
3600
+ // Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
3601
+ // At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
3602
+ if (isUndefined$1(root)) {
3603
+ // Only calculate the root once as necessary
3604
+ root = getNearestShadowComponent(vm);
3556
3605
  }
3606
+
3607
+ useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
3608
+ /* ShadowMode.Native */
3609
+ ;
3610
+ }
3611
+
3612
+ ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
3557
3613
  }
3558
- return content;
3614
+ }
3615
+
3616
+ return content;
3559
3617
  }
3618
+
3560
3619
  function getStylesheetsContent(vm, template) {
3561
- const { stylesheets, stylesheetToken } = template;
3562
- let content = [];
3563
- if (!isUndefined$1(stylesheets) && stylesheets.length !== 0) {
3564
- content = evaluateStylesheetsContent(stylesheets, stylesheetToken, vm);
3565
- }
3566
- return content;
3567
- }
3568
- // It might be worth caching this to avoid doing the lookup repeatedly, but
3620
+ const {
3621
+ stylesheets,
3622
+ stylesheetToken
3623
+ } = template;
3624
+ let content = [];
3625
+
3626
+ if (!isUndefined$1(stylesheets) && stylesheets.length !== 0) {
3627
+ content = evaluateStylesheetsContent(stylesheets, stylesheetToken, vm);
3628
+ }
3629
+
3630
+ return content;
3631
+ } // It might be worth caching this to avoid doing the lookup repeatedly, but
3569
3632
  // perf testing has not shown it to be a huge improvement yet:
3570
3633
  // https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
3634
+
3571
3635
  function getNearestShadowComponent(vm) {
3572
- let owner = vm;
3573
- while (!isNull(owner)) {
3574
- if (owner.renderMode === 1 /* RenderMode.Shadow */) {
3575
- return owner;
3576
- }
3577
- owner = owner.owner;
3636
+ let owner = vm;
3637
+
3638
+ while (!isNull(owner)) {
3639
+ if (owner.renderMode === 1
3640
+ /* RenderMode.Shadow */
3641
+ ) {
3642
+ return owner;
3578
3643
  }
3579
- return owner;
3644
+
3645
+ owner = owner.owner;
3646
+ }
3647
+
3648
+ return owner;
3580
3649
  }
3581
3650
  /**
3582
3651
  * If the component that is currently being rendered uses scoped styles,
3583
3652
  * this returns the unique token for that scoped stylesheet. Otherwise
3584
3653
  * it returns null.
3585
3654
  */
3655
+
3656
+
3586
3657
  function getScopeTokenClass(owner) {
3587
- const { cmpTemplate, context } = owner;
3588
- return (context.hasScopedStyles && (cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken)) || null;
3658
+ const {
3659
+ cmpTemplate,
3660
+ context
3661
+ } = owner;
3662
+ return context.hasScopedStyles && (cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken) || null;
3589
3663
  }
3590
- function getNearestNativeShadowComponent(vm) {
3591
- const owner = getNearestShadowComponent(vm);
3592
- if (!isNull(owner) && owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
3593
- // Synthetic-within-native is impossible. So if the nearest shadow component is
3594
- // synthetic, we know we won't find a native component if we go any further.
3595
- return null;
3664
+ /**
3665
+ * This function returns the host style token for a custom element if it
3666
+ * exists. Otherwise it returns null.
3667
+ */
3668
+
3669
+ function getStylesheetTokenHost(vnode) {
3670
+ const {
3671
+ template: {
3672
+ stylesheetToken
3596
3673
  }
3597
- return owner;
3674
+ } = getComponentInternalDef(vnode.ctor);
3675
+ return !isUndefined$1(stylesheetToken) ? makeHostToken(stylesheetToken) : null;
3676
+ }
3677
+
3678
+ function getNearestNativeShadowComponent(vm) {
3679
+ const owner = getNearestShadowComponent(vm);
3680
+
3681
+ if (!isNull(owner) && owner.shadowMode === 1
3682
+ /* ShadowMode.Synthetic */
3683
+ ) {
3684
+ // Synthetic-within-native is impossible. So if the nearest shadow component is
3685
+ // synthetic, we know we won't find a native component if we go any further.
3686
+ return null;
3687
+ }
3688
+
3689
+ return owner;
3598
3690
  }
3691
+
3599
3692
  function createStylesheet(vm, stylesheets) {
3600
- const { renderMode, shadowMode, renderer: { insertStylesheet }, } = vm;
3601
- if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
3602
- for (let i = 0; i < stylesheets.length; i++) {
3603
- insertStylesheet(stylesheets[i]);
3604
- }
3605
- }
3606
- else if (vm.hydrated) {
3607
- // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
3608
- // This works in the client, because the stylesheets are created, and cached in the VM
3609
- // the first time the VM renders.
3610
- // native shadow or light DOM, SSR
3611
- return ArrayMap.call(stylesheets, createInlineStyleVNode);
3693
+ const {
3694
+ renderMode,
3695
+ shadowMode,
3696
+ renderer: {
3697
+ insertStylesheet
3612
3698
  }
3613
- else {
3614
- // native shadow or light DOM, DOM renderer
3615
- const root = getNearestNativeShadowComponent(vm);
3616
- // null root means a global style
3617
- const target = isNull(root) ? undefined : root.shadowRoot;
3618
- for (let i = 0; i < stylesheets.length; i++) {
3619
- insertStylesheet(stylesheets[i], target);
3620
- }
3699
+ } = vm;
3700
+
3701
+ if (renderMode === 1
3702
+ /* RenderMode.Shadow */
3703
+ && shadowMode === 1
3704
+ /* ShadowMode.Synthetic */
3705
+ ) {
3706
+ for (let i = 0; i < stylesheets.length; i++) {
3707
+ insertStylesheet(stylesheets[i]);
3708
+ }
3709
+ } else if (vm.hydrated) {
3710
+ // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
3711
+ // This works in the client, because the stylesheets are created, and cached in the VM
3712
+ // the first time the VM renders.
3713
+ // native shadow or light DOM, SSR
3714
+ return ArrayMap.call(stylesheets, createInlineStyleVNode);
3715
+ } else {
3716
+ // native shadow or light DOM, DOM renderer
3717
+ const root = getNearestNativeShadowComponent(vm); // null root means a global style
3718
+
3719
+ const target = isNull(root) ? undefined : root.shadowRoot;
3720
+
3721
+ for (let i = 0; i < stylesheets.length; i++) {
3722
+ insertStylesheet(stylesheets[i], target);
3621
3723
  }
3622
- return null;
3724
+ }
3725
+
3726
+ return null;
3623
3727
  }
3624
3728
 
3625
3729
  /*
@@ -3704,6 +3808,9 @@ function isVBaseElement(vnode) {
3704
3808
  function isSameVnode(vnode1, vnode2) {
3705
3809
  return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;
3706
3810
  }
3811
+ function isVCustomElement(vnode) {
3812
+ return vnode.type === 3 /* VNodeType.CustomElement */;
3813
+ }
3707
3814
 
3708
3815
  /*
3709
3816
  * Copyright (c) 2018, salesforce.com, inc.
@@ -6989,6 +7096,7 @@ function validateClassAttr(vnode, elm, renderer) {
6989
7096
  let { className, classMap } = data;
6990
7097
  const { getProperty, getClassList } = renderer;
6991
7098
  const scopedToken = getScopeTokenClass(owner);
7099
+ const stylesheetTokenHost = isVCustomElement(vnode) ? getStylesheetTokenHost(vnode) : null;
6992
7100
  // Classnames for scoped CSS are added directly to the DOM during rendering,
6993
7101
  // or to the VDOM on the server in the case of SSR. As such, these classnames
6994
7102
  // are never present in VDOM nodes in the browser.
@@ -6997,10 +7105,17 @@ function validateClassAttr(vnode, elm, renderer) {
6997
7105
  // are rendered during SSR. This needs to be accounted for when validating.
6998
7106
  if (scopedToken) {
6999
7107
  if (!isUndefined$1(className)) {
7000
- className = `${scopedToken} ${className}`;
7108
+ className = isNull(stylesheetTokenHost)
7109
+ ? `${scopedToken} ${className}`
7110
+ : `${scopedToken} ${className} ${stylesheetTokenHost}`;
7001
7111
  }
7002
7112
  else if (!isUndefined$1(classMap)) {
7003
- classMap = Object.assign(Object.assign({}, classMap), { [scopedToken]: true });
7113
+ classMap = Object.assign(Object.assign(Object.assign({}, classMap), { [scopedToken]: true }), (isNull(stylesheetTokenHost) ? {} : { [stylesheetTokenHost]: true }));
7114
+ }
7115
+ else {
7116
+ className = isNull(stylesheetTokenHost)
7117
+ ? `${scopedToken}`
7118
+ : `${scopedToken} ${stylesheetTokenHost}`;
7004
7119
  }
7005
7120
  }
7006
7121
  let nodesAreCompatible = true;
@@ -7242,7 +7357,7 @@ function getComponentConstructor(elm) {
7242
7357
  }
7243
7358
  return ctor;
7244
7359
  }
7245
- /* version: 2.24.0 */
7360
+ /* version: 2.25.1 */
7246
7361
 
7247
7362
  /*
7248
7363
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7446,7 +7561,7 @@ function rendererFactory(baseRenderer) {
7446
7561
  function isNull(obj) {
7447
7562
  return obj === null;
7448
7563
  }
7449
- /** version: 2.24.0 */
7564
+ /** version: 2.25.1 */
7450
7565
 
7451
7566
  /*
7452
7567
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8065,6 +8180,6 @@ defineProperty(LightningElement, 'CustomElementConstructor', {
8065
8180
  });
8066
8181
  freeze(LightningElement);
8067
8182
  seal(LightningElement.prototype);
8068
- /* version: 2.24.0 */
8183
+ /* version: 2.25.1 */
8069
8184
 
8070
8185
  export { LightningElement, profilerControl as __unstable__ProfilerControl, api$1 as api, deprecatedBuildCustomElementConstructor as buildCustomElementConstructor, createContextProvider, createElement, freezeTemplate, getComponentConstructor, getComponentDef, hydrateComponent, isComponentConstructor, isNodeShadowed as isNodeFromTemplate, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, renderer, rendererFactory, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };