@overwolf/ow-electron-packages-types 1.0.1-beta.1 → 1.0.1-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.
Files changed (2) hide show
  1. package/package.json +5 -2
  2. package/types.d.ts +113 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overwolf/ow-electron-packages-types",
3
- "version": "1.0.1-beta.1",
3
+ "version": "1.0.1-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
 
@@ -2672,6 +2680,44 @@ interface WindowCaptureSourceSettings extends CaptureSourceSettings {
2672
2680
  compatibility?: boolean;
2673
2681
  }
2674
2682
 
2683
+ /**
2684
+ * Settings for capturing a static image as a source.
2685
+ *
2686
+ * Extends {@link CaptureSourceSettings} with image-specific options such as file path.
2687
+ *
2688
+ * @see CaptureSourceSettings
2689
+ */
2690
+ export interface ImageCaptureSourceSettings extends CaptureSourceSettings {
2691
+ /**
2692
+ * Image file path.
2693
+ */
2694
+ path: string;
2695
+ }
2696
+
2697
+ /**
2698
+ * Settings for capturing a solid color as a source.
2699
+ *
2700
+ * Extends {@link CaptureSourceSettings} with color-specific options such as color value, width, and height.
2701
+ *
2702
+ * @see CaptureSourceSettings
2703
+ */
2704
+ export interface ColorCaptureSourceSettings extends CaptureSourceSettings {
2705
+ /**
2706
+ * Color in #AARRGGBB format. (alpha red green blue)
2707
+ */
2708
+ color: string;
2709
+
2710
+ /**
2711
+ * Width in pixels
2712
+ */
2713
+ width: number;
2714
+
2715
+ /**
2716
+ * Height in pixels
2717
+ */
2718
+ height: number;
2719
+ }
2720
+
2675
2721
  /**
2676
2722
  * Information about a generic capture source configuration, used for identifying and configuring
2677
2723
  * a video capture input such as a display, game, or application window.
@@ -2775,6 +2821,54 @@ interface WindowCaptureSource extends CaptureSource {
2775
2821
  readonly properties: WindowCaptureSourceSettings;
2776
2822
  }
2777
2823
 
2824
+ /**
2825
+ * Image-based capture source configuration.
2826
+ *
2827
+ * Extends {@link CaptureSource} with the `'Image'` type and
2828
+ * configuration options for capturing a static image file.
2829
+ */
2830
+ export interface ImageCaptureSource extends CaptureSource {
2831
+ /**
2832
+ * The capture source type.
2833
+ *
2834
+ * Always set to `'Image'` for this interface.
2835
+ */
2836
+ readonly type: 'Image';
2837
+
2838
+ /**
2839
+ * Configuration settings for image capture.
2840
+ *
2841
+ * Includes file path.
2842
+ *
2843
+ * @see ImageCaptureSourceSettings
2844
+ */
2845
+ readonly properties: ImageCaptureSourceSettings;
2846
+ }
2847
+
2848
+ /**
2849
+ * Color-based capture source configuration.
2850
+ *
2851
+ * Extends {@link CaptureSource} with the `'Color'` type and
2852
+ * configuration options for capturing a solid color.
2853
+ */
2854
+ export interface ColorCaptureSource extends CaptureSource {
2855
+ /**
2856
+ * The capture source type.
2857
+ *
2858
+ * Always set to `'Color'` for this interface.
2859
+ */
2860
+ readonly type: 'Color';
2861
+
2862
+ /**
2863
+ * Configuration settings for color capture.
2864
+ *
2865
+ * Includes color value, width, and height.
2866
+ *
2867
+ * @see ColorCaptureSourceSettings
2868
+ */
2869
+ readonly properties: ColorCaptureSourceSettings;
2870
+ }
2871
+
2778
2872
 
2779
2873
  /**
2780
2874
  * Configuration for all audio-related settings.
@@ -3377,7 +3471,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3377
3471
  * @returns The builder instance for chaining.
3378
3472
  */
3379
3473
  addScreenSource(
3380
- settings: MonitorCaptureSourceSettings
3474
+ settings: MonitorCaptureSourceSettings,
3381
3475
  ): CaptureSettingsBuilder;
3382
3476
 
3383
3477
  /**
@@ -3394,7 +3488,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3394
3488
  * @param settings
3395
3489
  */
3396
3490
  addWindowSource(
3397
- settings: WindowCaptureSourceSettings
3491
+ settings: WindowCaptureSourceSettings,
3398
3492
  ): CaptureSettingsBuilder;
3399
3493
 
3400
3494
  /**
@@ -3405,9 +3499,21 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3405
3499
  */
3406
3500
  addBrowserWindowSource(
3407
3501
  browserWindow: BrowserWindow,
3408
- setting: WindowCaptureSourceSettings
3502
+ setting: WindowCaptureSourceSettings,
3409
3503
  ): CaptureSettingsBuilder;
3410
3504
 
3505
+ /**
3506
+ * Add Image capture source
3507
+ * @param settings
3508
+ */
3509
+ addImageSource(settings: ImageCaptureSourceSettings): CaptureSettingsBuilder;
3510
+
3511
+ /**
3512
+ * Add Color capture source
3513
+ * @param settings
3514
+ */
3515
+ addColorSource(settings: ColorCaptureSourceSettings): CaptureSettingsBuilder;
3516
+
3411
3517
  /**
3412
3518
  * Adds an audio device for capturing input or output audio.
3413
3519
  *
@@ -3417,7 +3523,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3417
3523
  */
3418
3524
  addAudioCapture(
3419
3525
  params: AudioDeviceParams,
3420
- settings?: AudioDeviceSettings
3526
+ settings?: AudioDeviceSettings,
3421
3527
  ): CaptureSettingsBuilder;
3422
3528
 
3423
3529
  /**
@@ -3431,7 +3537,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3431
3537
  addAudioDefaultCapture(
3432
3538
  type: AudioDeviceType,
3433
3539
  params?: DefaultAudioDeviceParams,
3434
- settings?: AudioDeviceSettings
3540
+ settings?: AudioDeviceSettings,
3435
3541
  ): CaptureSettingsBuilder;
3436
3542
 
3437
3543
  /**
@@ -3443,7 +3549,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3443
3549
  */
3444
3550
  addApplicationAudioCapture(
3445
3551
  param: ApplicationAudioCaptureParams,
3446
- settings?: AudioDeviceSettings
3552
+ settings?: AudioDeviceSettings,
3447
3553
  ): CaptureSettingsBuilder;
3448
3554
 
3449
3555
  /**