@recogito/text-annotator 3.0.0-rc.5 → 3.0.0-rc.50
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/src/SelectionHandler.d.ts +7 -6
- package/dist/src/TextAnnotator.d.ts +10 -6
- package/dist/src/TextAnnotatorOptions.d.ts +13 -7
- package/dist/src/api/scrollIntoView.d.ts +3 -3
- package/dist/src/highlight/Highlight.d.ts +5 -0
- package/dist/src/highlight/HighlightPainter.d.ts +10 -19
- package/dist/src/highlight/HighlightStyle.d.ts +11 -0
- package/dist/src/highlight/baseRenderer.d.ts +20 -0
- package/dist/src/highlight/canvas/canvasRenderer.d.ts +4 -0
- package/dist/src/highlight/canvas/index.d.ts +1 -0
- package/dist/src/highlight/highlights/highlightsRenderer.d.ts +6 -0
- package/dist/src/highlight/highlights/index.d.ts +1 -0
- package/dist/src/highlight/index.d.ts +5 -1
- package/dist/src/highlight/span/index.d.ts +1 -0
- package/dist/src/highlight/span/spansRenderer.d.ts +4 -0
- package/dist/src/highlight/viewport.d.ts +12 -0
- package/dist/src/index.d.ts +6 -3
- package/dist/src/model/{TextAnnotation.d.ts → core/TextAnnotation.d.ts} +3 -2
- package/dist/src/model/core/index.d.ts +1 -0
- package/dist/src/model/index.d.ts +2 -1
- package/dist/src/model/w3c/W3CTextAnnotation.d.ts +33 -0
- package/dist/src/model/w3c/W3CTextFormatAdapter.d.ts +12 -0
- package/dist/src/model/w3c/index.d.ts +2 -0
- package/dist/src/presence/PresencePainter.d.ts +4 -4
- package/dist/src/state/TextAnnotationStore.d.ts +11 -10
- package/dist/src/state/TextAnnotatorState.d.ts +9 -10
- package/dist/src/state/index.d.ts +0 -1
- package/dist/src/state/spatialTree.d.ts +10 -8
- package/dist/src/utils/cancelSingleClickEvents.d.ts +6 -0
- package/dist/src/utils/cloneEvents.d.ts +11 -0
- package/dist/src/utils/debounce.d.ts +1 -0
- package/dist/src/utils/device.d.ts +1 -0
- package/dist/src/utils/getQuoteContext.d.ts +4 -0
- package/dist/src/utils/index.d.ts +15 -2
- package/dist/src/utils/isNotAnnotatable.d.ts +4 -0
- package/dist/src/utils/isRevived.d.ts +2 -0
- package/dist/src/utils/isWhitespaceOrEmpty.d.ts +2 -0
- package/dist/src/utils/programmaticallyFocusable.d.ts +6 -0
- package/dist/src/utils/rangeToSelector.d.ts +2 -0
- package/dist/src/utils/reviveAnnotation.d.ts +2 -0
- package/dist/src/utils/reviveSelector.d.ts +11 -0
- package/dist/src/utils/reviveTarget.d.ts +2 -0
- package/dist/src/utils/splitAnnotatableRanges.d.ts +5 -0
- package/dist/src/utils/trimRangeToContainer.d.ts +1 -0
- package/dist/test/model/w3c/W3CTextFormatAdapter.test.d.ts +1 -0
- package/dist/test/model/w3c/fixtures.d.ts +3 -0
- package/dist/text-annotator.css +1 -1
- package/dist/text-annotator.es.js +1954 -936
- package/dist/text-annotator.es.js.map +1 -1
- package/dist/text-annotator.umd.js +2 -1
- package/dist/text-annotator.umd.js.map +1 -1
- package/package.json +19 -13
- package/dist/src/highlight/highlightLayer.d.ts +0 -10
- package/dist/src/highlight/trackViewport.d.ts +0 -3
- package/dist/src/state/reviveTarget.d.ts +0 -9
- package/dist/src/utils/getClientRectsPonyfill.d.ts +0 -1
- package/dist/src/utils/trimRange.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@recogito/text-annotator",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.50",
|
|
4
4
|
"description": "A JavaScript text annotation library",
|
|
5
5
|
"author": "Rainer Simon",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"start": "vite",
|
|
9
|
+
"start": "vite --host",
|
|
10
10
|
"build": "vite build",
|
|
11
11
|
"preview": "vite preview",
|
|
12
|
-
"test": "
|
|
12
|
+
"test": "vitest"
|
|
13
13
|
},
|
|
14
14
|
"main": "./dist/text-annotator.umd.js",
|
|
15
15
|
"module": "./dist/text-annotator.es.js",
|
|
@@ -19,22 +19,28 @@
|
|
|
19
19
|
],
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
22
|
+
"types": "./dist/src/index.d.ts",
|
|
22
23
|
"import": "./dist/text-annotator.es.js",
|
|
23
24
|
"require": "./dist/text-annotator.umd.js"
|
|
24
25
|
},
|
|
25
26
|
"./dist/text-annotator.css": "./dist/text-annotator.css"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"@types/
|
|
29
|
-
"@types/
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"vite
|
|
29
|
+
"@types/jsdom": "^21.1.7",
|
|
30
|
+
"@types/rbush": "^4.0.0",
|
|
31
|
+
"@types/uuid": "^10.0.0",
|
|
32
|
+
"jsdom": "^25.0.1",
|
|
33
|
+
"typescript": "5.6.3",
|
|
34
|
+
"vite": "^5.4.10",
|
|
35
|
+
"vite-plugin-dts": "^4.3.0",
|
|
36
|
+
"vitest": "^2.1.4"
|
|
34
37
|
},
|
|
35
38
|
"dependencies": {
|
|
36
|
-
"@annotorious/core": "^3.0.
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
+
"@annotorious/core": "^3.0.11",
|
|
40
|
+
"colord": "^2.9.3",
|
|
41
|
+
"dequal": "^2.0.3",
|
|
42
|
+
"hotkeys-js": "^3.13.7",
|
|
43
|
+
"rbush": "^4.0.1",
|
|
44
|
+
"uuid": "^11.0.2"
|
|
39
45
|
}
|
|
40
|
-
}
|
|
46
|
+
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { DrawingStyle, Filter, ViewportState } from '@annotorious/core';
|
|
2
|
-
import type { TextAnnotation } from '../model';
|
|
3
|
-
import type { TextAnnotatorState } from '../state';
|
|
4
|
-
import { type HighlightPainter } from './HighlightPainter';
|
|
5
|
-
export declare const createHighlightLayer: (container: HTMLElement, state: TextAnnotatorState, viewport: ViewportState) => {
|
|
6
|
-
redraw: () => number;
|
|
7
|
-
setDrawingStyle: (style: DrawingStyle | ((a: TextAnnotation, selected?: boolean) => DrawingStyle)) => void;
|
|
8
|
-
setFilter: (filter?: Filter) => void;
|
|
9
|
-
setPainter: (painter: HighlightPainter) => HighlightPainter;
|
|
10
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { TextAnnotationTarget } from '../model';
|
|
2
|
-
/**
|
|
3
|
-
* Recalculates the DOM range from the given text annotation target.
|
|
4
|
-
*
|
|
5
|
-
* @param annotation the text annotation
|
|
6
|
-
* @param container the HTML container of the annotated content
|
|
7
|
-
* @returns the DOM range
|
|
8
|
-
*/
|
|
9
|
-
export declare const reviveTarget: (target: TextAnnotationTarget, container: HTMLElement) => TextAnnotationTarget;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getClientRectsPonyfill: (range: Range) => DOMRect[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const trimRange: (range: Range) => Range;
|