@seelen-ui/lib 2.5.8 → 2.5.9
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.
- package/esm/gen/types/AppNotification.d.ts +3 -0
- package/esm/gen/types/AppNotification.d.ts.map +1 -1
- package/esm/gen/types/BackupStatus.d.ts +10 -0
- package/esm/gen/types/BackupStatus.d.ts.map +1 -0
- package/esm/gen/types/BluetoothDevice.d.ts +1 -0
- package/esm/gen/types/BluetoothDevice.d.ts.map +1 -1
- package/esm/gen/types/ClipboardData.d.ts +15 -0
- package/esm/gen/types/ClipboardData.d.ts.map +1 -0
- package/esm/gen/types/ClipboardEntry.d.ts +24 -0
- package/esm/gen/types/ClipboardEntry.d.ts.map +1 -0
- package/esm/gen/types/ClipboardEntry.js +1 -0
- package/esm/gen/types/ClipboardEntryContent.d.ts +16 -0
- package/esm/gen/types/ClipboardEntryContent.d.ts.map +1 -0
- package/esm/gen/types/FancyToolbarSettings.d.ts +6 -0
- package/esm/gen/types/FancyToolbarSettings.d.ts.map +1 -1
- package/esm/gen/types/NotificationsMode.d.ts +6 -0
- package/esm/gen/types/NotificationsMode.d.ts.map +1 -0
- package/esm/gen/types/NotificationsMode.js +7 -0
- package/esm/gen/types/ResolvedShortcut.d.ts +9 -0
- package/esm/gen/types/ResolvedShortcut.d.ts.map +1 -0
- package/esm/gen/types/ResolvedShortcut.js +2 -0
- package/esm/gen/types/ResourceId.d.ts +6 -2
- package/esm/gen/types/ResourceId.d.ts.map +1 -1
- package/esm/gen/types/SeelenCommandActivateNotificationArgs.d.ts +3 -0
- package/esm/gen/types/SeelenCommandActivateNotificationArgs.d.ts.map +1 -1
- package/esm/gen/types/SeelenCommandActivateNotificationArgs.js +0 -1
- package/esm/gen/types/SeelenCommandArgument.d.ts +36 -5
- package/esm/gen/types/SeelenCommandArgument.d.ts.map +1 -1
- package/esm/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts +4 -0
- package/esm/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandClipboardDeleteEntryArgs.js +2 -0
- package/esm/gen/types/SeelenCommandClipboardPasteArgs.d.ts +4 -0
- package/esm/gen/types/SeelenCommandClipboardPasteArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandClipboardPasteArgs.js +2 -0
- package/esm/gen/types/SeelenCommandClipboardSetContentArgs.d.ts +4 -0
- package/esm/gen/types/SeelenCommandClipboardSetContentArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandClipboardSetContentArgs.js +2 -0
- package/esm/gen/types/SeelenCommandConnectBluetoothDeviceArgs.d.ts +4 -0
- package/esm/gen/types/SeelenCommandConnectBluetoothDeviceArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandConnectBluetoothDeviceArgs.js +2 -0
- package/esm/gen/types/SeelenCommandReturn.d.ts +34 -6
- package/esm/gen/types/SeelenCommandReturn.d.ts.map +1 -1
- package/esm/gen/types/SeelenCommandSetFocusAssistArgs.d.ts +4 -0
- package/esm/gen/types/SeelenCommandSetFocusAssistArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandSetFocusAssistArgs.js +2 -0
- package/esm/gen/types/SeelenCommandSetNotificationsModeArgs.d.ts +5 -0
- package/esm/gen/types/SeelenCommandSetNotificationsModeArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandSetNotificationsModeArgs.js +1 -0
- package/esm/gen/types/SeelenCommandWlanForgetArgs.d.ts +4 -0
- package/esm/gen/types/SeelenCommandWlanForgetArgs.d.ts.map +1 -0
- package/esm/gen/types/SeelenCommandWlanForgetArgs.js +2 -0
- package/esm/gen/types/SeelenEventPayload.d.ts +16 -2
- package/esm/gen/types/SeelenEventPayload.d.ts.map +1 -1
- package/esm/gen/types/SeelenFont.d.ts +4 -0
- package/esm/gen/types/SeelenFont.d.ts.map +1 -0
- package/esm/gen/types/SeelenFont.js +2 -0
- package/esm/gen/types/SeelenWallSettings.d.ts +6 -0
- package/esm/gen/types/SeelenWallSettings.d.ts.map +1 -1
- package/esm/gen/types/SeelenWegSettings.d.ts +11 -0
- package/esm/gen/types/SeelenWegSettings.d.ts.map +1 -1
- package/esm/gen/types/Settings.d.ts +4 -0
- package/esm/gen/types/Settings.d.ts.map +1 -1
- package/esm/gen/types/SettingsByWidget.d.ts +7 -0
- package/esm/gen/types/SettingsByWidget.d.ts.map +1 -1
- package/esm/gen/types/SluShortcutsSettings.d.ts +9 -2
- package/esm/gen/types/SluShortcutsSettings.d.ts.map +1 -1
- package/esm/gen/types/SluShortcutsSettings.js +1 -0
- package/esm/gen/types/SystemShortcutDeclaration.d.ts +16 -0
- package/esm/gen/types/SystemShortcutDeclaration.d.ts.map +1 -0
- package/esm/gen/types/SystemShortcutDeclaration.js +2 -0
- package/esm/gen/types/ThemeConfigDefinition.d.ts +2 -4
- package/esm/gen/types/ThemeConfigDefinition.d.ts.map +1 -1
- package/esm/gen/types/ThemeConfigGroupVariant.d.ts +5 -0
- package/esm/gen/types/ThemeConfigGroupVariant.d.ts.map +1 -0
- package/esm/gen/types/ThemeConfigGroupVariant.js +1 -0
- package/esm/gen/types/ThemeVariableDefinition.d.ts +2 -0
- package/esm/gen/types/ThemeVariableDefinition.d.ts.map +1 -1
- package/esm/gen/types/ThirdPartyWidgetSettings.d.ts +7 -0
- package/esm/gen/types/ThirdPartyWidgetSettings.d.ts.map +1 -1
- package/esm/gen/types/WegMiddleClickAction.d.ts +5 -0
- package/esm/gen/types/WegMiddleClickAction.d.ts.map +1 -0
- package/esm/gen/types/WegMiddleClickAction.js +6 -0
- package/esm/gen/types/Widget.d.ts +7 -0
- package/esm/gen/types/Widget.d.ts.map +1 -1
- package/esm/gen/types/WidgetConfigDefinition.d.ts +2 -4
- package/esm/gen/types/WidgetConfigDefinition.d.ts.map +1 -1
- package/esm/gen/types/WidgetConfigGroupVariant.d.ts +5 -0
- package/esm/gen/types/WidgetConfigGroupVariant.d.ts.map +1 -0
- package/esm/gen/types/WidgetConfigGroupVariant.js +1 -0
- package/esm/gen/types/WidgetSelectOption.d.ts +1 -1
- package/esm/gen/types/WidgetSelectOption.d.ts.map +1 -1
- package/esm/gen/types/WidgetSettingColor.d.ts +4 -4
- package/esm/gen/types/WidgetSettingColor.d.ts.map +1 -1
- package/esm/gen/types/WidgetSettingFont.d.ts +34 -0
- package/esm/gen/types/WidgetSettingFont.d.ts.map +1 -0
- package/esm/gen/types/WidgetSettingFont.js +1 -0
- package/esm/gen/types/WidgetSettingInputNumber.d.ts +4 -4
- package/esm/gen/types/WidgetSettingInputNumber.d.ts.map +1 -1
- package/esm/gen/types/WidgetSettingInputText.d.ts +4 -4
- package/esm/gen/types/WidgetSettingInputText.d.ts.map +1 -1
- package/esm/gen/types/WidgetSettingItem.d.ts +4 -1
- package/esm/gen/types/WidgetSettingItem.d.ts.map +1 -1
- package/esm/gen/types/WidgetSettingRange.d.ts +4 -4
- package/esm/gen/types/WidgetSettingRange.d.ts.map +1 -1
- package/esm/gen/types/WidgetSettingSelect.d.ts +4 -4
- package/esm/gen/types/WidgetSettingSelect.d.ts.map +1 -1
- package/esm/gen/types/WidgetSettingSwitch.d.ts +4 -4
- package/esm/gen/types/WidgetSettingSwitch.d.ts.map +1 -1
- package/esm/gen/types/WidgetShortcutDeclaration.d.ts +33 -0
- package/esm/gen/types/WidgetShortcutDeclaration.d.ts.map +1 -0
- package/esm/gen/types/WidgetShortcutDeclaration.js +1 -0
- package/esm/gen/types/WindowManagerSettings.d.ts +6 -0
- package/esm/gen/types/WindowManagerSettings.d.ts.map +1 -1
- package/esm/gen/types/WlanBssEntry.d.ts +15 -6
- package/esm/gen/types/WlanBssEntry.d.ts.map +1 -1
- package/esm/gen/types/mod.d.ts +264 -247
- package/esm/gen/types/mod.d.ts.map +1 -1
- package/esm/gen/types/mod.js +264 -247
- package/esm/src/handlers/commands.d.ts +16 -4
- package/esm/src/handlers/commands.d.ts.map +1 -1
- package/esm/src/handlers/commands.js +15 -3
- package/esm/src/handlers/events.d.ts +7 -2
- package/esm/src/handlers/events.d.ts.map +1 -1
- package/esm/src/handlers/events.js +6 -1
- package/esm/src/state/theme/theming.d.ts +1 -0
- package/esm/src/state/theme/theming.d.ts.map +1 -1
- package/esm/src/state/theme/theming.js +21 -1
- package/esm/src/state/widget/interfaces.d.ts +11 -0
- package/esm/src/state/widget/interfaces.d.ts.map +1 -1
- package/esm/src/state/widget/mod.d.ts +9 -6
- package/esm/src/state/widget/mod.d.ts.map +1 -1
- package/esm/src/state/widget/mod.js +62 -79
- package/esm/src/state/widget/positioning.js +1 -1
- package/esm/src/state/widget/sizing.d.ts +14 -3
- package/esm/src/state/widget/sizing.d.ts.map +1 -1
- package/esm/src/state/widget/sizing.js +60 -17
- package/esm/src/utils/async.d.ts +12 -0
- package/esm/src/utils/async.d.ts.map +1 -1
- package/esm/src/utils/async.js +46 -0
- package/esm/src/utils/mod.d.ts +1 -0
- package/esm/src/utils/mod.d.ts.map +1 -1
- package/esm/src/utils/mod.js +4 -0
- package/package.json +4 -3
- package/script/gen/types/AppNotification.d.ts +3 -0
- package/script/gen/types/AppNotification.d.ts.map +1 -1
- package/script/gen/types/BackupStatus.d.ts +10 -0
- package/script/gen/types/BackupStatus.d.ts.map +1 -0
- package/script/gen/types/BluetoothDevice.d.ts +1 -0
- package/script/gen/types/BluetoothDevice.d.ts.map +1 -1
- package/script/gen/types/ClipboardData.d.ts +15 -0
- package/script/gen/types/ClipboardData.d.ts.map +1 -0
- package/script/gen/types/ClipboardEntry.d.ts +24 -0
- package/script/gen/types/ClipboardEntry.d.ts.map +1 -0
- package/script/gen/types/ClipboardEntry.js +2 -0
- package/script/gen/types/ClipboardEntryContent.d.ts +16 -0
- package/script/gen/types/ClipboardEntryContent.d.ts.map +1 -0
- package/script/gen/types/FancyToolbarSettings.d.ts +6 -0
- package/script/gen/types/FancyToolbarSettings.d.ts.map +1 -1
- package/script/gen/types/NotificationsMode.d.ts +6 -0
- package/script/gen/types/NotificationsMode.d.ts.map +1 -0
- package/script/gen/types/NotificationsMode.js +10 -0
- package/script/gen/types/ResolvedShortcut.d.ts +9 -0
- package/script/gen/types/ResolvedShortcut.d.ts.map +1 -0
- package/script/gen/types/ResolvedShortcut.js +3 -0
- package/script/gen/types/ResourceId.d.ts +6 -2
- package/script/gen/types/ResourceId.d.ts.map +1 -1
- package/script/gen/types/SeelenCommandActivateNotificationArgs.d.ts +3 -0
- package/script/gen/types/SeelenCommandActivateNotificationArgs.d.ts.map +1 -1
- package/script/gen/types/SeelenCommandActivateNotificationArgs.js +0 -1
- package/script/gen/types/SeelenCommandArgument.d.ts +36 -5
- package/script/gen/types/SeelenCommandArgument.d.ts.map +1 -1
- package/script/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts +4 -0
- package/script/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandClipboardDeleteEntryArgs.js +3 -0
- package/script/gen/types/SeelenCommandClipboardPasteArgs.d.ts +4 -0
- package/script/gen/types/SeelenCommandClipboardPasteArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandClipboardPasteArgs.js +3 -0
- package/script/gen/types/SeelenCommandClipboardSetContentArgs.d.ts +4 -0
- package/script/gen/types/SeelenCommandClipboardSetContentArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandClipboardSetContentArgs.js +3 -0
- package/script/gen/types/SeelenCommandConnectBluetoothDeviceArgs.d.ts +4 -0
- package/script/gen/types/SeelenCommandConnectBluetoothDeviceArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandConnectBluetoothDeviceArgs.js +3 -0
- package/script/gen/types/SeelenCommandReturn.d.ts +34 -6
- package/script/gen/types/SeelenCommandReturn.d.ts.map +1 -1
- package/script/gen/types/SeelenCommandSetFocusAssistArgs.d.ts +4 -0
- package/script/gen/types/SeelenCommandSetFocusAssistArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandSetFocusAssistArgs.js +3 -0
- package/script/gen/types/SeelenCommandSetNotificationsModeArgs.d.ts +5 -0
- package/script/gen/types/SeelenCommandSetNotificationsModeArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandSetNotificationsModeArgs.js +2 -0
- package/script/gen/types/SeelenCommandWlanForgetArgs.d.ts +4 -0
- package/script/gen/types/SeelenCommandWlanForgetArgs.d.ts.map +1 -0
- package/script/gen/types/SeelenCommandWlanForgetArgs.js +3 -0
- package/script/gen/types/SeelenEventPayload.d.ts +16 -2
- package/script/gen/types/SeelenEventPayload.d.ts.map +1 -1
- package/script/gen/types/SeelenFont.d.ts +4 -0
- package/script/gen/types/SeelenFont.d.ts.map +1 -0
- package/script/gen/types/SeelenFont.js +3 -0
- package/script/gen/types/SeelenWallSettings.d.ts +6 -0
- package/script/gen/types/SeelenWallSettings.d.ts.map +1 -1
- package/script/gen/types/SeelenWegSettings.d.ts +11 -0
- package/script/gen/types/SeelenWegSettings.d.ts.map +1 -1
- package/script/gen/types/Settings.d.ts +4 -0
- package/script/gen/types/Settings.d.ts.map +1 -1
- package/script/gen/types/SettingsByWidget.d.ts +7 -0
- package/script/gen/types/SettingsByWidget.d.ts.map +1 -1
- package/script/gen/types/SluShortcutsSettings.d.ts +9 -2
- package/script/gen/types/SluShortcutsSettings.d.ts.map +1 -1
- package/script/gen/types/SluShortcutsSettings.js +1 -0
- package/script/gen/types/SystemShortcutDeclaration.d.ts +16 -0
- package/script/gen/types/SystemShortcutDeclaration.d.ts.map +1 -0
- package/script/gen/types/SystemShortcutDeclaration.js +3 -0
- package/script/gen/types/ThemeConfigDefinition.d.ts +2 -4
- package/script/gen/types/ThemeConfigDefinition.d.ts.map +1 -1
- package/script/gen/types/ThemeConfigGroupVariant.d.ts +5 -0
- package/script/gen/types/ThemeConfigGroupVariant.d.ts.map +1 -0
- package/script/gen/types/ThemeConfigGroupVariant.js +2 -0
- package/script/gen/types/ThemeVariableDefinition.d.ts +2 -0
- package/script/gen/types/ThemeVariableDefinition.d.ts.map +1 -1
- package/script/gen/types/ThirdPartyWidgetSettings.d.ts +7 -0
- package/script/gen/types/ThirdPartyWidgetSettings.d.ts.map +1 -1
- package/script/gen/types/WegMiddleClickAction.d.ts +5 -0
- package/script/gen/types/WegMiddleClickAction.d.ts.map +1 -0
- package/script/gen/types/WegMiddleClickAction.js +9 -0
- package/script/gen/types/Widget.d.ts +7 -0
- package/script/gen/types/Widget.d.ts.map +1 -1
- package/script/gen/types/WidgetConfigDefinition.d.ts +2 -4
- package/script/gen/types/WidgetConfigDefinition.d.ts.map +1 -1
- package/script/gen/types/WidgetConfigGroupVariant.d.ts +5 -0
- package/script/gen/types/WidgetConfigGroupVariant.d.ts.map +1 -0
- package/script/gen/types/WidgetConfigGroupVariant.js +2 -0
- package/script/gen/types/WidgetSelectOption.d.ts +1 -1
- package/script/gen/types/WidgetSelectOption.d.ts.map +1 -1
- package/script/gen/types/WidgetSettingColor.d.ts +4 -4
- package/script/gen/types/WidgetSettingColor.d.ts.map +1 -1
- package/script/gen/types/WidgetSettingFont.d.ts +34 -0
- package/script/gen/types/WidgetSettingFont.d.ts.map +1 -0
- package/script/gen/types/WidgetSettingFont.js +2 -0
- package/script/gen/types/WidgetSettingInputNumber.d.ts +4 -4
- package/script/gen/types/WidgetSettingInputNumber.d.ts.map +1 -1
- package/script/gen/types/WidgetSettingInputText.d.ts +4 -4
- package/script/gen/types/WidgetSettingInputText.d.ts.map +1 -1
- package/script/gen/types/WidgetSettingItem.d.ts +4 -1
- package/script/gen/types/WidgetSettingItem.d.ts.map +1 -1
- package/script/gen/types/WidgetSettingRange.d.ts +4 -4
- package/script/gen/types/WidgetSettingRange.d.ts.map +1 -1
- package/script/gen/types/WidgetSettingSelect.d.ts +4 -4
- package/script/gen/types/WidgetSettingSelect.d.ts.map +1 -1
- package/script/gen/types/WidgetSettingSwitch.d.ts +4 -4
- package/script/gen/types/WidgetSettingSwitch.d.ts.map +1 -1
- package/script/gen/types/WidgetShortcutDeclaration.d.ts +33 -0
- package/script/gen/types/WidgetShortcutDeclaration.d.ts.map +1 -0
- package/script/gen/types/WidgetShortcutDeclaration.js +2 -0
- package/script/gen/types/WindowManagerSettings.d.ts +6 -0
- package/script/gen/types/WindowManagerSettings.d.ts.map +1 -1
- package/script/gen/types/WlanBssEntry.d.ts +15 -6
- package/script/gen/types/WlanBssEntry.d.ts.map +1 -1
- package/script/gen/types/mod.d.ts +264 -247
- package/script/gen/types/mod.d.ts.map +1 -1
- package/script/gen/types/mod.js +264 -247
- package/script/src/handlers/commands.d.ts +16 -4
- package/script/src/handlers/commands.d.ts.map +1 -1
- package/script/src/handlers/commands.js +15 -3
- package/script/src/handlers/events.d.ts +7 -2
- package/script/src/handlers/events.d.ts.map +1 -1
- package/script/src/handlers/events.js +6 -1
- package/script/src/state/theme/theming.d.ts +1 -0
- package/script/src/state/theme/theming.d.ts.map +1 -1
- package/script/src/state/theme/theming.js +22 -1
- package/script/src/state/widget/interfaces.d.ts +11 -0
- package/script/src/state/widget/interfaces.d.ts.map +1 -1
- package/script/src/state/widget/mod.d.ts +9 -6
- package/script/src/state/widget/mod.d.ts.map +1 -1
- package/script/src/state/widget/mod.js +61 -78
- package/script/src/state/widget/positioning.js +2 -2
- package/script/src/state/widget/sizing.d.ts +14 -3
- package/script/src/state/widget/sizing.d.ts.map +1 -1
- package/script/src/state/widget/sizing.js +61 -18
- package/script/src/utils/async.d.ts +12 -0
- package/script/src/utils/async.d.ts.map +1 -1
- package/script/src/utils/async.js +49 -0
- package/script/src/utils/mod.d.ts +1 -0
- package/script/src/utils/mod.d.ts.map +1 -1
- package/script/src/utils/mod.js +5 -0
- package/styles/colors.css +521 -0
- package/styles/reset.css +129 -0
- package/styles/spacings.css +9 -0
- package/esm/gen/types/SluHotkey.d.ts +0 -17
- package/esm/gen/types/SluHotkey.d.ts.map +0 -1
- package/esm/gen/types/SluHotkeyAction.d.ts +0 -96
- package/esm/gen/types/SluHotkeyAction.d.ts.map +0 -1
- package/esm/gen/types/WlanProfile.d.ts +0 -8
- package/esm/gen/types/WlanProfile.d.ts.map +0 -1
- package/script/gen/types/SluHotkey.d.ts +0 -17
- package/script/gen/types/SluHotkey.d.ts.map +0 -1
- package/script/gen/types/SluHotkeyAction.d.ts +0 -96
- package/script/gen/types/SluHotkeyAction.d.ts.map +0 -1
- package/script/gen/types/WlanProfile.d.ts +0 -8
- package/script/gen/types/WlanProfile.d.ts.map +0 -1
- /package/esm/gen/types/{SluHotkeyAction.js → BackupStatus.js} +0 -0
- /package/esm/gen/types/{SluHotkey.js → ClipboardData.js} +0 -0
- /package/esm/gen/types/{WlanProfile.js → ClipboardEntryContent.js} +0 -0
- /package/script/gen/types/{SluHotkeyAction.js → BackupStatus.js} +0 -0
- /package/script/gen/types/{SluHotkey.js → ClipboardData.js} +0 -0
- /package/script/gen/types/{WlanProfile.js → ClipboardEntryContent.js} +0 -0
|
@@ -51,6 +51,7 @@ var SeelenCommand;
|
|
|
51
51
|
SeelenCommand["StateGetSettingsByApp"] = "state_get_settings_by_app";
|
|
52
52
|
SeelenCommand["StateGetPlugins"] = "state_get_plugins";
|
|
53
53
|
SeelenCommand["StateGetWidgets"] = "state_get_widgets";
|
|
54
|
+
SeelenCommand["StateGetSystemShortcuts"] = "state_get_system_shortcuts";
|
|
54
55
|
SeelenCommand["StateGetIconPacks"] = "state_get_icon_packs";
|
|
55
56
|
SeelenCommand["StateGetWallpapers"] = "state_get_wallpapers";
|
|
56
57
|
SeelenCommand["StateSetCustomIconPack"] = "state_add_icon_to_custom_icon_pack";
|
|
@@ -101,11 +102,10 @@ var SeelenCommand;
|
|
|
101
102
|
SeelenCommand["UpdatePopup"] = "update_popup";
|
|
102
103
|
SeelenCommand["ClosePopup"] = "close_popup";
|
|
103
104
|
SeelenCommand["GetPopupConfig"] = "get_popup_config";
|
|
104
|
-
SeelenCommand["
|
|
105
|
-
SeelenCommand["WlanStartScanning"] = "wlan_start_scanning";
|
|
106
|
-
SeelenCommand["WlanStopScanning"] = "wlan_stop_scanning";
|
|
105
|
+
SeelenCommand["WlanScan"] = "wlan_scan";
|
|
107
106
|
SeelenCommand["WlanConnect"] = "wlan_connect";
|
|
108
107
|
SeelenCommand["WlanDisconnect"] = "wlan_disconnect";
|
|
108
|
+
SeelenCommand["WlanForget"] = "wlan_forget";
|
|
109
109
|
SeelenCommand["GetNetworkDefaultLocalIp"] = "get_network_default_local_ip";
|
|
110
110
|
SeelenCommand["GetNetworkAdapters"] = "get_network_adapters";
|
|
111
111
|
SeelenCommand["GetNetworkInternetConnection"] = "get_network_internet_connection";
|
|
@@ -127,6 +127,7 @@ var SeelenCommand;
|
|
|
127
127
|
SeelenCommand["RequestPairBluetoothDevice"] = "request_pair_bluetooth_device";
|
|
128
128
|
SeelenCommand["ConfirmBluetoothDevicePairing"] = "confirm_bluetooth_device_pairing";
|
|
129
129
|
SeelenCommand["DisconnectBluetoothDevice"] = "disconnect_bluetooth_device";
|
|
130
|
+
SeelenCommand["ConnectBluetoothDevice"] = "connect_bluetooth_device";
|
|
130
131
|
SeelenCommand["ForgetBluetoothDevice"] = "forget_bluetooth_device";
|
|
131
132
|
SeelenCommand["GetStartMenuItems"] = "get_start_menu_items";
|
|
132
133
|
SeelenCommand["GetNativeStartMenu"] = "get_native_start_menu";
|
|
@@ -135,4 +136,15 @@ var SeelenCommand;
|
|
|
135
136
|
SeelenCommand["GetSeelenSession"] = "get_seelen_session";
|
|
136
137
|
SeelenCommand["SeelenLogin"] = "seelen_login";
|
|
137
138
|
SeelenCommand["SeelenLogout"] = "seelen_logout";
|
|
139
|
+
SeelenCommand["GetBackupStatus"] = "get_backup_status";
|
|
140
|
+
SeelenCommand["ClipboardGetData"] = "clipboard_get_data";
|
|
141
|
+
SeelenCommand["ClipboardDeleteEntry"] = "clipboard_delete_entry";
|
|
142
|
+
SeelenCommand["ClipboardClearHistory"] = "clipboard_clear_history";
|
|
143
|
+
SeelenCommand["ClipboardSetContent"] = "clipboard_set_content";
|
|
144
|
+
SeelenCommand["ClipboardPaste"] = "clipboard_paste";
|
|
145
|
+
SeelenCommand["GetFonts"] = "get_fonts";
|
|
146
|
+
SeelenCommand["GetFocusAssist"] = "get_focus_assist";
|
|
147
|
+
SeelenCommand["SetFocusAssist"] = "set_focus_assist";
|
|
148
|
+
SeelenCommand["GetNotificationsMode"] = "get_notifications_mode";
|
|
149
|
+
SeelenCommand["SetNotificationsMode"] = "set_notifications_mode";
|
|
138
150
|
})(SeelenCommand || (exports.SeelenCommand = SeelenCommand = {}));
|
|
@@ -18,11 +18,11 @@ export declare enum SeelenEvent {
|
|
|
18
18
|
NetworkAdapters = "network-adapters",
|
|
19
19
|
NetworkInternetConnection = "network-internet-connection",
|
|
20
20
|
NetworkWlanScanned = "wlan-scanned",
|
|
21
|
-
Notifications = "notifications",
|
|
22
21
|
PowerStatus = "power-status",
|
|
23
22
|
PowerMode = "power-mode",
|
|
24
23
|
BatteriesStatus = "batteries-status",
|
|
25
24
|
ColorsChanged = "colors-changed",
|
|
25
|
+
SystemFontsChanged = "system::fonts-changed",
|
|
26
26
|
WMSetReservation = "wm::set-reservation",
|
|
27
27
|
WMForceRetiling = "wm::force-retiling",
|
|
28
28
|
WMTreeChanged = "wm::tree-changed",
|
|
@@ -46,6 +46,11 @@ export declare enum SeelenEvent {
|
|
|
46
46
|
StartMenuItemsChanged = "start-menu::items-changed",
|
|
47
47
|
WegAddItem = "weg::add-item",
|
|
48
48
|
TrashBinChanged = "trash-bin::changed",
|
|
49
|
-
SeelenSessionChanged = "session::changed"
|
|
49
|
+
SeelenSessionChanged = "session::changed",
|
|
50
|
+
SeelenBackupStatusChanged = "backup::status-changed",
|
|
51
|
+
ClipboardDataChanged = "clipboard::data-changed",
|
|
52
|
+
FocusAssistChanged = "focus-assist::changed",
|
|
53
|
+
NotificationsModeChanged = "notifications::mode-changed",
|
|
54
|
+
Notifications = "notifications"
|
|
50
55
|
}
|
|
51
56
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/src/handlers/events.ts"],"names":[],"mappings":"AACA,oBAAY,WAAW;IACrB,sBAAsB,8BAA8B;IACpD,kBAAkB,yBAAyB;IAC3C,eAAe,sBAAsB;IACrC,qBAAqB,mBAAmB;IACxC,qBAAqB,6BAA6B;IAClD,sBAAsB,8BAA8B;IACpD,+BAA+B,wCAAwC;IACvE,WAAW,iBAAiB;IAC5B,iBAAiB,+BAA+B;IAChD,qBAAqB,0BAA0B;IAC/C,6BAA6B,mCAAmC;IAChE,aAAa,mBAAmB;IAChC,YAAY,mBAAmB;IAC/B,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;IAC9B,qBAAqB,6BAA6B;IAClD,eAAe,qBAAqB;IACpC,yBAAyB,gCAAgC;IACzD,kBAAkB,iBAAiB;IACnC,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/src/handlers/events.ts"],"names":[],"mappings":"AACA,oBAAY,WAAW;IACrB,sBAAsB,8BAA8B;IACpD,kBAAkB,yBAAyB;IAC3C,eAAe,sBAAsB;IACrC,qBAAqB,mBAAmB;IACxC,qBAAqB,6BAA6B;IAClD,sBAAsB,8BAA8B;IACpD,+BAA+B,wCAAwC;IACvE,WAAW,iBAAiB;IAC5B,iBAAiB,+BAA+B;IAChD,qBAAqB,0BAA0B;IAC/C,6BAA6B,mCAAmC;IAChE,aAAa,mBAAmB;IAChC,YAAY,mBAAmB;IAC/B,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;IAC9B,qBAAqB,6BAA6B;IAClD,eAAe,qBAAqB;IACpC,yBAAyB,gCAAgC;IACzD,kBAAkB,iBAAiB;IACnC,WAAW,iBAAiB;IAC5B,SAAS,eAAe;IACxB,eAAe,qBAAqB;IACpC,aAAa,mBAAmB;IAChC,kBAAkB,0BAA0B;IAC5C,gBAAgB,wBAAwB;IACxC,eAAe,uBAAuB;IACtC,aAAa,qBAAqB;IAClC,mBAAmB,0BAA0B;IAC7C,oBAAoB,qBAAqB;IACzC,yBAAyB,oBAAoB;IAC7C,kBAAkB,WAAW;IAC7B,qBAAqB,eAAe;IACpC,mBAAmB,oBAAoB;IACvC,mBAAmB,oBAAoB;IACvC,sBAAsB,sCAAsC;IAC5D,iBAAiB,yBAAyB;IAC1C,2BAA2B,oCAAoC;IAC/D,eAAe,sBAAsB;IACrC,aAAa,mBAAmB;IAChC,kBAAkB,0BAA0B;IAC5C,oBAAoB,4BAA4B;IAChD,mBAAmB,2BAA2B;IAC9C,kBAAkB,0BAA0B;IAC5C,uBAAuB,8BAA8B;IACrD,qBAAqB,8BAA8B;IACnD,UAAU,kBAAkB;IAC5B,eAAe,uBAAuB;IACtC,oBAAoB,qBAAqB;IACzC,yBAAyB,2BAA2B;IACpD,oBAAoB,4BAA4B;IAChD,kBAAkB,0BAA0B;IAC5C,wBAAwB,gCAAgC;IACxD,aAAa,kBAAkB;CAChC"}
|
|
@@ -23,11 +23,11 @@ var SeelenEvent;
|
|
|
23
23
|
SeelenEvent["NetworkAdapters"] = "network-adapters";
|
|
24
24
|
SeelenEvent["NetworkInternetConnection"] = "network-internet-connection";
|
|
25
25
|
SeelenEvent["NetworkWlanScanned"] = "wlan-scanned";
|
|
26
|
-
SeelenEvent["Notifications"] = "notifications";
|
|
27
26
|
SeelenEvent["PowerStatus"] = "power-status";
|
|
28
27
|
SeelenEvent["PowerMode"] = "power-mode";
|
|
29
28
|
SeelenEvent["BatteriesStatus"] = "batteries-status";
|
|
30
29
|
SeelenEvent["ColorsChanged"] = "colors-changed";
|
|
30
|
+
SeelenEvent["SystemFontsChanged"] = "system::fonts-changed";
|
|
31
31
|
SeelenEvent["WMSetReservation"] = "wm::set-reservation";
|
|
32
32
|
SeelenEvent["WMForceRetiling"] = "wm::force-retiling";
|
|
33
33
|
SeelenEvent["WMTreeChanged"] = "wm::tree-changed";
|
|
@@ -52,4 +52,9 @@ var SeelenEvent;
|
|
|
52
52
|
SeelenEvent["WegAddItem"] = "weg::add-item";
|
|
53
53
|
SeelenEvent["TrashBinChanged"] = "trash-bin::changed";
|
|
54
54
|
SeelenEvent["SeelenSessionChanged"] = "session::changed";
|
|
55
|
+
SeelenEvent["SeelenBackupStatusChanged"] = "backup::status-changed";
|
|
56
|
+
SeelenEvent["ClipboardDataChanged"] = "clipboard::data-changed";
|
|
57
|
+
SeelenEvent["FocusAssistChanged"] = "focus-assist::changed";
|
|
58
|
+
SeelenEvent["NotificationsModeChanged"] = "notifications::mode-changed";
|
|
59
|
+
SeelenEvent["Notifications"] = "notifications";
|
|
55
60
|
})(SeelenEvent || (exports.SeelenEvent = SeelenEvent = {}));
|
|
@@ -3,5 +3,6 @@
|
|
|
3
3
|
* when the themes or settings change. Also will add the systehm ui colors to the document.
|
|
4
4
|
*/
|
|
5
5
|
export declare function startThemingTool(): Promise<void>;
|
|
6
|
+
export declare function setPerformanceStyles(): void;
|
|
6
7
|
export declare function startDateCssVariables(): void;
|
|
7
8
|
//# sourceMappingURL=theming.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theming.d.ts","sourceRoot":"","sources":["../../../../src/src/state/theme/theming.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"theming.d.ts","sourceRoot":"","sources":["../../../../src/src/state/theme/theming.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAqBtD;AAiBD,wBAAgB,oBAAoB,IAAI,IAAI,CAI3C;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAK5C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.startThemingTool = startThemingTool;
|
|
4
|
+
exports.setPerformanceStyles = setPerformanceStyles;
|
|
4
5
|
exports.startDateCssVariables = startDateCssVariables;
|
|
5
6
|
const ui_colors_js_1 = require("../../system_state/ui_colors.js");
|
|
6
7
|
const DOM_js_1 = require("../../utils/DOM.js");
|
|
@@ -21,11 +22,31 @@ async function startThemingTool() {
|
|
|
21
22
|
settings = newSettings;
|
|
22
23
|
themes.applyToDocument(settings.activeThemes, settings.byTheme);
|
|
23
24
|
});
|
|
25
|
+
setPerformanceStyles();
|
|
26
|
+
startDateCssVariables();
|
|
24
27
|
(await ui_colors_js_1.UIColors.getAsync()).setAsCssVariables();
|
|
25
28
|
await ui_colors_js_1.UIColors.onChange((colors) => colors.setAsCssVariables());
|
|
26
|
-
startDateCssVariables();
|
|
27
29
|
themes.applyToDocument(settings.activeThemes, settings.byTheme);
|
|
28
30
|
}
|
|
31
|
+
// Used by performance mode to reduce cpu/gpu usage
|
|
32
|
+
const PERF_CSS = `
|
|
33
|
+
html[data-animations-off] *,
|
|
34
|
+
html[data-animations-off] *::before,
|
|
35
|
+
html[data-animations-off] *::after {
|
|
36
|
+
animation-duration: 0.001ms !important;
|
|
37
|
+
animation-iteration-count: 1 !important;
|
|
38
|
+
animation-delay: 0s !important;
|
|
39
|
+
|
|
40
|
+
transition-duration: 0.001ms !important;
|
|
41
|
+
transition-delay: 0s !important;
|
|
42
|
+
|
|
43
|
+
scroll-behavior: auto !important;
|
|
44
|
+
}`;
|
|
45
|
+
function setPerformanceStyles() {
|
|
46
|
+
const styleSheet = new DOM_js_1.RuntimeStyleSheet("@static/performance");
|
|
47
|
+
styleSheet.addStyle(PERF_CSS);
|
|
48
|
+
styleSheet.applyToDocument();
|
|
49
|
+
}
|
|
29
50
|
function startDateCssVariables() {
|
|
30
51
|
// Set initial values immediately
|
|
31
52
|
updateDateCssVariables();
|
|
@@ -19,6 +19,17 @@ export interface InitWidgetOptions {
|
|
|
19
19
|
* @default undefined
|
|
20
20
|
*/
|
|
21
21
|
autoSizeByContent?: HTMLElement | null;
|
|
22
|
+
/**
|
|
23
|
+
* If autoSizeByContent is set, and this is true, will auto size the widget and
|
|
24
|
+
* adjusts the position to fit on screen
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
autoSizeFitOnScreen?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Will normalize the device pixel ratio to 1:1
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
normalizeDevicePixelRatio?: boolean;
|
|
22
33
|
/**
|
|
23
34
|
* Will save the position and size of the widget on change.
|
|
24
35
|
* This is intedeed to be used when the size and position of the widget is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/interfaces.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gEAAgE;IAChE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,0CAA0C;IAC1C,MAAM,EAAE;QAAE,QAAQ,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM;KAAE,CAAC;CAC/C;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACvC;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"}
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/interfaces.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gEAAgE;IAChE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,0CAA0C;IAC1C,MAAM,EAAE;QAAE,QAAQ,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM;KAAE,CAAC;CAC/C;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACvC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Frame, type Rect, type ThirdPartyWidgetSettings, type Widget as IWidget, type WidgetId, type WidgetTriggerPayload } from "../../../gen/types/mod.js";
|
|
1
|
+
import { type Alignment, type Frame, type Rect, type ThirdPartyWidgetSettings, type Widget as IWidget, type WidgetId, type WidgetTriggerPayload } from "../../../gen/types/mod.js";
|
|
2
2
|
import type { InitWidgetOptions, ReadyWidgetOptions, WidgetInformation } from "./interfaces.js";
|
|
3
3
|
import { type Webview } from "@tauri-apps/api/webview";
|
|
4
4
|
import { type Window } from "@tauri-apps/api/window";
|
|
@@ -28,11 +28,8 @@ export declare class Widget {
|
|
|
28
28
|
private constructor();
|
|
29
29
|
/** Returns the current window id of the widget */
|
|
30
30
|
get windowId(): number;
|
|
31
|
-
/** Returns the current position and size of the widget */
|
|
32
|
-
get frame(): Frame;
|
|
33
31
|
/** Returns the default config of the widget, declared on the widget definition */
|
|
34
32
|
getDefaultConfig(): ThirdPartyWidgetSettings;
|
|
35
|
-
private applyInvisiblePreset;
|
|
36
33
|
/** Will apply the recommended settings for a desktop widget */
|
|
37
34
|
private applyDesktopPreset;
|
|
38
35
|
/** Will apply the recommended settings for an overlay widget */
|
|
@@ -43,7 +40,8 @@ export declare class Widget {
|
|
|
43
40
|
* Will restore the saved position and size of the widget on start,
|
|
44
41
|
* after that will store the position and size of the widget on change.
|
|
45
42
|
*/
|
|
46
|
-
persistPositionAndSize
|
|
43
|
+
private persistPositionAndSize;
|
|
44
|
+
private normalizeDevicePixelRatio;
|
|
47
45
|
/**
|
|
48
46
|
* Will initialize the widget based on the preset and mark it as `pending`, this function won't show the widget.
|
|
49
47
|
* This should be called before any other action on the widget. After this you should call
|
|
@@ -58,7 +56,12 @@ export declare class Widget {
|
|
|
58
56
|
*/
|
|
59
57
|
ready(options?: ReadyWidgetOptions): Promise<void>;
|
|
60
58
|
onTrigger(cb: (args: WidgetTriggerPayload) => void): void;
|
|
61
|
-
|
|
59
|
+
__unsafe_setPosition(rect: Rect, ref: Frame): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* This will adjust the position of the widget based on the current placement and alignX/alignY arguments.
|
|
62
|
+
* This makes the widget fit into the monitor where it was placed, avoiding monitor overflow.
|
|
63
|
+
*/
|
|
64
|
+
adjustAndSetPosition(x: number, y: number, alignX?: Alignment | null, alignY?: Alignment | null): Promise<void>;
|
|
62
65
|
setPosition(rect: Rect): Promise<void>;
|
|
63
66
|
show(): Promise<void>;
|
|
64
67
|
/** Will force foreground the widget */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/mod.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,IAAI,EACT,KAAK,wBAAwB,EAC7B,KAAK,MAAM,IAAI,OAAO,EAEtB,KAAK,QAAQ,EAIb,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAOnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEhG,OAAO,EAAqB,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAoB,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/mod.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,IAAI,EACT,KAAK,wBAAwB,EAC7B,KAAK,MAAM,IAAI,OAAO,EAEtB,KAAK,QAAQ,EAIb,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAOnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEhG,OAAO,EAAqB,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAoB,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AASvE;;GAEG;AACH,qBAAa,MAAM;IACjB;;;OAGG;IACH,MAAM,CAAC,UAAU,IAAI,MAAM;IAU3B,iCAAiC;IACjC,MAAM,KAAK,IAAI,IAAI,MAAM,CAExB;IAED,gBAAgB;IAChB,SAAgB,EAAE,EAAE,QAAQ,CAAC;IAC7B,wBAAwB;IACxB,SAAgB,GAAG,EAAE,OAAO,CAAC;IAC7B,0CAA0C;IAC1C,SAAgB,OAAO,EAAE,iBAAiB,CAAC;IAC3C,kDAAkD;IAClD,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,iDAAiD;IACjD,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,OAAO,CAAC,SAAS,CAAC,CAAkB;IAEpC,OAAO,CAAC,YAAY,CAKlB;IAEF,OAAO;IAkBP,kDAAkD;IAClD,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,kFAAkF;IAC3E,gBAAgB,IAAI,wBAAwB;IAQnD,+DAA+D;IAC/D,OAAO,CAAC,kBAAkB;IAE1B,gEAAgE;IAChE,OAAO,CAAC,kBAAkB;IAE1B,6DAA6D;IAC7D,OAAO,CAAC,gBAAgB;IA0BxB;;;OAGG;YACW,sBAAsB;YAwCtB,yBAAyB;IAavC;;;;OAIG;IACU,IAAI,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAmDjE;;;;;OAKG;IACU,KAAK,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAwB5D,SAAS,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,GAAG,IAAI;IAMnD,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBxE;;;OAGG;IACU,oBAAoB,CAC/B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,EACzB,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,GACxB,OAAO,CAAC,IAAI,CAAC;IAyBH,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAMtC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKlC,uCAAuC;IAC1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAU5B,IAAI,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAG,IAAI;CAMlD;AAWD,eAAO,MAAM,sBAAsB,EAAE,QAAyC,CAAC;AAC/E,eAAO,MAAM,mBAAmB,EAAE,QAAsC,CAAC;AACzE,eAAO,MAAM,iBAAiB,EAAE,QAAoC,CAAC;AACrE,eAAO,MAAM,qBAAqB,EAAE,QAA8C,CAAC;AACnF,eAAO,MAAM,2BAA2B,EAAE,QAA+C,CAAC;AAC1F,eAAO,MAAM,kBAAkB,EAAE,QAAkD,CAAC"}
|
|
@@ -79,14 +79,6 @@ class Widget {
|
|
|
79
79
|
hwnd: 0,
|
|
80
80
|
initialized: false,
|
|
81
81
|
ready: false,
|
|
82
|
-
position: {
|
|
83
|
-
x: 0,
|
|
84
|
-
y: 0,
|
|
85
|
-
},
|
|
86
|
-
size: {
|
|
87
|
-
width: 0,
|
|
88
|
-
height: 0,
|
|
89
|
-
},
|
|
90
82
|
firstFocus: true,
|
|
91
83
|
};
|
|
92
84
|
constructor(widget) {
|
|
@@ -108,15 +100,6 @@ class Widget {
|
|
|
108
100
|
get windowId() {
|
|
109
101
|
return this.runtimeState.hwnd;
|
|
110
102
|
}
|
|
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
103
|
/** Returns the default config of the widget, declared on the widget definition */
|
|
121
104
|
getDefaultConfig() {
|
|
122
105
|
const config = { enabled: true };
|
|
@@ -125,29 +108,12 @@ class Widget {
|
|
|
125
108
|
}
|
|
126
109
|
return config;
|
|
127
110
|
}
|
|
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
111
|
/** Will apply the recommended settings for a desktop widget */
|
|
141
|
-
|
|
142
|
-
await Promise.all([...this.applyInvisiblePreset(), this.window.setAlwaysOnBottom(true)]);
|
|
143
|
-
}
|
|
112
|
+
applyDesktopPreset() { }
|
|
144
113
|
/** Will apply the recommended settings for an overlay widget */
|
|
145
|
-
|
|
146
|
-
await Promise.all([...this.applyInvisiblePreset(), this.window.setAlwaysOnTop(true)]);
|
|
147
|
-
}
|
|
114
|
+
applyOverlayPreset() { }
|
|
148
115
|
/** Will apply the recommended settings for a popup widget */
|
|
149
|
-
|
|
150
|
-
await Promise.all([...this.applyInvisiblePreset(), this.window.setAlwaysOnTop(true)]);
|
|
116
|
+
applyPopupPreset() {
|
|
151
117
|
const hideWidget = (0, async_js_1.debounce)(() => {
|
|
152
118
|
this.hide(true);
|
|
153
119
|
}, 100);
|
|
@@ -162,27 +128,8 @@ class Widget {
|
|
|
162
128
|
this.onTrigger(async ({ desiredPosition, alignX, alignY }) => {
|
|
163
129
|
// avoid flickering when clicking a button that triggers the widget
|
|
164
130
|
hideWidget.cancel();
|
|
165
|
-
if (this.autoSizer && alignX && alignY) {
|
|
166
|
-
this.autoSizer.originX = alignX;
|
|
167
|
-
this.autoSizer.originY = alignY;
|
|
168
|
-
}
|
|
169
131
|
if (desiredPosition) {
|
|
170
|
-
|
|
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
|
-
});
|
|
132
|
+
await this.adjustAndSetPosition(desiredPosition.x, desiredPosition.y, alignX, alignY);
|
|
186
133
|
}
|
|
187
134
|
await this.show();
|
|
188
135
|
await this.focus();
|
|
@@ -223,6 +170,18 @@ class Widget {
|
|
|
223
170
|
console.info(`Widget size saved: ${width} ${height}`);
|
|
224
171
|
}, 500));
|
|
225
172
|
}
|
|
173
|
+
async normalizeDevicePixelRatio() {
|
|
174
|
+
// play with zoom level to reset device pixel ratio to 1:1
|
|
175
|
+
let oldDPR = globalThis.devicePixelRatio;
|
|
176
|
+
await this.webview.setZoom(1 / oldDPR);
|
|
177
|
+
this.window.onScaleChanged(() => {
|
|
178
|
+
if (globalThis.devicePixelRatio !== oldDPR) {
|
|
179
|
+
// when zoom was set dpr changed, so in case of change this is accomulative unit
|
|
180
|
+
oldDPR = oldDPR * globalThis.devicePixelRatio;
|
|
181
|
+
this.webview.setZoom(1 / (oldDPR * globalThis.devicePixelRatio));
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
226
185
|
/**
|
|
227
186
|
* Will initialize the widget based on the preset and mark it as `pending`, this function won't show the widget.
|
|
228
187
|
* This should be called before any other action on the widget. After this you should call
|
|
@@ -235,8 +194,11 @@ class Widget {
|
|
|
235
194
|
}
|
|
236
195
|
this.runtimeState.hwnd = await (0, mod_js_2.invoke)(mod_js_2.SeelenCommand.GetSelfWindowId);
|
|
237
196
|
this.runtimeState.initialized = true;
|
|
197
|
+
if (options.normalizeDevicePixelRatio) {
|
|
198
|
+
await this.normalizeDevicePixelRatio();
|
|
199
|
+
}
|
|
238
200
|
if (options.autoSizeByContent) {
|
|
239
|
-
this.autoSizer = new sizing_js_1.WidgetAutoSizer(this, options.autoSizeByContent);
|
|
201
|
+
this.autoSizer = new sizing_js_1.WidgetAutoSizer(this, options.autoSizeByContent, options.autoSizeFitOnScreen ?? true);
|
|
240
202
|
}
|
|
241
203
|
else if (options.saveAndRestoreLastRect ?? this.def.preset === mod_js_1.WidgetPreset.Desktop) {
|
|
242
204
|
await this.persistPositionAndSize();
|
|
@@ -245,13 +207,13 @@ class Widget {
|
|
|
245
207
|
case mod_js_1.WidgetPreset.None:
|
|
246
208
|
break;
|
|
247
209
|
case mod_js_1.WidgetPreset.Desktop:
|
|
248
|
-
|
|
210
|
+
this.applyDesktopPreset();
|
|
249
211
|
break;
|
|
250
212
|
case mod_js_1.WidgetPreset.Overlay:
|
|
251
|
-
|
|
213
|
+
this.applyOverlayPreset();
|
|
252
214
|
break;
|
|
253
215
|
case mod_js_1.WidgetPreset.Popup:
|
|
254
|
-
|
|
216
|
+
this.applyPopupPreset();
|
|
255
217
|
break;
|
|
256
218
|
}
|
|
257
219
|
await (0, theming_js_1.startThemingTool)();
|
|
@@ -262,16 +224,8 @@ class Widget {
|
|
|
262
224
|
else {
|
|
263
225
|
console.trace("Animations won't be disabled because widget configuration");
|
|
264
226
|
}
|
|
265
|
-
|
|
266
|
-
|
|
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;
|
|
227
|
+
await sizing_js_1.OPTIMISTIC_FRAME.runExclusive(async (state) => {
|
|
228
|
+
await state.init(this);
|
|
275
229
|
});
|
|
276
230
|
}
|
|
277
231
|
/**
|
|
@@ -303,13 +257,8 @@ class Widget {
|
|
|
303
257
|
cb(payload);
|
|
304
258
|
});
|
|
305
259
|
}
|
|
306
|
-
|
|
307
|
-
|
|
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, {
|
|
260
|
+
async __unsafe_setPosition(rect, ref) {
|
|
261
|
+
await (0, mod_js_2.invoke)(mod_js_2.SeelenCommand.SetSelfPosition, {
|
|
313
262
|
rect: {
|
|
314
263
|
left: Math.round(rect.left),
|
|
315
264
|
top: Math.round(rect.top),
|
|
@@ -317,6 +266,40 @@ class Widget {
|
|
|
317
266
|
bottom: Math.round(rect.bottom),
|
|
318
267
|
},
|
|
319
268
|
});
|
|
269
|
+
// optimistically update state, as arrived event after change is async
|
|
270
|
+
ref.x = rect.left;
|
|
271
|
+
ref.y = rect.top;
|
|
272
|
+
ref.width = rect.right - rect.left;
|
|
273
|
+
ref.height = rect.bottom - rect.top;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* This will adjust the position of the widget based on the current placement and alignX/alignY arguments.
|
|
277
|
+
* This makes the widget fit into the monitor where it was placed, avoiding monitor overflow.
|
|
278
|
+
*/
|
|
279
|
+
async adjustAndSetPosition(x, y, alignX, alignY) {
|
|
280
|
+
await sizing_js_1.OPTIMISTIC_FRAME.runExclusive(async (ref) => {
|
|
281
|
+
const adjusted = (0, positioning_js_1.adjustPositionByPlacement)({
|
|
282
|
+
frame: {
|
|
283
|
+
x,
|
|
284
|
+
y,
|
|
285
|
+
width: ref.width,
|
|
286
|
+
height: ref.height,
|
|
287
|
+
},
|
|
288
|
+
originX: alignX,
|
|
289
|
+
originY: alignY,
|
|
290
|
+
});
|
|
291
|
+
await Widget.self.__unsafe_setPosition({
|
|
292
|
+
left: adjusted.x,
|
|
293
|
+
top: adjusted.y,
|
|
294
|
+
right: adjusted.x + adjusted.width,
|
|
295
|
+
bottom: adjusted.y + adjusted.height,
|
|
296
|
+
}, ref);
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
async setPosition(rect) {
|
|
300
|
+
await sizing_js_1.OPTIMISTIC_FRAME.runExclusive(async (frame) => {
|
|
301
|
+
await this.__unsafe_setPosition(rect, frame);
|
|
302
|
+
});
|
|
320
303
|
}
|
|
321
304
|
async show() {
|
|
322
305
|
debouncedClose.cancel();
|
|
@@ -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
|
|
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)(
|
|
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
|
|
17
|
+
originX?: Alignment | null;
|
|
8
18
|
/** From which side the widget will grow */
|
|
9
|
-
originY
|
|
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":"
|
|
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
|
|
39
|
+
originX;
|
|
11
40
|
/** From which side the widget will grow */
|
|
12
|
-
originY
|
|
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
|
|
32
|
-
const
|
|
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.
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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,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"}
|