ngwr 15.9.0 → 16.1.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 (455) hide show
  1. package/animations/aurora/styles/_index.scss +1 -1
  2. package/animations/blur-reveal/styles/_index.scss +1 -1
  3. package/animations/decode/styles/_index.scss +1 -1
  4. package/animations/dot-grid/styles/_index.scss +1 -1
  5. package/animations/flow-lines/styles/_index.scss +1 -1
  6. package/animations/fluid-cursor/styles/_index.scss +1 -1
  7. package/animations/{core → internal}/styles/_mixins.scss +1 -1
  8. package/animations/reveal/styles/_index.scss +1 -1
  9. package/animations/ripple-grid/styles/_index.scss +1 -1
  10. package/animations/rotate-reveal/styles/_index.scss +1 -1
  11. package/animations/thread-lines/styles/_index.scss +1 -1
  12. package/animations/typewriter/styles/_index.scss +1 -1
  13. package/badge/styles/_tag.scss +8 -4
  14. package/button/styles/_index.scss +13 -7
  15. package/cascader/styles/_rules.scss +4 -2
  16. package/checkbox/styles/_index.scss +4 -2
  17. package/copy-value/styles/_index.scss +104 -0
  18. package/date-picker/styles/_index.scss +121 -0
  19. package/date-stamp/styles/_index.scss +38 -0
  20. package/dialog/styles/_index.scss +38 -0
  21. package/fesm2022/{ngwr-animations-core.mjs → internal-BaQU4t_0.mjs} +6 -49
  22. package/fesm2022/internal-BaQU4t_0.mjs.map +1 -0
  23. package/fesm2022/internal-CVLvP9b_.mjs +33 -0
  24. package/fesm2022/internal-CVLvP9b_.mjs.map +1 -0
  25. package/fesm2022/ngwr-alert.mjs +13 -9
  26. package/fesm2022/ngwr-alert.mjs.map +1 -1
  27. package/fesm2022/ngwr-animations-aurora.mjs +21 -21
  28. package/fesm2022/ngwr-animations-aurora.mjs.map +1 -1
  29. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  30. package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -1
  31. package/fesm2022/ngwr-animations-click-sparks.mjs +2 -2
  32. package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -1
  33. package/fesm2022/ngwr-animations-confetti.mjs +5 -5
  34. package/fesm2022/ngwr-animations-confetti.mjs.map +1 -1
  35. package/fesm2022/ngwr-animations-decode.mjs +4 -4
  36. package/fesm2022/ngwr-animations-decode.mjs.map +1 -1
  37. package/fesm2022/ngwr-animations-destruct.mjs +5 -5
  38. package/fesm2022/ngwr-animations-destruct.mjs.map +1 -1
  39. package/fesm2022/ngwr-animations-dot-grid.mjs +7 -7
  40. package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -1
  41. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  42. package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -1
  43. package/fesm2022/ngwr-animations-flow-lines.mjs +17 -17
  44. package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -1
  45. package/fesm2022/ngwr-animations-fluid-cursor.mjs +12 -12
  46. package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -1
  47. package/fesm2022/ngwr-animations-glitch.mjs +2 -2
  48. package/fesm2022/ngwr-animations-glitch.mjs.map +1 -1
  49. package/fesm2022/ngwr-animations-marquee.mjs +2 -2
  50. package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
  51. package/fesm2022/ngwr-animations-orbit.mjs +7 -7
  52. package/fesm2022/ngwr-animations-orbit.mjs.map +1 -1
  53. package/fesm2022/ngwr-animations-reveal.mjs +4 -4
  54. package/fesm2022/ngwr-animations-reveal.mjs.map +1 -1
  55. package/fesm2022/ngwr-animations-ripple-grid.mjs +5 -5
  56. package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -1
  57. package/fesm2022/ngwr-animations-rotate-reveal.mjs +4 -4
  58. package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -1
  59. package/fesm2022/ngwr-animations-shimmer.mjs +2 -2
  60. package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -1
  61. package/fesm2022/ngwr-animations-spotlight.mjs +1 -1
  62. package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -1
  63. package/fesm2022/ngwr-animations-thread-lines.mjs +16 -16
  64. package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -1
  65. package/fesm2022/ngwr-animations-tilt.mjs +3 -3
  66. package/fesm2022/ngwr-animations-tilt.mjs.map +1 -1
  67. package/fesm2022/ngwr-animations-typewriter.mjs +4 -4
  68. package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -1
  69. package/fesm2022/ngwr-avatar.mjs +14 -10
  70. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  71. package/fesm2022/ngwr-back-top.mjs +10 -6
  72. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  73. package/fesm2022/ngwr-badge.mjs +18 -6
  74. package/fesm2022/ngwr-badge.mjs.map +1 -1
  75. package/fesm2022/ngwr-burger.mjs +9 -6
  76. package/fesm2022/ngwr-burger.mjs.map +1 -1
  77. package/fesm2022/ngwr-button.mjs +8 -4
  78. package/fesm2022/ngwr-button.mjs.map +1 -1
  79. package/fesm2022/ngwr-calendar.mjs +19 -8
  80. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  81. package/fesm2022/ngwr-card.mjs +9 -5
  82. package/fesm2022/ngwr-card.mjs.map +1 -1
  83. package/fesm2022/ngwr-cascader.mjs +54 -25
  84. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  85. package/fesm2022/ngwr-charts-bar-chart.mjs +13 -13
  86. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  87. package/fesm2022/ngwr-charts-boxplot-chart.mjs +9 -9
  88. package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
  89. package/fesm2022/ngwr-charts-bullet-chart.mjs +8 -8
  90. package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
  91. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +5 -2
  92. package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
  93. package/fesm2022/ngwr-charts-candlestick-chart.mjs +11 -11
  94. package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
  95. package/fesm2022/ngwr-charts-chart-legend.mjs +2 -2
  96. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  97. package/fesm2022/ngwr-charts-core.mjs +20 -20
  98. package/fesm2022/ngwr-charts-core.mjs.map +1 -1
  99. package/fesm2022/ngwr-charts-donut-chart.mjs +2 -2
  100. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  101. package/fesm2022/ngwr-charts-funnel-chart.mjs +6 -6
  102. package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
  103. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  104. package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
  105. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  106. package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
  107. package/fesm2022/ngwr-charts-line-chart.mjs +10 -10
  108. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  109. package/fesm2022/ngwr-charts-meter-group.mjs +2 -2
  110. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  111. package/fesm2022/ngwr-charts-radar-chart.mjs +11 -11
  112. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  113. package/fesm2022/ngwr-charts-scatter-chart.mjs +10 -10
  114. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  115. package/fesm2022/ngwr-charts-treemap-chart.mjs +4 -4
  116. package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
  117. package/fesm2022/ngwr-charts-waterfall-chart.mjs +7 -7
  118. package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
  119. package/fesm2022/ngwr-checkbox.mjs +12 -8
  120. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  121. package/fesm2022/ngwr-clipboard.mjs +2 -1
  122. package/fesm2022/ngwr-clipboard.mjs.map +1 -1
  123. package/fesm2022/ngwr-collapse.mjs +11 -7
  124. package/fesm2022/ngwr-collapse.mjs.map +1 -1
  125. package/fesm2022/ngwr-color-picker.mjs +56 -54
  126. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  127. package/fesm2022/ngwr-command-palette.mjs +4 -4
  128. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  129. package/fesm2022/ngwr-comment.mjs +15 -9
  130. package/fesm2022/ngwr-comment.mjs.map +1 -1
  131. package/fesm2022/ngwr-compare.mjs +15 -9
  132. package/fesm2022/ngwr-compare.mjs.map +1 -1
  133. package/fesm2022/ngwr-context-menu.mjs +8 -6
  134. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  135. package/fesm2022/ngwr-copy-value-testing.mjs +58 -0
  136. package/fesm2022/ngwr-copy-value-testing.mjs.map +1 -0
  137. package/fesm2022/ngwr-copy-value.mjs +201 -0
  138. package/fesm2022/ngwr-copy-value.mjs.map +1 -0
  139. package/fesm2022/ngwr-counter.mjs +3 -3
  140. package/fesm2022/ngwr-counter.mjs.map +1 -1
  141. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  142. package/fesm2022/ngwr-date-picker.mjs +303 -70
  143. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  144. package/fesm2022/ngwr-date-stamp-testing.mjs +34 -0
  145. package/fesm2022/ngwr-date-stamp-testing.mjs.map +1 -0
  146. package/fesm2022/ngwr-date-stamp.mjs +149 -0
  147. package/fesm2022/ngwr-date-stamp.mjs.map +1 -0
  148. package/fesm2022/ngwr-date.mjs +304 -53
  149. package/fesm2022/ngwr-date.mjs.map +1 -1
  150. package/fesm2022/ngwr-descriptions.mjs +9 -5
  151. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  152. package/fesm2022/ngwr-dialog-testing.mjs +23 -2
  153. package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
  154. package/fesm2022/ngwr-dialog.mjs +77 -19
  155. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  156. package/fesm2022/ngwr-directives.mjs +218 -12
  157. package/fesm2022/ngwr-directives.mjs.map +1 -1
  158. package/fesm2022/ngwr-divider.mjs +4 -2
  159. package/fesm2022/ngwr-divider.mjs.map +1 -1
  160. package/fesm2022/ngwr-drawer.mjs +32 -6
  161. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  162. package/fesm2022/ngwr-dropdown.mjs +17 -14
  163. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  164. package/fesm2022/ngwr-editor.mjs +33 -30
  165. package/fesm2022/ngwr-editor.mjs.map +1 -1
  166. package/fesm2022/ngwr-event-calendar.mjs +9 -7
  167. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  168. package/fesm2022/ngwr-file-upload.mjs +17 -11
  169. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  170. package/fesm2022/ngwr-form.mjs +18 -6
  171. package/fesm2022/ngwr-form.mjs.map +1 -1
  172. package/fesm2022/ngwr-graph.mjs +3 -3
  173. package/fesm2022/ngwr-graph.mjs.map +1 -1
  174. package/fesm2022/ngwr-hotkey.mjs +22 -22
  175. package/fesm2022/ngwr-hotkey.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-ar.mjs +7 -0
  177. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n-cs.mjs +7 -0
  179. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  180. package/fesm2022/ngwr-i18n-de.mjs +7 -0
  181. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  182. package/fesm2022/ngwr-i18n-en.mjs +7 -0
  183. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  184. package/fesm2022/ngwr-i18n-es.mjs +7 -0
  185. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  186. package/fesm2022/ngwr-i18n-fr.mjs +7 -0
  187. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  188. package/fesm2022/ngwr-i18n-he.mjs +7 -0
  189. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  190. package/fesm2022/ngwr-i18n-hi.mjs +7 -0
  191. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  192. package/fesm2022/ngwr-i18n-id.mjs +7 -0
  193. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  194. package/fesm2022/ngwr-i18n-it.mjs +7 -0
  195. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  196. package/fesm2022/ngwr-i18n-ja.mjs +7 -0
  197. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  198. package/fesm2022/ngwr-i18n-ko.mjs +7 -0
  199. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  200. package/fesm2022/ngwr-i18n-nl.mjs +7 -0
  201. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  202. package/fesm2022/ngwr-i18n-pl.mjs +7 -0
  203. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  204. package/fesm2022/ngwr-i18n-pt.mjs +7 -0
  205. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  206. package/fesm2022/ngwr-i18n-ru.mjs +7 -0
  207. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  208. package/fesm2022/ngwr-i18n-sv.mjs +7 -0
  209. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  210. package/fesm2022/ngwr-i18n-tr.mjs +7 -0
  211. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  212. package/fesm2022/ngwr-i18n-uk.mjs +7 -0
  213. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  214. package/fesm2022/ngwr-i18n-vi.mjs +7 -0
  215. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  216. package/fesm2022/ngwr-i18n-zh-tw.mjs +7 -0
  217. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  218. package/fesm2022/ngwr-i18n-zh.mjs +7 -0
  219. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  220. package/fesm2022/ngwr-i18n.mjs +36 -10
  221. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  222. package/fesm2022/ngwr-icon.mjs +5 -5
  223. package/fesm2022/ngwr-icon.mjs.map +1 -1
  224. package/fesm2022/ngwr-image-cropper.mjs +11 -11
  225. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  226. package/fesm2022/ngwr-input-number.mjs +13 -7
  227. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  228. package/fesm2022/ngwr-input-otp.mjs +6 -4
  229. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  230. package/fesm2022/ngwr-input.mjs +35 -25
  231. package/fesm2022/ngwr-input.mjs.map +1 -1
  232. package/fesm2022/ngwr-keyboard.mjs +37 -31
  233. package/fesm2022/ngwr-keyboard.mjs.map +1 -1
  234. package/fesm2022/ngwr-knob.mjs +13 -7
  235. package/fesm2022/ngwr-knob.mjs.map +1 -1
  236. package/fesm2022/ngwr-layout.mjs +13 -5
  237. package/fesm2022/ngwr-layout.mjs.map +1 -1
  238. package/fesm2022/ngwr-lightbox.mjs +11 -7
  239. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  240. package/fesm2022/ngwr-list.mjs +13 -5
  241. package/fesm2022/ngwr-list.mjs.map +1 -1
  242. package/fesm2022/ngwr-load-state.mjs +11 -7
  243. package/fesm2022/ngwr-load-state.mjs.map +1 -1
  244. package/fesm2022/ngwr-mention.mjs +6 -6
  245. package/fesm2022/ngwr-mention.mjs.map +1 -1
  246. package/fesm2022/ngwr-meta.mjs +19 -3
  247. package/fesm2022/ngwr-meta.mjs.map +1 -1
  248. package/fesm2022/ngwr-overlay.mjs +87 -4
  249. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  250. package/fesm2022/ngwr-pagination.mjs +10 -7
  251. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  252. package/fesm2022/ngwr-pipes.mjs +22 -8
  253. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  254. package/fesm2022/ngwr-platform.mjs +4 -1
  255. package/fesm2022/ngwr-platform.mjs.map +1 -1
  256. package/fesm2022/ngwr-popconfirm.mjs +6 -5
  257. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  258. package/fesm2022/ngwr-popover.mjs +124 -34
  259. package/fesm2022/ngwr-popover.mjs.map +1 -1
  260. package/fesm2022/ngwr-progress.mjs +4 -2
  261. package/fesm2022/ngwr-progress.mjs.map +1 -1
  262. package/fesm2022/ngwr-pull-to-refresh.mjs +2 -2
  263. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
  264. package/fesm2022/ngwr-qr.mjs +6 -6
  265. package/fesm2022/ngwr-qr.mjs.map +1 -1
  266. package/fesm2022/ngwr-radio.mjs +12 -8
  267. package/fesm2022/ngwr-radio.mjs.map +1 -1
  268. package/fesm2022/ngwr-rating.mjs +19 -13
  269. package/fesm2022/ngwr-rating.mjs.map +1 -1
  270. package/fesm2022/ngwr-resizable.mjs +503 -0
  271. package/fesm2022/ngwr-resizable.mjs.map +1 -0
  272. package/fesm2022/ngwr-result.mjs +9 -5
  273. package/fesm2022/ngwr-result.mjs.map +1 -1
  274. package/fesm2022/ngwr-schema-form.mjs +15 -5
  275. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  276. package/fesm2022/ngwr-segmented.mjs +4 -2
  277. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  278. package/fesm2022/ngwr-select.mjs +70 -39
  279. package/fesm2022/ngwr-select.mjs.map +1 -1
  280. package/fesm2022/ngwr-sidebar.mjs +3 -3
  281. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  282. package/fesm2022/ngwr-skeleton.mjs +6 -4
  283. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  284. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  285. package/fesm2022/ngwr-slider.mjs +17 -15
  286. package/fesm2022/ngwr-slider.mjs.map +1 -1
  287. package/fesm2022/ngwr-sortable-list.mjs +3 -3
  288. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  289. package/fesm2022/ngwr-speed-dial.mjs +4 -2
  290. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  291. package/fesm2022/ngwr-spinner.mjs +4 -2
  292. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  293. package/fesm2022/ngwr-splitter.mjs +21 -25
  294. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  295. package/fesm2022/ngwr-statistic.mjs +5 -3
  296. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  297. package/fesm2022/ngwr-stepper.mjs +9 -3
  298. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  299. package/fesm2022/ngwr-storage.mjs +6 -4
  300. package/fesm2022/ngwr-storage.mjs.map +1 -1
  301. package/fesm2022/ngwr-switch.mjs +11 -7
  302. package/fesm2022/ngwr-switch.mjs.map +1 -1
  303. package/fesm2022/ngwr-table-testing.mjs +5 -1
  304. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  305. package/fesm2022/ngwr-table.mjs +396 -35
  306. package/fesm2022/ngwr-table.mjs.map +1 -1
  307. package/fesm2022/ngwr-tabs.mjs +2 -2
  308. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  309. package/fesm2022/ngwr-textarea.mjs +9 -3
  310. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  311. package/fesm2022/ngwr-timeline.mjs +18 -8
  312. package/fesm2022/ngwr-timeline.mjs.map +1 -1
  313. package/fesm2022/ngwr-toast-testing.mjs +14 -2
  314. package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
  315. package/fesm2022/ngwr-toast.mjs +588 -120
  316. package/fesm2022/ngwr-toast.mjs.map +1 -1
  317. package/fesm2022/ngwr-tour.mjs +7 -7
  318. package/fesm2022/ngwr-tour.mjs.map +1 -1
  319. package/fesm2022/ngwr-transfer.mjs +24 -11
  320. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  321. package/fesm2022/ngwr-tree.mjs +68 -26
  322. package/fesm2022/ngwr-tree.mjs.map +1 -1
  323. package/fesm2022/ngwr-typography.mjs +9 -3
  324. package/fesm2022/ngwr-typography.mjs.map +1 -1
  325. package/fesm2022/ngwr-utils-router.mjs +18 -2
  326. package/fesm2022/ngwr-utils-router.mjs.map +1 -1
  327. package/fesm2022/ngwr-utils.mjs +106 -56
  328. package/fesm2022/ngwr-utils.mjs.map +1 -1
  329. package/fesm2022/ngwr-validators.mjs +2 -2
  330. package/fesm2022/ngwr-validators.mjs.map +1 -1
  331. package/fesm2022/ngwr-version.mjs +1 -1
  332. package/fesm2022/ngwr-version.mjs.map +1 -1
  333. package/fesm2022/ngwr-window.mjs +33 -30
  334. package/fesm2022/ngwr-window.mjs.map +1 -1
  335. package/fesm2022/ngwr.mjs.map +1 -1
  336. package/i18n/ar.json +11 -0
  337. package/i18n/cs.json +11 -0
  338. package/i18n/de.json +11 -0
  339. package/i18n/en.json +11 -0
  340. package/i18n/es.json +11 -0
  341. package/i18n/fr.json +11 -0
  342. package/i18n/he.json +11 -0
  343. package/i18n/hi.json +11 -0
  344. package/i18n/id.json +11 -0
  345. package/i18n/it.json +11 -0
  346. package/i18n/ja.json +11 -0
  347. package/i18n/ko.json +11 -0
  348. package/i18n/nl.json +11 -0
  349. package/i18n/pl.json +11 -0
  350. package/i18n/pt.json +11 -0
  351. package/i18n/ru.json +11 -0
  352. package/i18n/sv.json +11 -0
  353. package/i18n/tr.json +11 -0
  354. package/i18n/uk.json +11 -0
  355. package/i18n/vi.json +11 -0
  356. package/i18n/zh-TW.json +11 -0
  357. package/i18n/zh.json +11 -0
  358. package/input/styles/_index.scss +10 -5
  359. package/input-number/styles/_index.scss +12 -3
  360. package/input-otp/styles/_index.scss +4 -2
  361. package/llms-full.txt +54 -23
  362. package/llms.txt +45 -23
  363. package/mcp/providers.js +1 -1
  364. package/package.json +29 -10
  365. package/radio/styles/_index.scss +4 -2
  366. package/resizable/styles/_index.scss +154 -0
  367. package/schematics/icon-set/index.js +3 -3
  368. package/schematics/migrations/v16/index.js +742 -0
  369. package/schematics/migrations.json +5 -0
  370. package/schematics/ng-add/index.js +4 -4
  371. package/schematics/provider/index.js +4 -4
  372. package/schematics/use/rule.js +1 -0
  373. package/schematics/use/symbol-map.json +6 -0
  374. package/select/styles/_index.scss +7 -4
  375. package/skills/ngwr/SKILL.md +6 -4
  376. package/skills/ngwr/references/catalog.md +8 -3
  377. package/skills/ngwr/references/setup.md +13 -9
  378. package/switch/styles/_index.scss +4 -2
  379. package/table/styles/_index.scss +138 -29
  380. package/textarea/styles/_index.scss +4 -2
  381. package/theme/styles/_motion.scss +6 -0
  382. package/toast/styles/_index.scss +49 -0
  383. package/tree/styles/_index.scss +17 -0
  384. package/types/index-CXbgza47.d.ts +13 -0
  385. package/types/ngwr-animations-aurora.d.ts +1 -1
  386. package/types/ngwr-animations-blur-reveal.d.ts +2 -2
  387. package/types/ngwr-animations-dot-grid.d.ts +1 -2
  388. package/types/ngwr-animations-flow-lines.d.ts +1 -1
  389. package/types/ngwr-animations-fluid-cursor.d.ts +1 -1
  390. package/types/ngwr-animations-reveal.d.ts +4 -8
  391. package/types/ngwr-animations-ripple-grid.d.ts +1 -1
  392. package/types/ngwr-animations-spotlight.d.ts +1 -1
  393. package/types/ngwr-animations-thread-lines.d.ts +1 -1
  394. package/types/ngwr-animations-tilt.d.ts +1 -1
  395. package/types/ngwr-avatar.d.ts +2 -2
  396. package/types/ngwr-badge.d.ts +1 -1
  397. package/types/ngwr-burger.d.ts +0 -1
  398. package/types/ngwr-calendar.d.ts +7 -0
  399. package/types/ngwr-cascader.d.ts +12 -1
  400. package/types/ngwr-charts-boxplot-chart.d.ts +1 -1
  401. package/types/ngwr-charts-bullet-chart.d.ts +2 -2
  402. package/types/ngwr-charts-calendar-heatmap.d.ts +2 -1
  403. package/types/ngwr-charts-candlestick-chart.d.ts +1 -1
  404. package/types/ngwr-charts-core.d.ts +12 -12
  405. package/types/ngwr-charts-line-chart.d.ts +2 -2
  406. package/types/ngwr-charts-radar-chart.d.ts +1 -1
  407. package/types/ngwr-charts-scatter-chart.d.ts +2 -2
  408. package/types/ngwr-charts-waterfall-chart.d.ts +1 -1
  409. package/types/ngwr-clipboard.d.ts +7 -0
  410. package/types/ngwr-color-picker.d.ts +12 -12
  411. package/types/ngwr-copy-value-testing.d.ts +87 -0
  412. package/types/ngwr-copy-value.d.ts +95 -0
  413. package/types/ngwr-date-picker-testing.d.ts +3 -3
  414. package/types/ngwr-date-picker.d.ts +106 -3
  415. package/types/ngwr-date-stamp-testing.d.ts +47 -0
  416. package/types/ngwr-date-stamp.d.ts +81 -0
  417. package/types/ngwr-date.d.ts +179 -27
  418. package/types/ngwr-dialog-testing.d.ts +10 -0
  419. package/types/ngwr-dialog.d.ts +120 -5
  420. package/types/ngwr-directives.d.ts +76 -1
  421. package/types/ngwr-drawer.d.ts +22 -1
  422. package/types/ngwr-dropdown.d.ts +3 -2
  423. package/types/ngwr-hotkey.d.ts +5 -5
  424. package/types/ngwr-i18n.d.ts +47 -17
  425. package/types/ngwr-icon.d.ts +26 -26
  426. package/types/ngwr-input-number.d.ts +2 -2
  427. package/types/ngwr-input.d.ts +8 -8
  428. package/types/ngwr-load-state.d.ts +6 -6
  429. package/types/ngwr-meta.d.ts +18 -0
  430. package/types/ngwr-overlay.d.ts +36 -0
  431. package/types/ngwr-pipes.d.ts +21 -4
  432. package/types/ngwr-platform.d.ts +2 -1
  433. package/types/ngwr-popconfirm.d.ts +3 -2
  434. package/types/ngwr-popover.d.ts +43 -4
  435. package/types/ngwr-resizable.d.ts +228 -0
  436. package/types/ngwr-select.d.ts +33 -18
  437. package/types/ngwr-slider-testing.d.ts +2 -2
  438. package/types/ngwr-slider.d.ts +3 -3
  439. package/types/ngwr-statistic.d.ts +5 -1
  440. package/types/ngwr-storage.d.ts +1 -1
  441. package/types/ngwr-table-testing.d.ts +5 -2
  442. package/types/ngwr-table.d.ts +255 -14
  443. package/types/ngwr-tabs.d.ts +10 -2
  444. package/types/ngwr-toast-testing.d.ts +18 -3
  445. package/types/ngwr-toast.d.ts +248 -23
  446. package/types/ngwr-transfer.d.ts +5 -0
  447. package/types/ngwr-tree.d.ts +22 -2
  448. package/types/ngwr-utils-router.d.ts +22 -0
  449. package/types/ngwr-utils.d.ts +165 -83
  450. package/types/ngwr-validators.d.ts +4 -2
  451. package/types/ngwr-version.d.ts +1 -1
  452. package/types/ngwr.d.ts +2 -0
  453. package/types/pointer-tracker-D7fXxLQL.d.ts +24 -0
  454. package/fesm2022/ngwr-animations-core.mjs.map +0 -1
  455. package/types/ngwr-animations-core.d.ts +0 -294
@@ -1,6 +1,6 @@
1
1
  import { DestroyRef, ElementRef, Injector, PLATFORM_ID, afterNextRender, effect, inject } from "@angular/core";
2
2
  import { DOCUMENT as DOCUMENT$1, isPlatformBrowser } from "@angular/common";
3
- import { clamp, numAttr, watchColorScheme } from "ngwr/utils";
3
+ import { wrClamp, wrNumAttr, wrWatchColorScheme } from "ngwr/utils";
4
4
  import { WrPlatform } from "ngwr/platform";
5
5
  /**
6
6
  * @license
@@ -52,7 +52,7 @@ var Backdrop = class {
52
52
  });
53
53
  this.viewObserver.observe(host);
54
54
  }
55
- watchColorScheme(() => {
55
+ wrWatchColorScheme(() => {
56
56
  this.scene.colors(canvas);
57
57
  if (!this.running) this.draw();
58
58
  }, { injector });
@@ -127,7 +127,7 @@ var Backdrop = class {
127
127
  this.rafId = requestAnimationFrame(this.frame);
128
128
  return;
129
129
  }
130
- const dt = clamp(now - this.lastFrame, 0, 50);
130
+ const dt = wrClamp(now - this.lastFrame, 0, 50);
131
131
  this.lastFrame = now;
132
132
  this.scene.advance(dt);
133
133
  this.draw();
@@ -138,10 +138,7 @@ var Backdrop = class {
138
138
  this.rafId = requestAnimationFrame(this.frame);
139
139
  };
140
140
  };
141
- const MAX_DPR = 2;
142
141
  const MAX_PIXELS = 4e6;
143
- const MAX_FRAME_MS = 50;
144
- const FRAME_FLOOR_SLACK = 2;
145
142
  function canvasBackdropRatio(width, height, devicePixelRatio) {
146
143
  const budget = Math.sqrt(MAX_PIXELS / (width * height));
147
144
  return Math.max(1, Math.min(2, devicePixelRatio, budget));
@@ -180,9 +177,6 @@ function roundTo(value, digits) {
180
177
  * Use of this source code is governed by an MIT-style license that can be
181
178
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
182
179
  */
183
- const wrap = (n) => (n % 256 + 256) % 256;
184
- const fade = (t) => t * t * (3 - 2 * t);
185
- const lerp = (a, b, t) => a + (b - a) * t;
186
180
  function seededRandom(seed) {
187
181
  let state = seed % 4294967296;
188
182
  return () => {
@@ -190,37 +184,6 @@ function seededRandom(seed) {
190
184
  return state / 4294967296;
191
185
  };
192
186
  }
193
- function createNoise(seed) {
194
- const random = seededRandom(seed);
195
- const order = Array.from({ length: 256 }, (_, i) => i);
196
- for (let i = 255; i > 0; i--) {
197
- const j = Math.floor(random() * (i + 1));
198
- [order[i], order[j]] = [order[j], order[i]];
199
- }
200
- const perm = /* @__PURE__ */ new Uint8Array(512);
201
- const values = /* @__PURE__ */ new Float32Array(512);
202
- for (let i = 0; i < 512; i++) {
203
- perm[i] = order[wrap(i)];
204
- values[i] = random() * 2 - 1;
205
- }
206
- return (x, y, z) => {
207
- const xi = Math.floor(x);
208
- const yi = Math.floor(y);
209
- const zi = Math.floor(z);
210
- const u = fade(x - xi);
211
- const v = fade(y - yi);
212
- const w = fade(z - zi);
213
- const yw = wrap(yi);
214
- const zw = wrap(zi);
215
- const a = perm[wrap(xi)] + yw;
216
- const b = perm[wrap(xi + 1)] + yw;
217
- const aa = perm[a] + zw;
218
- const ab = perm[a + 1] + zw;
219
- const ba = perm[b] + zw;
220
- const bb = perm[b + 1] + zw;
221
- return lerp(lerp(lerp(values[aa], values[ba], u), lerp(values[ab], values[bb], u), v), lerp(lerp(values[aa + 1], values[ba + 1], u), lerp(values[ab + 1], values[bb + 1], u), v), w);
222
- };
223
- }
224
187
  /**
225
188
  * @license
226
189
  *
@@ -331,13 +294,7 @@ function graphemes(text) {
331
294
  function staggerGap(by, count, stagger = null) {
332
295
  return Math.min(Math.max(0, stagger ?? STAGGER_GAP[by]), STAGGER_SPREAD_MAX / Math.max(1, count - 1));
333
296
  }
334
- const optionalMs = (value) => value == null || value === "" ? null : numAttr(0)(value);
335
- /**
336
- * @license
337
- *
338
- * Use of this source code is governed by an MIT-style license that can be
339
- * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
340
- */
341
- export { BREAKING_SPACES, FOCUSABLE, FRAME_FLOOR_SLACK, MAX_DPR, MAX_FRAME_MS, MAX_PIXELS, STAGGER_GAP, STAGGER_SPREAD_MAX, VIEW_THRESHOLD, WrPointerTracker, canvasBackdropRatio, createCanvasBackdrop, createNoise, graphemes, optionalMs, optionalSelector, roundTo, seededRandom, staggerGap };
297
+ const optionalMs = (value) => value == null || value === "" ? null : wrNumAttr(0)(value);
298
+ export { staggerGap as a, FOCUSABLE as c, MAX_PIXELS as d, canvasBackdropRatio as f, optionalMs as i, optionalSelector as l, VIEW_THRESHOLD as n, WrPointerTracker as o, createCanvasBackdrop as p, graphemes as r, seededRandom as s, BREAKING_SPACES as t, roundTo as u };
342
299
 
343
- //# sourceMappingURL=ngwr-animations-core.mjs.map
300
+ //# sourceMappingURL=internal-BaQU4t_0.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-BaQU4t_0.mjs","names":["DOCUMENT"],"sources":["../../../projects/lib/animations/internal/canvas-backdrop.ts","../../../projects/lib/animations/internal/dom.ts","../../../projects/lib/animations/internal/noise.ts","../../../projects/lib/animations/internal/pointer-tracker.ts","../../../projects/lib/animations/internal/stagger.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 { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, ElementRef, Injector, PLATFORM_ID, afterNextRender, effect, inject } from '@angular/core';\n\nimport { WrPlatform } from 'ngwr/platform';\nimport { wrClamp, wrWatchColorScheme } from 'ngwr/utils';\n\nclass Backdrop implements WrCanvasBackdrop {\n ctx: CanvasRenderingContext2D | null = null;\n width = 0;\n height = 0;\n running = false;\n\n private platform: WrPlatform | null = null;\n private view: (Window & typeof globalThis) | null = null;\n private inView = false;\n private rafId: number | null = null;\n private resizeRafId: number | null = null;\n private pendingWidth = 0;\n private pendingHeight = 0;\n private lastFrame = 0;\n private resizeObserver: ResizeObserver | null = null;\n private viewObserver: IntersectionObserver | null = null;\n\n constructor(\n private readonly canvas: () => HTMLCanvasElement,\n private readonly scene: WrCanvasBackdropScene\n ) {}\n\n mount(host: HTMLElement, doc: Document, platform: WrPlatform, injector: Injector): void {\n // Nothing drawn under forced colours: the stylesheet hides the host too.\n if (doc.defaultView?.matchMedia?.('(forced-colors: active)').matches) return;\n const canvas = this.canvas();\n const ctx = canvas.getContext('2d');\n if (!ctx) return;\n this.ctx = ctx;\n this.platform = platform;\n this.view = doc.defaultView;\n this.scene.colors(canvas);\n\n if (typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(entries => {\n const rect = entries[entries.length - 1]?.contentRect;\n this.scheduleResize(rect?.width ?? host.clientWidth, rect?.height ?? host.clientHeight);\n });\n this.resizeObserver.observe(host);\n } else {\n this.resize(host.clientWidth, host.clientHeight);\n }\n\n if (typeof IntersectionObserver !== 'undefined') {\n this.viewObserver = new IntersectionObserver(entries => {\n this.inView = entries[entries.length - 1]?.isIntersecting ?? false;\n this.sync();\n });\n this.viewObserver.observe(host);\n }\n\n wrWatchColorScheme(\n () => {\n this.scene.colors(canvas);\n if (!this.running) this.draw();\n },\n { injector }\n );\n\n this.scene.mounted?.();\n }\n\n unmount(): void {\n this.running = false;\n this.stopLoop();\n if (this.resizeRafId !== null) cancelAnimationFrame(this.resizeRafId);\n this.resizeRafId = null;\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n this.viewObserver?.disconnect();\n this.viewObserver = null;\n this.ctx = null;\n }\n\n /** Folds a burst of resize notifications into one layout, on the next frame. */\n private scheduleResize(width: number, height: number): void {\n this.pendingWidth = width;\n this.pendingHeight = height;\n if (this.resizeRafId !== null) return;\n this.resizeRafId = requestAnimationFrame(() => {\n this.resizeRafId = null;\n this.resize(this.pendingWidth, this.pendingHeight);\n });\n }\n\n private resize(width: number, height: number): void {\n if (!this.ctx || width <= 0 || height <= 0) return;\n const canvas = this.canvas();\n const dpr = canvasBackdropRatio(width, height, this.view?.devicePixelRatio ?? 1);\n this.width = width;\n this.height = height;\n canvas.width = Math.round(width * dpr);\n canvas.height = Math.round(height * dpr);\n this.ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n this.scene.layout(width, height);\n this.draw();\n this.sync();\n }\n\n sync(): void {\n const platform = this.platform;\n if (!platform) return;\n const reduced = platform.prefersReducedMotion();\n const allowed = this.ctx !== null && this.width > 0 && this.inView && platform.pageVisible() && !reduced;\n const active = this.scene.active();\n if (!allowed && reduced && active) {\n this.scene.rest();\n this.draw();\n }\n const run = allowed && active;\n if (run === this.running) return;\n this.running = run;\n if (run) {\n this.lastFrame = performance.now();\n this.rafId = requestAnimationFrame(this.frame);\n return;\n }\n this.stopLoop();\n }\n\n draw(): void {\n if (!this.ctx || this.width === 0) return;\n this.scene.draw(this.ctx, this.width, this.height);\n }\n\n private stopLoop(): void {\n if (this.rafId !== null) cancelAnimationFrame(this.rafId);\n this.rafId = null;\n }\n\n private readonly frame = (now: number): void => {\n this.rafId = null;\n if (!this.running) return;\n // A scene with a frame floor waits for it: the early frame is skipped\n // whole, and the one that is drawn gets the time of both.\n const floor = this.scene.frameMs ?? 0;\n if (floor > 0 && now - this.lastFrame + FRAME_FLOOR_SLACK < floor) {\n this.rafId = requestAnimationFrame(this.frame);\n return;\n }\n const dt = wrClamp(now - this.lastFrame, 0, MAX_FRAME_MS);\n this.lastFrame = now;\n this.scene.advance(dt);\n this.draw();\n if (!this.scene.active()) {\n this.running = false;\n return;\n }\n this.rafId = requestAnimationFrame(this.frame);\n };\n}\n\n/**\n * The device ratio is never followed past this: a third pixel per axis buys\n * nothing a faint backdrop shows.\n *\n * @internal\n */\nexport const MAX_DPR = 2;\n\n/**\n * The backing store's pixel budget. A section stacked on a phone runs to\n * thousands of CSS pixels tall; past this the ratio drops (never below 1), so\n * the canvas stays a few megabytes instead of tens.\n *\n * @internal\n */\nexport const MAX_PIXELS = 4_000_000;\n\n/**\n * A tab that was throttled comes back with one huge frame; a scene moves at\n * most this far at once.\n *\n * @internal\n */\nexport const MAX_FRAME_MS = 50;\n\n/**\n * How much short of its `frameMs` a frame may fall and still be drawn: a 60Hz\n * screen's second frame lands at 33.3ms, not at the 33 a scene asks for, and\n * without the slack it would wait for the third and run at 20fps.\n *\n * @internal\n */\nexport const FRAME_FLOOR_SLACK = 2;\n\n/**\n * The ratio to draw a `width` by `height` box at: the device's, capped at\n * {@link MAX_DPR} and by {@link MAX_PIXELS}, never under one.\n *\n * @internal\n */\nexport function canvasBackdropRatio(width: number, height: number, devicePixelRatio: number): number {\n const budget = Math.sqrt(MAX_PIXELS / (width * height));\n return Math.max(1, Math.min(MAX_DPR, devicePixelRatio, budget));\n}\n\n/**\n * What a canvas backdrop draws and moves. The plumbing around it (sizing,\n * colours, gates, the frame loop) is {@link createCanvasBackdrop}'s.\n *\n * @internal\n */\nexport interface WrCanvasBackdropScene {\n /** Reads the scene's colours against `canvas`, at mount and whenever the colour scheme changes. */\n colors(canvas: HTMLCanvasElement): void;\n /** Lays the scene out for a new CSS size; the backing store and its transform are already set. */\n layout(width: number, height: number): void;\n /** Whether anything is left to move: the loop runs while this holds and the gates allow. */\n active(): boolean;\n /** Moves the scene `dt` ms on, before a frame's draw. */\n advance(dt: number): void;\n /** Paints the scene on `ctx`, in CSS px. */\n draw(ctx: CanvasRenderingContext2D, width: number, height: number): void;\n /** Snaps the scene to its still state, when motion was reduced mid-flight; a draw follows. */\n rest(): void;\n /** Runs once the canvas has a context and is watched, after the first `colors`; for the scene's own listeners. */\n mounted?(): void;\n /**\n * The shortest frame the scene wants, in ms: a frame that comes sooner is\n * skipped and its time rolls into the next. For a scene that never rests,\n * where slow motion needs no more than 30fps; unset, every frame is drawn.\n */\n readonly frameMs?: number;\n}\n\n/**\n * The plumbing side of a canvas backdrop, as the component sees it.\n *\n * @internal\n */\nexport interface WrCanvasBackdrop {\n /** The drawing context while mounted, `null` on the server, under forced colours and after destroy. */\n readonly ctx: CanvasRenderingContext2D | null;\n /** The canvas's CSS size, zero until the first layout. */\n readonly width: number;\n readonly height: number;\n /** Whether the frame loop is on. */\n readonly running: boolean;\n /** Starts or stops the loop after the scene changed: the gates, then `scene.active()`. */\n sync(): void;\n /** Paints the scene once, outside the loop. */\n draw(): void;\n}\n\n/**\n * The plumbing every canvas backdrop needs: one canvas at the device ratio\n * capped at two and by a pixel budget, a `ResizeObserver` folded into one\n * frame, colours re-read when the scheme changes, and a frame loop that runs\n * only while the scene is `active()`, the host is on screen and the document is\n * visible, and that stops on its own at rest; a scene that sets `frameMs` is\n * drawn no more often than that. Under `prefers-reduced-motion:\n * reduce` the loop never runs and a scene caught moving is put to `rest()`;\n * under `forced-colors: active` nothing mounts; on the server nothing happens.\n *\n * Call it in a component's constructor: it injects the host, the platform and\n * the destroy hook, mounts after the first render and cleans up on destroy.\n * `canvas` is read at mount, so a `viewChild` works. The scene's own pointer\n * listeners go in `mounted`, their removal in the component's `DestroyRef`.\n *\n * @internal\n */\nexport function createCanvasBackdrop(canvas: () => HTMLCanvasElement, scene: WrCanvasBackdropScene): WrCanvasBackdrop {\n const backdrop = new Backdrop(canvas, scene);\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return backdrop;\n\n const platform = inject(WrPlatform);\n const doc = inject(DOCUMENT);\n const injector = inject(Injector);\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n effect(() => {\n platform.pageVisible();\n platform.prefersReducedMotion();\n backdrop.sync();\n });\n\n afterNextRender(() => backdrop.mount(host, doc, platform, injector));\n inject(DestroyRef).onDestroy(() => backdrop.unmount());\n\n return backdrop;\n}\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\n/**\n * What a keyboard can reach: the element an effect reads hover and focus on is\n * the host's closest match, so a label inside a button behaves the same for a\n * pointer and for Tab.\n *\n * @internal\n */\nexport const FOCUSABLE = 'a[href], button, input, select, textarea, summary, [tabindex]';\n\n/**\n * An optional CSS selector written as a directive's own value: a bare\n * attribute is the empty string, and means \"the host\".\n *\n * @internal\n */\nexport const optionalSelector = (value: unknown): string | null =>\n typeof value === 'string' && value.trim() !== '' ? value : null;\n\n/**\n * `value` rounded to `digits` decimals, for a number written into the DOM every\n * frame: a transform of `12.34px` repaints the same as one of `12.3400000001px`\n * and is a tenth of the string.\n *\n * @internal\n */\nexport function roundTo(value: number, digits: number): number {\n const factor = 10 ** digits;\n return Math.round(value * factor) / factor;\n}\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\n/** `n` folded into the lattice's 0..255, for any integer. */\nconst wrap = (n: number): number => ((n % 256) + 256) % 256;\nconst fade = (t: number): number => t * t * (3 - 2 * t);\nconst lerp = (a: number, b: number, t: number): number => a + (b - a) * t;\n\n/**\n * Smooth noise in -1..1, continuous in all three arguments.\n *\n * @internal\n */\nexport type WrNoise = (x: number, y: number, z: number) => number;\n\n/**\n * A small generator in 0..1, the same run for the same seed: a linear\n * congruence on 2^32, in plain arithmetic, which stays exact under 2^53.\n *\n * @internal\n */\nexport function seededRandom(seed: number): () => number {\n let state = seed % 4294967296;\n return () => {\n state = (state * 1664525 + 1013904223) % 4294967296;\n return state / 4294967296;\n };\n}\n\n/**\n * Value noise on a lattice shuffled from `seed`: smooth, in -1..1, and the\n * same function every time for the same seed, so a spec can pin a frame. A\n * backdrop that should differ from one page load to the next passes a random\n * seed.\n *\n * @internal\n */\nexport function createNoise(seed: number): WrNoise {\n const random = seededRandom(seed);\n const order = Array.from({ length: 256 }, (_, i) => i);\n for (let i = 255; i > 0; i--) {\n const j = Math.floor(random() * (i + 1));\n [order[i], order[j]] = [order[j], order[i]];\n }\n const perm = new Uint8Array(512);\n const values = new Float32Array(512);\n for (let i = 0; i < 512; i++) {\n perm[i] = order[wrap(i)];\n values[i] = random() * 2 - 1;\n }\n return (x, y, z) => {\n const xi = Math.floor(x);\n const yi = Math.floor(y);\n const zi = Math.floor(z);\n const u = fade(x - xi);\n const v = fade(y - yi);\n const w = fade(z - zi);\n const yw = wrap(yi);\n const zw = wrap(zi);\n const a = perm[wrap(xi)] + yw;\n const b = perm[wrap(xi + 1)] + yw;\n const aa = perm[a] + zw;\n const ab = perm[a + 1] + zw;\n const ba = perm[b] + zw;\n const bb = perm[b + 1] + zw;\n return lerp(\n lerp(lerp(values[aa], values[ba], u), lerp(values[ab], values[bb], u), v),\n lerp(lerp(values[aa + 1], values[ba + 1], u), lerp(values[ab + 1], values[bb + 1], u), v),\n w\n );\n };\n}\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\n/**\n * What an effect does with the hovering pointer a {@link WrPointerTracker} follows.\n *\n * @internal\n */\nexport interface WrPointerFollower {\n /** The first hovering pointer came in. The host is measured: `rect` is set. */\n enter(): void;\n /**\n * One animation frame, for any number of moves since the last. `clientX`,\n * `clientY` and `rect` hold the latest point and box. `time` is the frame's\n * timestamp, for a follower that eases toward the point over several frames.\n */\n frame(time: number): void;\n /** The pointer left, or the tracker stopped while it was inside. A pending frame is cancelled first; `rect` is `null`. */\n leave(): void;\n}\n\n/**\n * The pointer-tracking plumbing shared by the card effects: `[wrSpotlight]`\n * and `[wrTilt]`. It listens on the host for a hovering pointer, hands the\n * follower one `enter`, then one `frame` per animation frame however many\n * moves came in, and one `leave`; the follower paints.\n *\n * The host's rect is read once at enter, and again on a window `scroll` or\n * `resize` while the pointer is inside (the card moved under a still pointer:\n * one more frame is scheduled), never per move. A touch pointer is ignored: it\n * has no hover, and a tap would leave the effect on. A move with no enter\n * before it (the directive attached under a resting pointer) counts as the\n * enter. Nothing here decides about reduced motion, forced colours or the\n * server: the directive does, and simply never calls `start()`.\n *\n * `schedule()` is public so a follower that needs more frames after the\n * pointer left (an ease back to rest) can ask for them: it is not tied to the\n * pointer being inside. `stop()` cancels whatever is pending.\n *\n * @internal\n */\nexport class WrPointerTracker {\n /** The last client point seen. */\n clientX = 0;\n clientY = 0;\n /** The host's border box, measured at enter; `null` while no pointer is inside. */\n rect: DOMRect | null = null;\n\n private listeners: AbortController | null = null;\n /** Window `scroll` and `resize`, alive only while the pointer is inside. */\n private tracking: AbortController | null = null;\n /** The pending frame's id, `0` when none is pending. */\n private frame = 0;\n\n constructor(\n private readonly host: HTMLElement,\n private readonly view: Window,\n private readonly follower: WrPointerFollower\n ) {}\n\n /** Whether a hovering pointer is inside the host. */\n get inside(): boolean {\n return this.rect !== null;\n }\n\n start(): void {\n if (this.listeners) return;\n this.listeners = new AbortController();\n const options = { signal: this.listeners.signal, passive: true };\n this.host.addEventListener('pointerenter', event => this.follow(event), options);\n this.host.addEventListener('pointermove', event => this.follow(event), options);\n this.host.addEventListener('pointerleave', () => this.off(), options);\n }\n\n /** Drops every listener and the pending frame; a pointer still inside leaves first. */\n stop(): void {\n this.listeners?.abort();\n this.listeners = null;\n if (this.rect !== null) this.off();\n this.cancel();\n }\n\n /** One frame for any number of calls. */\n schedule(): void {\n if (this.frame !== 0) return;\n this.frame = this.view.requestAnimationFrame(time => {\n this.frame = 0;\n this.follower.frame(time);\n });\n }\n\n private follow(event: PointerEvent): void {\n if (event.pointerType === 'touch') return;\n this.clientX = event.clientX;\n this.clientY = event.clientY;\n if (this.rect === null) this.on();\n this.schedule();\n }\n\n private on(): void {\n this.rect = this.host.getBoundingClientRect();\n this.tracking = new AbortController();\n const options = { signal: this.tracking.signal, passive: true };\n const refresh = (): void => {\n this.rect = this.host.getBoundingClientRect();\n this.schedule();\n };\n this.view.addEventListener('scroll', refresh, { ...options, capture: true });\n this.view.addEventListener('resize', refresh, options);\n this.follower.enter();\n }\n\n private off(): void {\n this.tracking?.abort();\n this.tracking = null;\n this.rect = null;\n this.cancel();\n this.follower.leave();\n }\n\n private cancel(): void {\n if (this.frame === 0) return;\n this.view.cancelAnimationFrame(this.frame);\n this.frame = 0;\n }\n}\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\nimport { wrNumAttr } from 'ngwr/utils';\n\nimport type { WrStaggerBy } from './types';\n\nlet segmenter: Intl.Segmenter | undefined;\n\n/**\n * How far the start of the last piece may sit from the start of the first, in ms.\n *\n * @internal\n */\nexport const STAGGER_SPREAD_MAX = 1200;\n\n/**\n * The gap between two pieces when an effect's `stagger` is not set, in ms.\n *\n * @internal\n */\nexport const STAGGER_GAP: Readonly<Record<WrStaggerBy, number>> = { words: 70, letters: 28 };\n\n/**\n * How much of a host has to be in the viewport before an effect plays: most\n * of it, not the first pixel of a heading peeking in at the bottom edge.\n *\n * @internal\n */\nexport const VIEW_THRESHOLD = 0.6;\n\n/**\n * A run of breaking spaces, captured so `split` keeps it. U+00A0 and the other\n * no-break spaces are not in it: a word pair the author glued together stays one\n * piece, so the lines break exactly where they did before the split.\n *\n * @internal\n */\nexport const BREAKING_SPACES = /([ \\t\\n\\r\\f]+)/;\n\n/**\n * What a reader sees as one character, so an emoji or an accented letter is never cut in two.\n *\n * @internal\n */\nexport function graphemes(text: string): string[] {\n if (typeof Intl !== 'undefined' && 'Segmenter' in Intl) {\n segmenter ??= new Intl.Segmenter(undefined, { granularity: 'grapheme' });\n return [...segmenter.segment(text)].map(s => s.segment);\n }\n // Code points: a surrogate pair stays whole, a combining mark becomes its own piece.\n return [...text];\n}\n\n/**\n * The gap between the start of one piece and the next, in ms: `stagger` when\n * set, else the mode's, and never more than lets the last of `count` pieces\n * start by {@link STAGGER_SPREAD_MAX}.\n *\n * @internal\n */\nexport function staggerGap(by: WrStaggerBy, count: number, stagger: number | null = null): number {\n return Math.min(Math.max(0, stagger ?? STAGGER_GAP[by]), STAGGER_SPREAD_MAX / Math.max(1, count - 1));\n}\n\n/**\n * An optional count in ms: `null`, `undefined` or an empty attribute means \"the mode's default\".\n *\n * @internal\n */\nexport const optionalMs = (value: unknown): number | null =>\n value == null || value === '' ? null : wrNumAttr(0)(value);\n"],"mappings":";;;;;;;;;;AAaA,IAAM,WAAN,MAAc;CAkBO;CACA;CAlBnB,MAAuC;CACvC,QAAQ;CACR,SAAS;CACT,UAAU;CAEF,WAA8B;CAC9B,OAA4C;CAC5C,SAAS;CACT,QAAuB;CACvB,cAA6B;CAC7B,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,iBAAwC;CACxC,eAA4C;CAEpD,YACmB,QACA,OAA4B;EAD5B,KAAA,SAAA;EACA,KAAA,QAAA;CAChB;CAEH,MAAM,MAAmB,KAAe,UAAsB,UAAkB;EAE9E,IAAI,IAAI,aAAa,aAAa,yBAAyB,CAAC,CAAC,SAAS;EACtE,MAAM,SAAS,KAAK,OAAM;EAC1B,MAAM,MAAM,OAAO,WAAW,IAAI;EAClC,IAAI,CAAC,KAAK;EACV,KAAK,MAAM;EACX,KAAK,WAAW;EAChB,KAAK,OAAO,IAAI;EAChB,KAAK,MAAM,OAAO,MAAM;EAExB,IAAI,OAAO,mBAAmB,aAAa;GACzC,KAAK,iBAAiB,IAAI,gBAAe,YAAU;IACjD,MAAM,OAAO,QAAQ,QAAQ,SAAS,EAAE,EAAE;IAC1C,KAAK,eAAe,MAAM,SAAS,KAAK,aAAa,MAAM,UAAU,KAAK,YAAY;GACxF,CAAC;GACD,KAAK,eAAe,QAAQ,IAAI;EAClC,OACE,KAAK,OAAO,KAAK,aAAa,KAAK,YAAY;EAGjD,IAAI,OAAO,yBAAyB,aAAa;GAC/C,KAAK,eAAe,IAAI,sBAAqB,YAAU;IACrD,KAAK,SAAS,QAAQ,QAAQ,SA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AK,QAAQ;CACf;AACD;;;;;;;ACtHD,IAAI;AAOJ,MAAa,qBAAqB;AAOlC,MAAa,cAAqD;CAAE,OAAO;CAAI,SAAS;AAAE;AAQ1F,MAAa,iBAAiB;AAS9B,MAAa,kBAAkB;AAO/B,SAAgB,UAAU,MAAY;CACpC,IAAI,OAAO,SAAS,eAAe,eAAe,MAAM;EACtD,cAAc,IAAI,KAAK,UAAU,QAAW,EAAE,aAAa,WAAU,CAAE;EACvE,OAAO,CAAC,GAAG,UAAU,QAAQ,IAAI,CAAC,CAAC,CAAC,KAAI,MAAK,EAAE,OAAO;CACxD;CAEA,OAAO,CAAC,GAAG,IAAI;AACjB;AASA,SAAgB,WAAW,IAAiB,OAAe,UAAyB,MAAI;CACtF,OAAO,KAAK,IAAI,KAAK,IAAI,GAAG,WAAW,YAAY,GAAG,GAAG,qBAAqB,KAAK,IAAI,GAAG,QAAQ,CAAC,CAAC;AACtG;AAOA,MAAa,cAAc,UACzB,SAAS,QAAQ,UAAU,KAAK,OAAO,UAAU,CAAC,CAAC,CAAC,KAAK"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Use of this source code is governed by an MIT-style license that can be
5
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
6
+ */
7
+ function wrSeparatorKeyMove(event, axis, rtl) {
8
+ if (event.key === "Home") return "min";
9
+ if (event.key === "End") return "max";
10
+ if (axis === "inline") {
11
+ const forward = rtl ? -1 : 1;
12
+ if (event.key === "ArrowLeft") return -forward;
13
+ if (event.key === "ArrowRight") return forward;
14
+ return null;
15
+ }
16
+ if (event.key === "ArrowUp") return -1;
17
+ if (event.key === "ArrowDown") return 1;
18
+ return null;
19
+ }
20
+ function wrBeginSeparatorDrag(event) {
21
+ if (event.button !== 0 || !event.isPrimary) return false;
22
+ event.preventDefault();
23
+ const separator = event.currentTarget;
24
+ separator.setPointerCapture(event.pointerId);
25
+ separator.focus();
26
+ return true;
27
+ }
28
+ function wrEndSeparatorDrag(event) {
29
+ event.currentTarget.releasePointerCapture(event.pointerId);
30
+ }
31
+ export { wrEndSeparatorDrag as n, wrSeparatorKeyMove as r, wrBeginSeparatorDrag as t };
32
+
33
+ //# sourceMappingURL=internal-CVLvP9b_.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-CVLvP9b_.mjs","names":[],"sources":["../../../projects/lib/splitter/internal/separator.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\n/**\n * Where a key sends a focusable `role=\"separator\"`: one step toward the low\n * (`-1`) or the high (`1`) end of its axis, or straight to a bound.\n *\n * @internal\n */\nexport type WrSeparatorKeyMove = -1 | 1 | 'min' | 'max';\n\n/**\n * Reads a `keydown` on a separator. `axis` is the one the separator MOVES\n * along: `inline` for a vertical separator, `block` for a horizontal one.\n *\n * Arrows follow the VISUAL axis (WAI-ARIA APG). Under `dir=\"rtl\"` the inline\n * axis starts on the right, so the visual right is its low end and ArrowRight\n * answers `-1`: otherwise the separator walks away from the key being pressed.\n * The block axis is unaffected by `dir`. Home and End are semantic (first and\n * last, not left and right), so they never mirror. The arrows of the other axis\n * and every other key answer `null`, and the caller leaves the event alone.\n *\n * @internal\n */\nexport function wrSeparatorKeyMove(\n event: KeyboardEvent,\n axis: 'inline' | 'block',\n rtl: boolean\n): WrSeparatorKeyMove | null {\n if (event.key === 'Home') return 'min';\n if (event.key === 'End') return 'max';\n if (axis === 'inline') {\n const forward = rtl ? -1 : 1;\n if (event.key === 'ArrowLeft') return -forward as -1 | 1;\n if (event.key === 'ArrowRight') return forward;\n return null;\n }\n if (event.key === 'ArrowUp') return -1;\n if (event.key === 'ArrowDown') return 1;\n return null;\n}\n\n/**\n * Starts a drag from a `pointerdown` on a separator, and answers whether it did.\n *\n * Only the primary button of the primary pointer drags: holding the right\n * button over the separator and moving used to resize, and the same guard keeps\n * a second finger from taking over a drag in progress. The pointer is captured\n * so the drag survives leaving the separator, an iframe and a canvas included.\n * `preventDefault` also suppresses the press's default focus, so the separator\n * is focused by hand: without it the arrows do nothing after a mouse drag until\n * the user finds the separator again with Tab.\n *\n * @internal\n */\nexport function wrBeginSeparatorDrag(event: PointerEvent): boolean {\n if (event.button !== 0 || !event.isPrimary) return false;\n event.preventDefault();\n const separator = event.currentTarget as HTMLElement;\n separator.setPointerCapture(event.pointerId);\n separator.focus();\n return true;\n}\n\n/**\n * Ends the drag {@link wrBeginSeparatorDrag} started, from the `pointerup` or\n * `pointercancel` that closes it.\n *\n * @internal\n */\nexport function wrEndSeparatorDrag(event: PointerEvent): void {\n (event.currentTarget as HTMLElement).releasePointerCapture(event.pointerId);\n}\n"],"mappings":";;;;;;AA4BA,SAAgB,mBACd,OACA,MACA,KAAY;CAEZ,IAAI,MAAM,QAAQ,QAAQ,OAAO;CACjC,IAAI,MAAM,QAAQ,OAAO,OAAO;CAChC,IAAI,SAAS,UAAU;EACrB,MAAM,UAAU,MAAM,KAAK;EAC3B,IAAI,MAAM,QAAQ,aAAa,OAAO,CAAC;EACvC,IAAI,MAAM,QAAQ,cAAc,OAAO;EACvC,OAAO;CACT;CACA,IAAI,MAAM,QAAQ,WAAW,OAAO;CACpC,IAAI,MAAM,QAAQ,aAAa,OAAO;CACtC,OAAO;AACT;AAeA,SAAgB,qBAAqB,OAAmB;CACtD,IAAI,MAAM,WAAW,KAAK,CAAC,MAAM,WAAW,OAAO;CACnD,MAAM,eAAc;CACpB,MAAM,YAAY,MAAM;CACxB,UAAU,kBAAkB,MAAM,SAAS;CAC3C,UAAU,MAAK;CACf,OAAO;AACT;AAQA,SAAgB,mBAAmB,OAAmB;CACnD,MAAM,cAA8B,sBAAsB,MAAM,SAAS;AAC5E"}
@@ -1,7 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { Component, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, inject, input, output, signal } from "@angular/core";
3
3
  import { coerceBooleanProperty } from "@angular/cdk/coercion";
4
- import { getFocusableElements, wrCheckStyles } from "ngwr/utils";
4
+ import { wrCheckStyles, wrGetFocusableElements } from "ngwr/utils";
5
5
  import { useI18nText } from "ngwr/i18n";
6
6
  import { WrIcon } from "ngwr/icon";
7
7
  /**
@@ -31,7 +31,7 @@ var WrAlert = class WrAlert {
31
31
  closed = output();
32
32
  dismissed = signal(false, ...ngDevMode ? [{ debugName: "dismissed" }] : /* istanbul ignore next */ []);
33
33
  classes = computed(() => {
34
- const parts = ["wr-alert", `wr-alert--${this.type()}`];
34
+ const parts = [`wr-alert--${this.type()}`];
35
35
  if (this.dismissed()) parts.push("wr-alert--dismissed");
36
36
  return parts.join(" ");
37
37
  }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
@@ -51,7 +51,7 @@ var WrAlert = class WrAlert {
51
51
  const doc = host.ownerDocument;
52
52
  const active = doc.activeElement;
53
53
  if (active && active !== doc.body) return;
54
- const stops = getFocusableElements(doc.body).filter((el) => el.tabIndex >= 0);
54
+ const stops = wrGetFocusableElements(doc.body).filter((el) => el.tabIndex >= 0);
55
55
  const after = stops.findIndex((el) => (host.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0);
56
56
  (after >= 0 ? stops[after] : stops.at(-1))?.focus();
57
57
  }
@@ -121,12 +121,15 @@ var WrAlert = class WrAlert {
121
121
  }
122
122
  },
123
123
  outputs: { closed: "closed" },
124
- host: { properties: {
125
- "attr.title": "null",
126
- "class": "classes()",
127
- "attr.role": "liveRole()",
128
- "attr.aria-live": "liveLevel()"
129
- } },
124
+ host: {
125
+ properties: {
126
+ "attr.title": "null",
127
+ "class": "classes()",
128
+ "attr.role": "liveRole()",
129
+ "attr.aria-live": "liveLevel()"
130
+ },
131
+ classAttribute: "wr-alert"
132
+ },
130
133
  ngImport: i0,
131
134
  template: "@if (!dismissed()) {\n @if (iconName(); as n) {\n <wr-icon class=\"wr-alert__icon\" [name]=\"n\" />\n } @else if (icon()) {\n <svg\n class=\"wr-alert__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @switch (type()) {\n @case ('success') {\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n }\n @case ('warning') {\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n }\n <!-- An OCTAGON, and the shape is the point. `danger` used to be a\n circle holding a bar over a dot, which is the vertical mirror of\n the `i` the @default branch draws — at the rendered 18px the two\n differ only by where a 1.5px gap sits. The stop-sign silhouette\n reads at that size and survives greyscale, which a mirrored gap\n does not. -->\n @case ('danger') {\n <path\n d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\"\n />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n }\n <!-- A bar, not the exclamation mark `danger` used to carry: `neutral`\n emitted that glyph byte for byte. The icon is the whole difference\n between these two, because what the component actually paints —\n `danger-ink` #a32a33 (L 0.0968) against `on-surface-muted` #5f6c7d\n (L 0.1464) on tints 1.036:1 apart — is a hue difference and little\n else. -->\n @case ('neutral') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 12h8\" />\n }\n @case ('offline') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m4.9 4.9 14.2 14.2\" />\n }\n @default {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n }\n }\n </svg>\n }\n\n <div class=\"wr-alert__body\">\n @if (title(); as t) {\n <p class=\"wr-alert__title\">{{ t }}</p>\n @if (message(); as m) {\n <p class=\"wr-alert__message\">{{ m }}</p>\n }\n } @else if (message(); as m) {\n <p class=\"wr-alert__title\">{{ m }}</p>\n }\n <div class=\"wr-alert__content\"><ng-content /></div>\n <div class=\"wr-alert__actions\"><ng-content select=\"[wrAlertActions]\" /></div>\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"wr-alert__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"onClose()\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n}\n",
132
135
  dependencies: [{
@@ -151,6 +154,7 @@ i0.ɵɵngDeclareClassMetadata({
151
154
  encapsulation: ViewEncapsulation.None,
152
155
  host: {
153
156
  "[attr.title]": "null",
157
+ class: "wr-alert",
154
158
  "[class]": "classes()",
155
159
  "[attr.role]": "liveRole()",
156
160
  "[attr.aria-live]": "liveLevel()"
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-alert.mjs","names":[],"sources":["../../../projects/lib/alert/alert.ts","../../../projects/lib/alert/alert.html"],"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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n ElementRef,\n Injector,\n ViewEncapsulation,\n afterNextRender,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { getFocusableElements, wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrAlertType } from './types';\n\n/**\n * Inline status banner. Use for feedback messages — saved/failed/notice etc.\n * Content placed inside renders below the message, in `.wr-alert__content`.\n *\n * Slots:\n *\n * - **Default** — text under the message.\n * - **`[wrAlertActions]`** — buttons under the message, in a row that wraps.\n *\n * @example\n * ```html\n * <wr-alert title=\"Saved\" message=\"Your changes are live.\" type=\"success\" />\n * <wr-alert title=\"Failed\" type=\"danger\" closable (closed)=\"onClose()\" />\n * <wr-alert title=\"Sync failed\" type=\"danger\">Request <code>8f2c41</code> timed out.</wr-alert>\n * <wr-alert title=\"Update available\" type=\"info\">\n * <wr-btn wrAlertActions size=\"sm\" (click)=\"update()\">Install</wr-btn>\n * </wr-alert>\n * ```\n *\n * @see https://ngwr.dev/reference/components/alert\n */\n@Component({\n selector: 'wr-alert',\n templateUrl: './alert.html',\n imports: [WrIcon],\n encapsulation: ViewEncapsulation.None,\n host: {\n // `title` is an input, and a static attribute that feeds an input is ALSO\n // written onto the host — where the browser shows it as a native tooltip\n // over the whole component, and where it feeds the accessible name of any\n // element that has a role. `<wr-alert title=\"Heads up\">` is the documented\n // spelling, so every page writing it shipped both. A bound `[title]` never\n // did this, which is why the two forms behaved differently for no reason a\n // reader could see.\n '[attr.title]': 'null',\n '[class]': 'classes()',\n '[attr.role]': 'liveRole()',\n '[attr.aria-live]': 'liveLevel()',\n },\n})\nexport class WrAlert {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('alert');\n }\n\n /** Accessible name. Falls back to `alert.close`, then `'Close alert'`. */\n readonly closeLabel = input<string | null>(null);\n\n protected readonly resolvedCloseLabel = useI18nText(this.closeLabel, 'alert.close', 'Close alert');\n\n /**\n * Optional headline shown at the top of the alert.\n *\n * @default null\n */\n readonly title = input<string | null>(null);\n\n /**\n * Visual variant.\n *\n * @default 'info'\n */\n readonly type = input<WrAlertType>('info');\n\n /**\n * Override the default per-type icon with any ngwr icon name.\n *\n * @default null\n */\n readonly iconName = input<WrIconName | null>(null);\n\n /**\n * Optional secondary message rendered below the title.\n *\n * @default null\n */\n readonly message = input<string | null>(null);\n\n /**\n * When `true`, renders a leading status icon matching the `type`.\n * Pass `false` to hide. Ignored when `iconName` is set.\n *\n * @default true\n */\n readonly icon = input(true, { transform: coerceBooleanProperty });\n\n /**\n * When `true`, renders a close button.\n *\n * @default false\n */\n readonly closable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Emitted when the user dismisses the alert via the close button. If the close\n * button had focus, focus moves on to the next focusable element after the alert\n * (or the one before it, when nothing follows) — unless a `(closed)` handler has\n * placed it somewhere itself.\n */\n readonly closed = output<void>();\n\n protected readonly dismissed = signal(false);\n\n protected readonly classes = computed(() => {\n const parts = ['wr-alert', `wr-alert--${this.type()}`];\n if (this.dismissed()) parts.push('wr-alert--dismissed');\n return parts.join(' ');\n });\n\n /** Escalate role/aria-live for danger/warning alerts. */\n protected readonly liveRole = computed(() =>\n this.dismissed() ? null : this.type() === 'danger' ? 'alert' : 'status'\n );\n protected readonly liveLevel = computed(() =>\n this.dismissed() ? null : this.type() === 'danger' || this.type() === 'warning' ? 'assertive' : 'polite'\n );\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n protected onClose(): void {\n const host = this.host.nativeElement;\n const hadFocus = host.contains(host.ownerDocument.activeElement);\n this.dismissed.set(true);\n this.closed.emit();\n if (hadFocus) afterNextRender(() => this.handOnFocus(), { injector: this.injector });\n }\n\n /**\n * The close button is removed with the rest of the content, and a focused element\n * that leaves the DOM drops the caret on `<body>`: a keyboard user's next Tab, and\n * a screen reader's reading position, started over from the top of the page. Run\n * after the render that removed it, so a `(closed)` handler that moved focus on\n * purpose is seen and left alone.\n */\n private handOnFocus(): void {\n const host = this.host.nativeElement;\n const doc = host.ownerDocument;\n const active = doc.activeElement;\n if (active && active !== doc.body) return;\n // Tab stops only: a roving composite parks its other items at -1. The host has\n // nothing focusable left inside it, so every stop is either before or after it.\n const stops = getFocusableElements(doc.body).filter(el => el.tabIndex >= 0);\n // eslint-disable-next-line no-bitwise -- compareDocumentPosition answers with a bitmask\n const after = stops.findIndex(el => (host.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0);\n (after >= 0 ? stops[after] : stops.at(-1))?.focus();\n }\n}\n","@if (!dismissed()) {\n @if (iconName(); as n) {\n <wr-icon class=\"wr-alert__icon\" [name]=\"n\" />\n } @else if (icon()) {\n <svg\n class=\"wr-alert__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @switch (type()) {\n @case ('success') {\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n }\n @case ('warning') {\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n }\n <!-- An OCTAGON, and the shape is the point. `danger` used to be a\n circle holding a bar over a dot, which is the vertical mirror of\n the `i` the @default branch draws — at the rendered 18px the two\n differ only by where a 1.5px gap sits. The stop-sign silhouette\n reads at that size and survives greyscale, which a mirrored gap\n does not. -->\n @case ('danger') {\n <path\n d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\"\n />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n }\n <!-- A bar, not the exclamation mark `danger` used to carry: `neutral`\n emitted that glyph byte for byte. The icon is the whole difference\n between these two, because what the component actually paints —\n `danger-ink` #a32a33 (L 0.0968) against `on-surface-muted` #5f6c7d\n (L 0.1464) on tints 1.036:1 apart — is a hue difference and little\n else. -->\n @case ('neutral') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 12h8\" />\n }\n @case ('offline') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m4.9 4.9 14.2 14.2\" />\n }\n @default {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n }\n }\n </svg>\n }\n\n <div class=\"wr-alert__body\">\n @if (title(); as t) {\n <p class=\"wr-alert__title\">{{ t }}</p>\n @if (message(); as m) {\n <p class=\"wr-alert__message\">{{ m }}</p>\n }\n } @else if (message(); as m) {\n <p class=\"wr-alert__title\">{{ m }}</p>\n }\n <div class=\"wr-alert__content\"><ng-content /></div>\n <div class=\"wr-alert__actions\"><ng-content select=\"[wrAlertActions]\" /></div>\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"wr-alert__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"onClose()\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n}\n"],"mappings":";;;;;;;;;;;;AAmEA,IAAa,UAAb,MAAa,QAAO;CAClB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,OAAO;CAC1E;CAGS,aAAa,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA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AA;IAAA,mBAAA;GAAA;GAAA,SAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,MAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,SAAA,EAAA,QAAA,SAAA;EAAA,MAAA,EAAA,YAAA;GAAA,cAAA;GAAA,SAAA;GAAA,aAAA;GAAA,kBAAA;EAAA,EAAA;EAAA,UAAA;EAAA,UCnEpB;EA6FA,cAAA,CAAA;GAAA,MAAA;GAAA,MD1CY;GAAM,UAAA;GAAA,QAAA,CAAA,MAAA;EAAA,CAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAgBL,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EAnBnB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAU,SAEX,CAAC,MAAM;GAAC,eACF,kBAAkB;GAAI,MAC/B;IAQJ,gBAAgB;IAChB,WAAW;IACX,eAAe;IACf,oBAAoB;GACrB;GAAA,UAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"ngwr-alert.mjs","names":[],"sources":["../../../projects/lib/alert/alert.ts","../../../projects/lib/alert/alert.html"],"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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n ElementRef,\n Injector,\n ViewEncapsulation,\n afterNextRender,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { wrGetFocusableElements, wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrAlertType } from './types';\n\n/**\n * Inline status banner. Use for feedback messages — saved/failed/notice etc.\n * Content placed inside renders below the message, in `.wr-alert__content`.\n *\n * Slots:\n *\n * - **Default** — text under the message.\n * - **`[wrAlertActions]`** — buttons under the message, in a row that wraps.\n *\n * @example\n * ```html\n * <wr-alert title=\"Saved\" message=\"Your changes are live.\" type=\"success\" />\n * <wr-alert title=\"Failed\" type=\"danger\" closable (closed)=\"onClose()\" />\n * <wr-alert title=\"Sync failed\" type=\"danger\">Request <code>8f2c41</code> timed out.</wr-alert>\n * <wr-alert title=\"Update available\" type=\"info\">\n * <wr-btn wrAlertActions size=\"sm\" (click)=\"update()\">Install</wr-btn>\n * </wr-alert>\n * ```\n *\n * @see https://ngwr.dev/reference/components/alert\n */\n@Component({\n selector: 'wr-alert',\n templateUrl: './alert.html',\n imports: [WrIcon],\n encapsulation: ViewEncapsulation.None,\n host: {\n // `title` is an input, and a static attribute that feeds an input is ALSO\n // written onto the host — where the browser shows it as a native tooltip\n // over the whole component, and where it feeds the accessible name of any\n // element that has a role. `<wr-alert title=\"Heads up\">` is the documented\n // spelling, so every page writing it shipped both. A bound `[title]` never\n // did this, which is why the two forms behaved differently for no reason a\n // reader could see.\n '[attr.title]': 'null',\n class: 'wr-alert',\n '[class]': 'classes()',\n '[attr.role]': 'liveRole()',\n '[attr.aria-live]': 'liveLevel()',\n },\n})\nexport class WrAlert {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('alert');\n }\n\n /** Accessible name. Falls back to `alert.close`, then `'Close alert'`. */\n readonly closeLabel = input<string | null>(null);\n\n protected readonly resolvedCloseLabel = useI18nText(this.closeLabel, 'alert.close', 'Close alert');\n\n /**\n * Optional headline shown at the top of the alert.\n *\n * @default null\n */\n readonly title = input<string | null>(null);\n\n /**\n * Visual variant.\n *\n * @default 'info'\n */\n readonly type = input<WrAlertType>('info');\n\n /**\n * Override the default per-type icon with any ngwr icon name.\n *\n * @default null\n */\n readonly iconName = input<WrIconName | null>(null);\n\n /**\n * Optional secondary message rendered below the title.\n *\n * @default null\n */\n readonly message = input<string | null>(null);\n\n /**\n * When `true`, renders a leading status icon matching the `type`.\n * Pass `false` to hide. Ignored when `iconName` is set.\n *\n * @default true\n */\n readonly icon = input(true, { transform: coerceBooleanProperty });\n\n /**\n * When `true`, renders a close button.\n *\n * @default false\n */\n readonly closable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Emitted when the user dismisses the alert via the close button. If the close\n * button had focus, focus moves on to the next focusable element after the alert\n * (or the one before it, when nothing follows) — unless a `(closed)` handler has\n * placed it somewhere itself.\n */\n readonly closed = output<void>();\n\n protected readonly dismissed = signal(false);\n\n protected readonly classes = computed(() => {\n const parts = [`wr-alert--${this.type()}`];\n if (this.dismissed()) parts.push('wr-alert--dismissed');\n return parts.join(' ');\n });\n\n /** Escalate role/aria-live for danger/warning alerts. */\n protected readonly liveRole = computed(() =>\n this.dismissed() ? null : this.type() === 'danger' ? 'alert' : 'status'\n );\n protected readonly liveLevel = computed(() =>\n this.dismissed() ? null : this.type() === 'danger' || this.type() === 'warning' ? 'assertive' : 'polite'\n );\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n protected onClose(): void {\n const host = this.host.nativeElement;\n const hadFocus = host.contains(host.ownerDocument.activeElement);\n this.dismissed.set(true);\n this.closed.emit();\n if (hadFocus) afterNextRender(() => this.handOnFocus(), { injector: this.injector });\n }\n\n /**\n * The close button is removed with the rest of the content, and a focused element\n * that leaves the DOM drops the caret on `<body>`: a keyboard user's next Tab, and\n * a screen reader's reading position, started over from the top of the page. Run\n * after the render that removed it, so a `(closed)` handler that moved focus on\n * purpose is seen and left alone.\n */\n private handOnFocus(): void {\n const host = this.host.nativeElement;\n const doc = host.ownerDocument;\n const active = doc.activeElement;\n if (active && active !== doc.body) return;\n // Tab stops only: a roving composite parks its other items at -1. The host has\n // nothing focusable left inside it, so every stop is either before or after it.\n const stops = wrGetFocusableElements(doc.body).filter(el => el.tabIndex >= 0);\n // eslint-disable-next-line no-bitwise -- compareDocumentPosition answers with a bitmask\n const after = stops.findIndex(el => (host.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0);\n (after >= 0 ? stops[after] : stops.at(-1))?.focus();\n }\n}\n","@if (!dismissed()) {\n @if (iconName(); as n) {\n <wr-icon class=\"wr-alert__icon\" [name]=\"n\" />\n } @else if (icon()) {\n <svg\n class=\"wr-alert__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @switch (type()) {\n @case ('success') {\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n }\n @case ('warning') {\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n }\n <!-- An OCTAGON, and the shape is the point. `danger` used to be a\n circle holding a bar over a dot, which is the vertical mirror of\n the `i` the @default branch draws — at the rendered 18px the two\n differ only by where a 1.5px gap sits. The stop-sign silhouette\n reads at that size and survives greyscale, which a mirrored gap\n does not. -->\n @case ('danger') {\n <path\n d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\"\n />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n }\n <!-- A bar, not the exclamation mark `danger` used to carry: `neutral`\n emitted that glyph byte for byte. The icon is the whole difference\n between these two, because what the component actually paints —\n `danger-ink` #a32a33 (L 0.0968) against `on-surface-muted` #5f6c7d\n (L 0.1464) on tints 1.036:1 apart — is a hue difference and little\n else. -->\n @case ('neutral') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 12h8\" />\n }\n @case ('offline') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m4.9 4.9 14.2 14.2\" />\n }\n @default {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n }\n }\n </svg>\n }\n\n <div class=\"wr-alert__body\">\n @if (title(); as t) {\n <p class=\"wr-alert__title\">{{ t }}</p>\n @if (message(); as m) {\n <p class=\"wr-alert__message\">{{ m }}</p>\n }\n } @else if (message(); as m) {\n <p class=\"wr-alert__title\">{{ m }}</p>\n }\n <div class=\"wr-alert__content\"><ng-content /></div>\n <div class=\"wr-alert__actions\"><ng-content select=\"[wrAlertActions]\" /></div>\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"wr-alert__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"onClose()\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n}\n"],"mappings":";;;;;;;;;;;;AAoEA,IAAa,UAAb,MAAa,QAAO;CAClB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,OAAO;CAC1E;CAGS,aAAa,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAE7B,qBAAqB,YAAY,KAAK,YAAY,eAAe,aAAa;CAOxF,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BAAA;GAAA;GAAA,MAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,SAAA,EAAA,QAAA,SAAA;EAAA,MAAA;GAAA,YAAA;IAAA,cAAA;IAAA,SAAA;IAAA,aAAA;IAAA,kBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UCpEpB;EA6FA,cAAA,CAAA;GAAA,MAAA;GAAA,MD1CY;GAAM,UAAA;GAAA,QAAA,CAAA,MAAA;EAAA,CAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAiBL,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EApBnB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAU,SAEX,CAAC,MAAM;GAAC,eACF,kBAAkB;GAAI,MAC/B;IAQJ,gBAAgB;IAChB,OAAO;IACP,WAAW;IACX,eAAe;IACf,oBAAoB;GACrB;GAAA,UAAA;EAAA,CAAA"}
@@ -1,10 +1,10 @@
1
+ import "./internal-BaQU4t_0.mjs";
1
2
  import * as i0 from "@angular/core";
2
3
  import { Component, DestroyRef, ElementRef, PLATFORM_ID, ViewEncapsulation, afterNextRender, booleanAttribute, computed, effect, inject, input, untracked, viewChild } from "@angular/core";
3
4
  import { DOCUMENT as DOCUMENT$1, isPlatformBrowser } from "@angular/common";
4
- import { clamp, numAttr, resolveCssColorChannels, watchColorScheme, wrCheckStyles } from "ngwr/utils";
5
+ import { wrCheckStyles, wrClamp, wrNumAttr, wrResolveCssColorChannels, wrWatchColorScheme } from "ngwr/utils";
5
6
  import { WrPlatform } from "ngwr/platform";
6
7
  import { Directionality } from "@angular/cdk/bidi";
7
- import { FRAME_FLOOR_SLACK, MAX_FRAME_MS } from "ngwr/animations/core";
8
8
  /**
9
9
  * @license
10
10
  *
@@ -48,13 +48,13 @@ const WASH_RAY = .2;
48
48
  const WASH_DETAIL = .4;
49
49
  const GLOW_LIFT = .1;
50
50
  function auroraHeight(height) {
51
- return clamp(Number.isFinite(height) ? height : .5, HEIGHT_MIN, 1);
51
+ return wrClamp(Number.isFinite(height) ? height : .5, HEIGHT_MIN, 1);
52
52
  }
53
53
  function auroraLayers(layers) {
54
- return clamp(Math.round(Number.isFinite(layers) ? layers : 2), 1, 3);
54
+ return wrClamp(Math.round(Number.isFinite(layers) ? layers : 2), 1, 3);
55
55
  }
56
56
  function auroraShare(value, fallback) {
57
- return clamp(Number.isFinite(value) ? value : fallback, 0, 1);
57
+ return wrClamp(Number.isFinite(value) ? value : fallback, 0, 1);
58
58
  }
59
59
  function auroraFactor(value, fallback, min = 0) {
60
60
  return Math.max(min, Number.isFinite(value) ? value : fallback);
@@ -67,7 +67,7 @@ function auroraEdgeSign(edge) {
67
67
  }
68
68
  function auroraIntro(elapsed) {
69
69
  if (elapsed >= 2.4) return [1, 1];
70
- const eased = 1 - (1 - clamp(elapsed, 0, INTRO_S) / INTRO_S) ** 3;
70
+ const eased = 1 - (1 - wrClamp(elapsed, 0, INTRO_S) / INTRO_S) ** 3;
71
71
  return [eased, INTRO_REACH_START + .7 * eased];
72
72
  }
73
73
  function auroraApproach(current, target, dt, rate = FOLLOW_RATE) {
@@ -75,17 +75,17 @@ function auroraApproach(current, target, dt, rate = FOLLOW_RATE) {
75
75
  }
76
76
  function auroraFollowTarget(x, y, width, height, reach) {
77
77
  if (!Number.isFinite(x) || !Number.isFinite(y) || width <= 0 || height <= 0) return [0, 0];
78
- return [clamp(x / width - .5, -.5, .5) * 2 * FOLLOW_REACH, clamp((y / height - reach) / Math.max(reach, .01), -1, 1) * FOLLOW_LIFT];
78
+ return [wrClamp(x / width - .5, -.5, .5) * 2 * FOLLOW_REACH, wrClamp((y / height - reach) / Math.max(reach, .01), -1, 1) * FOLLOW_LIFT];
79
79
  }
80
80
  function auroraDriftLive(across, stretch, target) {
81
81
  return Math.abs(across - target[0]) > 5e-4 || Math.abs(stretch - target[1]) > 5e-4;
82
82
  }
83
83
  function auroraSideFade(width) {
84
- return clamp(SIDE_SHARE * width, 48, 360);
84
+ return wrClamp(SIDE_SHARE * width, 48, 360);
85
85
  }
86
86
  function auroraRatio(width, height) {
87
87
  const area = Math.max(1, width * height);
88
- return clamp(Math.sqrt(PIXELS / area), RATIO_MIN, RATIO_MAX);
88
+ return wrClamp(Math.sqrt(PIXELS / area), RATIO_MIN, RATIO_MAX);
89
89
  }
90
90
  function auroraLight(surface) {
91
91
  return .2126 * surface[0] + .7152 * surface[1] + .0722 * surface[2] > .5;
@@ -426,31 +426,31 @@ var WrAurora = class WrAurora {
426
426
  edge = input("top", ...ngDevMode ? [{ debugName: "edge" }] : /* istanbul ignore next */ []);
427
427
  height = input(.5, {
428
428
  ...ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {},
429
- transform: numAttr(.5)
429
+ transform: wrNumAttr(.5)
430
430
  });
431
431
  amplitude = input(1, {
432
432
  ...ngDevMode ? { debugName: "amplitude" } : /* istanbul ignore next */ {},
433
- transform: numAttr(1)
433
+ transform: wrNumAttr(1)
434
434
  });
435
435
  scale = input(1, {
436
436
  ...ngDevMode ? { debugName: "scale" } : /* istanbul ignore next */ {},
437
- transform: numAttr(1)
437
+ transform: wrNumAttr(1)
438
438
  });
439
439
  speed = input(1, {
440
440
  ...ngDevMode ? { debugName: "speed" } : /* istanbul ignore next */ {},
441
- transform: numAttr(1)
441
+ transform: wrNumAttr(1)
442
442
  });
443
443
  glow = input(1, {
444
444
  ...ngDevMode ? { debugName: "glow" } : /* istanbul ignore next */ {},
445
- transform: numAttr(1)
445
+ transform: wrNumAttr(1)
446
446
  });
447
447
  rays = input(.6, {
448
448
  ...ngDevMode ? { debugName: "rays" } : /* istanbul ignore next */ {},
449
- transform: numAttr(.6)
449
+ transform: wrNumAttr(.6)
450
450
  });
451
451
  layers = input(2, {
452
452
  ...ngDevMode ? { debugName: "layers" } : /* istanbul ignore next */ {},
453
- transform: numAttr(2)
453
+ transform: wrNumAttr(2)
454
454
  });
455
455
  intro = input(false, {
456
456
  ...ngDevMode ? { debugName: "intro" } : /* istanbul ignore next */ {},
@@ -551,7 +551,7 @@ var WrAurora = class WrAurora {
551
551
  this.sync();
552
552
  });
553
553
  });
554
- watchColorScheme(() => {
554
+ wrWatchColorScheme(() => {
555
555
  this.resolveColors();
556
556
  this.still();
557
557
  });
@@ -665,10 +665,10 @@ var WrAurora = class WrAurora {
665
665
  if (!this.renderer) return;
666
666
  const canvas = this.canvasRef().nativeElement;
667
667
  FALLBACK_STOPS.forEach((fallback, i) => {
668
- const rgb = resolveCssColorChannels(canvas, `var(--wr-aurora-color-${i + 1})`, fallback);
668
+ const rgb = wrResolveCssColorChannels(canvas, `var(--wr-aurora-color-${i + 1})`, fallback);
669
669
  this.frame.stops[i].set(auroraStop(rgb));
670
670
  });
671
- const light = auroraLight(resolveCssColorChannels(canvas, "var(--wr-color-surface)", "#ffffff"));
671
+ const light = auroraLight(wrResolveCssColorChannels(canvas, "var(--wr-color-surface)", "#ffffff"));
672
672
  this.frame.light = light ? 1 : 0;
673
673
  }
674
674
  onPointerMove = (event) => {
@@ -734,11 +734,11 @@ var WrAurora = class WrAurora {
734
734
  frameLoop = (now) => {
735
735
  this.rafId = null;
736
736
  if (!this.running) return;
737
- if (now - this.lastFrame + FRAME_FLOOR_SLACK < 33.333333333333336) {
737
+ if (now - this.lastFrame + 2 < 33.333333333333336) {
738
738
  this.rafId = requestAnimationFrame(this.frameLoop);
739
739
  return;
740
740
  }
741
- const dt = Math.min(Math.max(now - this.lastFrame, 0), MAX_FRAME_MS) / 1e3;
741
+ const dt = Math.min(Math.max(now - this.lastFrame, 0), 50) / 1e3;
742
742
  this.lastFrame = now;
743
743
  this.advance(dt);
744
744
  this.draw();