@soomo/text-annotator 3.0.0-staging.30 → 3.0.0-staging.31

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 { Filter, User } from '@annotorious/core';
2
2
  import { TextAnnotatorState } from './state';
3
3
 
4
- export declare const SelectionHandler: (container: HTMLElement, state: TextAnnotatorState, annotationEnabled: boolean, offsetReferenceSelector?: string) => {
4
+ export declare const SelectionHandler: (container: HTMLElement, state: TextAnnotatorState, annotatingEnabled: boolean, offsetReferenceSelector?: string) => {
5
5
  destroy: () => void;
6
6
  setFilter: (filter?: Filter) => Filter;
7
7
  setUser: (user?: User) => User;
@@ -5,7 +5,7 @@ import { HighlightStyleExpression } from './highlight';
5
5
 
6
6
  export interface TextAnnotatorOptions<T extends unknown = TextAnnotation> {
7
7
  adapter?: FormatAdapter<TextAnnotation, T> | null;
8
- annotationEnabled?: boolean;
8
+ annotatingEnabled?: boolean;
9
9
  renderer?: RendererType;
10
10
  offsetReferenceSelector?: string;
11
11
  pointerAction?: PointerSelectAction | ((annotation: TextAnnotation) => PointerSelectAction);
@@ -5,7 +5,8 @@ export interface TextAnnotationStore extends Omit<Store<TextAnnotation>, 'addAnn
5
5
  addAnnotation(annotation: TextAnnotation, origin?: Origin): boolean;
6
6
  bulkAddAnnotation(annotations: TextAnnotation[], replace: boolean, origin?: Origin): TextAnnotation[];
7
7
  bulkUpsertAnnotations(annotations: TextAnnotation[], origin?: Origin): TextAnnotation[];
8
- getAnnotationBounds(id: string, hintX?: number, hintY?: number, buffer?: number): DOMRect;
8
+ getAnnotationRects(id: string): DOMRect[];
9
+ getAnnotationBounds(id: string, hintX?: number, hintY?: number, buffer?: number): DOMRect | undefined;
9
10
  getAt(x: number, y: number, filter?: Filter): TextAnnotation | undefined;
10
11
  getIntersecting(minX: number, minY: number, maxX: number, maxY: number): AnnotationRects[];
11
12
  recalculatePositions(): void;
@@ -11,3 +11,4 @@ export * from './reviveAnnotation';
11
11
  export * from './reviveSelector';
12
12
  export * from './reviveTarget';
13
13
  export * from './splitAnnotatableRanges';
14
+ export * from './normalizeRects';
@@ -1 +1,2 @@
1
1
  export declare const mergeClientRects: (rects: DOMRect[]) => DOMRect[];
2
+ export declare const toDomRectList: (rects: DOMRect[]) => DOMRectList;
@@ -0,0 +1,2 @@
1
+ export declare const normalizeRectWithOffset: (rect: DOMRect, offset: DOMRect) => DOMRect;
2
+ export declare const denormalizeRectWithOffset: (rect: DOMRect, offset: DOMRect) => DOMRect;
@@ -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{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.r6o-annotatable .r6o-span-highlight-layer.hidden{display:none}.r6o-annotatable .r6o-span-highlight-layer .r6o-annotation{position:absolute;display:block;border-width:0;border-style:solid}.r6o-annotation{box-sizing:content-box}.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}
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{height:100%;left:0;mix-blend-mode:multiply;pointer-events:none;position:absolute;top:0;width:100%}.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-annotation{box-sizing:content-box}.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}