@girs/budgie-3.0 4.7.0 → 4.8.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/budgie-3.0)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/budgie-3.0)
6
6
 
7
- GJS TypeScript type definitions for Budgie-3.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.7.0.
7
+ GJS TypeScript type definitions for Budgie-3.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.8.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.
@@ -181,6 +181,61 @@ export const CHILD_HOLDERS: readonly string[];
181
181
  /** Enum GType -> the nicks this surface offers. */
182
182
  export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
183
183
 
184
+ /**
185
+ * `<enum GType>.<nick>` -> the integer GObject registers for it, from GIR's `value`.
186
+ *
187
+ * Position in `ENUM_NICKS` is NOT this number. Counting is wrong on 6 of the 129 enums a
188
+ * GTK 4 vocabulary carries -- 104 in Gtk-4.0 and 25 in Adw-1: `GtkResponseType` runs -1 to -11, `GtkTextWindowType` starts
189
+ * at 1, `GtkOrdering` and `GtkConstraintRelation` are -1/0/1, `GtkAlign` has two names
190
+ * on one value, and `GtkConstraintStrength.required` is 1001001000 where counting says 0.
191
+ *
192
+ * Read from the same GIR as the nicks, deliberately. A consumer reading the numbers off an
193
+ * installed typelib instead has two provenances for one table, and then cannot tell a
194
+ * missing number from a host older than the vocabulary.
195
+ */
196
+ export const ENUM_VALUES: Readonly<Record<string, number>>;
197
+
198
+ /**
199
+ * The `<enum GType>.<nick>` entries GIR marks `deprecated="1"`.
200
+ *
201
+ * Two names on one value is how GObject spells an alias -- `GTK_ALIGN_BASELINE` and
202
+ * `GTK_ALIGN_BASELINE_FILL` are both 4, and both keep a `ENUM_VALUES` entry. The pairing
203
+ * is visible in the numbers; which name is the old one is not, and this is that fact --
204
+ * where GIR states it. It usually does not: 4 registered-enum members across the 718 GIRs
205
+ * carry the attribute, and 179 of the 182 value-sharing pairs carry it on neither half, so
206
+ * absence from this list means GIR is silent, not that the nick is the current one.
207
+ */
208
+ export const ENUM_DEPRECATED: readonly string[];
209
+
210
+ /**
211
+ * `<enum GType>.<nick>` -> the raw GIR `value` no number could be read from.
212
+ *
213
+ * The declared remainder, so that every nick in `ENUM_NICKS` is in `ENUM_VALUES` or in
214
+ * here and a drop cannot be silent. Two shapes reach it: a symbolic or absent value (Vala
215
+ * writes `(null)`, a char enum writes a letter) and an integer past
216
+ * `Number.MAX_SAFE_INTEGER`, where a literal would lose precision and stop being the
217
+ * GIR's number. Empty for Gtk, Adw, GLib and Gio.
218
+ */
219
+ export const ENUM_VALUES_UNREADABLE: Readonly<Record<string, string>>;
220
+
221
+ /**
222
+ * `<bitfield GType>.<nick>` -> the integer GObject registers for that one member.
223
+ *
224
+ * `ENUM_NICKS` carries no bitfield, because GObject cannot resolve a nick SET; that says
225
+ * nothing about a single member's number, and the number is what a host without GI needs.
226
+ * 21 writable widget properties in Gtk-4.0 and Adw-1 are bitfield-typed and are declared
227
+ * bare `number` -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`, `AdwTabView:shortcuts`
228
+ * among them. Counting is worst here: 95 of 121 Gtk-4.0 bitfield members disagree with their
229
+ * position, against 29 of 685 enumeration members.
230
+ *
231
+ * Combine with `|` as GObject does. There is no nick table to pair this with, so a name
232
+ * here is resolvable and a SET still is not.
233
+ */
234
+ export const FLAG_VALUES: Readonly<Record<string, number>>;
235
+
236
+ /** `<bitfield GType>.<nick>` -> the raw GIR `value` no number could be read from. */
237
+ export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
238
+
184
239
  /** Widget GType -> slot name -> the method that may adopt a child there. */
185
240
  export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
186
241
 
@@ -37,6 +37,72 @@ export const CHILD_HOLDERS = [];
37
37
 
38
38
  export const ENUM_NICKS = {};
39
39
 
40
+ // The number behind each of those nicks, read from GIR's own `value` attribute.
41
+ //
42
+ // It ships because position in `ENUM_NICKS` is not the value and a consumer with no
43
+ // typelib has no other way to learn it: a surface without GI still has to hand GObject an
44
+ // integer. The alternative a consumer reaches for first is counting, and counting is wrong
45
+ // on 6 of the 129 enums a GTK 4 vocabulary carries (104 in Gtk-4.0, 25 in Adw-1) --
46
+ // `GtkResponseType` runs -1 down to
47
+ // -11, `GtkTextWindowType` starts at 1, and `GtkConstraintStrength.required` is
48
+ // 1001001000 where counting answers 0.
49
+ //
50
+ // Same provenance as the nicks above, which is the point: a consumer that reads the numbers
51
+ // from an INSTALLED library instead gets two provenances for one table, and a member the
52
+ // vocabulary describes but the host predates then looks like a missing number rather than a
53
+ // version gap.
54
+ export const ENUM_VALUES = {};
55
+
56
+ // The nicks GIR marks `deprecated="1"`.
57
+ //
58
+ // Two members of one enum may share a value -- that is how GObject spells an alias, and
59
+ // `GTK_ALIGN_BASELINE` and `GTK_ALIGN_BASELINE_FILL` are both 4. `ENUM_VALUES` keeps
60
+ // both names, so nothing is lost, and this is what says which of the two a number should be
61
+ // spelled back as. Stated rather than derived: the pairing is visible in the values, the
62
+ // DIRECTION is not.
63
+ //
64
+ // Read it as evidence, not as a negative: 4 registered-enum members in the 718 GIRs carry
65
+ // the attribute at all, and 179 of the 182 value-sharing pairs carry it on neither half.
66
+ // A nick missing from here is a nick GIR says nothing about, not a nick GIR calls current.
67
+ export const ENUM_DEPRECATED = [];
68
+
69
+ // The declared remainder: nicks whose GIR `value` is not a number this can carry.
70
+ //
71
+ // Every nick in `ENUM_NICKS` is in `ENUM_VALUES` or here -- a nick in neither would be a
72
+ // silent drop. GIR carries two shapes no integer holds: a symbolic or absent value (Vala
73
+ // writes `(null)`, a char enum writes a letter) and an integer past
74
+ // `Number.MAX_SAFE_INTEGER`. The value kept here is the raw attribute, so the entry says
75
+ // WHAT was unreadable rather than only that something was. Measured over the 718 GIRs in
76
+ // ts-for-gir's `girs/`: 32 of 34096 registered-enum members, none in Gtk, Adw, GLib or Gio.
77
+ export const ENUM_VALUES_UNREADABLE = {};
78
+
79
+ // The number behind each member of a registered BITFIELD, keyed the same way.
80
+ //
81
+ // `ENUM_NICKS` refuses a bitfield because GObject cannot resolve a nick SET, and that
82
+ // reason says nothing about one member's number. 21 writable widget properties in Gtk-4.0
83
+ // and Adw-1 are bitfield-typed -- `GtkEntry:input-hints`, `GtkPopoverMenu:flags`,
84
+ // `AdwTabView:shortcuts`, ... -- and they are typed bare `number`, so a host without GI
85
+ // has nothing to compute one from. Counting is worst exactly here: 95 of 121 Gtk-4.0
86
+ // bitfield members disagree with their position, against 29 of 685 enumeration members.
87
+ //
88
+ // A table of its own rather than more rows in `ENUM_VALUES`, so that "every nick in
89
+ // `ENUM_NICKS` has a number or a declared reason" stays a claim about one set.
90
+ export const FLAG_VALUES = {
91
+ 'BudgiePanelAction.max': 4,
92
+ 'BudgiePanelAction.menu': 2,
93
+ 'BudgiePanelAction.none': 1,
94
+ 'BudgiePanelPosition.bottom': 2,
95
+ 'BudgiePanelPosition.left': 8,
96
+ 'BudgiePanelPosition.none': 1,
97
+ 'BudgiePanelPosition.right': 16,
98
+ 'BudgiePanelPosition.top': 4,
99
+ };
100
+
101
+ // The same declared remainder for the bitfields. Every one of the 13 members in ts-for-gir's
102
+ // `girs/` whose value is past `Number.MAX_SAFE_INTEGER` is a bitfield member (Fwupd, Qmi),
103
+ // so this is the table that shape actually reaches.
104
+ export const FLAG_VALUES_UNREADABLE = {};
105
+
40
106
  export const SLOT_CANDIDATES = {};
41
107
 
42
108
  export const SINCE = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/budgie-3.0",
3
- "version": "4.7.0",
3
+ "version": "4.8.0",
4
4
  "description": "GJS TypeScript type definitions for Budgie-3.0",
5
5
  "type": "module",
6
6
  "module": "budgie-3.0.js",
@@ -36,21 +36,21 @@
36
36
  "test": "tsc --project tsconfig.json"
37
37
  },
38
38
  "dependencies": {
39
- "@girs/gjs": "^4.7.0",
40
- "@girs/peas-2": "^4.7.0",
41
- "@girs/gio-2.0": "^4.7.0",
42
- "@girs/gobject-2.0": "^4.7.0",
43
- "@girs/glib-2.0": "^4.7.0",
44
- "@girs/gmodule-2.0": "^4.7.0",
45
- "@girs/gtk-3.0": "^4.7.0",
46
- "@girs/xlib-2.0": "^4.7.0",
47
- "@girs/gdk-3.0": "^4.7.0",
48
- "@girs/cairo-1.0": "^4.7.0",
49
- "@girs/pango-1.0": "^4.7.0",
50
- "@girs/harfbuzz-0.0": "^4.7.0",
51
- "@girs/freetype2-2.0": "^4.7.0",
52
- "@girs/gdkpixbuf-2.0": "^4.7.0",
53
- "@girs/atk-1.0": "^4.7.0" },
39
+ "@girs/gjs": "^4.8.0",
40
+ "@girs/peas-2": "^4.8.0",
41
+ "@girs/gio-2.0": "^4.8.0",
42
+ "@girs/gobject-2.0": "^4.8.0",
43
+ "@girs/glib-2.0": "^4.8.0",
44
+ "@girs/gmodule-2.0": "^4.8.0",
45
+ "@girs/gtk-3.0": "^4.8.0",
46
+ "@girs/xlib-2.0": "^4.8.0",
47
+ "@girs/gdk-3.0": "^4.8.0",
48
+ "@girs/cairo-1.0": "^4.8.0",
49
+ "@girs/pango-1.0": "^4.8.0",
50
+ "@girs/harfbuzz-0.0": "^4.8.0",
51
+ "@girs/freetype2-2.0": "^4.8.0",
52
+ "@girs/gdkpixbuf-2.0": "^4.8.0",
53
+ "@girs/atk-1.0": "^4.8.0" },
54
54
  "devDependencies": {
55
55
  "typescript": "*"
56
56
  },