@girs/gspell-1 5.1.0 → 5.2.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) v5.1.0.
7
+ GJS TypeScript type definitions for Gspell-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.2.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.
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * The GIR-derived widget VOCABULARY for Gspell-1.
3
3
  *
4
- * GENERATED — do not edit. Provenance: Gspell-1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
4
+ * GENERATED — do not edit. Provenance: Gspell-1 — dropped empty base(s): GObject.Object GObject.InitiallyUnowned Atk.ImplementorIface
5
5
  *
6
- * 3 concrete widgets, 4 declarations, 0 enum nick unions, 0 slot candidates.
6
+ * 9 instantiable GTypes (of which 3 concrete widgets), 11 declarations, 0 enum nick unions, 0 slot candidates.
7
7
  *
8
8
  * Module-scoped exports only. There is no `JSX` namespace here, no tag spelling and
9
9
  * no `on<Signal>` prop name: those are DIALECT, and every framework answers them
@@ -25,6 +25,7 @@
25
25
  */
26
26
 
27
27
  import type Gspell from './gspell-1.js';
28
+ import type Gtk from '@girs/gtk-3.0';
28
29
  import type { GtkActionableConstructOnly, GtkActionableProps, GtkActivatableConstructOnly, GtkActivatableProps, GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkButtonConstructOnly, GtkButtonProps, GtkContainerConstructOnly, GtkContainerProps, GtkDialogConstructOnly, GtkDialogProps, GtkWidgetConstructOnly, GtkWidgetProps, GtkWindowConstructOnly, GtkWindowProps } from '@girs/gtk-3.0/vocabulary';
29
30
 
30
31
  // ---------------------------------------------------------------------------
@@ -49,6 +50,13 @@ import type { GtkActionableConstructOnly, GtkActionableProps, GtkActivatableCons
49
50
  // GIR keeps them once, on the interface.
50
51
  // ---------------------------------------------------------------------------
51
52
 
53
+ export interface GspellCheckerProps {
54
+ /** The #GspellLanguage used. */
55
+ language?: Gspell.Language | null;
56
+ }
57
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
58
+ export type GspellCheckerConstructOnly = never;
59
+
52
60
  export interface GspellCheckerDialogProps extends GtkDialogProps, GtkBuildableProps {
53
61
  /** The #GspellNavigator to use. */
54
62
  'spell-navigator'?: Gspell.Navigator;
@@ -56,6 +64,37 @@ export interface GspellCheckerDialogProps extends GtkDialogProps, GtkBuildablePr
56
64
  /** Settable only at construction — a renderer must REBUILD, not patch. */
57
65
  export type GspellCheckerDialogConstructOnly = GtkDialogConstructOnly | GtkBuildableConstructOnly | 'spell-navigator';
58
66
 
67
+ export interface GspellEntryProps {
68
+ /**
69
+ * The #GtkEntry.
70
+ * @since 1.4
71
+ */
72
+ entry?: Gtk.Entry;
73
+ /**
74
+ * Whether the inline spell checking is enabled.
75
+ * @since 1.4
76
+ * @default FALSE
77
+ */
78
+ 'inline-spell-checking'?: boolean;
79
+ }
80
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
81
+ export type GspellEntryConstructOnly = 'entry';
82
+
83
+ export interface GspellEntryBufferProps {
84
+ /**
85
+ * The #GtkEntryBuffer.
86
+ * @since 1.4
87
+ */
88
+ buffer?: Gtk.EntryBuffer;
89
+ /**
90
+ * The #GspellChecker.
91
+ * @since 1.4
92
+ */
93
+ 'spell-checker'?: Gspell.Checker | null;
94
+ }
95
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
96
+ export type GspellEntryBufferConstructOnly = 'buffer';
97
+
59
98
  export interface GspellLanguageChooserProps {
60
99
  /** The selected #GspellLanguage. */
61
100
  language?: Gspell.Language | null;
@@ -75,6 +114,45 @@ export interface GspellLanguageChooserDialogProps extends GtkDialogProps, Gspell
75
114
  /** Settable only at construction — a renderer must REBUILD, not patch. */
76
115
  export type GspellLanguageChooserDialogConstructOnly = GtkDialogConstructOnly | GspellLanguageChooserConstructOnly | GtkBuildableConstructOnly;
77
116
 
117
+ export interface GspellNavigatorProps {
118
+ }
119
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
120
+ export type GspellNavigatorConstructOnly = never;
121
+
122
+ export interface GspellNavigatorTextViewProps extends GspellNavigatorProps {
123
+ /** The #GtkTextView. */
124
+ view?: Gtk.TextView;
125
+ }
126
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
127
+ export type GspellNavigatorTextViewConstructOnly = GspellNavigatorConstructOnly | 'view';
128
+
129
+ export interface GspellTextBufferProps {
130
+ /** The #GtkTextBuffer. */
131
+ buffer?: Gtk.TextBuffer;
132
+ /** The #GspellChecker. */
133
+ 'spell-checker'?: Gspell.Checker | null;
134
+ }
135
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
136
+ export type GspellTextBufferConstructOnly = 'buffer';
137
+
138
+ export interface GspellTextViewProps {
139
+ /**
140
+ * When the context menu is shown, whether to add a sub-menu to select the language for the spell checking.
141
+ * @since 1.2
142
+ * @default FALSE
143
+ */
144
+ 'enable-language-menu'?: boolean;
145
+ /**
146
+ * Whether the inline spell checking is enabled.
147
+ * @default FALSE
148
+ */
149
+ 'inline-spell-checking'?: boolean;
150
+ /** The #GtkTextView. */
151
+ view?: Gtk.TextView;
152
+ }
153
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
154
+ export type GspellTextViewConstructOnly = 'view';
155
+
78
156
  // ---------------------------------------------------------------------------
79
157
  // The GType-keyed widget map.
80
158
  //
@@ -114,7 +192,11 @@ export interface Widgets {
114
192
  };
115
193
  }
116
194
 
117
- /** Every GType this namespace can create. A consumer derives its own tag map. */
195
+ /**
196
+ * Every GType this namespace can create AND put on screen. A consumer derives its own
197
+ * tag map. For everything a UI file can instantiate — layout managers, event
198
+ * controllers, cell renderers, `GtkSizeGroup` — read `DECLS` below.
199
+ */
118
200
  export type WidgetGType = keyof Widgets;
119
201
 
120
202
  // ---------------------------------------------------------------------------
@@ -166,7 +248,14 @@ export const PROVENANCE: {
166
248
  readonly childHolders: number;
167
249
  readonly droppedBases: readonly string[];
168
250
  readonly inlinedBases: readonly string[];
251
+ /** `<decl>.<prop>` for every property printed `never` because TypeScript has no value for it. */
169
252
  readonly unsettableProps: readonly string[];
253
+ /**
254
+ * `<decl>.<prop>: <Ns>.<Name>` for every property printed `never` because the model
255
+ * could not resolve its type across a namespace boundary — two independently released
256
+ * GIRs disagreeing, which is what the main emitter answers `never` for as well.
257
+ */
258
+ readonly unresolvedProps: readonly string[];
170
259
  };
171
260
 
172
261
  /** Declaration GType -> its own settable properties, as GObject registered them. */
@@ -180,7 +269,17 @@ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
180
269
  */
181
270
  export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
182
271
 
183
- /** Widget GType -> every declaration its members come from, self first. */
272
+ /**
273
+ * Instantiable GType -> every declaration its members come from, self first.
274
+ *
275
+ * The key set is what a UI description file can NAME: every registered, non-abstract
276
+ * class this namespace declares. GtkBuilder resolves a `<object class="…">` through
277
+ * `g_type_from_name`, which knows nothing about widgets, so this is wider than
278
+ * `Widgets` by design — `GtkSizeGroup`, `GtkTextTag`, every `GtkEventController`
279
+ * and every `GtkCellRenderer` are here and are not widgets.
280
+ *
281
+ * `Widgets` and `CHILD_HOLDERS` are the narrower questions and answer them unchanged.
282
+ */
184
283
  export const DECLS: Readonly<Record<string, readonly string[]>>;
185
284
 
186
285
  /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
@@ -192,8 +291,8 @@ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
192
291
  /**
193
292
  * `<enum GType>.<nick>` -> the integer GObject registers for it, from GIR's `value`.
194
293
  *
195
- * Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the 129 enums a
196
- * GTK 4 vocabulary carries -- 104 in Gtk-4.0 and 25 in Adw-1: `GtkResponseType` runs -1 to -11, `GtkTextWindowType` starts
294
+ * Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the 137 enums a
295
+ * GTK 4 vocabulary carries -- 112 in Gtk-4.0 and 25 in Adw-1: `GtkResponseType` runs -1 to -11, `GtkTextWindowType` starts
197
296
  * at 1, `GtkOrdering` and `GtkConstraintRelation` are -1/0/1, `GtkAlign` has two names
198
297
  * on one value, and `GtkConstraintStrength.required` is 1001001000 where counting says 0.
199
298
  *
@@ -231,10 +330,11 @@ export const ENUM_VALUES_UNREADABLE: Readonly<Record<string, string>>;
231
330
  *
232
331
  * `ENUM_NICKS` carries no bitfield, because GObject cannot resolve a nick SET; that says
233
332
  * nothing about a single member's number, and the number is what a host without GI needs.
234
- * 21 writable widget properties in Gtk-4.0 and Adw-1 are bitfield-typed and are declared
235
- * bare `number` -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`, `AdwTabView:shortcuts`
236
- * among them. Counting is worst here: 95 of 121 Gtk-4.0 bitfield members disagree with their
237
- * position, against 29 of 685 enumeration members.
333
+ * 23 settable properties in Gtk-4.0 and Adw-1 are bitfield-typed and are declared bare
334
+ * `number` -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`, `AdwTabView:shortcuts`,
335
+ * `GtkDropTarget:actions` among them. Counting is worst here: 119 of the 156 Gtk-4.0
336
+ * bitfield members this vocabulary carries disagree with their declaration position,
337
+ * against 29 of 672 enumeration members.
238
338
  *
239
339
  * Combine with `|` as GObject does. There is no nick table to pair this with, so a name
240
340
  * here is resolvable and a SET still is not.
@@ -258,7 +358,7 @@ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
258
358
  *
259
359
  * The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
260
360
  * emitted once, by the namespace that owns the enum, so `AdwComboRow.search-match-mode` names
261
- * `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 57 of the 438
361
+ * `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 83 of the 909
262
362
  * entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
263
363
  * owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
264
364
  * resolves against SOME module.
@@ -1,6 +1,6 @@
1
1
  // The widget vocabulary of Gspell-1 as runtime data.
2
2
  //
3
- // GENERATED — do not edit. Provenance: Gspell-1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
3
+ // GENERATED — do not edit. Provenance: Gspell-1 — dropped empty base(s): GObject.Object GObject.InitiallyUnowned Atk.ImplementorIface
4
4
  //
5
5
  // The type half of this subpath is the sibling `.d.ts`. This file exists because
6
6
  // types are erased: a consumer that wants to ask the installed library whether every
@@ -11,28 +11,51 @@ export const PROVENANCE = {
11
11
  version: '1',
12
12
  libraryVersion: null,
13
13
  childHolders: 0,
14
- droppedBases: ['GObject.InitiallyUnowned', 'GObject.Object', 'Atk.ImplementorIface'],
14
+ droppedBases: ['GObject.Object', 'GObject.InitiallyUnowned', 'Atk.ImplementorIface'],
15
15
  inlinedBases: [],
16
16
  unsettableProps: [],
17
+ unresolvedProps: [],
17
18
  };
18
19
 
19
20
  export const OWN_PROPS = {
21
+ GspellChecker: ['language'],
20
22
  GspellCheckerDialog: ['spell-navigator'],
23
+ GspellEntry: ['entry', 'inline-spell-checking'],
24
+ GspellEntryBuffer: ['buffer', 'spell-checker'],
21
25
  GspellLanguageChooser: ['language', 'language-code'],
26
+ GspellNavigatorTextView: ['view'],
27
+ GspellTextBuffer: ['buffer', 'spell-checker'],
28
+ GspellTextView: ['enable-language-menu', 'inline-spell-checking', 'view'],
22
29
  };
23
30
 
24
- export const OWN_SIGNALS = {};
31
+ export const OWN_SIGNALS = {
32
+ GspellChecker: ['session-cleared', 'word-added-to-personal', 'word-added-to-session'],
33
+ };
25
34
 
35
+ // Every GType this namespace can INSTANTIATE -> the declarations its members come from.
36
+ //
37
+ // The key set is what a UI description file can name: a registered, non-abstract class.
38
+ // Not "every widget" — GtkBuilder resolves a name through `g_type_from_name`, which knows
39
+ // nothing about widgets, and a `.ui` file is full of `GtkSizeGroup`, `GtkTextTag`,
40
+ // `GtkEventController*` and `GtkCellRenderer*`. Use `Widgets` and `CHILD_HOLDERS`
41
+ // below for the narrower questions; they did not move.
26
42
  export const DECLS = {
43
+ GspellChecker: ['GspellChecker'],
27
44
  GspellCheckerDialog: ['GspellCheckerDialog', 'GtkDialog', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
45
+ GspellEntry: ['GspellEntry'],
46
+ GspellEntryBuffer: ['GspellEntryBuffer'],
28
47
  GspellLanguageChooserButton: ['GspellLanguageChooserButton', 'GtkButton', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GspellLanguageChooser', 'GtkActionable', 'GtkActivatable', 'GtkBuildable'],
29
48
  GspellLanguageChooserDialog: ['GspellLanguageChooserDialog', 'GtkDialog', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GspellLanguageChooser', 'GtkBuildable'],
49
+ GspellNavigatorTextView: ['GspellNavigatorTextView', 'GspellNavigator'],
50
+ GspellTextBuffer: ['GspellTextBuffer'],
51
+ GspellTextView: ['GspellTextView'],
30
52
  };
31
53
 
32
- // The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
33
- // and descend from `GObject.Object`. A renderer places them like a container; a check
34
- // asking "is this a widget" must not count them. Derived from the accessor pair, never
35
- // from a list — the count is in the provenance line above.
54
+ // The GTypes above that ARE widgets are the `Widgets` map in the sibling `.d.ts`; these
55
+ // are the ones that merely HOLD one, through `set_child`/`get_child`, descending from
56
+ // `GObject.Object`. A renderer places them like a container; a check asking "is this a
57
+ // widget" must not count them. Derived from the accessor pair, never from a list — the
58
+ // count is in the provenance line above.
36
59
  export const CHILD_HOLDERS = [];
37
60
 
38
61
  export const ENUM_NICKS = {};
@@ -42,7 +65,7 @@ export const ENUM_NICKS = {};
42
65
  // It ships because position in `ENUM_NICKS` is not the value and a consumer with no
43
66
  // typelib has no other way to learn it: a surface without GI still has to hand GObject an
44
67
  // integer. The alternative a consumer reaches for first is counting, and counting is wrong
45
- // on 6 of the 129 enums a GTK 4 vocabulary carries (104 in Gtk-4.0, 25 in Adw-1) --
68
+ // on 6 of the 137 enums a GTK 4 vocabulary carries (112 in Gtk-4.0, 25 in Adw-1) --
46
69
  // `GtkResponseType` runs -1 down to
47
70
  // -11, `GtkTextWindowType` starts at 1, and `GtkConstraintStrength.required` is
48
71
  // 1001001000 where counting answers 0.
@@ -79,11 +102,12 @@ export const ENUM_VALUES_UNREADABLE = {};
79
102
  // The number behind each member of a registered BITFIELD, keyed the same way.
80
103
  //
81
104
  // `ENUM_NICKS` refuses a bitfield because GObject cannot resolve a nick SET, and that
82
- // reason says nothing about one member's number. 21 writable widget properties in Gtk-4.0
83
- // and Adw-1 are bitfield-typed -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`,
84
- // `AdwTabView:shortcuts`, ... -- and they are typed bare `number`, so a host without GI
85
- // has nothing to compute one from. Counting is worst exactly here: 95 of 121 Gtk-4.0
86
- // bitfield members disagree with their position, against 29 of 685 enumeration members.
105
+ // reason says nothing about one member's number. 23 settable properties in Gtk-4.0 and
106
+ // Adw-1 are bitfield-typed -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`,
107
+ // `AdwTabView:shortcuts`, `GtkDropTarget:actions`, ... -- and they are typed bare
108
+ // `number`, so a host without GI has nothing to compute one from. Counting is worst
109
+ // exactly here: 119 of the 156 Gtk-4.0 bitfield members this vocabulary carries disagree
110
+ // with their declaration position, against 29 of 672 enumeration members.
87
111
  //
88
112
  // A table of its own rather than more rows in `ENUM_VALUES`, so that "every nick in
89
113
  // `ENUM_NICKS` has a number or a declared reason" stays a claim about one set.
@@ -106,7 +130,7 @@ export const FLAG_VALUES_UNREADABLE = {};
106
130
  // one are both entries a consumer would resolve wrongly, so neither is written.
107
131
  //
108
132
  // A GType named here has numbers in SOME vocabulary, not necessarily this one: the namespace
109
- // that OWNS an enum publishes it, so 57 of the 438 entries a full run emits want the owner's
133
+ // that OWNS an enum publishes it, so 83 of the 909 entries a full run emits want the owner's
110
134
  // vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
111
135
  export const PROP_ENUMS = {};
112
136
 
@@ -137,4 +161,10 @@ export const ARIA_VALUE_ENUMS = {};
137
161
 
138
162
  export const SLOT_CANDIDATES = {};
139
163
 
140
- export const SINCE = {};
164
+ export const SINCE = {
165
+ 'GspellEntry.entry': '1.4',
166
+ 'GspellEntry.inline-spell-checking': '1.4',
167
+ 'GspellEntryBuffer.buffer': '1.4',
168
+ 'GspellEntryBuffer.spell-checker': '1.4',
169
+ 'GspellTextView.enable-language-menu': '1.2',
170
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gspell-1",
3
- "version": "5.1.0",
3
+ "version": "5.2.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": "^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" },
39
+ "@girs/gjs": "^5.2.0",
40
+ "@girs/gtk-3.0": "^5.2.0",
41
+ "@girs/xlib-2.0": "^5.2.0",
42
+ "@girs/gdk-3.0": "^5.2.0",
43
+ "@girs/cairo-1.0": "^5.2.0",
44
+ "@girs/gobject-2.0": "^5.2.0",
45
+ "@girs/glib-2.0": "^5.2.0",
46
+ "@girs/pango-1.0": "^5.2.0",
47
+ "@girs/harfbuzz-0.0": "^5.2.0",
48
+ "@girs/freetype2-2.0": "^5.2.0",
49
+ "@girs/gio-2.0": "^5.2.0",
50
+ "@girs/gmodule-2.0": "^5.2.0",
51
+ "@girs/gdkpixbuf-2.0": "^5.2.0",
52
+ "@girs/atk-1.0": "^5.2.0" },
53
53
  "devDependencies": {
54
54
  "typescript": "*"
55
55
  },