@girs/unique-3.0 3.0.0-3.2.4 → 3.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/unique-3.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Unique-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for Unique-3.0, generated from library version 3.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 Unique = imports.gi.Unique;
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/unique-3.0",
3
- "version": "3.0.0-3.2.4",
3
+ "version": "3.0.0-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for Unique-3.0, generated from library version 3.0.0",
5
5
  "type": "module",
6
6
  "module": "unique-3.0.js",
@@ -25,20 +25,20 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit unique-3.0.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": "*"
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  declare module 'gi://Unique?version=3.0' {
4
3
  import Unique30 from '@girs/unique-3.0';
5
4
  export default Unique30;
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import Unique30 from '@girs/unique-3.0';
4
3
 
5
4
  declare global {
package/unique-3.0.d.cts CHANGED
@@ -82,6 +82,12 @@ export module App {
82
82
  * automatically given.
83
83
  */
84
84
  startup_id?: string | null
85
+ /**
86
+ * The startup notification id, needed to complete the startup
87
+ * notification sequence. If not set, a default id will be
88
+ * automatically given.
89
+ */
90
+ startupId?: string | null
85
91
  }
86
92
 
87
93
  }
@@ -94,6 +100,10 @@ export interface App {
94
100
  * Whether another instance of the application is running.
95
101
  */
96
102
  readonly is_running: boolean
103
+ /**
104
+ * Whether another instance of the application is running.
105
+ */
106
+ readonly isRunning: boolean
97
107
  /**
98
108
  * The unique name of the application. It must be in form of
99
109
  * a domain-like string, like <literal>org.gnome.MyApplication</literal>.
@@ -109,6 +119,12 @@ export interface App {
109
119
  * automatically given.
110
120
  */
111
121
  readonly startup_id: string
122
+ /**
123
+ * The startup notification id, needed to complete the startup
124
+ * notification sequence. If not set, a default id will be
125
+ * automatically given.
126
+ */
127
+ readonly startupId: string
112
128
 
113
129
  // Owm methods of Unique-3.0.Unique.App
114
130
 
package/unique-3.0.d.ts CHANGED
@@ -84,6 +84,12 @@ module App {
84
84
  * automatically given.
85
85
  */
86
86
  startup_id?: string | null
87
+ /**
88
+ * The startup notification id, needed to complete the startup
89
+ * notification sequence. If not set, a default id will be
90
+ * automatically given.
91
+ */
92
+ startupId?: string | null
87
93
  }
88
94
 
89
95
  }
@@ -96,6 +102,10 @@ interface App {
96
102
  * Whether another instance of the application is running.
97
103
  */
98
104
  readonly is_running: boolean
105
+ /**
106
+ * Whether another instance of the application is running.
107
+ */
108
+ readonly isRunning: boolean
99
109
  /**
100
110
  * The unique name of the application. It must be in form of
101
111
  * a domain-like string, like <literal>org.gnome.MyApplication</literal>.
@@ -111,6 +121,12 @@ interface App {
111
121
  * automatically given.
112
122
  */
113
123
  readonly startup_id: string
124
+ /**
125
+ * The startup notification id, needed to complete the startup
126
+ * notification sequence. If not set, a default id will be
127
+ * automatically given.
128
+ */
129
+ readonly startupId: string
114
130
 
115
131
  // Owm methods of Unique-3.0.Unique.App
116
132