@girs/amtk-5 5.1.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  ![version](https://img.shields.io/npm/v/@girs/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.2.0.
8
8
 
9
9
  This package contains type declarations only. It ships no runtime code, so it adds
10
10
  nothing to your program and works with any bundler or none at all.
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * The GIR-derived widget VOCABULARY for 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): GObject.Object GObject.InitiallyUnowned 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,7 @@
25
25
  */
26
26
 
27
27
  import type Amtk from './amtk-5.js';
28
+ import type Gtk from '@girs/gtk-3.0';
28
29
  import type { GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkContainerConstructOnly, GtkContainerProps, GtkScrolledWindowConstructOnly, GtkScrolledWindowProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-3.0/vocabulary';
29
30
 
30
31
  // ---------------------------------------------------------------------------
@@ -49,6 +50,57 @@ import type { GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBu
49
50
  // GIR keeps them once, on the interface.
50
51
  // ---------------------------------------------------------------------------
51
52
 
53
+ export interface AmtkActionInfoCentralStoreProps {
54
+ }
55
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
56
+ export type AmtkActionInfoCentralStoreConstructOnly = never;
57
+
58
+ export interface AmtkActionInfoStoreProps {
59
+ }
60
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
61
+ export type AmtkActionInfoStoreConstructOnly = never;
62
+
63
+ export interface AmtkApplicationWindowProps {
64
+ /**
65
+ * The #GtkApplicationWindow.
66
+ * @since 2.0
67
+ */
68
+ 'application-window'?: Gtk.ApplicationWindow;
69
+ /**
70
+ * The #GtkStatusbar.
71
+ * @since 2.0
72
+ */
73
+ statusbar?: Gtk.Statusbar | null;
74
+ }
75
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
76
+ export type AmtkApplicationWindowConstructOnly = 'application-window';
77
+
78
+ export interface AmtkFactoryProps {
79
+ /**
80
+ * The associated #GtkApplication (it is optional, it can be %NULL).
81
+ * @since 3.0
82
+ */
83
+ application?: Gtk.Application | null;
84
+ /**
85
+ * The default #AmtkFactoryFlags.
86
+ * @since 3.0
87
+ * @default AMTK_FACTORY_FLAGS_NONE
88
+ */
89
+ 'default-flags'?: number;
90
+ }
91
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
92
+ export type AmtkFactoryConstructOnly = 'application';
93
+
94
+ export interface AmtkMenuShellProps {
95
+ /**
96
+ * The #GtkMenuShell.
97
+ * @since 2.0
98
+ */
99
+ 'menu-shell'?: Gtk.MenuShell;
100
+ }
101
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
102
+ export type AmtkMenuShellConstructOnly = 'menu-shell';
103
+
52
104
  export interface AmtkTreeViewScrolledWindowSizingProps extends GtkScrolledWindowProps, GtkBuildableProps {
53
105
  /**
54
106
  * Whether to take the #GdkMonitor size into account as a maximum width and height to apply.
@@ -85,7 +137,11 @@ export interface Widgets {
85
137
  };
86
138
  }
87
139
 
88
- /** Every GType this namespace can create. A consumer derives its own tag map. */
140
+ /**
141
+ * Every GType this namespace can create AND put on screen. A consumer derives its own
142
+ * tag map. For everything a UI file can instantiate — layout managers, event
143
+ * controllers, cell renderers, `GtkSizeGroup` — read `DECLS` below.
144
+ */
89
145
  export type WidgetGType = keyof Widgets;
90
146
 
91
147
  // ---------------------------------------------------------------------------
@@ -137,7 +193,14 @@ export const PROVENANCE: {
137
193
  readonly childHolders: number;
138
194
  readonly droppedBases: readonly string[];
139
195
  readonly inlinedBases: readonly string[];
196
+ /** `<decl>.<prop>` for every property printed `never` because TypeScript has no value for it. */
140
197
  readonly unsettableProps: readonly string[];
198
+ /**
199
+ * `<decl>.<prop>: <Ns>.<Name>` for every property printed `never` because the model
200
+ * could not resolve its type across a namespace boundary — two independently released
201
+ * GIRs disagreeing, which is what the main emitter answers `never` for as well.
202
+ */
203
+ readonly unresolvedProps: readonly string[];
141
204
  };
142
205
 
143
206
  /** Declaration GType -> its own settable properties, as GObject registered them. */
@@ -151,7 +214,17 @@ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
151
214
  */
152
215
  export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
153
216
 
154
- /** Widget GType -> every declaration its members come from, self first. */
217
+ /**
218
+ * Instantiable GType -> every declaration its members come from, self first.
219
+ *
220
+ * The key set is what a UI description file can NAME: every registered, non-abstract
221
+ * class this namespace declares. GtkBuilder resolves a `<object class="…">` through
222
+ * `g_type_from_name`, which knows nothing about widgets, so this is wider than
223
+ * `Widgets` by design — `GtkSizeGroup`, `GtkTextTag`, every `GtkEventController`
224
+ * and every `GtkCellRenderer` are here and are not widgets.
225
+ *
226
+ * `Widgets` and `CHILD_HOLDERS` are the narrower questions and answer them unchanged.
227
+ */
155
228
  export const DECLS: Readonly<Record<string, readonly string[]>>;
156
229
 
157
230
  /** The GTypes in `DECLS` that hold a widget without being one — see `ChildHolders`. */
@@ -163,8 +236,8 @@ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
163
236
  /**
164
237
  * `<enum GType>.<nick>` -> the integer GObject registers for it, from GIR's `value`.
165
238
  *
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
239
+ * Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the 137 enums a
240
+ * GTK 4 vocabulary carries -- 112 in Gtk-4.0 and 25 in Adw-1: `GtkResponseType` runs -1 to -11, `GtkTextWindowType` starts
168
241
  * at 1, `GtkOrdering` and `GtkConstraintRelation` are -1/0/1, `GtkAlign` has two names
169
242
  * on one value, and `GtkConstraintStrength.required` is 1001001000 where counting says 0.
170
243
  *
@@ -202,10 +275,11 @@ export const ENUM_VALUES_UNREADABLE: Readonly<Record<string, string>>;
202
275
  *
203
276
  * `ENUM_NICKS` carries no bitfield, because GObject cannot resolve a nick SET; that says
204
277
  * 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.
278
+ * 23 settable properties in Gtk-4.0 and Adw-1 are bitfield-typed and are declared bare
279
+ * `number` -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`, `AdwTabView:shortcuts`,
280
+ * `GtkDropTarget:actions` among them. Counting is worst here: 119 of the 156 Gtk-4.0
281
+ * bitfield members this vocabulary carries disagree with their declaration position,
282
+ * against 29 of 672 enumeration members.
209
283
  *
210
284
  * Combine with `|` as GObject does. There is no nick table to pair this with, so a name
211
285
  * here is resolvable and a SET still is not.
@@ -229,7 +303,7 @@ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
229
303
  *
230
304
  * The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
231
305
  * 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
306
+ * `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 83 of the 909
233
307
  * entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
234
308
  * owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
235
309
  * 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): GObject.Object GObject.InitiallyUnowned Atk.ImplementorIface
4
4
  //
5
5
  // The type half of this subpath is the sibling `.d.ts`. This file exists because
6
6
  // types are erased: a consumer that wants to ask the installed library whether every
@@ -11,25 +11,44 @@ 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: ['GObject.Object', 'GObject.InitiallyUnowned', 'Atk.ImplementorIface'],
15
15
  inlinedBases: [],
16
16
  unsettableProps: [],
17
+ unresolvedProps: [],
17
18
  };
18
19
 
19
20
  export const OWN_PROPS = {
21
+ AmtkApplicationWindow: ['application-window', 'statusbar'],
22
+ AmtkFactory: ['application', 'default-flags'],
23
+ AmtkMenuShell: ['menu-shell'],
20
24
  AmtkTreeViewScrolledWindowSizing: ['monitor-limit-enabled'],
21
25
  };
22
26
 
23
- export const OWN_SIGNALS = {};
27
+ export const OWN_SIGNALS = {
28
+ AmtkMenuShell: ['menu-item-deselected', 'menu-item-selected'],
29
+ };
24
30
 
31
+ // Every GType this namespace can INSTANTIATE -> the declarations its members come from.
32
+ //
33
+ // The key set is what a UI description file can name: a registered, non-abstract class.
34
+ // Not "every widget" — GtkBuilder resolves a name through `g_type_from_name`, which knows
35
+ // nothing about widgets, and a `.ui` file is full of `GtkSizeGroup`, `GtkTextTag`,
36
+ // `GtkEventController*` and `GtkCellRenderer*`. Use `Widgets` and `CHILD_HOLDERS`
37
+ // below for the narrower questions; they did not move.
25
38
  export const DECLS = {
39
+ AmtkActionInfoCentralStore: ['AmtkActionInfoCentralStore'],
40
+ AmtkActionInfoStore: ['AmtkActionInfoStore'],
41
+ AmtkApplicationWindow: ['AmtkApplicationWindow'],
42
+ AmtkFactory: ['AmtkFactory'],
43
+ AmtkMenuShell: ['AmtkMenuShell'],
26
44
  AmtkTreeViewScrolledWindowSizing: ['AmtkTreeViewScrolledWindowSizing', 'GtkScrolledWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
27
45
  };
28
46
 
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.
47
+ // The GTypes above that ARE widgets are the `Widgets` map in the sibling `.d.ts`; these
48
+ // are the ones that merely HOLD one, through `set_child`/`get_child`, descending from
49
+ // `GObject.Object`. A renderer places them like a container; a check asking "is this a
50
+ // widget" must not count them. Derived from the accessor pair, never from a list — the
51
+ // count is in the provenance line above.
33
52
  export const CHILD_HOLDERS = [];
34
53
 
35
54
  export const ENUM_NICKS = {};
@@ -39,7 +58,7 @@ export const ENUM_NICKS = {};
39
58
  // It ships because position in `ENUM_NICKS` is not the value and a consumer with no
40
59
  // typelib has no other way to learn it: a surface without GI still has to hand GObject an
41
60
  // 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) --
61
+ // on 6 of the 137 enums a GTK 4 vocabulary carries (112 in Gtk-4.0, 25 in Adw-1) --
43
62
  // `GtkResponseType` runs -1 down to
44
63
  // -11, `GtkTextWindowType` starts at 1, and `GtkConstraintStrength.required` is
45
64
  // 1001001000 where counting answers 0.
@@ -76,11 +95,12 @@ export const ENUM_VALUES_UNREADABLE = {};
76
95
  // The number behind each member of a registered BITFIELD, keyed the same way.
77
96
  //
78
97
  // `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.
98
+ // reason says nothing about one member's number. 23 settable properties in Gtk-4.0 and
99
+ // Adw-1 are bitfield-typed -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`,
100
+ // `AdwTabView:shortcuts`, `GtkDropTarget:actions`, ... -- and they are typed bare
101
+ // `number`, so a host without GI has nothing to compute one from. Counting is worst
102
+ // exactly here: 119 of the 156 Gtk-4.0 bitfield members this vocabulary carries disagree
103
+ // with their declaration position, against 29 of 672 enumeration members.
84
104
  //
85
105
  // A table of its own rather than more rows in `ENUM_VALUES`, so that "every nick in
86
106
  // `ENUM_NICKS` has a number or a declared reason" stays a claim about one set.
@@ -112,9 +132,11 @@ export const FLAG_VALUES_UNREADABLE = {};
112
132
  // one are both entries a consumer would resolve wrongly, so neither is written.
113
133
  //
114
134
  // 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
135
+ // that OWNS an enum publishes it, so 83 of the 909 entries a full run emits want the owner's
116
136
  // vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
117
- export const PROP_ENUMS = {};
137
+ export const PROP_ENUMS = {
138
+ 'AmtkFactory.default-flags': 'AmtkFactoryFlags',
139
+ };
118
140
 
119
141
  // `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
120
142
  //
@@ -144,5 +166,12 @@ export const ARIA_VALUE_ENUMS = {};
144
166
  export const SLOT_CANDIDATES = {};
145
167
 
146
168
  export const SINCE = {
169
+ 'AmtkApplicationWindow.application-window': '2.0',
170
+ 'AmtkApplicationWindow.statusbar': '2.0',
171
+ 'AmtkFactory.application': '3.0',
172
+ 'AmtkFactory.default-flags': '3.0',
173
+ 'AmtkMenuShell.menu-shell': '2.0',
174
+ 'AmtkMenuShell::menu-item-deselected': '2.0',
175
+ 'AmtkMenuShell::menu-item-selected': '2.0',
147
176
  'AmtkTreeViewScrolledWindowSizing.monitor-limit-enabled': '5.10',
148
177
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/amtk-5",
3
- "version": "5.1.0",
3
+ "version": "5.2.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.2.0",
40
+ "@girs/gtk-3.0": "^5.2.0",
41
+ "@girs/xlib-2.0": "^5.2.0",
42
+ "@girs/gdk-3.0": "^5.2.0",
43
+ "@girs/cairo-1.0": "^5.2.0",
44
+ "@girs/gobject-2.0": "^5.2.0",
45
+ "@girs/glib-2.0": "^5.2.0",
46
+ "@girs/pango-1.0": "^5.2.0",
47
+ "@girs/harfbuzz-0.0": "^5.2.0",
48
+ "@girs/freetype2-2.0": "^5.2.0",
49
+ "@girs/gio-2.0": "^5.2.0",
50
+ "@girs/gmodule-2.0": "^5.2.0",
51
+ "@girs/gdkpixbuf-2.0": "^5.2.0",
52
+ "@girs/atk-1.0": "^5.2.0" },
53
53
  "devDependencies": {
54
54
  "typescript": "*"
55
55
  },