@seelen-ui/lib 2.5.8 → 2.6.6-next.2605170835

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 (493) hide show
  1. package/esm/gen/types/AppBarEdge.d.ts +7 -0
  2. package/esm/gen/types/AppBarEdge.d.ts.map +1 -0
  3. package/esm/gen/types/AppBarEdge.js +8 -0
  4. package/esm/gen/types/AppNotification.d.ts +3 -0
  5. package/esm/gen/types/AppNotification.d.ts.map +1 -1
  6. package/esm/gen/types/AudioWaveform.d.ts +11 -0
  7. package/esm/gen/types/AudioWaveform.d.ts.map +1 -0
  8. package/esm/gen/types/BackupStatus.d.ts +10 -0
  9. package/esm/gen/types/BackupStatus.d.ts.map +1 -0
  10. package/esm/gen/types/BluetoothDevice.d.ts +1 -0
  11. package/esm/gen/types/BluetoothDevice.d.ts.map +1 -1
  12. package/esm/gen/types/ClipboardData.d.ts +15 -0
  13. package/esm/gen/types/ClipboardData.d.ts.map +1 -0
  14. package/esm/gen/types/ClipboardEntry.d.ts +24 -0
  15. package/esm/gen/types/ClipboardEntry.d.ts.map +1 -0
  16. package/esm/gen/types/ClipboardEntryContent.d.ts +16 -0
  17. package/esm/gen/types/ClipboardEntryContent.d.ts.map +1 -0
  18. package/esm/gen/types/ClipboardEntryContent.js +2 -0
  19. package/esm/gen/types/Comparator.d.ts +9 -0
  20. package/esm/gen/types/Comparator.d.ts.map +1 -0
  21. package/esm/gen/types/Comparator.js +10 -0
  22. package/esm/gen/types/ContextMenu.d.ts +8 -0
  23. package/esm/gen/types/ContextMenu.d.ts.map +1 -1
  24. package/esm/gen/types/ContextMenuCallbackPayload.d.ts +20 -0
  25. package/esm/gen/types/ContextMenuCallbackPayload.d.ts.map +1 -0
  26. package/esm/gen/types/ContextMenuItem.d.ts +4 -2
  27. package/esm/gen/types/ContextMenuItem.d.ts.map +1 -1
  28. package/esm/gen/types/FancyToolbarSettings.d.ts +6 -0
  29. package/esm/gen/types/FancyToolbarSettings.d.ts.map +1 -1
  30. package/esm/gen/types/FocusedApp.d.ts +1 -1
  31. package/esm/gen/types/FocusedApp.d.ts.map +1 -1
  32. package/esm/gen/types/KnownPlugin.d.ts +2 -2
  33. package/esm/gen/types/KnownPlugin.d.ts.map +1 -1
  34. package/esm/gen/types/NotificationsMode.d.ts +6 -0
  35. package/esm/gen/types/NotificationsMode.d.ts.map +1 -0
  36. package/esm/gen/types/NotificationsMode.js +7 -0
  37. package/esm/gen/types/Operand.d.ts +5 -0
  38. package/esm/gen/types/Operand.d.ts.map +1 -0
  39. package/esm/gen/types/Operand.js +6 -0
  40. package/esm/gen/types/ResolvedShortcut.d.ts +9 -0
  41. package/esm/gen/types/ResolvedShortcut.d.ts.map +1 -0
  42. package/esm/gen/types/ResolvedShortcut.js +2 -0
  43. package/esm/gen/types/ResourceId.d.ts +6 -2
  44. package/esm/gen/types/ResourceId.d.ts.map +1 -1
  45. package/esm/gen/types/SeelenCommandActivateNotificationArgs.d.ts +3 -0
  46. package/esm/gen/types/SeelenCommandActivateNotificationArgs.d.ts.map +1 -1
  47. package/esm/gen/types/SeelenCommandActivateNotificationArgs.js +0 -1
  48. package/esm/gen/types/SeelenCommandArgument.d.ts +51 -5
  49. package/esm/gen/types/SeelenCommandArgument.d.ts.map +1 -1
  50. package/esm/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts +4 -0
  51. package/esm/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts.map +1 -0
  52. package/esm/gen/types/SeelenCommandClipboardDeleteEntryArgs.js +2 -0
  53. package/esm/gen/types/SeelenCommandClipboardPasteArgs.d.ts +4 -0
  54. package/esm/gen/types/SeelenCommandClipboardPasteArgs.d.ts.map +1 -0
  55. package/esm/gen/types/SeelenCommandClipboardPasteArgs.js +2 -0
  56. package/esm/gen/types/SeelenCommandClipboardSetContentArgs.d.ts +4 -0
  57. package/esm/gen/types/SeelenCommandClipboardSetContentArgs.d.ts.map +1 -0
  58. package/esm/gen/types/SeelenCommandClipboardSetContentArgs.js +2 -0
  59. package/esm/gen/types/SeelenCommandConnectBluetoothDeviceArgs.d.ts +4 -0
  60. package/esm/gen/types/SeelenCommandConnectBluetoothDeviceArgs.d.ts.map +1 -0
  61. package/esm/gen/types/SeelenCommandConnectBluetoothDeviceArgs.js +2 -0
  62. package/esm/gen/types/SeelenCommandMoveWindowToWorkspaceArgs.d.ts +6 -0
  63. package/esm/gen/types/SeelenCommandMoveWindowToWorkspaceArgs.d.ts.map +1 -0
  64. package/esm/gen/types/SeelenCommandRegisterAppBarArgs.d.ts +7 -0
  65. package/esm/gen/types/SeelenCommandRegisterAppBarArgs.d.ts.map +1 -0
  66. package/esm/gen/types/SeelenCommandRegisterAppBarArgs.js +1 -0
  67. package/esm/gen/types/SeelenCommandReturn.d.ts +49 -8
  68. package/esm/gen/types/SeelenCommandReturn.d.ts.map +1 -1
  69. package/esm/gen/types/SeelenCommandSetFocusAssistArgs.d.ts +4 -0
  70. package/esm/gen/types/SeelenCommandSetFocusAssistArgs.d.ts.map +1 -0
  71. package/esm/gen/types/SeelenCommandSetFocusAssistArgs.js +2 -0
  72. package/esm/gen/types/SeelenCommandSetNotificationsModeArgs.d.ts +5 -0
  73. package/esm/gen/types/SeelenCommandSetNotificationsModeArgs.d.ts.map +1 -0
  74. package/esm/gen/types/SeelenCommandSetNotificationsModeArgs.js +1 -0
  75. package/esm/gen/types/SeelenCommandSystemSetAccentColorArgs.d.ts +5 -0
  76. package/esm/gen/types/SeelenCommandSystemSetAccentColorArgs.d.ts.map +1 -0
  77. package/esm/gen/types/SeelenCommandSystemSetAccentColorArgs.js +1 -0
  78. package/esm/gen/types/SeelenCommandWlanForgetArgs.d.ts +4 -0
  79. package/esm/gen/types/SeelenCommandWlanForgetArgs.d.ts.map +1 -0
  80. package/esm/gen/types/SeelenCommandWlanForgetArgs.js +2 -0
  81. package/esm/gen/types/SeelenEventPayload.d.ts +26 -8
  82. package/esm/gen/types/SeelenEventPayload.d.ts.map +1 -1
  83. package/esm/gen/types/SeelenFont.d.ts +4 -0
  84. package/esm/gen/types/SeelenFont.d.ts.map +1 -0
  85. package/esm/gen/types/SeelenFont.js +2 -0
  86. package/esm/gen/types/SeelenWallSettings.d.ts +14 -0
  87. package/esm/gen/types/SeelenWallSettings.d.ts.map +1 -1
  88. package/esm/gen/types/SeelenWegSettings.d.ts +11 -0
  89. package/esm/gen/types/SeelenWegSettings.d.ts.map +1 -1
  90. package/esm/gen/types/Settings.d.ts +12 -0
  91. package/esm/gen/types/Settings.d.ts.map +1 -1
  92. package/esm/gen/types/SettingsByWidget.d.ts +7 -0
  93. package/esm/gen/types/SettingsByWidget.d.ts.map +1 -1
  94. package/esm/gen/types/SluShortcutsSettings.d.ts +9 -2
  95. package/esm/gen/types/SluShortcutsSettings.d.ts.map +1 -1
  96. package/esm/gen/types/SluShortcutsSettings.js +1 -0
  97. package/esm/gen/types/SystemShortcutDeclaration.d.ts +16 -0
  98. package/esm/gen/types/SystemShortcutDeclaration.d.ts.map +1 -0
  99. package/esm/gen/types/SystemShortcutDeclaration.js +2 -0
  100. package/esm/gen/types/ThemeConfigDefinition.d.ts +2 -4
  101. package/esm/gen/types/ThemeConfigDefinition.d.ts.map +1 -1
  102. package/esm/gen/types/ThemeConfigGroupVariant.d.ts +5 -0
  103. package/esm/gen/types/ThemeConfigGroupVariant.d.ts.map +1 -0
  104. package/esm/gen/types/ThemeConfigGroupVariant.js +1 -0
  105. package/esm/gen/types/ThemeVariableDefinition.d.ts +2 -0
  106. package/esm/gen/types/ThemeVariableDefinition.d.ts.map +1 -1
  107. package/esm/gen/types/ThirdPartyWidgetSettings.d.ts +7 -0
  108. package/esm/gen/types/ThirdPartyWidgetSettings.d.ts.map +1 -1
  109. package/esm/gen/types/ToolbarItem.d.ts +2 -0
  110. package/esm/gen/types/ToolbarItem.d.ts.map +1 -1
  111. package/esm/gen/types/TwmCondition.d.ts +17 -0
  112. package/esm/gen/types/TwmCondition.d.ts.map +1 -0
  113. package/esm/gen/types/TwmCondition.js +1 -0
  114. package/esm/gen/types/TwmGlobalRuntimeTree.d.ts +8 -0
  115. package/esm/gen/types/TwmGlobalRuntimeTree.d.ts.map +1 -0
  116. package/esm/gen/types/TwmGlobalRuntimeTree.js +1 -0
  117. package/esm/gen/types/{WmNodeKind.d.ts → TwmNodeKind.d.ts} +2 -2
  118. package/esm/gen/types/TwmNodeKind.d.ts.map +1 -0
  119. package/esm/gen/types/TwmNodeKind.js +8 -0
  120. package/esm/gen/types/TwmNodeLifetime.d.ts +5 -0
  121. package/esm/gen/types/TwmNodeLifetime.d.ts.map +1 -0
  122. package/esm/gen/types/TwmNodeLifetime.js +6 -0
  123. package/esm/gen/types/TwmPlugin.d.ts +8 -0
  124. package/esm/gen/types/TwmPlugin.d.ts.map +1 -0
  125. package/esm/gen/types/TwmPlugin.js +1 -0
  126. package/esm/gen/types/{WmNode.d.ts → TwmPluginNode.d.ts} +15 -17
  127. package/esm/gen/types/TwmPluginNode.d.ts.map +1 -0
  128. package/esm/gen/types/TwmPluginNode.js +1 -0
  129. package/esm/gen/types/TwmReservation.d.ts +9 -0
  130. package/esm/gen/types/TwmReservation.d.ts.map +1 -0
  131. package/esm/gen/types/TwmReservation.js +10 -0
  132. package/esm/gen/types/TwmRuntimeNode.d.ts +22 -0
  133. package/esm/gen/types/TwmRuntimeNode.d.ts.map +1 -0
  134. package/esm/gen/types/TwmRuntimeNode.js +1 -0
  135. package/esm/gen/types/TwmRuntimeTree.d.ts +8 -0
  136. package/esm/gen/types/TwmRuntimeTree.d.ts.map +1 -0
  137. package/esm/gen/types/TwmRuntimeTree.js +1 -0
  138. package/esm/gen/types/TwmStackPolicy.d.ts +6 -0
  139. package/esm/gen/types/TwmStackPolicy.d.ts.map +1 -0
  140. package/esm/gen/types/TwmStackPolicy.js +7 -0
  141. package/esm/gen/types/UIColors.d.ts +9 -10
  142. package/esm/gen/types/UIColors.d.ts.map +1 -1
  143. package/esm/gen/types/UIColors.js +0 -1
  144. package/esm/gen/types/UserAppWindow.d.ts +5 -0
  145. package/esm/gen/types/UserAppWindow.d.ts.map +1 -1
  146. package/esm/gen/types/UserAppWindowPreview.d.ts +1 -1
  147. package/esm/gen/types/Wallpaper.d.ts +1 -1
  148. package/esm/gen/types/WallpaperKind.d.ts +1 -0
  149. package/esm/gen/types/WallpaperKind.d.ts.map +1 -1
  150. package/esm/gen/types/WallpaperKind.js +1 -0
  151. package/esm/gen/types/WegMiddleClickAction.d.ts +5 -0
  152. package/esm/gen/types/WegMiddleClickAction.d.ts.map +1 -0
  153. package/esm/gen/types/WegMiddleClickAction.js +6 -0
  154. package/esm/gen/types/Widget.d.ts +11 -0
  155. package/esm/gen/types/Widget.d.ts.map +1 -1
  156. package/esm/gen/types/WidgetConfigDefinition.d.ts +2 -4
  157. package/esm/gen/types/WidgetConfigDefinition.d.ts.map +1 -1
  158. package/esm/gen/types/WidgetConfigGroupVariant.d.ts +5 -0
  159. package/esm/gen/types/WidgetConfigGroupVariant.d.ts.map +1 -0
  160. package/esm/gen/types/WidgetConfigGroupVariant.js +1 -0
  161. package/esm/gen/types/WidgetSelectOption.d.ts +1 -1
  162. package/esm/gen/types/WidgetSelectOption.d.ts.map +1 -1
  163. package/esm/gen/types/WidgetSettingColor.d.ts +4 -4
  164. package/esm/gen/types/WidgetSettingColor.d.ts.map +1 -1
  165. package/esm/gen/types/WidgetSettingFont.d.ts +34 -0
  166. package/esm/gen/types/WidgetSettingFont.d.ts.map +1 -0
  167. package/esm/gen/types/WidgetSettingFont.js +1 -0
  168. package/esm/gen/types/WidgetSettingInputNumber.d.ts +4 -4
  169. package/esm/gen/types/WidgetSettingInputNumber.d.ts.map +1 -1
  170. package/esm/gen/types/WidgetSettingInputText.d.ts +4 -4
  171. package/esm/gen/types/WidgetSettingInputText.d.ts.map +1 -1
  172. package/esm/gen/types/WidgetSettingItem.d.ts +4 -1
  173. package/esm/gen/types/WidgetSettingItem.d.ts.map +1 -1
  174. package/esm/gen/types/WidgetSettingRange.d.ts +4 -4
  175. package/esm/gen/types/WidgetSettingRange.d.ts.map +1 -1
  176. package/esm/gen/types/WidgetSettingSelect.d.ts +4 -4
  177. package/esm/gen/types/WidgetSettingSelect.d.ts.map +1 -1
  178. package/esm/gen/types/WidgetSettingSwitch.d.ts +4 -4
  179. package/esm/gen/types/WidgetSettingSwitch.d.ts.map +1 -1
  180. package/esm/gen/types/WidgetShortcutDeclaration.d.ts +33 -0
  181. package/esm/gen/types/WidgetShortcutDeclaration.d.ts.map +1 -0
  182. package/esm/gen/types/WidgetShortcutDeclaration.js +1 -0
  183. package/esm/gen/types/WidgetStatus.d.ts +2 -1
  184. package/esm/gen/types/WidgetStatus.d.ts.map +1 -1
  185. package/esm/gen/types/WidgetStatus.js +1 -0
  186. package/esm/gen/types/WindowManagerSettings.d.ts +6 -0
  187. package/esm/gen/types/WindowManagerSettings.d.ts.map +1 -1
  188. package/esm/gen/types/WlanBssEntry.d.ts +15 -6
  189. package/esm/gen/types/WlanBssEntry.d.ts.map +1 -1
  190. package/esm/gen/types/mod.d.ts +275 -245
  191. package/esm/gen/types/mod.d.ts.map +1 -1
  192. package/esm/gen/types/mod.js +275 -245
  193. package/esm/gen/types/serde_json/JsonValue.d.ts +4 -0
  194. package/esm/gen/types/serde_json/JsonValue.d.ts.map +1 -0
  195. package/esm/gen/types/serde_json/JsonValue.js +2 -0
  196. package/esm/src/handlers/commands.d.ts +22 -4
  197. package/esm/src/handlers/commands.d.ts.map +1 -1
  198. package/esm/src/handlers/commands.js +21 -3
  199. package/esm/src/handlers/events.d.ts +9 -3
  200. package/esm/src/handlers/events.d.ts.map +1 -1
  201. package/esm/src/handlers/events.js +8 -2
  202. package/esm/src/state/theme/theming.d.ts +1 -0
  203. package/esm/src/state/theme/theming.d.ts.map +1 -1
  204. package/esm/src/state/theme/theming.js +21 -1
  205. package/esm/src/state/widget/interfaces.d.ts +48 -7
  206. package/esm/src/state/widget/interfaces.d.ts.map +1 -1
  207. package/esm/src/state/widget/mod.d.ts +12 -7
  208. package/esm/src/state/widget/mod.d.ts.map +1 -1
  209. package/esm/src/state/widget/mod.js +90 -99
  210. package/esm/src/state/widget/positioning.js +1 -1
  211. package/esm/src/state/widget/sizing.d.ts +14 -3
  212. package/esm/src/state/widget/sizing.d.ts.map +1 -1
  213. package/esm/src/state/widget/sizing.js +60 -17
  214. package/esm/src/system_state/ui_colors.d.ts +0 -1
  215. package/esm/src/system_state/ui_colors.d.ts.map +1 -1
  216. package/esm/src/system_state/ui_colors.js +5 -22
  217. package/esm/src/utils/async.d.ts +12 -0
  218. package/esm/src/utils/async.d.ts.map +1 -1
  219. package/esm/src/utils/async.js +46 -0
  220. package/esm/src/utils/mod.d.ts +2 -0
  221. package/esm/src/utils/mod.d.ts.map +1 -1
  222. package/esm/src/utils/mod.js +5 -0
  223. package/package.json +7 -6
  224. package/script/gen/types/AppBarEdge.d.ts +7 -0
  225. package/script/gen/types/AppBarEdge.d.ts.map +1 -0
  226. package/script/gen/types/AppBarEdge.js +11 -0
  227. package/script/gen/types/AppNotification.d.ts +3 -0
  228. package/script/gen/types/AppNotification.d.ts.map +1 -1
  229. package/script/gen/types/AudioWaveform.d.ts +11 -0
  230. package/script/gen/types/AudioWaveform.d.ts.map +1 -0
  231. package/script/gen/types/BackupStatus.d.ts +10 -0
  232. package/script/gen/types/BackupStatus.d.ts.map +1 -0
  233. package/script/gen/types/BluetoothDevice.d.ts +1 -0
  234. package/script/gen/types/BluetoothDevice.d.ts.map +1 -1
  235. package/script/gen/types/ClipboardData.d.ts +15 -0
  236. package/script/gen/types/ClipboardData.d.ts.map +1 -0
  237. package/script/gen/types/ClipboardEntry.d.ts +24 -0
  238. package/script/gen/types/ClipboardEntry.d.ts.map +1 -0
  239. package/script/gen/types/ClipboardEntryContent.d.ts +16 -0
  240. package/script/gen/types/ClipboardEntryContent.d.ts.map +1 -0
  241. package/script/gen/types/ClipboardEntryContent.js +3 -0
  242. package/script/gen/types/Comparator.d.ts +9 -0
  243. package/script/gen/types/Comparator.d.ts.map +1 -0
  244. package/script/gen/types/Comparator.js +13 -0
  245. package/script/gen/types/ContextMenu.d.ts +8 -0
  246. package/script/gen/types/ContextMenu.d.ts.map +1 -1
  247. package/script/gen/types/ContextMenuCallbackPayload.d.ts +20 -0
  248. package/script/gen/types/ContextMenuCallbackPayload.d.ts.map +1 -0
  249. package/script/gen/types/ContextMenuItem.d.ts +4 -2
  250. package/script/gen/types/ContextMenuItem.d.ts.map +1 -1
  251. package/script/gen/types/FancyToolbarSettings.d.ts +6 -0
  252. package/script/gen/types/FancyToolbarSettings.d.ts.map +1 -1
  253. package/script/gen/types/FocusedApp.d.ts +1 -1
  254. package/script/gen/types/FocusedApp.d.ts.map +1 -1
  255. package/script/gen/types/KnownPlugin.d.ts +2 -2
  256. package/script/gen/types/KnownPlugin.d.ts.map +1 -1
  257. package/script/gen/types/NotificationsMode.d.ts +6 -0
  258. package/script/gen/types/NotificationsMode.d.ts.map +1 -0
  259. package/script/gen/types/NotificationsMode.js +10 -0
  260. package/script/gen/types/Operand.d.ts +5 -0
  261. package/script/gen/types/Operand.d.ts.map +1 -0
  262. package/script/gen/types/Operand.js +9 -0
  263. package/script/gen/types/ResolvedShortcut.d.ts +9 -0
  264. package/script/gen/types/ResolvedShortcut.d.ts.map +1 -0
  265. package/script/gen/types/ResolvedShortcut.js +3 -0
  266. package/script/gen/types/ResourceId.d.ts +6 -2
  267. package/script/gen/types/ResourceId.d.ts.map +1 -1
  268. package/script/gen/types/SeelenCommandActivateNotificationArgs.d.ts +3 -0
  269. package/script/gen/types/SeelenCommandActivateNotificationArgs.d.ts.map +1 -1
  270. package/script/gen/types/SeelenCommandActivateNotificationArgs.js +0 -1
  271. package/script/gen/types/SeelenCommandArgument.d.ts +51 -5
  272. package/script/gen/types/SeelenCommandArgument.d.ts.map +1 -1
  273. package/script/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts +4 -0
  274. package/script/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts.map +1 -0
  275. package/script/gen/types/SeelenCommandClipboardDeleteEntryArgs.js +3 -0
  276. package/script/gen/types/SeelenCommandClipboardPasteArgs.d.ts +4 -0
  277. package/script/gen/types/SeelenCommandClipboardPasteArgs.d.ts.map +1 -0
  278. package/script/gen/types/SeelenCommandClipboardPasteArgs.js +3 -0
  279. package/script/gen/types/SeelenCommandClipboardSetContentArgs.d.ts +4 -0
  280. package/script/gen/types/SeelenCommandClipboardSetContentArgs.d.ts.map +1 -0
  281. package/script/gen/types/SeelenCommandClipboardSetContentArgs.js +3 -0
  282. package/script/gen/types/SeelenCommandConnectBluetoothDeviceArgs.d.ts +4 -0
  283. package/script/gen/types/SeelenCommandConnectBluetoothDeviceArgs.d.ts.map +1 -0
  284. package/script/gen/types/SeelenCommandConnectBluetoothDeviceArgs.js +3 -0
  285. package/script/gen/types/SeelenCommandMoveWindowToWorkspaceArgs.d.ts +6 -0
  286. package/script/gen/types/SeelenCommandMoveWindowToWorkspaceArgs.d.ts.map +1 -0
  287. package/script/gen/types/SeelenCommandRegisterAppBarArgs.d.ts +7 -0
  288. package/script/gen/types/SeelenCommandRegisterAppBarArgs.d.ts.map +1 -0
  289. package/script/gen/types/SeelenCommandRegisterAppBarArgs.js +2 -0
  290. package/script/gen/types/SeelenCommandReturn.d.ts +49 -8
  291. package/script/gen/types/SeelenCommandReturn.d.ts.map +1 -1
  292. package/script/gen/types/SeelenCommandSetFocusAssistArgs.d.ts +4 -0
  293. package/script/gen/types/SeelenCommandSetFocusAssistArgs.d.ts.map +1 -0
  294. package/script/gen/types/SeelenCommandSetFocusAssistArgs.js +3 -0
  295. package/script/gen/types/SeelenCommandSetNotificationsModeArgs.d.ts +5 -0
  296. package/script/gen/types/SeelenCommandSetNotificationsModeArgs.d.ts.map +1 -0
  297. package/script/gen/types/SeelenCommandSetNotificationsModeArgs.js +2 -0
  298. package/script/gen/types/SeelenCommandSystemSetAccentColorArgs.d.ts +5 -0
  299. package/script/gen/types/SeelenCommandSystemSetAccentColorArgs.d.ts.map +1 -0
  300. package/script/gen/types/SeelenCommandSystemSetAccentColorArgs.js +2 -0
  301. package/script/gen/types/SeelenCommandWlanForgetArgs.d.ts +4 -0
  302. package/script/gen/types/SeelenCommandWlanForgetArgs.d.ts.map +1 -0
  303. package/script/gen/types/SeelenCommandWlanForgetArgs.js +3 -0
  304. package/script/gen/types/SeelenEventPayload.d.ts +26 -8
  305. package/script/gen/types/SeelenEventPayload.d.ts.map +1 -1
  306. package/script/gen/types/SeelenFont.d.ts +4 -0
  307. package/script/gen/types/SeelenFont.d.ts.map +1 -0
  308. package/script/gen/types/SeelenFont.js +3 -0
  309. package/script/gen/types/SeelenWallSettings.d.ts +14 -0
  310. package/script/gen/types/SeelenWallSettings.d.ts.map +1 -1
  311. package/script/gen/types/SeelenWegSettings.d.ts +11 -0
  312. package/script/gen/types/SeelenWegSettings.d.ts.map +1 -1
  313. package/script/gen/types/Settings.d.ts +12 -0
  314. package/script/gen/types/Settings.d.ts.map +1 -1
  315. package/script/gen/types/SettingsByWidget.d.ts +7 -0
  316. package/script/gen/types/SettingsByWidget.d.ts.map +1 -1
  317. package/script/gen/types/SluShortcutsSettings.d.ts +9 -2
  318. package/script/gen/types/SluShortcutsSettings.d.ts.map +1 -1
  319. package/script/gen/types/SluShortcutsSettings.js +1 -0
  320. package/script/gen/types/SystemShortcutDeclaration.d.ts +16 -0
  321. package/script/gen/types/SystemShortcutDeclaration.d.ts.map +1 -0
  322. package/script/gen/types/SystemShortcutDeclaration.js +3 -0
  323. package/script/gen/types/ThemeConfigDefinition.d.ts +2 -4
  324. package/script/gen/types/ThemeConfigDefinition.d.ts.map +1 -1
  325. package/script/gen/types/ThemeConfigGroupVariant.d.ts +5 -0
  326. package/script/gen/types/ThemeConfigGroupVariant.d.ts.map +1 -0
  327. package/script/gen/types/ThemeConfigGroupVariant.js +2 -0
  328. package/script/gen/types/ThemeVariableDefinition.d.ts +2 -0
  329. package/script/gen/types/ThemeVariableDefinition.d.ts.map +1 -1
  330. package/script/gen/types/ThirdPartyWidgetSettings.d.ts +7 -0
  331. package/script/gen/types/ThirdPartyWidgetSettings.d.ts.map +1 -1
  332. package/script/gen/types/ToolbarItem.d.ts +2 -0
  333. package/script/gen/types/ToolbarItem.d.ts.map +1 -1
  334. package/script/gen/types/TwmCondition.d.ts +17 -0
  335. package/script/gen/types/TwmCondition.d.ts.map +1 -0
  336. package/script/gen/types/TwmCondition.js +2 -0
  337. package/script/gen/types/TwmGlobalRuntimeTree.d.ts +8 -0
  338. package/script/gen/types/TwmGlobalRuntimeTree.d.ts.map +1 -0
  339. package/script/gen/types/TwmGlobalRuntimeTree.js +2 -0
  340. package/script/gen/types/{WmNodeKind.d.ts → TwmNodeKind.d.ts} +2 -2
  341. package/script/gen/types/TwmNodeKind.d.ts.map +1 -0
  342. package/script/gen/types/TwmNodeKind.js +11 -0
  343. package/script/gen/types/TwmNodeLifetime.d.ts +5 -0
  344. package/script/gen/types/TwmNodeLifetime.d.ts.map +1 -0
  345. package/script/gen/types/TwmNodeLifetime.js +9 -0
  346. package/script/gen/types/TwmPlugin.d.ts +8 -0
  347. package/script/gen/types/TwmPlugin.d.ts.map +1 -0
  348. package/script/gen/types/TwmPlugin.js +2 -0
  349. package/script/gen/types/{WmNode.d.ts → TwmPluginNode.d.ts} +15 -17
  350. package/script/gen/types/TwmPluginNode.d.ts.map +1 -0
  351. package/script/gen/types/TwmPluginNode.js +2 -0
  352. package/script/gen/types/TwmReservation.d.ts +9 -0
  353. package/script/gen/types/TwmReservation.d.ts.map +1 -0
  354. package/script/gen/types/TwmReservation.js +13 -0
  355. package/script/gen/types/TwmRuntimeNode.d.ts +22 -0
  356. package/script/gen/types/TwmRuntimeNode.d.ts.map +1 -0
  357. package/script/gen/types/TwmRuntimeNode.js +2 -0
  358. package/script/gen/types/TwmRuntimeTree.d.ts +8 -0
  359. package/script/gen/types/TwmRuntimeTree.d.ts.map +1 -0
  360. package/script/gen/types/TwmRuntimeTree.js +2 -0
  361. package/script/gen/types/TwmStackPolicy.d.ts +6 -0
  362. package/script/gen/types/TwmStackPolicy.d.ts.map +1 -0
  363. package/script/gen/types/TwmStackPolicy.js +10 -0
  364. package/script/gen/types/UIColors.d.ts +9 -10
  365. package/script/gen/types/UIColors.d.ts.map +1 -1
  366. package/script/gen/types/UIColors.js +0 -1
  367. package/script/gen/types/UserAppWindow.d.ts +5 -0
  368. package/script/gen/types/UserAppWindow.d.ts.map +1 -1
  369. package/script/gen/types/UserAppWindowPreview.d.ts +1 -1
  370. package/script/gen/types/Wallpaper.d.ts +1 -1
  371. package/script/gen/types/WallpaperKind.d.ts +1 -0
  372. package/script/gen/types/WallpaperKind.d.ts.map +1 -1
  373. package/script/gen/types/WallpaperKind.js +1 -0
  374. package/script/gen/types/WegMiddleClickAction.d.ts +5 -0
  375. package/script/gen/types/WegMiddleClickAction.d.ts.map +1 -0
  376. package/script/gen/types/WegMiddleClickAction.js +9 -0
  377. package/script/gen/types/Widget.d.ts +11 -0
  378. package/script/gen/types/Widget.d.ts.map +1 -1
  379. package/script/gen/types/WidgetConfigDefinition.d.ts +2 -4
  380. package/script/gen/types/WidgetConfigDefinition.d.ts.map +1 -1
  381. package/script/gen/types/WidgetConfigGroupVariant.d.ts +5 -0
  382. package/script/gen/types/WidgetConfigGroupVariant.d.ts.map +1 -0
  383. package/script/gen/types/WidgetConfigGroupVariant.js +2 -0
  384. package/script/gen/types/WidgetSelectOption.d.ts +1 -1
  385. package/script/gen/types/WidgetSelectOption.d.ts.map +1 -1
  386. package/script/gen/types/WidgetSettingColor.d.ts +4 -4
  387. package/script/gen/types/WidgetSettingColor.d.ts.map +1 -1
  388. package/script/gen/types/WidgetSettingFont.d.ts +34 -0
  389. package/script/gen/types/WidgetSettingFont.d.ts.map +1 -0
  390. package/script/gen/types/WidgetSettingFont.js +2 -0
  391. package/script/gen/types/WidgetSettingInputNumber.d.ts +4 -4
  392. package/script/gen/types/WidgetSettingInputNumber.d.ts.map +1 -1
  393. package/script/gen/types/WidgetSettingInputText.d.ts +4 -4
  394. package/script/gen/types/WidgetSettingInputText.d.ts.map +1 -1
  395. package/script/gen/types/WidgetSettingItem.d.ts +4 -1
  396. package/script/gen/types/WidgetSettingItem.d.ts.map +1 -1
  397. package/script/gen/types/WidgetSettingRange.d.ts +4 -4
  398. package/script/gen/types/WidgetSettingRange.d.ts.map +1 -1
  399. package/script/gen/types/WidgetSettingSelect.d.ts +4 -4
  400. package/script/gen/types/WidgetSettingSelect.d.ts.map +1 -1
  401. package/script/gen/types/WidgetSettingSwitch.d.ts +4 -4
  402. package/script/gen/types/WidgetSettingSwitch.d.ts.map +1 -1
  403. package/script/gen/types/WidgetShortcutDeclaration.d.ts +33 -0
  404. package/script/gen/types/WidgetShortcutDeclaration.d.ts.map +1 -0
  405. package/script/gen/types/WidgetShortcutDeclaration.js +2 -0
  406. package/script/gen/types/WidgetStatus.d.ts +2 -1
  407. package/script/gen/types/WidgetStatus.d.ts.map +1 -1
  408. package/script/gen/types/WidgetStatus.js +1 -0
  409. package/script/gen/types/WindowManagerSettings.d.ts +6 -0
  410. package/script/gen/types/WindowManagerSettings.d.ts.map +1 -1
  411. package/script/gen/types/WlanBssEntry.d.ts +15 -6
  412. package/script/gen/types/WlanBssEntry.d.ts.map +1 -1
  413. package/script/gen/types/mod.d.ts +275 -245
  414. package/script/gen/types/mod.d.ts.map +1 -1
  415. package/script/gen/types/mod.js +275 -245
  416. package/script/gen/types/serde_json/JsonValue.d.ts +4 -0
  417. package/script/gen/types/serde_json/JsonValue.d.ts.map +1 -0
  418. package/script/gen/types/serde_json/JsonValue.js +3 -0
  419. package/script/src/handlers/commands.d.ts +22 -4
  420. package/script/src/handlers/commands.d.ts.map +1 -1
  421. package/script/src/handlers/commands.js +21 -3
  422. package/script/src/handlers/events.d.ts +9 -3
  423. package/script/src/handlers/events.d.ts.map +1 -1
  424. package/script/src/handlers/events.js +8 -2
  425. package/script/src/state/theme/theming.d.ts +1 -0
  426. package/script/src/state/theme/theming.d.ts.map +1 -1
  427. package/script/src/state/theme/theming.js +22 -1
  428. package/script/src/state/widget/interfaces.d.ts +48 -7
  429. package/script/src/state/widget/interfaces.d.ts.map +1 -1
  430. package/script/src/state/widget/mod.d.ts +12 -7
  431. package/script/src/state/widget/mod.d.ts.map +1 -1
  432. package/script/src/state/widget/mod.js +89 -98
  433. package/script/src/state/widget/positioning.js +2 -2
  434. package/script/src/state/widget/sizing.d.ts +14 -3
  435. package/script/src/state/widget/sizing.d.ts.map +1 -1
  436. package/script/src/state/widget/sizing.js +61 -18
  437. package/script/src/system_state/ui_colors.d.ts +0 -1
  438. package/script/src/system_state/ui_colors.d.ts.map +1 -1
  439. package/script/src/system_state/ui_colors.js +5 -22
  440. package/script/src/utils/async.d.ts +12 -0
  441. package/script/src/utils/async.d.ts.map +1 -1
  442. package/script/src/utils/async.js +49 -0
  443. package/script/src/utils/mod.d.ts +2 -0
  444. package/script/src/utils/mod.d.ts.map +1 -1
  445. package/script/src/utils/mod.js +8 -1
  446. package/styles/colors.css +521 -0
  447. package/styles/reset.css +129 -0
  448. package/styles/shadows.css +7 -0
  449. package/styles/spacings.css +9 -0
  450. package/esm/gen/types/SluHotkey.d.ts +0 -17
  451. package/esm/gen/types/SluHotkey.d.ts.map +0 -1
  452. package/esm/gen/types/SluHotkeyAction.d.ts +0 -96
  453. package/esm/gen/types/SluHotkeyAction.d.ts.map +0 -1
  454. package/esm/gen/types/WindowManagerLayout.d.ts +0 -6
  455. package/esm/gen/types/WindowManagerLayout.d.ts.map +0 -1
  456. package/esm/gen/types/WlanProfile.d.ts +0 -8
  457. package/esm/gen/types/WlanProfile.d.ts.map +0 -1
  458. package/esm/gen/types/WmNode.d.ts.map +0 -1
  459. package/esm/gen/types/WmNodeKind.d.ts.map +0 -1
  460. package/esm/gen/types/WmNodeKind.js +0 -8
  461. package/esm/gen/types/WmNodeLifetime.d.ts +0 -5
  462. package/esm/gen/types/WmNodeLifetime.d.ts.map +0 -1
  463. package/esm/gen/types/WmNodeLifetime.js +0 -6
  464. package/esm/gen/types/WmRenderTree.d.ts +0 -6
  465. package/esm/gen/types/WmRenderTree.d.ts.map +0 -1
  466. package/script/gen/types/SluHotkey.d.ts +0 -17
  467. package/script/gen/types/SluHotkey.d.ts.map +0 -1
  468. package/script/gen/types/SluHotkeyAction.d.ts +0 -96
  469. package/script/gen/types/SluHotkeyAction.d.ts.map +0 -1
  470. package/script/gen/types/WindowManagerLayout.d.ts +0 -6
  471. package/script/gen/types/WindowManagerLayout.d.ts.map +0 -1
  472. package/script/gen/types/WlanProfile.d.ts +0 -8
  473. package/script/gen/types/WlanProfile.d.ts.map +0 -1
  474. package/script/gen/types/WmNode.d.ts.map +0 -1
  475. package/script/gen/types/WmNodeKind.d.ts.map +0 -1
  476. package/script/gen/types/WmNodeKind.js +0 -11
  477. package/script/gen/types/WmNodeLifetime.d.ts +0 -5
  478. package/script/gen/types/WmNodeLifetime.d.ts.map +0 -1
  479. package/script/gen/types/WmNodeLifetime.js +0 -9
  480. package/script/gen/types/WmRenderTree.d.ts +0 -6
  481. package/script/gen/types/WmRenderTree.d.ts.map +0 -1
  482. /package/esm/gen/types/{SluHotkeyAction.js → AudioWaveform.js} +0 -0
  483. /package/esm/gen/types/{WlanProfile.js → BackupStatus.js} +0 -0
  484. /package/esm/gen/types/{SluHotkey.js → ClipboardData.js} +0 -0
  485. /package/esm/gen/types/{WindowManagerLayout.js → ClipboardEntry.js} +0 -0
  486. /package/esm/gen/types/{WmNode.js → ContextMenuCallbackPayload.js} +0 -0
  487. /package/esm/gen/types/{WmRenderTree.js → SeelenCommandMoveWindowToWorkspaceArgs.js} +0 -0
  488. /package/script/gen/types/{SluHotkeyAction.js → AudioWaveform.js} +0 -0
  489. /package/script/gen/types/{WlanProfile.js → BackupStatus.js} +0 -0
  490. /package/script/gen/types/{SluHotkey.js → ClipboardData.js} +0 -0
  491. /package/script/gen/types/{WindowManagerLayout.js → ClipboardEntry.js} +0 -0
  492. /package/script/gen/types/{WmNode.js → ContextMenuCallbackPayload.js} +0 -0
  493. /package/script/gen/types/{WmRenderTree.js → SeelenCommandMoveWindowToWorkspaceArgs.js} +0 -0
@@ -45,6 +45,7 @@ const theming_js_1 = require("../theme/theming.js");
45
45
  const performance_js_1 = require("./performance.js");
46
46
  const webview_1 = require("@tauri-apps/api/webview");
47
47
  const window_1 = require("@tauri-apps/api/window");
48
+ const mod_js_4 = require("../../handlers/mod.js");
48
49
  /**
49
50
  * Represents the widget instance running in the current webview
50
51
  */
@@ -75,18 +76,11 @@ class Widget {
75
76
  /** current window where the widget is running */
76
77
  window;
77
78
  autoSizer;
79
+ destroyOnHide = false;
78
80
  runtimeState = {
79
81
  hwnd: 0,
80
82
  initialized: false,
81
83
  ready: false,
82
- position: {
83
- x: 0,
84
- y: 0,
85
- },
86
- size: {
87
- width: 0,
88
- height: 0,
89
- },
90
84
  firstFocus: true,
91
85
  };
92
86
  constructor(widget) {
@@ -108,15 +102,6 @@ class Widget {
108
102
  get windowId() {
109
103
  return this.runtimeState.hwnd;
110
104
  }
111
- /** Returns the current position and size of the widget */
112
- get frame() {
113
- return {
114
- x: this.runtimeState.position.x,
115
- y: this.runtimeState.position.y,
116
- width: this.runtimeState.size.width,
117
- height: this.runtimeState.size.height,
118
- };
119
- }
120
105
  /** Returns the default config of the widget, declared on the widget definition */
121
106
  getDefaultConfig() {
122
107
  const config = { enabled: true };
@@ -125,69 +110,37 @@ class Widget {
125
110
  }
126
111
  return config;
127
112
  }
128
- applyInvisiblePreset() {
129
- return [
130
- this.window.setDecorations(false), // no title bar
131
- this.window.setShadow(false), // no shadows
132
- // hide from native shell
133
- this.window.setSkipTaskbar(true),
134
- // as a (desktop/overlay) widget we don't wanna allow nothing of these
135
- this.window.setMinimizable(false),
136
- this.window.setMaximizable(false),
137
- this.window.setClosable(false),
138
- ];
139
- }
140
113
  /** Will apply the recommended settings for a desktop widget */
141
- async applyDesktopPreset() {
142
- await Promise.all([...this.applyInvisiblePreset(), this.window.setAlwaysOnBottom(true)]);
143
- }
114
+ applyDesktopPreset() { }
144
115
  /** Will apply the recommended settings for an overlay widget */
145
- async applyOverlayPreset() {
146
- await Promise.all([...this.applyInvisiblePreset(), this.window.setAlwaysOnTop(true)]);
147
- }
116
+ applyOverlayPreset() { }
148
117
  /** Will apply the recommended settings for a popup widget */
149
- async applyPopupPreset() {
150
- await Promise.all([...this.applyInvisiblePreset(), this.window.setAlwaysOnTop(true)]);
151
- const hideWidget = (0, async_js_1.debounce)(() => {
152
- this.hide(true);
153
- }, 100);
154
- this.window.onFocusChanged(({ payload: focused }) => {
155
- if (focused) {
156
- hideWidget.cancel();
157
- }
158
- else {
159
- hideWidget();
160
- }
161
- });
118
+ applyPopupPreset() {
162
119
  this.onTrigger(async ({ desiredPosition, alignX, alignY }) => {
163
- // avoid flickering when clicking a button that triggers the widget
164
- hideWidget.cancel();
165
- if (this.autoSizer && alignX && alignY) {
166
- this.autoSizer.originX = alignX;
167
- this.autoSizer.originY = alignY;
168
- }
169
120
  if (desiredPosition) {
170
- const adjusted = (0, positioning_js_1.adjustPositionByPlacement)({
171
- frame: {
172
- x: desiredPosition.x,
173
- y: desiredPosition.y,
174
- width: this.runtimeState.size.width,
175
- height: this.runtimeState.size.height,
176
- },
177
- originX: alignX,
178
- originY: alignY,
179
- });
180
- await this.setPosition({
181
- left: adjusted.x,
182
- top: adjusted.y,
183
- right: adjusted.x + adjusted.width,
184
- bottom: adjusted.y + adjusted.height,
185
- });
121
+ await this.adjustAndSetPosition(desiredPosition.x, desiredPosition.y, alignX, alignY);
186
122
  }
187
123
  await this.show();
188
124
  await this.focus();
189
125
  });
190
126
  }
127
+ hideOnFocusLoss() {
128
+ let wasFocused = false;
129
+ const hideDelayed = (0, async_js_1.debounce)(() => {
130
+ this.hide();
131
+ }, 100);
132
+ (0, mod_js_4.subscribe)(mod_js_2.SeelenEvent.GlobalFocusChanged, ({ payload: focused }) => {
133
+ if (focused.hwnd !== this.runtimeState.hwnd && focused.ownerHwnd !== this.runtimeState.hwnd) {
134
+ if (wasFocused) {
135
+ hideDelayed();
136
+ }
137
+ wasFocused = false;
138
+ return;
139
+ }
140
+ wasFocused = true;
141
+ hideDelayed.cancel();
142
+ });
143
+ }
191
144
  /**
192
145
  * Will restore the saved position and size of the widget on start,
193
146
  * after that will store the position and size of the widget on change.
@@ -223,6 +176,18 @@ class Widget {
223
176
  console.info(`Widget size saved: ${width} ${height}`);
224
177
  }, 500));
225
178
  }
179
+ async normalizeDevicePixelRatio() {
180
+ // play with zoom level to reset device pixel ratio to 1:1
181
+ let oldDPR = globalThis.devicePixelRatio;
182
+ await this.webview.setZoom(1 / oldDPR);
183
+ this.window.onScaleChanged(() => {
184
+ if (globalThis.devicePixelRatio !== oldDPR) {
185
+ // when zoom was set dpr changed, so in case of change this is accomulative unit
186
+ oldDPR = oldDPR * globalThis.devicePixelRatio;
187
+ this.webview.setZoom(1 / (oldDPR * globalThis.devicePixelRatio));
188
+ }
189
+ });
190
+ }
226
191
  /**
227
192
  * Will initialize the widget based on the preset and mark it as `pending`, this function won't show the widget.
228
193
  * This should be called before any other action on the widget. After this you should call
@@ -235,23 +200,30 @@ class Widget {
235
200
  }
236
201
  this.runtimeState.hwnd = await (0, mod_js_2.invoke)(mod_js_2.SeelenCommand.GetSelfWindowId);
237
202
  this.runtimeState.initialized = true;
203
+ this.destroyOnHide = options.closeOnHide ?? this.def.lazy;
204
+ if (options.normalizeDevicePixelRatio) {
205
+ await this.normalizeDevicePixelRatio();
206
+ }
238
207
  if (options.autoSizeByContent) {
239
- this.autoSizer = new sizing_js_1.WidgetAutoSizer(this, options.autoSizeByContent);
208
+ this.autoSizer = new sizing_js_1.WidgetAutoSizer(this, options.autoSizeByContent, options.autoSizeFitOnScreen ?? true);
240
209
  }
241
- else if (options.saveAndRestoreLastRect ?? this.def.preset === mod_js_1.WidgetPreset.Desktop) {
210
+ if (options.saveAndRestoreLastRect ?? this.def.preset === mod_js_1.WidgetPreset.Desktop) {
242
211
  await this.persistPositionAndSize();
243
212
  }
213
+ if (options.hideOnFocusLoss ?? this.def.preset === mod_js_1.WidgetPreset.Popup) {
214
+ this.hideOnFocusLoss();
215
+ }
244
216
  switch (this.def.preset) {
245
217
  case mod_js_1.WidgetPreset.None:
246
218
  break;
247
219
  case mod_js_1.WidgetPreset.Desktop:
248
- await this.applyDesktopPreset();
220
+ this.applyDesktopPreset();
249
221
  break;
250
222
  case mod_js_1.WidgetPreset.Overlay:
251
- await this.applyOverlayPreset();
223
+ this.applyOverlayPreset();
252
224
  break;
253
225
  case mod_js_1.WidgetPreset.Popup:
254
- await this.applyPopupPreset();
226
+ this.applyPopupPreset();
255
227
  break;
256
228
  }
257
229
  await (0, theming_js_1.startThemingTool)();
@@ -262,16 +234,8 @@ class Widget {
262
234
  else {
263
235
  console.trace("Animations won't be disabled because widget configuration");
264
236
  }
265
- // state initialization
266
- this.runtimeState.size = await this.window.outerSize();
267
- this.runtimeState.position = await this.window.outerPosition();
268
- this.window.onResized((e) => {
269
- this.runtimeState.size.width = e.payload.width;
270
- this.runtimeState.size.height = e.payload.height;
271
- });
272
- this.window.onMoved((e) => {
273
- this.runtimeState.position.x = e.payload.x;
274
- this.runtimeState.position.y = e.payload.y;
237
+ await sizing_js_1.OPTIMISTIC_FRAME.runExclusive(async (state) => {
238
+ await state.init(this);
275
239
  });
276
240
  }
277
241
  /**
@@ -293,7 +257,7 @@ class Widget {
293
257
  await this.autoSizer?.execute();
294
258
  if (show && !(await this.window.isVisible())) {
295
259
  await this.show();
296
- await this.focus();
260
+ // await this.focus();
297
261
  }
298
262
  // this will mark the widget as ready, and send pending trigger event if exists
299
263
  await (0, mod_js_2.invoke)(mod_js_2.SeelenCommand.SetCurrentWidgetStatus, { status: mod_js_1.WidgetStatus.Ready });
@@ -303,13 +267,8 @@ class Widget {
303
267
  cb(payload);
304
268
  });
305
269
  }
306
- /** If animations are enabled this will animate the movement of the widget */
307
- setPosition(rect) {
308
- this.runtimeState.position.x = rect.left;
309
- this.runtimeState.position.y = rect.top;
310
- this.runtimeState.size.width = rect.right - rect.left;
311
- this.runtimeState.size.height = rect.bottom - rect.top;
312
- return (0, mod_js_2.invoke)(mod_js_2.SeelenCommand.SetSelfPosition, {
270
+ async __unsafe_setPosition(rect, ref) {
271
+ await (0, mod_js_2.invoke)(mod_js_2.SeelenCommand.SetSelfPosition, {
313
272
  rect: {
314
273
  left: Math.round(rect.left),
315
274
  top: Math.round(rect.top),
@@ -317,6 +276,40 @@ class Widget {
317
276
  bottom: Math.round(rect.bottom),
318
277
  },
319
278
  });
279
+ // optimistically update state, as arrived event after change is async
280
+ ref.x = rect.left;
281
+ ref.y = rect.top;
282
+ ref.width = rect.right - rect.left;
283
+ ref.height = rect.bottom - rect.top;
284
+ }
285
+ /**
286
+ * This will adjust the position of the widget based on the current placement and alignX/alignY arguments.
287
+ * This makes the widget fit into the monitor where it was placed, avoiding monitor overflow.
288
+ */
289
+ async adjustAndSetPosition(x, y, alignX, alignY) {
290
+ await sizing_js_1.OPTIMISTIC_FRAME.runExclusive(async (ref) => {
291
+ const adjusted = (0, positioning_js_1.adjustPositionByPlacement)({
292
+ frame: {
293
+ x,
294
+ y,
295
+ width: ref.width,
296
+ height: ref.height,
297
+ },
298
+ originX: alignX,
299
+ originY: alignY,
300
+ });
301
+ await Widget.self.__unsafe_setPosition({
302
+ left: adjusted.x,
303
+ top: adjusted.y,
304
+ right: adjusted.x + adjusted.width,
305
+ bottom: adjusted.y + adjusted.height,
306
+ }, ref);
307
+ });
308
+ }
309
+ async setPosition(rect) {
310
+ await sizing_js_1.OPTIMISTIC_FRAME.runExclusive(async (frame) => {
311
+ await this.__unsafe_setPosition(rect, frame);
312
+ });
320
313
  }
321
314
  async show() {
322
315
  debouncedClose.cancel();
@@ -328,13 +321,11 @@ class Widget {
328
321
  await (0, webview_1.getCurrentWebview)().setFocus();
329
322
  this.runtimeState.firstFocus = false;
330
323
  }
331
- await (0, mod_js_2.invoke)(mod_js_2.SeelenCommand.RequestFocus, { hwnd: this.runtimeState.hwnd }).catch(() => {
332
- console.warn(`Failed to focus widget: ${this.decoded.label}`);
333
- });
324
+ await (0, mod_js_2.invoke)(mod_js_2.SeelenCommand.RequestFocus, { hwnd: this.runtimeState.hwnd }).catch(() => { });
334
325
  }
335
- hide(closeAfterInactivity) {
326
+ hide() {
336
327
  this.window.hide();
337
- if (closeAfterInactivity) {
328
+ if (this.destroyOnHide) {
338
329
  debouncedClose();
339
330
  }
340
331
  }
@@ -5,13 +5,13 @@ exports.adjustPositionByPlacement = adjustPositionByPlacement;
5
5
  exports.fitIntoMonitor = fitIntoMonitor;
6
6
  const mod_js_1 = require("../../../gen/types/mod.js");
7
7
  const mod_js_2 = require("../../handlers/mod.js");
8
- const lib_js_1 = require("../../lib.js");
8
+ const commands_js_1 = require("../../handlers/commands.js");
9
9
  const events_js_1 = require("../../handlers/events.js");
10
10
  const monitors = {
11
11
  value: [],
12
12
  };
13
13
  async function initMonitorsState() {
14
- monitors.value = await (0, mod_js_2.invoke)(lib_js_1.SeelenCommand.SystemGetMonitors);
14
+ monitors.value = await (0, mod_js_2.invoke)(commands_js_1.SeelenCommand.SystemGetMonitors);
15
15
  (0, mod_js_2.subscribe)(events_js_1.SeelenEvent.SystemMonitorsChanged, ({ payload }) => {
16
16
  monitors.value = payload;
17
17
  });
@@ -1,14 +1,25 @@
1
1
  import type { Widget } from "./mod.js";
2
2
  import { Alignment } from "../../../gen/types/mod.js";
3
+ import { Mutex } from "../../utils/async.js";
4
+ declare class OptimisiticFrame {
5
+ x: number;
6
+ y: number;
7
+ width: number;
8
+ height: number;
9
+ init(widget: Widget): Promise<void>;
10
+ }
11
+ export declare const OPTIMISTIC_FRAME: Mutex<OptimisiticFrame>;
3
12
  export declare class WidgetAutoSizer {
4
13
  private widget;
5
14
  private element;
15
+ private fitOnScreen;
6
16
  /** From which side the widget will grow */
7
- originX: Alignment;
17
+ originX?: Alignment | null;
8
18
  /** From which side the widget will grow */
9
- originY: Alignment;
10
- constructor(widget: Widget, element: HTMLElement);
19
+ originY?: Alignment | null;
20
+ constructor(widget: Widget, element: HTMLElement, fitOnScreen: boolean);
11
21
  private setup;
12
22
  execute(): Promise<void>;
13
23
  }
24
+ export {};
14
25
  //# sourceMappingURL=sizing.d.ts.map
@@ -1 +1 @@
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
+ {"version":3,"file":"sizing.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/sizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAG7C,cAAM,gBAAgB;IACpB,CAAC,EAAE,MAAM,CAAK;IACd,CAAC,EAAE,MAAM,CAAK;IACd,KAAK,EAAE,MAAM,CAAK;IAClB,MAAM,EAAE,MAAM,CAAK;IAEb,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAuB1C;AAED,eAAO,MAAM,gBAAgB,yBAAoC,CAAC;AAElE,qBAAa,eAAe;IAOxB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,WAAW;IARrB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;gBAGjB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,OAAO;IAM9B,OAAO,CAAC,KAAK;IAqBP,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAsD/B"}
@@ -1,24 +1,60 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WidgetAutoSizer = void 0;
4
- const dpi_1 = require("@tauri-apps/api/dpi");
3
+ exports.WidgetAutoSizer = exports.OPTIMISTIC_FRAME = void 0;
5
4
  const mod_js_1 = require("../../../gen/types/mod.js");
5
+ const async_js_1 = require("../../utils/async.js");
6
+ const positioning_js_1 = require("./positioning.js");
7
+ class OptimisiticFrame {
8
+ x = 0;
9
+ y = 0;
10
+ width = 0;
11
+ height = 0;
12
+ async init(widget) {
13
+ const { width, height } = await widget.window.outerSize();
14
+ const { x, y } = await widget.window.outerPosition();
15
+ this.width = width;
16
+ this.height = height;
17
+ this.x = x;
18
+ this.y = y;
19
+ widget.window.onResized((e) => {
20
+ exports.OPTIMISTIC_FRAME.runExclusive((ref) => {
21
+ ref.width = e.payload.width;
22
+ ref.height = e.payload.height;
23
+ });
24
+ });
25
+ widget.window.onMoved((e) => {
26
+ exports.OPTIMISTIC_FRAME.runExclusive((ref) => {
27
+ ref.x = e.payload.x;
28
+ ref.y = e.payload.y;
29
+ });
30
+ });
31
+ }
32
+ }
33
+ exports.OPTIMISTIC_FRAME = new async_js_1.Mutex(new OptimisiticFrame());
6
34
  class WidgetAutoSizer {
7
35
  widget;
8
36
  element;
37
+ fitOnScreen;
9
38
  /** From which side the widget will grow */
10
- originX = mod_js_1.Alignment.Start;
39
+ originX;
11
40
  /** From which side the widget will grow */
12
- originY = mod_js_1.Alignment.Start;
13
- constructor(widget, element) {
41
+ originY;
42
+ constructor(widget, element, fitOnScreen) {
14
43
  this.widget = widget;
15
44
  this.element = element;
45
+ this.fitOnScreen = fitOnScreen;
16
46
  this.execute = this.execute.bind(this);
17
47
  this.setup();
18
48
  }
19
49
  setup() {
20
50
  // Disable resizing by the user
21
51
  this.widget.window.setResizable(false);
52
+ this.widget.onTrigger(({ alignX, alignY }) => {
53
+ exports.OPTIMISTIC_FRAME.runExclusive(() => {
54
+ this.originX = alignX;
55
+ this.originY = alignY;
56
+ });
57
+ });
22
58
  const observer = new ResizeObserver(this.execute);
23
59
  observer.observe(this.element, {
24
60
  box: "border-box",
@@ -28,8 +64,9 @@ class WidgetAutoSizer {
28
64
  };
29
65
  }
30
66
  async execute() {
31
- const { x, y, width, height } = this.widget.frame;
32
- const frame = {
67
+ const guard = await exports.OPTIMISTIC_FRAME.acquire();
68
+ const { x, y, width, height } = guard.value;
69
+ let frame = {
33
70
  x,
34
71
  y,
35
72
  width: Math.ceil(this.element.scrollWidth * globalThis.window.devicePixelRatio),
@@ -39,9 +76,12 @@ class WidgetAutoSizer {
39
76
  const heightDiff = frame.height - height;
40
77
  // Only update if the difference is more than 1px (avoid infinite loops from decimal differences)
41
78
  if (widthDiff === 0 && heightDiff === 0) {
79
+ guard.release();
42
80
  return;
43
81
  }
44
- console.trace(`Auto resize from ${width}x${height} to ${frame.width}x${frame.height}`);
82
+ /* console.debug(
83
+ `Auto resizing from ${width}x${height} to ${frame.width}x${frame.height} using ${this.originX}/${this.originY} origin`,
84
+ ); */
45
85
  if (this.originX === mod_js_1.Alignment.Center) {
46
86
  frame.x -= widthDiff / 2;
47
87
  }
@@ -54,17 +94,20 @@ class WidgetAutoSizer {
54
94
  else if (this.originY === mod_js_1.Alignment.End) {
55
95
  frame.y -= heightDiff;
56
96
  }
57
- // only update size no position on this case
58
- if (frame.x === x && frame.y === y) {
59
- await this.widget.window.setSize(new dpi_1.PhysicalSize(frame.width, frame.height));
60
- return;
97
+ if (this.fitOnScreen) {
98
+ frame = (0, positioning_js_1.fitIntoMonitor)(frame);
99
+ }
100
+ try {
101
+ await this.widget.__unsafe_setPosition({
102
+ left: frame.x,
103
+ top: frame.y,
104
+ right: frame.x + frame.width,
105
+ bottom: frame.y + frame.height,
106
+ }, guard.value);
107
+ }
108
+ finally {
109
+ guard.release();
61
110
  }
62
- await this.widget.setPosition({
63
- left: frame.x,
64
- top: frame.y,
65
- right: frame.x + frame.width,
66
- bottom: frame.y + frame.height,
67
- });
68
111
  }
69
112
  }
70
113
  exports.WidgetAutoSizer = WidgetAutoSizer;
@@ -5,7 +5,6 @@ export declare class UIColors {
5
5
  constructor(inner: IUIColors);
6
6
  static getAsync(): Promise<UIColors>;
7
7
  static onChange(cb: (payload: UIColors) => void): Promise<UnSubscriber>;
8
- static default(): UIColors;
9
8
  setAsCssVariables(): void;
10
9
  }
11
10
  export interface Color extends IColor {
@@ -1 +1 @@
1
- {"version":3,"file":"ui_colors.d.ts","sourceRoot":"","sources":["../../../src/src/system_state/ui_colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGnF,OAAO,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAErF,qBAAa,QAAQ;IACA,KAAK,EAAE,SAAS;gBAAhB,KAAK,EAAE,SAAS;IAEnC,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IAIpC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;IAIvE,MAAM,CAAC,OAAO,IAAI,QAAQ;IAe1B,iBAAiB,IAAI,IAAI;CA2B1B;AAED,MAAM,WAAW,KAAM,SAAQ,MAAM;CAAG;AAExC,qBAAa,KAAK;gBACJ,GAAG,EAAE,MAAM;IAOvB,qCAAqC;IACrC,MAAM,CAAC,MAAM,IAAI,KAAK;IAStB,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK;IAyBlC,WAAW,IAAI,MAAM;IAUrB,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,oBAAoB;IAkB5B;;;;;OAKG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAWpC;;;;;OAKG;IACH,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM;IAYzC,aAAa,IAAI,KAAK;CAQvB"}
1
+ {"version":3,"file":"ui_colors.d.ts","sourceRoot":"","sources":["../../../src/src/system_state/ui_colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGnF,OAAO,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAErF,qBAAa,QAAQ;IACA,KAAK,EAAE,SAAS;gBAAhB,KAAK,EAAE,SAAS;IAEnC,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IAIpC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;IAIvE,iBAAiB,IAAI,IAAI;CAuB1B;AAED,MAAM,WAAW,KAAM,SAAQ,MAAM;CAAG;AAExC,qBAAa,KAAK;gBACJ,GAAG,EAAE,MAAM;IAOvB,qCAAqC;IACrC,MAAM,CAAC,MAAM,IAAI,KAAK;IAStB,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK;IAyBlC,WAAW,IAAI,MAAM;IAUrB,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,oBAAoB;IAkB5B;;;;;OAKG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAWpC;;;;;OAKG;IACH,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM;IAYzC,aAAa,IAAI,KAAK;CAQvB"}
@@ -15,36 +15,19 @@ class UIColors {
15
15
  static onChange(cb) {
16
16
  return (0, State_js_1.newOnEvent)(cb, this, mod_js_1.SeelenEvent.ColorsChanged);
17
17
  }
18
- static default() {
19
- return new this({
20
- background: "#ffffff",
21
- foreground: "#000000",
22
- accent_darkest: "#990000",
23
- accent_darker: "#aa0000",
24
- accent_dark: "#bb0000",
25
- accent: "#cc0000",
26
- accent_light: "#dd0000",
27
- accent_lighter: "#ee0000",
28
- accent_lightest: "#ff0000",
29
- complement: null,
30
- });
31
- }
32
18
  setAsCssVariables() {
33
19
  const oldStyles = new DOM_js_1.RuntimeStyleSheet("@deprecated/system-colors");
34
20
  const newStyles = new DOM_js_1.RuntimeStyleSheet("@runtime/system-colors");
35
- for (const [key, value] of Object.entries(this.inner)) {
36
- if (typeof value !== "string") {
37
- continue;
38
- }
39
- const color = Color.fromHex(value);
40
- const { r, g, b } = color;
21
+ for (const [key, _color] of Object.entries(this.inner)) {
22
+ const color = new Color(_color);
23
+ const { r, g, b } = _color;
41
24
  // replace rust snake case with kebab case
42
25
  const name = key.replace("_", "-");
43
26
  // @deprecated old names
44
- oldStyles.addVariable(`--config-${name}-color`, value.slice(0, 7));
27
+ oldStyles.addVariable(`--config-${name}-color`, color.toHexString());
45
28
  oldStyles.addVariable(`--config-${name}-color-rgb`, `${r}, ${g}, ${b}`);
46
29
  if (name.startsWith("accent")) {
47
- newStyles.addVariable(`--system-${name}-color`, value.slice(0, 7));
30
+ newStyles.addVariable(`--system-${name}-color`, color.toHexString());
48
31
  }
49
32
  }
50
33
  oldStyles.applyToDocument();
@@ -5,4 +5,16 @@ export interface DebouncedFunction<T extends (...args: any[]) => any> {
5
5
  pending(): boolean;
6
6
  }
7
7
  export declare function debounce<T extends (...args: any[]) => any>(fn: T, delay: number): DebouncedFunction<T>;
8
+ export declare class Mutex<T> {
9
+ private _rawValue;
10
+ constructor(_rawValue: T);
11
+ private lock;
12
+ acquire(): Promise<Guard<T>>;
13
+ runExclusive<U>(fn: (v: T) => U): Promise<U>;
14
+ }
15
+ export declare class Guard<T> {
16
+ value: T;
17
+ release: () => void;
18
+ constructor(value: T, release: () => void);
19
+ }
8
20
  //# sourceMappingURL=async.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../src/src/utils/async.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG;IAClE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/B,MAAM,IAAI,IAAI,CAAC;IACf,KAAK,IAAI,IAAI,CAAC;IACd,OAAO,IAAI,OAAO,CAAC;CACpB;AAGD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,EAAE,EAAE,CAAC,EACL,KAAK,EAAE,MAAM,GACZ,iBAAiB,CAAC,CAAC,CAAC,CA6CtB"}
1
+ {"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../src/src/utils/async.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG;IAClE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/B,MAAM,IAAI,IAAI,CAAC;IACf,KAAK,IAAI,IAAI,CAAC;IACd,OAAO,IAAI,OAAO,CAAC;CACpB;AAGD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,EAAE,EAAE,CAAC,EACL,KAAK,EAAE,MAAM,GACZ,iBAAiB,CAAC,CAAC,CAAC,CA6CtB;AAED,qBAAa,KAAK,CAAC,CAAC;IACN,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,CAAC;IAEhC,OAAO,CAAC,IAAI,CAII;IAEV,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IA0B5B,YAAY,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAQnD;AAED,qBAAa,KAAK,CAAC,CAAC;IAET,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,MAAM,IAAI;gBADnB,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,MAAM,IAAI;CAE7B"}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Guard = exports.Mutex = void 0;
3
4
  exports.debounce = debounce;
4
5
  // deno-lint-ignore no-explicit-any
5
6
  function debounce(fn, delay) {
@@ -40,3 +41,51 @@ function debounce(fn, delay) {
40
41
  };
41
42
  return debounced;
42
43
  }
44
+ class Mutex {
45
+ _rawValue;
46
+ constructor(_rawValue) {
47
+ this._rawValue = _rawValue;
48
+ }
49
+ lock = null;
50
+ async acquire() {
51
+ if (this.lock) {
52
+ await this.lock.__promise;
53
+ }
54
+ // deno-lint-ignore no-explicit-any
55
+ let __resolve;
56
+ // deno-lint-ignore no-explicit-any
57
+ let __reject;
58
+ const __promise = new Promise((resolve, reject) => {
59
+ __resolve = resolve;
60
+ __reject = reject;
61
+ });
62
+ this.lock = {
63
+ __promise,
64
+ __resolve,
65
+ __reject,
66
+ };
67
+ return new Guard(this._rawValue, () => {
68
+ this.lock = null;
69
+ __resolve();
70
+ });
71
+ }
72
+ async runExclusive(fn) {
73
+ const guard = await this.acquire();
74
+ try {
75
+ return await fn(guard.value);
76
+ }
77
+ finally {
78
+ guard.release();
79
+ }
80
+ }
81
+ }
82
+ exports.Mutex = Mutex;
83
+ class Guard {
84
+ value;
85
+ release;
86
+ constructor(value, release) {
87
+ this.value = value;
88
+ this.release = release;
89
+ }
90
+ }
91
+ exports.Guard = Guard;
@@ -4,4 +4,6 @@ export declare class Rect {
4
4
  right: number;
5
5
  bottom: number;
6
6
  }
7
+ export declare function isSeelenUIRuntime(): boolean;
8
+ export { RuntimeStyleSheet } from "./DOM.js";
7
9
  //# sourceMappingURL=mod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/utils/mod.ts"],"names":[],"mappings":"AAAA,qBAAa,IAAI;IACf,IAAI,SAAK;IACT,GAAG,SAAK;IACR,KAAK,SAAK;IACV,MAAM,SAAK;CACZ"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/utils/mod.ts"],"names":[],"mappings":"AAAA,qBAAa,IAAI;IACf,IAAI,SAAK;IACT,GAAG,SAAK;IACR,KAAK,SAAK;IACV,MAAM,SAAK;CACZ;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAG3C;AAED,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Rect = void 0;
3
+ exports.RuntimeStyleSheet = exports.Rect = void 0;
4
+ exports.isSeelenUIRuntime = isSeelenUIRuntime;
4
5
  class Rect {
5
6
  left = 0;
6
7
  top = 0;
@@ -8,3 +9,9 @@ class Rect {
8
9
  bottom = 0;
9
10
  }
10
11
  exports.Rect = Rect;
12
+ function isSeelenUIRuntime() {
13
+ // deno-lint-ignore no-explicit-any
14
+ return !!globalThis.window.__SLU_WIDGET;
15
+ }
16
+ var DOM_js_1 = require("./DOM.js");
17
+ Object.defineProperty(exports, "RuntimeStyleSheet", { enumerable: true, get: function () { return DOM_js_1.RuntimeStyleSheet; } });