@soomo/react-text-annotator 3.0.0-staging.1 → 3.0.0-staging.10

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.
Files changed (56) hide show
  1. package/dist/TextAnnotator.d.ts +4 -3
  2. package/dist/TextAnnotator.d.ts.map +1 -1
  3. package/dist/TextAnnotatorPlugin.d.ts +3 -3
  4. package/dist/TextAnnotatorPlugin.d.ts.map +1 -1
  5. package/dist/TextAnnotatorPopup.d.ts +6 -4
  6. package/dist/TextAnnotatorPopup.d.ts.map +1 -1
  7. package/dist/index.d.ts +4 -2
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/react-text-annotator.css +1 -1
  10. package/dist/react-text-annotator.es.js +6 -2
  11. package/dist/react-text-annotator.es.js.map +1 -1
  12. package/dist/react-text-annotator.es10.js +578 -34
  13. package/dist/react-text-annotator.es10.js.map +1 -1
  14. package/dist/react-text-annotator.es11.js +460 -861
  15. package/dist/react-text-annotator.es11.js.map +1 -1
  16. package/dist/react-text-annotator.es12.js +2 -114
  17. package/dist/react-text-annotator.es12.js.map +1 -1
  18. package/dist/react-text-annotator.es13.js +34 -308
  19. package/dist/react-text-annotator.es13.js.map +1 -1
  20. package/dist/react-text-annotator.es14.js +895 -54
  21. package/dist/react-text-annotator.es14.js.map +1 -1
  22. package/dist/react-text-annotator.es15.js +226 -18
  23. package/dist/react-text-annotator.es15.js.map +1 -1
  24. package/dist/react-text-annotator.es16.js +136 -2
  25. package/dist/react-text-annotator.es16.js.map +1 -1
  26. package/dist/react-text-annotator.es17.js +114 -2
  27. package/dist/react-text-annotator.es17.js.map +1 -1
  28. package/dist/react-text-annotator.es18.js +312 -0
  29. package/dist/react-text-annotator.es18.js.map +1 -0
  30. package/dist/react-text-annotator.es19.js +61 -0
  31. package/dist/react-text-annotator.es19.js.map +1 -0
  32. package/dist/react-text-annotator.es2.js +1 -1
  33. package/dist/react-text-annotator.es20.js +23 -0
  34. package/dist/react-text-annotator.es20.js.map +1 -0
  35. package/dist/react-text-annotator.es21.js +5 -0
  36. package/dist/react-text-annotator.es21.js.map +1 -0
  37. package/dist/react-text-annotator.es22.js +5 -0
  38. package/dist/react-text-annotator.es22.js.map +1 -0
  39. package/dist/react-text-annotator.es23.js +124 -0
  40. package/dist/react-text-annotator.es23.js.map +1 -0
  41. package/dist/react-text-annotator.es24.js +555 -0
  42. package/dist/react-text-annotator.es24.js.map +1 -0
  43. package/dist/react-text-annotator.es3.js.map +1 -1
  44. package/dist/react-text-annotator.es4.js.map +1 -1
  45. package/dist/react-text-annotator.es5.js +60 -36
  46. package/dist/react-text-annotator.es5.js.map +1 -1
  47. package/dist/react-text-annotator.es6.js +3 -3
  48. package/dist/react-text-annotator.es8.js +24 -488
  49. package/dist/react-text-annotator.es8.js.map +1 -1
  50. package/dist/react-text-annotator.es9.js +196 -2
  51. package/dist/react-text-annotator.es9.js.map +1 -1
  52. package/dist/tei/TEIAnnotator.d.ts +3 -2
  53. package/dist/tei/TEIAnnotator.d.ts.map +1 -1
  54. package/dist/utils.d.ts +14 -0
  55. package/dist/utils.d.ts.map +1 -0
  56. package/package.json +14 -13
@@ -1,7 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
- import { Filter, FormatAdapter } from '@annotorious/react';
3
- import type { HighlightStyleExpression, TextAnnotation, TextAnnotatorOptions } from '@soomo/text-annotator';
4
- import '@soomo/text-annotator/dist/text-annotator.css';
2
+ import { Filter } from '@annotorious/react';
3
+ import { FormatAdapter } from '@annotorious/core';
4
+ import { HighlightStyleExpression, TextAnnotation, TextAnnotatorOptions } from '@soomo/text-annotator';
5
+
5
6
  export interface TextAnnotatorProps<E extends unknown> extends Omit<TextAnnotatorOptions<E>, 'adapter'> {
6
7
  children?: ReactNode | JSX.Element;
7
8
  adapter?: FormatAdapter<TextAnnotation, E> | ((container: HTMLElement) => FormatAdapter<TextAnnotation, E>) | null;
@@ -1 +1 @@
1
- {"version":3,"file":"TextAnnotator.d.ts","sourceRoot":"","sources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AoB,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC;IAErG,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,6BAA8B,mBAAmB,CAAC,CAAC,4CAqC5E,CAAA"}
@@ -1,5 +1,5 @@
1
- import { AnnotatorPlugin, AnnotoriousPlugin } from '@annotorious/react';
2
- import type { TextAnnotator } from '@soomo/text-annotator';
1
+ import { AnnotatorPlugin } from '@annotorious/react';
2
+ import { TextAnnotator } from '@soomo/text-annotator';
3
+
3
4
  export type TextAnnotatorPlugin<T extends unknown = TextAnnotator> = AnnotatorPlugin<T>;
4
- export { AnnotoriousPlugin as TextAnnotatorPlugin };
5
5
  //# sourceMappingURL=TextAnnotatorPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextAnnotatorPlugin.d.ts","sourceRoot":"","sources":["../src/TextAnnotatorPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,OAAO,GAAG,aAAa,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AACxF,OAAO,EAAE,iBAAiB,IAAI,mBAAmB,EAAE,CAAA"}
1
+ {"version":3,"file":"TextAnnotatorPlugin.d.ts","sourceRoot":"","sources":["../src/TextAnnotatorPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,OAAO,GAAG,aAAa,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC"}
@@ -1,13 +1,15 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { TextAnnotation } from '@soomo/text-annotator';
3
+
4
+ interface TextAnnotationPopupProps {
5
+ popup(props: TextAnnotatorPopupProps): ReactNode;
6
+ }
3
7
  export interface TextAnnotatorPopupProps {
4
8
  selected: {
5
9
  annotation: TextAnnotation;
6
10
  editable?: boolean;
7
11
  }[];
8
12
  }
9
- export interface TextAnnotatorPopupContainerProps {
10
- popup(props: TextAnnotatorPopupProps): ReactNode | JSX.Element;
11
- }
12
- export declare const TextAnnotatorPopup: (props: TextAnnotatorPopupContainerProps) => import("react").ReactPortal;
13
+ export declare const TextAnnotatorPopup: (props: TextAnnotationPopupProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
13
15
  //# sourceMappingURL=TextAnnotatorPopup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextAnnotatorPopup.d.ts","sourceRoot":"","sources":["../src/TextAnnotatorPopup.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAiB,cAAc,EAAsB,MAAM,uBAAuB,CAAC;AAG1F,MAAM,WAAW,uBAAuB;IAEtC,QAAQ,EAAE;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CAEhE;AAED,MAAM,WAAW,gCAAgC;IAE/C,KAAK,CAAC,KAAK,EAAE,uBAAuB,GAAG,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC;CAEhE;AAED,eAAO,MAAM,kBAAkB,UAAW,gCAAgC,gCA0DzE,CAAA"}
1
+ {"version":3,"file":"TextAnnotatorPopup.d.ts","sourceRoot":"","sources":["../src/TextAnnotatorPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,uBAAuB,CAAC;AAW1E,UAAU,wBAAwB;IAEhC,KAAK,CAAC,KAAK,EAAE,uBAAuB,GAAG,SAAS,CAAC;CAElD;AAED,MAAM,WAAW,uBAAuB;IAEtC,QAAQ,EAAE;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CAEhE;AAED,eAAO,MAAM,kBAAkB,UAAW,wBAAwB,4CAsFjE,CAAA"}
package/dist/index.d.ts CHANGED
@@ -2,6 +2,8 @@ export * from './tei';
2
2
  export * from './TextAnnotator';
3
3
  export * from './TextAnnotatorPopup';
4
4
  export * from './TextAnnotatorPlugin';
5
- export type { AnnotoriousPlugin } from '@annotorious/react';
6
- export type { TextAnnotation, TextAnnotator as RecogitoTextAnnotator } from '@soomo/text-annotator';
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, PointerSelectAction } from '@annotorious/core';
7
+ export { AnnotoriousPlugin } from '@annotorious/react';
8
+ export type { HighlightStyle, HighlightStyleExpression, TextAnnotation, TextAnnotationTarget, TextSelector, W3CTextAnnotation, W3CTextAnnotationTarget, W3CTextSelector, W3CAnnotationStylesheet, TextAnnotator as RecogitoTextAnnotator, TextAnnotationStore } from '@soomo/text-annotator';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -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,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,cAAc,EACd,aAAa,IAAI,qBAAqB,EACvC,MAAM,uBAAuB,CAAC"}
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,mBAAmB,EACpB,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"}
@@ -1 +1 @@
1
- html,body{overscroll-behavior-y:none}.r6o-annotatable{-webkit-tap-highlight-color:transparent}.r6o-annotatable,.r6o-annotatable *{position:relative}.hovered *{cursor:pointer}.r6o-highlight-layer{left:0;position:fixed;top:0;bottom:0;width:100vw;pointer-events:none}*::selection,::selection{background:#0080ff2e}::-moz-selection{background:#0080ff2e}
1
+ .r6o-annotatable .r6o-span-highlight-layer{height:100%;left:0;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;position:absolute;display:block}html,body{overscroll-behavior-y:none}.r6o-annotatable{-webkit-tap-highlight-color:transparent}.r6o-annotatable,.r6o-annotatable *{position:relative}.hovered *{cursor:pointer}.r6o-highlight-layer{left:0;position:fixed;top:0;bottom:0;width:100vw;pointer-events:none}*::selection,::selection{background:#0080ff2e}::-moz-selection{background:#0080ff2e}
@@ -2,12 +2,16 @@ import { CETEIcean } from "./react-text-annotator.es2.js";
2
2
  import { TEIAnnotator } from "./react-text-annotator.es3.js";
3
3
  import { TextAnnotator } from "./react-text-annotator.es4.js";
4
4
  import { TextAnnotatorPopup } from "./react-text-annotator.es5.js";
5
+ import { Origin, PointerSelectAction, createBody } from "@annotorious/core";
5
6
  import { AnnotoriousPlugin } from "@annotorious/react";
6
7
  export {
8
+ AnnotoriousPlugin,
7
9
  CETEIcean,
10
+ Origin,
11
+ PointerSelectAction,
8
12
  TEIAnnotator,
9
13
  TextAnnotator,
10
- AnnotoriousPlugin as TextAnnotatorPlugin,
11
- TextAnnotatorPopup
14
+ TextAnnotatorPopup,
15
+ createBody
12
16
  };
13
17
  //# 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":";;;;;;"}