(options: HiNoteViewSetupOptions)
| 10 | import { HiNoteViewSetupOptions, HiNoteViewSetupResult } from "./HiNoteViewSetupTypes"; |
| 11 | |
| 12 | export async function setupHiNoteView(options: HiNoteViewSetupOptions): Promise<HiNoteViewSetupResult> { |
| 13 | const { |
| 14 | app, |
| 15 | component, |
| 16 | leaf, |
| 17 | containerEl, |
| 18 | state, |
| 19 | plugin, |
| 20 | highlightManager, |
| 21 | highlightRepository, |
| 22 | highlightService, |
| 23 | licenseManager, |
| 24 | exportService, |
| 25 | canvasService, |
| 26 | deviceManager, |
| 27 | uiInitializer, |
| 28 | eventCoordinator, |
| 29 | exportManager, |
| 30 | virtualHighlightManager, |
| 31 | flashcardViewManager, |
| 32 | canvasUpdateDelay, |
| 33 | jumpToHighlight, |
| 34 | checkViewPosition, |
| 35 | updateViewLayout |
| 36 | } = options; |
| 37 | const container = containerEl.children[1] as HTMLElement; |
| 38 | |
| 39 | let searchUIManager: SearchUIManager | null = null; |
| 40 | let selectionManager: SelectionManager | null = null; |
| 41 | let fileListManager: FileListManager; |
| 42 | let highlightRenderManager: HighlightRenderManager | null = null; |
| 43 | let highlightListController: HighlightListController; |
| 44 | let infiniteScrollManager: InfiniteScrollManager | null = null; |
| 45 | let highlightRendering: ReturnType<typeof setupHighlightRendering> | null = null; |
| 46 | let layoutAndCanvas: ReturnType<typeof setupLayoutAndCanvas> | null = null; |
| 47 | |
| 48 | const uiElements = uiInitializer.initializeUI(container); |
| 49 | const { |
| 50 | fileListContainer, |
| 51 | mainContentContainer, |
| 52 | searchContainer, |
| 53 | searchInput, |
| 54 | searchLoadingIndicator, |
| 55 | highlightContainer, |
| 56 | loadingIndicator |
| 57 | } = uiElements; |
| 58 | |
| 59 | const highlightDataService = new HighlightDataService( |
| 60 | app, |
| 61 | highlightService, |
| 62 | highlightRepository |
| 63 | ); |
| 64 | |
| 65 | highlightListController = new HighlightListController({ |
| 66 | app, |
| 67 | state, |
| 68 | highlightContainer, |
| 69 | loadingIndicator, |
no test coverage detected