@lvce-editor/embeds-process 1.3.0 → 1.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/embeds-process",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "",
5
5
  "main": "src/embedsProcessMain.js",
6
6
  "type": "module",
@@ -16,6 +16,7 @@ export const commandMap = {
16
16
  'ElectronWebContentsView.setIframeSrc': ElectronWebContentsView.setIframeSrc,
17
17
  'ElectronWebContentsView.setIframeSrcFallback': ElectronWebContentsView.setIframeSrcFallback,
18
18
  'ElectronWebContentsView.setFallthroughKeyBindings': ElectronWebContentsView.setFallthroughKeyBindings,
19
+ 'ElectronWebContentsView.handleKeyBinding': ElectronWebContentsView.handleKeyBinding,
19
20
  'ElectronWebContentsView.show': ElectronWebContentsView.show,
20
21
  'ElectronWebContents.handleDidNavigate': ElectronWebContentsView.handleDidNavigate,
21
22
  'ElectronWebContents.handleTitleUpdated': ElectronWebContentsView.handleTitleUpdated,
@@ -1,19 +1,17 @@
1
- const state = {
2
- ipcMap: Object.create(null),
3
- }
1
+ const ipcMap = Object.create(null)
4
2
 
5
3
  export const add = (id, ipc) => {
6
- state.ipcMap[id] = ipc
4
+ ipcMap[id] = ipc
7
5
  }
8
6
 
9
7
  export const get = (id) => {
10
- return state.ipcMap[id]
8
+ return ipcMap[id]
11
9
  }
12
10
 
13
11
  export const remove = (id) => {
14
- delete state.ipcMap[id]
12
+ delete ipcMap[id]
15
13
  }
16
14
 
17
15
  export const getAll = () => {
18
- return Object.entries(state.ipcMap)
16
+ return Object.entries(ipcMap)
19
17
  }
@@ -5,16 +5,4 @@ export const handleElectronMessagePort = async (messagePort, ipcId) => {
5
5
  Assert.object(messagePort)
6
6
  Assert.number(ipcId)
7
7
  return HandleIncomingIpc.handleIncomingIpc(ipcId, messagePort, {})
8
- // const ipc = await IpcChild.listen({
9
- // method: IpcChildType.ElectronMessagePort,
10
- // messagePort,
11
- // })
12
- // HandleIpc.handleIpc(ipc)
13
- // if (ipcId === IpcId.MainProcess) {
14
- // ParentIpc.state.ipc = ipc
15
- // } else if (ipcId === IpcId.SharedProcess) {
16
- // SharedProcessIpc.state.ipc = ipc
17
- // } else if (ipcId === IpcId.EmbedsWorker) {
18
- // ipc.addEventListener('close', HandleIpcClosed.handleIpcClosed)
19
- // }
20
8
  }