@recogito/text-annotator 4.1.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/model/core/text-annotation.d.ts +44 -15
- package/dist/model/w3c/w3c-text-format-adapter.d.ts +5 -5
- package/dist/rendering/base-renderer.d.ts +1 -1
- package/dist/rendering/highlight-style.d.ts +7 -4
- package/dist/rendering/highlight.d.ts +2 -2
- package/dist/rendering/renderer-css-highlight/css-highlight-renderer.d.ts +2 -2
- package/dist/selection-handler.d.ts +2 -2
- package/dist/state/spatial-tree.d.ts +7 -7
- package/dist/state/text-annotation-store.d.ts +5 -5
- package/dist/state/text-annotator-state.d.ts +2 -2
- package/dist/text-annotator-options.d.ts +7 -2
- package/dist/text-annotator.d.ts +1 -1
- package/dist/text-annotator.es.js +491 -475
- package/dist/text-annotator.es.js.map +1 -1
- package/dist/text-annotator.umd.js +2 -2
- package/dist/text-annotator.umd.js.map +1 -1
- package/dist/utils/annotation/range-to-selector.d.ts +2 -2
- package/dist/utils/annotation/revive-annotation.d.ts +4 -5
- package/dist/utils/annotation/scroll-into-view.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const rangeToSelector: (range: Range, container: HTMLElement, offsetReferenceSelector?: string) =>
|
|
1
|
+
import type { RevivedTextSelector } from '../../model';
|
|
2
|
+
export declare const rangeToSelector: (range: Range, container: HTMLElement, offsetReferenceSelector?: string) => RevivedTextSelector;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const isRevived: (selector: TextSelectorLike[]) => boolean;
|
|
1
|
+
import type { RevivedTextAnnotationLike, RevivedTextAnnotationTargetLike, RevivedTextSelector, RevivedTextSelectorLike, TextAnnotationLike, TextAnnotationTargetLike, TextSelector } from '../../model';
|
|
3
2
|
/**
|
|
4
3
|
* Creates a new selector object with the revived DOM range from the given text annotation position
|
|
5
4
|
* Only the annotatable elements are processed and counted towards the range
|
|
@@ -9,6 +8,6 @@ export declare const isRevived: (selector: TextSelectorLike[]) => boolean;
|
|
|
9
8
|
*
|
|
10
9
|
* @returns the revived selector
|
|
11
10
|
*/
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const reviveTarget: <T extends
|
|
14
|
-
export declare const reviveAnnotation: <T extends
|
|
11
|
+
export declare const reviveTextSelector: <T extends TextSelector>(selector: T, container: HTMLElement) => RevivedTextSelector;
|
|
12
|
+
export declare const reviveTarget: <T extends TextAnnotationTargetLike>(target: T, container: HTMLElement, reviveFn?: (arg: T["selector"][number], container: HTMLElement) => RevivedTextSelectorLike) => RevivedTextAnnotationTargetLike<T>;
|
|
13
|
+
export declare const reviveAnnotation: <T extends TextAnnotationLike>(annotation: T, container: HTMLElement, reviveFn?: (arg: T["target"]["selector"][number], container: HTMLElement) => RevivedTextSelectorLike) => RevivedTextAnnotationLike<T>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TextAnnotationStore } from '../../state';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const scrollIntoView: <I extends
|
|
2
|
+
import type { TextAnnotationLike } from '../../model';
|
|
3
|
+
export declare const scrollIntoView: <I extends TextAnnotationLike = TextAnnotationLike>(container: HTMLElement, store: TextAnnotationStore<I>) => <E extends Element = Element>(annotationOrId: string | I, scrollParentOrId?: string | E) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@recogito/text-annotator",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "A JavaScript text annotation library",
|
|
5
5
|
"author": "Rainer Simon",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"@types/rbush": "^4.0.0",
|
|
31
31
|
"jsdom": "^29.1.1",
|
|
32
32
|
"typescript": "^5.9.3",
|
|
33
|
-
"vite": "^7.3.
|
|
33
|
+
"vite": "^7.3.5",
|
|
34
34
|
"vite-plugin-externalize-deps": "^0.10.0",
|
|
35
|
-
"vitest": "^4.1.
|
|
35
|
+
"vitest": "^4.1.8"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@annotorious/core": "^3.8.2",
|