accented 0.0.0-20250124142030

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 (69) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +162 -0
  3. package/dist/accented.d.ts +27 -0
  4. package/dist/accented.d.ts.map +1 -0
  5. package/dist/accented.js +85 -0
  6. package/dist/accented.js.map +1 -0
  7. package/dist/dom-updater.d.ts +2 -0
  8. package/dist/dom-updater.d.ts.map +1 -0
  9. package/dist/dom-updater.js +96 -0
  10. package/dist/dom-updater.js.map +1 -0
  11. package/dist/elements/accented-container.d.ts +350 -0
  12. package/dist/elements/accented-container.d.ts.map +1 -0
  13. package/dist/elements/accented-container.js +131 -0
  14. package/dist/elements/accented-container.js.map +1 -0
  15. package/dist/logger.d.ts +2 -0
  16. package/dist/logger.d.ts.map +1 -0
  17. package/dist/logger.js +20 -0
  18. package/dist/logger.js.map +1 -0
  19. package/dist/scanner.d.ts +3 -0
  20. package/dist/scanner.d.ts.map +1 -0
  21. package/dist/scanner.js +56 -0
  22. package/dist/scanner.js.map +1 -0
  23. package/dist/state.d.ts +5 -0
  24. package/dist/state.d.ts.map +1 -0
  25. package/dist/state.js +8 -0
  26. package/dist/state.js.map +1 -0
  27. package/dist/task-queue.d.ts +10 -0
  28. package/dist/task-queue.d.ts.map +1 -0
  29. package/dist/task-queue.js +44 -0
  30. package/dist/task-queue.js.map +1 -0
  31. package/dist/types.d.ts +84 -0
  32. package/dist/types.d.ts.map +1 -0
  33. package/dist/types.js +1 -0
  34. package/dist/types.js.map +1 -0
  35. package/dist/utils/are-issue-sets-equal.d.ts +3 -0
  36. package/dist/utils/are-issue-sets-equal.d.ts.map +1 -0
  37. package/dist/utils/are-issue-sets-equal.js +6 -0
  38. package/dist/utils/are-issue-sets-equal.js.map +1 -0
  39. package/dist/utils/deep-merge.d.ts +4 -0
  40. package/dist/utils/deep-merge.d.ts.map +1 -0
  41. package/dist/utils/deep-merge.js +18 -0
  42. package/dist/utils/deep-merge.js.map +1 -0
  43. package/dist/utils/transform-violations.d.ts +4 -0
  44. package/dist/utils/transform-violations.d.ts.map +1 -0
  45. package/dist/utils/transform-violations.js +39 -0
  46. package/dist/utils/transform-violations.js.map +1 -0
  47. package/dist/utils/update-elements-with-issues.d.ts +5 -0
  48. package/dist/utils/update-elements-with-issues.d.ts.map +1 -0
  49. package/dist/utils/update-elements-with-issues.js +46 -0
  50. package/dist/utils/update-elements-with-issues.js.map +1 -0
  51. package/package.json +38 -0
  52. package/src/accented.test.ts +24 -0
  53. package/src/accented.ts +99 -0
  54. package/src/dom-updater.ts +104 -0
  55. package/src/elements/accented-container.ts +147 -0
  56. package/src/logger.ts +21 -0
  57. package/src/scanner.ts +68 -0
  58. package/src/state.ts +12 -0
  59. package/src/task-queue.test.ts +135 -0
  60. package/src/task-queue.ts +59 -0
  61. package/src/types.ts +97 -0
  62. package/src/utils/are-issue-sets-equal.test.ts +49 -0
  63. package/src/utils/are-issue-sets-equal.ts +10 -0
  64. package/src/utils/deep-merge.test.ts +27 -0
  65. package/src/utils/deep-merge.ts +18 -0
  66. package/src/utils/transform-violations.test.ts +124 -0
  67. package/src/utils/transform-violations.ts +45 -0
  68. package/src/utils/update-elements-with-issues.test.ts +209 -0
  69. package/src/utils/update-elements-with-issues.ts +55 -0
@@ -0,0 +1,350 @@
1
+ import type { Issue } from '../types';
2
+ import type { Signal } from '@preact/signals-core';
3
+ export interface AccentedContainer extends HTMLElement {
4
+ issues: Signal<Array<Issue>> | undefined;
5
+ }
6
+ declare const _default: (name: string) => {
7
+ new (): {
8
+ "__#1@#abortController": AbortController | undefined;
9
+ "__#1@#disposeOfEffect": (() => void) | undefined;
10
+ issues: Signal<Array<Issue>> | undefined;
11
+ connectedCallback(): void;
12
+ disconnectedCallback(): void;
13
+ accessKey: string;
14
+ readonly accessKeyLabel: string;
15
+ autocapitalize: string;
16
+ dir: string;
17
+ draggable: boolean;
18
+ hidden: boolean;
19
+ inert: boolean;
20
+ innerText: string;
21
+ lang: string;
22
+ readonly offsetHeight: number;
23
+ readonly offsetLeft: number;
24
+ readonly offsetParent: Element | null;
25
+ readonly offsetTop: number;
26
+ readonly offsetWidth: number;
27
+ outerText: string;
28
+ popover: string | null;
29
+ spellcheck: boolean;
30
+ title: string;
31
+ translate: boolean;
32
+ writingSuggestions: string;
33
+ attachInternals(): ElementInternals;
34
+ click(): void;
35
+ hidePopover(): void;
36
+ showPopover(): void;
37
+ togglePopover(force?: boolean): boolean;
38
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
39
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
40
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
41
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
42
+ readonly attributes: NamedNodeMap;
43
+ readonly classList: DOMTokenList;
44
+ className: string;
45
+ readonly clientHeight: number;
46
+ readonly clientLeft: number;
47
+ readonly clientTop: number;
48
+ readonly clientWidth: number;
49
+ readonly currentCSSZoom: number;
50
+ id: string;
51
+ innerHTML: string;
52
+ readonly localName: string;
53
+ readonly namespaceURI: string | null;
54
+ onfullscreenchange: ((this: Element, ev: Event) => any) | null;
55
+ onfullscreenerror: ((this: Element, ev: Event) => any) | null;
56
+ outerHTML: string;
57
+ readonly ownerDocument: Document;
58
+ readonly part: DOMTokenList;
59
+ readonly prefix: string | null;
60
+ readonly scrollHeight: number;
61
+ scrollLeft: number;
62
+ scrollTop: number;
63
+ readonly scrollWidth: number;
64
+ readonly shadowRoot: ShadowRoot | null;
65
+ slot: string;
66
+ readonly tagName: string;
67
+ attachShadow(init: ShadowRootInit): ShadowRoot;
68
+ checkVisibility(options?: CheckVisibilityOptions): boolean;
69
+ closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
70
+ closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
71
+ closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
72
+ closest<E extends Element = Element>(selectors: string): E | null;
73
+ computedStyleMap(): StylePropertyMapReadOnly;
74
+ getAttribute(qualifiedName: string): string | null;
75
+ getAttributeNS(namespace: string | null, localName: string): string | null;
76
+ getAttributeNames(): string[];
77
+ getAttributeNode(qualifiedName: string): Attr | null;
78
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
79
+ getBoundingClientRect(): DOMRect;
80
+ getClientRects(): DOMRectList;
81
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
82
+ getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
83
+ getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
84
+ getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
85
+ getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
86
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
87
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
88
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
89
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
90
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
91
+ getHTML(options?: GetHTMLOptions): string;
92
+ hasAttribute(qualifiedName: string): boolean;
93
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
94
+ hasAttributes(): boolean;
95
+ hasPointerCapture(pointerId: number): boolean;
96
+ insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
97
+ insertAdjacentHTML(position: InsertPosition, string: string): void;
98
+ insertAdjacentText(where: InsertPosition, data: string): void;
99
+ matches(selectors: string): boolean;
100
+ releasePointerCapture(pointerId: number): void;
101
+ removeAttribute(qualifiedName: string): void;
102
+ removeAttributeNS(namespace: string | null, localName: string): void;
103
+ removeAttributeNode(attr: Attr): Attr;
104
+ requestFullscreen(options?: FullscreenOptions): Promise<void>;
105
+ requestPointerLock(options?: PointerLockOptions): Promise<void>;
106
+ scroll(options?: ScrollToOptions): void;
107
+ scroll(x: number, y: number): void;
108
+ scrollBy(options?: ScrollToOptions): void;
109
+ scrollBy(x: number, y: number): void;
110
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
111
+ scrollTo(options?: ScrollToOptions): void;
112
+ scrollTo(x: number, y: number): void;
113
+ setAttribute(qualifiedName: string, value: string): void;
114
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
115
+ setAttributeNode(attr: Attr): Attr | null;
116
+ setAttributeNodeNS(attr: Attr): Attr | null;
117
+ setHTMLUnsafe(html: string): void;
118
+ setPointerCapture(pointerId: number): void;
119
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
120
+ webkitMatchesSelector(selectors: string): boolean;
121
+ readonly baseURI: string;
122
+ readonly childNodes: NodeListOf<ChildNode>;
123
+ readonly firstChild: ChildNode | null;
124
+ readonly isConnected: boolean;
125
+ readonly lastChild: ChildNode | null;
126
+ readonly nextSibling: ChildNode | null;
127
+ readonly nodeName: string;
128
+ readonly nodeType: number;
129
+ nodeValue: string | null;
130
+ readonly parentElement: HTMLElement | null;
131
+ readonly parentNode: ParentNode | null;
132
+ readonly previousSibling: ChildNode | null;
133
+ textContent: string | null;
134
+ appendChild<T extends Node>(node: T): T;
135
+ cloneNode(deep?: boolean): Node;
136
+ compareDocumentPosition(other: Node): number;
137
+ contains(other: Node | null): boolean;
138
+ getRootNode(options?: GetRootNodeOptions): Node;
139
+ hasChildNodes(): boolean;
140
+ insertBefore<T extends Node>(node: T, child: Node | null): T;
141
+ isDefaultNamespace(namespace: string | null): boolean;
142
+ isEqualNode(otherNode: Node | null): boolean;
143
+ isSameNode(otherNode: Node | null): boolean;
144
+ lookupNamespaceURI(prefix: string | null): string | null;
145
+ lookupPrefix(namespace: string | null): string | null;
146
+ normalize(): void;
147
+ removeChild<T extends Node>(child: T): T;
148
+ replaceChild<T extends Node>(node: Node, child: T): T;
149
+ readonly ELEMENT_NODE: 1;
150
+ readonly ATTRIBUTE_NODE: 2;
151
+ readonly TEXT_NODE: 3;
152
+ readonly CDATA_SECTION_NODE: 4;
153
+ readonly ENTITY_REFERENCE_NODE: 5;
154
+ readonly ENTITY_NODE: 6;
155
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
156
+ readonly COMMENT_NODE: 8;
157
+ readonly DOCUMENT_NODE: 9;
158
+ readonly DOCUMENT_TYPE_NODE: 10;
159
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
160
+ readonly NOTATION_NODE: 12;
161
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
162
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
163
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
164
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
165
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
166
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
167
+ dispatchEvent(event: Event): boolean;
168
+ ariaAtomic: string | null;
169
+ ariaAutoComplete: string | null;
170
+ ariaBrailleLabel: string | null;
171
+ ariaBrailleRoleDescription: string | null;
172
+ ariaBusy: string | null;
173
+ ariaChecked: string | null;
174
+ ariaColCount: string | null;
175
+ ariaColIndex: string | null;
176
+ ariaColIndexText: string | null;
177
+ ariaColSpan: string | null;
178
+ ariaCurrent: string | null;
179
+ ariaDescription: string | null;
180
+ ariaDisabled: string | null;
181
+ ariaExpanded: string | null;
182
+ ariaHasPopup: string | null;
183
+ ariaHidden: string | null;
184
+ ariaInvalid: string | null;
185
+ ariaKeyShortcuts: string | null;
186
+ ariaLabel: string | null;
187
+ ariaLevel: string | null;
188
+ ariaLive: string | null;
189
+ ariaModal: string | null;
190
+ ariaMultiLine: string | null;
191
+ ariaMultiSelectable: string | null;
192
+ ariaOrientation: string | null;
193
+ ariaPlaceholder: string | null;
194
+ ariaPosInSet: string | null;
195
+ ariaPressed: string | null;
196
+ ariaReadOnly: string | null;
197
+ ariaRequired: string | null;
198
+ ariaRoleDescription: string | null;
199
+ ariaRowCount: string | null;
200
+ ariaRowIndex: string | null;
201
+ ariaRowIndexText: string | null;
202
+ ariaRowSpan: string | null;
203
+ ariaSelected: string | null;
204
+ ariaSetSize: string | null;
205
+ ariaSort: string | null;
206
+ ariaValueMax: string | null;
207
+ ariaValueMin: string | null;
208
+ ariaValueNow: string | null;
209
+ ariaValueText: string | null;
210
+ role: string | null;
211
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
212
+ getAnimations(options?: GetAnimationsOptions): Animation[];
213
+ after(...nodes: (Node | string)[]): void;
214
+ before(...nodes: (Node | string)[]): void;
215
+ remove(): void;
216
+ replaceWith(...nodes: (Node | string)[]): void;
217
+ readonly nextElementSibling: Element | null;
218
+ readonly previousElementSibling: Element | null;
219
+ readonly childElementCount: number;
220
+ readonly children: HTMLCollection;
221
+ readonly firstElementChild: Element | null;
222
+ readonly lastElementChild: Element | null;
223
+ append(...nodes: (Node | string)[]): void;
224
+ prepend(...nodes: (Node | string)[]): void;
225
+ querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
226
+ querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
227
+ querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
228
+ querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
229
+ querySelector<E extends Element = Element>(selectors: string): E | null;
230
+ querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
231
+ querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
232
+ querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
233
+ querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
234
+ querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
235
+ replaceChildren(...nodes: (Node | string)[]): void;
236
+ readonly assignedSlot: HTMLSlotElement | null;
237
+ readonly attributeStyleMap: StylePropertyMap;
238
+ readonly style: CSSStyleDeclaration;
239
+ contentEditable: string;
240
+ enterKeyHint: string;
241
+ inputMode: string;
242
+ readonly isContentEditable: boolean;
243
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
244
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
245
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
246
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
247
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
248
+ onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
249
+ onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
250
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
251
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
252
+ oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
253
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
254
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
255
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
256
+ onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
257
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
258
+ oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
259
+ oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
260
+ oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
261
+ oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
262
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
263
+ oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
264
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
265
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
266
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
267
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
268
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
269
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
270
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
271
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
272
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
273
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
274
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
275
+ onerror: OnErrorEventHandler;
276
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
277
+ onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
278
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
279
+ oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
280
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
281
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
282
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
283
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
284
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
285
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
286
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
287
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
288
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
289
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
290
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
291
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
292
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
293
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
294
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
295
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
296
+ onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
297
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
298
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
299
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
300
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
301
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
302
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
303
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
304
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
305
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
306
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
307
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
308
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
309
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
310
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
311
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
312
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
313
+ onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
314
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
315
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
316
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
317
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
318
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
319
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
320
+ onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
321
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
322
+ onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
323
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
324
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
325
+ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
326
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
327
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
328
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
329
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
330
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
331
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
332
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
333
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
334
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
335
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
336
+ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
337
+ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
338
+ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
339
+ onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
340
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
341
+ autofocus: boolean;
342
+ readonly dataset: DOMStringMap;
343
+ nonce?: string;
344
+ tabIndex: number;
345
+ blur(): void;
346
+ focus(options?: FocusOptions): void;
347
+ };
348
+ };
349
+ export default _default;
350
+ //# sourceMappingURL=accented-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accented-container.d.ts","sourceRoot":"","sources":["../../src/elements/accented-container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,SAAS,CAAC;CAC1C;+BAIqB,MAAM;;iCAkEN,eAAe,GAAG,SAAS;iCAE3B,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS;gBAElC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtE5C,wBAwIE"}
@@ -0,0 +1,131 @@
1
+ import { effect } from '@preact/signals-core';
2
+ // We want Accented to not throw an error in Node, and use static imports,
3
+ // so we can't export `class extends HTMLElement` because HTMLElement is not available in Node.
4
+ export default (name) => {
5
+ const containerTemplate = document.createElement('template');
6
+ containerTemplate.innerHTML = `
7
+ <button id="trigger">⚠</button>
8
+ <dialog dir="ltr" aria-labelledby="title">
9
+ <h2 id="title">Issues</h2>
10
+ <ul id="issues"></ul>
11
+ </dialog>
12
+ `;
13
+ const issueTemplate = document.createElement('template');
14
+ issueTemplate.innerHTML = `
15
+ <li>
16
+ <a></a>
17
+ <div></div>
18
+ </li>
19
+ `;
20
+ const descriptionTemplate = document.createElement('template');
21
+ descriptionTemplate.innerHTML = `
22
+ <span></span>
23
+ <ul></ul>
24
+ `;
25
+ const stylesheet = new CSSStyleSheet();
26
+ stylesheet.replaceSync(`
27
+ :host {
28
+ position: absolute;
29
+ inset-inline-end: anchor(end);
30
+ inset-block-end: anchor(end);
31
+
32
+ /* Popover-specific stuff */
33
+ border: none;
34
+ padding: 0;
35
+ margin-inline-end: 0;
36
+ margin-block-end: 0;
37
+ }
38
+
39
+ #trigger {
40
+ box-sizing: border-box;
41
+ font-size: 1rem;
42
+ inline-size: max(32px, 2rem);
43
+ block-size: max(32px, 2rem);
44
+
45
+ /* Make it look better in forced-colors mode, */
46
+ border: 2px solid transparent;
47
+
48
+ background-color: var(--${name}-primary-color);
49
+ color: var(--${name}-secondary-color);
50
+
51
+ outline-offset: -4px;
52
+ outline-color: var(--${name}-secondary-color);
53
+
54
+ &:focus-visible {
55
+ outline-width: 2px;
56
+ outline-style: solid;
57
+ }
58
+
59
+ &:hover:not(:focus-visible) {
60
+ outline-width: 2px;
61
+ outline-style: dashed;
62
+ }
63
+ }
64
+ `);
65
+ return class AccentedContainerLocal extends HTMLElement {
66
+ #abortController;
67
+ #disposeOfEffect;
68
+ issues;
69
+ constructor() {
70
+ super();
71
+ this.attachShadow({ mode: 'open' });
72
+ const content = containerTemplate.content.cloneNode(true);
73
+ if (this.shadowRoot) {
74
+ this.shadowRoot.adoptedStyleSheets.push(stylesheet);
75
+ this.shadowRoot.append(content);
76
+ }
77
+ }
78
+ connectedCallback() {
79
+ if (this.shadowRoot) {
80
+ const { shadowRoot } = this;
81
+ const trigger = shadowRoot.getElementById('trigger');
82
+ const dialog = shadowRoot.querySelector('dialog');
83
+ this.#abortController = new AbortController();
84
+ trigger?.addEventListener('click', () => {
85
+ dialog?.showModal();
86
+ }, { signal: this.#abortController.signal });
87
+ this.#disposeOfEffect = effect(() => {
88
+ if (this.issues) {
89
+ const issues = this.issues.value;
90
+ const issuesList = shadowRoot.getElementById('issues');
91
+ if (issuesList) {
92
+ issuesList.innerHTML = '';
93
+ for (const issue of issues) {
94
+ const issueContent = issueTemplate.content.cloneNode(true);
95
+ const a = issueContent.querySelector('a');
96
+ const div = issueContent.querySelector('div');
97
+ if (a && div) {
98
+ a.textContent = issue.title;
99
+ a.href = issue.url;
100
+ const descriptionItems = issue.description.split(/\n\s*/);
101
+ const descriptionContent = descriptionTemplate.content.cloneNode(true);
102
+ const descriptionTitle = descriptionContent.querySelector('span');
103
+ const descriptionList = descriptionContent.querySelector('ul');
104
+ if (descriptionTitle && descriptionList && descriptionItems.length > 1) {
105
+ descriptionTitle.textContent = descriptionItems[0];
106
+ for (const descriptionItem of descriptionItems.slice(1)) {
107
+ const li = document.createElement('li');
108
+ li.textContent = descriptionItem;
109
+ descriptionList.appendChild(li);
110
+ }
111
+ div.appendChild(descriptionContent);
112
+ }
113
+ }
114
+ issuesList.appendChild(issueContent);
115
+ }
116
+ }
117
+ }
118
+ });
119
+ }
120
+ }
121
+ disconnectedCallback() {
122
+ if (this.#abortController) {
123
+ this.#abortController.abort();
124
+ }
125
+ if (this.#disposeOfEffect) {
126
+ this.#disposeOfEffect();
127
+ }
128
+ }
129
+ };
130
+ };
131
+ //# sourceMappingURL=accented-container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accented-container.js","sourceRoot":"","sources":["../../src/elements/accented-container.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAM9C,0EAA0E;AAC1E,+FAA+F;AAC/F,eAAe,CAAC,IAAY,EAAE,EAAE;IAC9B,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC7D,iBAAiB,CAAC,SAAS,GAAG;;;;;;GAM7B,CAAC;IAEF,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACzD,aAAa,CAAC,SAAS,GAAG;;;;;GAKzB,CAAC;IAEF,MAAM,mBAAmB,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC/D,mBAAmB,CAAC,SAAS,GAAG;;;GAG/B,CAAC;IAEF,MAAM,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;IACvC,UAAU,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;gCAsBO,IAAI;qBACf,IAAI;;;6BAGI,IAAI;;;;;;;;;;;;GAY9B,CAAC,CAAC;IAEH,OAAO,MAAM,sBAAuB,SAAQ,WAAW;QACrD,gBAAgB,CAA8B;QAE9C,gBAAgB,CAA2B;Q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AAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,oBAAoB;YAClB,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBAC1B,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;YAChC,CAAC;YACD,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBAC1B,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default function createLogger(): () => void;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,YAAY,eAenC"}
package/dist/logger.js ADDED
@@ -0,0 +1,20 @@
1
+ import { effect } from '@preact/signals-core';
2
+ import { elementsWithIssues } from './state.js';
3
+ const accentedUrl = 'https://www.npmjs.com/package/accented';
4
+ export default function createLogger() {
5
+ let firstRun = true;
6
+ return effect(() => {
7
+ if (elementsWithIssues.value.length > 0) {
8
+ console.log(`Elements with accessibility issues, identified by Accented (${accentedUrl}):\n`, elementsWithIssues.value);
9
+ }
10
+ else {
11
+ if (firstRun) {
12
+ firstRun = false;
13
+ }
14
+ else {
15
+ console.log(`No elements with accessibility issues identified by Accented (${accentedUrl}).`);
16
+ }
17
+ }
18
+ });
19
+ }
20
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,GAAG,wCAAwC,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,YAAY;IAElC,IAAI,QAAQ,GAAG,IAAI,CAAC;IAEpB,OAAO,MAAM,CAAC,GAAG,EAAE;QACjB,IAAI,kBAAkB,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxC,OAAO,CAAC,GAAG,CAAC,+DAA+D,WAAW,MAAM,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC1H,CAAC;aAAM,CAAC;YACN,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,GAAG,KAAK,CAAC;YACnB,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,iEAAiE,WAAW,IAAI,CAAC,CAAC;YAChG,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Throttle, Callback } from './types';
2
+ export default function createScanner(name: string, throttle: Required<Throttle>, callback: Callback): () => void;
3
+ //# sourceMappingURL=scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGlD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,cA6DnG"}
@@ -0,0 +1,56 @@
1
+ import axe from 'axe-core';
2
+ import TaskQueue from './task-queue.js';
3
+ import { elementsWithIssues, enabled, extendedElementsWithIssues } from './state.js';
4
+ import updateElementsWithIssues from './utils/update-elements-with-issues.js';
5
+ export default function createScanner(name, throttle, callback) {
6
+ const taskQueue = new TaskQueue(async () => {
7
+ performance.mark('axe-start');
8
+ const result = await axe.run({
9
+ elementRef: true,
10
+ // Although axe-core can perform iframe scanning, I haven't succeeded in it,
11
+ // and the docs suggest that the axe-core script should be explicitly included
12
+ // in each of the iframed documents anyway.
13
+ // It seems preferable to disallow iframe scanning and not report issues in elements within iframes
14
+ // in the case that such issues are for some reason reported by axe-core.
15
+ // A consumer of Accented can instead scan the iframed document by calling Accented initialization from that document.
16
+ iframes: false
17
+ });
18
+ const axeMeasure = performance.measure('axe', 'axe-start');
19
+ if (!enabled.value) {
20
+ return;
21
+ }
22
+ updateElementsWithIssues(extendedElementsWithIssues, result.violations, window, name);
23
+ callback({
24
+ elementsWithIssues: elementsWithIssues.value,
25
+ scanDuration: Math.round(axeMeasure.duration)
26
+ });
27
+ }, throttle);
28
+ taskQueue.add(document);
29
+ const mutationObserver = new MutationObserver(mutationList => {
30
+ const listWithoutAccentedContainers = mutationList.filter(mutationRecord => {
31
+ return !(mutationRecord.type === 'childList' &&
32
+ [...mutationRecord.addedNodes].every(node => node.nodeName === `${name}-container`.toUpperCase()) &&
33
+ [...mutationRecord.removedNodes].every(node => node.nodeName === `${name}-container`.toUpperCase()));
34
+ });
35
+ const elementsWithAccentedAttributeChanges = listWithoutAccentedContainers.reduce((nodes, mutationRecord) => {
36
+ if (mutationRecord.type === 'attributes' && mutationRecord.attributeName === `data-${name}`) {
37
+ nodes.add(mutationRecord.target);
38
+ }
39
+ return nodes;
40
+ }, new Set());
41
+ const filteredMutationList = listWithoutAccentedContainers.filter(mutationRecord => {
42
+ return !elementsWithAccentedAttributeChanges.has(mutationRecord.target);
43
+ });
44
+ taskQueue.addMultiple(filteredMutationList.map(mutationRecord => mutationRecord.target));
45
+ });
46
+ mutationObserver.observe(document, {
47
+ subtree: true,
48
+ childList: true,
49
+ attributes: true,
50
+ characterData: true
51
+ });
52
+ return () => {
53
+ mutationObserver.disconnect();
54
+ };
55
+ }
56
+ //# sourceMappingURL=scanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.js","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OA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Issues } from './types';
2
+ export declare const enabled: import("@preact/signals-core").Signal<boolean>;
3
+ export declare const extendedElementsWithIssues: import("@preact/signals-core").Signal<ExtendedElementWithIssues[]>;
4
+ export declare const elementsWithIssues: import("@preact/signals-core").ReadonlySignal<ElementWithIssues[]>;
5
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAE5E,eAAO,MAAM,OAAO,gDAAgB,CAAC;AAErC,eAAO,MAAM,0BAA0B,oEAA+C,CAAC;AAEvF,eAAO,MAAM,kBAAkB,oEAG3B,CAAC"}
package/dist/state.js ADDED
@@ -0,0 +1,8 @@
1
+ import { signal, computed } from '@preact/signals-core';
2
+ export const enabled = signal(false);
3
+ export const extendedElementsWithIssues = signal([]);
4
+ export const elementsWithIssues = computed(() => extendedElementsWithIssues.value.map(extendedElementWithIssues => ({
5
+ element: extendedElementWithIssues.element,
6
+ issues: extendedElementWithIssues.issues.value
7
+ })));
8
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAErC,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAmC,EAAE,CAAC,CAAC;AAEvF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAA2B,GAAG,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC,GAAG,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC;IAC5I,OAAO,EAAE,yBAAyB,CAAC,OAAO;IAC1C,MAAM,EAAE,yBAAyB,CAAC,MAAM,CAAC,KAAK;CAC/C,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Throttle } from './types';
2
+ type TaskCallback = () => void;
3
+ export default class TaskQueue<T> {
4
+ #private;
5
+ constructor(asyncCallback: TaskCallback, throttle: Required<Throttle>);
6
+ addMultiple(items: Array<T>): void;
7
+ add(item: T): void;
8
+ }
9
+ export {};
10
+ //# sourceMappingURL=task-queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-queue.d.ts","sourceRoot":"","sources":["../src/task-queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,KAAK,YAAY,GAAG,MAAM,IAAI,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,SAAS,CAAC,CAAC;;gBAOlB,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAmCrE,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAS3B,GAAG,CAAC,IAAI,EAAE,CAAC;CAGZ"}