@seelen-ui/lib 2.3.6 → 2.4.1-next.20250825015552
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/constants/mod.d.ts +17 -9
- package/esm/constants/mod.d.ts.map +1 -1
- package/esm/constants/mod.js +6 -4
- package/esm/handlers/commands.d.ts +17 -8
- package/esm/handlers/commands.d.ts.map +1 -1
- package/esm/handlers/commands.js +17 -8
- package/esm/handlers/events.d.ts +3 -5
- package/esm/handlers/events.d.ts.map +1 -1
- package/esm/handlers/events.js +3 -5
- package/esm/lib.d.ts +1 -1
- package/esm/lib.d.ts.map +1 -1
- package/esm/lib.js +1 -1
- package/esm/resource/mod.d.ts +6 -0
- package/esm/resource/mod.d.ts.map +1 -0
- package/esm/state/icon_pack.d.ts +23 -52
- package/esm/state/icon_pack.d.ts.map +1 -1
- package/esm/state/icon_pack.js +137 -131
- package/esm/state/mod.d.ts +2 -1
- package/esm/state/mod.d.ts.map +1 -1
- package/esm/state/mod.js +1 -0
- package/esm/state/plugin/mod.d.ts +1 -1
- package/esm/state/plugin/mod.d.ts.map +1 -1
- package/esm/state/settings/mod.d.ts +6 -5
- package/esm/state/settings/mod.d.ts.map +1 -1
- package/esm/state/settings/mod.js +5 -8
- package/esm/state/settings/settings_by_monitor.d.ts +1 -4
- package/esm/state/settings/settings_by_monitor.d.ts.map +1 -1
- package/esm/state/settings/settings_by_monitor.js +0 -8
- package/esm/state/settings_by_app.d.ts +1 -1
- package/esm/state/settings_by_app.d.ts.map +1 -1
- package/esm/state/theme/mod.d.ts +19 -3
- package/esm/state/theme/mod.d.ts.map +1 -1
- package/esm/state/theme/mod.js +96 -0
- package/esm/state/wallpaper/mod.d.ts +15 -0
- package/esm/state/wallpaper/mod.d.ts.map +1 -0
- package/esm/state/wallpaper/mod.js +31 -0
- package/esm/state/weg_items.d.ts +6 -9
- package/esm/state/weg_items.d.ts.map +1 -1
- package/esm/state/weg_items.js +9 -17
- package/esm/state/widget/mod.d.ts +9 -4
- package/esm/state/widget/mod.d.ts.map +1 -1
- package/esm/state/widget/mod.js +31 -12
- package/esm/state/wm_layout.d.ts +4 -5
- package/esm/state/wm_layout.d.ts.map +1 -1
- package/esm/state/wm_layout.js +3 -8
- package/esm/system_state/bluetooth/mod.d.ts +2 -2
- package/esm/system_state/bluetooth/mod.d.ts.map +1 -1
- package/esm/system_state/language.d.ts +1 -1
- package/esm/system_state/language.d.ts.map +1 -1
- package/esm/system_state/monitors.d.ts +1 -1
- package/esm/system_state/monitors.d.ts.map +1 -1
- package/esm/system_state/ui_colors.d.ts +1 -1
- package/esm/system_state/ui_colors.d.ts.map +1 -1
- package/esm/system_state/ui_colors.js +8 -2
- package/esm/system_state/user.d.ts +1 -1
- package/esm/system_state/user.d.ts.map +1 -1
- package/esm/types/CssVariableName.d.ts +5 -0
- package/esm/types/CssVariableName.d.ts.map +1 -0
- package/esm/types/CustomIconPackEntry.d.ts +16 -0
- package/esm/types/CustomIconPackEntry.d.ts.map +1 -0
- package/esm/types/DesktopWorkspace.d.ts +5 -0
- package/esm/types/DesktopWorkspace.d.ts.map +1 -1
- package/esm/types/FocusedApp.d.ts +4 -0
- package/esm/types/FocusedApp.d.ts.map +1 -1
- package/esm/types/FocusedApp.js +0 -1
- package/esm/types/Icon.d.ts +17 -10
- package/esm/types/Icon.d.ts.map +1 -1
- package/esm/types/IconPack.d.ts +7 -19
- package/esm/types/IconPack.d.ts.map +1 -1
- package/esm/types/IconPackEntry.d.ts +11 -0
- package/esm/types/IconPackEntry.d.ts.map +1 -0
- package/esm/types/IconPackId.d.ts +3 -0
- package/esm/types/IconPackId.d.ts.map +1 -1
- package/esm/types/MediaPlayer.d.ts +2 -0
- package/esm/types/MediaPlayer.d.ts.map +1 -1
- package/esm/types/MediaPlayerTimeline.d.ts +24 -0
- package/esm/types/MediaPlayerTimeline.d.ts.map +1 -0
- package/esm/types/MixBlendMode.d.ts +2 -0
- package/esm/types/MixBlendMode.d.ts.map +1 -0
- package/esm/types/MonitorConfiguration.d.ts +0 -5
- package/esm/types/MonitorConfiguration.d.ts.map +1 -1
- package/esm/types/MonitorId.d.ts +2 -0
- package/esm/types/MonitorId.d.ts.map +1 -0
- package/esm/types/MonitorSettingsByWidget.d.ts +1 -10
- package/esm/types/MonitorSettingsByWidget.d.ts.map +1 -1
- package/esm/types/ObjectFit.d.ts +2 -0
- package/esm/types/ObjectFit.d.ts.map +1 -0
- package/esm/types/ObjectPosition.d.ts +2 -0
- package/esm/types/ObjectPosition.d.ts.map +1 -0
- package/esm/types/PhysicalMonitor.d.ts +2 -1
- package/esm/types/PhysicalMonitor.d.ts.map +1 -1
- package/esm/types/PlaybackSpeed.d.ts +2 -0
- package/esm/types/PlaybackSpeed.d.ts.map +1 -0
- package/esm/types/PluginId.d.ts +3 -0
- package/esm/types/PluginId.d.ts.map +1 -1
- package/esm/types/Resource.d.ts +35 -3
- package/esm/types/Resource.d.ts.map +1 -1
- package/esm/types/ResourceAttribute.d.ts +2 -0
- package/esm/types/ResourceAttribute.d.ts.map +1 -0
- package/esm/types/ResourceId.d.ts +4 -2
- package/esm/types/ResourceId.d.ts.map +1 -1
- package/esm/types/ResourceMetadata.d.ts +2 -6
- package/esm/types/ResourceMetadata.d.ts.map +1 -1
- package/esm/types/SeelenCommandArgument.d.ts +43 -18
- package/esm/types/SeelenCommandArgument.d.ts.map +1 -1
- package/esm/types/SeelenCommandClosePopupArgs.d.ts +4 -0
- package/esm/types/SeelenCommandClosePopupArgs.d.ts.map +1 -0
- package/esm/types/SeelenCommandClosePopupArgs.js +2 -0
- package/esm/types/SeelenCommandCreatePopupArgs.d.ts +5 -0
- package/esm/types/SeelenCommandCreatePopupArgs.d.ts.map +1 -0
- package/esm/types/SeelenCommandRemoveResourceArgs.d.ts +7 -0
- package/esm/types/SeelenCommandRemoveResourceArgs.d.ts.map +1 -0
- package/esm/types/SeelenCommandRequestToUserInputShortcutArgs.d.ts +4 -0
- package/esm/types/SeelenCommandRequestToUserInputShortcutArgs.d.ts.map +1 -0
- package/esm/types/SeelenCommandRequestToUserInputShortcutArgs.js +2 -0
- package/esm/types/SeelenCommandReturn.d.ts +38 -16
- package/esm/types/SeelenCommandReturn.d.ts.map +1 -1
- package/esm/types/SeelenCommandSetNativeShellWallpaperArgs.d.ts +4 -0
- package/esm/types/SeelenCommandSetNativeShellWallpaperArgs.d.ts.map +1 -0
- package/esm/types/SeelenCommandSetNativeShellWallpaperArgs.js +2 -0
- package/esm/types/SeelenCommandStateGetWegItemsArgs.d.ts +5 -0
- package/esm/types/SeelenCommandStateGetWegItemsArgs.d.ts.map +1 -0
- package/esm/types/SeelenCommandStateSetCustomIconPackArgs.d.ts +5 -0
- package/esm/types/SeelenCommandStateSetCustomIconPackArgs.d.ts.map +1 -0
- package/esm/types/SeelenCommandSwitchWorkspaceArgs.d.ts +2 -0
- package/esm/types/SeelenCommandSwitchWorkspaceArgs.d.ts.map +1 -1
- package/esm/types/SeelenCommandSwitchWorkspaceArgs.js +0 -1
- package/esm/types/SeelenCommandUpdatePopupArgs.d.ts +6 -0
- package/esm/types/SeelenCommandUpdatePopupArgs.d.ts.map +1 -0
- package/esm/types/SeelenEventPayload.d.ts +10 -14
- package/esm/types/SeelenEventPayload.d.ts.map +1 -1
- package/esm/types/SeelenWallSettings.d.ts +5 -2
- package/esm/types/SeelenWallSettings.d.ts.map +1 -1
- package/esm/types/SeelenWegSettings.d.ts +4 -0
- package/esm/types/SeelenWegSettings.d.ts.map +1 -1
- package/esm/types/Settings.d.ts +23 -16
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/SettingsByWidget.d.ts +19 -3
- package/esm/types/SettingsByWidget.d.ts.map +1 -1
- package/esm/types/SharedIconPackEntry.d.ts +12 -0
- package/esm/types/SharedIconPackEntry.d.ts.map +1 -0
- package/esm/types/SluHotkey.d.ts +8 -0
- package/esm/types/SluHotkey.d.ts.map +1 -0
- package/esm/types/SluHotkeyAction.d.ts +84 -0
- package/esm/types/SluHotkeyAction.d.ts.map +1 -0
- package/esm/types/SluHotkeyAction.js +2 -0
- package/esm/types/SluPopupConfig.d.ts +2 -0
- package/esm/types/SluPopupConfig.d.ts.map +1 -1
- package/esm/types/SluShortcutsSettings.d.ts +6 -0
- package/esm/types/SluShortcutsSettings.d.ts.map +1 -0
- package/esm/types/Theme.d.ts +5 -0
- package/esm/types/Theme.d.ts.map +1 -1
- package/esm/types/ThemeConfigDefinition.d.ts +6 -0
- package/esm/types/ThemeConfigDefinition.d.ts.map +1 -0
- package/esm/types/ThemeConfigGroup.d.ts +7 -0
- package/esm/types/ThemeConfigGroup.d.ts.map +1 -0
- package/esm/types/ThemeConfigGroup.js +1 -0
- package/esm/types/ThemeId.d.ts +3 -0
- package/esm/types/ThemeId.d.ts.map +1 -1
- package/esm/types/ThemeSettings.d.ts +5 -0
- package/esm/types/ThemeSettings.d.ts.map +1 -0
- package/esm/types/ThemeSettings.js +1 -0
- package/esm/types/ThemeSettingsDefinition.d.ts +2 -2
- package/esm/types/ThemeSettingsDefinition.d.ts.map +1 -1
- package/esm/types/ThemeVariable.d.ts +16 -2
- package/esm/types/ThemeVariable.d.ts.map +1 -1
- package/esm/types/ThemeVariableWithUnit.d.ts +11 -2
- package/esm/types/ThemeVariableWithUnit.d.ts.map +1 -1
- package/esm/types/ThirdPartyPlugin.d.ts +2 -2
- package/esm/types/ThirdPartyPlugin.d.ts.map +1 -1
- package/esm/types/ThirdPartyWidgetSettings.d.ts +1 -1
- package/esm/types/ThirdPartyWidgetSettings.d.ts.map +1 -1
- package/esm/types/UniqueIconPackEntry.d.ts +24 -0
- package/esm/types/UniqueIconPackEntry.d.ts.map +1 -0
- package/esm/types/UniqueIconPackEntry.js +1 -0
- package/esm/types/VirtualDesktopMonitor.d.ts +9 -0
- package/esm/types/VirtualDesktopMonitor.d.ts.map +1 -0
- package/esm/types/VirtualDesktopMonitor.js +1 -0
- package/esm/types/VirtualDesktops.d.ts +15 -0
- package/esm/types/VirtualDesktops.d.ts.map +1 -0
- package/esm/types/VirtualDesktops.js +1 -0
- package/esm/types/Wallpaper.d.ts +11 -0
- package/esm/types/Wallpaper.d.ts.map +1 -0
- package/esm/types/Wallpaper.js +1 -0
- package/esm/types/WallpaperId.d.ts +6 -0
- package/esm/types/WallpaperId.d.ts.map +1 -0
- package/esm/types/WallpaperId.js +1 -0
- package/esm/types/WallpaperInstanceSettings.d.ts +45 -0
- package/esm/types/WallpaperInstanceSettings.d.ts.map +1 -0
- package/esm/types/WallpaperInstanceSettings.js +1 -0
- package/esm/types/WidgetId.d.ts +3 -0
- package/esm/types/WidgetId.d.ts.map +1 -1
- package/esm/types/WindowManagerLayout.d.ts +1 -2
- package/esm/types/WindowManagerLayout.d.ts.map +1 -1
- package/esm/types/WmNode.d.ts +40 -15
- package/esm/types/WmNode.d.ts.map +1 -1
- package/esm/types/WmNodeKind.d.ts +2 -0
- package/esm/types/WmNodeKind.d.ts.map +1 -0
- package/esm/types/WmNodeKind.js +2 -0
- package/esm/types/WmNodeLifetime.d.ts +2 -0
- package/esm/types/WmNodeLifetime.d.ts.map +1 -0
- package/esm/types/WmNodeLifetime.js +2 -0
- package/esm/types/mod.d.ts +215 -201
- package/esm/types/mod.d.ts.map +1 -1
- package/esm/types/mod.js +215 -201
- package/esm/utils/Wrapper.d.ts +3 -0
- package/esm/utils/Wrapper.d.ts.map +1 -0
- package/esm/utils/Wrapper.js +5 -0
- package/package.json +6 -6
- package/script/constants/mod.d.ts +17 -9
- package/script/constants/mod.d.ts.map +1 -1
- package/script/constants/mod.js +6 -4
- package/script/handlers/commands.d.ts +17 -8
- package/script/handlers/commands.d.ts.map +1 -1
- package/script/handlers/commands.js +17 -8
- package/script/handlers/events.d.ts +3 -5
- package/script/handlers/events.d.ts.map +1 -1
- package/script/handlers/events.js +3 -5
- package/script/lib.d.ts +1 -1
- package/script/lib.d.ts.map +1 -1
- package/script/lib.js +1 -1
- package/script/resource/mod.d.ts +6 -0
- package/script/resource/mod.d.ts.map +1 -0
- package/script/state/icon_pack.d.ts +23 -52
- package/script/state/icon_pack.d.ts.map +1 -1
- package/script/state/icon_pack.js +137 -131
- package/script/state/mod.d.ts +2 -1
- package/script/state/mod.d.ts.map +1 -1
- package/script/state/mod.js +1 -0
- package/script/state/plugin/mod.d.ts +1 -1
- package/script/state/plugin/mod.d.ts.map +1 -1
- package/script/state/settings/mod.d.ts +6 -5
- package/script/state/settings/mod.d.ts.map +1 -1
- package/script/state/settings/mod.js +5 -9
- package/script/state/settings/settings_by_monitor.d.ts +1 -4
- package/script/state/settings/settings_by_monitor.d.ts.map +1 -1
- package/script/state/settings/settings_by_monitor.js +1 -9
- package/script/state/settings_by_app.d.ts +1 -1
- package/script/state/settings_by_app.d.ts.map +1 -1
- package/script/state/theme/mod.d.ts +19 -3
- package/script/state/theme/mod.d.ts.map +1 -1
- package/script/state/theme/mod.js +100 -1
- package/script/state/wallpaper/mod.d.ts +15 -0
- package/script/state/wallpaper/mod.d.ts.map +1 -0
- package/script/state/wallpaper/mod.js +36 -0
- package/script/state/weg_items.d.ts +6 -9
- package/script/state/weg_items.d.ts.map +1 -1
- package/script/state/weg_items.js +7 -15
- package/script/state/widget/mod.d.ts +9 -4
- package/script/state/widget/mod.d.ts.map +1 -1
- package/script/state/widget/mod.js +31 -12
- package/script/state/wm_layout.d.ts +4 -5
- package/script/state/wm_layout.d.ts.map +1 -1
- package/script/state/wm_layout.js +5 -11
- package/script/system_state/bluetooth/mod.d.ts +2 -2
- package/script/system_state/bluetooth/mod.d.ts.map +1 -1
- package/script/system_state/language.d.ts +1 -1
- package/script/system_state/language.d.ts.map +1 -1
- package/script/system_state/monitors.d.ts +1 -1
- package/script/system_state/monitors.d.ts.map +1 -1
- package/script/system_state/ui_colors.d.ts +1 -1
- package/script/system_state/ui_colors.d.ts.map +1 -1
- package/script/system_state/ui_colors.js +8 -2
- package/script/system_state/user.d.ts +1 -1
- package/script/system_state/user.d.ts.map +1 -1
- package/script/types/CssVariableName.d.ts +5 -0
- package/script/types/CssVariableName.d.ts.map +1 -0
- package/script/types/CustomIconPackEntry.d.ts +16 -0
- package/script/types/CustomIconPackEntry.d.ts.map +1 -0
- package/script/types/DesktopWorkspace.d.ts +5 -0
- package/script/types/DesktopWorkspace.d.ts.map +1 -1
- package/script/types/FocusedApp.d.ts +4 -0
- package/script/types/FocusedApp.d.ts.map +1 -1
- package/script/types/FocusedApp.js +0 -1
- package/script/types/Icon.d.ts +17 -10
- package/script/types/Icon.d.ts.map +1 -1
- package/script/types/IconPack.d.ts +7 -19
- package/script/types/IconPack.d.ts.map +1 -1
- package/script/types/IconPackEntry.d.ts +11 -0
- package/script/types/IconPackEntry.d.ts.map +1 -0
- package/script/types/IconPackId.d.ts +3 -0
- package/script/types/IconPackId.d.ts.map +1 -1
- package/script/types/MediaPlayer.d.ts +2 -0
- package/script/types/MediaPlayer.d.ts.map +1 -1
- package/script/types/MediaPlayerTimeline.d.ts +24 -0
- package/script/types/MediaPlayerTimeline.d.ts.map +1 -0
- package/script/types/MixBlendMode.d.ts +2 -0
- package/script/types/MixBlendMode.d.ts.map +1 -0
- package/script/types/MonitorConfiguration.d.ts +0 -5
- package/script/types/MonitorConfiguration.d.ts.map +1 -1
- package/script/types/MonitorId.d.ts +2 -0
- package/script/types/MonitorId.d.ts.map +1 -0
- package/script/types/MonitorSettingsByWidget.d.ts +1 -10
- package/script/types/MonitorSettingsByWidget.d.ts.map +1 -1
- package/script/types/ObjectFit.d.ts +2 -0
- package/script/types/ObjectFit.d.ts.map +1 -0
- package/script/types/ObjectPosition.d.ts +2 -0
- package/script/types/ObjectPosition.d.ts.map +1 -0
- package/script/types/PhysicalMonitor.d.ts +2 -1
- package/script/types/PhysicalMonitor.d.ts.map +1 -1
- package/script/types/PlaybackSpeed.d.ts +2 -0
- package/script/types/PlaybackSpeed.d.ts.map +1 -0
- package/script/types/PluginId.d.ts +3 -0
- package/script/types/PluginId.d.ts.map +1 -1
- package/script/types/Resource.d.ts +35 -3
- package/script/types/Resource.d.ts.map +1 -1
- package/script/types/ResourceAttribute.d.ts +2 -0
- package/script/types/ResourceAttribute.d.ts.map +1 -0
- package/script/types/ResourceId.d.ts +4 -2
- package/script/types/ResourceId.d.ts.map +1 -1
- package/script/types/ResourceMetadata.d.ts +2 -6
- package/script/types/ResourceMetadata.d.ts.map +1 -1
- package/script/types/SeelenCommandArgument.d.ts +43 -18
- package/script/types/SeelenCommandArgument.d.ts.map +1 -1
- package/script/types/SeelenCommandClosePopupArgs.d.ts +4 -0
- package/script/types/SeelenCommandClosePopupArgs.d.ts.map +1 -0
- package/script/types/SeelenCommandClosePopupArgs.js +3 -0
- package/script/types/SeelenCommandCreatePopupArgs.d.ts +5 -0
- package/script/types/SeelenCommandCreatePopupArgs.d.ts.map +1 -0
- package/script/types/SeelenCommandRemoveResourceArgs.d.ts +7 -0
- package/script/types/SeelenCommandRemoveResourceArgs.d.ts.map +1 -0
- package/script/types/SeelenCommandRequestToUserInputShortcutArgs.d.ts +4 -0
- package/script/types/SeelenCommandRequestToUserInputShortcutArgs.d.ts.map +1 -0
- package/script/types/SeelenCommandRequestToUserInputShortcutArgs.js +3 -0
- package/script/types/SeelenCommandReturn.d.ts +38 -16
- package/script/types/SeelenCommandReturn.d.ts.map +1 -1
- package/script/types/SeelenCommandSetNativeShellWallpaperArgs.d.ts +4 -0
- package/script/types/SeelenCommandSetNativeShellWallpaperArgs.d.ts.map +1 -0
- package/script/types/SeelenCommandSetNativeShellWallpaperArgs.js +3 -0
- package/script/types/SeelenCommandStateGetWegItemsArgs.d.ts +5 -0
- package/script/types/SeelenCommandStateGetWegItemsArgs.d.ts.map +1 -0
- package/script/types/SeelenCommandStateSetCustomIconPackArgs.d.ts +5 -0
- package/script/types/SeelenCommandStateSetCustomIconPackArgs.d.ts.map +1 -0
- package/script/types/SeelenCommandSwitchWorkspaceArgs.d.ts +2 -0
- package/script/types/SeelenCommandSwitchWorkspaceArgs.d.ts.map +1 -1
- package/script/types/SeelenCommandSwitchWorkspaceArgs.js +0 -1
- package/script/types/SeelenCommandUpdatePopupArgs.d.ts +6 -0
- package/script/types/SeelenCommandUpdatePopupArgs.d.ts.map +1 -0
- package/script/types/SeelenEventPayload.d.ts +10 -14
- package/script/types/SeelenEventPayload.d.ts.map +1 -1
- package/script/types/SeelenWallSettings.d.ts +5 -2
- package/script/types/SeelenWallSettings.d.ts.map +1 -1
- package/script/types/SeelenWegSettings.d.ts +4 -0
- package/script/types/SeelenWegSettings.d.ts.map +1 -1
- package/script/types/Settings.d.ts +23 -16
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/SettingsByWidget.d.ts +19 -3
- package/script/types/SettingsByWidget.d.ts.map +1 -1
- package/script/types/SharedIconPackEntry.d.ts +12 -0
- package/script/types/SharedIconPackEntry.d.ts.map +1 -0
- package/script/types/SluHotkey.d.ts +8 -0
- package/script/types/SluHotkey.d.ts.map +1 -0
- package/script/types/SluHotkeyAction.d.ts +84 -0
- package/script/types/SluHotkeyAction.d.ts.map +1 -0
- package/script/types/SluHotkeyAction.js +3 -0
- package/script/types/SluPopupConfig.d.ts +2 -0
- package/script/types/SluPopupConfig.d.ts.map +1 -1
- package/script/types/SluShortcutsSettings.d.ts +6 -0
- package/script/types/SluShortcutsSettings.d.ts.map +1 -0
- package/script/types/Theme.d.ts +5 -0
- package/script/types/Theme.d.ts.map +1 -1
- package/script/types/ThemeConfigDefinition.d.ts +6 -0
- package/script/types/ThemeConfigDefinition.d.ts.map +1 -0
- package/script/types/ThemeConfigGroup.d.ts +7 -0
- package/script/types/ThemeConfigGroup.d.ts.map +1 -0
- package/script/types/ThemeConfigGroup.js +2 -0
- package/script/types/ThemeId.d.ts +3 -0
- package/script/types/ThemeId.d.ts.map +1 -1
- package/script/types/ThemeSettings.d.ts +5 -0
- package/script/types/ThemeSettings.d.ts.map +1 -0
- package/script/types/ThemeSettings.js +2 -0
- package/script/types/ThemeSettingsDefinition.d.ts +2 -2
- package/script/types/ThemeSettingsDefinition.d.ts.map +1 -1
- package/script/types/ThemeVariable.d.ts +16 -2
- package/script/types/ThemeVariable.d.ts.map +1 -1
- package/script/types/ThemeVariableWithUnit.d.ts +11 -2
- package/script/types/ThemeVariableWithUnit.d.ts.map +1 -1
- package/script/types/ThirdPartyPlugin.d.ts +2 -2
- package/script/types/ThirdPartyPlugin.d.ts.map +1 -1
- package/script/types/ThirdPartyWidgetSettings.d.ts +1 -1
- package/script/types/ThirdPartyWidgetSettings.d.ts.map +1 -1
- package/script/types/UniqueIconPackEntry.d.ts +24 -0
- package/script/types/UniqueIconPackEntry.d.ts.map +1 -0
- package/script/types/UniqueIconPackEntry.js +2 -0
- package/script/types/VirtualDesktopMonitor.d.ts +9 -0
- package/script/types/VirtualDesktopMonitor.d.ts.map +1 -0
- package/script/types/VirtualDesktopMonitor.js +2 -0
- package/script/types/VirtualDesktops.d.ts +15 -0
- package/script/types/VirtualDesktops.d.ts.map +1 -0
- package/script/types/VirtualDesktops.js +2 -0
- package/script/types/Wallpaper.d.ts +11 -0
- package/script/types/Wallpaper.d.ts.map +1 -0
- package/script/types/Wallpaper.js +2 -0
- package/script/types/WallpaperId.d.ts +6 -0
- package/script/types/WallpaperId.d.ts.map +1 -0
- package/script/types/WallpaperId.js +2 -0
- package/script/types/WallpaperInstanceSettings.d.ts +45 -0
- package/script/types/WallpaperInstanceSettings.d.ts.map +1 -0
- package/script/types/WallpaperInstanceSettings.js +2 -0
- package/script/types/WidgetId.d.ts +3 -0
- package/script/types/WidgetId.d.ts.map +1 -1
- package/script/types/WindowManagerLayout.d.ts +1 -2
- package/script/types/WindowManagerLayout.d.ts.map +1 -1
- package/script/types/WmNode.d.ts +40 -15
- package/script/types/WmNode.d.ts.map +1 -1
- package/script/types/WmNodeKind.d.ts +2 -0
- package/script/types/WmNodeKind.d.ts.map +1 -0
- package/script/types/WmNodeKind.js +3 -0
- package/script/types/WmNodeLifetime.d.ts +2 -0
- package/script/types/WmNodeLifetime.d.ts.map +1 -0
- package/script/types/WmNodeLifetime.js +3 -0
- package/script/types/mod.d.ts +215 -201
- package/script/types/mod.d.ts.map +1 -1
- package/script/types/mod.js +215 -201
- package/script/utils/Wrapper.d.ts +3 -0
- package/script/utils/Wrapper.d.ts.map +1 -0
- package/script/utils/Wrapper.js +8 -0
- package/esm/resource.d.ts +0 -6
- package/esm/resource.d.ts.map +0 -1
- package/esm/types/AhkVar.d.ts +0 -7
- package/esm/types/AhkVar.d.ts.map +0 -1
- package/esm/types/AhkVarList.d.ts +0 -64
- package/esm/types/AhkVarList.d.ts.map +0 -1
- package/esm/types/FancyToolbarSettingsByMonitor.d.ts +0 -4
- package/esm/types/FancyToolbarSettingsByMonitor.d.ts.map +0 -1
- package/esm/types/NoFallbackBehavior.d.ts +0 -2
- package/esm/types/NoFallbackBehavior.d.ts.map +0 -1
- package/esm/types/NodeSubtype.d.ts +0 -2
- package/esm/types/NodeSubtype.d.ts.map +0 -1
- package/esm/types/SeelenCommandStateSetWallpaperArgs.d.ts +0 -4
- package/esm/types/SeelenCommandStateSetWallpaperArgs.d.ts.map +0 -1
- package/esm/types/SeelenWallSettingsByMonitor.d.ts +0 -6
- package/esm/types/SeelenWallSettingsByMonitor.d.ts.map +0 -1
- package/esm/types/SeelenWallWallpaper.d.ts +0 -5
- package/esm/types/SeelenWallWallpaper.d.ts.map +0 -1
- package/esm/types/SeelenWegSettingsByMonitor.d.ts +0 -8
- package/esm/types/SeelenWegSettingsByMonitor.d.ts.map +0 -1
- package/esm/types/VirtualDesktopStrategy.d.ts +0 -2
- package/esm/types/VirtualDesktopStrategy.d.ts.map +0 -1
- package/esm/types/WindowManagerSettingsByMonitor.d.ts +0 -9
- package/esm/types/WindowManagerSettingsByMonitor.d.ts.map +0 -1
- package/esm/types/WmFallbackNode.d.ts +0 -25
- package/esm/types/WmFallbackNode.d.ts.map +0 -1
- package/esm/types/WmHorizontalNode.d.ts +0 -19
- package/esm/types/WmHorizontalNode.d.ts.map +0 -1
- package/esm/types/WmLeafNode.d.ts +0 -21
- package/esm/types/WmLeafNode.d.ts.map +0 -1
- package/esm/types/WmStackNode.d.ts +0 -25
- package/esm/types/WmStackNode.d.ts.map +0 -1
- package/esm/types/WmVerticalNode.d.ts +0 -19
- package/esm/types/WmVerticalNode.d.ts.map +0 -1
- package/esm/types/WorkspaceConfiguration.d.ts +0 -8
- package/esm/types/WorkspaceConfiguration.d.ts.map +0 -1
- package/esm/types/WorkspaceIdentifier.d.ts +0 -6
- package/esm/types/WorkspaceIdentifier.d.ts.map +0 -1
- package/esm/types/WorkspaceIdentifierType.d.ts +0 -2
- package/esm/types/WorkspaceIdentifierType.d.ts.map +0 -1
- package/script/resource.d.ts +0 -6
- package/script/resource.d.ts.map +0 -1
- package/script/types/AhkVar.d.ts +0 -7
- package/script/types/AhkVar.d.ts.map +0 -1
- package/script/types/AhkVarList.d.ts +0 -64
- package/script/types/AhkVarList.d.ts.map +0 -1
- package/script/types/FancyToolbarSettingsByMonitor.d.ts +0 -4
- package/script/types/FancyToolbarSettingsByMonitor.d.ts.map +0 -1
- package/script/types/NoFallbackBehavior.d.ts +0 -2
- package/script/types/NoFallbackBehavior.d.ts.map +0 -1
- package/script/types/NodeSubtype.d.ts +0 -2
- package/script/types/NodeSubtype.d.ts.map +0 -1
- package/script/types/SeelenCommandStateSetWallpaperArgs.d.ts +0 -4
- package/script/types/SeelenCommandStateSetWallpaperArgs.d.ts.map +0 -1
- package/script/types/SeelenWallSettingsByMonitor.d.ts +0 -6
- package/script/types/SeelenWallSettingsByMonitor.d.ts.map +0 -1
- package/script/types/SeelenWallWallpaper.d.ts +0 -5
- package/script/types/SeelenWallWallpaper.d.ts.map +0 -1
- package/script/types/SeelenWegSettingsByMonitor.d.ts +0 -8
- package/script/types/SeelenWegSettingsByMonitor.d.ts.map +0 -1
- package/script/types/VirtualDesktopStrategy.d.ts +0 -2
- package/script/types/VirtualDesktopStrategy.d.ts.map +0 -1
- package/script/types/WindowManagerSettingsByMonitor.d.ts +0 -9
- package/script/types/WindowManagerSettingsByMonitor.d.ts.map +0 -1
- package/script/types/WmFallbackNode.d.ts +0 -25
- package/script/types/WmFallbackNode.d.ts.map +0 -1
- package/script/types/WmHorizontalNode.d.ts +0 -19
- package/script/types/WmHorizontalNode.d.ts.map +0 -1
- package/script/types/WmLeafNode.d.ts +0 -21
- package/script/types/WmLeafNode.d.ts.map +0 -1
- package/script/types/WmStackNode.d.ts +0 -25
- package/script/types/WmStackNode.d.ts.map +0 -1
- package/script/types/WmVerticalNode.d.ts +0 -19
- package/script/types/WmVerticalNode.d.ts.map +0 -1
- package/script/types/WorkspaceConfiguration.d.ts +0 -8
- package/script/types/WorkspaceConfiguration.d.ts.map +0 -1
- package/script/types/WorkspaceIdentifier.d.ts +0 -6
- package/script/types/WorkspaceIdentifier.d.ts.map +0 -1
- package/script/types/WorkspaceIdentifierType.d.ts +0 -2
- package/script/types/WorkspaceIdentifierType.d.ts.map +0 -1
- /package/esm/{resource.js → resource/mod.js} +0 -0
- /package/esm/types/{AhkVar.js → CssVariableName.js} +0 -0
- /package/esm/types/{AhkVarList.js → CustomIconPackEntry.js} +0 -0
- /package/esm/types/{SeelenWallSettingsByMonitor.js → IconPackEntry.js} +0 -0
- /package/esm/types/{FancyToolbarSettingsByMonitor.js → MediaPlayerTimeline.js} +0 -0
- /package/esm/types/{NoFallbackBehavior.js → MixBlendMode.js} +0 -0
- /package/esm/types/{NodeSubtype.js → MonitorId.js} +0 -0
- /package/esm/types/{SeelenCommandStateSetWallpaperArgs.js → ObjectFit.js} +0 -0
- /package/esm/types/{SeelenWallWallpaper.js → ObjectPosition.js} +0 -0
- /package/esm/types/{VirtualDesktopStrategy.js → PlaybackSpeed.js} +0 -0
- /package/esm/types/{WorkspaceIdentifierType.js → ResourceAttribute.js} +0 -0
- /package/esm/types/{SeelenWegSettingsByMonitor.js → SeelenCommandCreatePopupArgs.js} +0 -0
- /package/esm/types/{WindowManagerSettingsByMonitor.js → SeelenCommandRemoveResourceArgs.js} +0 -0
- /package/esm/types/{WmFallbackNode.js → SeelenCommandStateGetWegItemsArgs.js} +0 -0
- /package/esm/types/{WmHorizontalNode.js → SeelenCommandStateSetCustomIconPackArgs.js} +0 -0
- /package/esm/types/{WmLeafNode.js → SeelenCommandUpdatePopupArgs.js} +0 -0
- /package/esm/types/{WmStackNode.js → SharedIconPackEntry.js} +0 -0
- /package/esm/types/{WmVerticalNode.js → SluHotkey.js} +0 -0
- /package/esm/types/{WorkspaceConfiguration.js → SluShortcutsSettings.js} +0 -0
- /package/esm/types/{WorkspaceIdentifier.js → ThemeConfigDefinition.js} +0 -0
- /package/script/{resource.js → resource/mod.js} +0 -0
- /package/script/types/{AhkVar.js → CssVariableName.js} +0 -0
- /package/script/types/{AhkVarList.js → CustomIconPackEntry.js} +0 -0
- /package/script/types/{SeelenWallSettingsByMonitor.js → IconPackEntry.js} +0 -0
- /package/script/types/{FancyToolbarSettingsByMonitor.js → MediaPlayerTimeline.js} +0 -0
- /package/script/types/{NoFallbackBehavior.js → MixBlendMode.js} +0 -0
- /package/script/types/{NodeSubtype.js → MonitorId.js} +0 -0
- /package/script/types/{SeelenCommandStateSetWallpaperArgs.js → ObjectFit.js} +0 -0
- /package/script/types/{SeelenWallWallpaper.js → ObjectPosition.js} +0 -0
- /package/script/types/{VirtualDesktopStrategy.js → PlaybackSpeed.js} +0 -0
- /package/script/types/{WorkspaceIdentifierType.js → ResourceAttribute.js} +0 -0
- /package/script/types/{SeelenWegSettingsByMonitor.js → SeelenCommandCreatePopupArgs.js} +0 -0
- /package/script/types/{WindowManagerSettingsByMonitor.js → SeelenCommandRemoveResourceArgs.js} +0 -0
- /package/script/types/{WmFallbackNode.js → SeelenCommandStateGetWegItemsArgs.js} +0 -0
- /package/script/types/{WmHorizontalNode.js → SeelenCommandStateSetCustomIconPackArgs.js} +0 -0
- /package/script/types/{WmLeafNode.js → SeelenCommandUpdatePopupArgs.js} +0 -0
- /package/script/types/{WmStackNode.js → SharedIconPackEntry.js} +0 -0
- /package/script/types/{WmVerticalNode.js → SluHotkey.js} +0 -0
- /package/script/types/{WorkspaceConfiguration.js → SluShortcutsSettings.js} +0 -0
- /package/script/types/{WorkspaceIdentifier.js → ThemeConfigDefinition.js} +0 -0
package/esm/state/theme/mod.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { SeelenCommand, SeelenEvent } from '../../handlers/mod.js';
|
|
2
2
|
import { List } from '../../utils/List.js';
|
|
3
3
|
import { newFromInvoke, newOnEvent } from '../../utils/State.js';
|
|
4
|
+
import { Widget } from '../widget/mod.js';
|
|
5
|
+
import { Settings } from '../settings/mod.js';
|
|
6
|
+
import { UIColors } from '../../system_state/ui_colors.js';
|
|
4
7
|
export class ThemeList extends List {
|
|
5
8
|
static getAsync() {
|
|
6
9
|
return newFromInvoke(this, SeelenCommand.StateGetThemes);
|
|
@@ -8,4 +11,97 @@ export class ThemeList extends List {
|
|
|
8
11
|
static onChange(cb) {
|
|
9
12
|
return newOnEvent(cb, this, SeelenEvent.StateThemesChanged);
|
|
10
13
|
}
|
|
14
|
+
applyToDocument(activeIds, variables) {
|
|
15
|
+
const enabledThemes = [];
|
|
16
|
+
for (const theme of this.asArray()) {
|
|
17
|
+
if (activeIds.includes(theme.id)) {
|
|
18
|
+
enabledThemes.push(new Theme(theme));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
// sort by user order
|
|
22
|
+
enabledThemes.sort((a, b) => activeIds.indexOf(a.id) - activeIds.indexOf(b.id));
|
|
23
|
+
removeAllThemeStyles();
|
|
24
|
+
for (const theme of enabledThemes) {
|
|
25
|
+
theme.applyToDocument(variables[theme.id]);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class Theme {
|
|
30
|
+
constructor(plain) {
|
|
31
|
+
Object.assign(this, plain);
|
|
32
|
+
}
|
|
33
|
+
forEachVariableDefinition(cb) {
|
|
34
|
+
iterateVariableDefinitions(this.settings, cb);
|
|
35
|
+
}
|
|
36
|
+
/** Will add the styles targeting the current widget id */
|
|
37
|
+
applyToDocument(varValues = {}) {
|
|
38
|
+
const widgetId = Widget.getCurrentWidgetId();
|
|
39
|
+
let styles = ``;
|
|
40
|
+
this.forEachVariableDefinition((def) => {
|
|
41
|
+
if (!isValidCssVariableName(def.name)) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
styles += `
|
|
45
|
+
@property ${def.name} {
|
|
46
|
+
syntax: "${def.syntax}";
|
|
47
|
+
inherits: true;
|
|
48
|
+
initial-value: ${def.initialValue}${'initialValueUnit' in def ? def.initialValueUnit : ''}
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
});
|
|
52
|
+
const layerName = 'theme-' + this.metadata.path.toLowerCase().replaceAll(/[^a-zA-Z0-9]/g, '_');
|
|
53
|
+
styles += `@layer ${layerName}-shared {\n${this.sharedStyles}\n}\n`;
|
|
54
|
+
const variablesContent = Object.entries(varValues)
|
|
55
|
+
.filter(([name]) => isValidCssVariableName(name))
|
|
56
|
+
.map(([name, value]) => `${name}: ${value || ''};`)
|
|
57
|
+
.join('\n');
|
|
58
|
+
styles += `@layer ${layerName} {\n:root {${variablesContent}}\n${this.styles[widgetId] ?? ''}\n}\n`;
|
|
59
|
+
this.removeFromDocument(); // remove old styles
|
|
60
|
+
const styleElement = document.createElement('style');
|
|
61
|
+
styleElement.id = this.id;
|
|
62
|
+
styleElement.textContent = styles;
|
|
63
|
+
styleElement.setAttribute('data-resource-type', 'theme');
|
|
64
|
+
document.head.appendChild(styleElement);
|
|
65
|
+
}
|
|
66
|
+
removeFromDocument() {
|
|
67
|
+
document.getElementById(this.id)?.remove();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function isValidCssVariableName(name) {
|
|
71
|
+
return /^--[\w\d-]*$/.test(name);
|
|
72
|
+
}
|
|
73
|
+
function iterateVariableDefinitions(defs, cb) {
|
|
74
|
+
for (const def of defs) {
|
|
75
|
+
if ('group' in def) {
|
|
76
|
+
iterateVariableDefinitions(def.group.items, cb);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
cb(def);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
export function removeAllThemeStyles() {
|
|
84
|
+
const elements = document.querySelectorAll(`style[data-resource-type="theme"]`);
|
|
85
|
+
for (const element of elements) {
|
|
86
|
+
element.remove();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* This will apply the active themes for this widget, and automatically update
|
|
91
|
+
* when the themes or settings change. Also will add the systehm ui colors to the document.
|
|
92
|
+
*/
|
|
93
|
+
export async function startThemingTool() {
|
|
94
|
+
let settings = await Settings.getAsync();
|
|
95
|
+
let themes = await ThemeList.getAsync();
|
|
96
|
+
await ThemeList.onChange((newThemes) => {
|
|
97
|
+
themes = newThemes;
|
|
98
|
+
themes.applyToDocument(settings.activeThemes, settings.byTheme);
|
|
99
|
+
});
|
|
100
|
+
await Settings.onChange((newSettings) => {
|
|
101
|
+
settings = newSettings;
|
|
102
|
+
themes.applyToDocument(settings.activeThemes, settings.byTheme);
|
|
103
|
+
});
|
|
104
|
+
(await UIColors.getAsync()).setAsCssVariables();
|
|
105
|
+
await UIColors.onChange((colors) => colors.setAsCssVariables());
|
|
106
|
+
themes.applyToDocument(settings.activeThemes, settings.byTheme);
|
|
11
107
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { List } from '../../utils/List.js';
|
|
2
|
+
import type { Wallpaper as IWallpaper } from '../../types/mod.js';
|
|
3
|
+
import { type UnSubscriber } from '../../handlers/mod.js';
|
|
4
|
+
import { Wrapper } from '../../utils/Wrapper.js';
|
|
5
|
+
import type { WallpaperInstanceSettings } from '../../types/WallpaperInstanceSettings.js';
|
|
6
|
+
export declare const SUPPORTED_IMAGE_WALLPAPER_EXTENSIONS: string[];
|
|
7
|
+
export declare const SUPPORTED_VIDEO_WALLPAPER_EXTENSIONS: string[];
|
|
8
|
+
export declare class WallpaperList extends List<IWallpaper> {
|
|
9
|
+
static getAsync(): Promise<WallpaperList>;
|
|
10
|
+
static onChange(cb: (payload: WallpaperList) => void): Promise<UnSubscriber>;
|
|
11
|
+
}
|
|
12
|
+
export declare class WallpaperConfiguration extends Wrapper<WallpaperInstanceSettings> {
|
|
13
|
+
static default(): Promise<WallpaperConfiguration>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/state/wallpaper/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAE1F,eAAO,MAAM,oCAAoC,UAYhD,CAAC;AAEF,eAAO,MAAM,oCAAoC,UAAsD,CAAC;AAExG,qBAAa,aAAc,SAAQ,IAAI,CAAC,UAAU,CAAC;IACjD,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,aAAa,CAAC;IAIzC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;CAG7E;AAED,qBAAa,sBAAuB,SAAQ,OAAO,CAAC,yBAAyB,CAAC;IAC5E,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,sBAAsB,CAAC;CAGlD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { List } from '../../utils/List.js';
|
|
2
|
+
import { newFromInvoke, newOnEvent } from '../../utils/State.js';
|
|
3
|
+
import { SeelenCommand, SeelenEvent } from '../../handlers/mod.js';
|
|
4
|
+
import { Wrapper } from '../../utils/Wrapper.js';
|
|
5
|
+
export const SUPPORTED_IMAGE_WALLPAPER_EXTENSIONS = [
|
|
6
|
+
'apng',
|
|
7
|
+
'avif',
|
|
8
|
+
'gif',
|
|
9
|
+
'jpg',
|
|
10
|
+
'jpeg',
|
|
11
|
+
'png',
|
|
12
|
+
'svg',
|
|
13
|
+
'webp',
|
|
14
|
+
'bmp',
|
|
15
|
+
'ico',
|
|
16
|
+
'tiff',
|
|
17
|
+
];
|
|
18
|
+
export const SUPPORTED_VIDEO_WALLPAPER_EXTENSIONS = ['mp4', 'webm', 'ogg', 'avi', 'mov', 'mkv', 'mpeg'];
|
|
19
|
+
export class WallpaperList extends List {
|
|
20
|
+
static getAsync() {
|
|
21
|
+
return newFromInvoke(this, SeelenCommand.StateGetWallpapers);
|
|
22
|
+
}
|
|
23
|
+
static onChange(cb) {
|
|
24
|
+
return newOnEvent(cb, this, SeelenEvent.StateWallpapersChanged);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export class WallpaperConfiguration extends Wrapper {
|
|
28
|
+
static default() {
|
|
29
|
+
return newFromInvoke(this, SeelenCommand.StateGetDefaultWallpaperSettings);
|
|
30
|
+
}
|
|
31
|
+
}
|
package/esm/state/weg_items.d.ts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import type { WegItem, WegItems as IWegItems } from '../types/mod.js';
|
|
1
|
+
import type { MonitorId, WegItem, WegItems as IWegItems } from '../types/mod.js';
|
|
2
2
|
import { type UnSubscriber } from '../handlers/mod.js';
|
|
3
3
|
import type { Enum } from '../utils/enums.js';
|
|
4
4
|
export declare class WegItems {
|
|
5
5
|
inner: IWegItems;
|
|
6
6
|
constructor(inner: IWegItems);
|
|
7
|
-
/** Will return the
|
|
8
|
-
static
|
|
9
|
-
/**
|
|
10
|
-
static
|
|
11
|
-
|
|
12
|
-
static forCurrentWidget(): Promise<WegItems>;
|
|
13
|
-
/** Event triggered when the weg items for the current widget are changed */
|
|
14
|
-
static forCurrentWidgetChange(cb: (user: WegItems) => void): Promise<UnSubscriber>;
|
|
7
|
+
/** Will return the weg items state without filtering by monitor */
|
|
8
|
+
static getNonFiltered(): Promise<WegItems>;
|
|
9
|
+
/** Will return the weg items state for a specific monitor */
|
|
10
|
+
static getForMonitor(monitorId: MonitorId): Promise<WegItems>;
|
|
11
|
+
static onChange(cb: () => void): Promise<UnSubscriber>;
|
|
15
12
|
/** Will store the weg items placeoments on disk */
|
|
16
13
|
save(): Promise<void>;
|
|
17
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"weg_items.d.ts","sourceRoot":"","sources":["../../src/state/weg_items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"weg_items.d.ts","sourceRoot":"","sources":["../../src/state/weg_items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAiD,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,QAAQ;IACA,KAAK,EAAE,SAAS;gBAAhB,KAAK,EAAE,SAAS;IAEnC,mEAAmE;IACnE,MAAM,CAAC,cAAc,IAAI,OAAO,CAAC,QAAQ,CAAC;IAI1C,6DAA6D;IAC7D,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI7D,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;IAItD,mDAAmD;IACnD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAGtB;AAMD,QAAA,MAAM,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAMtC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/esm/state/weg_items.js
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
import { invoke, SeelenCommand, SeelenEvent } from '../handlers/mod.js';
|
|
2
|
-
import { newFromInvoke
|
|
3
|
-
import { getCurrentWindow } from '@tauri-apps/api/window';
|
|
1
|
+
import { invoke, SeelenCommand, SeelenEvent, subscribe } from '../handlers/mod.js';
|
|
2
|
+
import { newFromInvoke } from '../utils/State.js';
|
|
4
3
|
export class WegItems {
|
|
5
4
|
inner;
|
|
6
5
|
constructor(inner) {
|
|
7
6
|
this.inner = inner;
|
|
8
7
|
}
|
|
9
|
-
/** Will return the
|
|
10
|
-
static
|
|
8
|
+
/** Will return the weg items state without filtering by monitor */
|
|
9
|
+
static getNonFiltered() {
|
|
11
10
|
return newFromInvoke(this, SeelenCommand.StateGetWegItems);
|
|
12
11
|
}
|
|
13
|
-
/**
|
|
14
|
-
static
|
|
15
|
-
return
|
|
12
|
+
/** Will return the weg items state for a specific monitor */
|
|
13
|
+
static getForMonitor(monitorId) {
|
|
14
|
+
return newFromInvoke(this, SeelenCommand.StateGetWegItems, { monitorId });
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return newFromInvoke(this, SeelenCommand.WegGetItemsForWidget);
|
|
20
|
-
}
|
|
21
|
-
/** Event triggered when the weg items for the current widget are changed */
|
|
22
|
-
static forCurrentWidgetChange(cb) {
|
|
23
|
-
return newOnEvent(cb, this, SeelenEvent.WegInstanceChanged, {
|
|
24
|
-
target: { kind: 'Webview', label: getCurrentWindow().label },
|
|
25
|
-
});
|
|
16
|
+
static onChange(cb) {
|
|
17
|
+
return subscribe(SeelenEvent.StateWegItemsChanged, () => cb());
|
|
26
18
|
}
|
|
27
19
|
/** Will store the weg items placeoments on disk */
|
|
28
20
|
save() {
|
|
@@ -11,15 +11,16 @@ export declare const SeelenLauncherWidgetId: WidgetId;
|
|
|
11
11
|
export declare const SeelenWallWidgetId: WidgetId;
|
|
12
12
|
export declare class WidgetList extends List<IWidget> {
|
|
13
13
|
static getAsync(): Promise<WidgetList>;
|
|
14
|
-
static onChange(cb: (
|
|
14
|
+
static onChange(cb: (payload: WidgetList) => void): Promise<UnSubscriber>;
|
|
15
|
+
findById(id: WidgetId): IWidget | undefined;
|
|
15
16
|
}
|
|
16
17
|
interface WidgetInformation {
|
|
17
18
|
/** decoded webview label */
|
|
18
19
|
label: string;
|
|
19
20
|
/** Will be present if the widget replicas is set to by monitor */
|
|
20
|
-
monitorId
|
|
21
|
+
monitorId: string | null;
|
|
21
22
|
/** Will be present if the widget replicas is set to multiple */
|
|
22
|
-
instanceId
|
|
23
|
+
instanceId: string | null;
|
|
23
24
|
/** params present on the webview label */
|
|
24
25
|
params: {
|
|
25
26
|
readonly [key in string]?: string;
|
|
@@ -38,8 +39,12 @@ export declare class Widget {
|
|
|
38
39
|
/** current webview window */
|
|
39
40
|
readonly webview: WebviewWindow;
|
|
40
41
|
private constructor();
|
|
42
|
+
private static getDecodedWebviewLabel;
|
|
43
|
+
/** Will throw if the library is being used on a non Seelen UI environment */
|
|
41
44
|
static getCurrentWidgetId(): WidgetId;
|
|
42
|
-
|
|
45
|
+
/** Will throw if the library is being used on a non Seelen UI environment */
|
|
46
|
+
static getCurrent(): Widget;
|
|
47
|
+
private static getCurrentAsync;
|
|
43
48
|
private static getEntryDefaultValues;
|
|
44
49
|
/** Returns the default config of the widget, declared on the widget definition */
|
|
45
50
|
getDefaultConfig(): ThirdPartyWidgetSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/state/widget/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,IAAI,OAAO,EAAE,QAAQ,EAAiB,MAAM,oBAAoB,CAAC;AAC/G,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAM5F,eAAO,MAAM,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/state/widget/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,IAAI,OAAO,EAAE,QAAQ,EAAiB,MAAM,oBAAoB,CAAC;AAC/G,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAM5F,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,sBAAsB,EAAE,QAAyC,CAAC;AAC/E,eAAO,MAAM,kBAAkB,EAAE,QAAkD,CAAC;AAEpF,qBAAa,UAAW,SAAQ,IAAI,CAAC,OAAO,CAAC;IAC3C,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC;IAItC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;IAIzE,QAAQ,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS;CAG5C;AAED,UAAU,iBAAiB;IACzB,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;;GAEG;AACH,qBAAa,MAAM;IACjB,gBAAgB;IAChB,SAAgB,EAAE,EAAE,QAAQ,CAAC;IAC7B,wBAAwB;IACxB,SAAgB,GAAG,EAAE,OAAO,CAAC;IAC7B,0CAA0C;IAC1C,SAAgB,OAAO,EAAE,iBAAiB,CAAC;IAC3C,6BAA6B;IAC7B,SAAgB,OAAO,EAAE,aAAa,CAAC;IAEvC,OAAO;IAiBP,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAUrC,6EAA6E;IAC7E,MAAM,CAAC,kBAAkB,IAAI,QAAQ;IAIrC,6EAA6E;IAC7E,MAAM,CAAC,UAAU,IAAI,MAAM;mBAON,eAAe;IAUpC,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAUpC,kFAAkF;IAClF,gBAAgB,IAAI,wBAAwB;IAU5C,OAAO,CAAC,YAAY;IAiBpB,iDAAiD;IAC3C,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAQzC,kDAAkD;IAC5C,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAQzC;;;OAGG;IACG,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;CAkC9C"}
|
package/esm/state/widget/mod.js
CHANGED
|
@@ -20,6 +20,9 @@ export class WidgetList extends List {
|
|
|
20
20
|
static onChange(cb) {
|
|
21
21
|
return newOnEvent(cb, this, SeelenEvent.StateWidgetsChanged);
|
|
22
22
|
}
|
|
23
|
+
findById(id) {
|
|
24
|
+
return this.asArray().find((widget) => widget.id === id);
|
|
25
|
+
}
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
* Represents the widget instance running in the current webview
|
|
@@ -36,33 +39,41 @@ export class Widget {
|
|
|
36
39
|
constructor(widget) {
|
|
37
40
|
this.def = widget;
|
|
38
41
|
this.webview = getCurrentWebviewWindow();
|
|
39
|
-
const
|
|
40
|
-
const decodedLabel = new TextDecoder().decode(decodeBase64Url(encodedLabel));
|
|
41
|
-
const [id, query] = decodedLabel.split('?');
|
|
42
|
+
const [id, query] = Widget.getDecodedWebviewLabel();
|
|
42
43
|
const params = new URLSearchParams(query);
|
|
43
44
|
const paramsObj = Object.freeze(Object.fromEntries(params));
|
|
44
45
|
this.id = id;
|
|
45
46
|
this.decoded = Object.freeze({
|
|
46
|
-
label:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
instanceId: paramsObj.instanceId,
|
|
47
|
+
label: `${id}${query ? `?${query}` : ''}`,
|
|
48
|
+
monitorId: paramsObj.monitorId || null,
|
|
49
|
+
instanceId: paramsObj.instanceId || null,
|
|
50
50
|
params: Object.freeze(Object.fromEntries(params)),
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
static
|
|
53
|
+
static getDecodedWebviewLabel() {
|
|
54
54
|
const encondedLabel = getCurrentWebviewWindow().label;
|
|
55
55
|
const decodedLabel = new TextDecoder().decode(decodeBase64Url(encondedLabel));
|
|
56
|
-
const [id] = decodedLabel.split('?');
|
|
56
|
+
const [id, query] = decodedLabel.split('?');
|
|
57
57
|
if (!id) {
|
|
58
58
|
throw new Error('Missing widget id on webview label');
|
|
59
59
|
}
|
|
60
|
-
return id;
|
|
60
|
+
return [id, query];
|
|
61
|
+
}
|
|
62
|
+
/** Will throw if the library is being used on a non Seelen UI environment */
|
|
63
|
+
static getCurrentWidgetId() {
|
|
64
|
+
return this.getCurrent().id;
|
|
65
|
+
}
|
|
66
|
+
/** Will throw if the library is being used on a non Seelen UI environment */
|
|
67
|
+
static getCurrent() {
|
|
68
|
+
if (!CURRENT_WIDGET) {
|
|
69
|
+
throw new Error('The library is being used on a non Seelen UI environment');
|
|
70
|
+
}
|
|
71
|
+
return CURRENT_WIDGET;
|
|
61
72
|
}
|
|
62
73
|
static async getCurrentAsync() {
|
|
63
|
-
const currentWidgetId = this.
|
|
74
|
+
const [currentWidgetId] = this.getDecodedWebviewLabel();
|
|
64
75
|
const list = await WidgetList.getAsync();
|
|
65
|
-
const widget = list.
|
|
76
|
+
const widget = list.findById(currentWidgetId);
|
|
66
77
|
if (!widget) {
|
|
67
78
|
throw new Error('Current Widget not found');
|
|
68
79
|
}
|
|
@@ -153,3 +164,11 @@ export class Widget {
|
|
|
153
164
|
}, 500));
|
|
154
165
|
}
|
|
155
166
|
}
|
|
167
|
+
let CURRENT_WIDGET = null;
|
|
168
|
+
// @ts-ignore the method is private
|
|
169
|
+
Widget.getCurrentAsync().then((w) => {
|
|
170
|
+
CURRENT_WIDGET = w;
|
|
171
|
+
}).catch(() => {
|
|
172
|
+
CURRENT_WIDGET = null;
|
|
173
|
+
console.warn('The library is being used on a non Seelen UI environment');
|
|
174
|
+
});
|
package/esm/state/wm_layout.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WmNodeKind, WmNodeLifetime } from '../types/mod.js';
|
|
2
2
|
import type { Enum } from '../utils/enums.js';
|
|
3
|
-
declare const
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
export { NodeSubtype, NodeType, NoFallbackBehavior };
|
|
3
|
+
declare const WmNodeKind: Enum<WmNodeKind>;
|
|
4
|
+
declare const WmNodeLifetime: Enum<WmNodeLifetime>;
|
|
5
|
+
export { WmNodeKind, WmNodeLifetime };
|
|
7
6
|
//# sourceMappingURL=wm_layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wm_layout.d.ts","sourceRoot":"","sources":["../../src/state/wm_layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"wm_layout.d.ts","sourceRoot":"","sources":["../../src/state/wm_layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAM9C,QAAA,MAAM,UAAU,EAAE,IAAI,CAAC,UAAU,CAKhC,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,IAAI,CAAC,cAAc,CAGxC,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
|
package/esm/state/wm_layout.js
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
// =================================================================================
|
|
2
2
|
// From here some enums as helpers like @seelen-ui/types only contains types
|
|
3
3
|
// =================================================================================
|
|
4
|
-
const
|
|
4
|
+
const WmNodeKind = {
|
|
5
5
|
Vertical: 'Vertical',
|
|
6
6
|
Horizontal: 'Horizontal',
|
|
7
7
|
Leaf: 'Leaf',
|
|
8
8
|
Stack: 'Stack',
|
|
9
|
-
Fallback: 'Fallback',
|
|
10
9
|
};
|
|
11
|
-
const
|
|
10
|
+
const WmNodeLifetime = {
|
|
12
11
|
Temporal: 'Temporal',
|
|
13
12
|
Permanent: 'Permanent',
|
|
14
13
|
};
|
|
15
|
-
|
|
16
|
-
Float: 'Float',
|
|
17
|
-
Unmanaged: 'Unmanaged',
|
|
18
|
-
};
|
|
19
|
-
export { NodeSubtype, NodeType, NoFallbackBehavior };
|
|
14
|
+
export { WmNodeKind, WmNodeLifetime };
|
|
@@ -5,8 +5,8 @@ import type { BluetoothDevice, BluetoothDevicePairShowPinRequest, BluetoothMajor
|
|
|
5
5
|
import type { UnlistenFn } from '@tauri-apps/api/event';
|
|
6
6
|
export declare class BluetoothDevices extends List<BluetoothDevice> {
|
|
7
7
|
static getAsync(): Promise<BluetoothDevices>;
|
|
8
|
-
static onChange(cb: (
|
|
9
|
-
static onDiscoveredDevicesChange(cb: (
|
|
8
|
+
static onChange(cb: (payload: BluetoothDevices) => void): Promise<UnSubscriber>;
|
|
9
|
+
static onDiscoveredDevicesChange(cb: (payload: BluetoothDevices) => void): Promise<UnSubscriber>;
|
|
10
10
|
static discover(): Promise<void>;
|
|
11
11
|
static stopDiscovery(): Promise<void>;
|
|
12
12
|
static pairDevice(address: bigint): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/system_state/bluetooth/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,iCAAiC,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAClH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,qBAAa,gBAAiB,SAAQ,IAAI,CAAC,eAAe,CAAC;IACzD,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAI5C,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/system_state/bluetooth/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,iCAAiC,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAClH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,qBAAa,gBAAiB,SAAQ,IAAI,CAAC,eAAe,CAAC;IACzD,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAI5C,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;IAI/E,MAAM,CAAC,yBAAyB,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;WAInF,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;WAGzB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;WAI9B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAG1C,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAGvC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAI/D,aAAa,CACxB,EAAE,EAAE,CAAC,KAAK,EAAE,iCAAiC,GAAG,IAAI,KAAK,IAAI,GAC5D,OAAO,CAAC,UAAU,CAAC;IAWtB,MAAM,CAAC,OAAO,IAAI,gBAAgB;CAGnC;AAED,QAAA,MAAM,cAAc,EAAE,IAAI,CAAC,mBAAmB,CAY7C,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -15,6 +15,6 @@ export interface SystemLanguage {
|
|
|
15
15
|
}
|
|
16
16
|
export declare class LanguageList extends List<SystemLanguage> {
|
|
17
17
|
static getAsync(): Promise<LanguageList>;
|
|
18
|
-
static onChange(cb: (
|
|
18
|
+
static onChange(cb: (payload: LanguageList) => void): Promise<UnSubscriber>;
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=language.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../src/system_state/language.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,cAAc,EAAE,CAAC;CAChC;AAED,qBAAa,YAAa,SAAQ,IAAI,CAAC,cAAc,CAAC;IACpD,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,YAAY,CAAC;IAIxC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../src/system_state/language.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,cAAc,EAAE,CAAC;CAChC;AAED,qBAAa,YAAa,SAAQ,IAAI,CAAC,cAAc,CAAC;IACpD,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,YAAY,CAAC;IAIxC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;CAG5E"}
|
|
@@ -3,6 +3,6 @@ import type { PhysicalMonitor } from '../types/mod.js';
|
|
|
3
3
|
import { List } from '../utils/List.js';
|
|
4
4
|
export declare class ConnectedMonitorList extends List<PhysicalMonitor> {
|
|
5
5
|
static getAsync(): Promise<ConnectedMonitorList>;
|
|
6
|
-
static onChange(cb: (
|
|
6
|
+
static onChange(cb: (payload: ConnectedMonitorList) => void): Promise<UnSubscriber>;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=monitors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitors.d.ts","sourceRoot":"","sources":["../../src/system_state/monitors.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,qBAAa,oBAAqB,SAAQ,IAAI,CAAC,eAAe,CAAC;IAC7D,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAIhD,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"monitors.d.ts","sourceRoot":"","sources":["../../src/system_state/monitors.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,qBAAa,oBAAqB,SAAQ,IAAI,CAAC,eAAe,CAAC;IAC7D,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAIhD,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;CAGpF"}
|
|
@@ -4,7 +4,7 @@ export declare class UIColors {
|
|
|
4
4
|
inner: IUIColors;
|
|
5
5
|
constructor(inner: IUIColors);
|
|
6
6
|
static getAsync(): Promise<UIColors>;
|
|
7
|
-
static onChange(cb: (
|
|
7
|
+
static onChange(cb: (payload: UIColors) => void): Promise<UnSubscriber>;
|
|
8
8
|
static default(): UIColors;
|
|
9
9
|
setAsCssVariables(): void;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui_colors.d.ts","sourceRoot":"","sources":["../../src/system_state/ui_colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEnF,OAAO,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE9E,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,
|
|
1
|
+
{"version":3,"file":"ui_colors.d.ts","sourceRoot":"","sources":["../../src/system_state/ui_colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEnF,OAAO,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE9E,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;CAwB1B;AAED,qBAAa,KAAK;IACG,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;IAEhC,qCAAqC;IACrC,MAAM,CAAC,MAAM,IAAI,KAAK;IAStB,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,oBAAoB;IAkB5B,WAAW,IAAI,MAAM;IAUrB;;;;;;;OAOG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAapC;;;;;OAKG;IACH,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM;CAY1C"}
|
|
@@ -26,6 +26,11 @@ export class UIColors {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
setAsCssVariables() {
|
|
29
|
+
const id = 'system-ui-color-variables';
|
|
30
|
+
document.getElementById(id)?.remove();
|
|
31
|
+
const element = document.createElement('style');
|
|
32
|
+
element.id = id;
|
|
33
|
+
element.textContent = ':root {\n';
|
|
29
34
|
for (const [key, value] of Object.entries(this.inner)) {
|
|
30
35
|
if (typeof value !== 'string') {
|
|
31
36
|
continue;
|
|
@@ -37,9 +42,10 @@ export class UIColors {
|
|
|
37
42
|
const b = color & 255;
|
|
38
43
|
// replace rust snake case with kebab case
|
|
39
44
|
const name = key.replace('_', '-');
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
element.textContent += `--config-${name}-color: ${value.slice(0, 7)};\n`;
|
|
46
|
+
element.textContent += `--config-${name}-color-rgb: ${r}, ${g}, ${b};\n`;
|
|
42
47
|
}
|
|
48
|
+
document.head.appendChild(element);
|
|
43
49
|
}
|
|
44
50
|
}
|
|
45
51
|
export class Color {
|
|
@@ -7,7 +7,7 @@ export declare class UserDetails {
|
|
|
7
7
|
user: User;
|
|
8
8
|
constructor(user: User);
|
|
9
9
|
static getAsync(): Promise<UserDetails>;
|
|
10
|
-
static onChange(cb: (
|
|
10
|
+
static onChange(cb: (payload: UserDetails) => void): Promise<UnSubscriber>;
|
|
11
11
|
}
|
|
12
12
|
export declare class UserDirectory extends List<File> {
|
|
13
13
|
static readonly folderType: FolderType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/system_state/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtG,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE9D,QAAA,MAAM,UAAU,EAAE,IAAI,CAAC,UAAU,CAShC,CAAC;AAEF,qBAAa,WAAW;IACH,IAAI,EAAE,IAAI;gBAAV,IAAI,EAAE,IAAI;IAE7B,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC;IAIvC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/system_state/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtG,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE9D,QAAA,MAAM,UAAU,EAAE,IAAI,CAAC,UAAU,CAShC,CAAC;AAEF,qBAAa,WAAW;IACH,IAAI,EAAE,IAAI;gBAAV,IAAI,EAAE,IAAI;IAE7B,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC;IAIvC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;CAG3E;AAED,qBAAa,aAAc,SAAQ,IAAI,CAAC,IAAI,CAAC;IAC3C,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAsB;WAE/C,QAAQ,IAAI,OAAO,CAAC,aAAa,CAAC;IAM/C,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvD,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;IAQ5E,MAAM,CAAC,OAAO,IAAI,aAAa;CAGhC;AAED,qBAAa,YAAa,SAAQ,aAAa;IAC7C,gBAAyB,UAAU,WAAqB;CACzD;AAED,qBAAa,aAAc,SAAQ,aAAa;IAC9C,gBAAyB,UAAU,YAAsB;CAC1D;AAED,qBAAa,eAAgB,SAAQ,aAAa;IAChD,gBAAyB,UAAU,cAAwB;CAC5D;AAED,qBAAa,eAAgB,SAAQ,aAAa;IAChD,gBAAyB,UAAU,cAAwB;CAC5D;AAED,qBAAa,cAAe,SAAQ,aAAa;IAC/C,gBAAyB,UAAU,aAAuB;CAC3D;AAED,qBAAa,YAAa,SAAQ,aAAa;IAC7C,gBAAyB,UAAU,WAAqB;CACzD;AAED,qBAAa,WAAY,SAAQ,aAAa;IAC5C,gBAAyB,UAAU,UAAoB;CACxD;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CssVariableName.d.ts","sourceRoot":"","sources":["../../src/types/CssVariableName.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Icon } from './Icon.js';
|
|
2
|
+
/**
|
|
3
|
+
* Here specific/custom icons for widgets can be stored.
|
|
4
|
+
*/
|
|
5
|
+
export type CustomIconPackEntry = {
|
|
6
|
+
/**
|
|
7
|
+
* we recomend following the widget id + icon name to avoid collisions
|
|
8
|
+
* e.g. "@username/widgetid::iconname" but you can use whatever you want
|
|
9
|
+
*/
|
|
10
|
+
key: string;
|
|
11
|
+
/**
|
|
12
|
+
* Value is the path to the icon relative to the icon pack folder.
|
|
13
|
+
*/
|
|
14
|
+
icon: Icon;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=CustomIconPackEntry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomIconPackEntry.d.ts","sourceRoot":"","sources":["../../src/types/CustomIconPackEntry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC"}
|
|
@@ -2,5 +2,10 @@ import type { WorkspaceId } from './WorkspaceId.js';
|
|
|
2
2
|
export type DesktopWorkspace = {
|
|
3
3
|
id: WorkspaceId;
|
|
4
4
|
name: string | null;
|
|
5
|
+
/**
|
|
6
|
+
* react-icon icon name
|
|
7
|
+
*/
|
|
8
|
+
icon: string | null;
|
|
9
|
+
windows: Array<number>;
|
|
5
10
|
};
|
|
6
11
|
//# sourceMappingURL=DesktopWorkspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesktopWorkspace.d.ts","sourceRoot":"","sources":["../../src/types/DesktopWorkspace.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG;
|
|
1
|
+
{"version":3,"file":"DesktopWorkspace.d.ts","sourceRoot":"","sources":["../../src/types/DesktopWorkspace.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,WAAW,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import type { MonitorId } from './MonitorId.js';
|
|
1
2
|
export type FocusedApp = {
|
|
2
3
|
hwnd: number;
|
|
4
|
+
monitor: MonitorId;
|
|
3
5
|
title: string;
|
|
4
6
|
name: string;
|
|
5
7
|
exe: string | null;
|
|
6
8
|
umid: string | null;
|
|
7
9
|
isMaximized: boolean;
|
|
10
|
+
isFullscreened: boolean;
|
|
8
11
|
isSeelenOverlay: boolean;
|
|
12
|
+
isBeingDragged: boolean;
|
|
9
13
|
};
|
|
10
14
|
//# sourceMappingURL=FocusedApp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusedApp.d.ts","sourceRoot":"","sources":["../../src/types/FocusedApp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FocusedApp.d.ts","sourceRoot":"","sources":["../../src/types/FocusedApp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC"}
|
package/esm/types/FocusedApp.js
CHANGED
package/esm/types/Icon.d.ts
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The icon paths in this structure are relative to the icon pack folder.
|
|
3
|
+
*/
|
|
4
|
+
export type Icon = {
|
|
2
5
|
/**
|
|
3
|
-
* Icon to use
|
|
4
|
-
* Value is the path to the icon relative to the icon pack folder.
|
|
6
|
+
* Icon to use if no light or dark icon is specified, if both light and dark are specified this can be omitted
|
|
5
7
|
*/
|
|
6
|
-
|
|
8
|
+
base: string | null;
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
9
|
-
* Value is the path to the icon relative to the icon pack folder.
|
|
10
|
+
* Alternative icon to use when system theme is light
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
+
light: string | null;
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* Alternative icon to use when system theme is dark
|
|
15
|
+
*/
|
|
16
|
+
dark: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Mask to be applied over the icon, themes can use this to apply custom colors over the icon.
|
|
16
19
|
*/
|
|
17
20
|
mask: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the icon is a square or not
|
|
23
|
+
*/
|
|
24
|
+
isAproximatelySquare: boolean;
|
|
18
25
|
};
|
|
19
26
|
//# sourceMappingURL=Icon.d.ts.map
|