@recogito/text-annotator 3.0.0-rc.22 → 3.0.0-rc.24
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 +1 -1
- package/dist/src/TextAnnotatorOptions.d.ts +2 -0
- package/dist/src/index.d.ts +1 -6
- package/dist/text-annotator.es.js +824 -827
- 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,7 +1,7 @@
|
|
|
1
1
|
import { TextAnnotatorState } from './state';
|
|
2
2
|
import { User } from '@annotorious/core';
|
|
3
3
|
|
|
4
|
-
export declare const SelectionHandler: (container: HTMLElement, state: TextAnnotatorState, offsetReferenceSelector?: string) => {
|
|
4
|
+
export declare const SelectionHandler: (container: HTMLElement, state: TextAnnotatorState, annotationEnabled: boolean, offsetReferenceSelector?: string) => {
|
|
5
5
|
destroy: () => void;
|
|
6
6
|
setUser: (user: User) => User;
|
|
7
7
|
};
|
|
@@ -10,4 +10,4 @@ export interface TextAnnotator<E extends unknown = TextAnnotation> extends Annot
|
|
|
10
10
|
scrollIntoView(annotation: TextAnnotation): boolean;
|
|
11
11
|
state: TextAnnotatorState;
|
|
12
12
|
}
|
|
13
|
-
export declare const createTextAnnotator: <E extends unknown = TextAnnotation>(container: HTMLElement,
|
|
13
|
+
export declare const createTextAnnotator: <E extends unknown = TextAnnotation>(container: HTMLElement, options?: TextAnnotatorOptions<E>) => TextAnnotator<E>;
|
|
@@ -5,6 +5,7 @@ import { FormatAdapter, PointerSelectAction } from '@annotorious/core';
|
|
|
5
5
|
|
|
6
6
|
export interface TextAnnotatorOptions<T extends unknown = TextAnnotation> {
|
|
7
7
|
adapter?: FormatAdapter<TextAnnotation, T> | null;
|
|
8
|
+
annotationEnabled?: boolean;
|
|
8
9
|
renderer?: RendererType;
|
|
9
10
|
offsetReferenceSelector?: string;
|
|
10
11
|
pointerAction?: PointerSelectAction | ((annotation: TextAnnotation) => PointerSelectAction);
|
|
@@ -12,3 +13,4 @@ export interface TextAnnotatorOptions<T extends unknown = TextAnnotation> {
|
|
|
12
13
|
style?: HighlightStyleExpression;
|
|
13
14
|
}
|
|
14
15
|
export type RendererType = 'SPANS' | 'CANVAS' | 'CSS_HIGHLIGHTS';
|
|
16
|
+
export declare const fillDefaults: <T extends unknown = TextAnnotation>(opts: TextAnnotatorOptions<T>, defaults: TextAnnotatorOptions<T>) => TextAnnotatorOptions<T>;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Origin as _Origin, PointerSelectAction as _PointerSelectAction } from '@annotorious/core';
|
|
2
1
|
export * from './highlight';
|
|
3
2
|
export * from './model';
|
|
4
3
|
export * from './state';
|
|
@@ -7,8 +6,4 @@ export * from './presence/PresencePainterOptions';
|
|
|
7
6
|
export * from './TextAnnotator';
|
|
8
7
|
export * from './TextAnnotatorOptions';
|
|
9
8
|
export type { Annotation, AnnotationBody, AnnotationTarget, Annotator, AnnotatorState, Color, Filter, FormatAdapter, HoverState, Selection, SelectionState, Store, StoreChangeEvent, StoreObserver, ParseResult, User, W3CAnnotation, W3CAnnotationBody, W3CAnnotationTarget } from '@annotorious/core';
|
|
10
|
-
export
|
|
11
|
-
export declare const createBody: (annotation: import('@annotorious/core').Annotation, payload: {
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
}, created?: Date, creator?: import('@annotorious/core').User) => import('@annotorious/core').AnnotationBody;
|
|
14
|
-
export declare const Origin: typeof _Origin;
|
|
9
|
+
export { createBody, Origin, PointerSelectAction } from '@annotorious/core';
|