@girs/gcrui-3 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 +14 -1
- package/gcrui-3-ambient.d.ts +0 -1
- package/gcrui-3-import.d.ts +0 -1
- package/gcrui-3.d.cts +32 -0
- package/gcrui-3.d.ts +32 -0
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for GcrUi-3, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.
|
|
8
|
+
GJS TypeScript type definitions for GcrUi-3, 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
|
GCR widgets
|
|
11
11
|
|
|
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
|
|
|
82
82
|
const GcrUi = imports.gi.GcrUi;
|
|
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/gcrui-3-ambient.d.ts
CHANGED
package/gcrui-3-import.d.ts
CHANGED
package/gcrui-3.d.cts
CHANGED
|
@@ -2400,18 +2400,34 @@ export interface PromptDialog extends Atk.ImplementorIface, Gcr.Prompt, Gtk.Buil
|
|
|
2400
2400
|
* Whether the choice check box is visible or not.
|
|
2401
2401
|
*/
|
|
2402
2402
|
readonly choice_visible: boolean
|
|
2403
|
+
/**
|
|
2404
|
+
* Whether the choice check box is visible or not.
|
|
2405
|
+
*/
|
|
2406
|
+
readonly choiceVisible: boolean
|
|
2403
2407
|
/**
|
|
2404
2408
|
* Whether the password confirm entry is visible or not.
|
|
2405
2409
|
*/
|
|
2406
2410
|
readonly confirm_visible: boolean
|
|
2411
|
+
/**
|
|
2412
|
+
* Whether the password confirm entry is visible or not.
|
|
2413
|
+
*/
|
|
2414
|
+
readonly confirmVisible: boolean
|
|
2407
2415
|
/**
|
|
2408
2416
|
* Whether the password entry is visible or not.
|
|
2409
2417
|
*/
|
|
2410
2418
|
readonly password_visible: boolean
|
|
2419
|
+
/**
|
|
2420
|
+
* Whether the password entry is visible or not.
|
|
2421
|
+
*/
|
|
2422
|
+
readonly passwordVisible: boolean
|
|
2411
2423
|
/**
|
|
2412
2424
|
* Whether the warning label is visible or not.
|
|
2413
2425
|
*/
|
|
2414
2426
|
readonly warning_visible: boolean
|
|
2427
|
+
/**
|
|
2428
|
+
* Whether the warning label is visible or not.
|
|
2429
|
+
*/
|
|
2430
|
+
readonly warningVisible: boolean
|
|
2415
2431
|
|
|
2416
2432
|
// Conflicting properties
|
|
2417
2433
|
|
|
@@ -3531,6 +3547,14 @@ export module ViewerWidget {
|
|
|
3531
3547
|
* overridden by the parsed data.
|
|
3532
3548
|
*/
|
|
3533
3549
|
display_name?: string | null
|
|
3550
|
+
/**
|
|
3551
|
+
* Display name for data being displayed. This is automatically
|
|
3552
|
+
* calculated from a loaded file, or can be explicitly set.
|
|
3553
|
+
*
|
|
3554
|
+
* Used as a hint when displaying a title for the data, but may be
|
|
3555
|
+
* overridden by the parsed data.
|
|
3556
|
+
*/
|
|
3557
|
+
displayName?: string | null
|
|
3534
3558
|
}
|
|
3535
3559
|
|
|
3536
3560
|
}
|
|
@@ -3547,6 +3571,14 @@ export interface ViewerWidget extends Atk.ImplementorIface, Gtk.Buildable, Gtk.O
|
|
|
3547
3571
|
* overridden by the parsed data.
|
|
3548
3572
|
*/
|
|
3549
3573
|
display_name: string | null
|
|
3574
|
+
/**
|
|
3575
|
+
* Display name for data being displayed. This is automatically
|
|
3576
|
+
* calculated from a loaded file, or can be explicitly set.
|
|
3577
|
+
*
|
|
3578
|
+
* Used as a hint when displaying a title for the data, but may be
|
|
3579
|
+
* overridden by the parsed data.
|
|
3580
|
+
*/
|
|
3581
|
+
displayName: string | null
|
|
3550
3582
|
/**
|
|
3551
3583
|
* The parser used to parse loaded data into viewable items.
|
|
3552
3584
|
*/
|
package/gcrui-3.d.ts
CHANGED
|
@@ -2402,18 +2402,34 @@ interface PromptDialog extends Atk.ImplementorIface, Gcr.Prompt, Gtk.Buildable {
|
|
|
2402
2402
|
* Whether the choice check box is visible or not.
|
|
2403
2403
|
*/
|
|
2404
2404
|
readonly choice_visible: boolean
|
|
2405
|
+
/**
|
|
2406
|
+
* Whether the choice check box is visible or not.
|
|
2407
|
+
*/
|
|
2408
|
+
readonly choiceVisible: boolean
|
|
2405
2409
|
/**
|
|
2406
2410
|
* Whether the password confirm entry is visible or not.
|
|
2407
2411
|
*/
|
|
2408
2412
|
readonly confirm_visible: boolean
|
|
2413
|
+
/**
|
|
2414
|
+
* Whether the password confirm entry is visible or not.
|
|
2415
|
+
*/
|
|
2416
|
+
readonly confirmVisible: boolean
|
|
2409
2417
|
/**
|
|
2410
2418
|
* Whether the password entry is visible or not.
|
|
2411
2419
|
*/
|
|
2412
2420
|
readonly password_visible: boolean
|
|
2421
|
+
/**
|
|
2422
|
+
* Whether the password entry is visible or not.
|
|
2423
|
+
*/
|
|
2424
|
+
readonly passwordVisible: boolean
|
|
2413
2425
|
/**
|
|
2414
2426
|
* Whether the warning label is visible or not.
|
|
2415
2427
|
*/
|
|
2416
2428
|
readonly warning_visible: boolean
|
|
2429
|
+
/**
|
|
2430
|
+
* Whether the warning label is visible or not.
|
|
2431
|
+
*/
|
|
2432
|
+
readonly warningVisible: boolean
|
|
2417
2433
|
|
|
2418
2434
|
// Conflicting properties
|
|
2419
2435
|
|
|
@@ -3533,6 +3549,14 @@ module ViewerWidget {
|
|
|
3533
3549
|
* overridden by the parsed data.
|
|
3534
3550
|
*/
|
|
3535
3551
|
display_name?: string | null
|
|
3552
|
+
/**
|
|
3553
|
+
* Display name for data being displayed. This is automatically
|
|
3554
|
+
* calculated from a loaded file, or can be explicitly set.
|
|
3555
|
+
*
|
|
3556
|
+
* Used as a hint when displaying a title for the data, but may be
|
|
3557
|
+
* overridden by the parsed data.
|
|
3558
|
+
*/
|
|
3559
|
+
displayName?: string | null
|
|
3536
3560
|
}
|
|
3537
3561
|
|
|
3538
3562
|
}
|
|
@@ -3549,6 +3573,14 @@ interface ViewerWidget extends Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientab
|
|
|
3549
3573
|
* overridden by the parsed data.
|
|
3550
3574
|
*/
|
|
3551
3575
|
display_name: string | null
|
|
3576
|
+
/**
|
|
3577
|
+
* Display name for data being displayed. This is automatically
|
|
3578
|
+
* calculated from a loaded file, or can be explicitly set.
|
|
3579
|
+
*
|
|
3580
|
+
* Used as a hint when displaying a title for the data, but may be
|
|
3581
|
+
* overridden by the parsed data.
|
|
3582
|
+
*/
|
|
3583
|
+
displayName: string | null
|
|
3552
3584
|
/**
|
|
3553
3585
|
* The parser used to parse loaded data into viewable items.
|
|
3554
3586
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gcrui-3",
|
|
3
|
-
"version": "3.0.0-3.2.
|
|
3
|
+
"version": "3.0.0-3.2.6",
|
|
4
4
|
"description": "GJS TypeScript type definitions for GcrUi-3, generated from library version 3.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gcrui-3.js",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gcrui-3.d.cts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@girs/atk-1.0": "^2.50.0-3.2.
|
|
29
|
-
"@girs/cairo-1.0": "^1.0.0-3.2.
|
|
30
|
-
"@girs/freetype2-2.0": "^2.0.0-3.2.
|
|
31
|
-
"@girs/gck-1": "^1.0.0-3.2.
|
|
32
|
-
"@girs/gcr-3": "^3.41.0-3.2.
|
|
33
|
-
"@girs/gdk-3.0": "^3.24.38-3.2.
|
|
34
|
-
"@girs/gdkpixbuf-2.0": "^2.0.0-3.2.
|
|
35
|
-
"@girs/gio-2.0": "^2.78.0-3.2.
|
|
36
|
-
"@girs/gjs": "^3.2.
|
|
37
|
-
"@girs/glib-2.0": "^2.78.0-3.2.
|
|
38
|
-
"@girs/gmodule-2.0": "^2.0.0-3.2.
|
|
39
|
-
"@girs/gobject-2.0": "^2.78.0-3.2.
|
|
40
|
-
"@girs/gtk-3.0": "^3.24.38-3.2.
|
|
41
|
-
"@girs/harfbuzz-0.0": "^8.2.1-3.2.
|
|
42
|
-
"@girs/pango-1.0": "^1.51.0-3.2.
|
|
43
|
-
"@girs/xlib-2.0": "^2.0.0-3.2.
|
|
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/gck-1": "^1.0.0-3.2.6",
|
|
32
|
+
"@girs/gcr-3": "^3.41.0-3.2.6",
|
|
33
|
+
"@girs/gdk-3.0": "^3.24.38-3.2.6",
|
|
34
|
+
"@girs/gdkpixbuf-2.0": "^2.0.0-3.2.6",
|
|
35
|
+
"@girs/gio-2.0": "^2.78.0-3.2.6",
|
|
36
|
+
"@girs/gjs": "^3.2.6",
|
|
37
|
+
"@girs/glib-2.0": "^2.78.0-3.2.6",
|
|
38
|
+
"@girs/gmodule-2.0": "^2.0.0-3.2.6",
|
|
39
|
+
"@girs/gobject-2.0": "^2.78.0-3.2.6",
|
|
40
|
+
"@girs/gtk-3.0": "^3.24.38-3.2.6",
|
|
41
|
+
"@girs/harfbuzz-0.0": "^8.2.1-3.2.6",
|
|
42
|
+
"@girs/pango-1.0": "^1.51.0-3.2.6",
|
|
43
|
+
"@girs/xlib-2.0": "^2.0.0-3.2.6"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"typescript": "*"
|