accented 0.0.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +14 -0
- package/README.md +44 -187
- package/dist/accented.d.ts +8 -8
- package/dist/accented.d.ts.map +1 -1
- package/dist/accented.js +37 -30
- package/dist/accented.js.map +1 -1
- package/dist/common/tokens.d.ts +7 -0
- package/dist/common/tokens.d.ts.map +1 -0
- package/dist/common/tokens.js +8 -0
- package/dist/common/tokens.js.map +1 -0
- package/dist/constants.d.ts +2 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/dom-updater.d.ts +1 -1
- package/dist/dom-updater.d.ts.map +1 -1
- package/dist/dom-updater.js +73 -31
- package/dist/dom-updater.js.map +1 -1
- package/dist/elements/accented-dialog.d.ts +13 -10
- package/dist/elements/accented-dialog.d.ts.map +1 -1
- package/dist/elements/accented-dialog.js +110 -94
- package/dist/elements/accented-dialog.js.map +1 -1
- package/dist/elements/accented-trigger.d.ts +14 -9
- package/dist/elements/accented-trigger.d.ts.map +1 -1
- package/dist/elements/accented-trigger.js +77 -22
- package/dist/elements/accented-trigger.js.map +1 -1
- package/dist/fullscreen-listener.d.ts +2 -0
- package/dist/fullscreen-listener.d.ts.map +1 -0
- package/dist/fullscreen-listener.js +17 -0
- package/dist/fullscreen-listener.js.map +1 -0
- package/dist/intersection-observer.d.ts +1 -1
- package/dist/intersection-observer.d.ts.map +1 -1
- package/dist/intersection-observer.js +12 -6
- package/dist/intersection-observer.js.map +1 -1
- package/dist/log-and-rethrow.d.ts +1 -1
- package/dist/log-and-rethrow.d.ts.map +1 -1
- package/dist/log-and-rethrow.js +2 -3
- package/dist/log-and-rethrow.js.map +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +6 -3
- package/dist/logger.js.map +1 -1
- package/dist/register-elements.d.ts +1 -1
- package/dist/register-elements.d.ts.map +1 -1
- package/dist/register-elements.js +6 -7
- package/dist/register-elements.js.map +1 -1
- package/dist/resize-listener.d.ts +1 -1
- package/dist/resize-listener.d.ts.map +1 -1
- package/dist/resize-listener.js +3 -4
- package/dist/resize-listener.js.map +1 -1
- package/dist/scanner.d.ts +2 -2
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +76 -43
- package/dist/scanner.js.map +1 -1
- package/dist/scroll-listeners.d.ts +1 -1
- package/dist/scroll-listeners.d.ts.map +1 -1
- package/dist/scroll-listeners.js +3 -4
- package/dist/scroll-listeners.js.map +1 -1
- package/dist/state.d.ts +3 -2
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +5 -3
- package/dist/state.js.map +1 -1
- package/dist/task-queue.d.ts +4 -4
- package/dist/task-queue.d.ts.map +1 -1
- package/dist/task-queue.js +3 -2
- package/dist/task-queue.js.map +1 -1
- package/dist/types.d.ts +140 -49
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/are-elements-with-issues-equal.d.ts +3 -0
- package/dist/utils/are-elements-with-issues-equal.d.ts.map +1 -0
- package/dist/utils/are-elements-with-issues-equal.js +5 -0
- package/dist/utils/are-elements-with-issues-equal.js.map +1 -0
- package/dist/utils/are-issue-sets-equal.d.ts +2 -2
- package/dist/utils/are-issue-sets-equal.d.ts.map +1 -1
- package/dist/utils/are-issue-sets-equal.js +3 -3
- package/dist/utils/are-issue-sets-equal.js.map +1 -1
- package/dist/utils/containing-blocks.d.ts +3 -0
- package/dist/utils/containing-blocks.d.ts.map +1 -0
- package/dist/utils/containing-blocks.js +46 -0
- package/dist/utils/containing-blocks.js.map +1 -0
- package/dist/utils/contains.d.ts +2 -0
- package/dist/utils/contains.d.ts.map +1 -0
- package/dist/utils/contains.js +19 -0
- package/dist/utils/contains.js.map +1 -0
- package/dist/utils/deduplicate-nodes.d.ts +2 -0
- package/dist/utils/deduplicate-nodes.d.ts.map +1 -0
- package/dist/utils/deduplicate-nodes.js +4 -0
- package/dist/utils/deduplicate-nodes.js.map +1 -0
- package/dist/utils/deep-merge.d.ts +1 -1
- package/dist/utils/deep-merge.d.ts.map +1 -1
- package/dist/utils/deep-merge.js +8 -5
- package/dist/utils/deep-merge.js.map +1 -1
- package/dist/utils/dom-helpers.d.ts +9 -0
- package/dist/utils/dom-helpers.d.ts.map +1 -0
- package/dist/utils/dom-helpers.js +34 -0
- package/dist/utils/dom-helpers.js.map +1 -0
- package/dist/utils/ensure-non-empty.d.ts +2 -0
- package/dist/utils/ensure-non-empty.d.ts.map +1 -0
- package/dist/utils/ensure-non-empty.js +7 -0
- package/dist/utils/ensure-non-empty.js.map +1 -0
- package/dist/utils/get-element-html.d.ts +1 -1
- package/dist/utils/get-element-html.d.ts.map +1 -1
- package/dist/utils/get-element-html.js +4 -2
- package/dist/utils/get-element-html.js.map +1 -1
- package/dist/utils/get-element-position.d.ts +10 -2
- package/dist/utils/get-element-position.d.ts.map +1 -1
- package/dist/utils/get-element-position.js +64 -16
- package/dist/utils/get-element-position.js.map +1 -1
- package/dist/utils/get-parent.d.ts +2 -0
- package/dist/utils/get-parent.d.ts.map +1 -0
- package/dist/utils/get-parent.js +12 -0
- package/dist/utils/get-parent.js.map +1 -0
- package/dist/utils/get-scan-context.d.ts +3 -0
- package/dist/utils/get-scan-context.d.ts.map +1 -0
- package/dist/utils/get-scan-context.js +28 -0
- package/dist/utils/get-scan-context.js.map +1 -0
- package/dist/utils/get-scrollable-ancestors.d.ts +1 -1
- package/dist/utils/get-scrollable-ancestors.d.ts.map +1 -1
- package/dist/utils/get-scrollable-ancestors.js +10 -6
- package/dist/utils/get-scrollable-ancestors.js.map +1 -1
- package/dist/utils/is-node-in-scan-context.d.ts +3 -0
- package/dist/utils/is-node-in-scan-context.d.ts.map +1 -0
- package/dist/utils/is-node-in-scan-context.js +26 -0
- package/dist/utils/is-node-in-scan-context.js.map +1 -0
- package/dist/utils/is-non-empty.d.ts +2 -0
- package/dist/utils/is-non-empty.d.ts.map +1 -0
- package/dist/utils/is-non-empty.js +4 -0
- package/dist/utils/is-non-empty.js.map +1 -0
- package/dist/utils/normalize-context.d.ts +3 -0
- package/dist/utils/normalize-context.d.ts.map +1 -0
- package/dist/utils/normalize-context.js +59 -0
- package/dist/utils/normalize-context.js.map +1 -0
- package/dist/utils/recalculate-positions.d.ts +1 -1
- package/dist/utils/recalculate-positions.d.ts.map +1 -1
- package/dist/utils/recalculate-positions.js +5 -5
- package/dist/utils/recalculate-positions.js.map +1 -1
- package/dist/utils/recalculate-scrollable-ancestors.d.ts +1 -1
- package/dist/utils/recalculate-scrollable-ancestors.d.ts.map +1 -1
- package/dist/utils/recalculate-scrollable-ancestors.js +4 -4
- package/dist/utils/recalculate-scrollable-ancestors.js.map +1 -1
- package/dist/utils/shadow-dom-aware-mutation-observer.d.ts +10 -0
- package/dist/utils/shadow-dom-aware-mutation-observer.d.ts.map +1 -0
- package/dist/utils/shadow-dom-aware-mutation-observer.js +61 -0
- package/dist/utils/shadow-dom-aware-mutation-observer.js.map +1 -0
- package/dist/utils/supports-anchor-positioning.d.ts +1 -1
- package/dist/utils/supports-anchor-positioning.d.ts.map +1 -1
- package/dist/utils/supports-anchor-positioning.js +1 -1
- package/dist/utils/supports-anchor-positioning.js.map +1 -1
- package/dist/utils/transform-violations.d.ts +2 -2
- package/dist/utils/transform-violations.d.ts.map +1 -1
- package/dist/utils/transform-violations.js +23 -10
- package/dist/utils/transform-violations.js.map +1 -1
- package/dist/utils/update-elements-with-issues.d.ts +11 -5
- package/dist/utils/update-elements-with-issues.d.ts.map +1 -1
- package/dist/utils/update-elements-with-issues.js +56 -24
- package/dist/utils/update-elements-with-issues.js.map +1 -1
- package/dist/validate-options.d.ts +2 -2
- package/dist/validate-options.d.ts.map +1 -1
- package/dist/validate-options.js +91 -4
- package/dist/validate-options.js.map +1 -1
- package/package.json +15 -7
- package/src/accented.test.ts +2 -2
- package/src/accented.ts +45 -34
- package/src/common/tokens.ts +10 -0
- package/src/constants.ts +2 -1
- package/src/dom-updater.ts +87 -34
- package/src/elements/accented-dialog.ts +157 -122
- package/src/elements/accented-trigger.ts +119 -47
- package/src/fullscreen-listener.ts +21 -0
- package/src/intersection-observer.ts +27 -16
- package/src/log-and-rethrow.ts +2 -3
- package/src/logger.ts +14 -4
- package/src/register-elements.ts +7 -7
- package/src/resize-listener.ts +15 -11
- package/src/scanner.ts +113 -57
- package/src/scroll-listeners.ts +27 -19
- package/src/state.ts +27 -16
- package/src/task-queue.test.ts +5 -4
- package/src/task-queue.ts +8 -6
- package/src/types.ts +179 -76
- package/src/utils/are-elements-with-issues-equal.ts +11 -0
- package/src/utils/are-issue-sets-equal.test.ts +10 -6
- package/src/utils/are-issue-sets-equal.ts +8 -6
- package/src/utils/containing-blocks.ts +60 -0
- package/src/utils/contains.test.ts +54 -0
- package/src/utils/contains.ts +19 -0
- package/src/utils/deduplicate-nodes.ts +3 -0
- package/src/utils/deep-merge.test.ts +8 -1
- package/src/utils/deep-merge.ts +14 -8
- package/src/utils/dom-helpers.ts +42 -0
- package/src/utils/ensure-non-empty.ts +6 -0
- package/src/utils/get-element-html.ts +4 -2
- package/src/utils/get-element-position.ts +84 -16
- package/src/utils/get-parent.ts +14 -0
- package/src/utils/get-scan-context.test.ts +85 -0
- package/src/utils/get-scan-context.ts +36 -0
- package/src/utils/get-scrollable-ancestors.ts +15 -7
- package/src/utils/is-node-in-scan-context.test.ts +70 -0
- package/src/utils/is-node-in-scan-context.ts +29 -0
- package/src/utils/is-non-empty.ts +3 -0
- package/src/utils/normalize-context.test.ts +105 -0
- package/src/utils/normalize-context.ts +65 -0
- package/src/utils/recalculate-positions.ts +5 -5
- package/src/utils/recalculate-scrollable-ancestors.ts +4 -4
- package/src/utils/shadow-dom-aware-mutation-observer.ts +75 -0
- package/src/utils/supports-anchor-positioning.ts +3 -3
- package/src/utils/transform-violations.test.ts +28 -24
- package/src/utils/transform-violations.ts +30 -12
- package/src/utils/update-elements-with-issues.test.ts +139 -51
- package/src/utils/update-elements-with-issues.ts +123 -54
- package/src/validate-options.ts +154 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-non-empty.d.ts","sourceRoot":"","sources":["../../src/utils/is-non-empty.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAE1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-non-empty.js","sourceRoot":"","sources":["../../src/utils/is-non-empty.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAI,GAAQ;IACpC,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-context.d.ts","sourceRoot":"","sources":["../../src/utils/normalize-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAe,WAAW,EAAY,MAAM,aAAa,CAAC;AA8C/E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAkB9D"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { deduplicateNodes } from './deduplicate-nodes.js';
|
|
2
|
+
import { isNode, isNodeList } from './dom-helpers.js';
|
|
3
|
+
import { isNonEmpty } from './is-non-empty.js';
|
|
4
|
+
function recursiveSelectAll(selectors, root) {
|
|
5
|
+
const nodesOnCurrentLevel = root.querySelectorAll(selectors[0]);
|
|
6
|
+
if (selectors.length === 1) {
|
|
7
|
+
return Array.from(nodesOnCurrentLevel);
|
|
8
|
+
}
|
|
9
|
+
const restSelectors = selectors.slice(1);
|
|
10
|
+
if (!isNonEmpty(restSelectors)) {
|
|
11
|
+
throw new Error('Error: the restSelectors array must not be empty.');
|
|
12
|
+
}
|
|
13
|
+
const selected = [];
|
|
14
|
+
for (const node of nodesOnCurrentLevel) {
|
|
15
|
+
if (node.shadowRoot) {
|
|
16
|
+
selected.push(...recursiveSelectAll(restSelectors, node.shadowRoot));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return selected;
|
|
20
|
+
}
|
|
21
|
+
function selectorToNodes(selector) {
|
|
22
|
+
if (typeof selector === 'string') {
|
|
23
|
+
return recursiveSelectAll([selector], document);
|
|
24
|
+
}
|
|
25
|
+
if (isNode(selector)) {
|
|
26
|
+
return [selector];
|
|
27
|
+
}
|
|
28
|
+
return recursiveSelectAll(selector.fromShadowDom, document);
|
|
29
|
+
}
|
|
30
|
+
function contextPropToNodes(contextProp) {
|
|
31
|
+
let nodes = [];
|
|
32
|
+
if (typeof contextProp === 'object' && (Array.isArray(contextProp) || isNodeList(contextProp))) {
|
|
33
|
+
nodes = Array.from(contextProp).flatMap((item) => selectorToNodes(item));
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
nodes = selectorToNodes(contextProp);
|
|
37
|
+
}
|
|
38
|
+
return deduplicateNodes(nodes);
|
|
39
|
+
}
|
|
40
|
+
export function normalizeContext(context) {
|
|
41
|
+
let contextInclude = [];
|
|
42
|
+
let contextExclude = [];
|
|
43
|
+
if (typeof context === 'object' && ('include' in context || 'exclude' in context)) {
|
|
44
|
+
if (context.include !== undefined) {
|
|
45
|
+
contextInclude = contextPropToNodes(context.include);
|
|
46
|
+
}
|
|
47
|
+
if (context.exclude !== undefined) {
|
|
48
|
+
contextExclude = contextPropToNodes(context.exclude);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
contextInclude = contextPropToNodes(context);
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
include: contextInclude,
|
|
56
|
+
exclude: contextExclude,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=normalize-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-context.js","sourceRoot":"","sources":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
export declare function recalculatePositions(): void;
|
|
2
2
|
//# sourceMappingURL=recalculate-positions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recalculate-positions.d.ts","sourceRoot":"","sources":["../../src/utils/recalculate-positions.ts"],"names":[],"mappings":"AAOA,
|
|
1
|
+
{"version":3,"file":"recalculate-positions.d.ts","sourceRoot":"","sources":["../../src/utils/recalculate-positions.ts"],"names":[],"mappings":"AAOA,wBAAgB,oBAAoB,SAmBnC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { batch } from '@preact/signals-core';
|
|
2
|
+
import { logAndRethrow } from '../log-and-rethrow.js';
|
|
2
3
|
import { extendedElementsWithIssues } from '../state.js';
|
|
3
|
-
import getElementPosition from './get-element-position.js';
|
|
4
|
-
import logAndRethrow from '../log-and-rethrow.js';
|
|
4
|
+
import { getElementPosition } from './get-element-position.js';
|
|
5
5
|
let frameRequested = false;
|
|
6
|
-
export
|
|
6
|
+
export function recalculatePositions() {
|
|
7
7
|
if (frameRequested) {
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
@@ -12,11 +12,11 @@ export default function recalculatePositions() {
|
|
|
12
12
|
try {
|
|
13
13
|
frameRequested = false;
|
|
14
14
|
batch(() => {
|
|
15
|
-
|
|
15
|
+
for (const { element, position, visible } of extendedElementsWithIssues.value) {
|
|
16
16
|
if (visible.value && element.isConnected) {
|
|
17
17
|
position.value = getElementPosition(element, window);
|
|
18
18
|
}
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recalculate-positions.js","sourceRoot":"","sources":["../../src/utils/recalculate-positions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"recalculate-positions.js","sourceRoot":"","sources":["../../src/utils/recalculate-positions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,IAAI,cAAc,GAAG,KAAK,CAAC;AAE3B,MAAM,UAAU,oBAAoB;IAClC,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO;IACT,CAAC;IACD,cAAc,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,qBAAqB,CAAC,GAAG,EAAE;QAChC,IAAI,CAAC;YACH,cAAc,GAAG,KAAK,CAAC;YACvB,KAAK,CAAC,GAAG,EAAE;gBACT,KAAK,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,0BAA0B,CAAC,KAAK,EAAE,CAAC;oBAC9E,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;wBACzC,QAAQ,CAAC,KAAK,GAAG,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBACvD,CAAC;gBACH,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function recalculateScrollableAncestors(): void;
|
|
2
2
|
//# sourceMappingURL=recalculate-scrollable-ancestors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recalculate-scrollable-ancestors.d.ts","sourceRoot":"","sources":["../../src/utils/recalculate-scrollable-ancestors.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"recalculate-scrollable-ancestors.d.ts","sourceRoot":"","sources":["../../src/utils/recalculate-scrollable-ancestors.ts"],"names":[],"mappings":"AAIA,wBAAgB,8BAA8B,SAQ7C"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { batch } from '@preact/signals-core';
|
|
2
2
|
import { extendedElementsWithIssues } from '../state.js';
|
|
3
|
-
import getScrollableAncestors from './get-scrollable-ancestors.js';
|
|
4
|
-
export
|
|
3
|
+
import { getScrollableAncestors } from './get-scrollable-ancestors.js';
|
|
4
|
+
export function recalculateScrollableAncestors() {
|
|
5
5
|
batch(() => {
|
|
6
|
-
|
|
6
|
+
for (const { element, scrollableAncestors } of extendedElementsWithIssues.value) {
|
|
7
7
|
if (element.isConnected) {
|
|
8
8
|
scrollableAncestors.value = getScrollableAncestors(element, window);
|
|
9
9
|
}
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=recalculate-scrollable-ancestors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recalculate-scrollable-ancestors.js","sourceRoot":"","sources":["../../src/utils/recalculate-scrollable-ancestors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,sBAAsB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"recalculate-scrollable-ancestors.js","sourceRoot":"","sources":["../../src/utils/recalculate-scrollable-ancestors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,MAAM,UAAU,8BAA8B;IAC5C,KAAK,CAAC,GAAG,EAAE;QACT,KAAK,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAE,IAAI,0BAA0B,CAAC,KAAK,EAAE,CAAC;YAChF,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;gBACxB,mBAAmB,CAAC,KAAK,GAAG,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACtE,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function createShadowDOMAwareMutationObserver(name: string, callback: MutationCallback): {
|
|
2
|
+
"__#4@#shadowRoots": Set<unknown>;
|
|
3
|
+
"__#4@#options": MutationObserverInit | undefined;
|
|
4
|
+
observe(target: Node, options?: MutationObserverInit): void;
|
|
5
|
+
disconnect(): void;
|
|
6
|
+
"__#4@#observeShadowRoots": (elements: Array<Element | Document | DocumentFragment>) => void;
|
|
7
|
+
"__#4@#deleteShadowRoots": (elements: Array<Element | Document | DocumentFragment>) => void;
|
|
8
|
+
takeRecords(): MutationRecord[];
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=shadow-dom-aware-mutation-observer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadow-dom-aware-mutation-observer.d.ts","sourceRoot":"","sources":["../../src/utils/shadow-dom-aware-mutation-observer.ts"],"names":[],"mappings":"AAGA,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB;;qBAI/E,oBAAoB,GAAG,SAAS;oBA2BjB,IAAI,YAAY,oBAAoB,GAAG,IAAI;kBAQ7C,IAAI;iCAKJ,UAAU,KAAK,CAAC,OAAO,GAAG,QAAQ,GAAG,gBAAgB,CAAC;gCAcvD,UAAU,KAAK,CAAC,OAAO,GAAG,QAAQ,GAAG,gBAAgB,CAAC;;EAa/E"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { getAccentedElementNames } from '../constants.js';
|
|
2
|
+
import { isDocument, isDocumentFragment, isElement } from './dom-helpers.js';
|
|
3
|
+
export function createShadowDOMAwareMutationObserver(name, callback) {
|
|
4
|
+
class ShadowDOMAwareMutationObserver extends MutationObserver {
|
|
5
|
+
#shadowRoots = new Set();
|
|
6
|
+
#options;
|
|
7
|
+
constructor(callback) {
|
|
8
|
+
super((mutations, observer) => {
|
|
9
|
+
const accentedElementNames = getAccentedElementNames(name);
|
|
10
|
+
const childListMutations = mutations.filter((mutation) => mutation.type === 'childList');
|
|
11
|
+
const newElements = childListMutations
|
|
12
|
+
.flatMap((mutation) => [...mutation.addedNodes])
|
|
13
|
+
.filter((node) => isElement(node))
|
|
14
|
+
.filter((node) => !accentedElementNames.includes(node.nodeName.toLowerCase()));
|
|
15
|
+
this.#observeShadowRoots(newElements);
|
|
16
|
+
const removedElements = childListMutations
|
|
17
|
+
.flatMap((mutation) => [...mutation.removedNodes])
|
|
18
|
+
.filter((node) => isElement(node))
|
|
19
|
+
.filter((node) => !accentedElementNames.includes(node.nodeName.toLowerCase()));
|
|
20
|
+
// Mutation observer has no "unobserve" method, so we're simply deleting
|
|
21
|
+
// the elements from the set of shadow roots.
|
|
22
|
+
this.#deleteShadowRoots(removedElements);
|
|
23
|
+
callback(mutations, observer);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
observe(target, options) {
|
|
27
|
+
this.#options ??= options;
|
|
28
|
+
if (isElement(target) || isDocument(target) || isDocumentFragment(target)) {
|
|
29
|
+
this.#observeShadowRoots([target]);
|
|
30
|
+
}
|
|
31
|
+
super.observe(target, options);
|
|
32
|
+
}
|
|
33
|
+
disconnect() {
|
|
34
|
+
this.#shadowRoots.clear();
|
|
35
|
+
super.disconnect();
|
|
36
|
+
}
|
|
37
|
+
#observeShadowRoots = (elements) => {
|
|
38
|
+
const shadowRoots = elements
|
|
39
|
+
.flatMap((element) => [...element.querySelectorAll('*')])
|
|
40
|
+
.filter((element) => element.shadowRoot)
|
|
41
|
+
.map((element) => element.shadowRoot);
|
|
42
|
+
for (const shadowRoot of shadowRoots) {
|
|
43
|
+
if (shadowRoot) {
|
|
44
|
+
this.#shadowRoots.add(shadowRoot);
|
|
45
|
+
this.observe(shadowRoot, this.#options);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
#deleteShadowRoots = (elements) => {
|
|
50
|
+
const shadowRoots = elements
|
|
51
|
+
.flatMap((element) => [...element.querySelectorAll('*')])
|
|
52
|
+
.filter((element) => element.shadowRoot)
|
|
53
|
+
.map((element) => element.shadowRoot);
|
|
54
|
+
for (const shadowRoot of shadowRoots) {
|
|
55
|
+
this.#shadowRoots.delete(shadowRoot);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return new ShadowDOMAwareMutationObserver(callback);
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=shadow-dom-aware-mutation-observer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadow-dom-aware-mutation-observer.js","sourceRoot":"","sources":["../../src/utils/shadow-dom-aware-mutation-observer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7E,MAAM,UAAU,oCAAoC,CAAC,IAAY,EAAE,QAA0B;IAC3F,MAAM,8BAA+B,SAAQ,gBAAgB;QAC3D,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;QAEzB,QAAQ,CAAmC;QAE3C,YAAY,QAA0B;YACpC,KAAK,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE;gBAC5B,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;gBAC3D,MAAM,kBAAkB,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC;gBAEzF,MAAM,WAAW,GAAG,k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AQ,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type WindowWithCSS = Window & {
|
|
2
2
|
CSS: typeof CSS;
|
|
3
3
|
};
|
|
4
|
-
export
|
|
4
|
+
export declare function supportsAnchorPositioning(win: WindowWithCSS): boolean;
|
|
5
5
|
export {};
|
|
6
6
|
//# sourceMappingURL=supports-anchor-positioning.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supports-anchor-positioning.d.ts","sourceRoot":"","sources":["../../src/utils/supports-anchor-positioning.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG,MAAM,GAAG;IAC5B,GAAG,EAAE,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"supports-anchor-positioning.d.ts","sourceRoot":"","sources":["../../src/utils/supports-anchor-positioning.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG,MAAM,GAAG;IAC5B,GAAG,EAAE,OAAO,GAAG,CAAC;CACjB,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,aAAa,WAE3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supports-anchor-positioning.js","sourceRoot":"","sources":["../../src/utils/supports-anchor-positioning.ts"],"names":[],"mappings":"AAIA,MAAM,
|
|
1
|
+
{"version":3,"file":"supports-anchor-positioning.js","sourceRoot":"","sources":["../../src/utils/supports-anchor-positioning.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,yBAAyB,CAAC,GAAkB;IAC1D,OAAO,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AxeResults } from 'axe-core';
|
|
2
|
-
import type { ElementWithIssues } from '../types';
|
|
3
|
-
export
|
|
2
|
+
import type { ElementWithIssues } from '../types.ts';
|
|
3
|
+
export declare function transformViolations(violations: typeof AxeResults.violations, name: string): ElementWithIssues[];
|
|
4
4
|
//# sourceMappingURL=transform-violations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-violations.d.ts","sourceRoot":"","sources":["../../src/utils/transform-violations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"transform-violations.d.ts","sourceRoot":"","sources":["../../src/utils/transform-violations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAS,MAAM,aAAa,CAAC;AA0B5D,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,OAAO,UAAU,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,uBA8CzF"}
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
+
// This is a list of axe-core violations (their ids) that may be flagged by axe-core
|
|
2
|
+
// as false positives if an Accented trigger is a descendant of the element with the issue.
|
|
3
|
+
const violationsAffectedByAccentedTriggers = [
|
|
4
|
+
'aria-hidden-focus',
|
|
5
|
+
'aria-text',
|
|
6
|
+
'definition-list',
|
|
7
|
+
'label-content-name-mismatch',
|
|
8
|
+
'list',
|
|
9
|
+
'nested-interactive',
|
|
10
|
+
'scrollable-region-focusable', // The Accented trigger might make the content grow such that scrolling is required.
|
|
11
|
+
];
|
|
12
|
+
function maybeCausedByAccented(violationId, element, name) {
|
|
13
|
+
return (violationsAffectedByAccentedTriggers.includes(violationId) &&
|
|
14
|
+
Boolean(element.querySelector(`${name}-trigger`)));
|
|
15
|
+
}
|
|
1
16
|
function impactCompare(a, b) {
|
|
2
17
|
const impactOrder = [null, 'minor', 'moderate', 'serious', 'critical'];
|
|
3
18
|
return impactOrder.indexOf(a) - impactOrder.indexOf(b);
|
|
4
19
|
}
|
|
5
|
-
export
|
|
20
|
+
export function transformViolations(violations, name) {
|
|
6
21
|
const elementsWithIssues = [];
|
|
7
22
|
for (const violation of violations) {
|
|
8
23
|
for (const node of violation.nodes) {
|
|
@@ -14,26 +29,24 @@ export default function transformViolations(violations) {
|
|
|
14
29
|
// in the case that such issues are for some reason reported by axe-core.
|
|
15
30
|
// A consumer of Accented can instead scan the iframed document by calling Accented initialization from that document.
|
|
16
31
|
const isInIframe = target.length > 1;
|
|
17
|
-
|
|
18
|
-
// Until then, we don’t want such elements to be added to the set.
|
|
19
|
-
const isInShadowDOM = Array.isArray(target[0]);
|
|
20
|
-
if (element && !isInIframe && !isInShadowDOM) {
|
|
32
|
+
if (element && !isInIframe && !maybeCausedByAccented(violation.id, element, name)) {
|
|
21
33
|
const issue = {
|
|
22
34
|
id: violation.id,
|
|
23
35
|
title: violation.help,
|
|
24
36
|
description: node.failureSummary ?? violation.description,
|
|
25
37
|
url: violation.helpUrl,
|
|
26
|
-
impact: violation.impact ?? null
|
|
38
|
+
impact: violation.impact ?? null,
|
|
27
39
|
};
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
40
|
+
const existingElement = elementsWithIssues.find((elementWithIssues) => elementWithIssues.element === element);
|
|
41
|
+
if (existingElement === undefined) {
|
|
30
42
|
elementsWithIssues.push({
|
|
31
43
|
element,
|
|
32
|
-
|
|
44
|
+
rootNode: element.getRootNode(),
|
|
45
|
+
issues: [issue],
|
|
33
46
|
});
|
|
34
47
|
}
|
|
35
48
|
else {
|
|
36
|
-
|
|
49
|
+
existingElement.issues.push(issue);
|
|
37
50
|
}
|
|
38
51
|
}
|
|
39
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-violations.js","sourceRoot":"","sources":["../../src/utils/transform-violations.ts"],"names":[],"mappings":"AAGA,SAAS,aAAa,CAAC,CAAc,EAAE,CAAc;IACnD,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IACvE,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,
|
|
1
|
+
{"version":3,"file":"transform-violations.js","sourceRoot":"","sources":["../../src/utils/transform-violations.ts"],"names":[],"mappings":"AAGA,oFAAoF;AACpF,2FAA2F;AAC3F,MAAM,oCAAoC,GAAG;IAC3C,mBAAmB;IACnB,WAAW;IACX,iBAAiB;IACjB,6BAA6B;IAC7B,MAAM;IACN,oBAAoB;IACpB,6BAA6B,EAAE,oFAAoF;CACpH,CAAC;AAEF,SAAS,qBAAqB,CAAC,WAAmB,EAAE,OAAoB,EAAE,IAAY;IACpF,OAAO,CACL,oCAAoC,CAAC,QAAQ,CAAC,WAAW,CAAC;QAC1D,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,UAAU,CAAC,CAAC,CAClD,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,CAAc,EAAE,CAAc;IACnD,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IACvE,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,UAAwC,EAAE,IAAY;IACxF,MAAM,kBAAkB,GAA6B,EAAE,CAAC;IAExD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;YACnC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YAEjC,4EAA4E;YAC5E,8EAA8E;YAC9E,2CAA2C;YAC3C,mGAAmG;YACnG,yEAAyE;YACzE,sHAAsH;YACtH,MAAM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B,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import type { AxeResults } from 'axe-core';
|
|
2
1
|
import type { Signal } from '@preact/signals-core';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import type { AxeResults } from 'axe-core';
|
|
3
|
+
import type { ExtendedElementWithIssues, ScanContext } from '../types.ts';
|
|
4
|
+
export declare function updateElementsWithIssues({ extendedElementsWithIssues, scanContext, violations, win, name, }: {
|
|
5
|
+
extendedElementsWithIssues: Signal<Array<ExtendedElementWithIssues>>;
|
|
6
|
+
scanContext: ScanContext;
|
|
7
|
+
violations: typeof AxeResults.violations;
|
|
8
|
+
win: Window & {
|
|
9
|
+
CSS: typeof CSS;
|
|
10
|
+
};
|
|
11
|
+
name: string;
|
|
12
|
+
}): void;
|
|
7
13
|
//# sourceMappingURL=update-elements-with-issues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-elements-with-issues.d.ts","sourceRoot":"","sources":["../../src/utils/update-elements-with-issues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"update-elements-with-issues.d.ts","sourceRoot":"","sources":["../../src/utils/update-elements-with-issues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA6B1E,wBAAgB,wBAAwB,CAAC,EACvC,0BAA0B,EAC1B,WAAW,EACX,UAAU,EACV,GAAG,EACH,IAAI,GACL,EAAE;IACD,0BAA0B,EAAE,MAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC;IACrE,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,OAAO,UAAU,CAAC,UAAU,CAAC;IACzC,GAAG,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,OAAO,GAAG,CAAA;KAAE,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;CACd,QAiGA"}
|
|
@@ -1,37 +1,63 @@
|
|
|
1
1
|
import { batch, signal } from '@preact/signals-core';
|
|
2
|
-
import
|
|
3
|
-
import areIssueSetsEqual from './are-issue-sets-equal.js';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import { areElementsWithIssuesEqual } from './are-elements-with-issues-equal.js';
|
|
3
|
+
import { areIssueSetsEqual } from './are-issue-sets-equal.js';
|
|
4
|
+
import { isSvgElement } from './dom-helpers.js';
|
|
5
|
+
import { getElementPosition } from './get-element-position.js';
|
|
6
|
+
import { getParent } from './get-parent.js';
|
|
7
|
+
import { getScrollableAncestors } from './get-scrollable-ancestors.js';
|
|
8
|
+
import { isNodeInScanContext } from './is-node-in-scan-context.js';
|
|
9
|
+
import { supportsAnchorPositioning } from './supports-anchor-positioning.js';
|
|
10
|
+
import { transformViolations } from './transform-violations.js';
|
|
11
|
+
function shouldSkipRender(element) {
|
|
12
|
+
// Skip rendering if the element is inside an SVG:
|
|
13
|
+
// https://github.com/pomerantsev/accented/issues/62
|
|
14
|
+
const parent = getParent(element);
|
|
15
|
+
const isInsideSvg = Boolean(parent && isSvgElement(parent));
|
|
16
|
+
// Some issues, such as meta-viewport, are on <head> descendants,
|
|
17
|
+
// but since <head> is never rendered, we don't want to output anything
|
|
18
|
+
// for those in the DOM.
|
|
19
|
+
// We're not anticipating the use of shadow DOM in <head>,
|
|
20
|
+
// so the use of .closest() should be fine.
|
|
21
|
+
const isInsideHead = element.closest('head') !== null;
|
|
22
|
+
return isInsideSvg || isInsideHead;
|
|
23
|
+
}
|
|
7
24
|
let count = 0;
|
|
8
|
-
export
|
|
9
|
-
const updatedElementsWithIssues = transformViolations(violations);
|
|
25
|
+
export function updateElementsWithIssues({ extendedElementsWithIssues, scanContext, violations, win, name, }) {
|
|
26
|
+
const updatedElementsWithIssues = transformViolations(violations, name);
|
|
10
27
|
batch(() => {
|
|
11
28
|
for (const updatedElementWithIssues of updatedElementsWithIssues) {
|
|
12
|
-
const existingElementIndex = extendedElementsWithIssues.value.findIndex(extendedElementWithIssues => extendedElementWithIssues
|
|
13
|
-
if (existingElementIndex > -1 &&
|
|
14
|
-
extendedElementsWithIssues.value[existingElementIndex]
|
|
29
|
+
const existingElementIndex = extendedElementsWithIssues.value.findIndex((extendedElementWithIssues) => areElementsWithIssuesEqual(extendedElementWithIssues, updatedElementWithIssues));
|
|
30
|
+
if (existingElementIndex > -1 &&
|
|
31
|
+
extendedElementsWithIssues.value[existingElementIndex] &&
|
|
32
|
+
!areIssueSetsEqual(extendedElementsWithIssues.value[existingElementIndex].issues.value, updatedElementWithIssues.issues)) {
|
|
33
|
+
extendedElementsWithIssues.value[existingElementIndex].issues.value =
|
|
34
|
+
updatedElementWithIssues.issues;
|
|
15
35
|
}
|
|
16
36
|
}
|
|
17
|
-
const addedElementsWithIssues = updatedElementsWithIssues.filter(updatedElementWithIssues => {
|
|
18
|
-
return !extendedElementsWithIssues.value.some(extendedElementWithIssues => extendedElementWithIssues
|
|
37
|
+
const addedElementsWithIssues = updatedElementsWithIssues.filter((updatedElementWithIssues) => {
|
|
38
|
+
return !extendedElementsWithIssues.value.some((extendedElementWithIssues) => areElementsWithIssuesEqual(extendedElementWithIssues, updatedElementWithIssues));
|
|
19
39
|
});
|
|
20
|
-
|
|
21
|
-
|
|
40
|
+
// Only consider an element to be removed in two cases:
|
|
41
|
+
// 1. It has been removed from the DOM.
|
|
42
|
+
// 2. It is within the scan context, but not among updatedElementsWithIssues.
|
|
43
|
+
const removedElementsWithIssues = extendedElementsWithIssues.value.filter((extendedElementWithIssues) => {
|
|
44
|
+
const isConnected = extendedElementWithIssues.element.isConnected;
|
|
45
|
+
const hasNoMoreIssues = isNodeInScanContext(extendedElementWithIssues.element, scanContext) &&
|
|
46
|
+
!updatedElementsWithIssues.some((updatedElementWithIssues) => areElementsWithIssuesEqual(updatedElementWithIssues, extendedElementWithIssues));
|
|
47
|
+
return !isConnected || hasNoMoreIssues;
|
|
22
48
|
});
|
|
23
49
|
if (addedElementsWithIssues.length > 0 || removedElementsWithIssues.length > 0) {
|
|
24
50
|
extendedElementsWithIssues.value = [...extendedElementsWithIssues.value]
|
|
25
|
-
.filter(extendedElementWithIssues => {
|
|
26
|
-
return !removedElementsWithIssues.some(removedElementWithIssues => removedElementWithIssues
|
|
51
|
+
.filter((extendedElementWithIssues) => {
|
|
52
|
+
return !removedElementsWithIssues.some((removedElementWithIssues) => areElementsWithIssuesEqual(removedElementWithIssues, extendedElementWithIssues));
|
|
27
53
|
})
|
|
28
54
|
.concat(addedElementsWithIssues
|
|
29
|
-
.filter(addedElementWithIssues => addedElementWithIssues.element.isConnected)
|
|
30
|
-
.map(addedElementWithIssues => {
|
|
55
|
+
.filter((addedElementWithIssues) => addedElementWithIssues.element.isConnected)
|
|
56
|
+
.map((addedElementWithIssues) => {
|
|
31
57
|
const id = count++;
|
|
32
58
|
const trigger = win.document.createElement(`${name}-trigger`);
|
|
33
|
-
const elementZIndex = parseInt(win.getComputedStyle(addedElementWithIssues.element).zIndex, 10);
|
|
34
|
-
if (!isNaN(elementZIndex)) {
|
|
59
|
+
const elementZIndex = Number.parseInt(win.getComputedStyle(addedElementWithIssues.element).zIndex, 10);
|
|
60
|
+
if (!Number.isNaN(elementZIndex)) {
|
|
35
61
|
trigger.style.setProperty('z-index', (elementZIndex + 1).toString(), 'important');
|
|
36
62
|
}
|
|
37
63
|
trigger.style.setProperty('position-anchor', `--${name}-anchor-${id}`, 'important');
|
|
@@ -42,20 +68,26 @@ export default function updateElementsWithIssues(extendedElementsWithIssues, vio
|
|
|
42
68
|
trigger.position = signal(position);
|
|
43
69
|
trigger.visible = signal(true);
|
|
44
70
|
trigger.element = addedElementWithIssues.element;
|
|
45
|
-
const scrollableAncestors = supportsAnchorPositioning(win)
|
|
46
|
-
new Set()
|
|
47
|
-
getScrollableAncestors(addedElementWithIssues.element, win);
|
|
71
|
+
const scrollableAncestors = supportsAnchorPositioning(win)
|
|
72
|
+
? new Set()
|
|
73
|
+
: getScrollableAncestors(addedElementWithIssues.element, win);
|
|
48
74
|
const issues = signal(addedElementWithIssues.issues);
|
|
49
75
|
accentedDialog.issues = issues;
|
|
50
76
|
accentedDialog.element = addedElementWithIssues.element;
|
|
51
77
|
return {
|
|
52
78
|
id,
|
|
53
79
|
element: addedElementWithIssues.element,
|
|
80
|
+
skipRender: shouldSkipRender(addedElementWithIssues.element),
|
|
81
|
+
rootNode: addedElementWithIssues.rootNode,
|
|
54
82
|
visible: trigger.visible,
|
|
55
83
|
position: trigger.position,
|
|
56
84
|
scrollableAncestors: signal(scrollableAncestors),
|
|
85
|
+
anchorNameValue: addedElementWithIssues.element.style.getPropertyValue('anchor-name') ||
|
|
86
|
+
win
|
|
87
|
+
.getComputedStyle(addedElementWithIssues.element)
|
|
88
|
+
.getPropertyValue('anchor-name'),
|
|
57
89
|
trigger,
|
|
58
|
-
issues
|
|
90
|
+
issues,
|
|
59
91
|
};
|
|
60
92
|
}));
|
|
61
93
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-elements-with-issues.js","sourceRoot":"","sources":["../../src/utils/update-elements-with-issues.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-elements-with-issues.js","sourceRoot":"","sources":["../../src/utils/update-elements-with-issues.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAKrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,SAAS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AC;gBAC/B,OAAO,CAAC,OAAO,GAAG,sBAAsB,CAAC,OAAO,CAAC;gBACjD,MAAM,mBAAmB,GAAG,yBAAyB,CAAC,GAAG,CAAC;oBACxD,CAAC,CAAC,IAAI,GAAG,EAAe;oBACxB,CAAC,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBAChE,MAAM,MAAM,GAAG,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;gBACrD,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC;gBAC/B,cAAc,CAAC,OAAO,GAAG,sBAAsB,CAAC,OAAO,CAAC;gBACxD,OAAO;oBACL,EAAE;oBACF,OAAO,EAAE,sBAAsB,CAAC,OAAO;oBACvC,UAAU,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,OAAO,CAAC;oBAC5D,QAAQ,EAAE,sBAAsB,CAAC,QAAQ;oBACzC,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,mBAAmB,EAAE,MAAM,CAAC,mBAAmB,CAAC;oBAChD,eAAe,EACb,sBAAsB,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;wBACpE,GAAG;6BACA,gBAAgB,CAAC,sBAAsB,CAAC,OAAO,CAAC;6BAChD,gBAAgB,CAAC,aAAa,CAAC;oBACpC,OAAO;oBACP,MAAM;iBACP,CAAC;YACJ,CAAC,CAAC,CACL,CAAC;QACN,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { AccentedOptions } from './types';
|
|
2
|
-
export
|
|
1
|
+
import type { AccentedOptions } from './types.ts';
|
|
2
|
+
export declare function validateOptions(options: AccentedOptions): void;
|
|
3
3
|
//# sourceMappingURL=validate-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-options.d.ts","sourceRoot":"","sources":["../src/validate-options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate-options.d.ts","sourceRoot":"","sources":["../src/validate-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EAMhB,MAAM,YAAY,CAAC;AA+GpB,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,QAgEvD"}
|