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

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Dbusmenu-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 Dbusmenu-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 Dbusmenu = imports.gi.Dbusmenu;
|
|
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/dbusmenu-0.4-import.d.ts
CHANGED
package/dbusmenu-0.4.d.cts
CHANGED
|
@@ -435,6 +435,9 @@ export module Client {
|
|
|
435
435
|
dbus_name?: string | null
|
|
436
436
|
dbus_object?: string | null
|
|
437
437
|
group_events?: boolean | null
|
|
438
|
+
dbusName?: string | null
|
|
439
|
+
dbusObject?: string | null
|
|
440
|
+
groupEvents?: boolean | null
|
|
438
441
|
}
|
|
439
442
|
|
|
440
443
|
}
|
|
@@ -444,8 +447,11 @@ export interface Client {
|
|
|
444
447
|
// Own properties of Dbusmenu-0.4.Dbusmenu.Client
|
|
445
448
|
|
|
446
449
|
readonly dbus_name: string | null
|
|
450
|
+
readonly dbusName: string | null
|
|
447
451
|
readonly dbus_object: string | null
|
|
452
|
+
readonly dbusObject: string | null
|
|
448
453
|
group_events: boolean
|
|
454
|
+
groupEvents: boolean
|
|
449
455
|
|
|
450
456
|
// Owm methods of Dbusmenu-0.4.Dbusmenu.Client
|
|
451
457
|
|
|
@@ -1110,6 +1116,7 @@ export module MenuitemProxy {
|
|
|
1110
1116
|
// Own constructor properties of Dbusmenu-0.4.Dbusmenu.MenuitemProxy
|
|
1111
1117
|
|
|
1112
1118
|
menu_item?: Menuitem | null
|
|
1119
|
+
menuItem?: Menuitem | null
|
|
1113
1120
|
}
|
|
1114
1121
|
|
|
1115
1122
|
}
|
|
@@ -1119,6 +1126,7 @@ export interface MenuitemProxy {
|
|
|
1119
1126
|
// Own properties of Dbusmenu-0.4.Dbusmenu.MenuitemProxy
|
|
1120
1127
|
|
|
1121
1128
|
readonly menu_item: Menuitem
|
|
1129
|
+
readonly menuItem: Menuitem
|
|
1122
1130
|
|
|
1123
1131
|
// Owm methods of Dbusmenu-0.4.Dbusmenu.MenuitemProxy
|
|
1124
1132
|
|
|
@@ -1226,6 +1234,8 @@ export module Server {
|
|
|
1226
1234
|
|
|
1227
1235
|
dbus_object?: string | null
|
|
1228
1236
|
root_node?: Menuitem | null
|
|
1237
|
+
dbusObject?: string | null
|
|
1238
|
+
rootNode?: Menuitem | null
|
|
1229
1239
|
}
|
|
1230
1240
|
|
|
1231
1241
|
}
|
|
@@ -1235,7 +1245,9 @@ export interface Server {
|
|
|
1235
1245
|
// Own properties of Dbusmenu-0.4.Dbusmenu.Server
|
|
1236
1246
|
|
|
1237
1247
|
readonly dbus_object: string | null
|
|
1248
|
+
readonly dbusObject: string | null
|
|
1238
1249
|
root_node: Menuitem
|
|
1250
|
+
rootNode: Menuitem
|
|
1239
1251
|
readonly version: number
|
|
1240
1252
|
|
|
1241
1253
|
// Owm methods of Dbusmenu-0.4.Dbusmenu.Server
|
package/dbusmenu-0.4.d.ts
CHANGED
|
@@ -437,6 +437,9 @@ module Client {
|
|
|
437
437
|
dbus_name?: string | null
|
|
438
438
|
dbus_object?: string | null
|
|
439
439
|
group_events?: boolean | null
|
|
440
|
+
dbusName?: string | null
|
|
441
|
+
dbusObject?: string | null
|
|
442
|
+
groupEvents?: boolean | null
|
|
440
443
|
}
|
|
441
444
|
|
|
442
445
|
}
|
|
@@ -446,8 +449,11 @@ interface Client {
|
|
|
446
449
|
// Own properties of Dbusmenu-0.4.Dbusmenu.Client
|
|
447
450
|
|
|
448
451
|
readonly dbus_name: string | null
|
|
452
|
+
readonly dbusName: string | null
|
|
449
453
|
readonly dbus_object: string | null
|
|
454
|
+
readonly dbusObject: string | null
|
|
450
455
|
group_events: boolean
|
|
456
|
+
groupEvents: boolean
|
|
451
457
|
|
|
452
458
|
// Owm methods of Dbusmenu-0.4.Dbusmenu.Client
|
|
453
459
|
|
|
@@ -1112,6 +1118,7 @@ module MenuitemProxy {
|
|
|
1112
1118
|
// Own constructor properties of Dbusmenu-0.4.Dbusmenu.MenuitemProxy
|
|
1113
1119
|
|
|
1114
1120
|
menu_item?: Menuitem | null
|
|
1121
|
+
menuItem?: Menuitem | null
|
|
1115
1122
|
}
|
|
1116
1123
|
|
|
1117
1124
|
}
|
|
@@ -1121,6 +1128,7 @@ interface MenuitemProxy {
|
|
|
1121
1128
|
// Own properties of Dbusmenu-0.4.Dbusmenu.MenuitemProxy
|
|
1122
1129
|
|
|
1123
1130
|
readonly menu_item: Menuitem
|
|
1131
|
+
readonly menuItem: Menuitem
|
|
1124
1132
|
|
|
1125
1133
|
// Owm methods of Dbusmenu-0.4.Dbusmenu.MenuitemProxy
|
|
1126
1134
|
|
|
@@ -1228,6 +1236,8 @@ module Server {
|
|
|
1228
1236
|
|
|
1229
1237
|
dbus_object?: string | null
|
|
1230
1238
|
root_node?: Menuitem | null
|
|
1239
|
+
dbusObject?: string | null
|
|
1240
|
+
rootNode?: Menuitem | null
|
|
1231
1241
|
}
|
|
1232
1242
|
|
|
1233
1243
|
}
|
|
@@ -1237,7 +1247,9 @@ interface Server {
|
|
|
1237
1247
|
// Own properties of Dbusmenu-0.4.Dbusmenu.Server
|
|
1238
1248
|
|
|
1239
1249
|
readonly dbus_object: string | null
|
|
1250
|
+
readonly dbusObject: string | null
|
|
1240
1251
|
root_node: Menuitem
|
|
1252
|
+
rootNode: Menuitem
|
|
1241
1253
|
readonly version: number
|
|
1242
1254
|
|
|
1243
1255
|
// Owm methods of Dbusmenu-0.4.Dbusmenu.Server
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/dbusmenu-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 Dbusmenu-0.4, generated from library version 0.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dbusmenu-0.4.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit dbusmenu-0.4.d.cts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@girs/gjs": "^3.2.
|
|
29
|
-
"@girs/glib-2.0": "^2.78.0-3.2.
|
|
30
|
-
"@girs/gobject-2.0": "^2.78.0-3.2.
|
|
28
|
+
"@girs/gjs": "^3.2.6",
|
|
29
|
+
"@girs/glib-2.0": "^2.78.0-3.2.6",
|
|
30
|
+
"@girs/gobject-2.0": "^2.78.0-3.2.6"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"typescript": "*"
|