@lvce-editor/main-process 6.37.7 → 6.37.9

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.
@@ -4082,6 +4082,7 @@ const ContextMenu = 'context-menu';
4082
4082
  const WillNavigate = 'will-navigate';
4083
4083
  const DidStartNavigation = 'did-start-navigation';
4084
4084
  const DidNavigate = 'did-navigate';
4085
+ const DidNavigateInPage = 'did-navigate-in-page';
4085
4086
  const PageTitleUpdated = 'page-title-updated';
4086
4087
  const PageFaviconUpdated = 'page-favicon-updated';
4087
4088
  const Destroyed = 'destroyed';
@@ -4749,6 +4750,7 @@ const getCorsResponseHeaders = (responseHeaders = {}) => {
4749
4750
 
4750
4751
  const ClipBoardRead = 'clipboard-read';
4751
4752
  const ClipBoardSanitizedWrite = 'clipboard-sanitized-write';
4753
+ const FileSystem = 'fileSystem';
4752
4754
  const FullScreen = 'fullscreen';
4753
4755
  const GeoLocation = 'geolocation';
4754
4756
  const Media = 'media';
@@ -6259,14 +6261,14 @@ const handleWebContentsViewZoomKeyBinding = (webContentsId, input) => {
6259
6261
  return true;
6260
6262
  };
6261
6263
 
6262
- const key$9 = 'before-input';
6263
- const attach$b = (webContents, listener) => {
6264
+ const key$a = 'before-input';
6265
+ const attach$c = (webContents, listener) => {
6264
6266
  webContents.on(BeforeInputEvent, listener);
6265
6267
  };
6266
- const detach$9 = (webContents, listener) => {
6268
+ const detach$a = (webContents, listener) => {
6267
6269
  webContents.off(BeforeInputEvent, listener);
6268
6270
  };
6269
- const handler$9 = (event, input, webContentsId) => {
6271
+ const handler$a = (event, input, webContentsId) => {
6270
6272
  if (input.type !== KeyDown) {
6271
6273
  return {
6272
6274
  messages: [],
@@ -6300,20 +6302,20 @@ const handler$9 = (event, input, webContentsId) => {
6300
6302
 
6301
6303
  const ElectronBrowserViewEventListenerBeforeInput = {
6302
6304
  __proto__: null,
6303
- attach: attach$b,
6304
- detach: detach$9,
6305
- handler: handler$9,
6306
- key: key$9
6305
+ attach: attach$c,
6306
+ detach: detach$a,
6307
+ handler: handler$a,
6308
+ key: key$a
6307
6309
  };
6308
6310
 
6309
- const key$8 = AudioStateChanged;
6310
- const attach$a = (webContents, listener) => {
6311
+ const key$9 = AudioStateChanged;
6312
+ const attach$b = (webContents, listener) => {
6311
6313
  webContents.on(AudioStateChanged, listener);
6312
6314
  };
6313
- const detach$8 = (webContents, listener) => {
6315
+ const detach$9 = (webContents, listener) => {
6314
6316
  webContents.off(AudioStateChanged, listener);
6315
6317
  };
6316
- const handler$8 = event => {
6318
+ const handler$9 = event => {
6317
6319
  return {
6318
6320
  messages: [['handleAudioStateChanged', event.audible]],
6319
6321
  result: undefined
@@ -6322,20 +6324,20 @@ const handler$8 = event => {
6322
6324
 
6323
6325
  const ElectronBrowserViewEventListenerAudioStateChanged = {
6324
6326
  __proto__: null,
6325
- attach: attach$a,
6326
- detach: detach$8,
6327
- handler: handler$8,
6328
- key: key$8
6327
+ attach: attach$b,
6328
+ detach: detach$9,
6329
+ handler: handler$9,
6330
+ key: key$9
6329
6331
  };
6330
6332
 
6331
- const key$7 = 'context-menu';
6332
- const attach$9 = (webContents, listener) => {
6333
+ const key$8 = 'context-menu';
6334
+ const attach$a = (webContents, listener) => {
6333
6335
  webContents.on(ContextMenu, listener);
6334
6336
  };
6335
- const detach$7 = (webContents, listener) => {
6337
+ const detach$8 = (webContents, listener) => {
6336
6338
  webContents.off(ContextMenu, listener);
6337
6339
  };
6338
- const handler$7 = (event, params) => {
6340
+ const handler$8 = (event, params) => {
6339
6341
  return {
6340
6342
  messages: [['handleContextMenu', params]],
6341
6343
  result: undefined
@@ -6344,20 +6346,20 @@ const handler$7 = (event, params) => {
6344
6346
 
6345
6347
  const ElectronBrowserViewEventListenerContextMenu = {
6346
6348
  __proto__: null,
6347
- attach: attach$9,
6348
- detach: detach$7,
6349
- handler: handler$7,
6350
- key: key$7
6349
+ attach: attach$a,
6350
+ detach: detach$8,
6351
+ handler: handler$8,
6352
+ key: key$8
6351
6353
  };
6352
6354
 
6353
- const key$6 = 'destroyed';
6354
- const attach$8 = (webContents, listener) => {
6355
+ const key$7 = 'destroyed';
6356
+ const attach$9 = (webContents, listener) => {
6355
6357
  webContents.on(Destroyed, listener);
6356
6358
  };
6357
- const detach$6 = (webContents, listener) => {
6359
+ const detach$7 = (webContents, listener) => {
6358
6360
  webContents.off(Destroyed, listener);
6359
6361
  };
6360
- const handler$6 = () => {
6362
+ const handler$7 = () => {
6361
6363
  return {
6362
6364
  messages: [['handleBrowserViewDestroyed']],
6363
6365
  result: undefined
@@ -6366,10 +6368,10 @@ const handler$6 = () => {
6366
6368
 
6367
6369
  const ElectronBrowserViewEventListenerDestroyed = {
6368
6370
  __proto__: null,
6369
- attach: attach$8,
6370
- detach: detach$6,
6371
- handler: handler$6,
6372
- key: key$6
6371
+ attach: attach$9,
6372
+ detach: detach$7,
6373
+ handler: handler$7,
6374
+ key: key$7
6373
6375
  };
6374
6376
 
6375
6377
  const faviconUrls = new WeakMap();
@@ -6382,11 +6384,11 @@ const has = (webContents, url) => {
6382
6384
 
6383
6385
  const maxFaviconBytes = 1024 * 1024;
6384
6386
  const faviconFetchTimeout = 2000;
6385
- const key$5 = PageFaviconUpdated;
6386
- const attach$7 = (webContents, listener) => {
6387
+ const key$6 = PageFaviconUpdated;
6388
+ const attach$8 = (webContents, listener) => {
6387
6389
  webContents.on(PageFaviconUpdated, listener);
6388
6390
  };
6389
- const detach$5 = (webContents, listener) => {
6391
+ const detach$6 = (webContents, listener) => {
6390
6392
  webContents.off(PageFaviconUpdated, listener);
6391
6393
  };
6392
6394
  const getFaviconDataUrl = async (fetcher, favicon, signal) => {
@@ -6459,7 +6461,7 @@ const resolveNetworkFavicon = async favicons => {
6459
6461
  const networkFavicon = await resolveWithTimeout((url, options) => fetch(url, options), favicons);
6460
6462
  return networkFavicon ? [networkFavicon] : [];
6461
6463
  };
6462
- const handler$5 = async (_event, favicons, _webContentsId, webContents) => {
6464
+ const handler$6 = async (_event, favicons, _webContentsId, webContents) => {
6463
6465
  const pageUrl = webContents.getURL();
6464
6466
  if (favicons.length > 0) {
6465
6467
  set(webContents, pageUrl);
@@ -6473,18 +6475,18 @@ const handler$5 = async (_event, favicons, _webContentsId, webContents) => {
6473
6475
 
6474
6476
  const ElectronBrowserViewEventListenerPageFaviconUpdated = {
6475
6477
  __proto__: null,
6476
- attach: attach$7,
6477
- detach: detach$5,
6478
- handler: handler$5,
6479
- key: key$5,
6478
+ attach: attach$8,
6479
+ detach: detach$6,
6480
+ handler: handler$6,
6481
+ key: key$6,
6480
6482
  resolveNetworkFavicon
6481
6483
  };
6482
6484
 
6483
- const key$4 = 'did-navigate';
6484
- const attach$6 = (webContents, listener) => {
6485
+ const key$5 = 'did-navigate';
6486
+ const attach$7 = (webContents, listener) => {
6485
6487
  webContents.on(DidNavigate, listener);
6486
6488
  };
6487
- const detach$4 = (webContents, listener) => {
6489
+ const detach$5 = (webContents, listener) => {
6488
6490
  webContents.off(DidNavigate, listener);
6489
6491
  };
6490
6492
  const loadDefaultFavicon = async (webContents, url) => {
@@ -6507,7 +6509,7 @@ const loadDefaultFavicon = async (webContents, url) => {
6507
6509
  }
6508
6510
  return favicons;
6509
6511
  };
6510
- const handler$4 = async (_event, url, _httpResponseCode, _httpStatusText, _webContentsId, webContents) => {
6512
+ const handler$5 = async (_event, url, _httpResponseCode, _httpStatusText, _webContentsId, webContents) => {
6511
6513
  const favicons = await loadDefaultFavicon(webContents, url);
6512
6514
  const messages = favicons.length > 0 ? [['handleDidNavigate', url], ['handlePageFaviconUpdated', favicons]] : [['handleDidNavigate', url]];
6513
6515
  return {
@@ -6517,6 +6519,29 @@ const handler$4 = async (_event, url, _httpResponseCode, _httpStatusText, _webCo
6517
6519
  };
6518
6520
 
6519
6521
  const ElectronBrowserViewEventListenerDidNavigate = {
6522
+ __proto__: null,
6523
+ attach: attach$7,
6524
+ detach: detach$5,
6525
+ handler: handler$5,
6526
+ key: key$5
6527
+ };
6528
+
6529
+ const key$4 = DidNavigateInPage;
6530
+ const attach$6 = (webContents, listener) => {
6531
+ webContents.on(DidNavigateInPage, listener);
6532
+ };
6533
+ const detach$4 = (webContents, listener) => {
6534
+ webContents.off(DidNavigateInPage, listener);
6535
+ };
6536
+ const handler$4 = (_event, url, isMainFrame) => {
6537
+ const messages = isMainFrame ? [['handleDidNavigate', url]] : [];
6538
+ return {
6539
+ messages,
6540
+ result: undefined
6541
+ };
6542
+ };
6543
+
6544
+ const ElectronBrowserViewEventListenerDidNavigateInPage = {
6520
6545
  __proto__: null,
6521
6546
  attach: attach$6,
6522
6547
  detach: detach$4,
@@ -6668,6 +6693,7 @@ const ElectronBrowserViewEventListeners = {
6668
6693
  contextMenu: ElectronBrowserViewEventListenerContextMenu,
6669
6694
  destroyed: ElectronBrowserViewEventListenerDestroyed,
6670
6695
  didNavigate: ElectronBrowserViewEventListenerDidNavigate,
6696
+ didNavigateInPage: ElectronBrowserViewEventListenerDidNavigateInPage,
6671
6697
  login: ElectronBrowserViewEventListenerLogin,
6672
6698
  pageFaviconUpdated: ElectronBrowserViewEventListenerPageFaviconUpdated,
6673
6699
  pageTitleUpdated: ElectronBrowserViewEventListenerPageTitleUpdated,
@@ -6789,6 +6815,7 @@ const isAllowedPermission = permission => {
6789
6815
  switch (permission) {
6790
6816
  case ClipBoardRead:
6791
6817
  case ClipBoardSanitizedWrite:
6818
+ case FileSystem:
6792
6819
  case FullScreen:
6793
6820
  case GeoLocation:
6794
6821
  case WindowPlacement:
@@ -6797,6 +6824,9 @@ const isAllowedPermission = permission => {
6797
6824
  return false;
6798
6825
  }
6799
6826
  };
6827
+ const handleFileSystemAccessRestricted = (_event, _details, callback) => {
6828
+ callback('allow');
6829
+ };
6800
6830
  const handlePermissionRequest = (webContents, permission, callback, details) => {
6801
6831
  callback(isAllowedPermission(permission));
6802
6832
  };
@@ -6810,6 +6840,7 @@ const createSession = () => {
6810
6840
  });
6811
6841
  session.setPermissionRequestHandler(handlePermissionRequest);
6812
6842
  session.setPermissionCheckHandler(handlePermissionCheck);
6843
+ session.on('file-system-access-restricted', handleFileSystemAccessRestricted);
6813
6844
  session.webRequest.onBeforeRequest(filter, handleBeforeRequest);
6814
6845
  // session.webRequest.addSessionChromeExtensions(session)
6815
6846
  return session;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/main-process",
3
- "version": "6.37.7",
3
+ "version": "6.37.9",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "electron"