@lvce-editor/rpc-registry 9.0.0 → 9.1.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/parts/DebugWorker/DebugWorker.d.ts +6 -0
- package/dist/parts/DebugWorker/DebugWorker.js +3 -0
- package/dist/parts/EditorWorker/EditorWorker.d.ts +1 -0
- package/dist/parts/EditorWorker/EditorWorker.js +3 -0
- package/dist/parts/RendererWorker/RendererWorker.d.ts +12 -0
- package/dist/parts/RendererWorker/RendererWorker.js +36 -0
- package/dist/parts/SyntaxHighlightingWorker/SyntaxHighlightingWorker.d.ts +3 -0
- package/dist/parts/SyntaxHighlightingWorker/SyntaxHighlightingWorker.js +9 -0
- package/dist/parts/TextMeasurementWorker/TextMeasurementWorker.d.ts +1 -0
- package/dist/parts/TextMeasurementWorker/TextMeasurementWorker.js +3 -0
- package/package.json +2 -1
|
@@ -1 +1,7 @@
|
|
|
1
1
|
export declare const dispose: () => Promise<void>, invoke: (method: string, ...params: readonly unknown[]) => Promise<any>, invokeAndTransfer: (method: string, ...params: readonly unknown[]) => Promise<any>, set: (rpc: import("@lvce-editor/rpc").Rpc) => void;
|
|
2
|
+
export interface DebugHighlight {
|
|
3
|
+
readonly columnIndex: number;
|
|
4
|
+
readonly rowIndex: number;
|
|
5
|
+
readonly uri: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const getDebugHighlights: (debugId: number) => Promise<readonly DebugHighlight[]>;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { RpcId } from '@lvce-editor/constants';
|
|
2
2
|
import * as RpcFactory from "../RpcFactory/RpcFactory.js";
|
|
3
3
|
export const { dispose, invoke, invokeAndTransfer, set } = RpcFactory.create(RpcId.DebugWorker);
|
|
4
|
+
export const getDebugHighlights = async (debugId) => {
|
|
5
|
+
return invoke('RunAndDebug.getHighlight', debugId);
|
|
6
|
+
};
|
|
@@ -13,6 +13,7 @@ export declare const getPositionAtCursor: (parentUid: number) => Promise<Positio
|
|
|
13
13
|
export declare const getOffsetAtCursor: (editorId: number) => Promise<number>;
|
|
14
14
|
export declare const getSelections: (editorUid: number) => Promise<readonly number[]>;
|
|
15
15
|
export declare const getWordAtOffset2: (editorUid: number) => Promise<string>;
|
|
16
|
+
export declare const rerenderEditor: () => Promise<void>;
|
|
16
17
|
export declare const closeFind2: (editorUid: number) => Promise<void>;
|
|
17
18
|
export declare const getWordBefore: (editorUid: number, rowIndex: number, columnIndex: number) => Promise<string>;
|
|
18
19
|
export declare const updateDebugInfo: (info: any) => Promise<void>;
|
|
@@ -52,6 +52,9 @@ export const getSelections = async (editorUid) => {
|
|
|
52
52
|
export const getWordAtOffset2 = async (editorUid) => {
|
|
53
53
|
return invoke('Editor.getWordAtOffset2', editorUid);
|
|
54
54
|
};
|
|
55
|
+
export const rerenderEditor = async () => {
|
|
56
|
+
return invoke('Editor.rerender');
|
|
57
|
+
};
|
|
55
58
|
export const closeFind2 = async (editorUid) => {
|
|
56
59
|
return invoke('Editor.closeFind2', editorUid);
|
|
57
60
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const dispose: () => Promise<void>, invoke: (method: string, ...params: readonly unknown[]) => Promise<any>, invokeAndTransfer: (method: string, ...params: readonly unknown[]) => Promise<any>, registerMockRpc: (commandMap: Record<string, any>) => import("../DisposableMockRpc/DisposableMockRpc.ts").DisposableMockRpc, set: (rpc: import("@lvce-editor/rpc").Rpc) => void;
|
|
2
2
|
export declare const searchFileHtml: (uri: string) => Promise<readonly string[]>;
|
|
3
3
|
export declare const getFilePathElectron: (file: File) => Promise<string>;
|
|
4
|
+
export declare const handleModifiedStatusChange: (uri: string, modified: boolean) => Promise<void>;
|
|
4
5
|
/**
|
|
5
6
|
* @deprecated
|
|
6
7
|
*/
|
|
@@ -33,17 +34,27 @@ export declare const getFileIcon: (options: any) => Promise<string>;
|
|
|
33
34
|
export declare const getColorThemeNames: () => Promise<readonly string[]>;
|
|
34
35
|
export declare const disableExtension: (id: string) => Promise<Error | undefined>;
|
|
35
36
|
export declare const enableExtension: (id: string) => Promise<Error | undefined>;
|
|
37
|
+
export declare const disposeEditor: (uid: number) => Promise<void>;
|
|
36
38
|
export declare const handleDebugChange: (params: any) => Promise<void>;
|
|
37
39
|
export declare const getFolderIcon: (options: any) => Promise<string>;
|
|
38
40
|
export declare const handleWorkspaceRefresh: () => Promise<void>;
|
|
39
41
|
export declare const closeWidget: (widgetId: string | number) => Promise<void>;
|
|
42
|
+
export declare const createViewlet: (viewletModuleId: string, editorUid: number, tabId: number, bounds: any, uri: string) => Promise<void>;
|
|
40
43
|
export declare const sendMessagePortToExtensionHostWorker: (port: MessagePort, rpcId?: number) => Promise<void>;
|
|
44
|
+
export declare const getViewletModuleId: (uri: string) => Promise<string>;
|
|
45
|
+
export declare const showPanel: () => Promise<void>;
|
|
46
|
+
export declare const showPreview: () => Promise<void>;
|
|
47
|
+
export declare const saveEditor: () => Promise<void>;
|
|
48
|
+
export declare const togglePanelView: (id: string) => Promise<void>;
|
|
49
|
+
export declare const resizeViewlet: (uid: number, dimensions: any) => Promise<readonly any[]>;
|
|
41
50
|
export declare const sendMessagePortToFileSearchWorker: (port: MessagePort, rpcId?: number) => Promise<void>;
|
|
42
51
|
export declare const sendMessagePortToSearchProcess: (port: MessagePort) => Promise<void>;
|
|
43
52
|
export declare const confirm: (message: string, options?: any) => Promise<boolean>;
|
|
44
53
|
export declare const getRecentlyOpened: () => Promise<readonly string[]>;
|
|
45
54
|
export declare const getKeyBindings: () => Promise<readonly any[]>;
|
|
46
55
|
export declare const writeClipBoardText: (text: string) => Promise<void>;
|
|
56
|
+
export declare const writeFile: (uri: string, text: string) => Promise<void>;
|
|
57
|
+
export declare const handleUriChange: (uri: string, newUri: string) => Promise<void>;
|
|
47
58
|
export declare const readClipBoardText: () => Promise<string>;
|
|
48
59
|
export declare const writeClipBoardImage: (blob: any) => Promise<void>;
|
|
49
60
|
export declare const searchFileMemory: (uri: string) => Promise<void>;
|
|
@@ -84,6 +95,7 @@ export declare const installExtension: (id: string) => Promise<void>;
|
|
|
84
95
|
export declare const minimizeWindow: () => Promise<void>;
|
|
85
96
|
export declare const unmaximizeWindow: () => Promise<void>;
|
|
86
97
|
export declare const maximizeWindow: () => Promise<void>;
|
|
98
|
+
export declare const showSideBar: (id: string, focus: boolean) => Promise<void>;
|
|
87
99
|
export declare const closeWindow: () => Promise<void>;
|
|
88
100
|
export declare const openExtensionSearch: () => Promise<void>;
|
|
89
101
|
export declare const setExtensionsSearchValue: (searchValue: string) => Promise<void>;
|
|
@@ -8,6 +8,9 @@ export const searchFileHtml = async (uri) => {
|
|
|
8
8
|
export const getFilePathElectron = async (file) => {
|
|
9
9
|
return invoke('FileSystemHandle.getFilePathElectron', file);
|
|
10
10
|
};
|
|
11
|
+
export const handleModifiedStatusChange = async (uri, modified) => {
|
|
12
|
+
return invoke('Main.handleModifiedStatusChange', uri, modified);
|
|
13
|
+
};
|
|
11
14
|
/**
|
|
12
15
|
* @deprecated
|
|
13
16
|
*/
|
|
@@ -111,6 +114,9 @@ export const disableExtension = async (id) => {
|
|
|
111
114
|
export const enableExtension = async (id) => {
|
|
112
115
|
return invoke('ExtensionManagement.enable', id);
|
|
113
116
|
};
|
|
117
|
+
export const disposeEditor = async (uid) => {
|
|
118
|
+
return invoke('Viewlet.dispose', uid);
|
|
119
|
+
};
|
|
114
120
|
export const handleDebugChange = async (params) => {
|
|
115
121
|
return invoke('Run And Debug.handleChange', params);
|
|
116
122
|
};
|
|
@@ -123,10 +129,31 @@ export const handleWorkspaceRefresh = async () => {
|
|
|
123
129
|
export const closeWidget = async (widgetId) => {
|
|
124
130
|
return invoke('Viewlet.closeWidget', widgetId);
|
|
125
131
|
};
|
|
132
|
+
export const createViewlet = async (viewletModuleId, editorUid, tabId, bounds, uri) => {
|
|
133
|
+
return invoke('Layout.createViewlet', viewletModuleId, editorUid, tabId, bounds, uri);
|
|
134
|
+
};
|
|
126
135
|
export const sendMessagePortToExtensionHostWorker = async (port, rpcId = 0) => {
|
|
127
136
|
const command = 'HandleMessagePort.handleMessagePort2';
|
|
128
137
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
|
|
129
138
|
};
|
|
139
|
+
export const getViewletModuleId = async (uri) => {
|
|
140
|
+
return invoke('Layout.getModuleId', uri);
|
|
141
|
+
};
|
|
142
|
+
export const showPanel = async () => {
|
|
143
|
+
return invoke('Layout.showPanel');
|
|
144
|
+
};
|
|
145
|
+
export const showPreview = async () => {
|
|
146
|
+
return invoke('Layout.showPreview');
|
|
147
|
+
};
|
|
148
|
+
export const saveEditor = async () => {
|
|
149
|
+
return invoke('Editor.save');
|
|
150
|
+
};
|
|
151
|
+
export const togglePanelView = async (id) => {
|
|
152
|
+
return invoke('Panel.toggleView', id);
|
|
153
|
+
};
|
|
154
|
+
export const resizeViewlet = async (uid, dimensions) => {
|
|
155
|
+
return invoke('Viewlet.resize', uid, dimensions);
|
|
156
|
+
};
|
|
130
157
|
export const sendMessagePortToFileSearchWorker = async (port, rpcId = 0) => {
|
|
131
158
|
const command = 'QuickPick.handleMessagePort';
|
|
132
159
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSearchWorker', port, command, rpcId);
|
|
@@ -147,6 +174,12 @@ export const getKeyBindings = async () => {
|
|
|
147
174
|
export const writeClipBoardText = async (text) => {
|
|
148
175
|
await invoke('ClipBoard.writeText', /* text */ text);
|
|
149
176
|
};
|
|
177
|
+
export const writeFile = async (uri, text) => {
|
|
178
|
+
await invoke('FileSystem.writeFile', uri, text);
|
|
179
|
+
};
|
|
180
|
+
export const handleUriChange = async (uri, newUri) => {
|
|
181
|
+
await invoke('Main.handleUriChange', uri, newUri);
|
|
182
|
+
};
|
|
150
183
|
export const readClipBoardText = async () => {
|
|
151
184
|
return invoke('ClipBoard.readText');
|
|
152
185
|
};
|
|
@@ -275,6 +308,9 @@ export const unmaximizeWindow = async () => {
|
|
|
275
308
|
export const maximizeWindow = async () => {
|
|
276
309
|
return invoke('ElectronWindow.maximize');
|
|
277
310
|
};
|
|
311
|
+
export const showSideBar = async (id, focus) => {
|
|
312
|
+
return invoke('SideBar.show', id, focus);
|
|
313
|
+
};
|
|
278
314
|
export const closeWindow = async () => {
|
|
279
315
|
return invoke('ElectronWindow.close');
|
|
280
316
|
};
|
|
@@ -1 +1,4 @@
|
|
|
1
1
|
export declare const dispose: () => Promise<void>, invoke: (method: string, ...params: readonly unknown[]) => Promise<any>, invokeAndTransfer: (method: string, ...params: readonly unknown[]) => Promise<any>, set: (rpc: import("@lvce-editor/rpc").Rpc) => void;
|
|
2
|
+
export declare const tokenizeIncremental: (uid: number, languageId: string, oldLine: string, newLine: string, rowIndex: number, minLineY: number) => Promise<readonly any[]>;
|
|
3
|
+
export declare const getTokensViewPort: (slimEditor: any, startLineIndex: number, endLineIndex: number, hasLinesToSend: boolean, id: any, linesToSend: any) => Promise<readonly any[]>;
|
|
4
|
+
export declare const loadTokenizer: (languageId: string, tokenizerPath: string) => Promise<any>;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { RpcId } from '@lvce-editor/constants';
|
|
2
2
|
import * as RpcFactory from "../RpcFactory/RpcFactory.js";
|
|
3
3
|
export const { dispose, invoke, invokeAndTransfer, set } = RpcFactory.create(RpcId.MarkdownWorker);
|
|
4
|
+
export const tokenizeIncremental = (uid, languageId, oldLine, newLine, rowIndex, minLineY) => {
|
|
5
|
+
return invoke('TokenizeIncremental.tokenizeIncremental', uid, languageId, oldLine, newLine, rowIndex, minLineY);
|
|
6
|
+
};
|
|
7
|
+
export const getTokensViewPort = (slimEditor, startLineIndex, endLineIndex, hasLinesToSend, id, linesToSend) => {
|
|
8
|
+
return invoke('GetTokensViewport.getTokensViewport', slimEditor, startLineIndex, endLineIndex, hasLinesToSend, id, linesToSend);
|
|
9
|
+
};
|
|
10
|
+
export const loadTokenizer = (languageId, tokenizerPath) => {
|
|
11
|
+
return invoke('Tokenizer.load', languageId, tokenizerPath);
|
|
12
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const dispose: () => Promise<void>, invoke: (method: string, ...params: readonly unknown[]) => Promise<any>, invokeAndTransfer: (method: string, ...params: readonly unknown[]) => Promise<any>, registerMockRpc: (commandMap: Record<string, any>) => import("../DisposableMockRpc/DisposableMockRpc.ts").DisposableMockRpc, set: (rpc: import("@lvce-editor/rpc").Rpc) => void;
|
|
2
2
|
export declare const measureTextWidth: (text: string, fontWeight: number, fontSize: number, fontFamily: string, letterSpacing: number, isMonoSpaceFont: boolean, charWidth: number) => Promise<number>;
|
|
3
3
|
export declare const measureTextWidths: (texts: readonly string[], fontWeight: number, fontSize: number, fontFamily: string, letterSpacing: number, isMonoSpaceFont: boolean, charWidth: number) => Promise<readonly number[]>;
|
|
4
|
+
export declare const ensureFont: (fontName: string, fontUrl: string) => Promise<void>;
|
|
@@ -7,3 +7,6 @@ export const measureTextWidth = async (text, fontWeight, fontSize, fontFamily, l
|
|
|
7
7
|
export const measureTextWidths = async (texts, fontWeight, fontSize, fontFamily, letterSpacing, isMonoSpaceFont, charWidth) => {
|
|
8
8
|
return invoke('TextMeasurement.measureTextWidths', texts, fontWeight, fontSize, fontFamily, letterSpacing, isMonoSpaceFont, charWidth);
|
|
9
9
|
};
|
|
10
|
+
export const ensureFont = async (fontName, fontUrl) => {
|
|
11
|
+
return invoke('TextMeasurement.ensureFont', fontName, fontUrl);
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/rpc-registry",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "Rpc Registry",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,5 +16,6 @@
|
|
|
16
16
|
"@lvce-editor/constants": "^3.7.0",
|
|
17
17
|
"@lvce-editor/rpc": "^5.5.0"
|
|
18
18
|
},
|
|
19
|
+
"exports": "./dist/index.js",
|
|
19
20
|
"types": "dist/index.d.ts"
|
|
20
21
|
}
|