ngwr 13.0.1 → 14.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 (309) hide show
  1. package/README.md +69 -13
  2. package/aurora/aurora.scss +1 -1
  3. package/aurora/styles/_dark.scss +21 -0
  4. package/aurora/styles/_index.scss +11 -30
  5. package/aurora/styles/_rules.scss +25 -0
  6. package/border-glow/styles/_dark.scss +46 -0
  7. package/border-glow/styles/_index.scss +5 -0
  8. package/border-glow/styles/_rules.scss +0 -31
  9. package/button/styles/_index.scss +16 -0
  10. package/color-picker/styles/_index.scss +43 -5
  11. package/event-calendar/styles/_index.scss +15 -0
  12. package/fesm2022/ngwr-action-sheet.mjs +3 -3
  13. package/fesm2022/ngwr-affix.mjs +3 -3
  14. package/fesm2022/ngwr-alert.mjs +7 -7
  15. package/fesm2022/ngwr-alert.mjs.map +1 -1
  16. package/fesm2022/ngwr-anchor.mjs +3 -3
  17. package/fesm2022/ngwr-aurora.mjs +4 -4
  18. package/fesm2022/ngwr-aurora.mjs.map +1 -1
  19. package/fesm2022/ngwr-avatar.mjs +3 -3
  20. package/fesm2022/ngwr-back-top.mjs +14 -4
  21. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  22. package/fesm2022/ngwr-badge.mjs +6 -6
  23. package/fesm2022/ngwr-bar-chart.mjs +3 -3
  24. package/fesm2022/ngwr-blur-text.mjs +16 -5
  25. package/fesm2022/ngwr-blur-text.mjs.map +1 -1
  26. package/fesm2022/ngwr-border-glow.mjs +4 -4
  27. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  28. package/fesm2022/ngwr-breadcrumbs.mjs +7 -7
  29. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  30. package/fesm2022/ngwr-burger.mjs +3 -3
  31. package/fesm2022/ngwr-button.mjs +88 -10
  32. package/fesm2022/ngwr-button.mjs.map +1 -1
  33. package/fesm2022/ngwr-calendar-heatmap.mjs +3 -3
  34. package/fesm2022/ngwr-calendar-testing.mjs +15 -0
  35. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  36. package/fesm2022/ngwr-calendar.mjs +53 -7
  37. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  38. package/fesm2022/ngwr-card.mjs +9 -9
  39. package/fesm2022/ngwr-carousel.mjs +6 -6
  40. package/fesm2022/ngwr-cascader.mjs +4 -4
  41. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  42. package/fesm2022/ngwr-checkbox.mjs +6 -6
  43. package/fesm2022/ngwr-circular-text.mjs +23 -4
  44. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  45. package/fesm2022/ngwr-click-spark.mjs +3 -3
  46. package/fesm2022/ngwr-clipboard.mjs +3 -3
  47. package/fesm2022/ngwr-collapse.mjs +9 -9
  48. package/fesm2022/ngwr-collapse.mjs.map +1 -1
  49. package/fesm2022/ngwr-color-picker-testing.mjs +23 -7
  50. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  51. package/fesm2022/ngwr-color-picker.mjs +93 -14
  52. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  53. package/fesm2022/ngwr-command-palette.mjs +29 -5
  54. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  55. package/fesm2022/ngwr-compare.mjs +3 -3
  56. package/fesm2022/ngwr-confetti.mjs +3 -3
  57. package/fesm2022/ngwr-context-menu.mjs +18 -12
  58. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  59. package/fesm2022/ngwr-cookie.mjs +3 -3
  60. package/fesm2022/ngwr-counter.mjs +6 -6
  61. package/fesm2022/ngwr-date-adapters-fns.mjs +104 -36
  62. package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -1
  63. package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
  64. package/fesm2022/ngwr-date-picker-testing.mjs +10 -2
  65. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  66. package/fesm2022/ngwr-date-picker.mjs +118 -28
  67. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  68. package/fesm2022/ngwr-date.mjs +483 -82
  69. package/fesm2022/ngwr-date.mjs.map +1 -1
  70. package/fesm2022/ngwr-decrypt-text.mjs +3 -3
  71. package/fesm2022/ngwr-density.mjs +6 -6
  72. package/fesm2022/ngwr-descriptions.mjs +6 -6
  73. package/fesm2022/ngwr-dialog.mjs +15 -15
  74. package/fesm2022/ngwr-directives.mjs +12 -12
  75. package/fesm2022/ngwr-divider.mjs +3 -3
  76. package/fesm2022/ngwr-donut-chart.mjs +3 -3
  77. package/fesm2022/ngwr-drag-drop.mjs +37 -9
  78. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  79. package/fesm2022/ngwr-drawer.mjs +18 -18
  80. package/fesm2022/ngwr-dropdown.mjs +29 -12
  81. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  82. package/fesm2022/ngwr-empty.mjs +3 -3
  83. package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -1
  84. package/fesm2022/ngwr-event-calendar.mjs +6 -6
  85. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  86. package/fesm2022/ngwr-falling-text.mjs +3 -3
  87. package/fesm2022/ngwr-file-upload.mjs +55 -15
  88. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  89. package/fesm2022/ngwr-form-testing.mjs +13 -7
  90. package/fesm2022/ngwr-form-testing.mjs.map +1 -1
  91. package/fesm2022/ngwr-form.mjs +44 -25
  92. package/fesm2022/ngwr-form.mjs.map +1 -1
  93. package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
  94. package/fesm2022/ngwr-gauge.mjs +3 -3
  95. package/fesm2022/ngwr-glitch-text.mjs +3 -3
  96. package/fesm2022/ngwr-gradient-text.mjs +3 -3
  97. package/fesm2022/ngwr-hotkey.mjs +6 -6
  98. package/fesm2022/ngwr-i18n-en.mjs +63 -1
  99. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  100. package/fesm2022/ngwr-i18n-ru.mjs +28 -1
  101. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  102. package/fesm2022/ngwr-i18n.mjs +159 -31
  103. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  104. package/fesm2022/ngwr-icon.mjs +6 -6
  105. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  106. package/fesm2022/ngwr-input-number.mjs +5 -5
  107. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  108. package/fesm2022/ngwr-input-otp.mjs +23 -5
  109. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  110. package/fesm2022/ngwr-input.mjs +37 -26
  111. package/fesm2022/ngwr-input.mjs.map +1 -1
  112. package/fesm2022/ngwr-keyboard.mjs +3 -3
  113. package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
  114. package/fesm2022/ngwr-knob.mjs +22 -4
  115. package/fesm2022/ngwr-knob.mjs.map +1 -1
  116. package/fesm2022/ngwr-layout.mjs +15 -15
  117. package/fesm2022/ngwr-lightbox.mjs +4 -4
  118. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  119. package/fesm2022/ngwr-line-chart.mjs +3 -3
  120. package/fesm2022/ngwr-list.mjs +7 -7
  121. package/fesm2022/ngwr-list.mjs.map +1 -1
  122. package/fesm2022/ngwr-loading-bar-router.mjs +73 -0
  123. package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -0
  124. package/fesm2022/ngwr-loading-bar.mjs +27 -38
  125. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  126. package/fesm2022/ngwr-markdown.mjs +6 -6
  127. package/fesm2022/ngwr-marquee.mjs +3 -3
  128. package/fesm2022/ngwr-media.mjs +3 -3
  129. package/fesm2022/ngwr-mention.mjs +109 -19
  130. package/fesm2022/ngwr-mention.mjs.map +1 -1
  131. package/fesm2022/ngwr-meta.mjs +6 -6
  132. package/fesm2022/ngwr-meter-group.mjs +3 -3
  133. package/fesm2022/ngwr-overlay.mjs +6 -6
  134. package/fesm2022/ngwr-page-header.mjs +3 -3
  135. package/fesm2022/ngwr-pagination-testing.mjs +11 -10
  136. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
  137. package/fesm2022/ngwr-pagination.mjs +67 -32
  138. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  139. package/fesm2022/ngwr-pipes.mjs +21 -21
  140. package/fesm2022/ngwr-platform.mjs +9 -9
  141. package/fesm2022/ngwr-popconfirm.mjs +7 -6
  142. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  143. package/fesm2022/ngwr-popover.mjs +7 -6
  144. package/fesm2022/ngwr-popover.mjs.map +1 -1
  145. package/fesm2022/ngwr-progress.mjs +3 -3
  146. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  147. package/fesm2022/ngwr-qr.mjs +3 -3
  148. package/fesm2022/ngwr-radio.mjs +6 -6
  149. package/fesm2022/ngwr-rating.mjs +48 -22
  150. package/fesm2022/ngwr-rating.mjs.map +1 -1
  151. package/fesm2022/ngwr-result.mjs +12 -12
  152. package/fesm2022/ngwr-rotating-text.mjs +3 -3
  153. package/fesm2022/ngwr-scroll.mjs +3 -3
  154. package/fesm2022/ngwr-segmented.mjs +12 -8
  155. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  156. package/fesm2022/ngwr-select.mjs +217 -59
  157. package/fesm2022/ngwr-select.mjs.map +1 -1
  158. package/fesm2022/ngwr-shiny-text.mjs +7 -7
  159. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  160. package/fesm2022/ngwr-sidebar.mjs +3 -3
  161. package/fesm2022/ngwr-skeleton.mjs +3 -3
  162. package/fesm2022/ngwr-slider.mjs +12 -8
  163. package/fesm2022/ngwr-slider.mjs.map +1 -1
  164. package/fesm2022/ngwr-sparkline.mjs +3 -3
  165. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  166. package/fesm2022/ngwr-spinner.mjs +3 -3
  167. package/fesm2022/ngwr-splash-cursor.mjs +3 -3
  168. package/fesm2022/ngwr-split-text.mjs +3 -3
  169. package/fesm2022/ngwr-splitter-testing.mjs.map +1 -1
  170. package/fesm2022/ngwr-splitter.mjs +3 -3
  171. package/fesm2022/ngwr-spotlight-card.mjs +7 -7
  172. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  173. package/fesm2022/ngwr-squircle.mjs +7 -6
  174. package/fesm2022/ngwr-squircle.mjs.map +1 -1
  175. package/fesm2022/ngwr-star-border.mjs +4 -4
  176. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  177. package/fesm2022/ngwr-statistic.mjs +44 -13
  178. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  179. package/fesm2022/ngwr-stepper.mjs +6 -6
  180. package/fesm2022/ngwr-storage.mjs +11 -3
  181. package/fesm2022/ngwr-storage.mjs.map +1 -1
  182. package/fesm2022/ngwr-switch.mjs +3 -3
  183. package/fesm2022/ngwr-table.mjs +51 -28
  184. package/fesm2022/ngwr-table.mjs.map +1 -1
  185. package/fesm2022/ngwr-tabs-router.mjs +158 -0
  186. package/fesm2022/ngwr-tabs-router.mjs.map +1 -0
  187. package/fesm2022/ngwr-tabs-testing.mjs +13 -11
  188. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  189. package/fesm2022/ngwr-tabs.mjs +104 -16
  190. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  191. package/fesm2022/ngwr-textarea.mjs +46 -6
  192. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  193. package/fesm2022/ngwr-theme.mjs +90 -4
  194. package/fesm2022/ngwr-theme.mjs.map +1 -1
  195. package/fesm2022/ngwr-tilt-card.mjs +7 -7
  196. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  197. package/fesm2022/ngwr-timeline.mjs +6 -6
  198. package/fesm2022/ngwr-toast.mjs +116 -11
  199. package/fesm2022/ngwr-toast.mjs.map +1 -1
  200. package/fesm2022/ngwr-toolbar.mjs +3 -3
  201. package/fesm2022/ngwr-tour.mjs +6 -6
  202. package/fesm2022/ngwr-tour.mjs.map +1 -1
  203. package/fesm2022/ngwr-transfer.mjs +4 -4
  204. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  205. package/fesm2022/ngwr-tree.mjs +35 -12
  206. package/fesm2022/ngwr-tree.mjs.map +1 -1
  207. package/fesm2022/ngwr-typewriter.mjs +3 -3
  208. package/fesm2022/ngwr-typography.mjs +3 -3
  209. package/fesm2022/ngwr-utils.mjs +37 -1
  210. package/fesm2022/ngwr-utils.mjs.map +1 -1
  211. package/fesm2022/ngwr-version.mjs +1 -1
  212. package/fesm2022/ngwr-version.mjs.map +1 -1
  213. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  214. package/fesm2022/ngwr-waves.mjs +4 -4
  215. package/fesm2022/ngwr-waves.mjs.map +1 -1
  216. package/fesm2022/ngwr-window-testing.mjs +10 -2
  217. package/fesm2022/ngwr-window-testing.mjs.map +1 -1
  218. package/fesm2022/ngwr-window.mjs +15 -15
  219. package/fesm2022/ngwr-window.mjs.map +1 -1
  220. package/i18n/en.json +33 -6
  221. package/i18n/ru.json +33 -6
  222. package/llms-full.txt +29 -20
  223. package/llms.txt +127 -25
  224. package/mcp/catalog.js +3 -3
  225. package/mcp/providers.js +11 -0
  226. package/package.json +9 -1
  227. package/schematics/migrations/v13/index.js +101 -0
  228. package/schematics/migrations/v14/index.js +422 -0
  229. package/schematics/migrations.json +10 -0
  230. package/schematics/page/templates.js +1 -1
  231. package/schematics/use/symbol-map.json +1 -0
  232. package/shiny-text/styles/_dark.scss +20 -0
  233. package/shiny-text/styles/_index.scss +5 -0
  234. package/shiny-text/styles/_rules.scss +0 -4
  235. package/skills/ngwr/SKILL.md +4 -1
  236. package/skills/ngwr/references/catalog.md +2 -0
  237. package/skills/ngwr/references/setup.md +4 -0
  238. package/spotlight-card/styles/_dark.scss +21 -0
  239. package/spotlight-card/styles/_index.scss +5 -0
  240. package/spotlight-card/styles/_rules.scss +0 -6
  241. package/star-border/styles/_dark.scss +21 -0
  242. package/star-border/styles/_index.scss +5 -0
  243. package/star-border/styles/_rules.scss +0 -5
  244. package/stepper/styles/_index.scss +19 -1
  245. package/textarea/styles/_index.scss +14 -6
  246. package/theme/styles/_colors.scss +102 -0
  247. package/theme/styles/_focus.scss +31 -1
  248. package/tilt-card/styles/_dark.scss +21 -0
  249. package/tilt-card/styles/_index.scss +5 -0
  250. package/tilt-card/styles/_rules.scss +0 -5
  251. package/toast/styles/_index.scss +12 -4
  252. package/types/ngwr-alert.d.ts +3 -3
  253. package/types/ngwr-blur-text.d.ts +8 -0
  254. package/types/ngwr-button.d.ts +45 -2
  255. package/types/ngwr-calendar-testing.d.ts +21 -4
  256. package/types/ngwr-calendar.d.ts +37 -0
  257. package/types/ngwr-circular-text.d.ts +9 -0
  258. package/types/ngwr-collapse.d.ts +19 -15
  259. package/types/ngwr-color-picker-testing.d.ts +10 -4
  260. package/types/ngwr-color-picker.d.ts +70 -2
  261. package/types/ngwr-command-palette.d.ts +14 -0
  262. package/types/ngwr-context-menu.d.ts +1 -1
  263. package/types/ngwr-date-adapters-fns.d.ts +71 -29
  264. package/types/ngwr-date-picker-testing.d.ts +206 -185
  265. package/types/ngwr-date-picker.d.ts +7 -0
  266. package/types/ngwr-date.d.ts +143 -13
  267. package/types/ngwr-drag-drop.d.ts +19 -0
  268. package/types/ngwr-dropdown.d.ts +18 -2
  269. package/types/ngwr-event-calendar-testing.d.ts +12 -9
  270. package/types/ngwr-file-upload.d.ts +31 -3
  271. package/types/ngwr-form-testing.d.ts +13 -7
  272. package/types/ngwr-form.d.ts +47 -12
  273. package/types/ngwr-i18n.d.ts +89 -7
  274. package/types/ngwr-input-number.d.ts +1 -1
  275. package/types/ngwr-input-otp.d.ts +3 -0
  276. package/types/ngwr-input.d.ts +13 -5
  277. package/types/ngwr-knob-testing.d.ts +8 -4
  278. package/types/ngwr-knob.d.ts +18 -0
  279. package/types/ngwr-loading-bar-router.d.ts +35 -0
  280. package/types/ngwr-loading-bar.d.ts +19 -9
  281. package/types/ngwr-mention.d.ts +13 -0
  282. package/types/ngwr-pagination-testing.d.ts +11 -10
  283. package/types/ngwr-pagination.d.ts +39 -10
  284. package/types/ngwr-popconfirm.d.ts +1 -1
  285. package/types/ngwr-popover.d.ts +1 -1
  286. package/types/ngwr-rating.d.ts +25 -4
  287. package/types/ngwr-segmented.d.ts +1 -0
  288. package/types/ngwr-select.d.ts +110 -19
  289. package/types/ngwr-slider.d.ts +1 -0
  290. package/types/ngwr-splitter-testing.d.ts +9 -4
  291. package/types/ngwr-squircle.d.ts +1 -1
  292. package/types/ngwr-statistic.d.ts +22 -2
  293. package/types/ngwr-storage.d.ts +39 -1
  294. package/types/ngwr-table.d.ts +24 -5
  295. package/types/ngwr-tabs-router.d.ts +67 -0
  296. package/types/ngwr-tabs-testing.d.ts +12 -10
  297. package/types/ngwr-tabs.d.ts +103 -6
  298. package/types/ngwr-textarea.d.ts +29 -0
  299. package/types/ngwr-theme.d.ts +92 -2
  300. package/types/ngwr-toast.d.ts +53 -0
  301. package/types/ngwr-tree.d.ts +10 -2
  302. package/types/ngwr-utils.d.ts +33 -1
  303. package/types/ngwr-version.d.ts +1 -1
  304. package/types/ngwr-window-testing.d.ts +11 -3
  305. package/types/ngwr-window.d.ts +11 -4
  306. package/waves/styles/_dark.scss +19 -0
  307. package/waves/styles/_index.scss +5 -0
  308. package/waves/styles/_rules.scss +0 -3
  309. package/window/styles/_index.scss +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-utils.mjs","sources":["../../../projects/lib/utils/guards/is-defined.ts","../../../projects/lib/utils/guards/is-non-empty-array.ts","../../../projects/lib/utils/guards/is-observable.ts","../../../projects/lib/utils/math/clamp.ts","../../../projects/lib/utils/math/round.ts","../../../projects/lib/utils/coercion/num-attr.ts","../../../projects/lib/utils/css-value/is-safe-css-value.ts","../../../projects/lib/utils/dom/get-root-font-size.ts","../../../projects/lib/utils/dom/focus.ts","../../../projects/lib/utils/css-size/resolve-css-size.ts","../../../projects/lib/utils/id/random-id.ts","../../../projects/lib/utils/fn/noop.ts","../../../projects/lib/utils/fn/debounce.ts","../../../projects/lib/utils/fn/throttle.ts","../../../projects/lib/utils/keyboard/keys.ts","../../../projects/lib/utils/keyboard/predicates.ts","../../../projects/lib/utils/log/badge-log.ts","../../../projects/lib/utils/public-api.ts","../../../projects/lib/utils/ngwr-utils.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 type { Maybe } from '../interfaces';\n\n/**\n * Type guard that checks if a value is neither `null` nor `undefined`.\n *\n * @example\n * ```ts\n * const maybeValue: Maybe<number> = getValue();\n *\n * if (isDefined(maybeValue)) {\n * // here maybeValue is number\n * console.log(maybeValue.toFixed(2));\n * }\n * ```\n *\n * @see {@link Maybe}\n */\nexport function isDefined<T>(value: Maybe<T>): value is T {\n return value !== null && value !== undefined;\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 type { Maybe } from '../interfaces';\n\n/**\n * Type guard that checks if a value is an array with at least one element.\n *\n * @example\n * ```ts\n * const items: Maybe<string[]> = getItems();\n *\n * if (isNonEmptyArray(items)) {\n * // items is string[]\n * console.log(items[0]);\n * }\n * ```\n */\nexport function isNonEmptyArray<T>(value: Maybe<T[]>): value is [T, ...T[]] {\n return Array.isArray(value) && value.length > 0;\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 type { Observable } from 'rxjs';\n\n/**\n * Type guard that checks whether a value looks like an RxJS `Observable`.\n *\n * Uses duck-typing: verifies that the object has a `subscribe` function.\n * Does not require an actual `Observable` instance.\n *\n * @example\n * ```ts\n * if (isObservable(stream)) {\n * stream.subscribe(value => console.log(value));\n * }\n * ```\n */\nexport function isObservable<T = unknown>(value: unknown): value is Observable<T> {\n return !!value && typeof (value as { subscribe?: unknown }).subscribe === 'function';\n}\n","/**\n * Clamps `value` into the inclusive `[min, max]` range.\n *\n * @example\n * ```ts\n * clamp(140, 0, 100); // 100\n * clamp(-3, 0, 100); // 0\n * clamp(42, 0, 100); // 42\n * ```\n */\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, value));\n}\n","/**\n * Rounds `value` to `decimals` fraction digits, compensating the usual\n * floating point drift (`0.1 + 0.2` rounds to `0.3`, not `0.30000000000000004`).\n *\n * @example\n * ```ts\n * round(0.1 + 0.2, 2); // 0.3\n * round(1.005, 2); // 1.01\n * round(7.4); // 7\n * ```\n */\nexport function round(value: number, decimals = 0): number {\n const factor = 10 ** decimals;\n return Math.round((value + Number.EPSILON) * factor) / factor;\n}\n","import { coerceNumberProperty } from '@angular/cdk/coercion';\n\n/**\n * Input-transform factory: coerces any bound value to a number, falling\n * back to `fallback` for `null` / `undefined` / unparsable input. The\n * standard transform for numeric `input()`s across ngwr.\n *\n * @example\n * ```ts\n * readonly speed = input(4, { transform: numAttr(4) });\n * ```\n */\nexport const numAttr =\n (fallback: number) =>\n (value: unknown): number =>\n coerceNumberProperty(value, fallback);\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** Longest value worth composing. A colour is never near this. */\nconst MAX_LENGTH = 256;\n\n/**\n * Characters that end a declaration, open a string, or start a comment — none\n * of which belong in a value the library is about to wrap its own syntax around.\n */\nconst FORBIDDEN = /[;{}\"'\\\\@<>!]|\\/\\*|\\*\\//;\n\n/** Function name immediately preceding an open paren. */\nconst FUNCTION_NAME = /([\\w-]*)\\($/;\n\n/**\n * Functions a composed value may call. Every image-producing function is absent\n * on purpose — `url()`, `image-set()`, `cross-fade()`, `element()`, `paint()` —\n * because fetching is the whole impact of this class.\n */\nconst ALLOWED_FUNCTIONS = new Set([\n 'rgb',\n 'rgba',\n 'hsl',\n 'hsla',\n 'hwb',\n 'lab',\n 'lch',\n 'oklab',\n 'oklch',\n 'color',\n 'color-mix',\n 'light-dark',\n 'var',\n 'calc',\n 'min',\n 'max',\n 'clamp',\n]);\n\n/**\n * Answers whether a value can be composed **into** a larger CSS expression\n * without escaping the slot it was given — a colour inside a `linear-gradient()`\n * the component builds, an entry the component joins into a custom property a\n * stylesheet then substitutes.\n *\n * It is a containment check, not a colour parser. It says the value cannot\n * terminate the construct the library wrapped around it; it says nothing about\n * whether the value is a colour a browser will accept, and a rejected value\n * should fall back to the component's own default rather than be repaired.\n *\n * **A value bound straight to `[style.background]` needs none of this.** There\n * is nothing to break out of there, and Angular applies style values through\n * CSSOM by design — validating those would amount to refusing style values in a\n * style binding.\n *\n * Rejected, and each one is a way out of the slot:\n *\n * - a `)` the value never opened — `red), url(…), linear-gradient(red` is the\n * shape that turns a colour into an extra background layer the browser fetches;\n * - a top-level `,` — a `<color>` is one value, so a comma at depth 0 means the\n * payload has reached the slot next to the one it was handed;\n * - `;` `{` `}` a quote, a backslash, `!`, or a CSS comment delimiter;\n * - any function outside {@link ALLOWED_FUNCTIONS} — `url()` above all.\n *\n * Top-level whitespace is allowed: `red 20%` is a legitimate gradient stop, and\n * without a comma or a bare `)` it cannot reach anything.\n *\n * @example\n * ```ts\n * isSafeCssValue('var(--wr-color-primary)'); // true\n * isSafeCssValue('color-mix(in srgb, red 50%, blue)'); // true\n * isSafeCssValue('red), url(\"https://x.test/beacon\"), linear-gradient(red'); // false\n * ```\n *\n * @param value Raw value handed to the component.\n * @returns `true` when the value stays inside its slot.\n */\nexport function isSafeCssValue(value: string): boolean {\n if (typeof value !== 'string') return false;\n\n const trimmed = value.trim();\n if (trimmed === '' || trimmed.length > MAX_LENGTH) return false;\n if (FORBIDDEN.test(trimmed)) return false;\n\n let depth = 0;\n for (let i = 0; i < trimmed.length; i++) {\n const char = trimmed[i];\n\n if (char === '(') {\n const name = FUNCTION_NAME.exec(trimmed.slice(0, i + 1));\n if (!name || !ALLOWED_FUNCTIONS.has(name[1].toLowerCase())) return false;\n depth++;\n } else if (char === ')') {\n depth--;\n if (depth < 0) return false;\n } else if (depth === 0 && char === ',') {\n return false;\n }\n }\n\n return depth === 0;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * Reads the root font size (in pixels) from\n * `getComputedStyle(document.documentElement).fontSize`.\n *\n * Typical use case: converting `rem` values to pixels for layout calculations.\n *\n * Falls back to the provided value when:\n * - DOM is not available (SSR);\n * - `getComputedStyle` fails or returns an unparseable value.\n *\n * @example\n * ```ts\n * const rootFontSize = getRootFontSize(); // e.g. 16\n * const customFallback = getRootFontSize(14); // uses 14 if DOM is unavailable\n * ```\n *\n * @param fallback - Value in pixels when DOM is unavailable. Defaults to `16`.\n * @returns Root font size in pixels.\n */\nexport function getRootFontSize(fallback = 16): number {\n try {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n return fallback;\n }\n\n const raw = window.getComputedStyle(document.documentElement).fontSize;\n const parsed = Number.parseFloat(raw);\n\n return Number.isFinite(parsed) ? parsed : fallback;\n } catch {\n return fallback;\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\nconst FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'area[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\n/** Return every focusable descendant of `root` in DOM order. */\nexport function getFocusableElements(root: HTMLElement): readonly HTMLElement[] {\n return Array.from(root.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)).filter(\n el => el.offsetParent !== null || el === document.activeElement\n );\n}\n\n/**\n * Trap Tab navigation inside `root` for a keyboard event — call from a\n * `keydown` handler. Cycles focus from first ↔ last focusable element.\n * Returns `true` when focus was redirected (event was handled).\n */\nexport function trapFocus(root: HTMLElement, event: KeyboardEvent): boolean {\n if (event.key !== 'Tab') return false;\n const focusable = getFocusableElements(root);\n if (focusable.length === 0) return false;\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const active = document.activeElement as HTMLElement | null;\n\n if (event.shiftKey && active === first) {\n event.preventDefault();\n last.focus();\n return true;\n }\n if (!event.shiftKey && active === last) {\n event.preventDefault();\n first.focus();\n return true;\n }\n return false;\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 { getRootFontSize } from '../dom';\n\nimport type { ResolveCssSizeOptions } from './resolve-css-size-options';\nimport type { ResolvedCssSize } from './resolved-css-size';\n\n/**\n * Resolves a raw size value into a CSS string and an optional pixel equivalent.\n *\n * Supported formats:\n * - `number` → pixels (`48` → `\"48px\"`)\n * - `\"12px\"` → pixels (`\"12px\"` → `\"12px\"`)\n * - `\"3rem\"` → rems via root (`\"3rem\"` → `\"3rem\"`, pxValue = 3 × root font size)\n * - `\"80%\"` → percentage (`\"80%\"` → `\"80%\"`, pxValue = null)\n * - `\"15\"` → pixels (`\"15\"` → `\"15px\"`)\n * - anything else → passed through as-is, pxValue = null\n *\n * @example\n * ```ts\n * const size = resolveCssSize('3rem', { defaultValue: '6rem' });\n * // size.cssValue === '3rem'\n * // size.pxValue === 3 * getRootFontSize()\n * ```\n *\n * @param raw - Value to resolve. Accepts numbers, pixel/rem/percent strings, or `null`/`undefined`.\n * @param options - Optional configuration.\n * @returns Resolved CSS value and its pixel equivalent when computable.\n *\n * @see {@link ResolvedCssSize}\n * @see {@link ResolveCssSizeOptions}\n */\nexport function resolveCssSize(raw: unknown, options: ResolveCssSizeOptions = {}): ResolvedCssSize {\n const rootFontSize = getRootFontSize();\n const value: unknown = raw ?? options.defaultValue;\n\n if (value == null) {\n return { cssValue: '0px', pxValue: 0 };\n }\n\n if (typeof value === 'number' && Number.isFinite(value)) {\n return { cssValue: `${value}px`, pxValue: value };\n }\n\n if (typeof value !== 'string') {\n return { cssValue: '0px', pxValue: 0 };\n }\n\n const trimmed = value.trim();\n\n const remMatch = /^([\\d.]+)\\s*rem$/i.exec(trimmed);\n if (remMatch) {\n const rem = Number.parseFloat(remMatch[1]);\n const px = rem * rootFontSize;\n return { cssValue: `${rem}rem`, pxValue: Number.isFinite(px) ? px : null };\n }\n\n const pxMatch = /^([\\d.]+)\\s*px$/i.exec(trimmed);\n if (pxMatch) {\n const px = Number.parseFloat(pxMatch[1]);\n return { cssValue: `${px}px`, pxValue: Number.isFinite(px) ? px : null };\n }\n\n const percentMatch = /^([\\d.]+)\\s*%$/.exec(trimmed);\n if (percentMatch) {\n return { cssValue: `${percentMatch[1]}%`, pxValue: null };\n }\n\n const numberMatch = /^([\\d.]+)$/.exec(trimmed);\n if (numberMatch) {\n const px = Number.parseFloat(numberMatch[1]);\n return { cssValue: `${px}px`, pxValue: Number.isFinite(px) ? px : null };\n }\n\n return { cssValue: trimmed, pxValue: null };\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\nconst ALPHABET = 'abcdefghijklmnopqrstuvwxyz0123456789';\nconst MIN_LENGTH = 4;\nconst MAX_LENGTH = 64;\nconst DEFAULT_LENGTH = 12;\n\n/**\n * Returns random bytes using the best available source.\n *\n * @internal\n */\nfunction defaultRandomBytes(count: number): Uint8Array {\n // Covers: all browsers, Node ≥ 18, Deno, Bun, Cloudflare Workers\n if (typeof crypto !== 'undefined' && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(count));\n }\n\n // Fallback: Node < 18 or exotic runtimes\n const buf = new Uint8Array(count);\n for (let i = 0; i < count; i++) {\n buf[i] = Math.floor(Math.random() * 256);\n }\n return buf;\n}\n\n/**\n * Generates a pseudo-random, DOM-safe identifier.\n *\n * Produced ids:\n * - are prefixed to avoid collisions with host-application ids;\n * - contain only `[a-z0-9-]` characters;\n * - use `crypto.getRandomValues` when available, falling back to `Math.random`.\n *\n * **Not suitable for cryptographic or security-sensitive purposes** —\n * intended only for UI element identifiers (`id`, `for`, `aria-*`, etc.).\n *\n * @example\n * ```ts\n * randomId();\n * // → \"wr-a8f2bx1k9q4z\"\n *\n * randomId('ng', 8);\n * // → \"ng-k2f9mbeo\"\n *\n * randomId('wr', 24);\n * // → \"wr-a8f2bx1k9q4zmneo73wplr\"\n * ```\n *\n * @param prefix - Namespace prefix prepended before the random segment. Defaults to `'wr'`.\n * @param length - Length of the random segment. Clamped to `[4, 64]`. Defaults to `12`.\n * @param random - Custom random byte source `(byteLength) => Uint8Array`.\n * When omitted, uses `crypto.getRandomValues` with a `Math.random` fallback.\n * @returns A pseudo-random id string matching `/^[a-z]+-[a-z0-9]+$/`.\n */\nexport function randomId(prefix = 'wr', length = DEFAULT_LENGTH, random?: (byteLength: number) => Uint8Array): string {\n const safeLength = Math.min(Math.max(Math.trunc(length), MIN_LENGTH), MAX_LENGTH);\n\n const bytes = random ? random(safeLength) : defaultRandomBytes(safeLength);\n\n let result = '';\n for (let i = 0; i < safeLength; i++) {\n result += ALPHABET[bytes[i] % ALPHABET.length];\n }\n\n return `${prefix}-${result}`;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * A function that does nothing.\n *\n * Useful as a default callback, placeholder event handler,\n * or to explicitly signal intentional no-ops.\n *\n * @example\n * ```ts\n * @Component({ ... })\n * export class MyComponent {\n * onTouched: () => void = noop;\n * }\n * ```\n */\nexport const noop = (): void => undefined;\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** A debounced function — same signature as the original plus `cancel`. */\nexport type WrDebouncedFn<TArgs extends readonly unknown[]> = ((...args: TArgs) => void) & {\n readonly cancel: () => void;\n};\n\n/**\n * Wrap `fn` so it only fires `waitMs` after the last invocation.\n * Useful for resize / scroll / input handlers.\n *\n * @example\n * ```ts\n * const onResize = debounce(() => recalcLayout(), 150);\n * window.addEventListener('resize', onResize);\n * ```\n */\nexport function debounce<TArgs extends readonly unknown[]>(\n fn: (...args: TArgs) => void,\n waitMs: number\n): WrDebouncedFn<TArgs> {\n let timer: ReturnType<typeof setTimeout> | null = null;\n\n const debounced = (...args: TArgs): void => {\n if (timer !== null) clearTimeout(timer);\n timer = setTimeout(() => {\n timer = null;\n fn(...args);\n }, waitMs);\n };\n\n debounced.cancel = (): void => {\n if (timer !== null) {\n clearTimeout(timer);\n timer = null;\n }\n };\n\n return debounced;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** A throttled function — same signature as the original plus `cancel`. */\nexport type WrThrottledFn<TArgs extends readonly unknown[]> = ((...args: TArgs) => void) & {\n readonly cancel: () => void;\n};\n\n/**\n * Wrap `fn` so it fires at most once every `waitMs`. Leading-edge call\n * fires immediately; trailing-edge call fires once at the end of the window\n * if there were further invocations.\n */\nexport function throttle<TArgs extends readonly unknown[]>(\n fn: (...args: TArgs) => void,\n waitMs: number\n): WrThrottledFn<TArgs> {\n let lastInvoke = 0;\n let trailingTimer: ReturnType<typeof setTimeout> | null = null;\n let pendingArgs: TArgs | null = null;\n\n const throttled = (...args: TArgs): void => {\n const now = Date.now();\n const remaining = waitMs - (now - lastInvoke);\n\n if (remaining <= 0) {\n if (trailingTimer !== null) {\n clearTimeout(trailingTimer);\n trailingTimer = null;\n }\n lastInvoke = now;\n fn(...args);\n } else {\n pendingArgs = args;\n trailingTimer ??= setTimeout(() => {\n lastInvoke = Date.now();\n trailingTimer = null;\n if (pendingArgs) fn(...pendingArgs);\n pendingArgs = null;\n }, remaining);\n }\n };\n\n throttled.cancel = (): void => {\n if (trailingTimer !== null) {\n clearTimeout(trailingTimer);\n trailingTimer = null;\n }\n pendingArgs = null;\n lastInvoke = 0;\n };\n\n return throttled;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * Canonical `KeyboardEvent.key` values for your own `keydown` handlers.\n *\n * The spec spellings are easy to get wrong — arrows are `ArrowUp`, space is a\n * literal `' '` — and a typo like `'Esacpe'` never matches and never errors.\n * These give you autocomplete and the {@link WrKey} union to match against.\n */\nexport const KEYS = {\n ENTER: 'Enter',\n ESCAPE: 'Escape',\n TAB: 'Tab',\n SPACE: ' ',\n BACKSPACE: 'Backspace',\n DELETE: 'Delete',\n ARROW_UP: 'ArrowUp',\n ARROW_DOWN: 'ArrowDown',\n ARROW_LEFT: 'ArrowLeft',\n ARROW_RIGHT: 'ArrowRight',\n HOME: 'Home',\n END: 'End',\n PAGE_UP: 'PageUp',\n PAGE_DOWN: 'PageDown',\n} as const;\n\nexport type WrKey = (typeof KEYS)[keyof typeof KEYS];\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** True when any modifier key (Ctrl / Cmd / Alt / Shift / Meta) is held. */\nexport function hasModifier(event: KeyboardEvent): boolean {\n return event.ctrlKey || event.altKey || event.metaKey || event.shiftKey;\n}\n\n/**\n * True when the key is a single printable character (letters, digits,\n * punctuation, etc.). Skips function keys, arrows, modifiers, and named\n * keys like `Backspace` or `Tab`.\n */\nexport function isPrintableKey(event: KeyboardEvent): boolean {\n return event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * Logs a coloured pill to the browser console followed by a payload.\n *\n * Useful when you need to scan a noisy console for a specific subsystem's\n * messages. The pill is rendered with the CSS `%c` console formatting trick.\n *\n * @example\n * ```ts\n * badgeLog('icons', '#3969e2', { name: 'plus', registered: true });\n * // → [icons] { name: 'plus', registered: true }\n * ```\n *\n * @param badgeText Short label shown inside the pill.\n * @param color CSS colour applied to the pill border and text.\n * @param message Anything you'd pass to `console.log` as the second argument.\n *\n * @internal\n */\nexport function badgeLog(badgeText: string, color: string, message: unknown): void {\n const style = `\n display: inline-block;\n border: 1px solid ${color};\n color: ${color};\n padding: 1px 3px;\n border-radius: 4px;\n margin-right: 0\n `;\n // eslint-disable-next-line no-console -- this helper exists to log\n console.log(`%c${badgeText}`, style, message);\n}\n","// Types\nexport type { Maybe, SafeAny } from './interfaces';\n\n// Guards\nexport { isDefined, isNonEmptyArray, isObservable } from './guards';\n\n// Math\nexport { clamp, round } from './math';\n\n// Coercion\nexport { numAttr } from './coercion';\n\n// CSS value\nexport { isSafeCssValue } from './css-value';\n\n// CSS size\nexport { resolveCssSize } from './css-size';\nexport type { ResolveCssSizeOptions, ResolvedCssSize } from './css-size';\n\n// DOM\nexport { getRootFontSize, getFocusableElements, trapFocus } from './dom';\n\n// ID\nexport { randomId } from './id';\n\n// Fn\nexport { noop, debounce, throttle } from './fn';\nexport type { WrDebouncedFn, WrThrottledFn } from './fn';\n\n// Keyboard\nexport { KEYS, hasModifier, isPrintableKey } from './keyboard';\nexport type { WrKey } from './keyboard';\n\n// Log\nexport { badgeLog } from './log';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["MAX_LENGTH"],"mappings":";;AAAA;;;;;AAKG;AAIH;;;;;;;;;;;;;;AAcG;AACG,SAAU,SAAS,CAAI,KAAe,EAAA;AAC1C,IAAA,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;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,KAAoB,EAAA;AAC9C,IAAA,OAAO,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ;AACzE;AAEA;;;;AAIG;AACG,SAAU,cAAc,CAAC,KAAoB,EAAA;IACjD,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM;AACpF;;ACnBA;;;;;AAKG;AAEH;;;;;;;;;;;;;;;;;AAiBG;SACa,QAAQ,CAAC,SAAiB,EAAE,KAAa,EAAE,OAAgB,EAAA;AACzE,IAAA,MAAM,KAAK,GAAG;;wBAEQ,KAAK,CAAA;aAChB,KAAK,CAAA;;;;GAIf;;IAED,OAAO,CAAC,GAAG,CAAC,CAAA,EAAA,EAAK,SAAS,CAAA,CAAE,EAAE,KAAK,EAAE,OAAO,CAAC;AAC/C;;ACjCA;;ACHA;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-utils.mjs","sources":["../../../projects/lib/utils/guards/is-defined.ts","../../../projects/lib/utils/guards/is-non-empty-array.ts","../../../projects/lib/utils/guards/is-observable.ts","../../../projects/lib/utils/math/clamp.ts","../../../projects/lib/utils/math/round.ts","../../../projects/lib/utils/coercion/num-attr.ts","../../../projects/lib/utils/css-value/is-safe-css-value.ts","../../../projects/lib/utils/dom/get-root-font-size.ts","../../../projects/lib/utils/dom/focus.ts","../../../projects/lib/utils/css-size/resolve-css-size.ts","../../../projects/lib/utils/id/random-id.ts","../../../projects/lib/utils/fn/noop.ts","../../../projects/lib/utils/fn/debounce.ts","../../../projects/lib/utils/fn/throttle.ts","../../../projects/lib/utils/keyboard/keys.ts","../../../projects/lib/utils/keyboard/predicates.ts","../../../projects/lib/utils/log/badge-log.ts","../../../projects/lib/utils/public-api.ts","../../../projects/lib/utils/ngwr-utils.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 type { Maybe } from '../interfaces';\n\n/**\n * Type guard that checks if a value is neither `null` nor `undefined`.\n *\n * @example\n * ```ts\n * const maybeValue: Maybe<number> = getValue();\n *\n * if (isDefined(maybeValue)) {\n * // here maybeValue is number\n * console.log(maybeValue.toFixed(2));\n * }\n * ```\n *\n * @see {@link Maybe}\n */\nexport function isDefined<T>(value: Maybe<T>): value is T {\n return value !== null && value !== undefined;\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 type { Maybe } from '../interfaces';\n\n/**\n * Type guard that checks if a value is an array with at least one element.\n *\n * @example\n * ```ts\n * const items: Maybe<string[]> = getItems();\n *\n * if (isNonEmptyArray(items)) {\n * // items is string[]\n * console.log(items[0]);\n * }\n * ```\n */\nexport function isNonEmptyArray<T>(value: Maybe<T[]>): value is [T, ...T[]] {\n return Array.isArray(value) && value.length > 0;\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 type { Observable } from 'rxjs';\n\n/**\n * Type guard that checks whether a value looks like an RxJS `Observable`.\n *\n * Uses duck-typing: verifies that the object has a `subscribe` function.\n * Does not require an actual `Observable` instance.\n *\n * @example\n * ```ts\n * if (isObservable(stream)) {\n * stream.subscribe(value => console.log(value));\n * }\n * ```\n */\nexport function isObservable<T = unknown>(value: unknown): value is Observable<T> {\n return !!value && typeof (value as { subscribe?: unknown }).subscribe === 'function';\n}\n","/**\n * Clamps `value` into the inclusive `[min, max]` range.\n *\n * @example\n * ```ts\n * clamp(140, 0, 100); // 100\n * clamp(-3, 0, 100); // 0\n * clamp(42, 0, 100); // 42\n * ```\n */\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, value));\n}\n","/**\n * Rounds `value` to `decimals` fraction digits, compensating the usual\n * floating point drift (`0.1 + 0.2` rounds to `0.3`, not `0.30000000000000004`).\n *\n * @example\n * ```ts\n * round(0.1 + 0.2, 2); // 0.3\n * round(1.005, 2); // 1.01\n * round(7.4); // 7\n * ```\n */\nexport function round(value: number, decimals = 0): number {\n const factor = 10 ** decimals;\n return Math.round((value + Number.EPSILON) * factor) / factor;\n}\n","import { coerceNumberProperty } from '@angular/cdk/coercion';\n\n/**\n * Input-transform factory: coerces any bound value to a number, falling\n * back to `fallback` for `null` / `undefined` / unparsable input. The\n * standard transform for numeric `input()`s across ngwr.\n *\n * @example\n * ```ts\n * readonly speed = input(4, { transform: numAttr(4) });\n * ```\n */\nexport const numAttr =\n (fallback: number) =>\n (value: unknown): number =>\n coerceNumberProperty(value, fallback);\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** Longest value worth composing. A colour is never near this. */\nconst MAX_LENGTH = 256;\n\n/**\n * Characters that end a declaration, open a string, or start a comment — none\n * of which belong in a value the library is about to wrap its own syntax around.\n */\nconst FORBIDDEN = /[;{}\"'\\\\@<>!]|\\/\\*|\\*\\//;\n\n/** Function name immediately preceding an open paren. */\nconst FUNCTION_NAME = /([\\w-]*)\\($/;\n\n/**\n * Functions a composed value may call. Every image-producing function is absent\n * on purpose — `url()`, `image-set()`, `cross-fade()`, `element()`, `paint()` —\n * because fetching is the whole impact of this class.\n */\nconst ALLOWED_FUNCTIONS = new Set([\n 'rgb',\n 'rgba',\n 'hsl',\n 'hsla',\n 'hwb',\n 'lab',\n 'lch',\n 'oklab',\n 'oklch',\n 'color',\n 'color-mix',\n 'light-dark',\n 'var',\n 'calc',\n 'min',\n 'max',\n 'clamp',\n]);\n\n/**\n * Answers whether a value can be composed **into** a larger CSS expression\n * without escaping the slot it was given — a colour inside a `linear-gradient()`\n * the component builds, an entry the component joins into a custom property a\n * stylesheet then substitutes.\n *\n * It is a containment check, not a colour parser. It says the value cannot\n * terminate the construct the library wrapped around it; it says nothing about\n * whether the value is a colour a browser will accept, and a rejected value\n * should fall back to the component's own default rather than be repaired.\n *\n * **A value bound straight to `[style.background]` needs none of this.** There\n * is nothing to break out of there, and Angular applies style values through\n * CSSOM by design — validating those would amount to refusing style values in a\n * style binding.\n *\n * Rejected, and each one is a way out of the slot:\n *\n * - a `)` the value never opened — `red), url(…), linear-gradient(red` is the\n * shape that turns a colour into an extra background layer the browser fetches;\n * - a top-level `,` — a `<color>` is one value, so a comma at depth 0 means the\n * payload has reached the slot next to the one it was handed;\n * - `;` `{` `}` a quote, a backslash, `!`, or a CSS comment delimiter;\n * - any function outside {@link ALLOWED_FUNCTIONS} — `url()` above all.\n *\n * Top-level whitespace is allowed: `red 20%` is a legitimate gradient stop, and\n * without a comma or a bare `)` it cannot reach anything.\n *\n * @example\n * ```ts\n * isSafeCssValue('var(--wr-color-primary)'); // true\n * isSafeCssValue('color-mix(in srgb, red 50%, blue)'); // true\n * isSafeCssValue('red), url(\"https://x.test/beacon\"), linear-gradient(red'); // false\n * ```\n *\n * @param value Raw value handed to the component.\n * @returns `true` when the value stays inside its slot.\n */\nexport function isSafeCssValue(value: string): boolean {\n if (typeof value !== 'string') return false;\n\n const trimmed = value.trim();\n if (trimmed === '' || trimmed.length > MAX_LENGTH) return false;\n if (FORBIDDEN.test(trimmed)) return false;\n\n let depth = 0;\n for (let i = 0; i < trimmed.length; i++) {\n const char = trimmed[i];\n\n if (char === '(') {\n const name = FUNCTION_NAME.exec(trimmed.slice(0, i + 1));\n if (!name || !ALLOWED_FUNCTIONS.has(name[1].toLowerCase())) return false;\n depth++;\n } else if (char === ')') {\n depth--;\n if (depth < 0) return false;\n } else if (depth === 0 && char === ',') {\n return false;\n }\n }\n\n return depth === 0;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * Reads the root font size (in pixels) from\n * `getComputedStyle(document.documentElement).fontSize`.\n *\n * Typical use case: converting `rem` values to pixels for layout calculations.\n *\n * Falls back to the provided value when:\n * - DOM is not available (SSR);\n * - `getComputedStyle` fails or returns an unparseable value.\n *\n * @example\n * ```ts\n * const rootFontSize = getRootFontSize(); // e.g. 16\n * const customFallback = getRootFontSize(14); // uses 14 if DOM is unavailable\n * ```\n *\n * @param fallback - Value in pixels when DOM is unavailable. Defaults to `16`.\n * @returns Root font size in pixels.\n */\nexport function getRootFontSize(fallback = 16): number {\n try {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n return fallback;\n }\n\n const raw = window.getComputedStyle(document.documentElement).fontSize;\n const parsed = Number.parseFloat(raw);\n\n return Number.isFinite(parsed) ? parsed : fallback;\n } catch {\n return fallback;\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\nconst FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'area[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\n/** Return every focusable descendant of `root` in DOM order. */\nexport function getFocusableElements(root: HTMLElement): readonly HTMLElement[] {\n return Array.from(root.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)).filter(\n el => el.offsetParent !== null || el === document.activeElement\n );\n}\n\n/**\n * Trap Tab navigation inside `root` for a keyboard event — call from a\n * `keydown` handler. Cycles focus from first ↔ last focusable element.\n * Returns `true` when focus was redirected (event was handled).\n */\nexport function trapFocus(root: HTMLElement, event: KeyboardEvent): boolean {\n if (event.key !== 'Tab') return false;\n const focusable = getFocusableElements(root);\n if (focusable.length === 0) return false;\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const active = document.activeElement as HTMLElement | null;\n\n if (event.shiftKey && active === first) {\n event.preventDefault();\n last.focus();\n return true;\n }\n if (!event.shiftKey && active === last) {\n event.preventDefault();\n first.focus();\n return true;\n }\n return false;\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 { getRootFontSize } from '../dom';\n\nimport type { ResolveCssSizeOptions } from './resolve-css-size-options';\nimport type { ResolvedCssSize } from './resolved-css-size';\n\n/**\n * Resolves a raw size value into a CSS string and an optional pixel equivalent.\n *\n * Supported formats:\n * - `number` → pixels (`48` → `\"48px\"`)\n * - `\"12px\"` → pixels (`\"12px\"` → `\"12px\"`)\n * - `\"3rem\"` → rems via root (`\"3rem\"` → `\"3rem\"`, pxValue = 3 × root font size)\n * - `\"80%\"` → percentage (`\"80%\"` → `\"80%\"`, pxValue = null)\n * - `\"15\"` → pixels (`\"15\"` → `\"15px\"`)\n * - anything else → passed through as-is, pxValue = null\n *\n * @example\n * ```ts\n * const size = resolveCssSize('3rem', { defaultValue: '6rem' });\n * // size.cssValue === '3rem'\n * // size.pxValue === 3 * getRootFontSize()\n * ```\n *\n * @param raw - Value to resolve. Accepts numbers, pixel/rem/percent strings, or `null`/`undefined`.\n * @param options - Optional configuration.\n * @returns Resolved CSS value and its pixel equivalent when computable.\n *\n * @see {@link ResolvedCssSize}\n * @see {@link ResolveCssSizeOptions}\n */\nexport function resolveCssSize(raw: unknown, options: ResolveCssSizeOptions = {}): ResolvedCssSize {\n const rootFontSize = getRootFontSize();\n const value: unknown = raw ?? options.defaultValue;\n\n if (value == null) {\n return { cssValue: '0px', pxValue: 0 };\n }\n\n if (typeof value === 'number' && Number.isFinite(value)) {\n return { cssValue: `${value}px`, pxValue: value };\n }\n\n if (typeof value !== 'string') {\n return { cssValue: '0px', pxValue: 0 };\n }\n\n const trimmed = value.trim();\n\n const remMatch = /^([\\d.]+)\\s*rem$/i.exec(trimmed);\n if (remMatch) {\n const rem = Number.parseFloat(remMatch[1]);\n const px = rem * rootFontSize;\n return { cssValue: `${rem}rem`, pxValue: Number.isFinite(px) ? px : null };\n }\n\n const pxMatch = /^([\\d.]+)\\s*px$/i.exec(trimmed);\n if (pxMatch) {\n const px = Number.parseFloat(pxMatch[1]);\n return { cssValue: `${px}px`, pxValue: Number.isFinite(px) ? px : null };\n }\n\n const percentMatch = /^([\\d.]+)\\s*%$/.exec(trimmed);\n if (percentMatch) {\n return { cssValue: `${percentMatch[1]}%`, pxValue: null };\n }\n\n const numberMatch = /^([\\d.]+)$/.exec(trimmed);\n if (numberMatch) {\n const px = Number.parseFloat(numberMatch[1]);\n return { cssValue: `${px}px`, pxValue: Number.isFinite(px) ? px : null };\n }\n\n return { cssValue: trimmed, pxValue: null };\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\nconst ALPHABET = 'abcdefghijklmnopqrstuvwxyz0123456789';\nconst MIN_LENGTH = 4;\nconst MAX_LENGTH = 64;\nconst DEFAULT_LENGTH = 12;\n\n/**\n * Returns random bytes using the best available source.\n *\n * @internal\n */\nfunction defaultRandomBytes(count: number): Uint8Array {\n // Covers: all browsers, Node ≥ 18, Deno, Bun, Cloudflare Workers\n if (typeof crypto !== 'undefined' && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(count));\n }\n\n // Fallback: Node < 18 or exotic runtimes\n const buf = new Uint8Array(count);\n for (let i = 0; i < count; i++) {\n buf[i] = Math.floor(Math.random() * 256);\n }\n return buf;\n}\n\n/**\n * Generates a pseudo-random, DOM-safe identifier.\n *\n * Produced ids:\n * - are prefixed to avoid collisions with host-application ids;\n * - contain only `[a-z0-9-]` characters;\n * - use `crypto.getRandomValues` when available, falling back to `Math.random`.\n *\n * **Not suitable for cryptographic or security-sensitive purposes** —\n * intended only for UI element identifiers (`id`, `for`, `aria-*`, etc.).\n *\n * @example\n * ```ts\n * randomId();\n * // → \"wr-a8f2bx1k9q4z\"\n *\n * randomId('ng', 8);\n * // → \"ng-k2f9mbeo\"\n *\n * randomId('wr', 24);\n * // → \"wr-a8f2bx1k9q4zmneo73wplr\"\n * ```\n *\n * @param prefix - Namespace prefix prepended before the random segment. Defaults to `'wr'`.\n * @param length - Length of the random segment. Clamped to `[4, 64]`. Defaults to `12`.\n * @param random - Custom random byte source `(byteLength) => Uint8Array`.\n * When omitted, uses `crypto.getRandomValues` with a `Math.random` fallback.\n * @returns A pseudo-random id string matching `/^[a-z]+-[a-z0-9]+$/`.\n */\nexport function randomId(prefix = 'wr', length = DEFAULT_LENGTH, random?: (byteLength: number) => Uint8Array): string {\n const safeLength = Math.min(Math.max(Math.trunc(length), MIN_LENGTH), MAX_LENGTH);\n\n const bytes = random ? random(safeLength) : defaultRandomBytes(safeLength);\n\n let result = '';\n for (let i = 0; i < safeLength; i++) {\n result += ALPHABET[bytes[i] % ALPHABET.length];\n }\n\n return `${prefix}-${result}`;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * A function that does nothing.\n *\n * Useful as a default callback, placeholder event handler,\n * or to explicitly signal intentional no-ops.\n *\n * @example\n * ```ts\n * @Component({ ... })\n * export class MyComponent {\n * onTouched: () => void = noop;\n * }\n * ```\n */\nexport const noop = (): void => undefined;\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** A debounced function — same signature as the original plus `cancel`. */\nexport type WrDebouncedFn<TArgs extends readonly unknown[]> = ((...args: TArgs) => void) & {\n readonly cancel: () => void;\n};\n\n/**\n * Wrap `fn` so it only fires `waitMs` after the last invocation.\n * Useful for resize / scroll / input handlers.\n *\n * @example\n * ```ts\n * const onResize = debounce(() => recalcLayout(), 150);\n * window.addEventListener('resize', onResize);\n * ```\n */\nexport function debounce<TArgs extends readonly unknown[]>(\n fn: (...args: TArgs) => void,\n waitMs: number\n): WrDebouncedFn<TArgs> {\n let timer: ReturnType<typeof setTimeout> | null = null;\n\n const debounced = (...args: TArgs): void => {\n if (timer !== null) clearTimeout(timer);\n timer = setTimeout(() => {\n timer = null;\n fn(...args);\n }, waitMs);\n };\n\n debounced.cancel = (): void => {\n if (timer !== null) {\n clearTimeout(timer);\n timer = null;\n }\n };\n\n return debounced;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** A throttled function — same signature as the original plus `cancel`. */\nexport type WrThrottledFn<TArgs extends readonly unknown[]> = ((...args: TArgs) => void) & {\n readonly cancel: () => void;\n};\n\n/**\n * Wrap `fn` so it fires at most once every `waitMs`. Leading-edge call\n * fires immediately; trailing-edge call fires once at the end of the window\n * if there were further invocations.\n */\nexport function throttle<TArgs extends readonly unknown[]>(\n fn: (...args: TArgs) => void,\n waitMs: number\n): WrThrottledFn<TArgs> {\n let lastInvoke = 0;\n let trailingTimer: ReturnType<typeof setTimeout> | null = null;\n let pendingArgs: TArgs | null = null;\n\n const throttled = (...args: TArgs): void => {\n const now = Date.now();\n const remaining = waitMs - (now - lastInvoke);\n\n if (remaining <= 0) {\n if (trailingTimer !== null) {\n clearTimeout(trailingTimer);\n trailingTimer = null;\n }\n lastInvoke = now;\n fn(...args);\n } else {\n pendingArgs = args;\n trailingTimer ??= setTimeout(() => {\n lastInvoke = Date.now();\n trailingTimer = null;\n if (pendingArgs) fn(...pendingArgs);\n pendingArgs = null;\n }, remaining);\n }\n };\n\n throttled.cancel = (): void => {\n if (trailingTimer !== null) {\n clearTimeout(trailingTimer);\n trailingTimer = null;\n }\n pendingArgs = null;\n lastInvoke = 0;\n };\n\n return throttled;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * Canonical `KeyboardEvent.key` values for your own `keydown` handlers.\n *\n * The spec spellings are easy to get wrong — arrows are `ArrowUp`, space is a\n * literal `' '` — and a typo like `'Esacpe'` never matches and never errors.\n * These give you autocomplete and the {@link WrKey} union to match against.\n */\nexport const KEYS = {\n ENTER: 'Enter',\n ESCAPE: 'Escape',\n TAB: 'Tab',\n SPACE: ' ',\n BACKSPACE: 'Backspace',\n DELETE: 'Delete',\n ARROW_UP: 'ArrowUp',\n ARROW_DOWN: 'ArrowDown',\n ARROW_LEFT: 'ArrowLeft',\n ARROW_RIGHT: 'ArrowRight',\n HOME: 'Home',\n END: 'End',\n PAGE_UP: 'PageUp',\n PAGE_DOWN: 'PageDown',\n} as const;\n\nexport type WrKey = (typeof KEYS)[keyof typeof KEYS];\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** True when any modifier key (Ctrl / Cmd / Alt / Shift / Meta) is held. */\nexport function hasModifier(event: KeyboardEvent): boolean {\n return event.ctrlKey || event.altKey || event.metaKey || event.shiftKey;\n}\n\n/**\n * True when the key is a single printable character (letters, digits,\n * punctuation, etc.). Skips function keys, arrows, modifiers, and named\n * keys like `Backspace` or `Tab`.\n */\nexport function isPrintableKey(event: KeyboardEvent): boolean {\n return event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;\n}\n\n/**\n * True while an input method is composing — the key belongs to the IME, not to\n * your handler. **Return early on it in every `keydown` handler that reads\n * Enter, Escape or an arrow on, or above, a field that accepts typed text.**\n *\n * A Japanese or Chinese user reaches every character through a conversion. From\n * `compositionstart` until `compositionend` a candidate window is open, and\n * those keys are how it is driven: Enter accepts the candidate, Escape cancels\n * the conversion back to kana, the arrows walk the candidate list. A component\n * that acts on them anyway takes the key away from the IME mid-word — the\n * overlay closes instead of the candidate window, and the half-composed reading\n * the user was still choosing between is gone with it.\n *\n * Both halves of the test are needed. `isComposing` is the standard flag, but\n * Safari fires `compositionend` *before* the `keydown` of the Enter that commits\n * a candidate, so that one arrives with `isComposing === false` and only the\n * legacy `keyCode` of `229` — the sentinel every engine sets on a key it handed\n * to the input method — to say where it came from.\n *\n * `keydown` is the whole scope. It does NOT answer \"is a composition in\n * progress\" for an `input` or `blur` handler: on the committing keystroke the\n * two disagree by design. A component that needs the state *between* events\n * tracks it with the `compositionstart` / `compositionend` pair instead.\n *\n * ```ts\n * protected onKeydown(event: KeyboardEvent): void {\n * if (isComposing(event)) return;\n * // …\n * }\n * ```\n */\nexport function isComposing(event: KeyboardEvent): boolean {\n // `keyCode` is deprecated and stays anyway: it is the only signal Safari\n // leaves on the committing keystroke. See the doc comment above.\n return event.isComposing || event.keyCode === 229;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * Logs a coloured pill to the browser console followed by a payload.\n *\n * Useful when you need to scan a noisy console for a specific subsystem's\n * messages. The pill is rendered with the CSS `%c` console formatting trick.\n *\n * @example\n * ```ts\n * badgeLog('icons', '#3969e2', { name: 'plus', registered: true });\n * // → [icons] { name: 'plus', registered: true }\n * ```\n *\n * @param badgeText Short label shown inside the pill.\n * @param color CSS colour applied to the pill border and text.\n * @param message Anything you'd pass to `console.log` as the second argument.\n *\n * @internal\n */\nexport function badgeLog(badgeText: string, color: string, message: unknown): void {\n const style = `\n display: inline-block;\n border: 1px solid ${color};\n color: ${color};\n padding: 1px 3px;\n border-radius: 4px;\n margin-right: 0\n `;\n // eslint-disable-next-line no-console -- this helper exists to log\n console.log(`%c${badgeText}`, style, message);\n}\n","// Types\nexport type { Maybe, SafeAny } from './interfaces';\n\n// Guards\nexport { isDefined, isNonEmptyArray, isObservable } from './guards';\n\n// Math\nexport { clamp, round } from './math';\n\n// Coercion\nexport { numAttr } from './coercion';\n\n// CSS value\nexport { isSafeCssValue } from './css-value';\n\n// CSS size\nexport { resolveCssSize } from './css-size';\nexport type { ResolveCssSizeOptions, ResolvedCssSize } from './css-size';\n\n// DOM\nexport { getRootFontSize, getFocusableElements, trapFocus } from './dom';\n\n// ID\nexport { randomId } from './id';\n\n// Fn\nexport { noop, debounce, throttle } from './fn';\nexport type { WrDebouncedFn, WrThrottledFn } from './fn';\n\n// Keyboard\nexport { KEYS, hasModifier, isComposing, isPrintableKey } from './keyboard';\nexport type { WrKey } from './keyboard';\n\n// Log\nexport { badgeLog } from './log';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["MAX_LENGTH"],"mappings":";;AAAA;;;;;AAKG;AAIH;;;;;;;;;;;;;;AAcG;AACG,SAAU,SAAS,CAAI,KAAe,EAAA;AAC1C,IAAA,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;AAC9C;;AC1BA;;;;;AAKG;AAIH;;;;;;;;;;;;AAYG;AACG,SAAU,eAAe,CAAI,KAAiB,EAAA;AAClD,IAAA,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;AACjD;;ACxBA;;;;;AAKG;AAIH;;;;;;;;;;;;AAYG;AACG,SAAU,YAAY,CAAc,KAAc,EAAA;IACtD,OAAO,CAAC,CAAC,KAAK,IAAI,OAAQ,KAAiC,CAAC,SAAS,KAAK,UAAU;AACtF;;ACxBA;;;;;;;;;AASG;SACa,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAA;AAC3D,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AAC5C;;ACZA;;;;;;;;;;AAUG;SACa,KAAK,CAAC,KAAa,EAAE,QAAQ,GAAG,CAAC,E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AA,MAAM,KAAK,GAAG;;wBAEQ,KAAK,CAAA;aAChB,KAAK,CAAA;;;;GAIf;;IAED,OAAO,CAAC,GAAG,CAAC,CAAA,EAAA,EAAK,SAAS,CAAA,CAAE,EAAE,KAAK,EAAE,OAAO,CAAC;AAC/C;;ACjCA;;ACHA;;AAEG;;;;"}
@@ -16,7 +16,7 @@ import { InjectionToken } from '@angular/core';
16
16
  * Distinct from `Version` exported by `@angular/core`, which reports the
17
17
  * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.
18
18
  */
19
- const NGWR_VERSION = '13.0.1';
19
+ const NGWR_VERSION = '14.0.1';
20
20
 
21
21
  /**
22
22
  * @license
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-version.mjs","sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.ts","../../../projects/lib/version/ngwr-version.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release-prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '13.0.1';\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 { InjectionToken } from '@angular/core';\n\nimport { NGWR_VERSION } from './version';\n\n/**\n * Injection token holding the ngwr library version string.\n *\n * Default factory returns {@link NGWR_VERSION}. Override it in tests or in\n * apps that want to surface a custom build identifier.\n *\n * @example\n * ```ts\n * @Component({...})\n * export class FooterComponent {\n * readonly version = inject(NGWR_VERSION_TOKEN);\n * }\n * ```\n */\nexport const NGWR_VERSION_TOKEN = new InjectionToken<string>('NGWR_VERSION_TOKEN', {\n providedIn: 'root',\n factory: () => NGWR_VERSION,\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAEH;;;;;;;;;AASG;AACI,MAAM,YAAY,GAAG;;ACjB5B;;;;;AAKG;AAMH;;;;;;;;;;;;;AAaG;MACU,kBAAkB,GAAG,IAAI,cAAc,CAAS,oBAAoB,EAAE;AACjF,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,YAAY;AAC5B,CAAA;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-version.mjs","sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.ts","../../../projects/lib/version/ngwr-version.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release-prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '14.0.1';\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 { InjectionToken } from '@angular/core';\n\nimport { NGWR_VERSION } from './version';\n\n/**\n * Injection token holding the ngwr library version string.\n *\n * Default factory returns {@link NGWR_VERSION}. Override it in tests or in\n * apps that want to surface a custom build identifier.\n *\n * @example\n * ```ts\n * @Component({...})\n * export class FooterComponent {\n * readonly version = inject(NGWR_VERSION_TOKEN);\n * }\n * ```\n */\nexport const NGWR_VERSION_TOKEN = new InjectionToken<string>('NGWR_VERSION_TOKEN', {\n providedIn: 'root',\n factory: () => NGWR_VERSION,\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAEH;;;;;;;;;AASG;AACI,MAAM,YAAY,GAAG;;ACjB5B;;;;;AAKG;AAMH;;;;;;;;;;;;;AAaG;MACU,kBAAkB,GAAG,IAAI,cAAc,CAAS,oBAAoB,EAAE;AACjF,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,YAAY;AAC5B,CAAA;;AC5BD;;AAEG;;;;"}
@@ -111,10 +111,10 @@ class WrVirtualScroll {
111
111
  checkViewportSize() {
112
112
  this.viewport().checkViewportSize();
113
113
  }
114
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Component });
115
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.4", type: WrVirtualScroll, isStandalone: true, selector: "wr-virtual-scroll", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minBufferPx: { classPropertyName: "minBufferPx", publicName: "minBufferPx", isSignal: true, isRequired: false, transformFunction: null }, maxBufferPx: { classPropertyName: "maxBufferPx", publicName: "maxBufferPx", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-virtual-scroll" }, queries: [{ propertyName: "rowTemplate", first: true, predicate: (TemplateRef), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0, template: "<cdk-virtual-scroll-viewport\n class=\"wr-virtual-scroll__viewport\"\n [itemSize]=\"itemSize()\"\n [minBufferPx]=\"resolvedMinBuffer()\"\n [maxBufferPx]=\"resolvedMaxBuffer()\"\n [style.height]=\"resolvedHeight()\"\n>\n <ng-container *cdkVirtualFor=\"let item of items(); let i = index; trackBy: trackBy()\">\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: i }\" />\n </ng-container>\n</cdk-virtual-scroll-viewport>\n", styles: [".wr-virtual-scroll{display:block;width:100%;overflow:hidden}.wr-virtual-scroll__viewport{width:100%;height:100%;scrollbar-width:thin}.wr-virtual-scroll__viewport::-webkit-scrollbar{width:.5rem;height:.5rem}.wr-virtual-scroll__viewport::-webkit-scrollbar-thumb{background:rgba(var(--wr-color-on-surface-rgb),.2);border-radius:999px}\n"], dependencies: [{ kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
114
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: WrVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Component });
115
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.5", type: WrVirtualScroll, isStandalone: true, selector: "wr-virtual-scroll", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minBufferPx: { classPropertyName: "minBufferPx", publicName: "minBufferPx", isSignal: true, isRequired: false, transformFunction: null }, maxBufferPx: { classPropertyName: "maxBufferPx", publicName: "maxBufferPx", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-virtual-scroll" }, queries: [{ propertyName: "rowTemplate", first: true, predicate: (TemplateRef), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0, template: "<cdk-virtual-scroll-viewport\n class=\"wr-virtual-scroll__viewport\"\n [itemSize]=\"itemSize()\"\n [minBufferPx]=\"resolvedMinBuffer()\"\n [maxBufferPx]=\"resolvedMaxBuffer()\"\n [style.height]=\"resolvedHeight()\"\n>\n <ng-container *cdkVirtualFor=\"let item of items(); let i = index; trackBy: trackBy()\">\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: i }\" />\n </ng-container>\n</cdk-virtual-scroll-viewport>\n", styles: [".wr-virtual-scroll{display:block;width:100%;overflow:hidden}.wr-virtual-scroll__viewport{width:100%;height:100%;scrollbar-width:thin}.wr-virtual-scroll__viewport::-webkit-scrollbar{width:.5rem;height:.5rem}.wr-virtual-scroll__viewport::-webkit-scrollbar-thumb{background:rgba(var(--wr-color-on-surface-rgb),.2);border-radius:999px}\n"], dependencies: [{ kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
116
116
  }
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrVirtualScroll, decorators: [{
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: WrVirtualScroll, decorators: [{
118
118
  type: Component,
119
119
  args: [{ selector: 'wr-virtual-scroll', encapsulation: ViewEncapsulation.None, imports: [ScrollingModule, NgTemplateOutlet], host: { class: 'wr-virtual-scroll' }, template: "<cdk-virtual-scroll-viewport\n class=\"wr-virtual-scroll__viewport\"\n [itemSize]=\"itemSize()\"\n [minBufferPx]=\"resolvedMinBuffer()\"\n [maxBufferPx]=\"resolvedMaxBuffer()\"\n [style.height]=\"resolvedHeight()\"\n>\n <ng-container *cdkVirtualFor=\"let item of items(); let i = index; trackBy: trackBy()\">\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: i }\" />\n </ng-container>\n</cdk-virtual-scroll-viewport>\n", styles: [".wr-virtual-scroll{display:block;width:100%;overflow:hidden}.wr-virtual-scroll__viewport{width:100%;height:100%;scrollbar-width:thin}.wr-virtual-scroll__viewport::-webkit-scrollbar{width:.5rem;height:.5rem}.wr-virtual-scroll__viewport::-webkit-scrollbar-thumb{background:rgba(var(--wr-color-on-surface-rgb),.2);border-radius:999px}\n"] }]
120
120
  }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], itemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemSize", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], minBufferPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "minBufferPx", required: false }] }], maxBufferPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxBufferPx", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], rowTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], viewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }] } });
@@ -356,10 +356,10 @@ class WrWaves {
356
356
  mouse.set = true;
357
357
  }
358
358
  }
359
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrWaves, deps: [], target: i0.ɵɵFactoryTarget.Component });
360
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.4", type: WrWaves, isStandalone: true, selector: "wr-waves", inputs: { lineColor: { classPropertyName: "lineColor", publicName: "lineColor", isSignal: true, isRequired: false, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, waveSpeedX: { classPropertyName: "waveSpeedX", publicName: "waveSpeedX", isSignal: true, isRequired: false, transformFunction: null }, waveSpeedY: { classPropertyName: "waveSpeedY", publicName: "waveSpeedY", isSignal: true, isRequired: false, transformFunction: null }, waveAmpX: { classPropertyName: "waveAmpX", publicName: "waveAmpX", isSignal: true, isRequired: false, transformFunction: null }, waveAmpY: { classPropertyName: "waveAmpY", publicName: "waveAmpY", isSignal: true, isRequired: false, transformFunction: null }, xGap: { classPropertyName: "xGap", publicName: "xGap", isSignal: true, isRequired: false, transformFunction: null }, yGap: { classPropertyName: "yGap", publicName: "yGap", isSignal: true, isRequired: false, transformFunction: null }, friction: { classPropertyName: "friction", publicName: "friction", isSignal: true, isRequired: false, transformFunction: null }, tension: { classPropertyName: "tension", publicName: "tension", isSignal: true, isRequired: false, transformFunction: null }, maxCursorMove: { classPropertyName: "maxCursorMove", publicName: "maxCursorMove", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.background-color": "backgroundColor()", "style.--wr-waves-x-gap.px": "xGap()", "class.wr-waves--painted": "painted()" }, classAttribute: "wr-waves" }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: '<canvas #canvas class="wr-waves__canvas" aria-hidden="true"></canvas>', isInline: true, styles: [".wr-waves{--wr-waves-line-color: rgba(var(--wr-color-on-surface-rgb), .12);--wr-waves-x-gap: 10px;position:absolute;inset:0;display:block;margin:0;padding:0;overflow:hidden;background-image:repeating-linear-gradient(to right,var(--wr-waves-line-color) 0 1px,transparent 1px var(--wr-waves-x-gap))}.wr-waves--painted{background-image:none}.wr-waves__canvas{display:block;width:100%;height:100%}[data-theme=dark] .wr-waves{--wr-waves-line-color: rgb(255 255 255 / 14%)}\n"], encapsulation: i0.ViewEncapsulation.None });
359
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: WrWaves, deps: [], target: i0.ɵɵFactoryTarget.Component });
360
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.5", type: WrWaves, isStandalone: true, selector: "wr-waves", inputs: { lineColor: { classPropertyName: "lineColor", publicName: "lineColor", isSignal: true, isRequired: false, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, waveSpeedX: { classPropertyName: "waveSpeedX", publicName: "waveSpeedX", isSignal: true, isRequired: false, transformFunction: null }, waveSpeedY: { classPropertyName: "waveSpeedY", publicName: "waveSpeedY", isSignal: true, isRequired: false, transformFunction: null }, waveAmpX: { classPropertyName: "waveAmpX", publicName: "waveAmpX", isSignal: true, isRequired: false, transformFunction: null }, waveAmpY: { classPropertyName: "waveAmpY", publicName: "waveAmpY", isSignal: true, isRequired: false, transformFunction: null }, xGap: { classPropertyName: "xGap", publicName: "xGap", isSignal: true, isRequired: false, transformFunction: null }, yGap: { classPropertyName: "yGap", publicName: "yGap", isSignal: true, isRequired: false, transformFunction: null }, friction: { classPropertyName: "friction", publicName: "friction", isSignal: true, isRequired: false, transformFunction: null }, tension: { classPropertyName: "tension", publicName: "tension", isSignal: true, isRequired: false, transformFunction: null }, maxCursorMove: { classPropertyName: "maxCursorMove", publicName: "maxCursorMove", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.background-color": "backgroundColor()", "style.--wr-waves-x-gap.px": "xGap()", "class.wr-waves--painted": "painted()" }, classAttribute: "wr-waves" }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: '<canvas #canvas class="wr-waves__canvas" aria-hidden="true"></canvas>', isInline: true, styles: [".wr-waves{--wr-waves-line-color: rgba(var(--wr-color-on-surface-rgb), .12);--wr-waves-x-gap: 10px;position:absolute;inset:0;display:block;margin:0;padding:0;overflow:hidden;background-image:repeating-linear-gradient(to right,var(--wr-waves-line-color) 0 1px,transparent 1px var(--wr-waves-x-gap))}.wr-waves--painted{background-image:none}.wr-waves__canvas{display:block;width:100%;height:100%}\n"], encapsulation: i0.ViewEncapsulation.None });
361
361
  }
362
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrWaves, decorators: [{
362
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: WrWaves, decorators: [{
363
363
  type: Component,
364
364
  args: [{ selector: 'wr-waves', template: '<canvas #canvas class="wr-waves__canvas" aria-hidden="true"></canvas>', encapsulation: ViewEncapsulation.None, host: {
365
365
  class: 'wr-waves',
@@ -368,7 +368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
368
368
  // spacing, and switches it off the moment the canvas has painted.
369
369
  '[style.--wr-waves-x-gap.px]': 'xGap()',
370
370
  '[class.wr-waves--painted]': 'painted()',
371
- }, styles: [".wr-waves{--wr-waves-line-color: rgba(var(--wr-color-on-surface-rgb), .12);--wr-waves-x-gap: 10px;position:absolute;inset:0;display:block;margin:0;padding:0;overflow:hidden;background-image:repeating-linear-gradient(to right,var(--wr-waves-line-color) 0 1px,transparent 1px var(--wr-waves-x-gap))}.wr-waves--painted{background-image:none}.wr-waves__canvas{display:block;width:100%;height:100%}[data-theme=dark] .wr-waves{--wr-waves-line-color: rgb(255 255 255 / 14%)}\n"] }]
371
+ }, styles: [".wr-waves{--wr-waves-line-color: rgba(var(--wr-color-on-surface-rgb), .12);--wr-waves-x-gap: 10px;position:absolute;inset:0;display:block;margin:0;padding:0;overflow:hidden;background-image:repeating-linear-gradient(to right,var(--wr-waves-line-color) 0 1px,transparent 1px var(--wr-waves-x-gap))}.wr-waves--painted{background-image:none}.wr-waves__canvas{display:block;width:100%;height:100%}\n"] }]
372
372
  }], ctorParameters: () => [], propDecorators: { lineColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineColor", required: false }] }], backgroundColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "backgroundColor", required: false }] }], waveSpeedX: [{ type: i0.Input, args: [{ isSignal: true, alias: "waveSpeedX", required: false }] }], waveSpeedY: [{ type: i0.Input, args: [{ isSignal: true, alias: "waveSpeedY", required: false }] }], waveAmpX: [{ type: i0.Input, args: [{ isSignal: true, alias: "waveAmpX", required: false }] }], waveAmpY: [{ type: i0.Input, args: [{ isSignal: true, alias: "waveAmpY", required: false }] }], xGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "xGap", required: false }] }], yGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "yGap", required: false }] }], friction: [{ type: i0.Input, args: [{ isSignal: true, alias: "friction", required: false }] }], tension: [{ type: i0.Input, args: [{ isSignal: true, alias: "tension", required: false }] }], maxCursorMove: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCursorMove", required: false }] }], canvasRef: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }] } });
373
373
 
374
374
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-waves.mjs","sources":["../../../projects/lib/waves/waves.ts","../../../projects/lib/waves/ngwr-waves.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 Waves background by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/backgrounds/waves\n *\n * A grid of vertical lines drawn on a 2D canvas. Each point drifts on\n * perlin noise and is pushed around by the pointer with a spring\n * (tension + friction) pulling it back to rest.\n */\n\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n NgZone,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n effect,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\n\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\n// Perlin noise (Stefan Gustavson's reference permutation)\n/* eslint-disable no-bitwise -- permutation-table hashing is inherently bitwise */\n\nclass Grad {\n constructor(\n private readonly x: number,\n private readonly y: number\n ) {}\n\n dot2(x: number, y: number): number {\n return this.x * x + this.y * y;\n }\n}\n\nconst GRAD3: readonly Grad[] = [\n new Grad(1, 1),\n new Grad(-1, 1),\n new Grad(1, -1),\n new Grad(-1, -1),\n new Grad(1, 0),\n new Grad(-1, 0),\n new Grad(1, 0),\n new Grad(-1, 0),\n new Grad(0, 1),\n new Grad(0, -1),\n new Grad(0, 1),\n new Grad(0, -1),\n];\n\n// prettier-ignore\nconst P: readonly number[] = [\n 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240,\n 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33, 88,\n 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, 166, 77, 146, 158, 231, 83,\n 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244, 102, 143, 54, 65, 25, 63, 161, 1, 216,\n 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196, 135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, 186,\n 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118, 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58,\n 17, 182, 189, 28, 42, 223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155, 167, 43, 172, 9,\n 129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246, 97, 228, 251, 34, 242, 193,\n 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235, 249, 14, 239, 107, 49, 192, 214, 31, 181, 199, 106, 157,\n 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, 138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128,\n 195, 78, 66, 215, 61, 156, 180,\n];\n\nclass Noise {\n private readonly perm = new Array<number>(512);\n private readonly gradP = new Array<Grad>(512);\n\n constructor(seed: number) {\n if (seed > 0 && seed < 1) seed *= 65536;\n seed = Math.floor(seed);\n if (seed < 256) seed |= seed << 8;\n for (let i = 0; i < 256; i++) {\n const v = i & 1 ? P[i] ^ (seed & 255) : P[i] ^ ((seed >> 8) & 255);\n this.perm[i] = this.perm[i + 256] = v;\n this.gradP[i] = this.gradP[i + 256] = GRAD3[v % 12];\n }\n }\n\n private fade(t: number): number {\n return t * t * t * (t * (t * 6 - 15) + 10);\n }\n\n private lerp(a: number, b: number, t: number): number {\n return (1 - t) * a + t * b;\n }\n\n perlin2(x: number, y: number): number {\n let gx = Math.floor(x);\n let gy = Math.floor(y);\n x -= gx;\n y -= gy;\n gx &= 255;\n gy &= 255;\n const n00 = this.gradP[gx + this.perm[gy]].dot2(x, y);\n const n01 = this.gradP[gx + this.perm[gy + 1]].dot2(x, y - 1);\n const n10 = this.gradP[gx + 1 + this.perm[gy]].dot2(x - 1, y);\n const n11 = this.gradP[gx + 1 + this.perm[gy + 1]].dot2(x - 1, y - 1);\n const u = this.fade(x);\n return this.lerp(this.lerp(n00, n10, u), this.lerp(n01, n11, u), this.fade(y));\n }\n}\n\n/* eslint-enable no-bitwise */\n// Component\n\ninterface WavePoint {\n x: number;\n y: number;\n wave: { x: number; y: number };\n cursor: { x: number; y: number; vx: number; vy: number };\n}\n\n/**\n * Wave-field background — a grid of lines drifting on perlin noise,\n * nudged by the pointer. Fills its nearest positioned ancestor; put it\n * behind hero copy or section content.\n *\n * Colours are theme-aware by default: a soft dark line on light surfaces,\n * a faint white line on dark — override with `[lineColor]`.\n *\n * @example\n * ```html\n * <section style=\"position: relative\">\n * <wr-waves />\n * <h1>Hero copy above the waves</h1>\n * </section>\n * ```\n *\n * @see https://ngwr.dev/animations/waves\n */\n@Component({\n selector: 'wr-waves',\n template: '<canvas #canvas class=\"wr-waves__canvas\" aria-hidden=\"true\"></canvas>',\n styleUrl: './waves.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-waves',\n '[style.background-color]': 'backgroundColor()',\n // Feeds the CSS stand-in grid (see waves.scss) so it matches the real\n // spacing, and switches it off the moment the canvas has painted.\n '[style.--wr-waves-x-gap.px]': 'xGap()',\n '[class.wr-waves--painted]': 'painted()',\n },\n})\nexport class WrWaves {\n /** Line stroke colour. When unset, the theme decides. */\n readonly lineColor = input<string | null>(null);\n\n /** Background fill behind the lines. @default 'transparent' */\n readonly backgroundColor = input('transparent');\n\n /** Horizontal noise drift per ms. @default 0.0125 */\n readonly waveSpeedX = input(0.0125, { transform: numAttr(0.0125) });\n\n /** Vertical noise drift per ms. @default 0.005 */\n readonly waveSpeedY = input(0.005, { transform: numAttr(0.005) });\n\n /** Horizontal wave amplitude in px. @default 32 */\n readonly waveAmpX = input(32, { transform: numAttr(32) });\n\n /** Vertical wave amplitude in px. @default 16 */\n readonly waveAmpY = input(16, { transform: numAttr(16) });\n\n /** Horizontal gap between lines in px. @default 10 */\n readonly xGap = input(10, { transform: numAttr(10) });\n\n /** Vertical gap between points on a line in px. @default 32 */\n readonly yGap = input(32, { transform: numAttr(32) });\n\n /** Velocity damping of the cursor spring, 0..1. @default 0.925 */\n readonly friction = input(0.925, { transform: numAttr(0.925) });\n\n /** Pull-back strength of the cursor spring. @default 0.005 */\n readonly tension = input(0.005, { transform: numAttr(0.005) });\n\n /** Max px a point can be dragged from rest. @default 100 */\n readonly maxCursorMove = input(100, { transform: numAttr(100) });\n\n private readonly canvasRef = viewChild.required<ElementRef<HTMLCanvasElement>>('canvas');\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly zone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n private readonly platform = inject(WrPlatform);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private ctx: CanvasRenderingContext2D | null = null;\n private readonly noise = new Noise(Math.random());\n private lines: WavePoint[][] = [];\n private bounding = { width: 0, height: 0, left: 0, top: 0 };\n private readonly mouse = { x: -10, y: 0, lx: 0, ly: 0, sx: 0, sy: 0, v: 0, vs: 0, a: 0, set: false };\n private rafId = 0;\n\n /**\n * Flips once the canvas has drawn, which retires the CSS stand-in grid.\n *\n * A canvas cannot be prerendered, so on an SSR'd or prerendered page this\n * element is simply blank until the bundle has loaded and hydration has run —\n * measured at ~2.8s on ngwr.dev's own home page. The stylesheet paints a static\n * grid of the same colour and pitch in the meantime, straight from the\n * prerendered HTML, and this hands over to the real thing.\n */\n protected readonly painted = signal(false);\n\n constructor() {\n if (!this.isBrowser) return;\n\n afterNextRender(() => this.zone.runOutsideAngular(() => this.boot()));\n\n // Re-seed the grid when geometry inputs change.\n effect(() => {\n this.xGap();\n this.yGap();\n if (!this.ctx) return;\n this.setSize();\n this.setLines();\n });\n }\n\n // Setup\n\n private boot(): void {\n const canvas = this.canvasRef().nativeElement;\n this.ctx = canvas.getContext('2d');\n if (!this.ctx) return;\n\n this.setSize();\n this.setLines();\n\n const onResize = (): void => {\n this.setSize();\n this.setLines();\n if (this.platform.prefersReducedMotion()) this.drawLines();\n };\n const onMouseMove = (e: MouseEvent): void => this.updateMouse(e.clientX, e.clientY);\n const onTouchMove = (e: TouchEvent): void => this.updateMouse(e.touches[0].clientX, e.touches[0].clientY);\n\n window.addEventListener('resize', onResize);\n const ro = new ResizeObserver(onResize);\n ro.observe(this.host.nativeElement);\n\n // Reduced motion: one static, undisturbed grid — no drift, no loop,\n // no pointer reactivity.\n if (this.platform.prefersReducedMotion()) {\n this.drawLines();\n this.destroyRef.onDestroy(() => {\n window.removeEventListener('resize', onResize);\n ro.disconnect();\n });\n return;\n }\n\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('touchmove', onTouchMove, { passive: true });\n this.rafId = requestAnimationFrame(t => this.tick(t));\n\n this.destroyRef.onDestroy(() => {\n window.removeEventListener('resize', onResize);\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('touchmove', onTouchMove);\n ro.disconnect();\n cancelAnimationFrame(this.rafId);\n });\n }\n\n private setSize(): void {\n const rect = this.host.nativeElement.getBoundingClientRect();\n this.bounding = { width: rect.width, height: rect.height, left: rect.left, top: rect.top };\n const canvas = this.canvasRef().nativeElement;\n canvas.width = rect.width;\n canvas.height = rect.height;\n }\n\n private setLines(): void {\n const { width, height } = this.bounding;\n this.lines = [];\n const oWidth = width + 200;\n const oHeight = height + 30;\n const xGap = this.xGap();\n const yGap = this.yGap();\n const totalLines = Math.ceil(oWidth / xGap);\n const totalPoints = Math.ceil(oHeight / yGap);\n const xStart = (width - xGap * totalLines) / 2;\n const yStart = (height - yGap * totalPoints) / 2;\n for (let i = 0; i <= totalLines; i++) {\n const pts: WavePoint[] = [];\n for (let j = 0; j <= totalPoints; j++) {\n pts.push({\n x: xStart + xGap * i,\n y: yStart + yGap * j,\n wave: { x: 0, y: 0 },\n cursor: { x: 0, y: 0, vx: 0, vy: 0 },\n });\n }\n this.lines.push(pts);\n }\n }\n\n // Frame loop\n\n private tick(time: number): void {\n const mouse = this.mouse;\n mouse.sx += (mouse.x - mouse.sx) * 0.1;\n mouse.sy += (mouse.y - mouse.sy) * 0.1;\n const dx = mouse.x - mouse.lx;\n const dy = mouse.y - mouse.ly;\n const d = Math.hypot(dx, dy);\n mouse.v = d;\n mouse.vs += (d - mouse.vs) * 0.1;\n mouse.vs = Math.min(100, mouse.vs);\n mouse.lx = mouse.x;\n mouse.ly = mouse.y;\n mouse.a = Math.atan2(dy, dx);\n\n this.movePoints(time);\n this.drawLines();\n this.rafId = requestAnimationFrame(t => this.tick(t));\n }\n\n private movePoints(time: number): void {\n const mouse = this.mouse;\n const waveSpeedX = this.waveSpeedX();\n const waveSpeedY = this.waveSpeedY();\n const waveAmpX = this.waveAmpX();\n const waveAmpY = this.waveAmpY();\n const friction = this.friction();\n const tension = this.tension();\n const maxCursorMove = this.maxCursorMove();\n\n for (const pts of this.lines) {\n for (const p of pts) {\n const move = this.noise.perlin2((p.x + time * waveSpeedX) * 0.002, (p.y + time * waveSpeedY) * 0.0015) * 12;\n p.wave.x = Math.cos(move) * waveAmpX;\n p.wave.y = Math.sin(move) * waveAmpY;\n\n const dx = p.x - mouse.sx;\n const dy = p.y - mouse.sy;\n const dist = Math.hypot(dx, dy);\n const l = Math.max(175, mouse.vs);\n if (dist < l) {\n const s = 1 - dist / l;\n const f = Math.cos(dist * 0.001) * s;\n p.cursor.vx += Math.cos(mouse.a) * f * l * mouse.vs * 0.00065;\n p.cursor.vy += Math.sin(mouse.a) * f * l * mouse.vs * 0.00065;\n }\n\n p.cursor.vx += (0 - p.cursor.x) * tension;\n p.cursor.vy += (0 - p.cursor.y) * tension;\n p.cursor.vx *= friction;\n p.cursor.vy *= friction;\n p.cursor.x += p.cursor.vx * 2;\n p.cursor.y += p.cursor.vy * 2;\n p.cursor.x = Math.min(maxCursorMove, Math.max(-maxCursorMove, p.cursor.x));\n p.cursor.y = Math.min(maxCursorMove, Math.max(-maxCursorMove, p.cursor.y));\n }\n }\n }\n\n private moved(point: WavePoint, withCursor: boolean): { x: number; y: number } {\n const x = point.x + point.wave.x + (withCursor ? point.cursor.x : 0);\n const y = point.y + point.wave.y + (withCursor ? point.cursor.y : 0);\n return { x: Math.round(x * 10) / 10, y: Math.round(y * 10) / 10 };\n }\n\n private drawLines(): void {\n const ctx = this.ctx;\n if (!ctx) return;\n // Retire the CSS stand-in: from here the canvas has real pixels. Set inside\n // the draw rather than at the end of `boot()` so it can never switch the\n // fallback off before something has actually been painted. Runs outside\n // Angular (the rAF loop does), so `signal.set` schedules the one host-binding\n // update it needs; every later call is a no-op on an unchanged value.\n if (!this.painted()) this.painted.set(true);\n const { width, height } = this.bounding;\n ctx.clearRect(0, 0, width, height);\n ctx.beginPath();\n ctx.strokeStyle = this.resolveLineColor();\n for (const points of this.lines) {\n let p1 = this.moved(points[0], false);\n ctx.moveTo(p1.x, p1.y);\n points.forEach((p, idx) => {\n const isLast = idx === points.length - 1;\n p1 = this.moved(p, !isLast);\n const p2 = this.moved(points[idx + 1] ?? points[points.length - 1], !isLast);\n ctx.lineTo(p1.x, p1.y);\n if (isLast) ctx.moveTo(p2.x, p2.y);\n });\n }\n ctx.stroke();\n }\n\n /** Explicit input wins; otherwise the theme's `--wr-waves-line-color`. */\n private resolveLineColor(): string {\n const explicit = this.lineColor();\n if (explicit !== null) return explicit;\n const themed = getComputedStyle(this.host.nativeElement).getPropertyValue('--wr-waves-line-color').trim();\n return themed || 'rgba(15, 23, 42, 0.12)';\n }\n\n private updateMouse(x: number, y: number): void {\n // Re-read the box each move — cheaper than tracking scroll, and the\n // host is usually a hero that rarely reflows mid-gesture.\n const rect = this.host.nativeElement.getBoundingClientRect();\n const mouse = this.mouse;\n mouse.x = x - rect.left;\n mouse.y = y - rect.top;\n if (!mouse.set) {\n mouse.sx = mouse.x;\n mouse.sy = mouse.y;\n mouse.lx = mouse.x;\n mouse.ly = mouse.y;\n mouse.set = true;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;AAYG;AAqBH;AACA;AAEA,MAAM,IAAI,CAAA;AAEW,IAAA,CAAA;AACA,IAAA,CAAA;IAFnB,WAAA,CACmB,CAAS,EACT,CAAS,EAAA;QADT,IAAA,CAAA,CAAC,GAAD,CAAC;QACD,IAAA,CAAA,CAAC,GAAD,CAAC;IACjB;IAEH,IAAI,CAAC,CAAS,EAAE,CAAS,EAAA;QACvB,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC;IAChC;AACD;AAED,MAAM,KAAK,GAAoB;AAC7B,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AACd,IAAA,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACf,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACf,IAAA,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAChB,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AACd,IAAA,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACf,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AACd,IAAA,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACf,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AACd,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC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3,"file":"ngwr-waves.mjs","sources":["../../../projects/lib/waves/waves.ts","../../../projects/lib/waves/ngwr-waves.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 Waves background by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/backgrounds/waves\n *\n * A grid of vertical lines drawn on a 2D canvas. Each point drifts on\n * perlin noise and is pushed around by the pointer with a spring\n * (tension + friction) pulling it back to rest.\n */\n\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n NgZone,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n effect,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\n\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\n// Perlin noise (Stefan Gustavson's reference permutation)\n/* eslint-disable no-bitwise -- permutation-table hashing is inherently bitwise */\n\nclass Grad {\n constructor(\n private readonly x: number,\n private readonly y: number\n ) {}\n\n dot2(x: number, y: number): number {\n return this.x * x + this.y * y;\n }\n}\n\nconst GRAD3: readonly Grad[] = [\n new Grad(1, 1),\n new Grad(-1, 1),\n new Grad(1, -1),\n new Grad(-1, -1),\n new Grad(1, 0),\n new Grad(-1, 0),\n new Grad(1, 0),\n new Grad(-1, 0),\n new Grad(0, 1),\n new Grad(0, -1),\n new Grad(0, 1),\n new Grad(0, -1),\n];\n\n// prettier-ignore\nconst P: readonly number[] = [\n 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240,\n 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33, 88,\n 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, 166, 77, 146, 158, 231, 83,\n 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244, 102, 143, 54, 65, 25, 63, 161, 1, 216,\n 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196, 135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, 186,\n 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118, 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58,\n 17, 182, 189, 28, 42, 223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155, 167, 43, 172, 9,\n 129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246, 97, 228, 251, 34, 242, 193,\n 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235, 249, 14, 239, 107, 49, 192, 214, 31, 181, 199, 106, 157,\n 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, 138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128,\n 195, 78, 66, 215, 61, 156, 180,\n];\n\nclass Noise {\n private readonly perm = new Array<number>(512);\n private readonly gradP = new Array<Grad>(512);\n\n constructor(seed: number) {\n if (seed > 0 && seed < 1) seed *= 65536;\n seed = Math.floor(seed);\n if (seed < 256) seed |= seed << 8;\n for (let i = 0; i < 256; i++) {\n const v = i & 1 ? P[i] ^ (seed & 255) : P[i] ^ ((seed >> 8) & 255);\n this.perm[i] = this.perm[i + 256] = v;\n this.gradP[i] = this.gradP[i + 256] = GRAD3[v % 12];\n }\n }\n\n private fade(t: number): number {\n return t * t * t * (t * (t * 6 - 15) + 10);\n }\n\n private lerp(a: number, b: number, t: number): number {\n return (1 - t) * a + t * b;\n }\n\n perlin2(x: number, y: number): number {\n let gx = Math.floor(x);\n let gy = Math.floor(y);\n x -= gx;\n y -= gy;\n gx &= 255;\n gy &= 255;\n const n00 = this.gradP[gx + this.perm[gy]].dot2(x, y);\n const n01 = this.gradP[gx + this.perm[gy + 1]].dot2(x, y - 1);\n const n10 = this.gradP[gx + 1 + this.perm[gy]].dot2(x - 1, y);\n const n11 = this.gradP[gx + 1 + this.perm[gy + 1]].dot2(x - 1, y - 1);\n const u = this.fade(x);\n return this.lerp(this.lerp(n00, n10, u), this.lerp(n01, n11, u), this.fade(y));\n }\n}\n\n/* eslint-enable no-bitwise */\n// Component\n\ninterface WavePoint {\n x: number;\n y: number;\n wave: { x: number; y: number };\n cursor: { x: number; y: number; vx: number; vy: number };\n}\n\n/**\n * Wave-field background — a grid of lines drifting on perlin noise,\n * nudged by the pointer. Fills its nearest positioned ancestor; put it\n * behind hero copy or section content.\n *\n * Colours are theme-aware by default: a soft dark line on light surfaces,\n * a faint white line on dark — override with `[lineColor]`.\n *\n * @example\n * ```html\n * <section style=\"position: relative\">\n * <wr-waves />\n * <h1>Hero copy above the waves</h1>\n * </section>\n * ```\n *\n * @see https://ngwr.dev/animations/waves\n */\n@Component({\n selector: 'wr-waves',\n template: '<canvas #canvas class=\"wr-waves__canvas\" aria-hidden=\"true\"></canvas>',\n styleUrl: './waves.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-waves',\n '[style.background-color]': 'backgroundColor()',\n // Feeds the CSS stand-in grid (see waves.scss) so it matches the real\n // spacing, and switches it off the moment the canvas has painted.\n '[style.--wr-waves-x-gap.px]': 'xGap()',\n '[class.wr-waves--painted]': 'painted()',\n },\n})\nexport class WrWaves {\n /** Line stroke colour. When unset, the theme decides. */\n readonly lineColor = input<string | null>(null);\n\n /** Background fill behind the lines. @default 'transparent' */\n readonly backgroundColor = input('transparent');\n\n /** Horizontal noise drift per ms. @default 0.0125 */\n readonly waveSpeedX = input(0.0125, { transform: numAttr(0.0125) });\n\n /** Vertical noise drift per ms. @default 0.005 */\n readonly waveSpeedY = input(0.005, { transform: numAttr(0.005) });\n\n /** Horizontal wave amplitude in px. @default 32 */\n readonly waveAmpX = input(32, { transform: numAttr(32) });\n\n /** Vertical wave amplitude in px. @default 16 */\n readonly waveAmpY = input(16, { transform: numAttr(16) });\n\n /** Horizontal gap between lines in px. @default 10 */\n readonly xGap = input(10, { transform: numAttr(10) });\n\n /** Vertical gap between points on a line in px. @default 32 */\n readonly yGap = input(32, { transform: numAttr(32) });\n\n /** Velocity damping of the cursor spring, 0..1. @default 0.925 */\n readonly friction = input(0.925, { transform: numAttr(0.925) });\n\n /** Pull-back strength of the cursor spring. @default 0.005 */\n readonly tension = input(0.005, { transform: numAttr(0.005) });\n\n /** Max px a point can be dragged from rest. @default 100 */\n readonly maxCursorMove = input(100, { transform: numAttr(100) });\n\n private readonly canvasRef = viewChild.required<ElementRef<HTMLCanvasElement>>('canvas');\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly zone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n private readonly platform = inject(WrPlatform);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private ctx: CanvasRenderingContext2D | null = null;\n private readonly noise = new Noise(Math.random());\n private lines: WavePoint[][] = [];\n private bounding = { width: 0, height: 0, left: 0, top: 0 };\n private readonly mouse = { x: -10, y: 0, lx: 0, ly: 0, sx: 0, sy: 0, v: 0, vs: 0, a: 0, set: false };\n private rafId = 0;\n\n /**\n * Flips once the canvas has drawn, which retires the CSS stand-in grid.\n *\n * A canvas cannot be prerendered, so on an SSR'd or prerendered page this\n * element is simply blank until the bundle has loaded and hydration has run —\n * measured at ~2.8s on ngwr.dev's own home page. The stylesheet paints a static\n * grid of the same colour and pitch in the meantime, straight from the\n * prerendered HTML, and this hands over to the real thing.\n */\n protected readonly painted = signal(false);\n\n constructor() {\n if (!this.isBrowser) return;\n\n afterNextRender(() => this.zone.runOutsideAngular(() => this.boot()));\n\n // Re-seed the grid when geometry inputs change.\n effect(() => {\n this.xGap();\n this.yGap();\n if (!this.ctx) return;\n this.setSize();\n this.setLines();\n });\n }\n\n // Setup\n\n private boot(): void {\n const canvas = this.canvasRef().nativeElement;\n this.ctx = canvas.getContext('2d');\n if (!this.ctx) return;\n\n this.setSize();\n this.setLines();\n\n const onResize = (): void => {\n this.setSize();\n this.setLines();\n if (this.platform.prefersReducedMotion()) this.drawLines();\n };\n const onMouseMove = (e: MouseEvent): void => this.updateMouse(e.clientX, e.clientY);\n const onTouchMove = (e: TouchEvent): void => this.updateMouse(e.touches[0].clientX, e.touches[0].clientY);\n\n window.addEventListener('resize', onResize);\n const ro = new ResizeObserver(onResize);\n ro.observe(this.host.nativeElement);\n\n // Reduced motion: one static, undisturbed grid — no drift, no loop,\n // no pointer reactivity.\n if (this.platform.prefersReducedMotion()) {\n this.drawLines();\n this.destroyRef.onDestroy(() => {\n window.removeEventListener('resize', onResize);\n ro.disconnect();\n });\n return;\n }\n\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('touchmove', onTouchMove, { passive: true });\n this.rafId = requestAnimationFrame(t => this.tick(t));\n\n this.destroyRef.onDestroy(() => {\n window.removeEventListener('resize', onResize);\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('touchmove', onTouchMove);\n ro.disconnect();\n cancelAnimationFrame(this.rafId);\n });\n }\n\n private setSize(): void {\n const rect = this.host.nativeElement.getBoundingClientRect();\n this.bounding = { width: rect.width, height: rect.height, left: rect.left, top: rect.top };\n const canvas = this.canvasRef().nativeElement;\n canvas.width = rect.width;\n canvas.height = rect.height;\n }\n\n private setLines(): void {\n const { width, height } = this.bounding;\n this.lines = [];\n const oWidth = width + 200;\n const oHeight = height + 30;\n const xGap = this.xGap();\n const yGap = this.yGap();\n const totalLines = Math.ceil(oWidth / xGap);\n const totalPoints = Math.ceil(oHeight / yGap);\n const xStart = (width - xGap * totalLines) / 2;\n const yStart = (height - yGap * totalPoints) / 2;\n for (let i = 0; i <= totalLines; i++) {\n const pts: WavePoint[] = [];\n for (let j = 0; j <= totalPoints; j++) {\n pts.push({\n x: xStart + xGap * i,\n y: yStart + yGap * j,\n wave: { x: 0, y: 0 },\n cursor: { x: 0, y: 0, vx: 0, vy: 0 },\n });\n }\n this.lines.push(pts);\n }\n }\n\n // Frame loop\n\n private tick(time: number): void {\n const mouse = this.mouse;\n mouse.sx += (mouse.x - mouse.sx) * 0.1;\n mouse.sy += (mouse.y - mouse.sy) * 0.1;\n const dx = mouse.x - mouse.lx;\n const dy = mouse.y - mouse.ly;\n const d = Math.hypot(dx, dy);\n mouse.v = d;\n mouse.vs += (d - mouse.vs) * 0.1;\n mouse.vs = Math.min(100, mouse.vs);\n mouse.lx = mouse.x;\n mouse.ly = mouse.y;\n mouse.a = Math.atan2(dy, dx);\n\n this.movePoints(time);\n this.drawLines();\n this.rafId = requestAnimationFrame(t => this.tick(t));\n }\n\n private movePoints(time: number): void {\n const mouse = this.mouse;\n const waveSpeedX = this.waveSpeedX();\n const waveSpeedY = this.waveSpeedY();\n const waveAmpX = this.waveAmpX();\n const waveAmpY = this.waveAmpY();\n const friction = this.friction();\n const tension = this.tension();\n const maxCursorMove = this.maxCursorMove();\n\n for (const pts of this.lines) {\n for (const p of pts) {\n const move = this.noise.perlin2((p.x + time * waveSpeedX) * 0.002, (p.y + time * waveSpeedY) * 0.0015) * 12;\n p.wave.x = Math.cos(move) * waveAmpX;\n p.wave.y = Math.sin(move) * waveAmpY;\n\n const dx = p.x - mouse.sx;\n const dy = p.y - mouse.sy;\n const dist = Math.hypot(dx, dy);\n const l = Math.max(175, mouse.vs);\n if (dist < l) {\n const s = 1 - dist / l;\n const f = Math.cos(dist * 0.001) * s;\n p.cursor.vx += Math.cos(mouse.a) * f * l * mouse.vs * 0.00065;\n p.cursor.vy += Math.sin(mouse.a) * f * l * mouse.vs * 0.00065;\n }\n\n p.cursor.vx += (0 - p.cursor.x) * tension;\n p.cursor.vy += (0 - p.cursor.y) * tension;\n p.cursor.vx *= friction;\n p.cursor.vy *= friction;\n p.cursor.x += p.cursor.vx * 2;\n p.cursor.y += p.cursor.vy * 2;\n p.cursor.x = Math.min(maxCursorMove, Math.max(-maxCursorMove, p.cursor.x));\n p.cursor.y = Math.min(maxCursorMove, Math.max(-maxCursorMove, p.cursor.y));\n }\n }\n }\n\n private moved(point: WavePoint, withCursor: boolean): { x: number; y: number } {\n const x = point.x + point.wave.x + (withCursor ? point.cursor.x : 0);\n const y = point.y + point.wave.y + (withCursor ? point.cursor.y : 0);\n return { x: Math.round(x * 10) / 10, y: Math.round(y * 10) / 10 };\n }\n\n private drawLines(): void {\n const ctx = this.ctx;\n if (!ctx) return;\n // Retire the CSS stand-in: from here the canvas has real pixels. Set inside\n // the draw rather than at the end of `boot()` so it can never switch the\n // fallback off before something has actually been painted. Runs outside\n // Angular (the rAF loop does), so `signal.set` schedules the one host-binding\n // update it needs; every later call is a no-op on an unchanged value.\n if (!this.painted()) this.painted.set(true);\n const { width, height } = this.bounding;\n ctx.clearRect(0, 0, width, height);\n ctx.beginPath();\n ctx.strokeStyle = this.resolveLineColor();\n for (const points of this.lines) {\n let p1 = this.moved(points[0], false);\n ctx.moveTo(p1.x, p1.y);\n points.forEach((p, idx) => {\n const isLast = idx === points.length - 1;\n p1 = this.moved(p, !isLast);\n const p2 = this.moved(points[idx + 1] ?? points[points.length - 1], !isLast);\n ctx.lineTo(p1.x, p1.y);\n if (isLast) ctx.moveTo(p2.x, p2.y);\n });\n }\n ctx.stroke();\n }\n\n /** Explicit input wins; otherwise the theme's `--wr-waves-line-color`. */\n private resolveLineColor(): string {\n const explicit = this.lineColor();\n if (explicit !== null) return explicit;\n const themed = getComputedStyle(this.host.nativeElement).getPropertyValue('--wr-waves-line-color').trim();\n return themed || 'rgba(15, 23, 42, 0.12)';\n }\n\n private updateMouse(x: number, y: number): void {\n // Re-read the box each move — cheaper than tracking scroll, and the\n // host is usually a hero that rarely reflows mid-gesture.\n const rect = this.host.nativeElement.getBoundingClientRect();\n const mouse = this.mouse;\n mouse.x = x - rect.left;\n mouse.y = y - rect.top;\n if (!mouse.set) {\n mouse.sx = mouse.x;\n mouse.sy = mouse.y;\n mouse.lx = mouse.x;\n mouse.ly = mouse.y;\n mouse.set = true;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;AAYG;AAqBH;AACA;AAEA,MAAM,IAAI,CAAA;AAEW,IAAA,CAAA;AACA,IAAA,CAAA;IAFnB,WAAA,CACmB,CAAS,EACT,CAAS,EAAA;QADT,IAAA,CAAA,CAAC,GAAD,CAAC;QACD,IAAA,CAAA,CAAC,GAAD,CAAC;IACjB;IAEH,IAAI,CAAC,CAAS,EAAE,CAAS,EAAA;QACvB,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC;IAChC;AACD;AAED,MAAM,KAAK,GAAoB;AAC7B,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AACd,IAAA,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACf,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACf,IAAA,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAChB,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AACd,IAAA,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACf,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AACd,IAAA,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACf,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AACd,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACf,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AACd,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAChB;AAED;AACA,MAAM,CAAC,GAAsB;IAC3B,GAAG,EAAE,GAAG,EAAE,GAA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,EAAE,GAAG,KAAK,CAAC,CAAC;AAClB,YAAA,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC;AAClB,YAAA,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC;AAClB,YAAA,KAAK,CAAC,GAAG,GAAG,IAAI;QAClB;IACF;uGA7QW,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,4xDAZR,uEAAuE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,6YAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAYtE,OAAO,EAAA,UAAA,EAAA,CAAA;kBAdnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,YACV,uEAAuE,EAAA,aAAA,EAElE,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,KAAK,EAAE,UAAU;AACjB,wBAAA,0BAA0B,EAAE,mBAAmB;;;AAG/C,wBAAA,6BAA6B,EAAE,QAAQ;AACvC,wBAAA,2BAA2B,EAAE,WAAW;AACzC,qBAAA,EAAA,MAAA,EAAA,CAAA,6YAAA,CAAA,EAAA;ipCAoC8E,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AChMzF;;AAEG;;;;"}
@@ -95,9 +95,17 @@ class WrWindowHarness extends ContentContainerComponentHarness {
95
95
  }
96
96
  throw new Error('WrWindowHarness.getOs(): this window carries no `wr-window--os-<name>` class.');
97
97
  }
98
- /** The title-bar density — `normal` or `compact`. */
98
+ /**
99
+ * The title-bar density — `sm` or `md`.
100
+ *
101
+ * Typed as the union rather than `string`, so a value added to
102
+ * `WrWindowChromeSize` fails this method's compile instead of quietly
103
+ * answering `md` for it. Only `sm` carries a modifier class: `md` is the
104
+ * default and paints from the base block, so its answer is the absence of
105
+ * the other one.
106
+ */
99
107
  async getChromeSize() {
100
- return (await (await this.host()).hasClass('wr-window--chrome-compact')) ? 'compact' : 'normal';
108
+ return (await (await this.host()).hasClass('wr-window--chrome-sm')) ? 'sm' : 'md';
101
109
  }
102
110
  /**
103
111
  * Where the window is and how big, in CSS pixels.
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-window-testing.mjs","sources":["../../../projects/lib/window/testing/wr-window-harness.ts","../../../projects/lib/window/testing/wr-window-taskbar-harness.ts","../../../projects/lib/window/testing/ngwr-window-testing.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 { ContentContainerComponentHarness, HarnessPredicate, TestKey, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrWindowState } from 'ngwr/window';\n\nimport type { WrWindowBox, WrWindowHarnessFilters } from './interfaces';\n\nconst STATES: readonly WrWindowState[] = ['normal', 'minimized', 'maximized'];\n\n/**\n * Test harness for a window opened through `WrWindowManager.open()`.\n *\n * `WrWindow` is deliberately not exported — a window is always a service call — so\n * there is nothing in your fixture to load: each window is a portal in its own\n * overlay pane, and this comes from\n * `TestbedHarnessEnvironment.documentRootLoader()`.\n *\n * It is a CONTENT CONTAINER, like `WrDialogHarness`: the component you opened is\n * projected into the window's body, so `window.getHarness(WrButtonHarness…)` reads\n * ITS buttons and cannot reach another window's. That matters more here than\n * anywhere else, because windows are explicitly non-modal and several are normally\n * open at once.\n *\n * **Geometry is read from the inline styles the component writes**, never measured:\n * a window is positioned with `left` / `top` / `width` / `height` in pixels, and a\n * unit test has no layout to measure. That also makes {@link getBox} the way to\n * assert a move or a resize — including the ones a drag would produce, which no\n * synthetic pointer event can, since the drag divides by a rect that is 0×0 here.\n *\n * @example\n * ```ts\n * const rootLoader = TestbedHarnessEnvironment.documentRootLoader(fixture);\n * windows.open(EditorComponent, { title: 'Untitled.md' });\n * await fixture.whenStable();\n *\n * const win = await rootLoader.getHarness(WrWindowHarness.with({ title: 'Untitled.md' }));\n * await win.maximize();\n * expect(await win.getState()).toBe('maximized');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrWindowHarness extends ContentContainerComponentHarness {\n static hostSelector = 'wr-window';\n\n /** Build a predicate that narrows the query — windows come in stacks. */\n static with(options: WrWindowHarnessFilters = {}): HarnessPredicate<WrWindowHarness> {\n return new HarnessPredicate(WrWindowHarness, options)\n .addOption('title', options.title, (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title))\n .addOption('state', options.state, async (harness, state) => (await harness.getState()) === state);\n }\n\n private readonly titleEl = this.locatorFor('.wr-window__title');\n\n /**\n * Whether this window is still on the page.\n *\n * For a harness you are already HOLDING: closing disposes the overlay, so this\n * flips to `false` where a fresh `getHarnessOrNull()` comes back `null`. A\n * MINIMIZED window is still open — it is a state, not a dismissal — and this\n * stays `true` for one.\n */\n async isOpen(): Promise<boolean> {\n return (await this.host()).matchesSelector('body wr-window');\n }\n\n /** The title-bar text. */\n async getTitle(): Promise<string> {\n return (await this.titleEl()).text();\n }\n\n /** The projected `[wrWindowTitleExtra]` content, trimmed — empty when there is none. */\n async getTitleExtraText(): Promise<string> {\n return (await this.locatorFor('.wr-window__title-extra')()).text();\n }\n\n /** The window's visual state, from the host modifier. */\n async getState(): Promise<WrWindowState> {\n const host = await this.host();\n for (const state of STATES) {\n if (await host.hasClass(`wr-window--${state}`)) return state;\n }\n throw new Error(\n 'WrWindowHarness.getState(): this host carries no `wr-window--<state>` class, which every window sets — ' +\n 'the element matched is probably not an ngwr window.'\n );\n }\n\n /**\n * The OS the chrome is dressed as — `macos`, `windows` or `linux`.\n *\n * Worth asserting because it is not cosmetic: on macOS the buttons are a\n * traffic-light cluster in close → minimize → maximize order, and the Linux\n * chrome renders neither minimize nor maximize UNLESS `showMinimize` /\n * `showMaximize` asks for them. \"No minimize on Linux\" is a default, not an\n * invariant — see {@link hasMinimizeButton}.\n */\n async getOs(): Promise<string> {\n const host = await this.host();\n for (const os of ['macos', 'windows', 'linux']) {\n if (await host.hasClass(`wr-window--os-${os}`)) return os;\n }\n throw new Error('WrWindowHarness.getOs(): this window carries no `wr-window--os-<name>` class.');\n }\n\n /** The title-bar density — `normal` or `compact`. */\n async getChromeSize(): Promise<string> {\n return (await (await this.host()).hasClass('wr-window--chrome-compact')) ? 'compact' : 'normal';\n }\n\n /**\n * Where the window is and how big, in CSS pixels.\n *\n * From the inline styles the component writes, which is the only readable answer\n * without layout — and the same numbers a drag or a snap would change.\n */\n async getBox(): Promise<WrWindowBox> {\n const host = await this.host();\n return {\n x: Number.parseFloat(await host.getCssValue('left')),\n y: Number.parseFloat(await host.getCssValue('top')),\n width: Number.parseFloat(await host.getCssValue('width')),\n height: Number.parseFloat(await host.getCssValue('height')),\n };\n }\n\n /**\n * The window's stacking order.\n *\n * The manager hands out a z-index per focus, so this is how a spec asserts that\n * clicking a window brought it to the front — the one thing a window manager\n * exists to do, and the reason these panes are deliberately kept OUT of the\n * browser's top layer, which orders strictly by entry.\n */\n async getZIndex(): Promise<number> {\n return Number.parseFloat(await (await this.host()).getCssValue('z-index'));\n }\n\n /** Whether the resize handles are rendered — `resizable`, and only in the normal state. */\n async isResizable(): Promise<boolean> {\n return (await this.host()).hasClass('wr-window--resizable');\n }\n\n /** The resize handles currently rendered, by their edge / corner suffix. */\n async getResizeHandles(): Promise<string[]> {\n const handles = await this.locatorForAll('.wr-window__handle')();\n return Promise.all(\n handles.map(async handle => {\n const classes = (await handle.getAttribute('class')) ?? '';\n return (\n classes\n .split(/\\s+/)\n .find(name => name.startsWith('wr-window__handle--'))\n ?.slice(19) ?? ''\n );\n })\n );\n }\n\n /** The body text of the window — the component you opened, as rendered. */\n async getBodyText(): Promise<string> {\n return (await this.locatorFor('.wr-window__body')()).text();\n }\n\n /** The projected `[wrWindowStatusBar]` content, trimmed. */\n async getStatusBarText(): Promise<string> {\n return (await this.locatorFor('.wr-window__status-bar')()).text();\n }\n\n /** Whether the chrome offers a close button (`showClose`). */\n async hasCloseButton(): Promise<boolean> {\n return (await this.chromeAction('close')) !== null;\n }\n\n /**\n * Whether the chrome offers a minimize button.\n *\n * `false` on Linux BY DEFAULT — that chrome is close-only by convention, which\n * is a real behavioural difference and not a style. `showMinimize: true`\n * overrides it, and a spec that asserts \"no minimize on Linux\" without saying\n * which of the two it means will pass for the wrong reason.\n */\n async hasMinimizeButton(): Promise<boolean> {\n return (await this.chromeAction('minimize')) !== null;\n }\n\n /** Whether the chrome offers a maximize button. Also `false` on Linux by default. */\n async hasMaximizeButton(): Promise<boolean> {\n return (await this.chromeAction('maximize')) !== null;\n }\n\n /** The close button's accessible name — the buttons are icon-only, so it is their only name. */\n async getCloseLabel(): Promise<string | null> {\n return (await this.requireAction('close', 'getCloseLabel')).getAttribute('aria-label');\n }\n\n /**\n * The minimize button's accessible name, which flips to the restore wording while\n * the window is minimized — the same button does both.\n */\n async getMinimizeLabel(): Promise<string | null> {\n return (await this.requireAction('minimize', 'getMinimizeLabel')).getAttribute('aria-label');\n }\n\n /** The maximize button's accessible name, which flips while the window is maximized. */\n async getMaximizeLabel(): Promise<string | null> {\n return (await this.requireAction('maximize', 'getMaximizeLabel')).getAttribute('aria-label');\n }\n\n /** Click the close button. Throws on a window opened `showClose: false`. */\n async close(): Promise<void> {\n await (await this.requireAction('close', 'close')).click();\n }\n\n /**\n * Click the minimize button — which RESTORES a minimized window, since it is the\n * same control.\n */\n async minimize(): Promise<void> {\n await (await this.requireAction('minimize', 'minimize')).click();\n }\n\n /** Click the maximize button — which restores a maximized window down. */\n async maximize(): Promise<void> {\n await (await this.requireAction('maximize', 'maximize')).click();\n }\n\n /**\n * Double-click the title bar, the other way to maximize.\n *\n * A separate gesture worth its own assertion, and it does NOT follow the\n * button: only an explicit `showMaximize: false` turns it off. The Linux\n * chrome hides the button by convention and keeps the gesture — which is also\n * the only way out of a window that reached `maximized` without one.\n */\n async doubleClickChrome(): Promise<void> {\n await (await this.locatorFor('.wr-window__chrome')()).dispatchEvent('dblclick');\n }\n\n /** Click the window body — which pulls it to the front of the stack. */\n async focusWindow(): Promise<void> {\n await (await this.host()).click();\n }\n\n /** Press Escape. A window opened `closeOnEscape: false` ignores it — assert, do not assume. */\n async sendEscape(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.ESCAPE);\n }\n\n /** The role the window announces — `dialog`, on a non-modal window. */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /**\n * Whether the window takes its accessible name from its own title element.\n *\n * Resolved rather than trusted: `aria-labelledby` naming an element that is not\n * this window's title is not a name, and with several windows open the ids are\n * the only thing keeping them apart.\n */\n async isLabelledByTitle(): Promise<boolean> {\n const labelledBy = await (await this.host()).getAttribute('aria-labelledby');\n if (!labelledBy) return false;\n return (await (await this.titleEl()).getAttribute('id')) === labelledBy;\n }\n\n /** Whether the window is hidden from assistive tech (`aria-hidden`, set while closed). */\n async isHiddenFromAssistiveTech(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-hidden')) === 'true';\n }\n\n private async chromeAction(name: 'close' | 'minimize' | 'maximize'): Promise<TestElement | null> {\n return this.locatorForOptional(`.wr-window__chrome-action--${name}`)();\n }\n\n private async requireAction(name: 'close' | 'minimize' | 'maximize', method: string): Promise<TestElement> {\n const button = await this.chromeAction(name);\n if (!button) {\n throw new Error(\n `WrWindowHarness.${method}(): this window has no ${name} button. It was opened with \\`show` +\n `${name[0].toUpperCase()}${name.slice(1)}: false\\`, or its chrome is the Linux one, which is ` +\n `close-only unless \\`show${name[0].toUpperCase()}${name.slice(1)}: true\\` asks for it.`\n );\n }\n return button;\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 { ComponentHarness, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrWindowTaskbarHarnessFilters } from './interfaces';\n\n/**\n * Test harness for `<wr-window-taskbar>` — the rail of minimized windows.\n *\n * The taskbar IS an element in your template, so it comes from the normal fixture\n * loader, unlike the windows it lists. It renders nothing but its own host until a\n * window is minimized; {@link isEmpty} is the question, and {@link getTabTitles}\n * answers `[]` rather than throwing, because \"no minimized windows\" is the ordinary\n * state rather than a mistake.\n *\n * @example\n * ```ts\n * const taskbar = await loader.getHarness(WrWindowTaskbarHarness);\n *\n * await (await rootLoader.getHarness(WrWindowHarness)).minimize();\n * expect(await taskbar.getTabTitles()).toEqual(['Untitled.md']);\n * await taskbar.restore('Untitled.md');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrWindowTaskbarHarness extends ComponentHarness {\n static hostSelector = 'wr-window-taskbar';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrWindowTaskbarHarnessFilters = {}): HarnessPredicate<WrWindowTaskbarHarness> {\n return new HarnessPredicate(WrWindowTaskbarHarness, options).addOption(\n 'position',\n options.position,\n async (harness, position) => (await harness.getPosition()) === position\n );\n }\n\n /** The edge the rail is pinned to. */\n async getPosition(): Promise<'top' | 'bottom'> {\n return (await (await this.host()).hasClass('wr-window-taskbar--top')) ? 'top' : 'bottom';\n }\n\n /**\n * The rail's accessible name — it is a `role=\"toolbar\"`, and an unnamed one is\n * announced as nothing.\n */\n async getRailLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** Whether nothing is minimized — the rail draws no markup at all then. */\n async isEmpty(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-window-taskbar__rail')()) === null;\n }\n\n /**\n * The titles in the rail, in order.\n *\n * A window opened without a title still gets a tab, named by the catalog's\n * fallback rather than left blank — a nameless tab is unreachable by voice and\n * indistinguishable from its neighbours.\n */\n async getTabTitles(): Promise<string[]> {\n const titles = await this.locatorForAll('.wr-window-taskbar__tab-title')();\n return Promise.all(titles.map(title => title.text()));\n }\n\n /** A tab's accessible name — the restore wording with the window's title in it. */\n async getRestoreLabel(title: string): Promise<string | null> {\n return (await this.requireTab(title, 'getRestoreLabel')).getAttribute('aria-label');\n }\n\n /** Click a tab — restoring that window and focusing it. */\n async restore(title: string): Promise<void> {\n await (await this.requireTab(title, 'restore')).click();\n }\n\n /**\n * Click a tab's ✕ — closing the window WITHOUT restoring it.\n *\n * Still worth asserting separately now that the two are siblings rather than\n * nested: they sit inside one pill and look like one control, so a close that\n * also restored would flash a closing window's content and look plausible.\n */\n async closeTab(title: string): Promise<void> {\n const index = await this.indexOf(title, 'closeTab');\n const closers = await this.locatorForAll('.wr-window-taskbar__tab-close')();\n await closers[index].click();\n }\n\n /**\n * The tab's BUTTON, not the pill around it.\n *\n * `.wr-window-taskbar__tab` is a plain container — it carries the pill's look\n * and nothing else, because the close beside it cannot be a control nested in\n * a control. The name and the click both belong to `__tab-restore`.\n */\n private async requireTab(title: string, method: string): Promise<TestElement> {\n const tabs = await this.locatorForAll('.wr-window-taskbar__tab-restore')();\n return tabs[await this.indexOf(title, method)];\n }\n\n /** Which tab carries this title — one lookup for both the tab and its close button. */\n private async indexOf(title: string, method: string): Promise<number> {\n const tabs = await this.locatorForAll('.wr-window-taskbar__tab-restore')();\n for (const [index, tab] of tabs.entries()) {\n if ((await tab.text()) === title) return index;\n }\n\n const offered = await this.getTabTitles();\n throw new Error(\n `WrWindowTaskbarHarness.${method}(\"${title}\"): no such tab. The rail holds: ` +\n `${offered.length ? offered.join(', ') : '(nothing — no window is minimized)'}.`\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAQH,MAAM,MAAM,GAA6B,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;AACG,MA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AAC,IAAI,CAAC,IAAI,CAAC,GAAG,oCAAoC,CAAA,CAAA,CAAG,CACnF;IACH;;;ACxHF;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-window-testing.mjs","sources":["../../../projects/lib/window/testing/wr-window-harness.ts","../../../projects/lib/window/testing/wr-window-taskbar-harness.ts","../../../projects/lib/window/testing/ngwr-window-testing.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 { ContentContainerComponentHarness, HarnessPredicate, TestKey, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrWindowChromeSize, WrWindowState } from 'ngwr/window';\n\nimport type { WrWindowBox, WrWindowHarnessFilters } from './interfaces';\n\nconst STATES: readonly WrWindowState[] = ['normal', 'minimized', 'maximized'];\n\n/**\n * Test harness for a window opened through `WrWindowManager.open()`.\n *\n * `WrWindow` is deliberately not exported — a window is always a service call — so\n * there is nothing in your fixture to load: each window is a portal in its own\n * overlay pane, and this comes from\n * `TestbedHarnessEnvironment.documentRootLoader()`.\n *\n * It is a CONTENT CONTAINER, like `WrDialogHarness`: the component you opened is\n * projected into the window's body, so `window.getHarness(WrButtonHarness…)` reads\n * ITS buttons and cannot reach another window's. That matters more here than\n * anywhere else, because windows are explicitly non-modal and several are normally\n * open at once.\n *\n * **Geometry is read from the inline styles the component writes**, never measured:\n * a window is positioned with `left` / `top` / `width` / `height` in pixels, and a\n * unit test has no layout to measure. That also makes {@link getBox} the way to\n * assert a move or a resize — including the ones a drag would produce, which no\n * synthetic pointer event can, since the drag divides by a rect that is 0×0 here.\n *\n * @example\n * ```ts\n * const rootLoader = TestbedHarnessEnvironment.documentRootLoader(fixture);\n * windows.open(EditorComponent, { title: 'Untitled.md' });\n * await fixture.whenStable();\n *\n * const win = await rootLoader.getHarness(WrWindowHarness.with({ title: 'Untitled.md' }));\n * await win.maximize();\n * expect(await win.getState()).toBe('maximized');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrWindowHarness extends ContentContainerComponentHarness {\n static hostSelector = 'wr-window';\n\n /** Build a predicate that narrows the query — windows come in stacks. */\n static with(options: WrWindowHarnessFilters = {}): HarnessPredicate<WrWindowHarness> {\n return new HarnessPredicate(WrWindowHarness, options)\n .addOption('title', options.title, (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title))\n .addOption('state', options.state, async (harness, state) => (await harness.getState()) === state);\n }\n\n private readonly titleEl = this.locatorFor('.wr-window__title');\n\n /**\n * Whether this window is still on the page.\n *\n * For a harness you are already HOLDING: closing disposes the overlay, so this\n * flips to `false` where a fresh `getHarnessOrNull()` comes back `null`. A\n * MINIMIZED window is still open — it is a state, not a dismissal — and this\n * stays `true` for one.\n */\n async isOpen(): Promise<boolean> {\n return (await this.host()).matchesSelector('body wr-window');\n }\n\n /** The title-bar text. */\n async getTitle(): Promise<string> {\n return (await this.titleEl()).text();\n }\n\n /** The projected `[wrWindowTitleExtra]` content, trimmed — empty when there is none. */\n async getTitleExtraText(): Promise<string> {\n return (await this.locatorFor('.wr-window__title-extra')()).text();\n }\n\n /** The window's visual state, from the host modifier. */\n async getState(): Promise<WrWindowState> {\n const host = await this.host();\n for (const state of STATES) {\n if (await host.hasClass(`wr-window--${state}`)) return state;\n }\n throw new Error(\n 'WrWindowHarness.getState(): this host carries no `wr-window--<state>` class, which every window sets — ' +\n 'the element matched is probably not an ngwr window.'\n );\n }\n\n /**\n * The OS the chrome is dressed as — `macos`, `windows` or `linux`.\n *\n * Worth asserting because it is not cosmetic: on macOS the buttons are a\n * traffic-light cluster in close → minimize → maximize order, and the Linux\n * chrome renders neither minimize nor maximize UNLESS `showMinimize` /\n * `showMaximize` asks for them. \"No minimize on Linux\" is a default, not an\n * invariant — see {@link hasMinimizeButton}.\n */\n async getOs(): Promise<string> {\n const host = await this.host();\n for (const os of ['macos', 'windows', 'linux']) {\n if (await host.hasClass(`wr-window--os-${os}`)) return os;\n }\n throw new Error('WrWindowHarness.getOs(): this window carries no `wr-window--os-<name>` class.');\n }\n\n /**\n * The title-bar density — `sm` or `md`.\n *\n * Typed as the union rather than `string`, so a value added to\n * `WrWindowChromeSize` fails this method's compile instead of quietly\n * answering `md` for it. Only `sm` carries a modifier class: `md` is the\n * default and paints from the base block, so its answer is the absence of\n * the other one.\n */\n async getChromeSize(): Promise<WrWindowChromeSize> {\n return (await (await this.host()).hasClass('wr-window--chrome-sm')) ? 'sm' : 'md';\n }\n\n /**\n * Where the window is and how big, in CSS pixels.\n *\n * From the inline styles the component writes, which is the only readable answer\n * without layout — and the same numbers a drag or a snap would change.\n */\n async getBox(): Promise<WrWindowBox> {\n const host = await this.host();\n return {\n x: Number.parseFloat(await host.getCssValue('left')),\n y: Number.parseFloat(await host.getCssValue('top')),\n width: Number.parseFloat(await host.getCssValue('width')),\n height: Number.parseFloat(await host.getCssValue('height')),\n };\n }\n\n /**\n * The window's stacking order.\n *\n * The manager hands out a z-index per focus, so this is how a spec asserts that\n * clicking a window brought it to the front — the one thing a window manager\n * exists to do, and the reason these panes are deliberately kept OUT of the\n * browser's top layer, which orders strictly by entry.\n */\n async getZIndex(): Promise<number> {\n return Number.parseFloat(await (await this.host()).getCssValue('z-index'));\n }\n\n /** Whether the resize handles are rendered — `resizable`, and only in the normal state. */\n async isResizable(): Promise<boolean> {\n return (await this.host()).hasClass('wr-window--resizable');\n }\n\n /** The resize handles currently rendered, by their edge / corner suffix. */\n async getResizeHandles(): Promise<string[]> {\n const handles = await this.locatorForAll('.wr-window__handle')();\n return Promise.all(\n handles.map(async handle => {\n const classes = (await handle.getAttribute('class')) ?? '';\n return (\n classes\n .split(/\\s+/)\n .find(name => name.startsWith('wr-window__handle--'))\n ?.slice(19) ?? ''\n );\n })\n );\n }\n\n /** The body text of the window — the component you opened, as rendered. */\n async getBodyText(): Promise<string> {\n return (await this.locatorFor('.wr-window__body')()).text();\n }\n\n /** The projected `[wrWindowStatusBar]` content, trimmed. */\n async getStatusBarText(): Promise<string> {\n return (await this.locatorFor('.wr-window__status-bar')()).text();\n }\n\n /** Whether the chrome offers a close button (`showClose`). */\n async hasCloseButton(): Promise<boolean> {\n return (await this.chromeAction('close')) !== null;\n }\n\n /**\n * Whether the chrome offers a minimize button.\n *\n * `false` on Linux BY DEFAULT — that chrome is close-only by convention, which\n * is a real behavioural difference and not a style. `showMinimize: true`\n * overrides it, and a spec that asserts \"no minimize on Linux\" without saying\n * which of the two it means will pass for the wrong reason.\n */\n async hasMinimizeButton(): Promise<boolean> {\n return (await this.chromeAction('minimize')) !== null;\n }\n\n /** Whether the chrome offers a maximize button. Also `false` on Linux by default. */\n async hasMaximizeButton(): Promise<boolean> {\n return (await this.chromeAction('maximize')) !== null;\n }\n\n /** The close button's accessible name — the buttons are icon-only, so it is their only name. */\n async getCloseLabel(): Promise<string | null> {\n return (await this.requireAction('close', 'getCloseLabel')).getAttribute('aria-label');\n }\n\n /**\n * The minimize button's accessible name, which flips to the restore wording while\n * the window is minimized — the same button does both.\n */\n async getMinimizeLabel(): Promise<string | null> {\n return (await this.requireAction('minimize', 'getMinimizeLabel')).getAttribute('aria-label');\n }\n\n /** The maximize button's accessible name, which flips while the window is maximized. */\n async getMaximizeLabel(): Promise<string | null> {\n return (await this.requireAction('maximize', 'getMaximizeLabel')).getAttribute('aria-label');\n }\n\n /** Click the close button. Throws on a window opened `showClose: false`. */\n async close(): Promise<void> {\n await (await this.requireAction('close', 'close')).click();\n }\n\n /**\n * Click the minimize button — which RESTORES a minimized window, since it is the\n * same control.\n */\n async minimize(): Promise<void> {\n await (await this.requireAction('minimize', 'minimize')).click();\n }\n\n /** Click the maximize button — which restores a maximized window down. */\n async maximize(): Promise<void> {\n await (await this.requireAction('maximize', 'maximize')).click();\n }\n\n /**\n * Double-click the title bar, the other way to maximize.\n *\n * A separate gesture worth its own assertion, and it does NOT follow the\n * button: only an explicit `showMaximize: false` turns it off. The Linux\n * chrome hides the button by convention and keeps the gesture — which is also\n * the only way out of a window that reached `maximized` without one.\n */\n async doubleClickChrome(): Promise<void> {\n await (await this.locatorFor('.wr-window__chrome')()).dispatchEvent('dblclick');\n }\n\n /** Click the window body — which pulls it to the front of the stack. */\n async focusWindow(): Promise<void> {\n await (await this.host()).click();\n }\n\n /** Press Escape. A window opened `closeOnEscape: false` ignores it — assert, do not assume. */\n async sendEscape(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.ESCAPE);\n }\n\n /** The role the window announces — `dialog`, on a non-modal window. */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /**\n * Whether the window takes its accessible name from its own title element.\n *\n * Resolved rather than trusted: `aria-labelledby` naming an element that is not\n * this window's title is not a name, and with several windows open the ids are\n * the only thing keeping them apart.\n */\n async isLabelledByTitle(): Promise<boolean> {\n const labelledBy = await (await this.host()).getAttribute('aria-labelledby');\n if (!labelledBy) return false;\n return (await (await this.titleEl()).getAttribute('id')) === labelledBy;\n }\n\n /** Whether the window is hidden from assistive tech (`aria-hidden`, set while closed). */\n async isHiddenFromAssistiveTech(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-hidden')) === 'true';\n }\n\n private async chromeAction(name: 'close' | 'minimize' | 'maximize'): Promise<TestElement | null> {\n return this.locatorForOptional(`.wr-window__chrome-action--${name}`)();\n }\n\n private async requireAction(name: 'close' | 'minimize' | 'maximize', method: string): Promise<TestElement> {\n const button = await this.chromeAction(name);\n if (!button) {\n throw new Error(\n `WrWindowHarness.${method}(): this window has no ${name} button. It was opened with \\`show` +\n `${name[0].toUpperCase()}${name.slice(1)}: false\\`, or its chrome is the Linux one, which is ` +\n `close-only unless \\`show${name[0].toUpperCase()}${name.slice(1)}: true\\` asks for it.`\n );\n }\n return button;\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 { ComponentHarness, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrWindowTaskbarHarnessFilters } from './interfaces';\n\n/**\n * Test harness for `<wr-window-taskbar>` — the rail of minimized windows.\n *\n * The taskbar IS an element in your template, so it comes from the normal fixture\n * loader, unlike the windows it lists. It renders nothing but its own host until a\n * window is minimized; {@link isEmpty} is the question, and {@link getTabTitles}\n * answers `[]` rather than throwing, because \"no minimized windows\" is the ordinary\n * state rather than a mistake.\n *\n * @example\n * ```ts\n * const taskbar = await loader.getHarness(WrWindowTaskbarHarness);\n *\n * await (await rootLoader.getHarness(WrWindowHarness)).minimize();\n * expect(await taskbar.getTabTitles()).toEqual(['Untitled.md']);\n * await taskbar.restore('Untitled.md');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrWindowTaskbarHarness extends ComponentHarness {\n static hostSelector = 'wr-window-taskbar';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrWindowTaskbarHarnessFilters = {}): HarnessPredicate<WrWindowTaskbarHarness> {\n return new HarnessPredicate(WrWindowTaskbarHarness, options).addOption(\n 'position',\n options.position,\n async (harness, position) => (await harness.getPosition()) === position\n );\n }\n\n /** The edge the rail is pinned to. */\n async getPosition(): Promise<'top' | 'bottom'> {\n return (await (await this.host()).hasClass('wr-window-taskbar--top')) ? 'top' : 'bottom';\n }\n\n /**\n * The rail's accessible name — it is a `role=\"toolbar\"`, and an unnamed one is\n * announced as nothing.\n */\n async getRailLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** Whether nothing is minimized — the rail draws no markup at all then. */\n async isEmpty(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-window-taskbar__rail')()) === null;\n }\n\n /**\n * The titles in the rail, in order.\n *\n * A window opened without a title still gets a tab, named by the catalog's\n * fallback rather than left blank — a nameless tab is unreachable by voice and\n * indistinguishable from its neighbours.\n */\n async getTabTitles(): Promise<string[]> {\n const titles = await this.locatorForAll('.wr-window-taskbar__tab-title')();\n return Promise.all(titles.map(title => title.text()));\n }\n\n /** A tab's accessible name — the restore wording with the window's title in it. */\n async getRestoreLabel(title: string): Promise<string | null> {\n return (await this.requireTab(title, 'getRestoreLabel')).getAttribute('aria-label');\n }\n\n /** Click a tab — restoring that window and focusing it. */\n async restore(title: string): Promise<void> {\n await (await this.requireTab(title, 'restore')).click();\n }\n\n /**\n * Click a tab's ✕ — closing the window WITHOUT restoring it.\n *\n * Still worth asserting separately now that the two are siblings rather than\n * nested: they sit inside one pill and look like one control, so a close that\n * also restored would flash a closing window's content and look plausible.\n */\n async closeTab(title: string): Promise<void> {\n const index = await this.indexOf(title, 'closeTab');\n const closers = await this.locatorForAll('.wr-window-taskbar__tab-close')();\n await closers[index].click();\n }\n\n /**\n * The tab's BUTTON, not the pill around it.\n *\n * `.wr-window-taskbar__tab` is a plain container — it carries the pill's look\n * and nothing else, because the close beside it cannot be a control nested in\n * a control. The name and the click both belong to `__tab-restore`.\n */\n private async requireTab(title: string, method: string): Promise<TestElement> {\n const tabs = await this.locatorForAll('.wr-window-taskbar__tab-restore')();\n return tabs[await this.indexOf(title, method)];\n }\n\n /** Which tab carries this title — one lookup for both the tab and its close button. */\n private async indexOf(title: string, method: string): Promise<number> {\n const tabs = await this.locatorForAll('.wr-window-taskbar__tab-restore')();\n for (const [index, tab] of tabs.entries()) {\n if ((await tab.text()) === title) return index;\n }\n\n const offered = await this.getTabTitles();\n throw new Error(\n `WrWindowTaskbarHarness.${method}(\"${title}\"): no such tab. The rail holds: ` +\n `${offered.length ? offered.join(', ') : '(nothing — no window is minimized)'}.`\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAQH,MAAM,MAAM,GAA6B,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;AACG,MAAO,eAAgB,SAAQ,gCAAgC,CAAA;AACnE,IAAA,OAAO,YAAY,GAAG,WAAW;;AAGjC,IAAA,OAAO,I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