@girs/meta-12 12.0.0-3.2.3 → 12.0.0-3.2.5

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/meta-12)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Meta-12, generated from library version 12.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.3.
8
+ GJS TypeScript type definitions for Meta-12, generated from library version 12.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.5.
9
9
 
10
10
 
11
11
  ## Install
@@ -81,6 +81,19 @@ Now you have also type support for this, too:
81
81
  const Meta = imports.gi.Meta;
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).
@@ -1,9 +1,12 @@
1
1
 
2
-
3
2
  declare module 'gi://Meta?version=12' {
4
3
  import Meta12 from '@girs/meta-12';
5
4
  export default Meta12;
6
5
  }
7
6
 
7
+ declare module 'gi://Meta' {
8
+ import Meta12 from '@girs/meta-12';
9
+ export default Meta12;
10
+ }
8
11
 
9
12
 
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import Meta12 from '@girs/meta-12';
4
3
 
5
4
  declare global {
package/meta-12.d.cts CHANGED
@@ -4891,9 +4891,6 @@ export interface Stage extends Atk.ImplementorIface, Clutter.Animatable, Clutter
4891
4891
 
4892
4892
  // Class property signals of Meta-12.Meta.Stage
4893
4893
 
4894
- connect(sigName: "notify::is-grabbed", callback: (($obj: Stage, pspec: GObject.ParamSpec) => void)): number
4895
- connect_after(sigName: "notify::is-grabbed", callback: (($obj: Stage, pspec: GObject.ParamSpec) => void)): number
4896
- emit(sigName: "notify::is-grabbed", ...args: any[]): void
4897
4894
  connect(sigName: "notify::key-focus", callback: (($obj: Stage, pspec: GObject.ParamSpec) => void)): number
4898
4895
  connect_after(sigName: "notify::key-focus", callback: (($obj: Stage, pspec: GObject.ParamSpec) => void)): number
4899
4896
  emit(sigName: "notify::key-focus", ...args: any[]): void
package/meta-12.d.ts CHANGED
@@ -4893,9 +4893,6 @@ interface Stage extends Atk.ImplementorIface, Clutter.Animatable, Clutter.Contai
4893
4893
 
4894
4894
  // Class property signals of Meta-12.Meta.Stage
4895
4895
 
4896
- connect(sigName: "notify::is-grabbed", callback: (($obj: Stage, pspec: GObject.ParamSpec) => void)): number
4897
- connect_after(sigName: "notify::is-grabbed", callback: (($obj: Stage, pspec: GObject.ParamSpec) => void)): number
4898
- emit(sigName: "notify::is-grabbed", ...args: any[]): void
4899
4896
  connect(sigName: "notify::key-focus", callback: (($obj: Stage, pspec: GObject.ParamSpec) => void)): number
4900
4897
  connect_after(sigName: "notify::key-focus", callback: (($obj: Stage, pspec: GObject.ParamSpec) => void)): number
4901
4898
  emit(sigName: "notify::key-focus", ...args: any[]): void
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/meta-12",
3
- "version": "12.0.0-3.2.3",
3
+ "version": "12.0.0-3.2.5",
4
4
  "description": "GJS TypeScript type definitions for Meta-12, generated from library version 12.0.0",
5
5
  "type": "module",
6
6
  "module": "meta-12.js",
@@ -25,25 +25,25 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit meta-12.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/atk-1.0": "^2.48.3-3.2.3",
29
- "@girs/cairo-1.0": "^1.0.0-3.2.3",
30
- "@girs/clutter-12": "^12.0.0-3.2.3",
31
- "@girs/cogl-12": "^12.0.0-3.2.3",
32
- "@girs/coglpango-12": "^12.0.0-3.2.3",
33
- "@girs/freetype2-2.0": "^2.0.0-3.2.3",
34
- "@girs/gdesktopenums-3.0": "^3.0.0-3.2.3",
35
- "@girs/gio-2.0": "^2.76.1-3.2.3",
36
- "@girs/gjs": "^3.2.3",
37
- "@girs/gl-1.0": "^1.0.0-3.2.3",
38
- "@girs/glib-2.0": "^2.76.1-3.2.3",
39
- "@girs/gobject-2.0": "^2.76.1-3.2.3",
40
- "@girs/graphene-1.0": "^1.0.0-3.2.3",
41
- "@girs/harfbuzz-0.0": "^7.1.0-3.2.3",
42
- "@girs/json-1.0": "^1.7.1-3.2.3",
43
- "@girs/pango-1.0": "^1.50.14-3.2.3",
44
- "@girs/pangocairo-1.0": "^1.0.0-3.2.3",
45
- "@girs/xfixes-4.0": "^4.0.0-3.2.3",
46
- "@girs/xlib-2.0": "^2.0.0-3.2.3"
28
+ "@girs/atk-1.0": "^2.50.0-3.2.5",
29
+ "@girs/cairo-1.0": "^1.0.0-3.2.5",
30
+ "@girs/clutter-12": "^12.0.0-3.2.5",
31
+ "@girs/cogl-12": "^12.0.0-3.2.5",
32
+ "@girs/coglpango-12": "^12.0.0-3.2.5",
33
+ "@girs/freetype2-2.0": "^2.0.0-3.2.5",
34
+ "@girs/gdesktopenums-3.0": "^3.0.0-3.2.5",
35
+ "@girs/gio-2.0": "^2.78.0-3.2.5",
36
+ "@girs/gjs": "^3.2.5",
37
+ "@girs/gl-1.0": "^1.0.0-3.2.5",
38
+ "@girs/glib-2.0": "^2.78.0-3.2.5",
39
+ "@girs/gobject-2.0": "^2.78.0-3.2.5",
40
+ "@girs/graphene-1.0": "^1.0.0-3.2.5",
41
+ "@girs/harfbuzz-0.0": "^8.2.1-3.2.5",
42
+ "@girs/json-1.0": "^1.7.1-3.2.5",
43
+ "@girs/pango-1.0": "^1.51.0-3.2.5",
44
+ "@girs/pangocairo-1.0": "^1.0.0-3.2.5",
45
+ "@girs/xfixes-4.0": "^4.0.0-3.2.5",
46
+ "@girs/xlib-2.0": "^2.0.0-3.2.5"
47
47
  },
48
48
  "devDependencies": {
49
49
  "typescript": "*"