Release RuneStone 0.1.4 with installable plugins and settings
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import type { Token } from "markdown-it";
|
||||
import type { Dispose } from "./sdk.ts";
|
||||
|
||||
export type TerminalAction = "toggle" | "new" | "window" | "split" | "previous" | "next" | "commands" | "directories";
|
||||
export interface TerminalProps {
|
||||
cwd: string; visible: boolean; maximized?: boolean; standalone?: boolean;
|
||||
onClose: () => void; onMaximize?: () => void; activeFile?: boolean;
|
||||
onRunFile?: () => Promise<string | null>; getSelection?: () => string; onConfigureTasks?: () => Promise<void>;
|
||||
}
|
||||
export interface TerminalMount {
|
||||
update(props: TerminalProps): void;
|
||||
command(action: Exclude<TerminalAction, "toggle">): void | Promise<void>;
|
||||
dispose: Dispose;
|
||||
}
|
||||
export type FormulaErrorCode = "#ERROR!" | "#REF!" | "#VALUE!" | "#NAME?" | "#DIV/0!" | "#CYCLE!" | "#NUM!" | "#LIMIT!";
|
||||
export type FormulaResult = { formula: string; text: string; value?: number; error?: FormulaErrorCode };
|
||||
export interface Contributions {
|
||||
terminal: {
|
||||
mount(container: HTMLElement, props: TerminalProps): TerminalMount;
|
||||
shortcut(event: Pick<KeyboardEvent, "ctrlKey" | "metaKey" | "altKey" | "shiftKey" | "code" | "key">): TerminalAction | null;
|
||||
};
|
||||
tableFormulas: {
|
||||
formulaErrors: Record<FormulaErrorCode, string>;
|
||||
isTableFormula(text: string): boolean;
|
||||
cellAddress(row: number, column: number): string;
|
||||
evaluateTableFormulas(rows: string[][]): (FormulaResult | null)[][];
|
||||
tableFormulaHtml(result: FormulaResult): string;
|
||||
renderTableFormulas(tokens: Token[]): void;
|
||||
createFormulaTools(finish: () => void, measure: () => void): { formulaTools: HTMLDivElement; formulaStatus: HTMLSpanElement; formulaHint: HTMLDivElement };
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user