├── src-tauri ├── build.rs ├── icons │ ├── 32x32.png │ ├── icon.icns │ ├── icon.ico │ ├── icon.png │ ├── 128x128.png │ ├── 128x128@2x.png │ ├── StoreLogo.png │ ├── Square30x30Logo.png │ ├── Square44x44Logo.png │ ├── Square71x71Logo.png │ ├── Square89x89Logo.png │ ├── Square107x107Logo.png │ ├── Square142x142Logo.png │ ├── Square150x150Logo.png │ ├── Square284x284Logo.png │ └── Square310x310Logo.png ├── .gitignore ├── desktopTemplate.hbs ├── Cargo.toml └── tauri.conf.json ├── src ├── store │ ├── slices │ │ ├── constants.ts │ │ ├── AppState │ │ │ ├── state │ │ │ │ ├── modals │ │ │ │ │ ├── modalsTypes.d.ts │ │ │ │ │ └── modals.ts │ │ │ │ └── stateManager.ts │ │ │ └── globalThemes.ts │ │ ├── EpubJSBackend │ │ │ ├── state │ │ │ │ ├── stateManager.d.ts │ │ │ │ └── stateManager.ts │ │ │ ├── data │ │ │ │ ├── dataManager.d.ts │ │ │ │ ├── theme │ │ │ │ │ └── themeManager.d.ts │ │ │ │ └── dataManager.ts │ │ │ └── epubjsManager.d.ts │ │ ├── bookStateTypes.d.ts │ │ ├── profileSlice.ts │ │ ├── appStateTypes.d.ts │ │ ├── counterSlice.ts │ │ └── appState.ts │ ├── hooks.ts │ ├── utlity.ts │ ├── syncedActions.ts │ └── store.ts ├── routes │ ├── Reader │ │ ├── SettingsBar │ │ │ ├── ThemesContainer │ │ │ │ ├── ThemesContainer.module.scss │ │ │ │ └── ThemesContainer.tsx │ │ │ ├── DisplayContainer │ │ │ │ ├── DisplayContainer.module.scss │ │ │ │ └── DisplayContainer.tsx │ │ │ ├── SettingsBar.module.scss │ │ │ ├── FontsContainerV2 │ │ │ │ ├── FontsContainer.module.scss │ │ │ │ └── FontsContainer.tsx │ │ │ ├── SpacingContainer │ │ │ │ └── SpacingContainer.module.scss │ │ │ └── SettingsBar.tsx │ │ ├── Components │ │ │ └── BottomMenuContainer │ │ │ │ ├── BottomMenuContainer.tsx │ │ │ │ └── BottomMenuContainer.module.scss │ │ ├── ProgressMenu │ │ │ └── ProgressMenu.module.scss │ │ ├── ReaderView │ │ │ ├── ReaderView.module.scss │ │ │ ├── components │ │ │ │ ├── QuickbarModal │ │ │ │ │ └── QuickbarModal.module.scss │ │ │ │ ├── Dictionary │ │ │ │ │ ├── Dictionary.module.scss │ │ │ │ │ └── Dictionary.tsx │ │ │ │ └── NoteModal │ │ │ │ │ ├── NoteModal.module.scss │ │ │ │ │ └── NoteModal.tsx │ │ │ └── functions │ │ │ │ └── ModalUtility.tsx │ │ ├── SideBar │ │ │ ├── Bookmarks │ │ │ │ ├── Bookmarks.module.scss │ │ │ │ └── Bookmarks.tsx │ │ │ ├── Annotations │ │ │ │ ├── Annotations.module.scss │ │ │ │ └── Annotations.tsx │ │ │ ├── Chapters │ │ │ │ ├── Chapters.module.scss │ │ │ │ └── Chapters.tsx │ │ │ ├── Search │ │ │ │ ├── Search.module.scss │ │ │ │ └── Search.tsx │ │ │ ├── SideBar.module.scss │ │ │ └── SideBar.tsx │ │ ├── SliderNavigator │ │ │ ├── SliderNavigator.module.scss │ │ │ └── SliderNavigator.tsx │ │ ├── FooterBarBottom │ │ │ ├── FooterBar.module.scss │ │ │ └── FooterBar.tsx │ │ └── FooterBar │ │ │ ├── FooterBar.module.scss │ │ │ └── FooterBar.tsx │ ├── Home │ │ ├── FakeCover │ │ │ ├── FakeCover.tsx │ │ │ └── FakeCover.module.scss │ │ └── dynamic.css │ ├── Router.tsx │ ├── Settings │ │ ├── pages │ │ │ ├── About.tsx │ │ │ ├── PreviewWidget │ │ │ │ ├── PreviewWidget.module.scss │ │ │ │ └── PreviewWidget.tsx │ │ │ ├── ReaderTheme.module.scss │ │ │ └── Fonts │ │ │ │ └── Fonts.module.scss │ │ ├── Settings.module.scss │ │ └── Settings.tsx │ └── Info │ │ ├── generator │ │ └── html.ts │ │ └── Info.module.scss ├── shared │ ├── components │ │ ├── TitleBarButtons.module.scss │ │ └── TitleBarButtons.tsx │ ├── styles │ │ └── global │ │ │ ├── stroke.scss │ │ │ └── breakpoints.scss │ └── scripts │ │ ├── Parser │ │ ├── parser.tsx │ │ └── formats │ │ │ └── plaintext.ts │ │ ├── getChapterCfiMap.ts │ │ ├── handleLinkClick.ts │ │ └── TauriActions.ts ├── index.tsx ├── migrations.js └── InitializeApp.tsx ├── .gitignore ├── public ├── resources │ ├── figma │ │ ├── Bookmark.svg │ │ ├── Minimize.svg │ │ ├── Maximize.svg │ │ ├── Exit.svg │ │ └── Unmaximize.svg │ ├── iconmonstr │ │ ├── iconmonstr-copy-9.svg │ │ ├── iconmonstr-save-14.svg │ │ ├── iconmonstr-sort-25.svg │ │ ├── iconmonstr-book-26.svg │ │ ├── iconmonstr-undo-7.svg │ │ ├── iconmonstr-magnifier-2.svg │ │ ├── text-3.svg │ │ ├── iconmonstr-text-align-left-lined.svg │ │ ├── iconmonstr-text-align-right-lined.svg │ │ ├── iconmonstr-computer-10.svg │ │ ├── iconmonstr-text-align-center-lined.svg │ │ ├── iconmonstr-text-description-lined.svg │ │ ├── iconmonstr-cloud-download-thin.svg │ │ └── iconmonstr-script-2.svg │ ├── feathericons │ │ ├── check.svg │ │ ├── chevron-down.svg │ │ ├── chevron-right.svg │ │ ├── bookmark.svg │ │ ├── filter.svg │ │ ├── search.svg │ │ ├── arrow-left.svg │ │ ├── arrow-right.svg │ │ ├── home.svg │ │ ├── check-circle.svg │ │ ├── more-vertical.svg │ │ ├── repeat.svg │ │ ├── maximize-2.svg │ │ ├── minimize-2.svg │ │ ├── folder-plus.svg │ │ ├── file-plus.svg │ │ ├── trash-2.svg │ │ ├── list.svg │ │ └── settings.svg │ └── material │ │ └── article_black_24dp.svg └── template.html ├── .gitmodules ├── .vscode ├── extensions.json └── settings.json ├── scripts ├── Download Assets.sh └── Generate Assets.sh ├── .stylelintrc.yaml ├── tsconfig.json ├── .eslintrc.js ├── globals.d.ts ├── docs ├── Build Instructions.md └── FAQ.md ├── .github └── workflows │ └── build-action.yml └── package.json /src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | Alexandria_Data -------------------------------------------------------------------------------- /src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btpf/Alexandria/HEAD/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /src/store/slices/constants.ts: -------------------------------------------------------------------------------- 1 | export enum LOADSTATE{ 2 | LOADING, 3 | BOOK_PARSING_COMPLETE, 4 | DATA_PARSING_COMPLETE, 5 | COMPLETE, 6 | CANCELED 7 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.webp 4 | *.jpg 5 | *.gif 6 | *.epub 7 | changelog.txt 8 | public/resources/webfonts.json 9 | public/resources/webfonts.json.bak 10 | public/resources/Fonts/ -------------------------------------------------------------------------------- /public/resources/figma/Bookmark.svg: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /public/resources/iconmonstr/iconmonstr-copy-9.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/resources/figma/Minimize.svg: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /public/resources/figma/Maximize.svg: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /public/resources/iconmonstr/iconmonstr-save-14.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src-tauri/desktopTemplate.hbs: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name={{name}} 5 | Comment=A minimalistic eBook reader 6 | Exec={{exec}} 7 | Icon={{icon}} 8 | Categories=Office 9 | Keywords=reader;office;ebook;epub;comicbook;comic;ebook -------------------------------------------------------------------------------- /public/resources/iconmonstr/iconmonstr-sort-25.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libmobi-rs"] 2 | path = libmobi-rs 3 | url = https://github.com/btpf/libmobi-rs.git 4 | [submodule "public/resources/Alexandria-Assets"] 5 | path = public/resources/Alexandria-Assets 6 | url = https://github.com/btpf/Alexandria-Assets.git 7 | -------------------------------------------------------------------------------- /src/store/slices/AppState/state/modals/modalsTypes.d.ts: -------------------------------------------------------------------------------- 1 | export interface MoveModalAction{ 2 | x: number, 3 | y: number, 4 | visible: boolean 5 | } 6 | export interface MoveModalCFIAction{ 7 | view:number, 8 | selectedCFI: string 9 | } 10 | -------------------------------------------------------------------------------- /src/store/slices/EpubJSBackend/state/stateManager.d.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | export interface sideBarUpdate{ 4 | view:number, 5 | state: string|boolean 6 | } 7 | 8 | 9 | 10 | export interface SetDictionaryWordPayload{ 11 | view:number, 12 | word: string 13 | } -------------------------------------------------------------------------------- /public/resources/feathericons/check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |1 My footnote
91 | // where simply getting the ID or its parent would not suffice 92 | // although it would still fail to extract useful texts for some books 93 | const isFootnote = el => { 94 | const nodeName = el.nodeName.toLowerCase() 95 | return [ 96 | 'a', 'span', 'sup', 'sub', 97 | 'em', 'strong', 'i', 'b', 98 | 'small', 'big' 99 | ].every(x => x !== nodeName) 100 | } 101 | if (!isFootnote(el)) { 102 | while (true) { 103 | const parent = el.parentElement 104 | if (!parent) break 105 | el = parent 106 | if (isFootnote(parent)) break 107 | } 108 | } 109 | if (item) item.unload() 110 | if (el.innerText.trim()) { 111 | 112 | const elType = el.getAttributeNS(EPUB_NS, 'type') 113 | const elTypes = elType ? elType.split(' ') : [] 114 | 115 | // footnotes not matching this would be hidden (see above) 116 | // and so one cannot navigate to them 117 | const canLink = !(el.nodeName === 'aside' 118 | && noteTypes.some(x => elTypes.includes(x))) 119 | 120 | // console.log("ARRIVED TO END") 121 | 122 | const text = (dt ? `${dt.innerHTML}