@girs/dbusmenugtk3-0.4 0.4.0-3.2.4 → 0.4.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/dbusmenugtk3-0.4-ambient.d.ts +0 -1
- package/dbusmenugtk3-0.4-import.d.ts +0 -1
- package/dbusmenugtk3-0.4.d.cts +4 -0
- package/dbusmenugtk3-0.4.d.ts +4 -0
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for DbusmenuGtk3-0.4, generated from library version 0.4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.
|
|
8
|
+
GJS TypeScript type definitions for DbusmenuGtk3-0.4, generated from library version 0.4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
|
|
9
9
|
|
|
10
10
|
A small little library that was created by pulling out some comon code out of indicator-applet. It passes a menu structure across DBus so that a program can create a menu simply without worrying about how it is displayed on the other side of the bus.
|
|
11
11
|
|
|
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
|
|
|
82
82
|
const DbusmenuGtk3 = imports.gi.DbusmenuGtk3;
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
+
|
|
86
|
+
### ESM vs. CommonJS
|
|
87
|
+
|
|
88
|
+
GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
|
|
89
|
+
|
|
90
|
+
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.
|
|
91
|
+
|
|
92
|
+
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.
|
|
93
|
+
|
|
94
|
+
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.
|
|
95
|
+
|
|
96
|
+
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.
|
|
97
|
+
|
|
85
98
|
### Bundle
|
|
86
99
|
|
|
87
100
|
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/dbusmenugtk3-0.4.d.cts
CHANGED
|
@@ -229,6 +229,8 @@ export module Menu {
|
|
|
229
229
|
|
|
230
230
|
dbus_name?: string | null
|
|
231
231
|
dbus_object?: string | null
|
|
232
|
+
dbusName?: string | null
|
|
233
|
+
dbusObject?: string | null
|
|
232
234
|
}
|
|
233
235
|
|
|
234
236
|
}
|
|
@@ -238,7 +240,9 @@ export interface Menu extends Atk.ImplementorIface, Gtk.Buildable {
|
|
|
238
240
|
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
|
|
239
241
|
|
|
240
242
|
readonly dbus_name: string | null
|
|
243
|
+
readonly dbusName: string | null
|
|
241
244
|
readonly dbus_object: string | null
|
|
245
|
+
readonly dbusObject: string | null
|
|
242
246
|
|
|
243
247
|
// Own fields of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
|
|
244
248
|
|
package/dbusmenugtk3-0.4.d.ts
CHANGED
|
@@ -231,6 +231,8 @@ module Menu {
|
|
|
231
231
|
|
|
232
232
|
dbus_name?: string | null
|
|
233
233
|
dbus_object?: string | null
|
|
234
|
+
dbusName?: string | null
|
|
235
|
+
dbusObject?: string | null
|
|
234
236
|
}
|
|
235
237
|
|
|
236
238
|
}
|
|
@@ -240,7 +242,9 @@ interface Menu extends Atk.ImplementorIface, Gtk.Buildable {
|
|
|
240
242
|
// Own properties of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
|
|
241
243
|
|
|
242
244
|
readonly dbus_name: string | null
|
|
245
|
+
readonly dbusName: string | null
|
|
243
246
|
readonly dbus_object: string | null
|
|
247
|
+
readonly dbusObject: string | null
|
|
244
248
|
|
|
245
249
|
// Own fields of DbusmenuGtk3-0.4.DbusmenuGtk3.Menu
|
|
246
250
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/dbusmenugtk3-0.4",
|
|
3
|
-
"version": "0.4.0-3.2.
|
|
3
|
+
"version": "0.4.0-3.2.6",
|
|
4
4
|
"description": "GJS TypeScript type definitions for DbusmenuGtk3-0.4, generated from library version 0.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dbusmenugtk3-0.4.js",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit dbusmenugtk3-0.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/dbusmenu-0.4": "^0.4.0-3.2.
|
|
31
|
-
"@girs/freetype2-2.0": "^2.0.0-3.2.
|
|
32
|
-
"@girs/gdk-3.0": "^3.24.38-3.2.
|
|
33
|
-
"@girs/gdkpixbuf-2.0": "^2.0.0-3.2.
|
|
34
|
-
"@girs/gio-2.0": "^2.78.0-3.2.
|
|
35
|
-
"@girs/gjs": "^3.2.
|
|
36
|
-
"@girs/glib-2.0": "^2.78.0-3.2.
|
|
37
|
-
"@girs/gmodule-2.0": "^2.0.0-3.2.
|
|
38
|
-
"@girs/gobject-2.0": "^2.78.0-3.2.
|
|
39
|
-
"@girs/gtk-3.0": "^3.24.38-3.2.
|
|
40
|
-
"@girs/harfbuzz-0.0": "^8.2.1-3.2.
|
|
41
|
-
"@girs/pango-1.0": "^1.51.0-3.2.
|
|
42
|
-
"@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/dbusmenu-0.4": "^0.4.0-3.2.6",
|
|
31
|
+
"@girs/freetype2-2.0": "^2.0.0-3.2.6",
|
|
32
|
+
"@girs/gdk-3.0": "^3.24.38-3.2.6",
|
|
33
|
+
"@girs/gdkpixbuf-2.0": "^2.0.0-3.2.6",
|
|
34
|
+
"@girs/gio-2.0": "^2.78.0-3.2.6",
|
|
35
|
+
"@girs/gjs": "^3.2.6",
|
|
36
|
+
"@girs/glib-2.0": "^2.78.0-3.2.6",
|
|
37
|
+
"@girs/gmodule-2.0": "^2.0.0-3.2.6",
|
|
38
|
+
"@girs/gobject-2.0": "^2.78.0-3.2.6",
|
|
39
|
+
"@girs/gtk-3.0": "^3.24.38-3.2.6",
|
|
40
|
+
"@girs/harfbuzz-0.0": "^8.2.1-3.2.6",
|
|
41
|
+
"@girs/pango-1.0": "^1.51.0-3.2.6",
|
|
42
|
+
"@girs/xlib-2.0": "^2.0.0-3.2.6"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "*"
|