@girs/atk-1.0 2.48.3-3.2.3 → 2.50.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/atk-1.0-ambient.d.ts +0 -1
- package/atk-1.0-import.d.ts +0 -1
- package/atk-1.0.d.cts +30 -0
- package/atk-1.0.d.ts +30 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Atk-1.0, generated from library version 2.
|
|
8
|
+
GJS TypeScript type definitions for Atk-1.0, generated from library version 2.50.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.5.
|
|
9
9
|
|
|
10
10
|
ATK provides the set of accessibility interfaces that are implemented by other toolkits and applications. Using the ATK interfaces, accessibility tools have full access to view and control running applications.
|
|
11
11
|
|
|
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
|
|
|
82
82
|
const Atk = imports.gi.Atk;
|
|
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/atk-1.0-ambient.d.ts
CHANGED
package/atk-1.0-import.d.ts
CHANGED
package/atk-1.0.d.cts
CHANGED
|
@@ -93,6 +93,26 @@ export enum Layer {
|
|
|
93
93
|
*/
|
|
94
94
|
WINDOW,
|
|
95
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Enumeration used to indicate a type of live region and how assertive it
|
|
98
|
+
* should be in terms of speaking notifications. Currently, this is only used
|
|
99
|
+
* for "notification" events, but it may be used for additional purposes
|
|
100
|
+
* in the future.
|
|
101
|
+
*/
|
|
102
|
+
export enum Live {
|
|
103
|
+
/**
|
|
104
|
+
* No live region.
|
|
105
|
+
*/
|
|
106
|
+
NONE,
|
|
107
|
+
/**
|
|
108
|
+
* This live region should be considered polite.
|
|
109
|
+
*/
|
|
110
|
+
POLITE,
|
|
111
|
+
/**
|
|
112
|
+
* This live region should be considered assertive.
|
|
113
|
+
*/
|
|
114
|
+
ASSERTIVE,
|
|
115
|
+
}
|
|
96
116
|
/**
|
|
97
117
|
* Describes the type of the relation
|
|
98
118
|
*/
|
|
@@ -5900,6 +5920,13 @@ export module Object {
|
|
|
5900
5920
|
($obj: Object, arg1: boolean): void
|
|
5901
5921
|
}
|
|
5902
5922
|
|
|
5923
|
+
/**
|
|
5924
|
+
* Signal callback interface for `notification`
|
|
5925
|
+
*/
|
|
5926
|
+
export interface NotificationSignalCallback {
|
|
5927
|
+
($obj: Object, arg1: string | null, arg2: number): void
|
|
5928
|
+
}
|
|
5929
|
+
|
|
5903
5930
|
/**
|
|
5904
5931
|
* Signal callback interface for `property-change`
|
|
5905
5932
|
*/
|
|
@@ -6330,6 +6357,9 @@ export interface Object {
|
|
|
6330
6357
|
connect(sigName: "focus-event", callback: Object.FocusEventSignalCallback): number
|
|
6331
6358
|
connect_after(sigName: "focus-event", callback: Object.FocusEventSignalCallback): number
|
|
6332
6359
|
emit(sigName: "focus-event", arg1: boolean, ...args: any[]): void
|
|
6360
|
+
connect(sigName: "notification", callback: Object.NotificationSignalCallback): number
|
|
6361
|
+
connect_after(sigName: "notification", callback: Object.NotificationSignalCallback): number
|
|
6362
|
+
emit(sigName: "notification", arg1: string | null, arg2: number, ...args: any[]): void
|
|
6333
6363
|
connect(sigName: "property-change", callback: Object.PropertyChangeSignalCallback): number
|
|
6334
6364
|
connect_after(sigName: "property-change", callback: Object.PropertyChangeSignalCallback): number
|
|
6335
6365
|
emit(sigName: "property-change", arg1: PropertyValues, ...args: any[]): void
|
package/atk-1.0.d.ts
CHANGED
|
@@ -95,6 +95,26 @@ enum Layer {
|
|
|
95
95
|
*/
|
|
96
96
|
WINDOW,
|
|
97
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Enumeration used to indicate a type of live region and how assertive it
|
|
100
|
+
* should be in terms of speaking notifications. Currently, this is only used
|
|
101
|
+
* for "notification" events, but it may be used for additional purposes
|
|
102
|
+
* in the future.
|
|
103
|
+
*/
|
|
104
|
+
enum Live {
|
|
105
|
+
/**
|
|
106
|
+
* No live region.
|
|
107
|
+
*/
|
|
108
|
+
NONE,
|
|
109
|
+
/**
|
|
110
|
+
* This live region should be considered polite.
|
|
111
|
+
*/
|
|
112
|
+
POLITE,
|
|
113
|
+
/**
|
|
114
|
+
* This live region should be considered assertive.
|
|
115
|
+
*/
|
|
116
|
+
ASSERTIVE,
|
|
117
|
+
}
|
|
98
118
|
/**
|
|
99
119
|
* Describes the type of the relation
|
|
100
120
|
*/
|
|
@@ -5902,6 +5922,13 @@ module Object {
|
|
|
5902
5922
|
($obj: Object, arg1: boolean): void
|
|
5903
5923
|
}
|
|
5904
5924
|
|
|
5925
|
+
/**
|
|
5926
|
+
* Signal callback interface for `notification`
|
|
5927
|
+
*/
|
|
5928
|
+
interface NotificationSignalCallback {
|
|
5929
|
+
($obj: Object, arg1: string | null, arg2: number): void
|
|
5930
|
+
}
|
|
5931
|
+
|
|
5905
5932
|
/**
|
|
5906
5933
|
* Signal callback interface for `property-change`
|
|
5907
5934
|
*/
|
|
@@ -6332,6 +6359,9 @@ interface Object {
|
|
|
6332
6359
|
connect(sigName: "focus-event", callback: Object.FocusEventSignalCallback): number
|
|
6333
6360
|
connect_after(sigName: "focus-event", callback: Object.FocusEventSignalCallback): number
|
|
6334
6361
|
emit(sigName: "focus-event", arg1: boolean, ...args: any[]): void
|
|
6362
|
+
connect(sigName: "notification", callback: Object.NotificationSignalCallback): number
|
|
6363
|
+
connect_after(sigName: "notification", callback: Object.NotificationSignalCallback): number
|
|
6364
|
+
emit(sigName: "notification", arg1: string | null, arg2: number, ...args: any[]): void
|
|
6335
6365
|
connect(sigName: "property-change", callback: Object.PropertyChangeSignalCallback): number
|
|
6336
6366
|
connect_after(sigName: "property-change", callback: Object.PropertyChangeSignalCallback): number
|
|
6337
6367
|
emit(sigName: "property-change", arg1: PropertyValues, ...args: any[]): void
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/atk-1.0",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "GJS TypeScript type definitions for Atk-1.0, generated from library version 2.
|
|
3
|
+
"version": "2.50.0-3.2.5",
|
|
4
|
+
"description": "GJS TypeScript type definitions for Atk-1.0, generated from library version 2.50.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "atk-1.0.js",
|
|
7
7
|
"main": "atk-1.0.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit atk-1.0.d.cts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@girs/gjs": "^3.2.
|
|
29
|
-
"@girs/glib-2.0": "^2.
|
|
30
|
-
"@girs/gobject-2.0": "^2.
|
|
28
|
+
"@girs/gjs": "^3.2.5",
|
|
29
|
+
"@girs/glib-2.0": "^2.78.0-3.2.5",
|
|
30
|
+
"@girs/gobject-2.0": "^2.78.0-3.2.5"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"typescript": "*"
|