@girs/amtk-5 5.0.0-4.0.4 → 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,82 +4,96 @@
4
4
  ![version](https://img.shields.io/npm/v/@girs/amtk-5)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/amtk-5)
6
6
 
7
+ GJS TypeScript type definitions for Amtk-5 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.0.0.
7
8
 
8
- GJS TypeScript type definitions for Amtk-5, generated from library version 5.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.4.
9
+ This package contains type declarations only. It ships no runtime code, so it adds
10
+ nothing to your program and works with any bundler or none at all.
9
11
 
10
12
  ## Install
11
13
 
12
- To use this type definitions, install them with NPM:
13
14
  ```bash
14
15
  npm install @girs/amtk-5
15
16
  ```
16
17
 
17
- ## Usage
18
+ Any package manager works. The package has no dependencies beyond other `@girs/*`
19
+ type packages.
20
+
21
+ ## What it exports
22
+
23
+ | Import | What you get |
24
+ |---|---|
25
+ | `@girs/amtk-5` | the namespace as a default export, plus the ambient and global declarations |
26
+ | `@girs/amtk-5/ambient` | only the `gi://` module declarations |
27
+ | `@girs/amtk-5/import` | only the `imports.gi` declarations |
28
+ | `@girs/amtk-5/amtk-5` | the namespace, without the side-effecting declarations |
29
+ | `@girs/amtk-5/vocabulary` | GIR-derived widget data: settable properties, enum nicks, slot candidates |
30
+
31
+ ## Three ways to import
32
+
33
+ Which one you use depends on how you write imports elsewhere, not on your toolchain.
34
+
35
+ ### As a module
18
36
 
19
- You can import this package into your project like this:
20
37
  ```ts
21
38
  import Amtk from '@girs/amtk-5';
22
39
  ```
23
40
 
24
- ### Ambient Modules
41
+ ### As `gi://`
25
42
 
26
- You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
27
- For this you need to include `@girs/amtk-5` or `@girs/amtk-5/ambient` in your `tsconfig` or entry point Typescript file:
43
+ GJS resolves `gi://` at runtime. To give it types, reference the package once, either
44
+ from your entry point or from `tsconfig.json`:
28
45
 
29
- `index.ts`:
30
46
  ```ts
31
- import '@girs/amtk-5'
47
+ import '@girs/amtk-5';
32
48
  ```
33
49
 
34
- `tsconfig.json`:
35
50
  ```json
36
- {
37
- "compilerOptions": {
38
- ...
39
- },
40
- "include": ["@girs/amtk-5"],
41
- ...
42
- }
51
+ { "include": ["@girs/amtk-5"] }
43
52
  ```
44
53
 
45
- Now you can import the ambient module with TypeScript support:
54
+ Then the runtime spelling type-checks:
46
55
 
47
56
  ```ts
48
57
  import Amtk from 'gi://Amtk?version=5';
49
58
  ```
50
59
 
51
- ### Global import
60
+ Referencing `@girs/amtk-5/ambient` instead pulls in these declarations
61
+ alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
62
+
63
+ ### As `imports.gi`
52
64
 
53
- You can also import the module with Typescript support using the global `imports.gi` object of GJS.
54
- For this you need to include `@girs/amtk-5` or `@girs/amtk-5/import` in your `tsconfig` or entry point Typescript file:
65
+ GJS's global object works the same way, via `@girs/amtk-5/import`:
55
66
 
56
- `index.ts`:
57
67
  ```ts
58
- import '@girs/amtk-5'
68
+ const Amtk = imports.gi.Amtk;
59
69
  ```
60
70
 
61
- `tsconfig.json`:
62
- ```json
63
- {
64
- "compilerOptions": {
65
- ...
66
- },
67
- "include": ["@girs/amtk-5"],
68
- ...
69
- }
70
- ```
71
+ ## Widget vocabulary
71
72
 
72
- Now you have also type support for this, too:
73
+ `amtk-5` declares widgets, so it also carries what the GIR says about them, as
74
+ types and as values a test can read:
73
75
 
74
76
  ```ts
75
- const Amtk = imports.gi.Amtk;
77
+ import type { Widgets, PropsOf } from '@girs/amtk-5/vocabulary';
78
+ import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/amtk-5/vocabulary';
76
79
  ```
77
80
 
78
- ### Bundle
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".
79
85
 
80
- Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
86
+ This subpath answers what the GIR says, not what the installed library has. For the
87
+ second question, ask the library.
88
+
89
+ ## Building
90
+
91
+ The declarations need no build step. If you bundle, every bundler works, since there is
92
+ no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
93
+ show working setups for several.
81
94
 
82
95
  ## Other packages
83
96
 
84
- All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
97
+ Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
98
+
85
99
 
@@ -0,0 +1,158 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for Amtk-5.
3
+ *
4
+ * GENERATED — do not edit. Provenance: Amtk-5 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
5
+ *
6
+ * 1 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 Amtk from './amtk-5.js';
28
+ import type { GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkContainerConstructOnly, GtkContainerProps, GtkScrolledWindowConstructOnly, GtkScrolledWindowProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-3.0/surface';
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 AmtkTreeViewScrolledWindowSizingProps extends GtkScrolledWindowProps, GtkBuildableProps {
53
+ /**
54
+ * Whether to take the #GdkMonitor size into account as a maximum width and height to apply.
55
+ * @since 5.10
56
+ */
57
+ 'monitor-limit-enabled'?: boolean;
58
+ }
59
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
60
+ export type AmtkTreeViewScrolledWindowSizingConstructOnly = GtkScrolledWindowConstructOnly | GtkBuildableConstructOnly;
61
+
62
+ // ---------------------------------------------------------------------------
63
+ // The GType-keyed widget map.
64
+ //
65
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
66
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
67
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
68
+ // is the class. None of those is baked in here.
69
+ //
70
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
71
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
72
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
73
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
74
+ // this is what notices when a release adds a candidate.
75
+ // ---------------------------------------------------------------------------
76
+
77
+ export interface Widgets {
78
+ AmtkTreeViewScrolledWindowSizing: {
79
+ class: Amtk.TreeViewScrolledWindowSizing;
80
+ props: AmtkTreeViewScrolledWindowSizingProps;
81
+ signals: Amtk.TreeViewScrolledWindowSizing.SignalSignatures;
82
+ constructOnly: AmtkTreeViewScrolledWindowSizingConstructOnly;
83
+ slotCandidates: {};
84
+ };
85
+ }
86
+
87
+ /** Every GType this namespace can create. A consumer derives its own tag map. */
88
+ export type WidgetGType = keyof Widgets;
89
+
90
+ // ---------------------------------------------------------------------------
91
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
92
+ //
93
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
94
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
95
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
96
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
97
+ // more rows in `Widgets`: concatenate them when you mean both.
98
+ // ---------------------------------------------------------------------------
99
+
100
+ export interface ChildHolders {
101
+
102
+ }
103
+
104
+ /** Every GType this namespace holds a child in without it being a widget. */
105
+ export type ChildHolderGType = keyof ChildHolders;
106
+
107
+ /** The writable, optional, GObject-keyed property surface of one GType. */
108
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
109
+
110
+ /** The signal table this package already emits, reached by GType. */
111
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
112
+
113
+ /** The instance type — what a `ref`-shaped prop should infer. */
114
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
115
+
116
+ /** Property names that can only be set at construction. */
117
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
118
+
119
+ /** Candidate child slots — see the note above; curation decides. */
120
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
121
+
122
+ /**
123
+ * The same facts as runtime data, for a consumer that CHECKS them.
124
+ *
125
+ * Types are erased, so a spec that asks the installed GTK whether every property
126
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
127
+ * and every nick resolvable through an enum lookup cannot read the interfaces
128
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
129
+ * belongs to the consumer and the DATA belongs here.
130
+ */
131
+ export const SURFACE_PROVENANCE: string;
132
+
133
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
134
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
135
+
136
+ /** Widget GType -> its own signals. */
137
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
138
+
139
+ /** Widget GType -> every declaration its members come from, self first. */
140
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
141
+
142
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
143
+ export const CHILD_HOLDERS: readonly string[];
144
+
145
+ /** Enum GType -> the nicks this surface offers. */
146
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
147
+
148
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
149
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
150
+
151
+ /**
152
+ * `Type.property` -> the release that introduced it.
153
+ *
154
+ * What keeps a runtime cross-check honest across a version gap without an
155
+ * allowlist: a member the installed library lacks is a defect UNLESS the version
156
+ * here is newer than the one running.
157
+ */
158
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,33 @@
1
+ // The widget vocabulary of Amtk-5 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: Amtk-5 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
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 SURFACE_PROVENANCE = 'Amtk-5 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface';
10
+
11
+ export const OWN_PROPS = {
12
+ AmtkTreeViewScrolledWindowSizing: ['monitor-limit-enabled'],
13
+ };
14
+
15
+ export const OWN_SIGNALS = {};
16
+
17
+ export const DECLS = {
18
+ AmtkTreeViewScrolledWindowSizing: ['AmtkTreeViewScrolledWindowSizing', 'GtkScrolledWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
19
+ };
20
+
21
+ // The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
22
+ // and descend from `GObject.Object`. A renderer places them like a container; a check
23
+ // asking "is this a widget" must not count them. Derived from the accessor pair, never
24
+ // from a list — the count is in the provenance line above.
25
+ export const CHILD_HOLDERS = [];
26
+
27
+ export const ENUM_NICKS = {};
28
+
29
+ export const SLOT_CANDIDATES = {};
30
+
31
+ export const SINCE = {
32
+ 'AmtkTreeViewScrolledWindowSizing.monitor-limit-enabled': '5.10',
33
+ };
@@ -0,0 +1,259 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for Amtk-5.
3
+ *
4
+ * GENERATED — do not edit. Provenance: Amtk-5 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
5
+ *
6
+ * 1 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 Amtk from './amtk-5.js';
28
+ import type { GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkContainerConstructOnly, GtkContainerProps, GtkScrolledWindowConstructOnly, GtkScrolledWindowProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-3.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 AmtkTreeViewScrolledWindowSizingProps extends GtkScrolledWindowProps, GtkBuildableProps {
53
+ /**
54
+ * Whether to take the #GdkMonitor size into account as a maximum width and height to apply.
55
+ * @since 5.10
56
+ * @default TRUE
57
+ */
58
+ 'monitor-limit-enabled'?: boolean;
59
+ }
60
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
61
+ export type AmtkTreeViewScrolledWindowSizingConstructOnly = GtkScrolledWindowConstructOnly | GtkBuildableConstructOnly;
62
+
63
+ // ---------------------------------------------------------------------------
64
+ // The GType-keyed widget map.
65
+ //
66
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
67
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
68
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
69
+ // is the class. None of those is baked in here.
70
+ //
71
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
72
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
73
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
74
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
75
+ // this is what notices when a release adds a candidate.
76
+ // ---------------------------------------------------------------------------
77
+
78
+ export interface Widgets {
79
+ AmtkTreeViewScrolledWindowSizing: {
80
+ class: Amtk.TreeViewScrolledWindowSizing;
81
+ props: AmtkTreeViewScrolledWindowSizingProps;
82
+ signals: Amtk.TreeViewScrolledWindowSizing.SignalSignatures;
83
+ constructOnly: AmtkTreeViewScrolledWindowSizingConstructOnly;
84
+ slotCandidates: {};
85
+ };
86
+ }
87
+
88
+ /** Every GType this namespace can create. A consumer derives its own tag map. */
89
+ export type WidgetGType = keyof Widgets;
90
+
91
+ // ---------------------------------------------------------------------------
92
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
93
+ //
94
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
95
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
96
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
97
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
98
+ // more rows in `Widgets`: concatenate them when you mean both.
99
+ // ---------------------------------------------------------------------------
100
+
101
+ export interface ChildHolders {
102
+
103
+ }
104
+
105
+ /** Every GType this namespace holds a child in without it being a widget. */
106
+ export type ChildHolderGType = keyof ChildHolders;
107
+
108
+ /** The writable, optional, GObject-keyed property surface of one GType. */
109
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
110
+
111
+ /** The signal table this package already emits, reached by GType. */
112
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
113
+
114
+ /** The instance type — what a `ref`-shaped prop should infer. */
115
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
116
+
117
+ /** Property names that can only be set at construction. */
118
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
119
+
120
+ /** Candidate child slots — see the note above; curation decides. */
121
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
122
+
123
+ /**
124
+ * The same facts as runtime data, for a consumer that CHECKS them.
125
+ *
126
+ * Types are erased, so a spec that asks the installed GTK whether every property
127
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
128
+ * and every nick resolvable through an enum lookup cannot read the interfaces
129
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
130
+ * belongs to the consumer and the DATA belongs here.
131
+ */
132
+ export const PROVENANCE: {
133
+ readonly namespace: string;
134
+ readonly version: string;
135
+ /** The version the LIBRARY states, or null where it states none. Never the namespace's. */
136
+ readonly libraryVersion: string | null;
137
+ readonly childHolders: number;
138
+ readonly droppedBases: readonly string[];
139
+ readonly inlinedBases: readonly string[];
140
+ readonly unsettableProps: readonly string[];
141
+ };
142
+
143
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
144
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
145
+
146
+ /**
147
+ * Declaration GType -> the signals it registers itself, never its parents'.
148
+ *
149
+ * Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
150
+ * abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
151
+ */
152
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
153
+
154
+ /** Widget GType -> every declaration its members come from, self first. */
155
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
156
+
157
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
158
+ export const CHILD_HOLDERS: readonly string[];
159
+
160
+ /** Enum GType -> the nicks this surface offers. */
161
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
162
+
163
+ /**
164
+ * `<enum GType>.<nick>` -> the integer GObject registers for it, from GIR's `value`.
165
+ *
166
+ * Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the 129 enums a
167
+ * GTK 4 vocabulary carries -- 104 in Gtk-4.0 and 25 in Adw-1: `GtkResponseType` runs -1 to -11, `GtkTextWindowType` starts
168
+ * at 1, `GtkOrdering` and `GtkConstraintRelation` are -1/0/1, `GtkAlign` has two names
169
+ * on one value, and `GtkConstraintStrength.required` is 1001001000 where counting says 0.
170
+ *
171
+ * Read from the same GIR as the nicks, deliberately. A consumer reading the numbers off an
172
+ * installed typelib instead has two provenances for one table, and then cannot tell a
173
+ * missing number from a host older than the vocabulary.
174
+ */
175
+ export const ENUM_VALUES: Readonly<Record<string, number>>;
176
+
177
+ /**
178
+ * The `<enum GType>.<nick>` entries GIR marks `deprecated="1"`.
179
+ *
180
+ * Two names on one value is how GObject spells an alias -- `GTK_ALIGN_BASELINE` and
181
+ * `GTK_ALIGN_BASELINE_FILL` are both 4, and both keep a `ENUM_VALUES` entry. The pairing
182
+ * is visible in the numbers; which name is the old one is not, and this is that fact --
183
+ * where GIR states it. It usually does not: 4 registered-enum members across the 718 GIRs
184
+ * carry the attribute, and 179 of the 182 value-sharing pairs carry it on neither half, so
185
+ * absence from this list means GIR is silent, not that the nick is the current one.
186
+ */
187
+ export const ENUM_DEPRECATED: readonly string[];
188
+
189
+ /**
190
+ * `<enum GType>.<nick>` -> the raw GIR `value` no number could be read from.
191
+ *
192
+ * The declared remainder, so that every nick in `ENUM_NICKS` is in `ENUM_VALUES` or in
193
+ * here and a drop cannot be silent. Two shapes reach it: a symbolic or absent value (Vala
194
+ * writes `(null)`, a char enum writes a letter) and an integer past
195
+ * `Number.MAX_SAFE_INTEGER`, where a literal would lose precision and stop being the
196
+ * GIR's number. Empty for Gtk, Adw, GLib and Gio.
197
+ */
198
+ export const ENUM_VALUES_UNREADABLE: Readonly<Record<string, string>>;
199
+
200
+ /**
201
+ * `<bitfield GType>.<nick>` -> the integer GObject registers for that one member.
202
+ *
203
+ * `ENUM_NICKS` carries no bitfield, because GObject cannot resolve a nick SET; that says
204
+ * nothing about a single member's number, and the number is what a host without GI needs.
205
+ * 21 writable widget properties in Gtk-4.0 and Adw-1 are bitfield-typed and are declared
206
+ * bare `number` -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`, `AdwTabView:shortcuts`
207
+ * among them. Counting is worst here: 95 of 121 Gtk-4.0 bitfield members disagree with their
208
+ * position, against 29 of 685 enumeration members.
209
+ *
210
+ * Combine with `|` as GObject does. There is no nick table to pair this with, so a name
211
+ * here is resolvable and a SET still is not.
212
+ */
213
+ export const FLAG_VALUES: Readonly<Record<string, number>>;
214
+
215
+ /** `<bitfield GType>.<nick>` -> the raw GIR `value` no number could be read from. */
216
+ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
217
+
218
+ /**
219
+ * `<declaration GType>.<property>` -> the GType of that property's enum or bitfield.
220
+ *
221
+ * The join the value tables need and nothing else here carries. A host with no GI has a
222
+ * property name and a nick and needs a number; `ENUM_VALUES` is keyed by ENUM GType, and
223
+ * only this says which enum a property is. Keyed by DECLARATION like `OWN_PROPS`, so it is
224
+ * read at every link of a `DECLS` chain — `orientation` belongs to `GtkOrientable`, not
225
+ * to the `GtkBox` a caller starts from.
226
+ *
227
+ * Present only where the property's OWN type is the enum: an array of them, or a union that
228
+ * merely mentions one, would be an entry a consumer resolves wrongly.
229
+ *
230
+ * The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
231
+ * emitted once, by the namespace that owns the enum, so `AdwComboRow.search-match-mode` names
232
+ * `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 57 of the 438
233
+ * entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
234
+ * owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
235
+ * resolves against SOME module.
236
+ */
237
+ export const PROP_ENUMS: Readonly<Record<string, string>>;
238
+
239
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
240
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
241
+
242
+ /**
243
+ * `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
244
+ *
245
+ * What keeps a runtime cross-check honest across a version gap without an
246
+ * allowlist: a name the installed library lacks is a defect UNLESS the version
247
+ * here is newer than the one running.
248
+ *
249
+ * ALL THREE key shapes, because that test only works for the names it covers. A
250
+ * property-only map leaves a consumer no way to explain a missing SIGNAL, which is
251
+ * a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
252
+ * explain a missing CLASS, and that one fails as a bare
253
+ * `TypeError: can't access property "$gtype", ctor() is undefined` that does not
254
+ * even name the GType.
255
+ *
256
+ * A key is present only where the GIR states a version — sparse by nature (`version`
257
+ * sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
258
+ */
259
+ export const SINCE: Readonly<Record<string, string>>;