smoothly 0.1.77 → 0.1.81

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 (220) hide show
  1. package/dist/cjs/{App-eff713bd.js → App-ffc56e72.js} +1 -1
  2. package/dist/cjs/{Notice-e43922ea.js → Notice-9120d311.js} +1 -1
  3. package/dist/cjs/{css-shim-e3f30f9a.js → css-shim-88cc6900.js} +1 -1
  4. package/dist/cjs/{dom-c8b6d1a7.js → dom-95afd968.js} +1 -1
  5. package/dist/cjs/{generate-7f7f7d99.js → generate-14aca5d2.js} +1 -1
  6. package/dist/cjs/{index-b7e6a72c.js → index-138c41c2.js} +342 -147
  7. package/dist/cjs/{index-5537d93a.js → index-41a36ce2.js} +154 -88
  8. package/dist/cjs/{index-7c9d0102.js → index-42db74b3.js} +2 -2
  9. package/dist/cjs/{index-c973259c.js → index-de5d1ee1.js} +10 -7
  10. package/dist/cjs/{index-e37f73fe.js → index-fc82954f.js} +311 -12
  11. package/dist/cjs/index.cjs.js +3 -3
  12. package/dist/cjs/loader.cjs.js +4 -4
  13. package/dist/cjs/{shadow-css-6cbb23a9.js → shadow-css-71d0f821.js} +12 -6
  14. package/dist/cjs/smoothly-accordion-item.cjs.entry.js +2 -2
  15. package/dist/cjs/smoothly-accordion.cjs.entry.js +2 -2
  16. package/dist/cjs/{smoothly-accordion_46.cjs.entry.js → smoothly-accordion_47.cjs.entry.js} +7965 -2493
  17. package/dist/cjs/smoothly-app-demo.cjs.entry.js +3 -3
  18. package/dist/cjs/smoothly-app.cjs.entry.js +2 -2
  19. package/dist/cjs/smoothly-calendar.cjs.entry.js +4 -4
  20. package/dist/cjs/smoothly-checkbox.cjs.entry.js +5707 -504
  21. package/dist/cjs/smoothly-dialog-demo.cjs.entry.js +2 -2
  22. package/dist/cjs/smoothly-dialog.cjs.entry.js +3 -3
  23. package/dist/cjs/smoothly-display-amount.cjs.entry.js +3 -3
  24. package/dist/cjs/smoothly-display-date-time.cjs.entry.js +2 -2
  25. package/dist/cjs/smoothly-display-demo.cjs.entry.js +4 -4
  26. package/dist/cjs/smoothly-display.cjs.entry.js +3 -3
  27. package/dist/cjs/smoothly-frame.cjs.entry.js +3 -3
  28. package/dist/cjs/smoothly-icon-demo.cjs.entry.js +2 -2
  29. package/dist/cjs/smoothly-icon.cjs.entry.js +2 -2
  30. package/dist/cjs/smoothly-input-date-range.cjs.entry.js +3 -3
  31. package/dist/cjs/smoothly-input-date.cjs.entry.js +3 -3
  32. package/dist/cjs/smoothly-input-demo.cjs.entry.js +2 -2
  33. package/dist/cjs/smoothly-input-month.cjs.entry.js +4 -4
  34. package/dist/cjs/smoothly-input.cjs.entry.js +19 -12
  35. package/dist/cjs/smoothly-item.cjs.entry.js +6 -2
  36. package/dist/cjs/smoothly-menu-options.cjs.entry.js +2 -2
  37. package/dist/cjs/smoothly-notification.cjs.entry.js +2 -2
  38. package/dist/cjs/smoothly-notifier.cjs.entry.js +2 -2
  39. package/dist/cjs/smoothly-option.cjs.entry.js +2 -2
  40. package/dist/cjs/smoothly-picker.cjs.entry.js +2 -2
  41. package/dist/cjs/smoothly-popup.cjs.entry.js +2 -2
  42. package/dist/cjs/smoothly-quiet.cjs.entry.js +19 -0
  43. package/dist/cjs/smoothly-radio-group.cjs.entry.js +2 -2
  44. package/dist/cjs/smoothly-radio.cjs.entry.js +2 -2
  45. package/dist/cjs/smoothly-reorder.cjs.entry.js +2 -2
  46. package/dist/cjs/smoothly-room.cjs.entry.js +2 -2
  47. package/dist/cjs/smoothly-select-demo.cjs.entry.js +2 -2
  48. package/dist/cjs/smoothly-select.cjs.entry.js +2 -2
  49. package/dist/cjs/smoothly-selector.cjs.entry.js +2 -2
  50. package/dist/cjs/smoothly-spinner.cjs.entry.js +2 -2
  51. package/dist/cjs/smoothly-submit.cjs.entry.js +2 -2
  52. package/dist/cjs/smoothly-tab-switch.cjs.entry.js +2 -2
  53. package/dist/cjs/smoothly-tab.cjs.entry.js +2 -2
  54. package/dist/cjs/smoothly-table-cell.cjs.entry.js +2 -2
  55. package/dist/cjs/smoothly-table-demo.cjs.entry.js +2 -2
  56. package/dist/cjs/smoothly-table-expandable-cell.cjs.entry.js +2 -2
  57. package/dist/cjs/smoothly-table-expandable-row.cjs.entry.js +2 -2
  58. package/dist/cjs/smoothly-table-header.cjs.entry.js +2 -2
  59. package/dist/cjs/smoothly-table-row.cjs.entry.js +2 -2
  60. package/dist/cjs/smoothly-table.cjs.entry.js +2 -2
  61. package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +3 -3
  62. package/dist/cjs/smoothly-trigger-source.cjs.entry.js +3 -3
  63. package/dist/cjs/smoothly-trigger.cjs.entry.js +2 -2
  64. package/dist/cjs/smoothly-tuple.cjs.entry.js +2 -2
  65. package/dist/cjs/smoothly-urlencoded.cjs.entry.js +2 -2
  66. package/dist/cjs/smoothly.cjs.js +10 -7
  67. package/dist/collection/collection-manifest.json +3 -2
  68. package/dist/collection/components/display-demo/index.js +4 -1
  69. package/dist/collection/components/input/index.js +16 -9
  70. package/dist/collection/components/item/index.js +4 -0
  71. package/dist/collection/components/quiet/index.js +34 -0
  72. package/dist/collection/components/quiet/style.css +3 -0
  73. package/dist/custom-elements/index.d.ts +6 -0
  74. package/dist/custom-elements/index.js +8186 -2655
  75. package/dist/{smoothly/App-bf78807d.js → esm/App-c5f6000f.js} +1 -1
  76. package/dist/esm/{Notice-966edc54.js → Notice-d87d90f7.js} +1 -1
  77. package/dist/esm/{css-shim-003e9264.js → css-shim-c64026cd.js} +1 -1
  78. package/dist/esm/{dom-1b195079.js → dom-a712b575.js} +1 -1
  79. package/dist/esm/{generate-7090dc14.js → generate-be25a8d1.js} +1 -1
  80. package/dist/esm/{index-0dd5f791.js → index-02a70ac1.js} +342 -147
  81. package/dist/{smoothly/index-01fedb5b.js → esm/index-36a04e8c.js} +2 -2
  82. package/dist/esm/{index-531e2f06.js → index-68492ed9.js} +10 -7
  83. package/dist/{smoothly/index-13251390.js → esm/index-a28d88cf.js} +311 -12
  84. package/dist/esm/{index-9d550804.js → index-dcb2b612.js} +154 -88
  85. package/dist/esm/index.js +3 -3
  86. package/dist/esm/loader.js +4 -4
  87. package/dist/esm/{shadow-css-c1ad5fdc.js → shadow-css-1e16431b.js} +12 -6
  88. package/dist/esm/smoothly-accordion-item.entry.js +2 -2
  89. package/dist/esm/smoothly-accordion.entry.js +2 -2
  90. package/dist/esm/{smoothly-accordion_46.entry.js → smoothly-accordion_47.entry.js} +7965 -2494
  91. package/dist/esm/smoothly-app-demo.entry.js +3 -3
  92. package/dist/esm/smoothly-app.entry.js +2 -2
  93. package/dist/esm/smoothly-calendar.entry.js +4 -4
  94. package/dist/esm/smoothly-checkbox.entry.js +5703 -500
  95. package/dist/esm/smoothly-dialog-demo.entry.js +2 -2
  96. package/dist/esm/smoothly-dialog.entry.js +3 -3
  97. package/dist/esm/smoothly-display-amount.entry.js +3 -3
  98. package/dist/esm/smoothly-display-date-time.entry.js +2 -2
  99. package/dist/esm/smoothly-display-demo.entry.js +4 -4
  100. package/dist/esm/smoothly-display.entry.js +3 -3
  101. package/dist/esm/smoothly-frame.entry.js +3 -3
  102. package/dist/esm/smoothly-icon-demo.entry.js +2 -2
  103. package/dist/esm/smoothly-icon.entry.js +2 -2
  104. package/dist/esm/smoothly-input-date-range.entry.js +3 -3
  105. package/dist/esm/smoothly-input-date.entry.js +3 -3
  106. package/dist/esm/smoothly-input-demo.entry.js +2 -2
  107. package/dist/esm/smoothly-input-month.entry.js +4 -4
  108. package/dist/esm/smoothly-input.entry.js +19 -12
  109. package/dist/esm/smoothly-item.entry.js +6 -2
  110. package/dist/esm/smoothly-menu-options.entry.js +2 -2
  111. package/dist/esm/smoothly-notification.entry.js +2 -2
  112. package/dist/esm/smoothly-notifier.entry.js +2 -2
  113. package/dist/esm/smoothly-option.entry.js +2 -2
  114. package/dist/esm/smoothly-picker.entry.js +2 -2
  115. package/dist/esm/smoothly-popup.entry.js +2 -2
  116. package/dist/esm/smoothly-quiet.entry.js +15 -0
  117. package/dist/esm/smoothly-radio-group.entry.js +2 -2
  118. package/dist/esm/smoothly-radio.entry.js +2 -2
  119. package/dist/esm/smoothly-reorder.entry.js +2 -2
  120. package/dist/esm/smoothly-room.entry.js +2 -2
  121. package/dist/esm/smoothly-select-demo.entry.js +2 -2
  122. package/dist/esm/smoothly-select.entry.js +2 -2
  123. package/dist/esm/smoothly-selector.entry.js +2 -2
  124. package/dist/esm/smoothly-spinner.entry.js +2 -2
  125. package/dist/esm/smoothly-submit.entry.js +2 -2
  126. package/dist/esm/smoothly-tab-switch.entry.js +2 -2
  127. package/dist/esm/smoothly-tab.entry.js +2 -2
  128. package/dist/esm/smoothly-table-cell.entry.js +2 -2
  129. package/dist/esm/smoothly-table-demo.entry.js +2 -2
  130. package/dist/esm/smoothly-table-expandable-cell.entry.js +2 -2
  131. package/dist/esm/smoothly-table-expandable-row.entry.js +2 -2
  132. package/dist/esm/smoothly-table-header.entry.js +2 -2
  133. package/dist/esm/smoothly-table-row.entry.js +2 -2
  134. package/dist/esm/smoothly-table.entry.js +2 -2
  135. package/dist/esm/smoothly-trigger-sink.entry.js +3 -3
  136. package/dist/esm/smoothly-trigger-source.entry.js +3 -3
  137. package/dist/esm/smoothly-trigger.entry.js +2 -2
  138. package/dist/esm/smoothly-tuple.entry.js +2 -2
  139. package/dist/esm/smoothly-urlencoded.entry.js +2 -2
  140. package/dist/esm/smoothly.js +10 -7
  141. package/dist/{esm/App-bf78807d.js → smoothly/App-c5f6000f.js} +1 -1
  142. package/dist/smoothly/{css-shim-003e9264.js → css-shim-c64026cd.js} +1 -1
  143. package/dist/smoothly/{dom-1b195079.js → dom-a712b575.js} +1 -1
  144. package/dist/smoothly/{generate-7090dc14.js → generate-be25a8d1.js} +1 -1
  145. package/dist/smoothly/{index-0dd5f791.js → index-02a70ac1.js} +342 -147
  146. package/dist/{esm/index-01fedb5b.js → smoothly/index-36a04e8c.js} +2 -2
  147. package/dist/smoothly/{index-531e2f06.js → index-68492ed9.js} +10 -7
  148. package/dist/{esm/index-13251390.js → smoothly/index-a28d88cf.js} +311 -12
  149. package/dist/smoothly/index.esm.js +3 -3
  150. package/dist/smoothly/{p-0906d4b2.js → p-074a0448.js} +1 -1
  151. package/dist/smoothly/p-09d633f8.entry.js +1 -0
  152. package/dist/smoothly/p-0c1e9588.entry.js +1 -0
  153. package/dist/smoothly/p-1a81597b.entry.js +1 -0
  154. package/dist/smoothly/{p-7f5dd95f.js → p-1e768876.js} +1 -1
  155. package/dist/smoothly/p-9fa3ab06.entry.js +1 -0
  156. package/dist/smoothly/p-c9d01e9b.entry.js +1 -0
  157. package/dist/smoothly/{shadow-css-c1ad5fdc.js → shadow-css-1e16431b.js} +12 -6
  158. package/dist/smoothly/smoothly-accordion-item.entry.js +2 -2
  159. package/dist/smoothly/smoothly-accordion.entry.js +2 -2
  160. package/dist/smoothly/smoothly-app-demo.entry.js +3 -3
  161. package/dist/smoothly/smoothly-app.entry.js +2 -2
  162. package/dist/smoothly/smoothly-calendar.entry.js +4 -4
  163. package/dist/smoothly/smoothly-checkbox.entry.js +5703 -500
  164. package/dist/smoothly/smoothly-dialog-demo.entry.js +2 -2
  165. package/dist/smoothly/smoothly-dialog.entry.js +3 -3
  166. package/dist/smoothly/smoothly-display-amount.entry.js +3 -3
  167. package/dist/smoothly/smoothly-display-date-time.entry.js +2 -2
  168. package/dist/smoothly/smoothly-display-demo.entry.js +4 -4
  169. package/dist/smoothly/smoothly-display.entry.js +3 -3
  170. package/dist/smoothly/smoothly-frame.entry.js +3 -3
  171. package/dist/smoothly/smoothly-icon-demo.entry.js +2 -2
  172. package/dist/smoothly/smoothly-icon.entry.js +2 -2
  173. package/dist/smoothly/smoothly-input-date-range.entry.js +3 -3
  174. package/dist/smoothly/smoothly-input-date.entry.js +3 -3
  175. package/dist/smoothly/smoothly-input-demo.entry.js +2 -2
  176. package/dist/smoothly/smoothly-input-month.entry.js +4 -4
  177. package/dist/smoothly/smoothly-input.entry.js +19 -12
  178. package/dist/smoothly/smoothly-item.entry.js +6 -2
  179. package/dist/smoothly/smoothly-menu-options.entry.js +2 -2
  180. package/dist/smoothly/smoothly-notification.entry.js +2 -2
  181. package/dist/smoothly/smoothly-notifier.entry.js +2 -2
  182. package/dist/smoothly/smoothly-option.entry.js +2 -2
  183. package/dist/smoothly/smoothly-picker.entry.js +2 -2
  184. package/dist/smoothly/smoothly-popup.entry.js +2 -2
  185. package/dist/smoothly/smoothly-quiet.entry.js +15 -0
  186. package/dist/smoothly/smoothly-radio-group.entry.js +2 -2
  187. package/dist/smoothly/smoothly-radio.entry.js +2 -2
  188. package/dist/smoothly/smoothly-reorder.entry.js +2 -2
  189. package/dist/smoothly/smoothly-room.entry.js +2 -2
  190. package/dist/smoothly/smoothly-select-demo.entry.js +2 -2
  191. package/dist/smoothly/smoothly-select.entry.js +2 -2
  192. package/dist/smoothly/smoothly-selector.entry.js +2 -2
  193. package/dist/smoothly/smoothly-spinner.entry.js +2 -2
  194. package/dist/smoothly/smoothly-submit.entry.js +2 -2
  195. package/dist/smoothly/smoothly-tab-switch.entry.js +2 -2
  196. package/dist/smoothly/smoothly-tab.entry.js +2 -2
  197. package/dist/smoothly/smoothly-table-cell.entry.js +2 -2
  198. package/dist/smoothly/smoothly-table-demo.entry.js +2 -2
  199. package/dist/smoothly/smoothly-table-expandable-cell.entry.js +2 -2
  200. package/dist/smoothly/smoothly-table-expandable-row.entry.js +2 -2
  201. package/dist/smoothly/smoothly-table-header.entry.js +2 -2
  202. package/dist/smoothly/smoothly-table-row.entry.js +2 -2
  203. package/dist/smoothly/smoothly-table.entry.js +2 -2
  204. package/dist/smoothly/smoothly-trigger-sink.entry.js +3 -3
  205. package/dist/smoothly/smoothly-trigger-source.entry.js +3 -3
  206. package/dist/smoothly/smoothly-trigger.entry.js +2 -2
  207. package/dist/smoothly/smoothly-tuple.entry.js +2 -2
  208. package/dist/smoothly/smoothly-urlencoded.entry.js +2 -2
  209. package/dist/smoothly/smoothly.esm.js +10 -7
  210. package/dist/types/components/item/index.d.ts +1 -0
  211. package/dist/types/components/quiet/index.d.ts +4 -0
  212. package/dist/types/components.d.ts +15 -0
  213. package/dist/types/stencil-public-runtime.d.ts +183 -182
  214. package/loader/index.d.ts +0 -1
  215. package/package.json +89 -90
  216. package/dist/smoothly/p-22bce579.entry.js +0 -1
  217. package/dist/smoothly/p-41528fcb.entry.js +0 -1
  218. package/dist/smoothly/p-89fe12b0.entry.js +0 -1
  219. package/dist/smoothly/p-e3d91e7a.entry.js +0 -1
  220. package/dist/smoothly/p-e79800d9.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'smoothly';
2
- const BUILD = /* smoothly */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, cssVarShim: false, devTools: false, disconnectedCallback: true, dynamicImportShim: false, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, isDebug: false, isDev: true, isTesting: true, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: true, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, safari10: false, scoped: true, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
2
+ const BUILD = /* smoothly */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, cssVarShim: false, devTools: false, disconnectedCallback: true, dynamicImportShim: false, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: true, isTesting: true, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: true, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, safari10: false, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
3
3
  const Env = /* smoothly */ {};
4
4
 
5
5
  let scopeId;
@@ -22,8 +22,8 @@ const H = (win.HTMLElement || class {
22
22
  const plt = {
23
23
  $flags$: 0,
24
24
  $resourcesUrl$: '',
25
- jmp: h => h(),
26
- raf: h => requestAnimationFrame(h),
25
+ jmp: (h) => h(),
26
+ raf: (h) => requestAnimationFrame(h),
27
27
  ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
28
28
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
29
29
  ce: (eventName, opts) => new CustomEvent(eventName, opts),
@@ -31,7 +31,9 @@ const plt = {
31
31
  const setPlatformHelpers = (helpers) => {
32
32
  Object.assign(plt, helpers);
33
33
  };
34
- const supportsShadow = BUILD.shadowDomShim && BUILD.shadowDom ? /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)() : true;
34
+ const supportsShadow = BUILD.shadowDomShim && BUILD.shadowDom
35
+ ? /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)()
36
+ : true;
35
37
  const supportsListenerOptions = /*@__PURE__*/ (() => {
36
38
  let supportsListenerOptions = false;
37
39
  try {
@@ -49,7 +51,7 @@ const supportsConstructibleStylesheets = BUILD.constructableCSS
49
51
  ? /*@__PURE__*/ (() => {
50
52
  try {
51
53
  new CSSStyleSheet();
52
- return typeof (new CSSStyleSheet()).replace === 'function';
54
+ return typeof new CSSStyleSheet().replace === 'function';
53
55
  }
54
56
  catch (e) { }
55
57
  return false;
@@ -248,7 +250,9 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
248
250
  rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
249
251
  }
250
252
  if (!appliedStyles.has(scopeId)) {
251
- if (BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
253
+ if (BUILD.hydrateClientSide &&
254
+ styleContainerNode.host &&
255
+ (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
252
256
  // This is only happening on native shadow-dom, do not needs CSS var shim
253
257
  styleElm.innerHTML = style;
254
258
  }
@@ -309,7 +313,7 @@ const attachStyles = (hostRef) => {
309
313
  const getScopeId = (cmp, mode) => 'sc-' + (BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);
310
314
  const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
311
315
  // Private
312
- const computeMode = (elm) => modeResolutionChain.map(h => h(elm)).find(m => !!m);
316
+ const computeMode = (elm) => modeResolutionChain.map((h) => h(elm)).find((m) => !!m);
313
317
  // Public
314
318
  const setMode = (handler) => modeResolutionChain.push(handler);
315
319
  const getMode = (ref) => getHostRef(ref).$modeName$;
@@ -396,7 +400,7 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
396
400
  typeof classData !== 'object'
397
401
  ? classData
398
402
  : Object.keys(classData)
399
- .filter(k => classData[k])
403
+ .filter((k) => classData[k])
400
404
  .join(' ');
401
405
  }
402
406
  }
@@ -504,8 +508,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
504
508
  const classList = elm.classList;
505
509
  const oldClasses = parseClassList(oldValue);
506
510
  const newClasses = parseClassList(newValue);
507
- classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));
508
- classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));
511
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
512
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
509
513
  }
510
514
  else if (BUILD.vdomStyle && memberName === 'style') {
511
515
  // update style attribute, css properties and values
@@ -540,7 +544,10 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
540
544
  newValue(elm);
541
545
  }
542
546
  }
543
- else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === 'o' && memberName[1] === 'n') {
547
+ else if (BUILD.vdomListener &&
548
+ (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) &&
549
+ memberName[0] === 'o' &&
550
+ memberName[1] === 'n') {
544
551
  // Event Handlers
545
552
  // so if the member name starts with "on" and the 3rd characters is
546
553
  // a capital letter, and it's not already a member on the element,
@@ -587,7 +594,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
587
594
  // Workaround for Safari, moving the <input> caret when re-assigning the same valued
588
595
  if (memberName === 'list') {
589
596
  isProp = false;
590
- // tslint:disable-next-line: triple-equals
591
597
  }
592
598
  else if (oldValue == null || elm[memberName] != n) {
593
599
  elm[memberName] = n;
@@ -641,7 +647,9 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
641
647
  // if the element passed in is a shadow root, which is a document fragment
642
648
  // then we want to be adding attrs/props to the shadow root's "host" element
643
649
  // if it's not a shadow root, then we add attrs/props to the same element
644
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
650
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
651
+ ? newVnode.$elm$.host
652
+ : newVnode.$elm$;
645
653
  const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
646
654
  const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
647
655
  if (BUILD.updatable) {
@@ -688,7 +696,8 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
688
696
  }
689
697
  else if (BUILD.slotRelocation && newVNode.$flags$ & 1 /* isSlotReference */) {
690
698
  // create a slot reference node
691
- elm = newVNode.$elm$ = BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode) : doc.createTextNode('');
699
+ elm = newVNode.$elm$ =
700
+ BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode) : doc.createTextNode('');
692
701
  }
693
702
  else {
694
703
  if (BUILD.svg && !isSvgMode) {
@@ -696,8 +705,12 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
696
705
  }
697
706
  // create element
698
707
  elm = newVNode.$elm$ = (BUILD.svg
699
- ? doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, BUILD.slotRelocation && newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$)
700
- : doc.createElement(BUILD.slotRelocation && newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$));
708
+ ? doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, BUILD.slotRelocation && newVNode.$flags$ & 2 /* isSlotFallback */
709
+ ? 'slot-fb'
710
+ : newVNode.$tag$)
711
+ : doc.createElement(BUILD.slotRelocation && newVNode.$flags$ & 2 /* isSlotFallback */
712
+ ? 'slot-fb'
713
+ : newVNode.$tag$));
701
714
  if (BUILD.svg && isSvgMode && newVNode.$tag$ === 'foreignObject') {
702
715
  isSvgMode = false;
703
716
  }
@@ -1067,7 +1080,7 @@ const relocateSlotContent = (elm) => {
1067
1080
  // that is suppose to always represent the original content location
1068
1081
  if (isNodeLocatedInSlot(node, slotNameAttr)) {
1069
1082
  // it's possible we've already decided to relocate this node
1070
- relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
1083
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1071
1084
  // made some changes to slots
1072
1085
  // let's make sure we also double check
1073
1086
  // fallbacks are correctly hidden or shown
@@ -1086,9 +1099,9 @@ const relocateSlotContent = (elm) => {
1086
1099
  });
1087
1100
  }
1088
1101
  if (node['s-sr']) {
1089
- relocateNodes.map(relocateNode => {
1102
+ relocateNodes.map((relocateNode) => {
1090
1103
  if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
1091
- relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
1104
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1092
1105
  if (relocateNodeData && !relocateNode.$slotRefNode$) {
1093
1106
  relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
1094
1107
  }
@@ -1096,7 +1109,7 @@ const relocateSlotContent = (elm) => {
1096
1109
  });
1097
1110
  }
1098
1111
  }
1099
- else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) {
1112
+ else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1100
1113
  // so far this element does not have a slot home, not setting slotRefNode on purpose
1101
1114
  // if we never find a home for this element then we'll need to hide it
1102
1115
  relocateNodes.push({
@@ -1191,7 +1204,10 @@ render() {
1191
1204
  if (!nodeToRelocate['s-ol']) {
1192
1205
  // add a reference node marking this node's original location
1193
1206
  // keep a reference to this node for later lookups
1194
- orgLocationNode = BUILD.isDebug || BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode('');
1207
+ orgLocationNode =
1208
+ BUILD.isDebug || BUILD.hydrateServerSide
1209
+ ? originalLocationDebugNode(nodeToRelocate)
1210
+ : doc.createTextNode('');
1195
1211
  orgLocationNode['s-nr'] = nodeToRelocate;
1196
1212
  nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1197
1213
  }
@@ -1215,7 +1231,8 @@ render() {
1215
1231
  }
1216
1232
  }
1217
1233
  }
1218
- if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) || nodeToRelocate.nextSibling !== insertBeforeNode) {
1234
+ if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
1235
+ nodeToRelocate.nextSibling !== insertBeforeNode) {
1219
1236
  // we've checked that it's worth while to relocate
1220
1237
  // since that the node to relocate
1221
1238
  // has a different next sibling or parent relocated
@@ -1250,7 +1267,10 @@ render() {
1250
1267
  // slot comment debug nodes only created with the `--debug` flag
1251
1268
  // otherwise these nodes are text nodes w/out content
1252
1269
  const slotReferenceDebugNode = (slotVNode) => doc.createComment(`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ''}> (host=${hostTagName.toLowerCase()})`);
1253
- const originalLocationDebugNode = (nodeToRelocate) => doc.createComment(`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate['s-hn']})` : `[${nodeToRelocate.textContent}]`));
1270
+ const originalLocationDebugNode = (nodeToRelocate) => doc.createComment(`org-location for ` +
1271
+ (nodeToRelocate.localName
1272
+ ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate['s-hn']})`
1273
+ : `[${nodeToRelocate.textContent}]`));
1254
1274
  const getElement = (ref) => (BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref);
1255
1275
  const createEvent = (ref, name, flags) => {
1256
1276
  const elm = getElement(ref);
@@ -1268,6 +1288,13 @@ const createEvent = (ref, name, flags) => {
1268
1288
  },
1269
1289
  };
1270
1290
  };
1291
+ /**
1292
+ * Helper function to create & dispatch a custom Event on a provided target
1293
+ * @param elm the target of the Event
1294
+ * @param name the name to give the custom Event
1295
+ * @param opts options for configuring a custom Event
1296
+ * @returns the custom Event
1297
+ */
1271
1298
  const emitEvent = (elm, name, opts) => {
1272
1299
  const ev = plt.ce(name, opts);
1273
1300
  elm.dispatchEvent(ev);
@@ -1275,7 +1302,7 @@ const emitEvent = (elm, name, opts) => {
1275
1302
  };
1276
1303
  const attachToAncestor = (hostRef, ancestorComponent) => {
1277
1304
  if (BUILD.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1278
- ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r)));
1305
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1279
1306
  }
1280
1307
  };
1281
1308
  const scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1372,7 +1399,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1372
1399
  // ok, so turns out there are some child host elements
1373
1400
  // waiting on this parent element to load
1374
1401
  // let's fire off all update callbacks waiting
1375
- rc.map(cb => cb());
1402
+ rc.map((cb) => cb());
1376
1403
  elm['s-rc'] = undefined;
1377
1404
  }
1378
1405
  endRender();
@@ -1416,7 +1443,7 @@ const callRender = (hostRef, instance, elm) => {
1416
1443
  // or we need to update the css class/attrs on the host element
1417
1444
  // DOM WRITE!
1418
1445
  if (BUILD.hydrateServerSide) {
1419
- return Promise.resolve(instance).then(value => renderVdom(hostRef, value));
1446
+ return Promise.resolve(instance).then((value) => renderVdom(hostRef, value));
1420
1447
  }
1421
1448
  else {
1422
1449
  renderVdom(hostRef, instance);
@@ -1517,7 +1544,8 @@ const forceUpdate = (ref) => {
1517
1544
  if (BUILD.updatable) {
1518
1545
  const hostRef = getHostRef(ref);
1519
1546
  const isConnected = hostRef.$hostElement$.isConnected;
1520
- if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1547
+ if (isConnected &&
1548
+ (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1521
1549
  scheduleUpdate(hostRef, false);
1522
1550
  }
1523
1551
  // Returns "true" when the forced update was successfully scheduled
@@ -1564,7 +1592,11 @@ const emitLifecycleEvent = (elm, lifecycleName) => {
1564
1592
  });
1565
1593
  }
1566
1594
  };
1567
- const addHydratedFlag = (elm) => (BUILD.hydratedClass ? elm.classList.add('hydrated') : BUILD.hydratedAttribute ? elm.setAttribute('hydrated', '') : undefined);
1595
+ const addHydratedFlag = (elm) => BUILD.hydratedClass
1596
+ ? elm.classList.add('hydrated')
1597
+ : BUILD.hydratedAttribute
1598
+ ? elm.setAttribute('hydrated', '')
1599
+ : undefined;
1568
1600
  const serverSideConnected = (elm) => {
1569
1601
  const children = elm.children;
1570
1602
  if (children != null) {
@@ -1590,7 +1622,7 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1590
1622
  hostElm[HYDRATE_ID] = hostId;
1591
1623
  hostElm.removeAttribute(HYDRATE_ID);
1592
1624
  clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
1593
- childRenderNodes.map(c => {
1625
+ childRenderNodes.map((c) => {
1594
1626
  const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
1595
1627
  const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1596
1628
  const node = c.$elm$;
@@ -1607,7 +1639,7 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1607
1639
  plt.$orgLocNodes$.delete(orgLocationId);
1608
1640
  });
1609
1641
  if (BUILD.shadowDom && shadowRoot) {
1610
- shadowRootNodes.map(shadowRootNode => {
1642
+ shadowRootNodes.map((shadowRootNode) => {
1611
1643
  if (shadowRootNode) {
1612
1644
  shadowRoot.appendChild(shadowRootNode);
1613
1645
  }
@@ -1833,7 +1865,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1833
1865
  const watchMethods = cmpMeta.$watchers$[propName];
1834
1866
  if (watchMethods) {
1835
1867
  // this instance is watching for when this property changed
1836
- watchMethods.map(watchMethodName => {
1868
+ watchMethods.map((watchMethodName) => {
1837
1869
  try {
1838
1870
  // fire off each of the watch methods that are watching this property
1839
1871
  instance[watchMethodName](newVal, oldVal, propName);
@@ -1844,7 +1876,8 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1844
1876
  });
1845
1877
  }
1846
1878
  }
1847
- if (BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1879
+ if (BUILD.updatable &&
1880
+ (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1848
1881
  if (BUILD.cmpShouldUpdate && instance.componentShouldUpdate) {
1849
1882
  if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1850
1883
  return;
@@ -1868,7 +1901,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1868
1901
  const members = Object.entries(cmpMeta.$members$);
1869
1902
  const prototype = Cstr.prototype;
1870
1903
  members.map(([memberName, [memberFlags]]) => {
1871
- if ((BUILD.prop || BUILD.state) && (memberFlags & 31 /* Prop */ || ((!BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
1904
+ if ((BUILD.prop || BUILD.state) &&
1905
+ (memberFlags & 31 /* Prop */ ||
1906
+ ((!BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
1872
1907
  // proxyComponent - prop
1873
1908
  Object.defineProperty(prototype, memberName, {
1874
1909
  get() {
@@ -1898,7 +1933,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1898
1933
  enumerable: true,
1899
1934
  });
1900
1935
  }
1901
- else if (BUILD.lazyLoad && BUILD.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1936
+ else if (BUILD.lazyLoad &&
1937
+ BUILD.method &&
1938
+ flags & 1 /* isElementConstructor */ &&
1939
+ memberFlags & 64 /* Method */) {
1902
1940
  // proxyComponent - method
1903
1941
  Object.defineProperty(prototype, memberName, {
1904
1942
  value(...args) {
@@ -1913,6 +1951,51 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1913
1951
  prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1914
1952
  plt.jmp(() => {
1915
1953
  const propName = attrNameToPropName.get(attrName);
1954
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1955
+ // in the case where an attribute was set inline.
1956
+ // ```html
1957
+ // <my-component some-attribute="some-value"></my-component>
1958
+ // ```
1959
+ //
1960
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1961
+ // programmatically changes it before it has been upgraded as shown below:
1962
+ //
1963
+ // ```html
1964
+ // <!-- this component has _not_ been upgraded yet -->
1965
+ // <my-component id="test" some-attribute="some-value"></my-component>
1966
+ // <script>
1967
+ // // grab non-upgraded component
1968
+ // el = document.querySelector("#test");
1969
+ // el.someAttribute = "another-value";
1970
+ // // upgrade component
1971
+ // customElements.define('my-component', MyComponent);
1972
+ // </script>
1973
+ // ```
1974
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1975
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1976
+ // to the value that was set inline i.e. "some-value" from above example. When
1977
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1978
+ //
1979
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1980
+ // by connectedCallback as this attributeChangedCallback will not fire.
1981
+ //
1982
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1983
+ //
1984
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1985
+ // properties here given that this goes against best practices outlined here
1986
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1987
+ if (this.hasOwnProperty(propName)) {
1988
+ newValue = this[propName];
1989
+ delete this[propName];
1990
+ }
1991
+ else if (prototype.hasOwnProperty(propName) &&
1992
+ typeof this[propName] === 'number' &&
1993
+ this[propName] == newValue) {
1994
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1995
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1996
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1997
+ return;
1998
+ }
1916
1999
  this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1917
2000
  });
1918
2001
  };
@@ -1934,7 +2017,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1934
2017
  };
1935
2018
  const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1936
2019
  // initializeComponent
1937
- if ((BUILD.lazyLoad || BUILD.hydrateServerSide || BUILD.style) && (hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
2020
+ if ((BUILD.lazyLoad || BUILD.hydrateServerSide || BUILD.style) &&
2021
+ (hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1938
2022
  if (BUILD.lazyLoad || BUILD.hydrateClientSide) {
1939
2023
  // we haven't initialized this element yet
1940
2024
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
@@ -1952,7 +2036,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1952
2036
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1953
2037
  }
1954
2038
  if (BUILD.member && !Cstr.isProxied) {
1955
- // we'eve never proxied this Constructor before
2039
+ // we've never proxied this Constructor before
1956
2040
  // let's add the getters/setters to its prototype before
1957
2041
  // the first time we create an instance of the implementation
1958
2042
  if (BUILD.watchCallback) {
@@ -1990,7 +2074,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1990
2074
  else {
1991
2075
  // sync constructor component
1992
2076
  Cstr = elm.constructor;
1993
- hostRef.$flags$ |= 128 /* isWatchReady */ | 32 /* hasInitializedComponent */;
2077
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
2078
+ // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
2079
+ // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
2080
+ // Stencil has completed instantiating the component.
2081
+ customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* isWatchReady */));
1994
2082
  }
1995
2083
  if (BUILD.style && Cstr.style) {
1996
2084
  // this component has styles but we haven't registered them yet
@@ -2004,8 +2092,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
2004
2092
  const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);
2005
2093
  if (!styles.has(scopeId)) {
2006
2094
  const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
2007
- if (!BUILD.hydrateServerSide && BUILD.shadowDom && BUILD.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2008
- style = await import('./shadow-css-c1ad5fdc.js').then(m => m.scopeCss(style, scopeId, false));
2095
+ if (!BUILD.hydrateServerSide &&
2096
+ BUILD.shadowDom &&
2097
+ BUILD.shadowDomShim &&
2098
+ cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2099
+ style = await import('./shadow-css-1e16431b.js').then((m) => m.scopeCss(style, scopeId, false));
2009
2100
  }
2010
2101
  registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
2011
2102
  endRegisterStyles();
@@ -2016,7 +2107,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
2016
2107
  const ancestorComponent = hostRef.$ancestorComponent$;
2017
2108
  const schedule = () => scheduleUpdate(hostRef, true);
2018
2109
  if (BUILD.asyncLoading && ancestorComponent && ancestorComponent['s-rc']) {
2019
- // this is the intial load and this component it has an ancestor component
2110
+ // this is the initial load and this component it has an ancestor component
2020
2111
  // but the ancestor component has NOT fired its will update lifecycle yet
2021
2112
  // so let's just cool our jets and wait for the ancestor to continue first
2022
2113
  // this will get fired off when the ancestor component
@@ -2050,7 +2141,9 @@ const connectedCallback = (elm) => {
2050
2141
  hostId = elm.getAttribute(HYDRATE_ID);
2051
2142
  if (hostId) {
2052
2143
  if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2053
- const scopeId = BUILD.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode')) : addStyle(elm.shadowRoot, cmpMeta);
2144
+ const scopeId = BUILD.mode
2145
+ ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode'))
2146
+ : addStyle(elm.shadowRoot, cmpMeta);
2054
2147
  elm.classList.remove(scopeId + '-h', scopeId + '-s');
2055
2148
  }
2056
2149
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
@@ -2061,7 +2154,9 @@ const connectedCallback = (elm) => {
2061
2154
  // if the slot polyfill is required we'll need to put some nodes
2062
2155
  // in here to act as original content anchors as we move nodes around
2063
2156
  // host element has been connected to the DOM
2064
- if (BUILD.hydrateServerSide || ((BUILD.slot || BUILD.shadowDom) && cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
2157
+ if (BUILD.hydrateServerSide ||
2158
+ ((BUILD.slot || BUILD.shadowDom) &&
2159
+ cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
2065
2160
  setContentReference(elm);
2066
2161
  }
2067
2162
  }
@@ -2072,7 +2167,10 @@ const connectedCallback = (elm) => {
2072
2167
  while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
2073
2168
  // climb up the ancestors looking for the first
2074
2169
  // component that hasn't finished its lifecycle update yet
2075
- if ((BUILD.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute('s-id') && ancestorComponent['s-p']) ||
2170
+ if ((BUILD.hydrateClientSide &&
2171
+ ancestorComponent.nodeType === 1 /* ElementNode */ &&
2172
+ ancestorComponent.hasAttribute('s-id') &&
2173
+ ancestorComponent['s-p']) ||
2076
2174
  ancestorComponent['s-p']) {
2077
2175
  // we found this components first ancestor component
2078
2176
  // keep a reference to this component's ancestor component
@@ -2083,7 +2181,7 @@ const connectedCallback = (elm) => {
2083
2181
  }
2084
2182
  // Lazy properties
2085
2183
  // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
2086
- if (BUILD.prop && BUILD.lazyLoad && !BUILD.hydrateServerSide && cmpMeta.$members$) {
2184
+ if (BUILD.prop && !BUILD.hydrateServerSide && cmpMeta.$members$) {
2087
2185
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
2088
2186
  if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
2089
2187
  const value = elm[memberName];
@@ -2131,7 +2229,7 @@ const disconnectedCallback = (elm) => {
2131
2229
  const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2132
2230
  if (BUILD.hostListener) {
2133
2231
  if (hostRef.$rmListeners$) {
2134
- hostRef.$rmListeners$.map(rmListener => rmListener());
2232
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
2135
2233
  hostRef.$rmListeners$ = undefined;
2136
2234
  }
2137
2235
  }
@@ -2188,6 +2286,22 @@ const proxyCustomElement = (Cstr, compactMeta) => {
2188
2286
  originalDisconnectedCallback.call(this);
2189
2287
  }
2190
2288
  },
2289
+ __attachShadow() {
2290
+ if (supportsShadow) {
2291
+ if (BUILD.shadowDelegatesFocus) {
2292
+ this.attachShadow({
2293
+ mode: 'open',
2294
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
2295
+ });
2296
+ }
2297
+ else {
2298
+ this.attachShadow({ mode: 'open' });
2299
+ }
2300
+ }
2301
+ else {
2302
+ this.shadowRoot = this;
2303
+ }
2304
+ },
2191
2305
  });
2192
2306
  Cstr.is = cmpMeta.$tagName$;
2193
2307
  return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
@@ -2214,14 +2328,6 @@ const forceModeUpdate = (elm) => {
2214
2328
  }
2215
2329
  }
2216
2330
  };
2217
- const attachShadow = (el) => {
2218
- if (supportsShadow) {
2219
- el.attachShadow({ mode: 'open' });
2220
- }
2221
- else {
2222
- el.shadowRoot = el;
2223
- }
2224
- };
2225
2331
  const hmrStart = (elm, cmpMeta, hmrVersionId) => {
2226
2332
  // ¯\_(ツ)_/¯
2227
2333
  const hostRef = getHostRef(elm);
@@ -2248,7 +2354,21 @@ const patchCloneNode = (HostElementPrototype) => {
2248
2354
  if (BUILD.slot && !isShadowDom && deep) {
2249
2355
  let i = 0;
2250
2356
  let slotted, nonStencilNode;
2251
- let stencilPrivates = ['s-id', 's-cr', 's-lr', 's-rc', 's-sc', 's-p', 's-cn', 's-sr', 's-sn', 's-hn', 's-ol', 's-nr', 's-si'];
2357
+ let stencilPrivates = [
2358
+ 's-id',
2359
+ 's-cr',
2360
+ 's-lr',
2361
+ 's-rc',
2362
+ 's-sc',
2363
+ 's-p',
2364
+ 's-cn',
2365
+ 's-sr',
2366
+ 's-sn',
2367
+ 's-hn',
2368
+ 's-ol',
2369
+ 's-nr',
2370
+ 's-si',
2371
+ ];
2252
2372
  for (; i < srcNode.childNodes.length; i++) {
2253
2373
  slotted = srcNode.childNodes[i]['s-nr'];
2254
2374
  nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]);
@@ -2281,6 +2401,62 @@ const patchSlotAppendChild = (HostElementPrototype) => {
2281
2401
  return this.__appendChild(newChild);
2282
2402
  };
2283
2403
  };
2404
+ /**
2405
+ * Patches the text content of an unnamed slotted node inside a scoped component
2406
+ * @param hostElementPrototype the `Element` to be patched
2407
+ * @param cmpMeta component runtime metadata used to determine if the component should be patched or not
2408
+ */
2409
+ const patchTextContent = (hostElementPrototype, cmpMeta) => {
2410
+ if (BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2411
+ const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent');
2412
+ Object.defineProperty(hostElementPrototype, '__textContent', descriptor);
2413
+ Object.defineProperty(hostElementPrototype, 'textContent', {
2414
+ get() {
2415
+ var _a;
2416
+ // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is
2417
+ // the empty string
2418
+ const slotNode = getHostSlotNode(this.childNodes, '');
2419
+ // when a slot node is found, the textContent _may_ be found in the next sibling (text) node, depending on how
2420
+ // nodes were reordered during the vdom render. first try to get the text content from the sibling.
2421
+ if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
2422
+ return slotNode.nextSibling.textContent;
2423
+ }
2424
+ else if (slotNode) {
2425
+ return slotNode.textContent;
2426
+ }
2427
+ else {
2428
+ // fallback to the original implementation
2429
+ return this.__textContent;
2430
+ }
2431
+ },
2432
+ set(value) {
2433
+ var _a;
2434
+ // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is
2435
+ // the empty string
2436
+ const slotNode = getHostSlotNode(this.childNodes, '');
2437
+ // when a slot node is found, the textContent _may_ need to be placed in the next sibling (text) node,
2438
+ // depending on how nodes were reordered during the vdom render. first try to set the text content on the
2439
+ // sibling.
2440
+ if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
2441
+ slotNode.nextSibling.textContent = value;
2442
+ }
2443
+ else if (slotNode) {
2444
+ slotNode.textContent = value;
2445
+ }
2446
+ else {
2447
+ // we couldn't find a slot, but that doesn't mean that there isn't one. if this check ran before the DOM
2448
+ // loaded, we could have missed it. check for a content reference element on the scoped component and insert
2449
+ // it there
2450
+ this.__textContent = value;
2451
+ const contentRefElm = this['s-cr'];
2452
+ if (contentRefElm) {
2453
+ this.insertBefore(contentRefElm, this.firstChild);
2454
+ }
2455
+ }
2456
+ },
2457
+ });
2458
+ }
2459
+ };
2284
2460
  const patchChildSlotNodes = (elm, cmpMeta) => {
2285
2461
  class FakeNodeList extends Array {
2286
2462
  item(n) {
@@ -2302,7 +2478,8 @@ const patchChildSlotNodes = (elm, cmpMeta) => {
2302
2478
  Object.defineProperty(elm, 'childNodes', {
2303
2479
  get() {
2304
2480
  const childNodes = childNodesFn.call(this);
2305
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2481
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 &&
2482
+ getHostRef(this).$flags$ & 2 /* hasRendered */) {
2306
2483
  const result = new FakeNodeList();
2307
2484
  for (let i = 0; i < childNodes.length; i++) {
2308
2485
  const slot = childNodes[i]['s-nr'];
@@ -2318,6 +2495,12 @@ const patchChildSlotNodes = (elm, cmpMeta) => {
2318
2495
  }
2319
2496
  };
2320
2497
  const getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';
2498
+ /**
2499
+ * Recursively searches a series of child nodes for a slot with the provided name.
2500
+ * @param childNodes the nodes to search for a slot with a specific name.
2501
+ * @param slotName the name of the slot to match on.
2502
+ * @returns a reference to the slot node that matches the provided name, `null` otherwise
2503
+ */
2321
2504
  const getHostSlotNode = (childNodes, slotName) => {
2322
2505
  let i = 0;
2323
2506
  let childNode;
@@ -2374,98 +2557,105 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2374
2557
  registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
2375
2558
  }
2376
2559
  }
2377
- lazyBundles.map(lazyBundle => lazyBundle[1].map(compactMeta => {
2378
- const cmpMeta = {
2379
- $flags$: compactMeta[0],
2380
- $tagName$: compactMeta[1],
2381
- $members$: compactMeta[2],
2382
- $listeners$: compactMeta[3],
2383
- };
2384
- if (BUILD.member) {
2385
- cmpMeta.$members$ = compactMeta[2];
2386
- }
2387
- if (BUILD.hostListener) {
2388
- cmpMeta.$listeners$ = compactMeta[3];
2389
- }
2390
- if (BUILD.reflect) {
2391
- cmpMeta.$attrsToReflect$ = [];
2392
- }
2393
- if (BUILD.watchCallback) {
2394
- cmpMeta.$watchers$ = {};
2395
- }
2396
- if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2397
- cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2398
- }
2399
- const tagName = BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
2400
- const HostElement = class extends HTMLElement {
2401
- // StencilLazyHost
2402
- constructor(self) {
2403
- // @ts-ignore
2404
- super(self);
2405
- self = this;
2406
- registerHost(self, cmpMeta);
2407
- if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2408
- // this component is using shadow dom
2409
- // and this browser supports shadow dom
2410
- // add the read-only property "shadowRoot" to the host element
2411
- // adding the shadow root build conditionals to minimize runtime
2412
- if (supportsShadow) {
2413
- if (BUILD.shadowDelegatesFocus) {
2414
- self.attachShadow({
2415
- mode: 'open',
2416
- delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
2417
- });
2560
+ lazyBundles.map((lazyBundle) => {
2561
+ lazyBundle[1].map((compactMeta) => {
2562
+ const cmpMeta = {
2563
+ $flags$: compactMeta[0],
2564
+ $tagName$: compactMeta[1],
2565
+ $members$: compactMeta[2],
2566
+ $listeners$: compactMeta[3],
2567
+ };
2568
+ if (BUILD.member) {
2569
+ cmpMeta.$members$ = compactMeta[2];
2570
+ }
2571
+ if (BUILD.hostListener) {
2572
+ cmpMeta.$listeners$ = compactMeta[3];
2573
+ }
2574
+ if (BUILD.reflect) {
2575
+ cmpMeta.$attrsToReflect$ = [];
2576
+ }
2577
+ if (BUILD.watchCallback) {
2578
+ cmpMeta.$watchers$ = {};
2579
+ }
2580
+ if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2581
+ cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2582
+ }
2583
+ const tagName = BUILD.transformTagName && options.transformTagName
2584
+ ? options.transformTagName(cmpMeta.$tagName$)
2585
+ : cmpMeta.$tagName$;
2586
+ const HostElement = class extends HTMLElement {
2587
+ // StencilLazyHost
2588
+ constructor(self) {
2589
+ // @ts-ignore
2590
+ super(self);
2591
+ self = this;
2592
+ registerHost(self, cmpMeta);
2593
+ if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2594
+ // this component is using shadow dom
2595
+ // and this browser supports shadow dom
2596
+ // add the read-only property "shadowRoot" to the host element
2597
+ // adding the shadow root build conditionals to minimize runtime
2598
+ if (supportsShadow) {
2599
+ if (BUILD.shadowDelegatesFocus) {
2600
+ self.attachShadow({
2601
+ mode: 'open',
2602
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
2603
+ });
2604
+ }
2605
+ else {
2606
+ self.attachShadow({ mode: 'open' });
2607
+ }
2418
2608
  }
2419
- else {
2420
- self.attachShadow({ mode: 'open' });
2609
+ else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {
2610
+ self.shadowRoot = self;
2421
2611
  }
2422
2612
  }
2423
- else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {
2424
- self.shadowRoot = self;
2613
+ if (BUILD.slotChildNodesFix) {
2614
+ patchChildSlotNodes(self, cmpMeta);
2425
2615
  }
2426
2616
  }
2427
- if (BUILD.slotChildNodesFix) {
2428
- patchChildSlotNodes(self, cmpMeta);
2429
- }
2430
- }
2431
- connectedCallback() {
2432
- if (appLoadFallback) {
2433
- clearTimeout(appLoadFallback);
2434
- appLoadFallback = null;
2617
+ connectedCallback() {
2618
+ if (appLoadFallback) {
2619
+ clearTimeout(appLoadFallback);
2620
+ appLoadFallback = null;
2621
+ }
2622
+ if (isBootstrapping) {
2623
+ // connectedCallback will be processed once all components have been registered
2624
+ deferredConnectedCallbacks.push(this);
2625
+ }
2626
+ else {
2627
+ plt.jmp(() => connectedCallback(this));
2628
+ }
2435
2629
  }
2436
- if (isBootstrapping) {
2437
- // connectedCallback will be processed once all components have been registered
2438
- deferredConnectedCallbacks.push(this);
2630
+ disconnectedCallback() {
2631
+ plt.jmp(() => disconnectedCallback(this));
2439
2632
  }
2440
- else {
2441
- plt.jmp(() => connectedCallback(this));
2633
+ componentOnReady() {
2634
+ return getHostRef(this).$onReadyPromise$;
2442
2635
  }
2636
+ };
2637
+ if (BUILD.cloneNodeFix) {
2638
+ patchCloneNode(HostElement.prototype);
2443
2639
  }
2444
- disconnectedCallback() {
2445
- plt.jmp(() => disconnectedCallback(this));
2640
+ if (BUILD.appendChildSlotFix) {
2641
+ patchSlotAppendChild(HostElement.prototype);
2446
2642
  }
2447
- componentOnReady() {
2448
- return getHostRef(this).$onReadyPromise$;
2643
+ if (BUILD.hotModuleReplacement) {
2644
+ HostElement.prototype['s-hmr'] = function (hmrVersionId) {
2645
+ hmrStart(this, cmpMeta, hmrVersionId);
2646
+ };
2449
2647
  }
2450
- };
2451
- if (BUILD.cloneNodeFix) {
2452
- patchCloneNode(HostElement.prototype);
2453
- }
2454
- if (BUILD.appendChildSlotFix) {
2455
- patchSlotAppendChild(HostElement.prototype);
2456
- }
2457
- if (BUILD.hotModuleReplacement) {
2458
- HostElement.prototype['s-hmr'] = function (hmrVersionId) {
2459
- hmrStart(this, cmpMeta, hmrVersionId);
2460
- };
2461
- }
2462
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
2463
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2464
- cmpTags.push(tagName);
2465
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
2466
- }
2467
- }));
2468
- if (BUILD.hydratedClass || BUILD.hydratedAttribute) {
2648
+ if (BUILD.scopedSlotTextContentFix) {
2649
+ patchTextContent(HostElement.prototype, cmpMeta);
2650
+ }
2651
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
2652
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2653
+ cmpTags.push(tagName);
2654
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
2655
+ }
2656
+ });
2657
+ });
2658
+ if (BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {
2469
2659
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
2470
2660
  visibilityStyle.setAttribute('data-styles', '');
2471
2661
  head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
@@ -2473,7 +2663,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2473
2663
  // Process deferred connectedCallbacks now all components have been registered
2474
2664
  isBootstrapping = false;
2475
2665
  if (deferredConnectedCallbacks.length) {
2476
- deferredConnectedCallbacks.map(host => host.connectedCallback());
2666
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
2477
2667
  }
2478
2668
  else {
2479
2669
  if (BUILD.profile) {
@@ -2501,7 +2691,7 @@ const getConnect = (_ref, tagName) => {
2501
2691
  return typeof elm.componentOnReady === 'function' ? elm.componentOnReady() : Promise.resolve(elm);
2502
2692
  };
2503
2693
  const create = (...args) => {
2504
- return componentOnReady().then(el => el.create(...args));
2694
+ return componentOnReady().then((el) => el.create(...args));
2505
2695
  };
2506
2696
  return {
2507
2697
  create,
@@ -2549,7 +2739,7 @@ const insertVdomAnnotations = (doc, staticComponents) => {
2549
2739
  };
2550
2740
  const orgLocationNodes = [];
2551
2741
  parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);
2552
- orgLocationNodes.forEach(orgLocationNode => {
2742
+ orgLocationNodes.forEach((orgLocationNode) => {
2553
2743
  if (orgLocationNode != null) {
2554
2744
  const nodeRef = orgLocationNode['s-nr'];
2555
2745
  let hostId = nodeRef['s-host-id'];
@@ -2606,7 +2796,7 @@ const parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
2606
2796
  orgLocationNodes.push(node);
2607
2797
  }
2608
2798
  if (node.nodeType === 1 /* ElementNode */) {
2609
- node.childNodes.forEach(childNode => {
2799
+ node.childNodes.forEach((childNode) => {
2610
2800
  const hostRef = getHostRef(childNode);
2611
2801
  if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {
2612
2802
  const cmpData = {
@@ -2635,7 +2825,7 @@ const insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
2635
2825
  const parent = hostElm.parentElement;
2636
2826
  if (parent && parent.childNodes) {
2637
2827
  const parentChildNodes = Array.from(parent.childNodes);
2638
- const comment = parentChildNodes.find(node => node.nodeType === 8 /* CommentNode */ && node['s-sr']);
2828
+ const comment = parentChildNodes.find((node) => node.nodeType === 8 /* CommentNode */ && node['s-sr']);
2639
2829
  if (comment) {
2640
2830
  const index = parentChildNodes.indexOf(hostElm) - 1;
2641
2831
  vnode.$elm$.setAttribute(HYDRATE_CHILD_ID, `${comment['s-host-id']}.${comment['s-node-id']}.0.${index}`);
@@ -2695,10 +2885,10 @@ const registerHost = (elm, cmpMeta) => {
2695
2885
  hostRef.$renderCount$ = 0;
2696
2886
  }
2697
2887
  if (BUILD.method && BUILD.lazyLoad) {
2698
- hostRef.$onInstancePromise$ = new Promise(r => (hostRef.$onInstanceResolve$ = r));
2888
+ hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
2699
2889
  }
2700
2890
  if (BUILD.asyncLoading) {
2701
- hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r));
2891
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
2702
2892
  elm['s-p'] = [];
2703
2893
  elm['s-rc'] = [];
2704
2894
  }
@@ -2709,11 +2899,14 @@ const isMemberInElement = (elm, memberName) => memberName in elm;
2709
2899
  const consoleError = (e, el) => (customError || console.error)(e, el);
2710
2900
  const STENCIL_DEV_MODE = BUILD.isTesting
2711
2901
  ? ['STENCIL:'] // E2E testing
2712
- : ['%cstencil', 'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px'];
2902
+ : [
2903
+ '%cstencil',
2904
+ 'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px',
2905
+ ];
2713
2906
  const consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m);
2714
2907
  const consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m);
2715
2908
  const consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m);
2716
- const setErrorHandler = (handler) => customError = handler;
2909
+ const setErrorHandler = (handler) => (customError = handler);
2717
2910
  const cmpModules = /*@__PURE__*/ new Map();
2718
2911
  const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2719
2912
  // loadModuleImport
@@ -2731,7 +2924,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2731
2924
  /* webpackInclude: /\.entry\.js$/ */
2732
2925
  /* webpackExclude: /\.system\.entry\.js$/ */
2733
2926
  /* webpackMode: "lazy" */
2734
- `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? '?s-hmr=' + hmrVersionId : ''}`).then(importedModule => {
2927
+ `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? '?s-hmr=' + hmrVersionId : ''}`).then((importedModule) => {
2735
2928
  if (!BUILD.hotModuleReplacement) {
2736
2929
  cmpModules.set(bundleId, importedModule);
2737
2930
  }
@@ -2794,7 +2987,9 @@ const flush = () => {
2794
2987
  consume(queueDomReads);
2795
2988
  // DOM WRITES!!!
2796
2989
  if (BUILD.asyncQueue) {
2797
- const timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */ ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0)) : Infinity;
2990
+ const timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */
2991
+ ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0))
2992
+ : Infinity;
2798
2993
  consumeTimeout(queueDomWrites, timeout);
2799
2994
  consumeTimeout(queueDomWritesLow, timeout);
2800
2995
  if (queueDomWrites.length > 0) {