ngwr 11.0.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.
- package/action-sheet/styles/_index.scss +4 -1
- package/anchor/styles/_index.scss +2 -1
- package/calendar/styles/_index.scss +11 -2
- package/cascader/styles/_index.scss +3 -1
- package/circular-text/styles/_index.scss +11 -0
- package/command-palette/styles/_index.scss +14 -1
- package/context-menu/styles/_index.scss +2 -1
- package/falling-text/styles/_index.scss +2 -1
- package/fesm2022/ngwr-action-sheet-testing.mjs +313 -0
- package/fesm2022/ngwr-action-sheet-testing.mjs.map +1 -0
- package/fesm2022/ngwr-bar-chart-testing.mjs +89 -0
- package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-blur-text-testing.mjs +203 -0
- package/fesm2022/ngwr-blur-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-blur-text.mjs +15 -1
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow-testing.mjs +325 -0
- package/fesm2022/ngwr-border-glow-testing.mjs.map +1 -0
- package/fesm2022/ngwr-border-glow.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs +95 -0
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -0
- package/fesm2022/ngwr-calendar-testing.mjs +368 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-calendar.mjs +43 -3
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +2 -2
- package/fesm2022/ngwr-cascader.mjs +14 -2
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +8 -0
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text-testing.mjs +230 -0
- package/fesm2022/ngwr-circular-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-circular-text.mjs +2 -2
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker-testing.mjs +432 -0
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -0
- package/fesm2022/ngwr-color-picker.mjs +29 -3
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +25 -5
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker-testing.mjs +10 -79
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text-testing.mjs +261 -0
- package/fesm2022/ngwr-decrypt-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-decrypt-text.mjs +6 -1
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart-testing.mjs +93 -0
- package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-drag-drop.mjs +2 -2
- package/fesm2022/ngwr-drawer.mjs +36 -7
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +32 -2
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar-testing.mjs +446 -0
- package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-event-calendar.mjs +43 -18
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text-testing.mjs +218 -0
- package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-falling-text.mjs +2 -2
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text-testing.mjs +134 -0
- package/fesm2022/ngwr-fuzzy-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-gauge-testing.mjs +86 -0
- package/fesm2022/ngwr-gauge-testing.mjs.map +1 -0
- package/fesm2022/ngwr-glitch-text-testing.mjs +181 -0
- package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-glitch-text.mjs +2 -2
- package/fesm2022/ngwr-gradient-text-testing.mjs +223 -0
- package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-gradient-text.mjs +2 -2
- package/fesm2022/ngwr-i18n-en.mjs +14 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +14 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper-testing.mjs +156 -0
- package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -0
- package/fesm2022/ngwr-image-cropper.mjs +10 -3
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +73 -6
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-knob-testing.mjs +220 -0
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -0
- package/fesm2022/ngwr-lightbox-testing.mjs +223 -0
- package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -0
- package/fesm2022/ngwr-lightbox.mjs +9 -2
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart-testing.mjs +119 -0
- package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-loading-bar.mjs +2 -2
- package/fesm2022/ngwr-marquee-testing.mjs +336 -0
- package/fesm2022/ngwr-marquee-testing.mjs.map +1 -0
- package/fesm2022/ngwr-marquee.mjs +2 -2
- package/fesm2022/ngwr-meter-group-testing.mjs +80 -0
- package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -0
- package/fesm2022/ngwr-overlay.mjs +28 -1
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +14 -0
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text-testing.mjs +220 -0
- package/fesm2022/ngwr-rotating-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-rotating-text.mjs +2 -2
- package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +70 -11
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text-testing.mjs +237 -0
- package/fesm2022/ngwr-shiny-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-shiny-text.mjs +2 -2
- package/fesm2022/ngwr-slider.mjs +44 -6
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline-testing.mjs +76 -0
- package/fesm2022/ngwr-sparkline-testing.mjs.map +1 -0
- package/fesm2022/ngwr-speed-dial-testing.mjs +279 -0
- package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -0
- package/fesm2022/ngwr-splash-cursor-testing.mjs +89 -0
- package/fesm2022/ngwr-splash-cursor-testing.mjs.map +1 -0
- package/fesm2022/ngwr-split-text-testing.mjs +224 -0
- package/fesm2022/ngwr-split-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-split-text.mjs +15 -1
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter-testing.mjs +245 -0
- package/fesm2022/ngwr-splitter-testing.mjs.map +1 -0
- package/fesm2022/ngwr-spotlight-card-testing.mjs +368 -0
- package/fesm2022/ngwr-spotlight-card-testing.mjs.map +1 -0
- package/fesm2022/ngwr-spotlight-card.mjs +2 -2
- package/fesm2022/ngwr-star-border-testing.mjs +172 -0
- package/fesm2022/ngwr-star-border-testing.mjs.map +1 -0
- package/fesm2022/ngwr-star-border.mjs +2 -2
- package/fesm2022/ngwr-table.mjs +13 -3
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +15 -1
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card-testing.mjs +190 -0
- package/fesm2022/ngwr-tilt-card-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tilt-card.mjs +21 -3
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-toast.mjs +36 -7
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-tour-testing.mjs +173 -0
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tour.mjs +2 -2
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +10 -3
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter-testing.mjs +228 -0
- package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -0
- package/fesm2022/ngwr-typewriter.mjs +2 -2
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +2 -2
- package/fesm2022/ngwr-waves-testing.mjs +128 -0
- package/fesm2022/ngwr-waves-testing.mjs.map +1 -0
- package/fesm2022/ngwr-waves.mjs +2 -2
- package/fesm2022/ngwr-window-testing.mjs +361 -0
- package/fesm2022/ngwr-window-testing.mjs.map +1 -0
- package/fesm2022/ngwr-window.mjs +84 -10
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +7 -2
- package/i18n/en.json +16 -2
- package/i18n/ru.json +16 -2
- package/llms-full.txt +147 -0
- package/llms.txt +27 -8
- package/mcp/providers.js +29 -0
- package/mcp/tools.js +1 -29
- package/package.json +145 -1
- package/result/styles/_index.scss +3 -1
- package/segmented/styles/_index.scss +5 -1
- package/select/styles/_index.scss +3 -1
- package/skills/ngwr/SKILL.md +115 -0
- package/skills/ngwr/references/catalog.md +212 -0
- package/skills/ngwr/references/setup.md +73 -0
- package/stepper/styles/_index.scss +18 -2
- package/table/styles/_index.scss +3 -1
- package/theme/styles/_colors.scss +15 -2
- package/theme/styles/_dark.scss +24 -12
- package/tree/styles/_index.scss +4 -2
- package/types/ngwr-action-sheet-testing.d.ts +260 -0
- package/types/ngwr-bar-chart-testing.d.ts +77 -0
- package/types/ngwr-blur-text-testing.d.ts +180 -0
- package/types/ngwr-blur-text.d.ts +12 -0
- package/types/ngwr-border-glow-testing.d.ts +219 -0
- package/types/ngwr-calendar-heatmap-testing.d.ts +79 -0
- package/types/ngwr-calendar-testing.d.ts +277 -0
- package/types/ngwr-calendar.d.ts +10 -0
- package/types/ngwr-checkbox.d.ts +13 -0
- package/types/ngwr-circular-text-testing.d.ts +196 -0
- package/types/ngwr-color-picker-testing.d.ts +291 -0
- package/types/ngwr-color-picker.d.ts +13 -1
- package/types/ngwr-context-menu.d.ts +15 -1
- package/types/ngwr-date-picker-testing.d.ts +6 -66
- package/types/ngwr-decrypt-text-testing.d.ts +222 -0
- package/types/ngwr-donut-chart-testing.d.ts +79 -0
- package/types/ngwr-drawer.d.ts +12 -0
- package/types/ngwr-dropdown.d.ts +9 -0
- package/types/ngwr-event-calendar-testing.d.ts +301 -0
- package/types/ngwr-event-calendar.d.ts +9 -6
- package/types/ngwr-falling-text-testing.d.ts +186 -0
- package/types/ngwr-fuzzy-text-testing.d.ts +130 -0
- package/types/ngwr-gauge-testing.d.ts +71 -0
- package/types/ngwr-glitch-text-testing.d.ts +172 -0
- package/types/ngwr-gradient-text-testing.d.ts +173 -0
- package/types/ngwr-image-cropper-testing.d.ts +134 -0
- package/types/ngwr-image-cropper.d.ts +1 -0
- package/types/ngwr-input-number.d.ts +33 -1
- package/types/ngwr-knob-testing.d.ts +150 -0
- package/types/ngwr-lightbox-testing.d.ts +154 -0
- package/types/ngwr-lightbox.d.ts +6 -0
- package/types/ngwr-line-chart-testing.d.ts +93 -0
- package/types/ngwr-marquee-testing.d.ts +280 -0
- package/types/ngwr-meter-group-testing.d.ts +67 -0
- package/types/ngwr-overlay.d.ts +19 -1
- package/types/ngwr-rotating-text-testing.d.ts +191 -0
- package/types/ngwr-select.d.ts +32 -0
- package/types/ngwr-shiny-text-testing.d.ts +165 -0
- package/types/ngwr-slider.d.ts +15 -0
- package/types/ngwr-sparkline-testing.d.ts +69 -0
- package/types/ngwr-speed-dial-testing.d.ts +195 -0
- package/types/ngwr-splash-cursor-testing.d.ts +95 -0
- package/types/ngwr-split-text-testing.d.ts +209 -0
- package/types/ngwr-split-text.d.ts +12 -0
- package/types/ngwr-splitter-testing.d.ts +174 -0
- package/types/ngwr-spotlight-card-testing.d.ts +303 -0
- package/types/ngwr-star-border-testing.d.ts +135 -0
- package/types/ngwr-table.d.ts +10 -1
- package/types/ngwr-tilt-card-testing.d.ts +158 -0
- package/types/ngwr-tilt-card.d.ts +2 -0
- package/types/ngwr-toast.d.ts +14 -5
- package/types/ngwr-tour-testing.d.ts +143 -0
- package/types/ngwr-tree.d.ts +7 -0
- package/types/ngwr-typewriter-testing.d.ts +201 -0
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-waves-testing.d.ts +121 -0
- package/types/ngwr-window-testing.d.ts +263 -0
- package/types/ngwr-window.d.ts +27 -10
- package/window/styles/_index.scss +44 -16
|
@@ -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 };
|
package/types/ngwr-calendar.d.ts
CHANGED
|
@@ -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[]>;
|
package/types/ngwr-checkbox.d.ts
CHANGED
|
@@ -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
|
}
|
|
@@ -0,0 +1,196 @@
|
|
|
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-circular-text>` a harness query matches. */
|
|
11
|
+
interface WrCircularTextHarnessFilters extends BaseHarnessFilters {
|
|
12
|
+
/**
|
|
13
|
+
* Match the string the ring announces — the readable copy, not the characters.
|
|
14
|
+
* A string is an exact match, a RegExp is tested.
|
|
15
|
+
*
|
|
16
|
+
* Matched against the accessible copy rather than the host's text because the host
|
|
17
|
+
* carries both: one readable span AND one span per character, so its text reads back
|
|
18
|
+
* as the string twice over and a filter written against it would depend on the split.
|
|
19
|
+
*/
|
|
20
|
+
readonly text?: string | RegExp;
|
|
21
|
+
/**
|
|
22
|
+
* Match on how many characters the ring was laid out from — the divisor every angle is
|
|
23
|
+
* derived from, and the blunt way to address one of two rings without spelling their
|
|
24
|
+
* strings out.
|
|
25
|
+
*/
|
|
26
|
+
readonly characterCount?: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @license
|
|
31
|
+
*
|
|
32
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
33
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Test harness for `<wr-circular-text>`.
|
|
38
|
+
*
|
|
39
|
+
* **The ring's geometry is the component's real output, and it is exact without a
|
|
40
|
+
* browser.** Each character is placed by an inline `transform` the component computes —
|
|
41
|
+
* `rotate(360 / N × i deg)` and then a push outward by the orbit radius — so
|
|
42
|
+
* {@link getCharacterAngles} reads the entire layout back as numbers. A broken circle
|
|
43
|
+
* shows up as uneven angles, as an offset that varies per character, or as a surrogate
|
|
44
|
+
* pair torn into two glyphs, and none of those need a single measured pixel.
|
|
45
|
+
*
|
|
46
|
+
* **The spin does not exist in the DOM, and every method that would report it is absent
|
|
47
|
+
* on purpose.** The rotation is one Web Animation on the ring wrapper, advanced by a
|
|
48
|
+
* compositor, and `spinDuration` reaches nothing but that animation's `duration` option
|
|
49
|
+
* — so there is no `getSpinDurationSeconds()` (it would report whatever the spec's own
|
|
50
|
+
* `animate` stub recorded, which is the test reading back its own fixture), no
|
|
51
|
+
* `isSpinning()` and no `getRotationAngle()` (both live on `Animation.currentTime`, in an
|
|
52
|
+
* API jsdom does not implement). There is no `hover()` either: hovering swaps that
|
|
53
|
+
* duration through listeners on the host and changes not one attribute, so a harness
|
|
54
|
+
* hover would appear to work and assert nothing. `pause()` / `resume()` are missing for
|
|
55
|
+
* the same reason — the state is the private `Animation` object, never the document.
|
|
56
|
+
* `respectsReducedMotion()` is the same shape once more: the component honours it by NOT
|
|
57
|
+
* calling `animate`, which is a spec assertion against a stub rather than something a
|
|
58
|
+
* harness can read.
|
|
59
|
+
*
|
|
60
|
+
* **The radius is exposed as text, not as pixels.** `--wr-circular-text-size` and
|
|
61
|
+
* `--wr-circular-text-radius` are declared in the stylesheet, so a test running no
|
|
62
|
+
* stylesheets reads them back empty — hence {@link getOrbitOffsets} hands over the CSS
|
|
63
|
+
* each character carries verbatim instead of a `getRadiusPx()` nobody could compute, and
|
|
64
|
+
* there is no `getCharacterPositions()`: every rect in a unit test is 0×0.
|
|
65
|
+
*
|
|
66
|
+
* **{@link isBonkers} is the one hover mode with a DOM footprint, and the INPUT sets it,
|
|
67
|
+
* not the pointer.** `onHover="goBonkers"` puts the modifier on the host at render time;
|
|
68
|
+
* the scale it enables is a CSS `:hover` rule the harness cannot see. Reading it as "the
|
|
69
|
+
* pointer is over the ring" is exactly backwards.
|
|
70
|
+
*
|
|
71
|
+
* **What is announced and what is drawn are two questions.** The string is carried once
|
|
72
|
+
* in a visually-hidden span, and the ring as a whole is `aria-hidden` so a screen reader
|
|
73
|
+
* hears the word rather than spelling it out — {@link getAccessibleText} is the first,
|
|
74
|
+
* {@link getText} the second, and a spec that read only the second would pass on a
|
|
75
|
+
* component announcing `N. G. W. R.`
|
|
76
|
+
*
|
|
77
|
+
* jsdom implements no Web Animations API and this component animates on mount, so a spec
|
|
78
|
+
* has to supply one of the two halves before the fixture is created — either the API, or
|
|
79
|
+
* a reason not to reach for it:
|
|
80
|
+
*
|
|
81
|
+
* ```ts
|
|
82
|
+
* // Either: mount under reduced motion, where the component never animates at all.
|
|
83
|
+
* // (jsdom has no matchMedia, so WrPlatform must be provided as a value.)
|
|
84
|
+
* TestBed.configureTestingModule({ providers: [{ provide: WrPlatform, useValue: reducedMotion }] });
|
|
85
|
+
*
|
|
86
|
+
* // Or: stub the API. Save the descriptor and put it back by hand in afterEach — this
|
|
87
|
+
* // is an assignment, not a spy, so it leaks into whichever file vitest runs next.
|
|
88
|
+
* Reflect.set(Element.prototype, 'animate', () => ({ cancel: () => undefined }));
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* const ring = await loader.getHarness(WrCircularTextHarness.with({ text: 'NGWR' }));
|
|
94
|
+
*
|
|
95
|
+
* expect(await ring.getCharacters()).toEqual(['N', 'G', 'W', 'R']);
|
|
96
|
+
* expect(await ring.getCharacterAngles()).toEqual([0, 90, 180, 270]);
|
|
97
|
+
* expect(await ring.getText()).toBe(await ring.getAccessibleText());
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* @see https://ngwr.dev/guides/testing
|
|
101
|
+
*/
|
|
102
|
+
declare class WrCircularTextHarness extends ComponentHarness {
|
|
103
|
+
static hostSelector: string;
|
|
104
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
105
|
+
static with(options?: WrCircularTextHarnessFilters): HarnessPredicate<WrCircularTextHarness>;
|
|
106
|
+
private readonly chars;
|
|
107
|
+
/**
|
|
108
|
+
* The whole string, as the one readable copy holds it.
|
|
109
|
+
*
|
|
110
|
+
* All a screen reader gets, the ring itself being out of the tree — lose this span and
|
|
111
|
+
* the component becomes a nameless pile of hidden letters, with no other symptom
|
|
112
|
+
* anywhere in the DOM.
|
|
113
|
+
*
|
|
114
|
+
* Untrimmed, deliberately: a ring is usually given a separator-padded string like
|
|
115
|
+
* `'HELLO * NGWR * '`, whose trailing space is a real character that takes a slot on
|
|
116
|
+
* the circle. {@link getText} is meant to compare equal to this, and a trimmed read on
|
|
117
|
+
* either side would forgive losing it.
|
|
118
|
+
*/
|
|
119
|
+
getAccessibleText(): Promise<string>;
|
|
120
|
+
/**
|
|
121
|
+
* The characters laid out around the circle, in DOM order.
|
|
122
|
+
*
|
|
123
|
+
* Pins the splitting rule — `Array.from(text())`, so a surrogate pair is ONE slot and
|
|
124
|
+
* not two broken halves, and a space is its own slot rather than being collapsed away.
|
|
125
|
+
* DOM order is the only order there is: every character is absolutely positioned, so
|
|
126
|
+
* the sequence here is what the angles below are indexed by.
|
|
127
|
+
*/
|
|
128
|
+
getCharacters(): Promise<string[]>;
|
|
129
|
+
/**
|
|
130
|
+
* Everything the ring draws, put back together in DOM order.
|
|
131
|
+
*
|
|
132
|
+
* The assertion this exists for is `getText() === getAccessibleText()`: the split has
|
|
133
|
+
* to be lossless. Read from the character spans rather than from the host, because the
|
|
134
|
+
* host also holds the readable copy and would report the string twice over.
|
|
135
|
+
*/
|
|
136
|
+
getText(): Promise<string>;
|
|
137
|
+
/** How many slots the circle was divided into — the divisor every angle is derived from. */
|
|
138
|
+
getCharacterCount(): Promise<number>;
|
|
139
|
+
/**
|
|
140
|
+
* Where each character sits on the circle, in degrees, in DOM order.
|
|
141
|
+
*
|
|
142
|
+
* The component's whole geometric output, and the one thing that tells a ring from a
|
|
143
|
+
* crowded arc: the angles must start at 0 and be exactly `360 / N` apart. Empty text
|
|
144
|
+
* yields an empty array — no characters, no angles.
|
|
145
|
+
*
|
|
146
|
+
* Throws for a character carrying no rotation of its own rather than reporting `0` or
|
|
147
|
+
* `NaN` for it. Both of those describe a ring collapsed onto a single point as though
|
|
148
|
+
* nothing were wrong, and that is precisely the failure this method exists to catch.
|
|
149
|
+
*/
|
|
150
|
+
getCharacterAngles(): Promise<number[]>;
|
|
151
|
+
/**
|
|
152
|
+
* How far each character is pushed out from the centre, as the CSS the component wrote.
|
|
153
|
+
*
|
|
154
|
+
* A string rather than a number, and that is the honest answer: the distance is
|
|
155
|
+
* `calc(-1 * var(--wr-circular-text-radius))`, a custom property the STYLESHEET
|
|
156
|
+
* declares, so there is no pixel value to resolve in a test that loads no stylesheet.
|
|
157
|
+
* What matters is assertable anyway — every character must be pushed out by the SAME
|
|
158
|
+
* offset, along the same axis. A per-character or axis-mixed one is the classic bug
|
|
159
|
+
* that turns the ring into a diagonal line, and it survives every other check here
|
|
160
|
+
* because the angles stay perfect while it happens.
|
|
161
|
+
*
|
|
162
|
+
* Throws on the same unplaced character {@link getCharacterAngles} does, for the same
|
|
163
|
+
* reason.
|
|
164
|
+
*/
|
|
165
|
+
getOrbitOffsets(): Promise<string[]>;
|
|
166
|
+
/**
|
|
167
|
+
* Whether the host carries the `wr-circular-text--bonkers` modifier.
|
|
168
|
+
*
|
|
169
|
+
* Set from the `onHover` INPUT being `'goBonkers'` — at render time, before anyone has
|
|
170
|
+
* hovered anything — which is the one assumption a spec author makes backwards here.
|
|
171
|
+
* It is also the only one of the four hover modes with any DOM footprint at all; the
|
|
172
|
+
* other three exist purely as a number handed to a Web Animation.
|
|
173
|
+
*/
|
|
174
|
+
isBonkers(): Promise<boolean>;
|
|
175
|
+
/**
|
|
176
|
+
* Whether the ring is out of the accessibility tree.
|
|
177
|
+
*
|
|
178
|
+
* ONE attribute answers this, and that is the contract rather than an approximation:
|
|
179
|
+
* `aria-hidden` sits on the `__spin` wrapper, so the letters underneath inherit it and
|
|
180
|
+
* none of them carries the attribute itself — which keeps it off the nodes the rotation
|
|
181
|
+
* touches. Asserting it per character would fail on a component that is behaving.
|
|
182
|
+
*
|
|
183
|
+
* Answers for the wrapper even when the text is empty, and that is deliberate: the
|
|
184
|
+
* wrapper is always rendered, so there is no vacuous case to guard against — a ring
|
|
185
|
+
* with nothing in it is still correctly hidden or incorrectly readable.
|
|
186
|
+
*
|
|
187
|
+
* Assert it together with {@link getAccessibleText}: hidden letters AND no readable
|
|
188
|
+
* copy is an element with no accessible name at all, which passes either check alone.
|
|
189
|
+
*/
|
|
190
|
+
areCharactersHiddenFromAssistiveTech(): Promise<boolean>;
|
|
191
|
+
/** Each character's placement, parsed once out of the inline transform it carries. */
|
|
192
|
+
private placements;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export { WrCircularTextHarness };
|
|
196
|
+
export type { WrCircularTextHarnessFilters };
|