@prose-reader/core 1.266.0 → 1.268.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/createReaderWithEnhancer.d.ts +11 -33
- package/dist/enhancers/layout/createPlaceholderPages.d.ts +31 -0
- package/dist/enhancers/layout/flagSpineItems.d.ts +2 -0
- package/dist/enhancers/layout/layoutEnhancer.d.ts +2 -1
- package/dist/index.js +1254 -1280
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +41 -41
- package/dist/index.umd.cjs.map +1 -1
- package/dist/spineItem/SpineItem.d.ts +9 -1
- package/dist/spineItem/renderer/DocumentRenderer.d.ts +11 -7
- package/package.json +4 -4
- package/dist/enhancers/loading/constants.d.ts +0 -2
- package/dist/enhancers/loading/createLoadingElement.d.ts +0 -7
- package/dist/enhancers/loading/loadingEnhancer.d.ts +0 -23
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import { CoreInputSettings,
|
|
1
|
+
import { CoreInputSettings, Theme, EnhancerLayoutInputSettings, EnhancerFontsInputSettings, Context, Spine, SpineItem, InternalNavigationEntry, InternalNavigator, ScrollNavigationController, ControlledNavigationController, Locker, UserNavigationEntry, SpinePosition, SpineItemPosition, UnboundSpinePosition, SpineItemsObserver, SpineItemsManager, ContextState, SettingsInterface, CoreOutputSettings, SpineItemReference, Viewport, Features, LayoutEnhancerOutput, ComputedCoreSettings, ExtraPaginationInfo, ResourcesLocator, NavigationEnhancerOutput, ZoomEnhancerOutput } from '.';
|
|
2
2
|
import { HookManager, CoreHook } from './hooks';
|
|
3
3
|
import { Manifest } from '@prose-reader/shared';
|
|
4
4
|
import { ProseParsedCfi, resolveCfi } from './cfi';
|
|
5
5
|
import { Observable, ObservedValueOf, Subject } from 'rxjs';
|
|
6
6
|
import { getNavigationForSpineItemPage } from './navigation/resolvers/getNavigationForSpineItemPage';
|
|
7
7
|
import { PaginationInfo, Pagination } from './pagination';
|
|
8
|
-
export declare const createReaderWithEnhancers: (options: Partial< CoreInputSettings> &
|
|
8
|
+
export declare const createReaderWithEnhancers: (options: Partial< CoreInputSettings> & {
|
|
9
9
|
theme?: Theme;
|
|
10
|
-
} & Partial<
|
|
11
|
-
loadingElementCreate?: (options: {
|
|
12
|
-
container: HTMLElement;
|
|
13
|
-
item: {
|
|
14
|
-
id: string;
|
|
15
|
-
index: number;
|
|
16
|
-
href: string;
|
|
17
|
-
renditionLayout?: `reflowable` | `pre-paginated`;
|
|
18
|
-
progressionWeight?: number;
|
|
19
|
-
pageSpreadLeft?: true | undefined;
|
|
20
|
-
pageSpreadRight?: true | undefined;
|
|
21
|
-
mediaType?: string;
|
|
22
|
-
};
|
|
23
|
-
}) => HTMLElement;
|
|
24
|
-
}) => Omit<Omit<Omit<Omit<{
|
|
10
|
+
} & Partial< EnhancerLayoutInputSettings> & Partial< EnhancerFontsInputSettings>) => Omit<Omit<Omit<Omit<{
|
|
25
11
|
id: `${string}-${string}-${string}-${string}-${string}`;
|
|
26
12
|
context: Context;
|
|
27
13
|
spine: Spine;
|
|
@@ -115,6 +101,14 @@ export declare const createReaderWithEnhancers: (options: Partial< CoreInputSett
|
|
|
115
101
|
$: {
|
|
116
102
|
destroy$: Subject<void>;
|
|
117
103
|
};
|
|
104
|
+
} & {
|
|
105
|
+
theme: {
|
|
106
|
+
set: (theme: Theme) => void;
|
|
107
|
+
get: () => Theme;
|
|
108
|
+
$: {
|
|
109
|
+
theme$: Observable<Theme>;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
118
112
|
}, "settings"> & LayoutEnhancerOutput & {
|
|
119
113
|
settings: SettingsInterface< CoreInputSettings & EnhancerLayoutInputSettings, EnhancerLayoutInputSettings & CoreInputSettings & ComputedCoreSettings>;
|
|
120
114
|
}, "pagination"> & {
|
|
@@ -126,14 +120,6 @@ export declare const createReaderWithEnhancers: (options: Partial< CoreInputSett
|
|
|
126
120
|
state: PaginationInfo & ExtraPaginationInfo;
|
|
127
121
|
};
|
|
128
122
|
locateResource: ResourcesLocator["locateResource"];
|
|
129
|
-
} & {
|
|
130
|
-
theme: {
|
|
131
|
-
set: (theme: Theme) => void;
|
|
132
|
-
get: () => Theme;
|
|
133
|
-
$: {
|
|
134
|
-
theme$: Observable<Theme>;
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
123
|
} & {
|
|
138
124
|
links$: Observable<MouseEvent>;
|
|
139
125
|
}, "load"> & NavigationEnhancerOutput & ZoomEnhancerOutput & {
|
|
@@ -143,14 +129,6 @@ export declare const createReaderWithEnhancers: (options: Partial< CoreInputSett
|
|
|
143
129
|
};
|
|
144
130
|
}, "settings"> & {
|
|
145
131
|
settings: SettingsInterface< CoreInputSettings & EnhancerLayoutInputSettings & EnhancerFontsInputSettings, EnhancerFontsInputSettings & EnhancerLayoutInputSettings & CoreInputSettings & ComputedCoreSettings>;
|
|
146
|
-
} & {
|
|
147
|
-
loading: {
|
|
148
|
-
$: {
|
|
149
|
-
items$: Observable<{
|
|
150
|
-
[key: string]: HTMLElement;
|
|
151
|
-
}>;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
132
|
} & {
|
|
155
133
|
selection: {
|
|
156
134
|
selection$: Observable<{
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Reader } from '../../reader';
|
|
3
|
+
import { Theme } from '../theme';
|
|
4
|
+
import { SpineItemPageSpineLayout, SpineItemPageLayout } from '../..';
|
|
5
|
+
export declare const HTML_PREFIX = "prose-reader-enhancer-loading";
|
|
6
|
+
export declare const CONTAINER_HTML_PREFIX = "prose-reader-enhancer-loading-container";
|
|
7
|
+
export declare const createPlaceholderPages: (reader: Reader & {
|
|
8
|
+
theme: {
|
|
9
|
+
$: {
|
|
10
|
+
theme$: Observable<Theme>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}) => Observable<{
|
|
14
|
+
isLoaded: boolean;
|
|
15
|
+
isReady: boolean;
|
|
16
|
+
isError: boolean;
|
|
17
|
+
error: unknown | undefined;
|
|
18
|
+
iDirty: boolean;
|
|
19
|
+
} | [{
|
|
20
|
+
pages: {
|
|
21
|
+
absoluteLayout: SpineItemPageSpineLayout;
|
|
22
|
+
layout: SpineItemPageLayout;
|
|
23
|
+
itemIndex: number;
|
|
24
|
+
absolutePageIndex: number;
|
|
25
|
+
pageIndex: number;
|
|
26
|
+
firstVisibleNode: {
|
|
27
|
+
node: Node;
|
|
28
|
+
offset: number;
|
|
29
|
+
} | undefined;
|
|
30
|
+
}[];
|
|
31
|
+
}, Theme]>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Observable, ObservedValueOf } from 'rxjs';
|
|
2
2
|
import { SettingsInterface } from '../../settings/SettingsInterface';
|
|
3
3
|
import { Pages } from '../../spine/Pages';
|
|
4
|
+
import { themeEnhancer } from '../theme';
|
|
4
5
|
import { EnhancerOptions, EnhancerOutput, RootEnhancer } from '../types/enhancer';
|
|
5
6
|
import { createCoordinatesApi } from './coordinates';
|
|
6
7
|
import { EnhancerLayoutInputSettings, OutputSettings } from './types';
|
|
@@ -9,6 +10,6 @@ export type LayoutEnhancerOutput = {
|
|
|
9
10
|
layoutInfo$: Observable<ObservedValueOf<Pages>>;
|
|
10
11
|
coordinates: ReturnType<typeof createCoordinatesApi>;
|
|
11
12
|
};
|
|
12
|
-
export declare const layoutEnhancer: <InheritOptions extends EnhancerOptions<RootEnhancer>, InheritOutput extends EnhancerOutput<
|
|
13
|
+
export declare const layoutEnhancer: <InheritOptions extends EnhancerOptions<RootEnhancer>, InheritOutput extends EnhancerOutput<typeof themeEnhancer>, InheritSettings extends NonNullable<InheritOutput["settings"]["_inputSettings"]>, InheritComputedSettings extends NonNullable<InheritOutput["settings"]["_outputSettings"]>, Output extends Omit<InheritOutput, "settings"> & LayoutEnhancerOutput & {
|
|
13
14
|
settings: SettingsInterface<InheritSettings & EnhancerLayoutInputSettings, OutputSettings & InheritComputedSettings>;
|
|
14
15
|
}>(next: (options: InheritOptions) => InheritOutput) => (options: InheritOptions & Partial<EnhancerLayoutInputSettings>) => Output;
|