@soomo/text-annotator 3.0.0-staging.0 → 3.0.0-staging.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.
Files changed (40) hide show
  1. package/dist/src/SelectionHandler.d.ts +3 -2
  2. package/dist/src/TextAnnotator.d.ts +4 -4
  3. package/dist/src/TextAnnotatorOptions.d.ts +7 -5
  4. package/dist/src/api/scrollIntoView.d.ts +3 -2
  5. package/dist/src/highlight/Highlight.d.ts +6 -0
  6. package/dist/src/highlight/HighlightPainter.d.ts +7 -4
  7. package/dist/src/highlight/HighlightStyle.d.ts +7 -6
  8. package/dist/src/highlight/baseRenderer.d.ts +21 -0
  9. package/dist/src/highlight/canvas/canvasRenderer.d.ts +4 -0
  10. package/dist/src/highlight/canvas/index.d.ts +1 -1
  11. package/dist/src/highlight/highlights/highlightsRenderer.d.ts +6 -0
  12. package/dist/src/highlight/highlights/index.d.ts +1 -0
  13. package/dist/src/highlight/index.d.ts +4 -2
  14. package/dist/src/highlight/span/index.d.ts +1 -0
  15. package/dist/src/highlight/span/spansRenderer.d.ts +4 -0
  16. package/dist/src/highlight/viewport.d.ts +3 -2
  17. package/dist/src/index.d.ts +1 -1
  18. package/dist/src/model/core/TextAnnotation.d.ts +2 -1
  19. package/dist/src/model/w3c/W3CTextAnnotation.d.ts +2 -1
  20. package/dist/src/model/w3c/W3CTextFormatAdapter.d.ts +4 -3
  21. package/dist/src/presence/PresencePainter.d.ts +4 -3
  22. package/dist/src/state/TextAnnotationStore.d.ts +4 -4
  23. package/dist/src/state/TextAnnotatorState.d.ts +4 -4
  24. package/dist/src/state/spatialTree.d.ts +9 -6
  25. package/dist/src/utils/isRevived.d.ts +2 -1
  26. package/dist/src/utils/rangeToSelector.d.ts +2 -1
  27. package/dist/src/utils/reviveAnnotation.d.ts +2 -1
  28. package/dist/src/utils/reviveSelector.d.ts +2 -1
  29. package/dist/src/utils/reviveTarget.d.ts +2 -1
  30. package/dist/test/model/w3c/fixtures.d.ts +2 -1
  31. package/dist/text-annotator.css +1 -1
  32. package/dist/text-annotator.es.js +1102 -1037
  33. package/dist/text-annotator.es.js.map +1 -1
  34. package/dist/text-annotator.umd.js +2 -2
  35. package/dist/text-annotator.umd.js.map +1 -1
  36. package/package.json +6 -6
  37. package/dist/src/highlight/canvas/highlightRenderer.d.ts +0 -11
  38. package/dist/src/highlight/css/highlightRenderer.d.ts +0 -11
  39. package/dist/src/highlight/css/highlights.d.ts +0 -9
  40. package/dist/src/highlight/css/index.d.ts +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soomo/text-annotator",
3
- "version": "3.0.0-staging.0",
3
+ "version": "3.0.0-staging.2",
4
4
  "description": "A JavaScript text annotation library",
5
5
  "author": "Rainer Simon",
6
6
  "license": "BSD-3-Clause",
@@ -9,8 +9,7 @@
9
9
  "start": "vite --host",
10
10
  "build": "vite build",
11
11
  "preview": "vite preview",
12
- "test": "vitest",
13
- "prepare": "npm run build"
12
+ "test": "vitest"
14
13
  },
15
14
  "main": "./dist/text-annotator.umd.js",
16
15
  "module": "./dist/text-annotator.es.js",
@@ -32,14 +31,15 @@
32
31
  "@types/uuid": "^9.0.8",
33
32
  "jsdom": "^24.0.0",
34
33
  "svelte": "^4.2.12",
35
- "typescript": "^5.3.3",
34
+ "typescript": "^5.4.3",
36
35
  "vite": "^5.2.6",
37
- "vite-plugin-dts": "^3.7.3",
36
+ "vite-plugin-dts": "^3.8.1",
38
37
  "vitest": "^1.4.0"
39
38
  },
40
39
  "dependencies": {
41
- "@annotorious/core": "^3.0.0-rc.21",
40
+ "@annotorious/core": "^3.0.0-rc.22",
42
41
  "colord": "^2.9.3",
42
+ "dequal": "^2.0.3",
43
43
  "rbush": "^3.0.1",
44
44
  "uuid": "^9.0.1"
45
45
  }
@@ -1,11 +0,0 @@
1
- import type { Filter, ViewportState } from '@annotorious/core';
2
- import type { TextAnnotatorState } from '../../state';
3
- import { type HighlightStyleExpression } from '../HighlightStyle';
4
- import type { HighlightPainter } from '../HighlightPainter';
5
- export declare const createCanvasHighlightRenderer: (container: HTMLElement, state: TextAnnotatorState, viewport: ViewportState) => {
6
- destroy: () => void;
7
- refresh: () => number;
8
- setHighlightStyle: (style: HighlightStyleExpression) => void;
9
- setFilter: (filter?: Filter) => void;
10
- setPainter: (painter: HighlightPainter) => HighlightPainter;
11
- };
@@ -1,11 +0,0 @@
1
- import type { Filter, ViewportState } from '@annotorious/core';
2
- import type { TextAnnotatorState } from '../../state';
3
- import type { HighlightPainter } from '../HighlightPainter';
4
- import type { HighlightStyleExpression } from '../HighlightStyle';
5
- export declare const createCSSHighlightRenderer: (container: HTMLElement, state: TextAnnotatorState, viewport: ViewportState) => {
6
- destroy: () => void;
7
- refresh: () => void;
8
- setHighlightStyle: (style: HighlightStyleExpression) => void;
9
- setFilter: (filter?: Filter) => void;
10
- setPainter: (painter: HighlightPainter) => void;
11
- };
@@ -1,9 +0,0 @@
1
- import type { HighlightPainter } from '../HighlightPainter';
2
- import type { AnnotationRects } from 'src/state';
3
- import type { ViewportBounds } from '../viewport';
4
- import { type HighlightStyleExpression } from '../HighlightStyle';
5
- export declare const createHighlights: () => {
6
- destroy: () => void;
7
- refresh: (highlights: AnnotationRects[], viewportBounds: ViewportBounds, selected: string[], currentStyle: HighlightStyleExpression) => void;
8
- setPainter: (painter: HighlightPainter) => HighlightPainter;
9
- };
@@ -1 +0,0 @@
1
- export * from './highlightRenderer';