@prose-reader/core 1.204.0 → 1.206.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.
- package/dist/cfi/generate/generateCfiForSpineItemPage.d.ts +3 -7
- package/dist/createReaderWithEnhancer.d.ts +6 -12
- package/dist/enhancers/html/renderer/attachFrameSrc.d.ts +1 -1
- package/dist/enhancers/html/renderer/createFrameElement.d.ts +1 -1
- package/dist/enhancers/navigation/report.d.ts +1 -15
- package/dist/enhancers/pagination/ResourcesLocator.d.ts +9 -6
- package/dist/enhancers/pagination/types.d.ts +3 -3
- package/dist/enhancers/resources/resourcesManager.d.ts +1 -1
- package/dist/enhancers/selection/selection.d.ts +1 -1
- package/dist/features/Features.d.ts +15 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +5035 -7424
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +99 -9160
- package/dist/index.umd.cjs.map +1 -1
- package/dist/navigation/controllers/ScrollNavigationController.d.ts +3 -0
- package/dist/pagination/Pagination.d.ts +2 -7
- package/dist/reader.d.ts +12 -15
- package/dist/report.d.ts +5 -27
- package/dist/utils/ReactiveEntity.d.ts +6 -2
- package/dist/utils/dom.d.ts +2 -5
- package/package.json +3 -3
- package/dist/enhancers/pagination/constants.d.ts +0 -1
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { SpineItemLocator } from '../../spineItem/locationResolver';
|
|
2
1
|
import { SpineItem } from '../../spineItem/SpineItem';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
spineItem: SpineItem;
|
|
6
|
-
spineItemLocator: SpineItemLocator;
|
|
7
|
-
}) => string) | ((args_0: {
|
|
2
|
+
import { SpineItemLocator } from '../../spineItem/locationResolver';
|
|
3
|
+
export declare const generateCfiForSpineItemPage: ({ pageIndex, spineItem, spineItemLocator, }: {
|
|
8
4
|
pageIndex: number;
|
|
9
5
|
spineItem: SpineItem;
|
|
10
6
|
spineItemLocator: SpineItemLocator;
|
|
11
|
-
}) => string
|
|
7
|
+
}) => string;
|
|
@@ -101,8 +101,8 @@ export declare const createReaderWithEnhancers: (options: Partial<import('./sett
|
|
|
101
101
|
load: (options: Required<Pick<import('./context/Context').ContextState, "manifest" | "containerElement">>) => void;
|
|
102
102
|
destroy: () => void;
|
|
103
103
|
pagination: {
|
|
104
|
-
|
|
105
|
-
state$: import('rxjs').Observable<import('./pagination/Pagination').
|
|
104
|
+
readonly state: import('./pagination/Pagination').PaginationInfo;
|
|
105
|
+
readonly state$: import('rxjs').Observable<import('rxjs').ObservedValueOf<import('./pagination/Pagination').Pagination>>;
|
|
106
106
|
};
|
|
107
107
|
settings: import('./settings/SettingsInterface').SettingsInterface<NonNullable<import('./settings/types').CoreInputSettings>, NonNullable<import('./settings/types').CoreOutputSettings | undefined>>;
|
|
108
108
|
viewport: import('./viewport/Viewport').Viewport;
|
|
@@ -110,27 +110,21 @@ export declare const createReaderWithEnhancers: (options: Partial<import('./sett
|
|
|
110
110
|
viewportState$: import('rxjs').Observable<"free" | "busy">;
|
|
111
111
|
viewportFree$: import('rxjs').Observable<"free">;
|
|
112
112
|
state$: import('rxjs').Observable<"idle" | "ready">;
|
|
113
|
+
features: import('./features/Features').Features;
|
|
113
114
|
$: {
|
|
114
|
-
state$: import('rxjs').Observable<{
|
|
115
|
-
supportedPageTurnAnimation: NonNullable<import('./reader').ContextSettings[`pageTurnAnimation`]>[];
|
|
116
|
-
supportedPageTurnMode: NonNullable<import('./reader').ContextSettings[`pageTurnMode`]>[];
|
|
117
|
-
supportedPageTurnDirection: NonNullable<import('./reader').ContextSettings[`pageTurnDirection`]>[];
|
|
118
|
-
supportedComputedPageTurnDirection: NonNullable<import('./reader').ContextSettings[`pageTurnDirection`]>[];
|
|
119
|
-
}>;
|
|
120
115
|
destroy$: import('rxjs').Subject<void>;
|
|
121
116
|
};
|
|
122
117
|
}, "settings"> & import('./enhancers/layout/layoutEnhancer').LayoutEnhancerOutput & {
|
|
123
118
|
settings: import('./settings/SettingsInterface').SettingsInterface<import('./settings/types').CoreInputSettings & import('./enhancers/layout/types').InputSettings, import('./enhancers/layout/types').InputSettings & import('./settings/types').CoreInputSettings & import('./settings/types').ComputedCoreSettings>;
|
|
124
119
|
}, "pagination"> & {
|
|
125
120
|
pagination: Omit<{
|
|
126
|
-
|
|
127
|
-
state$: import('rxjs').Observable<import('./pagination/Pagination').
|
|
121
|
+
readonly state: import('./pagination/Pagination').PaginationInfo;
|
|
122
|
+
readonly state$: import('rxjs').Observable<import('rxjs').ObservedValueOf<import('./pagination/Pagination').Pagination>>;
|
|
128
123
|
}, "state" | "state$"> & {
|
|
129
124
|
state$: import('rxjs').Observable<import('./pagination/Pagination').PaginationInfo & import('./enhancers/pagination/types').ExtraPaginationInfo>;
|
|
130
125
|
state: import('./pagination/Pagination').PaginationInfo & import('./enhancers/pagination/types').ExtraPaginationInfo;
|
|
131
126
|
};
|
|
132
|
-
|
|
133
|
-
locateResource: import('./enhancers/pagination/ResourcesLocator').ResourcesLocator["locate"];
|
|
127
|
+
locateResource: import('./enhancers/pagination/ResourcesLocator').ResourcesLocator["locateResource"];
|
|
134
128
|
} & {
|
|
135
129
|
theme: {
|
|
136
130
|
set: (theme: import('.').Theme) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
1
|
import { Manifest } from '@prose-reader/shared';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
3
|
import { ReaderSettingsManager } from '../../../settings/ReaderSettingsManager';
|
|
4
4
|
import { ResourceHandler } from '../../../spineItem/resources/ResourceHandler';
|
|
5
5
|
export declare const attachFrameSrc: ({ item, resourcesHandler, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const createFrameElement: (
|
|
1
|
+
export declare const createFrameElement: () => HTMLIFrameElement;
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
log: (...data: any[]) => void;
|
|
3
|
-
warn: (...data: any[]) => void;
|
|
4
|
-
info: (...data: any[]) => void;
|
|
5
|
-
debug: any;
|
|
6
|
-
error: (...data: any[]) => void;
|
|
7
|
-
time: (name: string, targetDuration?: number) => () => void;
|
|
8
|
-
logMetric: (performanceEntry: PerformanceEntry | {
|
|
9
|
-
name: string;
|
|
10
|
-
duration: number;
|
|
11
|
-
}, targetDuration?: number) => void;
|
|
12
|
-
measurePerformance: <F extends (...args: any[]) => any>(name: string, targetDuration: number, functionToMeasure: F, { disable }?: {
|
|
13
|
-
disable?: boolean;
|
|
14
|
-
}) => F | ((...args: Parameters<F>) => ReturnType<F>);
|
|
15
|
-
};
|
|
1
|
+
export declare const navigationReport: any;
|
|
@@ -15,18 +15,21 @@ export type ConsolidatedResource = CfiLocatableResource & {
|
|
|
15
15
|
range?: Range;
|
|
16
16
|
};
|
|
17
17
|
export declare const consolidate: (resource: ConsolidatedResource, reader: Reader) => Observable<ConsolidatedResource>;
|
|
18
|
+
type Options = {
|
|
19
|
+
mode?: "shallow" | "load";
|
|
20
|
+
};
|
|
18
21
|
export declare class ResourcesLocator {
|
|
19
22
|
private reader;
|
|
20
23
|
constructor(reader: Reader);
|
|
21
|
-
locate: <T extends LocatableResource>(resource: T, options
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
locate: <T extends LocatableResource>(resource: T, options: Options) => Observable<{
|
|
25
|
+
resource: T;
|
|
26
|
+
meta: ConsolidatedResource;
|
|
27
|
+
}>;
|
|
28
|
+
locateResource<T extends LocatableResource>(resource: T, options?: Options): Observable<{
|
|
24
29
|
resource: T;
|
|
25
30
|
meta: ConsolidatedResource;
|
|
26
31
|
}>;
|
|
27
|
-
|
|
28
|
-
mode?: "shallow" | "load";
|
|
29
|
-
}) => Observable<{
|
|
32
|
+
locateResource<T extends LocatableResource>(resource: T[], options?: Options): Observable<{
|
|
30
33
|
resource: T;
|
|
31
34
|
meta: ConsolidatedResource;
|
|
32
35
|
}[]>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { PaginationInfo } from '../../pagination/Pagination';
|
|
3
|
+
import { LayoutEnhancerOutput } from '../layout/layoutEnhancer';
|
|
3
4
|
import { EnhancerOutput, RootEnhancer } from '../types/enhancer';
|
|
4
5
|
import { ResourcesLocator } from './ResourcesLocator';
|
|
5
6
|
import { ChapterInfo } from './chapters';
|
|
@@ -15,11 +16,10 @@ export type ExtraPaginationInfo = {
|
|
|
15
16
|
isUsingSpread: boolean;
|
|
16
17
|
};
|
|
17
18
|
export type EnhancerPaginationInto = PaginationInfo & ExtraPaginationInfo;
|
|
18
|
-
export type PaginationEnhancerAPI<InheritOutput extends EnhancerOutput<RootEnhancer
|
|
19
|
+
export type PaginationEnhancerAPI<InheritOutput extends EnhancerOutput<RootEnhancer> & LayoutEnhancerOutput> = Omit<InheritOutput, "pagination"> & {
|
|
19
20
|
pagination: Omit<InheritOutput["pagination"], "state$" | "state"> & {
|
|
20
21
|
state$: Observable<PaginationInfo & ExtraPaginationInfo>;
|
|
21
22
|
state: PaginationInfo & ExtraPaginationInfo;
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
-
locateResource: ResourcesLocator["locate"];
|
|
24
|
+
locateResource: ResourcesLocator["locateResource"];
|
|
25
25
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Context } from '../../context/Context';
|
|
2
1
|
import { Manifest } from '../..';
|
|
2
|
+
import { Context } from '../../context/Context';
|
|
3
3
|
export declare const createResourcesManager: (context: Context) => {
|
|
4
4
|
get: (itemIndexOrId: number | Pick<Manifest[`spineItems`][number], `id`>, fetchResource?: (item: Manifest[`spineItems`][number]) => Promise<Response>) => Promise<Response>;
|
|
5
5
|
destroy: () => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Context } from '../context/Context';
|
|
2
|
+
import { ReaderSettingsManager } from '../settings/ReaderSettingsManager';
|
|
3
|
+
import { CoreInputSettings } from '../settings/types';
|
|
4
|
+
import { ReactiveEntity } from '../utils/ReactiveEntity';
|
|
5
|
+
export type ContextSettings = Partial<CoreInputSettings>;
|
|
6
|
+
type State = {
|
|
7
|
+
supportedPageTurnAnimation: NonNullable<ContextSettings[`pageTurnAnimation`]>[];
|
|
8
|
+
supportedPageTurnMode: NonNullable<ContextSettings[`pageTurnMode`]>[];
|
|
9
|
+
supportedPageTurnDirection: NonNullable<ContextSettings[`pageTurnDirection`]>[];
|
|
10
|
+
supportedComputedPageTurnDirection: NonNullable<ContextSettings[`pageTurnDirection`]>[];
|
|
11
|
+
};
|
|
12
|
+
export declare class Features extends ReactiveEntity<State> {
|
|
13
|
+
constructor(context: Context, settingsManager: ReaderSettingsManager);
|
|
14
|
+
}
|
|
15
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export { HookManager } from './hooks/HookManager';
|
|
|
7
7
|
export { SettingsManager } from './settings/SettingsManager';
|
|
8
8
|
export type Reader = ReturnType<typeof createReader>;
|
|
9
9
|
export { createReader };
|
|
10
|
-
export { Report } from './report';
|
|
11
10
|
export { isHtmlElement, isHtmlTagElement } from './utils/dom';
|
|
12
11
|
export { isShallowEqual } from './utils/objects';
|
|
13
12
|
export { waitForSwitch } from './utils/rxjs';
|