@girs/amtk-5 5.1.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/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.1.0.
7
+ GJS TypeScript type definitions for Amtk-5 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.
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * The GIR-derived widget VOCABULARY for Amtk-5.
3
3
  *
4
- * GENERATED — do not edit. Provenance: Amtk-5 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
4
+ * GENERATED — do not edit. Provenance: Amtk-5 — dropped empty base(s): Atk.ImplementorIface
5
5
  *
6
- * 1 concrete widgets, 1 declarations, 0 enum nick unions, 0 slot candidates.
6
+ * 6 instantiable GTypes (of which 1 concrete widgets), 6 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,8 @@
25
25
  */
26
26
 
27
27
  import type Amtk from './amtk-5.js';
28
+ import type Gtk from '@girs/gtk-3.0';
29
+ import type { GInitiallyUnownedConstructOnly, GInitiallyUnownedProps, GObjectConstructOnly, GObjectProps } from '@girs/gobject-2.0/vocabulary';
28
30
  import type { GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkContainerConstructOnly, GtkContainerProps, GtkScrolledWindowConstructOnly, GtkScrolledWindowProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-3.0/vocabulary';
29
31
 
30
32
  // ---------------------------------------------------------------------------
@@ -49,6 +51,57 @@ import type { GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBu
49
51
  // GIR keeps them once, on the interface.
50
52
  // ---------------------------------------------------------------------------
51
53
 
54
+ export interface AmtkActionInfoCentralStoreProps extends GObjectProps {
55
+ }
56
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
57
+ export type AmtkActionInfoCentralStoreConstructOnly = GObjectConstructOnly;
58
+
59
+ export interface AmtkActionInfoStoreProps extends GObjectProps {
60
+ }
61
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
62
+ export type AmtkActionInfoStoreConstructOnly = GObjectConstructOnly;
63
+
64
+ export interface AmtkApplicationWindowProps extends GObjectProps {
65
+ /**
66
+ * The #GtkApplicationWindow.
67
+ * @since 2.0
68
+ */
69
+ 'application-window'?: Gtk.ApplicationWindow;
70
+ /**
71
+ * The #GtkStatusbar.
72
+ * @since 2.0
73
+ */
74
+ statusbar?: Gtk.Statusbar | null;
75
+ }
76
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
77
+ export type AmtkApplicationWindowConstructOnly = GObjectConstructOnly | 'application-window';
78
+
79
+ export interface AmtkFactoryProps extends GObjectProps {
80
+ /**
81
+ * The associated #GtkApplication (it is optional, it can be %NULL).
82
+ * @since 3.0
83
+ */
84
+ application?: Gtk.Application | null;
85
+ /**
86
+ * The default #AmtkFactoryFlags.
87
+ * @since 3.0
88
+ * @default AMTK_FACTORY_FLAGS_NONE
89
+ */
90
+ 'default-flags'?: number;
91
+ }
92
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
93
+ export type AmtkFactoryConstructOnly = GObjectConstructOnly | 'application';
94
+
95
+ export interface AmtkMenuShellProps extends GObjectProps {
96
+ /**
97
+ * The #GtkMenuShell.
98
+ * @since 2.0
99
+ */
100
+ 'menu-shell'?: Gtk.MenuShell;
101
+ }
102
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
103
+ export type AmtkMenuShellConstructOnly = GObjectConstructOnly | 'menu-shell';
104
+
52
105
  export interface AmtkTreeViewScrolledWindowSizingProps extends GtkScrolledWindowProps, GtkBuildableProps {
53
106
  /**
54
107
  * Whether to take the #GdkMonitor size into account as a maximum width and height to apply.
@@ -85,7 +138,11 @@ export interface Widgets {
85
138
  };
86
139
  }
87
140
 
88
- /** Every GType this namespace can create. A consumer derives its own tag map. */
141
+ /**
142
+ * Every GType this namespace can create AND put on screen. A consumer derives its own
143
+ * tag map. For everything a UI file can instantiate — layout managers, event
144
+ * controllers, cell renderers, `GtkSizeGroup` — read `DECLS` below.
145
+ */
89
146
  export type WidgetGType = keyof Widgets;
90
147
 
91
148
  // ---------------------------------------------------------------------------
@@ -137,7 +194,38 @@ export const PROVENANCE: {
137
194
  readonly childHolders: number;
138
195
  readonly droppedBases: readonly string[];
139
196
  readonly inlinedBases: readonly string[];
197
+ /** `<decl>.<prop>` for every property printed `never` because TypeScript has no value for it. */
140
198
  readonly unsettableProps: readonly string[];
199
+ /**
200
+ * `<decl>.<prop>: <Ns>.<Name>` for every property printed `never` because the model
201
+ * could not resolve its type across a namespace boundary — two independently released
202
+ * GIRs disagreeing, which is what the main emitter answers `never` for as well.
203
+ */
204
+ readonly unresolvedProps: readonly string[];
205
+ /**
206
+ * `c:identifier-prefixes` from the GIR, verbatim and in order — `['G']` for Gio.
207
+ *
208
+ * The C prefix a type REFERENCE needs: resolving `Gio.Icon` means producing `GIcon`,
209
+ * and nothing else in this package states that `Gio` spells itself `G`. Carried rather
210
+ * than derived because GIR carries it, and a derivation over the `DECLS` keys is wrong
211
+ * wherever the C prefix is not a prefix of the type NAMES: gdkx11-4.0 and gdkwayland-4.0
212
+ * both state `Gdk` while every key they declare begins `GdkX11`/`GdkWayland`.
213
+ *
214
+ * Empty where the GIR states none — 17 of the 627 emitting namespaces — because
215
+ * inventing the namespace name there is a confident wrong answer in place of a missing
216
+ * one. A LIST because 20 of them state more than one, which no single string expresses.
217
+ */
218
+ readonly identifierPrefixes: readonly string[];
219
+ /**
220
+ * Sibling vocabularies this one's DECLARATIONS come from, as import specifiers.
221
+ *
222
+ * A chain link with no `OWN_PROPS` row is ambiguous on its own — `GtkSeparator` has no
223
+ * settable property, `GApplication` has its properties in another package — and this
224
+ * list is what tells the two apart. Enum and bitfield NUMBERS are not here: those are
225
+ * carried in this file, because a `PROP_ENUMS` row naming a foreign GType gives a
226
+ * consumer nothing to load and a `.ui` file using the property never names its owner.
227
+ */
228
+ readonly requiredVocabularies: readonly string[];
141
229
  };
142
230
 
143
231
  /** Declaration GType -> its own settable properties, as GObject registered them. */
@@ -151,7 +239,17 @@ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
151
239
  */
152
240
  export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
153
241
 
154
- /** Widget GType -> every declaration its members come from, self first. */
242
+ /**
243
+ * Instantiable GType -> every declaration its members come from, self first.
244
+ *
245
+ * The key set is what a UI description file can NAME: every registered, non-abstract
246
+ * class this namespace declares. GtkBuilder resolves a `<object class="…">` through
247
+ * `g_type_from_name`, which knows nothing about widgets, so this is wider than
248
+ * `Widgets` by design — `GtkSizeGroup`, `GtkTextTag`, every `GtkEventController`
249
+ * and every `GtkCellRenderer` are here and are not widgets.
250
+ *
251
+ * `Widgets` and `CHILD_HOLDERS` are the narrower questions and answer them unchanged.
252
+ */
155
253
  export const DECLS: Readonly<Record<string, readonly string[]>>;
156
254
 
157
255
  /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
@@ -163,8 +261,8 @@ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
163
261
  /**
164
262
  * `<enum GType>.<nick>` -> the integer GObject registers for it, from GIR's `value`.
165
263
  *
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
264
+ * Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the 137 enums a
265
+ * GTK 4 vocabulary carries -- 112 in Gtk-4.0 and 25 in Adw-1: `GtkResponseType` runs -1 to -11, `GtkTextWindowType` starts
168
266
  * at 1, `GtkOrdering` and `GtkConstraintRelation` are -1/0/1, `GtkAlign` has two names
169
267
  * on one value, and `GtkConstraintStrength.required` is 1001001000 where counting says 0.
170
268
  *
@@ -202,10 +300,11 @@ export const ENUM_VALUES_UNREADABLE: Readonly<Record<string, string>>;
202
300
  *
203
301
  * `ENUM_NICKS` carries no bitfield, because GObject cannot resolve a nick SET; that says
204
302
  * 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.
303
+ * 23 settable properties in Gtk-4.0 and Adw-1 are bitfield-typed and are declared bare
304
+ * `number` -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`, `AdwTabView:shortcuts`,
305
+ * `GtkDropTarget:actions` among them. Counting is worst here: 119 of the 156 Gtk-4.0
306
+ * bitfield members this vocabulary carries disagree with their declaration position,
307
+ * against 29 of 672 enumeration members.
209
308
  *
210
309
  * Combine with `|` as GObject does. There is no nick table to pair this with, so a name
211
310
  * here is resolvable and a SET still is not.
@@ -229,7 +328,7 @@ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
229
328
  *
230
329
  * The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
231
330
  * 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
331
+ * `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 83 of the 909
233
332
  * entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
234
333
  * owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
235
334
  * resolves against SOME module.
@@ -1,6 +1,6 @@
1
1
  // The widget vocabulary of Amtk-5 as runtime data.
2
2
  //
3
- // GENERATED — do not edit. Provenance: Amtk-5 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface
3
+ // GENERATED — do not edit. Provenance: Amtk-5 — dropped empty base(s): 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,25 +11,46 @@ export const PROVENANCE = {
11
11
  version: '5',
12
12
  libraryVersion: null,
13
13
  childHolders: 0,
14
- droppedBases: ['GObject.InitiallyUnowned', 'GObject.Object', 'Atk.ImplementorIface'],
14
+ droppedBases: ['Atk.ImplementorIface'],
15
15
  inlinedBases: [],
16
16
  unsettableProps: [],
17
+ unresolvedProps: [],
18
+ identifierPrefixes: ['Amtk'],
19
+ requiredVocabularies: ['@girs/gobject-2.0/vocabulary', '@girs/gtk-3.0/vocabulary'],
17
20
  };
18
21
 
19
22
  export const OWN_PROPS = {
23
+ AmtkApplicationWindow: ['application-window', 'statusbar'],
24
+ AmtkFactory: ['application', 'default-flags'],
25
+ AmtkMenuShell: ['menu-shell'],
20
26
  AmtkTreeViewScrolledWindowSizing: ['monitor-limit-enabled'],
21
27
  };
22
28
 
23
- export const OWN_SIGNALS = {};
29
+ export const OWN_SIGNALS = {
30
+ AmtkMenuShell: ['menu-item-deselected', 'menu-item-selected'],
31
+ };
24
32
 
33
+ // Every GType this namespace can INSTANTIATE -> the declarations its members come from.
34
+ //
35
+ // The key set is what a UI description file can name: a registered, non-abstract class.
36
+ // Not "every widget" — GtkBuilder resolves a name through `g_type_from_name`, which knows
37
+ // nothing about widgets, and a `.ui` file is full of `GtkSizeGroup`, `GtkTextTag`,
38
+ // `GtkEventController*` and `GtkCellRenderer*`. Use `Widgets` and `CHILD_HOLDERS`
39
+ // below for the narrower questions; they did not move.
25
40
  export const DECLS = {
26
- AmtkTreeViewScrolledWindowSizing: ['AmtkTreeViewScrolledWindowSizing', 'GtkScrolledWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
41
+ AmtkActionInfoCentralStore: ['AmtkActionInfoCentralStore', 'GObject'],
42
+ AmtkActionInfoStore: ['AmtkActionInfoStore', 'GObject'],
43
+ AmtkApplicationWindow: ['AmtkApplicationWindow', 'GObject'],
44
+ AmtkFactory: ['AmtkFactory', 'GObject'],
45
+ AmtkMenuShell: ['AmtkMenuShell', 'GObject'],
46
+ AmtkTreeViewScrolledWindowSizing: ['AmtkTreeViewScrolledWindowSizing', 'GtkScrolledWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GInitiallyUnowned', 'GObject', 'GtkBuildable'],
27
47
  };
28
48
 
29
- // The GTypes above that are NOT widgets: they hold one through `set_child`/`get_child`
30
- // and descend from `GObject.Object`. A renderer places them like a container; a check
31
- // asking "is this a widget" must not count them. Derived from the accessor pair, never
32
- // from a list — the count is in the provenance line above.
49
+ // The GTypes above that ARE widgets are the `Widgets` map in the sibling `.d.ts`; these
50
+ // are the ones that merely HOLD one, through `set_child`/`get_child`, descending from
51
+ // `GObject.Object`. A renderer places them like a container; a check asking "is this a
52
+ // widget" must not count them. Derived from the accessor pair, never from a list — the
53
+ // count is in the provenance line above.
33
54
  export const CHILD_HOLDERS = [];
34
55
 
35
56
  export const ENUM_NICKS = {};
@@ -39,7 +60,7 @@ export const ENUM_NICKS = {};
39
60
  // It ships because position in `ENUM_NICKS` is not the value and a consumer with no
40
61
  // typelib has no other way to learn it: a surface without GI still has to hand GObject an
41
62
  // integer. The alternative a consumer reaches for first is counting, and counting is wrong
42
- // on 6 of the 129 enums a GTK 4 vocabulary carries (104 in Gtk-4.0, 25 in Adw-1) --
63
+ // on 6 of the 137 enums a GTK 4 vocabulary carries (112 in Gtk-4.0, 25 in Adw-1) --
43
64
  // `GtkResponseType` runs -1 down to
44
65
  // -11, `GtkTextWindowType` starts at 1, and `GtkConstraintStrength.required` is
45
66
  // 1001001000 where counting answers 0.
@@ -76,11 +97,12 @@ export const ENUM_VALUES_UNREADABLE = {};
76
97
  // The number behind each member of a registered BITFIELD, keyed the same way.
77
98
  //
78
99
  // `ENUM_NICKS` refuses a bitfield because GObject cannot resolve a nick SET, and that
79
- // reason says nothing about one member's number. 21 writable widget properties in Gtk-4.0
80
- // and Adw-1 are bitfield-typed -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`,
81
- // `AdwTabView:shortcuts`, ... -- and they are typed bare `number`, so a host without GI
82
- // has nothing to compute one from. Counting is worst exactly here: 95 of 121 Gtk-4.0
83
- // bitfield members disagree with their position, against 29 of 685 enumeration members.
100
+ // reason says nothing about one member's number. 23 settable properties in Gtk-4.0 and
101
+ // Adw-1 are bitfield-typed -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`,
102
+ // `AdwTabView:shortcuts`, `GtkDropTarget:actions`, ... -- and they are typed bare
103
+ // `number`, so a host without GI has nothing to compute one from. Counting is worst
104
+ // exactly here: 119 of the 156 Gtk-4.0 bitfield members this vocabulary carries disagree
105
+ // with their declaration position, against 29 of 672 enumeration members.
84
106
  //
85
107
  // A table of its own rather than more rows in `ENUM_VALUES`, so that "every nick in
86
108
  // `ENUM_NICKS` has a number or a declared reason" stays a claim about one set.
@@ -112,9 +134,11 @@ export const FLAG_VALUES_UNREADABLE = {};
112
134
  // one are both entries a consumer would resolve wrongly, so neither is written.
113
135
  //
114
136
  // A GType named here has numbers in SOME vocabulary, not necessarily this one: the namespace
115
- // that OWNS an enum publishes it, so 57 of the 438 entries a full run emits want the owner's
137
+ // that OWNS an enum publishes it, so 83 of the 909 entries a full run emits want the owner's
116
138
  // vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
117
- export const PROP_ENUMS = {};
139
+ export const PROP_ENUMS = {
140
+ 'AmtkFactory.default-flags': 'AmtkFactoryFlags',
141
+ };
118
142
 
119
143
  // `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
120
144
  //
@@ -144,5 +168,12 @@ export const ARIA_VALUE_ENUMS = {};
144
168
  export const SLOT_CANDIDATES = {};
145
169
 
146
170
  export const SINCE = {
171
+ 'AmtkApplicationWindow.application-window': '2.0',
172
+ 'AmtkApplicationWindow.statusbar': '2.0',
173
+ 'AmtkFactory.application': '3.0',
174
+ 'AmtkFactory.default-flags': '3.0',
175
+ 'AmtkMenuShell.menu-shell': '2.0',
176
+ 'AmtkMenuShell::menu-item-deselected': '2.0',
177
+ 'AmtkMenuShell::menu-item-selected': '2.0',
147
178
  'AmtkTreeViewScrolledWindowSizing.monitor-limit-enabled': '5.10',
148
179
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/amtk-5",
3
- "version": "5.1.0",
3
+ "version": "5.3.0",
4
4
  "description": "GJS TypeScript type definitions for Amtk-5",
5
5
  "type": "module",
6
6
  "module": "amtk-5.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.3.0",
40
+ "@girs/gtk-3.0": "^5.3.0",
41
+ "@girs/xlib-2.0": "^5.3.0",
42
+ "@girs/gdk-3.0": "^5.3.0",
43
+ "@girs/cairo-1.0": "^5.3.0",
44
+ "@girs/gobject-2.0": "^5.3.0",
45
+ "@girs/glib-2.0": "^5.3.0",
46
+ "@girs/pango-1.0": "^5.3.0",
47
+ "@girs/harfbuzz-0.0": "^5.3.0",
48
+ "@girs/freetype2-2.0": "^5.3.0",
49
+ "@girs/gio-2.0": "^5.3.0",
50
+ "@girs/gmodule-2.0": "^5.3.0",
51
+ "@girs/gdkpixbuf-2.0": "^5.3.0",
52
+ "@girs/atk-1.0": "^5.3.0" },
53
53
  "devDependencies": {
54
54
  "typescript": "*"
55
55
  },