@girs/gspell-1 4.9.0 → 5.1.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/gspell-1)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gspell-1)
6
6
 
7
- GJS TypeScript type definitions for Gspell-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.9.0.
7
+ GJS TypeScript type definitions for Gspell-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.1.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.
@@ -265,6 +265,45 @@ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
265
265
  */
266
266
  export const PROP_ENUMS: Readonly<Record<string, string>>;
267
267
 
268
+ /**
269
+ * The kinds of value a GTK accessible property, relation or state takes.
270
+ *
271
+ * `enum` is the one that needs a second lookup: `ARIA_VALUE_ENUMS` names the enum GType,
272
+ * and `ENUM_NICKS` and `ENUM_VALUES` answer from there.
273
+ */
274
+ export type AriaValueType = 'string' | 'integer' | 'double' | 'boolean' | 'reference' | 'enum';
275
+
276
+ /**
277
+ * `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
278
+ *
279
+ * The one table in this file that is not a fact about a ParamSpec. A GtkBuilder or
280
+ * Blueprint `accessibility { … }` block is typed by GTK's ARIA table, not by the widget,
281
+ * and the two disagree where it costs most: `orientation` is settable on a `GtkLabel`
282
+ * that implements no `GtkOrientable`, and `checked` is a `GtkAccessibleTristate`, so
283
+ * `checked: true` is the number 1 rather than a boolean. Typing those slots from the
284
+ * widget's properties gets both wrong and raises nothing.
285
+ *
286
+ * Keyed like `ENUM_VALUES` because the ARIA names ARE enum members — of
287
+ * `GtkAccessibleProperty`, `GtkAccessibleRelation` and `GtkAccessibleState` — so
288
+ * `ENUM_NICKS` already lists them and one key parser reads both.
289
+ *
290
+ * Read from each member's own GIR documentation. `gtk_accessible_property_init_value()`
291
+ * is the C half of this table and is not introspectable; the doc sentence is, and states
292
+ * the type for 52 of the 53 members in gtk4 4.23.3. Complete or absent, never partial: a
293
+ * member the generator cannot answer for fails the build and names itself.
294
+ */
295
+ export const ARIA_VALUE_TYPES: Readonly<Record<string, AriaValueType>>;
296
+
297
+ /**
298
+ * The same keys, for the `'enum'` rows only -> the GType of that enum.
299
+ *
300
+ * A table of its own for the reason `PROP_ENUMS` is one: folded in, the values of
301
+ * `ARIA_VALUE_TYPES` would be six reserved words mixed with arbitrary GTypes and telling
302
+ * them apart would be the consumer's problem. Apart, `ARIA_VALUE_TYPES[k] === 'enum'` is
303
+ * the whole test and `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
304
+ */
305
+ export const ARIA_VALUE_ENUMS: Readonly<Record<string, string>>;
306
+
268
307
  /** Widget GType -> slot name -> the method that may adopt a child there. */
269
308
  export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
270
309
 
@@ -110,6 +110,31 @@ export const FLAG_VALUES_UNREADABLE = {};
110
110
  // vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
111
111
  export const PROP_ENUMS = {};
112
112
 
113
+ // `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
114
+ //
115
+ // The one table here that is not about a ParamSpec. A GtkBuilder or Blueprint
116
+ // `accessibility { … }` block is typed by GTK's ARIA table instead, and the two disagree
117
+ // where it matters: `orientation` is settable on a `GtkLabel` that implements no
118
+ // `GtkOrientable` and has no such property, and `checked` is a `GtkAccessibleTristate`, so
119
+ // `checked: true` means the number 1 and not the boolean. A consumer typing those slots
120
+ // from the widget gets both wrong, silently.
121
+ //
122
+ // Read from each member's own documentation, which is where GTK keeps the table --
123
+ // `gtk_accessible_property_init_value()` is the C half and is not introspectable, the
124
+ // sentence is. Complete or absent, never partial: a member whose documentation states no
125
+ // value type fails generation and names itself, because a missing row is indistinguishable
126
+ // from "GTK has no such name" and the plausible fallback emits `true` where GTK means 1.
127
+ export const ARIA_VALUE_TYPES = {};
128
+
129
+ // The same keys, for the `'enum'` rows only -> the GType of the enum.
130
+ //
131
+ // The join on from a kind to a number, and a table of its own for the reason `PROP_ENUMS`
132
+ // is one: folding the GType into `ARIA_VALUE_TYPES` would make its values a mix of six
133
+ // reserved words and arbitrary GTypes, and telling them apart would be the consumer's
134
+ // problem. With this, `ARIA_VALUE_TYPES[k] === 'enum'` is the whole test, and
135
+ // `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
136
+ export const ARIA_VALUE_ENUMS = {};
137
+
113
138
  export const SLOT_CANDIDATES = {};
114
139
 
115
140
  export const SINCE = {};
package/gspell-1.d.ts CHANGED
@@ -141,15 +141,12 @@ export namespace Gspell {
141
141
  // Signals
142
142
  /** @signal */
143
143
  connect<K extends keyof Checker.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Checker.SignalSignatures[K]>): number;
144
- connect(signal: string, callback: (...args: any[]) => any): number;
145
144
 
146
145
  /** @signal */
147
146
  connect_after<K extends keyof Checker.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Checker.SignalSignatures[K]>): number;
148
- connect_after(signal: string, callback: (...args: any[]) => any): number;
149
147
 
150
148
  /** @signal */
151
- emit<K extends keyof Checker.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Checker.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
152
- emit(signal: string, ...args: any[]): void;
149
+ emit<K extends keyof Checker.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Checker.SignalSignatures[K]>): void;
153
150
 
154
151
  // Virtual methods
155
152
  /**
@@ -367,15 +364,12 @@ export namespace Gspell {
367
364
  // Signals
368
365
  /** @signal */
369
366
  connect<K extends keyof CheckerDialog.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, CheckerDialog.SignalSignatures[K]>): number;
370
- connect(signal: string, callback: (...args: any[]) => any): number;
371
367
 
372
368
  /** @signal */
373
369
  connect_after<K extends keyof CheckerDialog.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, CheckerDialog.SignalSignatures[K]>): number;
374
- connect_after(signal: string, callback: (...args: any[]) => any): number;
375
370
 
376
371
  /** @signal */
377
- emit<K extends keyof CheckerDialog.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<CheckerDialog.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
378
- emit(signal: string, ...args: any[]): void;
372
+ emit<K extends keyof CheckerDialog.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<CheckerDialog.SignalSignatures[K]>): void;
379
373
 
380
374
  // Methods
381
375
  /**
@@ -455,15 +449,12 @@ export namespace Gspell {
455
449
  // Signals
456
450
  /** @signal */
457
451
  connect<K extends keyof Entry.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Entry.SignalSignatures[K]>): number;
458
- connect(signal: string, callback: (...args: any[]) => any): number;
459
452
 
460
453
  /** @signal */
461
454
  connect_after<K extends keyof Entry.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Entry.SignalSignatures[K]>): number;
462
- connect_after(signal: string, callback: (...args: any[]) => any): number;
463
455
 
464
456
  /** @signal */
465
- emit<K extends keyof Entry.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Entry.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
466
- emit(signal: string, ...args: any[]): void;
457
+ emit<K extends keyof Entry.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Entry.SignalSignatures[K]>): void;
467
458
 
468
459
  // Static methods
469
460
  /**
@@ -596,15 +587,12 @@ export namespace Gspell {
596
587
  // Signals
597
588
  /** @signal */
598
589
  connect<K extends keyof EntryBuffer.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, EntryBuffer.SignalSignatures[K]>): number;
599
- connect(signal: string, callback: (...args: any[]) => any): number;
600
590
 
601
591
  /** @signal */
602
592
  connect_after<K extends keyof EntryBuffer.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, EntryBuffer.SignalSignatures[K]>): number;
603
- connect_after(signal: string, callback: (...args: any[]) => any): number;
604
593
 
605
594
  /** @signal */
606
- emit<K extends keyof EntryBuffer.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<EntryBuffer.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
607
- emit(signal: string, ...args: any[]): void;
595
+ emit<K extends keyof EntryBuffer.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<EntryBuffer.SignalSignatures[K]>): void;
608
596
 
609
597
  // Static methods
610
598
  /**
@@ -733,15 +721,12 @@ export namespace Gspell {
733
721
  // Signals
734
722
  /** @signal */
735
723
  connect<K extends keyof LanguageChooserButton.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, LanguageChooserButton.SignalSignatures[K]>): number;
736
- connect(signal: string, callback: (...args: any[]) => any): number;
737
724
 
738
725
  /** @signal */
739
726
  connect_after<K extends keyof LanguageChooserButton.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, LanguageChooserButton.SignalSignatures[K]>): number;
740
- connect_after(signal: string, callback: (...args: any[]) => any): number;
741
727
 
742
728
  /** @signal */
743
- emit<K extends keyof LanguageChooserButton.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<LanguageChooserButton.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
744
- emit(signal: string, ...args: any[]): void;
729
+ emit<K extends keyof LanguageChooserButton.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<LanguageChooserButton.SignalSignatures[K]>): void;
745
730
 
746
731
  /**
747
732
  * The selected {@link Gspell.Language}.
@@ -1278,15 +1263,12 @@ export namespace Gspell {
1278
1263
  // Signals
1279
1264
  /** @signal */
1280
1265
  connect<K extends keyof LanguageChooserDialog.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, LanguageChooserDialog.SignalSignatures[K]>): number;
1281
- connect(signal: string, callback: (...args: any[]) => any): number;
1282
1266
 
1283
1267
  /** @signal */
1284
1268
  connect_after<K extends keyof LanguageChooserDialog.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, LanguageChooserDialog.SignalSignatures[K]>): number;
1285
- connect_after(signal: string, callback: (...args: any[]) => any): number;
1286
1269
 
1287
1270
  /** @signal */
1288
- emit<K extends keyof LanguageChooserDialog.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<LanguageChooserDialog.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1289
- emit(signal: string, ...args: any[]): void;
1271
+ emit<K extends keyof LanguageChooserDialog.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<LanguageChooserDialog.SignalSignatures[K]>): void;
1290
1272
 
1291
1273
  /**
1292
1274
  * The selected {@link Gspell.Language}.
@@ -1392,15 +1374,12 @@ export namespace Gspell {
1392
1374
  // Signals
1393
1375
  /** @signal */
1394
1376
  connect<K extends keyof NavigatorTextView.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, NavigatorTextView.SignalSignatures[K]>): number;
1395
- connect(signal: string, callback: (...args: any[]) => any): number;
1396
1377
 
1397
1378
  /** @signal */
1398
1379
  connect_after<K extends keyof NavigatorTextView.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, NavigatorTextView.SignalSignatures[K]>): number;
1399
- connect_after(signal: string, callback: (...args: any[]) => any): number;
1400
1380
 
1401
1381
  /** @signal */
1402
- emit<K extends keyof NavigatorTextView.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<NavigatorTextView.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1403
- emit(signal: string, ...args: any[]): void;
1382
+ emit<K extends keyof NavigatorTextView.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<NavigatorTextView.SignalSignatures[K]>): void;
1404
1383
 
1405
1384
  // Static methods
1406
1385
  /**
@@ -1536,15 +1515,12 @@ export namespace Gspell {
1536
1515
  // Signals
1537
1516
  /** @signal */
1538
1517
  connect<K extends keyof TextBuffer.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, TextBuffer.SignalSignatures[K]>): number;
1539
- connect(signal: string, callback: (...args: any[]) => any): number;
1540
1518
 
1541
1519
  /** @signal */
1542
1520
  connect_after<K extends keyof TextBuffer.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, TextBuffer.SignalSignatures[K]>): number;
1543
- connect_after(signal: string, callback: (...args: any[]) => any): number;
1544
1521
 
1545
1522
  /** @signal */
1546
- emit<K extends keyof TextBuffer.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<TextBuffer.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1547
- emit(signal: string, ...args: any[]): void;
1523
+ emit<K extends keyof TextBuffer.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<TextBuffer.SignalSignatures[K]>): void;
1548
1524
 
1549
1525
  // Static methods
1550
1526
  /**
@@ -1655,15 +1631,12 @@ export namespace Gspell {
1655
1631
  // Signals
1656
1632
  /** @signal */
1657
1633
  connect<K extends keyof TextView.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, TextView.SignalSignatures[K]>): number;
1658
- connect(signal: string, callback: (...args: any[]) => any): number;
1659
1634
 
1660
1635
  /** @signal */
1661
1636
  connect_after<K extends keyof TextView.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, TextView.SignalSignatures[K]>): number;
1662
- connect_after(signal: string, callback: (...args: any[]) => any): number;
1663
1637
 
1664
1638
  /** @signal */
1665
- emit<K extends keyof TextView.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<TextView.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1666
- emit(signal: string, ...args: any[]): void;
1639
+ emit<K extends keyof TextView.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<TextView.SignalSignatures[K]>): void;
1667
1640
 
1668
1641
  // Static methods
1669
1642
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gspell-1",
3
- "version": "4.9.0",
3
+ "version": "5.1.0",
4
4
  "description": "GJS TypeScript type definitions for Gspell-1",
5
5
  "type": "module",
6
6
  "module": "gspell-1.js",
@@ -36,20 +36,20 @@
36
36
  "test": "tsc --project tsconfig.json"
37
37
  },
38
38
  "dependencies": {
39
- "@girs/gjs": "^4.9.0",
40
- "@girs/gtk-3.0": "^4.9.0",
41
- "@girs/xlib-2.0": "^4.9.0",
42
- "@girs/gdk-3.0": "^4.9.0",
43
- "@girs/cairo-1.0": "^4.9.0",
44
- "@girs/gobject-2.0": "^4.9.0",
45
- "@girs/glib-2.0": "^4.9.0",
46
- "@girs/pango-1.0": "^4.9.0",
47
- "@girs/harfbuzz-0.0": "^4.9.0",
48
- "@girs/freetype2-2.0": "^4.9.0",
49
- "@girs/gio-2.0": "^4.9.0",
50
- "@girs/gmodule-2.0": "^4.9.0",
51
- "@girs/gdkpixbuf-2.0": "^4.9.0",
52
- "@girs/atk-1.0": "^4.9.0" },
39
+ "@girs/gjs": "^5.1.0",
40
+ "@girs/gtk-3.0": "^5.1.0",
41
+ "@girs/xlib-2.0": "^5.1.0",
42
+ "@girs/gdk-3.0": "^5.1.0",
43
+ "@girs/cairo-1.0": "^5.1.0",
44
+ "@girs/gobject-2.0": "^5.1.0",
45
+ "@girs/glib-2.0": "^5.1.0",
46
+ "@girs/pango-1.0": "^5.1.0",
47
+ "@girs/harfbuzz-0.0": "^5.1.0",
48
+ "@girs/freetype2-2.0": "^5.1.0",
49
+ "@girs/gio-2.0": "^5.1.0",
50
+ "@girs/gmodule-2.0": "^5.1.0",
51
+ "@girs/gdkpixbuf-2.0": "^5.1.0",
52
+ "@girs/atk-1.0": "^5.1.0" },
53
53
  "devDependencies": {
54
54
  "typescript": "*"
55
55
  },