@lvce-editor/main-process 6.35.1 → 6.36.1
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/mainProcessMain.js +41 -4
- package/package.json +1 -1
package/dist/mainProcessMain.js
CHANGED
|
@@ -1647,6 +1647,12 @@ const string = value => {
|
|
|
1647
1647
|
throw new AssertionError('expected value to be of type string');
|
|
1648
1648
|
}
|
|
1649
1649
|
};
|
|
1650
|
+
const boolean = value => {
|
|
1651
|
+
const type = getType(value);
|
|
1652
|
+
if (type !== Boolean$1) {
|
|
1653
|
+
throw new AssertionError('expected value to be of type boolean');
|
|
1654
|
+
}
|
|
1655
|
+
};
|
|
1650
1656
|
|
|
1651
1657
|
const setExitCode = code => {
|
|
1652
1658
|
number(code);
|
|
@@ -4082,6 +4088,7 @@ const PageFaviconUpdated = 'page-favicon-updated';
|
|
|
4082
4088
|
const Destroyed = 'destroyed';
|
|
4083
4089
|
const BeforeInputEvent = 'before-input-event';
|
|
4084
4090
|
const Login = 'login';
|
|
4091
|
+
const AudioStateChanged = 'audio-state-changed';
|
|
4085
4092
|
|
|
4086
4093
|
const Deny = 'deny';
|
|
4087
4094
|
|
|
@@ -6253,14 +6260,14 @@ const handleWebContentsViewZoomKeyBinding = (webContentsId, input) => {
|
|
|
6253
6260
|
return true;
|
|
6254
6261
|
};
|
|
6255
6262
|
|
|
6256
|
-
const key$
|
|
6257
|
-
const attach$
|
|
6263
|
+
const key$9 = 'before-input';
|
|
6264
|
+
const attach$b = (webContents, listener) => {
|
|
6258
6265
|
webContents.on(BeforeInputEvent, listener);
|
|
6259
6266
|
};
|
|
6260
|
-
const detach$
|
|
6267
|
+
const detach$9 = (webContents, listener) => {
|
|
6261
6268
|
webContents.off(BeforeInputEvent, listener);
|
|
6262
6269
|
};
|
|
6263
|
-
const handler$
|
|
6270
|
+
const handler$9 = (event, input, webContentsId) => {
|
|
6264
6271
|
if (input.type !== KeyDown) {
|
|
6265
6272
|
return {
|
|
6266
6273
|
messages: [],
|
|
@@ -6293,6 +6300,28 @@ const handler$8 = (event, input, webContentsId) => {
|
|
|
6293
6300
|
};
|
|
6294
6301
|
|
|
6295
6302
|
const ElectronBrowserViewEventListenerBeforeInput = {
|
|
6303
|
+
__proto__: null,
|
|
6304
|
+
attach: attach$b,
|
|
6305
|
+
detach: detach$9,
|
|
6306
|
+
handler: handler$9,
|
|
6307
|
+
key: key$9
|
|
6308
|
+
};
|
|
6309
|
+
|
|
6310
|
+
const key$8 = AudioStateChanged;
|
|
6311
|
+
const attach$a = (webContents, listener) => {
|
|
6312
|
+
webContents.on(AudioStateChanged, listener);
|
|
6313
|
+
};
|
|
6314
|
+
const detach$8 = (webContents, listener) => {
|
|
6315
|
+
webContents.off(AudioStateChanged, listener);
|
|
6316
|
+
};
|
|
6317
|
+
const handler$8 = event => {
|
|
6318
|
+
return {
|
|
6319
|
+
messages: [['handleAudioStateChanged', event.audible]],
|
|
6320
|
+
result: undefined
|
|
6321
|
+
};
|
|
6322
|
+
};
|
|
6323
|
+
|
|
6324
|
+
const ElectronBrowserViewEventListenerAudioStateChanged = {
|
|
6296
6325
|
__proto__: null,
|
|
6297
6326
|
attach: attach$a,
|
|
6298
6327
|
detach: detach$8,
|
|
@@ -6527,6 +6556,7 @@ const ElectronBrowserViewEventListenerWindowOpen = {
|
|
|
6527
6556
|
|
|
6528
6557
|
const ElectronBrowserViewEventListeners = {
|
|
6529
6558
|
__proto__: null,
|
|
6559
|
+
audioStateChanged: ElectronBrowserViewEventListenerAudioStateChanged,
|
|
6530
6560
|
beforeInput: ElectronBrowserViewEventListenerBeforeInput,
|
|
6531
6561
|
contextMenu: ElectronBrowserViewEventListenerContextMenu,
|
|
6532
6562
|
destroyed: ElectronBrowserViewEventListenerDestroyed,
|
|
@@ -7043,6 +7073,10 @@ const inspectElement = (view, x, y) => {
|
|
|
7043
7073
|
const setBackgroundColor = (view, backgroundColor) => {
|
|
7044
7074
|
view.setBackgroundColor(backgroundColor);
|
|
7045
7075
|
};
|
|
7076
|
+
const setAudioMuted = (view, muted) => {
|
|
7077
|
+
boolean(muted);
|
|
7078
|
+
view.webContents.setAudioMuted(muted);
|
|
7079
|
+
};
|
|
7046
7080
|
|
|
7047
7081
|
/**
|
|
7048
7082
|
*
|
|
@@ -7073,11 +7107,13 @@ const getStats = view => {
|
|
|
7073
7107
|
} = view;
|
|
7074
7108
|
const canGoBack = webContents.navigationHistory.canGoBack();
|
|
7075
7109
|
const canGoForward = webContents.navigationHistory.canGoForward();
|
|
7110
|
+
const isAudioMuted = webContents.isAudioMuted();
|
|
7076
7111
|
const url = webContents.getURL();
|
|
7077
7112
|
const title = webContents.getTitle();
|
|
7078
7113
|
return {
|
|
7079
7114
|
canGoBack,
|
|
7080
7115
|
canGoForward,
|
|
7116
|
+
isAudioMuted,
|
|
7081
7117
|
title,
|
|
7082
7118
|
url
|
|
7083
7119
|
};
|
|
@@ -7787,6 +7823,7 @@ const commandMap = {
|
|
|
7787
7823
|
'ElectronWebContentsViewFunctions.openDevtools': wrapBrowserViewCommand(openDevtools),
|
|
7788
7824
|
'ElectronWebContentsViewFunctions.reload': wrapBrowserViewCommand(reload),
|
|
7789
7825
|
'ElectronWebContentsViewFunctions.resizeBrowserView': wrapBrowserViewCommand(resizeBrowserView),
|
|
7826
|
+
'ElectronWebContentsViewFunctions.setAudioMuted': wrapBrowserViewCommand(setAudioMuted),
|
|
7790
7827
|
'ElectronWebContentsViewFunctions.setBackgroundColor': wrapBrowserViewCommand(setBackgroundColor),
|
|
7791
7828
|
'ElectronWebContentsViewFunctions.setFallthroughKeyBindings': wrapBrowserViewCommand(setFallThroughKeyBindings),
|
|
7792
7829
|
'ElectronWebContentsViewFunctions.setIframeSrc': wrapBrowserViewCommand(setIframeSrc),
|