ngwr 11.1.0 → 11.2.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 (205) hide show
  1. package/circular-text/styles/_index.scss +11 -0
  2. package/command-palette/styles/_index.scss +12 -0
  3. package/fesm2022/ngwr-action-sheet-testing.mjs +313 -0
  4. package/fesm2022/ngwr-action-sheet-testing.mjs.map +1 -0
  5. package/fesm2022/ngwr-bar-chart-testing.mjs +89 -0
  6. package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -0
  7. package/fesm2022/ngwr-blur-text-testing.mjs +203 -0
  8. package/fesm2022/ngwr-blur-text-testing.mjs.map +1 -0
  9. package/fesm2022/ngwr-blur-text.mjs +15 -1
  10. package/fesm2022/ngwr-blur-text.mjs.map +1 -1
  11. package/fesm2022/ngwr-border-glow-testing.mjs +325 -0
  12. package/fesm2022/ngwr-border-glow-testing.mjs.map +1 -0
  13. package/fesm2022/ngwr-calendar-heatmap-testing.mjs +95 -0
  14. package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -0
  15. package/fesm2022/ngwr-calendar-testing.mjs +368 -0
  16. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -0
  17. package/fesm2022/ngwr-calendar.mjs +43 -3
  18. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  19. package/fesm2022/ngwr-cascader.mjs +12 -0
  20. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  21. package/fesm2022/ngwr-checkbox.mjs +8 -0
  22. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  23. package/fesm2022/ngwr-circular-text-testing.mjs +230 -0
  24. package/fesm2022/ngwr-circular-text-testing.mjs.map +1 -0
  25. package/fesm2022/ngwr-circular-text.mjs +2 -2
  26. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  27. package/fesm2022/ngwr-color-picker-testing.mjs +432 -0
  28. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -0
  29. package/fesm2022/ngwr-color-picker.mjs +29 -3
  30. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  31. package/fesm2022/ngwr-context-menu.mjs +25 -5
  32. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  33. package/fesm2022/ngwr-date-picker-testing.mjs +10 -79
  34. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  35. package/fesm2022/ngwr-decrypt-text-testing.mjs +261 -0
  36. package/fesm2022/ngwr-decrypt-text-testing.mjs.map +1 -0
  37. package/fesm2022/ngwr-decrypt-text.mjs +6 -1
  38. package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
  39. package/fesm2022/ngwr-donut-chart-testing.mjs +93 -0
  40. package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -0
  41. package/fesm2022/ngwr-drawer.mjs +36 -7
  42. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  43. package/fesm2022/ngwr-dropdown.mjs +32 -2
  44. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  45. package/fesm2022/ngwr-event-calendar-testing.mjs +446 -0
  46. package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -0
  47. package/fesm2022/ngwr-event-calendar.mjs +43 -18
  48. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  49. package/fesm2022/ngwr-falling-text-testing.mjs +218 -0
  50. package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -0
  51. package/fesm2022/ngwr-fuzzy-text-testing.mjs +134 -0
  52. package/fesm2022/ngwr-fuzzy-text-testing.mjs.map +1 -0
  53. package/fesm2022/ngwr-gauge-testing.mjs +86 -0
  54. package/fesm2022/ngwr-gauge-testing.mjs.map +1 -0
  55. package/fesm2022/ngwr-glitch-text-testing.mjs +181 -0
  56. package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -0
  57. package/fesm2022/ngwr-gradient-text-testing.mjs +223 -0
  58. package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -0
  59. package/fesm2022/ngwr-i18n-en.mjs +14 -0
  60. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  61. package/fesm2022/ngwr-i18n-ru.mjs +14 -0
  62. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  63. package/fesm2022/ngwr-image-cropper-testing.mjs +156 -0
  64. package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -0
  65. package/fesm2022/ngwr-image-cropper.mjs +10 -3
  66. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  67. package/fesm2022/ngwr-input-number.mjs +73 -6
  68. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  69. package/fesm2022/ngwr-knob-testing.mjs +220 -0
  70. package/fesm2022/ngwr-knob-testing.mjs.map +1 -0
  71. package/fesm2022/ngwr-lightbox-testing.mjs +223 -0
  72. package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -0
  73. package/fesm2022/ngwr-lightbox.mjs +9 -2
  74. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  75. package/fesm2022/ngwr-line-chart-testing.mjs +119 -0
  76. package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -0
  77. package/fesm2022/ngwr-marquee-testing.mjs +336 -0
  78. package/fesm2022/ngwr-marquee-testing.mjs.map +1 -0
  79. package/fesm2022/ngwr-meter-group-testing.mjs +80 -0
  80. package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -0
  81. package/fesm2022/ngwr-overlay.mjs +28 -1
  82. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  83. package/fesm2022/ngwr-popover.mjs +14 -0
  84. package/fesm2022/ngwr-popover.mjs.map +1 -1
  85. package/fesm2022/ngwr-rotating-text-testing.mjs +220 -0
  86. package/fesm2022/ngwr-rotating-text-testing.mjs.map +1 -0
  87. package/fesm2022/ngwr-rotating-text.mjs +2 -2
  88. package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
  89. package/fesm2022/ngwr-select.mjs +70 -11
  90. package/fesm2022/ngwr-select.mjs.map +1 -1
  91. package/fesm2022/ngwr-shiny-text-testing.mjs +237 -0
  92. package/fesm2022/ngwr-shiny-text-testing.mjs.map +1 -0
  93. package/fesm2022/ngwr-slider.mjs +44 -6
  94. package/fesm2022/ngwr-slider.mjs.map +1 -1
  95. package/fesm2022/ngwr-sparkline-testing.mjs +76 -0
  96. package/fesm2022/ngwr-sparkline-testing.mjs.map +1 -0
  97. package/fesm2022/ngwr-speed-dial-testing.mjs +279 -0
  98. package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -0
  99. package/fesm2022/ngwr-splash-cursor-testing.mjs +89 -0
  100. package/fesm2022/ngwr-splash-cursor-testing.mjs.map +1 -0
  101. package/fesm2022/ngwr-split-text-testing.mjs +224 -0
  102. package/fesm2022/ngwr-split-text-testing.mjs.map +1 -0
  103. package/fesm2022/ngwr-split-text.mjs +15 -1
  104. package/fesm2022/ngwr-split-text.mjs.map +1 -1
  105. package/fesm2022/ngwr-splitter-testing.mjs +245 -0
  106. package/fesm2022/ngwr-splitter-testing.mjs.map +1 -0
  107. package/fesm2022/ngwr-spotlight-card-testing.mjs +368 -0
  108. package/fesm2022/ngwr-spotlight-card-testing.mjs.map +1 -0
  109. package/fesm2022/ngwr-star-border-testing.mjs +172 -0
  110. package/fesm2022/ngwr-star-border-testing.mjs.map +1 -0
  111. package/fesm2022/ngwr-table.mjs +13 -3
  112. package/fesm2022/ngwr-table.mjs.map +1 -1
  113. package/fesm2022/ngwr-tabs.mjs +15 -1
  114. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  115. package/fesm2022/ngwr-tilt-card-testing.mjs +190 -0
  116. package/fesm2022/ngwr-tilt-card-testing.mjs.map +1 -0
  117. package/fesm2022/ngwr-tilt-card.mjs +19 -1
  118. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  119. package/fesm2022/ngwr-toast.mjs +36 -7
  120. package/fesm2022/ngwr-toast.mjs.map +1 -1
  121. package/fesm2022/ngwr-tour-testing.mjs +173 -0
  122. package/fesm2022/ngwr-tour-testing.mjs.map +1 -0
  123. package/fesm2022/ngwr-tour.mjs +2 -2
  124. package/fesm2022/ngwr-tour.mjs.map +1 -1
  125. package/fesm2022/ngwr-tree.mjs +10 -3
  126. package/fesm2022/ngwr-tree.mjs.map +1 -1
  127. package/fesm2022/ngwr-typewriter-testing.mjs +228 -0
  128. package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -0
  129. package/fesm2022/ngwr-version.mjs +1 -1
  130. package/fesm2022/ngwr-version.mjs.map +1 -1
  131. package/fesm2022/ngwr-waves-testing.mjs +128 -0
  132. package/fesm2022/ngwr-waves-testing.mjs.map +1 -0
  133. package/fesm2022/ngwr-window-testing.mjs +361 -0
  134. package/fesm2022/ngwr-window-testing.mjs.map +1 -0
  135. package/fesm2022/ngwr-window.mjs +84 -10
  136. package/fesm2022/ngwr-window.mjs.map +1 -1
  137. package/i18n/en.json +16 -2
  138. package/i18n/ru.json +16 -2
  139. package/llms-full.txt +147 -0
  140. package/llms.txt +27 -8
  141. package/mcp/providers.js +29 -0
  142. package/mcp/tools.js +1 -29
  143. package/package.json +145 -1
  144. package/skills/ngwr/SKILL.md +115 -0
  145. package/skills/ngwr/references/catalog.md +212 -0
  146. package/skills/ngwr/references/setup.md +73 -0
  147. package/types/ngwr-action-sheet-testing.d.ts +260 -0
  148. package/types/ngwr-bar-chart-testing.d.ts +77 -0
  149. package/types/ngwr-blur-text-testing.d.ts +180 -0
  150. package/types/ngwr-blur-text.d.ts +12 -0
  151. package/types/ngwr-border-glow-testing.d.ts +219 -0
  152. package/types/ngwr-calendar-heatmap-testing.d.ts +79 -0
  153. package/types/ngwr-calendar-testing.d.ts +277 -0
  154. package/types/ngwr-calendar.d.ts +10 -0
  155. package/types/ngwr-checkbox.d.ts +13 -0
  156. package/types/ngwr-circular-text-testing.d.ts +196 -0
  157. package/types/ngwr-color-picker-testing.d.ts +291 -0
  158. package/types/ngwr-color-picker.d.ts +13 -1
  159. package/types/ngwr-context-menu.d.ts +15 -1
  160. package/types/ngwr-date-picker-testing.d.ts +6 -66
  161. package/types/ngwr-decrypt-text-testing.d.ts +222 -0
  162. package/types/ngwr-donut-chart-testing.d.ts +79 -0
  163. package/types/ngwr-drawer.d.ts +12 -0
  164. package/types/ngwr-dropdown.d.ts +9 -0
  165. package/types/ngwr-event-calendar-testing.d.ts +301 -0
  166. package/types/ngwr-event-calendar.d.ts +9 -6
  167. package/types/ngwr-falling-text-testing.d.ts +186 -0
  168. package/types/ngwr-fuzzy-text-testing.d.ts +130 -0
  169. package/types/ngwr-gauge-testing.d.ts +71 -0
  170. package/types/ngwr-glitch-text-testing.d.ts +172 -0
  171. package/types/ngwr-gradient-text-testing.d.ts +173 -0
  172. package/types/ngwr-image-cropper-testing.d.ts +134 -0
  173. package/types/ngwr-image-cropper.d.ts +1 -0
  174. package/types/ngwr-input-number.d.ts +33 -1
  175. package/types/ngwr-knob-testing.d.ts +150 -0
  176. package/types/ngwr-lightbox-testing.d.ts +154 -0
  177. package/types/ngwr-lightbox.d.ts +6 -0
  178. package/types/ngwr-line-chart-testing.d.ts +93 -0
  179. package/types/ngwr-marquee-testing.d.ts +280 -0
  180. package/types/ngwr-meter-group-testing.d.ts +67 -0
  181. package/types/ngwr-overlay.d.ts +19 -1
  182. package/types/ngwr-rotating-text-testing.d.ts +191 -0
  183. package/types/ngwr-select.d.ts +32 -0
  184. package/types/ngwr-shiny-text-testing.d.ts +165 -0
  185. package/types/ngwr-slider.d.ts +15 -0
  186. package/types/ngwr-sparkline-testing.d.ts +69 -0
  187. package/types/ngwr-speed-dial-testing.d.ts +195 -0
  188. package/types/ngwr-splash-cursor-testing.d.ts +95 -0
  189. package/types/ngwr-split-text-testing.d.ts +209 -0
  190. package/types/ngwr-split-text.d.ts +12 -0
  191. package/types/ngwr-splitter-testing.d.ts +174 -0
  192. package/types/ngwr-spotlight-card-testing.d.ts +303 -0
  193. package/types/ngwr-star-border-testing.d.ts +135 -0
  194. package/types/ngwr-table.d.ts +10 -1
  195. package/types/ngwr-tilt-card-testing.d.ts +158 -0
  196. package/types/ngwr-tilt-card.d.ts +2 -0
  197. package/types/ngwr-toast.d.ts +14 -5
  198. package/types/ngwr-tour-testing.d.ts +143 -0
  199. package/types/ngwr-tree.d.ts +7 -0
  200. package/types/ngwr-typewriter-testing.d.ts +201 -0
  201. package/types/ngwr-version.d.ts +1 -1
  202. package/types/ngwr-waves-testing.d.ts +121 -0
  203. package/types/ngwr-window-testing.d.ts +263 -0
  204. package/types/ngwr-window.d.ts +27 -10
  205. package/window/styles/_index.scss +44 -16
@@ -0,0 +1,219 @@
1
+ import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } 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
+
10
+ /** Narrows which `<wr-border-glow>` a harness query matches. */
11
+ interface WrBorderGlowHarnessFilters extends BaseHarnessFilters {
12
+ /**
13
+ * Match the card's projected text — a string is an exact match, a RegExp is tested.
14
+ * The component names itself nothing, so the content it wraps is the only readable
15
+ * way to tell two cards on a page apart.
16
+ */
17
+ readonly text?: string | RegExp;
18
+ /**
19
+ * Match only cards that are mid mount-sweep (`true`) or only cards that are not
20
+ * (`false`) — see `WrBorderGlowHarness.isSweeping`, where the four-second window
21
+ * this is true for is explained.
22
+ */
23
+ readonly sweeping?: boolean;
24
+ }
25
+
26
+ /**
27
+ * @license
28
+ *
29
+ * Use of this source code is governed by an MIT-style license that can be
30
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
31
+ */
32
+
33
+ /**
34
+ * Test harness for `<wr-border-glow>` — a card whose border lights up under the cursor.
35
+ *
36
+ * **Nearly all of this component is a bag of custom properties written onto the host,
37
+ * and that is what the harness reads.** The paint itself — the conic mask, the stacked
38
+ * `box-shadow` halo, the soft-light bloom — lives in the stylesheet, so a unit test can
39
+ * never see it. What it CAN see is the arithmetic that feeds it, and that is where the
40
+ * breakages are: the seven-step alpha ramp {@link getGlowAlphaRamp} derives from
41
+ * `glowIntensity`, the `[0,1,2,0,1,2,1]` palette mapping in {@link getGradientColors}
42
+ * with its clamp for short palettes, and the pointer maths behind
43
+ * {@link getPointerAngle} / {@link getEdgeProximity}.
44
+ *
45
+ * **Every custom-property getter reads the inline declaration** — see
46
+ * {@link parseInlineDeclarations} for why a computed read would be a different, and
47
+ * wrong, question.
48
+ *
49
+ * **A colour getter answering `null` means the component has never written that
50
+ * variable**, which is the contract when the input is unset: the stylesheet's per-theme
51
+ * default takes over. Note that it does not un-write them either — setting `[glowColor]`
52
+ * and then putting it back to `null` leaves the last value on the host — so `null` is
53
+ * "never set", not "not set now".
54
+ *
55
+ * There is deliberately no `getGlowOpacity()`, `isGlowVisible()` or `isHovered()`: the
56
+ * visible strength is a `calc()` in the stylesheet gated behind `:not(:hover)`, and
57
+ * jsdom loads no stylesheet and matches no `:hover`, so any number would be invented.
58
+ * There is no measured halo extent either — `.wr-border-glow__edge` is 0×0 in a test,
59
+ * and {@link getGlowRadius} reads what the component asked for instead. And there is no
60
+ * `getSweepProgress()` / `waitForSweep()`: the mount sweep is a four-second chain of
61
+ * `requestAnimationFrame` tweens, so awaiting it either hangs the spec or samples one
62
+ * frame and reports a value that was never settled. {@link isSweeping} answers the one
63
+ * durable fact — that the sweep started.
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const card = await loader.getHarness(WrBorderGlowHarness.with({ text: /Hover me/ }));
68
+ *
69
+ * expect(await card.getBorderRadius()).toBe(28);
70
+ * expect(await card.getPointerAngle()).toBeNull(); // nothing has pointed at it yet
71
+ * ```
72
+ *
73
+ * @see https://ngwr.dev/guides/testing
74
+ */
75
+ declare class WrBorderGlowHarness extends ComponentHarness {
76
+ static hostSelector: string;
77
+ /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
78
+ static with(options?: WrBorderGlowHarnessFilters): HarnessPredicate<WrBorderGlowHarness>;
79
+ private readonly edge;
80
+ /** The corner radius the stylesheet is told to round to, in pixels. */
81
+ getBorderRadius(): Promise<number>;
82
+ /** How far past the card edge the halo is told to reach, in pixels. */
83
+ getGlowRadius(): Promise<number>;
84
+ /**
85
+ * The width of the lit cone, as a share of the perimeter.
86
+ *
87
+ * Unitless by contract — the stylesheet multiplies it — so a `px` creeping in here is
88
+ * a real regression that leaves the mask with a length where it wants a number.
89
+ */
90
+ getConeSpread(): Promise<number>;
91
+ /** How sharply the halo fades as the cursor leaves an edge; lower is a wider falloff. */
92
+ getEdgeSensitivity(): Promise<number>;
93
+ /** Strength of the interior soft-light bloom, again unitless. */
94
+ getFillOpacity(): Promise<number>;
95
+ /**
96
+ * The card fill the author asked for, or `null` when they left it to the theme.
97
+ *
98
+ * The distinction is the whole point: an unset `[backgroundColor]` means the surface
99
+ * token decides, light or dark, and a card that starts declaring its own fill has
100
+ * stopped following the theme.
101
+ */
102
+ getBackgroundColor(): Promise<string | null>;
103
+ /**
104
+ * The halo colour at full strength, or `null` when the theme decides.
105
+ *
106
+ * Comes back as the `hsl(H deg S% L% / A%)` the component assembled from the bare
107
+ * `'H S L'` input, so this also pins that assembly. Be aware the parse is forgiving to
108
+ * a fault: anything that is not three bare numbers — a hex colour, `rgb(…)`, even
109
+ * `hsl(40deg 80% 80%)` with its units — silently becomes the default amber, so a
110
+ * plausible-looking value here does not mean the input was understood.
111
+ */
112
+ getGlowColor(): Promise<string | null>;
113
+ /**
114
+ * The seven halo alphas in percent, brightest first, or `null` when no glow colour
115
+ * was ever set.
116
+ *
117
+ * This is the whole of `[glowIntensity]`: the steps are `[100, 60, 50, 40, 30, 20,
118
+ * 10]` multiplied by the intensity and clamped at 100, so `0.5` gives
119
+ * `[50, 30, 25, 20, 15, 10, 5]` and anything above 1 saturates from the top down. The
120
+ * clamp is one-sided — a negative intensity produces negative percentages, which a
121
+ * browser drops as invalid declarations and the halo vanishes — so the numbers are
122
+ * returned as written rather than corrected, which is how a spec can see it.
123
+ */
124
+ getGlowAlphaRamp(): Promise<number[] | null>;
125
+ /**
126
+ * The seven mesh-gradient colours, in slot order, or `null` when no palette was set.
127
+ *
128
+ * The slots do not map one-to-one onto the palette: they take colours
129
+ * `[0, 1, 2, 0, 1, 2, 1]`, each index clamped to the last entry the palette actually
130
+ * has. So a two-colour palette repeats the second colour rather than reading past the
131
+ * end — which is the case worth a spec, since `undefined` in a `radial-gradient()`
132
+ * kills the whole declaration silently.
133
+ */
134
+ getGradientColors(): Promise<string[] | null>;
135
+ /**
136
+ * The flat colour behind the mesh, or `null` when no palette was set.
137
+ *
138
+ * Always the palette's FIRST entry. Worth its own method because the base slice is the
139
+ * one that shows where the gradients are transparent, and it drifting to the last
140
+ * colour changes the card's whole cast without touching a gradient.
141
+ */
142
+ getBaseGradientColor(): Promise<string | null>;
143
+ /**
144
+ * Where the cursor last sat, in degrees: `0` is straight up and the angle grows
145
+ * clockwise. `null` until something has pointed at the card.
146
+ *
147
+ * `null` is a state of its own rather than a stand-in for zero — the stylesheet's own
148
+ * default applies until the first pointer arrives, and dead centre legitimately
149
+ * reports `0`, so a harness that folded the two together could not tell an untouched
150
+ * card from one being pointed at from the middle.
151
+ */
152
+ getPointerAngle(): Promise<number | null>;
153
+ /**
154
+ * How close the cursor is to the perimeter: `0` at dead centre, `100` at the edge.
155
+ * `null` until something has pointed at the card.
156
+ *
157
+ * On a diagonal the NEARER axis wins rather than the two averaging, so a cursor level
158
+ * with the bottom edge reads 100 wherever it is along it.
159
+ */
160
+ getEdgeProximity(): Promise<number | null>;
161
+ /**
162
+ * Point at the card, in client coordinates.
163
+ *
164
+ * **Refuses on a card with no box, which in a unit test is every card.** The component
165
+ * measures the pointer against its own centre, and with a 0×0 rect that maths
166
+ * degenerates: the centre is the top-left corner, and `1 / Math.min(0, 0)` pins the
167
+ * proximity at 100 for every position on the page. Both would come back as confident
168
+ * numbers describing nothing. Give the host a box first, exactly as the component's own
169
+ * spec does:
170
+ *
171
+ * ```ts
172
+ * const card = fixture.nativeElement.querySelector('wr-border-glow');
173
+ * card.getBoundingClientRect = () => ({ left: 0, top: 0, width: 200, height: 100 }) as DOMRect;
174
+ * ```
175
+ *
176
+ * A `pointermove` is dispatched on the host itself, so it needs no hit test and cannot
177
+ * miss — the coordinates only ever reach the component's own arithmetic.
178
+ */
179
+ movePointerTo(clientX: number, clientY: number): Promise<void>;
180
+ /**
181
+ * Whether the one-shot mount sweep is running.
182
+ *
183
+ * The class is added synchronously when the sweep starts and removed when it ends
184
+ * about four seconds later, or when the component is torn down — so a spec asserts
185
+ * that it STARTED, and leaves the angle alone while it does. This is also the
186
+ * reduced-motion assertion: `[animated]="true"` for someone who asked for less motion
187
+ * must leave this `false`, and no angle written at all.
188
+ */
189
+ isSweeping(): Promise<boolean>;
190
+ /** Whether the halo layer is in the markup — the element the whole outer glow paints on. */
191
+ hasHaloLayer(): Promise<boolean>;
192
+ /**
193
+ * Whether the decoration stays out of the accessibility tree.
194
+ *
195
+ * The halo layer is the component's only decorative NODE — every other layer is a
196
+ * pseudo-element and so was never in the tree to begin with. It carries no text and no
197
+ * name, so losing its `aria-hidden` puts an anonymous element between the reader and
198
+ * the card's content.
199
+ */
200
+ isDecorationHiddenFromAssistiveTech(): Promise<boolean>;
201
+ /**
202
+ * The projected content's text, trimmed.
203
+ *
204
+ * Read from `.wr-border-glow__inner` rather than the host, which is the assertion:
205
+ * content that lands as a bare host child instead of inside the wrapper renders
206
+ * underneath the interior bloom, and reading the host would report the same string
207
+ * either way.
208
+ */
209
+ getContentText(): Promise<string>;
210
+ /** The host's inline declarations — the component's whole written output. */
211
+ private declarations;
212
+ /** One inline custom property, or `null` when the component has not written it. */
213
+ private readVar;
214
+ /** One inline custom property that is always written, as a number. */
215
+ private readNumberVar;
216
+ }
217
+
218
+ export { WrBorderGlowHarness };
219
+ export type { WrBorderGlowHarnessFilters };
@@ -0,0 +1,79 @@
1
+ import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } 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
+
10
+ /** Narrows which `<wr-calendar-heatmap>` a harness query matches. */
11
+ interface WrCalendarHeatmapHarnessFilters extends BaseHarnessFilters {
12
+ /** Match the grid's accessible name. */
13
+ readonly ariaLabel?: string | RegExp;
14
+ }
15
+ /** One day square, as its tooltip describes it. */
16
+ interface WrCalendarHeatmapCell {
17
+ /** The ISO date the square stands for. */
18
+ readonly iso: string;
19
+ /** The value as printed in the tooltip. */
20
+ readonly value: string;
21
+ /** Which week column it sits in, one-based, as the grid places it. */
22
+ readonly week: number;
23
+ /** Which weekday row it sits in, one-based. */
24
+ readonly day: number;
25
+ }
26
+
27
+ /**
28
+ * @license
29
+ *
30
+ * Use of this source code is governed by an MIT-style license that can be
31
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
32
+ */
33
+
34
+ /**
35
+ * Test harness for `<wr-calendar-heatmap>`.
36
+ *
37
+ * **Every square is `aria-hidden`, and that is the design.** The grid is one
38
+ * `role="img"` with a name; a year of individually announced days would be unusable
39
+ * with a screen reader. What each square carries instead is a `title` — its ISO date
40
+ * and value — which is the only text a spec can read, and what
41
+ * {@link getCells} parses.
42
+ *
43
+ * **Four of the seven weekday labels are blank on purpose**: seven do not fit beside
44
+ * a grid this dense. {@link getWeekdayLabels} returns them as they are, empties
45
+ * included, rather than filtering — a spec asserting seven entries with four blanks
46
+ * is pinning the real layout.
47
+ *
48
+ * @see https://ngwr.dev/guides/testing
49
+ */
50
+ declare class WrCalendarHeatmapHarness extends ComponentHarness {
51
+ static hostSelector: string;
52
+ /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
53
+ static with(options?: WrCalendarHeatmapHarnessFilters): HarnessPredicate<WrCalendarHeatmapHarness>;
54
+ private readonly grid;
55
+ /** The role the grid announces — `img`, for the whole picture. */
56
+ getRole(): Promise<string | null>;
57
+ /** The grid's accessible name — the only name a reader gets. */
58
+ getAccessibleName(): Promise<string | null>;
59
+ /** How many day squares were drawn. */
60
+ getCellCount(): Promise<number>;
61
+ /**
62
+ * Every square, from its tooltip and its grid placement.
63
+ *
64
+ * The `title` is `"<iso>: <value>"`, which is the component's own format and the
65
+ * only text on a square — everything else about it is colour.
66
+ */
67
+ getCells(): Promise<WrCalendarHeatmapCell[]>;
68
+ /** The value a given ISO date's square reports, or `null` when that day is not drawn. */
69
+ getValueFor(iso: string): Promise<string | null>;
70
+ /** Whether the weekday and month labels are drawn (`showLabels`). */
71
+ hasLabels(): Promise<boolean>;
72
+ /** The weekday labels as drawn — seven entries, four of them deliberately empty. */
73
+ getWeekdayLabels(): Promise<string[]>;
74
+ /** The month labels along the top, in order. */
75
+ getMonthLabels(): Promise<string[]>;
76
+ }
77
+
78
+ export { WrCalendarHeatmapHarness };
79
+ export type { WrCalendarHeatmapCell, WrCalendarHeatmapHarnessFilters };
@@ -0,0 +1,277 @@
1
+ import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
+ import { WrCalendarMode } from 'ngwr/calendar';
3
+
4
+ /**
5
+ * @license
6
+ *
7
+ * Use of this source code is governed by an MIT-style license that can be
8
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
9
+ */
10
+
11
+ /** Which of the three sub-views the calendar is showing. */
12
+ type WrCalendarView = 'day' | 'month' | 'year';
13
+ /** One month or year chip, as the picker views render them. */
14
+ interface WrCalendarChip {
15
+ /** The label as printed — a short month name, or the year. */
16
+ readonly label: string;
17
+ /** Whether it is the current selection. */
18
+ readonly selected: boolean;
19
+ /** Whether it is the month / year containing today. */
20
+ readonly current: boolean;
21
+ /** Whether `min` / `max` ruled it out. */
22
+ readonly disabled: boolean;
23
+ }
24
+ /** Narrows which `<wr-calendar>` a harness query matches. */
25
+ interface WrCalendarHarnessFilters extends BaseHarnessFilters {
26
+ /** Match the header label as printed, e.g. `March 2026`. */
27
+ readonly headerLabel?: string | RegExp;
28
+ /** Match single- or range-selection calendars. */
29
+ readonly mode?: WrCalendarMode;
30
+ /** Match only enabled (`false`) or only disabled (`true`) calendars. */
31
+ readonly disabled?: boolean;
32
+ }
33
+ /** Narrows which day cell a harness query matches. */
34
+ interface WrCalendarDayHarnessFilters extends BaseHarnessFilters {
35
+ /**
36
+ * Match the cell's day number as rendered (`'1'` … `'31'`). A string is an exact
37
+ * match, a RegExp is tested — note the grid spills into the neighbouring months,
38
+ * so most numbers appear twice.
39
+ */
40
+ readonly text?: string | RegExp;
41
+ /** Match only selected (`true`) or only unselected (`false`) cells. */
42
+ readonly selected?: boolean;
43
+ /** Match only enabled (`false`) or only disabled (`true`) cells. */
44
+ readonly disabled?: boolean;
45
+ /**
46
+ * Match cells strictly BETWEEN the two ends of a picked range — the ends
47
+ * themselves are `selected`, not `inRange`.
48
+ */
49
+ readonly inRange?: boolean;
50
+ }
51
+
52
+ /**
53
+ * @license
54
+ *
55
+ * Use of this source code is governed by an MIT-style license that can be
56
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
57
+ */
58
+
59
+ /**
60
+ * Test harness for one day cell of a `<wr-calendar>` grid.
61
+ *
62
+ * The cell belongs to the calendar, and a date-picker's popup is a calendar in an
63
+ * overlay — so this is the harness for both, re-exported from
64
+ * `ngwr/date-picker/testing` under the name it shipped as
65
+ * (`WrDatePickerDayHarness`). Reach it through `WrCalendarHarness.getDays()`, or
66
+ * through `WrDatePickerHarness.getDay()` / `getDays()`, which scope it to ONE
67
+ * picker's panel — those cells are in the shared overlay container, so a bare query
68
+ * would answer with whichever picker opened first.
69
+ *
70
+ * State is read the way a screen reader reads it (`role`, `aria-selected`,
71
+ * `aria-disabled`) with the `.wr-calendar__day--*` modifiers filling in what
72
+ * ARIA has no word for: today, the spill days of the neighbouring months, and
73
+ * the interior of a picked range.
74
+ *
75
+ * @see https://ngwr.dev/guides/testing
76
+ */
77
+ declare class WrCalendarDayHarness extends ComponentHarness {
78
+ static hostSelector: string;
79
+ /** Build a predicate that narrows the query. */
80
+ static with(options?: WrCalendarDayHarnessFilters): HarnessPredicate<WrCalendarDayHarness>;
81
+ /** The day number as rendered. */
82
+ getText(): Promise<string>;
83
+ /** The day number as a number, for mapping a list of cells to dates. */
84
+ getDayOfMonth(): Promise<number>;
85
+ /** `'gridcell'` — the cell is a button, and the grid semantics are what a spec should assert. */
86
+ getRole(): Promise<string | null>;
87
+ /** Whether this day is (one end of) the current selection. */
88
+ isSelected(): Promise<boolean>;
89
+ /**
90
+ * Whether the day refuses selection — `min` / `max` or `dateFilter` ruled it
91
+ * out, or the whole calendar is disabled.
92
+ */
93
+ isDisabled(): Promise<boolean>;
94
+ /** Whether the cell is today's date. */
95
+ isToday(): Promise<boolean>;
96
+ /**
97
+ * Whether the cell belongs to a neighbouring month. The grid is always 6x7, so
98
+ * every month is padded with days that are selectable but not "in" the month —
99
+ * which is why `WrDatePickerHarness.getDay` and {@link WrCalendarHarness.getDay} skip them.
100
+ */
101
+ isOutOfMonth(): Promise<boolean>;
102
+ /** Whether the day lies strictly between the two ends of a picked range. */
103
+ isInRange(): Promise<boolean>;
104
+ /**
105
+ * Whether this is the roving cell — the grid's single tab stop, and where the
106
+ * arrow keys move from.
107
+ *
108
+ * At most ONE cell answers `true`, and it is not always one: the calendar's
109
+ * roving date does not follow `next()` / `previous()`, so a grid navigated away
110
+ * from that month has no active cell (and, deliberately or not, no tab stop)
111
+ * until a cell is clicked or the arrows move it.
112
+ */
113
+ isActive(): Promise<boolean>;
114
+ /** Click the cell. A disabled cell swallows the click — assert, do not assume. */
115
+ click(): Promise<void>;
116
+ }
117
+
118
+ /**
119
+ * @license
120
+ *
121
+ * Use of this source code is governed by an MIT-style license that can be
122
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
123
+ */
124
+
125
+ /** The arrow keys, by the direction a user would say out loud. */
126
+ type Arrow = 'left' | 'right' | 'up' | 'down';
127
+ /**
128
+ * Test harness for `<wr-calendar>` — the standalone month grid, and the one
129
+ * `<wr-date-picker>` puts in an overlay.
130
+ *
131
+ * **It is three views behind one header.** Clicking the header label walks
132
+ * `day → month → year`, and each view renders something different: a
133
+ * `role="grid"` of day cells, or a `role="listbox"` of chips. Every day method
134
+ * throws off the day view rather than answering `[]`, which would read as "this
135
+ * month has no days".
136
+ *
137
+ * **The roving cell is not the selection.** The grid has one tab stop and the
138
+ * arrows move it; it starts on the selected date, or on today when nothing is
139
+ * picked. And it does NOT follow {@link next} / {@link previous} — a grid paged
140
+ * away from the roving month has no active cell at all, and so no tab stop, until
141
+ * a key or a click puts one back. That is the component's behaviour, and
142
+ * {@link getActiveDay} is how a spec sees it.
143
+ *
144
+ * **Keys go to the host, not to a cell.** The component listens on its own element,
145
+ * so {@link pressArrow} works whether or not jsdom managed to put real focus
146
+ * anywhere — which it often does not, since the calendar moves focus in an
147
+ * `afterNextRender` and a disabled cell cannot take it.
148
+ *
149
+ * @example
150
+ * ```ts
151
+ * const calendar = await loader.getHarness(WrCalendarHarness);
152
+ *
153
+ * expect(await calendar.getHeaderLabel()).toBe('March 2026');
154
+ * await (await calendar.getDay(14)).click();
155
+ * expect(await calendar.getSelectedDayNumbers()).toEqual([14]);
156
+ * ```
157
+ *
158
+ * @see https://ngwr.dev/guides/testing
159
+ */
160
+ declare class WrCalendarHarness extends ComponentHarness {
161
+ static hostSelector: string;
162
+ /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
163
+ static with(options?: WrCalendarHarnessFilters): HarnessPredicate<WrCalendarHarness>;
164
+ private readonly header;
165
+ private readonly prevButton;
166
+ private readonly nextButton;
167
+ /** Which sub-view is showing. */
168
+ getView(): Promise<WrCalendarView>;
169
+ /** Single- or range-selection, from the host modifier. */
170
+ getMode(): Promise<WrCalendarMode>;
171
+ /** Whether the whole calendar refuses interaction. */
172
+ isDisabled(): Promise<boolean>;
173
+ /** The header text — `March 2026`, `2026`, or `2016 – 2027` depending on the view. */
174
+ getHeaderLabel(): Promise<string>;
175
+ /**
176
+ * Click the header — stepping `day → month → year`.
177
+ *
178
+ * The year view is the end of the walk: the header is disabled there, so this
179
+ * throws rather than clicking a button the DOM would ignore.
180
+ */
181
+ clickHeader(): Promise<void>;
182
+ /**
183
+ * Step back — a month, a year or twelve years, depending on the view.
184
+ *
185
+ * The roving day cell does NOT come along: paging is a view change, not a
186
+ * navigation, and the tab stop stays on the month it was in.
187
+ */
188
+ previous(): Promise<void>;
189
+ /** Step forward — a month, a year or twelve years, depending on the view. */
190
+ next(): Promise<void>;
191
+ /**
192
+ * The back arrow's accessible name, which changes with the view — the arrows are
193
+ * icon-only, so this is the only name they have.
194
+ */
195
+ getPreviousLabel(): Promise<string | null>;
196
+ /** The forward arrow's accessible name. */
197
+ getNextLabel(): Promise<string | null>;
198
+ /** The weekday column headers, in the order the adapter's first day of week puts them. */
199
+ getWeekdayNames(): Promise<string[]>;
200
+ /**
201
+ * Every day cell, in DOM order — 42 of them, since the grid is always six weeks.
202
+ *
203
+ * That includes the spill days of the neighbouring months, which are selectable
204
+ * and not "in" the month; {@link getDay} skips them, and
205
+ * `WrCalendarDayHarness.isOutOfMonth()` tells them apart.
206
+ */
207
+ getDays(filters?: WrCalendarDayHarnessFilters): Promise<WrCalendarDayHarness[]>;
208
+ /**
209
+ * The cell for a day of THIS month.
210
+ *
211
+ * The number alone is ambiguous — a 42-cell grid shows most numbers twice — so
212
+ * the spill days are skipped rather than matched, which is what "the 3rd" means
213
+ * to someone reading the calendar.
214
+ */
215
+ getDay(dayOfMonth: number): Promise<WrCalendarDayHarness>;
216
+ /** The day numbers currently selected — one in single mode, both ends in range mode. */
217
+ getSelectedDayNumbers(): Promise<number[]>;
218
+ /** The day numbers strictly inside a picked range — never the ends. */
219
+ getInRangeDayNumbers(): Promise<number[]>;
220
+ /**
221
+ * The day number holding the roving tab stop, or `null` when the grid has none.
222
+ *
223
+ * `null` is a real answer, not a failure: paging with {@link next} leaves the
224
+ * roving date behind in another month, and the grid then has no `tabindex="0"`
225
+ * at all until a key or a click puts one back.
226
+ */
227
+ getActiveDayNumber(): Promise<number | null>;
228
+ /** The month chips, with their state. Throws off the month view. */
229
+ getMonths(): Promise<WrCalendarChip[]>;
230
+ /** The year chips, with their state. Throws off the year view. */
231
+ getYears(): Promise<WrCalendarChip[]>;
232
+ /**
233
+ * Click a month or year chip by its printed label — which drops the calendar back
234
+ * one view, the way clicking the header climbed up.
235
+ *
236
+ * Throws on the day view, where there are no chips, and on a label the view does
237
+ * not offer, naming what it does.
238
+ */
239
+ selectChip(label: string): Promise<void>;
240
+ /**
241
+ * Press an arrow key — one day left or right, one WEEK up or down.
242
+ *
243
+ * Sent to the host, where the component listens, so this does not depend on jsdom
244
+ * having managed to focus a cell. Under `dir="rtl"` the horizontal pair mirrors:
245
+ * ArrowRight goes back a day, because the grid itself is mirrored.
246
+ */
247
+ pressArrow(arrow: Arrow): Promise<void>;
248
+ /** Press Home — the first day of the roving cell's week, not of the month. */
249
+ pressHome(): Promise<void>;
250
+ /** Press End — the last day of the roving cell's week. */
251
+ pressEnd(): Promise<void>;
252
+ /** Press PageUp — a month back, or a YEAR back with `shift`. */
253
+ pressPageUp(options?: {
254
+ shift?: boolean;
255
+ }): Promise<void>;
256
+ /** Press PageDown — a month on, or a YEAR on with `shift`. */
257
+ pressPageDown(options?: {
258
+ shift?: boolean;
259
+ }): Promise<void>;
260
+ /** Press Enter — picking the roving day, exactly as clicking it would. */
261
+ pressEnter(): Promise<void>;
262
+ /**
263
+ * The role of the element that owns the day rows.
264
+ *
265
+ * Worth asserting rather than assuming: the grid is NOT the host. The host also
266
+ * holds the nav header, and a `role="grid"` may only own rows — so the role sits
267
+ * on the body, and the weekday strip is a row inside it rather than a sibling.
268
+ */
269
+ getGridRole(): Promise<string | null>;
270
+ /** How many week rows the grid renders — always six, which is what keeps it from reflowing. */
271
+ getWeekCount(): Promise<number>;
272
+ private readChips;
273
+ private requireView;
274
+ }
275
+
276
+ export { WrCalendarDayHarness, WrCalendarHarness };
277
+ export type { WrCalendarChip, WrCalendarDayHarnessFilters, WrCalendarHarnessFilters, WrCalendarView };
@@ -79,6 +79,16 @@ declare class WrCalendar {
79
79
  protected readonly hoverDate: _angular_core.WritableSignal<Date | null>;
80
80
  /** Which sub-view is currently shown. Cycles `day → month → year` on header click. */
81
81
  protected readonly viewMode: _angular_core.WritableSignal<"day" | "month" | "year">;
82
+ private readonly prevMonthLabel;
83
+ private readonly nextMonthLabel;
84
+ private readonly prevYearLabel;
85
+ private readonly nextYearLabel;
86
+ private readonly prevYearsLabel;
87
+ private readonly nextYearsLabel;
88
+ /** What the ← button does from here — a month, a year, or a 12-year page. */
89
+ protected readonly prevLabel: _angular_core.Signal<string>;
90
+ /** What the → button does from here. */
91
+ protected readonly nextLabel: _angular_core.Signal<string>;
82
92
  protected readonly today: _angular_core.Signal<Date>;
83
93
  protected readonly weekdayNames: _angular_core.Signal<readonly string[]>;
84
94
  protected readonly monthsView: _angular_core.Signal<readonly string[]>;
@@ -120,6 +120,17 @@ interface WrCheckboxGroupContext {
120
120
  isSelected(value: unknown): boolean;
121
121
  /** Toggle the given value in the group. */
122
122
  toggle(value: unknown): void;
123
+ /**
124
+ * A child lost focus.
125
+ *
126
+ * The group is the control a form binds to, so it is the group that has to
127
+ * report touched — and a child's own `touch` output goes nowhere, since the
128
+ * group never listens to it. Without this channel the only way to mark a
129
+ * group touched was to CHANGE it: tabbing through every box and picking none
130
+ * left the field pristine, so a `required` group showed no error until the
131
+ * user toggled something, which is the one thing they had decided not to do.
132
+ */
133
+ blurred(): void;
123
134
  /** Whether the entire group is disabled. */
124
135
  readonly isDisabled: Signal<boolean>;
125
136
  }
@@ -167,6 +178,8 @@ declare class WrCheckboxGroup implements FormValueControl<unknown[]>, WrCheckbox
167
178
  readonly isDisabled: _angular_core.Signal<boolean>;
168
179
  isSelected(value: unknown): boolean;
169
180
  toggle(value: unknown): void;
181
+ /** @internal A child checkbox lost focus — see {@link WrCheckboxGroupContext.blurred}. */
182
+ blurred(): void;
170
183
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrCheckboxGroup, never>;
171
184
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrCheckboxGroup, "wr-checkbox-group", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, ["*"], true, never>;
172
185
  }