@recogito/text-annotator 3.0.0-rc.26 → 3.0.0-rc.27
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 +1 -1
- package/dist/src/TextAnnotator.d.ts +4 -4
- package/dist/src/TextAnnotatorOptions.d.ts +3 -3
- package/dist/src/api/scrollIntoView.d.ts +1 -1
- package/dist/src/highlight/Highlight.d.ts +1 -1
- package/dist/src/highlight/HighlightPainter.d.ts +2 -2
- package/dist/src/highlight/HighlightStyle.d.ts +1 -1
- package/dist/src/highlight/baseRenderer.d.ts +5 -5
- package/dist/src/highlight/canvas/canvasRenderer.d.ts +1 -1
- package/dist/src/highlight/highlights/highlightsRenderer.d.ts +2 -2
- package/dist/src/highlight/span/spansRenderer.d.ts +1 -1
- package/dist/src/highlight/viewport.d.ts +1 -1
- package/dist/src/model/w3c/W3CTextFormatAdapter.d.ts +2 -2
- package/dist/src/presence/PresencePainter.d.ts +2 -2
- package/dist/src/state/TextAnnotationStore.d.ts +1 -1
- package/dist/src/state/TextAnnotatorState.d.ts +2 -2
- package/dist/src/state/spatialTree.d.ts +2 -2
- package/dist/text-annotator.es.js +193 -188
- 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/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TextAnnotatorState } from './state';
|
|
2
1
|
import { User } from '@annotorious/core';
|
|
2
|
+
import { TextAnnotatorState } from './state';
|
|
3
3
|
|
|
4
4
|
export declare const SelectionHandler: (container: HTMLElement, state: TextAnnotatorState, annotationEnabled: boolean, offsetReferenceSelector?: string) => {
|
|
5
5
|
destroy: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TextAnnotatorOptions } from './TextAnnotatorOptions';
|
|
2
|
-
import { TextAnnotation } from './model';
|
|
3
|
-
import { TextAnnotatorState } from './state';
|
|
4
|
-
import { HighlightStyleExpression } from './highlight';
|
|
5
1
|
import { Annotator } from '@annotorious/core';
|
|
2
|
+
import { HighlightStyleExpression } from './highlight';
|
|
3
|
+
import { TextAnnotatorState } from './state';
|
|
4
|
+
import { TextAnnotation } from './model';
|
|
5
|
+
import { TextAnnotatorOptions } from './TextAnnotatorOptions';
|
|
6
6
|
|
|
7
7
|
export interface TextAnnotator<E extends unknown = TextAnnotation> extends Annotator<TextAnnotation, E> {
|
|
8
8
|
element: HTMLElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { HighlightStyleExpression } from './highlight';
|
|
2
|
-
import { TextAnnotation } from './model';
|
|
3
|
-
import { PresencePainterOptions } from './presence';
|
|
4
1
|
import { FormatAdapter, PointerSelectAction } from '@annotorious/core';
|
|
2
|
+
import { PresencePainterOptions } from './presence';
|
|
3
|
+
import { TextAnnotation } from './model';
|
|
4
|
+
import { HighlightStyleExpression } from './highlight';
|
|
5
5
|
|
|
6
6
|
export interface TextAnnotatorOptions<T extends unknown = TextAnnotation> {
|
|
7
7
|
adapter?: FormatAdapter<TextAnnotation, T> | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextAnnotation } from '../model';
|
|
2
1
|
import { TextAnnotationStore } from '../state';
|
|
2
|
+
import { TextAnnotation } from '../model';
|
|
3
3
|
|
|
4
4
|
export declare const scrollIntoView: (container: HTMLElement, store: TextAnnotationStore) => (annotation: TextAnnotation) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ViewportBounds } from './viewport';
|
|
2
|
-
import { HighlightStyle, HighlightStyleExpression } from './HighlightStyle';
|
|
3
1
|
import { Highlight } from './Highlight';
|
|
2
|
+
import { HighlightStyle, HighlightStyleExpression } from './HighlightStyle';
|
|
3
|
+
import { ViewportBounds } from './viewport';
|
|
4
4
|
|
|
5
5
|
export interface HighlightPainter {
|
|
6
6
|
clear(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TextAnnotation } from 'src/model';
|
|
2
1
|
import { AnnotationState, Color, DrawingStyle } from '@annotorious/core';
|
|
2
|
+
import { TextAnnotation } from 'src/model';
|
|
3
3
|
|
|
4
4
|
export interface HighlightStyle extends Pick<DrawingStyle, 'fill' | 'fillOpacity'> {
|
|
5
5
|
underlineStyle?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { HighlightStyleExpression } from './HighlightStyle';
|
|
2
|
-
import { Highlight } from './Highlight';
|
|
3
|
-
import { HighlightPainter } from './HighlightPainter';
|
|
4
|
-
import { ViewportBounds } from './viewport';
|
|
5
|
-
import { TextAnnotatorState } from '../state';
|
|
6
1
|
import { Filter, ViewportState } from '@annotorious/core';
|
|
2
|
+
import { TextAnnotatorState } from '../state';
|
|
3
|
+
import { ViewportBounds } from './viewport';
|
|
4
|
+
import { HighlightPainter } from './HighlightPainter';
|
|
5
|
+
import { Highlight } from './Highlight';
|
|
6
|
+
import { HighlightStyleExpression } from './HighlightStyle';
|
|
7
7
|
|
|
8
8
|
export interface RendererImplementation {
|
|
9
9
|
destroy(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewportState } from '@annotorious/core';
|
|
2
1
|
import { TextAnnotatorState } from 'src/state';
|
|
2
|
+
import { ViewportState } from '@annotorious/core';
|
|
3
3
|
|
|
4
4
|
export declare const createCanvasRenderer: (container: HTMLElement, state: TextAnnotatorState, viewport: ViewportState) => import('../baseRenderer').Renderer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RendererImplementation } from '../baseRenderer';
|
|
2
|
-
import { TextAnnotatorState } from 'src/state';
|
|
3
1
|
import { ViewportState } from '@annotorious/core';
|
|
2
|
+
import { TextAnnotatorState } from 'src/state';
|
|
3
|
+
import { RendererImplementation } from '../baseRenderer';
|
|
4
4
|
|
|
5
5
|
export declare const createRenderer: () => RendererImplementation;
|
|
6
6
|
export declare const createHighlightsRenderer: (container: HTMLElement, state: TextAnnotatorState, viewport: ViewportState) => import('../baseRenderer').Renderer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextAnnotatorState } from '../../state';
|
|
2
1
|
import { ViewportState } from '@annotorious/core';
|
|
2
|
+
import { TextAnnotatorState } from '../../state';
|
|
3
3
|
|
|
4
4
|
export declare const createSpansRenderer: (container: HTMLElement, state: TextAnnotatorState, viewport: ViewportState) => import('../baseRenderer').Renderer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { W3CTextAnnotation } from '../w3c';
|
|
2
|
-
import { TextAnnotation } from '../core';
|
|
3
1
|
import { FormatAdapter, ParseResult } from '@annotorious/core';
|
|
2
|
+
import { TextAnnotation } from '../core';
|
|
3
|
+
import { W3CTextAnnotation } from '../w3c';
|
|
4
4
|
|
|
5
5
|
export type W3CTextFormatAdapter = FormatAdapter<TextAnnotation, W3CTextAnnotation>;
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PresencePainterOptions } from 'src/presence';
|
|
2
|
-
import { HighlightPainter } from '../highlight/HighlightPainter';
|
|
3
1
|
import { PresenceProvider } from '@annotorious/core';
|
|
2
|
+
import { HighlightPainter } from '../highlight/HighlightPainter';
|
|
3
|
+
import { PresencePainterOptions } from 'src/presence';
|
|
4
4
|
|
|
5
5
|
export declare const createPresencePainter: (container: HTMLElement, provider: PresenceProvider, opts?: PresencePainterOptions) => HighlightPainter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TextAnnotation } from '../model';
|
|
2
1
|
import { Origin, Store } from '@annotorious/core';
|
|
2
|
+
import { TextAnnotation } from '../model';
|
|
3
3
|
|
|
4
4
|
export interface TextAnnotationStore extends Omit<Store<TextAnnotation>, 'addAnnotation' | 'bulkAddAnnotation'> {
|
|
5
5
|
addAnnotation(annotation: TextAnnotation, origin?: Origin): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TextAnnotationStore } from './TextAnnotationStore';
|
|
2
|
-
import { TextAnnotation } from '../model';
|
|
3
1
|
import { PointerSelectAction, ViewportState, AnnotatorState, SelectionState, HoverState } from '@annotorious/core';
|
|
2
|
+
import { TextAnnotation } from '../model';
|
|
3
|
+
import { TextAnnotationStore } from './TextAnnotationStore';
|
|
4
4
|
|
|
5
5
|
export interface TextAnnotatorState extends AnnotatorState<TextAnnotation> {
|
|
6
6
|
store: TextAnnotationStore;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AnnotationRects } from './TextAnnotationStore';
|
|
2
|
-
import { TextAnnotation, TextAnnotationTarget } from '../model';
|
|
3
1
|
import { Store } from '@annotorious/core';
|
|
2
|
+
import { TextAnnotation, TextAnnotationTarget } from '../model';
|
|
3
|
+
import { AnnotationRects } from './TextAnnotationStore';
|
|
4
4
|
|
|
5
5
|
interface IndexedHighlightRect {
|
|
6
6
|
minX: number;
|