MCPcopy Create free account
hub / github.com/CatMuse/HiNote / setupHiNoteView

Function setupHiNoteView

src/views/hinote/HiNoteViewSetup.ts:12–249  ·  view source on GitHub ↗
(options: HiNoteViewSetupOptions)

Source from the content-addressed store, hash-verified

10import { HiNoteViewSetupOptions, HiNoteViewSetupResult } from "./HiNoteViewSetupTypes";
11
12export 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,

Callers 1

onOpenMethod · 0.90

Calls 15

setupSearchAndSelectionFunction · 0.90
setupFileListFunction · 0.90
setupHighlightRenderingFunction · 0.90
setupLayoutAndCanvasFunction · 0.90
registerHiNoteViewEventsFunction · 0.90
initializeUIMethod · 0.80
handleBackButtonMethod · 0.80
setOnDeviceChangeMethod · 0.80
startWatchingMethod · 0.80
setLoadingIndicatorMethod · 0.80
updateHighlightsMethod · 0.80

Tested by

no test coverage detected