@soomo/react-text-annotator 3.0.0-staging.8 → 3.1.0-staging.0
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/TextAnnotator.d.ts +4 -5
- package/dist/TextAnnotator.d.ts.map +1 -1
- package/dist/TextAnnotatorPlugin.d.ts +1 -2
- package/dist/TextAnnotatorPopup/TextAnnotatorPopup.d.ts +15 -0
- package/dist/TextAnnotatorPopup/TextAnnotatorPopup.d.ts.map +1 -0
- package/dist/TextAnnotatorPopup/index.d.ts +2 -0
- package/dist/TextAnnotatorPopup/index.d.ts.map +1 -0
- package/dist/TextAnnotatorPopup/isMobile.d.ts +2 -0
- package/dist/TextAnnotatorPopup/isMobile.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useAnnouncePopupNavigation.d.ts +10 -0
- package/dist/hooks/useAnnouncePopupNavigation.d.ts.map +1 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/react-text-annotator.css +31 -1
- package/dist/react-text-annotator.es.js +9 -5
- package/dist/react-text-annotator.es.js.map +1 -1
- package/dist/react-text-annotator.es10.js +486 -34
- package/dist/react-text-annotator.es10.js.map +1 -1
- package/dist/react-text-annotator.es11.js +9 -884
- package/dist/react-text-annotator.es11.js.map +1 -1
- package/dist/react-text-annotator.es12.js +1448 -2
- package/dist/react-text-annotator.es12.js.map +1 -1
- package/dist/react-text-annotator.es14.js +241 -109
- package/dist/react-text-annotator.es14.js.map +1 -1
- package/dist/react-text-annotator.es15.js +540 -264
- package/dist/react-text-annotator.es15.js.map +1 -1
- package/dist/react-text-annotator.es16.js +73 -49
- package/dist/react-text-annotator.es16.js.map +1 -1
- package/dist/react-text-annotator.es17.js +41 -16
- package/dist/react-text-annotator.es17.js.map +1 -1
- package/dist/{react-text-annotator.es9.js → react-text-annotator.es18.js} +1 -1
- package/dist/react-text-annotator.es18.js.map +1 -0
- package/dist/react-text-annotator.es19.js +34 -0
- package/dist/react-text-annotator.es19.js.map +1 -0
- package/dist/react-text-annotator.es2.js +2 -2
- package/dist/react-text-annotator.es20.js +901 -0
- package/dist/react-text-annotator.es20.js.map +1 -0
- package/dist/react-text-annotator.es21.js +5 -0
- package/dist/react-text-annotator.es21.js.map +1 -0
- package/dist/{react-text-annotator.es13.js → react-text-annotator.es22.js} +1 -1
- package/dist/react-text-annotator.es22.js.map +1 -0
- package/dist/react-text-annotator.es23.js +117 -0
- package/dist/react-text-annotator.es23.js.map +1 -0
- package/dist/react-text-annotator.es24.js +312 -0
- package/dist/react-text-annotator.es24.js.map +1 -0
- package/dist/react-text-annotator.es25.js +61 -0
- package/dist/react-text-annotator.es25.js.map +1 -0
- package/dist/react-text-annotator.es26.js +23 -0
- package/dist/react-text-annotator.es26.js.map +1 -0
- package/dist/react-text-annotator.es27.js +130 -0
- package/dist/react-text-annotator.es27.js.map +1 -0
- package/dist/react-text-annotator.es28.js +167 -0
- package/dist/react-text-annotator.es28.js.map +1 -0
- package/dist/react-text-annotator.es29.js +314 -0
- package/dist/react-text-annotator.es29.js.map +1 -0
- package/dist/react-text-annotator.es3.js +2 -2
- package/dist/react-text-annotator.es30.js +152 -0
- package/dist/react-text-annotator.es30.js.map +1 -0
- package/dist/react-text-annotator.es31.js +566 -0
- package/dist/react-text-annotator.es31.js.map +1 -0
- package/dist/react-text-annotator.es4.js +38 -28
- package/dist/react-text-annotator.es4.js.map +1 -1
- package/dist/react-text-annotator.es5.js +23 -47
- package/dist/react-text-annotator.es5.js.map +1 -1
- package/dist/react-text-annotator.es6.js +127 -10
- package/dist/react-text-annotator.es6.js.map +1 -1
- package/dist/react-text-annotator.es7.js +546 -1
- package/dist/react-text-annotator.es7.js.map +1 -1
- package/dist/react-text-annotator.es8.js +9 -487
- package/dist/react-text-annotator.es8.js.map +1 -1
- package/dist/tei/TEIAnnotator.d.ts +2 -3
- package/package.json +23 -16
- package/dist/TextAnnotatorPopup.d.ts +0 -14
- package/dist/TextAnnotatorPopup.d.ts.map +0 -1
- package/dist/react-text-annotator.es13.js.map +0 -1
- package/dist/react-text-annotator.es9.js.map +0 -1
package/dist/TextAnnotator.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { HighlightStyleExpression, TextAnnotation, TextAnnotatorOptions } from '@soomo/text-annotator';
|
|
2
|
-
import { FormatAdapter } from '@annotorious/core';
|
|
3
|
-
import { Filter } from '@annotorious/react';
|
|
4
1
|
import { ReactNode } from 'react';
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { Filter } from '@annotorious/react';
|
|
3
|
+
import { FormatAdapter } from '@annotorious/core';
|
|
4
|
+
import { HighlightStyleExpression, TextAnnotation, TextAnnotatorOptions } from '@soomo/text-annotator';
|
|
5
|
+
export interface TextAnnotatorProps<E extends unknown> extends Omit<TextAnnotatorOptions<TextAnnotation, E>, 'adapter'> {
|
|
7
6
|
children?: ReactNode | JSX.Element;
|
|
8
7
|
adapter?: FormatAdapter<TextAnnotation, E> | ((container: HTMLElement) => FormatAdapter<TextAnnotation, E>) | null;
|
|
9
8
|
filter?: Filter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnnotator.d.ts","sourceRoot":"","sources":["../src/TextAnnotator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiC,MAAM,OAAO,CAAC;AACjE,OAAO,EAAsB,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAG5G,OAAO,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"TextAnnotator.d.ts","sourceRoot":"","sources":["../src/TextAnnotator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiC,MAAM,OAAO,CAAC;AACjE,OAAO,EAAsB,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAG5G,OAAO,+CAA+C,CAAC;AAEvD,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,OAAO,CAAE,SAAQ,IAAI,CAAC,oBAAoB,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC;IAErH,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC;IAEnC,OAAO,CAAC,EAAE,aAAa,CAAC,cAAc,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,WAAW,KAAK,aAAa,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAEnH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,wBAAwB,CAAC;IAEjC,SAAS,CAAC,EAAE,MAAM,CAAC;CAEpB;AAED,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,OAAO,SAAS,kBAAkB,CAAC,CAAC,CAAC,4CAsC5E,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { TextAnnotator } from '@soomo/text-annotator';
|
|
2
1
|
import { AnnotatorPlugin } from '@annotorious/react';
|
|
3
|
-
|
|
2
|
+
import { TextAnnotator } from '@soomo/text-annotator';
|
|
4
3
|
export type TextAnnotatorPlugin<T extends unknown = TextAnnotator> = AnnotatorPlugin<T>;
|
|
5
4
|
//# sourceMappingURL=TextAnnotatorPlugin.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC, PointerEvent, ReactNode } from 'react';
|
|
2
|
+
import { TextAnnotation } from '@soomo/text-annotator';
|
|
3
|
+
interface TextAnnotationPopupProps {
|
|
4
|
+
ariaNavigationMessage?: string;
|
|
5
|
+
ariaCloseWarning?: string;
|
|
6
|
+
popup(props: TextAnnotationPopupContentProps): ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface TextAnnotationPopupContentProps {
|
|
9
|
+
annotation: TextAnnotation;
|
|
10
|
+
editable?: boolean;
|
|
11
|
+
event?: PointerEvent;
|
|
12
|
+
}
|
|
13
|
+
export declare const TextAnnotatorPopup: FC<TextAnnotationPopupProps>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=TextAnnotatorPopup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextAnnotatorPopup.d.ts","sourceRoot":"","sources":["../../src/TextAnnotatorPopup/TextAnnotatorPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,SAAS,EAA6C,MAAM,OAAO,CAAC;AAiB/F,OAAO,EAGL,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,0BAA0B,CAAC;AAElC,UAAU,wBAAwB;IAEhC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,KAAK,CAAC,KAAK,EAAE,+BAA+B,GAAG,SAAS,CAAC;CAE1D;AAED,MAAM,WAAW,+BAA+B;IAE9C,UAAU,EAAE,cAAc,CAAC;IAE3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,KAAK,CAAC,EAAE,YAAY,CAAC;CAEtB;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,wBAAwB,CA8I3D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TextAnnotatorPopup/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isMobile.d.ts","sourceRoot":"","sources":["../../src/TextAnnotatorPopup/isMobile.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,QAAQ,eAepB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface AnnouncePopupOpeningArgs {
|
|
2
|
+
message?: string;
|
|
3
|
+
idle?: number;
|
|
4
|
+
floatingOpen: boolean;
|
|
5
|
+
floatingFocused?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const useAnnouncePopupNavigation: (args: AnnouncePopupOpeningArgs) => void;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=useAnnouncePopupNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnnouncePopupNavigation.d.ts","sourceRoot":"","sources":["../../src/hooks/useAnnouncePopupNavigation.ts"],"names":[],"mappings":"AAOA,UAAU,wBAAwB;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,0BAA0B,SAAU,wBAAwB,SA2DxE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export * from './tei';
|
|
2
|
+
export * from './hooks';
|
|
2
3
|
export * from './TextAnnotator';
|
|
3
4
|
export * from './TextAnnotatorPopup';
|
|
4
5
|
export * from './TextAnnotatorPlugin';
|
|
5
|
-
export type { Annotation, AnnotationBody, AnnotationTarget, Annotator, AnnotatorState, Color, Filter, FormatAdapter, HoverState, Selection, SelectionState, Store, StoreChangeEvent, StoreObserver, ParseResult, User, W3CAnnotation, W3CAnnotationBody, W3CAnnotationTarget } from '@annotorious/core';
|
|
6
|
-
export { createBody, Origin,
|
|
6
|
+
export type { Annotation, AnnotationBody, AnnotationTarget, Annotator, AnnotatorState, Color, Filter, FormatAdapter, HoverState, Selection, SelectionState, Store, StoreChangeEvent, StoreObserver, ParseResult, User, UserSelectActionExpression, W3CAnnotation, W3CAnnotationBody, W3CAnnotationTarget } from '@annotorious/core';
|
|
7
|
+
export { createBody, Origin, UserSelectAction } from '@annotorious/core';
|
|
7
8
|
export { AnnotoriousPlugin } from '@annotorious/react';
|
|
8
|
-
export type { TextAnnotation, TextAnnotationTarget, TextSelector, W3CTextAnnotation, W3CTextAnnotationTarget, W3CTextSelector, W3CAnnotationStylesheet,
|
|
9
|
+
export type { HighlightStyle, HighlightStyleExpression, TextAnnotation, TextAnnotationTarget, TextSelector, W3CTextAnnotation, W3CTextAnnotationTarget, W3CTextSelector, W3CAnnotationStylesheet, TextAnnotator as RecogitoTextAnnotator, TextAnnotationStore } from '@soomo/text-annotator';
|
|
10
|
+
export { W3CTextFormat } from '@recogito/text-annotator';
|
|
11
|
+
export type { RecogitoTEIAnnotator, TEIAnnotation, TEIAnnotationTarget, TEIRangeSelector } from '@recogito/text-annotator-tei';
|
|
9
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAGtC,YAAY,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,KAAK,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,SAAS,EACT,cAAc,EACd,KAAK,EACL,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,UAAU,EACV,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAGtC,YAAY,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,KAAK,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,SAAS,EACT,cAAc,EACd,KAAK,EACL,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,IAAI,EACJ,0BAA0B,EAC1B,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,UAAU,EACV,MAAM,EACN,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACN,iBAAiB,EACjB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,uBAAuB,EACvB,aAAa,IAAI,qBAAqB,EACtC,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,aAAa,EACd,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC"}
|
|
@@ -1 +1,31 @@
|
|
|
1
|
-
.r6o-
|
|
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{position:absolute;display:block;border-style:solid;border-width:0;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}.r6o-annotatable.no-focus-outline{outline:none}.hovered *{cursor:pointer}*::selection,::selection{background:#0080ff2e}::-moz-selection{background:#0080ff2e}
|
|
2
|
+
/*
|
|
3
|
+
* Close message should be visible only to the keyboard
|
|
4
|
+
* or the screen reader users as the popup behavior hint
|
|
5
|
+
* Inspired by https://gist.github.com/ffoodd/000b59f431e3e64e4ce1a24d5bb36034
|
|
6
|
+
*/
|
|
7
|
+
.r6o-popup-sr-only {
|
|
8
|
+
border: 0 !important;
|
|
9
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
10
|
+
-webkit-clip-path: inset(50%);
|
|
11
|
+
clip-path: inset(50%);
|
|
12
|
+
height: 1px;
|
|
13
|
+
margin: -1px;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
padding: 0;
|
|
16
|
+
position: absolute;
|
|
17
|
+
width: 1px;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.r6o-popup-sr-only:focus,
|
|
22
|
+
.r6o-popup-sr-only:active {
|
|
23
|
+
clip: auto;
|
|
24
|
+
-webkit-clip-path: none;
|
|
25
|
+
clip-path: none;
|
|
26
|
+
height: auto;
|
|
27
|
+
margin: auto;
|
|
28
|
+
overflow: visible;
|
|
29
|
+
width: auto;
|
|
30
|
+
white-space: normal;
|
|
31
|
+
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { CETEIcean } from "./react-text-annotator.es2.js";
|
|
2
2
|
import { TEIAnnotator } from "./react-text-annotator.es3.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { useAnnouncePopupNavigation } from "./react-text-annotator.es4.js";
|
|
4
|
+
import { TextAnnotator } from "./react-text-annotator.es5.js";
|
|
5
|
+
import { TextAnnotatorPopup } from "./react-text-annotator.es6.js";
|
|
6
|
+
import { Origin, UserSelectAction, createBody } from "@annotorious/core";
|
|
6
7
|
import { AnnotoriousPlugin } from "@annotorious/react";
|
|
8
|
+
import { W3CTextFormat } from "./react-text-annotator.es7.js";
|
|
7
9
|
export {
|
|
8
10
|
AnnotoriousPlugin,
|
|
9
11
|
CETEIcean,
|
|
10
12
|
Origin,
|
|
11
|
-
PointerSelectAction,
|
|
12
13
|
TEIAnnotator,
|
|
13
14
|
TextAnnotator,
|
|
14
15
|
TextAnnotatorPopup,
|
|
15
|
-
|
|
16
|
+
UserSelectAction,
|
|
17
|
+
W3CTextFormat,
|
|
18
|
+
createBody,
|
|
19
|
+
useAnnouncePopupNavigation
|
|
16
20
|
};
|
|
17
21
|
//# sourceMappingURL=react-text-annotator.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-text-annotator.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-text-annotator.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|