Merge branch 'develop' into port_dialogs

This commit is contained in:
JYC333
2025-03-05 13:09:00 +01:00
committed by GitHub
19 changed files with 1220 additions and 250 deletions

View File

@@ -22,6 +22,7 @@ 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";
@@ -56,8 +57,8 @@ export interface ContextMenuCommandData extends CommandData {
}
export interface NoteCommandData extends CommandData {
notePath?: string | null;
hoistedNoteId?: string | null;
notePath?: string;
hoistedNoteId?: string;
viewScope?: ViewScope;
}
@@ -172,9 +173,9 @@ export type CommandMappings = {
callback: (value: NoteDetailWidget | PromiseLike<NoteDetailWidget>) => void;
};
executeWithTextEditor: CommandData &
ExecuteCommandData<TextEditor> & {
callback?: GetTextEditorCallback;
};
ExecuteCommandData<TextEditor> & {
callback?: GetTextEditorCallback;
};
executeWithCodeEditor: CommandData & ExecuteCommandData<null>;
/**
* Called upon when attempting to retrieve the content element of a {@link NoteContext}.
@@ -326,7 +327,7 @@ type EventMappings = {
ntxId: string | null;
};
contextsReopenedEvent: {
mainNtxId: string | null;
mainNtxId: string;
tabPosition: number;
};
noteDetailRefreshed: {
@@ -340,7 +341,7 @@ type EventMappings = {
newNoteContextCreated: {
noteContext: NoteContext;
};
noteContextRemoved: {
noteContextRemovedEvent: {
ntxIds: string[];
};
exportSvg: {
@@ -366,6 +367,7 @@ type EventMappings = {
textTypeWidget: EditableTextTypeWidget;
text: string;
};
};
export type EventListener<T extends EventNames> = {