winui-svelte 0.0.4 → 0.0.6

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 (2151) hide show
  1. package/API.md +2688 -23
  2. package/README.md +139 -19
  3. package/dist/accessibility/announce.d.ts +22 -0
  4. package/dist/accessibility/announce.d.ts.map +1 -0
  5. package/dist/accessibility/announce.js +52 -0
  6. package/dist/accessibility/announce.js.map +1 -0
  7. package/dist/accessibility/audit/accessibility-rules.json +100 -0
  8. package/dist/accessibility/audit/audit-tree.d.ts +48 -0
  9. package/dist/accessibility/audit/audit-tree.d.ts.map +1 -0
  10. package/dist/accessibility/audit/audit-tree.js +125 -0
  11. package/dist/accessibility/audit/audit-tree.js.map +1 -0
  12. package/dist/accessibility/audit/contrast.d.ts +65 -0
  13. package/dist/accessibility/audit/contrast.d.ts.map +1 -0
  14. package/dist/accessibility/audit/contrast.js +120 -0
  15. package/dist/accessibility/audit/contrast.js.map +1 -0
  16. package/dist/accessibility/audit/index.d.ts +19 -0
  17. package/dist/accessibility/audit/index.d.ts.map +1 -0
  18. package/dist/accessibility/audit/index.js +22 -0
  19. package/dist/accessibility/audit/index.js.map +1 -0
  20. package/dist/accessibility/audit/rules.d.ts +87 -0
  21. package/dist/accessibility/audit/rules.d.ts.map +1 -0
  22. package/dist/accessibility/audit/rules.js +67 -0
  23. package/dist/accessibility/audit/rules.js.map +1 -0
  24. package/dist/accessibility/audit/visual-tree-host.d.ts +5 -0
  25. package/dist/accessibility/audit/visual-tree-host.d.ts.map +1 -0
  26. package/dist/accessibility/audit/visual-tree-host.js +139 -0
  27. package/dist/accessibility/audit/visual-tree-host.js.map +1 -0
  28. package/dist/accessibility/index.d.ts +6 -0
  29. package/dist/accessibility/index.d.ts.map +1 -0
  30. package/dist/accessibility/index.js +6 -0
  31. package/dist/accessibility/index.js.map +1 -0
  32. package/dist/accessibility/live-priority.d.ts +22 -0
  33. package/dist/accessibility/live-priority.d.ts.map +1 -0
  34. package/dist/accessibility/live-priority.js +27 -0
  35. package/dist/accessibility/live-priority.js.map +1 -0
  36. package/dist/accessibility/live-region.d.ts +16 -0
  37. package/dist/accessibility/live-region.d.ts.map +1 -0
  38. package/dist/accessibility/live-region.js +20 -0
  39. package/dist/accessibility/live-region.js.map +1 -0
  40. package/dist/accessibility/notification.d.ts +15 -0
  41. package/dist/accessibility/notification.d.ts.map +1 -0
  42. package/dist/accessibility/notification.js +28 -0
  43. package/dist/accessibility/notification.js.map +1 -0
  44. package/dist/app/activate.d.ts +44 -0
  45. package/dist/app/activate.d.ts.map +1 -0
  46. package/dist/app/activate.js +64 -0
  47. package/dist/app/activate.js.map +1 -0
  48. package/dist/app/activation/alarm-argument.d.ts +28 -0
  49. package/dist/app/activation/alarm-argument.d.ts.map +1 -0
  50. package/dist/app/activation/alarm-argument.js +44 -0
  51. package/dist/app/activation/alarm-argument.js.map +1 -0
  52. package/dist/app/activation/classify.d.ts +58 -0
  53. package/dist/app/activation/classify.d.ts.map +1 -0
  54. package/dist/app/activation/classify.js +137 -0
  55. package/dist/app/activation/classify.js.map +1 -0
  56. package/dist/app/activation/command.d.ts +41 -0
  57. package/dist/app/activation/command.d.ts.map +1 -0
  58. package/dist/app/activation/command.js +63 -0
  59. package/dist/app/activation/command.js.map +1 -0
  60. package/dist/app/activation/context.d.ts +23 -0
  61. package/dist/app/activation/context.d.ts.map +1 -0
  62. package/dist/app/activation/context.js +15 -0
  63. package/dist/app/activation/context.js.map +1 -0
  64. package/dist/app/activation/index.d.ts +11 -0
  65. package/dist/app/activation/index.d.ts.map +1 -0
  66. package/dist/app/activation/index.js +5 -0
  67. package/dist/app/activation/index.js.map +1 -0
  68. package/dist/app/activation/jump-list-argument.d.ts +20 -0
  69. package/dist/app/activation/jump-list-argument.d.ts.map +1 -0
  70. package/dist/app/activation/jump-list-argument.js +28 -0
  71. package/dist/app/activation/jump-list-argument.js.map +1 -0
  72. package/dist/app/activation/kinds.d.ts +63 -0
  73. package/dist/app/activation/kinds.d.ts.map +1 -0
  74. package/dist/app/activation/kinds.js +11 -0
  75. package/dist/app/activation/kinds.js.map +1 -0
  76. package/dist/app/activation/login.d.ts +55 -0
  77. package/dist/app/activation/login.d.ts.map +1 -0
  78. package/dist/app/activation/login.js +68 -0
  79. package/dist/app/activation/login.js.map +1 -0
  80. package/dist/app/activation/native.d.ts +16 -0
  81. package/dist/app/activation/native.d.ts.map +1 -0
  82. package/dist/app/activation/native.js +260 -0
  83. package/dist/app/activation/native.js.map +1 -0
  84. package/dist/app/activation/protocol-handlers.d.ts +29 -0
  85. package/dist/app/activation/protocol-handlers.d.ts.map +1 -0
  86. package/dist/app/activation/protocol-handlers.js +64 -0
  87. package/dist/app/activation/protocol-handlers.js.map +1 -0
  88. package/dist/app/activation/receive.d.ts +46 -0
  89. package/dist/app/activation/receive.d.ts.map +1 -0
  90. package/dist/app/activation/receive.js +72 -0
  91. package/dist/app/activation/receive.js.map +1 -0
  92. package/dist/app/activation/registration.d.ts +118 -0
  93. package/dist/app/activation/registration.d.ts.map +1 -0
  94. package/dist/app/activation/registration.js +248 -0
  95. package/dist/app/activation/registration.js.map +1 -0
  96. package/dist/app/activation/registry.d.ts +23 -0
  97. package/dist/app/activation/registry.d.ts.map +1 -0
  98. package/dist/app/activation/registry.js +2 -0
  99. package/dist/app/activation/registry.js.map +1 -0
  100. package/dist/app/activation/scheme.d.ts +43 -0
  101. package/dist/app/activation/scheme.d.ts.map +1 -0
  102. package/dist/app/activation/scheme.js +112 -0
  103. package/dist/app/activation/scheme.js.map +1 -0
  104. package/dist/app/hotkeys/errors.d.ts +22 -0
  105. package/dist/app/hotkeys/errors.d.ts.map +1 -0
  106. package/dist/app/hotkeys/errors.js +23 -0
  107. package/dist/app/hotkeys/errors.js.map +1 -0
  108. package/dist/app/hotkeys/index.d.ts +30 -0
  109. package/dist/app/hotkeys/index.d.ts.map +1 -0
  110. package/dist/app/hotkeys/index.js +59 -0
  111. package/dist/app/hotkeys/index.js.map +1 -0
  112. package/dist/app/hotkeys/keys.d.ts +43 -0
  113. package/dist/app/hotkeys/keys.d.ts.map +1 -0
  114. package/dist/app/hotkeys/keys.js +135 -0
  115. package/dist/app/hotkeys/keys.js.map +1 -0
  116. package/dist/app/hotkeys/native.d.ts +10 -0
  117. package/dist/app/hotkeys/native.d.ts.map +1 -0
  118. package/dist/app/hotkeys/native.js +35 -0
  119. package/dist/app/hotkeys/native.js.map +1 -0
  120. package/dist/app/hotkeys/registry.d.ts +67 -0
  121. package/dist/app/hotkeys/registry.d.ts.map +1 -0
  122. package/dist/app/hotkeys/registry.js +85 -0
  123. package/dist/app/hotkeys/registry.js.map +1 -0
  124. package/dist/app/index.d.ts +8 -0
  125. package/dist/app/index.d.ts.map +1 -1
  126. package/dist/app/index.js +4 -0
  127. package/dist/app/index.js.map +1 -1
  128. package/dist/app/instance-pipe.d.ts.map +1 -1
  129. package/dist/app/instance-pipe.js +1 -2
  130. package/dist/app/instance-pipe.js.map +1 -1
  131. package/dist/app/jump-list/index.d.ts +62 -0
  132. package/dist/app/jump-list/index.d.ts.map +1 -0
  133. package/dist/app/jump-list/index.js +51 -0
  134. package/dist/app/jump-list/index.js.map +1 -0
  135. package/dist/app/jump-list/native.d.ts +9 -0
  136. package/dist/app/jump-list/native.d.ts.map +1 -0
  137. package/dist/app/jump-list/native.js +284 -0
  138. package/dist/app/jump-list/native.js.map +1 -0
  139. package/dist/app/jump-list/tasks.d.ts +86 -0
  140. package/dist/app/jump-list/tasks.d.ts.map +1 -0
  141. package/dist/app/jump-list/tasks.js +89 -0
  142. package/dist/app/jump-list/tasks.js.map +1 -0
  143. package/dist/app/launch-command.d.ts +46 -0
  144. package/dist/app/launch-command.d.ts.map +1 -0
  145. package/dist/app/launch-command.js +61 -0
  146. package/dist/app/launch-command.js.map +1 -0
  147. package/dist/app/native.d.ts +16 -0
  148. package/dist/app/native.d.ts.map +1 -0
  149. package/dist/app/native.js +48 -0
  150. package/dist/app/native.js.map +1 -0
  151. package/dist/app/notification-schedule.d.ts +16 -0
  152. package/dist/app/notification-schedule.d.ts.map +1 -0
  153. package/dist/app/notification-schedule.js +20 -0
  154. package/dist/app/notification-schedule.js.map +1 -0
  155. package/dist/app/notification-source.d.ts +13 -0
  156. package/dist/app/notification-source.d.ts.map +1 -1
  157. package/dist/app/notification-source.js +22 -7
  158. package/dist/app/notification-source.js.map +1 -1
  159. package/dist/app/notify.d.ts +37 -1
  160. package/dist/app/notify.d.ts.map +1 -1
  161. package/dist/app/notify.js +30 -10
  162. package/dist/app/notify.js.map +1 -1
  163. package/dist/app/relaunch.d.ts +46 -0
  164. package/dist/app/relaunch.d.ts.map +1 -0
  165. package/dist/app/relaunch.js +45 -0
  166. package/dist/app/relaunch.js.map +1 -0
  167. package/dist/app/restart-after-crash.d.ts +57 -0
  168. package/dist/app/restart-after-crash.d.ts.map +1 -0
  169. package/dist/app/restart-after-crash.js +81 -0
  170. package/dist/app/restart-after-crash.js.map +1 -0
  171. package/dist/app/schedule/alarm.d.ts +10 -0
  172. package/dist/app/schedule/alarm.d.ts.map +1 -0
  173. package/dist/app/schedule/alarm.js +2 -0
  174. package/dist/app/schedule/alarm.js.map +1 -0
  175. package/dist/app/schedule/alarms.d.ts +78 -0
  176. package/dist/app/schedule/alarms.d.ts.map +1 -0
  177. package/dist/app/schedule/alarms.js +192 -0
  178. package/dist/app/schedule/alarms.js.map +1 -0
  179. package/dist/app/schedule/backend.d.ts +19 -0
  180. package/dist/app/schedule/backend.d.ts.map +1 -0
  181. package/dist/app/schedule/backend.js +3 -0
  182. package/dist/app/schedule/backend.js.map +1 -0
  183. package/dist/app/schedule/events.d.ts +30 -0
  184. package/dist/app/schedule/events.d.ts.map +1 -0
  185. package/dist/app/schedule/events.js +45 -0
  186. package/dist/app/schedule/events.js.map +1 -0
  187. package/dist/app/schedule/index.d.ts +7 -0
  188. package/dist/app/schedule/index.d.ts.map +1 -0
  189. package/dist/app/schedule/index.js +3 -0
  190. package/dist/app/schedule/index.js.map +1 -0
  191. package/dist/app/schedule/native.d.ts +19 -0
  192. package/dist/app/schedule/native.d.ts.map +1 -0
  193. package/dist/app/schedule/native.js +74 -0
  194. package/dist/app/schedule/native.js.map +1 -0
  195. package/dist/app/schedule/occurrence.d.ts +27 -0
  196. package/dist/app/schedule/occurrence.d.ts.map +1 -0
  197. package/dist/app/schedule/occurrence.js +34 -0
  198. package/dist/app/schedule/occurrence.js.map +1 -0
  199. package/dist/app/schedule/xml.d.ts +29 -0
  200. package/dist/app/schedule/xml.d.ts.map +1 -0
  201. package/dist/app/schedule/xml.js +93 -0
  202. package/dist/app/schedule/xml.js.map +1 -0
  203. package/dist/app/schedule-bindings.d.ts +4 -0
  204. package/dist/app/schedule-bindings.d.ts.map +1 -0
  205. package/dist/app/schedule-bindings.js +4 -0
  206. package/dist/app/schedule-bindings.js.map +1 -0
  207. package/dist/app/shell/app-paths.d.ts +46 -0
  208. package/dist/app/shell/app-paths.d.ts.map +1 -0
  209. package/dist/app/shell/app-paths.js +117 -0
  210. package/dist/app/shell/app-paths.js.map +1 -0
  211. package/dist/app/shell/backend.d.ts +26 -0
  212. package/dist/app/shell/backend.d.ts.map +1 -0
  213. package/dist/app/shell/backend.js +2 -0
  214. package/dist/app/shell/backend.js.map +1 -0
  215. package/dist/app/shell/index.d.ts +12 -0
  216. package/dist/app/shell/index.d.ts.map +1 -0
  217. package/dist/app/shell/index.js +6 -0
  218. package/dist/app/shell/index.js.map +1 -0
  219. package/dist/app/shell/kinds.d.ts +49 -0
  220. package/dist/app/shell/kinds.d.ts.map +1 -0
  221. package/dist/app/shell/kinds.js +37 -0
  222. package/dist/app/shell/kinds.js.map +1 -0
  223. package/dist/app/shell/native.d.ts +9 -0
  224. package/dist/app/shell/native.d.ts.map +1 -0
  225. package/dist/app/shell/native.js +280 -0
  226. package/dist/app/shell/native.js.map +1 -0
  227. package/dist/app/shell/open-with.d.ts +31 -0
  228. package/dist/app/shell/open-with.d.ts.map +1 -0
  229. package/dist/app/shell/open-with.js +45 -0
  230. package/dist/app/shell/open-with.js.map +1 -0
  231. package/dist/app/shell/paths.d.ts +17 -0
  232. package/dist/app/shell/paths.d.ts.map +1 -0
  233. package/dist/app/shell/paths.js +27 -0
  234. package/dist/app/shell/paths.js.map +1 -0
  235. package/dist/app/shell/shortcut.d.ts +77 -0
  236. package/dist/app/shell/shortcut.d.ts.map +1 -0
  237. package/dist/app/shell/shortcut.js +104 -0
  238. package/dist/app/shell/shortcut.js.map +1 -0
  239. package/dist/app/shell/trash.d.ts +20 -0
  240. package/dist/app/shell/trash.d.ts.map +1 -0
  241. package/dist/app/shell/trash.js +40 -0
  242. package/dist/app/shell/trash.js.map +1 -0
  243. package/dist/app/tray-instance.d.ts +38 -0
  244. package/dist/app/tray-instance.d.ts.map +1 -0
  245. package/dist/app/tray-instance.js +63 -0
  246. package/dist/app/tray-instance.js.map +1 -0
  247. package/dist/app/windows-time.d.ts +10 -0
  248. package/dist/app/windows-time.d.ts.map +1 -0
  249. package/dist/app/windows-time.js +13 -0
  250. package/dist/app/windows-time.js.map +1 -0
  251. package/dist/bindings/.dynwinrt-managed +1 -1
  252. package/dist/bindings/microsoft/ui/input/CharacterReceivedEventArgs.d.ts +40 -0
  253. package/dist/bindings/microsoft/ui/input/CharacterReceivedEventArgs.js +89 -0
  254. package/dist/bindings/microsoft/ui/input/ContextMenuKeyEventArgs.d.ts +16 -0
  255. package/dist/bindings/microsoft/ui/input/ContextMenuKeyEventArgs.js +51 -0
  256. package/dist/bindings/microsoft/ui/input/IInputKeyboardSource2.d.ts +133 -0
  257. package/dist/bindings/microsoft/ui/input/IInputKeyboardSource2.js +494 -0
  258. package/dist/bindings/microsoft/ui/input/InputKeyboardSource.d.ts +102 -0
  259. package/dist/bindings/microsoft/ui/input/InputKeyboardSource.js +346 -0
  260. package/dist/bindings/microsoft/ui/input/KeyEventArgs.d.ts +46 -0
  261. package/dist/bindings/microsoft/ui/input/KeyEventArgs.js +100 -0
  262. package/dist/bindings/microsoft/ui/input/VirtualKeyStates.d.ts +19 -0
  263. package/dist/bindings/microsoft/ui/input/VirtualKeyStates.js +20 -0
  264. package/dist/bindings/microsoft/ui/xaml/automation/AutomationProperty.d.ts +10 -0
  265. package/dist/bindings/microsoft/ui/xaml/automation/AutomationProperty.js +39 -0
  266. package/dist/bindings/microsoft/ui/xaml/automation/AutomationTextEditChangeType.d.ts +23 -0
  267. package/dist/bindings/microsoft/ui/xaml/automation/AutomationTextEditChangeType.js +24 -0
  268. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationEvents.d.ts +127 -0
  269. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationEvents.js +128 -0
  270. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationNavigationDirection.d.ts +27 -0
  271. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationNavigationDirection.js +28 -0
  272. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationNotificationKind.d.ts +27 -0
  273. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationNotificationKind.js +28 -0
  274. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationNotificationProcessing.d.ts +27 -0
  275. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationNotificationProcessing.js +28 -0
  276. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationOrientation.d.ts +19 -0
  277. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationOrientation.js +20 -0
  278. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationPeer.d.ts +373 -0
  279. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationPeer.js +741 -0
  280. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationPeerAnnotation.d.ts +57 -0
  281. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationPeerAnnotation.js +216 -0
  282. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationStructureChangeType.d.ts +31 -0
  283. package/dist/bindings/microsoft/ui/xaml/automation/peers/AutomationStructureChangeType.js +32 -0
  284. package/dist/bindings/microsoft/ui/xaml/automation/peers/FrameworkElementAutomationPeer.d.ts +142 -0
  285. package/dist/bindings/microsoft/ui/xaml/automation/peers/FrameworkElementAutomationPeer.js +531 -0
  286. package/dist/bindings/microsoft/ui/xaml/automation/peers/IAutomationPeer.d.ts +448 -0
  287. package/dist/bindings/microsoft/ui/xaml/automation/peers/IAutomationPeer.js +1073 -0
  288. package/dist/bindings/microsoft/ui/xaml/automation/peers/IAutomationPeerProtected.d.ts +32 -0
  289. package/dist/bindings/microsoft/ui/xaml/automation/peers/IAutomationPeerProtected.js +138 -0
  290. package/dist/bindings/microsoft/ui/xaml/automation/peers/PatternInterface.d.ts +143 -0
  291. package/dist/bindings/microsoft/ui/xaml/automation/peers/PatternInterface.js +144 -0
  292. package/dist/bindings/microsoft/ui/xaml/automation/provider/IRawElementProviderSimple.d.ts +25 -0
  293. package/dist/bindings/microsoft/ui/xaml/automation/provider/IRawElementProviderSimple.js +110 -0
  294. package/dist/bindings/microsoft/ui/xaml/input/FindNextElementOptions.d.ts +52 -0
  295. package/dist/bindings/microsoft/ui/xaml/input/FindNextElementOptions.js +133 -0
  296. package/dist/bindings/microsoft/ui/xaml/input/FocusManager.d.ts +159 -0
  297. package/dist/bindings/microsoft/ui/xaml/input/FocusManager.js +360 -0
  298. package/dist/bindings/microsoft/ui/xaml/input/FocusManagerGotFocusEventArgs.d.ts +21 -0
  299. package/dist/bindings/microsoft/ui/xaml/input/FocusManagerGotFocusEventArgs.js +58 -0
  300. package/dist/bindings/microsoft/ui/xaml/input/FocusManagerLostFocusEventArgs.d.ts +21 -0
  301. package/dist/bindings/microsoft/ui/xaml/input/FocusManagerLostFocusEventArgs.js +58 -0
  302. package/dist/bindings/microsoft/ui/xaml/input/FocusMovementResult.d.ts +15 -0
  303. package/dist/bindings/microsoft/ui/xaml/input/FocusMovementResult.js +47 -0
  304. package/dist/bindings/microsoft/ui/xaml/input/XYFocusNavigationStrategyOverride.d.ts +27 -0
  305. package/dist/bindings/microsoft/ui/xaml/input/XYFocusNavigationStrategyOverride.js +28 -0
  306. package/dist/bindings/microsoft/ui/xaml/media/animation/BasicConnectedAnimationConfiguration.d.ts +11 -0
  307. package/dist/bindings/microsoft/ui/xaml/media/animation/BasicConnectedAnimationConfiguration.js +62 -0
  308. package/dist/bindings/microsoft/ui/xaml/media/animation/DirectConnectedAnimationConfiguration.d.ts +11 -0
  309. package/dist/bindings/microsoft/ui/xaml/media/animation/DirectConnectedAnimationConfiguration.js +62 -0
  310. package/dist/bindings/microsoft/ui/xaml/media/animation/GravityConnectedAnimationConfiguration.d.ts +17 -0
  311. package/dist/bindings/microsoft/ui/xaml/media/animation/GravityConnectedAnimationConfiguration.js +74 -0
  312. package/dist/bindings/windows/application-model/AddResourcePackageOptions.d.ts +7 -0
  313. package/dist/bindings/windows/application-model/AddResourcePackageOptions.js +8 -0
  314. package/dist/bindings/windows/application-model/IPackageCatalog2.d.ts +50 -0
  315. package/dist/bindings/windows/application-model/IPackageCatalog2.js +211 -0
  316. package/dist/bindings/windows/application-model/IPackageCatalog3.d.ts +29 -0
  317. package/dist/bindings/windows/application-model/IPackageCatalog3.js +136 -0
  318. package/dist/bindings/windows/application-model/IPackageCatalog4.d.ts +60 -0
  319. package/dist/bindings/windows/application-model/IPackageCatalog4.js +199 -0
  320. package/dist/bindings/windows/application-model/PackageCatalog.d.ts +100 -0
  321. package/dist/bindings/windows/application-model/PackageCatalog.js +440 -0
  322. package/dist/bindings/windows/application-model/PackageCatalogAddOptionalPackageResult.d.ts +10 -0
  323. package/dist/bindings/windows/application-model/PackageCatalogAddOptionalPackageResult.js +47 -0
  324. package/dist/bindings/windows/application-model/PackageCatalogAddResourcePackageResult.d.ts +11 -0
  325. package/dist/bindings/windows/application-model/PackageCatalogAddResourcePackageResult.js +51 -0
  326. package/dist/bindings/windows/application-model/PackageCatalogRemoveOptionalPackagesResult.d.ts +10 -0
  327. package/dist/bindings/windows/application-model/PackageCatalogRemoveOptionalPackagesResult.js +50 -0
  328. package/dist/bindings/windows/application-model/PackageCatalogRemoveResourcePackagesResult.d.ts +10 -0
  329. package/dist/bindings/windows/application-model/PackageCatalogRemoveResourcePackagesResult.js +50 -0
  330. package/dist/bindings/windows/application-model/PackageContentGroupStagingEventArgs.d.ts +15 -0
  331. package/dist/bindings/windows/application-model/PackageContentGroupStagingEventArgs.js +67 -0
  332. package/dist/bindings/windows/application-model/PackageInstallingEventArgs.d.ts +13 -0
  333. package/dist/bindings/windows/application-model/PackageInstallingEventArgs.js +59 -0
  334. package/dist/bindings/windows/application-model/PackageStagingEventArgs.d.ts +13 -0
  335. package/dist/bindings/windows/application-model/PackageStagingEventArgs.js +59 -0
  336. package/dist/bindings/windows/application-model/PackageStatusChangedEventArgs.d.ts +9 -0
  337. package/dist/bindings/windows/application-model/PackageStatusChangedEventArgs.js +43 -0
  338. package/dist/bindings/windows/application-model/PackageUninstallingEventArgs.d.ts +13 -0
  339. package/dist/bindings/windows/application-model/PackageUninstallingEventArgs.js +59 -0
  340. package/dist/bindings/windows/application-model/PackageUpdatingEventArgs.d.ts +14 -0
  341. package/dist/bindings/windows/application-model/PackageUpdatingEventArgs.js +63 -0
  342. package/dist/bindings/windows/application-model/StartupTask.d.ts +15 -0
  343. package/dist/bindings/windows/application-model/StartupTask.js +115 -0
  344. package/dist/bindings/windows/application-model/StartupTaskState.d.ts +5 -0
  345. package/dist/bindings/windows/application-model/StartupTaskState.js +6 -0
  346. package/dist/bindings/windows/foundation/EventHandler_MicrosoftUIXamlInputFocusManagerGotFocusEventArgs_g9744aab498e22ee2.d.ts +7 -0
  347. package/dist/bindings/windows/foundation/EventHandler_MicrosoftUIXamlInputFocusManagerGotFocusEventArgs_g9744aab498e22ee2.js +7 -0
  348. package/dist/bindings/windows/foundation/EventHandler_MicrosoftUIXamlInputFocusManagerLostFocusEventArgs_g1708c8c6742d9f14.d.ts +7 -0
  349. package/dist/bindings/windows/foundation/EventHandler_MicrosoftUIXamlInputFocusManagerLostFocusEventArgs_g1708c8c6742d9f14.js +7 -0
  350. package/dist/bindings/windows/foundation/EventHandler_MicrosoftUIXamlInputGettingFocusEventArgs_gcf469412ccadc527.d.ts +7 -0
  351. package/dist/bindings/windows/foundation/EventHandler_MicrosoftUIXamlInputGettingFocusEventArgs_gcf469412ccadc527.js +7 -0
  352. package/dist/bindings/windows/foundation/EventHandler_MicrosoftUIXamlInputLosingFocusEventArgs_g01067b38dcf7cb15.d.ts +7 -0
  353. package/dist/bindings/windows/foundation/EventHandler_MicrosoftUIXamlInputLosingFocusEventArgs_g01067b38dcf7cb15.js +7 -0
  354. package/dist/bindings/windows/foundation/TypedEventHandler_MicrosoftUIInputInputKeyboardSource_MicrosoftUIInputCharacterReceivedEventArgs_g949756a8af790124.d.ts +8 -0
  355. package/dist/bindings/windows/foundation/TypedEventHandler_MicrosoftUIInputInputKeyboardSource_MicrosoftUIInputCharacterReceivedEventArgs_g949756a8af790124.js +7 -0
  356. package/dist/bindings/windows/foundation/TypedEventHandler_MicrosoftUIInputInputKeyboardSource_MicrosoftUIInputContextMenuKeyEventArgs_gfaa54200cb240b39.d.ts +8 -0
  357. package/dist/bindings/windows/foundation/TypedEventHandler_MicrosoftUIInputInputKeyboardSource_MicrosoftUIInputContextMenuKeyEventArgs_gfaa54200cb240b39.js +7 -0
  358. package/dist/bindings/windows/foundation/TypedEventHandler_MicrosoftUIInputInputKeyboardSource_MicrosoftUIInputKeyEventArgs_gead6188cb3dd043f.d.ts +8 -0
  359. package/dist/bindings/windows/foundation/TypedEventHandler_MicrosoftUIInputInputKeyboardSource_MicrosoftUIInputKeyEventArgs_gead6188cb3dd043f.js +7 -0
  360. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageContentGroupStag_g9de03bf71c8249f6.d.ts +8 -0
  361. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageContentGroupStag_g9de03bf71c8249f6.js +7 -0
  362. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageInstallingEventA_g5da5beb9a0e17bc6.d.ts +8 -0
  363. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageInstallingEventA_g5da5beb9a0e17bc6.js +7 -0
  364. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageStagingEventArgs_ga7c7c75d178b56a6.d.ts +8 -0
  365. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageStagingEventArgs_ga7c7c75d178b56a6.js +7 -0
  366. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageStatusChangedEve_ge8daadde37a07d11.d.ts +8 -0
  367. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageStatusChangedEve_ge8daadde37a07d11.js +7 -0
  368. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageUninstallingEven_gb8f6a82edaf89485.d.ts +8 -0
  369. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageUninstallingEven_gb8f6a82edaf89485.js +7 -0
  370. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageUpdatingEventArg_gb2c74bce54d9728d.d.ts +8 -0
  371. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelPackageCatalog_WindowsApplicationModelPackageUpdatingEventArg_gb2c74bce54d9728d.js +7 -0
  372. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsServicesStoreStoreContext_Object_ga48d68d009829e64.d.ts +7 -0
  373. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsServicesStoreStoreContext_Object_ga48d68d009829e64.js +7 -0
  374. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsServicesStoreStorePackageLicense_Object_gc978b769c354e904.d.ts +7 -0
  375. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsServicesStoreStorePackageLicense_Object_gc978b769c354e904.js +7 -0
  376. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsServicesStoreStoreQueueItem_Object_g088e531e702509cf.d.ts +7 -0
  377. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsServicesStoreStoreQueueItem_Object_g088e531e702509cf.js +7 -0
  378. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsServicesStoreStoreQueueItem_WindowsServicesStoreStoreQueueItemCompletedEventA_g34ce9111d212b7b3.d.ts +8 -0
  379. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsServicesStoreStoreQueueItem_WindowsServicesStoreStoreQueueItemCompletedEventA_g34ce9111d212b7b3.js +7 -0
  380. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsUINotificationsToastNotificationManagerForUser_Object_gf9f98c6574495e8c.d.ts +7 -0
  381. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsUINotificationsToastNotificationManagerForUser_Object_gf9f98c6574495e8c.js +7 -0
  382. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsUINotificationsToastNotifier_WindowsUINotificationsScheduledToastNotification_g001c9266a166b291.d.ts +8 -0
  383. package/dist/bindings/windows/foundation/TypedEventHandler_WindowsUINotificationsToastNotifier_WindowsUINotificationsScheduledToastNotification_g001c9266a166b291.js +7 -0
  384. package/dist/bindings/windows/foundation/collections/IIterable_WindowsApplicationModelPackage_g6cb7c58670977615.d.ts +23 -0
  385. package/dist/bindings/windows/foundation/collections/IIterable_WindowsApplicationModelPackage_g6cb7c58670977615.js +45 -0
  386. package/dist/bindings/windows/foundation/collections/IIterable_WindowsServicesStoreStorePackageUpdate_g2b3af8b1803050c9.d.ts +23 -0
  387. package/dist/bindings/windows/foundation/collections/IIterable_WindowsServicesStoreStorePackageUpdate_g2b3af8b1803050c9.js +45 -0
  388. package/dist/bindings/windows/foundation/collections/IIterable_WindowsServicesStoreStoreQueueItem_gefa6c894c870ec86.d.ts +23 -0
  389. package/dist/bindings/windows/foundation/collections/IIterable_WindowsServicesStoreStoreQueueItem_gefa6c894c870ec86.js +45 -0
  390. package/dist/bindings/windows/foundation/collections/IIterator_WindowsApplicationModelPackage_gfb85903b74efaccc.d.ts +31 -0
  391. package/dist/bindings/windows/foundation/collections/IIterator_WindowsApplicationModelPackage_gfb85903b74efaccc.js +67 -0
  392. package/dist/bindings/windows/foundation/collections/IIterator_WindowsServicesStoreStorePackageUpdate_gd49c43fc9590df8e.d.ts +31 -0
  393. package/dist/bindings/windows/foundation/collections/IIterator_WindowsServicesStoreStorePackageUpdate_gd49c43fc9590df8e.js +67 -0
  394. package/dist/bindings/windows/foundation/collections/IIterator_WindowsServicesStoreStoreQueueItem_gb618559796af22f1.d.ts +31 -0
  395. package/dist/bindings/windows/foundation/collections/IIterator_WindowsServicesStoreStoreQueueItem_gb618559796af22f1.js +67 -0
  396. package/dist/bindings/windows/foundation/collections/IMapView_String_WindowsServicesStoreStoreLicense_g162ecf9ec8342f7c.d.ts +36 -0
  397. package/dist/bindings/windows/foundation/collections/IMapView_String_WindowsServicesStoreStoreLicense_g162ecf9ec8342f7c.js +71 -0
  398. package/dist/bindings/windows/foundation/collections/IMapView_String_WindowsServicesStoreStoreProduct_g8ea2e65832c6f5a4.d.ts +36 -0
  399. package/dist/bindings/windows/foundation/collections/IMapView_String_WindowsServicesStoreStoreProduct_g8ea2e65832c6f5a4.js +71 -0
  400. package/dist/bindings/windows/foundation/collections/IMap_String_WindowsServicesStoreStoreLicense_gf681f328cc2e3874.d.ts +60 -0
  401. package/dist/bindings/windows/foundation/collections/IMap_String_WindowsServicesStoreStoreLicense_gf681f328cc2e3874.js +114 -0
  402. package/dist/bindings/windows/foundation/collections/IMap_String_WindowsServicesStoreStoreProduct_g4d742845f441491c.d.ts +60 -0
  403. package/dist/bindings/windows/foundation/collections/IMap_String_WindowsServicesStoreStoreProduct_g4d742845f441491c.js +114 -0
  404. package/dist/bindings/windows/foundation/collections/IVectorView_MicrosoftUIXamlAutomationPeersAutomationPeerAnnotation_g1291d190459cae2b.d.ts +40 -0
  405. package/dist/bindings/windows/foundation/collections/IVectorView_MicrosoftUIXamlAutomationPeersAutomationPeerAnnotation_g1291d190459cae2b.js +85 -0
  406. package/dist/bindings/windows/foundation/collections/IVectorView_MicrosoftUIXamlAutomationPeersAutomationPeer_gcf17e6c70dae9df8.d.ts +40 -0
  407. package/dist/bindings/windows/foundation/collections/IVectorView_MicrosoftUIXamlAutomationPeersAutomationPeer_gcf17e6c70dae9df8.js +85 -0
  408. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsApplicationModelStartupTask_g213762a6fd9a9707.d.ts +40 -0
  409. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsApplicationModelStartupTask_g213762a6fd9a9707.js +85 -0
  410. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStoreAvailability_geb0561a0f0dd0005.d.ts +40 -0
  411. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStoreAvailability_geb0561a0f0dd0005.js +85 -0
  412. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStoreImage_g3308691eac26400f.d.ts +40 -0
  413. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStoreImage_g3308691eac26400f.js +85 -0
  414. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStorePackageUpdateStatus_g48777acdbcb2a5c8.d.ts +54 -0
  415. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStorePackageUpdateStatus_g48777acdbcb2a5c8.js +109 -0
  416. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStorePackageUpdate_gc7d2f3857622cec3.d.ts +40 -0
  417. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStorePackageUpdate_gc7d2f3857622cec3.js +85 -0
  418. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStoreQueueItem_g866c0e5377ca52ec.d.ts +40 -0
  419. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStoreQueueItem_g866c0e5377ca52ec.js +85 -0
  420. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStoreSku_g915fbb9b0e903e7f.d.ts +40 -0
  421. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStoreSku_g915fbb9b0e903e7f.js +85 -0
  422. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStoreVideo_gcff017d5106c30d1.d.ts +40 -0
  423. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsServicesStoreStoreVideo_gcff017d5106c30d1.js +85 -0
  424. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsUINotificationsScheduledToastNotification_gafec5ba714dc8e71.d.ts +40 -0
  425. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsUINotificationsScheduledToastNotification_gafec5ba714dc8e71.js +85 -0
  426. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsUINotificationsToastCollection_g3093026941314e4f.d.ts +40 -0
  427. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsUINotificationsToastCollection_g3093026941314e4f.js +85 -0
  428. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsUINotificationsToastNotification_g8c913fdb725fef16.d.ts +40 -0
  429. package/dist/bindings/windows/foundation/collections/IVectorView_WindowsUINotificationsToastNotification_g8c913fdb725fef16.js +85 -0
  430. package/dist/bindings/windows/foundation/collections/IVector_MicrosoftUIXamlAutomationPeersAutomationPeerAnnotation_g0be2a565a8b48fdc.d.ts +62 -0
  431. package/dist/bindings/windows/foundation/collections/IVector_MicrosoftUIXamlAutomationPeersAutomationPeerAnnotation_g0be2a565a8b48fdc.js +135 -0
  432. package/dist/bindings/windows/foundation/collections/IVector_MicrosoftUIXamlAutomationPeersAutomationPeer_gfdcbe941c5dbe60f.d.ts +62 -0
  433. package/dist/bindings/windows/foundation/collections/IVector_MicrosoftUIXamlAutomationPeersAutomationPeer_gfdcbe941c5dbe60f.js +135 -0
  434. package/dist/bindings/windows/services/store/IStoreAppLicense2.d.ts +27 -0
  435. package/dist/bindings/windows/services/store/IStoreAppLicense2.js +116 -0
  436. package/dist/bindings/windows/services/store/IStoreContext2.d.ts +30 -0
  437. package/dist/bindings/windows/services/store/IStoreContext2.js +140 -0
  438. package/dist/bindings/windows/services/store/IStoreContext3.d.ts +107 -0
  439. package/dist/bindings/windows/services/store/IStoreContext3.js +519 -0
  440. package/dist/bindings/windows/services/store/IStoreContext4.d.ts +34 -0
  441. package/dist/bindings/windows/services/store/IStoreContext4.js +167 -0
  442. package/dist/bindings/windows/services/store/IStoreContext5.d.ts +36 -0
  443. package/dist/bindings/windows/services/store/IStoreContext5.js +187 -0
  444. package/dist/bindings/windows/services/store/IStorePackageUpdateResult2.d.ts +28 -0
  445. package/dist/bindings/windows/services/store/IStorePackageUpdateResult2.js +122 -0
  446. package/dist/bindings/windows/services/store/IStorePrice2.d.ts +33 -0
  447. package/dist/bindings/windows/services/store/IStorePrice2.js +140 -0
  448. package/dist/bindings/windows/services/store/IStoreQueueItem2.d.ts +33 -0
  449. package/dist/bindings/windows/services/store/IStoreQueueItem2.js +176 -0
  450. package/dist/bindings/windows/services/store/StoreAcquireLicenseResult.d.ts +10 -0
  451. package/dist/bindings/windows/services/store/StoreAcquireLicenseResult.js +47 -0
  452. package/dist/bindings/windows/services/store/StoreAppLicense.d.ts +38 -0
  453. package/dist/bindings/windows/services/store/StoreAppLicense.js +136 -0
  454. package/dist/bindings/windows/services/store/StoreAvailability.d.ts +26 -0
  455. package/dist/bindings/windows/services/store/StoreAvailability.js +134 -0
  456. package/dist/bindings/windows/services/store/StoreCanAcquireLicenseResult.d.ts +11 -0
  457. package/dist/bindings/windows/services/store/StoreCanAcquireLicenseResult.js +51 -0
  458. package/dist/bindings/windows/services/store/StoreCanLicenseStatus.d.ts +9 -0
  459. package/dist/bindings/windows/services/store/StoreCanLicenseStatus.js +10 -0
  460. package/dist/bindings/windows/services/store/StoreCollectionData.d.ts +33 -0
  461. package/dist/bindings/windows/services/store/StoreCollectionData.js +102 -0
  462. package/dist/bindings/windows/services/store/StoreConsumableResult.d.ts +12 -0
  463. package/dist/bindings/windows/services/store/StoreConsumableResult.js +55 -0
  464. package/dist/bindings/windows/services/store/StoreConsumableStatus.d.ts +8 -0
  465. package/dist/bindings/windows/services/store/StoreConsumableStatus.js +9 -0
  466. package/dist/bindings/windows/services/store/StoreContext.d.ts +121 -0
  467. package/dist/bindings/windows/services/store/StoreContext.js +975 -0
  468. package/dist/bindings/windows/services/store/StoreDurationUnit.d.ts +10 -0
  469. package/dist/bindings/windows/services/store/StoreDurationUnit.js +11 -0
  470. package/dist/bindings/windows/services/store/StoreImage.d.ts +13 -0
  471. package/dist/bindings/windows/services/store/StoreImage.js +59 -0
  472. package/dist/bindings/windows/services/store/StoreLicense.d.ts +21 -0
  473. package/dist/bindings/windows/services/store/StoreLicense.js +73 -0
  474. package/dist/bindings/windows/services/store/StorePackageInstallOptions.d.ts +13 -0
  475. package/dist/bindings/windows/services/store/StorePackageInstallOptions.js +61 -0
  476. package/dist/bindings/windows/services/store/StorePackageLicense.d.ts +31 -0
  477. package/dist/bindings/windows/services/store/StorePackageLicense.js +117 -0
  478. package/dist/bindings/windows/services/store/StorePackageUpdate.d.ts +10 -0
  479. package/dist/bindings/windows/services/store/StorePackageUpdate.js +47 -0
  480. package/dist/bindings/windows/services/store/StorePackageUpdateResult.d.ts +29 -0
  481. package/dist/bindings/windows/services/store/StorePackageUpdateResult.js +99 -0
  482. package/dist/bindings/windows/services/store/StorePackageUpdateState.d.ts +5 -0
  483. package/dist/bindings/windows/services/store/StorePackageUpdateState.js +6 -0
  484. package/dist/bindings/windows/services/store/StorePackageUpdateStatus.d.ts +5 -0
  485. package/dist/bindings/windows/services/store/StorePackageUpdateStatus.js +6 -0
  486. package/dist/bindings/windows/services/store/StorePrice.d.ts +27 -0
  487. package/dist/bindings/windows/services/store/StorePrice.js +106 -0
  488. package/dist/bindings/windows/services/store/StoreProduct.d.ts +34 -0
  489. package/dist/bindings/windows/services/store/StoreProduct.js +201 -0
  490. package/dist/bindings/windows/services/store/StoreProductOptions.d.ts +13 -0
  491. package/dist/bindings/windows/services/store/StoreProductOptions.js +60 -0
  492. package/dist/bindings/windows/services/store/StoreProductPagedQueryResult.d.ts +12 -0
  493. package/dist/bindings/windows/services/store/StoreProductPagedQueryResult.js +73 -0
  494. package/dist/bindings/windows/services/store/StoreProductQueryResult.d.ts +10 -0
  495. package/dist/bindings/windows/services/store/StoreProductQueryResult.js +53 -0
  496. package/dist/bindings/windows/services/store/StoreProductResult.d.ts +10 -0
  497. package/dist/bindings/windows/services/store/StoreProductResult.js +47 -0
  498. package/dist/bindings/windows/services/store/StorePurchaseProperties.d.ts +17 -0
  499. package/dist/bindings/windows/services/store/StorePurchaseProperties.js +90 -0
  500. package/dist/bindings/windows/services/store/StorePurchaseResult.d.ts +10 -0
  501. package/dist/bindings/windows/services/store/StorePurchaseResult.js +47 -0
  502. package/dist/bindings/windows/services/store/StorePurchaseStatus.d.ts +9 -0
  503. package/dist/bindings/windows/services/store/StorePurchaseStatus.js +10 -0
  504. package/dist/bindings/windows/services/store/StoreQueueItem.d.ts +40 -0
  505. package/dist/bindings/windows/services/store/StoreQueueItem.js +199 -0
  506. package/dist/bindings/windows/services/store/StoreQueueItemCompletedEventArgs.d.ts +9 -0
  507. package/dist/bindings/windows/services/store/StoreQueueItemCompletedEventArgs.js +43 -0
  508. package/dist/bindings/windows/services/store/StoreQueueItemExtendedState.d.ts +19 -0
  509. package/dist/bindings/windows/services/store/StoreQueueItemExtendedState.js +20 -0
  510. package/dist/bindings/windows/services/store/StoreQueueItemKind.d.ts +7 -0
  511. package/dist/bindings/windows/services/store/StoreQueueItemKind.js +8 -0
  512. package/dist/bindings/windows/services/store/StoreQueueItemState.d.ts +9 -0
  513. package/dist/bindings/windows/services/store/StoreQueueItemState.js +10 -0
  514. package/dist/bindings/windows/services/store/StoreQueueItemStatus.d.ts +27 -0
  515. package/dist/bindings/windows/services/store/StoreQueueItemStatus.js +83 -0
  516. package/dist/bindings/windows/services/store/StoreRateAndReviewResult.d.ts +12 -0
  517. package/dist/bindings/windows/services/store/StoreRateAndReviewResult.js +55 -0
  518. package/dist/bindings/windows/services/store/StoreRateAndReviewStatus.d.ts +8 -0
  519. package/dist/bindings/windows/services/store/StoreRateAndReviewStatus.js +9 -0
  520. package/dist/bindings/windows/services/store/StoreSku.d.ts +36 -0
  521. package/dist/bindings/windows/services/store/StoreSku.js +208 -0
  522. package/dist/bindings/windows/services/store/StoreSubscriptionInfo.d.ts +13 -0
  523. package/dist/bindings/windows/services/store/StoreSubscriptionInfo.js +59 -0
  524. package/dist/bindings/windows/services/store/StoreUninstallStorePackageResult.d.ts +10 -0
  525. package/dist/bindings/windows/services/store/StoreUninstallStorePackageResult.js +47 -0
  526. package/dist/bindings/windows/services/store/StoreUninstallStorePackageStatus.d.ts +9 -0
  527. package/dist/bindings/windows/services/store/StoreUninstallStorePackageStatus.js +10 -0
  528. package/dist/bindings/windows/services/store/StoreVideo.d.ts +15 -0
  529. package/dist/bindings/windows/services/store/StoreVideo.js +66 -0
  530. package/dist/bindings/windows/ui/notifications/IScheduledToastNotification2.d.ts +39 -0
  531. package/dist/bindings/windows/ui/notifications/IScheduledToastNotification2.js +173 -0
  532. package/dist/bindings/windows/ui/notifications/IScheduledToastNotification3.d.ts +35 -0
  533. package/dist/bindings/windows/ui/notifications/IScheduledToastNotification3.js +153 -0
  534. package/dist/bindings/windows/ui/notifications/IScheduledToastNotification4.d.ts +39 -0
  535. package/dist/bindings/windows/ui/notifications/IScheduledToastNotification4.js +147 -0
  536. package/dist/bindings/windows/ui/notifications/IToastNotificationHistory2.d.ts +31 -0
  537. package/dist/bindings/windows/ui/notifications/IToastNotificationHistory2.js +134 -0
  538. package/dist/bindings/windows/ui/notifications/IToastNotificationManagerForUser2.d.ts +39 -0
  539. package/dist/bindings/windows/ui/notifications/IToastNotificationManagerForUser2.js +185 -0
  540. package/dist/bindings/windows/ui/notifications/IToastNotificationManagerForUser3.d.ts +49 -0
  541. package/dist/bindings/windows/ui/notifications/IToastNotificationManagerForUser3.js +195 -0
  542. package/dist/bindings/windows/ui/notifications/IToastNotifier2.d.ts +32 -0
  543. package/dist/bindings/windows/ui/notifications/IToastNotifier2.js +137 -0
  544. package/dist/bindings/windows/ui/notifications/IToastNotifier3.d.ts +46 -0
  545. package/dist/bindings/windows/ui/notifications/IToastNotifier3.js +184 -0
  546. package/dist/bindings/windows/ui/notifications/NotificationSetting.d.ts +9 -0
  547. package/dist/bindings/windows/ui/notifications/NotificationSetting.js +10 -0
  548. package/dist/bindings/windows/ui/notifications/NotificationUpdateResult.d.ts +7 -0
  549. package/dist/bindings/windows/ui/notifications/NotificationUpdateResult.js +8 -0
  550. package/dist/bindings/windows/ui/notifications/ScheduledToastNotification.d.ts +51 -0
  551. package/dist/bindings/windows/ui/notifications/ScheduledToastNotification.js +231 -0
  552. package/dist/bindings/windows/ui/notifications/ScheduledToastNotificationShowingEventArgs.d.ts +13 -0
  553. package/dist/bindings/windows/ui/notifications/ScheduledToastNotificationShowingEventArgs.js +58 -0
  554. package/dist/bindings/windows/ui/notifications/ToastCollection.d.ts +16 -0
  555. package/dist/bindings/windows/ui/notifications/ToastCollection.js +91 -0
  556. package/dist/bindings/windows/ui/notifications/ToastCollectionManager.d.ts +17 -0
  557. package/dist/bindings/windows/ui/notifications/ToastCollectionManager.js +136 -0
  558. package/dist/bindings/windows/ui/notifications/ToastNotificationHistory.d.ts +24 -0
  559. package/dist/bindings/windows/ui/notifications/ToastNotificationHistory.js +137 -0
  560. package/dist/bindings/windows/ui/notifications/ToastNotificationManager.d.ts +19 -0
  561. package/dist/bindings/windows/ui/notifications/ToastNotificationManager.js +133 -0
  562. package/dist/bindings/windows/ui/notifications/ToastNotificationManagerForUser.d.ts +40 -0
  563. package/dist/bindings/windows/ui/notifications/ToastNotificationManagerForUser.js +205 -0
  564. package/dist/bindings/windows/ui/notifications/ToastNotificationMode.d.ts +7 -0
  565. package/dist/bindings/windows/ui/notifications/ToastNotificationMode.js +8 -0
  566. package/dist/bindings/windows/ui/notifications/ToastNotifier.d.ts +41 -0
  567. package/dist/bindings/windows/ui/notifications/ToastNotifier.js +183 -0
  568. package/dist/bindings/windows/ui/notifications/ToastTemplateType.d.ts +12 -0
  569. package/dist/bindings/windows/ui/notifications/ToastTemplateType.js +13 -0
  570. package/dist/chrome/action/action-types.d.ts +48 -0
  571. package/dist/chrome/action/action-types.d.ts.map +1 -0
  572. package/dist/chrome/action/action-types.js +86 -0
  573. package/dist/chrome/action/action-types.js.map +1 -0
  574. package/dist/chrome/action/chrome-action.d.ts +117 -0
  575. package/dist/chrome/action/chrome-action.d.ts.map +1 -0
  576. package/dist/chrome/action/chrome-action.js +181 -0
  577. package/dist/chrome/action/chrome-action.js.map +1 -0
  578. package/dist/chrome/action/create-chrome-action.d.ts +23 -0
  579. package/dist/chrome/action/create-chrome-action.d.ts.map +1 -0
  580. package/dist/chrome/action/create-chrome-action.js +24 -0
  581. package/dist/chrome/action/create-chrome-action.js.map +1 -0
  582. package/dist/chrome/action/index.d.ts +7 -0
  583. package/dist/chrome/action/index.d.ts.map +1 -0
  584. package/dist/chrome/action/index.js +4 -0
  585. package/dist/chrome/action/index.js.map +1 -0
  586. package/dist/chrome/commands/chrome-commands.d.ts +62 -0
  587. package/dist/chrome/commands/chrome-commands.d.ts.map +1 -0
  588. package/dist/chrome/commands/chrome-commands.js +133 -0
  589. package/dist/chrome/commands/chrome-commands.js.map +1 -0
  590. package/dist/chrome/commands/command-types.d.ts +45 -0
  591. package/dist/chrome/commands/command-types.d.ts.map +1 -0
  592. package/dist/chrome/commands/command-types.js +27 -0
  593. package/dist/chrome/commands/command-types.js.map +1 -0
  594. package/dist/chrome/commands/index.d.ts +7 -0
  595. package/dist/chrome/commands/index.d.ts.map +1 -0
  596. package/dist/chrome/commands/index.js +4 -0
  597. package/dist/chrome/commands/index.js.map +1 -0
  598. package/dist/chrome/commands/shortcut.d.ts +24 -0
  599. package/dist/chrome/commands/shortcut.d.ts.map +1 -0
  600. package/dist/chrome/commands/shortcut.js +86 -0
  601. package/dist/chrome/commands/shortcut.js.map +1 -0
  602. package/dist/chrome/context-menus/build-menu.d.ts +26 -0
  603. package/dist/chrome/context-menus/build-menu.d.ts.map +1 -0
  604. package/dist/chrome/context-menus/build-menu.js +97 -0
  605. package/dist/chrome/context-menus/build-menu.js.map +1 -0
  606. package/dist/chrome/context-menus/chrome-context-menus.d.ts +61 -0
  607. package/dist/chrome/context-menus/chrome-context-menus.d.ts.map +1 -0
  608. package/dist/chrome/context-menus/chrome-context-menus.js +219 -0
  609. package/dist/chrome/context-menus/chrome-context-menus.js.map +1 -0
  610. package/dist/chrome/context-menus/context-menu-entry.d.ts +20 -0
  611. package/dist/chrome/context-menus/context-menu-entry.d.ts.map +1 -0
  612. package/dist/chrome/context-menus/context-menu-entry.js +16 -0
  613. package/dist/chrome/context-menus/context-menu-entry.js.map +1 -0
  614. package/dist/chrome/context-menus/context-menu-schema.d.ts +29 -0
  615. package/dist/chrome/context-menus/context-menu-schema.d.ts.map +1 -0
  616. package/dist/chrome/context-menus/context-menu-schema.js +38 -0
  617. package/dist/chrome/context-menus/context-menu-schema.js.map +1 -0
  618. package/dist/chrome/context-menus/context-menu-types.d.ts +74 -0
  619. package/dist/chrome/context-menus/context-menu-types.d.ts.map +1 -0
  620. package/dist/chrome/context-menus/context-menu-types.js +29 -0
  621. package/dist/chrome/context-menus/context-menu-types.js.map +1 -0
  622. package/dist/chrome/context-menus/index.d.ts +5 -0
  623. package/dist/chrome/context-menus/index.d.ts.map +1 -0
  624. package/dist/chrome/context-menus/index.js +4 -0
  625. package/dist/chrome/context-menus/index.js.map +1 -0
  626. package/dist/chrome/i18n/chrome-i18n.d.ts +78 -0
  627. package/dist/chrome/i18n/chrome-i18n.d.ts.map +1 -0
  628. package/dist/chrome/i18n/chrome-i18n.js +151 -0
  629. package/dist/chrome/i18n/chrome-i18n.js.map +1 -0
  630. package/dist/chrome/i18n/detect-language.d.ts +23 -0
  631. package/dist/chrome/i18n/detect-language.d.ts.map +1 -0
  632. package/dist/chrome/i18n/detect-language.js +55 -0
  633. package/dist/chrome/i18n/detect-language.js.map +1 -0
  634. package/dist/chrome/i18n/index.d.ts +6 -0
  635. package/dist/chrome/i18n/index.d.ts.map +1 -0
  636. package/dist/chrome/i18n/index.js +3 -0
  637. package/dist/chrome/i18n/index.js.map +1 -0
  638. package/dist/chrome/i18n/language-defaults.d.ts +17 -0
  639. package/dist/chrome/i18n/language-defaults.d.ts.map +1 -0
  640. package/dist/chrome/i18n/language-defaults.js +123 -0
  641. package/dist/chrome/i18n/language-defaults.js.map +1 -0
  642. package/dist/chrome/i18n/locale-chain.d.ts +26 -0
  643. package/dist/chrome/i18n/locale-chain.d.ts.map +1 -0
  644. package/dist/chrome/i18n/locale-chain.js +38 -0
  645. package/dist/chrome/i18n/locale-chain.js.map +1 -0
  646. package/dist/chrome/i18n/message-format.d.ts +14 -0
  647. package/dist/chrome/i18n/message-format.d.ts.map +1 -0
  648. package/dist/chrome/i18n/message-format.js +40 -0
  649. package/dist/chrome/i18n/message-format.js.map +1 -0
  650. package/dist/chrome/i18n/messages-schema.d.ts +22 -0
  651. package/dist/chrome/i18n/messages-schema.d.ts.map +1 -0
  652. package/dist/chrome/i18n/messages-schema.js +48 -0
  653. package/dist/chrome/i18n/messages-schema.js.map +1 -0
  654. package/dist/chrome/install.d.ts +47 -0
  655. package/dist/chrome/install.d.ts.map +1 -0
  656. package/dist/chrome/install.js +35 -0
  657. package/dist/chrome/install.js.map +1 -0
  658. package/dist/chrome/notifications/chrome-notifications.d.ts +69 -0
  659. package/dist/chrome/notifications/chrome-notifications.d.ts.map +1 -0
  660. package/dist/chrome/notifications/chrome-notifications.js +201 -0
  661. package/dist/chrome/notifications/chrome-notifications.js.map +1 -0
  662. package/dist/chrome/notifications/index.d.ts +5 -0
  663. package/dist/chrome/notifications/index.d.ts.map +1 -0
  664. package/dist/chrome/notifications/index.js +4 -0
  665. package/dist/chrome/notifications/index.js.map +1 -0
  666. package/dist/chrome/notifications/notification-mapping.d.ts +35 -0
  667. package/dist/chrome/notifications/notification-mapping.d.ts.map +1 -0
  668. package/dist/chrome/notifications/notification-mapping.js +47 -0
  669. package/dist/chrome/notifications/notification-mapping.js.map +1 -0
  670. package/dist/chrome/notifications/notification-schema.d.ts +50 -0
  671. package/dist/chrome/notifications/notification-schema.d.ts.map +1 -0
  672. package/dist/chrome/notifications/notification-schema.js +68 -0
  673. package/dist/chrome/notifications/notification-schema.js.map +1 -0
  674. package/dist/chrome/notifications/notification-types.d.ts +50 -0
  675. package/dist/chrome/notifications/notification-types.d.ts.map +1 -0
  676. package/dist/chrome/notifications/notification-types.js +13 -0
  677. package/dist/chrome/notifications/notification-types.js.map +1 -0
  678. package/dist/chrome/permissions/chrome-permissions.d.ts +82 -0
  679. package/dist/chrome/permissions/chrome-permissions.d.ts.map +1 -0
  680. package/dist/chrome/permissions/chrome-permissions.js +190 -0
  681. package/dist/chrome/permissions/chrome-permissions.js.map +1 -0
  682. package/dist/chrome/permissions/index.d.ts +6 -0
  683. package/dist/chrome/permissions/index.d.ts.map +1 -0
  684. package/dist/chrome/permissions/index.js +4 -0
  685. package/dist/chrome/permissions/index.js.map +1 -0
  686. package/dist/chrome/permissions/permission-schema.d.ts +19 -0
  687. package/dist/chrome/permissions/permission-schema.d.ts.map +1 -0
  688. package/dist/chrome/permissions/permission-schema.js +60 -0
  689. package/dist/chrome/permissions/permission-schema.js.map +1 -0
  690. package/dist/chrome/permissions/permission-table.d.ts +15 -0
  691. package/dist/chrome/permissions/permission-table.d.ts.map +1 -0
  692. package/dist/chrome/permissions/permission-table.js +49 -0
  693. package/dist/chrome/permissions/permission-table.js.map +1 -0
  694. package/dist/chrome/permissions/permission-types.d.ts +6 -0
  695. package/dist/chrome/permissions/permission-types.d.ts.map +1 -0
  696. package/dist/chrome/permissions/permission-types.js +2 -0
  697. package/dist/chrome/permissions/permission-types.js.map +1 -0
  698. package/dist/chrome/runtime/identity.d.ts +58 -0
  699. package/dist/chrome/runtime/identity.d.ts.map +1 -0
  700. package/dist/chrome/runtime/identity.js +79 -0
  701. package/dist/chrome/runtime/identity.js.map +1 -0
  702. package/dist/chrome/runtime/index.d.ts +11 -0
  703. package/dist/chrome/runtime/index.d.ts.map +1 -0
  704. package/dist/chrome/runtime/index.js +6 -0
  705. package/dist/chrome/runtime/index.js.map +1 -0
  706. package/dist/chrome/runtime/installed.d.ts +47 -0
  707. package/dist/chrome/runtime/installed.d.ts.map +1 -0
  708. package/dist/chrome/runtime/installed.js +61 -0
  709. package/dist/chrome/runtime/installed.js.map +1 -0
  710. package/dist/chrome/runtime/link.d.ts +62 -0
  711. package/dist/chrome/runtime/link.d.ts.map +1 -0
  712. package/dist/chrome/runtime/link.js +154 -0
  713. package/dist/chrome/runtime/link.js.map +1 -0
  714. package/dist/chrome/runtime/message-event.d.ts +44 -0
  715. package/dist/chrome/runtime/message-event.d.ts.map +1 -0
  716. package/dist/chrome/runtime/message-event.js +95 -0
  717. package/dist/chrome/runtime/message-event.js.map +1 -0
  718. package/dist/chrome/runtime/native-host.d.ts +65 -0
  719. package/dist/chrome/runtime/native-host.d.ts.map +1 -0
  720. package/dist/chrome/runtime/native-host.js +165 -0
  721. package/dist/chrome/runtime/native-host.js.map +1 -0
  722. package/dist/chrome/runtime/native-message.d.ts +35 -0
  723. package/dist/chrome/runtime/native-message.d.ts.map +1 -0
  724. package/dist/chrome/runtime/native-message.js +68 -0
  725. package/dist/chrome/runtime/native-message.js.map +1 -0
  726. package/dist/chrome/runtime/port.d.ts +59 -0
  727. package/dist/chrome/runtime/port.d.ts.map +1 -0
  728. package/dist/chrome/runtime/port.js +84 -0
  729. package/dist/chrome/runtime/port.js.map +1 -0
  730. package/dist/chrome/runtime/runtime.d.ts +165 -0
  731. package/dist/chrome/runtime/runtime.d.ts.map +1 -0
  732. package/dist/chrome/runtime/runtime.js +244 -0
  733. package/dist/chrome/runtime/runtime.js.map +1 -0
  734. package/dist/chrome/storage/chrome-storage.d.ts +43 -0
  735. package/dist/chrome/storage/chrome-storage.d.ts.map +1 -0
  736. package/dist/chrome/storage/chrome-storage.js +80 -0
  737. package/dist/chrome/storage/chrome-storage.js.map +1 -0
  738. package/dist/chrome/storage/index.d.ts +7 -0
  739. package/dist/chrome/storage/index.d.ts.map +1 -0
  740. package/dist/chrome/storage/index.js +4 -0
  741. package/dist/chrome/storage/index.js.map +1 -0
  742. package/dist/chrome/storage/storage-area.d.ts +98 -0
  743. package/dist/chrome/storage/storage-area.d.ts.map +1 -0
  744. package/dist/chrome/storage/storage-area.js +251 -0
  745. package/dist/chrome/storage/storage-area.js.map +1 -0
  746. package/dist/chrome/storage/storage-types.d.ts +91 -0
  747. package/dist/chrome/storage/storage-types.d.ts.map +1 -0
  748. package/dist/chrome/storage/storage-types.js +72 -0
  749. package/dist/chrome/storage/storage-types.js.map +1 -0
  750. package/dist/chrome/system/create-chrome-system.d.ts +27 -0
  751. package/dist/chrome/system/create-chrome-system.d.ts.map +1 -0
  752. package/dist/chrome/system/create-chrome-system.js +25 -0
  753. package/dist/chrome/system/create-chrome-system.js.map +1 -0
  754. package/dist/chrome/system/index.d.ts +11 -0
  755. package/dist/chrome/system/index.d.ts.map +1 -0
  756. package/dist/chrome/system/index.js +8 -0
  757. package/dist/chrome/system/index.js.map +1 -0
  758. package/dist/chrome/system/system-backend.d.ts +50 -0
  759. package/dist/chrome/system/system-backend.d.ts.map +1 -0
  760. package/dist/chrome/system/system-backend.js +60 -0
  761. package/dist/chrome/system/system-backend.js.map +1 -0
  762. package/dist/chrome/system/system-cpu.d.ts +29 -0
  763. package/dist/chrome/system/system-cpu.d.ts.map +1 -0
  764. package/dist/chrome/system/system-cpu.js +43 -0
  765. package/dist/chrome/system/system-cpu.js.map +1 -0
  766. package/dist/chrome/system/system-display.d.ts +40 -0
  767. package/dist/chrome/system/system-display.d.ts.map +1 -0
  768. package/dist/chrome/system/system-display.js +81 -0
  769. package/dist/chrome/system/system-display.js.map +1 -0
  770. package/dist/chrome/system/system-memory.d.ts +17 -0
  771. package/dist/chrome/system/system-memory.d.ts.map +1 -0
  772. package/dist/chrome/system/system-memory.js +20 -0
  773. package/dist/chrome/system/system-memory.js.map +1 -0
  774. package/dist/chrome/system/system-storage.d.ts +25 -0
  775. package/dist/chrome/system/system-storage.d.ts.map +1 -0
  776. package/dist/chrome/system/system-storage.js +29 -0
  777. package/dist/chrome/system/system-storage.js.map +1 -0
  778. package/dist/chrome/system/system-types.d.ts +94 -0
  779. package/dist/chrome/system/system-types.d.ts.map +1 -0
  780. package/dist/chrome/system/system-types.js +7 -0
  781. package/dist/chrome/system/system-types.js.map +1 -0
  782. package/dist/chrome/windows/chrome-windows.d.ts +190 -0
  783. package/dist/chrome/windows/chrome-windows.d.ts.map +1 -0
  784. package/dist/chrome/windows/chrome-windows.js +292 -0
  785. package/dist/chrome/windows/chrome-windows.js.map +1 -0
  786. package/dist/chrome/windows/create-chrome-windows.d.ts +11 -0
  787. package/dist/chrome/windows/create-chrome-windows.d.ts.map +1 -0
  788. package/dist/chrome/windows/create-chrome-windows.js +12 -0
  789. package/dist/chrome/windows/create-chrome-windows.js.map +1 -0
  790. package/dist/chrome/windows/index.d.ts +8 -0
  791. package/dist/chrome/windows/index.d.ts.map +1 -0
  792. package/dist/chrome/windows/index.js +5 -0
  793. package/dist/chrome/windows/index.js.map +1 -0
  794. package/dist/chrome/windows/window-schema.d.ts +54 -0
  795. package/dist/chrome/windows/window-schema.d.ts.map +1 -0
  796. package/dist/chrome/windows/window-schema.js +28 -0
  797. package/dist/chrome/windows/window-schema.js.map +1 -0
  798. package/dist/chrome/windows/window-surface.d.ts +23 -0
  799. package/dist/chrome/windows/window-surface.d.ts.map +1 -0
  800. package/dist/chrome/windows/window-surface.js +2 -0
  801. package/dist/chrome/windows/window-surface.js.map +1 -0
  802. package/dist/chrome/windows/window-types.d.ts +68 -0
  803. package/dist/chrome/windows/window-types.d.ts.map +1 -0
  804. package/dist/chrome/windows/window-types.js +21 -0
  805. package/dist/chrome/windows/window-types.js.map +1 -0
  806. package/dist/chrome/windows/windows-surface.d.ts +30 -0
  807. package/dist/chrome/windows/windows-surface.d.ts.map +1 -0
  808. package/dist/chrome/windows/windows-surface.js +105 -0
  809. package/dist/chrome/windows/windows-surface.js.map +1 -0
  810. package/dist/components/convert.d.ts +3 -2
  811. package/dist/components/convert.d.ts.map +1 -1
  812. package/dist/components/convert.js +3 -2
  813. package/dist/components/convert.js.map +1 -1
  814. package/dist/components/generated/bindings.d.ts +1 -0
  815. package/dist/components/generated/bindings.d.ts.map +1 -1
  816. package/dist/components/generated/bindings.js +1 -0
  817. package/dist/components/generated/bindings.js.map +1 -1
  818. package/dist/components/generated/enums.d.ts +3 -0
  819. package/dist/components/generated/enums.d.ts.map +1 -1
  820. package/dist/components/generated/enums.js +1 -0
  821. package/dist/components/generated/enums.js.map +1 -1
  822. package/dist/components/hand-written/items/item-rows.svelte.d.ts +11 -0
  823. package/dist/components/hand-written/items/item-rows.svelte.d.ts.map +1 -1
  824. package/dist/components/hand-written/items/item-rows.svelte.js +29 -0
  825. package/dist/components/hand-written/items/item-rows.svelte.js.map +1 -1
  826. package/dist/components/hand-written/items/items-host.svelte.d.ts.map +1 -1
  827. package/dist/components/hand-written/items/items-host.svelte.js +1 -0
  828. package/dist/components/hand-written/items/items-host.svelte.js.map +1 -1
  829. package/dist/components/hand-written/items/repeater-host.svelte.d.ts.map +1 -1
  830. package/dist/components/hand-written/items/repeater-host.svelte.js +1 -0
  831. package/dist/components/hand-written/items/repeater-host.svelte.js.map +1 -1
  832. package/dist/components/index.d.ts +1 -1
  833. package/dist/components/index.d.ts.map +1 -1
  834. package/dist/components/runtime.svelte.d.ts +1 -0
  835. package/dist/components/runtime.svelte.d.ts.map +1 -1
  836. package/dist/components/runtime.svelte.js +17 -6
  837. package/dist/components/runtime.svelte.js.map +1 -1
  838. package/dist/composition/animate.d.ts +78 -0
  839. package/dist/composition/animate.d.ts.map +1 -0
  840. package/dist/composition/animate.js +184 -0
  841. package/dist/composition/animate.js.map +1 -0
  842. package/dist/composition/expression.d.ts +177 -0
  843. package/dist/composition/expression.d.ts.map +1 -0
  844. package/dist/composition/expression.js +330 -0
  845. package/dist/composition/expression.js.map +1 -0
  846. package/dist/composition/index.d.ts +11 -0
  847. package/dist/composition/index.d.ts.map +1 -0
  848. package/dist/composition/index.js +9 -0
  849. package/dist/composition/index.js.map +1 -0
  850. package/dist/composition/property-set.d.ts +36 -0
  851. package/dist/composition/property-set.d.ts.map +1 -0
  852. package/dist/composition/property-set.js +81 -0
  853. package/dist/composition/property-set.js.map +1 -0
  854. package/dist/composition/spring.d.ts +43 -0
  855. package/dist/composition/spring.d.ts.map +1 -0
  856. package/dist/composition/spring.js +23 -0
  857. package/dist/composition/spring.js.map +1 -0
  858. package/dist/composition/targets.d.ts +48 -0
  859. package/dist/composition/targets.d.ts.map +1 -0
  860. package/dist/composition/targets.js +34 -0
  861. package/dist/composition/targets.js.map +1 -0
  862. package/dist/css/index.d.ts +2 -0
  863. package/dist/css/index.d.ts.map +1 -1
  864. package/dist/css/index.js +2 -0
  865. package/dist/css/index.js.map +1 -1
  866. package/dist/css/parse/box-shadow.d.ts +46 -0
  867. package/dist/css/parse/box-shadow.d.ts.map +1 -0
  868. package/dist/css/parse/box-shadow.js +65 -0
  869. package/dist/css/parse/box-shadow.js.map +1 -0
  870. package/dist/css/parse/filters.d.ts.map +1 -1
  871. package/dist/css/parse/filters.js +1 -1
  872. package/dist/css/parse/filters.js.map +1 -1
  873. package/dist/css/parse/parser.js +1 -1
  874. package/dist/css/parse/parser.js.map +1 -1
  875. package/dist/css/parse/scroll-timeline.d.ts +181 -0
  876. package/dist/css/parse/scroll-timeline.d.ts.map +1 -0
  877. package/dist/css/parse/scroll-timeline.js +278 -0
  878. package/dist/css/parse/scroll-timeline.js.map +1 -0
  879. package/dist/css/runtime/resources.d.ts +2 -0
  880. package/dist/css/runtime/resources.d.ts.map +1 -1
  881. package/dist/css/runtime/resources.js +2 -2
  882. package/dist/css/runtime/resources.js.map +1 -1
  883. package/dist/css/runtime/runtime.d.ts +37 -3
  884. package/dist/css/runtime/runtime.d.ts.map +1 -1
  885. package/dist/css/runtime/runtime.js +27 -13
  886. package/dist/css/runtime/runtime.js.map +1 -1
  887. package/dist/css/runtime/sheet-module.d.ts +3 -1
  888. package/dist/css/runtime/sheet-module.d.ts.map +1 -1
  889. package/dist/css/runtime/sheet-module.js +24 -10
  890. package/dist/css/runtime/sheet-module.js.map +1 -1
  891. package/dist/css/runtime/visual-state-native.d.ts +10 -0
  892. package/dist/css/runtime/visual-state-native.d.ts.map +1 -0
  893. package/dist/css/runtime/visual-state-native.js +112 -0
  894. package/dist/css/runtime/visual-state-native.js.map +1 -0
  895. package/dist/css/runtime/visual-states.d.ts +27 -0
  896. package/dist/css/runtime/visual-states.d.ts.map +1 -0
  897. package/dist/css/runtime/visual-states.js +83 -0
  898. package/dist/css/runtime/visual-states.js.map +1 -0
  899. package/dist/css/scroll-timeline.d.ts +21 -0
  900. package/dist/css/scroll-timeline.d.ts.map +1 -0
  901. package/dist/css/scroll-timeline.js +11 -0
  902. package/dist/css/scroll-timeline.js.map +1 -0
  903. package/dist/css/shadow.d.ts +23 -0
  904. package/dist/css/shadow.d.ts.map +1 -0
  905. package/dist/css/shadow.js +11 -0
  906. package/dist/css/shadow.js.map +1 -0
  907. package/dist/css/translate/animation-properties.d.ts +8 -2
  908. package/dist/css/translate/animation-properties.d.ts.map +1 -1
  909. package/dist/css/translate/animation-properties.js +202 -15
  910. package/dist/css/translate/animation-properties.js.map +1 -1
  911. package/dist/css/translate/build-shorthands.d.ts +3 -2
  912. package/dist/css/translate/build-shorthands.d.ts.map +1 -1
  913. package/dist/css/translate/build-shorthands.js +5 -3
  914. package/dist/css/translate/build-shorthands.js.map +1 -1
  915. package/dist/css/translate/cascade.d.ts.map +1 -1
  916. package/dist/css/translate/cascade.js +4 -1
  917. package/dist/css/translate/cascade.js.map +1 -1
  918. package/dist/css/translate/easing.d.ts +2 -0
  919. package/dist/css/translate/easing.d.ts.map +1 -1
  920. package/dist/css/translate/easing.js +4 -0
  921. package/dist/css/translate/easing.js.map +1 -1
  922. package/dist/css/translate/font-face.d.ts +22 -0
  923. package/dist/css/translate/font-face.d.ts.map +1 -0
  924. package/dist/css/translate/font-face.js +76 -0
  925. package/dist/css/translate/font-face.js.map +1 -0
  926. package/dist/css/translate/handled-members.d.ts +7 -0
  927. package/dist/css/translate/handled-members.d.ts.map +1 -0
  928. package/dist/css/translate/handled-members.js +16 -0
  929. package/dist/css/translate/handled-members.js.map +1 -0
  930. package/dist/css/translate/lazy-groups.d.ts.map +1 -1
  931. package/dist/css/translate/lazy-groups.js +41 -1
  932. package/dist/css/translate/lazy-groups.js.map +1 -1
  933. package/dist/css/translate/linked-tracks.d.ts +13 -0
  934. package/dist/css/translate/linked-tracks.d.ts.map +1 -0
  935. package/dist/css/translate/linked-tracks.js +48 -0
  936. package/dist/css/translate/linked-tracks.js.map +1 -0
  937. package/dist/css/translate/scroll-link.d.ts +106 -0
  938. package/dist/css/translate/scroll-link.d.ts.map +1 -0
  939. package/dist/css/translate/scroll-link.js +222 -0
  940. package/dist/css/translate/scroll-link.js.map +1 -0
  941. package/dist/css/translate/scroll-timeline-properties.d.ts +46 -0
  942. package/dist/css/translate/scroll-timeline-properties.d.ts.map +1 -0
  943. package/dist/css/translate/scroll-timeline-properties.js +167 -0
  944. package/dist/css/translate/scroll-timeline-properties.js.map +1 -0
  945. package/dist/css/translate/shadow-mode.d.ts +24 -0
  946. package/dist/css/translate/shadow-mode.d.ts.map +1 -0
  947. package/dist/css/translate/shadow-mode.js +20 -0
  948. package/dist/css/translate/shadow-mode.js.map +1 -0
  949. package/dist/css/translate/shadow-properties.d.ts +50 -0
  950. package/dist/css/translate/shadow-properties.d.ts.map +1 -0
  951. package/dist/css/translate/shadow-properties.js +155 -0
  952. package/dist/css/translate/shadow-properties.js.map +1 -0
  953. package/dist/css/translate/shorthands.d.ts +4 -2
  954. package/dist/css/translate/shorthands.d.ts.map +1 -1
  955. package/dist/css/translate/shorthands.js +3 -2
  956. package/dist/css/translate/shorthands.js.map +1 -1
  957. package/dist/css/translate/state-properties.d.ts +52 -0
  958. package/dist/css/translate/state-properties.d.ts.map +1 -0
  959. package/dist/css/translate/state-properties.js +115 -0
  960. package/dist/css/translate/state-properties.js.map +1 -0
  961. package/dist/css/translate/surface-properties.d.ts +3 -1
  962. package/dist/css/translate/surface-properties.d.ts.map +1 -1
  963. package/dist/css/translate/surface-properties.js +21 -17
  964. package/dist/css/translate/surface-properties.js.map +1 -1
  965. package/dist/css/translate/translate.d.ts +3 -2
  966. package/dist/css/translate/translate.d.ts.map +1 -1
  967. package/dist/css/translate/translate.js +47 -13
  968. package/dist/css/translate/translate.js.map +1 -1
  969. package/dist/css/translate/type-ramp.d.ts +8 -0
  970. package/dist/css/translate/type-ramp.d.ts.map +1 -0
  971. package/dist/css/translate/type-ramp.js +59 -0
  972. package/dist/css/translate/type-ramp.js.map +1 -0
  973. package/dist/css/translate/types.d.ts +7 -0
  974. package/dist/css/translate/types.d.ts.map +1 -1
  975. package/dist/css/translate/typography-properties.d.ts +52 -0
  976. package/dist/css/translate/typography-properties.d.ts.map +1 -0
  977. package/dist/css/translate/typography-properties.js +430 -0
  978. package/dist/css/translate/typography-properties.js.map +1 -0
  979. package/dist/css/translate/unsupported-properties.d.ts +2 -0
  980. package/dist/css/translate/unsupported-properties.d.ts.map +1 -1
  981. package/dist/css/translate/unsupported-properties.js +7 -1
  982. package/dist/css/translate/unsupported-properties.js.map +1 -1
  983. package/dist/css/translate/view-transition-properties.d.ts +29 -0
  984. package/dist/css/translate/view-transition-properties.d.ts.map +1 -0
  985. package/dist/css/translate/view-transition-properties.js +53 -0
  986. package/dist/css/translate/view-transition-properties.js.map +1 -0
  987. package/dist/css/translate/winui-only-properties.d.ts.map +1 -1
  988. package/dist/css/translate/winui-only-properties.js +16 -1
  989. package/dist/css/translate/winui-only-properties.js.map +1 -1
  990. package/dist/css/typography.d.ts +2 -0
  991. package/dist/css/typography.d.ts.map +1 -0
  992. package/dist/css/typography.js +6 -0
  993. package/dist/css/typography.js.map +1 -0
  994. package/dist/css/validate/vscode-css-data.json +262 -1
  995. package/dist/css/validate/vscode-data.d.ts +5 -0
  996. package/dist/css/validate/vscode-data.d.ts.map +1 -1
  997. package/dist/css/validate/vscode-data.js +37 -0
  998. package/dist/css/validate/vscode-data.js.map +1 -1
  999. package/dist/css/view-transition.d.ts +13 -0
  1000. package/dist/css/view-transition.d.ts.map +1 -0
  1001. package/dist/css/view-transition.js +12 -0
  1002. package/dist/css/view-transition.js.map +1 -0
  1003. package/dist/css/visual-states.d.ts +7 -0
  1004. package/dist/css/visual-states.d.ts.map +1 -0
  1005. package/dist/css/visual-states.js +16 -0
  1006. package/dist/css/visual-states.js.map +1 -0
  1007. package/dist/data-transfer/clipboard.d.ts +8 -0
  1008. package/dist/data-transfer/clipboard.d.ts.map +1 -1
  1009. package/dist/data-transfer/clipboard.js +6 -0
  1010. package/dist/data-transfer/clipboard.js.map +1 -1
  1011. package/dist/data-transfer/data-transfer.d.ts +17 -0
  1012. package/dist/data-transfer/data-transfer.d.ts.map +1 -1
  1013. package/dist/data-transfer/data-transfer.js +17 -1
  1014. package/dist/data-transfer/data-transfer.js.map +1 -1
  1015. package/dist/data-transfer/drag-effects.d.ts +2 -2
  1016. package/dist/data-transfer/package-io.d.ts +20 -1
  1017. package/dist/data-transfer/package-io.d.ts.map +1 -1
  1018. package/dist/data-transfer/package-io.js +26 -1
  1019. package/dist/data-transfer/package-io.js.map +1 -1
  1020. package/dist/data-transfer/winrt-package.d.ts +5 -0
  1021. package/dist/data-transfer/winrt-package.d.ts.map +1 -1
  1022. package/dist/data-transfer/winrt-package.js +52 -1
  1023. package/dist/data-transfer/winrt-package.js.map +1 -1
  1024. package/dist/devices/bindings.d.ts +4 -1
  1025. package/dist/devices/bindings.d.ts.map +1 -1
  1026. package/dist/devices/bindings.js +4 -1
  1027. package/dist/devices/bindings.js.map +1 -1
  1028. package/dist/devices/displays.svelte.d.ts.map +1 -1
  1029. package/dist/devices/displays.svelte.js +2 -1
  1030. package/dist/devices/displays.svelte.js.map +1 -1
  1031. package/dist/devices/live.svelte.d.ts +3 -24
  1032. package/dist/devices/live.svelte.d.ts.map +1 -1
  1033. package/dist/devices/live.svelte.js +2 -40
  1034. package/dist/devices/live.svelte.js.map +1 -1
  1035. package/dist/devices/power.d.ts +5 -3
  1036. package/dist/devices/power.d.ts.map +1 -1
  1037. package/dist/devices/power.js +3 -2
  1038. package/dist/devices/power.js.map +1 -1
  1039. package/dist/devices/power.svelte.d.ts +27 -0
  1040. package/dist/devices/power.svelte.d.ts.map +1 -1
  1041. package/dist/devices/power.svelte.js +40 -0
  1042. package/dist/devices/power.svelte.js.map +1 -1
  1043. package/dist/devices/subscription.d.ts +35 -0
  1044. package/dist/devices/subscription.d.ts.map +1 -0
  1045. package/dist/devices/subscription.js +47 -0
  1046. package/dist/devices/subscription.js.map +1 -0
  1047. package/dist/devices/system-power.d.ts +54 -0
  1048. package/dist/devices/system-power.d.ts.map +1 -0
  1049. package/dist/devices/system-power.js +66 -0
  1050. package/dist/devices/system-power.js.map +1 -0
  1051. package/dist/downloads/chrome-downloads.d.ts +112 -0
  1052. package/dist/downloads/chrome-downloads.d.ts.map +1 -0
  1053. package/dist/downloads/chrome-downloads.js +360 -0
  1054. package/dist/downloads/chrome-downloads.js.map +1 -0
  1055. package/dist/downloads/chrome-event.d.ts +20 -0
  1056. package/dist/downloads/chrome-event.d.ts.map +1 -0
  1057. package/dist/downloads/chrome-event.js +39 -0
  1058. package/dist/downloads/chrome-event.js.map +1 -0
  1059. package/dist/downloads/download-query.d.ts +14 -0
  1060. package/dist/downloads/download-query.d.ts.map +1 -0
  1061. package/dist/downloads/download-query.js +152 -0
  1062. package/dist/downloads/download-query.js.map +1 -0
  1063. package/dist/downloads/download-record.d.ts +148 -0
  1064. package/dist/downloads/download-record.d.ts.map +1 -0
  1065. package/dist/downloads/download-record.js +142 -0
  1066. package/dist/downloads/download-record.js.map +1 -0
  1067. package/dist/downloads/download-target.d.ts +29 -0
  1068. package/dist/downloads/download-target.d.ts.map +1 -0
  1069. package/dist/downloads/download-target.js +68 -0
  1070. package/dist/downloads/download-target.js.map +1 -0
  1071. package/dist/downloads/download-transfer.d.ts +30 -0
  1072. package/dist/downloads/download-transfer.d.ts.map +1 -0
  1073. package/dist/downloads/download-transfer.js +126 -0
  1074. package/dist/downloads/download-transfer.js.map +1 -0
  1075. package/dist/downloads/download-types.d.ts +212 -0
  1076. package/dist/downloads/download-types.d.ts.map +1 -0
  1077. package/dist/downloads/download-types.js +92 -0
  1078. package/dist/downloads/download-types.js.map +1 -0
  1079. package/dist/downloads/fetch-to-file.d.ts +94 -0
  1080. package/dist/downloads/fetch-to-file.d.ts.map +1 -0
  1081. package/dist/downloads/fetch-to-file.js +159 -0
  1082. package/dist/downloads/fetch-to-file.js.map +1 -0
  1083. package/dist/downloads/index.d.ts +10 -0
  1084. package/dist/downloads/index.d.ts.map +1 -0
  1085. package/dist/downloads/index.js +6 -0
  1086. package/dist/downloads/index.js.map +1 -0
  1087. package/dist/downloads/interrupt-reason.d.ts +12 -0
  1088. package/dist/downloads/interrupt-reason.d.ts.map +1 -0
  1089. package/dist/downloads/interrupt-reason.js +57 -0
  1090. package/dist/downloads/interrupt-reason.js.map +1 -0
  1091. package/dist/downloads/taskbar-progress.d.ts +19 -0
  1092. package/dist/downloads/taskbar-progress.d.ts.map +1 -0
  1093. package/dist/downloads/taskbar-progress.js +39 -0
  1094. package/dist/downloads/taskbar-progress.js.map +1 -0
  1095. package/dist/downloads/zone-identifier.d.ts +21 -0
  1096. package/dist/downloads/zone-identifier.d.ts.map +1 -0
  1097. package/dist/downloads/zone-identifier.js +38 -0
  1098. package/dist/downloads/zone-identifier.js.map +1 -0
  1099. package/dist/enums.d.ts +16 -1
  1100. package/dist/enums.d.ts.map +1 -1
  1101. package/dist/enums.js +16 -1
  1102. package/dist/enums.js.map +1 -1
  1103. package/dist/font-files.d.ts +19 -0
  1104. package/dist/font-files.d.ts.map +1 -0
  1105. package/dist/font-files.js +55 -0
  1106. package/dist/font-files.js.map +1 -0
  1107. package/dist/font-registry.d.ts +24 -0
  1108. package/dist/font-registry.d.ts.map +1 -0
  1109. package/dist/font-registry.js +67 -0
  1110. package/dist/font-registry.js.map +1 -0
  1111. package/dist/font-spelling.d.ts +15 -0
  1112. package/dist/font-spelling.d.ts.map +1 -0
  1113. package/dist/font-spelling.js +27 -0
  1114. package/dist/font-spelling.js.map +1 -0
  1115. package/dist/forms/FormField.svelte +2 -1
  1116. package/dist/incremental/incremental-source.svelte.d.ts +71 -0
  1117. package/dist/incremental/incremental-source.svelte.d.ts.map +1 -0
  1118. package/dist/incremental/incremental-source.svelte.js +138 -0
  1119. package/dist/incremental/incremental-source.svelte.js.map +1 -0
  1120. package/dist/incremental/index.d.ts +5 -0
  1121. package/dist/incremental/index.d.ts.map +1 -0
  1122. package/dist/incremental/index.js +3 -0
  1123. package/dist/incremental/index.js.map +1 -0
  1124. package/dist/incremental/state.d.ts +35 -0
  1125. package/dist/incremental/state.d.ts.map +1 -0
  1126. package/dist/incremental/state.js +12 -0
  1127. package/dist/incremental/state.js.map +1 -0
  1128. package/dist/index.d.ts +2 -0
  1129. package/dist/index.d.ts.map +1 -1
  1130. package/dist/index.js +1 -0
  1131. package/dist/index.js.map +1 -1
  1132. package/dist/input/active-element.svelte.d.ts +22 -0
  1133. package/dist/input/active-element.svelte.d.ts.map +1 -0
  1134. package/dist/input/active-element.svelte.js +32 -0
  1135. package/dist/input/active-element.svelte.js.map +1 -0
  1136. package/dist/input/dom-event.d.ts +93 -0
  1137. package/dist/input/dom-event.d.ts.map +1 -0
  1138. package/dist/input/dom-event.js +39 -0
  1139. package/dist/input/dom-event.js.map +1 -0
  1140. package/dist/input/events.d.ts +13 -0
  1141. package/dist/input/events.d.ts.map +1 -0
  1142. package/dist/input/events.js +187 -0
  1143. package/dist/input/events.js.map +1 -0
  1144. package/dist/input/focused-element.d.ts +18 -0
  1145. package/dist/input/focused-element.d.ts.map +1 -0
  1146. package/dist/input/focused-element.js +32 -0
  1147. package/dist/input/focused-element.js.map +1 -0
  1148. package/dist/input/index.d.ts +13 -0
  1149. package/dist/input/index.d.ts.map +1 -0
  1150. package/dist/input/index.js +7 -0
  1151. package/dist/input/index.js.map +1 -0
  1152. package/dist/input/key-names.d.ts +18 -0
  1153. package/dist/input/key-names.d.ts.map +1 -0
  1154. package/dist/input/key-names.js +182 -0
  1155. package/dist/input/key-names.js.map +1 -0
  1156. package/dist/input/keyboard-fields.d.ts +38 -0
  1157. package/dist/input/keyboard-fields.d.ts.map +1 -0
  1158. package/dist/input/keyboard-fields.js +43 -0
  1159. package/dist/input/keyboard-fields.js.map +1 -0
  1160. package/dist/input/move-focus.d.ts +19 -0
  1161. package/dist/input/move-focus.d.ts.map +1 -0
  1162. package/dist/input/move-focus.js +29 -0
  1163. package/dist/input/move-focus.js.map +1 -0
  1164. package/dist/input/pointer-capture.d.ts +47 -0
  1165. package/dist/input/pointer-capture.d.ts.map +1 -0
  1166. package/dist/input/pointer-capture.js +59 -0
  1167. package/dist/input/pointer-capture.js.map +1 -0
  1168. package/dist/input/pointer-fields.d.ts +118 -0
  1169. package/dist/input/pointer-fields.d.ts.map +1 -0
  1170. package/dist/input/pointer-fields.js +141 -0
  1171. package/dist/input/pointer-fields.js.map +1 -0
  1172. package/dist/input/pointer-routes.d.ts +13 -0
  1173. package/dist/input/pointer-routes.d.ts.map +1 -0
  1174. package/dist/input/pointer-routes.js +13 -0
  1175. package/dist/input/pointer-routes.js.map +1 -0
  1176. package/dist/input/trap-focus.d.ts +18 -0
  1177. package/dist/input/trap-focus.d.ts.map +1 -0
  1178. package/dist/input/trap-focus.js +45 -0
  1179. package/dist/input/trap-focus.js.map +1 -0
  1180. package/dist/key-code.d.ts +131 -0
  1181. package/dist/key-code.d.ts.map +1 -0
  1182. package/dist/key-code.js +134 -0
  1183. package/dist/key-code.js.map +1 -0
  1184. package/dist/media/index.d.ts +1 -0
  1185. package/dist/media/index.d.ts.map +1 -1
  1186. package/dist/media/index.js.map +1 -1
  1187. package/dist/messaging/page.d.ts +25 -0
  1188. package/dist/messaging/page.d.ts.map +1 -0
  1189. package/dist/messaging/page.js +43 -0
  1190. package/dist/messaging/page.js.map +1 -0
  1191. package/dist/messaging/web-view2/cookies.d.ts +53 -0
  1192. package/dist/messaging/web-view2/cookies.d.ts.map +1 -0
  1193. package/dist/messaging/web-view2/cookies.js +54 -0
  1194. package/dist/messaging/web-view2/cookies.js.map +1 -0
  1195. package/dist/messaging/web-view2/core.d.ts +101 -0
  1196. package/dist/messaging/web-view2/core.d.ts.map +1 -0
  1197. package/dist/messaging/web-view2/core.js +37 -0
  1198. package/dist/messaging/web-view2/core.js.map +1 -0
  1199. package/dist/messaging/web-view2/index.d.ts +9 -0
  1200. package/dist/messaging/web-view2/index.d.ts.map +1 -0
  1201. package/dist/messaging/web-view2/index.js +7 -0
  1202. package/dist/messaging/web-view2/index.js.map +1 -0
  1203. package/dist/messaging/web-view2/policy.d.ts +64 -0
  1204. package/dist/messaging/web-view2/policy.d.ts.map +1 -0
  1205. package/dist/messaging/web-view2/policy.js +96 -0
  1206. package/dist/messaging/web-view2/policy.js.map +1 -0
  1207. package/dist/messaging/web-view2/transport.d.ts +34 -0
  1208. package/dist/messaging/web-view2/transport.d.ts.map +1 -0
  1209. package/dist/messaging/web-view2/transport.js +109 -0
  1210. package/dist/messaging/web-view2/transport.js.map +1 -0
  1211. package/dist/notice/index.d.ts +4 -0
  1212. package/dist/notice/index.d.ts.map +1 -0
  1213. package/dist/notice/index.js +2 -0
  1214. package/dist/notice/index.js.map +1 -0
  1215. package/dist/notice/native.d.ts +18 -0
  1216. package/dist/notice/native.d.ts.map +1 -0
  1217. package/dist/notice/native.js +32 -0
  1218. package/dist/notice/native.js.map +1 -0
  1219. package/dist/notice/notice.d.ts +70 -0
  1220. package/dist/notice/notice.d.ts.map +1 -0
  1221. package/dist/notice/notice.js +95 -0
  1222. package/dist/notice/notice.js.map +1 -0
  1223. package/dist/picture-source.d.ts +25 -0
  1224. package/dist/picture-source.d.ts.map +1 -0
  1225. package/dist/picture-source.js +2 -0
  1226. package/dist/picture-source.js.map +1 -0
  1227. package/dist/renderer/host/connected-configuration.d.ts +23 -0
  1228. package/dist/renderer/host/connected-configuration.d.ts.map +1 -0
  1229. package/dist/renderer/host/connected-configuration.js +36 -0
  1230. package/dist/renderer/host/connected-configuration.js.map +1 -0
  1231. package/dist/renderer/host/control.d.ts +8 -0
  1232. package/dist/renderer/host/control.d.ts.map +1 -1
  1233. package/dist/renderer/host/control.js +7 -2
  1234. package/dist/renderer/host/control.js.map +1 -1
  1235. package/dist/renderer/host/element-animation.d.ts.map +1 -1
  1236. package/dist/renderer/host/element-animation.js +2 -15
  1237. package/dist/renderer/host/element-animation.js.map +1 -1
  1238. package/dist/renderer/host/glide-height.d.ts +27 -0
  1239. package/dist/renderer/host/glide-height.d.ts.map +1 -0
  1240. package/dist/renderer/host/glide-height.js +106 -0
  1241. package/dist/renderer/host/glide-height.js.map +1 -0
  1242. package/dist/renderer/host/host.d.ts.map +1 -1
  1243. package/dist/renderer/host/host.js +11 -14
  1244. package/dist/renderer/host/host.js.map +1 -1
  1245. package/dist/renderer/host/implicit-layout-animation.d.ts +50 -0
  1246. package/dist/renderer/host/implicit-layout-animation.d.ts.map +1 -0
  1247. package/dist/renderer/host/implicit-layout-animation.js +121 -0
  1248. package/dist/renderer/host/implicit-layout-animation.js.map +1 -0
  1249. package/dist/renderer/host/motion-preference.d.ts +19 -0
  1250. package/dist/renderer/host/motion-preference.d.ts.map +1 -0
  1251. package/dist/renderer/host/motion-preference.js +26 -0
  1252. package/dist/renderer/host/motion-preference.js.map +1 -0
  1253. package/dist/renderer/host/values.d.ts +1 -1
  1254. package/dist/renderer/host/view-transition-names.d.ts +13 -0
  1255. package/dist/renderer/host/view-transition-names.d.ts.map +1 -0
  1256. package/dist/renderer/host/view-transition-names.js +25 -0
  1257. package/dist/renderer/host/view-transition-names.js.map +1 -0
  1258. package/dist/settings/SettingsCard.d.svelte.ts +12 -0
  1259. package/dist/settings/SettingsCard.svelte +80 -0
  1260. package/dist/settings/SettingsExpander.d.svelte.ts +12 -0
  1261. package/dist/settings/SettingsExpander.svelte +46 -0
  1262. package/dist/settings/SettingsRow.svelte +79 -0
  1263. package/dist/settings/index.d.ts +5 -0
  1264. package/dist/settings/index.d.ts.map +1 -0
  1265. package/dist/settings/index.js +7 -0
  1266. package/dist/settings/index.js.map +1 -0
  1267. package/dist/settings/settings-context.d.ts +7 -0
  1268. package/dist/settings/settings-context.d.ts.map +1 -0
  1269. package/dist/settings/settings-context.js +11 -0
  1270. package/dist/settings/settings-context.js.map +1 -0
  1271. package/dist/settings/settings-props.d.ts +40 -0
  1272. package/dist/settings/settings-props.d.ts.map +1 -0
  1273. package/dist/settings/settings-props.js +3 -0
  1274. package/dist/settings/settings-props.js.map +1 -0
  1275. package/dist/store/bindings.d.ts +7 -0
  1276. package/dist/store/bindings.d.ts.map +1 -0
  1277. package/dist/store/bindings.js +10 -0
  1278. package/dist/store/bindings.js.map +1 -0
  1279. package/dist/store/identity.d.ts +24 -0
  1280. package/dist/store/identity.d.ts.map +1 -0
  1281. package/dist/store/identity.js +27 -0
  1282. package/dist/store/identity.js.map +1 -0
  1283. package/dist/store/index.d.ts +10 -0
  1284. package/dist/store/index.d.ts.map +1 -0
  1285. package/dist/store/index.js +8 -0
  1286. package/dist/store/index.js.map +1 -0
  1287. package/dist/store/license.d.ts +63 -0
  1288. package/dist/store/license.d.ts.map +1 -0
  1289. package/dist/store/license.js +95 -0
  1290. package/dist/store/license.js.map +1 -0
  1291. package/dist/store/packages.d.ts +45 -0
  1292. package/dist/store/packages.d.ts.map +1 -0
  1293. package/dist/store/packages.js +80 -0
  1294. package/dist/store/packages.js.map +1 -0
  1295. package/dist/store/reply.d.ts +26 -0
  1296. package/dist/store/reply.d.ts.map +1 -0
  1297. package/dist/store/reply.js +15 -0
  1298. package/dist/store/reply.js.map +1 -0
  1299. package/dist/store/startup.d.ts +23 -0
  1300. package/dist/store/startup.d.ts.map +1 -0
  1301. package/dist/store/startup.js +18 -0
  1302. package/dist/store/startup.js.map +1 -0
  1303. package/dist/store/states.d.ts +50 -0
  1304. package/dist/store/states.d.ts.map +1 -0
  1305. package/dist/store/states.js +56 -0
  1306. package/dist/store/states.js.map +1 -0
  1307. package/dist/store/types.d.ts +102 -0
  1308. package/dist/store/types.d.ts.map +1 -0
  1309. package/dist/store/types.js +2 -0
  1310. package/dist/store/types.js.map +1 -0
  1311. package/dist/store/updates.d.ts +23 -0
  1312. package/dist/store/updates.d.ts.map +1 -0
  1313. package/dist/store/updates.js +18 -0
  1314. package/dist/store/updates.js.map +1 -0
  1315. package/dist/store/window-interop.d.ts +10 -0
  1316. package/dist/store/window-interop.d.ts.map +1 -0
  1317. package/dist/store/window-interop.js +35 -0
  1318. package/dist/store/window-interop.js.map +1 -0
  1319. package/dist/store/windows-backend.d.ts +23 -0
  1320. package/dist/store/windows-backend.d.ts.map +1 -0
  1321. package/dist/store/windows-backend.js +26 -0
  1322. package/dist/store/windows-backend.js.map +1 -0
  1323. package/dist/store/windows-identity.d.ts +22 -0
  1324. package/dist/store/windows-identity.d.ts.map +1 -0
  1325. package/dist/store/windows-identity.js +51 -0
  1326. package/dist/store/windows-identity.js.map +1 -0
  1327. package/dist/store/windows-packages.d.ts +26 -0
  1328. package/dist/store/windows-packages.d.ts.map +1 -0
  1329. package/dist/store/windows-packages.js +70 -0
  1330. package/dist/store/windows-packages.js.map +1 -0
  1331. package/dist/store/windows-store.d.ts +47 -0
  1332. package/dist/store/windows-store.d.ts.map +1 -0
  1333. package/dist/store/windows-store.js +107 -0
  1334. package/dist/store/windows-store.js.map +1 -0
  1335. package/dist/tray/TrayIcon.d.svelte.ts +14 -2
  1336. package/dist/tray/TrayIcon.svelte +65 -18
  1337. package/dist/tray/TrayMenuFlyout.d.svelte.ts +6 -0
  1338. package/dist/tray/TrayMenuFlyout.svelte +108 -0
  1339. package/dist/tray/balloons.d.ts +7 -0
  1340. package/dist/tray/balloons.d.ts.map +1 -0
  1341. package/dist/tray/balloons.js +53 -0
  1342. package/dist/tray/balloons.js.map +1 -0
  1343. package/dist/tray/bounds.d.ts +7 -0
  1344. package/dist/tray/bounds.d.ts.map +1 -0
  1345. package/dist/tray/bounds.js +15 -0
  1346. package/dist/tray/bounds.js.map +1 -0
  1347. package/dist/tray/exit-hook.d.ts +3 -0
  1348. package/dist/tray/exit-hook.d.ts.map +1 -0
  1349. package/dist/tray/exit-hook.js +11 -0
  1350. package/dist/tray/exit-hook.js.map +1 -0
  1351. package/dist/tray/flyout-model.d.ts +43 -0
  1352. package/dist/tray/flyout-model.d.ts.map +1 -0
  1353. package/dist/tray/flyout-model.js +55 -0
  1354. package/dist/tray/flyout-model.js.map +1 -0
  1355. package/dist/tray/flyout-picker.d.ts +24 -0
  1356. package/dist/tray/flyout-picker.d.ts.map +1 -0
  1357. package/dist/tray/flyout-picker.js +46 -0
  1358. package/dist/tray/flyout-picker.js.map +1 -0
  1359. package/dist/tray/index.d.ts +3 -0
  1360. package/dist/tray/index.d.ts.map +1 -1
  1361. package/dist/tray/index.js +1 -0
  1362. package/dist/tray/index.js.map +1 -1
  1363. package/dist/tray/menu/default-profile.d.ts +12 -0
  1364. package/dist/tray/menu/default-profile.d.ts.map +1 -0
  1365. package/dist/tray/menu/default-profile.js +17 -0
  1366. package/dist/tray/menu/default-profile.js.map +1 -0
  1367. package/dist/tray/menu/define.d.ts +10 -0
  1368. package/dist/tray/menu/define.d.ts.map +1 -0
  1369. package/dist/tray/menu/define.js +11 -0
  1370. package/dist/tray/menu/define.js.map +1 -0
  1371. package/dist/tray/menu/describe.d.ts +12 -0
  1372. package/dist/tray/menu/describe.d.ts.map +1 -0
  1373. package/dist/tray/menu/describe.js +31 -0
  1374. package/dist/tray/menu/describe.js.map +1 -0
  1375. package/dist/tray/menu/expand.d.ts +20 -0
  1376. package/dist/tray/menu/expand.d.ts.map +1 -0
  1377. package/dist/tray/menu/expand.js +56 -0
  1378. package/dist/tray/menu/expand.js.map +1 -0
  1379. package/dist/tray/menu/index.d.ts +10 -0
  1380. package/dist/tray/menu/index.d.ts.map +1 -0
  1381. package/dist/tray/menu/index.js +9 -0
  1382. package/dist/tray/menu/index.js.map +1 -0
  1383. package/dist/tray/menu/profile-file.d.ts +22 -0
  1384. package/dist/tray/menu/profile-file.d.ts.map +1 -0
  1385. package/dist/tray/menu/profile-file.js +35 -0
  1386. package/dist/tray/menu/profile-file.js.map +1 -0
  1387. package/dist/tray/menu/profile.d.ts +29 -0
  1388. package/dist/tray/menu/profile.d.ts.map +1 -0
  1389. package/dist/tray/menu/profile.js +32 -0
  1390. package/dist/tray/menu/profile.js.map +1 -0
  1391. package/dist/tray/menu/resolve-lite.d.ts +44 -0
  1392. package/dist/tray/menu/resolve-lite.d.ts.map +1 -0
  1393. package/dist/tray/menu/resolve-lite.js +169 -0
  1394. package/dist/tray/menu/resolve-lite.js.map +1 -0
  1395. package/dist/tray/menu/resolve.d.ts +21 -0
  1396. package/dist/tray/menu/resolve.d.ts.map +1 -0
  1397. package/dist/tray/menu/resolve.js +56 -0
  1398. package/dist/tray/menu/resolve.js.map +1 -0
  1399. package/dist/tray/menu/types.d.ts +208 -0
  1400. package/dist/tray/menu/types.d.ts.map +1 -0
  1401. package/dist/tray/menu/types.js +19 -0
  1402. package/dist/tray/menu/types.js.map +1 -0
  1403. package/dist/tray/menu/values.d.ts +14 -0
  1404. package/dist/tray/menu/values.d.ts.map +1 -0
  1405. package/dist/tray/menu/values.js +15 -0
  1406. package/dist/tray/menu/values.js.map +1 -0
  1407. package/dist/tray/menu-svelte/TrayMenu.d.svelte.ts +6 -0
  1408. package/dist/tray/menu-svelte/TrayMenu.svelte +20 -0
  1409. package/dist/tray/menu-svelte/TrayMenuEditor.d.svelte.ts +17 -0
  1410. package/dist/tray/menu-svelte/TrayMenuEditor.svelte +322 -0
  1411. package/dist/tray/menu-svelte/TrayMenuHeader.d.svelte.ts +6 -0
  1412. package/dist/tray/menu-svelte/TrayMenuHeader.svelte +9 -0
  1413. package/dist/tray/menu-svelte/TrayMenuItem.d.svelte.ts +6 -0
  1414. package/dist/tray/menu-svelte/TrayMenuItem.svelte +10 -0
  1415. package/dist/tray/menu-svelte/TrayMenuSeparator.d.svelte.ts +6 -0
  1416. package/dist/tray/menu-svelte/TrayMenuSeparator.svelte +9 -0
  1417. package/dist/tray/menu-svelte/TrayMenuSubmenu.d.svelte.ts +6 -0
  1418. package/dist/tray/menu-svelte/TrayMenuSubmenu.svelte +11 -0
  1419. package/dist/tray/menu-svelte/collect.d.ts +22 -0
  1420. package/dist/tray/menu-svelte/collect.d.ts.map +1 -0
  1421. package/dist/tray/menu-svelte/collect.js +53 -0
  1422. package/dist/tray/menu-svelte/collect.js.map +1 -0
  1423. package/dist/tray/menu-svelte/edit-profile.d.ts +100 -0
  1424. package/dist/tray/menu-svelte/edit-profile.d.ts.map +1 -0
  1425. package/dist/tray/menu-svelte/edit-profile.js +200 -0
  1426. package/dist/tray/menu-svelte/edit-profile.js.map +1 -0
  1427. package/dist/tray/menu-svelte/editor-labels.d.ts +33 -0
  1428. package/dist/tray/menu-svelte/editor-labels.d.ts.map +1 -0
  1429. package/dist/tray/menu-svelte/editor-labels.js +30 -0
  1430. package/dist/tray/menu-svelte/editor-labels.js.map +1 -0
  1431. package/dist/tray/menu-svelte/editor-props.d.ts +22 -0
  1432. package/dist/tray/menu-svelte/editor-props.d.ts.map +1 -0
  1433. package/dist/tray/menu-svelte/editor-props.js +2 -0
  1434. package/dist/tray/menu-svelte/editor-props.js.map +1 -0
  1435. package/dist/tray/menu-svelte/index.d.ts +12 -0
  1436. package/dist/tray/menu-svelte/index.d.ts.map +1 -0
  1437. package/dist/tray/menu-svelte/index.js +9 -0
  1438. package/dist/tray/menu-svelte/index.js.map +1 -0
  1439. package/dist/tray/menu-svelte/menu-node.d.ts +125 -0
  1440. package/dist/tray/menu-svelte/menu-node.d.ts.map +1 -0
  1441. package/dist/tray/menu-svelte/menu-node.js +82 -0
  1442. package/dist/tray/menu-svelte/menu-node.js.map +1 -0
  1443. package/dist/tray/menu-svelte/menu-props.d.ts +35 -0
  1444. package/dist/tray/menu-svelte/menu-props.d.ts.map +1 -0
  1445. package/dist/tray/menu-svelte/menu-props.js +2 -0
  1446. package/dist/tray/menu-svelte/menu-props.js.map +1 -0
  1447. package/dist/tray/menu-svelte/menu-source.d.ts +36 -0
  1448. package/dist/tray/menu-svelte/menu-source.d.ts.map +1 -0
  1449. package/dist/tray/menu-svelte/menu-source.js +54 -0
  1450. package/dist/tray/menu-svelte/menu-source.js.map +1 -0
  1451. package/dist/tray/menu-svelte/preview-lines.d.ts +20 -0
  1452. package/dist/tray/menu-svelte/preview-lines.d.ts.map +1 -0
  1453. package/dist/tray/menu-svelte/preview-lines.js +40 -0
  1454. package/dist/tray/menu-svelte/preview-lines.js.map +1 -0
  1455. package/dist/tray/native.d.ts +30 -7
  1456. package/dist/tray/native.d.ts.map +1 -1
  1457. package/dist/tray/native.js +104 -249
  1458. package/dist/tray/native.js.map +1 -1
  1459. package/dist/tray/standalone/define-tray.d.ts +26 -0
  1460. package/dist/tray/standalone/define-tray.d.ts.map +1 -0
  1461. package/dist/tray/standalone/define-tray.js +15 -0
  1462. package/dist/tray/standalone/define-tray.js.map +1 -0
  1463. package/dist/tray/standalone/index.d.ts +20 -0
  1464. package/dist/tray/standalone/index.d.ts.map +1 -0
  1465. package/dist/tray/standalone/index.js +11 -0
  1466. package/dist/tray/standalone/index.js.map +1 -0
  1467. package/dist/tray/standalone/native.d.ts +56 -0
  1468. package/dist/tray/standalone/native.d.ts.map +1 -0
  1469. package/dist/tray/standalone/native.js +164 -0
  1470. package/dist/tray/standalone/native.js.map +1 -0
  1471. package/dist/tray/standalone/standalone-tray.d.ts +68 -0
  1472. package/dist/tray/standalone/standalone-tray.d.ts.map +1 -0
  1473. package/dist/tray/standalone/standalone-tray.js +77 -0
  1474. package/dist/tray/standalone/standalone-tray.js.map +1 -0
  1475. package/dist/tray/themed-icon.d.ts +7 -0
  1476. package/dist/tray/themed-icon.d.ts.map +1 -0
  1477. package/dist/tray/themed-icon.js +39 -0
  1478. package/dist/tray/themed-icon.js.map +1 -0
  1479. package/dist/tray/tray-core.d.ts +11 -10
  1480. package/dist/tray/tray-core.d.ts.map +1 -1
  1481. package/dist/tray/tray-core.js +20 -31
  1482. package/dist/tray/tray-core.js.map +1 -1
  1483. package/dist/tray/tray-extras.d.ts +61 -0
  1484. package/dist/tray/tray-extras.d.ts.map +1 -0
  1485. package/dist/tray/tray-extras.js +2 -0
  1486. package/dist/tray/tray-extras.js.map +1 -0
  1487. package/dist/tray/tray-icon-props.d.ts +18 -5
  1488. package/dist/tray/tray-icon-props.d.ts.map +1 -1
  1489. package/dist/tray/tray-icon.d.ts +4 -2
  1490. package/dist/tray/tray-icon.d.ts.map +1 -1
  1491. package/dist/tray/tray-icon.js +15 -8
  1492. package/dist/tray/tray-icon.js.map +1 -1
  1493. package/dist/tray/tray-manifest.d.ts +18 -0
  1494. package/dist/tray/tray-manifest.d.ts.map +1 -0
  1495. package/dist/tray/tray-manifest.js +22 -0
  1496. package/dist/tray/tray-manifest.js.map +1 -0
  1497. package/dist/tray/tray-menu-flyout-props.d.ts +15 -0
  1498. package/dist/tray/tray-menu-flyout-props.d.ts.map +1 -0
  1499. package/dist/tray/tray-menu-flyout-props.js +2 -0
  1500. package/dist/tray/tray-menu-flyout-props.js.map +1 -0
  1501. package/dist/tray/tray-menu.d.ts +2 -2
  1502. package/dist/tray/tray-menu.d.ts.map +1 -1
  1503. package/dist/vite/build.d.ts +5 -1
  1504. package/dist/vite/build.d.ts.map +1 -1
  1505. package/dist/vite/build.js +26 -5
  1506. package/dist/vite/build.js.map +1 -1
  1507. package/dist/vite/entrypoints/build-tray.d.ts +27 -0
  1508. package/dist/vite/entrypoints/build-tray.d.ts.map +1 -0
  1509. package/dist/vite/entrypoints/build-tray.js +66 -0
  1510. package/dist/vite/entrypoints/build-tray.js.map +1 -0
  1511. package/dist/vite/entrypoints/discover.d.ts +30 -0
  1512. package/dist/vite/entrypoints/discover.d.ts.map +1 -0
  1513. package/dist/vite/entrypoints/discover.js +61 -0
  1514. package/dist/vite/entrypoints/discover.js.map +1 -0
  1515. package/dist/vite/entrypoints/extract-tray.d.ts +14 -0
  1516. package/dist/vite/entrypoints/extract-tray.d.ts.map +1 -0
  1517. package/dist/vite/entrypoints/extract-tray.js +83 -0
  1518. package/dist/vite/entrypoints/extract-tray.js.map +1 -0
  1519. package/dist/vite/entrypoints/lower-menu-markup.d.ts +40 -0
  1520. package/dist/vite/entrypoints/lower-menu-markup.d.ts.map +1 -0
  1521. package/dist/vite/entrypoints/lower-menu-markup.js +339 -0
  1522. package/dist/vite/entrypoints/lower-menu-markup.js.map +1 -0
  1523. package/dist/vite/entrypoints/lower-tray-svelte.d.ts +14 -0
  1524. package/dist/vite/entrypoints/lower-tray-svelte.d.ts.map +1 -0
  1525. package/dist/vite/entrypoints/lower-tray-svelte.js +259 -0
  1526. package/dist/vite/entrypoints/lower-tray-svelte.js.map +1 -0
  1527. package/dist/vite/entrypoints/node-span.d.ts +13 -0
  1528. package/dist/vite/entrypoints/node-span.d.ts.map +1 -0
  1529. package/dist/vite/entrypoints/node-span.js +32 -0
  1530. package/dist/vite/entrypoints/node-span.js.map +1 -0
  1531. package/dist/vite/entrypoints/tray-dev-plugin.d.ts +9 -0
  1532. package/dist/vite/entrypoints/tray-dev-plugin.d.ts.map +1 -0
  1533. package/dist/vite/entrypoints/tray-dev-plugin.js +102 -0
  1534. package/dist/vite/entrypoints/tray-dev-plugin.js.map +1 -0
  1535. package/dist/vite/entrypoints/tray-module.d.ts +22 -0
  1536. package/dist/vite/entrypoints/tray-module.d.ts.map +1 -0
  1537. package/dist/vite/entrypoints/tray-module.js +54 -0
  1538. package/dist/vite/entrypoints/tray-module.js.map +1 -0
  1539. package/dist/vite/entrypoints/tray-process.d.ts +39 -0
  1540. package/dist/vite/entrypoints/tray-process.d.ts.map +1 -0
  1541. package/dist/vite/entrypoints/tray-process.js +59 -0
  1542. package/dist/vite/entrypoints/tray-process.js.map +1 -0
  1543. package/dist/vite/entrypoints/tray-source.d.ts +11 -0
  1544. package/dist/vite/entrypoints/tray-source.d.ts.map +1 -0
  1545. package/dist/vite/entrypoints/tray-source.js +20 -0
  1546. package/dist/vite/entrypoints/tray-source.js.map +1 -0
  1547. package/dist/vite/entrypoints/tray-svelte-error.d.ts +14 -0
  1548. package/dist/vite/entrypoints/tray-svelte-error.d.ts.map +1 -0
  1549. package/dist/vite/entrypoints/tray-svelte-error.js +22 -0
  1550. package/dist/vite/entrypoints/tray-svelte-error.js.map +1 -0
  1551. package/dist/vite/externals.d.ts +7 -0
  1552. package/dist/vite/externals.d.ts.map +1 -0
  1553. package/dist/vite/externals.js +18 -0
  1554. package/dist/vite/externals.js.map +1 -0
  1555. package/dist/vite/plugin.d.ts.map +1 -1
  1556. package/dist/vite/plugin.js +3 -12
  1557. package/dist/vite/plugin.js.map +1 -1
  1558. package/dist/web-apis/animations.d.ts +2 -5
  1559. package/dist/web-apis/animations.d.ts.map +1 -1
  1560. package/dist/web-apis/animations.js +1 -20
  1561. package/dist/web-apis/animations.js.map +1 -1
  1562. package/dist/web-apis/atomic-file.d.ts +19 -0
  1563. package/dist/web-apis/atomic-file.d.ts.map +1 -0
  1564. package/dist/web-apis/atomic-file.js +28 -0
  1565. package/dist/web-apis/atomic-file.js.map +1 -0
  1566. package/dist/web-apis/badge-glyph.d.ts +19 -0
  1567. package/dist/web-apis/badge-glyph.d.ts.map +1 -0
  1568. package/dist/web-apis/badge-glyph.js +17 -0
  1569. package/dist/web-apis/badge-glyph.js.map +1 -0
  1570. package/dist/web-apis/badging.d.ts +8 -18
  1571. package/dist/web-apis/badging.d.ts.map +1 -1
  1572. package/dist/web-apis/badging.js +25 -17
  1573. package/dist/web-apis/badging.js.map +1 -1
  1574. package/dist/web-apis/clipboard.d.ts.map +1 -1
  1575. package/dist/web-apis/clipboard.js +48 -17
  1576. package/dist/web-apis/clipboard.js.map +1 -1
  1577. package/dist/web-apis/contacts.d.ts +1 -1
  1578. package/dist/web-apis/dialog-types.d.ts +81 -0
  1579. package/dist/web-apis/dialog-types.d.ts.map +1 -0
  1580. package/dist/web-apis/dialog-types.js +14 -0
  1581. package/dist/web-apis/dialog-types.js.map +1 -0
  1582. package/dist/web-apis/dialogs-windows.d.ts +25 -0
  1583. package/dist/web-apis/dialogs-windows.d.ts.map +1 -0
  1584. package/dist/web-apis/dialogs-windows.js +114 -0
  1585. package/dist/web-apis/dialogs-windows.js.map +1 -0
  1586. package/dist/web-apis/dialogs.d.ts +76 -0
  1587. package/dist/web-apis/dialogs.d.ts.map +1 -0
  1588. package/dist/web-apis/dialogs.js +250 -0
  1589. package/dist/web-apis/dialogs.js.map +1 -0
  1590. package/dist/web-apis/fonts.d.ts +113 -0
  1591. package/dist/web-apis/fonts.d.ts.map +1 -0
  1592. package/dist/web-apis/fonts.js +237 -0
  1593. package/dist/web-apis/fonts.js.map +1 -0
  1594. package/dist/web-apis/geolocation.d.ts +1 -1
  1595. package/dist/web-apis/geolocation.d.ts.map +1 -1
  1596. package/dist/web-apis/geolocation.js +14 -8
  1597. package/dist/web-apis/geolocation.js.map +1 -1
  1598. package/dist/web-apis/idle.d.ts +1 -1
  1599. package/dist/web-apis/image-codec-windows.d.ts +24 -0
  1600. package/dist/web-apis/image-codec-windows.d.ts.map +1 -0
  1601. package/dist/web-apis/image-codec-windows.js +107 -0
  1602. package/dist/web-apis/image-codec-windows.js.map +1 -0
  1603. package/dist/web-apis/image-pixels.d.ts +27 -0
  1604. package/dist/web-apis/image-pixels.d.ts.map +1 -0
  1605. package/dist/web-apis/image-pixels.js +152 -0
  1606. package/dist/web-apis/image-pixels.js.map +1 -0
  1607. package/dist/web-apis/image-types.d.ts +64 -0
  1608. package/dist/web-apis/image-types.d.ts.map +1 -0
  1609. package/dist/web-apis/image-types.js +23 -0
  1610. package/dist/web-apis/image-types.js.map +1 -0
  1611. package/dist/web-apis/images.d.ts +199 -0
  1612. package/dist/web-apis/images.d.ts.map +1 -0
  1613. package/dist/web-apis/images.js +476 -0
  1614. package/dist/web-apis/images.js.map +1 -0
  1615. package/dist/web-apis/keyframe-input.d.ts +15 -0
  1616. package/dist/web-apis/keyframe-input.d.ts.map +1 -0
  1617. package/dist/web-apis/keyframe-input.js +30 -0
  1618. package/dist/web-apis/keyframe-input.js.map +1 -0
  1619. package/dist/web-apis/media-access.d.ts +1 -1
  1620. package/dist/web-apis/notification.d.ts +54 -6
  1621. package/dist/web-apis/notification.d.ts.map +1 -1
  1622. package/dist/web-apis/notification.js +98 -4
  1623. package/dist/web-apis/notification.js.map +1 -1
  1624. package/dist/web-apis/page.d.ts +19 -3
  1625. package/dist/web-apis/page.d.ts.map +1 -1
  1626. package/dist/web-apis/page.js +54 -8
  1627. package/dist/web-apis/page.js.map +1 -1
  1628. package/dist/web-apis/permissions.d.ts +17 -0
  1629. package/dist/web-apis/permissions.d.ts.map +1 -1
  1630. package/dist/web-apis/permissions.js +25 -0
  1631. package/dist/web-apis/permissions.js.map +1 -1
  1632. package/dist/web-apis/png-writer.d.ts +9 -0
  1633. package/dist/web-apis/png-writer.d.ts.map +1 -0
  1634. package/dist/web-apis/png-writer.js +58 -0
  1635. package/dist/web-apis/png-writer.js.map +1 -0
  1636. package/dist/web-apis/push.d.ts +1 -1
  1637. package/dist/web-apis/scroll-timeline.d.ts +127 -0
  1638. package/dist/web-apis/scroll-timeline.d.ts.map +1 -0
  1639. package/dist/web-apis/scroll-timeline.js +415 -0
  1640. package/dist/web-apis/scroll-timeline.js.map +1 -0
  1641. package/dist/web-apis/view-transitions.d.ts +80 -0
  1642. package/dist/web-apis/view-transitions.d.ts.map +1 -0
  1643. package/dist/web-apis/view-transitions.js +299 -0
  1644. package/dist/web-apis/view-transitions.js.map +1 -0
  1645. package/dist/web-apis/web-storage.d.ts +1 -18
  1646. package/dist/web-apis/web-storage.d.ts.map +1 -1
  1647. package/dist/web-apis/web-storage.js +1 -26
  1648. package/dist/web-apis/web-storage.js.map +1 -1
  1649. package/dist/web-apis/window-controls-overlay.d.ts +105 -0
  1650. package/dist/web-apis/window-controls-overlay.d.ts.map +1 -0
  1651. package/dist/web-apis/window-controls-overlay.js +147 -0
  1652. package/dist/web-apis/window-controls-overlay.js.map +1 -0
  1653. package/dist/win2d/child-slot.d.ts +13 -0
  1654. package/dist/win2d/child-slot.d.ts.map +1 -0
  1655. package/dist/win2d/child-slot.js +29 -0
  1656. package/dist/win2d/child-slot.js.map +1 -0
  1657. package/dist/win2d/context-2d/pointer-events.d.ts +1 -2
  1658. package/dist/win2d/context-2d/pointer-events.d.ts.map +1 -1
  1659. package/dist/win2d/context-2d/pointer-events.js +13 -102
  1660. package/dist/win2d/context-2d/pointer-events.js.map +1 -1
  1661. package/dist/win2d/element-lifecycle.d.ts +37 -0
  1662. package/dist/win2d/element-lifecycle.d.ts.map +1 -0
  1663. package/dist/win2d/element-lifecycle.js +73 -0
  1664. package/dist/win2d/element-lifecycle.js.map +1 -0
  1665. package/dist/win2d/element-shadow.d.ts +26 -0
  1666. package/dist/win2d/element-shadow.d.ts.map +1 -0
  1667. package/dist/win2d/element-shadow.js +128 -0
  1668. package/dist/win2d/element-shadow.js.map +1 -0
  1669. package/dist/win2d/element-visual.d.ts +1 -3
  1670. package/dist/win2d/element-visual.d.ts.map +1 -1
  1671. package/dist/win2d/element-visual.js +18 -72
  1672. package/dist/win2d/element-visual.js.map +1 -1
  1673. package/dist/win2d/scroll-host.d.ts +27 -0
  1674. package/dist/win2d/scroll-host.d.ts.map +1 -0
  1675. package/dist/win2d/scroll-host.js +293 -0
  1676. package/dist/win2d/scroll-host.js.map +1 -0
  1677. package/dist/win2d/scroll-link.d.ts +57 -0
  1678. package/dist/win2d/scroll-link.d.ts.map +1 -0
  1679. package/dist/win2d/scroll-link.js +165 -0
  1680. package/dist/win2d/scroll-link.js.map +1 -0
  1681. package/dist/win2d/shadow-geometry.d.ts +46 -0
  1682. package/dist/win2d/shadow-geometry.d.ts.map +1 -0
  1683. package/dist/win2d/shadow-geometry.js +82 -0
  1684. package/dist/win2d/shadow-geometry.js.map +1 -0
  1685. package/dist/win2d/shadow-host.d.ts +13 -0
  1686. package/dist/win2d/shadow-host.d.ts.map +1 -0
  1687. package/dist/win2d/shadow-host.js +23 -0
  1688. package/dist/win2d/shadow-host.js.map +1 -0
  1689. package/dist/win2d/shadow-receivers.d.ts +13 -0
  1690. package/dist/win2d/shadow-receivers.d.ts.map +1 -0
  1691. package/dist/win2d/shadow-receivers.js +56 -0
  1692. package/dist/win2d/shadow-receivers.js.map +1 -0
  1693. package/dist/win32-calls.d.ts +35 -1
  1694. package/dist/win32-calls.d.ts.map +1 -1
  1695. package/dist/win32-calls.js +47 -2
  1696. package/dist/win32-calls.js.map +1 -1
  1697. package/dist/win32-icons.d.ts +36 -0
  1698. package/dist/win32-icons.d.ts.map +1 -0
  1699. package/dist/win32-icons.js +123 -0
  1700. package/dist/win32-icons.js.map +1 -0
  1701. package/dist/window/apply-chrome.d.ts +8 -1
  1702. package/dist/window/apply-chrome.d.ts.map +1 -1
  1703. package/dist/window/apply-chrome.js +16 -2
  1704. package/dist/window/apply-chrome.js.map +1 -1
  1705. package/dist/window/badge-icon.d.ts +37 -0
  1706. package/dist/window/badge-icon.d.ts.map +1 -0
  1707. package/dist/window/badge-icon.js +196 -0
  1708. package/dist/window/badge-icon.js.map +1 -0
  1709. package/dist/window/chrome.d.ts +10 -0
  1710. package/dist/window/chrome.d.ts.map +1 -1
  1711. package/dist/window/chrome.js +8 -0
  1712. package/dist/window/chrome.js.map +1 -1
  1713. package/dist/window/create-window.d.ts +3 -0
  1714. package/dist/window/create-window.d.ts.map +1 -1
  1715. package/dist/window/create-window.js +1 -0
  1716. package/dist/window/create-window.js.map +1 -1
  1717. package/dist/window/index.d.ts +1 -1
  1718. package/dist/window/index.d.ts.map +1 -1
  1719. package/dist/window/index.js +1 -1
  1720. package/dist/window/index.js.map +1 -1
  1721. package/dist/window/message-hooks.d.ts +26 -0
  1722. package/dist/window/message-hooks.d.ts.map +1 -0
  1723. package/dist/window/message-hooks.js +46 -0
  1724. package/dist/window/message-hooks.js.map +1 -0
  1725. package/dist/window/message-pump.d.ts +3 -1
  1726. package/dist/window/message-pump.d.ts.map +1 -1
  1727. package/dist/window/message-pump.js +4 -1
  1728. package/dist/window/message-pump.js.map +1 -1
  1729. package/dist/window/native.d.ts +38 -0
  1730. package/dist/window/native.d.ts.map +1 -1
  1731. package/dist/window/native.js +134 -6
  1732. package/dist/window/native.js.map +1 -1
  1733. package/dist/window/reduced-motion.d.ts +7 -0
  1734. package/dist/window/reduced-motion.d.ts.map +1 -0
  1735. package/dist/window/reduced-motion.js +15 -0
  1736. package/dist/window/reduced-motion.js.map +1 -0
  1737. package/dist/window/system-dispatcher-queue.d.ts +7 -0
  1738. package/dist/window/system-dispatcher-queue.d.ts.map +1 -0
  1739. package/dist/window/system-dispatcher-queue.js +56 -0
  1740. package/dist/window/system-dispatcher-queue.js.map +1 -0
  1741. package/dist/window/taskbar-calls.d.ts +86 -0
  1742. package/dist/window/taskbar-calls.d.ts.map +1 -0
  1743. package/dist/window/taskbar-calls.js +111 -0
  1744. package/dist/window/taskbar-calls.js.map +1 -0
  1745. package/dist/window/taskbar-native.d.ts +9 -0
  1746. package/dist/window/taskbar-native.d.ts.map +1 -0
  1747. package/dist/window/taskbar-native.js +153 -0
  1748. package/dist/window/taskbar-native.js.map +1 -0
  1749. package/dist/window/taskbar.d.ts +133 -0
  1750. package/dist/window/taskbar.d.ts.map +1 -0
  1751. package/dist/window/taskbar.js +142 -0
  1752. package/dist/window/taskbar.js.map +1 -0
  1753. package/dist/window/transparent-backdrop.d.ts +7 -0
  1754. package/dist/window/transparent-backdrop.d.ts.map +1 -1
  1755. package/dist/window/transparent-backdrop.js +37 -1
  1756. package/dist/window/transparent-backdrop.js.map +1 -1
  1757. package/dist/window/window-handle.d.ts +17 -0
  1758. package/dist/window/window-handle.d.ts.map +1 -1
  1759. package/dist/window/window-handle.js +32 -0
  1760. package/dist/window/window-handle.js.map +1 -1
  1761. package/dist/window/window-host.svelte.d.ts +19 -2
  1762. package/dist/window/window-host.svelte.d.ts.map +1 -1
  1763. package/dist/window/window-host.svelte.js +52 -4
  1764. package/dist/window/window-host.svelte.js.map +1 -1
  1765. package/dist/window/window-state-keeper.d.ts +49 -0
  1766. package/dist/window/window-state-keeper.d.ts.map +1 -0
  1767. package/dist/window/window-state-keeper.js +164 -0
  1768. package/dist/window/window-state-keeper.js.map +1 -0
  1769. package/dist/window/window-state.d.ts +83 -0
  1770. package/dist/window/window-state.d.ts.map +1 -0
  1771. package/dist/window/window-state.js +155 -0
  1772. package/dist/window/window-state.js.map +1 -0
  1773. package/dist/winui.d.ts +9 -0
  1774. package/dist/winui.d.ts.map +1 -1
  1775. package/dist/winui.js +9 -0
  1776. package/dist/winui.js.map +1 -1
  1777. package/package.json +181 -1
  1778. package/src/accessibility/announce.ts +67 -0
  1779. package/src/accessibility/audit/audit-tree.ts +199 -0
  1780. package/src/accessibility/audit/contrast.ts +149 -0
  1781. package/src/accessibility/audit/index.ts +27 -0
  1782. package/src/accessibility/audit/rules.ts +110 -0
  1783. package/src/accessibility/audit/visual-tree-host.ts +179 -0
  1784. package/src/accessibility/index.ts +8 -0
  1785. package/src/accessibility/live-priority.ts +32 -0
  1786. package/src/accessibility/live-region.ts +27 -0
  1787. package/src/accessibility/notification.ts +35 -0
  1788. package/src/app/activate.ts +88 -0
  1789. package/src/app/activation/alarm-argument.ts +55 -0
  1790. package/src/app/activation/classify.ts +161 -0
  1791. package/src/app/activation/command.ts +83 -0
  1792. package/src/app/activation/context.ts +29 -0
  1793. package/src/app/activation/index.ts +10 -0
  1794. package/src/app/activation/jump-list-argument.ts +30 -0
  1795. package/src/app/activation/kinds.ts +85 -0
  1796. package/src/app/activation/login.ts +90 -0
  1797. package/src/app/activation/native.ts +301 -0
  1798. package/src/app/activation/protocol-handlers.ts +83 -0
  1799. package/src/app/activation/receive.ts +120 -0
  1800. package/src/app/activation/registration.ts +313 -0
  1801. package/src/app/activation/registry.ts +26 -0
  1802. package/src/app/activation/scheme.ts +125 -0
  1803. package/src/app/hotkeys/errors.ts +30 -0
  1804. package/src/app/hotkeys/index.ts +76 -0
  1805. package/src/app/hotkeys/keys.ts +194 -0
  1806. package/src/app/hotkeys/native.ts +36 -0
  1807. package/src/app/hotkeys/registry.ts +153 -0
  1808. package/src/app/index.ts +8 -0
  1809. package/src/app/instance-pipe.ts +1 -3
  1810. package/src/app/jump-list/index.ts +100 -0
  1811. package/src/app/jump-list/native.ts +309 -0
  1812. package/src/app/jump-list/tasks.ts +166 -0
  1813. package/src/app/launch-command.ts +80 -0
  1814. package/src/app/native.ts +58 -0
  1815. package/src/app/notification-schedule.ts +25 -0
  1816. package/src/app/notification-source.ts +23 -8
  1817. package/src/app/notify.ts +65 -10
  1818. package/src/app/relaunch.ts +79 -0
  1819. package/src/app/restart-after-crash.ts +111 -0
  1820. package/src/app/schedule/alarm.ts +11 -0
  1821. package/src/app/schedule/alarms.ts +240 -0
  1822. package/src/app/schedule/backend.ts +23 -0
  1823. package/src/app/schedule/events.ts +67 -0
  1824. package/src/app/schedule/index.ts +6 -0
  1825. package/src/app/schedule/native.ts +78 -0
  1826. package/src/app/schedule/occurrence.ts +45 -0
  1827. package/src/app/schedule/xml.ts +115 -0
  1828. package/src/app/schedule-bindings.ts +3 -0
  1829. package/src/app/shell/app-paths.ts +145 -0
  1830. package/src/app/shell/backend.ts +30 -0
  1831. package/src/app/shell/index.ts +11 -0
  1832. package/src/app/shell/kinds.ts +52 -0
  1833. package/src/app/shell/native.ts +336 -0
  1834. package/src/app/shell/open-with.ts +62 -0
  1835. package/src/app/shell/paths.ts +29 -0
  1836. package/src/app/shell/shortcut.ts +163 -0
  1837. package/src/app/shell/trash.ts +53 -0
  1838. package/src/app/tray-instance.ts +75 -0
  1839. package/src/app/windows-time.ts +13 -0
  1840. package/src/chrome/action/action-types.ts +123 -0
  1841. package/src/chrome/action/chrome-action.ts +234 -0
  1842. package/src/chrome/action/create-chrome-action.ts +35 -0
  1843. package/src/chrome/action/index.ts +13 -0
  1844. package/src/chrome/commands/chrome-commands.ts +174 -0
  1845. package/src/chrome/commands/command-types.ts +48 -0
  1846. package/src/chrome/commands/index.ts +6 -0
  1847. package/src/chrome/commands/shortcut.ts +107 -0
  1848. package/src/chrome/context-menus/build-menu.ts +121 -0
  1849. package/src/chrome/context-menus/chrome-context-menus.ts +255 -0
  1850. package/src/chrome/context-menus/context-menu-entry.ts +34 -0
  1851. package/src/chrome/context-menus/context-menu-schema.ts +48 -0
  1852. package/src/chrome/context-menus/context-menu-types.ts +94 -0
  1853. package/src/chrome/context-menus/index.ts +4 -0
  1854. package/src/chrome/i18n/chrome-i18n.ts +197 -0
  1855. package/src/chrome/i18n/detect-language.ts +67 -0
  1856. package/src/chrome/i18n/index.ts +5 -0
  1857. package/src/chrome/i18n/language-defaults.ts +167 -0
  1858. package/src/chrome/i18n/locale-chain.ts +44 -0
  1859. package/src/chrome/i18n/message-format.ts +60 -0
  1860. package/src/chrome/i18n/messages-schema.ts +61 -0
  1861. package/src/chrome/install.ts +75 -0
  1862. package/src/chrome/notifications/chrome-notifications.ts +249 -0
  1863. package/src/chrome/notifications/index.ts +8 -0
  1864. package/src/chrome/notifications/notification-mapping.ts +63 -0
  1865. package/src/chrome/notifications/notification-schema.ts +80 -0
  1866. package/src/chrome/notifications/notification-types.ts +60 -0
  1867. package/src/chrome/permissions/chrome-permissions.ts +259 -0
  1868. package/src/chrome/permissions/index.ts +5 -0
  1869. package/src/chrome/permissions/permission-schema.ts +75 -0
  1870. package/src/chrome/permissions/permission-table.ts +54 -0
  1871. package/src/chrome/permissions/permission-types.ts +5 -0
  1872. package/src/chrome/runtime/identity.ts +115 -0
  1873. package/src/chrome/runtime/index.ts +10 -0
  1874. package/src/chrome/runtime/installed.ts +85 -0
  1875. package/src/chrome/runtime/link.ts +211 -0
  1876. package/src/chrome/runtime/message-event.ts +126 -0
  1877. package/src/chrome/runtime/native-host.ts +220 -0
  1878. package/src/chrome/runtime/native-message.ts +78 -0
  1879. package/src/chrome/runtime/port.ts +117 -0
  1880. package/src/chrome/runtime/runtime.ts +317 -0
  1881. package/src/chrome/storage/chrome-storage.ts +120 -0
  1882. package/src/chrome/storage/index.ts +13 -0
  1883. package/src/chrome/storage/storage-area.ts +318 -0
  1884. package/src/chrome/storage/storage-types.ts +115 -0
  1885. package/src/chrome/system/create-chrome-system.ts +32 -0
  1886. package/src/chrome/system/index.ts +21 -0
  1887. package/src/chrome/system/system-backend.ts +88 -0
  1888. package/src/chrome/system/system-cpu.ts +49 -0
  1889. package/src/chrome/system/system-display.ts +94 -0
  1890. package/src/chrome/system/system-memory.ts +24 -0
  1891. package/src/chrome/system/system-storage.ts +33 -0
  1892. package/src/chrome/system/system-types.ts +112 -0
  1893. package/src/chrome/windows/chrome-windows.ts +372 -0
  1894. package/src/chrome/windows/create-chrome-windows.ts +13 -0
  1895. package/src/chrome/windows/index.ts +7 -0
  1896. package/src/chrome/windows/window-schema.ts +32 -0
  1897. package/src/chrome/windows/window-surface.ts +27 -0
  1898. package/src/chrome/windows/window-types.ts +80 -0
  1899. package/src/chrome/windows/windows-surface.ts +114 -0
  1900. package/src/components/convert.ts +5 -3
  1901. package/src/components/generated/bindings.ts +1 -0
  1902. package/src/components/generated/enums.ts +3 -0
  1903. package/src/components/hand-written/items/item-rows.svelte.ts +37 -0
  1904. package/src/components/hand-written/items/items-host.svelte.ts +2 -0
  1905. package/src/components/hand-written/items/repeater-host.svelte.ts +1 -0
  1906. package/src/components/index.ts +1 -1
  1907. package/src/components/runtime.svelte.ts +18 -6
  1908. package/src/composition/animate.ts +263 -0
  1909. package/src/composition/expression.ts +492 -0
  1910. package/src/composition/index.ts +36 -0
  1911. package/src/composition/property-set.ts +104 -0
  1912. package/src/composition/spring.ts +57 -0
  1913. package/src/composition/targets.ts +74 -0
  1914. package/src/css/API.md +321 -2
  1915. package/src/css/index.ts +2 -0
  1916. package/src/css/parse/box-shadow.ts +90 -0
  1917. package/src/css/parse/filters.ts +1 -1
  1918. package/src/css/parse/parser.ts +1 -1
  1919. package/src/css/parse/scroll-timeline.ts +373 -0
  1920. package/src/css/runtime/resources.ts +2 -2
  1921. package/src/css/runtime/runtime.ts +52 -16
  1922. package/src/css/runtime/sheet-module.ts +31 -11
  1923. package/src/css/runtime/visual-state-native.ts +161 -0
  1924. package/src/css/runtime/visual-states.ts +117 -0
  1925. package/src/css/scroll-timeline.ts +12 -0
  1926. package/src/css/shadow.ts +12 -0
  1927. package/src/css/translate/animation-properties.ts +240 -15
  1928. package/src/css/translate/build-shorthands.ts +5 -3
  1929. package/src/css/translate/cascade.ts +5 -1
  1930. package/src/css/translate/easing.ts +5 -0
  1931. package/src/css/translate/font-face.ts +97 -0
  1932. package/src/css/translate/handled-members.ts +16 -0
  1933. package/src/css/translate/lazy-groups.ts +43 -1
  1934. package/src/css/translate/linked-tracks.ts +56 -0
  1935. package/src/css/translate/scroll-link.ts +317 -0
  1936. package/src/css/translate/scroll-timeline-properties.ts +222 -0
  1937. package/src/css/translate/shadow-mode.ts +29 -0
  1938. package/src/css/translate/shadow-properties.ts +199 -0
  1939. package/src/css/translate/shorthands.ts +4 -3
  1940. package/src/css/translate/state-properties.ts +151 -0
  1941. package/src/css/translate/surface-properties.ts +22 -17
  1942. package/src/css/translate/translate.ts +69 -17
  1943. package/src/css/translate/type-ramp.ts +65 -0
  1944. package/src/css/translate/types.ts +8 -0
  1945. package/src/css/translate/typography-properties.ts +533 -0
  1946. package/src/css/translate/unsupported-properties.ts +8 -1
  1947. package/src/css/translate/view-transition-properties.ts +70 -0
  1948. package/src/css/translate/winui-only-properties.ts +16 -1
  1949. package/src/css/typography.ts +6 -0
  1950. package/src/css/validate/vscode-data.ts +44 -0
  1951. package/src/css/view-transition.ts +13 -0
  1952. package/src/css/visual-states.ts +17 -0
  1953. package/src/data-transfer/clipboard.ts +15 -0
  1954. package/src/data-transfer/data-transfer.ts +29 -1
  1955. package/src/data-transfer/package-io.ts +36 -2
  1956. package/src/data-transfer/winrt-package.ts +65 -1
  1957. package/src/devices/bindings.ts +4 -1
  1958. package/src/devices/displays.svelte.ts +2 -1
  1959. package/src/devices/live.svelte.ts +4 -54
  1960. package/src/devices/power.svelte.ts +51 -0
  1961. package/src/devices/power.ts +12 -3
  1962. package/src/devices/subscription.ts +60 -0
  1963. package/src/devices/system-power.ts +95 -0
  1964. package/src/downloads/chrome-downloads.ts +434 -0
  1965. package/src/downloads/chrome-event.ts +42 -0
  1966. package/src/downloads/download-query.ts +204 -0
  1967. package/src/downloads/download-record.ts +176 -0
  1968. package/src/downloads/download-target.ts +79 -0
  1969. package/src/downloads/download-transfer.ts +160 -0
  1970. package/src/downloads/download-types.ts +173 -0
  1971. package/src/downloads/fetch-to-file.ts +246 -0
  1972. package/src/downloads/index.ts +22 -0
  1973. package/src/downloads/interrupt-reason.ts +64 -0
  1974. package/src/downloads/taskbar-progress.ts +50 -0
  1975. package/src/downloads/zone-identifier.ts +42 -0
  1976. package/src/enums.ts +16 -1
  1977. package/src/font-files.ts +68 -0
  1978. package/src/font-registry.ts +79 -0
  1979. package/src/font-spelling.ts +29 -0
  1980. package/src/incremental/incremental-source.svelte.ts +181 -0
  1981. package/src/incremental/index.ts +4 -0
  1982. package/src/incremental/state.ts +33 -0
  1983. package/src/index.ts +2 -0
  1984. package/src/input/active-element.svelte.ts +44 -0
  1985. package/src/input/dom-event.ts +121 -0
  1986. package/src/input/events.ts +272 -0
  1987. package/src/input/focused-element.ts +34 -0
  1988. package/src/input/index.ts +12 -0
  1989. package/src/input/key-names.ts +231 -0
  1990. package/src/input/keyboard-fields.ts +71 -0
  1991. package/src/input/move-focus.ts +35 -0
  1992. package/src/input/pointer-capture.ts +92 -0
  1993. package/src/input/pointer-fields.ts +212 -0
  1994. package/src/input/pointer-routes.ts +16 -0
  1995. package/src/input/trap-focus.ts +56 -0
  1996. package/src/key-code.ts +139 -0
  1997. package/src/media/index.ts +1 -0
  1998. package/src/messaging/page.ts +61 -0
  1999. package/src/messaging/web-view2/cookies.ts +109 -0
  2000. package/src/messaging/web-view2/core.ts +126 -0
  2001. package/src/messaging/web-view2/index.ts +14 -0
  2002. package/src/messaging/web-view2/policy.ts +127 -0
  2003. package/src/messaging/web-view2/transport.ts +137 -0
  2004. package/src/notice/index.ts +3 -0
  2005. package/src/notice/native.ts +48 -0
  2006. package/src/notice/notice.ts +148 -0
  2007. package/src/picture-source.ts +26 -0
  2008. package/src/renderer/host/connected-configuration.ts +49 -0
  2009. package/src/renderer/host/control.ts +7 -2
  2010. package/src/renderer/host/element-animation.ts +2 -16
  2011. package/src/renderer/host/glide-height.ts +147 -0
  2012. package/src/renderer/host/host.ts +12 -15
  2013. package/src/renderer/host/implicit-layout-animation.ts +190 -0
  2014. package/src/renderer/host/motion-preference.ts +31 -0
  2015. package/src/renderer/host/view-transition-names.ts +30 -0
  2016. package/src/settings/SettingsCard.d.svelte.ts +12 -0
  2017. package/src/settings/SettingsExpander.d.svelte.ts +12 -0
  2018. package/src/settings/index.ts +9 -0
  2019. package/src/settings/settings-context.ts +13 -0
  2020. package/src/settings/settings-props.ts +57 -0
  2021. package/src/store/bindings.ts +11 -0
  2022. package/src/store/identity.ts +36 -0
  2023. package/src/store/index.ts +21 -0
  2024. package/src/store/license.ts +136 -0
  2025. package/src/store/packages.ts +94 -0
  2026. package/src/store/reply.ts +29 -0
  2027. package/src/store/startup.ts +29 -0
  2028. package/src/store/states.ts +72 -0
  2029. package/src/store/types.ts +122 -0
  2030. package/src/store/updates.ts +29 -0
  2031. package/src/store/window-interop.ts +40 -0
  2032. package/src/store/windows-backend.ts +27 -0
  2033. package/src/store/windows-identity.ts +58 -0
  2034. package/src/store/windows-packages.ts +91 -0
  2035. package/src/store/windows-store.ts +126 -0
  2036. package/src/tray/TrayIcon.d.svelte.ts +14 -2
  2037. package/src/tray/TrayMenuFlyout.d.svelte.ts +6 -0
  2038. package/src/tray/balloons.ts +58 -0
  2039. package/src/tray/bounds.ts +16 -0
  2040. package/src/tray/exit-hook.ts +13 -0
  2041. package/src/tray/flyout-model.ts +77 -0
  2042. package/src/tray/flyout-picker.ts +56 -0
  2043. package/src/tray/index.ts +3 -0
  2044. package/src/tray/menu/default-profile.ts +20 -0
  2045. package/src/tray/menu/define.ts +12 -0
  2046. package/src/tray/menu/describe.ts +39 -0
  2047. package/src/tray/menu/expand.ts +75 -0
  2048. package/src/tray/menu/index.ts +30 -0
  2049. package/src/tray/menu/profile-file.ts +44 -0
  2050. package/src/tray/menu/profile.ts +39 -0
  2051. package/src/tray/menu/resolve-lite.ts +226 -0
  2052. package/src/tray/menu/resolve.ts +72 -0
  2053. package/src/tray/menu/types.ts +270 -0
  2054. package/src/tray/menu/values.ts +21 -0
  2055. package/src/tray/menu-svelte/TrayMenu.d.svelte.ts +6 -0
  2056. package/src/tray/menu-svelte/TrayMenuEditor.d.svelte.ts +17 -0
  2057. package/src/tray/menu-svelte/TrayMenuHeader.d.svelte.ts +6 -0
  2058. package/src/tray/menu-svelte/TrayMenuItem.d.svelte.ts +6 -0
  2059. package/src/tray/menu-svelte/TrayMenuSeparator.d.svelte.ts +6 -0
  2060. package/src/tray/menu-svelte/TrayMenuSubmenu.d.svelte.ts +6 -0
  2061. package/src/tray/menu-svelte/collect.ts +58 -0
  2062. package/src/tray/menu-svelte/edit-profile.ts +263 -0
  2063. package/src/tray/menu-svelte/editor-labels.ts +54 -0
  2064. package/src/tray/menu-svelte/editor-props.ts +27 -0
  2065. package/src/tray/menu-svelte/index.ts +17 -0
  2066. package/src/tray/menu-svelte/menu-node.ts +119 -0
  2067. package/src/tray/menu-svelte/menu-props.ts +52 -0
  2068. package/src/tray/menu-svelte/menu-source.ts +83 -0
  2069. package/src/tray/menu-svelte/preview-lines.ts +58 -0
  2070. package/src/tray/native.ts +125 -265
  2071. package/src/tray/standalone/define-tray.ts +36 -0
  2072. package/src/tray/standalone/index.ts +28 -0
  2073. package/src/tray/standalone/native.ts +214 -0
  2074. package/src/tray/standalone/standalone-tray.ts +162 -0
  2075. package/src/tray/themed-icon.ts +48 -0
  2076. package/src/tray/tray-core.ts +36 -43
  2077. package/src/tray/tray-extras.ts +71 -0
  2078. package/src/tray/tray-icon-props.ts +20 -5
  2079. package/src/tray/tray-icon.ts +18 -11
  2080. package/src/tray/tray-manifest.ts +25 -0
  2081. package/src/tray/tray-menu-flyout-props.ts +17 -0
  2082. package/src/tray/tray-menu.ts +2 -2
  2083. package/src/vite/build.ts +35 -7
  2084. package/src/vite/entrypoints/build-tray.ts +85 -0
  2085. package/src/vite/entrypoints/discover.ts +75 -0
  2086. package/src/vite/entrypoints/extract-tray.ts +99 -0
  2087. package/src/vite/entrypoints/lower-menu-markup.ts +443 -0
  2088. package/src/vite/entrypoints/lower-tray-svelte.ts +329 -0
  2089. package/src/vite/entrypoints/node-span.ts +36 -0
  2090. package/src/vite/entrypoints/tray-dev-plugin.ts +111 -0
  2091. package/src/vite/entrypoints/tray-module.ts +59 -0
  2092. package/src/vite/entrypoints/tray-process.ts +83 -0
  2093. package/src/vite/entrypoints/tray-source.ts +21 -0
  2094. package/src/vite/entrypoints/tray-svelte-error.ts +31 -0
  2095. package/src/vite/externals.ts +19 -0
  2096. package/src/vite/plugin.ts +3 -14
  2097. package/src/web-apis/animations.ts +4 -31
  2098. package/src/web-apis/atomic-file.ts +36 -0
  2099. package/src/web-apis/badge-glyph.ts +18 -0
  2100. package/src/web-apis/badging.ts +37 -19
  2101. package/src/web-apis/clipboard.ts +63 -16
  2102. package/src/web-apis/dialog-types.ts +99 -0
  2103. package/src/web-apis/dialogs-windows.ts +144 -0
  2104. package/src/web-apis/dialogs.ts +312 -0
  2105. package/src/web-apis/fonts.ts +277 -0
  2106. package/src/web-apis/geolocation.ts +14 -8
  2107. package/src/web-apis/image-codec-windows.ts +140 -0
  2108. package/src/web-apis/image-pixels.ts +191 -0
  2109. package/src/web-apis/image-types.ts +74 -0
  2110. package/src/web-apis/images.ts +697 -0
  2111. package/src/web-apis/keyframe-input.ts +43 -0
  2112. package/src/web-apis/notification.ts +119 -8
  2113. package/src/web-apis/page.ts +70 -8
  2114. package/src/web-apis/permissions.ts +31 -0
  2115. package/src/web-apis/png-writer.ts +66 -0
  2116. package/src/web-apis/scroll-timeline.ts +544 -0
  2117. package/src/web-apis/view-transitions.ts +409 -0
  2118. package/src/web-apis/web-storage.ts +2 -35
  2119. package/src/web-apis/window-controls-overlay.ts +213 -0
  2120. package/src/win2d/child-slot.ts +43 -0
  2121. package/src/win2d/context-2d/pointer-events.ts +14 -119
  2122. package/src/win2d/element-lifecycle.ts +97 -0
  2123. package/src/win2d/element-shadow.ts +167 -0
  2124. package/src/win2d/element-visual.ts +19 -84
  2125. package/src/win2d/scroll-host.ts +364 -0
  2126. package/src/win2d/scroll-link.ts +227 -0
  2127. package/src/win2d/shadow-geometry.ts +98 -0
  2128. package/src/win2d/shadow-host.ts +26 -0
  2129. package/src/win2d/shadow-receivers.ts +82 -0
  2130. package/src/win32-calls.ts +92 -2
  2131. package/src/win32-icons.ts +142 -0
  2132. package/src/window/apply-chrome.ts +22 -0
  2133. package/src/window/badge-icon.ts +234 -0
  2134. package/src/window/chrome.ts +12 -0
  2135. package/src/window/create-window.ts +5 -0
  2136. package/src/window/index.ts +1 -1
  2137. package/src/window/message-hooks.ts +63 -0
  2138. package/src/window/message-pump.ts +8 -1
  2139. package/src/window/native.ts +162 -6
  2140. package/src/window/reduced-motion.ts +14 -0
  2141. package/src/window/system-dispatcher-queue.ts +61 -0
  2142. package/src/window/taskbar-calls.ts +158 -0
  2143. package/src/window/taskbar-native.ts +182 -0
  2144. package/src/window/taskbar.ts +223 -0
  2145. package/src/window/transparent-backdrop.ts +38 -1
  2146. package/src/window/window-handle.ts +36 -0
  2147. package/src/window/window-host.svelte.ts +92 -5
  2148. package/src/window/window-state-keeper.ts +205 -0
  2149. package/src/window/window-state.ts +207 -0
  2150. package/src/winui.ts +9 -0
  2151. package/web-types.json +7903 -37
package/API.md CHANGED
@@ -12,16 +12,24 @@ monorepo needs no build step (the repository is a pnpm workspace, see
12
12
 
13
13
  | Specifier | File | What |
14
14
  |---|---|---|
15
- | `winui-svelte` | `src/index.ts` | `control`, `withControl`, `elementRef`, `elementSize`, `elementTheme`, `focusElement`, `mountControl`, `registerControls`, `setClassHandler`, `dispatch` / `flush` / `onFlush`, the value helpers |
15
+ | `winui-svelte` | `src/index.ts` | `control`, `withControl`, `elementRef`, `elementSize`, `elementTheme`, `focusElement`, `glideHeight`, `mountControl`, `registerControls`, `setClassHandler`, `dispatch` / `flush` / `onFlush`, the value helpers |
16
16
  | `winui-svelte/components` | `src/components/generated/index.ts` | every WinUI 3 control as a component (`StackPanel`, `ToggleSwitch`, ...) and its props type (`ToggleSwitchComponentProps`); `xamlOf`, `goToState`, `installXaml`, `resourceDictionaryOf`; importing it registers the generated bindings with the renderer |
17
17
  | `winui-svelte/state` | `src/state/index.ts` | `createHostChannel()` (its `messaging` is the typed link), `hostState()`, `StateProtocol`, the transports (stdio, MessagePort, in-memory), `diff` / `applyOps` (see `src/state/README.md`) |
18
18
  | `winui-svelte/host` | `src/renderer/host/host.ts` | `renderer`, the renderer WinUI controls are built through (`mountControl` makes it the active one), and the mount-target plumbing below; not for app code |
19
+ | `winui-svelte/scroll-timeline` | `src/web-apis/scroll-timeline.ts` | `installScrollTimeline()`: `ScrollTimeline`, `ViewTimeline` and `element.animate(keyframes, { timeline })` over Composition (the CSS side is `winui-svelte/css/scroll-timeline`, which a sheet that uses `animation-timeline` imports) |
20
+ | `winui-svelte/view-transitions` | `src/web-apis/view-transitions.ts` | `installViewTransitions()`: `document.startViewTransition` and `ViewTransition` over WinUI's connected animations (the CSS side is `winui-svelte/css/view-transition`, which a sheet or style attribute that sets `view-transition-name` imports) |
21
+ | `winui-svelte/dialogs` | `src/web-apis/dialogs.ts` | `installDialogs()`, `showDialog()`, `useDialogWindow()`, `DialogResult`, `DialogButton`: `alert`, `confirm` and `prompt` over `ContentDialog`, as promises (opt-in; see Dialogs) |
19
22
  | `winui-svelte/element-animation` | `src/renderer/host/element-animation.ts` | `enableElementAnimation()`: what Svelte's `transition:`, `in:`, `out:`, `animate:` and `svelte/motion` ask of an element, on WinUI controls (the Vite plugin calls it from a component that uses them; otherwise not bundled) |
20
23
  | `winui-svelte/attached-owners` | `src/components/attached-owners.ts` | `preloadAttachedOwners(names)`: loads the modules attached properties (`canvasLeft`, `gridRow`) are written through (the Vite plugin calls it from a component whose markup or script names one, so the property is set with the control; a prop named nowhere, built from a computed key, needs `await preloadAttachedOwners(["Canvas"])` first, or its control throws) |
24
+ | `winui-svelte/settings` | `src/settings/index.ts` | `SettingsCard`, `SettingsExpander`: Fluent settings cards after the Community Toolkit's (opt-in) |
25
+ | `winui-svelte/implicit-layout-animation` | `src/renderer/host/implicit-layout-animation.ts` | `implicitLayoutAnimation({ duration, easing })`, `LayoutEasing`: children slide to their new places when the layout moves them (opt-in) |
21
26
  | `winui-svelte/connected-animation` | `src/renderer/host/connected-animation.ts` | `connectElement({ key, element })`, `startConnected({ key, element })`: WinUI's connected animation between two pages (opt-in) |
27
+ | `winui-svelte/composition` | `src/composition/index.ts` | `animateOnCompositor`, `compositorAnimation`, `visualReference`, `createPropertySet`, the typed expression builder and `scalarSpring` / `vector2Spring` / `vector3Spring`: expression and spring animations on the compositor (opt-in, see "Composition animations") |
22
28
  | `winui-svelte/keyed-list` | `src/renderer/list/keyed-list.ts` | `syncKeyed()`: sync a native collection to wanted keys, touching only what changed |
23
29
  | `winui-svelte/state` | `src/state/index.ts` | `createHostChannel()`, `hostState()`, the transports (see `src/state/README.md`) |
24
30
  | `winui-svelte/messaging` | `src/messaging/index.ts` | `defineMessaging(transport)`: typed `sendMessage` / `onMessage` over a ProtocolMap, as @webext-core/messaging; the state channel is built on it |
31
+ | `winui-svelte/messaging/web-view2` | `src/messaging/web-view2/index.ts` | `webView2Transport({ control })` and the typed `CoreWebView2` helpers (opt-in, see "WebView2 bridge") |
32
+ | `winui-svelte/messaging/page` | `src/messaging/page.ts` | `createPageTransport()`: the web page's end of the link, no WinUI import, safe for a browser bundle |
25
33
  | `winui-svelte/vite` | `src/vite/index.ts` | `winuiSvelte()` Vite plugin, `startModuleServer()`, `buildApp()` (the production bundle), compile-error formatting |
26
34
  | `winui-svelte/dev` | `src/dev/index.ts` | `startDev()`, the dev loop in one call: Windows App SDK, dev server and the window's thread |
27
35
  | `winui-svelte/runner` | `src/vite/runner.ts` | `createWindowModuleRunner()`, the window thread's side of the module server |
@@ -30,14 +38,31 @@ monorepo needs no build step (the repository is a pnpm workspace, see
30
38
  | `winui-svelte/bootstrap` | `src/window/bootstrap.ts` | `initWindowsAppSdk()`; imports nothing of WinRT, safe on the host's main thread |
31
39
  | `winui-svelte/thread` | `src/window/thread.ts` | `runOnUiThread()`; imports only dynwinrt, so the apartment comes first |
32
40
  | `winui-svelte/window` | `src/window/index.ts` | `runWindow()`, `exitApplication()`, `createWindow()`, `startTimer()`, `systemSettings()`, the picker options (see App services) |
33
- | `winui-svelte/app` | `src/app/index.ts` | `ensureSingleInstance()`, `notify()` (opt-in; see App lifecycle) |
41
+ | `winui-svelte/app` | `src/app/index.ts` | `ensureSingleInstance()`, `notify()`, `activateInstance()`, `activateOrLaunch()`, `launchApp()`, `startTray()`, `relaunch()`, `restartAfterCrash()` (opt-in; see App lifecycle) |
42
+ | `winui-svelte/app/shell` | `src/app/shell/index.ts` | `trash()`, `openWith()`, `createShortcut()`, `readShortcut()`, `registerAppPath()`, `ShellFailure` (opt-in; see Shell verbs) |
43
+ | `winui-svelte/app/activation` | `src/app/activation/index.ts` | `installProtocolHandlers()`, `registerFileTypes()`, `launchAtLogin()`, `startActivation()`, `ActivationKind` (opt-in; see Activation) |
44
+ | `winui-svelte/app/jump-list` | `src/app/jump-list/index.ts` | `setJumpListTasks()`, `clearJumpList()` (opt-in; see Jump list tasks) |
34
45
  | `winui-svelte/data-transfer` | `src/data-transfer/index.ts` | `enableDragEvents()`, `dropzone`, `draggable`, `filePicker`, `pickFiles`, `pickSaveFile`, `clipboard`, `launchUri` / `launchFile` / `openFolder` / `revealInExplorer`, `share`, `NativeFile`, `DataTransfer`, `DragEvent` (opt-in; see Data transfer) |
46
+ | `winui-svelte/incremental` | `src/incremental/index.ts` | `createIncrementalSource()`, `IncrementalSource`, `IncrementalStatus`, `IncrementalState` (opt-in; see Incremental loading) |
47
+ | `winui-svelte/downloads` | `src/downloads/index.ts` | `Downloads` (`chrome.downloads`), `fetchToFile()`, `markOfTheWeb()`, `DownloadError` (opt-in; see Downloads) |
48
+ | `winui-svelte/chrome/runtime` | `src/chrome/runtime/index.ts` | `Runtime` (`chrome.runtime`), `Port`, `InstallReason`, the native messaging codec (opt-in; see Chrome runtime) |
49
+ | `winui-svelte/chrome/notifications` | `src/chrome/notifications/index.ts` | `ChromeNotifications` (`chrome.notifications`), `NotificationTemplateType`, `NotificationPermissionLevel` (opt-in; see Chrome notifications) |
50
+
51
+ | `winui-svelte/chrome/commands` | `src/chrome/commands/index.ts` | `ChromeCommands` (`chrome.commands`), `parseShortcut()` (opt-in; see Chrome commands) |
52
+ | `winui-svelte/chrome/action` | `src/chrome/action/index.ts` | `ChromeAction` (`chrome.action`), `createChromeAction()` (opt-in; see Chrome action) |
53
+ | `winui-svelte/chrome/i18n` | `src/chrome/i18n/index.ts` | `ChromeI18n` (`chrome.i18n`), `installLanguageDefaults()` (opt-in; see Chrome i18n) |
54
+ | `winui-svelte/chrome/install` | `src/chrome/install.ts` | `installChromeApis()`, `ChromeGlobal`, `ChromeAlarms`, `ChromeSystem` (opt-in; see Chrome global) |
55
+ | `winui-svelte/input` | `src/input/index.ts` | `enableInputEvents()`, `setPointerCapture` / `releasePointerCapture` / `hasPointerCapture`, `activeElement()`, `moveFocus()`, `trapFocus()`, `PointerType`, `PointerEvent` / `WheelEvent` / `KeyboardEvent` / `FocusEvent` (opt-in; see Input events and focus) |
35
56
  | `winui-svelte/media` | `src/media/index.ts` | `bitmapImageOf()`, `svgImageSourceOf()`, `decodeDataUri()`, `createMediaPlayer()`, `mediaSourceOfBytes()`, `observePlayback()`, `PlaybackState` (opt-in; see Media) |
36
57
  | `winui-svelte/win2d` | `src/win2d/index.ts` | `Canvas`, the Win2D controls, the drawing helpers and Win2D classes, `applyEffect` (opt-in; see Win2D) |
37
58
  | `winui-svelte/enums` | `src/enums.ts` | every closed set a prop or option takes: WinUI's enums, `ThemeBrush`, `ColorKeyword`, `Backdrop`, `WindowTheme`, `TrayBalloonIcon` and the rest (see Closed sets) |
38
59
  | `winui-svelte/win2d/context-2d` | `src/win2d/context-2d/index.ts` | `Canvas2D`, `createCanvas2D`, `CanvasElement`, `Context2D`, `Path2D` and the rest of the HTML Canvas 2D API over Win2D (opt-in; see Canvas 2D) |
39
60
  | `winui-svelte/tray` | `src/tray/index.ts` | `TrayIcon` (with its `menu`), `createTrayIcon()`, `placeMenuWindow()`, `hideToTray()`, `restoreFromTray()`, `toggleInTray()`, `removeAllTrayIcons()`, `TrayGesture` (opt-in; see System tray) |
61
+ | `winui-svelte/tray/standalone` | `src/tray/standalone/index.ts` | `createStandaloneTray()`, `defineTray()`, its opt-in parts `balloons`, `bounds` and `themedIcon`, `MenuItemKind`, `MenuLevel`, and the `winui-svelte/app` calls that start or signal the app: a tray with no window, no WinUI and no components (opt-in; see Tray with no window) |
62
+ | `winui-svelte/notice` | `src/notice/index.ts` | `showNotice()`, `NoticeIcon`, `NoticeButtons`, `NoticeButton`: a message box with no window or app (opt-in; see Notice with no app) |
40
63
  | `winui-svelte/forms` | `src/forms/index.ts` | `Form`, `FormField`, `textField`, `numberField`, `selectField` and the other field attachments, `formButton`, `FormValues`, `validityOf` (opt-in; see Forms) |
64
+ | `winui-svelte/store` | `src/store/index.ts` | `getAppLicense`, `watchLicense`, `checkForUpdates`, `watchPackages`, `getStartupTask`, `getPackageInfo`: the Store and package APIs, answering `hasPackage: false` outside a package (opt-in) |
65
+ | `winui-svelte/accessibility`, `/accessibility/audit` | `src/accessibility/index.ts`, `src/accessibility/audit/index.ts` | `announce`, `liveRegion`, `LivePriority`; `auditAccessibility`, `accessibilityRules` (opt-in; see Accessibility) |
41
66
  | `winui-svelte/devices` | `src/devices/index.ts` | device enumeration, input devices, Bluetooth, printers, power, network, display, audio, gamepads and sensors, each also at `winui-svelte/devices/<area>` (opt-in; see Windows devices) |
42
67
 
43
68
  The table is the source layout: `exports` point at `.ts` files so the monorepo
@@ -197,6 +222,57 @@ handed over as it is and read once, when the element is made)
197
222
  A property that
198
223
  changes is set through `{@attach control(...)}`, as components do
199
224
 
225
+ ## Wrapping chips
226
+
227
+ CSS `flex-wrap: wrap` has no WinUI panel to become: the element's tag decides
228
+ the panel, the build does not swap it, and `flex-wrap` stays a build error whose
229
+ message names the two ways below (WinUI 3 has no `WrapPanel`; the Community
230
+ Toolkit's is a separate package)
231
+ Measured in a 300 wide window (`test/chip-tray.test.ts`, the
232
+ `examples/chip-tray` example)
233
+
234
+ | Way | Wraps | Chip widths | Use it for |
235
+ |---|---|---|---|
236
+ | `RichTextBlock`, a `Paragraph`, each chip in an `InlineUIContainer` | yes, like words in a sentence | each chip keeps its own | link chips, tags, any tray whose items differ in width |
237
+ | `VariableSizedWrapGrid` | yes, at its width or `maximumRowsOrColumns` | one cell for all (the first chip sets it, or `itemWidth` and `itemHeight`) | equal tiles |
238
+ | `ItemsRepeater` with `UniformGridLayout`, `GridView` | yes | one cell for all | the same, with virtualization and selection |
239
+
240
+ The first row is the answer to `flex-wrap`:
241
+
242
+ ```svelte
243
+ <script lang="ts">
244
+ import { Border, HyperlinkButton, InlineUIContainer, Paragraph, RichTextBlock } from "winui-svelte/components";
245
+ </script>
246
+
247
+ <RichTextBlock>
248
+ <Paragraph>
249
+ {#each links as link (link.href)}
250
+ <InlineUIContainer>
251
+ <Border class="chip">
252
+ <HyperlinkButton navigateUri={link.href}>{link.label}</HyperlinkButton>
253
+ </Border>
254
+ </InlineUIContainer>
255
+ {/each}
256
+ </Paragraph>
257
+ </RichTextBlock>
258
+
259
+ <style>
260
+ .chip {
261
+ margin: 0 6px 6px 0;
262
+ }
263
+ </style>
264
+ ```
265
+
266
+ - The gap between chips is each chip's margin: a `RichTextBlock` has no `gap`
267
+ - Chips sit on the text baseline; `RichTextBlock` has `textAlignment`, which
268
+ centres or right-aligns the lines
269
+ - The tray is text: a `RichTextBlock` is read-only and takes `isTextSelectionEnabled`
270
+ - Not covered: a CSS rule cannot turn `display: flex; flex-wrap: wrap` into this
271
+ (a flex container is a `<stack-panel>` or `<grid>` and the build never changes
272
+ a tag), and `ItemsRepeater` has no layout that flows items of different widths
273
+ (`UniformGridLayout` is uniform, `LinedFlowLayout` needs one line height and
274
+ aspect ratios from its items)
275
+
200
276
  ## Transitions (`winui-svelte/element-animation`, `winui-svelte/element-effects`)
201
277
 
202
278
  Svelte's `transition:`, `in:`, `out:` and `animate:` run unchanged: Svelte's
@@ -294,6 +370,131 @@ What it does:
294
370
  - `getComputedStyle` is defined as a global for WinUI's elements; any other
295
371
  argument goes to the one that was there, if any
296
372
 
373
+ ### Gliding a height (`glideHeight`)
374
+
375
+ WinUI cannot animate `Height="Auto"`, so a card whose content grows or shrinks
376
+ jumps; the web's answer is a `ResizeObserver` plus `element.animate({ height })`,
377
+ and `glideHeight` is that pair as one attachment:
378
+
379
+ ```svelte
380
+ <script lang="ts">
381
+ import { glideHeight } from "winui-svelte";
382
+ import { enableElementAnimation } from "winui-svelte/element-animation";
383
+
384
+ enableElementAnimation();
385
+ </script>
386
+
387
+ <border class="card" {@attach glideHeight({ duration: 300, easing: "ease-out" })}>
388
+ <text-block textWrapping="Wrap">{text}</text-block>
389
+ </border>
390
+ ```
391
+
392
+ - It listens to the element's `SizeChanged`; on a change it runs
393
+ `element.animate([{ height: from }, { height: to }])`, which sets `Height`
394
+ explicitly for the glide and gives `Auto` back when it ends (`element.animate`
395
+ animates `height` and `width` like it does `Opacity` and `Translation`)
396
+ - Needs `enableElementAnimation()` once (a `transition:` directive in the
397
+ app turns it on too); without it `glideHeight` throws and says so
398
+ - Can: grow and shrink, any easing and duration, a change made during a glide
399
+ (picked up when it ends), a hot update or removal (the glide is cancelled);
400
+ reduced motion makes it instant
401
+ - Cannot: glide the first layout, an element with a fixed `height` (it never
402
+ changes by itself), or the content inside; the layout is already at the new
403
+ height when the glide starts, so the frame before the first step can show it,
404
+ and content that would overflow a shrinking card is clipped only if the card
405
+ clips it (`clip-to-bounds`, a `ScrollViewer`)
406
+ - Measured in a window (`test/card-glide.test.ts`, the `examples/card-glide`
407
+ example): 250 ms into a 600 ms glide the height lies between the two sizes,
408
+ both growing and shrinking, and the card ends on its content's height with no
409
+ fixed `Height` left
410
+
411
+ ### Sliding siblings (`implicitLayoutAnimation`)
412
+
413
+ When an expander opens, the controls below it jump; on the web a FLIP
414
+ animation slides them, and in WinUI the Composition layer does it with an
415
+ implicit animation on each child's `Offset`
416
+
417
+ ```svelte
418
+ <script lang="ts">
419
+ import { implicitLayoutAnimation, LayoutEasing } from "winui-svelte/implicit-layout-animation";
420
+ </script>
421
+
422
+ <stack-panel {@attach implicitLayoutAnimation({ duration: 260, easing: LayoutEasing.EASE_OUT })}>
423
+ <expander header="Advanced">...</expander>
424
+ <button>Save</button>
425
+ </stack-panel>
426
+ ```
427
+
428
+ - It is an attachment for a panel; every child that the panel has laid out gets
429
+ a `Vector3KeyFrameAnimation` on `Offset` that ends at `this.FinalValue`, so
430
+ the composition layer starts it by itself whenever layout changes the offset
431
+ (no per-frame work in JavaScript, no `enableElementAnimation()`)
432
+ - `duration` is in milliseconds (default 260); `easing` is one of
433
+ `LayoutEasing` (`ease`, `ease-in`, `ease-out`, `ease-in-out`, `linear`,
434
+ `emphasized`; default `ease-out`)
435
+ - A child that is added slides from nowhere: the panel picks it up on its next
436
+ layout, after it was placed, so only the ones that were already there move
437
+ - Reduced motion: with Windows' animation effects off the attachment does
438
+ nothing, and it starts when they are turned on
439
+ - It replaces a child's own `implicitAnimations`, and it
440
+ is not a CSS property: the CSS part has no hook that reaches a Visual's
441
+ implicit animation collection cheaply, so the attachment is the one way
442
+ - Measured in a window (`test/layout-animation.test.ts`, the
443
+ `examples/layout-animation` example): 800 ms into a 5 s slide the marker
444
+ that a growing spacer pushes down is drawn between its two places, and ends
445
+ in the second
446
+ - `style:translate="0px 60px"` on a component (`<Border style:translate=...>`)
447
+ works: the same test reads the pixels and finds the control drawn 60 px lower
448
+ at once, with its layout slot left unchanged
449
+
450
+ ## Settings cards (`winui-svelte/settings`)
451
+
452
+ The Windows Community Toolkit's `SettingsCard` and `SettingsExpander` are
453
+ managed code with no projectable metadata, so these are built from WinUI's own
454
+ controls (`Border`, `Button`, `Grid`, `FontIcon`, `TextBlock`, `Expander`) and
455
+ the card theme resources (`CardBackgroundFillColorDefaultBrush` and
456
+ `CardStrokeColorDefaultBrush`), so light, dark and high contrast follow Windows
457
+
458
+ ```svelte
459
+ <script lang="ts">
460
+ import { ToggleSwitch } from "winui-svelte/components";
461
+ import { SettingsCard, SettingsExpander } from "winui-svelte/settings";
462
+
463
+ let isExpanded = $state(false);
464
+ </script>
465
+
466
+ <SettingsCard description="Start with Windows" header="Run at startup" headerIcon="PowerButton">
467
+ <ToggleSwitch />
468
+ </SettingsCard>
469
+ <SettingsCard header="Open the logs" isClickEnabled onclick={openLogs} />
470
+ <SettingsExpander header="Appearance" bind:isExpanded>
471
+ {#snippet items()}
472
+ <SettingsCard header="Theme">...</SettingsCard>
473
+ {/snippet}
474
+ </SettingsExpander>
475
+ ```
476
+
477
+ | Prop | Meaning |
478
+ |---|---|
479
+ | `header`, `description` | the name and the line under it |
480
+ | `headerIcon` | a Fluent glyph name or code, or a snippet that draws an icon |
481
+ | children | the control on the right (the toolkit's `Content`) |
482
+ | `isClickEnabled`, `onclick` | the card is a `Button`: focus, Enter and Space, a pressed state |
483
+ | `actionIcon`, `action` | the glyph at the end of a clickable card (default `ChevronRight`), or a snippet that replaces it |
484
+ | `isEnabled`, `automationId` | as on any control |
485
+ | `SettingsExpander`: `isExpanded`, `items` | `bind:isExpanded`; the items are `SettingsCard`s, which draw flat inside |
486
+
487
+ - Accessibility: a clickable card carries its header as the UI Automation name
488
+ and its description as the help text, and the expander is named after its
489
+ header; a card that is not clickable is a plain container whose texts are read
490
+ - Measured in a window (`test/settings-cards.test.ts`, the
491
+ `examples/settings-cards` example): a card is at least 68 px high, the
492
+ clickable card is named after its header, the items of a closed expander take
493
+ no room and show once it is open; the gallery has a `Settings cards` page
494
+ - Not there: the toolkit's `SettingsCard.ContentAlignment`, `IsActionIconVisible`
495
+ and its automatic wrapping into two rows on a narrow window; the content sits
496
+ on the right at its own size
497
+
297
498
  ## Connected animation (`winui-svelte/connected-animation`)
298
499
 
299
500
  `connectElement({ key, element })` remembers an element as the start of a
@@ -310,6 +511,81 @@ connectElement({ key: "photo", element: thumbnail });
310
511
  startConnected({ key: "photo", element: hero });
311
512
  ```
312
513
 
514
+ ## Composition animations (`winui-svelte/composition`)
515
+
516
+ Expression and spring animations that the compositor runs on its own thread,
517
+ typed end to end: an expression is built from typed parts and prints its own
518
+ text, so a member a visual does not have, or an animation of the wrong kind
519
+ for its property, fails `tsc`
520
+ The scroll-linked animations of `animation-timeline` are built with the same
521
+ expression builder
522
+
523
+ - `visualReference(element)`: an element's visual for expressions to read;
524
+ its members are `VISUAL_MEMBERS` (`offset`, `scale`, `translation`,
525
+ `centerPoint` are three-component, `size` and `anchorPoint` two-component,
526
+ `opacity` and `rotationAngleInDegrees` scalars), and a vector member gives
527
+ its components (`offset.y`): a member is a `Vector2Member` or
528
+ `Vector3Member`, the expression of its kind with `x`, `y` (and `z`)
529
+ - An expression is a `ScalarExpression`, `Vector2Expression` or
530
+ `Vector3Expression`, each with `plus`, `minus` (its own kind, or a plain
531
+ number, `{ x, y }` or `{ x, y, z }`), `times`, `dividedBy` (a scalar),
532
+ `negated()` and `lerp({ to, amount })`; a scalar also has
533
+ `clamped({ min, max })`
534
+ `scalar(1)`, `vector2({ x, y })` and `vector3({ x, y, z })` make literals,
535
+ `reference({ name, members, source })` names any Composition object with the
536
+ members it declares (`ExpressionKind` gives each one's kind)
537
+ - `rawExpression({ kind, text, references })` is the escape hatch: expression
538
+ text as it is, with the kind it gives and the objects it names
539
+ - `scalarSpring`, `vector2Spring`, `vector3Spring` take `SpringOptions`:
540
+ `finalValue`, and optionally `initialValue`, `initialVelocity`,
541
+ `dampingRatio` (below 1 overshoots), `period` and `delay` in milliseconds
542
+ - `animateOnCompositor({ element, property, animation })` starts an expression
543
+ or a spring on a property of the element's visual (`offset`, `offset.x`,
544
+ `opacity`...; `translation` is enabled on the element when it is used) and
545
+ returns a `RunningAnimation`: `stop()`, and `finished`, which settles when a
546
+ spring comes to rest or the animation is stopped
547
+ `compositorAnimation({ property, animation })` is the same as an attachment,
548
+ stopped when the element goes or the attachment runs again
549
+ - `createPropertySet({ element, values })` makes a `CompositionPropertySet`
550
+ whose members are the keys of `values`, each a number, `{ x, y }` or
551
+ `{ x, y, z }`: `reference` reads them in expressions, `insert(changes)`
552
+ writes new values from the UI thread, `animate({ property, animation })`
553
+ drives one on the compositor, `close()` releases it
554
+
555
+ ```svelte
556
+ <script lang="ts">
557
+ import type { Border as BorderControl } from "#winui/microsoft/ui/xaml/controls/Border";
558
+ import { elementRef } from "winui-svelte";
559
+ import { Border } from "winui-svelte/components";
560
+ import { compositorAnimation, vector3Spring, visualReference } from "winui-svelte/composition";
561
+
562
+ const leader = elementRef<BorderControl>();
563
+ </script>
564
+
565
+ <Border
566
+ {@attach compositorAnimation({
567
+ property: "offset",
568
+ animation: vector3Spring({ finalValue: { x: 200, y: 0, z: 0 }, dampingRatio: 0.4, period: 80 })
569
+ })}
570
+ {@attach leader.attach}
571
+ />
572
+ {#if leader.current}
573
+ <Border
574
+ {@attach compositorAnimation({
575
+ property: "offset",
576
+ animation: visualReference(leader.current).offset.plus({ x: 0, y: 120, z: 0 })
577
+ })}
578
+ />
579
+ {/if}
580
+ ```
581
+
582
+ - Values read on the UI thread (`Visual.Offset`) are the last ones set there,
583
+ not the animated ones; read an animated value back from what is drawn
584
+ - Not there yet: `InteractionTracker` (input-driven inertia, which needs a
585
+ `VisualInteractionSource` redirected from a pointer press and bindings not
586
+ generated today) and springs as a CSS easing (`transition-timing-function`
587
+ has no spring function on the web to map)
588
+
313
589
  ## Scheduling (`winui-svelte`)
314
590
 
315
591
  ```ts
@@ -481,6 +757,7 @@ type WindowOptions<Props> = {
481
757
 
482
758
  interface AppWindow<Props> {
483
759
  readonly window: Window;
760
+ readonly handle: WindowHandle; // what chromeWindowSurface and the rest of the window API take
484
761
  readonly mounted: Mounted<Props> | null; // null for a control
485
762
  close(): void;
486
763
  onClosed(listener: () => void): void;
@@ -1090,7 +1367,7 @@ const vertical: Orientation = 1;
1090
1367
  | A path geometry (`GeometryInput`, on `PathIcon` and `Path`) | Path Markup Syntax text or a `Geometry` | `data="M0,0 L10,10"` |
1091
1368
  | A font family (`FontFamilyInput`) | a family name or a `FontFamily` | `"Segoe UI Variable"` |
1092
1369
  | A grid length (`GridLengthInput`) | pixels, or `GridLengthText` as XAML writes it | `"Auto"`, `"2*"`, `"120"` |
1093
- | The package's own | `Backdrop`, `WindowTheme`, `TitleBarHeight`, `WindowPresentation`, `PickerLocation`, `NavigationCacheMode`, `NavigationMode`, `MoveDirection`, `XamlKind`, `FocusKind`, `TrayGesture`, `TrayBalloonIcon` | `backdrop={Backdrop.mica}` |
1370
+ | The package's own | `Backdrop`, `WindowTheme`, `TitleBarHeight`, `WindowPresentation`, `PickerLocation`, `NavigationCacheMode`, `NavigationMode`, `MoveDirection`, `XamlKind`, `FocusKind`, `TrayGesture`, `TrayBalloonIcon`, `ConnectedAnimationKind`, `DialogResult`, `DialogButton` | `backdrop={Backdrop.mica}` |
1094
1371
 
1095
1372
  A WinUI enum's members keep WinUI's names and case (`"Minimal"`, not
1096
1373
  `"minimal"`), as the metadata and the docs have them; the package's own sets
@@ -1359,6 +1636,63 @@ frame
1359
1636
  `test/web.test.ts` loads one in a real window; it needs an ordinary
1360
1637
  desktop session (a sandboxed process cannot launch the browser, 0x8007139F)
1361
1638
 
1639
+ ### WebView2 bridge (`winui-svelte/messaging/web-view2`)
1640
+
1641
+ A Svelte app and the web content in a `WebView2` talk with the same
1642
+ request and response frames as every other transport, over
1643
+ `CoreWebView2.PostWebMessageAsJson` and `WebMessageReceived`
1644
+ Both are raised on the UI thread, where dynwinrt delivers callbacks
1645
+
1646
+ ```ts
1647
+ import { defineMessaging } from "winui-svelte/messaging";
1648
+ import { webView2Transport } from "winui-svelte/messaging/web-view2";
1649
+
1650
+ // control is the WebView2 (the sender of oncorewebview2initialized)
1651
+ const transport = webView2Transport({ control, allowedOrigins: ["https://app.example"] });
1652
+ const bridge = defineMessaging<AppProtocol>({ transport });
1653
+ bridge.onMessage("save", ({ data }) => save(data));
1654
+ const title = await bridge.sendMessage("title");
1655
+ transport.dispose();
1656
+ ```
1657
+
1658
+ ```ts
1659
+ // in the web page's bundle
1660
+ import { createPageTransport, defineMessaging } from "winui-svelte/messaging/page";
1661
+
1662
+ const bridge = defineMessaging<AppProtocol>({ transport: createPageTransport() });
1663
+ ```
1664
+
1665
+ - The transport starts the browser (`EnsureCoreWebView2Async`) and waits for
1666
+ it (a control with no `source` does not start on its own, and a page set
1667
+ from `oncorewebview2initialized` can be overtaken by the `source` navigation;
1668
+ the example loads its page from the first `onnavigationcompleted`); frames sent before it is ready are kept and posted in order
1669
+ - `dispose()` stops listening, drops the queue and closes the link
1670
+ - `window.chrome.webview` is in every page WebView2 loads, so the page needs
1671
+ no injected script; `addDocumentCreatedScript` is for the scripts an app adds
1672
+ of its own
1673
+ - Every incoming message is parsed as JSON and checked against
1674
+ `allowedOrigins` (the origin of the page that posted it); a message that
1675
+ fails either is dropped and reported through the listener's `malformed`
1676
+ Without `allowedOrigins` every page is trusted, which suits only content the
1677
+ app ships; a page that is not the app's own needs the list
1678
+ - Nothing received is evaluated, and `AreHostObjectsAllowed` is switched off;
1679
+ the bridge never calls `AddHostObjectToScript`
1680
+
1681
+ | Helper | What |
1682
+ |---|---|
1683
+ | `waitForCoreWebView2(control)` | resolves with the `CoreWebView2` once the browser started |
1684
+ | `executeScript({ control, code })` | runs script in the page and resolves with its JSON value, checked |
1685
+ | `addDocumentCreatedScript({ control, code })` | runs script before every page script; resolves with the function that removes it |
1686
+ | `openDevTools(control)` | opens the developer tools window |
1687
+ | `getCookies`, `setCookie`, `deleteCookie` | the profile's cookies as plain data (`CookieSameSite`) |
1688
+ | `onPermissionRequested({ control, decide })` | answers permission requests with a `PermissionState` (`default`, `allow`, `deny`) for a `PermissionKind` |
1689
+ | `onDownloadStarting({ control, pathFor })` | sends a download to a path with no dialog, or cancels it with `null` |
1690
+ | `onNavigationStarting({ control, isAllowed })` | cancels the navigations `isAllowed` refuses |
1691
+
1692
+ `examples/web-bridge` is an app talking to a hosted page, and
1693
+ `test/web-bridge.test.ts` runs it in a real window; it needs an ordinary
1694
+ desktop session (a sandboxed process cannot launch the browser, 0x8007139F)
1695
+
1362
1696
  ### ListView and GridView
1363
1697
 
1364
1698
  ```svelte
@@ -1533,9 +1867,26 @@ changes or the window closes)
1533
1867
  `"transparent"` shows the desktop through every pixel the content leaves clear,
1534
1868
  with per-pixel alpha: the window gets a fully clear composition brush behind
1535
1869
  its content (`ICompositionSupportsSystemBackdrop`; the Windows App SDK's
1536
- `TransparentTintBackdrop` is not in the metadata of the releases restored, 2.2
1537
- and 2.3, so it cannot be generated)
1870
+ `TransparentTintBackdrop` is in no runtime from 2.3 to 2.6.5 and not in the
1871
+ metadata restored, 2.2, so it cannot be generated), and the whole window
1872
+ becomes the window manager's frame (`DwmExtendFrameIntoClientArea` with every
1873
+ margin -1) with square corners (`DWMWA_WINDOW_CORNER_PREFERENCE` do-not-round),
1874
+ which also drops the outline and the shadow Windows 11 draws round a rounded
1875
+ window
1876
+ Without the frame step the clear pixels read black, not the desktop; it is
1877
+ applied again whenever `isBorderless` changes, since WinUI's presenter undoes
1878
+ the corner preference
1538
1879
  `window.systemBackdrop` reads null for it
1880
+ Measured on Windows 11 build 26300 with the Windows App SDK runtimes 2.3 to
1881
+ 2.6.5 installed; no other Windows build has been run, and the corner preference
1882
+ exists on Windows 11 only
1883
+ A window on a desktop of its own (a hidden desktop) is never composed by
1884
+ Windows, so there is nothing to see through to: `test/transparent-window.test.ts`
1885
+ reads the screen of the ordinary desktop for that reason
1886
+ Not checked: a filter or a drop shadow (`filter: drop-shadow()`) on content
1887
+ over a transparent window
1888
+ The window's own `cornerRadius` clips with an edge that is not anti-aliased, so
1889
+ round the card's own `corner-radius` instead
1539
1890
  Pair it with `isBorderless` and content that sets no background of its own
1540
1891
  A floating card over a transparent window:
1541
1892
 
@@ -1564,6 +1915,18 @@ taking focus
1564
1915
  `onboundschanged` hears the bounds the window opened with and
1565
1916
  then every move or resize (device pixels), so an app that reopens the window
1566
1917
  where it was has them before the user touches it
1918
+ `stateKey` keeps the window where its user leaves it: the bounds (the normal
1919
+ ones, also while it is maximized), the maximized or minimized state and the
1920
+ presentation are saved in `%LOCALAPPDATA%\<app>\window-state\<stateKey>.json`,
1921
+ written a moment after each move, resize or state change and again when the
1922
+ window closes, and restored before the window first shows
1923
+ The restored bounds are kept whole inside the work area of the display nearest
1924
+ to them (a display that is gone, or smaller, never leaves the window off
1925
+ screen) and are resized to the scale of the display they land on
1926
+ On the first run, and when the file is missing, corrupt or from another
1927
+ version, `placement` or the centered default applies; a saved place wins over
1928
+ `placement`, and a `presentation` prop wins over the saved presentation
1929
+ `stateKey` is read once, before the window opens
1567
1930
  `onclosing` runs when the window is asked to close (the close button, Alt+F4,
1568
1931
  `handle.close()`): returning `true` keeps it open (ask the user, then close it
1569
1932
  again from code); `onclosed` follows a close that went through
@@ -1576,6 +1939,10 @@ content's requested theme and the caption buttons'
1576
1939
  `titleBarHeight` is
1577
1940
  `"standard"` or `"tall"` (for a title bar that holds a search box or tabs; it
1578
1941
  applies when the content extends into the title bar)
1942
+ `iconShowOptions` is `"showIconAndSystemMenu"` (the default) or
1943
+ `"hideIconAndSystemMenu"`: whether the title bar shows the window's icon and
1944
+ opens the system menu on a click on it (`AppWindowTitleBar.IconShowOptions`;
1945
+ it is set again to the default when the prop is dropped)
1579
1946
  `captionButtons` sets
1580
1947
  the colors of the minimize, maximize and close buttons: `foreground`,
1581
1948
  `background`, `hover*`, `pressed*` and `inactive*` (each `Foreground` or
@@ -1597,7 +1964,9 @@ The size limits and
1597
1964
  `isAlwaysOnTop` are the windowed presentation's, and are set again when the
1598
1965
  window returns to it
1599
1966
  A window that is only its content (a pill, an overlay, a splash screen) is made
1600
- of the frame props: `isBorderless` (no frame, no title bar),
1967
+ of the frame props: `isBorderless` (no frame, no title bar; the window keeps its
1968
+ 8 device pixel resize frame, which shrinks the client area and paints a strip
1969
+ along the top, until `isResizable={false}` takes it away),
1601
1970
  `isShownInSwitchers` and `isToolWindow` (no taskbar button or Alt+Tab entry),
1602
1971
  `isActivatable={false}` (a click never takes focus), `isClickThrough`,
1603
1972
  `isExcludedFromCapture` (black in screenshots and screen sharing),
@@ -1671,6 +2040,22 @@ device-independent pixels at the window's scale), over `AppWindow.Resize` and
1671
2040
  `AppWindow.Move`
1672
2041
  A process has many windows, so there is no `window` global for them
1673
2042
 
2043
+ `handle.windowControlsOverlay` is `navigator.windowControlsOverlay` for the
2044
+ window: `visible` (the content extends into the title bar),
2045
+ `getTitlebarAreaRect()` (the part of the title bar the content may use, from
2046
+ the system's icon to the caption buttons, as `x`, `y`, `width`, `height`,
2047
+ `left`, `top`, `right` and `bottom` in CSS pixels, all zeros while `visible`
2048
+ is false) and `ongeometrychange` (a `geometrychange` event with
2049
+ `titlebarAreaRect` and `visible`, fired when the area or `visible` changes)
2050
+ It reads `AppWindowTitleBar.LeftInset`, `RightInset` and `Height` (device
2051
+ pixels, divided by the scale) and the client width; the left inset is the
2052
+ caption buttons in a right-to-left window
2053
+ It follows the window from the first read of the property until the window
2054
+ closes, on `AppWindow.Changed` (a size, DPI or presenter change)
2055
+ Limits: the CSS `env(titlebar-area-x)`, `titlebar-area-width` and the rest are
2056
+ not supported (WinUI has no run-time lengths, so the translator reports them
2057
+ as an error); lay the title bar out from `getTitlebarAreaRect()` instead
2058
+
1674
2059
  `owner` (another window's `WindowHandle`) and `isModal`
1675
2060
  (blocks the owner until this window closes) are read once, before the window
1676
2061
  opens; `createWindow` takes them too
@@ -1898,6 +2283,20 @@ The animation target is attached on every timeline: `storyboardTarget`,
1898
2283
  `storyboardTargetName` and `storyboardTargetProperty` call
1899
2284
  `Storyboard.SetTarget`, `SetTargetName` and `SetTargetProperty`
1900
2285
 
2286
+ ### A refused change
2287
+
2288
+ A bound property (`bind:isOn`, `bind:isChecked`, `bind:value` and the rest) is
2289
+ two-way: the user's change is written to the bound prop, and the prop's value
2290
+ is written to the control
2291
+ When the app refuses the change (a function binding whose setter leaves the
2292
+ state as it was, or a handler that puts it back) the prop does not change, so
2293
+ nothing would write it to the control; after the app has been told, in the next
2294
+ Svelte tick, the control is set back to what the prop holds, so a refused
2295
+ toggle snaps back with no `await tick()` and no write to the control in the
2296
+ handler
2297
+ `test/refused-toggle.test.ts` proves it in a window for a `ToggleSwitch` and a
2298
+ `CheckBox`
2299
+
1901
2300
  ### Observed state
1902
2301
 
1903
2302
  Read-only state WinUI reports by an event is a bindable prop the control
@@ -2089,7 +2488,7 @@ read and write the file with `node:fs`
2089
2488
  ### App lifecycle (`winui-svelte/app`)
2090
2489
 
2091
2490
  ```ts
2092
- import { ensureSingleInstance, notify } from "winui-svelte/app";
2491
+ import { ensureSingleInstance, notify, relaunch, restartAfterCrash } from "winui-svelte/app";
2093
2492
 
2094
2493
  const single = ensureSingleInstance({
2095
2494
  key: "com.example.notes",
@@ -2109,6 +2508,9 @@ notify({
2109
2508
  iconPath: "C:\notes\icon.png",
2110
2509
  appUserModelId: "com.example.notes",
2111
2510
  });
2511
+
2512
+ relaunch({ arguments: ["--after-update"], instance: single });
2513
+ restartAfterCrash({ arguments: ["--recovered"] });
2112
2514
  ```
2113
2515
 
2114
2516
  An opt-in subpath: an app that does not import it does not bundle it
@@ -2150,6 +2552,379 @@ An opt-in subpath: an app that does not import it does not bundle it
2150
2552
  With package identity (an MSIX or sparse package) it is the supported case
2151
2553
  `ensureSingleInstance` needs no identity: `test/app.test.ts` starts a real
2152
2554
  second copy and checks that the first hears its arguments
2555
+ - `activateInstance({ key, activation })` is for a process that is not the
2556
+ app (a tray, a launcher): it sends the same JSON line to the copy that
2557
+ serves `key` and resolves with true, or with false when no copy runs
2558
+ Unlike a later copy it never claims the pipe, so it cannot become the
2559
+ first copy by mistake
2560
+ The running copy's `onRedirect` receives `activation`
2561
+ - `launchApp({ command, arguments, workingDirectory })` starts a program
2562
+ that outlives the caller: detached, no console window, no shared handles
2563
+ - `activateOrLaunch({ key, activation, launch })` is the two together: it
2564
+ activates the running copy, or else starts the app with `launch`, and
2565
+ resolves with true for the first and false for the second
2566
+ - `relaunch({ arguments })` starts the same Node with the same flags, entry
2567
+ script (`process.argv[1]`) and then `arguments`, detached, and calls
2568
+ `exitApplication`, so the new copy outlives this one
2569
+ Pass `instance` (the `ensureSingleInstance` result) to release the claim
2570
+ first; otherwise the new copy finds the old one still serving the key and
2571
+ redirects to it
2572
+ An app whose windows run in a worker thread passes `entryScript`, the script
2573
+ that starts the process, because `process.argv[1]` there is the worker's
2574
+ - `restartAfterCrash({ arguments, conditions })` is
2575
+ `RegisterApplicationRestart`: Windows starts the same Node and entry
2576
+ script with `arguments` after a crash, a hang, an update that closes the
2577
+ app or a reboot for one; `conditions` is a subset of `RestartCondition`
2578
+ (`crash`, `hang`, `update`, `reboot`; all by default)
2579
+ Limits: no callback (a crashed Node cannot run code, so
2580
+ `RegisterApplicationRecoveryCallback` is not offered); Windows restarts
2581
+ only an app that ran for 60 seconds; after a crash or a hang the user is
2582
+ offered the restart, and only after an update is it automatic; a normal
2583
+ exit is never restarted; a command line too long for Windows throws
2584
+ `test/app.test.ts` checks the registration and that a normal exit starts
2585
+ nothing, and `relaunch` with a real second process (no crash is caused)
2586
+
2587
+ ### Activation (`winui-svelte/app/activation`)
2588
+
2589
+ Starting the app from a link, a file or sign-in, without an installer
2590
+ An opt-in subpath: an app that does not import it does not bundle it, and
2591
+ nothing is written to Windows until a registration function is called
2592
+
2593
+ ```ts
2594
+ import {
2595
+ ActivationKind,
2596
+ installProtocolHandlers,
2597
+ launchAtLogin,
2598
+ registerFileTypes,
2599
+ startActivation,
2600
+ } from "winui-svelte/app/activation";
2601
+
2602
+ installProtocolHandlers();
2603
+ navigator.registerProtocolHandler("note", "https://notes.example/open?uri=%s");
2604
+ registerFileTypes({ id: "com.example.notes", extensions: [".note"] });
2605
+ launchAtLogin({ id: "com.example.notes", isEnabled: true });
2606
+
2607
+ const single = startActivation({
2608
+ key: "com.example.notes",
2609
+ window: mainWindow,
2610
+ extensions: [".note"],
2611
+ onActivation(event) {
2612
+ if (event.kind === ActivationKind.protocol) open(new URL(event.uri));
2613
+ if (event.kind === ActivationKind.file) openFiles(event.files);
2614
+ },
2615
+ });
2616
+ if (!single.isPrimary) {
2617
+ exitApplication();
2618
+ }
2619
+ ```
2620
+
2621
+ | Web API or extra | Windows | Notes |
2622
+ |---|---|---|
2623
+ | `navigator.registerProtocolHandler(scheme, url)` | `HKCU\Software\Classes\<scheme>` with `URL Protocol` and `shell\open\command` | `url` must hold `%s` (`SyntaxError` otherwise) and is not used further: the handler is always this app |
2624
+ | `navigator.unregisterProtocolHandler(scheme, url)` | deletes that key | only a key the package wrote; another program's is left alone |
2625
+ | `registerFileTypes({ id, extensions, description })` | a ProgID `<id><extension>` and the extension's `OpenWithProgids` | the app is listed in Open with; the default stays the user's choice |
2626
+ | `unregisterFileTypes({ id, extensions })` | deletes both and the empty keys left | returns the extensions removed |
2627
+ | `launchAtLogin({ id, isEnabled, arguments })` | `HKCU\Software\Microsoft\Windows\CurrentVersion\Run` value `id` | listed in Settings, Apps, Startup; the start arrives as `startup` |
2628
+ | `getLaunchAtLogin({ id })` | reads that value | `{ isEnabled, commandLine }`; the user's switch in Settings is not read |
2629
+ | `startActivation({ key, onActivation })` | `ensureSingleInstance` and the command line | one `ActivationEvent` per start or redirect |
2630
+
2631
+ - `ActivationEvent` is a union on `kind` (`ActivationKind`, also from
2632
+ `winui-svelte/enums`): `launch` (started by hand), `file` (`files`, absolute
2633
+ paths of existing files), `protocol` (`uri`, `scheme`), `startup` (started
2634
+ at sign-in), `redirect` (a later copy with nothing to open) and `jumpList`
2635
+ (`taskId`, a task of the jump list was chosen; see Jump list tasks) and
2636
+ `alarm` (`alarm`, an alarm of `winui-svelte/app/schedule` went off; it also
2637
+ reaches `onAlarm`)
2638
+ Every event has `isRedirect`, `arguments` and `workingDirectory`; a link
2639
+ sent by a later copy is `protocol` with `isRedirect: true`
2640
+ - An alarm wins over a jump list task, a jump list task wins over a link, a link wins over files, files win over the startup marker; an argument
2641
+ that fits none stays in `arguments`
2642
+ Arguments are checked with a schema (up to 1024 of them, up to 32767
2643
+ characters each, no NUL); a failure goes to `onError`, the rest go on
2644
+ - Events arrive in order, one at a time, in the first copy; the later copy
2645
+ gets `isPrimary: false` and exits
2646
+ Redirects are also handed to `launchQueue.enqueueActivation` when you pass
2647
+ `launchQueue`; the first start's command line reaches `launchQueue` through
2648
+ `installLaunch`
2649
+ - The command Windows runs is this process's `node.exe`, its flags and its
2650
+ entry script, then `"%1"`; pass `command: { program, arguments }` for a
2651
+ bundled executable
2652
+ The Windows App SDK's `ActivationRegistrationManager` takes an executable path
2653
+ and no arguments, so for `node.exe` it cannot name the script; the registry route is the one it writes underneath, and needs
2654
+ no package identity
2655
+ - Security: only `HKEY_CURRENT_USER` is ever opened, never
2656
+ `HKEY_LOCAL_MACHINE`
2657
+ Schemes follow RFC 3986 (a letter, then letters, digits, `+`, `-` and `.`,
2658
+ two characters or more) and `http`, `https`, `file`, `ftp`, `mailto`, `ms-*`
2659
+ and the other system and browser schemes are a `SecurityError`; so are
2660
+ extensions that run code (`.exe`, `.bat`, `.js`, `.lnk` and so on)
2661
+ Every key the package creates carries a `WinuiSvelte` value, and it
2662
+ overwrites or deletes only keys that carry it; a scheme or ProgID that
2663
+ another program owns is an `InvalidStateError`
2664
+ A received link is data: it is validated (no control characters, 8192
2665
+ characters at most) and handed to your code, never run
2666
+ Windows can pass a quote in a link through `"%1"` unescaped, so treat the
2667
+ whole of `uri` as untrusted
2668
+ - Needs packaging for: the share target and a default-app claim (a package
2669
+ manifest declares them); unpackaged, the app is offered in Open with and the
2670
+ user picks the default
2671
+ - `installProtocolHandlers()` returns the function that removes the two
2672
+ navigator methods; the registrations stay until you unregister them
2673
+ Each registration function takes `registry` (a fake in tests) and `command`
2674
+ - `src/app/activation/native.test.ts` registers a protocol, a file type and a
2675
+ startup entry under HKCU with a unique name, reads them with `reg query`,
2676
+ removes them and checks nothing is left, even when it fails;
2677
+ `test/activation.test.ts` starts real second copies with a link, a file and
2678
+ nothing, and checks the first hears each as one event
2679
+
2680
+ ### Jump list tasks (`winui-svelte/app/jump-list`)
2681
+
2682
+ Entries in the Tasks section of the taskbar button's right-click menu
2683
+ (`ICustomDestinationList`, `IObjectCollection` and `IShellLink`)
2684
+ No package identity is needed; an opt-in subpath
2685
+ Thumbnail toolbar buttons cannot be built from Node (their click is a sent
2686
+ message that no hook receives), so a task is the way to put a command there
2687
+
2688
+ ```ts
2689
+ import { startActivation } from "winui-svelte/app/activation";
2690
+ import { setJumpListTasks } from "winui-svelte/app/jump-list";
2691
+
2692
+ const list = setJumpListTasks({
2693
+ tasks: [
2694
+ { id: "new-note", title: "New note", arguments: ["--new"] },
2695
+ { id: "inbox", title: "Open inbox", arguments: ["--inbox"], icon: "inbox.ico" },
2696
+ ],
2697
+ });
2698
+
2699
+ startActivation({
2700
+ key: "com.example.notes",
2701
+ window: mainWindow,
2702
+ onActivation(event) {
2703
+ const task = list.taskOf(event);
2704
+ if (task?.id === "new-note") newNote();
2705
+ },
2706
+ });
2707
+ ```
2708
+
2709
+ - `setJumpListTasks({ tasks, appUserModelId, command })` replaces the Tasks
2710
+ of the list and returns `{ tasks, taskOf(event) }`; `tasks` is a `const`
2711
+ generic, so `task.id` is the union of your ids
2712
+ - `clearJumpList({ appUserModelId })` deletes the whole list
2713
+ - A `JumpListTask` is `{ id, title, arguments, description, icon, iconIndex,
2714
+ workingDirectory }`; `id` is letters, digits, `_`, `.` and `-`, 64 at most,
2715
+ and unique; `icon` is a file path (`PictureSource`, but a `data:`, `http(s)`
2716
+ or `ms-appx` URI is a `TypeError`): an .ico, or an .exe or .dll with
2717
+ `iconIndex`
2718
+ - A click starts `command` (this process's Node and entry script by default,
2719
+ as `registerFileTypes` does; a bundled executable passes its own) with the
2720
+ marker `--winui-svelte-jump-list=<id>` and then the task's `arguments`,
2721
+ quoted for `CommandLineToArgvW`
2722
+ `startActivation` hands that to the running copy through the single
2723
+ instance redirect as a `jumpList` event: `taskId` is the id and `arguments`
2724
+ are the task's own; a first start gets the same event with `isRedirect:
2725
+ false`
2726
+ - The list belongs to the process's AppUserModelID and Windows shows nothing,
2727
+ without an error, when a window has another; so the call throws when the
2728
+ process has none (give `<Window>` an `appUserModelId`, or call
2729
+ `joinAppUserModel`) or when `appUserModelId` differs from it
2730
+ - Keep the tasks static, as Microsoft advises: set them once at start
2731
+ - Call it on a thread with COM (the UI thread of a window has it)
2732
+ - `src/app/jump-list/native.test.ts` commits a list under a unique
2733
+ AppUserModelID in the test process, checks that Windows wrote its
2734
+ custom destinations file, and deletes the list, even when it fails
2735
+
2736
+ ### Shell verbs (`winui-svelte/app/shell`)
2737
+
2738
+ What Explorer's context menu does, from code
2739
+ There is no web API for these; the names follow the launcher helpers of
2740
+ `winui-svelte/data-transfer`, which stay the home of `launchUri`,
2741
+ `launchFile`, `openFolder` and `revealInExplorer`
2742
+ An opt-in subpath: an app that does not import it does not bundle it
2743
+
2744
+ ```ts
2745
+ import { createShortcut, openWith, readShortcut, registerAppPath, trash } from "winui-svelte/app/shell";
2746
+
2747
+ const result = trash({ paths: ["C:\\Users\\me\\old.txt"] });
2748
+ if (!result.ok) console.warn(result.reason, result.message);
2749
+
2750
+ createShortcut({
2751
+ path: "C:\\Users\\me\\Desktop\\Notes.lnk",
2752
+ target: "C:\\Apps\\notes.exe",
2753
+ arguments: ["--open", "my notes.txt"],
2754
+ workingDirectory: "C:\\Apps",
2755
+ icon: { path: "C:\\Apps\\notes.exe", index: 0 },
2756
+ description: "Open my notes",
2757
+ });
2758
+ const link = readShortcut({ path: "C:\\Users\\me\\Desktop\\Notes.lnk" });
2759
+ await openWith({ path: "C:\\Users\\me\\photo.png" });
2760
+ registerAppPath({ name: "notes", program: "C:\\Apps\\notes.exe" });
2761
+ ```
2762
+
2763
+ - Every verb returns `{ ok: true }` or `{ ok: false, reason, message }`;
2764
+ `reason` is a `ShellFailure` (`invalid`, `not-found`, `exists`,
2765
+ `owned-by-another`, `aborted`, `failed`)
2766
+ - These act on the user's own files; they check and then act, and none
2767
+ asks the user first
2768
+ - Paths are data: each must be a full path with no control character and not a
2769
+ device path; none is built into a command line
2770
+ - `trash` sends to the Recycle Bin (`SHFileOperationW` with
2771
+ `FOF_ALLOWUNDO`) and never deletes for good; when Windows would have to
2772
+ (a drive without a bin, a file too big for it) it asks, and nothing goes
2773
+ unless the user agrees; all the paths are checked before any is touched
2774
+ - `openWith` shows the Windows "Open with" list for a file
2775
+ (`LauncherOptions.DisplayApplicationPicker`), so it takes a file and never a
2776
+ program; it opens a dialog and is only unit-tested with a fake
2777
+ - `createShortcut` writes only the `.lnk` file (`IShellLink` and
2778
+ `IPersistFile`); each argument is quoted by the same rule as the
2779
+ activation registrations, and an existing file is kept unless
2780
+ `shouldOverwrite` is set; the target is not required to exist
2781
+ - `readShortcut` gives the target as stored, without searching for a moved
2782
+ one and without running anything
2783
+ - `registerAppPath` writes a key under `HKEY_CURRENT_USER` (App Paths) with a
2784
+ marker value, only when the key is free or the package made it;
2785
+ `unregisterAppPath` removes only a key with the marker; the name is an
2786
+ identifier that is not a name Windows or a common tool answers to, and the
2787
+ program is a full path ending in `.exe`; the machine-wide hive is out of reach
2788
+ - A shortcut that carries an AUMID (for toast identity) is not offered yet
2789
+ - `src/app/shell/native.test.ts` recycles a file, writes and reads a
2790
+ shortcut in a folder it creates under the temp directory and removes, and
2791
+ registers and removes an App Paths alias with a unique name
2792
+
2793
+ ### Alarms (`winui-svelte/app/schedule`)
2794
+
2795
+ Starts the app at a time, once or on a repeat, through Task Scheduler, and
2796
+ tells it which alarm went off
2797
+ The shape is `chrome.alarms` (`create`, `get`, `getAll`, `clear`, `clearAll`,
2798
+ `onAlarm`, the `Alarm` type) with promises instead of callbacks, and
2799
+ `chrome.runtime.onStartup` for the start at sign-in
2800
+ An opt-in subpath: an app that does not import it does not bundle it
2801
+
2802
+ ```ts
2803
+ import { ActivationKind, startActivation } from "winui-svelte/app/activation";
2804
+ import * as alarms from "winui-svelte/app/schedule";
2805
+
2806
+ alarms.onAlarm.addListener(alarm => sync(alarm.name));
2807
+ alarms.onStartup.addListener(() => restoreSession());
2808
+ startActivation({ key: "my-app", onActivation: () => {} });
2809
+
2810
+ await alarms.create("nightly-sync", { when: Date.now() + 3_600_000, periodInMinutes: 1440 });
2811
+ await alarms.get("nightly-sync"); // { name, scheduledTime, periodInMinutes: 1440 }
2812
+ await alarms.getAll(); // every alarm this package made
2813
+ await alarms.clear("nightly-sync"); // true
2814
+ await alarms.clearAll(); // false
2815
+ ```
2816
+
2817
+ - `create(name, { when, delayInMinutes, periodInMinutes })` is Chrome's:
2818
+ `when` is milliseconds since 1970, `delayInMinutes` counts from now, and
2819
+ with only `periodInMinutes` the first run is one period away; `when` and
2820
+ `delayInMinutes` together, or none of the three, throw; creating a name again
2821
+ replaces its alarm
2822
+ - `name` is letters, digits, `.`, `_` and `-` (a task name, not free text)
2823
+ - Chrome's one-minute minimum for `delayInMinutes` is not applied: a delay
2824
+ can be seconds, and a time in the past runs at once
2825
+ - `periodInMinutes` is 1 to 44640 (Task Scheduler cannot repeat faster than
2826
+ a minute, nor slower than 31 days)
2827
+ - Extras, optional members of the same object: `arguments` (reach the
2828
+ started copy after the entry script), `runWhenOnBattery` (true by
2829
+ default), `command` (a bundled executable instead of Node) and `backend`
2830
+ (a test)
2831
+ - `get`, `getAll`, `clear` and `clearAll` read and remove only the tasks in the
2832
+ `winui-svelte` folder of Task Scheduler, so a task of another program can
2833
+ neither be listed nor removed from here; `scheduledTime` is the next run
2834
+ - `onAlarm` and `onStartup` have `addListener`, `removeListener` and
2835
+ `hasListener`; they are called by `startActivation`, so call it for the
2836
+ alarms to arrive
2837
+ - A task runs the app again with a marker argument, which becomes an `alarm`
2838
+ activation (`event.alarm`) and also reaches `onAlarm`; if the app is open,
2839
+ the new copy hands the activation to it and exits, so the listener of the
2840
+ running app hears it, and if it is closed, the started copy hears it
2841
+ - `onStartup` is called for a `startup` activation, that is when Windows
2842
+ starts the app at sign-in; turning that start on or off is `launchAtLogin`
2843
+ of `winui-svelte/app/activation` (the Run key listed in Settings, Apps,
2844
+ Startup), which this module does not repeat
2845
+ - How it works: the package writes a Task Scheduler 1.2 XML definition to a
2846
+ private temporary file and runs `schtasks.exe /Create /XML` (found by
2847
+ `SystemRoot`), so no COM is involved; the task runs as the signed-in user
2848
+ with normal rights (no administrator), with no time limit, and a start
2849
+ missed while the PC was off is made up when it is next on; the alarm's first
2850
+ time and period are kept in the task's description, which is how `get`
2851
+ reads them back
2852
+ - A one-shot alarm's task deletes itself a day after its time
2853
+ - Limits:
2854
+ - The task runs only while the user is signed in
2855
+ - `schtasks` is the only gate: Group Policy can forbid task creation, and
2856
+ then `create` rejects with its message
2857
+ - Moving or reinstalling the app leaves a task that points at the old path
2858
+ until the alarm is created again
2859
+ - `src/app/schedule/schedule.test.ts` checks the generated XML, the quoting
2860
+ and escaping of arguments, the marker argument and the activation it
2861
+ becomes, and an alarm's round trip to a task and back over a fake backend; no
2862
+ real task is made
2863
+
2864
+ ### Global hotkeys (`winui-svelte/app/hotkeys`)
2865
+
2866
+ A system-wide key combination, heard whichever app has the focus
2867
+ A web page cannot own a global key, so there is no web API to mirror; the
2868
+ callback is told a `KeyboardEvent`-like object and the prop is the lowercase
2869
+ `onpressed`
2870
+ An opt-in subpath: an app that does not import it does not bundle it
2871
+
2872
+ ```ts
2873
+ import { registerHotkey } from "winui-svelte/app/hotkeys";
2874
+
2875
+ const hotkey = registerHotkey({
2876
+ keys: "ctrl+alt+k",
2877
+ onpressed: ({ keys }) => togglePalette(),
2878
+ });
2879
+ // later: hotkey.isRegistered, hotkey.unregister()
2880
+ ```
2881
+
2882
+ - `keys` is a string of modifiers and one key joined by `+`, in any case
2883
+ (`ctrl+alt+k`, `win+shift+f23`, `ctrl+5`, `f9`), or a typed object
2884
+ `{ modifiers: [HotkeyModifier.control], key: "k" }`
2885
+ Modifiers: `ctrl`/`control`, `alt`/`option`, `shift`, `win`/`windows`/`meta`/`super`
2886
+ Keys are named as `KeyboardEvent.code` names them, lowercase: letters,
2887
+ `digit0` to `digit9` (a bare `5` works in a string), `f1` to `f24`, `numpad0`
2888
+ to `numpad9`, `arrowleft`, `escape`, `space`, `minus`, `equal`,
2889
+ `bracketleft`, the media and volume keys
2890
+ `KeyCode` (in `winui-svelte/enums`, spelled as `KeyboardEvent.code` is) is the
2891
+ table every key name maps from to its virtual-key code, the same one the
2892
+ input events name keys with, and `HotkeyModifier` holds the modifiers
2893
+ A few aliases are accepted in a string (`esc`, `del`, `left`, `pgup`)
2894
+ A modifier named twice, no key, two keys or an unknown name throws
2895
+ `HotkeyParseError`
2896
+ - `onpressed` runs on the UI thread with `{ keys, key, modifiers, ctrlKey,
2897
+ altKey, shiftKey, metaKey }`; holding the keys down presses once, because
2898
+ `MOD_NOREPEAT` is the default (`isRepeatAllowed: true` lifts it)
2899
+ An error thrown by the callback goes to `onUiError` and the hotkey stays
2900
+ - Failures are typed and all extend `HotkeyError`: `HotkeyConflictError` when
2901
+ another app (or this one) owns the combination
2902
+ (`ERROR_HOTKEY_ALREADY_REGISTERED`), `HotkeyRefusedError` (with `code`) when
2903
+ Windows refuses it, `HotkeyParseError` for the string
2904
+ - `unregister()` gives the combination back and may be called twice
2905
+ In a component, register in an `$effect` and return the unregister, so a
2906
+ closed window releases it; Windows frees the rest when the thread ends
2907
+ - How it works: `RegisterHotKey` with no window posts `WM_HOTKEY` to the
2908
+ registering thread's queue, where no window procedure ever sees it
2909
+ The message pump (`createMessageSource`) offers each message it takes to a
2910
+ short list of hooks (`src/window/message-hooks.ts`) before the content and
2911
+ `DispatchMessage`, and the hotkey registry is one hook
2912
+ Any thread that runs the package's pump hears the hotkeys registered on it,
2913
+ a tray-only app with no window included; the registry and the hook list are
2914
+ one per thread
2915
+ - Limits:
2916
+ - Nothing is heard while the pump is not running (before `runWindow` has
2917
+ started it, or after it stopped), and a callback waits for the message in
2918
+ front of it
2919
+ - Register on the thread whose pump runs, the UI thread
2920
+ - Windows reserves some combinations (`win+l`, `ctrl+alt+delete`, and others
2921
+ the shell owns): they throw `HotkeyRefusedError` or `HotkeyConflictError`
2922
+ - The first app to register a combination owns it; the only way to know is
2923
+ to try, and to ask the user for another when it throws
2924
+ - A key with no modifier (`f9`) is taken from every app
2925
+ - `test/hotkeys.test.ts` registers `ctrl+alt+shift+f23` in a real window and
2926
+ posts `WM_HOTKEY` to the thread itself with `PostThreadMessageW`; no key is
2927
+ pressed
2153
2928
 
2154
2929
  ### System tray (`winui-svelte/tray`)
2155
2930
 
@@ -2272,6 +3047,585 @@ window's content
2272
3047
  A Tauri or Electron host that already has a tray should keep it: two icons
2273
3048
  would show, and this one lives and dies with the WinUI window's process
2274
3049
 
3050
+ ### One tray menu for every renderer (`winui-svelte/tray/menu`)
3051
+
3052
+ A pure model of a tray menu: no WinUI, no Win32, so it runs under
3053
+ `node --test` and in a tray-only bundle
3054
+ You declare items once; the user picks how much of the menu to see, from the
3055
+ simple menu of a dictation app to the long one of a screenshot tool, and then
3056
+ hides, shows and reorders single items; a renderer draws what `resolveMenu`
3057
+ returns
3058
+ An opt-in subpath: an app that does not import it does not bundle it
3059
+
3060
+ ```ts
3061
+ import { defineMenu, MenuItemKind, MenuLevel, resolveMenu } from "winui-svelte/tray/menu";
3062
+
3063
+ // The simple style: three commands and a separator, no levels set
3064
+ const simple = defineMenu([
3065
+ { kind: MenuItemKind.COMMAND, id: "toggle", label: "Start dictation" },
3066
+ { kind: MenuItemKind.COMMAND, id: "settings", label: "Settings" },
3067
+ { kind: MenuItemKind.SEPARATOR, id: "line" },
3068
+ { kind: MenuItemKind.COMMAND, id: "quit", label: "Quit", isRequired: true }
3069
+ ]);
3070
+
3071
+ // The complex style: the same model with levels
3072
+ const complex = defineMenu([
3073
+ { kind: MenuItemKind.HEADER, id: "capture-header", label: "Capture" },
3074
+ {
3075
+ kind: MenuItemKind.SUBMENU,
3076
+ id: "capture",
3077
+ label: "Capture",
3078
+ items: [
3079
+ { kind: MenuItemKind.COMMAND, id: "region", label: "Region", shortcut: "Ctrl+Shift+4" },
3080
+ { kind: MenuItemKind.COMMAND, id: "scroll", label: "Scrolling", level: MenuLevel.FULL }
3081
+ ]
3082
+ },
3083
+ {
3084
+ kind: MenuItemKind.SUBMENU,
3085
+ id: "recent",
3086
+ label: "Recent uploads",
3087
+ level: MenuLevel.STANDARD,
3088
+ emptyLabel: "Nothing uploaded yet",
3089
+ maxItems: 10,
3090
+ items: () => recentUploads().map(({ name }) => ({ kind: MenuItemKind.COMMAND, id: `recent-${name}`, label: name }))
3091
+ },
3092
+ {
3093
+ kind: MenuItemKind.CHECK,
3094
+ id: "autostart",
3095
+ label: "Start with Windows",
3096
+ level: MenuLevel.STANDARD,
3097
+ isChecked: () => isAutostart(),
3098
+ staysOpen: true
3099
+ },
3100
+ { kind: MenuItemKind.COMMAND, id: "quit", label: "Quit", isRequired: true }
3101
+ ]);
3102
+
3103
+ // Call it each time the menu opens: functions are read now
3104
+ const lines = resolveMenu({
3105
+ items: complex,
3106
+ profile: { level: MenuLevel.STANDARD, hidden: ["region"], shown: [], order: {} }
3107
+ });
3108
+ ```
3109
+
3110
+ - `MenuItem` is a union on `kind`: `command`, `check`, `radio`, `submenu`,
3111
+ `separator` and `header` (`MenuItemKind`); a field belongs to the kinds that
3112
+ have it, so a command with `isChecked` or a radio with no `group` fails to
3113
+ compile
3114
+ - Every item has a unique, stable `id`; the profile of the user is keyed by it
3115
+ `defineMenu` keeps the ids as literal types, and `MenuProfile` typed with
3116
+ `MenuIds` of the menu (and the `profile` of `resolveMenu`) rejects an id
3117
+ that is not in the menu
3118
+ - `level` is the lowest detail level that shows the item (`MenuLevel`:
3119
+ `simple`, `standard`, `full`; `simple` when left out); `isRequired` cannot
3120
+ be hidden by the user
3121
+ - `label`, `isEnabled`, `isVisible`, `isChecked`, `isBold` and `badge` may be
3122
+ a value or a function, read each time `resolveMenu` runs
3123
+ - `items` of a submenu may be a function that makes the children each time;
3124
+ `sort` and `maxItems` order and cap such a list, and `emptyLabel` shows a
3125
+ disabled line when it is empty instead of dropping the submenu
3126
+ - `staysOpen` keeps the menu open after the pick (the renderer then refreshes
3127
+ labels and ticks only); `closeThenRun` (true unless set to false) runs
3128
+ `onselect` after the menu has closed, so that a dialog can open
3129
+ - A submenu may have its own `onselect` and `autoExpand`
3130
+ - `icon` is a path, a glyph or `IconPixels`; `shortcut` is display text only,
3131
+ the menu does not bind the key
3132
+ - `MenuProfile` is plain JSON: `level`, `hidden` (ids the level shows that
3133
+ the user hid), `shown` (ids above the level that the user turned on) and
3134
+ `order` (child ids in the user order, keyed by parent id, `""` for the root)
3135
+ - `resolveMenu({ items, profile })` returns `ResolvedMenuItem[]`: final text,
3136
+ booleans and a `select()` per line, with separators collapsed, headers with
3137
+ nothing under them dropped and empty submenus dropped; it throws
3138
+ `MenuModelError` for a repeated id or a radio with no group
3139
+ - `describeMenu({ items })` lists every item with its id, kind, label, level,
3140
+ parent id and `isRequired`, for an editor
3141
+ - `defaultProfile({ level })`, `parseProfile({ value })` and `profileSchema`
3142
+ (a field that is wrong falls back to its default, nothing throws),
3143
+ `loadProfile({ file })` and `saveProfile({ file, profile })` (the file is
3144
+ replaced atomically)
3145
+ - Not in the model: the actions of the icon itself (left, double and middle
3146
+ click) stay on the tray icon options
3147
+
3148
+ ### The tray menu in a window (`winui-svelte/tray/menu/svelte`)
3149
+
3150
+ The model of `winui-svelte/tray/menu` drawn by `<TrayIcon>` as a WinUI
3151
+ `MenuFlyout`, from an array or from markup
3152
+ An opt-in subpath; a consumer that imports only `winui-svelte/tray/menu`
3153
+ bundles no Svelte and no component
3154
+
3155
+ ```svelte
3156
+ <script lang="ts">
3157
+ import { MenuLevel } from "winui-svelte/enums";
3158
+ import { TrayIcon } from "winui-svelte/tray";
3159
+ import { TrayMenu, TrayMenuItem, TrayMenuSeparator, TrayMenuSubmenu } from "winui-svelte/tray/menu/svelte";
3160
+
3161
+ let isAutostart = $state(false);
3162
+ let recent = $state(["a.png", "b.png"]);
3163
+ </script>
3164
+
3165
+ <TrayIcon icon="app.ico" tooltip="My app">
3166
+ <TrayMenu profile={savedProfile}>
3167
+ <TrayMenuItem id="open" label="Open" onselect={showWindow} />
3168
+ <TrayMenuItem id="autostart" kind="check" label="Start with Windows"
3169
+ isChecked={isAutostart} level={MenuLevel.STANDARD} staysOpen
3170
+ onselect={() => (isAutostart = !isAutostart)} />
3171
+ <TrayMenuSubmenu id="recent" label="Recent" emptyLabel="Nothing yet">
3172
+ {#each recent as name (name)}
3173
+ <TrayMenuItem id={`recent.${name}`} label={name} />
3174
+ {/each}
3175
+ </TrayMenuSubmenu>
3176
+ <TrayMenuSeparator id="line" />
3177
+ <TrayMenuItem id="quit" label="Quit" isRequired onselect={quit} />
3178
+ </TrayMenu>
3179
+ </TrayIcon>
3180
+ ```
3181
+
3182
+ - `<TrayIcon menu={items} profile={profile}>` takes the array of
3183
+ `defineMenu` instead of markup, or the `menu` snippet of a hand-written
3184
+ flyout as before; the three never mix
3185
+ The ids of the array stay literal, so `profile` rejects an id the menu does
3186
+ not have
3187
+ - `<TrayMenu>` and its children are inert elements: they draw nothing, the
3188
+ tray walks the tree each time the menu opens, so order, nesting, `{#if}`,
3189
+ keyed `{#each}` and reactive props all work, with no second renderer
3190
+ - The props are the fields of the model's own items (`TrayMenuItem` takes a
3191
+ `kind` of `command`, `check` or `radio`; a tick on a command or a radio with
3192
+ no `group` fails `svelte-check`), and an unknown attribute fails too
3193
+ - Markup cannot carry a literal union, so ids written in markup are plain
3194
+ `string`; the exported `collectMenu` reads a `TrayMenu` element into the same
3195
+ `MenuItem[]`
3196
+ - A `TrayMenu` has a `profile` of its own, used for its lines
3197
+ `profile` on `TrayIcon` applies to `menu={items}`
3198
+ - The flyout is built from `resolveMenu` each time the menu opens: a command is
3199
+ a `MenuFlyoutItem`, a check a `ToggleMenuFlyoutItem`, a radio a
3200
+ `RadioMenuFlyoutItem` (its `group` is the `GroupName`), a submenu a
3201
+ `MenuFlyoutSubItem`, a header a disabled bold item
3202
+ `isBold` is the font weight; `icon` is drawn as a glyph (`FontIcon`) or, for
3203
+ a path to an `.ico` or `.png`, an `ImageIcon`; `IconPixels` is not drawn
3204
+ A flyout has one trailing column, the keyboard accelerator's, so it shows
3205
+ the `badge` and then the `shortcut` as text
3206
+ - `onselect` runs after the flyout has closed, on the next turn
3207
+ (`closeThenRun`, true unless set to false)
3208
+ - `staysOpen`: WinUI closes a flyout when an item is invoked, and offers no
3209
+ property to keep it open, so the item runs after the close and the flyout is
3210
+ built again from the model, at the same point, with the new labels and ticks
3211
+ The menu blinks once; every other pick closes the menu
3212
+ - `TrayMenuFlyout` (from `winui-svelte/tray`) is that flyout on its own: put
3213
+ it in a `menu` snippet with `resolve={() => resolveMenu({ items })}` and
3214
+ `onclose={close}`; `onflyout` hands over the native `MenuFlyout` to read
3215
+ - Not drawn by WinUI: a submenu row's own `onselect` (a `MenuFlyoutSubItem` has
3216
+ no click) and `autoExpand` (it has no member to open it from code)
3217
+
3218
+ ### Letting the user customize the tray menu (`winui-svelte/tray/menu/svelte`)
3219
+
3220
+ `<TrayMenuEditor>` is the settings control for a tray menu: the user picks how
3221
+ much of it shows, from three lines to a ShareX-like menu "and everything in
3222
+ between"
3223
+ It edits a `MenuProfile` and says so; it never reads or writes a file
3224
+
3225
+ The three levels are the `level` of each item (`simple` when left out):
3226
+
3227
+ | Level | The user gets | Shown items |
3228
+ |---|---|---|
3229
+ | Simple | The few lines every user needs | Items of level `simple` |
3230
+ | Standard | The usual set | `simple` and `standard` |
3231
+ | Full | Everything the app can do | All |
3232
+
3233
+ ```svelte
3234
+ <script lang="ts">
3235
+ import { TrayIcon } from "winui-svelte/tray";
3236
+ import { loadProfile, saveProfile } from "winui-svelte/tray/menu";
3237
+ import { TrayMenuEditor } from "winui-svelte/tray/menu/svelte";
3238
+ import { items } from "./menu.ts";
3239
+
3240
+ const FILE = "tray-menu.json";
3241
+ let profile = $state(loadProfile({ file: FILE }));
3242
+ </script>
3243
+
3244
+ <TrayMenuEditor {items} isPreviewShown bind:profile
3245
+ onchange={next => saveProfile({ file: FILE, profile: next })} />
3246
+
3247
+ <TrayIcon icon="app.ico" menu={items} {profile} />
3248
+ ```
3249
+
3250
+ | Prop | Meaning |
3251
+ |---|---|
3252
+ | `items` | The menu `defineMenu` declares; the ids stay literal |
3253
+ | `profile` | The user's choice, bindable; the default profile when left out |
3254
+ | `onchange(profile)` | Runs with the new profile after every edit; save it here |
3255
+ | `onsave(profile)` | Adds a Save button that runs this, for an app that saves on request |
3256
+ | `labels` | The strings of the editor, each optional and English by default (`DEFAULT_EDITOR_LABELS`); `{name}` stands for an item's label |
3257
+ | `isPreviewShown` | Lists the menu as it resolves under the profile, as plain rows |
3258
+
3259
+ - The detail level is three radio buttons: Simple, Standard, Full
3260
+ Changing it keeps the user's tweaks: an item the user hid stays hidden at
3261
+ every level, and one the user turned on above the level stays on
3262
+ The word "Custom" appears beside the level while the profile has any tweak
3263
+ (a hidden or shown item, or a menu in another order); the level alone is not
3264
+ a tweak
3265
+ - Below it is a tree of every item (`describeMenu`), submenus with their
3266
+ children indented
3267
+ Each row has a check for "shown" (what the level, `hidden` and `shown` make
3268
+ of it), the lowest level that includes the item as text, and Up and Down
3269
+ buttons that move it within its own menu (the whole tree is reachable with
3270
+ Tab, Space and Enter, and no operation needs a drag)
3271
+ - An item with `isRequired` is locked on and says "Always shown"
3272
+ - "Reset to default" returns to `defaultProfile()` and is disabled while the
3273
+ profile already is that
3274
+ - Every control has an `automationName`, the title and sections are headings,
3275
+ and no state is told by color alone
3276
+ - The functions behind it are pure and tested without a window:
3277
+ `src/tray/menu-svelte/edit-profile.ts` (`setLevel`, `setItemShown`,
3278
+ `moveItem`, `editorRows`, `hasTweaks`)
3279
+ - `examples/tray-menu-editor` puts the editor beside the tray icon it edits, on
3280
+ a ShareX-like menu with Capture, Upload and Tools submenus, a dynamic recent
3281
+ list, a check item and a required Exit; its simple level is a three-line menu
3282
+
3283
+ ### Tray with no window (`winui-svelte/tray/standalone`)
3284
+
3285
+ A tray that runs in a process of its own, plain Node, with no `Window`, no
3286
+ app, no WinUI and none of the component barrel: the notification-area icon
3287
+ and its menu, and a click that starts or signals the full app
3288
+ The panel then opens only when the user asks, and between clicks the tray
3289
+ holds a fraction of the memory
3290
+ `winui-svelte/tray` cannot do this: its `TrayIcon` mounts a WinUI window
3291
+ for the menu and its timers run on the dispatcher queue
3292
+
3293
+ ```ts
3294
+ import {
3295
+ activateOrLaunch,
3296
+ createStandaloneTray,
3297
+ MenuItemKind
3298
+ } from "winui-svelte/tray/standalone";
3299
+
3300
+ function openPanel() {
3301
+ void activateOrLaunch({
3302
+ key: "com.example.panel",
3303
+ activation: { arguments: ["--show"], workingDirectory: process.cwd() },
3304
+ launch: { command: "C:\\Program Files\\Panel\\panel.exe", arguments: ["--show"] }
3305
+ });
3306
+ }
3307
+
3308
+ createStandaloneTray({
3309
+ icon: "tray.ico",
3310
+ tooltip: "Panel",
3311
+ onclick: openPanel,
3312
+ menu: [
3313
+ { kind: MenuItemKind.COMMAND, id: "open", label: "Open", onselect: openPanel },
3314
+ { kind: MenuItemKind.SEPARATOR, id: "line" },
3315
+ { kind: MenuItemKind.COMMAND, id: "quit", label: "Quit", onselect: () => process.exit(0) }
3316
+ ]
3317
+ });
3318
+ ```
3319
+
3320
+ - `createStandaloneTray(options)` takes the icon's options (`icon`,
3321
+ `tooltip`, `isVisible`, `guid`, `onclick`, `ondoubleclick`,
3322
+ `onmiddleclick`), `menu`, `extras`, and `resolve` with `profile`, and returns
3323
+ a handle with `update`, `isRegistered` and `remove`, plus `notify` and
3324
+ `bounds` when their extras are passed
3325
+ The icon keeps the process alive; `remove()` or the process ending takes it
3326
+ out of the tray
3327
+ - The default is the smallest tray: an icon from one `.ico` path, clicks,
3328
+ `update`, `remove` and the menu
3329
+ Three parts are opt-in, each one import from the same entry, passed in
3330
+ `extras`, and none of their code is in the bundle unless passed:
3331
+ `balloons` adds `notify`, `bounds` adds `bounds()`, and `themedIcon` lets
3332
+ `icon` be `{ forLightTaskbar, forDarkTaskbar }`, swapped as the taskbar theme
3333
+ changes
3334
+ The handle has `notify` or `bounds` only when its extra is passed, and a
3335
+ theme pair is accepted only with `themedIcon`; otherwise it fails to compile
3336
+ `createTrayIcon` and `TrayIcon` of `winui-svelte/tray` include all three
3337
+
3338
+ ```ts
3339
+ import { balloons, bounds, createStandaloneTray, themedIcon } from "winui-svelte/tray/standalone";
3340
+
3341
+ const tray = createStandaloneTray({
3342
+ icon: { forLightTaskbar: "dark.ico", forDarkTaskbar: "light.ico" },
3343
+ extras: [balloons, bounds, themedIcon]
3344
+ });
3345
+ tray.notify({ title: "Ready" });
3346
+ ```
3347
+
3348
+ - The menu is Windows' own popup menu (`TrackPopupMenuEx`), made on a right
3349
+ click and destroyed when it closes; nothing of it exists while idle
3350
+ `menu` is the same model as the windowed tray's (`winui-svelte/tray/menu`):
3351
+ commands, checks, radios, submenus to any depth, separators and headers,
3352
+ each with an `id` (a separator too), and values that are functions are read
3353
+ each time the menu opens, as are lazy submenu `items`
3354
+ The menu is drawn by the lite resolver by default: every item is shown in
3355
+ declared order, with dynamic values, `isVisible`, `emptyLabel`, `sort` and
3356
+ `maxItems` applied, and `level` and `isRequired` ignored; it leaves the
3357
+ level and profile code out of the bundle
3358
+ For levels, a user profile and ordering, opt in with one import:
3359
+ `resolve: resolveMenu` from the same entry, and then `profile`, the user's
3360
+ choice of level, hidden, shown and order (a `MenuProfile` with a
3361
+ `MenuLevel`, or a function that gives one, for example from
3362
+ `loadProfile`)
3363
+ The ids are literal types: `profile` accepts only ids of `menu`, and a
3364
+ wrong one fails to compile; a `profile` without `resolve: resolveMenu` also
3365
+ fails to compile, so a profile is never ignored in silence
3366
+ Windows draws a check as a tick, a radio as a dot, a header as a disabled
3367
+ bold line, a shortcut right-aligned and a badge after the label
3368
+ `staysOpen` closes and reopens the menu at the same point, with fresh
3369
+ labels and ticks, right after the line runs; `onselect` otherwise runs on
3370
+ the next turn after the menu is gone (`closeThenRun: false` runs it as the
3371
+ menu closes)
3372
+ A submenu's own `onselect` and `autoExpand`, and every `icon`, do nothing
3373
+ here: Windows opens a submenu row without reporting a pick, and no pixel
3374
+ or file icon is drawn
3375
+ The menu is modal: the thread runs its own message loop until it closes
3376
+ It does not follow a dark system theme, which a native popup menu does not
3377
+ without an undocumented call; a menu that must match the theme belongs in
3378
+ `winui-svelte/tray` with `TrayIcon`'s `menu` snippet
3379
+ - The same entry re-exports `activateInstance`, `activateOrLaunch` and
3380
+ `launchApp` from `winui-svelte/app` (App lifecycle), so a tray imports from
3381
+ one place; the app side calls `ensureSingleInstance` with the same `key`
3382
+ - The clicks are heard the way `winui-svelte/tray` hears them, by polling
3383
+ the pointer on the process's timer (Node's `setInterval`)
3384
+ - A test bundles it (`scripts/pack/tray-only.test.ts`) and fails if any
3385
+ component, window or renderer module, or a component's name, is in the
3386
+ output, or if it grows past its budget
3387
+
3388
+ ### Tray as an entrypoint (`entrypoints/tray.ts`)
3389
+
3390
+ The app does not have to know it has a tray; the tray is its own file, found
3391
+ by its name and built into a small bundle for a process of its own
3392
+
3393
+ ```text
3394
+ my-app/
3395
+ entrypoints/
3396
+ main.ts -> dist/main.js
3397
+ window.ts -> dist/window.js
3398
+ tray.ts -> dist/tray.js, dist/tray.json, dist/tray.ico
3399
+ ```
3400
+
3401
+ `main.ts` and `window.ts` never import `tray.ts`; `buildApp` (and the dev
3402
+ server of `winuiSvelte()`) discover the folder, so `entries` is optional, and a
3403
+ name given in `entries` wins over the file found
3404
+
3405
+ ```ts
3406
+ import { activateOrLaunch, defineTray, MenuItemKind, MenuLevel, resolveMenu } from "winui-svelte/tray/standalone";
3407
+
3408
+ export default defineTray({
3409
+ icon: "tray.ico",
3410
+ tooltip: "My app",
3411
+ guid: "7d1c5a52-3f1b-4a63-9f5e-2f4d6b0c8a11",
3412
+ onactivate: openApp,
3413
+ resolve: resolveMenu,
3414
+ menu: [
3415
+ { kind: MenuItemKind.COMMAND, id: "open", label: "Open", isRequired: true, onselect: openApp },
3416
+ { kind: MenuItemKind.COMMAND, id: "capture", label: "Capture", level: MenuLevel.STANDARD }
3417
+ ]
3418
+ });
3419
+ ```
3420
+
3421
+ - `defineTray` returns its argument; it takes the options of
3422
+ `createStandaloneTray` (`menu`, `resolve`, `profile`, `extras`, the click
3423
+ handlers) with the ids of `menu` as a literal union, so a `profile` that names
3424
+ an id the menu lacks is a type error, and `profile` needs `resolve`
3425
+ - `guid` is required: it keeps the icon's place in the tray and names the one
3426
+ tray process, so a second `tray.js` exits at once
3427
+ - `onactivate` runs on a left click when `onclick` is not given
3428
+ - The build reads `icon`, `tooltip` and `guid` from the syntax tree, never by
3429
+ running the file, so a top-level import of WinRT in `tray.ts` does not
3430
+ execute at build; `icon` and `guid` must be string literals, and the icon a
3431
+ file inside the folder of `tray.ts` (written there as `icon: "tray.ico"`,
3432
+ copied to the same relative path in the output)
3433
+ - `tray.js` is the wrapper the build writes (a virtual module, like WXT's
3434
+ background): it imports the default export, calls `claimTrayInstance({ guid })`
3435
+ (the right to be the one tray for the `guid`; false in a second copy) and then
3436
+ `createStandaloneTray`; `tray.json` holds what was read
3437
+ - `startTray()` from `winui-svelte/app` starts `tray.js` detached once; it is
3438
+ optional, for an installer, a launcher or the app's own start; it reads
3439
+ `tray.json` for the `guid`, so the key is derived in one place
3440
+ (`trayInstanceKey(guid)`); `activateOrLaunch` is how the tray reaches the app
3441
+ - Under the dev server the tray is built into `.winui/tray` and started; a
3442
+ change to it rebuilds and restarts the process (no HMR, as WXT's background)
3443
+ after stopping the Node process whose pid `.winui/tray.pid` holds
3444
+ - The icon of a stopped process stays in the notification area until the
3445
+ pointer passes over it; that is how Windows handles an icon whose process
3446
+ was ended
3447
+ - The bundle holds no component and no window runtime; most of its size is
3448
+ zod, which a bundle for Node carries (`scripts/pack/tray-entrypoint.test.ts`
3449
+ keeps its budget)
3450
+ - `tray.svelte` is the same entrypoint written as markup (next section); a
3451
+ folder with both `tray.ts` and `tray.svelte` is an error
3452
+
3453
+ The working example is `examples/tray-entrypoint`
3454
+
3455
+ #### The tray written as markup (`entrypoints/tray.svelte`)
3456
+
3457
+ The menu can be written with the components of
3458
+ `winui-svelte/tray/menu/svelte`; the build reads the file with Svelte's parser
3459
+ and lowers the markup to the plain model of `tray.ts`, so none of Svelte's
3460
+ runtime is in `tray.js` (about 40 KB that a tray-only process cannot carry)
3461
+
3462
+ ```svelte
3463
+ <script module lang="ts">
3464
+ import { activateOrLaunch, resolveMenu } from "winui-svelte/tray/standalone";
3465
+
3466
+ let isAutostart = false;
3467
+
3468
+ function openApp() {
3469
+ void activateOrLaunch({ key: "my-app", activation: { arguments: [], workingDirectory: "." }, launch: { command: process.execPath, arguments: ["main.js"] } });
3470
+ }
3471
+
3472
+ function recentCaptures() {
3473
+ return ["a.png", "b.png"];
3474
+ }
3475
+
3476
+ export const options = {
3477
+ icon: "tray.ico",
3478
+ tooltip: "My app",
3479
+ guid: "7d1c5a52-3f1b-4a63-9f5e-2f4d6b0c8a11",
3480
+ onactivate: openApp,
3481
+ resolve: resolveMenu
3482
+ };
3483
+ </script>
3484
+
3485
+ <script lang="ts">
3486
+ import { TrayMenu, TrayMenuItem, TrayMenuSubmenu } from "winui-svelte/tray/menu/svelte";
3487
+ </script>
3488
+
3489
+ <TrayMenu>
3490
+ <TrayMenuItem id="open" label="Open" isRequired onselect={openApp} />
3491
+ <TrayMenuSubmenu id="recent" label="Recent" emptyLabel="Nothing yet">
3492
+ {#each recentCaptures() as name, iCapture (name)}
3493
+ <TrayMenuItem id={`recent.${iCapture}`} label={name} />
3494
+ {/each}
3495
+ </TrayMenuSubmenu>
3496
+ {#if isAutostart}
3497
+ <TrayMenuItem id="delay" label="Delay at sign-in" />
3498
+ {/if}
3499
+ </TrayMenu>
3500
+ ```
3501
+
3502
+ - `<script module>` holds `export const options = { ... }`, the options of
3503
+ `defineTray` except `menu` (the markup is the menu); the build reads `icon`,
3504
+ `tooltip` and `guid` from its literals as it does for `tray.ts`, and
3505
+ everything `options` uses (functions, imports) lives in the same script,
3506
+ because Svelte keeps a module script apart from the instance script; a
3507
+ `satisfies` on the object is read through
3508
+ - The menu is read each time it opens, like the dynamic values of the model, so
3509
+ a plain `let` and a plain function are always current; there is no `$state`,
3510
+ `$derived`, `$effect`, `$props`, `$bindable`, `$inspect` or `$host` (the build
3511
+ refuses them, since nothing would re-run)
3512
+ - Supported: `TrayMenu` (once, the root, no attributes), `TrayMenuItem` (a
3513
+ command, or `kind="check"` or `kind="radio"`), `TrayMenuSubmenu`,
3514
+ `TrayMenuSeparator` and `TrayMenuHeader`, imported by name; attributes as
3515
+ `label="text"`, `label="x {y}"`, `label={expression}`, `{shorthand}`, a bare
3516
+ boolean (`isRequired`), `{...spread}` and `onselect={handler}`; `{#if}`,
3517
+ `{:else if}` and `{:else}`; `{#each list as item, index (key)}` over an array
3518
+ (the key is not used, the `id` is the identity); `{@const}`; the children of
3519
+ a submenu become its `items` function
3520
+ - Refused with an error that names the file, the line and the construct:
3521
+ components of your own, other elements, `{#await}`, `{#key}`, `{#snippet}`,
3522
+ `{@render}`, `{@html}`, `{@debug}`, `bind:`, `use:`, `on:`, `class:`,
3523
+ `style:`, `let:`, transitions, `animate:`, `{@attach}`, `<svelte:*>`, text
3524
+ between the lines, `{:else}` of an `{#each}` (give the submenu an
3525
+ `emptyLabel`), a `<style>` block and importing a `.svelte` file
3526
+ - Each line becomes an object literal and `menu` the function that returns
3527
+ them: `{#if}` spreads a conditional array, `{#each}` spreads `flatMap`, so
3528
+ `defineTray` receives `menu: () => [ ... ]` (a function is accepted wherever
3529
+ an array is, by `createStandaloneTray` too)
3530
+ - `svelte-check` and the editor check the markup against the props of the
3531
+ components, so a wrong attribute or value is an error there; the build
3532
+ checks nothing, as for any `.svelte` file
3533
+ - A `tray.svelte` built to `tray.js` is within a few dozen bytes of the same
3534
+ tray written in `tray.ts` (`scripts/pack/tray-svelte-entrypoint.test.ts`)
3535
+
3536
+ The working example is `examples/tray-entrypoint-svelte`
3537
+
3538
+ ### Notice with no app (`winui-svelte/notice`)
3539
+
3540
+ `showNotice` shows a message box before there is a window or an app: the
3541
+ checks that end a run before it starts (the Windows 11 gate, a revoked
3542
+ licence) can tell the user why
3543
+
3544
+ ```ts
3545
+ import { NoticeButton, NoticeButtons, NoticeIcon, showNotice } from "winui-svelte/notice";
3546
+
3547
+ await showNotice({
3548
+ title: "My app",
3549
+ message: "This app needs Windows 11",
3550
+ icon: NoticeIcon.ERROR
3551
+ });
3552
+ const pressed = await showNotice({
3553
+ title: "Update",
3554
+ message: "Install now?",
3555
+ icon: NoticeIcon.QUESTION,
3556
+ buttons: NoticeButtons.YES_NO
3557
+ });
3558
+ const isConfirmed = pressed === NoticeButton.YES;
3559
+ ```
3560
+
3561
+ - `showNotice({ title, message, icon, buttons, owner })` resolves with the
3562
+ `NoticeButton` pressed: `ok`, `cancel`, `yes`, `no`, `retry`, `abort` or
3563
+ `ignore`
3564
+ `icon` is a `NoticeIcon` (`none`, `information`, `warning`, `error`,
3565
+ `question`), `buttons` a `NoticeButtons` (`ok`, `okCancel`, `yesNo`,
3566
+ `yesNoCancel`, `retryCancel`, `abortRetryIgnore`)
3567
+ - It is `MessageBoxW` and nothing else: no WinUI, no `runWindow`, no
3568
+ `initWindowsAppSdk`, so plain Node can call it first thing
3569
+ Without an `owner` the box stays on top and takes the foreground;
3570
+ `owner` is a window handle to center on and block
3571
+ - It is not a TaskDialog: `TaskDialogIndirect` needs Common Controls 6, which
3572
+ `node.exe` has no manifest for, so custom button text, links and progress
3573
+ bars are not here
3574
+ - The dialog is modal and runs its own message loop, so the calling thread
3575
+ waits for it
3576
+ It throws when Windows could not show the box
3577
+ A box cannot be dismissed from a test without input, so the tests fake the
3578
+ call; the one real call they make passes a window handle that does not
3579
+ exist, which Windows refuses at once without showing anything
3580
+ ### Taskbar button (`winui-svelte/window/taskbar`)
3581
+
3582
+ `handle.taskbar` is the window's button on the taskbar: a progress bar, an
3583
+ overlay icon, flashing and the thumbnail's tooltip and clip, over
3584
+ `ITaskbarList3` and `FlashWindowEx`
3585
+ No package identity is needed; call it on the UI thread
3586
+ The shell calls need the real desktop shell, so a window on a desktop of its
3587
+ own gets `E_NOTIMPL`; a window that has no taskbar button (a background or
3588
+ tray window) accepts the calls and shows nothing
3589
+
3590
+ ```ts
3591
+ import { TaskbarProgressState } from "winui-svelte/window/taskbar";
3592
+
3593
+ handle.taskbar.setProgress({ state: TaskbarProgressState.NORMAL, value: 0.4 });
3594
+ handle.taskbar.setOverlayBadge({ count: 3 });
3595
+ handle.taskbar.flash({ count: 2 });
3596
+ ```
3597
+
3598
+ - `setProgress({ state, value })`: `state` is a `TaskbarProgressState`
3599
+ (`none`, `indeterminate`, `normal`, `error`, `paused`); `value` is 0 to 1,
3600
+ clamped, and ignored for `none` and `indeterminate`; a value that is not a
3601
+ number is a `TypeError`
3602
+ - `setOverlayIcon({ icon, description })`: `icon` is the path of an .ico file
3603
+ or `null` to remove it; `description` is what a screen reader says
3604
+ - `setOverlayBadge({ count })` or `setOverlayBadge({ glyph })`: draws the badge
3605
+ as pixels (a disc with the digits, or the `BadgeGlyph`'s colour and mark) at
3606
+ the system's small icon size; `clearOverlay()` takes any overlay away
3607
+ - `flash({ count, until })`: `until` is a `TaskbarFlashUntil` (`count`, the
3608
+ default, flashes `count` times, 3 by default; `foreground` until the window is
3609
+ brought forward; `stopped` until `stopFlashing()`)
3610
+ - `setThumbnailTooltip(text)`: the text above the window's thumbnail on hover
3611
+ (259 characters at most, else a `RangeError`; empty shows the title again)
3612
+ - `setThumbnailClip({ x, y, width, height })`: shows only that part of the
3613
+ window in the thumbnail, in pixels of the client area, inside it; `null`
3614
+ shows all of it; whole numbers with a positive size, else a `TypeError`
3615
+ `SetThumbnailClip` gets `E_NOTIMPL` on a desktop of its own, so only a fake
3616
+ tests it
3617
+ - Thumbnail toolbar buttons are not offered: their click is a sent message
3618
+ that Node cannot receive; use jump list tasks (`winui-svelte/app/jump-list`)
3619
+ - `createTaskbarButton(hwnd)` and `TaskbarButton` take a window handle
3620
+ (`appWindow.id.value`) directly; `taskbarBadgeBackend(button)` is the
3621
+ `fallback` for `installBadging`
3622
+ - `examples/taskbar`: a download bar mirrored on the button and an unread count
3623
+ - `ITaskbarList3` has no WinRT form, so its methods are declared by hand at
3624
+ their vtable slots over dynwinrt's `DynComUnsafe`, as the share interop is
3625
+ - The shell offers no way to read a bar or an overlay back, so the window test
3626
+ (`test/taskbar.test.ts`, on the default desktop with an off-screen window)
3627
+ checks that every call returns `S_OK`
3628
+
2275
3629
  ### Localization: what works unpackaged
2276
3630
 
2277
3631
  - **`Intl` and your own string tables work everywhere.**
@@ -2304,6 +3658,708 @@ would show, and this one lives and dies with the WinUI window's process
2304
3658
  The working example is `examples/services` (`test/services.test.ts` runs it in
2305
3659
  a real window; the dialogs themselves need a person and are not opened there)
2306
3660
 
3661
+ ## ChromePermissions (`winui-svelte/chrome/permissions`)
3662
+
3663
+ `chrome.permissions` for a native app, with Chrome's names and shapes:
3664
+ `getAll()`, `contains(permissions)`, `request(permissions)`,
3665
+ `remove(permissions)`, `onAdded` and `onRemoved` (a `ChromeEvent`), and
3666
+ `Permissions { permissions, origins }`
3667
+ Opt-in: nothing is bundled until an app imports it, importing does no work,
3668
+ and no global is installed
3669
+
3670
+ ```ts
3671
+ import { ChromePermissions } from "winui-svelte/chrome/permissions";
3672
+
3673
+ const permissions = new ChromePermissions();
3674
+ permissions.onAdded.addListener(({ permissions: names }) => console.log(names));
3675
+ const isAllowed = await permissions.request({
3676
+ permissions: ["geolocation"],
3677
+ openSettings: true
3678
+ });
3679
+ ```
3680
+
3681
+ There is no per-site prompt in a native app; a permission is the OS consent
3682
+ the Permissions API already reports (`registerPermission` providers, so the
3683
+ Web APIs stay the single source of truth)
3684
+ The app holds a native permission when it asked for it and Windows allows it
3685
+ now; if either side takes it back, `contains` turns false
3686
+ The names the app asked for are saved in `chrome-permissions.json` in the
3687
+ app's data folder (`appDataFolder`, the folder `localStorage` uses), kept
3688
+ by an atomic write
3689
+
3690
+ | Chrome name | Held when | Backed by |
3691
+ | --- | --- | --- |
3692
+ | `audioCapture` | allowed | `microphone` |
3693
+ | `videoCapture` | allowed | `camera` |
3694
+ | `geolocation` | allowed | `geolocation` |
3695
+ | `notifications` | allowed | `notifications` |
3696
+ | `clipboardRead`, `clipboardWrite` | allowed | `clipboard-read`, `clipboard-write` |
3697
+ | `idle` | allowed | `idle-detection` |
3698
+ | `bluetooth` | allowed | `bluetooth` |
3699
+ | `gcm` | allowed | `push` |
3700
+ | `power` | allowed | `screen-wake-lock` |
3701
+ | `unlimitedStorage` | allowed | `persistent-storage` |
3702
+ | `activeTab`, `alarms`, `background`, `contextMenus`, `cookies`, `declarativeNetRequest`, `downloads`, `offscreen`, `scripting`, `storage`, `tabs`, `webRequest`, `windows` | always | nothing; no native meaning, and `remove` answers false |
3703
+ | any other name | never | `contains` and `request` reject with an `Error` |
3704
+ | origins (`<all_urls>` and match patterns) | always | nothing; a native app has no host permissions, a bad pattern rejects, `remove` answers false |
3705
+
3706
+ - The table is data you can read: `NATIVE_PERMISSIONS` (a `Map` from a Chrome
3707
+ name to the Web permissions behind it), `GRANTED_BY_DEFAULT` (a `Set` of the
3708
+ always-held names) and `ALL_URLS` (`<all_urls>`)
3709
+ - `request` checks each missing native permission: a state of `prompt` calls
3710
+ the provider's `request` (location shows the Windows prompt through
3711
+ `Geolocator.RequestAccessAsync`); camera and microphone are asked by the
3712
+ first device open, so they stay refused until Windows allows them
3713
+ - All requested permissions must be allowed, or `request` answers false and
3714
+ saves nothing; `onAdded` fires with the new ones
3715
+ - WinUI-only extra: `openSettings: true` in the object of `request` opens the
3716
+ Settings page with the switch (`ms-settings:privacy-webcam`,
3717
+ `privacy-microphone`, `privacy-location`, `notifications`, `bluetooth`,
3718
+ else `privacy`) when a permission stays refused; the answer is still false
3719
+ - `remove` forgets the saved grant and fires `onRemoved`; Windows keeps its own
3720
+ switch
3721
+ - Options of the constructor: `file`, `appName`, `location`, `environment`
3722
+ and `openSettings`, the stand-ins for tests
3723
+
3724
+ ## ChromeContextMenus (`winui-svelte/chrome/context-menus`)
3725
+
3726
+ `chrome.contextMenus` for a native app, with Chrome's names and shapes:
3727
+ `create(properties)` (answers the id), `update(id, properties)`,
3728
+ `remove(id)`, `removeAll()` and `onClicked` (a `ChromeEvent`); the item
3729
+ types `normal`, `checkbox`, `radio` and `separator`, and `title`, `id`,
3730
+ `checked`, `enabled`, `visible`, `contexts`, `parentId` and `onclick`
3731
+ Opt-in: nothing is bundled until an app imports it, importing does no work,
3732
+ and no global is installed
3733
+
3734
+ The items live in one list and are drawn by the tray menu model
3735
+ (`winui-svelte/tray/menu`), not by a second menu implementation:
3736
+ `menu(surface)` answers the lines for `TrayIcon` (`menu={...}`) or for a
3737
+ window's context flyout, in the same `MenuItem` shape
3738
+ The array is the same object each time and is rewritten in place when an item
3739
+ changes, so a menu that reads it when it opens shows the current items
3740
+
3741
+ ```ts
3742
+ import { ChromeContextMenus, ContextMenuSurface } from "winui-svelte/chrome/context-menus";
3743
+
3744
+ const menus = new ChromeContextMenus();
3745
+ menus.create({ id: "pause", title: "Pause", type: "checkbox", contexts: ["action"] });
3746
+ menus.onClicked.addListener(({ menuItemId, checked }) => console.log(menuItemId, checked));
3747
+ const lines = menus.menu(ContextMenuSurface.TRAY);
3748
+ ```
3749
+
3750
+ | Context | Surface | Shown |
3751
+ | --- | --- | --- |
3752
+ | `action`, `browser_action`, `page_action` | `tray` | in the tray icon's menu |
3753
+ | `page` | `window` | in the context flyout of a window |
3754
+ | `all` | both | in both |
3755
+ | `frame`, `selection`, `link`, `editable`, `image`, `video`, `audio`, `launcher` | none | accepted and ignored; there is no page under a native menu |
3756
+
3757
+ - `contexts` is `["page"]` when left out, as in Chrome
3758
+ - `documentUrlPatterns` and `targetUrlPatterns` are accepted and ignored
3759
+ - A radio belongs to the run of radios next to it among its siblings; a pick
3760
+ ticks it and unticks the others of the run
3761
+ - A pick of a checkbox flips it; `onclick` runs first, then `onClicked`
3762
+ fires with `menuItemId`, `parentMenuItemId`, `checked`, `wasChecked` and
3763
+ `editable` (always false); there is no `pageUrl`, `selectionText` or tab
3764
+ - An item with children is drawn as a submenu; a hidden item leaves out its
3765
+ children
3766
+ - `create` throws, and `update` and `remove` reject, with an `Error` for a
3767
+ duplicate id, an unknown id or parent, a parent under the item, a missing
3768
+ title, or a key Chrome does not know
3769
+ - Not mirrored: the callback arguments (use the promises), Chrome's grouping of
3770
+ several top-level items under the extension's name, and the limit of six
3771
+ top-level `action` items
3772
+ - Public exports: `ChromeContextMenus`, `ContextItemType`,
3773
+ `ContextMenuSurface`, `ContextType`, `ChromeEvent`, and the types
3774
+ `CreateProperties`, `OnClickData` and `UpdateProperties`
3775
+
3776
+ ## Downloads (`winui-svelte/downloads`)
3777
+
3778
+ Downloads on the two APIs an app already knows: the web's `fetch` with the File
3779
+ System Access API, and `chrome.downloads`
3780
+ Opt-in: nothing is bundled until an app imports it, and importing does no work
3781
+
3782
+ ### Web layer: `fetchToFile`
3783
+
3784
+ `fetchToFile` streams a URL into the file handle `showSaveFilePicker` gave
3785
+ (`installFileSystem` defines it), resumes with a Range request and marks the
3786
+ finished file as downloaded from the Internet
3787
+
3788
+ ```ts
3789
+ import { fetchToFile } from "winui-svelte/downloads";
3790
+
3791
+ const handle = await showSaveFilePicker({ suggestedName: "setup.exe" });
3792
+ await fetchToFile({
3793
+ url: "https://example.com/setup.exe",
3794
+ handle,
3795
+ onprogress: ({ loaded, total }) => console.log(loaded, total)
3796
+ });
3797
+ ```
3798
+
3799
+ - The body goes through `FileSystemWritableFileStream`; when it is whole the
3800
+ file gets a `Zone.Identifier` alternate data stream with `ZoneId=3` and
3801
+ `HostUrl` (the final address, without credentials), as a browser's download
3802
+ would, so Explorer and SmartScreen warn before it runs; a volume with no
3803
+ streams (FAT, a share) stays unmarked
3804
+ - A failed or cancelled (`signal`) read keeps the bytes that arrived;
3805
+ `resume: true` sends `Range: bytes=<size of the file>-` and appends to it
3806
+ when the server answers 206 with the matching `Content-Range`; a server that
3807
+ ignores the range (200) or refuses it (416) makes the download start over
3808
+ - `onprogress({ loaded, total })` runs after every chunk; `total` is undefined
3809
+ when the server sends no length or compresses the body
3810
+ - A non-2xx answer throws `DownloadError` with the `status`; `headers`,
3811
+ `method` and `body` shape the request and `fetch` stands in for the global
3812
+ one (the tests do)
3813
+ - `requestDownload` and `streamToFile` are the two halves of `fetchToFile`, for
3814
+ an app that decides the file after the headers arrive;
3815
+ `markOfTheWeb({ path, hostUrl })` marks a file saved another way and
3816
+ `zoneIdentifierText(hostUrl)` is the stream's text
3817
+
3818
+ ### Chrome layer: `Downloads`
3819
+
3820
+ `Downloads` is `chrome.downloads` with the same names and shapes; where Chrome
3821
+ takes a callback, a method returns a promise
3822
+
3823
+ ```ts
3824
+ import { Downloads } from "winui-svelte/downloads";
3825
+
3826
+ const downloads = new Downloads();
3827
+ downloads.onChanged.addListener(({ id, state }) => {
3828
+ if (state?.current === "complete") {
3829
+ console.log(`download ${id} is done`);
3830
+ }
3831
+ });
3832
+ const id = await downloads.download({
3833
+ url: "https://example.com/setup.exe",
3834
+ filename: "installers/setup.exe",
3835
+ conflictAction: "uniquify",
3836
+ taskbar: handle.taskbar
3837
+ });
3838
+ await downloads.pause(id);
3839
+ await downloads.resume(id);
3840
+ const [item] = await downloads.search({ id });
3841
+ ```
3842
+
3843
+ - `download({ url, filename, saveAs, conflictAction, headers, method, body })`
3844
+ returns the id once the download has started; the options are checked with
3845
+ zod, so a bad `url`, `method` or an unknown key rejects; `filename` is
3846
+ relative to the downloads folder (`directory` of the constructor, the user's
3847
+ Downloads folder by default) and may not leave it
3848
+ - The file name is `filename`, else the server's `Content-Disposition`, else
3849
+ the last part of the address; `conflictAction` is `uniquify` (the default,
3850
+ `name (1).ext`), `overwrite` or `prompt`; `saveAs` and `prompt` ask with the
3851
+ global `showSaveFilePicker` (or `pickSaveFile` of the constructor)
3852
+ - The bytes arrive in the file's name plus `.part`, renamed when whole, with
3853
+ the Mark of the Web
3854
+ - `pause(id)` keeps the bytes (`paused: true`, `canResume: true`) and
3855
+ `resume(id)` asks for the rest with a Range request; a dropped connection
3856
+ ends `interrupted` with `NETWORK_FAILED` and can resume too; `cancel(id)`
3857
+ deletes the bytes and ends `interrupted` with `USER_CANCELED`
3858
+ - `search(query)` takes Chrome's `DownloadQuery` (`query` terms, with a leading
3859
+ `-` to exclude, `filenameRegex`, `urlRegex`, `startedBefore` and the other
3860
+ time bounds, `totalBytesGreater`, `limit`, `orderBy` and every field as an
3861
+ exact match); `erase(query)` removes the ones that are not running from the
3862
+ list and returns their ids, the files stay; `removeFile(id)` deletes the file
3863
+ - `show(id)` and `showDefaultFolder()` open Explorer through `revealInExplorer`
3864
+ - `onCreated` gets the `DownloadItem`, `onChanged` a `DownloadDelta` with only
3865
+ what changed (`state`, `paused`, `bytesReceived`, `totalBytes`, `error`,
3866
+ `canResume`, `filename`, and so on) and `onErased` the id; they have
3867
+ `addListener`, `removeListener`, `hasListener` and `hasListeners`
3868
+ - The closed sets are `DownloadState` (`in_progress`, `interrupted`,
3869
+ `complete`), `FilenameConflictAction`, `HttpMethod` and `InterruptReason`,
3870
+ and `ChromeEvent` is the class of the three events
3871
+ - `DownloadItem.totalBytes` and `fileSize` are -1 while unknown, as in Chrome;
3872
+ the `error` values are `InterruptReason`'s, and an HTTP status maps to
3873
+ `SERVER_UNAUTHORIZED`, `SERVER_FORBIDDEN`, `SERVER_BAD_CONTENT` or
3874
+ `SERVER_FAILED`
3875
+ - `taskbar` is the one extra member of the options object: `handle.taskbar`
3876
+ shows a bar that fills as the download goes (a marquee when the size is
3877
+ unknown), yellow while paused, removed when it ends and red when it fails
3878
+ - Not mirrored: `open`, `getFileIcon`, `acceptDanger`, `setShelfEnabled`,
3879
+ `onDeterminingFilename` and the danger types, a download here is always safe
3880
+ - `src/downloads/fetch-to-file.test.ts` and `chrome-downloads.test.ts` run
3881
+ against a local HTTP server with Range support
3882
+
3883
+ ## Chrome storage (`winui-svelte/chrome/storage`)
3884
+
3885
+ `chrome.storage` with the same areas, names and shapes; where Chrome takes a
3886
+ callback, a method returns a promise
3887
+ Opt-in: nothing is bundled until an app imports it, and importing does no work
3888
+
3889
+ ```ts
3890
+ import { ChromeStorage } from "winui-svelte/chrome/storage";
3891
+
3892
+ const storage = new ChromeStorage();
3893
+ storage.onChanged.addListener((changes, areaName) => {
3894
+ console.log(areaName, changes);
3895
+ });
3896
+ await storage.local.set({ theme: "dark", volume: 0.8 });
3897
+ const { theme } = await storage.local.get({ theme: "light" });
3898
+ await storage.session.set({ token: "abc" });
3899
+ await storage.local.remove(["volume"]);
3900
+ const bytes = await storage.local.getBytesInUse();
3901
+ ```
3902
+
3903
+ - Areas: `local`, `sync`, `session` and `managed`, each a `StorageArea` with
3904
+ `get`, `getKeys`, `getBytesInUse`, `set`, `remove`, `clear`,
3905
+ `setAccessLevel` and `onChanged`; `ChromeStorage.onChanged` fires for every
3906
+ area with `(changes, areaName)`
3907
+ - `get(keys)` takes a key, an array of keys, an object of defaults, or null or
3908
+ nothing for every item; arguments are checked with zod and a wrong one
3909
+ rejects
3910
+ - Values are JSON, as in Chrome: a value JSON cannot hold (a function,
3911
+ `undefined`) is left out, `NaN` becomes `null` and a `Date` becomes its
3912
+ string; the stored files are checked with zod and a corrupt one reads as
3913
+ empty
3914
+ - `local` is a JSON file in the app's local data folder, next to
3915
+ `localStorage` (`chrome-storage-local.json`, written atomically after every
3916
+ change); `session` is in memory and ends with the process; the file is read
3917
+ on the first call to the area
3918
+ - `sync` is a local fallback: Windows has no sync service an unpackaged app
3919
+ can use (roaming settings are deprecated), so `chrome-storage-sync.json`
3920
+ lives beside the local file and values never reach another PC; Chrome's
3921
+ `sync` limits apply (`QUOTA_BYTES` 102400, `QUOTA_BYTES_PER_ITEM` 8192,
3922
+ `MAX_ITEMS` 512) so code meets the same errors; the write-rate constants are
3923
+ published and not enforced
3924
+ - `managed` is read-only and always empty: `set`, `remove` and `clear` reject
3925
+ with `This is a read-only store.`, and `get` answers the defaults
3926
+ - `QUOTA_BYTES` is 10485760 for `local` and `session`, and a write that would
3927
+ pass a quota rejects and stores nothing; `getBytesInUse` counts each key's
3928
+ length plus its JSON text, as Chrome does
3929
+ - `onChanged` gets `{ key: { oldValue, newValue } }` only for keys that
3930
+ changed (`oldValue` is missing for a new key, `newValue` for a removed one);
3931
+ a write that changes nothing fires nothing
3932
+ - `setAccessLevel({ accessLevel })` takes `AccessLevel`'s values and keeps
3933
+ them; every context of a native app is trusted, so it changes nothing
3934
+ - A change made by another process is not seen, and `ChromeStorage` takes
3935
+ `appName`, `environment`, `localFile` and `syncFile` (the tests give an
3936
+ in-memory file); the closed sets are `StorageAreaName` and `AccessLevel`
3937
+ - `LOCAL_QUOTA`, `SESSION_QUOTA` and `SYNC_QUOTA` hold the numbers each area
3938
+ publishes, for code that wants them without making a `ChromeStorage`
3939
+ - `src/chrome/storage/chrome-storage.test.ts` runs against an in-memory file
3940
+
3941
+ ## Chrome runtime (`winui-svelte/chrome/runtime`)
3942
+
3943
+ `chrome.runtime` for a native app: the manifest, messages and ports between the
3944
+ app's own contexts, native messaging hosts, and the install and exit events
3945
+ Opt-in: nothing is bundled until an app imports it, importing does no work, and
3946
+ no global `chrome` is installed; make one `Runtime` in each context that wants
3947
+ one
3948
+
3949
+ ```ts
3950
+ import { Runtime } from "winui-svelte/chrome/runtime";
3951
+
3952
+ const runtime = new Runtime();
3953
+ runtime.addLink(transport);
3954
+ runtime.onMessage.addListener((message, sender, sendResponse) => {
3955
+ sendResponse({ echo: message });
3956
+ });
3957
+ const answer = await runtime.sendMessage({ hello: "world" });
3958
+ ```
3959
+
3960
+ - Where Chrome sets `chrome.runtime.lastError`, a promise rejects or a `Port`
3961
+ has an `error`; there is no `lastError`
3962
+ - `getManifest()` gives `{ manifest_version: 3, name, version, description }`
3963
+ from the package identity when the app has one, else from the nearest
3964
+ `package.json` above the entry script; `id` is the package family name, or
3965
+ the `package.json` name; `getURL(path)` is `ms-appx:///path` in a package and
3966
+ a `file:` URL under the folder of `package.json` otherwise;
3967
+ `getPlatformInfo()` is `{ os: "win", arch }` with Chrome's architecture names
3968
+ - Contexts are joined by `addLink(transport)`, with any transport of
3969
+ `winui-svelte/state` (a worker's message port, stdio, memory); the call
3970
+ returns how to leave; messages are `defineMessaging` requests, so framing,
3971
+ timeouts (`timeoutMilliseconds`) and a closed link are the messaging layer's
3972
+ own, and every frame is checked with zod
3973
+ - `sendMessage(message)` reaches every other linked context and resolves with
3974
+ the first answer; a listener answers with `sendResponse`, by returning `true`
3975
+ and calling it later, or by returning a promise; it resolves `undefined` when
3976
+ listeners heard it and none answered, and rejects with Chrome's own "Receiving end does not exist" error when no
3977
+ context is linked or none listens; a listener that throws or rejects rejects the sender
3978
+ - `connect({ name })` opens a `Port` to every other linked context, which hears
3979
+ it in `onConnect`; `Port` has `postMessage`, `onMessage`, `onDisconnect`,
3980
+ `disconnect()`, `name` and `sender`; a port ends when the link closes, and
3981
+ `error` says why when something failed
3982
+ - `connectNative(application)` and `sendNativeMessage({ application, message })`
3983
+ start a registered host and speak the native messaging protocol on its stdio
3984
+ (four bytes of length, then JSON; a host's message is limited to 1 MiB)
3985
+ - A host is registered as in Chrome: a key
3986
+ `Software\winui-svelte\NativeMessagingHosts\<name>` below
3987
+ `HKEY_CURRENT_USER` whose default value is the path of the manifest (`name`,
3988
+ `path`, `type: "stdio"`, `allowed_origins`); the host gets the app's origin,
3989
+ `winui-svelte://<id>/`, as its first argument, and an `allowed_origins` that
3990
+ omits it refuses the host; a host is an executable, not a script;
3991
+ `resolveHost`, `registry` and `spawnHost` stand in for the lookup and the
3992
+ start in a test
3993
+ - `onInstalled` fires from `detectInstalled()`, which an app calls once at
3994
+ start: `{ reason: "install" }` on a first run, `{ reason: "update",
3995
+ previousVersion }` when the version changed, nothing when it is the same; the
3996
+ last version is kept in `%LOCALAPPDATA%\winui-svelte\runtime\<id>.json`, or
3997
+ in the `versionStore` you give
3998
+ - `onStartup` is the `onStartup` of `winui-svelte/app/schedule`, fired by
3999
+ `startActivation` for a `startup` activation (see `launchAtLogin`), not a
4000
+ second source
4001
+ - `onSuspend` fires when the process exits, the only suspend a desktop app
4002
+ has; `suspendSource` changes what it listens to; `dispose()` stops it and
4003
+ closes the links
4004
+ - `reload()` is `relaunch` of `winui-svelte/app`
4005
+ - The protocol's pieces are exported for a host written in Node:
4006
+ `encodeNativeMessage(message)`, `NativeMessageDecoder` (`push(chunk)` returns
4007
+ the messages a chunk completed), `NativeMessageError`, `MAX_HOST_MESSAGE_BYTES`
4008
+ and `NATIVE_HOST_REGISTRY_KEY`, the registry key below `HKEY_CURRENT_USER`
4009
+ that holds the hosts
4010
+ - Not mirrored: `onMessageExternal`, `onConnectExternal`, `onSuspendCanceled`,
4011
+ `onUpdateAvailable`, `requestUpdateCheck`, `restart`, `setUninstallURL`,
4012
+ `openOptionsPage`, `getContexts`, `getPackageDirectoryEntry`
4013
+ - The single-instance pipe stays the way a second copy of the app reaches the
4014
+ first (`startActivation`); contexts of one copy talk over their transports
4015
+ - `src/chrome/runtime/runtime.test.ts` runs it over in-memory links and a child
4016
+ process that echoes in the native messaging protocol
4017
+
4018
+ ## Chrome notifications (`winui-svelte/chrome/notifications`)
4019
+
4020
+ `chrome.notifications` for a native app, with Chrome's names and shapes; where
4021
+ Chrome takes a callback, a method returns a promise
4022
+ It delegates to the web `Notification` (`winui-svelte/web-apis/notification`),
4023
+ so there is one notification pipeline: the same permission, the same Windows
4024
+ app notifications and the same progress bar
4025
+ Opt-in: nothing is bundled until an app imports it, importing does no work, and
4026
+ no global is installed
4027
+ `installNotification()` must have run, as for the web `Notification`
4028
+
4029
+ ```ts
4030
+ import { ChromeNotifications } from "winui-svelte/chrome/notifications";
4031
+
4032
+ const notifications = new ChromeNotifications();
4033
+ notifications.onButtonClicked.addListener((id, index) => console.log(id, index));
4034
+ await notifications.create("sync", {
4035
+ type: "progress",
4036
+ title: "Syncing",
4037
+ message: "Uploading photos",
4038
+ progress: 10,
4039
+ buttons: [{ title: "Pause" }]
4040
+ });
4041
+ await notifications.update("sync", { progress: 60 });
4042
+ ```
4043
+
4044
+ - Exports: `ChromeNotifications`, `ChromeEvent`, `NotificationTemplateType`
4045
+ (`basic`, `image`, `list`, `progress`) and `NotificationPermissionLevel`
4046
+ (`granted`, `denied`), and the option types
4047
+ - `create(id, options)` resolves with the id (made up for a missing or empty
4048
+ one); the same id replaces the notification that is up, without `onClosed`
4049
+ The first call asks Windows for the permission and rejects with an `Error`
4050
+ when it is refused
4051
+ - `type`, `title` and `message` are required, and so is `imageUrl` for `image`,
4052
+ `items` for `list` and `progress` (0 to 100) for `progress`; `iconUrl` is
4053
+ optional, since an unpackaged app may have none; options are checked with a
4054
+ schema and a bad one rejects with an `Error`
4055
+ - `update(id, options)` merges into the notification and answers false when
4056
+ there is none; a change of `progress` alone moves the bar in place
4057
+ (`Notification.update`), anything else shows it again under its id
4058
+ - `clear(id)` removes it and answers false when there is none; `getAll()`
4059
+ answers an object with each id as a key and `true` as the value, for the
4060
+ notifications this run holds
4061
+ - `getPermissionLevel()` reads `Notification.permission`: `granted`, else
4062
+ `denied` (including "not asked yet", which the first `create` settles)
4063
+ - `onClicked(id)`, `onButtonClicked(id, buttonIndex)` and `onClosed(id, byUser)`
4064
+ are `ChromeEvent`s; Windows removes a clicked toast, so a click is followed
4065
+ by `onClosed(id, true)`, `clear` fires `onClosed(id, false)`, and a swipe away
4066
+ is not reported
4067
+ - `isClickable: false` silences `onClicked` for the body, not the buttons
4068
+ - Mapping: `message` is the body, `list` adds one `title: message` line per
4069
+ item, `image` uses `imageUrl`, `contextMessage` is the attribution,
4070
+ `eventTime` the timestamp, `buttons` (at most 2) become actions named by
4071
+ their index, `priority` below 0 is silent and 2 requires interaction, and
4072
+ `requireInteraction` and `silent` pass through
4073
+ - Not mirrored: `onPermissionLevelChanged` and `onShowSettings`
4074
+ - `src/chrome/notifications/chrome-notifications.test.ts` runs the web
4075
+ `Notification` over a stand-in for the Windows App SDK; no toast is shown
4076
+
4077
+ ## Chrome commands (`winui-svelte/chrome/commands`)
4078
+
4079
+ `chrome.commands` for a native app: the manifest's `commands` key as global
4080
+ hotkeys, over `registerHotkey` of `winui-svelte/app/hotkeys`
4081
+ Opt-in: nothing is bundled until an app imports it, importing does no work, and
4082
+ no global `chrome` is installed
4083
+
4084
+ ```ts
4085
+ import { ChromeCommands } from "winui-svelte/chrome/commands";
4086
+
4087
+ const commands = new ChromeCommands({
4088
+ commands: {
4089
+ toggle: {
4090
+ suggested_key: { default: "Ctrl+Shift+Y", mac: "Command+Shift+Y" },
4091
+ description: "Toggle the panel"
4092
+ }
4093
+ }
4094
+ });
4095
+ commands.onCommand.addListener(name => console.log(name));
4096
+ const failures = commands.start();
4097
+ const all = await commands.getAll();
4098
+ ```
4099
+
4100
+ - `start()` registers every shortcut (call it on the UI thread, where
4101
+ `registerHotkey` belongs) and returns the commands whose shortcut was
4102
+ refused, as `{ name, error }`; a clash with another app leaves that command
4103
+ unassigned, so its `getAll` shortcut is empty, as in Chrome; `stop()` gives
4104
+ the shortcuts back
4105
+ - `getAll()` resolves with `{ name, description, shortcut }` for each command
4106
+ in the manifest's order, the shortcut spelled `"Ctrl+Shift+Y"`
4107
+ - `suggested_key` is a string or one per platform; `windows` then `default`
4108
+ is used, and `mac`, `linux` and `chromeos` are ignored
4109
+ - `Ctrl`, `Alt` and `Shift` are as in Chrome; `Command` and `MacCtrl` mean
4110
+ Ctrl; keys are `A` to `Z`, `0` to `9`, `F1` to `F12`, `Comma`, `Period`,
4111
+ `Home`, `End`, `PageUp`, `PageDown`, `Space`, `Insert`, `Delete`, `Up`,
4112
+ `Down`, `Left`, `Right` and the four media keys; `parseShortcut(text)`
4113
+ reads one into the `HotkeyChord` and the display spelling, and throws for
4114
+ anything else
4115
+ - A bad manifest (a shortcut Chrome would not take, or a wrong shape, checked
4116
+ with zod) throws from the constructor
4117
+ - Chrome keeps most shortcuts inside the browser; a native app has no such
4118
+ scope, so every shortcut with a key is system-wide and `global` changes
4119
+ nothing
4120
+ - `_execute_action` (and `_execute_browser_action`, `_execute_page_action`)
4121
+ call `onExecuteAction` when you give it, as Chrome treats them as a click on
4122
+ the action (pass `() => action.click()` of `winui-svelte/chrome/action`),
4123
+ and fire `onCommand` otherwise
4124
+ - `onCommand` is a `ChromeEvent` and is called with the name only, there is no
4125
+ tab; `register` stands in for `registerHotkey` in a test
4126
+ - Not mirrored: `onChanged`, and the shortcut customisation page
4127
+ - `src/chrome/commands/chrome-commands.test.ts` runs it over a fake registrar,
4128
+ so no real hotkey is registered
4129
+
4130
+ ## Chrome i18n (`winui-svelte/chrome/i18n`)
4131
+
4132
+ `chrome.i18n` for a native app: `getMessage` is synchronous, over the
4133
+ standard `_locales/<locale>/messages.json` files, so an unmodified
4134
+ extension's locale folder works
4135
+ Opt-in: nothing is bundled until an app imports it, importing does no work, and
4136
+ no global `chrome` is installed
4137
+
4138
+ ```ts
4139
+ import { ChromeI18n, installLanguageDefaults } from "winui-svelte/chrome/i18n";
4140
+
4141
+ const i18n = new ChromeI18n();
4142
+ i18n.getMessage("greeting", ["Ann", "3"]);
4143
+ installLanguageDefaults(i18n);
4144
+ ```
4145
+
4146
+ - `getMessage(name, substitutions)` takes a string or up to nine strings;
4147
+ `$1` to `$9` are the substitutions, `$NAME$` is the content of the
4148
+ message's `placeholders` entry of that name (which may hold `$1`), and `$$`
4149
+ is a dollar sign; names are matched without case; an unknown name gives an
4150
+ empty string, as in Chrome
4151
+ - Lookup is per message: the exact locale (`pt-BR` is the folder `pt_BR`),
4152
+ then its language (`pt`), then the `default_locale` of `manifest.json`
4153
+ beside the folder; `localesFolder`, `root`, `defaultLocale`, `uiLanguage` and
4154
+ `acceptLanguages` override the defaults (the app's root, `_locales` in it,
4155
+ the system language)
4156
+ - The predefined messages are `@@extension_id`, `@@ui_locale` (`en_US`),
4157
+ `@@bidi_dir`, `@@bidi_reversed_dir`, `@@bidi_start_edge` and
4158
+ `@@bidi_end_edge`
4159
+ - `getUILanguage()` is a BCP 47 tag; `getAcceptLanguages()` resolves with the
4160
+ list; `detectLanguage(text)` tells scripts apart (Arabic, Hebrew, Cyrillic,
4161
+ Greek, Thai, Devanagari, Hangul, kana and Han) and answers `und` for
4162
+ Latin-script text, where Chrome uses a trained model
4163
+ - Every `messages.json` is checked with zod; a malformed one throws from
4164
+ `getMessage`
4165
+ - `installLanguageDefaults(source)` makes `navigator.language`,
4166
+ `navigator.languages`, the default locale of the `Intl` formats and of
4167
+ `toLocaleString` (and its date and time forms) follow the same source, so
4168
+ they agree with `chrome.i18n`; a locale a caller passes still wins; it
4169
+ returns the function that undoes it
4170
+ - `src/chrome/i18n/chrome-i18n.test.ts` runs it over in-memory files
4171
+
4172
+ ## Chrome global (`winui-svelte/chrome/install`)
4173
+
4174
+ `installChromeApis` defines `globalThis.chrome` for code written for a Chrome
4175
+ extension
4176
+ Opt-in: importing does no work, and the global holds exactly the namespaces the
4177
+ app passes, so the bundle holds only what the app imported to make them
4178
+
4179
+ ```ts
4180
+ import { installChromeApis } from "winui-svelte/chrome/install";
4181
+ import { ChromeI18n } from "winui-svelte/chrome/i18n";
4182
+ import { ChromeStorage } from "winui-svelte/chrome/storage";
4183
+ import * as alarms from "winui-svelte/app/schedule";
4184
+
4185
+ const uninstall = installChromeApis({
4186
+ storage: new ChromeStorage(),
4187
+ i18n: new ChromeI18n(),
4188
+ alarms
4189
+ });
4190
+ await chrome.storage.local.set({ theme: "dark" });
4191
+ ```
4192
+
4193
+ - `ChromeGlobal` is the options object and the type of `globalThis.chrome`; its
4194
+ members are `storage`, `runtime`, `permissions`, `contextMenus`, `commands`,
4195
+ `action`, `notifications`, `i18n`, `alarms`, `downloads`, `system` and `windows`, each optional,
4196
+ each an instance (or, for `alarms`, the `ChromeAlarms` calls and events of
4197
+ `winui-svelte/app/schedule`); the object is open to more namespaces as they
4198
+ are mirrored
4199
+ - The package declares no global type; to type `chrome` in your app, declare
4200
+ `var chrome: ChromeGlobal` in your own `declare global`
4201
+ - A `chrome` object that is already there keeps its other members; the
4202
+ returned function puts the previous one back
4203
+ - It does not call `installLanguageDefaults`; do that where you want
4204
+ `navigator.language` and `Intl` to follow `chrome.i18n`
4205
+ - `src/chrome/install.test.ts` covers it
4206
+
4207
+ ## Chrome action (`winui-svelte/chrome/action`)
4208
+
4209
+ `chrome.action` for a native app, over the tray icon (`winui-svelte/tray`)
4210
+ Opt-in: nothing is bundled until an app imports it, importing does no work, and
4211
+ no global `chrome` is installed
4212
+
4213
+ ```ts
4214
+ import { createChromeAction } from "winui-svelte/chrome/action";
4215
+
4216
+ const { action, tray } = createChromeAction({
4217
+ icon: "app.ico",
4218
+ title: "Inbox",
4219
+ guid: "0b3c0a53-2a8f-4a5e-9d57-1c2f7c1a9f10"
4220
+ });
4221
+ action.onClicked.addListener(() => console.log("clicked"));
4222
+ await action.setBadgeText({ text: "3" });
4223
+ ```
4224
+
4225
+ - `createChromeAction(options)` takes the options of `createTrayIcon` (except
4226
+ `onclick`) and `title`, makes the tray icon and returns `{ action, tray }`;
4227
+ call it on the UI thread; the left click is `onClicked`, the other gestures
4228
+ go to the tray as given; `createTray` stands in for `createTrayIcon` in a test
4229
+ - `new ChromeAction({ title, tray })` is the same without making the tray: give
4230
+ the tray's `onclick` to `action.click()`, then `attach(tray)` (a tray from
4231
+ `defineTray` fits), through the `ActionTray` shape
4232
+ - `setTitle({ title })` and `getTitle()` are the tooltip, kept to what the shell
4233
+ holds (127 characters)
4234
+ - `setIcon({ path })` swaps the icon file; `path` is a string or
4235
+ `{ forLightTaskbar, forDarkTaskbar }`; Chrome's `imageData` and size maps
4236
+ are rejected
4237
+ - `setBadgeText({ text })` and `getBadgeText()`: the tray cannot paint on an
4238
+ icon (icons are files loaded by path, and drawing needs a new icon file on
4239
+ every change), so the badge is a tooltip suffix, `"Inbox (3)"`; empty text
4240
+ clears it
4241
+ - `setBadgeBackgroundColor({ color })` and `getBadgeBackgroundColor()` keep the
4242
+ color (four channels, or `#rgb`, `#rgba`, `#rrggbb`, `#rrggbbaa`; Chrome's
4243
+ red until set) and nothing draws it
4244
+ - `enable()`, `disable()` and `isEnabled()`: a disabled action still shows
4245
+ (the tray cannot grey an icon) but a click on it is ignored
4246
+ - Every method returns a promise and rejects on a bad argument (zod); `tabId`
4247
+ is accepted and ignored, there are no tabs, so everything is global
4248
+ - `onClicked` is a `ChromeEvent` and is called with no argument
4249
+ - Not mirrored: `setPopup`, `getPopup`, `openPopup`, `getUserSettings`,
4250
+ `setBadgeTextColor`, `onUserSettingsChanged`
4251
+ - `src/chrome/action/chrome-action.test.ts` runs it over a fake tray
4252
+
4253
+ ## Chrome system (`winui-svelte/chrome/system`)
4254
+
4255
+ `chrome.system` for a native app: `cpu`, `memory`, `storage` and `display`
4256
+ with Chrome's names and promises, over Node's `os` and the display areas
4257
+ that `winui-svelte/devices/display` and the web `screen` read
4258
+ Opt-in: nothing is bundled until an app imports it, importing does no work, and
4259
+ no global `chrome` is installed
4260
+
4261
+ ```ts
4262
+ import { createChromeSystem } from "winui-svelte/chrome/system";
4263
+
4264
+ const system = createChromeSystem();
4265
+ const cpu = await system.cpu.getInfo();
4266
+ const memory = await system.memory.getInfo();
4267
+ const drives = await system.storage.getInfo();
4268
+ const displays = await system.display.getInfo();
4269
+ system.display.onDisplayChanged.addListener(() => console.log("changed"));
4270
+ ```
4271
+
4272
+ - `createChromeSystem(options)` returns `{ cpu, memory, storage, display }`
4273
+ (`SystemCpu`, `SystemMemory`, `SystemStorage`, `SystemDisplay`); nothing is
4274
+ read until a method is called; `backend` stands in for the machine in a
4275
+ test, and `windowsSystemBackend()` is the default (`SystemBackend` is its
4276
+ shape)
4277
+ - `cpu.getInfo()` resolves with `numOfProcessors`, `archName` (`x86-64`,
4278
+ `arm64`, `x86-32`, `arm`), `modelName`, `features`, `processors` (the
4279
+ `kernel`, `user`, `idle` and `total` milliseconds of each) and an empty
4280
+ `temperatures`; `features` is `mmx`, `sse` and `sse2` on x64 and empty
4281
+ elsewhere, as Node reports no others
4282
+ - `memory.getInfo()` resolves with `capacity` and `availableCapacity` in bytes
4283
+ - `storage.getInfo()` resolves with `{ id, name, type, capacity }` for each
4284
+ drive letter, `type` one of `StorageUnitType` (`fixed`, `removable`,
4285
+ `unknown`), read with `GetDriveTypeW`
4286
+ - `storage.onAttached` and `storage.onDetached` are not mirrored: Windows
4287
+ tells an app about a drive coming or going only through a hidden window's
4288
+ `WM_DEVICECHANGE` or a `DeviceWatcher` that needs a package identity; call
4289
+ `getInfo` again
4290
+ - `display.getInfo(flags)` resolves with one record per display area, the
4291
+ primary first: `id`, `name` (`Display 1` and so on), `isPrimary`,
4292
+ `isEnabled`, `dpiX`, `dpiY` (the system scale times 96), `bounds` and
4293
+ `workArea` as `{ left, top, width, height }` in screen pixels;
4294
+ `mirroringSourceId` is empty and `rotation` 0, as Windows tells an app
4295
+ neither; `singleUnified` is accepted and ignored; a flag of the wrong
4296
+ type rejects (zod)
4297
+ - `display.onDisplayChanged` is a `ChromeEvent` called with no argument; the
4298
+ display watcher runs only while a listener is added
4299
+ - Not here on purpose: `chrome.idle` is the web `IdleDetector` and
4300
+ `chrome.desktopCapture` the web `getDisplayMedia`, both already covered
4301
+ - `src/chrome/system/chrome-system.test.ts` runs it over a fake backend
4302
+
4303
+ ## Chrome windows (`winui-svelte/chrome/windows`)
4304
+
4305
+ `chrome.windows` for the windows of a native app, over `WindowHandle`
4306
+ Opt-in: nothing is bundled until an app imports it, importing does no work, and
4307
+ no global `chrome` is installed
4308
+
4309
+ ```ts
4310
+ import { createWindow } from "winui-svelte/window";
4311
+ import { chromeWindowSurface, createChromeWindows, WindowState } from "winui-svelte/chrome/windows";
4312
+
4313
+ const windows = createChromeWindows({
4314
+ open: () => chromeWindowSurface(createWindow({ component: Panel, props: {} }).handle)
4315
+ });
4316
+ windows.track({
4317
+ surface: chromeWindowSurface(mainHandle),
4318
+ isCurrent: true
4319
+ });
4320
+ windows.onFocusChanged.addListener(windowId => console.log(windowId));
4321
+ const panel = await windows.create({ width: 400, height: 300 });
4322
+ await windows.update(panel.id, { state: WindowState.maximized });
4323
+ await windows.remove(panel.id);
4324
+ ```
4325
+
4326
+ - `createChromeWindows(options)` makes a `ChromeWindows`; make one and share
4327
+ it, since the windows it knows and their ids live in it; no process-wide
4328
+ list of windows exists, so the app hands it the windows
4329
+ - `track({ surface, isCurrent })` starts reporting a window, gives it an id
4330
+ from 1 and fires `onCreated`; `chromeWindowSurface(handle)` makes a
4331
+ `ChromeWindowSurface` of a `WindowHandle` (`bind:handle` on `<Window>`, or
4332
+ the `handle` of what `createWindow` returns); a window leaves when it
4333
+ closes, firing `onRemoved`
4334
+ - `create(createData)` calls the `open` option, which makes the content,
4335
+ tracks what it returns and then applies `left`, `top`, `width`, `height`,
4336
+ `state` and `focused`; without `open` it rejects; `url`, `tabId`, `type`,
4337
+ `incognito` and `setSelfAsOpener` reach `open` and nothing else
4338
+ - `get(windowId)`, `getCurrent()`, `getLastFocused()` and `getAll()` resolve
4339
+ with a `ChromeWindow`: `id`, `focused`, `top`, `left`, `width`, `height`,
4340
+ `state`, `alwaysOnTop`, `incognito` (always false) and `type` (always
4341
+ `normal`); places and sizes are in device pixels, as `AppWindow` has them;
4342
+ `populate` and `windowTypes` are accepted and ignored, there are no tabs
4343
+ - `WINDOW_ID_CURRENT` (-2) names the window `track` marked current, else the
4344
+ last focused; `WINDOW_ID_NONE` (-1) is what `onFocusChanged` reports when
4345
+ focus leaves the app's windows
4346
+ - `update(windowId, updateInfo)` takes `left`, `top`, `width`, `height`,
4347
+ `state` (`WindowState`: `normal`, `minimized`, `maximized`, `fullscreen`,
4348
+ `locked-fullscreen`, the last as full screen), `focused` (true brings the
4349
+ window forward; false changes nothing) and `drawAttention` (flashes the
4350
+ taskbar button until the window is brought forward); as in Chrome a place
4351
+ or size cannot go with a state other than `normal`, and `focused` cannot go
4352
+ with `minimized`
4353
+ - `remove(windowId)` closes the window; `onRemoved` fires once it has closed,
4354
+ so a close guard on the window keeps it
4355
+ - Every method returns a promise and rejects on a bad argument (zod) or an
4356
+ unknown id; `WindowType` lists Chrome's types, and every window is `normal`
4357
+ - `onCreated`, `onRemoved`, `onFocusChanged` and `onBoundsChanged` are
4358
+ `ChromeEvent`s; `onBoundsChanged` fires after a move or a resize
4359
+ - Not mirrored: `tabs` in a window, `create`'s `focused: false` and `incognito`
4360
+ effects, and `onBoundsChanged`'s separate move and resize
4361
+ - `src/chrome/windows/chrome-windows.test.ts` runs it over fake windows
4362
+
2307
4363
  ## Data transfer (`winui-svelte/data-transfer`)
2308
4364
 
2309
4365
  Drag and drop, file dialogs, the clipboard and the launcher, in the web's
@@ -2453,8 +4509,17 @@ picker code in `src/window/pickers.ts` is the one used)
2453
4509
 
2454
4510
  `clipboard.readText()`, `readHtml()`, `read({ formats })` (a `DataTransfer`),
2455
4511
  `types()`, `writeText(text)`, `write({ text, html, uri, files, bitmap, custom,
2456
- shouldPersist })`, `clear()` and `onChange(callback)` (returns what stops it)
4512
+ shouldPersist, deferred })`, `clear()` and `onChange(callback)` (returns what
4513
+ stops it)
2457
4514
  `write` replaces the clipboard's whole content
4515
+ `deferred` maps a type to a provider (`() => Promise<string | NativeFile>`) that
4516
+ Windows runs when something pastes, through `DataPackage.SetDataProvider`; a
4517
+ source does the same for a drag with `event.dataTransfer.setDeferredData({
4518
+ type, provider })` in `dragstart`, and the data is made at the drop
4519
+ A type starting with `image/` is a picture, so its provider gives a `NativeFile`
4520
+ A provider that rejects leaves its format empty
4521
+ Windows runs a provider on the UI thread, and `shouldPersist` runs them at
4522
+ once, before the app exits
2458
4523
 
2459
4524
  ### Launcher and share
2460
4525
 
@@ -2491,6 +4556,199 @@ takes drops, through the handlers a real drop reaches, and resolves with the
2491
4556
  operation the control accepted (`0` when it refused); it sends no input, so an
2492
4557
  app can test its drop handling in a real window
2493
4558
 
4559
+ ## Incremental loading (`winui-svelte/incremental`)
4560
+
4561
+ A list that loads its next batch as the user scrolls near the end, for
4562
+ `ListView`, `GridView`, `ItemsRepeater`, `ItemsView` and `BreadcrumbBar`
4563
+ Opt-in: nothing is bundled until an app imports it, and importing does no work
4564
+
4565
+ ```svelte
4566
+ <script lang="ts">
4567
+ import { ListView } from "winui-svelte/components";
4568
+ import { createIncrementalSource, IncrementalStatus } from "winui-svelte/incremental";
4569
+
4570
+ const source = createIncrementalSource<Post>({
4571
+ batchSize: 25,
4572
+ load: ({ offset, count, signal }) => fetchPosts({ offset, count, signal })
4573
+ });
4574
+ </script>
4575
+
4576
+ <ListView incremental={source} item={postRow} items={source.items} key={post => post.id} />
4577
+ {#if source.state.status === IncrementalStatus.ERROR}
4578
+ <button onclick={() => source.retry()}>Try again</button>
4579
+ {/if}
4580
+ ```
4581
+
4582
+ `createIncrementalSource({ load, batchSize, threshold, isLast })` (options:
4583
+ `IncrementalSourceOptions`) returns an `IncrementalSource`, generic over the item;
4584
+ `IncrementalLoading` is what a list asks of its `incremental` prop
4585
+ `load({ offset, count, signal })` resolves with the next items; fewer than
4586
+ `count` (or none) is the last batch, and `isLast({ batch, items })` decides when
4587
+ the size cannot (a server that sends a cursor)
4588
+ `batchSize` is 20 and `threshold` is 5 by default: the next batch loads when
4589
+ the control realizes an item within `threshold` of the end
4590
+ The source holds `items` and `state`, both reactive
4591
+ `state` is `{ status: "idle" | "loading" | "done" }` or
4592
+ `{ status: "error", error }`; `IncrementalStatus` names the four (also in
4593
+ `winui-svelte/enums`)
4594
+
4595
+ - `loadMore()` loads now; while a load is in flight it returns that load's
4596
+ promise, so a load never runs twice, and it never rejects
4597
+ - A failure is the `error` state and stays until `retry()`; the list does not
4598
+ retry by itself
4599
+ - `cancel()` aborts the load in flight through its `AbortSignal` and drops its
4600
+ result; `reset()` also clears the items, and a bound list loads the first
4601
+ batch again; `dispose()` aborts for good
4602
+ - A list bound to a source starts it, so the first batch needs no call
4603
+
4604
+ ### The mechanism, and why
4605
+
4606
+ WinUI's own is `ISupportIncrementalLoading` on the items source, which the
4607
+ list calls when it nears its end (`IncrementalLoadingTrigger`)
4608
+ winui-svelte does not use it: the items of these lists are a native vector of
4609
+ keys (see Items), and the interface belongs on the collection itself, which
4610
+ would have to be a JavaScript-made `IBindableVector`,
4611
+ `INotifyCollectionChanged` and `ISupportIncrementalLoading` returning an
4612
+ `IAsyncOperation`
4613
+ dynwinrt (0.1.0-preview.23) can make a COM object from a callback
4614
+ (`createComObject`), but nothing in this package has proved that WinUI binds it
4615
+ as an items source, and the same table would have to answer a bindable vector's
4616
+ every call, so it was not built
4617
+ Instead the control's own realization tells the source: ListView and GridView
4618
+ report each container's index through `ContainerContentChanging`, the repeaters
4619
+ through `ElementPrepared`, and the source loads when that index is within
4620
+ `threshold` of the end
4621
+ The report is made after the layout pass (a timer of zero, the furthest index of
4622
+ the pass), because a source that changes `state` during it changes the app's
4623
+ markup (a footer) while WinUI measures, which WinUI refuses
4624
+ `ScrollViewer.ChangeView` and a real scroll reach the source the same way
4625
+ (`test/incremental-list.test.ts`)
4626
+
4627
+ A loading footer, an error row or a "no more" line is markup of the app, beside
4628
+ the list, from `source.state`; the list has no footer snippet of its own
4629
+ The example is `examples/incremental-list`
4630
+
4631
+ ## Input events and focus (`winui-svelte/input`)
4632
+
4633
+ The web's pointer, wheel, keyboard and focus events on any element, and focus
4634
+ management, over `Microsoft.UI.Xaml.Input`
4635
+ Opt-in: nothing is bundled until an app imports it, and importing does no work
4636
+ Everything runs on the UI thread
4637
+
4638
+ ### Events as on the web
4639
+
4640
+ ```svelte
4641
+ <script lang="ts">
4642
+ import { enableInputEvents, setPointerCapture, PointerType } from "winui-svelte/input";
4643
+ import type { KeyboardEvent, PointerEvent } from "winui-svelte/input";
4644
+
4645
+ enableInputEvents(); // once, before the first window
4646
+ </script>
4647
+
4648
+ <border
4649
+ onpointerdown={(event: PointerEvent) => {
4650
+ setPointerCapture({ control: event.currentTarget, pointerId: event.pointerId });
4651
+ const isPen = event.pointerType === PointerType.pen;
4652
+ console.log(event.clientX, event.clientY, isPen ? event.pressure : 1);
4653
+ }}
4654
+ onpointermove={(event: PointerEvent) => {
4655
+ for (const point of event.getCoalescedEvents()) {
4656
+ console.log(point.x, point.y);
4657
+ }
4658
+ }}
4659
+ onkeydown={(event: KeyboardEvent) => {
4660
+ if (event.key === "Escape") {
4661
+ event.preventDefault();
4662
+ }
4663
+ }}
4664
+ >
4665
+ <text-block>Draw here</text-block>
4666
+ </border>
4667
+ ```
4668
+
4669
+ `enableInputEvents()` adds the eleven names to the renderer's event-alias table
4670
+ (`src/renderer/host/event-adapters.ts`, the one `enableDragEvents()` fills), so a
4671
+ raw element takes them
4672
+ A WinUI-named event on the same element (`onpointerpressed`) keeps WinUI's own
4673
+ arguments, and so does every component prop: components get no new props
4674
+ `onkeydown` is the one name both share; on a raw element it takes the web's
4675
+ `KeyboardEvent` once the events are enabled
4676
+
4677
+ | Web event | WinUI | Notes |
4678
+ |---|---|---|
4679
+ | `pointerdown`, `pointerup`, `pointermove` | `PointerPressed`, `PointerReleased`, `PointerMoved` | `pointerId`, `pointerType` (`PointerType.mouse`, `pen`, `touch`; a touchpad is a mouse), `isPrimary`, `pressure`, `tiltX`, `tiltY`, `twist`, `button`, `buttons`, `clientX`, `clientY` (also `offsetX`, `pageX`, `x`), the four modifiers |
4680
+ | `pointerenter`, `pointerleave` | `PointerEntered`, `PointerExited` | WinUI bubbles them, the web does not |
4681
+ | `pointercancel` | `PointerCanceled` | |
4682
+ | `wheel` | `PointerWheelChanged` | `deltaX`, `deltaY` (positive when the wheel turns toward the user), `deltaMode` (always 0, pixels; WinUI gives 120 per notch) |
4683
+ | `keydown`, `keyup` | `KeyDown`, `KeyUp` | `key` and `code` mapped from `VirtualKey`, `repeat`, the modifiers read from the keyboard state |
4684
+ | `focusin`, `focusout` | `GotFocus`, `LostFocus` | `target`, `currentTarget`; no `relatedTarget` |
4685
+
4686
+ `event.getCoalescedEvents()` lists the points the pointer passed since the last
4687
+ event, oldest first, as plain field objects (`x`, `y`, `pressure` and the rest)
4688
+ `event.preventDefault()` and `stopPropagation()` both mark the WinUI event
4689
+ handled, so it goes no further up the tree and the control skips its own
4690
+ handling (a handled `keydown` for Tab does not move focus)
4691
+ `event.target` is `originalSource` (the element the event started at) and
4692
+ `event.currentTarget` the element the handler is written on
4693
+
4694
+ Limits:
4695
+
4696
+ - `key` and `code` assume the US layout, because WinUI's `VirtualKey` has no
4697
+ punctuation keys (they are `Unidentified`) and Shift does not turn `1` into
4698
+ `!`; read text from a `TextBox`, not from `keydown`
4699
+ - `isComposing` is always false: WinUI sends input method text to the text
4700
+ controls, not to `KeyDown`
4701
+ - `mouse*` and `click` are not provided; use the pointer names, or the
4702
+ `click` prop of a component
4703
+ - `getCoalescedEvents` entries are field objects, not full events
4704
+
4705
+ ### Pointer capture
4706
+
4707
+ ```ts
4708
+ setPointerCapture({ control, pointerId }); // returns true when WinUI took it
4709
+ hasPointerCapture({ control, pointerId });
4710
+ releasePointerCapture({ control, pointerId });
4711
+ ```
4712
+
4713
+ WinUI captures a `Pointer` object where the web captures an id, so the element
4714
+ remembers every pointer its input events carried; capturing an id that has not
4715
+ reached the element yet throws
4716
+ Call it from a `pointerdown` handler, as on the web
4717
+
4718
+ The Canvas 2D of `winui-svelte/win2d/context-2d` reads the same fields (one
4719
+ implementation), so a drawing library on a canvas sees the same `pointerType`,
4720
+ `pressure`, tilt and coalesced events
4721
+
4722
+ ### Focus
4723
+
4724
+ ```svelte
4725
+ <script lang="ts">
4726
+ import { activeElement, moveFocus, trapFocus } from "winui-svelte/input";
4727
+ import { FocusNavigationDirection } from "winui-svelte/enums";
4728
+
4729
+ const active = activeElement(); // active.current: the focused FrameworkElement or null
4730
+ </script>
4731
+
4732
+ <StackPanel {@attach trapFocus()}>
4733
+ <Button onclick={sender => moveFocus({ direction: FocusNavigationDirection.Down, within: sender })}>
4734
+ Down
4735
+ </Button>
4736
+ </StackPanel>
4737
+ ```
4738
+
4739
+ | API | Web | Notes |
4740
+ |---|---|---|
4741
+ | `activeElement().current` | `document.activeElement` | reactive; kept by `FocusManager`'s `GotFocus` and `LostFocus`, so it is null until focus first moves after the call; call it while a component initialises |
4742
+ | `moveFocus({ direction, within })` | none | `Up`, `Down`, `Left`, `Right` over XY focus navigation; `within` is any loaded element of the window; WinUI refuses `Next` and `Previous` in a desktop app, so those throw |
4743
+ | `trapFocus({ shouldFocusFirst })` | a focus trap | an attachment: sets `TabFocusNavigation` to `Cycle` (Tab after the last control goes to the first, Shift+Tab before the first to the last), moves focus in when the element is shown, gives it back to where it was when the element goes |
4744
+ | `FocusNavigationDirection` | none | in `winui-svelte/enums` |
4745
+ | `focusElement` | `element.focus()` | in `winui-svelte`, see Reactive readers of an element |
4746
+
4747
+ `FocusManager.GetFocusedElement()` without a window returns nothing in a desktop
4748
+ app, which is why `moveFocus` takes `within` and `trapFocus` reads the focus by
4749
+ the element's own window
4750
+ A trap cannot stop focus leaving through the title bar or another window
4751
+
2494
4752
  ## Web APIs (`winui-svelte/web-apis`)
2495
4753
 
2496
4754
  The standard Web APIs over WinRT and Win32, installed on demand; the package
@@ -2522,6 +4780,9 @@ needs
2522
4780
  | `requestAnimationFrame`, `requestIdleCallback` | `winui-svelte/web-apis/timing` | web | none | done |
2523
4781
  | `ResizeObserver`, `IntersectionObserver`, `MutationObserver` | `winui-svelte/web-apis/observers` | web plus extras | none | done |
2524
4782
  | `element.animate()`, `Animation`, `KeyframeEffect` | `winui-svelte/web-apis/animations` | web plus extras | none | done |
4783
+ | `ScrollTimeline`, `ViewTimeline`, `element.animate(keyframes, { timeline })` | `winui-svelte/scroll-timeline` | web | none | done |
4784
+ | `document.startViewTransition`, `ViewTransition`, `view-transition-name` | `winui-svelte/view-transitions` | web plus extras | none | done |
4785
+ | `alert`, `confirm`, `prompt` | `winui-svelte/dialogs` | web (as promises) plus extras | none | done |
2525
4786
  | `navigator.mediaDevices` (`getUserMedia`, `getDisplayMedia`, `enumerateDevices`), `MediaStream`, `MediaRecorder` | `winui-svelte/web-apis/media-devices` | web plus extras | none (a camera or microphone needs the Windows privacy switch on) | done |
2526
4787
  | `speechSynthesis`, `SpeechSynthesisUtterance`, `SpeechRecognition` (SSML, silences, scenario, phrases) | `winui-svelte/web-apis/speech` | web plus extras | none | done |
2527
4788
  | `navigator.mediaSession`, `MediaMetadata` | `winui-svelte/web-apis/media-session` | web plus extras | none | done |
@@ -2533,6 +4794,8 @@ needs
2533
4794
  | `IdleDetector` (user and screen state) | `winui-svelte/web-apis/idle` | web plus extras | none | done |
2534
4795
  | `navigator.credentials`, `PasswordCredential`, `PublicKeyCredential` (Windows Hello) | `winui-svelte/web-apis/credentials` | web plus extras | none | done |
2535
4796
  | `EyeDropper` | `winui-svelte/web-apis/eye-dropper` | web plus extras | none | done |
4797
+ | `FontFace`, `document.fonts` (font files of the app) | `winui-svelte/web-apis/fonts` | web plus extras | none | done |
4798
+ | `createImageBitmap`, `ImageBitmap`, `ImageDecoder`, canvas `toBlob`, `convertToBlob`, `toDataURL` (PNG, JPEG, GIF, BMP, TIFF) | `winui-svelte/web-apis/images` | web plus extras | none | done |
2536
4799
  | `navigator.contacts` (Contact Picker) | `winui-svelte/web-apis/contacts` | web plus extras | for most apps, package identity | done |
2537
4800
 
2538
4801
  Every row is built and tested; the timers (`setTimeout`, `setInterval`,
@@ -2566,7 +4829,9 @@ names the APIs register: `geolocation`, `accelerometer`, `screen-wake-lock`
2566
4829
  and so on) and `PermissionStateName` (`granted`, `denied`, `prompt`) are the
2567
4830
  spec's; an API registers its permission
2568
4831
  with `registerPermission({ name, provider })` and calls
2569
- `announcePermissionChange(name)` when it moves, so open statuses fire `change`
4832
+ `announcePermissionChange(name)` when it moves, so open statuses fire `change`; a provider may add `request()` (the system
4833
+ prompt), which `requestPermission(name)` calls and `readPermission(name)` reads
4834
+ back, as `chrome.permissions` does
2570
4835
 
2571
4836
  ### The three kinds and the extras convention
2572
4837
 
@@ -2613,6 +4878,23 @@ with `registerPermission({ name, provider })` and calls
2613
4878
  `incomingCall`, `urgent`), `expiration`, `group`, `hero`, `audio` (`default`,
2614
4879
  `im`, `mail`, `reminder`, `sms`, `alarm` to `alarm10`, `call` to `call10`),
2615
4880
  `attribution`
4881
+ - Listing and clearing: `notificationRegistration().getNotifications({ tag })`
4882
+ (`NotificationRegistration`, the notification members of a `ServiceWorkerRegistration`, which has no
4883
+ service worker here) lists what this run showed and Windows still holds
4884
+ (`AppNotificationManager.GetAllAsync`), so one the user dismissed in the
4885
+ notification center is not listed; one an earlier run showed has no object
4886
+ to return and is not listed; `Notification.closeAll()` (WinUI-only) closes
4887
+ the ones this run holds and calls `RemoveAllAsync`, which clears the earlier
4888
+ run's as well
4889
+ - Scheduling: `showTrigger: new TimestampTrigger(Date.now() + 60_000)` shows
4890
+ the notification at that moment, even after the app has exited
4891
+ (`Windows.UI.Notifications`' `ScheduledToastNotification`, built from the
4892
+ same toast XML; the App SDK manager has no schedule); only a process with
4893
+ package identity can schedule, and without it the constructor throws
4894
+ `NotSupportedError`; a scheduled notification fires no `show`, and
4895
+ `close()` before the moment takes it out of the schedule; not exercised for
4896
+ real here (`node.exe` has no identity), so the tests cover it with a fake
4897
+ backend
2616
4898
  - Package identity: not needed to show; an unpackaged app registers with
2617
4899
  `identity` (name and icon file) and `appUserModelId`; the `urgent` scenario
2618
4900
  and tooltips need a recent Windows build; a click after the process has gone
@@ -2646,8 +4928,11 @@ silent failure
2646
4928
  count is a `TypeError`
2647
4929
  WinUI-only: `navigator.setAppBadgeGlyph(glyph)` with a `BadgeGlyph`
2648
4930
  (`alert`, `available`, `away`, `busy`, `newMessage` and so on)
2649
- The unpackaged fallback (an overlay icon through `ITaskbarList3`) is not
2650
- built; without identity Windows refuses and the call rejects
4931
+ Without identity Windows refuses and the call rejects, unless
4932
+ `installBadging({ fallback: taskbarBadgeBackend(handle.taskbar) })` is given:
4933
+ the badge is then drawn as an overlay icon on that window's taskbar button
4934
+ (a red disc with the count, 99+ above 99, or the glyph's colour and mark),
4935
+ see "Taskbar button"
2651
4936
  - `installLaunch({ initialArguments })` defines `launchQueue` (a `LaunchQueue`) with `setConsumer`
2652
4937
  The start's command line is the first launch; each later copy's is handed
2653
4938
  over with `launchQueue.enqueueActivation(activation)` (WinUI-only), which
@@ -2655,7 +4940,7 @@ silent failure
2655
4940
  `LaunchParams.targetURL` is the first `scheme:` argument, `files` are the
2656
4941
  existing paths, as the file-system API's own `FileSystemFileHandle` (`name`, `getFile()`, the WinUI-only `path`)
2657
4942
  Launches wait for the consumer; registering the protocol or file type with
2658
- Windows is the installer's job
4943
+ Windows is `winui-svelte/app/activation`'s job (see Activation)
2659
4944
 
2660
4945
  ### Location and device state
2661
4946
 
@@ -2804,8 +5089,11 @@ Each is `install<Name>()` from its own subpath and takes an optional `backend`
2804
5089
  the always granted `clipboard-read` and `clipboard-write` permissions
2805
5090
  More than one item, or a type the clipboard cannot take, rejects with
2806
5091
  `NotAllowedError`
5092
+ A type whose value is a promise (`new ClipboardItem({ "text/html": promise })`)
5093
+ is delayed-rendered: `write` resolves at once and the promise is awaited
5094
+ when something pastes
2807
5095
  Extras: `readContent({ formats })` (copied files in `files`, custom formats
2808
- as text), `writeContent({ files, custom, bitmap, shouldPersist })`,
5096
+ as text), `writeContent({ files, custom, bitmap, deferred, shouldPersist })`,
2809
5097
  `formats()` and `history()` (Win+V, empty when history is off)
2810
5098
  `windowsClipboardBackend()` is the real backend, for a test to wrap
2811
5099
  - `winui-svelte/web-apis/share`: `installShare()` defines `navigator.share`
@@ -2864,8 +5152,16 @@ called (`runWindow({ webApis: [installPage, installTiming] })`)
2864
5152
  that `usePageWindow(handle)` is given (`bind:handle` on `<Window>`)
2865
5153
 
2866
5154
  - `document.visibilityState`, `hidden`, `hasFocus()` and `visibilitychange`:
2867
- hidden means minimized or hidden (to the tray); the window being active is
2868
- focus
5155
+ hidden means minimized, hidden (to the tray) or the display turned off; the
5156
+ window being active is focus
5157
+ - `document` `freeze` and `resume` (Page Lifecycle, with `onfreeze` and
5158
+ `onresume`): once per wake of the machine from sleep, `freeze` then
5159
+ `resume` together, because a sleeping process cannot see itself go to sleep;
5160
+ the wake is found by a gap of over ten seconds between two ticks of a
5161
+ one-second timer, so it is also counted after a long stall of the process;
5162
+ never exercised with a real sleep here (the tests use a stand-in clock)
5163
+ - The display and the wake come from `windowsSystemPowerSource` (see Devices,
5164
+ power); a machine where it cannot be read counts as awake with the display on
2869
5165
  - `window` `focus`, `blur`, `beforeunload` (call `preventDefault()` to keep the
2870
5166
  window open; there is no prompt), `pagehide` and `unload`, with `onfocus` and
2871
5167
  the other handler properties; `window.close()`, `window.closed` and
@@ -2935,13 +5231,174 @@ tree's elements `animate()` and `getAnimations()`, and the global scope
2935
5231
  rotation, size, margin, padding, border, shape dashes); the keyframes are
2936
5232
  evenly spaced, so a keyframe `offset` or `easing` is ignored, and anything
2937
5233
  else warns once
2938
- - Not covered: `document.getAnimations()`, composite modes, pseudo-elements and
2939
- scroll timelines
5234
+ - Not covered: `document.getAnimations()`, composite modes and
5235
+ pseudo-elements; scroll timelines are `winui-svelte/scroll-timeline`, below
2940
5236
  - Extras (WinUI only): `element.prepareConnectedAnimation(key)` and
2941
5237
  `element.startConnectedAnimation(key)` over `ConnectedAnimationService`;
2942
5238
  implicit animations are the CSS `transition:` the translator already maps to
2943
5239
  `OpacityTransition` and its siblings
2944
5240
 
5241
+ #### Scroll timelines (`winui-svelte/scroll-timeline`)
5242
+
5243
+ `installScrollTimeline()` defines `ScrollTimeline` and `ViewTimeline` on the
5244
+ global scope and lets `element.animate(keyframes, { timeline })` follow a scroll
5245
+ position instead of the clock; install `installAnimations()` first for the rest
5246
+ of the Web Animations API (a call without a timeline goes on to it)
5247
+ It is not part of `installWebApis`; `"ScrollTimeline" in globalThis` tells
5248
+ whether it was installed
5249
+
5250
+ - `new ScrollTimeline({ source, axis })`: `source` is a `<scroll-viewer>`
5251
+ element, `axis` is `block` (the default), `inline`, `x` or `y`;
5252
+ `currentTime` is `{ value, unit: "percent" }` of the scrollable range, or
5253
+ `null` while the source is no scroll viewer in a window, and `duration` is 100
5254
+ percent
5255
+ - `new ViewTimeline({ subject, axis, inset })`: `currentTime` is how far the
5256
+ subject has crossed the nearest scroll viewer, from entering (0) to leaving
5257
+ (100); `inset` is `"10px"` or `["10px", "20%"]`
5258
+ - `element.animate(keyframes, { timeline, rangeStart, rangeEnd, direction })`
5259
+ returns a `ScrollLinkedAnimation` with `timeline`, `playState`
5260
+ (`running` or `idle`) and `cancel()`; `rangeStart` and `rangeEnd` are the
5261
+ CSS `animation-range` words (`"entry 10%"`, `"25%"`)
5262
+ - The same rules as the CSS: the keyframes go through the CSS build's reader,
5263
+ so opacity, translate, scale, rotate and a transform of them work, and a
5264
+ width, a color, a keyword or a skew is a `NotSupportedError`, as is an easing
5265
+ other than `linear` and an iteration count other than 1; a keyframe `offset`
5266
+ is honoured, the rest are evenly spaced
5267
+ - Under reduced motion (Windows' animation effects off, or the
5268
+ `isMotionReduced` option) the animation does not start and `playState` is
5269
+ `idle`; an element with the class `winui-motion-always` keeps it
5270
+ - The compositor runs the animation, so the UI thread cannot read its value
5271
+ back: `Visual.Opacity` stays at its resting value (the pixels are what shows)
5272
+ - Not covered: `getAnimations()` for these, `pause()`, `play()` and
5273
+ `currentTime` of the animation, and `timeline-scope`
5274
+
5275
+ #### View transitions (`winui-svelte/view-transitions`)
5276
+
5277
+ `installViewTransitions()` defines `document.startViewTransition` and
5278
+ `ViewTransition` over WinUI's connected animations
5279
+ An element takes part through `view-transition-name` in a sheet or a style
5280
+ attribute (`winui-svelte/css/view-transition`, see `src/css/API.md`): before
5281
+ the update runs, each named element is prepared under its name
5282
+ (`ConnectedAnimationService.PrepareToAnimate`); after it, the element with the
5283
+ same name starts that animation (`TryStart`), and WinUI flies a picture of the
5284
+ old element to the new one
5285
+
5286
+ ```svelte
5287
+ <script lang="ts">
5288
+ import { installViewTransitions } from "winui-svelte/view-transitions";
5289
+
5290
+ installViewTransitions();
5291
+ let selected = $state<Photo | null>(null);
5292
+
5293
+ function open(photo: Photo) {
5294
+ document.startViewTransition(() => {
5295
+ selected = photo;
5296
+ });
5297
+ }
5298
+ </script>
5299
+
5300
+ {#if selected}
5301
+ <border class="hero" style="view-transition-name: photo-{selected.id}" />
5302
+ {:else}
5303
+ {#each photos as photo (photo.id)}
5304
+ <border style="view-transition-name: photo-{photo.id}" />
5305
+ {/each}
5306
+ {/if}
5307
+ ```
5308
+
5309
+ - `startViewTransition(update)` or `startViewTransition({ update, types })`
5310
+ returns a `ViewTransition` with `updateCallbackDone`, `ready`, `finished`,
5311
+ `types` and `skipTransition()`; the update may return a promise, and runs in
5312
+ a microtask after the old elements are prepared
5313
+ - After the update the transition waits one turn of the event loop for Svelte
5314
+ to apply it, then pairs the names; `ready` resolves once the animations
5315
+ start, `finished` once WinUI reports each one completed
5316
+ - Like the web: a name two elements share skips the transition (`ready`
5317
+ rejects with an `InvalidStateError`), `skipTransition()` rejects `ready`
5318
+ with an `AbortError` and lets `finished` follow the update, an update that
5319
+ throws rejects all three promises with its error, and a new transition skips
5320
+ the one still running
5321
+ - Extras (WinUI only): `configuration` in the options object picks the
5322
+ motion, a `ConnectedAnimationKind` from `winui-svelte/enums`: `gravity`
5323
+ (WinUI's default, for going forward), `direct` (for going back) or `basic`
5324
+ - Limits: only a name both states have moves; a name only the old state has
5325
+ gets no exit and one only the new state has no entrance (the web would fade
5326
+ them), and there is no cross-fade of the whole window (the web's `root`)
5327
+ An element that keeps its name and stays in the tree does not move: WinUI
5328
+ will not animate an element to itself (`implicitLayoutAnimation` slides
5329
+ children the layout moves)
5330
+ The duration and easing are WinUI's (`ConnectedAnimationService`), not CSS;
5331
+ the `::view-transition-*` pseudo-elements, `view-transition-class` and
5332
+ `:active-view-transition-type()` have no counterpart, and `types` is carried
5333
+ but read by nothing
5334
+
5335
+ #### Dialogs (`winui-svelte/dialogs`)
5336
+
5337
+ `installDialogs()` defines `alert`, `confirm` and `prompt` on the global scope
5338
+ over WinUI's `ContentDialog`
5339
+
5340
+ ```svelte
5341
+ <script lang="ts">
5342
+ import { installDialogs, useDialogWindow } from "winui-svelte/dialogs";
5343
+ import type { WindowHandle } from "winui-svelte/components";
5344
+
5345
+ installDialogs();
5346
+ let handle = $state<WindowHandle>();
5347
+
5348
+ $effect(() => {
5349
+ if (!handle) {
5350
+ return;
5351
+ }
5352
+
5353
+ return useDialogWindow(handle);
5354
+ });
5355
+
5356
+ async function remove() {
5357
+ const isSure = await confirm("Delete this file?");
5358
+ if (isSure) {
5359
+ await alert("Deleted");
5360
+ }
5361
+ }
5362
+ </script>
5363
+ ```
5364
+
5365
+ - Decision: they return promises, where the browser's block, because a
5366
+ `ContentDialog` is asynchronous and the thread that would block is the one
5367
+ that pumps the window, so a blocking version would freeze the dialog it
5368
+ waits for; the web names are kept, so that a library written for a browser still calls them,
5369
+ and the result is awaited: `await confirm(text)`. The other way (new names
5370
+ and no globals) would make every such library need a patch; the cost of this
5371
+ way is that `if (confirm(text))` is always true, because a promise is
5372
+ truthy, and `lib.dom` still types the globals as synchronous; in your own
5373
+ code call `showAlert`, `showConfirm` and `showPrompt` (the same functions,
5374
+ typed as promises) and leave the globals to libraries
5375
+ - `alert(message)` resolves when the dialog closes, `confirm(message)`
5376
+ resolves `true` for OK, `prompt(message, default)` resolves with the text or
5377
+ `null` for Cancel, Escape or the close button; a message that is not a
5378
+ string is shown as `String(message)`
5379
+ - `showDialog({ content, title, primaryButtonText, secondaryButtonText,
5380
+ closeButtonText, defaultButton, input, signal })` is the WinUI form: three
5381
+ buttons, the button Enter presses (`DialogButton`), a text box
5382
+ (`{ value, placeholder, isMultiline }`) and an `AbortSignal` that closes the
5383
+ dialog like Escape; it resolves with `{ result, text }`, where `result` is a
5384
+ `DialogResult` (`primary`, `secondary` or `none`) and `text` is the box when
5385
+ the primary button closed a dialog that had one
5386
+ - Which window: `useDialogWindow(handle)` takes the handle `bind:handle`
5387
+ gives, for each window; the dialog opens in the one activated last, and the
5388
+ function it returns stops following the window
5389
+ - One at a time: WinUI shows one `ContentDialog` per window, so a dialog asked
5390
+ for while another is open waits, in order, in the same line the
5391
+ `ContentDialog` components use; a dialog that fails does not hold the line,
5392
+ and an aborted one that still waits is rejected with an `AbortError`
5393
+ - No window: `alert` and `confirm` show a message box (`showNotice`, with the
5394
+ installed `title`), and `prompt` and `showDialog` reject with an
5395
+ `InvalidStateError`, because a message box has no text box and no third
5396
+ button
5397
+ - `installDialogs({ title, okText, cancelText })` sets the title and the
5398
+ button texts (English by default; WinUI does not translate them)
5399
+ - Not covered: a dialog that blocks the caller, and the prompt of
5400
+ `beforeunload`
5401
+
2945
5402
  ### Media devices (`winui-svelte/web-apis/media-devices`)
2946
5403
 
2947
5404
  `installMediaDevices()` defines `navigator.mediaDevices` (`enumerateDevices`,
@@ -3188,6 +5645,35 @@ needs a single-threaded apartment: the window thread has one)
3188
5645
  `unlocked`) set; `change` fires when either moves
3189
5646
  - Extra: `idleMilliseconds`, the time since the last input at the last reading
3190
5647
 
5648
+ #### Fonts
5649
+
5650
+ `installFontFaces()` defines `FontFace` and `document.fonts` (a `FontFaceSet`)
5651
+ over the font registry that a stylesheet's `@font-face` also fills, so a font
5652
+ file of the app is used by its family name in a `font-family` of a style and in
5653
+ a `fontFamily` prop
5654
+
5655
+ - `new FontFace(family, source, descriptors)`: `source` is `url("...")`, a path
5656
+ or a `file:` URL (a relative path is relative to the working folder), or the
5657
+ bytes of a font (written to a file of the temporary folder named by their
5658
+ hash); `load()` registers the file under the family and rejects with
5659
+ `NetworkError` when there is no such file; `status` and `loaded` follow
5660
+ - `document.fonts.add(face)` registers at once; `delete(face)`, `clear()` and
5661
+ `has(face)` as on the web; `check(font)` and `load(font)` look at the faces of
5662
+ the set that the font shorthand names; `ready` is resolved and `status` is
5663
+ `loaded`
5664
+ - `FontLoadStatus` is the closed set of `status` (`"unloaded"`, `"loading"`,
5665
+ `"loaded"`, `"error"`)
5666
+ - The family must be the name written inside the font file; weight, style,
5667
+ width and `unicodeRange` are kept and read back but choose nothing, because
5668
+ WinUI takes the face from the file
5669
+ - WinUI cannot unload a font: after `delete(face)` the family stops being
5670
+ spelled as its file, but a font already loaded stays usable by name until the
5671
+ process ends
5672
+ - It works in a plain Node process; nothing is installed on the machine (the
5673
+ file is handed to WinUI as `ms-appx:///` and its absolute path)
5674
+ - Extra: `registerFont({ family, source, base })` and `unregisterFont(family)`
5675
+ from `winui-svelte/css`, the registry itself
5676
+
3191
5677
  #### Other exports
3192
5678
 
3193
5679
  - Bluetooth: `BluetoothRemoteGATTServer`, `BluetoothRemoteGATTService`,
@@ -3259,6 +5745,42 @@ anywhere on the screen
3259
5745
  - `ScreenPicker` is the one interface the polling picker (`windowsScreenPicker`)
3260
5746
  and the tests implement
3261
5747
 
5748
+ #### Images (`winui-svelte/web-apis/images`)
5749
+
5750
+ `installImageCodecs()` defines `createImageBitmap`, `ImageBitmap` and
5751
+ `ImageDecoder`, and adds `toBlob`, `convertToBlob` and `toDataURL` to
5752
+ `CanvasElement`; all of it runs on `Windows.Graphics.Imaging`, which needs no
5753
+ window and no package identity
5754
+
5755
+ - `createImageBitmap(source, options?)` and `createImageBitmap(source, sx, sy,
5756
+ sw, sh, options?)` take a `Blob`, `File` or `NativeFile` of an image file,
5757
+ `ImageData`, an `ImageBitmap` or a canvas; `imageOrientation` (`from-image`,
5758
+ `none`, `flipY`), `resizeWidth`, `resizeHeight` and `resizeQuality` work;
5759
+ `premultiplyAlpha` and `colorSpaceConversion` are read and ignored (images are
5760
+ color managed to sRGB); a file Windows cannot decode rejects with
5761
+ `InvalidStateError`
5762
+ - `ImageBitmap` has `width`, `height` and `close()`; `drawImage` and
5763
+ `createPattern` take it; extra: `toImageData()` (RGBA, not premultiplied)
5764
+ - `new ImageDecoder({ data, type })` takes bytes or a stream; `tracks` (an
5765
+ `ImageTrackList` of one `ImageTrack`), `complete`, `completed`, `decode({ frameIndex })`, `reset()`,
5766
+ `close()` and `ImageDecoder.isTypeSupported(type)`; `image` is an
5767
+ `ImageBitmap`, not a `VideoFrame`, and `duration` is not reported; a GIF
5768
+ frame is what the file stores, so an optimized GIF gives the changed area
5769
+ - Decoders: BMP, GIF, ICO, JPEG, PNG, TIFF, JPEG XR, and WebP, AVIF and HEIC
5770
+ where Windows has the codec; `isTypeSupported` asks Windows' own list
5771
+ - Encoders: PNG, JPEG (`quality` 0 to 1 is `ImageQuality`, 0.92 by default;
5772
+ transparency is drawn over black), GIF, BMP and TIFF; WebP has no Windows
5773
+ encoder, so `toBlob`, `convertToBlob` and `toDataURLAsync` give a PNG for
5774
+ `image/webp` and for any type Windows cannot write, as the platform does
5775
+ - `toDataURL(type, quality)` is synchronous and every Windows encoder is
5776
+ asynchronous, so it always returns a PNG; extra: `toDataURLAsync(type,
5777
+ quality)` encodes any type above
5778
+ - A canvas with no pixels gives `data:,`, `null` from `toBlob` and rejects
5779
+ `convertToBlob`
5780
+ - `ImageCodec` is the one interface the Windows codec (`windowsImageCodec`)
5781
+ and the tests implement; `ImageMimeType`, `ImageOrientation` and
5782
+ `ResizeQuality` are in `winui-svelte/enums`
5783
+
3262
5784
  #### Contacts (`winui-svelte/web-apis/contacts`)
3263
5785
 
3264
5786
  `installContacts()` defines `navigator.contacts` (a `ContactsManager`) with
@@ -3276,6 +5798,82 @@ the five properties
3276
5798
  - `ContactChooser` is the one interface the real picker (`windowsContactChooser`)
3277
5799
  and the tests implement
3278
5800
 
5801
+ ## Accessibility (`winui-svelte/accessibility`)
5802
+
5803
+ Tell a screen reader what happened, and check the window for what it would
5804
+ trip on; each is opt-in, and the audit is for development only
5805
+
5806
+ ```svelte
5807
+ <script lang="ts">
5808
+ import { announce, LivePriority, liveRegion } from "winui-svelte/accessibility";
5809
+ import { elementRef } from "winui-svelte";
5810
+ import { TextBlock } from "winui-svelte/components";
5811
+
5812
+ const status = elementRef<TextBlock>();
5813
+ </script>
5814
+
5815
+ <!-- a live region: a change of its text is spoken -->
5816
+ <TextBlock {@attach liveRegion({ priority: LivePriority.POLITE })} {@attach status.attach}>{saved}</TextBlock>
5817
+ ```
5818
+
5819
+ ```ts
5820
+ announce({ message: "Saved", element: status.current, priority: LivePriority.POLITE });
5821
+ ```
5822
+
5823
+ | Web API | Here |
5824
+ |---|---|
5825
+ | `aria-live="polite"` and `role="status"` | `LivePriority.POLITE`: waits for the user, a newer message replaces an older one |
5826
+ | `aria-live="assertive"` and `role="alert"` | `LivePriority.ASSERTIVE`: interrupts |
5827
+ | `aria-live="off"` | `LivePriority.OFF`: says nothing |
5828
+ | writing text into a live region | `announce({ message, element, priority })`: `AutomationPeer.RaiseNotificationEvent` (kind Other; polite is `MostRecent`, assertive is `ImportantMostRecent`) |
5829
+ | the `aria-live` attribute | `liveRegion({ priority })`: `AutomationProperties.LiveSetting` of the element |
5830
+
5831
+ - `FormField` marks its error text with the same `liveRegion`, so a form error
5832
+ is spoken when it appears
5833
+ - `announce` raises the notification from `element`, or from the nearest
5834
+ element above it that has an automation peer (a layout panel has none; a
5835
+ `TextBlock` does), so keep a small status element for it
5836
+ - `LivePriority` is also in `winui-svelte/enums`
5837
+
5838
+ ### Audit (`winui-svelte/accessibility/audit`)
5839
+
5840
+ `auditAccessibility(root)` walks the visual tree of a laid-out window and returns
5841
+ typed findings; call it from `onloaded` or a button in development, and never
5842
+ import the entry in a production build
5843
+
5844
+ ```ts
5845
+ import { auditAccessibility } from "winui-svelte/accessibility/audit";
5846
+
5847
+ for (const finding of auditAccessibility(content)) {
5848
+ console.warn(`${finding.path}: ${finding.message} - ${finding.suggestion}`);
5849
+ }
5850
+ ```
5851
+
5852
+ | Rule id | Applies to | Finds |
5853
+ |---|---|---|
5854
+ | `unnamed-button` | buttons | no accessible name (an icon-only button with no `automationName`) |
5855
+ | `unlabeled-input` | text boxes, combo boxes, sliders, check boxes | no name, header or `automationLabeledBy` |
5856
+ | `duplicate-access-key` | interactive controls | the same `accessKey` on two elements |
5857
+ | `zero-size-focusable` | interactive controls | takes focus but has no width or height |
5858
+ | `unreachable-by-keyboard` | interactive controls | not a tab stop and no access key or keyboard accelerator |
5859
+ | `low-contrast-text` | text, buttons, inputs | below WCAG AA (4.5 to 1, 3 to 1 for large text) on a solid background the tree can resolve |
5860
+
5861
+ - The name is what UI Automation computes (`AutomationPeer.GetName`), so it
5862
+ counts `automationName`, a button's text, a header and a label alike
5863
+ - Contrast is measured only where the foreground is a solid brush and a solid
5864
+ background lies behind the text (a translucent one is mixed with it);
5865
+ gradients, acrylic and images are left alone
5866
+ - The rules are one table, `accessibilityRules`; `ruleDescriptions()` is the
5867
+ table without its predicates, and `winui-svelte/accessibility/rules.json`
5868
+ is the same as JSON for an editor (`pnpm gen:accessibility-rules`, checked by
5869
+ `pnpm gen:accessibility-rules:check` in the lint gate)
5870
+ - `auditTree({ root, host })` runs the rules over any tree a host describes,
5871
+ which is how the unit tests run them without WinUI
5872
+ - `examples/accessibility` holds a failing and a fixed form;
5873
+ `test/accessibility.test.ts` audits it in a real window and hears
5874
+ `announce` through a UI Automation event handler, and the gallery page
5875
+ "Live regions and the audit" shows both
5876
+
3279
5877
  ## Forms (`winui-svelte/forms`)
3280
5878
 
3281
5879
  Opt-in: nothing in the core imports it, so an app that does not use it does
@@ -3647,7 +6245,7 @@ and resets the context, as in a browser), `getContext("2d")` (the same
3647
6245
  `display` and any other property, with `setProperty`), `getBoundingClientRect()`,
3648
6246
  `clientWidth`, `clientHeight`, `offsetWidth`, `offsetHeight`, `addEventListener`,
3649
6247
  `removeEventListener` and `dispatchEvent`
3650
- It has no document: there is no `ownerDocument` and no `toDataURL`, and
6248
+ It has no document: there is no `ownerDocument`, and `toDataURL` and `toBlob` exist only after `installImageCodecs()`, and
3651
6249
  `parentNode` is `null`
3652
6250
 
3653
6251
  Pointer events of the control reach the canvas as DOM events: `pointerdown`,
@@ -3718,8 +6316,8 @@ Not tried: the events need a real pointer, which a test must not inject
3718
6316
  | `globalCompositeOperation` of `multiply`, `screen`, `overlay`, `darken`, `lighten`, `color-dodge`, `color-burn`, `hard-light`, `soft-light`, `difference`, `exclusion`, `hue`, `saturation`, `color`, `luminosity` | Win2D blends an effect's inputs, not a shape with the canvas; the value is ignored |
3719
6317
  | `filter` | it is always `none`; use a Win2D effect on the image |
3720
6318
  | `letterSpacing`, `wordSpacing`, `fontKerning`, `fontStretch`, `fontVariantCaps`, `textRendering` | No Win2D equivalent set per draw call |
3721
- | `drawImage` of an `HTMLImageElement`, `ImageBitmap`, `HTMLVideoElement` or `OffscreenCanvas` | There is no DOM; decode with `loadBitmap`, or draw another `CanvasElement` |
3722
- | `toDataURL`, `toBlob`, `transferControlToOffscreen`, `captureStream` | No encoder is exposed on the canvas; `canvas.target.saveAsync` writes a PNG or JPEG file |
6319
+ | `drawImage` of an `HTMLImageElement`, `HTMLVideoElement` or `OffscreenCanvas` | There is no DOM; decode with `loadBitmap`, or draw another `CanvasElement`; an `ImageBitmap` from `winui-svelte/web-apis/images` draws |
6320
+ | `transferControlToOffscreen`, `captureStream` | There is no `OffscreenCanvas` or media stream; `toBlob`, `convertToBlob` and `toDataURL` come with `winui-svelte/web-apis/images` |
3723
6321
  | `getContext` of `webgl`, `webgl2`, `bitmaprenderer`; the `alpha`, `desynchronized` and `willReadFrequently` options | One 2D context, always with an alpha channel |
3724
6322
  | `scrollPathIntoView` | There is no element tree to scroll; the method is absent |
3725
6323
  | `requestAnimationFrame`, `devicePixelRatio`, `document`, `window` | Globals of a browser, defined by the opt-in `winui-svelte/web-apis/timing`, `/screen` and `/page`; `getComputedStyle` has no counterpart |
@@ -3750,7 +6348,7 @@ Each area is an opt-in subpath, so an app that imports none of them bundles none
3750
6348
  | `winui-svelte/devices/input` | `inputDevices`, `readInputCapabilities` |
3751
6349
  | `winui-svelte/devices/bluetooth` | adapter, devices, `bluetoothScanner`, `scanBluetoothAdvertisements`, GATT, UUIDs, radios |
3752
6350
  | `winui-svelte/devices/printers` | `printers`, `listPrinters`, `printFile` |
3753
- | `winui-svelte/devices/power` | `battery` |
6351
+ | `winui-svelte/devices/power` | `battery`, `systemPower` |
3754
6352
  | `winui-svelte/devices/network` | `networkInformation` |
3755
6353
  | `winui-svelte/devices/audio` | `audioDevices` |
3756
6354
  | `winui-svelte/devices/display` | `displays`, `getDisplayMonitors` |
@@ -3771,7 +6369,7 @@ Everything here was checked to work from `node.exe` with no package identity;
3771
6369
  - A list is a keyed reactive collection (`KeyedCollection`): `{#each collection.items as device (device.id)}`, with `get(key)`, `has(key)`, `keys` and `size`
3772
6370
  - A change makes a new snapshot object, so a keyed block redraws the row
3773
6371
  - Every rune reads through a `source` (or `defaults`, `list`, `createSource`) option whose default is the Windows end: `windowsInputSource`, `windowsPowerSource`, `windowsNetworkSource`, `windowsAudioDefaults`, `windowsDisplaySource`, `windowsGamepadSource` and `windowsPrinterSource` are those defaults, exported so a test or a wrapper can use or replace them
3774
- - The WinRT enums the results are made of are re-exported under their own names: `AudioDeviceRole`, `BatteryStatus`, `BluetoothCacheMode`, `BluetoothLEScanningMode`, `DisplayMonitorConnectionKind`, `EnergySaverStatus`, `GamepadButtons`, `NetworkConnectivityLevel`, `NetworkCostType`, `PointerDeviceType`, `PowerSupplyStatus`, `RadioAccessStatus`, `RadioKind`, `RadioState`
6372
+ - The WinRT enums the results are made of are re-exported under their own names: `AudioDeviceRole`, `BatteryStatus`, `BluetoothCacheMode`, `BluetoothLEScanningMode`, `DisplayMonitorConnectionKind`, `DisplayStatus`, `EffectivePowerMode`, `EnergySaverStatus`, `GamepadButtons`, `NetworkConnectivityLevel`, `NetworkCostType`, `PointerDeviceType`, `PowerSupplyStatus`, `RadioAccessStatus`, `RadioKind`, `RadioState`, `UserPresenceStatus`
3775
6373
 
3776
6374
  ### Device enumeration
3777
6375
 
@@ -3914,6 +6512,7 @@ build; print the document to a file and use `printFile`, or draw it with Win2D
3914
6512
  | Rune | Reads | Fields |
3915
6513
  |---|---|---|
3916
6514
  | `battery()` | `Battery.AggregateBattery`, `PowerManager` | `hasBattery`, `percent`, `isCharging`, `isDischarging`, `isOnAcPower`, `isEnergySaverOn`, `remainingDischargeMilliseconds`, `healthPercent`, `reading` |
6515
+ | `systemPower()` | `Microsoft.Windows.System.Power.PowerManager` (Windows App SDK) | `displayStatus`, `isDisplayOn`, `effectivePowerMode`, `isUserPresent`, `resumeCount`, `reading` |
3917
6516
  | `networkInformation()` | `NetworkInformation` | `isOnline`, `connectivity`, `profileName`, `isMetered`, `isRoaming`, `isWifi`, `isMobile`, `signalBars`, `reading` (with every profile name) |
3918
6517
  | `displays()` | `DisplayArea` and its watcher | `areas` (bounds and work area), `primary`, `count`; needs the Windows App SDK, which a window has |
3919
6518
  | `getDisplayMonitors()` | `DisplayMonitor` | name, native resolution, physical size, DPI, luminance; needs no window |
@@ -3927,6 +6526,14 @@ build; print the document to a file and use `printFile`, or draw it with Win2D
3927
6526
  - A GATT call that does not succeed throws `BluetoothLowEnergyError` with the `GattCommunicationStatus` (`Unreachable`, `ProtocolError`, `AccessDenied`)
3928
6527
  - `getBluetoothAdapter()` resolves to `null` and `radios` is empty when the machine has no adapter
3929
6528
  - An event Windows refuses to an app without a package identity is left unsubscribed: the value is still read live, it only does not update by itself
6529
+ - `systemPower` polls once a second and does not subscribe to `PowerManager`'s
6530
+ events: any subscription (even one removed again) keeps the Node process from
6531
+ exiting, and Windows raises them on a thread of its own, which dynwinrt does
6532
+ not deliver; `SystemSuspendStatus` cannot be read before its event has fired,
6533
+ so `resumeCount` counts a wake as a gap of over ten seconds between two
6534
+ ticks; `userPresenceStatus` reads 2 until Windows has said (a value the
6535
+ bindings do not name); `EnergySaverStatus` is the one `battery` already
6536
+ reads (`isEnergySaverOn`); the properties need the Windows App SDK
3930
6537
  - A machine without a sensor, gamepad, battery or printer reports it (`isAvailable` false, an empty list, `hasBattery` false), never an error
3931
6538
  - The radio state, pairing prompts, Bluetooth consent and the microphone are the user's: reading a list needs no consent, using a device can
3932
6539
 
@@ -3949,6 +6556,58 @@ Does not work or is not offered:
3949
6556
  - Gamepad input while the window is in the background: Windows delivers it to the focused window
3950
6557
  - Sensors on a desktop: there are none, so `isAvailable` is false
3951
6558
 
6559
+ ## Store and package (`winui-svelte/store`)
6560
+
6561
+ The Microsoft Store and package APIs (`Windows.Services.Store.StoreContext`,
6562
+ `Windows.ApplicationModel.Package`, `PackageCatalog`, `StartupTask`) as typed
6563
+ async calls and events, opt-in
6564
+ Every call that needs a package identity answers `{ hasPackage: false }` outside
6565
+ a package (plain Node.js, Electron, `pnpm dev`) and never throws for the missing
6566
+ identity; inside one it answers `{ hasPackage: true, value }`
6567
+ The check is `GetCurrentPackageFullName`, not the exception `Package.Current`
6568
+ throws
6569
+
6570
+ | Export | What |
6571
+ |---|---|
6572
+ | `hasPackage()`, `getPackageInfo()` | whether the process has an identity; the package's name, full name, family name, publisher, version and install path, or null |
6573
+ | `getAppLicense({ window })` | `isActive`, `isTrial`, `skuStoreId`, `expirationDate` (null when it never ends) |
6574
+ | `watchLicense({ window, pollMilliseconds })` | a `LicenseWatcher` that raises `offlinelicenseschanged` (`onofflinelicenseschanged`); `close()` stops it |
6575
+ | `checkForUpdates({ window })` | `{ updates, hasMandatory, install({ onprogress }) }`: nothing is downloaded until `install` is called, and it installs exactly the updates found |
6576
+ | `watchPackages()` | a `PackageWatcher` that raises `packagestaging`, `packageinstalling` and `packageupdating` (`PackageProgressEvent`, with `progress`, `isComplete`, `errorCode`) |
6577
+ | `getStartupTask({ taskId })` | the task's `state`, `enable()` (a request: read the state it returns) and `disable()` |
6578
+ | `UpdateState`, `StartupState`, `PackageStage` | the closed sets, each a value plus a type |
6579
+ | `windowsStoreBackend` | the real backend over the WinRT classes; `StoreBackend` is the interface the calls take, so a test swaps it |
6580
+
6581
+ `window` is the owner of any Store dialog: a `WindowHandle` or the native
6582
+ `Window`; it is given to `IInitializeWithWindow` on the `StoreContext`, as a
6583
+ desktop app must
6584
+ Without it a call that shows UI is refused by Windows
6585
+
6586
+ Events and threads: dynwinrt delivers a callback only when Windows raises it on
6587
+ the UI thread
6588
+ `OfflineLicensesChanged` and the `PackageCatalog` events come from a thread of
6589
+ their own, so they may never arrive
6590
+ `watchLicense` takes `pollMilliseconds` to read the licence on a UI-thread timer
6591
+ and raise the same event when it changed (as `winui-svelte/media` polls the
6592
+ player); `install`'s `onprogress` is an async progress callback and does arrive
6593
+ Treat `watchPackages` as a hint, not a guarantee
6594
+
6595
+ What was checked from `node.exe` with no package identity: `hasPackage()` is
6596
+ false, `getPackageInfo()` is null, and every other call answers
6597
+ `hasPackage: false` (`src/store/store.test.ts`; it installs and downloads
6598
+ nothing)
6599
+ What cannot work without an identity: the licence, the Store update check and
6600
+ install, the package events and startup tasks all, because Windows ties them to
6601
+ the package
6602
+ Under MSIX they are expected to work as documented, but nothing here has run
6603
+ under a real package yet
6604
+
6605
+ Replaces in the any-stt panel: with `getAppLicense`, `watchLicense`,
6606
+ `checkForUpdates`, `watchPackages` and `getStartupTask` running in the packaged
6607
+ `node.exe`, the Rust launcher no longer needs `licence.rs`, `updates.rs`,
6608
+ `store.rs` or its `--startup-task` mode
6609
+ Delete them once the calls are confirmed under the package
6610
+
3952
6611
  ## Reference: the remaining exports
3953
6612
 
3954
6613
  Exports that other sections do not need to name; each has JSDoc in its source
@@ -3967,7 +6626,7 @@ entry point is named nowhere in the docs
3967
6626
  | `releaseFragment`, `rootControl`, `watchRoot`, `unwatchRoot`, `swapControl` | `winui-svelte/host` | the renderer's mount-target plumbing: release what nodes hold, find the root, watch and unwatch it, replace a control in place |
3968
6627
  | `classNameOf` | `winui-svelte/host` | the class name (`ListView`) of a control, from the tag it was registered under, so it holds when a minifier renames classes |
3969
6628
  | `createCssNative`, `installCssRuntime`, `unregisterStyleSheet`, `textTransforms` | `winui-svelte/css` | the CSS runtime's WinUI boundary, its installer, removal of a stylesheet, and the text each element's `text-transform` shows (the renderer reads it) |
3970
- | `animationGroups`, `effectGroups`, `visualEffectGroups`, `clipGroups`, `cursorGroups`, `environmentGroups`, `gradientGroups`, `containerGroups`, `compatGroups`, `focusGroups`, `positionGroups`, `queryGroups`, `resourceGroups`, `surfaceGroups`, `transformGroups` | `winui-svelte/css/*` | the property groups each opt-in subpath adds |
6629
+ | `animationGroups`, `effectGroups`, `visualEffectGroups`, `clipGroups`, `cursorGroups`, `environmentGroups`, `gradientGroups`, `containerGroups`, `compatGroups`, `focusGroups`, `positionGroups`, `queryGroups`, `resourceGroups`, `scrollTimelineGroups`, `surfaceGroups`, `transformGroups`, `viewTransitionGroups`, `visualStateGroups` | `winui-svelte/css/*` | the property groups each opt-in subpath adds |
3971
6630
  | `SHEET_SUFFIX`, `SheetError` | `winui-svelte/css/sheet-module` | the module-name suffix of a compiled stylesheet; a stylesheet WinUI cannot say |
3972
6631
  | `translateComponent` | `winui-svelte/css/sheet-module` | the build's translation of a component's `<style>`, which the validator and the Vite plugin share |
3973
6632
  | `unusedSelectorMessages` | `winui-svelte/css/sheet-module` | the messages of Svelte's unused-selector warnings for a component read with its instances as elements, which `winuiWarningFilter` keeps |
@@ -4001,6 +6660,12 @@ event announces, such as an unreferenced timer) and uses next to no CPU
4001
6660
  The one thing nobody can ask libuv from outside is when its next timer fires:
4002
6661
  while Node itself holds a timer (a socket timeout) the pump wakes every 16 ms
4003
6662
  The timers an app makes go through the scheduler, which the dispatcher drives
6663
+ Measured idle cost, over 20 seconds after a minute of settling, on Windows 11
6664
+ (build 26300) with a 32-thread CPU and the Windows App SDK 2.2 build of this
6665
+ repository: `examples/hello` used 0.15 percent of one core and `examples/tray`
6666
+ (a tray icon and no window) used 0.23 percent, so nothing in the idle path needs
6667
+ fixing; the first seconds after start cost more (about 2 percent of a core) while
6668
+ the window loads
4004
6669
  A host that calls `process.exit` while the window runs would end the process
4005
6670
  under WinUI's thread (a delegate then finds the Node environment closing, and
4006
6671
  the process can end with 0xC000027B); `initWindowsAppSdk` therefore installs