ngwr 11.2.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/README.md +7 -7
  2. package/burger/styles/_index.scss +1 -1
  3. package/button/styles/_index.scss +2 -2
  4. package/calendar/styles/_index.scss +32 -12
  5. package/calendar-heatmap/styles/_index.scss +20 -0
  6. package/carousel/styles/_index.scss +23 -1
  7. package/cascader/styles/_index.scss +15 -3
  8. package/checkbox/styles/_index.scss +2 -2
  9. package/collapse/styles/_index.scss +2 -2
  10. package/color-picker/styles/_index.scss +3 -3
  11. package/compare/styles/_index.scss +18 -2
  12. package/context-menu/styles/_index.scss +21 -2
  13. package/date-picker/styles/_index.scss +5 -5
  14. package/descriptions/styles/_index.scss +1 -1
  15. package/drag-drop/styles/_index.scss +28 -1
  16. package/drawer/styles/_index.scss +37 -0
  17. package/dropdown/styles/_index.scss +2 -2
  18. package/event-calendar/styles/_index.scss +67 -10
  19. package/fesm2022/ngwr-action-sheet.mjs +3 -3
  20. package/fesm2022/ngwr-affix.mjs +3 -3
  21. package/fesm2022/ngwr-alert.mjs +3 -3
  22. package/fesm2022/ngwr-anchor.mjs +3 -3
  23. package/fesm2022/ngwr-aurora.mjs +3 -3
  24. package/fesm2022/ngwr-avatar.mjs +3 -3
  25. package/fesm2022/ngwr-back-top.mjs +3 -3
  26. package/fesm2022/ngwr-badge.mjs +6 -6
  27. package/fesm2022/ngwr-bar-chart-testing.mjs +20 -2
  28. package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -1
  29. package/fesm2022/ngwr-bar-chart.mjs +3 -3
  30. package/fesm2022/ngwr-blur-text.mjs +3 -3
  31. package/fesm2022/ngwr-blur-text.mjs.map +1 -1
  32. package/fesm2022/ngwr-border-glow.mjs +4 -4
  33. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  34. package/fesm2022/ngwr-breadcrumbs.mjs +29 -17
  35. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  36. package/fesm2022/ngwr-burger.mjs +3 -3
  37. package/fesm2022/ngwr-button.mjs +6 -6
  38. package/fesm2022/ngwr-calendar-heatmap.mjs +17 -5
  39. package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
  40. package/fesm2022/ngwr-calendar-testing.mjs +1 -1
  41. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  42. package/fesm2022/ngwr-calendar.mjs +187 -9
  43. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  44. package/fesm2022/ngwr-card.mjs +10 -10
  45. package/fesm2022/ngwr-card.mjs.map +1 -1
  46. package/fesm2022/ngwr-carousel.mjs +124 -24
  47. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  48. package/fesm2022/ngwr-cascader.mjs +48 -5
  49. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  50. package/fesm2022/ngwr-checkbox.mjs +6 -6
  51. package/fesm2022/ngwr-circular-text.mjs +4 -4
  52. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  53. package/fesm2022/ngwr-click-spark.mjs +27 -7
  54. package/fesm2022/ngwr-click-spark.mjs.map +1 -1
  55. package/fesm2022/ngwr-clipboard.mjs +3 -3
  56. package/fesm2022/ngwr-collapse.mjs +9 -9
  57. package/fesm2022/ngwr-color-picker-testing.mjs +26 -6
  58. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  59. package/fesm2022/ngwr-color-picker.mjs +98 -8
  60. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  61. package/fesm2022/ngwr-command-palette.mjs +14 -5
  62. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  63. package/fesm2022/ngwr-compare.mjs +3 -3
  64. package/fesm2022/ngwr-confetti.mjs +31 -6
  65. package/fesm2022/ngwr-confetti.mjs.map +1 -1
  66. package/fesm2022/ngwr-config.mjs +9 -0
  67. package/fesm2022/ngwr-config.mjs.map +1 -1
  68. package/fesm2022/ngwr-context-menu-testing.mjs +30 -11
  69. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
  70. package/fesm2022/ngwr-context-menu.mjs +333 -43
  71. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  72. package/fesm2022/ngwr-cookie.mjs +3 -3
  73. package/fesm2022/ngwr-counter.mjs +25 -9
  74. package/fesm2022/ngwr-counter.mjs.map +1 -1
  75. package/fesm2022/{ngwr-date-adapter-fns.mjs → ngwr-date-adapters-fns.mjs} +37 -10
  76. package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -0
  77. package/fesm2022/{ngwr-date-adapter-luxon.mjs → ngwr-date-adapters-luxon.mjs} +5 -5
  78. package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -0
  79. package/fesm2022/ngwr-date-picker-testing.mjs +11 -6
  80. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  81. package/fesm2022/ngwr-date-picker.mjs +119 -37
  82. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  83. package/fesm2022/{ngwr-date-adapter.mjs → ngwr-date.mjs} +36 -10
  84. package/fesm2022/ngwr-date.mjs.map +1 -0
  85. package/fesm2022/ngwr-decrypt-text.mjs +3 -3
  86. package/fesm2022/ngwr-density.mjs +6 -6
  87. package/fesm2022/ngwr-descriptions.mjs +6 -6
  88. package/fesm2022/ngwr-dialog.mjs +73 -18
  89. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  90. package/fesm2022/ngwr-directives.mjs +12 -12
  91. package/fesm2022/ngwr-divider.mjs +52 -5
  92. package/fesm2022/ngwr-divider.mjs.map +1 -1
  93. package/fesm2022/ngwr-donut-chart-testing.mjs +8 -4
  94. package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -1
  95. package/fesm2022/ngwr-donut-chart.mjs +7 -7
  96. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  97. package/fesm2022/ngwr-drag-drop.mjs +160 -11
  98. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  99. package/fesm2022/ngwr-drawer.mjs +121 -58
  100. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  101. package/fesm2022/ngwr-dropdown.mjs +26 -10
  102. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  103. package/fesm2022/ngwr-empty.mjs +3 -3
  104. package/fesm2022/ngwr-event-calendar.mjs +28 -15
  105. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  106. package/fesm2022/ngwr-falling-text-testing.mjs +5 -3
  107. package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -1
  108. package/fesm2022/ngwr-falling-text.mjs +75 -46
  109. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  110. package/fesm2022/ngwr-file-upload.mjs +3 -3
  111. package/fesm2022/ngwr-form.mjs +32 -15
  112. package/fesm2022/ngwr-form.mjs.map +1 -1
  113. package/fesm2022/ngwr-fuzzy-text.mjs +21 -11
  114. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  115. package/fesm2022/ngwr-gauge.mjs +3 -3
  116. package/fesm2022/ngwr-glitch-text-testing.mjs +51 -17
  117. package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -1
  118. package/fesm2022/ngwr-glitch-text.mjs +7 -7
  119. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  120. package/fesm2022/ngwr-gradient-text-testing.mjs +46 -11
  121. package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -1
  122. package/fesm2022/ngwr-gradient-text.mjs +4 -4
  123. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  124. package/fesm2022/ngwr-hotkey.mjs +24 -9
  125. package/fesm2022/ngwr-hotkey.mjs.map +1 -1
  126. package/fesm2022/ngwr-i18n-en.mjs +73 -1
  127. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  128. package/fesm2022/ngwr-i18n-ru.mjs +55 -1
  129. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  130. package/fesm2022/ngwr-i18n.mjs +26 -15
  131. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  132. package/fesm2022/ngwr-icon.mjs +6 -6
  133. package/fesm2022/ngwr-image-cropper-testing.mjs +53 -9
  134. package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -1
  135. package/fesm2022/ngwr-image-cropper.mjs +150 -12
  136. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  137. package/fesm2022/ngwr-input-number-testing.mjs +15 -10
  138. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  139. package/fesm2022/ngwr-input-number.mjs +17 -10
  140. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  141. package/fesm2022/ngwr-input-otp-testing.mjs +12 -6
  142. package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
  143. package/fesm2022/ngwr-input-otp.mjs +24 -5
  144. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  145. package/fesm2022/ngwr-input.mjs +15 -15
  146. package/fesm2022/ngwr-keyboard.mjs +3 -3
  147. package/fesm2022/ngwr-knob.mjs +3 -3
  148. package/fesm2022/ngwr-layout.mjs +15 -15
  149. package/fesm2022/ngwr-lightbox.mjs +4 -4
  150. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  151. package/fesm2022/ngwr-line-chart.mjs +73 -26
  152. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  153. package/fesm2022/ngwr-list.mjs +7 -7
  154. package/fesm2022/ngwr-list.mjs.map +1 -1
  155. package/fesm2022/ngwr-loading-bar.mjs +7 -7
  156. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  157. package/fesm2022/ngwr-markdown.mjs +66 -8
  158. package/fesm2022/ngwr-markdown.mjs.map +1 -1
  159. package/fesm2022/ngwr-marquee.mjs +4 -4
  160. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  161. package/fesm2022/ngwr-media.mjs +3 -3
  162. package/fesm2022/ngwr-mention.mjs +108 -13
  163. package/fesm2022/ngwr-mention.mjs.map +1 -1
  164. package/fesm2022/ngwr-meta.mjs +6 -6
  165. package/fesm2022/ngwr-meter-group-testing.mjs +26 -6
  166. package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -1
  167. package/fesm2022/ngwr-meter-group.mjs +3 -3
  168. package/fesm2022/ngwr-overlay.mjs +6 -6
  169. package/fesm2022/ngwr-page-header.mjs +3 -3
  170. package/fesm2022/ngwr-pagination-testing.mjs +6 -6
  171. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
  172. package/fesm2022/ngwr-pagination.mjs +17 -13
  173. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  174. package/fesm2022/ngwr-pipes.mjs +39 -26
  175. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  176. package/fesm2022/ngwr-platform.mjs +9 -9
  177. package/fesm2022/ngwr-popconfirm.mjs +6 -6
  178. package/fesm2022/ngwr-popover-testing.mjs +7 -2
  179. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  180. package/fesm2022/ngwr-popover.mjs +155 -33
  181. package/fesm2022/ngwr-popover.mjs.map +1 -1
  182. package/fesm2022/ngwr-progress.mjs +3 -3
  183. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  184. package/fesm2022/ngwr-qr.mjs +42 -5
  185. package/fesm2022/ngwr-qr.mjs.map +1 -1
  186. package/fesm2022/ngwr-radio.mjs +6 -6
  187. package/fesm2022/ngwr-rating.mjs +3 -3
  188. package/fesm2022/ngwr-result.mjs +21 -30
  189. package/fesm2022/ngwr-result.mjs.map +1 -1
  190. package/fesm2022/ngwr-rotating-text.mjs +3 -3
  191. package/fesm2022/ngwr-scroll.mjs +3 -3
  192. package/fesm2022/ngwr-segmented-testing.mjs +14 -1
  193. package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
  194. package/fesm2022/ngwr-segmented.mjs +29 -6
  195. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  196. package/fesm2022/ngwr-select.mjs +159 -34
  197. package/fesm2022/ngwr-select.mjs.map +1 -1
  198. package/fesm2022/ngwr-shiny-text.mjs +11 -9
  199. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  200. package/fesm2022/ngwr-sidebar.mjs +31 -16
  201. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  202. package/fesm2022/ngwr-skeleton.mjs +3 -3
  203. package/fesm2022/ngwr-slider.mjs +100 -9
  204. package/fesm2022/ngwr-slider.mjs.map +1 -1
  205. package/fesm2022/ngwr-sparkline.mjs +3 -3
  206. package/fesm2022/ngwr-speed-dial-testing.mjs +15 -13
  207. package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -1
  208. package/fesm2022/ngwr-speed-dial.mjs +27 -12
  209. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  210. package/fesm2022/ngwr-spinner.mjs +3 -3
  211. package/fesm2022/ngwr-splash-cursor.mjs +3 -3
  212. package/fesm2022/ngwr-split-text.mjs +17 -5
  213. package/fesm2022/ngwr-split-text.mjs.map +1 -1
  214. package/fesm2022/ngwr-splitter.mjs +3 -3
  215. package/fesm2022/ngwr-spotlight-card.mjs +7 -7
  216. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  217. package/fesm2022/ngwr-squircle.mjs +6 -6
  218. package/fesm2022/ngwr-star-border.mjs +4 -4
  219. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  220. package/fesm2022/ngwr-statistic.mjs +9 -9
  221. package/fesm2022/ngwr-stepper-testing.mjs +8 -8
  222. package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
  223. package/fesm2022/ngwr-stepper.mjs +33 -8
  224. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  225. package/fesm2022/ngwr-storage.mjs +17 -5
  226. package/fesm2022/ngwr-storage.mjs.map +1 -1
  227. package/fesm2022/ngwr-switch.mjs +3 -3
  228. package/fesm2022/ngwr-table.mjs +99 -39
  229. package/fesm2022/ngwr-table.mjs.map +1 -1
  230. package/fesm2022/ngwr-tabs-testing.mjs +11 -10
  231. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  232. package/fesm2022/ngwr-tabs.mjs +36 -10
  233. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  234. package/fesm2022/ngwr-textarea.mjs +3 -3
  235. package/fesm2022/ngwr-theme.mjs +181 -4
  236. package/fesm2022/ngwr-theme.mjs.map +1 -1
  237. package/fesm2022/ngwr-tilt-card.mjs +7 -7
  238. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  239. package/fesm2022/ngwr-timeline.mjs +6 -6
  240. package/fesm2022/ngwr-toast.mjs +9 -9
  241. package/fesm2022/ngwr-toolbar.mjs +3 -3
  242. package/fesm2022/ngwr-tour.mjs +34 -10
  243. package/fesm2022/ngwr-tour.mjs.map +1 -1
  244. package/fesm2022/ngwr-transfer.mjs +3 -3
  245. package/fesm2022/ngwr-tree.mjs +28 -10
  246. package/fesm2022/ngwr-tree.mjs.map +1 -1
  247. package/fesm2022/ngwr-typewriter-testing.mjs +15 -1
  248. package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -1
  249. package/fesm2022/ngwr-typewriter.mjs +13 -5
  250. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  251. package/fesm2022/ngwr-typography.mjs +3 -3
  252. package/fesm2022/ngwr-utils.mjs +5 -2
  253. package/fesm2022/ngwr-utils.mjs.map +1 -1
  254. package/fesm2022/ngwr-version.mjs +1 -1
  255. package/fesm2022/ngwr-version.mjs.map +1 -1
  256. package/fesm2022/ngwr-virtual-scroll.mjs +4 -4
  257. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  258. package/fesm2022/ngwr-waves.mjs +4 -4
  259. package/fesm2022/ngwr-waves.mjs.map +1 -1
  260. package/fesm2022/ngwr-window.mjs +94 -24
  261. package/fesm2022/ngwr-window.mjs.map +1 -1
  262. package/file-upload/styles/_index.scss +2 -2
  263. package/glitch-text/styles/_index.scss +27 -12
  264. package/i18n/en.json +56 -6
  265. package/i18n/ru.json +56 -6
  266. package/image-cropper/styles/_index.scss +19 -0
  267. package/input/styles/_index.scss +2 -2
  268. package/input-number/styles/_index.scss +2 -2
  269. package/input-otp/styles/_index.scss +9 -2
  270. package/knob/styles/_index.scss +1 -1
  271. package/lightbox/styles/_index.scss +16 -2
  272. package/line-chart/styles/_index.scss +28 -14
  273. package/list/styles/_index.scss +1 -1
  274. package/llms-full.txt +18 -23
  275. package/llms.txt +22 -6
  276. package/markdown/styles/_index.scss +3 -3
  277. package/mcp/api.js +6 -4
  278. package/mcp/catalog.js +40 -3
  279. package/mcp/providers.js +16 -3
  280. package/mcp/tools.js +21 -1
  281. package/meter-group/styles/_index.scss +1 -1
  282. package/overlay/styles/_index.scss +33 -1
  283. package/package.json +17 -12
  284. package/pagination/styles/_index.scss +23 -1
  285. package/popover/styles/_index.scss +16 -7
  286. package/progress/styles/_index.scss +1 -1
  287. package/radio/styles/_index.scss +2 -2
  288. package/rating/styles/_index.scss +1 -1
  289. package/schematics/collection.json +1 -1
  290. package/schematics/migrations/v12/index.js +65 -0
  291. package/schematics/migrations/v7/index.js +12 -1
  292. package/schematics/migrations/v8/index.js +10 -1
  293. package/schematics/migrations.json +5 -0
  294. package/schematics/ng-add/index.js +8 -3
  295. package/schematics/provider/index.js +80 -13
  296. package/schematics/use/index.js +9 -129
  297. package/schematics/use/rule.js +206 -0
  298. package/schematics/use/symbol-map.json +4 -4
  299. package/segmented/styles/_index.scss +14 -3
  300. package/select/styles/_index.scss +14 -2
  301. package/sidebar/styles/_index.scss +12 -10
  302. package/skills/ngwr/SKILL.md +7 -5
  303. package/skills/ngwr/references/catalog.md +9 -9
  304. package/skills/ngwr/references/setup.md +10 -5
  305. package/slider/styles/_index.scss +1 -1
  306. package/speed-dial/styles/_index.scss +1 -1
  307. package/stepper/styles/_index.scss +12 -3
  308. package/switch/styles/_index.scss +2 -2
  309. package/table/styles/_index.scss +61 -12
  310. package/tabs/styles/_index.scss +1 -1
  311. package/textarea/styles/_index.scss +1 -1
  312. package/theme/styles/_colors.scss +142 -56
  313. package/theme/styles/_dark.scss +46 -3
  314. package/theme/styles/_focus.scss +28 -5
  315. package/theme/styles/_mixins.scss +1 -1
  316. package/theme/styles/_variables.scss +67 -0
  317. package/transfer/styles/_index.scss +26 -3
  318. package/tree/styles/_index.scss +29 -6
  319. package/types/ngwr-bar-chart-testing.d.ts +9 -1
  320. package/types/ngwr-blur-text.d.ts +8 -4
  321. package/types/ngwr-breadcrumbs.d.ts +17 -10
  322. package/types/ngwr-calendar-testing.d.ts +1 -1
  323. package/types/ngwr-calendar.d.ts +66 -0
  324. package/types/ngwr-carousel.d.ts +85 -6
  325. package/types/ngwr-cascader.d.ts +17 -0
  326. package/types/ngwr-click-spark.d.ts +4 -0
  327. package/types/ngwr-color-picker-testing.d.ts +8 -0
  328. package/types/ngwr-color-picker.d.ts +21 -1
  329. package/types/ngwr-confetti.d.ts +8 -0
  330. package/types/ngwr-config.d.ts +10 -1
  331. package/types/ngwr-context-menu-testing.d.ts +24 -11
  332. package/types/ngwr-context-menu.d.ts +56 -0
  333. package/types/ngwr-counter.d.ts +1 -0
  334. package/types/{ngwr-date-adapter-fns.d.ts → ngwr-date-adapters-fns.d.ts} +33 -6
  335. package/types/{ngwr-date-adapter-luxon.d.ts → ngwr-date-adapters-luxon.d.ts} +1 -1
  336. package/types/ngwr-date-picker-testing.d.ts +11 -6
  337. package/types/ngwr-date-picker.d.ts +8 -4
  338. package/types/{ngwr-date-adapter.d.ts → ngwr-date.d.ts} +24 -5
  339. package/types/ngwr-dialog.d.ts +38 -1
  340. package/types/ngwr-divider.d.ts +25 -0
  341. package/types/ngwr-donut-chart-testing.d.ts +7 -3
  342. package/types/ngwr-donut-chart.d.ts +3 -3
  343. package/types/ngwr-drag-drop.d.ts +56 -2
  344. package/types/ngwr-drawer.d.ts +56 -5
  345. package/types/ngwr-event-calendar.d.ts +8 -2
  346. package/types/ngwr-falling-text-testing.d.ts +5 -3
  347. package/types/ngwr-falling-text.d.ts +1 -1
  348. package/types/ngwr-form.d.ts +12 -2
  349. package/types/ngwr-glitch-text-testing.d.ts +37 -8
  350. package/types/ngwr-gradient-text-testing.d.ts +16 -3
  351. package/types/ngwr-i18n.d.ts +13 -4
  352. package/types/ngwr-image-cropper-testing.d.ts +49 -10
  353. package/types/ngwr-image-cropper.d.ts +70 -5
  354. package/types/ngwr-input-number-testing.d.ts +15 -10
  355. package/types/ngwr-input-number.d.ts +11 -4
  356. package/types/ngwr-input-otp-testing.d.ts +12 -6
  357. package/types/ngwr-input-otp.d.ts +15 -1
  358. package/types/ngwr-line-chart.d.ts +20 -3
  359. package/types/ngwr-markdown.d.ts +11 -0
  360. package/types/ngwr-mention.d.ts +32 -0
  361. package/types/ngwr-meter-group-testing.d.ts +12 -2
  362. package/types/ngwr-overlay.d.ts +1 -0
  363. package/types/ngwr-pagination-testing.d.ts +4 -4
  364. package/types/ngwr-pipes.d.ts +1 -1
  365. package/types/ngwr-popover-testing.d.ts +7 -2
  366. package/types/ngwr-popover.d.ts +1 -0
  367. package/types/ngwr-result.d.ts +6 -0
  368. package/types/ngwr-segmented-testing.d.ts +9 -0
  369. package/types/ngwr-segmented.d.ts +21 -1
  370. package/types/ngwr-select.d.ts +68 -6
  371. package/types/ngwr-shiny-text.d.ts +4 -2
  372. package/types/ngwr-sidebar.d.ts +14 -5
  373. package/types/ngwr-slider.d.ts +69 -1
  374. package/types/ngwr-speed-dial-testing.d.ts +15 -11
  375. package/types/ngwr-speed-dial.d.ts +22 -3
  376. package/types/ngwr-split-text.d.ts +9 -0
  377. package/types/ngwr-stepper-testing.d.ts +5 -5
  378. package/types/ngwr-stepper.d.ts +8 -0
  379. package/types/ngwr-storage.d.ts +1 -0
  380. package/types/ngwr-table.d.ts +104 -11
  381. package/types/ngwr-tabs-testing.d.ts +11 -10
  382. package/types/ngwr-tabs.d.ts +2 -0
  383. package/types/ngwr-theme.d.ts +82 -1
  384. package/types/ngwr-tour.d.ts +22 -4
  385. package/types/ngwr-tree.d.ts +5 -4
  386. package/types/ngwr-typewriter-testing.d.ts +10 -0
  387. package/types/ngwr-utils.d.ts +5 -2
  388. package/types/ngwr-version.d.ts +1 -1
  389. package/types/ngwr-window.d.ts +39 -11
  390. package/typography/styles/_index.scss +1 -1
  391. package/window/styles/_index.scss +72 -26
  392. package/fesm2022/ngwr-date-adapter-fns.mjs.map +0 -1
  393. package/fesm2022/ngwr-date-adapter-luxon.mjs.map +0 -1
  394. package/fesm2022/ngwr-date-adapter.mjs.map +0 -1
@@ -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,CAA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EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AChMzF;;AAEG;;;;"}
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;AACf,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AACd,IAAA,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,C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ACd,YAAA,KAAK,CAAC,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,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,2sqBAAA,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,2sqBAAA,CAAA,EAAA;ipCAoC8E,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AChMzF;;AAEG;;;;"}
@@ -284,7 +284,16 @@ class WrWindow {
284
284
  }
285
285
  // Public API
286
286
  close() {
287
- this.open.set(false);
287
+ // A REQUEST to close, not the close itself. `WrWindowContainer` binds
288
+ // `(closed)` to `WrWindowRef.close()`, which awaits the `beforeClose` hook
289
+ // and — only if the hook agrees — disposes the overlay, so the owner is what
290
+ // takes the window away and this component never has to hide itself. Hiding
291
+ // here first defeated the veto: `.wr-window--closed` is `display: none`, so
292
+ // a vetoed window vanished while its ref stayed in `manager.windows()` in
293
+ // state `normal` — off screen, absent from the taskbar, and unreachable by
294
+ // `restore()` / `focus()` / `moveTo()`, none of which write `open`. Escape
295
+ // goes straight to `ref.close()` and so never had the bug, which is the
296
+ // contrast that exposed it.
288
297
  this.closed.emit();
289
298
  }
290
299
  minimize() {
@@ -360,10 +369,11 @@ class WrWindow {
360
369
  this.clampToViewport();
361
370
  this.snapTarget.set(this.detectSnapTarget(e.clientX, e.clientY));
362
371
  };
363
- const up = (e) => {
372
+ const cleanup = (e) => {
364
373
  target.releasePointerCapture(e.pointerId);
365
374
  target.removeEventListener('pointermove', move);
366
- target.removeEventListener('pointerup', up);
375
+ target.removeEventListener('pointerup', cleanup);
376
+ target.removeEventListener('pointercancel', cleanup);
367
377
  const snap = this.snapTarget();
368
378
  this.snapTarget.set(null);
369
379
  if (snap) {
@@ -372,7 +382,14 @@ class WrWindow {
372
382
  this.moved.emit({ x: this.x_(), y: this.y_() });
373
383
  };
374
384
  target.addEventListener('pointermove', move);
375
- target.addEventListener('pointerup', up);
385
+ target.addEventListener('pointerup', cleanup);
386
+ // `pointercancel` is never followed by a `pointerup` (a pen leaving range, a
387
+ // long-press menu, an OS gesture taking over), so without this the move
388
+ // listener outlived the drag on a chrome element that lives as long as the
389
+ // component: every later hover over the title bar dragged the window.
390
+ // The cancelled gesture's geometry is kept rather than rolled back, so
391
+ // `moved` still reports where the window ended up.
392
+ target.addEventListener('pointercancel', cleanup);
376
393
  }
377
394
  /** Map a cursor position to a snap target, honouring `[snap]`. */
378
395
  detectSnapTarget(clientX, clientY) {
@@ -500,14 +517,18 @@ class WrWindow {
500
517
  this.height_.set(clampedH);
501
518
  this.clampToViewport();
502
519
  };
503
- const up = (e) => {
520
+ const cleanup = (e) => {
504
521
  target.releasePointerCapture(e.pointerId);
505
522
  target.removeEventListener('pointermove', move);
506
- target.removeEventListener('pointerup', up);
523
+ target.removeEventListener('pointerup', cleanup);
524
+ target.removeEventListener('pointercancel', cleanup);
507
525
  this.resized.emit({ width: this.width_(), height: this.height_() });
508
526
  };
509
527
  target.addEventListener('pointermove', move);
510
- target.addEventListener('pointerup', up);
528
+ target.addEventListener('pointerup', cleanup);
529
+ // Same cancelled-gesture leak as `startMove` — a resize handle that is
530
+ // still listening for `pointermove` resizes the window on a bare hover.
531
+ target.addEventListener('pointercancel', cleanup);
511
532
  }
512
533
  // Bound resize handlers for the template — avoids inline object literals
513
534
  // re-creating on every change-detection tick.
@@ -551,10 +572,10 @@ class WrWindow {
551
572
  this.x_.set(clamp(this.x_(), MIN_ON_VIEWPORT - w, vw - MIN_ON_VIEWPORT));
552
573
  this.y_.set(clamp(this.y_(), 0, vh - MIN_ON_VIEWPORT));
553
574
  }
554
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrWindow, deps: [], target: i0.ɵɵFactoryTarget.Component });
555
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: WrWindow, isStandalone: true, selector: "wr-window", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, initialX: { classPropertyName: "initialX", publicName: "initialX", isSignal: true, isRequired: false, transformFunction: null }, initialY: { classPropertyName: "initialY", publicName: "initialY", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, initialWidth: { classPropertyName: "initialWidth", publicName: "initialWidth", isSignal: true, isRequired: false, transformFunction: null }, initialHeight: { classPropertyName: "initialHeight", publicName: "initialHeight", isSignal: true, isRequired: false, transformFunction: null }, os: { classPropertyName: "os", publicName: "os", isSignal: true, isRequired: false, transformFunction: null }, chromeSize: { classPropertyName: "chromeSize", publicName: "chromeSize", isSignal: true, isRequired: false, transformFunction: null }, animations: { classPropertyName: "animations", publicName: "animations", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, movable: { classPropertyName: "movable", publicName: "movable", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, keepInViewport: { classPropertyName: "keepInViewport", publicName: "keepInViewport", isSignal: true, isRequired: false, transformFunction: null }, snap: { classPropertyName: "snap", publicName: "snap", isSignal: true, isRequired: false, transformFunction: null }, dragHandle: { classPropertyName: "dragHandle", publicName: "dragHandle", isSignal: true, isRequired: false, transformFunction: null }, showMinimize: { classPropertyName: "showMinimize", publicName: "showMinimize", isSignal: true, isRequired: false, transformFunction: null }, showMaximize: { classPropertyName: "showMaximize", publicName: "showMaximize", isSignal: true, isRequired: false, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", state: "stateChange", closed: "closed", moved: "moved", resized: "resized" }, host: { attributes: { "role": "dialog" }, listeners: { "pointerdown": "focusWindow()" }, properties: { "class": "classes()", "style.left.px": "x()", "style.top.px": "y()", "style.width.px": "width()", "style.height.px": "height()", "style.z-index": "z()", "attr.aria-hidden": "!open()", "attr.aria-labelledby": "titleId" } }, ngImport: i0, template: "<!--\n The double-click gate is `!== false`, NOT `maximizeVisible()`, and the\n difference is a window nobody can get out of. The Linux preset hides the\n maximize BUTTON; the gesture is how GNOME maximizes, and it worked on every\n chrome before this input went tri-state. Gating it on button visibility would\n have killed it there \u2014 and `maximized` is reachable on Linux with no button at\n all (a snap to the top edge, `ref.maximize()`, a restored layout), after which\n every exit disappears at once: no restore-down button, no minimize button,\n `startMove` refuses while the state is not `normal`, the resize handles are not\n rendered, and the only key the window listens for is Escape, which closes it.\n An explicit `showMaximize: false` still turns the gesture off everywhere.\n-->\n<div class=\"wr-window__chrome\" (pointerdown)=\"startMove($event)\" (dblclick)=\"showMaximize() !== false && maximize()\">\n <div class=\"wr-window__title\" [attr.id]=\"titleId\">{{ title() }}</div>\n <div class=\"wr-window__title-extra\">\n <ng-content select=\"[wrWindowTitleExtra]\" />\n </div>\n\n <div class=\"wr-window__chrome-actions\">\n @if (resolvedOs() === 'macos') {\n <!-- macOS-style traffic-light cluster: close \u2192 minimize \u2192 maximize.\n Glyphs (\u00D7, \u2212, +) appear on cluster hover. -->\n @if (showClose()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close()\"\n >\n <svg class=\"wr-window__chrome-action-glyph\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path\n d=\"M2.2 2.2 L7.8 7.8 M7.8 2.2 L2.2 7.8\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n }\n @if (minimizeVisible()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--minimize\"\n [attr.aria-label]=\"minimizeActionLabel()\"\n (click)=\"minimize()\"\n >\n <svg class=\"wr-window__chrome-action-glyph\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <line x1=\"2\" y1=\"5\" x2=\"8\" y2=\"5\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n </svg>\n </button>\n }\n @if (maximizeVisible()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--maximize\"\n [attr.aria-label]=\"maximizeActionLabel()\"\n (click)=\"maximize()\"\n >\n <svg class=\"wr-window__chrome-action-glyph\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n @if (state() === 'maximized') {\n <path\n d=\"M3 1 L1 1 L1 3 M7 1 L9 1 L9 3 M1 7 L1 9 L3 9 M9 7 L9 9 L7 9\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linecap=\"round\"\n fill=\"none\"\n />\n } @else {\n <path d=\"M2 5 L8 5 M5 2 L5 8\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n }\n </svg>\n </button>\n }\n } @else {\n <!-- Windows / Linux glyph buttons. Linux hides minimize and maximize by\n DEFAULT, not by rule: `minimizeVisible()` resolves the input first, so\n `[showMinimize]=\"true\"` puts the button back \u2014 which is the only way a\n user on Linux can reach `<wr-window-taskbar>` at all. -->\n @if (minimizeVisible()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--minimize\"\n [attr.aria-label]=\"minimizeActionLabel()\"\n (click)=\"minimize()\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <line x1=\"1\" y1=\"8\" x2=\"9\" y2=\"8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n }\n\n @if (maximizeVisible()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--maximize\"\n [attr.aria-label]=\"maximizeActionLabel()\"\n (click)=\"maximize()\"\n >\n @if (state() === 'maximized') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"6\" height=\"6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <rect x=\"3\" y=\"1\" width=\"6\" height=\"6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n </svg>\n } @else {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"8\" height=\"8\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n </svg>\n }\n </button>\n }\n\n @if (showClose()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close()\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M1 1 L9 9 M9 1 L1 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n }\n }\n </div>\n</div>\n\n<div class=\"wr-window__body\">\n <ng-content />\n</div>\n\n<div class=\"wr-window__status-bar\">\n <ng-content select=\"[wrWindowStatusBar]\" />\n</div>\n\n@if (resizable() && state() === 'normal') {\n <span class=\"wr-window__handle wr-window__handle--t\" (pointerdown)=\"resizeT($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--r\" (pointerdown)=\"resizeR($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--b\" (pointerdown)=\"resizeB($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--l\" (pointerdown)=\"resizeL($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--tl\" (pointerdown)=\"resizeTL($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--tr\" (pointerdown)=\"resizeTR($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--bl\" (pointerdown)=\"resizeBL($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--br\" (pointerdown)=\"resizeBR($event)\"></span>\n}\n", encapsulation: i0.ViewEncapsulation.None });
575
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrWindow, deps: [], target: i0.ɵɵFactoryTarget.Component });
576
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: WrWindow, isStandalone: true, selector: "wr-window", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, initialX: { classPropertyName: "initialX", publicName: "initialX", isSignal: true, isRequired: false, transformFunction: null }, initialY: { classPropertyName: "initialY", publicName: "initialY", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, initialWidth: { classPropertyName: "initialWidth", publicName: "initialWidth", isSignal: true, isRequired: false, transformFunction: null }, initialHeight: { classPropertyName: "initialHeight", publicName: "initialHeight", isSignal: true, isRequired: false, transformFunction: null }, os: { classPropertyName: "os", publicName: "os", isSignal: true, isRequired: false, transformFunction: null }, chromeSize: { classPropertyName: "chromeSize", publicName: "chromeSize", isSignal: true, isRequired: false, transformFunction: null }, animations: { classPropertyName: "animations", publicName: "animations", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, movable: { classPropertyName: "movable", publicName: "movable", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, keepInViewport: { classPropertyName: "keepInViewport", publicName: "keepInViewport", isSignal: true, isRequired: false, transformFunction: null }, snap: { classPropertyName: "snap", publicName: "snap", isSignal: true, isRequired: false, transformFunction: null }, dragHandle: { classPropertyName: "dragHandle", publicName: "dragHandle", isSignal: true, isRequired: false, transformFunction: null }, showMinimize: { classPropertyName: "showMinimize", publicName: "showMinimize", isSignal: true, isRequired: false, transformFunction: null }, showMaximize: { classPropertyName: "showMaximize", publicName: "showMaximize", isSignal: true, isRequired: false, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", state: "stateChange", closed: "closed", moved: "moved", resized: "resized" }, host: { attributes: { "role": "dialog" }, listeners: { "pointerdown": "focusWindow()" }, properties: { "class": "classes()", "style.left.px": "x()", "style.top.px": "y()", "style.width.px": "width()", "style.height.px": "height()", "style.z-index": "z()", "attr.aria-hidden": "!open()", "attr.aria-labelledby": "titleId" } }, ngImport: i0, template: "<!--\n The double-click gate is `!== false`, NOT `maximizeVisible()`, and the\n difference is a window nobody can get out of. The Linux preset hides the\n maximize BUTTON; the gesture is how GNOME maximizes, and it worked on every\n chrome before this input went tri-state. Gating it on button visibility would\n have killed it there \u2014 and `maximized` is reachable on Linux with no button at\n all (a snap to the top edge, `ref.maximize()`, a restored layout), after which\n every exit disappears at once: no restore-down button, no minimize button,\n `startMove` refuses while the state is not `normal`, the resize handles are not\n rendered, and the only key the window listens for is Escape, which closes it.\n An explicit `showMaximize: false` still turns the gesture off everywhere.\n-->\n<div class=\"wr-window__chrome\" (pointerdown)=\"startMove($event)\" (dblclick)=\"showMaximize() !== false && maximize()\">\n <div class=\"wr-window__title\" [attr.id]=\"titleId\">{{ title() }}</div>\n <div class=\"wr-window__title-extra\">\n <ng-content select=\"[wrWindowTitleExtra]\" />\n </div>\n\n <div class=\"wr-window__chrome-actions\">\n @if (resolvedOs() === 'macos') {\n <!-- macOS-style traffic-light cluster: close \u2192 minimize \u2192 maximize.\n Glyphs (\u00D7, \u2212, +) appear on cluster hover. -->\n @if (showClose()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close()\"\n >\n <svg class=\"wr-window__chrome-action-glyph\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path\n d=\"M2.2 2.2 L7.8 7.8 M7.8 2.2 L2.2 7.8\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n }\n @if (minimizeVisible()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--minimize\"\n [attr.aria-label]=\"minimizeActionLabel()\"\n (click)=\"minimize()\"\n >\n <svg class=\"wr-window__chrome-action-glyph\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <line x1=\"2\" y1=\"5\" x2=\"8\" y2=\"5\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n </svg>\n </button>\n }\n @if (maximizeVisible()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--maximize\"\n [attr.aria-label]=\"maximizeActionLabel()\"\n (click)=\"maximize()\"\n >\n <svg class=\"wr-window__chrome-action-glyph\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n @if (state() === 'maximized') {\n <path\n d=\"M3 1 L1 1 L1 3 M7 1 L9 1 L9 3 M1 7 L1 9 L3 9 M9 7 L9 9 L7 9\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linecap=\"round\"\n fill=\"none\"\n />\n } @else {\n <path d=\"M2 5 L8 5 M5 2 L5 8\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n }\n </svg>\n </button>\n }\n } @else {\n <!-- Windows / Linux glyph buttons. Linux hides minimize and maximize by\n DEFAULT, not by rule: `minimizeVisible()` resolves the input first, so\n `[showMinimize]=\"true\"` puts the button back \u2014 which is the only way a\n user on Linux can reach `<wr-window-taskbar>` at all. -->\n @if (minimizeVisible()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--minimize\"\n [attr.aria-label]=\"minimizeActionLabel()\"\n (click)=\"minimize()\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <line x1=\"1\" y1=\"8\" x2=\"9\" y2=\"8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n }\n\n @if (maximizeVisible()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--maximize\"\n [attr.aria-label]=\"maximizeActionLabel()\"\n (click)=\"maximize()\"\n >\n @if (state() === 'maximized') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"6\" height=\"6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <rect x=\"3\" y=\"1\" width=\"6\" height=\"6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n </svg>\n } @else {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"8\" height=\"8\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n </svg>\n }\n </button>\n }\n\n @if (showClose()) {\n <button\n type=\"button\"\n class=\"wr-window__chrome-action wr-window__chrome-action--close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close()\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M1 1 L9 9 M9 1 L1 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n }\n }\n </div>\n</div>\n\n<div class=\"wr-window__body\">\n <ng-content />\n</div>\n\n<div class=\"wr-window__status-bar\">\n <ng-content select=\"[wrWindowStatusBar]\" />\n</div>\n\n@if (resizable() && state() === 'normal') {\n <span class=\"wr-window__handle wr-window__handle--t\" (pointerdown)=\"resizeT($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--r\" (pointerdown)=\"resizeR($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--b\" (pointerdown)=\"resizeB($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--l\" (pointerdown)=\"resizeL($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--tl\" (pointerdown)=\"resizeTL($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--tr\" (pointerdown)=\"resizeTR($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--bl\" (pointerdown)=\"resizeBL($event)\"></span>\n <span class=\"wr-window__handle wr-window__handle--br\" (pointerdown)=\"resizeBR($event)\"></span>\n}\n", encapsulation: i0.ViewEncapsulation.None });
556
577
  }
557
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrWindow, decorators: [{
578
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrWindow, decorators: [{
558
579
  type: Component,
559
580
  args: [{ selector: 'wr-window', encapsulation: ViewEncapsulation.None, host: {
560
581
  role: 'dialog',
@@ -725,10 +746,10 @@ class WrWindowContainer {
725
746
  });
726
747
  });
727
748
  }
728
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrWindowContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
729
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: WrWindowContainer, isStandalone: true, selector: "wr-window-container", viewQueries: [{ propertyName: "contentVcr", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "wrWindow", first: true, predicate: WrWindow, descendants: true, isSignal: true }], ngImport: i0, template: "<wr-window\n [open]=\"true\"\n [title]=\"ref.title()\"\n [os]=\"config.os ?? 'auto'\"\n [size]=\"config.size ?? 'md'\"\n [chromeSize]=\"config.chromeSize ?? 'normal'\"\n [animations]=\"config.animations ?? true\"\n [initialX]=\"config.x ?? null\"\n [initialY]=\"config.y ?? null\"\n [initialWidth]=\"config.width ?? null\"\n [initialHeight]=\"config.height ?? null\"\n [minWidth]=\"config.minWidth ?? 220\"\n [minHeight]=\"config.minHeight ?? 140\"\n [maxWidth]=\"config.maxWidth ?? 1000000\"\n [maxHeight]=\"config.maxHeight ?? 1000000\"\n [movable]=\"config.movable ?? true\"\n [resizable]=\"config.resizable ?? true\"\n [keepInViewport]=\"config.keepInViewport ?? true\"\n [snap]=\"config.snap ?? 'none'\"\n [dragHandle]=\"config.dragHandle ?? null\"\n [showMinimize]=\"config.showMinimize ?? null\"\n [showMaximize]=\"config.showMaximize ?? null\"\n [showClose]=\"config.showClose ?? true\"\n (closed)=\"ref.close()\"\n #window\n>\n <ng-container #content />\n</wr-window>\n\n@if (window.snapTarget(); as target) {\n <div class=\"wr-window__snap-hint\" [attr.data-target]=\"target\" aria-hidden=\"true\"></div>\n}\n", dependencies: [{ kind: "component", type: WrWindow, selector: "wr-window", inputs: ["open", "state", "title", "initialX", "initialY", "size", "initialWidth", "initialHeight", "os", "chromeSize", "animations", "minWidth", "minHeight", "maxWidth", "maxHeight", "movable", "resizable", "keepInViewport", "snap", "dragHandle", "showMinimize", "showMaximize", "showClose"], outputs: ["openChange", "stateChange", "closed", "moved", "resized"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
749
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrWindowContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
750
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: WrWindowContainer, isStandalone: true, selector: "wr-window-container", viewQueries: [{ propertyName: "contentVcr", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "wrWindow", first: true, predicate: WrWindow, descendants: true, isSignal: true }], ngImport: i0, template: "<wr-window\n [open]=\"true\"\n [title]=\"ref.title()\"\n [os]=\"config.os ?? 'auto'\"\n [size]=\"config.size ?? 'md'\"\n [chromeSize]=\"config.chromeSize ?? 'normal'\"\n [animations]=\"config.animations ?? true\"\n [initialX]=\"config.x ?? null\"\n [initialY]=\"config.y ?? null\"\n [initialWidth]=\"config.width ?? null\"\n [initialHeight]=\"config.height ?? null\"\n [minWidth]=\"config.minWidth ?? 220\"\n [minHeight]=\"config.minHeight ?? 140\"\n [maxWidth]=\"config.maxWidth ?? 1000000\"\n [maxHeight]=\"config.maxHeight ?? 1000000\"\n [movable]=\"config.movable ?? true\"\n [resizable]=\"config.resizable ?? true\"\n [keepInViewport]=\"config.keepInViewport ?? true\"\n [snap]=\"config.snap ?? 'none'\"\n [dragHandle]=\"config.dragHandle ?? null\"\n [showMinimize]=\"config.showMinimize ?? null\"\n [showMaximize]=\"config.showMaximize ?? null\"\n [showClose]=\"config.showClose ?? true\"\n (closed)=\"ref.close()\"\n #window\n>\n <ng-container #content />\n</wr-window>\n\n@if (window.snapTarget(); as target) {\n <div class=\"wr-window__snap-hint\" [attr.data-target]=\"target\" aria-hidden=\"true\"></div>\n}\n", dependencies: [{ kind: "component", type: WrWindow, selector: "wr-window", inputs: ["open", "state", "title", "initialX", "initialY", "size", "initialWidth", "initialHeight", "os", "chromeSize", "animations", "minWidth", "minHeight", "maxWidth", "maxHeight", "movable", "resizable", "keepInViewport", "snap", "dragHandle", "showMinimize", "showMaximize", "showClose"], outputs: ["openChange", "stateChange", "closed", "moved", "resized"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
730
751
  }
731
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrWindowContainer, decorators: [{
752
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrWindowContainer, decorators: [{
732
753
  type: Component,
733
754
  args: [{ selector: 'wr-window-container', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [WrWindow], template: "<wr-window\n [open]=\"true\"\n [title]=\"ref.title()\"\n [os]=\"config.os ?? 'auto'\"\n [size]=\"config.size ?? 'md'\"\n [chromeSize]=\"config.chromeSize ?? 'normal'\"\n [animations]=\"config.animations ?? true\"\n [initialX]=\"config.x ?? null\"\n [initialY]=\"config.y ?? null\"\n [initialWidth]=\"config.width ?? null\"\n [initialHeight]=\"config.height ?? null\"\n [minWidth]=\"config.minWidth ?? 220\"\n [minHeight]=\"config.minHeight ?? 140\"\n [maxWidth]=\"config.maxWidth ?? 1000000\"\n [maxHeight]=\"config.maxHeight ?? 1000000\"\n [movable]=\"config.movable ?? true\"\n [resizable]=\"config.resizable ?? true\"\n [keepInViewport]=\"config.keepInViewport ?? true\"\n [snap]=\"config.snap ?? 'none'\"\n [dragHandle]=\"config.dragHandle ?? null\"\n [showMinimize]=\"config.showMinimize ?? null\"\n [showMaximize]=\"config.showMaximize ?? null\"\n [showClose]=\"config.showClose ?? true\"\n (closed)=\"ref.close()\"\n #window\n>\n <ng-container #content />\n</wr-window>\n\n@if (window.snapTarget(); as target) {\n <div class=\"wr-window__snap-hint\" [attr.data-target]=\"target\" aria-hidden=\"true\"></div>\n}\n" }]
734
755
  }], ctorParameters: () => [], propDecorators: { contentVcr: [{ type: i0.ViewChild, args: ['content', { ...{ read: ViewContainerRef }, isSignal: true }] }], wrWindow: [{ type: i0.ViewChild, args: [i0.forwardRef(() => WrWindow), { isSignal: true }] }] } });
@@ -858,18 +879,36 @@ class WrWindowRef {
858
879
  return this.componentRef.instance;
859
880
  }
860
881
  // Lifecycle
882
+ isClosed = false;
861
883
  /**
862
884
  * Close the window, optionally returning a result. If a `beforeClose`
863
885
  * hook is registered it is consulted first — a falsy resolution
864
886
  * cancels the close.
865
887
  */
866
888
  async close(result) {
867
- if (this._beforeCloseHook) {
868
- const ok = await this._beforeCloseHook(result);
869
- if (!ok)
870
- return;
889
+ // `WrDialogRef` / `WrDrawerRef` latch the same way on their own `isClosed`,
890
+ // but theirs are synchronous: this is the only one of the three that AWAITS,
891
+ // so it is the
892
+ // only one a second call can enter mid-flight and run the hook again. Two
893
+ // Escapes in a row do it, and so does `manager.closeAll()` while a hook is
894
+ // pending — `_doClose` is what removes the ref from the manager's list, and
895
+ // it has not run yet.
896
+ if (this.isClosed)
897
+ return;
898
+ this.isClosed = true;
899
+ let proceed = false;
900
+ try {
901
+ proceed = this._beforeCloseHook ? !!(await this._beforeCloseHook(result)) : true;
871
902
  }
872
- this._doClose?.(result);
903
+ finally {
904
+ // A veto is not a close, and neither is a hook that threw — release the
905
+ // latch in both cases, or a declined close would disable the window for
906
+ // good.
907
+ if (!proceed)
908
+ this.isClosed = false;
909
+ }
910
+ if (proceed)
911
+ this._doClose?.(result);
873
912
  }
874
913
  /** Toggle the minimized state. */
875
914
  minimize() {
@@ -1018,6 +1057,9 @@ class WrWindowManager {
1018
1057
  title: pending.title || config.title,
1019
1058
  };
1020
1059
  }
1060
+ // Assigned right after the ref exists; the predicate below only ever runs
1061
+ // from a keydown, long after.
1062
+ let self = null;
1021
1063
  // Each window gets its own CDK overlay pane positioned `static` —
1022
1064
  // <wr-window> itself uses `position: fixed`, so the pane is only a
1023
1065
  // mount point. Windows are never modal — reach for `WrDialog` when
@@ -1026,6 +1068,15 @@ class WrWindowManager {
1026
1068
  positionStrategy: this.overlay.position().global(),
1027
1069
  panelClass: 'wr-window-overlay',
1028
1070
  hasBackdrop: false,
1071
+ // Which window an Escape belongs to is a question the CDK cannot answer
1072
+ // here. Its keyboard dispatcher walks the attached overlays newest-first
1073
+ // and hands the key to the first one willing to take it — and attach order
1074
+ // is frozen at OPEN order, because `focus()` re-stacks with a z-index and
1075
+ // never re-attaches. So the last window opened swallowed every Escape,
1076
+ // even sitting behind the one the user was in. Declining here is what makes
1077
+ // it recoverable: a rejected event walks on down the stack instead of being
1078
+ // eaten, so the window that does own it still gets its Escape.
1079
+ eventPredicate: () => self === null || this.ownsKeyboard(self),
1029
1080
  // OUT of the top layer, deliberately. The CDK puts overlay hosts there by
1030
1081
  // default (`popover="manual"`), and the top layer orders strictly by
1031
1082
  // ENTRY: whatever opened last paints on top and no z-index can change it.
@@ -1038,6 +1089,7 @@ class WrWindowManager {
1038
1089
  });
1039
1090
  const id = config.id ?? randomId('wr-window');
1040
1091
  const ref = new WrWindowRef(id, overlayRef);
1092
+ self = ref;
1041
1093
  ref.taskbarVisible = config.taskbar !== false;
1042
1094
  // Provide WR_WINDOW_REF + WR_WINDOW_DATA inside the projected
1043
1095
  // component's subtree so it can `inject(WR_WINDOW_REF)` etc.
@@ -1085,6 +1137,24 @@ class WrWindowManager {
1085
1137
  }
1086
1138
  return ref;
1087
1139
  }
1140
+ /**
1141
+ * Whether a keyboard event routed to `ref`'s overlay is actually meant for it.
1142
+ *
1143
+ * The window holding real DOM focus owns the key. When focus is outside every
1144
+ * window — the common case, since a window is not modal and traps nothing —
1145
+ * the FRONT-most one does, by the manager's own z stack rather than by attach
1146
+ * order. A tie (nothing has ever been focused, so no z has been handed out
1147
+ * yet) leaves every window willing, and the dispatcher's newest-first walk
1148
+ * settles it as before.
1149
+ */
1150
+ ownsKeyboard(ref) {
1151
+ const open = this._windows();
1152
+ const active = this.isBrowser ? document.activeElement : null;
1153
+ const focused = active ? open.find(w => w._overlayRef.overlayElement?.contains(active)) : undefined;
1154
+ if (focused)
1155
+ return focused === ref;
1156
+ return open.every(w => w === ref || w.z() <= ref.z());
1157
+ }
1088
1158
  /** Close every programmatically-opened window. */
1089
1159
  closeAll() {
1090
1160
  for (const ref of [...this._windows()]) {
@@ -1200,10 +1270,10 @@ class WrWindowManager {
1200
1270
  clearLayout(name) {
1201
1271
  this.storage.remove(this.layoutKey(name));
1202
1272
  }
1203
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrWindowManager, deps: [], target: i0.ɵɵFactoryTarget.Service });
1204
- static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.1", ngImport: i0, type: WrWindowManager });
1273
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrWindowManager, deps: [], target: i0.ɵɵFactoryTarget.Service });
1274
+ static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.2", ngImport: i0, type: WrWindowManager });
1205
1275
  }
1206
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrWindowManager, decorators: [{
1276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrWindowManager, decorators: [{
1207
1277
  type: Service
1208
1278
  }] });
1209
1279
 
@@ -1266,10 +1336,10 @@ class WrWindowTaskbar {
1266
1336
  event.stopPropagation();
1267
1337
  void ref.close();
1268
1338
  }
1269
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrWindowTaskbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
1270
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: WrWindowTaskbar, isStandalone: true, selector: "wr-window-taskbar", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "toolbar" }, properties: { "class": "classes()", "attr.aria-label": "railLabel()" } }, ngImport: i0, template: "@if (items().length > 0) {\n <div class=\"wr-window-taskbar__rail\">\n @for (ref of items(); track ref.id) {\n <!--\n Two SIBLING buttons in a plain container, not a close button nested\n inside the tab. The close used to be a `role=\"button\"` span with\n `tabindex=\"0\"` inside the tab's own `<button>` \u2014 interactive content\n inside interactive content, which the HTML parser and `nested-interactive`\n both object to. Nothing caught it: a taskbar tab exists only while a\n window is minimized, and the a11y sweep reads prerendered HTML, where the\n rail is not rendered at all.\n -->\n <div class=\"wr-window-taskbar__tab\">\n <button\n type=\"button\"\n class=\"wr-window-taskbar__tab-restore\"\n [attr.aria-label]=\"restoreLabel({ title: tabTitle(ref) })\"\n (click)=\"restore(ref)\"\n >\n <span class=\"wr-window-taskbar__tab-title\">{{ tabTitle(ref) }}</span>\n </button>\n <button\n type=\"button\"\n class=\"wr-window-taskbar__tab-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(ref, $event)\"\n >\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M1 1 L9 9 M9 1 L1 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n </div>\n }\n </div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1339
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrWindowTaskbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
1340
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: WrWindowTaskbar, isStandalone: true, selector: "wr-window-taskbar", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "toolbar" }, properties: { "class": "classes()", "attr.aria-label": "railLabel()" } }, ngImport: i0, template: "@if (items().length > 0) {\n <div class=\"wr-window-taskbar__rail\">\n @for (ref of items(); track ref.id) {\n <!--\n Two SIBLING buttons in a plain container, not a close button nested\n inside the tab. The close used to be a `role=\"button\"` span with\n `tabindex=\"0\"` inside the tab's own `<button>` \u2014 interactive content\n inside interactive content, which the HTML parser and `nested-interactive`\n both object to. Nothing caught it: a taskbar tab exists only while a\n window is minimized, and the a11y sweep reads prerendered HTML, where the\n rail is not rendered at all.\n -->\n <div class=\"wr-window-taskbar__tab\">\n <button\n type=\"button\"\n class=\"wr-window-taskbar__tab-restore\"\n [attr.aria-label]=\"restoreLabel({ title: tabTitle(ref) })\"\n (click)=\"restore(ref)\"\n >\n <span class=\"wr-window-taskbar__tab-title\">{{ tabTitle(ref) }}</span>\n </button>\n <button\n type=\"button\"\n class=\"wr-window-taskbar__tab-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(ref, $event)\"\n >\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M1 1 L9 9 M9 1 L1 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n </div>\n }\n </div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1271
1341
  }
1272
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrWindowTaskbar, decorators: [{
1342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrWindowTaskbar, decorators: [{
1273
1343
  type: Component,
1274
1344
  args: [{ selector: 'wr-window-taskbar', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()', role: 'toolbar', '[attr.aria-label]': 'railLabel()' }, template: "@if (items().length > 0) {\n <div class=\"wr-window-taskbar__rail\">\n @for (ref of items(); track ref.id) {\n <!--\n Two SIBLING buttons in a plain container, not a close button nested\n inside the tab. The close used to be a `role=\"button\"` span with\n `tabindex=\"0\"` inside the tab's own `<button>` \u2014 interactive content\n inside interactive content, which the HTML parser and `nested-interactive`\n both object to. Nothing caught it: a taskbar tab exists only while a\n window is minimized, and the a11y sweep reads prerendered HTML, where the\n rail is not rendered at all.\n -->\n <div class=\"wr-window-taskbar__tab\">\n <button\n type=\"button\"\n class=\"wr-window-taskbar__tab-restore\"\n [attr.aria-label]=\"restoreLabel({ title: tabTitle(ref) })\"\n (click)=\"restore(ref)\"\n >\n <span class=\"wr-window-taskbar__tab-title\">{{ tabTitle(ref) }}</span>\n </button>\n <button\n type=\"button\"\n class=\"wr-window-taskbar__tab-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(ref, $event)\"\n >\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M1 1 L9 9 M9 1 L1 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n </div>\n }\n </div>\n}\n" }]
1275
1345
  }], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });