@epubjs-react-native/core
Version:
A digital book reader in .opf .epub format for react native using epub.js library inside a webview.
102 lines (101 loc) • 1.85 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.useReader = useReader;
var _react = require("react");
var _context = require("../context");
function useReader() {
const {
changeFontSize,
changeFontFamily,
changeTheme,
goToLocation,
goPrevious,
goNext,
getLocations,
getCurrentLocation,
getMeta,
search,
clearSearchResults,
isSearching,
theme,
atStart,
atEnd,
totalLocations,
currentLocation,
progress,
locations,
isLoading,
key,
searchResults,
addAnnotation,
addAnnotationByTagId,
updateAnnotation,
updateAnnotationByTagId,
removeAnnotation,
removeAnnotationByTagId,
removeAnnotationByCfi,
removeSelection,
annotations,
section,
toc,
landmarks,
addBookmark,
removeBookmark,
removeBookmarks,
updateBookmark,
bookmarks,
isBookmarked,
injectJavascript,
changeFlow,
isRendering,
flow
} = (0, _react.useContext)(_context.ReaderContext);
return {
changeFontSize,
changeFontFamily,
changeTheme,
goToLocation,
goPrevious,
goNext,
getLocations,
getCurrentLocation,
getMeta,
search,
clearSearchResults,
addAnnotation,
addAnnotationByTagId,
updateAnnotation,
updateAnnotationByTagId,
removeAnnotation,
removeAnnotationByTagId,
removeAnnotationByCfi,
removeSelection,
theme,
atStart,
atEnd,
totalLocations,
currentLocation,
progress,
locations,
isLoading,
key,
isSearching,
searchResults,
annotations,
section,
toc,
landmarks,
addBookmark,
removeBookmark,
removeBookmarks,
updateBookmark,
bookmarks,
isBookmarked,
injectJavascript,
changeFlow,
isRendering,
flow
};
}