@gjsify/adwaita-app 0.64.37 → 0.64.40

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.
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";import{loadOptionalNativeModule as e}from"@gjsify/utils/core";function installDockReopen(t=process.platform,n){if(t!==`darwin`)return!1;let{module:r}=e(`GjsifyQuartz`,[`install_reopen_handler`],n);if(!r)return!1;try{return r.install_reopen_handler()}catch{return!1}}export{installDockReopen};
1
+ import"./_virtual/_rolldown/runtime.js";import{loadOptionalNativeModule as e}from"@gjsify/utils/core";function nodeHostGi(e){try{let t=(e??(process.getBuiltinModule?.(`node:module`))?.createRequire(import.meta.url))?.(`@gjsify/node-gi/gi`)?.requireGi;return typeof t==`function`?{GjsifyQuartz:t(`GjsifyQuartz`,`1.0`)}:void 0}catch{return}}function installDockReopen(t=process.platform,n){if(t!==`darwin`)return!1;let r=n??globalThis.imports?.gi??nodeHostGi();if(!r)return!1;let{module:i}=e(`GjsifyQuartz`,[`install_reopen_handler`],r);if(!i)return!1;try{return i.install_reopen_handler()}catch{return!1}}export{installDockReopen,nodeHostGi};
@@ -1,9 +1,26 @@
1
1
  import { type GiImportsView } from '@gjsify/utils/core';
2
+ /** How a Node host hands out a CommonJS module — `createRequire(import.meta.url)`. */
3
+ export type NodeRequire = (id: string) => unknown;
4
+ /**
5
+ * An `imports.gi` look-alike for a Node host (ADR 0141 § Node hosts), or `undefined`
6
+ * when there is no node-gi to ask.
7
+ *
8
+ * `imports.gi` exists on GJS only; on Node the namespaces come from
9
+ * `@gjsify/node-gi/gi`, which the bundler keeps external and which therefore
10
+ * resolves from the bundle's own location — the same lookup the `gi://` shims
11
+ * make. Resolved eagerly and inside a `try`, like the `&optional` node shim
12
+ * (ADR 0087): an absent typelib must read as "no bridge", not throw.
13
+ *
14
+ * @param require the module loader to reach node-gi through; a parameter so the
15
+ * spec can drive it without a node-gi
16
+ */
17
+ export declare function nodeHostGi(require?: NodeRequire): GiImportsView | undefined;
2
18
  /**
3
19
  * Install the Dock-click reopen handler on darwin.
4
20
  *
5
21
  * @param platform the OS to act on — a parameter so the spec can drive it
6
- * @param gi the `imports.gi` to load the bridge from — defaults to the host's
22
+ * @param gi the `imports.gi` to load the bridge from — defaults to the host's:
23
+ * GJS's `imports.gi`, or node-gi on a Node host
7
24
  * @returns whether this call installed the handler; `false` off darwin, without
8
25
  * the bridge, or when GTK already implements it
9
26
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-app",
3
- "version": "0.64.37",
3
+ "version": "0.64.40",
4
4
  "description": "Native Adwaita application shell for GJS/GTK apps — Adw.Application lifecycle (runAsync + devtools + CSS), a data-driven NavigationSplitView nav shell, an async-view mounter, promise dialog/toast/file helpers, and a display-less reader of the desktop accent and colour scheme (`./appearance`)",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -62,17 +62,17 @@
62
62
  "@girs/glib-2.0": "5.4.0",
63
63
  "@girs/gobject-2.0": "5.4.0",
64
64
  "@girs/gtk-4.0": "5.4.0",
65
- "@gjsify/adwaita-core": "^0.64.37",
66
- "@gjsify/devtools": "^0.64.37",
67
- "@gjsify/utils": "^0.64.37"
65
+ "@gjsify/adwaita-core": "^0.64.40",
66
+ "@gjsify/devtools": "^0.64.40",
67
+ "@gjsify/utils": "^0.64.40"
68
68
  },
69
69
  "optionalDependencies": {
70
- "@gjsify/gtk-quartz-native": "^0.64.37"
70
+ "@gjsify/gtk-quartz-native": "^0.64.40"
71
71
  },
72
72
  "devDependencies": {
73
- "@gjsify/cli": "^0.64.37",
74
- "@gjsify/storybook": "^0.64.37",
75
- "@gjsify/unit": "^0.64.37",
73
+ "@gjsify/cli": "^0.64.40",
74
+ "@gjsify/storybook": "^0.64.40",
75
+ "@gjsify/unit": "^0.64.40",
76
76
  "@types/node": "^25.9.2",
77
77
  "typescript": "^6.0.3"
78
78
  },