@soomo/react-text-annotator 3.0.0-staging.3 → 3.0.0-staging.31

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 (58) hide show
  1. package/dist/TextAnnotator.d.ts +3 -3
  2. package/dist/TextAnnotator.d.ts.map +1 -1
  3. package/dist/TextAnnotatorPlugin.d.ts +1 -2
  4. package/dist/TextAnnotatorPlugin.d.ts.map +1 -1
  5. package/dist/TextAnnotatorPopup.d.ts +6 -5
  6. package/dist/TextAnnotatorPopup.d.ts.map +1 -1
  7. package/dist/index.d.ts +6 -2
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/react-text-annotator.css +1 -1
  10. package/dist/react-text-annotator.es.js +8 -2
  11. package/dist/react-text-annotator.es.js.map +1 -1
  12. package/dist/react-text-annotator.es10.js +234 -33
  13. package/dist/react-text-annotator.es10.js.map +1 -1
  14. package/dist/react-text-annotator.es11.js +566 -888
  15. package/dist/react-text-annotator.es11.js.map +1 -1
  16. package/dist/react-text-annotator.es12.js +487 -2
  17. package/dist/react-text-annotator.es12.js.map +1 -1
  18. package/dist/react-text-annotator.es13.js +2 -2
  19. package/dist/react-text-annotator.es14.js +30 -113
  20. package/dist/react-text-annotator.es14.js.map +1 -1
  21. package/dist/react-text-annotator.es15.js +886 -297
  22. package/dist/react-text-annotator.es15.js.map +1 -1
  23. package/dist/react-text-annotator.es16.js +42 -49
  24. package/dist/react-text-annotator.es16.js.map +1 -1
  25. package/dist/react-text-annotator.es17.js +142 -15
  26. package/dist/react-text-annotator.es17.js.map +1 -1
  27. package/dist/react-text-annotator.es18.js +5 -0
  28. package/dist/react-text-annotator.es18.js.map +1 -0
  29. package/dist/react-text-annotator.es19.js +5 -0
  30. package/dist/react-text-annotator.es19.js.map +1 -0
  31. package/dist/react-text-annotator.es2.js +2 -2
  32. package/dist/react-text-annotator.es20.js +117 -0
  33. package/dist/react-text-annotator.es20.js.map +1 -0
  34. package/dist/react-text-annotator.es21.js +312 -0
  35. package/dist/react-text-annotator.es21.js.map +1 -0
  36. package/dist/react-text-annotator.es22.js +61 -0
  37. package/dist/react-text-annotator.es22.js.map +1 -0
  38. package/dist/react-text-annotator.es23.js +23 -0
  39. package/dist/react-text-annotator.es23.js.map +1 -0
  40. package/dist/react-text-annotator.es24.js +86 -0
  41. package/dist/react-text-annotator.es24.js.map +1 -0
  42. package/dist/react-text-annotator.es25.js +458 -0
  43. package/dist/react-text-annotator.es25.js.map +1 -0
  44. package/dist/react-text-annotator.es3.js +2 -2
  45. package/dist/react-text-annotator.es4.js +7 -14
  46. package/dist/react-text-annotator.es4.js.map +1 -1
  47. package/dist/react-text-annotator.es5.js +59 -38
  48. package/dist/react-text-annotator.es5.js.map +1 -1
  49. package/dist/react-text-annotator.es6.js +178 -9
  50. package/dist/react-text-annotator.es6.js.map +1 -1
  51. package/dist/react-text-annotator.es7.js +12 -1
  52. package/dist/react-text-annotator.es7.js.map +1 -1
  53. package/dist/react-text-annotator.es9.js +669 -2
  54. package/dist/react-text-annotator.es9.js.map +1 -1
  55. package/dist/tei/TEIAnnotator.d.ts +2 -2
  56. package/package.json +21 -15
  57. package/dist/react-text-annotator.es8.js +0 -491
  58. package/dist/react-text-annotator.es8.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { HighlightStyleExpression, TextAnnotation, TextAnnotatorOptions } from '@soomo/text-annotator';
2
- import { FormatAdapter } from '@annotorious/core';
3
- import { Filter } from '@annotorious/react';
4
1
  import { ReactNode } from 'react';
2
+ import { Filter } from '@annotorious/react';
3
+ import { FormatAdapter } from '@annotorious/core';
4
+ import { HighlightStyleExpression, TextAnnotation, TextAnnotatorOptions } from '@soomo/text-annotator';
5
5
 
6
6
  export interface TextAnnotatorProps<E extends unknown> extends Omit<TextAnnotatorOptions<E>, 'adapter'> {
7
7
  children?: ReactNode | JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"TextAnnotator.d.ts","sourceRoot":"","sources":["../src/TextAnnotator.tsx"],"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AQ,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC;IAErG,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC;IAEnC,OAAO,CAAC,EAAE,aAAa,CAAC,cAAc,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,WAAW,KAAK,aAAa,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAEnH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,wBAAwB,CAAC;IAEjC,SAAS,CAAC,EAAE,MAAM,CAAC;CAEpB;AAED,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,OAAO,SAAS,kBAAkB,CAAC,CAAC,CAAC,4CAgC5E,CAAC"}
@@ -1,6 +1,5 @@
1
+ import { AnnotatorPlugin } from '@annotorious/react';
1
2
  import { TextAnnotator } from '@soomo/text-annotator';
2
- import { AnnotatorPlugin, AnnotoriousPlugin } from '@annotorious/react';
3
3
 
4
4
  export type TextAnnotatorPlugin<T extends unknown = TextAnnotator> = AnnotatorPlugin<T>;
5
- export { AnnotoriousPlugin as TextAnnotatorPlugin };
6
5
  //# sourceMappingURL=TextAnnotatorPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextAnnotatorPlugin.d.ts","sourceRoot":"","sources":["../src/TextAnnotatorPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,OAAO,GAAG,aAAa,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AACxF,OAAO,EAAE,iBAAiB,IAAI,mBAAmB,EAAE,CAAA"}
1
+ {"version":3,"file":"TextAnnotatorPlugin.d.ts","sourceRoot":"","sources":["../src/TextAnnotatorPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,OAAO,GAAG,aAAa,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC"}
@@ -1,14 +1,15 @@
1
- import { TextAnnotation } from '@soomo/text-annotator';
2
1
  import { ReactNode } from 'react';
2
+ import { TextAnnotation } from '@soomo/text-annotator';
3
3
 
4
+ interface TextAnnotationPopupProps {
5
+ popup(props: TextAnnotatorPopupProps): ReactNode;
6
+ }
4
7
  export interface TextAnnotatorPopupProps {
5
8
  selected: {
6
9
  annotation: TextAnnotation;
7
10
  editable?: boolean;
8
11
  }[];
9
12
  }
10
- export interface TextAnnotatorPopupContainerProps {
11
- popup(props: TextAnnotatorPopupProps): ReactNode | JSX.Element;
12
- }
13
- export declare const TextAnnotatorPopup: (props: TextAnnotatorPopupContainerProps) => import('react').ReactPortal;
13
+ export declare const TextAnnotatorPopup: (props: TextAnnotationPopupProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
14
15
  //# sourceMappingURL=TextAnnotatorPopup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextAnnotatorPopup.d.ts","sourceRoot":"","sources":["../src/TextAnnotatorPopup.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAiB,cAAc,EAAsB,MAAM,uBAAuB,CAAC;AAG1F,MAAM,WAAW,uBAAuB;IAEtC,QAAQ,EAAE;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CAEhE;AAED,MAAM,WAAW,gCAAgC;IAE/C,KAAK,CAAC,KAAK,EAAE,uBAAuB,GAAG,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC;CAEhE;AAED,eAAO,MAAM,kBAAkB,UAAW,gCAAgC,gCA0DzE,CAAA"}
1
+ {"version":3,"file":"TextAnnotatorPopup.d.ts","sourceRoot":"","sources":["../src/TextAnnotatorPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAoC,MAAM,OAAO,CAAC;AAElF,OAAO,EAA4C,KAAK,cAAc,EAAsB,MAAM,uBAAuB,CAAC;AAY1H,UAAU,wBAAwB;IAEhC,KAAK,CAAC,KAAK,EAAE,uBAAuB,GAAG,SAAS,CAAC;CAElD;AAED,MAAM,WAAW,uBAAuB;IAEtC,QAAQ,EAAE;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CAEhE;AAED,eAAO,MAAM,kBAAkB,UAAW,wBAAwB,4CA0EjE,CAAA"}
package/dist/index.d.ts CHANGED
@@ -2,6 +2,10 @@ export * from './tei';
2
2
  export * from './TextAnnotator';
3
3
  export * from './TextAnnotatorPopup';
4
4
  export * from './TextAnnotatorPlugin';
5
- export type { AnnotoriousPlugin } from '@annotorious/react';
6
- export type { TextAnnotation, TextAnnotator as RecogitoTextAnnotator } from '@soomo/text-annotator';
5
+ export type { Annotation, AnnotationBody, AnnotationTarget, Annotator, AnnotatorState, Color, Filter, FormatAdapter, HoverState, Selection, SelectionState, Store, StoreChangeEvent, StoreObserver, ParseResult, User, W3CAnnotation, W3CAnnotationBody, W3CAnnotationTarget } from '@annotorious/core';
6
+ export { createBody, Origin, PointerSelectAction } from '@annotorious/core';
7
+ export { AnnotoriousPlugin } from '@annotorious/react';
8
+ export type { HighlightStyle, HighlightStyleExpression, TextAnnotation, TextAnnotationTarget, TextSelector, W3CTextAnnotation, W3CTextAnnotationTarget, W3CTextSelector, W3CAnnotationStylesheet, TextAnnotator as RecogitoTextAnnotator, TextAnnotationStore } from '@soomo/text-annotator';
9
+ export { W3CTextFormat } from '@recogito/text-annotator';
10
+ export type { RecogitoTEIAnnotator, TEIAnnotation, TEIAnnotationTarget, TEIRangeSelector } from '@recogito/text-annotator-tei';
7
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAGtC,YAAY,EACV,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,cAAc,EACd,aAAa,IAAI,qBAAqB,EACvC,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAGtC,YAAY,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,KAAK,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,SAAS,EACT,cAAc,EACd,KAAK,EACL,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,UAAU,EACV,MAAM,EACN,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACN,iBAAiB,EACjB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,uBAAuB,EACvB,aAAa,IAAI,qBAAqB,EACtC,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,aAAa,EACd,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC"}
@@ -1 +1 @@
1
- .r6o-annotatable .r6o-span-highlight-layer{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.r6o-annotatable .r6o-span-highlight-layer.hidden{display:none}.r6o-annotatable .r6o-span-highlight-layer .r6o-annotation{border-style:solid;border-width:0;position:absolute;display:block}html,body{overscroll-behavior-y:none}.r6o-annotatable{-webkit-tap-highlight-color:transparent}.r6o-annotatable,.r6o-annotatable *{position:relative}.hovered *{cursor:pointer}.r6o-highlight-layer{left:0;position:fixed;top:0;bottom:0;width:100vw;pointer-events:none}*::selection,::selection{background:#0080ff2e}::-moz-selection{background:#0080ff2e}
1
+ .r6o-canvas-highlight-layer{position:fixed;top:0;bottom:0;left:0;width:100vw;height:100vh;pointer-events:none}.r6o-canvas-highlight-layer.bg{mix-blend-mode:multiply;z-index:1}.r6o-annotatable .r6o-span-highlight-layer{height:100%;left:0;mix-blend-mode:multiply;pointer-events:none;position:absolute;top:0;width:100%}.r6o-annotatable .r6o-span-highlight-layer.hidden{display:none}.r6o-annotatable .r6o-span-highlight-layer .r6o-annotation{border-style:solid;border-width:0;box-sizing:content-box;display:block;position:absolute}.r6o-annotation{box-sizing:content-box}.r6o-presence-layer{left:0;position:fixed;top:0;bottom:0;width:100vw;pointer-events:none}html,body{overscroll-behavior-y:none}.r6o-annotatable{position:relative;-webkit-tap-highlight-color:transparent}.hovered *{cursor:pointer}*::selection,::selection{background:#0080ff2e}::-moz-selection{background:#0080ff2e}
@@ -2,12 +2,18 @@ import { CETEIcean } from "./react-text-annotator.es2.js";
2
2
  import { TEIAnnotator } from "./react-text-annotator.es3.js";
3
3
  import { TextAnnotator } from "./react-text-annotator.es4.js";
4
4
  import { TextAnnotatorPopup } from "./react-text-annotator.es5.js";
5
+ import { Origin, PointerSelectAction, createBody } from "@annotorious/core";
5
6
  import { AnnotoriousPlugin } from "@annotorious/react";
7
+ import { W3CTextFormat } from "./react-text-annotator.es6.js";
6
8
  export {
9
+ AnnotoriousPlugin,
7
10
  CETEIcean,
11
+ Origin,
12
+ PointerSelectAction,
8
13
  TEIAnnotator,
9
14
  TextAnnotator,
10
- AnnotoriousPlugin as TextAnnotatorPlugin,
11
- TextAnnotatorPopup
15
+ TextAnnotatorPopup,
16
+ W3CTextFormat,
17
+ createBody
12
18
  };
13
19
  //# sourceMappingURL=react-text-annotator.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-text-annotator.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"react-text-annotator.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,38 +1,239 @@
1
- import { __exports as reactJsxRuntime_production_min } from "./react-text-annotator.es12.js";
2
- import require$$0 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)
15
- return reactJsxRuntime_production_min;
16
- hasRequiredReactJsxRuntime_production_min = 1;
17
- var f = require$$0, 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 };
18
- function q(c, a, g) {
19
- var b, d = {}, e = null, h = null;
20
- void 0 !== g && (e = "" + g);
21
- void 0 !== a.key && (e = "" + a.key);
22
- void 0 !== a.ref && (h = a.ref);
23
- for (b in a)
24
- m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
25
- if (c && c.defaultProps)
26
- for (b in a = c.defaultProps, a)
27
- void 0 === d[b] && (d[b] = a[b]);
28
- return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
1
+ import { computePosition, offset as offset$1, shift as shift$1, inline as inline$1 } from "./react-text-annotator.es11.js";
2
+ import { autoUpdate, platform } from "./react-text-annotator.es11.js";
3
+ import * as React from "react";
4
+ import { useLayoutEffect, useEffect } from "react";
5
+ import * as ReactDOM from "react-dom";
6
+ var index = typeof document !== "undefined" ? useLayoutEffect : useEffect;
7
+ function deepEqual(a, b) {
8
+ if (a === b) {
9
+ return true;
29
10
  }
30
- reactJsxRuntime_production_min.Fragment = l;
31
- reactJsxRuntime_production_min.jsx = q;
32
- reactJsxRuntime_production_min.jsxs = q;
33
- return reactJsxRuntime_production_min;
11
+ if (typeof a !== typeof b) {
12
+ return false;
13
+ }
14
+ if (typeof a === "function" && a.toString() === b.toString()) {
15
+ return true;
16
+ }
17
+ let length;
18
+ let i;
19
+ let keys;
20
+ if (a && b && typeof a === "object") {
21
+ if (Array.isArray(a)) {
22
+ length = a.length;
23
+ if (length !== b.length) return false;
24
+ for (i = length; i-- !== 0; ) {
25
+ if (!deepEqual(a[i], b[i])) {
26
+ return false;
27
+ }
28
+ }
29
+ return true;
30
+ }
31
+ keys = Object.keys(a);
32
+ length = keys.length;
33
+ if (length !== Object.keys(b).length) {
34
+ return false;
35
+ }
36
+ for (i = length; i-- !== 0; ) {
37
+ if (!{}.hasOwnProperty.call(b, keys[i])) {
38
+ return false;
39
+ }
40
+ }
41
+ for (i = length; i-- !== 0; ) {
42
+ const key = keys[i];
43
+ if (key === "_owner" && a.$$typeof) {
44
+ continue;
45
+ }
46
+ if (!deepEqual(a[key], b[key])) {
47
+ return false;
48
+ }
49
+ }
50
+ return true;
51
+ }
52
+ return a !== a && b !== b;
53
+ }
54
+ function getDPR(element) {
55
+ if (typeof window === "undefined") {
56
+ return 1;
57
+ }
58
+ const win = element.ownerDocument.defaultView || window;
59
+ return win.devicePixelRatio || 1;
60
+ }
61
+ function roundByDPR(element, value) {
62
+ const dpr = getDPR(element);
63
+ return Math.round(value * dpr) / dpr;
64
+ }
65
+ function useLatestRef(value) {
66
+ const ref = React.useRef(value);
67
+ index(() => {
68
+ ref.current = value;
69
+ });
70
+ return ref;
71
+ }
72
+ function useFloating(options) {
73
+ if (options === void 0) {
74
+ options = {};
75
+ }
76
+ const {
77
+ placement = "bottom",
78
+ strategy = "absolute",
79
+ middleware = [],
80
+ platform: platform2,
81
+ elements: {
82
+ reference: externalReference,
83
+ floating: externalFloating
84
+ } = {},
85
+ transform = true,
86
+ whileElementsMounted,
87
+ open
88
+ } = options;
89
+ const [data, setData] = React.useState({
90
+ x: 0,
91
+ y: 0,
92
+ strategy,
93
+ placement,
94
+ middlewareData: {},
95
+ isPositioned: false
96
+ });
97
+ const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
98
+ if (!deepEqual(latestMiddleware, middleware)) {
99
+ setLatestMiddleware(middleware);
100
+ }
101
+ const [_reference, _setReference] = React.useState(null);
102
+ const [_floating, _setFloating] = React.useState(null);
103
+ const setReference = React.useCallback((node) => {
104
+ if (node !== referenceRef.current) {
105
+ referenceRef.current = node;
106
+ _setReference(node);
107
+ }
108
+ }, []);
109
+ const setFloating = React.useCallback((node) => {
110
+ if (node !== floatingRef.current) {
111
+ floatingRef.current = node;
112
+ _setFloating(node);
113
+ }
114
+ }, []);
115
+ const referenceEl = externalReference || _reference;
116
+ const floatingEl = externalFloating || _floating;
117
+ const referenceRef = React.useRef(null);
118
+ const floatingRef = React.useRef(null);
119
+ const dataRef = React.useRef(data);
120
+ const hasWhileElementsMounted = whileElementsMounted != null;
121
+ const whileElementsMountedRef = useLatestRef(whileElementsMounted);
122
+ const platformRef = useLatestRef(platform2);
123
+ const update = React.useCallback(() => {
124
+ if (!referenceRef.current || !floatingRef.current) {
125
+ return;
126
+ }
127
+ const config = {
128
+ placement,
129
+ strategy,
130
+ middleware: latestMiddleware
131
+ };
132
+ if (platformRef.current) {
133
+ config.platform = platformRef.current;
134
+ }
135
+ computePosition(referenceRef.current, floatingRef.current, config).then((data2) => {
136
+ const fullData = {
137
+ ...data2,
138
+ isPositioned: true
139
+ };
140
+ if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
141
+ dataRef.current = fullData;
142
+ ReactDOM.flushSync(() => {
143
+ setData(fullData);
144
+ });
145
+ }
146
+ });
147
+ }, [latestMiddleware, placement, strategy, platformRef]);
148
+ index(() => {
149
+ if (open === false && dataRef.current.isPositioned) {
150
+ dataRef.current.isPositioned = false;
151
+ setData((data2) => ({
152
+ ...data2,
153
+ isPositioned: false
154
+ }));
155
+ }
156
+ }, [open]);
157
+ const isMountedRef = React.useRef(false);
158
+ index(() => {
159
+ isMountedRef.current = true;
160
+ return () => {
161
+ isMountedRef.current = false;
162
+ };
163
+ }, []);
164
+ index(() => {
165
+ if (referenceEl) referenceRef.current = referenceEl;
166
+ if (floatingEl) floatingRef.current = floatingEl;
167
+ if (referenceEl && floatingEl) {
168
+ if (whileElementsMountedRef.current) {
169
+ return whileElementsMountedRef.current(referenceEl, floatingEl, update);
170
+ }
171
+ update();
172
+ }
173
+ }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
174
+ const refs = React.useMemo(() => ({
175
+ reference: referenceRef,
176
+ floating: floatingRef,
177
+ setReference,
178
+ setFloating
179
+ }), [setReference, setFloating]);
180
+ const elements = React.useMemo(() => ({
181
+ reference: referenceEl,
182
+ floating: floatingEl
183
+ }), [referenceEl, floatingEl]);
184
+ const floatingStyles = React.useMemo(() => {
185
+ const initialStyles = {
186
+ position: strategy,
187
+ left: 0,
188
+ top: 0
189
+ };
190
+ if (!elements.floating) {
191
+ return initialStyles;
192
+ }
193
+ const x = roundByDPR(elements.floating, data.x);
194
+ const y = roundByDPR(elements.floating, data.y);
195
+ if (transform) {
196
+ return {
197
+ ...initialStyles,
198
+ transform: "translate(" + x + "px, " + y + "px)",
199
+ ...getDPR(elements.floating) >= 1.5 && {
200
+ willChange: "transform"
201
+ }
202
+ };
203
+ }
204
+ return {
205
+ position: strategy,
206
+ left: x,
207
+ top: y
208
+ };
209
+ }, [strategy, transform, elements.floating, data.x, data.y]);
210
+ return React.useMemo(() => ({
211
+ ...data,
212
+ update,
213
+ refs,
214
+ elements,
215
+ floatingStyles
216
+ }), [data, update, refs, elements, floatingStyles]);
34
217
  }
218
+ const offset = (options, deps) => ({
219
+ ...offset$1(options),
220
+ options: [options, deps]
221
+ });
222
+ const shift = (options, deps) => ({
223
+ ...shift$1(options),
224
+ options: [options, deps]
225
+ });
226
+ const inline = (options, deps) => ({
227
+ ...inline$1(options),
228
+ options: [options, deps]
229
+ });
35
230
  export {
36
- requireReactJsxRuntime_production_min as __require
231
+ autoUpdate,
232
+ computePosition,
233
+ inline,
234
+ offset,
235
+ platform,
236
+ shift,
237
+ useFloating
37
238
  };
38
239
  //# sourceMappingURL=react-text-annotator.es10.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-text-annotator.es10.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":[],"mappings":";;;;;;;;;;;;;;;;AASa,MAAI,IAAE,YAAiB,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;AAAE,QAAE,KAAK,GAAE,CAAC,KAAG,CAAC,EAAE,eAAe,CAAC,MAAI,EAAE,CAAC,IAAE,EAAE,CAAC;AAAG,QAAG,KAAG,EAAE;AAAa,WAAI,KAAK,IAAE,EAAE,cAAa;AAAE,mBAAS,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]}
1
+ {"version":3,"file":"react-text-annotator.es10.js","sources":["../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"],"sourcesContent":["import { computePosition, arrow as arrow$2, offset as offset$1, shift as shift$1, limitShift as limitShift$1, flip as flip$1, size as size$1, autoPlacement as autoPlacement$1, hide as hide$1, inline as inline$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect, useEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n isPositioned: true\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => ({\n ...offset$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => ({\n ...shift$1(options),\n options: [options, deps]\n});\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => ({\n ...limitShift$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => ({\n ...flip$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => ({\n ...size$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => ({\n ...autoPlacement$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => ({\n ...hide$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => ({\n ...inline$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => ({\n ...arrow$1(options),\n options: [options, deps]\n});\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n"],"names":["platform","data"],"mappings":";;;;;AAMA,IAAI,QAAQ,OAAO,aAAa,cAAc,kBAAkB;AAIhE,SAAS,UAAU,GAAG,GAAG;AACvB,MAAI,MAAM,GAAG;AACX,WAAO;AAAA,EACR;AACD,MAAI,OAAO,MAAM,OAAO,GAAG;AACzB,WAAO;AAAA,EACR;AACD,MAAI,OAAO,MAAM,cAAc,EAAE,eAAe,EAAE,YAAY;AAC5D,WAAO;AAAA,EACR;AACD,MAAI;AACJ,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