@overwolf/ow-electron-packages-types 1.0.3 → 1.1.0-beta.2
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/package.json +5 -2
- package/types.d.ts +138 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overwolf/ow-electron-packages-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.1.0-beta.2",
|
|
4
4
|
"description": "Type definition file for autocompletion and documentation purposes for ow-electron packages",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"types": "types.d.ts",
|
|
@@ -33,5 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"tag": "beta"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"glob": "^13.0.0"
|
|
36
39
|
}
|
|
37
|
-
}
|
|
40
|
+
}
|
package/types.d.ts
CHANGED
|
@@ -490,7 +490,15 @@ type CaptureSourceType =
|
|
|
490
490
|
/**
|
|
491
491
|
* Capture a specific application window.
|
|
492
492
|
*/
|
|
493
|
-
| 'Window'
|
|
493
|
+
| 'Window'
|
|
494
|
+
/**
|
|
495
|
+
* Capture a specific image.
|
|
496
|
+
*/
|
|
497
|
+
| 'Image'
|
|
498
|
+
/**
|
|
499
|
+
* Capture a solid color screen.
|
|
500
|
+
*/
|
|
501
|
+
| 'Color';
|
|
494
502
|
|
|
495
503
|
|
|
496
504
|
|
|
@@ -2011,7 +2019,9 @@ export interface AudioNoiseSuppressFilterV2 extends AudioFilterBase {
|
|
|
2011
2019
|
* This type uses the `id` property as a type discriminator. When used in a switch
|
|
2012
2020
|
* statement or conditional, TypeScript will narrow the `parameters` to the
|
|
2013
2021
|
* specific interface associated with that ID.
|
|
2014
|
-
*
|
|
2022
|
+
*
|
|
2023
|
+
* For more information about the filter types, see [OBS Audio Filters](https://obsproject.com/kb/filters-guide#:~:text=the%20Source%20image-,Audio/Video%20Filters,-Compressor).
|
|
2024
|
+
* @example
|
|
2015
2025
|
* ```typescript
|
|
2016
2026
|
* function applyFilter(filter: AudioFilter) {
|
|
2017
2027
|
* if (filter.id === 'gain_filter') {
|
|
@@ -2672,6 +2682,44 @@ interface WindowCaptureSourceSettings extends CaptureSourceSettings {
|
|
|
2672
2682
|
compatibility?: boolean;
|
|
2673
2683
|
}
|
|
2674
2684
|
|
|
2685
|
+
/**
|
|
2686
|
+
* Settings for capturing a static image as a source.
|
|
2687
|
+
*
|
|
2688
|
+
* Extends {@link CaptureSourceSettings} with image-specific options such as file path.
|
|
2689
|
+
*
|
|
2690
|
+
* @see CaptureSourceSettings
|
|
2691
|
+
*/
|
|
2692
|
+
export interface ImageCaptureSourceSettings extends CaptureSourceSettings {
|
|
2693
|
+
/**
|
|
2694
|
+
* Image file path.
|
|
2695
|
+
*/
|
|
2696
|
+
path: string;
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
/**
|
|
2700
|
+
* Settings for capturing a solid color as a source.
|
|
2701
|
+
*
|
|
2702
|
+
* Extends {@link CaptureSourceSettings} with color-specific options such as color value, width, and height.
|
|
2703
|
+
*
|
|
2704
|
+
* @see CaptureSourceSettings
|
|
2705
|
+
*/
|
|
2706
|
+
export interface ColorCaptureSourceSettings extends CaptureSourceSettings {
|
|
2707
|
+
/**
|
|
2708
|
+
* Color in #RRGGBBAA format. (red green blue alpha)
|
|
2709
|
+
*/
|
|
2710
|
+
color: string;
|
|
2711
|
+
|
|
2712
|
+
/**
|
|
2713
|
+
* Width in pixels
|
|
2714
|
+
*/
|
|
2715
|
+
width: number;
|
|
2716
|
+
|
|
2717
|
+
/**
|
|
2718
|
+
* Height in pixels
|
|
2719
|
+
*/
|
|
2720
|
+
height: number;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2675
2723
|
/**
|
|
2676
2724
|
* Information about a generic capture source configuration, used for identifying and configuring
|
|
2677
2725
|
* a video capture input such as a display, game, or application window.
|
|
@@ -2775,6 +2823,54 @@ interface WindowCaptureSource extends CaptureSource {
|
|
|
2775
2823
|
readonly properties: WindowCaptureSourceSettings;
|
|
2776
2824
|
}
|
|
2777
2825
|
|
|
2826
|
+
/**
|
|
2827
|
+
* Image-based capture source configuration.
|
|
2828
|
+
*
|
|
2829
|
+
* Extends {@link CaptureSource} with the `'Image'` type and
|
|
2830
|
+
* configuration options for capturing a static image file.
|
|
2831
|
+
*/
|
|
2832
|
+
export interface ImageCaptureSource extends CaptureSource {
|
|
2833
|
+
/**
|
|
2834
|
+
* The capture source type.
|
|
2835
|
+
*
|
|
2836
|
+
* Always set to `'Image'` for this interface.
|
|
2837
|
+
*/
|
|
2838
|
+
readonly type: 'Image';
|
|
2839
|
+
|
|
2840
|
+
/**
|
|
2841
|
+
* Configuration settings for image capture.
|
|
2842
|
+
*
|
|
2843
|
+
* Includes file path.
|
|
2844
|
+
*
|
|
2845
|
+
* @see ImageCaptureSourceSettings
|
|
2846
|
+
*/
|
|
2847
|
+
readonly properties: ImageCaptureSourceSettings;
|
|
2848
|
+
}
|
|
2849
|
+
|
|
2850
|
+
/**
|
|
2851
|
+
* Color-based capture source configuration.
|
|
2852
|
+
*
|
|
2853
|
+
* Extends {@link CaptureSource} with the `'Color'` type and
|
|
2854
|
+
* configuration options for capturing a solid color.
|
|
2855
|
+
*/
|
|
2856
|
+
export interface ColorCaptureSource extends CaptureSource {
|
|
2857
|
+
/**
|
|
2858
|
+
* The capture source type.
|
|
2859
|
+
*
|
|
2860
|
+
* Always set to `'Color'` for this interface.
|
|
2861
|
+
*/
|
|
2862
|
+
readonly type: 'Color';
|
|
2863
|
+
|
|
2864
|
+
/**
|
|
2865
|
+
* Configuration settings for color capture.
|
|
2866
|
+
*
|
|
2867
|
+
* Includes color value, width, and height.
|
|
2868
|
+
*
|
|
2869
|
+
* @see ColorCaptureSourceSettings
|
|
2870
|
+
*/
|
|
2871
|
+
readonly properties: ColorCaptureSourceSettings;
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2778
2874
|
|
|
2779
2875
|
/**
|
|
2780
2876
|
* Configuration for all audio-related settings.
|
|
@@ -3377,7 +3473,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
|
|
|
3377
3473
|
* @returns The builder instance for chaining.
|
|
3378
3474
|
*/
|
|
3379
3475
|
addScreenSource(
|
|
3380
|
-
settings: MonitorCaptureSourceSettings
|
|
3476
|
+
settings: MonitorCaptureSourceSettings,
|
|
3381
3477
|
): CaptureSettingsBuilder;
|
|
3382
3478
|
|
|
3383
3479
|
/**
|
|
@@ -3394,7 +3490,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
|
|
|
3394
3490
|
* @param settings
|
|
3395
3491
|
*/
|
|
3396
3492
|
addWindowSource(
|
|
3397
|
-
settings: WindowCaptureSourceSettings
|
|
3493
|
+
settings: WindowCaptureSourceSettings,
|
|
3398
3494
|
): CaptureSettingsBuilder;
|
|
3399
3495
|
|
|
3400
3496
|
/**
|
|
@@ -3405,9 +3501,21 @@ interface CaptureSettingsBuilder extends CaptureSettings {
|
|
|
3405
3501
|
*/
|
|
3406
3502
|
addBrowserWindowSource(
|
|
3407
3503
|
browserWindow: BrowserWindow,
|
|
3408
|
-
setting: WindowCaptureSourceSettings
|
|
3504
|
+
setting: WindowCaptureSourceSettings,
|
|
3409
3505
|
): CaptureSettingsBuilder;
|
|
3410
3506
|
|
|
3507
|
+
/**
|
|
3508
|
+
* Add Image capture source
|
|
3509
|
+
* @param settings
|
|
3510
|
+
*/
|
|
3511
|
+
addImageSource(settings: ImageCaptureSourceSettings): CaptureSettingsBuilder;
|
|
3512
|
+
|
|
3513
|
+
/**
|
|
3514
|
+
* Add Color capture source
|
|
3515
|
+
* @param settings
|
|
3516
|
+
*/
|
|
3517
|
+
addColorSource(settings: ColorCaptureSourceSettings): CaptureSettingsBuilder;
|
|
3518
|
+
|
|
3411
3519
|
/**
|
|
3412
3520
|
* Adds an audio device for capturing input or output audio.
|
|
3413
3521
|
*
|
|
@@ -3417,7 +3525,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
|
|
|
3417
3525
|
*/
|
|
3418
3526
|
addAudioCapture(
|
|
3419
3527
|
params: AudioDeviceParams,
|
|
3420
|
-
settings?: AudioDeviceSettings
|
|
3528
|
+
settings?: AudioDeviceSettings,
|
|
3421
3529
|
): CaptureSettingsBuilder;
|
|
3422
3530
|
|
|
3423
3531
|
/**
|
|
@@ -3431,7 +3539,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
|
|
|
3431
3539
|
addAudioDefaultCapture(
|
|
3432
3540
|
type: AudioDeviceType,
|
|
3433
3541
|
params?: DefaultAudioDeviceParams,
|
|
3434
|
-
settings?: AudioDeviceSettings
|
|
3542
|
+
settings?: AudioDeviceSettings,
|
|
3435
3543
|
): CaptureSettingsBuilder;
|
|
3436
3544
|
|
|
3437
3545
|
/**
|
|
@@ -3443,7 +3551,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
|
|
|
3443
3551
|
*/
|
|
3444
3552
|
addApplicationAudioCapture(
|
|
3445
3553
|
param: ApplicationAudioCaptureParams,
|
|
3446
|
-
settings?: AudioDeviceSettings
|
|
3554
|
+
settings?: AudioDeviceSettings,
|
|
3447
3555
|
): CaptureSettingsBuilder;
|
|
3448
3556
|
|
|
3449
3557
|
/**
|
|
@@ -4701,6 +4809,14 @@ interface OverlayWindowOptions
|
|
|
4701
4809
|
* modifiers: { ctrl: true, alt: true },
|
|
4702
4810
|
* passthrough: false
|
|
4703
4811
|
* };
|
|
4812
|
+
*
|
|
4813
|
+
* // Since 1.13.3: use W3C KeyboardEvent.code strings (preferred, layout-independent)
|
|
4814
|
+
* const toggleHotkey: IOverlayHotkey = {
|
|
4815
|
+
* name: 'toggle',
|
|
4816
|
+
* keyCode: 'KeyF',
|
|
4817
|
+
* modifiers: { ctrl: true, custom: 'Tab' },
|
|
4818
|
+
* passthrough: true
|
|
4819
|
+
* };
|
|
4704
4820
|
* ```
|
|
4705
4821
|
*/
|
|
4706
4822
|
interface IOverlayHotkey {
|
|
@@ -4710,16 +4826,21 @@ interface IOverlayHotkey {
|
|
|
4710
4826
|
name: string;
|
|
4711
4827
|
|
|
4712
4828
|
/**
|
|
4713
|
-
* Primary key code for the hotkey.
|
|
4829
|
+
* Primary key code for the hotkey.
|
|
4830
|
+
*
|
|
4831
|
+
* Accepts a numeric Windows Virtual-Key code or, since 1.13.3, a W3C
|
|
4832
|
+
* `KeyboardEvent.code` string (e.g. `'KeyA'`, `'F10'`, `'ArrowUp'`).
|
|
4833
|
+
* String values are resolved to VK codes at registration time; an unknown
|
|
4834
|
+
* string throws an error.
|
|
4714
4835
|
*/
|
|
4715
|
-
keyCode: number;
|
|
4836
|
+
keyCode: number | string;
|
|
4716
4837
|
|
|
4717
4838
|
/**
|
|
4718
4839
|
* Modifier keys that must be pressed along with the main key.
|
|
4719
4840
|
*/
|
|
4720
4841
|
modifiers?: {
|
|
4721
4842
|
/**
|
|
4722
|
-
* Used for `alt`
|
|
4843
|
+
* Used for `alt` key.
|
|
4723
4844
|
*/
|
|
4724
4845
|
alt?: boolean;
|
|
4725
4846
|
/**
|
|
@@ -4731,9 +4852,11 @@ interface IOverlayHotkey {
|
|
|
4731
4852
|
*/
|
|
4732
4853
|
shift?: boolean;
|
|
4733
4854
|
/**
|
|
4734
|
-
* Custom key binding.
|
|
4855
|
+
* Custom key binding. Accepts a numeric Windows Virtual-Key code or,
|
|
4856
|
+
* since 1.13.3, a W3C `KeyboardEvent.code` string (same format as
|
|
4857
|
+
* `keyCode`).
|
|
4735
4858
|
*/
|
|
4736
|
-
custom?: number;
|
|
4859
|
+
custom?: number | string;
|
|
4737
4860
|
/**
|
|
4738
4861
|
* Use for the `windows` or `command` key.
|
|
4739
4862
|
*/
|
|
@@ -4742,10 +4865,10 @@ interface IOverlayHotkey {
|
|
|
4742
4865
|
|
|
4743
4866
|
/**
|
|
4744
4867
|
* Controls whether the hotkey will be passed through to the underlying game.
|
|
4745
|
-
*
|
|
4868
|
+
*
|
|
4746
4869
|
* - If `true`, the hotkey will be captured by the overlay and pass to the game.
|
|
4747
4870
|
* - If `false`, the hotkey will be captured exclusively by the overlay.
|
|
4748
|
-
*
|
|
4871
|
+
*
|
|
4749
4872
|
* @default false
|
|
4750
4873
|
*/
|
|
4751
4874
|
passthrough?: boolean;
|