@recogito/text-annotator 4.0.0-beta → 4.0.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.
@@ -1,2 +1,2 @@
1
- import { TextSelector } from '../../model';
1
+ import type { TextSelector } from '../../model';
2
2
  export declare const rangeToSelector: (range: Range, container: HTMLElement, offsetReferenceSelector?: string) => TextSelector;
@@ -1,4 +1,4 @@
1
- import { TextAnnotation, TextAnnotationTarget, TextSelector } from '../../model';
1
+ import type { TextAnnotation, TextAnnotationTarget, TextSelector } from '../../model';
2
2
  export declare const isRevived: (selector: TextSelector[]) => boolean;
3
3
  /**
4
4
  * Creates a new selector object with the revived DOM range from the given text annotation position
@@ -1,3 +1,3 @@
1
- import { TextAnnotationStore } from '../../state';
2
- import { TextAnnotation } from '../../model';
1
+ import type { TextAnnotationStore } from '../../state';
2
+ import type { TextAnnotation } from '../../model';
3
3
  export declare const scrollIntoView: <I extends TextAnnotation = TextAnnotation>(container: HTMLElement, store: TextAnnotationStore<I>) => <E extends Element = Element>(annotationOrId: string | I, scrollParentOrId?: string | E) => boolean;
@@ -1,3 +1,3 @@
1
- import { Highlight } from '../../rendering';
2
- import { Rect } from '../../state';
1
+ import type { Highlight } from '../../rendering';
2
+ import type { Rect } from '../../state';
3
3
  export declare const computeZIndex: (rect: Rect, all: Highlight[]) => number;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@recogito/text-annotator",
3
- "version": "4.0.0-beta",
3
+ "version": "4.0.0",
4
4
  "description": "A JavaScript text annotation library",
5
5
  "author": "Rainer Simon",
6
6
  "license": "BSD-3-Clause",
7
7
  "type": "module",
8
8
  "scripts": {
9
9
  "start": "vite --host",
10
- "build": "vite build && vite build --config vite.config.umd.ts",
10
+ "build": "tsc -p tsconfig.build.json && vite build && vite build --config vite.config.umd.ts",
11
11
  "preview": "vite preview",
12
12
  "test": "vitest"
13
13
  },
@@ -26,24 +26,23 @@
26
26
  "./text-annotator.css": "./dist/text-annotator.css"
27
27
  },
28
28
  "devDependencies": {
29
- "@types/jsdom": "^27.0.0",
29
+ "@types/jsdom": "^28.0.1",
30
30
  "@types/rbush": "^4.0.0",
31
- "jsdom": "^27.2.0",
32
- "typescript": "5.9.3",
33
- "vite": "^7.2.2",
31
+ "jsdom": "^29.1.0",
32
+ "typescript": "^5.9.3",
33
+ "vite": "^7.3.2",
34
34
  "vite-plugin-externalize-deps": "^0.10.0",
35
- "vitest": "^4.0.10"
35
+ "vitest": "^4.1.5"
36
36
  },
37
37
  "dependencies": {
38
- "@annotorious/core": "^3.7.13",
38
+ "@annotorious/core": "^3.8.2",
39
39
  "colord": "^2.9.3",
40
40
  "debounce": "^3.0.0",
41
41
  "dequal": "^2.0.3",
42
- "hotkeys-js": "^3.13.15",
42
+ "hotkeys-js": "^4.0.4",
43
43
  "poll": "^3.2.2",
44
44
  "nanoevents": "^9.1.0",
45
45
  "rbush": "^4.0.1",
46
- "ua-parser-js": "^2.0.6",
47
- "uuid": "^13.0.0"
46
+ "uuid": "^14.0.0"
48
47
  }
49
48
  }
@@ -1,12 +0,0 @@
1
- export * from './rendering';
2
- export * from './model';
3
- export * from './state';
4
- export * from './utils/annotation';
5
- export * from './utils/dom';
6
- export * from './utils/events';
7
- export * from './utils/highlight';
8
- export * from './selection-handler';
9
- export * from './text-annotator';
10
- export * from './text-annotator-options';
11
- export type { Annotation, AnnotationBody, AnnotationTarget, Annotator, AnnotatorState, Color, Filter, FormatAdapter, HoverState, Selection, SelectionState, Store, StoreChangeEvent, StoreObserver, ParseResult, User, UserSelectActionExpression, ViewportState, W3CAnnotation, W3CAnnotationBody, W3CAnnotationTarget } from '@annotorious/core';
12
- export { createBody, Origin, UserSelectAction } from '@annotorious/core';