@selenium/atoms 4.52.0 → 4.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +56 -0
  2. package/dist/index.d.ts +4 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +2 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/typescript/accessibility-snapshot-wire.d.ts +4 -0
  7. package/dist/typescript/accessibility-snapshot-wire.d.ts.map +1 -0
  8. package/dist/typescript/accessibility-snapshot-wire.js +18 -0
  9. package/dist/typescript/accessibility-snapshot-wire.js.map +1 -0
  10. package/dist/typescript/accessibility-snapshot.d.ts +3 -0
  11. package/dist/typescript/accessibility-snapshot.d.ts.map +1 -0
  12. package/dist/typescript/accessibility-snapshot.js +18 -0
  13. package/dist/typescript/accessibility-snapshot.js.map +1 -0
  14. package/dist/typescript/core/accessibility/accname.d.ts +6 -0
  15. package/dist/typescript/core/accessibility/accname.d.ts.map +1 -0
  16. package/dist/typescript/core/accessibility/accname.js +537 -0
  17. package/dist/typescript/core/accessibility/accname.js.map +1 -0
  18. package/dist/typescript/core/accessibility/context.d.ts +43 -0
  19. package/dist/typescript/core/accessibility/context.d.ts.map +1 -0
  20. package/dist/typescript/core/accessibility/context.js +49 -0
  21. package/dist/typescript/core/accessibility/context.js.map +1 -0
  22. package/dist/typescript/core/accessibility/hidden.d.ts +39 -0
  23. package/dist/typescript/core/accessibility/hidden.d.ts.map +1 -0
  24. package/dist/typescript/core/accessibility/hidden.js +216 -0
  25. package/dist/typescript/core/accessibility/hidden.js.map +1 -0
  26. package/dist/typescript/core/accessibility/roles.d.ts +28 -0
  27. package/dist/typescript/core/accessibility/roles.d.ts.map +1 -0
  28. package/dist/typescript/core/accessibility/roles.js +381 -0
  29. package/dist/typescript/core/accessibility/roles.js.map +1 -0
  30. package/dist/typescript/core/accessibility/snapshot.d.ts +13 -0
  31. package/dist/typescript/core/accessibility/snapshot.d.ts.map +1 -0
  32. package/dist/typescript/core/accessibility/snapshot.js +55 -0
  33. package/dist/typescript/core/accessibility/snapshot.js.map +1 -0
  34. package/dist/typescript/core/accessibility/states.d.ts +18 -0
  35. package/dist/typescript/core/accessibility/states.d.ts.map +1 -0
  36. package/dist/typescript/core/accessibility/states.js +215 -0
  37. package/dist/typescript/core/accessibility/states.js.map +1 -0
  38. package/dist/typescript/core/accessibility/tree.d.ts +10 -0
  39. package/dist/typescript/core/accessibility/tree.d.ts.map +1 -0
  40. package/dist/typescript/core/accessibility/tree.js +261 -0
  41. package/dist/typescript/core/accessibility/tree.js.map +1 -0
  42. package/dist/typescript/core/accessibility/types.d.ts +30 -0
  43. package/dist/typescript/core/accessibility/types.d.ts.map +1 -0
  44. package/dist/typescript/core/accessibility/types.js +18 -0
  45. package/dist/typescript/core/accessibility/types.js.map +1 -0
  46. package/dist/typescript/core/accessibility/value.d.ts +4 -0
  47. package/dist/typescript/core/accessibility/value.d.ts.map +1 -0
  48. package/dist/typescript/core/accessibility/value.js +83 -0
  49. package/dist/typescript/core/accessibility/value.js.map +1 -0
  50. package/dist/typescript/core/accessibility/wire.d.ts +57 -0
  51. package/dist/typescript/core/accessibility/wire.d.ts.map +1 -0
  52. package/dist/typescript/core/accessibility/wire.js +72 -0
  53. package/dist/typescript/core/accessibility/wire.js.map +1 -0
  54. package/index.ts +4 -0
  55. package/package.json +15 -1
  56. package/typescript/accessibility-snapshot-wire.ts +20 -0
  57. package/typescript/accessibility-snapshot.ts +21 -0
  58. package/typescript/core/accessibility/accname.ts +587 -0
  59. package/typescript/core/accessibility/context.ts +116 -0
  60. package/typescript/core/accessibility/hidden.ts +242 -0
  61. package/typescript/core/accessibility/roles.ts +410 -0
  62. package/typescript/core/accessibility/snapshot.ts +61 -0
  63. package/typescript/core/accessibility/states.ts +233 -0
  64. package/typescript/core/accessibility/tree.ts +306 -0
  65. package/typescript/core/accessibility/types.ts +52 -0
  66. package/typescript/core/accessibility/value.ts +89 -0
  67. package/typescript/core/accessibility/wire.ts +123 -0
@@ -0,0 +1,83 @@
1
+ // Licensed to the Software Freedom Conservancy (SFC) under one
2
+ // or more contributor license agreements. See the NOTICE file
3
+ // distributed with this work for additional information
4
+ // regarding copyright ownership. The SFC licenses this file
5
+ // to you under the Apache License, Version 2.0 (the
6
+ // "License"); you may not use this file except in compliance
7
+ // with the License. You may obtain a copy of the License at
8
+ //
9
+ // http://www.apache.org/licenses/LICENSE-2.0
10
+ //
11
+ // Unless required by applicable law or agreed to in writing,
12
+ // software distributed under the License is distributed on an
13
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ // KIND, either express or implied. See the License for the
15
+ // specific language governing permissions and limitations
16
+ // under the License.
17
+ // Values of embedded controls, as accname step 2E reads them when a control
18
+ // sits inside something whose name is being computed. The states slice
19
+ // reuses this for the `value` field.
20
+ const TEXT_ROLES = new Set(['textbox', 'searchbox']);
21
+ const SELECTION_ROLES = new Set(['combobox', 'listbox']);
22
+ const RANGE_ROLES = new Set(['meter', 'progressbar', 'scrollbar', 'slider', 'spinbutton']);
23
+ export function isEmbeddedControl(role) {
24
+ return TEXT_ROLES.has(role) || SELECTION_ROLES.has(role) || RANGE_ROLES.has(role);
25
+ }
26
+ function selectedOptionsText(select) {
27
+ const texts = [];
28
+ for (let i = 0; i < select.options.length; i++) {
29
+ const option = select.options[i];
30
+ if (option.selected) {
31
+ texts.push(option.label || option.text);
32
+ }
33
+ }
34
+ return texts.join(' ');
35
+ }
36
+ // What the user sees: innerText follows CSS (display: none, visibility) where
37
+ // textContent would include hidden descendants.
38
+ function renderedText(element) {
39
+ const text = element.innerText;
40
+ return typeof text === 'string' ? text : element.textContent || '';
41
+ }
42
+ // A listbox built from ARIA: its selected options, in document order.
43
+ function selectedAriaOptions(listbox) {
44
+ const selected = listbox.querySelectorAll('[aria-selected="true"]');
45
+ const texts = [];
46
+ for (let i = 0; i < selected.length; i++) {
47
+ texts.push(renderedText(selected[i]));
48
+ }
49
+ return texts.join(' ');
50
+ }
51
+ /** The current value of an embedded control, or null when the role has none. */
52
+ export function embeddedValue(element, role) {
53
+ if (RANGE_ROLES.has(role)) {
54
+ const text = element.getAttribute('aria-valuetext');
55
+ if (text !== null && text.trim() !== '') {
56
+ return text.trim();
57
+ }
58
+ const now = element.getAttribute('aria-valuenow');
59
+ if (now !== null) {
60
+ return now.trim();
61
+ }
62
+ return 'value' in element ? String(element.value) : null;
63
+ }
64
+ if (TEXT_ROLES.has(role) || SELECTION_ROLES.has(role)) {
65
+ if (element.localName === 'select') {
66
+ return selectedOptionsText(element);
67
+ }
68
+ if ('value' in element && typeof element.value === 'string') {
69
+ const value = element.value;
70
+ // A password is masked one bullet per character, as Chromium's
71
+ // accessibility tree exposes it: snapshots end up in logs and reports.
72
+ return element.localName === 'input' && element.type === 'password'
73
+ ? '\u2022'.repeat(value.length)
74
+ : value;
75
+ }
76
+ if (role === 'listbox') {
77
+ return selectedAriaOptions(element);
78
+ }
79
+ return renderedText(element);
80
+ }
81
+ return null;
82
+ }
83
+ //# sourceMappingURL=value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../typescript/core/accessibility/value.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,4EAA4E;AAC5E,uEAAuE;AACvE,qCAAqC;AAErC,MAAM,UAAU,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAA;AACzE,MAAM,eAAe,GAAwB,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAA;AAC7E,MAAM,WAAW,G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O,IAAK,OAA4B,CAAC,IAAI,KAAK,UAAU;gBACvF,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;gBAC/B,CAAC,CAAC,KAAK,CAAA;QACX,CAAC;QACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAA;QACrC,CAAC;QACD,OAAO,YAAY,CAAC,OAAO,CAAC,CAAA;IAC9B,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -0,0 +1,57 @@
1
+ import type { AccessibilityNode, SnapshotOptions, StateValue } from './types.js';
2
+ /**
3
+ * A node as the language bindings receive it: the same fields as
4
+ * `AccessibilityNode`, with every reference replaced by an index into the
5
+ * arrays that travel beside the JSON text.
6
+ */
7
+ export interface WireNode {
8
+ role: string;
9
+ name: string;
10
+ description: string;
11
+ value?: string;
12
+ url?: string;
13
+ states: Record<string, StateValue>;
14
+ /** Index into `WireSnapshot.elements`; absent for text leaves. */
15
+ element?: number;
16
+ /** Index into `WireSnapshot.windows`, on a frame node whose frame has a content window. */
17
+ frame?: number;
18
+ children: WireNode[];
19
+ }
20
+ /**
21
+ * The shape the bindings fetch over WebDriver BiDi. The tree travels as one
22
+ * JSON string, so a binding parses it with its own JSON library instead of
23
+ * decoding a nested remote value; the elements and frame windows travel as
24
+ * plain arrays, which BiDi serializes as node references and browsing context
25
+ * ids in one pass.
26
+ */
27
+ export interface WireSnapshot {
28
+ json: string;
29
+ /** Every element the tree references, in order of first mention. */
30
+ elements: Element[];
31
+ /** The content window of every frame node, in order of first mention. */
32
+ windows: Window[];
33
+ }
34
+ /** The root is an element of this document that is no longer attached to it. */
35
+ export interface WireError {
36
+ error: 'detached';
37
+ }
38
+ interface Encoded {
39
+ node: WireNode;
40
+ elements: Element[];
41
+ windows: Window[];
42
+ }
43
+ /** Replaces the references in a tree with indices; pure, so it is unit tested without a DOM. */
44
+ export declare function encodeWire(tree: AccessibilityNode): Encoded;
45
+ /**
46
+ * The snapshot of this document (no `root`), or of the subtree under `root`,
47
+ * in the wire shape. Answers `null` for a root this document does not own,
48
+ * so a binding tries each document until one answers: Firefox hands a shared
49
+ * id of another document's node to the called function as `null`, and may
50
+ * resolve one to the node itself in any document of the browsing context
51
+ * group, which the ownership check catches. Answers `{ error: 'detached' }`
52
+ * for a root no longer in its document, so a binding never has to read an
53
+ * exception's text.
54
+ */
55
+ declare function accessibilitySnapshotWire(root?: Element | null, options?: SnapshotOptions): WireSnapshot | WireError | null;
56
+ export default accessibilitySnapshotWire;
57
+ //# sourceMappingURL=wire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../../../typescript/core/accessibility/wire.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEhF;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAClC,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,QAAQ,EAAE,CAAA;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,oEAAoE;IACpE,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,yEAAyE;IACzE,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,gFAAgF;AAChF,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,UAAU,CAAA;CAClB;AAED,UAAU,OAAO;IACf,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAwB3D;AAED;;;;;;;;;GASG;AACH,iBAAS,yBAAyB,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,YAAY,GAAG,SAAS,GAAG,IAAI,CAiBpH;AAED,eAAe,yBAAyB,CAAA"}
@@ -0,0 +1,72 @@
1
+ // Licensed to the Software Freedom Conservancy (SFC) under one
2
+ // or more contributor license agreements. See the NOTICE file
3
+ // distributed with this work for additional information
4
+ // regarding copyright ownership. The SFC licenses this file
5
+ // to you under the Apache License, Version 2.0 (the
6
+ // "License"); you may not use this file except in compliance
7
+ // with the License. You may obtain a copy of the License at
8
+ //
9
+ // http://www.apache.org/licenses/LICENSE-2.0
10
+ //
11
+ // Unless required by applicable law or agreed to in writing,
12
+ // software distributed under the License is distributed on an
13
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ // KIND, either express or implied. See the License for the
15
+ // specific language governing permissions and limitations
16
+ // under the License.
17
+ import { isElement } from '../element.js';
18
+ import accessibilitySnapshot from './snapshot.js';
19
+ /** Replaces the references in a tree with indices; pure, so it is unit tested without a DOM. */
20
+ export function encodeWire(tree) {
21
+ const elements = [];
22
+ const windows = [];
23
+ function encode(node) {
24
+ const out = { role: node.role, name: node.name, description: node.description, states: node.states, children: [] };
25
+ if (node.value !== undefined) {
26
+ out.value = node.value;
27
+ }
28
+ if (node.url !== undefined) {
29
+ out.url = node.url;
30
+ }
31
+ if (node.element) {
32
+ out.element = elements.push(node.element) - 1;
33
+ const window = node.role === 'iframe' ? node.element.contentWindow : null;
34
+ if (window) {
35
+ out.frame = windows.push(window) - 1;
36
+ }
37
+ }
38
+ out.children = node.children.map(encode);
39
+ return out;
40
+ }
41
+ return { node: encode(tree), elements, windows };
42
+ }
43
+ /**
44
+ * The snapshot of this document (no `root`), or of the subtree under `root`,
45
+ * in the wire shape. Answers `null` for a root this document does not own,
46
+ * so a binding tries each document until one answers: Firefox hands a shared
47
+ * id of another document's node to the called function as `null`, and may
48
+ * resolve one to the node itself in any document of the browsing context
49
+ * group, which the ownership check catches. Answers `{ error: 'detached' }`
50
+ * for a root no longer in its document, so a binding never has to read an
51
+ * exception's text.
52
+ */
53
+ function accessibilitySnapshotWire(root, options) {
54
+ if (root === null) {
55
+ return null;
56
+ }
57
+ if (root !== undefined) {
58
+ if (!isElement(root)) {
59
+ throw new Error('accessibilitySnapshotWire: root must be an Element');
60
+ }
61
+ if (root.ownerDocument !== document) {
62
+ return null;
63
+ }
64
+ if (!root.isConnected) {
65
+ return { error: 'detached' };
66
+ }
67
+ }
68
+ const { node, elements, windows } = encodeWire(accessibilitySnapshot(root, options));
69
+ return { json: JSON.stringify(node), elements, windows };
70
+ }
71
+ export default accessibilitySnapshotWire;
72
+ //# sourceMappingURL=wire.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire.js","sourceRoot":"","sources":["../../../../typescript/core/accessibility/wire.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,qBAAqB,MAAM,eAAe,CAAA;AAgDjD,gGAAgG;AAChG,MAAM,UAAU,UAAU,CAAC,IAAuB;IAChD,MAAM,QAAQ,GAAc,EAAE,CAAA;IAC9B,MAAM,OAAO,GA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,CAAC;QAClB,OAAO,IAAI,CAAA;IACb,CAAC;IACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAA;QACvE,CAAC;QACD,IAAI,IAAI,CAAC,aAAa,KAAK,QAAQ,EAAE,CAAC;YACpC,OAAO,IAAI,CAAA;QACb,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAA;QAC9B,CAAC;IACH,CAAC;IACD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAA;IACpF,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;AAC1D,CAAC;AAED,eAAe,yBAAyB,CAAA"}
package/index.ts CHANGED
@@ -61,3 +61,7 @@ export { default as click } from './typescript/click.js'
61
61
  export { default as type } from './typescript/type.js'
62
62
  export { default as clear } from './typescript/clear.js'
63
63
  export { default as submit } from './typescript/submit.js'
64
+ export { default as accessibilitySnapshot } from './typescript/accessibility-snapshot.js'
65
+ export type { AccessibilityNode, StateValue } from './typescript/accessibility-snapshot.js'
66
+ export { default as accessibilitySnapshotWire } from './typescript/accessibility-snapshot-wire.js'
67
+ export type { WireError, WireNode, WireSnapshot } from './typescript/accessibility-snapshot-wire.js'
package/package.json CHANGED
@@ -181,6 +181,14 @@
181
181
  "./submit": {
182
182
  "types": "./dist/typescript/submit.d.ts",
183
183
  "default": "./dist/typescript/submit.js"
184
+ },
185
+ "./accessibility-snapshot": {
186
+ "types": "./dist/typescript/accessibility-snapshot.d.ts",
187
+ "default": "./dist/typescript/accessibility-snapshot.js"
188
+ },
189
+ "./accessibility-snapshot-wire": {
190
+ "types": "./dist/typescript/accessibility-snapshot-wire.d.ts",
191
+ "default": "./dist/typescript/accessibility-snapshot-wire.js"
184
192
  }
185
193
  },
186
194
  "typesVersions": {
@@ -313,6 +321,12 @@
313
321
  ],
314
322
  "submit": [
315
323
  "./dist/typescript/submit.d.ts"
324
+ ],
325
+ "accessibility-snapshot": [
326
+ "./dist/typescript/accessibility-snapshot.d.ts"
327
+ ],
328
+ "accessibility-snapshot-wire": [
329
+ "./dist/typescript/accessibility-snapshot-wire.d.ts"
316
330
  ]
317
331
  }
318
332
  },
@@ -338,5 +352,5 @@
338
352
  "registry": "https://registry.npmjs.org/"
339
353
  },
340
354
  "license": "Apache-2.0",
341
- "version": "4.52.0"
355
+ "version": "4.53.0"
342
356
  }
@@ -0,0 +1,20 @@
1
+ // Licensed to the Software Freedom Conservancy (SFC) under one
2
+ // or more contributor license agreements. See the NOTICE file
3
+ // distributed with this work for additional information
4
+ // regarding copyright ownership. The SFC licenses this file
5
+ // to you under the Apache License, Version 2.0 (the
6
+ // "License"); you may not use this file except in compliance
7
+ // with the License. You may obtain a copy of the License at
8
+ //
9
+ // http://www.apache.org/licenses/LICENSE-2.0
10
+ //
11
+ // Unless required by applicable law or agreed to in writing,
12
+ // software distributed under the License is distributed on an
13
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ // KIND, either express or implied. See the License for the
15
+ // specific language governing permissions and limitations
16
+ // under the License.
17
+
18
+ export type { SnapshotOptions } from './core/accessibility/types.js'
19
+ export type { WireError, WireNode, WireSnapshot } from './core/accessibility/wire.js'
20
+ export { default } from './core/accessibility/wire.js'
@@ -0,0 +1,21 @@
1
+ // Licensed to the Software Freedom Conservancy (SFC) under one
2
+ // or more contributor license agreements. See the NOTICE file
3
+ // distributed with this work for additional information
4
+ // regarding copyright ownership. The SFC licenses this file
5
+ // to you under the Apache License, Version 2.0 (the
6
+ // "License"); you may not use this file except in compliance
7
+ // with the License. You may obtain a copy of the License at
8
+ //
9
+ // http://www.apache.org/licenses/LICENSE-2.0
10
+ //
11
+ // Unless required by applicable law or agreed to in writing,
12
+ // software distributed under the License is distributed on an
13
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ // KIND, either express or implied. See the License for the
15
+ // specific language governing permissions and limitations
16
+ // under the License.
17
+
18
+ // The implementation lives in core/accessibility/ because it spans several
19
+ // modules; an atom entry point only re-exports.
20
+ export type { AccessibilityNode, SnapshotOptions, StateValue } from './core/accessibility/types.js'
21
+ export { default } from './core/accessibility/snapshot.js'