@lvce-editor/main-process 6.32.0 → 6.33.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.
@@ -4076,6 +4076,7 @@ const WillNavigate = 'will-navigate';
4076
4076
  const DidStartNavigation = 'did-start-navigation';
4077
4077
  const DidNavigate = 'did-navigate';
4078
4078
  const PageTitleUpdated = 'page-title-updated';
4079
+ const PageFaviconUpdated = 'page-favicon-updated';
4079
4080
  const Destroyed = 'destroyed';
4080
4081
  const BeforeInputEvent = 'before-input-event';
4081
4082
  const Login = 'login';
@@ -5174,10 +5175,10 @@ const getWebContentsViewName = url => {
5174
5175
  hostname
5175
5176
  } = new URL(url);
5176
5177
  if (hostname) {
5177
- return `renderer (webcontentsview, ${hostname})`;
5178
+ return `webcontentsview, ${hostname}`;
5178
5179
  }
5179
5180
  }
5180
- return 'renderer (webcontentsview)';
5181
+ return 'webcontentsview';
5181
5182
  };
5182
5183
  const createPidMap = () => {
5183
5184
  const browserWindows = BrowserWindow.getAllWindows();
@@ -5793,24 +5794,11 @@ const showMessageBox = async ({
5793
5794
 
5794
5795
  const getJson = async url => {
5795
5796
  string(url);
5796
- const request = net.request({
5797
- url
5798
- });
5799
- let body = '';
5800
- console.log('start', url);
5801
- await new Promise(resolve => {
5802
- request.on('response', response => {
5803
- response.on('data', chunk => {
5804
- body += chunk.toString();
5805
- });
5806
- response.on('end', () => {
5807
- resolve(undefined);
5808
- });
5809
- });
5810
- request.end();
5811
- });
5812
- const json = JSON.parse(body);
5813
- return json;
5797
+ const response = await net.fetch(url);
5798
+ if (!response.ok) {
5799
+ throw new Error(`Failed to fetch JSON: ${response.status} ${response.statusText}`);
5800
+ }
5801
+ return response.json();
5814
5802
  };
5815
5803
 
5816
5804
  const startLogging = async path => {
@@ -6263,14 +6251,14 @@ const handleWebContentsViewZoomKeyBinding = (webContentsId, input) => {
6263
6251
  return true;
6264
6252
  };
6265
6253
 
6266
- const key$7 = 'before-input';
6267
- const attach$8 = (webContents, listener) => {
6254
+ const key$8 = 'before-input';
6255
+ const attach$9 = (webContents, listener) => {
6268
6256
  webContents.on(BeforeInputEvent, listener);
6269
6257
  };
6270
- const detach$7 = (webContents, listener) => {
6258
+ const detach$8 = (webContents, listener) => {
6271
6259
  webContents.off(BeforeInputEvent, listener);
6272
6260
  };
6273
- const handler$7 = (event, input, webContentsId) => {
6261
+ const handler$8 = (event, input, webContentsId) => {
6274
6262
  if (input.type !== KeyDown) {
6275
6263
  return {
6276
6264
  messages: [],
@@ -6304,20 +6292,20 @@ const handler$7 = (event, input, webContentsId) => {
6304
6292
 
6305
6293
  const ElectronBrowserViewEventListenerBeforeInput = {
6306
6294
  __proto__: null,
6307
- attach: attach$8,
6308
- detach: detach$7,
6309
- handler: handler$7,
6310
- key: key$7
6295
+ attach: attach$9,
6296
+ detach: detach$8,
6297
+ handler: handler$8,
6298
+ key: key$8
6311
6299
  };
6312
6300
 
6313
- const key$6 = 'context-menu';
6314
- const attach$7 = (webContents, listener) => {
6301
+ const key$7 = 'context-menu';
6302
+ const attach$8 = (webContents, listener) => {
6315
6303
  webContents.on(ContextMenu, listener);
6316
6304
  };
6317
- const detach$6 = (webContents, listener) => {
6305
+ const detach$7 = (webContents, listener) => {
6318
6306
  webContents.off(ContextMenu, listener);
6319
6307
  };
6320
- const handler$6 = (event, params) => {
6308
+ const handler$7 = (event, params) => {
6321
6309
  return {
6322
6310
  messages: [['handleContextMenu', params]],
6323
6311
  result: undefined
@@ -6326,20 +6314,20 @@ const handler$6 = (event, params) => {
6326
6314
 
6327
6315
  const ElectronBrowserViewEventListenerContextMenu = {
6328
6316
  __proto__: null,
6329
- attach: attach$7,
6330
- detach: detach$6,
6331
- handler: handler$6,
6332
- key: key$6
6317
+ attach: attach$8,
6318
+ detach: detach$7,
6319
+ handler: handler$7,
6320
+ key: key$7
6333
6321
  };
6334
6322
 
6335
- const key$5 = 'destroyed';
6336
- const attach$6 = (webContents, listener) => {
6323
+ const key$6 = 'destroyed';
6324
+ const attach$7 = (webContents, listener) => {
6337
6325
  webContents.on(Destroyed, listener);
6338
6326
  };
6339
- const detach$5 = (webContents, listener) => {
6327
+ const detach$6 = (webContents, listener) => {
6340
6328
  webContents.off(Destroyed, listener);
6341
6329
  };
6342
- const handler$5 = () => {
6330
+ const handler$6 = () => {
6343
6331
  return {
6344
6332
  messages: [['handleBrowserViewDestroyed']],
6345
6333
  result: undefined
@@ -6348,20 +6336,20 @@ const handler$5 = () => {
6348
6336
 
6349
6337
  const ElectronBrowserViewEventListenerDestroyed = {
6350
6338
  __proto__: null,
6351
- attach: attach$6,
6352
- detach: detach$5,
6353
- handler: handler$5,
6354
- key: key$5
6339
+ attach: attach$7,
6340
+ detach: detach$6,
6341
+ handler: handler$6,
6342
+ key: key$6
6355
6343
  };
6356
6344
 
6357
- const key$4 = 'did-navigate';
6358
- const attach$5 = (webContents, listener) => {
6345
+ const key$5 = 'did-navigate';
6346
+ const attach$6 = (webContents, listener) => {
6359
6347
  webContents.on(DidNavigate, listener);
6360
6348
  };
6361
- const detach$4 = (webContents, listener) => {
6349
+ const detach$5 = (webContents, listener) => {
6362
6350
  webContents.off(DidNavigate, listener);
6363
6351
  };
6364
- const handler$4 = (event, url) => {
6352
+ const handler$5 = (event, url) => {
6365
6353
  return {
6366
6354
  messages: [['handleDidNavigate', url]],
6367
6355
  result: undefined
@@ -6370,10 +6358,10 @@ const handler$4 = (event, url) => {
6370
6358
 
6371
6359
  const ElectronBrowserViewEventListenerDidNavigate = {
6372
6360
  __proto__: null,
6373
- attach: attach$5,
6374
- detach: detach$4,
6375
- handler: handler$4,
6376
- key: key$4
6361
+ attach: attach$6,
6362
+ detach: detach$5,
6363
+ handler: handler$5,
6364
+ key: key$5
6377
6365
  };
6378
6366
 
6379
6367
  const pendingLogins = new Map();
@@ -6409,14 +6397,14 @@ const cancelForWebContents = webContentsId => {
6409
6397
  }
6410
6398
  };
6411
6399
 
6412
- const key$3 = Login;
6413
- const attach$4 = (webContents, listener) => {
6400
+ const key$4 = Login;
6401
+ const attach$5 = (webContents, listener) => {
6414
6402
  webContents.on(Login, listener);
6415
6403
  };
6416
- const detach$3 = (webContents, listener) => {
6404
+ const detach$4 = (webContents, listener) => {
6417
6405
  webContents.off(Login, listener);
6418
6406
  };
6419
- const handler$3 = (event, authenticationResponseDetails, authInfo, callback, webContentsId) => {
6407
+ const handler$4 = (event, authenticationResponseDetails, authInfo, callback, webContentsId) => {
6420
6408
  event.preventDefault();
6421
6409
  const requestId = add(webContentsId, callback);
6422
6410
  return {
@@ -6434,6 +6422,28 @@ const handler$3 = (event, authenticationResponseDetails, authInfo, callback, web
6434
6422
  };
6435
6423
 
6436
6424
  const ElectronBrowserViewEventListenerLogin = {
6425
+ __proto__: null,
6426
+ attach: attach$5,
6427
+ detach: detach$4,
6428
+ handler: handler$4,
6429
+ key: key$4
6430
+ };
6431
+
6432
+ const key$3 = PageFaviconUpdated;
6433
+ const attach$4 = (webContents, listener) => {
6434
+ webContents.on(PageFaviconUpdated, listener);
6435
+ };
6436
+ const detach$3 = (webContents, listener) => {
6437
+ webContents.off(PageFaviconUpdated, listener);
6438
+ };
6439
+ const handler$3 = (event, favicons) => {
6440
+ return {
6441
+ messages: [['handlePageFaviconUpdated', favicons]],
6442
+ result: undefined
6443
+ };
6444
+ };
6445
+
6446
+ const ElectronBrowserViewEventListenerPageFaviconUpdated = {
6437
6447
  __proto__: null,
6438
6448
  attach: attach$4,
6439
6449
  detach: detach$3,
@@ -6521,6 +6531,7 @@ const ElectronBrowserViewEventListeners = {
6521
6531
  destroyed: ElectronBrowserViewEventListenerDestroyed,
6522
6532
  didNavigate: ElectronBrowserViewEventListenerDidNavigate,
6523
6533
  login: ElectronBrowserViewEventListenerLogin,
6534
+ pageFaviconUpdated: ElectronBrowserViewEventListenerPageFaviconUpdated,
6524
6535
  pageTitleUpdated: ElectronBrowserViewEventListenerPageTitleUpdated,
6525
6536
  willNavigate: ElectronBrowserViewEventListenerWillNavigate,
6526
6537
  windowOpen: ElectronBrowserViewEventListenerWindowOpen
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/main-process",
3
- "version": "6.32.0",
3
+ "version": "6.33.0",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "electron"