@girs/foundrygtk-1 4.4.0 → 4.6.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/foundrygtk-1)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/foundrygtk-1)
6
6
 
7
+ GJS TypeScript type definitions for FoundryGtk-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.6.0.
7
8
 
8
- GJS TypeScript type definitions for FoundryGtk-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
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
- Install the type definitions with npm:
13
14
  ```bash
14
15
  npm install @girs/foundrygtk-1
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/foundrygtk-1` | the namespace as a default export, plus the ambient and global declarations |
26
+ | `@girs/foundrygtk-1/ambient` | only the `gi://` module declarations |
27
+ | `@girs/foundrygtk-1/import` | only the `imports.gi` declarations |
28
+ | `@girs/foundrygtk-1/foundrygtk-1` | the namespace, without the side-effecting declarations |
29
+ | `@girs/foundrygtk-1/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
- Import it like any other module:
20
37
  ```ts
21
38
  import FoundryGtk from '@girs/foundrygtk-1';
22
39
  ```
23
40
 
24
- ### Ambient Modules
41
+ ### As `gi://`
25
42
 
26
- [Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
27
- For this you need to include `@girs/foundrygtk-1` or `@girs/foundrygtk-1/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/foundrygtk-1'
47
+ import '@girs/foundrygtk-1';
32
48
  ```
33
49
 
34
- `tsconfig.json`:
35
50
  ```json
36
- {
37
- "compilerOptions": {
38
- ...
39
- },
40
- "include": ["@girs/foundrygtk-1"],
41
- ...
42
- }
51
+ { "include": ["@girs/foundrygtk-1"] }
43
52
  ```
44
53
 
45
- The ambient module now resolves with types:
54
+ Then the runtime spelling type-checks:
46
55
 
47
56
  ```ts
48
57
  import FoundryGtk from 'gi://FoundryGtk?version=1';
49
58
  ```
50
59
 
51
- ### Global import
60
+ Referencing `@girs/foundrygtk-1/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
- GJS's global `imports.gi` works too, with types.
54
- For this you need to include `@girs/foundrygtk-1` or `@girs/foundrygtk-1/import` in your `tsconfig` or entry point Typescript file:
65
+ GJS's global object works the same way, via `@girs/foundrygtk-1/import`:
55
66
 
56
- `index.ts`:
57
67
  ```ts
58
- import '@girs/foundrygtk-1'
68
+ const FoundryGtk = imports.gi.FoundryGtk;
59
69
  ```
60
70
 
61
- `tsconfig.json`:
62
- ```json
63
- {
64
- "compilerOptions": {
65
- ...
66
- },
67
- "include": ["@girs/foundrygtk-1"],
68
- ...
69
- }
70
- ```
71
+ ## Widget vocabulary
71
72
 
72
- That form carries types as well:
73
+ `foundrygtk-1` 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 FoundryGtk = imports.gi.FoundryGtk;
77
+ import type { Widgets, PropsOf } from '@girs/foundrygtk-1/vocabulary';
78
+ import { OWN_PROPS, ENUM_NICKS, PROVENANCE } from '@girs/foundrygtk-1/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
- Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
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,276 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for FoundryGtk-1.
3
+ *
4
+ * GENERATED — do not edit. Provenance: FoundryGtk-1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object
5
+ *
6
+ * 6 concrete widgets, 6 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 Foundry from '@girs/foundry-1';
28
+ import type FoundryGtk from './foundrygtk-1.js';
29
+ import type Pango from '@girs/pango-1.0';
30
+ import type { GtkAccessibleConstructOnly, GtkAccessibleProps, GtkAccessibleTextConstructOnly, GtkAccessibleTextProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkConstraintTargetConstructOnly, GtkConstraintTargetProps, GtkScrollableConstructOnly, GtkScrollableProps, GtkTextViewConstructOnly, GtkTextViewProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-4.0/vocabulary';
31
+ import type { GtkSourceGutterRendererConstructOnly, GtkSourceGutterRendererProps, GtkSourceViewConstructOnly, GtkSourceViewProps } from '@girs/gtksource-5/vocabulary';
32
+
33
+ // ---------------------------------------------------------------------------
34
+ // Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
35
+ //
36
+ // Not derived from the member name. Substituting underscores for dashes is not a law:
37
+ // some nicks keep an underscore the substitution would have replaced, and only the
38
+ // attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
39
+ // how a derived nick passes review and breaks elsewhere.
40
+ // Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
41
+ // ---------------------------------------------------------------------------
42
+
43
+
44
+
45
+ // ---------------------------------------------------------------------------
46
+ // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
47
+ // inheritance rather than flattening per widget.
48
+ //
49
+ // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
50
+ // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
51
+ // because GObject installs interface properties on the implementor at runtime while
52
+ // GIR keeps them once, on the interface.
53
+ // ---------------------------------------------------------------------------
54
+
55
+ export interface FoundryChangesGutterRendererProps extends GtkSourceGutterRendererProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
56
+ /** @default FALSE */
57
+ 'show-overview'?: boolean;
58
+ }
59
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
60
+ export type FoundryChangesGutterRendererConstructOnly = GtkSourceGutterRendererConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
61
+
62
+ export interface FoundryDiagnosticsGutterRendererProps extends GtkSourceGutterRendererProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
63
+ diagnostics?: Foundry.OnTypeDiagnostics;
64
+ }
65
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
66
+ export type FoundryDiagnosticsGutterRendererConstructOnly = GtkSourceGutterRendererConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
67
+
68
+ /** A widget that displays Git graph lanes for a [class@Foundry.VcsGraphEntry]. */
69
+ export interface FoundryGitLanesProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
70
+ /**
71
+ * The graph entry to render.
72
+ * @since 1.2
73
+ */
74
+ entry?: Foundry.VcsGraphEntry;
75
+ }
76
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
77
+ export type FoundryGitLanesConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
78
+
79
+ export interface FoundryMarkupViewProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
80
+ }
81
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
82
+ export type FoundryMarkupViewConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
83
+
84
+ export interface FoundrySourceViewProps extends GtkSourceViewProps, GtkAccessibleProps, GtkAccessibleTextProps, GtkBuildableProps, GtkConstraintTargetProps, GtkScrollableProps {
85
+ document?: Foundry.TextDocument;
86
+ /** @default TRUE */
87
+ 'enable-completion'?: boolean;
88
+ /** @default FALSE */
89
+ 'enable-vim'?: boolean;
90
+ font?: Pango.FontDescription;
91
+ /**
92
+ * Specify a non-default line height for text within the editor.
93
+ * @default 1.000000
94
+ */
95
+ 'line-height'?: number;
96
+ /**
97
+ * Shows the line changes on the left-hand side of the editor (when in LTR direction) for each line in the editor.
98
+ * @default FALSE
99
+ */
100
+ 'show-diagnostics'?: boolean;
101
+ /**
102
+ * Shows the line changes on the left-hand side of the editor (when in LTR direction) for each line in the editor.
103
+ * @default FALSE
104
+ */
105
+ 'show-line-changes'?: boolean;
106
+ /**
107
+ * Shows the line changes on the right-hand side of the editor (when in LTR direction) but as an overview of the entire document.
108
+ * @default FALSE
109
+ */
110
+ 'show-line-changes-overview'?: boolean;
111
+ }
112
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
113
+ export type FoundrySourceViewConstructOnly = GtkSourceViewConstructOnly | GtkAccessibleConstructOnly | GtkAccessibleTextConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkScrollableConstructOnly | 'document';
114
+
115
+ export interface FoundryTerminalProps extends GtkWidgetProps, GtkAccessibleProps, GtkAccessibleTextProps, GtkBuildableProps, GtkConstraintTargetProps, GtkScrollableProps {
116
+ palette?: FoundryGtk.TerminalPalette | null;
117
+ }
118
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
119
+ export type FoundryTerminalConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkAccessibleTextConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkScrollableConstructOnly;
120
+
121
+ // ---------------------------------------------------------------------------
122
+ // The GType-keyed widget map.
123
+ //
124
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
125
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
126
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
127
+ // is the class. None of those is baked in here.
128
+ //
129
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
130
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
131
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
132
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
133
+ // this is what notices when a release adds a candidate.
134
+ // ---------------------------------------------------------------------------
135
+
136
+ export interface Widgets {
137
+ FoundryChangesGutterRenderer: {
138
+ class: FoundryGtk.ChangesGutterRenderer;
139
+ props: FoundryChangesGutterRendererProps;
140
+ signals: FoundryGtk.ChangesGutterRenderer.SignalSignatures;
141
+ constructOnly: FoundryChangesGutterRendererConstructOnly;
142
+ slotCandidates: {};
143
+ };
144
+ FoundryDiagnosticsGutterRenderer: {
145
+ class: FoundryGtk.DiagnosticsGutterRenderer;
146
+ props: FoundryDiagnosticsGutterRendererProps;
147
+ signals: FoundryGtk.DiagnosticsGutterRenderer.SignalSignatures;
148
+ constructOnly: FoundryDiagnosticsGutterRendererConstructOnly;
149
+ slotCandidates: {};
150
+ };
151
+ FoundryGitLanes: {
152
+ class: FoundryGtk.GitLanes;
153
+ props: FoundryGitLanesProps;
154
+ signals: FoundryGtk.GitLanes.SignalSignatures;
155
+ constructOnly: FoundryGitLanesConstructOnly;
156
+ slotCandidates: {};
157
+ };
158
+ FoundryMarkupView: {
159
+ class: FoundryGtk.MarkupView;
160
+ props: FoundryMarkupViewProps;
161
+ signals: FoundryGtk.MarkupView.SignalSignatures;
162
+ constructOnly: FoundryMarkupViewConstructOnly;
163
+ slotCandidates: {};
164
+ };
165
+ FoundrySourceView: {
166
+ class: FoundryGtk.SourceView;
167
+ props: FoundrySourceViewProps;
168
+ signals: FoundryGtk.SourceView.SignalSignatures;
169
+ constructOnly: FoundrySourceViewConstructOnly;
170
+ slotCandidates: {};
171
+ };
172
+ FoundryTerminal: {
173
+ class: FoundryGtk.Terminal;
174
+ props: FoundryTerminalProps;
175
+ signals: FoundryGtk.Terminal.SignalSignatures;
176
+ constructOnly: FoundryTerminalConstructOnly;
177
+ slotCandidates: {};
178
+ };
179
+ }
180
+
181
+ /** Every GType this namespace can create. A consumer derives its own tag map. */
182
+ export type WidgetGType = keyof Widgets;
183
+
184
+ // ---------------------------------------------------------------------------
185
+ // Child holders — the same shape, for objects that CARRY a widget without being one.
186
+ //
187
+ // `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle` descend from
188
+ // `GObject.Object` and hold a widget through `set_child`/`get_child`. A renderer places
189
+ // them exactly like a container, so they belong in the vocabulary; a check asking "is
190
+ // this a widget" must still be able to say no. Hence a sibling table rather than four
191
+ // more rows in `Widgets`: concatenate them when you mean both.
192
+ // ---------------------------------------------------------------------------
193
+
194
+ export interface ChildHolders {
195
+
196
+ }
197
+
198
+ /** Every GType this namespace holds a child in without it being a widget. */
199
+ export type ChildHolderGType = keyof ChildHolders;
200
+
201
+ /** The writable, optional, GObject-keyed property surface of one GType. */
202
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
203
+
204
+ /** The signal table this package already emits, reached by GType. */
205
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
206
+
207
+ /** The instance type — what a `ref`-shaped prop should infer. */
208
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
209
+
210
+ /** Property names that can only be set at construction. */
211
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
212
+
213
+ /** Candidate child slots — see the note above; curation decides. */
214
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
215
+
216
+ /**
217
+ * The same facts as runtime data, for a consumer that CHECKS them.
218
+ *
219
+ * Types are erased, so a spec that asks the installed GTK whether every property
220
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
221
+ * and every nick resolvable through an enum lookup cannot read the interfaces
222
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
223
+ * belongs to the consumer and the DATA belongs here.
224
+ */
225
+ export const PROVENANCE: {
226
+ readonly namespace: string;
227
+ readonly version: string;
228
+ /** The version the LIBRARY states, or null where it states none. Never the namespace's. */
229
+ readonly libraryVersion: string | null;
230
+ readonly childHolders: number;
231
+ readonly droppedBases: readonly string[];
232
+ readonly inlinedBases: readonly string[];
233
+ readonly unsettableProps: readonly string[];
234
+ };
235
+
236
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
237
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
238
+
239
+ /**
240
+ * Declaration GType -> the signals it registers itself, never its parents'.
241
+ *
242
+ * Keyed like `OWN_PROPS`, so both are read at every link of a `DECLS` chain. An
243
+ * abstract base has no `Widgets` row and still owns signals — `GtkWidget` owns 13.
244
+ */
245
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
246
+
247
+ /** Widget GType -> every declaration its members come from, self first. */
248
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
249
+
250
+ /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
251
+ export const CHILD_HOLDERS: readonly string[];
252
+
253
+ /** Enum GType -> the nicks this surface offers. */
254
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
255
+
256
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
257
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
258
+
259
+ /**
260
+ * `Type`, `Type.property` and `Type::signal` -> the release that introduced it.
261
+ *
262
+ * What keeps a runtime cross-check honest across a version gap without an
263
+ * allowlist: a name the installed library lacks is a defect UNLESS the version
264
+ * here is newer than the one running.
265
+ *
266
+ * ALL THREE key shapes, because that test only works for the names it covers. A
267
+ * property-only map leaves a consumer no way to explain a missing SIGNAL, which is
268
+ * a correct vocabulary reported as 18 defects; a member-only map leaves it no way to
269
+ * explain a missing CLASS, and that one fails as a bare
270
+ * `TypeError: can't access property "$gtype", ctor() is undefined` that does not
271
+ * even name the GType.
272
+ *
273
+ * A key is present only where the GIR states a version — sparse by nature (`version`
274
+ * sits on 29 of the 301 classes and interfaces in Gtk-4.0), never inferred.
275
+ */
276
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,51 @@
1
+ // The widget vocabulary of FoundryGtk-1 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: FoundryGtk-1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object
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: 'FoundryGtk',
11
+ version: '1',
12
+ libraryVersion: null,
13
+ childHolders: 0,
14
+ droppedBases: ['GObject.InitiallyUnowned', 'GObject.Object'],
15
+ inlinedBases: [],
16
+ unsettableProps: [],
17
+ };
18
+
19
+ export const OWN_PROPS = {
20
+ FoundryChangesGutterRenderer: ['show-overview'],
21
+ FoundryDiagnosticsGutterRenderer: ['diagnostics'],
22
+ FoundryGitLanes: ['entry'],
23
+ FoundrySourceView: ['document', 'enable-completion', 'enable-vim', 'font', 'line-height', 'show-diagnostics', 'show-line-changes', 'show-line-changes-overview'],
24
+ FoundryTerminal: ['palette'],
25
+ };
26
+
27
+ export const OWN_SIGNALS = {};
28
+
29
+ export const DECLS = {
30
+ FoundryChangesGutterRenderer: ['FoundryChangesGutterRenderer', 'GtkSourceGutterRenderer', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
31
+ FoundryDiagnosticsGutterRenderer: ['FoundryDiagnosticsGutterRenderer', 'GtkSourceGutterRenderer', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
32
+ FoundryGitLanes: ['FoundryGitLanes', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
33
+ FoundryMarkupView: ['FoundryMarkupView', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
34
+ FoundrySourceView: ['FoundrySourceView', 'GtkSourceView', 'GtkTextView', 'GtkWidget', 'GtkAccessible', 'GtkAccessibleText', 'GtkBuildable', 'GtkConstraintTarget', 'GtkScrollable'],
35
+ FoundryTerminal: ['FoundryTerminal', 'GtkWidget', 'GtkAccessible', 'GtkAccessibleText', 'GtkBuildable', 'GtkConstraintTarget', 'GtkScrollable'],
36
+ };
37
+
38
+ // The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
39
+ // and descend from `GObject.Object`. A renderer places them like a container; a check
40
+ // asking "is this a widget" must not count them. Derived from the accessor pair, never
41
+ // from a list — the count is in the provenance line above.
42
+ export const CHILD_HOLDERS = [];
43
+
44
+ export const ENUM_NICKS = {};
45
+
46
+ export const SLOT_CANDIDATES = {};
47
+
48
+ export const SINCE = {
49
+ 'FoundryGitLanes': '1.2',
50
+ 'FoundryGitLanes.entry': '1.2',
51
+ };
package/foundrygtk-1.d.ts CHANGED
@@ -1273,6 +1273,7 @@ export namespace FoundryGtk {
1273
1273
  // Methods
1274
1274
  /**
1275
1275
  * @param filename
1276
+ * @throws GLib.Error
1276
1277
  */
1277
1278
  add_filename(filename: string): number;
1278
1279
 
@@ -1280,6 +1281,7 @@ export namespace FoundryGtk {
1280
1281
  * @param resource
1281
1282
  * @returns the merge id
1282
1283
  * @since 1.4
1284
+ * @throws GLib.Error
1283
1285
  */
1284
1286
  add_resource(resource: string): number;
1285
1287
 
@@ -1414,7 +1416,7 @@ export namespace FoundryGtk {
1414
1416
 
1415
1417
  namespace ShortcutBundle {
1416
1418
  // Signal signatures
1417
- interface SignalSignatures extends GObject.Object.SignalSignatures {}
1419
+ interface SignalSignatures extends GObject.Object.SignalSignatures, Gio.ListModel.SignalSignatures {}
1418
1420
 
1419
1421
  // Constructor properties interface
1420
1422
  interface ConstructorProps<A extends GObject.Object = GObject.Object> extends GObject.Object.ConstructorProps, Gio.ListModel.ConstructorProps {}
@@ -1463,6 +1465,7 @@ export namespace FoundryGtk {
1463
1465
  /**
1464
1466
  * @param shortcut_id
1465
1467
  * @param accelerator
1468
+ * @throws GLib.Error
1466
1469
  */
1467
1470
  override(shortcut_id: string, accelerator: string): boolean;
1468
1471
 
@@ -1473,6 +1476,7 @@ export namespace FoundryGtk {
1473
1476
 
1474
1477
  /**
1475
1478
  * @param file
1479
+ * @throws GLib.Error
1476
1480
  */
1477
1481
  parse(file: Gio.File): boolean;
1478
1482
 
@@ -1591,7 +1595,7 @@ export namespace FoundryGtk {
1591
1595
 
1592
1596
  namespace ShortcutManager {
1593
1597
  // Signal signatures
1594
- interface SignalSignatures extends Foundry.Service.SignalSignatures {
1598
+ interface SignalSignatures extends Foundry.Service.SignalSignatures, Gio.ListModel.SignalSignatures {
1595
1599
  "notify::context": (pspec: GObject.ParamSpec) => void;
1596
1600
  }
1597
1601
 
@@ -1782,7 +1786,7 @@ export namespace FoundryGtk {
1782
1786
  * @detailed
1783
1787
  * @run-last
1784
1788
  */
1785
- "accel-changed": (arg0: string, arg1: string | null) => void;
1789
+ "accel-changed": (action: string, accel: string | null) => void;
1786
1790
  "notify::model": (pspec: GObject.ParamSpec) => void;
1787
1791
  /**
1788
1792
  * This signal is emitted when an action is determined to have been changed
@@ -1791,8 +1795,8 @@ export namespace FoundryGtk {
1791
1795
  * @detailed
1792
1796
  * @run-last
1793
1797
  */
1794
- "accel-changed::model": (arg0: string, arg1: string | null) => void;
1795
- [key: `accel-changed::${string}`]: (arg0: string, arg1: string | null) => void;
1798
+ "accel-changed::model": (action: string, accel: string | null) => void;
1799
+ [key: `accel-changed::${string}`]: (action: string, accel: string | null) => void;
1796
1800
  }
1797
1801
 
1798
1802
  // Constructor properties interface
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/foundrygtk-1",
3
- "version": "4.4.0",
3
+ "version": "4.6.0",
4
4
  "description": "GJS TypeScript type definitions for FoundryGtk-1",
5
5
  "type": "module",
6
6
  "module": "foundrygtk-1.js",
@@ -16,10 +16,10 @@
16
16
  "import": "./foundrygtk-1-import.js",
17
17
  "default": "./foundrygtk-1-import.js"
18
18
  },
19
- "./surface": {
20
- "types": "./foundrygtk-1-surface.d.ts",
21
- "import": "./foundrygtk-1-surface.js",
22
- "default": "./foundrygtk-1-surface.js"
19
+ "./vocabulary": {
20
+ "types": "./foundrygtk-1-vocabulary.d.ts",
21
+ "import": "./foundrygtk-1-vocabulary.js",
22
+ "default": "./foundrygtk-1-vocabulary.js"
23
23
  },
24
24
  "./foundrygtk-1": {
25
25
  "types": "./foundrygtk-1.d.ts",
@@ -36,27 +36,27 @@
36
36
  "test": "tsc --project tsconfig.json"
37
37
  },
38
38
  "dependencies": {
39
- "@girs/gjs": "^4.4.0",
40
- "@girs/peas-2": "^4.4.0",
41
- "@girs/gio-2.0": "^4.4.0",
42
- "@girs/gobject-2.0": "^4.4.0",
43
- "@girs/glib-2.0": "^4.4.0",
44
- "@girs/gmodule-2.0": "^4.4.0",
45
- "@girs/json-1.0": "^4.4.0",
46
- "@girs/gtksource-5": "^4.4.0",
47
- "@girs/gtk-4.0": "^4.4.0",
48
- "@girs/gsk-4.0": "^4.4.0",
49
- "@girs/graphene-1.0": "^4.4.0",
50
- "@girs/gdk-4.0": "^4.4.0",
51
- "@girs/cairo-1.0": "^4.4.0",
52
- "@girs/pangocairo-1.0": "^4.4.0",
53
- "@girs/pango-1.0": "^4.4.0",
54
- "@girs/harfbuzz-0.0": "^4.4.0",
55
- "@girs/freetype2-2.0": "^4.4.0",
56
- "@girs/gdkpixbuf-2.0": "^4.4.0",
57
- "@girs/foundry-1": "^4.4.0",
58
- "@girs/dex-1": "^4.4.0",
59
- "@girs/giounix-2.0": "^4.4.0" },
39
+ "@girs/gjs": "^4.6.0",
40
+ "@girs/peas-2": "^4.6.0",
41
+ "@girs/gio-2.0": "^4.6.0",
42
+ "@girs/gobject-2.0": "^4.6.0",
43
+ "@girs/glib-2.0": "^4.6.0",
44
+ "@girs/gmodule-2.0": "^4.6.0",
45
+ "@girs/json-1.0": "^4.6.0",
46
+ "@girs/gtksource-5": "^4.6.0",
47
+ "@girs/gtk-4.0": "^4.6.0",
48
+ "@girs/gsk-4.0": "^4.6.0",
49
+ "@girs/graphene-1.0": "^4.6.0",
50
+ "@girs/gdk-4.0": "^4.6.0",
51
+ "@girs/cairo-1.0": "^4.6.0",
52
+ "@girs/pangocairo-1.0": "^4.6.0",
53
+ "@girs/pango-1.0": "^4.6.0",
54
+ "@girs/harfbuzz-0.0": "^4.6.0",
55
+ "@girs/freetype2-2.0": "^4.6.0",
56
+ "@girs/gdkpixbuf-2.0": "^4.6.0",
57
+ "@girs/foundry-1": "^4.6.0",
58
+ "@girs/dex-1": "^4.6.0",
59
+ "@girs/giounix-2.0": "^4.6.0" },
60
60
  "devDependencies": {
61
61
  "typescript": "*"
62
62
  },
package/tsconfig.json CHANGED
@@ -83,7 +83,7 @@
83
83
  ]
84
84
  }
85
85
  },
86
- "include": ["./foundrygtk-1.d.ts","./foundrygtk-1-surface.d.ts"]
86
+ "include": ["./foundrygtk-1.d.ts","./foundrygtk-1-vocabulary.d.ts"]
87
87
  }
88
88
 
89
89