Extracted syscall packages

This commit is contained in:
Zef Hemel
2022-04-01 17:07:08 +02:00
parent 7f647758c2
commit 3aafa63073
34 changed files with 411 additions and 124 deletions
+3
View File
@@ -36,6 +36,9 @@ export default (editor: Editor): SysCallMapping => ({
getCursor: (): number => {
return editor.editorView!.state.selection.main.from;
},
save: async () => {
return editor.save(true);
},
navigate: async (ctx, name: string, pos: number) => {
await editor.navigate(name, pos);
},
+1 -1
View File
@@ -1,6 +1,6 @@
import { Editor } from "../editor";
import { PageMeta } from "../types";
import { SysCallMapping } from "../../plugos/system";
import { PageMeta } from "../../common/types";
export default (editor: Editor): SysCallMapping => ({
listPages: async (): Promise<PageMeta[]> => {