lwc 2.13.2 → 2.14.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.
Files changed (43) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +339 -113
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +339 -112
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -2
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +185 -107
  5. package/dist/engine-dom/iife/es5/engine-dom.js +7560 -5747
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +5942 -4572
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +339 -112
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -2
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +185 -107
  11. package/dist/engine-dom/umd/es5/engine-dom.js +7560 -5747
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +5942 -4572
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +176 -36
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +176 -37
  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.2 */
296
+ /** version: 2.14.0 */
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.2 */
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;
@@ -2054,6 +2044,12 @@
2054
2044
  return isUndefined$1(meta) ? defaultMeta : meta;
2055
2045
  }
2056
2046
 
2047
+ /*
2048
+ * Copyright (c) 2018, salesforce.com, inc.
2049
+ * All rights reserved.
2050
+ * SPDX-License-Identifier: MIT
2051
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2052
+ */
2057
2053
  const signedTemplateSet = new Set();
2058
2054
  function defaultEmptyTemplate() {
2059
2055
  return [];
@@ -2068,6 +2064,32 @@
2068
2064
  */
2069
2065
  function registerTemplate(tpl) {
2070
2066
  signedTemplateSet.add(tpl);
2067
+ // FIXME[@W-10950976]: the template object should be frozen, and it should not be possible to set
2068
+ // the stylesheets or stylesheetToken(s). For backwards compat, though, we shim stylesheetTokens
2069
+ // on top of stylesheetToken for anyone who is accessing the old internal API.
2070
+ // Details: https://salesforce.quip.com/v1rmAFu2cKAr
2071
+ defineProperty(tpl, 'stylesheetTokens', {
2072
+ enumerable: true,
2073
+ configurable: true,
2074
+ get() {
2075
+ const { stylesheetToken } = this;
2076
+ if (isUndefined$1(stylesheetToken)) {
2077
+ return stylesheetToken;
2078
+ }
2079
+ // Shim for the old `stylesheetTokens` property
2080
+ // See https://github.com/salesforce/lwc/pull/2332/files#diff-7901555acef29969adaa6583185b3e9bce475cdc6f23e799a54e0018cb18abaa
2081
+ return {
2082
+ hostAttribute: `${stylesheetToken}-host`,
2083
+ shadowAttribute: stylesheetToken,
2084
+ };
2085
+ },
2086
+ set(value) {
2087
+ // If the value is null or some other exotic object, you would be broken anyway in the past
2088
+ // because the engine would try to access hostAttribute/shadowAttribute, which would throw an error.
2089
+ // However it may be undefined in newer versions of LWC, so we need to guard against that case.
2090
+ this.stylesheetToken = isUndefined$1(value) ? undefined : value.shadowAttribute;
2091
+ },
2092
+ });
2071
2093
  // chaining this method as a way to wrap existing
2072
2094
  // assignment of templates easily, without too much transformation
2073
2095
  return tpl;
@@ -2841,15 +2863,16 @@
2841
2863
  }
2842
2864
  }
2843
2865
  function unmount(vnode, parent, doRemove = false) {
2844
- const { type, elm } = vnode;
2866
+ const { type, elm, sel } = vnode;
2845
2867
  // When unmounting a VNode subtree not all the elements have to removed from the DOM. The
2846
2868
  // subtree root, is the only element worth unmounting from the subtree.
2847
2869
  if (doRemove) {
2848
2870
  removeNode(elm, parent);
2849
2871
  }
2872
+ const removeChildren = sel === 'slot'; // slot content is removed to trigger slotchange event when removing slot
2850
2873
  switch (type) {
2851
2874
  case 2 /* Element */:
2852
- unmountVNodes(vnode.children, elm);
2875
+ unmountVNodes(vnode.children, elm, removeChildren);
2853
2876
  break;
2854
2877
  case 3 /* CustomElement */: {
2855
2878
  const { vm } = vnode;
@@ -3617,10 +3640,10 @@
3617
3640
  const { renderMode, shadowMode } = vm;
3618
3641
  if (renderMode === 1 /* Shadow */ && shadowMode === 1 /* Synthetic */) {
3619
3642
  for (let i = 0; i < stylesheets.length; i++) {
3620
- insertGlobalStylesheet$1(stylesheets[i]);
3643
+ insertStylesheet$1(stylesheets[i]);
3621
3644
  }
3622
3645
  }
3623
- else if (ssr$1 || isHydrating$1()) {
3646
+ else if (ssr$1 || vm.hydrated) {
3624
3647
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
3625
3648
  // This works in the client, because the stylesheets are created, and cached in the VM
3626
3649
  // the first time the VM renders.
@@ -3631,15 +3654,10 @@
3631
3654
  else {
3632
3655
  // native shadow or light DOM, DOM renderer
3633
3656
  const root = getNearestNativeShadowComponent(vm);
3634
- const isGlobal = isNull(root);
3657
+ // null root means a global style
3658
+ const target = isNull(root) ? undefined : root.shadowRoot;
3635
3659
  for (let i = 0; i < stylesheets.length; i++) {
3636
- if (isGlobal) {
3637
- insertGlobalStylesheet$1(stylesheets[i]);
3638
- }
3639
- else {
3640
- // local level
3641
- insertStylesheet$1(stylesheets[i], root.shadowRoot);
3642
- }
3660
+ insertStylesheet$1(stylesheets[i], target);
3643
3661
  }
3644
3662
  }
3645
3663
  return null;
@@ -4044,7 +4062,8 @@
4044
4062
  const {
4045
4063
  mode,
4046
4064
  owner,
4047
- tagName
4065
+ tagName,
4066
+ hydrated
4048
4067
  } = options;
4049
4068
  const def = getComponentInternalDef(ctor);
4050
4069
  const vm = {
@@ -4067,6 +4086,7 @@
4067
4086
  cmpSlots: create(null),
4068
4087
  oar: create(null),
4069
4088
  cmpTemplate: null,
4089
+ hydrated: Boolean(hydrated),
4070
4090
  renderMode: def.renderMode,
4071
4091
  shadowMode: computeShadowMode(def, owner),
4072
4092
  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,
@@ -4960,6 +4980,7 @@
4960
4980
  mode,
4961
4981
  owner,
4962
4982
  tagName: sel,
4983
+ hydrated: true,
4963
4984
  });
4964
4985
  vnode.elm = elm;
4965
4986
  vnode.vm = vm;
@@ -5109,6 +5130,10 @@
5109
5130
  hooksAreSet = true;
5110
5131
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
5111
5132
  }
5133
+ // TODO [#2782]: eventually freezeTemplate() will _actually_ freeze the tmpl object. Today it
5134
+ // just warns on mutation.
5135
+ function freezeTemplate(tmpl) {
5136
+ }
5112
5137
 
5113
5138
  /*
5114
5139
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5132,7 +5157,7 @@
5132
5157
  }
5133
5158
  return ctor;
5134
5159
  }
5135
- /* version: 2.13.2 */
5160
+ /* version: 2.14.0 */
5136
5161
 
5137
5162
  /*
5138
5163
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5140,17 +5165,138 @@
5140
5165
  * SPDX-License-Identifier: MIT
5141
5166
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
5142
5167
  */
5143
- const globalStylesheets = create(null);
5144
- const globalStylesheetsParentElement = document.head || document.body || document;
5145
- // This check for constructable stylesheets is similar to Fast's:
5168
+ //
5169
+ // Feature detection
5170
+ //
5171
+ // This check for constructable style sheets is similar to Fast's:
5146
5172
  // https://github.com/microsoft/fast/blob/d49d1ec/packages/web-components/fast-element/src/dom.ts#L51-L53
5147
5173
  // See also: https://github.com/whatwg/webidl/issues/1027#issuecomment-934510070
5148
- const supportsConstructableStyleSheets = isFunction$1(CSSStyleSheet.prototype.replaceSync) && isArray$1(document.adoptedStyleSheets);
5149
- const supportsMutableAdoptedStyleSheets = supportsConstructableStyleSheets &&
5174
+ const supportsConstructableStylesheets = isFunction$1(CSSStyleSheet.prototype.replaceSync) && isArray$1(document.adoptedStyleSheets);
5175
+ // The original adoptedStylesheet proposal used a frozen array. A follow-up proposal made the array mutable.
5176
+ // Chromium 99+ and Firefox 101+ support mutable arrays. We check if the array is mutable, to ensure backward compat.
5177
+ // (If the length is writable, then the array is mutable.) See: https://chromestatus.com/feature/5638996492288000
5178
+ // TODO [#2828]: Re-evaluate this in the future once we drop support for older browser versions.
5179
+ const supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets &&
5150
5180
  getOwnPropertyDescriptor$1(document.adoptedStyleSheets, 'length').writable;
5151
- const styleElements = create(null);
5152
- const styleSheets = create(null);
5153
- const shadowRootsToStyleSheets = new WeakMap();
5181
+ // Detect IE, via https://stackoverflow.com/a/9851769
5182
+ const isIE11 = !isUndefined$1(document.documentMode);
5183
+ const stylesheetCache = new Map();
5184
+ function isDocument(target) {
5185
+ return !isUndefined$1(target.head);
5186
+ }
5187
+ function createFreshStyleElement(content) {
5188
+ const elm = document.createElement('style');
5189
+ elm.type = 'text/css';
5190
+ elm.textContent = content;
5191
+ return elm;
5192
+ }
5193
+ function createStyleElement(content, cacheData) {
5194
+ const { stylesheet, used } = cacheData;
5195
+ // If the <style> was already used, then we should clone it. We cannot insert
5196
+ // the same <style> in two places in the DOM.
5197
+ if (used) {
5198
+ // For a mysterious reason, IE11 doesn't like the way we clone <style> nodes
5199
+ // and will render the incorrect styles if we do things that way. It's just
5200
+ // a perf optimization, so we can skip it for IE11.
5201
+ if (isIE11) {
5202
+ return createFreshStyleElement(content);
5203
+ }
5204
+ // This `<style>` may be repeated multiple times in the DOM, so cache it. It's a bit
5205
+ // faster to call `cloneNode()` on an existing node than to recreate it every time.
5206
+ return stylesheet.cloneNode(true);
5207
+ }
5208
+ // We don't clone every time, because that would be a perf tax on the first time
5209
+ cacheData.used = true;
5210
+ return stylesheet;
5211
+ }
5212
+ function createConstructableStylesheet(content) {
5213
+ const stylesheet = new CSSStyleSheet();
5214
+ stylesheet.replaceSync(content);
5215
+ return stylesheet;
5216
+ }
5217
+ function insertConstructableStylesheet(content, target, cacheData) {
5218
+ const { adoptedStyleSheets } = target;
5219
+ const { stylesheet } = cacheData;
5220
+ // Mutable adopted stylesheets are only supported in certain browsers.
5221
+ // The reason we use it is for perf: https://github.com/salesforce/lwc/pull/2683
5222
+ if (supportsMutableAdoptedStyleSheets) {
5223
+ adoptedStyleSheets.push(stylesheet);
5224
+ }
5225
+ else {
5226
+ target.adoptedStyleSheets = [...adoptedStyleSheets, stylesheet];
5227
+ }
5228
+ }
5229
+ function insertStyleElement(content, target, cacheData) {
5230
+ const elm = createStyleElement(content, cacheData);
5231
+ const targetAnchorPoint = isDocument(target) ? target.head : target;
5232
+ targetAnchorPoint.appendChild(elm);
5233
+ }
5234
+ function doInsertStylesheet(content, target, cacheData) {
5235
+ // Constructable stylesheets are only supported in certain browsers:
5236
+ // https://caniuse.com/mdn-api_document_adoptedstylesheets
5237
+ // The reason we use it is for perf: https://github.com/salesforce/lwc/pull/2460
5238
+ if (supportsConstructableStylesheets) {
5239
+ insertConstructableStylesheet(content, target, cacheData);
5240
+ }
5241
+ else {
5242
+ // Fall back to <style> element
5243
+ insertStyleElement(content, target, cacheData);
5244
+ }
5245
+ }
5246
+ function getCacheData(content) {
5247
+ let cacheData = stylesheetCache.get(content);
5248
+ if (isUndefined$1(cacheData)) {
5249
+ cacheData = {
5250
+ stylesheet: supportsConstructableStylesheets
5251
+ ? createConstructableStylesheet(content)
5252
+ : createFreshStyleElement(content),
5253
+ roots: undefined,
5254
+ global: false,
5255
+ used: false,
5256
+ };
5257
+ stylesheetCache.set(content, cacheData);
5258
+ }
5259
+ return cacheData;
5260
+ }
5261
+ function insertGlobalStylesheet(content) {
5262
+ const cacheData = getCacheData(content);
5263
+ if (cacheData.global) {
5264
+ // already inserted
5265
+ return;
5266
+ }
5267
+ cacheData.global = true; // mark inserted
5268
+ doInsertStylesheet(content, document, cacheData);
5269
+ }
5270
+ function insertLocalStylesheet(content, target) {
5271
+ const cacheData = getCacheData(content);
5272
+ let { roots } = cacheData;
5273
+ if (isUndefined$1(roots)) {
5274
+ roots = cacheData.roots = new WeakSet(); // lazily initialize (not needed for global styles)
5275
+ }
5276
+ else if (roots.has(target)) {
5277
+ // already inserted
5278
+ return;
5279
+ }
5280
+ roots.add(target); // mark inserted
5281
+ doInsertStylesheet(content, target, cacheData);
5282
+ }
5283
+ function insertStylesheet(content, target) {
5284
+ if (isUndefined$1(target)) {
5285
+ // global
5286
+ insertGlobalStylesheet(content);
5287
+ }
5288
+ else {
5289
+ // local
5290
+ insertLocalStylesheet(content, target);
5291
+ }
5292
+ }
5293
+
5294
+ /*
5295
+ * Copyright (c) 2018, salesforce.com, inc.
5296
+ * All rights reserved.
5297
+ * SPDX-License-Identifier: MIT
5298
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
5299
+ */
5154
5300
  let getCustomElement;
5155
5301
  let defineCustomElement;
5156
5302
  let HTMLElementConstructor;
@@ -5177,52 +5323,6 @@
5177
5323
  return false;
5178
5324
  }
5179
5325
  }
5180
- function insertConstructableStyleSheet(content, target) {
5181
- // It's important for CSSStyleSheets to be unique based on their content, so that
5182
- // `shadowRoot.adoptedStyleSheets.includes(sheet)` works.
5183
- let styleSheet = styleSheets[content];
5184
- if (isUndefined$1(styleSheet)) {
5185
- styleSheet = new CSSStyleSheet();
5186
- styleSheet.replaceSync(content);
5187
- styleSheets[content] = styleSheet;
5188
- }
5189
- const { adoptedStyleSheets } = target;
5190
- if (!adoptedStyleSheets.includes(styleSheet)) {
5191
- if (supportsMutableAdoptedStyleSheets) {
5192
- // This is only supported in later versions of Chromium:
5193
- // https://chromestatus.com/feature/5638996492288000
5194
- adoptedStyleSheets.push(styleSheet);
5195
- }
5196
- else {
5197
- target.adoptedStyleSheets = [...adoptedStyleSheets, styleSheet];
5198
- }
5199
- }
5200
- }
5201
- function insertStyleElement(content, target) {
5202
- // Avoid inserting duplicate `<style>`s
5203
- let sheets = shadowRootsToStyleSheets.get(target);
5204
- if (isUndefined$1(sheets)) {
5205
- sheets = create(null);
5206
- shadowRootsToStyleSheets.set(target, sheets);
5207
- }
5208
- if (sheets[content]) {
5209
- return;
5210
- }
5211
- sheets[content] = true;
5212
- // This `<style>` may be repeated multiple times in the DOM, so cache it. It's a bit
5213
- // faster to call `cloneNode()` on an existing node than to recreate it every time.
5214
- let elm = styleElements[content];
5215
- if (isUndefined$1(elm)) {
5216
- elm = document.createElement('style');
5217
- elm.type = 'text/css';
5218
- elm.textContent = content;
5219
- styleElements[content] = elm;
5220
- }
5221
- else {
5222
- elm = elm.cloneNode(true);
5223
- }
5224
- target.appendChild(elm);
5225
- }
5226
5326
  if (isCustomElementRegistryAvailable()) {
5227
5327
  getCustomElement = customElements.get.bind(customElements);
5228
5328
  defineCustomElement = customElements.define.bind(customElements);
@@ -5261,9 +5361,6 @@
5261
5361
  hydrating = value;
5262
5362
  }
5263
5363
  const ssr = false;
5264
- function isHydrating() {
5265
- return hydrating;
5266
- }
5267
5364
  const isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
5268
5365
  const isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
5269
5366
  function createElement$1(tagName, namespace) {
@@ -5372,25 +5469,6 @@
5372
5469
  function isConnected(node) {
5373
5470
  return node.isConnected;
5374
5471
  }
5375
- function insertGlobalStylesheet(content) {
5376
- if (!isUndefined$1(globalStylesheets[content])) {
5377
- return;
5378
- }
5379
- globalStylesheets[content] = true;
5380
- const elm = document.createElement('style');
5381
- elm.type = 'text/css';
5382
- elm.textContent = content;
5383
- globalStylesheetsParentElement.appendChild(elm);
5384
- }
5385
- function insertStylesheet(content, target) {
5386
- if (supportsConstructableStyleSheets) {
5387
- insertConstructableStyleSheet(content, target);
5388
- }
5389
- else {
5390
- // Fall back to <style> element
5391
- insertStyleElement(content, target);
5392
- }
5393
- }
5394
5472
  const HTMLElementExported = HTMLElementConstructor;
5395
5473
  setAttachShadow(attachShadow);
5396
5474
  setCreateComment(createComment);
@@ -5413,10 +5491,7 @@
5413
5491
  setGetProperty(getProperty);
5414
5492
  setHTMLElement(HTMLElementExported);
5415
5493
  setInsert(insert);
5416
- setInsertGlobalStylesheet(insertGlobalStylesheet);
5417
- setInsertStylesheet(insertStylesheet);
5418
5494
  setIsConnected(isConnected);
5419
- setIsHydrating$1(isHydrating);
5420
5495
  setIsNativeShadowDefined(isNativeShadowDefined);
5421
5496
  setIsSyntheticShadowDefined(isSyntheticShadowDefined);
5422
5497
  setNextSibling(nextSibling);
@@ -5431,6 +5506,7 @@
5431
5506
  setSetText(setText);
5432
5507
  setSsr(ssr);
5433
5508
  setAddEventListener(addEventListener);
5509
+ setInsertStylesheet(insertStylesheet);
5434
5510
 
5435
5511
  /*
5436
5512
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5456,6 +5532,7 @@
5456
5532
  mode: 'open',
5457
5533
  owner: null,
5458
5534
  tagName: element.tagName.toLowerCase(),
5535
+ hydrated: true,
5459
5536
  });
5460
5537
  for (const [key, value] of Object.entries(props)) {
5461
5538
  element[key] = value;
@@ -5718,7 +5795,7 @@
5718
5795
  });
5719
5796
  freeze(LightningElement);
5720
5797
  seal(LightningElement.prototype);
5721
- /* version: 2.13.2 */
5798
+ /* version: 2.14.0 */
5722
5799
 
5723
5800
  exports.LightningElement = LightningElement;
5724
5801
  exports.__unstable__ProfilerControl = profilerControl;
@@ -5726,6 +5803,7 @@
5726
5803
  exports.buildCustomElementConstructor = deprecatedBuildCustomElementConstructor;
5727
5804
  exports.createContextProvider = createContextProvider;
5728
5805
  exports.createElement = createElement;
5806
+ exports.freezeTemplate = freezeTemplate;
5729
5807
  exports.getComponentConstructor = getComponentConstructor;
5730
5808
  exports.getComponentDef = getComponentDef;
5731
5809
  exports.hydrateComponent = hydrateComponent;