@girs/gtksource-3.0 3.0.0-4.0.0-beta.2 → 3.0.0-4.0.0-beta.3

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/gtksource-3.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GtkSource-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.2.
8
+ GJS TypeScript type definitions for GtkSource-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.3.
9
9
 
10
10
 
11
11
  ## Install
@@ -22,11 +22,6 @@ You can import this package into your project like this:
22
22
  import GtkSource from '@girs/gtksource-3.0';
23
23
  ```
24
24
 
25
- Or if you prefer CommonJS, you can also use this:
26
- ```ts
27
- const GtkSource = require('@girs/gtksource-3.0');
28
- ```
29
-
30
25
  ### Ambient Modules
31
26
 
32
27
  You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
@@ -81,19 +76,6 @@ Now you have also type support for this, too:
81
76
  const GtkSource = imports.gi.GtkSource;
82
77
  ```
83
78
 
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
-
97
79
  ### Bundle
98
80
 
99
81
  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).
@@ -23,8 +23,8 @@ import type Pango from '@girs/pango-1.0';
23
23
  import type HarfBuzz from '@girs/harfbuzz-0.0';
24
24
  import type freetype2 from '@girs/freetype2-2.0';
25
25
  import type Gio from '@girs/gio-2.0';
26
- import type GModule from '@girs/gmodule-2.0';
27
26
  import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
27
+ import type GModule from '@girs/gmodule-2.0';
28
28
  import type Atk from '@girs/atk-1.0';
29
29
 
30
30
  export namespace GtkSource {
@@ -1626,7 +1626,7 @@ export namespace GtkSource {
1626
1626
  * static void
1627
1627
  * my_object_class_init (MyObjectClass *klass)
1628
1628
  * {
1629
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
1629
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
1630
1630
  * 0, 100,
1631
1631
  * 50,
1632
1632
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -2129,7 +2129,7 @@ export namespace GtkSource {
2129
2129
  * static void
2130
2130
  * my_object_class_init (MyObjectClass *klass)
2131
2131
  * {
2132
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
2132
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2133
2133
  * 0, 100,
2134
2134
  * 50,
2135
2135
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -2717,7 +2717,7 @@ export namespace GtkSource {
2717
2717
  * static void
2718
2718
  * my_object_class_init (MyObjectClass *klass)
2719
2719
  * {
2720
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
2720
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2721
2721
  * 0, 100,
2722
2722
  * 50,
2723
2723
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -3379,7 +3379,7 @@ export namespace GtkSource {
3379
3379
  * static void
3380
3380
  * my_object_class_init (MyObjectClass *klass)
3381
3381
  * {
3382
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
3382
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
3383
3383
  * 0, 100,
3384
3384
  * 50,
3385
3385
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -5057,7 +5057,7 @@ export namespace GtkSource {
5057
5057
  * static void
5058
5058
  * my_object_class_init (MyObjectClass *klass)
5059
5059
  * {
5060
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
5060
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
5061
5061
  * 0, 100,
5062
5062
  * 50,
5063
5063
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -7794,7 +7794,7 @@ export namespace GtkSource {
7794
7794
  * static void
7795
7795
  * my_object_class_init (MyObjectClass *klass)
7796
7796
  * {
7797
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
7797
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
7798
7798
  * 0, 100,
7799
7799
  * 50,
7800
7800
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -11375,7 +11375,7 @@ export namespace GtkSource {
11375
11375
  * static void
11376
11376
  * my_object_class_init (MyObjectClass *klass)
11377
11377
  * {
11378
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
11378
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
11379
11379
  * 0, 100,
11380
11380
  * 50,
11381
11381
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -12527,7 +12527,7 @@ export namespace GtkSource {
12527
12527
  * static void
12528
12528
  * my_object_class_init (MyObjectClass *klass)
12529
12529
  * {
12530
- * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
12530
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
12531
12531
  * 0, 100,
12532
12532
  * 50,
12533
12533
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gtksource-3.0",
3
- "version": "3.0.0-4.0.0-beta.2",
3
+ "version": "3.0.0-4.0.0-beta.3",
4
4
  "description": "GJS TypeScript type definitions for GtkSource-3.0, generated from library version 3.0.0",
5
5
  "type": "module",
6
6
  "module": "gtksource-3.0.js",
@@ -26,20 +26,20 @@
26
26
  "test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gtksource-3.0.d.ts"
27
27
  },
28
28
  "dependencies": {
29
- "@girs/atk-1.0": "^2.52.0-4.0.0-beta.2",
30
- "@girs/cairo-1.0": "^1.0.0-4.0.0-beta.2",
31
- "@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.2",
32
- "@girs/gdk-3.0": "^3.24.41-4.0.0-beta.2",
33
- "@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.2",
34
- "@girs/gio-2.0": "^2.80.0-4.0.0-beta.2",
35
- "@girs/gjs": "^4.0.0-beta.2",
36
- "@girs/glib-2.0": "^2.80.0-4.0.0-beta.2",
37
- "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.2",
38
- "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.2",
39
- "@girs/gtk-3.0": "^3.24.41-4.0.0-beta.2",
40
- "@girs/harfbuzz-0.0": "^8.3.1-4.0.0-beta.2",
41
- "@girs/pango-1.0": "^1.51.2-4.0.0-beta.2",
42
- "@girs/xlib-2.0": "^2.0.0-4.0.0-beta.2"
29
+ "@girs/atk-1.0": "^2.52.0-4.0.0-beta.3",
30
+ "@girs/cairo-1.0": "^1.0.0-4.0.0-beta.3",
31
+ "@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.3",
32
+ "@girs/gdk-3.0": "^3.24.41-4.0.0-beta.3",
33
+ "@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.3",
34
+ "@girs/gio-2.0": "^2.80.0-4.0.0-beta.3",
35
+ "@girs/gjs": "^4.0.0-beta.3",
36
+ "@girs/glib-2.0": "^2.80.0-4.0.0-beta.3",
37
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.3",
38
+ "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.3",
39
+ "@girs/gtk-3.0": "^3.24.41-4.0.0-beta.3",
40
+ "@girs/harfbuzz-0.0": "^8.3.1-4.0.0-beta.3",
41
+ "@girs/pango-1.0": "^1.51.0-4.0.0-beta.3",
42
+ "@girs/xlib-2.0": "^2.0.0-4.0.0-beta.3"
43
43
  },
44
44
  "devDependencies": {
45
45
  "typescript": "*"