@recogito/text-annotator 3.1.1 → 3.1.2
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/TextAnnotatorOptions.d.ts +1 -0
- package/dist/src/utils/isNotAnnotatable.d.ts +2 -2
- package/dist/src/utils/splitAnnotatableRanges.d.ts +1 -1
- package/dist/text-annotator.es.js +639 -2204
- 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 +2 -1
|
@@ -5,6 +5,7 @@ import { HighlightStyleExpression } from './highlight';
|
|
|
5
5
|
export interface TextAnnotatorOptions<I extends TextAnnotation = TextAnnotation, E extends unknown = TextAnnotation> {
|
|
6
6
|
adapter?: FormatAdapter<I, E> | null;
|
|
7
7
|
annotatingEnabled?: boolean;
|
|
8
|
+
dismissOnClickOutside?: boolean;
|
|
8
9
|
renderer?: RendererType;
|
|
9
10
|
offsetReferenceSelector?: string;
|
|
10
11
|
userSelectAction?: UserSelectActionExpression<E>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const NOT_ANNOTATABLE_CLASS = "not-annotatable";
|
|
2
2
|
export declare const NOT_ANNOTATABLE_SELECTOR = ".not-annotatable";
|
|
3
|
-
export declare const isNotAnnotatable: (node: Node) => boolean;
|
|
4
|
-
export declare const isRangeAnnotatable: (range: Range) => boolean;
|
|
3
|
+
export declare const isNotAnnotatable: (container: Node, node: Node) => boolean;
|
|
4
|
+
export declare const isRangeAnnotatable: (container: Node, range: Range) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Splits a DOM Range into one or more ranges that span annotatable content only.
|
|
3
3
|
*/
|
|
4
|
-
export declare const splitAnnotatableRanges: (range: Range) => Range[];
|
|
4
|
+
export declare const splitAnnotatableRanges: (container: Node, range: Range) => Range[];
|
|
5
5
|
export declare const getRangeAnnotatableContents: (range: Range) => DocumentFragment;
|