@girs/bamf-3 4.2.0 → 4.4.0

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,25 +5,25 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/bamf-3)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Bamf-3 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
8
+ GJS TypeScript type definitions for Bamf-3 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
9
9
 
10
10
  ## Install
11
11
 
12
- To use this type definitions, install them with NPM:
12
+ Install the type definitions with npm:
13
13
  ```bash
14
14
  npm install @girs/bamf-3
15
15
  ```
16
16
 
17
17
  ## Usage
18
18
 
19
- You can import this package into your project like this:
19
+ Import it like any other module:
20
20
  ```ts
21
21
  import Bamf from '@girs/bamf-3';
22
22
  ```
23
23
 
24
24
  ### Ambient Modules
25
25
 
26
- 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.
26
+ [Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
27
27
  For this you need to include `@girs/bamf-3` or `@girs/bamf-3/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/bamf-3'
42
42
  }
43
43
  ```
44
44
 
45
- Now you can import the ambient module with TypeScript support:
45
+ The ambient module now resolves with types:
46
46
 
47
47
  ```ts
48
48
  import Bamf from 'gi://Bamf?version=3';
@@ -50,7 +50,7 @@ import Bamf from 'gi://Bamf?version=3';
50
50
 
51
51
  ### Global import
52
52
 
53
- You can also import the module with Typescript support using the global `imports.gi` object of GJS.
53
+ GJS's global `imports.gi` works too, with types.
54
54
  For this you need to include `@girs/bamf-3` or `@girs/bamf-3/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/bamf-3'
69
69
  }
70
70
  ```
71
71
 
72
- Now you have also type support for this, too:
72
+ That form carries types as well:
73
73
 
74
74
  ```ts
75
75
  const Bamf = imports.gi.Bamf;
@@ -77,7 +77,7 @@ const Bamf = imports.gi.Bamf;
77
77
 
78
78
  ### Bundle
79
79
 
80
- 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).
80
+ Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
81
81
 
82
82
  ## Other packages
83
83
 
package/bamf-3.d.ts CHANGED
@@ -176,6 +176,7 @@ export namespace Bamf {
176
176
  /**
177
177
  * Used to fetch the bus name and the object path of the remote application menu.
178
178
  * @returns `true` if found, `false` otherwise.
179
+ * @deprecated since 0.5.0
179
180
  */
180
181
  get_application_menu(): [boolean, string, string];
181
182
 
@@ -208,6 +209,7 @@ export namespace Bamf {
208
209
  * Used to fetch the application contains a Window with given `xid`.
209
210
  * @param xid an X11 Window ID
210
211
  * @returns a {@link Bamf.Window} for the passed `xid` or `null` if not found.
212
+ * @since 0.5.2
211
213
  */
212
214
  get_window_for_xid(xid: number): Window;
213
215
 
@@ -853,6 +855,7 @@ export namespace Bamf {
853
855
  vfunc_is_urgent(): boolean;
854
856
 
855
857
  /**
858
+ * @since 0.4.0
856
859
  * @virtual
857
860
  */
858
861
  vfunc_is_user_visible(): boolean;
@@ -967,6 +970,7 @@ export namespace Bamf {
967
970
 
968
971
  /**
969
972
  * @returns a boolean useful for determining if a particular view is "user visible". User visible is a concept relating to whether or not a window should be shown in a launcher tasklist.
973
+ * @since 0.4.0
970
974
  */
971
975
  is_user_visible(): boolean;
972
976
 
@@ -974,6 +978,7 @@ export namespace Bamf {
974
978
  * Note: Makes sever dbus calls the first time this is called on a view.
975
979
  * Dbus messaging is reduced afterwards.
976
980
  * @returns Returns a list of {@link Bamf.View} which is owned by the {@link Bamf.View} and should not freed or modified after usage.
981
+ * @since 0.5.2
977
982
  */
978
983
  peek_children(): View[];
979
984
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/bamf-3",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "GJS TypeScript type definitions for Bamf-3",
5
5
  "type": "module",
6
6
  "module": "bamf-3.js",
@@ -31,9 +31,9 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gjs": "^4.2.0",
35
- "@girs/gobject-2.0": "^4.2.0",
36
- "@girs/glib-2.0": "^4.2.0" },
34
+ "@girs/gjs": "^4.4.0",
35
+ "@girs/gobject-2.0": "^4.4.0",
36
+ "@girs/glib-2.0": "^4.4.0" },
37
37
  "devDependencies": {
38
38
  "typescript": "*"
39
39
  },