@lwc/engine-core 2.25.0 → 2.26.0
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/engine-core.cjs.js +419 -431
- package/dist/engine-core.js +421 -432
- package/package.json +3 -3
- package/types/framework/main.d.ts +1 -2
- package/types/framework/renderer.d.ts +2 -3
- package/types/framework/stylesheet.d.ts +2 -0
- package/types/framework/template.d.ts +1 -0
- package/types/framework/upgradable-element.d.ts +0 -7
package/dist/engine-core.cjs.js
CHANGED
|
@@ -1465,7 +1465,9 @@ const refsCache = new WeakMap();
|
|
|
1465
1465
|
const LightningElement = function () {
|
|
1466
1466
|
// This should be as performant as possible, while any initialization should be done lazily
|
|
1467
1467
|
if (shared.isNull(vmBeingConstructed)) {
|
|
1468
|
-
|
|
1468
|
+
// Thrown when doing something like `new LightningElement()` or
|
|
1469
|
+
// `class Foo extends LightningElement {}; new Foo()`
|
|
1470
|
+
throw new TypeError('Illegal constructor');
|
|
1469
1471
|
}
|
|
1470
1472
|
const vm = vmBeingConstructed;
|
|
1471
1473
|
const { def, elm } = vm;
|
|
@@ -2529,274 +2531,213 @@ const swappedStyleMap = new WeakMap();
|
|
|
2529
2531
|
const activeTemplates = new WeakMap();
|
|
2530
2532
|
const activeComponents = new WeakMap();
|
|
2531
2533
|
const activeStyles = new WeakMap();
|
|
2532
|
-
|
|
2533
2534
|
function rehydrateHotTemplate(tpl) {
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
return true;
|
|
2535
|
+
const list = activeTemplates.get(tpl);
|
|
2536
|
+
if (!shared.isUndefined(list)) {
|
|
2537
|
+
list.forEach((vm) => {
|
|
2538
|
+
if (shared.isFalse(vm.isDirty)) {
|
|
2539
|
+
// forcing the vm to rehydrate in the micro-task:
|
|
2540
|
+
markComponentAsDirty(vm);
|
|
2541
|
+
scheduleRehydration(vm);
|
|
2542
|
+
}
|
|
2543
|
+
});
|
|
2544
|
+
// resetting the Set to release the memory of those vm references
|
|
2545
|
+
// since they are not longer related to this template, instead
|
|
2546
|
+
// they will get re-associated once these instances are rehydrated.
|
|
2547
|
+
list.clear();
|
|
2548
|
+
}
|
|
2549
|
+
return true;
|
|
2551
2550
|
}
|
|
2552
|
-
|
|
2553
2551
|
function rehydrateHotStyle(style) {
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
return true;
|
|
2552
|
+
const list = activeStyles.get(style);
|
|
2553
|
+
if (!shared.isUndefined(list)) {
|
|
2554
|
+
list.forEach((vm) => {
|
|
2555
|
+
// if a style definition is swapped, we must reset
|
|
2556
|
+
// vm's template content in the next micro-task:
|
|
2557
|
+
forceRehydration(vm);
|
|
2558
|
+
});
|
|
2559
|
+
// resetting the Set to release the memory of those vm references
|
|
2560
|
+
// since they are not longer related to this style, instead
|
|
2561
|
+
// they will get re-associated once these instances are rehydrated.
|
|
2562
|
+
list.clear();
|
|
2563
|
+
}
|
|
2564
|
+
return true;
|
|
2569
2565
|
}
|
|
2570
|
-
|
|
2571
2566
|
function rehydrateHotComponent(Ctor) {
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
list.clear();
|
|
2599
|
-
}
|
|
2600
|
-
|
|
2601
|
-
return canRefreshAllInstances;
|
|
2567
|
+
const list = activeComponents.get(Ctor);
|
|
2568
|
+
let canRefreshAllInstances = true;
|
|
2569
|
+
if (!shared.isUndefined(list)) {
|
|
2570
|
+
list.forEach((vm) => {
|
|
2571
|
+
const { owner } = vm;
|
|
2572
|
+
if (!shared.isNull(owner)) {
|
|
2573
|
+
// if a component class definition is swapped, we must reset
|
|
2574
|
+
// owner's template content in the next micro-task:
|
|
2575
|
+
forceRehydration(owner);
|
|
2576
|
+
}
|
|
2577
|
+
else {
|
|
2578
|
+
// the hot swapping for components only work for instances of components
|
|
2579
|
+
// created from a template, root elements can't be swapped because we
|
|
2580
|
+
// don't have a way to force the creation of the element with the same state
|
|
2581
|
+
// of the current element.
|
|
2582
|
+
// Instead, we can report the problem to the caller so it can take action,
|
|
2583
|
+
// for example: reload the entire page.
|
|
2584
|
+
canRefreshAllInstances = false;
|
|
2585
|
+
}
|
|
2586
|
+
});
|
|
2587
|
+
// resetting the Set to release the memory of those vm references
|
|
2588
|
+
// since they are not longer related to this constructor, instead
|
|
2589
|
+
// they will get re-associated once these instances are rehydrated.
|
|
2590
|
+
list.clear();
|
|
2591
|
+
}
|
|
2592
|
+
return canRefreshAllInstances;
|
|
2602
2593
|
}
|
|
2603
|
-
|
|
2604
2594
|
function getTemplateOrSwappedTemplate(tpl) {
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
if (features.lwcRuntimeFlags.ENABLE_HMR) {
|
|
2595
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2596
|
+
// this method should never leak to prod
|
|
2597
|
+
throw new ReferenceError();
|
|
2598
|
+
}
|
|
2611
2599
|
const visited = new Set();
|
|
2612
|
-
|
|
2613
2600
|
while (swappedTemplateMap.has(tpl) && !visited.has(tpl)) {
|
|
2614
|
-
|
|
2615
|
-
|
|
2601
|
+
visited.add(tpl);
|
|
2602
|
+
tpl = swappedTemplateMap.get(tpl);
|
|
2616
2603
|
}
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
return tpl;
|
|
2604
|
+
return tpl;
|
|
2620
2605
|
}
|
|
2621
2606
|
function getComponentOrSwappedComponent(Ctor) {
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
if (features.lwcRuntimeFlags.ENABLE_HMR) {
|
|
2607
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2608
|
+
// this method should never leak to prod
|
|
2609
|
+
throw new ReferenceError();
|
|
2610
|
+
}
|
|
2628
2611
|
const visited = new Set();
|
|
2629
|
-
|
|
2630
2612
|
while (swappedComponentMap.has(Ctor) && !visited.has(Ctor)) {
|
|
2631
|
-
|
|
2632
|
-
|
|
2613
|
+
visited.add(Ctor);
|
|
2614
|
+
Ctor = swappedComponentMap.get(Ctor);
|
|
2633
2615
|
}
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
return Ctor;
|
|
2616
|
+
return Ctor;
|
|
2637
2617
|
}
|
|
2638
2618
|
function getStyleOrSwappedStyle(style) {
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
if (features.lwcRuntimeFlags.ENABLE_HMR) {
|
|
2619
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2620
|
+
// this method should never leak to prod
|
|
2621
|
+
throw new ReferenceError();
|
|
2622
|
+
}
|
|
2645
2623
|
const visited = new Set();
|
|
2646
|
-
|
|
2647
2624
|
while (swappedStyleMap.has(style) && !visited.has(style)) {
|
|
2648
|
-
|
|
2649
|
-
|
|
2625
|
+
visited.add(style);
|
|
2626
|
+
style = swappedStyleMap.get(style);
|
|
2650
2627
|
}
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
return style;
|
|
2628
|
+
return style;
|
|
2654
2629
|
}
|
|
2655
2630
|
function setActiveVM(vm) {
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
if (features.lwcRuntimeFlags.ENABLE_HMR) {
|
|
2631
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2632
|
+
// this method should never leak to prod
|
|
2633
|
+
throw new ReferenceError();
|
|
2634
|
+
}
|
|
2662
2635
|
// tracking active component
|
|
2663
2636
|
const Ctor = vm.def.ctor;
|
|
2664
2637
|
let componentVMs = activeComponents.get(Ctor);
|
|
2665
|
-
|
|
2666
2638
|
if (shared.isUndefined(componentVMs)) {
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
}
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2639
|
+
componentVMs = new Set();
|
|
2640
|
+
activeComponents.set(Ctor, componentVMs);
|
|
2641
|
+
}
|
|
2642
|
+
// this will allow us to keep track of the hot components
|
|
2643
|
+
componentVMs.add(vm);
|
|
2644
|
+
// tracking active template
|
|
2674
2645
|
const tpl = vm.cmpTemplate;
|
|
2675
|
-
|
|
2676
2646
|
if (tpl) {
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
stylesheetVMs.add(vm);
|
|
2707
|
-
});
|
|
2708
|
-
}
|
|
2647
|
+
let templateVMs = activeTemplates.get(tpl);
|
|
2648
|
+
if (shared.isUndefined(templateVMs)) {
|
|
2649
|
+
templateVMs = new Set();
|
|
2650
|
+
activeTemplates.set(tpl, templateVMs);
|
|
2651
|
+
}
|
|
2652
|
+
// this will allow us to keep track of the templates that are
|
|
2653
|
+
// being used by a hot component
|
|
2654
|
+
templateVMs.add(vm);
|
|
2655
|
+
// tracking active styles associated to template
|
|
2656
|
+
const stylesheets = tpl.stylesheets;
|
|
2657
|
+
if (!shared.isUndefined(stylesheets)) {
|
|
2658
|
+
flattenStylesheets(stylesheets).forEach((stylesheet) => {
|
|
2659
|
+
// this is necessary because we don't hold the list of styles
|
|
2660
|
+
// in the vm, we only hold the selected (already swapped template)
|
|
2661
|
+
// but the styles attached to the template might not be the actual
|
|
2662
|
+
// active ones, but the swapped versions of those.
|
|
2663
|
+
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
2664
|
+
let stylesheetVMs = activeStyles.get(stylesheet);
|
|
2665
|
+
if (shared.isUndefined(stylesheetVMs)) {
|
|
2666
|
+
stylesheetVMs = new Set();
|
|
2667
|
+
activeStyles.set(stylesheet, stylesheetVMs);
|
|
2668
|
+
}
|
|
2669
|
+
// this will allow us to keep track of the stylesheet that are
|
|
2670
|
+
// being used by a hot component
|
|
2671
|
+
stylesheetVMs.add(vm);
|
|
2672
|
+
});
|
|
2673
|
+
}
|
|
2709
2674
|
}
|
|
2710
|
-
}
|
|
2711
2675
|
}
|
|
2712
2676
|
function removeActiveVM(vm) {
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
if (features.lwcRuntimeFlags.ENABLE_HMR) {
|
|
2677
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2678
|
+
// this method should never leak to prod
|
|
2679
|
+
throw new ReferenceError();
|
|
2680
|
+
}
|
|
2719
2681
|
// tracking inactive component
|
|
2720
2682
|
const Ctor = vm.def.ctor;
|
|
2721
2683
|
let list = activeComponents.get(Ctor);
|
|
2722
|
-
|
|
2723
2684
|
if (!shared.isUndefined(list)) {
|
|
2724
|
-
// deleting the vm from the set to avoid leaking memory
|
|
2725
|
-
list.delete(vm);
|
|
2726
|
-
} // removing inactive template
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
const tpl = vm.cmpTemplate;
|
|
2730
|
-
|
|
2731
|
-
if (tpl) {
|
|
2732
|
-
list = activeTemplates.get(tpl);
|
|
2733
|
-
|
|
2734
|
-
if (!shared.isUndefined(list)) {
|
|
2735
2685
|
// deleting the vm from the set to avoid leaking memory
|
|
2736
2686
|
list.delete(vm);
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
flattenStylesheets(styles).forEach(style => {
|
|
2744
|
-
list = activeStyles.get(style);
|
|
2745
|
-
|
|
2746
|
-
if (!shared.isUndefined(list)) {
|
|
2687
|
+
}
|
|
2688
|
+
// removing inactive template
|
|
2689
|
+
const tpl = vm.cmpTemplate;
|
|
2690
|
+
if (tpl) {
|
|
2691
|
+
list = activeTemplates.get(tpl);
|
|
2692
|
+
if (!shared.isUndefined(list)) {
|
|
2747
2693
|
// deleting the vm from the set to avoid leaking memory
|
|
2748
2694
|
list.delete(vm);
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2695
|
+
}
|
|
2696
|
+
// removing active styles associated to template
|
|
2697
|
+
const styles = tpl.stylesheets;
|
|
2698
|
+
if (!shared.isUndefined(styles)) {
|
|
2699
|
+
flattenStylesheets(styles).forEach((style) => {
|
|
2700
|
+
list = activeStyles.get(style);
|
|
2701
|
+
if (!shared.isUndefined(list)) {
|
|
2702
|
+
// deleting the vm from the set to avoid leaking memory
|
|
2703
|
+
list.delete(vm);
|
|
2704
|
+
}
|
|
2705
|
+
});
|
|
2706
|
+
}
|
|
2752
2707
|
}
|
|
2753
|
-
}
|
|
2754
2708
|
}
|
|
2755
2709
|
function swapTemplate(oldTpl, newTpl) {
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2710
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2711
|
+
if (isTemplateRegistered(oldTpl) && isTemplateRegistered(newTpl)) {
|
|
2712
|
+
swappedTemplateMap.set(oldTpl, newTpl);
|
|
2713
|
+
return rehydrateHotTemplate(oldTpl);
|
|
2714
|
+
}
|
|
2715
|
+
else {
|
|
2716
|
+
throw new TypeError(`Invalid Template`);
|
|
2717
|
+
}
|
|
2762
2718
|
}
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
if (!features.lwcRuntimeFlags.ENABLE_HMR) {
|
|
2766
|
-
throw new Error('HMR is not enabled');
|
|
2767
|
-
}
|
|
2768
|
-
|
|
2769
|
-
return false;
|
|
2719
|
+
return false;
|
|
2770
2720
|
}
|
|
2771
2721
|
function swapComponent(oldComponent, newComponent) {
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2722
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2723
|
+
if (isComponentConstructor(oldComponent) && isComponentConstructor(newComponent)) {
|
|
2724
|
+
swappedComponentMap.set(oldComponent, newComponent);
|
|
2725
|
+
return rehydrateHotComponent(oldComponent);
|
|
2726
|
+
}
|
|
2727
|
+
else {
|
|
2728
|
+
throw new TypeError(`Invalid Component`);
|
|
2729
|
+
}
|
|
2778
2730
|
}
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
if (!features.lwcRuntimeFlags.ENABLE_HMR) {
|
|
2782
|
-
throw new Error('HMR is not enabled');
|
|
2783
|
-
}
|
|
2784
|
-
|
|
2785
|
-
return false;
|
|
2731
|
+
return false;
|
|
2786
2732
|
}
|
|
2787
2733
|
function swapStyle(oldStyle, newStyle) {
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
if (!features.lwcRuntimeFlags.ENABLE_HMR) {
|
|
2796
|
-
throw new Error('HMR is not enabled');
|
|
2797
|
-
}
|
|
2798
|
-
|
|
2799
|
-
return false;
|
|
2734
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2735
|
+
// TODO [#1887]: once the support for registering styles is implemented
|
|
2736
|
+
// we can add the validation of both styles around this block.
|
|
2737
|
+
swappedStyleMap.set(oldStyle, newStyle);
|
|
2738
|
+
return rehydrateHotStyle(oldStyle);
|
|
2739
|
+
}
|
|
2740
|
+
return false;
|
|
2800
2741
|
}
|
|
2801
2742
|
|
|
2802
2743
|
/*
|
|
@@ -3003,244 +2944,273 @@ function getComponentDef(Ctor) {
|
|
|
3003
2944
|
* SPDX-License-Identifier: MIT
|
|
3004
2945
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3005
2946
|
*/
|
|
2947
|
+
|
|
3006
2948
|
function makeHostToken(token) {
|
|
3007
|
-
|
|
2949
|
+
return `${token}-host`;
|
|
3008
2950
|
}
|
|
2951
|
+
|
|
3009
2952
|
function createInlineStyleVNode(content) {
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
2953
|
+
return api.h('style', {
|
|
2954
|
+
key: 'style',
|
|
2955
|
+
attrs: {
|
|
2956
|
+
type: 'text/css'
|
|
2957
|
+
}
|
|
2958
|
+
}, [api.t(content)]);
|
|
3016
2959
|
}
|
|
2960
|
+
|
|
3017
2961
|
function updateStylesheetToken(vm, template) {
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
2962
|
+
const {
|
|
2963
|
+
elm,
|
|
2964
|
+
context,
|
|
2965
|
+
renderMode,
|
|
2966
|
+
shadowMode,
|
|
2967
|
+
renderer: {
|
|
2968
|
+
getClassList,
|
|
2969
|
+
removeAttribute,
|
|
2970
|
+
setAttribute
|
|
2971
|
+
}
|
|
2972
|
+
} = vm;
|
|
2973
|
+
const {
|
|
2974
|
+
stylesheets: newStylesheets,
|
|
2975
|
+
stylesheetToken: newStylesheetToken
|
|
2976
|
+
} = template;
|
|
2977
|
+
const isSyntheticShadow = renderMode === 1
|
|
2978
|
+
/* RenderMode.Shadow */
|
|
2979
|
+
&& shadowMode === 1
|
|
2980
|
+
/* ShadowMode.Synthetic */
|
|
2981
|
+
;
|
|
2982
|
+
const {
|
|
2983
|
+
hasScopedStyles
|
|
2984
|
+
} = context;
|
|
2985
|
+
let newToken;
|
|
2986
|
+
let newHasTokenInClass;
|
|
2987
|
+
let newHasTokenInAttribute; // Reset the styling token applied to the host element.
|
|
2988
|
+
|
|
2989
|
+
const {
|
|
2990
|
+
stylesheetToken: oldToken,
|
|
2991
|
+
hasTokenInClass: oldHasTokenInClass,
|
|
2992
|
+
hasTokenInAttribute: oldHasTokenInAttribute
|
|
2993
|
+
} = context;
|
|
2994
|
+
|
|
2995
|
+
if (!shared.isUndefined(oldToken)) {
|
|
2996
|
+
if (oldHasTokenInClass) {
|
|
2997
|
+
getClassList(elm).remove(makeHostToken(oldToken));
|
|
2998
|
+
}
|
|
2999
|
+
|
|
3000
|
+
if (oldHasTokenInAttribute) {
|
|
3001
|
+
removeAttribute(elm, makeHostToken(oldToken));
|
|
3002
|
+
}
|
|
3003
|
+
} // Apply the new template styling token to the host element, if the new template has any
|
|
3004
|
+
// associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
|
|
3005
|
+
|
|
3006
|
+
|
|
3007
|
+
if (!shared.isUndefined(newStylesheets) && newStylesheets.length !== 0) {
|
|
3008
|
+
newToken = newStylesheetToken;
|
|
3009
|
+
} // Set the new styling token on the host element
|
|
3010
|
+
|
|
3011
|
+
|
|
3012
|
+
if (!shared.isUndefined(newToken)) {
|
|
3013
|
+
if (hasScopedStyles) {
|
|
3014
|
+
getClassList(elm).add(makeHostToken(newToken));
|
|
3015
|
+
newHasTokenInClass = true;
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
if (isSyntheticShadow) {
|
|
3019
|
+
setAttribute(elm, makeHostToken(newToken), '');
|
|
3020
|
+
newHasTokenInAttribute = true;
|
|
3021
|
+
}
|
|
3022
|
+
} // Update the styling tokens present on the context object.
|
|
3023
|
+
|
|
3024
|
+
|
|
3025
|
+
context.stylesheetToken = newToken;
|
|
3026
|
+
context.hasTokenInClass = newHasTokenInClass;
|
|
3027
|
+
context.hasTokenInAttribute = newHasTokenInAttribute;
|
|
3055
3028
|
}
|
|
3029
|
+
|
|
3056
3030
|
function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3031
|
+
const content = [];
|
|
3032
|
+
let root;
|
|
3033
|
+
|
|
3034
|
+
for (let i = 0; i < stylesheets.length; i++) {
|
|
3035
|
+
let stylesheet = stylesheets[i];
|
|
3036
|
+
|
|
3037
|
+
if (shared.isArray(stylesheet)) {
|
|
3038
|
+
shared.ArrayPush.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
|
|
3039
|
+
} else {
|
|
3040
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3041
|
+
// Check for compiler version mismatch in dev mode only
|
|
3042
|
+
checkVersionMismatch(stylesheet, 'stylesheet'); // in dev-mode, we support hot swapping of stylesheet, which means that
|
|
3043
|
+
// the component instance might be attempting to use an old version of
|
|
3044
|
+
// the stylesheet, while internally, we have a replacement for it.
|
|
3045
|
+
|
|
3046
|
+
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
3047
|
+
}
|
|
3048
|
+
|
|
3049
|
+
const isScopedCss = stylesheet[shared.KEY__SCOPED_CSS];
|
|
3050
|
+
|
|
3051
|
+
if (features.lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS) {
|
|
3052
|
+
if (!isScopedCss && vm.renderMode === 0
|
|
3053
|
+
/* RenderMode.Light */
|
|
3054
|
+
) {
|
|
3055
|
+
logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
|
|
3056
|
+
continue;
|
|
3063
3057
|
}
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
root = getNearestShadowComponent(vm);
|
|
3096
|
-
}
|
|
3097
|
-
useNativeDirPseudoclass = shared.isNull(root) || root.shadowMode === 0 /* ShadowMode.Native */;
|
|
3098
|
-
}
|
|
3099
|
-
shared.ArrayPush.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
3058
|
+
} // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
3059
|
+
|
|
3060
|
+
|
|
3061
|
+
const scopeToken = isScopedCss || vm.shadowMode === 1
|
|
3062
|
+
/* ShadowMode.Synthetic */
|
|
3063
|
+
&& vm.renderMode === 1
|
|
3064
|
+
/* RenderMode.Shadow */
|
|
3065
|
+
? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
3066
|
+
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
3067
|
+
|
|
3068
|
+
const useActualHostSelector = vm.renderMode === 0
|
|
3069
|
+
/* RenderMode.Light */
|
|
3070
|
+
? !isScopedCss : vm.shadowMode === 0
|
|
3071
|
+
/* ShadowMode.Native */
|
|
3072
|
+
; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
|
|
3073
|
+
// we use an attribute selector on the host to simulate :dir().
|
|
3074
|
+
|
|
3075
|
+
let useNativeDirPseudoclass;
|
|
3076
|
+
|
|
3077
|
+
if (vm.renderMode === 1
|
|
3078
|
+
/* RenderMode.Shadow */
|
|
3079
|
+
) {
|
|
3080
|
+
useNativeDirPseudoclass = vm.shadowMode === 0
|
|
3081
|
+
/* ShadowMode.Native */
|
|
3082
|
+
;
|
|
3083
|
+
} else {
|
|
3084
|
+
// Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
|
|
3085
|
+
// At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
|
|
3086
|
+
if (shared.isUndefined(root)) {
|
|
3087
|
+
// Only calculate the root once as necessary
|
|
3088
|
+
root = getNearestShadowComponent(vm);
|
|
3100
3089
|
}
|
|
3090
|
+
|
|
3091
|
+
useNativeDirPseudoclass = shared.isNull(root) || root.shadowMode === 0
|
|
3092
|
+
/* ShadowMode.Native */
|
|
3093
|
+
;
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3096
|
+
shared.ArrayPush.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
3101
3097
|
}
|
|
3102
|
-
|
|
3098
|
+
}
|
|
3099
|
+
|
|
3100
|
+
return content;
|
|
3103
3101
|
}
|
|
3102
|
+
|
|
3104
3103
|
function getStylesheetsContent(vm, template) {
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3104
|
+
const {
|
|
3105
|
+
stylesheets,
|
|
3106
|
+
stylesheetToken
|
|
3107
|
+
} = template;
|
|
3108
|
+
let content = [];
|
|
3109
|
+
|
|
3110
|
+
if (!shared.isUndefined(stylesheets) && stylesheets.length !== 0) {
|
|
3111
|
+
content = evaluateStylesheetsContent(stylesheets, stylesheetToken, vm);
|
|
3112
|
+
}
|
|
3113
|
+
|
|
3114
|
+
return content;
|
|
3115
|
+
} // It might be worth caching this to avoid doing the lookup repeatedly, but
|
|
3113
3116
|
// perf testing has not shown it to be a huge improvement yet:
|
|
3114
3117
|
// https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
|
|
3118
|
+
|
|
3115
3119
|
function getNearestShadowComponent(vm) {
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3120
|
+
let owner = vm;
|
|
3121
|
+
|
|
3122
|
+
while (!shared.isNull(owner)) {
|
|
3123
|
+
if (owner.renderMode === 1
|
|
3124
|
+
/* RenderMode.Shadow */
|
|
3125
|
+
) {
|
|
3126
|
+
return owner;
|
|
3122
3127
|
}
|
|
3123
|
-
|
|
3128
|
+
|
|
3129
|
+
owner = owner.owner;
|
|
3130
|
+
}
|
|
3131
|
+
|
|
3132
|
+
return owner;
|
|
3124
3133
|
}
|
|
3125
3134
|
/**
|
|
3126
3135
|
* If the component that is currently being rendered uses scoped styles,
|
|
3127
3136
|
* this returns the unique token for that scoped stylesheet. Otherwise
|
|
3128
3137
|
* it returns null.
|
|
3129
3138
|
*/
|
|
3139
|
+
|
|
3140
|
+
|
|
3130
3141
|
function getScopeTokenClass(owner) {
|
|
3131
|
-
|
|
3132
|
-
|
|
3142
|
+
const {
|
|
3143
|
+
cmpTemplate,
|
|
3144
|
+
context
|
|
3145
|
+
} = owner;
|
|
3146
|
+
return context.hasScopedStyles && (cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken) || null;
|
|
3133
3147
|
}
|
|
3134
3148
|
/**
|
|
3135
3149
|
* This function returns the host style token for a custom element if it
|
|
3136
3150
|
* exists. Otherwise it returns null.
|
|
3151
|
+
*
|
|
3152
|
+
* A host style token is applied to the component if scoped styles are used.
|
|
3137
3153
|
*/
|
|
3154
|
+
|
|
3138
3155
|
function getStylesheetTokenHost(vnode) {
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
}
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
// synthetic, we know we won't find a native component if we go any further.
|
|
3147
|
-
return null;
|
|
3148
|
-
}
|
|
3149
|
-
return owner;
|
|
3150
|
-
}
|
|
3151
|
-
function createStylesheet(vm, stylesheets) {
|
|
3152
|
-
const { renderMode, shadowMode, renderer: { insertStylesheet }, } = vm;
|
|
3153
|
-
if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
3154
|
-
for (let i = 0; i < stylesheets.length; i++) {
|
|
3155
|
-
insertStylesheet(stylesheets[i]);
|
|
3156
|
-
}
|
|
3157
|
-
}
|
|
3158
|
-
else if (!process.env.IS_BROWSER || vm.hydrated) {
|
|
3159
|
-
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
3160
|
-
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
3161
|
-
// the first time the VM renders.
|
|
3162
|
-
// native shadow or light DOM, SSR
|
|
3163
|
-
return shared.ArrayMap.call(stylesheets, createInlineStyleVNode);
|
|
3164
|
-
}
|
|
3165
|
-
else {
|
|
3166
|
-
// native shadow or light DOM, DOM renderer
|
|
3167
|
-
const root = getNearestNativeShadowComponent(vm);
|
|
3168
|
-
// null root means a global style
|
|
3169
|
-
const target = shared.isNull(root) ? undefined : root.shadowRoot;
|
|
3170
|
-
for (let i = 0; i < stylesheets.length; i++) {
|
|
3171
|
-
insertStylesheet(stylesheets[i], target);
|
|
3172
|
-
}
|
|
3173
|
-
}
|
|
3174
|
-
return null;
|
|
3156
|
+
const {
|
|
3157
|
+
template
|
|
3158
|
+
} = getComponentInternalDef(vnode.ctor);
|
|
3159
|
+
const {
|
|
3160
|
+
stylesheetToken
|
|
3161
|
+
} = template;
|
|
3162
|
+
return !shared.isUndefined(stylesheetToken) && computeHasScopedStyles(template) ? makeHostToken(stylesheetToken) : null;
|
|
3175
3163
|
}
|
|
3176
3164
|
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
* All rights reserved.
|
|
3180
|
-
* SPDX-License-Identifier: MIT
|
|
3181
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3182
|
-
*/
|
|
3183
|
-
|
|
3184
|
-
function checkHasVM(elm) {
|
|
3185
|
-
const hasVM = !shared.isUndefined(getAssociatedVMIfPresent(elm));
|
|
3165
|
+
function getNearestNativeShadowComponent(vm) {
|
|
3166
|
+
const owner = getNearestShadowComponent(vm);
|
|
3186
3167
|
|
|
3187
|
-
if (
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3168
|
+
if (!shared.isNull(owner) && owner.shadowMode === 1
|
|
3169
|
+
/* ShadowMode.Synthetic */
|
|
3170
|
+
) {
|
|
3171
|
+
// Synthetic-within-native is impossible. So if the nearest shadow component is
|
|
3172
|
+
// synthetic, we know we won't find a native component if we go any further.
|
|
3173
|
+
return null;
|
|
3191
3174
|
}
|
|
3192
3175
|
|
|
3193
|
-
return
|
|
3176
|
+
return owner;
|
|
3194
3177
|
}
|
|
3195
3178
|
|
|
3196
|
-
function
|
|
3179
|
+
function createStylesheet(vm, stylesheets) {
|
|
3197
3180
|
const {
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
// produce only tags with lowercase letters
|
|
3203
|
-
// But, for backwards compatibility, we will lower case the tagName
|
|
3204
|
-
|
|
3205
|
-
tagName = tagName.toLowerCase();
|
|
3206
|
-
let CE = getCustomElement(tagName);
|
|
3207
|
-
|
|
3208
|
-
if (!shared.isUndefined(CE)) {
|
|
3209
|
-
return CE;
|
|
3210
|
-
}
|
|
3211
|
-
/**
|
|
3212
|
-
* LWC Upgradable Element reference to an element that was created
|
|
3213
|
-
* via the scoped registry mechanism, and that is ready to be upgraded.
|
|
3214
|
-
*/
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
CE = class LWCUpgradableElement extends RendererHTMLElement {
|
|
3218
|
-
constructor(upgradeCallback) {
|
|
3219
|
-
super();
|
|
3220
|
-
|
|
3221
|
-
if (shared.isFunction(upgradeCallback)) {
|
|
3222
|
-
upgradeCallback(this); // nothing to do with the result for now
|
|
3223
|
-
}
|
|
3181
|
+
renderMode,
|
|
3182
|
+
shadowMode,
|
|
3183
|
+
renderer: {
|
|
3184
|
+
insertStylesheet
|
|
3224
3185
|
}
|
|
3186
|
+
} = vm;
|
|
3225
3187
|
|
|
3226
|
-
|
|
3188
|
+
if (renderMode === 1
|
|
3189
|
+
/* RenderMode.Shadow */
|
|
3190
|
+
&& shadowMode === 1
|
|
3191
|
+
/* ShadowMode.Synthetic */
|
|
3192
|
+
) {
|
|
3193
|
+
for (let i = 0; i < stylesheets.length; i++) {
|
|
3194
|
+
insertStylesheet(stylesheets[i]);
|
|
3195
|
+
}
|
|
3196
|
+
} else if (!process.env.IS_BROWSER || vm.hydrated) {
|
|
3197
|
+
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
3198
|
+
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
3199
|
+
// the first time the VM renders.
|
|
3200
|
+
// native shadow or light DOM, SSR
|
|
3201
|
+
return shared.ArrayMap.call(stylesheets, createInlineStyleVNode);
|
|
3202
|
+
} else {
|
|
3203
|
+
// native shadow or light DOM, DOM renderer
|
|
3204
|
+
const root = getNearestNativeShadowComponent(vm); // null root means a global style
|
|
3227
3205
|
|
|
3228
|
-
|
|
3229
|
-
CE.prototype.connectedCallback = function () {
|
|
3230
|
-
if (checkHasVM(this)) {
|
|
3231
|
-
connectRootElement(this);
|
|
3232
|
-
}
|
|
3233
|
-
};
|
|
3206
|
+
const target = shared.isNull(root) ? undefined : root.shadowRoot;
|
|
3234
3207
|
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
}
|
|
3239
|
-
};
|
|
3208
|
+
for (let i = 0; i < stylesheets.length; i++) {
|
|
3209
|
+
insertStylesheet(stylesheets[i], target);
|
|
3210
|
+
}
|
|
3240
3211
|
}
|
|
3241
3212
|
|
|
3242
|
-
|
|
3243
|
-
return CE;
|
|
3213
|
+
return null;
|
|
3244
3214
|
}
|
|
3245
3215
|
|
|
3246
3216
|
/*
|
|
@@ -3756,7 +3726,9 @@ function mountCustomElement(vnode, parent, anchor, renderer) {
|
|
|
3756
3726
|
sel,
|
|
3757
3727
|
owner
|
|
3758
3728
|
} = vnode;
|
|
3759
|
-
const
|
|
3729
|
+
const {
|
|
3730
|
+
createCustomElement
|
|
3731
|
+
} = renderer;
|
|
3760
3732
|
/**
|
|
3761
3733
|
* Note: if the upgradable constructor does not expect, or throw when we new it
|
|
3762
3734
|
* with a callback as the first argument, we could implement a more advanced
|
|
@@ -3765,10 +3737,25 @@ function mountCustomElement(vnode, parent, anchor, renderer) {
|
|
|
3765
3737
|
*/
|
|
3766
3738
|
|
|
3767
3739
|
let vm;
|
|
3768
|
-
|
|
3740
|
+
|
|
3741
|
+
const upgradeCallback = elm => {
|
|
3769
3742
|
// the custom element from the registry is expecting an upgrade callback
|
|
3770
3743
|
vm = createViewModelHook(elm, vnode, renderer);
|
|
3771
|
-
}
|
|
3744
|
+
};
|
|
3745
|
+
|
|
3746
|
+
const connectedCallback = elm => {
|
|
3747
|
+
if (features.lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
3748
|
+
connectRootElement(elm);
|
|
3749
|
+
}
|
|
3750
|
+
};
|
|
3751
|
+
|
|
3752
|
+
const disconnectedCallback = elm => {
|
|
3753
|
+
if (features.lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
3754
|
+
disconnectRootElement(elm);
|
|
3755
|
+
}
|
|
3756
|
+
};
|
|
3757
|
+
|
|
3758
|
+
const elm = createCustomElement(sel, upgradeCallback, connectedCallback, disconnectedCallback);
|
|
3772
3759
|
vnode.elm = elm;
|
|
3773
3760
|
vnode.vm = vm;
|
|
3774
3761
|
linkNodeToShadow(elm, owner, renderer);
|
|
@@ -3776,8 +3763,6 @@ function mountCustomElement(vnode, parent, anchor, renderer) {
|
|
|
3776
3763
|
|
|
3777
3764
|
if (vm) {
|
|
3778
3765
|
allocateChildren(vnode, vm);
|
|
3779
|
-
} else if (vnode.ctor !== UpgradableConstructor) {
|
|
3780
|
-
throw new TypeError(`Incorrect Component Constructor`);
|
|
3781
3766
|
}
|
|
3782
3767
|
|
|
3783
3768
|
patchElementPropsAndAttrs$1(null, vnode, renderer);
|
|
@@ -6559,19 +6544,23 @@ function validateClassAttr(vnode, elm, renderer) {
|
|
|
6559
6544
|
//
|
|
6560
6545
|
// Consequently, hydration mismatches will occur if scoped CSS token classnames
|
|
6561
6546
|
// are rendered during SSR. This needs to be accounted for when validating.
|
|
6562
|
-
if (scopedToken) {
|
|
6547
|
+
if (!shared.isNull(scopedToken) || !shared.isNull(stylesheetTokenHost)) {
|
|
6563
6548
|
if (!shared.isUndefined(className)) {
|
|
6564
|
-
className
|
|
6565
|
-
|
|
6566
|
-
|
|
6549
|
+
// The order of the className should be scopedToken className stylesheetTokenHost
|
|
6550
|
+
const classTokens = [scopedToken, className, stylesheetTokenHost];
|
|
6551
|
+
const classNames = shared.ArrayFilter.call(classTokens, (token) => !shared.isNull(token));
|
|
6552
|
+
className = shared.ArrayJoin.call(classNames, ' ');
|
|
6567
6553
|
}
|
|
6568
6554
|
else if (!shared.isUndefined(classMap)) {
|
|
6569
|
-
classMap = Object.assign(Object.assign(Object.assign({}, classMap), { [scopedToken]: true }), (shared.isNull(stylesheetTokenHost) ? {
|
|
6555
|
+
classMap = Object.assign(Object.assign(Object.assign({}, classMap), (!shared.isNull(scopedToken) ? { [scopedToken]: true } : {})), (!shared.isNull(stylesheetTokenHost) ? { [stylesheetTokenHost]: true } : {}));
|
|
6570
6556
|
}
|
|
6571
6557
|
else {
|
|
6572
|
-
className
|
|
6573
|
-
|
|
6574
|
-
|
|
6558
|
+
// The order of the className should be scopedToken stylesheetTokenHost
|
|
6559
|
+
const classTokens = [scopedToken, stylesheetTokenHost];
|
|
6560
|
+
const classNames = shared.ArrayFilter.call(classTokens, (token) => !shared.isNull(token));
|
|
6561
|
+
if (classNames.length) {
|
|
6562
|
+
className = shared.ArrayJoin.call(classNames, ' ');
|
|
6563
|
+
}
|
|
6575
6564
|
}
|
|
6576
6565
|
}
|
|
6577
6566
|
let nodesAreCompatible = true;
|
|
@@ -6834,7 +6823,6 @@ exports.getAssociatedVMIfPresent = getAssociatedVMIfPresent;
|
|
|
6834
6823
|
exports.getComponentConstructor = getComponentConstructor;
|
|
6835
6824
|
exports.getComponentDef = getComponentDef;
|
|
6836
6825
|
exports.getComponentHtmlPrototype = getComponentHtmlPrototype;
|
|
6837
|
-
exports.getUpgradableConstructor = getUpgradableConstructor;
|
|
6838
6826
|
exports.hydrateRoot = hydrateRoot;
|
|
6839
6827
|
exports.isComponentConstructor = isComponentConstructor;
|
|
6840
6828
|
exports.parseFragment = parseFragment;
|
|
@@ -6852,4 +6840,4 @@ exports.swapTemplate = swapTemplate;
|
|
|
6852
6840
|
exports.track = track;
|
|
6853
6841
|
exports.unwrap = unwrap;
|
|
6854
6842
|
exports.wire = wire;
|
|
6855
|
-
/* version: 2.
|
|
6843
|
+
/* version: 2.26.0 */
|