ngwr 8.0.0 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/README.md +76 -29
  2. package/action-sheet/styles/_index.scss +93 -0
  3. package/alert/styles/_index.scss +10 -10
  4. package/anchor/styles/_index.scss +3 -3
  5. package/back-top/styles/_index.scss +1 -1
  6. package/badge/styles/_tag.scss +3 -3
  7. package/bar-chart/styles/_index.scss +4 -4
  8. package/border-glow/styles/_index.scss +3 -3
  9. package/breadcrumbs/styles/_index.scss +3 -3
  10. package/burger/styles/_index.scss +1 -1
  11. package/button/styles/_index.scss +4 -4
  12. package/calendar/styles/_index.scss +4 -4
  13. package/calendar-heatmap/styles/_index.scss +3 -3
  14. package/card/styles/_index.scss +5 -5
  15. package/carousel/styles/_index.scss +5 -5
  16. package/cascader/styles/_index.scss +15 -15
  17. package/checkbox/styles/_index.scss +20 -5
  18. package/collapse/styles/_index.scss +6 -6
  19. package/color-picker/styles/_index.scss +15 -9
  20. package/command-palette/styles/_index.scss +19 -16
  21. package/compare/styles/_index.scss +3 -3
  22. package/context-menu/styles/_index.scss +16 -6
  23. package/counter/styles/_index.scss +12 -1
  24. package/date-picker/styles/_index.scss +8 -8
  25. package/descriptions/styles/_index.scss +9 -9
  26. package/dialog/styles/_index.scss +7 -6
  27. package/divider/styles/_index.scss +2 -2
  28. package/donut-chart/styles/_index.scss +3 -3
  29. package/drag-drop/styles/_index.scss +11 -6
  30. package/drawer/styles/_index.scss +15 -6
  31. package/dropdown/styles/_index.scss +5 -5
  32. package/empty/styles/_index.scss +4 -4
  33. package/fesm2022/ngwr-action-sheet.mjs +81 -0
  34. package/fesm2022/ngwr-action-sheet.mjs.map +1 -0
  35. package/fesm2022/ngwr-affix.mjs +3 -3
  36. package/fesm2022/ngwr-alert.mjs +4 -4
  37. package/fesm2022/ngwr-alert.mjs.map +1 -1
  38. package/fesm2022/ngwr-anchor.mjs +4 -4
  39. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  40. package/fesm2022/ngwr-aurora.mjs +5 -4
  41. package/fesm2022/ngwr-aurora.mjs.map +1 -1
  42. package/fesm2022/ngwr-avatar.mjs +4 -4
  43. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  44. package/fesm2022/ngwr-back-top.mjs +4 -4
  45. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  46. package/fesm2022/ngwr-badge.mjs +8 -8
  47. package/fesm2022/ngwr-badge.mjs.map +1 -1
  48. package/fesm2022/ngwr-bar-chart.mjs +4 -4
  49. package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
  50. package/fesm2022/ngwr-blur-text.mjs +3 -3
  51. package/fesm2022/ngwr-border-glow.mjs +4 -4
  52. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  53. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  54. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  55. package/fesm2022/ngwr-burger.mjs +4 -4
  56. package/fesm2022/ngwr-burger.mjs.map +1 -1
  57. package/fesm2022/ngwr-button.mjs +8 -8
  58. package/fesm2022/ngwr-button.mjs.map +1 -1
  59. package/fesm2022/ngwr-calendar-heatmap.mjs +4 -4
  60. package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
  61. package/fesm2022/ngwr-calendar.mjs +4 -4
  62. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  63. package/fesm2022/ngwr-card.mjs +11 -11
  64. package/fesm2022/ngwr-card.mjs.map +1 -1
  65. package/fesm2022/ngwr-carousel.mjs +7 -7
  66. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  67. package/fesm2022/ngwr-cascader.mjs +52 -60
  68. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  69. package/fesm2022/ngwr-checkbox.mjs +74 -106
  70. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  71. package/fesm2022/ngwr-circular-text.mjs +5 -4
  72. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  73. package/fesm2022/ngwr-click-spark.mjs +5 -4
  74. package/fesm2022/ngwr-click-spark.mjs.map +1 -1
  75. package/fesm2022/ngwr-clipboard.mjs +4 -4
  76. package/fesm2022/ngwr-clipboard.mjs.map +1 -1
  77. package/fesm2022/ngwr-collapse.mjs +12 -12
  78. package/fesm2022/ngwr-collapse.mjs.map +1 -1
  79. package/fesm2022/ngwr-color-picker.mjs +58 -66
  80. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  81. package/fesm2022/ngwr-command-palette.mjs +4 -4
  82. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  83. package/fesm2022/ngwr-compare.mjs +4 -4
  84. package/fesm2022/ngwr-compare.mjs.map +1 -1
  85. package/fesm2022/ngwr-confetti.mjs +3 -3
  86. package/fesm2022/ngwr-context-menu.mjs +86 -15
  87. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  88. package/fesm2022/ngwr-cookie.mjs +19 -6
  89. package/fesm2022/ngwr-cookie.mjs.map +1 -1
  90. package/fesm2022/ngwr-counter.mjs +26 -12
  91. package/fesm2022/ngwr-counter.mjs.map +1 -1
  92. package/fesm2022/ngwr-date-adapter-fns.mjs +3 -3
  93. package/fesm2022/ngwr-date-adapter-luxon.mjs +3 -3
  94. package/fesm2022/ngwr-date-adapter.mjs +10 -5
  95. package/fesm2022/ngwr-date-adapter.mjs.map +1 -1
  96. package/fesm2022/ngwr-date-picker.mjs +128 -123
  97. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  98. package/fesm2022/ngwr-decrypt-text.mjs +3 -3
  99. package/fesm2022/ngwr-density.mjs +7 -7
  100. package/fesm2022/ngwr-density.mjs.map +1 -1
  101. package/fesm2022/ngwr-descriptions.mjs +7 -7
  102. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  103. package/fesm2022/ngwr-dialog.mjs +16 -16
  104. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  105. package/fesm2022/ngwr-directives.mjs +21 -15
  106. package/fesm2022/ngwr-directives.mjs.map +1 -1
  107. package/fesm2022/ngwr-divider.mjs +4 -4
  108. package/fesm2022/ngwr-divider.mjs.map +1 -1
  109. package/fesm2022/ngwr-donut-chart.mjs +4 -4
  110. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  111. package/fesm2022/ngwr-drag-drop.mjs +10 -9
  112. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  113. package/fesm2022/ngwr-drawer.mjs +19 -18
  114. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  115. package/fesm2022/ngwr-dropdown.mjs +13 -12
  116. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  117. package/fesm2022/ngwr-empty.mjs +4 -4
  118. package/fesm2022/ngwr-empty.mjs.map +1 -1
  119. package/fesm2022/ngwr-falling-text.mjs +5 -4
  120. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  121. package/fesm2022/ngwr-file-upload.mjs +58 -60
  122. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  123. package/fesm2022/ngwr-form.mjs +11 -11
  124. package/fesm2022/ngwr-form.mjs.map +1 -1
  125. package/fesm2022/ngwr-fuzzy-text.mjs +5 -4
  126. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  127. package/fesm2022/ngwr-gauge.mjs +4 -4
  128. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  129. package/fesm2022/ngwr-glitch-text.mjs +4 -4
  130. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  131. package/fesm2022/ngwr-gradient-text.mjs +4 -4
  132. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  133. package/fesm2022/ngwr-hotkey.mjs +7 -7
  134. package/fesm2022/ngwr-hotkey.mjs.map +1 -1
  135. package/fesm2022/ngwr-i18n.mjs +10 -10
  136. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  137. package/fesm2022/ngwr-icon-adapters-lucide.mjs +6 -7
  138. package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
  139. package/fesm2022/ngwr-icon.mjs +4 -4
  140. package/fesm2022/ngwr-icon.mjs.map +1 -1
  141. package/fesm2022/ngwr-image-cropper.mjs +6 -5
  142. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  143. package/fesm2022/ngwr-input-number.mjs +56 -73
  144. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  145. package/fesm2022/ngwr-input-otp.mjs +46 -52
  146. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  147. package/fesm2022/ngwr-input.mjs +17 -17
  148. package/fesm2022/ngwr-input.mjs.map +1 -1
  149. package/fesm2022/ngwr-keyboard.mjs +4 -4
  150. package/fesm2022/ngwr-keyboard.mjs.map +1 -1
  151. package/fesm2022/ngwr-knob.mjs +47 -58
  152. package/fesm2022/ngwr-knob.mjs.map +1 -1
  153. package/fesm2022/ngwr-layout.mjs +16 -16
  154. package/fesm2022/ngwr-layout.mjs.map +1 -1
  155. package/fesm2022/ngwr-lightbox.mjs +7 -6
  156. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  157. package/fesm2022/ngwr-line-chart.mjs +4 -4
  158. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  159. package/fesm2022/ngwr-list.mjs +8 -8
  160. package/fesm2022/ngwr-list.mjs.map +1 -1
  161. package/fesm2022/ngwr-loading-bar.mjs +7 -7
  162. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  163. package/fesm2022/ngwr-marquee.mjs +6 -5
  164. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  165. package/fesm2022/ngwr-media.mjs +4 -4
  166. package/fesm2022/ngwr-media.mjs.map +1 -1
  167. package/fesm2022/ngwr-mention.mjs +15 -9
  168. package/fesm2022/ngwr-mention.mjs.map +1 -1
  169. package/fesm2022/ngwr-meta.mjs +7 -7
  170. package/fesm2022/ngwr-meta.mjs.map +1 -1
  171. package/fesm2022/ngwr-meter-group.mjs +4 -4
  172. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  173. package/fesm2022/ngwr-overlay.mjs +9 -4
  174. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  175. package/fesm2022/ngwr-page-header.mjs +4 -4
  176. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  177. package/fesm2022/ngwr-pagination.mjs +4 -4
  178. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  179. package/fesm2022/ngwr-pipes.mjs +21 -21
  180. package/fesm2022/ngwr-platform.mjs +169 -5
  181. package/fesm2022/ngwr-platform.mjs.map +1 -1
  182. package/fesm2022/ngwr-popconfirm.mjs +7 -7
  183. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  184. package/fesm2022/ngwr-popover.mjs +7 -7
  185. package/fesm2022/ngwr-popover.mjs.map +1 -1
  186. package/fesm2022/ngwr-progress.mjs +4 -4
  187. package/fesm2022/ngwr-progress.mjs.map +1 -1
  188. package/fesm2022/ngwr-pull-to-refresh.mjs +172 -0
  189. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -0
  190. package/fesm2022/ngwr-qr.mjs +5 -5
  191. package/fesm2022/ngwr-qr.mjs.map +1 -1
  192. package/fesm2022/ngwr-radio.mjs +27 -52
  193. package/fesm2022/ngwr-radio.mjs.map +1 -1
  194. package/fesm2022/ngwr-rating.mjs +35 -48
  195. package/fesm2022/ngwr-rating.mjs.map +1 -1
  196. package/fesm2022/ngwr-result.mjs +13 -13
  197. package/fesm2022/ngwr-result.mjs.map +1 -1
  198. package/fesm2022/ngwr-rotating-text.mjs +15 -4
  199. package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
  200. package/fesm2022/ngwr-scroll.mjs +4 -4
  201. package/fesm2022/ngwr-scroll.mjs.map +1 -1
  202. package/fesm2022/ngwr-segmented.mjs +3 -3
  203. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  204. package/fesm2022/ngwr-select.mjs +289 -85
  205. package/fesm2022/ngwr-select.mjs.map +1 -1
  206. package/fesm2022/ngwr-shiny-text.mjs +7 -7
  207. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  208. package/fesm2022/ngwr-sidebar.mjs +4 -4
  209. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  210. package/fesm2022/ngwr-skeleton.mjs +4 -4
  211. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  212. package/fesm2022/ngwr-slider.mjs +79 -73
  213. package/fesm2022/ngwr-slider.mjs.map +1 -1
  214. package/fesm2022/ngwr-sparkline.mjs +4 -4
  215. package/fesm2022/ngwr-sparkline.mjs.map +1 -1
  216. package/fesm2022/ngwr-speed-dial.mjs +13 -5
  217. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  218. package/fesm2022/ngwr-spinner.mjs +4 -4
  219. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  220. package/fesm2022/ngwr-splash-cursor.mjs +4 -4
  221. package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
  222. package/fesm2022/ngwr-split-text.mjs +3 -3
  223. package/fesm2022/ngwr-splitter.mjs +4 -4
  224. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  225. package/fesm2022/ngwr-spotlight-card.mjs +7 -7
  226. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  227. package/fesm2022/ngwr-squircle.mjs +7 -7
  228. package/fesm2022/ngwr-squircle.mjs.map +1 -1
  229. package/fesm2022/ngwr-star-border.mjs +4 -4
  230. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  231. package/fesm2022/ngwr-statistic.mjs +65 -10
  232. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  233. package/fesm2022/ngwr-stepper.mjs +8 -8
  234. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  235. package/fesm2022/ngwr-storage.mjs +4 -4
  236. package/fesm2022/ngwr-storage.mjs.map +1 -1
  237. package/fesm2022/ngwr-switch.mjs +16 -48
  238. package/fesm2022/ngwr-switch.mjs.map +1 -1
  239. package/fesm2022/ngwr-table.mjs +824 -20
  240. package/fesm2022/ngwr-table.mjs.map +1 -1
  241. package/fesm2022/ngwr-tabs.mjs +9 -8
  242. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  243. package/fesm2022/ngwr-textarea.mjs +18 -50
  244. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  245. package/fesm2022/ngwr-theme.mjs +20 -5
  246. package/fesm2022/ngwr-theme.mjs.map +1 -1
  247. package/fesm2022/ngwr-tilt-card.mjs +27 -11
  248. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  249. package/fesm2022/ngwr-timeline.mjs +7 -7
  250. package/fesm2022/ngwr-timeline.mjs.map +1 -1
  251. package/fesm2022/ngwr-toast.mjs +10 -10
  252. package/fesm2022/ngwr-toast.mjs.map +1 -1
  253. package/fesm2022/ngwr-toolbar.mjs +4 -4
  254. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  255. package/fesm2022/ngwr-tree.mjs +280 -84
  256. package/fesm2022/ngwr-tree.mjs.map +1 -1
  257. package/fesm2022/ngwr-typewriter.mjs +10 -5
  258. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  259. package/fesm2022/ngwr-typography.mjs +4 -4
  260. package/fesm2022/ngwr-typography.mjs.map +1 -1
  261. package/fesm2022/ngwr-validators.mjs +1 -1
  262. package/fesm2022/ngwr-validators.mjs.map +1 -1
  263. package/fesm2022/ngwr-version.mjs +1 -1
  264. package/fesm2022/ngwr-version.mjs.map +1 -1
  265. package/fesm2022/ngwr-virtual-scroll.mjs +9 -7
  266. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  267. package/fesm2022/ngwr-waves.mjs +6 -5
  268. package/fesm2022/ngwr-waves.mjs.map +1 -1
  269. package/fesm2022/ngwr-window.mjs +16 -15
  270. package/fesm2022/ngwr-window.mjs.map +1 -1
  271. package/file-upload/styles/_index.scss +11 -11
  272. package/form/styles/_index.scss +4 -4
  273. package/gauge/styles/_index.scss +2 -2
  274. package/glitch-text/styles/_index.scss +1 -1
  275. package/gradient-text/styles/_index.scss +1 -1
  276. package/image-cropper/styles/_index.scss +5 -4
  277. package/input/styles/_index.scss +9 -9
  278. package/input-number/styles/_index.scss +1 -1
  279. package/input-otp/styles/_index.scss +5 -5
  280. package/keyboard/styles/_index.scss +5 -5
  281. package/knob/styles/_index.scss +6 -2
  282. package/layout/styles/_index.scss +12 -12
  283. package/lightbox/styles/_index.scss +10 -8
  284. package/line-chart/styles/_index.scss +5 -5
  285. package/list/styles/_index.scss +3 -3
  286. package/llms-full.txt +31 -5
  287. package/llms.txt +48 -32
  288. package/marquee/styles/_index.scss +1 -1
  289. package/mention/styles/_index.scss +4 -4
  290. package/meter-group/styles/_index.scss +4 -4
  291. package/overlay/styles/_index.scss +8 -0
  292. package/package.json +21 -9
  293. package/page-header/styles/_index.scss +4 -4
  294. package/pagination/styles/_index.scss +3 -3
  295. package/popconfirm/styles/_index.scss +3 -3
  296. package/popover/styles/_index.scss +5 -5
  297. package/progress/styles/_index.scss +1 -1
  298. package/pull-to-refresh/styles/_index.scss +38 -0
  299. package/radio/styles/_index.scss +4 -4
  300. package/rating/styles/_index.scss +1 -1
  301. package/result/styles/_index.scss +3 -3
  302. package/schematics/migrations/v9/index.js +71 -0
  303. package/schematics/migrations.json +5 -0
  304. package/schematics/ng-add/schema.json +1 -1
  305. package/schematics/use/symbol-map.json +13 -0
  306. package/segmented/styles/_index.scss +4 -4
  307. package/select/styles/_index.scss +53 -18
  308. package/shiny-text/styles/_index.scss +4 -4
  309. package/sidebar/styles/_index.scss +12 -12
  310. package/slider/styles/_index.scss +5 -5
  311. package/speed-dial/styles/_index.scss +22 -6
  312. package/splash-cursor/styles/_index.scss +1 -0
  313. package/splitter/styles/_index.scss +7 -4
  314. package/spotlight-card/styles/_index.scss +7 -7
  315. package/star-border/styles/_index.scss +3 -3
  316. package/statistic/styles/_index.scss +51 -4
  317. package/stepper/styles/_index.scss +6 -6
  318. package/styles/_typography.scss +4 -1
  319. package/styles.scss +2 -0
  320. package/switch/styles/_index.scss +4 -4
  321. package/table/styles/_index.scss +447 -17
  322. package/tabs/styles/_index.scss +3 -3
  323. package/textarea/styles/_index.scss +7 -7
  324. package/theme/styles/_colors.scss +27 -3
  325. package/tilt-card/styles/_index.scss +4 -4
  326. package/timeline/styles/_index.scss +7 -6
  327. package/toast/styles/_index.scss +11 -11
  328. package/toolbar/styles/_index.scss +4 -4
  329. package/tree/styles/_index.scss +45 -15
  330. package/types/ngwr-action-sheet.d.ts +75 -0
  331. package/types/ngwr-alert.d.ts +1 -1
  332. package/types/ngwr-anchor.d.ts +1 -1
  333. package/types/ngwr-avatar.d.ts +1 -1
  334. package/types/ngwr-back-top.d.ts +1 -1
  335. package/types/ngwr-badge.d.ts +4 -4
  336. package/types/ngwr-bar-chart.d.ts +1 -1
  337. package/types/ngwr-breadcrumbs.d.ts +1 -1
  338. package/types/ngwr-burger.d.ts +1 -1
  339. package/types/ngwr-button.d.ts +3 -3
  340. package/types/ngwr-calendar-heatmap.d.ts +1 -1
  341. package/types/ngwr-calendar.d.ts +1 -1
  342. package/types/ngwr-card.d.ts +1 -1
  343. package/types/ngwr-carousel.d.ts +1 -1
  344. package/types/ngwr-cascader.d.ts +27 -16
  345. package/types/ngwr-checkbox.d.ts +63 -43
  346. package/types/ngwr-clipboard.d.ts +1 -1
  347. package/types/ngwr-collapse.d.ts +3 -3
  348. package/types/ngwr-color-picker.d.ts +24 -19
  349. package/types/ngwr-command-palette.d.ts +1 -1
  350. package/types/ngwr-compare.d.ts +1 -1
  351. package/types/ngwr-context-menu.d.ts +25 -1
  352. package/types/ngwr-cookie.d.ts +7 -1
  353. package/types/ngwr-counter.d.ts +9 -2
  354. package/types/ngwr-date-picker.d.ts +36 -23
  355. package/types/ngwr-density.d.ts +1 -1
  356. package/types/ngwr-descriptions.d.ts +1 -1
  357. package/types/ngwr-dialog.d.ts +1 -1
  358. package/types/ngwr-directives.d.ts +1 -0
  359. package/types/ngwr-divider.d.ts +2 -2
  360. package/types/ngwr-donut-chart.d.ts +1 -1
  361. package/types/ngwr-drag-drop.d.ts +1 -1
  362. package/types/ngwr-drawer.d.ts +1 -1
  363. package/types/ngwr-dropdown.d.ts +1 -1
  364. package/types/ngwr-empty.d.ts +1 -1
  365. package/types/ngwr-file-upload.d.ts +28 -17
  366. package/types/ngwr-form.d.ts +2 -2
  367. package/types/ngwr-gauge.d.ts +1 -1
  368. package/types/ngwr-hotkey.d.ts +1 -1
  369. package/types/ngwr-i18n.d.ts +1 -1
  370. package/types/ngwr-icon-adapters-lucide.d.ts +5 -3
  371. package/types/ngwr-icon.d.ts +1 -1
  372. package/types/ngwr-image-cropper.d.ts +1 -1
  373. package/types/ngwr-input-number.d.ts +25 -19
  374. package/types/ngwr-input-otp.d.ts +23 -17
  375. package/types/ngwr-input.d.ts +2 -2
  376. package/types/ngwr-keyboard.d.ts +1 -1
  377. package/types/ngwr-knob.d.ts +24 -19
  378. package/types/ngwr-layout.d.ts +1 -1
  379. package/types/ngwr-lightbox.d.ts +1 -1
  380. package/types/ngwr-line-chart.d.ts +1 -1
  381. package/types/ngwr-list.d.ts +1 -1
  382. package/types/ngwr-loading-bar.d.ts +1 -1
  383. package/types/ngwr-marquee.d.ts +1 -1
  384. package/types/ngwr-media.d.ts +1 -1
  385. package/types/ngwr-mention.d.ts +1 -1
  386. package/types/ngwr-meta.d.ts +1 -1
  387. package/types/ngwr-meter-group.d.ts +1 -1
  388. package/types/ngwr-page-header.d.ts +1 -1
  389. package/types/ngwr-pagination.d.ts +1 -1
  390. package/types/ngwr-platform.d.ts +93 -2
  391. package/types/ngwr-popconfirm.d.ts +3 -3
  392. package/types/ngwr-progress.d.ts +2 -2
  393. package/types/ngwr-pull-to-refresh.d.ts +69 -0
  394. package/types/ngwr-qr.d.ts +1 -1
  395. package/types/ngwr-radio.d.ts +25 -22
  396. package/types/ngwr-rating.d.ts +28 -20
  397. package/types/ngwr-result.d.ts +1 -1
  398. package/types/ngwr-rotating-text.d.ts +1 -0
  399. package/types/ngwr-scroll.d.ts +1 -1
  400. package/types/ngwr-segmented.d.ts +1 -1
  401. package/types/ngwr-select.d.ts +93 -26
  402. package/types/ngwr-sidebar.d.ts +1 -1
  403. package/types/ngwr-skeleton.d.ts +2 -2
  404. package/types/ngwr-slider.d.ts +35 -21
  405. package/types/ngwr-sparkline.d.ts +1 -1
  406. package/types/ngwr-speed-dial.d.ts +8 -2
  407. package/types/ngwr-spinner.d.ts +1 -1
  408. package/types/ngwr-splitter.d.ts +1 -1
  409. package/types/ngwr-squircle.d.ts +1 -1
  410. package/types/ngwr-statistic.d.ts +40 -5
  411. package/types/ngwr-stepper.d.ts +2 -2
  412. package/types/ngwr-storage.d.ts +1 -1
  413. package/types/ngwr-switch.d.ts +20 -16
  414. package/types/ngwr-table.d.ts +417 -6
  415. package/types/ngwr-tabs.d.ts +1 -1
  416. package/types/ngwr-textarea.d.ts +21 -18
  417. package/types/ngwr-theme.d.ts +7 -2
  418. package/types/ngwr-tilt-card.d.ts +3 -0
  419. package/types/ngwr-timeline.d.ts +1 -1
  420. package/types/ngwr-toast.d.ts +1 -1
  421. package/types/ngwr-toolbar.d.ts +1 -1
  422. package/types/ngwr-tree.d.ts +100 -19
  423. package/types/ngwr-typography.d.ts +1 -1
  424. package/types/ngwr-validators.d.ts +1 -1
  425. package/types/ngwr-version.d.ts +1 -1
  426. package/types/ngwr-virtual-scroll.d.ts +1 -1
  427. package/types/ngwr-window.d.ts +1 -1
  428. package/typography/styles/_index.scss +11 -11
  429. package/virtual-scroll/styles/_index.scss +1 -1
  430. package/waves/styles/_index.scss +1 -1
  431. package/window/styles/_index.scss +18 -18
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-form.mjs","sources":["../../../projects/lib/form/form-item.ts","../../../projects/lib/form/form-field.ts","../../../projects/lib/form/form-field.html","../../../projects/lib/form/ngwr-form.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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\n/**\n * Wraps a label + control + error message into a single field row.\n *\n * Toggle `hasError` to apply error styling to the projected label and\n * any descendant input / textarea / checkbox.\n *\n * @example\n * ```html\n * <wr-form-item [hasError]=\"form.controls.email.invalid\">\n * <label>Email</label>\n * <wr-input formControlName=\"email\" />\n * <wr-form-error>Invalid email</wr-form-error>\n * </wr-form-item>\n * ```\n *\n * @see https://ngwr.dev/components/form\n */\n@Component({\n selector: 'wr-form-item',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n})\nexport class WrFormItem {\n /**\n * When `true`, applies error coloring to the projected label and inputs.\n *\n * @default false\n */\n readonly hasError = input(false, { transform: coerceBooleanProperty });\n\n protected readonly classes = computed(() => {\n const parts = ['wr-form-item'];\n if (this.hasError()) parts.push('wr-form-item--error');\n return parts.join(' ');\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, contentChild, input } from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\nlet uid = 0;\n\n/**\n * Wraps a label + control + hint + error messages into a single block —\n * the layout primitive every form ends up reinventing.\n *\n * - Auto-binds `label[for]` to the projected control via a generated id\n * (or use the form-control's `[id]` if you set one).\n * - Reads the projected control's `NgControl` to surface validation\n * errors only when the control has been touched / submitted.\n * - Optional `[required]` / `[optional]` markers next to the label.\n *\n * @example\n * ```html\n * <wr-form-field label=\"Email\" hint=\"We'll never share it.\">\n * <input wrInput [formControl]=\"email\" type=\"email\" />\n * <wr-form-error key=\"required\">Email is required.</wr-form-error>\n * <wr-form-error key=\"email\">Not a valid email.</wr-form-error>\n * </wr-form-field>\n * ```\n *\n * @see https://ngwr.dev/components/form-field\n */\n@Component({\n selector: 'wr-form-field',\n templateUrl: './form-field.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n})\nexport class WrFormField {\n /** Label text shown above the control. */\n readonly label = input<string>('');\n\n /** Hint text shown below the control. Hidden when an error is visible. */\n readonly hint = input<string>('');\n\n /** Show a `*` next to the label. @default false */\n readonly required = input(false, { transform: coerceBooleanProperty });\n\n /** Show `(optional)` next to the label. Mutually exclusive with `required`. @default false */\n readonly optional = input(false, { transform: coerceBooleanProperty });\n\n /** Force a specific id on the label's `for` attribute. Auto-generated otherwise. */\n readonly controlId = input<string>(`wr-form-field-${++uid}`);\n\n /** Projected `NgControl` — used to read touched / dirty / errors. */\n protected readonly ngControl = contentChild(NgControl);\n\n protected readonly errors = computed(() => {\n const c = this.ngControl();\n if (!c) return null;\n if (!c.touched && !c.dirty) return null;\n return c.errors;\n });\n\n protected readonly hasError = computed(() => {\n const errs = this.errors();\n return !!errs && Object.keys(errs).length > 0;\n });\n\n protected readonly classes = computed(() => {\n const parts = ['wr-form-field'];\n if (this.hasError()) parts.push('wr-form-field--invalid');\n if (this.required()) parts.push('wr-form-field--required');\n return parts.join(' ');\n });\n}\n\n/**\n * One error message tied to a validator key. Renders only when the\n * parent form-field has a matching error in `control.errors`.\n *\n * @example\n * ```html\n * <wr-form-error key=\"required\">This field is required.</wr-form-error>\n * <wr-form-error key=\"email\">That doesn't look right.</wr-form-error>\n * ```\n */\n@Component({\n selector: 'wr-form-error',\n template: `<ng-content />`,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-form-error wr-form-field__error',\n role: 'alert',\n '[attr.data-key]': 'key() ?? null',\n },\n})\nexport class WrFormError {\n /**\n * Validator key this message corresponds to (e.g. `'required'`).\n * Optional — without a key the message always renders, which is the\n * plain inline-error usage inside `<wr-form-item>`.\n */\n readonly key = input<string>();\n}\n","@if (label()) {\n <label class=\"wr-form-field__label\" [attr.for]=\"controlId()\">\n {{ label() }}\n @if (required()) {\n <span class=\"wr-form-field__required\" aria-hidden=\"true\">*</span>\n } @else if (optional()) {\n <span class=\"wr-form-field__optional\">(optional)</span>\n }\n </label>\n}\n\n<div class=\"wr-form-field__control\"><ng-content /></div>\n\n@if (hasError()) {\n <div class=\"wr-form-field__errors\">\n <ng-content select=\"wr-form-error\" />\n </div>\n} @else if (hint()) {\n <small class=\"wr-form-field__hint\">{{ hint() }}</small>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAKH;;;;;;;;;;;;;;;;AAgBG;MAOU,UAAU,CAAA;AACrB;;;;AAIG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;AAEnD,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAK;AACzC,QAAA,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC;QAC9B,IAAI,IAAI,CAAC,QAAQ,EAAE;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC;AACtD,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IACxB,CAAC;gFAAC;uGAZS,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,qQAJX,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAIf,UAAU,EAAA,UAAA,EAAA,CAAA;kBANtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,gBAAgB;oBAC1B,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE,EAAE,SAAS,E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D;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-form.mjs","sources":["../../../projects/lib/form/form-item.ts","../../../projects/lib/form/form-field.ts","../../../projects/lib/form/form-field.html","../../../projects/lib/form/ngwr-form.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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\n/**\n * Wraps a label + control + error message into a single field row.\n *\n * Toggle `hasError` to apply error styling to the projected label and\n * any descendant input / textarea / checkbox.\n *\n * @example\n * ```html\n * <wr-form-item [hasError]=\"form.controls.email.invalid\">\n * <label>Email</label>\n * <wr-input formControlName=\"email\" />\n * <wr-form-error>Invalid email</wr-form-error>\n * </wr-form-item>\n * ```\n *\n * @see https://ngwr.dev/reference/components/form\n */\n@Component({\n selector: 'wr-form-item',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n})\nexport class WrFormItem {\n /**\n * When `true`, applies error coloring to the projected label and inputs.\n *\n * @default false\n */\n readonly hasError = input(false, { transform: coerceBooleanProperty });\n\n protected readonly classes = computed(() => {\n const parts = ['wr-form-item'];\n if (this.hasError()) parts.push('wr-form-item--error');\n return parts.join(' ');\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, contentChild, input } from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\nlet uid = 0;\n\n/**\n * Wraps a label + control + hint + error messages into a single block —\n * the layout primitive every form ends up reinventing.\n *\n * - Auto-binds `label[for]` to the projected control via a generated id\n * (or use the form-control's `[id]` if you set one).\n * - Reads the projected control's `NgControl` to surface validation\n * errors only when the control has been touched / submitted.\n * - Optional `[required]` / `[optional]` markers next to the label.\n *\n * @example\n * ```html\n * <wr-form-field label=\"Email\" hint=\"We'll never share it.\">\n * <input wrInput [formControl]=\"email\" type=\"email\" />\n * <wr-form-error key=\"required\">Email is required.</wr-form-error>\n * <wr-form-error key=\"email\">Not a valid email.</wr-form-error>\n * </wr-form-field>\n * ```\n *\n * @see https://ngwr.dev/reference/components/form-field\n */\n@Component({\n selector: 'wr-form-field',\n templateUrl: './form-field.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n})\nexport class WrFormField {\n /** Label text shown above the control. */\n readonly label = input<string>('');\n\n /** Hint text shown below the control. Hidden when an error is visible. */\n readonly hint = input<string>('');\n\n /** Show a `*` next to the label. @default false */\n readonly required = input(false, { transform: coerceBooleanProperty });\n\n /** Show `(optional)` next to the label. Mutually exclusive with `required`. @default false */\n readonly optional = input(false, { transform: coerceBooleanProperty });\n\n /** Force a specific id on the label's `for` attribute. Auto-generated otherwise. */\n readonly controlId = input<string>(`wr-form-field-${++uid}`);\n\n /** Projected `NgControl` — used to read touched / dirty / errors. */\n protected readonly ngControl = contentChild(NgControl);\n\n protected readonly errors = computed(() => {\n const c = this.ngControl();\n if (!c) return null;\n if (!c.touched && !c.dirty) return null;\n return c.errors;\n });\n\n protected readonly hasError = computed(() => {\n const errs = this.errors();\n return !!errs && Object.keys(errs).length > 0;\n });\n\n protected readonly classes = computed(() => {\n const parts = ['wr-form-field'];\n if (this.hasError()) parts.push('wr-form-field--invalid');\n if (this.required()) parts.push('wr-form-field--required');\n return parts.join(' ');\n });\n}\n\n/**\n * One error message tied to a validator key. Renders only when the\n * parent form-field has a matching error in `control.errors`.\n *\n * @example\n * ```html\n * <wr-form-error key=\"required\">This field is required.</wr-form-error>\n * <wr-form-error key=\"email\">That doesn't look right.</wr-form-error>\n * ```\n */\n@Component({\n selector: 'wr-form-error',\n template: `<ng-content />`,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-form-error wr-form-field__error',\n role: 'alert',\n '[attr.data-key]': 'key() ?? null',\n },\n})\nexport class WrFormError {\n /**\n * Validator key this message corresponds to (e.g. `'required'`).\n * Optional — without a key the message always renders, which is the\n * plain inline-error usage inside `<wr-form-item>`.\n */\n readonly key = input<string>();\n}\n","@if (label()) {\n <label class=\"wr-form-field__label\" [attr.for]=\"controlId()\">\n {{ label() }}\n @if (required()) {\n <span class=\"wr-form-field__required\" aria-hidden=\"true\">*</span>\n } @else if (optional()) {\n <span class=\"wr-form-field__optional\">(optional)</span>\n }\n </label>\n}\n\n<div class=\"wr-form-field__control\"><ng-content /></div>\n\n@if (hasError()) {\n <div class=\"wr-form-field__errors\">\n <ng-content select=\"wr-form-error\" />\n </div>\n} @else if (hint()) {\n <small class=\"wr-form-field__hint\">{{ hint() }}</small>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAKH;;;;;;;;;;;;;;;;AAgBG;MAOU,UAAU,CAAA;AACrB;;;;AAIG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;AAEnD,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAK;AACzC,QAAA,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC;QAC9B,IAAI,IAAI,CAAC,QAAQ,EAAE;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC;AACtD,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IACxB,CAAC;gFAAC;uGAZS,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,qQAJX,gBAAgB,EAAA,QAAA,E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C,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;oBAC1B,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,oCAAoC;AAC3C,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,iBAAiB,EAAE,eAAe;AACnC,qBAAA;AACF,iBAAA;;;AElGD;;AAEG;;;;"}
@@ -82,7 +82,8 @@ class WrFuzzyText {
82
82
  glitchDuration = input(200, { ...(ngDevMode ? { debugName: "glitchDuration" } : /* istanbul ignore next */ {}), transform: numAttr(200) });
83
83
  /** Extra pixels between glyphs. @default 0 */
84
84
  letterSpacing = input(0, { ...(ngDevMode ? { debugName: "letterSpacing" } : /* istanbul ignore next */ {}), transform: numAttr(0) });
85
- canvasRef = viewChild.required('canvas');
85
+ canvasRef = viewChild.required('canvas', /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "canvasRef" }] : /* istanbul ignore next */ []));
86
87
  destroyRef = inject(DestroyRef);
87
88
  isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
88
89
  platform = inject(WrPlatform);
@@ -353,10 +354,10 @@ class WrFuzzyText {
353
354
  canvas.removeEventListener('click', onClick);
354
355
  };
355
356
  }
356
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrFuzzyText, deps: [], target: i0.ɵɵFactoryTarget.Component });
357
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.4", type: WrFuzzyText, isStandalone: true, selector: "wr-fuzzy-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, fontSize: { classPropertyName: "fontSize", publicName: "fontSize", isSignal: true, isRequired: false, transformFunction: null }, fontWeight: { classPropertyName: "fontWeight", publicName: "fontWeight", isSignal: true, isRequired: false, transformFunction: null }, fontFamily: { classPropertyName: "fontFamily", publicName: "fontFamily", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, gradient: { classPropertyName: "gradient", publicName: "gradient", isSignal: true, isRequired: false, transformFunction: null }, enableHover: { classPropertyName: "enableHover", publicName: "enableHover", isSignal: true, isRequired: false, transformFunction: null }, baseIntensity: { classPropertyName: "baseIntensity", publicName: "baseIntensity", isSignal: true, isRequired: false, transformFunction: null }, hoverIntensity: { classPropertyName: "hoverIntensity", publicName: "hoverIntensity", isSignal: true, isRequired: false, transformFunction: null }, fuzzRange: { classPropertyName: "fuzzRange", publicName: "fuzzRange", isSignal: true, isRequired: false, transformFunction: null }, fps: { classPropertyName: "fps", publicName: "fps", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, transitionDuration: { classPropertyName: "transitionDuration", publicName: "transitionDuration", isSignal: true, isRequired: false, transformFunction: null }, clickEffect: { classPropertyName: "clickEffect", publicName: "clickEffect", isSignal: true, isRequired: false, transformFunction: null }, glitchMode: { classPropertyName: "glitchMode", publicName: "glitchMode", isSignal: true, isRequired: false, transformFunction: null }, glitchInterval: { classPropertyName: "glitchInterval", publicName: "glitchInterval", isSignal: true, isRequired: false, transformFunction: null }, glitchDuration: { classPropertyName: "glitchDuration", publicName: "glitchDuration", isSignal: true, isRequired: false, transformFunction: null }, letterSpacing: { classPropertyName: "letterSpacing", publicName: "letterSpacing", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "color: var(--wr-color-dark)", classAttribute: "wr-fuzzy-text" }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: '<canvas #canvas></canvas>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
357
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrFuzzyText, deps: [], target: i0.ɵɵFactoryTarget.Component });
358
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.0", type: WrFuzzyText, isStandalone: true, selector: "wr-fuzzy-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, fontSize: { classPropertyName: "fontSize", publicName: "fontSize", isSignal: true, isRequired: false, transformFunction: null }, fontWeight: { classPropertyName: "fontWeight", publicName: "fontWeight", isSignal: true, isRequired: false, transformFunction: null }, fontFamily: { classPropertyName: "fontFamily", publicName: "fontFamily", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, gradient: { classPropertyName: "gradient", publicName: "gradient", isSignal: true, isRequired: false, transformFunction: null }, enableHover: { classPropertyName: "enableHover", publicName: "enableHover", isSignal: true, isRequired: false, transformFunction: null }, baseIntensity: { classPropertyName: "baseIntensity", publicName: "baseIntensity", isSignal: true, isRequired: false, transformFunction: null }, hoverIntensity: { classPropertyName: "hoverIntensity", publicName: "hoverIntensity", isSignal: true, isRequired: false, transformFunction: null }, fuzzRange: { classPropertyName: "fuzzRange", publicName: "fuzzRange", isSignal: true, isRequired: false, transformFunction: null }, fps: { classPropertyName: "fps", publicName: "fps", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, transitionDuration: { classPropertyName: "transitionDuration", publicName: "transitionDuration", isSignal: true, isRequired: false, transformFunction: null }, clickEffect: { classPropertyName: "clickEffect", publicName: "clickEffect", isSignal: true, isRequired: false, transformFunction: null }, glitchMode: { classPropertyName: "glitchMode", publicName: "glitchMode", isSignal: true, isRequired: false, transformFunction: null }, glitchInterval: { classPropertyName: "glitchInterval", publicName: "glitchInterval", isSignal: true, isRequired: false, transformFunction: null }, glitchDuration: { classPropertyName: "glitchDuration", publicName: "glitchDuration", isSignal: true, isRequired: false, transformFunction: null }, letterSpacing: { classPropertyName: "letterSpacing", publicName: "letterSpacing", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "color: var(--wr-color-dark)", classAttribute: "wr-fuzzy-text" }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: '<canvas #canvas></canvas>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
358
359
  }
359
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrFuzzyText, decorators: [{
360
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrFuzzyText, decorators: [{
360
361
  type: Component,
361
362
  args: [{
362
363
  selector: 'wr-fuzzy-text',
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-fuzzy-text.mjs","sources":["../../../projects/lib/fuzzy-text/fuzzy-text.ts","../../../projects/lib/fuzzy-text/ngwr-fuzzy-text.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 * Angular adaptation of the FuzzyText effect by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/text-animations/fuzzy-text\n *\n * Renders text to an offscreen 2D canvas, then redraws it onto the\n * visible canvas one row (or column) at a time with random horizontal /\n * vertical offsets. Intensity reacts to hover / click / glitch state.\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport type { ElementRef } from '@angular/core';\nimport {\n Component,\n DestroyRef,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n effect,\n inject,\n input,\n viewChild,\n} from '@angular/core';\n\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\nimport type { WrFuzzyTextDirection } from './interfaces';\n\n/**\n * Canvas-rendered \"fuzzy\" text — each row/column of glyphs is offset by\n * a random amount per frame, giving the text a TV-static or motion-blur\n * appearance. Intensity ramps up on hover, click, and during periodic\n * glitch bursts (configurable).\n *\n * @example\n * ```html\n * <wr-fuzzy-text text=\"404\" />\n * <wr-fuzzy-text\n * text=\"HELLO\"\n * color=\"#0ea5e9\"\n * [fuzzRange]=\"50\"\n * [hoverIntensity]=\"0.8\"\n * [glitchMode]=\"true\"\n * />\n * ```\n *\n * @see https://www.reactbits.dev/text-animations/fuzzy-text\n */\n@Component({\n selector: 'wr-fuzzy-text',\n template: '<canvas #canvas></canvas>',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-fuzzy-text', style: 'color: var(--wr-color-dark)' },\n})\nexport class WrFuzzyText {\n /** Text to render. */\n readonly text = input.required<string>();\n\n /** Font size as CSS length (`'4rem'`, `'72px'`, …) or px number. @default 'clamp(2rem, 10vw, 10rem)' */\n readonly fontSize = input<string | number>('clamp(2rem, 10vw, 10rem)');\n\n /** Font weight. @default 900 */\n readonly fontWeight = input<number | string>(900);\n\n /** Font family. `'inherit'` reads the canvas's computed style. @default 'inherit' */\n readonly fontFamily = input('inherit');\n\n /** Text colour. `'inherit'` reads the canvas's computed style. Ignored if `[gradient]` is set. @default 'inherit' */\n readonly color = input('inherit');\n\n /** Optional horizontal gradient stops. */\n readonly gradient = input<readonly string[] | null>(null);\n\n /** Enable hover / touch reactivity. @default true */\n readonly enableHover = input(true, { transform: coerceBooleanProperty });\n\n /** Base intensity (0..1) when idle. @default 0.18 */\n readonly baseIntensity = input(0.18, { transform: numAttr(0.18) });\n\n /** Intensity (0..1) while the pointer hovers the text. @default 0.5 */\n readonly hoverIntensity = input(0.5, { transform: numAttr(0.5) });\n\n /** Max pixel displacement per row/column at intensity 1. @default 30 */\n readonly fuzzRange = input(30, { transform: numAttr(30) });\n\n /** Frame rate cap. @default 60 */\n readonly fps = input(60, { transform: numAttr(60) });\n\n /** Fuzz direction. @default 'horizontal' */\n readonly direction = input<WrFuzzyTextDirection>('horizontal');\n\n /** Ms to ease intensity toward target. `0` snaps. @default 0 */\n readonly transitionDuration = input(0, { transform: numAttr(0) });\n\n /** Spike to full intensity briefly on click. @default false */\n readonly clickEffect = input(false, { transform: coerceBooleanProperty });\n\n /** Periodic \"glitch\" bursts at full intensity. @default false */\n readonly glitchMode = input(false, { transform: coerceBooleanProperty });\n\n /** Ms between glitch bursts. @default 2000 */\n readonly glitchInterval = input(2000, { transform: numAttr(2000) });\n\n /** Ms a glitch burst lasts. @default 200 */\n readonly glitchDuration = input(200, { transform: numAttr(200) });\n\n /** Extra pixels between glyphs. @default 0 */\n readonly letterSpacing = input(0, { transform: numAttr(0) });\n\n private readonly canvasRef = viewChild.required<ElementRef<HTMLCanvasElement>>('canvas');\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly platform = inject(WrPlatform);\n\n private teardown: (() => void) | undefined;\n\n constructor() {\n if (!this.isBrowser) return;\n\n afterNextRender(() => {\n void this.init();\n });\n\n // Re-init whenever any input that affects the offscreen rendering changes.\n effect(() => {\n this.text();\n this.fontSize();\n this.fontWeight();\n this.fontFamily();\n this.color();\n this.gradient();\n this.letterSpacing();\n this.direction();\n this.fuzzRange();\n this.fps();\n this.glitchMode();\n this.glitchInterval();\n this.glitchDuration();\n // Skip if we haven't booted yet.\n if (!this.teardown) return;\n this.teardown();\n this.teardown = undefined;\n queueMicrotask(() => {\n void this.init();\n });\n });\n\n this.destroyRef.onDestroy(() => this.teardown?.());\n }\n\n // Init / loop\n\n private async init(): Promise<void> {\n const canvas = this.canvasRef().nativeElement;\n const ctx = canvas.getContext('2d');\n if (!ctx) return;\n\n const fontFamily =\n this.fontFamily() === 'inherit' ? window.getComputedStyle(canvas).fontFamily || 'sans-serif' : this.fontFamily();\n const color = this.color() === 'inherit' ? window.getComputedStyle(canvas).color || '#fff' : this.color();\n const fontSize = this.fontSize();\n const fontSizeStr = typeof fontSize === 'number' ? `${fontSize}px` : fontSize;\n const fontWeight = this.fontWeight();\n const fontString = `${fontWeight} ${fontSizeStr} ${fontFamily}`;\n\n try {\n await document.fonts.load(fontString);\n } catch {\n await document.fonts.ready;\n }\n\n // Numeric font size for buffer maths.\n let numericFontSize: number;\n if (typeof fontSize === 'number') {\n numericFontSize = fontSize;\n } else {\n const tmp = document.createElement('span');\n tmp.style.fontSize = fontSize;\n document.body.appendChild(tmp);\n numericFontSize = Number.parseFloat(window.getComputedStyle(tmp).fontSize);\n document.body.removeChild(tmp);\n }\n\n const text = this.text();\n const letterSpacing = this.letterSpacing();\n const fuzzRange = this.fuzzRange();\n const direction = this.direction();\n\n // Offscreen canvas with the laid-out text.\n const offscreen = document.createElement('canvas');\n const offCtx = offscreen.getContext('2d');\n if (!offCtx) return;\n offCtx.font = fontString;\n offCtx.textBaseline = 'alphabetic';\n\n let totalWidth = 0;\n if (letterSpacing !== 0) {\n for (const ch of text) totalWidth += offCtx.measureText(ch).width + letterSpacing;\n totalWidth -= letterSpacing;\n } else {\n totalWidth = offCtx.measureText(text).width;\n }\n const m = offCtx.measureText(text);\n const actualLeft = m.actualBoundingBoxLeft ?? 0;\n const actualRight = letterSpacing !== 0 ? totalWidth : (m.actualBoundingBoxRight ?? m.width);\n const actualAscent = m.actualBoundingBoxAscent ?? numericFontSize;\n const actualDescent = m.actualBoundingBoxDescent ?? numericFontSize * 0.2;\n const textBoundingWidth = Math.ceil(letterSpacing !== 0 ? totalWidth : actualLeft + actualRight);\n const tightHeight = Math.ceil(actualAscent + actualDescent);\n\n const extraWidthBuffer = 10;\n const offscreenWidth = textBoundingWidth + extraWidthBuffer;\n offscreen.width = offscreenWidth;\n offscreen.height = tightHeight;\n const xOffset = extraWidthBuffer / 2;\n\n offCtx.font = fontString;\n offCtx.textBaseline = 'alphabetic';\n\n const gradient = this.gradient();\n if (gradient && gradient.length >= 2) {\n const g = offCtx.createLinearGradient(0, 0, offscreenWidth, 0);\n gradient.forEach((c, i) => g.addColorStop(i / (gradient.length - 1), c));\n offCtx.fillStyle = g;\n } else {\n offCtx.fillStyle = color;\n }\n\n if (letterSpacing !== 0) {\n let xPos = xOffset;\n for (const ch of text) {\n offCtx.fillText(ch, xPos, actualAscent);\n xPos += offCtx.measureText(ch).width + letterSpacing;\n }\n } else {\n offCtx.fillText(text, xOffset - actualLeft, actualAscent);\n }\n\n // Size the visible canvas, leaving room for the max horizontal fuzz.\n const horizontalMargin = fuzzRange + 20;\n const verticalMargin = 0;\n canvas.width = offscreenWidth + horizontalMargin * 2;\n canvas.height = tightHeight + verticalMargin * 2;\n ctx.translate(horizontalMargin, verticalMargin);\n\n const interactiveLeft = horizontalMargin + xOffset;\n const interactiveTop = verticalMargin;\n const interactiveRight = interactiveLeft + textBoundingWidth;\n const interactiveBottom = interactiveTop + tightHeight;\n\n // Reduced motion: paint the text once, clean — no fuzz loop, no\n // glitch bursts, no pointer reactivity. Teardown must still be set\n // so the re-init effect keeps redrawing on input changes.\n if (this.platform.prefersReducedMotion()) {\n ctx.drawImage(offscreen, 0, 0);\n this.teardown = (): void => undefined;\n return;\n }\n\n let isHovering = false;\n let isClicking = false;\n let isGlitching = false;\n let currentIntensity = this.baseIntensity();\n let targetIntensity = currentIntensity;\n let lastFrame = 0;\n const frameDuration = 1000 / this.fps();\n\n let rafId = 0;\n let glitchOnTimer: ReturnType<typeof setTimeout> | undefined;\n let glitchOffTimer: ReturnType<typeof setTimeout> | undefined;\n let clickTimer: ReturnType<typeof setTimeout> | undefined;\n\n const startGlitchLoop = (): void => {\n if (!this.glitchMode()) return;\n glitchOnTimer = setTimeout(() => {\n isGlitching = true;\n glitchOffTimer = setTimeout(() => {\n isGlitching = false;\n startGlitchLoop();\n }, this.glitchDuration());\n }, this.glitchInterval());\n };\n if (this.glitchMode()) startGlitchLoop();\n\n const run = (ts: number): void => {\n if (ts - lastFrame < frameDuration) {\n rafId = requestAnimationFrame(run);\n return;\n }\n lastFrame = ts;\n\n ctx.clearRect(\n -fuzzRange - 20,\n -fuzzRange - 10,\n offscreenWidth + 2 * (fuzzRange + 20),\n tightHeight + 2 * (fuzzRange + 10)\n );\n\n if (isClicking) targetIntensity = 1;\n else if (isGlitching) targetIntensity = 1;\n else if (isHovering) targetIntensity = this.hoverIntensity();\n else targetIntensity = this.baseIntensity();\n\n const td = this.transitionDuration();\n if (td > 0) {\n const step = 1 / (td / frameDuration);\n if (currentIntensity < targetIntensity) currentIntensity = Math.min(currentIntensity + step, targetIntensity);\n else if (currentIntensity > targetIntensity)\n currentIntensity = Math.max(currentIntensity - step, targetIntensity);\n } else {\n currentIntensity = targetIntensity;\n }\n\n if (direction === 'horizontal') {\n for (let j = 0; j < tightHeight; j++) {\n const dx = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange);\n ctx.drawImage(offscreen, 0, j, offscreenWidth, 1, dx, j, offscreenWidth, 1);\n }\n } else if (direction === 'vertical') {\n for (let i = 0; i < offscreenWidth; i++) {\n const dy = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange);\n ctx.drawImage(offscreen, i, 0, 1, tightHeight, i, dy, 1, tightHeight);\n }\n } else {\n // both: horizontal pass then vertical pass on the result\n for (let j = 0; j < tightHeight; j++) {\n const dx = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange);\n ctx.drawImage(offscreen, 0, j, offscreenWidth, 1, dx, j, offscreenWidth, 1);\n }\n const w = offscreenWidth + fuzzRange;\n const h = tightHeight + fuzzRange;\n const data = ctx.getImageData(0, 0, w, h);\n ctx.clearRect(\n -fuzzRange - 20,\n -fuzzRange - 10,\n offscreenWidth + 2 * (fuzzRange + 20),\n tightHeight + 2 * (fuzzRange + 10)\n );\n ctx.putImageData(data, 0, 0);\n for (let i = 0; i < w; i++) {\n const dy = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange * 0.5);\n const col = ctx.getImageData(i, 0, 1, h);\n ctx.clearRect(i, -fuzzRange, 1, tightHeight + 2 * fuzzRange);\n ctx.putImageData(col, i, dy);\n }\n }\n\n rafId = requestAnimationFrame(run);\n };\n rafId = requestAnimationFrame(run);\n\n const isInsideText = (x: number, y: number): boolean =>\n x >= interactiveLeft && x <= interactiveRight && y >= interactiveTop && y <= interactiveBottom;\n\n const onMouseMove = (e: MouseEvent): void => {\n if (!this.enableHover()) return;\n const rect = canvas.getBoundingClientRect();\n isHovering = isInsideText(e.clientX - rect.left, e.clientY - rect.top);\n };\n const onMouseLeave = (): void => {\n isHovering = false;\n };\n const onTouchMove = (e: TouchEvent): void => {\n if (!this.enableHover()) return;\n e.preventDefault();\n const rect = canvas.getBoundingClientRect();\n const t = e.touches[0];\n isHovering = isInsideText(t.clientX - rect.left, t.clientY - rect.top);\n };\n const onTouchEnd = (): void => {\n isHovering = false;\n };\n const onClick = (): void => {\n if (!this.clickEffect()) return;\n isClicking = true;\n clearTimeout(clickTimer);\n clickTimer = setTimeout(() => {\n isClicking = false;\n }, 150);\n };\n\n if (this.enableHover()) {\n canvas.addEventListener('mousemove', onMouseMove);\n canvas.addEventListener('mouseleave', onMouseLeave);\n canvas.addEventListener('touchmove', onTouchMove, { passive: false });\n canvas.addEventListener('touchend', onTouchEnd);\n }\n if (this.clickEffect()) canvas.addEventListener('click', onClick);\n\n this.teardown = (): void => {\n cancelAnimationFrame(rafId);\n clearTimeout(glitchOnTimer);\n clearTimeout(glitchOffTimer);\n clearTimeout(clickTimer);\n canvas.removeEventListener('mousemove', onMouseMove);\n canvas.removeEventListener('mouseleave', onMouseLeave);\n canvas.removeEventListener('touchmove', onTouchMove);\n canvas.removeEventListener('touchend', onTouchEnd);\n canvas.removeEventListener('click', onClick);\n };\n }\n}\n\nexport type { WrFuzzyTextDirection } from './interfaces';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;AAYG;AAsBH;;;;;;;;;;;;;;;;;;;AAmBG;MAOU,WAAW,CAAA;;IAEb,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAAU;;IAG/B,QAAQ,GAAG,KAAK,C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;;;;"}
1
+ {"version":3,"file":"ngwr-fuzzy-text.mjs","sources":["../../../projects/lib/fuzzy-text/fuzzy-text.ts","../../../projects/lib/fuzzy-text/ngwr-fuzzy-text.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 * Angular adaptation of the FuzzyText effect by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/text-animations/fuzzy-text\n *\n * Renders text to an offscreen 2D canvas, then redraws it onto the\n * visible canvas one row (or column) at a time with random horizontal /\n * vertical offsets. Intensity reacts to hover / click / glitch state.\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport type { ElementRef } from '@angular/core';\nimport {\n Component,\n DestroyRef,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n effect,\n inject,\n input,\n viewChild,\n} from '@angular/core';\n\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\nimport type { WrFuzzyTextDirection } from './interfaces';\n\n/**\n * Canvas-rendered \"fuzzy\" text — each row/column of glyphs is offset by\n * a random amount per frame, giving the text a TV-static or motion-blur\n * appearance. Intensity ramps up on hover, click, and during periodic\n * glitch bursts (configurable).\n *\n * @example\n * ```html\n * <wr-fuzzy-text text=\"404\" />\n * <wr-fuzzy-text\n * text=\"HELLO\"\n * color=\"#0ea5e9\"\n * [fuzzRange]=\"50\"\n * [hoverIntensity]=\"0.8\"\n * [glitchMode]=\"true\"\n * />\n * ```\n *\n * @see https://www.reactbits.dev/text-animations/fuzzy-text\n */\n@Component({\n selector: 'wr-fuzzy-text',\n template: '<canvas #canvas></canvas>',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-fuzzy-text', style: 'color: var(--wr-color-dark)' },\n})\nexport class WrFuzzyText {\n /** Text to render. */\n readonly text = input.required<string>();\n\n /** Font size as CSS length (`'4rem'`, `'72px'`, …) or px number. @default 'clamp(2rem, 10vw, 10rem)' */\n readonly fontSize = input<string | number>('clamp(2rem, 10vw, 10rem)');\n\n /** Font weight. @default 900 */\n readonly fontWeight = input<number | string>(900);\n\n /** Font family. `'inherit'` reads the canvas's computed style. @default 'inherit' */\n readonly fontFamily = input('inherit');\n\n /** Text colour. `'inherit'` reads the canvas's computed style. Ignored if `[gradient]` is set. @default 'inherit' */\n readonly color = input('inherit');\n\n /** Optional horizontal gradient stops. */\n readonly gradient = input<readonly string[] | null>(null);\n\n /** Enable hover / touch reactivity. @default true */\n readonly enableHover = input(true, { transform: coerceBooleanProperty });\n\n /** Base intensity (0..1) when idle. @default 0.18 */\n readonly baseIntensity = input(0.18, { transform: numAttr(0.18) });\n\n /** Intensity (0..1) while the pointer hovers the text. @default 0.5 */\n readonly hoverIntensity = input(0.5, { transform: numAttr(0.5) });\n\n /** Max pixel displacement per row/column at intensity 1. @default 30 */\n readonly fuzzRange = input(30, { transform: numAttr(30) });\n\n /** Frame rate cap. @default 60 */\n readonly fps = input(60, { transform: numAttr(60) });\n\n /** Fuzz direction. @default 'horizontal' */\n readonly direction = input<WrFuzzyTextDirection>('horizontal');\n\n /** Ms to ease intensity toward target. `0` snaps. @default 0 */\n readonly transitionDuration = input(0, { transform: numAttr(0) });\n\n /** Spike to full intensity briefly on click. @default false */\n readonly clickEffect = input(false, { transform: coerceBooleanProperty });\n\n /** Periodic \"glitch\" bursts at full intensity. @default false */\n readonly glitchMode = input(false, { transform: coerceBooleanProperty });\n\n /** Ms between glitch bursts. @default 2000 */\n readonly glitchInterval = input(2000, { transform: numAttr(2000) });\n\n /** Ms a glitch burst lasts. @default 200 */\n readonly glitchDuration = input(200, { transform: numAttr(200) });\n\n /** Extra pixels between glyphs. @default 0 */\n readonly letterSpacing = input(0, { transform: numAttr(0) });\n\n private readonly canvasRef = viewChild.required<ElementRef<HTMLCanvasElement>>('canvas');\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly platform = inject(WrPlatform);\n\n private teardown: (() => void) | undefined;\n\n constructor() {\n if (!this.isBrowser) return;\n\n afterNextRender(() => {\n void this.init();\n });\n\n // Re-init whenever any input that affects the offscreen rendering changes.\n effect(() => {\n this.text();\n this.fontSize();\n this.fontWeight();\n this.fontFamily();\n this.color();\n this.gradient();\n this.letterSpacing();\n this.direction();\n this.fuzzRange();\n this.fps();\n this.glitchMode();\n this.glitchInterval();\n this.glitchDuration();\n // Skip if we haven't booted yet.\n if (!this.teardown) return;\n this.teardown();\n this.teardown = undefined;\n queueMicrotask(() => {\n void this.init();\n });\n });\n\n this.destroyRef.onDestroy(() => this.teardown?.());\n }\n\n // Init / loop\n\n private async init(): Promise<void> {\n const canvas = this.canvasRef().nativeElement;\n const ctx = canvas.getContext('2d');\n if (!ctx) return;\n\n const fontFamily =\n this.fontFamily() === 'inherit' ? window.getComputedStyle(canvas).fontFamily || 'sans-serif' : this.fontFamily();\n const color = this.color() === 'inherit' ? window.getComputedStyle(canvas).color || '#fff' : this.color();\n const fontSize = this.fontSize();\n const fontSizeStr = typeof fontSize === 'number' ? `${fontSize}px` : fontSize;\n const fontWeight = this.fontWeight();\n const fontString = `${fontWeight} ${fontSizeStr} ${fontFamily}`;\n\n try {\n await document.fonts.load(fontString);\n } catch {\n await document.fonts.ready;\n }\n\n // Numeric font size for buffer maths.\n let numericFontSize: number;\n if (typeof fontSize === 'number') {\n numericFontSize = fontSize;\n } else {\n const tmp = document.createElement('span');\n tmp.style.fontSize = fontSize;\n document.body.appendChild(tmp);\n numericFontSize = Number.parseFloat(window.getComputedStyle(tmp).fontSize);\n document.body.removeChild(tmp);\n }\n\n const text = this.text();\n const letterSpacing = this.letterSpacing();\n const fuzzRange = this.fuzzRange();\n const direction = this.direction();\n\n // Offscreen canvas with the laid-out text.\n const offscreen = document.createElement('canvas');\n const offCtx = offscreen.getContext('2d');\n if (!offCtx) return;\n offCtx.font = fontString;\n offCtx.textBaseline = 'alphabetic';\n\n let totalWidth = 0;\n if (letterSpacing !== 0) {\n for (const ch of text) totalWidth += offCtx.measureText(ch).width + letterSpacing;\n totalWidth -= letterSpacing;\n } else {\n totalWidth = offCtx.measureText(text).width;\n }\n const m = offCtx.measureText(text);\n const actualLeft = m.actualBoundingBoxLeft ?? 0;\n const actualRight = letterSpacing !== 0 ? totalWidth : (m.actualBoundingBoxRight ?? m.width);\n const actualAscent = m.actualBoundingBoxAscent ?? numericFontSize;\n const actualDescent = m.actualBoundingBoxDescent ?? numericFontSize * 0.2;\n const textBoundingWidth = Math.ceil(letterSpacing !== 0 ? totalWidth : actualLeft + actualRight);\n const tightHeight = Math.ceil(actualAscent + actualDescent);\n\n const extraWidthBuffer = 10;\n const offscreenWidth = textBoundingWidth + extraWidthBuffer;\n offscreen.width = offscreenWidth;\n offscreen.height = tightHeight;\n const xOffset = extraWidthBuffer / 2;\n\n offCtx.font = fontString;\n offCtx.textBaseline = 'alphabetic';\n\n const gradient = this.gradient();\n if (gradient && gradient.length >= 2) {\n const g = offCtx.createLinearGradient(0, 0, offscreenWidth, 0);\n gradient.forEach((c, i) => g.addColorStop(i / (gradient.length - 1), c));\n offCtx.fillStyle = g;\n } else {\n offCtx.fillStyle = color;\n }\n\n if (letterSpacing !== 0) {\n let xPos = xOffset;\n for (const ch of text) {\n offCtx.fillText(ch, xPos, actualAscent);\n xPos += offCtx.measureText(ch).width + letterSpacing;\n }\n } else {\n offCtx.fillText(text, xOffset - actualLeft, actualAscent);\n }\n\n // Size the visible canvas, leaving room for the max horizontal fuzz.\n const horizontalMargin = fuzzRange + 20;\n const verticalMargin = 0;\n canvas.width = offscreenWidth + horizontalMargin * 2;\n canvas.height = tightHeight + verticalMargin * 2;\n ctx.translate(horizontalMargin, verticalMargin);\n\n const interactiveLeft = horizontalMargin + xOffset;\n const interactiveTop = verticalMargin;\n const interactiveRight = interactiveLeft + textBoundingWidth;\n const interactiveBottom = interactiveTop + tightHeight;\n\n // Reduced motion: paint the text once, clean — no fuzz loop, no\n // glitch bursts, no pointer reactivity. Teardown must still be set\n // so the re-init effect keeps redrawing on input changes.\n if (this.platform.prefersReducedMotion()) {\n ctx.drawImage(offscreen, 0, 0);\n this.teardown = (): void => undefined;\n return;\n }\n\n let isHovering = false;\n let isClicking = false;\n let isGlitching = false;\n let currentIntensity = this.baseIntensity();\n let targetIntensity = currentIntensity;\n let lastFrame = 0;\n const frameDuration = 1000 / this.fps();\n\n let rafId = 0;\n let glitchOnTimer: ReturnType<typeof setTimeout> | undefined;\n let glitchOffTimer: ReturnType<typeof setTimeout> | undefined;\n let clickTimer: ReturnType<typeof setTimeout> | undefined;\n\n const startGlitchLoop = (): void => {\n if (!this.glitchMode()) return;\n glitchOnTimer = setTimeout(() => {\n isGlitching = true;\n glitchOffTimer = setTimeout(() => {\n isGlitching = false;\n startGlitchLoop();\n }, this.glitchDuration());\n }, this.glitchInterval());\n };\n if (this.glitchMode()) startGlitchLoop();\n\n const run = (ts: number): void => {\n if (ts - lastFrame < frameDuration) {\n rafId = requestAnimationFrame(run);\n return;\n }\n lastFrame = ts;\n\n ctx.clearRect(\n -fuzzRange - 20,\n -fuzzRange - 10,\n offscreenWidth + 2 * (fuzzRange + 20),\n tightHeight + 2 * (fuzzRange + 10)\n );\n\n if (isClicking) targetIntensity = 1;\n else if (isGlitching) targetIntensity = 1;\n else if (isHovering) targetIntensity = this.hoverIntensity();\n else targetIntensity = this.baseIntensity();\n\n const td = this.transitionDuration();\n if (td > 0) {\n const step = 1 / (td / frameDuration);\n if (currentIntensity < targetIntensity) currentIntensity = Math.min(currentIntensity + step, targetIntensity);\n else if (currentIntensity > targetIntensity)\n currentIntensity = Math.max(currentIntensity - step, targetIntensity);\n } else {\n currentIntensity = targetIntensity;\n }\n\n if (direction === 'horizontal') {\n for (let j = 0; j < tightHeight; j++) {\n const dx = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange);\n ctx.drawImage(offscreen, 0, j, offscreenWidth, 1, dx, j, offscreenWidth, 1);\n }\n } else if (direction === 'vertical') {\n for (let i = 0; i < offscreenWidth; i++) {\n const dy = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange);\n ctx.drawImage(offscreen, i, 0, 1, tightHeight, i, dy, 1, tightHeight);\n }\n } else {\n // both: horizontal pass then vertical pass on the result\n for (let j = 0; j < tightHeight; j++) {\n const dx = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange);\n ctx.drawImage(offscreen, 0, j, offscreenWidth, 1, dx, j, offscreenWidth, 1);\n }\n const w = offscreenWidth + fuzzRange;\n const h = tightHeight + fuzzRange;\n const data = ctx.getImageData(0, 0, w, h);\n ctx.clearRect(\n -fuzzRange - 20,\n -fuzzRange - 10,\n offscreenWidth + 2 * (fuzzRange + 20),\n tightHeight + 2 * (fuzzRange + 10)\n );\n ctx.putImageData(data, 0, 0);\n for (let i = 0; i < w; i++) {\n const dy = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange * 0.5);\n const col = ctx.getImageData(i, 0, 1, h);\n ctx.clearRect(i, -fuzzRange, 1, tightHeight + 2 * fuzzRange);\n ctx.putImageData(col, i, dy);\n }\n }\n\n rafId = requestAnimationFrame(run);\n };\n rafId = requestAnimationFrame(run);\n\n const isInsideText = (x: number, y: number): boolean =>\n x >= interactiveLeft && x <= interactiveRight && y >= interactiveTop && y <= interactiveBottom;\n\n const onMouseMove = (e: MouseEvent): void => {\n if (!this.enableHover()) return;\n const rect = canvas.getBoundingClientRect();\n isHovering = isInsideText(e.clientX - rect.left, e.clientY - rect.top);\n };\n const onMouseLeave = (): void => {\n isHovering = false;\n };\n const onTouchMove = (e: TouchEvent): void => {\n if (!this.enableHover()) return;\n e.preventDefault();\n const rect = canvas.getBoundingClientRect();\n const t = e.touches[0];\n isHovering = isInsideText(t.clientX - rect.left, t.clientY - rect.top);\n };\n const onTouchEnd = (): void => {\n isHovering = false;\n };\n const onClick = (): void => {\n if (!this.clickEffect()) return;\n isClicking = true;\n clearTimeout(clickTimer);\n clickTimer = setTimeout(() => {\n isClicking = false;\n }, 150);\n };\n\n if (this.enableHover()) {\n canvas.addEventListener('mousemove', onMouseMove);\n canvas.addEventListener('mouseleave', onMouseLeave);\n canvas.addEventListener('touchmove', onTouchMove, { passive: false });\n canvas.addEventListener('touchend', onTouchEnd);\n }\n if (this.clickEffect()) canvas.addEventListener('click', onClick);\n\n this.teardown = (): void => {\n cancelAnimationFrame(rafId);\n clearTimeout(glitchOnTimer);\n clearTimeout(glitchOffTimer);\n clearTimeout(clickTimer);\n canvas.removeEventListener('mousemove', onMouseMove);\n canvas.removeEventListener('mouseleave', onMouseLeave);\n canvas.removeEventListener('touchmove', onTouchMove);\n canvas.removeEventListener('touchend', onTouchEnd);\n canvas.removeEventListener('click', onClick);\n };\n }\n}\n\nexport type { WrFuzzyTextDirection } from './interfaces';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;AAYG;AAsBH;;;;;;;;;;;;;;;;;;;AAmBG;MAOU,WAAW,CAAA;;IAEb,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAAU;;IAG/B,QAAQ,GAAG,KAAK,CAAkB,0BAA0B;iFAAC;;IAG7D,UAAU,GAAG,KAAK,CAAkB,GAAG;mFAAC;;IAGxC,UAAU,GAAG,KAAK,CAAC,SAAS;mFAAC;;IAG7B,KAAK,GAAG,KAAK,CAAC,SAAS;8EAAC;;IAGxB,QAAQ,GAAG,KAAK,CAA2B,IAAI;iFAAC;;IAGhD,WAAW,GAAG,KAAK,CAAC,IAAI,mFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;AAG/D,IAAA,aAAa,GAAG,KAAK,CAAC,IAAI,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,eAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,EAAA,CAAG;;AAGzD,IAAA,cAAc,GAAG,K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AC;AAC9C,QAAA,CAAC;IACH;uGA3VW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,WAAW,6qFAJZ,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAI1B,WAAW,EAAA,UAAA,EAAA,CAAA;kBANvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,2BAA2B;oBACrC,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,IAAI,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,6BAA6B,EAAE;AACvE,iBAAA;g3DAwDgF,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACnHzF;;AAEG;;;;"}
@@ -19,7 +19,7 @@ import { clamp } from 'ngwr/utils';
19
19
  * <wr-gauge [value]="9.5" [min]="0" [max]="10" suffix="/10" valueColor="var(--wr-color-warning)" />
20
20
  * ```
21
21
  *
22
- * @see https://ngwr.dev/components/gauge
22
+ * @see https://ngwr.dev/reference/components/gauge
23
23
  */
24
24
  class WrGauge {
25
25
  value = input.required(/* @ts-ignore */
@@ -67,10 +67,10 @@ class WrGauge {
67
67
  }, /* @ts-ignore */
68
68
  ...(ngDevMode ? [{ debugName: "valuePath" }] : /* istanbul ignore next */ []));
69
69
  viewBox = '0 0 100 56';
70
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrGauge, deps: [], target: i0.ɵɵFactoryTarget.Component });
71
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: WrGauge, isStandalone: true, selector: "wr-gauge", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, trackColor: { classPropertyName: "trackColor", publicName: "trackColor", isSignal: true, isRequired: false, transformFunction: null }, valueColor: { classPropertyName: "valueColor", publicName: "valueColor", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-gauge" }, ngImport: i0, template: "<div class=\"wr-gauge__surface\" [style.width.px]=\"size()\">\n <svg [attr.viewBox]=\"viewBox\" aria-hidden=\"true\">\n <path\n [attr.d]=\"trackPath()\"\n fill=\"none\"\n [attr.stroke]=\"trackColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n <path\n [attr.d]=\"valuePath()\"\n fill=\"none\"\n [attr.stroke]=\"valueColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n </svg>\n @if (showValue()) {\n <div class=\"wr-gauge__text\">\n {{ value() }}<span class=\"wr-gauge__suffix\">{{ suffix() }}</span>\n </div>\n }\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
70
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrGauge, deps: [], target: i0.ɵɵFactoryTarget.Component });
71
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrGauge, isStandalone: true, selector: "wr-gauge", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, trackColor: { classPropertyName: "trackColor", publicName: "trackColor", isSignal: true, isRequired: false, transformFunction: null }, valueColor: { classPropertyName: "valueColor", publicName: "valueColor", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-gauge" }, ngImport: i0, template: "<div class=\"wr-gauge__surface\" [style.width.px]=\"size()\">\n <svg [attr.viewBox]=\"viewBox\" aria-hidden=\"true\">\n <path\n [attr.d]=\"trackPath()\"\n fill=\"none\"\n [attr.stroke]=\"trackColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n <path\n [attr.d]=\"valuePath()\"\n fill=\"none\"\n [attr.stroke]=\"valueColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n </svg>\n @if (showValue()) {\n <div class=\"wr-gauge__text\">\n {{ value() }}<span class=\"wr-gauge__suffix\">{{ suffix() }}</span>\n </div>\n }\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
72
72
  }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrGauge, decorators: [{
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrGauge, decorators: [{
74
74
  type: Component,
75
75
  args: [{ selector: 'wr-gauge', encapsulation: ViewEncapsulation.None, host: { class: 'wr-gauge' }, template: "<div class=\"wr-gauge__surface\" [style.width.px]=\"size()\">\n <svg [attr.viewBox]=\"viewBox\" aria-hidden=\"true\">\n <path\n [attr.d]=\"trackPath()\"\n fill=\"none\"\n [attr.stroke]=\"trackColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n <path\n [attr.d]=\"valuePath()\"\n fill=\"none\"\n [attr.stroke]=\"valueColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n </svg>\n @if (showValue()) {\n <div class=\"wr-gauge__text\">\n {{ value() }}<span class=\"wr-gauge__suffix\">{{ suffix() }}</span>\n </div>\n }\n</div>\n" }]
76
76
  }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }], trackColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackColor", required: false }] }], valueColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueColor", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-gauge.mjs","sources":["../../../projects/lib/gauge/gauge.ts","../../../projects/lib/gauge/gauge.html","../../../projects/lib/gauge/ngwr-gauge.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 { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { clamp } from 'ngwr/utils';\n\n/**\n * Semicircle progress gauge. Display-only — for interactive use see the\n * {@link WrKnob} from `ngwr/knob`.\n *\n * @example\n * ```html\n * <wr-gauge [value]=\"72\" />\n * <wr-gauge [value]=\"9.5\" [min]=\"0\" [max]=\"10\" suffix=\"/10\" valueColor=\"var(--wr-color-warning)\" />\n * ```\n *\n * @see https://ngwr.dev/components/gauge\n */\n@Component({\n selector: 'wr-gauge',\n templateUrl: './gauge.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-gauge' },\n})\nexport class WrGauge {\n readonly value = input.required<number>();\n readonly min = input(0, { transform: (v: unknown): number => coerceNumberProperty(v, 0) });\n readonly max = input(100, { transform: (v: unknown): number => coerceNumberProperty(v, 100) });\n\n /** Diameter in CSS pixels. @default 160 */\n readonly size = input(160, { transform: (v: unknown): number => Math.max(48, coerceNumberProperty(v, 160)) });\n\n /** Arc stroke thickness in viewBox units (out of 100). @default 10 */\n readonly strokeWidth = input(10, {\n transform: (v: unknown): number => Math.max(1, coerceNumberProperty(v, 10)),\n });\n\n readonly trackColor = input<string>('rgba(var(--wr-color-light-rgb), 0.6)');\n readonly valueColor = input<string>('var(--wr-color-primary)');\n\n /** Show the value text in the center. @default true */\n readonly showValue = input(true, { transform: coerceBooleanProperty });\n\n readonly suffix = input<string>('');\n\n // Geometry — semicircle in a 100×56 viewBox (centre at 50, 50).\n protected readonly cx = 50;\n protected readonly cy = 50;\n protected readonly radius = computed(() => 50 - this.strokeWidth() / 2 - 0.5);\n\n protected readonly ratio = computed(() => {\n const range = this.max() - this.min();\n if (range <= 0) return 0;\n return clamp((this.value() - this.min()) / range, 0, 1);\n });\n\n protected readonly trackPath = computed(() => {\n const r = this.radius();\n return `M ${this.cx - r} ${this.cy} A ${r} ${r} 0 0 1 ${this.cx + r} ${this.cy}`;\n });\n\n protected readonly valuePath = computed(() => {\n const r = this.radius();\n const angle = Math.PI * (1 - this.ratio());\n const ex = this.cx + r * Math.cos(angle);\n const ey = this.cy - r * Math.sin(angle);\n // The arc always spans `π × ratio` radians (≤ 180°), so largeArc stays 0.\n // Previously this was set to 1 when ratio > 0.5, which made the swept arc\n // take the long way round and visually flipped the bar.\n return `M ${this.cx - r} ${this.cy} A ${r} ${r} 0 0 1 ${ex.toFixed(2)} ${ey.toFixed(2)}`;\n });\n\n protected readonly viewBox = '0 0 100 56';\n}\n","<div class=\"wr-gauge__surface\" [style.width.px]=\"size()\">\n <svg [attr.viewBox]=\"viewBox\" aria-hidden=\"true\">\n <path\n [attr.d]=\"trackPath()\"\n fill=\"none\"\n [attr.stroke]=\"trackColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n <path\n [attr.d]=\"valuePath()\"\n fill=\"none\"\n [attr.stroke]=\"valueColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n </svg>\n @if (showValue()) {\n <div class=\"wr-gauge__text\">\n {{ value() }}<span class=\"wr-gauge__suffix\">{{ suffix() }}</span>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAOH;;;;;;;;;;;AAWG;MAOU,OAAO,CAAA;IACT,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAU;AAChC,IAAA,GAAG,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,KAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,CAAC,CAAU,KAAa,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;AACjF,IAAA,GAAG,GAAG,KAAK,CAAC,GAAG,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,KAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EA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oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,OAAO,6tCC9BpB,ypBAuBA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDOa,OAAO,EAAA,UAAA,EAAA,CAAA;kBANnB,SAAS;+BACE,UAAU,EAAA,aAAA,EAEL,iBAAiB,CAAC,IAAI,QAC/B,EAAE,KAAK,EAAE,UAAU,EAAE,EAAA,QAAA,EAAA,ypBAAA,EAAA;;;AE5B7B;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-gauge.mjs","sources":["../../../projects/lib/gauge/gauge.ts","../../../projects/lib/gauge/gauge.html","../../../projects/lib/gauge/ngwr-gauge.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 { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { clamp } from 'ngwr/utils';\n\n/**\n * Semicircle progress gauge. Display-only — for interactive use see the\n * {@link WrKnob} from `ngwr/knob`.\n *\n * @example\n * ```html\n * <wr-gauge [value]=\"72\" />\n * <wr-gauge [value]=\"9.5\" [min]=\"0\" [max]=\"10\" suffix=\"/10\" valueColor=\"var(--wr-color-warning)\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/gauge\n */\n@Component({\n selector: 'wr-gauge',\n templateUrl: './gauge.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-gauge' },\n})\nexport class WrGauge {\n readonly value = input.required<number>();\n readonly min = input(0, { transform: (v: unknown): number => coerceNumberProperty(v, 0) });\n readonly max = input(100, { transform: (v: unknown): number => coerceNumberProperty(v, 100) });\n\n /** Diameter in CSS pixels. @default 160 */\n readonly size = input(160, { transform: (v: unknown): number => Math.max(48, coerceNumberProperty(v, 160)) });\n\n /** Arc stroke thickness in viewBox units (out of 100). @default 10 */\n readonly strokeWidth = input(10, {\n transform: (v: unknown): number => Math.max(1, coerceNumberProperty(v, 10)),\n });\n\n readonly trackColor = input<string>('rgba(var(--wr-color-light-rgb), 0.6)');\n readonly valueColor = input<string>('var(--wr-color-primary)');\n\n /** Show the value text in the center. @default true */\n readonly showValue = input(true, { transform: coerceBooleanProperty });\n\n readonly suffix = input<string>('');\n\n // Geometry — semicircle in a 100×56 viewBox (centre at 50, 50).\n protected readonly cx = 50;\n protected readonly cy = 50;\n protected readonly radius = computed(() => 50 - this.strokeWidth() / 2 - 0.5);\n\n protected readonly ratio = computed(() => {\n const range = this.max() - this.min();\n if (range <= 0) return 0;\n return clamp((this.value() - this.min()) / range, 0, 1);\n });\n\n protected readonly trackPath = computed(() => {\n const r = this.radius();\n return `M ${this.cx - r} ${this.cy} A ${r} ${r} 0 0 1 ${this.cx + r} ${this.cy}`;\n });\n\n protected readonly valuePath = computed(() => {\n const r = this.radius();\n const angle = Math.PI * (1 - this.ratio());\n const ex = this.cx + r * Math.cos(angle);\n const ey = this.cy - r * Math.sin(angle);\n // The arc always spans `π × ratio` radians (≤ 180°), so largeArc stays 0.\n // Previously this was set to 1 when ratio > 0.5, which made the swept arc\n // take the long way round and visually flipped the bar.\n return `M ${this.cx - r} ${this.cy} A ${r} ${r} 0 0 1 ${ex.toFixed(2)} ${ey.toFixed(2)}`;\n });\n\n protected readonly viewBox = '0 0 100 56';\n}\n","<div class=\"wr-gauge__surface\" [style.width.px]=\"size()\">\n <svg [attr.viewBox]=\"viewBox\" aria-hidden=\"true\">\n <path\n [attr.d]=\"trackPath()\"\n fill=\"none\"\n [attr.stroke]=\"trackColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n <path\n [attr.d]=\"valuePath()\"\n fill=\"none\"\n [attr.stroke]=\"valueColor()\"\n [attr.stroke-width]=\"strokeWidth()\"\n stroke-linecap=\"round\"\n />\n </svg>\n @if (showValue()) {\n <div class=\"wr-gauge__text\">\n {{ value() }}<span class=\"wr-gauge__suffix\">{{ suffix() }}</span>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAOH;;;;;;;;;;;AAWG;MAOU,OAAO,CAAA;IACT,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAU;AAChC,IAAA,GAAG,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,KAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,CAAC,CAAU,KAAa,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;AACjF,IAAA,GAAG,GAAG,KAAK,CAAC,GAAG,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,KAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,CAAC,CAAU,KAAa,oBAAoB,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG;;IAGrF,IAAI,GAAG,KAAK,CAAC,GAAG,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,MAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,CAAC,CAAU,KAAa,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,oBAAoB,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAA,CAAG;;IAGpG,WAAW,GAAG,KAAK,CAAC,EAAE,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,aAAA,EAAA,8BAAA,EAAA,CAAA,EAC7B,SAAS,EAAE,CAAC,CAAU,KAAa,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAA,CAC3E;IAEO,UAAU,GAAG,KAAK,CAAS,sCAAsC;mFAAC;IAClE,UAAU,GAAG,KA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C,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;AACxC,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;;;;AAIxC,QAAA,OAAO,CAAA,EAAA,EAAK,IAAI,CAAC,EAAE,GAAG,CAAC,CAAA,CAAA,EAAI,IAAI,CAAC,EAAE,CAAA,GAAA,EAAM,CAAC,CAAA,CAAA,EAAI,CAAC,CAAA,OAAA,EAAU,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA,CAAA,EAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;IAC1F,CAAC;kFAAC;IAEiB,OAAO,GAAG,YAAY;uGAhD9B,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAP,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,OAAO,6tCC9BpB,ypBAuBA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDOa,OAAO,EAAA,UAAA,EAAA,CAAA;kBANnB,SAAS;+BACE,UAAU,EAAA,aAAA,EAEL,iBAAiB,CAAC,IAAI,QAC/B,EAAE,KAAK,EAAE,UAAU,EAAE,EAAA,QAAA,EAAA,ypBAAA,EAAA;;;AE5B7B;;AAEG;;;;"}
@@ -50,10 +50,10 @@ class WrGlitchText {
50
50
  ...(ngDevMode ? [{ debugName: "beforeShadow" }] : /* istanbul ignore next */ []));
51
51
  afterShadow = computed(() => (this.enableShadows() ? '-5px 0 var(--wr-color-danger)' : 'none'), /* @ts-ignore */
52
52
  ...(ngDevMode ? [{ debugName: "afterShadow" }] : /* istanbul ignore next */ []));
53
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrGlitchText, deps: [], target: i0.ɵɵFactoryTarget.Component });
54
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: WrGlitchText, isStandalone: true, selector: "wr-glitch-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null }, enableShadows: { classPropertyName: "enableShadows", publicName: "enableShadows", isSignal: true, isRequired: false, transformFunction: null }, enableOnHover: { classPropertyName: "enableOnHover", publicName: "enableOnHover", isSignal: true, isRequired: false, transformFunction: null }, background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.wr-glitch-text--hover-only": "enableOnHover()", "attr.data-text": "text()", "style.--wr-glitch-text-before-duration": "(speed() * 2) + 's'", "style.--wr-glitch-text-after-duration": "(speed() * 3) + 's'", "style.--wr-glitch-text-before-shadow": "beforeShadow()", "style.--wr-glitch-text-after-shadow": "afterShadow()", "style.--wr-glitch-text-bg": "background() || null" }, classAttribute: "wr-glitch-text" }, ngImport: i0, template: '{{ text() }}', isInline: true, styles: [".wr-glitch-text{--wr-glitch-text-before-duration: 2s;--wr-glitch-text-after-duration: 3s;--wr-glitch-text-before-shadow: 5px 0 var(--wr-color-info);--wr-glitch-text-after-shadow: -5px 0 var(--wr-color-danger);position:relative;display:inline-block;white-space:nowrap;-webkit-user-select:none;user-select:none;font-weight:900;color:var(--wr-color-dark, #0f172a)}.wr-glitch-text:before,.wr-glitch-text:after{content:attr(data-text);position:absolute;top:0;color:inherit;background-color:var(--wr-glitch-text-bg, transparent);overflow:hidden;clip-path:inset(0 0 0 0)}.wr-glitch-text:not(.wr-glitch-text--hover-only):before{left:-10px;text-shadow:var(--wr-glitch-text-before-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse}.wr-glitch-text:not(.wr-glitch-text--hover-only):after{left:10px;text-shadow:var(--wr-glitch-text-after-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse}.wr-glitch-text--hover-only:before,.wr-glitch-text--hover-only:after{content:\"\";opacity:0;animation:none}.wr-glitch-text--hover-only:hover:before{content:attr(data-text);opacity:1;left:-10px;text-shadow:var(--wr-glitch-text-before-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse}.wr-glitch-text--hover-only:hover:after{content:attr(data-text);opacity:1;left:10px;text-shadow:var(--wr-glitch-text-after-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse}@media(prefers-reduced-motion:reduce){.wr-glitch-text:before,.wr-glitch-text:after{content:\"\"!important;opacity:0!important;animation:none!important}}@keyframes wr-glitch-text-tear{0%{clip-path:inset(20% 0 50% 0)}5%{clip-path:inset(10% 0 60% 0)}10%{clip-path:inset(15% 0 55% 0)}15%{clip-path:inset(25% 0 35% 0)}20%{clip-path:inset(30% 0 40% 0)}25%{clip-path:inset(40% 0 20% 0)}30%{clip-path:inset(10% 0 60% 0)}35%{clip-path:inset(15% 0 55% 0)}40%{clip-path:inset(25% 0 35% 0)}45%{clip-path:inset(30% 0 40% 0)}50%{clip-path:inset(20% 0 50% 0)}55%{clip-path:inset(10% 0 60% 0)}60%{clip-path:inset(15% 0 55% 0)}65%{clip-path:inset(25% 0 35% 0)}70%{clip-path:inset(30% 0 40% 0)}75%{clip-path:inset(40% 0 20% 0)}80%{clip-path:inset(20% 0 50% 0)}85%{clip-path:inset(10% 0 60% 0)}90%{clip-path:inset(15% 0 55% 0)}95%{clip-path:inset(25% 0 35% 0)}to{clip-path:inset(30% 0 40% 0)}}\n"], encapsulation: i0.ViewEncapsulation.None });
53
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrGlitchText, deps: [], target: i0.ɵɵFactoryTarget.Component });
54
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.0", type: WrGlitchText, isStandalone: true, selector: "wr-glitch-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null }, enableShadows: { classPropertyName: "enableShadows", publicName: "enableShadows", isSignal: true, isRequired: false, transformFunction: null }, enableOnHover: { classPropertyName: "enableOnHover", publicName: "enableOnHover", isSignal: true, isRequired: false, transformFunction: null }, background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.wr-glitch-text--hover-only": "enableOnHover()", "attr.data-text": "text()", "style.--wr-glitch-text-before-duration": "(speed() * 2) + 's'", "style.--wr-glitch-text-after-duration": "(speed() * 3) + 's'", "style.--wr-glitch-text-before-shadow": "beforeShadow()", "style.--wr-glitch-text-after-shadow": "afterShadow()", "style.--wr-glitch-text-bg": "background() || null" }, classAttribute: "wr-glitch-text" }, ngImport: i0, template: '{{ text() }}', isInline: true, styles: [".wr-glitch-text{--wr-glitch-text-before-duration: 2s;--wr-glitch-text-after-duration: 3s;--wr-glitch-text-before-shadow: 5px 0 var(--wr-color-info);--wr-glitch-text-after-shadow: -5px 0 var(--wr-color-danger);position:relative;display:inline-block;white-space:nowrap;-webkit-user-select:none;user-select:none;font-weight:900;color:var(--wr-color-on-surface, #0f172a)}.wr-glitch-text:before,.wr-glitch-text:after{content:attr(data-text);position:absolute;top:0;color:inherit;background-color:var(--wr-glitch-text-bg, transparent);overflow:hidden;clip-path:inset(0 0 0 0)}.wr-glitch-text:not(.wr-glitch-text--hover-only):before{left:-10px;text-shadow:var(--wr-glitch-text-before-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse}.wr-glitch-text:not(.wr-glitch-text--hover-only):after{left:10px;text-shadow:var(--wr-glitch-text-after-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse}.wr-glitch-text--hover-only:before,.wr-glitch-text--hover-only:after{content:\"\";opacity:0;animation:none}.wr-glitch-text--hover-only:hover:before{content:attr(data-text);opacity:1;left:-10px;text-shadow:var(--wr-glitch-text-before-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse}.wr-glitch-text--hover-only:hover:after{content:attr(data-text);opacity:1;left:10px;text-shadow:var(--wr-glitch-text-after-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse}@media(prefers-reduced-motion:reduce){.wr-glitch-text:before,.wr-glitch-text:after{content:\"\"!important;opacity:0!important;animation:none!important}}@keyframes wr-glitch-text-tear{0%{clip-path:inset(20% 0 50% 0)}5%{clip-path:inset(10% 0 60% 0)}10%{clip-path:inset(15% 0 55% 0)}15%{clip-path:inset(25% 0 35% 0)}20%{clip-path:inset(30% 0 40% 0)}25%{clip-path:inset(40% 0 20% 0)}30%{clip-path:inset(10% 0 60% 0)}35%{clip-path:inset(15% 0 55% 0)}40%{clip-path:inset(25% 0 35% 0)}45%{clip-path:inset(30% 0 40% 0)}50%{clip-path:inset(20% 0 50% 0)}55%{clip-path:inset(10% 0 60% 0)}60%{clip-path:inset(15% 0 55% 0)}65%{clip-path:inset(25% 0 35% 0)}70%{clip-path:inset(30% 0 40% 0)}75%{clip-path:inset(40% 0 20% 0)}80%{clip-path:inset(20% 0 50% 0)}85%{clip-path:inset(10% 0 60% 0)}90%{clip-path:inset(15% 0 55% 0)}95%{clip-path:inset(25% 0 35% 0)}to{clip-path:inset(30% 0 40% 0)}}\n"], encapsulation: i0.ViewEncapsulation.None });
55
55
  }
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrGlitchText, decorators: [{
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrGlitchText, decorators: [{
57
57
  type: Component,
58
58
  args: [{ selector: 'wr-glitch-text', template: '{{ text() }}', encapsulation: ViewEncapsulation.None, host: {
59
59
  class: 'wr-glitch-text',
@@ -64,7 +64,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
64
64
  '[style.--wr-glitch-text-before-shadow]': 'beforeShadow()',
65
65
  '[style.--wr-glitch-text-after-shadow]': 'afterShadow()',
66
66
  '[style.--wr-glitch-text-bg]': 'background() || null',
67
- }, styles: [".wr-glitch-text{--wr-glitch-text-before-duration: 2s;--wr-glitch-text-after-duration: 3s;--wr-glitch-text-before-shadow: 5px 0 var(--wr-color-info);--wr-glitch-text-after-shadow: -5px 0 var(--wr-color-danger);position:relative;display:inline-block;white-space:nowrap;-webkit-user-select:none;user-select:none;font-weight:900;color:var(--wr-color-dark, #0f172a)}.wr-glitch-text:before,.wr-glitch-text:after{content:attr(data-text);position:absolute;top:0;color:inherit;background-color:var(--wr-glitch-text-bg, transparent);overflow:hidden;clip-path:inset(0 0 0 0)}.wr-glitch-text:not(.wr-glitch-text--hover-only):before{left:-10px;text-shadow:var(--wr-glitch-text-before-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse}.wr-glitch-text:not(.wr-glitch-text--hover-only):after{left:10px;text-shadow:var(--wr-glitch-text-after-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse}.wr-glitch-text--hover-only:before,.wr-glitch-text--hover-only:after{content:\"\";opacity:0;animation:none}.wr-glitch-text--hover-only:hover:before{content:attr(data-text);opacity:1;left:-10px;text-shadow:var(--wr-glitch-text-before-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse}.wr-glitch-text--hover-only:hover:after{content:attr(data-text);opacity:1;left:10px;text-shadow:var(--wr-glitch-text-after-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse}@media(prefers-reduced-motion:reduce){.wr-glitch-text:before,.wr-glitch-text:after{content:\"\"!important;opacity:0!important;animation:none!important}}@keyframes wr-glitch-text-tear{0%{clip-path:inset(20% 0 50% 0)}5%{clip-path:inset(10% 0 60% 0)}10%{clip-path:inset(15% 0 55% 0)}15%{clip-path:inset(25% 0 35% 0)}20%{clip-path:inset(30% 0 40% 0)}25%{clip-path:inset(40% 0 20% 0)}30%{clip-path:inset(10% 0 60% 0)}35%{clip-path:inset(15% 0 55% 0)}40%{clip-path:inset(25% 0 35% 0)}45%{clip-path:inset(30% 0 40% 0)}50%{clip-path:inset(20% 0 50% 0)}55%{clip-path:inset(10% 0 60% 0)}60%{clip-path:inset(15% 0 55% 0)}65%{clip-path:inset(25% 0 35% 0)}70%{clip-path:inset(30% 0 40% 0)}75%{clip-path:inset(40% 0 20% 0)}80%{clip-path:inset(20% 0 50% 0)}85%{clip-path:inset(10% 0 60% 0)}90%{clip-path:inset(15% 0 55% 0)}95%{clip-path:inset(25% 0 35% 0)}to{clip-path:inset(30% 0 40% 0)}}\n"] }]
67
+ }, styles: [".wr-glitch-text{--wr-glitch-text-before-duration: 2s;--wr-glitch-text-after-duration: 3s;--wr-glitch-text-before-shadow: 5px 0 var(--wr-color-info);--wr-glitch-text-after-shadow: -5px 0 var(--wr-color-danger);position:relative;display:inline-block;white-space:nowrap;-webkit-user-select:none;user-select:none;font-weight:900;color:var(--wr-color-on-surface, #0f172a)}.wr-glitch-text:before,.wr-glitch-text:after{content:attr(data-text);position:absolute;top:0;color:inherit;background-color:var(--wr-glitch-text-bg, transparent);overflow:hidden;clip-path:inset(0 0 0 0)}.wr-glitch-text:not(.wr-glitch-text--hover-only):before{left:-10px;text-shadow:var(--wr-glitch-text-before-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse}.wr-glitch-text:not(.wr-glitch-text--hover-only):after{left:10px;text-shadow:var(--wr-glitch-text-after-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse}.wr-glitch-text--hover-only:before,.wr-glitch-text--hover-only:after{content:\"\";opacity:0;animation:none}.wr-glitch-text--hover-only:hover:before{content:attr(data-text);opacity:1;left:-10px;text-shadow:var(--wr-glitch-text-before-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-before-duration) infinite linear alternate-reverse}.wr-glitch-text--hover-only:hover:after{content:attr(data-text);opacity:1;left:10px;text-shadow:var(--wr-glitch-text-after-shadow);animation:wr-glitch-text-tear var(--wr-glitch-text-after-duration) infinite linear alternate-reverse}@media(prefers-reduced-motion:reduce){.wr-glitch-text:before,.wr-glitch-text:after{content:\"\"!important;opacity:0!important;animation:none!important}}@keyframes wr-glitch-text-tear{0%{clip-path:inset(20% 0 50% 0)}5%{clip-path:inset(10% 0 60% 0)}10%{clip-path:inset(15% 0 55% 0)}15%{clip-path:inset(25% 0 35% 0)}20%{clip-path:inset(30% 0 40% 0)}25%{clip-path:inset(40% 0 20% 0)}30%{clip-path:inset(10% 0 60% 0)}35%{clip-path:inset(15% 0 55% 0)}40%{clip-path:inset(25% 0 35% 0)}45%{clip-path:inset(30% 0 40% 0)}50%{clip-path:inset(20% 0 50% 0)}55%{clip-path:inset(10% 0 60% 0)}60%{clip-path:inset(15% 0 55% 0)}65%{clip-path:inset(25% 0 35% 0)}70%{clip-path:inset(30% 0 40% 0)}75%{clip-path:inset(40% 0 20% 0)}80%{clip-path:inset(20% 0 50% 0)}85%{clip-path:inset(10% 0 60% 0)}90%{clip-path:inset(15% 0 55% 0)}95%{clip-path:inset(25% 0 35% 0)}to{clip-path:inset(30% 0 40% 0)}}\n"] }]
68
68
  }], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: true }] }], speed: [{ type: i0.Input, args: [{ isSignal: true, alias: "speed", required: false }] }], enableShadows: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableShadows", required: false }] }], enableOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableOnHover", required: false }] }], background: [{ type: i0.Input, args: [{ isSignal: true, alias: "background", required: false }] }] } });
69
69
 
70
70
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-glitch-text.mjs","sources":["../../../projects/lib/glitch-text/glitch-text.ts","../../../projects/lib/glitch-text/ngwr-glitch-text.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 * Angular adaptation of the GlitchText effect by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/text-animations/glitch-text\n *\n * Pure CSS — two `::before` / `::after` clones offset by ±10px with\n * coloured `text-shadow`s, both running a clip-path keyframe to slice\n * random horizontal bands.\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { numAttr } from 'ngwr/utils';\n\n/**\n * Glitchy text effect — colour-split horizontal-tear glitch on the\n * provided text. Defaults to playing constantly; toggle `[enableOnHover]`\n * to make it idle until the user hovers.\n *\n * @example\n * ```html\n * <wr-glitch-text text=\"404\" />\n * <wr-glitch-text text=\"ERROR\" [speed]=\"0.5\" [enableOnHover]=\"true\" />\n * ```\n *\n * @see https://www.reactbits.dev/text-animations/glitch-text\n */\n@Component({\n selector: 'wr-glitch-text',\n template: '{{ text() }}',\n styleUrl: './glitch-text.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-glitch-text',\n '[class.wr-glitch-text--hover-only]': 'enableOnHover()',\n '[attr.data-text]': 'text()',\n '[style.--wr-glitch-text-before-duration]': \"(speed() * 2) + 's'\",\n '[style.--wr-glitch-text-after-duration]': \"(speed() * 3) + 's'\",\n '[style.--wr-glitch-text-before-shadow]': 'beforeShadow()',\n '[style.--wr-glitch-text-after-shadow]': 'afterShadow()',\n '[style.--wr-glitch-text-bg]': 'background() || null',\n },\n})\nexport class WrGlitchText {\n /** Text to glitch. Required — the value populates `data-text` for the pseudo clones. */\n readonly text = input.required<string>();\n\n /** Time multiplier — higher = slower glitching. @default 1 */\n readonly speed = input(1, { transform: numAttr(1) });\n\n /** Show the red / cyan colour-split shadows. @default true */\n readonly enableShadows = input(true, { transform: coerceBooleanProperty });\n\n /** Only glitch on hover (idle until then). @default true */\n readonly enableOnHover = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Surface colour for the clone slices. Pass the colour of the surface the\n * component sits on so the slicing illusion masks cleanly; leave unset\n * (transparent) on the page canvas. @default '' (transparent)\n */\n readonly background = input('');\n\n protected readonly beforeShadow = computed(() => (this.enableShadows() ? '5px 0 var(--wr-color-info)' : 'none'));\n protected readonly afterShadow = computed(() => (this.enableShadows() ? '-5px 0 var(--wr-color-danger)' : 'none'));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;AAYG;AAOH;;;;;;;;;;;;AAYG;MAiBU,YAAY,CAAA;;IAEd,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAAU;;AAG/B,IAAA,KAAK,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,OAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,EAAA,CAAG;;IAG3C,aAAa,GAAG,KAAK,CAAC,IAAI,qFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;IAGjE,aAAa,GAAG,KAAK,CAAC,IAAI,qFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;AAE1E;;;;AAIG;IACM,UAAU,GAAG,KAAK,CAAC,EAAE;mFAAC;AAEZ,IAAA,YAAY,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,aAAa,EAAE,GAAG,4BAA4B,GAAG,MAAM,CAAC;qFAAC;AAC7F,IAAA,WAAW,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,aAAa,EAAE,GAAG,+BAA+B,GAAG,MAAM,CAAC;oFAAC;uGArBvG,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,gqCAdb,cAAc,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+4EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAcb,YAAY,EAAA,UAAA,EAAA,CAAA;kBAhBxB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,YAChB,cAAc,EAAA,aAAA,EAET,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,KAAK,EAAE,gBAAgB;AACvB,wBAAA,oCAAoC,EAAE,iBAAiB;AACvD,wBAAA,kBAAkB,EAAE,QAAQ;AAC5B,wBAAA,0CAA0C,EAAE,qBAAqB;AACjE,wBAAA,yCAAyC,EAAE,qBAAqB;AAChE,wBAAA,wCAAwC,EAAE,gBAAgB;AAC1D,wBAAA,uCAAuC,EAAE,eAAe;AACxD,wBAAA,6BAA6B,EAAE,sBAAsB;AACtD,qBAAA,EAAA,MAAA,EAAA,CAAA,+4EAAA,CAAA,EAAA;;;AC9CH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-glitch-text.mjs","sources":["../../../projects/lib/glitch-text/glitch-text.ts","../../../projects/lib/glitch-text/ngwr-glitch-text.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 * Angular adaptation of the GlitchText effect by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/text-animations/glitch-text\n *\n * Pure CSS — two `::before` / `::after` clones offset by ±10px with\n * coloured `text-shadow`s, both running a clip-path keyframe to slice\n * random horizontal bands.\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { numAttr } from 'ngwr/utils';\n\n/**\n * Glitchy text effect — colour-split horizontal-tear glitch on the\n * provided text. Defaults to playing constantly; toggle `[enableOnHover]`\n * to make it idle until the user hovers.\n *\n * @example\n * ```html\n * <wr-glitch-text text=\"404\" />\n * <wr-glitch-text text=\"ERROR\" [speed]=\"0.5\" [enableOnHover]=\"true\" />\n * ```\n *\n * @see https://www.reactbits.dev/text-animations/glitch-text\n */\n@Component({\n selector: 'wr-glitch-text',\n template: '{{ text() }}',\n styleUrl: './glitch-text.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-glitch-text',\n '[class.wr-glitch-text--hover-only]': 'enableOnHover()',\n '[attr.data-text]': 'text()',\n '[style.--wr-glitch-text-before-duration]': \"(speed() * 2) + 's'\",\n '[style.--wr-glitch-text-after-duration]': \"(speed() * 3) + 's'\",\n '[style.--wr-glitch-text-before-shadow]': 'beforeShadow()',\n '[style.--wr-glitch-text-after-shadow]': 'afterShadow()',\n '[style.--wr-glitch-text-bg]': 'background() || null',\n },\n})\nexport class WrGlitchText {\n /** Text to glitch. Required — the value populates `data-text` for the pseudo clones. */\n readonly text = input.required<string>();\n\n /** Time multiplier — higher = slower glitching. @default 1 */\n readonly speed = input(1, { transform: numAttr(1) });\n\n /** Show the red / cyan colour-split shadows. @default true */\n readonly enableShadows = input(true, { transform: coerceBooleanProperty });\n\n /** Only glitch on hover (idle until then). @default true */\n readonly enableOnHover = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Surface colour for the clone slices. Pass the colour of the surface the\n * component sits on so the slicing illusion masks cleanly; leave unset\n * (transparent) on the page canvas. @default '' (transparent)\n */\n readonly background = input('');\n\n protected readonly beforeShadow = computed(() => (this.enableShadows() ? '5px 0 var(--wr-color-info)' : 'none'));\n protected readonly afterShadow = computed(() => (this.enableShadows() ? '-5px 0 var(--wr-color-danger)' : 'none'));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;AAYG;AAOH;;;;;;;;;;;;AAYG;MAiBU,YAAY,CAAA;;IAEd,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAAU;;AAG/B,IAAA,KAAK,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,OAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,EAAA,CAAG;;IAG3C,aAAa,GAAG,KAAK,CAAC,IAAI,qFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;IAGjE,aAAa,GAAG,KAAK,CAAC,IAAI,qFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;AAE1E;;;;AAIG;IACM,UAAU,GAAG,KAAK,CAAC,EAAE;mFAAC;AAEZ,IAAA,YAAY,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,aAAa,EAAE,GAAG,4BAA4B,GAAG,MAAM,CAAC;qFAAC;AAC7F,IAAA,WAAW,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,aAAa,EAAE,GAAG,+BAA+B,GAAG,MAAM,CAAC;oFAAC;uGArBvG,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,gqCAdb,cAAc,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,q5EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAcb,YAAY,EAAA,UAAA,EAAA,CAAA;kBAhBxB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,YAChB,cAAc,EAAA,aAAA,EAET,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,KAAK,EAAE,gBAAgB;AACvB,wBAAA,oCAAoC,EAAE,iBAAiB;AACvD,wBAAA,kBAAkB,EAAE,QAAQ;AAC5B,wBAAA,0CAA0C,EAAE,qBAAqB;AACjE,wBAAA,yCAAyC,EAAE,qBAAqB;AAChE,wBAAA,wCAAwC,EAAE,gBAAgB;AAC1D,wBAAA,uCAAuC,EAAE,eAAe;AACxD,wBAAA,6BAA6B,EAAE,sBAAsB;AACtD,qBAAA,EAAA,MAAA,EAAA,CAAA,q5EAAA,CAAA,EAAA;;;AC9CH;;AAEG;;;;"}
@@ -83,10 +83,10 @@ class WrGradientText {
83
83
  return 'to right';
84
84
  }
85
85
  }
86
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrGradientText, deps: [], target: i0.ɵɵFactoryTarget.Component });
87
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: WrGradientText, isStandalone: true, selector: "wr-gradient-text", inputs: { colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null }, animationSpeed: { classPropertyName: "animationSpeed", publicName: "animationSpeed", isSignal: true, isRequired: false, transformFunction: null }, showBorder: { classPropertyName: "showBorder", publicName: "showBorder", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, pauseOnHover: { classPropertyName: "pauseOnHover", publicName: "pauseOnHover", isSignal: true, isRequired: false, transformFunction: null }, yoyo: { classPropertyName: "yoyo", publicName: "yoyo", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.wr-gradient-text--border": "showBorder()", "class.wr-gradient-text--pause-on-hover": "pauseOnHover()", "class.wr-gradient-text--yoyo": "yoyo()", "class.wr-gradient-text--vertical": "direction() === 'vertical'", "class.wr-gradient-text--diagonal": "direction() === 'diagonal'", "style.--wr-gradient-text-image": "gradient()", "style.--wr-gradient-text-size": "size()", "style.--wr-gradient-text-duration": "animationSpeed() + 's'" }, classAttribute: "wr-gradient-text" }, ngImport: i0, template: "@if (showBorder()) {\n <span class=\"wr-gradient-text__border\" aria-hidden=\"true\"></span>\n}\n<span class=\"wr-gradient-text__text\">\n <ng-content />\n</span>\n", styles: [".wr-gradient-text{--wr-gradient-text-image: linear-gradient(to right, #5227ff, #ff9ffc, #b497cf, #5227ff);--wr-gradient-text-size: 300% 100%;--wr-gradient-text-duration: 8s;position:relative;display:inline-flex;align-items:center;justify-content:center;margin:0;font-weight:500;line-height:1.25;overflow:hidden}.wr-gradient-text--border{padding:.35rem .75rem;border-radius:1.25rem}.wr-gradient-text__text{position:relative;z-index:2;display:inline-block;background-image:var(--wr-gradient-text-image);background-size:var(--wr-gradient-text-size);background-position:0% 50%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite}.wr-gradient-text__border{position:absolute;inset:0;border-radius:inherit;background-image:var(--wr-gradient-text-image);background-size:var(--wr-gradient-text-size);background-position:0% 50%;animation:wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite;z-index:0;pointer-events:none}.wr-gradient-text__border:before{content:\"\";position:absolute;inset:1px;border-radius:inherit;background-color:var(--wr-color-white, #fff);z-index:1}.wr-gradient-text--vertical .wr-gradient-text__text,.wr-gradient-text--vertical .wr-gradient-text__border{background-position:50% 0%;animation-name:wr-gradient-text-vertical}.wr-gradient-text--diagonal .wr-gradient-text__text,.wr-gradient-text--diagonal .wr-gradient-text__border{background-position:0% 50%;animation-name:wr-gradient-text-horizontal}.wr-gradient-text--yoyo .wr-gradient-text__text,.wr-gradient-text--yoyo .wr-gradient-text__border{animation-direction:alternate}.wr-gradient-text--pause-on-hover:hover .wr-gradient-text__text,.wr-gradient-text--pause-on-hover:hover .wr-gradient-text__border{animation-play-state:paused}@keyframes wr-gradient-text-horizontal{0%{background-position:0% 50%}to{background-position:100% 50%}}@keyframes wr-gradient-text-vertical{0%{background-position:50% 0%}to{background-position:50% 100%}}@media(prefers-reduced-motion:reduce){.wr-gradient-text__text,.wr-gradient-text__border{animation:none!important}}\n"], encapsulation: i0.ViewEncapsulation.None });
86
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrGradientText, deps: [], target: i0.ɵɵFactoryTarget.Component });
87
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrGradientText, isStandalone: true, selector: "wr-gradient-text", inputs: { colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null }, animationSpeed: { classPropertyName: "animationSpeed", publicName: "animationSpeed", isSignal: true, isRequired: false, transformFunction: null }, showBorder: { classPropertyName: "showBorder", publicName: "showBorder", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, pauseOnHover: { classPropertyName: "pauseOnHover", publicName: "pauseOnHover", isSignal: true, isRequired: false, transformFunction: null }, yoyo: { classPropertyName: "yoyo", publicName: "yoyo", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.wr-gradient-text--border": "showBorder()", "class.wr-gradient-text--pause-on-hover": "pauseOnHover()", "class.wr-gradient-text--yoyo": "yoyo()", "class.wr-gradient-text--vertical": "direction() === 'vertical'", "class.wr-gradient-text--diagonal": "direction() === 'diagonal'", "style.--wr-gradient-text-image": "gradient()", "style.--wr-gradient-text-size": "size()", "style.--wr-gradient-text-duration": "animationSpeed() + 's'" }, classAttribute: "wr-gradient-text" }, ngImport: i0, template: "@if (showBorder()) {\n <span class=\"wr-gradient-text__border\" aria-hidden=\"true\"></span>\n}\n<span class=\"wr-gradient-text__text\">\n <ng-content />\n</span>\n", styles: [".wr-gradient-text{--wr-gradient-text-image: linear-gradient(to right, #5227ff, #ff9ffc, #b497cf, #5227ff);--wr-gradient-text-size: 300% 100%;--wr-gradient-text-duration: 8s;position:relative;display:inline-flex;align-items:center;justify-content:center;margin:0;font-weight:500;line-height:1.25;overflow:hidden}.wr-gradient-text--border{padding:.35rem .75rem;border-radius:1.25rem}.wr-gradient-text__text{position:relative;z-index:2;display:inline-block;background-image:var(--wr-gradient-text-image);background-size:var(--wr-gradient-text-size);background-position:0% 50%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite}.wr-gradient-text__border{position:absolute;inset:0;border-radius:inherit;background-image:var(--wr-gradient-text-image);background-size:var(--wr-gradient-text-size);background-position:0% 50%;animation:wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite;z-index:0;pointer-events:none}.wr-gradient-text__border:before{content:\"\";position:absolute;inset:1px;border-radius:inherit;background-color:var(--wr-color-surface, #fff);z-index:1}.wr-gradient-text--vertical .wr-gradient-text__text,.wr-gradient-text--vertical .wr-gradient-text__border{background-position:50% 0%;animation-name:wr-gradient-text-vertical}.wr-gradient-text--diagonal .wr-gradient-text__text,.wr-gradient-text--diagonal .wr-gradient-text__border{background-position:0% 50%;animation-name:wr-gradient-text-horizontal}.wr-gradient-text--yoyo .wr-gradient-text__text,.wr-gradient-text--yoyo .wr-gradient-text__border{animation-direction:alternate}.wr-gradient-text--pause-on-hover:hover .wr-gradient-text__text,.wr-gradient-text--pause-on-hover:hover .wr-gradient-text__border{animation-play-state:paused}@keyframes wr-gradient-text-horizontal{0%{background-position:0% 50%}to{background-position:100% 50%}}@keyframes wr-gradient-text-vertical{0%{background-position:50% 0%}to{background-position:50% 100%}}@media(prefers-reduced-motion:reduce){.wr-gradient-text__text,.wr-gradient-text__border{animation:none!important}}\n"], encapsulation: i0.ViewEncapsulation.None });
88
88
  }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrGradientText, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrGradientText, decorators: [{
90
90
  type: Component,
91
91
  args: [{ selector: 'wr-gradient-text', encapsulation: ViewEncapsulation.None, host: {
92
92
  class: 'wr-gradient-text',
@@ -98,7 +98,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
98
98
  '[style.--wr-gradient-text-image]': 'gradient()',
99
99
  '[style.--wr-gradient-text-size]': 'size()',
100
100
  '[style.--wr-gradient-text-duration]': "animationSpeed() + 's'",
101
- }, template: "@if (showBorder()) {\n <span class=\"wr-gradient-text__border\" aria-hidden=\"true\"></span>\n}\n<span class=\"wr-gradient-text__text\">\n <ng-content />\n</span>\n", styles: [".wr-gradient-text{--wr-gradient-text-image: linear-gradient(to right, #5227ff, #ff9ffc, #b497cf, #5227ff);--wr-gradient-text-size: 300% 100%;--wr-gradient-text-duration: 8s;position:relative;display:inline-flex;align-items:center;justify-content:center;margin:0;font-weight:500;line-height:1.25;overflow:hidden}.wr-gradient-text--border{padding:.35rem .75rem;border-radius:1.25rem}.wr-gradient-text__text{position:relative;z-index:2;display:inline-block;background-image:var(--wr-gradient-text-image);background-size:var(--wr-gradient-text-size);background-position:0% 50%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite}.wr-gradient-text__border{position:absolute;inset:0;border-radius:inherit;background-image:var(--wr-gradient-text-image);background-size:var(--wr-gradient-text-size);background-position:0% 50%;animation:wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite;z-index:0;pointer-events:none}.wr-gradient-text__border:before{content:\"\";position:absolute;inset:1px;border-radius:inherit;background-color:var(--wr-color-white, #fff);z-index:1}.wr-gradient-text--vertical .wr-gradient-text__text,.wr-gradient-text--vertical .wr-gradient-text__border{background-position:50% 0%;animation-name:wr-gradient-text-vertical}.wr-gradient-text--diagonal .wr-gradient-text__text,.wr-gradient-text--diagonal .wr-gradient-text__border{background-position:0% 50%;animation-name:wr-gradient-text-horizontal}.wr-gradient-text--yoyo .wr-gradient-text__text,.wr-gradient-text--yoyo .wr-gradient-text__border{animation-direction:alternate}.wr-gradient-text--pause-on-hover:hover .wr-gradient-text__text,.wr-gradient-text--pause-on-hover:hover .wr-gradient-text__border{animation-play-state:paused}@keyframes wr-gradient-text-horizontal{0%{background-position:0% 50%}to{background-position:100% 50%}}@keyframes wr-gradient-text-vertical{0%{background-position:50% 0%}to{background-position:50% 100%}}@media(prefers-reduced-motion:reduce){.wr-gradient-text__text,.wr-gradient-text__border{animation:none!important}}\n"] }]
101
+ }, template: "@if (showBorder()) {\n <span class=\"wr-gradient-text__border\" aria-hidden=\"true\"></span>\n}\n<span class=\"wr-gradient-text__text\">\n <ng-content />\n</span>\n", styles: [".wr-gradient-text{--wr-gradient-text-image: linear-gradient(to right, #5227ff, #ff9ffc, #b497cf, #5227ff);--wr-gradient-text-size: 300% 100%;--wr-gradient-text-duration: 8s;position:relative;display:inline-flex;align-items:center;justify-content:center;margin:0;font-weight:500;line-height:1.25;overflow:hidden}.wr-gradient-text--border{padding:.35rem .75rem;border-radius:1.25rem}.wr-gradient-text__text{position:relative;z-index:2;display:inline-block;background-image:var(--wr-gradient-text-image);background-size:var(--wr-gradient-text-size);background-position:0% 50%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite}.wr-gradient-text__border{position:absolute;inset:0;border-radius:inherit;background-image:var(--wr-gradient-text-image);background-size:var(--wr-gradient-text-size);background-position:0% 50%;animation:wr-gradient-text-horizontal var(--wr-gradient-text-duration) linear infinite;z-index:0;pointer-events:none}.wr-gradient-text__border:before{content:\"\";position:absolute;inset:1px;border-radius:inherit;background-color:var(--wr-color-surface, #fff);z-index:1}.wr-gradient-text--vertical .wr-gradient-text__text,.wr-gradient-text--vertical .wr-gradient-text__border{background-position:50% 0%;animation-name:wr-gradient-text-vertical}.wr-gradient-text--diagonal .wr-gradient-text__text,.wr-gradient-text--diagonal .wr-gradient-text__border{background-position:0% 50%;animation-name:wr-gradient-text-horizontal}.wr-gradient-text--yoyo .wr-gradient-text__text,.wr-gradient-text--yoyo .wr-gradient-text__border{animation-direction:alternate}.wr-gradient-text--pause-on-hover:hover .wr-gradient-text__text,.wr-gradient-text--pause-on-hover:hover .wr-gradient-text__border{animation-play-state:paused}@keyframes wr-gradient-text-horizontal{0%{background-position:0% 50%}to{background-position:100% 50%}}@keyframes wr-gradient-text-vertical{0%{background-position:50% 0%}to{background-position:50% 100%}}@media(prefers-reduced-motion:reduce){.wr-gradient-text__text,.wr-gradient-text__border{animation:none!important}}\n"] }]
102
102
  }], propDecorators: { colors: [{ type: i0.Input, args: [{ isSignal: true, alias: "colors", required: false }] }], animationSpeed: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationSpeed", required: false }] }], showBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBorder", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], pauseOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "pauseOnHover", required: false }] }], yoyo: [{ type: i0.Input, args: [{ isSignal: true, alias: "yoyo", required: false }] }] } });
103
103
 
104
104
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-gradient-text.mjs","sources":["../../../projects/lib/gradient-text/gradient-text.ts","../../../projects/lib/gradient-text/gradient-text.html","../../../projects/lib/gradient-text/ngwr-gradient-text.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 * Angular adaptation of the GradientText effect by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/text-animations/gradient-text\n *\n * The reactbits version uses `motion/react` to drive `background-position`\n * via rAF. This port is pure CSS — same effect via keyframes on\n * `background-position`, parameterised by inputs.\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { numAttr } from 'ngwr/utils';\n\nimport type { WrGradientTextDirection } from './interfaces';\n\nconst DEFAULT_COLORS: readonly string[] = ['#5227FF', '#FF9FFC', '#B497CF'];\n\n/**\n * Animated multi-stop gradient text. The gradient slides across the text\n * via `background-clip: text`. Optional `[showBorder]` wraps the text in\n * a dark pill with the same animated gradient as a border ring.\n *\n * @example\n * ```html\n * <wr-gradient-text>Hello, ngwr!</wr-gradient-text>\n * <wr-gradient-text\n * [colors]=\"['#5227FF', '#FF9FFC', '#B497CF']\"\n * direction=\"diagonal\"\n * [animationSpeed]=\"6\"\n * [showBorder]=\"true\"\n * >\n * Premium feature\n * </wr-gradient-text>\n * ```\n *\n * @see https://www.reactbits.dev/text-animations/gradient-text\n */\n@Component({\n selector: 'wr-gradient-text',\n templateUrl: './gradient-text.html',\n styleUrl: './gradient-text.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-gradient-text',\n '[class.wr-gradient-text--border]': 'showBorder()',\n '[class.wr-gradient-text--pause-on-hover]': 'pauseOnHover()',\n '[class.wr-gradient-text--yoyo]': 'yoyo()',\n '[class.wr-gradient-text--vertical]': \"direction() === 'vertical'\",\n '[class.wr-gradient-text--diagonal]': \"direction() === 'diagonal'\",\n '[style.--wr-gradient-text-image]': 'gradient()',\n '[style.--wr-gradient-text-size]': 'size()',\n '[style.--wr-gradient-text-duration]': \"animationSpeed() + 's'\",\n },\n})\nexport class WrGradientText {\n /** Gradient stops. @default ['#5227FF', '#FF9FFC', '#B497CF'] */\n readonly colors = input<readonly string[]>(DEFAULT_COLORS);\n\n /** Seconds per full sweep (or per half if `[yoyo]` is on). @default 8 */\n readonly animationSpeed = input(8, { transform: numAttr(8) });\n\n /** Wrap the text in a dark pill with the gradient as a border. @default false */\n readonly showBorder = input(false, { transform: coerceBooleanProperty });\n\n /** Gradient slide direction. @default 'horizontal' */\n readonly direction = input<WrGradientTextDirection>('horizontal');\n\n /** Pause the animation while hovered. @default false */\n readonly pauseOnHover = input(false, { transform: coerceBooleanProperty });\n\n /** Bounce back-and-forth instead of restarting. @default true */\n readonly yoyo = input(true, { transform: coerceBooleanProperty });\n\n protected readonly gradient = computed(() => {\n const cols = this.colors().length > 0 ? this.colors() : DEFAULT_COLORS;\n // Duplicate the first colour at the end for seamless looping.\n const stops = [...cols, cols[0]].join(', ');\n const angle = this.directionAngle();\n return `linear-gradient(${angle}, ${stops})`;\n });\n\n protected readonly size = computed(() => {\n switch (this.direction()) {\n case 'vertical':\n return '100% 300%';\n case 'diagonal':\n return '300% 300%';\n case 'horizontal':\n default:\n return '300% 100%';\n }\n });\n\n private directionAngle(): string {\n switch (this.direction()) {\n case 'vertical':\n return 'to bottom';\n case 'diagonal':\n return 'to bottom right';\n case 'horizontal':\n default:\n return 'to right';\n }\n }\n}\n\nexport type { WrGradientTextDirection } from './interfaces';\n","@if (showBorder()) {\n <span class=\"wr-gradient-text__border\" aria-hidden=\"true\"></span>\n}\n<span class=\"wr-gradient-text__text\">\n <ng-content />\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;AAYG;AASH,MAAM,cAAc,GAAsB,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;AAmBG;MAkBU,cAAc,CAAA;;IAEhB,MAAM,GAAG,KAAK,CAAoB,cAAc;+EAAC;;AAGjD,IAAA,cAAc,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,EAAA,CAAG;;IAGpD,UAAU,GAAG,KAAK,CAAC,KAAK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AA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,u2CC5D3B,wKAMA,EAAA,MAAA,EAAA,CAAA,imEAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDsDa,cAAc,EAAA,UAAA,EAAA,CAAA;kBAjB1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,aAAA,EAGb,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,KAAK,EAAE,kBAAkB;AACzB,wBAAA,kCAAkC,EAAE,cAAc;AAClD,wBAAA,0CAA0C,EAAE,gBAAgB;AAC5D,wBAAA,gCAAgC,EAAE,QAAQ;AAC1C,wBAAA,oCAAoC,EAAE,4BAA4B;AAClE,wBAAA,oCAAoC,EAAE,4BAA4B;AAClE,wBAAA,kCAAkC,EAAE,YAAY;AAChD,wBAAA,iCAAiC,EAAE,QAAQ;AAC3C,wBAAA,qCAAqC,EAAE,wBAAwB;AAChE,qBAAA,EAAA,QAAA,EAAA,wKAAA,EAAA,MAAA,EAAA,CAAA,imEAAA,CAAA,EAAA;;;AE1DH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-gradient-text.mjs","sources":["../../../projects/lib/gradient-text/gradient-text.ts","../../../projects/lib/gradient-text/gradient-text.html","../../../projects/lib/gradient-text/ngwr-gradient-text.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 * Angular adaptation of the GradientText effect by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/text-animations/gradient-text\n *\n * The reactbits version uses `motion/react` to drive `background-position`\n * via rAF. This port is pure CSS — same effect via keyframes on\n * `background-position`, parameterised by inputs.\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { numAttr } from 'ngwr/utils';\n\nimport type { WrGradientTextDirection } from './interfaces';\n\nconst DEFAULT_COLORS: readonly string[] = ['#5227FF', '#FF9FFC', '#B497CF'];\n\n/**\n * Animated multi-stop gradient text. The gradient slides across the text\n * via `background-clip: text`. Optional `[showBorder]` wraps the text in\n * a dark pill with the same animated gradient as a border ring.\n *\n * @example\n * ```html\n * <wr-gradient-text>Hello, ngwr!</wr-gradient-text>\n * <wr-gradient-text\n * [colors]=\"['#5227FF', '#FF9FFC', '#B497CF']\"\n * direction=\"diagonal\"\n * [animationSpeed]=\"6\"\n * [showBorder]=\"true\"\n * >\n * Premium feature\n * </wr-gradient-text>\n * ```\n *\n * @see https://www.reactbits.dev/text-animations/gradient-text\n */\n@Component({\n selector: 'wr-gradient-text',\n templateUrl: './gradient-text.html',\n styleUrl: './gradient-text.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-gradient-text',\n '[class.wr-gradient-text--border]': 'showBorder()',\n '[class.wr-gradient-text--pause-on-hover]': 'pauseOnHover()',\n '[class.wr-gradient-text--yoyo]': 'yoyo()',\n '[class.wr-gradient-text--vertical]': \"direction() === 'vertical'\",\n '[class.wr-gradient-text--diagonal]': \"direction() === 'diagonal'\",\n '[style.--wr-gradient-text-image]': 'gradient()',\n '[style.--wr-gradient-text-size]': 'size()',\n '[style.--wr-gradient-text-duration]': \"animationSpeed() + 's'\",\n },\n})\nexport class WrGradientText {\n /** Gradient stops. @default ['#5227FF', '#FF9FFC', '#B497CF'] */\n readonly colors = input<readonly string[]>(DEFAULT_COLORS);\n\n /** Seconds per full sweep (or per half if `[yoyo]` is on). @default 8 */\n readonly animationSpeed = input(8, { transform: numAttr(8) });\n\n /** Wrap the text in a dark pill with the gradient as a border. @default false */\n readonly showBorder = input(false, { transform: coerceBooleanProperty });\n\n /** Gradient slide direction. @default 'horizontal' */\n readonly direction = input<WrGradientTextDirection>('horizontal');\n\n /** Pause the animation while hovered. @default false */\n readonly pauseOnHover = input(false, { transform: coerceBooleanProperty });\n\n /** Bounce back-and-forth instead of restarting. @default true */\n readonly yoyo = input(true, { transform: coerceBooleanProperty });\n\n protected readonly gradient = computed(() => {\n const cols = this.colors().length > 0 ? this.colors() : DEFAULT_COLORS;\n // Duplicate the first colour at the end for seamless looping.\n const stops = [...cols, cols[0]].join(', ');\n const angle = this.directionAngle();\n return `linear-gradient(${angle}, ${stops})`;\n });\n\n protected readonly size = computed(() => {\n switch (this.direction()) {\n case 'vertical':\n return '100% 300%';\n case 'diagonal':\n return '300% 300%';\n case 'horizontal':\n default:\n return '300% 100%';\n }\n });\n\n private directionAngle(): string {\n switch (this.direction()) {\n case 'vertical':\n return 'to bottom';\n case 'diagonal':\n return 'to bottom right';\n case 'horizontal':\n default:\n return 'to right';\n }\n }\n}\n\nexport type { WrGradientTextDirection } from './interfaces';\n","@if (showBorder()) {\n <span class=\"wr-gradient-text__border\" aria-hidden=\"true\"></span>\n}\n<span class=\"wr-gradient-text__text\">\n <ng-content />\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;AAYG;AASH,MAAM,cAAc,GAAsB,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;AAmBG;MAkBU,cAAc,CAAA;;IAEhB,MAAM,GAAG,KAAK,CAAoB,cAAc;+EAAC;;AAGjD,IAAA,cAAc,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,EAAA,CAAG;;IAGpD,UAAU,GAAG,KAAK,CAAC,KAAK,kFAAI,SAAS,EA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AAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,u2CC5D3B,wKAMA,EAAA,MAAA,EAAA,CAAA,mmEAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDsDa,cAAc,EAAA,UAAA,EAAA,CAAA;kBAjB1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,aAAA,EAGb,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,KAAK,EAAE,kBAAkB;AACzB,wBAAA,kCAAkC,EAAE,cAAc;AAClD,wBAAA,0CAA0C,EAAE,gBAAgB;AAC5D,wBAAA,gCAAgC,EAAE,QAAQ;AAC1C,wBAAA,oCAAoC,EAAE,4BAA4B;AAClE,wBAAA,oCAAoC,EAAE,4BAA4B;AAClE,wBAAA,kCAAkC,EAAE,YAAY;AAChD,wBAAA,iCAAiC,EAAE,QAAQ;AAC3C,wBAAA,qCAAqC,EAAE,wBAAwB;AAChE,qBAAA,EAAA,QAAA,EAAA,wKAAA,EAAA,MAAA,EAAA,CAAA,mmEAAA,CAAA,EAAA;;;AE1DH;;AAEG;;;;"}
@@ -125,7 +125,7 @@ function isEditableTarget(target) {
125
125
  * handle.unbind();
126
126
  * ```
127
127
  *
128
- * @see https://ngwr.dev/services/hotkey
128
+ * @see https://ngwr.dev/reference/services/hotkey
129
129
  */
130
130
  class WrHotkey {
131
131
  doc = inject(DOCUMENT);
@@ -196,10 +196,10 @@ class WrHotkey {
196
196
  }
197
197
  });
198
198
  }
199
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrHotkey, deps: [], target: i0.ɵɵFactoryTarget.Service });
200
- static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.4", ngImport: i0, type: WrHotkey });
199
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrHotkey, deps: [], target: i0.ɵɵFactoryTarget.Service });
200
+ static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.0", ngImport: i0, type: WrHotkey });
201
201
  }
202
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrHotkey, decorators: [{
202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrHotkey, decorators: [{
203
203
  type: Service
204
204
  }] });
205
205
 
@@ -247,10 +247,10 @@ class WrHotkeyBinding {
247
247
  });
248
248
  inject(DestroyRef).onDestroy(() => this.handle?.unbind());
249
249
  }
250
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrHotkeyBinding, deps: [], target: i0.ɵɵFactoryTarget.Directive });
251
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.4", type: WrHotkeyBinding, isStandalone: true, selector: "[wrHotkey]", inputs: { wrHotkey: { classPropertyName: "wrHotkey", publicName: "wrHotkey", isSignal: true, isRequired: true, transformFunction: null }, scoped: { classPropertyName: "scoped", publicName: "scoped", isSignal: true, isRequired: false, transformFunction: null }, allowInInput: { classPropertyName: "allowInInput", publicName: "allowInInput", isSignal: true, isRequired: false, transformFunction: null }, preventDefault: { classPropertyName: "preventDefault", publicName: "preventDefault", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { wrHotkeyMatch: "wrHotkeyMatch" }, ngImport: i0 });
250
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrHotkeyBinding, deps: [], target: i0.ɵɵFactoryTarget.Directive });
251
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: WrHotkeyBinding, isStandalone: true, selector: "[wrHotkey]", inputs: { wrHotkey: { classPropertyName: "wrHotkey", publicName: "wrHotkey", isSignal: true, isRequired: true, transformFunction: null }, scoped: { classPropertyName: "scoped", publicName: "scoped", isSignal: true, isRequired: false, transformFunction: null }, allowInInput: { classPropertyName: "allowInInput", publicName: "allowInInput", isSignal: true, isRequired: false, transformFunction: null }, preventDefault: { classPropertyName: "preventDefault", publicName: "preventDefault", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { wrHotkeyMatch: "wrHotkeyMatch" }, ngImport: i0 });
252
252
  }
253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrHotkeyBinding, decorators: [{
253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrHotkeyBinding, decorators: [{
254
254
  type: Directive,
255
255
  args: [{ selector: '[wrHotkey]' }]
256
256
  }], ctorParameters: () => [], propDecorators: { wrHotkey: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrHotkey", required: true }] }], scoped: [{ type: i0.Input, args: [{ isSignal: true, alias: "scoped", required: false }] }], allowInInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowInInput", required: false }] }], preventDefault: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventDefault", required: false }] }], wrHotkeyMatch: [{ type: i0.Output, args: ["wrHotkeyMatch"] }] } });