@soomo/react-text-annotator 3.2.0-staging.5 → 3.2.0-staging.6

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 (76) hide show
  1. package/dist/TextAnnotationPopup/TextAnnotationPopup.d.ts.map +1 -1
  2. package/dist/TextAnnotationPopup/useAnnotationQuoteIdle.d.ts +4 -0
  3. package/dist/TextAnnotationPopup/useAnnotationQuoteIdle.d.ts.map +1 -0
  4. package/dist/TextAnnotationPopup/useAnnouncePopupNavigation.d.ts.map +1 -0
  5. package/dist/index.d.ts +0 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/react-text-annotator.css +1 -31
  8. package/dist/react-text-annotator.es.js +211 -25
  9. package/dist/react-text-annotator.es.js.map +1 -1
  10. package/package.json +14 -13
  11. package/dist/hooks/index.d.ts +0 -3
  12. package/dist/hooks/index.d.ts.map +0 -1
  13. package/dist/hooks/useAnnotationQuoteIdling.d.ts +0 -4
  14. package/dist/hooks/useAnnotationQuoteIdling.d.ts.map +0 -1
  15. package/dist/hooks/useAnnouncePopupNavigation.d.ts.map +0 -1
  16. package/dist/react-text-annotator.es10.js +0 -504
  17. package/dist/react-text-annotator.es10.js.map +0 -1
  18. package/dist/react-text-annotator.es11.js +0 -85
  19. package/dist/react-text-annotator.es11.js.map +0 -1
  20. package/dist/react-text-annotator.es12.js +0 -48
  21. package/dist/react-text-annotator.es12.js.map +0 -1
  22. package/dist/react-text-annotator.es13.js +0 -28
  23. package/dist/react-text-annotator.es13.js.map +0 -1
  24. package/dist/react-text-annotator.es14.js +0 -1646
  25. package/dist/react-text-annotator.es14.js.map +0 -1
  26. package/dist/react-text-annotator.es15.js +0 -13
  27. package/dist/react-text-annotator.es15.js.map +0 -1
  28. package/dist/react-text-annotator.es17.js +0 -607
  29. package/dist/react-text-annotator.es17.js.map +0 -1
  30. package/dist/react-text-annotator.es18.js +0 -285
  31. package/dist/react-text-annotator.es18.js.map +0 -1
  32. package/dist/react-text-annotator.es19.js +0 -18
  33. package/dist/react-text-annotator.es19.js.map +0 -1
  34. package/dist/react-text-annotator.es2.js +0 -67
  35. package/dist/react-text-annotator.es2.js.map +0 -1
  36. package/dist/react-text-annotator.es20.js +0 -5
  37. package/dist/react-text-annotator.es20.js.map +0 -1
  38. package/dist/react-text-annotator.es21.js +0 -34
  39. package/dist/react-text-annotator.es21.js.map +0 -1
  40. package/dist/react-text-annotator.es22.js +0 -891
  41. package/dist/react-text-annotator.es22.js.map +0 -1
  42. package/dist/react-text-annotator.es23.js +0 -5
  43. package/dist/react-text-annotator.es23.js.map +0 -1
  44. package/dist/react-text-annotator.es24.js +0 -5
  45. package/dist/react-text-annotator.es24.js.map +0 -1
  46. package/dist/react-text-annotator.es25.js +0 -117
  47. package/dist/react-text-annotator.es25.js.map +0 -1
  48. package/dist/react-text-annotator.es26.js +0 -312
  49. package/dist/react-text-annotator.es26.js.map +0 -1
  50. package/dist/react-text-annotator.es27.js +0 -61
  51. package/dist/react-text-annotator.es27.js.map +0 -1
  52. package/dist/react-text-annotator.es28.js +0 -23
  53. package/dist/react-text-annotator.es28.js.map +0 -1
  54. package/dist/react-text-annotator.es29.js +0 -130
  55. package/dist/react-text-annotator.es29.js.map +0 -1
  56. package/dist/react-text-annotator.es3.js +0 -29
  57. package/dist/react-text-annotator.es3.js.map +0 -1
  58. package/dist/react-text-annotator.es30.js +0 -167
  59. package/dist/react-text-annotator.es30.js.map +0 -1
  60. package/dist/react-text-annotator.es31.js +0 -314
  61. package/dist/react-text-annotator.es31.js.map +0 -1
  62. package/dist/react-text-annotator.es32.js +0 -152
  63. package/dist/react-text-annotator.es32.js.map +0 -1
  64. package/dist/react-text-annotator.es33.js +0 -629
  65. package/dist/react-text-annotator.es33.js.map +0 -1
  66. package/dist/react-text-annotator.es4.js +0 -43
  67. package/dist/react-text-annotator.es4.js.map +0 -1
  68. package/dist/react-text-annotator.es5.js +0 -48
  69. package/dist/react-text-annotator.es5.js.map +0 -1
  70. package/dist/react-text-annotator.es6.js +0 -29
  71. package/dist/react-text-annotator.es6.js.map +0 -1
  72. package/dist/react-text-annotator.es7.js +0 -143
  73. package/dist/react-text-annotator.es7.js.map +0 -1
  74. package/dist/react-text-annotator.es8.js +0 -6
  75. package/dist/react-text-annotator.es8.js.map +0 -1
  76. /package/dist/{hooks → TextAnnotationPopup}/useAnnouncePopupNavigation.d.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-text-annotator.es26.js","sources":["../../../node_modules/CETEIcean/src/utilities.js"],"sourcesContent":["export function getOrdinality(elt, name) {\n let pos = 1;\n let e = elt;\n while (e && e.previousElementSibling !== null && (name ? e.previousElementSibling.localName == name : true)) {\n pos++;\n e = e.previousElementSibling;\n if (!e.previousElementSibling) {\n break;\n }\n }\n return pos;\n}\n\n/* \n Performs a deep copy operation of the input node while stripping\n out child elements introduced by CETEIcean.\n*/ \nexport function copyAndReset(node) {\n const doc = node.ownerDocument;\n let clone = (n) => { \n let result;\n switch (n.nodeType) {\n case 1: // nodeType 1 is Node.ELEMENT_NODE\n result = doc.createElement(n.nodeName);\n break;\n case 9: // nodeType 9 is Node.DOCUMENT_NODE\n result = doc.implementation.createDocument();\n break;\n case 11: // nodeType 11 is Node.DOCUMENT_FRAGMENT_NODE\n result = doc.createDocumentFragment();\n break;\n default:\n result = n.cloneNode(true);\n }\n if (n.attributes) {\n for (let att of Array.from(n.attributes)) {\n if (att.name !== \"data-processed\") {\n result.setAttribute(att.name,att.value);\n }\n }\n }\n for (let nd of Array.from(n.childNodes)){\n // nodeType 1 is Node.ELEMENT_NODE\n if (nd.nodeType == 1) {\n if (nd.hasAttribute(\"data-original\")) {\n for (let childNode of Array.from(nd.childNodes)) {\n let child = result.appendChild(clone(childNode));\n // nodeType 1 is Node.ELEMENT_NODE\n if (child.nodeType === 1 && child.hasAttribute(\"data-origid\")) {\n child.setAttribute(\"id\", child.getAttribute(\"data-origid\"));\n child.removeAttribute(\"data-origid\");\n }\n }\n return result;\n } else if (nd.hasAttribute(\"data-origname\")) {\n result.appendChild(clone(nd));\n }\n } else {\n result.appendChild(nd.cloneNode());\n }\n }\n return result;\n }\n return clone(node);\n}\n\n/* \n Given a space-separated list of URLs (e.g. in a ref with multiple\n targets), returns just the first one.\n*/\nexport function first(urls) {\n return urls.replace(/ .*$/, \"\");\n}\n\n/* \n Wraps the content of the element parameter in a hidden <cetei-original data-original>\n*/\nexport function hideContent(elt, rewriteIds = true) {\n const doc = elt.ownerDocument;\n if (elt.childNodes.length > 0) {\n let hidden = doc.createElement(\"cetei-original\");\n elt.appendChild(hidden);\n hidden.setAttribute(\"hidden\", \"\");\n hidden.setAttribute(\"data-original\", \"\");\n for (let node of Array.from(elt.childNodes)) {\n if (node !== hidden) {\n // nodeType 1 is Node.ELEMENT_NODE\n if (node.nodeType === 1) {\n node.setAttribute(\"data-processed\", \"\");\n for (let e of node.querySelectorAll(\"*\")) {\n e.setAttribute(\"data-processed\", \"\");\n }\n }\n hidden.appendChild(elt.removeChild(node));\n }\n }\n if (rewriteIds) {\n for (let e of Array.from(hidden.querySelectorAll(\"*\"))) {\n if (e.hasAttribute(\"id\")) {\n e.setAttribute(\"data-origid\", e.getAttribute(\"id\"));\n e.removeAttribute(\"id\");\n }\n }\n }\n }\n}\n\nexport function normalizeURI(urls) {\n return this.rw(this.first(urls))\n}\n\n/* \n Takes a string and a number and returns the original string\n printed that number of times.\n*/\nexport function repeat(str, times) {\n let result = \"\";\n for (let i = 0; i < times; i++) {\n result += str;\n }\n return result;\n}\n\n/* \n Resolves URIs that use TEI prefixDefs into full URIs.\n See https://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-prefixDef.html\n*/\nexport function resolveURI(uri) {\n let prefixdef = this.prefixDefs[uri.substring(0,uri.indexOf(\":\"))];\n return uri.replace(new RegExp(prefixdef[\"matchPattern\"]), prefixdef[\"replacementPattern\"]);\n}\n\n/*\n Convenience function for getting prefix definitions, Takes a prefix\n and returns an object with \"matchPattern\" and \"replacementPattern\"\n keys.\n*/\nexport function getPrefixDef(prefix) {\n return this.prefixDefs[prefix];\n}\n\n/* \n Takes a relative URL and rewrites it based on the base URL of the\n HTML document\n*/\nexport function rw(url) {\n if (!url.trim().match(/^(?:http|mailto|file|\\/|#).*$/)) {\n return this.base + first(url.trim());\n } else {\n return url;\n }\n}\n\n/*\n Combines the functionality of copyAndReset() and serialize() to return\n a \"clean\" version of the XML markup.\n */\nexport function resetAndSerialize(el, stripElt, ws) {\n return serialize(copyAndReset(el), stripElt, ws);\n}\n\n/* \n Takes an element and serializes it to an XML string or, if the stripElt\n parameter is set, serializes the element's content. The ws parameter, if\n set, will switch on minimal \"pretty-printing\" and indenting of the serialized\n result.\n*/\nexport function serialize(el, stripElt, ws) {\n let str = \"\";\n const ignorable = (txt) => {\n return !(/[^\\t\\n\\r ]/.test(txt));\n }\n if (el.nodeType === 9 || el.nodeType === 11) { // nodeType 9 is Node.DOCUMENT_NODE; nodeType 11 is Node.DOCUMENT_FRAGMENT_NODE\n str += \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\n }\n // nodeType 1 is Node.ELEMENT_NODE\n if (!stripElt && el.nodeType == 1) {\n if ((typeof ws === \"string\") && ws !== \"\") {\n str += \"\\n\" + ws + \"<\";\n } else {\n str += \"<\";\n }\n str += el.getAttribute(\"data-origname\");\n // HTML5 lowercases all attribute names; @data-origatts contains the original names\n let attrNames = el.hasAttribute(\"data-origatts\") ? el.getAttribute(\"data-origatts\").split(\" \") : [];\n for (let attr of Array.from(el.attributes)) {\n if (!attr.name.startsWith(\"data-\") && !([\"id\", \"lang\", \"class\"].includes(attr.name))) {\n str += \" \" + attrNames.find(function(e) {return e.toLowerCase() == attr.name}) + \"=\\\"\" + attr.value + \"\\\"\";\n }\n if (attr.name == \"data-xmlns\") {\n str += \" xmlns=\\\"\" + attr.value +\"\\\"\";\n }\n }\n if (el.childNodes.length > 0) {\n str += \">\";\n } else {\n str += \"/>\";\n }\n }\n for (let node of Array.from(el.childNodes)) {\n // nodeType 1 is Node.ELEMENT_NODE\n // nodeType 7 is Node.PROCESSING_INSTRUCTION_NODE\n // nodeType 8 is Node.COMMENT_NODE\n switch (node.nodeType) {\n case 1:\n if (typeof ws === \"string\") {\n str += serialize(node, false, ws + \" \");\n } else {\n str += serialize(node, false, ws);\n }\n break;\n case 7:\n str += `<?${node.nodeName} ${node.nodeValue}?>`;\n if (el.nodeType === 9 || el.nodeType === 11) {\n str += \"\\n\";\n }\n break;\n case 8:\n str += `<!--${node.nodeValue}-->`;\n if (el.nodeType === 9 || el.nodeType === 11) {\n str += \"\\n\";\n }\n break;\n default:\n if (stripElt && ignorable(node.nodeValue)) {\n str += node.nodeValue.replace(/^\\s*\\n/, \"\");\n }\n if ((typeof ws === \"string\") && ignorable(node.nodeValue)) {\n break;\n }\n str += node.nodeValue;\n }\n }\n if (!stripElt && el.nodeType == 1 && el.childNodes.length > 0) {\n if (typeof ws === \"string\") {\n str += \"\\n\" + ws + \"</\";\n } else {\n str += \"</\";\n }\n str += el.getAttribute(\"data-origname\") + \">\";\n }\n if (el.nodeType === 9 || el.nodeType === 11) {\n str += \"\\n\";\n }\n return str;\n}\n\n/* \n Write out the HTML markup to a string, using HTML conventions.\n */\nexport function serializeHTML(el, stripElt, ws) {\n const EMPTY_ELEMENTS = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr'];\n let str = \"\";\n const ignorable = (txt) => {\n return !(/[^\\t\\n\\r ]/.test(txt));\n }\n // nodeType 1 is Node.ELEMENT_NODE\n if (!stripElt && el.nodeType == 1) {\n if ((typeof ws === \"string\") && ws !== \"\") {\n str += \"\\n\" + ws + \"<\";\n } else {\n str += \"<\";\n }\n str += el.nodeName;\n for (let attr of Array.from(el.attributes)) {\n str += \" \" + attr.name + \"=\\\"\" + attr.value + \"\\\"\";\n }\n str += \">\";\n }\n for (let node of Array.from(el.childNodes)) {\n // nodeType 1 is Node.ELEMENT_NODE\n // nodeType 7 is Node.PROCESSING_INSTRUCTION_NODE\n // nodeType 8 is Node.COMMENT_NODE\n switch (node.nodeType) {\n case 1:\n if (typeof ws === \"string\") {\n str += serializeHTML(node, false, ws + \" \");\n } else {\n str += serializeHTML(node, false, ws);\n }\n break;\n case 7:\n str += `<?${node.nodeName} ${node.nodeValue}?>`;\n if (el.nodeType === 9 || el.nodeType === 11) {\n str += \"\\n\";\n }\n break;\n case 8:\n str += `<!--${node.nodeValue}-->`;\n if (el.nodeType === 9 || el.nodeType === 11) {\n str += \"\\n\";\n }\n break;\n default:\n if (stripElt && ignorable(node.nodeValue)) {\n str += node.nodeValue.replace(/^\\s*\\n/, \"\");\n }\n if ((typeof ws === \"string\") && ignorable(node.nodeValue)) {\n break;\n }\n str += node.nodeValue.replace(/</g, \"&lt;\");\n }\n }\n if (!EMPTY_ELEMENTS.includes(el.nodeName)) {\n if (!stripElt && el.nodeType == 1) {\n if (typeof ws === \"string\") {\n str += `\\n${ws}</`;\n } else {\n str += \"</\";\n }\n str += `${el.nodeName}>`;\n }\n }\n if (el.nodeType === 9 || el.nodeType === 11) {\n str += \"\\n\";\n }\n return str;\n}\n\nexport function unEscapeEntities(str) {\n return str.replace(/&gt;/, \">\")\n .replace(/&quot;/, \"\\\"\")\n .replace(/&apos;/, \"'\")\n .replace(/&amp;/, \"&\");\n}\n\n// Given a qualified name (e.g. tei:text), return the element name\nexport function tagName(name) {\n if (name.includes(\":\"), 1) {\n return name.replace(/:/,\"-\").toLowerCase();\n } else {\n return \"ceteicean-\" + name.toLowerCase();\n }\n}\n\nexport function defineCustomElement(name, behavior = null, debug = false) {\n /* \n Registers the list of elements provided with the browser.\n Called by makeHTML5(), but can be called independently if, for example,\n you've created Custom Elements via an XSLT transformation instead.\n */\n try {\n window.customElements.define(tagName(name), class extends HTMLElement {\n constructor() {\n super(); \n if (!this.matches(\":defined\")) { // \"Upgraded\" undefined elements can have attributes & children; new elements can't\n if (behavior) {\n behavior.call(this);\n // We don't want to double-process elements, so add a flag\n this.setAttribute(\"data-processed\", \"\");\n }\n }\n }\n // Process new elements when they are connected to the browser DOM\n connectedCallback() {\n if (!this.hasAttribute(\"data-processed\")) {\n if (behavior) {\n behavior.call(this);\n this.setAttribute(\"data-processed\", \"\");\n }\n }\n };\n });\n } catch (error) {\n // When using the same CETEIcean instance for multiple TEI files, this error becomes very common. \n // It's muted by default unless the debug option is set.\n if (debug) {\n console.log(tagName(name) + \" couldn't be registered or is already registered.\");\n console.log(error);\n }\n }\n}\n"],"names":[],"mappings":"AAAO,SAAS,cAAc,KAAK,MAAM;AACvC,MAAI,MAAM;AACV,MAAI,IAAI;AACR,SAAO,KAAK,EAAE,2BAA2B,SAAS,OAAO,EAAE,uBAAuB,aAAa,OAAO,OAAO;AAC3G;AACA,QAAI,EAAE;AACN,QAAI,CAAC,EAAE,wBAAwB;AAC7B;AAAA,IACN;AAAA,EACA;AACE,SAAO;AACT;AAMO,SAAS,aAAa,MAAM;AACjC,QAAM,MAAM,KAAK;AACjB,MAAI,QAAQ,CAAC,MAAM;AACjB,QAAI;AACJ,YAAQ,EAAE,UAAQ;AAAA,MAChB,KAAK;AACH,iBAAS,IAAI,cAAc,EAAE,QAAQ;AACrC;AAAA,MACF,KAAK;AACH,iBAAS,IAAI,eAAe,eAAgB;AAC5C;AAAA,MACF,KAAK;AACH,iBAAS,IAAI,uBAAwB;AACrC;AAAA,MACF;AACE,iBAAS,EAAE,UAAU,IAAI;AAAA,IACjC;AACI,QAAI,EAAE,YAAY;AAChB,eAAS,OAAO,MAAM,KAAK,EAAE,UAAU,GAAG;AACxC,YAAI,IAAI,SAAS,kBAAkB;AACjC,iBAAO,aAAa,IAAI,MAAK,IAAI,KAAK;AAAA,QAChD;AAAA,MACA;AAAA,IACA;AACI,aAAS,MAAM,MAAM,KAAK,EAAE,UAAU,GAAE;AAEtC,UAAI,GAAG,YAAY,GAAG;AACpB,YAAI,GAAG,aAAa,eAAe,GAAG;AACpC,mBAAS,aAAa,MAAM,K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AAElB,iBAAK,aAAa,kBAAkB,EAAE;AAAA,UAClD;AAAA,QACA;AAAA,MACA;AAAA;AAAA,MAEM,oBAAoB;AAClB,YAAI,CAAC,KAAK,aAAa,gBAAgB,GAAG;AACxC,cAAI,UAAU;AACZ,qBAAS,KAAK,IAAI;AAClB,iBAAK,aAAa,kBAAkB,EAAE;AAAA,UAClD;AAAA,QACA;AAAA,MACO;AAAA,IACP,CAAK;AAAA,EACF,SAAQ,OAAO;AAGd,QAAI,OAAO;AACP,cAAQ,IAAI,QAAQ,IAAI,IAAI,mDAAmD;AAC/E,cAAQ,IAAI,KAAK;AAAA,IACzB;AAAA,EACA;AACA;","x_google_ignoreList":[0]}
@@ -1,61 +0,0 @@
1
- function addBehaviors(bhvs) {
2
- if (bhvs.namespaces) {
3
- for (let prefix of Object.keys(bhvs.namespaces)) {
4
- if (!this.namespaces.has(bhvs.namespaces[prefix]) && !Array.from(this.namespaces.values()).includes(prefix)) {
5
- this.namespaces.set(bhvs.namespaces[prefix], prefix);
6
- }
7
- }
8
- }
9
- for (let prefix of this.namespaces.values()) {
10
- if (bhvs[prefix]) {
11
- for (let b of Object.keys(bhvs[prefix])) {
12
- this.behaviors[`${prefix}:${b}`] = bhvs[prefix][b];
13
- }
14
- }
15
- }
16
- if (bhvs["functions"]) {
17
- for (let fn of Object.keys(bhvs["functions"])) {
18
- this.utilities[fn] = bhvs["functions"][fn].bind(this.utilities);
19
- }
20
- }
21
- if (bhvs["handlers"]) {
22
- console.log("Behavior handlers are no longer used.");
23
- }
24
- if (bhvs["fallbacks"]) {
25
- console.log("Fallback behaviors are no longer used.");
26
- }
27
- }
28
- function addBehavior(ns, element, b) {
29
- let p;
30
- if (ns === Object(ns)) {
31
- for (let prefix of Object.keys(ns)) {
32
- if (!this.namespaces.has(ns[prefix])) {
33
- this.namespaces.set(ns[prefix], prefix);
34
- p = prefix;
35
- }
36
- }
37
- } else {
38
- p = ns;
39
- }
40
- this.behaviors[`${p}:${element}`] = b;
41
- }
42
- function removeBehavior(ns, element) {
43
- let p;
44
- if (ns === Object(ns)) {
45
- for (let prefix of Object.keys(ns)) {
46
- if (!this.namespaces.has(ns[prefix])) {
47
- this.namespaces.set(ns[prefix], prefix);
48
- p = prefix;
49
- }
50
- }
51
- } else {
52
- p = ns;
53
- }
54
- delete this.behaviors[`${p}:${element}`];
55
- }
56
- export {
57
- addBehavior,
58
- addBehaviors,
59
- removeBehavior
60
- };
61
- //# sourceMappingURL=react-text-annotator.es27.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-text-annotator.es27.js","sources":["../../../node_modules/CETEIcean/src/behaviors.js"],"sourcesContent":["\n/* \n Add a user-defined set of behaviors to CETEIcean's processing\n workflow. Added behaviors will override predefined behaviors with the\n same name.\n*/\nexport function addBehaviors(bhvs) {\n if (bhvs.namespaces) {\n for (let prefix of Object.keys(bhvs.namespaces)) {\n if (!this.namespaces.has(bhvs.namespaces[prefix]) && !Array.from(this.namespaces.values()).includes(prefix)) {\n this.namespaces.set(bhvs.namespaces[prefix], prefix);\n }\n }\n }\n for (let prefix of this.namespaces.values()) {\n if (bhvs[prefix]) {\n for (let b of Object.keys(bhvs[prefix])) {\n this.behaviors[`${prefix}:${b}`] = bhvs[prefix][b];\n }\n }\n }\n if (bhvs[\"functions\"]) {\n for (let fn of Object.keys(bhvs[\"functions\"])) {\n this.utilities[fn] = bhvs[\"functions\"][fn].bind(this.utilities);\n }\n }\n if (bhvs[\"handlers\"]) {\n console.log(\"Behavior handlers are no longer used.\")\n }\n if (bhvs[\"fallbacks\"]) {\n console.log(\"Fallback behaviors are no longer used.\")\n }\n}\n\n/* \n Adds or replaces an individual behavior. Takes a namespace prefix or namespace definition,\n the element name, and the behavior. E.g.\n addBehavior(\"tei\", \"add\", [\"`\",\"`\"]) for an already-declared namespace or\n addBehavior({\"doc\": \"http://docbook.org/ns/docbook\"}, \"note\", [\"[\",\"]\"]) for a new one\n*/\nexport function addBehavior(ns, element, b) {\n let p;\n if (ns === Object(ns)) {\n for (let prefix of Object.keys(ns)) {\n if (!this.namespaces.has(ns[prefix])) {\n this.namespaces.set(ns[prefix], prefix);\n p = prefix;\n }\n }\n } else {\n p = ns;\n }\n this.behaviors[`${p}:${element}`] = b;\n}\n\n/*\n Removes a previously-defined or default behavior. Takes a namespace prefix or namespace definition\n and the element name.\n*/\nexport function removeBehavior(ns, element) {\n let p;\n if (ns === Object(ns)) {\n for (let prefix of Object.keys(ns)) {\n if (!this.namespaces.has(ns[prefix])) {\n this.namespaces.set(ns[prefix], prefix);\n p = prefix;\n }\n }\n } else {\n p = ns;\n }\n delete this.behaviors[`${p}:${element}`];\n}\n"],"names":[],"mappings":"AAMO,SAAS,aAAa,MAAM;AACjC,MAAI,KAAK,YAAY;AACnB,aAAS,UAAU,OAAO,KAAK,KAAK,UAAU,GAAG;AAC/C,UAAI,CAAC,KAAK,WAAW,IAAI,KAAK,WAAW,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,KAAK,WAAW,OAAM,CAAE,EAAE,SAAS,MAAM,GAAG;AAC3G,aAAK,WAAW,IAAI,KAAK,WAAW,MAAM,GAAG,MAAM;AAAA,MAC3D;AAAA,IACA;AAAA,EACA;AACE,WAAS,UAAU,KAAK,WAAW,OAAM,GAAI;AAC3C,QAAI,KAAK,MAAM,GAAG;AAChB,eAAS,KAAK,OAAO,KAAK,KAAK,MAAM,CAAC,GAAG;AACvC,aAAK,UAAU,GAAG,MAAM,IAAI,CAAC,EAAE,IAAI,KAAK,MAAM,EAAE,CAAC;AAAA,MACzD;AAAA,IACA;AAAA,EACA;AACE,MAAI,KAAK,WAAW,GAAG;AACrB,aAAS,MAAM,OAAO,KAAK,KAAK,WAAW,CAAC,GAAG;AAC7C,WAAK,UAAU,EAAE,IAAI,KAAK,WAAW,EAAE,EAAE,EAAE,KAAK,KAAK,SAAS;AAAA,IACpE;AAAA,EACA;AACE,MAAI,KAAK,UAAU,GAAG;AACpB,YAAQ,IAAI,uCAAuC;AAAA,EACvD;AACE,MAAI,KAAK,WAAW,GAAG;AACrB,YAAQ,IAAI,wCAAwC;AAAA,EACxD;AACA;AAQO,SAAS,YAAY,IAAI,SAAS,GAAG;AAC1C,MAAI;AACJ,MAAI,OAAO,OAAO,EAAE,GAAG;AACrB,aAAS,UAAU,OAAO,KAAK,EAAE,GAAG;AAClC,UAAI,CAAC,KAAK,WAAW,IAAI,GAAG,MAAM,CAAC,GAAG;AACpC,aAAK,WAAW,IAAI,GAAG,MAAM,GAAG,MAAM;AACtC,YAAI;AAAA,MACZ;AAAA,IACA;AAAA,EACA,OAAS;AACL,QAAI;AAAA,EACR;AACE,OAAK,UAAU,GAAG,CAAC,IAAI,OAAO,EAAE,IAAI;AACtC;AAMO,SAAS,eAAe,IAAI,SAAS;AAC1C,MAAI;AACJ,MAAI,OAAO,OAAO,EAAE,GAAG;AACrB,aAAS,UAAU,OAAO,KAAK,EAAE,GAAG;AAClC,UAAI,CAAC,KAAK,WAAW,IAAI,GAAG,MAAM,CAAC,GAAG;AACpC,aAAK,WAAW,IAAI,GAAG,MAAM,GAAG,MAAM;AACtC,YAAI;AAAA,MACZ;AAAA,IACA;AAAA,EACA,OAAS;AACL,QAAI;AAAA,EACR;AACE,SAAO,KAAK,UAAU,GAAG,CAAC,IAAI,OAAO,EAAE;AACzC;","x_google_ignoreList":[0]}
@@ -1,23 +0,0 @@
1
- function learnElementNames(XML_dom, namespaces) {
2
- const root = XML_dom.documentElement;
3
- let i = 1;
4
- let qname = function(e) {
5
- if (!namespaces.has(e.namespaceURI ? e.namespaceURI : "")) {
6
- namespaces.set(e.namespaceURI, "ns" + i++);
7
- }
8
- return namespaces.get(e.namespaceURI ? e.namespaceURI : "") + ":" + e.localName;
9
- };
10
- const els = new Set(
11
- Array.from(root.querySelectorAll("*"), qname)
12
- );
13
- els.add(qname(root));
14
- return els;
15
- }
16
- function learnCustomElementNames(HTML_dom) {
17
- return new Set(Array.from(HTML_dom.querySelectorAll("*[data-origname]"), (e) => e.localName.replace(/(\w+)-.+/, "$1:") + e.getAttribute("data-origname")));
18
- }
19
- export {
20
- learnCustomElementNames,
21
- learnElementNames
22
- };
23
- //# sourceMappingURL=react-text-annotator.es28.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-text-annotator.es28.js","sources":["../../../node_modules/CETEIcean/src/dom.js"],"sourcesContent":["export function learnElementNames(XML_dom, namespaces) {\n const root = XML_dom.documentElement;\n let i = 1;\n let qname = function(e) { \n if (!namespaces.has(e.namespaceURI ? e.namespaceURI : \"\")) {\n namespaces.set(e.namespaceURI, \"ns\" + i++);\n } \n return namespaces.get(e.namespaceURI ? e.namespaceURI : \"\") + \":\" + e.localName;\n };\n const els = new Set(\n Array.from(root.querySelectorAll(\"*\"), qname));\n \n // Add the root element to the array\n els.add(qname(root));\n return els\n}\n\nexport function learnCustomElementNames(HTML_dom) {\n return new Set(Array.from(HTML_dom.querySelectorAll(\"*[data-origname]\"), e => e.localName.replace(/(\\w+)-.+/,\"$1:\") + e.getAttribute(\"data-origname\")));\n}"],"names":[],"mappings":"AAAO,SAAS,kBAAkB,SAAS,YAAY;AACrD,QAAM,OAAO,QAAQ;AACrB,MAAI,IAAI;AACR,MAAI,QAAQ,SAAS,GAAG;AACtB,QAAI,CAAC,WAAW,IAAI,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG;AACzD,iBAAW,IAAI,EAAE,cAAc,OAAO,GAAG;AAAA,IAC1C;AACD,WAAO,WAAW,IAAI,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,MAAM,EAAE;AAAA,EACvE;AACD,QAAM,MAAM,IAAI;AAAA,IACd,MAAM,KAAK,KAAK,iBAAiB,GAAG,GAAG,KAAK;AAAA,EAAC;AAG/C,MAAI,IAAI,MAAM,IAAI,CAAC;AACnB,SAAO;AACT;AAEO,SAAS,wBAAwB,UAAU;AAChD,SAAO,IAAI,IAAI,MAAM,KAAK,SAAS,iBAAiB,kBAAkB,GAAG,OAAK,EAAE,UAAU,QAAQ,YAAW,KAAK,IAAI,EAAE,aAAa,eAAe,CAAC,CAAC;AACxJ;","x_google_ignoreList":[0]}
@@ -1,130 +0,0 @@
1
- import { isShadowRoot, isHTMLElement } from "./react-text-annotator.es30.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;
23
- }
24
- next = next.parentNode || next.host;
25
- }
26
- }
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
- }
110
- export {
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
129
- };
130
- //# sourceMappingURL=react-text-annotator.es29.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-text-annotator.es29.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,EAC7C;AACE,SAAOA;AACT;AACA,SAAS,SAAS,QAAQ,OAAO;AAC/B,MAAI,CAAC,UAAU,CAAC,OAAO;AACrB,WAAO;AAAA,EACX;AACE,QAAM,WAAW,MAAM,eAAe,OAAO,SAAS,MAAM,YAAa;AAGzE,MAAI,OAAO,SAAS,KAAK,GAAG;AAC1B,WAAO;AAAA,EACX;AAGE,MAAI,YAAY,aAAa,QAAQ,GAAG;AACtC,QAAI,OAAO;AACX,WAAO,MAAM;AACX,UAAI,WAAW,MAAM;AACnB,eAAO;AAAA,MACf;AAEM,aAAO,KAAK,cAAc,KAAK;AAAA,IACrC;AAAA,EACA;AAGE,SAAO;AACT;AAEA,SAAS,cAAc;AACrB,QAAM,SAAS,UAAU;AACzB,MAAI,UAAU,QAAQ,OAAO,UAAU;AACrC,WAAO,OAAO;AAAA,EAClB;AACE,SAAO,UAAU;AACnB;AACA,SAAS,eAAe;AACtB,QAAM,SAAS,UAAU;AACzB,MAAI,UAAU,MAAM,QAAQ,OAAO,MAAM,GAAG;AAC1C,WAAO,OAAO,OAAO,IAAI,UAAQ;AAC/B,UAAI;AAAA,QACF;AAAA,QACA;AAAA,MACR,IAAU;AACJ,aAAO,QAAQ,MAAM;AAAA,IAC3B,CAAK,EAAE,KAAK,GAAG;AAAA,EACf;AACE,SAAO,UAAU;AACnB;AAGA,SAAS,eAAe,OAAO;AAG7B,MAAI,MAAM,mBAAmB,KAAK,MAAM,WAAW;AACjD,WA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O,MAAM;AACf;AACK,MAAC,oBAAoB;AAC1B,SAAS,kBAAkB,SAAS;AAClC,SAAO,cAAc,OAAO,KAAK,QAAQ,QAAQ,iBAAiB;AACpE;AACA,SAAS,UAAU,OAAO;AACxB,QAAM,eAAgB;AACtB,QAAM,gBAAiB;AACzB;AACA,SAAS,mBAAmB,SAAS;AACnC,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,QAAQ,aAAa,MAAM,MAAM,cAAc,kBAAkB,OAAO;AACjF;","x_google_ignoreList":[0]}
@@ -1,29 +0,0 @@
1
- import { j as jsxRuntimeExports } from "./react-text-annotator.es8.js";
2
- import { useContext, useCallback, useEffect, Children, cloneElement } from "react";
3
- import { AnnotoriousContext } from "@annotorious/react";
4
- import { TEIPlugin } from "@recogito/text-annotator-tei";
5
- import { createTextAnnotator } from "@soomo/text-annotator";
6
- /* empty css */
7
- const TEIAnnotator = (props) => {
8
- const { children, ...opts } = props;
9
- const { anno, setAnno } = useContext(AnnotoriousContext);
10
- const onLoad = useCallback((element) => {
11
- const anno2 = TEIPlugin(createTextAnnotator(element, opts));
12
- setAnno(anno2);
13
- }, []);
14
- useEffect(() => {
15
- if (!anno)
16
- return;
17
- anno.setStyle(props.style);
18
- }, [props.style]);
19
- useEffect(() => {
20
- if (!anno)
21
- return;
22
- anno.setFilter(props.filter);
23
- }, [props.filter]);
24
- return props.children ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: Children.toArray(props.children).map((child) => cloneElement(child, { onLoad })) }) : null;
25
- };
26
- export {
27
- TEIAnnotator
28
- };
29
- //# sourceMappingURL=react-text-annotator.es3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-text-annotator.es3.js","sources":["../src/tei/TEIAnnotator.tsx"],"sourcesContent":["import { Children, JSX, ReactElement, ReactNode, cloneElement, useCallback, useContext, useEffect } from 'react';\nimport { AnnotoriousContext, Filter } from '@annotorious/react';\nimport { TEIPlugin } from '@recogito/text-annotator-tei';\nimport { createTextAnnotator, HighlightStyleExpression } from '@soomo/text-annotator';\nimport type { TextAnnotatorOptions } from '@soomo/text-annotator';\n\nimport '@soomo/text-annotator/dist/text-annotator.css';\n\nexport type TEIAnnotatorProps = TextAnnotatorOptions & {\n\n children?: ReactNode | JSX.Element;\n\n filter?: Filter;\n\n style?: HighlightStyleExpression\n\n}\n\nexport const TEIAnnotator = (props: TEIAnnotatorProps) => {\n\n const { children, ...opts } = props;\n\n const { anno, setAnno } = useContext(AnnotoriousContext);\n\n const onLoad = useCallback((element: HTMLElement) => {\n const anno = TEIPlugin(createTextAnnotator(element, opts));\n setAnno(anno);\n }, []);\n\n useEffect(() => {\n if (!anno)\n return;\n \n anno.setStyle(props.style);\n }, [props.style]);\n\n useEffect(() => {\n if (!anno)\n return;\n \n anno.setFilter(props.filter);\n }, [props.filter]);\n\n return props.children ? (\n <>\n {Children.toArray(props.children).map(child => \n cloneElement(child as ReactElement, { onLoad } as any))}\n </>\n ) : null;\n\n}\n"],"names":["anno","jsx","Fragment"],"mappings":";;;;;;AAkBa,MAAA,eAAe,CAAC,UAA6B;AAExD,QAAM,EAAE,UAAU,GAAG,KAAA,IAAS;AAE9B,QAAM,EAAE,MAAM,YAAY,WAAW,kBAAkB;AAEjD,QAAA,SAAS,YAAY,CAAC,YAAyB;AACnD,UAAMA,QAAO,UAAU,oBAAoB,SAAS,IAAI,CAAC;AACzD,YAAQA,KAAI;AAAA,EACd,GAAG,EAAE;AAEL,YAAU,MAAM;AACd,QAAI,CAAC;AACH;AAEG,SAAA,SAAS,MAAM,KAAK;AAAA,EAAA,GACxB,CAAC,MAAM,KAAK,CAAC;AAEhB,YAAU,MAAM;AACd,QAAI,CAAC;AACH;AAEG,SAAA,UAAU,MAAM,MAAM;AAAA,EAAA,GAC1B,CAAC,MAAM,MAAM,CAAC;AAEjB,SAAO,MAAM,WACXC,sCAAAC,kBAAAA,UAAA,EACG,UAAS,SAAA,QAAQ,MAAM,QAAQ,EAAE,IAAI,CAAA,UACpC,aAAa,OAAuB,EAAE,OAAe,CAAA,CAAC,EAC1D,CAAA,IACE;AAEN;"}
@@ -1,167 +0,0 @@
1
- function hasWindow() {
2
- return typeof window !== "undefined";
3
- }
4
- function getNodeName(node) {
5
- if (isNode(node)) {
6
- return (node.nodeName || "").toLowerCase();
7
- }
8
- return "#document";
9
- }
10
- function getWindow(node) {
11
- var _node$ownerDocument;
12
- return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
13
- }
14
- function getDocumentElement(node) {
15
- var _ref;
16
- return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
17
- }
18
- function isNode(value) {
19
- if (!hasWindow()) {
20
- return false;
21
- }
22
- return value instanceof Node || value instanceof getWindow(value).Node;
23
- }
24
- function isElement(value) {
25
- if (!hasWindow()) {
26
- return false;
27
- }
28
- return value instanceof Element || value instanceof getWindow(value).Element;
29
- }
30
- function isHTMLElement(value) {
31
- if (!hasWindow()) {
32
- return false;
33
- }
34
- return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
35
- }
36
- function isShadowRoot(value) {
37
- if (!hasWindow() || typeof ShadowRoot === "undefined") {
38
- return false;
39
- }
40
- return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
41
- }
42
- function isOverflowElement(element) {
43
- const {
44
- overflow,
45
- overflowX,
46
- overflowY,
47
- display
48
- } = getComputedStyle(element);
49
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
50
- }
51
- function isTableElement(element) {
52
- return ["table", "td", "th"].includes(getNodeName(element));
53
- }
54
- function isTopLayer(element) {
55
- return [":popover-open", ":modal"].some((selector) => {
56
- try {
57
- return element.matches(selector);
58
- } catch (e) {
59
- return false;
60
- }
61
- });
62
- }
63
- function isContainingBlock(elementOrCss) {
64
- const webkit = isWebKit();
65
- const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
66
- return ["transform", "translate", "scale", "rotate", "perspective"].some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((value) => (css.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css.contain || "").includes(value));
67
- }
68
- function getContainingBlock(element) {
69
- let currentNode = getParentNode(element);
70
- while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
71
- if (isContainingBlock(currentNode)) {
72
- return currentNode;
73
- } else if (isTopLayer(currentNode)) {
74
- return null;
75
- }
76
- currentNode = getParentNode(currentNode);
77
- }
78
- return null;
79
- }
80
- function isWebKit() {
81
- if (typeof CSS === "undefined" || !CSS.supports) return false;
82
- return CSS.supports("-webkit-backdrop-filter", "none");
83
- }
84
- function isLastTraversableNode(node) {
85
- return ["html", "body", "#document"].includes(getNodeName(node));
86
- }
87
- function getComputedStyle(element) {
88
- return getWindow(element).getComputedStyle(element);
89
- }
90
- function getNodeScroll(element) {
91
- if (isElement(element)) {
92
- return {
93
- scrollLeft: element.scrollLeft,
94
- scrollTop: element.scrollTop
95
- };
96
- }
97
- return {
98
- scrollLeft: element.scrollX,
99
- scrollTop: element.scrollY
100
- };
101
- }
102
- function getParentNode(node) {
103
- if (getNodeName(node) === "html") {
104
- return node;
105
- }
106
- const result = (
107
- // Step into the shadow DOM of the parent of a slotted node.
108
- node.assignedSlot || // DOM Element detected.
109
- node.parentNode || // ShadowRoot detected.
110
- isShadowRoot(node) && node.host || // Fallback.
111
- getDocumentElement(node)
112
- );
113
- return isShadowRoot(result) ? result.host : result;
114
- }
115
- function getNearestOverflowAncestor(node) {
116
- const parentNode = getParentNode(node);
117
- if (isLastTraversableNode(parentNode)) {
118
- return node.ownerDocument ? node.ownerDocument.body : node.body;
119
- }
120
- if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
121
- return parentNode;
122
- }
123
- return getNearestOverflowAncestor(parentNode);
124
- }
125
- function getOverflowAncestors(node, list, traverseIframes) {
126
- var _node$ownerDocument2;
127
- if (list === void 0) {
128
- list = [];
129
- }
130
- if (traverseIframes === void 0) {
131
- traverseIframes = true;
132
- }
133
- const scrollableAncestor = getNearestOverflowAncestor(node);
134
- const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
135
- const win = getWindow(scrollableAncestor);
136
- if (isBody) {
137
- const frameElement = getFrameElement(win);
138
- return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
139
- }
140
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
141
- }
142
- function getFrameElement(win) {
143
- return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
144
- }
145
- export {
146
- getComputedStyle,
147
- getContainingBlock,
148
- getDocumentElement,
149
- getFrameElement,
150
- getNearestOverflowAncestor,
151
- getNodeName,
152
- getNodeScroll,
153
- getOverflowAncestors,
154
- getParentNode,
155
- getWindow,
156
- isContainingBlock,
157
- isElement,
158
- isHTMLElement,
159
- isLastTraversableNode,
160
- isNode,
161
- isOverflowElement,
162
- isShadowRoot,
163
- isTableElement,
164
- isTopLayer,
165
- isWebKit
166
- };
167
- //# sourceMappingURL=react-text-annotator.es30.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-text-annotator.es30.js","sources":["../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs"],"sourcesContent":["function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isTopLayer(element) {\n return [':popover-open', ':modal'].some(selector => {\n try {\n return element.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n"],"names":[],"mappings":"AAAA,SAAS,YAAY;AACnB,SAAO,OAAO,WAAW;AAC3B;AACA,SAAS,YAAY,MAAM;AACzB,MAAI,OAAO,IAAI,GAAG;AAChB,YAAQ,KAAK,YAAY,IAAI,YAAa;AAAA,EAC9C;AAIE,SAAO;AACT;AACA,SAAS,UAAU,MAAM;AACvB,MAAI;AACJ,UAAQ,QAAQ,SAAS,sBAAsB,KAAK,kBAAkB,OAAO,SAAS,oBAAoB,gBAAgB;AAC5H;AACA,SAAS,mBAAmB,MAAM;AAChC,MAAI;AACJ,UAAQ,QAAQ,OAAO,IAAI,IAAI,KAAK,gBAAgB,KAAK,aAAa,OAAO,aAAa,OAAO,SAAS,KAAK;AACjH;AACA,SAAS,OAAO,OAAO;AACrB,MAAI,CAAC,UAAS,GAAI;AAChB,WAAO;AAAA,EACX;AACE,SAAO,iBAAiB,QAAQ,iBAAiB,UAAU,KAAK,EAAE;AACpE;AACA,SAAS,UAAU,OAAO;AACxB,MAAI,CAAC,UAAS,GAAI;AAChB,WAAO;AAAA,EACX;AACE,SAAO,iBAAiB,WAAW,iBAAiB,UAAU,KAAK,EAAE;AACvE;AACA,SAAS,cAAc,OAAO;AAC5B,MAAI,CAAC,UAAS,GAAI;AAChB,WAAO;AAAA,EACX;AACE,SAAO,iBAAiB,eAAe,iBAAiB,UAAU,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