├── .eslintignore ├── test ├── mocha.opts ├── domain │ ├── fixtures │ │ └── download-format │ │ │ ├── actual.json │ │ │ └── expected.md │ ├── Document-test.js │ └── DocumentService-test.js ├── usecase │ ├── NewDocumentUseCase-test.js │ ├── UpdatePageNoteUseCase-test.js │ ├── ToggleExportDialogUseCase-test.js │ └── CompleteLoadingDocumentUseCase-test.js ├── utils │ └── EventDelegate.js └── read-store │ └── DocumentStateStore-test.js ├── src ├── css │ ├── base │ │ └── base.css │ └── variable │ │ └── font-size.css ├── js │ ├── domain │ │ ├── README.md │ │ ├── document │ │ │ ├── EmptyDocument.js │ │ │ ├── DocumentFactory.js │ │ │ ├── DocumentPageCapture.js │ │ │ ├── DocumentPage.js │ │ │ ├── DocumentService.js │ │ │ └── Document.js │ │ └── zip │ │ │ ├── ZipFile.js │ │ │ ├── ZipDirectory.js │ │ │ └── Zip.js │ ├── infra │ │ ├── README.md │ │ ├── adpter │ │ │ └── MemoryDB.js │ │ ├── api │ │ │ └── DownloadAPI.js │ │ └── DocumentRepository.js │ ├── read-store │ │ ├── README.md │ │ ├── AppStoreGroup.js │ │ ├── document │ │ │ ├── DocumentStore.js │ │ │ └── DocumentState.js │ │ └── exporting │ │ │ ├── ExportingStore.js │ │ │ └── ExportingState.js │ └── UseCase │ │ ├── exporting │ │ ├── ToggleExportDialogUseCase.js │ │ └── DownloadNotesUseCase.js │ │ └── document │ │ ├── MarkPageUseCase.js │ │ ├── UpdatePageNoteUseCase.js │ │ ├── NewDocumentUseCase.js │ │ └── CompleteLoadingDocumentUseCase.js ├── component │ ├── project │ │ ├── DummyPagePreview │ │ │ ├── DummyPagePreview.css │ │ │ └── DummyPagePreview.js │ │ ├── PageEditor │ │ │ ├── PageEditor.css │ │ │ ├── PageEditorTextarea.is-active.css │ │ │ ├── PageEditor.is-active.css │ │ │ ├── PageEditorTextarea.css │ │ │ ├── PageEditor.js │ │ │ └── PageEditorTextarea.js │ │ ├── PagePreview │ │ │ ├── PagePreview.css │ │ │ ├── PagePreview.is-marked.css │ │ │ └── PagePreview.js │ │ ├── ExportToolbar │ │ │ ├── ExportToolbar.is-hovering.css │ │ │ ├── ExportToolbar.css │ │ │ └── ExportToolbar.js │ │ ├── DownloadButton │ │ │ ├── DownloadButton.css │ │ │ └── DownloadButton.js │ │ ├── PDFPagePreview │ │ │ ├── PDFPagePreview.css │ │ │ └── PDFPagePreview.js │ │ └── NewDocumentForm │ │ │ ├── NewDocumentForm.css │ │ │ └── NewDocumentForm.js │ ├── uikit │ │ ├── Image │ │ │ ├── Image.css │ │ │ └── Image.js │ │ ├── Link │ │ │ └── Link.js │ │ ├── Grid │ │ │ ├── GridCell.js │ │ │ ├── GridCell.css │ │ │ ├── Grid.css │ │ │ └── Grid.js │ │ └── HoverBlock │ │ │ └── HoverBlock.js │ └── container │ │ ├── DocumentFormContainer │ │ ├── DocumentFormContainer.css │ │ └── DocumentFormContainer.js │ │ ├── PageListContainer │ │ ├── PageListContainer.css │ │ ├── PageContainer │ │ │ ├── PageContainer.is-marked.css │ │ │ ├── PageContainer.css │ │ │ └── PageContainer.js │ │ └── PageListContainer.js │ │ ├── ExportContainer │ │ ├── ExportContainer.is-showing.css │ │ ├── ExportContainer.css │ │ └── ExportContainer.js │ │ ├── App.css │ │ └── App.js ├── index.css ├── AppLocator.js └── index.js ├── .travis.yml ├── .netlify └── state.json ├── public ├── resources │ ├── example │ │ ├── 0001.jpg │ │ ├── jser.info.pdf │ │ └── javascript-discussion.pdf │ └── pdfjs-dist │ │ ├── cmaps │ │ ├── H.bcmap │ │ ├── V.bcmap │ │ ├── 78-H.bcmap │ │ ├── 78-V.bcmap │ │ ├── Add-H.bcmap │ │ ├── Add-V.bcmap │ │ ├── B5-H.bcmap │ │ ├── B5-V.bcmap │ │ ├── EUC-H.bcmap │ │ ├── EUC-V.bcmap │ │ ├── Ext-H.bcmap │ │ ├── Ext-V.bcmap │ │ ├── GB-H.bcmap │ │ ├── GB-V.bcmap │ │ ├── GBT-H.bcmap │ │ ├── GBT-V.bcmap │ │ ├── KSC-H.bcmap │ │ ├── KSC-V.bcmap │ │ ├── NWP-H.bcmap │ │ ├── NWP-V.bcmap │ │ ├── Roman.bcmap │ │ ├── 78-EUC-H.bcmap │ │ ├── 78-EUC-V.bcmap │ │ ├── B5pc-H.bcmap │ │ ├── B5pc-V.bcmap │ │ ├── CNS1-H.bcmap │ │ ├── CNS1-V.bcmap │ │ ├── CNS2-H.bcmap │ │ ├── CNS2-V.bcmap │ │ ├── GB-EUC-H.bcmap │ │ ├── GB-EUC-V.bcmap │ │ ├── GBK2K-H.bcmap │ │ ├── GBK2K-V.bcmap │ │ ├── Hankaku.bcmap │ │ ├── Hiragana.bcmap │ │ ├── Katakana.bcmap │ │ ├── RKSJ-H.bcmap │ │ ├── RKSJ-V.bcmap │ │ ├── 78-RKSJ-H.bcmap │ │ ├── 78-RKSJ-V.bcmap │ │ ├── Add-RKSJ-H.bcmap │ │ ├── Add-RKSJ-V.bcmap │ │ ├── CNS-EUC-H.bcmap │ │ ├── CNS-EUC-V.bcmap │ │ ├── ETHK-B5-H.bcmap │ │ ├── ETHK-B5-V.bcmap │ │ ├── ETen-B5-H.bcmap │ │ ├── ETen-B5-V.bcmap │ │ ├── Ext-RKSJ-H.bcmap │ │ ├── Ext-RKSJ-V.bcmap │ │ ├── GBK-EUC-H.bcmap │ │ ├── GBK-EUC-V.bcmap │ │ ├── GBKp-EUC-H.bcmap │ │ ├── GBKp-EUC-V.bcmap │ │ ├── GBT-EUC-H.bcmap │ │ ├── GBT-EUC-V.bcmap │ │ ├── GBpc-EUC-H.bcmap │ │ ├── GBpc-EUC-V.bcmap │ │ ├── HKdla-B5-H.bcmap │ │ ├── HKdla-B5-V.bcmap │ │ ├── HKdlb-B5-H.bcmap │ │ ├── HKdlb-B5-V.bcmap │ │ ├── HKscs-B5-H.bcmap │ │ ├── HKscs-B5-V.bcmap │ │ ├── KSC-EUC-H.bcmap │ │ ├── KSC-EUC-V.bcmap │ │ ├── WP-Symbol.bcmap │ │ ├── 78ms-RKSJ-H.bcmap │ │ ├── 78ms-RKSJ-V.bcmap │ │ ├── 83pv-RKSJ-H.bcmap │ │ ├── 90ms-RKSJ-H.bcmap │ │ ├── 90ms-RKSJ-V.bcmap │ │ ├── 90msp-RKSJ-H.bcmap │ │ ├── 90msp-RKSJ-V.bcmap │ │ ├── 90pv-RKSJ-H.bcmap │ │ ├── 90pv-RKSJ-V.bcmap │ │ ├── Adobe-CNS1-0.bcmap │ │ ├── Adobe-CNS1-1.bcmap │ │ ├── Adobe-CNS1-2.bcmap │ │ ├── Adobe-CNS1-3.bcmap │ │ ├── Adobe-CNS1-4.bcmap │ │ ├── Adobe-CNS1-5.bcmap │ │ ├── Adobe-CNS1-6.bcmap │ │ ├── Adobe-GB1-0.bcmap │ │ ├── Adobe-GB1-1.bcmap │ │ ├── Adobe-GB1-2.bcmap │ │ ├── Adobe-GB1-3.bcmap │ │ ├── Adobe-GB1-4.bcmap │ │ ├── Adobe-GB1-5.bcmap │ │ ├── ETenms-B5-H.bcmap │ │ ├── ETenms-B5-V.bcmap │ │ ├── GBTpc-EUC-H.bcmap │ │ ├── GBTpc-EUC-V.bcmap │ │ ├── HKgccs-B5-H.bcmap │ │ ├── HKgccs-B5-V.bcmap │ │ ├── HKm314-B5-H.bcmap │ │ ├── HKm314-B5-V.bcmap │ │ ├── HKm471-B5-H.bcmap │ │ ├── HKm471-B5-V.bcmap │ │ ├── KSC-Johab-H.bcmap │ │ ├── KSC-Johab-V.bcmap │ │ ├── KSCms-UHC-H.bcmap │ │ ├── KSCms-UHC-V.bcmap │ │ ├── KSCpc-EUC-H.bcmap │ │ ├── KSCpc-EUC-V.bcmap │ │ ├── UniCNS-UCS2-H.bcmap │ │ ├── UniCNS-UCS2-V.bcmap │ │ ├── UniCNS-UTF8-H.bcmap │ │ ├── UniCNS-UTF8-V.bcmap │ │ ├── UniGB-UCS2-H.bcmap │ │ ├── UniGB-UCS2-V.bcmap │ │ ├── UniGB-UTF16-H.bcmap │ │ ├── UniGB-UTF16-V.bcmap │ │ ├── UniGB-UTF32-H.bcmap │ │ ├── UniGB-UTF32-V.bcmap │ │ ├── UniGB-UTF8-H.bcmap │ │ ├── UniGB-UTF8-V.bcmap │ │ ├── UniJIS-UCS2-H.bcmap │ │ ├── UniJIS-UCS2-V.bcmap │ │ ├── UniJIS-UTF8-H.bcmap │ │ ├── UniJIS-UTF8-V.bcmap │ │ ├── UniKS-UCS2-H.bcmap │ │ ├── UniKS-UCS2-V.bcmap │ │ ├── UniKS-UTF16-H.bcmap │ │ ├── UniKS-UTF16-V.bcmap │ │ ├── UniKS-UTF32-H.bcmap │ │ ├── UniKS-UTF32-V.bcmap │ │ ├── UniKS-UTF8-H.bcmap │ │ ├── UniKS-UTF8-V.bcmap │ │ ├── Adobe-CNS1-UCS2.bcmap │ │ ├── Adobe-GB1-UCS2.bcmap │ │ ├── Adobe-Japan1-0.bcmap │ │ ├── Adobe-Japan1-1.bcmap │ │ ├── Adobe-Japan1-2.bcmap │ │ ├── Adobe-Japan1-3.bcmap │ │ ├── Adobe-Japan1-4.bcmap │ │ ├── Adobe-Japan1-5.bcmap │ │ ├── Adobe-Japan1-6.bcmap │ │ ├── Adobe-Korea1-0.bcmap │ │ ├── Adobe-Korea1-1.bcmap │ │ ├── Adobe-Korea1-2.bcmap │ │ ├── KSCms-UHC-HW-H.bcmap │ │ ├── KSCms-UHC-HW-V.bcmap │ │ ├── UniCNS-UTF16-H.bcmap │ │ ├── UniCNS-UTF16-V.bcmap │ │ ├── UniCNS-UTF32-H.bcmap │ │ ├── UniCNS-UTF32-V.bcmap │ │ ├── UniJIS-UTF16-H.bcmap │ │ ├── UniJIS-UTF16-V.bcmap │ │ ├── UniJIS-UTF32-H.bcmap │ │ ├── UniJIS-UTF32-V.bcmap │ │ ├── Adobe-Japan1-UCS2.bcmap │ │ ├── Adobe-Korea1-UCS2.bcmap │ │ ├── UniJIS-UCS2-HW-H.bcmap │ │ ├── UniJIS-UCS2-HW-V.bcmap │ │ ├── UniJIS2004-UTF16-H.bcmap │ │ ├── UniJIS2004-UTF16-V.bcmap │ │ ├── UniJIS2004-UTF32-H.bcmap │ │ ├── UniJIS2004-UTF32-V.bcmap │ │ ├── UniJIS2004-UTF8-H.bcmap │ │ ├── UniJIS2004-UTF8-V.bcmap │ │ ├── UniJISPro-UCS2-V.bcmap │ │ ├── UniJISPro-UTF8-V.bcmap │ │ ├── UniJISPro-UCS2-HW-V.bcmap │ │ ├── UniJISX0213-UTF32-H.bcmap │ │ ├── UniJISX0213-UTF32-V.bcmap │ │ ├── UniJISX02132004-UTF32-H.bcmap │ │ ├── UniJISX02132004-UTF32-V.bcmap │ │ └── LICENSE │ │ └── web │ │ ├── images │ │ ├── shadow.png │ │ ├── texture.png │ │ ├── loading-icon.gif │ │ ├── annotation-noicon.svg │ │ ├── annotation-insert.svg │ │ ├── annotation-check.svg │ │ ├── annotation-newparagraph.svg │ │ ├── annotation-comment.svg │ │ ├── annotation-paragraph.svg │ │ ├── annotation-note.svg │ │ ├── annotation-key.svg │ │ └── annotation-help.svg │ │ ├── pdf_viewer.css │ │ └── compatibility.js └── index.html ├── postcss.config.js ├── .babelrc ├── webpack.config.js ├── netlify.toml ├── docs ├── README.md ├── javascript.md └── css.md ├── README.md ├── LICENSE ├── package.json ├── .gitignore └── .eslintrc /.eslintignore: -------------------------------------------------------------------------------- 1 | src/css 2 | lib/ 3 | -------------------------------------------------------------------------------- /test/mocha.opts: -------------------------------------------------------------------------------- 1 | --recursive 2 | --require @babel/register 3 | -------------------------------------------------------------------------------- /src/css/base/base.css: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; 3 | } 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: stable 4 | -------------------------------------------------------------------------------- /.netlify/state.json: -------------------------------------------------------------------------------- 1 | { 2 | "siteId": "1d161243-c0af-44f3-ad6f-ea21a63de51f" 3 | } -------------------------------------------------------------------------------- /src/js/domain/README.md: -------------------------------------------------------------------------------- 1 | # domain 2 | 3 | Pure JavaScript Domain Class. 4 | 5 | -------------------------------------------------------------------------------- /src/component/project/DummyPagePreview/DummyPagePreview.css: -------------------------------------------------------------------------------- 1 | .DummyPagePreview { 2 | } 3 | -------------------------------------------------------------------------------- /src/component/uikit/Image/Image.css: -------------------------------------------------------------------------------- 1 | .Image { 2 | max-width: 100%; 3 | max-height: 100%; 4 | } 5 | -------------------------------------------------------------------------------- /src/component/project/PageEditor/PageEditor.css: -------------------------------------------------------------------------------- 1 | .PageEditor { 2 | width: 100%; 3 | height: 100%; 4 | } 5 | -------------------------------------------------------------------------------- /src/component/project/PagePreview/PagePreview.css: -------------------------------------------------------------------------------- 1 | .PagePreview { 2 | max-width: 100%; 3 | height: 100%; 4 | } 5 | -------------------------------------------------------------------------------- /public/resources/example/0001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/example/0001.jpg -------------------------------------------------------------------------------- /public/resources/example/jser.info.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/example/jser.info.pdf -------------------------------------------------------------------------------- /src/component/container/DocumentFormContainer/DocumentFormContainer.css: -------------------------------------------------------------------------------- 1 | .DocumentFormContainer-inner { 2 | margin: 1rem 0; 3 | } 4 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/V.bcmap -------------------------------------------------------------------------------- /src/js/infra/README.md: -------------------------------------------------------------------------------- 1 | # Repository 2 | 3 | Perpetuation Domain object. 4 | 5 | Often, create new instance of entity and return as **singleton**. -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/78-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/78-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/78-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/78-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Add-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Add-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Add-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Add-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/B5-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/B5-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/B5-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/B5-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/EUC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/EUC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/EUC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/EUC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Ext-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Ext-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Ext-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Ext-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GB-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GB-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GB-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GB-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBT-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBT-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBT-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBT-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/NWP-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/NWP-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/NWP-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/NWP-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Roman.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Roman.bcmap -------------------------------------------------------------------------------- /src/component/container/PageListContainer/PageListContainer.css: -------------------------------------------------------------------------------- 1 | /* Collection default theme */ 2 | .PageListContainer { 3 | height: 100%; 4 | } 5 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/78-EUC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/78-EUC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/78-EUC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/78-EUC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/B5pc-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/B5pc-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/B5pc-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/B5pc-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/CNS1-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/CNS1-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/CNS1-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/CNS1-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/CNS2-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/CNS2-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/CNS2-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/CNS2-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GB-EUC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GB-EUC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GB-EUC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GB-EUC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBK2K-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBK2K-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBK2K-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBK2K-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Hankaku.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Hankaku.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Hiragana.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Hiragana.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Katakana.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Katakana.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/RKSJ-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/RKSJ-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/RKSJ-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/RKSJ-V.bcmap -------------------------------------------------------------------------------- /public/resources/example/javascript-discussion.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/example/javascript-discussion.pdf -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/78-RKSJ-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/78-RKSJ-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/78-RKSJ-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/78-RKSJ-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Add-RKSJ-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Add-RKSJ-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Add-RKSJ-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Add-RKSJ-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/CNS-EUC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/CNS-EUC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/CNS-EUC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/CNS-EUC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/ETHK-B5-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/ETHK-B5-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/ETHK-B5-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/ETHK-B5-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/ETen-B5-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/ETen-B5-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/ETen-B5-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/ETen-B5-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Ext-RKSJ-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Ext-RKSJ-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Ext-RKSJ-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Ext-RKSJ-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBK-EUC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBK-EUC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBK-EUC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBK-EUC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBKp-EUC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBKp-EUC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBKp-EUC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBKp-EUC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBT-EUC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBT-EUC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBT-EUC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBT-EUC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBpc-EUC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBpc-EUC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBpc-EUC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBpc-EUC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKdla-B5-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKdla-B5-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKdla-B5-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKdla-B5-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKdlb-B5-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKdlb-B5-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKdlb-B5-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKdlb-B5-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKscs-B5-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKscs-B5-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKscs-B5-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKscs-B5-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSC-EUC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSC-EUC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSC-EUC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSC-EUC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/WP-Symbol.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/WP-Symbol.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/images/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/web/images/shadow.png -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/images/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/web/images/texture.png -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/78ms-RKSJ-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/78ms-RKSJ-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/78ms-RKSJ-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/78ms-RKSJ-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/83pv-RKSJ-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/83pv-RKSJ-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/90ms-RKSJ-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/90ms-RKSJ-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/90ms-RKSJ-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/90ms-RKSJ-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/90msp-RKSJ-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/90msp-RKSJ-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/90msp-RKSJ-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/90msp-RKSJ-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/90pv-RKSJ-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/90pv-RKSJ-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/90pv-RKSJ-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/90pv-RKSJ-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-CNS1-0.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-CNS1-0.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-CNS1-1.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-CNS1-1.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-CNS1-2.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-CNS1-2.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-CNS1-3.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-CNS1-3.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-CNS1-4.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-CNS1-4.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-CNS1-5.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-CNS1-5.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-CNS1-6.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-CNS1-6.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-GB1-0.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-GB1-0.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-GB1-1.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-GB1-1.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-GB1-2.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-GB1-2.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-GB1-3.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-GB1-3.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-GB1-4.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-GB1-4.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-GB1-5.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-GB1-5.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/ETenms-B5-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/ETenms-B5-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/ETenms-B5-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/ETenms-B5-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBTpc-EUC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBTpc-EUC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/GBTpc-EUC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/GBTpc-EUC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKgccs-B5-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKgccs-B5-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKgccs-B5-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKgccs-B5-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKm314-B5-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKm314-B5-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKm314-B5-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKm314-B5-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKm471-B5-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKm471-B5-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/HKm471-B5-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/HKm471-B5-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSC-Johab-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSC-Johab-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSC-Johab-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSC-Johab-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSCms-UHC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSCms-UHC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSCms-UHC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSCms-UHC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSCpc-EUC-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSCpc-EUC-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSCpc-EUC-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSCpc-EUC-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniCNS-UCS2-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniCNS-UCS2-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniCNS-UCS2-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniCNS-UCS2-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniCNS-UTF8-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniCNS-UTF8-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniCNS-UTF8-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniCNS-UTF8-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniGB-UCS2-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniGB-UCS2-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniGB-UCS2-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniGB-UCS2-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniGB-UTF16-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniGB-UTF16-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniGB-UTF16-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniGB-UTF16-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniGB-UTF32-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniGB-UTF32-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniGB-UTF32-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniGB-UTF32-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniGB-UTF8-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniGB-UTF8-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniGB-UTF8-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniGB-UTF8-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS-UCS2-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS-UCS2-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS-UCS2-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS-UCS2-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS-UTF8-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS-UTF8-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS-UTF8-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS-UTF8-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniKS-UCS2-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniKS-UCS2-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniKS-UCS2-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniKS-UCS2-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniKS-UTF16-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniKS-UTF16-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniKS-UTF16-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniKS-UTF16-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniKS-UTF32-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniKS-UTF32-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniKS-UTF32-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniKS-UTF32-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniKS-UTF8-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniKS-UTF8-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniKS-UTF8-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniKS-UTF8-V.bcmap -------------------------------------------------------------------------------- /src/js/infra/adpter/MemoryDB.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const MapLike = require("map-like"); 4 | export default class MemoryDB extends MapLike {} 5 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-CNS1-UCS2.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-CNS1-UCS2.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-GB1-UCS2.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-GB1-UCS2.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Japan1-0.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Japan1-0.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Japan1-1.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Japan1-1.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Japan1-2.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Japan1-2.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Japan1-3.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Japan1-3.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Japan1-4.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Japan1-4.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Japan1-5.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Japan1-5.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Japan1-6.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Japan1-6.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Korea1-0.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Korea1-0.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Korea1-1.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Korea1-1.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Korea1-2.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Korea1-2.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSCms-UHC-HW-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSCms-UHC-HW-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/KSCms-UHC-HW-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/KSCms-UHC-HW-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniCNS-UTF16-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniCNS-UTF16-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniCNS-UTF16-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniCNS-UTF16-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniCNS-UTF32-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniCNS-UTF32-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniCNS-UTF32-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniCNS-UTF32-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS-UTF16-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS-UTF16-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS-UTF16-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS-UTF16-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS-UTF32-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS-UTF32-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS-UTF32-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS-UTF32-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/images/loading-icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/web/images/loading-icon.gif -------------------------------------------------------------------------------- /src/css/variable/font-size.css: -------------------------------------------------------------------------------- 1 | /* Const Variable */ 2 | :root { 3 | --PageEditorTextarea-font-size: 20px; 4 | --PageEditorTextareaIsActive-font-size: 25px; 5 | } 6 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/Adobe-Korea1-UCS2.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/Adobe-Korea1-UCS2.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS-UCS2-HW-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS-UCS2-HW-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS-UCS2-HW-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS-UCS2-HW-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF16-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF16-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF16-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF16-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF32-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF32-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF32-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF32-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF8-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF8-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF8-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJIS2004-UTF8-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJISPro-UCS2-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJISPro-UCS2-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJISPro-UTF8-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJISPro-UTF8-V.bcmap -------------------------------------------------------------------------------- /src/component/project/PageEditor/PageEditorTextarea.is-active.css: -------------------------------------------------------------------------------- 1 | .PageEditorTextarea.is-active { 2 | font-size: var(--PageEditorTextareaIsActive-font-size, large); 3 | } 4 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJISPro-UCS2-HW-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJISPro-UCS2-HW-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJISX0213-UTF32-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJISX0213-UTF32-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJISX0213-UTF32-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJISX0213-UTF32-V.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJISX02132004-UTF32-H.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJISX02132004-UTF32-H.bcmap -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/cmaps/UniJISX02132004-UTF32-V.bcmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/presentation-annotator/HEAD/public/resources/pdfjs-dist/cmaps/UniJISX02132004-UTF32-V.bcmap -------------------------------------------------------------------------------- /src/component/project/PageEditor/PageEditor.is-active.css: -------------------------------------------------------------------------------- 1 | .PageEditor.is-active { 2 | outline: none !important; 3 | border-color: #719ece; 4 | box-shadow: 0 0 10px #719ece; 5 | } 6 | -------------------------------------------------------------------------------- /src/component/project/PagePreview/PagePreview.is-marked.css: -------------------------------------------------------------------------------- 1 | .PagePreview.is-marked { 2 | outline: none !important; 3 | border-color: #719ece; 4 | box-shadow: 0 0 10px #719ece; 5 | } 6 | -------------------------------------------------------------------------------- /src/js/read-store/README.md: -------------------------------------------------------------------------------- 1 | # store 2 | 3 | **State* store is an part of presenter. 4 | It is known as ViewModel. 5 | 6 | 7 | store is not permanent storage. 8 | 9 | - directory is state key name -------------------------------------------------------------------------------- /src/component/container/PageListContainer/PageContainer/PageContainer.is-marked.css: -------------------------------------------------------------------------------- 1 | .PageContainer.is-marked { 2 | outline: none !important; 3 | border-color: #719ece; 4 | box-shadow: 0 0 10px #719ece; 5 | } 6 | -------------------------------------------------------------------------------- /src/component/project/ExportToolbar/ExportToolbar.is-hovering.css: -------------------------------------------------------------------------------- 1 | .is-hovering .ExportToolbar-exportButton { 2 | outline: none !important; 3 | border-color: #719ece; 4 | box-shadow: 0 0 10px #719ece; 5 | } 6 | -------------------------------------------------------------------------------- /src/component/project/PageEditor/PageEditorTextarea.css: -------------------------------------------------------------------------------- 1 | .PageEditorTextarea { 2 | width: 100%; 3 | height: 100%; 4 | padding: 0.5em 0.5em; 5 | font-size: var(--PageEditorTextarea-font-size, large); 6 | } 7 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /* Base */ 3 | @import "suitcss-base"; 4 | @import "./css/base/**/*.css"; 5 | /* variable */ 6 | @import "./css/var/**/*.css"; 7 | /* Component */ 8 | @import "./component/**/*.css"; 9 | -------------------------------------------------------------------------------- /src/component/container/ExportContainer/ExportContainer.is-showing.css: -------------------------------------------------------------------------------- 1 | .ExportContainer.is-showing { 2 | height: 100%; 3 | } 4 | 5 | .ExportContainer-pre.is-showing { 6 | height: 100%; 7 | display: block; 8 | } 9 | -------------------------------------------------------------------------------- /src/component/container/App.css: -------------------------------------------------------------------------------- 1 | /* Define Page Item width */ 2 | :root { 3 | --PageContainer-width: 960px; 4 | } 5 | 6 | .App { 7 | width: var(--PageContainer-width); 8 | height: 100%; 9 | margin: 0 auto; 10 | } 11 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/images/annotation-noicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /test/domain/fixtures/download-format/actual.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "pageNumber": 1, 4 | "note": "Text 1" 5 | }, 6 | { 7 | "pageNumber": 2, 8 | "note": "Text 2" 9 | }, 10 | { 11 | "pageNumber": 10, 12 | "note": "Text 10" 13 | } 14 | ] -------------------------------------------------------------------------------- /src/AppLocator.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | export class AppLocator { 4 | constructor() { 5 | /** 6 | * @type {Context} 7 | */ 8 | this.context = null; 9 | } 10 | } 11 | 12 | export default new AppLocator(); 13 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | "postcss-easy-import": {}, 4 | "postcss-custom-properties": {}, 5 | "postcss-calc": {}, 6 | "postcss-custom-media": {}, 7 | autoprefixer: {}, 8 | "postcss-reporter": {} 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /src/component/container/ExportContainer/ExportContainer.css: -------------------------------------------------------------------------------- 1 | .ExportContainer { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | z-index: 1; 6 | will-change: width; 7 | } 8 | 9 | .ExportContainer-pre { 10 | border: 1px dashed #00d4b4; 11 | display: none; 12 | } 13 | -------------------------------------------------------------------------------- /src/component/project/DownloadButton/DownloadButton.css: -------------------------------------------------------------------------------- 1 | .DownloadButton { 2 | background-color: #4974af; 3 | border: none; 4 | color: white; 5 | padding: 0.5em 1em; 6 | text-align: center; 7 | text-decoration: none; 8 | display: inline-block; 9 | width: 100%; 10 | } 11 | -------------------------------------------------------------------------------- /src/js/domain/document/EmptyDocument.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import Document from "./Document"; 4 | export default class EmptyDocument extends Document { 5 | constructor({ pdfURL }) { 6 | super({ 7 | pdfURL, 8 | pages: [] 9 | }); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Presentation Annotator 6 | 7 | 8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/env", 4 | "@babel/preset-react" 5 | ], 6 | "plugins": [ 7 | "@babel/plugin-proposal-class-properties", 8 | [ 9 | "@babel/plugin-transform-runtime", 10 | { 11 | "corejs": 2 12 | } 13 | ] 14 | ], 15 | "env": { 16 | "development": { 17 | "presets": [ 18 | "jsdoc-to-assert", 19 | "power-assert" 20 | ] 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/component/project/PDFPagePreview/PDFPagePreview.css: -------------------------------------------------------------------------------- 1 | .PDFPagePreview { 2 | position: relative; 3 | height: 100%; 4 | } 5 | 6 | .PDFPagePreview-container { 7 | height: 100%; 8 | } 9 | 10 | /* overwrite */ 11 | .pdf-slide-progress { 12 | display: none !important; 13 | } 14 | 15 | .PDFPagePreview-canvas canvas, .PDFPagePreview-canvas { 16 | height: auto !important; 17 | max-width: 100%; 18 | max-height: 100%; 19 | } 20 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/images/annotation-insert.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/images/annotation-check.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /src/component/project/ExportToolbar/ExportToolbar.css: -------------------------------------------------------------------------------- 1 | .ExportToolbar { 2 | width: 100%; 3 | } 4 | 5 | .ExportToolbar-exportButton { 6 | background-color: #4caf50; 7 | border: none; 8 | color: white; 9 | padding: 0.5em 1em; 10 | text-align: center; 11 | text-decoration: none; 12 | display: inline-block; 13 | width: 100%; 14 | } 15 | 16 | .ExportToolbar-list { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | .ExportToolbar-listItem { 22 | list-style: none; 23 | } 24 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/images/annotation-newparagraph.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /src/component/project/DownloadButton/DownloadButton.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const PropTypes = require("prop-types"); 4 | const React = require("react"); 5 | export default class DownloadButton extends React.PureComponent { 6 | static propTypes = { 7 | onClick: PropTypes.func.isRequired 8 | }; 9 | 10 | render() { 11 | return ( 12 | 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/component/uikit/Link/Link.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | import PropTypes from "prop-types"; 3 | import React from "react"; 4 | import classNames from "classnames"; 5 | /* 6 | @example 7 | text 8 | 9 | と書くとリンクになるコンポーネント 10 | */ 11 | export default class Link extends React.Component { 12 | render() { 13 | return ; 14 | } 15 | } 16 | Link.propTypes = { 17 | className: PropTypes.string, 18 | href: PropTypes.string.isRequired 19 | }; 20 | -------------------------------------------------------------------------------- /src/js/domain/zip/ZipFile.js: -------------------------------------------------------------------------------- 1 | // MIT © 2017 azu 2 | "use strict"; 3 | const assert = require("assert"); 4 | export const ZipFileType = { 5 | Text: "Text", 6 | Image: "Image" 7 | }; 8 | export class ZipFile { 9 | /** 10 | * 11 | * @param {string} name 12 | * @param {string} content 13 | * @param {string} type 14 | */ 15 | constructor({ name, content, type }) { 16 | this.name = name; 17 | this.content = content; 18 | assert(ZipFileType[type] !== undefined, "type should be ZipFileType"); 19 | this.type = type; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/component/container/PageListContainer/PageContainer/PageContainer.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /* Export Interface 3 | --PageContainer-width 4 | */ 5 | --PageContainer-itemSizeWidth: calc(var(--PageContainer-width) / 2); 6 | --PageContainer-itemSizeHeight: 300px; 7 | } 8 | 9 | .PageContainer { 10 | height: var(--PageContainer-itemSizeHeight); 11 | width: calc(var(--PageContainer-width)); 12 | } 13 | 14 | .PageContainer-inner { 15 | height: 100%; 16 | } 17 | 18 | .PageContainer-item { 19 | width: var(--PageContainer-itemSizeWidth); 20 | height: var(--PageContainer-itemSizeHeight); 21 | } 22 | -------------------------------------------------------------------------------- /src/js/read-store/AppStoreGroup.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import documentRepository from "../infra/DocumentRepository"; 4 | import DocumentStore from "./document/DocumentStore"; 5 | import ExportingStore from "./exporting/ExportingStore"; 6 | import { StoreGroup } from "almin"; 7 | export default class AppStoreGroup { 8 | /** 9 | * return a StoreGroup 10 | * @returns {StoreGroup} 11 | */ 12 | static create() { 13 | return new StoreGroup({ 14 | document: new DocumentStore({ documentRepository }), 15 | exporting: new ExportingStore({ documentRepository }) 16 | }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/js/UseCase/exporting/ToggleExportDialogUseCase.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import { UseCase } from "almin"; 4 | export class ToggleExportDialogFactory { 5 | static create() { 6 | return new ToggleExportDialogUseCase(); 7 | } 8 | } 9 | 10 | export class ToggleExportDialogUseCase extends UseCase { 11 | /** 12 | * @return {string} 13 | */ 14 | static get Event() { 15 | return "ToggleExportDialogUseCase"; 16 | } 17 | 18 | constructor() { 19 | super(); 20 | } 21 | 22 | execute() { 23 | this.dispatch({ 24 | type: ToggleExportDialogUseCase.Event 25 | }); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/js/read-store/document/DocumentStore.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import { ReduceStore } from "almin-reduce-store"; 4 | import DocumentState from "./DocumentState"; 5 | export default class DocumentStore extends ReduceStore { 6 | constructor({ documentRepository }) { 7 | super(); 8 | this.state = new DocumentState(); 9 | this.documentRepository = documentRepository; 10 | this.documentRepository.onChange(this._onChange.bind(this)); 11 | } 12 | 13 | getState() { 14 | return this.state; 15 | } 16 | 17 | _onChange(document) { 18 | this.setState(this.state.update({ document })); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/js/read-store/exporting/ExportingStore.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import { ReduceStore } from "almin-reduce-store"; 4 | import ExportingState from "./ExportingState"; 5 | /* 6 | StateStore has change condition 7 | */ 8 | export default class ExportingStateStore extends ReduceStore { 9 | constructor({ documentRepository }) { 10 | super(); 11 | this.state = new ExportingState(); 12 | documentRepository.onChange(this._onChange.bind(this)); 13 | } 14 | 15 | getState() { 16 | return this.state; 17 | } 18 | 19 | _onChange(document) { 20 | this.setState(this.state.update({ document })); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/component/uikit/Image/Image.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | import PropTypes from "prop-types"; 3 | import React from "react"; 4 | import classNames from "classnames"; 5 | 6 | /* 7 | @example 8 | 11 | 12 | と書くとアイコンとテキストが横並びになる要素 13 | */ 14 | export default class Image extends React.Component { 15 | render() { 16 | return ( 17 | // アイコンなのでaltは空にする 18 | {this.props.alt 19 | ); 20 | } 21 | } 22 | Image.propTypes = { 23 | className: PropTypes.string, 24 | src: PropTypes.string.isRequired, 25 | alt: PropTypes.string 26 | }; 27 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | 3 | module.exports = { 4 | entry: ["./src/index.js"], 5 | devtool: process.env.WEBPACK_DEVTOOL || "source-map", 6 | output: { 7 | path: path.join(__dirname, "public", "build"), 8 | publicPath: "/build/", 9 | filename: "bundle.js" 10 | }, 11 | module: { 12 | // to avoid warning by power-assert-formatter 13 | exprContextCritical: false, 14 | rules: [ 15 | { 16 | test: /\.js$/, 17 | exclude: /node_modules/, 18 | use: { 19 | loader: "babel-loader" 20 | } 21 | } 22 | ] 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /test/domain/Document-test.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const assert = require("assert"); 4 | import DocumentFactory from "../../src/js/domain/document/DocumentFactory"; 5 | describe("Document", () => { 6 | context("when mark a page", function() { 7 | it("return markedPageNumbers", function() { 8 | const document = DocumentFactory.create({ 9 | pdfURL: "test.pdf", 10 | totalPageNumber: 10 11 | }); 12 | const clickedPageNumber = 5; 13 | document.markAtPage(clickedPageNumber); 14 | const page = document.getPage(clickedPageNumber); 15 | assert(page.marked); 16 | }); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/js/domain/document/DocumentFactory.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import Document from "./Document"; 4 | import DocumentPage from "./DocumentPage"; 5 | import Range from "lodash.range"; 6 | export default class DocumentFactory { 7 | /** 8 | * create `Document` filled pages 9 | * @param {string} pdfURL 10 | * @param {number} totalPageNumber 11 | * @returns {DocumentModel} 12 | */ 13 | static create({ pdfURL, totalPageNumber }) { 14 | const pages = Range(totalPageNumber).map(index => { 15 | return new DocumentPage({ pageNumber: index + 1 }); 16 | }); 17 | return new Document({ 18 | pdfURL, 19 | pages 20 | }); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/js/UseCase/document/MarkPageUseCase.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import documentRepository from "../../infra/DocumentRepository"; 4 | import { UseCase } from "almin"; 5 | export class MarkPageUseCaseFactory { 6 | static create() { 7 | return new MarkPageUseCase({ 8 | documentRepository 9 | }); 10 | } 11 | } 12 | 13 | export class MarkPageUseCase extends UseCase { 14 | constructor({ documentRepository }) { 15 | super(); 16 | this.documentRepository = documentRepository; 17 | } 18 | 19 | execute(pageNumber) { 20 | const document = this.documentRepository.lastUsed(); 21 | // mark page => (domain emit change) 22 | document.markAtPage(pageNumber); 23 | this.documentRepository.save(document); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | # example netlify.toml 2 | [build] 3 | command = "yarn run build" 4 | functions = "functions" 5 | publish = "public" 6 | 7 | ## Uncomment to use this redirect for Single Page Applications like create-react-app. 8 | ## Not needed for static site generators. 9 | #[[redirects]] 10 | # from = "/*" 11 | # to = "/index.html" 12 | # status = 200 13 | 14 | ## (optional) Settings for Netlify Dev 15 | ## https://github.com/netlify/netlify-dev-plugin#project-detection 16 | #[dev] 17 | # command = "yarn start" # Command to start your dev server 18 | # port = 3000 # Port that the dev server will be listening on 19 | # publish = "dist" # Folder with the static content for _redirect file 20 | 21 | ## more info on configuring this file: https://www.netlify.com/docs/netlify-toml-reference/ 22 | -------------------------------------------------------------------------------- /src/component/project/PageEditor/PageEditor.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const PropTypes = require("prop-types"); 4 | const React = require("react"); 5 | const suitClassNames = require("suitcss-classnames"); 6 | import PageEditorTextarea from "./PageEditorTextarea"; 7 | export default class PageEditor extends React.PureComponent { 8 | render() { 9 | const className = suitClassNames({ 10 | component: "PageEditor", 11 | states: { 12 | "is-active": this.props.isActive 13 | } 14 | }); 15 | return ( 16 |
17 | 18 |
19 | ); 20 | } 21 | } 22 | PageEditor.propTypes = { 23 | pageNumber: PropTypes.number.isRequired, 24 | isActive: PropTypes.bool 25 | }; 26 | -------------------------------------------------------------------------------- /src/js/domain/zip/ZipDirectory.js: -------------------------------------------------------------------------------- 1 | // MIT © 2017 azu 2 | "use strict"; 3 | import {ZipFile} from "./ZipFile"; 4 | export class ZipDirectory { 5 | /** 6 | * 7 | * @type {Array.} 8 | */ 9 | files = []; 10 | 11 | name; 12 | dirPath; 13 | 14 | /** 15 | * 16 | * @param {string} dirName directory name 17 | * @param {string} dirPath directory path 18 | */ 19 | constructor(dirName, dirPath) { 20 | this.name = dirName; 21 | this.dirPath = dirPath; 22 | } 23 | 24 | /** 25 | * 26 | * @param {ZipFile} file 27 | */ 28 | addFile(file) { 29 | this.files = this.files.concat(file); 30 | } 31 | 32 | /** 33 | * @returns {boolean} 34 | */ 35 | get isRootDir() { 36 | return this.dirPath === "./" || this.dirPath === "."; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /test/domain/fixtures/download-format/expected.md: -------------------------------------------------------------------------------- 1 | 2 | ![](./images/1.png) 3 | 4 | Text 1 5 | 6 | 7 | ---- 8 | 9 | 10 | ![](./images/2.png) 11 | 12 | Text 2 13 | 14 | 15 | ---- 16 | 17 | 18 | ![](./images/3.png) 19 | 20 | 21 | 22 | 23 | ---- 24 | 25 | 26 | ![](./images/4.png) 27 | 28 | 29 | 30 | 31 | ---- 32 | 33 | 34 | ![](./images/5.png) 35 | 36 | 37 | 38 | 39 | ---- 40 | 41 | 42 | ![](./images/6.png) 43 | 44 | 45 | 46 | 47 | ---- 48 | 49 | 50 | ![](./images/7.png) 51 | 52 | 53 | 54 | 55 | ---- 56 | 57 | 58 | ![](./images/8.png) 59 | 60 | 61 | 62 | 63 | ---- 64 | 65 | 66 | ![](./images/9.png) 67 | 68 | 69 | 70 | 71 | ---- 72 | 73 | 74 | ![](./images/10.png) 75 | 76 | Text 10 77 | -------------------------------------------------------------------------------- /src/component/uikit/Grid/GridCell.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | import PropTypes from "prop-types"; 3 | import React from "react"; 4 | import classNames from "classnames"; 5 | export default class GridCell extends React.Component { 6 | render() { 7 | const col = `col-${this.props.col}`; 8 | return
{this.props.children}
; 9 | } 10 | } 11 | GridCell.propTypes = { 12 | className: PropTypes.string, 13 | children: PropTypes.node, 14 | col: PropTypes.oneOf([ 15 | "fill", 16 | "1of12", 17 | "2of12", 18 | "3of12", 19 | "4of12", 20 | "5of12", 21 | "6of12", 22 | "7of12", 23 | "8of12", 24 | "9of12", 25 | "10of12", 26 | "11of12", 27 | "12of12", 28 | "full" 29 | ]).isRequired 30 | }; 31 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Document 2 | 3 | ## Term and Role. 4 | 5 | ### contaienr 6 | 7 | Position of JavaScript: 8 | 9 | - React [Container Components](https://medium.com/@learnreact/container-components-c0e67432e005#.nlkg234z0 "Container Components")! 10 | 11 | Position of CSS: 12 | 13 | - Layout Component 14 | 15 | 16 | #### Allow 17 | 18 | - Know `component/` 19 | - Put layout css 20 | - Use active CSS like `margin`, `width`, `position:fixed`, `z-index`, `!important` 21 | 22 | #### Disallow 23 | 24 | - touch parent container 25 | 26 | ### component 27 | 28 | Contain `.js` and `.css` in a `` directory. 29 | 30 | #### Allow 31 | 32 | - Should know inner of the component 33 | 34 | #### Disallow 35 | 36 | - Know other component 37 | - Use active CSS like `margin`, `width`, `position:fixed`, `z-index`, `!important` 38 | 39 | ------ 40 | 41 | ## CSS 42 | 43 | See [css.md](./css.md) -------------------------------------------------------------------------------- /src/js/UseCase/document/UpdatePageNoteUseCase.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import documentRepository from "../../infra/DocumentRepository"; 4 | import { UseCase } from "almin"; 5 | export class UpdatePageNoteFactory { 6 | static create() { 7 | return new UpdatePageNoteUseCase({ 8 | documentRepository 9 | }); 10 | } 11 | } 12 | 13 | export class UpdatePageNoteUseCase extends UseCase { 14 | constructor({ documentRepository }) { 15 | super(); 16 | this.documentRepository = documentRepository; 17 | } 18 | 19 | /** 20 | * @param note 21 | * @param pageNumber 22 | * @returns {function()} 23 | */ 24 | execute({ note, pageNumber }) { 25 | const document = this.documentRepository.lastUsed(); 26 | document.updateNodeAtPage(note, pageNumber); 27 | this.documentRepository.save(document); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import React from "react"; 4 | import ReactDOM from "react-dom"; 5 | import App from "./component/container/App"; 6 | import AppLocator from "./AppLocator"; 7 | // store 8 | import AppStoreGroup from "./js/read-store/AppStoreGroup"; 9 | // context 10 | import {Context, Dispatcher} from "almin"; 11 | import AlminLogger from "almin-logger"; 12 | // instances 13 | const appStore = AppStoreGroup.create(); 14 | const dispatcher = new Dispatcher(); 15 | // context connect dispatch with stores 16 | const appContext = new Context({ 17 | dispatcher, 18 | store: appStore 19 | }); 20 | if (process.env.NODE_ENV !== "production") { 21 | const logger = new AlminLogger(); 22 | logger.startLogging(appContext); 23 | } 24 | // Singleton 25 | AppLocator.context = appContext; 26 | // entry point 27 | ReactDOM.render(, document.getElementById("js-app")); 28 | -------------------------------------------------------------------------------- /src/js/read-store/document/DocumentState.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import { ReduceState } from "almin-reduce-store"; 4 | import EmptyDocument from "../../domain/document/EmptyDocument"; 5 | export default class DocumentState extends ReduceState { 6 | constructor({ isLoaded = false, pdfURL = null, pages = [] } = {}) { 7 | super(); 8 | this.isLoaded = isLoaded; 9 | this.pdfURL = pdfURL; 10 | this.pages = pages; 11 | } 12 | 13 | /** 14 | * @returns {boolean} 15 | */ 16 | get exist() { 17 | return this.pdfURL !== undefined; 18 | } 19 | 20 | update({ document }) { 21 | const isEmpty = document instanceof EmptyDocument; 22 | return new DocumentState( 23 | Object.assign({}, this, { 24 | isLoaded: !isEmpty, 25 | pdfURL: document.pdfURL, 26 | pages: document.getAllPages() 27 | }) 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/usecase/NewDocumentUseCase-test.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const assert = require("power-assert"); 4 | import { NewDocumentUseCase } from "../../src/js/UseCase/document/NewDocumentUseCase"; 5 | import Document from "../../src/js/domain/document/Document"; 6 | import { DocumentRepository } from "../../src/js/infra/DocumentRepository"; 7 | describe("NewDocumentUseCase", function() { 8 | context("when execute", function() { 9 | it("should dispatch with document", function() { 10 | const pdfURL = "test.pdf"; 11 | const documentRepository = new DocumentRepository(); 12 | documentRepository.onChange(() => { 13 | const targetDocument = documentRepository.lastUsed(); 14 | assert(targetDocument instanceof Document); 15 | }); 16 | const useCase = new NewDocumentUseCase({ documentRepository }); 17 | return useCase.execute(pdfURL); 18 | }); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/images/annotation-comment.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /src/js/domain/document/DocumentPageCapture.js: -------------------------------------------------------------------------------- 1 | // MIT © 2017 azu 2 | "use strict"; 3 | 4 | export class DocumentPageCapture { 5 | /** 6 | * @param {DocumentPage} page 7 | * @return {string| null} 8 | */ 9 | static captureText(page) { 10 | if (typeof document === "undefined") { 11 | return ""; 12 | } 13 | const pageElement = document.querySelector(`[data-page="${page.pageNumber}"]`); 14 | if (!pageElement) { 15 | return null; 16 | } 17 | return pageElement.dataset.pageText || ""; 18 | } 19 | 20 | /** 21 | * @param {DocumentPage} page 22 | * @return {string| null} 23 | */ 24 | static createCapture(page) { 25 | const canvas = document.querySelector(`[data-page="${page.pageNumber}"] canvas`); 26 | if (!canvas) { 27 | return null; 28 | } 29 | // remove prefix 30 | return canvas.toDataURL("image/png").replace(/^data:image\/\w+;base64,/, ""); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /test/utils/EventDelegate.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const assert = require("assert"); 4 | /** 5 | * delegate fromEmitter events to toEmitter. 6 | * @param fromEmitter 7 | * @param toEmitter 8 | */ 9 | export default function delegateEvents(fromEmitter, toEmitter) { 10 | assert(typeof fromEmitter.emit === "function"); 11 | assert(typeof toEmitter.emit === "function"); 12 | const oldEmit = fromEmitter.emit; 13 | const fromEmitterName = fromEmitter.constructor.name; 14 | const toEmitterName = toEmitter.constructor.name; 15 | const delegateName = `${fromEmitterName} => ${toEmitterName}`; 16 | /** 17 | * @param {DispatcherPayload} payload 18 | */ 19 | const eventDelegateHookEmit = function eventDelegateHookEmit(payload) { 20 | const { type } = payload; 21 | this.displayName = delegateName; 22 | toEmitter.emit(type, ...args); 23 | oldEmit.apply(fromEmitter, originalArgs); 24 | }; 25 | fromEmitter.emit = eventDelegateHookEmit; 26 | } 27 | -------------------------------------------------------------------------------- /src/js/UseCase/document/NewDocumentUseCase.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import EmptyDocument from "../../domain/document/EmptyDocument"; 4 | import documentRepository from "../../infra/DocumentRepository"; 5 | import { UseCase } from "almin"; 6 | export class NewDocumentFactory { 7 | static create() { 8 | return new NewDocumentUseCase({ 9 | documentRepository 10 | }); 11 | } 12 | } 13 | 14 | export class NewDocumentUseCase extends UseCase { 15 | /** 16 | * initialized with DI-able object. 17 | * Not directly use from View/Component 18 | * Call via UseCaseController 19 | */ 20 | constructor({ documentRepository }) { 21 | super(); 22 | this.documentRepository = documentRepository; 23 | } 24 | 25 | /** 26 | * @param {string} pdfURL 27 | * @returns {void} 28 | */ 29 | execute(pdfURL) { 30 | const emptyDocument = new EmptyDocument({ pdfURL }); 31 | this.documentRepository.save(emptyDocument); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # presentation-annotator [![Build Status](https://travis-ci.org/azu/presentation-annotator.svg?branch=master)](https://travis-ci.org/azu/presentation-annotator) 2 | 3 | ## Architecture 4 | 5 | See [document](docs/) 6 | 7 | - React architecture 8 | - CSS architecture 9 | 10 | See [azu/large-scale-javascript](https://github.com/azu/large-scale-javascript "azu/large-scale-javascript") for more details. 11 | 12 | This project is proof of concept for [large-scale-javascript](https://github.com/azu/large-scale-javascript) architecture. 13 | 14 | ## Demo 15 | 16 | Visit 17 | 18 | ## Installation 19 | 20 | npm install 21 | 22 | ## Usage 23 | 24 | npm run watch 25 | 26 | ## Tests 27 | 28 | npm test 29 | 30 | ## Contributing 31 | 32 | 1. Fork it! 33 | 2. Create your feature branch: `git checkout -b my-new-feature` 34 | 3. Commit your changes: `git commit -am 'Add some feature'` 35 | 4. Push to the branch: `git push origin my-new-feature` 36 | 5. Submit a pull request :D 37 | 38 | ## License 39 | 40 | MIT 41 | -------------------------------------------------------------------------------- /src/component/uikit/Grid/GridCell.css: -------------------------------------------------------------------------------- 1 | .GridCell { 2 | min-width: 1px; 3 | box-sizing: border-box; 4 | display: inline; 5 | } 6 | 7 | .GridCell[class*="col-"] { 8 | float: left; 9 | } 10 | 11 | .GridCell[class*="col-"]:last-of-type { 12 | padding-right: 0; 13 | } 14 | 15 | .GridCell.col-1of12 { 16 | width: 8.33333%; 17 | } 18 | 19 | .GridCell.col-2of12 { 20 | width: 16.66667%; 21 | } 22 | 23 | .GridCell.col-3of12 { 24 | width: 25%; 25 | } 26 | 27 | .GridCell.col-4of12 { 28 | width: 33.33333%; 29 | } 30 | 31 | .GridCell.col-5of12 { 32 | width: 41.66667%; 33 | } 34 | 35 | .GridCell.col-6of12 { 36 | width: 50%; 37 | } 38 | 39 | .GridCell.col-7of12 { 40 | width: 58.33333%; 41 | } 42 | 43 | .GridCell.col-8of12 { 44 | width: 66.66667%; 45 | } 46 | 47 | .GridCell.col-9of12 { 48 | width: 75%; 49 | } 50 | 51 | .GridCell.col-10of12 { 52 | width: 83.33333%; 53 | } 54 | 55 | .GridCell.col-11of12 { 56 | width: 91.66667%; 57 | } 58 | 59 | .GridCell.col-full, 60 | .GridCell.col-12of12 { 61 | width: 100%; 62 | } 63 | -------------------------------------------------------------------------------- /test/domain/DocumentService-test.js: -------------------------------------------------------------------------------- 1 | // MIT © 2017 azu 2 | "use strict"; 3 | import DocumentFactory from "../../src/js/domain/document/DocumentFactory"; 4 | import DocumentService from "../../src/js/domain/document/DocumentService"; 5 | const path = require("path"); 6 | const assert = require("assert"); 7 | const fs = require("fs"); 8 | describe("DocumentService", () => { 9 | describe("toMarkdown", function() { 10 | it("should return Markdown", () => { 11 | const document = DocumentFactory.create({ 12 | pdfURL: "test.pdf", 13 | totalPageNumber: 10 14 | }); 15 | const actual = require("./fixtures/download-format/actual.json"); 16 | actual.forEach(({ pageNumber, note }) => { 17 | document.updateNodeAtPage(note, pageNumber); 18 | }); 19 | const expected = fs.readFileSync(path.join(__dirname, "fixtures/download-format/expected.md"), "utf-8"); 20 | assert.equal(DocumentService.toMarkdown(document), expected); 21 | }); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/component/uikit/Grid/Grid.css: -------------------------------------------------------------------------------- 1 | /* 2 | Grid > GridCell 3 | 4 | HeightについてはGrid側としては考慮していなくて、Columnに関するCellをセルを定義してる。 5 | 横並びの実装がメインのタスク 6 | 小さなリファレンス実装のため、厳密なものとしては書かれてない 7 | 8 | table-cellのようなもの 9 | 10 | Gridで考えるかどうかも別で検討が必要そう。 11 | borderやgutterなどの概念もレイアウトするには必要になるはず 12 | http://gridbyexample.com/ 13 | http://mdo.github.io/table-grid/ 14 | 15 | 素直によく作りこまれたライブラリを使うのもありだと思う。 16 | CSSでGridLayoutの仕様があるのでそっちに乗っかるのもありそう 17 | display:table-cell;を安易に使うべきでない理由いろいろ - Qiita 18 | http://qiita.com/sawadays0118/items/4c329fd05cdff14ffebc 19 | 20 | 小さなうちは普通に動きそうだけど、柔軟性に欠けるというのはありそう 21 | */ 22 | @import "./GridCell.css"; 23 | 24 | /* Debug */ 25 | .Grid .GridCell { 26 | border: #d0d0d0 solid 1px; 27 | } 28 | 29 | .Grid--gutter { 30 | } 31 | 32 | .Grid { 33 | box-sizing: border-box; 34 | width: 100%; 35 | } 36 | 37 | /*Clear*/ 38 | .Grid:after { 39 | content: ""; 40 | display: table; 41 | clear: both; 42 | } 43 | 44 | .Grid--center { 45 | } 46 | 47 | .Grid--middle .GridCell { 48 | vertical-align: middle; 49 | } 50 | -------------------------------------------------------------------------------- /src/component/project/ExportToolbar/ExportToolbar.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const React = require("react"); 4 | import HoverBlock from "../../uikit/HoverBlock/HoverBlock"; 5 | import AppLocator from "../../../AppLocator"; 6 | import { ToggleExportDialogFactory } from "../../../js/UseCase/exporting/ToggleExportDialogUseCase"; 7 | export default class ExportToolbar extends React.PureComponent { 8 | showExportBox = () => { 9 | const context = AppLocator.context; 10 | context.useCase(ToggleExportDialogFactory.create()).execute(); 11 | }; 12 | render() { 13 | return ( 14 | 15 |
    16 |
  • 17 | 20 |
  • 21 |
22 |
23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/js/infra/api/DownloadAPI.js: -------------------------------------------------------------------------------- 1 | // MIT © 2017 azu 2 | "use strict"; 3 | const JSZip = require("jszip"); 4 | const FileSaver = require("file-saver"); 5 | import { ZipFileType } from "../../domain/zip/ZipFile"; 6 | export class DownloadAPI { 7 | /** 8 | * @param {Zip} zipData 9 | * @param {string} zipName 10 | */ 11 | static download(zipData, zipName) { 12 | const zip = new JSZip(); 13 | zipData.collection.forEach(directory => { 14 | const folder = directory.isRootDir ? zip : zip.folder(directory.dirPath); 15 | directory.files.forEach(file => { 16 | if (file.type === ZipFileType.Image) { 17 | folder.file(file.name, file.content, { base64: true }); 18 | } else { 19 | folder.file(file.name, file.content); 20 | } 21 | }); 22 | }); 23 | return zip.generateAsync({ type: "blob" }).then(function(content) { 24 | // see FileSaver.js 25 | FileSaver.saveAs(content, zipName); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 azu 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /docs/javascript.md: -------------------------------------------------------------------------------- 1 | # JavaScript 2 | 3 | Presentation of the architecture: http://azu.github.io/slide/2016/bikeshedjs/javascript-read-write-stack.html 4 | 5 | :new: We've created [almin](https://github.com/almin/almin "almin/almin: Flux/CQRS patterns for JavaScript app") library. 6 | 7 | ## Store 8 | 9 | - when a repository is changed, pull data from repository and update state of store 10 | - when received event from UseCase, update state of store 11 | 12 | ## UseCase 13 | 14 | - when the User do action, execute UseCase 15 | - UseCase pull domain from repository, call domain behavior, and save domain to repository 16 | - UseCase also can emit event to store indirect. 17 | 18 | ## Repository 19 | 20 | - repository is a perpetuation layer 21 | - repository is a abstract of database, 22 | - repository save domain model or return domain model. 23 | - when repository is changed, emit change to self. 24 | - store observe the repository changed event, and store should update 25 | 26 | ## Domain 27 | 28 | - domain is a domain model 29 | - domain has data and behavior! 30 | 31 | Ref: https://tech.recruit-mp.co.jp/mobile/android-architecture/ 32 | 33 | -------------------------------------------------------------------------------- /src/component/project/NewDocumentForm/NewDocumentForm.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --NewDocumentForm_font-size: 24px; 3 | --NewDocumentForm_leftRadio: 75%; 4 | } 5 | 6 | .NewDocumentForm { 7 | font-size: var(--NewDocumentForm_font-size); 8 | } 9 | 10 | .NewDocumentForm-inputs { 11 | display: flex; 12 | } 13 | 14 | .NewDocumentForm-inputURL { 15 | font-size: var(--NewDocumentForm_font-size); 16 | width: var(--NewDocumentForm_leftRadio, 80%); 17 | } 18 | 19 | .NewDocumentForm-submitButton { 20 | font-size: var(--NewDocumentForm_font-size); 21 | display: inline-block; 22 | text-align: center; 23 | color: #ffffff; 24 | background-color: #4974af; 25 | border: 1px solid #4974af; 26 | text-decoration: none; 27 | font-weight: bold; 28 | padding: 10px 24px; 29 | position: relative; 30 | } 31 | 32 | .NewDocumentForm-uploadButton { 33 | display: inline-block; 34 | text-align: center; 35 | color: #ffffff; 36 | background-color: #4caf50; 37 | border: 1px solid #4caf50; 38 | font-size: var(--NewDocumentForm_font-size); 39 | text-decoration: none; 40 | font-weight: bold; 41 | padding: 10px 24px; 42 | position: relative; 43 | } 44 | -------------------------------------------------------------------------------- /test/read-store/DocumentStateStore-test.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const assert = require("power-assert"); 4 | import DocumentFactory from "../../src/js/domain/document/DocumentFactory"; 5 | import { DocumentRepository } from "../../src/js/infra/DocumentRepository"; 6 | import DocumentStateStore from "../../src/js/read-store/document/DocumentStore"; 7 | describe("DocumentStateStore", function() { 8 | context("when create new document", function() { 9 | it("emit change and return new document", function() { 10 | // stub document 11 | const document = DocumentFactory.create({ 12 | pdfURL: "test.pdf", 13 | totalPageNumber: 10 14 | }); 15 | // add document to repository 16 | const documentRepository = new DocumentRepository(); 17 | // create store 18 | const store = new DocumentStateStore({ documentRepository }); 19 | // then 20 | store.onChange(() => { 21 | assert.deepEqual(store.getState().pdfURL, document.pdfURL); 22 | }); 23 | // when 24 | documentRepository.save(document); 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /src/component/project/DummyPagePreview/DummyPagePreview.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const PropTypes = require("prop-types"); 4 | const React = require("react"); 5 | import AppLocator from "../../../AppLocator"; 6 | import { CompleteLoadingDocumentFactory } from "../../../js/UseCase/document/CompleteLoadingDocumentUseCase"; 7 | import PDFPagePreview from "../PDFPagePreview/PDFPagePreview"; 8 | export default class DummyPagePreview extends React.PureComponent { 9 | onDocumentComplete = pages => { 10 | const totalPageNumber = pages; 11 | const context = AppLocator.context; 12 | context.useCase(CompleteLoadingDocumentFactory.create()).execute(totalPageNumber); 13 | }; 14 | 15 | render() { 16 | return ( 17 |
18 | {/* load 0 page to search page numbers */} 19 | 24 |
25 | ); 26 | } 27 | } 28 | DummyPagePreview.propTypes = { 29 | pdfURL: PropTypes.string.isRequired 30 | }; 31 | -------------------------------------------------------------------------------- /src/js/domain/zip/Zip.js: -------------------------------------------------------------------------------- 1 | // MIT © 2017 azu 2 | "use strict"; 3 | import { ZipDirectory } from "./ZipDirectory"; 4 | import { ZipFile, ZipFileType } from "./ZipFile"; 5 | export class Zip { 6 | name; 7 | 8 | textDirectory = new ZipDirectory("text", "./"); 9 | imageDirectory = new ZipDirectory("images", "./images"); 10 | 11 | /** 12 | * 13 | * @type {Array.} 14 | */ 15 | collection = [this.textDirectory, this.imageDirectory]; 16 | 17 | constructor(name) { 18 | this.name = name; 19 | } 20 | 21 | addContent(fileName, content) { 22 | const file = new ZipFile({ 23 | name: fileName, 24 | content, 25 | type: ZipFileType.Text 26 | }); 27 | this.textDirectory.addFile(file); 28 | } 29 | 30 | /** 31 | * add image as /img/*.png 32 | * @param {string} fileName 33 | * @param {string} base64Content base64 content 34 | */ 35 | addImage(fileName, base64Content) { 36 | const file = new ZipFile({ 37 | name: fileName, 38 | content: base64Content, 39 | type: ZipFileType.Image 40 | }); 41 | this.imageDirectory.addFile(file); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/images/annotation-paragraph.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/images/annotation-note.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 14 | 21 | 28 | 35 | 42 | 43 | -------------------------------------------------------------------------------- /src/js/UseCase/document/CompleteLoadingDocumentUseCase.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | import documentRepository from "../../infra/DocumentRepository"; 4 | import DocumentFactory from "../../domain/document/DocumentFactory"; 5 | import { UseCase } from "almin"; 6 | export class CompleteLoadingDocumentFactory { 7 | static create() { 8 | return new CompleteLoadingDocumentUseCase({ 9 | documentRepository 10 | }); 11 | } 12 | } 13 | 14 | export class CompleteLoadingDocumentUseCase extends UseCase { 15 | /** 16 | * initialized with DI-able object. 17 | * Not directly use from View/Component 18 | * Call via UseCaseController 19 | */ 20 | constructor({ documentRepository }) { 21 | super(); 22 | this.documentRepository = documentRepository; 23 | } 24 | 25 | execute(totalPageNumber) { 26 | const currentDocument = this.documentRepository.lastUsed(); 27 | if (!currentDocument) { 28 | return new Error("currentDocument is not found"); 29 | } 30 | const document = DocumentFactory.create({ 31 | pdfURL: currentDocument.pdfURL, 32 | totalPageNumber: totalPageNumber 33 | }); 34 | this.documentRepository.save(document); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/component/container/DocumentFormContainer/DocumentFormContainer.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const PropTypes = require("prop-types"); 4 | const React = require("react"); 5 | import NewDocumentForm from "../../project/NewDocumentForm/NewDocumentForm"; 6 | import { NewDocumentFactory } from "../../../js/UseCase/document/NewDocumentUseCase"; 7 | // state 8 | import DocumentState from "../../../js/read-store/document/DocumentState"; 9 | import AppLocator from "../../../AppLocator"; 10 | export default class DocumentFormContainer extends React.Component { 11 | onOpenDocument = url => { 12 | const context = AppLocator.context; 13 | context.useCase(NewDocumentFactory.create()).execute(url); 14 | }; 15 | 16 | render() { 17 | /** 18 | * @type {DocumentState} 19 | */ 20 | const document = this.context.document; 21 | return ( 22 |
23 |
24 | 25 |
26 |
27 | ); 28 | } 29 | } 30 | DocumentFormContainer.contextTypes = { 31 | document: PropTypes.instanceOf(DocumentState).isRequired 32 | }; 33 | -------------------------------------------------------------------------------- /src/component/project/PageEditor/PageEditorTextarea.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const PropTypes = require("prop-types"); 4 | const React = require("react"); 5 | const suitClassNames = require("suitcss-classnames"); 6 | import AppLocator from "../../../AppLocator"; 7 | import { UpdatePageNoteFactory } from "../../../js/UseCase/document/UpdatePageNoteUseCase"; 8 | export default class PageEditorTextarea extends React.PureComponent { 9 | render() { 10 | const savePageContent = event => { 11 | const content = event.target.value; 12 | const page = { 13 | note: content, 14 | pageNumber: this.props.pageNumber 15 | }; 16 | const context = AppLocator.context; 17 | context.useCase(UpdatePageNoteFactory.create()).execute(page); 18 | }; 19 | const className = suitClassNames({ 20 | component: "PageEditorTextarea", 21 | states: { 22 | "is-active": this.props.isActive 23 | } 24 | }); 25 | return 29 | ; 30 | } 31 | } 32 | ``` 33 | 34 | We do separate ` 55 | } 56 | } 57 | 58 | PageEditorTextarea.propTypes = {isActive: React.PropTypes.bool}; 59 | ``` 60 | 61 | `PageEditor.js` use `` 62 | 63 | ``` 64 | const React = require("react"); 65 | const suitClassNames = require("suitcss-classnames"); 66 | import PageEditorTextarea from "./PageEditorTextarea"; 67 | export default class PageEditor extends React.Component { 68 | render() { 69 | const className = suitClassNames({ 70 | component: "PageEditor", 71 | states: { 72 | active: this.props.isActive 73 | } 74 | }); 75 | return
76 | 77 |
; 78 | } 79 | } 80 | PageEditor.propTypes = {isActive: React.PropTypes.bool}; 81 | ``` 82 | 83 | ## Constant Variable 84 | 85 | Constants variable is defined `css/var`. 86 | 87 | You should not re-define variable in component. 88 | Insteadof it, you should define new variable for component. 89 | 90 | CSS's `var` should be immutable variable. not use as mutable variable. 91 | 92 | e.g.)PageEditorTextarea's `font-size` 93 | 94 | `PageEditorTextarea.css` use `--PageEditorTextareaIsActive-font-size` variable. 95 | 96 | ```css 97 | .PageEditorTextarea.is-active { 98 | font-size: var(--PageEditorTextareaIsActive-font-size, large); 99 | } 100 | ``` 101 | 102 | `--PageEditorTextareaIsActive-font-size` is defined in `css/var/font-size.css` 103 | 104 | -------------------------------------------------------------------------------- /src/component/project/NewDocumentForm/NewDocumentForm.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const React = require("react"); 3 | 4 | // LICENSE : MIT 5 | import PropTypes from "prop-types"; 6 | 7 | import FileInput from "react-simple-file-input"; 8 | 9 | const allowedFileTypes = ["application/pdf"]; 10 | 11 | function fileIsIncorrectFiletype(file) { 12 | return allowedFileTypes.indexOf(file.type) === -1; 13 | } 14 | 15 | export default class NewDocumentForm extends React.PureComponent { 16 | 17 | inputURL = React.createRef(); 18 | 19 | cancelButtonClicked = () => { 20 | return this.state.cancelButtonClicked; 21 | }; 22 | 23 | resetCancelButtonClicked = () => { 24 | this.setState({cancelButtonClicked: false}); 25 | }; 26 | 27 | showInvalidFileTypeMessage = file => { 28 | window.alert("Tried to upload invalid filetype " + file.type); 29 | }; 30 | 31 | showProgressBar = () => { 32 | this.setState({progressBarVisible: true}); 33 | }; 34 | 35 | updateProgressBar = event => { 36 | this.setState({ 37 | progressPercent: (event.loaded / event.total) * 100 38 | }); 39 | }; 40 | 41 | onLoadFile = (event, file) => { 42 | const blobURL = URL.createObjectURL(file); 43 | this.props.onOpenDocument(blobURL); 44 | this.setState({ 45 | progressPercent: 0, 46 | progressBarVisible: false 47 | }); 48 | }; 49 | 50 | onSubmitNewDocument = event => { 51 | event.preventDefault(); 52 | const pdfURL = this.inputURL.current.value; 53 | if (!pdfURL) { 54 | return; 55 | } 56 | this.props.onOpenDocument(pdfURL); 57 | }; 58 | 59 | constructor() { 60 | super(); 61 | this.state = { 62 | progressPercent: 0, 63 | progressBarVisible: false 64 | }; 65 | } 66 | 67 | render() { 68 | const pdfURL = this.props.pdfURL || ""; 69 | return ( 70 |
71 | {this.state.progressBarVisible ? `${this.state.progressPercent}%` : ""} 72 |
73 | 80 | 86 | 100 |
101 |
102 | ); 103 | } 104 | } 105 | NewDocumentForm.propTypes = { 106 | pdfURL: PropTypes.string, 107 | onOpenDocument: PropTypes.func.isRequired 108 | }; 109 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "presentation-annotator", 3 | "repository": { 4 | "type": "git", 5 | "url": "git+https://github.com/azu/presentation-annotator.git" 6 | }, 7 | "author": "azu", 8 | "email": "azuciao@gmail.com", 9 | "homepage": "https://github.com/azu/presentation-annotator", 10 | "license": "MIT", 11 | "files": [ 12 | "src/", 13 | "lib/" 14 | ], 15 | "bugs": { 16 | "url": "https://github.com/azu/presentation-annotator/issues" 17 | }, 18 | "version": "1.0.0", 19 | "description": "viewing presentation and annotate.", 20 | "main": "index.js", 21 | "directories": { 22 | "test": "test" 23 | }, 24 | "scripts": { 25 | "start": "npm-run-all clean --parallel watch:css server", 26 | "clean": "rimraf public/build && mkdirp public/build", 27 | "server": "NODE_ENV=development webpack-dev-server -d --hot --content-base ./public --open", 28 | "build:js": "NODE_ENV=production webpack --mode=production", 29 | "build:css": "postcss --config postcss.config.js src/index.css -o public/build/bundle.css", 30 | "build": "npm-run-all clean --parallel build:*", 31 | "watch:js": "webpack --mode=development --watch", 32 | "watch:css": "chokidar --initial 'src/**/*.css' -c 'npm run build:css'", 33 | "watch": "npm-run-all clean --parallel watch:css start", 34 | "prepublish": "npm run --if-present build", 35 | "test": "mocha", 36 | "prettier": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"" 37 | }, 38 | "keywords": [ 39 | "presentation", 40 | "pdf" 41 | ], 42 | "devDependencies": { 43 | "@alrra/travis-scripts": "^3.0.1", 44 | "@babel/core": "^7.5.5", 45 | "@babel/plugin-proposal-class-properties": "^7.0.0", 46 | "@babel/plugin-transform-runtime": "^7.0.0", 47 | "@babel/preset-env": "^7.0.0", 48 | "@babel/preset-react": "^7.0.0", 49 | "@babel/register": "^7.0.0", 50 | "autoprefixer": "^9.6.1", 51 | "babel-eslint": "^10.0.2", 52 | "babel-loader": "^8.0.6", 53 | "babel-preset-jsdoc-to-assert": "^5.0.0", 54 | "babel-preset-power-assert": "^3.0.0", 55 | "chokidar-cli": "^2.0.0", 56 | "eslint": "^6.2.1", 57 | "eslint-plugin-no-allow-react-context": "^1.0.1", 58 | "eslint-plugin-react": "^7.14.3", 59 | "eslint-plugin-suitcss-classnames": "^1.0.3", 60 | "gh-pages": "^2.1.1", 61 | "husky": "^3.0.4", 62 | "json-loader": "^0.5.7", 63 | "lint-staged": "^9.2.3", 64 | "mkdirp": "^0.5.1", 65 | "mocha": "^6.2.0", 66 | "npm-run-all": "^4.1.5", 67 | "postcss-calc": "^7.0.1", 68 | "postcss-cli": "^6.1.3", 69 | "postcss-custom-media": "^7.0.8", 70 | "postcss-custom-properties": "^9.0.2", 71 | "postcss-easy-import": "^3.0.0", 72 | "postcss-reporter": "^6.0.1", 73 | "power-assert": "^1.6.1", 74 | "prettier": "^1.18.2", 75 | "rimraf": "^3.0.0", 76 | "webpack": "^4.39.2", 77 | "webpack-cli": "^3.3.7", 78 | "webpack-dev-server": "^3.8.0" 79 | }, 80 | "dependencies": { 81 | "@babel/runtime-corejs2": "^7.0.0", 82 | "almin": "^0.12.0", 83 | "almin-logger": "^4.0.3", 84 | "almin-reduce-store": "^1.0.1", 85 | "classnames": "^2.2.3", 86 | "file-saver": "^1.3.3", 87 | "jszip": "^3.1.3", 88 | "lodash.range": "^3.1.4", 89 | "map-like": "^1.0.1", 90 | "prop-types": "^15.7.2", 91 | "react": "^16.9.0", 92 | "react-dom": "^16.9.0", 93 | "react-pdf": "^4.1.0", 94 | "react-simple-file-input": "^2.1.0", 95 | "react-virtualized": "^9.21.1", 96 | "suitcss-base": "^3.0.0", 97 | "suitcss-classnames": "^1.1.0", 98 | "uuid": "^3.0.1" 99 | }, 100 | "prettier": { 101 | "singleQuote": false, 102 | "printWidth": 120, 103 | "tabWidth": 4 104 | }, 105 | "husky": { 106 | "hooks": { 107 | "precommit": "lint-staged" 108 | } 109 | }, 110 | "lint-staged": { 111 | "*.{js,jsx,ts,tsx,css}": [ 112 | "prettier --write", 113 | "git add" 114 | ] 115 | }, 116 | "browserslist": [ 117 | "last 1 version", 118 | "> 5%" 119 | ] 120 | } 121 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### https://raw.github.com/github/gitignore/608690d6b9a78c2a003affc792e49a84905b3118/Node.gitignore 2 | 3 | # Logs 4 | logs 5 | *.log 6 | 7 | # Runtime data 8 | pids 9 | *.pid 10 | *.seed 11 | 12 | # Directory for instrumented libs generated by jscoverage/JSCover 13 | lib-cov 14 | 15 | # Coverage directory used by tools like istanbul 16 | coverage 17 | 18 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 19 | .grunt 20 | 21 | # node-waf configuration 22 | .lock-wscript 23 | 24 | # Compiled binary addons (http://nodejs.org/api/addons.html) 25 | build/Release 26 | 27 | # Dependency directory 28 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- 29 | node_modules 30 | 31 | # Debug log from npm 32 | npm-debug.log 33 | 34 | 35 | ### https://raw.github.com/github/gitignore/608690d6b9a78c2a003affc792e49a84905b3118/Global/JetBrains.gitignore 36 | 37 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 38 | 39 | *.iml 40 | 41 | ## Directory-based project format: 42 | .idea/ 43 | # if you remove the above rule, at least ignore the following: 44 | 45 | # User-specific stuff: 46 | # .idea/workspace.xml 47 | # .idea/tasks.xml 48 | # .idea/dictionaries 49 | 50 | # Sensitive or high-churn files: 51 | # .idea/dataSources.ids 52 | # .idea/dataSources.xml 53 | # .idea/sqlDataSources.xml 54 | # .idea/dynamic.xml 55 | # .idea/uiDesigner.xml 56 | 57 | # Gradle: 58 | # .idea/gradle.xml 59 | # .idea/libraries 60 | 61 | # Mongo Explorer plugin: 62 | # .idea/mongoSettings.xml 63 | 64 | ## File-based project format: 65 | *.ipr 66 | *.iws 67 | 68 | ## Plugin-specific files: 69 | 70 | # IntelliJ 71 | out/ 72 | 73 | # mpeltonen/sbt-idea plugin 74 | .idea_modules/ 75 | 76 | # JIRA plugin 77 | atlassian-ide-plugin.xml 78 | 79 | # Crashlytics plugin (for Android Studio and IntelliJ) 80 | com_crashlytics_export_strings.xml 81 | crashlytics.properties 82 | crashlytics-build.properties 83 | 84 | 85 | /lib 86 | ### https://raw.github.com/github/gitignore/608690d6b9a78c2a003affc792e49a84905b3118/Node.gitignore 87 | 88 | # Logs 89 | logs 90 | *.log 91 | 92 | # Runtime data 93 | pids 94 | *.pid 95 | *.seed 96 | 97 | # Directory for instrumented libs generated by jscoverage/JSCover 98 | lib-cov 99 | 100 | # Coverage directory used by tools like istanbul 101 | coverage 102 | 103 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 104 | .grunt 105 | 106 | # node-waf configuration 107 | .lock-wscript 108 | 109 | # Compiled binary addons (http://nodejs.org/api/addons.html) 110 | build/Release 111 | 112 | # Dependency directory 113 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- 114 | node_modules 115 | 116 | # Debug log from npm 117 | npm-debug.log 118 | 119 | 120 | ### https://raw.github.com/github/gitignore/608690d6b9a78c2a003affc792e49a84905b3118/Global/JetBrains.gitignore 121 | 122 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 123 | 124 | *.iml 125 | 126 | ## Directory-based project format: 127 | .idea/ 128 | # if you remove the above rule, at least ignore the following: 129 | 130 | # User-specific stuff: 131 | # .idea/workspace.xml 132 | # .idea/tasks.xml 133 | # .idea/dictionaries 134 | 135 | # Sensitive or high-churn files: 136 | # .idea/dataSources.ids 137 | # .idea/dataSources.xml 138 | # .idea/sqlDataSources.xml 139 | # .idea/dynamic.xml 140 | # .idea/uiDesigner.xml 141 | 142 | # Gradle: 143 | # .idea/gradle.xml 144 | # .idea/libraries 145 | 146 | # Mongo Explorer plugin: 147 | # .idea/mongoSettings.xml 148 | 149 | ## File-based project format: 150 | *.ipr 151 | *.iws 152 | 153 | ## Plugin-specific files: 154 | 155 | # IntelliJ 156 | out/ 157 | 158 | # mpeltonen/sbt-idea plugin 159 | .idea_modules/ 160 | 161 | # JIRA plugin 162 | atlassian-ide-plugin.xml 163 | 164 | # Crashlytics plugin (for Android Studio and IntelliJ) 165 | com_crashlytics_export_strings.xml 166 | crashlytics.properties 167 | crashlytics-build.properties 168 | 169 | 170 | /lib 171 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "commonjs": true, 5 | "es6": true, 6 | "node": true, 7 | "mocha": true 8 | }, 9 | "parser": "babel-eslint", 10 | "parserOptions": { 11 | "ecmaFeatures": { 12 | "experimentalObjectRestSpread": true, 13 | "jsx": true 14 | }, 15 | "sourceType": "module" 16 | }, 17 | "plugins": [ 18 | "react", 19 | "suitcss-classnames", 20 | "no-allow-react-context" 21 | ], 22 | "extends": [ 23 | "eslint:recommended", 24 | "plugin:react/recommended" 25 | ], 26 | "rules": { 27 | "radix": 2, 28 | "arrow-parens": [ 29 | 2, 30 | "always" 31 | ], 32 | "arrow-spacing": 2, 33 | "block-spacing": [ 34 | 2, 35 | "never" 36 | ], 37 | "camelcase": 1, 38 | "constructor-super": 2, 39 | "comma-dangle": [ 40 | 2, 41 | "never" 42 | ], 43 | "comma-style": [ 44 | 2, 45 | "last" 46 | ], 47 | "comma-spacing": [ 48 | 2, 49 | { 50 | "before": false, 51 | "after": true 52 | } 53 | ], 54 | "callback-return": [ 55 | 2, 56 | [ 57 | "callback", 58 | "cb", 59 | "next" 60 | ] 61 | ], 62 | "computed-property-spacing": [ 63 | 2, 64 | "never" 65 | ], 66 | "default-case": 2, 67 | "dot-notation": 0, 68 | "dot-location": [ 69 | 2, 70 | "property" 71 | ], 72 | "eol-last": 2, 73 | "eqeqeq": 2, 74 | "generator-star-spacing": 2, 75 | "indent": [ 76 | 2, 77 | 4, 78 | { 79 | "SwitchCase": 1 80 | } 81 | ], 82 | "require-jsdoc": 1, 83 | "key-spacing": [ 84 | 2, 85 | { 86 | "beforeColon": false, 87 | "afterColon": true 88 | } 89 | ], 90 | "linebreak-style": [ 91 | 2, 92 | "unix" 93 | ], 94 | "lines-around-comment": [ 95 | 2, 96 | { 97 | "beforeBlockComment": false, 98 | "beforeLineComment": false, 99 | "afterLineComment": false 100 | } 101 | ], 102 | "no-alert": 0, 103 | "no-class-assign": 2, 104 | "no-cond-assign": 2, 105 | "no-console": 1, 106 | "no-const-assign": 2, 107 | "no-constant-condition": 2, 108 | "no-duplicate-case": 2, 109 | "no-dupe-class-members": 2, 110 | "no-dupe-keys": 2, 111 | "no-empty": 2, 112 | "no-empty-pattern": 2, 113 | "no-invalid-this": 1, 114 | "no-mixed-spaces-and-tabs": 2, 115 | "no-multiple-empty-lines": [ 116 | 2, 117 | { 118 | "max": 2 119 | } 120 | ], 121 | "no-multi-spaces": 0, 122 | "no-this-before-super": 2, 123 | "no-trailing-spaces": 2, 124 | "no-lonely-if": 2, 125 | "no-unneeded-ternary": 2, 126 | "no-unused-vars": 0, 127 | // 未実装関数でエラー出るので 0 にして無効化・・・ 128 | "no-var": 2, 129 | "no-regex-spaces": 0, 130 | "object-curly-spacing": [ 131 | 0, 132 | "never", 133 | { 134 | "objectsInObjects": false, 135 | "arraysInObjects": false 136 | } 137 | ], 138 | "operator-assignment": [ 139 | 2, 140 | "always" 141 | ], 142 | "prefer-arrow-callback": 2, 143 | "prefer-const": 2, 144 | "prefer-reflect": 0, 145 | "prefer-spread": 2, 146 | "prefer-template": 2, 147 | "react/jsx-no-bind": [ 148 | 2, 149 | { 150 | "ignoreRefs": true 151 | } 152 | ], 153 | "require-yield": 2, 154 | "quotes": [ 155 | 2, 156 | "double" 157 | ], 158 | "semi": [ 159 | 2, 160 | "always" 161 | ], 162 | "strict": 0, 163 | "space-before-blocks": 2, 164 | "space-before-function-paren": [ 165 | 2, 166 | "never" 167 | ], 168 | "space-infix-ops": 2, 169 | "space-unary-ops": 2, 170 | "spaced-comment": [ 171 | 2, 172 | "always" 173 | ], 174 | "valid-jsdoc": [ 175 | 1, 176 | { 177 | "requireReturn": false, 178 | "requireParamDescription": false, 179 | "requireReturnDescription": false 180 | } 181 | ], 182 | // React 183 | "react/no-danger": 0, 184 | "react/forbid-prop-types": 1, 185 | "react/jsx-first-prop-new-line": [ 186 | 1, 187 | "multiline" 188 | ], 189 | "suitcss-classnames/states": 2, 190 | "no-allow-react-context/no-allow-react-context": [2, { 191 | // use React.Context only in container 192 | "except": [ 193 | "**/component/container/**/*.js" 194 | ] 195 | }] 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/pdf_viewer.css: -------------------------------------------------------------------------------- 1 | /* Copyright 2014 Mozilla Foundation 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | .textLayer { 17 | position: absolute; 18 | left: 0; 19 | top: 0; 20 | right: 0; 21 | bottom: 0; 22 | overflow: hidden; 23 | opacity: 0.2; 24 | line-height: 1; 25 | } 26 | 27 | .textLayer > div { 28 | color: transparent; 29 | position: absolute; 30 | white-space: pre; 31 | cursor: text; 32 | -webkit-transform-origin: 0% 0%; 33 | -moz-transform-origin: 0% 0%; 34 | -o-transform-origin: 0% 0%; 35 | -ms-transform-origin: 0% 0%; 36 | transform-origin: 0% 0%; 37 | } 38 | 39 | .textLayer .highlight { 40 | margin: -1px; 41 | padding: 1px; 42 | 43 | background-color: rgb(180, 0, 170); 44 | border-radius: 4px; 45 | } 46 | 47 | .textLayer .highlight.begin { 48 | border-radius: 4px 0px 0px 4px; 49 | } 50 | 51 | .textLayer .highlight.end { 52 | border-radius: 0px 4px 4px 0px; 53 | } 54 | 55 | .textLayer .highlight.middle { 56 | border-radius: 0px; 57 | } 58 | 59 | .textLayer .highlight.selected { 60 | background-color: rgb(0, 100, 0); 61 | } 62 | 63 | .textLayer ::selection { 64 | background: rgb(0, 0, 255); 65 | } 66 | .textLayer ::-moz-selection { 67 | background: rgb(0, 0, 255); 68 | } 69 | 70 | .textLayer .endOfContent { 71 | display: block; 72 | position: absolute; 73 | left: 0px; 74 | top: 100%; 75 | right: 0px; 76 | bottom: 0px; 77 | z-index: -1; 78 | cursor: default; 79 | -webkit-user-select: none; 80 | -ms-user-select: none; 81 | -moz-user-select: none; 82 | } 83 | 84 | .textLayer .endOfContent.active { 85 | top: 0px; 86 | } 87 | 88 | .annotationLayer section { 89 | position: absolute; 90 | } 91 | 92 | .annotationLayer .linkAnnotation > a { 93 | position: absolute; 94 | font-size: 1em; 95 | top: 0; 96 | left: 0; 97 | width: 100%; 98 | height: 100%; 99 | } 100 | 101 | .annotationLayer .linkAnnotation > a /* -ms-a */ { 102 | background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7") 0 0 repeat; 103 | } 104 | 105 | .annotationLayer .linkAnnotation > a:hover { 106 | opacity: 0.2; 107 | background: #ff0; 108 | box-shadow: 0px 2px 10px #ff0; 109 | } 110 | 111 | .annotationLayer .textAnnotation img { 112 | position: absolute; 113 | cursor: pointer; 114 | } 115 | 116 | .annotationLayer .popupWrapper { 117 | position: absolute; 118 | width: 20em; 119 | } 120 | 121 | .annotationLayer .popup { 122 | position: absolute; 123 | z-index: 200; 124 | max-width: 20em; 125 | background-color: #ffff99; 126 | box-shadow: 0px 2px 5px #333; 127 | border-radius: 2px; 128 | padding: 0.6em; 129 | margin-left: 5px; 130 | cursor: pointer; 131 | word-wrap: break-word; 132 | } 133 | 134 | .annotationLayer .popup h1 { 135 | font-size: 1em; 136 | border-bottom: 1px solid #000000; 137 | padding-bottom: 0.2em; 138 | } 139 | 140 | .annotationLayer .popup p { 141 | padding-top: 0.2em; 142 | } 143 | 144 | .annotationLayer .highlightAnnotation, 145 | .annotationLayer .underlineAnnotation, 146 | .annotationLayer .squigglyAnnotation, 147 | .annotationLayer .strikeoutAnnotation, 148 | .annotationLayer .fileAttachmentAnnotation { 149 | cursor: pointer; 150 | } 151 | 152 | .pdfViewer .canvasWrapper { 153 | overflow: hidden; 154 | } 155 | 156 | .pdfViewer .page { 157 | direction: ltr; 158 | width: 816px; 159 | height: 1056px; 160 | margin: 1px auto -8px auto; 161 | position: relative; 162 | overflow: visible; 163 | border: 9px solid transparent; 164 | background-clip: content-box; 165 | border-image: url(images/shadow.png) 9 9 repeat; 166 | background-color: white; 167 | } 168 | 169 | .pdfViewer.removePageBorders .page { 170 | margin: 0px auto 10px auto; 171 | border: none; 172 | } 173 | 174 | .pdfViewer .page canvas { 175 | margin: 0; 176 | display: block; 177 | } 178 | 179 | .pdfViewer .page .loadingIcon { 180 | position: absolute; 181 | display: block; 182 | left: 0; 183 | top: 0; 184 | right: 0; 185 | bottom: 0; 186 | background: url("images/loading-icon.gif") center no-repeat; 187 | } 188 | 189 | .pdfPresentationMode:-webkit-full-screen .pdfViewer .page { 190 | margin-bottom: 100%; 191 | border: 0; 192 | } 193 | 194 | .pdfPresentationMode:-moz-full-screen .pdfViewer .page { 195 | margin-bottom: 100%; 196 | border: 0; 197 | } 198 | 199 | .pdfPresentationMode:-ms-fullscreen .pdfViewer .page { 200 | margin-bottom: 100% !important; 201 | border: 0; 202 | } 203 | 204 | .pdfPresentationMode:fullscreen .pdfViewer .page { 205 | margin-bottom: 100%; 206 | border: 0; 207 | } 208 | -------------------------------------------------------------------------------- /public/resources/pdfjs-dist/web/compatibility.js: -------------------------------------------------------------------------------- 1 | /* Copyright 2012 Mozilla Foundation 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | /* globals VBArray, PDFJS */ 16 | 17 | "use strict"; 18 | 19 | // Initializing PDFJS global object here, it case if we need to change/disable 20 | // some PDF.js features, e.g. range requests 21 | if (typeof PDFJS === "undefined") { 22 | (typeof window !== "undefined" ? window : this).PDFJS = {}; 23 | } 24 | 25 | // Checking if the typed arrays are supported 26 | // Support: iOS<6.0 (subarray), IE<10, Android<4.0 27 | (function checkTypedArrayCompatibility() { 28 | if (typeof Uint8Array !== "undefined") { 29 | // Support: iOS<6.0 30 | if (typeof Uint8Array.prototype.subarray === "undefined") { 31 | Uint8Array.prototype.subarray = function subarray(start, end) { 32 | return new Uint8Array(this.slice(start, end)); 33 | }; 34 | Float32Array.prototype.subarray = function subarray(start, end) { 35 | return new Float32Array(this.slice(start, end)); 36 | }; 37 | } 38 | 39 | // Support: Android<4.1 40 | if (typeof Float64Array === "undefined") { 41 | window.Float64Array = Float32Array; 42 | } 43 | return; 44 | } 45 | 46 | function subarray(start, end) { 47 | return new TypedArray(this.slice(start, end)); 48 | } 49 | 50 | function setArrayOffset(array, offset) { 51 | if (arguments.length < 2) { 52 | offset = 0; 53 | } 54 | for (var i = 0, n = array.length; i < n; ++i, ++offset) { 55 | this[offset] = array[i] & 0xff; 56 | } 57 | } 58 | 59 | function TypedArray(arg1) { 60 | var result, i, n; 61 | if (typeof arg1 === "number") { 62 | result = []; 63 | for (i = 0; i < arg1; ++i) { 64 | result[i] = 0; 65 | } 66 | } else if ("slice" in arg1) { 67 | result = arg1.slice(0); 68 | } else { 69 | result = []; 70 | for (i = 0, n = arg1.length; i < n; ++i) { 71 | result[i] = arg1[i]; 72 | } 73 | } 74 | 75 | result.subarray = subarray; 76 | result.buffer = result; 77 | result.byteLength = result.length; 78 | result.set = setArrayOffset; 79 | 80 | if (typeof arg1 === "object" && arg1.buffer) { 81 | result.buffer = arg1.buffer; 82 | } 83 | return result; 84 | } 85 | 86 | window.Uint8Array = TypedArray; 87 | window.Int8Array = TypedArray; 88 | 89 | // we don't need support for set, byteLength for 32-bit array 90 | // so we can use the TypedArray as well 91 | window.Uint32Array = TypedArray; 92 | window.Int32Array = TypedArray; 93 | window.Uint16Array = TypedArray; 94 | window.Float32Array = TypedArray; 95 | window.Float64Array = TypedArray; 96 | })(); 97 | 98 | // URL = URL || webkitURL 99 | // Support: Safari<7, Android 4.2+ 100 | (function normalizeURLObject() { 101 | if (!window.URL) { 102 | window.URL = window.webkitURL; 103 | } 104 | })(); 105 | 106 | // Object.defineProperty()? 107 | // Support: Android<4.0, Safari<5.1 108 | (function checkObjectDefinePropertyCompatibility() { 109 | if (typeof Object.defineProperty !== "undefined") { 110 | var definePropertyPossible = true; 111 | try { 112 | // some browsers (e.g. safari) cannot use defineProperty() on DOM objects 113 | // and thus the native version is not sufficient 114 | Object.defineProperty(new Image(), "id", { value: "test" }); 115 | // ... another test for android gb browser for non-DOM objects 116 | var Test = function Test() {}; 117 | Test.prototype = { get id() {} }; 118 | Object.defineProperty(new Test(), "id", { 119 | value: "", 120 | configurable: true, 121 | enumerable: true, 122 | writable: false 123 | }); 124 | } catch (e) { 125 | definePropertyPossible = false; 126 | } 127 | if (definePropertyPossible) { 128 | return; 129 | } 130 | } 131 | 132 | Object.defineProperty = function objectDefineProperty(obj, name, def) { 133 | delete obj[name]; 134 | if ("get" in def) { 135 | obj.__defineGetter__(name, def["get"]); 136 | } 137 | if ("set" in def) { 138 | obj.__defineSetter__(name, def["set"]); 139 | } 140 | if ("value" in def) { 141 | obj.__defineSetter__(name, function objectDefinePropertySetter(value) { 142 | this.__defineGetter__(name, function objectDefinePropertyGetter() { 143 | return value; 144 | }); 145 | return value; 146 | }); 147 | obj[name] = def.value; 148 | } 149 | }; 150 | })(); 151 | 152 | // No XMLHttpRequest#response? 153 | // Support: IE<11, Android <4.0 154 | (function checkXMLHttpRequestResponseCompatibility() { 155 | var xhrPrototype = XMLHttpRequest.prototype; 156 | var xhr = new XMLHttpRequest(); 157 | if (!("overrideMimeType" in xhr)) { 158 | // IE10 might have response, but not overrideMimeType 159 | // Support: IE10 160 | Object.defineProperty(xhrPrototype, "overrideMimeType", { 161 | value: function xmlHttpRequestOverrideMimeType(mimeType) {} 162 | }); 163 | } 164 | if ("responseType" in xhr) { 165 | return; 166 | } 167 | 168 | // The worker will be using XHR, so we can save time and disable worker. 169 | PDFJS.disableWorker = true; 170 | 171 | Object.defineProperty(xhrPrototype, "responseType", { 172 | get: function xmlHttpRequestGetResponseType() { 173 | return this._responseType || "text"; 174 | }, 175 | set: function xmlHttpRequestSetResponseType(value) { 176 | if (value === "text" || value === "arraybuffer") { 177 | this._responseType = value; 178 | if (value === "arraybuffer" && typeof this.overrideMimeType === "function") { 179 | this.overrideMimeType("text/plain; charset=x-user-defined"); 180 | } 181 | } 182 | } 183 | }); 184 | 185 | // Support: IE9 186 | if (typeof VBArray !== "undefined") { 187 | Object.defineProperty(xhrPrototype, "response", { 188 | get: function xmlHttpRequestResponseGet() { 189 | if (this.responseType === "arraybuffer") { 190 | return new Uint8Array(new VBArray(this.responseBody).toArray()); 191 | } else { 192 | return this.responseText; 193 | } 194 | } 195 | }); 196 | return; 197 | } 198 | 199 | Object.defineProperty(xhrPrototype, "response", { 200 | get: function xmlHttpRequestResponseGet() { 201 | if (this.responseType !== "arraybuffer") { 202 | return this.responseText; 203 | } 204 | var text = this.responseText; 205 | var i, 206 | n = text.length; 207 | var result = new Uint8Array(n); 208 | for (i = 0; i < n; ++i) { 209 | result[i] = text.charCodeAt(i) & 0xff; 210 | } 211 | return result.buffer; 212 | } 213 | }); 214 | })(); 215 | 216 | // window.btoa (base64 encode function) ? 217 | // Support: IE<10 218 | (function checkWindowBtoaCompatibility() { 219 | if ("btoa" in window) { 220 | return; 221 | } 222 | 223 | var digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; 224 | 225 | window.btoa = function windowBtoa(chars) { 226 | var buffer = ""; 227 | var i, n; 228 | for (i = 0, n = chars.length; i < n; i += 3) { 229 | var b1 = chars.charCodeAt(i) & 0xff; 230 | var b2 = chars.charCodeAt(i + 1) & 0xff; 231 | var b3 = chars.charCodeAt(i + 2) & 0xff; 232 | var d1 = b1 >> 2, 233 | d2 = ((b1 & 3) << 4) | (b2 >> 4); 234 | var d3 = i + 1 < n ? ((b2 & 0xf) << 2) | (b3 >> 6) : 64; 235 | var d4 = i + 2 < n ? b3 & 0x3f : 64; 236 | buffer += digits.charAt(d1) + digits.charAt(d2) + digits.charAt(d3) + digits.charAt(d4); 237 | } 238 | return buffer; 239 | }; 240 | })(); 241 | 242 | // window.atob (base64 encode function)? 243 | // Support: IE<10 244 | (function checkWindowAtobCompatibility() { 245 | if ("atob" in window) { 246 | return; 247 | } 248 | 249 | // https://github.com/davidchambers/Base64.js 250 | var digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; 251 | window.atob = function(input) { 252 | input = input.replace(/=+$/, ""); 253 | if (input.length % 4 === 1) { 254 | throw new Error("bad atob input"); 255 | } 256 | for ( 257 | // initialize result and counters 258 | var bc = 0, bs, buffer, idx = 0, output = ""; 259 | // get next character 260 | (buffer = input.charAt(idx++)); 261 | // character found in table? 262 | // initialize bit storage and add its ascii value 263 | ~buffer && 264 | ((bs = bc % 4 ? bs * 64 + buffer : buffer), 265 | // and if not first of each 4 characters, 266 | // convert the first 8 bits to one ascii character 267 | bc++ % 4) 268 | ? (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6)))) 269 | : 0 270 | ) { 271 | // try to find character in table (0-63, not found => -1) 272 | buffer = digits.indexOf(buffer); 273 | } 274 | return output; 275 | }; 276 | })(); 277 | 278 | // Function.prototype.bind? 279 | // Support: Android<4.0, iOS<6.0 280 | (function checkFunctionPrototypeBindCompatibility() { 281 | if (typeof Function.prototype.bind !== "undefined") { 282 | return; 283 | } 284 | 285 | Function.prototype.bind = function functionPrototypeBind(obj) { 286 | var fn = this, 287 | headArgs = Array.prototype.slice.call(arguments, 1); 288 | var bound = function functionPrototypeBindBound() { 289 | var args = headArgs.concat(Array.prototype.slice.call(arguments)); 290 | return fn.apply(obj, args); 291 | }; 292 | return bound; 293 | }; 294 | })(); 295 | 296 | // HTMLElement dataset property 297 | // Support: IE<11, Safari<5.1, Android<4.0 298 | (function checkDatasetProperty() { 299 | var div = document.createElement("div"); 300 | if ("dataset" in div) { 301 | return; // dataset property exists 302 | } 303 | 304 | Object.defineProperty(HTMLElement.prototype, "dataset", { 305 | get: function() { 306 | if (this._dataset) { 307 | return this._dataset; 308 | } 309 | 310 | var dataset = {}; 311 | for (var j = 0, jj = this.attributes.length; j < jj; j++) { 312 | var attribute = this.attributes[j]; 313 | if (attribute.name.substring(0, 5) !== "data-") { 314 | continue; 315 | } 316 | var key = attribute.name.substring(5).replace(/\-([a-z])/g, function(all, ch) { 317 | return ch.toUpperCase(); 318 | }); 319 | dataset[key] = attribute.value; 320 | } 321 | 322 | Object.defineProperty(this, "_dataset", { 323 | value: dataset, 324 | writable: false, 325 | enumerable: false 326 | }); 327 | return dataset; 328 | }, 329 | enumerable: true 330 | }); 331 | })(); 332 | 333 | // HTMLElement classList property 334 | // Support: IE<10, Android<4.0, iOS<5.0 335 | (function checkClassListProperty() { 336 | var div = document.createElement("div"); 337 | if ("classList" in div) { 338 | return; // classList property exists 339 | } 340 | 341 | function changeList(element, itemName, add, remove) { 342 | var s = element.className || ""; 343 | var list = s.split(/\s+/g); 344 | if (list[0] === "") { 345 | list.shift(); 346 | } 347 | var index = list.indexOf(itemName); 348 | if (index < 0 && add) { 349 | list.push(itemName); 350 | } 351 | if (index >= 0 && remove) { 352 | list.splice(index, 1); 353 | } 354 | element.className = list.join(" "); 355 | return index >= 0; 356 | } 357 | 358 | var classListPrototype = { 359 | add: function(name) { 360 | changeList(this.element, name, true, false); 361 | }, 362 | contains: function(name) { 363 | return changeList(this.element, name, false, false); 364 | }, 365 | remove: function(name) { 366 | changeList(this.element, name, false, true); 367 | }, 368 | toggle: function(name) { 369 | changeList(this.element, name, true, true); 370 | } 371 | }; 372 | 373 | Object.defineProperty(HTMLElement.prototype, "classList", { 374 | get: function() { 375 | if (this._classList) { 376 | return this._classList; 377 | } 378 | 379 | var classList = Object.create(classListPrototype, { 380 | element: { 381 | value: this, 382 | writable: false, 383 | enumerable: true 384 | } 385 | }); 386 | Object.defineProperty(this, "_classList", { 387 | value: classList, 388 | writable: false, 389 | enumerable: false 390 | }); 391 | return classList; 392 | }, 393 | enumerable: true 394 | }); 395 | })(); 396 | 397 | // Check console compatibility 398 | // In older IE versions the console object is not available 399 | // unless console is open. 400 | // Support: IE<10 401 | (function checkConsoleCompatibility() { 402 | if (!("console" in window)) { 403 | window.console = { 404 | log: function() {}, 405 | error: function() {}, 406 | warn: function() {} 407 | }; 408 | } else if (!("bind" in console.log)) { 409 | // native functions in IE9 might not have bind 410 | console.log = (function(fn) { 411 | return function(msg) { 412 | return fn(msg); 413 | }; 414 | })(console.log); 415 | console.error = (function(fn) { 416 | return function(msg) { 417 | return fn(msg); 418 | }; 419 | })(console.error); 420 | console.warn = (function(fn) { 421 | return function(msg) { 422 | return fn(msg); 423 | }; 424 | })(console.warn); 425 | } 426 | })(); 427 | 428 | // Check onclick compatibility in Opera 429 | // Support: Opera<15 430 | (function checkOnClickCompatibility() { 431 | // workaround for reported Opera bug DSK-354448: 432 | // onclick fires on disabled buttons with opaque content 433 | function ignoreIfTargetDisabled(event) { 434 | if (isDisabled(event.target)) { 435 | event.stopPropagation(); 436 | } 437 | } 438 | function isDisabled(node) { 439 | return node.disabled || (node.parentNode && isDisabled(node.parentNode)); 440 | } 441 | if (navigator.userAgent.indexOf("Opera") !== -1) { 442 | // use browser detection since we cannot feature-check this bug 443 | document.addEventListener("click", ignoreIfTargetDisabled, true); 444 | } 445 | })(); 446 | 447 | // Checks if possible to use URL.createObjectURL() 448 | // Support: IE 449 | (function checkOnBlobSupport() { 450 | // sometimes IE loosing the data created with createObjectURL(), see #3977 451 | if (navigator.userAgent.indexOf("Trident") >= 0) { 452 | PDFJS.disableCreateObjectURL = true; 453 | } 454 | })(); 455 | 456 | // Checks if navigator.language is supported 457 | (function checkNavigatorLanguage() { 458 | if ("language" in navigator) { 459 | return; 460 | } 461 | PDFJS.locale = navigator.userLanguage || "en-US"; 462 | })(); 463 | 464 | (function checkRangeRequests() { 465 | // Safari has issues with cached range requests see: 466 | // https://github.com/mozilla/pdf.js/issues/3260 467 | // Last tested with version 6.0.4. 468 | // Support: Safari 6.0+ 469 | var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor") > 0; 470 | 471 | // Older versions of Android (pre 3.0) has issues with range requests, see: 472 | // https://github.com/mozilla/pdf.js/issues/3381. 473 | // Make sure that we only match webkit-based Android browsers, 474 | // since Firefox/Fennec works as expected. 475 | // Support: Android<3.0 476 | var regex = /Android\s[0-2][^\d]/; 477 | var isOldAndroid = regex.test(navigator.userAgent); 478 | 479 | // Range requests are broken in Chrome 39 and 40, https://crbug.com/442318 480 | var isChromeWithRangeBug = /Chrome\/(39|40)\./.test(navigator.userAgent); 481 | 482 | if (isSafari || isOldAndroid || isChromeWithRangeBug) { 483 | PDFJS.disableRange = true; 484 | PDFJS.disableStream = true; 485 | } 486 | })(); 487 | 488 | // Check if the browser supports manipulation of the history. 489 | // Support: IE<10, Android<4.2 490 | (function checkHistoryManipulation() { 491 | // Android 2.x has so buggy pushState support that it was removed in 492 | // Android 3.0 and restored as late as in Android 4.2. 493 | // Support: Android 2.x 494 | if (!history.pushState || navigator.userAgent.indexOf("Android 2.") >= 0) { 495 | PDFJS.disableHistory = true; 496 | } 497 | })(); 498 | 499 | // Support: IE<11, Chrome<21, Android<4.4, Safari<6 500 | (function checkSetPresenceInImageData() { 501 | // IE < 11 will use window.CanvasPixelArray which lacks set function. 502 | if (window.CanvasPixelArray) { 503 | if (typeof window.CanvasPixelArray.prototype.set !== "function") { 504 | window.CanvasPixelArray.prototype.set = function(arr) { 505 | for (var i = 0, ii = this.length; i < ii; i++) { 506 | this[i] = arr[i]; 507 | } 508 | }; 509 | } 510 | } else { 511 | // Old Chrome and Android use an inaccessible CanvasPixelArray prototype. 512 | // Because we cannot feature detect it, we rely on user agent parsing. 513 | var polyfill = false, 514 | versionMatch; 515 | if (navigator.userAgent.indexOf("Chrom") >= 0) { 516 | versionMatch = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); 517 | // Chrome < 21 lacks the set function. 518 | polyfill = versionMatch && parseInt(versionMatch[2]) < 21; 519 | } else if (navigator.userAgent.indexOf("Android") >= 0) { 520 | // Android < 4.4 lacks the set function. 521 | // Android >= 4.4 will contain Chrome in the user agent, 522 | // thus pass the Chrome check above and not reach this block. 523 | polyfill = /Android\s[0-4][^\d]/g.test(navigator.userAgent); 524 | } else if (navigator.userAgent.indexOf("Safari") >= 0) { 525 | versionMatch = navigator.userAgent.match(/Version\/([0-9]+)\.([0-9]+)\.([0-9]+) Safari\//); 526 | // Safari < 6 lacks the set function. 527 | polyfill = versionMatch && parseInt(versionMatch[1]) < 6; 528 | } 529 | 530 | if (polyfill) { 531 | var contextPrototype = window.CanvasRenderingContext2D.prototype; 532 | var createImageData = contextPrototype.createImageData; 533 | contextPrototype.createImageData = function(w, h) { 534 | var imageData = createImageData.call(this, w, h); 535 | imageData.data.set = function(arr) { 536 | for (var i = 0, ii = this.length; i < ii; i++) { 537 | this[i] = arr[i]; 538 | } 539 | }; 540 | return imageData; 541 | }; 542 | // this closure will be kept referenced, so clear its vars 543 | contextPrototype = null; 544 | } 545 | } 546 | })(); 547 | 548 | // Support: IE<10, Android<4.0, iOS 549 | (function checkRequestAnimationFrame() { 550 | function fakeRequestAnimationFrame(callback) { 551 | window.setTimeout(callback, 20); 552 | } 553 | 554 | var isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent); 555 | if (isIOS) { 556 | // requestAnimationFrame on iOS is broken, replacing with fake one. 557 | window.requestAnimationFrame = fakeRequestAnimationFrame; 558 | return; 559 | } 560 | if ("requestAnimationFrame" in window) { 561 | return; 562 | } 563 | window.requestAnimationFrame = 564 | window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || fakeRequestAnimationFrame; 565 | })(); 566 | 567 | (function checkCanvasSizeLimitation() { 568 | var isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent); 569 | var isAndroid = /Android/g.test(navigator.userAgent); 570 | if (isIOS || isAndroid) { 571 | // 5MP 572 | PDFJS.maxCanvasPixels = 5242880; 573 | } 574 | })(); 575 | 576 | // Disable fullscreen support for certain problematic configurations. 577 | // Support: IE11+ (when embedded). 578 | (function checkFullscreenSupport() { 579 | var isEmbeddedIE = navigator.userAgent.indexOf("Trident") >= 0 && window.parent !== window; 580 | if (isEmbeddedIE) { 581 | PDFJS.disableFullscreen = true; 582 | } 583 | })(); 584 | 585 | // Provides document.currentScript support 586 | // Support: IE, Chrome<29. 587 | (function checkCurrentScript() { 588 | if ("currentScript" in document) { 589 | return; 590 | } 591 | Object.defineProperty(document, "currentScript", { 592 | get: function() { 593 | var scripts = document.getElementsByTagName("script"); 594 | return scripts[scripts.length - 1]; 595 | }, 596 | enumerable: true, 597 | configurable: true 598 | }); 599 | })(); 600 | --------------------------------------------------------------------------------