gestament 0.5.0 → 0.6.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/dist/displaySession.d.ts +2 -2
- package/dist/displaySession.d.ts.map +1 -1
- package/dist/element.d.ts +2 -2
- package/dist/element.d.ts.map +1 -1
- package/dist/errors.d.ts +2 -2
- package/dist/generated/packageMetadata.d.ts +4 -4
- package/dist/gestament-config.d.ts +2 -2
- package/dist/gestament-launcher-driver.cjs +13 -1
- package/dist/gestament-launcher-driver.cjs.map +1 -1
- package/dist/gestament-launcher-driver.d.ts +2 -2
- package/dist/gestament-launcher-driver.mjs +13 -1
- package/dist/gestament-launcher-driver.mjs.map +1 -1
- package/dist/gestament-tray-host.cjs +1 -1
- package/dist/gestament-tray-host.d.ts +2 -2
- package/dist/gestament-tray-host.mjs +1 -1
- package/dist/gestament-xvfb-pool-probe.cjs +1 -1
- package/dist/gestament-xvfb-pool-probe.d.ts +2 -2
- package/dist/gestament-xvfb-pool-probe.mjs +1 -1
- package/dist/gestament-xvfb-worker.d.ts +2 -2
- package/dist/gestament-xvfb.d.ts +2 -2
- package/dist/gestament.cjs +1 -1
- package/dist/gestament.d.ts +2 -2
- package/dist/gestament.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{launchGtkApp-EI6OIpPI.js → launchGtkApp-B3FMzhrc.js} +52 -2
- package/dist/launchGtkApp-B3FMzhrc.js.map +1 -0
- package/dist/{launchGtkApp-CzYcrc9f.cjs → launchGtkApp-OggUtTTC.cjs} +54 -4
- package/dist/launchGtkApp-OggUtTTC.cjs.map +1 -0
- package/dist/launchGtkApp.d.ts +2 -2
- package/dist/launcherDriverProtocol.d.ts +14 -3
- package/dist/launcherDriverProtocol.d.ts.map +1 -1
- package/dist/{native-DlCBBWlV.js → native-C2tzSvVW.js} +25 -11
- package/dist/native-C2tzSvVW.js.map +1 -0
- package/dist/{native-Kfm95Uxw.cjs → native-Xz0gjKti.cjs} +18 -4
- package/dist/native-Xz0gjKti.cjs.map +1 -0
- package/dist/native.d.ts +8 -2
- package/dist/native.d.ts.map +1 -1
- package/dist/output.d.ts +2 -2
- package/dist/packageMetadata-BQE2KNaa.js +5 -0
- package/dist/{packageMetadata-DjxyJCJm.js.map → packageMetadata-BQE2KNaa.js.map} +1 -1
- package/dist/packageMetadata-BqAHZ5WO.cjs +4 -0
- package/dist/{packageMetadata-CewXH0iF.cjs.map → packageMetadata-BqAHZ5WO.cjs.map} +1 -1
- package/dist/prerequisites.d.ts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/tray.d.ts +2 -2
- package/dist/types.d.ts +25 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/wait.d.ts +2 -2
- package/package.json +7 -7
- package/prebuilds/linux-arm/gtk3/node.napi.armv7.glibc.node +0 -0
- package/prebuilds/linux-arm/gtk4/node.napi.armv7.glibc.node +0 -0
- package/prebuilds/linux-arm64/gtk3/node.napi.glibc.node +0 -0
- package/prebuilds/linux-arm64/gtk4/node.napi.glibc.node +0 -0
- package/prebuilds/linux-ia32/gtk3/node.napi.glibc.node +0 -0
- package/prebuilds/linux-ia32/gtk4/node.napi.glibc.node +0 -0
- package/prebuilds/linux-riscv64/gtk3/node.napi.glibc.node +0 -0
- package/prebuilds/linux-riscv64/gtk4/node.napi.glibc.node +0 -0
- package/prebuilds/linux-x64/gtk3/node.napi.glibc.node +0 -0
- package/prebuilds/linux-x64/gtk4/node.napi.glibc.node +0 -0
- package/dist/launchGtkApp-CzYcrc9f.cjs.map +0 -1
- package/dist/launchGtkApp-EI6OIpPI.js.map +0 -1
- package/dist/native-DlCBBWlV.js.map +0 -1
- package/dist/native-Kfm95Uxw.cjs.map +0 -1
- package/dist/packageMetadata-CewXH0iF.cjs +0 -4
- package/dist/packageMetadata-DjxyJCJm.js +0 -5
|
@@ -8,7 +8,7 @@ const node_os = require("node:os");
|
|
|
8
8
|
const node_path = require("node:path");
|
|
9
9
|
const node_url = require("node:url");
|
|
10
10
|
const prerequisites = require("./prerequisites-BuZST2Dy.cjs");
|
|
11
|
-
const native = require("./native-
|
|
11
|
+
const native = require("./native-Xz0gjKti.cjs");
|
|
12
12
|
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
13
13
|
const normalizeOutputBufferBytes = (value, optionName = "outputBufferBytes") => {
|
|
14
14
|
if (value === void 0) {
|
|
@@ -684,7 +684,7 @@ const resolveLauncherEnvironment = (options, effective) => {
|
|
|
684
684
|
};
|
|
685
685
|
const resolveDriverPath = () => {
|
|
686
686
|
const driverPath = node_path.resolve(
|
|
687
|
-
node_path.dirname(node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("launchGtkApp-
|
|
687
|
+
node_path.dirname(node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("launchGtkApp-OggUtTTC.cjs", document.baseURI).href)),
|
|
688
688
|
"..",
|
|
689
689
|
"dist",
|
|
690
690
|
"gestament-launcher-driver.cjs"
|
|
@@ -698,7 +698,7 @@ const resolveDriverPath = () => {
|
|
|
698
698
|
};
|
|
699
699
|
const resolveXvfbPoolProbePath = () => {
|
|
700
700
|
const probePath = node_path.resolve(
|
|
701
|
-
node_path.dirname(node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("launchGtkApp-
|
|
701
|
+
node_path.dirname(node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("launchGtkApp-OggUtTTC.cjs", document.baseURI).href)),
|
|
702
702
|
"..",
|
|
703
703
|
"dist",
|
|
704
704
|
"gestament-xvfb-pool-probe.cjs"
|
|
@@ -1782,9 +1782,23 @@ const createProxyGtkElement = (session, ref) => {
|
|
|
1782
1782
|
switch (ref.kind) {
|
|
1783
1783
|
case "window":
|
|
1784
1784
|
target.bounds = () => session.request("element.bounds", { elementId });
|
|
1785
|
+
target.moveTo = (x, y) => session.request("window.moveTo", {
|
|
1786
|
+
elementId,
|
|
1787
|
+
x,
|
|
1788
|
+
y
|
|
1789
|
+
});
|
|
1785
1790
|
target.resizeHints = () => session.request("window.resizeHints", {
|
|
1786
1791
|
elementId
|
|
1787
1792
|
});
|
|
1793
|
+
target.resizeTo = (width, height) => session.request("window.resizeTo", {
|
|
1794
|
+
elementId,
|
|
1795
|
+
height,
|
|
1796
|
+
width
|
|
1797
|
+
});
|
|
1798
|
+
target.setBounds = (bounds) => session.request("window.setBounds", {
|
|
1799
|
+
bounds,
|
|
1800
|
+
elementId
|
|
1801
|
+
});
|
|
1788
1802
|
target.x11Info = () => session.request("window.x11Info", { elementId });
|
|
1789
1803
|
addChildContainerProxyOperations(session, elementId, target);
|
|
1790
1804
|
break;
|
|
@@ -2007,6 +2021,19 @@ const assertFiniteNumber = (name, value) => {
|
|
|
2007
2021
|
throw errors.createGtkInvalidArgumentError(`${name} must be a finite number.`);
|
|
2008
2022
|
}
|
|
2009
2023
|
};
|
|
2024
|
+
const int32Min = -2147483648;
|
|
2025
|
+
const int32Max = 2147483647;
|
|
2026
|
+
const assertInt32 = (name, value) => {
|
|
2027
|
+
if (!Number.isInteger(value) || value < int32Min || value > int32Max) {
|
|
2028
|
+
throw errors.createGtkInvalidArgumentError(`${name} must be a 32-bit integer.`);
|
|
2029
|
+
}
|
|
2030
|
+
};
|
|
2031
|
+
const assertPositiveInt32 = (name, value) => {
|
|
2032
|
+
assertInt32(name, value);
|
|
2033
|
+
if (value <= 0) {
|
|
2034
|
+
throw errors.createGtkInvalidArgumentError(`${name} must be greater than zero.`);
|
|
2035
|
+
}
|
|
2036
|
+
};
|
|
2010
2037
|
const normalizeRoleName = (roleName) => roleName.trim().toLowerCase().replace(/[_-]+/g, " ").replace(/\s+/g, " ");
|
|
2011
2038
|
const hasInterface = (info, name) => info.interfaces.some(
|
|
2012
2039
|
(interfaceName) => interfaceName.toLowerCase() === name.toLowerCase()
|
|
@@ -2399,6 +2426,26 @@ const createImageInfoOperation = (handle) => async () => {
|
|
|
2399
2426
|
};
|
|
2400
2427
|
};
|
|
2401
2428
|
const createBoundsOperation = (handle) => async () => native.nativeBounds(handle);
|
|
2429
|
+
const createMoveToOperation = (handle) => async (x, y) => {
|
|
2430
|
+
assertInt32("x", x);
|
|
2431
|
+
assertInt32("y", y);
|
|
2432
|
+
return native.nativeMoveWindow(handle, x, y);
|
|
2433
|
+
};
|
|
2434
|
+
const createResizeToOperation = (handle) => async (width, height) => {
|
|
2435
|
+
assertPositiveInt32("width", width);
|
|
2436
|
+
assertPositiveInt32("height", height);
|
|
2437
|
+
return native.nativeResizeWindow(handle, width, height);
|
|
2438
|
+
};
|
|
2439
|
+
const createSetBoundsOperation = (handle) => async (bounds) => {
|
|
2440
|
+
if (typeof bounds !== "object" || bounds === null) {
|
|
2441
|
+
throw errors.createGtkInvalidArgumentError("bounds must be an object.");
|
|
2442
|
+
}
|
|
2443
|
+
assertInt32("bounds.x", bounds.x);
|
|
2444
|
+
assertInt32("bounds.y", bounds.y);
|
|
2445
|
+
assertPositiveInt32("bounds.width", bounds.width);
|
|
2446
|
+
assertPositiveInt32("bounds.height", bounds.height);
|
|
2447
|
+
return native.nativeSetWindowBounds(handle, bounds);
|
|
2448
|
+
};
|
|
2402
2449
|
const createResizeHintsOperation = (handle) => async () => native.nativeResizeHints(handle);
|
|
2403
2450
|
const createX11InfoOperation = (handle) => async () => native.nativeX11Info(handle);
|
|
2404
2451
|
const createValueOperation = (handle) => async () => native.nativeValueInfo(handle).value;
|
|
@@ -2573,7 +2620,10 @@ const createGtkElement = (handle) => {
|
|
|
2573
2620
|
...common,
|
|
2574
2621
|
kind: "window",
|
|
2575
2622
|
bounds: createBoundsOperation(handle),
|
|
2623
|
+
moveTo: createMoveToOperation(handle),
|
|
2576
2624
|
...createChildContainerOperations(handle, void 0),
|
|
2625
|
+
resizeTo: createResizeToOperation(handle),
|
|
2626
|
+
setBounds: createSetBoundsOperation(handle),
|
|
2577
2627
|
resizeHints: createResizeHintsOperation(handle),
|
|
2578
2628
|
x11Info: createX11InfoOperation(handle)
|
|
2579
2629
|
};
|
|
@@ -3181,4 +3231,4 @@ const createGtkAppLauncher = (options) => createDriverBackedGtkAppLauncher(optio
|
|
|
3181
3231
|
exports.createGtkAppEnvironment = createGtkAppEnvironment;
|
|
3182
3232
|
exports.createGtkAppLauncher = createGtkAppLauncher;
|
|
3183
3233
|
exports.launchGtkApp = launchGtkApp;
|
|
3184
|
-
//# sourceMappingURL=launchGtkApp-
|
|
3234
|
+
//# sourceMappingURL=launchGtkApp-OggUtTTC.cjs.map
|