@lvce-editor/rpc-registry 6.3.0 → 6.5.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
@@ -50,6 +50,22 @@ declare const getLanguageId: (editorUid: number) => Promise<string>;
50
50
  declare const getProblems: () => Promise<readonly any[]>;
51
51
  declare const registerMockRpc: (commandMap: Record<string, any>) => MockRpc;
52
52
  declare const dispose$4: () => Promise<void>, invoke$4: (method: string, ...params: readonly unknown[]) => Promise<any>, invokeAndTransfer$4: (method: string, ...params: readonly unknown[]) => Promise<any>, set$4: (rpc: import("@lvce-editor/rpc").Rpc) => void;
53
+ declare const createWebContentsView: (restoreId: number, fallThroughKeyBindings: any) => Promise<any>;
54
+ declare const disposeWebContentsView: (id: number) => Promise<void>;
55
+ declare const resizeWebContentsView: (id: number, x: number, y: number, width: number, height: number) => Promise<void>;
56
+ declare const setIframeSrcFallback: (id: number, error: any) => Promise<void>;
57
+ declare const focus: (id: number) => Promise<void>;
58
+ declare const openDevtools: (id: string) => Promise<void>;
59
+ declare const reload: (id: string) => Promise<void>;
60
+ declare const show: (id: string) => Promise<void>;
61
+ declare const hide: (id: string) => Promise<void>;
62
+ declare const forward: (id: string) => Promise<void>;
63
+ declare const backward: (id: string) => Promise<void>;
64
+ declare const getDomTree: (id: string) => Promise<void>;
65
+ declare const insertCss: (id: string, css: string) => Promise<void>;
66
+ declare const insertJavaScript: (id: string, code: string) => Promise<void>;
67
+ declare const inspectElement: (id: string, x: number, y: number) => Promise<void>;
68
+ declare const copyImageAt: (id: string, x: number, y: number) => Promise<void>;
53
69
  declare const dispose$5: () => Promise<void>, invoke$5: (method: string, ...params: readonly unknown[]) => Promise<any>, invokeAndTransfer$5: (method: string, ...params: readonly unknown[]) => Promise<any>, set$5: (rpc: import("@lvce-editor/rpc").Rpc) => void;
54
70
  export interface RuntimeStatus {
55
71
  readonly activationEvent: string;
@@ -265,7 +281,7 @@ declare namespace EditorWorker {
265
281
  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 };
266
282
  }
267
283
  declare namespace EmbedsProcess {
268
- export { dispose$4 as dispose, invoke$4 as invoke, invokeAndTransfer$4 as invokeAndTransfer, set$4 as set };
284
+ 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 };
269
285
  }
270
286
  declare namespace ErrorWorker {
271
287
  export { dispose$5 as dispose, invoke$5 as invoke, invokeAndTransfer$5 as invokeAndTransfer, set$5 as set };
@@ -1,3 +1,51 @@
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.EmbedsProcess);
4
+ export const createWebContentsView = async (restoreId, fallThroughKeyBindings) => {
5
+ return invoke('ElectronWebContentsView.createWebContentsView', restoreId, fallThroughKeyBindings);
6
+ };
7
+ export const disposeWebContentsView = async (id) => {
8
+ return invoke('ElectronWebContentsView.disposeWebContentsView', id);
9
+ };
10
+ export const resizeWebContentsView = async (id, x, y, width, height) => {
11
+ return invoke('ElectronWebContentsView.resizeWebContentsView', id, x, y, width, height);
12
+ };
13
+ export const setIframeSrcFallback = async (id, error) => {
14
+ return invoke('ElectronWebContentsView.setIframeSrcFallback', id, error);
15
+ };
16
+ export const focus = async (id) => {
17
+ return invoke('ElectronWebContentsView.focus', id);
18
+ };
19
+ export const openDevtools = (id) => {
20
+ return invoke('ElectronWebContentsView.openDevtools', id);
21
+ };
22
+ export const reload = (id) => {
23
+ return invoke('ElectronWebContentsView.reload', id);
24
+ };
25
+ export const show = (id) => {
26
+ return invoke('ElectronWebContentsView.show', id);
27
+ };
28
+ export const hide = (id) => {
29
+ return invoke('ElectronWebContentsView.hide', id);
30
+ };
31
+ export const forward = (id) => {
32
+ return invoke('ElectronWebContentsView.forward', id);
33
+ };
34
+ export const backward = (id) => {
35
+ return invoke('ElectronWebContentsView.backward', id);
36
+ };
37
+ export const getDomTree = (id) => {
38
+ return invoke('ElectronWebContentsView.getDomTree', id);
39
+ };
40
+ export const insertCss = (id, css) => {
41
+ return invoke('ElectronWebContentsView.insertCss', id, css);
42
+ };
43
+ export const insertJavaScript = (id, code) => {
44
+ return invoke('ElectronWebContentsView.insertJavaScript', id, code);
45
+ };
46
+ export const inspectElement = (id, x, y) => {
47
+ return invoke('ElectronWebContentsView.inspectElement', id, x, y);
48
+ };
49
+ export const copyImageAt = (id, x, y) => {
50
+ return invoke('ElectronWebContentsView.copyImageAt', id, x, y);
51
+ };
@@ -11,13 +11,13 @@ export const enable = (id) => {
11
11
  return invoke(`Extensions.enable`, id);
12
12
  };
13
13
  export const enable2 = (id, platform) => {
14
- return invoke(`Extensions.enable`, id, platform);
14
+ return invoke(`Extensions.enable2`, id, platform);
15
15
  };
16
16
  export const disable = (id) => {
17
17
  return invoke(`Extensions.disable`, id);
18
18
  };
19
19
  export const disable2 = (id, platform) => {
20
- return invoke(`Extensions.disable`, id, platform);
20
+ return invoke(`Extensions.disable2`, id, platform);
21
21
  };
22
22
  export const getExtension = (id) => {
23
23
  return invoke(`Extensions.getExtension`, id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/rpc-registry",
3
- "version": "6.3.0",
3
+ "version": "6.5.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.3.0",
16
+ "@lvce-editor/constants": "^2.5.0",
17
17
  "@lvce-editor/rpc": "^4.20.0"
18
18
  },
19
19
  "types": "dist/index.d.ts"