winui-svelte 0.0.6 → 0.0.7

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 (281) hide show
  1. package/API.md +390 -3
  2. package/README.md +4 -0
  3. package/dist/app/launch-command.d.ts +11 -6
  4. package/dist/app/launch-command.d.ts.map +1 -1
  5. package/dist/app/launch-command.js +16 -5
  6. package/dist/app/launch-command.js.map +1 -1
  7. package/dist/app/tray-instance.d.ts +4 -3
  8. package/dist/app/tray-instance.d.ts.map +1 -1
  9. package/dist/app/tray-instance.js +7 -5
  10. package/dist/app/tray-instance.js.map +1 -1
  11. package/dist/automation/backend.d.ts +51 -0
  12. package/dist/automation/backend.d.ts.map +1 -0
  13. package/dist/automation/backend.js +5 -0
  14. package/dist/automation/backend.js.map +1 -0
  15. package/dist/automation/client.d.ts +97 -0
  16. package/dist/automation/client.d.ts.map +1 -0
  17. package/dist/automation/client.js +203 -0
  18. package/dist/automation/client.js.map +1 -0
  19. package/dist/automation/ids.d.ts +90 -0
  20. package/dist/automation/ids.d.ts.map +1 -0
  21. package/dist/automation/ids.js +84 -0
  22. package/dist/automation/ids.js.map +1 -0
  23. package/dist/automation/index.d.ts +13 -0
  24. package/dist/automation/index.d.ts.map +1 -0
  25. package/dist/automation/index.js +8 -0
  26. package/dist/automation/index.js.map +1 -0
  27. package/dist/automation/native.d.ts +11 -0
  28. package/dist/automation/native.d.ts.map +1 -0
  29. package/dist/automation/native.js +595 -0
  30. package/dist/automation/native.js.map +1 -0
  31. package/dist/automation/text.d.ts +50 -0
  32. package/dist/automation/text.d.ts.map +1 -0
  33. package/dist/automation/text.js +110 -0
  34. package/dist/automation/text.js.map +1 -0
  35. package/dist/automation/with-client.d.ts +13 -0
  36. package/dist/automation/with-client.d.ts.map +1 -0
  37. package/dist/automation/with-client.js +19 -0
  38. package/dist/automation/with-client.js.map +1 -0
  39. package/dist/automation/worker-job.d.ts +32 -0
  40. package/dist/automation/worker-job.d.ts.map +1 -0
  41. package/dist/automation/worker-job.js +69 -0
  42. package/dist/automation/worker-job.js.map +1 -0
  43. package/dist/automation/worker.d.ts +44 -0
  44. package/dist/automation/worker.d.ts.map +1 -0
  45. package/dist/automation/worker.js +70 -0
  46. package/dist/automation/worker.js.map +1 -0
  47. package/dist/bindings/.dynwinrt-managed +1 -1
  48. package/dist/chrome/context-menus/context-menu-schema.d.ts +4 -4
  49. package/dist/chrome/notifications/notification-schema.d.ts +2 -2
  50. package/dist/components/hand-written/Window.svelte +2 -0
  51. package/dist/components/window-context.d.ts +14 -0
  52. package/dist/components/window-context.d.ts.map +1 -0
  53. package/dist/components/window-context.js +20 -0
  54. package/dist/components/window-context.js.map +1 -0
  55. package/dist/downloads/chrome-downloads.d.ts +8 -0
  56. package/dist/downloads/chrome-downloads.d.ts.map +1 -1
  57. package/dist/downloads/chrome-downloads.js +35 -6
  58. package/dist/downloads/chrome-downloads.js.map +1 -1
  59. package/dist/downloads/download-record.d.ts +3 -2
  60. package/dist/downloads/download-record.d.ts.map +1 -1
  61. package/dist/downloads/download-record.js.map +1 -1
  62. package/dist/downloads/download-transfer.d.ts.map +1 -1
  63. package/dist/downloads/download-transfer.js +3 -3
  64. package/dist/downloads/download-transfer.js.map +1 -1
  65. package/dist/downloads/download-types.d.ts +3 -1
  66. package/dist/downloads/download-types.d.ts.map +1 -1
  67. package/dist/downloads/download-types.js.map +1 -1
  68. package/dist/downloads/fetch-to-file.d.ts +11 -6
  69. package/dist/downloads/fetch-to-file.d.ts.map +1 -1
  70. package/dist/downloads/fetch-to-file.js +45 -16
  71. package/dist/downloads/fetch-to-file.js.map +1 -1
  72. package/dist/downloads/taskbar-progress.d.ts +3 -18
  73. package/dist/downloads/taskbar-progress.d.ts.map +1 -1
  74. package/dist/downloads/taskbar-progress.js +1 -38
  75. package/dist/downloads/taskbar-progress.js.map +1 -1
  76. package/dist/enums.d.ts +1 -0
  77. package/dist/enums.d.ts.map +1 -1
  78. package/dist/enums.js +1 -0
  79. package/dist/enums.js.map +1 -1
  80. package/dist/forms/form-field-props.d.ts +2 -2
  81. package/dist/progress/TaskbarProgress.d.svelte.ts +6 -0
  82. package/dist/progress/TaskbarProgress.svelte +32 -0
  83. package/dist/progress/aggregate.d.ts +23 -0
  84. package/dist/progress/aggregate.d.ts.map +1 -0
  85. package/dist/progress/aggregate.js +59 -0
  86. package/dist/progress/aggregate.js.map +1 -0
  87. package/dist/progress/core.d.ts +14 -0
  88. package/dist/progress/core.d.ts.map +1 -0
  89. package/dist/progress/core.js +8 -0
  90. package/dist/progress/core.js.map +1 -0
  91. package/dist/progress/index.d.ts +5 -0
  92. package/dist/progress/index.d.ts.map +1 -0
  93. package/dist/progress/index.js +4 -0
  94. package/dist/progress/index.js.map +1 -0
  95. package/dist/progress/progress-event.d.ts +18 -0
  96. package/dist/progress/progress-event.d.ts.map +1 -0
  97. package/dist/progress/progress-event.js +19 -0
  98. package/dist/progress/progress-event.js.map +1 -0
  99. package/dist/progress/progress-operation.d.ts +163 -0
  100. package/dist/progress/progress-operation.d.ts.map +1 -0
  101. package/dist/progress/progress-operation.js +356 -0
  102. package/dist/progress/progress-operation.js.map +1 -0
  103. package/dist/progress/progress-registry.d.ts +89 -0
  104. package/dist/progress/progress-registry.d.ts.map +1 -0
  105. package/dist/progress/progress-registry.js +187 -0
  106. package/dist/progress/progress-registry.js.map +1 -0
  107. package/dist/progress/progress-source.d.ts +46 -0
  108. package/dist/progress/progress-source.d.ts.map +1 -0
  109. package/dist/progress/progress-source.js +31 -0
  110. package/dist/progress/progress-source.js.map +1 -0
  111. package/dist/progress/progress-state.d.ts +54 -0
  112. package/dist/progress/progress-state.d.ts.map +1 -0
  113. package/dist/progress/progress-state.js +35 -0
  114. package/dist/progress/progress-state.js.map +1 -0
  115. package/dist/progress/progress-text.d.ts +10 -0
  116. package/dist/progress/progress-text.d.ts.map +1 -0
  117. package/dist/progress/progress-text.js +23 -0
  118. package/dist/progress/progress-text.js.map +1 -0
  119. package/dist/progress/scoped-source.d.ts +31 -0
  120. package/dist/progress/scoped-source.d.ts.map +1 -0
  121. package/dist/progress/scoped-source.js +46 -0
  122. package/dist/progress/scoped-source.js.map +1 -0
  123. package/dist/progress/taskbar-progress-props.d.ts +15 -0
  124. package/dist/progress/taskbar-progress-props.d.ts.map +1 -0
  125. package/dist/progress/taskbar-progress-props.js +2 -0
  126. package/dist/progress/taskbar-progress-props.js.map +1 -0
  127. package/dist/progress/taskbar-progress.d.ts +44 -0
  128. package/dist/progress/taskbar-progress.d.ts.map +1 -0
  129. package/dist/progress/taskbar-progress.js +62 -0
  130. package/dist/progress/taskbar-progress.js.map +1 -0
  131. package/dist/progress/track-operation.d.ts +36 -0
  132. package/dist/progress/track-operation.d.ts.map +1 -0
  133. package/dist/progress/track-operation.js +53 -0
  134. package/dist/progress/track-operation.js.map +1 -0
  135. package/dist/tray/menu-svelte/TrayMenuOperations.d.svelte.ts +6 -0
  136. package/dist/tray/menu-svelte/TrayMenuOperations.svelte +33 -0
  137. package/dist/tray/menu-svelte/TrayMenuProgress.d.svelte.ts +6 -0
  138. package/dist/tray/menu-svelte/TrayMenuProgress.svelte +28 -0
  139. package/dist/tray/menu-svelte/index.d.ts +3 -1
  140. package/dist/tray/menu-svelte/index.d.ts.map +1 -1
  141. package/dist/tray/menu-svelte/index.js +2 -0
  142. package/dist/tray/menu-svelte/index.js.map +1 -1
  143. package/dist/tray/menu-svelte/menu-node.d.ts +5 -5
  144. package/dist/tray/menu-svelte/menu-props.d.ts +16 -0
  145. package/dist/tray/menu-svelte/menu-props.d.ts.map +1 -1
  146. package/dist/tray/menu-svelte/operation-ids.d.ts +8 -0
  147. package/dist/tray/menu-svelte/operation-ids.d.ts.map +1 -0
  148. package/dist/tray/menu-svelte/operation-ids.js +20 -0
  149. package/dist/tray/menu-svelte/operation-ids.js.map +1 -0
  150. package/dist/tray/native.d.ts +6 -1
  151. package/dist/tray/native.d.ts.map +1 -1
  152. package/dist/tray/native.js +22 -32
  153. package/dist/tray/native.js.map +1 -1
  154. package/dist/tray/pointer-share.d.ts +27 -0
  155. package/dist/tray/pointer-share.d.ts.map +1 -0
  156. package/dist/tray/pointer-share.js +61 -0
  157. package/dist/tray/pointer-share.js.map +1 -0
  158. package/dist/tray/standalone/index.d.ts +1 -0
  159. package/dist/tray/standalone/index.d.ts.map +1 -1
  160. package/dist/tray/standalone/index.js +1 -0
  161. package/dist/tray/standalone/index.js.map +1 -1
  162. package/dist/tray/standalone/menu-theme.d.ts +38 -0
  163. package/dist/tray/standalone/menu-theme.d.ts.map +1 -0
  164. package/dist/tray/standalone/menu-theme.js +74 -0
  165. package/dist/tray/standalone/menu-theme.js.map +1 -0
  166. package/dist/tray/standalone/native.d.ts +5 -1
  167. package/dist/tray/standalone/native.d.ts.map +1 -1
  168. package/dist/tray/standalone/native.js +5 -1
  169. package/dist/tray/standalone/native.js.map +1 -1
  170. package/dist/tray/standalone/standalone-tray.d.ts +13 -0
  171. package/dist/tray/standalone/standalone-tray.d.ts.map +1 -1
  172. package/dist/tray/standalone/standalone-tray.js +23 -1
  173. package/dist/tray/standalone/standalone-tray.js.map +1 -1
  174. package/dist/tray/tray-core.d.ts.map +1 -1
  175. package/dist/tray/tray-core.js +1 -0
  176. package/dist/tray/tray-core.js.map +1 -1
  177. package/dist/tray/tray-manifest.d.ts +44 -4
  178. package/dist/tray/tray-manifest.d.ts.map +1 -1
  179. package/dist/tray/tray-manifest.js +48 -4
  180. package/dist/tray/tray-manifest.js.map +1 -1
  181. package/dist/vite/entrypoints/build-tray.d.ts +3 -1
  182. package/dist/vite/entrypoints/build-tray.d.ts.map +1 -1
  183. package/dist/vite/entrypoints/build-tray.js +22 -16
  184. package/dist/vite/entrypoints/build-tray.js.map +1 -1
  185. package/dist/vite/entrypoints/extract-tray.d.ts +7 -6
  186. package/dist/vite/entrypoints/extract-tray.d.ts.map +1 -1
  187. package/dist/vite/entrypoints/extract-tray.js +35 -15
  188. package/dist/vite/entrypoints/extract-tray.js.map +1 -1
  189. package/dist/vite/entrypoints/tray-module.d.ts +2 -1
  190. package/dist/vite/entrypoints/tray-module.d.ts.map +1 -1
  191. package/dist/vite/entrypoints/tray-module.js +8 -4
  192. package/dist/vite/entrypoints/tray-module.js.map +1 -1
  193. package/dist/web-apis/file-read.d.ts +14 -0
  194. package/dist/web-apis/file-read.d.ts.map +1 -0
  195. package/dist/web-apis/file-read.js +37 -0
  196. package/dist/web-apis/file-read.js.map +1 -0
  197. package/dist/web-apis/file-system.d.ts +9 -0
  198. package/dist/web-apis/file-system.d.ts.map +1 -1
  199. package/dist/web-apis/file-system.js +24 -0
  200. package/dist/web-apis/file-system.js.map +1 -1
  201. package/dist/win32-foreground.d.ts +14 -0
  202. package/dist/win32-foreground.d.ts.map +1 -0
  203. package/dist/win32-foreground.js +71 -0
  204. package/dist/win32-foreground.js.map +1 -0
  205. package/dist/window/create-window.d.ts +1 -1
  206. package/dist/window/create-window.d.ts.map +1 -1
  207. package/dist/window/create-window.js +1 -0
  208. package/dist/window/create-window.js.map +1 -1
  209. package/dist/window/foreground-filter.d.ts +71 -0
  210. package/dist/window/foreground-filter.d.ts.map +1 -0
  211. package/dist/window/foreground-filter.js +108 -0
  212. package/dist/window/foreground-filter.js.map +1 -0
  213. package/dist/window/foreground-native.d.ts +25 -0
  214. package/dist/window/foreground-native.d.ts.map +1 -0
  215. package/dist/window/foreground-native.js +88 -0
  216. package/dist/window/foreground-native.js.map +1 -0
  217. package/dist/window/foreground.d.ts +49 -0
  218. package/dist/window/foreground.d.ts.map +1 -0
  219. package/dist/window/foreground.js +78 -0
  220. package/dist/window/foreground.js.map +1 -0
  221. package/dist/window/window-host.svelte.d.ts +1 -1
  222. package/dist/window/window-host.svelte.d.ts.map +1 -1
  223. package/package.json +18 -1
  224. package/src/app/launch-command.ts +19 -5
  225. package/src/app/tray-instance.ts +7 -5
  226. package/src/automation/backend.ts +56 -0
  227. package/src/automation/client.ts +327 -0
  228. package/src/automation/ids.ts +97 -0
  229. package/src/automation/index.ts +23 -0
  230. package/src/automation/native.ts +689 -0
  231. package/src/automation/text.ts +174 -0
  232. package/src/automation/with-client.ts +20 -0
  233. package/src/automation/worker-job.ts +97 -0
  234. package/src/automation/worker.ts +116 -0
  235. package/src/components/window-context.ts +23 -0
  236. package/src/downloads/chrome-downloads.ts +46 -6
  237. package/src/downloads/download-record.ts +3 -2
  238. package/src/downloads/download-transfer.ts +3 -3
  239. package/src/downloads/download-types.ts +3 -0
  240. package/src/downloads/fetch-to-file.ts +47 -17
  241. package/src/downloads/taskbar-progress.ts +3 -49
  242. package/src/enums.ts +1 -0
  243. package/src/progress/TaskbarProgress.d.svelte.ts +6 -0
  244. package/src/progress/aggregate.ts +68 -0
  245. package/src/progress/core.ts +13 -0
  246. package/src/progress/index.ts +4 -0
  247. package/src/progress/progress-event.ts +25 -0
  248. package/src/progress/progress-operation.ts +469 -0
  249. package/src/progress/progress-registry.ts +224 -0
  250. package/src/progress/progress-source.ts +66 -0
  251. package/src/progress/progress-state.ts +72 -0
  252. package/src/progress/progress-text.ts +27 -0
  253. package/src/progress/scoped-source.ts +56 -0
  254. package/src/progress/taskbar-progress-props.ts +18 -0
  255. package/src/progress/taskbar-progress.ts +80 -0
  256. package/src/progress/track-operation.ts +81 -0
  257. package/src/tray/menu-svelte/TrayMenuOperations.d.svelte.ts +6 -0
  258. package/src/tray/menu-svelte/TrayMenuProgress.d.svelte.ts +6 -0
  259. package/src/tray/menu-svelte/index.ts +4 -0
  260. package/src/tray/menu-svelte/menu-props.ts +20 -0
  261. package/src/tray/menu-svelte/operation-ids.ts +21 -0
  262. package/src/tray/native.ts +29 -33
  263. package/src/tray/pointer-share.ts +71 -0
  264. package/src/tray/standalone/index.ts +1 -0
  265. package/src/tray/standalone/menu-theme.ts +90 -0
  266. package/src/tray/standalone/native.ts +5 -1
  267. package/src/tray/standalone/standalone-tray.ts +43 -1
  268. package/src/tray/tray-core.ts +1 -0
  269. package/src/tray/tray-manifest.ts +53 -4
  270. package/src/vite/entrypoints/build-tray.ts +23 -16
  271. package/src/vite/entrypoints/extract-tray.ts +41 -15
  272. package/src/vite/entrypoints/tray-module.ts +8 -4
  273. package/src/web-apis/file-read.ts +43 -0
  274. package/src/web-apis/file-system.ts +33 -0
  275. package/src/win32-foreground.ts +76 -0
  276. package/src/window/create-window.ts +2 -0
  277. package/src/window/foreground-filter.ts +167 -0
  278. package/src/window/foreground-native.ts +93 -0
  279. package/src/window/foreground.ts +106 -0
  280. package/src/window/window-host.svelte.ts +1 -1
  281. package/web-types.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { activateOrLaunch } from "./activate.js";
2
2
  import { currentUserSid, openPipe, pipeNameFor } from "./instance-pipe.js";
3
3
  import { encodeRedirect } from "./redirect.js";
4
- import { parseTrayManifest, TRAY_BUNDLE_FILE, TRAY_MANIFEST_FILE } from "../tray/tray-manifest.js";
4
+ import { parseTrayManifestFile, processGuidOf, TRAY_BUNDLE_FILE, TRAY_MANIFEST_FILE } from "../tray/tray-manifest.js";
5
5
  import { readFileSync } from "node:fs";
6
6
  import path from "node:path";
7
7
  const KEY_PREFIX = "tray:";
@@ -16,8 +16,9 @@ export function trayInstanceKey(guid) {
16
16
  return `${KEY_PREFIX}${guid}`;
17
17
  }
18
18
  /**
19
- * Claims the right to be the one tray process for `guid`: the built `tray.js`
20
- * calls it first. A second copy finds the first and gets false, and exits.
19
+ * Claims the right to be the one tray process for `guid` (the first tray's,
20
+ * when the entrypoint defines several): the built `tray.js` calls it first.
21
+ * A second copy finds the first and gets false, and exits.
21
22
  * Needs no window or UI thread.
22
23
  *
23
24
  * @param options - The tray's guid.
@@ -38,7 +39,7 @@ export function claimTrayInstance({ guid }) {
38
39
  }
39
40
  /**
40
41
  * Starts the built `tray.js` as a process of its own, once: when one runs for
41
- * the same `guid` nothing starts. Optional, and never needed by the app's
42
+ * the same process guid nothing starts. Optional, and never needed by the app's
42
43
  * code: an installer, a launcher or the app's own `main` may call it.
43
44
  *
44
45
  * @param options - The folder of the build.
@@ -46,7 +47,8 @@ export function claimTrayInstance({ guid }) {
46
47
  * @throws {Error} When `tray.json` is missing or is not a tray manifest.
47
48
  */
48
49
  export function startTray({ directory = process.cwd(), activate = activateOrLaunch } = {}) {
49
- const { guid } = parseTrayManifest(JSON.parse(readFileSync(path.join(directory, TRAY_MANIFEST_FILE), "utf8")));
50
+ const manifest = JSON.parse(readFileSync(path.join(directory, TRAY_MANIFEST_FILE), "utf8"));
51
+ const guid = processGuidOf(parseTrayManifestFile(manifest));
50
52
  return activate({
51
53
  key: trayInstanceKey(guid),
52
54
  activation: {
@@ -1 +1 @@
1
- {"version":3,"file":"tray-instance.js","sourceRoot":"","sources":["../../src/app/tray-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrG,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,UAAU,GAAG,OAAO,CAAC;AAE3B;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,GAAG,UAAU,GAAG,IAAI,EAAE,CAAC;AAChC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAE,IAAI,EAAoB;IAC1D,MAAM,IAAI,GAAG,QAAQ,CAAC;QACpB,QAAQ,EAAE,WAAW,CAAC;YACpB,GAAG,EAAE,eAAe,CAAC,IAAI,CAAC;YAC1B,GAAG,EAAE,cAAc,EAAE;SACtB,CAAC;QACF,OAAO,EAAE,cAAc,CAAC;YACtB,SAAS,EAAE,EAAE;YACb,gBAAgB,EAAE,OAAO,CAAC,GA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inside the scope of one `withUiaClient` call. */
3
+ export type UiaHandle = number;
4
+ /** The properties of an element, read in one cross-process call. */
5
+ export interface UiaProperties {
6
+ readonly name: string;
7
+ readonly className: string;
8
+ readonly automationId: string;
9
+ readonly controlType: UiaControlType;
10
+ readonly processId: number;
11
+ readonly isOffscreen: boolean;
12
+ readonly boundingRectangle: {
13
+ readonly left: number;
14
+ readonly top: number;
15
+ readonly width: number;
16
+ readonly height: number;
17
+ };
18
+ /** 1 to 9 for a heading, 0 for an element that is not one. */
19
+ readonly headingLevel: number;
20
+ readonly hasTextPattern: boolean;
21
+ readonly hasValuePattern: boolean;
22
+ }
23
+ /** A child found by the walk: its handle and its properties. */
24
+ export interface UiaChild {
25
+ readonly handle: UiaHandle;
26
+ readonly properties: UiaProperties;
27
+ }
28
+ /**
29
+ * The calls the client makes of UI Automation, over opaque handles. The real
30
+ * one is `createUiaNativeBackend`; a test passes a fake. Every handle lives
31
+ * until `dispose`.
32
+ */
33
+ export interface UiaBackend {
34
+ elementFromHandle(hwnd: bigint): UiaHandle | null;
35
+ focusedElement(): UiaHandle | null;
36
+ properties(handle: UiaHandle): UiaProperties;
37
+ children(handle: UiaHandle): readonly UiaChild[];
38
+ visibleRanges(handle: UiaHandle): readonly UiaHandle[] | null;
39
+ documentRange(handle: UiaHandle): UiaHandle | null;
40
+ rangeText(options: {
41
+ readonly range: UiaHandle;
42
+ readonly maxLength: number;
43
+ }): string;
44
+ value(handle: UiaHandle): string | null;
45
+ dispose(): void;
46
+ }
47
+ /** The element went away (or never answered) while the client was reading it. */
48
+ export declare class UiaElementUnavailableError extends Error {
49
+ name: string;
50
+ }
51
+ //# sourceMappingURL=backend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/automation/backend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,iFAAiF;AACjF,MAAM,MAAM,SAAS,GAAG,MA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CAAC;IACnD,SAAS,CAAC,OAAO,EAAE;QACjB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;QAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;KAC5B,GAAG,MAAM,CAAC;IACX,KAAK,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;IACxC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,iFAAiF;AACjF,qBAAa,0BAA2B,SAAQ,KAAK;IAC1C,IAAI,SAAgC;CAC9C"}
@@ -0,0 +1,5 @@
1
+ /** The element went away (or never answered) while the client was reading it. */
2
+ export class UiaElementUnavailableError extends Error {
3
+ name = "UiaElementUnavailableError";
4
+ }
5
+ //# sourceMappingURL=backend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.js","sourceRoot":"","sources":["../../src/automation/backend.ts"],"names":[],"mappings":"AAoDA,iFAAiF;AACjF,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IAC1C,IAAI,GAAG,4BAA4B,CAAC;CAC9C"}
@@ -0,0 +1,97 @@
1
+ import type { UiaBackend, UiaProperties } from "./backend.js";
2
+ import { UiaPatternName } from "./ids.js";
3
+ /** Why a walk ended. */
4
+ export declare const UiaWalkEnd: {
5
+ readonly complete: "complete";
6
+ readonly maxElements: "maxElements";
7
+ readonly deadline: "deadline";
8
+ };
9
+ /** One reason a walk ended. */
10
+ export type UiaWalkEnd = typeof UiaWalkEnd[keyof typeof UiaWalkEnd];
11
+ /** The client was used after its `withUiaClient` call ended. */
12
+ export declare class UiaScopeEndedError extends Error {
13
+ name: string;
14
+ }
15
+ /** A call into a target process did not answer in time. */
16
+ export declare class UiaTimeout extends Error {
17
+ name: string;
18
+ }
19
+ /** A range of text inside a text pattern. */
20
+ export interface UiaTextRange {
21
+ /**
22
+ * The text of the range.
23
+ *
24
+ * @param maxLength - The most characters to take; the text is cut there.
25
+ */
26
+ getText(maxLength?: number): string;
27
+ }
28
+ /** The text pattern of an element (browsers, Word, Notepad, the editor of VS Code). */
29
+ export interface UiaTextPattern {
30
+ /** The ranges that are on screen; the text beneath the element is covered by them. */
31
+ visibleRanges(): readonly UiaTextRange[];
32
+ documentRange(): UiaTextRange | null;
33
+ }
34
+ /** The value pattern of an element (an edit box). */
35
+ export interface UiaValuePattern {
36
+ readonly value: string;
37
+ }
38
+ /** The patterns an element can offer, by name. */
39
+ export interface UiaPatterns {
40
+ readonly text: UiaTextPattern;
41
+ readonly value: UiaValuePattern;
42
+ }
43
+ /** An element of another application, valid inside its `withUiaClient` call only. */
44
+ export interface UiaElement {
45
+ /** The properties, read again from the target (a walk's nodes also carry the cached ones). */
46
+ properties(): UiaProperties;
47
+ /** The pattern, or null when the element does not offer it. */
48
+ pattern<Name extends UiaPatternName>(name: Name): UiaPatterns[Name] | null;
49
+ }
50
+ /** An element the walk visited. */
51
+ export interface UiaNode extends UiaElement {
52
+ readonly depth: number;
53
+ /** Do not walk into this element: its text pattern already covers what is beneath it. */
54
+ skipSubtree(): void;
55
+ /** The properties as the walk read them, with no further call. */
56
+ readonly cached: UiaProperties;
57
+ }
58
+ /** The options of `client.walk`. */
59
+ export interface UiaWalkOptions {
60
+ readonly root: UiaElement;
61
+ /** The most elements to visit; 400 by default. */
62
+ readonly maxElements?: number;
63
+ /** The soft deadline: the walk stops and keeps what it has; 400 by default. */
64
+ readonly maxMilliseconds?: number;
65
+ /** Return false to skip an element and its subtree; the default visits all. */
66
+ readonly shouldVisit?: (properties: UiaProperties) => boolean;
67
+ }
68
+ /** A walk: iterate it, then read `end`. */
69
+ export interface UiaWalk extends Iterable<UiaNode> {
70
+ /** Why the walk ended; `complete` until it has. */
71
+ readonly end: UiaWalkEnd;
72
+ }
73
+ /** What `withUiaClient` hands to its callback. */
74
+ export interface UiaClient {
75
+ /** The element of a window, or null when the window cannot be read (gone, or elevated). */
76
+ elementFromHandle(hwnd: bigint): UiaElement | null;
77
+ /** The element that has the keyboard focus, or null. */
78
+ focusedElement(): UiaElement | null;
79
+ /**
80
+ * A breadth first walk of the control view below the root. An element that
81
+ * went away is skipped, never thrown.
82
+ */
83
+ walk(options: UiaWalkOptions): UiaWalk;
84
+ }
85
+ /**
86
+ * Makes a UI Automation client over a backend and gives it to `use`; every
87
+ * element, range and COM pointer it made is released when `use` ends, and the
88
+ * elements then refuse to work (`UiaScopeEndedError`).
89
+ *
90
+ * @param options - `use`: the work; `backend`: the calls into UI Automation.
91
+ * @returns What `use` returned.
92
+ */
93
+ export declare function runUiaClient<T>({ use, backend }: {
94
+ readonly use: (client: UiaClient) => T | Promise<T>;
95
+ readonly backend: UiaBackend;
96
+ }): Promise<T>;
97
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/automation/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAa,aAAa,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAM1C,wBAAwB;AACxB,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX,+BAA+B;AAC/B,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEpE,gEAAgE;AAChE,qBAAa,kBAAmB,SAAQ,KAAK;IAClC,IAAI,SAAwB;CACtC;AAED,2DAA2D;AAC3D,qBAAa,UAAW,SAAQ,KAAK;IAC1B,IAAI,SAAgB;CAC9B;AAED,6CAA6C;AAC7C,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACrC;AAED,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B,sFAAsF;IACtF,aAAa,IAAI,SAAS,YAAY,EAAE,CAAC;IACzC,aAAa,IAAI,YAAY,GAAG,IAAI,CAAC;CACtC;AAED,qDAAqD;AACrD,MAAM,WAAW,eAAe;IAC9B,QAAQ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;OAGG;IACH,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC;CACxC;AA4BD;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;IACtD,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;CAC9B,cAkLA"}
@@ -0,0 +1,203 @@
1
+ import { UiaElementUnavailableError } from "./backend.js";
2
+ import { UiaPatternName } from "./ids.js";
3
+ const DEFAULT_MAX_ELEMENTS = 400;
4
+ const DEFAULT_MAX_MILLISECONDS = 400;
5
+ const DEFAULT_MAX_TEXT_LENGTH = 12_000;
6
+ /** Why a walk ended. */
7
+ export const UiaWalkEnd = {
8
+ complete: "complete",
9
+ maxElements: "maxElements",
10
+ deadline: "deadline"
11
+ };
12
+ /** The client was used after its `withUiaClient` call ended. */
13
+ export class UiaScopeEndedError extends Error {
14
+ name = "UiaScopeEndedError";
15
+ }
16
+ /** A call into a target process did not answer in time. */
17
+ export class UiaTimeout extends Error {
18
+ name = "UiaTimeout";
19
+ }
20
+ function stopOf({ startedAt, maxMilliseconds, isFull }) {
21
+ const isOverDeadline = performance.now() - startedAt > maxMilliseconds;
22
+ if (isOverDeadline) {
23
+ return UiaWalkEnd.deadline;
24
+ }
25
+ return isFull ? UiaWalkEnd.maxElements : null;
26
+ }
27
+ function nullIfUnavailable(read) {
28
+ try {
29
+ return read();
30
+ }
31
+ catch (error) {
32
+ const isUnavailable = error instanceof UiaElementUnavailableError;
33
+ if (isUnavailable) {
34
+ return null;
35
+ }
36
+ throw error;
37
+ }
38
+ }
39
+ /**
40
+ * Makes a UI Automation client over a backend and gives it to `use`; every
41
+ * element, range and COM pointer it made is released when `use` ends, and the
42
+ * elements then refuse to work (`UiaScopeEndedError`).
43
+ *
44
+ * @param options - `use`: the work; `backend`: the calls into UI Automation.
45
+ * @returns What `use` returned.
46
+ */
47
+ export async function runUiaClient({ use, backend }) {
48
+ let isAlive = true;
49
+ const handles = new WeakMap();
50
+ function assertAlive() {
51
+ if (!isAlive) {
52
+ throw new UiaScopeEndedError("the UI Automation client ended with its withUiaClient call");
53
+ }
54
+ }
55
+ function rangeOf(range) {
56
+ const textRange = {
57
+ getText(maxLength = DEFAULT_MAX_TEXT_LENGTH) {
58
+ assertAlive();
59
+ return backend.rangeText({
60
+ range,
61
+ maxLength
62
+ });
63
+ }
64
+ };
65
+ return textRange;
66
+ }
67
+ function textPatternOf(handle) {
68
+ const isSupported = backend.visibleRanges(handle) !== null;
69
+ if (!isSupported) {
70
+ return null;
71
+ }
72
+ const pattern = {
73
+ visibleRanges() {
74
+ assertAlive();
75
+ return (backend.visibleRanges(handle) ?? []).map(rangeOf);
76
+ },
77
+ documentRange() {
78
+ assertAlive();
79
+ const range = backend.documentRange(handle);
80
+ return range === null ? null : rangeOf(range);
81
+ }
82
+ };
83
+ return pattern;
84
+ }
85
+ function valuePatternOf(handle) {
86
+ const isSupported = backend.value(handle) !== null;
87
+ if (!isSupported) {
88
+ return null;
89
+ }
90
+ const pattern = {
91
+ get value() {
92
+ assertAlive();
93
+ return backend.value(handle) ?? "";
94
+ }
95
+ };
96
+ return pattern;
97
+ }
98
+ function elementOf(handle) {
99
+ const element = {
100
+ properties() {
101
+ assertAlive();
102
+ return backend.properties(handle);
103
+ },
104
+ pattern(name) {
105
+ assertAlive();
106
+ const isText = name === UiaPatternName.text;
107
+ const pattern = isText ? textPatternOf(handle) : valuePatternOf(handle);
108
+ // oxlint-disable-next-line typescript/consistent-type-assertions -- the name picks the pattern
109
+ return pattern;
110
+ }
111
+ };
112
+ handles.set(element, handle);
113
+ return element;
114
+ }
115
+ function handleOf(element) {
116
+ const handle = handles.get(element);
117
+ const isForeign = handle === undefined;
118
+ if (isForeign) {
119
+ throw new TypeError("the root is not an element of this client");
120
+ }
121
+ return handle;
122
+ }
123
+ function wrap(handle) {
124
+ return handle === null ? null : elementOf(handle);
125
+ }
126
+ function walk({ root, maxElements = DEFAULT_MAX_ELEMENTS, maxMilliseconds = DEFAULT_MAX_MILLISECONDS, shouldVisit }) {
127
+ assertAlive();
128
+ const rootHandle = handleOf(root);
129
+ let end = UiaWalkEnd.complete;
130
+ function* nodes() {
131
+ const startedAt = performance.now();
132
+ const queue = [{
133
+ handle: rootHandle,
134
+ depth: 0
135
+ }];
136
+ let visited = 0;
137
+ for (const { handle, depth } of queue) {
138
+ const children = nullIfUnavailable(() => backend.children(handle)) ?? [];
139
+ for (const child of children) {
140
+ assertAlive();
141
+ const stop = stopOf({
142
+ startedAt,
143
+ maxMilliseconds,
144
+ isFull: visited >= maxElements
145
+ });
146
+ const isStopped = stop !== null;
147
+ if (isStopped) {
148
+ end = stop;
149
+ return;
150
+ }
151
+ const isSkipped = shouldVisit !== undefined && !shouldVisit(child.properties);
152
+ if (isSkipped) {
153
+ continue;
154
+ }
155
+ visited += 1;
156
+ let isPruned = false;
157
+ const node = {
158
+ ...elementOf(child.handle),
159
+ depth: depth + 1,
160
+ cached: child.properties,
161
+ skipSubtree() {
162
+ isPruned = true;
163
+ }
164
+ };
165
+ handles.set(node, child.handle);
166
+ yield node;
167
+ if (!isPruned) {
168
+ queue.push({
169
+ handle: child.handle,
170
+ depth: depth + 1
171
+ });
172
+ }
173
+ }
174
+ }
175
+ }
176
+ const walkResult = {
177
+ get end() {
178
+ return end;
179
+ },
180
+ [Symbol.iterator]: nodes
181
+ };
182
+ return walkResult;
183
+ }
184
+ const client = {
185
+ elementFromHandle(hwnd) {
186
+ assertAlive();
187
+ return wrap(nullIfUnavailable(() => backend.elementFromHandle(hwnd)));
188
+ },
189
+ focusedElement() {
190
+ assertAlive();
191
+ return wrap(nullIfUnavailable(() => backend.focusedElement()));
192
+ },
193
+ walk
194
+ };
195
+ try {
196
+ return await use(client);
197
+ }
198
+ finally {
199
+ isAlive = false;
200
+ backend.dispose();
201
+ }
202
+ }
203
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/automation/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AACrC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAEvC,wBAAwB;AACxB,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,UAAU;CACZ,CAAC;AAKX,gEAAgE;AAChE,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAClC,IAAI,GAAG,oBAAoB,CAAC;CACtC;AAED,2DAA2D;AAC3D,MAAM,OAAO,UAAW,SAAQ,KAAK;IAC1B,IAAI,GAAG,YAAY,CAAC;CAC9B;AAqFD,SAAS,MAAM,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAInD;IACC,MAAM,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,eAAe,CAAC;IACvE,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,UAAU,CAAC,QAAQ,CAAC;IAC7B,CAAC;IAED,OAAO,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;AAChD,CAAC;AAED,SAAS,iBAAiB,CAAI,IAAa;IACzC,IAAI,CAAC;QACH,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,aAAa,GAAG,KAAK,YAAY,0BAA0B,CAAC;QAClE,IAAI,aAAa,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,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CAAC;QAChB,OAAO,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC;AACH,CAAC"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * The control types of UI Automation (`UIA_*ControlTypeId` in
3
+ * `UIAutomationClient.h`), by name.
4
+ */
5
+ export declare const UiaControlType: {
6
+ readonly button: 50000;
7
+ readonly calendar: 50001;
8
+ readonly checkBox: 50002;
9
+ readonly comboBox: 50003;
10
+ readonly edit: 50004;
11
+ readonly hyperlink: 50005;
12
+ readonly image: 50006;
13
+ readonly listItem: 50007;
14
+ readonly list: 50008;
15
+ readonly menu: 50009;
16
+ readonly menuBar: 50010;
17
+ readonly menuItem: 50011;
18
+ readonly progressBar: 50012;
19
+ readonly radioButton: 50013;
20
+ readonly scrollBar: 50014;
21
+ readonly slider: 50015;
22
+ readonly spinner: 50016;
23
+ readonly statusBar: 50017;
24
+ readonly tab: 50018;
25
+ readonly tabItem: 50019;
26
+ readonly text: 50020;
27
+ readonly toolBar: 50021;
28
+ readonly toolTip: 50022;
29
+ readonly tree: 50023;
30
+ readonly treeItem: 50024;
31
+ readonly custom: 50025;
32
+ readonly group: 50026;
33
+ readonly thumb: 50027;
34
+ readonly dataGrid: 50028;
35
+ readonly dataItem: 50029;
36
+ readonly document: 50030;
37
+ readonly splitButton: 50031;
38
+ readonly window: 50032;
39
+ readonly pane: 50033;
40
+ readonly header: 50034;
41
+ readonly headerItem: 50035;
42
+ readonly table: 50036;
43
+ readonly titleBar: 50037;
44
+ readonly separator: 50038;
45
+ readonly semanticZoom: 50039;
46
+ readonly appBar: 50040;
47
+ };
48
+ /** One control type of UI Automation. */
49
+ export type UiaControlType = typeof UiaControlType[keyof typeof UiaControlType];
50
+ /**
51
+ * The properties of an element that the client reads (`UIA_*PropertyId` in
52
+ * `UIAutomationClient.h`).
53
+ */
54
+ export declare const UiaPropertyId: {
55
+ readonly boundingRectangle: 30001;
56
+ readonly processId: 30002;
57
+ readonly controlType: 30003;
58
+ readonly name: 30005;
59
+ readonly isEnabled: 30010;
60
+ readonly automationId: 30011;
61
+ readonly className: 30012;
62
+ readonly isControlElement: 30016;
63
+ readonly nativeWindowHandle: 30020;
64
+ readonly isOffscreen: 30022;
65
+ readonly isTextPatternAvailable: 30040;
66
+ readonly isValuePatternAvailable: 30043;
67
+ readonly headingLevel: 30173;
68
+ };
69
+ /** One property of UI Automation. */
70
+ export type UiaPropertyId = typeof UiaPropertyId[keyof typeof UiaPropertyId];
71
+ /** The patterns of an element that the client reads (`UIA_*PatternId`). */
72
+ export declare const UiaPatternId: {
73
+ readonly value: 10002;
74
+ readonly text: 10014;
75
+ };
76
+ /** The names a caller gives a pattern, `element.pattern("text")`. */
77
+ export declare const UiaPatternName: {
78
+ readonly text: "text";
79
+ readonly value: "value";
80
+ };
81
+ /** One pattern name. */
82
+ export type UiaPatternName = typeof UiaPatternName[keyof typeof UiaPatternName];
83
+ /**
84
+ * `HeadingLevel_None` (80050): the value of the heading level property of an
85
+ * element that is not a heading.
86
+ */
87
+ export declare const HEADING_LEVEL_NONE = 80050;
88
+ /** `HeadingLevel1` (80051): the property value of a first level heading; level 9 is 80059. */
89
+ export declare const HEADING_LEVEL_FIRST = 80051;
90
+ //# sourceMappingURL=ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/automation/ids.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CjB,CAAC;AAEX,yCAAyC;AACzC,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;CAchB,CAAC;AAEX,qCAAqC;AACrC,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE7E,2EAA2E;AAC3E,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,qEAAqE;AACrE,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX,wBAAwB;AACxB,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AAExC,8FAA8F;AAC9F,eAAO,MAAM,mBAAmB,QAAQ,CAAC"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * The control types of UI Automation (`UIA_*ControlTypeId` in
3
+ * `UIAutomationClient.h`), by name.
4
+ */
5
+ export const UiaControlType = {
6
+ button: 50000,
7
+ calendar: 50001,
8
+ checkBox: 50002,
9
+ comboBox: 50003,
10
+ edit: 50004,
11
+ hyperlink: 50005,
12
+ image: 50006,
13
+ listItem: 50007,
14
+ list: 50008,
15
+ menu: 50009,
16
+ menuBar: 50010,
17
+ menuItem: 50011,
18
+ progressBar: 50012,
19
+ radioButton: 50013,
20
+ scrollBar: 50014,
21
+ slider: 50015,
22
+ spinner: 50016,
23
+ statusBar: 50017,
24
+ tab: 50018,
25
+ tabItem: 50019,
26
+ text: 50020,
27
+ toolBar: 50021,
28
+ toolTip: 50022,
29
+ tree: 50023,
30
+ treeItem: 50024,
31
+ custom: 50025,
32
+ group: 50026,
33
+ thumb: 50027,
34
+ dataGrid: 50028,
35
+ dataItem: 50029,
36
+ document: 50030,
37
+ splitButton: 50031,
38
+ window: 50032,
39
+ pane: 50033,
40
+ header: 50034,
41
+ headerItem: 50035,
42
+ table: 50036,
43
+ titleBar: 50037,
44
+ separator: 50038,
45
+ semanticZoom: 50039,
46
+ appBar: 50040
47
+ };
48
+ /**
49
+ * The properties of an element that the client reads (`UIA_*PropertyId` in
50
+ * `UIAutomationClient.h`).
51
+ */
52
+ export const UiaPropertyId = {
53
+ boundingRectangle: 30001,
54
+ processId: 30002,
55
+ controlType: 30003,
56
+ name: 30005,
57
+ isEnabled: 30010,
58
+ automationId: 30011,
59
+ className: 30012,
60
+ isControlElement: 30016,
61
+ nativeWindowHandle: 30020,
62
+ isOffscreen: 30022,
63
+ isTextPatternAvailable: 30040,
64
+ isValuePatternAvailable: 30043,
65
+ headingLevel: 30173
66
+ };
67
+ /** The patterns of an element that the client reads (`UIA_*PatternId`). */
68
+ export const UiaPatternId = {
69
+ value: 10002,
70
+ text: 10014
71
+ };
72
+ /** The names a caller gives a pattern, `element.pattern("text")`. */
73
+ export const UiaPatternName = {
74
+ text: "text",
75
+ value: "value"
76
+ };
77
+ /**
78
+ * `HeadingLevel_None` (80050): the value of the heading level property of an
79
+ * element that is not a heading.
80
+ */
81
+ export const HEADING_LEVEL_NONE = 80050;
82
+ /** `HeadingLevel1` (80051): the property value of a first level heading; level 9 is 80059. */
83
+ export const HEADING_LEVEL_FIRST = 80051;
84
+ //# sourceMappingURL=ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/automation/ids.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,KAAK;IACX,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,KAAK;IAChB,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,KAAK;IACd,IAAI,EAAE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IRST, HEADING_LEVEL_NONE, UiaControlType, UiaPatternName, UiaPropertyId } from "./ids.js";
3
+ export { UiaElementUnavailableError } from "./backend.js";
4
+ export type { UiaChild, UiaProperties } from "./backend.js";
5
+ export { UiaScopeEndedError, UiaTimeout, UiaWalkEnd } from "./client.js";
6
+ export type { UiaClient, UiaElement, UiaNode, UiaPatterns, UiaTextPattern, UiaTextRange, UiaValuePattern, UiaWalk, UiaWalkOptions } from "./client.js";
7
+ export { readWindowText, TextBlockKind, UIA_CHROME_CONTROL_TYPES } from "./text.js";
8
+ export type { ReadWindowTextOptions, TextBlock, WindowText } from "./text.js";
9
+ export { createUiaWorker } from "./worker.js";
10
+ export type { UiaReadRequest, UiaWorker, UiaWorkerHandle } from "./worker.js";
11
+ export { UiaTarget } from "./worker-job.js";
12
+ export type { UiaTargetSpec } from "./worker-job.js";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/automation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAClH,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzE,YAAY,EACV,SAAS,EACT,UAAU,EACV,OAAO,EACP,WAAW,EACX,cAAc,EACd,YAAY,EACZ,eAAe,EACf,OAAO,EACP,cAAc,EACf,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACpF,YAAY,EAAE,qBAAqB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export { withUiaClient } from "./with-client.js";
2
+ export { HEADING_LEVEL_FIRST, HEADING_LEVEL_NONE, UiaControlType, UiaPatternName, UiaPropertyId } from "./ids.js";
3
+ export { UiaElementUnavailableError } from "./backend.js";
4
+ export { UiaScopeEndedError, UiaTimeout, UiaWalkEnd } from "./client.js";
5
+ export { readWindowText, TextBlockKind, UIA_CHROME_CONTROL_TYPES } from "./text.js";
6
+ export { createUiaWorker } from "./worker.js";
7
+ export { UiaTarget } from "./worker-job.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/automation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAClH,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAazE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { UiaBackend } from "./backend.js";
2
+ /**
3
+ * The real UI Automation calls, over `CUIAutomation`. The COM objects are made
4
+ * on the first call and every pointer is released by `dispose`; the thread
5
+ * that calls must already be in a COM apartment (a worker that called
6
+ * `DynCom.initialize`).
7
+ *
8
+ * @returns A backend for `runUiaClient`.
9
+ */
10
+ export declare function createUiaNativeBackend(): UiaBackend;
11
+ //# sourceMappingURL=native.d.ts.map