@girs/amtk-5 5.0.0-3.2.4 → 5.0.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/amtk-5)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Amtk-5, generated from library version 5.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for Amtk-5, generated from library version 5.0.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 Amtk = imports.gi.Amtk;
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,9 +1,12 @@
1
1
 
2
-
3
2
  declare module 'gi://Amtk?version=5' {
4
3
  import Amtk5 from '@girs/amtk-5';
5
4
  export default Amtk5;
6
5
  }
7
6
 
7
+ declare module 'gi://Amtk' {
8
+ import Amtk5 from '@girs/amtk-5';
9
+ export default Amtk5;
10
+ }
8
11
 
9
12
 
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import Amtk5 from '@girs/amtk-5';
4
3
 
5
4
  declare global {
package/amtk-5.d.cts CHANGED
@@ -398,6 +398,10 @@ export module ApplicationWindow {
398
398
  * The #GtkStatusbar. %NULL by default.
399
399
  */
400
400
  statusbar?: Gtk.Statusbar | null
401
+ /**
402
+ * The #GtkApplicationWindow.
403
+ */
404
+ applicationWindow?: Gtk.ApplicationWindow | null
401
405
  }
402
406
 
403
407
  }
@@ -410,6 +414,10 @@ export interface ApplicationWindow {
410
414
  * The #GtkApplicationWindow.
411
415
  */
412
416
  readonly application_window: Gtk.ApplicationWindow
417
+ /**
418
+ * The #GtkApplicationWindow.
419
+ */
420
+ readonly applicationWindow: Gtk.ApplicationWindow
413
421
  /**
414
422
  * The #GtkStatusbar. %NULL by default.
415
423
  */
@@ -534,6 +542,10 @@ export module Factory {
534
542
  * The default #AmtkFactoryFlags.
535
543
  */
536
544
  default_flags?: FactoryFlags | null
545
+ /**
546
+ * The default #AmtkFactoryFlags.
547
+ */
548
+ defaultFlags?: FactoryFlags | null
537
549
  }
538
550
 
539
551
  }
@@ -551,6 +563,10 @@ export interface Factory {
551
563
  * The default #AmtkFactoryFlags.
552
564
  */
553
565
  default_flags: FactoryFlags
566
+ /**
567
+ * The default #AmtkFactoryFlags.
568
+ */
569
+ defaultFlags: FactoryFlags
554
570
 
555
571
  // Own fields of Amtk-5.Amtk.Factory
556
572
 
@@ -798,6 +814,10 @@ export module MenuShell {
798
814
  * The #GtkMenuShell.
799
815
  */
800
816
  menu_shell?: Gtk.MenuShell | null
817
+ /**
818
+ * The #GtkMenuShell.
819
+ */
820
+ menuShell?: Gtk.MenuShell | null
801
821
  }
802
822
 
803
823
  }
@@ -810,6 +830,10 @@ export interface MenuShell {
810
830
  * The #GtkMenuShell.
811
831
  */
812
832
  readonly menu_shell: Gtk.MenuShell
833
+ /**
834
+ * The #GtkMenuShell.
835
+ */
836
+ readonly menuShell: Gtk.MenuShell
813
837
 
814
838
  // Own fields of Amtk-5.Amtk.MenuShell
815
839
 
package/amtk-5.d.ts CHANGED
@@ -400,6 +400,10 @@ module ApplicationWindow {
400
400
  * The #GtkStatusbar. %NULL by default.
401
401
  */
402
402
  statusbar?: Gtk.Statusbar | null
403
+ /**
404
+ * The #GtkApplicationWindow.
405
+ */
406
+ applicationWindow?: Gtk.ApplicationWindow | null
403
407
  }
404
408
 
405
409
  }
@@ -412,6 +416,10 @@ interface ApplicationWindow {
412
416
  * The #GtkApplicationWindow.
413
417
  */
414
418
  readonly application_window: Gtk.ApplicationWindow
419
+ /**
420
+ * The #GtkApplicationWindow.
421
+ */
422
+ readonly applicationWindow: Gtk.ApplicationWindow
415
423
  /**
416
424
  * The #GtkStatusbar. %NULL by default.
417
425
  */
@@ -536,6 +544,10 @@ module Factory {
536
544
  * The default #AmtkFactoryFlags.
537
545
  */
538
546
  default_flags?: FactoryFlags | null
547
+ /**
548
+ * The default #AmtkFactoryFlags.
549
+ */
550
+ defaultFlags?: FactoryFlags | null
539
551
  }
540
552
 
541
553
  }
@@ -553,6 +565,10 @@ interface Factory {
553
565
  * The default #AmtkFactoryFlags.
554
566
  */
555
567
  default_flags: FactoryFlags
568
+ /**
569
+ * The default #AmtkFactoryFlags.
570
+ */
571
+ defaultFlags: FactoryFlags
556
572
 
557
573
  // Own fields of Amtk-5.Amtk.Factory
558
574
 
@@ -800,6 +816,10 @@ module MenuShell {
800
816
  * The #GtkMenuShell.
801
817
  */
802
818
  menu_shell?: Gtk.MenuShell | null
819
+ /**
820
+ * The #GtkMenuShell.
821
+ */
822
+ menuShell?: Gtk.MenuShell | null
803
823
  }
804
824
 
805
825
  }
@@ -812,6 +832,10 @@ interface MenuShell {
812
832
  * The #GtkMenuShell.
813
833
  */
814
834
  readonly menu_shell: Gtk.MenuShell
835
+ /**
836
+ * The #GtkMenuShell.
837
+ */
838
+ readonly menuShell: Gtk.MenuShell
815
839
 
816
840
  // Own fields of Amtk-5.Amtk.MenuShell
817
841
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/amtk-5",
3
- "version": "5.0.0-3.2.4",
3
+ "version": "5.0.0-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for Amtk-5, generated from library version 5.0.0",
5
5
  "type": "module",
6
6
  "module": "amtk-5.js",
@@ -25,20 +25,20 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit amtk-5.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/atk-1.0": "^2.50.0-3.2.4",
29
- "@girs/cairo-1.0": "^1.0.0-3.2.4",
30
- "@girs/freetype2-2.0": "^2.0.0-3.2.4",
31
- "@girs/gdk-3.0": "^3.24.38-3.2.4",
32
- "@girs/gdkpixbuf-2.0": "^2.0.0-3.2.4",
33
- "@girs/gio-2.0": "^2.78.0-3.2.4",
34
- "@girs/gjs": "^3.2.4",
35
- "@girs/glib-2.0": "^2.78.0-3.2.4",
36
- "@girs/gmodule-2.0": "^2.0.0-3.2.4",
37
- "@girs/gobject-2.0": "^2.78.0-3.2.4",
38
- "@girs/gtk-3.0": "^3.24.38-3.2.4",
39
- "@girs/harfbuzz-0.0": "^8.2.1-3.2.4",
40
- "@girs/pango-1.0": "^1.51.0-3.2.4",
41
- "@girs/xlib-2.0": "^2.0.0-3.2.4"
28
+ "@girs/atk-1.0": "^2.50.0-3.2.6",
29
+ "@girs/cairo-1.0": "^1.0.0-3.2.6",
30
+ "@girs/freetype2-2.0": "^2.0.0-3.2.6",
31
+ "@girs/gdk-3.0": "^3.24.38-3.2.6",
32
+ "@girs/gdkpixbuf-2.0": "^2.0.0-3.2.6",
33
+ "@girs/gio-2.0": "^2.78.0-3.2.6",
34
+ "@girs/gjs": "^3.2.6",
35
+ "@girs/glib-2.0": "^2.78.0-3.2.6",
36
+ "@girs/gmodule-2.0": "^2.0.0-3.2.6",
37
+ "@girs/gobject-2.0": "^2.78.0-3.2.6",
38
+ "@girs/gtk-3.0": "^3.24.38-3.2.6",
39
+ "@girs/harfbuzz-0.0": "^8.2.1-3.2.6",
40
+ "@girs/pango-1.0": "^1.51.0-3.2.6",
41
+ "@girs/xlib-2.0": "^2.0.0-3.2.6"
42
42
  },
43
43
  "devDependencies": {
44
44
  "typescript": "*"