ngwr 15.5.0 → 15.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 (775) hide show
  1. package/README.md +3 -4
  2. package/affix/styles/_index.scss +2 -0
  3. package/alert/styles/_index.scss +18 -0
  4. package/anchor/styles/_index.scss +1 -0
  5. package/animations/aurora/styles/_index.scss +44 -0
  6. package/animations/blur-reveal/styles/_index.scss +70 -0
  7. package/animations/click-sparks/styles/_index.scss +88 -0
  8. package/animations/confetti/styles/_index.scss +35 -0
  9. package/animations/core/styles/_mixins.scss +21 -0
  10. package/animations/decode/styles/_index.scss +68 -0
  11. package/animations/destruct/styles/_index.scss +31 -0
  12. package/animations/dot-grid/styles/_index.scss +41 -0
  13. package/animations/falling-letters/styles/_index.scss +72 -0
  14. package/animations/flow-lines/styles/_index.scss +39 -0
  15. package/animations/fluid-cursor/styles/_index.scss +44 -0
  16. package/animations/glitch/styles/_index.scss +189 -0
  17. package/animations/glow-border/styles/_index.scss +89 -0
  18. package/animations/gradient-flow/styles/_index.scss +101 -0
  19. package/animations/marquee/styles/_index.scss +179 -0
  20. package/animations/orbit/styles/_index.scss +77 -0
  21. package/animations/reveal/styles/_index.scss +96 -0
  22. package/animations/ripple-grid/styles/_index.scss +42 -0
  23. package/animations/rotate-reveal/styles/_index.scss +132 -0
  24. package/animations/shimmer/styles/_index.scss +102 -0
  25. package/animations/spotlight/styles/_index.scss +119 -0
  26. package/animations/thread-lines/styles/_index.scss +41 -0
  27. package/animations/typewriter/styles/_index.scss +94 -0
  28. package/avatar/styles/_index.scss +44 -4
  29. package/back-top/styles/_index.scss +1 -0
  30. package/badge/styles/_index.scss +1 -0
  31. package/breadcrumbs/styles/_index.scss +1 -0
  32. package/burger/styles/_index.scss +1 -0
  33. package/button/styles/_index.scss +1 -0
  34. package/calendar/styles/_index.scss +1 -0
  35. package/card/styles/_index.scss +1 -0
  36. package/carousel/styles/_index.scss +1 -0
  37. package/cascader/styles/_index.scss +1 -0
  38. package/charts/bar-chart/styles/_index.scss +1 -0
  39. package/charts/boxplot-chart/styles/_index.scss +1 -0
  40. package/charts/bullet-chart/styles/_index.scss +1 -0
  41. package/charts/calendar-heatmap/styles/_index.scss +1 -0
  42. package/charts/candlestick-chart/styles/_index.scss +1 -0
  43. package/charts/chart-legend/styles/_index.scss +1 -0
  44. package/charts/donut-chart/styles/_index.scss +1 -0
  45. package/charts/funnel-chart/styles/_index.scss +1 -0
  46. package/charts/gauge/styles/_index.scss +1 -0
  47. package/charts/heatmap-chart/styles/_index.scss +1 -0
  48. package/charts/line-chart/styles/_index.scss +1 -0
  49. package/charts/meter-group/styles/_index.scss +1 -0
  50. package/charts/radar-chart/styles/_index.scss +1 -0
  51. package/charts/scatter-chart/styles/_index.scss +1 -0
  52. package/charts/sparkline/styles/_index.scss +2 -0
  53. package/charts/treemap-chart/styles/_index.scss +1 -0
  54. package/charts/waterfall-chart/styles/_index.scss +1 -0
  55. package/checkbox/styles/_index.scss +1 -0
  56. package/collapse/styles/_index.scss +1 -0
  57. package/color-picker/styles/_index.scss +1 -0
  58. package/command-palette/styles/_index.scss +1 -0
  59. package/comment/styles/_index.scss +1 -0
  60. package/compare/styles/_index.scss +1 -0
  61. package/context-menu/styles/_index.scss +1 -0
  62. package/counter/styles/_index.scss +1 -0
  63. package/date-picker/styles/_index.scss +29 -13
  64. package/density/styles/_index.scss +2 -0
  65. package/descriptions/styles/_index.scss +1 -0
  66. package/dialog/styles/_index.scss +1 -0
  67. package/divider/styles/_index.scss +1 -0
  68. package/drawer/styles/_index.scss +1 -0
  69. package/dropdown/styles/_index.scss +1 -0
  70. package/editor/styles/_index.scss +1 -0
  71. package/empty/styles/_index.scss +1 -0
  72. package/event-calendar/styles/_index.scss +1 -0
  73. package/fesm2022/ngwr-affix.mjs +5 -3
  74. package/fesm2022/ngwr-affix.mjs.map +1 -1
  75. package/fesm2022/ngwr-alert.mjs +10 -6
  76. package/fesm2022/ngwr-alert.mjs.map +1 -1
  77. package/fesm2022/ngwr-anchor.mjs +5 -3
  78. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  79. package/fesm2022/ngwr-animations-aurora.mjs +1000 -0
  80. package/fesm2022/ngwr-animations-aurora.mjs.map +1 -0
  81. package/fesm2022/ngwr-animations-blur-reveal.mjs +227 -0
  82. package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -0
  83. package/fesm2022/ngwr-animations-click-sparks.mjs +145 -0
  84. package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -0
  85. package/fesm2022/ngwr-animations-confetti.mjs +233 -0
  86. package/fesm2022/ngwr-animations-confetti.mjs.map +1 -0
  87. package/fesm2022/ngwr-animations-core.mjs +343 -0
  88. package/fesm2022/ngwr-animations-core.mjs.map +1 -0
  89. package/fesm2022/ngwr-animations-decode.mjs +301 -0
  90. package/fesm2022/ngwr-animations-decode.mjs.map +1 -0
  91. package/fesm2022/ngwr-animations-destruct.mjs +232 -0
  92. package/fesm2022/ngwr-animations-destruct.mjs.map +1 -0
  93. package/fesm2022/ngwr-animations-dot-grid.mjs +330 -0
  94. package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -0
  95. package/fesm2022/ngwr-animations-falling-letters.mjs +526 -0
  96. package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -0
  97. package/fesm2022/ngwr-animations-flow-lines.mjs +1102 -0
  98. package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -0
  99. package/fesm2022/ngwr-animations-fluid-cursor.mjs +1187 -0
  100. package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -0
  101. package/fesm2022/ngwr-animations-glitch.mjs +164 -0
  102. package/fesm2022/ngwr-animations-glitch.mjs.map +1 -0
  103. package/fesm2022/ngwr-animations-glow-border.mjs +81 -0
  104. package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -0
  105. package/fesm2022/ngwr-animations-gradient-flow.mjs +81 -0
  106. package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -0
  107. package/fesm2022/ngwr-animations-marquee.mjs +321 -0
  108. package/fesm2022/ngwr-animations-marquee.mjs.map +1 -0
  109. package/fesm2022/ngwr-animations-orbit.mjs +264 -0
  110. package/fesm2022/ngwr-animations-orbit.mjs.map +1 -0
  111. package/fesm2022/ngwr-animations-reveal.mjs +279 -0
  112. package/fesm2022/ngwr-animations-reveal.mjs.map +1 -0
  113. package/fesm2022/ngwr-animations-ripple-grid.mjs +320 -0
  114. package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -0
  115. package/fesm2022/ngwr-animations-rotate-reveal.mjs +285 -0
  116. package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -0
  117. package/fesm2022/ngwr-animations-shimmer.mjs +121 -0
  118. package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -0
  119. package/fesm2022/ngwr-animations-spotlight.mjs +90 -0
  120. package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -0
  121. package/fesm2022/ngwr-animations-thread-lines.mjs +926 -0
  122. package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -0
  123. package/fesm2022/ngwr-animations-tilt.mjs +134 -0
  124. package/fesm2022/ngwr-animations-tilt.mjs.map +1 -0
  125. package/fesm2022/ngwr-animations-typewriter.mjs +335 -0
  126. package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -0
  127. package/fesm2022/ngwr-avatar.mjs +74 -9
  128. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  129. package/fesm2022/ngwr-back-top.mjs +5 -3
  130. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  131. package/fesm2022/ngwr-badge.mjs +15 -6
  132. package/fesm2022/ngwr-badge.mjs.map +1 -1
  133. package/fesm2022/ngwr-breadcrumbs.mjs +13 -8
  134. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  135. package/fesm2022/ngwr-burger.mjs +8 -3
  136. package/fesm2022/ngwr-burger.mjs.map +1 -1
  137. package/fesm2022/ngwr-button.mjs +12 -6
  138. package/fesm2022/ngwr-button.mjs.map +1 -1
  139. package/fesm2022/ngwr-calendar.mjs +5 -3
  140. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  141. package/fesm2022/ngwr-card.mjs +20 -11
  142. package/fesm2022/ngwr-card.mjs.map +1 -1
  143. package/fesm2022/ngwr-carousel.mjs +12 -6
  144. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  145. package/fesm2022/ngwr-cascader.mjs +6 -6
  146. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  147. package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
  148. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  149. package/fesm2022/ngwr-charts-boxplot-chart.mjs +5 -3
  150. package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
  151. package/fesm2022/ngwr-charts-bullet-chart.mjs +5 -4
  152. package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
  153. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +5 -3
  154. package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
  155. package/fesm2022/ngwr-charts-candlestick-chart.mjs +5 -4
  156. package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
  157. package/fesm2022/ngwr-charts-chart-legend.mjs +15 -6
  158. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  159. package/fesm2022/ngwr-charts-core.mjs +3 -3
  160. package/fesm2022/ngwr-charts-donut-chart.mjs +8 -3
  161. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  162. package/fesm2022/ngwr-charts-funnel-chart.mjs +8 -4
  163. package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
  164. package/fesm2022/ngwr-charts-gauge.mjs +8 -4
  165. package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
  166. package/fesm2022/ngwr-charts-heatmap-chart.mjs +5 -4
  167. package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
  168. package/fesm2022/ngwr-charts-line-chart.mjs +5 -4
  169. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  170. package/fesm2022/ngwr-charts-meter-group.mjs +8 -3
  171. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  172. package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
  173. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  174. package/fesm2022/ngwr-charts-scatter-chart.mjs +8 -4
  175. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  176. package/fesm2022/ngwr-charts-sparkline.mjs +8 -3
  177. package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
  178. package/fesm2022/ngwr-charts-treemap-chart.mjs +5 -3
  179. package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
  180. package/fesm2022/ngwr-charts-waterfall-chart.mjs +5 -3
  181. package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
  182. package/fesm2022/ngwr-checkbox.mjs +15 -7
  183. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  184. package/fesm2022/ngwr-clipboard.mjs +7 -4
  185. package/fesm2022/ngwr-clipboard.mjs.map +1 -1
  186. package/fesm2022/ngwr-collapse.mjs +20 -11
  187. package/fesm2022/ngwr-collapse.mjs.map +1 -1
  188. package/fesm2022/ngwr-color-picker.mjs +13 -9
  189. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  190. package/fesm2022/ngwr-command-palette.mjs +8 -6
  191. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  192. package/fesm2022/ngwr-comment.mjs +15 -7
  193. package/fesm2022/ngwr-comment.mjs.map +1 -1
  194. package/fesm2022/ngwr-compare.mjs +5 -4
  195. package/fesm2022/ngwr-compare.mjs.map +1 -1
  196. package/fesm2022/ngwr-context-menu.mjs +28 -16
  197. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  198. package/fesm2022/ngwr-cookie.mjs +3 -3
  199. package/fesm2022/ngwr-counter.mjs +23 -29
  200. package/fesm2022/ngwr-counter.mjs.map +1 -1
  201. package/fesm2022/ngwr-date-picker.mjs +51 -28
  202. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  203. package/fesm2022/ngwr-date.mjs +6 -6
  204. package/fesm2022/ngwr-density.mjs +8 -7
  205. package/fesm2022/ngwr-density.mjs.map +1 -1
  206. package/fesm2022/ngwr-descriptions.mjs +15 -6
  207. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  208. package/fesm2022/ngwr-dialog.mjs +46 -24
  209. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  210. package/fesm2022/ngwr-directives.mjs +23 -17
  211. package/fesm2022/ngwr-directives.mjs.map +1 -1
  212. package/fesm2022/ngwr-divider.mjs +5 -3
  213. package/fesm2022/ngwr-divider.mjs.map +1 -1
  214. package/fesm2022/ngwr-drawer.mjs +46 -26
  215. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  216. package/fesm2022/ngwr-dropdown.mjs +25 -14
  217. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  218. package/fesm2022/ngwr-editor.mjs +6 -5
  219. package/fesm2022/ngwr-editor.mjs.map +1 -1
  220. package/fesm2022/ngwr-empty.mjs +8 -3
  221. package/fesm2022/ngwr-empty.mjs.map +1 -1
  222. package/fesm2022/ngwr-event-calendar.mjs +12 -8
  223. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  224. package/fesm2022/ngwr-file-upload.mjs +5 -4
  225. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  226. package/fesm2022/ngwr-form.mjs +19 -9
  227. package/fesm2022/ngwr-form.mjs.map +1 -1
  228. package/fesm2022/ngwr-graph.mjs +8 -7
  229. package/fesm2022/ngwr-graph.mjs.map +1 -1
  230. package/fesm2022/ngwr-hotkey.mjs +6 -6
  231. package/fesm2022/ngwr-i18n-ar.mjs +10 -5
  232. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  233. package/fesm2022/ngwr-i18n-cs.mjs +10 -5
  234. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  235. package/fesm2022/ngwr-i18n-de.mjs +10 -5
  236. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  237. package/fesm2022/ngwr-i18n-en.mjs +10 -5
  238. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  239. package/fesm2022/ngwr-i18n-es.mjs +10 -5
  240. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  241. package/fesm2022/ngwr-i18n-fr.mjs +10 -5
  242. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  243. package/fesm2022/ngwr-i18n-he.mjs +10 -5
  244. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  245. package/fesm2022/ngwr-i18n-hi.mjs +10 -5
  246. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  247. package/fesm2022/ngwr-i18n-id.mjs +10 -5
  248. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  249. package/fesm2022/ngwr-i18n-it.mjs +10 -5
  250. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  251. package/fesm2022/ngwr-i18n-ja.mjs +10 -5
  252. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  253. package/fesm2022/ngwr-i18n-ko.mjs +10 -5
  254. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  255. package/fesm2022/ngwr-i18n-nl.mjs +10 -5
  256. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  257. package/fesm2022/ngwr-i18n-pl.mjs +10 -5
  258. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  259. package/fesm2022/ngwr-i18n-pt.mjs +10 -5
  260. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  261. package/fesm2022/ngwr-i18n-ru.mjs +10 -5
  262. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  263. package/fesm2022/ngwr-i18n-sv.mjs +10 -5
  264. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  265. package/fesm2022/ngwr-i18n-tr.mjs +10 -5
  266. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  267. package/fesm2022/ngwr-i18n-uk.mjs +10 -5
  268. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  269. package/fesm2022/ngwr-i18n-vi.mjs +10 -5
  270. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  271. package/fesm2022/ngwr-i18n-zh-tw.mjs +10 -5
  272. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  273. package/fesm2022/ngwr-i18n-zh.mjs +10 -5
  274. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  275. package/fesm2022/ngwr-i18n.mjs +9 -9
  276. package/fesm2022/ngwr-icon.mjs +8 -6
  277. package/fesm2022/ngwr-icon.mjs.map +1 -1
  278. package/fesm2022/ngwr-image-cropper.mjs +5 -4
  279. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  280. package/fesm2022/ngwr-input-number.mjs +5 -4
  281. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  282. package/fesm2022/ngwr-input-otp.mjs +5 -4
  283. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  284. package/fesm2022/ngwr-input.mjs +35 -17
  285. package/fesm2022/ngwr-input.mjs.map +1 -1
  286. package/fesm2022/ngwr-keyboard.mjs +5 -4
  287. package/fesm2022/ngwr-keyboard.mjs.map +1 -1
  288. package/fesm2022/ngwr-knob.mjs +8 -4
  289. package/fesm2022/ngwr-knob.mjs.map +1 -1
  290. package/fesm2022/ngwr-layout.mjs +36 -18
  291. package/fesm2022/ngwr-layout.mjs.map +1 -1
  292. package/fesm2022/ngwr-lightbox.mjs +9 -8
  293. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  294. package/fesm2022/ngwr-list.mjs +13 -8
  295. package/fesm2022/ngwr-list.mjs.map +1 -1
  296. package/fesm2022/ngwr-load-state-testing.mjs +43 -0
  297. package/fesm2022/ngwr-load-state-testing.mjs.map +1 -0
  298. package/fesm2022/ngwr-load-state.mjs +495 -0
  299. package/fesm2022/ngwr-load-state.mjs.map +1 -0
  300. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  301. package/fesm2022/ngwr-mention.mjs +54 -26
  302. package/fesm2022/ngwr-mention.mjs.map +1 -1
  303. package/fesm2022/ngwr-meta.mjs +6 -6
  304. package/fesm2022/ngwr-overlay.mjs +27 -7
  305. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  306. package/fesm2022/ngwr-page-header.mjs +52 -5
  307. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  308. package/fesm2022/ngwr-pagination.mjs +6 -4
  309. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  310. package/fesm2022/ngwr-pipes.mjs +64 -25
  311. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  312. package/fesm2022/ngwr-platform.mjs +9 -9
  313. package/fesm2022/ngwr-popconfirm.mjs +17 -10
  314. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  315. package/fesm2022/ngwr-popover.mjs +24 -15
  316. package/fesm2022/ngwr-popover.mjs.map +1 -1
  317. package/fesm2022/ngwr-progress.mjs +8 -3
  318. package/fesm2022/ngwr-progress.mjs.map +1 -1
  319. package/fesm2022/ngwr-pull-to-refresh.mjs +5 -4
  320. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
  321. package/fesm2022/ngwr-qr.mjs +5 -4
  322. package/fesm2022/ngwr-qr.mjs.map +1 -1
  323. package/fesm2022/ngwr-radio.mjs +12 -7
  324. package/fesm2022/ngwr-radio.mjs.map +1 -1
  325. package/fesm2022/ngwr-rating.mjs +8 -4
  326. package/fesm2022/ngwr-rating.mjs.map +1 -1
  327. package/fesm2022/ngwr-result.mjs +29 -12
  328. package/fesm2022/ngwr-result.mjs.map +1 -1
  329. package/fesm2022/ngwr-schema-form.mjs +10 -4
  330. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  331. package/fesm2022/ngwr-scroll.mjs +3 -3
  332. package/fesm2022/ngwr-segmented.mjs +5 -3
  333. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  334. package/fesm2022/ngwr-select.mjs +81 -33
  335. package/fesm2022/ngwr-select.mjs.map +1 -1
  336. package/fesm2022/ngwr-sidebar.mjs +5 -3
  337. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  338. package/fesm2022/ngwr-skeleton.mjs +33 -8
  339. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  340. package/fesm2022/ngwr-slider.mjs +29 -7
  341. package/fesm2022/ngwr-slider.mjs.map +1 -1
  342. package/fesm2022/ngwr-sortable-list.mjs +18 -12
  343. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  344. package/fesm2022/ngwr-speed-dial.mjs +5 -3
  345. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  346. package/fesm2022/ngwr-spinner.mjs +8 -3
  347. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  348. package/fesm2022/ngwr-splitter.mjs +5 -4
  349. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  350. package/fesm2022/ngwr-statistic.mjs +16 -10
  351. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  352. package/fesm2022/ngwr-stepper.mjs +12 -6
  353. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  354. package/fesm2022/ngwr-storage.mjs +3 -3
  355. package/fesm2022/ngwr-switch.mjs +8 -4
  356. package/fesm2022/ngwr-switch.mjs.map +1 -1
  357. package/fesm2022/ngwr-table.mjs +85 -27
  358. package/fesm2022/ngwr-table.mjs.map +1 -1
  359. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  360. package/fesm2022/ngwr-tabs.mjs +9 -7
  361. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  362. package/fesm2022/ngwr-textarea.mjs +5 -3
  363. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  364. package/fesm2022/ngwr-theme.mjs +3 -3
  365. package/fesm2022/ngwr-timeline.mjs +15 -6
  366. package/fesm2022/ngwr-timeline.mjs.map +1 -1
  367. package/fesm2022/ngwr-toast.mjs +22 -15
  368. package/fesm2022/ngwr-toast.mjs.map +1 -1
  369. package/fesm2022/ngwr-toolbar.mjs +8 -3
  370. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  371. package/fesm2022/ngwr-tour.mjs +13 -9
  372. package/fesm2022/ngwr-tour.mjs.map +1 -1
  373. package/fesm2022/ngwr-transfer.mjs +9 -4
  374. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  375. package/fesm2022/ngwr-tree.mjs +5 -4
  376. package/fesm2022/ngwr-tree.mjs.map +1 -1
  377. package/fesm2022/ngwr-typography.mjs +8 -3
  378. package/fesm2022/ngwr-typography.mjs.map +1 -1
  379. package/fesm2022/ngwr-utils-router.mjs +3 -3
  380. package/fesm2022/ngwr-utils.mjs +69 -2
  381. package/fesm2022/ngwr-utils.mjs.map +1 -1
  382. package/fesm2022/ngwr-version.mjs +1 -1
  383. package/fesm2022/ngwr-version.mjs.map +1 -1
  384. package/fesm2022/ngwr-virtual-scroll.mjs +5 -5
  385. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  386. package/fesm2022/ngwr-window.mjs +20 -16
  387. package/fesm2022/ngwr-window.mjs.map +1 -1
  388. package/file-upload/styles/_index.scss +1 -0
  389. package/form/styles/_index.scss +1 -0
  390. package/graph/styles/_index.scss +1 -0
  391. package/i18n/ar.json +11 -4
  392. package/i18n/cs.json +11 -4
  393. package/i18n/de.json +11 -4
  394. package/i18n/en.json +11 -4
  395. package/i18n/es.json +11 -4
  396. package/i18n/fr.json +11 -4
  397. package/i18n/he.json +11 -4
  398. package/i18n/hi.json +11 -4
  399. package/i18n/id.json +11 -4
  400. package/i18n/it.json +11 -4
  401. package/i18n/ja.json +11 -4
  402. package/i18n/ko.json +11 -4
  403. package/i18n/nl.json +11 -4
  404. package/i18n/pl.json +11 -4
  405. package/i18n/pt.json +11 -4
  406. package/i18n/ru.json +11 -4
  407. package/i18n/sv.json +11 -4
  408. package/i18n/tr.json +11 -4
  409. package/i18n/uk.json +11 -4
  410. package/i18n/vi.json +11 -4
  411. package/i18n/zh-TW.json +11 -4
  412. package/i18n/zh.json +11 -4
  413. package/icon/styles/_index.scss +1 -0
  414. package/image-cropper/styles/_index.scss +1 -0
  415. package/input/styles/_index.scss +1 -0
  416. package/input-number/styles/_index.scss +1 -0
  417. package/input-otp/styles/_index.scss +1 -0
  418. package/keyboard/styles/_index.scss +1 -0
  419. package/knob/styles/_index.scss +1 -0
  420. package/layout/styles/_index.scss +1 -0
  421. package/lightbox/styles/_index.scss +1 -0
  422. package/list/styles/_index.scss +1 -0
  423. package/llms-full.txt +177 -267
  424. package/llms.txt +17 -16
  425. package/load-state/styles/_index.scss +49 -0
  426. package/loading-bar/styles/_index.scss +1 -0
  427. package/mcp/catalog.js +3 -3
  428. package/mention/styles/_index.scss +1 -0
  429. package/package.json +128 -212
  430. package/page-header/styles/_index.scss +82 -0
  431. package/pagination/styles/_index.scss +1 -0
  432. package/popconfirm/styles/_index.scss +1 -0
  433. package/popover/styles/_index.scss +1 -0
  434. package/progress/styles/_index.scss +1 -0
  435. package/pull-to-refresh/styles/_index.scss +1 -0
  436. package/qr/styles/_index.scss +1 -0
  437. package/radio/styles/_index.scss +1 -0
  438. package/rating/styles/_index.scss +1 -0
  439. package/result/styles/_index.scss +1 -0
  440. package/schema-form/styles/_index.scss +1 -0
  441. package/schematics/component-style/index.js +1 -1
  442. package/schematics/component-style/schema.json +1 -1
  443. package/schematics/use/symbol-map.json +29 -28
  444. package/schematics/utility/global-styles.js +3 -3
  445. package/segmented/styles/_index.scss +1 -0
  446. package/select/styles/_index.scss +1 -0
  447. package/sidebar/styles/_index.scss +1 -0
  448. package/skeleton/styles/_index.scss +65 -29
  449. package/skills/ngwr/SKILL.md +4 -4
  450. package/skills/ngwr/references/catalog.md +25 -47
  451. package/skills/ngwr/references/setup.md +1 -2
  452. package/slider/styles/_index.scss +1 -0
  453. package/sortable-list/styles/_index.scss +1 -0
  454. package/speed-dial/styles/_index.scss +1 -0
  455. package/spinner/styles/_index.scss +1 -0
  456. package/splitter/styles/_index.scss +1 -0
  457. package/statistic/styles/_index.scss +1 -0
  458. package/stepper/styles/_index.scss +1 -0
  459. package/styles/_animations.scss +0 -4
  460. package/switch/styles/_index.scss +1 -0
  461. package/table/styles/_index.scss +1 -0
  462. package/tabs/styles/_index.scss +1 -0
  463. package/textarea/styles/_index.scss +1 -0
  464. package/theme/_index.scss +7 -1
  465. package/theme/styles/_focus.scss +0 -6
  466. package/theme/styles/_index.scss +7 -0
  467. package/theme/styles/_loaded.scss +29 -0
  468. package/theme/styles/_motion.scss +1 -0
  469. package/theme/styles/_scrollbar.scss +69 -0
  470. package/theme/styles/_variables.scss +8 -0
  471. package/timeline/styles/_index.scss +1 -0
  472. package/toast/styles/_index.scss +1 -0
  473. package/toolbar/styles/_index.scss +1 -0
  474. package/tour/styles/_index.scss +1 -0
  475. package/transfer/styles/_index.scss +1 -0
  476. package/tree/styles/_index.scss +1 -0
  477. package/types/ngwr-alert.d.ts +10 -1
  478. package/types/ngwr-animations-aurora.d.ts +186 -0
  479. package/types/ngwr-animations-blur-reveal.d.ts +84 -0
  480. package/types/ngwr-animations-click-sparks.d.ts +67 -0
  481. package/types/ngwr-animations-confetti.d.ts +93 -0
  482. package/types/ngwr-animations-core.d.ts +294 -0
  483. package/types/ngwr-animations-decode.d.ts +104 -0
  484. package/types/ngwr-animations-destruct.d.ts +96 -0
  485. package/types/ngwr-animations-dot-grid.d.ts +87 -0
  486. package/types/ngwr-animations-falling-letters.d.ts +165 -0
  487. package/types/ngwr-animations-flow-lines.d.ts +208 -0
  488. package/types/ngwr-animations-fluid-cursor.d.ts +183 -0
  489. package/types/ngwr-animations-glitch.d.ts +86 -0
  490. package/types/ngwr-animations-glow-border.d.ts +29 -0
  491. package/types/ngwr-animations-gradient-flow.d.ts +38 -0
  492. package/types/ngwr-animations-marquee.d.ts +148 -0
  493. package/types/ngwr-animations-orbit.d.ts +112 -0
  494. package/types/ngwr-animations-reveal.d.ts +134 -0
  495. package/types/ngwr-animations-ripple-grid.d.ts +74 -0
  496. package/types/ngwr-animations-rotate-reveal.d.ts +134 -0
  497. package/types/ngwr-animations-shimmer.d.ts +68 -0
  498. package/types/ngwr-animations-spotlight.d.ts +36 -0
  499. package/types/ngwr-animations-thread-lines.d.ts +155 -0
  500. package/types/ngwr-animations-tilt.d.ts +49 -0
  501. package/types/ngwr-animations-typewriter.d.ts +144 -0
  502. package/types/ngwr-avatar.d.ts +49 -0
  503. package/types/ngwr-badge.d.ts +2 -0
  504. package/types/ngwr-breadcrumbs.d.ts +1 -0
  505. package/types/ngwr-burger.d.ts +1 -0
  506. package/types/ngwr-button.d.ts +1 -0
  507. package/types/ngwr-card.d.ts +2 -0
  508. package/types/ngwr-carousel.d.ts +3 -3
  509. package/types/ngwr-charts-chart-legend.d.ts +1 -0
  510. package/types/ngwr-charts-donut-chart.d.ts +1 -0
  511. package/types/ngwr-charts-funnel-chart.d.ts +1 -0
  512. package/types/ngwr-charts-gauge.d.ts +1 -0
  513. package/types/ngwr-charts-meter-group.d.ts +1 -0
  514. package/types/ngwr-charts-scatter-chart.d.ts +1 -0
  515. package/types/ngwr-charts-sparkline.d.ts +1 -0
  516. package/types/ngwr-checkbox.d.ts +2 -0
  517. package/types/ngwr-clipboard.d.ts +1 -0
  518. package/types/ngwr-collapse.d.ts +2 -0
  519. package/types/ngwr-color-picker.d.ts +1 -0
  520. package/types/ngwr-command-palette.d.ts +1 -0
  521. package/types/ngwr-comment.d.ts +2 -0
  522. package/types/ngwr-context-menu.d.ts +3 -0
  523. package/types/ngwr-counter.d.ts +12 -8
  524. package/types/ngwr-descriptions.d.ts +2 -0
  525. package/types/ngwr-dialog.d.ts +5 -0
  526. package/types/ngwr-directives.d.ts +8 -3
  527. package/types/ngwr-drawer.d.ts +13 -2
  528. package/types/ngwr-dropdown.d.ts +17 -3
  529. package/types/ngwr-empty.d.ts +1 -0
  530. package/types/ngwr-event-calendar.d.ts +1 -0
  531. package/types/ngwr-form.d.ts +2 -0
  532. package/types/ngwr-input.d.ts +4 -0
  533. package/types/ngwr-knob.d.ts +1 -0
  534. package/types/ngwr-layout.d.ts +4 -0
  535. package/types/ngwr-lightbox.d.ts +1 -0
  536. package/types/ngwr-list.d.ts +1 -0
  537. package/types/ngwr-load-state-testing.d.ts +65 -0
  538. package/types/ngwr-load-state.d.ts +269 -0
  539. package/types/ngwr-mention.d.ts +27 -7
  540. package/types/ngwr-overlay.d.ts +19 -0
  541. package/types/ngwr-page-header.d.ts +60 -8
  542. package/types/ngwr-pipes.d.ts +19 -0
  543. package/types/ngwr-popconfirm.d.ts +2 -0
  544. package/types/ngwr-progress.d.ts +1 -0
  545. package/types/ngwr-radio.d.ts +1 -0
  546. package/types/ngwr-rating.d.ts +1 -0
  547. package/types/ngwr-result.d.ts +4 -0
  548. package/types/ngwr-schema-form.d.ts +1 -0
  549. package/types/ngwr-select.d.ts +56 -14
  550. package/types/ngwr-skeleton.d.ts +21 -1
  551. package/types/ngwr-slider.d.ts +21 -0
  552. package/types/ngwr-sortable-list.d.ts +1 -0
  553. package/types/ngwr-spinner.d.ts +1 -0
  554. package/types/ngwr-statistic.d.ts +1 -0
  555. package/types/ngwr-stepper.d.ts +1 -0
  556. package/types/ngwr-switch.d.ts +1 -0
  557. package/types/ngwr-table.d.ts +36 -1
  558. package/types/ngwr-timeline.d.ts +2 -0
  559. package/types/ngwr-toolbar.d.ts +1 -0
  560. package/types/ngwr-tour.d.ts +1 -0
  561. package/types/ngwr-transfer.d.ts +1 -0
  562. package/types/ngwr-typography.d.ts +1 -0
  563. package/types/ngwr-utils.d.ts +88 -6
  564. package/types/ngwr-version.d.ts +1 -1
  565. package/types/ngwr-window.d.ts +1 -0
  566. package/typography/styles/_index.scss +1 -0
  567. package/virtual-scroll/styles/_index.scss +1 -0
  568. package/virtual-scroll/styles/_rules.scss +5 -9
  569. package/window/styles/_index.scss +1 -0
  570. package/bits/aurora/aurora.scss +0 -1
  571. package/bits/aurora/styles/_index.scss +0 -8
  572. package/bits/aurora/styles/_rules.scss +0 -36
  573. package/bits/blur-text/blur-text.scss +0 -1
  574. package/bits/blur-text/styles/_index.scss +0 -27
  575. package/bits/border-glow/border-glow.scss +0 -4
  576. package/bits/border-glow/styles/_index.scss +0 -15
  577. package/bits/border-glow/styles/_rules.scss +0 -259
  578. package/bits/circular-text/circular-text.scss +0 -1
  579. package/bits/circular-text/styles/_index.scss +0 -15
  580. package/bits/circular-text/styles/_rules.scss +0 -60
  581. package/bits/click-spark/click-spark.scss +0 -5
  582. package/bits/click-spark/styles/_index.scss +0 -11
  583. package/bits/click-spark/styles/_rules.scss +0 -20
  584. package/bits/decrypt-text/decrypt-text.scss +0 -1
  585. package/bits/decrypt-text/styles/_index.scss +0 -15
  586. package/bits/decrypt-text/styles/_rules.scss +0 -40
  587. package/bits/dot-grid/dot-grid.scss +0 -1
  588. package/bits/dot-grid/styles/_index.scss +0 -8
  589. package/bits/dot-grid/styles/_rules.scss +0 -54
  590. package/bits/falling-text/falling-text.scss +0 -1
  591. package/bits/falling-text/styles/_index.scss +0 -15
  592. package/bits/falling-text/styles/_rules.scss +0 -44
  593. package/bits/glitch-text/glitch-text.scss +0 -1
  594. package/bits/glitch-text/styles/_index.scss +0 -15
  595. package/bits/glitch-text/styles/_rules.scss +0 -161
  596. package/bits/gradient-text/gradient-text.scss +0 -1
  597. package/bits/gradient-text/styles/_index.scss +0 -15
  598. package/bits/gradient-text/styles/_rules.scss +0 -118
  599. package/bits/iridescence/iridescence.scss +0 -1
  600. package/bits/iridescence/styles/_index.scss +0 -8
  601. package/bits/iridescence/styles/_rules.scss +0 -72
  602. package/bits/marquee/marquee.scss +0 -1
  603. package/bits/marquee/styles/_index.scss +0 -15
  604. package/bits/marquee/styles/_rules.scss +0 -203
  605. package/bits/ripple-grid/ripple-grid.scss +0 -1
  606. package/bits/ripple-grid/styles/_index.scss +0 -8
  607. package/bits/ripple-grid/styles/_rules.scss +0 -63
  608. package/bits/rotating-text/rotating-text.scss +0 -1
  609. package/bits/rotating-text/styles/_index.scss +0 -39
  610. package/bits/shiny-text/shiny-text.scss +0 -1
  611. package/bits/shiny-text/styles/_index.scss +0 -15
  612. package/bits/shiny-text/styles/_rules.scss +0 -121
  613. package/bits/splash-cursor/splash-cursor.scss +0 -1
  614. package/bits/splash-cursor/styles/_index.scss +0 -28
  615. package/bits/split-text/split-text.scss +0 -1
  616. package/bits/split-text/styles/_index.scss +0 -35
  617. package/bits/spotlight-card/spotlight-card.scss +0 -1
  618. package/bits/spotlight-card/styles/_index.scss +0 -15
  619. package/bits/spotlight-card/styles/_rules.scss +0 -52
  620. package/bits/star-border/star-border.scss +0 -1
  621. package/bits/star-border/styles/_index.scss +0 -15
  622. package/bits/star-border/styles/_rules.scss +0 -126
  623. package/bits/threads/styles/_index.scss +0 -8
  624. package/bits/threads/styles/_rules.scss +0 -76
  625. package/bits/threads/threads.scss +0 -1
  626. package/bits/tilt-card/styles/_index.scss +0 -15
  627. package/bits/tilt-card/styles/_rules.scss +0 -56
  628. package/bits/tilt-card/tilt-card.scss +0 -1
  629. package/bits/typewriter/styles/_index.scss +0 -15
  630. package/bits/typewriter/styles/_rules.scss +0 -45
  631. package/bits/typewriter/typewriter.scss +0 -1
  632. package/bits/waves/styles/_index.scss +0 -15
  633. package/bits/waves/styles/_rules.scss +0 -54
  634. package/bits/waves/waves.scss +0 -1
  635. package/fesm2022/ngwr-bits-aurora.mjs +0 -461
  636. package/fesm2022/ngwr-bits-aurora.mjs.map +0 -1
  637. package/fesm2022/ngwr-bits-blur-text-testing.mjs +0 -49
  638. package/fesm2022/ngwr-bits-blur-text-testing.mjs.map +0 -1
  639. package/fesm2022/ngwr-bits-blur-text.mjs +0 -337
  640. package/fesm2022/ngwr-bits-blur-text.mjs.map +0 -1
  641. package/fesm2022/ngwr-bits-border-glow-testing.mjs +0 -147
  642. package/fesm2022/ngwr-bits-border-glow-testing.mjs.map +0 -1
  643. package/fesm2022/ngwr-bits-border-glow.mjs +0 -561
  644. package/fesm2022/ngwr-bits-border-glow.mjs.map +0 -1
  645. package/fesm2022/ngwr-bits-circular-text-testing.mjs +0 -63
  646. package/fesm2022/ngwr-bits-circular-text-testing.mjs.map +0 -1
  647. package/fesm2022/ngwr-bits-circular-text.mjs +0 -228
  648. package/fesm2022/ngwr-bits-circular-text.mjs.map +0 -1
  649. package/fesm2022/ngwr-bits-click-spark.mjs +0 -304
  650. package/fesm2022/ngwr-bits-click-spark.mjs.map +0 -1
  651. package/fesm2022/ngwr-bits-confetti.mjs +0 -175
  652. package/fesm2022/ngwr-bits-confetti.mjs.map +0 -1
  653. package/fesm2022/ngwr-bits-decrypt-text-testing.mjs +0 -62
  654. package/fesm2022/ngwr-bits-decrypt-text-testing.mjs.map +0 -1
  655. package/fesm2022/ngwr-bits-decrypt-text.mjs +0 -525
  656. package/fesm2022/ngwr-bits-decrypt-text.mjs.map +0 -1
  657. package/fesm2022/ngwr-bits-dot-grid-testing.mjs +0 -40
  658. package/fesm2022/ngwr-bits-dot-grid-testing.mjs.map +0 -1
  659. package/fesm2022/ngwr-bits-dot-grid.mjs +0 -479
  660. package/fesm2022/ngwr-bits-dot-grid.mjs.map +0 -1
  661. package/fesm2022/ngwr-bits-falling-text-testing.mjs +0 -56
  662. package/fesm2022/ngwr-bits-falling-text-testing.mjs.map +0 -1
  663. package/fesm2022/ngwr-bits-falling-text.mjs +0 -418
  664. package/fesm2022/ngwr-bits-falling-text.mjs.map +0 -1
  665. package/fesm2022/ngwr-bits-fuzzy-text-testing.mjs +0 -38
  666. package/fesm2022/ngwr-bits-fuzzy-text-testing.mjs.map +0 -1
  667. package/fesm2022/ngwr-bits-fuzzy-text.mjs +0 -715
  668. package/fesm2022/ngwr-bits-fuzzy-text.mjs.map +0 -1
  669. package/fesm2022/ngwr-bits-glitch-text-testing.mjs +0 -63
  670. package/fesm2022/ngwr-bits-glitch-text-testing.mjs.map +0 -1
  671. package/fesm2022/ngwr-bits-glitch-text.mjs +0 -172
  672. package/fesm2022/ngwr-bits-glitch-text.mjs.map +0 -1
  673. package/fesm2022/ngwr-bits-gradient-text-testing.mjs +0 -89
  674. package/fesm2022/ngwr-bits-gradient-text-testing.mjs.map +0 -1
  675. package/fesm2022/ngwr-bits-gradient-text.mjs +0 -217
  676. package/fesm2022/ngwr-bits-gradient-text.mjs.map +0 -1
  677. package/fesm2022/ngwr-bits-iridescence-testing.mjs +0 -31
  678. package/fesm2022/ngwr-bits-iridescence-testing.mjs.map +0 -1
  679. package/fesm2022/ngwr-bits-iridescence.mjs +0 -591
  680. package/fesm2022/ngwr-bits-iridescence.mjs.map +0 -1
  681. package/fesm2022/ngwr-bits-marquee-testing.mjs +0 -126
  682. package/fesm2022/ngwr-bits-marquee-testing.mjs.map +0 -1
  683. package/fesm2022/ngwr-bits-marquee.mjs +0 -451
  684. package/fesm2022/ngwr-bits-marquee.mjs.map +0 -1
  685. package/fesm2022/ngwr-bits-ripple-grid-testing.mjs +0 -40
  686. package/fesm2022/ngwr-bits-ripple-grid-testing.mjs.map +0 -1
  687. package/fesm2022/ngwr-bits-ripple-grid.mjs +0 -806
  688. package/fesm2022/ngwr-bits-ripple-grid.mjs.map +0 -1
  689. package/fesm2022/ngwr-bits-rotating-text-testing.mjs +0 -50
  690. package/fesm2022/ngwr-bits-rotating-text-testing.mjs.map +0 -1
  691. package/fesm2022/ngwr-bits-rotating-text.mjs +0 -413
  692. package/fesm2022/ngwr-bits-rotating-text.mjs.map +0 -1
  693. package/fesm2022/ngwr-bits-shiny-text-testing.mjs +0 -92
  694. package/fesm2022/ngwr-bits-shiny-text-testing.mjs.map +0 -1
  695. package/fesm2022/ngwr-bits-shiny-text.mjs +0 -315
  696. package/fesm2022/ngwr-bits-shiny-text.mjs.map +0 -1
  697. package/fesm2022/ngwr-bits-splash-cursor-testing.mjs +0 -25
  698. package/fesm2022/ngwr-bits-splash-cursor-testing.mjs.map +0 -1
  699. package/fesm2022/ngwr-bits-splash-cursor.mjs +0 -1282
  700. package/fesm2022/ngwr-bits-splash-cursor.mjs.map +0 -1
  701. package/fesm2022/ngwr-bits-split-text-testing.mjs +0 -54
  702. package/fesm2022/ngwr-bits-split-text-testing.mjs.map +0 -1
  703. package/fesm2022/ngwr-bits-split-text.mjs +0 -378
  704. package/fesm2022/ngwr-bits-split-text.mjs.map +0 -1
  705. package/fesm2022/ngwr-bits-spotlight-card-testing.mjs +0 -113
  706. package/fesm2022/ngwr-bits-spotlight-card-testing.mjs.map +0 -1
  707. package/fesm2022/ngwr-bits-spotlight-card.mjs +0 -228
  708. package/fesm2022/ngwr-bits-spotlight-card.mjs.map +0 -1
  709. package/fesm2022/ngwr-bits-star-border-testing.mjs +0 -57
  710. package/fesm2022/ngwr-bits-star-border-testing.mjs.map +0 -1
  711. package/fesm2022/ngwr-bits-star-border.mjs +0 -162
  712. package/fesm2022/ngwr-bits-star-border.mjs.map +0 -1
  713. package/fesm2022/ngwr-bits-threads-testing.mjs +0 -41
  714. package/fesm2022/ngwr-bits-threads-testing.mjs.map +0 -1
  715. package/fesm2022/ngwr-bits-threads.mjs +0 -482
  716. package/fesm2022/ngwr-bits-threads.mjs.map +0 -1
  717. package/fesm2022/ngwr-bits-tilt-card-testing.mjs +0 -83
  718. package/fesm2022/ngwr-bits-tilt-card-testing.mjs.map +0 -1
  719. package/fesm2022/ngwr-bits-tilt-card.mjs +0 -260
  720. package/fesm2022/ngwr-bits-tilt-card.mjs.map +0 -1
  721. package/fesm2022/ngwr-bits-typewriter-testing.mjs +0 -61
  722. package/fesm2022/ngwr-bits-typewriter-testing.mjs.map +0 -1
  723. package/fesm2022/ngwr-bits-typewriter.mjs +0 -469
  724. package/fesm2022/ngwr-bits-typewriter.mjs.map +0 -1
  725. package/fesm2022/ngwr-bits-waves-testing.mjs +0 -37
  726. package/fesm2022/ngwr-bits-waves-testing.mjs.map +0 -1
  727. package/fesm2022/ngwr-bits-waves.mjs +0 -865
  728. package/fesm2022/ngwr-bits-waves.mjs.map +0 -1
  729. package/types/ngwr-bits-aurora.d.ts +0 -114
  730. package/types/ngwr-bits-blur-text-testing.d.ts +0 -162
  731. package/types/ngwr-bits-blur-text.d.ts +0 -135
  732. package/types/ngwr-bits-border-glow-testing.d.ts +0 -230
  733. package/types/ngwr-bits-border-glow.d.ts +0 -166
  734. package/types/ngwr-bits-circular-text-testing.d.ts +0 -178
  735. package/types/ngwr-bits-circular-text.d.ts +0 -70
  736. package/types/ngwr-bits-click-spark.d.ts +0 -101
  737. package/types/ngwr-bits-confetti.d.ts +0 -80
  738. package/types/ngwr-bits-decrypt-text-testing.d.ts +0 -204
  739. package/types/ngwr-bits-decrypt-text.d.ts +0 -135
  740. package/types/ngwr-bits-dot-grid-testing.d.ts +0 -92
  741. package/types/ngwr-bits-dot-grid.d.ts +0 -158
  742. package/types/ngwr-bits-falling-text-testing.d.ts +0 -170
  743. package/types/ngwr-bits-falling-text.d.ts +0 -95
  744. package/types/ngwr-bits-fuzzy-text-testing.d.ts +0 -112
  745. package/types/ngwr-bits-fuzzy-text.d.ts +0 -208
  746. package/types/ngwr-bits-glitch-text-testing.d.ts +0 -183
  747. package/types/ngwr-bits-glitch-text.d.ts +0 -60
  748. package/types/ngwr-bits-gradient-text-testing.d.ts +0 -168
  749. package/types/ngwr-bits-gradient-text.d.ts +0 -73
  750. package/types/ngwr-bits-iridescence-testing.d.ts +0 -85
  751. package/types/ngwr-bits-iridescence.d.ts +0 -244
  752. package/types/ngwr-bits-marquee-testing.d.ts +0 -266
  753. package/types/ngwr-bits-marquee.d.ts +0 -188
  754. package/types/ngwr-bits-ripple-grid-testing.d.ts +0 -96
  755. package/types/ngwr-bits-ripple-grid.d.ts +0 -299
  756. package/types/ngwr-bits-rotating-text-testing.d.ts +0 -173
  757. package/types/ngwr-bits-rotating-text.d.ts +0 -127
  758. package/types/ngwr-bits-shiny-text-testing.d.ts +0 -147
  759. package/types/ngwr-bits-shiny-text.d.ts +0 -131
  760. package/types/ngwr-bits-splash-cursor-testing.d.ts +0 -77
  761. package/types/ngwr-bits-splash-cursor.d.ts +0 -162
  762. package/types/ngwr-bits-split-text-testing.d.ts +0 -191
  763. package/types/ngwr-bits-split-text.d.ts +0 -163
  764. package/types/ngwr-bits-spotlight-card-testing.d.ts +0 -279
  765. package/types/ngwr-bits-spotlight-card.d.ts +0 -94
  766. package/types/ngwr-bits-star-border-testing.d.ts +0 -117
  767. package/types/ngwr-bits-star-border.d.ts +0 -62
  768. package/types/ngwr-bits-threads-testing.d.ts +0 -97
  769. package/types/ngwr-bits-threads.d.ts +0 -216
  770. package/types/ngwr-bits-tilt-card-testing.d.ts +0 -140
  771. package/types/ngwr-bits-tilt-card.d.ts +0 -94
  772. package/types/ngwr-bits-typewriter-testing.d.ts +0 -201
  773. package/types/ngwr-bits-typewriter.d.ts +0 -165
  774. package/types/ngwr-bits-waves-testing.d.ts +0 -103
  775. package/types/ngwr-bits-waves.d.ts +0 -142
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngwr-bits-splash-cursor.mjs","names":[],"sources":["../../../projects/lib/bits/splash-cursor/fluid.ts","../../../projects/lib/bits/splash-cursor/splash-cursor.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n *\n * WebGL fluid simulation behind `<wr-splash-cursor>`. Port of the engine\n * used by reactbits.dev's SplashCursor (itself based on Pavel Dobryakov's\n * WebGL-Fluid-Simulation, MIT).\n *\n * Framework-free on purpose: `createFluidSimulation(canvas, config)` boots\n * the sim and returns a teardown, or `null` when WebGL isn't available.\n */\n\n/* eslint-disable no-bitwise -- GL bitmasks + string hashing are inherently bitwise */\n\ninterface WrFluidConfig {\n readonly simResolution: number;\n readonly dyeResolution: number;\n readonly densityDissipation: number;\n readonly velocityDissipation: number;\n readonly pressure: number;\n readonly pressureIterations: number;\n readonly curl: number;\n readonly splatRadius: number;\n readonly splatForce: number;\n readonly shading: boolean;\n readonly colorUpdateSpeed: number;\n /** Cycle splat colours through the rainbow; `false` uses `color`. */\n readonly rainbow: boolean;\n /** Fixed splat colour (hex) when `rainbow` is off. */\n readonly color: string;\n}\n\ninterface RGB {\n r: number;\n g: number;\n b: number;\n}\n\ninterface TexFormat {\n readonly internalFormat: number;\n readonly format: number;\n}\n\ninterface GlExt {\n readonly formatRGBA: TexFormat;\n readonly formatRG: TexFormat;\n readonly formatR: TexFormat;\n readonly halfFloatTexType: number;\n readonly supportLinearFiltering: boolean;\n}\n\ninterface FBO {\n readonly texture: WebGLTexture;\n readonly fbo: WebGLFramebuffer;\n readonly width: number;\n readonly height: number;\n readonly texelSizeX: number;\n readonly texelSizeY: number;\n attach(id: number): number;\n}\n\ninterface DoubleFBO {\n width: number;\n height: number;\n texelSizeX: number;\n texelSizeY: number;\n read: FBO;\n write: FBO;\n swap(): void;\n}\n\ninterface Pointer {\n texcoordX: number;\n texcoordY: number;\n prevTexcoordX: number;\n prevTexcoordY: number;\n deltaX: number;\n deltaY: number;\n moved: boolean;\n color: RGB;\n}\n\ntype GL = WebGLRenderingContext | WebGL2RenderingContext;\ntype Uniforms = Record<string, WebGLUniformLocation | null>;\n\nfunction createFluidSimulation(canvas: HTMLCanvasElement, config: WrFluidConfig): (() => void) | null {\n const ctx = getWebGLContext(canvas);\n if (!ctx) return null;\n const { gl, ext } = ctx;\n\n let dyeResolution = config.dyeResolution;\n let shading = config.shading;\n if (!ext.supportLinearFiltering) {\n dyeResolution = 256;\n shading = false;\n }\n\n let active = true;\n let rafId = 0;\n /** Whether the canvas has a layout box with an area; measured by the frame, and by the resize observer. */\n let hasBox = false;\n\n // Every GL object this boot creates, so the teardown can free them. The\n // context outlives the sim (an input change reboots on the same canvas),\n // so anything left here is GPU memory nobody can reach again.\n const shaders: WebGLShader[] = [];\n const programs: WebGLProgram[] = [];\n const buffers: WebGLBuffer[] = [];\n\n const pointer: Pointer = {\n texcoordX: 0,\n texcoordY: 0,\n prevTexcoordX: 0,\n prevTexcoordY: 0,\n deltaX: 0,\n deltaY: 0,\n moved: false,\n color: { r: 0, g: 0, b: 0 },\n };\n\n // Shader plumbing\n\n function compile(type: number, source: string, keywords?: readonly string[]): WebGLShader {\n const prefixed = keywords ? keywords.map(k => `#define ${k}\\n`).join('') + source : source;\n const shader = gl.createShader(type)!;\n shaders.push(shader);\n gl.shaderSource(shader, prefixed);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n // eslint-disable-next-line no-console -- GPU shader failures are otherwise invisible\n console.error('wr-splash-cursor shader error:', gl.getShaderInfoLog(shader));\n }\n return shader;\n }\n\n function link(vertex: WebGLShader, fragment: WebGLShader): WebGLProgram {\n const program = gl.createProgram();\n programs.push(program);\n gl.attachShader(program, vertex);\n gl.attachShader(program, fragment);\n gl.linkProgram(program);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n // eslint-disable-next-line no-console -- GPU link failures are otherwise invisible\n console.error('wr-splash-cursor program error:', gl.getProgramInfoLog(program));\n }\n return program;\n }\n\n function uniformsOf(program: WebGLProgram): Uniforms {\n const out: Uniforms = {};\n const count = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS) as number;\n for (let i = 0; i < count; i++) {\n const name = gl.getActiveUniform(program, i)!.name;\n out[name] = gl.getUniformLocation(program, name);\n }\n return out;\n }\n\n class ShaderProgram {\n readonly program: WebGLProgram;\n readonly uniforms: Uniforms;\n\n constructor(vertex: WebGLShader, fragment: WebGLShader) {\n this.program = link(vertex, fragment);\n this.uniforms = uniformsOf(this.program);\n }\n\n bind(): void {\n gl.useProgram(this.program);\n }\n }\n\n /** Display shader with `#define`-keyword program variants. */\n class DisplayMaterial {\n private readonly programs = new Map<number, WebGLProgram>();\n private activeProgram: WebGLProgram | null = null;\n uniforms: Uniforms = {};\n\n constructor(\n private readonly vertex: WebGLShader,\n private readonly fragmentSource: string\n ) {}\n\n setKeywords(keywords: readonly string[]): void {\n let hash = 0;\n for (const k of keywords) hash += hashCode(k);\n let program = this.programs.get(hash);\n if (!program) {\n program = link(this.vertex, compile(gl.FRAGMENT_SHADER, this.fragmentSource, keywords));\n this.programs.set(hash, program);\n }\n if (program === this.activeProgram) return;\n this.uniforms = uniformsOf(program);\n this.activeProgram = program;\n }\n\n bind(): void {\n gl.useProgram(this.activeProgram);\n }\n }\n\n // Shaders\n\n const baseVertexShader = compile(\n gl.VERTEX_SHADER,\n `\n precision highp float;\n attribute vec2 aPosition;\n varying vec2 vUv;\n varying vec2 vL;\n varying vec2 vR;\n varying vec2 vT;\n varying vec2 vB;\n uniform vec2 texelSize;\n\n void main () {\n vUv = aPosition * 0.5 + 0.5;\n vL = vUv - vec2(texelSize.x, 0.0);\n vR = vUv + vec2(texelSize.x, 0.0);\n vT = vUv + vec2(0.0, texelSize.y);\n vB = vUv - vec2(0.0, texelSize.y);\n gl_Position = vec4(aPosition, 0.0, 1.0);\n }\n `\n );\n\n const copyShader = compile(\n gl.FRAGMENT_SHADER,\n `\n precision mediump float;\n precision mediump sampler2D;\n varying highp vec2 vUv;\n uniform sampler2D uTexture;\n\n void main () {\n gl_FragColor = texture2D(uTexture, vUv);\n }\n `\n );\n\n const clearShader = compile(\n gl.FRAGMENT_SHADER,\n `\n precision mediump float;\n precision mediump sampler2D;\n varying highp vec2 vUv;\n uniform sampler2D uTexture;\n uniform float value;\n\n void main () {\n gl_FragColor = value * texture2D(uTexture, vUv);\n }\n `\n );\n\n const displayShaderSource = `\n precision highp float;\n precision highp sampler2D;\n varying vec2 vUv;\n varying vec2 vL;\n varying vec2 vR;\n varying vec2 vT;\n varying vec2 vB;\n uniform sampler2D uTexture;\n uniform vec2 texelSize;\n\n void main () {\n vec3 c = texture2D(uTexture, vUv).rgb;\n #ifdef SHADING\n vec3 lc = texture2D(uTexture, vL).rgb;\n vec3 rc = texture2D(uTexture, vR).rgb;\n vec3 tc = texture2D(uTexture, vT).rgb;\n vec3 bc = texture2D(uTexture, vB).rgb;\n\n float dx = length(rc) - length(lc);\n float dy = length(tc) - length(bc);\n\n vec3 n = normalize(vec3(dx, dy, length(texelSize)));\n vec3 l = vec3(0.0, 0.0, 1.0);\n\n float diffuse = clamp(dot(n, l) + 0.7, 0.7, 1.0);\n c *= diffuse;\n #endif\n\n float a = max(c.r, max(c.g, c.b));\n gl_FragColor = vec4(c, a);\n }\n `;\n\n const splatShader = compile(\n gl.FRAGMENT_SHADER,\n `\n precision highp float;\n precision highp sampler2D;\n varying vec2 vUv;\n uniform sampler2D uTarget;\n uniform float aspectRatio;\n uniform vec3 color;\n uniform vec2 point;\n uniform float radius;\n\n void main () {\n vec2 p = vUv - point.xy;\n p.x *= aspectRatio;\n vec3 splat = exp(-dot(p, p) / radius) * color;\n vec3 base = texture2D(uTarget, vUv).xyz;\n gl_FragColor = vec4(base + splat, 1.0);\n }\n `\n );\n\n const advectionShader = compile(\n gl.FRAGMENT_SHADER,\n `\n precision highp float;\n precision highp sampler2D;\n varying vec2 vUv;\n uniform sampler2D uVelocity;\n uniform sampler2D uSource;\n uniform vec2 texelSize;\n uniform vec2 dyeTexelSize;\n uniform float dt;\n uniform float dissipation;\n\n vec4 bilerp (sampler2D sam, vec2 uv, vec2 tsize) {\n vec2 st = uv / tsize - 0.5;\n vec2 iuv = floor(st);\n vec2 fuv = fract(st);\n\n vec4 a = texture2D(sam, (iuv + vec2(0.5, 0.5)) * tsize);\n vec4 b = texture2D(sam, (iuv + vec2(1.5, 0.5)) * tsize);\n vec4 c = texture2D(sam, (iuv + vec2(0.5, 1.5)) * tsize);\n vec4 d = texture2D(sam, (iuv + vec2(1.5, 1.5)) * tsize);\n\n return mix(mix(a, b, fuv.x), mix(c, d, fuv.x), fuv.y);\n }\n\n void main () {\n #ifdef MANUAL_FILTERING\n vec2 coord = vUv - dt * bilerp(uVelocity, vUv, texelSize).xy * texelSize;\n vec4 result = bilerp(uSource, coord, dyeTexelSize);\n #else\n vec2 coord = vUv - dt * texture2D(uVelocity, vUv).xy * texelSize;\n vec4 result = texture2D(uSource, coord);\n #endif\n float decay = 1.0 + dissipation * dt;\n gl_FragColor = result / decay;\n }\n `,\n ext.supportLinearFiltering ? undefined : ['MANUAL_FILTERING']\n );\n\n const divergenceShader = compile(\n gl.FRAGMENT_SHADER,\n `\n precision mediump float;\n precision mediump sampler2D;\n varying highp vec2 vUv;\n varying highp vec2 vL;\n varying highp vec2 vR;\n varying highp vec2 vT;\n varying highp vec2 vB;\n uniform sampler2D uVelocity;\n\n void main () {\n float L = texture2D(uVelocity, vL).x;\n float R = texture2D(uVelocity, vR).x;\n float T = texture2D(uVelocity, vT).y;\n float B = texture2D(uVelocity, vB).y;\n\n vec2 C = texture2D(uVelocity, vUv).xy;\n if (vL.x < 0.0) { L = -C.x; }\n if (vR.x > 1.0) { R = -C.x; }\n if (vT.y > 1.0) { T = -C.y; }\n if (vB.y < 0.0) { B = -C.y; }\n\n float div = 0.5 * (R - L + T - B);\n gl_FragColor = vec4(div, 0.0, 0.0, 1.0);\n }\n `\n );\n\n const curlShader = compile(\n gl.FRAGMENT_SHADER,\n `\n precision mediump float;\n precision mediump sampler2D;\n varying highp vec2 vUv;\n varying highp vec2 vL;\n varying highp vec2 vR;\n varying highp vec2 vT;\n varying highp vec2 vB;\n uniform sampler2D uVelocity;\n\n void main () {\n float L = texture2D(uVelocity, vL).y;\n float R = texture2D(uVelocity, vR).y;\n float T = texture2D(uVelocity, vT).x;\n float B = texture2D(uVelocity, vB).x;\n float vorticity = R - L - T + B;\n gl_FragColor = vec4(0.5 * vorticity, 0.0, 0.0, 1.0);\n }\n `\n );\n\n const vorticityShader = compile(\n gl.FRAGMENT_SHADER,\n `\n precision highp float;\n precision highp sampler2D;\n varying vec2 vUv;\n varying vec2 vL;\n varying vec2 vR;\n varying vec2 vT;\n varying vec2 vB;\n uniform sampler2D uVelocity;\n uniform sampler2D uCurl;\n uniform float curl;\n uniform float dt;\n\n void main () {\n float L = texture2D(uCurl, vL).x;\n float R = texture2D(uCurl, vR).x;\n float T = texture2D(uCurl, vT).x;\n float B = texture2D(uCurl, vB).x;\n float C = texture2D(uCurl, vUv).x;\n\n vec2 force = 0.5 * vec2(abs(T) - abs(B), abs(R) - abs(L));\n force /= length(force) + 0.0001;\n force *= curl * C;\n force.y *= -1.0;\n\n vec2 velocity = texture2D(uVelocity, vUv).xy;\n velocity += force * dt;\n velocity = min(max(velocity, -1000.0), 1000.0);\n gl_FragColor = vec4(velocity, 0.0, 1.0);\n }\n `\n );\n\n const pressureShader = compile(\n gl.FRAGMENT_SHADER,\n `\n precision mediump float;\n precision mediump sampler2D;\n varying highp vec2 vUv;\n varying highp vec2 vL;\n varying highp vec2 vR;\n varying highp vec2 vT;\n varying highp vec2 vB;\n uniform sampler2D uPressure;\n uniform sampler2D uDivergence;\n\n void main () {\n float L = texture2D(uPressure, vL).x;\n float R = texture2D(uPressure, vR).x;\n float T = texture2D(uPressure, vT).x;\n float B = texture2D(uPressure, vB).x;\n float C = texture2D(uPressure, vUv).x;\n float divergence = texture2D(uDivergence, vUv).x;\n float pressure = (L + R + B + T - divergence) * 0.25;\n gl_FragColor = vec4(pressure, 0.0, 0.0, 1.0);\n }\n `\n );\n\n const gradientSubtractShader = compile(\n gl.FRAGMENT_SHADER,\n `\n precision mediump float;\n precision mediump sampler2D;\n varying highp vec2 vUv;\n varying highp vec2 vL;\n varying highp vec2 vR;\n varying highp vec2 vT;\n varying highp vec2 vB;\n uniform sampler2D uPressure;\n uniform sampler2D uVelocity;\n\n void main () {\n float L = texture2D(uPressure, vL).x;\n float R = texture2D(uPressure, vR).x;\n float T = texture2D(uPressure, vT).x;\n float B = texture2D(uPressure, vB).x;\n vec2 velocity = texture2D(uVelocity, vUv).xy;\n velocity.xy -= vec2(R - L, T - B);\n gl_FragColor = vec4(velocity, 0.0, 1.0);\n }\n `\n );\n\n // Fullscreen blit\n\n const vertexBuffer = gl.createBuffer();\n const indexBuffer = gl.createBuffer();\n buffers.push(vertexBuffer, indexBuffer);\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, -1, 1, 1, 1, 1, -1]), gl.STATIC_DRAW);\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array([0, 1, 2, 0, 2, 3]), gl.STATIC_DRAW);\n gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(0);\n\n function blit(target: FBO | null, clear = false): void {\n if (target === null) {\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n } else {\n gl.viewport(0, 0, target.width, target.height);\n gl.bindFramebuffer(gl.FRAMEBUFFER, target.fbo);\n }\n if (clear) {\n gl.clearColor(0.0, 0.0, 0.0, 1.0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n }\n gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);\n }\n\n // Framebuffers\n\n function createFBO(w: number, h: number, internalFormat: number, format: number, type: number, param: number): FBO {\n gl.activeTexture(gl.TEXTURE0);\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, param);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, param);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, w, h, 0, format, type, null);\n\n const fbo = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n gl.viewport(0, 0, w, h);\n gl.clear(gl.COLOR_BUFFER_BIT);\n\n return {\n texture,\n fbo,\n width: w,\n height: h,\n texelSizeX: 1 / w,\n texelSizeY: 1 / h,\n attach(id: number): number {\n gl.activeTexture(gl.TEXTURE0 + id);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n return id;\n },\n };\n }\n\n function disposeFBO(target: FBO): void {\n gl.deleteTexture(target.texture);\n gl.deleteFramebuffer(target.fbo);\n }\n\n function disposeDoubleFBO(target: DoubleFBO): void {\n disposeFBO(target.read);\n disposeFBO(target.write);\n }\n\n function createDoubleFBO(\n w: number,\n h: number,\n internalFormat: number,\n format: number,\n type: number,\n param: number\n ): DoubleFBO {\n let fbo1 = createFBO(w, h, internalFormat, format, type, param);\n let fbo2 = createFBO(w, h, internalFormat, format, type, param);\n return {\n width: w,\n height: h,\n texelSizeX: fbo1.texelSizeX,\n texelSizeY: fbo1.texelSizeY,\n get read() {\n return fbo1;\n },\n set read(value: FBO) {\n fbo1 = value;\n },\n get write() {\n return fbo2;\n },\n set write(value: FBO) {\n fbo2 = value;\n },\n swap(): void {\n const temp = fbo1;\n fbo1 = fbo2;\n fbo2 = temp;\n },\n };\n }\n\n function resizeFBO(\n target: FBO,\n w: number,\n h: number,\n internalFormat: number,\n format: number,\n type: number,\n param: number\n ): FBO {\n const newFBO = createFBO(w, h, internalFormat, format, type, param);\n copyProgram.bind();\n gl.uniform1i(copyProgram.uniforms['uTexture'], target.attach(0));\n blit(newFBO);\n disposeFBO(target);\n return newFBO;\n }\n\n function resizeDoubleFBO(\n target: DoubleFBO,\n w: number,\n h: number,\n internalFormat: number,\n format: number,\n type: number,\n param: number\n ): DoubleFBO {\n if (target.width === w && target.height === h) return target;\n target.read = resizeFBO(target.read, w, h, internalFormat, format, type, param);\n disposeFBO(target.write);\n target.write = createFBO(w, h, internalFormat, format, type, param);\n target.width = w;\n target.height = h;\n target.texelSizeX = 1 / w;\n target.texelSizeY = 1 / h;\n return target;\n }\n\n // Programs + state\n\n const copyProgram = new ShaderProgram(baseVertexShader, copyShader);\n const clearProgram = new ShaderProgram(baseVertexShader, clearShader);\n const splatProgram = new ShaderProgram(baseVertexShader, splatShader);\n const advectionProgram = new ShaderProgram(baseVertexShader, advectionShader);\n const divergenceProgram = new ShaderProgram(baseVertexShader, divergenceShader);\n const curlProgram = new ShaderProgram(baseVertexShader, curlShader);\n const vorticityProgram = new ShaderProgram(baseVertexShader, vorticityShader);\n const pressureProgram = new ShaderProgram(baseVertexShader, pressureShader);\n const gradientSubtractProgram = new ShaderProgram(baseVertexShader, gradientSubtractShader);\n const displayMaterial = new DisplayMaterial(baseVertexShader, displayShaderSource);\n\n let dye!: DoubleFBO;\n let velocity!: DoubleFBO;\n let divergence!: FBO;\n let curl!: FBO;\n let pressure!: DoubleFBO;\n\n function initFramebuffers(): void {\n const simRes = getResolution(config.simResolution);\n const dyeRes = getResolution(dyeResolution);\n const texType = ext.halfFloatTexType;\n const rgba = ext.formatRGBA;\n const rg = ext.formatRG;\n const r = ext.formatR;\n const filtering = ext.supportLinearFiltering ? gl.LINEAR : gl.NEAREST;\n gl.disable(gl.BLEND);\n\n dye = dye\n ? resizeDoubleFBO(dye, dyeRes.width, dyeRes.height, rgba.internalFormat, rgba.format, texType, filtering)\n : createDoubleFBO(dyeRes.width, dyeRes.height, rgba.internalFormat, rgba.format, texType, filtering);\n\n velocity = velocity\n ? resizeDoubleFBO(velocity, simRes.width, simRes.height, rg.internalFormat, rg.format, texType, filtering)\n : createDoubleFBO(simRes.width, simRes.height, rg.internalFormat, rg.format, texType, filtering);\n\n // Recreated on every resize rather than resized, so the previous ones go first.\n if (divergence) disposeFBO(divergence);\n if (curl) disposeFBO(curl);\n if (pressure) disposeDoubleFBO(pressure);\n divergence = createFBO(simRes.width, simRes.height, r.internalFormat, r.format, texType, gl.NEAREST);\n curl = createFBO(simRes.width, simRes.height, r.internalFormat, r.format, texType, gl.NEAREST);\n pressure = createDoubleFBO(simRes.width, simRes.height, r.internalFormat, r.format, texType, gl.NEAREST);\n }\n\n displayMaterial.setKeywords(shading ? ['SHADING'] : []);\n initFramebuffers();\n let lastUpdateTime = Date.now();\n let colorUpdateTimer = 0;\n\n // Frame loop\n\n function updateFrame(): void {\n rafId = 0;\n if (!active || !visible) return;\n const dt = calcDeltaTime();\n if (resizeCanvas()) initFramebuffers();\n // No box, nothing to see: every pass of the solver would run for an empty\n // canvas, and the resolution maths would divide by a zero-sized drawing\n // buffer. The resize observer wakes the loop once the box is back.\n if (!hasBox) return;\n updateColors(dt);\n applyInputs();\n step(dt);\n render();\n rafId = requestAnimationFrame(updateFrame);\n }\n\n function calcDeltaTime(): number {\n const now = Date.now();\n const dt = Math.min((now - lastUpdateTime) / 1000, 0.016666);\n lastUpdateTime = now;\n return dt;\n }\n\n function resizeCanvas(): boolean {\n const width = scaleByPixelRatio(canvas.clientWidth);\n const height = scaleByPixelRatio(canvas.clientHeight);\n // The layout box, read by the frame itself so the first one knows it too. A\n // box with no area leaves the bitmap as it was: nothing can be seen on it.\n hasBox = width > 0 && height > 0;\n if (!hasBox || (canvas.width === width && canvas.height === height)) return false;\n canvas.width = width;\n canvas.height = height;\n return true;\n }\n\n function updateColors(dt: number): void {\n colorUpdateTimer += dt * config.colorUpdateSpeed;\n if (colorUpdateTimer >= 1) {\n colorUpdateTimer = wrap(colorUpdateTimer, 0, 1);\n pointer.color = generateColor();\n }\n }\n\n function applyInputs(): void {\n if (pointer.moved) {\n pointer.moved = false;\n splatPointer();\n }\n }\n\n function step(dt: number): void {\n gl.disable(gl.BLEND);\n curlProgram.bind();\n gl.uniform2f(curlProgram.uniforms['texelSize'], velocity.texelSizeX, velocity.texelSizeY);\n gl.uniform1i(curlProgram.uniforms['uVelocity'], velocity.read.attach(0));\n blit(curl);\n\n vorticityProgram.bind();\n gl.uniform2f(vorticityProgram.uniforms['texelSize'], velocity.texelSizeX, velocity.texelSizeY);\n gl.uniform1i(vorticityProgram.uniforms['uVelocity'], velocity.read.attach(0));\n gl.uniform1i(vorticityProgram.uniforms['uCurl'], curl.attach(1));\n gl.uniform1f(vorticityProgram.uniforms['curl'], config.curl);\n gl.uniform1f(vorticityProgram.uniforms['dt'], dt);\n blit(velocity.write);\n velocity.swap();\n\n divergenceProgram.bind();\n gl.uniform2f(divergenceProgram.uniforms['texelSize'], velocity.texelSizeX, velocity.texelSizeY);\n gl.uniform1i(divergenceProgram.uniforms['uVelocity'], velocity.read.attach(0));\n blit(divergence);\n\n clearProgram.bind();\n gl.uniform1i(clearProgram.uniforms['uTexture'], pressure.read.attach(0));\n gl.uniform1f(clearProgram.uniforms['value'], config.pressure);\n blit(pressure.write);\n pressure.swap();\n\n pressureProgram.bind();\n gl.uniform2f(pressureProgram.uniforms['texelSize'], velocity.texelSizeX, velocity.texelSizeY);\n gl.uniform1i(pressureProgram.uniforms['uDivergence'], divergence.attach(0));\n for (let i = 0; i < config.pressureIterations; i++) {\n gl.uniform1i(pressureProgram.uniforms['uPressure'], pressure.read.attach(1));\n blit(pressure.write);\n pressure.swap();\n }\n\n gradientSubtractProgram.bind();\n gl.uniform2f(gradientSubtractProgram.uniforms['texelSize'], velocity.texelSizeX, velocity.texelSizeY);\n gl.uniform1i(gradientSubtractProgram.uniforms['uPressure'], pressure.read.attach(0));\n gl.uniform1i(gradientSubtractProgram.uniforms['uVelocity'], velocity.read.attach(1));\n blit(velocity.write);\n velocity.swap();\n\n advectionProgram.bind();\n gl.uniform2f(advectionProgram.uniforms['texelSize'], velocity.texelSizeX, velocity.texelSizeY);\n if (!ext.supportLinearFiltering) {\n gl.uniform2f(advectionProgram.uniforms['dyeTexelSize'], velocity.texelSizeX, velocity.texelSizeY);\n }\n const velocityId = velocity.read.attach(0);\n gl.uniform1i(advectionProgram.uniforms['uVelocity'], velocityId);\n gl.uniform1i(advectionProgram.uniforms['uSource'], velocityId);\n gl.uniform1f(advectionProgram.uniforms['dt'], dt);\n gl.uniform1f(advectionProgram.uniforms['dissipation'], config.velocityDissipation);\n blit(velocity.write);\n velocity.swap();\n\n if (!ext.supportLinearFiltering) {\n gl.uniform2f(advectionProgram.uniforms['dyeTexelSize'], dye.texelSizeX, dye.texelSizeY);\n }\n gl.uniform1i(advectionProgram.uniforms['uVelocity'], velocity.read.attach(0));\n gl.uniform1i(advectionProgram.uniforms['uSource'], dye.read.attach(1));\n gl.uniform1f(advectionProgram.uniforms['dissipation'], config.densityDissipation);\n blit(dye.write);\n dye.swap();\n }\n\n function render(): void {\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n gl.enable(gl.BLEND);\n displayMaterial.bind();\n if (shading) {\n gl.uniform2f(displayMaterial.uniforms['texelSize'], 1 / gl.drawingBufferWidth, 1 / gl.drawingBufferHeight);\n }\n gl.uniform1i(displayMaterial.uniforms['uTexture'], dye.read.attach(0));\n blit(null);\n }\n\n // Splats\n\n function splatPointer(): void {\n const dx = pointer.deltaX * config.splatForce;\n const dy = pointer.deltaY * config.splatForce;\n splat(pointer.texcoordX, pointer.texcoordY, dx, dy, pointer.color);\n }\n\n function clickSplat(): void {\n const color = generateColor();\n color.r *= 10;\n color.g *= 10;\n color.b *= 10;\n const dx = 10 * (Math.random() - 0.5);\n const dy = 30 * (Math.random() - 0.5);\n splat(pointer.texcoordX, pointer.texcoordY, dx, dy, color);\n }\n\n function splat(x: number, y: number, dx: number, dy: number, color: RGB): void {\n splatProgram.bind();\n gl.uniform1i(splatProgram.uniforms['uTarget'], velocity.read.attach(0));\n gl.uniform1f(splatProgram.uniforms['aspectRatio'], canvas.width / canvas.height);\n gl.uniform2f(splatProgram.uniforms['point'], x, y);\n gl.uniform3f(splatProgram.uniforms['color'], dx, dy, 0);\n gl.uniform1f(splatProgram.uniforms['radius'], correctRadius(config.splatRadius / 100));\n blit(velocity.write);\n velocity.swap();\n\n gl.uniform1i(splatProgram.uniforms['uTarget'], dye.read.attach(0));\n gl.uniform3f(splatProgram.uniforms['color'], color.r, color.g, color.b);\n blit(dye.write);\n dye.swap();\n }\n\n function correctRadius(radius: number): number {\n const aspectRatio = canvas.width / canvas.height;\n return aspectRatio > 1 ? radius * aspectRatio : radius;\n }\n\n // Pointer\n\n function pointerDown(posX: number, posY: number): void {\n pointer.moved = false;\n pointer.texcoordX = posX / canvas.width;\n pointer.texcoordY = 1 - posY / canvas.height;\n pointer.prevTexcoordX = pointer.texcoordX;\n pointer.prevTexcoordY = pointer.texcoordY;\n pointer.deltaX = 0;\n pointer.deltaY = 0;\n pointer.color = generateColor();\n }\n\n function pointerMove(posX: number, posY: number, color: RGB): void {\n pointer.prevTexcoordX = pointer.texcoordX;\n pointer.prevTexcoordY = pointer.texcoordY;\n pointer.texcoordX = posX / canvas.width;\n pointer.texcoordY = 1 - posY / canvas.height;\n pointer.deltaX = correctDeltaX(pointer.texcoordX - pointer.prevTexcoordX);\n pointer.deltaY = correctDeltaY(pointer.texcoordY - pointer.prevTexcoordY);\n pointer.moved = Math.abs(pointer.deltaX) > 0 || Math.abs(pointer.deltaY) > 0;\n pointer.color = color;\n }\n\n function correctDeltaX(delta: number): number {\n const aspectRatio = canvas.width / canvas.height;\n return aspectRatio < 1 ? delta * aspectRatio : delta;\n }\n\n function correctDeltaY(delta: number): number {\n const aspectRatio = canvas.width / canvas.height;\n return aspectRatio > 1 ? delta / aspectRatio : delta;\n }\n\n // Colours\n\n function hexToRGB(hex: string): RGB {\n let val = hex.replace('#', '');\n if (val.length === 3) val = val[0] + val[0] + val[1] + val[1] + val[2] + val[2];\n return {\n r: (Number.parseInt(val.slice(0, 2), 16) / 255) * 0.15,\n g: (Number.parseInt(val.slice(2, 4), 16) / 255) * 0.15,\n b: (Number.parseInt(val.slice(4, 6), 16) / 255) * 0.15,\n };\n }\n\n function generateColor(): RGB {\n if (!config.rainbow) return hexToRGB(config.color);\n const c = hsvToRgb(Math.random(), 1, 1);\n c.r *= 0.15;\n c.g *= 0.15;\n c.b *= 0.15;\n return c;\n }\n\n function hsvToRgb(h: number, s: number, v: number): RGB {\n const i = Math.floor(h * 6);\n const f = h * 6 - i;\n const p = v * (1 - s);\n const q = v * (1 - f * s);\n const t = v * (1 - (1 - f) * s);\n switch (i % 6) {\n case 0:\n return { r: v, g: t, b: p };\n case 1:\n return { r: q, g: v, b: p };\n case 2:\n return { r: p, g: v, b: t };\n case 3:\n return { r: p, g: q, b: v };\n case 4:\n return { r: t, g: p, b: v };\n default:\n return { r: v, g: p, b: q };\n }\n }\n\n function wrap(value: number, min: number, max: number): number {\n const range = max - min;\n if (range === 0) return min;\n return ((value - min) % range) + min;\n }\n\n function getResolution(resolution: number): { width: number; height: number } {\n let aspectRatio = gl.drawingBufferWidth / gl.drawingBufferHeight;\n if (aspectRatio < 1) aspectRatio = 1 / aspectRatio;\n const min = Math.round(resolution);\n const max = Math.round(resolution * aspectRatio);\n return gl.drawingBufferWidth > gl.drawingBufferHeight ? { width: max, height: min } : { width: min, height: max };\n }\n\n function scaleByPixelRatio(input: number): number {\n return Math.floor(input * (window.devicePixelRatio || 1));\n }\n\n function hashCode(s: string): number {\n let hash = 0;\n for (let i = 0; i < s.length; i++) {\n hash = (hash << 5) - hash + s.charCodeAt(i);\n hash |= 0;\n }\n return hash;\n }\n\n // Events + boot\n\n let firstMoveHandled = false;\n\n // Coordinates are taken relative to the canvas box: identical to the\n // raw client position for the fullscreen overlay, and it makes a\n // contained canvas track the pointer correctly too.\n const toLocal = (clientX: number, clientY: number): { x: number; y: number } => {\n const rect = canvas.getBoundingClientRect();\n return { x: scaleByPixelRatio(clientX - rect.left), y: scaleByPixelRatio(clientY - rect.top) };\n };\n\n const onMouseDown = (e: MouseEvent): void => {\n const pos = toLocal(e.clientX, e.clientY);\n pointerDown(pos.x, pos.y);\n clickSplat();\n };\n\n const onMouseMove = (e: MouseEvent): void => {\n const pos = toLocal(e.clientX, e.clientY);\n const color = firstMoveHandled ? pointer.color : generateColor();\n firstMoveHandled = true;\n pointerMove(pos.x, pos.y, color);\n };\n\n const onTouchStart = (e: TouchEvent): void => {\n const t = e.targetTouches[0];\n if (!t) return;\n const pos = toLocal(t.clientX, t.clientY);\n pointerDown(pos.x, pos.y);\n };\n\n const onTouchMove = (e: TouchEvent): void => {\n const t = e.targetTouches[0];\n if (!t) return;\n const pos = toLocal(t.clientX, t.clientY);\n pointerMove(pos.x, pos.y, pointer.color);\n };\n\n window.addEventListener('mousedown', onMouseDown);\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('touchstart', onTouchStart, { passive: true });\n window.addEventListener('touchmove', onTouchMove, { passive: true });\n\n // A contained canvas scrolled out of view, or one with no box, stops asking for\n // frames, the way `wr-waves` does: the solver runs every pass of the pipeline\n // each frame, for nothing anyone can see. The fullscreen overlay is always in\n // view. Without the observers (jsdom) nothing reports a change, so what the\n // first frame measures stands: a box runs the loop, no box parks it. A box flush\n // against a zero-height clip intersects with nothing showing, and only a second\n // threshold reports the clip moving. It sits below any real ratio, or a clip\n // closing on a transition steps from under it to 0 without crossing anything.\n let visible = true;\n const wake = (): void => {\n if (visible && hasBox && active && rafId === 0) {\n // The time away is not simulated: the first frame back steps from now.\n lastUpdateTime = Date.now();\n rafId = requestAnimationFrame(updateFrame);\n }\n };\n const io =\n typeof IntersectionObserver === 'undefined'\n ? null\n : new IntersectionObserver(\n entries => {\n const { isIntersecting, intersectionRatio } = entries[entries.length - 1];\n visible = isIntersecting && intersectionRatio > 0;\n wake();\n },\n { threshold: [0, 1e-9] }\n );\n io?.observe(canvas);\n // The frame measures the box itself, and a parked loop has no frame: the\n // observer is what hears the box come back.\n const ro =\n typeof ResizeObserver === 'undefined'\n ? null\n : new ResizeObserver(() => {\n hasBox = canvas.clientWidth > 0 && canvas.clientHeight > 0;\n wake();\n });\n ro?.observe(canvas);\n\n updateFrame();\n\n return () => {\n active = false;\n cancelAnimationFrame(rafId);\n io?.disconnect();\n ro?.disconnect();\n window.removeEventListener('mousedown', onMouseDown);\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('touchstart', onTouchStart);\n window.removeEventListener('touchmove', onTouchMove);\n // The context is NOT lost here on purpose — input changes reboot the\n // sim on the same canvas, and a lost context can't be re-acquired. So\n // everything this boot allocated on it is freed by hand instead.\n for (const target of [dye, velocity, pressure]) disposeDoubleFBO(target);\n disposeFBO(divergence);\n disposeFBO(curl);\n for (const program of programs) gl.deleteProgram(program);\n for (const shader of shaders) gl.deleteShader(shader);\n for (const buffer of buffers) gl.deleteBuffer(buffer);\n };\n}\n\n// WebGL context bootstrap\n\nfunction getWebGLContext(canvas: HTMLCanvasElement): { gl: GL; ext: GlExt } | null {\n const params: WebGLContextAttributes = {\n alpha: true,\n depth: false,\n stencil: false,\n antialias: false,\n preserveDrawingBuffer: false,\n };\n\n const gl2 = canvas.getContext('webgl2', params);\n const gl = gl2 ?? canvas.getContext('webgl', params);\n if (!gl) return null;\n const isWebGL2 = !!gl2;\n\n let halfFloat: OES_texture_half_float | null = null;\n let supportLinearFiltering: boolean;\n if (isWebGL2) {\n gl.getExtension('EXT_color_buffer_float');\n supportLinearFiltering = !!gl.getExtension('OES_texture_float_linear');\n } else {\n halfFloat = gl.getExtension('OES_texture_half_float');\n supportLinearFiltering = !!gl.getExtension('OES_texture_half_float_linear');\n }\n gl.clearColor(0, 0, 0, 1);\n\n const halfFloatTexType = isWebGL2\n ? (gl as WebGL2RenderingContext).HALF_FLOAT\n : (halfFloat?.HALF_FLOAT_OES ?? gl.UNSIGNED_BYTE);\n\n let formatRGBA: TexFormat | null;\n let formatRG: TexFormat | null;\n let formatR: TexFormat | null;\n if (isWebGL2) {\n const g2 = gl as WebGL2RenderingContext;\n formatRGBA = getSupportedFormat(g2, g2.RGBA16F, g2.RGBA, halfFloatTexType);\n formatRG = getSupportedFormat(g2, g2.RG16F, g2.RG, halfFloatTexType);\n formatR = getSupportedFormat(g2, g2.R16F, g2.RED, halfFloatTexType);\n } else {\n formatRGBA = getSupportedFormat(gl, gl.RGBA, gl.RGBA, halfFloatTexType);\n formatRG = formatRGBA;\n formatR = formatRGBA;\n }\n if (!formatRGBA || !formatRG || !formatR) return null;\n\n return { gl, ext: { formatRGBA, formatRG, formatR, halfFloatTexType, supportLinearFiltering } };\n}\n\nfunction getSupportedFormat(gl: GL, internalFormat: number, format: number, type: number): TexFormat | null {\n if (!supportRenderTextureFormat(gl, internalFormat, format, type)) {\n const g2 = gl as WebGL2RenderingContext;\n switch (internalFormat) {\n case g2.R16F:\n return getSupportedFormat(gl, g2.RG16F, g2.RG, type);\n case g2.RG16F:\n return getSupportedFormat(gl, g2.RGBA16F, g2.RGBA, type);\n default:\n return null;\n }\n }\n return { internalFormat, format };\n}\n\nfunction supportRenderTextureFormat(gl: GL, internalFormat: number, format: number, type: number): boolean {\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, 4, 4, 0, format, type, null);\n const fbo = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n const complete = gl.checkFramebufferStatus(gl.FRAMEBUFFER) === gl.FRAMEBUFFER_COMPLETE;\n // A probe, run on every boot: free it, or each reboot leaves one behind.\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(fbo);\n gl.deleteTexture(texture);\n return complete;\n}\n\nexport { createFluidSimulation };\nexport type { WrFluidConfig };\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n *\n * Angular adaptation of the SplashCursor effect by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/animations/splash-cursor\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport type { ElementRef } from '@angular/core';\nimport { Component, NgZone, PLATFORM_ID, ViewEncapsulation, effect, inject, input, viewChild } from '@angular/core';\n\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\nimport { createFluidSimulation } from './fluid';\n\n/**\n * Splash cursor — a WebGL fluid simulation that splashes colourful dye\n * wherever the pointer moves or clicks. Renders as a fixed, full-viewport,\n * click-through overlay; mount it once on a page (it follows the pointer\n * everywhere) and it tears down with the component.\n *\n * Renders nothing under `prefers-reduced-motion` or when WebGL is\n * unavailable. Off screen, or with no box to draw on, the solver stops asking\n * for frames and resumes where it left off.\n *\n * @example\n * ```html\n * <wr-splash-cursor />\n * <wr-splash-cursor [rainbow]=\"false\" color=\"#5227ff\" />\n * ```\n *\n * @see https://ngwr.dev/bits/splash-cursor\n */\n@Component({\n selector: 'wr-splash-cursor',\n template: '<canvas #canvas class=\"wr-splash-cursor__canvas\" aria-hidden=\"true\"></canvas>',\n styleUrl: './splash-cursor.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-splash-cursor',\n '[class.wr-splash-cursor--contained]': '!fullscreen()',\n },\n})\nexport class WrSplashCursor {\n /**\n * `true` overlays the whole viewport (reactbits behaviour); `false`\n * fills the nearest positioned ancestor instead — handy for demo boxes,\n * and the dye collides with the box walls. @default true\n */\n readonly fullscreen = input(true, { transform: coerceBooleanProperty });\n\n /** Velocity / pressure grid resolution. @default 128 */\n readonly simResolution = input(128, { transform: numAttr(128) });\n\n /** Dye texture resolution — the visible detail. @default 1440 */\n readonly dyeResolution = input(1440, { transform: numAttr(1440) });\n\n /** How fast the dye fades, higher = shorter trails. @default 3.5 */\n readonly densityDissipation = input(3.5, { transform: numAttr(3.5) });\n\n /** How fast motion settles. @default 2 */\n readonly velocityDissipation = input(2, { transform: numAttr(2) });\n\n /** Pressure retained between frames, 0..1. @default 0.1 */\n readonly pressure = input(0.1, { transform: numAttr(0.1) });\n\n /** Jacobi iterations for the pressure solve. @default 20 */\n readonly pressureIterations = input(20, { transform: numAttr(20) });\n\n /** Vorticity confinement — swirliness. @default 3 */\n readonly curl = input(3, { transform: numAttr(3) });\n\n /** Splat size. @default 0.2 */\n readonly splatRadius = input(0.2, { transform: numAttr(0.2) });\n\n /** Velocity a pointer move injects. @default 6000 */\n readonly splatForce = input(6000, { transform: numAttr(6000) });\n\n /** Pseudo-3D shading on the dye. @default true */\n readonly shading = input(true, { transform: coerceBooleanProperty });\n\n /** How fast the splat colour cycles. @default 10 */\n readonly colorUpdateSpeed = input(10, { transform: numAttr(10) });\n\n /** Cycle splat colours through the rainbow. @default true */\n readonly rainbow = input(true, { transform: coerceBooleanProperty });\n\n /** Fixed splat colour when `rainbow` is off. @default '#ff0000' */\n readonly color = input('#ff0000');\n\n private readonly canvasRef = viewChild<ElementRef<HTMLCanvasElement>>('canvas');\n\n private readonly zone = inject(NgZone);\n private readonly platform = inject(WrPlatform);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n constructor() {\n if (!this.isBrowser) return;\n\n // (Re)boot whenever the canvas appears, any input changes, or the OS\n // reduced-motion preference flips. `onCleanup` tears the old sim down.\n effect(onCleanup => {\n const canvas = this.canvasRef()?.nativeElement;\n const config = {\n simResolution: this.simResolution(),\n dyeResolution: this.dyeResolution(),\n densityDissipation: this.densityDissipation(),\n velocityDissipation: this.velocityDissipation(),\n pressure: this.pressure(),\n pressureIterations: this.pressureIterations(),\n curl: this.curl(),\n splatRadius: this.splatRadius(),\n splatForce: this.splatForce(),\n shading: this.shading(),\n colorUpdateSpeed: this.colorUpdateSpeed(),\n rainbow: this.rainbow(),\n color: this.color(),\n };\n if (!canvas || this.platform.prefersReducedMotion()) return;\n const teardown = this.zone.runOutsideAngular(() => createFluidSimulation(canvas, config));\n if (teardown) onCleanup(teardown);\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuFA,SA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AA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAQ,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -1,54 +0,0 @@
1
- import { ComponentHarness, HarnessPredicate } from "@angular/cdk/testing";
2
- /**
3
- * @license
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
7
- */
8
- const PIECE = ".wr-split-text__piece";
9
- const SPACE = ".wr-split-text__space";
10
- const SR_ONLY = ".wr-split-text__sr-only";
11
- const INLINE_OPACITY = /(?:^|;)\s*opacity\s*:/;
12
- const INLINE_TEXT_ALIGN = /(?:^|;)\s*text-align\s*:\s*([^;]+)/;
13
- async function rawText(element) {
14
- return await element.getProperty("textContent") ?? "";
15
- }
16
- var WrSplitTextHarness = class WrSplitTextHarness extends ComponentHarness {
17
- static hostSelector = "wr-split-text";
18
- static with(options = {}) {
19
- return new HarnessPredicate(WrSplitTextHarness, options).addOption("text", options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getAccessibleText(), text)).addOption("pieceCount", options.pieceCount, async (harness, count) => await harness.getPieceCount() === count).addOption("textAlign", options.textAlign, async (harness, align) => await harness.getTextAlign() === align);
20
- }
21
- pieces = this.locatorForAll(PIECE);
22
- spaces = this.locatorForAll(SPACE);
23
- async getAccessibleText() {
24
- return rawText(await this.locatorFor(SR_ONLY)());
25
- }
26
- async getPieces() {
27
- return Promise.all((await this.pieces()).map(rawText));
28
- }
29
- async getPieceCount() {
30
- return (await this.pieces()).length;
31
- }
32
- async getSpaceCount() {
33
- return (await this.spaces()).length;
34
- }
35
- async getRenderedText() {
36
- const parts = await this.locatorForAll(`${PIECE}, ${SPACE}`)();
37
- return (await Promise.all(parts.map(rawText))).join("");
38
- }
39
- async isTextHidden() {
40
- const parts = await this.locatorForAll(`${PIECE}, ${SPACE}`)();
41
- if (parts.length === 0) throw new Error("WrSplitTextHarness.isTextHidden(): this <wr-split-text> drew no pieces, so there is nothing to be hidden from a screen reader and \"true\" would be a vacuous answer — the same one a component that stopped splitting its text would give. Check `text` is set, or ask getPieceCount().");
42
- return (await Promise.all(parts.map((part) => part.getAttribute("aria-hidden")))).every((value) => value === "true");
43
- }
44
- async getTextAlign() {
45
- const match = INLINE_TEXT_ALIGN.exec(await (await this.host()).getAttribute("style") ?? "");
46
- return match ? match[1].trim() : null;
47
- }
48
- async hasStagedMotion() {
49
- return (await Promise.all((await this.pieces()).map((piece) => piece.getAttribute("style")))).some((style) => INLINE_OPACITY.test(style ?? ""));
50
- }
51
- };
52
- export { WrSplitTextHarness };
53
-
54
- //# sourceMappingURL=ngwr-bits-split-text-testing.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngwr-bits-split-text-testing.mjs","names":[],"sources":["../../../projects/lib/bits/split-text/testing/wr-split-text-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrSplitTextHarnessFilters } from './types';\n\n/** The animated pieces — one per character or per word, whitespace excluded. */\nconst PIECE = '.wr-split-text__piece';\n\n/** The whitespace runs between them, rendered but never staggered. */\nconst SPACE = '.wr-split-text__space';\n\n/** The readable copy of the string, carried once and hidden with CSS. */\nconst SR_ONLY = '.wr-split-text__sr-only';\n\n/**\n * An inline `opacity` declaration — written on every piece the tween touches.\n *\n * `motionToStyle` always produces an opacity, whether or not `from` declared one, and\n * the same property is re-committed when the tween finishes. Matched off the `style`\n * ATTRIBUTE, never through `getCssValue`: a computed style answers `1` for a piece\n * nothing was ever written to, which is the exact case this has to distinguish.\n */\nconst INLINE_OPACITY = /(?:^|;)\\s*opacity\\s*:/;\n\n/** The host's own alignment declaration, as the host binding wrote it. */\nconst INLINE_TEXT_ALIGN = /(?:^|;)\\s*text-align\\s*:\\s*([^;]+)/;\n\n/** Exactly what the element holds — untrimmed, unlike `TestElement.text()`. */\nasync function rawText(element: TestElement): Promise<string> {\n return (await element.getProperty<string | null>('textContent')) ?? '';\n}\n\n/**\n * Test harness for `<wr-split-text>`.\n *\n * **The tween is unreadable from a test, and the absent methods are absent for that\n * reason.** Each piece is animated from a `from` motion state to a `to` one through the\n * Web Animations API, started by an `IntersectionObserver`. A unit test has no layout,\n * no compositor and no WAAPI, so there is no `getOpacity()` and no `getTransform()`:\n * both would report the frozen staged value in jsdom and a value the compositor is not\n * painting in a browser. There is no `getFromState()` / `getToState()` either — those\n * objects only reach the DOM as staged inline styles, on the one path that throws here,\n * so reporting them would mean re-deriving an input from a string the component may\n * never have written. No `isAnimating()`, no `whenAnimationComplete()`: nothing in the\n * document says a tween is running, and completion is the `animationComplete` OUTPUT,\n * which the host binds. No `enterViewport()` / `trigger()`, because an observer is not\n * reachable from a `TestElement` — and observation here is additionally gated behind\n * `document.fonts.ready`, which jsdom does not have, so a `waitForFonts()` would resolve\n * instantly and prove nothing about the gating it claimed to test. Nothing measures\n * either: `getLineCount()` / `didItWrap()` would need layout (and `lines` is not a split\n * this port supports), and the `overflow: hidden` mask with its descender compensation\n * is a stylesheet, which a test runs none of.\n *\n * **What is real is the split, the accessible layer and the alignment.** The string is\n * carried once in a visually-hidden span and every drawn piece is `aria-hidden`, so\n * {@link getAccessibleText} is what is heard while {@link getPieces} is what is drawn —\n * two questions, and a spec asserting only the second would pass on a component that\n * spells the text out letter by letter. {@link getRenderedText} closes the loop by\n * putting the pieces and the spaces back together: the split has to be lossless, and\n * that comparison is what catches a dropped space or a halved surrogate pair. Whether\n * the hidden copy is genuinely off-screen is CSS, so nothing here claims to know.\n *\n * **{@link getTextAlign} is the one input this component reflects**, written straight\n * onto the host as an inline style — an honest read with no layout involved, unlike\n * anything else about how the text is arranged. And {@link hasStagedMotion} is the one\n * fact about the tween worth pinning: that the pieces were taken over, not that anything\n * is moving.\n *\n * Driving the reveal is the spec's job — jsdom supplies neither half of it, and the font\n * gate defers observation by a microtask:\n *\n * ```ts\n * // Before TestBed.createComponent — keep the callbacks so the spec can fire them.\n * vi.stubGlobal('IntersectionObserver', StubObserver);\n * // Otherwise `el.animate(...)` throws mid-stagger and leaves the DOM half-staged.\n * Reflect.set(Element.prototype, 'animate', () => ({ cancel: () => undefined, onfinish: null }));\n * // …and always settle before tearing down: observation is queued off a promise, and\n * // landing after destroy() registers a teardown on a dead DestroyRef (NG0911).\n * await fixture.whenStable();\n * ```\n *\n * @example\n * ```ts\n * const hero = await loader.getHarness(WrSplitTextHarness.with({ textAlign: 'center' }));\n *\n * expect(await hero.getPieces()).toEqual(['H', 'e', 'l', 'l', 'o']);\n * expect(await hero.getRenderedText()).toBe(await hero.getAccessibleText());\n * expect(await hero.isTextHidden()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSplitTextHarness extends ComponentHarness {\n static hostSelector = 'wr-split-text';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSplitTextHarnessFilters = {}): HarnessPredicate<WrSplitTextHarness> {\n return new HarnessPredicate(WrSplitTextHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getAccessibleText(), text)\n )\n .addOption('pieceCount', options.pieceCount, async (harness, count) => (await harness.getPieceCount()) === count)\n .addOption('textAlign', options.textAlign, async (harness, align) => (await harness.getTextAlign()) === align);\n }\n\n private readonly pieces = this.locatorForAll(PIECE);\n private readonly spaces = this.locatorForAll(SPACE);\n\n /**\n * The whole string, as the one readable copy holds it.\n *\n * All a screen reader gets, since every drawn piece is out of the tree — lose this\n * span and the component becomes a nameless pile of hidden spans, with no other\n * symptom anywhere in the DOM.\n *\n * Untrimmed, deliberately: leading and trailing whitespace is content the split has to\n * carry, and {@link getRenderedText} is meant to compare equal to this. A trimmed read\n * on one side of that comparison would forgive the case it exists to catch.\n */\n async getAccessibleText(): Promise<string> {\n return rawText(await this.locatorFor(SR_ONLY)());\n }\n\n /**\n * The animated pieces, in document order — one per character, or one per word.\n *\n * The split the stagger runs over: `['H', 'i']` at the default `splitType=\"chars\"`\n * against `['Hi', 'there']` for `\"words\"`, and `['a', '🚀']` for a surrogate pair the\n * code-point split kept whole instead of halving into two broken glyphs. Whitespace is\n * not here — it is drawn separately and never staggered, so see {@link getSpaceCount}.\n */\n async getPieces(): Promise<string[]> {\n return Promise.all((await this.pieces()).map(rawText));\n }\n\n /**\n * How many pieces the stagger runs over.\n *\n * `delay` × this is the real length of the effect, and the only number about the\n * animation present in the document.\n */\n async getPieceCount(): Promise<number> {\n return (await this.pieces()).length;\n }\n\n /**\n * How many whitespace runs sit between the pieces.\n *\n * Its own method because whitespace is deliberately excluded from the animated set:\n * reclassifying spaces as pieces would leave {@link getRenderedText} identical, change\n * the stagger count and the rhythm of the reveal, and show up nowhere else.\n */\n async getSpaceCount(): Promise<number> {\n return (await this.spaces()).length;\n }\n\n /**\n * Everything the component drew, pieces and spaces together, in document order.\n *\n * The assertion this exists for is `getRenderedText() === getAccessibleText()`: the\n * split must be lossless. A swallowed space, a re-split that dropped a character or a\n * surrogate pair cut in half all leave the accessible copy intact and are invisible\n * from anywhere else.\n */\n async getRenderedText(): Promise<string> {\n const parts = await this.locatorForAll(`${PIECE}, ${SPACE}`)();\n return (await Promise.all(parts.map(rawText))).join('');\n }\n\n /**\n * Whether every drawn piece is out of the accessibility tree.\n *\n * The defect this component exists to avoid is a screen reader reading\n * `H. e. l. l. o.`, and one piece missing `aria-hidden` brings it back — so this is\n * all-or-nothing, across both element kinds: a readable space is heard as a pause in\n * the middle of a word.\n *\n * Throws when the split produced nothing at all. An empty run of elements satisfies\n * \"every one of them is hidden\" without anything being hidden, which is also what a\n * component that stopped rendering its pieces would report.\n */\n async isTextHidden(): Promise<boolean> {\n const parts = await this.locatorForAll(`${PIECE}, ${SPACE}`)();\n\n if (parts.length === 0) {\n throw new Error(\n 'WrSplitTextHarness.isTextHidden(): this <wr-split-text> drew no pieces, so there is nothing to be ' +\n 'hidden from a screen reader and \"true\" would be a vacuous answer — the same one a component that ' +\n 'stopped splitting its text would give. Check `text` is set, or ask getPieceCount().'\n );\n }\n\n const hidden = await Promise.all(parts.map(part => part.getAttribute('aria-hidden')));\n return hidden.every(value => value === 'true');\n }\n\n /**\n * The alignment the host was given, as the component wrote it.\n *\n * Off the inline `style` attribute rather than through `getCssValue`, and the\n * difference is not pedantry: computed style answers for an element nobody wrote to —\n * with the inherited or user-agent value — so a host that stopped reflecting the input\n * altogether would keep reporting a plausible `left` or `start`. The attribute is the\n * fact being asserted.\n *\n * `null` means the host carries no alignment at all, which the component never does:\n * the binding is unconditional and the input defaults to `'center'`.\n */\n async getTextAlign(): Promise<string | null> {\n const match = INLINE_TEXT_ALIGN.exec((await (await this.host()).getAttribute('style')) ?? '');\n return match ? match[1].trim() : null;\n }\n\n /**\n * Whether the reveal has taken the pieces over — NOT whether anything is animating.\n *\n * Read off the inline `style` attribute the component writes itself, so it stays\n * `true` once the reveal has finished: the tween commits its end state back to the\n * same inline properties on `onfinish`. Anyone reaching for `isAnimating()` wants a\n * frame, and there are no frames here.\n *\n * `false` is the answer worth asserting. It means no piece was written to, which is\n * both the pre-trigger state and the reduced-motion promise — the component returns\n * before staging anything, so a reader who asked for less motion cannot be left with\n * text parked at `from.opacity: 0` by a tween that never runs.\n *\n * ANY piece counts, not all of them, and that is the conservative reading rather than\n * a loose one: a stagger that stages the first piece and then throws leaves exactly\n * one glyph invisible, which is a real failure — and one jsdom reproduces every time\n * `Element.prototype.animate` is missing.\n */\n async hasStagedMotion(): Promise<boolean> {\n const styles = await Promise.all((await this.pieces()).map(piece => piece.getAttribute('style')));\n return styles.some(style => INLINE_OPACITY.test(style ?? ''));\n }\n}\n"],"mappings":";;;;;;;AAYA,MAAM,QAAQ;AAGd,MAAM,QAAQ;AAGd,MAAM,UAAU;AAUhB,MAAM,iBAAiB;AAGvB,MAAM,oBAAoB;AAG1B,eAAe,QAAQ,SAAoB;CACzC,OAAQ,MAAM,QAAQ,YAA2B,aAAa,KAAM;AACtE;AA8DA,IAAa,qBAAb,MAAa,2BAA2B,iBAAgB;CACtD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAqC,CAAA,GAAE;EACjD,OAAO,IAAI,iBAAiB,oBAAoB,OAAO,CAAC,CACrD,UAAU,QAAQ,QAAQ,OAAO,SAAS,SACzC,iBAAiB,cAAc,QAAQ,kBAAiB,GAAI,IAAI,CAAC,CAClE,CACA,UAAU,cAAc,QAAQ,YAAY,OAAO,SAAS,UAAW,MAAM,QAAQ,cAAa,MAAQ,KAAK,CAAC,CAChH,UAAU,aAAa,QAAQ,WAAW,OAAO,SAAS,UAAW,MAAM,QAAQ,aAAY,MAAQ,KAAK;CACjH;CAEiB,SAAS,KAAK,cAAc,KAAK;CACjC,SAAS,KAAK,cAAc,KAAK;CAalD,MAAM,oBAAiB;EACrB,OAAO,QAAQ,MAAM,KAAK,WAAW,OAAO,CAAC,CAAA,CAAE;CACjD;CAUA,MAAM,YAAS;EACb,OAAO,QAAQ,KAAK,MAAM,KAAK,OAAM,EAAA,CAAI,IAAI,OAAO,CAAC;CACvD;CAQA,MAAM,gBAAa;EACjB,QAAQ,MAAM,KAAK,OAAM,EAAA,CAAI;CAC/B;CASA,MAAM,gBAAa;EACjB,QAAQ,MAAM,KAAK,OAAM,EAAA,CAAI;CAC/B;CAUA,MAAM,kBAAe;EACnB,MAAM,QAAQ,MAAM,KAAK,cAAc,GAAG,MAAK,IAAK,OAAO,CAAC,CAAA;EAC5D,QAAQ,MAAM,QAAQ,IAAI,MAAM,IAAI,OAAO,CAAC,EAAA,CAAG,KAAK,EAAE;CACxD;CAcA,MAAM,eAAY;EAChB,MAAM,QAAQ,MAAM,KAAK,cAAc,GAAG,MAAK,IAAK,OAAO,CAAC,CAAA;EAE5D,IAAI,MAAM,WAAW,GACnB,MAAM,IAAI,MACR,0RAEuF;EAK3F,QAAO,MADc,QAAQ,IAAI,MAAM,KAAI,SAAQ,KAAK,aAAa,aAAa,CAAC,CAAC,EAC7E,CAAO,OAAM,UAAS,UAAU,MAAM;CAC/C;CAcA,MAAM,eAAY;EAChB,MAAM,QAAQ,kBAAkB,KAAM,OAAO,MAAM,KAAK,KAAI,EAAA,CAAI,aAAa,OAAO,KAAM,EAAE;EAC5F,OAAO,QAAQ,MAAM,EAAE,CAAC,KAAI,IAAK;CACnC;CAoBA,MAAM,kBAAe;EAEnB,QAAO,MADc,QAAQ,KAAK,MAAM,KAAK,OAAM,EAAA,CAAI,KAAI,UAAS,MAAM,aAAa,OAAO,CAAC,CAAC,EACzF,CAAO,MAAK,UAAS,eAAe,KAAK,SAAS,EAAE,CAAC;CAC9D"}
@@ -1,378 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import { Component, DestroyRef, ElementRef, PLATFORM_ID, ViewEncapsulation, afterNextRender, computed, effect, inject, input, output } from "@angular/core";
3
- import { isPlatformBrowser } from "@angular/common";
4
- import { numAttr } from "ngwr/utils";
5
- import { WrPlatform } from "ngwr/platform";
6
- /**
7
- * @license
8
- *
9
- * Use of this source code is governed by an MIT-style license that can be
10
- * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
11
- *
12
- * Angular adaptation of the SplitText effect by David Haz / reactbits.dev.
13
- * Original: https://www.reactbits.dev/text-animations/split-text
14
- *
15
- * The reactbits version uses GSAP's paid `SplitText` plugin. This port is
16
- * GSAP-free — splits via plain DOM spans, animates via the Web Animations
17
- * API, triggers on viewport entry via `IntersectionObserver`.
18
- */
19
- function splitPieces(text, unit) {
20
- if (!text) return [];
21
- if (unit === "words") return text.split(/(\s+)/).flatMap((seg) => {
22
- if (seg.length === 0) return [];
23
- if (/^\s+$/.test(seg)) return [{
24
- kind: "space",
25
- text: seg
26
- }];
27
- return [{
28
- kind: "piece",
29
- text: seg
30
- }];
31
- });
32
- return [...text].map((ch) => /\s/.test(ch) ? {
33
- kind: "space",
34
- text: ch
35
- } : {
36
- kind: "piece",
37
- text: ch
38
- });
39
- }
40
- function motionToStyle(m) {
41
- const opacity = m.opacity ?? 1;
42
- const parts = [];
43
- if (m.x !== void 0 || m.y !== void 0) parts.push(`translate3d(${m.x ?? 0}px, ${m.y ?? 0}px, 0)`);
44
- if (m.scale !== void 0) parts.push(`scale(${m.scale})`);
45
- if (m.rotate !== void 0) parts.push(`rotate(${m.rotate}deg)`);
46
- return {
47
- opacity,
48
- transform: parts.length ? parts.join(" ") : "none"
49
- };
50
- }
51
- var WrSplitText = class WrSplitText {
52
- text = input.required(...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
53
- splitType = input("chars", ...ngDevMode ? [{ debugName: "splitType" }] : /* istanbul ignore next */ []);
54
- delay = input(50, {
55
- ...ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {},
56
- transform: numAttr(50)
57
- });
58
- duration = input(1.25, {
59
- ...ngDevMode ? { debugName: "duration" } : /* istanbul ignore next */ {},
60
- transform: numAttr(1.25)
61
- });
62
- easing = input("cubic-bezier(0.16, 1, 0.3, 1)", ...ngDevMode ? [{ debugName: "easing" }] : /* istanbul ignore next */ []);
63
- from = input({
64
- opacity: 0,
65
- y: 40
66
- }, ...ngDevMode ? [{ debugName: "from" }] : /* istanbul ignore next */ []);
67
- to = input({
68
- opacity: 1,
69
- y: 0
70
- }, ...ngDevMode ? [{ debugName: "to" }] : /* istanbul ignore next */ []);
71
- threshold = input(.1, {
72
- ...ngDevMode ? { debugName: "threshold" } : /* istanbul ignore next */ {},
73
- transform: numAttr(.1)
74
- });
75
- rootMargin = input("-100px", ...ngDevMode ? [{ debugName: "rootMargin" }] : /* istanbul ignore next */ []);
76
- textAlign = input("center", ...ngDevMode ? [{ debugName: "textAlign" }] : /* istanbul ignore next */ []);
77
- animationComplete = output();
78
- pieces = computed(() => splitPieces(this.text(), this.splitType()), ...ngDevMode ? [{ debugName: "pieces" }] : /* istanbul ignore next */ []);
79
- host = inject(ElementRef);
80
- destroyRef = inject(DestroyRef);
81
- isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
82
- platform = inject(WrPlatform);
83
- hasAnimated = false;
84
- skipEntrance = false;
85
- observer = null;
86
- destroyed = false;
87
- constructor() {
88
- if (!this.isBrowser) return;
89
- this.destroyRef.onDestroy(() => {
90
- this.destroyed = true;
91
- this.observer?.disconnect();
92
- });
93
- this.skipEntrance = this.host.nativeElement.querySelector(":scope > .wr-split-text__sr-only") !== null;
94
- afterNextRender(() => this.startObserver());
95
- let initial = true;
96
- effect(() => {
97
- this.text();
98
- this.splitType();
99
- if (!initial) this.skipEntrance = false;
100
- initial = false;
101
- this.hasAnimated = false;
102
- queueMicrotask(() => this.startObserver());
103
- });
104
- }
105
- startObserver() {
106
- const host = this.host.nativeElement;
107
- const fonts = document.fonts;
108
- const ready = fonts?.status === "loaded" ? Promise.resolve() : fonts?.ready ?? Promise.resolve();
109
- const observe = () => {
110
- if (this.destroyed || this.hasAnimated) return;
111
- this.observer?.disconnect();
112
- const io = new IntersectionObserver((entries, obs) => {
113
- for (const e of entries) if (e.isIntersecting) {
114
- obs.disconnect();
115
- this.animate();
116
- break;
117
- }
118
- }, {
119
- threshold: this.threshold(),
120
- rootMargin: this.rootMargin()
121
- });
122
- this.observer = io;
123
- io.observe(host);
124
- };
125
- ready.then(observe);
126
- }
127
- animate() {
128
- if (this.hasAnimated) return;
129
- this.hasAnimated = true;
130
- if (this.platform.prefersReducedMotion() || this.skipEntrance) {
131
- this.animationComplete.emit();
132
- return;
133
- }
134
- const targets = this.host.nativeElement.querySelectorAll(".wr-split-text__piece");
135
- if (targets.length === 0) {
136
- this.animationComplete.emit();
137
- return;
138
- }
139
- const fromStyle = motionToStyle(this.from());
140
- const toStyle = motionToStyle(this.to());
141
- const durationMs = this.duration() * 1e3;
142
- const stagger = this.delay();
143
- const easing = this.easing();
144
- let remaining = targets.length;
145
- targets.forEach((el, i) => {
146
- el.style.opacity = String(fromStyle.opacity);
147
- el.style.transform = fromStyle.transform;
148
- const animation = el.animate([{
149
- opacity: fromStyle.opacity,
150
- transform: fromStyle.transform
151
- }, {
152
- opacity: toStyle.opacity,
153
- transform: toStyle.transform
154
- }], {
155
- duration: durationMs,
156
- delay: i * stagger,
157
- easing,
158
- fill: "forwards"
159
- });
160
- animation.onfinish = () => {
161
- el.style.opacity = String(toStyle.opacity);
162
- el.style.transform = toStyle.transform;
163
- try {
164
- animation.cancel();
165
- } catch {}
166
- remaining -= 1;
167
- if (remaining === 0 && !this.destroyed) this.animationComplete.emit();
168
- };
169
- });
170
- }
171
- static ɵfac = i0.ɵɵngDeclareFactory({
172
- minVersion: "12.0.0",
173
- version: "22.2.4",
174
- ngImport: i0,
175
- type: WrSplitText,
176
- deps: [],
177
- target: i0.ɵɵFactoryTarget.Component
178
- });
179
- static ɵcmp = i0.ɵɵngDeclareComponent({
180
- minVersion: "17.0.0",
181
- version: "22.2.4",
182
- type: WrSplitText,
183
- isStandalone: true,
184
- selector: "wr-split-text",
185
- inputs: {
186
- text: {
187
- classPropertyName: "text",
188
- publicName: "text",
189
- isSignal: true,
190
- isRequired: true,
191
- transformFunction: null
192
- },
193
- splitType: {
194
- classPropertyName: "splitType",
195
- publicName: "splitType",
196
- isSignal: true,
197
- isRequired: false,
198
- transformFunction: null
199
- },
200
- delay: {
201
- classPropertyName: "delay",
202
- publicName: "delay",
203
- isSignal: true,
204
- isRequired: false,
205
- transformFunction: null
206
- },
207
- duration: {
208
- classPropertyName: "duration",
209
- publicName: "duration",
210
- isSignal: true,
211
- isRequired: false,
212
- transformFunction: null
213
- },
214
- easing: {
215
- classPropertyName: "easing",
216
- publicName: "easing",
217
- isSignal: true,
218
- isRequired: false,
219
- transformFunction: null
220
- },
221
- from: {
222
- classPropertyName: "from",
223
- publicName: "from",
224
- isSignal: true,
225
- isRequired: false,
226
- transformFunction: null
227
- },
228
- to: {
229
- classPropertyName: "to",
230
- publicName: "to",
231
- isSignal: true,
232
- isRequired: false,
233
- transformFunction: null
234
- },
235
- threshold: {
236
- classPropertyName: "threshold",
237
- publicName: "threshold",
238
- isSignal: true,
239
- isRequired: false,
240
- transformFunction: null
241
- },
242
- rootMargin: {
243
- classPropertyName: "rootMargin",
244
- publicName: "rootMargin",
245
- isSignal: true,
246
- isRequired: false,
247
- transformFunction: null
248
- },
249
- textAlign: {
250
- classPropertyName: "textAlign",
251
- publicName: "textAlign",
252
- isSignal: true,
253
- isRequired: false,
254
- transformFunction: null
255
- }
256
- },
257
- outputs: { animationComplete: "animationComplete" },
258
- host: {
259
- attributes: { "dir": "auto" },
260
- properties: { "style.text-align": "textAlign()" },
261
- classAttribute: "wr-split-text"
262
- },
263
- ngImport: i0,
264
- template: "<!-- The readable text, once: the pieces below are per-character spans. -->\n<span class=\"wr-split-text__sr-only\">{{ text() }}</span>\n@for (p of pieces(); track $index) {\n @if (p.kind === 'piece') {\n <span class=\"wr-split-text__piece\" aria-hidden=\"true\">{{ p.text }}</span>\n } @else {\n <span class=\"wr-split-text__space\" aria-hidden=\"true\">{{ p.text }}</span>\n }\n}\n",
265
- styles: [".wr-split-text{display:inline-block;overflow:hidden;padding-bottom:.15em;margin-bottom:-.15em;white-space:normal;overflow-wrap:break-word;will-change:transform,opacity}.wr-split-text__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.wr-split-text__piece{display:inline-block;will-change:transform,opacity}.wr-split-text__space{display:inline;white-space:pre}\n"],
266
- encapsulation: i0.ViewEncapsulation.None
267
- });
268
- };
269
- i0.ɵɵngDeclareClassMetadata({
270
- minVersion: "12.0.0",
271
- version: "22.2.4",
272
- ngImport: i0,
273
- type: WrSplitText,
274
- decorators: [{
275
- type: Component,
276
- args: [{
277
- selector: "wr-split-text",
278
- encapsulation: ViewEncapsulation.None,
279
- host: {
280
- class: "wr-split-text",
281
- dir: "auto",
282
- "[style.text-align]": "textAlign()"
283
- },
284
- template: "<!-- The readable text, once: the pieces below are per-character spans. -->\n<span class=\"wr-split-text__sr-only\">{{ text() }}</span>\n@for (p of pieces(); track $index) {\n @if (p.kind === 'piece') {\n <span class=\"wr-split-text__piece\" aria-hidden=\"true\">{{ p.text }}</span>\n } @else {\n <span class=\"wr-split-text__space\" aria-hidden=\"true\">{{ p.text }}</span>\n }\n}\n",
285
- styles: [".wr-split-text{display:inline-block;overflow:hidden;padding-bottom:.15em;margin-bottom:-.15em;white-space:normal;overflow-wrap:break-word;will-change:transform,opacity}.wr-split-text__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.wr-split-text__piece{display:inline-block;will-change:transform,opacity}.wr-split-text__space{display:inline;white-space:pre}\n"]
286
- }]
287
- }],
288
- ctorParameters: () => [],
289
- propDecorators: {
290
- text: [{
291
- type: i0.Input,
292
- args: [{
293
- isSignal: true,
294
- alias: "text",
295
- required: true
296
- }]
297
- }],
298
- splitType: [{
299
- type: i0.Input,
300
- args: [{
301
- isSignal: true,
302
- alias: "splitType",
303
- required: false
304
- }]
305
- }],
306
- delay: [{
307
- type: i0.Input,
308
- args: [{
309
- isSignal: true,
310
- alias: "delay",
311
- required: false
312
- }]
313
- }],
314
- duration: [{
315
- type: i0.Input,
316
- args: [{
317
- isSignal: true,
318
- alias: "duration",
319
- required: false
320
- }]
321
- }],
322
- easing: [{
323
- type: i0.Input,
324
- args: [{
325
- isSignal: true,
326
- alias: "easing",
327
- required: false
328
- }]
329
- }],
330
- from: [{
331
- type: i0.Input,
332
- args: [{
333
- isSignal: true,
334
- alias: "from",
335
- required: false
336
- }]
337
- }],
338
- to: [{
339
- type: i0.Input,
340
- args: [{
341
- isSignal: true,
342
- alias: "to",
343
- required: false
344
- }]
345
- }],
346
- threshold: [{
347
- type: i0.Input,
348
- args: [{
349
- isSignal: true,
350
- alias: "threshold",
351
- required: false
352
- }]
353
- }],
354
- rootMargin: [{
355
- type: i0.Input,
356
- args: [{
357
- isSignal: true,
358
- alias: "rootMargin",
359
- required: false
360
- }]
361
- }],
362
- textAlign: [{
363
- type: i0.Input,
364
- args: [{
365
- isSignal: true,
366
- alias: "textAlign",
367
- required: false
368
- }]
369
- }],
370
- animationComplete: [{
371
- type: i0.Output,
372
- args: ["animationComplete"]
373
- }]
374
- }
375
- });
376
- export { WrSplitText };
377
-
378
- //# sourceMappingURL=ngwr-bits-split-text.mjs.map