Extracted syscall packages
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { PageMeta } from "../types";
|
||||
import { FilterList, Option } from "./filter";
|
||||
import { faFileLines } from "@fortawesome/free-solid-svg-icons";
|
||||
import { PageMeta } from "../../common/types";
|
||||
|
||||
export function PageNavigator({
|
||||
allPages,
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
import { PageMeta } from "./types";
|
||||
import { EventEmitter } from "../common/event";
|
||||
import { Manifest } from "../common/manifest";
|
||||
import { safeRun } from "./util";
|
||||
import { Plug } from "../plugos/plug";
|
||||
import { PageMeta } from "../common/types";
|
||||
|
||||
export type SpaceEvents = {
|
||||
pageCreated: (meta: PageMeta) => void;
|
||||
|
||||
@@ -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,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[]> => {
|
||||
|
||||
+1
-8
@@ -1,12 +1,5 @@
|
||||
import { AppCommand } from "./hooks/command";
|
||||
|
||||
export type PageMeta = {
|
||||
name: string;
|
||||
lastModified: number;
|
||||
version?: number;
|
||||
lastOpened?: number;
|
||||
created?: boolean;
|
||||
};
|
||||
import { PageMeta } from "../common/types";
|
||||
|
||||
export const slashCommandRegexp = /\/[\w\-]*/;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user