electron-types 45.1.0 → 45.2.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/README.md +3 -3
- package/dist/electron.d.ts +71 -1
- package/dist/version.json +2 -2
- package/package.json +1 -1
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@45.1
|
|
17
|
+
npm install -D electron-types@45.2.1
|
|
18
18
|
# or
|
|
19
|
-
yarn add -D electron-types@45.1
|
|
19
|
+
yarn add -D electron-types@45.2.1
|
|
20
20
|
# or
|
|
21
|
-
pnpm add -D electron-types@45.1
|
|
21
|
+
pnpm add -D electron-types@45.2.1
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Usage
|
package/dist/electron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Electron 45.1
|
|
1
|
+
// Type definitions for Electron 45.2.1
|
|
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
|
|
@@ -10208,6 +10208,22 @@ declare namespace Electron {
|
|
|
10208
10208
|
* one. It contains standard items such as `File`, `Edit`, `View`, and `Window`.
|
|
10209
10209
|
*/
|
|
10210
10210
|
static setApplicationMenu(menu: (Menu) | (null)): void;
|
|
10211
|
+
/**
|
|
10212
|
+
* Sets the colors used to highlight the hovered or keyboard-focused item in every
|
|
10213
|
+
* menu the app shows, including context menus and the menu bar's dropdowns. Light
|
|
10214
|
+
* and dark colors are set separately, and any color left unset keeps the default
|
|
10215
|
+
* for that mode. Each call replaces the colors set by any previous call. Passing
|
|
10216
|
+
* `null` restores the defaults.
|
|
10217
|
+
*
|
|
10218
|
+
* Menus opened after the call use the new colors. The colors are not applied while
|
|
10219
|
+
* Windows high contrast mode or forced colors are active, so the user's system
|
|
10220
|
+
* colors take priority.
|
|
10221
|
+
*
|
|
10222
|
+
* This method has no effect on macOS and Linux.
|
|
10223
|
+
*
|
|
10224
|
+
* @platform win32
|
|
10225
|
+
*/
|
|
10226
|
+
static setHighlightColors(options: (HighlightColorsOptions) | (null)): void;
|
|
10211
10227
|
/**
|
|
10212
10228
|
* Appends the `menuItem` to the menu.
|
|
10213
10229
|
*/
|
|
@@ -21070,6 +21086,10 @@ declare namespace Electron {
|
|
|
21070
21086
|
*/
|
|
21071
21087
|
addEventListener(event: 'update-target-url', listener: (event: UpdateTargetUrlEvent) => void, useCapture?: boolean): this;
|
|
21072
21088
|
removeEventListener(event: 'update-target-url', listener: (event: UpdateTargetUrlEvent) => void): this;
|
|
21089
|
+
/**
|
|
21090
|
+
* Emitted when a link is clicked in DevTools or 'Open in new tab' is selected for
|
|
21091
|
+
* a link in its context menu.
|
|
21092
|
+
*/
|
|
21073
21093
|
addEventListener(event: 'devtools-open-url', listener: (event: DevtoolsOpenUrlEvent) => void, useCapture?: boolean): this;
|
|
21074
21094
|
removeEventListener(event: 'devtools-open-url', listener: (event: DevtoolsOpenUrlEvent) => void): this;
|
|
21075
21095
|
/**
|
|
@@ -23109,6 +23129,17 @@ declare namespace Electron {
|
|
|
23109
23129
|
origin?: string;
|
|
23110
23130
|
}
|
|
23111
23131
|
|
|
23132
|
+
interface HighlightColorsOptions {
|
|
23133
|
+
/**
|
|
23134
|
+
* Colors used when menus are drawn with light colors.
|
|
23135
|
+
*/
|
|
23136
|
+
light?: Light;
|
|
23137
|
+
/**
|
|
23138
|
+
* Colors used when menus are drawn with dark colors.
|
|
23139
|
+
*/
|
|
23140
|
+
dark?: Dark;
|
|
23141
|
+
}
|
|
23142
|
+
|
|
23112
23143
|
interface IgnoreMouseEventsOptions {
|
|
23113
23144
|
/**
|
|
23114
23145
|
* If true, forwards mouse move messages to Chromium, enabling mouse related events
|
|
@@ -25836,6 +25867,18 @@ declare namespace Electron {
|
|
|
25836
25867
|
interface Children {
|
|
25837
25868
|
}
|
|
25838
25869
|
|
|
25870
|
+
interface Dark {
|
|
25871
|
+
/**
|
|
25872
|
+
* Background color of the hovered or keyboard-focused menu item, as a CSS color
|
|
25873
|
+
* string.
|
|
25874
|
+
*/
|
|
25875
|
+
background?: string;
|
|
25876
|
+
/**
|
|
25877
|
+
* Text color of the hovered or keyboard-focused menu item, as a CSS color string.
|
|
25878
|
+
*/
|
|
25879
|
+
foreground?: string;
|
|
25880
|
+
}
|
|
25881
|
+
|
|
25839
25882
|
interface EditFlags {
|
|
25840
25883
|
/**
|
|
25841
25884
|
* Whether the renderer believes it can undo.
|
|
@@ -25948,6 +25991,18 @@ declare namespace Electron {
|
|
|
25948
25991
|
enabled: boolean;
|
|
25949
25992
|
}
|
|
25950
25993
|
|
|
25994
|
+
interface Light {
|
|
25995
|
+
/**
|
|
25996
|
+
* Background color of the hovered or keyboard-focused menu item, as a CSS color
|
|
25997
|
+
* string (e.g. `#0067c0`).
|
|
25998
|
+
*/
|
|
25999
|
+
background?: string;
|
|
26000
|
+
/**
|
|
26001
|
+
* Text color of the hovered or keyboard-focused menu item, as a CSS color string.
|
|
26002
|
+
*/
|
|
26003
|
+
foreground?: string;
|
|
26004
|
+
}
|
|
26005
|
+
|
|
25951
26006
|
interface Margins {
|
|
25952
26007
|
/**
|
|
25953
26008
|
* Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen,
|
|
@@ -26373,6 +26428,7 @@ declare namespace Electron {
|
|
|
26373
26428
|
type HidDeviceAddedDetails = Electron.HidDeviceAddedDetails;
|
|
26374
26429
|
type HidDeviceRemovedDetails = Electron.HidDeviceRemovedDetails;
|
|
26375
26430
|
type HidDeviceRevokedDetails = Electron.HidDeviceRevokedDetails;
|
|
26431
|
+
type HighlightColorsOptions = Electron.HighlightColorsOptions;
|
|
26376
26432
|
type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions;
|
|
26377
26433
|
type ImportCertificateOptions = Electron.ImportCertificateOptions;
|
|
26378
26434
|
type ImportSharedTextureOptions = Electron.ImportSharedTextureOptions;
|
|
@@ -26505,6 +26561,7 @@ declare namespace Electron {
|
|
|
26505
26561
|
type WillResizeDetails = Electron.WillResizeDetails;
|
|
26506
26562
|
type Animate = Electron.Animate;
|
|
26507
26563
|
type Children = Electron.Children;
|
|
26564
|
+
type Dark = Electron.Dark;
|
|
26508
26565
|
type EditFlags = Electron.EditFlags;
|
|
26509
26566
|
type Env = Electron.Env;
|
|
26510
26567
|
type FeatureReports = Electron.FeatureReports;
|
|
@@ -26512,6 +26569,7 @@ declare namespace Electron {
|
|
|
26512
26569
|
type InputReports = Electron.InputReports;
|
|
26513
26570
|
type Interfaces = Electron.Interfaces;
|
|
26514
26571
|
type LaunchItems = Electron.LaunchItems;
|
|
26572
|
+
type Light = Electron.Light;
|
|
26515
26573
|
type Margins = Electron.Margins;
|
|
26516
26574
|
type MediaFlags = Electron.MediaFlags;
|
|
26517
26575
|
type Metadata = Electron.Metadata;
|
|
@@ -26804,6 +26862,7 @@ declare namespace Electron {
|
|
|
26804
26862
|
type HidDeviceAddedDetails = Electron.HidDeviceAddedDetails;
|
|
26805
26863
|
type HidDeviceRemovedDetails = Electron.HidDeviceRemovedDetails;
|
|
26806
26864
|
type HidDeviceRevokedDetails = Electron.HidDeviceRevokedDetails;
|
|
26865
|
+
type HighlightColorsOptions = Electron.HighlightColorsOptions;
|
|
26807
26866
|
type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions;
|
|
26808
26867
|
type ImportCertificateOptions = Electron.ImportCertificateOptions;
|
|
26809
26868
|
type ImportSharedTextureOptions = Electron.ImportSharedTextureOptions;
|
|
@@ -26936,6 +26995,7 @@ declare namespace Electron {
|
|
|
26936
26995
|
type WillResizeDetails = Electron.WillResizeDetails;
|
|
26937
26996
|
type Animate = Electron.Animate;
|
|
26938
26997
|
type Children = Electron.Children;
|
|
26998
|
+
type Dark = Electron.Dark;
|
|
26939
26999
|
type EditFlags = Electron.EditFlags;
|
|
26940
27000
|
type Env = Electron.Env;
|
|
26941
27001
|
type FeatureReports = Electron.FeatureReports;
|
|
@@ -26943,6 +27003,7 @@ declare namespace Electron {
|
|
|
26943
27003
|
type InputReports = Electron.InputReports;
|
|
26944
27004
|
type Interfaces = Electron.Interfaces;
|
|
26945
27005
|
type LaunchItems = Electron.LaunchItems;
|
|
27006
|
+
type Light = Electron.Light;
|
|
26946
27007
|
type Margins = Electron.Margins;
|
|
26947
27008
|
type MediaFlags = Electron.MediaFlags;
|
|
26948
27009
|
type Metadata = Electron.Metadata;
|
|
@@ -27158,6 +27219,7 @@ declare namespace Electron {
|
|
|
27158
27219
|
type HidDeviceAddedDetails = Electron.HidDeviceAddedDetails;
|
|
27159
27220
|
type HidDeviceRemovedDetails = Electron.HidDeviceRemovedDetails;
|
|
27160
27221
|
type HidDeviceRevokedDetails = Electron.HidDeviceRevokedDetails;
|
|
27222
|
+
type HighlightColorsOptions = Electron.HighlightColorsOptions;
|
|
27161
27223
|
type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions;
|
|
27162
27224
|
type ImportCertificateOptions = Electron.ImportCertificateOptions;
|
|
27163
27225
|
type ImportSharedTextureOptions = Electron.ImportSharedTextureOptions;
|
|
@@ -27290,6 +27352,7 @@ declare namespace Electron {
|
|
|
27290
27352
|
type WillResizeDetails = Electron.WillResizeDetails;
|
|
27291
27353
|
type Animate = Electron.Animate;
|
|
27292
27354
|
type Children = Electron.Children;
|
|
27355
|
+
type Dark = Electron.Dark;
|
|
27293
27356
|
type EditFlags = Electron.EditFlags;
|
|
27294
27357
|
type Env = Electron.Env;
|
|
27295
27358
|
type FeatureReports = Electron.FeatureReports;
|
|
@@ -27297,6 +27360,7 @@ declare namespace Electron {
|
|
|
27297
27360
|
type InputReports = Electron.InputReports;
|
|
27298
27361
|
type Interfaces = Electron.Interfaces;
|
|
27299
27362
|
type LaunchItems = Electron.LaunchItems;
|
|
27363
|
+
type Light = Electron.Light;
|
|
27300
27364
|
type Margins = Electron.Margins;
|
|
27301
27365
|
type MediaFlags = Electron.MediaFlags;
|
|
27302
27366
|
type Metadata = Electron.Metadata;
|
|
@@ -27514,6 +27578,7 @@ declare namespace Electron {
|
|
|
27514
27578
|
type HidDeviceAddedDetails = Electron.HidDeviceAddedDetails;
|
|
27515
27579
|
type HidDeviceRemovedDetails = Electron.HidDeviceRemovedDetails;
|
|
27516
27580
|
type HidDeviceRevokedDetails = Electron.HidDeviceRevokedDetails;
|
|
27581
|
+
type HighlightColorsOptions = Electron.HighlightColorsOptions;
|
|
27517
27582
|
type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions;
|
|
27518
27583
|
type ImportCertificateOptions = Electron.ImportCertificateOptions;
|
|
27519
27584
|
type ImportSharedTextureOptions = Electron.ImportSharedTextureOptions;
|
|
@@ -27646,6 +27711,7 @@ declare namespace Electron {
|
|
|
27646
27711
|
type WillResizeDetails = Electron.WillResizeDetails;
|
|
27647
27712
|
type Animate = Electron.Animate;
|
|
27648
27713
|
type Children = Electron.Children;
|
|
27714
|
+
type Dark = Electron.Dark;
|
|
27649
27715
|
type EditFlags = Electron.EditFlags;
|
|
27650
27716
|
type Env = Electron.Env;
|
|
27651
27717
|
type FeatureReports = Electron.FeatureReports;
|
|
@@ -27653,6 +27719,7 @@ declare namespace Electron {
|
|
|
27653
27719
|
type InputReports = Electron.InputReports;
|
|
27654
27720
|
type Interfaces = Electron.Interfaces;
|
|
27655
27721
|
type LaunchItems = Electron.LaunchItems;
|
|
27722
|
+
type Light = Electron.Light;
|
|
27656
27723
|
type Margins = Electron.Margins;
|
|
27657
27724
|
type MediaFlags = Electron.MediaFlags;
|
|
27658
27725
|
type Metadata = Electron.Metadata;
|
|
@@ -27967,6 +28034,7 @@ declare namespace Electron {
|
|
|
27967
28034
|
type HidDeviceAddedDetails = Electron.HidDeviceAddedDetails;
|
|
27968
28035
|
type HidDeviceRemovedDetails = Electron.HidDeviceRemovedDetails;
|
|
27969
28036
|
type HidDeviceRevokedDetails = Electron.HidDeviceRevokedDetails;
|
|
28037
|
+
type HighlightColorsOptions = Electron.HighlightColorsOptions;
|
|
27970
28038
|
type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions;
|
|
27971
28039
|
type ImportCertificateOptions = Electron.ImportCertificateOptions;
|
|
27972
28040
|
type ImportSharedTextureOptions = Electron.ImportSharedTextureOptions;
|
|
@@ -28099,6 +28167,7 @@ declare namespace Electron {
|
|
|
28099
28167
|
type WillResizeDetails = Electron.WillResizeDetails;
|
|
28100
28168
|
type Animate = Electron.Animate;
|
|
28101
28169
|
type Children = Electron.Children;
|
|
28170
|
+
type Dark = Electron.Dark;
|
|
28102
28171
|
type EditFlags = Electron.EditFlags;
|
|
28103
28172
|
type Env = Electron.Env;
|
|
28104
28173
|
type FeatureReports = Electron.FeatureReports;
|
|
@@ -28106,6 +28175,7 @@ declare namespace Electron {
|
|
|
28106
28175
|
type InputReports = Electron.InputReports;
|
|
28107
28176
|
type Interfaces = Electron.Interfaces;
|
|
28108
28177
|
type LaunchItems = Electron.LaunchItems;
|
|
28178
|
+
type Light = Electron.Light;
|
|
28109
28179
|
type Margins = Electron.Margins;
|
|
28110
28180
|
type MediaFlags = Electron.MediaFlags;
|
|
28111
28181
|
type Metadata = Electron.Metadata;
|
package/dist/version.json
CHANGED