@vueuse/electron 10.7.2 → 10.9.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/index.d.cts +10 -10
- package/index.d.mts +10 -10
- package/index.d.ts +10 -10
- package/package.json +3 -3
package/index.d.cts
CHANGED
|
@@ -16,31 +16,31 @@ interface UseIpcRendererReturn {
|
|
|
16
16
|
*
|
|
17
17
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendereronchannel-listener
|
|
18
18
|
*/
|
|
19
|
-
on(channel: string, listener: IpcRendererListener)
|
|
19
|
+
on: (channel: string, listener: IpcRendererListener) => IpcRenderer;
|
|
20
20
|
/**
|
|
21
21
|
* Adds a one time listener function for the event. This listener is invoked only the next time a message is sent to channel, after which it is removed.
|
|
22
22
|
*
|
|
23
23
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendereroncechannel-listener
|
|
24
24
|
*/
|
|
25
|
-
once(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void)
|
|
25
|
+
once: (channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void) => IpcRenderer;
|
|
26
26
|
/**
|
|
27
27
|
* Removes the specified listener from the listener array for the specified channel.
|
|
28
28
|
*
|
|
29
29
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererremovelistenerchannel-listener
|
|
30
30
|
*/
|
|
31
|
-
removeListener(channel: string, listener: (...args: any[]) => void)
|
|
31
|
+
removeListener: (channel: string, listener: (...args: any[]) => void) => IpcRenderer;
|
|
32
32
|
/**
|
|
33
33
|
* Removes all listeners, or those of the specified channel.
|
|
34
34
|
*
|
|
35
35
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererremovealllistenerschannel
|
|
36
36
|
*/
|
|
37
|
-
removeAllListeners(channel: string)
|
|
37
|
+
removeAllListeners: (channel: string) => IpcRenderer;
|
|
38
38
|
/**
|
|
39
39
|
* Send an asynchronous message to the main process via channel, along with arguments.
|
|
40
40
|
*
|
|
41
41
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendchannel-args
|
|
42
42
|
*/
|
|
43
|
-
send(channel: string, ...args: any[])
|
|
43
|
+
send: (channel: string, ...args: any[]) => void;
|
|
44
44
|
/**
|
|
45
45
|
* Returns Promise<any> - Resolves with the response from the main process.
|
|
46
46
|
* Send a message to the main process via channel and expect a result ~~asynchronously~~.
|
|
@@ -48,32 +48,32 @@ interface UseIpcRendererReturn {
|
|
|
48
48
|
*
|
|
49
49
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererinvokechannel-args
|
|
50
50
|
*/
|
|
51
|
-
invoke<T>(channel: string, ...args: any[])
|
|
51
|
+
invoke: <T>(channel: string, ...args: any[]) => Ref<T | null>;
|
|
52
52
|
/**
|
|
53
53
|
* Returns any - The value sent back by the ipcMain handler.
|
|
54
54
|
* Send a message to the main process via channel and expect a result synchronously.
|
|
55
55
|
*
|
|
56
56
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendsyncchannel-args
|
|
57
57
|
*/
|
|
58
|
-
sendSync<T>(channel: string, ...args: any[])
|
|
58
|
+
sendSync: <T>(channel: string, ...args: any[]) => Ref<T | null>;
|
|
59
59
|
/**
|
|
60
60
|
* Send a message to the main process, optionally transferring ownership of zero or more MessagePort objects.
|
|
61
61
|
*
|
|
62
62
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererpostmessagechannel-message-transfer
|
|
63
63
|
*/
|
|
64
|
-
postMessage(channel: string, message: any, transfer?: MessagePort[])
|
|
64
|
+
postMessage: (channel: string, message: any, transfer?: MessagePort[]) => void;
|
|
65
65
|
/**
|
|
66
66
|
* Sends a message to a window with webContentsId via channel.
|
|
67
67
|
*
|
|
68
68
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendtowebcontentsid-channel-args
|
|
69
69
|
*/
|
|
70
|
-
sendTo(webContentsId: number, channel: string, ...args: any[])
|
|
70
|
+
sendTo: (webContentsId: number, channel: string, ...args: any[]) => void;
|
|
71
71
|
/**
|
|
72
72
|
* Like ipcRenderer.send but the event will be sent to the <webview> element in the host page instead of the main process.
|
|
73
73
|
*
|
|
74
74
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendtohostchannel-args
|
|
75
75
|
*/
|
|
76
|
-
sendToHost(channel: string, ...args: any[])
|
|
76
|
+
sendToHost: (channel: string, ...args: any[]) => void;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Get the `ipcRenderer` module with all APIs.
|
package/index.d.mts
CHANGED
|
@@ -16,31 +16,31 @@ interface UseIpcRendererReturn {
|
|
|
16
16
|
*
|
|
17
17
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendereronchannel-listener
|
|
18
18
|
*/
|
|
19
|
-
on(channel: string, listener: IpcRendererListener)
|
|
19
|
+
on: (channel: string, listener: IpcRendererListener) => IpcRenderer;
|
|
20
20
|
/**
|
|
21
21
|
* Adds a one time listener function for the event. This listener is invoked only the next time a message is sent to channel, after which it is removed.
|
|
22
22
|
*
|
|
23
23
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendereroncechannel-listener
|
|
24
24
|
*/
|
|
25
|
-
once(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void)
|
|
25
|
+
once: (channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void) => IpcRenderer;
|
|
26
26
|
/**
|
|
27
27
|
* Removes the specified listener from the listener array for the specified channel.
|
|
28
28
|
*
|
|
29
29
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererremovelistenerchannel-listener
|
|
30
30
|
*/
|
|
31
|
-
removeListener(channel: string, listener: (...args: any[]) => void)
|
|
31
|
+
removeListener: (channel: string, listener: (...args: any[]) => void) => IpcRenderer;
|
|
32
32
|
/**
|
|
33
33
|
* Removes all listeners, or those of the specified channel.
|
|
34
34
|
*
|
|
35
35
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererremovealllistenerschannel
|
|
36
36
|
*/
|
|
37
|
-
removeAllListeners(channel: string)
|
|
37
|
+
removeAllListeners: (channel: string) => IpcRenderer;
|
|
38
38
|
/**
|
|
39
39
|
* Send an asynchronous message to the main process via channel, along with arguments.
|
|
40
40
|
*
|
|
41
41
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendchannel-args
|
|
42
42
|
*/
|
|
43
|
-
send(channel: string, ...args: any[])
|
|
43
|
+
send: (channel: string, ...args: any[]) => void;
|
|
44
44
|
/**
|
|
45
45
|
* Returns Promise<any> - Resolves with the response from the main process.
|
|
46
46
|
* Send a message to the main process via channel and expect a result ~~asynchronously~~.
|
|
@@ -48,32 +48,32 @@ interface UseIpcRendererReturn {
|
|
|
48
48
|
*
|
|
49
49
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererinvokechannel-args
|
|
50
50
|
*/
|
|
51
|
-
invoke<T>(channel: string, ...args: any[])
|
|
51
|
+
invoke: <T>(channel: string, ...args: any[]) => Ref<T | null>;
|
|
52
52
|
/**
|
|
53
53
|
* Returns any - The value sent back by the ipcMain handler.
|
|
54
54
|
* Send a message to the main process via channel and expect a result synchronously.
|
|
55
55
|
*
|
|
56
56
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendsyncchannel-args
|
|
57
57
|
*/
|
|
58
|
-
sendSync<T>(channel: string, ...args: any[])
|
|
58
|
+
sendSync: <T>(channel: string, ...args: any[]) => Ref<T | null>;
|
|
59
59
|
/**
|
|
60
60
|
* Send a message to the main process, optionally transferring ownership of zero or more MessagePort objects.
|
|
61
61
|
*
|
|
62
62
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererpostmessagechannel-message-transfer
|
|
63
63
|
*/
|
|
64
|
-
postMessage(channel: string, message: any, transfer?: MessagePort[])
|
|
64
|
+
postMessage: (channel: string, message: any, transfer?: MessagePort[]) => void;
|
|
65
65
|
/**
|
|
66
66
|
* Sends a message to a window with webContentsId via channel.
|
|
67
67
|
*
|
|
68
68
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendtowebcontentsid-channel-args
|
|
69
69
|
*/
|
|
70
|
-
sendTo(webContentsId: number, channel: string, ...args: any[])
|
|
70
|
+
sendTo: (webContentsId: number, channel: string, ...args: any[]) => void;
|
|
71
71
|
/**
|
|
72
72
|
* Like ipcRenderer.send but the event will be sent to the <webview> element in the host page instead of the main process.
|
|
73
73
|
*
|
|
74
74
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendtohostchannel-args
|
|
75
75
|
*/
|
|
76
|
-
sendToHost(channel: string, ...args: any[])
|
|
76
|
+
sendToHost: (channel: string, ...args: any[]) => void;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Get the `ipcRenderer` module with all APIs.
|
package/index.d.ts
CHANGED
|
@@ -16,31 +16,31 @@ interface UseIpcRendererReturn {
|
|
|
16
16
|
*
|
|
17
17
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendereronchannel-listener
|
|
18
18
|
*/
|
|
19
|
-
on(channel: string, listener: IpcRendererListener)
|
|
19
|
+
on: (channel: string, listener: IpcRendererListener) => IpcRenderer;
|
|
20
20
|
/**
|
|
21
21
|
* Adds a one time listener function for the event. This listener is invoked only the next time a message is sent to channel, after which it is removed.
|
|
22
22
|
*
|
|
23
23
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendereroncechannel-listener
|
|
24
24
|
*/
|
|
25
|
-
once(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void)
|
|
25
|
+
once: (channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void) => IpcRenderer;
|
|
26
26
|
/**
|
|
27
27
|
* Removes the specified listener from the listener array for the specified channel.
|
|
28
28
|
*
|
|
29
29
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererremovelistenerchannel-listener
|
|
30
30
|
*/
|
|
31
|
-
removeListener(channel: string, listener: (...args: any[]) => void)
|
|
31
|
+
removeListener: (channel: string, listener: (...args: any[]) => void) => IpcRenderer;
|
|
32
32
|
/**
|
|
33
33
|
* Removes all listeners, or those of the specified channel.
|
|
34
34
|
*
|
|
35
35
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererremovealllistenerschannel
|
|
36
36
|
*/
|
|
37
|
-
removeAllListeners(channel: string)
|
|
37
|
+
removeAllListeners: (channel: string) => IpcRenderer;
|
|
38
38
|
/**
|
|
39
39
|
* Send an asynchronous message to the main process via channel, along with arguments.
|
|
40
40
|
*
|
|
41
41
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendchannel-args
|
|
42
42
|
*/
|
|
43
|
-
send(channel: string, ...args: any[])
|
|
43
|
+
send: (channel: string, ...args: any[]) => void;
|
|
44
44
|
/**
|
|
45
45
|
* Returns Promise<any> - Resolves with the response from the main process.
|
|
46
46
|
* Send a message to the main process via channel and expect a result ~~asynchronously~~.
|
|
@@ -48,32 +48,32 @@ interface UseIpcRendererReturn {
|
|
|
48
48
|
*
|
|
49
49
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererinvokechannel-args
|
|
50
50
|
*/
|
|
51
|
-
invoke<T>(channel: string, ...args: any[])
|
|
51
|
+
invoke: <T>(channel: string, ...args: any[]) => Ref<T | null>;
|
|
52
52
|
/**
|
|
53
53
|
* Returns any - The value sent back by the ipcMain handler.
|
|
54
54
|
* Send a message to the main process via channel and expect a result synchronously.
|
|
55
55
|
*
|
|
56
56
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendsyncchannel-args
|
|
57
57
|
*/
|
|
58
|
-
sendSync<T>(channel: string, ...args: any[])
|
|
58
|
+
sendSync: <T>(channel: string, ...args: any[]) => Ref<T | null>;
|
|
59
59
|
/**
|
|
60
60
|
* Send a message to the main process, optionally transferring ownership of zero or more MessagePort objects.
|
|
61
61
|
*
|
|
62
62
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererpostmessagechannel-message-transfer
|
|
63
63
|
*/
|
|
64
|
-
postMessage(channel: string, message: any, transfer?: MessagePort[])
|
|
64
|
+
postMessage: (channel: string, message: any, transfer?: MessagePort[]) => void;
|
|
65
65
|
/**
|
|
66
66
|
* Sends a message to a window with webContentsId via channel.
|
|
67
67
|
*
|
|
68
68
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendtowebcontentsid-channel-args
|
|
69
69
|
*/
|
|
70
|
-
sendTo(webContentsId: number, channel: string, ...args: any[])
|
|
70
|
+
sendTo: (webContentsId: number, channel: string, ...args: any[]) => void;
|
|
71
71
|
/**
|
|
72
72
|
* Like ipcRenderer.send but the event will be sent to the <webview> element in the host page instead of the main process.
|
|
73
73
|
*
|
|
74
74
|
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrenderersendtohostchannel-args
|
|
75
75
|
*/
|
|
76
|
-
sendToHost(channel: string, ...args: any[])
|
|
76
|
+
sendToHost: (channel: string, ...args: any[]) => void;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Get the `ipcRenderer` module with all APIs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueuse/electron",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.9.0",
|
|
4
4
|
"description": "Electron renderer process modules for VueUse",
|
|
5
5
|
"author": "Archer Gu<https://github.com/ArcherGu>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"electron": ">=9.0.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@vueuse/shared": "10.
|
|
40
|
-
"vue-demi": ">=0.14.
|
|
39
|
+
"@vueuse/shared": "10.9.0",
|
|
40
|
+
"vue-demi": ">=0.14.7"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"electron": "^13.1.0"
|