lwc 2.13.3 → 2.14.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 (43) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +351 -129
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +351 -128
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -2
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +195 -122
  5. package/dist/engine-dom/iife/es5/engine-dom.js +7581 -5773
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +5966 -4601
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +351 -128
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -2
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +195 -122
  11. package/dist/engine-dom/umd/es5/engine-dom.js +7581 -5773
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +5966 -4601
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +188 -52
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +188 -53
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +29 -4
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +29 -4
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +10 -13
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +4 -4
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +4601 -3603
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +10 -1
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +4424 -3481
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +29 -4
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +10 -13
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +4 -4
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +4601 -3603
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +10 -1
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +4424 -3481
  30. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  31. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/iife/es2017/wire-service.min.js +1 -1
  33. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  34. package/dist/wire-service/iife/es5/wire-service.js +243 -258
  35. package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
  36. package/dist/wire-service/iife/es5/wire-service_debug.js +243 -258
  37. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  38. package/dist/wire-service/umd/es2017/wire-service.min.js +1 -1
  39. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  40. package/dist/wire-service/umd/es5/wire-service.js +243 -258
  41. package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
  42. package/dist/wire-service/umd/es5/wire-service_debug.js +243 -258
  43. package/package.json +7 -7
@@ -49,7 +49,7 @@
49
49
  */
50
50
  const { assign, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor: getOwnPropertyDescriptor$1, getOwnPropertyNames: getOwnPropertyNames$1, getPrototypeOf: getPrototypeOf$1, hasOwnProperty: hasOwnProperty$1, isFrozen, keys, seal, setPrototypeOf, } = Object;
51
51
  const { isArray: isArray$1 } = Array;
52
- const { filter: ArrayFilter, find: ArrayFind, indexOf: ArrayIndexOf, join: ArrayJoin, map: ArrayMap, push: ArrayPush$1, reduce: ArrayReduce, reverse: ArrayReverse, slice: ArraySlice, splice: ArraySplice, unshift: ArrayUnshift, forEach, } = Array.prototype;
52
+ const { copyWithin: ArrayCopyWithin, fill: ArrayFill, filter: ArrayFilter, find: ArrayFind, indexOf: ArrayIndexOf, join: ArrayJoin, map: ArrayMap, pop: ArrayPop, push: ArrayPush$1, reduce: ArrayReduce, reverse: ArrayReverse, shift: ArrayShift, slice: ArraySlice, sort: ArraySort, splice: ArraySplice, unshift: ArrayUnshift, forEach, } = Array.prototype;
53
53
  const { fromCharCode: StringFromCharCode } = String;
54
54
  const { charCodeAt: StringCharCodeAt, replace: StringReplace, slice: StringSlice, toLowerCase: StringToLowerCase, } = String.prototype;
55
55
  function isUndefined$1(obj) {
@@ -293,7 +293,7 @@
293
293
  const XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
294
294
  const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
295
295
  const XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
296
- /** version: 2.13.3 */
296
+ /** version: 2.14.1 */
297
297
 
298
298
  /*
299
299
  * Copyright (c) 2018, salesforce.com, inc.
@@ -383,6 +383,7 @@
383
383
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
384
384
  */
385
385
  const features = {
386
+ DUMMY_TEST_FLAG: null,
386
387
  ENABLE_ELEMENT_PATCH: null,
387
388
  ENABLE_FORCE_NATIVE_SHADOW_MODE_FOR_TEST: null,
388
389
  ENABLE_HMR: null,
@@ -436,9 +437,6 @@
436
437
  */
437
438
  function setFeatureFlagForTest(name, value) {
438
439
  }
439
- /** version: 2.13.3 */
440
-
441
- /* proxy-compat-disable */
442
440
 
443
441
  /*
444
442
  * Copyright (c) 2018, salesforce.com, inc.
@@ -518,10 +516,6 @@
518
516
  function setHTMLElement(HTMLElementImpl) {
519
517
  HTMLElementExported$1 = HTMLElementImpl;
520
518
  }
521
- let isHydrating$1;
522
- function setIsHydrating$1(isHydratingImpl) {
523
- isHydrating$1 = isHydratingImpl;
524
- }
525
519
  let insert$1;
526
520
  function setInsert(insertImpl) {
527
521
  insert$1 = insertImpl;
@@ -642,10 +636,6 @@
642
636
  function setIsConnected(isConnectedImpl) {
643
637
  isConnected$1 = isConnectedImpl;
644
638
  }
645
- let insertGlobalStylesheet$1;
646
- function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
647
- insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
648
- }
649
639
  let insertStylesheet$1;
650
640
  function setInsertStylesheet(insertStylesheetImpl) {
651
641
  insertStylesheet$1 = insertStylesheetImpl;
@@ -2079,6 +2069,8 @@
2079
2069
  // on top of stylesheetToken for anyone who is accessing the old internal API.
2080
2070
  // Details: https://salesforce.quip.com/v1rmAFu2cKAr
2081
2071
  defineProperty(tpl, 'stylesheetTokens', {
2072
+ enumerable: true,
2073
+ configurable: true,
2082
2074
  get() {
2083
2075
  const { stylesheetToken } = this;
2084
2076
  if (isUndefined$1(stylesheetToken)) {
@@ -2871,16 +2863,20 @@
2871
2863
  }
2872
2864
  }
2873
2865
  function unmount(vnode, parent, doRemove = false) {
2874
- const { type, elm } = vnode;
2866
+ const { type, elm, sel } = vnode;
2875
2867
  // When unmounting a VNode subtree not all the elements have to removed from the DOM. The
2876
2868
  // subtree root, is the only element worth unmounting from the subtree.
2877
2869
  if (doRemove) {
2878
2870
  removeNode(elm, parent);
2879
2871
  }
2880
2872
  switch (type) {
2881
- case 2 /* Element */:
2882
- unmountVNodes(vnode.children, elm);
2873
+ case 2 /* Element */: {
2874
+ // Slot content is removed to trigger slotchange event when removing slot.
2875
+ // Only required for synthetic shadow.
2876
+ const removeChildren = sel === 'slot' && vnode.owner.shadowMode === 1 /* Synthetic */;
2877
+ unmountVNodes(vnode.children, elm, removeChildren);
2883
2878
  break;
2879
+ }
2884
2880
  case 3 /* CustomElement */: {
2885
2881
  const { vm } = vnode;
2886
2882
  // No need to unmount the children here, `removeVM` will take care of removing the
@@ -3647,10 +3643,10 @@
3647
3643
  const { renderMode, shadowMode } = vm;
3648
3644
  if (renderMode === 1 /* Shadow */ && shadowMode === 1 /* Synthetic */) {
3649
3645
  for (let i = 0; i < stylesheets.length; i++) {
3650
- insertGlobalStylesheet$1(stylesheets[i]);
3646
+ insertStylesheet$1(stylesheets[i]);
3651
3647
  }
3652
3648
  }
3653
- else if (ssr$1 || isHydrating$1()) {
3649
+ else if (ssr$1 || vm.hydrated) {
3654
3650
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
3655
3651
  // This works in the client, because the stylesheets are created, and cached in the VM
3656
3652
  // the first time the VM renders.
@@ -3661,15 +3657,10 @@
3661
3657
  else {
3662
3658
  // native shadow or light DOM, DOM renderer
3663
3659
  const root = getNearestNativeShadowComponent(vm);
3664
- const isGlobal = isNull(root);
3660
+ // null root means a global style
3661
+ const target = isNull(root) ? undefined : root.shadowRoot;
3665
3662
  for (let i = 0; i < stylesheets.length; i++) {
3666
- if (isGlobal) {
3667
- insertGlobalStylesheet$1(stylesheets[i]);
3668
- }
3669
- else {
3670
- // local level
3671
- insertStylesheet$1(stylesheets[i], root.shadowRoot);
3672
- }
3663
+ insertStylesheet$1(stylesheets[i], target);
3673
3664
  }
3674
3665
  }
3675
3666
  return null;
@@ -4068,13 +4059,25 @@
4068
4059
 
4069
4060
  resetComponentStateWhenRemoved(vm);
4070
4061
  }
4071
- function createVM(elm, ctor, options) {
4072
- var _a;
4073
4062
 
4063
+ function getNearestShadowAncestor(vm) {
4064
+ let ancestor = vm.owner;
4065
+
4066
+ while (!isNull(ancestor) && ancestor.renderMode === 0
4067
+ /* Light */
4068
+ ) {
4069
+ ancestor = ancestor.owner;
4070
+ }
4071
+
4072
+ return ancestor;
4073
+ }
4074
+
4075
+ function createVM(elm, ctor, options) {
4074
4076
  const {
4075
4077
  mode,
4076
4078
  owner,
4077
- tagName
4079
+ tagName,
4080
+ hydrated
4078
4081
  } = options;
4079
4082
  const def = getComponentInternalDef(ctor);
4080
4083
  const vm = {
@@ -4097,9 +4100,8 @@
4097
4100
  cmpSlots: create(null),
4098
4101
  oar: create(null),
4099
4102
  cmpTemplate: null,
4103
+ hydrated: Boolean(hydrated),
4100
4104
  renderMode: def.renderMode,
4101
- shadowMode: computeShadowMode(def, owner),
4102
- nearestShadowMode: (owner === null || owner === void 0 ? void 0 : owner.shadowRoot) ? owner.shadowMode : (_a = owner === null || owner === void 0 ? void 0 : owner.nearestShadowMode) !== null && _a !== void 0 ? _a : null,
4103
4105
  context: {
4104
4106
  stylesheetToken: undefined,
4105
4107
  hasTokenInClass: undefined,
@@ -4112,6 +4114,7 @@
4112
4114
  },
4113
4115
  // Properties set right after VM creation.
4114
4116
  tro: null,
4117
+ shadowMode: null,
4115
4118
  // Properties set by the LightningElement constructor.
4116
4119
  component: null,
4117
4120
  shadowRoot: null,
@@ -4120,6 +4123,7 @@
4120
4123
  setHook,
4121
4124
  getHook
4122
4125
  };
4126
+ vm.shadowMode = computeShadowMode(vm);
4123
4127
  vm.tro = getTemplateReactiveObserver(vm);
4124
4128
 
4125
4129
 
@@ -4132,9 +4136,10 @@
4132
4136
  return vm;
4133
4137
  }
4134
4138
 
4135
- function computeShadowMode(def, owner) {
4136
- var _a;
4137
-
4139
+ function computeShadowMode(vm) {
4140
+ const {
4141
+ def
4142
+ } = vm;
4138
4143
  let shadowMode;
4139
4144
 
4140
4145
  if (isSyntheticShadowDefined$1) {
@@ -4157,13 +4162,23 @@
4157
4162
  /* Native */
4158
4163
  ;
4159
4164
  } else {
4160
- // Transitive support for native Shadow DOM. A component in native mode
4161
- // transitively opts all of its descendants into native.
4162
- // Synthetic if neither this component nor any of its ancestors are configured
4163
- // to be native.
4164
- shadowMode = (_a = owner === null || owner === void 0 ? void 0 : owner.nearestShadowMode) !== null && _a !== void 0 ? _a : 1
4165
- /* Synthetic */
4166
- ;
4165
+ const shadowAncestor = getNearestShadowAncestor(vm);
4166
+
4167
+ if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
4168
+ /* Native */
4169
+ ) {
4170
+ // Transitive support for native Shadow DOM. A component in native mode
4171
+ // transitively opts all of its descendants into native.
4172
+ shadowMode = 0
4173
+ /* Native */
4174
+ ;
4175
+ } else {
4176
+ // Synthetic if neither this component nor any of its ancestors are configured
4177
+ // to be native.
4178
+ shadowMode = 1
4179
+ /* Synthetic */
4180
+ ;
4181
+ }
4167
4182
  }
4168
4183
  } else {
4169
4184
  shadowMode = 1
@@ -4990,6 +5005,7 @@
4990
5005
  mode,
4991
5006
  owner,
4992
5007
  tagName: sel,
5008
+ hydrated: true,
4993
5009
  });
4994
5010
  vnode.elm = elm;
4995
5011
  vnode.vm = vm;
@@ -5139,6 +5155,10 @@
5139
5155
  hooksAreSet = true;
5140
5156
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
5141
5157
  }
5158
+ // TODO [#2782]: eventually freezeTemplate() will _actually_ freeze the tmpl object. Today it
5159
+ // just warns on mutation.
5160
+ function freezeTemplate(tmpl) {
5161
+ }
5142
5162
 
5143
5163
  /*
5144
5164
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5162,7 +5182,7 @@
5162
5182
  }
5163
5183
  return ctor;
5164
5184
  }
5165
- /* version: 2.13.3 */
5185
+ /* version: 2.14.1 */
5166
5186
 
5167
5187
  /*
5168
5188
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5170,17 +5190,138 @@
5170
5190
  * SPDX-License-Identifier: MIT
5171
5191
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
5172
5192
  */
5173
- const globalStylesheets = create(null);
5174
- const globalStylesheetsParentElement = document.head || document.body || document;
5175
- // This check for constructable stylesheets is similar to Fast's:
5193
+ //
5194
+ // Feature detection
5195
+ //
5196
+ // This check for constructable style sheets is similar to Fast's:
5176
5197
  // https://github.com/microsoft/fast/blob/d49d1ec/packages/web-components/fast-element/src/dom.ts#L51-L53
5177
5198
  // See also: https://github.com/whatwg/webidl/issues/1027#issuecomment-934510070
5178
- const supportsConstructableStyleSheets = isFunction$1(CSSStyleSheet.prototype.replaceSync) && isArray$1(document.adoptedStyleSheets);
5179
- const supportsMutableAdoptedStyleSheets = supportsConstructableStyleSheets &&
5199
+ const supportsConstructableStylesheets = isFunction$1(CSSStyleSheet.prototype.replaceSync) && isArray$1(document.adoptedStyleSheets);
5200
+ // The original adoptedStylesheet proposal used a frozen array. A follow-up proposal made the array mutable.
5201
+ // Chromium 99+ and Firefox 101+ support mutable arrays. We check if the array is mutable, to ensure backward compat.
5202
+ // (If the length is writable, then the array is mutable.) See: https://chromestatus.com/feature/5638996492288000
5203
+ // TODO [#2828]: Re-evaluate this in the future once we drop support for older browser versions.
5204
+ const supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets &&
5180
5205
  getOwnPropertyDescriptor$1(document.adoptedStyleSheets, 'length').writable;
5181
- const styleElements = create(null);
5182
- const styleSheets = create(null);
5183
- const shadowRootsToStyleSheets = new WeakMap();
5206
+ // Detect IE, via https://stackoverflow.com/a/9851769
5207
+ const isIE11 = !isUndefined$1(document.documentMode);
5208
+ const stylesheetCache = new Map();
5209
+ function isDocument(target) {
5210
+ return !isUndefined$1(target.head);
5211
+ }
5212
+ function createFreshStyleElement(content) {
5213
+ const elm = document.createElement('style');
5214
+ elm.type = 'text/css';
5215
+ elm.textContent = content;
5216
+ return elm;
5217
+ }
5218
+ function createStyleElement(content, cacheData) {
5219
+ const { stylesheet, used } = cacheData;
5220
+ // If the <style> was already used, then we should clone it. We cannot insert
5221
+ // the same <style> in two places in the DOM.
5222
+ if (used) {
5223
+ // For a mysterious reason, IE11 doesn't like the way we clone <style> nodes
5224
+ // and will render the incorrect styles if we do things that way. It's just
5225
+ // a perf optimization, so we can skip it for IE11.
5226
+ if (isIE11) {
5227
+ return createFreshStyleElement(content);
5228
+ }
5229
+ // This `<style>` may be repeated multiple times in the DOM, so cache it. It's a bit
5230
+ // faster to call `cloneNode()` on an existing node than to recreate it every time.
5231
+ return stylesheet.cloneNode(true);
5232
+ }
5233
+ // We don't clone every time, because that would be a perf tax on the first time
5234
+ cacheData.used = true;
5235
+ return stylesheet;
5236
+ }
5237
+ function createConstructableStylesheet(content) {
5238
+ const stylesheet = new CSSStyleSheet();
5239
+ stylesheet.replaceSync(content);
5240
+ return stylesheet;
5241
+ }
5242
+ function insertConstructableStylesheet(content, target, cacheData) {
5243
+ const { adoptedStyleSheets } = target;
5244
+ const { stylesheet } = cacheData;
5245
+ // Mutable adopted stylesheets are only supported in certain browsers.
5246
+ // The reason we use it is for perf: https://github.com/salesforce/lwc/pull/2683
5247
+ if (supportsMutableAdoptedStyleSheets) {
5248
+ adoptedStyleSheets.push(stylesheet);
5249
+ }
5250
+ else {
5251
+ target.adoptedStyleSheets = [...adoptedStyleSheets, stylesheet];
5252
+ }
5253
+ }
5254
+ function insertStyleElement(content, target, cacheData) {
5255
+ const elm = createStyleElement(content, cacheData);
5256
+ const targetAnchorPoint = isDocument(target) ? target.head : target;
5257
+ targetAnchorPoint.appendChild(elm);
5258
+ }
5259
+ function doInsertStylesheet(content, target, cacheData) {
5260
+ // Constructable stylesheets are only supported in certain browsers:
5261
+ // https://caniuse.com/mdn-api_document_adoptedstylesheets
5262
+ // The reason we use it is for perf: https://github.com/salesforce/lwc/pull/2460
5263
+ if (supportsConstructableStylesheets) {
5264
+ insertConstructableStylesheet(content, target, cacheData);
5265
+ }
5266
+ else {
5267
+ // Fall back to <style> element
5268
+ insertStyleElement(content, target, cacheData);
5269
+ }
5270
+ }
5271
+ function getCacheData(content) {
5272
+ let cacheData = stylesheetCache.get(content);
5273
+ if (isUndefined$1(cacheData)) {
5274
+ cacheData = {
5275
+ stylesheet: supportsConstructableStylesheets
5276
+ ? createConstructableStylesheet(content)
5277
+ : createFreshStyleElement(content),
5278
+ roots: undefined,
5279
+ global: false,
5280
+ used: false,
5281
+ };
5282
+ stylesheetCache.set(content, cacheData);
5283
+ }
5284
+ return cacheData;
5285
+ }
5286
+ function insertGlobalStylesheet(content) {
5287
+ const cacheData = getCacheData(content);
5288
+ if (cacheData.global) {
5289
+ // already inserted
5290
+ return;
5291
+ }
5292
+ cacheData.global = true; // mark inserted
5293
+ doInsertStylesheet(content, document, cacheData);
5294
+ }
5295
+ function insertLocalStylesheet(content, target) {
5296
+ const cacheData = getCacheData(content);
5297
+ let { roots } = cacheData;
5298
+ if (isUndefined$1(roots)) {
5299
+ roots = cacheData.roots = new WeakSet(); // lazily initialize (not needed for global styles)
5300
+ }
5301
+ else if (roots.has(target)) {
5302
+ // already inserted
5303
+ return;
5304
+ }
5305
+ roots.add(target); // mark inserted
5306
+ doInsertStylesheet(content, target, cacheData);
5307
+ }
5308
+ function insertStylesheet(content, target) {
5309
+ if (isUndefined$1(target)) {
5310
+ // global
5311
+ insertGlobalStylesheet(content);
5312
+ }
5313
+ else {
5314
+ // local
5315
+ insertLocalStylesheet(content, target);
5316
+ }
5317
+ }
5318
+
5319
+ /*
5320
+ * Copyright (c) 2018, salesforce.com, inc.
5321
+ * All rights reserved.
5322
+ * SPDX-License-Identifier: MIT
5323
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
5324
+ */
5184
5325
  let getCustomElement;
5185
5326
  let defineCustomElement;
5186
5327
  let HTMLElementConstructor;
@@ -5207,52 +5348,6 @@
5207
5348
  return false;
5208
5349
  }
5209
5350
  }
5210
- function insertConstructableStyleSheet(content, target) {
5211
- // It's important for CSSStyleSheets to be unique based on their content, so that
5212
- // `shadowRoot.adoptedStyleSheets.includes(sheet)` works.
5213
- let styleSheet = styleSheets[content];
5214
- if (isUndefined$1(styleSheet)) {
5215
- styleSheet = new CSSStyleSheet();
5216
- styleSheet.replaceSync(content);
5217
- styleSheets[content] = styleSheet;
5218
- }
5219
- const { adoptedStyleSheets } = target;
5220
- if (!adoptedStyleSheets.includes(styleSheet)) {
5221
- if (supportsMutableAdoptedStyleSheets) {
5222
- // This is only supported in later versions of Chromium:
5223
- // https://chromestatus.com/feature/5638996492288000
5224
- adoptedStyleSheets.push(styleSheet);
5225
- }
5226
- else {
5227
- target.adoptedStyleSheets = [...adoptedStyleSheets, styleSheet];
5228
- }
5229
- }
5230
- }
5231
- function insertStyleElement(content, target) {
5232
- // Avoid inserting duplicate `<style>`s
5233
- let sheets = shadowRootsToStyleSheets.get(target);
5234
- if (isUndefined$1(sheets)) {
5235
- sheets = create(null);
5236
- shadowRootsToStyleSheets.set(target, sheets);
5237
- }
5238
- if (sheets[content]) {
5239
- return;
5240
- }
5241
- sheets[content] = true;
5242
- // This `<style>` may be repeated multiple times in the DOM, so cache it. It's a bit
5243
- // faster to call `cloneNode()` on an existing node than to recreate it every time.
5244
- let elm = styleElements[content];
5245
- if (isUndefined$1(elm)) {
5246
- elm = document.createElement('style');
5247
- elm.type = 'text/css';
5248
- elm.textContent = content;
5249
- styleElements[content] = elm;
5250
- }
5251
- else {
5252
- elm = elm.cloneNode(true);
5253
- }
5254
- target.appendChild(elm);
5255
- }
5256
5351
  if (isCustomElementRegistryAvailable()) {
5257
5352
  getCustomElement = customElements.get.bind(customElements);
5258
5353
  defineCustomElement = customElements.define.bind(customElements);
@@ -5291,9 +5386,6 @@
5291
5386
  hydrating = value;
5292
5387
  }
5293
5388
  const ssr = false;
5294
- function isHydrating() {
5295
- return hydrating;
5296
- }
5297
5389
  const isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
5298
5390
  const isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
5299
5391
  function createElement$1(tagName, namespace) {
@@ -5402,25 +5494,6 @@
5402
5494
  function isConnected(node) {
5403
5495
  return node.isConnected;
5404
5496
  }
5405
- function insertGlobalStylesheet(content) {
5406
- if (!isUndefined$1(globalStylesheets[content])) {
5407
- return;
5408
- }
5409
- globalStylesheets[content] = true;
5410
- const elm = document.createElement('style');
5411
- elm.type = 'text/css';
5412
- elm.textContent = content;
5413
- globalStylesheetsParentElement.appendChild(elm);
5414
- }
5415
- function insertStylesheet(content, target) {
5416
- if (supportsConstructableStyleSheets) {
5417
- insertConstructableStyleSheet(content, target);
5418
- }
5419
- else {
5420
- // Fall back to <style> element
5421
- insertStyleElement(content, target);
5422
- }
5423
- }
5424
5497
  const HTMLElementExported = HTMLElementConstructor;
5425
5498
  setAttachShadow(attachShadow);
5426
5499
  setCreateComment(createComment);
@@ -5443,10 +5516,7 @@
5443
5516
  setGetProperty(getProperty);
5444
5517
  setHTMLElement(HTMLElementExported);
5445
5518
  setInsert(insert);
5446
- setInsertGlobalStylesheet(insertGlobalStylesheet);
5447
- setInsertStylesheet(insertStylesheet);
5448
5519
  setIsConnected(isConnected);
5449
- setIsHydrating$1(isHydrating);
5450
5520
  setIsNativeShadowDefined(isNativeShadowDefined);
5451
5521
  setIsSyntheticShadowDefined(isSyntheticShadowDefined);
5452
5522
  setNextSibling(nextSibling);
@@ -5461,6 +5531,7 @@
5461
5531
  setSetText(setText);
5462
5532
  setSsr(ssr);
5463
5533
  setAddEventListener(addEventListener);
5534
+ setInsertStylesheet(insertStylesheet);
5464
5535
 
5465
5536
  /*
5466
5537
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5486,6 +5557,7 @@
5486
5557
  mode: 'open',
5487
5558
  owner: null,
5488
5559
  tagName: element.tagName.toLowerCase(),
5560
+ hydrated: true,
5489
5561
  });
5490
5562
  for (const [key, value] of Object.entries(props)) {
5491
5563
  element[key] = value;
@@ -5748,7 +5820,7 @@
5748
5820
  });
5749
5821
  freeze(LightningElement);
5750
5822
  seal(LightningElement.prototype);
5751
- /* version: 2.13.3 */
5823
+ /* version: 2.14.1 */
5752
5824
 
5753
5825
  exports.LightningElement = LightningElement;
5754
5826
  exports.__unstable__ProfilerControl = profilerControl;
@@ -5756,6 +5828,7 @@
5756
5828
  exports.buildCustomElementConstructor = deprecatedBuildCustomElementConstructor;
5757
5829
  exports.createContextProvider = createContextProvider;
5758
5830
  exports.createElement = createElement;
5831
+ exports.freezeTemplate = freezeTemplate;
5759
5832
  exports.getComponentConstructor = getComponentConstructor;
5760
5833
  exports.getComponentDef = getComponentDef;
5761
5834
  exports.hydrateComponent = hydrateComponent;