@girs/gstinterfaces-0.10 0.10.0-3.2.4 → 0.10.0-3.2.6

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
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gstinterfaces-0.10)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GstInterfaces-0.10, generated from library version 0.10.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for GstInterfaces-0.10, generated from library version 0.10.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
9
9
 
10
10
 
11
11
  ## Install
@@ -81,6 +81,19 @@ Now you have also type support for this, too:
81
81
  const GstInterfaces = imports.gi.GstInterfaces;
82
82
  ```
83
83
 
84
+
85
+ ### ESM vs. CommonJS
86
+
87
+ GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
88
+
89
+ In TypeScript projects for GJS and GNOME Shell extensions, you have the flexibility to use `ESM` syntax and then decide the import syntax for your bundled file. If your bundler is configured to use `CommonJS`, it will convert to the GJS-specific global imports syntax, like `const moduleName = imports.gi[moduleName]`. This is different from the traditional `require` syntax seen in Node.js. The global imports syntax is chosen because it aligns with the CommonJS format supported by NPM, which is used for the generated type definitions and this package.
90
+
91
+ On the other hand, if you configure your bundler to use ESM, it will retain the ESM import syntax. It's crucial to ensure that your bundler is set up to correctly translate and bundle these imports into either CommonJS or ESM format, depending on your project's requirements.
92
+
93
+ This approach is particularly important due to the `@girs` types, which include both `*.cjs `files, using the GJS global imports syntax, and `*.js` files, which utilize the ESM syntax. By appropriately setting up your bundler, you can control which syntax—CommonJS or ESM—is used in your project. The choice of CommonJS in this context is also due to the similarity between the GJS-specific global imports and CommonJS syntax, allowing for easier management and bundling in these specific types of projects.
94
+
95
+ Since GNOME Shell 45, you should only use ESM, even for GNOME Shell extensions. Before that, extensions had to use the global import syntax, unlike normal GJS applications, where ESM has been available for some time.
96
+
84
97
  ### Bundle
85
98
 
86
99
  Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  declare module 'gi://GstInterfaces?version=0.10' {
4
3
  import GstInterfaces010 from '@girs/gstinterfaces-0.10';
5
4
  export default GstInterfaces010;
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import GstInterfaces010 from '@girs/gstinterfaces-0.10';
4
3
 
5
4
  declare global {
@@ -1401,6 +1401,15 @@ export interface MixerOptions {
1401
1401
  connect(sigName: "notify::index", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1402
1402
  connect_after(sigName: "notify::index", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1403
1403
  emit(sigName: "notify::index", ...args: any[]): void
1404
+ connect(sigName: "notify::max-volume", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1405
+ connect_after(sigName: "notify::max-volume", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1406
+ emit(sigName: "notify::max-volume", ...args: any[]): void
1407
+ connect(sigName: "notify::min-volume", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1408
+ connect_after(sigName: "notify::min-volume", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1409
+ emit(sigName: "notify::min-volume", ...args: any[]): void
1410
+ connect(sigName: "notify::num-channels", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1411
+ connect_after(sigName: "notify::num-channels", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1412
+ emit(sigName: "notify::num-channels", ...args: any[]): void
1404
1413
  connect(sigName: "notify::untranslated-label", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1405
1414
  connect_after(sigName: "notify::untranslated-label", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1406
1415
  emit(sigName: "notify::untranslated-label", ...args: any[]): void
@@ -1433,6 +1442,7 @@ export module MixerTrack {
1433
1442
 
1434
1443
  index?: number | null
1435
1444
  untranslated_label?: string | null
1445
+ untranslatedLabel?: string | null
1436
1446
  }
1437
1447
 
1438
1448
  }
@@ -1442,7 +1452,11 @@ export interface MixerTrack {
1442
1452
  // Own properties of GstInterfaces-0.10.GstInterfaces.MixerTrack
1443
1453
 
1444
1454
  readonly index: number
1455
+ readonly maxVolume: number
1456
+ readonly minVolume: number
1457
+ readonly numChannels: number
1445
1458
  readonly untranslated_label: string
1459
+ readonly untranslatedLabel: string
1446
1460
 
1447
1461
  // Own fields of GstInterfaces-0.10.GstInterfaces.MixerTrack
1448
1462
 
@@ -1458,6 +1472,15 @@ export interface MixerTrack {
1458
1472
  connect(sigName: "notify::index", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1459
1473
  connect_after(sigName: "notify::index", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1460
1474
  emit(sigName: "notify::index", ...args: any[]): void
1475
+ connect(sigName: "notify::max-volume", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1476
+ connect_after(sigName: "notify::max-volume", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1477
+ emit(sigName: "notify::max-volume", ...args: any[]): void
1478
+ connect(sigName: "notify::min-volume", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1479
+ connect_after(sigName: "notify::min-volume", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1480
+ emit(sigName: "notify::min-volume", ...args: any[]): void
1481
+ connect(sigName: "notify::num-channels", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1482
+ connect_after(sigName: "notify::num-channels", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1483
+ emit(sigName: "notify::num-channels", ...args: any[]): void
1461
1484
  connect(sigName: "notify::untranslated-label", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1462
1485
  connect_after(sigName: "notify::untranslated-label", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1463
1486
  emit(sigName: "notify::untranslated-label", ...args: any[]): void
@@ -1403,6 +1403,15 @@ interface MixerOptions {
1403
1403
  connect(sigName: "notify::index", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1404
1404
  connect_after(sigName: "notify::index", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1405
1405
  emit(sigName: "notify::index", ...args: any[]): void
1406
+ connect(sigName: "notify::max-volume", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1407
+ connect_after(sigName: "notify::max-volume", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1408
+ emit(sigName: "notify::max-volume", ...args: any[]): void
1409
+ connect(sigName: "notify::min-volume", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1410
+ connect_after(sigName: "notify::min-volume", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1411
+ emit(sigName: "notify::min-volume", ...args: any[]): void
1412
+ connect(sigName: "notify::num-channels", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1413
+ connect_after(sigName: "notify::num-channels", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1414
+ emit(sigName: "notify::num-channels", ...args: any[]): void
1406
1415
  connect(sigName: "notify::untranslated-label", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1407
1416
  connect_after(sigName: "notify::untranslated-label", callback: (($obj: MixerOptions, pspec: GObject.ParamSpec) => void)): number
1408
1417
  emit(sigName: "notify::untranslated-label", ...args: any[]): void
@@ -1435,6 +1444,7 @@ module MixerTrack {
1435
1444
 
1436
1445
  index?: number | null
1437
1446
  untranslated_label?: string | null
1447
+ untranslatedLabel?: string | null
1438
1448
  }
1439
1449
 
1440
1450
  }
@@ -1444,7 +1454,11 @@ interface MixerTrack {
1444
1454
  // Own properties of GstInterfaces-0.10.GstInterfaces.MixerTrack
1445
1455
 
1446
1456
  readonly index: number
1457
+ readonly maxVolume: number
1458
+ readonly minVolume: number
1459
+ readonly numChannels: number
1447
1460
  readonly untranslated_label: string
1461
+ readonly untranslatedLabel: string
1448
1462
 
1449
1463
  // Own fields of GstInterfaces-0.10.GstInterfaces.MixerTrack
1450
1464
 
@@ -1460,6 +1474,15 @@ interface MixerTrack {
1460
1474
  connect(sigName: "notify::index", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1461
1475
  connect_after(sigName: "notify::index", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1462
1476
  emit(sigName: "notify::index", ...args: any[]): void
1477
+ connect(sigName: "notify::max-volume", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1478
+ connect_after(sigName: "notify::max-volume", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1479
+ emit(sigName: "notify::max-volume", ...args: any[]): void
1480
+ connect(sigName: "notify::min-volume", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1481
+ connect_after(sigName: "notify::min-volume", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1482
+ emit(sigName: "notify::min-volume", ...args: any[]): void
1483
+ connect(sigName: "notify::num-channels", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1484
+ connect_after(sigName: "notify::num-channels", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1485
+ emit(sigName: "notify::num-channels", ...args: any[]): void
1463
1486
  connect(sigName: "notify::untranslated-label", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1464
1487
  connect_after(sigName: "notify::untranslated-label", callback: (($obj: MixerTrack, pspec: GObject.ParamSpec) => void)): number
1465
1488
  emit(sigName: "notify::untranslated-label", ...args: any[]): void
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gstinterfaces-0.10",
3
- "version": "0.10.0-3.2.4",
3
+ "version": "0.10.0-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for GstInterfaces-0.10, generated from library version 0.10.0",
5
5
  "type": "module",
6
6
  "module": "gstinterfaces-0.10.js",
@@ -25,12 +25,12 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gstinterfaces-0.10.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/gjs": "^3.2.4",
29
- "@girs/glib-2.0": "^2.78.0-3.2.4",
30
- "@girs/gmodule-2.0": "^2.0.0-3.2.4",
31
- "@girs/gobject-2.0": "^2.78.0-3.2.4",
32
- "@girs/gst-0.10": "^0.10.29-3.2.4",
33
- "@girs/libxml2-2.0": "^2.0.0-3.2.4"
28
+ "@girs/gjs": "^3.2.6",
29
+ "@girs/glib-2.0": "^2.78.0-3.2.6",
30
+ "@girs/gmodule-2.0": "^2.0.0-3.2.6",
31
+ "@girs/gobject-2.0": "^2.78.0-3.2.6",
32
+ "@girs/gst-0.10": "^0.10.29-3.2.6",
33
+ "@girs/libxml2-2.0": "^2.0.0-3.2.6"
34
34
  },
35
35
  "devDependencies": {
36
36
  "typescript": "*"