@gjsify/resolve-npm 0.56.0 → 0.58.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/lib/gi-renderers.mjs +13 -4
- package/lib/index.d.ts +9 -1
- package/package.json +1 -1
package/lib/gi-renderers.mjs
CHANGED
|
@@ -27,18 +27,27 @@
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* `--app <target>` → the package whose `Adw` / `Gtk` namespace exports answer `gi://`, and
|
|
30
|
-
* the GIR namespace versions that arm accepts.
|
|
30
|
+
* the GIR namespace versions that arm accepts. `specifiers` names a module whose exports ARE a
|
|
31
|
+
* namespace, for one that is not a member of the renderer's root barrel: `@gjsify/adwaita-nativescript`
|
|
32
|
+
* keeps `GObject` in its `/gobject` subpath (ADR 0096), the web renderer exports it from the
|
|
33
|
+
* root, and `@gjsify/gtksource-nativescript` is a package of its own that depends on the renderer
|
|
34
|
+
* (ADR 0094), so its `GtkSource` namespace can only be named by specifier. A namespace with no entry
|
|
35
|
+
* is read from `renderer`. The browser row reads `GtkSource` from the renderer's root barrel (`@gjsify/adwaita-web` exports it, over the same core).
|
|
31
36
|
*
|
|
32
|
-
* @type {Readonly<Record<string, { renderer: string, namespaces: Readonly<Record<string, string>> }>>}
|
|
37
|
+
* @type {Readonly<Record<string, { renderer: string, namespaces: Readonly<Record<string, string>>, specifiers?: Readonly<Record<string, string>> }>>}
|
|
33
38
|
*/
|
|
34
39
|
export const GI_RENDERERS = {
|
|
35
40
|
browser: {
|
|
36
41
|
renderer: '@gjsify/adwaita-web',
|
|
37
|
-
namespaces: { Adw: '1', Gtk: '4.0' },
|
|
42
|
+
namespaces: { Adw: '1', Gtk: '4.0', GObject: '2.0', Gio: '2.0', GLib: '2.0', GtkSource: '5' },
|
|
38
43
|
},
|
|
39
44
|
nativescript: {
|
|
40
45
|
renderer: '@gjsify/adwaita-nativescript',
|
|
41
|
-
namespaces: { Adw: '1', Gtk: '4.0' },
|
|
46
|
+
namespaces: { Adw: '1', Gtk: '4.0', GObject: '2.0', Gio: '2.0', GLib: '2.0', GtkSource: '5' },
|
|
47
|
+
specifiers: {
|
|
48
|
+
GObject: '@gjsify/adwaita-nativescript/gobject',
|
|
49
|
+
GtkSource: '@gjsify/gtksource-nativescript/gtksource',
|
|
50
|
+
},
|
|
42
51
|
},
|
|
43
52
|
};
|
|
44
53
|
|
package/lib/index.d.ts
CHANGED
|
@@ -103,7 +103,15 @@ export declare function listDeclaredRuntimes(): Promise<
|
|
|
103
103
|
* module, which is what every target but `gjs` and `node` did before the arms existed.
|
|
104
104
|
*/
|
|
105
105
|
export declare const GI_RENDERERS: Readonly<
|
|
106
|
-
Record<
|
|
106
|
+
Record<
|
|
107
|
+
string,
|
|
108
|
+
{
|
|
109
|
+
renderer: string;
|
|
110
|
+
namespaces: Readonly<Record<string, string>>;
|
|
111
|
+
/** Namespace → the module it is imported from, when not the renderer's root barrel. */
|
|
112
|
+
specifiers?: Readonly<Record<string, string>>;
|
|
113
|
+
}
|
|
114
|
+
>
|
|
107
115
|
>;
|
|
108
116
|
|
|
109
117
|
/** The `--app` values {@link GI_RENDERERS} has a row for, so a refused flag can name them. */
|