@girs/gcrui-3 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/gcrui-3)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GcrUi-3, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.1.0.
8
+ GJS TypeScript type definitions for GcrUi-3 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
9
9
 
10
10
  ## Install
11
11
 
@@ -0,0 +1,281 @@
1
+ /**
2
+ * The GIR-derived widget VOCABULARY for GcrUi-3.
3
+ *
4
+ * GENERATED — do not edit. Provenance: GcrUi-3 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface — inlined base(s) from a namespace with no surface: Gcr.Prompt — prop(s) no TypeScript value satisfies: GcrUi.TreeSelector.columns
5
+ *
6
+ * 9 concrete widgets, 10 declarations (1 inlined from a namespace with no surface), 0 enum nick unions, 0 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 Gck from '@girs/gck-1';
28
+ import type Gcr from '@girs/gcr-3';
29
+ import type GcrUi from './gcrui-3.js';
30
+ import type { GtkActionableConstructOnly, GtkActionableProps, GtkActivatableConstructOnly, GtkActivatableProps, GtkBinConstructOnly, GtkBinProps, GtkBoxConstructOnly, GtkBoxProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkButtonConstructOnly, GtkButtonProps, GtkCellEditableConstructOnly, GtkCellEditableProps, GtkCellLayoutConstructOnly, GtkCellLayoutProps, GtkComboBoxConstructOnly, GtkComboBoxProps, GtkContainerConstructOnly, GtkContainerProps, GtkDialogConstructOnly, GtkDialogProps, GtkOrientableConstructOnly, GtkOrientableProps, GtkScrollableConstructOnly, GtkScrollableProps, GtkTreeViewConstructOnly, GtkTreeViewProps, GtkWidgetConstructOnly, GtkWidgetProps, GtkWindowConstructOnly, GtkWindowProps } from '@girs/gtk-3.0/surface';
31
+
32
+ // ---------------------------------------------------------------------------
33
+ // Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
34
+ //
35
+ // Not derived from the member name. Substituting underscores for dashes is not a law:
36
+ // some nicks keep an underscore the substitution would have replaced, and only the
37
+ // attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
38
+ // how a derived nick passes review and breaks elsewhere.
39
+ // Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
40
+ // ---------------------------------------------------------------------------
41
+
42
+
43
+
44
+ // ---------------------------------------------------------------------------
45
+ // Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
46
+ // inheritance rather than flattening per widget.
47
+ //
48
+ // The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
49
+ // of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
50
+ // because GObject installs interface properties on the implementor at runtime while
51
+ // GIR keeps them once, on the interface.
52
+ // ---------------------------------------------------------------------------
53
+
54
+ /** A widget that can be used to display a certificate. */
55
+ export interface GcrCertificateWidgetProps extends GtkBinProps, GtkBuildableProps {
56
+ attributes?: Gck.Attributes | null;
57
+ certificate?: Gcr.Certificate | null;
58
+ }
59
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
60
+ export type GcrCertificateWidgetConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
61
+
62
+ /** A widget that can be used to select a certificate or key. */
63
+ export interface GcrComboSelectorProps extends GtkComboBoxProps, GtkBuildableProps, GtkCellEditableProps, GtkCellLayoutProps {
64
+ /** The collection which contains the objects to display in the selector. */
65
+ collection?: Gcr.Collection;
66
+ }
67
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
68
+ export type GcrComboSelectorConstructOnly = GtkComboBoxConstructOnly | GtkBuildableConstructOnly | GtkCellEditableConstructOnly | GtkCellLayoutConstructOnly | 'collection';
69
+
70
+ /** A button which imports keys and certificates. */
71
+ export interface GcrImportButtonProps extends GtkButtonProps, GtkActionableProps, GtkActivatableProps, GtkBuildableProps {
72
+ }
73
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
74
+ export type GcrImportButtonConstructOnly = GtkButtonConstructOnly | GtkActionableConstructOnly | GtkActivatableConstructOnly | GtkBuildableConstructOnly;
75
+
76
+ /** A key widget and renderer A key widget can be used to display a RSA, DSA or EC key. */
77
+ export interface GcrKeyWidgetProps extends GtkBinProps, GtkBuildableProps {
78
+ attributes?: Gck.Attributes | null;
79
+ }
80
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
81
+ export type GcrKeyWidgetConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
82
+
83
+ /** A selector widget to select 1 or more certificates or keys from a list. */
84
+ export interface GcrListSelectorProps extends GtkTreeViewProps, GtkBuildableProps, GtkScrollableProps {
85
+ /** The collection which contains the objects to display in the selector. */
86
+ collection?: Gcr.Collection;
87
+ }
88
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
89
+ export type GcrListSelectorConstructOnly = GtkTreeViewConstructOnly | GtkBuildableConstructOnly | GtkScrollableConstructOnly | 'collection';
90
+
91
+ /** A prompt displayed to the user. */
92
+ export interface GcrPromptProps {
93
+ /** The string handle of the caller's window. */
94
+ 'caller-window'?: string;
95
+ /** The label for the cancel button in the prompt. */
96
+ 'cancel-label'?: string;
97
+ /** Whether the additional choice is chosen or not. */
98
+ 'choice-chosen'?: boolean;
99
+ /** The label for the additional choice. */
100
+ 'choice-label'?: string;
101
+ /** The label for the continue button in the prompt. */
102
+ 'continue-label'?: string;
103
+ /** The detailed description of the prompt. */
104
+ description?: string;
105
+ /** The prompt message for the user. */
106
+ message?: string;
107
+ /** Whether the prompt will prompt for a new password. */
108
+ 'password-new'?: boolean;
109
+ /** The title of the prompt. */
110
+ title?: string;
111
+ /** A prompt warning displayed on the prompt, or %NULL for no warning. */
112
+ warning?: string;
113
+ }
114
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
115
+ export type GcrPromptConstructOnly = never;
116
+
117
+ /** A [iface@Gcr.Prompt] implementation which shows a GTK dialog. */
118
+ export interface GcrPromptDialogProps extends GtkDialogProps, Omit<GcrPromptProps, 'title'>, GtkBuildableProps {
119
+ }
120
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
121
+ export type GcrPromptDialogConstructOnly = GtkDialogConstructOnly | GcrPromptConstructOnly | GtkBuildableConstructOnly;
122
+
123
+ /** A tree selector can be used to select certificates or keys. */
124
+ export interface GcrTreeSelectorProps extends GtkTreeViewProps, GtkBuildableProps, GtkScrollableProps {
125
+ /** The collection which contains the objects to display in the selector. */
126
+ collection?: Gcr.Collection;
127
+ /** The columns to use to display the objects. */
128
+ columns?: never;
129
+ }
130
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
131
+ export type GcrTreeSelectorConstructOnly = GtkTreeViewConstructOnly | GtkBuildableConstructOnly | GtkScrollableConstructOnly | 'collection' | 'columns';
132
+
133
+ /** This widget displays a set of unlock options for the user to select. */
134
+ export interface GcrUnlockOptionsWidgetProps extends GtkBinProps, GtkBuildableProps {
135
+ choice?: string;
136
+ ttl?: number;
137
+ }
138
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
139
+ export type GcrUnlockOptionsWidgetConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
140
+
141
+ /** A viewer widget which can display certificates and keys that are located in files. */
142
+ export interface GcrViewerWidgetProps extends GtkBoxProps, GtkBuildableProps, GtkOrientableProps {
143
+ /** Display name for data being displayed. */
144
+ 'display-name'?: string;
145
+ }
146
+ /** Settable only at construction — a renderer must REBUILD, not patch. */
147
+ export type GcrViewerWidgetConstructOnly = GtkBoxConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly;
148
+
149
+ // ---------------------------------------------------------------------------
150
+ // The GType-keyed widget map.
151
+ //
152
+ // Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
153
+ // consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
154
+ // for a Vue `GlobalComponents`, the class itself for a renderer whose element type
155
+ // is the class. None of those is baked in here.
156
+ //
157
+ // `slotCandidates` is a candidate list and never an answer: derived from methods
158
+ // taking exactly one widget argument. The GIR cannot tell adoption from reference —
159
+ // `set_title_widget` parents its argument and `set_activatable_widget` does not, and
160
+ // both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
161
+ // this is what notices when a release adds a candidate.
162
+ // ---------------------------------------------------------------------------
163
+
164
+ export interface Widgets {
165
+ GcrCertificateWidget: {
166
+ class: GcrUi.CertificateWidget;
167
+ props: GcrCertificateWidgetProps;
168
+ signals: GcrUi.CertificateWidget.SignalSignatures;
169
+ constructOnly: GcrCertificateWidgetConstructOnly;
170
+ slotCandidates: {};
171
+ };
172
+ GcrComboSelector: {
173
+ class: GcrUi.ComboSelector;
174
+ props: GcrComboSelectorProps;
175
+ signals: GcrUi.ComboSelector.SignalSignatures;
176
+ constructOnly: GcrComboSelectorConstructOnly;
177
+ slotCandidates: {};
178
+ };
179
+ GcrImportButton: {
180
+ class: GcrUi.ImportButton;
181
+ props: GcrImportButtonProps;
182
+ signals: GcrUi.ImportButton.SignalSignatures;
183
+ constructOnly: GcrImportButtonConstructOnly;
184
+ slotCandidates: {};
185
+ };
186
+ GcrKeyWidget: {
187
+ class: GcrUi.KeyWidget;
188
+ props: GcrKeyWidgetProps;
189
+ signals: GcrUi.KeyWidget.SignalSignatures;
190
+ constructOnly: GcrKeyWidgetConstructOnly;
191
+ slotCandidates: {};
192
+ };
193
+ GcrListSelector: {
194
+ class: GcrUi.ListSelector;
195
+ props: GcrListSelectorProps;
196
+ signals: GcrUi.ListSelector.SignalSignatures;
197
+ constructOnly: GcrListSelectorConstructOnly;
198
+ slotCandidates: {};
199
+ };
200
+ GcrPromptDialog: {
201
+ class: GcrUi.PromptDialog;
202
+ props: GcrPromptDialogProps;
203
+ signals: GcrUi.PromptDialog.SignalSignatures;
204
+ constructOnly: GcrPromptDialogConstructOnly;
205
+ slotCandidates: {};
206
+ };
207
+ GcrTreeSelector: {
208
+ class: GcrUi.TreeSelector;
209
+ props: GcrTreeSelectorProps;
210
+ signals: GcrUi.TreeSelector.SignalSignatures;
211
+ constructOnly: GcrTreeSelectorConstructOnly;
212
+ slotCandidates: {};
213
+ };
214
+ GcrUnlockOptionsWidget: {
215
+ class: GcrUi.UnlockOptionsWidget;
216
+ props: GcrUnlockOptionsWidgetProps;
217
+ signals: GcrUi.UnlockOptionsWidget.SignalSignatures;
218
+ constructOnly: GcrUnlockOptionsWidgetConstructOnly;
219
+ slotCandidates: {};
220
+ };
221
+ GcrViewerWidget: {
222
+ class: GcrUi.ViewerWidget;
223
+ props: GcrViewerWidgetProps;
224
+ signals: GcrUi.ViewerWidget.SignalSignatures;
225
+ constructOnly: GcrViewerWidgetConstructOnly;
226
+ slotCandidates: {};
227
+ };
228
+ }
229
+
230
+ /** Every GType this namespace can create. A consumer derives its own tag map. */
231
+ export type WidgetGType = keyof Widgets;
232
+
233
+ /** The writable, optional, GObject-keyed property surface of one GType. */
234
+ export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
235
+
236
+ /** The signal table this package already emits, reached by GType. */
237
+ export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
238
+
239
+ /** The instance type — what a `ref`-shaped prop should infer. */
240
+ export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
241
+
242
+ /** Property names that can only be set at construction. */
243
+ export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
244
+
245
+ /** Candidate child slots — see the note above; curation decides. */
246
+ export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
247
+
248
+ /**
249
+ * The same facts as runtime data, for a consumer that CHECKS them.
250
+ *
251
+ * Types are erased, so a spec that asks the installed GTK whether every property
252
+ * here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
253
+ * and every nick resolvable through an enum lookup cannot read the interfaces
254
+ * above. Emitted headlessly with no GTK present, which is exactly why the checking
255
+ * belongs to the consumer and the DATA belongs here.
256
+ */
257
+ export const SURFACE_PROVENANCE: string;
258
+
259
+ /** Declaration GType -> its own settable properties, as GObject registered them. */
260
+ export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
261
+
262
+ /** Widget GType -> its own signals. */
263
+ export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
264
+
265
+ /** Widget GType -> every declaration its members come from, self first. */
266
+ export const DECLS: Readonly<Record<string, readonly string[]>>;
267
+
268
+ /** Enum GType -> the nicks this surface offers. */
269
+ export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
270
+
271
+ /** Widget GType -> slot name -> the method that may adopt a child there. */
272
+ export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
273
+
274
+ /**
275
+ * `Type.property` -> the release that introduced it.
276
+ *
277
+ * What keeps a runtime cross-check honest across a version gap without an
278
+ * allowlist: a member the installed library lacks is a defect UNLESS the version
279
+ * here is newer than the one running.
280
+ */
281
+ export const SINCE: Readonly<Record<string, string>>;
@@ -0,0 +1,43 @@
1
+ // The widget vocabulary of GcrUi-3 as runtime data.
2
+ //
3
+ // GENERATED — do not edit. Provenance: GcrUi-3 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface — inlined base(s) from a namespace with no surface: Gcr.Prompt — prop(s) no TypeScript value satisfies: GcrUi.TreeSelector.columns
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 = 'GcrUi-3 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface — inlined base(s) from a namespace with no surface: Gcr.Prompt — prop(s) no TypeScript value satisfies: GcrUi.TreeSelector.columns';
10
+
11
+ export const OWN_PROPS = {
12
+ GcrCertificateWidget: ['attributes', 'certificate'],
13
+ GcrComboSelector: ['collection'],
14
+ GcrKeyWidget: ['attributes'],
15
+ GcrListSelector: ['collection'],
16
+ GcrPrompt: ['caller-window', 'cancel-label', 'choice-chosen', 'choice-label', 'continue-label', 'description', 'message', 'password-new', 'title', 'warning'],
17
+ GcrTreeSelector: ['collection', 'columns'],
18
+ GcrUnlockOptionsWidget: ['choice', 'ttl'],
19
+ GcrViewerWidget: ['display-name'],
20
+ };
21
+
22
+ export const OWN_SIGNALS = {
23
+ GcrImportButton: ['imported', 'importing'],
24
+ GcrViewerWidget: ['added'],
25
+ };
26
+
27
+ export const DECLS = {
28
+ GcrCertificateWidget: ['GcrCertificateWidget', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
29
+ GcrComboSelector: ['GcrComboSelector', 'GtkComboBox', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkCellEditable', 'GtkCellLayout'],
30
+ GcrImportButton: ['GcrImportButton', 'GtkButton', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkActionable', 'GtkActivatable', 'GtkBuildable'],
31
+ GcrKeyWidget: ['GcrKeyWidget', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
32
+ GcrListSelector: ['GcrListSelector', 'GtkTreeView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
33
+ GcrPromptDialog: ['GcrPromptDialog', 'GtkDialog', 'GtkWindow', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GcrPrompt', 'GtkBuildable'],
34
+ GcrTreeSelector: ['GcrTreeSelector', 'GtkTreeView', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkScrollable'],
35
+ GcrUnlockOptionsWidget: ['GcrUnlockOptionsWidget', 'GtkBin', 'GtkContainer', 'GtkWidget', 'GtkBuildable'],
36
+ GcrViewerWidget: ['GcrViewerWidget', 'GtkBox', 'GtkContainer', 'GtkWidget', 'GtkBuildable', 'GtkOrientable'],
37
+ };
38
+
39
+ export const ENUM_NICKS = {};
40
+
41
+ export const SLOT_CANDIDATES = {};
42
+
43
+ export const SINCE = {};
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@girs/gcrui-3",
3
- "version": "4.1.0",
4
- "libraryVersion": "3.0.0",
5
- "description": "GJS TypeScript type definitions for GcrUi-3, generated from library version 3.0.0",
3
+ "version": "4.2.0",
4
+ "description": "GJS TypeScript type definitions for GcrUi-3",
6
5
  "type": "module",
7
6
  "module": "gcrui-3.js",
8
7
  "main": "gcrui-3.js",
@@ -17,6 +16,11 @@
17
16
  "import": "./gcrui-3-import.js",
18
17
  "default": "./gcrui-3-import.js"
19
18
  },
19
+ "./surface": {
20
+ "types": "./gcrui-3-surface.d.ts",
21
+ "import": "./gcrui-3-surface.js",
22
+ "default": "./gcrui-3-surface.js"
23
+ },
20
24
  "./gcrui-3": {
21
25
  "types": "./gcrui-3.d.ts",
22
26
  "import": "./gcrui-3.js",
@@ -32,22 +36,22 @@
32
36
  "test": "tsc --project tsconfig.json"
33
37
  },
34
38
  "dependencies": {
35
- "@girs/gjs": "^4.1.0",
36
- "@girs/gtk-3.0": "^4.1.0",
37
- "@girs/xlib-2.0": "^4.1.0",
38
- "@girs/gdk-3.0": "^4.1.0",
39
- "@girs/cairo-1.0": "^4.1.0",
40
- "@girs/gobject-2.0": "^4.1.0",
41
- "@girs/glib-2.0": "^4.1.0",
42
- "@girs/pango-1.0": "^4.1.0",
43
- "@girs/harfbuzz-0.0": "^4.1.0",
44
- "@girs/freetype2-2.0": "^4.1.0",
45
- "@girs/gio-2.0": "^4.1.0",
46
- "@girs/gmodule-2.0": "^4.1.0",
47
- "@girs/gdkpixbuf-2.0": "^4.1.0",
48
- "@girs/atk-1.0": "^4.1.0",
49
- "@girs/gcr-3": "^4.1.0",
50
- "@girs/gck-1": "^4.1.0" },
39
+ "@girs/gjs": "^4.2.0",
40
+ "@girs/gtk-3.0": "^4.2.0",
41
+ "@girs/xlib-2.0": "^4.2.0",
42
+ "@girs/gdk-3.0": "^4.2.0",
43
+ "@girs/cairo-1.0": "^4.2.0",
44
+ "@girs/gobject-2.0": "^4.2.0",
45
+ "@girs/glib-2.0": "^4.2.0",
46
+ "@girs/pango-1.0": "^4.2.0",
47
+ "@girs/harfbuzz-0.0": "^4.2.0",
48
+ "@girs/freetype2-2.0": "^4.2.0",
49
+ "@girs/gio-2.0": "^4.2.0",
50
+ "@girs/gmodule-2.0": "^4.2.0",
51
+ "@girs/gdkpixbuf-2.0": "^4.2.0",
52
+ "@girs/atk-1.0": "^4.2.0",
53
+ "@girs/gcr-3": "^4.2.0",
54
+ "@girs/gck-1": "^4.2.0" },
51
55
  "devDependencies": {
52
56
  "typescript": "*"
53
57
  },
package/tsconfig.json CHANGED
@@ -68,7 +68,7 @@
68
68
  ]
69
69
  }
70
70
  },
71
- "include": ["./gcrui-3.d.ts"]
71
+ "include": ["./gcrui-3.d.ts","./gcrui-3-surface.d.ts"]
72
72
  }
73
73
 
74
74