Revert "Revert "port tab manager to ts""

This reverts commit 3855f0e75f.
This commit is contained in:
Jin
2025-03-03 22:46:40 +01:00
parent 96e2cc29e0
commit 469c2c3ce9
9 changed files with 228 additions and 154 deletions

View File

@@ -22,7 +22,6 @@ import type LoadResults from "../services/load_results.js";
import type { Attribute } from "../services/attribute_parser.js";
import type NoteTreeWidget from "../widgets/note_tree.js";
import type { default as NoteContext, GetTextEditorCallback } from "./note_context.js";
import type { ContextMenuEvent } from "../menus/context_menu.js";
import type TypeWidget from "../widgets/type_widgets/type_widget.js";
import type EditableTextTypeWidget from "../widgets/type_widgets/editable_text.js";
import type FAttribute from "../entities/fattribute.js";
@@ -58,8 +57,8 @@ export interface ContextMenuCommandData extends CommandData {
}
export interface NoteCommandData extends CommandData {
notePath?: string;
hoistedNoteId?: string;
notePath?: string | null;
hoistedNoteId?: string | null;
viewScope?: ViewScope;
}
@@ -328,7 +327,7 @@ type EventMappings = {
ntxId: string | null;
};
contextsReopenedEvent: {
mainNtxId: string;
mainNtxId: string | null;
tabPosition: number;
};
noteDetailRefreshed: {
@@ -342,7 +341,7 @@ type EventMappings = {
newNoteContextCreated: {
noteContext: NoteContext;
};
noteContextRemovedEvent: {
noteContextRemoved: {
ntxIds: string[];
};
exportSvg: {
@@ -368,7 +367,6 @@ type EventMappings = {
textTypeWidget: EditableTextTypeWidget;
text: string;
};
};
export type EventListener<T extends EventNames> = {