@prose-reader/react-reader 1.258.0 → 1.260.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/ReactReader.d.ts +11 -5
- package/dist/common/useMemoCompare.d.ts +1 -0
- package/dist/context/ReactReaderProvider.d.ts +5 -11
- package/dist/context/context.d.ts +16 -9
- package/dist/index.d.ts +0 -1
- package/dist/index.js +630 -631
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +2 -2
package/dist/ReactReader.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { BoxProps } from '@chakra-ui/react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
onItemClick?: (item: "annotations" | "search" | "help" | "toc" | "bookmarks" | "more" | "back" | "gallery") => void;
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { ReactReaderProvider } from './context/ReactReaderProvider';
|
|
4
|
+
export declare const InnerReactReader: import('react').MemoExoticComponent<({ children, ...rest }: {
|
|
6
5
|
children: React.ReactNode;
|
|
7
|
-
} &
|
|
6
|
+
} & BoxProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export declare const ReactReader: import('react').MemoExoticComponent<({ children, slots, ...props }: ComponentProps<typeof ReactReaderProvider> & {
|
|
8
|
+
slots?: {
|
|
9
|
+
container?: {
|
|
10
|
+
props?: Omit<ComponentProps<typeof InnerReactReader>, "children">;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useMemoCompare: <T>(value: T, compare: (a: T, b: T) => boolean) => T;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type ProviderProps = {
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { PublicContextType } from './context';
|
|
3
|
+
declare const SignalProvider: ({ children, onQuickMenuOpenChange, quickMenuOpen, ...props }: {
|
|
5
4
|
children: React.ReactNode;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
onQuickMenuOpenChange?: (open: boolean) => void;
|
|
9
|
-
} & Pick<ReaderContextType, "fontSize" | "onFontSizeChange" | "fontSizeScope" | "onFontSizeScopeChange">;
|
|
10
|
-
export declare const ReactReaderProvider: import('react').MemoExoticComponent<({ children, ...props }: {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
} & ProviderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
} & PublicContextType) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const ReactReaderProvider: import('react').MemoExoticComponent<({ children, ...props }: ComponentProps<typeof SignalProvider>) => import("react/jsx-runtime").JSX.Element>;
|
|
13
7
|
export {};
|
|
@@ -4,23 +4,30 @@ import { Signal } from 'reactjrx';
|
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import { ReaderNotification } from '../notifications/types';
|
|
6
6
|
import { SETTING_SCOPE, SETTING_SCOPE_REFERENCE } from '../settings/types';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
quickMenuOpen: boolean;
|
|
10
|
-
onQuickMenuOpenChange: (open: boolean) => void;
|
|
11
|
-
quickMenuBottomBarBoundingBoxSignal: Signal<ResizeObserverEntry | undefined>;
|
|
12
|
-
notificationsSubject: Subject<ReaderNotification>;
|
|
7
|
+
type PrivateContextType = {
|
|
8
|
+
uncontrolledFontSize: number;
|
|
13
9
|
refitMenuOpen: boolean;
|
|
14
10
|
onRefitMenuOpenChange: (open: boolean) => void;
|
|
15
11
|
fontSizeMenuOpen: boolean;
|
|
16
12
|
onFontSizeMenuOpenChange: (open: boolean) => void;
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
notificationsSubject: Subject<ReaderNotification>;
|
|
14
|
+
quickMenuBottomBarBoundingBoxSignal: Signal<ResizeObserverEntry | undefined>;
|
|
19
15
|
fontSizeMin: number;
|
|
20
16
|
fontSizeMax: number;
|
|
17
|
+
};
|
|
18
|
+
export type PublicContextType = {
|
|
19
|
+
reader: (Reader & GesturesEnhancerAPI) | undefined;
|
|
20
|
+
enableFloatingTime?: boolean;
|
|
21
|
+
enableFloatingProgress?: boolean;
|
|
22
|
+
onItemClick?: (item: "annotations" | "search" | "help" | "toc" | "bookmarks" | "more" | "back" | "gallery") => void;
|
|
23
|
+
quickMenuOpen: boolean;
|
|
24
|
+
onQuickMenuOpenChange: (open: boolean) => void;
|
|
25
|
+
fontSize?: number;
|
|
26
|
+
onFontSizeChange?: (scope: SETTING_SCOPE_REFERENCE, value: number) => void;
|
|
21
27
|
fontSizeScope?: SETTING_SCOPE_REFERENCE;
|
|
22
28
|
onFontSizeScopeChange?: (scope: SETTING_SCOPE) => void;
|
|
23
|
-
uncontrolledFontSize: number;
|
|
24
29
|
};
|
|
30
|
+
export type ReaderContextType = PrivateContextType & PublicContextType;
|
|
25
31
|
export declare const getDefaultValue: () => ReaderContextType;
|
|
26
32
|
export declare const ReaderContext: import('react').Context<Signal<ReaderContextType, undefined>>;
|
|
33
|
+
export {};
|
package/dist/index.d.ts
CHANGED