@prose-reader/core 1.229.0 → 1.230.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.
@@ -25,7 +25,6 @@ export declare class Context extends ReactiveEntity<ContextState> {
25
25
  destroy$: Subject<void>;
26
26
  state$: Observable<ContextState>;
27
27
  manifest$: Observable<Manifest>;
28
- containerElementRect$: Observable<DOMRectReadOnly | undefined>;
29
28
  hasVerticalWriting$: Observable<boolean>;
30
29
  isUsingSpreadMode$: Observable<boolean | undefined>;
31
30
  constructor();
@@ -0,0 +1,12 @@
1
+ import { Reader } from '../../reader';
2
+ import { UnsafeSpinePosition } from '../../spine/types';
3
+ export declare const getSpinePositionFromClientPosition: (position: {
4
+ x: number;
5
+ y: number;
6
+ }, spineElement: HTMLElement) => UnsafeSpinePosition;
7
+ export declare const createCoordinatesApi: (reader: Reader) => {
8
+ getSpinePositionFromClientPosition: (position: {
9
+ x: number;
10
+ y: number;
11
+ }) => UnsafeSpinePosition | undefined;
12
+ };
@@ -2,10 +2,12 @@ import { Observable, ObservedValueOf } from 'rxjs';
2
2
  import { SettingsInterface } from '../../settings/SettingsInterface';
3
3
  import { Pages } from '../../spine/Pages';
4
4
  import { EnhancerOptions, EnhancerOutput, RootEnhancer } from '../types/enhancer';
5
+ import { createCoordinatesApi } from './coordinates';
5
6
  import { EnhancerLayoutInputSettings, OutputSettings } from './types';
6
7
  export type LayoutEnhancerOutput = {
7
8
  layout$: Observable<ObservedValueOf<Pages>>;
8
9
  layoutInfo$: Observable<ObservedValueOf<Pages>>;
10
+ coordinates: ReturnType<typeof createCoordinatesApi>;
9
11
  };
10
12
  export declare const layoutEnhancer: <InheritOptions extends EnhancerOptions<RootEnhancer>, InheritOutput extends EnhancerOutput<RootEnhancer>, InheritSettings extends NonNullable<InheritOutput["settings"]["_inputSettings"]>, InheritComputedSettings extends NonNullable<InheritOutput["settings"]["_outputSettings"]>, Output extends Omit<InheritOutput, "settings"> & LayoutEnhancerOutput & {
11
13
  settings: SettingsInterface<InheritSettings & EnhancerLayoutInputSettings, OutputSettings & InheritComputedSettings>;