@girs/rb-3.0 3.0.0-4.0.0-beta.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 ADDED
@@ -0,0 +1,86 @@
1
+
2
+ # RB-3.0
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/rb-3.0)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/rb-3.0)
6
+
7
+
8
+ GJS TypeScript type definitions for RB-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.3.
9
+
10
+
11
+ ## Install
12
+
13
+ To use this type definitions, install them with NPM:
14
+ ```bash
15
+ npm install @girs/rb-3.0
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ You can import this package into your project like this:
21
+ ```ts
22
+ import RB from '@girs/rb-3.0';
23
+ ```
24
+
25
+ ### Ambient Modules
26
+
27
+ 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.
28
+ For this you need to include `@girs/rb-3.0` or `@girs/rb-3.0/ambient` in your `tsconfig` or entry point Typescript file:
29
+
30
+ `index.ts`:
31
+ ```ts
32
+ import '@girs/rb-3.0'
33
+ ```
34
+
35
+ `tsconfig.json`:
36
+ ```json
37
+ {
38
+ "compilerOptions": {
39
+ ...
40
+ },
41
+ "include": ["@girs/rb-3.0"],
42
+ ...
43
+ }
44
+ ```
45
+
46
+ Now you can import the ambient module with TypeScript support:
47
+
48
+ ```ts
49
+ import RB from 'gi://RB?version=3.0';
50
+ ```
51
+
52
+ ### Global import
53
+
54
+ You can also import the module with Typescript support using the global `imports.gi` object of GJS.
55
+ For this you need to include `@girs/rb-3.0` or `@girs/rb-3.0/import` in your `tsconfig` or entry point Typescript file:
56
+
57
+ `index.ts`:
58
+ ```ts
59
+ import '@girs/rb-3.0'
60
+ ```
61
+
62
+ `tsconfig.json`:
63
+ ```json
64
+ {
65
+ "compilerOptions": {
66
+ ...
67
+ },
68
+ "include": ["@girs/rb-3.0"],
69
+ ...
70
+ }
71
+ ```
72
+
73
+ Now you have also type support for this, too:
74
+
75
+ ```ts
76
+ const RB = imports.gi.RB;
77
+ ```
78
+
79
+ ### Bundle
80
+
81
+ 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).
82
+
83
+ ## Other packages
84
+
85
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
86
+
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@girs/rb-3.0",
3
+ "version": "3.0.0-4.0.0-beta.3",
4
+ "description": "GJS TypeScript type definitions for RB-3.0, generated from library version 3.0.0",
5
+ "type": "module",
6
+ "module": "rb-3.0.js",
7
+ "main": "rb-3.0.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./rb-3.0-ambient.d.ts",
11
+ "import": "./rb-3.0-ambient.js",
12
+ "default": "./rb-3.0-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./rb-3.0-import.d.ts",
16
+ "import": "./rb-3.0-import.js",
17
+ "default": "./rb-3.0-import.js"
18
+ },
19
+ ".": {
20
+ "types": "./rb-3.0.d.ts",
21
+ "import": "./rb-3.0.js",
22
+ "default": "./rb-3.0.js"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit rb-3.0.d.ts"
27
+ },
28
+ "dependencies": {
29
+ "@girs/atk-1.0": "^2.52.0-4.0.0-beta.3",
30
+ "@girs/cairo-1.0": "^1.0.0-4.0.0-beta.3",
31
+ "@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.3",
32
+ "@girs/gdk-3.0": "^3.24.41-4.0.0-beta.3",
33
+ "@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.3",
34
+ "@girs/gio-2.0": "^2.80.0-4.0.0-beta.3",
35
+ "@girs/gjs": "^4.0.0-beta.3",
36
+ "@girs/glib-2.0": "^2.80.0-4.0.0-beta.3",
37
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.3",
38
+ "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.3",
39
+ "@girs/gst-1.0": "^1.23.0-4.0.0-beta.3",
40
+ "@girs/gstaudio-1.0": "^1.0.0-4.0.0-beta.3",
41
+ "@girs/gstbase-1.0": "^1.0.0-4.0.0-beta.3",
42
+ "@girs/gstpbutils-1.0": "^1.0.0-4.0.0-beta.3",
43
+ "@girs/gstvideo-1.0": "^1.0.0-4.0.0-beta.3",
44
+ "@girs/gtk-3.0": "^3.24.41-4.0.0-beta.3",
45
+ "@girs/harfbuzz-0.0": "^8.3.1-4.0.0-beta.3",
46
+ "@girs/libxml2-2.0": "^2.0.0-4.0.0-beta.3",
47
+ "@girs/mpid-3.0": "^3.0.0-4.0.0-beta.3",
48
+ "@girs/pango-1.0": "^1.51.0-4.0.0-beta.3",
49
+ "@girs/xlib-2.0": "^2.0.0-4.0.0-beta.3"
50
+ },
51
+ "devDependencies": {
52
+ "typescript": "*"
53
+ },
54
+ "keywords": [
55
+ "Gir",
56
+ "TypeScript",
57
+ "types",
58
+ "GObject-Introspection",
59
+ "GJS",
60
+ "RB-3.0"
61
+ ],
62
+ "author": "ts-for-gir",
63
+ "license": "MIT",
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
67
+ },
68
+ "bugs": {
69
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
70
+ },
71
+ "homepage": "https://github.com/gjsify/types/tree/main/rb-3.0#readme"
72
+ }
@@ -0,0 +1,12 @@
1
+
2
+ declare module 'gi://RB?version=3.0' {
3
+ import RB from '@girs/rb-3.0';
4
+ export default RB;
5
+ }
6
+
7
+ declare module 'gi://RB' {
8
+ import RB30 from 'gi://RB?version=3.0';
9
+ export default RB30;
10
+ }
11
+
12
+
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,12 @@
1
+
2
+ import RB30 from '@girs/rb-3.0';
3
+
4
+ declare global {
5
+ export interface GjsGiImports {
6
+ RB: typeof RB30;
7
+ }
8
+ }
9
+
10
+ export default GjsGiImports;
11
+
12
+
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+