@girs/st-16 16.0.0-4.0.0-beta.21

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
+ # St-16
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/st-16)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/st-16)
6
+
7
+
8
+ GJS TypeScript type definitions for St-16, generated from library version 16.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.21.
9
+
10
+
11
+ ## Install
12
+
13
+ To use this type definitions, install them with NPM:
14
+ ```bash
15
+ npm install @girs/st-16
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ You can import this package into your project like this:
21
+ ```ts
22
+ import St from '@girs/st-16';
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/st-16` or `@girs/st-16/ambient` in your `tsconfig` or entry point Typescript file:
29
+
30
+ `index.ts`:
31
+ ```ts
32
+ import '@girs/st-16'
33
+ ```
34
+
35
+ `tsconfig.json`:
36
+ ```json
37
+ {
38
+ "compilerOptions": {
39
+ ...
40
+ },
41
+ "include": ["@girs/st-16"],
42
+ ...
43
+ }
44
+ ```
45
+
46
+ Now you can import the ambient module with TypeScript support:
47
+
48
+ ```ts
49
+ import St from 'gi://St?version=16';
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/st-16` or `@girs/st-16/import` in your `tsconfig` or entry point Typescript file:
56
+
57
+ `index.ts`:
58
+ ```ts
59
+ import '@girs/st-16'
60
+ ```
61
+
62
+ `tsconfig.json`:
63
+ ```json
64
+ {
65
+ "compilerOptions": {
66
+ ...
67
+ },
68
+ "include": ["@girs/st-16"],
69
+ ...
70
+ }
71
+ ```
72
+
73
+ Now you have also type support for this, too:
74
+
75
+ ```ts
76
+ const St = imports.gi.St;
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/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 './st-16-ambient.d.ts';
11
+
12
+ import './st-16-import.d.ts';
13
+
14
+ import St from './st-16.js';
15
+ export default St;
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import St from './st-16.js';
4
+ export default St;
5
+
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@girs/st-16",
3
+ "version": "16.0.0-4.0.0-beta.21",
4
+ "description": "GJS TypeScript type definitions for St-16, generated from library version 16.0.0",
5
+ "type": "module",
6
+ "module": "st-16.js",
7
+ "main": "st-16.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./st-16-ambient.d.ts",
11
+ "import": "./st-16-ambient.js",
12
+ "default": "./st-16-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./st-16-import.d.ts",
16
+ "import": "./st-16-import.js",
17
+ "default": "./st-16-import.js"
18
+ },
19
+ "./st-16": {
20
+ "types": "./st-16.d.ts",
21
+ "import": "./st-16.js",
22
+ "default": "./st-16.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/atk-1.0": "^2.55.2-4.0.0-beta.21",
35
+ "@girs/cairo-1.0": "^1.0.0-4.0.0-beta.21",
36
+ "@girs/clutter-16": "^16.0.0-4.0.0-beta.21",
37
+ "@girs/cogl-16": "^16.0.0-4.0.0-beta.21",
38
+ "@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.21",
39
+ "@girs/gdesktopenums-3.0": "^3.0.0-4.0.0-beta.21",
40
+ "@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.21",
41
+ "@girs/gio-2.0": "^2.83.3-4.0.0-beta.21",
42
+ "@girs/gjs": "^4.0.0-beta.21",
43
+ "@girs/gl-1.0": "^1.0.0-4.0.0-beta.21",
44
+ "@girs/glib-2.0": "^2.83.3-4.0.0-beta.21",
45
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.21",
46
+ "@girs/gobject-2.0": "^2.83.3-4.0.0-beta.21",
47
+ "@girs/graphene-1.0": "^1.0.0-4.0.0-beta.21",
48
+ "@girs/harfbuzz-0.0": "^9.0.0-4.0.0-beta.21",
49
+ "@girs/meta-16": "^16.0.0-4.0.0-beta.21",
50
+ "@girs/mtk-16": "^16.0.0-4.0.0-beta.21",
51
+ "@girs/pango-1.0": "^1.56.0-4.0.0-beta.21",
52
+ "@girs/xfixes-4.0": "^4.0.0-4.0.0-beta.21",
53
+ "@girs/xlib-2.0": "^2.0.0-4.0.0-beta.21"
54
+ },
55
+ "devDependencies": {
56
+ "typescript": "*"
57
+ },
58
+ "keywords": [
59
+ "Gir",
60
+ "TypeScript",
61
+ "types",
62
+ "GObject-Introspection",
63
+ "GJS",
64
+ "St-16"
65
+ ],
66
+ "author": "ts-for-gir",
67
+ "license": "MIT",
68
+ "repository": {
69
+ "type": "git",
70
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
71
+ },
72
+ "bugs": {
73
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
74
+ },
75
+ "homepage": "https://github.com/gjsify/types/tree/main/st-16#readme"
76
+ }
@@ -0,0 +1,9 @@
1
+ declare module 'gi://St?version=16' {
2
+ import St16 from '@girs/st-16';
3
+ export default St16;
4
+ }
5
+
6
+ declare module 'gi://St' {
7
+ import St16 from 'gi://St?version=16';
8
+ export default St16;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,9 @@
1
+ import St16 from '@girs/st-16';
2
+
3
+ declare global {
4
+ export interface GjsGiImports {
5
+ St: typeof St16;
6
+ }
7
+ }
8
+
9
+ export default GjsGiImports;
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+