@girs/handy-1 4.8.0 → 4.9.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/handy-1)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/handy-1)
6
6
 
7
- GJS TypeScript type definitions for Handy-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.8.0.
7
+ GJS TypeScript type definitions for Handy-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.9.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.
@@ -1347,6 +1347,27 @@ export const FLAG_VALUES: Readonly<Record<string, number>>;
1347
1347
  /** `<bitfield GType>.<nick>` -> the raw GIR `value` no number could be read from. */
1348
1348
  export const FLAG_VALUES_UNREADABLE: Readonly<Record<string, string>>;
1349
1349
 
1350
+ /**
1351
+ * `<declaration GType>.<property>` -> the GType of that property's enum or bitfield.
1352
+ *
1353
+ * The join the value tables need and nothing else here carries. A host with no GI has a
1354
+ * property name and a nick and needs a number; `ENUM_VALUES` is keyed by ENUM GType, and
1355
+ * only this says which enum a property is. Keyed by DECLARATION like `OWN_PROPS`, so it is
1356
+ * read at every link of a `DECLS` chain — `orientation` belongs to `GtkOrientable`, not
1357
+ * to the `GtkBox` a caller starts from.
1358
+ *
1359
+ * Present only where the property's OWN type is the enum: an array of them, or a union that
1360
+ * merely mentions one, would be an entry a consumer resolves wrongly.
1361
+ *
1362
+ * The GType named here is not always one THIS module gives numbers for. A nick vocabulary is
1363
+ * emitted once, by the namespace that owns the enum, so `AdwComboRow.search-match-mode` names
1364
+ * `GtkStringFilterMatchMode` and its rows are in `@girs/gtk-4.0/vocabulary` — 57 of the 438
1365
+ * entries in a full run resolve only with the owner's vocabulary loaded beside this one. An
1366
+ * owner with no vocabulary of its own (Gdk, Pango) is inlined here instead, so every entry
1367
+ * resolves against SOME module.
1368
+ */
1369
+ export const PROP_ENUMS: Readonly<Record<string, string>>;
1370
+
1350
1371
  /** Widget GType -> slot name -> the method that may adopt a child there. */
1351
1372
  export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
1352
1373
 
@@ -196,6 +196,34 @@ export const FLAG_VALUES = {};
196
196
  // so this is the table that shape actually reaches.
197
197
  export const FLAG_VALUES_UNREADABLE = {};
198
198
 
199
+ // Declaration GType + property name -> the GType of that property's enum or bitfield.
200
+ //
201
+ // Without it the value tables above are half an answer. A host with no GI knows it must set
202
+ // `orientation` to the number behind the nick `vertical`; `ENUM_VALUES` is keyed
203
+ // `GtkOrientation.vertical`, and nothing else says that `orientation` is a
204
+ // `GtkOrientation`. Deriving it is not available: `never` is a member of several Gtk enums,
205
+ // and choosing between them produces a wrong number rather than a missing one.
206
+ //
207
+ // Only where the property's OWN type is the enum. An array of them and a union that mentions
208
+ // one are both entries a consumer would resolve wrongly, so neither is written.
209
+ //
210
+ // A GType named here has numbers in SOME vocabulary, not necessarily this one: the namespace
211
+ // that OWNS an enum publishes it, so 57 of the 438 entries a full run emits want the owner's
212
+ // vocabulary loaded too. Owners that emit none (Gdk, Pango) are inlined into the tables above.
213
+ export const PROP_ENUMS = {
214
+ 'HdyDeck.transition-type': 'HdyDeckTransitionType',
215
+ 'HdyFlap.flap-position': 'GtkPackType',
216
+ 'HdyFlap.fold-policy': 'HdyFlapFoldPolicy',
217
+ 'HdyFlap.transition-type': 'HdyFlapTransitionType',
218
+ 'HdyHeaderBar.centering-policy': 'HdyCenteringPolicy',
219
+ 'HdyLeaflet.transition-type': 'HdyLeafletTransitionType',
220
+ 'HdySqueezer.transition-type': 'HdySqueezerTransitionType',
221
+ 'HdyViewSwitcher.narrow-ellipsize': 'PangoEllipsizeMode',
222
+ 'HdyViewSwitcher.policy': 'HdyViewSwitcherPolicy',
223
+ 'HdyViewSwitcherBar.policy': 'HdyViewSwitcherPolicy',
224
+ 'HdyViewSwitcherTitle.policy': 'HdyViewSwitcherPolicy',
225
+ };
226
+
199
227
  export const SLOT_CANDIDATES = {
200
228
  HdyActionRow: {
201
229
  'activatable': 'set_activatable_widget',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/handy-1",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "description": "GJS TypeScript type definitions for Handy-1",
5
5
  "type": "module",
6
6
  "module": "handy-1.js",
@@ -36,20 +36,20 @@
36
36
  "test": "tsc --project tsconfig.json"
37
37
  },
38
38
  "dependencies": {
39
- "@girs/gjs": "^4.8.0",
40
- "@girs/gtk-3.0": "^4.8.0",
41
- "@girs/xlib-2.0": "^4.8.0",
42
- "@girs/gdk-3.0": "^4.8.0",
43
- "@girs/cairo-1.0": "^4.8.0",
44
- "@girs/gobject-2.0": "^4.8.0",
45
- "@girs/glib-2.0": "^4.8.0",
46
- "@girs/pango-1.0": "^4.8.0",
47
- "@girs/harfbuzz-0.0": "^4.8.0",
48
- "@girs/freetype2-2.0": "^4.8.0",
49
- "@girs/gio-2.0": "^4.8.0",
50
- "@girs/gmodule-2.0": "^4.8.0",
51
- "@girs/gdkpixbuf-2.0": "^4.8.0",
52
- "@girs/atk-1.0": "^4.8.0" },
39
+ "@girs/gjs": "^4.9.0",
40
+ "@girs/gtk-3.0": "^4.9.0",
41
+ "@girs/xlib-2.0": "^4.9.0",
42
+ "@girs/gdk-3.0": "^4.9.0",
43
+ "@girs/cairo-1.0": "^4.9.0",
44
+ "@girs/gobject-2.0": "^4.9.0",
45
+ "@girs/glib-2.0": "^4.9.0",
46
+ "@girs/pango-1.0": "^4.9.0",
47
+ "@girs/harfbuzz-0.0": "^4.9.0",
48
+ "@girs/freetype2-2.0": "^4.9.0",
49
+ "@girs/gio-2.0": "^4.9.0",
50
+ "@girs/gmodule-2.0": "^4.9.0",
51
+ "@girs/gdkpixbuf-2.0": "^4.9.0",
52
+ "@girs/atk-1.0": "^4.9.0" },
53
53
  "devDependencies": {
54
54
  "typescript": "*"
55
55
  },