@soomo/react-text-annotator 3.0.0-staging.41 → 3.0.0-staging.43

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 (35) hide show
  1. package/dist/TextAnnotatorPopup/TextAnnotatorPopup.d.ts.map +1 -1
  2. package/dist/react-text-annotator.es11.js +417 -1381
  3. package/dist/react-text-annotator.es11.js.map +1 -1
  4. package/dist/react-text-annotator.es12.js +1454 -0
  5. package/dist/react-text-annotator.es12.js.map +1 -0
  6. package/dist/react-text-annotator.es14.js +210 -538
  7. package/dist/react-text-annotator.es14.js.map +1 -1
  8. package/dist/react-text-annotator.es15.js +527 -445
  9. package/dist/react-text-annotator.es15.js.map +1 -1
  10. package/dist/react-text-annotator.es19.js +1 -1
  11. package/dist/react-text-annotator.es2.js +1 -1
  12. package/dist/react-text-annotator.es20.js +1 -1
  13. package/dist/react-text-annotator.es21.js +111 -124
  14. package/dist/react-text-annotator.es21.js.map +1 -1
  15. package/dist/react-text-annotator.es22.js +286 -129
  16. package/dist/react-text-annotator.es22.js.map +1 -1
  17. package/dist/react-text-annotator.es23.js +43 -296
  18. package/dist/react-text-annotator.es23.js.map +1 -1
  19. package/dist/react-text-annotator.es24.js +19 -113
  20. package/dist/react-text-annotator.es24.js.map +1 -1
  21. package/dist/react-text-annotator.es25.js +2 -309
  22. package/dist/react-text-annotator.es25.js.map +1 -1
  23. package/dist/react-text-annotator.es26.js +2 -58
  24. package/dist/react-text-annotator.es26.js.map +1 -1
  25. package/dist/react-text-annotator.es27.js +124 -17
  26. package/dist/react-text-annotator.es27.js.map +1 -1
  27. package/dist/react-text-annotator.es28.js +152 -2
  28. package/dist/react-text-annotator.es28.js.map +1 -1
  29. package/dist/react-text-annotator.es29.js +311 -2
  30. package/dist/react-text-annotator.es29.js.map +1 -1
  31. package/dist/react-text-annotator.es7.js +22 -18
  32. package/dist/react-text-annotator.es7.js.map +1 -1
  33. package/package.json +2 -2
  34. package/dist/react-text-annotator.es13.js +0 -244
  35. package/dist/react-text-annotator.es13.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"react-text-annotator.es7.js","sources":["../src/TextAnnotatorPopup/TextAnnotatorPopup.tsx"],"sourcesContent":["import React, { FC, PointerEvent, ReactNode, useCallback, useEffect, useState } from 'react';\nimport {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingPortal,\n inline,\n offset,\n shift,\n useDismiss,\n useFloating,\n useInteractions,\n useRole\n} from '@floating-ui/react';\n\nimport { useAnnotator, useSelection } from '@annotorious/react';\nimport {\n denormalizeRectWithOffset,\n toDomRectList,\n type TextAnnotation,\n type TextAnnotator,\n} from '@soomo/text-annotator';\n\nimport { useAnnouncePopupNavigation, useRestoreSelectionCaret } from '../hooks';\nimport './TextAnnotatorPopup.css';\n\ninterface TextAnnotationPopupProps {\n\n popupNavigationMessage?: string;\n\n popup(props: TextAnnotatorPopupProps): ReactNode;\n\n}\n\nexport interface TextAnnotatorPopupProps {\n\n selected: { annotation: TextAnnotation, editable?: boolean }[];\n\n}\n\nexport const TextAnnotatorPopup: FC<TextAnnotationPopupProps> = (props) => {\n\n const { popup, popupNavigationMessage } = props;\n\n const r = useAnnotator<TextAnnotator>();\n\n const { selected, event } = useSelection<TextAnnotation>();\n const annotation = selected[0]?.annotation;\n\n const [isOpen, setOpen] = useState(selected?.length > 0);\n const handleClose = () => r?.cancelSelected();\n\n const [isFloatingFocused, setFloatingFocused] = useState(false);\n const handleFloatingFocus = () => setFloatingFocused(true);\n const handleFloatingBlur = () => setFloatingFocused(false);\n useEffect(() => {\n if (!isOpen) handleFloatingBlur();\n }, [isOpen, handleFloatingBlur]);\n\n const { refs, floatingStyles, update, context } = useFloating({\n placement: 'top',\n open: isOpen,\n onOpenChange: (open, event, reason) => {\n setOpen(open);\n\n if (!open) {\n if (\n reason === 'escape-key' ||\n /**\n * When the focus leaves the floating - cancel the selection.\n * However, it doesn't have a distinct reason yet, will be resolved in the discussion:\n * @see https://github.com/floating-ui/floating-ui/discussions/3012#discussioncomment-10405906\n */\n event instanceof FocusEvent\n ) {\n handleClose();\n }\n }\n },\n middleware: [\n offset(10),\n inline(),\n flip(),\n shift({ mainAxis: false, crossAxis: true, padding: 10 })\n ],\n whileElementsMounted: autoUpdate\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context, { role: 'dialog' });\n const { getFloatingProps } = useInteractions([dismiss, role]);\n\n const selectedKey = selected.map(a => a.annotation.id).join('-');\n useEffect(() => {\n // Ignore all selection changes except those accompanied by a user event.\n if (selected.length > 0 && event) {\n setOpen(event.type === 'pointerup' || event.type === 'keydown');\n }\n }, [selectedKey, event]);\n\n useEffect(() => {\n // Close the popup if the selection is cleared\n if (selected.length === 0 && isOpen) {\n setOpen(false);\n }\n }, [isOpen, selectedKey]);\n\n useEffect(() => {\n if (!isOpen || !annotation?.id || !r) return;\n\n refs.setPositionReference({\n getBoundingClientRect: () => denormalizeRectWithOffset(\n r.state.store.getAnnotationBounds(annotation.id),\n r.element.getBoundingClientRect()\n ),\n getClientRects: () => {\n const rects = r.state.store.getAnnotationRects(annotation.id);\n const denormalizedRects = rects.map(\n rect => denormalizeRectWithOffset(rect, r.element.getBoundingClientRect())\n );\n return toDomRectList(denormalizedRects);\n }\n });\n }, [isOpen, annotation?.id, r]);\n\n // Prevent text-annotator from handling the irrelevant events triggered from the popup\n const getStopEventsPropagationProps = useCallback(\n () => ({ onPointerUp: (event: PointerEvent<HTMLDivElement>) => event.stopPropagation() }),\n []\n );\n\n useEffect(() => {\n const config: MutationObserverInit = { attributes: true, childList: true, subtree: true };\n\n const mutationObserver = new MutationObserver(() => update());\n mutationObserver.observe(document.body, config);\n\n window.document.addEventListener('scroll', update, true);\n\n return () => {\n mutationObserver.disconnect();\n window.document.removeEventListener('scroll', update, true);\n }\n }, [update]);\n\n useRestoreSelectionCaret({ floatingOpen: isOpen });\n\n /**\n * Announce the navigation hint only on the keyboard selection,\n * because the focus isn't shifted to the popup automatically then\n */\n useAnnouncePopupNavigation({\n disabled: isFloatingFocused,\n floatingOpen: isOpen,\n message: popupNavigationMessage,\n });\n\n return isOpen && selected.length > 0 ? (\n <FloatingPortal>\n <FloatingFocusManager\n context={context}\n modal={false}\n closeOnFocusOut={true}\n initialFocus={\n /**\n * Don't shift focus to the floating element\n * when the selection performed with the keyboard\n */\n event?.type === 'keydown' ? -1 : 0\n }\n returnFocus={false}\n >\n <div\n className=\"annotation-popup text-annotation-popup not-annotatable\"\n ref={refs.setFloating}\n style={floatingStyles}\n onFocus={handleFloatingFocus}\n onBlur={handleFloatingBlur}\n {...getFloatingProps()}\n {...getStopEventsPropagationProps()}>\n {popup({ selected })}\n\n {/* It lets keyboard/sr users to know that the dialog closes when they focus out of it */}\n <button className=\"popup-close-message\" onClick={handleClose}>\n This dialog closes when you leave it.\n </button>\n </div>\n </FloatingFocusManager>\n </FloatingPortal>\n ) : null;\n\n}\n"],"names":["event","jsx","jsxs"],"mappings":";;;;;;;;;;AAwCa,MAAA,qBAAmD,CAAC,UAAU;;AAEnE,QAAA,EAAE,OAAO,uBAA2B,IAAA;AAE1C,QAAM,IAAI;AAEV,QAAM,EAAE,UAAU,MAAM,IAAI,aAA6B;AACnD,QAAA,cAAa,cAAS,CAAC,MAAV,mBAAa;AAEhC,QAAM,CAAC,QAAQ,OAAO,IAAI,UAAS,qCAAU,UAAS,CAAC;AACjD,QAAA,cAAc,MAAM,uBAAG;AAE7B,QAAM,CAAC,mBAAmB,kBAAkB,IAAI,SAAS,KAAK;AACxD,QAAA,sBAAsB,MAAM,mBAAmB,IAAI;AACnD,QAAA,qBAAqB,MAAM,mBAAmB,KAAK;AACzD,YAAU,MAAM;AACV,QAAA,CAAC,OAA2B;EAAA,GAC/B,CAAC,QAAQ,kBAAkB,CAAC;AAE/B,QAAM,EAAE,MAAM,gBAAgB,QAAQ,QAAA,IAAY,YAAY;AAAA,IAC5D,WAAW;AAAA,IACX,MAAM;AAAA,IACN,cAAc,CAAC,MAAMA,QAAO,WAAW;AACr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AAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA,EAEJ,CAAA,IACE;AAEN;"}
1
+ {"version":3,"file":"react-text-annotator.es7.js","sources":["../src/TextAnnotatorPopup/TextAnnotatorPopup.tsx"],"sourcesContent":["import React, { FC, PointerEvent, ReactNode, useCallback, useEffect, useState } from 'react';\nimport {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingPortal,\n inline,\n offset,\n shift,\n useDismiss,\n useFloating,\n useInteractions,\n useRole\n} from '@floating-ui/react';\n\nimport { useAnnotator, useSelection } from '@annotorious/react';\nimport {\n denormalizeRectWithOffset,\n toDomRectList,\n type TextAnnotation,\n type TextAnnotator,\n} from '@soomo/text-annotator';\n\nimport { useAnnouncePopupNavigation, useRestoreSelectionCaret } from '../hooks';\nimport './TextAnnotatorPopup.css';\n\ninterface TextAnnotationPopupProps {\n\n popupNavigationMessage?: string;\n\n popup(props: TextAnnotatorPopupProps): ReactNode;\n\n}\n\nexport interface TextAnnotatorPopupProps {\n\n selected: { annotation: TextAnnotation, editable?: boolean }[];\n\n}\n\nexport const TextAnnotatorPopup: FC<TextAnnotationPopupProps> = (props) => {\n\n const { popup, popupNavigationMessage } = props;\n\n const r = useAnnotator<TextAnnotator>();\n\n const { selected, event } = useSelection<TextAnnotation>();\n const annotation = selected[0]?.annotation;\n\n const [isOpen, setOpen] = useState(selected?.length > 0);\n const handleClose = () => r?.cancelSelected();\n\n const [isFloatingFocused, setFloatingFocused] = useState(false);\n const handleFloatingFocus = () => setFloatingFocused(true);\n const handleFloatingBlur = () => setFloatingFocused(false);\n useEffect(() => {\n if (!isOpen) handleFloatingBlur();\n }, [isOpen, handleFloatingBlur]);\n\n const { refs, floatingStyles, update, context } = useFloating({\n placement: 'top',\n open: isOpen,\n onOpenChange: (open, event, reason) => {\n setOpen(open);\n\n if (!open) {\n if (\n reason === 'escape-key' ||\n /**\n * When the focus leaves the floating - cancel the selection.\n * However, it doesn't have a distinct reason yet, will be resolved in the discussion:\n * @see https://github.com/floating-ui/floating-ui/discussions/3012#discussioncomment-10405906\n */\n event instanceof FocusEvent\n ) {\n handleClose();\n }\n }\n },\n middleware: [\n offset(10),\n inline(),\n flip(),\n shift({ mainAxis: false, crossAxis: true, padding: 10 })\n ],\n whileElementsMounted: autoUpdate\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context, { role: 'dialog' });\n const { getFloatingProps } = useInteractions([dismiss, role]);\n\n const selectedKey = selected.map(a => a.annotation.id).join('-');\n useEffect(() => {\n // Ignore all selection changes except those accompanied by a user event.\n if (selected.length > 0 && event) {\n setOpen(event.type === 'pointerup' || event.type === 'keydown');\n }\n }, [selectedKey, event]);\n\n useEffect(() => {\n // Close the popup if the selection is cleared\n if (selected.length === 0 && isOpen) {\n setOpen(false);\n }\n }, [isOpen, selectedKey]);\n\n useEffect(() => {\n if (!r) return;\n\n if (isOpen && annotation?.id) {\n refs.setPositionReference({\n getBoundingClientRect: () => denormalizeRectWithOffset(\n r.state.store.getAnnotationBounds(annotation.id),\n r.element.getBoundingClientRect()\n ),\n getClientRects: () => {\n const rects = r.state.store.getAnnotationRects(annotation.id);\n const denormalizedRects = rects.map(\n rect => denormalizeRectWithOffset(rect, r.element.getBoundingClientRect())\n );\n return toDomRectList(denormalizedRects);\n }\n });\n } else {\n // Don't leave the reference depending on the previously selected annotation\n refs.setPositionReference(null);\n }\n }, [isOpen, annotation?.id, annotation?.target, r]);\n\n // Prevent text-annotator from handling the irrelevant events triggered from the popup\n const getStopEventsPropagationProps = useCallback(\n () => ({ onPointerUp: (event: PointerEvent<HTMLDivElement>) => event.stopPropagation() }),\n []\n );\n\n useEffect(() => {\n const config: MutationObserverInit = { attributes: true, childList: true, subtree: true };\n\n const mutationObserver = new MutationObserver(() => update());\n mutationObserver.observe(document.body, config);\n\n window.document.addEventListener('scroll', update, true);\n\n return () => {\n mutationObserver.disconnect();\n window.document.removeEventListener('scroll', update, true);\n }\n }, [update]);\n\n useRestoreSelectionCaret({ floatingOpen: isOpen });\n\n /**\n * Announce the navigation hint only on the keyboard selection,\n * because the focus isn't shifted to the popup automatically then\n */\n useAnnouncePopupNavigation({\n disabled: isFloatingFocused,\n floatingOpen: isOpen,\n message: popupNavigationMessage,\n });\n\n return isOpen && selected.length > 0 ? (\n <FloatingPortal>\n <FloatingFocusManager\n context={context}\n modal={false}\n closeOnFocusOut={true}\n initialFocus={\n /**\n * Don't shift focus to the floating element\n * when the selection performed with the keyboard\n */\n event?.type === 'keydown' ? -1 : 0\n }\n returnFocus={false}\n >\n <div\n className=\"annotation-popup text-annotation-popup not-annotatable\"\n ref={refs.setFloating}\n style={floatingStyles}\n onFocus={handleFloatingFocus}\n onBlur={handleFloatingBlur}\n {...getFloatingProps()}\n {...getStopEventsPropagationProps()}>\n {popup({ selected })}\n\n {/* It lets keyboard/sr users to know that the dialog closes when they focus out of it */}\n <button className=\"popup-close-message\" onClick={handleClose}>\n This dialog closes when you leave it.\n </button>\n </div>\n </FloatingFocusManager>\n </FloatingPortal>\n ) : null;\n\n}\n"],"names":["event","jsx","jsxs"],"mappings":";;;;;;;;;;AAwCa,MAAA,qBAAmD,CAAC,UAAU;;AAEnE,QAAA,EAAE,OAAO,uBAA2B,IAAA;AAE1C,QAAM,IAAI;AAEV,QAAM,EAAE,UAAU,MAAM,IAAI,aAA6B;AACnD,QAAA,cAAa,cAAS,CAAC,MAAV,mBAAa;AAEhC,QAAM,CAAC,QAAQ,OAAO,IAAI,UAAS,qCAAU,UAAS,CAAC;AACjD,QAAA,cAAc,MAAM,uBAAG;AAE7B,QAAM,CAAC,mBAAmB,kBAAkB,IAAI,SAAS,KAAK;AACxD,QAAA,sBAAsB,MAAM,mBAAmB,IAAI;AACnD,QAAA,qBAAqB,MAAM,mBAAmB,KAAK;AACzD,YAAU,MAAM;AACV,QAAA,CAAC,OAA2B;EAAA,GAC/B,CAAC,QAAQ,kBAAkB,CAAC;AAE/B,QAAM,EAAE,MAAM,gBAAgB,QAAQ,QAAA,IAAY,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AAAA,UACP,GAAG,iBAAiB;AAAA,UACpB,GAAG,8BAA8B;AAAA,UACjC,UAAA;AAAA,YAAM,MAAA,EAAE,UAAU;AAAA,kDAGlB,UAAO,EAAA,WAAU,uBAAsB,SAAS,aAAa,UAE9D,yCAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA,EAEJ,CAAA,IACE;AAEN;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soomo/react-text-annotator",
3
- "version": "3.0.0-staging.41",
3
+ "version": "3.0.0-staging.43",
4
4
  "description": "Recogito Text Annotator React bindings",
5
5
  "author": "Rainer Simon",
6
6
  "license": "BSD-3-Clause",
@@ -48,7 +48,7 @@
48
48
  "@annotorious/core": "^3.0.0-rc.31",
49
49
  "@annotorious/react": "^3.0.0-rc.31",
50
50
  "@floating-ui/react": "^0.26.20",
51
- "@soomo/text-annotator": "3.0.0-staging.41",
51
+ "@soomo/text-annotator": "3.0.0-staging.43",
52
52
  "@react-aria/live-announcer": "^3.3.4",
53
53
  "@recogito/text-annotator-tei": "3.0.0-rc.39",
54
54
  "CETEIcean": "^1.9.3",
@@ -1,244 +0,0 @@
1
- import { computePosition, offset as offset$1, shift as shift$1, flip as flip$1, inline as inline$1 } from "./react-text-annotator.es14.js";
2
- import { autoUpdate, platform } from "./react-text-annotator.es14.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;
10
- }
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]);
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 flip = (options, deps) => ({
227
- ...flip$1(options),
228
- options: [options, deps]
229
- });
230
- const inline = (options, deps) => ({
231
- ...inline$1(options),
232
- options: [options, deps]
233
- });
234
- export {
235
- autoUpdate,
236
- computePosition,
237
- flip,
238
- inline,
239
- offset,
240
- platform,
241
- shift,
242
- useFloating
243
- };
244
- //# sourceMappingURL=react-text-annotator.es13.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-text-annotator.es13.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,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