@girs/adw-1 1.4.0-3.2.2 → 1.4.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 +14 -1
- package/adw-1-ambient.d.ts +0 -1
- package/adw-1-import.d.ts +0 -1
- package/adw-1.d.cts +5 -5
- package/adw-1.d.ts +5 -5
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Adw-1, generated from library version 1.4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.
|
|
8
|
+
GJS TypeScript type definitions for Adw-1, generated from library version 1.4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.5.
|
|
9
9
|
|
|
10
10
|
Building blocks for modern GNOME applications
|
|
11
11
|
|
|
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
|
|
|
82
82
|
const Adw = imports.gi.Adw;
|
|
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/adw-1-ambient.d.ts
CHANGED
package/adw-1-import.d.ts
CHANGED
package/adw-1.d.cts
CHANGED
|
@@ -9759,7 +9759,7 @@ export module HeaderBar {
|
|
|
9759
9759
|
* Whether the header bar can show the back button.
|
|
9760
9760
|
*
|
|
9761
9761
|
* The back button will never be shown unless the header bar is placed inside an
|
|
9762
|
-
* [class`NavigationView]`.
|
|
9762
|
+
* [class`NavigationView]`. Usually, there is no reason to set this to `FALSE`.
|
|
9763
9763
|
*/
|
|
9764
9764
|
show_back_button?: boolean | null
|
|
9765
9765
|
/**
|
|
@@ -9838,7 +9838,7 @@ export interface HeaderBar extends Gtk.Accessible, Gtk.Buildable, Gtk.Constraint
|
|
|
9838
9838
|
* Whether the header bar can show the back button.
|
|
9839
9839
|
*
|
|
9840
9840
|
* The back button will never be shown unless the header bar is placed inside an
|
|
9841
|
-
* [class`NavigationView]`.
|
|
9841
|
+
* [class`NavigationView]`. Usually, there is no reason to set this to `FALSE`.
|
|
9842
9842
|
*/
|
|
9843
9843
|
show_back_button: boolean
|
|
9844
9844
|
/**
|
|
@@ -9967,7 +9967,7 @@ export interface HeaderBar extends Gtk.Accessible, Gtk.Buildable, Gtk.Constraint
|
|
|
9967
9967
|
* Sets whether `self` can show the back button.
|
|
9968
9968
|
*
|
|
9969
9969
|
* The back button will never be shown unless the header bar is placed inside an
|
|
9970
|
-
* [class`NavigationView]`.
|
|
9970
|
+
* [class`NavigationView]`. Usually, there is no reason to set it to `FALSE`.
|
|
9971
9971
|
* @param show_back_button whether to show the back button
|
|
9972
9972
|
*/
|
|
9973
9973
|
set_show_back_button(show_back_button: boolean): void
|
|
@@ -10173,9 +10173,9 @@ export interface HeaderBar extends Gtk.Accessible, Gtk.Buildable, Gtk.Constraint
|
|
|
10173
10173
|
* When used together with [class`NavigationView]` or [class`NavigationSplitView]`,
|
|
10174
10174
|
* it will also display a back button that can be used to go back to the previous
|
|
10175
10175
|
* page. The button also has a context menu, allowing to pop multiple pages at
|
|
10176
|
-
* once, potentially across multiple navigation views.
|
|
10176
|
+
* once, potentially across multiple navigation views. In rare scenarios, set
|
|
10177
10177
|
* [property`HeaderBar:`show-back-button] to `FALSE` to disable the back button
|
|
10178
|
-
* if it's unwanted.
|
|
10178
|
+
* if it's unwanted (e.g. in an extra header bar on the same page).
|
|
10179
10179
|
*
|
|
10180
10180
|
* ## Split View Integration
|
|
10181
10181
|
*
|
package/adw-1.d.ts
CHANGED
|
@@ -9761,7 +9761,7 @@ module HeaderBar {
|
|
|
9761
9761
|
* Whether the header bar can show the back button.
|
|
9762
9762
|
*
|
|
9763
9763
|
* The back button will never be shown unless the header bar is placed inside an
|
|
9764
|
-
* [class`NavigationView]`.
|
|
9764
|
+
* [class`NavigationView]`. Usually, there is no reason to set this to `FALSE`.
|
|
9765
9765
|
*/
|
|
9766
9766
|
show_back_button?: boolean | null
|
|
9767
9767
|
/**
|
|
@@ -9840,7 +9840,7 @@ interface HeaderBar extends Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget
|
|
|
9840
9840
|
* Whether the header bar can show the back button.
|
|
9841
9841
|
*
|
|
9842
9842
|
* The back button will never be shown unless the header bar is placed inside an
|
|
9843
|
-
* [class`NavigationView]`.
|
|
9843
|
+
* [class`NavigationView]`. Usually, there is no reason to set this to `FALSE`.
|
|
9844
9844
|
*/
|
|
9845
9845
|
show_back_button: boolean
|
|
9846
9846
|
/**
|
|
@@ -9969,7 +9969,7 @@ interface HeaderBar extends Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget
|
|
|
9969
9969
|
* Sets whether `self` can show the back button.
|
|
9970
9970
|
*
|
|
9971
9971
|
* The back button will never be shown unless the header bar is placed inside an
|
|
9972
|
-
* [class`NavigationView]`.
|
|
9972
|
+
* [class`NavigationView]`. Usually, there is no reason to set it to `FALSE`.
|
|
9973
9973
|
* @param show_back_button whether to show the back button
|
|
9974
9974
|
*/
|
|
9975
9975
|
set_show_back_button(show_back_button: boolean): void
|
|
@@ -10175,9 +10175,9 @@ interface HeaderBar extends Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget
|
|
|
10175
10175
|
* When used together with [class`NavigationView]` or [class`NavigationSplitView]`,
|
|
10176
10176
|
* it will also display a back button that can be used to go back to the previous
|
|
10177
10177
|
* page. The button also has a context menu, allowing to pop multiple pages at
|
|
10178
|
-
* once, potentially across multiple navigation views.
|
|
10178
|
+
* once, potentially across multiple navigation views. In rare scenarios, set
|
|
10179
10179
|
* [property`HeaderBar:`show-back-button] to `FALSE` to disable the back button
|
|
10180
|
-
* if it's unwanted.
|
|
10180
|
+
* if it's unwanted (e.g. in an extra header bar on the same page).
|
|
10181
10181
|
*
|
|
10182
10182
|
* ## Split View Integration
|
|
10183
10183
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/adw-1",
|
|
3
|
-
"version": "1.4.0-3.2.
|
|
3
|
+
"version": "1.4.0-3.2.5",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Adw-1, generated from library version 1.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "adw-1.js",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit adw-1.d.cts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@girs/cairo-1.0": "^1.0.0-3.2.
|
|
29
|
-
"@girs/freetype2-2.0": "^2.0.0-3.2.
|
|
30
|
-
"@girs/gdk-4.0": "^4.0.0-3.2.
|
|
31
|
-
"@girs/gdkpixbuf-2.0": "^2.0.0-3.2.
|
|
32
|
-
"@girs/gio-2.0": "^2.
|
|
33
|
-
"@girs/gjs": "^3.2.
|
|
34
|
-
"@girs/glib-2.0": "^2.
|
|
35
|
-
"@girs/gmodule-2.0": "^2.0.0-3.2.
|
|
36
|
-
"@girs/gobject-2.0": "^2.
|
|
37
|
-
"@girs/graphene-1.0": "^1.0.0-3.2.
|
|
38
|
-
"@girs/gsk-4.0": "^4.0.0-3.2.
|
|
39
|
-
"@girs/gtk-4.0": "^4.12.
|
|
40
|
-
"@girs/harfbuzz-0.0": "^
|
|
41
|
-
"@girs/pango-1.0": "^1.51.0-3.2.
|
|
42
|
-
"@girs/pangocairo-1.0": "^1.0.0-3.2.
|
|
28
|
+
"@girs/cairo-1.0": "^1.0.0-3.2.5",
|
|
29
|
+
"@girs/freetype2-2.0": "^2.0.0-3.2.5",
|
|
30
|
+
"@girs/gdk-4.0": "^4.0.0-3.2.5",
|
|
31
|
+
"@girs/gdkpixbuf-2.0": "^2.0.0-3.2.5",
|
|
32
|
+
"@girs/gio-2.0": "^2.78.0-3.2.5",
|
|
33
|
+
"@girs/gjs": "^3.2.5",
|
|
34
|
+
"@girs/glib-2.0": "^2.78.0-3.2.5",
|
|
35
|
+
"@girs/gmodule-2.0": "^2.0.0-3.2.5",
|
|
36
|
+
"@girs/gobject-2.0": "^2.78.0-3.2.5",
|
|
37
|
+
"@girs/graphene-1.0": "^1.0.0-3.2.5",
|
|
38
|
+
"@girs/gsk-4.0": "^4.0.0-3.2.5",
|
|
39
|
+
"@girs/gtk-4.0": "^4.12.3-3.2.5",
|
|
40
|
+
"@girs/harfbuzz-0.0": "^8.2.1-3.2.5",
|
|
41
|
+
"@girs/pango-1.0": "^1.51.0-3.2.5",
|
|
42
|
+
"@girs/pangocairo-1.0": "^1.0.0-3.2.5"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "*"
|