@girs/amtk-4 4.0.0-3.2.4 → 4.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 +14 -1
- package/amtk-4-ambient.d.ts +4 -1
- package/amtk-4-import.d.ts +0 -1
- package/amtk-4.d.cts +24 -0
- package/amtk-4.d.ts +24 -0
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Amtk-4, generated from library version 4.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.
|
|
8
|
+
GJS TypeScript type definitions for Amtk-4, generated from library version 4.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).
|
package/amtk-4-ambient.d.ts
CHANGED
package/amtk-4-import.d.ts
CHANGED
package/amtk-4.d.cts
CHANGED
|
@@ -325,6 +325,10 @@ export module ApplicationWindow {
|
|
|
325
325
|
* The #GtkStatusbar. %NULL by default.
|
|
326
326
|
*/
|
|
327
327
|
statusbar?: Gtk.Statusbar | null
|
|
328
|
+
/**
|
|
329
|
+
* The #GtkApplicationWindow.
|
|
330
|
+
*/
|
|
331
|
+
applicationWindow?: Gtk.ApplicationWindow | null
|
|
328
332
|
}
|
|
329
333
|
|
|
330
334
|
}
|
|
@@ -337,6 +341,10 @@ export interface ApplicationWindow {
|
|
|
337
341
|
* The #GtkApplicationWindow.
|
|
338
342
|
*/
|
|
339
343
|
readonly application_window: Gtk.ApplicationWindow
|
|
344
|
+
/**
|
|
345
|
+
* The #GtkApplicationWindow.
|
|
346
|
+
*/
|
|
347
|
+
readonly applicationWindow: Gtk.ApplicationWindow
|
|
340
348
|
/**
|
|
341
349
|
* The #GtkStatusbar. %NULL by default.
|
|
342
350
|
*/
|
|
@@ -454,6 +462,10 @@ export module Factory {
|
|
|
454
462
|
* The default #AmtkFactoryFlags.
|
|
455
463
|
*/
|
|
456
464
|
default_flags?: FactoryFlags | null
|
|
465
|
+
/**
|
|
466
|
+
* The default #AmtkFactoryFlags.
|
|
467
|
+
*/
|
|
468
|
+
defaultFlags?: FactoryFlags | null
|
|
457
469
|
}
|
|
458
470
|
|
|
459
471
|
}
|
|
@@ -471,6 +483,10 @@ export interface Factory {
|
|
|
471
483
|
* The default #AmtkFactoryFlags.
|
|
472
484
|
*/
|
|
473
485
|
default_flags: FactoryFlags
|
|
486
|
+
/**
|
|
487
|
+
* The default #AmtkFactoryFlags.
|
|
488
|
+
*/
|
|
489
|
+
defaultFlags: FactoryFlags
|
|
474
490
|
|
|
475
491
|
// Own fields of Amtk-4.Amtk.Factory
|
|
476
492
|
|
|
@@ -641,6 +657,10 @@ export module MenuShell {
|
|
|
641
657
|
* The #GtkMenuShell.
|
|
642
658
|
*/
|
|
643
659
|
menu_shell?: Gtk.MenuShell | null
|
|
660
|
+
/**
|
|
661
|
+
* The #GtkMenuShell.
|
|
662
|
+
*/
|
|
663
|
+
menuShell?: Gtk.MenuShell | null
|
|
644
664
|
}
|
|
645
665
|
|
|
646
666
|
}
|
|
@@ -653,6 +673,10 @@ export interface MenuShell {
|
|
|
653
673
|
* The #GtkMenuShell.
|
|
654
674
|
*/
|
|
655
675
|
readonly menu_shell: Gtk.MenuShell
|
|
676
|
+
/**
|
|
677
|
+
* The #GtkMenuShell.
|
|
678
|
+
*/
|
|
679
|
+
readonly menuShell: Gtk.MenuShell
|
|
656
680
|
|
|
657
681
|
// Own fields of Amtk-4.Amtk.MenuShell
|
|
658
682
|
|
package/amtk-4.d.ts
CHANGED
|
@@ -327,6 +327,10 @@ module ApplicationWindow {
|
|
|
327
327
|
* The #GtkStatusbar. %NULL by default.
|
|
328
328
|
*/
|
|
329
329
|
statusbar?: Gtk.Statusbar | null
|
|
330
|
+
/**
|
|
331
|
+
* The #GtkApplicationWindow.
|
|
332
|
+
*/
|
|
333
|
+
applicationWindow?: Gtk.ApplicationWindow | null
|
|
330
334
|
}
|
|
331
335
|
|
|
332
336
|
}
|
|
@@ -339,6 +343,10 @@ interface ApplicationWindow {
|
|
|
339
343
|
* The #GtkApplicationWindow.
|
|
340
344
|
*/
|
|
341
345
|
readonly application_window: Gtk.ApplicationWindow
|
|
346
|
+
/**
|
|
347
|
+
* The #GtkApplicationWindow.
|
|
348
|
+
*/
|
|
349
|
+
readonly applicationWindow: Gtk.ApplicationWindow
|
|
342
350
|
/**
|
|
343
351
|
* The #GtkStatusbar. %NULL by default.
|
|
344
352
|
*/
|
|
@@ -456,6 +464,10 @@ module Factory {
|
|
|
456
464
|
* The default #AmtkFactoryFlags.
|
|
457
465
|
*/
|
|
458
466
|
default_flags?: FactoryFlags | null
|
|
467
|
+
/**
|
|
468
|
+
* The default #AmtkFactoryFlags.
|
|
469
|
+
*/
|
|
470
|
+
defaultFlags?: FactoryFlags | null
|
|
459
471
|
}
|
|
460
472
|
|
|
461
473
|
}
|
|
@@ -473,6 +485,10 @@ interface Factory {
|
|
|
473
485
|
* The default #AmtkFactoryFlags.
|
|
474
486
|
*/
|
|
475
487
|
default_flags: FactoryFlags
|
|
488
|
+
/**
|
|
489
|
+
* The default #AmtkFactoryFlags.
|
|
490
|
+
*/
|
|
491
|
+
defaultFlags: FactoryFlags
|
|
476
492
|
|
|
477
493
|
// Own fields of Amtk-4.Amtk.Factory
|
|
478
494
|
|
|
@@ -643,6 +659,10 @@ module MenuShell {
|
|
|
643
659
|
* The #GtkMenuShell.
|
|
644
660
|
*/
|
|
645
661
|
menu_shell?: Gtk.MenuShell | null
|
|
662
|
+
/**
|
|
663
|
+
* The #GtkMenuShell.
|
|
664
|
+
*/
|
|
665
|
+
menuShell?: Gtk.MenuShell | null
|
|
646
666
|
}
|
|
647
667
|
|
|
648
668
|
}
|
|
@@ -655,6 +675,10 @@ interface MenuShell {
|
|
|
655
675
|
* The #GtkMenuShell.
|
|
656
676
|
*/
|
|
657
677
|
readonly menu_shell: Gtk.MenuShell
|
|
678
|
+
/**
|
|
679
|
+
* The #GtkMenuShell.
|
|
680
|
+
*/
|
|
681
|
+
readonly menuShell: Gtk.MenuShell
|
|
658
682
|
|
|
659
683
|
// Own fields of Amtk-4.Amtk.MenuShell
|
|
660
684
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/amtk-4",
|
|
3
|
-
"version": "4.0.0-3.2.
|
|
3
|
+
"version": "4.0.0-3.2.6",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Amtk-4, generated from library version 4.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "amtk-4.js",
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit amtk-4.d.cts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@girs/atk-1.0": "^2.50.0-3.2.
|
|
29
|
-
"@girs/cairo-1.0": "^1.0.0-3.2.
|
|
30
|
-
"@girs/freetype2-2.0": "^2.0.0-3.2.
|
|
31
|
-
"@girs/gdk-3.0": "^3.24.38-3.2.
|
|
32
|
-
"@girs/gdkpixbuf-2.0": "^2.0.0-3.2.
|
|
33
|
-
"@girs/gio-2.0": "^2.78.0-3.2.
|
|
34
|
-
"@girs/gjs": "^3.2.
|
|
35
|
-
"@girs/glib-2.0": "^2.78.0-3.2.
|
|
36
|
-
"@girs/gmodule-2.0": "^2.0.0-3.2.
|
|
37
|
-
"@girs/gobject-2.0": "^2.78.0-3.2.
|
|
38
|
-
"@girs/gtk-3.0": "^3.24.38-3.2.
|
|
39
|
-
"@girs/harfbuzz-0.0": "^8.2.1-3.2.
|
|
40
|
-
"@girs/pango-1.0": "^1.51.0-3.2.
|
|
41
|
-
"@girs/xlib-2.0": "^2.0.0-3.2.
|
|
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": "*"
|