Editor refact: rename Editor to Client
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Editor } from "../editor.ts";
|
||||
import { Client } from "../client.ts";
|
||||
import {
|
||||
EditorView,
|
||||
foldAll,
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
import { SysCallMapping } from "../../plugos/system.ts";
|
||||
import type { FilterOption } from "../types.ts";
|
||||
|
||||
export function editorSyscalls(editor: Editor): SysCallMapping {
|
||||
export function editorSyscalls(editor: Client): SysCallMapping {
|
||||
const syscalls: SysCallMapping = {
|
||||
"editor.getCurrentPage": (): string => {
|
||||
return editor.currentPage!;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Editor } from "../editor.ts";
|
||||
import { Client } from "../client.ts";
|
||||
import { SysCallMapping } from "../../plugos/system.ts";
|
||||
import { AttachmentMeta, PageMeta } from "../types.ts";
|
||||
|
||||
export function spaceSyscalls(editor: Editor): SysCallMapping {
|
||||
export function spaceSyscalls(editor: Client): SysCallMapping {
|
||||
return {
|
||||
"space.listPages": (): Promise<PageMeta[]> => {
|
||||
return editor.space.fetchPageList();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { SysCallMapping } from "../../plugos/system.ts";
|
||||
import type { Editor } from "../editor.ts";
|
||||
import type { Client } from "../client.ts";
|
||||
|
||||
export function syncSyscalls(editor: Editor): SysCallMapping {
|
||||
export function syncSyscalls(editor: Client): SysCallMapping {
|
||||
return {
|
||||
"sync.isSyncing": (): Promise<boolean> => {
|
||||
return editor.syncService.isSyncing();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { Plug } from "../../plugos/plug.ts";
|
||||
import { SysCallMapping, System } from "../../plugos/system.ts";
|
||||
import type { Editor } from "../editor.ts";
|
||||
import type { Client } from "../client.ts";
|
||||
import { CommandDef } from "../hooks/command.ts";
|
||||
|
||||
export function systemSyscalls(
|
||||
editor: Editor,
|
||||
editor: Client,
|
||||
system: System<any>,
|
||||
): SysCallMapping {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user