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