@prose-reader/core 1.164.0 → 1.166.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.
@@ -9,7 +9,7 @@ export declare const report: {
9
9
  name: string;
10
10
  duration: number;
11
11
  }, targetDuration?: number) => void;
12
- measurePerformance: <F extends (...args: any[]) => any>(name: string, targetDuration: number | undefined, functionToMeasure: F, { disable }?: {
12
+ measurePerformance: <F extends (...args: any[]) => any>(name: string, targetDuration: number, functionToMeasure: F, { disable }?: {
13
13
  disable?: boolean;
14
14
  }) => F | ((...args: Parameters<F>) => ReturnType<F>);
15
15
  };
@@ -14,18 +14,16 @@ declare const defaultThemes: ({
14
14
  foregroundColor: string;
15
15
  })[];
16
16
  export type Theme = (typeof defaultThemes)[number][`name`] | `publisher`;
17
- export interface ThemeEnhancer {
18
- <InheritOptions, InheritOutput extends EnhancerOutput<RootEnhancer>>(next: (options: InheritOptions) => InheritOutput): (options: InheritOptions & {
19
- theme?: Theme;
20
- }) => InheritOutput & {
21
- theme: {
22
- set: (theme: Theme) => void;
23
- get: () => Theme;
24
- $: {
25
- theme$: Observable<Theme>;
26
- };
17
+ export type ThemeEnhancer = <InheritOptions, InheritOutput extends EnhancerOutput<RootEnhancer>>(next: (options: InheritOptions) => InheritOutput) => (options: InheritOptions & {
18
+ theme?: Theme;
19
+ }) => InheritOutput & {
20
+ theme: {
21
+ set: (theme: Theme) => void;
22
+ get: () => Theme;
23
+ $: {
24
+ theme$: Observable<Theme>;
27
25
  };
28
26
  };
29
- }
27
+ };
30
28
  export declare const themeEnhancer: ThemeEnhancer;
31
29
  export {};
@@ -1,7 +1,5 @@
1
1
  import { CreateReaderParameters, ReaderInternal } from '../../reader';
2
2
  export type EnhancerOutput<Enhancer extends (options: any) => any> = ReturnType<ReturnType<Enhancer>>;
3
3
  export type EnhancerOptions<Enhancer extends (options: any) => any> = Parameters<ReturnType<Enhancer>>[0];
4
- export interface RootEnhancer<Options extends CreateReaderParameters = CreateReaderParameters, Reader extends ReaderInternal = ReaderInternal> {
5
- (next: (options: Options) => Reader): (options: Options) => Reader;
6
- }
4
+ export type RootEnhancer<Options extends CreateReaderParameters = CreateReaderParameters, Reader extends ReaderInternal = ReaderInternal> = (next: (options: Options) => Reader) => (options: Options) => Reader;
7
5
  export declare const rootEnhancer: <Options extends CreateReaderParameters, Reader extends ReaderInternal>(next: (options: Options) => Reader) => (options: Options) => Reader;
@@ -44,7 +44,7 @@ export type CoreHook = {
44
44
  }) => void;
45
45
  } | {
46
46
  name: "onViewportOffsetAdjust";
47
- runFn: (params: void) => void;
47
+ runFn: (params: undefined) => void;
48
48
  } | {
49
49
  name: `navigator.onBeforeContainerCreated`;
50
50
  runFn: (params: {