@girs/coglpango-14 5.2.0 → 5.3.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/coglpango-14)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/coglpango-14)
6
6
 
7
- GJS TypeScript type definitions for CoglPango-14 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.2.0.
7
+ GJS TypeScript type definitions for CoglPango-14 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.3.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.
@@ -26,6 +26,7 @@ type packages.
26
26
  | `@girs/coglpango-14/ambient` | only the `gi://` module declarations |
27
27
  | `@girs/coglpango-14/import` | only the `imports.gi` declarations |
28
28
  | `@girs/coglpango-14/coglpango-14` | the namespace, without the side-effecting declarations |
29
+ | `@girs/coglpango-14/vocabulary` | GIR-derived widget data: settable properties, enum nicks, slot candidates |
29
30
 
30
31
  ## Three ways to import
31
32
 
@@ -67,6 +68,24 @@ GJS's global object works the same way, via `@girs/coglpango-14/import`:
67
68
  const CoglPango = imports.gi.CoglPango;
68
69
  ```
69
70
 
71
+ ## Widget vocabulary
72
+
73
+ `coglpango-14` declares widgets, so it also carries what the GIR says about them, as
74
+ types and as values a test can read:
75
+
76
+ ```ts
77
+ import type { Widgets, PropsOf } from '@girs/coglpango-14/vocabulary';
78
+ import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/coglpango-14/vocabulary';
79
+ ```
80
+
81
+ Properties are keyed the way GObject registered them, writable-only and optional, so they
82
+ match `g_object_set`, GtkBuilder XML and Blueprint. `PROVENANCE.libraryVersion` names the
83
+ library release this was generated from, which lets a check tell "newer than what is
84
+ installed" from "wrong".
85
+
86
+ This subpath answers what the GIR says, not what the installed library has. For the
87
+ second question, ask the library.
88
+
70
89
  ## Building
71
90
 
72
91
  The declarations need no build step. If you bundle, every bundler works, since there is
@@ -0,0 +1,333 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for CoglPango-14.
3
+ *
4
+ * GENERATED — do not edit. Provenance: CoglPango-14 — dropped empty base(s): Pango.Renderer
5
+ *
6
+ * 1 instantiable GTypes (of which 0 concrete widgets), 1 declarations, 0 enum nick unions, 0 slot candidates.
7
+ *
8
+ * Module-scoped exports only. There is no `JSX` namespace here, no tag spelling and
9
+ * no `on<Signal>` prop name: those are DIALECT, and every framework answers them
10
+ * differently. The shape to avoid is the GLOBAL AUGMENT — a `declare global` on
11
+ * `React.JSX` collides with every other library on a shared tag — while a
12
+ * module-scoped `JSX` behind a `jsxImportSource` does not. This package is used by
13
+ * projects that want nothing to do with JSX, so it emits neither; a consumer declaring
14
+ * a module-scoped namespace over these names is doing it right.
15
+ *
16
+ * Three things this is and `ConstructorProps` is not: WRITABLE-only (measured on
17
+ * Gtk-4.0, `ConstructorProps` offers 150 read-only properties across 68 classes as
18
+ * settable, and GTK's failure mode for writing one is exit 0), OPTIONAL, and keyed
19
+ * by the name GObject actually REGISTERED — the dashed spelling `g_object_set`,
20
+ * GtkBuilder XML and Blueprint all use.
21
+ *
22
+ * Signal handler types are not re-derived: `X.SignalSignatures`, which this package
23
+ * already emits for every class with the parent chain, every implemented interface
24
+ * and the `notify::` keys folded in, is what `Widgets[G]['signals']` points at.
25
+ */
26
+
27
+ import type Cogl from '@girs/cogl-14';
28
+ import type { GObjectConstructOnly, GObjectProps } from '@girs/gobject-2.0/vocabulary';
29
+
30
+ // ---------------------------------------------------------------------------
31
+ // Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
32
+ //
33
+ // Not derived from the member name. Substituting underscores for dashes is not a law:
34
+ // some nicks keep an underscore the substitution would have replaced, and only the
35
+ // attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
36
+ // how a derived nick passes review and breaks elsewhere.
37
+ // Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
38
+ // ---------------------------------------------------------------------------
39
+
40
+
41
+
42
+ // ---------------------------------------------------------------------------
43
+ // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
44
+ // inheritance rather than flattening per widget.
45
+ //
46
+ // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
47
+ // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
48
+ // because GObject installs interface properties on the implementor at runtime while
49
+ // GIR keeps them once, on the interface.
50
+ // ---------------------------------------------------------------------------
51
+
52
+ export interface CoglPangoRendererProps {
53
+ context?: Cogl.Context;
54
+ }
55
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
56
+ export type CoglPangoRendererConstructOnly = 'context';
57
+
58
+ // ---------------------------------------------------------------------------
59
+ // The GType-keyed widget map.
60
+ //
61
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
62
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
63
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
64
+ // is the class. None of those is baked in here.
65
+ //
66
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
67
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
68
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
69
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
70
+ // this is what notices when a release adds a candidate.
71
+ // ---------------------------------------------------------------------------
72
+
73
+ export interface Widgets {
74
+
75
+ }
76
+
77
+ /**
78
+ * Every GType this namespace can create AND put on screen. A consumer derives its own
79
+ * tag map. For everything a UI file can instantiate — layout managers, event
80
+ * controllers, cell renderers, `GtkSizeGroup` — read `DECLS` below.
81
+ */
82
+ export type WidgetGType = keyof Widgets;
83
+
84
+ // ---------------------------------------------------------------------------
85
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
86
+ //
87
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
88
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
89
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
90
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
91
+ // more rows in `Widgets`: concatenate them when you mean both.
92
+ // ---------------------------------------------------------------------------
93
+
94
+ export interface ChildHolders {
95
+
96
+ }
97
+
98
+ /** Every GType this namespace holds a child in without it being a widget. */
99
+ export type ChildHolderGType = keyof ChildHolders;
100
+
101
+ /** The writable, optional, GObject-keyed property surface of one GType. */
102
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
103
+
104
+ /** The signal table this package already emits, reached by GType. */
105
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
106
+
107
+ /** The instance type — what a `ref`-shaped prop should infer. */
108
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
109
+
110
+ /** Property names that can only be set at construction. */
111
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
112
+
113
+ /** Candidate child slots — see the note above; curation decides. */
114
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
115
+
116
+ /**
117
+ * The same facts as runtime data, for a consumer that CHECKS them.
118
+ *
119
+ * Types are erased, so a spec that asks the installed GTK whether every property
120
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
121
+ * and every nick resolvable through an enum lookup cannot read the interfaces
122
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
123
+ * belongs to the consumer and the DATA belongs here.
124
+ */
125
+ export const PROVENANCE: {
126
+ readonly namespace: string;
127
+ readonly version: string;
128
+ /** The version the LIBRARY states, or null where it states none. Never the namespace's. */
129
+ readonly libraryVersion: string | null;
130
+ readonly childHolders: number;
131
+ readonly droppedBases: readonly string[];
132
+ readonly inlinedBases: readonly string[];
133
+ /** `<decl>.<prop>` for every property printed `never` because TypeScript has no value for it. */
134
+ readonly unsettableProps: readonly string[];
135
+ /**
136
+ * `<decl>.<prop>: <Ns>.<Name>` for every property printed `never` because the model
137
+ * could not resolve its type across a namespace boundary — two independently released
138
+ * GIRs disagreeing, which is what the main emitter answers `never` for as well.
139
+ */
140
+ readonly unresolvedProps: readonly string[];
141
+ /**
142
+ * `c:identifier-prefixes` from the GIR, verbatim and in order — `['G']` for Gio.
143
+ *
144
+ * The C prefix a type REFERENCE needs: resolving `Gio.Icon` means producing `GIcon`,
145
+ * and nothing else in this package states that `Gio` spells itself `G`. Carried rather
146
+ * than derived because GIR carries it, and a derivation over the `DECLS` keys is wrong
147
+ * wherever the C prefix is not a prefix of the type NAMES: gdkx11-4.0 and gdkwayland-4.0
148
+ * both state `Gdk` while every key they declare begins `GdkX11`/`GdkWayland`.
149
+ *
150
+ * Empty where the GIR states none — 17 of the 627 emitting namespaces — because
151
+ * inventing the namespace name there is a confident wrong answer in place of a missing
152
+ * one. A LIST because 20 of them state more than one, which no single string expresses.
153
+ */
154
+ readonly identifierPrefixes: readonly string[];
155
+ /**
156
+ * Sibling vocabularies this one's DECLARATIONS come from, as import specifiers.
157
+ *
158
+ * A chain link with no `OWN_PROPS` row is ambiguous on its own — `GtkSeparator` has no
159
+ * settable property, `GApplication` has its properties in another package — and this
160
+ * list is what tells the two apart. Enum and bitfield NUMBERS are not here: those are
161
+ * carried in this file, because a `PROP_ENUMS` row naming a foreign GType gives a
162
+ * consumer nothing to load and a `.ui` file using the property never names its owner.
163
+ */
164
+ readonly requiredVocabularies: readonly string[];
165
+ };
166
+
167
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
168
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
169
+
170
+ /**
171
+ * Declaration GType -> the signals it registers itself, never its parents'.
172
+ *
173
+ * Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
174
+ * abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
175
+ */
176
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
177
+
178
+ /**
179
+ * Instantiable GType -> every declaration its members come from, self first.
180
+ *
181
+ * The key set is what a UI description file can NAME: every registered, non-abstract
182
+ * class this namespace declares. GtkBuilder resolves a `<object class="…">` through
183
+ * `g_type_from_name`, which knows nothing about widgets, so this is wider than
184
+ * `Widgets` by design — `GtkSizeGroup`, `GtkTextTag`, every `GtkEventController`
185
+ * and every `GtkCellRenderer` are here and are not widgets.
186
+ *
187
+ * `Widgets` and `CHILD_HOLDERS` are the narrower questions and answer them unchanged.
188
+ */
189
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
190
+
191
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
192
+ export const CHILD_HOLDERS: readonly string[];
193
+
194
+ /** Enum GType -> the nicks this surface offers. */
195
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
196
+
197
+ /**
198
+ * `<enum GType>.<nick>` -> the integer GObject registers for it, from GIR's `value`.
199
+ *
200
+ * Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the 137 enums a
201
+ * GTK 4 vocabulary carries -- 112 in Gtk-4.0 and 25 in Adw-1: `GtkResponseType` runs -1 to -11, `GtkTextWindowType` starts
202
+ * at 1, `GtkOrdering` and `GtkConstraintRelation` are -1/0/1, `GtkAlign` has two names
203
+ * on one value, and `GtkConstraintStrength.required` is 1001001000 where counting says 0.
204
+ *
205
+ * Read from the same GIR as the nicks, deliberately. A consumer reading the numbers off an
206
+ * installed typelib instead has two provenances for one table, and then cannot tell a
207
+ * missing number from a host older than the vocabulary.
208
+ */
209
+ export const ENUM_VALUES: Readonly<Record<string, number>>;
210
+
211
+ /**
212
+ * The `<enum GType>.<nick>` entries GIR marks `deprecated="1"`.
213
+ *
214
+ * Two names on one value is how GObject spells an alias -- `GTK_ALIGN_BASELINE` and
215
+ * `GTK_ALIGN_BASELINE_FILL` are both 4, and both keep a `ENUM_VALUES` entry. The pairing
216
+ * is visible in the numbers; which name is the old one is not, and this is that fact --
217
+ * where GIR states it. It usually does not: 4 registered-enum members across the 718 GIRs
218
+ * carry the attribute, and 179 of the 182 value-sharing pairs carry it on neither half, so
219
+ * absence from this list means GIR is silent, not that the nick is the current one.
220
+ */
221
+ export const ENUM_DEPRECATED: readonly string[];
222
+
223
+ /**
224
+ * `<enum GType>.<nick>` -> the raw GIR `value` no number could be read from.
225
+ *
226
+ * The declared remainder, so that every nick in `ENUM_NICKS` is in `ENUM_VALUES` or in
227
+ * here and a drop cannot be silent. Two shapes reach it: a symbolic or absent value (Vala
228
+ * writes `(null)`, a char enum writes a letter) and an integer past
229
+ * `Number.MAX_SAFE_INTEGER`, where a literal would lose precision and stop being the
230
+ * GIR's number. Empty for Gtk, Adw, GLib and Gio.
231
+ */
232
+ export const ENUM_VALUES_UNREADABLE: Readonly<Record<string, string>>;
233
+
234
+ /**
235
+ * `<bitfield GType>.<nick>` -> the integer GObject registers for that one member.
236
+ *
237
+ * `ENUM_NICKS` carries no bitfield, because GObject cannot resolve a nick SET; that says
238
+ * nothing about a single member's number, and the number is what a host without GI needs.
239
+ * 23 settable properties in Gtk-4.0 and Adw-1 are bitfield-typed and are declared bare
240
+ * `number` -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`, `AdwTabView:shortcuts`,
241
+ * `GtkDropTarget:actions` among them. Counting is worst here: 119 of the 156 Gtk-4.0
242
+ * bitfield members this vocabulary carries disagree with their declaration position,
243
+ * against 29 of 672 enumeration members.
244
+ *
245
+ * Combine with `|` as GObject does. There is no nick table to pair this with, so a name
246
+ * here is resolvable and a SET still is not.
247
+ */
248
+ export const FLAG_VALUES: Readonly<Record<string, number>>;
249
+
250
+ /** `<bitfield GType>.<nick>` -> the raw GIR `value` no number could be read from. */
251
+ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
252
+
253
+ /**
254
+ * `<declaration GType>.<property>` -> the GType of that property's enum or bitfield.
255
+ *
256
+ * The join the value tables need and nothing else here carries. A host with no GI has a
257
+ * property name and a nick and needs a number; `ENUM_VALUES` is keyed by ENUM GType, and
258
+ * only this says which enum a property is. Keyed by DECLARATION like `OWN_PROPS`, so it is
259
+ * read at every link of a `DECLS` chain — `orientation` belongs to `GtkOrientable`, not
260
+ * to the `GtkBox` a caller starts from.
261
+ *
262
+ * Present only where the property's OWN type is the enum: an array of them, or a union that
263
+ * merely mentions one, would be an entry a consumer resolves wrongly.
264
+ *
265
+ * The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
266
+ * emitted once, by the namespace that owns the enum, so `AdwComboRow.search-match-mode` names
267
+ * `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 83 of the 909
268
+ * entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
269
+ * owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
270
+ * resolves against SOME module.
271
+ */
272
+ export const PROP_ENUMS: Readonly<Record<string, string>>;
273
+
274
+ /**
275
+ * The kinds of value a GTK accessible property, relation or state takes.
276
+ *
277
+ * `enum` is the one that needs a second lookup: `ARIA_VALUE_ENUMS` names the enum GType,
278
+ * and `ENUM_NICKS` and `ENUM_VALUES` answer from there.
279
+ */
280
+ export type AriaValueType = 'string' | 'integer' | 'double' | 'boolean' | 'reference' | 'enum';
281
+
282
+ /**
283
+ * `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
284
+ *
285
+ * The one table in this file that is not a fact about a ParamSpec. A GtkBuilder or
286
+ * Blueprint `accessibility { … }` block is typed by GTK's ARIA table, not by the widget,
287
+ * and the two disagree where it costs most: `orientation` is settable on a `GtkLabel`
288
+ * that implements no `GtkOrientable`, and `checked` is a `GtkAccessibleTristate`, so
289
+ * `checked: true` is the number 1 rather than a boolean. Typing those slots from the
290
+ * widget's properties gets both wrong and raises nothing.
291
+ *
292
+ * Keyed like `ENUM_VALUES` because the ARIA names ARE enum members — of
293
+ * `GtkAccessibleProperty`, `GtkAccessibleRelation` and `GtkAccessibleState` — so
294
+ * `ENUM_NICKS` already lists them and one key parser reads both.
295
+ *
296
+ * Read from each member's own GIR documentation. `gtk_accessible_property_init_value()`
297
+ * is the C half of this table and is not introspectable; the doc sentence is, and states
298
+ * the type for 52 of the 53 members in gtk4 4.23.3. Complete or absent, never partial: a
299
+ * member the generator cannot answer for fails the build and names itself.
300
+ */
301
+ export const ARIA_VALUE_TYPES: Readonly<Record<string, AriaValueType>>;
302
+
303
+ /**
304
+ * The same keys, for the `'enum'` rows only -> the GType of that enum.
305
+ *
306
+ * A table of its own for the reason `PROP_ENUMS` is one: folded in, the values of
307
+ * `ARIA_VALUE_TYPES` would be six reserved words mixed with arbitrary GTypes and telling
308
+ * them apart would be the consumer's problem. Apart, `ARIA_VALUE_TYPES[k] === 'enum'` is
309
+ * the whole test and `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
310
+ */
311
+ export const ARIA_VALUE_ENUMS: Readonly<Record<string, string>>;
312
+
313
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
314
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
315
+
316
+ /**
317
+ * `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
318
+ *
319
+ * What keeps a runtime cross-check honest across a version gap without an
320
+ * allowlist: a name the installed library lacks is a defect UNLESS the version
321
+ * here is newer than the one running.
322
+ *
323
+ * ALL THREE key shapes, because that test only works for the names it covers. A
324
+ * property-only map leaves a consumer no way to explain a missing SIGNAL, which is
325
+ * a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
326
+ * explain a missing CLASS, and that one fails as a bare
327
+ * `TypeError: can't access property "$gtype", ctor() is undefined` that does not
328
+ * even name the GType.
329
+ *
330
+ * A key is present only where the GIR states a version — sparse by nature (`version`
331
+ * sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
332
+ */
333
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,149 @@
1
+ // The widget vocabulary of CoglPango-14 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: CoglPango-14 — dropped empty base(s): Pango.Renderer
4
+ //
5
+ // The type half of this subpath is the sibling `.d.ts`. This file exists because
6
+ // types are erased: a consumer that wants to ask the installed library whether every
7
+ // name here is real needs values, not declarations.
8
+
9
+ export const PROVENANCE = {
10
+ namespace: 'CoglPango',
11
+ version: '14',
12
+ libraryVersion: null,
13
+ childHolders: 0,
14
+ droppedBases: ['Pango.Renderer'],
15
+ inlinedBases: [],
16
+ unsettableProps: [],
17
+ unresolvedProps: [],
18
+ identifierPrefixes: ['CoglPango'],
19
+ requiredVocabularies: ['@girs/gobject-2.0/vocabulary'],
20
+ };
21
+
22
+ export const OWN_PROPS = {
23
+ CoglPangoRenderer: ['context'],
24
+ };
25
+
26
+ export const OWN_SIGNALS = {};
27
+
28
+ // Every GType this namespace can INSTANTIATE -> the declarations its members come from.
29
+ //
30
+ // The key set is what a UI description file can name: a registered, non-abstract class.
31
+ // Not "every widget" — GtkBuilder resolves a name through `g_type_from_name`, which knows
32
+ // nothing about widgets, and a `.ui` file is full of `GtkSizeGroup`, `GtkTextTag`,
33
+ // `GtkEventController*` and `GtkCellRenderer*`. Use `Widgets` and `CHILD_HOLDERS`
34
+ // below for the narrower questions; they did not move.
35
+ export const DECLS = {
36
+ CoglPangoRenderer: ['CoglPangoRenderer', 'GObject'],
37
+ };
38
+
39
+ // The GTypes above that ARE widgets are the `Widgets` map in the sibling `.d.ts`; these
40
+ // are the ones that merely HOLD one, through `set_child`/`get_child`, descending from
41
+ // `GObject.Object`. A renderer places them like a container; a check asking "is this a
42
+ // widget" must not count them. Derived from the accessor pair, never from a list — the
43
+ // count is in the provenance line above.
44
+ export const CHILD_HOLDERS = [];
45
+
46
+ export const ENUM_NICKS = {};
47
+
48
+ // The number behind each of those nicks, read from GIR's own `value` attribute.
49
+ //
50
+ // It ships because position in `ENUM_NICKS` is not the value and a consumer with no
51
+ // typelib has no other way to learn it: a surface without GI still has to hand GObject an
52
+ // integer. The alternative a consumer reaches for first is counting, and counting is wrong
53
+ // on 6 of the 137 enums a GTK 4 vocabulary carries (112 in Gtk-4.0, 25 in Adw-1) --
54
+ // `GtkResponseType` runs -1 down to
55
+ // -11, `GtkTextWindowType` starts at 1, and `GtkConstraintStrength.required` is
56
+ // 1001001000 where counting answers 0.
57
+ //
58
+ // Same provenance as the nicks above, which is the point: a consumer that reads the numbers
59
+ // from an INSTALLED library instead gets two provenances for one table, and a member the
60
+ // vocabulary describes but the host predates then looks like a missing number rather than a
61
+ // version gap.
62
+ export const ENUM_VALUES = {};
63
+
64
+ // The nicks GIR marks `deprecated="1"`.
65
+ //
66
+ // Two members of one enum may share a value -- that is how GObject spells an alias, and
67
+ // `GTK_ALIGN_BASELINE` and `GTK_ALIGN_BASELINE_FILL` are both 4. `ENUM_VALUES` keeps
68
+ // both names, so nothing is lost, and this is what says which of the two a number should be
69
+ // spelled back as. Stated rather than derived: the pairing is visible in the values, the
70
+ // DIRECTION is not.
71
+ //
72
+ // Read it as evidence, not as a negative: 4 registered-enum members in the 718 GIRs carry
73
+ // the attribute at all, and 179 of the 182 value-sharing pairs carry it on neither half.
74
+ // A nick missing from here is a nick GIR says nothing about, not a nick GIR calls current.
75
+ export const ENUM_DEPRECATED = [];
76
+
77
+ // The declared remainder: nicks whose GIR `value` is not a number this can carry.
78
+ //
79
+ // Every nick in `ENUM_NICKS` is in `ENUM_VALUES` or here -- a nick in neither would be a
80
+ // silent drop. GIR carries two shapes no integer holds: a symbolic or absent value (Vala
81
+ // writes `(null)`, a char enum writes a letter) and an integer past
82
+ // `Number.MAX_SAFE_INTEGER`. The value kept here is the raw attribute, so the entry says
83
+ // WHAT was unreadable rather than only that something was. Measured over the 718 GIRs in
84
+ // ts-for-gir's `girs/`: 32 of 34096 registered-enum members, none in Gtk, Adw, GLib or Gio.
85
+ export const ENUM_VALUES_UNREADABLE = {};
86
+
87
+ // The number behind each member of a registered BITFIELD, keyed the same way.
88
+ //
89
+ // `ENUM_NICKS` refuses a bitfield because GObject cannot resolve a nick SET, and that
90
+ // reason says nothing about one member's number. 23 settable properties in Gtk-4.0 and
91
+ // Adw-1 are bitfield-typed -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`,
92
+ // `AdwTabView:shortcuts`, `GtkDropTarget:actions`, ... -- and they are typed bare
93
+ // `number`, so a host without GI has nothing to compute one from. Counting is worst
94
+ // exactly here: 119 of the 156 Gtk-4.0 bitfield members this vocabulary carries disagree
95
+ // with their declaration position, against 29 of 672 enumeration members.
96
+ //
97
+ // A table of its own rather than more rows in `ENUM_VALUES`, so that "every nick in
98
+ // `ENUM_NICKS` has a number or a declared reason" stays a claim about one set.
99
+ export const FLAG_VALUES = {};
100
+
101
+ // The same declared remainder for the bitfields. Every one of the 13 members in ts-for-gir's
102
+ // `girs/` whose value is past `Number.MAX_SAFE_INTEGER` is a bitfield member (Fwupd, Qmi),
103
+ // so this is the table that shape actually reaches.
104
+ export const FLAG_VALUES_UNREADABLE = {};
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 83 of the 909 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
+
122
+ // `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
123
+ //
124
+ // The one table here that is not about a ParamSpec. A GtkBuilder or Blueprint
125
+ // `accessibility { … }` block is typed by GTK's ARIA table instead, and the two disagree
126
+ // where it matters: `orientation` is settable on a `GtkLabel` that implements no
127
+ // `GtkOrientable` and has no such property, and `checked` is a `GtkAccessibleTristate`, so
128
+ // `checked: true` means the number 1 and not the boolean. A consumer typing those slots
129
+ // from the widget gets both wrong, silently.
130
+ //
131
+ // Read from each member's own documentation, which is where GTK keeps the table --
132
+ // `gtk_accessible_property_init_value()` is the C half and is not introspectable, the
133
+ // sentence is. Complete or absent, never partial: a member whose documentation states no
134
+ // value type fails generation and names itself, because a missing row is indistinguishable
135
+ // from "GTK has no such name" and the plausible fallback emits `true` where GTK means 1.
136
+ export const ARIA_VALUE_TYPES = {};
137
+
138
+ // The same keys, for the `'enum'` rows only -> the GType of the enum.
139
+ //
140
+ // The join on from a kind to a number, and a table of its own for the reason `PROP_ENUMS`
141
+ // is one: folding the GType into `ARIA_VALUE_TYPES` would make its values a mix of six
142
+ // reserved words and arbitrary GTypes, and telling them apart would be the consumer's
143
+ // problem. With this, `ARIA_VALUE_TYPES[k] === 'enum'` is the whole test, and
144
+ // `ENUM_NICKS[ARIA_VALUE_ENUMS[k]]` is the nick list.
145
+ export const ARIA_VALUE_ENUMS = {};
146
+
147
+ export const SLOT_CANDIDATES = {};
148
+
149
+ export const SINCE = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/coglpango-14",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "GJS TypeScript type definitions for CoglPango-14",
5
5
  "type": "module",
6
6
  "module": "coglpango-14.js",
@@ -16,6 +16,11 @@
16
16
  "import": "./coglpango-14-import.js",
17
17
  "default": "./coglpango-14-import.js"
18
18
  },
19
+ "./vocabulary": {
20
+ "types": "./coglpango-14-vocabulary.d.ts",
21
+ "import": "./coglpango-14-vocabulary.js",
22
+ "default": "./coglpango-14-vocabulary.js"
23
+ },
19
24
  "./coglpango-14": {
20
25
  "types": "./coglpango-14.d.ts",
21
26
  "import": "./coglpango-14.js",
@@ -31,21 +36,21 @@
31
36
  "test": "tsc --project tsconfig.json"
32
37
  },
33
38
  "dependencies": {
34
- "@girs/gjs": "^5.2.0",
35
- "@girs/pangocairo-1.0": "^5.2.0",
36
- "@girs/cairo-1.0": "^5.2.0",
37
- "@girs/gobject-2.0": "^5.2.0",
38
- "@girs/glib-2.0": "^5.2.0",
39
- "@girs/pango-1.0": "^5.2.0",
40
- "@girs/harfbuzz-0.0": "^5.2.0",
41
- "@girs/freetype2-2.0": "^5.2.0",
42
- "@girs/gio-2.0": "^5.2.0",
43
- "@girs/gmodule-2.0": "^5.2.0",
44
- "@girs/mtk-14": "^5.2.0",
45
- "@girs/graphene-1.0": "^5.2.0",
46
- "@girs/cogl-14": "^5.2.0",
47
- "@girs/xlib-2.0": "^5.2.0",
48
- "@girs/gl-1.0": "^5.2.0" },
39
+ "@girs/gjs": "^5.3.0",
40
+ "@girs/pangocairo-1.0": "^5.3.0",
41
+ "@girs/cairo-1.0": "^5.3.0",
42
+ "@girs/gobject-2.0": "^5.3.0",
43
+ "@girs/glib-2.0": "^5.3.0",
44
+ "@girs/pango-1.0": "^5.3.0",
45
+ "@girs/harfbuzz-0.0": "^5.3.0",
46
+ "@girs/freetype2-2.0": "^5.3.0",
47
+ "@girs/gio-2.0": "^5.3.0",
48
+ "@girs/gmodule-2.0": "^5.3.0",
49
+ "@girs/mtk-14": "^5.3.0",
50
+ "@girs/graphene-1.0": "^5.3.0",
51
+ "@girs/cogl-14": "^5.3.0",
52
+ "@girs/xlib-2.0": "^5.3.0",
53
+ "@girs/gl-1.0": "^5.3.0" },
49
54
  "devDependencies": {
50
55
  "typescript": "*"
51
56
  },
package/tsconfig.json CHANGED
@@ -65,7 +65,7 @@
65
65
  ]
66
66
  }
67
67
  },
68
- "include": ["./coglpango-14.d.ts"]
68
+ "include": ["./coglpango-14.d.ts","./coglpango-14-vocabulary.d.ts"]
69
69
  }
70
70
 
71
71