@girs/cmenu-3.0 3.0.0-4.0.0-beta.5 → 3.0.0-4.0.0-beta.7

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/cmenu-3.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for CMenu-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.5.
8
+ GJS TypeScript type definitions for CMenu-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.7.
9
9
 
10
10
 
11
11
  ## Install
@@ -1,12 +1,9 @@
1
-
2
1
  declare module 'gi://CMenu?version=3.0' {
3
- import CMenu from '@girs/cmenu-3.0';
4
- export default CMenu;
2
+ import CMenu30 from '@girs/cmenu-3.0';
3
+ export default CMenu30;
5
4
  }
6
5
 
7
6
  declare module 'gi://CMenu' {
8
7
  import CMenu30 from 'gi://CMenu?version=3.0';
9
8
  export default CMenu30;
10
9
  }
11
-
12
-
@@ -1,4 +1,3 @@
1
-
2
1
  import CMenu30 from '@girs/cmenu-3.0';
3
2
 
4
3
  declare global {
@@ -8,5 +7,3 @@ declare global {
8
7
  }
9
8
 
10
9
  export default GjsGiImports;
11
-
12
-
package/cmenu-3.0.d.ts CHANGED
@@ -1,21 +1,23 @@
1
- /*
1
+ /**
2
2
  * Type Definitions for Gjs (https://gjs.guide/)
3
3
  *
4
4
  * These type definitions are automatically generated, do not edit them by hand.
5
5
  * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ *
7
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
6
8
  */
7
9
 
8
- import './cmenu-3.0-ambient.d.ts';
9
-
10
- /**
11
- * CMenu-3.0
12
- */
13
-
10
+ // Module dependencies
14
11
  import type Gio from '@girs/gio-2.0';
15
12
  import type GObject from '@girs/gobject-2.0';
16
13
  import type GLib from '@girs/glib-2.0';
14
+ import type GModule from '@girs/gmodule-2.0';
17
15
 
18
16
  export namespace CMenu {
17
+ /**
18
+ * CMenu-3.0
19
+ */
20
+
19
21
  enum TreeItemType {
20
22
  INVALID,
21
23
  DIRECTORY,
@@ -811,7 +813,7 @@ export namespace CMenu {
811
813
  * static void
812
814
  * my_object_class_init (MyObjectClass *klass)
813
815
  * {
814
- * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
816
+ * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
815
817
  * 0, 100,
816
818
  * 50,
817
819
  * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -964,10 +966,45 @@ export namespace CMenu {
964
966
  * @param closure #GClosure to watch
965
967
  */
966
968
  watch_closure(closure: GObject.Closure): void;
969
+ /**
970
+ * the `constructed` function is called by g_object_new() as the
971
+ * final step of the object creation process. At the point of the call, all
972
+ * construction properties have been set on the object. The purpose of this
973
+ * call is to allow for object initialisation steps that can only be performed
974
+ * after construction properties have been set. `constructed` implementors
975
+ * should chain up to the `constructed` call of their parent class to allow it
976
+ * to complete its initialisation.
977
+ */
967
978
  vfunc_constructed(): void;
979
+ /**
980
+ * emits property change notification for a bunch
981
+ * of properties. Overriding `dispatch_properties_changed` should be rarely
982
+ * needed.
983
+ * @param n_pspecs
984
+ * @param pspecs
985
+ */
968
986
  vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
987
+ /**
988
+ * the `dispose` function is supposed to drop all references to other
989
+ * objects, but keep the instance otherwise intact, so that client method
990
+ * invocations still work. It may be run multiple times (due to reference
991
+ * loops). Before returning, `dispose` should chain up to the `dispose` method
992
+ * of the parent class.
993
+ */
969
994
  vfunc_dispose(): void;
995
+ /**
996
+ * instance finalization function, should finish the finalization of
997
+ * the instance begun in `dispose` and chain up to the `finalize` method of the
998
+ * parent class.
999
+ */
970
1000
  vfunc_finalize(): void;
1001
+ /**
1002
+ * the generic getter for all properties of this type. Should be
1003
+ * overridden for every type with properties.
1004
+ * @param property_id
1005
+ * @param value
1006
+ * @param pspec
1007
+ */
971
1008
  vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
972
1009
  /**
973
1010
  * Emits a "notify" signal for the property `property_name` on `object`.
@@ -983,6 +1020,16 @@ export namespace CMenu {
983
1020
  * @param pspec
984
1021
  */
985
1022
  vfunc_notify(pspec: GObject.ParamSpec): void;
1023
+ /**
1024
+ * the generic setter for all properties of this type. Should be
1025
+ * overridden for every type with properties. If implementations of
1026
+ * `set_property` don't emit property change notification explicitly, this will
1027
+ * be done implicitly by the type system. However, if the notify signal is
1028
+ * emitted explicitly, the type system will not emit it a second time.
1029
+ * @param property_id
1030
+ * @param value
1031
+ * @param pspec
1032
+ */
986
1033
  vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
987
1034
  disconnect(id: number): void;
988
1035
  set(properties: { [key: string]: any }): void;
@@ -1267,4 +1314,5 @@ export namespace CMenu {
1267
1314
  }
1268
1315
 
1269
1316
  export default CMenu;
1317
+
1270
1318
  // END
package/cmenu-3.0.js CHANGED
@@ -1,6 +1,5 @@
1
1
 
2
- // @ts-expect-error
3
- import CMenu from 'gi://CMenu?version=3.0';
4
- export { CMenu };
5
- export default CMenu;
2
+ // @ts-expect-error
3
+ import CMenu from 'gi://CMenu?version=3.0';
4
+ export default CMenu;
6
5
 
package/index.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Type Definitions for Gjs (https://gjs.guide/)
3
+ *
4
+ * These type definitions are automatically generated, do not edit them by hand.
5
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ *
7
+ * This template is used to generate the index.d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
+ */
9
+
10
+ import './cmenu-3.0-ambient.d.ts';
11
+
12
+ import './cmenu-3.0-import.d.ts';
13
+
14
+ import CMenu from './cmenu-3.0.js';
15
+ export default CMenu;
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import CMenu from './cmenu-3.0.js';
4
+ export default CMenu;
5
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/cmenu-3.0",
3
- "version": "3.0.0-4.0.0-beta.5",
3
+ "version": "3.0.0-4.0.0-beta.7",
4
4
  "description": "GJS TypeScript type definitions for CMenu-3.0, generated from library version 3.0.0",
5
5
  "type": "module",
6
6
  "module": "cmenu-3.0.js",
@@ -16,20 +16,26 @@
16
16
  "import": "./cmenu-3.0-import.js",
17
17
  "default": "./cmenu-3.0-import.js"
18
18
  },
19
- ".": {
19
+ "./cmenu-3.0": {
20
20
  "types": "./cmenu-3.0.d.ts",
21
21
  "import": "./cmenu-3.0.js",
22
22
  "default": "./cmenu-3.0.js"
23
+ },
24
+ ".": {
25
+ "types": "./index.d.ts",
26
+ "import": "./index.js",
27
+ "default": "./index.js"
23
28
  }
24
29
  },
25
30
  "scripts": {
26
- "test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit cmenu-3.0.d.ts"
31
+ "test": "tsc --project tsconfig.json"
27
32
  },
28
33
  "dependencies": {
29
- "@girs/gio-2.0": "^2.80.0-4.0.0-beta.5",
30
- "@girs/gjs": "^4.0.0-beta.5",
31
- "@girs/glib-2.0": "^2.80.0-4.0.0-beta.5",
32
- "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.5"
34
+ "@girs/gio-2.0": "^2.80.2-4.0.0-beta.7",
35
+ "@girs/gjs": "^4.0.0-beta.7",
36
+ "@girs/glib-2.0": "^2.80.2-4.0.0-beta.7",
37
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.7",
38
+ "@girs/gobject-2.0": "^2.80.2-4.0.0-beta.7"
33
39
  },
34
40
  "devDependencies": {
35
41
  "typescript": "*"
package/tsconfig.json CHANGED
@@ -2,11 +2,11 @@
2
2
  "compilerOptions": {
3
3
  // General settings for code interpretation
4
4
  "target": "ESNext",
5
- "module": "ESNext",
5
+ "module": "NodeNext",
6
6
  "lib": ["ESNext"],
7
7
  "types": [],
8
8
  "experimentalDecorators": true,
9
- "moduleResolution": "node",
9
+ "moduleResolution": "NodeNext",
10
10
  "noEmit": true,
11
11
  "noEmitOnError": false,
12
12
  "baseUrl": "./",