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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/automation/text.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAOrE,uFAAuF;AACvF,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,MAAM,CAevD,CAAC;AAEH,qDAAqD;AACrD,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAEX,8BAA8B;AAC9B,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE7E,uCAAuC;AACvC,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAE7B,wCAAwC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wDAAwD;AACxD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IAEtC,wEAAwE;IACxE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,6EAA6E;IAC7E,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;CAC1B;AAED,uCAAuC;AACvC,MAAM,WAAW,qBAAqB;IACpC,kDAAkD;IAClD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B,qDAAqD;IACrD,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAElC,6DAA6D;IAC7D,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAkDD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,IAAI,EACJ,WAAW,EACX,eAAe,EACf,aAAsC,EACvC,EAAE,qBAAqB,GAAG;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B,cAsCA"}
@@ -0,0 +1,110 @@
1
+ import { UiaControlType, UiaPatternName } from "./ids.js";
2
+ import { createHash } from "node:crypto";
3
+ const DEFAULT_MAX_CHARACTERS = 12_000;
4
+ const VERSION_LENGTH = 16;
5
+ /** The control types that are window chrome, not content: their subtree is skipped. */
6
+ export const UIA_CHROME_CONTROL_TYPES = new Set([
7
+ UiaControlType.button,
8
+ UiaControlType.splitButton,
9
+ UiaControlType.menu,
10
+ UiaControlType.menuBar,
11
+ UiaControlType.menuItem,
12
+ UiaControlType.toolBar,
13
+ UiaControlType.tab,
14
+ UiaControlType.tabItem,
15
+ UiaControlType.scrollBar,
16
+ UiaControlType.statusBar,
17
+ UiaControlType.titleBar,
18
+ UiaControlType.image,
19
+ UiaControlType.separator,
20
+ UiaControlType.thumb
21
+ ]);
22
+ /** The kinds of block a window's text is made of. */
23
+ export const TextBlockKind = {
24
+ heading: "heading",
25
+ text: "text"
26
+ };
27
+ function textOf(value) {
28
+ return value.replaceAll("", "").trim();
29
+ }
30
+ function blocksOf({ node, remaining }) {
31
+ const { cached } = node;
32
+ const isHeading = cached.headingLevel > 0;
33
+ if (cached.hasTextPattern) {
34
+ node.skipSubtree();
35
+ const ranges = node.pattern(UiaPatternName.text)?.visibleRanges() ?? [];
36
+ return ranges
37
+ .map(range => textOf(range.getText(remaining)))
38
+ .filter(text => text !== "")
39
+ .map(text => ({
40
+ kind: TextBlockKind.text,
41
+ level: 0,
42
+ text
43
+ }));
44
+ }
45
+ const isEdit = cached.controlType === UiaControlType.edit && cached.hasValuePattern;
46
+ if (isEdit) {
47
+ const text = textOf(node.pattern(UiaPatternName.value)?.value ?? "");
48
+ return text === "" ? [] : [{
49
+ kind: TextBlockKind.text,
50
+ level: 0,
51
+ text
52
+ }];
53
+ }
54
+ const isTextType = cached.controlType === UiaControlType.text || cached.controlType === UiaControlType.listItem;
55
+ const isNamedText = isHeading || isTextType;
56
+ const text = textOf(cached.name);
57
+ const isBlock = isNamedText && text !== "";
58
+ return isBlock ? [{
59
+ kind: isHeading ? TextBlockKind.heading : TextBlockKind.text,
60
+ level: cached.headingLevel,
61
+ text
62
+ }] : [];
63
+ }
64
+ /**
65
+ * Reads the text of a window: headings and the exact copy of the text beneath
66
+ * the chrome, through the control view. Elements that are off screen and
67
+ * window chrome (buttons, menus, tool bars, tabs, scroll bars, status bars,
68
+ * images) are skipped; an element with a text pattern gives its visible
69
+ * ranges and its subtree is not walked again.
70
+ *
71
+ * @param options - `client`: the client of a `withUiaClient` call; `root`: the window's element; the limits.
72
+ * @returns The title, the blocks and a version that changes with the text.
73
+ */
74
+ export function readWindowText({ client, root, maxElements, maxMilliseconds, maxCharacters = DEFAULT_MAX_CHARACTERS }) {
75
+ const blocks = [];
76
+ let used = 0;
77
+ const walk = client.walk({
78
+ root,
79
+ ...maxElements === undefined ? {} : { maxElements },
80
+ ...maxMilliseconds === undefined ? {} : { maxMilliseconds },
81
+ shouldVisit: ({ isOffscreen, controlType }) => !isOffscreen && !UIA_CHROME_CONTROL_TYPES.has(controlType)
82
+ });
83
+ for (const node of walk) {
84
+ const remaining = maxCharacters - used;
85
+ const isFull = remaining <= 0;
86
+ if (isFull) {
87
+ break;
88
+ }
89
+ for (const block of blocksOf({
90
+ node,
91
+ remaining
92
+ })) {
93
+ blocks.push(block);
94
+ used += block.text.length;
95
+ }
96
+ }
97
+ const title = root.properties().name;
98
+ const hash = createHash("sha256").update(title);
99
+ for (const block of blocks) {
100
+ hash.update(`\n${block.level}:${block.text}`);
101
+ }
102
+ const windowText = {
103
+ title,
104
+ blocks,
105
+ version: hash.digest("hex").slice(0, VERSION_LENGTH),
106
+ end: walk.end
107
+ };
108
+ return windowText;
109
+ }
110
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/automation/text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AACtC,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,uFAAuF;AACvF,MAAM,CAAC,MAAM,wBAAwB,GAAwB,IAAI,GAAG,CAAC;IACnE,cAAc,CAAC,MAAM;IACrB,cAAc,CAAC,WAAW;IAC1B,cAAc,CAAC,IAAI;IACnB,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,QAAQ;IACvB,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,GAAG;IAClB,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,SAAS;IACxB,cAAc,CAAC,SAAS;IACxB,cAAc,CAAC,QAAQ;IACvB,cAAc,CAAC,KAAK;IACpB,cAAc,CAAC,SAAS;IACxB,cAAc,CAAC,KAAK;CACrB,CAAC,CAAC;AAEH,qDAAqD;AACrD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CAAC;AAsCX,SAAS,MAAM,CAAC,KAAa;IAC3B,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1C,CAAC;AAED,SAAS,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAOlC;IACC,MAAM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,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC;IACrC,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,UAAU,GAAe;QAC7B,KAAK;QACL,MAAM;QACN,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC;QACpD,GAAG,EAAE,IAAI,CAAC,GAAG;KACd,CAAC;IACF,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { UiaClient } from "./client.js";
2
+ /**
3
+ * Creates a UI Automation client, runs `use` with it, then releases every
4
+ * element, range and COM pointer it made; the elements refuse to work after
5
+ * that. Call it from a thread in a COM apartment, ideally a worker in the
6
+ * multithreaded one (an apartment that pumps messages can hang on a target
7
+ * that does not answer).
8
+ *
9
+ * @param use - The work; it may be async.
10
+ * @returns What `use` returned.
11
+ */
12
+ export declare function withUiaClient<T>(use: (client: UiaClient) => T | Promise<T>): Promise<T>;
13
+ //# sourceMappingURL=with-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-client.d.ts","sourceRoot":"","sources":["../../src/automation/with-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,cAK1E"}
@@ -0,0 +1,19 @@
1
+ import { runUiaClient } from "./client.js";
2
+ import { createUiaNativeBackend } from "./native.js";
3
+ /**
4
+ * Creates a UI Automation client, runs `use` with it, then releases every
5
+ * element, range and COM pointer it made; the elements refuse to work after
6
+ * that. Call it from a thread in a COM apartment, ideally a worker in the
7
+ * multithreaded one (an apartment that pumps messages can hang on a target
8
+ * that does not answer).
9
+ *
10
+ * @param use - The work; it may be async.
11
+ * @returns What `use` returned.
12
+ */
13
+ export function withUiaClient(use) {
14
+ return runUiaClient({
15
+ use,
16
+ backend: createUiaNativeBackend()
17
+ });
18
+ }
19
+ //# sourceMappingURL=with-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-client.js","sourceRoot":"","sources":["../../src/automation/with-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAI,GAA0C;IACzE,OAAO,YAAY,CAAC;QAClB,GAAG;QACH,OAAO,EAAE,sBAAsB,EAAE;KAClC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { ReadWindowTextOptions, WindowText } from "./text.js";
2
+ /** Which window to read. */
3
+ export declare const UiaTarget: {
4
+ readonly foreground: "foreground";
5
+ readonly focused: "focused";
6
+ };
7
+ /** The foreground window, the window of the focused element, or the window with this handle. */
8
+ export type UiaTargetSpec = typeof UiaTarget[keyof typeof UiaTarget] | {
9
+ readonly hwnd: bigint;
10
+ };
11
+ /** What the host asks of the worker. */
12
+ export interface UiaWorkerRequest extends ReadWindowTextOptions {
13
+ readonly id: number;
14
+ readonly target: UiaTargetSpec;
15
+ /** A window of this process is not read (the app itself). */
16
+ readonly excludeProcessId?: number;
17
+ }
18
+ /** What the worker answers. */
19
+ export type UiaWorkerResponse = {
20
+ readonly id: number;
21
+ readonly text: WindowText | null;
22
+ } | {
23
+ readonly id: number;
24
+ readonly error: string;
25
+ };
26
+ /**
27
+ * The body of the UI Automation worker: joins the multithreaded apartment and
28
+ * answers each request on the parent port. The host starts it; an app does not
29
+ * call it.
30
+ */
31
+ export declare function runUiaWorker(): void;
32
+ //# sourceMappingURL=worker-job.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-job.d.ts","sourceRoot":"","sources":["../../src/automation/worker-job.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAQnE,4BAA4B;AAC5B,eAAO,MAAM,SAAS;;;CAGZ,CAAC;AAEX,gGAAgG;AAChG,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,MAAM,OAAO,SAAS,CAAC,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjG,wCAAwC;AACxC,MAAM,WAAW,gBAAiB,SAAQ,qBAAqB;IAC7D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAE/B,6DAA6D;IAC7D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED,+BAA+B;AAC/B,MAAM,MAAM,iBAAiB,GACzB;IACA,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;CAClC,GACC;IACA,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAuCJ;;;;GAIG;AACH,wBAAgB,YAAY,SAgB3B"}
@@ -0,0 +1,69 @@
1
+ import { readWindowText } from "./text.js";
2
+ import { withUiaClient } from "./with-client.js";
3
+ import { DynCom } from "@microsoft/dynwinrt/com/unsafe";
4
+ import { bindDll } from "../win32-calls.js";
5
+ import { parentPort } from "node:worker_threads";
6
+ const MULTITHREADED_APARTMENT = 0;
7
+ /** Which window to read. */
8
+ export const UiaTarget = {
9
+ foreground: "foreground",
10
+ focused: "focused"
11
+ };
12
+ /**
13
+ * Reads one request inside a UI Automation client, on the calling thread.
14
+ *
15
+ * @param request - The window and the limits.
16
+ * @returns The text, or null when there is no window to read or it is the excluded process's.
17
+ */
18
+ function readTarget({ target, excludeProcessId, ...limits }) {
19
+ const user32 = bindDll({
20
+ dll: "user32.dll",
21
+ functions: {
22
+ foregroundWindow: ["GetForegroundWindow", [], "pointer"]
23
+ }
24
+ });
25
+ return withUiaClient(client => {
26
+ const isFocused = target === UiaTarget.focused;
27
+ const isWindow = typeof target === "object";
28
+ const root = isFocused
29
+ ? client.focusedElement()
30
+ : client.elementFromHandle(isWindow ? target.hwnd : user32.foregroundWindow());
31
+ const isRootNull = root === null;
32
+ if (isRootNull) {
33
+ return null;
34
+ }
35
+ const isExcluded = excludeProcessId !== undefined && root.properties().processId === excludeProcessId;
36
+ if (isExcluded) {
37
+ return null;
38
+ }
39
+ return readWindowText({
40
+ client,
41
+ root,
42
+ ...limits
43
+ });
44
+ });
45
+ }
46
+ /**
47
+ * The body of the UI Automation worker: joins the multithreaded apartment and
48
+ * answers each request on the parent port. The host starts it; an app does not
49
+ * call it.
50
+ */
51
+ export function runUiaWorker() {
52
+ DynCom.initialize(MULTITHREADED_APARTMENT);
53
+ parentPort?.on("message", async ({ id, ...request }) => {
54
+ try {
55
+ const text = await readTarget(request);
56
+ parentPort?.postMessage({
57
+ id,
58
+ text
59
+ });
60
+ }
61
+ catch (error) {
62
+ parentPort?.postMessage({
63
+ id,
64
+ error: error instanceof Error ? error.message : String(error)
65
+ });
66
+ }
67
+ });
68
+ }
69
+ //# sourceMappingURL=worker-job.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-job.js","sourceRoot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S,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,KAAK,gBAAgB,CAAC;QACtG,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,cAAc,CAAC;YACpB,MAAM;YACN,IAAI;YACJ,GAAG,MAAM;SACV,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAC3C,UAAU,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,EAAoB,EAAE,EAAE;QACvE,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;YACvC,UAAU,EAAE,WAAW,CAAC;gBACtB,EAAE;gBACF,IAAI;aACuB,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,UAAU,EAAE,WAAW,CAAC;gBACtB,EAAE;gBACF,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAClC,CAAC,CAAC;QACjC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { WindowText } from "./text.js";
2
+ import type { UiaTargetSpec, UiaWorkerRequest, UiaWorkerResponse } from "./worker-job.js";
3
+ /** The part of a worker the host uses; a test passes a fake. */
4
+ export interface UiaWorkerHandle {
5
+ postMessage(request: UiaWorkerRequest): void;
6
+ on(event: "message", listener: (response: UiaWorkerResponse) => void): unknown;
7
+ on(event: "error" | "exit", listener: (error: unknown) => void): unknown;
8
+ terminate(): unknown;
9
+ }
10
+ /** The request of `UiaWorker.readText`. */
11
+ export interface UiaReadRequest {
12
+ readonly target: UiaTargetSpec;
13
+ /** A window of this process is not read. */
14
+ readonly excludeProcessId?: number;
15
+ readonly maxElements?: number;
16
+ /** The soft deadline of the walk; 400 by default. */
17
+ readonly maxMilliseconds?: number;
18
+ readonly maxCharacters?: number;
19
+ /** The hard deadline: the call rejects with `UiaTimeout` and the worker is replaced; 1500 by default. */
20
+ readonly hardMilliseconds?: number;
21
+ }
22
+ /** A worker thread that owns the UI Automation client. */
23
+ export interface UiaWorker {
24
+ /**
25
+ * Reads the text of a window in the worker. A blocked COM call cannot be
26
+ * cancelled, so a call that outlives `hardMilliseconds` rejects with
27
+ * `UiaTimeout`, the worker is ended, and the next call starts a new one.
28
+ */
29
+ readText(request: UiaReadRequest): Promise<WindowText | null>;
30
+ /** Ends the worker. */
31
+ close(): void;
32
+ }
33
+ /**
34
+ * Starts a UI Automation worker thread on first use. Its COM apartment is the
35
+ * multithreaded one, which Microsoft advises for a client, and a hung target
36
+ * app costs one call its hard deadline, not the caller's thread.
37
+ *
38
+ * @param options - `spawn`: how to make the worker (a test passes a fake).
39
+ * @returns The worker.
40
+ */
41
+ export declare function createUiaWorker({ spawn }?: {
42
+ readonly spawn?: () => UiaWorkerHandle;
43
+ }): UiaWorker;
44
+ //# sourceMappingURL=worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/automation/worker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAK1F,gEAAgE;AAChE,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC7C,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,GAAG,OAAO,CAAC;IAC/E,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC;IACzE,SAAS,IAAI,OAAO,CAAC;CACtB;AAED,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAE/B,4CAA4C;IAC5C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B,qDAAqD;IACrD,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEhC,yGAAyG;IACzG,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED,0DAA0D;AAC1D,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IAE9D,uBAAuB;IACvB,KAAK,IAAI,IAAI,CAAC;CACf;AAUD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAmB,EAAE,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,eAAe,CAAA;CAAO,aAuDvG"}
@@ -0,0 +1,70 @@
1
+ import { UiaTimeout } from "./client.js";
2
+ import { Worker } from "node:worker_threads";
3
+ const DEFAULT_HARD_MILLISECONDS = 1500;
4
+ function spawnNative() {
5
+ const extension = import.meta.url.endsWith(".ts") ? "ts" : "js";
6
+ const moduleUrl = new URL(`./worker-job.${extension}`, import.meta.url).href;
7
+ const source = `import(${JSON.stringify(moduleUrl)}).then(module => module.runUiaWorker())`;
8
+ // oxlint-disable-next-line typescript/consistent-type-assertions -- Worker's overloads are wider than the part used
9
+ return new Worker(source, { eval: true });
10
+ }
11
+ /**
12
+ * Starts a UI Automation worker thread on first use. Its COM apartment is the
13
+ * multithreaded one, which Microsoft advises for a client, and a hung target
14
+ * app costs one call its hard deadline, not the caller's thread.
15
+ *
16
+ * @param options - `spawn`: how to make the worker (a test passes a fake).
17
+ * @returns The worker.
18
+ */
19
+ export function createUiaWorker({ spawn = spawnNative } = {}) {
20
+ let worker = null;
21
+ let nextId = 0;
22
+ function discard() {
23
+ void worker?.terminate();
24
+ worker = null;
25
+ }
26
+ const uiaWorker = {
27
+ readText({ hardMilliseconds = DEFAULT_HARD_MILLISECONDS, ...request }) {
28
+ const current = worker ?? spawn();
29
+ worker = current;
30
+ nextId += 1;
31
+ const id = nextId;
32
+ return new Promise((resolve, reject) => {
33
+ const timer = setTimeout(() => {
34
+ discard();
35
+ reject(new UiaTimeout(`the target did not answer in ${hardMilliseconds} ms`));
36
+ }, hardMilliseconds);
37
+ current.on("message", response => {
38
+ const isOurs = response.id === id;
39
+ if (!isOurs) {
40
+ return;
41
+ }
42
+ clearTimeout(timer);
43
+ const isErrorInResponse = "error" in response;
44
+ if (isErrorInResponse) {
45
+ reject(new Error(response.error));
46
+ return;
47
+ }
48
+ resolve(response.text);
49
+ });
50
+ current.on("error", error => {
51
+ clearTimeout(timer);
52
+ discard();
53
+ reject(error instanceof Error ? error : new Error(String(error)));
54
+ });
55
+ current.on("exit", () => {
56
+ clearTimeout(timer);
57
+ worker = null;
58
+ reject(new Error("the UI Automation worker ended"));
59
+ });
60
+ current.postMessage({
61
+ ...request,
62
+ id
63
+ });
64
+ });
65
+ },
66
+ close: discard
67
+ };
68
+ return uiaWorker;
69
+ }
70
+ //# sourceMappingURL=worker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.js","sourceRoot":"","sources":["../../src/automation/worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAuCvC,SAAS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2
  # Presence of this file authorises winapp to wipe the directory on the next run.
3
- generated_at: 2026-11-07T23:15:35.528Z
3
+ generated_at: 2026-11-09T02:23:10.103Z
@@ -1,10 +1,10 @@
1
1
  import type { OnClickData } from "./context-menu-types.js";
2
2
  /** Checks the properties of `create` against Chrome's shape; throws an `Error` for an unknown key or a wrong type. */
3
3
  export declare function parseCreate(input: unknown): {
4
- type?: "normal" | "radio" | "separator" | "checkbox" | undefined;
4
+ type?: "separator" | "normal" | "radio" | "checkbox" | undefined;
5
5
  title?: string | undefined;
6
6
  checked?: boolean | undefined;
7
- contexts?: ("link" | "all" | "image" | "action" | "selection" | "frame" | "page" | "editable" | "video" | "audio" | "launcher" | "browser_action" | "page_action")[] | undefined;
7
+ contexts?: ("image" | "link" | "all" | "action" | "selection" | "frame" | "page" | "editable" | "video" | "audio" | "launcher" | "browser_action" | "page_action")[] | undefined;
8
8
  visible?: boolean | undefined;
9
9
  enabled?: boolean | undefined;
10
10
  parentId?: string | number | undefined;
@@ -15,10 +15,10 @@ export declare function parseCreate(input: unknown): {
15
15
  };
16
16
  /** Checks the properties of `update` against Chrome's shape; `id` is an unknown key there. */
17
17
  export declare function parseUpdate(input: unknown): {
18
- type?: "normal" | "radio" | "separator" | "checkbox" | undefined;
18
+ type?: "separator" | "normal" | "radio" | "checkbox" | undefined;
19
19
  title?: string | undefined;
20
20
  checked?: boolean | undefined;
21
- contexts?: ("link" | "all" | "image" | "action" | "selection" | "frame" | "page" | "editable" | "video" | "audio" | "launcher" | "browser_action" | "page_action")[] | undefined;
21
+ contexts?: ("image" | "link" | "all" | "action" | "selection" | "frame" | "page" | "editable" | "video" | "audio" | "launcher" | "browser_action" | "page_action")[] | undefined;
22
22
  visible?: boolean | undefined;
23
23
  enabled?: boolean | undefined;
24
24
  parentId?: string | number | undefined;
@@ -1,6 +1,6 @@
1
1
  /** The options of an `update`, checked: every member is optional. */
2
2
  export declare function parseChanges(input: unknown): {
3
- type?: "basic" | "image" | "list" | "progress" | undefined;
3
+ type?: "image" | "list" | "basic" | "progress" | undefined;
4
4
  title?: string | undefined;
5
5
  message?: string | undefined;
6
6
  iconUrl?: string | undefined;
@@ -26,7 +26,7 @@ export declare function parseChanges(input: unknown): {
26
26
  * `message` are required, and so is the member the template reads.
27
27
  */
28
28
  export declare function parseComplete(input: unknown): {
29
- type: "basic" | "image" | "list" | "progress";
29
+ type: "image" | "list" | "basic" | "progress";
30
30
  title: string;
31
31
  message: string;
32
32
  iconUrl?: string | undefined;
@@ -3,12 +3,14 @@
3
3
  import type { FrameworkElement } from "../generated/bindings.js";
4
4
  import { ColumnDefinition, Grid, RowDefinition } from "../generated/bindings.js";
5
5
  import { control, registerControls } from "../runtime.js";
6
+ import { provideWindowHandle } from "../window-context.js";
6
7
  import { attachWindow } from "../../window/window-host.svelte.js";
7
8
  import { untrack } from "svelte";
8
9
 
9
10
  // A native window around its content. Mount it as the app's root (the
10
11
  // component itself is the window, nothing is placed in a page).
11
12
  let { handle = $bindable(), titleBar, children, ...rest }: WindowComponentProps = $props();
13
+ provideWindowHandle(() => handle);
12
14
  registerControls({
13
15
  "column-definition": ColumnDefinition,
14
16
  grid: Grid,
@@ -0,0 +1,14 @@
1
+ import type { WindowHandle } from "../window/window-handle.js";
2
+ /**
3
+ * Tells the components below a `Window` which window they sit in; call it while the `Window` is made.
4
+ *
5
+ * @param read - Reads the window handle, which exists once the window has opened.
6
+ */
7
+ export declare function provideWindowHandle(read: () => WindowHandle | undefined): void;
8
+ /**
9
+ * The window the component being made sits in.
10
+ *
11
+ * @returns Reads its handle: undefined outside a `Window`, or before it has opened.
12
+ */
13
+ export declare function inheritedWindowHandle(): () => WindowHandle | undefined;
14
+ //# sourceMappingURL=window-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"window-context.d.ts","sourceRoot":"","sources":["../../src/components/window-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAKjE;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,YAAY,GAAG,SAAS,QAEvE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,mCAGpC"}
@@ -0,0 +1,20 @@
1
+ import { getContext, setContext } from "svelte";
2
+ const WINDOW_KEY = Symbol("window-handle");
3
+ /**
4
+ * Tells the components below a `Window` which window they sit in; call it while the `Window` is made.
5
+ *
6
+ * @param read - Reads the window handle, which exists once the window has opened.
7
+ */
8
+ export function provideWindowHandle(read) {
9
+ setContext(WINDOW_KEY, read);
10
+ }
11
+ /**
12
+ * The window the component being made sits in.
13
+ *
14
+ * @returns Reads its handle: undefined outside a `Window`, or before it has opened.
15
+ */
16
+ export function inheritedWindowHandle() {
17
+ const read = getContext(WINDOW_KEY);
18
+ return () => read?.();
19
+ }
20
+ //# sourceMappingURL=window-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"window-context.js","sourceRoot":"","sources":["../../src/components/window-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEhD,MAAM,UAAU,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAE3C;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAoC;IACtE,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAC/B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB;IACnC,MAAM,IAAI,GAAG,UAAU,CAA+C,UAAU,CAAC,CAAC;IAClF,OAAO,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;AACxB,CAAC"}
@@ -1,12 +1,18 @@
1
1
  import { ChromeEvent } from "./chrome-event.js";
2
2
  import type { TransferContext } from "./download-transfer.js";
3
3
  import type { DownloadDelta, DownloadItem, DownloadOptions, DownloadQuery } from "./download-types.js";
4
+ import type { ProgressRegistry } from "../progress/progress-registry.js";
4
5
  /** What the `Downloads` object takes. */
5
6
  export interface DownloadsOptions {
6
7
  /** The folder a relative `filename` is inside; the user's Downloads folder by default. */
7
8
  readonly directory?: string;
8
9
  /** Stands in for the global `fetch`; the tests give one. */
9
10
  readonly fetch?: typeof fetch;
11
+ /**
12
+ * Where each download lists its progress operation: the app-wide registry by
13
+ * default (so `<TaskbarProgress />` shows it), `false` for none.
14
+ */
15
+ readonly progress?: ProgressRegistry | false;
10
16
  /** Opens Explorer on a file or folder; `revealInExplorer` by default, the tests give a fake. */
11
17
  readonly reveal?: (location: string) => void;
12
18
  /**
@@ -32,6 +38,7 @@ export declare class Downloads {
32
38
  private readonly records;
33
39
  private readonly directory;
34
40
  private readonly reveal;
41
+ private readonly progress;
35
42
  private readonly context;
36
43
  private nextId;
37
44
  constructor(options?: DownloadsOptions);
@@ -105,6 +112,7 @@ export declare class Downloads {
105
112
  private update;
106
113
  private start;
107
114
  private run;
115
+ private cancelFromOperation;
108
116
  private stop;
109
117
  private settle;
110
118
  private discard;
@@ -1 +1 @@
1
- {"version":3,"file":"chrome-downloads.d.ts","sourceRoot":"","sources":["../../src/downloads/chrome-downloads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAgBvG,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,0FAA0F;IAC1F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,4DAA4D;IAC5D,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IAE9B,gGAAgG;IAChG,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAE7C;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,eAAe,CAAC,cAAc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