@girs/gtd-1.0 4.1.0 → 4.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
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gtd-1.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Gtd-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.1.0.
8
+ GJS TypeScript type definitions for Gtd-1.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
9
9
 
10
10
  ## Install
11
11
 
@@ -0,0 +1,237 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for Gtd-1.0.
3
+ *
4
+ * GENERATED — do not edit. Provenance: Gtd-1.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Gio.ActionGroup Gio.ActionMap
5
+ *
6
+ * 7 concrete widgets, 7 declarations, 0 enum nick unions, 2 slot candidates.
7
+ *
8
+ * Module-scoped exports only. There is no `JSX` namespace here, no tag spelling and
9
+ * no `on<Signal>` prop name: those are DIALECT, and every framework answers them
10
+ * differently. The shape to avoid is the GLOBAL AUGMENT — a `declare global` on
11
+ * `React.JSX` collides with every other library on a shared tag — while a
12
+ * module-scoped `JSX` behind a `jsxImportSource` does not. This package is used by
13
+ * projects that want nothing to do with JSX, so it emits neither; a consumer declaring
14
+ * a module-scoped namespace over these names is doing it right.
15
+ *
16
+ * Three things this is and `ConstructorProps` is not: WRITABLE-only (measured on
17
+ * Gtk-4.0, `ConstructorProps` offers 150 read-only properties across 68 classes as
18
+ * settable, and GTK's failure mode for writing one is exit 0), OPTIONAL, and keyed
19
+ * by the name GObject actually REGISTERED — the dashed spelling `g_object_set`,
20
+ * GtkBuilder XML and Blueprint all use.
21
+ *
22
+ * Signal handler types are not re-derived: `X.SignalSignatures`, which this package
23
+ * already emits for every class with the parent chain, every implemented interface
24
+ * and the `notify::` keys folded in, is what `Widgets[G]['signals']` points at.
25
+ */
26
+
27
+ import type Gio from '@girs/gio-2.0';
28
+ import type Graphene from '@girs/graphene-1.0';
29
+ import type Gtd from './gtd-1.0.js';
30
+ import type Gtk from '@girs/gtk-4.0';
31
+ import type { GtkAccessibleConstructOnly, GtkAccessibleProps, GtkApplicationWindowConstructOnly, GtkApplicationWindowProps, GtkArrowTypeNick, GtkBoxConstructOnly, GtkBoxProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkConstraintTargetConstructOnly, GtkConstraintTargetProps, GtkNativeConstructOnly, GtkNativeProps, GtkOrientableConstructOnly, GtkOrientableProps, GtkPopoverConstructOnly, GtkPopoverProps, GtkRootConstructOnly, GtkRootProps, GtkShortcutManagerConstructOnly, GtkShortcutManagerProps, GtkWidgetConstructOnly, GtkWidgetProps, GtkWindowConstructOnly, GtkWindowProps } from '@girs/gtk-4.0/surface';
32
+
33
+ // ---------------------------------------------------------------------------
34
+ // Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
35
+ //
36
+ // Not derived from the member name. Substituting underscores for dashes is not a law:
37
+ // some nicks keep an underscore the substitution would have replaced, and only the
38
+ // attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
39
+ // how a derived nick passes review and breaks elsewhere.
40
+ // Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
41
+ // ---------------------------------------------------------------------------
42
+
43
+
44
+
45
+ // ---------------------------------------------------------------------------
46
+ // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
47
+ // inheritance rather than flattening per widget.
48
+ //
49
+ // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
50
+ // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
51
+ // because GObject installs interface properties on the implementor at runtime while
52
+ // GIR keeps them once, on the interface.
53
+ // ---------------------------------------------------------------------------
54
+
55
+ export interface GtdMenuButtonProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
56
+ /** The #GtkWidget to use to align the menu with. */
57
+ 'align-widget'?: Gtk.Widget | null;
58
+ /** The #GtkArrowType representing the direction in which the menu or popover will be popped out. */
59
+ direction?: GtkArrowTypeNick | Gtk.ArrowType;
60
+ gicon?: Gio.Icon;
61
+ 'has-frame'?: boolean;
62
+ label?: string;
63
+ /** The #GMenuModel from which the popup will be created. */
64
+ 'menu-model'?: Gio.MenuModel | null;
65
+ /** The #GtkPopover that will be popped up when the button is clicked. */
66
+ popover?: Gtk.Popover | null;
67
+ 'use-underline'?: boolean;
68
+ }
69
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
70
+ export type GtdMenuButtonConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
71
+
72
+ export interface GtdOmniAreaProps extends GtdWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
73
+ }
74
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
75
+ export type GtdOmniAreaConstructOnly = GtdWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
76
+
77
+ export interface GtdProviderPopoverProps extends GtkPopoverProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps, GtkNativeProps, GtkShortcutManagerProps {
78
+ }
79
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
80
+ export type GtdProviderPopoverConstructOnly = GtkPopoverConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkNativeConstructOnly | GtkShortcutManagerConstructOnly;
81
+
82
+ export interface GtdStarWidgetProps extends GtdWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
83
+ /** Whether the star widget is active or not. */
84
+ active?: boolean;
85
+ }
86
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
87
+ export type GtdStarWidgetConstructOnly = GtdWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
88
+
89
+ export interface GtdTaskListViewProps extends GtkBoxProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps, GtkOrientableProps {
90
+ 'show-due-date'?: boolean;
91
+ 'show-list-name'?: boolean;
92
+ }
93
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
94
+ export type GtdTaskListViewConstructOnly = GtkBoxConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkOrientableConstructOnly;
95
+
96
+ export interface GtdWidgetProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
97
+ 'pivot-point'?: Graphene.Point3D;
98
+ 'rotation-x'?: number;
99
+ 'rotation-y'?: number;
100
+ 'rotation-z'?: number;
101
+ 'scale-x'?: number;
102
+ 'scale-y'?: number;
103
+ 'scale-z'?: number;
104
+ 'translation-x'?: number;
105
+ 'translation-y'?: number;
106
+ 'translation-z'?: number;
107
+ }
108
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
109
+ export type GtdWidgetConstructOnly = GtkWidgetConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly;
110
+
111
+ export interface GtdWindowProps extends GtkApplicationWindowProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps, GtkNativeProps, GtkRootProps, GtkShortcutManagerProps {
112
+ }
113
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
114
+ export type GtdWindowConstructOnly = GtkApplicationWindowConstructOnly | GtkAccessibleConstructOnly | GtkBuildableConstructOnly | GtkConstraintTargetConstructOnly | GtkNativeConstructOnly | GtkRootConstructOnly | GtkShortcutManagerConstructOnly;
115
+
116
+ // ---------------------------------------------------------------------------
117
+ // The GType-keyed widget map.
118
+ //
119
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
120
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
121
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
122
+ // is the class. None of those is baked in here.
123
+ //
124
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
125
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
126
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
127
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
128
+ // this is what notices when a release adds a candidate.
129
+ // ---------------------------------------------------------------------------
130
+
131
+ export interface Widgets {
132
+ GtdMenuButton: {
133
+ class: Gtd.MenuButton;
134
+ props: GtdMenuButtonProps;
135
+ signals: Gtd.MenuButton.SignalSignatures;
136
+ constructOnly: GtdMenuButtonConstructOnly;
137
+ slotCandidates: {
138
+ 'align': 'set_align_widget';
139
+ 'popover': 'set_popover';
140
+ };
141
+ };
142
+ GtdOmniArea: {
143
+ class: Gtd.OmniArea;
144
+ props: GtdOmniAreaProps;
145
+ signals: Gtd.OmniArea.SignalSignatures;
146
+ constructOnly: GtdOmniAreaConstructOnly;
147
+ slotCandidates: {};
148
+ };
149
+ GtdProviderPopover: {
150
+ class: Gtd.ProviderPopover;
151
+ props: GtdProviderPopoverProps;
152
+ signals: Gtd.ProviderPopover.SignalSignatures;
153
+ constructOnly: GtdProviderPopoverConstructOnly;
154
+ slotCandidates: {};
155
+ };
156
+ GtdStarWidget: {
157
+ class: Gtd.StarWidget;
158
+ props: GtdStarWidgetProps;
159
+ signals: Gtd.StarWidget.SignalSignatures;
160
+ constructOnly: GtdStarWidgetConstructOnly;
161
+ slotCandidates: {};
162
+ };
163
+ GtdTaskListView: {
164
+ class: Gtd.TaskListView;
165
+ props: GtdTaskListViewProps;
166
+ signals: Gtd.TaskListView.SignalSignatures;
167
+ constructOnly: GtdTaskListViewConstructOnly;
168
+ slotCandidates: {};
169
+ };
170
+ GtdWidget: {
171
+ class: Gtd.Widget;
172
+ props: GtdWidgetProps;
173
+ signals: Gtd.Widget.SignalSignatures;
174
+ constructOnly: GtdWidgetConstructOnly;
175
+ slotCandidates: {};
176
+ };
177
+ GtdWindow: {
178
+ class: Gtd.Window;
179
+ props: GtdWindowProps;
180
+ signals: Gtd.Window.SignalSignatures;
181
+ constructOnly: GtdWindowConstructOnly;
182
+ slotCandidates: {};
183
+ };
184
+ }
185
+
186
+ /** Every GType this namespace can create. A consumer derives its own tag map. */
187
+ export type WidgetGType = keyof Widgets;
188
+
189
+ /** The writable, optional, GObject-keyed property surface of one GType. */
190
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
191
+
192
+ /** The signal table this package already emits, reached by GType. */
193
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
194
+
195
+ /** The instance type — what a `ref`-shaped prop should infer. */
196
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
197
+
198
+ /** Property names that can only be set at construction. */
199
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
200
+
201
+ /** Candidate child slots — see the note above; curation decides. */
202
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
203
+
204
+ /**
205
+ * The same facts as runtime data, for a consumer that CHECKS them.
206
+ *
207
+ * Types are erased, so a spec that asks the installed GTK whether every property
208
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
209
+ * and every nick resolvable through an enum lookup cannot read the interfaces
210
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
211
+ * belongs to the consumer and the DATA belongs here.
212
+ */
213
+ export const SURFACE_PROVENANCE: string;
214
+
215
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
216
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
217
+
218
+ /** Widget GType -> its own signals. */
219
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
220
+
221
+ /** Widget GType -> every declaration its members come from, self first. */
222
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
223
+
224
+ /** Enum GType -> the nicks this surface offers. */
225
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
226
+
227
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
228
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
229
+
230
+ /**
231
+ * `Type.property` -> the release that introduced it.
232
+ *
233
+ * What keeps a runtime cross-check honest across a version gap without an
234
+ * allowlist: a member the installed library lacks is a defect UNLESS the version
235
+ * here is newer than the one running.
236
+ */
237
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,41 @@
1
+ // The widget vocabulary of Gtd-1.0 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: Gtd-1.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Gio.ActionGroup Gio.ActionMap
4
+ //
5
+ // The type half of this subpath is the sibling `.d.ts`. This file exists because
6
+ // types are erased: a consumer that wants to ask the installed library whether every
7
+ // name here is real needs values, not declarations.
8
+
9
+ export const SURFACE_PROVENANCE = 'Gtd-1.0 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Gio.ActionGroup Gio.ActionMap';
10
+
11
+ export const OWN_PROPS = {
12
+ GtdMenuButton: ['align-widget', 'direction', 'gicon', 'has-frame', 'label', 'menu-model', 'popover', 'use-underline'],
13
+ GtdStarWidget: ['active'],
14
+ GtdTaskListView: ['show-due-date', 'show-list-name'],
15
+ GtdWidget: ['pivot-point', 'rotation-x', 'rotation-y', 'rotation-z', 'scale-x', 'scale-y', 'scale-z', 'translation-x', 'translation-y', 'translation-z'],
16
+ };
17
+
18
+ export const OWN_SIGNALS = {
19
+ GtdWidget: ['transition-stopped', 'transitions-completed'],
20
+ };
21
+
22
+ export const DECLS = {
23
+ GtdMenuButton: ['GtdMenuButton', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
24
+ GtdOmniArea: ['GtdOmniArea', 'GtdWidget', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
25
+ GtdProviderPopover: ['GtdProviderPopover', 'GtkPopover', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget', 'GtkNative', 'GtkShortcutManager'],
26
+ GtdStarWidget: ['GtdStarWidget', 'GtdWidget', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
27
+ GtdTaskListView: ['GtdTaskListView', 'GtkBox', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget', 'GtkOrientable'],
28
+ GtdWidget: ['GtdWidget', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget'],
29
+ GtdWindow: ['GtdWindow', 'GtkApplicationWindow', 'GtkWindow', 'GtkWidget', 'GtkAccessible', 'GtkBuildable', 'GtkConstraintTarget', 'GtkNative', 'GtkRoot', 'GtkShortcutManager'],
30
+ };
31
+
32
+ export const ENUM_NICKS = {};
33
+
34
+ export const SLOT_CANDIDATES = {
35
+ GtdMenuButton: {
36
+ 'align': 'set_align_widget',
37
+ 'popover': 'set_popover',
38
+ },
39
+ };
40
+
41
+ export const SINCE = {};
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@girs/gtd-1.0",
3
- "version": "4.1.0",
4
- "libraryVersion": "1.0.0",
5
- "description": "GJS TypeScript type definitions for Gtd-1.0, generated from library version 1.0.0",
3
+ "version": "4.2.0",
4
+ "description": "GJS TypeScript type definitions for Gtd-1.0",
6
5
  "type": "module",
7
6
  "module": "gtd-1.0.js",
8
7
  "main": "gtd-1.0.js",
@@ -17,6 +16,11 @@
17
16
  "import": "./gtd-1.0-import.js",
18
17
  "default": "./gtd-1.0-import.js"
19
18
  },
19
+ "./surface": {
20
+ "types": "./gtd-1.0-surface.d.ts",
21
+ "import": "./gtd-1.0-surface.js",
22
+ "default": "./gtd-1.0-surface.js"
23
+ },
20
24
  "./gtd-1.0": {
21
25
  "types": "./gtd-1.0.d.ts",
22
26
  "import": "./gtd-1.0.js",
@@ -32,21 +36,21 @@
32
36
  "test": "tsc --project tsconfig.json"
33
37
  },
34
38
  "dependencies": {
35
- "@girs/gjs": "^4.1.0",
36
- "@girs/gtk-4.0": "^4.1.0",
37
- "@girs/gsk-4.0": "^4.1.0",
38
- "@girs/graphene-1.0": "^4.1.0",
39
- "@girs/gobject-2.0": "^4.1.0",
40
- "@girs/glib-2.0": "^4.1.0",
41
- "@girs/gdk-4.0": "^4.1.0",
42
- "@girs/cairo-1.0": "^4.1.0",
43
- "@girs/pangocairo-1.0": "^4.1.0",
44
- "@girs/pango-1.0": "^4.1.0",
45
- "@girs/harfbuzz-0.0": "^4.1.0",
46
- "@girs/freetype2-2.0": "^4.1.0",
47
- "@girs/gio-2.0": "^4.1.0",
48
- "@girs/gmodule-2.0": "^4.1.0",
49
- "@girs/gdkpixbuf-2.0": "^4.1.0" },
39
+ "@girs/gjs": "^4.2.0",
40
+ "@girs/gtk-4.0": "^4.2.0",
41
+ "@girs/gsk-4.0": "^4.2.0",
42
+ "@girs/graphene-1.0": "^4.2.0",
43
+ "@girs/gobject-2.0": "^4.2.0",
44
+ "@girs/glib-2.0": "^4.2.0",
45
+ "@girs/gdk-4.0": "^4.2.0",
46
+ "@girs/cairo-1.0": "^4.2.0",
47
+ "@girs/pangocairo-1.0": "^4.2.0",
48
+ "@girs/pango-1.0": "^4.2.0",
49
+ "@girs/harfbuzz-0.0": "^4.2.0",
50
+ "@girs/freetype2-2.0": "^4.2.0",
51
+ "@girs/gio-2.0": "^4.2.0",
52
+ "@girs/gmodule-2.0": "^4.2.0",
53
+ "@girs/gdkpixbuf-2.0": "^4.2.0" },
50
54
  "devDependencies": {
51
55
  "typescript": "*"
52
56
  },
package/tsconfig.json CHANGED
@@ -65,7 +65,7 @@
65
65
  ]
66
66
  }
67
67
  },
68
- "include": ["./gtd-1.0.d.ts"]
68
+ "include": ["./gtd-1.0.d.ts","./gtd-1.0-surface.d.ts"]
69
69
  }
70
70
 
71
71