@recogito/text-annotator 3.0.0-rc.22 → 3.0.0-rc.23

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.
@@ -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, opts?: TextAnnotatorOptions<E>) => TextAnnotator<E>;
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>;