@annotorious/core 3.0.0-rc.22 → 3.0.0-rc.24

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 +1 @@
1
- {"version":3,"file":"AnnotationState.d.ts","sourceRoot":"","sources":["../../src/model/AnnotationState.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAE9B,QAAQ,EAAE,OAAO,CAAC;IAElB,KAAK,EAAE,OAAO,CAAC;IAEf,MAAM,EAAE;QAEN,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAEnB,CAAA;CAEF"}
1
+ {"version":3,"file":"AnnotationState.d.ts","sourceRoot":"","sources":["../../src/model/AnnotationState.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAE9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,MAAM,CAAC,EAAE;QAEP,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAEnB,CAAA;CAEF"}
@@ -1,11 +1,12 @@
1
- import type { Annotation } from './Annotation';
2
- import type { User } from './User';
3
- import type { PresenceProvider } from '../presence/PresenceProvider';
4
- import { type HoverState, type SelectionState, type Store, type UndoStack, type ViewportState } from '../state';
5
- import type { LifecycleEvents } from '../lifecycle/LifecycleEvents';
6
- import { type FormatAdapter } from './FormatAdapter';
7
- import type { DrawingStyleExpression } from './DrawingStyle';
8
- import type { Filter } from './Filter';
1
+ import { Annotation } from './Annotation';
2
+ import { User } from './User';
3
+ import { PresenceProvider } from '../presence/PresenceProvider';
4
+ import { HoverState, SelectionState, Store, UndoStack, ViewportState } from '../state';
5
+ import { LifecycleEvents } from '../lifecycle/LifecycleEvents';
6
+ import { FormatAdapter } from './FormatAdapter';
7
+ import { DrawingStyleExpression } from './DrawingStyle';
8
+ import { Filter } from './Filter';
9
+
9
10
  /**
10
11
  * Base annotator interface
11
12
  * @template I - internal core data model
@@ -1,5 +1,6 @@
1
- import type { Annotation } from "./Annotation";
2
- import type { AnnotationState } from "./AnnotationState";
1
+ import { Annotation } from './Annotation';
2
+ import { AnnotationState } from './AnnotationState';
3
+
3
4
  type RGB = `rgb(${number}, ${number}, ${number})`;
4
5
  type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
5
6
  type HEX = `#${string}`;
@@ -11,6 +12,6 @@ export interface DrawingStyle {
11
12
  strokeOpacity?: number;
12
13
  strokeWidth?: number;
13
14
  }
14
- export type DrawingStyleExpression<T extends Annotation> = DrawingStyle | ((annotation: T, state?: AnnotationState) => DrawingStyle);
15
+ export type DrawingStyleExpression<T extends Annotation = Annotation> = DrawingStyle | ((annotation: T, state?: AnnotationState) => DrawingStyle | undefined);
15
16
  export {};
16
17
  //# sourceMappingURL=DrawingStyle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawingStyle.d.ts","sourceRoot":"","sources":["../../src/model/DrawingStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,KAAK,GAAG,GAAG,OAAO,MAAM,KAAK,MAAM,KAAK,MAAM,GAAG,CAAC;AAElD,KAAK,IAAI,GAAG,QAAQ,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,GAAG,CAAC;AAE/D,KAAK,GAAG,GAAG,IAAI,MAAM,EAAE,CAAC;AAExB,MAAM,MAAM,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;AAErC,MAAM,WAAW,YAAY;IAE3B,IAAI,CAAC,EAAE,KAAK,CAAC;IAEb,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,MAAM,CAAC,EAAE,KAAK,CAAC;IAEf,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,WAAW,CAAC,EAAE,MAAM,CAAC;CAEtB;AAED,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,UAAU,IACrD,YAAY,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,eAAe,KAAK,YAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"DrawingStyle.d.ts","sourceRoot":"","sources":["../../src/model/DrawingStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,KAAK,GAAG,GAAG,OAAO,MAAM,KAAK,MAAM,KAAK,MAAM,GAAG,CAAC;AAElD,KAAK,IAAI,GAAG,QAAQ,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,GAAG,CAAC;AAE/D,KAAK,GAAG,GAAG,IAAI,MAAM,EAAE,CAAC;AAExB,MAAM,MAAM,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;AAErC,MAAM,WAAW,YAAY;IAE3B,IAAI,CAAC,EAAE,KAAK,CAAC;IAEb,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,MAAM,CAAC,EAAE,KAAK,CAAC;IAEf,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,WAAW,CAAC,EAAE,MAAM,CAAC;CAEtB;AAED,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAClE,YAAY,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,eAAe,KAAK,YAAY,GAAG,SAAS,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
- import type { Annotation } from './Annotation';
1
+ import { Annotation } from './Annotation';
2
+
2
3
  export type Filter<T extends Annotation = Annotation> = (annotation: T) => boolean;
3
4
  //# sourceMappingURL=Filter.d.ts.map
@@ -1,4 +1,5 @@
1
- import type { Annotation } from './Annotation';
1
+ import { Annotation } from './Annotation';
2
+
2
3
  export interface FormatAdapter<A extends Annotation, T extends unknown> {
3
4
  parse(serialized: T): ParseResult<A>;
4
5
  serialize(core: A): T;
@@ -1,4 +1,5 @@
1
- import type { AnnotationBody } from './Annotation';
1
+ import { AnnotationBody } from './Annotation';
2
+
2
3
  export interface W3CAnnotation {
3
4
  '@context': 'http://www.w3.org/ns/anno.jsonld';
4
5
  type: 'Annotation';
@@ -1,6 +1,7 @@
1
- import type { User } from '../model/User';
2
- import type { Appearance } from './Appearance';
3
- import type { PresentUser } from './PresentUser';
1
+ import { User } from '../model/User';
2
+ import { Appearance } from './Appearance';
3
+ import { PresentUser } from './PresentUser';
4
+
4
5
  export interface AppearanceProvider {
5
6
  addUser(presenceKey: string, user: User): Appearance;
6
7
  removeUser(user: PresentUser): void;
@@ -1,4 +1,5 @@
1
- import type { PresentUser } from './PresentUser';
1
+ import { PresentUser } from './PresentUser';
2
+
2
3
  export interface PresenceEvents {
3
4
  presence: (users: PresentUser[]) => void;
4
5
  selectionChange: (from: PresentUser, selection: string[] | null) => void;
@@ -1,4 +1,5 @@
1
- import type { PresenceEvents } from './PresenceEvents';
1
+ import { PresenceEvents } from './PresenceEvents';
2
+
2
3
  export interface PresenceProvider {
3
4
  on<E extends keyof PresenceEvents>(event: E, callback: PresenceEvents[E]): void;
4
5
  }
@@ -1,8 +1,9 @@
1
- import { type Unsubscribe } from 'nanoevents';
2
- import type { User } from '../model/User';
3
- import type { PresentUser } from './PresentUser';
4
- import type { PresenceEvents } from './PresenceEvents';
5
- import type { AppearanceProvider } from './AppearanceProvider';
1
+ import { Unsubscribe } from 'nanoevents';
2
+ import { User } from '../model/User';
3
+ import { PresentUser } from './PresentUser';
4
+ import { PresenceEvents } from './PresenceEvents';
5
+ import { AppearanceProvider } from './AppearanceProvider';
6
+
6
7
  export interface PresenceState {
7
8
  getPresentUsers(): PresentUser[];
8
9
  notifyActivity(presenceKey: string, annotationIds: string[]): void;
@@ -1,5 +1,6 @@
1
- import type { User } from '../model/User';
2
- import type { Appearance } from './Appearance';
1
+ import { User } from '../model/User';
2
+ import { Appearance } from './Appearance';
3
+
3
4
  export interface PresentUser extends User {
4
5
  presenceKey: string;
5
6
  appearance: Appearance;
@@ -1,10 +1,10 @@
1
- /// <reference types="svelte" />
2
- import type { Annotation } from '../model';
3
- import type { Store } from './Store';
1
+ import { Annotation } from '../model';
2
+ import { Store } from './Store';
3
+
4
4
  export type HoverState<T extends Annotation> = ReturnType<typeof createHoverState<T>>;
5
5
  export declare const createHoverState: <T extends Annotation>(store: Store<T>) => {
6
6
  readonly current: string | undefined;
7
- subscribe: (this: void, run: import("svelte/store").Subscriber<string | undefined>, invalidate?: import("svelte/store").Invalidator<string | undefined> | undefined) => import("svelte/store").Unsubscriber;
7
+ subscribe: (this: void, run: import('svelte/store').Subscriber<string | undefined>, invalidate?: import('svelte/store').Invalidator<string | undefined> | undefined) => import('svelte/store').Unsubscriber;
8
8
  set: (this: void, value: string | undefined) => void;
9
9
  };
10
10
  //# sourceMappingURL=Hover.d.ts.map
@@ -1,6 +1,6 @@
1
- /// <reference types="svelte" />
2
- import type { Annotation } from '../model';
3
- import type { Store } from './Store';
1
+ import { Annotation } from '../model';
2
+ import { Store } from './Store';
3
+
4
4
  export type Selection = {
5
5
  selected: {
6
6
  id: string;
@@ -25,7 +25,7 @@ export declare const createSelectionState: <T extends Annotation>(store: Store<T
25
25
  isEmpty: () => boolean;
26
26
  isSelected: (annotationOrId: T | string) => boolean;
27
27
  setSelected: (idOrIds: string | string[], editable?: boolean) => void;
28
- subscribe: (this: void, run: import("svelte/store").Subscriber<Selection>, invalidate?: import("svelte/store").Invalidator<Selection> | undefined) => import("svelte/store").Unsubscriber;
28
+ subscribe: (this: void, run: import('svelte/store').Subscriber<Selection>, invalidate?: import('svelte/store').Invalidator<Selection> | undefined) => import('svelte/store').Unsubscriber;
29
29
  };
30
- export declare const onPointerSelect: <T extends Annotation>(annotation: T, action?: PointerSelectAction | ((a: T) => PointerSelectAction) | undefined) => PointerSelectAction;
30
+ export declare const onPointerSelect: <T extends Annotation>(annotation: T, action?: PointerSelectAction | ((a: T) => PointerSelectAction)) => PointerSelectAction;
31
31
  //# sourceMappingURL=Selection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Selection.d.ts","sourceRoot":"","sources":["../../src/state/Selection.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAG,UAAU,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,MAAM,SAAS,GAAG;IAEtB,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IAE/C,YAAY,CAAC,EAAE,YAAY,CAAC;CAE7B,CAAA;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,UAAU,IAAI,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9F,oBAAY,mBAAmB;IAE7B,IAAI,SAAS,CAAE,uDAAuD;IAEtE,MAAM,WAAW,CAAG,uCAAuC;IAE3D,IAAI,SAAS;CAEd;AAID,eAAO,MAAM,oBAAoB,gCACxB,MAAM,CAAC,CAAC,4CAC0B,CAAC,KAAK,mBAAmB;;sBAqBzC,MAAM,gBAAgB,YAAY;;YA3C3C,MAAM;;;;;iCAkCc,CAAC,GAAG,MAAM;2BAwBhB,MAAM,GAAG,MAAM,EAAE,aAAY,OAAO;;CAyCnE,CAAA;AAED,eAAO,MAAM,eAAe,qCACd,CAAC,sCACuB,CAAC,KAAK,mBAAmB,kBAC5D,mBAEqC,CAAC"}
1
+ {"version":3,"file":"Selection.d.ts","sourceRoot":"","sources":["../../src/state/Selection.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAG,UAAU,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,MAAM,SAAS,GAAG;IAEtB,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IAE/C,YAAY,CAAC,EAAE,YAAY,CAAC;CAE7B,CAAA;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,UAAU,IAAI,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9F,oBAAY,mBAAmB;IAE7B,IAAI,SAAS,CAAE,uDAAuD;IAEtE,MAAM,WAAW,CAAG,uCAAuC;IAE3D,IAAI,SAAS;CAEd;AAID,eAAO,MAAM,oBAAoB,gCACxB,MAAM,CAAC,CAAC,iBACD,mBAAmB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,mBAAmB,CAAC;;sBAqB1C,MAAM,gBAAgB,YAAY;;YA3C3C,MAAM;;;;;iCAkCc,CAAC,GAAG,MAAM;2BAwBhB,MAAM,GAAG,MAAM,EAAE,aAAY,OAAO;;CAyCnE,CAAA;AAED,eAAO,MAAM,eAAe,qCACd,CAAC,WACJ,mBAAmB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,mBAAmB,CAAC,KAC7D,mBAEqC,CAAC"}
@@ -1,6 +1,6 @@
1
- import type { Annotation } from '../model';
2
- import { Origin } from './StoreObserver';
3
- import type { StoreChangeEvent, StoreObserveOptions } from './StoreObserver';
1
+ import { Annotation } from '../model';
2
+ import { Origin, StoreChangeEvent, StoreObserveOptions } from './StoreObserver';
3
+
4
4
  type AnnotationBodyIdentifier = {
5
5
  id: string;
6
6
  annotation: string;
@@ -12,6 +12,7 @@ export declare const createStore: <T extends Annotation>() => {
12
12
  all: () => T[];
13
13
  bulkAddAnnotation: (annotations: T[], replace?: boolean, origin?: Origin) => void;
14
14
  bulkDeleteAnnotation: (annotationsOrIds: (T | string)[], origin?: Origin) => void;
15
+ bulkDeleteBodies: (bodies: AnnotationBodyIdentifier[], origin?: Origin) => void;
15
16
  bulkUpdateAnnotation: (annotations: T[], origin?: Origin) => void;
16
17
  bulkUpdateBodies: (bodies: Array<T['bodies'][number]>, origin?: Origin) => void;
17
18
  bulkUpdateTargets: (targets: Array<T['target']>, origin?: Origin) => void;
@@ -20,8 +21,12 @@ export declare const createStore: <T extends Annotation>() => {
20
21
  deleteBody: (body: AnnotationBodyIdentifier, origin?: Origin) => void;
21
22
  getAnnotation: (id: string) => T | undefined;
22
23
  getBody: (id: string) => T['bodies'][number] | undefined;
23
- observe: (onChange: (event: StoreChangeEvent<T>) => void, options?: StoreObserveOptions) => number;
24
- unobserve: (onChange: (event: StoreChangeEvent<T>) => void) => void;
24
+ observe: (onChange: {
25
+ (event: StoreChangeEvent<T>): void;
26
+ }, options?: StoreObserveOptions) => number;
27
+ unobserve: (onChange: {
28
+ (event: StoreChangeEvent<T>): void;
29
+ }) => void;
25
30
  updateAnnotation: (arg1: string | T, arg2?: T | Origin, arg3?: Origin) => void;
26
31
  updateBody: (oldBodyId: AnnotationBodyIdentifier, newBody: T['bodies'][number], origin?: Origin) => void;
27
32
  updateTarget: (target: T['target'], origin?: Origin) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/state/Store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,MAAM,EAA6C,MAAM,iBAAiB,CAAC;AACpF,OAAO,KAAK,EAAiB,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG5F,KAAK,wBAAwB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,UAAU,IAAI,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;AAI5E,eAAO,MAAM,WAAW;gCAkCa,CAAC;oBAwDb,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;;qCAiCF,CAAC,EAAE;6CAmDK,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE;wCA9FnB,CAAC,EAAE;+BA6LZ,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;iCAuCxB,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;;uCA5IZ,CAAC,GAAG,MAAM;uBAgB1B,wBAAwB;wBA6BvB,MAAM,KAAG,CAAC,GAAG,SAAS;kBAK5B,MAAM,KAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS;gCAlNxB,iBAAiB,CAAC,CAAC,KAAG,IAAI,YAAa,mBAAmB;kCAGxD,iBAAiB,CAAC,CAAC,KAAG,IAAI;6BA6DjC,MAAM,GAAG,CAAC,SAAQ,CAAC,GAAG,MAAM;4BA+L7B,wBAAwB,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;2BAuCvD,CAAC,CAAC,QAAQ,CAAC;CAkC1C,CAAA"}
1
+ {"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/state/Store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,MAAM,EAA6C,MAAM,iBAAiB,CAAC;AACpF,OAAO,KAAK,EAAiB,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG5F,KAAK,wBAAwB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,UAAU,IAAI,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;AAI5E,eAAO,MAAM,WAAW;gCAkCa,CAAC;oBAwDb,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;;qCAiCF,CAAC,EAAE;6CAmDK,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE;+BA6C5B,wBAAwB,EAAE;wCA3IjB,CAAC,EAAE;+BA4MZ,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;iCAuCxB,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;;uCA3JZ,CAAC,GAAG,MAAM;uBA6C1B,wBAAwB;wBAevB,MAAM,KAAG,CAAC,GAAG,SAAS;kBAK5B,MAAM,KAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS;wBAjOlC;QAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,GAAG,IAAI,CAAA;KAAE,YAAW,mBAAmB;0BAGlE;QAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,GAAG,IAAI,CAAA;KAAE;6BA6DnC,MAAM,GAAG,CAAC,SAAQ,CAAC,GAAG,MAAM;4BA8M7B,wBAAwB,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;2BAuCvD,CAAC,CAAC,QAAQ,CAAC;CAmC1C,CAAA"}
@@ -1,4 +1,5 @@
1
- import type { Annotation, AnnotationBody, AnnotationTarget } from '../model/Annotation';
1
+ import { Annotation, AnnotationBody, AnnotationTarget } from '../model/Annotation';
2
+
2
3
  /** Interface for listening to changes in the annotation store **/
3
4
  export interface StoreObserver<T extends Annotation> {
4
5
  onChange: {
@@ -1,5 +1,6 @@
1
- import type { Annotation, Annotator, AnnotatorState } from '../model';
2
- import type { Store } from './Store';
1
+ import { Annotation, Annotator, AnnotatorState } from '../model';
2
+ import { Store } from './Store';
3
+
3
4
  type Subscriber<T extends Annotation> = (annotation: T[]) => void;
4
5
  export interface SvelteStore<T extends Annotation> extends Store<T> {
5
6
  subscribe(onChange: Subscriber<T>): void;
@@ -1,7 +1,8 @@
1
- import { type Unsubscribe } from 'nanoevents';
2
- import type { Annotation } from '../model';
3
- import type { Store } from './Store';
4
- import { type ChangeSet } from './StoreObserver';
1
+ import { Unsubscribe } from 'nanoevents';
2
+ import { Annotation } from '../model';
3
+ import { Store } from './Store';
4
+ import { ChangeSet } from './StoreObserver';
5
+
5
6
  export interface UndoStack<T extends Annotation> {
6
7
  canRedo(): boolean;
7
8
  canUndo(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"UndoStack.d.ts","sourceRoot":"","sources":["../../src/state/UndoStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAgB,KAAK,SAAS,EAAsC,MAAM,iBAAiB,CAAC;AAOnG,MAAM,WAAW,SAAS,CAAE,CAAC,SAAS,UAAU;IAE9C,OAAO,IAAI,OAAO,CAAC;IAEnB,OAAO,IAAI,OAAO,CAAC;IAEnB,OAAO,IAAI,IAAI,CAAC;IAEhB,EAAE,CAAC,CAAC,SAAS,MAAM,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC;IAE/F,IAAI,IAAI,IAAI,CAAC;IAEb,IAAI,IAAI,IAAI,CAAC;CAEd;AAED,MAAM,WAAW,eAAe,CAAE,CAAC,SAAS,UAAU;IAEpD,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAEjC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAElC;AAED,eAAO,MAAM,eAAe,gCAAiC,MAAM,CAAC,CAAC,KAAG,UAAU,CAAC,CA2GlF,CAAA"}
1
+ {"version":3,"file":"UndoStack.d.ts","sourceRoot":"","sources":["../../src/state/UndoStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAgB,KAAK,SAAS,EAAsC,MAAM,iBAAiB,CAAC;AAOnG,MAAM,WAAW,SAAS,CAAE,CAAC,SAAS,UAAU;IAE9C,OAAO,IAAI,OAAO,CAAC;IAEnB,OAAO,IAAI,OAAO,CAAC;IAEnB,OAAO,IAAI,IAAI,CAAC;IAEhB,EAAE,CAAC,CAAC,SAAS,MAAM,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC;IAE/F,IAAI,IAAI,IAAI,CAAC;IAEb,IAAI,IAAI,IAAI,CAAC;CAEd;AAED,MAAM,WAAW,eAAe,CAAE,CAAC,SAAS,UAAU;IAEpD,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAEjC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAElC;AAED,eAAO,MAAM,eAAe,gCAAiC,MAAM,CAAC,CAAC,KAAG,UAAU,CAAC,CAgHlF,CAAA"}
@@ -1,7 +1,7 @@
1
1
  /// <reference types="svelte" />
2
2
  export type ViewportState = ReturnType<typeof createViewportState>;
3
3
  export declare const createViewportState: () => {
4
- subscribe: (this: void, run: import("svelte/store").Subscriber<string[]>, invalidate?: import("svelte/store").Invalidator<string[]> | undefined) => import("svelte/store").Unsubscriber;
4
+ subscribe: (this: void, run: import('svelte/store').Subscriber<string[]>, invalidate?: import('svelte/store').Invalidator<string[]> | undefined) => import('svelte/store').Unsubscriber;
5
5
  set: (this: void, value: string[]) => void;
6
6
  };
7
7
  //# sourceMappingURL=Viewport.d.ts.map
@@ -1,5 +1,6 @@
1
- import type { Annotation, AnnotationBody } from '../model/Annotation';
2
- import type { User } from '../model/User';
1
+ import { Annotation, AnnotationBody } from '../model/Annotation';
2
+ import { User } from '../model/User';
3
+
3
4
  /**
4
5
  * Returns all users listed as creators or updaters in any parts of this
5
6
  * annotation.
@@ -1 +1 @@
1
- {"version":3,"file":"annotationUtils.d.ts","sourceRoot":"","sources":["../../src/utils/annotationUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAG,IAAI,EAAE,MAAM,eAAe,CAAC;AAC3C;;;GAGG;AACH,eAAO,MAAM,eAAe,eAAgB,UAAU,KAAG,IAAI,EAY5D,CAAA;AAED,eAAO,MAAM,UAAU,eACT,UAAU;;aAEZ,IAAI,YACJ,IAAI,KACb,cAMD,CAAC"}
1
+ {"version":3,"file":"annotationUtils.d.ts","sourceRoot":"","sources":["../../src/utils/annotationUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAG,IAAI,EAAE,MAAM,eAAe,CAAC;AAC3C;;;GAGG;AACH,eAAO,MAAM,eAAe,eAAgB,UAAU,KAAG,IAAI,EAY5D,CAAA;AAED,eAAO,MAAM,UAAU,eACT,UAAU,WACb;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,YACrB,IAAI,YACJ,IAAI,KACb,cAMD,CAAC"}
@@ -1,4 +1,5 @@
1
- import type { Update } from '../state/StoreObserver';
2
- import type { Annotation } from '../model/Annotation';
1
+ import { Update } from '../state/StoreObserver';
2
+ import { Annotation } from '../model/Annotation';
3
+
3
4
  export declare const diffAnnotations: <T extends Annotation = Annotation>(oldValue: T, newValue: T) => Update<T>;
4
5
  //# sourceMappingURL=diffAnnotations.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annotorious/core",
3
- "version": "3.0.0-rc.22",
3
+ "version": "3.0.0-rc.24",
4
4
  "description": "Annotorious core types and functions",
5
5
  "author": "Rainer Simon",
6
6
  "license": "BSD-3-Clause",
@@ -25,21 +25,21 @@
25
25
  "dist"
26
26
  ],
27
27
  "devDependencies": {
28
- "@sveltejs/vite-plugin-svelte": "^3.0.2",
28
+ "@sveltejs/vite-plugin-svelte": "^3.1.0",
29
29
  "@tsconfig/svelte": "^5.0.4",
30
30
  "@types/deep-equal": "^1.0.4",
31
31
  "@types/uuid": "^9.0.8",
32
- "svelte": "^4.2.12",
33
- "svelte-preprocess": "^5.1.3",
34
- "typescript": "^5.4.3",
35
- "vite": "^5.2.6",
36
- "vite-plugin-dts": "^3.7.3",
37
- "vitest": "^1.4.0"
32
+ "svelte": "^4.2.17",
33
+ "svelte-preprocess": "^5.1.4",
34
+ "typescript": "^5.4.5",
35
+ "vite": "^5.2.11",
36
+ "vite-plugin-dts": "^3.9.1",
37
+ "vitest": "^1.6.0"
38
38
  },
39
39
  "dependencies": {
40
40
  "dequal": "^2.0.3",
41
41
  "nanoevents": "^9.0.0",
42
- "nanoid": "^5.0.6",
42
+ "nanoid": "^5.0.7",
43
43
  "uuid": "^9.0.1"
44
44
  }
45
45
  }