@girs/amtk-5 5.2.0 → 5.4.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.2.0.
7
+ GJS TypeScript type definitions for Amtk-5 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v5.4.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,7 +1,7 @@
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.Object GObject.InitiallyUnowned Atk.ImplementorIface
4
+ * GENERATED — do not edit. Provenance: Amtk-5 — dropped empty base(s): Atk.ImplementorIface
5
5
  *
6
6
  * 6 instantiable GTypes (of which 1 concrete widgets), 6 declarations, 0 enum nick unions, 0 slot candidates.
7
7
  *
@@ -26,6 +26,7 @@
26
26
 
27
27
  import type Amtk from './amtk-5.js';
28
28
  import type Gtk from '@girs/gtk-3.0';
29
+ import type { GInitiallyUnownedConstructOnly, GInitiallyUnownedProps, GObjectConstructOnly, GObjectProps } from '@girs/gobject-2.0/vocabulary';
29
30
  import type { GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkContainerConstructOnly, GtkContainerProps, GtkScrolledWindowConstructOnly, GtkScrolledWindowProps, GtkWidgetConstructOnly, GtkWidgetProps } from '@girs/gtk-3.0/vocabulary';
30
31
 
31
32
  // ---------------------------------------------------------------------------
@@ -50,17 +51,17 @@ import type { GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBu
50
51
  // GIR keeps them once, on the interface.
51
52
  // ---------------------------------------------------------------------------
52
53
 
53
- export interface AmtkActionInfoCentralStoreProps {
54
+ export interface AmtkActionInfoCentralStoreProps extends GObjectProps {
54
55
  }
55
56
  /** Settable only at construction — a renderer must REBUILD, not patch. */
56
- export type AmtkActionInfoCentralStoreConstructOnly = never;
57
+ export type AmtkActionInfoCentralStoreConstructOnly = GObjectConstructOnly;
57
58
 
58
- export interface AmtkActionInfoStoreProps {
59
+ export interface AmtkActionInfoStoreProps extends GObjectProps {
59
60
  }
60
61
  /** Settable only at construction — a renderer must REBUILD, not patch. */
61
- export type AmtkActionInfoStoreConstructOnly = never;
62
+ export type AmtkActionInfoStoreConstructOnly = GObjectConstructOnly;
62
63
 
63
- export interface AmtkApplicationWindowProps {
64
+ export interface AmtkApplicationWindowProps extends GObjectProps {
64
65
  /**
65
66
  * The #GtkApplicationWindow.
66
67
  * @since 2.0
@@ -73,9 +74,9 @@ export interface AmtkApplicationWindowProps {
73
74
  statusbar?: Gtk.Statusbar | null;
74
75
  }
75
76
  /** Settable only at construction — a renderer must REBUILD, not patch. */
76
- export type AmtkApplicationWindowConstructOnly = 'application-window';
77
+ export type AmtkApplicationWindowConstructOnly = GObjectConstructOnly | 'application-window';
77
78
 
78
- export interface AmtkFactoryProps {
79
+ export interface AmtkFactoryProps extends GObjectProps {
79
80
  /**
80
81
  * The associated #GtkApplication (it is optional, it can be %NULL).
81
82
  * @since 3.0
@@ -89,9 +90,9 @@ export interface AmtkFactoryProps {
89
90
  'default-flags'?: number;
90
91
  }
91
92
  /** Settable only at construction — a renderer must REBUILD, not patch. */
92
- export type AmtkFactoryConstructOnly = 'application';
93
+ export type AmtkFactoryConstructOnly = GObjectConstructOnly | 'application';
93
94
 
94
- export interface AmtkMenuShellProps {
95
+ export interface AmtkMenuShellProps extends GObjectProps {
95
96
  /**
96
97
  * The #GtkMenuShell.
97
98
  * @since 2.0
@@ -99,7 +100,7 @@ export interface AmtkMenuShellProps {
99
100
  'menu-shell'?: Gtk.MenuShell;
100
101
  }
101
102
  /** Settable only at construction — a renderer must REBUILD, not patch. */
102
- export type AmtkMenuShellConstructOnly = 'menu-shell';
103
+ export type AmtkMenuShellConstructOnly = GObjectConstructOnly | 'menu-shell';
103
104
 
104
105
  export interface AmtkTreeViewScrolledWindowSizingProps extends GtkScrolledWindowProps, GtkBuildableProps {
105
106
  /**
@@ -201,6 +202,30 @@ export const PROVENANCE: {
201
202
  * GIRs disagreeing, which is what the main emitter answers `never` for as well.
202
203
  */
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[];
204
229
  };
205
230
 
206
231
  /** Declaration GType -> its own settable properties, as GObject registered them. */
@@ -310,6 +335,19 @@ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
310
335
  */
311
336
  export const PROP_ENUMS: Readonly<Record<string, string>>;
312
337
 
338
+ /**
339
+ * `<declaration GType>.<property>` -> the GType of that property's own type.
340
+ *
341
+ * `PROP_ENUMS` one case wider, and separate on purpose: that table promises the GType it names
342
+ * has NUMBERS, and this one promises only that the GType is the property's. A host inferring a
343
+ * type from a property — the middle of an uncast lookup chain, an uncast closure's return type —
344
+ * reads this one; a host resolving a nick to a number reads that one.
345
+ *
346
+ * Absent means no GType can be stated, not that the property is scalar: `gchararray` is carried
347
+ * like any other, so absence is readable as "unknown".
348
+ */
349
+ export const PROP_TYPES: Readonly<Record<string, string>>;
350
+
313
351
  /**
314
352
  * The kinds of value a GTK accessible property, relation or state takes.
315
353
  *
@@ -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.Object GObject.InitiallyUnowned 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,10 +11,12 @@ export const PROVENANCE = {
11
11
  version: '5',
12
12
  libraryVersion: null,
13
13
  childHolders: 0,
14
- droppedBases: ['GObject.Object', 'GObject.InitiallyUnowned', 'Atk.ImplementorIface'],
14
+ droppedBases: ['Atk.ImplementorIface'],
15
15
  inlinedBases: [],
16
16
  unsettableProps: [],
17
17
  unresolvedProps: [],
18
+ identifierPrefixes: ['Amtk'],
19
+ requiredVocabularies: ['@girs/gobject-2.0/vocabulary', '@girs/gtk-3.0/vocabulary'],
18
20
  };
19
21
 
20
22
  export const OWN_PROPS = {
@@ -36,12 +38,12 @@ export const OWN_SIGNALS = {
36
38
  // `GtkEventController*` and `GtkCellRenderer*`. Use `Widgets` and `CHILD_HOLDERS`
37
39
  // below for the narrower questions; they did not move.
38
40
  export const DECLS = {
39
- AmtkActionInfoCentralStore: ['AmtkActionInfoCentralStore'],
40
- AmtkActionInfoStore: ['AmtkActionInfoStore'],
41
- AmtkApplicationWindow: ['AmtkApplicationWindow'],
42
- AmtkFactory: ['AmtkFactory'],
43
- AmtkMenuShell: ['AmtkMenuShell'],
44
- 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'],
45
47
  };
46
48
 
47
49
  // The GTypes above that ARE widgets are the `Widgets` map in the sibling `.d.ts`; these
@@ -138,6 +140,25 @@ export const PROP_ENUMS = {
138
140
  'AmtkFactory.default-flags': 'AmtkFactoryFlags',
139
141
  };
140
142
 
143
+ // `<declaration GType>.<property>` -> the GType of that property's own type.
144
+ //
145
+ // `PROP_ENUMS` one case wider, and a SEPARATE table on purpose. That one is a join with a
146
+ // contract — the GType it names has numbers, in this vocabulary or the owner's — and folding a
147
+ // plain type table in would mix "resolvable to numbers" with "not" and hand the distinction to
148
+ // the consumer. `ARIA_VALUE_ENUMS` beside `ARIA_VALUE_TYPES` is the same split.
149
+ //
150
+ // A row is ABSENT where no GType can be stated: a fundamental spelling outside the generator's
151
+ // closed map, a registered type with no `glib:type-name`, or a property with no `<type>`
152
+ // child. Absence therefore reads as "unknown" and never as "scalar".
153
+ export const PROP_TYPES = {
154
+ 'AmtkApplicationWindow.application-window': 'GtkApplicationWindow',
155
+ 'AmtkApplicationWindow.statusbar': 'GtkStatusbar',
156
+ 'AmtkFactory.application': 'GtkApplication',
157
+ 'AmtkFactory.default-flags': 'AmtkFactoryFlags',
158
+ 'AmtkMenuShell.menu-shell': 'GtkMenuShell',
159
+ 'AmtkTreeViewScrolledWindowSizing.monitor-limit-enabled': 'gboolean',
160
+ };
161
+
141
162
  // `<enum GType>.<nick>` -> the kind of value that ARIA slot takes.
142
163
  //
143
164
  // The one table here that is not about a ParamSpec. A GtkBuilder or Blueprint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/amtk-5",
3
- "version": "5.2.0",
3
+ "version": "5.4.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.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" },
39
+ "@girs/gjs": "^5.4.0",
40
+ "@girs/gtk-3.0": "^5.4.0",
41
+ "@girs/xlib-2.0": "^5.4.0",
42
+ "@girs/gdk-3.0": "^5.4.0",
43
+ "@girs/cairo-1.0": "^5.4.0",
44
+ "@girs/gobject-2.0": "^5.4.0",
45
+ "@girs/glib-2.0": "^5.4.0",
46
+ "@girs/pango-1.0": "^5.4.0",
47
+ "@girs/harfbuzz-0.0": "^5.4.0",
48
+ "@girs/freetype2-2.0": "^5.4.0",
49
+ "@girs/gio-2.0": "^5.4.0",
50
+ "@girs/gmodule-2.0": "^5.4.0",
51
+ "@girs/gdkpixbuf-2.0": "^5.4.0",
52
+ "@girs/atk-1.0": "^5.4.0" },
53
53
  "devDependencies": {
54
54
  "typescript": "*"
55
55
  },