@girs/cogl-11 11.0.0-3.0.0-beta.13 → 11.0.0-3.0.3

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
@@ -1,11 +1,16 @@
1
1
 
2
2
  # Cogl-11
3
3
 
4
- GJS TypeScript type definitions for Cogl-11, generated from library version 11.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gjs) v3.0.0-beta.13.
4
+ ![version](https://img.shields.io/npm/v/@girs/cogl-11)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/cogl-11)
6
+
7
+
8
+ GJS TypeScript type definitions for Cogl-11, generated from library version 11.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.0.3.
9
+
5
10
 
6
11
  ## Install
7
12
 
8
- To use this type definitions, install them with NPM like this:
13
+ To use this type definitions, install them with NPM:
9
14
  ```bash
10
15
  npm install @girs/cogl-11
11
16
  ```
@@ -22,10 +27,65 @@ Or if you prefer CommonJS, you can also use this:
22
27
  const Cogl = require('@girs/cogl-11');
23
28
  ```
24
29
 
25
- If you use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules), you can also import this module like you would do this in JavaScript:
30
+ ### Ambient Modules
31
+
32
+ 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.
33
+ For this you need to include `@girs/cogl-11` or `@girs/cogl-11/ambient` in your `tsconfig` or entry point Typescript file:
34
+
35
+ `index.ts`:
36
+ ```ts
37
+ import '@girs/cogl-11'
38
+ ```
39
+
40
+ `tsconfig.json`:
41
+ ```json
42
+ {
43
+ "compilerOptions": {
44
+ ...
45
+ },
46
+ "include": ["@girs/cogl-11"],
47
+ ...
48
+ }
49
+ ```
50
+
51
+ Now you can import the ambient module with TypeScript support:
26
52
 
27
53
  ```ts
28
54
  import Cogl from 'gi://Cogl?version=11';
29
55
  ```
30
56
 
31
- 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).
57
+ ### Global import
58
+
59
+ You can also import the module with Typescript support using the global `imports.gi` object of GJS.
60
+ For this you need to include `@girs/cogl-11` or `@girs/cogl-11/import` in your `tsconfig` or entry point Typescript file:
61
+
62
+ `index.ts`:
63
+ ```ts
64
+ import '@girs/cogl-11'
65
+ ```
66
+
67
+ `tsconfig.json`:
68
+ ```json
69
+ {
70
+ "compilerOptions": {
71
+ ...
72
+ },
73
+ "include": ["@girs/cogl-11"],
74
+ ...
75
+ }
76
+ ```
77
+
78
+ Now you have also type support for this, too:
79
+
80
+ ```ts
81
+ const Cogl = imports.gi.Cogl;
82
+ ```
83
+
84
+ ### Bundle
85
+
86
+ 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).
87
+
88
+ ## Other packages
89
+
90
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
91
+
@@ -0,0 +1,9 @@
1
+
2
+
3
+ declare module 'gi://Cogl?version=11' {
4
+ import Cogl11 from '@girs/cogl-11';
5
+ export default Cogl11;
6
+ }
7
+
8
+
9
+
@@ -0,0 +1,13 @@
1
+
2
+
3
+ import Cogl11 from '@girs/cogl-11';
4
+
5
+ declare global {
6
+ export interface GjsGiImports {
7
+ Cogl: typeof Cogl11;
8
+ }
9
+ }
10
+
11
+ export default GjsGiImports;
12
+
13
+
package/cogl-11.cjs CHANGED
@@ -7,3 +7,5 @@
7
7
 
8
8
 
9
9
 
10
+
11
+
package/cogl-11.d.cts CHANGED
@@ -3,8 +3,11 @@
3
3
  * Type Definitions for Gjs (https://gjs.guide/)
4
4
  *
5
5
  * These type definitions are automatically generated, do not edit them by hand.
6
- * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
7
7
  */
8
+
9
+ import './cogl-11-ambient.d.ts';
10
+ import './cogl-11-import.d.ts';
8
11
  /**
9
12
  * Cogl-11
10
13
  */
package/cogl-11.d.ts CHANGED
@@ -3,8 +3,11 @@
3
3
  * Type Definitions for Gjs (https://gjs.guide/)
4
4
  *
5
5
  * These type definitions are automatically generated, do not edit them by hand.
6
- * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
7
7
  */
8
+
9
+ import './cogl-11-ambient.d.ts';
10
+ import './cogl-11-import.d.ts';
8
11
  /**
9
12
  * Cogl-11
10
13
  */
package/cogl-11.js CHANGED
@@ -6,3 +6,5 @@
6
6
  export default Cogl;
7
7
 
8
8
 
9
+
10
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/cogl-11",
3
- "version": "11.0.0-3.0.0-beta.13",
3
+ "version": "11.0.0-3.0.3",
4
4
  "description": "GJS TypeScript type definitions for Cogl-11, generated from library version 11.0.0",
5
5
  "type": "module",
6
6
  "module": "cogl-11.js",
@@ -12,6 +12,8 @@
12
12
  "tsconfig": "./tsconfig.doc.json"
13
13
  },
14
14
  "exports": {
15
+ "./ambient": "./cogl-11-ambient.d.ts",
16
+ "./import": "./cogl-11-import.d.ts",
15
17
  ".": {
16
18
  "import": {
17
19
  "types": "./cogl-11.d.ts",
@@ -29,28 +31,32 @@
29
31
  "test:cjs": "tsc --noEmit cogl-11.d.cts"
30
32
  },
31
33
  "dependencies": {
32
- "@girs/cairo-1.0": "^1.0.0-3.0.0-beta.13",
33
- "@girs/gl-1.0": "^1.0.0-3.0.0-beta.13",
34
- "@girs/glib-2.0": "^2.76.1-3.0.0-beta.13",
35
- "@girs/gobject-2.0": "^2.76.1-3.0.0-beta.13",
36
- "@girs/graphene-1.0": "^1.0.0-3.0.0-beta.13"
34
+ "@girs/cairo-1.0": "^1.0.0-3.0.3",
35
+ "@girs/gjs": "^3.0.3",
36
+ "@girs/gl-1.0": "^1.0.0-3.0.3",
37
+ "@girs/glib-2.0": "^2.76.1-3.0.3",
38
+ "@girs/gobject-2.0": "^2.76.1-3.0.3",
39
+ "@girs/graphene-1.0": "^1.0.0-3.0.3"
37
40
  },
38
41
  "devDependencies": {
39
- "typescript": "^*"
42
+ "typescript": "*"
40
43
  },
41
44
  "keywords": [
42
45
  "Gir",
43
46
  "TypeScript",
47
+ "types",
48
+ "GObject-Introspection",
49
+ "GJS",
44
50
  "Cogl-11"
45
51
  ],
46
52
  "author": "ts-for-gir",
47
- "license": "Apache-2.0",
53
+ "license": "MIT",
48
54
  "repository": {
49
55
  "type": "git",
50
- "url": "git+https://github.com/gjsify/ts-for-gir.git"
56
+ "url": "git+https://github.com/gjsify/types.git"
51
57
  },
52
58
  "bugs": {
53
59
  "url": "https://github.com/gjsify/ts-for-gir/issues"
54
60
  },
55
- "homepage": "https://github.com/gjsify/ts-for-gir#readme"
61
+ "homepage": "https://github.com/gjsify/types/tree/main/cogl-11#readme"
56
62
  }
package/tsconfig.doc.json CHANGED
@@ -17,3 +17,5 @@
17
17
  },
18
18
  "include": ["./cogl-11.d.ts"]
19
19
  }
20
+
21
+