@girs/gcrgtk3-4 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/gcrgtk3-4)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gcrgtk3-4)
6
6
 
7
- GJS TypeScript type definitions for GcrGtk3-4 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.8.0.
7
+ GJS TypeScript type definitions for GcrGtk3-4 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.
@@ -211,6 +211,27 @@ export const FLAG_VALUES: Readonly<Record<string, number>>;
211
211
  /** `<bitfield GType>.<nick>` -> the raw GIR `value` no number could be read from. */
212
212
  export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
213
213
 
214
+ /**
215
+ * `<declaration GType>.<property>` -> the GType of that property's enum or bitfield.
216
+ *
217
+ * The join the value tables need and nothing else here carries. A host with no GI has a
218
+ * property name and a nick and needs a number; `ENUM_VALUES` is keyed by ENUM GType, and
219
+ * only this says which enum a property is. Keyed by DECLARATION like `OWN_PROPS`, so it is
220
+ * read at every link of a `DECLS` chain — `orientation` belongs to `GtkOrientable`, not
221
+ * to the `GtkBox` a caller starts from.
222
+ *
223
+ * Present only where the property's OWN type is the enum: an array of them, or a union that
224
+ * merely mentions one, would be an entry a consumer resolves wrongly.
225
+ *
226
+ * The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
227
+ * emitted once, by the namespace that owns the enum, so `AdwComboRow.search-match-mode` names
228
+ * `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 57 of the 438
229
+ * entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
230
+ * owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
231
+ * resolves against SOME module.
232
+ */
233
+ export const PROP_ENUMS: Readonly<Record<string, string>>;
234
+
214
235
  /** Widget GType -> slot name -> the method that may adopt a child there. */
215
236
  export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
216
237
 
@@ -91,6 +91,22 @@ export const FLAG_VALUES = {};
91
91
  // so this is the table that shape actually reaches.
92
92
  export const FLAG_VALUES_UNREADABLE = {};
93
93
 
94
+ // Declaration GType + property name -> the GType of that property's enum or bitfield.
95
+ //
96
+ // Without it the value tables above are half an answer. A host with no GI knows it must set
97
+ // `orientation` to the number behind the nick `vertical`; `ENUM_VALUES` is keyed
98
+ // `GtkOrientation.vertical`, and nothing else says that `orientation` is a
99
+ // `GtkOrientation`. Deriving it is not available: `never` is a member of several Gtk enums,
100
+ // and choosing between them produces a wrong number rather than a missing one.
101
+ //
102
+ // Only where the property's OWN type is the enum. An array of them and a union that mentions
103
+ // one are both entries a consumer would resolve wrongly, so neither is written.
104
+ //
105
+ // A GType named here has numbers in SOME vocabulary, not necessarily this one: the namespace
106
+ // that OWNS an enum publishes it, so 57 of the 438 entries a full run emits want the owner's
107
+ // vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
108
+ export const PROP_ENUMS = {};
109
+
94
110
  export const SLOT_CANDIDATES = {};
95
111
 
96
112
  export const SINCE = {};
package/gcrgtk3-4.d.ts CHANGED
@@ -124,15 +124,12 @@ export namespace GcrGtk3 {
124
124
  // Signals
125
125
  /** @signal */
126
126
  connect<K extends keyof CertificateWidget.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, CertificateWidget.SignalSignatures[K]>): number;
127
- connect(signal: string, callback: (...args: any[]) => any): number;
128
127
 
129
128
  /** @signal */
130
129
  connect_after<K extends keyof CertificateWidget.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, CertificateWidget.SignalSignatures[K]>): number;
131
- connect_after(signal: string, callback: (...args: any[]) => any): number;
132
130
 
133
131
  /** @signal */
134
- emit<K extends keyof CertificateWidget.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<CertificateWidget.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
135
- emit(signal: string, ...args: any[]): void;
132
+ emit<K extends keyof CertificateWidget.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<CertificateWidget.SignalSignatures[K]>): void;
136
133
 
137
134
  // Methods
138
135
  /**
@@ -222,15 +219,12 @@ export namespace GcrGtk3 {
222
219
  // Signals
223
220
  /** @signal */
224
221
  connect<K extends keyof SecureEntryBuffer.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, SecureEntryBuffer.SignalSignatures[K]>): number;
225
- connect(signal: string, callback: (...args: any[]) => any): number;
226
222
 
227
223
  /** @signal */
228
224
  connect_after<K extends keyof SecureEntryBuffer.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, SecureEntryBuffer.SignalSignatures[K]>): number;
229
- connect_after(signal: string, callback: (...args: any[]) => any): number;
230
225
 
231
226
  /** @signal */
232
- emit<K extends keyof SecureEntryBuffer.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<SecureEntryBuffer.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
233
- emit(signal: string, ...args: any[]): void;
227
+ emit<K extends keyof SecureEntryBuffer.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<SecureEntryBuffer.SignalSignatures[K]>): void;
234
228
  }
235
229
 
236
230
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gcrgtk3-4",
3
- "version": "4.8.0",
3
+ "version": "5.0.0",
4
4
  "description": "GJS TypeScript type definitions for GcrGtk3-4",
5
5
  "type": "module",
6
6
  "module": "gcrgtk3-4.js",
@@ -36,22 +36,22 @@
36
36
  "test": "tsc --project tsconfig.json"
37
37
  },
38
38
  "dependencies": {
39
- "@girs/gjs": "^4.8.0",
40
- "@girs/gtk-3.0": "^4.8.0",
41
- "@girs/xlib-2.0": "^4.8.0",
42
- "@girs/gdk-3.0": "^4.8.0",
43
- "@girs/cairo-1.0": "^4.8.0",
44
- "@girs/gobject-2.0": "^4.8.0",
45
- "@girs/glib-2.0": "^4.8.0",
46
- "@girs/pango-1.0": "^4.8.0",
47
- "@girs/harfbuzz-0.0": "^4.8.0",
48
- "@girs/freetype2-2.0": "^4.8.0",
49
- "@girs/gio-2.0": "^4.8.0",
50
- "@girs/gmodule-2.0": "^4.8.0",
51
- "@girs/gdkpixbuf-2.0": "^4.8.0",
52
- "@girs/atk-1.0": "^4.8.0",
53
- "@girs/gcr-4": "^4.8.0",
54
- "@girs/gck-2": "^4.8.0" },
39
+ "@girs/gjs": "^5.0.0",
40
+ "@girs/gtk-3.0": "^5.0.0",
41
+ "@girs/xlib-2.0": "^5.0.0",
42
+ "@girs/gdk-3.0": "^5.0.0",
43
+ "@girs/cairo-1.0": "^5.0.0",
44
+ "@girs/gobject-2.0": "^5.0.0",
45
+ "@girs/glib-2.0": "^5.0.0",
46
+ "@girs/pango-1.0": "^5.0.0",
47
+ "@girs/harfbuzz-0.0": "^5.0.0",
48
+ "@girs/freetype2-2.0": "^5.0.0",
49
+ "@girs/gio-2.0": "^5.0.0",
50
+ "@girs/gmodule-2.0": "^5.0.0",
51
+ "@girs/gdkpixbuf-2.0": "^5.0.0",
52
+ "@girs/atk-1.0": "^5.0.0",
53
+ "@girs/gcr-4": "^5.0.0",
54
+ "@girs/gck-2": "^5.0.0" },
55
55
  "devDependencies": {
56
56
  "typescript": "*"
57
57
  },