@girs/phosh-0 0.0.0-4.0.0-beta.41

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