@girs/glygtk4-1 1.0.0-4.0.0-beta.37

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,85 @@
1
+
2
+ # GlyGtk4-1
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/glygtk4-1)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/glygtk4-1)
6
+
7
+
8
+ GJS TypeScript type definitions for GlyGtk4-1, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.37.
9
+
10
+ ## Install
11
+
12
+ To use this type definitions, install them with NPM:
13
+ ```bash
14
+ npm install @girs/glygtk4-1
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ You can import this package into your project like this:
20
+ ```ts
21
+ import GlyGtk4 from '@girs/glygtk4-1';
22
+ ```
23
+
24
+ ### Ambient Modules
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.
27
+ For this you need to include `@girs/glygtk4-1` or `@girs/glygtk4-1/ambient` in your `tsconfig` or entry point Typescript file:
28
+
29
+ `index.ts`:
30
+ ```ts
31
+ import '@girs/glygtk4-1'
32
+ ```
33
+
34
+ `tsconfig.json`:
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ ...
39
+ },
40
+ "include": ["@girs/glygtk4-1"],
41
+ ...
42
+ }
43
+ ```
44
+
45
+ Now you can import the ambient module with TypeScript support:
46
+
47
+ ```ts
48
+ import GlyGtk4 from 'gi://GlyGtk4?version=1';
49
+ ```
50
+
51
+ ### Global import
52
+
53
+ You can also import the module with Typescript support using the global `imports.gi` object of GJS.
54
+ For this you need to include `@girs/glygtk4-1` or `@girs/glygtk4-1/import` in your `tsconfig` or entry point Typescript file:
55
+
56
+ `index.ts`:
57
+ ```ts
58
+ import '@girs/glygtk4-1'
59
+ ```
60
+
61
+ `tsconfig.json`:
62
+ ```json
63
+ {
64
+ "compilerOptions": {
65
+ ...
66
+ },
67
+ "include": ["@girs/glygtk4-1"],
68
+ ...
69
+ }
70
+ ```
71
+
72
+ Now you have also type support for this, too:
73
+
74
+ ```ts
75
+ const GlyGtk4 = imports.gi.GlyGtk4;
76
+ ```
77
+
78
+ ### Bundle
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).
81
+
82
+ ## Other packages
83
+
84
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
85
+
@@ -0,0 +1,9 @@
1
+ declare module 'gi://GlyGtk4?version=1' {
2
+ import GlyGtk41 from '@girs/glygtk4-1';
3
+ export default GlyGtk41;
4
+ }
5
+
6
+ declare module 'gi://GlyGtk4' {
7
+ import GlyGtk41 from 'gi://GlyGtk4?version=1';
8
+ export default GlyGtk41;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1 @@
1
+ // Module import type definition not generated, otherwise this would cause a type conflict, this is because several GIR modules were generated with the same namespace: "GlyGtk4"
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
package/glygtk4-1.d.ts ADDED
@@ -0,0 +1,52 @@
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
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
+ */
9
+
10
+ import '@girs/gjs';
11
+
12
+ // Module dependencies
13
+ import type Gly from '@girs/gly-1';
14
+ import type Gio from '@girs/gio-2.0';
15
+ import type GObject from '@girs/gobject-2.0';
16
+ import type GLib from '@girs/glib-2.0';
17
+ import type GModule from '@girs/gmodule-2.0';
18
+ import type Gdk from '@girs/gdk-4.0';
19
+ import type cairo from 'cairo';
20
+ import type PangoCairo from '@girs/pangocairo-1.0';
21
+ import type Pango from '@girs/pango-1.0';
22
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
23
+ import type freetype2 from '@girs/freetype2-2.0';
24
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
25
+
26
+ export namespace GlyGtk4 {
27
+ /**
28
+ * GlyGtk4-1
29
+ */
30
+
31
+ /**
32
+ * Gets the actual image from a frame. See the [class`Gly`.Loader] docs
33
+ * for a complete example.
34
+ * @param frame Frame
35
+ * @returns A GDK Texture
36
+ */
37
+ function frame_get_texture(frame: Gly.Frame): Gdk.Texture;
38
+ /**
39
+ * Name of the imported GIR library
40
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
41
+ */
42
+ const __name__: string;
43
+ /**
44
+ * Version of the imported GIR library
45
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
46
+ */
47
+ const __version__: string;
48
+ }
49
+
50
+ export default GlyGtk4;
51
+
52
+ // END
package/glygtk4-1.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import GlyGtk4 from 'gi://GlyGtk4?version=1';
4
+ export default GlyGtk4;
5
+
package/index.d.ts ADDED
@@ -0,0 +1,13 @@
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 './glygtk4-1-ambient.d.ts';
11
+
12
+ import GlyGtk4 from './glygtk4-1.js';
13
+ export default GlyGtk4;
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import GlyGtk4 from './glygtk4-1.js';
4
+ export default GlyGtk4;
5
+
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@girs/glygtk4-1",
3
+ "version": "1.0.0-4.0.0-beta.37",
4
+ "description": "GJS TypeScript type definitions for GlyGtk4-1, generated from library version 1.0.0",
5
+ "type": "module",
6
+ "module": "glygtk4-1.js",
7
+ "main": "glygtk4-1.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./glygtk4-1-ambient.d.ts",
11
+ "import": "./glygtk4-1-ambient.js",
12
+ "default": "./glygtk4-1-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./glygtk4-1-import.d.ts",
16
+ "import": "./glygtk4-1-import.js",
17
+ "default": "./glygtk4-1-import.js"
18
+ },
19
+ "./glygtk4-1": {
20
+ "types": "./glygtk4-1.d.ts",
21
+ "import": "./glygtk4-1.js",
22
+ "default": "./glygtk4-1.js"
23
+ },
24
+ ".": {
25
+ "types": "./index.d.ts",
26
+ "import": "./index.js",
27
+ "default": "./index.js"
28
+ }
29
+ },
30
+ "scripts": {
31
+ "test": "tsc --project tsconfig.json"
32
+ },
33
+ "dependencies": {
34
+ "@girs/gjs": "4.0.0-beta.37",
35
+ "@girs/gly-1": "1.0.0-4.0.0-beta.37",
36
+ "@girs/gio-2.0": "2.86.0-4.0.0-beta.37",
37
+ "@girs/gobject-2.0": "2.86.0-4.0.0-beta.37",
38
+ "@girs/glib-2.0": "2.86.0-4.0.0-beta.37",
39
+ "@girs/gmodule-2.0": "2.0.0-4.0.0-beta.37",
40
+ "@girs/gdk-4.0": "4.0.0-4.0.0-beta.37",
41
+ "@girs/cairo-1.0": "1.0.0-4.0.0-beta.37",
42
+ "@girs/pangocairo-1.0": "1.0.0-4.0.0-beta.37",
43
+ "@girs/pango-1.0": "1.57.0-4.0.0-beta.37",
44
+ "@girs/harfbuzz-0.0": "11.5.0-4.0.0-beta.37",
45
+ "@girs/freetype2-2.0": "2.0.0-4.0.0-beta.37",
46
+ "@girs/gdkpixbuf-2.0": "2.0.0-4.0.0-beta.37" },
47
+ "devDependencies": {
48
+ "typescript": "*"
49
+ },
50
+ "keywords": ["Gir", "TypeScript", "types", "GObject-Introspection", "GJS", "GlyGtk4-1"],
51
+ "author": "ts-for-gir",
52
+ "license": "MIT",
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://github.com/gjsify/types.git"
56
+ },
57
+ "bugs": {
58
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
59
+ },
60
+ "homepage": "https://github.com/gjsify/types/tree/main/glygtk4-1#readme"
61
+ }
62
+
63
+
package/tsconfig.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "NodeNext",
6
+ "lib": ["ESNext"],
7
+ "types": [],
8
+ "experimentalDecorators": true,
9
+ "moduleResolution": "NodeNext",
10
+ "noEmit": true,
11
+ "noEmitOnError": false,
12
+ "baseUrl": "./",
13
+ "rootDir": ".",
14
+ // General settings for code generation
15
+ "removeComments": false,
16
+ "inlineSourceMap": false,
17
+ "inlineSources": false,
18
+ "newLine": "LF",
19
+ // Show diagnostics
20
+ "diagnostics": true
21
+ },
22
+ "include": ["./glygtk4-1.d.ts"]
23
+ }
24
+
25
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./glygtk4-1.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "GlyGtk4-1",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+