react-ebookjs 0.0.3 → 0.0.5
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/README.md +2 -0
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +305 -259
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +305 -259
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -12,6 +12,7 @@ interface Section {
|
|
|
12
12
|
linear?: string;
|
|
13
13
|
cfi?: string;
|
|
14
14
|
createDocument: () => Promise<any>;
|
|
15
|
+
resolveHref?: (href: string) => string | null;
|
|
15
16
|
}
|
|
16
17
|
type ResolveIndex = {
|
|
17
18
|
index: number;
|
|
@@ -50,6 +51,7 @@ interface Book {
|
|
|
50
51
|
resolveCFI?: (cfi: string) => ResolveIndex;
|
|
51
52
|
splitTOCHref?: (href: string) => string | string[];
|
|
52
53
|
getTOCFragment?: (href: string) => string;
|
|
54
|
+
isExternal?: (href: string) => boolean;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
declare function loadEPUB(blob: Blob): Promise<Book>;
|
|
@@ -126,7 +128,7 @@ declare module "react" {
|
|
|
126
128
|
namespace JSX {
|
|
127
129
|
interface IntrinsicElements {
|
|
128
130
|
'foliate-paginator': React.DetailedHTMLProps<React.HTMLAttributes<Paginator>, Paginator>;
|
|
129
|
-
'foliate-
|
|
131
|
+
'foliate-fxl': React.DetailedHTMLProps<React.HTMLAttributes<FixedLayout>, FixedLayout>;
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
}
|
|
@@ -147,6 +149,7 @@ interface ReaderContentProps {
|
|
|
147
149
|
declare function ReaderContent({ fontSize, lineSpacing, justify, hyphenate, flow }: ReaderContentProps): react_jsx_runtime.JSX.Element;
|
|
148
150
|
declare function ReaderNext({ children, ...props }: Omit<React.ComponentProps<"button">, "onClick">): react_jsx_runtime.JSX.Element;
|
|
149
151
|
declare function ReaderPrevious({ children, ...props }: Omit<React.ComponentProps<"button">, "onClick">): react_jsx_runtime.JSX.Element;
|
|
152
|
+
|
|
150
153
|
declare function useBookNavigator(): {
|
|
151
154
|
goTo: (target: number | string | {
|
|
152
155
|
fraction: number;
|
|
@@ -154,6 +157,7 @@ declare function useBookNavigator(): {
|
|
|
154
157
|
next: (distance?: number) => Promise<void>;
|
|
155
158
|
previous: (distance?: number) => Promise<void>;
|
|
156
159
|
};
|
|
160
|
+
|
|
157
161
|
declare function useSearch(query?: string): {
|
|
158
162
|
loading: boolean;
|
|
159
163
|
results: {
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ interface Section {
|
|
|
12
12
|
linear?: string;
|
|
13
13
|
cfi?: string;
|
|
14
14
|
createDocument: () => Promise<any>;
|
|
15
|
+
resolveHref?: (href: string) => string | null;
|
|
15
16
|
}
|
|
16
17
|
type ResolveIndex = {
|
|
17
18
|
index: number;
|
|
@@ -50,6 +51,7 @@ interface Book {
|
|
|
50
51
|
resolveCFI?: (cfi: string) => ResolveIndex;
|
|
51
52
|
splitTOCHref?: (href: string) => string | string[];
|
|
52
53
|
getTOCFragment?: (href: string) => string;
|
|
54
|
+
isExternal?: (href: string) => boolean;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
declare function loadEPUB(blob: Blob): Promise<Book>;
|
|
@@ -126,7 +128,7 @@ declare module "react" {
|
|
|
126
128
|
namespace JSX {
|
|
127
129
|
interface IntrinsicElements {
|
|
128
130
|
'foliate-paginator': React.DetailedHTMLProps<React.HTMLAttributes<Paginator>, Paginator>;
|
|
129
|
-
'foliate-
|
|
131
|
+
'foliate-fxl': React.DetailedHTMLProps<React.HTMLAttributes<FixedLayout>, FixedLayout>;
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
}
|
|
@@ -147,6 +149,7 @@ interface ReaderContentProps {
|
|
|
147
149
|
declare function ReaderContent({ fontSize, lineSpacing, justify, hyphenate, flow }: ReaderContentProps): react_jsx_runtime.JSX.Element;
|
|
148
150
|
declare function ReaderNext({ children, ...props }: Omit<React.ComponentProps<"button">, "onClick">): react_jsx_runtime.JSX.Element;
|
|
149
151
|
declare function ReaderPrevious({ children, ...props }: Omit<React.ComponentProps<"button">, "onClick">): react_jsx_runtime.JSX.Element;
|
|
152
|
+
|
|
150
153
|
declare function useBookNavigator(): {
|
|
151
154
|
goTo: (target: number | string | {
|
|
152
155
|
fraction: number;
|
|
@@ -154,6 +157,7 @@ declare function useBookNavigator(): {
|
|
|
154
157
|
next: (distance?: number) => Promise<void>;
|
|
155
158
|
previous: (distance?: number) => Promise<void>;
|
|
156
159
|
};
|
|
160
|
+
|
|
157
161
|
declare function useSearch(query?: string): {
|
|
158
162
|
loading: boolean;
|
|
159
163
|
results: {
|