ngwr 10.2.1 → 11.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 (425) hide show
  1. package/README.md +39 -19
  2. package/anchor/styles/_index.scss +4 -4
  3. package/back-top/styles/_index.scss +6 -1
  4. package/blur-text/styles/_index.scss +13 -0
  5. package/button/styles/_index.scss +11 -6
  6. package/carousel/styles/_index.scss +13 -2
  7. package/cascader/styles/_index.scss +2 -2
  8. package/circular-text/styles/_index.scss +2 -0
  9. package/collapse/styles/_index.scss +1 -1
  10. package/color-picker/styles/_index.scss +6 -1
  11. package/compare/styles/_index.scss +1 -2
  12. package/context-menu/styles/_index.scss +6 -1
  13. package/descriptions/styles/_index.scss +2 -2
  14. package/dialog/styles/_index.scss +7 -0
  15. package/drawer/styles/_index.scss +20 -1
  16. package/dropdown/styles/_index.scss +19 -5
  17. package/empty/styles/_index.scss +10 -0
  18. package/fesm2022/ngwr-action-sheet.mjs +13 -3
  19. package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
  20. package/fesm2022/ngwr-affix.mjs +40 -13
  21. package/fesm2022/ngwr-affix.mjs.map +1 -1
  22. package/fesm2022/ngwr-anchor.mjs +18 -6
  23. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  24. package/fesm2022/ngwr-aurora.mjs +2 -2
  25. package/fesm2022/ngwr-aurora.mjs.map +1 -1
  26. package/fesm2022/ngwr-avatar.mjs +31 -7
  27. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  28. package/fesm2022/ngwr-back-top.mjs +6 -2
  29. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  30. package/fesm2022/ngwr-badge.mjs +1 -1
  31. package/fesm2022/ngwr-badge.mjs.map +1 -1
  32. package/fesm2022/ngwr-bar-chart.mjs +30 -9
  33. package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
  34. package/fesm2022/ngwr-blur-text.mjs +2 -2
  35. package/fesm2022/ngwr-blur-text.mjs.map +1 -1
  36. package/fesm2022/ngwr-border-glow.mjs +2 -2
  37. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  38. package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
  39. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  40. package/fesm2022/ngwr-burger.mjs +9 -4
  41. package/fesm2022/ngwr-burger.mjs.map +1 -1
  42. package/fesm2022/ngwr-button-testing.mjs +96 -0
  43. package/fesm2022/ngwr-button-testing.mjs.map +1 -0
  44. package/fesm2022/ngwr-button.mjs +31 -14
  45. package/fesm2022/ngwr-button.mjs.map +1 -1
  46. package/fesm2022/ngwr-calendar-heatmap.mjs +40 -8
  47. package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
  48. package/fesm2022/ngwr-calendar.mjs +20 -1
  49. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  50. package/fesm2022/ngwr-card.mjs +2 -2
  51. package/fesm2022/ngwr-card.mjs.map +1 -1
  52. package/fesm2022/ngwr-carousel-testing.mjs +377 -0
  53. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -0
  54. package/fesm2022/ngwr-carousel.mjs +67 -13
  55. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  56. package/fesm2022/ngwr-cascader-testing.mjs +534 -0
  57. package/fesm2022/ngwr-cascader-testing.mjs.map +1 -0
  58. package/fesm2022/ngwr-cascader.mjs +2 -2
  59. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  60. package/fesm2022/ngwr-checkbox-testing.mjs +90 -0
  61. package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -0
  62. package/fesm2022/ngwr-checkbox.mjs +9 -3
  63. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  64. package/fesm2022/ngwr-circular-text.mjs +2 -2
  65. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  66. package/fesm2022/ngwr-click-spark.mjs +2 -2
  67. package/fesm2022/ngwr-click-spark.mjs.map +1 -1
  68. package/fesm2022/ngwr-collapse-testing.mjs +368 -0
  69. package/fesm2022/ngwr-collapse-testing.mjs.map +1 -0
  70. package/fesm2022/ngwr-color-picker.mjs +134 -14
  71. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  72. package/fesm2022/ngwr-command-palette-testing.mjs +589 -0
  73. package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -0
  74. package/fesm2022/ngwr-command-palette.mjs +58 -8
  75. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  76. package/fesm2022/ngwr-compare.mjs +103 -13
  77. package/fesm2022/ngwr-compare.mjs.map +1 -1
  78. package/fesm2022/ngwr-config.mjs +106 -0
  79. package/fesm2022/ngwr-config.mjs.map +1 -0
  80. package/fesm2022/ngwr-context-menu-testing.mjs +631 -0
  81. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -0
  82. package/fesm2022/ngwr-context-menu.mjs +94 -8
  83. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  84. package/fesm2022/ngwr-cookie.mjs +5 -1
  85. package/fesm2022/ngwr-cookie.mjs.map +1 -1
  86. package/fesm2022/ngwr-counter.mjs +11 -3
  87. package/fesm2022/ngwr-counter.mjs.map +1 -1
  88. package/fesm2022/ngwr-date-adapter-luxon.mjs +52 -4
  89. package/fesm2022/ngwr-date-adapter-luxon.mjs.map +1 -1
  90. package/fesm2022/ngwr-date-adapter.mjs +54 -8
  91. package/fesm2022/ngwr-date-adapter.mjs.map +1 -1
  92. package/fesm2022/ngwr-date-picker-testing.mjs +766 -0
  93. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -0
  94. package/fesm2022/ngwr-date-picker.mjs +73 -3
  95. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  96. package/fesm2022/ngwr-decrypt-text.mjs +27 -9
  97. package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
  98. package/fesm2022/ngwr-dialog-testing.mjs +89 -0
  99. package/fesm2022/ngwr-dialog-testing.mjs.map +1 -0
  100. package/fesm2022/ngwr-directives.mjs +36 -12
  101. package/fesm2022/ngwr-directives.mjs.map +1 -1
  102. package/fesm2022/ngwr-donut-chart.mjs +22 -5
  103. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  104. package/fesm2022/ngwr-drag-drop.mjs +2 -2
  105. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  106. package/fesm2022/ngwr-drawer-testing.mjs +250 -0
  107. package/fesm2022/ngwr-drawer-testing.mjs.map +1 -0
  108. package/fesm2022/ngwr-dropdown-testing.mjs +291 -0
  109. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -0
  110. package/fesm2022/ngwr-dropdown.mjs +10 -2
  111. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  112. package/fesm2022/ngwr-empty.mjs +24 -7
  113. package/fesm2022/ngwr-empty.mjs.map +1 -1
  114. package/fesm2022/ngwr-event-calendar.mjs +57 -10
  115. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  116. package/fesm2022/ngwr-falling-text.mjs +2 -2
  117. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  118. package/fesm2022/ngwr-file-upload-testing.mjs +332 -0
  119. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -0
  120. package/fesm2022/ngwr-form-testing.mjs +451 -0
  121. package/fesm2022/ngwr-form-testing.mjs.map +1 -0
  122. package/fesm2022/ngwr-form.mjs +19 -3
  123. package/fesm2022/ngwr-form.mjs.map +1 -1
  124. package/fesm2022/ngwr-fuzzy-text.mjs +9 -2
  125. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  126. package/fesm2022/ngwr-gauge.mjs +19 -5
  127. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  128. package/fesm2022/ngwr-glitch-text.mjs +2 -2
  129. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  130. package/fesm2022/ngwr-gradient-text.mjs +2 -2
  131. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  132. package/fesm2022/ngwr-i18n-en.mjs +50 -0
  133. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  134. package/fesm2022/ngwr-i18n-ru.mjs +48 -0
  135. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  136. package/fesm2022/ngwr-image-cropper.mjs +23 -0
  137. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  138. package/fesm2022/ngwr-input-number-testing.mjs +306 -0
  139. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -0
  140. package/fesm2022/ngwr-input-number.mjs +35 -3
  141. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  142. package/fesm2022/ngwr-input-otp-testing.mjs +419 -0
  143. package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -0
  144. package/fesm2022/ngwr-input-otp.mjs +36 -5
  145. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  146. package/fesm2022/ngwr-input-testing.mjs +102 -0
  147. package/fesm2022/ngwr-input-testing.mjs.map +1 -0
  148. package/fesm2022/ngwr-input.mjs +47 -10
  149. package/fesm2022/ngwr-input.mjs.map +1 -1
  150. package/fesm2022/ngwr-knob.mjs +44 -8
  151. package/fesm2022/ngwr-knob.mjs.map +1 -1
  152. package/fesm2022/ngwr-layout.mjs +21 -5
  153. package/fesm2022/ngwr-layout.mjs.map +1 -1
  154. package/fesm2022/ngwr-lightbox.mjs +33 -6
  155. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  156. package/fesm2022/ngwr-line-chart.mjs +17 -4
  157. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  158. package/fesm2022/ngwr-list.mjs +2 -2
  159. package/fesm2022/ngwr-list.mjs.map +1 -1
  160. package/fesm2022/ngwr-loading-bar.mjs +2 -2
  161. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  162. package/fesm2022/ngwr-markdown-testing.mjs +516 -0
  163. package/fesm2022/ngwr-markdown-testing.mjs.map +1 -0
  164. package/fesm2022/ngwr-markdown.mjs +1492 -0
  165. package/fesm2022/ngwr-markdown.mjs.map +1 -0
  166. package/fesm2022/ngwr-marquee.mjs +17 -6
  167. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  168. package/fesm2022/ngwr-mention-testing.mjs +513 -0
  169. package/fesm2022/ngwr-mention-testing.mjs.map +1 -0
  170. package/fesm2022/ngwr-mention.mjs +10 -1
  171. package/fesm2022/ngwr-mention.mjs.map +1 -1
  172. package/fesm2022/ngwr-meta.mjs +22 -7
  173. package/fesm2022/ngwr-meta.mjs.map +1 -1
  174. package/fesm2022/ngwr-meter-group.mjs +19 -5
  175. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  176. package/fesm2022/ngwr-overlay.mjs +41 -1
  177. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  178. package/fesm2022/ngwr-pagination-testing.mjs +389 -0
  179. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -0
  180. package/fesm2022/ngwr-pagination.mjs +14 -2
  181. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  182. package/fesm2022/ngwr-popconfirm-testing.mjs +309 -0
  183. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -0
  184. package/fesm2022/ngwr-popconfirm.mjs +95 -17
  185. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  186. package/fesm2022/ngwr-popover-testing.mjs +316 -0
  187. package/fesm2022/ngwr-popover-testing.mjs.map +1 -0
  188. package/fesm2022/ngwr-popover.mjs +21 -3
  189. package/fesm2022/ngwr-popover.mjs.map +1 -1
  190. package/fesm2022/ngwr-pull-to-refresh.mjs +17 -2
  191. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
  192. package/fesm2022/ngwr-qr.mjs +13 -3
  193. package/fesm2022/ngwr-qr.mjs.map +1 -1
  194. package/fesm2022/ngwr-radio-testing.mjs +392 -0
  195. package/fesm2022/ngwr-radio-testing.mjs.map +1 -0
  196. package/fesm2022/ngwr-radio.mjs +10 -3
  197. package/fesm2022/ngwr-radio.mjs.map +1 -1
  198. package/fesm2022/ngwr-rating-testing.mjs +384 -0
  199. package/fesm2022/ngwr-rating-testing.mjs.map +1 -0
  200. package/fesm2022/ngwr-rating.mjs +37 -2
  201. package/fesm2022/ngwr-rating.mjs.map +1 -1
  202. package/fesm2022/ngwr-segmented-testing.mjs +512 -0
  203. package/fesm2022/ngwr-segmented-testing.mjs.map +1 -0
  204. package/fesm2022/ngwr-select-testing.mjs +268 -0
  205. package/fesm2022/ngwr-select-testing.mjs.map +1 -0
  206. package/fesm2022/ngwr-select.mjs +87 -16
  207. package/fesm2022/ngwr-select.mjs.map +1 -1
  208. package/fesm2022/ngwr-shiny-text.mjs +2 -2
  209. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  210. package/fesm2022/ngwr-sidebar.mjs +65 -12
  211. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  212. package/fesm2022/ngwr-slider-testing.mjs +478 -0
  213. package/fesm2022/ngwr-slider-testing.mjs.map +1 -0
  214. package/fesm2022/ngwr-slider.mjs +57 -13
  215. package/fesm2022/ngwr-slider.mjs.map +1 -1
  216. package/fesm2022/ngwr-sparkline.mjs +26 -6
  217. package/fesm2022/ngwr-sparkline.mjs.map +1 -1
  218. package/fesm2022/ngwr-speed-dial.mjs +37 -4
  219. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  220. package/fesm2022/ngwr-spinner.mjs +12 -3
  221. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  222. package/fesm2022/ngwr-splash-cursor.mjs +2 -2
  223. package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
  224. package/fesm2022/ngwr-split-text.mjs +2 -2
  225. package/fesm2022/ngwr-split-text.mjs.map +1 -1
  226. package/fesm2022/ngwr-splitter.mjs +70 -9
  227. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  228. package/fesm2022/ngwr-spotlight-card.mjs +2 -2
  229. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  230. package/fesm2022/ngwr-star-border.mjs +2 -2
  231. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  232. package/fesm2022/ngwr-statistic.mjs +24 -7
  233. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  234. package/fesm2022/ngwr-stepper-testing.mjs +477 -0
  235. package/fesm2022/ngwr-stepper-testing.mjs.map +1 -0
  236. package/fesm2022/ngwr-switch-testing.mjs +77 -0
  237. package/fesm2022/ngwr-switch-testing.mjs.map +1 -0
  238. package/fesm2022/ngwr-switch.mjs +9 -3
  239. package/fesm2022/ngwr-switch.mjs.map +1 -1
  240. package/fesm2022/ngwr-table-testing.mjs +580 -0
  241. package/fesm2022/ngwr-table-testing.mjs.map +1 -0
  242. package/fesm2022/ngwr-table.mjs +87 -14
  243. package/fesm2022/ngwr-table.mjs.map +1 -1
  244. package/fesm2022/ngwr-tabs-testing.mjs +617 -0
  245. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -0
  246. package/fesm2022/ngwr-tabs.mjs +38 -6
  247. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  248. package/fesm2022/ngwr-textarea-testing.mjs +238 -0
  249. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -0
  250. package/fesm2022/ngwr-textarea.mjs +32 -4
  251. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  252. package/fesm2022/ngwr-tilt-card.mjs +2 -2
  253. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  254. package/fesm2022/ngwr-toast-testing.mjs +101 -0
  255. package/fesm2022/ngwr-toast-testing.mjs.map +1 -0
  256. package/fesm2022/ngwr-toast.mjs +2 -2
  257. package/fesm2022/ngwr-toast.mjs.map +1 -1
  258. package/fesm2022/ngwr-tour.mjs +61 -9
  259. package/fesm2022/ngwr-tour.mjs.map +1 -1
  260. package/fesm2022/ngwr-transfer-testing.mjs +538 -0
  261. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -0
  262. package/fesm2022/ngwr-transfer.mjs +45 -14
  263. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  264. package/fesm2022/ngwr-tree-testing.mjs +734 -0
  265. package/fesm2022/ngwr-tree-testing.mjs.map +1 -0
  266. package/fesm2022/ngwr-tree.mjs +73 -7
  267. package/fesm2022/ngwr-tree.mjs.map +1 -1
  268. package/fesm2022/ngwr-typewriter.mjs +5 -3
  269. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  270. package/fesm2022/ngwr-version.mjs +1 -1
  271. package/fesm2022/ngwr-version.mjs.map +1 -1
  272. package/fesm2022/ngwr-virtual-scroll.mjs +31 -5
  273. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  274. package/fesm2022/ngwr-waves.mjs +3 -3
  275. package/fesm2022/ngwr-waves.mjs.map +1 -1
  276. package/fesm2022/ngwr-window.mjs +8 -0
  277. package/fesm2022/ngwr-window.mjs.map +1 -1
  278. package/gauge/styles/_index.scss +1 -1
  279. package/glitch-text/styles/_index.scss +4 -0
  280. package/i18n/en.json +48 -0
  281. package/i18n/ru.json +48 -0
  282. package/image-cropper/styles/_index.scss +13 -1
  283. package/input/styles/_index.scss +2 -2
  284. package/input-number/styles/_index.scss +7 -2
  285. package/knob/styles/_index.scss +8 -1
  286. package/layout/styles/_index.scss +3 -3
  287. package/lightbox/styles/_index.scss +10 -2
  288. package/line-chart/styles/_index.scss +6 -0
  289. package/llms-full.txt +151 -4
  290. package/llms.txt +57 -8
  291. package/loading-bar/styles/_index.scss +1 -2
  292. package/markdown/styles/_index.scss +296 -0
  293. package/marquee/styles/_index.scss +12 -0
  294. package/mcp/api.js +512 -0
  295. package/mcp/catalog.js +157 -0
  296. package/mcp/server.js +273 -0
  297. package/mcp/tools.js +366 -0
  298. package/meter-group/styles/_index.scss +1 -1
  299. package/package.json +186 -35
  300. package/pagination/styles/_index.scss +6 -6
  301. package/popover/styles/_index.scss +37 -5
  302. package/rating/styles/_index.scss +10 -0
  303. package/schematics/use/symbol-map.json +2 -0
  304. package/segmented/styles/_index.scss +7 -0
  305. package/select/styles/_index.scss +29 -9
  306. package/sidebar/styles/_index.scss +30 -5
  307. package/slider/styles/_index.scss +15 -0
  308. package/speed-dial/styles/_index.scss +20 -0
  309. package/split-text/styles/_index.scss +13 -0
  310. package/star-border/styles/_index.scss +2 -0
  311. package/stepper/styles/_index.scss +1 -1
  312. package/styles/_grid.scss +4 -4
  313. package/styles.scss +1 -0
  314. package/switch/styles/_index.scss +5 -3
  315. package/table/styles/_index.scss +22 -11
  316. package/tabs/styles/_index.scss +11 -1
  317. package/textarea/styles/_index.scss +5 -0
  318. package/theme/styles/_colors.scss +29 -13
  319. package/theme/styles/_dark.scss +11 -3
  320. package/theme/styles/_mixins.scss +3 -0
  321. package/timeline/styles/_index.scss +2 -2
  322. package/toast/styles/_index.scss +17 -8
  323. package/toolbar/styles/_index.scss +3 -3
  324. package/tour/styles/_index.scss +7 -1
  325. package/tree/styles/_index.scss +5 -3
  326. package/types/ngwr-action-sheet.d.ts +9 -1
  327. package/types/ngwr-affix.d.ts +7 -1
  328. package/types/ngwr-anchor.d.ts +8 -1
  329. package/types/ngwr-avatar.d.ts +13 -3
  330. package/types/ngwr-bar-chart.d.ts +16 -0
  331. package/types/ngwr-burger.d.ts +6 -2
  332. package/types/ngwr-button-testing.d.ts +85 -0
  333. package/types/ngwr-button.d.ts +26 -10
  334. package/types/ngwr-calendar-heatmap.d.ts +16 -2
  335. package/types/ngwr-calendar.d.ts +10 -0
  336. package/types/ngwr-carousel-testing.d.ts +257 -0
  337. package/types/ngwr-carousel.d.ts +20 -4
  338. package/types/ngwr-cascader-testing.d.ts +392 -0
  339. package/types/ngwr-checkbox-testing.d.ts +77 -0
  340. package/types/ngwr-checkbox.d.ts +7 -2
  341. package/types/ngwr-collapse-testing.d.ts +290 -0
  342. package/types/ngwr-color-picker.d.ts +20 -11
  343. package/types/ngwr-command-palette-testing.d.ts +437 -0
  344. package/types/ngwr-command-palette.d.ts +25 -2
  345. package/types/ngwr-compare.d.ts +50 -2
  346. package/types/ngwr-config.d.ts +176 -0
  347. package/types/ngwr-context-menu-testing.d.ts +401 -0
  348. package/types/ngwr-context-menu.d.ts +65 -17
  349. package/types/ngwr-counter.d.ts +6 -1
  350. package/types/ngwr-date-adapter-luxon.d.ts +26 -0
  351. package/types/ngwr-date-picker-testing.d.ts +518 -0
  352. package/types/ngwr-date-picker.d.ts +4 -0
  353. package/types/ngwr-dialog-testing.d.ts +79 -0
  354. package/types/ngwr-directives.d.ts +10 -1
  355. package/types/ngwr-donut-chart.d.ts +8 -1
  356. package/types/ngwr-drawer-testing.d.ts +196 -0
  357. package/types/ngwr-dropdown-testing.d.ts +202 -0
  358. package/types/ngwr-dropdown.d.ts +7 -1
  359. package/types/ngwr-empty.d.ts +19 -4
  360. package/types/ngwr-event-calendar.d.ts +26 -1
  361. package/types/ngwr-file-upload-testing.d.ts +194 -0
  362. package/types/ngwr-form-testing.d.ts +379 -0
  363. package/types/ngwr-form.d.ts +17 -0
  364. package/types/ngwr-gauge.d.ts +13 -1
  365. package/types/ngwr-image-cropper.d.ts +10 -0
  366. package/types/ngwr-input-number-testing.d.ts +226 -0
  367. package/types/ngwr-input-number.d.ts +29 -1
  368. package/types/ngwr-input-otp-testing.d.ts +299 -0
  369. package/types/ngwr-input-otp.d.ts +23 -2
  370. package/types/ngwr-input-testing.d.ts +84 -0
  371. package/types/ngwr-input.d.ts +20 -6
  372. package/types/ngwr-knob.d.ts +18 -0
  373. package/types/ngwr-layout.d.ts +1 -0
  374. package/types/ngwr-lightbox.d.ts +17 -3
  375. package/types/ngwr-line-chart.d.ts +9 -2
  376. package/types/ngwr-markdown-testing.d.ts +462 -0
  377. package/types/ngwr-markdown.d.ts +534 -0
  378. package/types/ngwr-marquee.d.ts +12 -2
  379. package/types/ngwr-mention-testing.d.ts +359 -0
  380. package/types/ngwr-meta.d.ts +4 -2
  381. package/types/ngwr-meter-group.d.ts +11 -1
  382. package/types/ngwr-overlay.d.ts +33 -2
  383. package/types/ngwr-pagination-testing.d.ts +291 -0
  384. package/types/ngwr-pagination.d.ts +1 -0
  385. package/types/ngwr-popconfirm-testing.d.ts +235 -0
  386. package/types/ngwr-popconfirm.d.ts +31 -21
  387. package/types/ngwr-popover-testing.d.ts +221 -0
  388. package/types/ngwr-popover.d.ts +9 -0
  389. package/types/ngwr-pull-to-refresh.d.ts +7 -0
  390. package/types/ngwr-qr.d.ts +9 -1
  391. package/types/ngwr-radio-testing.d.ts +296 -0
  392. package/types/ngwr-radio.d.ts +8 -2
  393. package/types/ngwr-rating-testing.d.ts +291 -0
  394. package/types/ngwr-rating.d.ts +23 -0
  395. package/types/ngwr-segmented-testing.d.ts +401 -0
  396. package/types/ngwr-select-testing.d.ts +175 -0
  397. package/types/ngwr-select.d.ts +45 -4
  398. package/types/ngwr-sidebar.d.ts +17 -2
  399. package/types/ngwr-slider-testing.d.ts +329 -0
  400. package/types/ngwr-slider.d.ts +35 -1
  401. package/types/ngwr-sparkline.d.ts +12 -2
  402. package/types/ngwr-speed-dial.d.ts +17 -18
  403. package/types/ngwr-spinner.d.ts +8 -1
  404. package/types/ngwr-splitter.d.ts +24 -1
  405. package/types/ngwr-statistic.d.ts +12 -2
  406. package/types/ngwr-stepper-testing.d.ts +346 -0
  407. package/types/ngwr-switch-testing.d.ts +66 -0
  408. package/types/ngwr-switch.d.ts +7 -2
  409. package/types/ngwr-table-testing.d.ts +423 -0
  410. package/types/ngwr-table.d.ts +42 -0
  411. package/types/ngwr-tabs-testing.d.ts +470 -0
  412. package/types/ngwr-tabs.d.ts +9 -0
  413. package/types/ngwr-textarea-testing.d.ts +184 -0
  414. package/types/ngwr-textarea.d.ts +7 -2
  415. package/types/ngwr-toast-testing.d.ts +80 -0
  416. package/types/ngwr-tour.d.ts +27 -0
  417. package/types/ngwr-transfer-testing.d.ts +444 -0
  418. package/types/ngwr-transfer.d.ts +16 -1
  419. package/types/ngwr-tree-testing.d.ts +501 -0
  420. package/types/ngwr-tree.d.ts +33 -0
  421. package/types/ngwr-version.d.ts +1 -1
  422. package/types/ngwr-virtual-scroll.d.ts +13 -1
  423. package/typewriter/styles/_index.scss +1 -1
  424. package/typography/styles/_index.scss +1 -1
  425. package/window/styles/_index.scss +32 -9
@@ -0,0 +1,478 @@
1
+ import { ComponentHarness, HarnessPredicate, TestKey } from '@angular/cdk/testing';
2
+
3
+ /**
4
+ * @license
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
8
+ */
9
+ /** How many key presses {@link WrSliderThumbHarness.setValue} spends before it gives up. */
10
+ const MAX_PRESSES = 1000;
11
+ /**
12
+ * Test harness for one thumb of a `<wr-slider>`.
13
+ *
14
+ * A single-thumb slider has exactly one; a `range` one has two, and each thumb
15
+ * is the other's limit — the lower thumb's `aria-valuemax` is wherever the upper
16
+ * thumb is standing, and vice versa. So {@link getMin} / {@link getMax} answer
17
+ * the room THIS thumb has, not the slider's bounds, which is exactly what a
18
+ * screen reader announces and exactly the window {@link setValue} can reach.
19
+ *
20
+ * Every write here is a KEY PRESS, because a drag is not something a unit test
21
+ * can perform — see {@link setValue}.
22
+ *
23
+ * Every press is on the BLOCK axis — `ArrowUp` / `ArrowDown`, `PageUp` /
24
+ * `PageDown`, `Home` / `End` — so the harness means the same thing in both
25
+ * reading directions. That is not a detail: the component's ← / → follow the
26
+ * VISUAL track, so under `dir="rtl"` a right-arrow LOWERS the value, and a
27
+ * harness that pressed it would have `stepUp()` stepping down while every LTR
28
+ * spec stayed green. It cannot detect the direction to compensate either —
29
+ * `Directionality` is injected, not published to the DOM — so it stays on the
30
+ * axis `dir` does not govern.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const upper = await slider.getHighThumb();
35
+ *
36
+ * await upper.setValue(90);
37
+ * expect(await upper.getValue()).toBe(90);
38
+ * ```
39
+ *
40
+ * @see https://ngwr.dev/guides/testing
41
+ */
42
+ class WrSliderThumbHarness extends ComponentHarness {
43
+ /**
44
+ * The thumb is a real `<button role="slider">`, so it is focusable without a
45
+ * `tabindex` and leaves the tab order by itself when disabled. Anchored on the
46
+ * BEM class rather than on `[role="slider"]`: the class also carries the
47
+ * `--low` / `--high` modifier this harness reads.
48
+ */
49
+ static hostSelector = '.wr-slider__thumb';
50
+ /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
51
+ static with(options = {}) {
52
+ return new HarnessPredicate(WrSliderThumbHarness, options)
53
+ .addOption('position', options.position, async (harness, position) => (await harness.getPosition()) === position)
54
+ .addOption('value', options.value, async (harness, value) => (await harness.getValue()) === value)
55
+ .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label));
56
+ }
57
+ /** Which end this thumb is. A single-thumb slider's thumb is the `'low'` one. */
58
+ async getPosition() {
59
+ return (await (await this.host()).hasClass('wr-slider__thumb--high')) ? 'high' : 'low';
60
+ }
61
+ /** Where the thumb is standing, from `aria-valuenow` — the number a screen reader reads out. */
62
+ async getValue() {
63
+ return this.numeric('aria-valuenow');
64
+ }
65
+ /**
66
+ * The lowest value THIS thumb can reach (`aria-valuemin`).
67
+ *
68
+ * On a range slider's upper thumb that is the lower thumb, not the slider's
69
+ * `min` — the two cannot cross, so the neighbour is the real floor.
70
+ */
71
+ async getMin() {
72
+ return this.numeric('aria-valuemin');
73
+ }
74
+ /**
75
+ * The highest value THIS thumb can reach (`aria-valuemax`).
76
+ *
77
+ * On a range slider's lower thumb that is the upper thumb, not the slider's
78
+ * `max`.
79
+ */
80
+ async getMax() {
81
+ return this.numeric('aria-valuemax');
82
+ }
83
+ /** The thumb's accessible name — `'Value'`, or `'Lower value'` / `'Upper value'` in range mode. */
84
+ async getLabel() {
85
+ return (await this.host()).getAttribute('aria-label');
86
+ }
87
+ /** What a screen reader is told this control is. The role is why the arrows mean anything here. */
88
+ async getRole() {
89
+ return (await this.host()).getAttribute('role');
90
+ }
91
+ /** Whether the thumb refuses the keyboard. Read from the button's native `disabled`. */
92
+ async isDisabled() {
93
+ return (await this.host()).getProperty('disabled');
94
+ }
95
+ async focus() {
96
+ return (await this.host()).focus();
97
+ }
98
+ async isFocused() {
99
+ return (await this.host()).isFocused();
100
+ }
101
+ /**
102
+ * One step up (`ArrowUp`). A disabled thumb does not move.
103
+ *
104
+ * `ArrowRight` is the same key press in an LTR slider and the OPPOSITE one in
105
+ * an RTL slider, so the vertical arrow is the one that means "up" everywhere.
106
+ */
107
+ async stepUp() {
108
+ return this.press(TestKey.UP_ARROW);
109
+ }
110
+ /** One step down (`ArrowDown`; `ArrowLeft` only agrees in LTR — see {@link stepUp}). */
111
+ async stepDown() {
112
+ return this.press(TestKey.DOWN_ARROW);
113
+ }
114
+ /** Ten steps up (`PageUp`; `Shift`+arrow is the same stride). */
115
+ async largeStepUp() {
116
+ return this.press(TestKey.PAGE_UP);
117
+ }
118
+ /** Ten steps down (`PageDown`; `Shift`+arrow is the same stride). */
119
+ async largeStepDown() {
120
+ return this.press(TestKey.PAGE_DOWN);
121
+ }
122
+ /**
123
+ * `Home` — jump to the lowest value this thumb can reach.
124
+ *
125
+ * On a range slider's UPPER thumb that lands on the lower thumb, not on the
126
+ * slider's `min`: the component asks for `min` and then refuses to let the
127
+ * ends cross, so the range collapses instead of inverting.
128
+ */
129
+ async toMin() {
130
+ return this.press(TestKey.HOME);
131
+ }
132
+ /**
133
+ * `End` — jump to the highest value this thumb can reach.
134
+ *
135
+ * On a range slider's LOWER thumb that lands on the upper thumb, not on the
136
+ * slider's `max`, for the same reason as {@link toMin}.
137
+ */
138
+ async toMax() {
139
+ return this.press(TestKey.END);
140
+ }
141
+ /**
142
+ * Walk the thumb to `value` FROM THE KEYBOARD — `PageUp` / `PageDown` for the
143
+ * distance, arrows for the last stretch, `Home` / `End` for the bounds. That
144
+ * is the accessible path, and the only one a unit test can trust.
145
+ *
146
+ * There is deliberately no drag. jsdom has no layout: the track measures 0×0
147
+ * and `getBoundingClientRect()` answers all zeros, while the component turns a
148
+ * pointer into a value by dividing the offset by the track width. Every
149
+ * positive offset therefore divides by zero, clamps to a ratio of 1 and writes
150
+ * the slider's MAX — quietly, with no error to notice. A coordinate cannot
151
+ * mean anything here.
152
+ *
153
+ * It costs one press per stride, so the walk is not free: crossing most of a
154
+ * 0–100 range costs ~19 presses at `step="1"` and ~109 at `step="0.1"`.
155
+ * Landing exactly on a bound is one press, whatever the step. The walk gives
156
+ * up after 1000 presses — a 0–100 range reaches that at `step="0.01"` or finer
157
+ * — and throws rather than spin.
158
+ *
159
+ * A bound the step grid misses is announced but not reachable: `aria-valuemax`
160
+ * is the `max` input, while the component snaps every key press onto whole
161
+ * steps from `min`, so `max="100" step="3"` stops at 99. That is the off-grid
162
+ * throw, arriving for `setValue(100)`.
163
+ *
164
+ * Either the thumb ends up exactly on `value` or this throws: when `value` is
165
+ * outside the thumb's window (the other thumb is one end of it in range mode),
166
+ * when the thumb is disabled, and when `value` is not on the step grid — on
167
+ * the last one the thumb is left at the nearest value it could reach.
168
+ */
169
+ async setValue(value) {
170
+ if (await this.isDisabled()) {
171
+ throw new Error('WrSliderThumbHarness.setValue(): the slider is disabled, so the keyboard cannot move it.');
172
+ }
173
+ const [min, max] = [await this.getMin(), await this.getMax()];
174
+ if (value < min || value > max) {
175
+ throw new Error(`WrSliderThumbHarness.setValue(): ${value} is outside the [${min}, ${max}] window this thumb can ` +
176
+ 'reach. On a range slider the other thumb is one end of that window — move it first.');
177
+ }
178
+ let current = await this.getValue();
179
+ if (current === value)
180
+ return;
181
+ // The bounds are one key press, and on a range thumb `Home` / `End` stop at
182
+ // the neighbour — which is precisely this window's end. The landing is still
183
+ // checked: a `max` that is not a whole number of steps from `min` is
184
+ // announced by `aria-valuemax` and refused by the component's snapping.
185
+ if (value === min || value === max) {
186
+ await (value === min ? this.toMin() : this.toMax());
187
+ return this.assertSettled(await this.getValue(), value, min);
188
+ }
189
+ let presses = 0;
190
+ // Start on the ten-step stride: neither stride is published to the DOM, so
191
+ // the only way to learn one is to take it and look. One overshoot is pressed
192
+ // back off and the rest of the walk goes a single step at a time.
193
+ let striding = true;
194
+ while (current !== value) {
195
+ if (presses >= MAX_PRESSES) {
196
+ throw new Error(`WrSliderThumbHarness.setValue(): gave up walking to ${value} after ${MAX_PRESSES} key presses ` +
197
+ `(reached ${current}). A step this fine is not something a keyboard reaches — write the ` +
198
+ 'slider through its `[(value)]` model instead.');
199
+ }
200
+ // Re-derived every pass so the walk follows wherever the thumb actually
201
+ // landed rather than where a stride aimed. It never has to reverse: the
202
+ // window check above keeps the target inside [min, max], so pressing back
203
+ // off an overshoot lands at or short of where the stride began — on the
204
+ // same side of the target it started on.
205
+ const direction = value > current ? 1 : -1;
206
+ await this.press(this.strideKey(direction, striding));
207
+ presses++;
208
+ const next = await this.getValue();
209
+ // Nothing moved: the thumb is pinned against a bound or its neighbour, and
210
+ // pressing again would only spin. The final check below reports where.
211
+ if (next === current)
212
+ break;
213
+ const overshot = direction === 1 ? next > value : next < value;
214
+ current = next;
215
+ if (!overshot)
216
+ continue;
217
+ await this.press(this.strideKey(direction === 1 ? -1 : 1, striding));
218
+ presses++;
219
+ current = await this.getValue();
220
+ // Single steps straddling the target means it is not on the step grid.
221
+ if (!striding)
222
+ break;
223
+ striding = false;
224
+ }
225
+ this.assertSettled(current, value, min);
226
+ }
227
+ /**
228
+ * The landing check every path through {@link setValue} ends on: exactly the
229
+ * value asked for, or an error naming where the thumb stopped instead.
230
+ */
231
+ assertSettled(current, value, min) {
232
+ if (current === value)
233
+ return;
234
+ throw new Error(`WrSliderThumbHarness.setValue(): the keyboard settled on ${current} instead of ${value}. The thumb ` +
235
+ `moves in whole steps from ${min}, so only values on that grid are reachable.`);
236
+ }
237
+ /** The key that moves the thumb one stride in `direction`. */
238
+ strideKey(direction, striding) {
239
+ if (striding)
240
+ return direction === 1 ? TestKey.PAGE_UP : TestKey.PAGE_DOWN;
241
+ // The vertical arrows, for the reason {@link stepUp} gives: the horizontal
242
+ // pair swaps meaning under `dir="rtl"`, which would send the fine stretch of
243
+ // the walk away from its target.
244
+ return direction === 1 ? TestKey.UP_ARROW : TestKey.DOWN_ARROW;
245
+ }
246
+ /**
247
+ * Press a key on the thumb.
248
+ *
249
+ * `sendKeys` focuses the element first, so this is the whole gesture a user
250
+ * makes — the component listens for `keydown` on the thumb itself.
251
+ */
252
+ async press(key) {
253
+ return (await this.host()).sendKeys(key);
254
+ }
255
+ /**
256
+ * One of the ARIA range attributes as a number.
257
+ *
258
+ * Throws instead of handing back `NaN`: a slider whose `aria-valuenow` is not
259
+ * a number is broken in a way every later assertion would describe badly.
260
+ */
261
+ async numeric(attribute) {
262
+ const raw = await (await this.host()).getAttribute(attribute);
263
+ const value = raw === null ? Number.NaN : Number.parseFloat(raw);
264
+ if (Number.isNaN(value)) {
265
+ throw new Error(`WrSliderThumbHarness: the thumb's ${attribute} is ${JSON.stringify(raw)}, not a number.`);
266
+ }
267
+ return value;
268
+ }
269
+ }
270
+
271
+ /**
272
+ * @license
273
+ *
274
+ * Use of this source code is governed by an MIT-style license that can be
275
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
276
+ */
277
+ /** Element-wise comparison for the `value` filter — a tuple never matches a plain number. */
278
+ function sameValue(actual, expected) {
279
+ if (typeof actual === 'number')
280
+ return actual === expected;
281
+ if (typeof expected === 'number')
282
+ return false;
283
+ return actual[0] === expected[0] && actual[1] === expected[1];
284
+ }
285
+ /**
286
+ * Test harness for `<wr-slider>` — single-thumb and `range`.
287
+ *
288
+ * Every NUMBER it reads comes off the thumbs' ARIA range trio (`aria-valuenow`,
289
+ * `aria-valuemin`, `aria-valuemax`), which is what a screen reader is told and
290
+ * the only place the slider publishes its value. The mode comes off the host's
291
+ * `wr-slider--range` class and {@link getLabelText} off the rendered text.
292
+ *
293
+ * Everything it WRITES is a key press. A slider is a pointer control, but a
294
+ * pointer control cannot be driven by coordinates in jsdom — there is no layout,
295
+ * so the track measures 0×0 and the component divides every offset by that
296
+ * width: a positive one writes the slider's MAX and `clientX: 0` writes `NaN`,
297
+ * neither of them the value asked for. The keyboard is both the accessible path
298
+ * and the only honest one here; {@link WrSliderThumbHarness.setValue} spells out
299
+ * what the walk costs, and {@link WrSliderThumbHarness} why every one of those
300
+ * presses is on the block axis, which `dir` does not turn around.
301
+ *
302
+ * The `step` is deliberately not readable: the component publishes it nowhere in
303
+ * the DOM (ARIA has no attribute for it), so a spec that needs the number should
304
+ * measure it — `stepUp()` moves by exactly one step.
305
+ *
306
+ * @example
307
+ * ```ts
308
+ * const volume = await loader.getHarness(WrSliderHarness);
309
+ *
310
+ * await volume.setValue(70);
311
+ * expect(await volume.getValue()).toBe(70);
312
+ *
313
+ * const span = await loader.getHarness(WrSliderHarness.with({ range: true }));
314
+ * await span.setRange(30, 60);
315
+ * ```
316
+ *
317
+ * @see https://ngwr.dev/guides/testing
318
+ */
319
+ class WrSliderHarness extends ComponentHarness {
320
+ static hostSelector = 'wr-slider';
321
+ /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
322
+ static with(options = {}) {
323
+ return new HarnessPredicate(WrSliderHarness, options)
324
+ .addOption('value', options.value, async (harness, value) => sameValue(await harness.getValue(), value))
325
+ .addOption('range', options.range, async (harness, range) => (await harness.isRange()) === range)
326
+ .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)
327
+ .addOption('labelText', options.labelText, (harness, text) => HarnessPredicate.stringMatches(harness.getLabelText(), text));
328
+ }
329
+ /** Whether the slider has two thumbs and answers with a `[low, high]` tuple. */
330
+ async isRange() {
331
+ return (await this.host()).hasClass('wr-slider--range');
332
+ }
333
+ /**
334
+ * Whether the slider refuses interaction.
335
+ *
336
+ * Read from the thumb's native `disabled` rather than from the
337
+ * `wr-slider--disabled` class: the class is paint, while `disabled` on the
338
+ * button is what takes the thumb out of the tab order and what assistive tech
339
+ * reports.
340
+ */
341
+ async isDisabled() {
342
+ return (await this.getLowThumb()).isDisabled();
343
+ }
344
+ /**
345
+ * The current value, in the shape the model uses: a plain number for one
346
+ * thumb, `[low, high]` for two.
347
+ */
348
+ async getValue() {
349
+ const values = await Promise.all((await this.getThumbs()).map(thumb => thumb.getValue()));
350
+ return values.length > 1 ? [values[0], values[1]] : values[0];
351
+ }
352
+ /** The slider's lower bound. */
353
+ async getMin() {
354
+ return (await this.getThumbs())[0].getMin();
355
+ }
356
+ /**
357
+ * The slider's upper bound.
358
+ *
359
+ * Taken from the LAST thumb, because in range mode the thumbs bound each
360
+ * other: the lower one's `aria-valuemax` is wherever the upper one is
361
+ * standing, so only the upper thumb knows the real ceiling.
362
+ */
363
+ async getMax() {
364
+ const thumbs = await this.getThumbs();
365
+ return thumbs[thumbs.length - 1].getMax();
366
+ }
367
+ /**
368
+ * The text the slider prints under the track, or `null` when `showLabel` is
369
+ * off.
370
+ *
371
+ * A range slider joins its ends with an EN DASH — `'20 – 80'`, U+2013 — so an
372
+ * assertion typed with a hyphen will not match.
373
+ */
374
+ async getLabelText() {
375
+ const label = await this.locatorForOptional('.wr-slider__label')();
376
+ return label ? label.text() : null;
377
+ }
378
+ /** The slider's thumbs in DOM order: the lower one first. */
379
+ async getThumbs(filters = {}) {
380
+ return this.locatorForAll(WrSliderThumbHarness.with(filters))();
381
+ }
382
+ /** The only thumb of a single-thumb slider, or the lower one of a range slider. */
383
+ async getLowThumb() {
384
+ return this.locatorFor(WrSliderThumbHarness.with({ position: 'low' }))();
385
+ }
386
+ /** The upper thumb. Throws on a single-thumb slider, which has no such part. */
387
+ async getHighThumb() {
388
+ const thumb = await this.locatorForOptional(WrSliderThumbHarness.with({ position: 'high' }))();
389
+ if (!thumb) {
390
+ throw new Error('WrSliderHarness.getHighThumb(): this slider has one thumb — only a `range` slider has two.');
391
+ }
392
+ return thumb;
393
+ }
394
+ /**
395
+ * Walk the slider to `value` from the keyboard.
396
+ *
397
+ * Single-thumb only — {@link setRange} moves both ends. See
398
+ * {@link WrSliderThumbHarness.setValue} for what the walk costs and when it
399
+ * throws.
400
+ */
401
+ async setValue(value) {
402
+ return (await this.single('setValue')).setValue(value);
403
+ }
404
+ /**
405
+ * Walk both ends of a range slider to `[low, high]`.
406
+ *
407
+ * The far end moves FIRST. The thumbs bound each other, so writing `[90, 95]`
408
+ * over `[20, 80]` lower-end-first would be refused outright — 90 is outside
409
+ * the `[0, 80]` window the upper thumb leaves the lower one.
410
+ */
411
+ async setRange(low, high) {
412
+ if (!(await this.isRange())) {
413
+ throw new Error('WrSliderHarness.setRange(): this slider has one thumb — add `range` to it, or call setValue().');
414
+ }
415
+ if (low > high) {
416
+ throw new Error(`WrSliderHarness.setRange(): ${low} is above ${high}, and the thumbs cannot cross.`);
417
+ }
418
+ const lowThumb = await this.getLowThumb();
419
+ const highThumb = await this.getHighThumb();
420
+ if (high >= (await highThumb.getValue())) {
421
+ await highThumb.setValue(high);
422
+ await lowThumb.setValue(low);
423
+ return;
424
+ }
425
+ await lowThumb.setValue(low);
426
+ await highThumb.setValue(high);
427
+ }
428
+ /** One step up (`ArrowUp`). Single-thumb only. A disabled slider does not move. */
429
+ async stepUp() {
430
+ return (await this.single('stepUp')).stepUp();
431
+ }
432
+ /** One step down (`ArrowDown`). Single-thumb only. A disabled slider does not move. */
433
+ async stepDown() {
434
+ return (await this.single('stepDown')).stepDown();
435
+ }
436
+ /** `Home` — jump to the slider's `min`. Single-thumb only. */
437
+ async toMin() {
438
+ return (await this.single('toMin')).toMin();
439
+ }
440
+ /** `End` — jump to the slider's `max`. Single-thumb only. */
441
+ async toMax() {
442
+ return (await this.single('toMax')).toMax();
443
+ }
444
+ /**
445
+ * Move keyboard focus to the slider's first thumb. A range slider's thumbs are
446
+ * two separate tab stops (both are plain buttons — there is no roving
447
+ * `tabindex`), so reach the other one through {@link getHighThumb}.
448
+ */
449
+ async focus() {
450
+ return (await this.getLowThumb()).focus();
451
+ }
452
+ /** Whether any of the slider's thumbs holds focus. */
453
+ async isFocused() {
454
+ const focused = await Promise.all((await this.getThumbs()).map(thumb => thumb.isFocused()));
455
+ return focused.includes(true);
456
+ }
457
+ /**
458
+ * The one thumb a single-thumb convenience call means.
459
+ *
460
+ * Range mode gets an error rather than a guess: "step this slider up" has two
461
+ * possible answers there, and picking one silently is how a spec ends up
462
+ * asserting against the end it did not move.
463
+ */
464
+ async single(caller) {
465
+ if (await this.isRange()) {
466
+ throw new Error(`WrSliderHarness.${caller}(): this slider has two thumbs — use setRange(), or reach for one end ` +
467
+ 'with getLowThumb() / getHighThumb().');
468
+ }
469
+ return this.getLowThumb();
470
+ }
471
+ }
472
+
473
+ /**
474
+ * Generated bundle index. Do not edit.
475
+ */
476
+
477
+ export { WrSliderHarness, WrSliderThumbHarness };
478
+ //# sourceMappingURL=ngwr-slider-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-slider-testing.mjs","sources":["../../../projects/lib/slider/testing/wr-slider-thumb-harness.ts","../../../projects/lib/slider/testing/wr-slider-harness.ts","../../../projects/lib/slider/testing/ngwr-slider-testing.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, TestKey } from '@angular/cdk/testing';\n\nimport type { WrSliderThumbHarnessFilters, WrSliderThumbPosition } from './interfaces';\n\n/** How many key presses {@link WrSliderThumbHarness.setValue} spends before it gives up. */\nconst MAX_PRESSES = 1000;\n\n/**\n * Test harness for one thumb of a `<wr-slider>`.\n *\n * A single-thumb slider has exactly one; a `range` one has two, and each thumb\n * is the other's limit — the lower thumb's `aria-valuemax` is wherever the upper\n * thumb is standing, and vice versa. So {@link getMin} / {@link getMax} answer\n * the room THIS thumb has, not the slider's bounds, which is exactly what a\n * screen reader announces and exactly the window {@link setValue} can reach.\n *\n * Every write here is a KEY PRESS, because a drag is not something a unit test\n * can perform — see {@link setValue}.\n *\n * Every press is on the BLOCK axis — `ArrowUp` / `ArrowDown`, `PageUp` /\n * `PageDown`, `Home` / `End` — so the harness means the same thing in both\n * reading directions. That is not a detail: the component's ← / → follow the\n * VISUAL track, so under `dir=\"rtl\"` a right-arrow LOWERS the value, and a\n * harness that pressed it would have `stepUp()` stepping down while every LTR\n * spec stayed green. It cannot detect the direction to compensate either —\n * `Directionality` is injected, not published to the DOM — so it stays on the\n * axis `dir` does not govern.\n *\n * @example\n * ```ts\n * const upper = await slider.getHighThumb();\n *\n * await upper.setValue(90);\n * expect(await upper.getValue()).toBe(90);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSliderThumbHarness extends ComponentHarness {\n /**\n * The thumb is a real `<button role=\"slider\">`, so it is focusable without a\n * `tabindex` and leaves the tab order by itself when disabled. Anchored on the\n * BEM class rather than on `[role=\"slider\"]`: the class also carries the\n * `--low` / `--high` modifier this harness reads.\n */\n static hostSelector = '.wr-slider__thumb';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSliderThumbHarnessFilters = {}): HarnessPredicate<WrSliderThumbHarness> {\n return new HarnessPredicate(WrSliderThumbHarness, options)\n .addOption('position', options.position, async (harness, position) => (await harness.getPosition()) === position)\n .addOption('value', options.value, async (harness, value) => (await harness.getValue()) === value)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label));\n }\n\n /** Which end this thumb is. A single-thumb slider's thumb is the `'low'` one. */\n async getPosition(): Promise<WrSliderThumbPosition> {\n return (await (await this.host()).hasClass('wr-slider__thumb--high')) ? 'high' : 'low';\n }\n\n /** Where the thumb is standing, from `aria-valuenow` — the number a screen reader reads out. */\n async getValue(): Promise<number> {\n return this.numeric('aria-valuenow');\n }\n\n /**\n * The lowest value THIS thumb can reach (`aria-valuemin`).\n *\n * On a range slider's upper thumb that is the lower thumb, not the slider's\n * `min` — the two cannot cross, so the neighbour is the real floor.\n */\n async getMin(): Promise<number> {\n return this.numeric('aria-valuemin');\n }\n\n /**\n * The highest value THIS thumb can reach (`aria-valuemax`).\n *\n * On a range slider's lower thumb that is the upper thumb, not the slider's\n * `max`.\n */\n async getMax(): Promise<number> {\n return this.numeric('aria-valuemax');\n }\n\n /** The thumb's accessible name — `'Value'`, or `'Lower value'` / `'Upper value'` in range mode. */\n async getLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** What a screen reader is told this control is. The role is why the arrows mean anything here. */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /** Whether the thumb refuses the keyboard. Read from the button's native `disabled`. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * One step up (`ArrowUp`). A disabled thumb does not move.\n *\n * `ArrowRight` is the same key press in an LTR slider and the OPPOSITE one in\n * an RTL slider, so the vertical arrow is the one that means \"up\" everywhere.\n */\n async stepUp(): Promise<void> {\n return this.press(TestKey.UP_ARROW);\n }\n\n /** One step down (`ArrowDown`; `ArrowLeft` only agrees in LTR — see {@link stepUp}). */\n async stepDown(): Promise<void> {\n return this.press(TestKey.DOWN_ARROW);\n }\n\n /** Ten steps up (`PageUp`; `Shift`+arrow is the same stride). */\n async largeStepUp(): Promise<void> {\n return this.press(TestKey.PAGE_UP);\n }\n\n /** Ten steps down (`PageDown`; `Shift`+arrow is the same stride). */\n async largeStepDown(): Promise<void> {\n return this.press(TestKey.PAGE_DOWN);\n }\n\n /**\n * `Home` — jump to the lowest value this thumb can reach.\n *\n * On a range slider's UPPER thumb that lands on the lower thumb, not on the\n * slider's `min`: the component asks for `min` and then refuses to let the\n * ends cross, so the range collapses instead of inverting.\n */\n async toMin(): Promise<void> {\n return this.press(TestKey.HOME);\n }\n\n /**\n * `End` — jump to the highest value this thumb can reach.\n *\n * On a range slider's LOWER thumb that lands on the upper thumb, not on the\n * slider's `max`, for the same reason as {@link toMin}.\n */\n async toMax(): Promise<void> {\n return this.press(TestKey.END);\n }\n\n /**\n * Walk the thumb to `value` FROM THE KEYBOARD — `PageUp` / `PageDown` for the\n * distance, arrows for the last stretch, `Home` / `End` for the bounds. That\n * is the accessible path, and the only one a unit test can trust.\n *\n * There is deliberately no drag. jsdom has no layout: the track measures 0×0\n * and `getBoundingClientRect()` answers all zeros, while the component turns a\n * pointer into a value by dividing the offset by the track width. Every\n * positive offset therefore divides by zero, clamps to a ratio of 1 and writes\n * the slider's MAX — quietly, with no error to notice. A coordinate cannot\n * mean anything here.\n *\n * It costs one press per stride, so the walk is not free: crossing most of a\n * 0–100 range costs ~19 presses at `step=\"1\"` and ~109 at `step=\"0.1\"`.\n * Landing exactly on a bound is one press, whatever the step. The walk gives\n * up after 1000 presses — a 0–100 range reaches that at `step=\"0.01\"` or finer\n * — and throws rather than spin.\n *\n * A bound the step grid misses is announced but not reachable: `aria-valuemax`\n * is the `max` input, while the component snaps every key press onto whole\n * steps from `min`, so `max=\"100\" step=\"3\"` stops at 99. That is the off-grid\n * throw, arriving for `setValue(100)`.\n *\n * Either the thumb ends up exactly on `value` or this throws: when `value` is\n * outside the thumb's window (the other thumb is one end of it in range mode),\n * when the thumb is disabled, and when `value` is not on the step grid — on\n * the last one the thumb is left at the nearest value it could reach.\n */\n async setValue(value: number): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error('WrSliderThumbHarness.setValue(): the slider is disabled, so the keyboard cannot move it.');\n }\n\n const [min, max] = [await this.getMin(), await this.getMax()];\n if (value < min || value > max) {\n throw new Error(\n `WrSliderThumbHarness.setValue(): ${value} is outside the [${min}, ${max}] window this thumb can ` +\n 'reach. On a range slider the other thumb is one end of that window — move it first.'\n );\n }\n\n let current = await this.getValue();\n if (current === value) return;\n // The bounds are one key press, and on a range thumb `Home` / `End` stop at\n // the neighbour — which is precisely this window's end. The landing is still\n // checked: a `max` that is not a whole number of steps from `min` is\n // announced by `aria-valuemax` and refused by the component's snapping.\n if (value === min || value === max) {\n await (value === min ? this.toMin() : this.toMax());\n return this.assertSettled(await this.getValue(), value, min);\n }\n\n let presses = 0;\n // Start on the ten-step stride: neither stride is published to the DOM, so\n // the only way to learn one is to take it and look. One overshoot is pressed\n // back off and the rest of the walk goes a single step at a time.\n let striding = true;\n\n while (current !== value) {\n if (presses >= MAX_PRESSES) {\n throw new Error(\n `WrSliderThumbHarness.setValue(): gave up walking to ${value} after ${MAX_PRESSES} key presses ` +\n `(reached ${current}). A step this fine is not something a keyboard reaches — write the ` +\n 'slider through its `[(value)]` model instead.'\n );\n }\n\n // Re-derived every pass so the walk follows wherever the thumb actually\n // landed rather than where a stride aimed. It never has to reverse: the\n // window check above keeps the target inside [min, max], so pressing back\n // off an overshoot lands at or short of where the stride began — on the\n // same side of the target it started on.\n const direction: 1 | -1 = value > current ? 1 : -1;\n await this.press(this.strideKey(direction, striding));\n presses++;\n\n const next = await this.getValue();\n // Nothing moved: the thumb is pinned against a bound or its neighbour, and\n // pressing again would only spin. The final check below reports where.\n if (next === current) break;\n\n const overshot = direction === 1 ? next > value : next < value;\n current = next;\n if (!overshot) continue;\n\n await this.press(this.strideKey(direction === 1 ? -1 : 1, striding));\n presses++;\n current = await this.getValue();\n\n // Single steps straddling the target means it is not on the step grid.\n if (!striding) break;\n striding = false;\n }\n\n this.assertSettled(current, value, min);\n }\n\n /**\n * The landing check every path through {@link setValue} ends on: exactly the\n * value asked for, or an error naming where the thumb stopped instead.\n */\n private assertSettled(current: number, value: number, min: number): void {\n if (current === value) return;\n throw new Error(\n `WrSliderThumbHarness.setValue(): the keyboard settled on ${current} instead of ${value}. The thumb ` +\n `moves in whole steps from ${min}, so only values on that grid are reachable.`\n );\n }\n\n /** The key that moves the thumb one stride in `direction`. */\n private strideKey(direction: 1 | -1, striding: boolean): TestKey {\n if (striding) return direction === 1 ? TestKey.PAGE_UP : TestKey.PAGE_DOWN;\n // The vertical arrows, for the reason {@link stepUp} gives: the horizontal\n // pair swaps meaning under `dir=\"rtl\"`, which would send the fine stretch of\n // the walk away from its target.\n return direction === 1 ? TestKey.UP_ARROW : TestKey.DOWN_ARROW;\n }\n\n /**\n * Press a key on the thumb.\n *\n * `sendKeys` focuses the element first, so this is the whole gesture a user\n * makes — the component listens for `keydown` on the thumb itself.\n */\n private async press(key: TestKey): Promise<void> {\n return (await this.host()).sendKeys(key);\n }\n\n /**\n * One of the ARIA range attributes as a number.\n *\n * Throws instead of handing back `NaN`: a slider whose `aria-valuenow` is not\n * a number is broken in a way every later assertion would describe badly.\n */\n private async numeric(attribute: string): Promise<number> {\n const raw = await (await this.host()).getAttribute(attribute);\n const value = raw === null ? Number.NaN : Number.parseFloat(raw);\n\n if (Number.isNaN(value)) {\n throw new Error(`WrSliderThumbHarness: the thumb's ${attribute} is ${JSON.stringify(raw)}, not a number.`);\n }\n return value;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSliderValue } from 'ngwr/slider';\n\nimport type { WrSliderHarnessFilters, WrSliderThumbHarnessFilters } from './interfaces';\nimport { WrSliderThumbHarness } from './wr-slider-thumb-harness';\n\n/** Element-wise comparison for the `value` filter — a tuple never matches a plain number. */\nfunction sameValue(actual: WrSliderValue, expected: WrSliderValue): boolean {\n if (typeof actual === 'number') return actual === expected;\n if (typeof expected === 'number') return false;\n return actual[0] === expected[0] && actual[1] === expected[1];\n}\n\n/**\n * Test harness for `<wr-slider>` — single-thumb and `range`.\n *\n * Every NUMBER it reads comes off the thumbs' ARIA range trio (`aria-valuenow`,\n * `aria-valuemin`, `aria-valuemax`), which is what a screen reader is told and\n * the only place the slider publishes its value. The mode comes off the host's\n * `wr-slider--range` class and {@link getLabelText} off the rendered text.\n *\n * Everything it WRITES is a key press. A slider is a pointer control, but a\n * pointer control cannot be driven by coordinates in jsdom — there is no layout,\n * so the track measures 0×0 and the component divides every offset by that\n * width: a positive one writes the slider's MAX and `clientX: 0` writes `NaN`,\n * neither of them the value asked for. The keyboard is both the accessible path\n * and the only honest one here; {@link WrSliderThumbHarness.setValue} spells out\n * what the walk costs, and {@link WrSliderThumbHarness} why every one of those\n * presses is on the block axis, which `dir` does not turn around.\n *\n * The `step` is deliberately not readable: the component publishes it nowhere in\n * the DOM (ARIA has no attribute for it), so a spec that needs the number should\n * measure it — `stepUp()` moves by exactly one step.\n *\n * @example\n * ```ts\n * const volume = await loader.getHarness(WrSliderHarness);\n *\n * await volume.setValue(70);\n * expect(await volume.getValue()).toBe(70);\n *\n * const span = await loader.getHarness(WrSliderHarness.with({ range: true }));\n * await span.setRange(30, 60);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSliderHarness extends ComponentHarness {\n static hostSelector = 'wr-slider';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSliderHarnessFilters = {}): HarnessPredicate<WrSliderHarness> {\n return new HarnessPredicate(WrSliderHarness, options)\n .addOption('value', options.value, async (harness, value) => sameValue(await harness.getValue(), value))\n .addOption('range', options.range, async (harness, range) => (await harness.isRange()) === range)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption('labelText', options.labelText, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getLabelText(), text)\n );\n }\n\n /** Whether the slider has two thumbs and answers with a `[low, high]` tuple. */\n async isRange(): Promise<boolean> {\n return (await this.host()).hasClass('wr-slider--range');\n }\n\n /**\n * Whether the slider refuses interaction.\n *\n * Read from the thumb's native `disabled` rather than from the\n * `wr-slider--disabled` class: the class is paint, while `disabled` on the\n * button is what takes the thumb out of the tab order and what assistive tech\n * reports.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.getLowThumb()).isDisabled();\n }\n\n /**\n * The current value, in the shape the model uses: a plain number for one\n * thumb, `[low, high]` for two.\n */\n async getValue(): Promise<WrSliderValue> {\n const values = await Promise.all((await this.getThumbs()).map(thumb => thumb.getValue()));\n return values.length > 1 ? ([values[0], values[1]] as const) : values[0];\n }\n\n /** The slider's lower bound. */\n async getMin(): Promise<number> {\n return (await this.getThumbs())[0].getMin();\n }\n\n /**\n * The slider's upper bound.\n *\n * Taken from the LAST thumb, because in range mode the thumbs bound each\n * other: the lower one's `aria-valuemax` is wherever the upper one is\n * standing, so only the upper thumb knows the real ceiling.\n */\n async getMax(): Promise<number> {\n const thumbs = await this.getThumbs();\n return thumbs[thumbs.length - 1].getMax();\n }\n\n /**\n * The text the slider prints under the track, or `null` when `showLabel` is\n * off.\n *\n * A range slider joins its ends with an EN DASH — `'20 – 80'`, U+2013 — so an\n * assertion typed with a hyphen will not match.\n */\n async getLabelText(): Promise<string | null> {\n const label = await this.locatorForOptional('.wr-slider__label')();\n return label ? label.text() : null;\n }\n\n /** The slider's thumbs in DOM order: the lower one first. */\n async getThumbs(filters: WrSliderThumbHarnessFilters = {}): Promise<WrSliderThumbHarness[]> {\n return this.locatorForAll(WrSliderThumbHarness.with(filters))();\n }\n\n /** The only thumb of a single-thumb slider, or the lower one of a range slider. */\n async getLowThumb(): Promise<WrSliderThumbHarness> {\n return this.locatorFor(WrSliderThumbHarness.with({ position: 'low' }))();\n }\n\n /** The upper thumb. Throws on a single-thumb slider, which has no such part. */\n async getHighThumb(): Promise<WrSliderThumbHarness> {\n const thumb = await this.locatorForOptional(WrSliderThumbHarness.with({ position: 'high' }))();\n if (!thumb) {\n throw new Error('WrSliderHarness.getHighThumb(): this slider has one thumb — only a `range` slider has two.');\n }\n return thumb;\n }\n\n /**\n * Walk the slider to `value` from the keyboard.\n *\n * Single-thumb only — {@link setRange} moves both ends. See\n * {@link WrSliderThumbHarness.setValue} for what the walk costs and when it\n * throws.\n */\n async setValue(value: number): Promise<void> {\n return (await this.single('setValue')).setValue(value);\n }\n\n /**\n * Walk both ends of a range slider to `[low, high]`.\n *\n * The far end moves FIRST. The thumbs bound each other, so writing `[90, 95]`\n * over `[20, 80]` lower-end-first would be refused outright — 90 is outside\n * the `[0, 80]` window the upper thumb leaves the lower one.\n */\n async setRange(low: number, high: number): Promise<void> {\n if (!(await this.isRange())) {\n throw new Error('WrSliderHarness.setRange(): this slider has one thumb — add `range` to it, or call setValue().');\n }\n if (low > high) {\n throw new Error(`WrSliderHarness.setRange(): ${low} is above ${high}, and the thumbs cannot cross.`);\n }\n\n const lowThumb = await this.getLowThumb();\n const highThumb = await this.getHighThumb();\n\n if (high >= (await highThumb.getValue())) {\n await highThumb.setValue(high);\n await lowThumb.setValue(low);\n return;\n }\n\n await lowThumb.setValue(low);\n await highThumb.setValue(high);\n }\n\n /** One step up (`ArrowUp`). Single-thumb only. A disabled slider does not move. */\n async stepUp(): Promise<void> {\n return (await this.single('stepUp')).stepUp();\n }\n\n /** One step down (`ArrowDown`). Single-thumb only. A disabled slider does not move. */\n async stepDown(): Promise<void> {\n return (await this.single('stepDown')).stepDown();\n }\n\n /** `Home` — jump to the slider's `min`. Single-thumb only. */\n async toMin(): Promise<void> {\n return (await this.single('toMin')).toMin();\n }\n\n /** `End` — jump to the slider's `max`. Single-thumb only. */\n async toMax(): Promise<void> {\n return (await this.single('toMax')).toMax();\n }\n\n /**\n * Move keyboard focus to the slider's first thumb. A range slider's thumbs are\n * two separate tab stops (both are plain buttons — there is no roving\n * `tabindex`), so reach the other one through {@link getHighThumb}.\n */\n async focus(): Promise<void> {\n return (await this.getLowThumb()).focus();\n }\n\n /** Whether any of the slider's thumbs holds focus. */\n async isFocused(): Promise<boolean> {\n const focused = await Promise.all((await this.getThumbs()).map(thumb => thumb.isFocused()));\n return focused.includes(true);\n }\n\n /**\n * The one thumb a single-thumb convenience call means.\n *\n * Range mode gets an error rather than a guess: \"step this slider up\" has two\n * possible answers there, and picking one silently is how a spec ends up\n * asserting against the end it did not move.\n */\n private async single(caller: string): Promise<WrSliderThumbHarness> {\n if (await this.isRange()) {\n throw new Error(\n `WrSliderHarness.${caller}(): this slider has two thumbs — use setRange(), or reach for one end ` +\n 'with getLowThumb() / getHighThumb().'\n );\n }\n return this.getLowThumb();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;AACA,MAAM,WAA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