@girs/gjs 3.0.0-beta.12 → 3.0.0-beta.14

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,7 +1,7 @@
1
1
 
2
2
  # Gjs
3
3
 
4
- GJS TypeScript type definitions for Gjs using [ts-for-gir](https://github.com/gjsify/ts-for-gjs) v3.0.0-beta.12.
4
+ GJS TypeScript type definitions for Gjs using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.0.0-beta.14.
5
5
 
6
6
  ## Install
7
7
 
@@ -27,4 +27,8 @@ If you want to use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/m
27
27
  import '@girs/gjs/ambient'
28
28
  ```
29
29
 
30
- 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).
30
+ 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).
31
+
32
+ ## Other packages
33
+
34
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
package/ambient.d.ts CHANGED
@@ -167,9 +167,9 @@
167
167
  import Cally10 from '@girs/cally-1.0';
168
168
  export default Cally10;
169
169
  }
170
- declare module 'gi://Cally?version=11' {
171
- import Cally11 from '@girs/cally-11';
172
- export default Cally11;
170
+ declare module 'gi://Cally?version=12' {
171
+ import Cally12 from '@girs/cally-12';
172
+ export default Cally12;
173
173
  }
174
174
  declare module 'gi://Camel?version=1.2' {
175
175
  import Camel12 from '@girs/camel-1.2';
@@ -211,9 +211,9 @@
211
211
  import Clutter10 from '@girs/clutter-1.0';
212
212
  export default Clutter10;
213
213
  }
214
- declare module 'gi://Clutter?version=11' {
215
- import Clutter11 from '@girs/clutter-11';
216
- export default Clutter11;
214
+ declare module 'gi://Clutter?version=12' {
215
+ import Clutter12 from '@girs/clutter-12';
216
+ export default Clutter12;
217
217
  }
218
218
  declare module 'gi://ClutterGdk?version=1.0' {
219
219
  import ClutterGdk10 from '@girs/cluttergdk-1.0';
@@ -253,9 +253,9 @@
253
253
  import Cogl20 from '@girs/cogl-2.0';
254
254
  export default Cogl20;
255
255
  }
256
- declare module 'gi://Cogl?version=11' {
257
- import Cogl11 from '@girs/cogl-11';
258
- export default Cogl11;
256
+ declare module 'gi://Cogl?version=12' {
257
+ import Cogl12 from '@girs/cogl-12';
258
+ export default Cogl12;
259
259
  }
260
260
  declare module 'gi://CoglGst?version=2.0' {
261
261
  import CoglGst20 from '@girs/coglgst-2.0';
@@ -274,9 +274,9 @@
274
274
  import CoglPango20 from '@girs/coglpango-2.0';
275
275
  export default CoglPango20;
276
276
  }
277
- declare module 'gi://CoglPango?version=11' {
278
- import CoglPango11 from '@girs/coglpango-11';
279
- export default CoglPango11;
277
+ declare module 'gi://CoglPango?version=12' {
278
+ import CoglPango12 from '@girs/coglpango-12';
279
+ export default CoglPango12;
280
280
  }
281
281
  declare module 'gi://ColorHug?version=1.0' {
282
282
  import ColorHug10 from '@girs/colorhug-1.0';
@@ -2099,10 +2099,9 @@
2099
2099
  import Peas10 from '@girs/peas-1.0';
2100
2100
  export default Peas10;
2101
2101
  }
2102
- // Add support for ESM imports without version prefix only if there is no version conflict
2103
- declare module 'gi://Peas' {
2104
- import Peas10 from '@girs/peas-1.0';
2105
- export default Peas10;
2102
+ declare module 'gi://Peas?version=2' {
2103
+ import Peas2 from '@girs/peas-2';
2104
+ export default Peas2;
2106
2105
  }
2107
2106
  declare module 'gi://PeasGtk?version=1.0' {
2108
2107
  import PeasGtk10 from '@girs/peasgtk-1.0';
@@ -2612,6 +2611,15 @@
2612
2611
  import WebKitWebExtension60 from '@girs/webkitwebextension-6.0';
2613
2612
  export default WebKitWebExtension60;
2614
2613
  }
2614
+ declare module 'gi://WebKitWebProcessExtension?version=6.0' {
2615
+ import WebKitWebProcessExtension60 from '@girs/webkitwebprocessextension-6.0';
2616
+ export default WebKitWebProcessExtension60;
2617
+ }
2618
+ // Add support for ESM imports without version prefix only if there is no version conflict
2619
+ declare module 'gi://WebKitWebProcessExtension' {
2620
+ import WebKitWebProcessExtension60 from '@girs/webkitwebprocessextension-6.0';
2621
+ export default WebKitWebProcessExtension60;
2622
+ }
2615
2623
  declare module 'gi://Wnck?version=3.0' {
2616
2624
  import Wnck30 from '@girs/wnck-3.0';
2617
2625
  export default Wnck30;
@@ -2819,23 +2827,23 @@
2819
2827
  import Gvc10 from '@girs/gvc-1.0';
2820
2828
  export default Gvc10;
2821
2829
  }
2822
- declare module 'gi://Shell?version=0.1' {
2823
- import Shell01 from '@girs/shell-0.1';
2824
- export default Shell01;
2830
+ declare module 'gi://Shell?version=12' {
2831
+ import Shell12 from '@girs/shell-12';
2832
+ export default Shell12;
2825
2833
  }
2826
2834
  // Add support for ESM imports without version prefix only if there is no version conflict
2827
2835
  declare module 'gi://Shell' {
2828
- import Shell01 from '@girs/shell-0.1';
2829
- export default Shell01;
2836
+ import Shell12 from '@girs/shell-12';
2837
+ export default Shell12;
2830
2838
  }
2831
- declare module 'gi://St?version=1.0' {
2832
- import St10 from '@girs/st-1.0';
2833
- export default St10;
2839
+ declare module 'gi://St?version=12' {
2840
+ import St12 from '@girs/st-12';
2841
+ export default St12;
2834
2842
  }
2835
2843
  // Add support for ESM imports without version prefix only if there is no version conflict
2836
2844
  declare module 'gi://St' {
2837
- import St10 from '@girs/st-1.0';
2838
- export default St10;
2845
+ import St12 from '@girs/st-12';
2846
+ export default St12;
2839
2847
  }
2840
2848
  declare module 'gi://Shew?version=0' {
2841
2849
  import Shew0 from '@girs/shew-0';
@@ -2846,12 +2854,38 @@
2846
2854
  import Shew0 from '@girs/shew-0';
2847
2855
  export default Shew0;
2848
2856
  }
2849
- declare module 'gi://Meta?version=11' {
2850
- import Meta11 from '@girs/meta-11';
2851
- export default Meta11;
2857
+ declare module 'gi://Meta?version=12' {
2858
+ import Meta12 from '@girs/meta-12';
2859
+ export default Meta12;
2852
2860
  }
2853
2861
  // Add support for ESM imports without version prefix only if there is no version conflict
2854
2862
  declare module 'gi://Meta' {
2855
- import Meta11 from '@girs/meta-11';
2856
- export default Meta11;
2863
+ import Meta12 from '@girs/meta-12';
2864
+ export default Meta12;
2857
2865
  }
2866
+ declare module 'gi://MetaTest?version=12' {
2867
+ import MetaTest12 from '@girs/metatest-12';
2868
+ export default MetaTest12;
2869
+ }
2870
+ // Add support for ESM imports without version prefix only if there is no version conflict
2871
+ declare module 'gi://MetaTest' {
2872
+ import MetaTest12 from '@girs/metatest-12';
2873
+ export default MetaTest12;
2874
+ }
2875
+
2876
+ declare module 'gettext' {
2877
+ export * from '@girs/gjs/gettext';
2878
+ import Gettext from '@girs/gjs/gettext';
2879
+ export default Gettext;
2880
+ }
2881
+
2882
+ declare module 'system' {
2883
+ export * from '@girs/gjs/system';
2884
+ import System from '@girs/gjs/system';
2885
+ export default System;
2886
+ }
2887
+
2888
+ declare module 'cairo' {
2889
+ import Cairo from '@girs/gjs/cairo';
2890
+ export default Cairo;
2891
+ }
package/cairo.cjs ADDED
@@ -0,0 +1,6 @@
1
+
2
+ const Cairo = imports.cairo;
3
+
4
+ module.exports = Cairo;
5
+ exports.default = Cairo;
6
+
package/cairo.d.cts ADDED
@@ -0,0 +1,8 @@
1
+ // TODO: See ./cairo-1.0.d.ts
2
+ declare const Cairo: any;
3
+
4
+ export default Cairo;
5
+
6
+
7
+ // TODO declare named exports here, cairo doesn't have named exports for its esm module but for cjs we can use `const { Context } = imports.cairo` for that, see `./cairo.js`
8
+
package/cairo.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ // TODO: See ./cairo-1.0.d.ts
2
+ declare const Cairo: any;
3
+
4
+ export default Cairo;
5
+
6
+
package/cairo.js ADDED
@@ -0,0 +1,6 @@
1
+
2
+ import Cairo from 'cairo';
3
+
4
+ // cairo doesn't have named exports, see https://gitlab.gnome.org/GNOME/gjs/-/blob/c2a714f348d6848037f072063e0a914fd537c4f4/installed-tests/js/testCairoModule.js#L14
5
+ export default Cairo;
6
+
package/gettext.cjs ADDED
@@ -0,0 +1,6 @@
1
+
2
+ const Gettext = imports.gettext;
3
+
4
+ module.exports = Gettext;
5
+ exports.default = Gettext;
6
+
package/gettext.d.cts ADDED
@@ -0,0 +1,41 @@
1
+ export enum LocaleCategory {
2
+ ALL,
3
+ COLLATE,
4
+ CTYPE,
5
+ MESSAGES,
6
+ MONETARY,
7
+ NUMERIC,
8
+ TIME,
9
+ }
10
+ export function setlocale(category: number, locale: string | null): string
11
+ export function textdomain(domainname: string | null): string
12
+ export function bindtextdomain(domainname: string, dirname: string | null): string
13
+ export function gettext(msgid: string): string
14
+ export function dgettext(domainname: string | null, msgid: string): string
15
+ export function dcgettext(domainname: string | null, msgid: string, category: number): string
16
+ export function ngettext(msgid: string, msgid_plural: string, n: number): string
17
+ export function dngettext(domainname: string, msgid: string, msgid_plural: string, n: number): string
18
+ export function pgettext(context: string, msgid: string): string
19
+ export function dpgettext(dom: string | null, context: string, msgid: string): string
20
+ export function domain(domainName: string): {
21
+ gettext: (msgid: string) => string
22
+ ngettext: (msgid: string, msgid_plural: string, n: number) => string
23
+ pgettext: (context: string, msgid: string) => string
24
+ }
25
+
26
+ declare const Gettext: {
27
+ LocaleCategory: typeof LocaleCategory,
28
+ setlocale: typeof setlocale,
29
+ textdomain: typeof textdomain,
30
+ bindtextdomain: typeof bindtextdomain,
31
+ gettext: typeof gettext,
32
+ dgettext: typeof dgettext,
33
+ dcgettext: typeof dcgettext,
34
+ ngettext: typeof ngettext,
35
+ dngettext: typeof dngettext,
36
+ pgettext: typeof pgettext,
37
+ dpgettext: typeof dpgettext,
38
+ domain: typeof domain,
39
+ }
40
+
41
+ export default Gettext
package/gettext.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ export enum LocaleCategory {
2
+ ALL,
3
+ COLLATE,
4
+ CTYPE,
5
+ MESSAGES,
6
+ MONETARY,
7
+ NUMERIC,
8
+ TIME,
9
+ }
10
+ export function setlocale(category: number, locale: string | null): string
11
+ export function textdomain(domainname: string | null): string
12
+ export function bindtextdomain(domainname: string, dirname: string | null): string
13
+ export function gettext(msgid: string): string
14
+ export function dgettext(domainname: string | null, msgid: string): string
15
+ export function dcgettext(domainname: string | null, msgid: string, category: number): string
16
+ export function ngettext(msgid: string, msgid_plural: string, n: number): string
17
+ export function dngettext(domainname: string, msgid: string, msgid_plural: string, n: number): string
18
+ export function pgettext(context: string, msgid: string): string
19
+ export function dpgettext(dom: string | null, context: string, msgid: string): string
20
+ export function domain(domainName: string): {
21
+ gettext: (msgid: string) => string
22
+ ngettext: (msgid: string, msgid_plural: string, n: number) => string
23
+ pgettext: (context: string, msgid: string) => string
24
+ }
25
+
26
+ declare const Gettext: {
27
+ LocaleCategory: typeof LocaleCategory,
28
+ setlocale: typeof setlocale,
29
+ textdomain: typeof textdomain,
30
+ bindtextdomain: typeof bindtextdomain,
31
+ gettext: typeof gettext,
32
+ dgettext: typeof dgettext,
33
+ dcgettext: typeof dcgettext,
34
+ ngettext: typeof ngettext,
35
+ dngettext: typeof dngettext,
36
+ pgettext: typeof pgettext,
37
+ dpgettext: typeof dpgettext,
38
+ domain: typeof domain,
39
+ }
40
+
41
+ export default Gettext
package/gettext.js ADDED
@@ -0,0 +1,6 @@
1
+
2
+ import Gettext, { setlocale, textdomain, bindtextdomain, gettext, dgettext, dcgettext, ngettext, dngettext, pgettext, dpgettext, domain } from 'gettext';
3
+
4
+ export { setlocale, textdomain, bindtextdomain, gettext, dgettext, dcgettext, ngettext, dngettext, pgettext, dpgettext, domain }
5
+ export default Gettext;
6
+
package/gjs.cjs CHANGED
@@ -1,4 +1,5 @@
1
- const imports = globalThis.imports || {}
1
+ const imports = globalThis.imports || {};
2
2
 
3
- export { imports }
4
- export default imports
3
+ module.exports = imports;
4
+ exports.default = imports;
5
+