@lvce-editor/rpc-registry 7.2.0 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -35,6 +35,7 @@ declare const dispose$3: () => Promise<void>, invoke$3: (method: string, ...para
35
35
  declare const sendMessagePortToExtensionHostWorker: (port: MessagePort) => Promise<void>;
36
36
  declare const activateByEvent: (event: string) => Promise<void>;
37
37
  declare const applyEdit: (editorUid: number, changes: readonly Change[]) => Promise<void>;
38
+ declare const applyDocumentEdits: (editorUid: number, changes: readonly Change[]) => Promise<void>;
38
39
  declare const applyWorkspaceEdit: (editorUid: number, changes: readonly any[]) => Promise<void>;
39
40
  declare const closeWidget: (editorUid: number, widgetId: number, widgetName: string, focusId: number) => Promise<void>;
40
41
  declare const getWordAt: (uid: number, rowIndex: number, columnIndex: number) => Promise<string>;
@@ -43,6 +44,7 @@ declare const getPositionAtCursor: (parentUid: number) => Promise<PositionAtCurs
43
44
  declare const getOffsetAtCursor: (editorId: number) => Promise<number>;
44
45
  declare const getSelections: (editorUid: number) => Promise<readonly number[]>;
45
46
  declare const getWordAtOffset2: (editorUid: number) => Promise<string>;
47
+ declare const closeFind2: (editorUid: number) => Promise<void>;
46
48
  declare const getWordBefore: (editorUid: number, rowIndex: number, columnIndex: number) => Promise<string>;
47
49
  declare const updateDebugInfo: (info: any) => Promise<void>;
48
50
  declare const getUri: (editorUid: number) => Promise<string>;
@@ -122,6 +124,8 @@ declare const exists$1: (uri: string) => Promise<boolean>;
122
124
  declare const getFolderSize$1: (uri: string) => Promise<number>;
123
125
  declare const readFileAsBlob: (uri: string) => Promise<Blob>;
124
126
  declare const appendFile$1: (uri: string, text: string) => Promise<string>;
127
+ declare const watchFile: (watchId: number, uri: string, rpcId: number) => Promise<void>;
128
+ declare const unwatchFile: (watchId: number) => Promise<void>;
125
129
  declare const registerMockRpc$4: (commandMap: Record<string, any>) => MockRpc;
126
130
  declare const dispose$10: () => Promise<void>, invoke$10: (method: string, ...params: readonly unknown[]) => Promise<any>, invokeAndTransfer$10: (method: string, ...params: readonly unknown[]) => Promise<any>, set$10: (rpc: import("@lvce-editor/rpc").Rpc) => void;
127
131
  declare const getIcons: (iconRequests: readonly any[]) => Promise<readonly any[]>;
@@ -282,7 +286,7 @@ declare namespace DebugWorker {
282
286
  export { dispose$2 as dispose, invoke$2 as invoke, invokeAndTransfer$2 as invokeAndTransfer, set$2 as set };
283
287
  }
284
288
  declare namespace EditorWorker {
285
- export { activateByEvent, applyEdit, applyWorkspaceEdit, closeWidget, dispose$3 as dispose, getLanguageId, getLines, getOffsetAtCursor, getPositionAtCursor, getProblems, getSelections, getUri, getWordAt, getWordAtOffset2, getWordBefore, invoke$3 as invoke, invokeAndTransfer$3 as invokeAndTransfer, registerMockRpc, sendMessagePortToExtensionHostWorker, set$3 as set, updateDebugInfo };
289
+ export { activateByEvent, applyDocumentEdits, applyEdit, applyWorkspaceEdit, closeFind2, closeWidget, dispose$3 as dispose, getLanguageId, getLines, getOffsetAtCursor, getPositionAtCursor, getProblems, getSelections, getUri, getWordAt, getWordAtOffset2, getWordBefore, invoke$3 as invoke, invokeAndTransfer$3 as invokeAndTransfer, registerMockRpc, sendMessagePortToExtensionHostWorker, set$3 as set, updateDebugInfo };
286
290
  }
287
291
  declare namespace EmbedsProcess {
288
292
  export { backward, copyImageAt, createWebContentsView, dispose$4 as dispose, disposeWebContentsView, focus, forward, getDomTree, hide, insertCss, insertJavaScript, inspectElement, invoke$4 as invoke, invokeAndTransfer$4 as invokeAndTransfer, openDevtools, reload, resizeWebContentsView, set$4 as set, setIframeSrcFallback, show };
@@ -300,7 +304,7 @@ declare namespace FileSystemProcess {
300
304
  export { appendFile, copy, dispose$8 as dispose, exists, getFolderSize, getPathSeparator, getRealPath, invoke$8 as invoke, invokeAndTransfer$8 as invokeAndTransfer, mkdir, readDirWithFileTypes, readFile, readJson, registerMockRpc$3 as registerMockRpc, remove, rename, set$8 as set, stat, writeFile };
301
305
  }
302
306
  declare namespace FileSystemWorker {
303
- export { appendFile$1 as appendFile, copy$1 as copy, createFile, dispose$9 as dispose, exists$1 as exists, getFolderSize$1 as getFolderSize, getPathSeparator$1 as getPathSeparator, getRealPath$1 as getRealPath, invoke$9 as invoke, invokeAndTransfer$9 as invokeAndTransfer, mkdir$1 as mkdir, readDirWithFileTypes$1 as readDirWithFileTypes, readFile$1 as readFile, readFileAsBlob, registerMockRpc$4 as registerMockRpc, remove$1 as remove, rename$1 as rename, set$9 as set, stat$1 as stat, writeFile$1 as writeFile };
307
+ export { appendFile$1 as appendFile, copy$1 as copy, createFile, dispose$9 as dispose, exists$1 as exists, getFolderSize$1 as getFolderSize, getPathSeparator$1 as getPathSeparator, getRealPath$1 as getRealPath, invoke$9 as invoke, invokeAndTransfer$9 as invokeAndTransfer, mkdir$1 as mkdir, readDirWithFileTypes$1 as readDirWithFileTypes, readFile$1 as readFile, readFileAsBlob, registerMockRpc$4 as registerMockRpc, remove$1 as remove, rename$1 as rename, set$9 as set, stat$1 as stat, unwatchFile, watchFile, writeFile$1 as writeFile };
304
308
  }
305
309
  declare namespace IconThemeWorker {
306
310
  export { dispose$10 as dispose, getIcons, invoke$10 as invoke, invokeAndTransfer$10 as invokeAndTransfer, registerMockRpc$5 as registerMockRpc, set$10 as set };
@@ -17,6 +17,10 @@ export const applyEdit = async (editorUid, changes) => {
17
17
  // @ts-ignore
18
18
  await invoke('Editor.applyEdit2', editorUid, changes);
19
19
  };
20
+ export const applyDocumentEdits = async (editorUid, changes) => {
21
+ // @ts-ignore
22
+ await invoke('Editor.applyDocumentEdits', editorUid, changes);
23
+ };
20
24
  export const applyWorkspaceEdit = async (editorUid, changes) => {
21
25
  // @ts-ignore
22
26
  await invoke('Editor.applyWorkspaceEdit', editorUid, changes);
@@ -49,6 +53,9 @@ export const getSelections = async (editorUid) => {
49
53
  export const getWordAtOffset2 = async (editorUid) => {
50
54
  return invoke('Editor.getWordAtOffset2', editorUid);
51
55
  };
56
+ export const closeFind2 = async (editorUid) => {
57
+ return invoke('Editor.closeFind2', editorUid);
58
+ };
52
59
  export const getWordBefore = async (editorUid, rowIndex, columnIndex) => {
53
60
  return invoke('Editor.getWordBefore2', editorUid, rowIndex, columnIndex);
54
61
  };
@@ -9,7 +9,6 @@ export const readDirWithFileTypes = async (uri) => {
9
9
  return invoke('FileSystem.readDirWithFileTypes', uri);
10
10
  };
11
11
  export const getPathSeparator = async (root) => {
12
- // @ts-ignore
13
12
  return invoke('FileSystem.getPathSeparator', root);
14
13
  };
15
14
  export const getRealPath = async (path) => {
@@ -37,21 +36,23 @@ export const copy = async (oldUri, newUri) => {
37
36
  return invoke('FileSystem.copy', oldUri, newUri);
38
37
  };
39
38
  export const exists = async (uri) => {
40
- // @ts-ignore
41
39
  return invoke('FileSystem.exists', uri);
42
40
  };
43
41
  export const getFolderSize = async (uri) => {
44
- // @ts-ignore
45
42
  return invoke('FileSystem.getFolderSize', uri);
46
43
  };
47
44
  export const readFileAsBlob = async (uri) => {
48
- // @ts-ignore
49
45
  return invoke('FileSystem.readFileAsBlob', uri);
50
46
  };
51
47
  export const appendFile = async (uri, text) => {
52
- // @ts-ignore
53
48
  return invoke('FileSystem.appendFile', uri, text);
54
49
  };
50
+ export const watchFile = async (watchId, uri, rpcId) => {
51
+ await invoke('FileSystem.watchFile', watchId, uri, rpcId);
52
+ };
53
+ export const unwatchFile = async (watchId) => {
54
+ await invoke('FileSystem.unwatchFile', watchId);
55
+ };
55
56
  export const registerMockRpc = (commandMap) => {
56
57
  const mockRpc = createMockRpc({ commandMap });
57
58
  set(mockRpc);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/rpc-registry",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "description": "Rpc Registry",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  "main": "dist/index.js",
14
14
  "dependencies": {
15
15
  "@lvce-editor/assert": "^1.5.1",
16
- "@lvce-editor/constants": "^2.7.0",
16
+ "@lvce-editor/constants": "^2.8.0",
17
17
  "@lvce-editor/rpc": "^5.2.0"
18
18
  },
19
19
  "types": "dist/index.d.ts"