electron-types 45.0.0 → 45.1.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.
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.0.0
17
+ npm install -D electron-types@45.1.0
18
18
  # or
19
- yarn add -D electron-types@45.0.0
19
+ yarn add -D electron-types@45.1.0
20
20
  # or
21
- pnpm add -D electron-types@45.0.0
21
+ pnpm add -D electron-types@45.1.0
22
22
  ```
23
23
 
24
24
  ## Usage
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 45.0.0
1
+ // Type definitions for Electron 45.1.0
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
@@ -11855,6 +11855,14 @@ declare namespace Electron {
11855
11855
 
11856
11856
  // Docs: https://electronjs.org/docs/api/structures/preload-script
11857
11857
 
11858
+ /**
11859
+ * Glob patterns for URLs the script will not run in.
11860
+ */
11861
+ excludeGlobs?: string[];
11862
+ /**
11863
+ * Match patterns for URLs the script will not run in.
11864
+ */
11865
+ excludeMatches?: string[];
11858
11866
  /**
11859
11867
  * Path of the script file. Must be an absolute path.
11860
11868
  */
@@ -11863,6 +11871,29 @@ declare namespace Electron {
11863
11871
  * Unique ID of preload script.
11864
11872
  */
11865
11873
  id: string;
11874
+ /**
11875
+ * Glob patterns applied after `matches`. A URL must also match one of these globs.
11876
+ * `*` matches any sequence of characters and `?` matches any single character.
11877
+ */
11878
+ includeGlobs?: string[];
11879
+ /**
11880
+ * Match patterns for URLs the script runs in. A custom protocol can be used if its
11881
+ * scheme is registered as `standard` with `protocol.registerSchemesAsPrivileged`.
11882
+ * To filter documents served from a non-standard scheme, use `includeGlobs` or
11883
+ * `excludeGlobs`, which match against the whole URL. If omitted, the script runs
11884
+ * for all URLs not excluded by other filters.
11885
+ */
11886
+ matches?: string[];
11887
+ /**
11888
+ * Whether a document whose URL has no origin of its own (`about:`, `blob:`,
11889
+ * `data:` or `filesystem:`) is matched by the origin of the frame that created it
11890
+ * instead of by its URL. This includes documents with an opaque origin, such as a
11891
+ * `data:` frame or a sandboxed `<iframe srcdoc>`. For example, an `about:blank`
11892
+ * popup opened by `https://example.com/page` is matched as `https://example.com/`.
11893
+ * When set, every pattern in `matches` must have a path of `/*`. Only applies to
11894
+ * `frame` contexts. Default is `false`.
11895
+ */
11896
+ matchOriginAsFallback?: boolean;
11866
11897
  /**
11867
11898
  * Context type where the preload script will be executed. Possible values include
11868
11899
  * `frame` or `service-worker`.
@@ -11874,6 +11905,14 @@ declare namespace Electron {
11874
11905
 
11875
11906
  // Docs: https://electronjs.org/docs/api/structures/preload-script-registration
11876
11907
 
11908
+ /**
11909
+ * Glob patterns for URLs the script will not run in.
11910
+ */
11911
+ excludeGlobs?: string[];
11912
+ /**
11913
+ * Match patterns for URLs the script will not run in.
11914
+ */
11915
+ excludeMatches?: string[];
11877
11916
  /**
11878
11917
  * Path of the script file. Must be an absolute path.
11879
11918
  */
@@ -11882,6 +11921,30 @@ declare namespace Electron {
11882
11921
  * Unique ID of preload script. Defaults to a random UUID.
11883
11922
  */
11884
11923
  id?: string;
11924
+ /**
11925
+ * Glob patterns applied after `matches`. A URL must also match one of these globs.
11926
+ * `*` matches any sequence of characters and `?` matches zero or one character.
11927
+ * Must not be empty.
11928
+ */
11929
+ includeGlobs?: string[];
11930
+ /**
11931
+ * Match patterns for URLs the script runs in. A custom protocol can be used if its
11932
+ * scheme is registered as `standard` with `protocol.registerSchemesAsPrivileged`.
11933
+ * To filter documents served from a non-standard scheme, use `includeGlobs` or
11934
+ * `excludeGlobs`, which match against the whole URL. If omitted, the script runs
11935
+ * for all URLs not excluded by other filters. Must not be empty.
11936
+ */
11937
+ matches?: string[];
11938
+ /**
11939
+ * Whether a document whose URL has no origin of its own (`about:`, `blob:`,
11940
+ * `data:` or `filesystem:`) is matched by the origin of the frame that created it
11941
+ * instead of by its URL. This includes documents with an opaque origin, such as a
11942
+ * `data:` frame or a sandboxed `<iframe srcdoc>`. For example, an `about:blank`
11943
+ * popup opened by `https://example.com/page` is matched as `https://example.com/`.
11944
+ * When set, every pattern in `matches` must have a path of `/*`. Only applies to
11945
+ * `frame` contexts. Default is `false`.
11946
+ */
11947
+ matchOriginAsFallback?: boolean;
11885
11948
  /**
11886
11949
  * Context type where the preload script will be executed. Possible values include
11887
11950
  * `frame` or `service-worker`.
@@ -14112,7 +14175,33 @@ declare namespace Electron {
14112
14175
  /**
14113
14176
  * Registers preload script that will be executed in its associated context type in
14114
14177
  * this session. For `frame` contexts, this will run prior to any preload defined
14115
- * in the web preferences of a WebContents.
14178
+ * in the web preferences of a WebContents. In-page navigations do not rerun the
14179
+ * preload script.
14180
+ *
14181
+ * URL filters can limit which documents or service workers a script runs in. They
14182
+ * behave like content script URL matching. A script runs for a URL that meets all
14183
+ * of these conditions:
14184
+ *
14185
+ * * It matches at least one pattern in `matches`, if set.
14186
+ * * It matches at least one glob in `includeGlobs`, if set.
14187
+ * * It does not match any pattern in `excludeMatches`.
14188
+ * * It does not match any glob in `excludeGlobs`.
14189
+ *
14190
+ * The URL that the filters are matched against depends on the context type:
14191
+ *
14192
+ * * For `service-worker` contexts, it is the service worker's scope.
14193
+ * * For `frame` contexts, it is the URL of the document being loaded, with these
14194
+ * special cases:
14195
+ * * The initial empty document of a frame or popup is matched as `about:blank`.
14196
+ * Set `matchOriginAsFallback` to match such documents by the origin of the frame
14197
+ * that created them instead, for example to keep a script out of the `about:blank`
14198
+ * popups of an excluded site.
14199
+ * * A `data:` URL loaded with `baseURLForDataURL` is matched by its base URL.
14200
+ * * The error page of a failed navigation is matched by the URL that failed to
14201
+ * load.
14202
+ *
14203
+ * Throws an error if any of the URL patterns are invalid, or if `matches` or
14204
+ * `includeGlobs` is an empty array.
14116
14205
  *
14117
14206
  * The ID of the registered preload script.
14118
14207
  */
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "electronVersion": "45.0.0",
3
- "extractedAt": "2026-10-21T06:22:20.558Z"
2
+ "electronVersion": "45.1.0",
3
+ "extractedAt": "2026-10-27T20:10:41.579Z"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-types",
3
- "version": "45.0.0",
3
+ "version": "45.1.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript type definitions extracted from the electron package",
6
6
  "types": "./dist/electron.d.ts",