electron-types 41.0.0-beta.3 → 41.0.0-beta.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
@@ -11,11 +11,11 @@ The official `electron` package is ~200MB because it includes the Electron binar
11
11
  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)):
12
12
 
13
13
  ```bash
14
- npm install -D electron-types@41.0.0-beta.3
14
+ npm install -D electron-types@41.0.0-beta.4
15
15
  # or
16
- yarn add -D electron-types@41.0.0-beta.3
16
+ yarn add -D electron-types@41.0.0-beta.4
17
17
  # or
18
- pnpm add -D electron-types@41.0.0-beta.3
18
+ pnpm add -D electron-types@41.0.0-beta.4
19
19
  ```
20
20
 
21
21
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 41.0.0-beta.3
1
+ // Type definitions for Electron 41.0.0-beta.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
@@ -517,7 +517,10 @@ declare namespace Electron {
517
517
  callback: (username?: string, password?: string) => void) => void): this;
518
518
  /**
519
519
  * Emitted when the user clicks the native macOS new tab button. The new tab button
520
- * is only visible if the current `BrowserWindow` has a `tabbingIdentifier`
520
+ * is only visible if the current `BrowserWindow` has a `tabbingIdentifier`.
521
+ *
522
+ * You must create a window in this handler in order for macOS tabbing to work as
523
+ * expected.
521
524
  *
522
525
  * @platform darwin
523
526
  */
@@ -1742,6 +1745,26 @@ declare namespace Electron {
1742
1745
  * @platform darwin
1743
1746
  */
1744
1747
  setSecureKeyboardEntryEnabled(enabled: boolean): void;
1748
+ /**
1749
+ * Changes the Toast Activator CLSID to `id`. If one is not set via this method, it
1750
+ * will be randomly generated for the app.
1751
+ *
1752
+ * * The value must be a valid GUID/CLSID in one of the following forms:
1753
+ * * Canonical brace-wrapped: `{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}`
1754
+ * (preferred)
1755
+ * * Canonical without braces: `XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX` (braces
1756
+ * will be added automatically)
1757
+ * * Hex digits are case-insensitive.
1758
+ *
1759
+ * This method should be called early (before showing notifications) so the value
1760
+ * is baked into the registration/shortcut. Supplying an empty string or an
1761
+ * unparsable value throws and leaves the existing (or generated) CLSID unchanged.
1762
+ * If this method is never called, a random CLSID is generated once per run and
1763
+ * exposed via `app.toastActivatorCLSID`.
1764
+ *
1765
+ * @platform win32
1766
+ */
1767
+ setToastActivatorCLSID(id: string): void;
1745
1768
  /**
1746
1769
  * Creates an `NSUserActivity` and sets it as the current activity. The activity is
1747
1770
  * eligible for Handoff to another device afterward.
@@ -1888,6 +1911,12 @@ declare namespace Electron {
1888
1911
  * @platform darwin,win32
1889
1912
  */
1890
1913
  readonly runningUnderARM64Translation: boolean;
1914
+ /**
1915
+ * A `string` property that returns the app's Toast Activator CLSID.
1916
+ *
1917
+ * @platform win32
1918
+ */
1919
+ readonly toastActivatorCLSID: string;
1891
1920
  /**
1892
1921
  * A `string` which is the user agent string Electron will use as a global
1893
1922
  * fallback.
@@ -2188,7 +2217,11 @@ declare namespace Electron {
2188
2217
  */
2189
2218
  removeListener(event: 'moved', listener: () => void): this;
2190
2219
  /**
2191
- * Emitted when the native new tab button is clicked.
2220
+ * Emitted when the user clicks the native macOS new tab button. The new tab button
2221
+ * is only visible if the current `BrowserWindow` has a `tabbingIdentifier`.
2222
+ *
2223
+ * You must create a window in this handler in order for macOS tabbing to work as
2224
+ * expected.
2192
2225
  *
2193
2226
  * @platform darwin
2194
2227
  */
@@ -4393,7 +4426,11 @@ declare namespace Electron {
4393
4426
  */
4394
4427
  removeListener(event: 'moved', listener: () => void): this;
4395
4428
  /**
4396
- * Emitted when the native new tab button is clicked.
4429
+ * Emitted when the user clicks the native macOS new tab button. The new tab button
4430
+ * is only visible if the current `BrowserWindow` has a `tabbingIdentifier`.
4431
+ *
4432
+ * You must create a window in this handler in order for macOS tabbing to work as
4433
+ * expected.
4397
4434
  *
4398
4435
  * @platform darwin
4399
4436
  */
@@ -4415,7 +4452,11 @@ declare namespace Electron {
4415
4452
  */
4416
4453
  removeListener(event: 'new-window-for-tab', listener: () => void): this;
4417
4454
  /**
4418
- * Emitted when the native new tab button is clicked.
4455
+ * Emitted when the user clicks the native macOS new tab button. The new tab button
4456
+ * is only visible if the current `BrowserWindow` has a `tabbingIdentifier`.
4457
+ *
4458
+ * You must create a window in this handler in order for macOS tabbing to work as
4459
+ * expected.
4419
4460
  *
4420
4461
  * @platform darwin
4421
4462
  */
@@ -10045,45 +10086,70 @@ declare namespace Electron {
10045
10086
  // Docs: https://electronjs.org/docs/api/notification
10046
10087
 
10047
10088
  /**
10048
- * @platform darwin
10089
+ * @platform darwin,win32
10049
10090
  */
10050
- on(event: 'action', listener: (event: Event,
10091
+ on(event: 'action', listener: (details: Event<NotificationActionEventParams>,
10051
10092
  /**
10052
- * The index of the action that was activated.
10093
+ * @deprecated
10053
10094
  */
10054
- index: number) => void): this;
10095
+ actionIndex: number,
10096
+ /**
10097
+ * @deprecated
10098
+ * @platform win32
10099
+ */
10100
+ selectionIndex: number) => void): this;
10055
10101
  /**
10056
- * @platform darwin
10102
+ * @platform darwin,win32
10057
10103
  */
10058
- off(event: 'action', listener: (event: Event,
10104
+ off(event: 'action', listener: (details: Event<NotificationActionEventParams>,
10105
+ /**
10106
+ * @deprecated
10107
+ */
10108
+ actionIndex: number,
10059
10109
  /**
10060
- * The index of the action that was activated.
10110
+ * @deprecated
10111
+ * @platform win32
10061
10112
  */
10062
- index: number) => void): this;
10113
+ selectionIndex: number) => void): this;
10063
10114
  /**
10064
- * @platform darwin
10115
+ * @platform darwin,win32
10065
10116
  */
10066
- once(event: 'action', listener: (event: Event,
10117
+ once(event: 'action', listener: (details: Event<NotificationActionEventParams>,
10118
+ /**
10119
+ * @deprecated
10120
+ */
10121
+ actionIndex: number,
10067
10122
  /**
10068
- * The index of the action that was activated.
10123
+ * @deprecated
10124
+ * @platform win32
10069
10125
  */
10070
- index: number) => void): this;
10126
+ selectionIndex: number) => void): this;
10071
10127
  /**
10072
- * @platform darwin
10128
+ * @platform darwin,win32
10073
10129
  */
10074
- addListener(event: 'action', listener: (event: Event,
10130
+ addListener(event: 'action', listener: (details: Event<NotificationActionEventParams>,
10131
+ /**
10132
+ * @deprecated
10133
+ */
10134
+ actionIndex: number,
10075
10135
  /**
10076
- * The index of the action that was activated.
10136
+ * @deprecated
10137
+ * @platform win32
10077
10138
  */
10078
- index: number) => void): this;
10139
+ selectionIndex: number) => void): this;
10079
10140
  /**
10080
- * @platform darwin
10141
+ * @platform darwin,win32
10081
10142
  */
10082
- removeListener(event: 'action', listener: (event: Event,
10143
+ removeListener(event: 'action', listener: (details: Event<NotificationActionEventParams>,
10144
+ /**
10145
+ * @deprecated
10146
+ */
10147
+ actionIndex: number,
10083
10148
  /**
10084
- * The index of the action that was activated.
10149
+ * @deprecated
10150
+ * @platform win32
10085
10151
  */
10086
- index: number) => void): this;
10152
+ selectionIndex: number) => void): this;
10087
10153
  /**
10088
10154
  * Emitted when the notification is clicked by the user.
10089
10155
  */
@@ -10157,43 +10223,43 @@ declare namespace Electron {
10157
10223
  * Emitted when the user clicks the "Reply" button on a notification with
10158
10224
  * `hasReply: true`.
10159
10225
  *
10160
- * @platform darwin
10226
+ * @platform darwin,win32
10161
10227
  */
10162
- on(event: 'reply', listener: (event: Event,
10228
+ on(event: 'reply', listener: (details: Event<NotificationReplyEventParams>,
10163
10229
  /**
10164
- * The string the user entered into the inline reply field.
10230
+ * @deprecated
10165
10231
  */
10166
10232
  reply: string) => void): this;
10167
10233
  /**
10168
- * @platform darwin
10234
+ * @platform darwin,win32
10169
10235
  */
10170
- off(event: 'reply', listener: (event: Event,
10236
+ off(event: 'reply', listener: (details: Event<NotificationReplyEventParams>,
10171
10237
  /**
10172
- * The string the user entered into the inline reply field.
10238
+ * @deprecated
10173
10239
  */
10174
10240
  reply: string) => void): this;
10175
10241
  /**
10176
- * @platform darwin
10242
+ * @platform darwin,win32
10177
10243
  */
10178
- once(event: 'reply', listener: (event: Event,
10244
+ once(event: 'reply', listener: (details: Event<NotificationReplyEventParams>,
10179
10245
  /**
10180
- * The string the user entered into the inline reply field.
10246
+ * @deprecated
10181
10247
  */
10182
10248
  reply: string) => void): this;
10183
10249
  /**
10184
- * @platform darwin
10250
+ * @platform darwin,win32
10185
10251
  */
10186
- addListener(event: 'reply', listener: (event: Event,
10252
+ addListener(event: 'reply', listener: (details: Event<NotificationReplyEventParams>,
10187
10253
  /**
10188
- * The string the user entered into the inline reply field.
10254
+ * @deprecated
10189
10255
  */
10190
10256
  reply: string) => void): this;
10191
10257
  /**
10192
- * @platform darwin
10258
+ * @platform darwin,win32
10193
10259
  */
10194
- removeListener(event: 'reply', listener: (event: Event,
10260
+ removeListener(event: 'reply', listener: (details: Event<NotificationReplyEventParams>,
10195
10261
  /**
10196
- * The string the user entered into the inline reply field.
10262
+ * @deprecated
10197
10263
  */
10198
10264
  reply: string) => void): this;
10199
10265
  /**
@@ -10300,14 +10366,21 @@ declare namespace Electron {
10300
10366
 
10301
10367
  // Docs: https://electronjs.org/docs/api/structures/notification-action
10302
10368
 
10369
+ /**
10370
+ * The list of items for the `selection` action `type`.
10371
+ *
10372
+ * @platform win32
10373
+ */
10374
+ items?: string[];
10303
10375
  /**
10304
10376
  * The label for the given action.
10305
10377
  */
10306
10378
  text?: string;
10307
10379
  /**
10308
- * The type of action, can be `button`.
10380
+ * The type of action, can be `button` or `selection`. `selection` is only
10381
+ * supported on Windows.
10309
10382
  */
10310
- type: ('button');
10383
+ type: ('button' | 'selection');
10311
10384
  }
10312
10385
 
10313
10386
  interface NotificationResponse {
@@ -17714,7 +17787,8 @@ declare namespace Electron {
17714
17787
  * When a custom `pageSize` is passed, Chromium attempts to validate platform
17715
17788
  * specific minimum values for `width_microns` and `height_microns`. Width and
17716
17789
  * height must both be minimum 353 microns but may be higher on some operating
17717
- * systems.
17790
+ * systems. If a valid `pageSize` is not passed and `usePrinterDefaultPageSize` is
17791
+ * `false`, an error will be thrown.
17718
17792
  *
17719
17793
  * Prints window's web page. When `silent` is set to `true`, Electron will pick the
17720
17794
  * system's default printer if `deviceName` is empty and the default settings for
@@ -21666,6 +21740,19 @@ declare namespace Electron {
21666
21740
  supportsZeroCopyWebGpuImport: boolean;
21667
21741
  }
21668
21742
 
21743
+ interface NotificationActionEventParams {
21744
+ /**
21745
+ * The index of the action that was activated.
21746
+ */
21747
+ actionIndex: number;
21748
+ /**
21749
+ * The index of the selected item, if one was chosen. -1 if none was chosen.
21750
+ *
21751
+ * @platform win32
21752
+ */
21753
+ selectionIndex: number;
21754
+ }
21755
+
21669
21756
  interface NotificationConstructorOptions {
21670
21757
  /**
21671
21758
  * A title for the notification, which will be displayed at the top of the
@@ -21746,6 +21833,13 @@ declare namespace Electron {
21746
21833
  toastXml?: string;
21747
21834
  }
21748
21835
 
21836
+ interface NotificationReplyEventParams {
21837
+ /**
21838
+ * The string the user entered into the inline reply field.
21839
+ */
21840
+ reply: string;
21841
+ }
21842
+
21749
21843
  interface Offscreen {
21750
21844
  /**
21751
21845
  * Whether to use GPU shared texture for accelerated paint event. Defaults to
@@ -23409,6 +23503,14 @@ declare namespace Electron {
23409
23503
  * `width`.
23410
23504
  */
23411
23505
  pageSize?: (('A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6' | 'Legal' | 'Letter' | 'Tabloid')) | (Size);
23506
+ /**
23507
+ * Whether to use a given printer's default page size. Default is `false`. Cannot
23508
+ * be combined with `pageSize`. When `deviceName` is provided, uses the default
23509
+ * page size of that specific printer. When `deviceName` is not provided, uses the
23510
+ * default page size of the system's default printer. If the printer's default page
23511
+ * size cannot be retrieved, falls back to A4 (210mm x 297mm).
23512
+ */
23513
+ usePrinterDefaultPageSize?: boolean;
23412
23514
  }
23413
23515
 
23414
23516
  interface WebContentsViewConstructorOptions {
@@ -23584,6 +23686,14 @@ declare namespace Electron {
23584
23686
  * `Letter`, `Tabloid` or an Object containing `height` in microns.
23585
23687
  */
23586
23688
  pageSize?: (('A3' | 'A4' | 'A5' | 'Legal' | 'Letter' | 'Tabloid')) | (Size);
23689
+ /**
23690
+ * Whether to use the system's default page size. Default is `false`. Cannot be
23691
+ * combined with `pageSize`. When `deviceName` is provided, uses the default page
23692
+ * size of that specific printer. When `deviceName` is not provided, uses the
23693
+ * default page size of the system's default printer. If the printer's default page
23694
+ * size cannot be retrieved, falls back to A4 (210mm x 297mm).
23695
+ */
23696
+ usePrinterDefaultPageSize?: boolean;
23587
23697
  }
23588
23698
 
23589
23699
  interface WillFrameNavigateEvent extends DOMEvent {
@@ -24150,7 +24260,9 @@ declare namespace Electron {
24150
24260
  type MessageEvent = Electron.MessageEvent;
24151
24261
  type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
24152
24262
  type NativePixmap = Electron.NativePixmap;
24263
+ type NotificationActionEventParams = Electron.NotificationActionEventParams;
24153
24264
  type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
24265
+ type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
24154
24266
  type Offscreen = Electron.Offscreen;
24155
24267
  type OnBeforeRedirectListenerDetails = Electron.OnBeforeRedirectListenerDetails;
24156
24268
  type OnBeforeRequestListenerDetails = Electron.OnBeforeRequestListenerDetails;
@@ -24544,7 +24656,9 @@ declare namespace Electron {
24544
24656
  type MessageEvent = Electron.MessageEvent;
24545
24657
  type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
24546
24658
  type NativePixmap = Electron.NativePixmap;
24659
+ type NotificationActionEventParams = Electron.NotificationActionEventParams;
24547
24660
  type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
24661
+ type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
24548
24662
  type Offscreen = Electron.Offscreen;
24549
24663
  type OnBeforeRedirectListenerDetails = Electron.OnBeforeRedirectListenerDetails;
24550
24664
  type OnBeforeRequestListenerDetails = Electron.OnBeforeRequestListenerDetails;
@@ -24866,7 +24980,9 @@ declare namespace Electron {
24866
24980
  type MessageEvent = Electron.MessageEvent;
24867
24981
  type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
24868
24982
  type NativePixmap = Electron.NativePixmap;
24983
+ type NotificationActionEventParams = Electron.NotificationActionEventParams;
24869
24984
  type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
24985
+ type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
24870
24986
  type Offscreen = Electron.Offscreen;
24871
24987
  type OnBeforeRedirectListenerDetails = Electron.OnBeforeRedirectListenerDetails;
24872
24988
  type OnBeforeRequestListenerDetails = Electron.OnBeforeRequestListenerDetails;
@@ -25187,7 +25303,9 @@ declare namespace Electron {
25187
25303
  type MessageEvent = Electron.MessageEvent;
25188
25304
  type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
25189
25305
  type NativePixmap = Electron.NativePixmap;
25306
+ type NotificationActionEventParams = Electron.NotificationActionEventParams;
25190
25307
  type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
25308
+ type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
25191
25309
  type Offscreen = Electron.Offscreen;
25192
25310
  type OnBeforeRedirectListenerDetails = Electron.OnBeforeRedirectListenerDetails;
25193
25311
  type OnBeforeRequestListenerDetails = Electron.OnBeforeRequestListenerDetails;
@@ -25602,7 +25720,9 @@ declare namespace Electron {
25602
25720
  type MessageEvent = Electron.MessageEvent;
25603
25721
  type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions;
25604
25722
  type NativePixmap = Electron.NativePixmap;
25723
+ type NotificationActionEventParams = Electron.NotificationActionEventParams;
25605
25724
  type NotificationConstructorOptions = Electron.NotificationConstructorOptions;
25725
+ type NotificationReplyEventParams = Electron.NotificationReplyEventParams;
25606
25726
  type Offscreen = Electron.Offscreen;
25607
25727
  type OnBeforeRedirectListenerDetails = Electron.OnBeforeRedirectListenerDetails;
25608
25728
  type OnBeforeRequestListenerDetails = Electron.OnBeforeRequestListenerDetails;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "41.0.0-beta.3",
3
- "extractedAt": "2026-02-17T00:47:37.380Z"
2
+ "electronVersion": "41.0.0-beta.4",
3
+ "extractedAt": "2026-02-20T00:45:27.560Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "41.0.0-beta.3",
3
+ "version": "41.0.0-beta.4",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",