@recogito/text-annotator 3.0.0-rc.53 → 3.0.0-rc.54

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.
@@ -9,4 +9,4 @@ export interface TextAnnotator<I extends TextAnnotation = TextAnnotation, E exte
9
9
  scrollIntoView(annotationOrId: I | string): boolean;
10
10
  state: TextAnnotatorState<I, E>;
11
11
  }
12
- export declare const createTextAnnotator: <E extends unknown = TextAnnotation>(container: HTMLElement, options?: TextAnnotatorOptions<TextAnnotation, E>) => TextAnnotator<TextAnnotation, E>;
12
+ export declare const createTextAnnotator: <I extends TextAnnotation = TextAnnotation, E extends unknown = TextAnnotation>(container: HTMLElement, options?: TextAnnotatorOptions<I, E>) => TextAnnotator<I, E>;
@@ -6,6 +6,6 @@ export interface HighlightStyle extends Pick<DrawingStyle, 'fill' | 'fillOpacity
6
6
  underlineOffset?: number;
7
7
  underlineThickness?: number;
8
8
  }
9
- export type HighlightStyleExpression = HighlightStyle | ((annotation: TextAnnotation, state: AnnotationState, zIndex?: number) => HighlightStyle | undefined);
9
+ export type HighlightStyleExpression = HighlightStyle | (<I extends TextAnnotation = TextAnnotation>(annotation: I, state: AnnotationState, zIndex?: number) => HighlightStyle | undefined);
10
10
  export declare const DEFAULT_STYLE: HighlightStyle;
11
11
  export declare const DEFAULT_SELECTED_STYLE: HighlightStyle;
@@ -7,6 +7,6 @@ export type W3CTextFormatAdapter<I extends TextAnnotation = TextAnnotation, E ex
7
7
  * @param container - the HTML container of the annotated content,
8
8
  * Required to locate the content's `range` within the DOM
9
9
  */
10
- export declare const W3CTextFormat: <E extends W3CTextAnnotation = W3CTextAnnotation>(source: string, container: HTMLElement) => W3CTextFormatAdapter<TextAnnotation, E>;
11
- export declare const parseW3CTextAnnotation: (annotation: W3CTextAnnotation) => ParseResult<TextAnnotation>;
12
- export declare const serializeW3CTextAnnotation: <E extends W3CTextAnnotation = W3CTextAnnotation>(annotation: TextAnnotation, source: string, container: HTMLElement) => E;
10
+ export declare const W3CTextFormat: <I extends TextAnnotation = TextAnnotation, E extends W3CTextAnnotation = W3CTextAnnotation>(source: string, container: HTMLElement) => W3CTextFormatAdapter<I, E>;
11
+ export declare const parseW3CTextAnnotation: <I extends TextAnnotation = TextAnnotation, E extends W3CTextAnnotation = W3CTextAnnotation>(annotation: E) => ParseResult<I>;
12
+ export declare const serializeW3CTextAnnotation: <I extends TextAnnotation = TextAnnotation, E extends W3CTextAnnotation = W3CTextAnnotation>(annotation: I, source: string, container: HTMLElement) => E;