@vertexvis/ui 0.1.5-testing.0 → 1.0.0-testing.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 (888) hide show
  1. package/dist/cjs/components.cjs.js +14 -84
  2. package/dist/cjs/{dom-a2c535e3.js → dom-v38DVhe2.js} +4 -4
  3. package/dist/cjs/icon-helper-ut8vR2Rk.js +559 -0
  4. package/dist/cjs/index-D-R2lvls.js +62 -0
  5. package/dist/cjs/index-DihxupoM.js +95 -0
  6. package/dist/cjs/index-DwS9D24e.js +2230 -0
  7. package/dist/cjs/index.cjs.js +91 -92
  8. package/dist/cjs/{lib-1bd1e383.js → lib-CCXuRx1c.js} +2 -2
  9. package/dist/cjs/loader.cjs.js +5 -15
  10. package/dist/cjs/slots-DEdmqbtw.js +29 -0
  11. package/dist/cjs/templates-C_WUWcnZ.js +230 -0
  12. package/dist/cjs/tslib.es6-AsLBQn5u.js +68 -0
  13. package/dist/cjs/vertex-auto-resize-textarea.cjs.entry.js +132 -5
  14. package/dist/cjs/vertex-avatar-group.cjs.entry.js +12 -5
  15. package/dist/cjs/vertex-avatar.cjs.entry.js +44 -6
  16. package/dist/cjs/vertex-badge.cjs.entry.js +21 -6
  17. package/dist/cjs/vertex-banner.cjs.entry.js +122 -7
  18. package/dist/cjs/vertex-button.cjs.entry.js +83 -6
  19. package/dist/cjs/vertex-card-group.cjs.entry.js +34 -6
  20. package/dist/cjs/vertex-card.cjs.entry.js +33 -5
  21. package/dist/cjs/vertex-chip.cjs.entry.js +28 -6
  22. package/dist/cjs/vertex-click-to-edit-textfield.cjs.entry.js +112 -7
  23. package/dist/cjs/vertex-collapsible.cjs.entry.js +22 -6
  24. package/dist/cjs/vertex-color-circle-picker.cjs.entry.js +142 -6
  25. package/dist/cjs/vertex-color-picker.cjs.entry.js +67 -7
  26. package/dist/cjs/vertex-color-swatch.cjs.entry.js +141 -7
  27. package/dist/cjs/vertex-context-menu.cjs.entry.js +91 -6
  28. package/dist/cjs/vertex-dialog.cjs.entry.js +226 -5
  29. package/dist/cjs/vertex-draggable-popover.cjs.entry.js +79 -6
  30. package/dist/cjs/vertex-dropdown-menu.cjs.entry.js +34 -6
  31. package/dist/cjs/vertex-expandable.cjs.entry.js +101 -6
  32. package/dist/cjs/vertex-help-tooltip.cjs.entry.js +36 -5
  33. package/dist/cjs/vertex-icon-button.cjs.entry.js +58 -7
  34. package/dist/cjs/vertex-icon.cjs.entry.js +29 -7
  35. package/dist/cjs/vertex-logo-loading.cjs.entry.js +12 -5
  36. package/dist/cjs/vertex-menu-divider.cjs.entry.js +12 -5
  37. package/dist/cjs/vertex-menu-item.cjs.entry.js +24 -6
  38. package/dist/cjs/vertex-menu.cjs.entry.js +80 -6
  39. package/dist/cjs/vertex-popover.cjs.entry.js +1894 -5
  40. package/dist/cjs/vertex-radio-group.cjs.entry.js +73 -5
  41. package/dist/cjs/vertex-radio.cjs.entry.js +29 -6
  42. package/dist/cjs/vertex-resizable.cjs.entry.js +439 -7
  43. package/dist/cjs/vertex-result-list.cjs.entry.js +300 -7
  44. package/dist/cjs/vertex-search-bar.cjs.entry.js +528 -7
  45. package/dist/cjs/vertex-select.cjs.entry.js +181 -6
  46. package/dist/cjs/vertex-slider.cjs.entry.js +55 -7
  47. package/dist/cjs/vertex-spinner.cjs.entry.js +32 -6
  48. package/dist/cjs/vertex-tab.cjs.entry.js +20 -6
  49. package/dist/cjs/vertex-tabs.cjs.entry.js +104 -6
  50. package/dist/cjs/vertex-textfield.cjs.entry.js +147 -7
  51. package/dist/cjs/vertex-toast.cjs.entry.js +109 -6
  52. package/dist/cjs/vertex-toggle.cjs.entry.js +47 -6
  53. package/dist/cjs/vertex-tooltip.cjs.entry.js +343 -8
  54. package/dist/collection/collection-manifest.json +44 -43
  55. package/dist/collection/components/auto-resize-textarea/auto-resize-textarea.js +222 -213
  56. package/dist/collection/components/auto-resize-textarea/utils.js +1 -1
  57. package/dist/collection/components/avatar/avatar.js +153 -137
  58. package/dist/collection/components/avatar-group/avatar-group.js +16 -16
  59. package/dist/collection/components/badge/badge.js +75 -66
  60. package/dist/collection/components/banner/banner.js +284 -247
  61. package/dist/collection/components/button/button.css +1 -1
  62. package/dist/collection/components/button/button.js +274 -230
  63. package/dist/collection/components/card/card.js +89 -76
  64. package/dist/collection/components/card-group/card-group.js +104 -89
  65. package/dist/collection/components/chip/chip.js +89 -73
  66. package/dist/collection/components/click-to-edit-text-field/click-to-edit-text-field.js +412 -373
  67. package/dist/collection/components/collapsible/collapsible.js +71 -65
  68. package/dist/collection/components/color-circle-picker/color-circle-picker.js +398 -312
  69. package/dist/collection/components/color-picker/color-picker.js +225 -186
  70. package/dist/collection/components/color-swatch/color-swatch.js +341 -272
  71. package/dist/collection/components/color-swatch/lib.js +2 -2
  72. package/dist/collection/components/context-menu/context-menu.js +168 -161
  73. package/dist/collection/components/dialog/dialog.js +332 -323
  74. package/dist/collection/components/dialog/lib.js +4 -4
  75. package/dist/collection/components/draggable-popover/draggable-popover.js +182 -175
  76. package/dist/collection/components/dropdown-menu/dropdown-menu.js +122 -108
  77. package/dist/collection/components/expandable/expandable.js +272 -224
  78. package/dist/collection/components/help-tooltip/help-tooltip.js +132 -118
  79. package/dist/collection/components/icon/icon-helper.js +414 -414
  80. package/dist/collection/components/icon/icon.js +91 -75
  81. package/dist/collection/components/icon/icons/adjustments.js +1 -1
  82. package/dist/collection/components/icon/icons/align-to-global.js +1 -1
  83. package/dist/collection/components/icon/icons/align-to-part.js +1 -1
  84. package/dist/collection/components/icon/icons/align-to-surface.js +1 -1
  85. package/dist/collection/components/icon/icons/align-view-to-plane.js +1 -1
  86. package/dist/collection/components/icon/icons/annotation.js +1 -1
  87. package/dist/collection/components/icon/icons/arrow-filled.js +1 -1
  88. package/dist/collection/components/icon/icons/arrow-left-circled.js +1 -1
  89. package/dist/collection/components/icon/icons/arrow-line-left.js +1 -1
  90. package/dist/collection/components/icon/icons/arrow-line-right.js +1 -1
  91. package/dist/collection/components/icon/icons/arrow-partial.js +1 -1
  92. package/dist/collection/components/icon/icons/arrow-right-circled.js +2 -2
  93. package/dist/collection/components/icon/icons/arrow-swap.js +1 -1
  94. package/dist/collection/components/icon/icons/arrow-triangle-left.js +1 -1
  95. package/dist/collection/components/icon/icons/arrow-triangle-right.js +1 -1
  96. package/dist/collection/components/icon/icons/arrow-up-circled.js +1 -1
  97. package/dist/collection/components/icon/icons/attachment.js +1 -1
  98. package/dist/collection/components/icon/icons/axis-x.js +1 -1
  99. package/dist/collection/components/icon/icons/axis-y.js +1 -1
  100. package/dist/collection/components/icon/icons/axis-z.js +1 -1
  101. package/dist/collection/components/icon/icons/back.js +1 -1
  102. package/dist/collection/components/icon/icons/box-cursor.js +1 -1
  103. package/dist/collection/components/icon/icons/box-select.js +1 -1
  104. package/dist/collection/components/icon/icons/camera-add.js +1 -1
  105. package/dist/collection/components/icon/icons/camera.js +1 -1
  106. package/dist/collection/components/icon/icons/caret-down.js +1 -1
  107. package/dist/collection/components/icon/icons/caret-left.js +1 -1
  108. package/dist/collection/components/icon/icons/caret-right.js +1 -1
  109. package/dist/collection/components/icon/icons/caret-up.js +1 -1
  110. package/dist/collection/components/icon/icons/caution.js +1 -1
  111. package/dist/collection/components/icon/icons/check-circle.js +1 -1
  112. package/dist/collection/components/icon/icons/check.js +1 -1
  113. package/dist/collection/components/icon/icons/chevron-down.js +1 -1
  114. package/dist/collection/components/icon/icons/chevron-left.js +1 -1
  115. package/dist/collection/components/icon/icons/chevron-right.js +1 -1
  116. package/dist/collection/components/icon/icons/chevron-up.js +1 -1
  117. package/dist/collection/components/icon/icons/circle-outline.js +1 -1
  118. package/dist/collection/components/icon/icons/close-circle-fill.js +1 -1
  119. package/dist/collection/components/icon/icons/close-circle.js +1 -1
  120. package/dist/collection/components/icon/icons/close.js +1 -1
  121. package/dist/collection/components/icon/icons/collapse-all.js +1 -1
  122. package/dist/collection/components/icon/icons/columns-add.js +1 -1
  123. package/dist/collection/components/icon/icons/columns.js +1 -1
  124. package/dist/collection/components/icon/icons/comment-add.js +1 -1
  125. package/dist/collection/components/icon/icons/comment-filled.js +1 -1
  126. package/dist/collection/components/icon/icons/comment-reopen.js +1 -1
  127. package/dist/collection/components/icon/icons/comment-resolve.js +1 -1
  128. package/dist/collection/components/icon/icons/comment-show.js +1 -1
  129. package/dist/collection/components/icon/icons/compare.js +1 -1
  130. package/dist/collection/components/icon/icons/compress.js +1 -1
  131. package/dist/collection/components/icon/icons/copy.js +1 -1
  132. package/dist/collection/components/icon/icons/cross-section.js +1 -1
  133. package/dist/collection/components/icon/icons/cube-orthographic.js +1 -1
  134. package/dist/collection/components/icon/icons/cube-perspective.js +1 -1
  135. package/dist/collection/components/icon/icons/cube-stack.js +1 -1
  136. package/dist/collection/components/icon/icons/delete.js +1 -1
  137. package/dist/collection/components/icon/icons/download.js +1 -1
  138. package/dist/collection/components/icon/icons/drag-indicator.js +1 -1
  139. package/dist/collection/components/icon/icons/ellipse.js +1 -1
  140. package/dist/collection/components/icon/icons/error-circle.js +1 -1
  141. package/dist/collection/components/icon/icons/expand-all.js +1 -1
  142. package/dist/collection/components/icon/icons/expand.js +1 -1
  143. package/dist/collection/components/icon/icons/export.js +1 -1
  144. package/dist/collection/components/icon/icons/file-folder.js +1 -1
  145. package/dist/collection/components/icon/icons/file-pdf.js +1 -1
  146. package/dist/collection/components/icon/icons/file.js +1 -1
  147. package/dist/collection/components/icon/icons/fit-all.js +1 -1
  148. package/dist/collection/components/icon/icons/fit-selected.js +1 -1
  149. package/dist/collection/components/icon/icons/flip.js +1 -1
  150. package/dist/collection/components/icon/icons/folder-plus.js +1 -1
  151. package/dist/collection/components/icon/icons/forward.js +1 -1
  152. package/dist/collection/components/icon/icons/gear.js +1 -1
  153. package/dist/collection/components/icon/icons/help.js +1 -1
  154. package/dist/collection/components/icon/icons/info.js +1 -1
  155. package/dist/collection/components/icon/icons/invert.js +1 -1
  156. package/dist/collection/components/icon/icons/label-off.js +1 -1
  157. package/dist/collection/components/icon/icons/label.js +1 -1
  158. package/dist/collection/components/icon/icons/line-dot-left.js +1 -1
  159. package/dist/collection/components/icon/icons/line-dot-right.js +1 -1
  160. package/dist/collection/components/icon/icons/line-hash-left.js +1 -1
  161. package/dist/collection/components/icon/icons/line-hash-right.js +1 -1
  162. package/dist/collection/components/icon/icons/line.js +1 -1
  163. package/dist/collection/components/icon/icons/locate.js +1 -1
  164. package/dist/collection/components/icon/icons/lock-closed.js +1 -1
  165. package/dist/collection/components/icon/icons/lock-open.js +1 -1
  166. package/dist/collection/components/icon/icons/markup.js +1 -1
  167. package/dist/collection/components/icon/icons/menu.js +1 -1
  168. package/dist/collection/components/icon/icons/notification.js +1 -1
  169. package/dist/collection/components/icon/icons/open-window.js +1 -1
  170. package/dist/collection/components/icon/icons/open.js +1 -1
  171. package/dist/collection/components/icon/icons/pan.js +1 -1
  172. package/dist/collection/components/icon/icons/paper-airplane.js +1 -1
  173. package/dist/collection/components/icon/icons/paste.js +1 -1
  174. package/dist/collection/components/icon/icons/pencil.js +1 -1
  175. package/dist/collection/components/icon/icons/person-height.js +1 -1
  176. package/dist/collection/components/icon/icons/person-run.js +1 -1
  177. package/dist/collection/components/icon/icons/person-short.js +1 -1
  178. package/dist/collection/components/icon/icons/person-tall.js +1 -1
  179. package/dist/collection/components/icon/icons/person-walk.js +1 -1
  180. package/dist/collection/components/icon/icons/pin-fill.js +1 -1
  181. package/dist/collection/components/icon/icons/pin-line.js +1 -1
  182. package/dist/collection/components/icon/icons/pin-text-fill.js +1 -1
  183. package/dist/collection/components/icon/icons/pin-text-square.js +1 -1
  184. package/dist/collection/components/icon/icons/pin-text.js +1 -1
  185. package/dist/collection/components/icon/icons/plus-with-arrow.js +1 -1
  186. package/dist/collection/components/icon/icons/plus.js +1 -1
  187. package/dist/collection/components/icon/icons/pmi.js +1 -1
  188. package/dist/collection/components/icon/icons/precise-measurement.js +1 -1
  189. package/dist/collection/components/icon/icons/rabbit.js +1 -1
  190. package/dist/collection/components/icon/icons/refresh.js +1 -1
  191. package/dist/collection/components/icon/icons/rename.js +1 -1
  192. package/dist/collection/components/icon/icons/report.js +1 -1
  193. package/dist/collection/components/icon/icons/reset.js +1 -1
  194. package/dist/collection/components/icon/icons/resize.js +1 -1
  195. package/dist/collection/components/icon/icons/rotate.js +1 -1
  196. package/dist/collection/components/icon/icons/ruler.js +1 -1
  197. package/dist/collection/components/icon/icons/scissors.js +1 -1
  198. package/dist/collection/components/icon/icons/search.js +1 -1
  199. package/dist/collection/components/icon/icons/show-only-nearby.js +1 -1
  200. package/dist/collection/components/icon/icons/snapshots.js +1 -1
  201. package/dist/collection/components/icon/icons/square-dot-outline.js +1 -1
  202. package/dist/collection/components/icon/icons/star.js +1 -1
  203. package/dist/collection/components/icon/icons/tag.js +1 -1
  204. package/dist/collection/components/icon/icons/tape-measure.js +1 -1
  205. package/dist/collection/components/icon/icons/teleport-and-align.js +1 -1
  206. package/dist/collection/components/icon/icons/teleport-toward.js +1 -1
  207. package/dist/collection/components/icon/icons/teleport.js +1 -1
  208. package/dist/collection/components/icon/icons/triad.js +1 -1
  209. package/dist/collection/components/icon/icons/turtle.js +1 -1
  210. package/dist/collection/components/icon/icons/update.js +1 -1
  211. package/dist/collection/components/icon/icons/version-history.js +1 -1
  212. package/dist/collection/components/icon/icons/views.js +1 -1
  213. package/dist/collection/components/icon/icons/visibility-hidden.js +1 -1
  214. package/dist/collection/components/icon/icons/visibility-partial.js +1 -1
  215. package/dist/collection/components/icon/icons/visibility-visible.js +1 -1
  216. package/dist/collection/components/icon/icons/workspace-add.js +1 -1
  217. package/dist/collection/components/icon/icons/zoom.js +1 -1
  218. package/dist/collection/components/icon-button/icon-button.css +5 -2
  219. package/dist/collection/components/icon-button/icon-button.js +190 -152
  220. package/dist/collection/components/logo-loading/logo-loading.js +16 -16
  221. package/dist/collection/components/menu/menu.js +286 -250
  222. package/dist/collection/components/menu-divider/menu-divider.js +16 -16
  223. package/dist/collection/components/menu-item/menu-item.js +54 -48
  224. package/dist/collection/components/popover/middleware.js +22 -22
  225. package/dist/collection/components/popover/popover.js +654 -567
  226. package/dist/collection/components/popover/util.js +7 -7
  227. package/dist/collection/components/radio/radio.js +157 -145
  228. package/dist/collection/components/radio-group/radio-group.js +135 -133
  229. package/dist/collection/components/resizable/resizable.js +758 -702
  230. package/dist/collection/components/result-list/lib.js +6 -6
  231. package/dist/collection/components/result-list/result-list.js +456 -431
  232. package/dist/collection/components/search-bar/dom.js +13 -13
  233. package/dist/collection/components/search-bar/lib.js +50 -50
  234. package/dist/collection/components/search-bar/search-bar.js +739 -661
  235. package/dist/collection/components/select/select.css +7 -2
  236. package/dist/collection/components/select/select.js +332 -303
  237. package/dist/collection/components/slider/slider.js +258 -220
  238. package/dist/collection/components/spinner/spinner.js +93 -77
  239. package/dist/collection/components/tab/tab.js +86 -83
  240. package/dist/collection/components/tab/util.js +1 -1
  241. package/dist/collection/components/tabs/tabs.js +150 -151
  242. package/dist/collection/components/text-field/text-field.js +637 -572
  243. package/dist/collection/components/toast/toast.js +266 -228
  244. package/dist/collection/components/toggle/toggle.js +139 -119
  245. package/dist/collection/components/tooltip/tooltip.js +280 -247
  246. package/dist/collection/types/icon.js +137 -137
  247. package/dist/collection/util/components/dom.js +5 -5
  248. package/dist/collection/util/components/slots.js +17 -17
  249. package/dist/collection/util/templates/binding.js +121 -121
  250. package/dist/collection/util/templates/element-pool.js +79 -79
  251. package/dist/collection/util/templates/templates.js +15 -15
  252. package/dist/components/components.esm.js +1 -1
  253. package/dist/components/index.d.ts +6 -42
  254. package/dist/components/index.esm.js +1 -1
  255. package/dist/components/index.js +1 -52
  256. package/dist/components/p-00eaa8d7.entry.js +1 -0
  257. package/dist/components/p-0180556d.entry.js +1 -0
  258. package/dist/components/p-091b9e27.entry.js +1 -0
  259. package/dist/components/p-0af9b71c.entry.js +1 -0
  260. package/dist/components/p-0bd4222b.entry.js +1 -0
  261. package/dist/components/p-0c389e6f.entry.js +1 -0
  262. package/dist/{esm/toggle-1fe22e4f.js → components/p-0f13f6f3.entry.js} +1 -38
  263. package/dist/components/p-1KuzBK7Z.js +1 -0
  264. package/dist/components/p-1c5e8df5.entry.js +1 -0
  265. package/dist/components/p-1e6ff76a.entry.js +1 -0
  266. package/dist/components/p-26f9abc0.entry.js +1 -0
  267. package/dist/components/p-28460604.entry.js +1 -0
  268. package/dist/components/p-2cdfe6bf.entry.js +1 -0
  269. package/dist/components/p-2e0ee616.entry.js +1 -0
  270. package/dist/components/p-34d8a04e.entry.js +1 -0
  271. package/dist/components/p-3ddb0c4e.entry.js +1 -0
  272. package/dist/components/p-4HdACFFW.js +1 -0
  273. package/dist/components/p-553d01af.entry.js +1 -0
  274. package/dist/components/p-595b8bd6.entry.js +1 -0
  275. package/dist/components/p-5c032b37.entry.js +1 -0
  276. package/dist/components/p-5e3fe5e7.entry.js +1 -0
  277. package/dist/components/p-61742c05.entry.js +1 -0
  278. package/dist/components/p-6b2db72c.entry.js +1 -0
  279. package/dist/components/p-6c6a2fc5.entry.js +1 -0
  280. package/dist/components/p-6d03a954.entry.js +1 -0
  281. package/dist/components/p-6qoO8Yf3.js +1 -0
  282. package/dist/components/p-705d25f3.entry.js +1 -0
  283. package/dist/components/p-7f768637.entry.js +1 -0
  284. package/dist/components/p-8358ad1c.entry.js +1 -0
  285. package/dist/components/p-88781e72.entry.js +1 -0
  286. package/dist/components/p-B-yvbsY0.js +1 -0
  287. package/dist/components/p-B23i1cwy.js +1 -0
  288. package/dist/components/p-B2oECB2P.js +1 -0
  289. package/dist/components/p-B9qe9CNv.js +1 -0
  290. package/dist/components/p-BAfJR2VF.js +1 -0
  291. package/dist/components/p-BHmM6WC-.js +1 -0
  292. package/dist/components/p-BLc3P-0q.js +1 -0
  293. package/dist/components/{p-1356f525.js → p-BSoicxl1.js} +1 -1
  294. package/dist/components/p-BZ5oF5Ci.js +1 -0
  295. package/dist/components/p-BZutc-CC.js +1 -0
  296. package/dist/components/p-BbDaHMlz.js +1 -0
  297. package/dist/components/p-BdR40EV2.js +1 -0
  298. package/dist/components/p-Beav1bNT.js +6 -0
  299. package/dist/components/p-Bo65Viuh.js +1 -0
  300. package/dist/components/p-ByQGREpQ.js +1 -0
  301. package/dist/components/p-C1H5-_5m.js +1 -0
  302. package/dist/components/p-C1qwHMcr.js +1 -0
  303. package/dist/components/p-C27tS7nl.js +2 -0
  304. package/dist/components/p-C7VaFE8W.js +1 -0
  305. package/dist/components/p-CAFdRyLE.js +1 -0
  306. package/dist/components/p-CDYHYPYF.js +1 -0
  307. package/dist/components/p-CFaiLAq0.js +1 -0
  308. package/dist/components/{p-59032668.js → p-CIs0DJX1.js} +1 -1
  309. package/dist/components/p-CZ1Qa_xv.js +1 -0
  310. package/dist/components/p-CZyp2id8.js +1 -0
  311. package/dist/components/p-Ci26QjYl.js +1 -0
  312. package/dist/components/p-D1P5FeY6.js +1 -0
  313. package/dist/components/p-D3BXoJJN.js +1 -0
  314. package/dist/components/p-DEpMfvdS.js +1 -0
  315. package/dist/components/p-DGZHaSjz.js +1 -0
  316. package/dist/components/p-DHNuRvq0.js +1 -0
  317. package/dist/components/p-DMLgHhJc.js +1 -0
  318. package/dist/components/p-DO6VjClS.js +1 -0
  319. package/dist/components/p-DPgx10Cw.js +1 -0
  320. package/dist/components/p-DXQBJLz-.js +1 -0
  321. package/dist/components/p-D_mp9WMh.js +1 -0
  322. package/dist/components/p-De54LBPx.js +1 -0
  323. package/dist/components/p-DjrAIJhB.js +1 -0
  324. package/dist/components/p-DsAkiOMC.js +1 -0
  325. package/dist/components/p-Dw5WRKyY.js +1 -0
  326. package/dist/components/p-ILu24ZUX.js +1 -0
  327. package/dist/components/p-K5a7HQMt.js +1 -0
  328. package/dist/components/p-KilWQmEJ.js +1 -0
  329. package/dist/components/p-Mnv_zHXq.js +1 -0
  330. package/dist/components/p-RaMDrnzd.js +1 -0
  331. package/dist/components/p-TLO_pywp.js +1 -0
  332. package/dist/components/p-_3Hgy0Z4.js +1 -0
  333. package/dist/components/p-a287d016.entry.js +1 -0
  334. package/dist/components/p-a886721b.entry.js +1 -0
  335. package/dist/components/p-a8e75bdc.entry.js +1 -0
  336. package/dist/components/p-al_CUADF.js +1 -0
  337. package/dist/components/p-b5921385.entry.js +1 -0
  338. package/dist/components/p-c2f3cf8b.entry.js +1 -0
  339. package/dist/components/p-ca6a4b08.entry.js +1 -0
  340. package/dist/components/p-e311af0e.entry.js +1 -0
  341. package/dist/components/p-eYTN_sVb.js +1 -0
  342. package/dist/components/p-edfd86c9.entry.js +1 -0
  343. package/dist/components/p-ef419ddf.entry.js +1 -0
  344. package/dist/components/p-efd0223b.entry.js +1 -0
  345. package/dist/components/p-f1abef98.entry.js +1 -0
  346. package/dist/components/p-f23df530.entry.js +1 -0
  347. package/dist/components/p-f37dc3c4.entry.js +1 -0
  348. package/dist/components/p-f793f80a.entry.js +1 -0
  349. package/dist/components/p-y4p55dbx.js +1 -0
  350. package/dist/components/vertex-auto-resize-textarea.d.ts +2 -2
  351. package/dist/components/vertex-auto-resize-textarea.js +1 -6
  352. package/dist/components/vertex-avatar-group.d.ts +2 -2
  353. package/dist/components/vertex-avatar-group.js +1 -34
  354. package/dist/components/vertex-avatar.d.ts +2 -2
  355. package/dist/components/vertex-avatar.js +1 -68
  356. package/dist/components/vertex-badge.d.ts +2 -2
  357. package/dist/components/vertex-badge.js +1 -43
  358. package/dist/components/vertex-banner.d.ts +2 -2
  359. package/dist/components/vertex-banner.js +1 -141
  360. package/dist/components/vertex-button.d.ts +2 -2
  361. package/dist/components/vertex-button.js +1 -96
  362. package/dist/components/vertex-card-group.d.ts +2 -2
  363. package/dist/components/vertex-card-group.js +1 -51
  364. package/dist/components/vertex-card.d.ts +2 -2
  365. package/dist/components/vertex-card.js +1 -49
  366. package/dist/components/vertex-chip.d.ts +2 -2
  367. package/dist/components/vertex-chip.js +1 -45
  368. package/dist/components/vertex-click-to-edit-textfield.d.ts +2 -2
  369. package/dist/components/vertex-click-to-edit-textfield.js +1 -156
  370. package/dist/components/vertex-collapsible.d.ts +2 -2
  371. package/dist/components/vertex-collapsible.js +1 -63
  372. package/dist/components/vertex-color-circle-picker.d.ts +2 -2
  373. package/dist/components/vertex-color-circle-picker.js +1 -131
  374. package/dist/components/vertex-color-picker.d.ts +2 -2
  375. package/dist/components/vertex-color-picker.js +1 -75
  376. package/dist/components/vertex-color-swatch.d.ts +2 -2
  377. package/dist/components/vertex-color-swatch.js +1 -6
  378. package/dist/components/vertex-context-menu.d.ts +2 -2
  379. package/dist/components/vertex-context-menu.js +1 -125
  380. package/dist/components/vertex-dialog.d.ts +2 -2
  381. package/dist/components/vertex-dialog.js +1 -265
  382. package/dist/components/vertex-draggable-popover.d.ts +2 -2
  383. package/dist/components/vertex-draggable-popover.js +1 -119
  384. package/dist/components/vertex-dropdown-menu.d.ts +2 -2
  385. package/dist/components/vertex-dropdown-menu.js +1 -64
  386. package/dist/components/vertex-expandable.d.ts +2 -2
  387. package/dist/components/vertex-expandable.js +1 -6
  388. package/dist/components/vertex-help-tooltip.d.ts +2 -2
  389. package/dist/components/vertex-help-tooltip.js +1 -67
  390. package/dist/components/vertex-icon-button.d.ts +2 -2
  391. package/dist/components/vertex-icon-button.js +1 -6
  392. package/dist/components/vertex-icon.d.ts +2 -2
  393. package/dist/components/vertex-icon.js +1 -6
  394. package/dist/components/vertex-logo-loading.d.ts +2 -2
  395. package/dist/components/vertex-logo-loading.js +1 -34
  396. package/dist/components/vertex-menu-divider.d.ts +2 -2
  397. package/dist/components/vertex-menu-divider.js +1 -34
  398. package/dist/components/vertex-menu-item.d.ts +2 -2
  399. package/dist/components/vertex-menu-item.js +1 -44
  400. package/dist/components/vertex-menu.d.ts +2 -2
  401. package/dist/components/vertex-menu.js +1 -6
  402. package/dist/components/vertex-popover.d.ts +2 -2
  403. package/dist/components/vertex-popover.js +1 -6
  404. package/dist/components/vertex-radio-group.d.ts +2 -2
  405. package/dist/components/vertex-radio-group.js +1 -98
  406. package/dist/components/vertex-radio.d.ts +2 -2
  407. package/dist/components/vertex-radio.js +1 -56
  408. package/dist/components/vertex-resizable.d.ts +2 -2
  409. package/dist/components/vertex-resizable.js +1 -463
  410. package/dist/components/vertex-result-list.d.ts +2 -2
  411. package/dist/components/vertex-result-list.js +1 -6
  412. package/dist/components/vertex-search-bar.d.ts +2 -2
  413. package/dist/components/vertex-search-bar.js +1 -568
  414. package/dist/components/vertex-select.d.ts +2 -2
  415. package/dist/components/vertex-select.js +1 -202
  416. package/dist/components/vertex-slider.d.ts +2 -2
  417. package/dist/components/vertex-slider.js +1 -81
  418. package/dist/components/vertex-spinner.d.ts +2 -2
  419. package/dist/components/vertex-spinner.js +1 -49
  420. package/dist/components/vertex-tab.d.ts +2 -2
  421. package/dist/components/vertex-tab.js +1 -46
  422. package/dist/components/vertex-tabs.d.ts +2 -2
  423. package/dist/components/vertex-tabs.js +1 -133
  424. package/dist/components/vertex-textfield.d.ts +2 -2
  425. package/dist/components/vertex-textfield.js +1 -6
  426. package/dist/components/vertex-toast.d.ts +2 -2
  427. package/dist/components/vertex-toast.js +1 -127
  428. package/dist/components/vertex-toggle.d.ts +2 -2
  429. package/dist/components/vertex-toggle.js +1 -67
  430. package/dist/components/vertex-tooltip.d.ts +2 -2
  431. package/dist/components/vertex-tooltip.js +1 -6
  432. package/dist/esm/components.js +14 -83
  433. package/dist/{components/dom.js → esm/dom-Oz9KwTs0.js} +4 -4
  434. package/dist/esm/icon-helper-Dw0fFePg.js +557 -0
  435. package/dist/esm/index-Beav1bNT.js +92 -0
  436. package/dist/esm/index-C27tS7nl.js +2219 -0
  437. package/dist/esm/index-DYRkgxax.js +60 -0
  438. package/dist/esm/index.js +50 -49
  439. package/dist/esm/{lib-73fbca8b.js → lib-DgySd_r0.js} +2 -2
  440. package/dist/esm/loader.js +6 -14
  441. package/dist/esm/slots-DXuCPm6v.js +26 -0
  442. package/dist/esm/templates-DZ8xV3--.js +228 -0
  443. package/dist/esm/tslib.es6-CIs0DJX1.js +65 -0
  444. package/dist/esm/vertex-auto-resize-textarea.entry.js +136 -3
  445. package/dist/esm/vertex-avatar-group.entry.js +15 -2
  446. package/dist/esm/vertex-avatar.entry.js +47 -3
  447. package/dist/esm/vertex-badge.entry.js +24 -3
  448. package/dist/esm/vertex-banner.entry.js +125 -4
  449. package/dist/esm/vertex-button.entry.js +86 -3
  450. package/dist/esm/vertex-card-group.entry.js +37 -3
  451. package/dist/esm/vertex-card.entry.js +36 -2
  452. package/dist/esm/vertex-chip.entry.js +31 -3
  453. package/dist/esm/vertex-click-to-edit-textfield.entry.js +114 -3
  454. package/dist/esm/vertex-collapsible.entry.js +25 -3
  455. package/dist/esm/vertex-color-circle-picker.entry.js +145 -3
  456. package/dist/esm/vertex-color-picker.entry.js +70 -4
  457. package/dist/esm/vertex-color-swatch.entry.js +144 -4
  458. package/dist/esm/vertex-context-menu.entry.js +93 -2
  459. package/dist/esm/vertex-dialog.entry.js +230 -3
  460. package/dist/esm/vertex-draggable-popover.entry.js +82 -3
  461. package/dist/esm/vertex-dropdown-menu.entry.js +36 -2
  462. package/dist/esm/vertex-expandable.entry.js +104 -3
  463. package/dist/esm/vertex-help-tooltip.entry.js +39 -2
  464. package/dist/esm/vertex-icon-button.entry.js +61 -4
  465. package/dist/esm/vertex-icon.entry.js +32 -4
  466. package/dist/esm/vertex-logo-loading.entry.js +15 -2
  467. package/dist/esm/vertex-menu-divider.entry.js +15 -2
  468. package/dist/esm/vertex-menu-item.entry.js +27 -3
  469. package/dist/esm/vertex-menu.entry.js +83 -3
  470. package/dist/esm/vertex-popover.entry.js +1898 -3
  471. package/dist/esm/vertex-radio-group.entry.js +76 -2
  472. package/dist/esm/vertex-radio.entry.js +32 -3
  473. package/dist/esm/vertex-resizable.entry.js +442 -4
  474. package/dist/esm/vertex-result-list.entry.js +304 -5
  475. package/dist/esm/vertex-search-bar.entry.js +532 -5
  476. package/dist/esm/vertex-select.entry.js +184 -3
  477. package/dist/esm/vertex-slider.entry.js +58 -4
  478. package/dist/esm/vertex-spinner.entry.js +35 -3
  479. package/dist/esm/vertex-tab.entry.js +23 -3
  480. package/dist/esm/vertex-tabs.entry.js +108 -4
  481. package/dist/esm/vertex-textfield.entry.js +149 -3
  482. package/dist/esm/vertex-toast.entry.js +112 -3
  483. package/dist/esm/vertex-toggle.entry.js +50 -3
  484. package/dist/esm/vertex-tooltip.entry.js +347 -6
  485. package/dist/types/components/auto-resize-textarea/auto-resize-textarea.d.ts +43 -43
  486. package/dist/types/components/avatar/avatar.d.ts +33 -33
  487. package/dist/types/components/avatar-group/avatar-group.d.ts +1 -1
  488. package/dist/types/components/badge/badge.d.ts +10 -10
  489. package/dist/types/components/banner/banner.d.ts +50 -50
  490. package/dist/types/components/button/button.d.ts +52 -52
  491. package/dist/types/components/card/card.d.ts +19 -19
  492. package/dist/types/components/card-group/card-group.d.ts +13 -13
  493. package/dist/types/components/chip/chip.d.ts +11 -11
  494. package/dist/types/components/click-to-edit-text-field/click-to-edit-text-field.d.ts +78 -78
  495. package/dist/types/components/collapsible/collapsible.d.ts +10 -10
  496. package/dist/types/components/color-circle-picker/color-circle-picker.d.ts +89 -89
  497. package/dist/types/components/color-picker/color-picker.d.ts +46 -46
  498. package/dist/types/components/color-swatch/color-swatch.d.ts +69 -69
  499. package/dist/types/components/context-menu/context-menu.d.ts +33 -33
  500. package/dist/types/components/dialog/dialog.d.ts +55 -55
  501. package/dist/types/components/draggable-popover/draggable-popover.d.ts +32 -32
  502. package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +22 -22
  503. package/dist/types/components/expandable/expandable.d.ts +58 -58
  504. package/dist/types/components/help-tooltip/help-tooltip.d.ts +22 -22
  505. package/dist/types/components/icon/icon.d.ts +15 -15
  506. package/dist/types/components/icon/icons/adjustments.d.ts +0 -1
  507. package/dist/types/components/icon/icons/align-to-global.d.ts +0 -1
  508. package/dist/types/components/icon/icons/align-to-part.d.ts +0 -1
  509. package/dist/types/components/icon/icons/align-to-surface.d.ts +0 -1
  510. package/dist/types/components/icon/icons/align-view-to-plane.d.ts +0 -1
  511. package/dist/types/components/icon/icons/annotation.d.ts +0 -1
  512. package/dist/types/components/icon/icons/arrow-filled.d.ts +0 -1
  513. package/dist/types/components/icon/icons/arrow-left-circled.d.ts +0 -1
  514. package/dist/types/components/icon/icons/arrow-line-left.d.ts +0 -1
  515. package/dist/types/components/icon/icons/arrow-line-right.d.ts +0 -1
  516. package/dist/types/components/icon/icons/arrow-partial.d.ts +0 -1
  517. package/dist/types/components/icon/icons/arrow-right-circled.d.ts +0 -1
  518. package/dist/types/components/icon/icons/arrow-swap.d.ts +0 -1
  519. package/dist/types/components/icon/icons/arrow-triangle-left.d.ts +0 -1
  520. package/dist/types/components/icon/icons/arrow-triangle-right.d.ts +0 -1
  521. package/dist/types/components/icon/icons/arrow-up-circled.d.ts +0 -1
  522. package/dist/types/components/icon/icons/attachment.d.ts +0 -1
  523. package/dist/types/components/icon/icons/axis-x.d.ts +0 -1
  524. package/dist/types/components/icon/icons/axis-y.d.ts +0 -1
  525. package/dist/types/components/icon/icons/axis-z.d.ts +0 -1
  526. package/dist/types/components/icon/icons/back.d.ts +0 -1
  527. package/dist/types/components/icon/icons/box-cursor.d.ts +0 -1
  528. package/dist/types/components/icon/icons/box-select.d.ts +0 -1
  529. package/dist/types/components/icon/icons/camera-add.d.ts +0 -1
  530. package/dist/types/components/icon/icons/camera.d.ts +0 -1
  531. package/dist/types/components/icon/icons/caret-down.d.ts +0 -1
  532. package/dist/types/components/icon/icons/caret-left.d.ts +0 -1
  533. package/dist/types/components/icon/icons/caret-right.d.ts +0 -1
  534. package/dist/types/components/icon/icons/caret-up.d.ts +0 -1
  535. package/dist/types/components/icon/icons/caution.d.ts +0 -1
  536. package/dist/types/components/icon/icons/check-circle.d.ts +0 -1
  537. package/dist/types/components/icon/icons/check.d.ts +0 -1
  538. package/dist/types/components/icon/icons/chevron-down.d.ts +0 -1
  539. package/dist/types/components/icon/icons/chevron-left.d.ts +0 -1
  540. package/dist/types/components/icon/icons/chevron-right.d.ts +0 -1
  541. package/dist/types/components/icon/icons/chevron-up.d.ts +0 -1
  542. package/dist/types/components/icon/icons/circle-outline.d.ts +0 -1
  543. package/dist/types/components/icon/icons/close-circle-fill.d.ts +0 -1
  544. package/dist/types/components/icon/icons/close-circle.d.ts +0 -1
  545. package/dist/types/components/icon/icons/close.d.ts +0 -1
  546. package/dist/types/components/icon/icons/collapse-all.d.ts +0 -1
  547. package/dist/types/components/icon/icons/columns-add.d.ts +0 -1
  548. package/dist/types/components/icon/icons/columns.d.ts +0 -1
  549. package/dist/types/components/icon/icons/comment-add.d.ts +0 -1
  550. package/dist/types/components/icon/icons/comment-filled.d.ts +0 -1
  551. package/dist/types/components/icon/icons/comment-reopen.d.ts +0 -1
  552. package/dist/types/components/icon/icons/comment-resolve.d.ts +0 -1
  553. package/dist/types/components/icon/icons/comment-show.d.ts +0 -1
  554. package/dist/types/components/icon/icons/compare.d.ts +0 -1
  555. package/dist/types/components/icon/icons/compress.d.ts +0 -1
  556. package/dist/types/components/icon/icons/copy.d.ts +0 -1
  557. package/dist/types/components/icon/icons/cross-section.d.ts +0 -1
  558. package/dist/types/components/icon/icons/cube-orthographic.d.ts +0 -1
  559. package/dist/types/components/icon/icons/cube-perspective.d.ts +0 -1
  560. package/dist/types/components/icon/icons/cube-stack.d.ts +0 -1
  561. package/dist/types/components/icon/icons/delete.d.ts +0 -1
  562. package/dist/types/components/icon/icons/download.d.ts +0 -1
  563. package/dist/types/components/icon/icons/drag-indicator.d.ts +0 -1
  564. package/dist/types/components/icon/icons/ellipse.d.ts +0 -1
  565. package/dist/types/components/icon/icons/error-circle.d.ts +0 -1
  566. package/dist/types/components/icon/icons/expand-all.d.ts +0 -1
  567. package/dist/types/components/icon/icons/expand.d.ts +0 -1
  568. package/dist/types/components/icon/icons/export.d.ts +0 -1
  569. package/dist/types/components/icon/icons/file-folder.d.ts +0 -1
  570. package/dist/types/components/icon/icons/file-pdf.d.ts +0 -1
  571. package/dist/types/components/icon/icons/file.d.ts +0 -1
  572. package/dist/types/components/icon/icons/fit-all.d.ts +0 -1
  573. package/dist/types/components/icon/icons/fit-selected.d.ts +0 -1
  574. package/dist/types/components/icon/icons/flip.d.ts +0 -1
  575. package/dist/types/components/icon/icons/folder-plus.d.ts +0 -1
  576. package/dist/types/components/icon/icons/forward.d.ts +0 -1
  577. package/dist/types/components/icon/icons/gear.d.ts +0 -1
  578. package/dist/types/components/icon/icons/help.d.ts +0 -1
  579. package/dist/types/components/icon/icons/info.d.ts +0 -1
  580. package/dist/types/components/icon/icons/invert.d.ts +0 -1
  581. package/dist/types/components/icon/icons/label-off.d.ts +0 -1
  582. package/dist/types/components/icon/icons/label.d.ts +0 -1
  583. package/dist/types/components/icon/icons/line-dot-left.d.ts +0 -1
  584. package/dist/types/components/icon/icons/line-dot-right.d.ts +0 -1
  585. package/dist/types/components/icon/icons/line-hash-left.d.ts +0 -1
  586. package/dist/types/components/icon/icons/line-hash-right.d.ts +0 -1
  587. package/dist/types/components/icon/icons/line.d.ts +0 -1
  588. package/dist/types/components/icon/icons/locate.d.ts +0 -1
  589. package/dist/types/components/icon/icons/lock-closed.d.ts +0 -1
  590. package/dist/types/components/icon/icons/lock-open.d.ts +0 -1
  591. package/dist/types/components/icon/icons/markup.d.ts +0 -1
  592. package/dist/types/components/icon/icons/menu.d.ts +0 -1
  593. package/dist/types/components/icon/icons/notification.d.ts +0 -1
  594. package/dist/types/components/icon/icons/open-window.d.ts +0 -1
  595. package/dist/types/components/icon/icons/open.d.ts +0 -1
  596. package/dist/types/components/icon/icons/pan.d.ts +0 -1
  597. package/dist/types/components/icon/icons/paper-airplane.d.ts +0 -1
  598. package/dist/types/components/icon/icons/paste.d.ts +0 -1
  599. package/dist/types/components/icon/icons/pencil.d.ts +0 -1
  600. package/dist/types/components/icon/icons/person-height.d.ts +0 -1
  601. package/dist/types/components/icon/icons/person-run.d.ts +0 -1
  602. package/dist/types/components/icon/icons/person-short.d.ts +0 -1
  603. package/dist/types/components/icon/icons/person-tall.d.ts +0 -1
  604. package/dist/types/components/icon/icons/person-walk.d.ts +0 -1
  605. package/dist/types/components/icon/icons/pin-fill.d.ts +0 -1
  606. package/dist/types/components/icon/icons/pin-line.d.ts +0 -1
  607. package/dist/types/components/icon/icons/pin-text-fill.d.ts +0 -1
  608. package/dist/types/components/icon/icons/pin-text-square.d.ts +0 -1
  609. package/dist/types/components/icon/icons/pin-text.d.ts +0 -1
  610. package/dist/types/components/icon/icons/plus-with-arrow.d.ts +0 -1
  611. package/dist/types/components/icon/icons/plus.d.ts +0 -1
  612. package/dist/types/components/icon/icons/pmi.d.ts +0 -1
  613. package/dist/types/components/icon/icons/precise-measurement.d.ts +0 -1
  614. package/dist/types/components/icon/icons/rabbit.d.ts +0 -1
  615. package/dist/types/components/icon/icons/refresh.d.ts +0 -1
  616. package/dist/types/components/icon/icons/rename.d.ts +0 -1
  617. package/dist/types/components/icon/icons/report.d.ts +0 -1
  618. package/dist/types/components/icon/icons/reset.d.ts +0 -1
  619. package/dist/types/components/icon/icons/resize.d.ts +0 -1
  620. package/dist/types/components/icon/icons/rotate.d.ts +0 -1
  621. package/dist/types/components/icon/icons/ruler.d.ts +0 -1
  622. package/dist/types/components/icon/icons/scissors.d.ts +0 -1
  623. package/dist/types/components/icon/icons/search.d.ts +0 -1
  624. package/dist/types/components/icon/icons/show-only-nearby.d.ts +0 -1
  625. package/dist/types/components/icon/icons/snapshots.d.ts +0 -1
  626. package/dist/types/components/icon/icons/square-dot-outline.d.ts +0 -1
  627. package/dist/types/components/icon/icons/star.d.ts +0 -1
  628. package/dist/types/components/icon/icons/tag.d.ts +0 -1
  629. package/dist/types/components/icon/icons/tape-measure.d.ts +0 -1
  630. package/dist/types/components/icon/icons/teleport-and-align.d.ts +0 -1
  631. package/dist/types/components/icon/icons/teleport-toward.d.ts +0 -1
  632. package/dist/types/components/icon/icons/teleport.d.ts +0 -1
  633. package/dist/types/components/icon/icons/triad.d.ts +0 -1
  634. package/dist/types/components/icon/icons/turtle.d.ts +0 -1
  635. package/dist/types/components/icon/icons/update.d.ts +0 -1
  636. package/dist/types/components/icon/icons/version-history.d.ts +0 -1
  637. package/dist/types/components/icon/icons/views.d.ts +0 -1
  638. package/dist/types/components/icon/icons/visibility-hidden.d.ts +0 -1
  639. package/dist/types/components/icon/icons/visibility-partial.d.ts +0 -1
  640. package/dist/types/components/icon/icons/visibility-visible.d.ts +0 -1
  641. package/dist/types/components/icon/icons/workspace-add.d.ts +0 -1
  642. package/dist/types/components/icon/icons/zoom.d.ts +0 -1
  643. package/dist/types/components/icon-button/icon-button.d.ts +36 -36
  644. package/dist/types/components/logo-loading/logo-loading.d.ts +1 -1
  645. package/dist/types/components/menu/menu.d.ts +53 -53
  646. package/dist/types/components/menu-divider/menu-divider.d.ts +1 -1
  647. package/dist/types/components/menu-item/menu-item.d.ts +6 -6
  648. package/dist/types/components/popover/popover.d.ts +156 -156
  649. package/dist/types/components/radio/radio.d.ts +28 -28
  650. package/dist/types/components/radio-group/radio-group.d.ts +23 -23
  651. package/dist/types/components/resizable/resizable.d.ts +161 -161
  652. package/dist/types/components/result-list/result-list.d.ts +42 -42
  653. package/dist/types/components/result-list/types.d.ts +2 -2
  654. package/dist/types/components/search-bar/lib.d.ts +5 -5
  655. package/dist/types/components/search-bar/search-bar.d.ts +144 -144
  656. package/dist/types/components/select/select.d.ts +65 -65
  657. package/dist/types/components/slider/slider.d.ts +44 -44
  658. package/dist/types/components/spinner/spinner.d.ts +11 -11
  659. package/dist/types/components/tab/tab.d.ts +8 -8
  660. package/dist/types/components/tabs/tabs.d.ts +20 -20
  661. package/dist/types/components/text-field/text-field.d.ts +112 -112
  662. package/dist/types/components/toast/toast.d.ts +50 -50
  663. package/dist/types/components/toggle/toggle.d.ts +17 -17
  664. package/dist/types/components/tooltip/tooltip.d.ts +60 -60
  665. package/dist/types/components.d.ts +970 -90
  666. package/dist/types/stencil-public-runtime.d.ts +257 -34
  667. package/dist/types/types/icon.d.ts +137 -137
  668. package/dist/types/types/point.d.ts +2 -2
  669. package/dist/types/util/components/slots.d.ts +3 -3
  670. package/dist/types/util/templates/binding.d.ts +20 -20
  671. package/dist/types/util/templates/disposable.d.ts +4 -4
  672. package/dist/types/util/templates/element-pool.d.ts +19 -19
  673. package/dist/types/util/templates/templates.d.ts +2 -2
  674. package/loader/cdn.js +1 -3
  675. package/loader/index.cjs.js +1 -3
  676. package/loader/index.d.ts +5 -2
  677. package/loader/index.es2017.js +1 -3
  678. package/loader/index.js +1 -3
  679. package/package.json +61 -36
  680. package/dist/cjs/auto-resize-textarea-deb05359.js +0 -137
  681. package/dist/cjs/avatar-e69bb687.js +0 -45
  682. package/dist/cjs/avatar-group-d2af53e4.js +0 -17
  683. package/dist/cjs/badge-d39ac1fc.js +0 -23
  684. package/dist/cjs/banner-8325d5ca.js +0 -104
  685. package/dist/cjs/button-e63d25b1.js +0 -70
  686. package/dist/cjs/card-ae9e8a8f.js +0 -30
  687. package/dist/cjs/card-group-da93e610.js +0 -30
  688. package/dist/cjs/chip-a3b2e8e0.js +0 -25
  689. package/dist/cjs/click-to-edit-text-field-2c87ee66.js +0 -105
  690. package/dist/cjs/collapsible-50ea984c.js +0 -25
  691. package/dist/cjs/color-circle-picker-b0927289.js +0 -82
  692. package/dist/cjs/color-picker-6aa97d3b.js +0 -47
  693. package/dist/cjs/color-swatch-6d98da5f.js +0 -95
  694. package/dist/cjs/context-menu-664922cd.js +0 -91
  695. package/dist/cjs/dialog-34244fe1.js +0 -225
  696. package/dist/cjs/dom-ff96a4bc.js +0 -75
  697. package/dist/cjs/draggable-popover-125717a7.js +0 -83
  698. package/dist/cjs/dropdown-menu-5ae03a72.js +0 -31
  699. package/dist/cjs/expandable-b1cd4f0b.js +0 -72
  700. package/dist/cjs/help-tooltip-f72eccc7.js +0 -34
  701. package/dist/cjs/icon-ab3e2b83.js +0 -26
  702. package/dist/cjs/icon-button-9a6314cd.js +0 -43
  703. package/dist/cjs/icon-helper-b2117772.js +0 -785
  704. package/dist/cjs/index-6a92256c.js +0 -2152
  705. package/dist/cjs/index-e1b40fa6.js +0 -91
  706. package/dist/cjs/logo-loading-4d49fedf.js +0 -17
  707. package/dist/cjs/menu-bfc03108.js +0 -74
  708. package/dist/cjs/menu-divider-5bdebe5d.js +0 -17
  709. package/dist/cjs/menu-item-d213fd4d.js +0 -25
  710. package/dist/cjs/popover-942209b8.js +0 -1706
  711. package/dist/cjs/radio-bff991d2.js +0 -34
  712. package/dist/cjs/radio-group-11ecf8bf.js +0 -78
  713. package/dist/cjs/resizable-c0a69532.js +0 -423
  714. package/dist/cjs/result-list-241ffe8d.js +0 -304
  715. package/dist/cjs/search-bar-2e7ee35a.js +0 -527
  716. package/dist/cjs/select-554f3c11.js +0 -163
  717. package/dist/cjs/shadow-css-8eb74fbb.js +0 -389
  718. package/dist/cjs/slider-7714cccb.js +0 -44
  719. package/dist/cjs/slots-fb5ac359.js +0 -29
  720. package/dist/cjs/spinner-bb990a42.js +0 -29
  721. package/dist/cjs/tab-4335cd8f.js +0 -26
  722. package/dist/cjs/tabs-6f3e76e1.js +0 -111
  723. package/dist/cjs/templates-e7b3ffbb.js +0 -230
  724. package/dist/cjs/text-field-bccbde1f.js +0 -133
  725. package/dist/cjs/toast-bee7f47b.js +0 -90
  726. package/dist/cjs/toggle-a5dde469.js +0 -40
  727. package/dist/cjs/tooltip-634eb8c9.js +0 -333
  728. package/dist/cjs/tslib.es6-838fd860.js +0 -68
  729. package/dist/components/auto-resize-textarea.js +0 -157
  730. package/dist/components/color-swatch.js +0 -124
  731. package/dist/components/expandable.js +0 -100
  732. package/dist/components/icon-button.js +0 -63
  733. package/dist/components/icon-helper.js +0 -783
  734. package/dist/components/icon.js +0 -43
  735. package/dist/components/index2.js +0 -89
  736. package/dist/components/menu.js +0 -103
  737. package/dist/components/p-01d4be1d.entry.js +0 -1
  738. package/dist/components/p-0541e2b0.js +0 -1
  739. package/dist/components/p-09ba50c3.js +0 -1
  740. package/dist/components/p-0b4406fa.entry.js +0 -1
  741. package/dist/components/p-0de26b21.entry.js +0 -1
  742. package/dist/components/p-0e628c05.js +0 -1
  743. package/dist/components/p-16fc9e9a.entry.js +0 -1
  744. package/dist/components/p-18ed73e9.js +0 -1
  745. package/dist/components/p-1e645c1f.js +0 -1
  746. package/dist/components/p-211c1186.entry.js +0 -1
  747. package/dist/components/p-226e83a6.entry.js +0 -1
  748. package/dist/components/p-22ec9b78.entry.js +0 -1
  749. package/dist/components/p-24c72960.entry.js +0 -1
  750. package/dist/components/p-2930bcb0.entry.js +0 -1
  751. package/dist/components/p-29d7697f.js +0 -1
  752. package/dist/components/p-2ae8175d.entry.js +0 -1
  753. package/dist/components/p-2cff3285.js +0 -1
  754. package/dist/components/p-33400eed.entry.js +0 -1
  755. package/dist/components/p-3508048d.js +0 -12
  756. package/dist/components/p-36c853c4.js +0 -1
  757. package/dist/components/p-39133bc7.js +0 -1
  758. package/dist/components/p-3b794014.entry.js +0 -1
  759. package/dist/components/p-3dd08a0f.js +0 -1
  760. package/dist/components/p-406e73da.entry.js +0 -1
  761. package/dist/components/p-407430fe.entry.js +0 -1
  762. package/dist/components/p-41ced35c.entry.js +0 -1
  763. package/dist/components/p-43b1b3f9.js +0 -1
  764. package/dist/components/p-48629bf1.js +0 -1
  765. package/dist/components/p-4e3ba3df.entry.js +0 -1
  766. package/dist/components/p-53515813.entry.js +0 -1
  767. package/dist/components/p-5366a759.entry.js +0 -1
  768. package/dist/components/p-573b8ec6.entry.js +0 -1
  769. package/dist/components/p-59fb829f.js +0 -1
  770. package/dist/components/p-5fb1724f.js +0 -1
  771. package/dist/components/p-606596de.entry.js +0 -1
  772. package/dist/components/p-65f9817e.js +0 -1
  773. package/dist/components/p-6834631c.js +0 -2
  774. package/dist/components/p-69375605.entry.js +0 -1
  775. package/dist/components/p-6a49c365.entry.js +0 -1
  776. package/dist/components/p-6a640a2c.js +0 -1
  777. package/dist/components/p-6b6c2260.js +0 -1
  778. package/dist/components/p-6b862967.js +0 -1
  779. package/dist/components/p-6d4f055b.entry.js +0 -1
  780. package/dist/components/p-756c9977.entry.js +0 -1
  781. package/dist/components/p-7ace7800.entry.js +0 -1
  782. package/dist/components/p-7e6ca4fb.entry.js +0 -1
  783. package/dist/components/p-80c989fa.entry.js +0 -1
  784. package/dist/components/p-817bf6ff.js +0 -1
  785. package/dist/components/p-81cb4da4.js +0 -1
  786. package/dist/components/p-8a52767f.js +0 -1
  787. package/dist/components/p-8b211d6f.js +0 -1
  788. package/dist/components/p-8c69bb83.js +0 -1
  789. package/dist/components/p-8d83dfff.entry.js +0 -1
  790. package/dist/components/p-8fe0084d.js +0 -1
  791. package/dist/components/p-90931a94.js +0 -1
  792. package/dist/components/p-90b4e04b.js +0 -1
  793. package/dist/components/p-90cf31d2.js +0 -1
  794. package/dist/components/p-91123ff6.entry.js +0 -1
  795. package/dist/components/p-95358d00.entry.js +0 -1
  796. package/dist/components/p-96f55673.js +0 -1
  797. package/dist/components/p-988058f9.js +0 -1
  798. package/dist/components/p-9c384f6c.entry.js +0 -1
  799. package/dist/components/p-a2018217.entry.js +0 -1
  800. package/dist/components/p-a3c04bbd.js +0 -1
  801. package/dist/components/p-a6614625.js +0 -1
  802. package/dist/components/p-bca6275a.entry.js +0 -1
  803. package/dist/components/p-bec53c3a.js +0 -1
  804. package/dist/components/p-c2706288.js +0 -1
  805. package/dist/components/p-c2c076f1.js +0 -1
  806. package/dist/components/p-c3ec6642.js +0 -19
  807. package/dist/components/p-c8ab09fb.js +0 -1
  808. package/dist/components/p-c939fa4e.js +0 -1
  809. package/dist/components/p-c9a967d9.js +0 -1
  810. package/dist/components/p-cc2e3192.entry.js +0 -1
  811. package/dist/components/p-d7c0c287.entry.js +0 -1
  812. package/dist/components/p-dfe98f07.entry.js +0 -1
  813. package/dist/components/p-e3d0c2d1.entry.js +0 -1
  814. package/dist/components/p-e3ea44b2.js +0 -1
  815. package/dist/components/p-ea8f3750.entry.js +0 -1
  816. package/dist/components/p-ec7be8df.js +0 -1
  817. package/dist/components/p-ee496965.entry.js +0 -1
  818. package/dist/components/p-f2bc7ec5.js +0 -1
  819. package/dist/components/p-f55574fb.js +0 -1
  820. package/dist/components/p-f6f2bc86.entry.js +0 -1
  821. package/dist/components/p-fe062eb0.js +0 -7
  822. package/dist/components/p-fe7e7a74.entry.js +0 -1
  823. package/dist/components/p-fedcc21e.js +0 -1
  824. package/dist/components/p-ff4a1c3a.js +0 -1
  825. package/dist/components/popover.js +0 -1737
  826. package/dist/components/result-list.js +0 -565
  827. package/dist/components/slots.js +0 -26
  828. package/dist/components/text-field.js +0 -171
  829. package/dist/components/tooltip.js +0 -360
  830. package/dist/components/tslib.es6.js +0 -65
  831. package/dist/esm/auto-resize-textarea-087fecdb.js +0 -135
  832. package/dist/esm/avatar-775455a5.js +0 -43
  833. package/dist/esm/avatar-group-e5ca86bf.js +0 -15
  834. package/dist/esm/badge-6d27ca92.js +0 -21
  835. package/dist/esm/banner-b292060d.js +0 -102
  836. package/dist/esm/button-81207236.js +0 -68
  837. package/dist/esm/card-1e8790aa.js +0 -28
  838. package/dist/esm/card-group-4e8e0421.js +0 -28
  839. package/dist/esm/chip-4e568eee.js +0 -23
  840. package/dist/esm/click-to-edit-text-field-d9b27cd0.js +0 -103
  841. package/dist/esm/collapsible-b52960e6.js +0 -23
  842. package/dist/esm/color-circle-picker-c4e92fea.js +0 -80
  843. package/dist/esm/color-picker-b292ad8d.js +0 -45
  844. package/dist/esm/color-swatch-ab647632.js +0 -93
  845. package/dist/esm/context-menu-12f1afe1.js +0 -89
  846. package/dist/esm/dialog-c69d9152.js +0 -223
  847. package/dist/esm/dom-64053c71.js +0 -73
  848. package/dist/esm/dom-9d0f7bf4.js +0 -13
  849. package/dist/esm/draggable-popover-9f9b7c97.js +0 -81
  850. package/dist/esm/dropdown-menu-1598ba20.js +0 -29
  851. package/dist/esm/expandable-b487cb00.js +0 -70
  852. package/dist/esm/help-tooltip-c2f0d996.js +0 -32
  853. package/dist/esm/icon-390b9402.js +0 -24
  854. package/dist/esm/icon-button-552e31fe.js +0 -41
  855. package/dist/esm/icon-helper-7437b548.js +0 -783
  856. package/dist/esm/index-72f28b71.js +0 -2118
  857. package/dist/esm/index-9c609209.js +0 -89
  858. package/dist/esm/logo-loading-3c7fa23d.js +0 -15
  859. package/dist/esm/menu-49420f98.js +0 -72
  860. package/dist/esm/menu-divider-87c888cb.js +0 -15
  861. package/dist/esm/menu-item-c33aa9dd.js +0 -23
  862. package/dist/esm/polyfills/core-js.js +0 -11
  863. package/dist/esm/polyfills/css-shim.js +0 -1
  864. package/dist/esm/polyfills/dom.js +0 -79
  865. package/dist/esm/polyfills/es5-html-element.js +0 -1
  866. package/dist/esm/polyfills/index.js +0 -34
  867. package/dist/esm/polyfills/system.js +0 -6
  868. package/dist/esm/popover-6e806354.js +0 -1704
  869. package/dist/esm/radio-39c11ba4.js +0 -32
  870. package/dist/esm/radio-group-2f5467b5.js +0 -76
  871. package/dist/esm/resizable-833336bf.js +0 -421
  872. package/dist/esm/result-list-16c6afbd.js +0 -302
  873. package/dist/esm/search-bar-8d18626e.js +0 -525
  874. package/dist/esm/select-66bb59f8.js +0 -161
  875. package/dist/esm/shadow-css-008a49f5.js +0 -387
  876. package/dist/esm/slider-3d8545e3.js +0 -42
  877. package/dist/esm/slots-fbb5afb3.js +0 -26
  878. package/dist/esm/spinner-afccea51.js +0 -27
  879. package/dist/esm/tab-c76332b0.js +0 -24
  880. package/dist/esm/tabs-e9f6dcbe.js +0 -109
  881. package/dist/esm/templates-797420bf.js +0 -228
  882. package/dist/esm/text-field-32ac877e.js +0 -131
  883. package/dist/esm/toast-255648ff.js +0 -88
  884. package/dist/esm/tooltip-bed548f4.js +0 -331
  885. package/dist/esm/tslib.es6-99cd0de8.js +0 -65
  886. package/loader/package.json +0 -11
  887. /package/dist/components/{p-b2c7b113.js → p-DXuCPm6v.js} +0 -0
  888. /package/dist/components/{p-3438c441.js → p-DgySd_r0.js} +0 -0
@@ -1,2118 +0,0 @@
1
- const NAMESPACE = 'components';
2
-
3
- /**
4
- * Virtual DOM patching algorithm based on Snabbdom by
5
- * Simon Friis Vindum (@paldepind)
6
- * Licensed under the MIT License
7
- * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
8
- *
9
- * Modified for Stencil's renderer and slot projection
10
- */
11
- let scopeId;
12
- let contentRef;
13
- let hostTagName;
14
- let useNativeShadowDom = false;
15
- let checkSlotFallbackVisibility = false;
16
- let checkSlotRelocate = false;
17
- let isSvgMode = false;
18
- let queuePending = false;
19
- const createTime = (fnName, tagName = '') => {
20
- {
21
- return () => {
22
- return;
23
- };
24
- }
25
- };
26
- const uniqueTime = (key, measureText) => {
27
- {
28
- return () => {
29
- return;
30
- };
31
- }
32
- };
33
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
34
- const XLINK_NS = 'http://www.w3.org/1999/xlink';
35
- /**
36
- * Default style mode id
37
- */
38
- /**
39
- * Reusable empty obj/array
40
- * Don't add values to these!!
41
- */
42
- const EMPTY_OBJ = {};
43
- /**
44
- * Namespaces
45
- */
46
- const SVG_NS = 'http://www.w3.org/2000/svg';
47
- const HTML_NS = 'http://www.w3.org/1999/xhtml';
48
- const isDef = (v) => v != null;
49
- const isComplexType = (o) => {
50
- // https://jsperf.com/typeof-fn-object/5
51
- o = typeof o;
52
- return o === 'object' || o === 'function';
53
- };
54
- /**
55
- * Helper method for querying a `meta` tag that contains a nonce value
56
- * out of a DOM's head.
57
- *
58
- * @param doc The DOM containing the `head` to query against
59
- * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
60
- * exists or the tag has no content.
61
- */
62
- function queryNonceMetaTagContent(doc) {
63
- var _a, _b, _c;
64
- return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
65
- }
66
- /**
67
- * Production h() function based on Preact by
68
- * Jason Miller (@developit)
69
- * Licensed under the MIT License
70
- * https://github.com/developit/preact/blob/master/LICENSE
71
- *
72
- * Modified for Stencil's compiler and vdom
73
- */
74
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
75
- // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
76
- const h = (nodeName, vnodeData, ...children) => {
77
- let child = null;
78
- let key = null;
79
- let slotName = null;
80
- let simple = false;
81
- let lastSimple = false;
82
- const vNodeChildren = [];
83
- const walk = (c) => {
84
- for (let i = 0; i < c.length; i++) {
85
- child = c[i];
86
- if (Array.isArray(child)) {
87
- walk(child);
88
- }
89
- else if (child != null && typeof child !== 'boolean') {
90
- if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
91
- child = String(child);
92
- }
93
- if (simple && lastSimple) {
94
- // If the previous child was simple (string), we merge both
95
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
96
- }
97
- else {
98
- // Append a new vNode, if it's text, we create a text vNode
99
- vNodeChildren.push(simple ? newVNode(null, child) : child);
100
- }
101
- lastSimple = simple;
102
- }
103
- }
104
- };
105
- walk(children);
106
- if (vnodeData) {
107
- // normalize class / classname attributes
108
- if (vnodeData.key) {
109
- key = vnodeData.key;
110
- }
111
- if (vnodeData.name) {
112
- slotName = vnodeData.name;
113
- }
114
- {
115
- const classData = vnodeData.className || vnodeData.class;
116
- if (classData) {
117
- vnodeData.class =
118
- typeof classData !== 'object'
119
- ? classData
120
- : Object.keys(classData)
121
- .filter((k) => classData[k])
122
- .join(' ');
123
- }
124
- }
125
- }
126
- if (typeof nodeName === 'function') {
127
- // nodeName is a functional component
128
- return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
129
- }
130
- const vnode = newVNode(nodeName, null);
131
- vnode.$attrs$ = vnodeData;
132
- if (vNodeChildren.length > 0) {
133
- vnode.$children$ = vNodeChildren;
134
- }
135
- {
136
- vnode.$key$ = key;
137
- }
138
- {
139
- vnode.$name$ = slotName;
140
- }
141
- return vnode;
142
- };
143
- /**
144
- * A utility function for creating a virtual DOM node from a tag and some
145
- * possible text content.
146
- *
147
- * @param tag the tag for this element
148
- * @param text possible text content for the node
149
- * @returns a newly-minted virtual DOM node
150
- */
151
- const newVNode = (tag, text) => {
152
- const vnode = {
153
- $flags$: 0,
154
- $tag$: tag,
155
- $text$: text,
156
- $elm$: null,
157
- $children$: null,
158
- };
159
- {
160
- vnode.$attrs$ = null;
161
- }
162
- {
163
- vnode.$key$ = null;
164
- }
165
- {
166
- vnode.$name$ = null;
167
- }
168
- return vnode;
169
- };
170
- const Host = {};
171
- /**
172
- * Check whether a given node is a Host node or not
173
- *
174
- * @param node the virtual DOM node to check
175
- * @returns whether it's a Host node or not
176
- */
177
- const isHost = (node) => node && node.$tag$ === Host;
178
- /**
179
- * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
180
- *
181
- * Note that these functions convert from {@link d.VNode} to
182
- * {@link d.ChildNode} to give functional component developers a friendly
183
- * interface.
184
- */
185
- const vdomFnUtils = {
186
- forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
187
- map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
188
- };
189
- /**
190
- * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
191
- * friendlier public interface (hence, 'convertToPublic').
192
- *
193
- * @param node the virtual DOM node to convert
194
- * @returns a converted child node
195
- */
196
- const convertToPublic = (node) => ({
197
- vattrs: node.$attrs$,
198
- vchildren: node.$children$,
199
- vkey: node.$key$,
200
- vname: node.$name$,
201
- vtag: node.$tag$,
202
- vtext: node.$text$,
203
- });
204
- /**
205
- * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
206
- * order to use the resulting object in the virtual DOM. The initial object was
207
- * likely created as part of presenting a public API, so converting it back
208
- * involved making it 'private' again (hence, `convertToPrivate`).
209
- *
210
- * @param node the child node to convert
211
- * @returns a converted virtual DOM node
212
- */
213
- const convertToPrivate = (node) => {
214
- if (typeof node.vtag === 'function') {
215
- const vnodeData = Object.assign({}, node.vattrs);
216
- if (node.vkey) {
217
- vnodeData.key = node.vkey;
218
- }
219
- if (node.vname) {
220
- vnodeData.name = node.vname;
221
- }
222
- return h(node.vtag, vnodeData, ...(node.vchildren || []));
223
- }
224
- const vnode = newVNode(node.vtag, node.vtext);
225
- vnode.$attrs$ = node.vattrs;
226
- vnode.$children$ = node.vchildren;
227
- vnode.$key$ = node.vkey;
228
- vnode.$name$ = node.vname;
229
- return vnode;
230
- };
231
- /**
232
- * Parse a new property value for a given property type.
233
- *
234
- * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
235
- * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
236
- * 1. `any`, the type given to `propValue` in the function signature
237
- * 2. the type stored from `propType`.
238
- *
239
- * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
240
- *
241
- * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
242
- * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
243
- * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
244
- * ```tsx
245
- * <my-cmp prop-val={0}></my-cmp>
246
- * ```
247
- *
248
- * HTML prop values on the other hand, will always a string
249
- *
250
- * @param propValue the new value to coerce to some type
251
- * @param propType the type of the prop, expressed as a binary number
252
- * @returns the parsed/coerced value
253
- */
254
- const parsePropertyValue = (propValue, propType) => {
255
- // ensure this value is of the correct prop type
256
- if (propValue != null && !isComplexType(propValue)) {
257
- if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
258
- // per the HTML spec, any string value means it is a boolean true value
259
- // but we'll cheat here and say that the string "false" is the boolean false
260
- return propValue === 'false' ? false : propValue === '' || !!propValue;
261
- }
262
- if (propType & 2 /* MEMBER_FLAGS.Number */) {
263
- // force it to be a number
264
- return parseFloat(propValue);
265
- }
266
- if (propType & 1 /* MEMBER_FLAGS.String */) {
267
- // could have been passed as a number or boolean
268
- // but we still want it as a string
269
- return String(propValue);
270
- }
271
- // redundant return here for better minification
272
- return propValue;
273
- }
274
- // not sure exactly what type we want
275
- // so no need to change to a different type
276
- return propValue;
277
- };
278
- const getElement = (ref) => (getHostRef(ref).$hostElement$ );
279
- const createEvent = (ref, name, flags) => {
280
- const elm = getElement(ref);
281
- return {
282
- emit: (detail) => {
283
- return emitEvent(elm, name, {
284
- bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
285
- composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
286
- cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
287
- detail,
288
- });
289
- },
290
- };
291
- };
292
- /**
293
- * Helper function to create & dispatch a custom Event on a provided target
294
- * @param elm the target of the Event
295
- * @param name the name to give the custom Event
296
- * @param opts options for configuring a custom Event
297
- * @returns the custom Event
298
- */
299
- const emitEvent = (elm, name, opts) => {
300
- const ev = plt.ce(name, opts);
301
- elm.dispatchEvent(ev);
302
- return ev;
303
- };
304
- const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
305
- const registerStyle = (scopeId, cssText, allowCS) => {
306
- let style = styles.get(scopeId);
307
- if (supportsConstructableStylesheets && allowCS) {
308
- style = (style || new CSSStyleSheet());
309
- if (typeof style === 'string') {
310
- style = cssText;
311
- }
312
- else {
313
- style.replaceSync(cssText);
314
- }
315
- }
316
- else {
317
- style = cssText;
318
- }
319
- styles.set(scopeId, style);
320
- };
321
- const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
322
- var _a;
323
- let scopeId = getScopeId(cmpMeta);
324
- const style = styles.get(scopeId);
325
- // if an element is NOT connected then getRootNode() will return the wrong root node
326
- // so the fallback is to always use the document for the root node in those cases
327
- styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
328
- if (style) {
329
- if (typeof style === 'string') {
330
- styleContainerNode = styleContainerNode.head || styleContainerNode;
331
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
332
- let styleElm;
333
- if (!appliedStyles) {
334
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
335
- }
336
- if (!appliedStyles.has(scopeId)) {
337
- {
338
- {
339
- styleElm = doc.createElement('style');
340
- styleElm.innerHTML = style;
341
- }
342
- // Apply CSP nonce to the style tag if it exists
343
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
344
- if (nonce != null) {
345
- styleElm.setAttribute('nonce', nonce);
346
- }
347
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
348
- }
349
- if (appliedStyles) {
350
- appliedStyles.add(scopeId);
351
- }
352
- }
353
- }
354
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
355
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
356
- }
357
- }
358
- return scopeId;
359
- };
360
- const attachStyles = (hostRef) => {
361
- const cmpMeta = hostRef.$cmpMeta$;
362
- const elm = hostRef.$hostElement$;
363
- const flags = cmpMeta.$flags$;
364
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
365
- const scopeId = addStyle(supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
366
- if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
367
- // only required when we're NOT using native shadow dom (slot)
368
- // or this browser doesn't support native shadow dom
369
- // and this host element was NOT created with SSR
370
- // let's pick out the inner content for slot projection
371
- // create a node to represent where the original
372
- // content was first placed, which is useful later on
373
- // DOM WRITE!!
374
- elm['s-sc'] = scopeId;
375
- elm.classList.add(scopeId + '-h');
376
- if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
377
- elm.classList.add(scopeId + '-s');
378
- }
379
- }
380
- endAttachStyles();
381
- };
382
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
383
- /**
384
- * Production setAccessor() function based on Preact by
385
- * Jason Miller (@developit)
386
- * Licensed under the MIT License
387
- * https://github.com/developit/preact/blob/master/LICENSE
388
- *
389
- * Modified for Stencil's compiler and vdom
390
- */
391
- const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
392
- if (oldValue !== newValue) {
393
- let isProp = isMemberInElement(elm, memberName);
394
- let ln = memberName.toLowerCase();
395
- if (memberName === 'class') {
396
- const classList = elm.classList;
397
- const oldClasses = parseClassList(oldValue);
398
- const newClasses = parseClassList(newValue);
399
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
400
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
401
- }
402
- else if (memberName === 'style') {
403
- // update style attribute, css properties and values
404
- {
405
- for (const prop in oldValue) {
406
- if (!newValue || newValue[prop] == null) {
407
- if (prop.includes('-')) {
408
- elm.style.removeProperty(prop);
409
- }
410
- else {
411
- elm.style[prop] = '';
412
- }
413
- }
414
- }
415
- }
416
- for (const prop in newValue) {
417
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
418
- if (prop.includes('-')) {
419
- elm.style.setProperty(prop, newValue[prop]);
420
- }
421
- else {
422
- elm.style[prop] = newValue[prop];
423
- }
424
- }
425
- }
426
- }
427
- else if (memberName === 'key')
428
- ;
429
- else if (memberName === 'ref') {
430
- // minifier will clean this up
431
- if (newValue) {
432
- newValue(elm);
433
- }
434
- }
435
- else if ((!isProp ) &&
436
- memberName[0] === 'o' &&
437
- memberName[1] === 'n') {
438
- // Event Handlers
439
- // so if the member name starts with "on" and the 3rd characters is
440
- // a capital letter, and it's not already a member on the element,
441
- // then we're assuming it's an event listener
442
- if (memberName[2] === '-') {
443
- // on- prefixed events
444
- // allows to be explicit about the dom event to listen without any magic
445
- // under the hood:
446
- // <my-cmp on-click> // listens for "click"
447
- // <my-cmp on-Click> // listens for "Click"
448
- // <my-cmp on-ionChange> // listens for "ionChange"
449
- // <my-cmp on-EVENTS> // listens for "EVENTS"
450
- memberName = memberName.slice(3);
451
- }
452
- else if (isMemberInElement(win, ln)) {
453
- // standard event
454
- // the JSX attribute could have been "onMouseOver" and the
455
- // member name "onmouseover" is on the window's prototype
456
- // so let's add the listener "mouseover", which is all lowercased
457
- memberName = ln.slice(2);
458
- }
459
- else {
460
- // custom event
461
- // the JSX attribute could have been "onMyCustomEvent"
462
- // so let's trim off the "on" prefix and lowercase the first character
463
- // and add the listener "myCustomEvent"
464
- // except for the first character, we keep the event name case
465
- memberName = ln[2] + memberName.slice(3);
466
- }
467
- if (oldValue) {
468
- plt.rel(elm, memberName, oldValue, false);
469
- }
470
- if (newValue) {
471
- plt.ael(elm, memberName, newValue, false);
472
- }
473
- }
474
- else {
475
- // Set property if it exists and it's not a SVG
476
- const isComplex = isComplexType(newValue);
477
- if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
478
- try {
479
- if (!elm.tagName.includes('-')) {
480
- const n = newValue == null ? '' : newValue;
481
- // Workaround for Safari, moving the <input> caret when re-assigning the same valued
482
- if (memberName === 'list') {
483
- isProp = false;
484
- }
485
- else if (oldValue == null || elm[memberName] != n) {
486
- elm[memberName] = n;
487
- }
488
- }
489
- else {
490
- elm[memberName] = newValue;
491
- }
492
- }
493
- catch (e) { }
494
- }
495
- /**
496
- * Need to manually update attribute if:
497
- * - memberName is not an attribute
498
- * - if we are rendering the host element in order to reflect attribute
499
- * - if it's a SVG, since properties might not work in <svg>
500
- * - if the newValue is null/undefined or 'false'.
501
- */
502
- let xlink = false;
503
- {
504
- if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
505
- memberName = ln;
506
- xlink = true;
507
- }
508
- }
509
- if (newValue == null || newValue === false) {
510
- if (newValue !== false || elm.getAttribute(memberName) === '') {
511
- if (xlink) {
512
- elm.removeAttributeNS(XLINK_NS, memberName);
513
- }
514
- else {
515
- elm.removeAttribute(memberName);
516
- }
517
- }
518
- }
519
- else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
520
- newValue = newValue === true ? '' : newValue;
521
- if (xlink) {
522
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
523
- }
524
- else {
525
- elm.setAttribute(memberName, newValue);
526
- }
527
- }
528
- }
529
- }
530
- };
531
- const parseClassListRegex = /\s/;
532
- const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
533
- const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
534
- // if the element passed in is a shadow root, which is a document fragment
535
- // then we want to be adding attrs/props to the shadow root's "host" element
536
- // if it's not a shadow root, then we add attrs/props to the same element
537
- const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
538
- ? newVnode.$elm$.host
539
- : newVnode.$elm$;
540
- const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
541
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
542
- {
543
- // remove attributes no longer present on the vnode by setting them to undefined
544
- for (memberName in oldVnodeAttrs) {
545
- if (!(memberName in newVnodeAttrs)) {
546
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
547
- }
548
- }
549
- }
550
- // add new & update changed attributes
551
- for (memberName in newVnodeAttrs) {
552
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
553
- }
554
- };
555
- /**
556
- * Create a DOM Node corresponding to one of the children of a given VNode.
557
- *
558
- * @param oldParentVNode the parent VNode from the previous render
559
- * @param newParentVNode the parent VNode from the current render
560
- * @param childIndex the index of the VNode, in the _new_ parent node's
561
- * children, for which we will create a new DOM node
562
- * @param parentElm the parent DOM node which our new node will be a child of
563
- * @returns the newly created node
564
- */
565
- const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
566
- // tslint:disable-next-line: prefer-const
567
- const newVNode = newParentVNode.$children$[childIndex];
568
- let i = 0;
569
- let elm;
570
- let childNode;
571
- let oldVNode;
572
- if (!useNativeShadowDom) {
573
- // remember for later we need to check to relocate nodes
574
- checkSlotRelocate = true;
575
- if (newVNode.$tag$ === 'slot') {
576
- if (scopeId) {
577
- // scoped css needs to add its scoped id to the parent element
578
- parentElm.classList.add(scopeId + '-s');
579
- }
580
- newVNode.$flags$ |= newVNode.$children$
581
- ? // slot element has fallback content
582
- 2 /* VNODE_FLAGS.isSlotFallback */
583
- : // slot element does not have fallback content
584
- 1 /* VNODE_FLAGS.isSlotReference */;
585
- }
586
- }
587
- if (newVNode.$text$ !== null) {
588
- // create text node
589
- elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
590
- }
591
- else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
592
- // create a slot reference node
593
- elm = newVNode.$elm$ =
594
- doc.createTextNode('');
595
- }
596
- else {
597
- if (!isSvgMode) {
598
- isSvgMode = newVNode.$tag$ === 'svg';
599
- }
600
- // create element
601
- elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
602
- ? 'slot-fb'
603
- : newVNode.$tag$)
604
- );
605
- if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
606
- isSvgMode = false;
607
- }
608
- // add css classes, attrs, props, listeners, etc.
609
- {
610
- updateElement(null, newVNode, isSvgMode);
611
- }
612
- if (isDef(scopeId) && elm['s-si'] !== scopeId) {
613
- // if there is a scopeId and this is the initial render
614
- // then let's add the scopeId as a css class
615
- elm.classList.add((elm['s-si'] = scopeId));
616
- }
617
- if (newVNode.$children$) {
618
- for (i = 0; i < newVNode.$children$.length; ++i) {
619
- // create the node
620
- childNode = createElm(oldParentVNode, newVNode, i, elm);
621
- // return node could have been null
622
- if (childNode) {
623
- // append our new node
624
- elm.appendChild(childNode);
625
- }
626
- }
627
- }
628
- {
629
- if (newVNode.$tag$ === 'svg') {
630
- // Only reset the SVG context when we're exiting <svg> element
631
- isSvgMode = false;
632
- }
633
- else if (elm.tagName === 'foreignObject') {
634
- // Reenter SVG context when we're exiting <foreignObject> element
635
- isSvgMode = true;
636
- }
637
- }
638
- }
639
- {
640
- elm['s-hn'] = hostTagName;
641
- if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
642
- // remember the content reference comment
643
- elm['s-sr'] = true;
644
- // remember the content reference comment
645
- elm['s-cr'] = contentRef;
646
- // remember the slot name, or empty string for default slot
647
- elm['s-sn'] = newVNode.$name$ || '';
648
- // check if we've got an old vnode for this slot
649
- oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
650
- if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
651
- // we've got an old slot vnode and the wrapper is being replaced
652
- // so let's move the old slot content back to it's original location
653
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
654
- }
655
- }
656
- }
657
- return elm;
658
- };
659
- const putBackInOriginalLocation = (parentElm, recursive) => {
660
- plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
661
- const oldSlotChildNodes = parentElm.childNodes;
662
- for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
663
- const childNode = oldSlotChildNodes[i];
664
- if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
665
- // // this child node in the old element is from another component
666
- // // remove this node from the old slot's parent
667
- // childNode.remove();
668
- // and relocate it back to it's original location
669
- parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
670
- // remove the old original location comment entirely
671
- // later on the patch function will know what to do
672
- // and move this to the correct spot in need be
673
- childNode['s-ol'].remove();
674
- childNode['s-ol'] = undefined;
675
- checkSlotRelocate = true;
676
- }
677
- if (recursive) {
678
- putBackInOriginalLocation(childNode, recursive);
679
- }
680
- }
681
- plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
682
- };
683
- /**
684
- * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
685
- * add them to the DOM in the appropriate place.
686
- *
687
- * @param parentElm the DOM node which should be used as a parent for the new
688
- * DOM nodes
689
- * @param before a child of the `parentElm` which the new children should be
690
- * inserted before (optional)
691
- * @param parentVNode the parent virtual DOM node
692
- * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
693
- * @param startIdx the index in the child virtual DOM nodes at which to start
694
- * creating DOM nodes (inclusive)
695
- * @param endIdx the index in the child virtual DOM nodes at which to stop
696
- * creating DOM nodes (inclusive)
697
- */
698
- const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
699
- let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
700
- let childNode;
701
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
702
- containerElm = containerElm.shadowRoot;
703
- }
704
- for (; startIdx <= endIdx; ++startIdx) {
705
- if (vnodes[startIdx]) {
706
- childNode = createElm(null, parentVNode, startIdx, parentElm);
707
- if (childNode) {
708
- vnodes[startIdx].$elm$ = childNode;
709
- containerElm.insertBefore(childNode, referenceNode(before) );
710
- }
711
- }
712
- }
713
- };
714
- /**
715
- * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
716
- * This can be used to, for instance, clean up after a list of children which
717
- * should no longer be shown.
718
- *
719
- * This function also handles some of Stencil's slot relocation logic.
720
- *
721
- * @param vnodes a list of virtual DOM nodes to remove
722
- * @param startIdx the index at which to start removing nodes (inclusive)
723
- * @param endIdx the index at which to stop removing nodes (inclusive)
724
- * @param vnode a VNode
725
- * @param elm an element
726
- */
727
- const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
728
- for (; startIdx <= endIdx; ++startIdx) {
729
- if ((vnode = vnodes[startIdx])) {
730
- elm = vnode.$elm$;
731
- callNodeRefs(vnode);
732
- {
733
- // we're removing this element
734
- // so it's possible we need to show slot fallback content now
735
- checkSlotFallbackVisibility = true;
736
- if (elm['s-ol']) {
737
- // remove the original location comment
738
- elm['s-ol'].remove();
739
- }
740
- else {
741
- // it's possible that child nodes of the node
742
- // that's being removed are slot nodes
743
- putBackInOriginalLocation(elm, true);
744
- }
745
- }
746
- // remove the vnode's element from the dom
747
- elm.remove();
748
- }
749
- }
750
- };
751
- /**
752
- * Reconcile the children of a new VNode with the children of an old VNode by
753
- * traversing the two collections of children, identifying nodes that are
754
- * conserved or changed, calling out to `patch` to make any necessary
755
- * updates to the DOM, and rearranging DOM nodes as needed.
756
- *
757
- * The algorithm for reconciling children works by analyzing two 'windows' onto
758
- * the two arrays of children (`oldCh` and `newCh`). We keep track of the
759
- * 'windows' by storing start and end indices and references to the
760
- * corresponding array entries. Initially the two 'windows' are basically equal
761
- * to the entire array, but we progressively narrow the windows until there are
762
- * no children left to update by doing the following:
763
- *
764
- * 1. Skip any `null` entries at the beginning or end of the two arrays, so
765
- * that if we have an initial array like the following we'll end up dealing
766
- * only with a window bounded by the highlighted elements:
767
- *
768
- * [null, null, VNode1 , ... , VNode2, null, null]
769
- * ^^^^^^ ^^^^^^
770
- *
771
- * 2. Check to see if the elements at the head and tail positions are equal
772
- * across the windows. This will basically detect elements which haven't
773
- * been added, removed, or changed position, i.e. if you had the following
774
- * VNode elements (represented as HTML):
775
- *
776
- * oldVNode: `<div><p><span>HEY</span></p></div>`
777
- * newVNode: `<div><p><span>THERE</span></p></div>`
778
- *
779
- * Then when comparing the children of the `<div>` tag we check the equality
780
- * of the VNodes corresponding to the `<p>` tags and, since they are the
781
- * same tag in the same position, we'd be able to avoid completely
782
- * re-rendering the subtree under them with a new DOM element and would just
783
- * call out to `patch` to handle reconciling their children and so on.
784
- *
785
- * 3. Check, for both windows, to see if the element at the beginning of the
786
- * window corresponds to the element at the end of the other window. This is
787
- * a heuristic which will let us identify _some_ situations in which
788
- * elements have changed position, for instance it _should_ detect that the
789
- * children nodes themselves have not changed but merely moved in the
790
- * following example:
791
- *
792
- * oldVNode: `<div><element-one /><element-two /></div>`
793
- * newVNode: `<div><element-two /><element-one /></div>`
794
- *
795
- * If we find cases like this then we also need to move the concrete DOM
796
- * elements corresponding to the moved children to write the re-order to the
797
- * DOM.
798
- *
799
- * 4. Finally, if VNodes have the `key` attribute set on them we check for any
800
- * nodes in the old children which have the same key as the first element in
801
- * our window on the new children. If we find such a node we handle calling
802
- * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
803
- * what we find.
804
- *
805
- * Finally, once we've narrowed our 'windows' to the point that either of them
806
- * collapse (i.e. they have length 0) we then handle any remaining VNode
807
- * insertion or deletion that needs to happen to get a DOM state that correctly
808
- * reflects the new child VNodes. If, for instance, after our window on the old
809
- * children has collapsed we still have more nodes on the new children that
810
- * we haven't dealt with yet then we need to add them, or if the new children
811
- * collapse but we still have unhandled _old_ children then we need to make
812
- * sure the corresponding DOM nodes are removed.
813
- *
814
- * @param parentElm the node into which the parent VNode is rendered
815
- * @param oldCh the old children of the parent node
816
- * @param newVNode the new VNode which will replace the parent
817
- * @param newCh the new children of the parent node
818
- */
819
- const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
820
- let oldStartIdx = 0;
821
- let newStartIdx = 0;
822
- let idxInOld = 0;
823
- let i = 0;
824
- let oldEndIdx = oldCh.length - 1;
825
- let oldStartVnode = oldCh[0];
826
- let oldEndVnode = oldCh[oldEndIdx];
827
- let newEndIdx = newCh.length - 1;
828
- let newStartVnode = newCh[0];
829
- let newEndVnode = newCh[newEndIdx];
830
- let node;
831
- let elmToMove;
832
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
833
- if (oldStartVnode == null) {
834
- // VNode might have been moved left
835
- oldStartVnode = oldCh[++oldStartIdx];
836
- }
837
- else if (oldEndVnode == null) {
838
- oldEndVnode = oldCh[--oldEndIdx];
839
- }
840
- else if (newStartVnode == null) {
841
- newStartVnode = newCh[++newStartIdx];
842
- }
843
- else if (newEndVnode == null) {
844
- newEndVnode = newCh[--newEndIdx];
845
- }
846
- else if (isSameVnode(oldStartVnode, newStartVnode)) {
847
- // if the start nodes are the same then we should patch the new VNode
848
- // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
849
- // indices to reflect that. We don't need to move any DOM Nodes around
850
- // since things are matched up in order.
851
- patch(oldStartVnode, newStartVnode);
852
- oldStartVnode = oldCh[++oldStartIdx];
853
- newStartVnode = newCh[++newStartIdx];
854
- }
855
- else if (isSameVnode(oldEndVnode, newEndVnode)) {
856
- // likewise, if the end nodes are the same we patch new onto old and
857
- // decrement our end indices, and also likewise in this case we don't
858
- // need to move any DOM Nodes.
859
- patch(oldEndVnode, newEndVnode);
860
- oldEndVnode = oldCh[--oldEndIdx];
861
- newEndVnode = newCh[--newEndIdx];
862
- }
863
- else if (isSameVnode(oldStartVnode, newEndVnode)) {
864
- // case: "Vnode moved right"
865
- //
866
- // We've found that the last node in our window on the new children is
867
- // the same VNode as the _first_ node in our window on the old children
868
- // we're dealing with now. Visually, this is the layout of these two
869
- // nodes:
870
- //
871
- // newCh: [..., newStartVnode , ... , newEndVnode , ...]
872
- // ^^^^^^^^^^^
873
- // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
874
- // ^^^^^^^^^^^^^
875
- //
876
- // In this situation we need to patch `newEndVnode` onto `oldStartVnode`
877
- // and move the DOM element for `oldStartVnode`.
878
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
879
- putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
880
- }
881
- patch(oldStartVnode, newEndVnode);
882
- // We need to move the element for `oldStartVnode` into a position which
883
- // will be appropriate for `newEndVnode`. For this we can use
884
- // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
885
- // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
886
- // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
887
- //
888
- // <old-start-node />
889
- // <some-intervening-node />
890
- // <old-end-node />
891
- // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
892
- // <next-sibling />
893
- //
894
- // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
895
- // the node for `oldStartVnode` at the end of the children of
896
- // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
897
- // aren't any siblings, and passing `null` to `Node.insertBefore` will
898
- // append it to the children of the parent element.
899
- parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
900
- oldStartVnode = oldCh[++oldStartIdx];
901
- newEndVnode = newCh[--newEndIdx];
902
- }
903
- else if (isSameVnode(oldEndVnode, newStartVnode)) {
904
- // case: "Vnode moved left"
905
- //
906
- // We've found that the first node in our window on the new children is
907
- // the same VNode as the _last_ node in our window on the old children.
908
- // Visually, this is the layout of these two nodes:
909
- //
910
- // newCh: [..., newStartVnode , ... , newEndVnode , ...]
911
- // ^^^^^^^^^^^^^
912
- // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
913
- // ^^^^^^^^^^^
914
- //
915
- // In this situation we need to patch `newStartVnode` onto `oldEndVnode`
916
- // (which will handle updating any changed attributes, reconciling their
917
- // children etc) but we also need to move the DOM node to which
918
- // `oldEndVnode` corresponds.
919
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
920
- putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
921
- }
922
- patch(oldEndVnode, newStartVnode);
923
- // We've already checked above if `oldStartVnode` and `newStartVnode` are
924
- // the same node, so since we're here we know that they are not. Thus we
925
- // can move the element for `oldEndVnode` _before_ the element for
926
- // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
927
- // future.
928
- parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
929
- oldEndVnode = oldCh[--oldEndIdx];
930
- newStartVnode = newCh[++newStartIdx];
931
- }
932
- else {
933
- // Here we do some checks to match up old and new nodes based on the
934
- // `$key$` attribute, which is set by putting a `key="my-key"` attribute
935
- // in the JSX for a DOM element in the implementation of a Stencil
936
- // component.
937
- //
938
- // First we check to see if there are any nodes in the array of old
939
- // children which have the same key as the first node in the new
940
- // children.
941
- idxInOld = -1;
942
- {
943
- for (i = oldStartIdx; i <= oldEndIdx; ++i) {
944
- if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
945
- idxInOld = i;
946
- break;
947
- }
948
- }
949
- }
950
- if (idxInOld >= 0) {
951
- // We found a node in the old children which matches up with the first
952
- // node in the new children! So let's deal with that
953
- elmToMove = oldCh[idxInOld];
954
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
955
- // the tag doesn't match so we'll need a new DOM element
956
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
957
- }
958
- else {
959
- patch(elmToMove, newStartVnode);
960
- // invalidate the matching old node so that we won't try to update it
961
- // again later on
962
- oldCh[idxInOld] = undefined;
963
- node = elmToMove.$elm$;
964
- }
965
- newStartVnode = newCh[++newStartIdx];
966
- }
967
- else {
968
- // We either didn't find an element in the old children that matches
969
- // the key of the first new child OR the build is not using `key`
970
- // attributes at all. In either case we need to create a new element
971
- // for the new node.
972
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
973
- newStartVnode = newCh[++newStartIdx];
974
- }
975
- if (node) {
976
- // if we created a new node then handle inserting it to the DOM
977
- {
978
- parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
979
- }
980
- }
981
- }
982
- }
983
- if (oldStartIdx > oldEndIdx) {
984
- // we have some more new nodes to add which don't match up with old nodes
985
- addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
986
- }
987
- else if (newStartIdx > newEndIdx) {
988
- // there are nodes in the `oldCh` array which no longer correspond to nodes
989
- // in the new array, so lets remove them (which entails cleaning up the
990
- // relevant DOM nodes)
991
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
992
- }
993
- };
994
- /**
995
- * Compare two VNodes to determine if they are the same
996
- *
997
- * **NB**: This function is an equality _heuristic_ based on the available
998
- * information set on the two VNodes and can be misleading under certain
999
- * circumstances. In particular, if the two nodes do not have `key` attrs
1000
- * (available under `$key$` on VNodes) then the function falls back on merely
1001
- * checking that they have the same tag.
1002
- *
1003
- * So, in other words, if `key` attrs are not set on VNodes which may be
1004
- * changing order within a `children` array or something along those lines then
1005
- * we could obtain a false negative and then have to do needless re-rendering
1006
- * (i.e. we'd say two VNodes aren't equal when in fact they should be).
1007
- *
1008
- * @param leftVNode the first VNode to check
1009
- * @param rightVNode the second VNode to check
1010
- * @returns whether they're equal or not
1011
- */
1012
- const isSameVnode = (leftVNode, rightVNode) => {
1013
- // compare if two vnode to see if they're "technically" the same
1014
- // need to have the same element tag, and same key to be the same
1015
- if (leftVNode.$tag$ === rightVNode.$tag$) {
1016
- if (leftVNode.$tag$ === 'slot') {
1017
- return leftVNode.$name$ === rightVNode.$name$;
1018
- }
1019
- // this will be set if components in the build have `key` attrs set on them
1020
- {
1021
- return leftVNode.$key$ === rightVNode.$key$;
1022
- }
1023
- }
1024
- return false;
1025
- };
1026
- const referenceNode = (node) => {
1027
- // this node was relocated to a new location in the dom
1028
- // because of some other component's slot
1029
- // but we still have an html comment in place of where
1030
- // it's original location was according to it's original vdom
1031
- return (node && node['s-ol']) || node;
1032
- };
1033
- const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
1034
- /**
1035
- * Handle reconciling an outdated VNode with a new one which corresponds to
1036
- * it. This function handles flushing updates to the DOM and reconciling the
1037
- * children of the two nodes (if any).
1038
- *
1039
- * @param oldVNode an old VNode whose DOM element and children we want to update
1040
- * @param newVNode a new VNode representing an updated version of the old one
1041
- */
1042
- const patch = (oldVNode, newVNode) => {
1043
- const elm = (newVNode.$elm$ = oldVNode.$elm$);
1044
- const oldChildren = oldVNode.$children$;
1045
- const newChildren = newVNode.$children$;
1046
- const tag = newVNode.$tag$;
1047
- const text = newVNode.$text$;
1048
- let defaultHolder;
1049
- if (text === null) {
1050
- {
1051
- // test if we're rendering an svg element, or still rendering nodes inside of one
1052
- // only add this to the when the compiler sees we're using an svg somewhere
1053
- isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
1054
- }
1055
- {
1056
- if (tag === 'slot')
1057
- ;
1058
- else {
1059
- // either this is the first render of an element OR it's an update
1060
- // AND we already know it's possible it could have changed
1061
- // this updates the element's css classes, attrs, props, listeners, etc.
1062
- updateElement(oldVNode, newVNode, isSvgMode);
1063
- }
1064
- }
1065
- if (oldChildren !== null && newChildren !== null) {
1066
- // looks like there's child vnodes for both the old and new vnodes
1067
- // so we need to call `updateChildren` to reconcile them
1068
- updateChildren(elm, oldChildren, newVNode, newChildren);
1069
- }
1070
- else if (newChildren !== null) {
1071
- // no old child vnodes, but there are new child vnodes to add
1072
- if (oldVNode.$text$ !== null) {
1073
- // the old vnode was text, so be sure to clear it out
1074
- elm.textContent = '';
1075
- }
1076
- // add the new vnode children
1077
- addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
1078
- }
1079
- else if (oldChildren !== null) {
1080
- // no new child vnodes, but there are old child vnodes to remove
1081
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
1082
- }
1083
- if (isSvgMode && tag === 'svg') {
1084
- isSvgMode = false;
1085
- }
1086
- }
1087
- else if ((defaultHolder = elm['s-cr'])) {
1088
- // this element has slotted content
1089
- defaultHolder.parentNode.textContent = text;
1090
- }
1091
- else if (oldVNode.$text$ !== text) {
1092
- // update the text content for the text only vnode
1093
- // and also only if the text is different than before
1094
- elm.data = text;
1095
- }
1096
- };
1097
- const updateFallbackSlotVisibility = (elm) => {
1098
- // tslint:disable-next-line: prefer-const
1099
- const childNodes = elm.childNodes;
1100
- let childNode;
1101
- let i;
1102
- let ilen;
1103
- let j;
1104
- let slotNameAttr;
1105
- let nodeType;
1106
- for (i = 0, ilen = childNodes.length; i < ilen; i++) {
1107
- childNode = childNodes[i];
1108
- if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1109
- if (childNode['s-sr']) {
1110
- // this is a slot fallback node
1111
- // get the slot name for this slot reference node
1112
- slotNameAttr = childNode['s-sn'];
1113
- // by default always show a fallback slot node
1114
- // then hide it if there are other slots in the light dom
1115
- childNode.hidden = false;
1116
- for (j = 0; j < ilen; j++) {
1117
- nodeType = childNodes[j].nodeType;
1118
- if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
1119
- // this sibling node is from a different component OR is a named fallback slot node
1120
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
1121
- childNode.hidden = true;
1122
- break;
1123
- }
1124
- }
1125
- else {
1126
- // this is a default fallback slot node
1127
- // any element or text node (with content)
1128
- // should hide the default fallback slot node
1129
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1130
- (nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
1131
- childNode.hidden = true;
1132
- break;
1133
- }
1134
- }
1135
- }
1136
- }
1137
- // keep drilling down
1138
- updateFallbackSlotVisibility(childNode);
1139
- }
1140
- }
1141
- };
1142
- const relocateNodes = [];
1143
- const relocateSlotContent = (elm) => {
1144
- // tslint:disable-next-line: prefer-const
1145
- let childNode;
1146
- let node;
1147
- let hostContentNodes;
1148
- let slotNameAttr;
1149
- let relocateNodeData;
1150
- let j;
1151
- let i = 0;
1152
- const childNodes = elm.childNodes;
1153
- const ilen = childNodes.length;
1154
- for (; i < ilen; i++) {
1155
- childNode = childNodes[i];
1156
- if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
1157
- // first got the content reference comment node
1158
- // then we got it's parent, which is where all the host content is in now
1159
- hostContentNodes = node.parentNode.childNodes;
1160
- slotNameAttr = childNode['s-sn'];
1161
- for (j = hostContentNodes.length - 1; j >= 0; j--) {
1162
- node = hostContentNodes[j];
1163
- if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
1164
- // let's do some relocating to its new home
1165
- // but never relocate a content reference node
1166
- // that is suppose to always represent the original content location
1167
- if (isNodeLocatedInSlot(node, slotNameAttr)) {
1168
- // it's possible we've already decided to relocate this node
1169
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1170
- // made some changes to slots
1171
- // let's make sure we also double check
1172
- // fallbacks are correctly hidden or shown
1173
- checkSlotFallbackVisibility = true;
1174
- node['s-sn'] = node['s-sn'] || slotNameAttr;
1175
- if (relocateNodeData) {
1176
- // previously we never found a slot home for this node
1177
- // but turns out we did, so let's remember it now
1178
- relocateNodeData.$slotRefNode$ = childNode;
1179
- }
1180
- else {
1181
- // add to our list of nodes to relocate
1182
- relocateNodes.push({
1183
- $slotRefNode$: childNode,
1184
- $nodeToRelocate$: node,
1185
- });
1186
- }
1187
- if (node['s-sr']) {
1188
- relocateNodes.map((relocateNode) => {
1189
- if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
1190
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1191
- if (relocateNodeData && !relocateNode.$slotRefNode$) {
1192
- relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
1193
- }
1194
- }
1195
- });
1196
- }
1197
- }
1198
- else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1199
- // so far this element does not have a slot home, not setting slotRefNode on purpose
1200
- // if we never find a home for this element then we'll need to hide it
1201
- relocateNodes.push({
1202
- $nodeToRelocate$: node,
1203
- });
1204
- }
1205
- }
1206
- }
1207
- }
1208
- if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1209
- relocateSlotContent(childNode);
1210
- }
1211
- }
1212
- };
1213
- const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
1214
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1215
- if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
1216
- return true;
1217
- }
1218
- if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
1219
- return true;
1220
- }
1221
- return false;
1222
- }
1223
- if (nodeToRelocate['s-sn'] === slotNameAttr) {
1224
- return true;
1225
- }
1226
- return slotNameAttr === '';
1227
- };
1228
- const callNodeRefs = (vNode) => {
1229
- {
1230
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1231
- vNode.$children$ && vNode.$children$.map(callNodeRefs);
1232
- }
1233
- };
1234
- /**
1235
- * The main entry point for Stencil's virtual DOM-based rendering engine
1236
- *
1237
- * Given a {@link d.HostRef} container and some virtual DOM nodes, this
1238
- * function will handle creating a virtual DOM tree with a single root, patching
1239
- * the current virtual DOM tree onto an old one (if any), dealing with slot
1240
- * relocation, and reflecting attributes.
1241
- *
1242
- * @param hostRef data needed to root and render the virtual DOM tree, such as
1243
- * the DOM node into which it should be rendered.
1244
- * @param renderFnResults the virtual DOM nodes to be rendered
1245
- */
1246
- const renderVdom = (hostRef, renderFnResults) => {
1247
- const hostElm = hostRef.$hostElement$;
1248
- const cmpMeta = hostRef.$cmpMeta$;
1249
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1250
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1251
- hostTagName = hostElm.tagName;
1252
- if (cmpMeta.$attrsToReflect$) {
1253
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1254
- cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
1255
- }
1256
- rootVnode.$tag$ = null;
1257
- rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
1258
- hostRef.$vnode$ = rootVnode;
1259
- rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
1260
- {
1261
- scopeId = hostElm['s-sc'];
1262
- }
1263
- {
1264
- contentRef = hostElm['s-cr'];
1265
- useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1266
- // always reset
1267
- checkSlotFallbackVisibility = false;
1268
- }
1269
- // synchronous patch
1270
- patch(oldVNode, rootVnode);
1271
- {
1272
- // while we're moving nodes around existing nodes, temporarily disable
1273
- // the disconnectCallback from working
1274
- plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1275
- if (checkSlotRelocate) {
1276
- relocateSlotContent(rootVnode.$elm$);
1277
- let relocateData;
1278
- let nodeToRelocate;
1279
- let orgLocationNode;
1280
- let parentNodeRef;
1281
- let insertBeforeNode;
1282
- let refNode;
1283
- let i = 0;
1284
- for (; i < relocateNodes.length; i++) {
1285
- relocateData = relocateNodes[i];
1286
- nodeToRelocate = relocateData.$nodeToRelocate$;
1287
- if (!nodeToRelocate['s-ol']) {
1288
- // add a reference node marking this node's original location
1289
- // keep a reference to this node for later lookups
1290
- orgLocationNode =
1291
- doc.createTextNode('');
1292
- orgLocationNode['s-nr'] = nodeToRelocate;
1293
- nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1294
- }
1295
- }
1296
- for (i = 0; i < relocateNodes.length; i++) {
1297
- relocateData = relocateNodes[i];
1298
- nodeToRelocate = relocateData.$nodeToRelocate$;
1299
- if (relocateData.$slotRefNode$) {
1300
- // by default we're just going to insert it directly
1301
- // after the slot reference node
1302
- parentNodeRef = relocateData.$slotRefNode$.parentNode;
1303
- insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
1304
- orgLocationNode = nodeToRelocate['s-ol'];
1305
- while ((orgLocationNode = orgLocationNode.previousSibling)) {
1306
- refNode = orgLocationNode['s-nr'];
1307
- if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1308
- refNode = refNode.nextSibling;
1309
- if (!refNode || !refNode['s-nr']) {
1310
- insertBeforeNode = refNode;
1311
- break;
1312
- }
1313
- }
1314
- }
1315
- if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
1316
- nodeToRelocate.nextSibling !== insertBeforeNode) {
1317
- // we've checked that it's worth while to relocate
1318
- // since that the node to relocate
1319
- // has a different next sibling or parent relocated
1320
- if (nodeToRelocate !== insertBeforeNode) {
1321
- if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1322
- // probably a component in the index.html that doesn't have it's hostname set
1323
- nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1324
- }
1325
- // add it back to the dom but in its new home
1326
- parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1327
- }
1328
- }
1329
- }
1330
- else {
1331
- // this node doesn't have a slot home to go to, so let's hide it
1332
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1333
- nodeToRelocate.hidden = true;
1334
- }
1335
- }
1336
- }
1337
- }
1338
- if (checkSlotFallbackVisibility) {
1339
- updateFallbackSlotVisibility(rootVnode.$elm$);
1340
- }
1341
- // done moving nodes around
1342
- // allow the disconnect callback to work again
1343
- plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1344
- // always reset
1345
- relocateNodes.length = 0;
1346
- }
1347
- };
1348
- const attachToAncestor = (hostRef, ancestorComponent) => {
1349
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1350
- ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1351
- }
1352
- };
1353
- const scheduleUpdate = (hostRef, isInitialLoad) => {
1354
- {
1355
- hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
1356
- }
1357
- if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
1358
- hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
1359
- return;
1360
- }
1361
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1362
- // there is no ancestor component or the ancestor component
1363
- // has already fired off its lifecycle update then
1364
- // fire off the initial update
1365
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1366
- return writeTask(dispatch) ;
1367
- };
1368
- const dispatchHooks = (hostRef, isInitialLoad) => {
1369
- const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1370
- const instance = hostRef.$lazyInstance$ ;
1371
- let promise;
1372
- if (isInitialLoad) {
1373
- {
1374
- hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
1375
- if (hostRef.$queuedListeners$) {
1376
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1377
- hostRef.$queuedListeners$ = null;
1378
- }
1379
- }
1380
- {
1381
- promise = safeCall(instance, 'componentWillLoad');
1382
- }
1383
- }
1384
- {
1385
- promise = then(promise, () => safeCall(instance, 'componentWillRender'));
1386
- }
1387
- endSchedule();
1388
- return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
1389
- };
1390
- const updateComponent = async (hostRef, instance, isInitialLoad) => {
1391
- // updateComponent
1392
- const elm = hostRef.$hostElement$;
1393
- const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1394
- const rc = elm['s-rc'];
1395
- if (isInitialLoad) {
1396
- // DOM WRITE!
1397
- attachStyles(hostRef);
1398
- }
1399
- const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1400
- {
1401
- callRender(hostRef, instance);
1402
- }
1403
- if (rc) {
1404
- // ok, so turns out there are some child host elements
1405
- // waiting on this parent element to load
1406
- // let's fire off all update callbacks waiting
1407
- rc.map((cb) => cb());
1408
- elm['s-rc'] = undefined;
1409
- }
1410
- endRender();
1411
- endUpdate();
1412
- {
1413
- const childrenPromises = elm['s-p'];
1414
- const postUpdate = () => postUpdateComponent(hostRef);
1415
- if (childrenPromises.length === 0) {
1416
- postUpdate();
1417
- }
1418
- else {
1419
- Promise.all(childrenPromises).then(postUpdate);
1420
- hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
1421
- childrenPromises.length = 0;
1422
- }
1423
- }
1424
- };
1425
- const callRender = (hostRef, instance, elm) => {
1426
- try {
1427
- instance = instance.render() ;
1428
- {
1429
- hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1430
- }
1431
- {
1432
- hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1433
- }
1434
- {
1435
- {
1436
- // looks like we've got child nodes to render into this host element
1437
- // or we need to update the css class/attrs on the host element
1438
- // DOM WRITE!
1439
- {
1440
- renderVdom(hostRef, instance);
1441
- }
1442
- }
1443
- }
1444
- }
1445
- catch (e) {
1446
- consoleError(e, hostRef.$hostElement$);
1447
- }
1448
- return null;
1449
- };
1450
- const postUpdateComponent = (hostRef) => {
1451
- const tagName = hostRef.$cmpMeta$.$tagName$;
1452
- const elm = hostRef.$hostElement$;
1453
- const endPostUpdate = createTime('postUpdate', tagName);
1454
- const instance = hostRef.$lazyInstance$ ;
1455
- const ancestorComponent = hostRef.$ancestorComponent$;
1456
- {
1457
- safeCall(instance, 'componentDidRender');
1458
- }
1459
- if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1460
- hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1461
- {
1462
- // DOM WRITE!
1463
- addHydratedFlag(elm);
1464
- }
1465
- {
1466
- safeCall(instance, 'componentDidLoad');
1467
- }
1468
- endPostUpdate();
1469
- {
1470
- hostRef.$onReadyResolve$(elm);
1471
- if (!ancestorComponent) {
1472
- appDidLoad();
1473
- }
1474
- }
1475
- }
1476
- else {
1477
- {
1478
- safeCall(instance, 'componentDidUpdate');
1479
- }
1480
- endPostUpdate();
1481
- }
1482
- {
1483
- hostRef.$onInstanceResolve$(elm);
1484
- }
1485
- // load events fire from bottom to top
1486
- // the deepest elements load first then bubbles up
1487
- {
1488
- if (hostRef.$onRenderResolve$) {
1489
- hostRef.$onRenderResolve$();
1490
- hostRef.$onRenderResolve$ = undefined;
1491
- }
1492
- if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
1493
- nextTick(() => scheduleUpdate(hostRef, false));
1494
- }
1495
- hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
1496
- }
1497
- // ( •_•)
1498
- // ( •_•)>⌐■-■
1499
- // (⌐■_■)
1500
- };
1501
- const appDidLoad = (who) => {
1502
- // on appload
1503
- // we have finish the first big initial render
1504
- {
1505
- addHydratedFlag(doc.documentElement);
1506
- }
1507
- nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1508
- };
1509
- const safeCall = (instance, method, arg) => {
1510
- if (instance && instance[method]) {
1511
- try {
1512
- return instance[method](arg);
1513
- }
1514
- catch (e) {
1515
- consoleError(e);
1516
- }
1517
- }
1518
- return undefined;
1519
- };
1520
- const then = (promise, thenFn) => {
1521
- return promise && promise.then ? promise.then(thenFn) : thenFn();
1522
- };
1523
- const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1524
- ;
1525
- const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1526
- const setValue = (ref, propName, newVal, cmpMeta) => {
1527
- // check our new property value against our internal value
1528
- const hostRef = getHostRef(ref);
1529
- const elm = hostRef.$hostElement$ ;
1530
- const oldVal = hostRef.$instanceValues$.get(propName);
1531
- const flags = hostRef.$flags$;
1532
- const instance = hostRef.$lazyInstance$ ;
1533
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1534
- // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1535
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1536
- const didValueChange = newVal !== oldVal && !areBothNaN;
1537
- if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1538
- // gadzooks! the property's value has changed!!
1539
- // set our new value!
1540
- hostRef.$instanceValues$.set(propName, newVal);
1541
- if (instance) {
1542
- // get an array of method names of watch functions to call
1543
- if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
1544
- const watchMethods = cmpMeta.$watchers$[propName];
1545
- if (watchMethods) {
1546
- // this instance is watching for when this property changed
1547
- watchMethods.map((watchMethodName) => {
1548
- try {
1549
- // fire off each of the watch methods that are watching this property
1550
- instance[watchMethodName](newVal, oldVal, propName);
1551
- }
1552
- catch (e) {
1553
- consoleError(e, elm);
1554
- }
1555
- });
1556
- }
1557
- }
1558
- if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1559
- // looks like this value actually changed, so we've got work to do!
1560
- // but only if we've already rendered, otherwise just chill out
1561
- // queue that we need to do an update, but don't worry about queuing
1562
- // up millions cuz this function ensures it only runs once
1563
- scheduleUpdate(hostRef, false);
1564
- }
1565
- }
1566
- }
1567
- };
1568
- /**
1569
- * Attach a series of runtime constructs to a compiled Stencil component
1570
- * constructor, including getters and setters for the `@Prop` and `@State`
1571
- * decorators, callbacks for when attributes change, and so on.
1572
- *
1573
- * @param Cstr the constructor for a component that we need to process
1574
- * @param cmpMeta metadata collected previously about the component
1575
- * @param flags a number used to store a series of bit flags
1576
- * @returns a reference to the same constructor passed in (but now mutated)
1577
- */
1578
- const proxyComponent = (Cstr, cmpMeta, flags) => {
1579
- if (cmpMeta.$members$) {
1580
- if (Cstr.watchers) {
1581
- cmpMeta.$watchers$ = Cstr.watchers;
1582
- }
1583
- // It's better to have a const than two Object.entries()
1584
- const members = Object.entries(cmpMeta.$members$);
1585
- const prototype = Cstr.prototype;
1586
- members.map(([memberName, [memberFlags]]) => {
1587
- if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1588
- ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
1589
- // proxyComponent - prop
1590
- Object.defineProperty(prototype, memberName, {
1591
- get() {
1592
- // proxyComponent, get value
1593
- return getValue(this, memberName);
1594
- },
1595
- set(newValue) {
1596
- // proxyComponent, set value
1597
- setValue(this, memberName, newValue, cmpMeta);
1598
- },
1599
- configurable: true,
1600
- enumerable: true,
1601
- });
1602
- }
1603
- else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
1604
- memberFlags & 64 /* MEMBER_FLAGS.Method */) {
1605
- // proxyComponent - method
1606
- Object.defineProperty(prototype, memberName, {
1607
- value(...args) {
1608
- const ref = getHostRef(this);
1609
- return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));
1610
- },
1611
- });
1612
- }
1613
- });
1614
- if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1615
- const attrNameToPropName = new Map();
1616
- prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1617
- plt.jmp(() => {
1618
- const propName = attrNameToPropName.get(attrName);
1619
- // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1620
- // in the case where an attribute was set inline.
1621
- // ```html
1622
- // <my-component some-attribute="some-value"></my-component>
1623
- // ```
1624
- //
1625
- // There is an edge case where a developer sets the attribute inline on a custom element and then
1626
- // programmatically changes it before it has been upgraded as shown below:
1627
- //
1628
- // ```html
1629
- // <!-- this component has _not_ been upgraded yet -->
1630
- // <my-component id="test" some-attribute="some-value"></my-component>
1631
- // <script>
1632
- // // grab non-upgraded component
1633
- // el = document.querySelector("#test");
1634
- // el.someAttribute = "another-value";
1635
- // // upgrade component
1636
- // customElements.define('my-component', MyComponent);
1637
- // </script>
1638
- // ```
1639
- // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1640
- // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1641
- // to the value that was set inline i.e. "some-value" from above example. When
1642
- // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1643
- //
1644
- // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1645
- // by connectedCallback as this attributeChangedCallback will not fire.
1646
- //
1647
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1648
- //
1649
- // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1650
- // properties here given that this goes against best practices outlined here
1651
- // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1652
- if (this.hasOwnProperty(propName)) {
1653
- newValue = this[propName];
1654
- delete this[propName];
1655
- }
1656
- else if (prototype.hasOwnProperty(propName) &&
1657
- typeof this[propName] === 'number' &&
1658
- this[propName] == newValue) {
1659
- // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1660
- // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1661
- // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1662
- return;
1663
- }
1664
- this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1665
- });
1666
- };
1667
- // create an array of attributes to observe
1668
- // and also create a map of html attribute name to js property name
1669
- Cstr.observedAttributes = members
1670
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1671
- .map(([propName, m]) => {
1672
- const attrName = m[1] || propName;
1673
- attrNameToPropName.set(attrName, propName);
1674
- if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1675
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
1676
- }
1677
- return attrName;
1678
- });
1679
- }
1680
- }
1681
- return Cstr;
1682
- };
1683
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1684
- // initializeComponent
1685
- if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1686
- {
1687
- // we haven't initialized this element yet
1688
- hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1689
- // lazy loaded components
1690
- // request the component's implementation to be
1691
- // wired up with the host element
1692
- Cstr = loadModule(cmpMeta);
1693
- if (Cstr.then) {
1694
- // Await creates a micro-task avoid if possible
1695
- const endLoad = uniqueTime();
1696
- Cstr = await Cstr;
1697
- endLoad();
1698
- }
1699
- if (!Cstr.isProxied) {
1700
- // we've never proxied this Constructor before
1701
- // let's add the getters/setters to its prototype before
1702
- // the first time we create an instance of the implementation
1703
- {
1704
- cmpMeta.$watchers$ = Cstr.watchers;
1705
- }
1706
- proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1707
- Cstr.isProxied = true;
1708
- }
1709
- const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1710
- // ok, time to construct the instance
1711
- // but let's keep track of when we start and stop
1712
- // so that the getters/setters don't incorrectly step on data
1713
- {
1714
- hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1715
- }
1716
- // construct the lazy-loaded component implementation
1717
- // passing the hostRef is very important during
1718
- // construction in order to directly wire together the
1719
- // host element and the lazy-loaded instance
1720
- try {
1721
- new Cstr(hostRef);
1722
- }
1723
- catch (e) {
1724
- consoleError(e);
1725
- }
1726
- {
1727
- hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1728
- }
1729
- {
1730
- hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1731
- }
1732
- endNewInstance();
1733
- fireConnectedCallback(hostRef.$lazyInstance$);
1734
- }
1735
- if (Cstr.style) {
1736
- // this component has styles but we haven't registered them yet
1737
- let style = Cstr.style;
1738
- const scopeId = getScopeId(cmpMeta);
1739
- if (!styles.has(scopeId)) {
1740
- const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1741
- if (cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {
1742
- style = await import('./shadow-css-008a49f5.js').then((m) => m.scopeCss(style, scopeId, false));
1743
- }
1744
- registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1745
- endRegisterStyles();
1746
- }
1747
- }
1748
- }
1749
- // we've successfully created a lazy instance
1750
- const ancestorComponent = hostRef.$ancestorComponent$;
1751
- const schedule = () => scheduleUpdate(hostRef, true);
1752
- if (ancestorComponent && ancestorComponent['s-rc']) {
1753
- // this is the initial load and this component it has an ancestor component
1754
- // but the ancestor component has NOT fired its will update lifecycle yet
1755
- // so let's just cool our jets and wait for the ancestor to continue first
1756
- // this will get fired off when the ancestor component
1757
- // finally gets around to rendering its lazy self
1758
- // fire off the initial update
1759
- ancestorComponent['s-rc'].push(schedule);
1760
- }
1761
- else {
1762
- schedule();
1763
- }
1764
- };
1765
- const fireConnectedCallback = (instance) => {
1766
- {
1767
- safeCall(instance, 'connectedCallback');
1768
- }
1769
- };
1770
- const connectedCallback = (elm) => {
1771
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1772
- const hostRef = getHostRef(elm);
1773
- const cmpMeta = hostRef.$cmpMeta$;
1774
- const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1775
- if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1776
- // first time this component has connected
1777
- hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1778
- {
1779
- // initUpdate
1780
- // if the slot polyfill is required we'll need to put some nodes
1781
- // in here to act as original content anchors as we move nodes around
1782
- // host element has been connected to the DOM
1783
- if ((cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
1784
- setContentReference(elm);
1785
- }
1786
- }
1787
- {
1788
- // find the first ancestor component (if there is one) and register
1789
- // this component as one of the actively loading child components for its ancestor
1790
- let ancestorComponent = elm;
1791
- while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1792
- // climb up the ancestors looking for the first
1793
- // component that hasn't finished its lifecycle update yet
1794
- if (ancestorComponent['s-p']) {
1795
- // we found this components first ancestor component
1796
- // keep a reference to this component's ancestor component
1797
- attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1798
- break;
1799
- }
1800
- }
1801
- }
1802
- // Lazy properties
1803
- // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1804
- if (cmpMeta.$members$) {
1805
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1806
- if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1807
- const value = elm[memberName];
1808
- delete elm[memberName];
1809
- elm[memberName] = value;
1810
- }
1811
- });
1812
- }
1813
- {
1814
- initializeComponent(elm, hostRef, cmpMeta);
1815
- }
1816
- }
1817
- else {
1818
- // not the first time this has connected
1819
- // reattach any event listeners to the host
1820
- // since they would have been removed when disconnected
1821
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1822
- // fire off connectedCallback() on component instance
1823
- fireConnectedCallback(hostRef.$lazyInstance$);
1824
- }
1825
- endConnected();
1826
- }
1827
- };
1828
- const setContentReference = (elm) => {
1829
- // only required when we're NOT using native shadow dom (slot)
1830
- // or this browser doesn't support native shadow dom
1831
- // and this host element was NOT created with SSR
1832
- // let's pick out the inner content for slot projection
1833
- // create a node to represent where the original
1834
- // content was first placed, which is useful later on
1835
- const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1836
- contentRefElm['s-cn'] = true;
1837
- elm.insertBefore(contentRefElm, elm.firstChild);
1838
- };
1839
- const disconnectedCallback = (elm) => {
1840
- if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1841
- const hostRef = getHostRef(elm);
1842
- const instance = hostRef.$lazyInstance$ ;
1843
- {
1844
- if (hostRef.$rmListeners$) {
1845
- hostRef.$rmListeners$.map((rmListener) => rmListener());
1846
- hostRef.$rmListeners$ = undefined;
1847
- }
1848
- }
1849
- {
1850
- safeCall(instance, 'disconnectedCallback');
1851
- }
1852
- }
1853
- };
1854
- const bootstrapLazy = (lazyBundles, options = {}) => {
1855
- var _a;
1856
- const endBootstrap = createTime();
1857
- const cmpTags = [];
1858
- const exclude = options.exclude || [];
1859
- const customElements = win.customElements;
1860
- const head = doc.head;
1861
- const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1862
- const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1863
- const deferredConnectedCallbacks = [];
1864
- let appLoadFallback;
1865
- let isBootstrapping = true;
1866
- Object.assign(plt, options);
1867
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1868
- lazyBundles.map((lazyBundle) => {
1869
- lazyBundle[1].map((compactMeta) => {
1870
- const cmpMeta = {
1871
- $flags$: compactMeta[0],
1872
- $tagName$: compactMeta[1],
1873
- $members$: compactMeta[2],
1874
- $listeners$: compactMeta[3],
1875
- };
1876
- {
1877
- cmpMeta.$members$ = compactMeta[2];
1878
- }
1879
- {
1880
- cmpMeta.$listeners$ = compactMeta[3];
1881
- }
1882
- {
1883
- cmpMeta.$attrsToReflect$ = [];
1884
- }
1885
- {
1886
- cmpMeta.$watchers$ = {};
1887
- }
1888
- if (!supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
1889
- cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;
1890
- }
1891
- const tagName = cmpMeta.$tagName$;
1892
- const HostElement = class extends HTMLElement {
1893
- // StencilLazyHost
1894
- constructor(self) {
1895
- // @ts-ignore
1896
- super(self);
1897
- self = this;
1898
- registerHost(self, cmpMeta);
1899
- if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
1900
- // this component is using shadow dom
1901
- // and this browser supports shadow dom
1902
- // add the read-only property "shadowRoot" to the host element
1903
- // adding the shadow root build conditionals to minimize runtime
1904
- if (supportsShadow) {
1905
- {
1906
- self.attachShadow({ mode: 'open' });
1907
- }
1908
- }
1909
- else if (!('shadowRoot' in self)) {
1910
- self.shadowRoot = self;
1911
- }
1912
- }
1913
- }
1914
- connectedCallback() {
1915
- if (appLoadFallback) {
1916
- clearTimeout(appLoadFallback);
1917
- appLoadFallback = null;
1918
- }
1919
- if (isBootstrapping) {
1920
- // connectedCallback will be processed once all components have been registered
1921
- deferredConnectedCallbacks.push(this);
1922
- }
1923
- else {
1924
- plt.jmp(() => connectedCallback(this));
1925
- }
1926
- }
1927
- disconnectedCallback() {
1928
- plt.jmp(() => disconnectedCallback(this));
1929
- }
1930
- componentOnReady() {
1931
- return getHostRef(this).$onReadyPromise$;
1932
- }
1933
- };
1934
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1935
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1936
- cmpTags.push(tagName);
1937
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
1938
- }
1939
- });
1940
- });
1941
- {
1942
- visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1943
- visibilityStyle.setAttribute('data-styles', '');
1944
- // Apply CSP nonce to the style tag if it exists
1945
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1946
- if (nonce != null) {
1947
- visibilityStyle.setAttribute('nonce', nonce);
1948
- }
1949
- head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1950
- }
1951
- // Process deferred connectedCallbacks now all components have been registered
1952
- isBootstrapping = false;
1953
- if (deferredConnectedCallbacks.length) {
1954
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
1955
- }
1956
- else {
1957
- {
1958
- plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1959
- }
1960
- }
1961
- // Fallback appLoad event
1962
- endBootstrap();
1963
- };
1964
- const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1965
- if (listeners) {
1966
- listeners.map(([flags, name, method]) => {
1967
- const target = getHostListenerTarget(elm, flags) ;
1968
- const handler = hostListenerProxy(hostRef, method);
1969
- const opts = hostListenerOpts(flags);
1970
- plt.ael(target, name, handler, opts);
1971
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1972
- });
1973
- }
1974
- };
1975
- const hostListenerProxy = (hostRef, methodName) => (ev) => {
1976
- try {
1977
- {
1978
- if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
1979
- // instance is ready, let's call it's member method for this event
1980
- hostRef.$lazyInstance$[methodName](ev);
1981
- }
1982
- else {
1983
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1984
- }
1985
- }
1986
- }
1987
- catch (e) {
1988
- consoleError(e);
1989
- }
1990
- };
1991
- const getHostListenerTarget = (elm, flags) => {
1992
- if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
1993
- return doc;
1994
- return elm;
1995
- };
1996
- // prettier-ignore
1997
- const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
1998
- /**
1999
- * Assigns the given value to the nonce property on the runtime platform object.
2000
- * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
2001
- * @param nonce The value to be assigned to the platform nonce property.
2002
- * @returns void
2003
- */
2004
- const setNonce = (nonce) => (plt.$nonce$ = nonce);
2005
- const hostRefs = /*@__PURE__*/ new WeakMap();
2006
- const getHostRef = (ref) => hostRefs.get(ref);
2007
- const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
2008
- const registerHost = (elm, cmpMeta) => {
2009
- const hostRef = {
2010
- $flags$: 0,
2011
- $hostElement$: elm,
2012
- $cmpMeta$: cmpMeta,
2013
- $instanceValues$: new Map(),
2014
- };
2015
- {
2016
- hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
2017
- }
2018
- {
2019
- hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
2020
- elm['s-p'] = [];
2021
- elm['s-rc'] = [];
2022
- }
2023
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
2024
- return hostRefs.set(elm, hostRef);
2025
- };
2026
- const isMemberInElement = (elm, memberName) => memberName in elm;
2027
- const consoleError = (e, el) => (0, console.error)(e, el);
2028
- const cmpModules = /*@__PURE__*/ new Map();
2029
- const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2030
- // loadModuleImport
2031
- const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
2032
- const bundleId = cmpMeta.$lazyBundleId$;
2033
- const module = cmpModules.get(bundleId) ;
2034
- if (module) {
2035
- return module[exportName];
2036
- }
2037
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
2038
- return import(
2039
- /* @vite-ignore */
2040
- /* webpackInclude: /\.entry\.js$/ */
2041
- /* webpackExclude: /\.system\.entry\.js$/ */
2042
- /* webpackMode: "lazy" */
2043
- `./${bundleId}.entry.js${''}`).then((importedModule) => {
2044
- {
2045
- cmpModules.set(bundleId, importedModule);
2046
- }
2047
- return importedModule[exportName];
2048
- }, consoleError);
2049
- };
2050
- const styles = /*@__PURE__*/ new Map();
2051
- const win = typeof window !== 'undefined' ? window : {};
2052
- const doc = win.document || { head: {} };
2053
- const plt = {
2054
- $flags$: 0,
2055
- $resourcesUrl$: '',
2056
- jmp: (h) => h(),
2057
- raf: (h) => requestAnimationFrame(h),
2058
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
2059
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
2060
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
2061
- };
2062
- const supportsShadow = /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)()
2063
- ;
2064
- const promiseResolve = (v) => Promise.resolve(v);
2065
- const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
2066
- try {
2067
- new CSSStyleSheet();
2068
- return typeof new CSSStyleSheet().replaceSync === 'function';
2069
- }
2070
- catch (e) { }
2071
- return false;
2072
- })()
2073
- ;
2074
- const queueDomReads = [];
2075
- const queueDomWrites = [];
2076
- const queueTask = (queue, write) => (cb) => {
2077
- queue.push(cb);
2078
- if (!queuePending) {
2079
- queuePending = true;
2080
- if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
2081
- nextTick(flush);
2082
- }
2083
- else {
2084
- plt.raf(flush);
2085
- }
2086
- }
2087
- };
2088
- const consume = (queue) => {
2089
- for (let i = 0; i < queue.length; i++) {
2090
- try {
2091
- queue[i](performance.now());
2092
- }
2093
- catch (e) {
2094
- consoleError(e);
2095
- }
2096
- }
2097
- queue.length = 0;
2098
- };
2099
- const flush = () => {
2100
- // always force a bunch of medium callbacks to run, but still have
2101
- // a throttle on how many can run in a certain time
2102
- // DOM READS!!!
2103
- consume(queueDomReads);
2104
- // DOM WRITES!!!
2105
- {
2106
- consume(queueDomWrites);
2107
- if ((queuePending = queueDomReads.length > 0)) {
2108
- // still more to do yet, but we've run out of time
2109
- // let's let this thing cool off and try again in the next tick
2110
- plt.raf(flush);
2111
- }
2112
- }
2113
- };
2114
- const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
2115
- const readTask = /*@__PURE__*/ queueTask(queueDomReads, false);
2116
- const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2117
-
2118
- export { Host as H, NAMESPACE as N, plt as a, bootstrapLazy as b, readTask as c, doc as d, createEvent as e, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s, win as w };