@girs/budgie-3.0 4.8.0 → 5.0.0

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
@@ -4,7 +4,7 @@
4
4
  ![version](https://img.shields.io/npm/v/@girs/budgie-3.0)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/budgie-3.0)
6
6
 
7
- GJS TypeScript type definitions for Budgie-3.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.8.0.
7
+ GJS TypeScript type definitions for Budgie-3.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.0.0.
8
8
 
9
9
  This package contains type declarations only. It ships no runtime code, so it adds
10
10
  nothing to your program and works with any bundler or none at all.
@@ -236,6 +236,27 @@ export const FLAG_VALUES: Readonly<Record<string, number>>;
236
236
  /** `<bitfield GType>.<nick>` -> the raw GIR `value` no number could be read from. */
237
237
  export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
238
238
 
239
+ /**
240
+ * `<declaration GType>.<property>` -> the GType of that property's enum or bitfield.
241
+ *
242
+ * The join the value tables need and nothing else here carries. A host with no GI has a
243
+ * property name and a nick and needs a number; `ENUM_VALUES` is keyed by ENUM GType, and
244
+ * only this says which enum a property is. Keyed by DECLARATION like `OWN_PROPS`, so it is
245
+ * read at every link of a `DECLS` chain — `orientation` belongs to `GtkOrientable`, not
246
+ * to the `GtkBox` a caller starts from.
247
+ *
248
+ * Present only where the property's OWN type is the enum: an array of them, or a union that
249
+ * merely mentions one, would be an entry a consumer resolves wrongly.
250
+ *
251
+ * The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
252
+ * emitted once, by the namespace that owns the enum, so `AdwComboRow.search-match-mode` names
253
+ * `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 57 of the 438
254
+ * entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
255
+ * owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
256
+ * resolves against SOME module.
257
+ */
258
+ export const PROP_ENUMS: Readonly<Record<string, string>>;
259
+
239
260
  /** Widget GType -> slot name -> the method that may adopt a child there. */
240
261
  export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
241
262
 
@@ -103,6 +103,24 @@ export const FLAG_VALUES = {
103
103
  // so this is the table that shape actually reaches.
104
104
  export const FLAG_VALUES_UNREADABLE = {};
105
105
 
106
+ // Declaration GType + property name -> the GType of that property's enum or bitfield.
107
+ //
108
+ // Without it the value tables above are half an answer. A host with no GI knows it must set
109
+ // `orientation` to the number behind the nick `vertical`; `ENUM_VALUES` is keyed
110
+ // `GtkOrientation.vertical`, and nothing else says that `orientation` is a
111
+ // `GtkOrientation`. Deriving it is not available: `never` is a member of several Gtk enums,
112
+ // and choosing between them produces a wrong number rather than a missing one.
113
+ //
114
+ // Only where the property's OWN type is the enum. An array of them and a union that mentions
115
+ // one are both entries a consumer would resolve wrongly, so neither is written.
116
+ //
117
+ // A GType named here has numbers in SOME vocabulary, not necessarily this one: the namespace
118
+ // that OWNS an enum publishes it, so 57 of the 438 entries a full run emits want the owner's
119
+ // vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
120
+ export const PROP_ENUMS = {
121
+ 'BudgieApplet.supported-actions': 'BudgiePanelAction',
122
+ };
123
+
106
124
  export const SLOT_CANDIDATES = {};
107
125
 
108
126
  export const SINCE = {};
package/budgie-3.0.d.ts CHANGED
@@ -305,15 +305,12 @@ export namespace Budgie {
305
305
  // Signals
306
306
  /** @signal */
307
307
  connect<K extends keyof Applet.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Applet.SignalSignatures[K]>): number;
308
- connect(signal: string, callback: (...args: any[]) => any): number;
309
308
 
310
309
  /** @signal */
311
310
  connect_after<K extends keyof Applet.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Applet.SignalSignatures[K]>): number;
312
- connect_after(signal: string, callback: (...args: any[]) => any): number;
313
311
 
314
312
  /** @signal */
315
- emit<K extends keyof Applet.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Applet.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
316
- emit(signal: string, ...args: any[]): void;
313
+ emit<K extends keyof Applet.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Applet.SignalSignatures[K]>): void;
317
314
 
318
315
  // Virtual methods
319
316
  /**
@@ -642,15 +639,12 @@ export namespace Budgie {
642
639
  // Signals
643
640
  /** @signal */
644
641
  connect<K extends keyof AppletInfo.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, AppletInfo.SignalSignatures[K]>): number;
645
- connect(signal: string, callback: (...args: any[]) => any): number;
646
642
 
647
643
  /** @signal */
648
644
  connect_after<K extends keyof AppletInfo.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, AppletInfo.SignalSignatures[K]>): number;
649
- connect_after(signal: string, callback: (...args: any[]) => any): number;
650
645
 
651
646
  /** @signal */
652
- emit<K extends keyof AppletInfo.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<AppletInfo.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
653
- emit(signal: string, ...args: any[]): void;
647
+ emit<K extends keyof AppletInfo.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<AppletInfo.SignalSignatures[K]>): void;
654
648
  }
655
649
 
656
650
 
@@ -739,15 +733,12 @@ export namespace Budgie {
739
733
  // Signals
740
734
  /** @signal */
741
735
  connect<K extends keyof Popover.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Popover.SignalSignatures[K]>): number;
742
- connect(signal: string, callback: (...args: any[]) => any): number;
743
736
 
744
737
  /** @signal */
745
738
  connect_after<K extends keyof Popover.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Popover.SignalSignatures[K]>): number;
746
- connect_after(signal: string, callback: (...args: any[]) => any): number;
747
739
 
748
740
  /** @signal */
749
- emit<K extends keyof Popover.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Popover.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
750
- emit(signal: string, ...args: any[]): void;
741
+ emit<K extends keyof Popover.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Popover.SignalSignatures[K]>): void;
751
742
  }
752
743
 
753
744
 
@@ -784,15 +775,12 @@ export namespace Budgie {
784
775
  // Signals
785
776
  /** @signal */
786
777
  connect<K extends keyof PopoverManager.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, PopoverManager.SignalSignatures[K]>): number;
787
- connect(signal: string, callback: (...args: any[]) => any): number;
788
778
 
789
779
  /** @signal */
790
780
  connect_after<K extends keyof PopoverManager.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, PopoverManager.SignalSignatures[K]>): number;
791
- connect_after(signal: string, callback: (...args: any[]) => any): number;
792
781
 
793
782
  /** @signal */
794
- emit<K extends keyof PopoverManager.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<PopoverManager.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
795
- emit(signal: string, ...args: any[]): void;
783
+ emit<K extends keyof PopoverManager.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<PopoverManager.SignalSignatures[K]>): void;
796
784
 
797
785
  // Methods
798
786
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/budgie-3.0",
3
- "version": "4.8.0",
3
+ "version": "5.0.0",
4
4
  "description": "GJS TypeScript type definitions for Budgie-3.0",
5
5
  "type": "module",
6
6
  "module": "budgie-3.0.js",
@@ -36,21 +36,21 @@
36
36
  "test": "tsc --project tsconfig.json"
37
37
  },
38
38
  "dependencies": {
39
- "@girs/gjs": "^4.8.0",
40
- "@girs/peas-2": "^4.8.0",
41
- "@girs/gio-2.0": "^4.8.0",
42
- "@girs/gobject-2.0": "^4.8.0",
43
- "@girs/glib-2.0": "^4.8.0",
44
- "@girs/gmodule-2.0": "^4.8.0",
45
- "@girs/gtk-3.0": "^4.8.0",
46
- "@girs/xlib-2.0": "^4.8.0",
47
- "@girs/gdk-3.0": "^4.8.0",
48
- "@girs/cairo-1.0": "^4.8.0",
49
- "@girs/pango-1.0": "^4.8.0",
50
- "@girs/harfbuzz-0.0": "^4.8.0",
51
- "@girs/freetype2-2.0": "^4.8.0",
52
- "@girs/gdkpixbuf-2.0": "^4.8.0",
53
- "@girs/atk-1.0": "^4.8.0" },
39
+ "@girs/gjs": "^5.0.0",
40
+ "@girs/peas-2": "^5.0.0",
41
+ "@girs/gio-2.0": "^5.0.0",
42
+ "@girs/gobject-2.0": "^5.0.0",
43
+ "@girs/glib-2.0": "^5.0.0",
44
+ "@girs/gmodule-2.0": "^5.0.0",
45
+ "@girs/gtk-3.0": "^5.0.0",
46
+ "@girs/xlib-2.0": "^5.0.0",
47
+ "@girs/gdk-3.0": "^5.0.0",
48
+ "@girs/cairo-1.0": "^5.0.0",
49
+ "@girs/pango-1.0": "^5.0.0",
50
+ "@girs/harfbuzz-0.0": "^5.0.0",
51
+ "@girs/freetype2-2.0": "^5.0.0",
52
+ "@girs/gdkpixbuf-2.0": "^5.0.0",
53
+ "@girs/atk-1.0": "^5.0.0" },
54
54
  "devDependencies": {
55
55
  "typescript": "*"
56
56
  },