@girs/panelapplet-4.0 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 CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/panelapplet-4.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for PanelApplet-4.0, generated from library version 4.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for PanelApplet-4.0, 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 PanelApplet = imports.gi.PanelApplet;
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/panelapplet-4.0",
3
- "version": "4.0.0-3.2.4",
3
+ "version": "4.0.0-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for PanelApplet-4.0, generated from library version 4.0.0",
5
5
  "type": "module",
6
6
  "module": "panelapplet-4.0.js",
@@ -25,21 +25,21 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit panelapplet-4.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/gconf-2.0": "^2.0.0-3.2.4",
32
- "@girs/gdk-3.0": "^3.24.38-3.2.4",
33
- "@girs/gdkpixbuf-2.0": "^2.0.0-3.2.4",
34
- "@girs/gio-2.0": "^2.78.0-3.2.4",
35
- "@girs/gjs": "^3.2.4",
36
- "@girs/glib-2.0": "^2.78.0-3.2.4",
37
- "@girs/gmodule-2.0": "^2.0.0-3.2.4",
38
- "@girs/gobject-2.0": "^2.78.0-3.2.4",
39
- "@girs/gtk-3.0": "^3.24.38-3.2.4",
40
- "@girs/harfbuzz-0.0": "^8.2.1-3.2.4",
41
- "@girs/pango-1.0": "^1.51.0-3.2.4",
42
- "@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/gconf-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": "*"
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  declare module 'gi://PanelApplet?version=4.0' {
4
3
  import PanelApplet40 from '@girs/panelapplet-4.0';
5
4
  export default PanelApplet40;
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import PanelApplet40 from '@girs/panelapplet-4.0';
4
3
 
5
4
  declare global {
@@ -135,6 +135,26 @@ export module Applet {
135
135
  * The size hints set for the applet. See panel_applet_set_size_hints().
136
136
  */
137
137
  size_hints?: any | null
138
+ /**
139
+ * Whether the panel the applet is on is locked down.
140
+ */
141
+ lockedDown?: boolean | null
142
+ /**
143
+ * The GConf path to the per-instance settings of the applet.
144
+ *
145
+ * This property gets set when the applet gets embedded.
146
+ */
147
+ prefsKey?: string | null
148
+ /**
149
+ * The GSettings path to the per-instance settings of the applet.
150
+ *
151
+ * This property gets set when the applet gets embedded.
152
+ */
153
+ settingsPath?: string | null
154
+ /**
155
+ * The size hints set for the applet. See panel_applet_set_size_hints().
156
+ */
157
+ sizeHints?: any | null
138
158
  }
139
159
 
140
160
  }
@@ -151,6 +171,10 @@ export interface Applet extends Atk.ImplementorIface, Gtk.Buildable {
151
171
  * Whether the panel the applet is on is locked down.
152
172
  */
153
173
  locked_down: boolean
174
+ /**
175
+ * Whether the panel the applet is on is locked down.
176
+ */
177
+ lockedDown: boolean
154
178
  /**
155
179
  * The #PanelAppletOrient of the applet.
156
180
  *
@@ -164,12 +188,24 @@ export interface Applet extends Atk.ImplementorIface, Gtk.Buildable {
164
188
  * This property gets set when the applet gets embedded.
165
189
  */
166
190
  prefs_key: string
191
+ /**
192
+ * The GConf path to the per-instance settings of the applet.
193
+ *
194
+ * This property gets set when the applet gets embedded.
195
+ */
196
+ prefsKey: string
167
197
  /**
168
198
  * The GSettings path to the per-instance settings of the applet.
169
199
  *
170
200
  * This property gets set when the applet gets embedded.
171
201
  */
172
202
  settings_path: string
203
+ /**
204
+ * The GSettings path to the per-instance settings of the applet.
205
+ *
206
+ * This property gets set when the applet gets embedded.
207
+ */
208
+ settingsPath: string
173
209
  /**
174
210
  * The size of the panel the applet is on. For a horizontal panel, the
175
211
  * size if the height of the panel; for a vertical panel, the size is
@@ -183,6 +219,10 @@ export interface Applet extends Atk.ImplementorIface, Gtk.Buildable {
183
219
  * The size hints set for the applet. See panel_applet_set_size_hints().
184
220
  */
185
221
  size_hints: any
222
+ /**
223
+ * The size hints set for the applet. See panel_applet_set_size_hints().
224
+ */
225
+ sizeHints: any
186
226
 
187
227
  // Own fields of PanelApplet-4.0.PanelApplet.Applet
188
228
 
@@ -137,6 +137,26 @@ module Applet {
137
137
  * The size hints set for the applet. See panel_applet_set_size_hints().
138
138
  */
139
139
  size_hints?: any | null
140
+ /**
141
+ * Whether the panel the applet is on is locked down.
142
+ */
143
+ lockedDown?: boolean | null
144
+ /**
145
+ * The GConf path to the per-instance settings of the applet.
146
+ *
147
+ * This property gets set when the applet gets embedded.
148
+ */
149
+ prefsKey?: string | null
150
+ /**
151
+ * The GSettings path to the per-instance settings of the applet.
152
+ *
153
+ * This property gets set when the applet gets embedded.
154
+ */
155
+ settingsPath?: string | null
156
+ /**
157
+ * The size hints set for the applet. See panel_applet_set_size_hints().
158
+ */
159
+ sizeHints?: any | null
140
160
  }
141
161
 
142
162
  }
@@ -153,6 +173,10 @@ interface Applet extends Atk.ImplementorIface, Gtk.Buildable {
153
173
  * Whether the panel the applet is on is locked down.
154
174
  */
155
175
  locked_down: boolean
176
+ /**
177
+ * Whether the panel the applet is on is locked down.
178
+ */
179
+ lockedDown: boolean
156
180
  /**
157
181
  * The #PanelAppletOrient of the applet.
158
182
  *
@@ -166,12 +190,24 @@ interface Applet extends Atk.ImplementorIface, Gtk.Buildable {
166
190
  * This property gets set when the applet gets embedded.
167
191
  */
168
192
  prefs_key: string
193
+ /**
194
+ * The GConf path to the per-instance settings of the applet.
195
+ *
196
+ * This property gets set when the applet gets embedded.
197
+ */
198
+ prefsKey: string
169
199
  /**
170
200
  * The GSettings path to the per-instance settings of the applet.
171
201
  *
172
202
  * This property gets set when the applet gets embedded.
173
203
  */
174
204
  settings_path: string
205
+ /**
206
+ * The GSettings path to the per-instance settings of the applet.
207
+ *
208
+ * This property gets set when the applet gets embedded.
209
+ */
210
+ settingsPath: string
175
211
  /**
176
212
  * The size of the panel the applet is on. For a horizontal panel, the
177
213
  * size if the height of the panel; for a vertical panel, the size is
@@ -185,6 +221,10 @@ interface Applet extends Atk.ImplementorIface, Gtk.Buildable {
185
221
  * The size hints set for the applet. See panel_applet_set_size_hints().
186
222
  */
187
223
  size_hints: any
224
+ /**
225
+ * The size hints set for the applet. See panel_applet_set_size_hints().
226
+ */
227
+ sizeHints: any
188
228
 
189
229
  // Own fields of PanelApplet-4.0.PanelApplet.Applet
190
230