@swisspost/design-system-components 1.6.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/dist/cjs/{check-non-empty-ae713942.js → check-non-empty-eeaa8f77.js} +4 -4
  2. package/dist/cjs/check-non-empty-eeaa8f77.js.map +1 -0
  3. package/dist/cjs/index-8c288b1a.js +45 -0
  4. package/dist/cjs/index-8c288b1a.js.map +1 -0
  5. package/dist/cjs/{index-e7618bb3.js → index-c07c0cdb.js} +79 -59
  6. package/dist/cjs/index-c07c0cdb.js.map +1 -0
  7. package/dist/cjs/index.cjs.js +17 -12
  8. package/dist/cjs/index.cjs.js.map +1 -1
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/package-cd0e9960.js +7 -0
  11. package/dist/cjs/package-cd0e9960.js.map +1 -0
  12. package/dist/cjs/post-accordion-f2e00198.js +87 -0
  13. package/dist/cjs/post-accordion-f2e00198.js.map +1 -0
  14. package/dist/cjs/post-accordion.cjs.entry.js +4 -80
  15. package/dist/cjs/post-accordion.cjs.entry.js.map +1 -1
  16. package/dist/cjs/post-alert-6d0b5e58.js +101 -0
  17. package/dist/cjs/{post-alert-1fb90f2d.js.map → post-alert-6d0b5e58.js.map} +1 -1
  18. package/dist/cjs/post-alert.cjs.entry.js +5 -6
  19. package/dist/cjs/post-alert.cjs.entry.js.map +1 -1
  20. package/dist/cjs/post-collapsible-0b8dce97.js +93 -0
  21. package/dist/cjs/post-collapsible-0b8dce97.js.map +1 -0
  22. package/dist/cjs/post-collapsible.cjs.entry.js +4 -5
  23. package/dist/cjs/post-collapsible.cjs.entry.js.map +1 -1
  24. package/dist/cjs/post-components.cjs.js +3 -3
  25. package/dist/cjs/post-components.cjs.js.map +1 -1
  26. package/dist/cjs/post-icon-3dbb7728.js +105 -0
  27. package/dist/cjs/post-icon-3dbb7728.js.map +1 -0
  28. package/dist/cjs/post-icon.cjs.entry.js +5 -6
  29. package/dist/cjs/post-icon.cjs.entry.js.map +1 -1
  30. package/dist/cjs/post-popover-ea22d235.js +118 -0
  31. package/dist/cjs/post-popover-ea22d235.js.map +1 -0
  32. package/dist/cjs/post-popover.cjs.entry.js +13 -0
  33. package/dist/cjs/post-popover.cjs.entry.js.map +1 -0
  34. package/dist/cjs/post-popovercontainer-42e4ab15.js +1878 -0
  35. package/dist/cjs/post-popovercontainer-42e4ab15.js.map +1 -0
  36. package/dist/cjs/post-popovercontainer.cjs.entry.js +13 -0
  37. package/dist/cjs/post-popovercontainer.cjs.entry.js.map +1 -0
  38. package/dist/cjs/post-tab-header-09074905.js +33 -0
  39. package/dist/cjs/{post-tab-header-a3845fe5.js.map → post-tab-header-09074905.js.map} +1 -1
  40. package/dist/cjs/post-tab-header.cjs.entry.js +4 -4
  41. package/dist/cjs/post-tab-panel-9547b9ac.js +27 -0
  42. package/dist/cjs/{post-tab-panel-b7326ff8.js.map → post-tab-panel-9547b9ac.js.map} +1 -1
  43. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  44. package/dist/cjs/post-tabs-2ec2778e.js +153 -0
  45. package/dist/cjs/post-tabs-2ec2778e.js.map +1 -0
  46. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  47. package/dist/cjs/{post-tooltip-2becc97a.js → post-tooltip-c802c51f.js} +78 -1754
  48. package/dist/cjs/post-tooltip-c802c51f.js.map +1 -0
  49. package/dist/cjs/post-tooltip.cjs.entry.js +3 -4
  50. package/dist/cjs/post-tooltip.cjs.entry.js.map +1 -1
  51. package/dist/collection/animations/collapse.js +5 -5
  52. package/dist/collection/animations/collapse.js.map +1 -1
  53. package/dist/collection/collection-manifest.json +5 -3
  54. package/dist/collection/components/post-accordion/post-accordion.js +167 -166
  55. package/dist/collection/components/post-accordion/post-accordion.js.map +1 -1
  56. package/dist/collection/components/post-alert/post-alert.css +2 -2
  57. package/dist/collection/components/post-alert/post-alert.js +246 -246
  58. package/dist/collection/components/post-alert/post-alert.js.map +1 -1
  59. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
  60. package/dist/collection/components/post-collapsible/post-collapsible.js +170 -169
  61. package/dist/collection/components/post-collapsible/post-collapsible.js.map +1 -1
  62. package/dist/collection/components/post-icon/post-icon.css +1 -1
  63. package/dist/collection/components/post-icon/post-icon.js +250 -250
  64. package/dist/collection/components/post-icon/post-icon.js.map +1 -1
  65. package/dist/collection/components/post-popover/post-popover.css +3 -0
  66. package/dist/collection/components/post-popover/post-popover.js +267 -0
  67. package/dist/collection/components/post-popover/post-popover.js.map +1 -0
  68. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -0
  69. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +288 -0
  70. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js.map +1 -0
  71. package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
  72. package/dist/collection/components/post-tab-header/post-tab-header.js +62 -62
  73. package/dist/collection/components/post-tab-header/post-tab-header.js.map +1 -1
  74. package/dist/collection/components/post-tab-panel/post-tab-panel.js +50 -50
  75. package/dist/collection/components/post-tab-panel/post-tab-panel.js.map +1 -1
  76. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  77. package/dist/collection/components/post-tabs/post-tabs.js +224 -223
  78. package/dist/collection/components/post-tabs/post-tabs.js.map +1 -1
  79. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  80. package/dist/collection/components/post-tooltip/post-tooltip.js +192 -325
  81. package/dist/collection/components/post-tooltip/post-tooltip.js.map +1 -1
  82. package/dist/collection/index.js +3 -0
  83. package/dist/collection/index.js.map +1 -1
  84. package/dist/collection/utils/is-motion-reduced.js +1 -1
  85. package/dist/collection/utils/is-motion-reduced.js.map +1 -1
  86. package/dist/collection/utils/property-checkers/check-non-empty.js +3 -3
  87. package/dist/collection/utils/property-checkers/check-non-empty.js.map +1 -1
  88. package/dist/collection/utils/property-checkers/check-one-of.js +2 -2
  89. package/dist/collection/utils/property-checkers/check-one-of.js.map +1 -1
  90. package/dist/collection/utils/property-checkers/check-pattern.js +2 -2
  91. package/dist/collection/utils/property-checkers/check-pattern.js.map +1 -1
  92. package/dist/collection/utils/property-checkers/check-type.js +10 -10
  93. package/dist/collection/utils/property-checkers/check-type.js.map +1 -1
  94. package/dist/collection/utils/property-checkers/empty-or.js +5 -5
  95. package/dist/collection/utils/property-checkers/empty-or.js.map +1 -1
  96. package/dist/components/check-non-empty.js +3 -3
  97. package/dist/components/check-non-empty.js.map +1 -1
  98. package/dist/components/index.js +3 -0
  99. package/dist/components/index.js.map +1 -1
  100. package/dist/components/index2.js +22 -18
  101. package/dist/components/index2.js.map +1 -1
  102. package/dist/components/package.js +1 -1
  103. package/dist/components/post-accordion.d.ts +2 -2
  104. package/dist/components/post-accordion.js +1 -101
  105. package/dist/components/post-accordion.js.map +1 -1
  106. package/dist/components/post-accordion2.js +105 -0
  107. package/dist/components/post-accordion2.js.map +1 -0
  108. package/dist/components/post-alert.d.ts +2 -2
  109. package/dist/components/post-alert2.js +119 -119
  110. package/dist/components/post-alert2.js.map +1 -1
  111. package/dist/components/post-collapsible.d.ts +2 -2
  112. package/dist/components/post-collapsible2.js +91 -91
  113. package/dist/components/post-collapsible2.js.map +1 -1
  114. package/dist/components/post-icon.d.ts +2 -2
  115. package/dist/components/post-icon2.js +118 -118
  116. package/dist/components/post-icon2.js.map +1 -1
  117. package/dist/components/post-popover.d.ts +11 -0
  118. package/dist/components/post-popover.js +8 -0
  119. package/dist/components/post-popover.js.map +1 -0
  120. package/dist/components/post-popover2.js +144 -0
  121. package/dist/components/post-popover2.js.map +1 -0
  122. package/dist/components/post-popovercontainer.d.ts +11 -0
  123. package/dist/components/post-popovercontainer.js +8 -0
  124. package/dist/components/post-popovercontainer.js.map +1 -0
  125. package/dist/components/post-popovercontainer2.js +1897 -0
  126. package/dist/components/post-popovercontainer2.js.map +1 -0
  127. package/dist/components/post-tab-header.d.ts +2 -2
  128. package/dist/components/post-tab-header2.js +38 -38
  129. package/dist/components/post-tab-header2.js.map +1 -1
  130. package/dist/components/post-tab-panel.d.ts +2 -2
  131. package/dist/components/post-tab-panel2.js +30 -30
  132. package/dist/components/post-tab-panel2.js.map +1 -1
  133. package/dist/components/post-tabs.d.ts +2 -2
  134. package/dist/components/post-tabs2.js +147 -147
  135. package/dist/components/post-tabs2.js.map +1 -1
  136. package/dist/components/post-tooltip.d.ts +2 -2
  137. package/dist/components/post-tooltip2.js +100 -1774
  138. package/dist/components/post-tooltip2.js.map +1 -1
  139. package/dist/docs.d.ts +1 -21
  140. package/dist/docs.json +610 -78
  141. package/dist/esm/check-non-empty-58bd6b17.js +11 -0
  142. package/dist/esm/{check-non-empty-09c39561.js.map → check-non-empty-58bd6b17.js.map} +1 -1
  143. package/dist/esm/index-1427953c.js +40 -0
  144. package/dist/esm/index-1427953c.js.map +1 -0
  145. package/dist/esm/{index-08d62a75.js → index-35998e08.js} +79 -59
  146. package/dist/esm/index-35998e08.js.map +1 -0
  147. package/dist/esm/index.js +14 -12
  148. package/dist/esm/index.js.map +1 -1
  149. package/dist/esm/loader.js +3 -3
  150. package/dist/esm/package-337354c3.js +5 -0
  151. package/dist/esm/package-337354c3.js.map +1 -0
  152. package/dist/esm/post-accordion-c2013bb3.js +85 -0
  153. package/dist/esm/post-accordion-c2013bb3.js.map +1 -0
  154. package/dist/esm/post-accordion.entry.js +3 -83
  155. package/dist/esm/post-accordion.entry.js.map +1 -1
  156. package/dist/esm/post-alert-7254a70f.js +99 -0
  157. package/dist/esm/{post-alert-46926902.js.map → post-alert-7254a70f.js.map} +1 -1
  158. package/dist/esm/post-alert.entry.js +5 -6
  159. package/dist/esm/post-alert.entry.js.map +1 -1
  160. package/dist/esm/post-collapsible-4464cc98.js +91 -0
  161. package/dist/esm/post-collapsible-4464cc98.js.map +1 -0
  162. package/dist/esm/post-collapsible.entry.js +4 -5
  163. package/dist/esm/post-collapsible.entry.js.map +1 -1
  164. package/dist/esm/post-components.js +4 -4
  165. package/dist/esm/post-components.js.map +1 -1
  166. package/dist/esm/post-icon-e0bbf0f5.js +103 -0
  167. package/dist/esm/post-icon-e0bbf0f5.js.map +1 -0
  168. package/dist/esm/post-icon.entry.js +5 -6
  169. package/dist/esm/post-icon.entry.js.map +1 -1
  170. package/dist/esm/post-popover-25eb3f76.js +116 -0
  171. package/dist/esm/post-popover-25eb3f76.js.map +1 -0
  172. package/dist/esm/post-popover.entry.js +5 -0
  173. package/dist/esm/post-popover.entry.js.map +1 -0
  174. package/dist/esm/post-popovercontainer-54117eea.js +1876 -0
  175. package/dist/esm/post-popovercontainer-54117eea.js.map +1 -0
  176. package/dist/esm/post-popovercontainer.entry.js +5 -0
  177. package/dist/esm/post-popovercontainer.entry.js.map +1 -0
  178. package/dist/esm/post-tab-header-1684b507.js +31 -0
  179. package/dist/esm/{post-tab-header-84b12382.js.map → post-tab-header-1684b507.js.map} +1 -1
  180. package/dist/esm/post-tab-header.entry.js +4 -4
  181. package/dist/esm/post-tab-panel-add26fe5.js +25 -0
  182. package/dist/esm/{post-tab-panel-216c0b6e.js.map → post-tab-panel-add26fe5.js.map} +1 -1
  183. package/dist/esm/post-tab-panel.entry.js +3 -3
  184. package/dist/esm/post-tabs-d738e61f.js +151 -0
  185. package/dist/esm/post-tabs-d738e61f.js.map +1 -0
  186. package/dist/esm/post-tabs.entry.js +3 -3
  187. package/dist/esm/{post-tooltip-47f2146d.js → post-tooltip-57928808.js} +78 -1754
  188. package/dist/esm/post-tooltip-57928808.js.map +1 -0
  189. package/dist/esm/post-tooltip.entry.js +3 -4
  190. package/dist/esm/post-tooltip.entry.js.map +1 -1
  191. package/dist/post-components/index.esm.js +1 -1
  192. package/dist/post-components/p-05e85f2b.entry.js +2 -0
  193. package/dist/post-components/p-08abd53e.entry.js +2 -0
  194. package/dist/post-components/p-09892ad1.js +2 -0
  195. package/dist/post-components/{p-57b48dff.js.map → p-09892ad1.js.map} +1 -1
  196. package/dist/post-components/p-1e9ec4a9.entry.js +2 -0
  197. package/dist/post-components/p-1f55663e.js +2 -0
  198. package/dist/post-components/p-1f55663e.js.map +1 -0
  199. package/dist/post-components/p-30c60b6c.entry.js +2 -0
  200. package/dist/post-components/p-38d97f62.entry.js +2 -0
  201. package/dist/post-components/p-4c188911.entry.js +2 -0
  202. package/dist/post-components/p-568bb469.entry.js +2 -0
  203. package/dist/post-components/p-65c8bd5c.entry.js +2 -0
  204. package/dist/post-components/p-6e3158e8.js +2 -0
  205. package/dist/post-components/{p-21549a50.js.map → p-6e3158e8.js.map} +1 -1
  206. package/dist/post-components/p-7d32dfb7.js +2 -0
  207. package/dist/post-components/{p-57fdeeab.js.map → p-7d32dfb7.js.map} +1 -1
  208. package/dist/post-components/p-81591ad0.js +3 -0
  209. package/dist/post-components/p-81591ad0.js.map +1 -0
  210. package/dist/post-components/p-96f4ebc4.js +2 -0
  211. package/dist/post-components/p-96f4ebc4.js.map +1 -0
  212. package/dist/post-components/p-9bd5f824.js +2 -0
  213. package/dist/post-components/p-9bd5f824.js.map +1 -0
  214. package/dist/post-components/{p-b531475e.js → p-b095519d.js} +1 -1
  215. package/dist/post-components/p-b4b4f59a.js +2 -0
  216. package/dist/post-components/p-bd032124.js +2 -0
  217. package/dist/post-components/p-bd032124.js.map +1 -0
  218. package/dist/post-components/p-c5858d52.entry.js +2 -0
  219. package/dist/post-components/p-c5858d52.entry.js.map +1 -0
  220. package/dist/post-components/{p-ce907090.entry.js → p-dbd07f20.js} +2 -2
  221. package/dist/post-components/p-de493e36.js +2 -0
  222. package/dist/post-components/p-de493e36.js.map +1 -0
  223. package/dist/post-components/p-eaddd6cc.js +2 -0
  224. package/dist/post-components/p-eaddd6cc.js.map +1 -0
  225. package/dist/post-components/p-ed73d4c0.entry.js +2 -0
  226. package/dist/post-components/p-ed73d4c0.entry.js.map +1 -0
  227. package/dist/post-components/p-f994dce8.js +9 -0
  228. package/dist/post-components/p-f994dce8.js.map +1 -0
  229. package/dist/post-components/post-components.esm.js +1 -1
  230. package/dist/post-components/post-components.esm.js.map +1 -1
  231. package/dist/types/components/post-accordion/post-accordion.d.ts +26 -26
  232. package/dist/types/components/post-alert/post-alert.d.ts +45 -45
  233. package/dist/types/components/post-collapsible/post-collapsible.d.ts +31 -31
  234. package/dist/types/components/post-icon/post-icon.d.ts +43 -43
  235. package/dist/types/components/post-popover/post-popover.d.ts +53 -0
  236. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +62 -0
  237. package/dist/types/components/post-tab-header/post-tab-header.d.ts +9 -9
  238. package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +8 -8
  239. package/dist/types/components/post-tabs/post-tabs.d.ts +32 -32
  240. package/dist/types/components/post-tooltip/post-tooltip.d.ts +35 -62
  241. package/dist/types/components.d.ts +115 -10
  242. package/dist/types/index.d.ts +3 -0
  243. package/dist/types/stencil-public-runtime.d.ts +8 -0
  244. package/package.json +16 -14
  245. package/dist/cjs/check-non-empty-ae713942.js.map +0 -1
  246. package/dist/cjs/check-one-of-27ad3154.js +0 -10
  247. package/dist/cjs/check-one-of-27ad3154.js.map +0 -1
  248. package/dist/cjs/index-b38a23e0.js +0 -41
  249. package/dist/cjs/index-b38a23e0.js.map +0 -1
  250. package/dist/cjs/index-e7618bb3.js.map +0 -1
  251. package/dist/cjs/package-041a8597.js +0 -7
  252. package/dist/cjs/package-041a8597.js.map +0 -1
  253. package/dist/cjs/post-alert-1fb90f2d.js +0 -101
  254. package/dist/cjs/post-collapsible-e46002bb.js +0 -93
  255. package/dist/cjs/post-collapsible-e46002bb.js.map +0 -1
  256. package/dist/cjs/post-icon-91f6603a.js +0 -105
  257. package/dist/cjs/post-icon-91f6603a.js.map +0 -1
  258. package/dist/cjs/post-tab-header-a3845fe5.js +0 -33
  259. package/dist/cjs/post-tab-panel-b7326ff8.js +0 -27
  260. package/dist/cjs/post-tabs-384a1fab.js +0 -153
  261. package/dist/cjs/post-tabs-384a1fab.js.map +0 -1
  262. package/dist/cjs/post-tooltip-2becc97a.js.map +0 -1
  263. package/dist/components/check-one-of.js +0 -8
  264. package/dist/components/check-one-of.js.map +0 -1
  265. package/dist/esm/check-non-empty-09c39561.js +0 -11
  266. package/dist/esm/check-one-of-74750af9.js +0 -8
  267. package/dist/esm/check-one-of-74750af9.js.map +0 -1
  268. package/dist/esm/index-08d62a75.js.map +0 -1
  269. package/dist/esm/index-35921354.js +0 -36
  270. package/dist/esm/index-35921354.js.map +0 -1
  271. package/dist/esm/package-a962a93d.js +0 -5
  272. package/dist/esm/package-a962a93d.js.map +0 -1
  273. package/dist/esm/post-alert-46926902.js +0 -99
  274. package/dist/esm/post-collapsible-f1b6592d.js +0 -91
  275. package/dist/esm/post-collapsible-f1b6592d.js.map +0 -1
  276. package/dist/esm/post-icon-fb627697.js +0 -103
  277. package/dist/esm/post-icon-fb627697.js.map +0 -1
  278. package/dist/esm/post-tab-header-84b12382.js +0 -31
  279. package/dist/esm/post-tab-panel-216c0b6e.js +0 -25
  280. package/dist/esm/post-tabs-e235d663.js +0 -151
  281. package/dist/esm/post-tabs-e235d663.js.map +0 -1
  282. package/dist/esm/post-tooltip-47f2146d.js.map +0 -1
  283. package/dist/post-components/p-03fe58da.js +0 -2
  284. package/dist/post-components/p-03fe58da.js.map +0 -1
  285. package/dist/post-components/p-1339f8cd.js +0 -2
  286. package/dist/post-components/p-1339f8cd.js.map +0 -1
  287. package/dist/post-components/p-151b55c0.entry.js +0 -2
  288. package/dist/post-components/p-21549a50.js +0 -2
  289. package/dist/post-components/p-4cb18ddf.js +0 -9
  290. package/dist/post-components/p-4cb18ddf.js.map +0 -1
  291. package/dist/post-components/p-4e24f13b.entry.js +0 -2
  292. package/dist/post-components/p-57b48dff.js +0 -2
  293. package/dist/post-components/p-57fdeeab.js +0 -2
  294. package/dist/post-components/p-58cc7b5a.entry.js +0 -2
  295. package/dist/post-components/p-6cafa644.entry.js +0 -2
  296. package/dist/post-components/p-7f370d77.entry.js +0 -2
  297. package/dist/post-components/p-7f4eba57.js +0 -2
  298. package/dist/post-components/p-8c006e7d.js +0 -3
  299. package/dist/post-components/p-8c006e7d.js.map +0 -1
  300. package/dist/post-components/p-aee47e1a.entry.js +0 -2
  301. package/dist/post-components/p-b5e1fd89.js +0 -2
  302. package/dist/post-components/p-b5e1fd89.js.map +0 -1
  303. package/dist/post-components/p-d13111f2.js +0 -2
  304. package/dist/post-components/p-dfe29f7f.js +0 -2
  305. package/dist/post-components/p-dfe29f7f.js.map +0 -1
  306. package/dist/post-components/p-f35c2075.entry.js +0 -2
  307. /package/dist/post-components/{p-151b55c0.entry.js.map → p-05e85f2b.entry.js.map} +0 -0
  308. /package/dist/post-components/{p-4e24f13b.entry.js.map → p-08abd53e.entry.js.map} +0 -0
  309. /package/dist/post-components/{p-58cc7b5a.entry.js.map → p-1e9ec4a9.entry.js.map} +0 -0
  310. /package/dist/post-components/{p-6cafa644.entry.js.map → p-30c60b6c.entry.js.map} +0 -0
  311. /package/dist/post-components/{p-7f370d77.entry.js.map → p-38d97f62.entry.js.map} +0 -0
  312. /package/dist/post-components/{p-aee47e1a.entry.js.map → p-4c188911.entry.js.map} +0 -0
  313. /package/dist/post-components/{p-d13111f2.js.map → p-568bb469.entry.js.map} +0 -0
  314. /package/dist/post-components/{p-f35c2075.entry.js.map → p-65c8bd5c.entry.js.map} +0 -0
  315. /package/dist/post-components/{p-b531475e.js.map → p-b095519d.js.map} +0 -0
  316. /package/dist/post-components/{p-7f4eba57.js.map → p-b4b4f59a.js.map} +0 -0
  317. /package/dist/post-components/{p-ce907090.entry.js.map → p-dbd07f20.js.map} +0 -0
@@ -3,11 +3,11 @@
3
3
  const constants = require('./constants-238701d3.js');
4
4
 
5
5
  function checkNonEmpty(value, error) {
6
- if (constants.EMPTY_VALUES.some(v => v === value)) {
7
- throw new Error(error);
8
- }
6
+ if (constants.EMPTY_VALUES.some(v => v === value)) {
7
+ throw new Error(error);
8
+ }
9
9
  }
10
10
 
11
11
  exports.checkNonEmpty = checkNonEmpty;
12
12
 
13
- //# sourceMappingURL=check-non-empty-ae713942.js.map
13
+ //# sourceMappingURL=check-non-empty-eeaa8f77.js.map
@@ -0,0 +1 @@
1
+ {"file":"check-non-empty-eeaa8f77.js","mappings":";;;;SAEgB,aAAa,CAAC,KAAc,EAAE,KAAa;IACzD,IAAIA,sBAAY,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;KACxB;AACH;;;;","names":["EMPTY_VALUES"],"sources":["src/utils/property-checkers/check-non-empty.ts"],"sourcesContent":["import { EMPTY_VALUES } from './constants';\n\nexport function checkNonEmpty(value: unknown, error: string) {\n if (EMPTY_VALUES.some(v => v === value)) {\n throw new Error(error);\n }\n}\n"],"version":3}
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ const constants = require('./constants-238701d3.js');
4
+
5
+ function emptyOr(check) {
6
+ return (...args) => {
7
+ const value = args[0];
8
+ if (!constants.EMPTY_VALUES.some(v => v === value))
9
+ check(...args);
10
+ };
11
+ }
12
+
13
+ function checkOneOf(value, possibleValues, error) {
14
+ if (!possibleValues.includes(value))
15
+ throw new Error(error);
16
+ }
17
+
18
+ function checkPattern(value, pattern, errorMessage) {
19
+ if (typeof value !== 'string' || !pattern.test(value))
20
+ throw new Error(errorMessage);
21
+ }
22
+
23
+ function checkType(value, type, error) {
24
+ const typeIsArray = type === 'array';
25
+ const valueIsArray = Array.isArray(value);
26
+ if (typeIsArray || valueIsArray) {
27
+ if (valueIsArray !== typeIsArray)
28
+ throw new Error(error);
29
+ }
30
+ else {
31
+ if (typeof value !== type)
32
+ throw new Error(error);
33
+ }
34
+ }
35
+
36
+ const checkEmptyOrOneOf = emptyOr(checkOneOf);
37
+ const checkEmptyOrPattern = emptyOr(checkPattern);
38
+ const checkEmptyOrType = emptyOr(checkType);
39
+
40
+ exports.checkEmptyOrOneOf = checkEmptyOrOneOf;
41
+ exports.checkEmptyOrPattern = checkEmptyOrPattern;
42
+ exports.checkEmptyOrType = checkEmptyOrType;
43
+ exports.checkType = checkType;
44
+
45
+ //# sourceMappingURL=index-8c288b1a.js.map
@@ -0,0 +1 @@
1
+ {"file":"index-8c288b1a.js","mappings":";;;;SAEgB,OAAO,CAAsB,KAA2B;IACtE,OAAO,CAAC,GAAG,IAAO;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,CAACA,sBAAY,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC;YAAE,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;KAC1D,CAAC;AACJ;;SCPgB,UAAU,CAAI,KAAQ,EAAE,cAA4B,EAAE,KAAa;IACjF,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;AAC9D;;SCFgB,YAAY,CAAC,KAAc,EAAE,OAAe,EAAE,YAAoB;IAChF,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;AACvF;;SCMgB,SAAS,CAAC,KAAc,EAAE,IAAkB,EAAE,KAAa;IACzE,MAAM,WAAW,GAAG,IAAI,KAAK,OAAO,CAAC;IACrC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAE1C,IAAI,WAAW,IAAI,YAAY,EAAE;QAC/B,IAAI,YAAY,KAAK,WAAW;YAAE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;KAC1D;SAAM;QACL,IAAI,OAAO,KAAK,KAAK,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;KACnD;AACH;;MCZa,iBAAiB,GAAG,OAAO,CAAC,UAAU,EAAE;MACxC,mBAAmB,GAAG,OAAO,CAAC,YAAY,EAAE;MAC5C,gBAAgB,GAAG,OAAO,CAAC,SAAS;;;;;;;","names":["EMPTY_VALUES"],"sources":["src/utils/property-checkers/empty-or.ts","src/utils/property-checkers/check-one-of.ts","src/utils/property-checkers/check-pattern.ts","src/utils/property-checkers/check-type.ts","src/utils/property-checkers/index.ts"],"sourcesContent":["import { EMPTY_VALUES } from './constants';\n\nexport function emptyOr<T extends unknown[]>(check: (...args: T) => void) {\n return (...args: T) => {\n const value = args[0];\n if (!EMPTY_VALUES.some(v => v === value)) check(...args);\n };\n}\n","export function checkOneOf<T>(value: T, possibleValues: readonly T[], error: string) {\n if (!possibleValues.includes(value)) throw new Error(error);\n}\n","export function checkPattern(value: unknown, pattern: RegExp, errorMessage: string) {\n if (typeof value !== 'string' || !pattern.test(value)) throw new Error(errorMessage);\n}\n","export type PropertyType =\n | 'boolean'\n | 'number'\n | 'string'\n | 'array'\n | 'object'\n | 'function';\n\nexport function checkType(value: unknown, type: PropertyType, error: string) {\n const typeIsArray = type === 'array';\n const valueIsArray = Array.isArray(value);\n\n if (typeIsArray || valueIsArray) {\n if (valueIsArray !== typeIsArray) throw new Error(error);\n } else {\n if (typeof value !== type) throw new Error(error);\n }\n}\n","import { emptyOr } from './empty-or';\nimport { checkOneOf } from './check-one-of';\nimport { checkPattern } from './check-pattern';\nimport { checkType } from './check-type';\n\nexport const checkEmptyOrOneOf = emptyOr(checkOneOf);\nexport const checkEmptyOrPattern = emptyOr(checkPattern);\nexport const checkEmptyOrType = emptyOr(checkType);\n\nexport * from './check-non-empty';\nexport * from './check-one-of';\nexport * from './check-pattern';\nexport * from './check-type';\n"],"version":3}
@@ -49,6 +49,13 @@ const uniqueTime = (key, measureText) => {
49
49
  }
50
50
  };
51
51
  const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
52
+ /**
53
+ * Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
54
+ *
55
+ * Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
56
+ * support as of Stencil v4.
57
+ */
58
+ const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
52
59
  /**
53
60
  * Default style mode id
54
61
  */
@@ -57,11 +64,6 @@ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
57
64
  * Don't add values to these!!
58
65
  */
59
66
  const EMPTY_OBJ = {};
60
- /**
61
- * Namespaces
62
- */
63
- const SVG_NS = 'http://www.w3.org/2000/svg';
64
- const HTML_NS = 'http://www.w3.org/1999/xhtml';
65
67
  const isDef = (v) => v != null;
66
68
  /**
67
69
  * Check whether a value is a 'complex type', defined here as an object or a
@@ -358,6 +360,10 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
358
360
  }
359
361
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
360
362
  }
363
+ // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
364
+ if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
365
+ styleElm.innerHTML += SLOT_FB_CSS;
366
+ }
361
367
  if (appliedStyles) {
362
368
  appliedStyles.add(scopeId);
363
369
  }
@@ -522,7 +528,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
522
528
  elm[memberName] = newValue;
523
529
  }
524
530
  }
525
- catch (e) { }
531
+ catch (e) {
532
+ /**
533
+ * in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
534
+ */
535
+ }
526
536
  }
527
537
  if (newValue == null || newValue === false) {
528
538
  if (newValue !== false || elm.getAttribute(memberName) === '') {
@@ -541,6 +551,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
541
551
  }
542
552
  };
543
553
  const parseClassListRegex = /\s/;
554
+ /**
555
+ * Parsed a string of classnames into an array
556
+ * @param value className string, e.g. "foo bar baz"
557
+ * @returns list of classes, e.g. ["foo", "bar", "baz"]
558
+ */
544
559
  const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
545
560
  const CAPTURE_EVENT_SUFFIX = 'Capture';
546
561
  const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
@@ -587,15 +602,8 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
587
602
  elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
588
603
  }
589
604
  else {
590
- if (!isSvgMode) {
591
- isSvgMode = newVNode.$tag$ === 'svg';
592
- }
593
605
  // create element
594
- elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
595
- );
596
- if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
597
- isSvgMode = false;
598
- }
606
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
599
607
  // add css classes, attrs, props, listeners, etc.
600
608
  {
601
609
  updateElement(null, newVNode, isSvgMode);
@@ -616,17 +624,10 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
616
624
  }
617
625
  }
618
626
  }
619
- {
620
- if (newVNode.$tag$ === 'svg') {
621
- // Only reset the SVG context when we're exiting <svg> element
622
- isSvgMode = false;
623
- }
624
- else if (elm.tagName === 'foreignObject') {
625
- // Reenter SVG context when we're exiting <foreignObject> element
626
- isSvgMode = true;
627
- }
628
- }
629
627
  }
628
+ // This needs to always happen so we can hide nodes that are projected
629
+ // to another component but don't end up in a slot
630
+ elm['s-hn'] = hostTagName;
630
631
  return elm;
631
632
  };
632
633
  /**
@@ -751,8 +752,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
751
752
  * @param oldCh the old children of the parent node
752
753
  * @param newVNode the new VNode which will replace the parent
753
754
  * @param newCh the new children of the parent node
755
+ * @param isInitialRender whether or not this is the first render of the vdom
754
756
  */
755
- const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
757
+ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
756
758
  let oldStartIdx = 0;
757
759
  let newStartIdx = 0;
758
760
  let idxInOld = 0;
@@ -779,25 +781,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
779
781
  else if (newEndVnode == null) {
780
782
  newEndVnode = newCh[--newEndIdx];
781
783
  }
782
- else if (isSameVnode(oldStartVnode, newStartVnode)) {
784
+ else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
783
785
  // if the start nodes are the same then we should patch the new VNode
784
786
  // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
785
787
  // indices to reflect that. We don't need to move any DOM Nodes around
786
788
  // since things are matched up in order.
787
- patch(oldStartVnode, newStartVnode);
789
+ patch(oldStartVnode, newStartVnode, isInitialRender);
788
790
  oldStartVnode = oldCh[++oldStartIdx];
789
791
  newStartVnode = newCh[++newStartIdx];
790
792
  }
791
- else if (isSameVnode(oldEndVnode, newEndVnode)) {
793
+ else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
792
794
  // likewise, if the end nodes are the same we patch new onto old and
793
795
  // decrement our end indices, and also likewise in this case we don't
794
796
  // need to move any DOM Nodes.
795
- patch(oldEndVnode, newEndVnode);
797
+ patch(oldEndVnode, newEndVnode, isInitialRender);
796
798
  oldEndVnode = oldCh[--oldEndIdx];
797
799
  newEndVnode = newCh[--newEndIdx];
798
800
  }
799
- else if (isSameVnode(oldStartVnode, newEndVnode)) {
800
- patch(oldStartVnode, newEndVnode);
801
+ else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
802
+ patch(oldStartVnode, newEndVnode, isInitialRender);
801
803
  // We need to move the element for `oldStartVnode` into a position which
802
804
  // will be appropriate for `newEndVnode`. For this we can use
803
805
  // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
@@ -819,8 +821,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
819
821
  oldStartVnode = oldCh[++oldStartIdx];
820
822
  newEndVnode = newCh[--newEndIdx];
821
823
  }
822
- else if (isSameVnode(oldEndVnode, newStartVnode)) {
823
- patch(oldEndVnode, newStartVnode);
824
+ else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
825
+ patch(oldEndVnode, newStartVnode, isInitialRender);
824
826
  // We've already checked above if `oldStartVnode` and `newStartVnode` are
825
827
  // the same node, so since we're here we know that they are not. Thus we
826
828
  // can move the element for `oldEndVnode` _before_ the element for
@@ -857,7 +859,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
857
859
  node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
858
860
  }
859
861
  else {
860
- patch(elmToMove, newStartVnode);
862
+ patch(elmToMove, newStartVnode, isInitialRender);
861
863
  // invalidate the matching old node so that we won't try to update it
862
864
  // again later on
863
865
  oldCh[idxInOld] = undefined;
@@ -908,16 +910,22 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
908
910
  *
909
911
  * @param leftVNode the first VNode to check
910
912
  * @param rightVNode the second VNode to check
913
+ * @param isInitialRender whether or not this is the first render of the vdom
911
914
  * @returns whether they're equal or not
912
915
  */
913
- const isSameVnode = (leftVNode, rightVNode) => {
916
+ const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
914
917
  // compare if two vnode to see if they're "technically" the same
915
918
  // need to have the same element tag, and same key to be the same
916
919
  if (leftVNode.$tag$ === rightVNode.$tag$) {
917
- // this will be set if components in the build have `key` attrs set on them
918
- {
920
+ // this will be set if JSX tags in the build have `key` attrs set on them
921
+ // we only want to check this if we're not on the first render since on
922
+ // first render `leftVNode.$key$` will always be `null`, so we can be led
923
+ // astray and, for instance, accidentally delete a DOM node that we want to
924
+ // keep around.
925
+ if (!isInitialRender) {
919
926
  return leftVNode.$key$ === rightVNode.$key$;
920
927
  }
928
+ return true;
921
929
  }
922
930
  return false;
923
931
  };
@@ -928,19 +936,15 @@ const isSameVnode = (leftVNode, rightVNode) => {
928
936
  *
929
937
  * @param oldVNode an old VNode whose DOM element and children we want to update
930
938
  * @param newVNode a new VNode representing an updated version of the old one
939
+ * @param isInitialRender whether or not this is the first render of the vdom
931
940
  */
932
- const patch = (oldVNode, newVNode) => {
941
+ const patch = (oldVNode, newVNode, isInitialRender = false) => {
933
942
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
934
943
  const oldChildren = oldVNode.$children$;
935
944
  const newChildren = newVNode.$children$;
936
945
  const tag = newVNode.$tag$;
937
946
  const text = newVNode.$text$;
938
947
  if (text === null) {
939
- {
940
- // test if we're rendering an svg element, or still rendering nodes inside of one
941
- // only add this to the when the compiler sees we're using an svg somewhere
942
- isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
943
- }
944
948
  {
945
949
  if (tag === 'slot')
946
950
  ;
@@ -954,7 +958,7 @@ const patch = (oldVNode, newVNode) => {
954
958
  if (oldChildren !== null && newChildren !== null) {
955
959
  // looks like there's child vnodes for both the old and new vnodes
956
960
  // so we need to call `updateChildren` to reconcile them
957
- updateChildren(elm, oldChildren, newVNode, newChildren);
961
+ updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
958
962
  }
959
963
  else if (newChildren !== null) {
960
964
  // no old child vnodes, but there are new child vnodes to add
@@ -969,9 +973,6 @@ const patch = (oldVNode, newVNode) => {
969
973
  // no new child vnodes, but there are old child vnodes to remove
970
974
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
971
975
  }
972
- if (isSvgMode && tag === 'svg') {
973
- isSvgMode = false;
974
- }
975
976
  }
976
977
  else if (oldVNode.$text$ !== text) {
977
978
  // update the text content for the text only vnode
@@ -1044,7 +1045,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1044
1045
  scopeId = hostElm['s-sc'];
1045
1046
  }
1046
1047
  // synchronous patch
1047
- patch(oldVNode, rootVnode);
1048
+ patch(oldVNode, rootVnode, isInitialLoad);
1048
1049
  };
1049
1050
  const attachToAncestor = (hostRef, ancestorComponent) => {
1050
1051
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
@@ -1361,13 +1362,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1361
1362
  */
1362
1363
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1363
1364
  var _a;
1365
+ const prototype = Cstr.prototype;
1364
1366
  if (cmpMeta.$members$) {
1365
1367
  if (Cstr.watchers) {
1366
1368
  cmpMeta.$watchers$ = Cstr.watchers;
1367
1369
  }
1368
1370
  // It's better to have a const than two Object.entries()
1369
1371
  const members = Object.entries(cmpMeta.$members$);
1370
- const prototype = Cstr.prototype;
1371
1372
  members.map(([memberName, [memberFlags]]) => {
1372
1373
  if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1373
1374
  ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
@@ -1390,8 +1391,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1390
1391
  // proxyComponent - method
1391
1392
  Object.defineProperty(prototype, memberName, {
1392
1393
  value(...args) {
1394
+ var _a;
1393
1395
  const ref = getHostRef(this);
1394
- return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));
1396
+ return (_a = ref === null || ref === void 0 ? void 0 : ref.$onInstancePromise$) === null || _a === void 0 ? void 0 : _a.then(() => { var _a; return (_a = ref.$lazyInstance$) === null || _a === void 0 ? void 0 : _a[memberName](...args); });
1395
1397
  },
1396
1398
  });
1397
1399
  }
@@ -1400,6 +1402,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1400
1402
  const attrNameToPropName = new Map();
1401
1403
  prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1402
1404
  plt.jmp(() => {
1405
+ var _a;
1403
1406
  const propName = attrNameToPropName.get(attrName);
1404
1407
  // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1405
1408
  // in the case where an attribute was set inline.
@@ -1455,11 +1458,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1455
1458
  // 1. The instance is ready
1456
1459
  // 2. The watchers are ready
1457
1460
  // 3. The value has changed
1458
- if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1461
+ if (flags &&
1462
+ !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1459
1463
  flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1460
1464
  newValue !== oldValue) {
1461
1465
  const instance = hostRef.$lazyInstance$ ;
1462
- const entry = cmpMeta.$watchers$[attrName];
1466
+ const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
1463
1467
  entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1464
1468
  if (instance[callbackName] != null) {
1465
1469
  instance[callbackName].call(instance, newValue, oldValue, attrName);
@@ -1669,12 +1673,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1669
1673
  const customElements = win.customElements;
1670
1674
  const head = doc.head;
1671
1675
  const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1672
- const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1676
+ const dataStyles = /*@__PURE__*/ doc.createElement('style');
1673
1677
  const deferredConnectedCallbacks = [];
1674
1678
  let appLoadFallback;
1675
1679
  let isBootstrapping = true;
1676
1680
  Object.assign(plt, options);
1677
1681
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1682
+ let hasSlotRelocation = false;
1678
1683
  lazyBundles.map((lazyBundle) => {
1679
1684
  lazyBundle[1].map((compactMeta) => {
1680
1685
  var _a;
@@ -1684,6 +1689,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1684
1689
  $members$: compactMeta[2],
1685
1690
  $listeners$: compactMeta[3],
1686
1691
  };
1692
+ // Check if we are using slots outside the shadow DOM in this component.
1693
+ // We'll use this information later to add styles for `slot-fb` elements
1694
+ if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
1695
+ hasSlotRelocation = true;
1696
+ }
1687
1697
  {
1688
1698
  cmpMeta.$members$ = compactMeta[2];
1689
1699
  }
@@ -1740,15 +1750,25 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1740
1750
  }
1741
1751
  });
1742
1752
  });
1753
+ // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
1754
+ if (hasSlotRelocation) {
1755
+ dataStyles.innerHTML += SLOT_FB_CSS;
1756
+ }
1757
+ // Add hydration styles
1743
1758
  {
1744
- visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1745
- visibilityStyle.setAttribute('data-styles', '');
1759
+ dataStyles.innerHTML += cmpTags + HYDRATED_CSS;
1760
+ }
1761
+ // If we have styles, add them to the DOM
1762
+ if (dataStyles.innerHTML.length) {
1763
+ dataStyles.setAttribute('data-styles', '');
1746
1764
  // Apply CSP nonce to the style tag if it exists
1747
1765
  const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1748
1766
  if (nonce != null) {
1749
- visibilityStyle.setAttribute('nonce', nonce);
1767
+ dataStyles.setAttribute('nonce', nonce);
1750
1768
  }
1751
- head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1769
+ // Insert the styles into the document head
1770
+ // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
1771
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1752
1772
  }
1753
1773
  // Process deferred connectedCallbacks now all components have been registered
1754
1774
  isBootstrapping = false;
@@ -1933,7 +1953,7 @@ const flush = () => {
1933
1953
  }
1934
1954
  }
1935
1955
  };
1936
- const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1956
+ const nextTick = (cb) => promiseResolve().then(cb);
1937
1957
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1938
1958
 
1939
1959
  exports.Host = Host;
@@ -1945,4 +1965,4 @@ exports.promiseResolve = promiseResolve;
1945
1965
  exports.registerInstance = registerInstance;
1946
1966
  exports.setNonce = setNonce;
1947
1967
 
1948
- //# sourceMappingURL=index-e7618bb3.js.map
1968
+ //# sourceMappingURL=index-c07c0cdb.js.map