@soomo/react-text-annotator 3.1.0-staging.7 → 3.1.0-staging.9
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/dist/TextAnnotatorPopup/TextAnnotatorPopup.d.ts.map +1 -1
- package/dist/react-text-annotator.es10.js +5 -5
- package/dist/react-text-annotator.es12.js +3 -3
- package/dist/react-text-annotator.es15.js +1 -1
- package/dist/react-text-annotator.es23.js +124 -111
- package/dist/react-text-annotator.es23.js.map +1 -1
- package/dist/react-text-annotator.es24.js +140 -285
- package/dist/react-text-annotator.es24.js.map +1 -1
- package/dist/react-text-annotator.es25.js +296 -43
- package/dist/react-text-annotator.es25.js.map +1 -1
- package/dist/react-text-annotator.es26.js +113 -19
- package/dist/react-text-annotator.es26.js.map +1 -1
- package/dist/react-text-annotator.es27.js +287 -105
- package/dist/react-text-annotator.es27.js.map +1 -1
- package/dist/react-text-annotator.es28.js +48 -154
- package/dist/react-text-annotator.es28.js.map +1 -1
- package/dist/react-text-annotator.es29.js +19 -310
- package/dist/react-text-annotator.es29.js.map +1 -1
- package/dist/react-text-annotator.es6.js +7 -11
- package/dist/react-text-annotator.es6.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnnotatorPopup.d.ts","sourceRoot":"","sources":["../../src/TextAnnotatorPopup/TextAnnotatorPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAA6C,MAAM,OAAO,CAAC;AAiB3G,OAAO,EAIL,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,0BAA0B,CAAC;AAElC,UAAU,wBAAwB;IAEhC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,KAAK,CAAC,KAAK,EAAE,+BAA+B,GAAG,SAAS,CAAC;CAE1D;AAED,MAAM,WAAW,+BAA+B;IAE9C,UAAU,EAAE,cAAc,CAAC;IAE3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,KAAK,CAAC,EAAE,YAAY,CAAC;CAEtB;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"TextAnnotatorPopup.d.ts","sourceRoot":"","sources":["../../src/TextAnnotatorPopup/TextAnnotatorPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAA6C,MAAM,OAAO,CAAC;AAiB3G,OAAO,EAIL,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,0BAA0B,CAAC;AAElC,UAAU,wBAAwB;IAEhC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,KAAK,CAAC,KAAK,EAAE,+BAA+B,GAAG,SAAS,CAAC;CAE1D;AAED,MAAM,WAAW,+BAA+B;IAE9C,UAAU,EAAE,cAAc,CAAC;IAE3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,KAAK,CAAC,EAAE,YAAY,CAAC;CAEtB;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,wBAAwB,CAkI3D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GAAI,CAAC,SAAS,WAAW;yBAC5C,YAAY,CAAC,CAAC,CAAC;2BACb,YAAY,CAAC,CAAC,CAAC;yBACjB,UAAU,CAAC,CAAC,CAAC;uBACf,UAAU,CAAC,CAAC,CAAC;CAChC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import defaultBehaviors from "./react-text-annotator.
|
|
2
|
-
import * as utilities from "./react-text-annotator.
|
|
3
|
-
import { hideContent, defineCustomElement, tagName } from "./react-text-annotator.
|
|
4
|
-
import { addBehaviors, addBehavior, removeBehavior } from "./react-text-annotator.
|
|
5
|
-
import { learnElementNames, learnCustomElementNames } from "./react-text-annotator.
|
|
1
|
+
import defaultBehaviors from "./react-text-annotator.es26.js";
|
|
2
|
+
import * as utilities from "./react-text-annotator.es27.js";
|
|
3
|
+
import { hideContent, defineCustomElement, tagName } from "./react-text-annotator.es27.js";
|
|
4
|
+
import { addBehaviors, addBehavior, removeBehavior } from "./react-text-annotator.es28.js";
|
|
5
|
+
import { learnElementNames, learnCustomElementNames } from "./react-text-annotator.es29.js";
|
|
6
6
|
class CETEI {
|
|
7
7
|
constructor(options) {
|
|
8
8
|
this.options = options ? options : {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useLayoutEffect, useEffect, useRef } from "react";
|
|
3
|
-
import { isTypeableCombobox, getDocument, activeElement, contains, isVirtualClick, isVirtualPointerEvent, isSafari, stopEvent, getTarget, isReactEvent, isRootElement, isEventTargetWithin } from "./react-text-annotator.
|
|
4
|
-
import { isHTMLElement, isElement, getOverflowAncestors, getNodeName, isLastTraversableNode, getParentNode, getComputedStyle } from "./react-text-annotator.
|
|
5
|
-
import { isTabbable, tabbable } from "./react-text-annotator.
|
|
3
|
+
import { isTypeableCombobox, getDocument, activeElement, contains, isVirtualClick, isVirtualPointerEvent, isSafari, stopEvent, getTarget, isReactEvent, isRootElement, isEventTargetWithin } from "./react-text-annotator.es23.js";
|
|
4
|
+
import { isHTMLElement, isElement, getOverflowAncestors, getNodeName, isLastTraversableNode, getParentNode, getComputedStyle } from "./react-text-annotator.es24.js";
|
|
5
|
+
import { isTabbable, tabbable } from "./react-text-annotator.es25.js";
|
|
6
6
|
import * as ReactDOM from "react-dom";
|
|
7
7
|
import { useFloating as useFloating$1 } from "./react-text-annotator.es14.js";
|
|
8
8
|
import { flip, inline, offset, shift } from "./react-text-annotator.es14.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { offset as offset$1, shift as shift$1, flip as flip$1, inline as inline$1, computePosition as computePosition$1 } from "./react-text-annotator.es31.js";
|
|
2
2
|
import { createCoords, rectToClientRect, round, floor, max, min } from "./react-text-annotator.es30.js";
|
|
3
|
-
import { getOverflowAncestors, isElement, getWindow, getFrameElement, getComputedStyle, getDocumentElement, isHTMLElement, isWebKit, isTopLayer, getNodeName, isOverflowElement, getNodeScroll, getParentNode, isLastTraversableNode, isTableElement, isContainingBlock, getContainingBlock } from "./react-text-annotator.
|
|
3
|
+
import { getOverflowAncestors, isElement, getWindow, getFrameElement, getComputedStyle, getDocumentElement, isHTMLElement, isWebKit, isTopLayer, getNodeName, isOverflowElement, getNodeScroll, getParentNode, isLastTraversableNode, isTableElement, isContainingBlock, getContainingBlock } from "./react-text-annotator.es24.js";
|
|
4
4
|
function getCssDimensions(element) {
|
|
5
5
|
const css = getComputedStyle(element);
|
|
6
6
|
let width = parseFloat(css.width) || 0;
|
|
@@ -1,117 +1,130 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
if (elt.hasAttribute("height")) {
|
|
25
|
-
content.setAttribute("height", elt.getAttribute("height"));
|
|
26
|
-
}
|
|
27
|
-
return content;
|
|
28
|
-
},
|
|
29
|
-
"list": [
|
|
30
|
-
// will only run on a list where @type="gloss"
|
|
31
|
-
[
|
|
32
|
-
"[type=gloss]",
|
|
33
|
-
function(elt) {
|
|
34
|
-
const doc = elt.ownerDocument;
|
|
35
|
-
let dl = doc.createElement("dl");
|
|
36
|
-
for (let child of Array.from(elt.children)) {
|
|
37
|
-
if (child.nodeType == 1) {
|
|
38
|
-
if (child.localName == "tei-label") {
|
|
39
|
-
let dt = doc.createElement("dt");
|
|
40
|
-
dt.innerHTML = child.innerHTML;
|
|
41
|
-
dl.appendChild(dt);
|
|
42
|
-
}
|
|
43
|
-
if (child.localName == "tei-item") {
|
|
44
|
-
let dd = doc.createElement("dd");
|
|
45
|
-
dd.innerHTML = child.innerHTML;
|
|
46
|
-
dl.appendChild(dd);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return dl;
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
],
|
|
54
|
-
"note": [
|
|
55
|
-
// Make endnotes
|
|
56
|
-
["[place=end]", function(elt) {
|
|
57
|
-
const doc = elt.ownerDocument;
|
|
58
|
-
if (!this.noteIndex) {
|
|
59
|
-
this["noteIndex"] = 1;
|
|
60
|
-
} else {
|
|
61
|
-
this.noteIndex++;
|
|
62
|
-
}
|
|
63
|
-
let id = "_note_" + this.noteIndex;
|
|
64
|
-
let link = doc.createElement("a");
|
|
65
|
-
link.setAttribute("id", "src" + id);
|
|
66
|
-
link.setAttribute("href", "#" + id);
|
|
67
|
-
link.innerHTML = this.noteIndex;
|
|
68
|
-
let content = doc.createElement("sup");
|
|
69
|
-
content.appendChild(link);
|
|
70
|
-
let notes = doc.querySelector("ol.notes");
|
|
71
|
-
if (!notes) {
|
|
72
|
-
notes = doc.createElement("ol");
|
|
73
|
-
notes.setAttribute("class", "notes");
|
|
74
|
-
this.dom.appendChild(notes);
|
|
75
|
-
}
|
|
76
|
-
let note = doc.createElement("li");
|
|
77
|
-
note.id = id;
|
|
78
|
-
note.innerHTML = elt.innerHTML;
|
|
79
|
-
notes.appendChild(note);
|
|
80
|
-
return content;
|
|
81
|
-
}],
|
|
82
|
-
["_", ["(", ")"]]
|
|
83
|
-
],
|
|
84
|
-
// Hide the teiHeader by default
|
|
85
|
-
"teiHeader": function(e) {
|
|
86
|
-
this.hideContent(e, false);
|
|
87
|
-
},
|
|
88
|
-
// Make the title element the HTML title
|
|
89
|
-
"title": [
|
|
90
|
-
["tei-titlestmt>tei-title", function(elt) {
|
|
91
|
-
const doc = elt.ownerDocument;
|
|
92
|
-
let title = doc.createElement("title");
|
|
93
|
-
title.innerHTML = elt.innerText;
|
|
94
|
-
doc.querySelector("head").appendChild(title);
|
|
95
|
-
}]
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
"teieg": {
|
|
99
|
-
"egXML": function(elt) {
|
|
100
|
-
const doc = elt.ownerDocument;
|
|
101
|
-
let pre = doc.createElement("pre");
|
|
102
|
-
let code = doc.createElement("code");
|
|
103
|
-
pre.appendChild(code);
|
|
104
|
-
let content = this.serialize(elt, true).replace(/</g, "<");
|
|
105
|
-
let ws = content.match(/^[\t ]+/);
|
|
106
|
-
if (ws) {
|
|
107
|
-
content = content.replace(new RegExp("^" + ws[0], "mg"), "");
|
|
1
|
+
import { isShadowRoot, isHTMLElement } from "./react-text-annotator.es24.js";
|
|
2
|
+
function activeElement(doc) {
|
|
3
|
+
let activeElement2 = doc.activeElement;
|
|
4
|
+
while (((_activeElement = activeElement2) == null || (_activeElement = _activeElement.shadowRoot) == null ? void 0 : _activeElement.activeElement) != null) {
|
|
5
|
+
var _activeElement;
|
|
6
|
+
activeElement2 = activeElement2.shadowRoot.activeElement;
|
|
7
|
+
}
|
|
8
|
+
return activeElement2;
|
|
9
|
+
}
|
|
10
|
+
function contains(parent, child) {
|
|
11
|
+
if (!parent || !child) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();
|
|
15
|
+
if (parent.contains(child)) {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
if (rootNode && isShadowRoot(rootNode)) {
|
|
19
|
+
let next = child;
|
|
20
|
+
while (next) {
|
|
21
|
+
if (parent === next) {
|
|
22
|
+
return true;
|
|
108
23
|
}
|
|
109
|
-
|
|
110
|
-
return pre;
|
|
24
|
+
next = next.parentNode || next.host;
|
|
111
25
|
}
|
|
112
26
|
}
|
|
113
|
-
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
function getPlatform() {
|
|
30
|
+
const uaData = navigator.userAgentData;
|
|
31
|
+
if (uaData != null && uaData.platform) {
|
|
32
|
+
return uaData.platform;
|
|
33
|
+
}
|
|
34
|
+
return navigator.platform;
|
|
35
|
+
}
|
|
36
|
+
function getUserAgent() {
|
|
37
|
+
const uaData = navigator.userAgentData;
|
|
38
|
+
if (uaData && Array.isArray(uaData.brands)) {
|
|
39
|
+
return uaData.brands.map((_ref) => {
|
|
40
|
+
let {
|
|
41
|
+
brand,
|
|
42
|
+
version
|
|
43
|
+
} = _ref;
|
|
44
|
+
return brand + "/" + version;
|
|
45
|
+
}).join(" ");
|
|
46
|
+
}
|
|
47
|
+
return navigator.userAgent;
|
|
48
|
+
}
|
|
49
|
+
function isVirtualClick(event) {
|
|
50
|
+
if (event.mozInputSource === 0 && event.isTrusted) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
if (isAndroid() && event.pointerType) {
|
|
54
|
+
return event.type === "click" && event.buttons === 1;
|
|
55
|
+
}
|
|
56
|
+
return event.detail === 0 && !event.pointerType;
|
|
57
|
+
}
|
|
58
|
+
function isVirtualPointerEvent(event) {
|
|
59
|
+
if (isJSDOM()) return false;
|
|
60
|
+
return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
|
|
61
|
+
event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "touch";
|
|
62
|
+
}
|
|
63
|
+
function isSafari() {
|
|
64
|
+
return /apple/i.test(navigator.vendor);
|
|
65
|
+
}
|
|
66
|
+
function isAndroid() {
|
|
67
|
+
const re = /android/i;
|
|
68
|
+
return re.test(getPlatform()) || re.test(getUserAgent());
|
|
69
|
+
}
|
|
70
|
+
function isJSDOM() {
|
|
71
|
+
return getUserAgent().includes("jsdom/");
|
|
72
|
+
}
|
|
73
|
+
function isReactEvent(event) {
|
|
74
|
+
return "nativeEvent" in event;
|
|
75
|
+
}
|
|
76
|
+
function isRootElement(element) {
|
|
77
|
+
return element.matches("html,body");
|
|
78
|
+
}
|
|
79
|
+
function getDocument(node) {
|
|
80
|
+
return (node == null ? void 0 : node.ownerDocument) || document;
|
|
81
|
+
}
|
|
82
|
+
function isEventTargetWithin(event, node) {
|
|
83
|
+
if (node == null) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
if ("composedPath" in event) {
|
|
87
|
+
return event.composedPath().includes(node);
|
|
88
|
+
}
|
|
89
|
+
const e = event;
|
|
90
|
+
return e.target != null && node.contains(e.target);
|
|
91
|
+
}
|
|
92
|
+
function getTarget(event) {
|
|
93
|
+
if ("composedPath" in event) {
|
|
94
|
+
return event.composedPath()[0];
|
|
95
|
+
}
|
|
96
|
+
return event.target;
|
|
97
|
+
}
|
|
98
|
+
const TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
|
|
99
|
+
function isTypeableElement(element) {
|
|
100
|
+
return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
|
|
101
|
+
}
|
|
102
|
+
function stopEvent(event) {
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
event.stopPropagation();
|
|
105
|
+
}
|
|
106
|
+
function isTypeableCombobox(element) {
|
|
107
|
+
if (!element) return false;
|
|
108
|
+
return element.getAttribute("role") === "combobox" && isTypeableElement(element);
|
|
109
|
+
}
|
|
114
110
|
export {
|
|
115
|
-
|
|
111
|
+
TYPEABLE_SELECTOR,
|
|
112
|
+
activeElement,
|
|
113
|
+
contains,
|
|
114
|
+
getDocument,
|
|
115
|
+
getPlatform,
|
|
116
|
+
getTarget,
|
|
117
|
+
getUserAgent,
|
|
118
|
+
isAndroid,
|
|
119
|
+
isEventTargetWithin,
|
|
120
|
+
isJSDOM,
|
|
121
|
+
isReactEvent,
|
|
122
|
+
isRootElement,
|
|
123
|
+
isSafari,
|
|
124
|
+
isTypeableCombobox,
|
|
125
|
+
isTypeableElement,
|
|
126
|
+
isVirtualClick,
|
|
127
|
+
isVirtualPointerEvent,
|
|
128
|
+
stopEvent
|
|
116
129
|
};
|
|
117
130
|
//# sourceMappingURL=react-text-annotator.es23.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-text-annotator.es23.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"react-text-annotator.es23.js","sources":["../../../node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs"],"sourcesContent":["import { isShadowRoot, isHTMLElement } from '@floating-ui/utils/dom';\n\nfunction activeElement(doc) {\n let activeElement = doc.activeElement;\n while (((_activeElement = activeElement) == null || (_activeElement = _activeElement.shadowRoot) == null ? void 0 : _activeElement.activeElement) != null) {\n var _activeElement;\n activeElement = activeElement.shadowRoot.activeElement;\n }\n return activeElement;\n}\nfunction contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n // @ts-ignore\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\n// Avoid Chrome DevTools blue warning.\nfunction getPlatform() {\n const uaData = navigator.userAgentData;\n if (uaData != null && uaData.platform) {\n return uaData.platform;\n }\n return navigator.platform;\n}\nfunction getUserAgent() {\n const uaData = navigator.userAgentData;\n if (uaData && Array.isArray(uaData.brands)) {\n return uaData.brands.map(_ref => {\n let {\n brand,\n version\n } = _ref;\n return brand + \"/\" + version;\n }).join(' ');\n }\n return navigator.userAgent;\n}\n\n// License: https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/utils/src/isVirtualEvent.ts\nfunction isVirtualClick(event) {\n // FIXME: Firefox is now emitting a deprecation warning for `mozInputSource`.\n // Try to find a workaround for this. `react-aria` source still has the check.\n if (event.mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n if (isAndroid() && event.pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n return event.detail === 0 && !event.pointerType;\n}\nfunction isVirtualPointerEvent(event) {\n if (isJSDOM()) return false;\n return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||\n // iOS VoiceOver returns 0.333• for width/height.\n event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';\n}\nfunction isSafari() {\n // Chrome DevTools does not complain about navigator.vendor\n return /apple/i.test(navigator.vendor);\n}\nfunction isAndroid() {\n const re = /android/i;\n return re.test(getPlatform()) || re.test(getUserAgent());\n}\nfunction isMac() {\n return getPlatform().toLowerCase().startsWith('mac') && !navigator.maxTouchPoints;\n}\nfunction isJSDOM() {\n return getUserAgent().includes('jsdom/');\n}\nfunction isMouseLikePointerType(pointerType, strict) {\n // On some Linux machines with Chromium, mouse inputs return a `pointerType`\n // of \"pen\": https://github.com/floating-ui/floating-ui/issues/2015\n const values = ['mouse', 'pen'];\n if (!strict) {\n values.push('', undefined);\n }\n return values.includes(pointerType);\n}\nfunction isReactEvent(event) {\n return 'nativeEvent' in event;\n}\nfunction isRootElement(element) {\n return element.matches('html,body');\n}\nfunction getDocument(node) {\n return (node == null ? void 0 : node.ownerDocument) || document;\n}\nfunction isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const e = event;\n return e.target != null && node.contains(e.target);\n}\nfunction getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nconst TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nfunction isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nfunction stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\nfunction isTypeableCombobox(element) {\n if (!element) return false;\n return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\n\nexport { TYPEABLE_SELECTOR, activeElement, contains, getDocument, getPlatform, getTarget, getUserAgent, isAndroid, isEventTargetWithin, isJSDOM, isMac, isMouseLikePointerType, isReactEvent, isRootElement, isSafari, isTypeableCombobox, isTypeableElement, isVirtualClick, isVirtualPointerEvent, stopEvent };\n"],"names":["activeElement"],"mappings":";AAEA,SAAS,cAAc,KAAK;AAC1B,MAAIA,iBAAgB,IAAI;AACxB,WAAS,iBAAiBA,mBAAkB,SAAS,iBAAiB,eAAe,eAAe,OAAO,SAAS,eAAe,kBAAkB,MAAM;AACzJ,QAAI;AACJ,IAAAA,iBAAgBA,eAAc,WAAW;AAAA,EAC1C;AACD,SAAOA;AACT;AACA,SAAS,SAAS,QAAQ,OAAO;AAC/B,MAAI,CAAC,UAAU,CAAC,OAAO;AACrB,WAAO;AAAA,EACR;AACD,QAAM,WAAW,MAAM,eAAe,OAAO,SAAS,MAAM;AAG5D,MAAI,OAAO,SAAS,KAAK,GAAG;AAC1B,WAAO;AAAA,EACR;AAGD,MAAI,YAAY,aAAa,QAAQ,GAAG;AACtC,QAAI,OAAO;AACX,WAAO,MAAM;AACX,UAAI,WAAW,MAAM;AACnB,eAAO;AAAA,MACR;AAED,aAAO,KAAK,cAAc,KAAK;AAAA,IAChC;AAAA,EACF;AAGD,SAAO;AACT;AAEA,SAAS,cAAc;AACrB,QAAM,SAAS,UAAU;AACzB,MAAI,UAAU,QAAQ,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