electron-types 46.0.0-alpha.2 → 46.0.0-alpha.4

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/README.md CHANGED
@@ -14,11 +14,11 @@ The official `electron` package is ~200MB because it includes the Electron binar
14
14
  Since this package only provides TypeScript types, install it as a dev dependency. **Install the version that matches your Electron version** (see [Version Matching](#version-matching)):
15
15
 
16
16
  ```bash
17
- npm install -D electron-types@46.0.0-alpha.2
17
+ npm install -D electron-types@46.0.0-alpha.4
18
18
  # or
19
- yarn add -D electron-types@46.0.0-alpha.2
19
+ yarn add -D electron-types@46.0.0-alpha.4
20
20
  # or
21
- pnpm add -D electron-types@46.0.0-alpha.2
21
+ pnpm add -D electron-types@46.0.0-alpha.4
22
22
  ```
23
23
 
24
24
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 46.0.0-alpha.2
1
+ // Type definitions for Electron 46.0.0-alpha.4
2
2
  // Project: http://electronjs.org/
3
3
  // Definitions by: The Electron Team <https://github.com/electron/electron>
4
4
  // Definitions: https://github.com/electron/typescript-definitions
@@ -10328,6 +10328,22 @@ declare namespace Electron {
10328
10328
  * one. It contains standard items such as `File`, `Edit`, `View`, and `Window`.
10329
10329
  */
10330
10330
  static setApplicationMenu(menu: (Menu) | (null)): void;
10331
+ /**
10332
+ * Sets the colors used to highlight the hovered or keyboard-focused item in every
10333
+ * menu the app shows, including context menus and the menu bar's dropdowns. Light
10334
+ * and dark colors are set separately, and any color left unset keeps the default
10335
+ * for that mode. Each call replaces the colors set by any previous call. Passing
10336
+ * `null` restores the defaults.
10337
+ *
10338
+ * Menus opened after the call use the new colors. The colors are not applied while
10339
+ * Windows high contrast mode or forced colors are active, so the user's system
10340
+ * colors take priority.
10341
+ *
10342
+ * This method has no effect on macOS and Linux.
10343
+ *
10344
+ * @platform win32
10345
+ */
10346
+ static setHighlightColors(options: (HighlightColorsOptions) | (null)): void;
10331
10347
  /**
10332
10348
  * Appends the `menuItem` to the menu.
10333
10349
  */
@@ -21164,6 +21180,10 @@ declare namespace Electron {
21164
21180
  */
21165
21181
  addEventListener(event: 'update-target-url', listener: (event: UpdateTargetUrlEvent) => void, useCapture?: boolean): this;
21166
21182
  removeEventListener(event: 'update-target-url', listener: (event: UpdateTargetUrlEvent) => void): this;
21183
+ /**
21184
+ * Emitted when a link is clicked in DevTools or 'Open in new tab' is selected for
21185
+ * a link in its context menu.
21186
+ */
21167
21187
  addEventListener(event: 'devtools-open-url', listener: (event: DevtoolsOpenUrlEvent) => void, useCapture?: boolean): this;
21168
21188
  removeEventListener(event: 'devtools-open-url', listener: (event: DevtoolsOpenUrlEvent) => void): this;
21169
21189
  /**
@@ -23204,6 +23224,17 @@ declare namespace Electron {
23204
23224
  origin?: string;
23205
23225
  }
23206
23226
 
23227
+ interface HighlightColorsOptions {
23228
+ /**
23229
+ * Colors used when menus are drawn with light colors.
23230
+ */
23231
+ light?: Light;
23232
+ /**
23233
+ * Colors used when menus are drawn with dark colors.
23234
+ */
23235
+ dark?: Dark;
23236
+ }
23237
+
23207
23238
  interface IgnoreMouseEventsOptions {
23208
23239
  /**
23209
23240
  * If true, forwards mouse move messages to Chromium, enabling mouse related events
@@ -25962,6 +25993,18 @@ declare namespace Electron {
25962
25993
  interface Children {
25963
25994
  }
25964
25995
 
25996
+ interface Dark {
25997
+ /**
25998
+ * Background color of the hovered or keyboard-focused menu item, as a CSS color
25999
+ * string.
26000
+ */
26001
+ background?: string;
26002
+ /**
26003
+ * Text color of the hovered or keyboard-focused menu item, as a CSS color string.
26004
+ */
26005
+ foreground?: string;
26006
+ }
26007
+
25965
26008
  interface EditFlags {
25966
26009
  /**
25967
26010
  * Whether the renderer believes it can undo.
@@ -26074,6 +26117,18 @@ declare namespace Electron {
26074
26117
  enabled: boolean;
26075
26118
  }
26076
26119
 
26120
+ interface Light {
26121
+ /**
26122
+ * Background color of the hovered or keyboard-focused menu item, as a CSS color
26123
+ * string (e.g. `#0067c0`).
26124
+ */
26125
+ background?: string;
26126
+ /**
26127
+ * Text color of the hovered or keyboard-focused menu item, as a CSS color string.
26128
+ */
26129
+ foreground?: string;
26130
+ }
26131
+
26077
26132
  interface Margins {
26078
26133
  /**
26079
26134
  * Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen,
@@ -26499,6 +26554,7 @@ declare namespace Electron {
26499
26554
  type HidDeviceAddedDetails = Electron.HidDeviceAddedDetails;
26500
26555
  type HidDeviceRemovedDetails = Electron.HidDeviceRemovedDetails;
26501
26556
  type HidDeviceRevokedDetails = Electron.HidDeviceRevokedDetails;
26557
+ type HighlightColorsOptions = Electron.HighlightColorsOptions;
26502
26558
  type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions;
26503
26559
  type ImportCertificateOptions = Electron.ImportCertificateOptions;
26504
26560
  type ImportSharedTextureOptions = Electron.ImportSharedTextureOptions;
@@ -26631,6 +26687,7 @@ declare namespace Electron {
26631
26687
  type WillResizeDetails = Electron.WillResizeDetails;
26632
26688
  type Animate = Electron.Animate;
26633
26689
  type Children = Electron.Children;
26690
+ type Dark = Electron.Dark;
26634
26691
  type EditFlags = Electron.EditFlags;
26635
26692
  type Env = Electron.Env;
26636
26693
  type FeatureReports = Electron.FeatureReports;
@@ -26638,6 +26695,7 @@ declare namespace Electron {
26638
26695
  type InputReports = Electron.InputReports;
26639
26696
  type Interfaces = Electron.Interfaces;
26640
26697
  type LaunchItems = Electron.LaunchItems;
26698
+ type Light = Electron.Light;
26641
26699
  type Margins = Electron.Margins;
26642
26700
  type MediaFlags = Electron.MediaFlags;
26643
26701
  type Metadata = Electron.Metadata;
@@ -26930,6 +26988,7 @@ declare namespace Electron {
26930
26988
  type HidDeviceAddedDetails = Electron.HidDeviceAddedDetails;
26931
26989
  type HidDeviceRemovedDetails = Electron.HidDeviceRemovedDetails;
26932
26990
  type HidDeviceRevokedDetails = Electron.HidDeviceRevokedDetails;
26991
+ type HighlightColorsOptions = Electron.HighlightColorsOptions;
26933
26992
  type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions;
26934
26993
  type ImportCertificateOptions = Electron.ImportCertificateOptions;
26935
26994
  type ImportSharedTextureOptions = Electron.ImportSharedTextureOptions;
@@ -27062,6 +27121,7 @@ declare namespace Electron {
27062
27121
  type WillResizeDetails = Electron.WillResizeDetails;
27063
27122
  type Animate = Electron.Animate;
27064
27123
  type Children = Electron.Children;
27124
+ type Dark = Electron.Dark;
27065
27125
  type EditFlags = Electron.EditFlags;
27066
27126
  type Env = Electron.Env;
27067
27127
  type FeatureReports = Electron.FeatureReports;
@@ -27069,6 +27129,7 @@ declare namespace Electron {
27069
27129
  type InputReports = Electron.InputReports;
27070
27130
  type Interfaces = Electron.Interfaces;
27071
27131
  type LaunchItems = Electron.LaunchItems;
27132
+ type Light = Electron.Light;
27072
27133
  type Margins = Electron.Margins;
27073
27134
  type MediaFlags = Electron.MediaFlags;
27074
27135
  type Metadata = Electron.Metadata;
@@ -27284,6 +27345,7 @@ declare namespace Electron {
27284
27345
  type HidDeviceAddedDetails = Electron.HidDeviceAddedDetails;
27285
27346
  type HidDeviceRemovedDetails = Electron.HidDeviceRemovedDetails;
27286
27347
  type HidDeviceRevokedDetails = Electron.HidDeviceRevokedDetails;
27348
+ type HighlightColorsOptions = Electron.HighlightColorsOptions;
27287
27349
  type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions;
27288
27350
  type ImportCertificateOptions = Electron.ImportCertificateOptions;
27289
27351
  type ImportSharedTextureOptions = Electron.ImportSharedTextureOptions;
@@ -27416,6 +27478,7 @@ declare namespace Electron {
27416
27478
  type WillResizeDetails = Electron.WillResizeDetails;
27417
27479
  type Animate = Electron.Animate;
27418
27480
  type Children = Electron.Children;
27481
+ type Dark = Electron.Dark;
27419
27482
  type EditFlags = Electron.EditFlags;
27420
27483
  type Env = Electron.Env;
27421
27484
  type FeatureReports = Electron.FeatureReports;
@@ -27423,6 +27486,7 @@ declare namespace Electron {
27423
27486
  type InputReports = Electron.InputReports;
27424
27487
  type Interfaces = Electron.Interfaces;
27425
27488
  type LaunchItems = Electron.LaunchItems;
27489
+ type Light = Electron.Light;
27426
27490
  type Margins = Electron.Margins;
27427
27491
  type MediaFlags = Electron.MediaFlags;
27428
27492
  type Metadata = Electron.Metadata;
@@ -27640,6 +27704,7 @@ declare namespace Electron {
27640
27704
  type HidDeviceAddedDetails = Electron.HidDeviceAddedDetails;
27641
27705
  type HidDeviceRemovedDetails = Electron.HidDeviceRemovedDetails;
27642
27706
  type HidDeviceRevokedDetails = Electron.HidDeviceRevokedDetails;
27707
+ type HighlightColorsOptions = Electron.HighlightColorsOptions;
27643
27708
  type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions;
27644
27709
  type ImportCertificateOptions = Electron.ImportCertificateOptions;
27645
27710
  type ImportSharedTextureOptions = Electron.ImportSharedTextureOptions;
@@ -27772,6 +27837,7 @@ declare namespace Electron {
27772
27837
  type WillResizeDetails = Electron.WillResizeDetails;
27773
27838
  type Animate = Electron.Animate;
27774
27839
  type Children = Electron.Children;
27840
+ type Dark = Electron.Dark;
27775
27841
  type EditFlags = Electron.EditFlags;
27776
27842
  type Env = Electron.Env;
27777
27843
  type FeatureReports = Electron.FeatureReports;
@@ -27779,6 +27845,7 @@ declare namespace Electron {
27779
27845
  type InputReports = Electron.InputReports;
27780
27846
  type Interfaces = Electron.Interfaces;
27781
27847
  type LaunchItems = Electron.LaunchItems;
27848
+ type Light = Electron.Light;
27782
27849
  type Margins = Electron.Margins;
27783
27850
  type MediaFlags = Electron.MediaFlags;
27784
27851
  type Metadata = Electron.Metadata;
@@ -28093,6 +28160,7 @@ declare namespace Electron {
28093
28160
  type HidDeviceAddedDetails = Electron.HidDeviceAddedDetails;
28094
28161
  type HidDeviceRemovedDetails = Electron.HidDeviceRemovedDetails;
28095
28162
  type HidDeviceRevokedDetails = Electron.HidDeviceRevokedDetails;
28163
+ type HighlightColorsOptions = Electron.HighlightColorsOptions;
28096
28164
  type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions;
28097
28165
  type ImportCertificateOptions = Electron.ImportCertificateOptions;
28098
28166
  type ImportSharedTextureOptions = Electron.ImportSharedTextureOptions;
@@ -28225,6 +28293,7 @@ declare namespace Electron {
28225
28293
  type WillResizeDetails = Electron.WillResizeDetails;
28226
28294
  type Animate = Electron.Animate;
28227
28295
  type Children = Electron.Children;
28296
+ type Dark = Electron.Dark;
28228
28297
  type EditFlags = Electron.EditFlags;
28229
28298
  type Env = Electron.Env;
28230
28299
  type FeatureReports = Electron.FeatureReports;
@@ -28232,6 +28301,7 @@ declare namespace Electron {
28232
28301
  type InputReports = Electron.InputReports;
28233
28302
  type Interfaces = Electron.Interfaces;
28234
28303
  type LaunchItems = Electron.LaunchItems;
28304
+ type Light = Electron.Light;
28235
28305
  type Margins = Electron.Margins;
28236
28306
  type MediaFlags = Electron.MediaFlags;
28237
28307
  type Metadata = Electron.Metadata;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "46.0.0-alpha.2",
3
- "extractedAt": "2026-10-26T22:12:57.083Z"
2
+ "electronVersion": "46.0.0-alpha.4",
3
+ "extractedAt": "2026-10-31T05:08:14.962Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "46.0.0-alpha.2",
3
+ "version": "46.0.0-alpha.4",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",