@soomo/react-text-annotator 3.1.0-staging.22 → 3.1.0-staging.24

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 (71) hide show
  1. package/dist/TextAnnotationPopup/TextAnnotationPopup.d.ts.map +1 -1
  2. package/dist/hooks/useAnnotationQuoteIdling.d.ts.map +1 -1
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/react-text-annotator.css +1 -31
  6. package/dist/react-text-annotator.es.js +245 -21
  7. package/dist/react-text-annotator.es.js.map +1 -1
  8. package/dist/tei/CETEIcean.d.ts +1 -0
  9. package/dist/tei/CETEIcean.d.ts.map +1 -1
  10. package/dist/tei/TEIAnnotator.d.ts.map +1 -1
  11. package/package.json +13 -12
  12. package/dist/react-text-annotator.es11.js +0 -490
  13. package/dist/react-text-annotator.es11.js.map +0 -1
  14. package/dist/react-text-annotator.es12.js +0 -85
  15. package/dist/react-text-annotator.es12.js.map +0 -1
  16. package/dist/react-text-annotator.es13.js +0 -48
  17. package/dist/react-text-annotator.es13.js.map +0 -1
  18. package/dist/react-text-annotator.es14.js +0 -28
  19. package/dist/react-text-annotator.es14.js.map +0 -1
  20. package/dist/react-text-annotator.es15.js +0 -1600
  21. package/dist/react-text-annotator.es15.js.map +0 -1
  22. package/dist/react-text-annotator.es16.js +0 -12
  23. package/dist/react-text-annotator.es16.js.map +0 -1
  24. package/dist/react-text-annotator.es18.js +0 -285
  25. package/dist/react-text-annotator.es18.js.map +0 -1
  26. package/dist/react-text-annotator.es19.js +0 -590
  27. package/dist/react-text-annotator.es19.js.map +0 -1
  28. package/dist/react-text-annotator.es2.js +0 -64
  29. package/dist/react-text-annotator.es2.js.map +0 -1
  30. package/dist/react-text-annotator.es20.js +0 -5
  31. package/dist/react-text-annotator.es20.js.map +0 -1
  32. package/dist/react-text-annotator.es21.js +0 -34
  33. package/dist/react-text-annotator.es21.js.map +0 -1
  34. package/dist/react-text-annotator.es22.js +0 -901
  35. package/dist/react-text-annotator.es22.js.map +0 -1
  36. package/dist/react-text-annotator.es23.js +0 -5
  37. package/dist/react-text-annotator.es23.js.map +0 -1
  38. package/dist/react-text-annotator.es24.js +0 -5
  39. package/dist/react-text-annotator.es24.js.map +0 -1
  40. package/dist/react-text-annotator.es25.js +0 -117
  41. package/dist/react-text-annotator.es25.js.map +0 -1
  42. package/dist/react-text-annotator.es26.js +0 -312
  43. package/dist/react-text-annotator.es26.js.map +0 -1
  44. package/dist/react-text-annotator.es27.js +0 -61
  45. package/dist/react-text-annotator.es27.js.map +0 -1
  46. package/dist/react-text-annotator.es28.js +0 -23
  47. package/dist/react-text-annotator.es28.js.map +0 -1
  48. package/dist/react-text-annotator.es29.js +0 -130
  49. package/dist/react-text-annotator.es29.js.map +0 -1
  50. package/dist/react-text-annotator.es3.js +0 -29
  51. package/dist/react-text-annotator.es3.js.map +0 -1
  52. package/dist/react-text-annotator.es30.js +0 -167
  53. package/dist/react-text-annotator.es30.js.map +0 -1
  54. package/dist/react-text-annotator.es31.js +0 -314
  55. package/dist/react-text-annotator.es31.js.map +0 -1
  56. package/dist/react-text-annotator.es32.js +0 -152
  57. package/dist/react-text-annotator.es32.js.map +0 -1
  58. package/dist/react-text-annotator.es33.js +0 -629
  59. package/dist/react-text-annotator.es33.js.map +0 -1
  60. package/dist/react-text-annotator.es4.js +0 -43
  61. package/dist/react-text-annotator.es4.js.map +0 -1
  62. package/dist/react-text-annotator.es5.js +0 -48
  63. package/dist/react-text-annotator.es5.js.map +0 -1
  64. package/dist/react-text-annotator.es6.js +0 -29
  65. package/dist/react-text-annotator.es6.js.map +0 -1
  66. package/dist/react-text-annotator.es7.js +0 -151
  67. package/dist/react-text-annotator.es7.js.map +0 -1
  68. package/dist/react-text-annotator.es8.js +0 -562
  69. package/dist/react-text-annotator.es8.js.map +0 -1
  70. package/dist/react-text-annotator.es9.js +0 -13
  71. package/dist/react-text-annotator.es9.js.map +0 -1
@@ -1,64 +0,0 @@
1
- import { j as jsxRuntimeExports } from "./react-text-annotator.es9.js";
2
- import { useRef, useEffect } from "react";
3
- import CETEI from "./react-text-annotator.es11.js";
4
- const PRESET_BEHAVIORS = {
5
- tei: {
6
- ref: (elem) => {
7
- const a = document.createElement("a");
8
- while (elem.firstChild) {
9
- a.appendChild(elem.removeChild(elem.firstChild));
10
- }
11
- a.setAttribute("href", elem.getAttribute("target"));
12
- elem.appendChild(a);
13
- },
14
- // Cf. https://github.com/TEIC/CETEIcean/issues/67
15
- graphic: (elem) => {
16
- var _a;
17
- const content = new Image();
18
- content.src = (_a = elem.getAttribute("url")) == null ? void 0 : _a.trim();
19
- if (elem.hasAttribute("width"))
20
- content.setAttribute("width", elem.getAttribute("width"));
21
- if (elem.hasAttribute("height"))
22
- content.setAttribute("height", elem.getAttribute("height"));
23
- elem.appendChild(content);
24
- },
25
- list: null,
26
- note: null,
27
- table: null,
28
- teiHeader: (elem) => {
29
- elem.hidden = true;
30
- }
31
- }
32
- };
33
- const CETEIcean = (props) => {
34
- const el = useRef(null);
35
- useEffect(() => {
36
- var _a;
37
- if (props.tei) {
38
- const ceteicean = new CETEI();
39
- ceteicean.addBehaviors({
40
- ...PRESET_BEHAVIORS,
41
- ...props.behaviors || {},
42
- tei: {
43
- ...PRESET_BEHAVIORS.tei,
44
- ...((_a = props.behaviors) == null ? void 0 : _a.tei) || {}
45
- }
46
- });
47
- ceteicean.makeHTML5(props.tei, (data) => {
48
- el.current.appendChild(data);
49
- props.onLoad(el.current);
50
- });
51
- }
52
- }, [props.tei]);
53
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
54
- "div",
55
- {
56
- ref: el,
57
- className: "tei-container"
58
- }
59
- );
60
- };
61
- export {
62
- CETEIcean
63
- };
64
- //# sourceMappingURL=react-text-annotator.es2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-text-annotator.es2.js","sources":["../src/tei/CETEIcean.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport CETEI from 'CETEIcean';\n\ninterface CETEIceanProps {\n\n tei?: string;\n\n onLoad?(element: Element): void;\n\n behaviors?: any;\n\n}\n\n// Override default list, note, table, and ref behaviors \n// so they don't introduce text into the DOM that interferes\n// with annotation. Apply a patch to graphics for robustness.\nconst PRESET_BEHAVIORS = {\n tei: {\n ref: (elem: Element) => {\n const a = document.createElement('a');\n\n while(elem.firstChild) {\n a.appendChild(elem.removeChild(elem.firstChild));\n }\n\n a.setAttribute('href', elem.getAttribute('target'));\n\n elem.appendChild(a);\n },\n // Cf. https://github.com/TEIC/CETEIcean/issues/67\n graphic: (elem: Element) => {\n const content = new Image();\n content.src = elem.getAttribute('url')?.trim();\n\n if (elem.hasAttribute('width'))\n content.setAttribute('width', elem.getAttribute('width'));\n\n if (elem.hasAttribute('height'))\n content.setAttribute('height', elem.getAttribute('height'));\n\n elem.appendChild(content);\n },\n list: null,\n note: null,\n table: null,\n teiHeader: (elem: HTMLElement) => {\n elem.hidden = true;\n }\n }\n}\n\nexport const CETEIcean = (props: CETEIceanProps) => {\n\n const el = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (props.tei) {\n const ceteicean = new CETEI();\n\n ceteicean.addBehaviors({\n ...PRESET_BEHAVIORS,\n ...(props.behaviors || {}),\n tei: {\n ...PRESET_BEHAVIORS.tei,\n ...(props.behaviors?.tei || {})\n }\n });\n\n ceteicean.makeHTML5(props.tei, (data: Element) => {\n el.current.appendChild(data);\n props.onLoad(el.current);\n });\n }\n }, [props.tei]);\n\n return (\n <div \n ref={el}\n className=\"tei-container\" />\n )\n\n}"],"names":["jsx"],"mappings":";;;AAgBA,MAAM,mBAAmB;AAAA,EACvB,KAAK;AAAA,IACH,KAAK,CAAC,SAAkB;AAChB,YAAA,IAAI,SAAS,cAAc,GAAG;AAEpC,aAAM,KAAK,YAAY;AACrB,UAAE,YAAY,KAAK,YAAY,KAAK,UAAU,CAAC;AAAA,MAAA;AAGjD,QAAE,aAAa,QAAQ,KAAK,aAAa,QAAQ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js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-text-annotator.es20.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,34 +0,0 @@
1
- import { __exports as reactJsxRuntime_production_min } from "./react-text-annotator.es23.js";
2
- import React__default from "react";
3
- /**
4
- * @license React
5
- * react-jsx-runtime.production.min.js
6
- *
7
- * Copyright (c) Facebook, Inc. and its affiliates.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */
12
- var hasRequiredReactJsxRuntime_production_min;
13
- function requireReactJsxRuntime_production_min() {
14
- if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
15
- hasRequiredReactJsxRuntime_production_min = 1;
16
- var f = React__default, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
17
- function q(c, a, g) {
18
- var b, d = {}, e = null, h = null;
19
- void 0 !== g && (e = "" + g);
20
- void 0 !== a.key && (e = "" + a.key);
21
- void 0 !== a.ref && (h = a.ref);
22
- for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
23
- if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
24
- return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
25
- }
26
- reactJsxRuntime_production_min.Fragment = l;
27
- reactJsxRuntime_production_min.jsx = q;
28
- reactJsxRuntime_production_min.jsxs = q;
29
- return reactJsxRuntime_production_min;
30
- }
31
- export {
32
- requireReactJsxRuntime_production_min as __require
33
- };
34
- //# sourceMappingURL=react-text-annotator.es21.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-text-annotator.es21.js","sources":["../../../node_modules/react/cjs/react-jsx-runtime.production.min.js"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n"],"names":["require$$0"],"mappings":";;;;;;;;;;;;;;;AASa,MAAI,IAAEA,gBAAiB,IAAE,OAAO,IAAI,eAAe,GAAE,IAAE,OAAO,IAAI,gBAAgB,GAAE,IAAE,OAAO,UAAU,gBAAe,IAAE,EAAE,mDAAmD,mBAAkB,IAAE,EAAC,KAAI,MAAG,KAAI,MAAG,QAAO,MAAG,UAAS,KAAE;AAClP,WAAS,EAAE,GAAE,GAAE,GAAE;AAAC,QAAI,GAAE,IAAE,IAAG,IAAE,MAAK,IAAE;AAAK,eAAS,MAAI,IAAE,KAAG;AAAG,eAAS,EAAE,QAAM,IAAE,KAAG,EAAE;AAAK,eAAS,EAAE,QAAM,IAAE,EAAE;AAAK,SAAI,KAAK,EAAE,GAAE,KAAK,GAAE,CAAC,KAAG,CAAC,EAAE,eAAe,CAAC,MAAI,EAAE,CAAC,IAAE,EAAE,CAAC;AAAG,QAAG,KAAG,EAAE,aAAa,MAAI,KAAK,IAAE,EAAE,cAAa,EAAE,YAAS,EAAE,CAAC,MAAI,EAAE,CAAC,IAAE,EAAE,CAAC;AAAG,WAAM,EAAC,UAAS,GAAE,MAAK,GAAE,KAAI,GAAE,KAAI,GAAE,OAAM,GAAE,QAAO,EAAE,QAAO;AAAA,EAAC;AAAC,4CAAiB;AAAE,iCAAW,MAAC;AAAE,iCAAA,OAAa;;;","x_google_ignoreList":[0]}