@seelen-ui/lib 2.4.10 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (720) hide show
  1. package/esm/gen/types/AppNotification.d.ts +1 -1
  2. package/esm/gen/types/AppsConfigurationList.d.ts +3 -0
  3. package/esm/gen/types/AppsConfigurationList.d.ts.map +1 -0
  4. package/esm/gen/types/BluetoothDevice.d.ts +1 -1
  5. package/esm/gen/types/ContextMenu.d.ts +6 -0
  6. package/esm/gen/types/ContextMenu.d.ts.map +1 -0
  7. package/esm/gen/types/ContextMenuItem.d.ts +26 -0
  8. package/esm/gen/types/ContextMenuItem.d.ts.map +1 -0
  9. package/esm/gen/types/Core.d.ts +7 -0
  10. package/esm/gen/types/Core.d.ts.map +1 -0
  11. package/esm/gen/types/CssStyles.d.ts +1 -1
  12. package/esm/gen/types/CssStyles.d.ts.map +1 -1
  13. package/esm/gen/types/DesktopWorkspace.d.ts +2 -0
  14. package/esm/gen/types/DesktopWorkspace.d.ts.map +1 -1
  15. package/esm/gen/types/Disk.d.ts +11 -0
  16. package/esm/gen/types/Disk.d.ts.map +1 -0
  17. package/esm/gen/types/FolderChangedArgs.d.ts +1 -2
  18. package/esm/gen/types/FolderChangedArgs.d.ts.map +1 -1
  19. package/esm/gen/types/FolderType.d.ts +0 -1
  20. package/esm/gen/types/FolderType.d.ts.map +1 -1
  21. package/esm/gen/types/FolderType.js +0 -1
  22. package/esm/gen/types/Frame.d.ts +7 -0
  23. package/esm/gen/types/Frame.d.ts.map +1 -0
  24. package/esm/gen/types/ImeStatus.d.ts +5 -0
  25. package/esm/gen/types/ImeStatus.d.ts.map +1 -0
  26. package/esm/gen/types/KeyboardLayout.d.ts +1 -1
  27. package/esm/gen/types/MediaPlayerTimeline.d.ts +6 -6
  28. package/esm/gen/types/Memory.d.ts +7 -0
  29. package/esm/gen/types/Memory.d.ts.map +1 -0
  30. package/esm/gen/types/MonitorBrightness.d.ts +8 -0
  31. package/esm/gen/types/MonitorBrightness.d.ts.map +1 -0
  32. package/esm/gen/types/MonitorConfiguration.d.ts +13 -0
  33. package/esm/gen/types/MonitorConfiguration.d.ts.map +1 -1
  34. package/esm/gen/types/MultimonitorBehaviour.d.ts +5 -0
  35. package/esm/gen/types/MultimonitorBehaviour.d.ts.map +1 -0
  36. package/esm/gen/types/MultimonitorBehaviour.js +6 -0
  37. package/esm/gen/types/NetworkStatistics.d.ts +8 -0
  38. package/esm/gen/types/NetworkStatistics.d.ts.map +1 -0
  39. package/esm/gen/types/PhysicalMonitor.d.ts +1 -1
  40. package/esm/gen/types/PhysicalMonitor.d.ts.map +1 -1
  41. package/esm/gen/types/Point.d.ts +5 -0
  42. package/esm/gen/types/Point.d.ts.map +1 -0
  43. package/esm/gen/types/Rect.d.ts +6 -0
  44. package/esm/gen/types/Rect.d.ts.map +1 -1
  45. package/esm/gen/types/Resource.d.ts +3 -1
  46. package/esm/gen/types/Resource.d.ts.map +1 -1
  47. package/esm/gen/types/ResourceId.d.ts +2 -1
  48. package/esm/gen/types/ResourceId.d.ts.map +1 -1
  49. package/esm/gen/types/ResourceMetadata.d.ts +6 -1
  50. package/esm/gen/types/ResourceMetadata.d.ts.map +1 -1
  51. package/esm/gen/types/ResourceText.d.ts +1 -1
  52. package/esm/gen/types/ResourceText.d.ts.map +1 -1
  53. package/esm/gen/types/SeelenCommandActivateNotificationArgs.d.ts +1 -1
  54. package/esm/gen/types/SeelenCommandActivateNotificationArgs.d.ts.map +1 -1
  55. package/esm/gen/types/SeelenCommandArgument.d.ts +67 -31
  56. package/esm/gen/types/SeelenCommandArgument.d.ts.map +1 -1
  57. package/esm/gen/types/SeelenCommandCreateWorkspaceArgs.d.ts +5 -0
  58. package/esm/gen/types/SeelenCommandCreateWorkspaceArgs.d.ts.map +1 -0
  59. package/esm/gen/types/SeelenCommandDestroyWorkspaceArgs.d.ts +5 -0
  60. package/esm/gen/types/SeelenCommandDestroyWorkspaceArgs.d.ts.map +1 -0
  61. package/esm/gen/types/SeelenCommandGetKeyStateArgs.d.ts +4 -0
  62. package/esm/gen/types/SeelenCommandGetKeyStateArgs.d.ts.map +1 -0
  63. package/esm/gen/types/SeelenCommandReadFileArgs.d.ts +4 -0
  64. package/esm/gen/types/SeelenCommandReadFileArgs.d.ts.map +1 -0
  65. package/esm/gen/types/SeelenCommandRenameWorkspaceArgs.d.ts +6 -0
  66. package/esm/gen/types/SeelenCommandRenameWorkspaceArgs.d.ts.map +1 -0
  67. package/esm/gen/types/SeelenCommandReturn.d.ts +72 -35
  68. package/esm/gen/types/SeelenCommandReturn.d.ts.map +1 -1
  69. package/esm/gen/types/SeelenCommandRunArgs.d.ts +1 -0
  70. package/esm/gen/types/SeelenCommandRunArgs.d.ts.map +1 -1
  71. package/esm/gen/types/SeelenCommandSetAppWindowsPositionsArgs.d.ts +1 -1
  72. package/esm/gen/types/SeelenCommandSetAppWindowsPositionsArgs.d.ts.map +1 -1
  73. package/esm/gen/types/SeelenCommandSetMonitorBrightnessArgs.d.ts +5 -0
  74. package/esm/gen/types/SeelenCommandSetMonitorBrightnessArgs.d.ts.map +1 -0
  75. package/esm/gen/types/SeelenCommandSetMonitorBrightnessArgs.js +2 -0
  76. package/esm/gen/types/SeelenCommandSetSelfPositionArgs.d.ts +5 -0
  77. package/esm/gen/types/SeelenCommandSetSelfPositionArgs.d.ts.map +1 -0
  78. package/esm/gen/types/SeelenCommandStateWriteToolbarItemsArgs.d.ts +5 -0
  79. package/esm/gen/types/SeelenCommandStateWriteToolbarItemsArgs.d.ts.map +1 -0
  80. package/esm/gen/types/SeelenCommandSwitchWorkspaceArgs.d.ts +2 -3
  81. package/esm/gen/types/SeelenCommandSwitchWorkspaceArgs.d.ts.map +1 -1
  82. package/esm/gen/types/SeelenCommandTriggerContextMenuArgs.d.ts +6 -0
  83. package/esm/gen/types/SeelenCommandTriggerContextMenuArgs.d.ts.map +1 -0
  84. package/esm/gen/types/SeelenCommandWallpaperSaveThumbnailArgs.d.ts +6 -0
  85. package/esm/gen/types/SeelenCommandWallpaperSaveThumbnailArgs.d.ts.map +1 -0
  86. package/esm/gen/types/SeelenCommandWriteFileArgs.d.ts +5 -0
  87. package/esm/gen/types/SeelenCommandWriteFileArgs.d.ts.map +1 -0
  88. package/esm/gen/types/SeelenCommandWriteFileArgs.js +2 -0
  89. package/esm/gen/types/SeelenEventPayload.d.ts +28 -17
  90. package/esm/gen/types/SeelenEventPayload.d.ts.map +1 -1
  91. package/esm/gen/types/SeelenWallSettings.d.ts +13 -1
  92. package/esm/gen/types/SeelenWallSettings.d.ts.map +1 -1
  93. package/esm/gen/types/SeelenWegSettings.d.ts +0 -4
  94. package/esm/gen/types/SeelenWegSettings.d.ts.map +1 -1
  95. package/esm/gen/types/Settings.d.ts +14 -1
  96. package/esm/gen/types/Settings.d.ts.map +1 -1
  97. package/esm/gen/types/SettingsByWidget.d.ts +3 -5
  98. package/esm/gen/types/SettingsByWidget.d.ts.map +1 -1
  99. package/esm/gen/types/SluHotkeyAction.d.ts +1 -1
  100. package/esm/gen/types/SluHotkeyAction.d.ts.map +1 -1
  101. package/esm/gen/types/StartMenuItem.d.ts +4 -0
  102. package/esm/gen/types/StartMenuItem.d.ts.map +1 -1
  103. package/esm/gen/types/StartMenuLayout.d.ts +5 -0
  104. package/esm/gen/types/StartMenuLayout.d.ts.map +1 -0
  105. package/esm/gen/types/StartMenuLayoutItem.d.ts +10 -0
  106. package/esm/gen/types/StartMenuLayoutItem.d.ts.map +1 -0
  107. package/esm/gen/types/StartMenuLayoutItem.js +2 -0
  108. package/esm/gen/types/StartOfWeek.d.ts +6 -0
  109. package/esm/gen/types/StartOfWeek.d.ts.map +1 -0
  110. package/esm/gen/types/StartOfWeek.js +7 -0
  111. package/esm/gen/types/SystemLanguage.d.ts +4 -1
  112. package/esm/gen/types/SystemLanguage.d.ts.map +1 -1
  113. package/esm/gen/types/ThemeSettings.d.ts +1 -1
  114. package/esm/gen/types/ThemeSettings.d.ts.map +1 -1
  115. package/esm/gen/types/ThirdPartyWidgetSettings.d.ts +3 -3
  116. package/esm/gen/types/ThirdPartyWidgetSettings.d.ts.map +1 -1
  117. package/esm/gen/types/ToolbarItem.d.ts +40 -39
  118. package/esm/gen/types/ToolbarItem.d.ts.map +1 -1
  119. package/esm/gen/types/ToolbarJsScope.d.ts +17 -0
  120. package/esm/gen/types/ToolbarJsScope.d.ts.map +1 -0
  121. package/esm/gen/types/ToolbarJsScope.js +18 -0
  122. package/esm/gen/types/{Placeholder.d.ts → ToolbarState.d.ts} +2 -2
  123. package/esm/gen/types/ToolbarState.d.ts.map +1 -0
  124. package/esm/gen/types/UniqueIconPackEntry.d.ts +4 -0
  125. package/esm/gen/types/UniqueIconPackEntry.d.ts.map +1 -1
  126. package/esm/gen/types/User.d.ts +1 -0
  127. package/esm/gen/types/User.d.ts.map +1 -1
  128. package/esm/gen/types/UserAppWindowPreview.d.ts +7 -0
  129. package/esm/gen/types/UserAppWindowPreview.d.ts.map +1 -0
  130. package/esm/gen/types/UserAppWindowPreview.js +2 -0
  131. package/esm/gen/types/VirtualDesktopMonitor.d.ts +1 -3
  132. package/esm/gen/types/VirtualDesktopMonitor.d.ts.map +1 -1
  133. package/esm/gen/types/VirtualDesktops.d.ts +1 -1
  134. package/esm/gen/types/VirtualDesktops.d.ts.map +1 -1
  135. package/esm/gen/types/WallpaperCollection.d.ts +7 -0
  136. package/esm/gen/types/WallpaperCollection.d.ts.map +1 -0
  137. package/esm/gen/types/WegAppGroupItem.d.ts +1 -1
  138. package/esm/gen/types/WegItem.d.ts +3 -0
  139. package/esm/gen/types/WegItem.d.ts.map +1 -1
  140. package/esm/gen/types/WegItemType.d.ts +2 -1
  141. package/esm/gen/types/WegItemType.d.ts.map +1 -1
  142. package/esm/gen/types/WegItemType.js +1 -0
  143. package/esm/gen/types/WidgetConfigDefinition.d.ts +9 -0
  144. package/esm/gen/types/WidgetConfigDefinition.d.ts.map +1 -0
  145. package/esm/gen/types/WidgetConfigGroup.d.ts +20 -0
  146. package/esm/gen/types/WidgetConfigGroup.d.ts.map +1 -0
  147. package/esm/gen/types/WidgetLoader.d.ts +1 -0
  148. package/esm/gen/types/WidgetLoader.d.ts.map +1 -1
  149. package/esm/gen/types/WidgetLoader.js +1 -0
  150. package/esm/gen/types/WidgetSelectOption.d.ts +19 -0
  151. package/esm/gen/types/WidgetSelectOption.d.ts.map +1 -0
  152. package/esm/gen/types/WidgetSelectSubtype.d.ts +8 -0
  153. package/esm/gen/types/WidgetSelectSubtype.d.ts.map +1 -0
  154. package/esm/gen/types/WidgetSelectSubtype.js +9 -0
  155. package/esm/gen/types/WidgetSettingColor.d.ts +38 -0
  156. package/esm/gen/types/WidgetSettingColor.d.ts.map +1 -0
  157. package/esm/gen/types/WidgetSettingInputNumber.d.ts +46 -0
  158. package/esm/gen/types/WidgetSettingInputNumber.d.ts.map +1 -0
  159. package/esm/gen/types/WidgetSettingInputText.d.ts +46 -0
  160. package/esm/gen/types/WidgetSettingInputText.d.ts.map +1 -0
  161. package/esm/gen/types/WidgetSettingItem.d.ts +23 -0
  162. package/esm/gen/types/WidgetSettingItem.d.ts.map +1 -0
  163. package/esm/gen/types/WidgetSettingRange.d.ts +46 -0
  164. package/esm/gen/types/WidgetSettingRange.d.ts.map +1 -0
  165. package/esm/gen/types/WidgetSettingSelect.d.ts +44 -0
  166. package/esm/gen/types/WidgetSettingSelect.d.ts.map +1 -0
  167. package/esm/gen/types/WidgetSettingSwitch.d.ts +34 -0
  168. package/esm/gen/types/WidgetSettingSwitch.d.ts.map +1 -0
  169. package/esm/gen/types/WidgetSettingsDeclarationList.d.ts +7 -8
  170. package/esm/gen/types/WidgetSettingsDeclarationList.d.ts.map +1 -1
  171. package/esm/gen/types/WidgetStatus.d.ts +1 -1
  172. package/esm/gen/types/WidgetStatus.d.ts.map +1 -1
  173. package/esm/gen/types/WidgetStatus.js +1 -1
  174. package/esm/gen/types/WidgetTriggerPayload.d.ts +3 -2
  175. package/esm/gen/types/WidgetTriggerPayload.d.ts.map +1 -1
  176. package/esm/gen/types/WindowManagerSettings.d.ts +5 -0
  177. package/esm/gen/types/WindowManagerSettings.d.ts.map +1 -1
  178. package/esm/gen/types/WmAnimations.d.ts +1 -1
  179. package/esm/gen/types/WmDragBehavior.d.ts +5 -0
  180. package/esm/gen/types/WmDragBehavior.d.ts.map +1 -0
  181. package/esm/gen/types/WmDragBehavior.js +6 -0
  182. package/esm/gen/types/WmRenderTree.d.ts +6 -0
  183. package/esm/gen/types/WmRenderTree.d.ts.map +1 -0
  184. package/esm/gen/types/WorkspaceConfiguration.d.ts +8 -0
  185. package/esm/gen/types/WorkspaceConfiguration.d.ts.map +1 -0
  186. package/esm/gen/types/WorkspaceConfiguration.js +2 -0
  187. package/esm/gen/types/mod.d.ts +44 -41
  188. package/esm/gen/types/mod.d.ts.map +1 -1
  189. package/esm/gen/types/mod.js +44 -41
  190. package/esm/src/handlers/commands.d.ts +33 -18
  191. package/esm/src/handlers/commands.d.ts.map +1 -1
  192. package/esm/src/handlers/commands.js +32 -17
  193. package/esm/src/handlers/events.d.ts +12 -9
  194. package/esm/src/handlers/events.d.ts.map +1 -1
  195. package/esm/src/handlers/events.js +11 -8
  196. package/esm/src/lib.d.ts +1 -1
  197. package/esm/src/lib.d.ts.map +1 -1
  198. package/esm/src/state/icon_pack.d.ts.map +1 -1
  199. package/esm/src/state/mod.d.ts +0 -13
  200. package/esm/src/state/mod.d.ts.map +1 -1
  201. package/esm/src/state/mod.js +0 -19
  202. package/esm/src/state/plugin/mod.js +1 -1
  203. package/esm/src/state/settings/mod.d.ts +1 -8
  204. package/esm/src/state/settings/mod.d.ts.map +1 -1
  205. package/esm/src/state/settings/mod.js +1 -23
  206. package/esm/src/state/theme/mod.js +1 -1
  207. package/esm/src/state/widget/interfaces.d.ts +39 -0
  208. package/esm/src/state/widget/interfaces.d.ts.map +1 -0
  209. package/esm/src/state/widget/mod.d.ts +26 -49
  210. package/esm/src/state/widget/mod.d.ts.map +1 -1
  211. package/esm/src/state/widget/mod.js +179 -112
  212. package/esm/src/state/widget/positioning.d.ts +7 -11
  213. package/esm/src/state/widget/positioning.d.ts.map +1 -1
  214. package/esm/src/state/widget/positioning.js +42 -30
  215. package/esm/src/state/widget/sizing.d.ts +8 -6
  216. package/esm/src/state/widget/sizing.d.ts.map +1 -1
  217. package/esm/src/state/widget/sizing.js +46 -22
  218. package/esm/src/system_state/language.d.ts +1 -13
  219. package/esm/src/system_state/language.d.ts.map +1 -1
  220. package/esm/src/system_state/user.d.ts +1 -30
  221. package/esm/src/system_state/user.d.ts.map +1 -1
  222. package/esm/src/system_state/user.js +1 -48
  223. package/package.json +6 -6
  224. package/readme.md +1 -1
  225. package/script/gen/types/AppNotification.d.ts +1 -1
  226. package/script/gen/types/AppsConfigurationList.d.ts +3 -0
  227. package/script/gen/types/AppsConfigurationList.d.ts.map +1 -0
  228. package/script/gen/types/BluetoothDevice.d.ts +1 -1
  229. package/script/gen/types/ContextMenu.d.ts +6 -0
  230. package/script/gen/types/ContextMenu.d.ts.map +1 -0
  231. package/script/gen/types/ContextMenuItem.d.ts +26 -0
  232. package/script/gen/types/ContextMenuItem.d.ts.map +1 -0
  233. package/script/gen/types/Core.d.ts +7 -0
  234. package/script/gen/types/Core.d.ts.map +1 -0
  235. package/script/gen/types/CssStyles.d.ts +1 -1
  236. package/script/gen/types/CssStyles.d.ts.map +1 -1
  237. package/script/gen/types/DesktopWorkspace.d.ts +2 -0
  238. package/script/gen/types/DesktopWorkspace.d.ts.map +1 -1
  239. package/script/gen/types/Disk.d.ts +11 -0
  240. package/script/gen/types/Disk.d.ts.map +1 -0
  241. package/script/gen/types/FolderChangedArgs.d.ts +1 -2
  242. package/script/gen/types/FolderChangedArgs.d.ts.map +1 -1
  243. package/script/gen/types/FolderType.d.ts +0 -1
  244. package/script/gen/types/FolderType.d.ts.map +1 -1
  245. package/script/gen/types/FolderType.js +0 -1
  246. package/script/gen/types/Frame.d.ts +7 -0
  247. package/script/gen/types/Frame.d.ts.map +1 -0
  248. package/script/gen/types/ImeStatus.d.ts +5 -0
  249. package/script/gen/types/ImeStatus.d.ts.map +1 -0
  250. package/script/gen/types/KeyboardLayout.d.ts +1 -1
  251. package/script/gen/types/MediaPlayerTimeline.d.ts +6 -6
  252. package/script/gen/types/Memory.d.ts +7 -0
  253. package/script/gen/types/Memory.d.ts.map +1 -0
  254. package/script/gen/types/MonitorBrightness.d.ts +8 -0
  255. package/script/gen/types/MonitorBrightness.d.ts.map +1 -0
  256. package/script/gen/types/MonitorConfiguration.d.ts +13 -0
  257. package/script/gen/types/MonitorConfiguration.d.ts.map +1 -1
  258. package/script/gen/types/MultimonitorBehaviour.d.ts +5 -0
  259. package/script/gen/types/MultimonitorBehaviour.d.ts.map +1 -0
  260. package/script/gen/types/MultimonitorBehaviour.js +9 -0
  261. package/script/gen/types/NetworkStatistics.d.ts +8 -0
  262. package/script/gen/types/NetworkStatistics.d.ts.map +1 -0
  263. package/script/gen/types/PhysicalMonitor.d.ts +1 -1
  264. package/script/gen/types/PhysicalMonitor.d.ts.map +1 -1
  265. package/script/gen/types/Point.d.ts +5 -0
  266. package/script/gen/types/Point.d.ts.map +1 -0
  267. package/script/gen/types/Rect.d.ts +6 -0
  268. package/script/gen/types/Rect.d.ts.map +1 -1
  269. package/script/gen/types/Resource.d.ts +3 -1
  270. package/script/gen/types/Resource.d.ts.map +1 -1
  271. package/script/gen/types/ResourceId.d.ts +2 -1
  272. package/script/gen/types/ResourceId.d.ts.map +1 -1
  273. package/script/gen/types/ResourceMetadata.d.ts +6 -1
  274. package/script/gen/types/ResourceMetadata.d.ts.map +1 -1
  275. package/script/gen/types/ResourceText.d.ts +1 -1
  276. package/script/gen/types/ResourceText.d.ts.map +1 -1
  277. package/script/gen/types/SeelenCommandActivateNotificationArgs.d.ts +1 -1
  278. package/script/gen/types/SeelenCommandActivateNotificationArgs.d.ts.map +1 -1
  279. package/script/gen/types/SeelenCommandArgument.d.ts +67 -31
  280. package/script/gen/types/SeelenCommandArgument.d.ts.map +1 -1
  281. package/script/gen/types/SeelenCommandCreateWorkspaceArgs.d.ts +5 -0
  282. package/script/gen/types/SeelenCommandCreateWorkspaceArgs.d.ts.map +1 -0
  283. package/script/gen/types/SeelenCommandDestroyWorkspaceArgs.d.ts +5 -0
  284. package/script/gen/types/SeelenCommandDestroyWorkspaceArgs.d.ts.map +1 -0
  285. package/script/gen/types/SeelenCommandGetKeyStateArgs.d.ts +4 -0
  286. package/script/gen/types/SeelenCommandGetKeyStateArgs.d.ts.map +1 -0
  287. package/script/gen/types/SeelenCommandReadFileArgs.d.ts +4 -0
  288. package/script/gen/types/SeelenCommandReadFileArgs.d.ts.map +1 -0
  289. package/script/gen/types/SeelenCommandRenameWorkspaceArgs.d.ts +6 -0
  290. package/script/gen/types/SeelenCommandRenameWorkspaceArgs.d.ts.map +1 -0
  291. package/script/gen/types/SeelenCommandReturn.d.ts +72 -35
  292. package/script/gen/types/SeelenCommandReturn.d.ts.map +1 -1
  293. package/script/gen/types/SeelenCommandRunArgs.d.ts +1 -0
  294. package/script/gen/types/SeelenCommandRunArgs.d.ts.map +1 -1
  295. package/script/gen/types/SeelenCommandSetAppWindowsPositionsArgs.d.ts +1 -1
  296. package/script/gen/types/SeelenCommandSetAppWindowsPositionsArgs.d.ts.map +1 -1
  297. package/script/gen/types/SeelenCommandSetMonitorBrightnessArgs.d.ts +5 -0
  298. package/script/gen/types/SeelenCommandSetMonitorBrightnessArgs.d.ts.map +1 -0
  299. package/script/gen/types/SeelenCommandSetMonitorBrightnessArgs.js +3 -0
  300. package/script/gen/types/SeelenCommandSetSelfPositionArgs.d.ts +5 -0
  301. package/script/gen/types/SeelenCommandSetSelfPositionArgs.d.ts.map +1 -0
  302. package/script/gen/types/SeelenCommandStateWriteToolbarItemsArgs.d.ts +5 -0
  303. package/script/gen/types/SeelenCommandStateWriteToolbarItemsArgs.d.ts.map +1 -0
  304. package/script/gen/types/SeelenCommandSwitchWorkspaceArgs.d.ts +2 -3
  305. package/script/gen/types/SeelenCommandSwitchWorkspaceArgs.d.ts.map +1 -1
  306. package/script/gen/types/SeelenCommandTriggerContextMenuArgs.d.ts +6 -0
  307. package/script/gen/types/SeelenCommandTriggerContextMenuArgs.d.ts.map +1 -0
  308. package/script/gen/types/SeelenCommandWallpaperSaveThumbnailArgs.d.ts +6 -0
  309. package/script/gen/types/SeelenCommandWallpaperSaveThumbnailArgs.d.ts.map +1 -0
  310. package/script/gen/types/SeelenCommandWriteFileArgs.d.ts +5 -0
  311. package/script/gen/types/SeelenCommandWriteFileArgs.d.ts.map +1 -0
  312. package/script/gen/types/SeelenCommandWriteFileArgs.js +3 -0
  313. package/script/gen/types/SeelenEventPayload.d.ts +28 -17
  314. package/script/gen/types/SeelenEventPayload.d.ts.map +1 -1
  315. package/script/gen/types/SeelenWallSettings.d.ts +13 -1
  316. package/script/gen/types/SeelenWallSettings.d.ts.map +1 -1
  317. package/script/gen/types/SeelenWegSettings.d.ts +0 -4
  318. package/script/gen/types/SeelenWegSettings.d.ts.map +1 -1
  319. package/script/gen/types/Settings.d.ts +14 -1
  320. package/script/gen/types/Settings.d.ts.map +1 -1
  321. package/script/gen/types/SettingsByWidget.d.ts +3 -5
  322. package/script/gen/types/SettingsByWidget.d.ts.map +1 -1
  323. package/script/gen/types/SluHotkeyAction.d.ts +1 -1
  324. package/script/gen/types/SluHotkeyAction.d.ts.map +1 -1
  325. package/script/gen/types/StartMenuItem.d.ts +4 -0
  326. package/script/gen/types/StartMenuItem.d.ts.map +1 -1
  327. package/script/gen/types/StartMenuLayout.d.ts +5 -0
  328. package/script/gen/types/StartMenuLayout.d.ts.map +1 -0
  329. package/script/gen/types/StartMenuLayoutItem.d.ts +10 -0
  330. package/script/gen/types/StartMenuLayoutItem.d.ts.map +1 -0
  331. package/script/gen/types/StartMenuLayoutItem.js +3 -0
  332. package/script/gen/types/StartOfWeek.d.ts +6 -0
  333. package/script/gen/types/StartOfWeek.d.ts.map +1 -0
  334. package/script/gen/types/StartOfWeek.js +10 -0
  335. package/script/gen/types/SystemLanguage.d.ts +4 -1
  336. package/script/gen/types/SystemLanguage.d.ts.map +1 -1
  337. package/script/gen/types/ThemeSettings.d.ts +1 -1
  338. package/script/gen/types/ThemeSettings.d.ts.map +1 -1
  339. package/script/gen/types/ThirdPartyWidgetSettings.d.ts +3 -3
  340. package/script/gen/types/ThirdPartyWidgetSettings.d.ts.map +1 -1
  341. package/script/gen/types/ToolbarItem.d.ts +40 -39
  342. package/script/gen/types/ToolbarItem.d.ts.map +1 -1
  343. package/script/gen/types/ToolbarJsScope.d.ts +17 -0
  344. package/script/gen/types/ToolbarJsScope.d.ts.map +1 -0
  345. package/script/gen/types/ToolbarJsScope.js +21 -0
  346. package/script/gen/types/{Placeholder.d.ts → ToolbarState.d.ts} +2 -2
  347. package/script/gen/types/ToolbarState.d.ts.map +1 -0
  348. package/script/gen/types/UniqueIconPackEntry.d.ts +4 -0
  349. package/script/gen/types/UniqueIconPackEntry.d.ts.map +1 -1
  350. package/script/gen/types/User.d.ts +1 -0
  351. package/script/gen/types/User.d.ts.map +1 -1
  352. package/script/gen/types/UserAppWindowPreview.d.ts +7 -0
  353. package/script/gen/types/UserAppWindowPreview.d.ts.map +1 -0
  354. package/script/gen/types/UserAppWindowPreview.js +3 -0
  355. package/script/gen/types/VirtualDesktopMonitor.d.ts +1 -3
  356. package/script/gen/types/VirtualDesktopMonitor.d.ts.map +1 -1
  357. package/script/gen/types/VirtualDesktops.d.ts +1 -1
  358. package/script/gen/types/VirtualDesktops.d.ts.map +1 -1
  359. package/script/gen/types/WallpaperCollection.d.ts +7 -0
  360. package/script/gen/types/WallpaperCollection.d.ts.map +1 -0
  361. package/script/gen/types/WegAppGroupItem.d.ts +1 -1
  362. package/script/gen/types/WegItem.d.ts +3 -0
  363. package/script/gen/types/WegItem.d.ts.map +1 -1
  364. package/script/gen/types/WegItemType.d.ts +2 -1
  365. package/script/gen/types/WegItemType.d.ts.map +1 -1
  366. package/script/gen/types/WegItemType.js +1 -0
  367. package/script/gen/types/WidgetConfigDefinition.d.ts +9 -0
  368. package/script/gen/types/WidgetConfigDefinition.d.ts.map +1 -0
  369. package/script/gen/types/WidgetConfigGroup.d.ts +20 -0
  370. package/script/gen/types/WidgetConfigGroup.d.ts.map +1 -0
  371. package/script/gen/types/WidgetLoader.d.ts +1 -0
  372. package/script/gen/types/WidgetLoader.d.ts.map +1 -1
  373. package/script/gen/types/WidgetLoader.js +1 -0
  374. package/script/gen/types/WidgetSelectOption.d.ts +19 -0
  375. package/script/gen/types/WidgetSelectOption.d.ts.map +1 -0
  376. package/script/gen/types/WidgetSelectSubtype.d.ts +8 -0
  377. package/script/gen/types/WidgetSelectSubtype.d.ts.map +1 -0
  378. package/script/gen/types/WidgetSelectSubtype.js +12 -0
  379. package/script/gen/types/WidgetSettingColor.d.ts +38 -0
  380. package/script/gen/types/WidgetSettingColor.d.ts.map +1 -0
  381. package/script/gen/types/WidgetSettingInputNumber.d.ts +46 -0
  382. package/script/gen/types/WidgetSettingInputNumber.d.ts.map +1 -0
  383. package/script/gen/types/WidgetSettingInputText.d.ts +46 -0
  384. package/script/gen/types/WidgetSettingInputText.d.ts.map +1 -0
  385. package/script/gen/types/WidgetSettingItem.d.ts +23 -0
  386. package/script/gen/types/WidgetSettingItem.d.ts.map +1 -0
  387. package/script/gen/types/WidgetSettingRange.d.ts +46 -0
  388. package/script/gen/types/WidgetSettingRange.d.ts.map +1 -0
  389. package/script/gen/types/WidgetSettingSelect.d.ts +44 -0
  390. package/script/gen/types/WidgetSettingSelect.d.ts.map +1 -0
  391. package/script/gen/types/WidgetSettingSwitch.d.ts +34 -0
  392. package/script/gen/types/WidgetSettingSwitch.d.ts.map +1 -0
  393. package/script/gen/types/WidgetSettingsDeclarationList.d.ts +7 -8
  394. package/script/gen/types/WidgetSettingsDeclarationList.d.ts.map +1 -1
  395. package/script/gen/types/WidgetStatus.d.ts +1 -1
  396. package/script/gen/types/WidgetStatus.d.ts.map +1 -1
  397. package/script/gen/types/WidgetStatus.js +1 -1
  398. package/script/gen/types/WidgetTriggerPayload.d.ts +3 -2
  399. package/script/gen/types/WidgetTriggerPayload.d.ts.map +1 -1
  400. package/script/gen/types/WindowManagerSettings.d.ts +5 -0
  401. package/script/gen/types/WindowManagerSettings.d.ts.map +1 -1
  402. package/script/gen/types/WmAnimations.d.ts +1 -1
  403. package/script/gen/types/WmDragBehavior.d.ts +5 -0
  404. package/script/gen/types/WmDragBehavior.d.ts.map +1 -0
  405. package/script/gen/types/WmDragBehavior.js +9 -0
  406. package/script/gen/types/WmRenderTree.d.ts +6 -0
  407. package/script/gen/types/WmRenderTree.d.ts.map +1 -0
  408. package/script/gen/types/WorkspaceConfiguration.d.ts +8 -0
  409. package/script/gen/types/WorkspaceConfiguration.d.ts.map +1 -0
  410. package/script/gen/types/WorkspaceConfiguration.js +3 -0
  411. package/script/gen/types/mod.d.ts +44 -41
  412. package/script/gen/types/mod.d.ts.map +1 -1
  413. package/script/gen/types/mod.js +44 -41
  414. package/script/src/handlers/commands.d.ts +33 -18
  415. package/script/src/handlers/commands.d.ts.map +1 -1
  416. package/script/src/handlers/commands.js +32 -17
  417. package/script/src/handlers/events.d.ts +12 -9
  418. package/script/src/handlers/events.d.ts.map +1 -1
  419. package/script/src/handlers/events.js +11 -8
  420. package/script/src/lib.d.ts +1 -1
  421. package/script/src/lib.d.ts.map +1 -1
  422. package/script/src/state/icon_pack.d.ts.map +1 -1
  423. package/script/src/state/mod.d.ts +0 -13
  424. package/script/src/state/mod.d.ts.map +1 -1
  425. package/script/src/state/mod.js +0 -21
  426. package/script/src/state/plugin/mod.js +1 -1
  427. package/script/src/state/settings/mod.d.ts +1 -8
  428. package/script/src/state/settings/mod.d.ts.map +1 -1
  429. package/script/src/state/settings/mod.js +0 -36
  430. package/script/src/state/theme/mod.js +1 -1
  431. package/script/src/state/widget/interfaces.d.ts +39 -0
  432. package/script/src/state/widget/interfaces.d.ts.map +1 -0
  433. package/script/src/state/widget/mod.d.ts +26 -49
  434. package/script/src/state/widget/mod.d.ts.map +1 -1
  435. package/script/src/state/widget/mod.js +179 -113
  436. package/script/src/state/widget/positioning.d.ts +7 -11
  437. package/script/src/state/widget/positioning.d.ts.map +1 -1
  438. package/script/src/state/widget/positioning.js +45 -31
  439. package/script/src/state/widget/sizing.d.ts +8 -6
  440. package/script/src/state/widget/sizing.d.ts.map +1 -1
  441. package/script/src/state/widget/sizing.js +45 -21
  442. package/script/src/system_state/language.d.ts +1 -13
  443. package/script/src/system_state/language.d.ts.map +1 -1
  444. package/script/src/system_state/user.d.ts +1 -30
  445. package/script/src/system_state/user.d.ts.map +1 -1
  446. package/script/src/system_state/user.js +1 -56
  447. package/esm/gen/types/BluetoothToolbarItem.d.ts +0 -193
  448. package/esm/gen/types/BluetoothToolbarItem.d.ts.map +0 -1
  449. package/esm/gen/types/Brightness.d.ts +0 -6
  450. package/esm/gen/types/Brightness.d.ts.map +0 -1
  451. package/esm/gen/types/DateToolbarItem.d.ts +0 -69
  452. package/esm/gen/types/DateToolbarItem.d.ts.map +0 -1
  453. package/esm/gen/types/DeviceToolbarItem.d.ts +0 -61
  454. package/esm/gen/types/DeviceToolbarItem.d.ts.map +0 -1
  455. package/esm/gen/types/File.d.ts +0 -5
  456. package/esm/gen/types/File.d.ts.map +0 -1
  457. package/esm/gen/types/GenericToolbarItem.d.ts +0 -89
  458. package/esm/gen/types/GenericToolbarItem.d.ts.map +0 -1
  459. package/esm/gen/types/KeyboardToolbarItem.d.ts +0 -145
  460. package/esm/gen/types/KeyboardToolbarItem.d.ts.map +0 -1
  461. package/esm/gen/types/LauncherHistory.d.ts +0 -4
  462. package/esm/gen/types/LauncherHistory.d.ts.map +0 -1
  463. package/esm/gen/types/MediaToolbarItem.d.ts +0 -145
  464. package/esm/gen/types/MediaToolbarItem.d.ts.map +0 -1
  465. package/esm/gen/types/NetworkToolbarItem.d.ts +0 -125
  466. package/esm/gen/types/NetworkToolbarItem.d.ts.map +0 -1
  467. package/esm/gen/types/NotificationsToolbarItem.d.ts +0 -69
  468. package/esm/gen/types/NotificationsToolbarItem.d.ts.map +0 -1
  469. package/esm/gen/types/Placeholder.d.ts.map +0 -1
  470. package/esm/gen/types/PowerToolbarItem.d.ts +0 -265
  471. package/esm/gen/types/PowerToolbarItem.d.ts.map +0 -1
  472. package/esm/gen/types/Profile.d.ts +0 -8
  473. package/esm/gen/types/Profile.d.ts.map +0 -1
  474. package/esm/gen/types/ProfileSettings.d.ts +0 -4
  475. package/esm/gen/types/ProfileSettings.d.ts.map +0 -1
  476. package/esm/gen/types/SeelenCommandRunAsAdminArgs.d.ts +0 -6
  477. package/esm/gen/types/SeelenCommandRunAsAdminArgs.d.ts.map +0 -1
  478. package/esm/gen/types/SeelenCommandSendKeysArgs.d.ts +0 -4
  479. package/esm/gen/types/SeelenCommandSendKeysArgs.d.ts.map +0 -1
  480. package/esm/gen/types/SeelenCommandSetMainMonitorBrightnessArgs.d.ts +0 -4
  481. package/esm/gen/types/SeelenCommandSetMainMonitorBrightnessArgs.d.ts.map +0 -1
  482. package/esm/gen/types/SeelenCommandSetUserFolderLimitArgs.d.ts +0 -6
  483. package/esm/gen/types/SeelenCommandSetUserFolderLimitArgs.d.ts.map +0 -1
  484. package/esm/gen/types/SeelenCommandWegRequestUpdatePreviewsArgs.d.ts +0 -4
  485. package/esm/gen/types/SeelenCommandWegRequestUpdatePreviewsArgs.d.ts.map +0 -1
  486. package/esm/gen/types/SeelenLauncherMonitor.d.ts +0 -5
  487. package/esm/gen/types/SeelenLauncherMonitor.d.ts.map +0 -1
  488. package/esm/gen/types/SeelenLauncherMonitor.js +0 -6
  489. package/esm/gen/types/SeelenLauncherRunner.d.ts +0 -7
  490. package/esm/gen/types/SeelenLauncherRunner.d.ts.map +0 -1
  491. package/esm/gen/types/SeelenLauncherSettings.d.ts +0 -8
  492. package/esm/gen/types/SeelenLauncherSettings.d.ts.map +0 -1
  493. package/esm/gen/types/SettingsToolbarItem.d.ts +0 -61
  494. package/esm/gen/types/SettingsToolbarItem.d.ts.map +0 -1
  495. package/esm/gen/types/TextToolbarItem.d.ts +0 -121
  496. package/esm/gen/types/TextToolbarItem.d.ts.map +0 -1
  497. package/esm/gen/types/ToolbarModuleType.d.ts +0 -16
  498. package/esm/gen/types/ToolbarModuleType.d.ts.map +0 -1
  499. package/esm/gen/types/ToolbarModuleType.js +0 -17
  500. package/esm/gen/types/UserApplication.d.ts +0 -7
  501. package/esm/gen/types/UserApplication.d.ts.map +0 -1
  502. package/esm/gen/types/UserToolbarItem.d.ts +0 -73
  503. package/esm/gen/types/UserToolbarItem.d.ts.map +0 -1
  504. package/esm/gen/types/WorkspaceToolbarItem.d.ts +0 -63
  505. package/esm/gen/types/WorkspaceToolbarItem.d.ts.map +0 -1
  506. package/esm/gen/types/WorkspaceToolbarItemMode.d.ts +0 -6
  507. package/esm/gen/types/WorkspaceToolbarItemMode.d.ts.map +0 -1
  508. package/esm/gen/types/WorkspaceToolbarItemMode.js +0 -7
  509. package/esm/gen/types/WsdGroup.d.ts +0 -8
  510. package/esm/gen/types/WsdGroup.d.ts.map +0 -1
  511. package/esm/gen/types/WsdGroupEntry.d.ts +0 -13
  512. package/esm/gen/types/WsdGroupEntry.d.ts.map +0 -1
  513. package/esm/gen/types/WsdItem.d.ts +0 -20
  514. package/esm/gen/types/WsdItem.d.ts.map +0 -1
  515. package/esm/gen/types/WsdItemColor.d.ts +0 -25
  516. package/esm/gen/types/WsdItemColor.d.ts.map +0 -1
  517. package/esm/gen/types/WsdItemInputNumber.d.ts +0 -26
  518. package/esm/gen/types/WsdItemInputNumber.d.ts.map +0 -1
  519. package/esm/gen/types/WsdItemInputText.d.ts +0 -24
  520. package/esm/gen/types/WsdItemInputText.d.ts.map +0 -1
  521. package/esm/gen/types/WsdItemRange.d.ts +0 -27
  522. package/esm/gen/types/WsdItemRange.d.ts.map +0 -1
  523. package/esm/gen/types/WsdItemSelect.d.ts +0 -28
  524. package/esm/gen/types/WsdItemSelect.d.ts.map +0 -1
  525. package/esm/gen/types/WsdItemSelect.js +0 -1
  526. package/esm/gen/types/WsdItemSelectOption.d.ts +0 -16
  527. package/esm/gen/types/WsdItemSelectOption.d.ts.map +0 -1
  528. package/esm/gen/types/WsdItemSelectOption.js +0 -1
  529. package/esm/gen/types/WsdItemSelectSubtype.d.ts +0 -2
  530. package/esm/gen/types/WsdItemSelectSubtype.d.ts.map +0 -1
  531. package/esm/gen/types/WsdItemSwitch.d.ts +0 -24
  532. package/esm/gen/types/WsdItemSwitch.d.ts.map +0 -1
  533. package/esm/gen/types/WsdItemSwitch.js +0 -1
  534. package/esm/src/state/placeholder.d.ts +0 -2
  535. package/esm/src/state/placeholder.d.ts.map +0 -1
  536. package/esm/src/state/placeholder.js +0 -1
  537. package/esm/src/state/profile.d.ts +0 -6
  538. package/esm/src/state/profile.d.ts.map +0 -1
  539. package/esm/src/state/profile.js +0 -8
  540. package/esm/src/state/settings/settings_by_monitor.d.ts +0 -7
  541. package/esm/src/state/settings/settings_by_monitor.d.ts.map +0 -1
  542. package/esm/src/state/settings/settings_by_monitor.js +0 -11
  543. package/esm/src/state/settings_by_app.d.ts +0 -8
  544. package/esm/src/state/settings_by_app.d.ts.map +0 -1
  545. package/esm/src/state/settings_by_app.js +0 -12
  546. package/esm/src/state/startup.d.ts +0 -5
  547. package/esm/src/state/startup.d.ts.map +0 -1
  548. package/esm/src/state/startup.js +0 -9
  549. package/script/gen/types/BluetoothToolbarItem.d.ts +0 -193
  550. package/script/gen/types/BluetoothToolbarItem.d.ts.map +0 -1
  551. package/script/gen/types/Brightness.d.ts +0 -6
  552. package/script/gen/types/Brightness.d.ts.map +0 -1
  553. package/script/gen/types/DateToolbarItem.d.ts +0 -69
  554. package/script/gen/types/DateToolbarItem.d.ts.map +0 -1
  555. package/script/gen/types/DeviceToolbarItem.d.ts +0 -61
  556. package/script/gen/types/DeviceToolbarItem.d.ts.map +0 -1
  557. package/script/gen/types/File.d.ts +0 -5
  558. package/script/gen/types/File.d.ts.map +0 -1
  559. package/script/gen/types/GenericToolbarItem.d.ts +0 -89
  560. package/script/gen/types/GenericToolbarItem.d.ts.map +0 -1
  561. package/script/gen/types/KeyboardToolbarItem.d.ts +0 -145
  562. package/script/gen/types/KeyboardToolbarItem.d.ts.map +0 -1
  563. package/script/gen/types/LauncherHistory.d.ts +0 -4
  564. package/script/gen/types/LauncherHistory.d.ts.map +0 -1
  565. package/script/gen/types/MediaToolbarItem.d.ts +0 -145
  566. package/script/gen/types/MediaToolbarItem.d.ts.map +0 -1
  567. package/script/gen/types/NetworkToolbarItem.d.ts +0 -125
  568. package/script/gen/types/NetworkToolbarItem.d.ts.map +0 -1
  569. package/script/gen/types/NotificationsToolbarItem.d.ts +0 -69
  570. package/script/gen/types/NotificationsToolbarItem.d.ts.map +0 -1
  571. package/script/gen/types/Placeholder.d.ts.map +0 -1
  572. package/script/gen/types/PowerToolbarItem.d.ts +0 -265
  573. package/script/gen/types/PowerToolbarItem.d.ts.map +0 -1
  574. package/script/gen/types/Profile.d.ts +0 -8
  575. package/script/gen/types/Profile.d.ts.map +0 -1
  576. package/script/gen/types/ProfileSettings.d.ts +0 -4
  577. package/script/gen/types/ProfileSettings.d.ts.map +0 -1
  578. package/script/gen/types/SeelenCommandRunAsAdminArgs.d.ts +0 -6
  579. package/script/gen/types/SeelenCommandRunAsAdminArgs.d.ts.map +0 -1
  580. package/script/gen/types/SeelenCommandSendKeysArgs.d.ts +0 -4
  581. package/script/gen/types/SeelenCommandSendKeysArgs.d.ts.map +0 -1
  582. package/script/gen/types/SeelenCommandSetMainMonitorBrightnessArgs.d.ts +0 -4
  583. package/script/gen/types/SeelenCommandSetMainMonitorBrightnessArgs.d.ts.map +0 -1
  584. package/script/gen/types/SeelenCommandSetUserFolderLimitArgs.d.ts +0 -6
  585. package/script/gen/types/SeelenCommandSetUserFolderLimitArgs.d.ts.map +0 -1
  586. package/script/gen/types/SeelenCommandWegRequestUpdatePreviewsArgs.d.ts +0 -4
  587. package/script/gen/types/SeelenCommandWegRequestUpdatePreviewsArgs.d.ts.map +0 -1
  588. package/script/gen/types/SeelenLauncherMonitor.d.ts +0 -5
  589. package/script/gen/types/SeelenLauncherMonitor.d.ts.map +0 -1
  590. package/script/gen/types/SeelenLauncherMonitor.js +0 -9
  591. package/script/gen/types/SeelenLauncherRunner.d.ts +0 -7
  592. package/script/gen/types/SeelenLauncherRunner.d.ts.map +0 -1
  593. package/script/gen/types/SeelenLauncherSettings.d.ts +0 -8
  594. package/script/gen/types/SeelenLauncherSettings.d.ts.map +0 -1
  595. package/script/gen/types/SettingsToolbarItem.d.ts +0 -61
  596. package/script/gen/types/SettingsToolbarItem.d.ts.map +0 -1
  597. package/script/gen/types/TextToolbarItem.d.ts +0 -121
  598. package/script/gen/types/TextToolbarItem.d.ts.map +0 -1
  599. package/script/gen/types/ToolbarModuleType.d.ts +0 -16
  600. package/script/gen/types/ToolbarModuleType.d.ts.map +0 -1
  601. package/script/gen/types/ToolbarModuleType.js +0 -20
  602. package/script/gen/types/UserApplication.d.ts +0 -7
  603. package/script/gen/types/UserApplication.d.ts.map +0 -1
  604. package/script/gen/types/UserToolbarItem.d.ts +0 -73
  605. package/script/gen/types/UserToolbarItem.d.ts.map +0 -1
  606. package/script/gen/types/WorkspaceToolbarItem.d.ts +0 -63
  607. package/script/gen/types/WorkspaceToolbarItem.d.ts.map +0 -1
  608. package/script/gen/types/WorkspaceToolbarItemMode.d.ts +0 -6
  609. package/script/gen/types/WorkspaceToolbarItemMode.d.ts.map +0 -1
  610. package/script/gen/types/WorkspaceToolbarItemMode.js +0 -10
  611. package/script/gen/types/WsdGroup.d.ts +0 -8
  612. package/script/gen/types/WsdGroup.d.ts.map +0 -1
  613. package/script/gen/types/WsdGroupEntry.d.ts +0 -13
  614. package/script/gen/types/WsdGroupEntry.d.ts.map +0 -1
  615. package/script/gen/types/WsdItem.d.ts +0 -20
  616. package/script/gen/types/WsdItem.d.ts.map +0 -1
  617. package/script/gen/types/WsdItemColor.d.ts +0 -25
  618. package/script/gen/types/WsdItemColor.d.ts.map +0 -1
  619. package/script/gen/types/WsdItemInputNumber.d.ts +0 -26
  620. package/script/gen/types/WsdItemInputNumber.d.ts.map +0 -1
  621. package/script/gen/types/WsdItemInputText.d.ts +0 -24
  622. package/script/gen/types/WsdItemInputText.d.ts.map +0 -1
  623. package/script/gen/types/WsdItemRange.d.ts +0 -27
  624. package/script/gen/types/WsdItemRange.d.ts.map +0 -1
  625. package/script/gen/types/WsdItemSelect.d.ts +0 -28
  626. package/script/gen/types/WsdItemSelect.d.ts.map +0 -1
  627. package/script/gen/types/WsdItemSelect.js +0 -2
  628. package/script/gen/types/WsdItemSelectOption.d.ts +0 -16
  629. package/script/gen/types/WsdItemSelectOption.d.ts.map +0 -1
  630. package/script/gen/types/WsdItemSelectOption.js +0 -2
  631. package/script/gen/types/WsdItemSelectSubtype.d.ts +0 -2
  632. package/script/gen/types/WsdItemSelectSubtype.d.ts.map +0 -1
  633. package/script/gen/types/WsdItemSwitch.d.ts +0 -24
  634. package/script/gen/types/WsdItemSwitch.d.ts.map +0 -1
  635. package/script/gen/types/WsdItemSwitch.js +0 -2
  636. package/script/src/state/placeholder.d.ts +0 -2
  637. package/script/src/state/placeholder.d.ts.map +0 -1
  638. package/script/src/state/placeholder.js +0 -2
  639. package/script/src/state/profile.d.ts +0 -6
  640. package/script/src/state/profile.d.ts.map +0 -1
  641. package/script/src/state/profile.js +0 -12
  642. package/script/src/state/settings/settings_by_monitor.d.ts +0 -7
  643. package/script/src/state/settings/settings_by_monitor.d.ts.map +0 -1
  644. package/script/src/state/settings/settings_by_monitor.js +0 -15
  645. package/script/src/state/settings_by_app.d.ts +0 -8
  646. package/script/src/state/settings_by_app.d.ts.map +0 -1
  647. package/script/src/state/settings_by_app.js +0 -16
  648. package/script/src/state/startup.d.ts +0 -5
  649. package/script/src/state/startup.d.ts.map +0 -1
  650. package/script/src/state/startup.js +0 -13
  651. /package/esm/gen/types/{BluetoothToolbarItem.js → AppsConfigurationList.js} +0 -0
  652. /package/esm/gen/types/{DateToolbarItem.js → ContextMenu.js} +0 -0
  653. /package/esm/gen/types/{DeviceToolbarItem.js → ContextMenuItem.js} +0 -0
  654. /package/esm/gen/types/{Brightness.js → Core.js} +0 -0
  655. /package/esm/gen/types/{File.js → Disk.js} +0 -0
  656. /package/esm/gen/types/{LauncherHistory.js → Frame.js} +0 -0
  657. /package/esm/gen/types/{ProfileSettings.js → ImeStatus.js} +0 -0
  658. /package/esm/gen/types/{SeelenCommandSendKeysArgs.js → Memory.js} +0 -0
  659. /package/esm/gen/types/{SeelenCommandSetMainMonitorBrightnessArgs.js → MonitorBrightness.js} +0 -0
  660. /package/esm/gen/types/{SeelenCommandWegRequestUpdatePreviewsArgs.js → NetworkStatistics.js} +0 -0
  661. /package/esm/gen/types/{SeelenLauncherRunner.js → Point.js} +0 -0
  662. /package/esm/gen/types/{GenericToolbarItem.js → SeelenCommandCreateWorkspaceArgs.js} +0 -0
  663. /package/esm/gen/types/{KeyboardToolbarItem.js → SeelenCommandDestroyWorkspaceArgs.js} +0 -0
  664. /package/esm/gen/types/{UserApplication.js → SeelenCommandGetKeyStateArgs.js} +0 -0
  665. /package/esm/gen/types/{WsdItemSelectSubtype.js → SeelenCommandReadFileArgs.js} +0 -0
  666. /package/esm/gen/types/{MediaToolbarItem.js → SeelenCommandRenameWorkspaceArgs.js} +0 -0
  667. /package/esm/gen/types/{NetworkToolbarItem.js → SeelenCommandSetSelfPositionArgs.js} +0 -0
  668. /package/esm/gen/types/{NotificationsToolbarItem.js → SeelenCommandStateWriteToolbarItemsArgs.js} +0 -0
  669. /package/esm/gen/types/{Placeholder.js → SeelenCommandTriggerContextMenuArgs.js} +0 -0
  670. /package/esm/gen/types/{PowerToolbarItem.js → SeelenCommandWallpaperSaveThumbnailArgs.js} +0 -0
  671. /package/esm/gen/types/{Profile.js → StartMenuLayout.js} +0 -0
  672. /package/esm/gen/types/{SeelenCommandRunAsAdminArgs.js → ToolbarState.js} +0 -0
  673. /package/esm/gen/types/{SeelenCommandSetUserFolderLimitArgs.js → WallpaperCollection.js} +0 -0
  674. /package/esm/gen/types/{SeelenLauncherSettings.js → WidgetConfigDefinition.js} +0 -0
  675. /package/esm/gen/types/{SettingsToolbarItem.js → WidgetConfigGroup.js} +0 -0
  676. /package/esm/gen/types/{TextToolbarItem.js → WidgetSelectOption.js} +0 -0
  677. /package/esm/gen/types/{UserToolbarItem.js → WidgetSettingColor.js} +0 -0
  678. /package/esm/gen/types/{WorkspaceToolbarItem.js → WidgetSettingInputNumber.js} +0 -0
  679. /package/esm/gen/types/{WsdGroup.js → WidgetSettingInputText.js} +0 -0
  680. /package/esm/gen/types/{WsdGroupEntry.js → WidgetSettingItem.js} +0 -0
  681. /package/esm/gen/types/{WsdItem.js → WidgetSettingRange.js} +0 -0
  682. /package/esm/gen/types/{WsdItemColor.js → WidgetSettingSelect.js} +0 -0
  683. /package/esm/gen/types/{WsdItemInputNumber.js → WidgetSettingSwitch.js} +0 -0
  684. /package/esm/gen/types/{WsdItemInputText.js → WmRenderTree.js} +0 -0
  685. /package/esm/{gen/types/WsdItemRange.js → src/state/widget/interfaces.js} +0 -0
  686. /package/script/gen/types/{BluetoothToolbarItem.js → AppsConfigurationList.js} +0 -0
  687. /package/script/gen/types/{DateToolbarItem.js → ContextMenu.js} +0 -0
  688. /package/script/gen/types/{DeviceToolbarItem.js → ContextMenuItem.js} +0 -0
  689. /package/script/gen/types/{Brightness.js → Core.js} +0 -0
  690. /package/script/gen/types/{File.js → Disk.js} +0 -0
  691. /package/script/gen/types/{LauncherHistory.js → Frame.js} +0 -0
  692. /package/script/gen/types/{ProfileSettings.js → ImeStatus.js} +0 -0
  693. /package/script/gen/types/{SeelenCommandSendKeysArgs.js → Memory.js} +0 -0
  694. /package/script/gen/types/{SeelenCommandSetMainMonitorBrightnessArgs.js → MonitorBrightness.js} +0 -0
  695. /package/script/gen/types/{SeelenCommandWegRequestUpdatePreviewsArgs.js → NetworkStatistics.js} +0 -0
  696. /package/script/gen/types/{SeelenLauncherRunner.js → Point.js} +0 -0
  697. /package/script/gen/types/{GenericToolbarItem.js → SeelenCommandCreateWorkspaceArgs.js} +0 -0
  698. /package/script/gen/types/{KeyboardToolbarItem.js → SeelenCommandDestroyWorkspaceArgs.js} +0 -0
  699. /package/script/gen/types/{UserApplication.js → SeelenCommandGetKeyStateArgs.js} +0 -0
  700. /package/script/gen/types/{WsdItemSelectSubtype.js → SeelenCommandReadFileArgs.js} +0 -0
  701. /package/script/gen/types/{MediaToolbarItem.js → SeelenCommandRenameWorkspaceArgs.js} +0 -0
  702. /package/script/gen/types/{NetworkToolbarItem.js → SeelenCommandSetSelfPositionArgs.js} +0 -0
  703. /package/script/gen/types/{NotificationsToolbarItem.js → SeelenCommandStateWriteToolbarItemsArgs.js} +0 -0
  704. /package/script/gen/types/{Placeholder.js → SeelenCommandTriggerContextMenuArgs.js} +0 -0
  705. /package/script/gen/types/{PowerToolbarItem.js → SeelenCommandWallpaperSaveThumbnailArgs.js} +0 -0
  706. /package/script/gen/types/{Profile.js → StartMenuLayout.js} +0 -0
  707. /package/script/gen/types/{SeelenCommandRunAsAdminArgs.js → ToolbarState.js} +0 -0
  708. /package/script/gen/types/{SeelenCommandSetUserFolderLimitArgs.js → WallpaperCollection.js} +0 -0
  709. /package/script/gen/types/{SeelenLauncherSettings.js → WidgetConfigDefinition.js} +0 -0
  710. /package/script/gen/types/{SettingsToolbarItem.js → WidgetConfigGroup.js} +0 -0
  711. /package/script/gen/types/{TextToolbarItem.js → WidgetSelectOption.js} +0 -0
  712. /package/script/gen/types/{UserToolbarItem.js → WidgetSettingColor.js} +0 -0
  713. /package/script/gen/types/{WorkspaceToolbarItem.js → WidgetSettingInputNumber.js} +0 -0
  714. /package/script/gen/types/{WsdGroup.js → WidgetSettingInputText.js} +0 -0
  715. /package/script/gen/types/{WsdGroupEntry.js → WidgetSettingItem.js} +0 -0
  716. /package/script/gen/types/{WsdItem.js → WidgetSettingRange.js} +0 -0
  717. /package/script/gen/types/{WsdItemColor.js → WidgetSettingSelect.js} +0 -0
  718. /package/script/gen/types/{WsdItemInputNumber.js → WidgetSettingSwitch.js} +0 -0
  719. /package/script/gen/types/{WsdItemInputText.js → WmRenderTree.js} +0 -0
  720. /package/script/{gen/types/WsdItemRange.js → src/state/widget/interfaces.js} +0 -0
@@ -1,38 +1,32 @@
1
1
  import * as dntShim from "../../../_dnt.shims.js";
2
2
  import { WidgetPreset, WidgetStatus, } from "../../../gen/types/mod.js";
3
3
  import { invoke, SeelenCommand, SeelenEvent } from "../../handlers/mod.js";
4
- import { List } from "../../utils/List.js";
5
- import { newFromInvoke, newOnEvent } from "../../utils/State.js";
6
4
  import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow";
7
5
  import { decodeBase64Url } from "../../../deps/jsr.io/@std/encoding/1.0.10/mod.js";
8
- import { PhysicalPosition, PhysicalSize } from "@tauri-apps/api/dpi";
9
- import { monitorFromPoint } from "@tauri-apps/api/window";
10
6
  import { debounce } from "../../utils/async.js";
11
7
  import { WidgetAutoSizer } from "./sizing.js";
12
- import { adjustPostionByPlacement } from "./positioning.js";
8
+ import { adjustPositionByPlacement, fitIntoMonitor, initMonitorsState } from "./positioning.js";
13
9
  import { startThemingTool } from "../theme/theming.js";
14
- export const SeelenSettingsWidgetId = "@seelen/settings";
15
- export const SeelenPopupWidgetId = "@seelen/popup";
16
- export const SeelenWegWidgetId = "@seelen/weg";
17
- export const SeelenToolbarWidgetId = "@seelen/fancy-toolbar";
18
- export const SeelenWindowManagerWidgetId = "@seelen/window-manager";
19
- export const SeelenLauncherWidgetId = "@seelen/launcher";
20
- export const SeelenWallWidgetId = "@seelen/wallpaper-manager";
21
- export class WidgetList extends List {
22
- static getAsync() {
23
- return newFromInvoke(this, SeelenCommand.StateGetWidgets);
24
- }
25
- static onChange(cb) {
26
- return newOnEvent(cb, this, SeelenEvent.StateWidgetsChanged);
27
- }
28
- findById(id) {
29
- return this.asArray().find((widget) => widget.id === id);
30
- }
31
- }
10
+ import { getCurrentWebview } from "@tauri-apps/api/webview";
32
11
  /**
33
12
  * Represents the widget instance running in the current webview
34
13
  */
35
14
  export class Widget {
15
+ /**
16
+ * Alternative accesor for the current running widget.\
17
+ * Will throw if the library is being used on a non Seelen UI environment
18
+ */
19
+ static getCurrent() {
20
+ const scope = dntShim.dntGlobalThis;
21
+ if (!scope.__SLU_WIDGET) {
22
+ throw new Error("The library is being used on a non Seelen UI environment");
23
+ }
24
+ return (scope.__SLU_WIDGET_INSTANCE || (scope.__SLU_WIDGET_INSTANCE = new Widget(scope.__SLU_WIDGET)));
25
+ }
26
+ /** The current running widget */
27
+ static get self() {
28
+ return Widget.getCurrent();
29
+ }
36
30
  /** widget id */
37
31
  id;
38
32
  /** widget definition */
@@ -42,15 +36,24 @@ export class Widget {
42
36
  /** current webview window */
43
37
  webview;
44
38
  autoSizer;
45
- initOptions = {};
46
39
  runtimeState = {
40
+ hwnd: 0,
47
41
  initialized: false,
48
42
  ready: false,
43
+ position: {
44
+ x: 0,
45
+ y: 0,
46
+ },
47
+ size: {
48
+ width: 0,
49
+ height: 0,
50
+ },
51
+ firstFocus: true,
49
52
  };
50
53
  constructor(widget) {
51
54
  this.def = widget;
52
55
  this.webview = getCurrentWebviewWindow();
53
- const [id, query] = Widget.getDecodedWebviewLabel();
56
+ const [id, query] = getDecodedWebviewLabel();
54
57
  const params = new URLSearchParams(query);
55
58
  const paramsObj = Object.freeze(Object.fromEntries(params));
56
59
  this.id = id;
@@ -61,43 +64,24 @@ export class Widget {
61
64
  params: Object.freeze(Object.fromEntries(params)),
62
65
  });
63
66
  }
64
- static getDecodedWebviewLabel() {
65
- const encondedLabel = getCurrentWebviewWindow().label;
66
- const decodedLabel = new TextDecoder().decode(decodeBase64Url(encondedLabel));
67
- const [id, query] = decodedLabel.split("?");
68
- if (!id) {
69
- throw new Error("Missing widget id on webview label");
70
- }
71
- return [id, query];
72
- }
73
- /** Will throw if the library is being used on a non Seelen UI environment */
74
- static getCurrentWidgetId() {
75
- return this.getCurrent().id;
76
- }
77
- /** Will throw if the library is being used on a non Seelen UI environment */
78
- static getCurrent() {
79
- const scope = dntShim.dntGlobalThis;
80
- if (!scope.__SLU_WIDGET) {
81
- throw new Error("The library is being used on a non Seelen UI environment");
82
- }
83
- return (scope.__SLU_WIDGET_INSTANCE || (scope.__SLU_WIDGET_INSTANCE = new Widget(scope.__SLU_WIDGET)));
67
+ /** Returns the current window id of the widget */
68
+ get windowId() {
69
+ return this.runtimeState.hwnd;
84
70
  }
85
- static getEntryDefaultValues(entry) {
86
- const config = {
87
- [entry.config.key]: entry.config.defaultValue,
71
+ /** Returns the current position and size of the widget */
72
+ get frame() {
73
+ return {
74
+ x: this.runtimeState.position.x,
75
+ y: this.runtimeState.position.y,
76
+ width: this.runtimeState.size.width,
77
+ height: this.runtimeState.size.height,
88
78
  };
89
- for (const item of entry.children) {
90
- Object.assign(config, Widget.getEntryDefaultValues(item));
91
- }
92
- return config;
93
79
  }
94
80
  /** Returns the default config of the widget, declared on the widget definition */
95
81
  getDefaultConfig() {
96
82
  const config = { enabled: true };
97
- for (const { group } of this.def.settings) {
98
- for (const entry of group) {
99
- Object.assign(config, Widget.getEntryDefaultValues(entry));
100
- }
83
+ for (const definition of this.def.settings) {
84
+ Object.assign(config, getDefinitionDefaultValues(definition));
101
85
  }
102
86
  return config;
103
87
  }
@@ -115,32 +99,17 @@ export class Widget {
115
99
  }
116
100
  /** Will apply the recommended settings for a desktop widget */
117
101
  async applyDesktopPreset() {
118
- await Promise.all([
119
- ...this.applyInvisiblePreset(),
120
- // Desktop widgets are always on bottom
121
- this.webview.setAlwaysOnBottom(true),
122
- this.persistPositionAndSize(),
123
- ]);
102
+ await Promise.all([...this.applyInvisiblePreset(), this.webview.setAlwaysOnBottom(true)]);
124
103
  }
125
104
  /** Will apply the recommended settings for an overlay widget */
126
105
  async applyOverlayPreset() {
127
- await Promise.all([
128
- ...this.applyInvisiblePreset(),
129
- // Overlay widgets are always on top
130
- this.webview.setAlwaysOnTop(true),
131
- this.persistPositionAndSize(),
132
- ]);
106
+ await Promise.all([...this.applyInvisiblePreset(), this.webview.setAlwaysOnTop(true)]);
133
107
  }
134
108
  /** Will apply the recommended settings for a popup widget */
135
109
  async applyPopupPreset() {
136
- await Promise.all([...this.applyInvisiblePreset()]);
137
- // auto close after 1 minute when not in use to save resources
138
- const closeOnTimeout = debounce(() => {
139
- this.webview.close();
140
- }, 60_000);
110
+ await Promise.all([...this.applyInvisiblePreset(), this.webview.setAlwaysOnTop(true)]);
141
111
  const hideWebview = debounce(() => {
142
- this.webview.hide();
143
- closeOnTimeout();
112
+ this.hide(true);
144
113
  }, 100);
145
114
  this.webview.onFocusChanged(({ payload: focused }) => {
146
115
  if (focused) {
@@ -153,20 +122,30 @@ export class Widget {
153
122
  this.onTrigger(async ({ desiredPosition, alignX, alignY }) => {
154
123
  // avoid flickering when clicking a button that triggers the widget
155
124
  hideWebview.cancel();
125
+ if (this.autoSizer && alignX && alignY) {
126
+ this.autoSizer.originX = alignX;
127
+ this.autoSizer.originY = alignY;
128
+ }
156
129
  if (desiredPosition) {
157
- const { width, height } = await this.webview.outerSize();
158
- const pos = await adjustPostionByPlacement({
159
- x: desiredPosition[0],
160
- y: desiredPosition[1],
161
- width,
162
- height,
163
- alignX,
164
- alignY,
130
+ const adjusted = adjustPositionByPlacement({
131
+ frame: {
132
+ x: desiredPosition.x,
133
+ y: desiredPosition.y,
134
+ width: this.runtimeState.size.width,
135
+ height: this.runtimeState.size.height,
136
+ },
137
+ originX: alignX,
138
+ originY: alignY,
139
+ });
140
+ await this.setPosition({
141
+ left: adjusted.x,
142
+ top: adjusted.y,
143
+ right: adjusted.x + adjusted.width,
144
+ bottom: adjusted.y + adjusted.height,
165
145
  });
166
- await this.webview.setPosition(new PhysicalPosition(pos.x, pos.y));
167
146
  }
168
- await this.webview.show();
169
- await this.webview.setFocus();
147
+ await this.show();
148
+ await this.focus();
170
149
  });
171
150
  }
172
151
  /**
@@ -175,30 +154,32 @@ export class Widget {
175
154
  */
176
155
  async persistPositionAndSize() {
177
156
  const storage = globalThis.window.localStorage;
178
- const { label } = this.webview;
179
- const [x, y, width, height] = [`x`, `y`, `width`, `height`].map((k) => storage.getItem(`${label}::${k}`));
180
- if (x && y) {
181
- const pos = new PhysicalPosition(Number(x), Number(y));
182
- // check if the stored position is still valid
183
- const monitor = await monitorFromPoint(pos.x, pos.y);
184
- if (monitor) {
185
- await this.webview.setPosition(pos);
186
- }
187
- }
188
- if (width && height) {
189
- const size = new PhysicalSize(Number(width), Number(height));
190
- await this.webview.setSize(size);
157
+ const [x, y, width, height] = [`x`, `y`, `width`, `height`].map((k) => storage.getItem(`${k}`));
158
+ if (x && y && width && height) {
159
+ const frame = {
160
+ x: Number(x),
161
+ y: Number(y),
162
+ width: Number(width),
163
+ height: Number(height),
164
+ };
165
+ const safeFrame = fitIntoMonitor(frame);
166
+ await this.setPosition({
167
+ left: safeFrame.x,
168
+ top: safeFrame.y,
169
+ right: safeFrame.x + safeFrame.width,
170
+ bottom: safeFrame.y + safeFrame.height,
171
+ });
191
172
  }
192
173
  this.webview.onMoved(debounce((e) => {
193
174
  const { x, y } = e.payload;
194
- storage.setItem(`${label}::x`, x.toString());
195
- storage.setItem(`${label}::y`, y.toString());
175
+ storage.setItem(`x`, x.toString());
176
+ storage.setItem(`y`, y.toString());
196
177
  console.info(`Widget position saved: ${x} ${y}`);
197
178
  }, 500));
198
179
  this.webview.onResized(debounce((e) => {
199
180
  const { width, height } = e.payload;
200
- storage.setItem(`${label}::width`, width.toString());
201
- storage.setItem(`${label}::height`, height.toString());
181
+ storage.setItem(`width`, width.toString());
182
+ storage.setItem(`height`, height.toString());
202
183
  console.info(`Widget size saved: ${width} ${height}`);
203
184
  }, 500));
204
185
  }
@@ -212,8 +193,14 @@ export class Widget {
212
193
  console.warn(`Widget already initialized`);
213
194
  return;
214
195
  }
196
+ this.runtimeState.hwnd = await invoke(SeelenCommand.GetSelfWindowId);
215
197
  this.runtimeState.initialized = true;
216
- this.initOptions = options;
198
+ if (options.autoSizeByContent) {
199
+ this.autoSizer = new WidgetAutoSizer(this, options.autoSizeByContent);
200
+ }
201
+ else if (options.saveAndRestoreLastRect ?? this.def.preset === WidgetPreset.Desktop) {
202
+ await this.persistPositionAndSize();
203
+ }
217
204
  switch (this.def.preset) {
218
205
  case WidgetPreset.None:
219
206
  break;
@@ -228,9 +215,18 @@ export class Widget {
228
215
  break;
229
216
  }
230
217
  await startThemingTool();
231
- if (options.autoSizeByContent) {
232
- this.autoSizer = new WidgetAutoSizer(this.webview, options.autoSizeByContent);
233
- }
218
+ await initMonitorsState();
219
+ // state initialization
220
+ this.runtimeState.size = await this.webview.outerSize();
221
+ this.runtimeState.position = await this.webview.outerPosition();
222
+ this.webview.onResized((e) => {
223
+ this.runtimeState.size.width = e.payload.width;
224
+ this.runtimeState.size.height = e.payload.height;
225
+ });
226
+ this.webview.onMoved((e) => {
227
+ this.runtimeState.position.x = e.payload.x;
228
+ this.runtimeState.position.y = e.payload.y;
229
+ });
234
230
  }
235
231
  /**
236
232
  * Will mark the widget as `ready` and pool pending triggers.
@@ -238,7 +234,8 @@ export class Widget {
238
234
  * If the widget is not lazy this will inmediately show the widget.
239
235
  * Lazy widget should be shown on trigger action.
240
236
  */
241
- async ready() {
237
+ async ready(options = {}) {
238
+ const { show = !this.def.lazy } = options;
242
239
  if (!this.runtimeState.initialized) {
243
240
  throw new Error(`Widget was not initialized before ready`);
244
241
  }
@@ -248,17 +245,87 @@ export class Widget {
248
245
  }
249
246
  this.runtimeState.ready = true;
250
247
  await this.autoSizer?.execute();
251
- if (this.initOptions.show ?? !this.def.lazy) {
252
- await this.webview.show();
248
+ if (show && !(await this.webview.isVisible())) {
249
+ await this.show();
250
+ await this.focus();
253
251
  }
254
252
  // this will mark the widget as ready, and send pending trigger event if exists
255
253
  await invoke(SeelenCommand.SetCurrentWidgetStatus, { status: WidgetStatus.Ready });
256
254
  }
257
255
  onTrigger(cb) {
258
256
  this.webview.listen(SeelenEvent.WidgetTriggered, ({ payload }) => {
259
- // fix for cutted popups, ensure correct size on trigger.
260
- // await this.autoSizer?.execute();
261
257
  cb(payload);
262
258
  });
263
259
  }
260
+ /** If animations are enabled this will animate the movement of the widget */
261
+ setPosition(rect) {
262
+ this.runtimeState.position.x = rect.left;
263
+ this.runtimeState.position.y = rect.top;
264
+ this.runtimeState.size.width = rect.right - rect.left;
265
+ this.runtimeState.size.height = rect.bottom - rect.top;
266
+ return invoke(SeelenCommand.SetSelfPosition, {
267
+ rect: {
268
+ left: Math.round(rect.left),
269
+ top: Math.round(rect.top),
270
+ right: Math.round(rect.right),
271
+ bottom: Math.round(rect.bottom),
272
+ },
273
+ });
274
+ }
275
+ async show() {
276
+ debouncedClose.cancel();
277
+ await this.webview.show();
278
+ }
279
+ /** Will force foreground the widget */
280
+ async focus() {
281
+ if (this.runtimeState.firstFocus) {
282
+ await getCurrentWebview().setFocus();
283
+ this.runtimeState.firstFocus = false;
284
+ }
285
+ await invoke(SeelenCommand.RequestFocus, { hwnd: this.runtimeState.hwnd }).catch(() => {
286
+ console.warn(`Failed to focus widget: ${this.decoded.label}`);
287
+ });
288
+ }
289
+ hide(closeAfterInactivity) {
290
+ Widget.self.webview.hide();
291
+ if (closeAfterInactivity) {
292
+ debouncedClose();
293
+ }
294
+ }
295
+ }
296
+ const debouncedClose = debounce(() => {
297
+ Widget.self.webview.close();
298
+ }, 30_000);
299
+ export const SeelenSettingsWidgetId = "@seelen/settings";
300
+ export const SeelenPopupWidgetId = "@seelen/popup";
301
+ export const SeelenWegWidgetId = "@seelen/weg";
302
+ export const SeelenToolbarWidgetId = "@seelen/fancy-toolbar";
303
+ export const SeelenWindowManagerWidgetId = "@seelen/window-manager";
304
+ export const SeelenWallWidgetId = "@seelen/wallpaper-manager";
305
+ function getDecodedWebviewLabel() {
306
+ const encondedLabel = getCurrentWebviewWindow().label;
307
+ const decodedLabel = new TextDecoder().decode(decodeBase64Url(encondedLabel));
308
+ const [id, query] = decodedLabel.split("?");
309
+ if (!id) {
310
+ throw new Error("Missing widget id on webview label");
311
+ }
312
+ return [id, query];
313
+ }
314
+ function getDefinitionDefaultValues(definition) {
315
+ const config = {};
316
+ // Check if it's a group (has "group" property)
317
+ if ("group" in definition) {
318
+ // Recursively process all items in the group
319
+ for (const item of definition.group.items) {
320
+ Object.assign(config, getDefinitionDefaultValues(item));
321
+ }
322
+ }
323
+ else {
324
+ // It's a setting item, extract key and defaultValue
325
+ const item = definition;
326
+ if ("key" in item && "defaultValue" in item) {
327
+ config[item.key] = item.defaultValue;
328
+ }
329
+ }
330
+ return config;
264
331
  }
@@ -1,15 +1,11 @@
1
- import { Alignment } from "../../../gen/types/mod.js";
1
+ import { Alignment, type Frame } from "../../../gen/types/mod.js";
2
2
  interface args {
3
- x: number;
4
- y: number;
5
- width: number;
6
- height: number;
7
- alignX?: Alignment | null;
8
- alignY?: Alignment | null;
3
+ frame: Frame;
4
+ originX?: Alignment | null;
5
+ originY?: Alignment | null;
9
6
  }
10
- export declare function adjustPostionByPlacement({ x, y, width, height, alignX, alignY, }: args): Promise<{
11
- x: number;
12
- y: number;
13
- }>;
7
+ export declare function initMonitorsState(): Promise<void>;
8
+ export declare function adjustPositionByPlacement({ frame: { x, y, width, height }, originX, originY, }: args): Frame;
9
+ export declare function fitIntoMonitor({ x, y, width, height }: Frame): Frame;
14
10
  export {};
15
11
  //# sourceMappingURL=positioning.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"positioning.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/positioning.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,UAAU,IAAI;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CAC3B;AAED,wBAAsB,wBAAwB,CAAC,EAC7C,CAAC,EACD,CAAC,EACD,KAAK,EACL,MAAM,EACN,MAAM,EACN,MAAM,GACP,EAAE,IAAI,GAAG,OAAO,CAAC;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAkB1C"}
1
+ {"version":3,"file":"positioning.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/positioning.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,KAAK,EAAwB,MAAM,2BAA2B,CAAC;AAKxF,UAAU,IAAI;IACZ,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CAC5B;AAMD,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAKvD;AAYD,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAC9B,OAAO,EACP,OAAO,GACR,EAAE,IAAI,GAAG,KAAK,CAoBd;AAED,wBAAgB,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,GAAG,KAAK,CAoCpE"}
@@ -1,59 +1,71 @@
1
- import { monitorFromPoint } from "@tauri-apps/api/window";
2
1
  import { Alignment } from "../../../gen/types/mod.js";
3
- export async function adjustPostionByPlacement({ x, y, width, height, alignX, alignY, }) {
4
- if (alignX === Alignment.Center) {
2
+ import { invoke, subscribe } from "../../handlers/mod.js";
3
+ import { SeelenCommand } from "../../lib.js";
4
+ import { SeelenEvent } from "../../handlers/events.js";
5
+ const monitors = {
6
+ value: [],
7
+ };
8
+ export async function initMonitorsState() {
9
+ monitors.value = await invoke(SeelenCommand.SystemGetMonitors);
10
+ subscribe(SeelenEvent.SystemMonitorsChanged, ({ payload }) => {
11
+ monitors.value = payload;
12
+ });
13
+ }
14
+ function monitorFromPoint(x, y) {
15
+ return monitors.value.find((m) => m.rect.left <= x && x < m.rect.right && m.rect.top <= y && y < m.rect.bottom);
16
+ }
17
+ function primaryMonitor() {
18
+ return monitors.value.find((m) => m.isPrimary);
19
+ }
20
+ export function adjustPositionByPlacement({ frame: { x, y, width, height }, originX, originY, }) {
21
+ if (originX === Alignment.Center) {
5
22
  x -= width / 2;
6
23
  }
7
- else if (alignX === Alignment.Start) {
24
+ else if (originX === Alignment.End) {
8
25
  x -= width;
9
26
  }
10
- if (alignY === Alignment.Center) {
27
+ if (originY === Alignment.Center) {
11
28
  y -= height / 2;
12
29
  }
13
- else if (alignY === Alignment.Start) {
30
+ else if (originY === Alignment.End) {
14
31
  y -= height;
15
32
  }
16
- const fixed = await fitIntoMonitor({ x, y, width, height });
33
+ const newFrame = fitIntoMonitor({ x, y, width, height });
17
34
  return {
18
- x: Math.round(fixed.x),
19
- y: Math.round(fixed.y),
35
+ x: Math.round(newFrame.x),
36
+ y: Math.round(newFrame.y),
37
+ width: Math.round(newFrame.width),
38
+ height: Math.round(newFrame.height),
20
39
  };
21
40
  }
22
- async function fitIntoMonitor({ x, y, width, height, }) {
23
- const monitor = await monitorFromPoint(x, y);
41
+ export function fitIntoMonitor({ x, y, width, height }) {
42
+ const monitor = monitorFromPoint(Math.round(x), Math.round(y)) || primaryMonitor();
24
43
  if (monitor) {
44
+ width = Math.min(width, monitor.rect.right - monitor.rect.left);
45
+ height = Math.min(height, monitor.rect.bottom - monitor.rect.top);
25
46
  const x2 = x + width;
26
47
  const y2 = y + height;
27
- const mx = monitor.position.x;
28
- const my = monitor.position.y;
29
- const mx2 = mx + monitor.size.width;
30
- const my2 = my + monitor.size.height;
31
48
  // check left edge
32
- if (x < mx) {
33
- x = mx;
49
+ if (x < monitor.rect.left) {
50
+ x = monitor.rect.left;
34
51
  }
35
52
  // check top edge
36
- if (y < my) {
37
- y = my;
53
+ if (y < monitor.rect.top) {
54
+ y = monitor.rect.top;
38
55
  }
39
56
  // check right edge
40
- if (x2 > mx2) {
41
- x = mx2 - width;
57
+ if (x2 > monitor.rect.right) {
58
+ x = monitor.rect.right - width;
42
59
  }
43
60
  // check bottom edge
44
- if (y2 > my2) {
45
- y = my2 - height;
46
- }
47
- // ensure final position is still within monitor bounds (in case window is larger than monitor)
48
- if (x < mx) {
49
- x = mx;
50
- }
51
- if (y < my) {
52
- y = my;
61
+ if (y2 > monitor.rect.bottom) {
62
+ y = monitor.rect.bottom - height;
53
63
  }
54
64
  }
55
65
  return {
56
66
  x,
57
67
  y,
68
+ width,
69
+ height,
58
70
  };
59
71
  }
@@ -1,11 +1,13 @@
1
- import type { WebviewWindow } from "@tauri-apps/api/webviewWindow";
2
- export interface AutoSizeOptions {
3
- onResize?: () => void;
4
- }
1
+ import type { Widget } from "./mod.js";
2
+ import { Alignment } from "../../../gen/types/mod.js";
5
3
  export declare class WidgetAutoSizer {
6
- private webview;
4
+ private widget;
7
5
  private element;
8
- constructor(webview: WebviewWindow, element: HTMLElement);
6
+ /** From which side the widget will grow */
7
+ originX: Alignment;
8
+ /** From which side the widget will grow */
9
+ originY: Alignment;
10
+ constructor(widget: Widget, element: HTMLElement);
9
11
  private setup;
10
12
  execute(): Promise<void>;
11
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sizing.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/sizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAGnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,qBAAa,eAAe;IACd,OAAO,CAAC,OAAO;IAAiB,OAAO,CAAC,OAAO;gBAAvC,OAAO,EAAE,aAAa,EAAU,OAAO,EAAE,WAAW;IAKxE,OAAO,CAAC,KAAK;IAmBP,OAAO;CAkBd"}
1
+ {"version":3,"file":"sizing.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/sizing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,qBAAa,eAAe;IAOxB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO;IAPjB,2CAA2C;IAC3C,OAAO,EAAE,SAAS,CAAmB;IACrC,2CAA2C;IAC3C,OAAO,EAAE,SAAS,CAAmB;gBAG3B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,WAAW;IAM9B,OAAO,CAAC,KAAK;IAcP,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CA6C/B"}
@@ -1,42 +1,66 @@
1
- import { LogicalSize } from "@tauri-apps/api/dpi";
1
+ import { PhysicalSize } from "@tauri-apps/api/dpi";
2
+ import { Alignment } from "../../../gen/types/mod.js";
2
3
  export class WidgetAutoSizer {
3
- webview;
4
+ widget;
4
5
  element;
5
- constructor(webview, element) {
6
- this.webview = webview;
6
+ /** From which side the widget will grow */
7
+ originX = Alignment.Start;
8
+ /** From which side the widget will grow */
9
+ originY = Alignment.Start;
10
+ constructor(widget, element) {
11
+ this.widget = widget;
7
12
  this.element = element;
8
13
  this.execute = this.execute.bind(this);
9
14
  this.setup();
10
15
  }
11
16
  setup() {
12
17
  // Disable resizing by the user
13
- this.webview.setResizable(false);
14
- // Update size when content changes
15
- const observer = new MutationObserver(this.execute);
18
+ this.widget.webview.setResizable(false);
19
+ const observer = new ResizeObserver(this.execute);
16
20
  observer.observe(this.element, {
17
- childList: true,
18
- subtree: true,
19
- attributes: true,
20
- characterData: true,
21
+ box: "border-box",
21
22
  });
22
- // Cleanup function
23
23
  return () => {
24
24
  observer.disconnect();
25
25
  };
26
26
  }
27
27
  async execute() {
28
- const contentWidth = this.element.scrollWidth;
29
- const contentHeight = this.element.scrollHeight;
30
- if (contentWidth < 1 || contentHeight < 1) {
28
+ const { x, y, width, height } = this.widget.frame;
29
+ const frame = {
30
+ x,
31
+ y,
32
+ width: Math.ceil(this.element.scrollWidth * globalThis.window.devicePixelRatio),
33
+ height: Math.ceil(this.element.scrollHeight * globalThis.window.devicePixelRatio),
34
+ };
35
+ const widthDiff = frame.width - width;
36
+ const heightDiff = frame.height - height;
37
+ // Only update if the difference is more than 1px (avoid infinite loops from decimal differences)
38
+ if (widthDiff === 0 && heightDiff === 0) {
31
39
  return;
32
40
  }
33
- const { width: physicalWidth, height: physicalHeight } = await this.webview.outerSize();
34
- const logicalWidth = physicalWidth * globalThis.window.devicePixelRatio;
35
- const logicalHeight = physicalHeight * globalThis.window.devicePixelRatio;
36
- // Only update if the difference is more than 1px (avoid infinite loops from decimal differences)
37
- if (Math.abs(contentWidth - logicalWidth) > 1 || Math.abs(contentHeight - logicalHeight) > 1) {
38
- const size = new LogicalSize(contentWidth, contentHeight);
39
- await this.webview.setSize(size);
41
+ console.trace(`Auto resize from ${width}x${height} to ${frame.width}x${frame.height}`);
42
+ if (this.originX === Alignment.Center) {
43
+ frame.x -= widthDiff / 2;
44
+ }
45
+ else if (this.originX === Alignment.End) {
46
+ frame.x -= widthDiff;
47
+ }
48
+ if (this.originY === Alignment.Center) {
49
+ frame.y -= heightDiff / 2;
40
50
  }
51
+ else if (this.originY === Alignment.End) {
52
+ frame.y -= heightDiff;
53
+ }
54
+ // only update size no position on this case
55
+ if (frame.x === x && frame.y === y) {
56
+ await this.widget.webview.setSize(new PhysicalSize(frame.width, frame.height));
57
+ return;
58
+ }
59
+ await this.widget.setPosition({
60
+ left: frame.x,
61
+ top: frame.y,
62
+ right: frame.x + frame.width,
63
+ bottom: frame.y + frame.height,
64
+ });
41
65
  }
42
66
  }