@recogito/text-annotator 3.0.0-rc.39 → 3.0.0-rc.40
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 +0 -1
- package/dist/src/TextAnnotator.d.ts +0 -1
- package/dist/src/TextAnnotatorOptions.d.ts +3 -3
- package/dist/src/api/scrollIntoView.d.ts +0 -1
- package/dist/src/highlight/Highlight.d.ts +0 -1
- package/dist/src/highlight/HighlightPainter.d.ts +0 -1
- package/dist/src/highlight/HighlightStyle.d.ts +0 -1
- package/dist/src/highlight/baseRenderer.d.ts +0 -1
- package/dist/src/highlight/canvas/canvasRenderer.d.ts +0 -1
- package/dist/src/highlight/highlights/highlightsRenderer.d.ts +0 -1
- package/dist/src/highlight/span/spansRenderer.d.ts +0 -1
- package/dist/src/highlight/viewport.d.ts +0 -1
- package/dist/src/model/core/TextAnnotation.d.ts +0 -1
- package/dist/src/model/w3c/W3CTextAnnotation.d.ts +0 -1
- package/dist/src/model/w3c/W3CTextFormatAdapter.d.ts +0 -1
- package/dist/src/presence/PresencePainter.d.ts +0 -1
- package/dist/src/state/TextAnnotationStore.d.ts +0 -1
- package/dist/src/state/TextAnnotatorState.d.ts +1 -2
- package/dist/src/state/spatialTree.d.ts +0 -1
- package/dist/src/utils/isRevived.d.ts +0 -1
- package/dist/src/utils/rangeToSelector.d.ts +0 -1
- package/dist/src/utils/reviveAnnotation.d.ts +0 -1
- package/dist/src/utils/reviveSelector.d.ts +0 -1
- package/dist/src/utils/reviveTarget.d.ts +0 -1
- package/dist/test/model/w3c/fixtures.d.ts +0 -1
- package/dist/text-annotator.css +1 -1
- package/dist/text-annotator.es.js +916 -891
- 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 +10 -10
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Filter, User } from '@annotorious/core';
|
|
2
2
|
import { TextAnnotatorState } from './state';
|
|
3
|
-
|
|
4
3
|
export declare const SelectionHandler: (container: HTMLElement, state: TextAnnotatorState, annotatingEnabled: boolean, offsetReferenceSelector?: string) => {
|
|
5
4
|
destroy: () => void;
|
|
6
5
|
setFilter: (filter?: Filter) => Filter;
|
|
@@ -3,7 +3,6 @@ import { HighlightStyleExpression } from './highlight';
|
|
|
3
3
|
import { TextAnnotatorState } from './state';
|
|
4
4
|
import { TextAnnotation } from './model';
|
|
5
5
|
import { TextAnnotatorOptions } from './TextAnnotatorOptions';
|
|
6
|
-
|
|
7
6
|
export interface TextAnnotator<E extends unknown = TextAnnotation> extends Annotator<TextAnnotation, E> {
|
|
8
7
|
element: HTMLElement;
|
|
9
8
|
setStyle(style: HighlightStyleExpression | undefined): void;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { FormatAdapter, UserSelectActionExpression } from '@annotorious/core';
|
|
1
|
+
import { FormatAdapter, UserSelectActionExpression, User } from '@annotorious/core';
|
|
2
2
|
import { PresencePainterOptions } from './presence';
|
|
3
3
|
import { TextAnnotation } from './model';
|
|
4
4
|
import { HighlightStyleExpression } from './highlight';
|
|
5
|
-
|
|
6
5
|
export interface TextAnnotatorOptions<T extends unknown = TextAnnotation> {
|
|
7
6
|
adapter?: FormatAdapter<TextAnnotation, T> | null;
|
|
8
7
|
annotatingEnabled?: boolean;
|
|
9
8
|
renderer?: RendererType;
|
|
10
9
|
offsetReferenceSelector?: string;
|
|
11
|
-
|
|
10
|
+
userSelectAction?: UserSelectActionExpression<TextAnnotation>;
|
|
12
11
|
presence?: PresencePainterOptions;
|
|
13
12
|
style?: HighlightStyleExpression;
|
|
13
|
+
user?: User;
|
|
14
14
|
}
|
|
15
15
|
export type RendererType = 'SPANS' | 'CANVAS' | 'CSS_HIGHLIGHTS';
|
|
16
16
|
export declare const fillDefaults: <T extends unknown = TextAnnotation>(opts: TextAnnotatorOptions<T>, defaults: TextAnnotatorOptions<T>) => TextAnnotatorOptions<T>;
|
|
@@ -4,7 +4,6 @@ import { ViewportBounds } from './viewport';
|
|
|
4
4
|
import { HighlightPainter } from './HighlightPainter';
|
|
5
5
|
import { Highlight } from './Highlight';
|
|
6
6
|
import { HighlightStyleExpression } from './HighlightStyle';
|
|
7
|
-
|
|
8
7
|
export interface RendererImplementation {
|
|
9
8
|
destroy(): void;
|
|
10
9
|
redraw(highlights: Highlight[], bounds: ViewportBounds, style?: HighlightStyleExpression, painter?: HighlightPainter, lazy?: boolean): void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ViewportState } from '@annotorious/core';
|
|
2
2
|
import { TextAnnotatorState } from 'src/state';
|
|
3
3
|
import { RendererImplementation } from '../baseRenderer';
|
|
4
|
-
|
|
5
4
|
export declare const createRenderer: () => RendererImplementation;
|
|
6
5
|
export declare const createHighlightsRenderer: (container: HTMLElement, state: TextAnnotatorState, viewport: ViewportState) => import('../baseRenderer').Renderer;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FormatAdapter, ParseResult } from '@annotorious/core';
|
|
2
2
|
import { TextAnnotation } from '../core';
|
|
3
3
|
import { W3CTextAnnotation } from '../w3c';
|
|
4
|
-
|
|
5
4
|
export type W3CTextFormatAdapter = FormatAdapter<TextAnnotation, W3CTextAnnotation>;
|
|
6
5
|
/**
|
|
7
6
|
* @param source - the IRI of the annotated content
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PresenceProvider } from '@annotorious/core';
|
|
2
2
|
import { HighlightPainter } from '../highlight';
|
|
3
3
|
import { PresencePainterOptions } from '../presence';
|
|
4
|
-
|
|
5
4
|
export declare const createPresencePainter: (container: HTMLElement, provider: PresenceProvider, opts?: PresencePainterOptions) => HighlightPainter;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Filter, Origin, Store } from '@annotorious/core';
|
|
2
2
|
import { TextAnnotation } from '../model';
|
|
3
|
-
|
|
4
3
|
export interface TextAnnotationStore extends Omit<Store<TextAnnotation>, 'addAnnotation' | 'bulkAddAnnotation'> {
|
|
5
4
|
addAnnotation(annotation: TextAnnotation, origin?: Origin): boolean;
|
|
6
5
|
bulkAddAnnotation(annotations: TextAnnotation[], replace: boolean, origin?: Origin): TextAnnotation[];
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ViewportState, UserSelectActionExpression, AnnotatorState, SelectionState, HoverState } from '@annotorious/core';
|
|
2
2
|
import { TextAnnotation } from '../model';
|
|
3
3
|
import { TextAnnotationStore } from './TextAnnotationStore';
|
|
4
|
-
|
|
5
4
|
export interface TextAnnotatorState extends AnnotatorState<TextAnnotation> {
|
|
6
5
|
store: TextAnnotationStore;
|
|
7
6
|
selection: SelectionState<TextAnnotation>;
|
|
8
7
|
hover: HoverState<TextAnnotation>;
|
|
9
8
|
viewport: ViewportState;
|
|
10
9
|
}
|
|
11
|
-
export declare const createTextAnnotatorState: (container: HTMLElement,
|
|
10
|
+
export declare const createTextAnnotatorState: (container: HTMLElement, defaultUserSelectAction?: UserSelectActionExpression<TextAnnotation>) => TextAnnotatorState;
|
package/dist/text-annotator.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.r6o-canvas-highlight-layer{position:fixed;top:0;bottom:0;left:0;width:100vw;height:100vh;pointer-events:none}.r6o-canvas-highlight-layer.bg{mix-blend-mode:multiply;z-index:1}.r6o-annotatable .r6o-span-highlight-layer{
|
|
1
|
+
.r6o-canvas-highlight-layer{position:fixed;top:0;bottom:0;left:0;width:100vw;height:100vh;pointer-events:none}.r6o-canvas-highlight-layer.bg{mix-blend-mode:multiply;z-index:1}.r6o-annotatable .r6o-span-highlight-layer{position:absolute;top:0;left:0;width:100%;height:100%;mix-blend-mode:multiply;pointer-events:none;z-index:1}.r6o-annotatable .r6o-span-highlight-layer.hidden{display:none}.r6o-annotatable .r6o-span-highlight-layer .r6o-annotation{border-style:solid;border-width:0;box-sizing:content-box;display:block;position:absolute}.r6o-presence-layer{left:0;position:fixed;top:0;bottom:0;width:100vw;pointer-events:none}html,body{overscroll-behavior-y:none}.r6o-annotatable{position:relative;-webkit-tap-highlight-color:transparent}.hovered *{cursor:pointer}*::selection,::selection{background:#0080ff2e}::-moz-selection{background:#0080ff2e}
|