gestament 0.2.0 → 0.4.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.
Files changed (87) hide show
  1. package/README.md +6 -6
  2. package/dist/displaySession.d.ts +18 -0
  3. package/dist/displaySession.d.ts.map +1 -0
  4. package/dist/element.d.ts +2 -2
  5. package/dist/element.d.ts.map +1 -1
  6. package/dist/errors-6gj5YuLw.cjs +36 -0
  7. package/dist/errors-6gj5YuLw.cjs.map +1 -0
  8. package/dist/errors-CCW4ATME.js +37 -0
  9. package/dist/errors-CCW4ATME.js.map +1 -0
  10. package/dist/errors.d.ts +2 -2
  11. package/dist/errors.d.ts.map +1 -1
  12. package/dist/generated/packageMetadata.d.ts +4 -4
  13. package/dist/gestament-config.d.ts +2 -2
  14. package/dist/gestament-launcher-driver.cjs +683 -0
  15. package/dist/gestament-launcher-driver.cjs.map +1 -0
  16. package/dist/gestament-launcher-driver.d.ts +13 -0
  17. package/dist/gestament-launcher-driver.d.ts.map +1 -0
  18. package/dist/gestament-launcher-driver.mjs +682 -0
  19. package/dist/gestament-launcher-driver.mjs.map +1 -0
  20. package/dist/gestament-tray-host.cjs +1 -1
  21. package/dist/gestament-tray-host.d.ts +2 -2
  22. package/dist/gestament-tray-host.mjs +1 -1
  23. package/dist/gestament-xvfb-pool-probe.cjs +29 -0
  24. package/dist/gestament-xvfb-pool-probe.cjs.map +1 -0
  25. package/dist/gestament-xvfb-pool-probe.d.ts +13 -0
  26. package/dist/gestament-xvfb-pool-probe.d.ts.map +1 -0
  27. package/dist/gestament-xvfb-pool-probe.mjs +28 -0
  28. package/dist/gestament-xvfb-pool-probe.mjs.map +1 -0
  29. package/dist/gestament-xvfb-worker.d.ts +2 -2
  30. package/dist/gestament-xvfb.cjs +15 -4
  31. package/dist/gestament-xvfb.cjs.map +1 -1
  32. package/dist/gestament-xvfb.d.ts +2 -2
  33. package/dist/gestament-xvfb.mjs +15 -4
  34. package/dist/gestament-xvfb.mjs.map +1 -1
  35. package/dist/index.cjs +4 -1147
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.ts +2 -2
  38. package/dist/index.mjs +4 -1147
  39. package/dist/index.mjs.map +1 -1
  40. package/dist/launchGtkApp-BfELuV-H.cjs +2567 -0
  41. package/dist/launchGtkApp-BfELuV-H.cjs.map +1 -0
  42. package/dist/launchGtkApp-Bst1BFbD.js +2567 -0
  43. package/dist/launchGtkApp-Bst1BFbD.js.map +1 -0
  44. package/dist/launchGtkApp.d.ts +2 -2
  45. package/dist/launchGtkApp.d.ts.map +1 -1
  46. package/dist/launcherDriverProtocol.d.ts +110 -0
  47. package/dist/launcherDriverProtocol.d.ts.map +1 -0
  48. package/dist/{native-ie_XIt1J.cjs → native-BUWDWMBB.cjs} +20 -40
  49. package/dist/native-BUWDWMBB.cjs.map +1 -0
  50. package/dist/{native-DUeVYIBs.js → native-C6MsIBNF.js} +52 -72
  51. package/dist/native-C6MsIBNF.js.map +1 -0
  52. package/dist/native.d.ts +25 -2
  53. package/dist/native.d.ts.map +1 -1
  54. package/dist/prerequisites-BuZST2Dy.cjs +15 -0
  55. package/dist/prerequisites-BuZST2Dy.cjs.map +1 -0
  56. package/dist/prerequisites-JB0SKPVd.js +16 -0
  57. package/dist/prerequisites-JB0SKPVd.js.map +1 -0
  58. package/dist/prerequisites.d.ts +23 -0
  59. package/dist/prerequisites.d.ts.map +1 -0
  60. package/dist/testing.cjs +3 -0
  61. package/dist/testing.cjs.map +1 -1
  62. package/dist/testing.d.ts +4 -2
  63. package/dist/testing.d.ts.map +1 -1
  64. package/dist/testing.mjs +4 -1
  65. package/dist/testing.mjs.map +1 -1
  66. package/dist/tray.d.ts +2 -2
  67. package/dist/types.d.ts +158 -2
  68. package/dist/types.d.ts.map +1 -1
  69. package/dist/wait-DV5gkXs8.js +113 -0
  70. package/dist/wait-DV5gkXs8.js.map +1 -0
  71. package/dist/wait-eOIz4nZm.cjs +112 -0
  72. package/dist/wait-eOIz4nZm.cjs.map +1 -0
  73. package/dist/wait.d.ts +67 -0
  74. package/dist/wait.d.ts.map +1 -0
  75. package/package.json +7 -7
  76. package/prebuilds/linux-arm/gtk3/node.napi.armv7.glibc.node +0 -0
  77. package/prebuilds/linux-arm/gtk4/node.napi.armv7.glibc.node +0 -0
  78. package/prebuilds/linux-arm64/gtk3/node.napi.glibc.node +0 -0
  79. package/prebuilds/linux-arm64/gtk4/node.napi.glibc.node +0 -0
  80. package/prebuilds/linux-ia32/gtk3/node.napi.glibc.node +0 -0
  81. package/prebuilds/linux-ia32/gtk4/node.napi.glibc.node +0 -0
  82. package/prebuilds/linux-riscv64/gtk3/node.napi.glibc.node +0 -0
  83. package/prebuilds/linux-riscv64/gtk4/node.napi.glibc.node +0 -0
  84. package/prebuilds/linux-x64/gtk3/node.napi.glibc.node +0 -0
  85. package/prebuilds/linux-x64/gtk4/node.napi.glibc.node +0 -0
  86. package/dist/native-DUeVYIBs.js.map +0 -1
  87. package/dist/native-ie_XIt1J.cjs.map +0 -1
@@ -3,35 +3,12 @@ const node_module = require("node:module");
3
3
  const node_fs = require("node:fs");
4
4
  const node_path = require("node:path");
5
5
  const node_url = require("node:url");
6
+ const errors = require("./errors-6gj5YuLw.cjs");
7
+ const prerequisites = require("./prerequisites-BuZST2Dy.cjs");
6
8
  var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
7
- const createGtkAutomationError = (code, message) => {
8
- const error = new Error(message);
9
- Object.defineProperty(error, "code", {
10
- enumerable: true,
11
- value: code
12
- });
13
- error.name = "GtkAutomationError";
14
- return error;
15
- };
16
- const createGtkAppExitedError = (message) => createGtkAutomationError("APP_EXITED", message);
17
- const createGtkInvalidArgumentError = (message) => createGtkAutomationError("INVALID_ARGUMENT", message);
18
- const createGtkElementNotFoundError = (message) => createGtkAutomationError("ELEMENT_NOT_FOUND", message);
19
- const createGtkStaleElementError = (message) => createGtkAutomationError("STALE_ELEMENT", message);
20
- const createGtkOperationFailedError = (message) => createGtkAutomationError("OPERATION_FAILED", message);
21
- const createGtkUnsupportedInterfaceError = (message) => createGtkAutomationError("UNSUPPORTED_INTERFACE", message);
22
- const normalizeNativeError = (error) => {
23
- if (error instanceof Error) {
24
- const maybeCode = error.code;
25
- if (maybeCode === "ELEMENT_NOT_FOUND" || maybeCode === "INVALID_ARGUMENT" || maybeCode === "NATIVE_LOAD_FAILED" || maybeCode === "OPERATION_FAILED" || maybeCode === "STALE_ELEMENT" || maybeCode === "UNSUPPORTED_INTERFACE") {
26
- return createGtkAutomationError(maybeCode, error.message);
27
- }
28
- return createGtkAutomationError("OPERATION_FAILED", error.message);
29
- }
30
- return createGtkAutomationError("OPERATION_FAILED", String(error));
31
- };
32
- const version = "0.2.0";
33
- const require$1 = node_module.createRequire(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("native-ie_XIt1J.cjs", document.baseURI).href);
34
- const packageRoot = node_path.resolve(node_path.dirname(node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("native-ie_XIt1J.cjs", document.baseURI).href)), "..");
9
+ const version = "0.4.0";
10
+ const require$1 = node_module.createRequire(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("native-BUWDWMBB.cjs", document.baseURI).href);
11
+ const packageRoot = node_path.resolve(node_path.dirname(node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("native-BUWDWMBB.cjs", document.baseURI).href)), "..");
35
12
  let loadedAddon;
36
13
  const createNativeLoadError = (message) => {
37
14
  const loadError = new Error(message);
@@ -99,7 +76,7 @@ const loadNativeAddon = () => {
99
76
  if (loadedAddon !== void 0) {
100
77
  return loadedAddon;
101
78
  }
102
- const errors = [];
79
+ const errors2 = [];
103
80
  for (const backend of candidateGtkBackends()) {
104
81
  try {
105
82
  const addon = loadNativePrebuild(backend);
@@ -118,18 +95,20 @@ const loadNativeAddon = () => {
118
95
  return loadedAddon;
119
96
  } catch (error) {
120
97
  const message = error instanceof Error ? error.message : `Unknown error: ${String(error)}`;
121
- errors.push(`${backend}: ${message}`);
98
+ errors2.push(`${backend}: ${message}`);
122
99
  }
123
100
  }
124
101
  throw createNativeLoadError(
125
- `Failed to load a compatible gestament native prebuild from ${packageRoot} (GESTAMENT_GTK_BACKEND=${selectedGtkBackend()}). Ensure this package includes prebuilds for the current Linux/glibc architecture and selected GTK backend, and that runtime libraries such as libatspi, glib, gio, GTK, X11, and dbus are installed. Original errors: ${errors.join(" | ")}`
102
+ prerequisites.appendPrerequisiteInstallHint(
103
+ `Failed to load a compatible gestament native prebuild from ${packageRoot} (GESTAMENT_GTK_BACKEND=${selectedGtkBackend()}). Ensure this package includes prebuilds for the current Linux/glibc architecture and selected GTK backend, and that runtime libraries such as libatspi, glib, gio, GTK, X11, and dbus are installed. Original errors: ${errors2.join(" | ")}`
104
+ )
126
105
  );
127
106
  };
128
107
  const callNative = (operation) => {
129
108
  try {
130
109
  return operation();
131
110
  } catch (error) {
132
- throw normalizeNativeError(error);
111
+ throw errors.normalizeNativeError(error);
133
112
  }
134
113
  };
135
114
  const nativeFindById = (processId, id) => callNative(() => loadNativeAddon().findById(processId, id));
@@ -187,6 +166,9 @@ const nativeSetValue = (element, value) => {
187
166
  callNative(() => loadNativeAddon().setValue(element, value));
188
167
  };
189
168
  const nativeCapture = (element) => callNative(() => loadNativeAddon().capture(element));
169
+ const nativeBounds = (element) => callNative(() => loadNativeAddon().bounds(element));
170
+ const nativeResizeHints = (element) => callNative(() => loadNativeAddon().resizeHints(element));
171
+ const nativeX11Info = (element) => callNative(() => loadNativeAddon().x11Info(element));
190
172
  const nativeCaptureScreen = () => callNative(() => loadNativeAddon().captureScreen());
191
173
  const nativeCaptureBounds = (bounds) => callNative(
192
174
  () => loadNativeAddon().captureBounds(
@@ -196,17 +178,13 @@ const nativeCaptureBounds = (bounds) => callNative(
196
178
  bounds.height
197
179
  )
198
180
  );
181
+ const nativeMappedX11WindowCount = () => callNative(() => loadNativeAddon().mappedX11WindowCount());
199
182
  const nativeElementInfo = (element) => callNative(() => loadNativeAddon().elementInfo(element));
200
183
  const nativeTrayItems = (processId) => callNative(() => loadNativeAddon().trayItems(processId));
201
184
  const nativeRunTrayHost = () => {
202
185
  callNative(() => loadNativeAddon().runTrayHost());
203
186
  };
204
- exports.createGtkAppExitedError = createGtkAppExitedError;
205
- exports.createGtkElementNotFoundError = createGtkElementNotFoundError;
206
- exports.createGtkInvalidArgumentError = createGtkInvalidArgumentError;
207
- exports.createGtkOperationFailedError = createGtkOperationFailedError;
208
- exports.createGtkStaleElementError = createGtkStaleElementError;
209
- exports.createGtkUnsupportedInterfaceError = createGtkUnsupportedInterfaceError;
187
+ exports.nativeBounds = nativeBounds;
210
188
  exports.nativeCapture = nativeCapture;
211
189
  exports.nativeCaptureBounds = nativeCaptureBounds;
212
190
  exports.nativeCaptureScreen = nativeCaptureScreen;
@@ -220,7 +198,9 @@ exports.nativeFindAnyById = nativeFindAnyById;
220
198
  exports.nativeFindById = nativeFindById;
221
199
  exports.nativeImageInfo = nativeImageInfo;
222
200
  exports.nativeIsChildSelected = nativeIsChildSelected;
201
+ exports.nativeMappedX11WindowCount = nativeMappedX11WindowCount;
223
202
  exports.nativeProcessAtspiReadiness = nativeProcessAtspiReadiness;
203
+ exports.nativeResizeHints = nativeResizeHints;
224
204
  exports.nativeRunTrayHost = nativeRunTrayHost;
225
205
  exports.nativeSelectAllChildren = nativeSelectAllChildren;
226
206
  exports.nativeSelectChildAt = nativeSelectChildAt;
@@ -245,5 +225,5 @@ exports.nativeTrayItems = nativeTrayItems;
245
225
  exports.nativeValueInfo = nativeValueInfo;
246
226
  exports.nativeWindowAt = nativeWindowAt;
247
227
  exports.nativeWindowCount = nativeWindowCount;
248
- exports.normalizeNativeError = normalizeNativeError;
249
- //# sourceMappingURL=native-ie_XIt1J.cjs.map
228
+ exports.nativeX11Info = nativeX11Info;
229
+ //# sourceMappingURL=native-BUWDWMBB.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-BUWDWMBB.cjs","sources":["../src/generated/packageMetadata.ts","../src/native.ts"],"sourcesContent":["// @ts-nocheck\n// This file is auto-generated by screw-up plugin\n// Do not edit manually\n\nexport const name = \"gestament\";\nexport const version = \"0.4.0\";\nexport const description = \"TypeScript based test driver for GTK\";\nexport const author = \"Kouji Matsui (@kekyo@mi.kekyo.net)\";\nexport const license = \"MIT\";\nexport const repository_url = \"https://github.com/kekyo/gestament.git\";\nexport const git_commit_hash = \"99e5b39d6b18c635721584cf2d8b9381d0b1df66\";\n","// gestament - TypeScript based test driver for GTK.\n// Copyright (c) Kouji Matsui. (@kekyo@mi.kekyo.net)\n// Under MIT.\n// https://github.com/kekyo/gestament\n\nimport { createRequire } from 'node:module';\nimport { existsSync } from 'node:fs';\nimport { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { normalizeNativeError } from './errors';\nimport { version as packageVersion } from './generated/packageMetadata';\nimport { appendPrerequisiteInstallHint } from './prerequisites';\nimport type { GtkAutomationError } from './types';\n\n/////////////////////////////////////////////////////////////////////////////////////////\n\ninterface NativeInfo {\n readonly version: string;\n readonly arch: string;\n readonly gtkBackend: GtkBackend;\n readonly napiVersion: number;\n}\n\nexport interface NativeCaptureBounds {\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n}\n\nexport interface NativeCapture {\n readonly image: Buffer;\n readonly bounds: NativeCaptureBounds;\n readonly visibleBounds: NativeCaptureBounds;\n readonly clipped: boolean;\n}\n\nexport interface NativeWindowResizeHints {\n readonly baseWidth: number;\n readonly baseHeight: number;\n readonly minWidth: number;\n readonly minHeight: number;\n readonly widthIncrement: number;\n readonly heightIncrement: number;\n}\n\nexport interface NativeX11WindowInfo {\n readonly windowId: string;\n readonly title: string;\n readonly className: string;\n readonly instanceName: string;\n readonly normalHints: NativeWindowResizeHints;\n}\n\nexport interface NativeElementInfo {\n readonly roleName: string;\n readonly localizedRoleName: string;\n readonly accessibleId: string;\n readonly name: string;\n readonly description: string;\n readonly interfaces: string[];\n readonly states: string[];\n}\n\n/** AT-SPI Value metadata returned by the native layer. */\nexport interface NativeValueInfo {\n /** Current numeric value. */\n readonly value: number;\n\n /** Minimum accepted numeric value. */\n readonly minimum: number;\n\n /** Maximum accepted numeric value. */\n readonly maximum: number;\n\n /** Minimum increment used by step-based controls. */\n readonly minimumIncrement: number;\n\n /** Text representation reported by AT-SPI, when available. */\n readonly text: string;\n}\n\n/** Point returned by the native layer. */\nexport interface NativeImagePoint {\n /** Horizontal pixel coordinate. */\n readonly x: number;\n\n /** Vertical pixel coordinate. */\n readonly y: number;\n}\n\n/** Image size returned by the native layer. */\nexport interface NativeImageSize {\n /** Image width in physical pixels. */\n readonly width: number;\n\n /** Image height in physical pixels. */\n readonly height: number;\n}\n\n/** AT-SPI Image metadata returned by the native layer. */\nexport interface NativeImageInfo {\n /** Text description reported by AT-SPI. */\n readonly description: string;\n\n /** Image locale reported by AT-SPI. */\n readonly locale: string;\n\n /** Image position reported by AT-SPI. */\n readonly position: NativeImagePoint;\n\n /** Image size reported by AT-SPI. */\n readonly size: NativeImageSize;\n\n /** Screen-relative image bounds reported by AT-SPI. */\n readonly bounds: NativeCaptureBounds;\n}\n\n/** Opaque native element handle backed by an AT-SPI accessible proxy. */\nexport type NativeElementHandle = object;\n\n/** AT-SPI readiness state reported by the native layer. */\nexport type NativeAtspiReadiness =\n | 'ready'\n | 'missing-bus-name'\n | 'missing-root'\n | 'missing-cache';\n\n/** StatusNotifier tray item metadata reported by the native layer. */\nexport interface NativeTrayItem {\n readonly busName: string;\n readonly objectPath: string;\n readonly id: string;\n readonly title: string;\n readonly status: string;\n readonly iconName: string;\n readonly accessibleId: string;\n}\n\ninterface NativeAddon {\n readonly findById: (\n processId: number,\n id: string\n ) => NativeElementHandle | undefined;\n readonly processAtspiReadiness: (processId: number) => NativeAtspiReadiness;\n readonly findAnyById: (id: string) => NativeElementHandle | undefined;\n readonly setTextById: (processId: number, id: string, text: string) => void;\n readonly clickById: (processId: number, id: string) => void;\n readonly textById: (processId: number, id: string) => string;\n readonly captureById: (processId: number, id: string) => NativeCapture;\n readonly windowCount: (processId: number) => number;\n readonly windowAt: (\n processId: number,\n index: number\n ) => NativeElementHandle | undefined;\n readonly childCount: (element: NativeElementHandle) => number;\n readonly childAt: (\n element: NativeElementHandle,\n index: number\n ) => NativeElementHandle | undefined;\n readonly selectedChildCount: (element: NativeElementHandle) => number;\n readonly selectedChildAt: (\n element: NativeElementHandle,\n index: number\n ) => NativeElementHandle | undefined;\n readonly isChildSelected: (\n element: NativeElementHandle,\n index: number\n ) => boolean;\n readonly selectChildAt: (element: NativeElementHandle, index: number) => void;\n readonly deselectChildAt: (\n element: NativeElementHandle,\n index: number\n ) => void;\n readonly selectAllChildren: (element: NativeElementHandle) => void;\n readonly clearSelection: (element: NativeElementHandle) => void;\n readonly tableRowCount: (element: NativeElementHandle) => number;\n readonly tableColumnCount: (element: NativeElementHandle) => number;\n readonly tableCellAt: (\n element: NativeElementHandle,\n row: number,\n column: number\n ) => NativeElementHandle | undefined;\n readonly tableSelectedRows: (element: NativeElementHandle) => number[];\n readonly tableSelectedColumns: (element: NativeElementHandle) => number[];\n readonly tableIsRowSelected: (\n element: NativeElementHandle,\n row: number\n ) => boolean;\n readonly tableIsColumnSelected: (\n element: NativeElementHandle,\n column: number\n ) => boolean;\n readonly tableIsCellSelected: (\n element: NativeElementHandle,\n row: number,\n column: number\n ) => boolean;\n readonly tableSelectRow: (element: NativeElementHandle, row: number) => void;\n readonly tableDeselectRow: (\n element: NativeElementHandle,\n row: number\n ) => void;\n readonly tableSelectColumn: (\n element: NativeElementHandle,\n column: number\n ) => void;\n readonly tableDeselectColumn: (\n element: NativeElementHandle,\n column: number\n ) => void;\n readonly setText: (element: NativeElementHandle, text: string) => void;\n readonly click: (element: NativeElementHandle) => void;\n readonly text: (element: NativeElementHandle) => string;\n readonly valueInfo: (element: NativeElementHandle) => NativeValueInfo;\n readonly imageInfo: (element: NativeElementHandle) => NativeImageInfo;\n readonly setValue: (element: NativeElementHandle, value: number) => void;\n readonly capture: (element: NativeElementHandle) => NativeCapture;\n readonly bounds: (element: NativeElementHandle) => NativeCaptureBounds;\n readonly resizeHints: (\n element: NativeElementHandle\n ) => NativeWindowResizeHints;\n readonly x11Info: (element: NativeElementHandle) => NativeX11WindowInfo;\n readonly captureScreen: () => NativeCapture;\n readonly captureBounds: (\n x: number,\n y: number,\n width: number,\n height: number\n ) => NativeCapture;\n readonly mappedX11WindowCount: () => number;\n readonly elementInfo: (element: NativeElementHandle) => NativeElementInfo;\n readonly trayItems: (processId: number) => NativeTrayItem[];\n readonly runTrayHost: () => void;\n readonly nativeInfo: () => NativeInfo;\n}\n\ntype GtkBackend = 'gtk3' | 'gtk4';\ntype GtkBackendSelection = GtkBackend | 'auto';\n\nconst require = createRequire(import.meta.url);\nconst packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');\n\nlet loadedAddon: NativeAddon | undefined;\n\nconst createNativeLoadError = (message: string): GtkAutomationError => {\n const loadError = new Error(message) as GtkAutomationError;\n Object.defineProperty(loadError, 'code', {\n enumerable: true,\n value: 'NATIVE_LOAD_FAILED',\n });\n return loadError;\n};\n\nconst selectedGtkBackend = (): GtkBackendSelection => {\n const value = process.env.GESTAMENT_GTK_BACKEND;\n if (value === undefined || value.length === 0) {\n return 'gtk3';\n }\n if (value === 'gtk3' || value === 'gtk4' || value === 'auto') {\n return value;\n }\n throw createNativeLoadError(\n `Unsupported GESTAMENT_GTK_BACKEND: ${value}. Expected gtk3, gtk4, or auto.`\n );\n};\n\nconst candidateGtkBackends = (): readonly GtkBackend[] => {\n const selected = selectedGtkBackend();\n return selected === 'auto' ? ['gtk3', 'gtk4'] : [selected];\n};\n\nconst prebuildDirectory = (): string => {\n if (process.platform !== 'linux') {\n throw createNativeLoadError(\n `Unsupported platform for gestament native prebuilds: ${process.platform}.`\n );\n }\n\n switch (process.arch) {\n case 'x64':\n return 'linux-x64';\n case 'ia32':\n return 'linux-ia32';\n case 'arm64':\n return 'linux-arm64';\n case 'arm':\n return 'linux-arm';\n case 'riscv64':\n return 'linux-riscv64';\n default:\n throw createNativeLoadError(\n `Unsupported architecture for gestament native prebuilds: ${process.arch}.`\n );\n }\n};\n\nconst prebuildFile = (): string =>\n process.arch === 'arm'\n ? 'node.napi.armv7.glibc.node'\n : 'node.napi.glibc.node';\n\nconst prebuildPath = (backend: GtkBackend): string =>\n resolve(\n packageRoot,\n 'prebuilds',\n prebuildDirectory(),\n backend,\n prebuildFile()\n );\n\nconst loadNativePrebuild = (backend: GtkBackend): NativeAddon => {\n const path = prebuildPath(backend);\n if (!existsSync(path)) {\n throw new Error(`Missing ${backend} native prebuild: ${path}`);\n }\n return require(path) as NativeAddon;\n};\n\nconst loadNativeAddon = (): NativeAddon => {\n if (loadedAddon !== undefined) {\n return loadedAddon;\n }\n\n const errors: string[] = [];\n for (const backend of candidateGtkBackends()) {\n try {\n const addon = loadNativePrebuild(backend);\n const nativeInfo = addon.nativeInfo();\n if (nativeInfo.version !== packageVersion) {\n throw new Error(\n `gestament native prebuild version mismatch: native=${nativeInfo.version}, package=${packageVersion}`\n );\n }\n if (nativeInfo.gtkBackend !== backend) {\n throw new Error(\n `gestament native prebuild backend mismatch: native=${nativeInfo.gtkBackend}, requested=${backend}`\n );\n }\n loadedAddon = addon;\n return loadedAddon;\n } catch (error) {\n const message =\n error instanceof Error\n ? error.message\n : `Unknown error: ${String(error)}`;\n errors.push(`${backend}: ${message}`);\n }\n }\n\n throw createNativeLoadError(\n appendPrerequisiteInstallHint(\n `Failed to load a compatible gestament native prebuild from ${packageRoot} ` +\n `(GESTAMENT_GTK_BACKEND=${selectedGtkBackend()}). Ensure this package ` +\n 'includes prebuilds for the current Linux/glibc architecture and selected ' +\n 'GTK backend, and that runtime libraries such as libatspi, glib, gio, ' +\n `GTK, X11, and dbus are installed. Original errors: ${errors.join(' | ')}`\n )\n );\n};\n\nconst callNative = <Result>(operation: () => Result): Result => {\n try {\n return operation();\n } catch (error) {\n throw normalizeNativeError(error);\n }\n};\n\n/////////////////////////////////////////////////////////////////////////////////////////\n\n/** Resolves an accessible id to a native element when it exists. */\nexport const nativeFindById = (\n processId: number,\n id: string\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().findById(processId, id));\n\n/** Checks whether a GTK process has completed AT-SPI root/cache registration. */\nexport const nativeProcessAtspiReadiness = (\n processId: number\n): NativeAtspiReadiness =>\n callNative(() => loadNativeAddon().processAtspiReadiness(processId));\n\n/** Resolves an accessible id to a native element across all exposed processes. */\nexport const nativeFindAnyById = (\n id: string\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().findAnyById(id));\n\n/** Sets text contents on the accessible with the given id. */\nexport const nativeSetTextById = (\n processId: number,\n id: string,\n text: string\n): void => {\n callNative(() => loadNativeAddon().setTextById(processId, id, text));\n};\n\n/** Executes the first action on the accessible with the given id. */\nexport const nativeClickById = (processId: number, id: string): void => {\n callNative(() => loadNativeAddon().clickById(processId, id));\n};\n\n/** Reads text from the accessible with the given id. */\nexport const nativeTextById = (processId: number, id: string): string =>\n callNative(() => loadNativeAddon().textById(processId, id));\n\n/** Captures real screen pixels for the accessible with the given id. */\nexport const nativeCaptureById = (\n processId: number,\n id: string\n): NativeCapture =>\n callNative(() => loadNativeAddon().captureById(processId, id));\n\n/** Counts top-level windows hosted by the process. */\nexport const nativeWindowCount = (processId: number): number =>\n callNative(() => loadNativeAddon().windowCount(processId));\n\n/** Resolves a top-level window index to an element handle when it exists. */\nexport const nativeWindowAt = (\n processId: number,\n index: number\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().windowAt(processId, index));\n\n/** Counts direct children for an element handle. */\nexport const nativeChildCount = (element: NativeElementHandle): number =>\n callNative(() => loadNativeAddon().childCount(element));\n\n/** Resolves a direct child index to an element handle when it exists. */\nexport const nativeChildAt = (\n element: NativeElementHandle,\n index: number\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().childAt(element, index));\n\n/** Counts selected children for a selectable element handle. */\nexport const nativeSelectedChildCount = (\n element: NativeElementHandle\n): number => callNative(() => loadNativeAddon().selectedChildCount(element));\n\n/** Resolves a selected child index to an element handle when it exists. */\nexport const nativeSelectedChildAt = (\n element: NativeElementHandle,\n index: number\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().selectedChildAt(element, index));\n\n/** Reads whether a direct child is selected. */\nexport const nativeIsChildSelected = (\n element: NativeElementHandle,\n index: number\n): boolean =>\n callNative(() => loadNativeAddon().isChildSelected(element, index));\n\n/** Selects a direct child for a selectable element handle. */\nexport const nativeSelectChildAt = (\n element: NativeElementHandle,\n index: number\n): void => {\n callNative(() => loadNativeAddon().selectChildAt(element, index));\n};\n\n/** Deselects a direct child for a selectable element handle. */\nexport const nativeDeselectChildAt = (\n element: NativeElementHandle,\n index: number\n): void => {\n callNative(() => loadNativeAddon().deselectChildAt(element, index));\n};\n\n/** Selects all children for a selectable element handle. */\nexport const nativeSelectAllChildren = (element: NativeElementHandle): void => {\n callNative(() => loadNativeAddon().selectAllChildren(element));\n};\n\n/** Clears child selection for a selectable element handle. */\nexport const nativeClearSelection = (element: NativeElementHandle): void => {\n callNative(() => loadNativeAddon().clearSelection(element));\n};\n\n/** Counts table rows for a table element handle. */\nexport const nativeTableRowCount = (element: NativeElementHandle): number =>\n callNative(() => loadNativeAddon().tableRowCount(element));\n\n/** Counts table columns for a table element handle. */\nexport const nativeTableColumnCount = (element: NativeElementHandle): number =>\n callNative(() => loadNativeAddon().tableColumnCount(element));\n\n/** Resolves a table cell element handle by row and column when it exists. */\nexport const nativeTableCellAt = (\n element: NativeElementHandle,\n row: number,\n column: number\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().tableCellAt(element, row, column));\n\n/** Reads selected table row indexes. */\nexport const nativeTableSelectedRows = (\n element: NativeElementHandle\n): number[] => callNative(() => loadNativeAddon().tableSelectedRows(element));\n\n/** Reads selected table column indexes. */\nexport const nativeTableSelectedColumns = (\n element: NativeElementHandle\n): number[] =>\n callNative(() => loadNativeAddon().tableSelectedColumns(element));\n\n/** Reads whether a table row is selected. */\nexport const nativeTableIsRowSelected = (\n element: NativeElementHandle,\n row: number\n): boolean =>\n callNative(() => loadNativeAddon().tableIsRowSelected(element, row));\n\n/** Reads whether a table column is selected. */\nexport const nativeTableIsColumnSelected = (\n element: NativeElementHandle,\n column: number\n): boolean =>\n callNative(() => loadNativeAddon().tableIsColumnSelected(element, column));\n\n/** Reads whether a table cell is selected. */\nexport const nativeTableIsCellSelected = (\n element: NativeElementHandle,\n row: number,\n column: number\n): boolean =>\n callNative(() => loadNativeAddon().tableIsCellSelected(element, row, column));\n\n/** Selects a table row. */\nexport const nativeTableSelectRow = (\n element: NativeElementHandle,\n row: number\n): void => {\n callNative(() => loadNativeAddon().tableSelectRow(element, row));\n};\n\n/** Deselects a table row. */\nexport const nativeTableDeselectRow = (\n element: NativeElementHandle,\n row: number\n): void => {\n callNative(() => loadNativeAddon().tableDeselectRow(element, row));\n};\n\n/** Selects a table column. */\nexport const nativeTableSelectColumn = (\n element: NativeElementHandle,\n column: number\n): void => {\n callNative(() => loadNativeAddon().tableSelectColumn(element, column));\n};\n\n/** Deselects a table column. */\nexport const nativeTableDeselectColumn = (\n element: NativeElementHandle,\n column: number\n): void => {\n callNative(() => loadNativeAddon().tableDeselectColumn(element, column));\n};\n\n/** Sets text contents on the accessible resolved by an element handle. */\nexport const nativeSetText = (\n element: NativeElementHandle,\n text: string\n): void => {\n callNative(() => loadNativeAddon().setText(element, text));\n};\n\n/** Executes the first action on the accessible resolved by an element handle. */\nexport const nativeClick = (element: NativeElementHandle): void => {\n callNative(() => loadNativeAddon().click(element));\n};\n\n/** Reads text from the accessible resolved by an element handle. */\nexport const nativeText = (element: NativeElementHandle): string =>\n callNative(() => loadNativeAddon().text(element));\n\n/** Reads value metadata from the accessible resolved by an element handle. */\nexport const nativeValueInfo = (\n element: NativeElementHandle\n): NativeValueInfo => callNative(() => loadNativeAddon().valueInfo(element));\n\n/** Reads image metadata from the accessible resolved by an element handle. */\nexport const nativeImageInfo = (\n element: NativeElementHandle\n): NativeImageInfo => callNative(() => loadNativeAddon().imageInfo(element));\n\n/** Sets a numeric value on the accessible resolved by an element handle. */\nexport const nativeSetValue = (\n element: NativeElementHandle,\n value: number\n): void => {\n callNative(() => loadNativeAddon().setValue(element, value));\n};\n\n/** Captures real screen pixels for the accessible resolved by an element handle. */\nexport const nativeCapture = (element: NativeElementHandle): NativeCapture =>\n callNative(() => loadNativeAddon().capture(element));\n\n/** Reads screen-relative bounds for the accessible resolved by an element handle. */\nexport const nativeBounds = (\n element: NativeElementHandle\n): NativeCaptureBounds => callNative(() => loadNativeAddon().bounds(element));\n\n/** Reads X11 WM_NORMAL_HINTS for the accessible resolved by an element handle. */\nexport const nativeResizeHints = (\n element: NativeElementHandle\n): NativeWindowResizeHints =>\n callNative(() => loadNativeAddon().resizeHints(element));\n\n/** Reads X11 window metadata for the accessible resolved by an element handle. */\nexport const nativeX11Info = (\n element: NativeElementHandle\n): NativeX11WindowInfo => callNative(() => loadNativeAddon().x11Info(element));\n\n/** Captures the full X11 root window currently addressed by DISPLAY. */\nexport const nativeCaptureScreen = (): NativeCapture =>\n callNative(() => loadNativeAddon().captureScreen());\n\n/** Captures real screen pixels for explicit screen-relative bounds. */\nexport const nativeCaptureBounds = (\n bounds: NativeCaptureBounds\n): NativeCapture =>\n callNative(() =>\n loadNativeAddon().captureBounds(\n bounds.x,\n bounds.y,\n bounds.width,\n bounds.height\n )\n );\n\n/** Counts mapped top-level X11 windows currently addressed by DISPLAY. */\nexport const nativeMappedX11WindowCount = (): number =>\n callNative(() => loadNativeAddon().mappedX11WindowCount());\n\n/** Reads AT-SPI metadata for the accessible resolved by an element handle. */\nexport const nativeElementInfo = (\n element: NativeElementHandle\n): NativeElementInfo =>\n callNative(() => loadNativeAddon().elementInfo(element));\n\n/** Lists StatusNotifier tray items owned by the process. */\nexport const nativeTrayItems = (processId: number): NativeTrayItem[] =>\n callNative(() => loadNativeAddon().trayItems(processId));\n\n/** Runs the test tray host until the process is terminated. */\nexport const nativeRunTrayHost = (): void => {\n callNative(() => loadNativeAddon().runTrayHost());\n};\n"],"names":["require","createRequire","resolve","dirname","fileURLToPath","existsSync","errors","packageVersion","appendPrerequisiteInstallHint","normalizeNativeError"],"mappings":";;;;;;;;AAKO,MAAM,UAAU;AC4OvB,MAAMA,YAAUC,YAAAA,0QAA6B;AAC7C,MAAM,cAAcC,UAAAA,QAAQC,UAAAA,QAAQC,SAAAA,cAAc,OAAA,aAAA,cAAA,QAAA,KAAA,EAAA,cAAA,UAAA,EAAA,OAAA,0BAAA,uBAAA,QAAA,YAAA,MAAA,YAAA,uBAAA,OAAA,IAAA,IAAA,uBAAA,SAAA,OAAA,EAAA,IAAe,CAAC,GAAG,IAAI;AAEzE,IAAI;AAEJ,MAAM,wBAAwB,CAAC,YAAwC;AACrE,QAAM,YAAY,IAAI,MAAM,OAAO;AACnC,SAAO,eAAe,WAAW,QAAQ;AAAA,IACvC,YAAY;AAAA,IACZ,OAAO;AAAA,EAAA,CACR;AACD,SAAO;AACT;AAEA,MAAM,qBAAqB,MAA2B;AACpD,QAAM,QAAQ,QAAQ,IAAI;AAC1B,MAAI,UAAU,UAAa,MAAM,WAAW,GAAG;AAC7C,WAAO;AAAA,EACT;AACA,MAAI,UAAU,UAAU,UAAU,UAAU,UAAU,QAAQ;AAC5D,WAAO;AAAA,EACT;AACA,QAAM;AAAA,IACJ,sCAAsC,KAAK;AAAA,EAAA;AAE/C;AAEA,MAAM,uBAAuB,MAA6B;AACxD,QAAM,WAAW,mBAAA;AACjB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AG7C,MAAM,sBAAsB,CACjC,WAEA;AAAA,EAAW,MACT,kBAAkB;AAAA,IAChB,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAEX;AAGK,MAAM,6BAA6B,MACxC,WAAW,MAAM,gBAAA,EAAkB,sBAAsB;AAGpD,MAAM,oBAAoB,CAC/B,YAEA,WAAW,MAAM,gBAAA,EAAkB,YAAY,OAAO,CAAC;AAGlD,MAAM,kBAAkB,CAAC,cAC9B,WAAW,MAAM,gBAAA,EAAkB,UAAU,SAAS,CAAC;AAGlD,MAAM,oBAAoB,MAAY;AAC3C,aAAW,MAAM,kBAAkB,aAAa;AAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,32 +2,9 @@ import { createRequire } from "node:module";
2
2
  import { existsSync } from "node:fs";
3
3
  import { resolve, dirname } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
- const createGtkAutomationError = (code, message) => {
6
- const error = new Error(message);
7
- Object.defineProperty(error, "code", {
8
- enumerable: true,
9
- value: code
10
- });
11
- error.name = "GtkAutomationError";
12
- return error;
13
- };
14
- const createGtkAppExitedError = (message) => createGtkAutomationError("APP_EXITED", message);
15
- const createGtkInvalidArgumentError = (message) => createGtkAutomationError("INVALID_ARGUMENT", message);
16
- const createGtkElementNotFoundError = (message) => createGtkAutomationError("ELEMENT_NOT_FOUND", message);
17
- const createGtkStaleElementError = (message) => createGtkAutomationError("STALE_ELEMENT", message);
18
- const createGtkOperationFailedError = (message) => createGtkAutomationError("OPERATION_FAILED", message);
19
- const createGtkUnsupportedInterfaceError = (message) => createGtkAutomationError("UNSUPPORTED_INTERFACE", message);
20
- const normalizeNativeError = (error) => {
21
- if (error instanceof Error) {
22
- const maybeCode = error.code;
23
- if (maybeCode === "ELEMENT_NOT_FOUND" || maybeCode === "INVALID_ARGUMENT" || maybeCode === "NATIVE_LOAD_FAILED" || maybeCode === "OPERATION_FAILED" || maybeCode === "STALE_ELEMENT" || maybeCode === "UNSUPPORTED_INTERFACE") {
24
- return createGtkAutomationError(maybeCode, error.message);
25
- }
26
- return createGtkAutomationError("OPERATION_FAILED", error.message);
27
- }
28
- return createGtkAutomationError("OPERATION_FAILED", String(error));
29
- };
30
- const version = "0.2.0";
5
+ import { n as normalizeNativeError } from "./errors-CCW4ATME.js";
6
+ import { a as appendPrerequisiteInstallHint } from "./prerequisites-JB0SKPVd.js";
7
+ const version = "0.4.0";
31
8
  const require$1 = createRequire(import.meta.url);
32
9
  const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
33
10
  let loadedAddon;
@@ -120,7 +97,9 @@ const loadNativeAddon = () => {
120
97
  }
121
98
  }
122
99
  throw createNativeLoadError(
123
- `Failed to load a compatible gestament native prebuild from ${packageRoot} (GESTAMENT_GTK_BACKEND=${selectedGtkBackend()}). Ensure this package includes prebuilds for the current Linux/glibc architecture and selected GTK backend, and that runtime libraries such as libatspi, glib, gio, GTK, X11, and dbus are installed. Original errors: ${errors.join(" | ")}`
100
+ appendPrerequisiteInstallHint(
101
+ `Failed to load a compatible gestament native prebuild from ${packageRoot} (GESTAMENT_GTK_BACKEND=${selectedGtkBackend()}). Ensure this package includes prebuilds for the current Linux/glibc architecture and selected GTK backend, and that runtime libraries such as libatspi, glib, gio, GTK, X11, and dbus are installed. Original errors: ${errors.join(" | ")}`
102
+ )
124
103
  );
125
104
  };
126
105
  const callNative = (operation) => {
@@ -185,6 +164,9 @@ const nativeSetValue = (element, value) => {
185
164
  callNative(() => loadNativeAddon().setValue(element, value));
186
165
  };
187
166
  const nativeCapture = (element) => callNative(() => loadNativeAddon().capture(element));
167
+ const nativeBounds = (element) => callNative(() => loadNativeAddon().bounds(element));
168
+ const nativeResizeHints = (element) => callNative(() => loadNativeAddon().resizeHints(element));
169
+ const nativeX11Info = (element) => callNative(() => loadNativeAddon().x11Info(element));
188
170
  const nativeCaptureScreen = () => callNative(() => loadNativeAddon().captureScreen());
189
171
  const nativeCaptureBounds = (bounds) => callNative(
190
172
  () => loadNativeAddon().captureBounds(
@@ -194,56 +176,54 @@ const nativeCaptureBounds = (bounds) => callNative(
194
176
  bounds.height
195
177
  )
196
178
  );
179
+ const nativeMappedX11WindowCount = () => callNative(() => loadNativeAddon().mappedX11WindowCount());
197
180
  const nativeElementInfo = (element) => callNative(() => loadNativeAddon().elementInfo(element));
198
181
  const nativeTrayItems = (processId) => callNative(() => loadNativeAddon().trayItems(processId));
199
182
  const nativeRunTrayHost = () => {
200
183
  callNative(() => loadNativeAddon().runTrayHost());
201
184
  };
202
185
  export {
203
- nativeSetValue as A,
204
- nativeText as B,
205
- nativeSetText as C,
206
- nativeCapture as D,
207
- createGtkInvalidArgumentError as E,
208
- nativeTableCellAt as F,
209
- createGtkUnsupportedInterfaceError as G,
210
- createGtkElementNotFoundError as H,
211
- nativeFindAnyById as I,
212
- nativeTrayItems as J,
213
- createGtkStaleElementError as K,
214
- normalizeNativeError as L,
186
+ nativeChildAt as A,
187
+ nativeValueInfo as B,
188
+ nativeSetValue as C,
189
+ nativeText as D,
190
+ nativeSetText as E,
191
+ nativeX11Info as F,
192
+ nativeResizeHints as G,
193
+ nativeBounds as H,
194
+ nativeCapture as I,
195
+ nativeTableCellAt as J,
196
+ nativeFindAnyById as K,
197
+ nativeTrayItems as L,
215
198
  nativeWindowCount as M,
216
199
  nativeWindowAt as N,
217
- nativeCaptureScreen as O,
218
- nativeFindById as P,
219
- createGtkAppExitedError as Q,
220
- nativeProcessAtspiReadiness as R,
221
- nativeRunTrayHost as S,
222
- nativeClick as a,
223
- nativeImageInfo as b,
224
- nativeCaptureBounds as c,
225
- nativeTableDeselectColumn as d,
226
- nativeTableSelectColumn as e,
227
- nativeTableDeselectRow as f,
228
- nativeTableSelectRow as g,
229
- nativeTableIsCellSelected as h,
230
- nativeTableIsColumnSelected as i,
231
- nativeTableIsRowSelected as j,
232
- nativeTableSelectedColumns as k,
233
- nativeTableSelectedRows as l,
234
- nativeTableColumnCount as m,
235
- nativeElementInfo as n,
236
- nativeTableRowCount as o,
237
- nativeClearSelection as p,
238
- nativeSelectAllChildren as q,
239
- nativeDeselectChildAt as r,
240
- nativeSelectChildAt as s,
241
- nativeIsChildSelected as t,
242
- nativeSelectedChildAt as u,
243
- nativeSelectedChildCount as v,
244
- createGtkOperationFailedError as w,
245
- nativeChildCount as x,
246
- nativeChildAt as y,
247
- nativeValueInfo as z
248
- };
249
- //# sourceMappingURL=native-DUeVYIBs.js.map
200
+ nativeFindById as O,
201
+ nativeProcessAtspiReadiness as P,
202
+ nativeCaptureScreen as a,
203
+ nativeMappedX11WindowCount as b,
204
+ nativeElementInfo as c,
205
+ nativeClick as d,
206
+ nativeImageInfo as e,
207
+ nativeCaptureBounds as f,
208
+ nativeTableDeselectColumn as g,
209
+ nativeTableSelectColumn as h,
210
+ nativeTableDeselectRow as i,
211
+ nativeTableSelectRow as j,
212
+ nativeTableIsCellSelected as k,
213
+ nativeTableIsColumnSelected as l,
214
+ nativeTableIsRowSelected as m,
215
+ nativeRunTrayHost as n,
216
+ nativeTableSelectedColumns as o,
217
+ nativeTableSelectedRows as p,
218
+ nativeTableColumnCount as q,
219
+ nativeTableRowCount as r,
220
+ nativeClearSelection as s,
221
+ nativeSelectAllChildren as t,
222
+ nativeDeselectChildAt as u,
223
+ nativeSelectChildAt as v,
224
+ nativeIsChildSelected as w,
225
+ nativeSelectedChildAt as x,
226
+ nativeSelectedChildCount as y,
227
+ nativeChildCount as z
228
+ };
229
+ //# sourceMappingURL=native-C6MsIBNF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-C6MsIBNF.js","sources":["../src/generated/packageMetadata.ts","../src/native.ts"],"sourcesContent":["// @ts-nocheck\n// This file is auto-generated by screw-up plugin\n// Do not edit manually\n\nexport const name = \"gestament\";\nexport const version = \"0.4.0\";\nexport const description = \"TypeScript based test driver for GTK\";\nexport const author = \"Kouji Matsui (@kekyo@mi.kekyo.net)\";\nexport const license = \"MIT\";\nexport const repository_url = \"https://github.com/kekyo/gestament.git\";\nexport const git_commit_hash = \"99e5b39d6b18c635721584cf2d8b9381d0b1df66\";\n","// gestament - TypeScript based test driver for GTK.\n// Copyright (c) Kouji Matsui. (@kekyo@mi.kekyo.net)\n// Under MIT.\n// https://github.com/kekyo/gestament\n\nimport { createRequire } from 'node:module';\nimport { existsSync } from 'node:fs';\nimport { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { normalizeNativeError } from './errors';\nimport { version as packageVersion } from './generated/packageMetadata';\nimport { appendPrerequisiteInstallHint } from './prerequisites';\nimport type { GtkAutomationError } from './types';\n\n/////////////////////////////////////////////////////////////////////////////////////////\n\ninterface NativeInfo {\n readonly version: string;\n readonly arch: string;\n readonly gtkBackend: GtkBackend;\n readonly napiVersion: number;\n}\n\nexport interface NativeCaptureBounds {\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n}\n\nexport interface NativeCapture {\n readonly image: Buffer;\n readonly bounds: NativeCaptureBounds;\n readonly visibleBounds: NativeCaptureBounds;\n readonly clipped: boolean;\n}\n\nexport interface NativeWindowResizeHints {\n readonly baseWidth: number;\n readonly baseHeight: number;\n readonly minWidth: number;\n readonly minHeight: number;\n readonly widthIncrement: number;\n readonly heightIncrement: number;\n}\n\nexport interface NativeX11WindowInfo {\n readonly windowId: string;\n readonly title: string;\n readonly className: string;\n readonly instanceName: string;\n readonly normalHints: NativeWindowResizeHints;\n}\n\nexport interface NativeElementInfo {\n readonly roleName: string;\n readonly localizedRoleName: string;\n readonly accessibleId: string;\n readonly name: string;\n readonly description: string;\n readonly interfaces: string[];\n readonly states: string[];\n}\n\n/** AT-SPI Value metadata returned by the native layer. */\nexport interface NativeValueInfo {\n /** Current numeric value. */\n readonly value: number;\n\n /** Minimum accepted numeric value. */\n readonly minimum: number;\n\n /** Maximum accepted numeric value. */\n readonly maximum: number;\n\n /** Minimum increment used by step-based controls. */\n readonly minimumIncrement: number;\n\n /** Text representation reported by AT-SPI, when available. */\n readonly text: string;\n}\n\n/** Point returned by the native layer. */\nexport interface NativeImagePoint {\n /** Horizontal pixel coordinate. */\n readonly x: number;\n\n /** Vertical pixel coordinate. */\n readonly y: number;\n}\n\n/** Image size returned by the native layer. */\nexport interface NativeImageSize {\n /** Image width in physical pixels. */\n readonly width: number;\n\n /** Image height in physical pixels. */\n readonly height: number;\n}\n\n/** AT-SPI Image metadata returned by the native layer. */\nexport interface NativeImageInfo {\n /** Text description reported by AT-SPI. */\n readonly description: string;\n\n /** Image locale reported by AT-SPI. */\n readonly locale: string;\n\n /** Image position reported by AT-SPI. */\n readonly position: NativeImagePoint;\n\n /** Image size reported by AT-SPI. */\n readonly size: NativeImageSize;\n\n /** Screen-relative image bounds reported by AT-SPI. */\n readonly bounds: NativeCaptureBounds;\n}\n\n/** Opaque native element handle backed by an AT-SPI accessible proxy. */\nexport type NativeElementHandle = object;\n\n/** AT-SPI readiness state reported by the native layer. */\nexport type NativeAtspiReadiness =\n | 'ready'\n | 'missing-bus-name'\n | 'missing-root'\n | 'missing-cache';\n\n/** StatusNotifier tray item metadata reported by the native layer. */\nexport interface NativeTrayItem {\n readonly busName: string;\n readonly objectPath: string;\n readonly id: string;\n readonly title: string;\n readonly status: string;\n readonly iconName: string;\n readonly accessibleId: string;\n}\n\ninterface NativeAddon {\n readonly findById: (\n processId: number,\n id: string\n ) => NativeElementHandle | undefined;\n readonly processAtspiReadiness: (processId: number) => NativeAtspiReadiness;\n readonly findAnyById: (id: string) => NativeElementHandle | undefined;\n readonly setTextById: (processId: number, id: string, text: string) => void;\n readonly clickById: (processId: number, id: string) => void;\n readonly textById: (processId: number, id: string) => string;\n readonly captureById: (processId: number, id: string) => NativeCapture;\n readonly windowCount: (processId: number) => number;\n readonly windowAt: (\n processId: number,\n index: number\n ) => NativeElementHandle | undefined;\n readonly childCount: (element: NativeElementHandle) => number;\n readonly childAt: (\n element: NativeElementHandle,\n index: number\n ) => NativeElementHandle | undefined;\n readonly selectedChildCount: (element: NativeElementHandle) => number;\n readonly selectedChildAt: (\n element: NativeElementHandle,\n index: number\n ) => NativeElementHandle | undefined;\n readonly isChildSelected: (\n element: NativeElementHandle,\n index: number\n ) => boolean;\n readonly selectChildAt: (element: NativeElementHandle, index: number) => void;\n readonly deselectChildAt: (\n element: NativeElementHandle,\n index: number\n ) => void;\n readonly selectAllChildren: (element: NativeElementHandle) => void;\n readonly clearSelection: (element: NativeElementHandle) => void;\n readonly tableRowCount: (element: NativeElementHandle) => number;\n readonly tableColumnCount: (element: NativeElementHandle) => number;\n readonly tableCellAt: (\n element: NativeElementHandle,\n row: number,\n column: number\n ) => NativeElementHandle | undefined;\n readonly tableSelectedRows: (element: NativeElementHandle) => number[];\n readonly tableSelectedColumns: (element: NativeElementHandle) => number[];\n readonly tableIsRowSelected: (\n element: NativeElementHandle,\n row: number\n ) => boolean;\n readonly tableIsColumnSelected: (\n element: NativeElementHandle,\n column: number\n ) => boolean;\n readonly tableIsCellSelected: (\n element: NativeElementHandle,\n row: number,\n column: number\n ) => boolean;\n readonly tableSelectRow: (element: NativeElementHandle, row: number) => void;\n readonly tableDeselectRow: (\n element: NativeElementHandle,\n row: number\n ) => void;\n readonly tableSelectColumn: (\n element: NativeElementHandle,\n column: number\n ) => void;\n readonly tableDeselectColumn: (\n element: NativeElementHandle,\n column: number\n ) => void;\n readonly setText: (element: NativeElementHandle, text: string) => void;\n readonly click: (element: NativeElementHandle) => void;\n readonly text: (element: NativeElementHandle) => string;\n readonly valueInfo: (element: NativeElementHandle) => NativeValueInfo;\n readonly imageInfo: (element: NativeElementHandle) => NativeImageInfo;\n readonly setValue: (element: NativeElementHandle, value: number) => void;\n readonly capture: (element: NativeElementHandle) => NativeCapture;\n readonly bounds: (element: NativeElementHandle) => NativeCaptureBounds;\n readonly resizeHints: (\n element: NativeElementHandle\n ) => NativeWindowResizeHints;\n readonly x11Info: (element: NativeElementHandle) => NativeX11WindowInfo;\n readonly captureScreen: () => NativeCapture;\n readonly captureBounds: (\n x: number,\n y: number,\n width: number,\n height: number\n ) => NativeCapture;\n readonly mappedX11WindowCount: () => number;\n readonly elementInfo: (element: NativeElementHandle) => NativeElementInfo;\n readonly trayItems: (processId: number) => NativeTrayItem[];\n readonly runTrayHost: () => void;\n readonly nativeInfo: () => NativeInfo;\n}\n\ntype GtkBackend = 'gtk3' | 'gtk4';\ntype GtkBackendSelection = GtkBackend | 'auto';\n\nconst require = createRequire(import.meta.url);\nconst packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');\n\nlet loadedAddon: NativeAddon | undefined;\n\nconst createNativeLoadError = (message: string): GtkAutomationError => {\n const loadError = new Error(message) as GtkAutomationError;\n Object.defineProperty(loadError, 'code', {\n enumerable: true,\n value: 'NATIVE_LOAD_FAILED',\n });\n return loadError;\n};\n\nconst selectedGtkBackend = (): GtkBackendSelection => {\n const value = process.env.GESTAMENT_GTK_BACKEND;\n if (value === undefined || value.length === 0) {\n return 'gtk3';\n }\n if (value === 'gtk3' || value === 'gtk4' || value === 'auto') {\n return value;\n }\n throw createNativeLoadError(\n `Unsupported GESTAMENT_GTK_BACKEND: ${value}. Expected gtk3, gtk4, or auto.`\n );\n};\n\nconst candidateGtkBackends = (): readonly GtkBackend[] => {\n const selected = selectedGtkBackend();\n return selected === 'auto' ? ['gtk3', 'gtk4'] : [selected];\n};\n\nconst prebuildDirectory = (): string => {\n if (process.platform !== 'linux') {\n throw createNativeLoadError(\n `Unsupported platform for gestament native prebuilds: ${process.platform}.`\n );\n }\n\n switch (process.arch) {\n case 'x64':\n return 'linux-x64';\n case 'ia32':\n return 'linux-ia32';\n case 'arm64':\n return 'linux-arm64';\n case 'arm':\n return 'linux-arm';\n case 'riscv64':\n return 'linux-riscv64';\n default:\n throw createNativeLoadError(\n `Unsupported architecture for gestament native prebuilds: ${process.arch}.`\n );\n }\n};\n\nconst prebuildFile = (): string =>\n process.arch === 'arm'\n ? 'node.napi.armv7.glibc.node'\n : 'node.napi.glibc.node';\n\nconst prebuildPath = (backend: GtkBackend): string =>\n resolve(\n packageRoot,\n 'prebuilds',\n prebuildDirectory(),\n backend,\n prebuildFile()\n );\n\nconst loadNativePrebuild = (backend: GtkBackend): NativeAddon => {\n const path = prebuildPath(backend);\n if (!existsSync(path)) {\n throw new Error(`Missing ${backend} native prebuild: ${path}`);\n }\n return require(path) as NativeAddon;\n};\n\nconst loadNativeAddon = (): NativeAddon => {\n if (loadedAddon !== undefined) {\n return loadedAddon;\n }\n\n const errors: string[] = [];\n for (const backend of candidateGtkBackends()) {\n try {\n const addon = loadNativePrebuild(backend);\n const nativeInfo = addon.nativeInfo();\n if (nativeInfo.version !== packageVersion) {\n throw new Error(\n `gestament native prebuild version mismatch: native=${nativeInfo.version}, package=${packageVersion}`\n );\n }\n if (nativeInfo.gtkBackend !== backend) {\n throw new Error(\n `gestament native prebuild backend mismatch: native=${nativeInfo.gtkBackend}, requested=${backend}`\n );\n }\n loadedAddon = addon;\n return loadedAddon;\n } catch (error) {\n const message =\n error instanceof Error\n ? error.message\n : `Unknown error: ${String(error)}`;\n errors.push(`${backend}: ${message}`);\n }\n }\n\n throw createNativeLoadError(\n appendPrerequisiteInstallHint(\n `Failed to load a compatible gestament native prebuild from ${packageRoot} ` +\n `(GESTAMENT_GTK_BACKEND=${selectedGtkBackend()}). Ensure this package ` +\n 'includes prebuilds for the current Linux/glibc architecture and selected ' +\n 'GTK backend, and that runtime libraries such as libatspi, glib, gio, ' +\n `GTK, X11, and dbus are installed. Original errors: ${errors.join(' | ')}`\n )\n );\n};\n\nconst callNative = <Result>(operation: () => Result): Result => {\n try {\n return operation();\n } catch (error) {\n throw normalizeNativeError(error);\n }\n};\n\n/////////////////////////////////////////////////////////////////////////////////////////\n\n/** Resolves an accessible id to a native element when it exists. */\nexport const nativeFindById = (\n processId: number,\n id: string\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().findById(processId, id));\n\n/** Checks whether a GTK process has completed AT-SPI root/cache registration. */\nexport const nativeProcessAtspiReadiness = (\n processId: number\n): NativeAtspiReadiness =>\n callNative(() => loadNativeAddon().processAtspiReadiness(processId));\n\n/** Resolves an accessible id to a native element across all exposed processes. */\nexport const nativeFindAnyById = (\n id: string\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().findAnyById(id));\n\n/** Sets text contents on the accessible with the given id. */\nexport const nativeSetTextById = (\n processId: number,\n id: string,\n text: string\n): void => {\n callNative(() => loadNativeAddon().setTextById(processId, id, text));\n};\n\n/** Executes the first action on the accessible with the given id. */\nexport const nativeClickById = (processId: number, id: string): void => {\n callNative(() => loadNativeAddon().clickById(processId, id));\n};\n\n/** Reads text from the accessible with the given id. */\nexport const nativeTextById = (processId: number, id: string): string =>\n callNative(() => loadNativeAddon().textById(processId, id));\n\n/** Captures real screen pixels for the accessible with the given id. */\nexport const nativeCaptureById = (\n processId: number,\n id: string\n): NativeCapture =>\n callNative(() => loadNativeAddon().captureById(processId, id));\n\n/** Counts top-level windows hosted by the process. */\nexport const nativeWindowCount = (processId: number): number =>\n callNative(() => loadNativeAddon().windowCount(processId));\n\n/** Resolves a top-level window index to an element handle when it exists. */\nexport const nativeWindowAt = (\n processId: number,\n index: number\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().windowAt(processId, index));\n\n/** Counts direct children for an element handle. */\nexport const nativeChildCount = (element: NativeElementHandle): number =>\n callNative(() => loadNativeAddon().childCount(element));\n\n/** Resolves a direct child index to an element handle when it exists. */\nexport const nativeChildAt = (\n element: NativeElementHandle,\n index: number\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().childAt(element, index));\n\n/** Counts selected children for a selectable element handle. */\nexport const nativeSelectedChildCount = (\n element: NativeElementHandle\n): number => callNative(() => loadNativeAddon().selectedChildCount(element));\n\n/** Resolves a selected child index to an element handle when it exists. */\nexport const nativeSelectedChildAt = (\n element: NativeElementHandle,\n index: number\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().selectedChildAt(element, index));\n\n/** Reads whether a direct child is selected. */\nexport const nativeIsChildSelected = (\n element: NativeElementHandle,\n index: number\n): boolean =>\n callNative(() => loadNativeAddon().isChildSelected(element, index));\n\n/** Selects a direct child for a selectable element handle. */\nexport const nativeSelectChildAt = (\n element: NativeElementHandle,\n index: number\n): void => {\n callNative(() => loadNativeAddon().selectChildAt(element, index));\n};\n\n/** Deselects a direct child for a selectable element handle. */\nexport const nativeDeselectChildAt = (\n element: NativeElementHandle,\n index: number\n): void => {\n callNative(() => loadNativeAddon().deselectChildAt(element, index));\n};\n\n/** Selects all children for a selectable element handle. */\nexport const nativeSelectAllChildren = (element: NativeElementHandle): void => {\n callNative(() => loadNativeAddon().selectAllChildren(element));\n};\n\n/** Clears child selection for a selectable element handle. */\nexport const nativeClearSelection = (element: NativeElementHandle): void => {\n callNative(() => loadNativeAddon().clearSelection(element));\n};\n\n/** Counts table rows for a table element handle. */\nexport const nativeTableRowCount = (element: NativeElementHandle): number =>\n callNative(() => loadNativeAddon().tableRowCount(element));\n\n/** Counts table columns for a table element handle. */\nexport const nativeTableColumnCount = (element: NativeElementHandle): number =>\n callNative(() => loadNativeAddon().tableColumnCount(element));\n\n/** Resolves a table cell element handle by row and column when it exists. */\nexport const nativeTableCellAt = (\n element: NativeElementHandle,\n row: number,\n column: number\n): NativeElementHandle | undefined =>\n callNative(() => loadNativeAddon().tableCellAt(element, row, column));\n\n/** Reads selected table row indexes. */\nexport const nativeTableSelectedRows = (\n element: NativeElementHandle\n): number[] => callNative(() => loadNativeAddon().tableSelectedRows(element));\n\n/** Reads selected table column indexes. */\nexport const nativeTableSelectedColumns = (\n element: NativeElementHandle\n): number[] =>\n callNative(() => loadNativeAddon().tableSelectedColumns(element));\n\n/** Reads whether a table row is selected. */\nexport const nativeTableIsRowSelected = (\n element: NativeElementHandle,\n row: number\n): boolean =>\n callNative(() => loadNativeAddon().tableIsRowSelected(element, row));\n\n/** Reads whether a table column is selected. */\nexport const nativeTableIsColumnSelected = (\n element: NativeElementHandle,\n column: number\n): boolean =>\n callNative(() => loadNativeAddon().tableIsColumnSelected(element, column));\n\n/** Reads whether a table cell is selected. */\nexport const nativeTableIsCellSelected = (\n element: NativeElementHandle,\n row: number,\n column: number\n): boolean =>\n callNative(() => loadNativeAddon().tableIsCellSelected(element, row, column));\n\n/** Selects a table row. */\nexport const nativeTableSelectRow = (\n element: NativeElementHandle,\n row: number\n): void => {\n callNative(() => loadNativeAddon().tableSelectRow(element, row));\n};\n\n/** Deselects a table row. */\nexport const nativeTableDeselectRow = (\n element: NativeElementHandle,\n row: number\n): void => {\n callNative(() => loadNativeAddon().tableDeselectRow(element, row));\n};\n\n/** Selects a table column. */\nexport const nativeTableSelectColumn = (\n element: NativeElementHandle,\n column: number\n): void => {\n callNative(() => loadNativeAddon().tableSelectColumn(element, column));\n};\n\n/** Deselects a table column. */\nexport const nativeTableDeselectColumn = (\n element: NativeElementHandle,\n column: number\n): void => {\n callNative(() => loadNativeAddon().tableDeselectColumn(element, column));\n};\n\n/** Sets text contents on the accessible resolved by an element handle. */\nexport const nativeSetText = (\n element: NativeElementHandle,\n text: string\n): void => {\n callNative(() => loadNativeAddon().setText(element, text));\n};\n\n/** Executes the first action on the accessible resolved by an element handle. */\nexport const nativeClick = (element: NativeElementHandle): void => {\n callNative(() => loadNativeAddon().click(element));\n};\n\n/** Reads text from the accessible resolved by an element handle. */\nexport const nativeText = (element: NativeElementHandle): string =>\n callNative(() => loadNativeAddon().text(element));\n\n/** Reads value metadata from the accessible resolved by an element handle. */\nexport const nativeValueInfo = (\n element: NativeElementHandle\n): NativeValueInfo => callNative(() => loadNativeAddon().valueInfo(element));\n\n/** Reads image metadata from the accessible resolved by an element handle. */\nexport const nativeImageInfo = (\n element: NativeElementHandle\n): NativeImageInfo => callNative(() => loadNativeAddon().imageInfo(element));\n\n/** Sets a numeric value on the accessible resolved by an element handle. */\nexport const nativeSetValue = (\n element: NativeElementHandle,\n value: number\n): void => {\n callNative(() => loadNativeAddon().setValue(element, value));\n};\n\n/** Captures real screen pixels for the accessible resolved by an element handle. */\nexport const nativeCapture = (element: NativeElementHandle): NativeCapture =>\n callNative(() => loadNativeAddon().capture(element));\n\n/** Reads screen-relative bounds for the accessible resolved by an element handle. */\nexport const nativeBounds = (\n element: NativeElementHandle\n): NativeCaptureBounds => callNative(() => loadNativeAddon().bounds(element));\n\n/** Reads X11 WM_NORMAL_HINTS for the accessible resolved by an element handle. */\nexport const nativeResizeHints = (\n element: NativeElementHandle\n): NativeWindowResizeHints =>\n callNative(() => loadNativeAddon().resizeHints(element));\n\n/** Reads X11 window metadata for the accessible resolved by an element handle. */\nexport const nativeX11Info = (\n element: NativeElementHandle\n): NativeX11WindowInfo => callNative(() => loadNativeAddon().x11Info(element));\n\n/** Captures the full X11 root window currently addressed by DISPLAY. */\nexport const nativeCaptureScreen = (): NativeCapture =>\n callNative(() => loadNativeAddon().captureScreen());\n\n/** Captures real screen pixels for explicit screen-relative bounds. */\nexport const nativeCaptureBounds = (\n bounds: NativeCaptureBounds\n): NativeCapture =>\n callNative(() =>\n loadNativeAddon().captureBounds(\n bounds.x,\n bounds.y,\n bounds.width,\n bounds.height\n )\n );\n\n/** Counts mapped top-level X11 windows currently addressed by DISPLAY. */\nexport const nativeMappedX11WindowCount = (): number =>\n callNative(() => loadNativeAddon().mappedX11WindowCount());\n\n/** Reads AT-SPI metadata for the accessible resolved by an element handle. */\nexport const nativeElementInfo = (\n element: NativeElementHandle\n): NativeElementInfo =>\n callNative(() => loadNativeAddon().elementInfo(element));\n\n/** Lists StatusNotifier tray items owned by the process. */\nexport const nativeTrayItems = (processId: number): NativeTrayItem[] =>\n callNative(() => loadNativeAddon().trayItems(processId));\n\n/** Runs the test tray host until the process is terminated. */\nexport const nativeRunTrayHost = (): void => {\n callNative(() => loadNativeAddon().runTrayHost());\n};\n"],"names":["require","packageVersion"],"mappings":";;;;;;AAKO,MAAM,UAAU;AC4OvB,MAAMA,YAAU,cAAc,YAAY,GAAG;AAC7C,MAAM,cAAc,QAAQ,QAAQ,cAAc,YAAY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C;AAGpE,MAAM,iBAAiB,CAC5B,SACA,UACS;AACT,aAAW,MAAM,gBAAA,EAAkB,SAAS,SAAS,KAAK,CAAC;AAC7D;AAGO,MAAM,gBAAgB,CAAC,YAC5B,WAAW,MAAM,gBAAA,EAAkB,QAAQ,OAAO,CAAC;AAG9C,MAAM,eAAe,CAC1B,YACwB,WAAW,MAAM,gBAAA,EAAkB,OAAO,OAAO,CAAC;AAGrE,MAAM,oBAAoB,CAC/B,YAEA,WAAW,MAAM,gBAAA,EAAkB,YAAY,OAAO,CAAC;AAGlD,MAAM,gBAAgB,CAC3B,YACwB,WAAW,MAAM,gBAAA,EAAkB,QAAQ,OAAO,CAAC;AAGtE,MAAM,sBAAsB,MACjC,WAAW,MAAM,gBAAA,EAAkB,eAAe;AAG7C,MAAM,sBAAsB,CACjC,WAEA;AAAA,EAAW,MACT,kBAAkB;AAAA,IAChB,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAEX;AAGK,MAAM,6BAA6B,MACxC,WAAW,MAAM,gBAAA,EAAkB,sBAAsB;AAGpD,MAAM,oBAAoB,CAC/B,YAEA,WAAW,MAAM,gBAAA,EAAkB,YAAY,OAAO,CAAC;AAGlD,MAAM,kBAAkB,CAAC,cAC9B,WAAW,MAAM,gBAAA,EAAkB,UAAU,SAAS,CAAC;AAGlD,MAAM,oBAAoB,MAAY;AAC3C,aAAW,MAAM,kBAAkB,aAAa;AAClD;"}
package/dist/native.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: gestament
3
- * version: 0.2.0
3
+ * version: 0.4.0
4
4
  * description: TypeScript based test driver for GTK
5
5
  * author: Kouji Matsui (@kekyo@mi.kekyo.net)
6
6
  * license: MIT
7
7
  * repository.url: https://github.com/kekyo/gestament.git
8
- * git.commit.hash: 82eaccb340f7304524549a1f95888845deb4a156
8
+ * git.commit.hash: 99e5b39d6b18c635721584cf2d8b9381d0b1df66
9
9
  */
10
10
 
11
11
  export interface NativeCaptureBounds {
@@ -20,6 +20,21 @@ export interface NativeCapture {
20
20
  readonly visibleBounds: NativeCaptureBounds;
21
21
  readonly clipped: boolean;
22
22
  }
23
+ export interface NativeWindowResizeHints {
24
+ readonly baseWidth: number;
25
+ readonly baseHeight: number;
26
+ readonly minWidth: number;
27
+ readonly minHeight: number;
28
+ readonly widthIncrement: number;
29
+ readonly heightIncrement: number;
30
+ }
31
+ export interface NativeX11WindowInfo {
32
+ readonly windowId: string;
33
+ readonly title: string;
34
+ readonly className: string;
35
+ readonly instanceName: string;
36
+ readonly normalHints: NativeWindowResizeHints;
37
+ }
23
38
  export interface NativeElementInfo {
24
39
  readonly roleName: string;
25
40
  readonly localizedRoleName: string;
@@ -157,10 +172,18 @@ export declare const nativeImageInfo: (element: NativeElementHandle) => NativeIm
157
172
  export declare const nativeSetValue: (element: NativeElementHandle, value: number) => void;
158
173
  /** Captures real screen pixels for the accessible resolved by an element handle. */
159
174
  export declare const nativeCapture: (element: NativeElementHandle) => NativeCapture;
175
+ /** Reads screen-relative bounds for the accessible resolved by an element handle. */
176
+ export declare const nativeBounds: (element: NativeElementHandle) => NativeCaptureBounds;
177
+ /** Reads X11 WM_NORMAL_HINTS for the accessible resolved by an element handle. */
178
+ export declare const nativeResizeHints: (element: NativeElementHandle) => NativeWindowResizeHints;
179
+ /** Reads X11 window metadata for the accessible resolved by an element handle. */
180
+ export declare const nativeX11Info: (element: NativeElementHandle) => NativeX11WindowInfo;
160
181
  /** Captures the full X11 root window currently addressed by DISPLAY. */
161
182
  export declare const nativeCaptureScreen: () => NativeCapture;
162
183
  /** Captures real screen pixels for explicit screen-relative bounds. */
163
184
  export declare const nativeCaptureBounds: (bounds: NativeCaptureBounds) => NativeCapture;
185
+ /** Counts mapped top-level X11 windows currently addressed by DISPLAY. */
186
+ export declare const nativeMappedX11WindowCount: () => number;
164
187
  /** Reads AT-SPI metadata for the accessible resolved by an element handle. */
165
188
  export declare const nativeElementInfo: (element: NativeElementHandle) => NativeElementInfo;
166
189
  /** Lists StatusNotifier tray items owned by the process. */
@@ -1 +1 @@
1
- {"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":";;;;;;;;;AAuBA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,mBAAmB,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC9B,6BAA6B;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,sCAAsC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,sCAAsC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,qDAAqD;IACrD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAElC,8DAA8D;IAC9D,QAAQ,CAAC,I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install runtime prerequisites for example with:",
7
+ "",
8
+ " sudo apt-get update",
9
+ " sudo apt-get install -y at-spi2-core dbus dbus-x11 libx11-6 libxtst6 xauth xvfb",
10
+ "",
11
+ ""
12
+ ].join("\n");
13
+ const appendPrerequisiteInstallHint = (message) => message.includes(prerequisiteInstallHint) ? message : `${message}${prerequisiteInstallHint}`;
14
+ exports.appendPrerequisiteInstallHint = appendPrerequisiteInstallHint;
15
+ //# sourceMappingURL=prerequisites-BuZST2Dy.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prerequisites-BuZST2Dy.cjs","sources":["../src/prerequisites.ts"],"sourcesContent":["// gestament - TypeScript based test driver for GTK.\n// Copyright (c) Kouji Matsui. (@kekyo@mi.kekyo.net)\n// Under MIT.\n// https://github.com/kekyo/gestament\n\n/////////////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Fixed Debian/Ubuntu example shown when native GTK automation prerequisites may\n * be missing.\n */\nexport const prerequisiteInstallHint = [\n '',\n '',\n 'gestament: Native GTK automation prerequisites may be missing.',\n 'For Debian/Ubuntu, install runtime prerequisites for example with:',\n '',\n ' sudo apt-get update',\n ' sudo apt-get install -y at-spi2-core dbus dbus-x11 libx11-6 libxtst6 xauth xvfb',\n '',\n '',\n].join('\\n');\n\n/**\n * Appends the fixed prerequisite installation hint to an error message.\n *\n * @param message Base error message.\n * @returns Error message followed by the prerequisite installation hint.\n */\nexport const appendPrerequisiteInstallHint = (message: string): string =>\n message.includes(prerequisiteInstallHint)\n ? message\n : `${message}${prerequisiteInstallHint}`;\n"],"names":[],"mappings":";AAWO,MAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,KAAK,IAAI;AAQJ,MAAM,gCAAgC,CAAC,YAC5C,QAAQ,SAAS,uBAAuB,IACpC,UACA,GAAG,OAAO,GAAG,uBAAuB;;"}
@@ -0,0 +1,16 @@
1
+ const prerequisiteInstallHint = [
2
+ "",
3
+ "",
4
+ "gestament: Native GTK automation prerequisites may be missing.",
5
+ "For Debian/Ubuntu, install runtime prerequisites for example with:",
6
+ "",
7
+ " sudo apt-get update",
8
+ " sudo apt-get install -y at-spi2-core dbus dbus-x11 libx11-6 libxtst6 xauth xvfb",
9
+ "",
10
+ ""
11
+ ].join("\n");
12
+ const appendPrerequisiteInstallHint = (message) => message.includes(prerequisiteInstallHint) ? message : `${message}${prerequisiteInstallHint}`;
13
+ export {
14
+ appendPrerequisiteInstallHint as a
15
+ };
16
+ //# sourceMappingURL=prerequisites-JB0SKPVd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prerequisites-JB0SKPVd.js","sources":["../src/prerequisites.ts"],"sourcesContent":["// gestament - TypeScript based test driver for GTK.\n// Copyright (c) Kouji Matsui. (@kekyo@mi.kekyo.net)\n// Under MIT.\n// https://github.com/kekyo/gestament\n\n/////////////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Fixed Debian/Ubuntu example shown when native GTK automation prerequisites may\n * be missing.\n */\nexport const prerequisiteInstallHint = [\n '',\n '',\n 'gestament: Native GTK automation prerequisites may be missing.',\n 'For Debian/Ubuntu, install runtime prerequisites for example with:',\n '',\n ' sudo apt-get update',\n ' sudo apt-get install -y at-spi2-core dbus dbus-x11 libx11-6 libxtst6 xauth xvfb',\n '',\n '',\n].join('\\n');\n\n/**\n * Appends the fixed prerequisite installation hint to an error message.\n *\n * @param message Base error message.\n * @returns Error message followed by the prerequisite installation hint.\n */\nexport const appendPrerequisiteInstallHint = (message: string): string =>\n message.includes(prerequisiteInstallHint)\n ? message\n : `${message}${prerequisiteInstallHint}`;\n"],"names":[],"mappings":"AAWO,MAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,KAAK,IAAI;AAQJ,MAAM,gCAAgC,CAAC,YAC5C,QAAQ,SAAS,uBAAuB,IACpC,UACA,GAAG,OAAO,GAAG,uBAAuB;"}
@@ -0,0 +1,23 @@
1
+ /*!
2
+ * name: gestament
3
+ * version: 0.4.0
4
+ * description: TypeScript based test driver for GTK
5
+ * author: Kouji Matsui (@kekyo@mi.kekyo.net)
6
+ * license: MIT
7
+ * repository.url: https://github.com/kekyo/gestament.git
8
+ * git.commit.hash: 99e5b39d6b18c635721584cf2d8b9381d0b1df66
9
+ */
10
+
11
+ /**
12
+ * Fixed Debian/Ubuntu example shown when native GTK automation prerequisites may
13
+ * be missing.
14
+ */
15
+ export declare const prerequisiteInstallHint: string;
16
+ /**
17
+ * Appends the fixed prerequisite installation hint to an error message.
18
+ *
19
+ * @param message Base error message.
20
+ * @returns Error message followed by the prerequisite installation hint.
21
+ */
22
+ export declare const appendPrerequisiteInstallHint: (message: string) => string;
23
+ //# sourceMappingURL=prerequisites.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prerequisites.d.ts","sourceRoot":"","sources":["../src/prerequisites.ts"],"names":[],"mappings":";;;;;;;;;AAOA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAUxB,CAAC;AAEb;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GAAI,SAAS,MAAM,KAAG,MAGpB,CAAC"}
package/dist/testing.cjs CHANGED
@@ -29,6 +29,7 @@ const node_url = require("node:url");
29
29
  const pngjs = require("pngjs");
30
30
  const ssim_js = require("ssim.js");
31
31
  const __screwUpDefaultImportModule1 = require("@tesseract.js-data/eng");
32
+ const wait = require("./wait-eOIz4nZm.cjs");
32
33
  function pixelmatch$1(img1, img2, output, width, height, options = {}) {
33
34
  const {
34
35
  threshold = 0.1,
@@ -1175,6 +1176,8 @@ const createGtkCaptureExpect = (defaults) => {
1175
1176
  };
1176
1177
  const defaultGtkCaptureExpect = createGtkCaptureExpect();
1177
1178
  const expectCapture = (capture, name) => defaultGtkCaptureExpect.expectCapture(capture, name);
1179
+ exports.toPass = wait.toPass;
1180
+ exports.waitForResult = wait.waitForResult;
1178
1181
  exports.createGtkCaptureExpect = createGtkCaptureExpect;
1179
1182
  exports.expectCapture = expectCapture;
1180
1183
  //# sourceMappingURL=testing.cjs.map